gasnet-2025.8.0/0000775000175000017500000000000015142314234013414 5ustar alastairalastairgasnet-2025.8.0/unBootstrap0000775000175000017500000000240315142313673015667 0ustar alastairalastair#!/bin/sh # $Source: bitbucket.org:berkeleylab/gasnet.git/unBootstrap $ # Terms of use are as specified in license.txt # Description: # This scripts undoes the effects of a "Bootstrap", # removing all the automatically generated files and # returning the source tree back to a fully "clean" state rm -Rf autom4te*.cache rm -f Makefile.in \ configure \ gasnet_config.h.in \ gasnet_config.h.in~ \ aclocal.m4 \ config.status \ stamp-h.in \ config-aux/Makefile.in \ config-aux/Makefile \ config-aux/compile \ ibv-conduit/Makefile.in \ ibv-conduit/contrib/Makefile.in \ mpi-conduit/Makefile.in \ mpi-conduit/contrib/Makefile.in \ ofi-conduit/Makefile.in \ ofi-conduit/contrib/Makefile.in \ smp-conduit/Makefile.in \ smp-conduit/contrib/Makefile.in \ udp-conduit/Makefile.in \ ucx-conduit/Makefile.in \ ucx-conduit/contrib/Makefile.in \ other/Makefile.in \ other/ammpi/Makefile.in \ other/amudp/Makefile.in \ other/contrib/Makefile.in \ other/firehose/Makefile.in \ other/valgrind/Makefile.in \ tests/Makefile gasnet-2025.8.0/gasnet_internal.c0000664000175000017500000036674015142313673016763 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_internal.c $ * Description: GASNet implementation of internal helpers * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* time, ctime */ #if HAVE_MALLOC_H && !PLATFORM_OS_OPENBSD /* OpenBSD warns that malloc.h is obsolete */ #include #endif /* set to non-zero for verbose error reporting */ int gasneti_VerboseErrors = 1; /* ------------------------------------------------------------------------------------ */ /* generic atomics support */ #if defined(GASNETI_BUILD_GENERIC_ATOMIC32) || defined(GASNETI_BUILD_GENERIC_ATOMIC64) #ifdef GASNETI_ATOMIC_LOCK_TBL_DEFNS GASNETI_ATOMIC_LOCK_TBL_DEFNS(gasneti_malloc) #endif #ifdef GASNETI_GENATOMIC32_DEFN GASNETI_GENATOMIC32_DEFN #endif #ifdef GASNETI_GENATOMIC64_DEFN GASNETI_GENATOMIC64_DEFN #endif #endif /* ------------------------------------------------------------------------------------ */ #if GASNETI_THROTTLE_POLLERS gasneti_atomic_t gasneti_throttle_haveusefulwork = gasneti_atomic_init(0); gasneti_mutex_t gasneti_throttle_spinpoller = GASNETI_MUTEX_INITIALIZER; #endif #if GASNET_DEBUG GASNETI_THREADKEY_DEFINE(gasneti_throttledebug_key); #endif #define GEX_VERSION_STR _STRINGIFY(GEX_SPEC_VERSION_MAJOR) "." _STRINGIFY(GEX_SPEC_VERSION_MINOR) GASNETI_IDENT(gasneti_IdentString_EXAPIVersion, "$GASNetEXAPIVersion: " GEX_VERSION_STR " $"); #define GASNET_VERSION_STR _STRINGIFY(GASNETI_SPEC_VERSION_MAJOR) GASNETI_IDENT(gasneti_IdentString_APIVersion, "$GASNetAPIVersion: " GASNET_VERSION_STR " $"); #define GASNETI_THREAD_MODEL_STR _STRINGIFY(GASNETI_THREAD_MODEL) GASNETI_IDENT(gasneti_IdentString_ThreadModel, "$GASNetThreadModel: GASNET_" GASNETI_THREAD_MODEL_STR " $"); #define GASNETI_SEGMENT_CONFIG_STR _STRINGIFY(GASNETI_SEGMENT_CONFIG) GASNETI_IDENT(gasneti_IdentString_SegConfig, "$GASNetSegment: GASNET_SEGMENT_" GASNETI_SEGMENT_CONFIG_STR " $"); #ifdef GASNETI_BUG1389_WORKAROUND GASNETI_IDENT(gasneti_IdentString_ConservativeLocalCopy, "$GASNetConservativeLocalCopy: 1 $"); #endif #if GASNETI_CLIENT_THREADS GASNETI_IDENT(gasneti_IdentString_ThreadInfoOpt, "$GASNetThreadInfoOpt: " _STRINGIFY(GASNETI_THREADINFO_OPT) " $"); #endif #if GASNETI_SWIZZLE GASNETI_IDENT(gasneti_IdentString_Swizzle, "$GASNetSwizzle: 1 $"); #endif /* embed a string with complete configuration info to support versioning checks */ GASNETI_IDENT(gasneti_IdentString_libraryConfig, "$GASNetConfig: (libgasnet.a) " GASNET_CONFIG_STRING " $"); /* the canonical conduit name */ GASNETI_IDENT(gasneti_IdentString_ConduitName, "$GASNetConduitName: " GASNET_CONDUIT_NAME_STR " $"); int gasneti_init_done = 0; /* true after init */ int gasneti_attach_done = 0; /* true after attach */ extern void gasneti_checkinit(void) { if (!gasneti_init_done) gasneti_fatalerror("Illegal call to GASNet before library initialization. Please use gex_Client_Init() to initialize GASNet."); } extern void gasneti_checkattach(void) { gasneti_checkinit(); if (!gasneti_attach_done) gasneti_fatalerror("Illegal call to GASNet before gasnet_attach() initialization"); } void (*gasnet_client_attach_hook)(void *, uintptr_t) = NULL; int gasneti_wait_mode = GASNET_WAIT_SPIN; int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MAJOR_,GASNET_RELEASE_VERSION_MAJOR)) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MINOR_,GASNET_RELEASE_VERSION_MINOR)) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_PATCH_,GASNET_RELEASE_VERSION_PATCH)) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_THREAD_MODEL) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_SEGMENT_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_DEBUG_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_TRACE_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_STATS_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MALLOC_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_SRCLINES_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ALIGN_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_PSHM_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_PTR_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_TIMER_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MEMBAR_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ATOMIC_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ATOMIC32_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ATOMIC64_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_TIOPT_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MK_CLASS_CUDA_UVA_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MK_CLASS_HIP_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MK_CLASS_ZE_CONFIG) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(HIDDEN_AM_CONCUR_,GASNET_HIDDEN_AM_CONCURRENCY_LEVEL)) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(CACHE_LINE_BYTES_,GASNETI_CACHE_LINE_BYTES)) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(GASNETI_TM0_ALIGN_,GASNETI_TM0_ALIGN)) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(CORE_,GASNET_CORE_NAME)) = 1; int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(EXTENDED_,GASNET_EXTENDED_NAME)) = 1; #if GASNET_CONDUIT_OFI int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(OFI_PROVIDER_,GASNETC_OFI_PROVIDER_IDENT)) = 1; #endif /* global definitions of GASNet-wide internal variables not subject to override */ gex_Rank_t gasneti_mynode = (gex_Rank_t)-1; gex_Rank_t gasneti_nodes = 0; // a necessary evil - see the declaration in gasnet_help.h gasneti_TM_t gasneti_thing_that_goes_thunk_in_the_dark = NULL; /* Default global definitions of GASNet-wide internal variables if conduits override one of these, they must still provide variable or macro definitions for these tokens */ #if defined(_GASNET_GETMAXSEGMENTSIZE_DEFAULT) uintptr_t gasneti_MaxLocalSegmentSize = 0; uintptr_t gasneti_MaxGlobalSegmentSize = 0; #endif #ifdef _GASNETI_PROGRESSFNS_DEFAULT GASNETI_PROGRESSFNS_LIST(_GASNETI_PROGRESSFNS_DEFINE_FLAGS) #endif #if GASNET_DEBUG static void gasneti_disabled_progressfn(void) { gasneti_fatalerror("Called a disabled progress function"); } gasneti_progressfn_t gasneti_debug_progressfn_bool = gasneti_disabled_progressfn; gasneti_progressfn_t gasneti_debug_progressfn_counted = gasneti_disabled_progressfn; #endif void gasneti_empty_pf(void) {} gasnet_seginfo_t *gasneti_seginfo = NULL; gasnet_seginfo_t *gasneti_seginfo_aux = NULL; // TODO: this is proof-of-concept and not a scalable final solution (bug 4088) // Note that (gasneti_seginfo_tbl[0] == gasneti_seginfo) to simplify some logic. gasnet_seginfo_t *gasneti_seginfo_tbl[GASNET_MAXEPS] = {NULL, }; /* ------------------------------------------------------------------------------------ */ /* conduit-independent sanity checks */ extern void gasneti_check_config_preinit(void) { gasneti_static_assert(sizeof(int8_t) == 1); gasneti_static_assert(sizeof(uint8_t) == 1); gasneti_static_assert(sizeof(gasnete_anytype8_t) == 1); #ifndef INTTYPES_16BIT_MISSING gasneti_static_assert(sizeof(int16_t) == 2); gasneti_static_assert(sizeof(uint16_t) == 2); gasneti_static_assert(sizeof(gasnete_anytype16_t) == 2); #endif gasneti_static_assert(sizeof(int32_t) == 4); gasneti_static_assert(sizeof(uint32_t) == 4); gasneti_static_assert(sizeof(gasnete_anytype32_t) == 4); gasneti_static_assert(sizeof(int64_t) == 8); gasneti_static_assert(sizeof(uint64_t) == 8); gasneti_static_assert(sizeof(gasnete_anytype64_t) == 8); gasneti_static_assert(sizeof(uintptr_t) >= sizeof(void *)); #define CHECK_DT(id, type) do { \ gasneti_assert_always(gasneti_dt_valid(id)); \ gasneti_assert_always_uint(gasneti_dt_size(id) ,==, sizeof(type)); \ gasneti_assert_always(!!gasneti_dt_int(id) == !gasneti_dt_fp(id)); \ } while (0) #define CHECK_INT_DT(id, type, sign) do { \ CHECK_DT(id, type); \ gasneti_assert_always(gasneti_dt_int(id)); \ gasneti_assert_always(gasneti_dt_##sign(id)); \ gasneti_assert_always(!!gasneti_dt_signed(id) == !gasneti_dt_unsigned(id)); \ } while (0) #define CHECK_FP_DT(id, type) do { \ CHECK_DT(id, type); \ gasneti_assert_always(gasneti_dt_fp(id)); \ } while (0) CHECK_INT_DT(GEX_DT_I32, int32_t, signed); CHECK_INT_DT(GEX_DT_U32, uint32_t, unsigned); CHECK_INT_DT(GEX_DT_I64, int64_t, signed); CHECK_INT_DT(GEX_DT_U64, uint64_t, unsigned); CHECK_FP_DT(GEX_DT_FLT, float); CHECK_FP_DT(GEX_DT_DBL, double); gasneti_assert_always(gasneti_dt_valid_reduce(GEX_DT_USER)); gasneti_assert_always(!gasneti_dt_valid_atomic(GEX_DT_USER)); gasneti_assert_always(!gasneti_dt_int(GEX_DT_USER)); gasneti_assert_always(!gasneti_dt_fp(GEX_DT_USER)); gasneti_assert_always(!gasneti_dt_signed(GEX_DT_USER)); gasneti_assert_always(!gasneti_dt_unsigned(GEX_DT_USER)); #undef CHECK_DT #undef CHECK_INT_DT #undef CHECK_FP_DT #define _CHECK_OP(id, pred1, pred2, pred3) do { \ gasneti_assert_always(gasneti_op_atomic(id)); \ gasneti_assert_always(gasneti_op_int(id)); \ gasneti_assert_always(!!gasneti_op_0arg(id) + \ !!gasneti_op_1arg(id) + \ !!gasneti_op_2arg(id) == 1); \ gasneti_assert_always(gasneti_op_##pred1(id)); \ gasneti_assert_always(gasneti_op_##pred2(id)); \ gasneti_assert_always(gasneti_op_##pred3(id)); \ } while (0) #define CHECK_ARITH_OP(stem, reduce_pred, fp_pred) do { \ gasneti_assert_always(!gasneti_op_fetch(GEX_OP_##stem)); \ _CHECK_OP(GEX_OP_##stem, reduce_pred, fp_pred, valid); \ gasneti_assert_always(gasneti_op_fetch(GEX_OP_F##stem)); \ _CHECK_OP(GEX_OP_F##stem, not_reduce, fp_pred, valid); \ } while (0) #define CHECK_ACCESSOR(stem, pred) do { \ gasneti_assert_always(gasneti_op_valid(GEX_OP_##stem)); \ _CHECK_OP(GEX_OP_##stem, fp, not_reduce, pred); \ } while (0) #define CHECK_USER(stem) do { \ gasneti_assert_always(gasneti_op_valid(GEX_OP_##stem)); \ gasneti_assert_always(gasneti_op_valid_reduce(GEX_OP_##stem)); \ gasneti_assert_always(!gasneti_op_valid_atomic(GEX_OP_##stem)); \ gasneti_assert_always(gasneti_op_int(GEX_OP_##stem)); \ gasneti_assert_always(gasneti_op_fp(GEX_OP_##stem)); \ } while (0) #define gasneti_op_not_reduce !gasneti_op_reduce #define gasneti_op_not_fetch !gasneti_op_fetch #define gasneti_op_not_fp !gasneti_op_fp CHECK_ARITH_OP(AND, reduce, not_fp); CHECK_ARITH_OP(OR, reduce, not_fp); CHECK_ARITH_OP(XOR, reduce, not_fp); CHECK_ARITH_OP(ADD, reduce, fp); CHECK_ARITH_OP(SUB, not_reduce, fp); CHECK_ARITH_OP(MULT, reduce, fp); CHECK_ARITH_OP(MIN, reduce, fp); CHECK_ARITH_OP(MAX, reduce, fp); CHECK_ARITH_OP(INC, not_reduce, fp); CHECK_ARITH_OP(DEC, not_reduce, fp); CHECK_ACCESSOR(SET, not_fetch); CHECK_ACCESSOR(CAS, not_fetch); CHECK_ACCESSOR(GET, fetch); CHECK_ACCESSOR(SWAP, fetch); CHECK_ACCESSOR(FCAS, fetch); CHECK_USER(USER); CHECK_USER(USER_NC); #undef _CHECK_OP #undef CHECK_ARITH_OP #undef CHECK_ACCESSOR #undef CHECK_USER #undef gasneti_op_not_reduce #undef gasneti_op_not_fetch #undef gasneti_op_not_fp #if WORDS_BIGENDIAN #if PLATFORM_ARCH_LITTLE_ENDIAN #error endianness disagreement: PLATFORM_ARCH_LITTLE_ENDIAN and WORDS_BIGENDIAN are both set #endif gasneti_assert_always(!gasneti_isLittleEndian()); #else #if PLATFORM_ARCH_BIG_ENDIAN #error endianness disagreement: PLATFORM_ARCH_BIG_ENDIAN and !WORDS_BIGENDIAN #endif gasneti_assert_always(gasneti_isLittleEndian()); #endif /* check GASNET_PAGESIZE is a power of 2 and > 0 */ gasneti_static_assert(GASNET_PAGESIZE > 0); gasneti_static_assert(GASNETI_POWEROFTWO(GASNET_PAGESIZE)); gasneti_static_assert(SIZEOF_GEX_RMA_VALUE_T == sizeof(gex_RMA_Value_t)); gasneti_static_assert(SIZEOF_GEX_RMA_VALUE_T >= sizeof(int)); gasneti_static_assert(SIZEOF_GEX_RMA_VALUE_T >= sizeof(void *)); #if PLATFORM_ARCH_32 && !PLATFORM_ARCH_64 gasneti_static_assert(sizeof(void*) == 4); #elif !PLATFORM_ARCH_32 && PLATFORM_ARCH_64 gasneti_static_assert(sizeof(void*) == 8); #else #error must #define exactly one of PLATFORM_ARCH_32 or PLATFORM_ARCH_64 #endif #if defined(GASNETI_UNI_BUILD) if (gasneti_cpu_count() > 1) gasneti_fatalerror("GASNet was built in uniprocessor (non-SMP-safe) configuration, " "but executed on an SMP. Please re-run GASNet configure with --enable-smp-safe and rebuild"); #endif { static int firstcall = 1; if (firstcall) { /* miscellaneous conduit-independent initializations */ firstcall = 0; #if GASNET_DEBUG && GASNETI_THREADS gasneti_threadkey_init(gasneti_throttledebug_key); #endif gasneti_memcheck_all(); } } } static void gasneti_check_portable_conduit(void); static void gasneti_check_architecture(void); int gasneti_malloc_munmap_disabled = 0; extern void gasneti_check_config_postattach(void) { gasneti_check_config_preinit(); /* verify sanity of the core interface */ gasneti_assert_always_uint(gex_AM_MaxArgs() ,>=, 2*MAX(sizeof(int),sizeof(void*))); gasneti_assert_always_uint(gex_AM_LUBRequestMedium() ,>=, 512); gasneti_assert_always_uint(gex_AM_LUBReplyMedium() ,>=, 512); gasneti_assert_always_uint(gex_AM_LUBRequestLong() ,>=, 512); gasneti_assert_always_uint(gex_AM_LUBReplyLong() ,>=, 512); gasneti_assert_always_uint(gasneti_nodes ,>=, 1); gasneti_assert_always_uint(gasneti_mynode ,<, gasneti_nodes); { static int firstcall = 1; if (firstcall) { /* miscellaneous conduit-independent initializations */ firstcall = 0; #ifndef GASNET_DISABLE_MUNMAP_DEFAULT #define GASNET_DISABLE_MUNMAP_DEFAULT 0 #endif if (gasneti_getenv_yesno_withdefault("GASNET_DISABLE_MUNMAP",GASNET_DISABLE_MUNMAP_DEFAULT)) { #if HAVE_PTMALLOC mallopt(M_TRIM_THRESHOLD, -1); mallopt(M_MMAP_MAX, 0); GASNETI_TRACE_PRINTF(I,("Setting mallopt M_TRIM_THRESHOLD=-1 and M_MMAP_MAX=0")); gasneti_malloc_munmap_disabled = 1; #else if (gasneti_verboseenv()) gasneti_console0_message("WARNING","GASNET_DISABLE_MUNMAP set on an unsupported platform"); else GASNETI_TRACE_PRINTF(I,("WARNING: GASNET_DISABLE_MUNMAP set on an unsupported platform")); #endif } #if GASNET_NDEBUG gasneti_check_portable_conduit(); gasneti_check_architecture(); #endif } } gasneti_memcheck_all(); gasneti_flush_streams(); // flush above messages, and ensure FS_SYNC envvar is initted } /* ------------------------------------------------------------------------------------ */ // Helpers for debug checks #if GASNET_DEBUG void gasneti_check_inject(int for_reply GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; if (!mythread) return; // Some conduits communicate very early if (mythread->reply_handler_active) { gasneti_fatalerror("Invalid GASNet call (communication injection or poll) while executing a Reply handler"); } if (mythread->request_handler_active && !for_reply) { gasneti_fatalerror("Invalid GASNet call (communication injection or poll) while executing a Request handler"); } // NPAM checks are distinct to allow that entire subsytem to be overridden gasneti_checknpam(for_reply GASNETI_THREAD_PASS); // TODO: check for HSL context } // Resets all state indicative of restricted context. // This is intended for use within `gasnet-exit()` which *is* valid from // handler context, and is known to run with HSLs held on error paths. // There is currently no other known-valid reason to use this call. void gasneti_check_inject_reset(GASNETI_THREAD_FARG_ALONE) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; if (!mythread) return; // Some conduits communicate very early mythread->reply_handler_active = 0; mythread->request_handler_active = 0; // TODO: reset HSL context } #endif /* ------------------------------------------------------------------------------------ */ #ifndef _GASNET_ERRORNAME extern const char *gasnet_ErrorName(int errval) { switch (errval) { case GASNET_OK: return "GASNET_OK"; case GASNET_ERR_NOT_INIT: return "GASNET_ERR_NOT_INIT"; case GASNET_ERR_BAD_ARG: return "GASNET_ERR_BAD_ARG"; case GASNET_ERR_RESOURCE: return "GASNET_ERR_RESOURCE"; case GASNET_ERR_BARRIER_MISMATCH: return "GASNET_ERR_BARRIER_MISMATCH"; case GASNET_ERR_NOT_READY: return "GASNET_ERR_NOT_READY"; default: return "*unknown*"; } } #endif #ifndef _GASNET_ERRORDESC extern const char *gasnet_ErrorDesc(int errval) { switch (errval) { case GASNET_OK: return "No error"; case GASNET_ERR_NOT_INIT: return "GASNet message layer not initialized"; case GASNET_ERR_BAD_ARG: return "Invalid function parameter passed"; case GASNET_ERR_RESOURCE: return "Problem with requested resource"; case GASNET_ERR_BARRIER_MISMATCH: return "Barrier id's mismatched"; case GASNET_ERR_NOT_READY: return "Non-blocking operation not complete"; default: return "no description available"; } } #endif /* ------------------------------------------------------------------------------------ */ extern void gasneti_freezeForDebugger(void) { if (gasneti_getenv_yesno_withdefault("GASNET_FREEZE",0)) { gasneti_freezeForDebuggerNow(&gasnet_frozen,"gasnet_frozen"); } } /* ------------------------------------------------------------------------------------ */ // Client management #ifdef GASNETC_CLIENT_EXTRA_DECLS GASNETC_CLIENT_EXTRA_DECLS #endif #ifndef _GEX_CLIENT_T #ifndef gasneti_import_client gasneti_Client_t gasneti_import_client(gex_Client_t _client) { const gasneti_Client_t _real_client = GASNETI_IMPORT_POINTER(gasneti_Client_t,_client); GASNETI_IMPORT_MAGIC(_real_client, CLIENT); return _real_client; } gasneti_Client_t gasneti_import_client_valid(gex_Client_t client) { gasneti_assert(client != GEX_CLIENT_INVALID); return gasneti_import_client(client); } #endif #ifndef gasneti_export_client gex_Client_t gasneti_export_client(gasneti_Client_t _real_client) { GASNETI_CHECK_MAGIC(_real_client, GASNETI_CLIENT_MAGIC); return GASNETI_EXPORT_POINTER(gex_Client_t, _real_client); } #endif // TODO-EX: either ensure name is unique OR perform "auto-increment" according to flags gasneti_Client_t gasneti_alloc_client( const char *name, gex_Flags_t flags) { gasneti_Client_t client; #ifdef GASNETC_SIZEOF_CLIENT_T size_t alloc_size = GASNETC_SIZEOF_CLIENT_T(); gasneti_assert_uint(alloc_size ,>=, sizeof(*client)); #else size_t alloc_size = sizeof(*client); #endif client = gasneti_malloc(alloc_size); GASNETI_INIT_MAGIC(client, GASNETI_CLIENT_MAGIC); client->_tm0 = NULL; client->_name = gasneti_strdup(name); client->_cdata = NULL; client->_flags = flags; gasneti_assert_always(sizeof(client->_next_ep_index) >= sizeof(gex_EP_Index_t)); gasneti_weakatomic32_set(&client->_next_ep_index, 0, 0); memset(client->_ep_tbl, 0, sizeof(client->_ep_tbl)); #ifdef GASNETC_CLIENT_INIT_HOOK GASNETC_CLIENT_INIT_HOOK(client); #else size_t extra = alloc_size - sizeof(*client); if (extra) memset(client + 1, 0, extra); #endif return client; } void gasneti_free_client(gasneti_Client_t client) { #ifdef GASNETI_CLIENT_FINI_HOOK GASNETI_CLIENT_FINI_HOOK(client); #endif gasneti_free((/*non-const*/char*)client->_name); GASNETI_INIT_MAGIC(client, GASNETI_CLIENT_BAD_MAGIC); gasneti_free(client); } #endif // _GEX_CLIENT_T /* ------------------------------------------------------------------------------------ */ // Segment management #ifdef GASNETC_SEGMENT_EXTRA_DECLS GASNETC_SEGMENT_EXTRA_DECLS #endif #ifndef _GEX_SEGMENT_T #ifndef gasneti_import_segment gasneti_Segment_t gasneti_import_segment(gex_Segment_t _segment) { const gasneti_Segment_t _real_segment = GASNETI_IMPORT_POINTER(gasneti_Segment_t,_segment); GASNETI_IMPORT_MAGIC(_real_segment, SEGMENT); return _real_segment; } gasneti_Segment_t gasneti_import_segment_valid(gex_Segment_t segment) { gasneti_assert(segment != GEX_SEGMENT_INVALID); return gasneti_import_segment(segment); } #endif #ifndef gasneti_export_segment gex_Segment_t gasneti_export_segment(gasneti_Segment_t _real_segment) { GASNETI_CHECK_MAGIC(_real_segment, GASNETI_SEGMENT_MAGIC); return GASNETI_EXPORT_POINTER(gex_Segment_t, _real_segment); } #endif const gasnet_seginfo_t gasneti_null_segment = {0}; // TODO-EX: probably need to add to a per-client container of some sort gasneti_Segment_t gasneti_alloc_segment( gasneti_Client_t client, void *addr, uintptr_t size, gex_MK_t kind, int client_allocated, gex_Flags_t flags) { gasneti_Segment_t segment; #ifdef GASNETC_SIZEOF_SEGMENT_T size_t alloc_size = GASNETC_SIZEOF_SEGMENT_T(); gasneti_assert_uint(alloc_size ,>=, sizeof(*segment)); #else size_t alloc_size = sizeof(*segment); #endif segment = gasneti_malloc(alloc_size); GASNETI_INIT_MAGIC(segment, GASNETI_SEGMENT_MAGIC); segment->_client = client; segment->_cdata = NULL; segment->_kind = kind; segment->_flags = flags; segment->_addr = addr; segment->_ub = (void*)((uintptr_t)addr + size); segment->_size = size; segment->_client_allocated = client_allocated; #ifdef GASNETC_SEGMENT_INIT_HOOK GASNETC_SEGMENT_INIT_HOOK(segment); #else size_t extra = alloc_size - sizeof(*segment); if (extra) memset(segment + 1, 0, extra); #endif return segment; } void gasneti_free_segment(gasneti_Segment_t segment) { #ifdef GASNETI_SEGMENT_FINI_HOOK GASNETI_SEGMENT_FINI_HOOK(segment); #endif GASNETI_INIT_MAGIC(segment, GASNETI_SEGMENT_BAD_MAGIC); gasneti_free(segment); } #endif // _GEX_SEGMENT_T extern int gex_Segment_Attach( gex_Segment_t *segment_p, gex_TM_t e_tm, uintptr_t length) { gasneti_TM_t i_tm = gasneti_import_tm_nonpair(e_tm); GASNETI_TRACE_PRINTF(O,("gex_Segment_Attach: segment_p=%p tm="GASNETI_TMSELFFMT" length=%"PRIuPTR, (void*)segment_p, GASNETI_TMSELFSTR(e_tm), length)); GASNETI_CHECK_INJECT(); if (! segment_p) { gasneti_fatalerror("Invalid call to gex_Segment_Attach with NULL segment_p"); } if (! e_tm) { gasneti_fatalerror("Invalid call to gex_Segment_Attach with NULL e_tm"); } // TODO-EX: remove if/when this limitation is removed static int once = 1; if (once) once = 0; else gasneti_fatalerror("gex_Segment_Attach: current implementation can be called at most once"); #if GASNET_SEGMENT_EVERYTHING *segment_p = GEX_SEGMENT_INVALID; gex_Event_Wait(gex_Coll_BarrierNB(e_tm, 0)); #else /* create a segment collectively */ // TODO-EX: this implementation only works *once* // TODO-EX: need to pass proper flags (e.g. pshm and bind) instead of 0 if (GASNET_OK != gasneti_segmentAttach(segment_p, e_tm, length, 0)) { GASNETI_RETURN_ERRR(RESOURCE,"Error attaching segment"); } #endif #if GASNETC_SEGMENT_ATTACH_HOOK if (GASNET_OK != gasnetc_segment_attach_hook(*segment_p, e_tm)) { GASNETI_RETURN_ERRR(RESOURCE,"Error attaching segment (conduit hook)"); } #endif return GASNET_OK; } extern int gex_Segment_Create( gex_Segment_t *segment_p, gex_Client_t e_client, gex_Addr_t address, uintptr_t length, gex_MK_t kind, gex_Flags_t flags) { gasneti_Client_t i_client = gasneti_import_client(e_client); // TODO: tracing of "kind" GASNETI_TRACE_PRINTF(O,("gex_Segment_Create: client='%s' address=%p length=%"PRIuPTR" flags=%d", i_client ? i_client->_name : "(NULL)", address, length, flags)); GASNETI_CHECK_INJECT(); if (! segment_p) { gasneti_fatalerror("Invalid call to gex_Segment_Create() with NULL segment_p"); } if (! i_client) { gasneti_fatalerror("Invalid call to gex_Segment_Create() with NULL client"); } if (flags) { gasneti_fatalerror("Invalid call to gex_Segment_Create() with non-zero flags"); } if (! length) { gasneti_fatalerror("Invalid call to gex_Segment_Create() with zero length"); } if (kind == GEX_MK_INVALID) { gasneti_fatalerror("Invalid call to gex_Segment_Create() with kind = GEX_MK_INVALID"); } // Create the Segment object, allocating memory if appropriate int rc = gasneti_segmentCreate(segment_p, i_client, address, length, kind, flags); #if GASNETC_SEGMENT_CREATE_HOOK if (rc == GASNET_OK) { rc = gasnetc_segment_create_hook(*segment_p); if (rc) { // Conduit hook failed. So cleanup conduit-independent resources gasneti_Segment_t i_segment = gasneti_import_segment(*segment_p); gasneti_assert_zeroret( gasneti_segmentDestroy(i_segment, 0) ); } } #endif GASNETI_RETURN(rc); } extern void gex_Segment_Destroy( gex_Segment_t e_segment, gex_Flags_t flags) { GASNETI_TRACE_PRINTF(O,("gex_Segment_Destroy: segment=%p flags=%d", (void*)e_segment, flags)); GASNETI_CHECK_INJECT(); if (!e_segment) { gasneti_fatalerror("Invalid call to gex_Segment_Destroy() with NULL segment"); } if (flags) { gasneti_fatalerror("Invalid call to gex_Segment_Destroy() with non-zero flags"); } // TODO: check reference count, once implemented gasneti_Segment_t i_segment = gasneti_import_segment(e_segment); gasneti_assert_zeroret( gasneti_segmentDestroy(i_segment, 1) ); } /* ------------------------------------------------------------------------------------ */ // Endpoint management #ifdef GASNETC_EP_EXTRA_DECLS GASNETC_EP_EXTRA_DECLS #endif #ifndef _GEX_EP_T #ifndef gasneti_import_ep gasneti_EP_t gasneti_import_ep(gex_EP_t _ep) { const gasneti_EP_t _real_ep = GASNETI_IMPORT_POINTER(gasneti_EP_t,_ep); GASNETI_IMPORT_MAGIC(_real_ep, EP); return _real_ep; } gasneti_EP_t gasneti_import_ep_valid(gex_EP_t ep) { gasneti_assert(ep != GEX_EP_INVALID); return gasneti_import_ep(ep); } #endif #ifndef gasneti_export_ep gex_EP_t gasneti_export_ep(gasneti_EP_t _real_ep) { GASNETI_CHECK_MAGIC(_real_ep, GASNETI_EP_MAGIC); return GASNETI_EXPORT_POINTER(gex_EP_t, _real_ep); } #endif // Static on the assumption that all callers will reside in this file // TODO: might subsume into gex_EP_Create() if there are no other callers static gasneti_EP_t gasneti_alloc_ep( gasneti_Client_t client, gex_EP_Capabilities_t caps, gex_Flags_t flags, int new_index) { gasneti_EP_t endpoint; #ifdef GASNETC_SIZEOF_EP_T size_t alloc_size = GASNETC_SIZEOF_EP_T(); gasneti_assert_uint(alloc_size ,>=, sizeof(*endpoint)); #else size_t alloc_size = sizeof(*endpoint); #endif endpoint = gasneti_malloc(alloc_size); GASNETI_INIT_MAGIC(endpoint, GASNETI_EP_MAGIC); endpoint->_client = client; endpoint->_cdata = NULL; endpoint->_segment = NULL; endpoint->_orig_caps = endpoint->_caps = caps; endpoint->_flags = flags; endpoint->_index = new_index; gasneti_assert(! client->_ep_tbl[new_index]); client->_ep_tbl[new_index] = endpoint; gasneti_amtbl_init(endpoint); #ifndef GASNETC_EP_INIT_HOOK size_t extra = alloc_size - sizeof(*endpoint); if (extra) memset(endpoint + 1, 0, extra); #endif return endpoint; } // Static on the assumption that all callers will reside in this file static void gasneti_free_ep(gasneti_EP_t endpoint) { #ifdef GASNETI_EP_FINI_HOOK GASNETI_EP_FINI_HOOK(endpoint); #endif GASNETI_INIT_MAGIC(endpoint, GASNETI_EP_BAD_MAGIC); gasneti_free(endpoint); } #endif // _GEX_EP_T extern int gex_EP_Create( gex_EP_t *ep_p, gex_Client_t e_client, gex_EP_Capabilities_t caps, gex_Flags_t flags) { gasneti_Client_t client = gasneti_import_client(e_client); // TODO: formatted printing for capabilities GASNETI_TRACE_PRINTF(O,("gex_EP_Create: client='%s' capabilities=%d flags=%d", client ? client->_name : "(NULL)", caps, flags)); GASNETI_CHECK_INJECT(); if (! client) { gasneti_fatalerror("Invalid call to gex_EP_Create with NULL client"); } if (!ep_p) { gasneti_fatalerror("Invalid call to gex_EP_Create with NULL ep_p"); } GASNETI_CHECK_ERRR((! caps), BAD_ARG, "no capabilities were requested"); GASNETI_CHECK_ERRR((caps & ~GEX_EP_CAPABILITY_ALL), BAD_ARG, "invalid capabilities were requested"); // Currently require/demand that primordial EP have ALL capabilities gasneti_assert(gasneti_weakatomic32_read(&client->_next_ep_index, 0) || caps == GEX_EP_CAPABILITY_ALL); // TODO: any other validation of caps // TODO: maybe silently OR-in {VIS,AD,COLL} dependencies? // TODO: any validation of flags? any conditional behaviors? uint32_t new_index = gasneti_weakatomic32_add(&client->_next_ep_index, 1, 0) - 1; if_pf (new_index >= GASNET_MAXEPS) { gasneti_weakatomic32_decrement(&client->_next_ep_index, 0); GASNETI_RETURN_ERRR(RESOURCE,"would exceed per-client EP limit of " _STRINGIFY(GASNET_MAXEPS)); } gasneti_EP_t ep = gasneti_alloc_ep(client, caps, flags, new_index); // TODO: any need/want to omit on non-primordial EPs? { /* core API handlers */ gex_AM_Entry_t *ctable = (gex_AM_Entry_t *)gasnetc_get_handlertable(); int len = 0; int numreg = 0; gasneti_assert(ctable); while (ctable[len].gex_fnptr) len++; /* calc len */ if (gasneti_amregister(ep, ctable, len, GASNETC_HANDLER_BASE, GASNETE_HANDLER_BASE, 0, &numreg) != GASNET_OK) GASNETI_RETURN_ERRR(RESOURCE,"Error registering core API handlers"); gasneti_assert_int(numreg ,==, len); } // TODO: any need/want to omit on non-primordial EPs? { /* extended API handlers */ gex_AM_Entry_t *etable = (gex_AM_Entry_t *)gasnete_get_handlertable(); int len = 0; int numreg = 0; gasneti_assert(etable); while (etable[len].gex_fnptr) len++; /* calc len */ if (gasneti_amregister(ep, etable, len, GASNETE_HANDLER_BASE, GASNETI_CLIENT_HANDLER_BASE, 0, &numreg) != GASNET_OK) GASNETI_RETURN_ERRR(RESOURCE,"Error registering extended API handlers"); gasneti_assert_int(numreg ,==, len); } #ifdef GASNETC_EP_INIT_HOOK int rc = GASNETC_EP_INIT_HOOK(ep); if (rc != GASNET_OK) { gasneti_free_ep(ep); ep = NULL; } #else int rc = GASNET_OK; #endif *ep_p = gasneti_export_ep(ep); return rc; } /* ------------------------------------------------------------------------------------ */ // TM management #ifdef GASNETC_TM_EXTRA_DECLS GASNETC_TM_EXTRA_DECLS #endif #ifndef _GEX_TM_T #ifndef gasneti_import_tm gasneti_TM_t gasneti_import_tm(gex_TM_t _tm) { gasneti_assert(_tm != GEX_TM_INVALID); const gasneti_TM_t _real_tm = GASNETI_IMPORT_POINTER(gasneti_TM_t,_tm); if (! gasneti_i_tm_is_pair(_real_tm)) { GASNETI_IMPORT_MAGIC(_real_tm, TM); } return _real_tm; } #endif #ifndef gasneti_import_tm_nonpair gasneti_TM_t gasneti_import_tm_nonpair(gex_TM_t _tm) { gasneti_assert(_tm != GEX_TM_INVALID); const gasneti_TM_t _real_tm = GASNETI_IMPORT_POINTER(gasneti_TM_t,_tm); if (gasneti_i_tm_is_pair(_real_tm)) { gasneti_fatalerror("Invalid use of a TM-Pair where such is prohibited"); } GASNETI_IMPORT_MAGIC(_real_tm, TM); return _real_tm; } #endif #ifndef gasneti_export_tm gex_TM_t gasneti_export_tm(gasneti_TM_t _real_tm) { GASNETI_CHECK_MAGIC(_real_tm, GASNETI_TM_MAGIC); return GASNETI_EXPORT_POINTER(gex_TM_t, _real_tm); } #endif // TODO-EX: probably need to add to a per-client container of some sort extern gasneti_TM_t gasneti_alloc_tm( gasneti_EP_t ep, gex_Rank_t rank, gex_Rank_t size, gex_Flags_t flags) { gasneti_assert_uint(rank ,<, size); gasneti_assert_uint(size ,>, 0); gasneti_assert(ep); gasneti_assert(ep->_client); const int is_tm0 = (ep->_client->_tm0 == NULL); gasneti_TM_t tm; #ifdef GASNETC_SIZEOF_TM_T size_t actual_sz = GASNETC_SIZEOF_TM_T(); gasneti_assert_uint(actual_sz ,>=, sizeof(*tm)); #else size_t actual_sz = sizeof(*tm); #endif #if GASNETI_TM0_ALIGN // TM0 is aligned to GASNETI_TM0_ALIGN, and all others to half that size_t disalign = (is_tm0 ? 0 : GASNETI_TM0_ALIGN/2); tm = (gasneti_TM_t)(disalign + (uintptr_t)gasneti_malloc_aligned(GASNETI_TM0_ALIGN, actual_sz + disalign)); #else tm = gasneti_malloc(actual_sz); #endif GASNETI_INIT_MAGIC(tm, GASNETI_TM_MAGIC); tm->_ep = ep; tm->_cdata = NULL; tm->_flags = flags; tm->_rank = rank; tm->_size = size; tm->_coll_team = NULL; #ifdef GASNETC_TM_INIT_HOOK GASNETC_TM_INIT_HOOK(tm); #else size_t extra = actual_sz - sizeof(*tm); if (extra) memset(tm + 1, 0, extra); #endif if (is_tm0) { gasneti_legacy_alloc_tm_hook(tm); // init g2ex layer if appropriate ep->_client->_tm0 = tm; // TODO-EX: Please remove this! gasneti_assert(! gasneti_thing_that_goes_thunk_in_the_dark); gasneti_thing_that_goes_thunk_in_the_dark = tm; } return tm; } void gasneti_free_tm(gasneti_TM_t tm) { #ifdef GASNETI_TM_FINI_HOOK GASNETI_TM_FINI_HOOK(tm); #endif GASNETI_INIT_MAGIC(tm, GASNETI_TM_BAD_MAGIC); gasneti_free_aligned((void*)((uintptr_t)tm - (GASNETI_TM0_ALIGN/2))); } #endif // _GEX_TM_T /* ------------------------------------------------------------------------------------ */ // TM-pair is NOT an object type, but must masquerade as a gex_TM_t. // Therefore, we handle swizzling and internal/external type distinction // in the same manner as for object types (but no MAGIC). #ifndef gasneti_import_tm_pair gasneti_TM_Pair_t gasneti_import_tm_pair(gex_TM_t tm) { gasneti_assert(tm != GEX_TM_INVALID); gasneti_assert(gasneti_e_tm_is_pair(tm)); return GASNETI_IMPORT_POINTER(gasneti_TM_Pair_t,tm); } #endif #ifndef gasneti_export_tm_pair gex_TM_t gasneti_export_tm_pair(gasneti_TM_Pair_t tm_pair) { gasneti_assert(gasneti_i_tm_is_pair((gasneti_TM_t) tm_pair)); return GASNETI_EXPORT_POINTER(gex_TM_t, tm_pair); } #endif // Helper for "mappable" queries // return the bound segment for local ep_idx // i_tm is provided only to retrieve the Client gasneti_Segment_t gasneti_epidx_to_segment(gasneti_TM_t i_tm, gex_EP_Index_t ep_idx) { // TODO: multi-client would extract from i_tm OR signature may change to take client gasneti_Client_t i_client = gasneti_import_client(gasneti_THUNK_CLIENT); gasneti_assert_int(ep_idx ,<, GASNET_MAXEPS); gasneti_assert_int(ep_idx ,<, gasneti_weakatomic32_read(&i_client->_next_ep_index, 0)); gasneti_EP_t i_ep = i_client->_ep_tbl[ep_idx]; gasneti_assert(i_ep); return i_ep->_segment; } #if GASNET_DEBUG && GASNET_HAVE_MK_CLASS_MULTIPLE // Helper for bounds checking local address range for host-vs-device bound segment. // Local address must match kind of bound segment, if any // // If bound segment kind is device, the local address must be in-segment. // Returns GASNETI_BAD_LOCAL_OUTSIDE_DEVICE_SEGMENT if this constraint is violated // Otherwise, the local address must not be in any device segment // Returns GASNETI_BAD_LOCAL_INSIDE_DEVICE_SEGMENT if this constraint is violated // Returns 0 in the absence of violations // Returns the device segment via *segment_p if either constraint is violated int _gasneti_boundscheck_local(gex_TM_t tm, void *addr, size_t len, gasneti_Segment_t *segment_p) { gasneti_EP_t i_ep = gasneti_e_tm_to_i_ep(tm); gasneti_Segment_t i_bound_segment = i_ep->_segment; gex_Segment_t e_bound_segment = gasneti_export_segment(i_bound_segment); if (!len || (e_bound_segment && _gasneti_in_segment_t(addr, len, e_bound_segment))) { // Zero-length, or in the bound segment (if any) are always OK. } else if (! gasneti_i_segment_kind_is_host(i_bound_segment)) { // Local "device memory" must never be outside the bound segment. *segment_p = i_bound_segment; return GASNETI_BAD_LOCAL_OUTSIDE_DEVICE_SEGMENT; } else if (gasneti_in_local_auxsegment(i_ep, addr, len)) { // When not bound to device segment, local aux segment is OK. } else { // Search segment table for a match // If a match is found, it must not be a device segment, but no match is fine too gasneti_Segment_t i_segment; GASNETI_SEGTBL_LOCK(); GASNETI_SEGTBL_FOR_EACH(i_segment) { gex_Segment_t e_segment = gasneti_export_segment(i_segment); if (_gasneti_in_segment_t(addr, len, e_segment)) { if (gasneti_i_segment_kind_is_host(i_segment)) break; GASNETI_SEGTBL_UNLOCK(); *segment_p = i_segment; return GASNETI_BAD_LOCAL_INSIDE_DEVICE_SEGMENT; } } GASNETI_SEGTBL_UNLOCK(); } *segment_p = NULL; return 0; } #endif /* ------------------------------------------------------------------------------------ */ #if GASNET_DEBUG // Verify that client did actually write to gasnet-allocated buffer // // gasneti_init_sd_poison(sd) - write a "canary" // For (sd->_size >= gasneti_sd_init_len) writes a "canary" value (also of length // gasneti_sd_init_len) to sd->_addr if (and only if) the buffer is gasnet-owned // gasneti_test_sd_poison(addr, len) - test a "canary" // For (len >= gasneti_sd_init_len) looks for the same "canary" value, // returning non-zero if it is present. // Note that 'len' at "test" may be less than the one given at "init", // as is permitted for the nbytes values passed to Prepare/Commit. static uint64_t gasneti_memalloc_envint(const char *name, const char *deflt); static void gasneti_memalloc_valset(void *p, size_t len, uint64_t val); static const void *gasneti_memalloc_valcmp(const void *p, size_t len, uint64_t val); static int gasneti_sd_init_enabled = 1; static uint64_t gasneti_sd_init_val = 0; // Value used to initialize gasnet-allocated SrcDesc buffers static size_t gasneti_sd_init_len = 128; // Max length to init at Prepare, and min to check at Commit extern void gasneti_init_sd_poison(gasneti_AM_SrcDesc_t sd) { if (!gasneti_sd_init_enabled) return; if (sd->_addr != sd->_gex_buf) return; gasneti_assert_uint(((uintptr_t)sd->_addr) % GASNETI_MEDBUF_ALIGNMENT ,==, 0); static int isinit = 0; if_pf (!isinit) { static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); if (!isinit) { gasneti_sd_init_enabled = gasneti_getenv_yesno_withdefault("GASNET_SD_INIT",1); gasneti_sd_init_val = gasneti_memalloc_envint("GASNET_SD_INITVAL","NAN"); gasneti_sd_init_len = MAX((int64_t)1,gasneti_getenv_int_withdefault("GASNET_SD_INITLEN",128,0)); isinit = 1; } gasneti_mutex_unlock(&lock); if (!gasneti_sd_init_enabled) return; } else gasneti_sync_reads(); if (sd->_size < gasneti_sd_init_len) return; gasneti_memalloc_valset(sd->_addr, gasneti_sd_init_len, gasneti_sd_init_val); } extern int gasneti_test_sd_poison(void *addr, size_t len) { // return non-zero if still poison return gasneti_sd_init_enabled && (len >= gasneti_sd_init_len) && !gasneti_memalloc_valcmp(addr, gasneti_sd_init_len, gasneti_sd_init_val); } #endif /* ------------------------------------------------------------------------------------ */ #ifndef GASNETC_FATALSIGNAL_CALLBACK #define GASNETC_FATALSIGNAL_CALLBACK(sig) #endif #ifndef GASNETC_FATALSIGNAL_CLEANUP_CALLBACK #define GASNETC_FATALSIGNAL_CLEANUP_CALLBACK(sig) #endif void gasneti_defaultSignalHandler(int sig) { gasneti_sighandlerfn_t oldsigpipe = NULL; const char *signame = gasnett_signame_fromval(sig); gasneti_assert(signame); switch (sig) { case SIGQUIT: /* client didn't register a SIGQUIT handler, so just exit */ gasnet_exit(1); break; case SIGABRT: case SIGILL: case SIGSEGV: case SIGBUS: case SIGFPE: { oldsigpipe = gasneti_reghandler(SIGPIPE, SIG_IGN); GASNETC_FATALSIGNAL_CALLBACK(sig); /* give conduit first crack at it */ gasneti_console_message("Caught a fatal signal", "%s(%i)", signame, sig); gasnett_freezeForDebuggerErr(); /* allow freeze */ gasneti_print_backtrace_ifenabled(STDERR_FILENO); /* try to print backtrace */ // Try to flush I/O (especially the tracefile) before crashing signal(SIGALRM, _exit); alarm(5); gasneti_flush_streams(); alarm(0); (void) gasneti_reghandler(SIGPIPE, oldsigpipe); GASNETC_FATALSIGNAL_CLEANUP_CALLBACK(sig); /* conduit hook to kill the job */ signal(sig, SIG_DFL); /* restore default core-dumping handler and re-raise */ gasneti_raise(sig); break; } default: /* translate signal to SIGQUIT */ { static int sigquit_raised = 0; if (sigquit_raised) { /* sigquit was already raised - we cannot safely reraise it, so just die */ _exit(1); } else sigquit_raised = 1; } oldsigpipe = gasneti_reghandler(SIGPIPE, SIG_IGN); gasneti_console_message("Caught a signal", "%s(%i)", signame, sig); (void) gasneti_reghandler(SIGPIPE, oldsigpipe); gasneti_raise(SIGQUIT); } } extern int gasneti_set_waitmode(int wait_mode) { const char *desc = NULL; GASNETI_CHECKINIT(); switch (wait_mode) { case GASNET_WAIT_SPIN: desc = "GASNET_WAIT_SPIN"; break; case GASNET_WAIT_BLOCK: desc = "GASNET_WAIT_BLOCK"; break; case GASNET_WAIT_SPINBLOCK: desc = "GASNET_WAIT_SPINBLOCK"; break; default: GASNETI_RETURN_ERRR(BAD_ARG, "illegal wait mode"); } GASNETI_TRACE_PRINTF(I, ("gasnet_set_waitmode(%s)", desc)); #ifdef gasnetc_set_waitmode gasnetc_set_waitmode(wait_mode); #endif gasneti_wait_mode = wait_mode; return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ /* Global environment variable handling */ extern char **environ; static void gasneti_serializeEnvironment(uint8_t **pbuf, int *psz) { /* flatten a snapshot of the environment to make it suitable for transmission * here we assume the standard representation where a pointer to the environment * is stored in a global variable 'environ' and the environment is represented as an array * of null-terminated strings where each has the form 'key=value' and value may be empty, * and the final string pointer is a NULL pointer * we flatten this into a list of null-terminated 'key=value' strings, * terminated with a double-null */ uint8_t *buf; uint8_t *p; int i; int totalEnvSize = 0; if (!environ) { /* T3E stupidly omits environ support, despite documentation to the contrary */ GASNETI_TRACE_PRINTF(I,("WARNING: environ appears to be empty -- ignoring it")); *pbuf = NULL; *psz = 0; return; } for(i = 0; environ[i]; i++) totalEnvSize += strlen(environ[i]) + 1; totalEnvSize++; buf = (uint8_t *)gasneti_malloc(totalEnvSize); p = buf; p[0] = 0; for(i = 0; environ[i]; i++) { strcpy((char*)p, environ[i]); p += strlen((char*)p) + 1; } *p = 0; gasneti_assert_int((p+1) - buf ,==, totalEnvSize); *pbuf = buf; *psz = totalEnvSize; } extern char *gasneti_globalEnv; typedef struct { int sz; uint64_t checksum; } gasneti_envdesc_t; /* do the work necessary to setup the global environment for use by gasneti_getenv broadcast the environment variables from one node to all nodes Note this currently assumes that at least one of the compute nodes has the full environment - systems where the environment is not propagated to any compute node will need something more sophisticated. exchangefn is required function for exchanging data broadcastfn is optional (can be NULL) but highly recommended for scalability */ extern void gasneti_setupGlobalEnvironment(gex_Rank_t numnodes, gex_Rank_t mynode, gasneti_bootstrapExchangefn_t exchangefn, gasneti_bootstrapBroadcastfn_t broadcastfn) { uint8_t *myenv; int sz; uint64_t checksum; gasneti_envdesc_t myenvdesc = {0}; gasneti_envdesc_t *allenvdesc; gasneti_assert(exchangefn); gasneti_serializeEnvironment(&myenv,&sz); checksum = gasneti_checksum(myenv,sz); myenvdesc.sz = sz; myenvdesc.checksum = checksum; allenvdesc = gasneti_malloc(numnodes*sizeof(gasneti_envdesc_t)); /* gather environment description from all nodes */ (*exchangefn)(&myenvdesc, sizeof(gasneti_envdesc_t), allenvdesc); { /* see if the node environments differ and find the largest */ int i; int rootid = 0; int identical = 1; gasneti_envdesc_t rootdesc = allenvdesc[rootid]; for (i=1; i < numnodes; i++) { if (rootdesc.checksum != allenvdesc[i].checksum || rootdesc.sz != allenvdesc[i].sz) identical = 0; if (allenvdesc[i].sz > rootdesc.sz) { /* assume the largest env is the one we want */ rootdesc = allenvdesc[i]; rootid = i; } } if (identical) { /* node environments all identical - don't bother to propagate */ gasneti_free(allenvdesc); gasneti_free(myenv); return; } else { int envsize = rootdesc.sz; gasneti_globalEnv = gasneti_malloc(envsize); gasneti_leak(gasneti_globalEnv); if (broadcastfn) { (*broadcastfn)(myenv, envsize, gasneti_globalEnv, rootid); } else { /* this is wasteful of memory and bandwidth, and non-scalable */ char *tmp = gasneti_malloc(envsize*numnodes); memcpy(tmp+mynode*envsize, myenv, sz); (*exchangefn)(tmp+mynode*envsize, envsize, tmp); memcpy(gasneti_globalEnv, tmp+rootid*envsize, envsize); gasneti_free(tmp); } gasneti_assert_uint(gasneti_checksum(gasneti_globalEnv,envsize) ,==, rootdesc.checksum); gasneti_free(allenvdesc); gasneti_free(myenv); return; } } } /* decode src into dst, arguments permitted to overlap exactly */ extern size_t gasneti_decodestr(char *dst, const char *src) { #define IS_HEX_DIGIT(c) (isdigit(c) || (isalpha(c) && toupper(c) <= 'F')) #define VAL_HEX_DIGIT(c) ((unsigned int)(isdigit(c) ? (c)-'0' : 10 + toupper(c) - 'A')) size_t dstidx = 0; const char *p = src; gasneti_assert(src && dst); while (*p) { char c; if (p[0] == '%' && p[1] == '0' && p[2] && IS_HEX_DIGIT(p[2]) && p[3] && IS_HEX_DIGIT(p[3])) { c = (char)(VAL_HEX_DIGIT(p[2]) << 4) | VAL_HEX_DIGIT(p[3]); p += 4; } else c = *(p++); dst[dstidx++] = c; } dst[dstidx] = '\0'; return dstidx; #undef VAL_HEX_DIGIT #undef IS_HEX_DIGIT } extern const char *gasneti_decode_envval(const char *val) { static struct _gasneti_envtable_S { const char *pre; char *post; struct _gasneti_envtable_S *next; } *gasneti_envtable = NULL; static gasneti_mutex_t gasneti_envtable_lock = GASNETI_MUTEX_INITIALIZER; static int firsttime = 1; static int decodeenv = 1; if (firsttime) { decodeenv = !gasneti_getenv("GASNET_DISABLE_ENVDECODE"); if (gasneti_init_done && gasneti_mynode != (gex_Rank_t)-1) { gasneti_envstr_display("GASNET_DISABLE_ENVDECODE",(decodeenv?"NO":"YES"),decodeenv); gasneti_sync_writes(); firsttime = 0; } } else gasneti_sync_reads(); if (!decodeenv) return val; if (strstr(val,"%0")) { struct _gasneti_envtable_S *p; gasneti_mutex_lock(&gasneti_envtable_lock); p = gasneti_envtable; while (p) { if (!strcmp(val, p->pre)) break; p = p->next; } if (p) val = p->post; else { /* decode it and save the result (can't trust setenv to safely set it back) */ struct _gasneti_envtable_S *newentry = gasneti_malloc(sizeof(struct _gasneti_envtable_S)); newentry->pre = gasneti_strdup(val); newentry->post = gasneti_malloc(strlen(val)+1); gasneti_decodestr(newentry->post, newentry->pre); if (!strcmp(newentry->post, newentry->pre)) { gasneti_free(newentry); } else { newentry->next = gasneti_envtable; gasneti_envtable = newentry; val = newentry->post; } } gasneti_mutex_unlock(&gasneti_envtable_lock); } return val; } /* gasneti_verboseenv_fn returns an expression that defines whether the given process should report to the console on env queries - needs to work before gasnet_init 1 = yes, 0 = no, -1 = not yet / don't know */ #ifndef GASNETI_ENV_OUTPUT_NODE #define GASNETI_ENV_OUTPUT_NODE() (gasneti_mynode == 0) #endif extern int gasneti_verboseenv_parse(const char *); extern int _gasneti_verboseenv_fn(void) { static int verboseenv = -1; if (verboseenv == -1) { if (gasneti_init_done && gasneti_mynode != (gex_Rank_t)-1) { if (!GASNETI_ENV_OUTPUT_NODE()) verboseenv = 0; // wrong process else { #if GASNET_DEBUG_VERBOSE verboseenv = 1; // hard-wired to enabled #else verboseenv = gasneti_verboseenv_parse(gasneti_getenv("GASNET_VERBOSEENV")); #endif } gasneti_sync_writes(); } } else gasneti_sync_reads(); return verboseenv; } extern int (*gasneti_verboseenv_fn)(void); int (*gasneti_verboseenv_fn)(void) = &_gasneti_verboseenv_fn; extern const char * gasneti_backtraceid(void) { static char myid[255]; sprintf(myid, "[%i] ", (int)gasneti_mynode); return myid; } extern void gasneti_decode_args(int *argc, char ***argv) { static int firsttime = 1; if (!firsttime) return; /* ignore subsequent calls, to allow early decode */ firsttime = 0; if (!gasneti_getenv_yesno_withdefault("GASNET_DISABLE_ARGDECODE",0)) { int argidx; char **origargv = *argv; for (argidx = 0; argidx < *argc; argidx++) { if (strstr((*argv)[argidx], "%0")) { char *tmp = gasneti_strdup((*argv)[argidx]); int newsz = gasneti_decodestr(tmp, tmp); if (newsz == strlen((*argv)[argidx])) gasneti_free(tmp); /* no change */ else { int i, newcnt = 0; for (i = 0; i < newsz; i++) if (!tmp[i]) newcnt++; /* count growth due to inserted NULLs */ if (newcnt == 0) { /* simple parameter replacement */ (*argv)[argidx] = tmp; } else { /* need to grow argv */ char **newargv = gasneti_malloc(sizeof(char *)*(*argc+1+newcnt)); memcpy(newargv, *argv, sizeof(char *)*argidx); newargv[argidx] = tmp; /* base arg */ memcpy(newargv+argidx+newcnt, (*argv)+argidx, sizeof(char *)*(*argc - argidx - 1)); for (i = 0; i < newsz; i++) /* hook up new args */ if (!tmp[i]) newargv[1+argidx++] = &(tmp[i+1]); *argc += newcnt; if (*argv != origargv) gasneti_free(*argv); *argv = newargv; (*argv)[*argc] = NULL; /* ensure null-termination of arg list */ } } } } } } /* Propagate requested env vars from GASNet global env to the local env */ void (*gasneti_propagate_env_hook)(const char *, int) = NULL; // spawner- or conduit-specific hook extern void gasneti_propagate_env_helper(const char *environ, const char * keyname, int flags) { const int is_prefix = flags & GASNETI_PROPAGATE_ENV_PREFIX; const char *p = environ; gasneti_assert(environ); gasneti_assert(keyname && !strchr(keyname,'=')); int keylen = strlen(keyname); while (*p) { if (!strncmp(keyname, p, keylen) && (is_prefix || p[keylen] == '=')) { gasneti_assert(NULL != strchr(p+keylen, '=')); char *var = gasneti_strdup(p); char *val = strchr(var, '='); *(val++) = '\0'; val = (char *)gasneti_decode_envval(val); gasnett_setenv(var, val); GASNETI_TRACE_PRINTF(I,("gasneti_propagate_env(%s) => '%s'", var, val)); gasneti_free(var); if (!is_prefix) break; } p += strlen(p) + 1; } } extern void gasneti_propagate_env(const char * keyname, int flags) { gasneti_assert(keyname); gasneti_assert(NULL == strchr(keyname, '=')); // First look for matches in gasneti_globalEnv (if any) if (gasneti_globalEnv) { gasneti_propagate_env_helper(gasneti_globalEnv, keyname, flags); } // Next allow conduit-specific getenv (if any) to overwrite if (gasneti_propagate_env_hook) { gasneti_propagate_env_hook(keyname, flags); } } /* Process environment for exittimeout. * If (GASNET_EXITTIMEOUT is set), it is returned * else return = min(GASNET_EXITTIMEOUT_MAX, * GASNET_EXITTIMEOUT_MIN + gasneti_nodes * GASNET_EXITTIMEOUT_FACTOR) * Where all the GASNET_EXITTIMEOUT* tokens above are env vars. * The arguments are defaults for MAX, MIN and FACTOR, and the lowest value to allow. */ extern double gasneti_get_exittimeout(double dflt_max, double dflt_min, double dflt_factor, double lower_bound) { double my_max = gasneti_getenv_dbl_withdefault("GASNET_EXITTIMEOUT_MAX", dflt_max); double my_min = gasneti_getenv_dbl_withdefault("GASNET_EXITTIMEOUT_MIN", dflt_min); double my_factor = gasneti_getenv_dbl_withdefault("GASNET_EXITTIMEOUT_FACTOR", dflt_factor); double result = gasneti_getenv_dbl_withdefault("GASNET_EXITTIMEOUT", MIN(my_max, my_min + my_factor * gasneti_nodes)); if (result < lower_bound) { gasneti_assert_dbl(MIN(dflt_max, dflt_min + dflt_factor * gasneti_nodes) ,>=, lower_bound); if (gasneti_getenv("GASNET_EXITTIMEOUT")) { gasneti_fatalerror("If used, environment variable GASNET_EXITTIMEOUT must be set to a value no less than %g", lower_bound); } else { gasneti_fatalerror("Environment variables GASNET_EXITTIMEOUT_{MAX,MIN,FACTOR} yield a timeout less than %g seconds", lower_bound); } } return result; } // Used in some conduits to coordinate user-provided exit code across layers gasneti_atomic_t gasneti_exit_code = gasneti_atomic_init(0); /* ------------------------------------------------------------------------------------ */ /* Bits for conduits which want/need to override pthread_create() */ #if defined(PTHREAD_MUTEX_INITIALIZER) /* only if pthread.h available */ && !GASNET_SEQ #ifndef GASNETC_PTHREAD_CREATE_OVERRIDE /* Default is just pass through */ #define GASNETC_PTHREAD_CREATE_OVERRIDE(create_fn, thread, attr, start_routine, arg) \ (*create_fn)(thread, attr, start_routine, arg) #endif int gasneti_pthread_create(gasneti_pthread_create_fn_t *create_fn, pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg) { // There is no portable way to printf a pointer-to-function. This way avoids warnings with -pedantic union { void *vp; gasneti_pthread_create_fn_t *cfp; void *(*sfp)(void *); } ucreate, ustart; ucreate.cfp = create_fn; ustart.sfp = start_routine; GASNETI_TRACE_PRINTF(I, ("gasneti_pthread_create(%p, %p, %p, %p, %p)", ucreate.vp, (void *)thread, (void *)attr, ustart.vp, arg)); return GASNETC_PTHREAD_CREATE_OVERRIDE(create_fn, thread, attr, start_routine, arg); } #endif /* ------------------------------------------------------------------------------------ */ #ifdef GASNETC_CHECK_PORTABLE_CONDUIT_HOOK // If a conduit is *conditionally* considered a "portable conduit", then this // hook can be implemented to allow the conduit to indicate if those // conditions are met. This function should return non-zero when the conduit // is "portable" and zero when "native". // Runs via gasnete_check_config(), called by gasnete_init(). extern int gasnetc_check_portable_conduit(void); #else #define gasnetc_check_portable_conduit() 0 #endif typedef struct { const char *filename; mode_t filemode; const char *desc; int hwid; } gasneti_device_probe_t; #define GASNETI_IBV_DEVICES \ { "/dev/infiniband/uverbs0", S_IFCHR, "InfiniBand IBV", 2 }, /* OFED 1.0 */ \ { "/dev/infiniband/ofs/uverbs0", S_IFCHR, "InfiniBand IBV", 2 } /* Solaris */ #define GASNETI_CXI_DEVICES \ { "/dev/cxi0", S_IFCHR, "HPE Slingshot-11 (OFI)", 3 }, \ { "/sys/class/cxi", S_IFDIR, "HPE Slingshot-11 (OFI)", 3 } #define GASNETI_GNI_DEVICES \ { "/dev/kgni0", S_IFCHR, "Cray Aries/Gemini", 6 }, \ { "/proc/kgnilnd", S_IFDIR, "Cray Aries/Gemini", 6 } // Boolean probe for device nodes (file or directory) static int gasneti_device_probe(gasneti_device_probe_t *dev_to_probe) { struct stat stat_buf; return !stat(dev_to_probe->filename,&stat_buf) && (!dev_to_probe->filemode || (dev_to_probe->filemode & stat_buf.st_mode)); } // bug 3609: some verbs-compatible networks need special handling // While that bug is about ibv-conduit, something simlar holds for OFI verbs provider #define GASNETI_HCA_OMNI_PATH 1 #define GASNETI_HCA_TRUESCALE 2 static int gasneti_probeInfiniBandHCAs(void) { static int probeInfiniBandHCAs = 0; #if PLATFORM_OS_LINUX static int is_init = 0; if (!is_init) { const char *filename[] = { "/sys/class/infiniband/hfi1_0/board_id", // Intel Omni-Path "/sys/class/infiniband/qib0/board_id", // QLogic/Intel TrueScale }; for (int i=0; i < sizeof(filename)/sizeof(filename[0]); i++) { FILE *fp = fopen(filename[i],"r"); if (fp) { char buffer[128]; size_t r = fread(&buffer, 1, sizeof(buffer), fp); if (r) { buffer[r-1] = 0; // eg: "Intel Omni-Path HFI Adapter 100 Series, 1 Port, PCIe x16" if (strstr(buffer, "Omni-Path")) probeInfiniBandHCAs |= GASNETI_HCA_OMNI_PATH; // eg: "InfiniPath_QLE7340" if (strstr(buffer, "InfiniPath")) probeInfiniBandHCAs |= GASNETI_HCA_TRUESCALE; } fclose(fp); } } is_init = 1; } #endif return probeInfiniBandHCAs; } // bug 3609: some verbs-compatible networks need special handling static int gasneti_lowQualityVerbs(void) { int mask = (GASNETI_HCA_OMNI_PATH | GASNETI_HCA_TRUESCALE); return gasneti_probeInfiniBandHCAs() & mask; } // Search for hardware with a corresponding "native" OFI provider // // TODO: Mellanox drivers are available for at least FreeBSD and macOS, and // libfabric support's both of those as well. So, the Linux-specific probe // for GASNETI_IBV_DEVICES should be expanded if we have interest in the // verbs provider on those platforms. static int gasneti_nativeOfiProvider(void) { static int nativeOfiProvider = 0; #if PLATFORM_OS_LINUX static int is_init = 0; if (!is_init) { gasneti_device_probe_t dev_list[] = { GASNETI_IBV_DEVICES, // verbs or psm2 providers GASNETI_CXI_DEVICES // cxi provider #if !GASNET_SEGMENT_EVERYTHING , GASNETI_GNI_DEVICES // gni provider #endif }; if (gasneti_probeInfiniBandHCAs() & GASNETI_HCA_TRUESCALE) { // Assume no good if TrueScale HCA is found (we assume single fabric) } else { for (int i = 0; i < sizeof(dev_list)/sizeof(dev_list[0]); ++i) { if (gasneti_device_probe(dev_list + i)) { nativeOfiProvider = 1; break; } } } is_init = 1; } #endif return nativeOfiProvider; } // Search for hardware where we will recommend ucx-conduit as native. // Currently we only document support for Mellanox ConnectX-5 and newer. // However, we currently accept anything not on ibv-consuit's ban list. // TODO: more accurate device probe? // TODO: more platforms than just Linux? static int gasneti_nativeUcxSupport(void) { static int nativeUcxSupport = 0; #if PLATFORM_OS_LINUX static int is_init = 0; if (!is_init) { gasneti_device_probe_t dev_list[] = { GASNETI_IBV_DEVICES }; if (gasneti_lowQualityVerbs()) { // Assume no good if any ban-listed HCA is found (we assume single fabric) } else { for (int i = 0; i < sizeof(dev_list)/sizeof(dev_list[0]); ++i) { if (gasneti_device_probe(dev_list + i)) { nativeUcxSupport = 1; break; } } } is_init = 1; } #endif return nativeUcxSupport; } static void gasneti_check_portable_conduit(void) { /* check for portable conduit abuse */ char mycore[80], myext[80]; char const *mn = GASNET_CORE_NAME_STR; char *m; m = mycore; while (*mn) { *m = tolower(*mn); m++; mn++; } *m = '\0'; mn = GASNET_EXTENDED_NAME_STR; m = myext; while (*mn) { *m = tolower(*mn); m++; mn++; } *m = '\0'; if ( /* is a portable network conduit */ gasnetc_check_portable_conduit() || (!strcmp("mpi",mycore) && !strcmp("reference",myext)) || (!strcmp("udp",mycore) && !strcmp("reference",myext)) || (!strcmp("ucx",mycore) && !gasneti_nativeUcxSupport()) ) { const char *p = GASNETI_CONDUITS; char natives[255]; char reason[255]; natives[0] = 0; reason[0] = 0; while (*p) { /* look for configure-detected native conduits */ #define GASNETI_CONDUITS_DELIM " ,/;\t\n" char name[80]; p += strspn(p,GASNETI_CONDUITS_DELIM); if (*p) { int len = strcspn(p,GASNETI_CONDUITS_DELIM); strncpy(name, p, len); name[len] = 0; p += len; p += strspn(p,GASNETI_CONDUITS_DELIM); /* Ignore the portable conduits */ if (!strcmp(name,"smp")) continue; if (!strcmp(name,"mpi")) continue; if (!strcmp(name,"udp")) continue; if (!strcmp(name,"ucx") && !gasneti_nativeUcxSupport()) continue; if (!strcmp(name,"ofi") && !gasneti_nativeOfiProvider()) continue; if (!strcmp(name,"ibv") && gasneti_lowQualityVerbs()) continue; // never recommend ibv on these networks if (strlen(natives)) strcat(natives,", "); strcat(natives,name); } #undef GASNETI_CONDUITS_DELIM } if (natives[0]) { sprintf(reason, " WARNING: Support was detected for native GASNet conduits: %s",natives); } else { /* look for hardware devices supported by native conduits */ gasneti_device_probe_t known_devs[] = { GASNETI_IBV_DEVICES, GASNETI_CXI_DEVICES, #if !GASNET_SEGMENT_EVERYTHING GASNETI_GNI_DEVICES, #endif { "/list_terminator", S_IFDIR, "", 9999 } }; int lim = sizeof(known_devs)/sizeof(known_devs[0]); for (int i = 0; i < lim; i++) { if (gasneti_device_probe(known_devs + i)) { int hwid = known_devs[i].hwid; if (hwid == 2 && gasneti_lowQualityVerbs()) continue; // never recommend ibv on these networks if (strlen(natives)) strcat(natives,", "); strcat(natives,known_devs[i].desc); while (i < lim && hwid == known_devs[i].hwid) i++; /* don't report a network twice */ } } if (natives[0]) { sprintf(reason, " WARNING: This system appears to contain recognized network hardware: %s\n" " WARNING: which is supported by a GASNet native conduit, although\n" " WARNING: it was not detected at configure time (missing drivers?)", natives); } } if (reason[0] && !gasneti_getenv_yesno_withdefault("GASNET_QUIET",0)) { gasneti_console0_message("WARNING", "Using GASNet's %s-conduit, which exists for portability convenience.\n" "%s\n" " WARNING: You should *really* use the high-performance native GASNet conduit\n" " WARNING: if communication performance is at all important in this program run.", mycore, reason); } } } static void gasneti_check_architecture(void) { // check for bad build configurations #if PLATFORM_OS_SUBFAMILY_CNL && PLATFORM_ARCH_X86_64 // bug 3743, verify correct processor tuning { FILE *fp = fopen("/proc/cpuinfo","r"); char model[255]; if (!fp) gasneti_fatalerror("Failure in fopen('/proc/cpuinfo','r')=%s",strerror(errno)); while (!feof(fp) && fgets(model, sizeof(model), fp)) { if (strstr(model,"model name")) break; } fclose(fp); GASNETI_TRACE_PRINTF(I,("CPU %s",model)); int isKNL = !!strstr(model, "Phi"); #ifdef __CRAY_MIC_KNL // module craype-mic-knl that tunes for AVX512 const char *warning = isKNL ? 0 : "This executable was optimized for MIC KNL (module craype-mic-knl) but run on another processor!"; #else // some other x86 tuning mode const char *warning = isKNL ? "This executable is running on a MIC KNL architecture, but was not optimized for MIC KNL.\n" " WARNING: This often has a MAJOR impact on performance. Please re-build with module craype-mic-knl!" : 0; #endif if (warning) gasneti_console0_message("WARNING", "%s", warning); } #endif } /* ------------------------------------------------------------------------------------ */ /* Trivial handling of defered-start progress threads */ int gasneti_query_progress_threads( gex_Client_t e_client, unsigned int *count_p, const gex_ProgressThreadInfo_t **info_p, gex_Flags_t flags) { // TODO: this enforcement will become incorrect for the multi-client case static int have_run = 0; if (have_run) { gasneti_fatalerror("A client may make at most one call to gex_System_QueryProgressFunctions()."); } else { have_run = 1; } if (! e_client) GASNETI_RETURN_ERRR(BAD_ARG, "client must be non-NULL"); gasneti_Client_t i_client = gasneti_import_client(e_client); if (! count_p) GASNETI_RETURN_ERRR(BAD_ARG, "count_p must be non-NULL"); if (! info_p) GASNETI_RETURN_ERRR(BAD_ARG, "info_p must be non-NULL"); if (flags) GASNETI_RETURN_ERRR(BAD_ARG, "flags argument must be zero"); if (!(gex_Client_QueryFlags(e_client) & GEX_FLAG_DEFER_THREADS)) GASNETI_RETURN_ERRR(RESOURCE, "GEX_FLAG_DEFER_THREADS was not passed to gex_Client_Init"); *count_p = 0; *info_p = NULL; return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ /* Nodemap handling */ gex_Rank_t *gasneti_nodemap = NULL; gasneti_nodegrp_t gasneti_myhost = {NULL,0,(gex_Rank_t)(-1),0,(gex_Rank_t)(-1)}; gasneti_nodegrp_t gasneti_mysupernode = {NULL,0,(gex_Rank_t)(-1),0,(gex_Rank_t)(-1)}; gasnet_nodeinfo_t *gasneti_nodeinfo = NULL; /* This code is "good" for all "sensible" process layouts, where "good" * means identifing all sharing for such a mapping in one pass and the * term "sensible" includes: * "Block" layouts like |0.1.2.3|4.5.6.7|8.9._._| * or |0.1.2.3|4.5.6._|7.8.9._| * "Block-cyclic" like |0.1.6.7|2.3.8.9|4.5._._| * "Cyclic/Round-robin" like |0.3.6.9|1.4.7._|2.5.8._| * and all 24 permutations of the XYZT dimensions on the BG/P. * * This is also "safe" for an arbitrary mapping, but may fail to * identify some or all of the potential sharing in such a case. */ static void gasneti_nodemap_helper_linear(const char *ids, size_t sz, size_t stride) { gex_Rank_t i, prev, base; const char *p, *base_p, *prev_p; prev = base = gasneti_nodemap[0] = 0; prev_p = base_p = ids; p = base_p + stride; for (i = 1; i < gasneti_nodes; ++i, p += stride) { if (!memcmp(p, prev_p, sz)) { /* Repeat the previous id */ gasneti_nodemap[i] = gasneti_nodemap[prev]; prev += 1; prev_p += stride; continue; } gasneti_nodemap[i] = i; if (!memcmp(p, ids, sz)) { /* Restart the first "row" */ prev = 0; prev_p = ids; } else if (!memcmp(p, base_p, sz)) { /* Restart the previous "row" */ prev = base; prev_p = base_p; } else if (!memcmp(p, prev_p + stride, sz)) { /* Continue current "row" if any */ prev += 1; prev_p += stride; } else { /* Begin a new "row" */ prev = base = i; prev_p = base_p = p; } gasneti_nodemap[i] = gasneti_nodemap[prev]; } } /* This code is "good" for all possible process layouts, where "good" * means identifing all sharing. However, the running time is O(n*log(n)). */ static struct { const char *ids; size_t sz; size_t stride; } _gasneti_nodemap_sort_aux; static int _gasneti_nodemap_sort_fn(const void *a, const void *b) { gex_Rank_t key1 = *(const gex_Rank_t *)a; gex_Rank_t key2 = *(const gex_Rank_t *)b; const char *val1 = _gasneti_nodemap_sort_aux.ids + key1 * _gasneti_nodemap_sort_aux.stride; const char *val2 = _gasneti_nodemap_sort_aux.ids + key2 * _gasneti_nodemap_sort_aux.stride; int retval = memcmp(val1, val2, _gasneti_nodemap_sort_aux.sz); if (!retval) { /* keep sort stable */ gasneti_assert_uint(key1 ,!=, key2); retval = (key1 < key2) ? -1 : 1; } return retval; } static void gasneti_nodemap_helper_qsort(const char *ids, size_t sz, size_t stride) { gex_Rank_t *work = gasneti_malloc(gasneti_nodes * sizeof(gex_Rank_t)); const char *prev_id; int i, prev; /* If these are gex_Rank_t then bug 2634 can crash XLC */ _gasneti_nodemap_sort_aux.ids = ids; _gasneti_nodemap_sort_aux.sz = sz; _gasneti_nodemap_sort_aux.stride = stride; for (i = 0; i < gasneti_nodes; ++i) work[i] = i; qsort(work, gasneti_nodes, sizeof(gex_Rank_t), &_gasneti_nodemap_sort_fn); prev = work[0]; gasneti_nodemap[prev] = prev; prev_id = ids + prev*stride; for (i = 1; i < gasneti_nodes; ++i) { int node = work[i]; /* Also subject to bug 2634 */ const char *tmp_id = ids + node*stride; prev = gasneti_nodemap[node] = memcmp(tmp_id, prev_id, sz) ? node : prev; prev_id = tmp_id; } gasneti_free(work); } /* gasneti_nodemap_helper * Construct a nodemap from a vector of "IDs" */ GASNETI_NEVER_INLINE(gasneti_nodemap_helper, static void gasneti_nodemap_helper(const void *ids, size_t sz, size_t stride)) { #ifndef GASNETC_DEFAULT_NODEMAP_EXACT // Default to slow-but-steady (it wins the race) // However, see Bug 3770 - RFE: restore default linear-time nodemap behavior #define GASNETC_DEFAULT_NODEMAP_EXACT 1 #endif gasneti_assert(ids); gasneti_assert_uint(sz ,>, 0); gasneti_assert_uint(stride ,>=, sz); if (gasneti_getenv_yesno_withdefault("GASNET_NODEMAP_EXACT",GASNETC_DEFAULT_NODEMAP_EXACT)) { /* "exact" but potentially costly */ gasneti_nodemap_helper_qsort(ids, sz, stride); } else { /* cheap and correct for all "normal" cases */ gasneti_nodemap_helper_linear(ids, sz, stride); } } // 64-bit FNV-1a, implemented from scratch based on psuedo code and constants in // https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function static uint64_t fnv1a_64(const uint8_t *buf, size_t len) { const uint64_t FNV_offset_basis = 0xcbf29ce484222325ULL; const uint64_t FNV_prime = 0x00000100000001B3ULL; uint64_t x = FNV_offset_basis; for (size_t i = 0; i < len; i++) { x ^= *(buf++); x *= FNV_prime; } return x; } // gasneti_hosthash(): 64-bit hash of hostname // // NOTE: gasneti_checksum() is not suitable // e.g. "4001.0004" and "1001.0001" hash the same, and when // we fold down to 32-bits the problem would get even worse. // At 32-bits the cancellation is at period 4, so that names // "c03-00", "c13-01" and "c23-02" share the same hash, as // would the pair "172.16.0.6" and "172.18.0.8". extern uint64_t gasneti_hosthash(void) { const char *myname = gasneti_gethostname(); return fnv1a_64((const uint8_t *)myname, strlen(myname)); } /* Wrapper around gethostid() */ extern uint32_t gasneti_gethostid(void) { static uint32_t myid = 0; if_pf (!myid) { #if PLATFORM_OS_CYGWIN || !HAVE_GETHOSTID // gethostid() is known to be either unreliable or unavailable // always hash the hostname #else // gethostid() is available // hash the hostname only if gethostid() looks unreliable after multiple retries. // This allows us to tolerate transient misbehavior such as was reported in // Bug 4483 - gethostid() on Perlmutter rarely returns 0, breaking PSHM detection #ifndef GASNETI_GETHOSTID_RETRIES #define GASNETI_GETHOSTID_RETRIES 24 // try to keep worst case delay under 0.1s #endif int retries = GASNETI_GETHOSTID_RETRIES; uint64_t delay_ns = 1; retry: myid = (uint32_t)gethostid(); #endif /* Fall back to hashing the hostname if the hostid is obviously invalid */ if (!myid || !(~myid) /* 0.0.0.0 or 255.255.255.255 */ || (myid == 0x7f000001) /* All 12 distinct permutations of 127.0.0.1: */ || (myid == 0x7f000100) || (myid == 0x7f010000) || (myid == 0x007f0001) || (myid == 0x007f0100) || (myid == 0x017f0000) || (myid == 0x00007f01) || (myid == 0x00017f00) || (myid == 0x01007f00) || (myid == 0x0000017f) || (myid == 0x0001007f) || (myid == 0x0100007f)) { #if HAVE_GETHOSTID && !PLATFORM_OS_CYGWIN if (retries-- > 0) { GASNETI_TRACE_PRINTF(I,("Retrying after invalid return 0x%08x from gethostid()", (unsigned int)myid)); gasneti_nsleep(delay_ns); delay_ns *= 2; goto retry; } gasneti_console_message("WARNING", "Invalid return 0x%08x from gethostid(). " "Please see documentation on GASNET_HOST_DETECT in README and " "consider setting its value to 'hostname' or reconfiguring using " "'--with-host-detect=hostname' to make that the default value.", (unsigned int)myid); #endif uint64_t csum = gasneti_hosthash(); myid = GASNETI_HIWORD(csum) ^ GASNETI_LOWORD(csum); } } return myid; } static enum { gasneti_hostid_alg_invalid = 0, gasneti_hostid_alg_conduit, gasneti_hostid_alg_gethostid, gasneti_hostid_alg_hostname, gasneti_hostid_alg_trivial } gasneti_hostid_alg; static union { uint64_t hostname; uint32_t hostid; } gasneti_my_hostid; // gasneti_format_host_detect() // // Returns the hostid, or equivalent, as a printable string (possibly empty). // This is for use in error, warning and trace messages (uses gasneti_dynsprintf) const char *gasneti_format_host_detect(void) { switch (gasneti_hostid_alg) { case gasneti_hostid_alg_conduit: return "[opaque conduit-specific value]"; break; case gasneti_hostid_alg_gethostid: return gasneti_dynsprintf("0x%08x", gasneti_my_hostid.hostid); break; case gasneti_hostid_alg_hostname: return gasneti_dynsprintf("'%s' (hashed to 0x%"PRIx64")", gasneti_gethostname(), gasneti_my_hostid.hostname); break; case gasneti_hostid_alg_trivial: return gasneti_dynsprintf("%d", gasneti_mynode); break; default: gasneti_unreachable_error(("Unknown host detect algorithm %i", (int)gasneti_hostid_alg)); } } /* gasneti_nodemapParse() * * Performs "common" tasks after gasneti_nodemap[] has been constucted. * A conduit which builds a gasneti_nodemap[] w/o calling gasneti_nodemapInit() * should still call this function to perform the "common" work. * * Constructs: * gasneti_nodeinfo[] = array of length gasneti_nodes of supernode ids and mmap offsets * and fills in the fields in gasneti_mysupernode: * gasneti_mysupernode.nodes array of nodes in my supernode * gasneti_mysupernode.node_count count of nodes in my supernode (length of 'nodes' array) * gasneti_mysupernode.node_rank my ranks in 'nodes' array * gasneti_mysupernode.grp_count number of supernodes in the job * gasneti_mysupernode.grp_rank my supernode's rank within all supernodes * gasneti_myhost.* same quantities for 'host' rather than for 'supernode' * Those first five quantities are also available via the following respective aliases: * gasneti_nodemap_local[] * gasneti_nodemap_local_count * gasneti_nodemap_local_rank * gasneti_nodemap_global_count * gasneti_nodemap_global_rank * * NOTE: may modify gasneti_nodemap[] if env var GASNET_SUPERNODE_MAXSIZE is set, * or if gasneti_nodemap_local_count would exceed GASNETI_PSHM_MAX_NODES. * TODO: splitting by socket or other criteria for/with GASNET_SUPERNODE_MAXSIZE. * TODO: keep widths around for conduits to use? (at least ibv uses) */ extern void gasneti_nodemapParse(void) { gex_Rank_t i,j,limit; gex_Rank_t initial,final; struct { /* TODO: alloca? */ gex_Rank_t width; gex_Rank_t h_lead; gex_Rank_t sn_lead; gex_Rank_t host; gex_Rank_t supernode; } *s = gasneti_calloc(gasneti_nodes, sizeof(*s)); gasneti_assert(gasneti_nodemap); gasneti_assert(gasneti_nodemap[0] == 0); gasneti_assert_uint(gasneti_nodemap[gasneti_mynode] ,<=, gasneti_mynode); /* Check for user-imposed limit: 0 (or negative) means no limit */ #if GASNET_PSHM limit = gasneti_getenv_int_withdefault("GASNET_SUPERNODE_MAXSIZE", 0, 0); #if GASNET_CONDUIT_SMP if (limit) { gasneti_console0_message("WARNING","ignoring GASNET_SUPERNODE_MAXSIZE for smp-conduit with PSHM."); } limit = gasneti_nodes; #else if (limit <= 0) { limit = GASNETI_PSHM_MAX_NODES; } else if (limit > GASNETI_PSHM_MAX_NODES) { gasneti_fatalerror("GASNET_SUPERNODE_MAXSIZE %d exceeds GASNETI_PSHM_MAX_NODES (%d)", limit, GASNETI_PSHM_MAX_NODES); } #endif #else limit = 1; /* No PSHM */ #endif gasneti_assert(!gasneti_nodeinfo); gasneti_nodeinfo = gasneti_calloc(gasneti_nodes, sizeof(gasnet_nodeinfo_t)); gasneti_leak(gasneti_nodeinfo); /* First pass: * + Apply the supernode size limit, if any. * + Determine the counts and ranks * + Construct gasneti_nodeinfo[].{host,supernode} */ initial = gasneti_nodemap[gasneti_mynode]; for (i = 0; i < gasneti_nodes; ++i) { const gex_Rank_t n = gasneti_nodemap[i]; const gex_Rank_t width = s[n].width++; const gex_Rank_t lrank = width % limit; if (!width) { /* First node on host */ s[n].host = gasneti_myhost.grp_count++; } if (!lrank) { /* First node on supernode */ s[n].sn_lead = i; s[n].supernode = gasneti_mysupernode.grp_count++; } if (i == gasneti_mynode) { gasneti_mysupernode.node_rank = lrank; gasneti_myhost.node_rank = width; } s[i].h_lead = n; gasneti_nodemap[i] = s[n].sn_lead; gasneti_nodeinfo[i].supernode = s[n].supernode; gasneti_nodeinfo[i].host = s[n].host; } final = gasneti_nodemap[gasneti_mynode]; gasneti_mysupernode.node_count = (final == s[initial].sn_lead) ? (((s[initial].width - 1) % limit) + 1) : limit; gasneti_myhost.node_count = s[initial].width; gasneti_mysupernode.grp_rank = gasneti_nodeinfo[gasneti_mynode].supernode; gasneti_myhost.grp_rank = gasneti_nodeinfo[gasneti_mynode].host; /* Second pass: Construct arrays of local nodes */ gasneti_assert_uint(gasneti_myhost.node_count ,>=, gasneti_mysupernode.node_count); gasneti_myhost.nodes = gasneti_malloc(gasneti_myhost.node_count*sizeof(gex_Rank_t)); gasneti_leak(gasneti_myhost.nodes); for (i = initial, j = 0; j < gasneti_myhost.node_count; ++i) { gasneti_assert_uint(i ,<, gasneti_nodes); if (s[i].h_lead == initial) { if (i == final) gasneti_mysupernode.nodes = gasneti_myhost.nodes + j; gasneti_myhost.nodes[j++] = i; } } gasneti_assert(gasneti_mysupernode.nodes != NULL); gasneti_free(s); #if GASNET_PSHM GASNETI_TRACE_PRINTF(I,("nodemap: process %d of %d in its nbrhd, %d of %d on host %s", gasneti_mysupernode.node_rank, gasneti_mysupernode.node_count, gasneti_myhost.node_rank, gasneti_myhost.node_count, gasneti_gethostname())); gex_Rank_t nonh_rank, nonh_count; // "Nbrhd ON Host" coordinates nonh_rank = nonh_count = 0; for (i = 0; i < gasneti_myhost.node_count; ++i) { j = gasneti_myhost.nodes[i]; // iterating over procs on my host if (gasneti_nodemap[j] == j) { // first proc in its nbrhd nonh_count += 1; nonh_rank += (j <= gasneti_mynode); // too high by 1, corrected after loop } } --nonh_rank; GASNETI_TRACE_PRINTF(I,("nodemap: nbrhd %d of %d in the job, %d of %d on host %s", gasneti_mysupernode.grp_rank, gasneti_mysupernode.grp_count, nonh_rank, nonh_count, gasneti_gethostname())); #else GASNETI_TRACE_PRINTF(I,("nodemap: process %d of %d on host %s", gasneti_myhost.node_rank, gasneti_myhost.node_count, gasneti_gethostname())); #endif GASNETI_TRACE_PRINTF(I,("nodemap: host %d of %d", gasneti_myhost.grp_rank, gasneti_myhost.grp_count)); #if GASNET_DEBUG_VERBOSE for (i = 0; i < gasneti_nodes; ++i) { gasneti_console0_message("INFO","gasneti_nodemap[%i] = %i\n", (int)i, (int)gasneti_nodemap[i]); } #endif #if GASNET_NDEBUG && !GASNET_PSHM && !GASNET_SEGMENT_EVERYTHING if (!gasneti_mynode && (gasneti_nodes != gasneti_myhost.grp_count)) { // at least one host holds more than one process gasneti_console_message("WARNING", "Running with multiple processes per host without shared-memory communication support (PSHM). " "This can significantly reduce performance. " "Please re-configure GASNet using `--enable-pshm` to enable fast intra-host comms."); } #endif } // gasneti_nodemapInit(exchangefn, ids, sz, stride) // // Collectively called to construct the gasneti_nodemap[] such that // For all i: gasneti_nodemap[i] is the lowest node number collocated w/ node i // GASNet nodes are considered collocated if they have the same node "ID" (see below). // // Calls gasneti_nodemapParse() after construction of the nodemap. // // A given conduit may fall into one of four cases based on the first two arguments: // if (exchangefn && ids) { // GASNET_HOST_DETECT is honored, and "conduit" is a valid option which will // use `sz` bytes at `*ids` as a local identifier. // The `stride` argument is ignored. // } else if (exchangefn && !ids) // GASNET_HOST_DETECT is honored, but "conduit" is NOT a valid option. // Both `sz` and `stride` are ignored. // } else if (ids) { // GASNET_HOST_DETECT defaults to "conduit", which is the only valid option // (other than undocumented "trivial"). // Memory starting at `*ids` is taken as a vector of `gasneti_nodes` local // ids, each of length `sz` bytes, spaced by `stride` bytes. The vector of // IDs need not be "single valued" across calling nodes, so long as the // resulting nodemap is the same. This allows, for instance, the use of // "local/relative" IDs as well as "global/absolute" ones. // This should only be used in cases where the conduit-specific identifier // is 100% reliable and/or gasneti_gethostname() and gasnet_gethostid() are // UNreliable (or unavailable). See also: First TODO note below. // } else { // Lacking both an `exchangefn` and `ids`, this case will always fail unless // (undocumented) GASNET_HOST_DETECT="trivial" is requested. // This may be useful early in conduit development, but is otherwise // very strongly discouraged. // Both `sz` and `stride` are ignored. // } // // TODO: The "four cases" above conflate the scalar/vector nature of `ids` // with the availability of an `exchangefn`, with the result that a vector of // conduit-specific ids cannot be ignored in favor of one of the standard // GASNET_HOST_DETECT options (which had made "conduit" and "trivial" the only // supported options for aries-conduit). This could be fixed with an // adjustment such as making non-zero `stride` the indicator for a vector `ids`. // // TODO: There is a proposed "greedy" algorithm which uses all of the available // IDs (hostid, hostname, conduit, ...). // extern void gasneti_nodemapInit(gasneti_bootstrapExchangefn_t exchangefn, const void *ids, size_t sz, size_t stride) { gasneti_nodemap = gasneti_malloc(gasneti_nodes * sizeof(gex_Rank_t)); // First parse GASNET_HOST_DETECT // Default is complicated: // Will use "conduit" if valid (ids is non-NULL) // else use the default selected at configure-time (if any), // else use "gethostid" if available/trusted on this platform, // else use "hostname". #ifdef GASNETI_HOST_DETECT_CONFIGURE #define GASNETI_HOST_DETECT_DEFAULT GASNETI_HOST_DETECT_CONFIGURE #elif HAVE_GETHOSTID && !PLATFORM_OS_CYGWIN // gethostid() is available and not known-broken #define GASNETI_HOST_DETECT_DEFAULT "gethostid" #else #define GASNETI_HOST_DETECT_DEFAULT "hostname" #endif const char *dflt = ids ? "conduit" : GASNETI_HOST_DETECT_DEFAULT; const char *envval = gasneti_getenv_withdefault("GASNET_HOST_DETECT", dflt); if (! gasneti_strcasecmp(envval, "conduit")) { gasneti_hostid_alg = gasneti_hostid_alg_conduit; } else if (! gasneti_strcasecmp(envval, "gethostid")) { gasneti_hostid_alg = gasneti_hostid_alg_gethostid; } else if (! gasneti_strcasecmp(envval, "hostname")) { gasneti_hostid_alg = gasneti_hostid_alg_hostname; } else if (! gasneti_strcasecmp(envval, "trivial")) { // NOTE: this option is intentionally undocumented gasneti_hostid_alg = gasneti_hostid_alg_trivial; } else { gasneti_fatalerror("GASNET_HOST_DETECT='%s' is not recognized", envval); } void *tmp = NULL; switch (gasneti_hostid_alg) { case gasneti_hostid_alg_conduit: // TODO: save something suitable for gasneti_format_host_detect() // If we lack conduit-specific ID(s), then "conduit" is invalid: if (!ids) goto out_bad_alg; // (ids && !exchangefn) means a *full* vector of conduit-specific IDs: if (!exchangefn) goto no_exchange; // otherwise we'll exchange the conduit-specific IDs, below break; case gasneti_hostid_alg_gethostid: gasneti_my_hostid.hostid = gasneti_gethostid(); sz = sizeof(gasneti_my_hostid.hostid); ids = &gasneti_my_hostid; break; case gasneti_hostid_alg_hostname: gasneti_my_hostid.hostname = gasneti_hosthash(); sz = sizeof(gasneti_my_hostid.hostname); ids = &gasneti_my_hostid; break; case gasneti_hostid_alg_trivial: for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) gasneti_nodemap[i] = i; goto no_helper; break; default: gasneti_unreachable_error(("Unknown host detect algorithm %i", (int)gasneti_hostid_alg)); } // Bail if conduit did not provide an exchangefn if (!exchangefn) goto out_bad_alg; // Exchange the chosen local id gasneti_assert(sz); tmp = gasneti_malloc(gasneti_nodes * sz); (*exchangefn)((void*)ids, sz, tmp); ids = tmp; stride = sz; no_exchange: gasneti_nodemap_helper(ids, sz, stride); gasneti_free(tmp); no_helper: // Perform "common" work w.r.t the nodemap GASNETI_TRACE_PRINTF(I,("GASNET_HOST_DETECT=%s yields %s", envval, gasneti_format_host_detect())); gasneti_nodemapParse(); return; out_bad_alg: gasneti_fatalerror("This conduit (" GASNET_CORE_NAME_STR ") does not support GASNET_HOST_DETECT='%s'.", envval); } /* Presently just frees the space allocated for the full nodemap. */ extern void gasneti_nodemapFini(void) { gasneti_free(gasneti_nodemap); #if GASNET_DEBUG /* To help catch any use-afer-Fini: */ gasneti_nodemap = NULL; #endif } /* ------------------------------------------------------------------------------------ */ /* Get a line up to '\n' or EOF using dynamicly grown buffer * If buffer is too small (or NULL) then it is gasneti_realloc()ed. * Buffer and length written to *buf_p and *n_p, even on error. * Subsequent calls may reuse the buffer and length. * Caller is responsible for eventual gasneti_free(). * Buffer is always terminated by '\0', even on error. * If a '\n' was read, it is perserved. * A '\n' is NOT added if EOF was reached first. * Returns bytes read on success; -1 on EOF or other error. */ #ifdef gasneti_getline /* Using glibc version */ #else ssize_t gasneti_getline(char **buf_p, size_t *n_p, FILE *fp) { char *buf = *buf_p; char *p = buf; size_t n = buf ? *n_p : 0; ssize_t len = 0; gasneti_assert_int((ssize_t)n ,>=, 0); do { size_t space = n - len; if_pf (space < 2) { n += MAX(2, n); buf = gasneti_realloc(buf, n); p = buf + len; space = n - len; } if (fgets(p, space, fp) == NULL) { *p = '\0'; len = -1; break; /* error before full line read */ } len += strlen(p); p = buf + len; } while (!feof(fp) && (p[-1] != '\n')); *buf_p = buf; *n_p = n; return len; } #endif /* gasneti_getline */ /* ------------------------------------------------------------------------------------ */ // Internal conduit interface to spawner #if HAVE_SSH_SPAWNER extern gasneti_spawnerfn_t const *gasneti_bootstrapInit_ssh(int *argc, char ***argv, gex_Rank_t *nodes, gex_Rank_t *mynode); #endif #if HAVE_MPI_SPAWNER extern gasneti_spawnerfn_t const *gasneti_bootstrapInit_mpi(int *argc, char ***argv, gex_Rank_t *nodes, gex_Rank_t *mynode); #endif #if HAVE_PMI_SPAWNER extern gasneti_spawnerfn_t const *gasneti_bootstrapInit_pmi(int *argc, char ***argv, gex_Rank_t *nodes, gex_Rank_t *mynode); #endif int gasneti_spawn_verbose = 0; extern gasneti_spawnerfn_t const *gasneti_spawnerInit(int *argc_p, char ***argv_p, const char *force_spawner, gex_Rank_t *nodes_p, gex_Rank_t *mynode_p) { gasneti_spawnerfn_t const *res = NULL; const char *spawner_envvar = "GASNET_" GASNET_CORE_NAME_STR "_SPAWNER"; const char *spawner = NULL; int enabled = 0; // non-zero if an enabled spawner is selected explicitly int disabled = 0; // non-zero if a known spawner is selected explicitly but is not enabled int spawner_not_set = 0; int match; if (force_spawner) spawner = force_spawner; else { // Purposely hide this variable from verbose output, since it's only for // use as an internal hand-off from out-dated gasnetrun scripts. // End users should set GASNET__SPAWNER. const char *dflt = gasneti_getenv("GASNET_SPAWN_CONTROL"); if (!dflt) { #ifdef GASNETC_DEFAULT_SPAWNER dflt = GASNETC_DEFAULT_SPAWNER; spawner_not_set = !gasneti_getenv(spawner_envvar); // Not traced #else gasneti_unreachable_error(("Call to gasneti_spawnerInit() without any default spawner defined")); #endif } // GASNET__SPAWNER=FOO may be set explicitly by a user, or // implicitly by gasnetrun. If it was not set by either of those means, // then the default will normally be the configure-time default. However, // if the legacy GASNET_SPAWN_CONTROL envvar is set, it takes precedence // over the configure-time value. spawner = gasneti_getenv_withdefault(spawner_envvar, dflt); } gasneti_assert(spawner != NULL); match = !gasneti_strcasecmp(spawner, "MPI"); #if HAVE_MPI_SPAWNER // For bug 3406: // Try mpi-spawner first if GASNET__SPAWNER is unset. // This is a requirement for spawning using bare mpirun. if (!res && (spawner_not_set || match)) { res = gasneti_bootstrapInit_mpi(argc_p, argv_p, nodes_p, mynode_p); } enabled += match; #else disabled += match; #endif match = !gasneti_strcasecmp(spawner, "SSH"); #if HAVE_SSH_SPAWNER // We do not attempt ssh-spawner in the absence of a (possibly default) // setting of GASNET__SPAWNER. Such could never be expected to // work, since a portion of the support logic is in the gasnetrun script. if (!res && match && !spawner_not_set) { res = gasneti_bootstrapInit_ssh(argc_p, argv_p, nodes_p, mynode_p); } enabled += match; #else disabled += match; #endif match = !gasneti_strcasecmp(spawner, "PMI"); #if HAVE_PMI_SPAWNER // We unofficially support "bare" (no gasnetrun script) PMI-based spawning // if GASNET__SPAWNER is unset (assuming gasneti_bootstrapInit_mpi() // doesn't run first and fail fatally). if (!res && (spawner_not_set || match)) { res = gasneti_bootstrapInit_pmi(argc_p, argv_p, nodes_p, mynode_p); } enabled += match; #else disabled += match; #endif if (!res) { if (enabled) { gasneti_fatalerror("Requested spawner \"%s\" failed to initialize", spawner); } else if (disabled) { gasneti_fatalerror("Requested spawner \"%s\" is known, but not enabled in this build", spawner); } else if (! spawner_not_set) { gasneti_fatalerror("Requested spawner \"%s\" is unknown", spawner); } else { // TODO: enumerate the supported spawners gasneti_fatalerror("No supported spawner was able to initialize the job"); } } gasneti_spawn_verbose = gasneti_getenv_yesno_withdefault("GASNET_SPAWN_VERBOSE",0); return res; } /* ------------------------------------------------------------------------------------ */ /* Simple container of segments * * Current implementation is a array, with deletions moving the last element * into the vacated slot to retain a dense table. This design choice favors * simple/efficient iteration. * * The field `_opaque_container_use` in gasneti_Segment_t stores the index * of the segment in this table, to provide for O(1) deletion (w/o a search) * and is not inteded to be used (for instance) as an identifer on the wire. */ // State, protected by _gasneti_segtbl_lock gasneti_mutex_t _gasneti_segtbl_lock = GASNETI_MUTEX_INITIALIZER; gasneti_Segment_t *_gasneti_segtbl = NULL; int _gasneti_segtbl_count = 0; void gasneti_segtbl_add(gasneti_Segment_t seg) { gasneti_mutex_lock(&_gasneti_segtbl_lock); seg->_opaque_container_use = _gasneti_segtbl_count++; size_t space = _gasneti_segtbl_count * sizeof(gasneti_Segment_t); _gasneti_segtbl = gasneti_realloc(_gasneti_segtbl, space); gasneti_leak(_gasneti_segtbl); _gasneti_segtbl[seg->_opaque_container_use] = seg; gasneti_mutex_unlock(&_gasneti_segtbl_lock); } void gasneti_segtbl_del(gasneti_Segment_t seg) { gasneti_mutex_lock(&_gasneti_segtbl_lock); gasneti_Segment_t last = _gasneti_segtbl[--_gasneti_segtbl_count]; last->_opaque_container_use = seg->_opaque_container_use; _gasneti_segtbl[last->_opaque_container_use] = last; // TODO: realloc to shrink if we think this would lead to significant savings? gasneti_mutex_unlock(&_gasneti_segtbl_lock); } /* ------------------------------------------------------------------------------------ */ /* Buffer management */ #if GASNET_DEBUGMALLOC || GASNET_DEBUG static uint64_t gasneti_memalloc_envint(const char *name, const char *deflt) { /* Signaling NaN: any bit pattern between 0x7ff0000000000001 and 0x7ff7ffffffffffff or any bit pattern between 0xfff0000000000001 and 0xfff7ffffffffffff Quiet NaN: any bit pattern between 0x7ff8000000000000 and 0x7fffffffffffffff or any bit pattern between 0xfff8000000000000 and 0xffffffffffffffff */ uint64_t sNAN = ((uint64_t)0x7ff7ffffffffffffULL); uint64_t qNAN = ((uint64_t)0x7fffffffffffffffULL); uint64_t val = 0; const char *envval = gasneti_getenv_withdefault(name, deflt); const char *p = envval; char tmp[255]; int i = 0; for ( ; *p; p++) { if (!isspace(*p)) tmp[i++] = toupper(*p); if (i == 254) break; } tmp[i] = '\0'; if (!strcmp(tmp, "NAN")) return sNAN; else if (!strcmp(tmp, "SNAN")) return sNAN; else if (!strcmp(tmp, "QNAN")) return qNAN; else val = gasneti_parse_int(tmp, 0); if (val <= 0xFF) { int i; uint64_t byte = val; for (i = 0; i < 7; i++) { val = (val << 8) | byte; } } return val; } static void gasneti_memalloc_valset(void *p, size_t len, uint64_t val) { gasneti_assert(! ((uintptr_t)p & 7)); uint64_t *output = p; size_t blocks = len/8; size_t extra = len%8; size_t i; for (i = 0; i < blocks; i++) { *output = val; output++; } if (extra) memcpy(output, &val, extra); } static const void *gasneti_memalloc_valcmp(const void *p, size_t len, uint64_t val) { gasneti_assert(! ((uintptr_t)p & 7)); const uint64_t *input = p; size_t blocks = len/8; size_t extra = len%8; size_t i; for (i = 0; i < blocks; i++) { if (*input != val) { const uint8_t *in = (uint8_t *)input; const uint8_t *cmp = (uint8_t *)&val; for (i = 0; i < 8; i++, in++, cmp++) if (*in != *cmp) return in; gasneti_fatalerror("bizarre failure in gasneti_memalloc_valcmp"); } input++; } if (extra) { const uint8_t *in = (uint8_t *)input; const uint8_t *cmp = (uint8_t *)&val; for (i = 0; i < extra; i++, in++, cmp++) if (*in != *cmp) return in; } return NULL; } #endif #if GASNET_DEBUGMALLOC /* ------------------------------------------------------------------------------------ */ /* Debug memory management debug memory format: | prev | next | allocdesc (2*sizeof(void*)) | datasz | BEGINPOST | | ENDPOST | ptr returned by malloc ^ */ /* READ BEFORE MODIFYING gasneti_memalloc_desc_t: * * malloc() is specified as returning memory "suitably aligned for any kind of variable". * We don't know a priori what that alignment is, but we MUST preserve it in * this debugging malloc implementation if we are to meet that same requirement. * The current length of gasneti_memalloc_desc_t is: * ILP32: 32 bytes (4+4+4+4+8+8) * [I]LP64: 48 bytes (8+8+8+8+8+8) * This means that any alignment up to 16-bytes will be preserved. That is ideal * since 16 is the strictest alignment requirement (long double on some platforms) * that we have encountered in practice. * * If you change this structure, you MUST add padding to maintain the length * at a multiple of 16-bytes AND please update the lengths above. * * NOTE: If the malloc() returns less than 16-byte alignment, then * it is not our responsibility to create it where it did not exists. * Any GASNet code needing larger alignment than 4- or 8-bytes should * probably be using gasneti_{malloc,free}_aligned() (or gasnett_*). */ typedef struct gasneti_memalloc_desc { struct gasneti_memalloc_desc * volatile prevdesc; struct gasneti_memalloc_desc * volatile nextdesc; const char *allocdesc_str; /* a file name, or file name:linenum */ uintptr_t allocdesc_num; /* a line number, or zero for none */ uint64_t datasz; uint64_t beginpost; } gasneti_memalloc_desc_t; static uint64_t gasneti_memalloc_allocatedbytes = 0; /* num bytes ever allocated */ static uint64_t gasneti_memalloc_freedbytes = 0; /* num bytes ever freed */ static uint64_t gasneti_memalloc_allocatedobjects = 0; /* num objects ever allocated */ static uint64_t gasneti_memalloc_freedobjects = 0; /* num objects ever freed */ static uint64_t gasneti_memalloc_ringobjects = 0; /* num objects in the ring */ static uint64_t gasneti_memalloc_ringbytes = 0; /* num bytes in the ring */ static size_t gasneti_memalloc_maxobjectsize = 0; /* max object size ever allocated */ static uintptr_t gasneti_memalloc_maxobjectloc = 0; /* max address ever allocated */ static uint64_t gasneti_memalloc_maxlivebytes = 0; /* max num bytes live at any given time */ static uint64_t gasneti_memalloc_maxliveobjects = 0; /* max num bytes live at any given time */ static int gasneti_memalloc_extracheck = 0; static int gasneti_memalloc_init = -1; static uint64_t gasneti_memalloc_initval = 0; static int gasneti_memalloc_clobber = -1; static uint64_t gasneti_memalloc_clobberval = 0; static int gasneti_memalloc_leakall = -1; static int gasneti_memalloc_scanfreed = -1; static int gasneti_memalloc_envisinit = 0; static gasneti_mutex_t gasneti_memalloc_lock = GASNETI_MUTEX_INITIALIZER; static gasneti_memalloc_desc_t *gasneti_memalloc_pos = NULL; #define GASNETI_MEM_BEGINPOST ((uint64_t)0xDEADBABEDEADBABEULL) #define GASNETI_MEM_LEAKMARK ((uint64_t)0xBABEDEADCAFEBEEFULL) #define GASNETI_MEM_ENDPOST ((uint64_t)0xCAFEDEEDCAFEDEEDULL) #define GASNETI_MEM_FREEMARK ((uint64_t)0xBEEFEFADBEEFEFADULL) #define GASNETI_MEM_HEADERSZ (sizeof(gasneti_memalloc_desc_t)) #define GASNETI_MEM_TAILSZ 8 #define GASNETI_MEM_EXTRASZ (GASNETI_MEM_HEADERSZ+GASNETI_MEM_TAILSZ) #define GASNETI_MEM_MALLOCALIGN 4 #define gasneti_looksaligned(p) (!(((uintptr_t)(p)) & (GASNETI_MEM_MALLOCALIGN-1))) GASNETI_INLINE(gasneti_memalloc_envinit) void gasneti_memalloc_envinit(void) { if (!gasneti_memalloc_envisinit) { gasneti_mutex_lock(&gasneti_memalloc_lock); if (!gasneti_memalloc_envisinit && gasneti_init_done) { gasneti_memalloc_envisinit = 1; /* set first, because getenv might call malloc when tracing */ gasneti_memalloc_init = gasneti_getenv_yesno_withdefault("GASNET_MALLOC_INIT",0); gasneti_memalloc_initval = gasneti_memalloc_envint("GASNET_MALLOC_INITVAL","NAN"); gasneti_memalloc_clobber = gasneti_getenv_yesno_withdefault("GASNET_MALLOC_CLOBBER",0); gasneti_memalloc_clobberval = gasneti_memalloc_envint("GASNET_MALLOC_CLOBBERVAL","NAN"); gasneti_memalloc_leakall = gasneti_getenv_yesno_withdefault("GASNET_MALLOC_LEAKALL", 0); gasneti_memalloc_scanfreed = gasneti_getenv_yesno_withdefault("GASNET_MALLOC_SCANFREED", 0); gasneti_memalloc_extracheck = gasneti_getenv_yesno_withdefault("GASNET_MALLOC_EXTRACHECK", 0); if (gasneti_memalloc_scanfreed && !gasneti_memalloc_clobber) { gasneti_memalloc_clobber = 1; gasneti_console0_message("WARNING", "GASNET_MALLOC_SCANFREED requires GASNET_MALLOC_CLOBBER: enabling it."); } if (gasneti_memalloc_scanfreed && !gasneti_memalloc_leakall) { gasneti_memalloc_leakall = 1; gasneti_console0_message("WARNING", "GASNET_MALLOC_SCANFREED requires GASNET_MALLOC_LEAKALL: enabling it."); } } gasneti_mutex_unlock(&gasneti_memalloc_lock); } } #define GASNETI_MAX_LOCSZ 280 /* formats a curloc into buffer[GASNETI_MAX_LOCSZ] and returns buffer */ static char *_gasneti_format_curloc(char *buffer, const char *curloc) { char retval[GASNETI_MAX_LOCSZ]; if (curloc == NULL) { sprintf(retval, buffer, ""); } else if (!strcmp(curloc,"SRCPOS")) { const char *filename = ""; unsigned int linenum = 0; char temp[GASNETI_MAX_LOCSZ]; GASNETI_TRACE_GETSOURCELINE(&filename, &linenum); /* noop if not avail */ sprintf(temp,"%s:%i", filename, linenum); sprintf(retval, buffer, temp); } else { sprintf(retval, buffer, curloc); } strcpy(buffer, retval); return buffer; } // bug 4366: avoid spammy assertions if we are running in the context of a // signal that arrived during a memcheck operation // _gasneti_mutex_trylock_mayberecursive() is a version of gasneti_mutex_trylock // that returns failure instead of asserting on a recursive attempt in DEBUG mode // TODO: possibly promote this to the general gasneti_mutex API? static int _gasneti_mutex_trylock_mayberecursive(gasneti_mutex_t *mut) { #ifdef _gasneti_mutex_heldbyme if (_gasneti_mutex_heldbyme(mut)) { // we know we are already holding this mutex, return failure instead of asserting below return EBUSY; } #endif return gasneti_mutex_trylock(mut); } extern void _gasneti_memcheck_one(const char *curloc) { if (gasneti_memalloc_extracheck) _gasneti_memcheck_all(curloc); else { if (_gasneti_mutex_trylock_mayberecursive(&gasneti_memalloc_lock)) return; if (gasneti_memalloc_pos) { _gasneti_memcheck(gasneti_memalloc_pos+1, curloc, 2); gasneti_memalloc_pos = gasneti_memalloc_pos->nextdesc; } else gasneti_assert_always(gasneti_memalloc_ringobjects == 0 && gasneti_memalloc_ringbytes == 0); gasneti_mutex_unlock(&gasneti_memalloc_lock); } } extern void _gasneti_memcheck_all(const char *curloc) { if (_gasneti_mutex_trylock_mayberecursive(&gasneti_memalloc_lock)) return; if (gasneti_memalloc_pos) { gasneti_memalloc_desc_t *begin = gasneti_memalloc_pos; uint64_t cnt; uint64_t sumsz = 0; for (cnt=0; cnt < gasneti_memalloc_ringobjects; cnt++) { sumsz += _gasneti_memcheck(gasneti_memalloc_pos+1, curloc, 2); gasneti_memalloc_pos = gasneti_memalloc_pos->nextdesc; if (gasneti_memalloc_pos == begin) break; } if (cnt+1 != gasneti_memalloc_ringobjects || gasneti_memalloc_pos != begin || sumsz != gasneti_memalloc_ringbytes) { gasneti_fatalerror("Debug malloc memcheck_all (called at %s) detected an error " "in the memory ring linkage, most likely as a result of memory corruption.", curloc); } } else gasneti_assert_always(gasneti_memalloc_ringobjects == 0 && gasneti_memalloc_ringbytes == 0); gasneti_mutex_unlock(&gasneti_memalloc_lock); } /* assert the integrity of given memory block and return size of the user object checktype == 0: check a live object checktype == 1: check an object which is about to be freed checktype == 2: check an object which resides in the ring (and may be dead) */ extern size_t _gasneti_memcheck(void *ptr, const char *curloc, int checktype) { const char *corruptstr = NULL; char tmpstr[255]; size_t nbytes = 0; const char *allocdesc_str = NULL; uintptr_t allocdesc_num = 0; uint64_t beginpost = 0; uint64_t endpost = 0; int doscan = 0; gasneti_assert_always_uint((unsigned int)checktype ,<=, 2); if (gasneti_looksaligned(ptr)) { gasneti_memalloc_desc_t *desc = ((gasneti_memalloc_desc_t *)ptr) - 1; beginpost = (desc->beginpost == GASNETI_MEM_LEAKMARK) ? GASNETI_MEM_BEGINPOST : desc->beginpost; nbytes = (size_t)desc->datasz; if (nbytes == 0 || nbytes > gasneti_memalloc_maxobjectsize || ((uintptr_t)ptr)+nbytes > gasneti_memalloc_maxobjectloc || !desc->prevdesc || !desc->nextdesc || !gasneti_looksaligned(desc->prevdesc) || !gasneti_looksaligned(desc->nextdesc)) { nbytes = 0; /* bad metadata, don't trust any of it */ } else { allocdesc_str = desc->allocdesc_str; allocdesc_num = desc->allocdesc_num; memcpy(&endpost,((char*)ptr)+nbytes,GASNETI_MEM_TAILSZ); } } if (beginpost == GASNETI_MEM_FREEMARK) { switch (checktype) { case 0: /* should be a live object */ corruptstr = "Debug malloc memcheck() called on freed memory (may indicate local heap corruption)"; break; case 1: /* about to be freed - should still be a live object */ corruptstr = "Debug free detected a duplicate free() or local heap corruption"; break; case 2: if (gasneti_memalloc_scanfreed <= 0) /* freed objects should not be in ring */ corruptstr = "Debug malloc found a freed object in the memory ring, indicating local heap corruption"; else doscan = 1; break; } } if (beginpost != GASNETI_MEM_FREEMARK && (beginpost != GASNETI_MEM_BEGINPOST || endpost != GASNETI_MEM_ENDPOST)) { const char *diagnosis = "a bad pointer or local heap corruption"; #if !GASNET_SEGMENT_EVERYTHING // TODO-EX: multi-segment equivalent? gasneti_EP_t i_ep = gasneti_import_ep(gasneti_THUNK_EP); if (gasneti_attach_done && gasneti_in_local_segment(i_ep,ptr,1)) diagnosis = "a bad pointer, referencing the shared segment (outside malloc heap)"; else #endif if (nbytes && beginpost == GASNETI_MEM_BEGINPOST && endpost != GASNETI_MEM_ENDPOST) diagnosis = "local heap corruption (probable buffer overflow)"; else if (nbytes && beginpost != GASNETI_MEM_BEGINPOST && endpost == GASNETI_MEM_ENDPOST) diagnosis = "local heap corruption (probable buffer underflow)"; if (checktype == 1) { sprintf(tmpstr, "Debug free detected %s", diagnosis); } else { sprintf(tmpstr, "Debug malloc memcheck() detected %s", diagnosis); } corruptstr = tmpstr; } if (corruptstr == NULL && doscan) { const void *badloc = gasneti_memalloc_valcmp(ptr, nbytes, gasneti_memalloc_clobberval); if (badloc) { sprintf(tmpstr, "Debug malloc memcheck() detected a write to freed memory at object offset: %i bytes", (int)((uintptr_t)badloc - (uintptr_t)ptr)); corruptstr = tmpstr; } } if (corruptstr != NULL) { char nbytesstr[80]; char allocstr[GASNETI_MAX_LOCSZ]; const char *allocdesc; char curlocstr[GASNETI_MAX_LOCSZ]; if (allocdesc_str != NULL && memchr(allocdesc_str,'\0',255) == 0) { /* allocptr may be bad */ allocdesc = NULL; } else { if (allocdesc_num) { sprintf(allocstr,"\n allocated at: %s:%i",allocdesc_str,(int)allocdesc_num); } else { sprintf(allocstr,"\n allocated at: %s",allocdesc_str); } allocdesc = allocstr; } if (allocdesc == NULL) nbytesstr[0] = '\0'; else sprintf(nbytesstr," nbytes=%i",(int)nbytes); if (checktype == 1) strcpy(curlocstr,"\n freed at: %s"); else strcpy(curlocstr,"\n detected at: %s"); gasneti_fatalerror("%s\n ptr="GASNETI_LADDRFMT"%s%s%s", corruptstr, GASNETI_LADDRSTR(ptr), nbytesstr, (allocdesc!=NULL?allocdesc:""), _gasneti_format_curloc(curlocstr,curloc)); } return nbytes; } /* get access to system malloc/free */ #undef malloc #undef free static void *_gasneti_malloc_inner(int allowfail, size_t nbytes, const char *curloc) { void *ret = NULL; gasneti_memalloc_envinit(); _gasneti_memcheck_one(curloc); GASNETI_STAT_EVENT_VAL(I, GASNET_MALLOC, nbytes); if_pf (nbytes == 0) { return NULL; } ret = malloc(nbytes+GASNETI_MEM_EXTRASZ); gasneti_assert_always_uint((((uintptr_t)ret) & 0x3) ,==, 0); /* should have at least 4-byte alignment */ if_pf (ret == NULL) { char curlocstr[GASNETI_MAX_LOCSZ]; strcpy(curlocstr, "\n at: %s"); if (allowfail) { GASNETI_TRACE_PRINTF(I,("Warning: returning NULL for a failed gasneti_malloc(%"PRIuPTR")%s", (uintptr_t)nbytes, _gasneti_format_curloc(curlocstr,curloc))); return NULL; } gasneti_fatalerror("Debug malloc(%"PRIuPTR") failed (%"PRIu64" bytes in use, in %"PRIu64" objects)%s", (uintptr_t)nbytes, (gasneti_memalloc_allocatedbytes - gasneti_memalloc_freedbytes), (gasneti_memalloc_allocatedobjects - gasneti_memalloc_freedobjects), _gasneti_format_curloc(curlocstr,curloc)); } else { uint64_t gasneti_endpost_ref = GASNETI_MEM_ENDPOST; gasneti_memalloc_desc_t *desc = ret; if (!strcmp(curloc,"SRCPOS")) { const char *filename = ""; unsigned int linenum = 0; GASNETI_TRACE_GETSOURCELINE(&filename, &linenum); /* noop if not avail */ desc->allocdesc_str = filename; desc->allocdesc_num = linenum; } else { desc->allocdesc_str = curloc; desc->allocdesc_num = 0; } desc->datasz = (uint64_t)nbytes; desc->beginpost = GASNETI_MEM_BEGINPOST; memcpy(((char*)ret)+nbytes+GASNETI_MEM_HEADERSZ, &gasneti_endpost_ref, GASNETI_MEM_TAILSZ); gasneti_mutex_lock(&gasneti_memalloc_lock); gasneti_memalloc_allocatedbytes += nbytes; gasneti_memalloc_allocatedobjects++; gasneti_memalloc_ringobjects++; gasneti_memalloc_ringbytes += nbytes; if (nbytes > gasneti_memalloc_maxobjectsize) gasneti_memalloc_maxobjectsize = nbytes; if (((uintptr_t)ret)+nbytes+GASNETI_MEM_HEADERSZ > gasneti_memalloc_maxobjectloc) gasneti_memalloc_maxobjectloc = ((uintptr_t)ret)+nbytes+GASNETI_MEM_HEADERSZ; gasneti_memalloc_maxlivebytes = MAX(gasneti_memalloc_maxlivebytes, gasneti_memalloc_allocatedbytes-gasneti_memalloc_freedbytes); gasneti_memalloc_maxliveobjects = MAX(gasneti_memalloc_maxliveobjects, gasneti_memalloc_allocatedobjects-gasneti_memalloc_freedobjects); if (gasneti_memalloc_pos == NULL) { /* first object */ gasneti_memalloc_pos = desc; desc->prevdesc = desc; desc->nextdesc = desc; } else { /* link into ring */ desc->prevdesc = gasneti_memalloc_pos->prevdesc; desc->nextdesc = gasneti_memalloc_pos; gasneti_memalloc_pos->prevdesc->nextdesc = desc; gasneti_memalloc_pos->prevdesc = desc; } gasneti_mutex_unlock(&gasneti_memalloc_lock); ret = desc+1; if (gasneti_memalloc_init > 0) gasneti_memalloc_valset(ret, nbytes, gasneti_memalloc_initval); } _gasneti_memcheck(ret,curloc,0); return ret; } extern void *_gasneti_malloc(size_t nbytes, const char *curloc) { return _gasneti_malloc_inner(0, nbytes, curloc); } extern void *_gasneti_malloc_allowfail(size_t nbytes, const char *curloc) { return _gasneti_malloc_inner(1, nbytes, curloc); } extern void _gasneti_free(void *ptr, const char *curloc) { size_t nbytes; gasneti_memalloc_desc_t *desc; gasneti_memalloc_envinit(); _gasneti_memcheck_one(curloc); if_pf (ptr == NULL) return; nbytes = _gasneti_memcheck(ptr, curloc, 1); GASNETI_STAT_EVENT_VAL(I, GASNET_FREE, nbytes); desc = ((gasneti_memalloc_desc_t *)ptr) - 1; if (gasneti_memalloc_clobber > 0) gasneti_memalloc_valset(desc+1, nbytes, gasneti_memalloc_clobberval); gasneti_mutex_lock(&gasneti_memalloc_lock); desc->beginpost = GASNETI_MEM_FREEMARK; gasneti_memalloc_freedbytes += nbytes; gasneti_memalloc_freedobjects++; if (gasneti_memalloc_scanfreed <= 0) { gasneti_memalloc_ringobjects--; gasneti_memalloc_ringbytes -= nbytes; if (desc->nextdesc == desc) { /* last item in list */ gasneti_assert_always(desc->prevdesc == desc && gasneti_memalloc_ringobjects == 0); gasneti_memalloc_pos = NULL; } else { if (gasneti_memalloc_pos == desc) gasneti_memalloc_pos = desc->nextdesc; desc->prevdesc->nextdesc = desc->nextdesc; desc->nextdesc->prevdesc = desc->prevdesc; } } gasneti_mutex_unlock(&gasneti_memalloc_lock); if (gasneti_memalloc_leakall <= 0) free(desc); } extern void *_gasneti_calloc(size_t N, size_t S, const char *curloc) { void *ret; size_t nbytes = N*S; if_pf (nbytes == 0) return NULL; ret = _gasneti_malloc(nbytes, curloc); memset(ret,0,nbytes); _gasneti_memcheck(ret,curloc,0); return ret; } extern void *_gasneti_realloc(void *ptr, size_t sz, const char *curloc) { void *ret = _gasneti_malloc(sz, curloc); if_pt (ptr != NULL) { size_t nbytes = _gasneti_memcheck(ptr, curloc, 0); memcpy(ret, ptr, MIN(nbytes, sz)); _gasneti_free(ptr, curloc); } if (sz) { _gasneti_memcheck(ret,curloc,0); } return ret; } extern void _gasneti_leak(void *ptr, const char *curloc) { gasneti_memalloc_desc_t *desc; if_pf (ptr == NULL) return; _gasneti_memcheck(ptr, curloc, 0); desc = ((gasneti_memalloc_desc_t *)ptr) - 1; gasneti_mutex_lock(&gasneti_memalloc_lock); desc->beginpost = GASNETI_MEM_LEAKMARK; gasneti_mutex_unlock(&gasneti_memalloc_lock); } extern int gasneti_getheapstats(gasneti_heapstats_t *pstat) { pstat->allocated_bytes = gasneti_memalloc_allocatedbytes; pstat->freed_bytes = gasneti_memalloc_freedbytes; pstat->live_bytes = gasneti_memalloc_allocatedbytes - gasneti_memalloc_freedbytes; pstat->live_bytes_max = gasneti_memalloc_maxlivebytes; pstat->allocated_objects = gasneti_memalloc_allocatedobjects; pstat->freed_objects = gasneti_memalloc_freedobjects; pstat->live_objects = gasneti_memalloc_allocatedobjects - gasneti_memalloc_freedobjects; pstat->live_objects_max = gasneti_memalloc_maxliveobjects; pstat->overhead_bytes = gasneti_memalloc_ringbytes - pstat->live_bytes + gasneti_memalloc_ringobjects*GASNETI_MEM_EXTRASZ; return 0; } extern void gasneti_malloc_dump_liveobjects(FILE *fp) { gasneti_mutex_lock(&gasneti_memalloc_lock); if (gasneti_memalloc_pos) { gasneti_memalloc_desc_t *pos = gasneti_memalloc_pos; uint64_t cnt; for (cnt=0; cnt < gasneti_memalloc_ringobjects; cnt++) { uint64_t datasz = pos->datasz; const char * allocptr = NULL; char allocdesc[GASNETI_MAX_LOCSZ]; if (!pos->allocdesc_str) { allocptr = NULL; } else if (pos->allocdesc_num) { sprintf(allocdesc,"%s:%i",pos->allocdesc_str,(int)pos->allocdesc_num); allocptr = allocdesc; } else { allocptr = pos->allocdesc_str; } fprintf(fp, " %10lu %c %s\n", (unsigned long)datasz, (pos->beginpost == GASNETI_MEM_LEAKMARK ? '*' : ' '), (allocptr?allocptr:"")); pos = pos->nextdesc; } } gasneti_mutex_unlock(&gasneti_memalloc_lock); } extern void gasneti_heapinfo_dump(const char *filename, int show_live_objects) { static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); FILE *fp = gasneti_open_outputfile(filename, "debugmalloc heap report"); if (fp) { time_t ltime; char temp[1024]; time(<ime); strcpy(temp, ctime(<ime)); if (temp[strlen(temp)-1] == '\n') temp[strlen(temp)-1] = '\0'; gasnett_heapstats_t stats; gasnett_getheapstats(&stats); fprintf(fp, "# GASNet Debug Mallocator Report\n"); fprintf(fp, "#\n"); fprintf(fp, "# program: %s\n",gasneti_exe_name()); fprintf(fp, "# date: %s\n",temp); fprintf(fp, "# host: %s\n",gasnett_gethostname()); fprintf(fp, "# pid: %i\n",(int)getpid()); fprintf(fp, "# node: %i / %i\n", (int)gasneti_mynode, (int)gasneti_nodes); fprintf(fp, "#\n"); fprintf(fp, "# Private memory utilization:\n"); fprintf(fp, "# ---------------------------\n"); fprintf(fp, "#\n"); fprintf(fp, "# malloc() space total: %10"PRIu64" bytes, in %10"PRIu64" objects\n", stats.allocated_bytes, stats.allocated_objects); fprintf(fp, "# malloc() space in-use: %10"PRIu64" bytes, in %10"PRIu64" objects\n", stats.live_bytes, stats.live_objects); fprintf(fp, "# malloc() space freed: %10"PRIu64" bytes, in %10"PRIu64" objects\n", stats.freed_bytes, stats.freed_objects); fprintf(fp, "# malloc() space peak usage: %10"PRIu64" bytes, %10"PRIu64" objects\n", stats.live_bytes_max, stats.live_objects_max); fprintf(fp, "# malloc() system overhead: >= %10"PRIu64" bytes\n", stats.overhead_bytes); fprintf(fp, "#\n"); gasneti_memcheck_all(); /* check ring sanity */ if (show_live_objects) { fprintf(fp, "# Live objects\n"); fprintf(fp, "# ------------\n"); fprintf(fp, "#\n"); fprintf(fp, "# Table below shows objects allocated, but not freed.\n"); fprintf(fp, "# Note that GASNet does not free most of its internal permanent data structures,\n"); fprintf(fp, "# in order to streamline job shutdown. An asterisk (*) following the size\n"); fprintf(fp, "# identifies objects known to correspond to these permanent allocations.\n"); fprintf(fp, "#\n"); fprintf(fp, "# Object size Location Allocated\n"); fprintf(fp, "# ==================================\n"); gasneti_malloc_dump_liveobjects(fp); } if (fp != stdout && fp != stderr) fclose(fp); } gasneti_mutex_unlock(&lock); } #endif /* extern versions of gasnet malloc fns for use in public headers */ extern void *_gasneti_extern_malloc(size_t sz GASNETI_CURLOCFARG) { return _gasneti_malloc(sz GASNETI_CURLOCPARG); } extern void *_gasneti_extern_realloc(void *ptr, size_t sz GASNETI_CURLOCFARG) { return _gasneti_realloc(ptr, sz GASNETI_CURLOCPARG); } extern void *_gasneti_extern_calloc(size_t N, size_t S GASNETI_CURLOCFARG) { return _gasneti_calloc(N,S GASNETI_CURLOCPARG); } extern void _gasneti_extern_free(void *ptr GASNETI_CURLOCFARG) { _gasneti_free(ptr GASNETI_CURLOCPARG); } extern void _gasneti_extern_leak(void *ptr GASNETI_CURLOCFARG) { _gasneti_leak(ptr GASNETI_CURLOCPARG); } extern char *_gasneti_extern_strdup(const char *s GASNETI_CURLOCFARG) { return _gasneti_strdup(s GASNETI_CURLOCPARG); } extern char *_gasneti_extern_strndup(const char *s, size_t n GASNETI_CURLOCFARG) { return _gasneti_strndup(s,n GASNETI_CURLOCPARG); } // append to a string with dynamic memory allocation // not high-performance, but concise char *gasneti_sappendf(char *s, const char *fmt, ...) { // compute length of thing to append va_list args; va_start(args, fmt); int add_len = vsnprintf(NULL, 0, fmt, args); va_end(args); // grow (or allocate) the string, including space for '\0' int old_len = s ? strlen(s) : 0; s = gasneti_realloc(s, old_len + add_len + 1); // append va_start(args, fmt); vsprintf((s+old_len), fmt, args); va_end(args); return s; } // case-insensitive string comparison // same semantics as the POSIX-1.2001 equivalent except for NULL arguments, // which these functions treat as indistinguishable from a pointer to '\0' int gasneti_strcasecmp(const char *s1, const char *s2) { static char zero = '\0'; if (!s1) s1 = &zero; if (!s2) s2 = &zero; size_t i = 0; while (s1[i] && s2[i]) { char a = tolower(s1[i]); char b = tolower(s2[i]); if (a != b) return ((a < b) ? -1 : 1); ++i; } if (!s1[i] && !s2[i]) return 0; // ended together (identical) else return (s2[i] ? -1 : 1); // shorter string is the lesser } int gasneti_strncasecmp(const char *s1, const char *s2, size_t n) { static char zero = '\0'; if (!s1) s1 = &zero; if (!s2) s2 = &zero; size_t i = 0; while ((i < n) && s1[i] && s2[i]) { char a = tolower(s1[i]); char b = tolower(s2[i]); if (a != b) return ((a < b) ? -1 : 1); ++i; } if (i == n) return 0; // first n chars were identical if (!s1[i] && !s2[i]) return 0; // ended together (identical) else return (s2[i] ? -1 : 1); // shorter string is the lesser } #if GASNET_DEBUGMALLOC extern void *(*gasnett_debug_malloc_fn)(size_t sz, const char *curloc); extern void *(*gasnett_debug_calloc_fn)(size_t N, size_t S, const char *curloc); extern void *(*gasnett_debug_realloc_fn)(void *ptr, size_t sz, const char *curloc); extern void (*gasnett_debug_free_fn)(void *ptr, const char *curloc); extern char *(*gasnett_debug_strdup_fn)(const char *ptr, const char *curloc); extern char *(*gasnett_debug_strndup_fn)(const char *ptr, size_t n, const char *curloc); void *(*gasnett_debug_malloc_fn)(size_t sz, const char *curloc) = &_gasneti_extern_malloc; void *(*gasnett_debug_calloc_fn)(size_t N, size_t S, const char *curloc) = &_gasneti_extern_calloc; void *(*gasnett_debug_realloc_fn)(void *ptr, size_t sz, const char *curloc) = &_gasneti_extern_realloc; void (*gasnett_debug_free_fn)(void *ptr, const char *curloc) = &_gasneti_extern_free; char *(*gasnett_debug_strdup_fn)(const char *s, const char *curloc) = &_gasneti_extern_strdup; char *(*gasnett_debug_strndup_fn)(const char *s, size_t sz, const char *curloc) = &_gasneti_extern_strndup; /* these only exist with debug malloc */ extern void (*gasnett_debug_memcheck_fn)(void *ptr, const char *curloc); extern void (*gasnett_debug_memcheck_one_fn)(const char *curloc); extern void (*gasnett_debug_memcheck_all_fn)(const char *curloc); extern void _gasneti_extern_memcheck(void *ptr, const char *curloc) { _gasneti_memcheck(ptr, curloc, 0); } void (*gasnett_debug_memcheck_fn)(void *ptr, const char *curloc) = &_gasneti_extern_memcheck; void (*gasnett_debug_memcheck_one_fn)(const char *curloc) = &_gasneti_memcheck_one; void (*gasnett_debug_memcheck_all_fn)(const char *curloc) = &_gasneti_memcheck_all; #endif /* don't put anything here - malloc stuff must come last */ gasnet-2025.8.0/gasnet_help.h0000664000175000017500000031422215142313673016070 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_help.h $ * Description: GASNet Header Helpers (Internal code, not for client use) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_HELP_H #define _GASNET_HELP_H typedef struct { uint64_t allocated_bytes; /* num bytes ever allocated */ uint64_t freed_bytes; /* num bytes ever freed */ uint64_t live_bytes; /* num bytes currently allocated */ uint64_t live_bytes_max; /* max num bytes live at any given time */ uint64_t allocated_objects; /* num objects ever allocated */ uint64_t freed_objects; /* num objects ever freed */ uint64_t live_objects; /* num objects currently allocated */ uint64_t live_objects_max; /* max num objects live at any given time */ uint64_t overhead_bytes; /* num bytes consumed by allocator overhead (lower bound) */ } gasneti_heapstats_t; #if GASNET_DEBUGMALLOC /* _curloc is passed to debug mallocator as "file:line", or the special constant "SRCPOS" to retrieve the info from gasnet_srclines To enable use of srcpos for a compilation unit, client should: #undef GASNETT_MALLOC_USE_SRCPOS #define GASNETT_MALLOC_USE_SRCPOS 1 */ #ifndef GASNETT_MALLOC_USE_SRCPOS #define GASNETT_MALLOC_USE_SRCPOS 0 /* off by default */ #endif #define GASNETI_CURLOCFARG , const char *_curloc #define GASNETI_CURLOCAARG , (GASNETT_MALLOC_USE_SRCPOS ? \ "SRCPOS" : \ __FILE__ ":" _STRINGIFY(__LINE__)) #define GASNETI_CURLOCPARG , _curloc extern size_t _gasneti_memcheck(void *_ptr, const char *_curloc, int _checktype); extern void _gasneti_memcheck_one(const char *_curloc); extern void _gasneti_memcheck_all(const char *_curloc); #define gasneti_memcheck(ptr) (gasneti_assert(ptr != NULL), \ (void)_gasneti_memcheck(ptr, __FILE__ ":" _STRINGIFY(__LINE__), 0)) #define gasneti_memcheck_one() _gasneti_memcheck_one(__FILE__ ":" _STRINGIFY(__LINE__)) #define gasneti_memcheck_all() _gasneti_memcheck_all(__FILE__ ":" _STRINGIFY(__LINE__)) extern int gasneti_getheapstats(gasneti_heapstats_t *_pstat); extern void gasneti_heapinfo_dump(const char *_filename, int _show_live_objects); #else #define GASNETI_CURLOCFARG #define GASNETI_CURLOCAARG #define GASNETI_CURLOCPARG #define gasneti_memcheck(ptr) ((void)0) #define gasneti_memcheck_one() ((void)0) #define gasneti_memcheck_all() ((void)0) #define gasneti_getheapstats(pstat) (memset(pstat, 0, sizeof(gasneti_heapstats_t)),1) #define gasneti_heapinfo_dump(f,s) ((void)0) #endif /* extern versions of gasnet malloc fns for use in public headers */ extern void *_gasneti_extern_malloc(size_t _sz GASNETI_CURLOCFARG) GASNETI_MALLOC; GASNETI_MALLOCP(_gasneti_extern_malloc) extern void *_gasneti_extern_realloc(void *_ptr, size_t _sz GASNETI_CURLOCFARG); extern void *_gasneti_extern_calloc(size_t _n, size_t _s GASNETI_CURLOCFARG) GASNETI_MALLOC; GASNETI_MALLOCP(_gasneti_extern_calloc) extern void _gasneti_extern_free(void *_ptr GASNETI_CURLOCFARG); extern void _gasneti_extern_leak(void *_ptr GASNETI_CURLOCFARG); extern char *_gasneti_extern_strdup(const char *_s GASNETI_CURLOCFARG) GASNETI_MALLOC; GASNETI_MALLOCP(_gasneti_extern_strdup) extern char *_gasneti_extern_strndup(const char *_s, size_t _n GASNETI_CURLOCFARG) GASNETI_MALLOC; GASNETI_MALLOCP(_gasneti_extern_strndup) #define gasneti_extern_malloc(sz) _gasneti_extern_malloc((sz) GASNETI_CURLOCAARG) #define gasneti_extern_realloc(ptr,sz) _gasneti_extern_realloc((ptr), (sz) GASNETI_CURLOCAARG) #define gasneti_extern_calloc(N,S) _gasneti_extern_calloc((N),(S) GASNETI_CURLOCAARG) #define gasneti_extern_free(ptr) _gasneti_extern_free((ptr) GASNETI_CURLOCAARG) #define gasneti_extern_leak(ptr) _gasneti_extern_leak((ptr) GASNETI_CURLOCAARG) #define gasneti_extern_strdup(s) _gasneti_extern_strdup((s) GASNETI_CURLOCAARG) #define gasneti_extern_strndup(s,n) _gasneti_extern_strndup((s),(n) GASNETI_CURLOCAARG) /* aligned malloc - allocated size bytes with given power-of-2 alignment may only be freed using gasneti_free_aligned */ #if HAVE_POSIX_MEMALIGN && !GASNET_DEBUGMALLOC // when debug mallocator is disabled, posix_memalign is friendlier // for use with heap analysis tools like valgrind #define GASNETI_USE_POSIX_MEMALIGN 1 #endif GASNETI_INLINE(_gasneti_malloc_aligned) GASNETI_MALLOC void * _gasneti_malloc_aligned(size_t _alignment, size_t _size GASNETI_CURLOCFARG) { gasneti_assert(GASNETI_POWEROFTWO(_alignment)); gasneti_assert(_alignment <= GASNET_PAGESIZE); #if GASNETI_USE_POSIX_MEMALIGN if_pf(_alignment < sizeof(void*)) _alignment = sizeof(void*); void *_result = NULL; // init to avoid -Wmaybe-uninitialized warnings int _return_code = posix_memalign(&_result, _alignment, _size); gasneti_assert_zeroret(_return_code); #else size_t _alloc_size = _size + sizeof(void *) + _alignment; void *_base = _gasneti_extern_malloc(_alloc_size GASNETI_CURLOCPARG); void **_result = (void **)GASNETI_ALIGNUP((uintptr_t)_base + sizeof(void *), _alignment); *(_result - 1) = _base; /* hidden base ptr for free() */ gasneti_assert_ptr((void *)(_result - 1) ,>=, _base); gasneti_assert_ptr(((uint8_t *)_result + _size) ,<=, ((uint8_t *)_base + _alloc_size)); #endif gasneti_assume(_result); gasneti_assert_ptr(_result ,==, (void **)GASNETI_ALIGNUP(_result, _alignment)); return (void *)_result; } GASNETI_MALLOCP(_gasneti_malloc_aligned) #define gasneti_malloc_aligned(align,sz) _gasneti_malloc_aligned((align), (sz) GASNETI_CURLOCAARG) GASNETI_INLINE(_gasneti_free_aligned) void _gasneti_free_aligned(void *_ptr GASNETI_CURLOCFARG) { gasneti_assert(_ptr); #if GASNETI_USE_POSIX_MEMALIGN free(_ptr); #else void *_base = *((void **)_ptr - 1); gasneti_assert(_base); _gasneti_extern_free(_base GASNETI_CURLOCPARG); #endif } #define gasneti_free_aligned(ptr) _gasneti_free_aligned((ptr) GASNETI_CURLOCAARG) GASNETI_INLINE(_gasneti_leak_aligned) void _gasneti_leak_aligned(void *_ptr GASNETI_CURLOCFARG) { gasneti_assert(_ptr); #if !GASNETI_USE_POSIX_MEMALIGN void *_base = *((void **)_ptr - 1); gasneti_assert(_base); _gasneti_extern_leak(_base GASNETI_CURLOCPARG); #endif } #define gasneti_leak_aligned(ptr) _gasneti_leak_aligned((ptr) GASNETI_CURLOCAARG) extern const char *gasnet_max_segsize_str; // client-overrideable max segment size extern uint64_t gasnet_max_segsize; // DEPRECATED: client-overrideable max segment size #if GASNET_DEBUG extern void gasneti_checkinit(void); extern void gasneti_checkattach(void); #define GASNETI_CHECKINIT() gasneti_checkinit() #define GASNETI_CHECKATTACH() gasneti_checkattach() #else #define GASNETI_CHECKINIT() ((void)0) #define GASNETI_CHECKATTACH() ((void)0) #endif extern gex_Rank_t gasneti_mynode; #define gex_System_QueryJobRank() (GASNETI_CHECKINIT(), (gex_Rank_t)gasneti_mynode) extern gex_Rank_t gasneti_nodes; #define gex_System_QueryJobSize() (GASNETI_CHECKINIT(), (gex_Rank_t)gasneti_nodes) /* ------------------------------------------------------------------------------------ */ extern int gasneti_VerboseErrors; #define gex_System_GetVerboseErrors() ((int)gasneti_VerboseErrors) GASNETI_INLINE(gex_System_SetVerboseErrors) void gex_System_SetVerboseErrors(int _enable) { gasneti_assert(_enable == 1 || _enable == 0); gasneti_VerboseErrors = _enable; } /* ------------------------------------------------------------------------------------ */ #if GASNETI_TM0_ALIGN // We can detect TM0 by its better alignment than other tm's GASNETI_INLINE(gasneti_is_tm0) int gasneti_is_tm0(gasneti_TM_t _i_tm) { gasneti_static_assert(GASNETI_POWEROFTWO(GASNETI_TM0_ALIGN)); gasneti_static_assert(GASNETI_TM0_ALIGN > 1); return (!((uintptr_t)(_i_tm) & (GASNETI_TM0_ALIGN-1))); } #else // Cannot use alignment to distinguish TM0 extern gasneti_TM_t gasneti_thing_that_goes_thunk_in_the_dark; #define gasneti_is_tm0(_i_tm) ((_i_tm) == gasneti_thing_that_goes_thunk_in_the_dark) #endif // "TM-pair" // // We have one external handle type `gex_TM_t`, but two corresponding internal // types: `gasneti_TM_t` and `gasneti_TM_Pair_t`. A `gasneti_TM_t` can be // either an actual pointer to a `struct gasneti_team_member_internal_s` (with // fields describing the TM) OR it can be just a 32-bit inline representation // of a TM-pair (with fields accessed via `gasneti_tm_pair_{loc,rem}_idx()`). // // Use of the query `gasneti_e_tm_is_pair()` reports whether a `gex_TM_t`, once // imported, will have the TM-pair representation. // Use of the query `gasneti_i_tm_is_pair()` reports whether a `gasneti_TM_t` // has the TM-pair representation. // // Code not needing to access any fields may pass `gex_TM_t` or `gasneti_TM_t` // values transparently, though the latter is preferred so that the debug check // for the "MAGIC" signature upon import occurs early in the call stack. Such // code does not require any explicit handling of TM-pairs. // // For code which does access fields, there are three approaches illustrated // by the following examples in which // + `e_tm` is a `gex_TM_t` // + `i_tm` is a `gasneti_TM_t` without certainty of contents // + `my_tm` is a `gasneti_TM_t` certain to point to a structure // + `my_pair` is a `gasneti_TM_Pair_t` certain to hold a 32-bit inline pair // // 1. "import excluding pair" - for code paths where TM-pair is prohibited: // my_tm = gasneti_import_tm_nonpair(e_tm); // // 2. "check then import" // if (gasneti_e_tm_is_pair(e_tm)) // my_pair = gasneti_import_tm_pair(e_tm); // else // my_tm = gasneti_import_tm(e_tm); // // 3. "import then check before use" // i_tm = gasneti_import_tm(e_tm) // [...] // if (gasneti_i_tm_is_pair(i_tm)) // my_pair = gasneti_i_tm_to_pair(i_tm); // else // my_tm = i_tm; // // The four type-conversion functions used in the examples above: // + gasneti_TM_t gasneti_import_tm(gex_TM_t); // Does not check if the argument is a TM-pair // + gasneti_TM_t gasneti_import_tm_nonpair(gex_TM_t); // Asserts that the argument is NOT a TM-pair // + gasneti_TM_Pair_t gasneti_import_tm_pair(gex_TM_t); // Asserts that the argument is a TM-pair // + gasneti_TM_Pair_t gasneti_i_tm_to_pair(gasneti_TM_t); // Asserts that the argument is a TM-pair // // -OR- // // At least the following internal functions operate an `e_tm` or `i_tm`, with // transparent support for both encodings and may be sufficient to keep much // code independent of TM-pairness: // + gasneti_[ei]_tm_rank_to_jobrank() // + gasneti_[ei]_tm_rank_to_ep_index() // + gasneti_[ei]_tm_rank_to_location() // + gasneti_[ei]_tm_jobrank_to_rank() // + gasneti_[ei]_tm_size() // Returns gex_System_QueryJobSize() for TM-pair, suitable for range checking a rank // Generalize/replace the following idioms which do not accept a TM-pair: // `gex_TM_QuerySize(e_tm)` // `gasneti_import_tm(e_tm)->_size` // `i_tm->_size` // + gasneti_[ei]_tm_to_i_ep() // Generalize/replace the following idioms which do not accept a TM-pair: // `gex_TM_QueryEP(e_tm)` // `gasneti_import_tm(e_tm)->_ep` // `i_tm->_ep` // + gasneti_[ei]_tm_to_ep_index() // More efficient replacement for `gasneti_[ei]_tm_to_i_ep()->_index`, // replacing multiple alternatives which do not accept a TM-pair // + gasneti_boundscheck() // + gasneti_formattm() // + gasneti_pshm_local_rank() // + gasneti_pshm_in_supernode() // + gasneti_pshm_addr2local() // + GASNETI_NBRHD_MAPPED() // + GASNETI_NBRHD_MAPPED_ADDR() // + GASNETI_NBRHD_MAPPED_ADDR_OR_NULL() // + gasneti_jobrank_if_mappable() // + gasnete_mapped_at() #if GASNET_DEBUG GASNETI_INLINE(gasneti_assertvalid_tm_pair) void gasneti_assertvalid_tm_pair(gasneti_TM_Pair_t _tm_pair) { // TODO: check that client index (currently always zero) is in range gasneti_assert_uint((_tm_pair & 0xff) ,==, 1); } #else #define gasneti_assertvalid_tm_pair(_tm_pair) ((void)0) #endif // Detect a TM generated by gex_TM_Pair GASNETI_INLINE(gasneti_i_tm_is_pair) int gasneti_i_tm_is_pair(gasneti_TM_t _i_tm) { gasneti_TM_Pair_t _tm_pair = (gasneti_TM_Pair_t) _i_tm; int _result = (_tm_pair & 1); if (_result) gasneti_assertvalid_tm_pair(_tm_pair); return _result; } #define gasneti_e_tm_is_pair(_e_tm) gasneti_i_tm_is_pair(gasneti_import_tm(_e_tm)) // Assertion-checking conversions from {gex,gasneti}_TM_t to gasneti_TM_Pair_t GASNETI_INLINE(gasneti_i_tm_to_pair) gasneti_TM_Pair_t gasneti_i_tm_to_pair(gasneti_TM_t _i_tm) { gasneti_TM_Pair_t _tm_pair = (gasneti_TM_Pair_t) _i_tm; gasneti_assertvalid_tm_pair(_tm_pair); return _tm_pair; } #define gasneti_e_tm_to_pair(_e_tm) gasneti_i_tm_to_pair(gasneti_import_tm(_e_tm)) // Extract EP indices from a known TM_Pair GASNETI_INLINE(gasneti_tm_pair_loc_idx) gex_EP_Index_t gasneti_tm_pair_loc_idx(gasneti_TM_Pair_t _tm_pair) { gasneti_assertvalid_tm_pair(_tm_pair); return (_tm_pair >> GASNETI_TM_PAIR_LOC_IDX_SHIFT) & GASNETI_TM_PAIR_IDX_MASK; } GASNETI_INLINE(gasneti_tm_pair_rem_idx) gex_EP_Index_t gasneti_tm_pair_rem_idx(gasneti_TM_Pair_t _tm_pair) { gasneti_assertvalid_tm_pair(_tm_pair); return (_tm_pair >> GASNETI_TM_PAIR_REM_IDX_SHIFT) & GASNETI_TM_PAIR_IDX_MASK; } // Given (tm,rank) return the jobrank or ep_location extern GASNETI_PURE gex_Rank_t gasneti_tm_fwd_rank(gasneti_TM_t _tm, gex_Rank_t _rank); GASNETI_PUREP(gasneti_tm_fwd_rank) extern GASNETI_PURE gex_EP_Location_t gasneti_tm_fwd_location(gasneti_TM_t _tm, gex_Rank_t _rank, gex_Flags_t _flags); GASNETI_PUREP(gasneti_tm_fwd_location) // Given (tm,jobrank) return the rank of jobrank in tm, or GEX_RANK_INVALID extern gex_Rank_t gasneti_tm_rev_rank(gasneti_TM_t _tm, gex_Rank_t _jobrank); // Helpers which deal correctly/transparently with TM-pair GASNETI_INLINE(gasneti_e_tm_size) gex_Rank_t gasneti_e_tm_size(gex_TM_t _e_tm) { gasneti_assert(_e_tm); return gasneti_e_tm_is_pair(_e_tm) ? gex_System_QueryJobSize() : gex_TM_QuerySize(_e_tm); } GASNETI_INLINE(gasneti_i_tm_size) gex_Rank_t gasneti_i_tm_size(gasneti_TM_t _i_tm) { gasneti_assert(_i_tm); return gasneti_i_tm_is_pair(_i_tm) ? gex_System_QueryJobSize() : _i_tm->_size; } GASNETI_INLINE(gasneti_i_tm_to_ep_index) gex_EP_Index_t gasneti_i_tm_to_ep_index(gasneti_TM_t _i_tm) { gasneti_assert(_i_tm); if (gasneti_is_tm0(_i_tm)) { return 0; // fast path } else if (gasneti_i_tm_is_pair(_i_tm)) { return gasneti_tm_pair_loc_idx(gasneti_i_tm_to_pair(_i_tm)); } else { return _i_tm->_ep->_index; } } #define gasneti_e_tm_to_ep_index(_e_tm) gasneti_i_tm_to_ep_index(gasneti_import_tm(_e_tm)) #if GASNET_DEBUG GASNETI_INLINE(gasneti_check_jobrank) void gasneti_check_jobrank(gex_Rank_t _jobrank) { gasneti_assert_uint(_jobrank ,<, gex_System_QueryJobSize()); } GASNETI_INLINE(gasneti_check_e_tm_rank) void gasneti_check_e_tm_rank(gex_TM_t _e_tm, gex_Rank_t _rank) { gasneti_assert(_e_tm); gasneti_assert_uint(_rank ,<, gasneti_e_tm_size(_e_tm)); } GASNETI_INLINE(gasneti_check_i_tm_rank) void gasneti_check_i_tm_rank(gasneti_TM_t _i_tm, gex_Rank_t _rank) { gasneti_assert(_i_tm); gasneti_assert_uint(_rank ,<, gasneti_i_tm_size(_i_tm)); } #else #define gasneti_check_jobrank(jobrank) ((void)0) #define gasneti_check_i_tm_rank(tm,rank) ((void)0) #define gasneti_check_e_tm_rank(tm,rank) ((void)0) #endif // TODO-EX: remove when a runtime branch on tm->_rank_map is necessary #define GASNETI_ALLOW_SPARSE_TEAMREP 0 GASNETI_INLINE(gasneti_i_tm_rank_to_jobrank) gex_Rank_t gasneti_i_tm_rank_to_jobrank(gasneti_TM_t _i_tm, gex_Rank_t _rank) { gasneti_check_i_tm_rank(_i_tm, _rank); if (gasneti_is_tm0(_i_tm) || gasneti_i_tm_is_pair(_i_tm)) return _rank; if (!GASNETI_ALLOW_SPARSE_TEAMREP || _i_tm->_rank_map) { gasneti_assert(_i_tm->_rank_map); return _i_tm->_rank_map[_rank]; } return gasneti_tm_fwd_rank(_i_tm, _rank); } #define gasneti_e_tm_rank_to_jobrank(e_tm,rank) \ gasneti_i_tm_rank_to_jobrank(gasneti_import_tm(e_tm),rank) GASNETI_INLINE(gasneti_i_tm_rank_to_ep_index) gex_EP_Index_t gasneti_i_tm_rank_to_ep_index(gasneti_TM_t _i_tm, gex_Rank_t _rank) { gasneti_check_i_tm_rank(_i_tm, _rank); gex_EP_Index_t _result; if (gasneti_is_tm0(_i_tm)) { _result = 0; } else if (gasneti_i_tm_is_pair(_i_tm)) { _result = gasneti_tm_pair_rem_idx(gasneti_i_tm_to_pair(_i_tm)); } else if (!GASNETI_ALLOW_SPARSE_TEAMREP || _i_tm->_rank_map) { // NULL _index_map indicates all members of TM are primordial EPs (idx==0) _result = _i_tm->_index_map ? _i_tm->_index_map[_rank] : 0; } else { gex_EP_Location_t _loc = gasneti_tm_fwd_location(_i_tm, _rank, 0); _result = _loc.gex_ep_index; } gasneti_assert(_result < GASNET_MAXEPS); return _result; } #define gasneti_e_tm_rank_to_ep_index(e_tm,rank) \ gasneti_i_tm_rank_to_ep_index(gasneti_import_tm(e_tm),rank) GASNETI_INLINE(gasneti_i_tm_rank_to_location) gex_EP_Location_t gasneti_i_tm_rank_to_location(gasneti_TM_t _i_tm, gex_Rank_t _rank, gex_Flags_t _flags) { gasneti_check_i_tm_rank(_i_tm, _rank); gex_EP_Location_t _result; #if (GASNET_MAXEPS == 1) _result.gex_ep_index = 0; #endif if (gasneti_is_tm0(_i_tm)) { _result.gex_rank = _rank; #if (GASNET_MAXEPS > 1) _result.gex_ep_index = 0; #endif } else if (gasneti_i_tm_is_pair(_i_tm)) { _result.gex_rank = _rank; #if (GASNET_MAXEPS > 1) _result.gex_ep_index = gasneti_tm_pair_rem_idx(gasneti_i_tm_to_pair(_i_tm)); #endif } else if (!GASNETI_ALLOW_SPARSE_TEAMREP || _i_tm->_rank_map) { gasneti_assert(_i_tm->_rank_map); _result.gex_rank = _i_tm->_rank_map[_rank]; #if (GASNET_MAXEPS > 1) // NULL _index_map indicates all members of TM are primordial EPs (idx==0) _result.gex_ep_index = _i_tm->_index_map ? _i_tm->_index_map[_rank] : 0; #endif } else { _result = gasneti_tm_fwd_location(_i_tm, _rank, _flags); } return _result; } #define gasneti_e_tm_rank_to_location(e_tm,rank,flags) \ gasneti_i_tm_rank_to_location(gasneti_import_tm(e_tm),rank,flags) GASNETI_INLINE(gasneti_i_tm_jobrank_to_rank) gex_Rank_t gasneti_i_tm_jobrank_to_rank(gasneti_TM_t _i_tm, gex_Rank_t _jobrank) { gasneti_assert(_i_tm); gasneti_assert_uint(_jobrank ,<, gex_System_QueryJobSize()); if (gasneti_is_tm0(_i_tm) || gasneti_i_tm_is_pair(_i_tm)) return _jobrank; return gasneti_tm_rev_rank(_i_tm, _jobrank); } #define gasneti_e_tm_jobrank_to_rank(e_tm,jobrank) \ gasneti_i_tm_jobrank_to_rank(gasneti_import_tm(e_tm),jobrank) extern gasnet_seginfo_t *gasneti_seginfo; extern gasnet_seginfo_t *gasneti_seginfo_aux; extern gasnet_seginfo_t *gasneti_seginfo_tbl[GASNET_MAXEPS]; extern const gasnet_seginfo_t gasneti_null_segment; // TODO: work towards dropping non-scalable seginfo tables GASNETI_INLINE(gasneti_client_seginfo) const gasnet_seginfo_t *gasneti_client_seginfo(gex_TM_t _e_tm, gex_Rank_t _rank) { gex_EP_Location_t _loc = gasneti_e_tm_rank_to_location(_e_tm, _rank, 0); gex_Rank_t _jobrank = _loc.gex_rank; gex_EP_Index_t _idx = _loc.gex_ep_index; gasnet_seginfo_t *_si_array = gasneti_seginfo_tbl[_idx]; if_pf (!_si_array) return &gasneti_null_segment; return _si_array + _jobrank; } GASNETI_INLINE(gasneti_aux_seginfo) const gasnet_seginfo_t *gasneti_aux_seginfo(gex_Rank_t _jobrank) { return gasneti_seginfo_aux + _jobrank; } GASNETI_INLINE(_gasneti_in_seginfo_t) int _gasneti_in_seginfo_t(const void *_ptr, size_t _nbytes, const gasnet_seginfo_t *_seginfo) { gasneti_assert(_nbytes); // precondition to avoid "fence post" error at top of segment uintptr_t _uptr = (uintptr_t)_ptr; uintptr_t _segbase = (uintptr_t)_seginfo->addr; return (_uptr >= _segbase && (_uptr + _nbytes) <= (_segbase + _seginfo->size)); } GASNETI_INLINE(_gasneti_in_segment_t) int _gasneti_in_segment_t(const void *_ptr, size_t _nbytes, const gex_Segment_t _segment) { gasneti_assert(_nbytes); // precondition to avoid "fence post" error at top of segment uintptr_t _uptr = (uintptr_t)_ptr; gasneti_Segment_t _i_seg = gasneti_import_segment_valid(_segment); return (_uptr >= (uintptr_t)(_i_seg->_addr) && (_uptr + _nbytes) <= (uintptr_t)_i_seg->_ub); } #if GASNET_SEGMENT_EVERYTHING // Do not remove calls to gasneti_inseg_helper() or reduce it to a macro. // The function call ensures ptr and nbytes evaluated exactly once for possible side-effects. GASNETI_INLINE(gasneti_inseg_helper) void gasneti_inseg_helper(const void *_ptr, size_t _nbytes) { gasneti_assert(_nbytes); gasneti_assert(_ptr); } #define gasneti_in_clientsegment(e_tm,rank,ptr,nbytes) \ (gasneti_inseg_helper(ptr,nbytes),gasneti_check_e_tm_rank(e_tm,rank), 1) #define gasneti_in_auxsegment(jobrank,ptr,nbytes) \ (gasneti_inseg_helper(ptr,nbytes),gasneti_check_jobrank(jobrank), 1) #define gasneti_in_fullsegment(e_tm,rank,ptr,nbytes) \ (gasneti_inseg_helper(ptr,nbytes), gasneti_check_e_tm_rank(e_tm,rank), 1) #else #define gasneti_in_clientsegment(e_tm,rank,ptr,nbytes) \ _gasneti_in_seginfo_t(ptr,nbytes,gasneti_client_seginfo(e_tm,rank)) #define gasneti_in_auxsegment(jobrank,ptr,nbytes) \ _gasneti_in_seginfo_t(ptr,nbytes,gasneti_aux_seginfo(jobrank)) GASNETI_INLINE(gasneti_in_fullsegment) int gasneti_in_fullsegment(gex_TM_t _e_tm, gex_Rank_t _rank, const void *_ptr, size_t _nbytes) { return gasneti_in_clientsegment(_e_tm, _rank, _ptr, _nbytes) || gasneti_in_auxsegment(gasneti_e_tm_rank_to_jobrank(_e_tm, _rank), _ptr, _nbytes); } #endif // Local-only in-segment checks, taking a gasneti_EP_t to name the local endpoint #if GASNET_SEGMENT_EVERYTHING #define gasneti_in_local_auxsegment(ep,ptr,nbytes) 1 #define gasneti_in_local_clientsegment(ep,ptr,nbytes) 1 #define gasneti_in_local_fullsegment(ep,ptr,nbytes) 1 #else GASNETI_INLINE(gasneti_in_local_auxsegment) int gasneti_in_local_auxsegment(gasneti_EP_t _ep, void *_ptr, size_t _nbytes) { // TODO-EX: needs update for multi-{EP,Segment} return _gasneti_in_seginfo_t(_ptr, _nbytes, &gasneti_seginfo_aux[gasneti_mynode]); } GASNETI_INLINE(gasneti_in_local_clientsegment) int gasneti_in_local_clientsegment(gasneti_EP_t _ep, void *_ptr, size_t _nbytes) { gex_Segment_t _segment = gasneti_export_segment(_ep->_segment); return _segment && _gasneti_in_segment_t(_ptr, _nbytes, _segment); } GASNETI_INLINE(gasneti_in_local_fullsegment) int gasneti_in_local_fullsegment(gasneti_EP_t _ep, void *_ptr, size_t _nbytes) { return gasneti_in_local_clientsegment(_ep, _ptr, _nbytes) || gasneti_in_local_auxsegment(_ep, _ptr, _nbytes); } #endif #ifdef _INCLUDED_GASNET_INTERNAL_H /* default for GASNet implementation is to check against union of client and aux segments */ #define gasneti_in_segment gasneti_in_fullsegment #define gasneti_in_local_segment gasneti_in_local_fullsegment #else /* default for client is to check against just the client seg */ #define gasneti_in_segment gasneti_in_clientsegment #define gasneti_in_local_segment gasneti_in_local_clientsegment #endif #define _gasneti_boundscheck(e_tm,rank,ptr,nbytes,segtest) do { \ gex_TM_t _gex_bc_tm = (e_tm); \ gasneti_assert(_gex_bc_tm); \ gex_Rank_t _gex_bc_rank = (rank); \ gex_Rank_t _gex_bc_size = gasneti_e_tm_size(_gex_bc_tm); \ const void *_gex_bc_ptr = (const void *)(ptr); \ size_t _gex_bc_nbytes = (size_t)(nbytes); \ gasneti_assert(_gex_bc_nbytes); /* avoids "fence post" error */ \ if_pf (_gex_bc_rank >= _gex_bc_size) \ gasneti_fatalerror("Rank out of range (%lu >= %lu)", \ (unsigned long)_gex_bc_rank, (unsigned long)(_gex_bc_size)); \ if_pf (_gex_bc_ptr == NULL || \ !segtest(_gex_bc_tm,_gex_bc_rank,_gex_bc_ptr,_gex_bc_nbytes)) { \ const gasnet_seginfo_t *_gex_bc_client_seg = \ gasneti_client_seginfo(_gex_bc_tm,_gex_bc_rank); \ gex_Rank_t _gex_bc_jobrank = gasneti_e_tm_rank_to_jobrank(_gex_bc_tm, _gex_bc_rank); \ const gasnet_seginfo_t *_gex_bc_aux_seg = \ gasneti_aux_seginfo(_gex_bc_jobrank); \ gasneti_fatalerror("Remote address out of range (" GASNETI_TMRANKFMT \ " ptr=" GASNETI_LADDRFMT" nbytes=%" PRIuPTR ")" \ "\n clientsegment=(" GASNETI_LADDRFMT"..." GASNETI_LADDRFMT")" \ "\n auxsegment=(" GASNETI_LADDRFMT"..." GASNETI_LADDRFMT")", \ GASNETI_TMRANKSTR(_gex_bc_tm,_gex_bc_rank), \ GASNETI_LADDRSTR(_gex_bc_ptr), \ (uintptr_t)_gex_bc_nbytes, \ GASNETI_LADDRSTR(_gex_bc_client_seg->addr), \ GASNETI_LADDRSTR((uintptr_t)_gex_bc_client_seg->addr + \ _gex_bc_client_seg->size), \ GASNETI_LADDRSTR(_gex_bc_aux_seg->addr), \ GASNETI_LADDRSTR((uintptr_t)_gex_bc_aux_seg->addr + \ _gex_bc_aux_seg->size) \ ); \ } \ } while(0) // gasneti_boundscheck() #if GASNET_NDEBUG #define gasneti_boundscheck(e_tm,rank,ptr,nbytes) ((void)0) #else #define gasneti_boundscheck(e_tm,rank,ptr,nbytes) \ _gasneti_boundscheck(e_tm,rank,ptr,nbytes,gasneti_in_segment) #endif /* make a GASNet core API call - if it fails, print error message and abort */ #ifndef GASNETI_SAFE #define GASNETI_SAFE(fncall) do { \ int _retcode = (fncall); \ if_pf (_retcode != (int)GASNET_OK) { \ gasneti_fatalerror("\nGASNet encountered an error: %s(%i)\n" \ " while calling: %s", \ gasnet_ErrorName(_retcode), _retcode, #fncall); \ } \ } while (0) #endif /* ------------------------------------------------------------------------------------ */ /* tools for dealing with gex_Event_t* pre-defined values */ // TODO-EX: move to gasnet_event_internal.h #ifndef _GEX_EVENT_T GASNETI_INLINE(gasneti_leaf_is_pointer) GASNETI_PURE int gasneti_leaf_is_pointer(const gex_Event_t *_opt_val) { gasneti_assert(_opt_val != NULL); return ((uintptr_t)(_opt_val) >= (uintptr_t)4); } GASNETI_PUREP(gasneti_leaf_is_pointer) GASNETI_INLINE(gasneti_leaf_finish) void gasneti_leaf_finish(gex_Event_t *_opt_val) { if (gasneti_leaf_is_pointer(_opt_val)) *_opt_val = GEX_EVENT_INVALID; } #if (PLATFORM_COMPILER_INTEL && PLATFORM_COMPILER_VERSION_LT(19,0,20180800)) // Some Intel C prior to 2019.0.117 (builddate 20180804) issue a buggy warning // about side effects in an __assume(), and these versions predate Intel's // support for __builtin_assume, which avoids the warning. #define gasneti_assume_leaf_is_pointer(lc_opt) do { \ GASNETI_PRAGMA(warning push); \ GASNETI_PRAGMA(warning disable 2261); \ gasneti_assume(gasneti_leaf_is_pointer(lc_opt)); \ GASNETI_PRAGMA(warning pop); \ } while (0) #else #define gasneti_assume_leaf_is_pointer(lc_opt) \ gasneti_assume(gasneti_leaf_is_pointer(lc_opt)) #endif #endif // _GEX_EVENT_T /* ------------------------------------------------------------------------------------ */ /* semi-portable spinlocks using gasneti_atomic_t This useful primitive is not available on all platforms and it therefore reserved for internal use only. On platforms where implemented, the following are roughly equivalent to the corresponding pthread_mutex_* calls: GASNETI_SPINLOCK_INITIALIZER gasneti_spinlock_{init,destroy,lock,unlock,trylock} The functions return 0 on success to match the corresponding pthread_mutex functions. There is no gasneti_spinlock_t, these functions operate on gasneti_atomic_t. Unlike the pthread_mutex, the use of spinlocks have no fairness guarantees. For instance, it would be perfectly legal for a race to always grant the lock to the CPU which "owns" the associated memory. Therefore, spinlocks must be used with care. Also unlike pthread_mutex, it is safe to unlock one from signal context. Though trying to acquire a spinlock in signal context is legal, it is dangerous. Like the pthread_mutex, these operations perform an RMB() when acquiring the lock and a WMB() when releasing it. So, no additional memory barriers are required when using these locks to protect one's data structures. GASNETI_HAVE_SPINLOCK will be defined to 1 on platforms supporting this primitive. */ #if 0 /* TODO Some platforms may have cheaper implementations than atomic-CAS. */ /* eg. some platforms (SPARC?) can support spinlock using test-and-set */ #elif defined(GASNETI_ATOMICOPS_NOT_SIGNALSAFE) /* We don't implement this case due to lack of signal safety */ #elif defined(GASNETI_HAVE_ATOMIC_CAS) #if GASNET_DEBUG #define GASNETI_SPINLOCK_LOCKED 0xa5a5 #define GASNETI_SPINLOCK_UNLOCKED 0xaa55 #define GASNETI_SPINLOCK_DESTROYED 0xDEAD GASNETI_INLINE(gasneti_spinlock_is_valid) int gasneti_spinlock_is_valid(gasneti_atomic_t *_plock) { uint32_t _tmp = gasneti_atomic_read(_plock, GASNETI_ATOMIC_RMB_PRE); if_pf (_tmp == GASNETI_SPINLOCK_DESTROYED) gasneti_fatalerror("Detected use of destroyed spinlock"); if_pf (!((_tmp == GASNETI_SPINLOCK_LOCKED) || (_tmp == GASNETI_SPINLOCK_UNLOCKED))) gasneti_fatalerror("Detected use of uninitialized or corrupted spinlock"); return 1; } GASNETI_INLINE(gasneti_spinlock_is_locked) int gasneti_spinlock_is_locked(gasneti_atomic_t *_plock) { uint32_t _tmp = gasneti_atomic_read(_plock, GASNETI_ATOMIC_RMB_PRE); return (_tmp == GASNETI_SPINLOCK_LOCKED); } #else #define GASNETI_SPINLOCK_LOCKED 1 #define GASNETI_SPINLOCK_UNLOCKED 0 #define gasneti_spinlock_is_valid(plock) 1 #endif #define GASNETI_SPINLOCK_INITIALIZER gasneti_atomic_init(GASNETI_SPINLOCK_UNLOCKED) #define gasneti_spinlock_init(plock) \ gasneti_atomic_set((plock), GASNETI_SPINLOCK_UNLOCKED, GASNETI_ATOMIC_WMB_POST) #define gasneti_spinlock_destroy(plock) \ gasneti_assert(gasneti_atomic_compare_and_swap(plock, GASNETI_SPINLOCK_UNLOCKED, GASNETI_SPINLOCK_DESTROYED, GASNETI_ATOMIC_WMB_POST)) #define gasneti_spinlock_lock(plock) do { \ gasneti_waituntil( \ !gasneti_spinlock_is_valid(plock) || \ gasneti_atomic_compare_and_swap(plock, \ GASNETI_SPINLOCK_UNLOCKED, GASNETI_SPINLOCK_LOCKED, 0) \ ); /* Acquire: the rmb() is in the gasneti_waituntil() */ \ gasneti_assert(gasneti_spinlock_is_locked(plock)); \ } while (0) GASNETI_INLINE(gasneti_spinlock_unlock) int gasneti_spinlock_unlock(gasneti_atomic_t *_plock) { #if GASNET_DEBUG /* Using CAS for release is more costly, but adds validation */ gasneti_assert(gasneti_atomic_compare_and_swap(_plock, GASNETI_SPINLOCK_LOCKED, GASNETI_SPINLOCK_UNLOCKED, GASNETI_ATOMIC_REL)); #else gasneti_atomic_set(_plock, GASNETI_SPINLOCK_UNLOCKED, GASNETI_ATOMIC_REL); #endif return 0; } /* return 0/EBUSY on success/failure to match pthreads */ GASNETI_INLINE(gasneti_spinlock_trylock) GASNETI_WARN_UNUSED_RESULT int gasneti_spinlock_trylock(gasneti_atomic_t *_plock) { gasneti_assert(gasneti_spinlock_is_valid(_plock)); if ((GASNETI_SPINLOCK_UNLOCKED == gasneti_atomic_read(_plock, 0)) && gasneti_atomic_compare_and_swap(_plock, GASNETI_SPINLOCK_UNLOCKED, GASNETI_SPINLOCK_LOCKED, GASNETI_ATOMIC_ACQ_IF_TRUE)) { gasneti_assert(gasneti_spinlock_is_locked(_plock)); return 0; } else { return EBUSY; } } #define GASNETI_HAVE_SPINLOCK 1 #else /* Here we use a binary semaphore */ #define GASNETI_SPINLOCK_UNLOCKED 1 #define GASNETI_SPINLOCK_DESTROYED 2 #if GASNET_DEBUG GASNETI_INLINE(gasneti_spinlock_is_valid) int gasneti_spinlock_is_valid(gasneti_atomic_t *_plock) { uint32_t _tmp = gasneti_atomic_read(_plock, GASNETI_ATOMIC_RMB_PRE); if_pf (_tmp == GASNETI_SPINLOCK_DESTROYED) gasneti_fatalerror("Detected use of destroyed spinlock"); return 1; } GASNETI_INLINE(gasneti_spinlock_is_locked) int gasneti_spinlock_is_locked(gasneti_atomic_t *_plock) { gasneti_atomic_val_t _tmp = gasneti_atomic_read(_plock, GASNETI_ATOMIC_RMB_PRE); return (_tmp != GASNETI_SPINLOCK_UNLOCKED); } #else #define gasneti_spinlock_is_valid(plock) 1 #endif #define GASNETI_SPINLOCK_INITIALIZER gasneti_atomic_init(GASNETI_SPINLOCK_UNLOCKED) #define gasneti_spinlock_init(plock) \ gasneti_atomic_set((plock), GASNETI_SPINLOCK_UNLOCKED, GASNETI_ATOMIC_WMB_POST) #define gasneti_spinlock_destroy(plock) do { \ gasneti_assert(!gasneti_spinlock_is_locked(plock)); \ gasneti_atomic_set((plock), GASNETI_SPINLOCK_DESTROYED, GASNETI_ATOMIC_WMB_POST); \ } while (0) GASNETI_INLINE(_gasneti_spinlock_try) GASNETI_WARN_UNUSED_RESULT int _gasneti_spinlock_try(gasneti_atomic_t *_plock) { gasneti_assert(gasneti_spinlock_is_valid(_plock)); return (gasneti_atomic_read(_plock, 0) == GASNETI_SPINLOCK_UNLOCKED) && gasneti_atomic_decrement_and_test(_plock, GASNETI_ATOMIC_ACQ_IF_TRUE); } /* Ick: forward reference to GASNETI_WAITHOOK only works because this is a macro */ #define gasneti_spinlock_lock(plock) do { \ while (!_gasneti_spinlock_try(plock)) { \ GASNETI_WAITHOOK(); \ } \ } while (0) GASNETI_INLINE(gasneti_spinlock_unlock) int gasneti_spinlock_unlock(gasneti_atomic_t *_plock) { gasneti_assert(gasneti_spinlock_is_locked(_plock)); gasneti_atomic_set(_plock, GASNETI_SPINLOCK_UNLOCKED, GASNETI_ATOMIC_REL); return 0; } /* return 0/EBUSY on success/failure to match pthreads */ GASNETI_INLINE(gasneti_spinlock_trylock) GASNETI_WARN_UNUSED_RESULT int gasneti_spinlock_trylock(gasneti_atomic_t *_plock) { return _gasneti_spinlock_try(_plock) ? 0 : EBUSY; } #define GASNETI_HAVE_SPINLOCK 1 #endif /* ------------------------------------------------------------------------------------ */ /* public threadinfo support */ #if GASNETI_CLIENT_THREADS #if defined GASNETI_THREADINFO_OPT_CONFIGURE /* take user-specified value, if any*/ #undef GASNETI_THREADINFO_OPT #define GASNETI_THREADINFO_OPT GASNETI_THREADINFO_OPT_CONFIGURE #elif defined GASNETI_THREADINFO_OPT /* keep conduit-specified value */ #elif defined GASNETI_HAVE_TLS_SUPPORT /* Default to OFF on some common ABIs with good TLS support */ #if (PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_MIC) && \ (PLATFORM_OS_DARWIN || PLATFORM_OS_SOLARIS || PLATFORM_OS_LINUX) #define GASNETI_THREADINFO_OPT 0 #elif PLATFORM_ARCH_POWERPC && \ PLATFORM_OS_LINUX #define GASNETI_THREADINFO_OPT 0 #elif PLATFORM_ARCH_AARCH64 && \ (PLATFORM_OS_LINUX || PLATFORM_OS_DARWIN) #define GASNETI_THREADINFO_OPT 0 #endif #endif #ifndef GASNETI_THREADINFO_OPT /* Default to ON if not set anywhere above */ #define GASNETI_THREADINFO_OPT 1 #endif #ifndef GASNETI_LAZY_BEGINFUNCTION #define GASNETI_LAZY_BEGINFUNCTION 1 #endif #endif #if GASNETI_THREADINFO_OPT /* Here we use a clever trick - GASNET_GET_THREADINFO() uses the sizeof(_gasneti_threadinfo_available) to determine whether gasneti_threadinfo_cache was bound a value posted by GASNET_POST_THREADINFO() of if it bound to the globally declared dummy variables. Even a very stupid C optimizer should constant-fold away the unused calls to gasneti_get_threadinfo() and discard the unused variables We need 2 separate variables to ensure correct name-binding semantics for GASNET_POST_THREADINFO(GASNET_GET_THREADINFO()) */ #if PLATFORM_COMPILER_PGI_CXX // Add a redundant value use to avoid a 550 set-but-not-used warning // Not needed with NVHPC-branded releases #define _GASNETI_THREAD_POSTED (sizeof(_gasneti_threadinfo_available) > 1 \ && !_gasneti_threadinfo_available) #else #define _GASNETI_THREAD_POSTED (sizeof(_gasneti_threadinfo_available) > 1) #endif static gasnet_threadinfo_t _gasneti_threadinfo_cache = 0; static uint8_t _gasneti_threadinfo_available = sizeof(_gasneti_threadinfo_cache) + sizeof(_gasneti_threadinfo_available); /* silly little trick to prevent unused variable warning on gcc -Wall */ // tmp variable below solves scoping problems on cache for expressions like: // GASNET_POST_THREADINFO(GASNET_GET_THREADINFO()) // where the cache from an enclosing scope is consulted by that GET #define GASNET_POST_THREADINFO(info) \ gasnet_threadinfo_t const _gasneti_threadinfo_tmp = (info); \ gasnet_threadinfo_t _gasneti_threadinfo_cache = _gasneti_threadinfo_tmp; \ uint32_t _gasneti_threadinfo_available = 0 /* if you get an unused variable warning on _gasneti_threadinfo_available, it means you POST'ed in a function which made no GASNet calls that needed it So, PLEASE don't add __unused__ annotations here. */ #if GASNETI_LAZY_BEGINFUNCTION // bug 3498: Ensure a sequence point after the assignment to _gasneti_threadinfo_cache GASNETI_INLINE(gasneti_lazy_get_threadinfo) GASNETI_WARN_UNUSED_RESULT gasnet_threadinfo_t gasneti_lazy_get_threadinfo(gasnet_threadinfo_t * const _p_ti, gasnet_threadinfo_t _ti_val) { return (*_p_ti = _ti_val); } // memoized implementation of GET POSTED, where BEGIN_FUNCTION delays lookup to first use #define _GASNETI_GET_THREADINFO_POSTED() \ ( GASNETT_PREDICT_TRUE(_gasneti_threadinfo_cache) ? _gasneti_threadinfo_cache : \ gasneti_lazy_get_threadinfo(&_gasneti_threadinfo_cache,(gasnet_threadinfo_t)_gasneti_mythread_slow()) \ ) #else // straightforward implementation of GET POSTED #define _GASNETI_GET_THREADINFO_POSTED() ( _gasneti_threadinfo_cache ) #endif // GASNET_GET_THREADINFO: the main cached-lookup workhorse // note both the branches textually below are always statically resolved #define GASNET_GET_THREADINFO() \ ( _GASNETI_THREAD_POSTED ? /* have POST or BEGIN_FUNCTION ? */ \ _GASNETI_GET_THREADINFO_POSTED() /* use it */ : \ ( _GASNETI_THREAD_FARG_AVAILABLE ? /* in FARG context? use. */ \ (gasnet_threadinfo_t)(uintptr_t)_GASNETI_THREAD_FARG_NAME : \ (gasnet_threadinfo_t)_gasneti_mythread_slow() /* lookup */ ) \ ) /* the gasnet_threadinfo_t pointer points to a thread data-structure owned by the extended API, whose first element is a pointer reserved for use by the core API (initialized to NULL) */ #if GASNETI_LAZY_BEGINFUNCTION /* postpone thread discovery to first use */ #define GASNET_BEGIN_FUNCTION() GASNET_POST_THREADINFO(0) #else #define GASNET_BEGIN_FUNCTION() GASNET_POST_THREADINFO(GASNET_GET_THREADINFO()) #endif #else #if GASNET_DEBUG #define GASNET_POST_THREADINFO(info) \ static void *_gasneti_threadinfo_dummy = /* diagnose duplicate POST in a scope */ \ (void *)&_gasneti_threadinfo_dummy; #else #define GASNET_POST_THREADINFO(info) ((void)0) #endif #define GASNET_GET_THREADINFO() (NULL) #define GASNET_BEGIN_FUNCTION() GASNET_POST_THREADINFO(GASNET_GET_THREADINFO()) #endif /* ------------------------------------------------------------------------------------ */ /* thread-id optimization support */ #if GASNETI_THREADINFO_OPT #if GASNETI_RESTRICT_MAY_QUALIFY_TYPEDEFS #define _GASNETI_THREAD_FARG_RTYPE gasnet_threadinfo_t #else #define _GASNETI_THREAD_FARG_RTYPE void * #endif #define _GASNETI_THREAD_FARG_TYPE _GASNETI_THREAD_FARG_RTYPE const GASNETI_RESTRICT #define _GASNETI_THREAD_FARG_NAME _gasneti_threadinfo_farg static uint8_t _GASNETI_THREAD_FARG_NAME = sizeof(_GASNETI_THREAD_FARG_NAME); #define _GASNETI_THREAD_FARG_AVAILABLE (sizeof(_GASNETI_THREAD_FARG_NAME) > 1) // ----------------------------------------------------------------------------------------- // *** Propagating info into GASNETI_THREAD_FARG function context *** // GASNETI_THREAD_FARG(_ALONE): use to declare the threadinfo hidden arg as part of a function declaration #define GASNETI_THREAD_FARG , GASNETI_THREAD_FARG_ALONE #define GASNETI_THREAD_FARG_ALONE _GASNETI_THREAD_FARG_TYPE _GASNETI_THREAD_FARG_NAME // GASNETI_THREAD_GET(_ALONE): retrieve the threadinfo (when GASNETI_THREADINFO_OPT) from one of: // a prior GASNET_POST_THREADINFO, an FARG to the enclosing function, or dynamic lookup // and pass as the hidden argument to a function declared using GASNETI_THREAD_FARG(_ALONE) #define GASNETI_THREAD_GET , GASNETI_THREAD_GET_ALONE #define GASNETI_THREAD_GET_ALONE GASNET_GET_THREADINFO() // ----------------------------------------------------------------------------------------- // *** Inside FARG/POST'd context *** // // The macros in this section should ONLY be used by code inside an FARG/POST'd context, ie: // 1. inside functions declared using GASNETI_THREAD_FARG*. // 2. within the lexical scope of a GASNET_BEGIN_FUNCTION() or GASNET_POST_THREADINFO() // Otherwise, they generate a compiler diagnostic in GASNETI_THREADINFO_OPT mode. // the error looks something like: "error: size of array is negative" // This is helpful in contexts where we wish to statically ensure lack of dynamic lookup. // GASNETI_THREAD_PASS(_ALONE): propagate the threadinfo to a callee declared with GASNETI_THREAD_FARG* // this only differs from GASNETI_THREAD_GET* in that it statically requires FARG/POST'd context (and no lookup) #define GASNETI_THREAD_PASS , GASNETI_THREAD_PASS_ALONE #define GASNETI_THREAD_PASS_ALONE ( gasneti_static_assert(_GASNETI_THREAD_FARG_AVAILABLE||_GASNETI_THREAD_POSTED), \ ( _GASNETI_THREAD_POSTED ? \ (_GASNETI_THREAD_FARG_RTYPE)_GASNETI_GET_THREADINFO_POSTED() : \ (_GASNETI_THREAD_FARG_RTYPE)(uintptr_t)_GASNETI_THREAD_FARG_NAME ) ) // GASNETI_MYTHREAD: retrieve the value of the threadinfo as a (gasneti_threaddata_t *), // suitable for access to threaddata fields from internal code #define GASNETI_MYTHREAD ( gasneti_static_assert(_GASNETI_THREAD_FARG_AVAILABLE||_GASNETI_THREAD_POSTED), \ (_GASNETI_THREAD_POSTED ? \ (struct _gasneti_threaddata_t *)_GASNETI_GET_THREADINFO_POSTED() : \ (struct _gasneti_threaddata_t *)(uintptr_t)_GASNETI_THREAD_FARG_NAME ) ) // ----------------------------------------------------------------------------------------- // *** Declaring GASNETI_THREAD_FARG context : NO LONGER SUPPORTED *** // Former macros: // GASNETI_THREAD_LOOKUP has been superceded by GASNET_BEGIN_FUNCTION // GASNETI_THREAD_POST() has been superceded by GASNET_POST_THREADINFO() // GASNETI_THREAD_GET* now automatically pulls from these sources or FARG before lookup. // ----------------------------------------------------------------------------------------- // *** Other *** // GASNETI_MYTHREAD_GET_OR_LOOKUP: force retrieve my (gasneti_threaddata_t *) from one of: // a prior GASNET_POST_THREADINFO, an FARG to the enclosing function, or dynamic lookup // This is essentially GASNETI_MYTHREAD without requiring FARG/POST'd context (allows lookup) // Only valid known use is macros that expand threaddata field access directly into an // "unknown" context, such as in client code or certain cases of internal code with callers // in multiple conduits and/or subsystems. // This is NOT suitable for internal code in which the macro definition and its callers fall // within a single conduit or subsystem. Such cases should instead establish FARG/POST'd // context and use GASNETI_MYTHREAD. #define GASNETI_MYTHREAD_GET_OR_LOOKUP ((struct _gasneti_threaddata_t *)GASNET_GET_THREADINFO()) #else #define GASNETI_THREAD_FARG #define GASNETI_THREAD_FARG_ALONE void #define GASNETI_THREAD_GET #define GASNETI_THREAD_GET_ALONE #define GASNETI_THREAD_PASS #define GASNETI_THREAD_PASS_ALONE #define GASNETI_MYTHREAD (_gasneti_mythread_slow()) #define GASNETI_MYTHREAD_GET_OR_LOOKUP GASNETI_MYTHREAD #endif // Misc thread-id related goop // GASNETI_THREAD_SWALLOW: Utility to discard an FARG passed to a 0-arg function-like macro // TODO-EX: move and rename this essentially unrelated utility macro #define GASNETI_THREAD_SWALLOW(x) /* ------------------------------------------------------------------------------------ */ /* GASNETI_MAX_THREADS: cannot exceed the size representable in gasnete_threadidx_t, but some conduits or configures may set it to less */ #if GASNET_SEQ /* only one client thread by definition */ #undef GASNETI_MAX_THREADS #ifdef GASNETE_CONDUIT_THREADS_USING_TD #define GASNETI_MAX_THREADS (1 + GASNETE_CONDUIT_THREADS_USING_TD) #else #define GASNETI_MAX_THREADS 1 #endif #define GASNETI_MAX_THREADS_REASON "GASNET_SEQ mode only supports single-threaded operation." #elif defined(GASNETI_MAX_THREADS) /* conduit-imposed limit */ #if defined(GASNETI_MAX_THREADS_CONFIGURE) && GASNETI_MAX_THREADS_CONFIGURE < GASNETI_MAX_THREADS #undef GASNETI_MAX_THREADS /* limit lowered by configure */ #define GASNETI_MAX_THREADS GASNETI_MAX_THREADS_CONFIGURE #else #define GASNETI_MAX_THREADS_REASON "This limit is imposed by " GASNET_EXTENDED_NAME_STR " conduit." #endif #else /* default */ #if GASNETI_MAX_THREADS_CONFIGURE #define GASNETI_MAX_THREADS GASNETI_MAX_THREADS_CONFIGURE #else /* default */ #define GASNETI_MAX_THREADS 256 #endif #endif #ifndef GASNETI_MAX_THREADS_REASON #define GASNETI_MAX_THREADS_REASON "To raise this limit, configure GASNet using --with-max-pthreads-per-node=N." #endif #ifdef _GASNETE_THREADIDX_T /* conduit override */ #ifndef SIZEOF_GASNETE_THREADIDX_T #error "Must define both _GASNETE_THREADIDX_T and SIZEOF_GASNETE_THREADIDX_T, or neither" #endif #ifndef GASNETE_INVALID_THREADIDX #error "Must define both _GASNETE_THREADIDX_T and GASNETE_INVALID_THREADIDX, or neither" #endif #elif GASNETI_MAX_THREADS < 65536 typedef uint16_t gasnete_threadidx_t; #define SIZEOF_GASNETE_THREADIDX_T 2 #define GASNETE_INVALID_THREADIDX ((gasnete_threadidx_t)-1) #elif GASNETI_MAX_THREADS < 4294967296 typedef uint32_t gasnete_threadidx_t; #define SIZEOF_GASNETE_THREADIDX_T 4 #define GASNETE_INVALID_THREADIDX ((gasnete_threadidx_t)-1) #else typedef uint64_t gasnete_threadidx_t; #define SIZEOF_GASNETE_THREADIDX_T 8 #define GASNETE_INVALID_THREADIDX ((gasnete_threadidx_t)-1) #endif /* returns the runtime size of the thread table (always <= GASNETI_MAX_THREADS) */ extern uint64_t gasneti_max_threads(void); // same as above, except reduced by conduit-internal threads, if any #if GASNET_SEQ #define gex_System_QueryMaxThreads() ((uint64_t)1) #elif GASNETE_CONDUIT_THREADS_USING_TD GASNETI_INLINE(gex_System_QueryMaxThreads) uint64_t gex_System_QueryMaxThreads(void) { // This is conservative. // A conduit may spawn _up to_ GASNETE_CONDUIT_THREADS_USING_TD, but could spawn fewer. return gasneti_max_threads() - GASNETE_CONDUIT_THREADS_USING_TD; } #else #define gex_System_QueryMaxThreads() gasneti_max_threads() #endif extern void gasneti_fatal_threadoverflow(const char *_subsystem); #ifndef _GASNETI_MYTHREAD_SLOW struct _gasneti_threaddata_t; #if GASNETI_MAX_THREADS <= 256 extern struct _gasneti_threaddata_t *gasnete_threadtable[GASNETI_MAX_THREADS]; #else extern struct _gasneti_threaddata_t **gasnete_threadtable; #endif #if GASNETI_MAX_THREADS > 1 #if GASNETI_COMPILER_IS_CC #if GASNET_STATS // this call breaks a dependency cycle with trace.h GASNETI_INLINE(gasneti_record_dynamic_threadlookup) void gasneti_record_dynamic_threadlookup(void); #define GASNETI_RECORD_DYNAMIC_THREADLOOKUP gasneti_record_dynamic_threadlookup #endif GASNETI_THREADKEY_DECLARE(gasnete_threaddata); extern void * gasnete_new_threaddata(void); GASNETI_INLINE(_gasneti_mythread_slow) GASNETI_CONST struct _gasneti_threaddata_t *_gasneti_mythread_slow(void) { void *_threaddata = gasneti_threadkey_get(gasnete_threaddata); #ifdef GASNETI_RECORD_DYNAMIC_THREADLOOKUP GASNETI_RECORD_DYNAMIC_THREADLOOKUP(); #endif if_pf (!_threaddata) { /* first time we've seen this thread - need to set it up */ // NOTE: DON'T use _gasnete_mythread_slow_slow to initially populate TLS, because it's annotated const // so the optimizer won't understand it modifies the TLS "global" directly accessed above _threaddata = gasnete_new_threaddata(); } gasneti_memcheck(_threaddata); return _threaddata; } GASNETI_CONSTP(_gasneti_mythread_slow) #else // !GASNETI_COMPILER_IS_CC // threadkey-get currently incurs a fncall on !CC anyhow, so nothing to save here extern struct _gasneti_threaddata_t *_gasnete_mythread_slow_slow(void) GASNETI_CONST; GASNETI_CONSTP(_gasnete_mythread_slow_slow) #define _gasneti_mythread_slow() _gasnete_mythread_slow_slow() #endif #else #define _gasneti_mythread_slow() (gasnete_threadtable[0]) #endif #endif /* register a cleanup function to run when the calling thread exits not guaranteed to run during process exits (gasnet_exit), but should run for dynamic thread exits when the process is continuing. Cleanups will run in reverse order of registration */ extern void gasnete_register_threadcleanup(void (*_cleanupfn)(void *), void *_context); typedef struct _gasnete_thread_cleanup { struct _gasnete_thread_cleanup *_next; void (*_cleanupfn)(void *); void *_context; } gasnete_thread_cleanup_t; /* thread exit cleanup function LIFO */ /* high-water mark on highest thread index allocated thus far */ extern int gasnete_maxthreadidx; #define gasnete_assert_valid_threadid(threadidx) do { \ int _thid = (threadidx); \ gasneti_assert_uint(_thid ,<=, gasnete_maxthreadidx); \ gasneti_assert(gasnete_threadtable[_thid] != NULL); \ gasneti_memcheck(gasnete_threadtable[_thid]); \ } while (0) // ------------------------------------------------------------------------------------ // Checks for communication calls in invalid contexts // // TODO: should be expanded to check handler and HSL contexts as well (not just NPAM) #if GASNET_DEBUG extern void gasneti_check_inject(int _for_reply GASNETI_THREAD_FARG); #define GASNETI_CHECK_INJECT() gasneti_check_inject(0 GASNETI_THREAD_GET) #define GASNETI_CHECK_INJECT_REPLY() gasneti_check_inject(1 GASNETI_THREAD_GET) extern void gasneti_check_inject_reset(GASNETI_THREAD_FARG_ALONE); #define GASNETI_CHECK_INJECT_RESET() gasneti_check_inject_reset(GASNETI_THREAD_GET_ALONE) #else #define GASNETI_CHECK_INJECT() ((void)0) #define GASNETI_CHECK_INJECT_REPLY() ((void)0) #define GASNETI_CHECK_INJECT_RESET() ((void)0) #endif // ------------------------------------------------------------------------------------ // Checks for legacy communication calls without legacy support // #if GASNET_DEBUG #define _GASNETI_CHECK_LEGACY(fnname, tm, flags) do { \ if (((flags) & GASNETI_FLAG_G2EX_DEBUG) && !(tm)) { \ gasneti_fatalerror("gasnet_" fnname "*() calls require gasnet_attach() or gex_Client_Init(..., GEX_FLAG_USES_GASNET1)"); \ } \ } while (0) #else #define _GASNETI_CHECK_LEGACY(fnname, tm, flags) ((void)0) #endif /* ------------------------------------------------------------------------------------ */ /* GASNet progressfn support * progressfns are internal functions that are called "periodically" by a conduit to * allow internal GASNet modules to make progress. * Each progressfn is associated with a named subsystem (one-to-one mapping) * subsystem names should be prefixed by gasneti_pf_ to prevent macro name capture * GASNETI_PROGRESSFNS_ENABLE/GASNETI_PROGRESSFNS_DISABLE are used by the conduit * to provide a hint when a particular subsystem's progressfns want to be serviced * Each progressfn has either a BOOLEAN hint or COUNTED hint flavor * COUNTED flavor: ENABLE/DISABLE manipulate an atomic reference count, initially zero * and hinting that calls are requested whenever the count > 0 * BOOLEAN flavor: ENABLE/DISABLE is a simple (non-atomic) flag, and the conduit * is responsible for arbitrating any races between different threads when * setting/clearing that flag under GASNETI_THREADS * progressfns are called from a non-AM context, but they should never perform collective ops * or execute any code that might block (aside from aquiring hsls in an AM-safe manner) * they may be called concurrently (if GASNETI_THREADS), and must be prepared to * receive calls even when the hint indicates the given subsytem does not need service * additionally, progressfns that make gasnet calls must be prepared to recieve * reentrant calls (ie without infinite recursion or deadlock) */ typedef void (*gasneti_progressfn_t)(void); /* currently the list of progressfns is compile-time constant for dispatch performance * reasons (a static dispatch is about 3x faster than a dynamic one on modern CPUs) * in the future it may be expanded with a dynamic function registration facility * PROGRESSFNS_LIST entries should look like: FN(token subsysname, flavor [COUNTED|BOOLEAN], gasneti_progressfn_t progressfn) */ /* conduit-specific core plug-in */ #ifndef GASNETC_PROGRESSFNS_LIST #define GASNETC_PROGRESSFNS_LIST(FN) #endif #ifndef GASNETE_PROGRESSFNS_LIST extern gasneti_progressfn_t gasnete_barrier_pf; #define GASNETE_BARRIER_PROGRESSFN(FN) \ FN(gasneti_pf_barrier, BOOLEAN, gasnete_barrier_pf) /* conduit-specific extended plug-in */ #ifndef GASNETE_PROGRESSFN_EXTRA #define GASNETE_PROGRESSFN_EXTRA(FN) #endif #define GASNETE_PROGRESSFNS_LIST(FN) \ GASNETE_PROGRESSFN_EXTRA(FN) \ GASNETE_BARRIER_PROGRESSFN(FN) #endif // When using a variable of type gasneti_progressfn_t which is to be set at // runtime, use of a no-op progress function as the initial value can avoid // issues with a race between visibility of the writes to the progress function // variable and to the variable that enables it (see bug 4766). extern void gasneti_empty_pf(void); #define GASNETI_PROGRESSFN_INITIALIZER (&gasneti_empty_pf) #if GASNET_DEBUG extern gasneti_progressfn_t gasneti_debug_progressfn_bool; extern gasneti_progressfn_t gasneti_debug_progressfn_counted; #define GASNETI_DEBUG_PROGRESSFNS(FN) \ FN(gasneti_pf_debug_boolean, BOOLEAN, gasneti_debug_progressfn_bool) \ FN(gasneti_pf_debug_counted, COUNTED, gasneti_debug_progressfn_counted) #else #define GASNETI_DEBUG_PROGRESSFNS(FN) #endif #define GASNETI_PROGRESSFNS_LIST(FN) \ GASNETI_DEBUG_PROGRESSFNS(FN) \ GASNETI_COLL_PROGRESSFNS(FN) \ GASNETI_VIS_PROGRESSFNS(FN) \ GASNETE_PROGRESSFNS_LIST(FN) \ GASNETC_PROGRESSFNS_LIST(FN) /* default to one atomic counter per subsystem, because atomic_read is many times faster than a do-nothing function call */ #ifndef GASNETI_PROGRESSFNS_ENABLE #define _GASNETI_PROGRESSFNS_DEFAULT #define _GASNETI_PROGRESSFNS_FLAG(subsysname,flavor) \ _gasneti_progressfn_enabled_##subsysname##_##flavor #define _GASNETI_PROGRESSFNS_TYPE_BOOLEAN volatile int #define _GASNETI_PROGRESSFNS_TYPE_COUNTED gasneti_weakatomic_t #define _GASNETI_PROGRESSFNS_TYPE(flavor) _GASNETI_PROGRESSFNS_TYPE_##flavor #define _GASNETI_PROGRESSFNS_INIT_BOOLEAN = 0 #define _GASNETI_PROGRESSFNS_INIT_COUNTED = gasneti_weakatomic_init(0) #define _GASNETI_PROGRESSFNS_INIT(flavor) _GASNETI_PROGRESSFNS_INIT_##flavor #define _GASNETI_PROGRESSFNS_DECLARE_FLAGS(subsysname, flavor, progressfn) \ extern _GASNETI_PROGRESSFNS_TYPE(flavor) _GASNETI_PROGRESSFNS_FLAG(subsysname, flavor); #define _GASNETI_PROGRESSFNS_DEFINE_FLAGS(subsysname, flavor, progressfn) \ _GASNETI_PROGRESSFNS_TYPE(flavor) _GASNETI_PROGRESSFNS_FLAG(subsysname, flavor) \ _GASNETI_PROGRESSFNS_INIT(flavor); GASNETI_PROGRESSFNS_LIST(_GASNETI_PROGRESSFNS_DECLARE_FLAGS) /* forward declaration */ #define _GASNETI_PROGRESSFNS_ENABLE_BOOLEAN(subsysname) \ (_GASNETI_PROGRESSFNS_FLAG(subsysname,BOOLEAN) = 1) #define _GASNETI_PROGRESSFNS_DISABLE_BOOLEAN(subsysname) \ (_GASNETI_PROGRESSFNS_FLAG(subsysname,BOOLEAN) = 0) #define _GASNETI_PROGRESSFNS_ENABLE_COUNTED(subsysname) do { \ gasneti_weakatomic_increment(&_GASNETI_PROGRESSFNS_FLAG(subsysname,COUNTED),0); \ gasneti_assert(gasneti_weakatomic_read(&_GASNETI_PROGRESSFNS_FLAG(subsysname,COUNTED),0) > 0); \ } while (0) #define _GASNETI_PROGRESSFNS_DISABLE_COUNTED(subsysname) do { \ gasneti_assert(gasneti_weakatomic_read(&_GASNETI_PROGRESSFNS_FLAG(subsysname,COUNTED),0) > 0); \ gasneti_weakatomic_decrement(&_GASNETI_PROGRESSFNS_FLAG(subsysname,COUNTED),0); \ } while (0) #define GASNETI_PROGRESSFNS_ENABLE(subsysname,flavor) \ _GASNETI_PROGRESSFNS_ENABLE_##flavor(subsysname) #define GASNETI_PROGRESSFNS_DISABLE(subsysname,flavor) \ _GASNETI_PROGRESSFNS_DISABLE_##flavor(subsysname) #define _GASNETI_PROGRESSFNS_ISENABLED_BOOLEAN(subsysname) \ _GASNETI_PROGRESSFNS_FLAG(subsysname,BOOLEAN) #define _GASNETI_PROGRESSFNS_ISENABLED_COUNTED(subsysname) \ gasneti_weakatomic_read(&_GASNETI_PROGRESSFNS_FLAG(subsysname,COUNTED),0) #define _GASNETI_PROGRESSFNS_RUN_IFENABLED(subsysname, flavor, progressfn) \ (_GASNETI_PROGRESSFNS_ISENABLED_##flavor(subsysname) ? progressfn() : ((void)0)) , #define GASNETI_PROGRESSFNS_RUN() \ ( GASNETI_PROGRESSFNS_LIST(_GASNETI_PROGRESSFNS_RUN_IFENABLED) ((void)0) ) #endif /* ------------------------------------------------------------------------------------ */ #ifdef GASNETI_GASNETI_AMPOLL GASNETI_GASNETI_AMPOLL #else /* gasnet_AMPoll() - public poll function called by the client, throttled and traced should not be called from within GASNet (so we only trace directly user-initiated calls) gasneti_AMPoll() - called internally by GASNet, provides throttling (if enabled), progress functions, but no tracing gasnetc_AMPoll() - conduit AM dispatcher, should only be called from gasneti_AMPoll() */ #ifdef GASNETI_GASNETC_AMPOLL GASNETI_GASNETC_AMPOLL #else extern int gasnetc_AMPoll(GASNETI_THREAD_FARG_ALONE); #endif #if GASNETI_THROTTLE_FEATURE_ENABLED /* enabled by configure */ \ && GASNETC_USING_SUSPEND_RESUME /* implemented by the conduit */ \ && (GASNET_PAR || GASNETI_CONDUIT_THREADS) /* appropriate threading mode */ #define GASNETI_THROTTLE_POLLERS 1 #else #define GASNETI_THROTTLE_POLLERS 0 #endif /* threads who need a network lock in order to send a message make matched calls to gasneti_suspend/resume_spinpollers to help them get the lock. They should not AMPoll while this suspend is in effect. The following debugging assertions detect violations of these rules. */ #if GASNET_DEBUG GASNETI_THREADKEY_DECLARE(gasneti_throttledebug_key); #define gasneti_AMPoll_spinpollers_check() \ /* assert this thread hasn't already suspended */ \ gasneti_assert((int)(intptr_t)gasneti_threadkey_get(gasneti_throttledebug_key) == 0) #define gasneti_suspend_spinpollers_check() do { \ int _mythrottlecnt = (int)(intptr_t)gasneti_threadkey_get(gasneti_throttledebug_key); \ /* assert this thread hasn't already suspended */ \ gasneti_assert_int(_mythrottlecnt ,==, 0); \ gasneti_threadkey_set(gasneti_throttledebug_key, (void *)(intptr_t)1); \ } while(0) #define gasneti_resume_spinpollers_check() do { \ int _mythrottlecnt = (int)(intptr_t)gasneti_threadkey_get(gasneti_throttledebug_key); \ /* assert this thread previously suspended */ \ gasneti_assert_int(_mythrottlecnt ,==, 1); \ gasneti_threadkey_set(gasneti_throttledebug_key, (void *)(intptr_t)0); \ } while(0) #else #define gasneti_AMPoll_spinpollers_check() ((void)0) #define gasneti_suspend_spinpollers_check() ((void)0) #define gasneti_resume_spinpollers_check() ((void)0) #endif #if !GASNETI_THROTTLE_POLLERS GASNETI_INLINE(_gasneti_AMPoll) int _gasneti_AMPoll(GASNETI_THREAD_FARG_ALONE) { int _retval; gasneti_AMPoll_spinpollers_check(); gasneti_memcheck_one(); _retval = gasnetc_AMPoll(GASNETI_THREAD_PASS_ALONE); GASNETI_PROGRESSFNS_RUN(); return _retval; } #define gasneti_suspend_spinpollers() gasneti_suspend_spinpollers_check() #define gasneti_resume_spinpollers() gasneti_resume_spinpollers_check() #else /* AMPoll with throttling, to reduce lock contention in the network: poll if and only if no other thread appears to already be spin-polling, and no thread is attempting to use the network for sending Design goals (in rough order of importance): - when one or more threads need to send, all spin-pollers should get out of the way (but continue checking their completion condition) - only one thread should be spin-polling at a time, to prevent lock contention and cache thrashing between spin-pollers - manage AMPoll calls internal to GASNet (including those from polluntil) and explicit client AMPoll calls Lowest priority design goals, which have not been achieved: - allow concurrent handler execution - if the spin poller recvs an AM, it should release another spin poller before invoking the handler [lock reacquisition becomes a bottleneck] - the single spin-poller should not need to pay locking overheads in the loop [a limitation of the infrastructure: no way to differentiate "single"] */ extern gasneti_atomic_t gasneti_throttle_haveusefulwork; extern gasneti_mutex_t gasneti_throttle_spinpoller; #define gasneti_suspend_spinpollers() do { \ gasneti_suspend_spinpollers_check(); \ gasneti_atomic_increment(&gasneti_throttle_haveusefulwork,0); \ } while (0) #define gasneti_resume_spinpollers() do { \ gasneti_resume_spinpollers_check(); \ gasneti_atomic_decrement(&gasneti_throttle_haveusefulwork,0); \ } while (0) /* and finally, the throttled poll implementation */ GASNETI_INLINE(_gasneti_AMPoll) int _gasneti_AMPoll(GASNETI_THREAD_FARG_ALONE) { int _retval = GASNET_OK; gasneti_AMPoll_spinpollers_check(); gasneti_memcheck_one(); /* if another thread is spin-polling then skip both the poll and progress fns: */ if_pt (!gasneti_mutex_trylock(&gasneti_throttle_spinpoller)) { /* if another thread is sending then skip the poll: */ if_pt (!gasneti_atomic_read(&gasneti_throttle_haveusefulwork,0)) _retval = gasnetc_AMPoll(GASNETI_THREAD_PASS_ALONE); gasneti_mutex_unlock(&gasneti_throttle_spinpoller); GASNETI_PROGRESSFNS_RUN(); } return _retval; } #endif #define gasneti_AMPoll() _gasneti_AMPoll(GASNETI_THREAD_GET_ALONE) #endif // Should poll when GEX_FLAG_IMMEDIATE bit set? (undefined or 1) #if defined(GASNETC_IMMEDIATE_AMPOLLS) && (GASNETC_IMMEDIATE_AMPOLLS != 1) #error GASNETC_IMMEDIATE_AMPOLLS must be 1 or undefined #endif // Convenience test #if GASNETC_IMMEDIATE_AMPOLLS #define GASNETC_IMMEDIATE_WOULD_POLL(flag) 1 #else #define GASNETC_IMMEDIATE_WOULD_POLL(flag) (!((flag)&GEX_FLAG_IMMEDIATE)) #endif // Convenience conditional poll #define GASNETC_IMMEDIATE_MAYBE_POLL(flag) \ do { if (GASNETC_IMMEDIATE_WOULD_POLL(flag)) gasneti_AMPoll(); } while (0) /* ------------------------------------------------------------------------------------ */ // Blocking functions // In general, an RMB is required on exit from a spinloop to ensure that // subsequent reads will not observe values that were prefeteched or are // otherwise out of date. However, such a fence would be redundant in cases // where evaluating the loop body and/or termination condition includes such // a fence (or stronger). // The `gasneti_{poll,wait}*()` macros include an RMB on loop exit. // The `GASNETI_SPIN_*()` macros do NOT include any RMB. extern int gasneti_wait_mode; /* current waitmode hint */ // GASNETI_WAITHOOK is used to improve performance of various spinloop // constructs, implementing the policy selected using `gasnet_set_waitmode()` // and invoking `gasneti_spinloop_hint()`. Since one or both of these can // result in non-trivial delay, this hook should only be used after the loop // termination condition is known to be false. This is typically ensured by // "peeling" the first iteration of the loop. // Additionally, since the implementation of `gasneti_spinloop_hint()` via the // x86 `pause` instruction disables speculative execution, this hook should // immediately follow the conditional which continues the spin. // // See the `GASNETI_SPIN_*()` family of macros for example uses. // // Here is another example: // // p = pop(&freelist); // if (!p) { // while (1) { // progress(); // Can refill the freelist // p = pop(&freelist); // if (p) break; // GASNETI_WAITHOOK(); // } // } // // In this example note that `GASNETI_WAITHOOK()` is only reached if `pop()` // fails a second time with a `progress` between the first and second attempts // (the "loop peeling" recommendation.) Also note that `GASNETI_WAITHOOK()` // immediately follows the conditional `break` that eventually terminates the // loop. // // It should be noted that this example assumes that `pop()` includes an RMB in // (at least) any multi-threaded execution which returns a non-NULL value. // // This example can be written more concisely as: // GASNETI_SPIN_UNTIL((p = pop(&freelist)), progress()); // #define GASNETI_WAITHOOK() do { \ /* prevent optimizer from hoisting the condition check out of */ \ /* the enclosing spin loop - this is our way of telling the */ \ /* optimizer "the whole world could change here" */ \ gasneti_spinloop_hint(); /* pause instruction or compiler fence */\ if_pf (gasneti_wait_mode != GASNET_WAIT_SPIN) gasneti_sched_yield(); \ } while (0) // Approximately `do { body } while (cnd)`, with the addition of `GASNETI_WAITHOOK()`. // Will always execute `body` at least once. // No RMB or similar on loop exit. #define GASNETI_SPIN_DOWHILE(cnd, body) \ do { \ body; \ if (!(cnd)) break; \ GASNETI_WAITHOOK(); \ } while (1) // Approximately `while (cnd) {body}`, with the addition of `GASNETI_WAITHOOK()`. // Will not execute `body` if `cnd` is initially false. // No RMB or similar on loop exit. #define GASNETI_SPIN_WHILE(cnd, body) \ do { \ if (cnd) { \ GASNETI_SPIN_DOWHILE(cnd, body); \ } \ } while (0) // Variant on `GASNETI_SPIN_WHILE()` which additionally traces a stalled // interval if (and only if) `cnd` is initially true. // No RMB or similar on loop exit. #if GASNETI_STATS_OR_TRACE #define GASNETI_SPIN_WHILE_TRACE(cnd, type, name, body) \ do { \ if (cnd) { \ gasneti_tick_t _waitstart = GASNETI_TICKS_NOW_IFENABLED(type); \ GASNETI_SPIN_DOWHILE(cnd, body); \ GASNETI_TRACE_EVENT_TIME(type,name,gasneti_ticks_now()-_waitstart); \ } \ } while (0) #else #define GASNETI_SPIN_WHILE_TRACE(cnd, type, name, body) \ GASNETI_SPIN_WHILE(cnd, body) #endif // As above, but negating the condition to yield "UNTIL" instead of "WHILE" // No RMB or similar on loop exit. #define GASNETI_SPIN_DOUNTIL(cnd, body) \ GASNETI_SPIN_DOWHILE(!(cnd), body) #define GASNETI_SPIN_UNTIL(cnd, body) \ GASNETI_SPIN_WHILE(!(cnd), body) #define GASNETI_SPIN_UNTIL_TRACE(cnd, type, name, body) \ GASNETI_SPIN_WHILE_TRACE(!(cnd), type, name, body) // busy-waits, *without* implicit polling (thus `cnd` should include any // necessary polling for progress) // Differs from GASNET_BLOCKUNTIL because it may be waiting for an event caused // by the receipt of a non-AM message // Differs from use of GASNETI_SPIN_DO{WHILE,UNTIL}() by addition of an RMB on loop exit. #define gasneti_waitwhile(cnd) do { \ GASNETI_SPIN_DOWHILE((cnd), ((void)0)); \ gasneti_local_rmb(); \ } while (0) #define gasneti_waituntil(cnd) gasneti_waitwhile(!(cnd)) // busy-wait, *with* implicit polling // Note no poll if the condition is already satisfied // Differs from use of GASNETI_SPIN_{WHILE,UNTIL}() by addition of an RMB on loop exit. #define gasneti_pollwhile(cnd) do { \ GASNETI_SPIN_WHILE((cnd), gasneti_AMPoll()); \ gasneti_local_rmb(); \ } while (0) #define gasneti_polluntil(cnd) gasneti_pollwhile(!(cnd)) /* ------------------------------------------------------------------------------------ */ /* high-performance timer library */ #include /* tracing utilities */ #include /* ------------------------------------------------------------------------------------ */ /* default implementations of various conduit functions (may be overridden in some conduits) */ #ifndef _GASNET_AMPOLL #define _GASNET_AMPOLL /* GASNet client calls gasnet_AMPoll(), which throttles and traces */ GASNETI_INLINE(_gasnet_AMPoll) int _gasnet_AMPoll(GASNETI_THREAD_FARG_ALONE) { GASNETI_TRACE_EVENT(X, AMPOLL); GASNETI_CHECK_INJECT(); return _gasneti_AMPoll(GASNETI_THREAD_PASS_ALONE); } #define gasnet_AMPoll() _gasnet_AMPoll(GASNETI_THREAD_GET_ALONE) #endif #ifndef _GASNET_GETENV #define _GASNET_GETENV GASNETI_INLINE(gasnet_getenv) char *gasnet_getenv(const char *_s) { GASNETI_CHECKINIT(); return gasneti_getenv(_s); } #endif #ifndef _GASNET_WAITMODE #define _GASNET_WAITMODE #define GASNET_WAIT_SPIN 0 /* contend aggressively for CPU resources while waiting (spin) */ #define GASNET_WAIT_BLOCK 1 /* yield CPU resources immediately while waiting (block) */ #define GASNET_WAIT_SPINBLOCK 2 /* spin for an implementation-dependent period, then block */ extern int gasneti_set_waitmode(int _wait_mode); #define gasnet_set_waitmode(wait_mode) gasneti_set_waitmode(wait_mode) #endif #ifndef _GASNET_GETMAXSEGMENTSIZE #define _GASNET_GETMAXSEGMENTSIZE #define _GASNET_GETMAXSEGMENTSIZE_DEFAULT extern uintptr_t gasneti_MaxLocalSegmentSize; extern uintptr_t gasneti_MaxGlobalSegmentSize; #if GASNET_SEGMENT_EVERYTHING #define gasnet_getMaxLocalSegmentSize() ((uintptr_t)-1) #define gasnet_getMaxGlobalSegmentSize() ((uintptr_t)-1) #else #define gasnet_getMaxLocalSegmentSize() \ (GASNETI_CHECKINIT(), (uintptr_t)gasneti_MaxLocalSegmentSize) #define gasnet_getMaxGlobalSegmentSize() \ (GASNETI_CHECKINIT(), (uintptr_t)gasneti_MaxGlobalSegmentSize) #endif #endif #ifndef _GASNET_GETSEGMENTINFO #define _GASNET_GETSEGMENTINFO extern int gasneti_getSegmentInfo(gasnet_seginfo_t *_seginfo_table, int _numentries); #define gasnet_getSegmentInfo(seginfo_table, numentries) \ gasneti_getSegmentInfo(seginfo_table, numentries) #endif #ifndef _GASNET_GETNODEINFO #define _GASNET_GETNODEINFO extern int gasneti_getNodeInfo(gasnet_nodeinfo_t *_nodeinfo_table, int _numentries); #define gasnet_getNodeInfo(nodeinfo_table, numentries) \ gasneti_getNodeInfo(nodeinfo_table, numentries) #endif extern gasnet_nodeinfo_t *gasneti_nodeinfo; #ifdef GASNETI_RECORD_DYNAMIC_THREADLOOKUP GASNETI_INLINE(gasneti_record_dynamic_threadlookup) void gasneti_record_dynamic_threadlookup(void) { GASNETI_STAT_EVENT(C, DYNAMIC_THREADLOOKUP); } #endif /* ------------------------------------------------------------------------------------ */ /* Bits for conduits which want/need to override pthread_create() */ #if defined(PTHREAD_MUTEX_INITIALIZER) /* only if pthread.h available */ && !GASNET_SEQ /* gasneti_pthread_create() available on all non-SEQ builds w/ pthreads */ typedef int (gasneti_pthread_create_fn_t)(pthread_t *, const pthread_attr_t *, void *(*)(void *), void *); extern int gasneti_pthread_create(gasneti_pthread_create_fn_t *_create_fn, pthread_t *_thread, const pthread_attr_t *_attr, void *(*_start_routine)(void *), void *_arg); #if defined(GASNETC_PTHREAD_CREATE_OVERRIDE) /* Capture existing defn, which could be another library's override */ static int gasneti_pthread_create_system(pthread_t *_thread, const pthread_attr_t *_attr, void *(*_start_routine)(void *), void *_arg) { return pthread_create(_thread,_attr,_start_routine,_arg); } /* Install our override */ #undef pthread_create #define pthread_create(thr, attr, fn, arg) \ gasneti_pthread_create(&gasneti_pthread_create_system, (thr), (attr), (fn), (arg)) #endif #endif /* ------------------------------------------------------------------------------------ */ // Memory Kinds // The following GASNET_HAVE_MK_CLASS_* identifiers are either `1` or unset #define GASNET_HAVE_MK_CLASS_HOST 1 // For consistency - always available #if GASNET_HAVE_MK_CLASS_CUDA_UVA #undef GASNET_HAVE_MK_CLASS_CUDA_UVA #define GASNET_HAVE_MK_CLASS_CUDA_UVA 1 #define GASNETI_MK_CLASS_CUDA_UVA_CONFIG mk_class_cuda_uva #else #undef GASNET_HAVE_MK_CLASS_CUDA_UVA #define GASNETI_MK_CLASS_CUDA_UVA_CONFIG nomk_class_cuda_uva #endif #if GASNET_HAVE_MK_CLASS_HIP #undef GASNET_HAVE_MK_CLASS_HIP #define GASNET_HAVE_MK_CLASS_HIP 1 #if GASNETI_HIP_PLATFORM_AMD #define GASNETI_MK_CLASS_HIP_CONFIG mk_class_hip_amd #elif GASNETI_HIP_PLATFORM_NVIDIA #define GASNETI_MK_CLASS_HIP_CONFIG mk_class_hip_nvidia #else #error Unknown HIP Platform #endif #else #undef GASNET_HAVE_MK_CLASS_HIP #define GASNETI_MK_CLASS_HIP_CONFIG nomk_class_hip #endif #if GASNET_HAVE_MK_CLASS_ZE #undef GASNET_HAVE_MK_CLASS_ZE #define GASNET_HAVE_MK_CLASS_ZE 1 #define GASNETI_MK_CLASS_ZE_CONFIG mk_class_ze #else #undef GASNET_HAVE_MK_CLASS_ZE #define GASNETI_MK_CLASS_ZE_CONFIG nomk_class_ze #endif #if GASNET_HAVE_MK_CLASS_CUDA_UVA || \ GASNET_HAVE_MK_CLASS_HIP || \ GASNET_HAVE_MK_CLASS_ZE // || GASNET_HAVE_MK_CLASS_[FOO] #define GASNET_HAVE_MK_CLASS_MULTIPLE 1 #endif #if GASNET_HAVE_MK_CLASS_MULTIPLE GASNETI_INLINE(gasneti_i_segment_kind_is_host) int gasneti_i_segment_kind_is_host(gasneti_Segment_t _segment) { // Either NULL (such as for no bound segment, which is just fine for // out-of-segment or in-aux-seg local addrs) OR the kind is GEX_MK_HOST. return !_segment || (_segment->_kind == GEX_MK_HOST); } #define gasneti_e_segment_kind_is_host(segment) \ gasneti_i_segment_kind_is_host(gasneti_import_segment(segment)) #else #define gasneti_i_segment_kind_is_host(segment) 1 #define gasneti_e_segment_kind_is_host(segment) 1 #endif #if GASNET_DEBUG && GASNET_HAVE_MK_CLASS_MULTIPLE extern int _gasneti_boundscheck_local(gex_TM_t _tm, void *_addr, size_t _len, gasneti_Segment_t *_seg_p); #define GASNETI_BAD_LOCAL_OUTSIDE_DEVICE_SEGMENT 1 #define GASNETI_BAD_LOCAL_INSIDE_DEVICE_SEGMENT 2 #define gasneti_boundscheck_local(e_tm,ptr,nbytes) do { \ gex_TM_t _gex_bcl_tm = (e_tm); \ void *_gex_bcl_ptr = (void *)(ptr); \ size_t _gex_bcl_nbytes = (size_t)(nbytes); \ gasneti_assert(_gex_bcl_tm); \ gasneti_Segment_t _gex_bcl_segment; \ int _gex_bcl_result = \ _gasneti_boundscheck_local(_gex_bcl_tm,_gex_bcl_ptr,_gex_bcl_nbytes,&_gex_bcl_segment);\ if (_gex_bcl_result) { \ gex_Rank_t _gex_bcl_rank = \ (gasneti_e_tm_is_pair(_gex_bcl_tm) ? gasneti_mynode : gex_TM_QueryRank(_gex_bcl_tm));\ gasneti_fatalerror("Invalid local address %s device segment (" \ GASNETI_TMRANKFMT " ptr=" GASNETI_LADDRFMT" nbytes=%" PRIuPTR ")" \ " kind=%s segment=(" GASNETI_LADDRFMT"..." GASNETI_LADDRFMT")", \ ((_gex_bcl_result == GASNETI_BAD_LOCAL_OUTSIDE_DEVICE_SEGMENT) ? \ "outside of the bound" : "in a"), \ GASNETI_TMRANKSTR(_gex_bcl_tm, _gex_bcl_rank), \ GASNETI_LADDRSTR(_gex_bcl_ptr), \ (uintptr_t)_gex_bcl_nbytes, \ gasneti_formatmk(_gex_bcl_segment->_kind), \ GASNETI_LADDRSTR(_gex_bcl_segment->_addr), \ GASNETI_LADDRSTR(_gex_bcl_segment->_ub) \ ); \ } \ } while (0) #else #define gasneti_boundscheck_local(e_tm,ptr,nbytes) ((void)0) #endif /* ------------------------------------------------------------------------------------ */ // PSHM support - part 1 of 2 #if GASNET_PSHM /* Max number of processes supported per node */ #ifndef GASNETI_PSHM_MAX_NODES #ifdef GASNETI_CONFIG_PSHM_MAX_NODES #define GASNETI_PSHM_MAX_NODES GASNETI_CONFIG_PSHM_MAX_NODES #else #define GASNETI_PSHM_MAX_NODES 255 #endif #endif #if GASNETI_PSHM_MAX_NODES < 256 typedef uint8_t gasneti_pshm_rank_t; #elif GASNETI_PSHM_MAX_NODES < 65536 typedef uint16_t gasneti_pshm_rank_t; #else #error "GASNETI_PSHM_MAX_NODES too large" #endif extern gasneti_pshm_rank_t gasneti_pshm_nodes; /* # nodes in my supernode */ extern gasneti_pshm_rank_t gasneti_pshm_mynode; /* my 0-based rank in supernode */ extern gex_Rank_t gasneti_pshm_firstnode; /* lowest node # in supernode */ /* vector of first node within each supernode */ extern gex_Rank_t *gasneti_pshm_firsts; /* Non-NULL only when supernode members are non-contiguous */ extern gasneti_pshm_rank_t *gasneti_pshm_rankmap; /* Returns "local rank" if given node is in the callers supernode. * Otherwise returns an "impossible" value >= gasneti_pshm_nodes. */ GASNETI_INLINE(gasneti_pshm_jobrank_to_local_rank) GASNETI_PURE unsigned int gasneti_pshm_jobrank_to_local_rank(gex_Rank_t _jobrank) { #if GASNET_CONDUIT_SMP return _jobrank; #else if_pt (gasneti_pshm_rankmap == NULL) { /* NOTE: gex_Rank_t is an unsigned type, so in the case of * (_jobrank < gasneti_pshm_firstnode), the subtraction will wrap to * a "large" value. */ return (_jobrank - gasneti_pshm_firstnode); } else { return gasneti_pshm_rankmap[_jobrank]; } #endif } GASNETI_PUREP(gasneti_pshm_jobrank_to_local_rank) // gasneti_pshm_jobrank_in_supernode() // // Returns 1 if given node is in the caller's supernode, or 0 if it's not. // NOTE: result is false before vnet initialization. // // For contiguous nbrhd (gasneti_pshm_rankmap == NULL), the following two are // equal to gasneti_pshm_firstnode and gasneti_pshm_nodes, respectively. // Otherwise, they are gasneti_mynode and 1, respectively. // This ensures that regardless of contiguous or not, the case of _jobrank // equal to gasneti_mynode will always satisfy the first condition. extern gex_Rank_t gasneti_pshm_first_or_self; extern gasneti_pshm_rank_t gasneti_pshm_nodes_or_one; GASNETI_INLINE(gasneti_pshm_jobrank_in_supernode) GASNETI_PURE int gasneti_pshm_jobrank_in_supernode(gex_Rank_t _jobrank) { #if GASNET_CONDUIT_SMP return 1; #else // Note use of unsigned type gex_Rank_t below means negative => huge if ((_jobrank - gasneti_pshm_first_or_self) < gasneti_pshm_nodes_or_one) return 1; return gasneti_pshm_rankmap && (gasneti_pshm_rankmap[_jobrank] < gasneti_pshm_nodes); #endif } GASNETI_PUREP(gasneti_pshm_jobrank_in_supernode) /* Returns local version of remote in-supernode address. */ // TODO-EX: This is probably the wrong interface for at least 2 reasons: // + Relies on dense array of nodeinfo even though only supernode-local are non-zero // + Was designed for single segment and even auxseg is currently a hack GASNETI_INLINE(gasneti_pshm_jobrank_addr2local) GASNETI_PURE void *gasneti_pshm_jobrank_addr2local(gex_Rank_t _jobrank, const void *_addr, int _is_aux) { if (_is_aux) { gasneti_assert(gasneti_in_auxsegment(_jobrank, _addr, 1)); return (void*)((uintptr_t)_addr + gasneti_nodeinfo[_jobrank].auxoffset); } else { // Any local address is OK, else must be in the primordial segment gasneti_assert((_jobrank == gasneti_mynode) || _gasneti_in_seginfo_t(_addr, 1, &gasneti_seginfo[_jobrank])); return (void*)((uintptr_t)_addr + gasneti_nodeinfo[_jobrank].offset); } } GASNETI_PUREP(gasneti_pshm_jobrank_addr2local) #endif // GASNET_PSHM /* ------------------------------------------------------------------------------------ */ #if GASNET_CONDUIT_SMP #define GASNETI_MAPPABLE_JOBRANK_P(jobrank) 1 #elif GASNET_PSHM #define GASNETI_MAPPABLE_JOBRANK_P(jobrank) gasneti_pshm_jobrank_in_supernode(jobrank) #else #define GASNETI_MAPPABLE_JOBRANK_P(jobrank) ((jobrank) == gasneti_mynode) #endif // Helper for other queries (both with PSHM and without) // Returns a jobrank or GEX_RANK_INVALID depending on whether the target // endpoint named by (tm,rank) is a cross-mapped primordial segment. // Erroneous to call for a (tm,rank) naming an endpoint which does not // exist or has no a bound segment. GASNETI_INLINE(gasneti_nbrhd_mapped_helper) GASNETI_PURE gex_Rank_t gasneti_nbrhd_mapped_helper(gex_TM_t _e_tm, gex_Rank_t _rank) { gasneti_TM_t _i_tm = gasneti_import_tm(_e_tm); gasneti_check_i_tm_rank(_i_tm, _rank); if (gasneti_is_tm0(_i_tm)) { // fast path for TM0, which can only include primordial segments #if !GASNET_SEGMENT_EVERYTHING // Check that target segment exists by looking for non-NULL addr in seginfo table // TODO-EX: update if/when scalable storage replaces gasneti_seginfo[] // TODO-EX: update if/when it is possible to have a primordial segment which is NOT cross-mapped gasneti_assert(gasneti_seginfo[_rank].addr); #endif gasneti_assume(_rank != GEX_RANK_INVALID); // may improve codegen in caller return GASNETI_MAPPABLE_JOBRANK_P(_rank) ? _rank : GEX_RANK_INVALID; } gex_EP_Location_t _loc = gasneti_i_tm_rank_to_location(_i_tm, _rank, 0); gex_Rank_t _jobrank = _loc.gex_rank; #if !GASNET_SEGMENT_EVERYTHING // Regardless whether this query will eventually succeed or fail, // it is erroneous to query a target endpoint that does not yet // have a bound segment made known to us via gex_Segment_Attach() // or gex_EP_PublishBoundSegment(). // TODO-EX: update for scalable storage gasneti_assert(gasneti_seginfo_tbl[_loc.gex_ep_index]); gasneti_assert(gasneti_seginfo_tbl[_loc.gex_ep_index][_jobrank].addr); #endif // Fail unless target rank is in-nbrhd or self, as appropriate if (! GASNETI_MAPPABLE_JOBRANK_P(_jobrank)) return GEX_RANK_INVALID; // Fail unless target ep is primordial if (_loc.gex_ep_index != 0) return GEX_RANK_INVALID; gasneti_assume(_jobrank != GEX_RANK_INVALID); // may improve codegen in caller return _jobrank; } GASNETI_PUREP(gasneti_nbrhd_mapped_helper) // Helper for other queries (both with PSHM and without) // Returns a jobrank or GEX_RANK_INVALID depending on whether the initiator and // target endpoints named by (tm,rank) are both "eligible" to be mapped for // load/store access. This is inclusive of the check on the jobrank being // in-nbrhd (PSHM) or self (non-PSHM). // The eligibility criteria are: // 1a. Target endpoint must be primordial (have EP index 0) // 1b. OR target endpoint is actually self with a host memory segment // 2. Initiator endpoint must be host memory (but need not be primordial) // However, checking these efficiently is not as simple as it sounds. extern gasneti_Segment_t gasneti_epidx_to_segment(gasneti_TM_t i_tm, gex_EP_Index_t ep_idx); GASNETI_INLINE(gasneti_jobrank_if_mappable) GASNETI_PURE gex_Rank_t gasneti_jobrank_if_mappable(gex_TM_t _e_tm, gex_Rank_t _rank) { gasneti_TM_t _i_tm = gasneti_import_tm(_e_tm); gasneti_check_i_tm_rank(_i_tm, _rank); if (gasneti_is_tm0(_i_tm)) { // fast path for TM0, which can only include primordial segments gasneti_assume(_rank != GEX_RANK_INVALID); // may improve codegen in caller return GASNETI_MAPPABLE_JOBRANK_P(_rank) ? _rank : GEX_RANK_INVALID; } gex_EP_Location_t _loc = gasneti_i_tm_rank_to_location(_i_tm, _rank, 0); gex_Rank_t _jobrank = _loc.gex_rank; gasneti_assume(_jobrank != GEX_RANK_INVALID); // may improve codegen in caller // Fail unless target rank is in-nbrhd or self, as appropriate if (! GASNETI_MAPPABLE_JOBRANK_P(_jobrank)) return GEX_RANK_INVALID; // If we get this far then the target process is one that *could*. // be mapped. Further checks on the two endpoints may be needed. // Check that initiator ep is host memory. // // Trivial true if !GASNET_HAVE_MK_CLASS_MULTIPLE // Also true if primordial (ep_idx == 0) // Otherwise requires checking the segment #if GASNET_HAVE_MK_CLASS_MULTIPLE gex_EP_Index_t _init_ep_idx = gasneti_i_tm_to_ep_index(_i_tm); if (_init_ep_idx) { // non-primordial initiator ep // Fail unless segment is host memory gasneti_Segment_t _seg = gasneti_epidx_to_segment(_i_tm, _init_ep_idx); if (!gasneti_i_segment_kind_is_host(_seg)) return GEX_RANK_INVALID; } #endif // Check that target ep is host memory and mappable. // // A primordial endpoint's segment is (currently) guaranteed to be // both cross-mapped and host-memory. // If non-primordial and target==self, then we can accept any // host memory segment. gex_EP_Index_t _targ_ep_idx = _loc.gex_ep_index; if (_targ_ep_idx) { // non-primordial target ep #if GASNET_PSHM // Fail unless the target is "self" if (_jobrank != gasneti_mynode) return GEX_RANK_INVALID; #else gasneti_assert(_jobrank == gasneti_mynode); #endif #if GASNET_HAVE_MK_CLASS_MULTIPLE // Target ep is self. So fail unless segment is host memory gasneti_Segment_t _seg = gasneti_epidx_to_segment(_i_tm, _targ_ep_idx); if (!gasneti_i_segment_kind_is_host(_seg)) return GEX_RANK_INVALID; #endif } return _jobrank; } GASNETI_PUREP(gasneti_jobrank_if_mappable) #undef GASNETI_MAPPABLE_JOBRANK_P /* ------------------------------------------------------------------------------------ */ // PSHM support - part 2 of 2 #if GASNET_PSHM // Same as the three gasneti_pshm_jobrank_* functions in part 1, above, but taking // (tm,rank) in place of jobrank // All are TM-pair aware, and the first two are multi-EP aware GASNETI_INLINE(gasneti_pshm_local_rank) GASNETI_PURE unsigned int gasneti_pshm_local_rank(gex_TM_t _e_tm, gex_Rank_t _rank) { gex_Rank_t _jobrank = gasneti_jobrank_if_mappable(_e_tm, _rank); return (_jobrank == GEX_RANK_INVALID) ? (unsigned int)(-1) : gasneti_pshm_jobrank_to_local_rank(_jobrank); } GASNETI_PUREP(gasneti_pshm_local_rank) GASNETI_INLINE(gasneti_pshm_in_supernode) GASNETI_PURE int gasneti_pshm_in_supernode(gex_TM_t _e_tm, gex_Rank_t _rank) { return (GEX_RANK_INVALID != gasneti_jobrank_if_mappable(_e_tm, _rank)); } GASNETI_PUREP(gasneti_pshm_in_supernode) // Valid only for primordial segment GASNETI_INLINE(gasneti_pshm_addr2local) GASNETI_PURE void *gasneti_pshm_addr2local(gex_TM_t _e_tm, gex_Rank_t _rank, const void *_addr) { #if GASNET_DEBUG gex_EP_Location_t _loc = gasneti_e_tm_rank_to_location(_e_tm, _rank, 0); gex_Rank_t _jobrank = _loc.gex_rank; gasneti_assert_uint(_loc.gex_ep_index ,==, 0); // primordial #else gex_Rank_t _jobrank = gasneti_e_tm_rank_to_jobrank(_e_tm,_rank); #endif gasneti_assert(! gasneti_in_auxsegment(_jobrank, _addr, 1)); return gasneti_pshm_jobrank_addr2local(_jobrank, _addr, 0); } GASNETI_PUREP(gasneti_pshm_addr2local) // Valid only for an aux segment GASNETI_INLINE(gasneti_pshm_aux2local) GASNETI_PURE void *gasneti_pshm_aux2local(gex_Rank_t _jobrank, const void *_addr) { gasneti_assert(gasneti_in_auxsegment(_jobrank, _addr, 1)); return gasneti_pshm_jobrank_addr2local(_jobrank, _addr, 1); } GASNETI_PUREP(gasneti_pshm_aux2local) #endif // GASNET_PSHM /* ------------------------------------------------------------------------------------ */ // Wrappers for memcpy() /* TODO-EX: these should replace the alignment-aware versions */ // + GASNETI_MEMCPY // Arguments must match POSIX constraints: // Zero value of nbytes is permitted // Both pointers must be valid (even for !nbytes) // If nbytes non-zero src and dst ranges must not overlap // This is the least costly option and should be used whenever the // call site can be guaranteed to meet these requirements. // + GASNETI_MEMCPY_SAFE_EMPTY // Omits memcpy() (thus ignoring pointers entirely) IFF !nbytes // + GASNETI_MEMCPY_SAFE_IDENTICAL // Omits memcpy() IFF (src == dst) // + GASNETI_MEMCPY_SAFE // Omits memcpy() IFF (!nbytes || src == dst) // This is the most costly option. // Use any of the versions above when possible. #define GASNETI_MEMCPY(dst,src,nbytes) do { \ static uint8_t _fm_dummy; \ void *_fm_d = (dst); \ void const *_fm_s = (src); \ size_t _fm_n = (nbytes); \ gasneti_assume(_fm_s && _fm_d); \ gasneti_assert((_fm_dummy += *(volatile uint8_t*)_fm_s, 1)); \ gasneti_assert((_fm_dummy += *(volatile uint8_t*)_fm_d, 1)); \ gasneti_assume(!_fm_n || ((uintptr_t)_fm_s >= (uintptr_t)_fm_d+_fm_n) \ || ((uintptr_t)_fm_d >= (uintptr_t)_fm_s+_fm_n)); \ (void) memcpy(_fm_d, _fm_s, _fm_n); \ } while (0) #define GASNETI_MEMCPY_SAFE_IDENTICAL(dst,src,nbytes) do { \ void *_fmc_d = (dst); \ void const *_fmc_s = (src); \ if_pt (_fmc_d != _fmc_s) \ GASNETI_MEMCPY(_fmc_d, _fmc_s, (nbytes)); \ } while (0) #define GASNETI_MEMCPY_SAFE_EMPTY(dst,src,nbytes) do { \ size_t _fmse_n = (nbytes); \ if_pt (_fmse_n) \ GASNETI_MEMCPY((dst), (src), _fmse_n); \ } while (0) #define GASNETI_MEMCPY_SAFE(dst,src,nbytes) do { \ void *_fms_d = (dst); \ void const *_fms_s = (src); \ size_t _fms_n = (nbytes); \ if_pt (_fms_n && _fms_d != _fms_s) \ GASNETI_MEMCPY(_fms_d, _fms_s, _fms_n); \ } while (0) /* ------------------------------------------------------------------------------------ */ /* Variable-Argument Active Message Request/Reply Functions ======================================================== */ /* The following relies on __VA_ARGS__ support that was introduced in C99 and C++11. * We do not require client code to use either for compiling GASNet headers, * and this convenience interface is disabled when the necessary support is * lacking. Auto-detection can be overridden via -DGASNETI_FORCE_VA_ARG=0/1 * Consequently, GASNet public headers should NOT assume this API exists. */ #ifdef GASNETI_FORCE_VA_ARG /* manual override */ #define GASNETI_USING_VA_ARG GASNETI_FORCE_VA_ARG #else #define GASNETI_USING_VA_ARG GASNETI_COMPILER_IS_CC || \ ( GASNETI_COMPILER_IS_CXX && GASNETI_CXX_HAS_VA_ARGS ) || \ __STDC_VERSION__ >= 199901L || \ __cplusplus >= 201103L #endif #if GASNETI_USING_VA_ARG /* These macros implement six AM Request/Reply without any explicit argument count. It uses C99 variable argument pre-processor macros to count the number of arguments after 'flags' and construct a coresponding gex_AM_{Request,Reply}{Short,Medium,Long}{0..MaxArgs}() call. This does *not* depend on the varargs-based implementation which is contained in gasnet_ammacros.h. Since there is no portable way to omit a comma appearing before the expansion of an empty __VA_ARGS__, we include the 'flags' argument within the "...". So, the argument-counting macros may appear "off by one" relative to the canonical example(s). */ #define GASNETI_AMNUMARGS(...) GASNETI_AMNUMARGS_(__VA_ARGS__,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0) #define GASNETI_AMNUMARGS_(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,N,...) N #define GASNETI_AMVA(_stem,_suff,...) _CONCAT(_CONCAT(gex_AM_##_stem,GASNETI_AMNUMARGS(__VA_ARGS__)),_suff) #define gex_AM_RequestShort(tm,rank,hidx,...) \ GASNETI_AMVA(RequestShort,,__VA_ARGS__)(tm,rank,hidx,__VA_ARGS__) #define gex_AM_RequestMedium(tm,rank,hidx,src_addr,nbytes,lc_opt,...) \ GASNETI_AMVA(RequestMedium,,__VA_ARGS__)(tm,rank,hidx,src_addr,nbytes,lc_opt,__VA_ARGS__) #define gex_AM_RequestLong(tm,rank,hidx,src_addr,nbytes,dst_addr,lc_opt,...) \ GASNETI_AMVA(RequestLong,,__VA_ARGS__)(tm,rank,hidx,src_addr,nbytes,dst_addr,lc_opt,__VA_ARGS__) #define gex_AM_ReplyShort(token,hidx,...) \ GASNETI_AMVA(ReplyShort,,__VA_ARGS__)(token,hidx,__VA_ARGS__) #define gex_AM_ReplyMedium(token,hidx,src_addr,nbytes,lc_opt,...) \ GASNETI_AMVA(ReplyMedium,,__VA_ARGS__)(token,hidx,src_addr,nbytes,lc_opt,__VA_ARGS__) #define gex_AM_ReplyLong(token,hidx,src_addr,nbytes,dst_addr,lc_opt,...) \ GASNETI_AMVA(ReplyLong,,__VA_ARGS__)(token,hidx,src_addr,nbytes,dst_addr,lc_opt,__VA_ARGS__) /* Similarly provide argument-counting convenience wrappers for gex_AM_Commit{Request,Reply}{Medium,Long}, * with the same pre-requisites as above (compiler must support C99 __VA_ARGS__). * * Similarly to above, the implementation includes the last non-variadic argument (nbytes or dest_addr) * within the __VA_ARGS__, for the same reasons. */ #define gex_AM_CommitRequestMedium(sd,hidx,...) \ GASNETI_AMVA(CommitRequestMedium,,__VA_ARGS__)(sd,hidx,__VA_ARGS__) #define gex_AM_CommitReplyMedium(sd,hidx,...) \ GASNETI_AMVA(CommitReplyMedium,,__VA_ARGS__)(sd,hidx,__VA_ARGS__) #define gex_AM_CommitRequestLong(sd,hidx,nbytes,...) \ GASNETI_AMVA(CommitRequestLong,,__VA_ARGS__)(sd,hidx,nbytes,__VA_ARGS__) #define gex_AM_CommitReplyLong(sd,hidx,nbytes,...) \ GASNETI_AMVA(CommitReplyLong,,__VA_ARGS__)(sd,hidx,nbytes,__VA_ARGS__) /* Arg-counting macros for the "Commit v2" APIs differ in their need to place * "_v2" after the argumument count. * Additionally, the last non-variadic argument is commit_flags */ #define gex_AM_CommitRequestMedium_v2(sd,hidx,nbytes,...) \ GASNETI_AMVA(CommitRequestMedium,_v2,__VA_ARGS__)(sd,hidx,nbytes,__VA_ARGS__) #define gex_AM_CommitReplyMedium_v2(sd,hidx,nbytes,...) \ GASNETI_AMVA(CommitReplyMedium,_v2,__VA_ARGS__)(sd,hidx,nbytes,__VA_ARGS__) #define gex_AM_CommitRequestLong_v2(sd,hidx,nbytes,dest_addr,...) \ GASNETI_AMVA(CommitRequestLong,_v2,__VA_ARGS__)(sd,hidx,nbytes,dest_addr,__VA_ARGS__) #define gex_AM_CommitReplyLong_v2(sd,hidx,nbytes,dest_addr,...) \ GASNETI_AMVA(CommitReplyLong,_v2,__VA_ARGS__)(sd,hidx,nbytes,dest_addr,__VA_ARGS__) #endif /* ------------------------------------------------------------------------------------ */ // Internal helpers for data types (like ctypes) // Masks (disjoint pairs): #define _GEX_DT_4BYTE (GEX_DT_I32 | GEX_DT_U32 | GEX_DT_FLT) #define _GEX_DT_8BYTE (GEX_DT_I64 | GEX_DT_U64 | GEX_DT_DBL) #define _GEX_DT_INT (GEX_DT_I32 | GEX_DT_U32 | GEX_DT_I64 | GEX_DT_U64) #define _GEX_DT_FP (GEX_DT_FLT | GEX_DT_DBL) #define _GEX_DT_SIGNED (GEX_DT_I32 | GEX_DT_I64) #define _GEX_DT_UNSIGNED (GEX_DT_U32 | GEX_DT_U64) // Union of all: #define _GEX_DT_VALID (_GEX_DT_INT | _GEX_DT_FP | GEX_DT_USER) // Predicates: // Is the argument a *single* valid data type? GASNETI_INLINE(gasneti_dt_valid) GASNETI_PURE int gasneti_dt_valid(gex_DT_t _dt) { return (((_dt) & _GEX_DT_VALID) && GASNETI_POWEROFTWO(_dt)); } GASNETI_INLINE(gasneti_dt_valid_atomic) GASNETI_PURE int gasneti_dt_valid_atomic(gex_DT_t _dt) { return gasneti_dt_valid(_dt) && (_dt != GEX_DT_USER); } #define gasneti_dt_valid_reduce gasneti_dt_valid // Is the argument a (possibly empty) mask consisting of only valid data types? #define gasneti_dt_valid_mask(dts) (!((dts) & ~_GEX_DT_VALID)) #define gasneti_dt_int(dt) ((dt) & _GEX_DT_INT) #define gasneti_dt_fp(dt) ((dt) & _GEX_DT_FP) #define gasneti_dt_signed(dt) ((dt) & _GEX_DT_SIGNED) #define gasneti_dt_unsigned(dt) ((dt) & _GEX_DT_UNSIGNED) #define gasneti_dt_4byte(dt) ((dt) & _GEX_DT_4BYTE) #define gasneti_dt_8byte(dt) ((dt) & _GEX_DT_8BYTE) // Query: // What is the size of the type? // TODO: might be made cheaper by encoding size into the GEX_DT_* constants GASNETI_INLINE(gasneti_dt_size) GASNETI_PURE size_t gasneti_dt_size(gex_DT_t _dt) { gasneti_assert(!gasneti_dt_4byte(_dt) ^ !gasneti_dt_8byte(_dt)); return (size_t) (gasneti_dt_4byte(_dt) ? 4 : 8); } /* ------------------------------------------------------------------------------------ */ // Internal helpers for gex_OP_t (like ctypes) // Masks (disjoint): #define _GEX_OP_ARITH_BINARY \ (GEX_OP_ADD|GEX_OP_MULT|GEX_OP_MIN|GEX_OP_MAX) #define _GEX_OP_NC_ARITH_BINARY \ GEX_OP_SUB #define _GEX_OP_ARITH_UNARY \ (GEX_OP_INC|GEX_OP_DEC) #define _GEX_OP_BITWISE \ (GEX_OP_AND|GEX_OP_OR|GEX_OP_XOR) #define _GEX_OP_FETCH_ARITH_BINARY \ (GEX_OP_FADD|GEX_OP_FMULT|GEX_OP_FMIN|GEX_OP_FMAX) #define _GEX_OP_FETCH_NC_ARITH_BINARY \ GEX_OP_FSUB #define _GEX_OP_FETCH_ARITH_UNARY \ (GEX_OP_FINC|GEX_OP_FDEC) #define _GEX_OP_FETCH_BITWISE \ (GEX_OP_FAND|GEX_OP_FOR|GEX_OP_FXOR) #define _GEX_OP_ACCESSOR \ (GEX_OP_SET|GEX_OP_CAS) #define _GEX_OP_FETCH_ACCESSOR \ (GEX_OP_GET|GEX_OP_SWAP|GEX_OP_FCAS) #define _GEX_OP_USER_REDUCE \ (GEX_OP_USER|GEX_OP_USER_NC) // Masks for various properties: #define _GEX_OP_REDUCE \ (_GEX_OP_ARITH_BINARY|_GEX_OP_BITWISE|_GEX_OP_USER_REDUCE) #define _GEX_OP_ATOMIC \ (_GEX_OP_ARITH_BINARY | _GEX_OP_FETCH_ARITH_BINARY | \ _GEX_OP_NC_ARITH_BINARY | _GEX_OP_FETCH_NC_ARITH_BINARY | \ _GEX_OP_ARITH_UNARY | _GEX_OP_FETCH_ARITH_UNARY | \ _GEX_OP_BITWISE | _GEX_OP_FETCH_BITWISE | \ _GEX_OP_ACCESSOR | _GEX_OP_FETCH_ACCESSOR) #define _GEX_OP_VALID \ (_GEX_OP_REDUCE | _GEX_OP_ATOMIC) #define _GEX_OP_INT \ _GEX_OP_VALID #define _GEX_OP_FP \ (_GEX_OP_ARITH_BINARY | _GEX_OP_FETCH_ARITH_BINARY | \ _GEX_OP_NC_ARITH_BINARY | _GEX_OP_FETCH_NC_ARITH_BINARY | \ _GEX_OP_ARITH_UNARY | _GEX_OP_FETCH_ARITH_UNARY | \ _GEX_OP_ACCESSOR | _GEX_OP_FETCH_ACCESSOR | \ _GEX_OP_USER_REDUCE) #define _GEX_OP_FETCH \ (_GEX_OP_FETCH_ARITH_BINARY | \ _GEX_OP_FETCH_NC_ARITH_BINARY | \ _GEX_OP_FETCH_ARITH_UNARY | \ _GEX_OP_FETCH_BITWISE | \ _GEX_OP_FETCH_ACCESSOR) #define _GEX_OP_0ARG \ (GEX_OP_GET | \ _GEX_OP_ARITH_UNARY | _GEX_OP_FETCH_ARITH_UNARY) #define _GEX_OP_1ARG \ (GEX_OP_SET | GEX_OP_SWAP |\ _GEX_OP_ARITH_BINARY | _GEX_OP_FETCH_ARITH_BINARY | \ _GEX_OP_NC_ARITH_BINARY | _GEX_OP_FETCH_NC_ARITH_BINARY | \ _GEX_OP_BITWISE | _GEX_OP_FETCH_BITWISE) #define _GEX_OP_2ARG \ (GEX_OP_FCAS | GEX_OP_CAS) // Predicates for use with single-bit arguments: #define gasneti_op_reduce(op) ((op) & _GEX_OP_REDUCE) #define gasneti_op_atomic(op) ((op) & _GEX_OP_ATOMIC) #define gasneti_op_int(op) ((op) & _GEX_OP_INT) #define gasneti_op_fp(op) ((op) & _GEX_OP_FP) #define gasneti_op_fetch(op) ((op) & _GEX_OP_FETCH) #define gasneti_op_0arg(op) ((op) & _GEX_OP_0ARG) #define gasneti_op_1arg(op) ((op) & _GEX_OP_1ARG) #define gasneti_op_2arg(op) ((op) & _GEX_OP_2ARG) // Is the argument a *single* valid operation? GASNETI_INLINE(gasneti_op_valid) GASNETI_PURE int gasneti_op_valid(gex_OP_t _op) { return (((_op) & _GEX_OP_VALID) && GASNETI_POWEROFTWO(_op)); } GASNETI_INLINE(gasneti_op_valid_atomic) GASNETI_PURE int gasneti_op_valid_atomic(gex_OP_t _op) { return gasneti_op_valid(_op) && gasneti_op_atomic(_op); } GASNETI_INLINE(gasneti_op_valid_reduce) GASNETI_PURE int gasneti_op_valid_reduce(gex_OP_t _op) { return gasneti_op_valid(_op) && gasneti_op_reduce(_op); } // Predicates on masks: // All bits (if any) must satisfy the predicate. // As defined, however, these are trivially true on empty sets. #define gasneti_op_valid_mask(ops) (!((ops) & ~_GEX_OP_VALID)) #define gasneti_op_reduce_mask(ops) (!((ops) & ~_GEX_OP_REDUCE)) #define gasneti_op_atomic_mask(ops) (!((ops) & ~_GEX_OP_ATOMIC)) #define gasneti_op_int_mask(ops) (!((ops) & ~_GEX_OP_INT)) #define gasneti_op_fp_mask(ops) (!((ops) & ~_GEX_OP_FP)) /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/gasnet_handler_internal.h0000664000175000017500000002524115142313673020451 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_handler_internal.h $ * Description: GASNet Helpers for using bit-width-independent AM handlers * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ // NOTICE: // While gasnet_handler.h was a "pseudo-public" header in GASNet-1, we are // no longer providing the analog in GASNet-EX. Any clients in need of the // GASNet-1 gasnet_handler.h will find it in the other/contrib directory. #ifndef _GASNET_HANDLER_INTERNAL_H #define _GASNET_HANDLER_INTERNAL_H /* argument-list macros */ #define ARGS0 #define ARGS1 , gex_AM_Arg_t a0 #define ARGS2 , gex_AM_Arg_t a0, gex_AM_Arg_t a1 #define ARGS3 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2 #define ARGS4 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3 #define ARGS5 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4 #define ARGS6 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4, gex_AM_Arg_t a5 #define ARGS7 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4, gex_AM_Arg_t a5, gex_AM_Arg_t a6 #define ARGS8 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4, gex_AM_Arg_t a5, gex_AM_Arg_t a6, gex_AM_Arg_t a7 #define ARGS9 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4, gex_AM_Arg_t a5, gex_AM_Arg_t a6, gex_AM_Arg_t a7, \ gex_AM_Arg_t a8 #define ARGS10 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4, gex_AM_Arg_t a5, gex_AM_Arg_t a6, gex_AM_Arg_t a7, \ gex_AM_Arg_t a8, gex_AM_Arg_t a9 #define ARGS11 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4, gex_AM_Arg_t a5, gex_AM_Arg_t a6, gex_AM_Arg_t a7, \ gex_AM_Arg_t a8, gex_AM_Arg_t a9, gex_AM_Arg_t a10 #define ARGS12 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4, gex_AM_Arg_t a5, gex_AM_Arg_t a6, gex_AM_Arg_t a7, \ gex_AM_Arg_t a8, gex_AM_Arg_t a9, gex_AM_Arg_t a10, gex_AM_Arg_t a11 #define ARGS13 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4, gex_AM_Arg_t a5, gex_AM_Arg_t a6, gex_AM_Arg_t a7, \ gex_AM_Arg_t a8, gex_AM_Arg_t a9, gex_AM_Arg_t a10, gex_AM_Arg_t a11, \ gex_AM_Arg_t a12 #define ARGS14 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4, gex_AM_Arg_t a5, gex_AM_Arg_t a6, gex_AM_Arg_t a7, \ gex_AM_Arg_t a8, gex_AM_Arg_t a9, gex_AM_Arg_t a10, gex_AM_Arg_t a11, \ gex_AM_Arg_t a12, gex_AM_Arg_t a13 #define ARGS15 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4, gex_AM_Arg_t a5, gex_AM_Arg_t a6, gex_AM_Arg_t a7, \ gex_AM_Arg_t a8, gex_AM_Arg_t a9, gex_AM_Arg_t a10, gex_AM_Arg_t a11, \ gex_AM_Arg_t a12, gex_AM_Arg_t a13, gex_AM_Arg_t a14 #define ARGS16 , gex_AM_Arg_t a0, gex_AM_Arg_t a1, gex_AM_Arg_t a2, gex_AM_Arg_t a3, \ gex_AM_Arg_t a4, gex_AM_Arg_t a5, gex_AM_Arg_t a6, gex_AM_Arg_t a7, \ gex_AM_Arg_t a8, gex_AM_Arg_t a9, gex_AM_Arg_t a10, gex_AM_Arg_t a11, \ gex_AM_Arg_t a12, gex_AM_Arg_t a13, gex_AM_Arg_t a14, gex_AM_Arg_t a15 #define ARGNAMES0 #define ARGNAMES1 , a0 #define ARGNAMES2 , a0, a1 #define ARGNAMES3 , a0, a1, a2 #define ARGNAMES4 , a0, a1, a2, a3 #define ARGNAMES5 , a0, a1, a2, a3, a4 #define ARGNAMES6 , a0, a1, a2, a3, a4, a5 #define ARGNAMES7 , a0, a1, a2, a3, a4, a5, a6 #define ARGNAMES8 , a0, a1, a2, a3, a4, a5, a6, a7 #define ARGNAMES9 , a0, a1, a2, a3, a4, a5, a6, a7, a8 #define ARGNAMES10 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9 #define ARGNAMES11 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 #define ARGNAMES12 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 #define ARGNAMES13 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 #define ARGNAMES14 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 #define ARGNAMES15 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 #define ARGNAMES16 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 /* ===================================== Pointer-width abstraction support ===================================== AM arguments are always 32-bits wide, but PTR64 platforms need the ability to send their 64-bit pointers as arguments. We do this by packing pointers into 2 arguments. The macros below support this packing/unpacking so you can write the calls and handlers once and generate the packing/unpacking code automatically as required for the platform. */ /* AM send call macros (use instead of direct calls to e.g. gex_AM_RequestShort2) Usage: cnt32 = the number of args needed for AM call on PTR32 platform cnt64 = the number of args needed for AM call on PTR64 platform args = parenthesized argument list for AM request/reply call, with any pointer args wrapped in a PACK() macro */ #if PLATFORM_ARCH_32 #define SHORT_REQ(cnt32, cnt64, args) gex_AM_RequestShort ## cnt32 args #define SHORT_REP(cnt32, cnt64, args) gex_AM_ReplyShort ## cnt32 args #define MEDIUM_REQ(cnt32, cnt64, args) gex_AM_RequestMedium ## cnt32 args #define MEDIUM_REP(cnt32, cnt64, args) gex_AM_ReplyMedium ## cnt32 args #define LONG_REQ(cnt32, cnt64, args) gex_AM_RequestLong ## cnt32 args #define LONG_REP(cnt32, cnt64, args) gex_AM_ReplyLong ## cnt32 args #elif PLATFORM_ARCH_64 #define SHORT_REQ(cnt32, cnt64, args) gex_AM_RequestShort ## cnt64 args #define SHORT_REP(cnt32, cnt64, args) gex_AM_ReplyShort ## cnt64 args #define MEDIUM_REQ(cnt32, cnt64, args) gex_AM_RequestMedium ## cnt64 args #define MEDIUM_REP(cnt32, cnt64, args) gex_AM_ReplyMedium ## cnt64 args #define LONG_REQ(cnt32, cnt64, args) gex_AM_RequestLong ## cnt64 args #define LONG_REP(cnt32, cnt64, args) gex_AM_ReplyLong ## cnt64 args #endif /* pointer packing/unpacking helper macros */ #if PLATFORM_ARCH_32 #define PACK(ptr) ((gex_AM_Arg_t)(ptr)) #define UNPACK(a0) ((void *)a0) #elif PLATFORM_ARCH_64 #define PACK(ptr) ((gex_AM_Arg_t)GASNETI_HIWORD(ptr)), ((gex_AM_Arg_t)GASNETI_LOWORD(ptr)) #define UNPACK2(a0,a1) ((void *)GASNETI_MAKEWORD(a0,a1)) #endif #ifndef GASNETI_HANDLER_SCOPE #define GASNETI_HANDLER_SCOPE extern #endif #if PLATFORM_ARCH_32 #define SHORT_HANDLER_DECL(name, cnt32, cnt64) \ GASNETI_HANDLER_SCOPE void name ## _32(gex_Token_t token ARGS ## cnt32) #define SHORT_HANDLER(name, cnt32, cnt64, innerargs32, innerargs64) \ GASNETI_HANDLER_SCOPE void name ## _32(gex_Token_t token ARGS ## cnt32) { \ name ## _inner innerargs32 ; \ } static int _dummy_##name = sizeof(_dummy_##name) #define MEDIUM_HANDLER_DECL(name, cnt32, cnt64) \ GASNETI_HANDLER_SCOPE void name ## _32(gex_Token_t token, void *addr, size_t nbytes \ ARGS ## cnt32) #define MEDIUM_HANDLER(name, cnt32, cnt64, innerargs32, innerargs64) \ GASNETI_HANDLER_SCOPE void name ## _32(gex_Token_t token, void *addr, size_t nbytes \ ARGS ## cnt32) { \ name ## _inner innerargs32 ; \ } static int _dummy_##name = sizeof(_dummy_##name) #elif PLATFORM_ARCH_64 #define SHORT_HANDLER_DECL(name, cnt32, cnt64) \ GASNETI_HANDLER_SCOPE void name ## _64(gex_Token_t token ARGS ## cnt64) #define SHORT_HANDLER(name, cnt32, cnt64, innerargs32, innerargs64) \ GASNETI_HANDLER_SCOPE void name ## _64(gex_Token_t token ARGS ## cnt64) { \ name ## _inner innerargs64 ; \ } static int _dummy_##name = sizeof(_dummy_##name) #define MEDIUM_HANDLER_DECL(name, cnt32, cnt64) \ GASNETI_HANDLER_SCOPE void name ## _64(gex_Token_t token, void *addr, size_t nbytes \ ARGS ## cnt64) #define MEDIUM_HANDLER(name, cnt32, cnt64, innerargs32, innerargs64) \ GASNETI_HANDLER_SCOPE void name ## _64(gex_Token_t token, void *addr, size_t nbytes \ ARGS ## cnt64) { \ name ## _inner innerargs64 ; \ } static int _dummy_##name = sizeof(_dummy_##name) #endif /* convenience declarators for bit-width-independent handlers */ #define SHORT_HANDLER_NOBITS_DECL(name, cnt) \ GASNETI_HANDLER_SCOPE void name(gex_Token_t token ARGS ## cnt) #define MEDIUM_HANDLER_NOBITS_DECL(name, cnt) \ GASNETI_HANDLER_SCOPE void name(gex_Token_t token, void *addr, size_t nbytes ARGS ## cnt) /* long and medium handlers have the same signature */ #define LONG_HANDLER MEDIUM_HANDLER #define LONG_HANDLER_DECL MEDIUM_HANDLER_DECL #define LONG_HANDLER_NOBITS_DECL MEDIUM_HANDLER_NOBITS_DECL /* handler table construction */ #define gasneti_handleridx(fnname) _hidx_ ## fnname #define _gasneti_handler_tableentry_flags(required_flag1, required_flag2, optional_flags) \ (GEX_FLAG_AM_##required_flag1 | GEX_FLAG_AM_##required_flag2 | optional_flags) #define gasneti_handler_tableentry_no_bits(fnname, nargs, required_flag1, required_flag2, optional_flags) \ { gasneti_handleridx(fnname), (gex_AM_Fn_t)(fnname), \ _gasneti_handler_tableentry_flags(required_flag1, required_flag2, optional_flags), \ (nargs), NULL, _STRINGIFY(fnname) } #if PLATFORM_ARCH_32 #define gasneti_handler_tableentry_with_bits(fnname, nargs32, nargs64, required_flag1, required_flag2, optional_flags) \ { gasneti_handleridx(fnname), (gex_AM_Fn_t)(fnname ## _32), \ _gasneti_handler_tableentry_flags(required_flag1, required_flag2, optional_flags), \ (nargs32), NULL, _STRINGIFY(fnname) } #elif PLATFORM_ARCH_64 #define gasneti_handler_tableentry_with_bits(fnname, nargs32, nargs64, required_flag1, required_flag2, optional_flags) \ { gasneti_handleridx(fnname), (gex_AM_Fn_t)(fnname ## _64), \ _gasneti_handler_tableentry_flags(required_flag1, required_flag2, optional_flags), \ (nargs64), NULL, _STRINGIFY(fnname) } #endif #define GASNETI_HANDLER_EOT {0,NULL,0,0,NULL,NULL} #define GASNETI_HANDLER_NARGS_UNK 255 #endif gasnet-2025.8.0/ibv-conduit/0000775000175000017500000000000015142313673015645 5ustar alastairalastairgasnet-2025.8.0/ibv-conduit/conduit.mak.in0000664000175000017500000000411415142313673020411 0ustar alastairalastair#INSTRUCTIONS# Conduit-specific Makefile fragment settings #INSTRUCTIONS# #INSTRUCTIONS# The contents of this file are embedded into the #INSTRUCTIONS# *-(seq,par,parsync).mak Makefile fragments at conduit build time #INSTRUCTIONS# The settings in those fragments are used to build GASNet clients #INSTRUCTIONS# (including the GASNet tests). #INSTRUCTIONS# See the conduit-writer instructions in the generated fragments #INSTRUCTIONS# or $(top_srcdir)/other/fragment-head.mak.in for usage info. # When ibv-conduit uses an MPI-based bootstrapper, we must # link using the system MPI compiler @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LD_OVERRIDE = @MPI_CC@ @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LDFLAGS_OVERRIDE = @MPI_CFLAGS@ @LDFLAGS@ @HAVE_BOOTSTRAP_MPI_TRUE@MPI_COMPAT_LIBS = @MPI_LIBS@ # Linker feature requirements embedded in GASNET_LD(FLAGS) which are not satisfied solely by GASNET_LIBS # (eg possible dependence on implicit MPI or C++ libraries added by a linker wrapper in GASNET_LD): @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LD_REQUIRES_MPI = 1 # Some platforms need extra -libs for the socket calls in ssh-spawner: @HAVE_BOOTSTRAP_SSH_TRUE@SSH_LIBS = @SSH_SPAWNER_LIBS@ CONDUIT_INCLUDES = -I@TOP_SRCDIR@/other/firehose ###NOINSTALL### CONDUIT_LDFLAGS = @IBV_LDFLAGS@ @PMI_SPAWNER_LDFLAGS@ @HWLOC_LDFLAGS@ @CUDA_UVA_LDFLAGS@ @HIP_LDFLAGS@ CONDUIT_LIBS = @IBV_LIBS@ $(MPI_COMPAT_LIBS) $(SSH_LIBS) @PMI_SPAWNER_LIBS@ @HWLOC_LIBS@ @CUDA_UVA_LIBS@ @HIP_LIBS@ # If ibv-conduit has internal conduit threads, then it needs # threading flags and libs - even in GASNET_SEQ mode @IBV_SEQ_THREADS_TRUE@CONDUIT_DEFINES_SEQ = @GASNET_THREAD_DEFINES@ @IBV_SEQ_THREADS_TRUE@CONDUIT_LIBS_SEQ = @GASNET_THREAD_LIBS@ # Clients may want/need to know which spawners we support: GASNET_SPAWNER_DEFAULT = @GASNET_IBV_SPAWNER_CONF@ GASNET_SPAWNER_FORK = 0 @HAVE_BOOTSTRAP_PMI_TRUE@GASNET_SPAWNER_PMI = 1 @HAVE_BOOTSTRAP_PMI_FALSE@GASNET_SPAWNER_PMI = 0 @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_SPAWNER_MPI = 1 @HAVE_BOOTSTRAP_MPI_FALSE@GASNET_SPAWNER_MPI = 0 @HAVE_BOOTSTRAP_SSH_TRUE@GASNET_SPAWNER_SSH = 1 @HAVE_BOOTSTRAP_SSH_FALSE@GASNET_SPAWNER_SSH = 0 gasnet-2025.8.0/ibv-conduit/gasnet_core_sndrcv.c0000664000175000017500000044547315142313673021702 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_core_sndrcv.c $ * Description: GASNet ibv conduit implementation, transport send/receive logic * Copyright 2003, LBNL * Terms of use are as specified in license.txt */ #include #include #include #include #include #include #include /* ------------------------------------------------------------------------------------ * * Configuration * * ------------------------------------------------------------------------------------ */ /* If running w/ threads (locks) we want to coalesce calls to gasnetc_lifo_push(&gasnetc_bbuf_freelist,*) and firehose_release(). However, when no threads (no locks) are present, we don't want to pay the overhead for coalescing. */ #if GASNETC_ANY_PAR #define GASNETC_SND_REAP_COLLECT 1 #else #define GASNETC_SND_REAP_COLLECT 0 #endif /* ------------------------------------------------------------------------------------ * * Global variables * * ------------------------------------------------------------------------------------ */ size_t gasnetc_fh_align; size_t gasnetc_fh_align_mask; size_t gasnetc_inline_limit; size_t gasnetc_nonbulk_bounce_limit; size_t gasnetc_packedlong_limit; // TODO-EX: adjust w/ nargs? size_t gasnetc_put_stripe_sz, gasnetc_put_stripe_split; size_t gasnetc_get_stripe_sz, gasnetc_get_stripe_split; #if !GASNETC_PIN_SEGMENT size_t gasnetc_putinmove_limit; #endif int gasnetc_use_rcv_thread = GASNETC_USE_RCV_THREAD; int gasnetc_use_snd_thread = GASNETC_USE_SND_THREAD; #if GASNETC_FH_OPTIONAL int gasnetc_use_firehose = 1; #endif #if GASNETC_IBV_SRQ int gasnetc_use_srq = 1; #endif #if GASNETC_IBV_XRC int gasnetc_use_xrc = 1; #endif #if GASNETC_IBV_ODP int gasnetc_use_odp = 1; #endif #if GASNETC_HAVE_FENCED_PUTS int gasnetc_use_fenced_puts = 0; #endif int gasnetc_am_credits_slack; int gasnetc_am_credits_slack_orig; int gasnetc_alloc_qps; int gasnetc_num_qps; #if GASNETC_USE_RCV_THREAD && GASNETC_SERIALIZE_POLL_CQ int gasnetc_rcv_thread_poll_serialize = -1; int gasnetc_rcv_thread_poll_exclusive = -1; #endif #if GASNETC_USE_SND_THREAD && GASNETC_SERIALIZE_POLL_CQ int gasnetc_snd_thread_poll_serialize = -1; int gasnetc_snd_thread_poll_exclusive = -1; #endif // TODO: multi-client will need this to be per-client #define GASNETC_MAX_PROGRESS_THREADS (GASNET_IBV_MAX_HCAS * (GASNETC_USE_RCV_THREAD + GASNETC_USE_SND_THREAD)) static unsigned int gasnetc_progress_thread_count; static gex_ProgressThreadInfo_t gasnetc_progress_thread_info[GASNETC_MAX_PROGRESS_THREADS+1]; // +1 avoid potential errors on 0 #if GASNETC_PIN_SEGMENT // Rkeys for non-primordial remote EPs // One dense array per ep_index, allocated lazily // TODO: more scalable storage (bug 4088) uint32_t *gasnetc_np_rkeys[GASNET_MAXEPS] = {NULL, }; #endif /* ------------------------------------------------------------------------------------ * * File-scoped types * * ------------------------------------------------------------------------------------ */ /* Per-thread data * Unlike gasneti_threaddata_t, this is associated w/ conduit-internal threads as well. */ typedef struct { /* Thread-local list of sreq's. */ gasnetc_sreq_t *sreqs; /* Nothing else yet, but lockfree algorithms for (at least) x84_64 will also need * some thread-local data if they are ever implemented. */ } gasnetc_per_thread_t; /* ------------------------------------------------------------------------------------ * * File-scoped variables * ------------------------------------------------------------------------------------ */ #if GASNETC_HAVE_FENCED_PUTS static int gasnetc_op_needs_fence_mask; #endif #if !GASNETC_PIN_SEGMENT static size_t gasnetc_putinmove_limit_adjusted = 0; #endif static gasnetc_lifo_head_t gasnetc_bbuf_freelist = GASNETC_LIFO_INITIALIZER; static gasnetc_sema_t *gasnetc_cq_semas = NULL; /* Shared between gasnetc_sndrcv_{limits,init}() */ static int gasnetc_op_oust_per_qp; static int gasnetc_am_rqst_per_qp; static int gasnetc_rbuf_spares; /* ------------------------------------------------------------------------------------ * * File-scoped completion callbacks * ------------------------------------------------------------------------------------ */ // EOP completion callbacks extern void gasnetc_cb_eop_alc(gasnetc_atomic_val_t *p) { gasnete_eop_t *eop = gasneti_container_of(p, gasnete_eop_t, initiated_alc); gasnete_eop_check(eop); (void) gasnetc_complete_eop(eop, gasnetc_comptype_eop_alc); } extern void gasnetc_cb_eop_put(gasnetc_atomic_val_t *p) { gasnete_eop_t *eop = gasneti_container_of(p, gasnete_eop_t, initiated_cnt); gasnete_eop_check(eop); (void) gasnetc_complete_eop(eop, gasnetc_comptype_eop_put); } extern void gasnetc_cb_eop_get(gasnetc_atomic_val_t *p) { gasnete_eop_t *eop = gasneti_container_of(p, gasnete_eop_t, initiated_cnt); gasnete_eop_check(eop); (void) gasnetc_complete_eop(eop, gasnetc_comptype_eop_get); } // NAR (nbi-accessregion) completion callbacks extern void gasnetc_cb_nar_alc(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_alc_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_REG(iop, alc, 1, GASNETI_ATOMIC_NONE); } extern void gasnetc_cb_nar_put(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_put_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_REG(iop, put, 1, GASNETI_ATOMIC_NONE); } extern void gasnetc_cb_nar_get(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_get_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_REG(iop, get, 1, GASNETI_ATOMIC_REL); } // IOP (non accessregion) completion callbacks extern void gasnetc_cb_iop_alc(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_alc_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_INT(iop, alc, 1, GASNETI_ATOMIC_NONE); } extern void gasnetc_cb_iop_put(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_put_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_INT(iop, put, 1, GASNETI_ATOMIC_NONE); } extern void gasnetc_cb_iop_get(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_get_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_INT(iop, get, 1, GASNETI_ATOMIC_REL); } // gasnetc_counter_t completion callbacks extern void gasnetc_cb_counter(gasnetc_atomic_val_t *cnt) { gasnetc_counter_t *counter = gasneti_container_of(cnt, gasnetc_counter_t, initiated); gasnetc_atomic_increment(&counter->completed, 0); } extern void gasnetc_cb_counter_rel(gasnetc_atomic_val_t *cnt) { gasnetc_counter_t *counter = gasneti_container_of(cnt, gasnetc_counter_t, initiated); gasnetc_atomic_increment(&counter->completed, GASNETI_ATOMIC_REL); } /* ------------------------------------------------------------------------------------ * * AuxSeg space for IBV-level Atomic ops (including GEX Ratomics and fencing of multi-rail Puts). * ------------------------------------------------------------------------------------ */ #if GASNETC_IB_MAX_HCAS > 1 gasnet_seginfo_t *gasnetc_fence_auxseg = NULL; #endif uint64_t *gasnetc_ratomic_sink = NULL; // TODO: one per HCA gasneti_auxseg_request_t gasnetc_atomics_auxseg_alloc(gasnet_seginfo_t *auxseg_info) { gasneti_auxseg_request_t retval; gasneti_assert_always_int(GASNETI_CACHE_LINE_BYTES ,>=, sizeof(uint64_t)); // TODO: distinct allocations for each HCA (via `cep` argument to macros) // One cache line used as local dst (sink) for both non-fetching RAtomics, // and for the AMO used in fenced puts, if enabled int request = 1; // A second cache line for use as remote AMO target in fenced puts, if enabled request += GASNETC_USE_FENCED_PUTS ? 1 :0; #if GASNETC_BUILD_IBVRATOMIC // Some number of cache lines for buffering fetching RAtomics int buffer_start = request; request += gasnetc_ratomicbuf_limit; #endif retval.minsz = retval.optimalsz = request * GASNETI_CACHE_LINE_BYTES; if (auxseg_info) { /* auxseg granted */ gasnetc_ratomic_sink = (uint64_t*)auxseg_info[gasneti_mynode].addr; #if GASNETC_IB_MAX_HCAS > 1 if (GASNETC_USE_FENCED_PUTS) { // TODO: this use of auxseg is yet another O(ranks) table we must seek to eliminate // TODO: at a minimum we can save about half the space by only keeping addr (not len) gasneti_assert(!gasnetc_fence_auxseg); gasnetc_fence_auxseg = gasneti_malloc(gasneti_nodes*sizeof(gasnet_seginfo_t)); memcpy(gasnetc_fence_auxseg, auxseg_info, gasneti_nodes*sizeof(gasnet_seginfo_t)); GASNETI_MEMCPY(gasnetc_fence_auxseg, auxseg_info, gasneti_nodes*sizeof(gasnet_seginfo_t)); gasneti_assert_uint((uintptr_t)GASNETC_RATOMIC_SINK(NULL) ,==, GASNETC_FENCE_LOC_ADDR(NULL)); } #endif #if GASNETC_BUILD_IBVRATOMIC // Freelist of buffers uint8_t *buff = (uint8_t *)(buffer_start*GASNETI_CACHE_LINE_BYTES + (uintptr_t)auxseg_info[gasneti_mynode].addr); for (int i = 0 ; i < gasnetc_ratomicbuf_limit; ++i) { gasnetc_lifo_push(&gasnetc_ratomicbuf_freelist, buff); buff += GASNETI_CACHE_LINE_BYTES; } gasneti_assert_ptr(buff ,<=, (uint8_t*)auxseg_info[gasneti_mynode].addr + auxseg_info[gasneti_mynode].size); #endif } return retval; } /* ------------------------------------------------------------------------------------ * * File-scoped functions and macros * * ------------------------------------------------------------------------------------ */ #if GASNETI_MAX_THREADS > 1 /* Note: first word of thread data is reserved for core */ #define gasnetc_my_perthread() (gasnetc_per_thread_t *)(*(void**)(GASNETI_MYTHREAD)) /* Since we use system-level AMs between gasnetc_sndrcv_init and gasnete_init(), the TLD will get initialized at first use in the AM Request path anyway. */ #define gasnetc_per_thread_setup() ((void)0) #else static gasnetc_per_thread_t gasnetc_per_thread; #define gasnetc_my_perthread() (&gasnetc_per_thread) #define gasnetc_per_thread_setup() gasnetc_per_thread_init(&gasnetc_per_thread) #endif static void gasnetc_free_aligned(void *ptr) { gasneti_free_aligned(ptr); } #define GASNETC_SREQS_GROWTHCNT 32 /* sreq list always grown by this size increment */ static void gasnetc_free_sreqs(void *_ptr) { gasnetc_sreq_t *ptr = (gasnetc_sreq_t *)_ptr; int i; /* sreqs for AM sends may still be live on the adapter and thus unsafe to free */ for (i = 0; i < GASNETC_SREQS_GROWTHCNT; i++) { while (ptr->opcode != GASNETC_OP_FREE) { gasnetc_snd_reap(1); if (ptr->opcode != GASNETC_OP_FREE) gasneti_sched_yield(); } ptr = (gasnetc_sreq_t *)GASNETI_ALIGNUP(ptr+1, GASNETI_CACHE_LINE_BYTES); } gasneti_free_aligned(_ptr); } GASNETI_INLINE(gasnetc_alloc_sreqs) void gasnetc_alloc_sreqs(gasnetc_sreq_t **head_p, gasnetc_sreq_t **tail_p GASNETI_THREAD_FARG) { const int count = GASNETC_SREQS_GROWTHCNT; size_t bytes = GASNETI_ALIGNUP(sizeof(gasnetc_sreq_t), GASNETI_CACHE_LINE_BYTES); gasnetc_sreq_t *ptr = gasneti_malloc_aligned(GASNETI_CACHE_LINE_BYTES, count * bytes); int i; gasneti_leak_aligned(ptr); gasnete_register_threadcleanup(gasnetc_free_sreqs, ptr); *head_p = ptr; for (i = 1; i < count; ++i, ptr = ptr->next) { ptr->next = (gasnetc_sreq_t *)((uintptr_t)ptr + bytes); ptr->opcode = GASNETC_OP_FREE; } ptr->opcode = GASNETC_OP_FREE; *tail_p = ptr; GASNETC_STAT_EVENT_VAL(ALLOC_SREQ, count); } static void gasnetc_per_thread_init(gasnetc_per_thread_t *td) { GASNET_BEGIN_FUNCTION(); // OK - not a critical-path gasnetc_sreq_t *tail; gasnetc_alloc_sreqs(&td->sreqs, &tail GASNETI_THREAD_PASS); tail->next = td->sreqs; } extern void gasnetc_new_threaddata_callback(void **core_threadinfo) { gasnetc_per_thread_t *result; #if GASNETI_MAX_THREADS > 1 result = gasneti_malloc_aligned(GASNETI_CACHE_LINE_BYTES, GASNETI_ALIGNUP(sizeof(gasnetc_per_thread_t), GASNETI_CACHE_LINE_BYTES)); gasneti_leak_aligned(result); gasnete_register_threadcleanup(gasnetc_free_aligned, result); #else result = &gasnetc_per_thread; #endif gasnetc_per_thread_init(result); *core_threadinfo = (void*) result; } /* ------------------------------------------------------------------------------------ */ extern int gasnetc_create_cq(struct ibv_context * hca_hndl, int req_size, struct ibv_cq * *cq_p, int *act_size, gasnetc_progress_thread_t *pthr_p) { struct ibv_comp_channel * compl = NULL; struct ibv_cq * result; #if GASNETI_CONDUIT_THREADS if (pthr_p) { compl = ibv_create_comp_channel(hca_hndl); GASNETC_IBV_CHECK_PTR(compl, "from ibv_create_comp_channel"); } #endif result = ibv_create_cq(hca_hndl, req_size, NULL, compl, 0); GASNETC_IBV_CHECK_PTR(result, "from ibv_create_cq()"); #if GASNETI_CONDUIT_THREADS if (pthr_p) { int rc = ibv_req_notify_cq(result, 0); GASNETC_IBV_CHECK(rc, "while requesting cq events"); memset(pthr_p, 0, sizeof(*pthr_p)); pthr_p->compl = compl; pthr_p->cq = result; } #endif if_pt (result != NULL) { *cq_p = result; *act_size = result->cqe; return 0; } else { return 1; } } // Simple round-robin (w/ a harmless multi-thread race) // Note use of casts to volatile ensure the compiler will not move the accesses // (reads earlier, or writes later) so as to defeat the entire purpose of // advancing a counter to be observed by other threads. #if GASNETC_ANY_PAR #define GASNETC_WEAK_COUNTER_DECL(var,val) \ static struct { \ char pad0[GASNETI_CACHE_LINE_BYTES]; \ int cntr; \ char pad1[GASNETI_CACHE_LINE_BYTES-sizeof(int)]; \ } var = {{0},(val),{0}} #define GASNETC_WEAK_COUNTER_READ(var) \ (*(volatile int *)(&(var).cntr)) #define GASNETC_WEAK_COUNTER_WRITE(var,val) \ do { *(volatile int *)(&(var).cntr) = (val); } while (0) #else #define GASNETC_WEAK_COUNTER_DECL(var,val) \ static int var = (val) #define GASNETC_WEAK_COUNTER_READ(var) \ (*(volatile int *)&(var)) #define GASNETC_WEAK_COUNTER_WRITE(var,val) \ do { *(volatile int *)&(var) = (val); } while (0) #endif #if GASNETC_IB_MAX_HCAS > 1 #define GASNETC_HCA_IDX(_cep) ((_cep)->hca_index) #else #define GASNETC_HCA_IDX(_cep) 0 #endif #define GASNETC_FH_RKEY(_cep, _fhptr) ((_fhptr)->client.rkey[GASNETC_HCA_IDX(_cep)]) #define GASNETC_FH_LKEY(_cep, _fhptr) ((_fhptr)->client.lkey[GASNETC_HCA_IDX(_cep)]) // TODO-EX: following functions are a hack for multi-segment keys, which // should be replaced with more general multi-registration support later. #if GASNETC_PIN_SEGMENT // idx = -1 is aux segment // idx = 0 is primordial segment // idx > 0 is non-primordial segment GASNETI_INLINE(gasnetc_seg_rkey) uint32_t gasnetc_seg_rkey(gasnetc_cep_t *cep, int idx) { if (!idx) { return GASNETC_SEG_RKEY(cep); } else if (idx < 0) { return cep->hca->aux_rkeys[gasnetc_epid2node(cep->epid)]; } else { gasneti_assume(idx < GASNET_MAXEPS); gasneti_assert(gasnetc_np_rkeys[idx]); size_t offset = gasnetc_num_hcas * gasnetc_epid2node(cep->epid) + GASNETC_HCA_IDX(cep); return gasnetc_np_rkeys[idx][offset]; } } GASNETI_INLINE(gasnetc_seg_lkey) uint32_t gasnetc_seg_lkey(gasnetc_EP_t ep, gasnetc_cep_t *cep, int is_aux) { gasneti_assert(ep); return ( ! is_aux ) ? GASNETC_SEG_LKEY(ep, cep) : cep->hca->aux_reg.handle->lkey; } #endif // GASNETC_PIN_SEGMENT /* This limits the amount we ask for in a firehose_{local,remote}_pin() call, * to enourage a steady-state layout of firehoses that has start and end addresses * at multpiles of gasnetc_fh_align and length 2*gasnetc_fh_align. * This will look sort of like two courses of bricks. */ GASNETI_INLINE(gasnetc_fh_aligned_len) size_t gasnetc_fh_aligned_len(uintptr_t start, size_t len) { size_t result = 2 * gasnetc_fh_align - (start & gasnetc_fh_align_mask); return MIN(len, result); } GASNETI_INLINE(gasnetc_fh_aligned_local_pin) const firehose_request_t *gasnetc_fh_aligned_local_pin(uintptr_t start, size_t len) { const firehose_request_t *result = firehose_local_pin(start, gasnetc_fh_aligned_len(start, len), NULL); if_pf (! gasneti_valid_client_t(& result->client)) { // Failed memory registration (e.g. read-only memory) firehose_release(&result, 1); return NULL; } gasneti_assume(result != NULL); return result; } GASNETI_INLINE(gasnetc_fh_try_local_pin) const firehose_request_t *gasnetc_fh_try_local_pin(uintptr_t start, size_t len) { const firehose_request_t *result = firehose_try_local_pin(start, len, NULL); if_pf (result && ! gasneti_valid_client_t(& result->client)) { // Failed memory registration (e.g. read-only memory) firehose_release(&result, 1); return NULL; } return result; } /* Post a work request to the receive queue of the given endpoint */ GASNETI_INLINE(gasnetc_rcv_post) void gasnetc_rcv_post(gasnetc_cep_t *cep, gasnetc_rbuf_t *rbuf) { int vstat; gasneti_assert(cep); gasneti_assert(rbuf); // In the absence of SRQ, check for attempted intra-nbrhd traffic // With SRQ, however, initialization occurs via the first cep per HCA, which maybe in-nbrhd gasneti_assert(gasnetc_use_srq || !GASNETI_NBRHD_JOBRANK_IS_LOCAL(gasnetc_epid2node(cep->epid))); rbuf->cep = cep; rbuf->rr_sg.lkey = GASNETC_RCV_LKEY(cep); GASNETI_TRACE_PRINTF(D,("POST_RR rbuf=%p hca=%d lkey=0x%08x", (void *)rbuf, GASNETC_HCA_IDX(cep), (unsigned int)(rbuf->rr_sg.lkey))); if (!gasnetc_use_srq) { GASNETI_TRACE_PRINTF(D,("POST_RR rbuf=%p peer=%d qp=%d", (void *)rbuf, gasnetc_epid2node(cep->epid), gasnetc_epid2qpi(cep->epid) - 1)); } { struct ibv_recv_wr *bad_wr; #if GASNETC_IBV_SRQ if (cep->srq) { /* Equivalent to gasnetc_use_srq, but we need this value anyway */ vstat = ibv_post_srq_recv(cep->srq, &rbuf->rr_desc, &bad_wr); } else #endif { vstat = ibv_post_recv(cep->qp_handle, &rbuf->rr_desc, &bad_wr); } } if_pt (vstat == 0) { /* normal return */ return; } else if (GASNETC_IS_EXITING()) { /* disconnected by another thread */ gasnetc_exit(0); } else { /* unexpected error */ GASNETC_IBV_CHECK(vstat, "while posting a receive work request"); } } /* GASNETI_INLINE(gasnetc_processPacket) */ void gasnetc_processPacket(gasnetc_cep_t *cep, gasnetc_rbuf_t *rbuf, uint32_t flags GASNETI_THREAD_FARG) { gasnetc_EP_t ep = rbuf->rr_ep; gasneti_assert(ep == gasnetc_ep0); gasnetc_buffer_t * const buf = (gasnetc_buffer_t *)(uintptr_t)(rbuf->rr_sg.addr); const gex_AM_Index_t handler_id = GASNETC_MSG_HANDLERID(flags); const gex_AM_Entry_t * const handler_entry = &ep->_amtbl[handler_id]; const gex_AM_Fn_t handler_fn = handler_entry->gex_fnptr; const gasneti_category_t category = GASNETC_MSG_CATEGORY(flags); const int isreq = GASNETC_MSG_ISREQUEST(flags); int full_numargs = GASNETC_MSG_NUMARGS(flags); int user_numargs = full_numargs; const gex_Token_t token = (gex_Token_t)rbuf; gex_AM_Arg_t *args; gasneti_assert(!GASNETI_NBRHD_JOBRANK_IS_LOCAL(GASNETC_MSG_SRCIDX(flags))); gasneti_assert(cep != NULL); #if GASNETI_THREADINFO_OPT rbuf->rbuf_threadinfo = GASNETI_MYTHREAD; #endif rbuf->rbuf_needReply = isreq; #if GASNET_DEBUG rbuf->rbuf_handlerRunning = 1; #endif rbuf->rbuf_flags = flags; /* Locate arguments */ switch (category) { case gasneti_Short: args = buf->shortmsg.args; break; case gasneti_Medium: args = buf->medmsg.args; break; case gasneti_Long: args = buf->longmsg.args; break; default: gasneti_unreachable_error(("Invalid category in gasnetc_processPacket: 0x%x",(int)category)); } { /* Process any flow control info */ int credits = 0; if (full_numargs == GASNETC_MAX_ARGS) { credits = GASNETC_HIDDEN_ARG_CREDITS(args); full_numargs = GASNETC_HIDDEN_ARG_FULL_NARGS(args); user_numargs = full_numargs - 1; gasneti_assert(!gasnetc_use_srq || !credits); GASNETI_TRACE_PRINTF(C,("RCV_AM_CREDITS credits=%d\n", credits)); args += 1; } /* Available remotely posted (request) buffers */ credits += (isreq ^ 1); /* Credit for self if this is a reply */ if (credits) { gasnetc_sema_up_n(&cep->am_rem, credits); } } /* Ack? */ if (!handler_id) return; gasneti_amtbl_check(handler_entry, user_numargs, category, isreq); /* Run the handler */ switch (category) { case gasneti_Short: { GASNETI_RUN_HANDLER_SHORT(isreq,handler_id,handler_fn,token,args,user_numargs); } break; case gasneti_Medium: { void * data = GASNETC_MSG_MED_DATA(buf, full_numargs); size_t nbytes = buf->medmsg.nBytes; GASNETI_RUN_HANDLER_MEDIUM(isreq,handler_id,handler_fn,token,args,user_numargs,data,nbytes); } break; case gasneti_Long: { void * data = (void *)(buf->longmsg.destLoc); size_t nbytes = buf->longmsg.nBytes & 0x7fffffff; if (buf->longmsg.nBytes & 0x80000000) { /* Must relocate the payload which is packed like a Medium. */ gasneti_assert(nbytes <= GASNETC_MAX_PACKEDLONG_(user_numargs)); GASNETI_MEMCPY(data, GASNETC_MSG_LONG_DATA(buf, full_numargs), (size_t)nbytes); } GASNETI_RUN_HANDLER_LONG(isreq,handler_id,handler_fn,token,args,user_numargs,data,(size_t)nbytes); } break; default: gasneti_unreachable_error(("Invalid category in gasnetc_processPacket: 0x%x",(int)category)); } #if GASNET_DEBUG rbuf->rbuf_handlerRunning = 0; #endif } #if GASNETC_IBV_SRQ // SRQ needs a secondary source of buffers reserved for construction of // outbound AM Replies, to prevent starvation when outbound Request // experience backpressure. // However, we don't want to double resource usage via static partition. // Actual use is rare and just a single buffer is sufficient to avoid deadlock. // So *one* is all we provide, keeping the critical paths simple such that // freeing buffers requires only a single pointer read of extra work in the // common case that the spare buffer is not in-use. static gasnetc_atomic_ptr_t gasnetc_spare_reply_bbuf = gasnetc_atomic_ptr_init(0xcafef00d); // Allocates the spare outbound reply buffer, if enabled and available GASNETI_INLINE(gasnetc_alloc_spare_reply_bbuf) GASNETI_MALLOC gasnetc_buffer_t *gasnetc_alloc_spare_reply_bbuf(void) { gasnetc_buffer_t *result = NULL; if (gasnetc_use_srq && gasnetc_atomic_ptr_read(&gasnetc_spare_reply_bbuf, 0)) { result = (gasnetc_buffer_t *)(uintptr_t)gasnetc_atomic_ptr_swap(&gasnetc_spare_reply_bbuf, 0, 0); if (result) GASNETC_STAT_EVENT(SPARE_REPLY_BBUF); } return result; } // Makes the passed buffer the new spare if SRQ is enabled and there is not one already. // Note that gasnetc_spare_reply_bbuf will be non-NULL when !gasnetc_use_srq. // Returns zero if there was already a spare or !gasnetc_use_srq, non-zero otherwise. GASNETI_INLINE(gasnetc_maybe_restore_spare_reply_bbuf) int gasnetc_maybe_restore_spare_reply_bbuf(gasnetc_buffer_t *ptr) { gasneti_assert(ptr); if_pt (gasnetc_atomic_ptr_read(&gasnetc_spare_reply_bbuf, 0)) { return 0; } else { gasneti_assert(gasnetc_use_srq); return gasnetc_atomic_ptr_compare_and_swap(&gasnetc_spare_reply_bbuf, 0, (uintptr_t)ptr, 0); } } // For SRQ-only we need to special-case Reply buffers GASNETI_INLINE(gasnetc_bbuf_pop_helper) gasnetc_buffer_t *gasnetc_bbuf_pop_helper(const int is_reply) { gasnetc_buffer_t *result = gasnetc_lifo_pop(&gasnetc_bbuf_freelist); if (result) return result; return is_reply ? gasnetc_alloc_spare_reply_bbuf() : NULL; } #else #define gasnetc_alloc_spare_reply_bbuf() gasneti_unreachable_error(("logic error")); #define gasnetc_maybe_restore_spare_reply_bbuf(x) 0 #define gasnetc_bbuf_pop_helper(is_reply) gasnetc_lifo_pop(&gasnetc_bbuf_freelist) #endif #if GASNETC_SND_REAP_COLLECT #define GASNETC_COLLECT_DECLS \ int collect_fh_num = 0; \ void *collect_bbuf_dummy; \ void *collect_bbuf_tail = &collect_bbuf_dummy; \ const firehose_request_t *collect_fh_ptrs[GASNETC_SND_REAP_LIMIT * GASNETC_MAX_FH]; #define GASNETC_COLLECT_FARGS \ , const int collect \ , int *collect_fh_num_p \ , void **collect_bbuf_tail_p \ , const firehose_request_t **collect_fh_ptrs #define GASNETC_COLLECT_MANY \ , 1, &collect_fh_num, &collect_bbuf_tail, collect_fh_ptrs #define GASNETC_COLLECT_ONE \ , 0, NULL, NULL, NULL #define GASNETC_COLLECT_BBUF_multi(_bbuf) do { \ gasnetc_lifo_link(*collect_bbuf_tail_p, _tmp); \ *collect_bbuf_tail_p = _tmp; \ } while (0) #define GASNETC_COLLECT_FHS_multi(_sreq) do { \ int _tmp = *collect_fh_num_p; \ for (int i=0; i<_sreq->fh_count; ++i, ++_tmp) { \ collect_fh_ptrs[_tmp] = _sreq->fh_ptr[i]; \ } \ *collect_fh_num_p = _tmp; \ } while (0) #define GASNETC_COLLECT_FINALIZE() do { \ if (collect_bbuf_tail != &collect_bbuf_dummy) { \ gasnetc_lifo_push_many(&gasnetc_bbuf_freelist, gasnetc_lifo_next(&collect_bbuf_dummy), collect_bbuf_tail); \ } \ if (collect_fh_num) { \ gasneti_assert(collect_fh_num <= GASNETC_SND_REAP_LIMIT * GASNETC_MAX_FH); \ firehose_release(collect_fh_ptrs, collect_fh_num); \ } \ } while (0) #else #define GASNETC_COLLECT_DECLS // empty #define GASNETC_COLLECT_FARGS // empty #define GASNETC_COLLECT_MANY // empty #define GASNETC_COLLECT_ONE // empty #define GASNETC_COLLECT_FINALIZE() // empty #define GASNETC_COLLECT_BBUF_multi(_bbuf) gasneti_unreachable() #define GASNETC_COLLECT_FHS_multi(_sreq) gasneti_unreachable() #endif #define GASNETC_COLLECT_BBUF(_collect,_bbuf) do { \ void *_tmp = (void*)(_bbuf); \ gasneti_assert(_tmp != NULL); \ if (!gasnetc_maybe_restore_spare_reply_bbuf(_tmp)) { \ if (_collect) { \ GASNETC_COLLECT_BBUF_multi(_tmp); \ } else { \ gasnetc_lifo_push(&gasnetc_bbuf_freelist,_tmp); \ } \ } \ } while(0) #define GASNETC_COLLECT_FHS(_collect,_sreq) do { \ gasneti_assert_int(_sreq->fh_count ,>=, 0); \ gasneti_assert_int(_sreq->fh_count ,<=, GASNETC_MAX_FH); \ if (_collect) { \ GASNETC_COLLECT_FHS_multi(_sreq); \ } else { \ firehose_release(_sreq->fh_ptr, _sreq->fh_count); \ } \ } while(0) #if HAVE_IBV_WC_STATUS_STR #define gasnetc_ibv_wc_status_str(status) ibv_wc_status_str(status) #else // Defensive. Not expected to be reached in modern libibverbs #define gasnetc_ibv_wc_status_str(status) "N/A" #endif const char *gasnetc_opcode_str(gasnetc_sreq_opcode_t opcode) { switch (opcode) { #define OPCASE(op) case GASNETC_OP_##op: return #op; break; OPCASE(FREE) OPCASE(AM) OPCASE(ATOMIC) OPCASE(ATOMIC_BOUNCE) OPCASE(GET_ZEROCP) #if GASNETC_PIN_SEGMENT && GASNETC_FH_OPTIONAL OPCASE(GET_BOUNCE) #endif #if GASNETC_HAVE_FENCED_PUTS OPCASE(FENCE) #endif #if !GASNETC_PIN_SEGMENT OPCASE(PUT_INMOVE) #endif OPCASE(LONG_ZEROCP) OPCASE(LONG_BOUNCE) OPCASE(PUT_INLINE) OPCASE(PUT_ZEROCP) OPCASE(PUT_BOUNCE) OPCASE(INVALID) #undef OPCASE default: { static char opcode_str[32]; snprintf(opcode_str, sizeof(opcode_str), "UNKNOWN (%d)", opcode); return opcode_str; } } } static void gasnetc_dump_cqe(struct ibv_wc *comp, gasnetc_hca_t *hca, const int is_snd) { static char msg_buffer[1024]; // safe due to serialization in the single caller int remain = sizeof(msg_buffer) - 1; char *msg = msg_buffer; msg_buffer[0] = '\0'; // No assertions, since already on a failure path #define MSG_APPEND(format,...) do { \ if (remain > 0) { \ int len = snprintf(msg, remain, format, __VA_ARGS__); \ if (len > 0) { msg += len; remain -= len; } \ } \ *msg = '\0'; \ } while (0) #if GASNETC_DYNAMIC_CONNECT && !GASNETC_USE_CONN_THREAD if (comp->wr_id & 1) { // UD for dynamic connection MSG_APPEND("%s"," operation=CONN"); } else #endif if (is_snd) { gasnetc_sreq_t *sreq = (gasnetc_sreq_t *)(uintptr_t)comp->wr_id; MSG_APPEND(" op=%s dest=(proc:%d, qpi:%d)", gasnetc_opcode_str(sreq->opcode), gasnetc_epid2node(sreq->cep->epid), gasnetc_epid2qpi(sreq->cep->epid) - 1); #if GASNET_DEBUG MSG_APPEND(" flags=%s", (sreq->send_flags & IBV_SEND_INLINE) ? "INLINE" : "0"); switch(sreq->wr_opcode) { case IBV_WR_RDMA_READ: case IBV_WR_RDMA_WRITE: MSG_APPEND(" loc_addr=" GASNETI_LADDRFMT " rem_addr=" GASNETI_LADDRFMT " length=%u", GASNETI_LADDRSTR(sreq->args.rdma.loc_addr), GASNETI_LADDRSTR(sreq->args.rdma.rem_addr), (unsigned int)sreq->args.rdma.length); break; case IBV_WR_SEND_WITH_IMM: { uint32_t flags = sreq->args.am.imm_data; int category = GASNETC_MSG_CATEGORY(flags); int nargs = GASNETC_MSG_NUMARGS(flags); const char *cat_name = "????"; gex_AM_Arg_t *args = NULL; uint32_t nbytes = (uint32_t)-1; switch (category) { case gasneti_Short: cat_name = "Short"; if (sreq->am_buff) { args = sreq->am_buff->shortmsg.args; } break; case gasneti_Medium: cat_name = "Medium"; if (sreq->am_buff) { args = sreq->am_buff->medmsg.args; nbytes = sreq->am_buff->medmsg.nBytes; } break; case gasneti_Long: cat_name = "Long"; if (sreq->am_buff) { args = sreq->am_buff->longmsg.args; nbytes = sreq->am_buff->longmsg.nBytes; } break; } if (nargs == GASNETC_MAX_ARGS) { // Decode actual nargs when carrying a hidden flow control arg if (args) { nargs = GASNETC_HIDDEN_ARG_FULL_NARGS(args) - 1; } // TODO: in absence of the original `args` array, Short and Long // cases _might_ be able to reconstruct from message length, but // padding to 8-byte boundary prevents that for Medium. } MSG_APPEND(" Re%s%s: nargs=%s handler=%d", GASNETC_MSG_ISREPLY(flags)?"ply":"quest", cat_name, (nargs == GASNETC_MAX_ARGS)?"unknown":gasneti_dynsprintf("%d",nargs), GASNETC_MSG_HANDLERID(flags)); // May use a second scatter-gather entry for med or packed-long payloads int num_sge = MIN(sreq->args.am.num_sge, 2); // longer than 2 is erroneous for (int i = 0; i < num_sge; ++i) { MSG_APPEND(" sge[%d]=(addr:" GASNETI_LADDRFMT ", length:%u)", i, GASNETI_LADDRSTR(sreq->args.am.addr[i]), (unsigned int)sreq->args.am.length[i]); } // Payload length in this xfer, if any if (nbytes != (uint32_t)-1) { if (category == gasneti_Long) { // For Long, only report packed payload bytes nbytes = (nbytes & 0x80000000) ? (nbytes & 0x7fffffff) : 0; } if (nbytes) { MSG_APPEND(", includes %u bytes payload", (unsigned int)nbytes); } } break; } default: break; // Avoid warning about missing enum values } #endif // DEBUG } #undef MSG_APPEND const char *label = is_snd ? "snd" : "rcv"; gasneti_console_message("ERROR", "%s status=%d(%s) vendor_err=0x%x qp_num=0x%x hca=%s%s", label, comp->status, gasnetc_ibv_wc_status_str(comp->status), comp->vendor_err, comp->qp_num, hca->hca_id, msg_buffer); } GASNETI_NEVER_INLINE(gasnetc_dump_cqs, void gasnetc_dump_cqs(struct ibv_wc *comp, gasnetc_hca_t *hca, const int is_snd)) { static gex_HSL_t lock = GEX_HSL_INITIALIZER; gex_HSL_Lock(&lock); gasnetc_dump_cqe(comp, hca, is_snd); if (comp->status == IBV_WC_WR_FLUSH_ERR) { // Since the caller's CQE failed with "Work Request Flushed Error", // the other CQ might contain the original error (else it was remote). int max_cqe; const char *label; struct ibv_cq *cq; if (is_snd) { max_cqe = hca->qps * 2 * gasnetc_am_oust_pp * (gasneti_nodes - 1); label = "rcv"; cq = hca->rcv_cq; } else { max_cqe = hca->qps * gasnetc_op_oust_pp; label = "snd"; cq = hca->snd_cq; } // Drain the other CQ. Skip SUCCESS. Print the first error. int count = 0; while (1 == ibv_poll_cq(cq, 1, comp)) { if (comp->status != IBV_WC_SUCCESS) { gasnetc_dump_cqe(comp, hca, !is_snd); break; // done, success } if (++count > max_cqe) { gasneti_console_message("ERROR", "%s CQ: impossibly large WCE count > %d", label, max_cqe); break; // done, failure } } } gex_HSL_Unlock(&lock); } #if GASNETC_BUILD_IBVRATOMIC #if GASNETI_HAVE_CC_BUILTIN_BSWAP32 #define GASNETC_BSWAP32(x) __builtin_bswap32(x) #else #define GASNETC_BSWAP32(x) \ ((((x) & 0x000000ff) << 24) | \ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x00ff0000) >> 8) | \ (((x) & 0xff000000) >> 24)) #endif #if GASNETI_HAVE_CC_BUILTIN_BSWAP64 #define GASNETC_BSWAP64(x) __builtin_bswap64(x) #else #define GASNETC_BSWAP64(x) GASNETI_MAKEWORD(GASNETC_BSWAP32(GASNETI_LOWORD(x)), \ GASNETC_BSWAP32(GASNETI_HIWORD(x))) #endif #endif GASNETI_INLINE(gasnetc_snd_reap_one) void gasnetc_snd_reap_one(struct ibv_wc *comp_p, gasnetc_hca_t *hca GASNETC_COLLECT_FARGS) { #if !GASNETC_SND_REAP_COLLECT const int collect = 0; #endif if_pt (comp_p->status == IBV_WC_SUCCESS) { gasnetc_sreq_t *sreq = (gasnetc_sreq_t *)(uintptr_t)comp_p->wr_id; #if GASNETC_DYNAMIC_CONNECT && !GASNETC_USE_CONN_THREAD if_pf (comp_p->wr_id & 1) { gasnetc_conn_snd_wc(comp_p); } else #endif if_pt (sreq) { gasnetc_sema_up(hca->snd_cq_sema_p); again: gasnetc_sema_up(GASNETC_CEP_SQ_SEMA(sreq->cep)); switch (sreq->opcode) { #if GASNETC_PIN_SEGMENT && GASNETC_FH_OPTIONAL case GASNETC_OP_GET_BOUNCE: // Bounce-buffer GET gasneti_assert(sreq->comp.cb != NULL); gasneti_assert(!GASNETC_USE_FIREHOSE); // Only possible when firehose disabled gasneti_assert(sreq->bb_buff != NULL); gasneti_assert(sreq->bb_addr != NULL); gasneti_assert(sreq->bb_len > 0); GASNETI_MEMCPY(sreq->bb_addr, sreq->bb_buff, sreq->bb_len); sreq->comp.cb(sreq->comp.data); GASNETC_COLLECT_BBUF(collect, sreq->bb_buff); break; #endif case GASNETC_OP_GET_ZEROCP: // Zero-copy GET gasneti_assert(sreq->comp.cb != NULL); sreq->comp.cb(sreq->comp.data); GASNETC_COLLECT_FHS(collect, sreq); break; case GASNETC_OP_PUT_BOUNCE: // Bounce-buffer PUT case GASNETC_OP_LONG_BOUNCE: // Bounce-buffer Long payload if (sreq->comp.cb != NULL) { sreq->comp.cb(sreq->comp.data); } #if GASNETC_PIN_SEGMENT gasneti_assert(sreq->bb_buff); GASNETC_COLLECT_BBUF(collect, sreq->bb_buff); #else gasneti_assert(sreq->fh_bbuf); GASNETC_COLLECT_BBUF(collect, sreq->fh_bbuf); GASNETC_COLLECT_FHS(collect, sreq); #endif break; case GASNETC_OP_PUT_INLINE: // Inline PUT if (sreq->comp.cb != NULL) { sreq->comp.cb(sreq->comp.data); } #if GASNETC_PIN_SEGMENT gasneti_assert_int(sreq->fh_count ,==, 0); #else GASNETC_COLLECT_FHS(collect, sreq); #endif break; case GASNETC_OP_PUT_ZEROCP: // Zero-copy PUT case GASNETC_OP_LONG_ZEROCP: // Zero-copy Long payload if (sreq->comp.cb != NULL) { sreq->comp.cb(sreq->comp.data); } GASNETC_COLLECT_FHS(collect, sreq); break; case GASNETC_OP_AM: // AM send if (sreq->comp.cb != NULL) { sreq->comp.cb(sreq->comp.data); } if (sreq->am_buff != NULL) { GASNETC_COLLECT_BBUF(collect, sreq->am_buff); } break; case GASNETC_OP_ATOMIC: // Non-fetching or zero-copy atomic if (sreq->comp.cb != NULL) { sreq->comp.cb(sreq->comp.data); } break; #if GASNETC_BUILD_IBVRATOMIC case GASNETC_OP_ATOMIC_BOUNCE: { // Fetching atomic, result in bounce buffer // NOTE: Strictly speaking, "*(uint64_t *)sreq->amo_result = ..." below // runs afoul of aliasing rules in the C spec when the actual result // type is "double". However, the presence of compiler fences in REL // and ACQ fence operations (respectively located in the comp.cb() // called below, and in the GEX_Event_{Wait,Try*)()) is believed to be // sufficient to prevent reordering of the write and reads (even in the // presence of LTO to cross the library boundary). gasneti_assert_int(hca->hca_index ,==, 0); gasneti_assert(sreq->amo_bbuf); gasneti_assert(sreq->amo_result); uint64_t result = *(volatile uint64_t*)sreq->amo_bbuf; *(uint64_t *)sreq->amo_result = hca->amo_bswap ? GASNETC_BSWAP64(result) : result; if (sreq->comp.cb != NULL) { sreq->comp.cb(sreq->comp.data); } // TODO: do we want/need GASNETC_COLLECT_RATOMICBUF() ? gasnetc_lifo_push(&gasnetc_ratomicbuf_freelist, sreq->amo_bbuf); break; } #endif #if GASNETC_HAVE_FENCED_PUTS case GASNETC_OP_FENCE: // Atomic after PUT, with descriptor chaining sreq->opcode = GASNETC_OP_FREE; sreq = sreq->fence_sreq; #if GASNET_DEBUG gasneti_assert(sreq); gasneti_assert(sreq->opcode & GASNETC_OP_NEEDS_FENCE); comp_p->opcode = IBV_WC_RDMA_WRITE; #endif goto again; #endif default: gasneti_unreachable_error(("Reaped send with invalid/unknown opcode %d", (int)sreq->opcode)); } // Mark sreq free sreq->opcode = GASNETC_OP_FREE; } else { gasneti_fatalerror("snd_reap reaped NULL sreq"); return; } } else if (GASNETC_IS_EXITING()) { return; } else if (!gasneti_attach_done) { gasneti_fatalerror("failed to connect (snd) status=%d", comp_p->status); return; } else { gasnetc_dump_cqs(comp_p, hca, 1); gasneti_fatalerror("aborting on reap of failed send"); return; } } // Try to pull completed entries (if any) from a single send CQ static int gasnetc_snd_reap_hca(gasnetc_hca_t *hca, int limit) { int count; struct ibv_wc comp; GASNETC_COLLECT_DECLS gasneti_assert(limit <= GASNETC_SND_REAP_LIMIT); for (count = 0; count < limit; ++count) { if (GASNETC_POLL_CQ_TRYDOWN_SND(hca)) break; // another thread is polling this CQ int rc = ibv_poll_cq(hca->snd_cq, 1, &comp); GASNETC_POLL_CQ_UP_SND(hca); if (rc == 0) break; // CQ empty - we are done gasnetc_snd_reap_one(&comp, hca GASNETC_COLLECT_MANY); } if (count) { // Release any firehoses and bounce buffers we've collected GASNETC_COLLECT_FINALIZE(); GASNETC_STAT_EVENT_VAL(SND_REAP,count); } return count; } // Try to pull completed entries (if any) from the send CQ(s). // Services only one HCA per call, round-robin across calls. int gasnetc_snd_reap(int limit) { int hca_index = 0; #if GASNETC_IB_MAX_HCAS > 1 if (gasnetc_snd_poll_multi_hcas) { GASNETC_WEAK_COUNTER_DECL(index, 0); hca_index = GASNETC_WEAK_COUNTER_READ(index); GASNETC_WEAK_COUNTER_WRITE(index, ((hca_index == 0) ? gasnetc_num_hcas : hca_index) - 1); } #endif return gasnetc_snd_reap_hca(&gasnetc_hca[hca_index], limit); } /* Take *unbound* epid, return a qp number */ gasnetc_epid_t gasnetc_epid_select_qpi(gasnetc_cep_t *ceps, gasnetc_epid_t epid) { gasnetc_epid_t qpi = gasnetc_epid2qpi(epid); if_pt (qpi == 0) { #if 0 /* Select by largest space avail */ uint32_t best_space = gasnetc_sema_read(GASNETC_CEP_SQ_SEMA(ceps+0)); for (int i = 1; i < gasnetc_num_qps; ++i) { uint32_t space = gasnetc_sema_read(GASNETC_CEP_SQ_SEMA(ceps+i)); if (space > best_space) { best_space = space; qpi = i; } } #else GASNETC_WEAK_COUNTER_DECL(prev, 0); qpi = GASNETC_WEAK_COUNTER_READ(prev); qpi = ((qpi == 0) ? gasnetc_num_qps : qpi) - 1; GASNETC_WEAK_COUNTER_WRITE(prev, qpi); #endif gasneti_assert(qpi < gasnetc_num_qps); } else { --qpi; /* offset */ gasneti_assert(qpi < gasnetc_alloc_qps); } return qpi; } /* Take and sreq and bind it to a specific (not wildcard) qp */ #if GASNETC_DYNAMIC_CONNECT || GASNETC_IBV_SRQ gasnetc_cep_t *gasnetc_bind_cep_inner(gasnetc_EP_t ep, gasnetc_epid_t epid, gasnetc_sreq_t *sreq, int block, int is_reply GASNETI_THREAD_FARG) #else gasnetc_cep_t *gasnetc_bind_cep_inner(gasnetc_EP_t ep, gasnetc_epid_t epid, gasnetc_sreq_t *sreq, int block) #endif { gasnetc_cep_t *ceps = gasnetc_get_cep(ep, gasnetc_epid2node(epid)); gasnetc_cep_t *cep; gasnetc_epid_t qpi; /* Loop until space is available on the selected SQ for 1 new entry. * If we hold the last one then threads sending to the same node will stall. */ qpi = gasnetc_epid_select_qpi(ceps, epid); cep = &ceps[qpi]; if_pf (!gasnetc_sema_trydown(GASNETC_CEP_SQ_SEMA(cep))) { #if GASNETC_DYNAMIC_CONNECT /* Close the one dynamic connection race condition. */ if (GASNETT_PREDICT_FALSE(GASNETC_CEP_SQ_SEMA(cep) == &gasnetc_zero_sema) && is_reply) { /* We are in the "gap" between RTR and RTS and waiting for the ACK. * However, since we are trying to send an AM Reply we KNOW that * the ACK was sent since we only Reply in response to a Request. * The Passive node reaches RTS at the time it sends its ACK and * thus cannot send us a Request until ready to send the ACK. */ gasnetc_conn_implied_ack(ep, gasnetc_epid2node(epid)); if (gasnetc_sema_trydown(GASNETC_CEP_SQ_SEMA(cep))) { goto out; } } #endif // Handle the non-blocking (IMMEDIATE) case if (!block) { #if GASNETC_IMM_MAY_POLL_SQ // Progress sends *once* on the selected HCA and recheck semaphore gasnetc_snd_reap_hca(cep->hca,1); if (gasnetc_sema_trydown(GASNETC_CEP_SQ_SEMA(cep))) { goto out; } #endif // TODO: If not bound to a specific cep, should scan all remaining CEPs // before giving up. However, that case is currently unreachable, since // only RMA makes non-bound calls and there is no RMA+IMMEDIATE support. return NULL; } #if GASNETC_IBV_SRQ // When using SRQ, rcv buffers for AM Requests may be under-provisioned, // leading to back-pressure on the injecting SQ. When encountering this // as an injector, we must not become inattentive to the rcv CQ or we // risk deadlock (bug 4157). So we may need to process inbound traffic // as well. This includes RDMA Put of a RequestLong payload, in addition // to the send of the header. // // Note that the AM Request traffic is on a distinct channel (different // injecting QP) from RMA traffic and AM Reply traffic; and that the receive // buffer pool for Replies is always *fully* provisioned. Thus there is no // need to poll the rcv CQ for anything other than the injection of an AM // Request header or a RequestLong payload. In fact, doing so for Reply // injection would risk recursion and deadlock due to resources already held. // // As defined below, `should_poll_rcv` fully identifies the conditions under // which the poll is needed by checking for use of a bound (non-zero) qpi in // the Request-specific "upper half" of the qpi space. This implicitly // checks for use of SRQ, since no operations are bound to those qpi values // otherwise. gasnetc_epid_t orig_qpi = gasnetc_epid2qpi(epid); const int should_poll_rcv = orig_qpi && GASNETC_QPI_IS_REQ(orig_qpi - 1); if (is_reply) gasneti_assert(!should_poll_rcv); // sanity check // This mess is needed because one cannot use `#if` inside the arguments // to a macro such as GASNETI_SPIN_DOUNTIL() #if GASNET_PSHM #define MAYBE_POLL_RCV_PSHM() gasneti_AMPSHMPoll(0 GASNETI_THREAD_PASS) #else #define MAYBE_POLL_RCV_PSHM() ((void)0) #endif // Note: It is NOT safe to run progress functions for the case of an AM // Request header because the caller holds resources (at least an AM credit // and often a bounce buffer). That means running _communicating_ progress // functions here could lead to deadlock. However, Put of a RequestLong // payload can (and so does) safely execute progress functions here. // This code is not reached for AM Reply (subject of "sanity check" above). // TODO: revisit GASNETC_OP_AM if/when we distinguish NON-communicating PFs. #define MAYBE_POLL_RCV(_ep, _cep) do { \ if (should_poll_rcv && !gasnetc_sema_read(GASNETC_CEP_SQ_SEMA(_cep))) { \ gasnetc_poll_rcv_all(_ep, GASNETC_RCV_REAP_LIMIT GASNETI_THREAD_PASS); \ MAYBE_POLL_RCV_PSHM(); \ if (sreq->opcode != GASNETC_OP_AM) { GASNETI_PROGRESSFNS_RUN(); } \ } \ } while (0) #else #define MAYBE_POLL_RCV(_ep, _cep) ((void)0) #endif GASNETC_TRACE_WAIT_BEGIN(); GASNETI_SPIN_DOUNTIL( gasnetc_sema_trydown(GASNETC_CEP_SQ_SEMA(cep)), { gasnetc_snd_reap(1); /* Redo load balancing choice */ qpi = gasnetc_epid_select_qpi(ceps, epid); cep = &ceps[qpi]; MAYBE_POLL_RCV(ep, cep); }); GASNETC_TRACE_WAIT_END(POST_SR_STALL_SQ); #undef MAYBE_POLL_RCV #undef MAYBE_POLL_RCV_PSHM } out: gasneti_assert(cep); cep->used = 1; sreq->epid = gasnetc_epid(epid, qpi); sreq->cep = cep; return cep; } GASNETI_INLINE (gasnetc_ack) void gasnetc_ack(gasnetc_rbuf_t *rbuf) { #if GASNET_DEBUG rbuf->rbuf_handlerRunning = 1; /* To satisfy assertion on Reply path */ #endif GASNETI_SAFE(gasnetc_ReplySysShort((gex_Token_t)rbuf, NULL, gasneti_handleridx(gasnetc_ack), 0)); } GASNETI_INLINE (gasnetc_hidden_ack) void gasnetc_hidden_ack(gasnetc_rbuf_t *rbuf, gasnetc_cep_t *cep) { /* A race might result in sending non-coalesced ACKs if a Request * or Reply in another thread picks up one we expect to find. * However, we'll always send the correct total number of credits * and we'll never have more than gasnetc_am_credits_slack delayed. */ uint32_t old; do { old = gasnetc_atomic_read(&cep->am_flow.credit, 0); if (old >= gasnetc_am_credits_slack) { /* MUST send back a reply */ gasnetc_ack(rbuf); break; } gasneti_assert(!gasnetc_use_srq); /* No coalescing when using SRQ */ } while (!gasnetc_atomic_compare_and_swap(&cep->am_flow.credit, old, old+1, 0)); } GASNETI_INLINE(gasnetc_rcv_am) void gasnetc_rcv_am(const struct ibv_wc *comp, gasnetc_rbuf_t **spare_p GASNETI_THREAD_FARG) { gasnetc_rbuf_t emergency_spare; gasnetc_rbuf_t *rbuf = (gasnetc_rbuf_t *)(uintptr_t)comp->wr_id; const uint32_t flags = comp->imm_data; gasnetc_cep_t *cep = rbuf->cep; gasnetc_rbuf_t *spare; const int isrep = GASNETC_MSG_ISREPLY(flags); GASNETC_STAT_EVENT(RCV_AM); #if GASNETC_IBV_SRQ if (gasnetc_use_srq) { gasnetc_cep_t *orig_cep = cep; gasnetc_hca_t *hca = cep->hca; /* SRQ means rbuf->cep is "inexact", so must reconstruct */ cep = GASNETC_NODE2CEP(rbuf->rr_ep, GASNETC_MSG_SRCIDX(flags)); if (!isrep) { cep += gasnetc_num_qps; /* Search top half of table */ } if (gasnetc_num_qps > 1) { int i; for (i=0; ircv_qpn == comp->qp_num) && (cep->hca == hca)) break; } gasneti_assert(i < gasnetc_num_qps); } /* All flow-control and any Reply belong to opposite member of the pair */ if (isrep) { cep += gasnetc_num_qps; } else { cep -= gasnetc_num_qps; } rbuf->cep = cep; /* Process and repost w/o any fancy tricks to keep credits perfectly accurate */ gasnetc_processPacket(cep, rbuf, flags GASNETI_THREAD_PASS); if_pf (rbuf->rbuf_needReply) { /* MUST send back a reply - no coallescing */ gasnetc_ack(rbuf); } gasnetc_rcv_post(orig_cep, rbuf); if (isrep) { gasnetc_sema_up(&hca->am_sema); } } else #endif if (isrep) { /* Now process the packet */ gasnetc_processPacket(cep, rbuf, flags GASNETI_THREAD_PASS); // Repost the rcv buffer gasnetc_rcv_post(cep, rbuf); } else { /* Post a replacement buffer before processing the request. * This ensures that the credit sent with the reply will * have a corresponding buffer available at this end. */ spare = (*spare_p) ? (*spare_p) : gasnetc_lifo_pop(cep->rbuf_freelist); if_pt (spare) { /* This is the normal case */ gasnetc_rcv_post(cep, spare); *spare_p = rbuf; /* recv'd rbuf becomes the spare for next pass (if any) */ } else { /* Because we don't have any "spare" rbuf available to post we copy the recvd * message to a temporary (non-pinned) buffer so we can repost rbuf. */ gasnetc_buffer_t *buf = gasneti_malloc(sizeof(gasnetc_buffer_t)); GASNETI_MEMCPY(buf, (void *)(uintptr_t)rbuf->rr_sg.addr, sizeof(gasnetc_buffer_t)); emergency_spare.rr_sg.addr = (uintptr_t)buf; emergency_spare.rr_ep = rbuf->rr_ep; emergency_spare.cep = rbuf->cep; gasnetc_rcv_post(cep, rbuf); rbuf = &emergency_spare; GASNETC_STAT_EVENT(ALLOC_AM_SPARE); GASNETI_TRACE_PRINTF(C,("ALLOC_AM_SPARE\n")); } /* Now process the packet */ gasnetc_processPacket(cep, rbuf, flags GASNETI_THREAD_PASS); /* Finalize flow control */ if_pf (rbuf->rbuf_needReply) { gasnetc_hidden_ack(rbuf, cep); } /* Free the temporary buffer, if any */ if_pf (!spare) { gasneti_free((void *)(uintptr_t)emergency_spare.rr_sg.addr); } } } static int gasnetc_rcv_reap(gasnetc_hca_t *hca, const int limit, gasnetc_rbuf_t **spare_p GASNETI_THREAD_FARG) { struct ibv_wc comp; int count; for (count = 0; count < limit; ++count) { if (GASNETC_POLL_CQ_TRYDOWN_RCV(hca)) break; int rc = ibv_poll_cq(hca->rcv_cq, 1, &comp); GASNETC_POLL_CQ_UP_RCV(hca); if (rc == 0) break; // CQ empty - we are done if_pt (rc == 1) { if_pt (comp.status == IBV_WC_SUCCESS) { #if GASNETC_DYNAMIC_CONNECT && !GASNETC_USE_CONN_THREAD if_pf (comp.wr_id & 1) { gasnetc_conn_rcv_wc(&comp); break; /* lower latency (and fewer implied ACKS) if we cease polling */ } #endif gasnetc_rcv_am(&comp, spare_p GASNETI_THREAD_PASS); } else if (GASNETC_IS_EXITING()) { /* disconnected */ break; /* can't exit since we can be called in exit path */ } else if (!gasneti_attach_done) { gasneti_fatalerror("failed to connect (rcv) status=%d", comp.status); break; } else { gasnetc_dump_cqs(&comp, hca, 0); gasneti_fatalerror("aborting on reap of failed recv"); break; } } else if (GASNETC_IS_EXITING()) { /* disconnected by another thread */ gasnetc_exit(0); } else { GASNETC_IBV_CHECK(rc, "while reaping the recv queue"); } } if (count) { GASNETC_STAT_EVENT_VAL(RCV_REAP,count); #if !GASNETC_PIN_SEGMENT /* Handler might have queued work for firehose */ firehose_poll(); #endif } return count; } void gasnetc_poll_rcv_hca(gasnetc_EP_t ep, gasnetc_hca_t *hca, int limit GASNETI_THREAD_FARG) { // Poll for AM in recv CQ gasnetc_rbuf_t *spare = NULL; (void)gasnetc_rcv_reap(hca, limit, &spare GASNETI_THREAD_PASS); if (spare) { gasnetc_lifo_push(&hca->rbuf_freelist, spare); } } void gasnetc_poll_rcv_all(gasnetc_EP_t ep, int limit GASNETI_THREAD_FARG) { gasnetc_hca_t *hca; #if GASNETC_IB_MAX_HCAS > 1 if (gasnetc_rcv_poll_multi_hcas) { GASNETC_WEAK_COUNTER_DECL(index, 0); int tmp = GASNETC_WEAK_COUNTER_READ(index); GASNETC_WEAK_COUNTER_WRITE(index, ((tmp == 0) ? gasnetc_num_hcas : tmp) - 1); hca = &gasnetc_hca[tmp]; } else #endif hca = &gasnetc_hca[0]; gasnetc_poll_rcv_hca(ep, hca, GASNETC_RCV_REAP_LIMIT GASNETI_THREAD_PASS); #if GASNET_PSHM gasneti_AMPSHMPoll(0 GASNETI_THREAD_PASS); #endif } /* helper for allocation of a send request structure */ GASNETI_NEVER_INLINE(gasnetc_get_sreq_miss, gasnetc_sreq_t *gasnetc_get_sreq_miss(gasnetc_sreq_t * const oldest GASNETI_THREAD_FARG)) { gasnetc_sreq_t *sreq = oldest; /* 2) Next poll all CQs and then check the oldest sreq again */ int h; GASNETC_FOR_ALL_HCA_INDEX(h) { (void)gasnetc_snd_reap(1); } if_pf (sreq->opcode != GASNETC_OP_FREE) { /* 3) Next scan ahead, skipping over in-flight firehose misses for instance */ do { sreq = sreq->next; } while ((sreq->opcode != GASNETC_OP_FREE) && (sreq != oldest)); if_pf (sreq->opcode != GASNETC_OP_FREE) { /* 4) Finally allocate more */ gasnetc_sreq_t *head, *tail; gasneti_assert(sreq == oldest); gasnetc_alloc_sreqs(&head, &tail GASNETI_THREAD_PASS); tail->next = sreq->next; sreq = (sreq->next = head); } } return sreq; } /* allocate a send request structure */ gasnetc_sreq_t *gasnetc_get_sreq(gasnetc_sreq_opcode_t opcode GASNETI_THREAD_FARG) { gasnetc_per_thread_t *td = gasnetc_my_perthread(); gasnetc_sreq_t *sreq; /* 1) First try the oldest sreq in our list */ sreq = td->sreqs; gasneti_assert(sreq != NULL); if_pf (sreq->opcode != GASNETC_OP_FREE) { /* steps 2...4 above */ sreq = gasnetc_get_sreq_miss(sreq GASNETI_THREAD_PASS); } td->sreqs = sreq->next; gasneti_assert(td->sreqs != NULL); #if GASNET_DEBUG /* invalidate field(s) which should always be set by caller */ sreq->epid = ~0; sreq->cep = NULL; sreq->fh_count = -1; #if !GASNETC_PIN_SEGMENT sreq->fh_len = ~0; sreq->fh_ep = NULL; #endif #endif /* Assume no counters */ sreq->comp.cb = NULL; #if !GASNETC_PIN_SEGMENT sreq->fh_lc_cb = NULL; sreq->fh_oust = NULL; #endif gasneti_assert(sreq->opcode == GASNETC_OP_FREE); gasneti_assert(opcode != GASNETC_OP_FREE); sreq->opcode = opcode; return sreq; } GASNETI_INLINE(gasnetc_get_bbuf_inner) gasnetc_buffer_t *gasnetc_get_bbuf_inner(const int is_reply, const int block GASNETI_THREAD_FARG) { gasnetc_buffer_t *bbuf = NULL; GASNETC_STAT_EVENT(GET_BBUF); bbuf = gasnetc_bbuf_pop_helper(is_reply); if_pt (bbuf) { // done } else if (block) { GASNETC_TRACE_WAIT_BEGIN(); GASNETI_SPIN_DOUNTIL(bbuf, { gasnetc_poll_snd(); bbuf = gasnetc_bbuf_pop_helper(is_reply); }); GASNETC_TRACE_WAIT_END(GET_BBUF_STALL); } else { gasnetc_poll_snd(); bbuf = gasnetc_bbuf_pop_helper(is_reply); } gasneti_assert((bbuf != NULL) || !block); return bbuf; } // Allocate a pre-pinned bounce buffer using helpers above gasnetc_buffer_t *gasnetc_get_bbuf(int block GASNETI_THREAD_FARG) { return gasnetc_get_bbuf_inner(0, block GASNETI_THREAD_PASS); } void gasnetc_put_bbuf(gasnetc_buffer_t *bbuf) { gasneti_assert(bbuf != NULL); if (!gasnetc_maybe_restore_spare_reply_bbuf(bbuf)) { gasnetc_lifo_push(&gasnetc_bbuf_freelist,bbuf); } } #if GASNETC_IBV_SRQ // Allocate a pre-pinned bounce buffer, with special case for reply gasnetc_buffer_t *gasnetc_get_bbuf_srq(int is_reply, int block GASNETI_THREAD_FARG) { return gasnetc_get_bbuf_inner(is_reply, block GASNETI_THREAD_PASS); } #endif #if GASNET_TRACE || GASNET_DEBUG GASNETI_INLINE(gasnetc_snd_validate) void gasnetc_snd_validate(gasnetc_sreq_t *sreq, struct ibv_send_wr *sr_desc, int count, const char *type) { gasneti_assert(sreq); gasneti_assert(sreq->cep); gasneti_assert(sr_desc); gasneti_assert(sr_desc->num_sge >= 1); gasneti_assert(sr_desc->num_sge <= GASNETC_SND_SG); gasneti_assert(count > 0); gasneti_assert(type); GASNETI_TRACE_PRINTF(D,("%s sreq=%p peer=%d qp=%d hca=%d\n", type, (void *)sreq, gasnetc_epid2node(sreq->cep->epid), gasnetc_epid2qpi(sreq->cep->epid) - 1, GASNETC_HCA_IDX(sreq->cep))); for (int i = 0; i < count; ++i, ++sr_desc) { uintptr_t r_addr = sr_desc->wr.rdma.remote_addr; #if GASNET_DEBUG sreq->send_flags = sr_desc->send_flags; sreq->wr_opcode = sr_desc->opcode; #endif switch (sr_desc->opcode) { case IBV_WR_SEND_WITH_IMM: GASNETI_TRACE_PRINTF(D,("%s op=SND\n", type)); for (int j = 0; j < sr_desc->num_sge; ++j) { uintptr_t l_addr = sr_desc->sg_list[j].addr; size_t len = sr_desc->sg_list[j].length; unsigned lkey = sr_desc->sg_list[j].lkey; GASNETI_TRACE_PRINTF(D,(" %i: lkey=0x%08x len=%"PRIuPTR" local=[%p-%p] remote=N/A\n", j, lkey, (uintptr_t)len, (void *)l_addr, (void *)(l_addr + (len - 1)))); } #if GASNET_DEBUG gasneti_assert(sr_desc->num_sge == 1 || sr_desc->num_sge == 2); sreq->args.am.imm_data = sr_desc->imm_data; sreq->args.am.num_sge = sr_desc->num_sge; sreq->args.am.addr[0] = sr_desc->sg_list[0].addr; sreq->args.am.length[0] = sr_desc->sg_list[0].length; sreq->args.am.addr[1] = sr_desc->sg_list[1].addr; sreq->args.am.length[1] = sr_desc->sg_list[1].length; #endif break; case IBV_WR_RDMA_WRITE: GASNETI_TRACE_PRINTF(D,("%s op=PUT rkey=0x%08x\n", type, (unsigned int)sr_desc->wr.rdma.rkey)); for (int j = 0; j < sr_desc->num_sge; ++j) { uintptr_t l_addr = sr_desc->sg_list[j].addr; size_t len = sr_desc->sg_list[j].length; unsigned lkey = sr_desc->sg_list[j].lkey; GASNETI_TRACE_PRINTF(D,(" %i: lkey=0x%08x len=%"PRIuPTR" local=[%p-%p] remote=[%p-%p]\n", j, lkey, (uintptr_t)len, (void *)l_addr, (void *)(l_addr + (len - 1)), (void *)r_addr, (void *)(r_addr + (len - 1)))); r_addr += len; } #if GASNET_DEBUG sreq->args.rdma.loc_addr = sr_desc->sg_list[0].addr; sreq->args.rdma.rem_addr = sr_desc->wr.rdma.remote_addr; sreq->args.rdma.length = (uint32_t)(r_addr - sr_desc->wr.rdma.remote_addr); #endif break; case IBV_WR_RDMA_READ: GASNETI_TRACE_PRINTF(D,("%s op=GET rkey=0x%08x\n", type, (unsigned int)sr_desc->wr.rdma.rkey)); for (int j = 0; j < sr_desc->num_sge; ++j) { uintptr_t l_addr = sr_desc->sg_list[j].addr; size_t len = sr_desc->sg_list[j].length; unsigned lkey = sr_desc->sg_list[j].lkey; GASNETI_TRACE_PRINTF(D,(" %i: lkey=0x%08x len=%"PRIuPTR" local=[%p-%p] remote=[%p-%p]\n", j, lkey, (uintptr_t)len, (void *)l_addr, (void *)(l_addr + (len - 1)), (void *)r_addr, (void *)(r_addr + (len - 1)))); r_addr += len; } #if GASNET_DEBUG sreq->args.rdma.loc_addr = sr_desc->sg_list[0].addr; sreq->args.rdma.rem_addr = sr_desc->wr.rdma.remote_addr; sreq->args.rdma.length = r_addr - sr_desc->wr.rdma.remote_addr; #endif break; case IBV_WR_ATOMIC_FETCH_AND_ADD: case IBV_WR_ATOMIC_CMP_AND_SWP: gasneti_assert_uint(sr_desc->num_sge ,==, 1); gasneti_assert_uint(sr_desc->sg_list[0].length ,==, sizeof(uint64_t)); GASNETI_TRACE_PRINTF(D,("%s op=AMO rkey=0x%08x\n", type, (unsigned int)sr_desc->wr.atomic.rkey)); GASNETI_TRACE_PRINTF(D,(" 0: lkey=0x%08x local=%p remote=%p\n", sr_desc->sg_list[0].lkey, (void *)(uintptr_t)sr_desc->sg_list[0].addr, (void *)r_addr)); break; default: gasneti_fatalerror("Invalid operation %d for %s\n", sr_desc->opcode, type); } /* check for reasonable message sizes * With SEND 0-bytes triggers a Mellanox bug * With RDMA ops, 0-bytes makes no sense. */ #if GASNET_DEBUG { u_int32_t sum = 0; for (i = 0; i < sr_desc->num_sge; ++i) { sum += sr_desc->sg_list[i].length; gasneti_assert(GASNETC_ALLOW_0BYTE_MSG || (sr_desc->sg_list[i].length != 0)); gasneti_assert(sr_desc->sg_list[i].length <= gasnetc_max_msg_sz); gasneti_assert(sr_desc->sg_list[i].length <= sum); /* check for overflow of 'sum' */ } gasneti_assert(sum <= gasnetc_max_msg_sz); } #endif } } #else /* DEBUG || TRACE */ #define gasnetc_snd_validate(a,b,c,d) do {} while (0) #endif /* DEBUG || TRACE */ GASNETI_COLD GASNETI_NORETURN static void gasnetc_snd_post_fail(int rc, int is_inline) { if (GASNETC_IS_EXITING()) { /* disconnected by another thread */ gasnetc_exit(0); } else { /* unexpected error */ GASNETC_IBV_CHECK(rc, is_inline ? "while posting an inline send work request" : "while posting a send work request"); } gasneti_fatalerror("unreachable"); } GASNETI_NORETURNP(gasnetc_snd_post_fail) // Used in the IMMEDIATE case to reserve a CQ slot separate from gasnetc_snd_post*() // Returns non-zero on success, zero on failure int gasnetc_snd_reserve(gasnetc_cep_t * const cep) { gasnetc_sema_t *sema = cep->snd_cq_sema_p; if (gasnetc_sema_trydown(sema)) return 1; #if GASNETC_IMM_MAY_POLL_SQ // Progress sends *once* on the selected HCA and recheck semaphore gasnetc_snd_reap_hca(cep->hca, 1); return gasnetc_sema_trydown(sema); #else return 0; #endif } GASNETI_INLINE(gasnetc_snd_post_inner) void gasnetc_snd_post_inner( gasnetc_cep_t * const cep, struct ibv_send_wr *sr_desc, int reserved, int is_inline GASNETI_THREAD_FARG) { if (! reserved) { // Loop until space is available for 1 new entry on the CQ. // If we hold the last one then threads sending to ANY node will stall. // So this is the last resource to acquire GASNETI_SPIN_UNTIL_TRACE(gasnetc_sema_trydown(cep->snd_cq_sema_p), C, POST_SR_STALL_CQ, gasnetc_poll_snd()); } // Post the operation struct ibv_send_wr *bad_wr; int rc = ibv_post_send(cep->qp_handle, sr_desc, &bad_wr); if_pf (rc) gasnetc_snd_post_fail(rc, is_inline); } void gasnetc_snd_post_common(gasnetc_sreq_t *sreq, struct ibv_send_wr *sr_desc, int reserved, int is_inline GASNETI_THREAD_FARG) { gasnetc_cep_t * const cep = sreq->cep; /* Must be bound to a qp by now */ gasneti_assert(cep != NULL ); gasneti_assert(sreq->opcode != GASNETC_OP_FREE); gasneti_assert(sreq->opcode != GASNETC_OP_INVALID); /* A valid callback will never take NULL as its data */ gasneti_assert(sreq->comp.cb == NULL || sreq->comp.data != NULL); // setup some remaining fields const enum ibv_send_flags inline_flag = is_inline ? IBV_SEND_INLINE : (enum ibv_send_flags)0; const enum ibv_send_flags signal_flag = GASNETC_USE_SEND_SIGNALLED ? IBV_SEND_SIGNALED : (enum ibv_send_flags)0; sr_desc->send_flags = inline_flag | signal_flag; sr_desc->wr_id = (uintptr_t)sreq; #if GASNETC_IBV_XRC_OFED sr_desc->qp_type.xrc.remote_srqn = cep->xrc_remote_srq_num; /* Even if unused */ #elif GASNETC_IBV_XRC_MLNX sr_desc->xrc_remote_srq_num = cep->xrc_remote_srq_num; /* Even if unused */ #endif sr_desc->next = NULL; /* Trace and debug */ if (is_inline) { GASNETC_STAT_EVENT(POST_INLINE_SR); gasnetc_snd_validate(sreq, sr_desc, 1, "POST_INLINE_SR"); } else { GASNETC_STAT_EVENT_VAL(POST_SR, sr_desc->num_sge); gasnetc_snd_validate(sreq, sr_desc, 1, "POST_SR"); } #if GASNETC_HAVE_FENCED_PUTS // When GASNET_USE_FENCED_PUTS is enabled, we must post both the Put and an // Atomic such that the conduit-level remote completion callback for the Put // will not execute until the ibv-level CQE for the Atomic. GASNETC_DECL_SR_DESC(amo_sr_desc, 1); if (sreq->opcode & gasnetc_op_needs_fence_mask) { gasneti_assert(! reserved); // TODO: IMMEDIATE support for RMA gasnetc_sreq_t *amo_sreq = gasnetc_get_sreq(GASNETC_OP_FENCE GASNETI_THREAD_PASS); amo_sreq->cep = cep; amo_sreq->fence_sreq = sreq; // Setup fetch-and-add using dummy auxseg locations reserved for this purpose amo_sr_desc->wr_id = (uintptr_t)amo_sreq; amo_sr_desc->opcode = IBV_WR_ATOMIC_FETCH_AND_ADD; amo_sr_desc->wr.atomic.compare_add = 0; amo_sr_desc->wr.atomic.remote_addr = GASNETC_FENCE_REM_ADDR(cep); amo_sr_desc->wr.atomic.rkey = cep->hca->aux_rkeys[gasnetc_epid2node(cep->epid)]; amo_sr_desc->num_sge = 1; amo_sr_desc->sg_list[0].length = sizeof(uint64_t); amo_sr_desc->sg_list[0].addr = GASNETC_FENCE_LOC_ADDR(cep); amo_sr_desc->sg_list[0].lkey = cep->hca->aux_reg.handle->lkey; #if GASNETC_IBV_XRC_OFED amo_sr_desc->qp_type.xrc.remote_srqn = sr_desc->qp_type.xrc.remote_srqn; #elif GASNETC_IBV_XRC_MLNX amo_sr_desc->xrc_remote_srq_num = sr_desc->xrc_remote_srq_num; #endif // Assume we can obtain resources to make a single ibv_post_send() call, // generating a single CQE for the Atomic (suppressing the one for the Put) amo_sr_desc->send_flags = IBV_SEND_SIGNALED; amo_sr_desc->next = NULL; sr_desc->send_flags = inline_flag; // Strips IBV_SEND_SIGNALED sr_desc->next = amo_sr_desc; // Try at most twice (w/ a CQ poll between) to obtain a second SQ slot // Spinning indefinitely while holding one slot could deadlock if // multiple threads in a PAR build are all doing the same. // Even in a SEQ or PARSYNC build, there is an advantage to posting the // Put without unnecessary delay. gasnetc_hca_t *hca = cep->hca; if_pf (!gasnetc_sema_trydown(GASNETC_CEP_SQ_SEMA(cep)) && (gasnetc_snd_reap_hca(hca,1), !gasnetc_sema_trydown(GASNETC_CEP_SQ_SEMA(cep)))) { // Since we failed to get a second SQ slot we split the two post operations GASNETC_STAT_EVENT(POST_SR_SPLIT); // Move the remote completion callback from the Put to the Atomic amo_sreq->opcode = GASNETC_OP_ATOMIC; amo_sreq->comp.cb = sreq->comp.cb; amo_sreq->comp.data = sreq->comp.data; sreq->comp.cb = NULL; // Post only the Put, releasing a SQ slot for eventual reclamation sr_desc->next = NULL; sr_desc->send_flags = inline_flag | IBV_SEND_SIGNALED; gasnetc_snd_post_inner(cep, sr_desc, 0, is_inline GASNETI_THREAD_PASS); // Ensure the post call on the normal code path will post the Atomic sr_desc = amo_sr_desc; is_inline = 0; // Now we spin to obtain a SQ slot for just the Atomic operation GASNETI_SPIN_UNTIL_TRACE(gasnetc_sema_trydown(GASNETC_CEP_SQ_SEMA(cep)), C, POST_SR_STALL_SQ2, gasnetc_snd_reap_hca(hca,1)); } } #endif /* Post it */ gasnetc_snd_post_inner(cep, sr_desc, reserved, is_inline GASNETI_THREAD_PASS); } #define gasnetc_snd_post(x,y) gasnetc_snd_post_common(x,y,0,0 GASNETI_THREAD_PASS) #define gasnetc_snd_post_inline(x,y) gasnetc_snd_post_common(x,y,0,1 GASNETI_THREAD_PASS) #if GASNETC_USE_RCV_THREAD static void gasnetc_rcv_thread(struct ibv_wc *comp_p, void *arg) { gasnetc_hca_t * const hca = (gasnetc_hca_t *)arg; gasnetc_rbuf_t ** const spare_p = &hca->rcv_thread_priv; #if GASNETI_THREADINFO_OPT if_pf (! hca->rcv_threadinfo) hca->rcv_threadinfo = _gasneti_mythread_slow(); GASNET_POST_THREADINFO(hca->rcv_threadinfo); #endif gasneti_assert(gasnetc_use_rcv_thread); gasneti_assert((comp_p->opcode == IBV_WC_RECV) || (comp_p->status != IBV_WC_SUCCESS)); if_pf (comp_p->status != IBV_WC_SUCCESS) { gasnetc_dump_cqs(comp_p, hca, 0); gasneti_fatalerror("aborting on reap of failed AM recv"); } #if GASNETC_DYNAMIC_CONNECT && !GASNETC_USE_CONN_THREAD else if_pf (comp_p->wr_id & 1) { gasnetc_conn_rcv_wc(comp_p); } #endif else { gasnetc_rcv_am(comp_p, spare_p GASNETI_THREAD_PASS); GASNETC_STAT_EVENT_VAL(RCV_REAP, 1); #if !GASNETC_PIN_SEGMENT /* Handler might have queued work for firehose */ firehose_poll(); #endif #if GASNETC_SERIALIZE_POLL_CQ // In exclusive mode it is not safe to run progress functions, because // AM Request injection within a progress function cannot poll for credits. // TODO: revisit if/when non-communicating progress functions are separated. if (! gasnetc_rcv_thread_poll_exclusive) #endif GASNETI_PROGRESSFNS_RUN(); } } #endif /* GASNETC_USE_RCV_THREAD */ #if GASNETC_USE_SND_THREAD static void gasnetc_snd_thread(struct ibv_wc *comp_p, void *arg) { gasnetc_hca_t * const hca = (gasnetc_hca_t *)arg; gasneti_assert(gasnetc_use_snd_thread); gasneti_assert((comp_p->opcode == IBV_WC_SEND) || (comp_p->opcode == IBV_WC_RDMA_WRITE) || (comp_p->opcode == IBV_WC_RDMA_READ) || (comp_p->opcode == IBV_WC_COMP_SWAP) || (comp_p->opcode == IBV_WC_FETCH_ADD) || (comp_p->status != IBV_WC_SUCCESS)); if_pf (comp_p->status != IBV_WC_SUCCESS) { gasnetc_dump_cqs(comp_p, hca, 0); gasneti_fatalerror("aborting on reap of failed snd"); } else { gasnetc_snd_reap_one(comp_p, hca GASNETC_COLLECT_ONE); GASNETC_STAT_EVENT(SND_REAP_THR); } } #endif /* GASNETC_USE_SND_THREAD */ #if GASNETC_PIN_SEGMENT /* * ############################################################### * Static helper functions for RDMA when the segment is pre-pinned * ############################################################### */ /* Assemble and post a bounce-buffer PUT or GET */ GASNETI_INLINE(gasnetc_bounce_common) void gasnetc_bounce_common( gasnetc_EP_t ep, gasnetc_epid_t epid, int rem_epidx, struct ibv_send_wr *sr_desc, size_t len, gasnetc_sreq_t *sreq, enum ibv_wr_opcode op GASNETI_THREAD_FARG) { sr_desc->opcode = op; sr_desc->num_sge = 1; sr_desc->sg_list[0].addr = (uintptr_t)sreq->bb_buff; sr_desc->sg_list[0].length = len; gasnetc_cep_t *cep = gasnetc_bind_cep(ep, epid, sreq); sr_desc->wr.rdma.rkey = gasnetc_seg_rkey(cep, rem_epidx); sr_desc->sg_list[0].lkey = GASNETC_SND_LKEY(cep); gasnetc_snd_post(sreq, sr_desc); sr_desc->wr.rdma.remote_addr += len; } // Assemble and all-but-post a zero-copy PUT or GET using either the seg_lkey, // ODP, or firehose to obtain the lkeys. All cases delay the bind to a qp until the // total xfer len is known. // Returns bytes transferred GASNETI_INLINE(gasnetc_zerocp_common) size_t gasnetc_zerocp_common( gasnetc_EP_t ep, gasnetc_epid_t epid, int rem_epidx, struct ibv_send_wr *sr_desc, size_t len, gasnetc_sreq_t *sreq, enum ibv_wr_opcode op GASNETI_THREAD_FARG) { uintptr_t loc_addr = sr_desc->sg_list[0].addr; gasnetc_cep_t *cep; sr_desc->opcode = op; // Limit how much we can xfer // Note that op is a manifest constant in all callers // // We don't want stripe_sz=N to split a N+1 byte xfer into N-byte and 1-byte xfers. // So, sizes between "stripe_sz" and "stripe_split" are spilt into two equal chunks. // Currently stripe_split = MIN(2*stripe_sz, gasnetc_max_msg_sz), which results in // the logic only ever creating chunks of size in [stripe_sz/2, stripe_sz]. switch (op) { case IBV_WR_RDMA_WRITE: if (len > gasnetc_put_stripe_sz) { len = (len > gasnetc_put_stripe_split) ? gasnetc_put_stripe_sz : (len >> 1); } break; case IBV_WR_RDMA_READ: if (len > gasnetc_get_stripe_sz) { len = (len > gasnetc_get_stripe_split) ? gasnetc_get_stripe_sz : (len >> 1); } break; default: gasneti_unreachable_error(("Invalid 'op' in gasnetc_zerocp_common: %d",(int)op)); } size_t sent = 0; // TODO-EX: // This will be replaced by general multi-registration support later const int loc_auxseg = gasneti_in_local_auxsegment((gasneti_EP_t)ep, (void*)loc_addr, len); if_pf (gasnetc_in_bound_segment(ep, loc_addr, len) || loc_auxseg) { // loc_addr is in aux- or client-segment cep = gasnetc_bind_cep(ep, epid, sreq); sr_desc->sg_list[0].lkey = gasnetc_seg_lkey(ep, cep, loc_auxseg); gasneti_assert_uint(sr_desc->sg_list[0].addr ,==, loc_addr); sr_desc->sg_list[0].length = len; sr_desc->num_sge = 1; sreq->fh_count = 0; sent = len; #if GASNETC_IBV_ODP } else if (gasnetc_use_odp) { // TODO-EX: older implicit ODP emulation had 128MB limit. May need to chunk here. cep = gasnetc_bind_cep(ep, epid, sreq); sr_desc->sg_list[0].lkey = cep->hca->implicit_odp.lkey; gasneti_assert_uint(sr_desc->sg_list[0].addr ,==, loc_addr); sr_desc->sg_list[0].length = len; sr_desc->num_sge = 1; sreq->fh_count = 0; sent = len; #endif } else { const firehose_request_t *fh_loc = gasnetc_fh_aligned_local_pin(loc_addr, len); if_pf (! fh_loc) { return 0; // Attempt to xfer un-pinnable memory such as due to bug 3338 } int seg; size_t remain = len; for (seg = 0; fh_loc != NULL; ++seg) { const size_t count = MIN(remain, (fh_loc->addr + fh_loc->len - loc_addr)); sreq->fh_ptr[seg] = fh_loc; sreq->fh_count = seg + 1; sr_desc->sg_list[seg].addr = loc_addr; sr_desc->sg_list[seg].length = count; loc_addr += count; remain -= count; if (!remain || seg == (GASNETC_SND_SG-1)) { break; /* End of xfer or sg list */ } /* We hold a local firehose already, we can only 'try' or risk deadlock */ fh_loc = gasnetc_fh_try_local_pin(loc_addr, 1); } gasneti_assert_int(sreq->fh_count ,>, 0); sr_desc->num_sge = sreq->fh_count; cep = gasnetc_bind_cep(ep, epid, sreq); for (seg = 0; seg < sr_desc->num_sge; ++seg) { /* Xlate to actual lkeys */ sr_desc->sg_list[seg].lkey = GASNETC_FH_LKEY(cep, sreq->fh_ptr[seg]); } sent = len - remain; } sr_desc->wr.rdma.rkey = gasnetc_seg_rkey(cep, rem_epidx); gasneti_assert(sent > 0); return sent; } /* Helper for rdma puts: inline send case */ GASNETI_INLINE(gasnetc_do_put_inline) void gasnetc_do_put_inline( gasnetc_EP_t ep, const gasnetc_epid_t epid, int rem_epidx, struct ibv_send_wr *sr_desc, size_t nbytes, gasnetc_atomic_val_t *remote_cnt, gasnetc_cb_t remote_cb GASNETI_THREAD_FARG) { gasnetc_cep_t *cep; gasnetc_sreq_t *sreq; GASNETI_TRACE_EVENT_VAL(C, RDMA_PUT_INLINE, nbytes); gasneti_assert(nbytes != 0); gasneti_assert(nbytes <= gasnetc_inline_limit); gasneti_assert(gasneti_i_segment_kind_is_host(ep->_segment)); sreq = gasnetc_get_sreq(GASNETC_OP_PUT_INLINE GASNETI_THREAD_PASS); sreq->fh_count = 0; if (remote_cnt) { ++(*remote_cnt); sreq->comp.data = remote_cnt; sreq->comp.cb = remote_cb; } sr_desc->opcode = IBV_WR_RDMA_WRITE; sr_desc->num_sge = 1; sr_desc->sg_list[0].length = nbytes; cep = gasnetc_bind_cep(ep, epid, sreq); sr_desc->wr.rdma.rkey = gasnetc_seg_rkey(cep, rem_epidx); gasnetc_snd_post_inline(sreq, sr_desc); sr_desc->wr.rdma.remote_addr += nbytes; sr_desc->sg_list[0].addr += nbytes; } /* Helper for rdma puts: bounce buffer case */ GASNETI_INLINE(gasnetc_do_put_bounce) void gasnetc_do_put_bounce( gasnetc_EP_t ep, const gasnetc_epid_t epid, int rem_epidx, struct ibv_send_wr *sr_desc, size_t nbytes, gasnetc_atomic_val_t *remote_cnt, gasnetc_cb_t remote_cb GASNETI_THREAD_FARG) { uintptr_t src = sr_desc->sg_list[0].addr; GASNETI_TRACE_EVENT_VAL(C, RDMA_PUT_BOUNCE, nbytes); const int is_long_payload = gasnetc_epid2qpi(epid); // non-zero qpi identifies Long payloads const gasnetc_sreq_opcode_t sreq_op = is_long_payload ? GASNETC_OP_LONG_BOUNCE : GASNETC_OP_PUT_BOUNCE; gasneti_assert(nbytes != 0); gasneti_assert(gasneti_i_segment_kind_is_host(ep->_segment)); do { gasnetc_sreq_t * const sreq = gasnetc_get_sreq(sreq_op GASNETI_THREAD_PASS); const size_t count = MIN(GASNETC_BUFSZ, nbytes); sreq->bb_buff = gasnetc_get_bbuf(1 GASNETI_THREAD_PASS); GASNETI_MEMCPY(sreq->bb_buff, (void *)src, count); if (remote_cnt) { ++(*remote_cnt); sreq->comp.data = remote_cnt; sreq->comp.cb = remote_cb; } gasnetc_bounce_common(ep, epid, rem_epidx, sr_desc, count, sreq, IBV_WR_RDMA_WRITE GASNETI_THREAD_PASS); src += count; nbytes -= count; } while (nbytes); sr_desc->sg_list[0].addr = src; } // Helper for rdma puts: zero copy case // Returns count of unsent bytes, if any GASNETI_INLINE(gasnetc_do_put_zerocp) size_t gasnetc_do_put_zerocp( gasnetc_EP_t ep, const gasnetc_epid_t epid, int rem_epidx, struct ibv_send_wr *sr_desc, size_t nbytes, gasnetc_atomic_val_t *cnt, gasnetc_cb_t cb GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT_VAL(C, RDMA_PUT_ZEROCP, nbytes); const int is_long_payload = gasnetc_epid2qpi(epid); // non-zero qpi identified Long payloads const gasnetc_sreq_opcode_t sreq_op = is_long_payload ? GASNETC_OP_LONG_ZEROCP : GASNETC_OP_PUT_ZEROCP; gasneti_assert(nbytes != 0); // loop over max-length xfers do { gasnetc_sreq_t * const sreq = gasnetc_get_sreq(sreq_op GASNETI_THREAD_PASS); size_t count = gasnetc_zerocp_common(ep, epid, rem_epidx, sr_desc, nbytes, sreq, IBV_WR_RDMA_WRITE GASNETI_THREAD_PASS); if_pf (!count) { // Failed to register memory, such as for read-only memory (bug 3338) // Return non-zero (tells caller to fall-back to bounce-buffers) GASNETI_TRACE_EVENT_VAL(C, RDMA_PUT_READONLY, nbytes); sreq->opcode = GASNETC_OP_FREE; return nbytes; } gasneti_assert(count <= nbytes); nbytes -= count; if (cnt) { ++(*cnt); sreq->comp.data = cnt; sreq->comp.cb = cb; } gasnetc_snd_post(sreq, sr_desc); sr_desc->wr.rdma.remote_addr += count; sr_desc->sg_list[0].addr += count; } while (nbytes); return 0; } /* Helper for rdma gets: bounce buffer case */ GASNETI_INLINE(gasnetc_do_get_bounce) void gasnetc_do_get_bounce( gasnetc_EP_t ep, const gasnetc_epid_t epid, int rem_epidx, struct ibv_send_wr *sr_desc, size_t nbytes, gasnetc_atomic_val_t *remote_cnt, gasnetc_cb_t remote_cb GASNETI_THREAD_FARG) { #if GASNETC_FH_OPTIONAL /* Only reachable if Firehose has been disabled */ uintptr_t dst = sr_desc->sg_list[0].addr; GASNETI_TRACE_EVENT_VAL(C, RDMA_GET_BOUNCE, nbytes); gasneti_assert(nbytes != 0); gasneti_assert(remote_cnt != NULL); gasneti_assert(gasneti_i_segment_kind_is_host(ep->_segment)); do { gasnetc_sreq_t * const sreq = gasnetc_get_sreq(GASNETC_OP_GET_BOUNCE GASNETI_THREAD_PASS); const size_t count = MIN(GASNETC_BUFSZ, nbytes); nbytes -= count; if (nbytes) ++(*remote_cnt); // Do NOT advance prior to the last injection sreq->bb_addr = (void *)dst; sreq->bb_len = count; sreq->bb_buff = gasnetc_get_bbuf(1 GASNETI_THREAD_PASS); sreq->comp.cb = remote_cb; sreq->comp.data = remote_cnt; gasnetc_bounce_common(ep, epid, rem_epidx, sr_desc, count, sreq, IBV_WR_RDMA_READ GASNETI_THREAD_PASS); dst += count; } while (nbytes); sr_desc->sg_list[0].addr = dst; #else gasneti_fatalerror("unreachble call to gasnetc_do_get_bounce()"); #endif } /* Helper for rdma gets: zero copy case */ GASNETI_INLINE(gasnetc_do_get_zerocp) void gasnetc_do_get_zerocp( gasnetc_EP_t ep, const gasnetc_epid_t epid, int rem_epidx, struct ibv_send_wr *sr_desc, size_t nbytes, gasnetc_atomic_val_t *remote_cnt, gasnetc_cb_t remote_cb GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT_VAL(C, RDMA_GET_ZEROCP, nbytes); gasneti_assert(nbytes != 0); gasneti_assert(remote_cnt != NULL); // loop over max-length xfers do { gasnetc_sreq_t * const sreq = gasnetc_get_sreq(GASNETC_OP_GET_ZEROCP GASNETI_THREAD_PASS); size_t count = gasnetc_zerocp_common(ep, epid, rem_epidx, sr_desc, nbytes, sreq, IBV_WR_RDMA_READ GASNETI_THREAD_PASS); if_pf (!count) { // TODO: idealy we could retry memory registration to tolerate transient read-only // status as may occur with some tools which play games with protections to get signals. gasneti_fatalerror("Attempt to GET into non-writable memory at %p\n", (void*)(uintptr_t)sr_desc->sg_list[0].addr); } gasneti_assert(count <= nbytes); nbytes -= count; if (nbytes) ++(*remote_cnt); // Do NOT advance prior to the last injection sreq->comp.cb = remote_cb; sreq->comp.data = remote_cnt; gasnetc_snd_post(sreq, sr_desc); sr_desc->wr.rdma.remote_addr += count; sr_desc->sg_list[0].addr += count; } while (nbytes); } #else /* !GASNETC_PIN_SEGMENT */ /* * ################################################################### * Static helper functions for RDMA when the segment is NOT pre-pinned * ################################################################### */ GASNETI_INLINE(gasnetc_fh_put_inline) void gasnetc_fh_put_inline(gasnetc_sreq_t *sreq GASNETI_THREAD_FARG) { GASNETC_DECL_SR_DESC(sr_desc, 1); const firehose_request_t * const fh_rem = sreq->fh_ptr[0]; size_t len = sreq->fh_len; gasnetc_atomic_val_t *lc; gasnetc_cb_t lc_cb; gasnetc_cep_t *cep; gasneti_assert(fh_rem != NULL); gasneti_assert(sreq->fh_rem_addr >= fh_rem->addr); gasneti_assert(sreq->fh_rem_addr + (len - 1) <= fh_rem->addr + (fh_rem->len - 1)); sr_desc->opcode = IBV_WR_RDMA_WRITE; sr_desc->num_sge = 1; sr_desc->wr.rdma.remote_addr = sreq->fh_rem_addr; sr_desc->sg_list[0].addr = sreq->fh_loc_addr; sr_desc->sg_list[0].length = len; lc_cb = sreq->fh_lc_cb; lc = sreq->fh_lc; cep = gasnetc_bind_cep(sreq->fh_ep, sreq->epid, sreq); sr_desc->wr.rdma.rkey = GASNETC_FH_RKEY(cep, fh_rem); gasnetc_snd_post_inline(sreq, sr_desc); if_pf (lc_cb) lc_cb(lc); /* locally complete */ } GASNETI_INLINE(gasnetc_fh_put_bounce) void gasnetc_fh_put_bounce(gasnetc_sreq_t *orig_sreq GASNETI_THREAD_FARG) { GASNETC_DECL_SR_DESC(sr_desc, 1); const firehose_request_t * const fh_rem = orig_sreq->fh_ptr[0]; gasnetc_epid_t epid = orig_sreq->epid; size_t nbytes = orig_sreq->fh_len; gasnetc_EP_t ep = orig_sreq->fh_ep; gasnetc_cep_t *cep; uintptr_t src = orig_sreq->fh_loc_addr; uintptr_t dst = orig_sreq->fh_rem_addr; const gasnetc_sreq_opcode_t sreq_op = orig_sreq->opcode; gasneti_assert(nbytes != 0); gasneti_assert(orig_sreq->fh_rem_addr >= fh_rem->addr); gasneti_assert(orig_sreq->fh_rem_addr + (nbytes - 1) <= fh_rem->addr + (fh_rem->len - 1)); /* Use full bounce buffers until just one buffer worth of data remains */ while (nbytes > GASNETC_BUFSZ) { gasnetc_sreq_t * const sreq = gasnetc_get_sreq(sreq_op GASNETI_THREAD_PASS); sreq->fh_bbuf = gasnetc_get_bbuf(1 GASNETI_THREAD_PASS); GASNETI_MEMCPY(sreq->fh_bbuf, (void *)src, GASNETC_BUFSZ); sreq->fh_count = 0; sr_desc->opcode = IBV_WR_RDMA_WRITE; sr_desc->num_sge = 1; sr_desc->wr.rdma.remote_addr = dst; sr_desc->sg_list[0].addr = (uintptr_t)sreq->fh_bbuf; sr_desc->sg_list[0].length = GASNETC_BUFSZ; cep = gasnetc_bind_cep(ep, epid, sreq); sr_desc->wr.rdma.rkey = GASNETC_FH_RKEY(cep, fh_rem); sr_desc->sg_list[0].lkey = GASNETC_SND_LKEY(cep); /* Send all ops on same qp to get point-to-point ordering for proper fh_release() */ epid = sreq->epid; gasnetc_snd_post(sreq, sr_desc); src += GASNETC_BUFSZ; dst += GASNETC_BUFSZ; nbytes -= GASNETC_BUFSZ; } /* Send out the last buffer w/ the original resource */ gasneti_assert(nbytes <= GASNETC_BUFSZ); orig_sreq->fh_bbuf = gasnetc_get_bbuf(1 GASNETI_THREAD_PASS); GASNETI_MEMCPY(orig_sreq->fh_bbuf, (void *)src, nbytes); if_pf (orig_sreq->fh_lc_cb) orig_sreq->fh_lc_cb(orig_sreq->fh_lc); /* locally complete */ sr_desc->opcode = IBV_WR_RDMA_WRITE; sr_desc->num_sge = 1; sr_desc->wr.rdma.remote_addr = dst; sr_desc->sg_list[0].addr = (uintptr_t)orig_sreq->fh_bbuf; sr_desc->sg_list[0].length = nbytes; cep = gasnetc_bind_cep(ep, epid, orig_sreq); sr_desc->wr.rdma.rkey = GASNETC_FH_RKEY(cep, fh_rem); sr_desc->sg_list[0].lkey = GASNETC_SND_LKEY(cep); gasnetc_snd_post(orig_sreq, sr_desc); } GASNETI_INLINE(gasnetc_fh_post) void gasnetc_fh_post(gasnetc_sreq_t *sreq, enum ibv_wr_opcode op GASNETI_THREAD_FARG) { GASNETC_DECL_SR_DESC(sr_desc, GASNETC_SND_SG); struct ibv_sge *sg_entry; gasnetc_cep_t *cep; uintptr_t loc_addr; size_t remain; int i; gasneti_assert_int(sreq->fh_count ,>=, 2); gasneti_assert_int(sreq->fh_count ,<=, GASNETC_MAX_FH); gasneti_assert(sreq->fh_ptr[0] != NULL); gasneti_assert(sreq->fh_ptr[1] != NULL); sr_desc->opcode = op; sr_desc->wr.rdma.remote_addr = sreq->fh_rem_addr; sr_desc->num_sge = sreq->fh_count - 1; remain = sreq->fh_len; loc_addr = sreq->fh_loc_addr; sg_entry = sr_desc->sg_list; cep = gasnetc_bind_cep(sreq->fh_ep, sreq->epid, sreq); sr_desc->wr.rdma.rkey = GASNETC_FH_RKEY(cep, sreq->fh_ptr[0]); for (i = 1; i < sreq->fh_count; ++i) { const firehose_request_t *fh_req = sreq->fh_ptr[i]; uintptr_t next = fh_req->addr + fh_req->len; size_t nbytes = MIN(remain, (next - loc_addr)); gasneti_assert(loc_addr < next); gasneti_assert(remain > 0); gasneti_assert(nbytes > 0); sg_entry->addr = loc_addr; sg_entry->length = nbytes; sg_entry->lkey = GASNETC_FH_LKEY(cep, fh_req); ++sg_entry; remain -= nbytes; loc_addr += nbytes; } gasneti_assert(remain == 0); gasnetc_snd_post(sreq, sr_desc); } static void gasnetc_fh_do_put(gasnetc_sreq_t *sreq GASNETI_THREAD_FARG) { gasnetc_counter_t * const am_oust = sreq->fh_oust; switch (sreq->opcode) { case GASNETC_OP_PUT_INMOVE: /* All done in the AM. Complete the sreq here since snd_reap will never see it. */ gasneti_assert(sreq->fh_len == 0); if (sreq->comp.cb != NULL) { sreq->comp.cb(sreq->comp.data); } gasneti_assert_int(sreq->fh_count ,>, 0); firehose_release(sreq->fh_ptr, sreq->fh_count); sreq->opcode = GASNETC_OP_FREE; break; case GASNETC_OP_PUT_INLINE: gasneti_assert(sreq->fh_len > 0); GASNETI_TRACE_EVENT_VAL(C, RDMA_PUT_INLINE, sreq->fh_len); gasnetc_fh_put_inline(sreq GASNETI_THREAD_PASS); break; case GASNETC_OP_PUT_BOUNCE: case GASNETC_OP_LONG_BOUNCE: gasneti_assert(sreq->fh_len > 0); GASNETI_TRACE_EVENT_VAL(C, RDMA_PUT_BOUNCE, sreq->fh_len); gasnetc_fh_put_bounce(sreq GASNETI_THREAD_PASS); break; case GASNETC_OP_PUT_ZEROCP: case GASNETC_OP_LONG_ZEROCP: gasneti_assert(sreq->fh_len > 0); GASNETI_TRACE_EVENT_VAL(C, RDMA_PUT_ZEROCP, sreq->fh_len); gasnetc_fh_post(sreq, IBV_WR_RDMA_WRITE GASNETI_THREAD_PASS); break; default: gasneti_unreachable_error(("Invalid opcode in gasnetc_fh_do_put sreq: 0x%x",(int)sreq->opcode)); } gasnetc_counter_dec_if_pf(am_oust); } #define gasnetc_sreq_is_ready(sreq) \ gasnetc_atomic_decrement_and_test(&((sreq)->fh_ready), GASNETI_ATOMIC_REL|GASNETI_ATOMIC_ACQ) static void gasnetc_fh_put_cb(void *context, const firehose_request_t *fh_rem, int allLocalHit) { gasnetc_sreq_t *sreq = context; gasneti_assert(fh_rem != NULL); sreq->fh_ptr[0] = fh_rem; if (gasnetc_sreq_is_ready(sreq)) { GASNET_BEGIN_FUNCTION(); // TODO: THREAD_FARG for firehose callbacks? gasnetc_fh_do_put(sreq GASNETI_THREAD_PASS); } } static void gasnetc_fh_do_get(gasnetc_sreq_t *sreq GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT_VAL(C, RDMA_GET_ZEROCP, sreq->fh_len); gasnetc_fh_post(sreq, IBV_WR_RDMA_READ GASNETI_THREAD_PASS); } static void gasnetc_fh_get_cb(void *context, const firehose_request_t *fh_rem, int allLocalHit) { gasnetc_sreq_t *sreq = context; sreq->fh_ptr[0] = fh_rem; if (gasnetc_sreq_is_ready(sreq)) { GASNET_BEGIN_FUNCTION(); // TODO: THREAD_FARG for firehose callbacks? gasnetc_fh_do_get(sreq GASNETI_THREAD_PASS); } gasneti_assert(sreq->fh_oust == NULL); } GASNETI_INLINE(gasnetc_get_local_fh) size_t gasnetc_get_local_fh(gasnetc_sreq_t *sreq, uintptr_t loc_addr, size_t len) { size_t remain; int i; gasneti_assert(len != 0); for (i = 1, remain = len; (remain && (i < GASNETC_MAX_FH)); ++i) { const firehose_request_t *fh_loc = gasnetc_fh_try_local_pin(loc_addr, 1); if (!fh_loc) { break; } else { size_t nbytes = MIN(remain, (fh_loc->addr + fh_loc->len - loc_addr)); sreq->fh_ptr[i] = fh_loc; remain -= nbytes; loc_addr += nbytes; } } if (i > 1) { sreq->fh_count = i; len -= remain; } else { // TODO-EX: ODP support for segment everything? const firehose_request_t *fh_loc = gasnetc_fh_aligned_local_pin(loc_addr, len); if_pt (fh_loc) { len = MIN(remain, (fh_loc->addr + fh_loc->len - loc_addr)); sreq->fh_ptr[1] = fh_loc; sreq->fh_count = 2; } else { // Attempt to xfer un-pinnable memory such as due to bug 3338 GASNETI_TRACE_EVENT_VAL(C, RDMA_PUT_READONLY, len); len = 0; sreq->fh_count = 1; // remote only } } return len; } static size_t gasnetc_fh_put_args_fn(void * context, firehose_remotecallback_args_t *args) { gasnetc_sreq_t *sreq = context; const size_t len = MIN(gasnetc_putinmove_limit, sreq->fh_len); args->addr = (void *)(sreq->fh_rem_addr); sreq->fh_putinmove = args->len = len; GASNETI_MEMCPY(args->data, (void *)(sreq->fh_loc_addr), len); return gasneti_offsetof(firehose_remotecallback_args_t, data[len]); } GASNETI_INLINE(gasnetc_fh_put_helper) size_t gasnetc_fh_put_helper( gasnetc_EP_t ep, gasnetc_epid_t epid, gasnetc_sreq_t *sreq, gasnetc_atomic_val_t *local_cnt, gasnetc_atomic_val_t *remote_cnt, uintptr_t loc_addr, uintptr_t rem_addr, size_t len GASNETI_THREAD_FARG) { const gex_Rank_t node = gasnetc_epid2node(epid); const int is_long_payload = gasnetc_epid2qpi(epid); // non-zero qpi identifies Long payloads const firehose_request_t *fh_rem; size_t putinmove = sreq->fh_putinmove = 0; sreq->fh_rem_addr = rem_addr; sreq->fh_loc_addr = loc_addr; sreq->fh_ep = ep; /* See how much (if any) is already pinned. A call to firehose_partial_remote_pin() * might acquire a firehose for a region starting above rem_addr. By instead calling * firehose_try_remote_pin() with len==1, we get a *contiguous* firehose if available. * We count on the implementation of firehose region giving out the largest region * that covers our request. */ fh_rem = firehose_try_remote_pin(node, rem_addr, 1, 0, NULL); if_pt (fh_rem != NULL) { /* HIT in remote firehose table - some initial part of the region is pinned */ sreq->fh_ptr[0] = fh_rem; gasneti_assert(rem_addr >= fh_rem->addr); gasneti_assert(rem_addr <= (fh_rem->addr + fh_rem->len - 1)); len = sreq->fh_len = MIN(len, (fh_rem->addr + fh_rem->len - rem_addr)); sreq->fh_oust = NULL; /* No asynchrony on a HIT */ } else { /* MISS: Some initial part (or all) of the region is unpinned */ uint32_t flags = 0; firehose_remotecallback_args_fn_t args_fn = NULL; gasnetc_atomic_set(&sreq->fh_ready, 2, 0); len = sreq->fh_len = gasnetc_fh_aligned_len(rem_addr, len); if (len <= gasnetc_putinmove_limit_adjusted) { /* Put-in-move optimization used only if the entire xfer can be * piggybacked, or if the remainder fits in an inline. */ flags = FIREHOSE_FLAG_ENABLE_REMOTE_CALLBACK; args_fn = &gasnetc_fh_put_args_fn; } (void)firehose_remote_pin(node, rem_addr, len, flags, NULL, args_fn, &gasnetc_fh_put_cb, sreq); putinmove = sreq->fh_putinmove; if (putinmove) { GASNETI_TRACE_EVENT_VAL(C, RDMA_PUT_IN_MOVE, putinmove); } gasnetc_counter_inc_if(sreq->fh_oust); } /* If the original request can be completed entirely w/o use of * local firehoses then do so. We don't worry about anything * done by the put-in-move optimization, under the assumption that * the original request len is representative of future requests. */ int is_nonbulk = (sreq->fh_lc_cb == gasnetc_cb_counter); // GEX_EVENT_NOW if ((len <= gasnetc_inline_limit) || (is_nonbulk && (len <= gasnetc_nonbulk_bounce_limit))) { sreq->fh_count = 1; /* Just the remote one */ } else { size_t new_len = gasnetc_get_local_fh(sreq, loc_addr, len); if_pf (!new_len) { // Failed to register memory, such as for read-only memory (bug 3338) // So, use bounce buffers sreq->opcode = is_long_payload ? GASNETC_OP_LONG_BOUNCE : GASNETC_OP_PUT_BOUNCE; if_pf (fh_rem == NULL) { /* Memory will be copied asynchronously */ if (local_cnt) ++(*local_cnt); } else { /* Memory will be copied synchronously before return */ sreq->fh_lc_cb = NULL; } if (remote_cnt != NULL) { ++(*remote_cnt); } goto ready_check; // skip the normal protocol options } len = new_len; } if_pf (len <= putinmove) { /* AM is carrying at least as much as we could pin locally */ len = putinmove; sreq->fh_len = 0; sreq->opcode = GASNETC_OP_PUT_INMOVE; if (remote_cnt != NULL) { ++(*remote_cnt); } } else { /* Adjust sreq for len (which may have been reduced for local alignment) * and for any data piggybacked on the AM (if any). */ size_t nbytes = len - putinmove; sreq->fh_len = nbytes; sreq->fh_rem_addr += putinmove; sreq->fh_loc_addr += putinmove; if (nbytes <= gasnetc_inline_limit) { /* Inline when small enough */ sreq->opcode = GASNETC_OP_PUT_INLINE; if_pf (fh_rem == NULL) { /* Memory will be copied asynchronously */ if (local_cnt) ++(*local_cnt); } else { /* Memory will be copied synchronously before return */ sreq->fh_lc_cb = NULL; } if (remote_cnt != NULL) { ++(*remote_cnt); } } else if (is_nonbulk && (nbytes <= gasnetc_nonbulk_bounce_limit)) { /* Bounce buffer use for non-bulk puts (upto a limit) */ sreq->opcode = is_long_payload ? GASNETC_OP_LONG_BOUNCE : GASNETC_OP_PUT_BOUNCE; if_pf (fh_rem == NULL) { /* Memory will be copied asynchronously */ ++(*local_cnt); } else { /* Memory will be copied synchronously before return */ sreq->fh_lc_cb = NULL; } if (remote_cnt != NULL) { ++(*remote_cnt); } } else { /* Use the local firehose(s) obtained earlier */ sreq->opcode = is_long_payload ? GASNETC_OP_LONG_ZEROCP : GASNETC_OP_PUT_ZEROCP; /* The init or the sync (or neither) might wait on completion, but never both */ if (local_cnt != NULL) { ++(*local_cnt); sreq->comp.data = local_cnt; sreq->comp.cb = sreq->fh_lc_cb; } else if (remote_cnt != NULL) { ++(*remote_cnt); } } } gasneti_assert(sreq->opcode != GASNETC_OP_INVALID); ready_check: if ((fh_rem != NULL) || gasnetc_sreq_is_ready(sreq)) { gasnetc_fh_do_put(sreq GASNETI_THREAD_PASS); } gasneti_assert(len >= putinmove); gasneti_assert(len > 0); return len; } GASNETI_INLINE(gasnetc_fh_get_helper) size_t gasnetc_fh_get_helper(gasnetc_EP_t ep, gasnetc_epid_t epid, gasnetc_sreq_t *sreq, uintptr_t loc_addr, uintptr_t rem_addr, size_t len, gasnetc_atomic_val_t *remote_cnt GASNETI_THREAD_FARG) { const size_t orig_len = len; const gex_Rank_t node = gasnetc_epid2node(epid); const firehose_request_t *fh_rem; sreq->fh_rem_addr = rem_addr; sreq->fh_loc_addr = loc_addr; sreq->fh_ep = ep; /* See how much (if any) is already pinned. A call to firehose_partial_remote_pin() * might acquire a firehose for a region starting above rem_addr. By instead calling * firehose_try_remote_pin() with len==1, we get a *contiguous* firehose if available. * We count on the implementation of firehose region giving out the largest region * that covers our request. */ fh_rem = firehose_try_remote_pin(node, rem_addr, 1, 0, NULL); if_pt (fh_rem != NULL) { /* HIT in remote firehose table - some initial part of the region is pinned */ sreq->fh_ptr[0] = fh_rem; gasneti_assert(rem_addr >= fh_rem->addr); gasneti_assert(rem_addr <= (fh_rem->addr + fh_rem->len - 1)); len = MIN(len, (fh_rem->addr + fh_rem->len - rem_addr)); } else { /* MISS: Some initial part (or all) of the region is unpinned */ gasnetc_atomic_set(&sreq->fh_ready, 2, 0); len = gasnetc_fh_aligned_len(rem_addr, len); (void)firehose_remote_pin(node, rem_addr, len, 0, NULL, NULL, &gasnetc_fh_get_cb, sreq); } len = sreq->fh_len = gasnetc_get_local_fh(sreq, loc_addr, len); if_pf (!len) { // TODO: idealy we could retry memory registration to tolerate transient read-only // status as may occur with some tools which play games with protections to get signals. gasneti_fatalerror("Attempt to GET into non-writable memory at %p\n", (void *)loc_addr); } if (len != orig_len) ++(*remote_cnt); // Do NOT advance prior to the last injection if ((fh_rem != NULL) || gasnetc_sreq_is_ready(sreq)) { gasnetc_fh_do_get(sreq GASNETI_THREAD_PASS); } gasneti_assert(len > 0); return len; } #endif GASNETI_INLINE(idiv_round_up) int idiv_round_up(int numerator, int denominator) { return (numerator + denominator - 1) / denominator; } /* ------------------------------------------------------------------------------------ * * Externally visible functions * * ------------------------------------------------------------------------------------ */ /* * Check/compute limits before allocating anything */ extern int gasnetc_sndrcv_limits(void) { gasnetc_hca_t *hca; int h; { // How many threads do we expect may execute handlers concurrently? int rcv_thread = (gasnetc_use_rcv_thread ? 1 : 0); // AM recv thread #if GASNET_PAR // Guess based on (cpus / procs), rounded up. int cpus = gasneti_cpu_count(); int procs = gasneti_myhost.node_count; int client_threads = (cpus + procs - 1) / procs; #else // At most 1 client thread *in GASNet* int client_threads = 1; #endif int threads = rcv_thread + client_threads; gasnetc_rbuf_spares = MAX(1,gasneti_getenv_int_withdefault("GASNET_RBUF_SPARES", threads, 0)); } // Count normal qps to be placed on each HCA // XXX: this logic depends on the current gasnetc_select_port() logic; // in particular on the simple node-independent repetition of ports. for (int i = 0; i < gasnetc_num_qps; ++i) { hca = &gasnetc_hca[gasnetc_port_tbl[i % gasnetc_num_ports].hca_index]; hca->qps += 1; hca->max_qps += gasneti_nodes; } /* Ops outstanding per peer and total: */ if (gasnetc_op_oust_limit == 0) { /* 0 = automatic limit computation */ gasnetc_op_oust_per_qp = INT_MAX; GASNETC_FOR_ALL_HCA_INDEX(h) { gasneti_atomic_val_t tmp = MIN(GASNETI_ATOMIC_MAX, gasnetc_hca[h].hca_cap.max_cqe); gasnetc_op_oust_per_qp = MIN(gasnetc_op_oust_per_qp, (tmp / gasnetc_hca[h].qps)); } } else { gasnetc_op_oust_per_qp = idiv_round_up(MIN(GASNETI_ATOMIC_MAX, gasnetc_op_oust_limit), gasnetc_num_qps); GASNETC_FOR_ALL_HCA(hca) { int tmp = hca->qps * gasnetc_op_oust_per_qp; if (tmp > hca->hca_cap.max_cqe) { GASNETI_RETURN_ERRR(RESOURCE, "GASNET_NETWORKDEPTH_{PP,TOTAL} exceed HCA capabilities"); } } } gasnetc_op_oust_pp = idiv_round_up(gasnetc_op_oust_pp, gasnetc_num_qps); gasnetc_op_oust_per_qp = MIN(gasnetc_op_oust_per_qp, gasnetc_op_oust_pp*gasneti_nodes); gasnetc_op_oust_limit = gasnetc_num_qps * gasnetc_op_oust_per_qp; GASNETI_TRACE_PRINTF(I, ("Final/effective GASNET_NETWORKDEPTH_TOTAL = %d", gasnetc_op_oust_limit)); /* AM recv buffer allocation. * There are 3 roles a rcv buffer might fill (counts per HCA): * (1) (gasnetc_num_hcas * gasnetc_rbuf_spares) used in recv path to post before processing * (2) (gasnetc_am_oust_pp * hca->max_qps) used to catch Requests * (3) (gasnetc_am_oust_pp * hca->max_qps) used to catch Replies * However distribution over QPs and SRQ may each reduce the second two. */ gasnetc_am_oust_pp = idiv_round_up(gasnetc_am_oust_pp, gasnetc_num_qps); gasnetc_am_rqst_per_qp = gasnetc_am_oust_pp * (gasneti_nodes - 1); // Compute gasnetc_am_oust_pp (and report GASNET_AM_CREDITS_PP) GASNETC_FOR_ALL_HCA(hca) { int tmp = hca->hca_cap.max_cqe - gasnetc_rbuf_spares; tmp = idiv_round_up(tmp, 2 * hca->qps); // Remainder to be split between Request and Reply, spread over the qps gasnetc_am_rqst_per_qp = MIN(gasnetc_am_rqst_per_qp, tmp); } gasnetc_am_oust_pp = idiv_round_up(gasnetc_am_rqst_per_qp, MAX(1, (gasneti_nodes - 1))); GASNETI_TRACE_PRINTF(I, ("Final/effective GASNET_AM_CREDITS_PP = %d", gasnetc_am_oust_pp * gasnetc_num_qps)); // Compute gasnetc_am_oust_limit (and report GASNET_AM_CREDITS_TOTAL) if (gasnetc_am_oust_limit == 0) { // automatic limit computations. gasnetc_am_oust_limit = MIN(gasnetc_op_oust_limit, gasnetc_num_qps * gasnetc_am_rqst_per_qp); } else { gasnetc_am_oust_limit = MIN(gasnetc_am_oust_limit, gasnetc_op_oust_limit); if (gasnetc_am_oust_limit > gasnetc_num_qps * gasnetc_am_rqst_per_qp) { GASNETI_RETURN_ERRR(RESOURCE, "GASNET_AM_CREDITS_{PP,TOTAL} exceed HCA capabilities"); } } GASNETI_TRACE_PRINTF(I, ("Final/effective GASNET_AM_CREDITS_TOTAL = %d", gasnetc_am_oust_limit)); // Ensure credit coallescing can't deadlock a Request (bug 1418) gasnetc_am_credits_slack = MIN(gasnetc_am_credits_slack, gasnetc_am_oust_pp - 1); gasnetc_am_credits_slack = MIN(gasnetc_am_credits_slack, 256); GASNETI_TRACE_PRINTF(I, ("Final/effective GASNET_AM_CREDITS_SLACK = %d", gasnetc_am_credits_slack)); if (gasnetc_bbuf_limit == 0) { /* 0 = automatic limit computation */ /* We effectively count local AMs against gasnetc_op_oust_limit for simplicity, * but only expect one in-flight per thread anyway. */ gasnetc_bbuf_limit = gasnetc_op_oust_limit; } else { gasnetc_bbuf_limit = MIN(gasnetc_bbuf_limit, gasnetc_op_oust_limit); } /* SRQ may raise this. So, report is deferred. */ const int rcv_spares = gasnetc_num_hcas * gasnetc_rbuf_spares; #if GASNETC_IBV_SRQ if (gasnetc_use_srq) { unsigned int srq_wr_per_qp = (gasnetc_rbuf_limit - rcv_spares) / gasnetc_num_qps; int orig = gasnetc_rbuf_limit; int tmp; /* Ensure each path has some reasonable miniumum. * Since this is not scaled w/ nodes it could safely be much larger than this. */ const int min_wr_per_qp = 2; if (srq_wr_per_qp && (srq_wr_per_qp < min_wr_per_qp)) { srq_wr_per_qp = min_wr_per_qp; gasneti_console_message( "WARNING","Requested GASNET_RBUF_COUNT %d increased to %d", orig, gasnetc_num_qps * srq_wr_per_qp + rcv_spares); } /* Check against HCA limits */ GASNETC_FOR_ALL_HCA(hca) { unsigned int tmp = hca->hca_cap.max_srq_wr / hca->qps; if (!srq_wr_per_qp || (tmp < srq_wr_per_qp)) { srq_wr_per_qp = tmp; } } gasnetc_rbuf_limit = gasnetc_num_qps * srq_wr_per_qp + rcv_spares; /* Warn only if reduced relative to an explicit non-zero value */ if (gasnetc_rbuf_set && orig && (gasnetc_rbuf_limit < orig)) { gasneti_console_message( "WARNING","Requested GASNET_RBUF_COUNT %d reduced by HCA's max_srq_wr to %d", orig, gasnetc_rbuf_limit); } /* As per README: GASNET_USE_SRQ < 0: Use SRQ only if memory savings would result TODO: The "rbuf_spares" may be unused when SRQ is active? */ tmp = MIN(gasnetc_am_rqst_per_qp, srq_wr_per_qp/2); // Half of non-spares gasneti_assert(gasnetc_rbuf_limit != 0); GASNETI_TRACE_PRINTF(I, ("Final/effective GASNET_RBUF_COUNT = %d (SRQ limit: %d, w/o SRQ: %d)", 2 * tmp * gasnetc_num_qps + rcv_spares, gasnetc_rbuf_limit, 2 * gasnetc_am_rqst_per_qp * gasnetc_num_qps + rcv_spares)); if ((gasnetc_use_srq < 0) && (tmp == gasnetc_am_rqst_per_qp)) { GASNETI_TRACE_PRINTF(I, ("SRQ disabled because GASNET_USE_SRQ = -1 and no buffer savings would result")); gasnetc_use_srq = 0; } else { GASNETI_TRACE_PRINTF(I, ("SRQ enabled")); gasnetc_am_rqst_per_qp = tmp; gasnetc_use_srq = 1; gasnetc_am_credits_slack = 0; /* Need to ensure some BBUFs avail even if max number of AM Requests are all blocked */ gasnetc_bbuf_limit = MAX(gasnetc_bbuf_limit, MIN(64, gasnetc_op_oust_limit) + gasnetc_am_oust_limit); } } else { GASNETI_TRACE_PRINTF(I, ("Final/effective GASNET_RBUF_COUNT = %d", 2 * gasnetc_am_rqst_per_qp * gasnetc_num_qps + rcv_spares)); GASNETI_TRACE_PRINTF(I, ("SRQ disabled")); gasnetc_use_srq = 0; } /* gasnetc_use_srq is just 0 or 1 from here on */ #else GASNETI_TRACE_PRINTF(I, ("Final/effective GASNET_RBUF_COUNT = %d", 2 * gasnetc_am_rqst_per_qp * gasnetc_num_qps + rcv_spares)); #endif GASNETI_TRACE_PRINTF(I, ("Final/effective GASNET_BBUF_COUNT = %d", gasnetc_bbuf_limit)); gasnetc_am_credits_slack_orig = gasnetc_am_credits_slack; #if GASNETC_BUILD_IBVRATOMIC if (!gasnetc_ratomicbuf_limit || (gasnetc_ratomicbuf_limit > gasnetc_op_oust_limit)) { gasnetc_ratomicbuf_limit = gasnetc_op_oust_limit; } GASNETI_TRACE_PRINTF(I, ("Final/effective GASNET_RATOMICBUF_COUNT = %d", gasnetc_ratomicbuf_limit)); #endif gasnetc_alloc_qps = gasnetc_num_qps; /* Default w/o SRQ or XRC */ #if GASNETC_IBV_SRQ if (gasnetc_use_srq) { gasnetc_alloc_qps = 2 * gasnetc_num_qps; GASNETC_FOR_ALL_HCA(hca) { hca->max_qps *= 2; } } #if GASNETC_IBV_XRC else if (gasnetc_use_xrc) { /* No SRQ means no XRC either */ gasnetc_use_xrc = 0; } GASNETI_TRACE_PRINTF(I, ("XRC %sabled", gasnetc_use_xrc ? "en" : "dis")); #endif #endif /* sanity/bounds checks */ GASNETC_FOR_ALL_HCA(hca) { const unsigned int max_qp = hca->hca_cap.max_qp; const unsigned int max_qp_wr = hca->hca_cap.max_qp_wr; if_pf (hca->max_qps > max_qp) { GASNETI_RETURN_ERRR(RESOURCE, "job size exceeds HCA capabilities"); } if_pf (gasnetc_am_oust_pp * 2 > max_qp_wr) { GASNETI_RETURN_ERRR(RESOURCE, "GASNET_AM_CREDITS_PP exceeds HCA capabilities"); } if_pf (gasnetc_op_oust_pp > max_qp_wr) { GASNETI_RETURN_ERRR(RESOURCE, "GASNET_NETWORKDEPTH_PP exceeds HCA capabilities"); } } return GASNET_OK; } #if GASNETC_IBV_SRQ static struct ibv_srq * gasnetc_create_srq(gasnetc_hca_t *hca, const int max_wr) { struct ibv_srq *result = NULL; #if GASNETC_IBV_XRC_OFED if (gasnetc_use_xrc) { struct ibv_srq_init_attr_ex attr; memset(&attr, 0, sizeof(struct ibv_srq_init_attr_ex)); attr.attr.max_wr = max_wr; attr.attr.max_sge = 1; attr.comp_mask = IBV_SRQ_INIT_ATTR_TYPE | IBV_SRQ_INIT_ATTR_XRCD | IBV_SRQ_INIT_ATTR_CQ | IBV_SRQ_INIT_ATTR_PD; attr.srq_type = IBV_SRQT_XRC; attr.xrcd = hca->xrc_domain; attr.cq = hca->rcv_cq; attr.pd = hca->pd; result = ibv_create_srq_ex(hca->handle, &attr); } else #elif GASNETC_IBV_XRC_MLNX if (gasnetc_use_xrc) { struct ibv_srq_init_attr attr; memset(&attr, 0, sizeof(attr)); attr.attr.max_wr = max_wr; attr.attr.max_sge = 1; result = ibv_create_xrc_srq(hca->pd, hca->xrc_domain, hca->rcv_cq, &attr); } else #endif { struct ibv_srq_init_attr attr; memset(&attr, 0, sizeof(attr)); attr.attr.max_wr = max_wr; attr.attr.max_sge = 1; result = ibv_create_srq(hca->pd, &attr); } return result; } #endif extern int gasnetc_sndrcv_init(gasnetc_EP_t ep) { gasnetc_hca_t *hca; int act_size; int vstat; gasnetc_buffer_t *buf; gasnetc_rbuf_t *rbuf; int padded_size, h, i; size_t size; int ud_rcvs = 0; #if GASNETC_DYNAMIC_CONNECT /* Default to handling 4 + 2*lg(remote_nodes) incomming UD requests and 4 outgoing */ gasnetc_ud_rcvs = 1; while ((1 << gasnetc_ud_rcvs) < (int)gasneti_nodes) { ++gasnetc_ud_rcvs; } gasnetc_ud_rcvs = 4 + 2 * gasnetc_ud_rcvs; gasnetc_ud_snds = 4; gasnetc_ud_rcvs = gasneti_getenv_int_withdefault("GASNET_CONNECT_RCVS", gasnetc_ud_rcvs, 0); gasnetc_ud_snds = gasneti_getenv_int_withdefault("GASNET_CONNECT_SNDS", gasnetc_ud_snds, 0); GASNETI_TRACE_PRINTF(I, ("Buffers for dynamic connections: rcv=%d snd=%d", gasnetc_ud_rcvs, gasnetc_ud_snds)); #if !GASNETC_USE_CONN_THREAD ud_rcvs = gasnetc_ud_rcvs; #endif #endif /* * setup RCV resources */ /* create one RCV CQ per HCA */ GASNETC_FOR_ALL_HCA(hca) { const int rcv_count = 2 * gasnetc_am_rqst_per_qp * hca->qps + gasnetc_rbuf_spares; const int cqe_count = rcv_count + (!hca->hca_index ? ud_rcvs : 0); gasnetc_progress_thread_t *rcv_thread = NULL; #if GASNETC_USE_RCV_THREAD if (gasnetc_use_rcv_thread) rcv_thread = &hca->rcv_thread; #endif vstat = gasnetc_create_cq(hca->handle, cqe_count, &hca->rcv_cq, &act_size, rcv_thread); GASNETC_IBV_CHECK(vstat, "from gasnetc_create_cq(rcv_cq)"); GASNETI_TRACE_PRINTF(I, ("Recv CQ length: requested=%d actual=%d", (int)cqe_count, (int)act_size)); gasneti_assert(act_size >= cqe_count); /* We don't set rcv_count = act_size here, as that could nearly double the memory allocated below */ if (gasneti_nodes > 1) { /* Allocated pinned memory for receive buffers */ size = GASNETI_PAGE_ALIGNUP(rcv_count * sizeof(gasnetc_buffer_t)); buf = gasnetc_mmap(size); if_pf (buf == GASNETC_MMAP_FAILED) { buf = NULL; } else { vstat = gasnetc_pin(hca, buf, size, IBV_ACCESS_LOCAL_WRITE, &hca->rcv_reg); if (vstat != 0) { gasnetc_munmap(buf, size); buf = NULL; } } if_pf (buf == NULL) { GASNETI_RETURN_ERRR(RESOURCE, "Unable to allocate pinned memory for AM recv buffers"); } #if GASNETC_IBV_SRQ /* create two shared recv queues per HCA */ if (gasnetc_use_srq) { const int rbuf_count = hca->qps * gasnetc_am_rqst_per_qp; hca->rqst_srq = gasnetc_create_srq(hca, rbuf_count); GASNETC_IBV_CHECK_PTR(hca->rqst_srq, "from gasnetc_create_srq(Request)"); hca->repl_srq = gasnetc_create_srq(hca, rbuf_count); GASNETC_IBV_CHECK_PTR(hca->repl_srq, "from gasnetc_create_srq(Reply)"); gasnetc_sema_init(&hca->am_sema, rbuf_count, rbuf_count); } #endif /* Allocated normal memory for receive descriptors (rbuf's) */ padded_size = GASNETI_ALIGNUP(sizeof(gasnetc_rbuf_t), GASNETI_CACHE_LINE_BYTES); if (NULL == hca->rbufs) { hca->rbufs = gasneti_malloc_aligned(GASNETI_CACHE_LINE_BYTES, rcv_count*padded_size); gasneti_leak_aligned(hca->rbufs); } /* Initialize the rbuf's */ gasnetc_lifo_init(&hca->rbuf_freelist); rbuf = hca->rbufs; for (i = 0; i < rcv_count; ++i) { rbuf->rr_desc.num_sge = 1; rbuf->rr_desc.sg_list = &rbuf->rr_sg; rbuf->rr_desc.wr_id = (uintptr_t)rbuf; /* CQE will point back to this request */ rbuf->rr_desc.next = NULL; rbuf->rr_sg.length = GASNETC_BUFSZ; rbuf->rr_sg.addr = (uintptr_t)&buf[i]; rbuf->rr_ep = ep; gasnetc_lifo_push(&hca->rbuf_freelist, rbuf); rbuf = (gasnetc_rbuf_t *)((uintptr_t)rbuf + padded_size); } #if GASNETC_USE_RCV_THREAD if (gasnetc_use_rcv_thread) { hca->rcv_thread_priv = gasnetc_lifo_pop(&hca->rbuf_freelist); gasneti_assert(hca->rcv_thread_priv != NULL); } #endif #if GASNETC_SERIALIZE_POLL_CQ gasnetc_atomic_set(&hca->poll_cq_semas.snd,0,0); gasnetc_atomic_set(&hca->poll_cq_semas.rcv,0,0); #endif } } /* * setup SND resources */ /* create the SND CQ and associated semaphores */ if (NULL == gasnetc_cq_semas) { gasnetc_cq_semas = (gasnetc_sema_t *) gasneti_malloc_aligned(GASNETI_CACHE_LINE_BYTES, gasnetc_num_hcas*sizeof(gasnetc_sema_t)); gasneti_leak_aligned(gasnetc_cq_semas); } gasnetc_op_oust_per_qp = MAX(1, gasnetc_op_oust_per_qp); /* Avoid error in single-node case */ GASNETC_FOR_ALL_HCA(hca) { const int rqst_count = gasnetc_use_srq ? gasnetc_am_rqst_per_qp : 0; const int cqe_count = hca->qps * (gasnetc_op_oust_per_qp + rqst_count); gasnetc_progress_thread_t *snd_thread = NULL; #if GASNETC_USE_SND_THREAD if (gasnetc_use_snd_thread) snd_thread = &hca->snd_thread; #endif vstat = gasnetc_create_cq(hca->handle, cqe_count, &hca->snd_cq, &act_size, snd_thread); GASNETC_IBV_CHECK(vstat, "from gasnetc_create_cq(snd_cq)"); GASNETI_TRACE_PRINTF(I, ("Send CQ length: requested=%d actual=%d", (int)cqe_count, (int)act_size)); gasneti_assert(act_size >= cqe_count); /* We use actual size here, since the memory has been allocated anyway */ gasnetc_sema_init(&gasnetc_cq_semas[hca->hca_index], act_size, act_size); hca->snd_cq_sema_p = &gasnetc_cq_semas[hca->hca_index]; } /* Allocated pinned memory for AMs and bounce buffers * TODO: Can/should we *USE* any extra allocated due to rounding-up? */ if (gasnetc_bbuf_limit) { gasneti_assert((gasnetc_use_srq == 0) || (gasnetc_use_srq == 1)); // SRQ requires one extra size = GASNETI_PAGE_ALIGNUP((gasnetc_use_srq + gasnetc_bbuf_limit) * sizeof(gasnetc_buffer_t)); buf = gasnetc_mmap(size); if_pf (buf == GASNETC_MMAP_FAILED) { buf = NULL; } else { GASNETC_FOR_ALL_HCA_INDEX(h) { vstat = gasnetc_pin(&gasnetc_hca[h], buf, size, IBV_ACCESS_LOCAL_WRITE, &gasnetc_hca[h].snd_reg); if (vstat != 0) { for (h -= 1; h >= 0; --h) { gasnetc_unpin(&gasnetc_hca[h], &gasnetc_hca[h].snd_reg); } gasnetc_munmap(buf, size); buf = NULL; break; } } } if_pf (buf == NULL) { GASNETI_RETURN_ERRR(RESOURCE, "Unable to allocate pinned memory for AM/bounce buffers"); } gasnetc_lifo_init(&gasnetc_bbuf_freelist); for (i = 0; i < gasnetc_bbuf_limit; ++i) { gasnetc_lifo_push(&gasnetc_bbuf_freelist, buf); ++buf; } #if GASNETC_IBV_SRQ if (gasnetc_use_srq) { gasnetc_atomic_ptr_set(&gasnetc_spare_reply_bbuf, (uintptr_t)buf, 0); } else { // Should (already) be initialized non-NULL to prevent buffer-freeing path from setting it gasneti_assert(gasnetc_atomic_ptr_read(&gasnetc_spare_reply_bbuf, 0)); } #endif } #if GASNETC_PIN_SEGMENT // Allocate rkey tables for primodial segments // TODO: move primordial rkeys to shared (PSHM) storage GASNETC_FOR_ALL_HCA(hca) { hca->rkeys = gasneti_calloc(gasneti_nodes, sizeof(uint32_t)); gasneti_leak(hca->rkeys); } #endif #if GASNETC_HAVE_FENCED_PUTS // Speed critical path checks gasnetc_op_needs_fence_mask = gasnetc_use_fenced_puts ? GASNETC_OP_NEEDS_FENCE : 0; #endif /* Init thread-local data */ gasnetc_per_thread_setup(); return GASNET_OK; } extern void gasnetc_sndrcv_init_peer(gex_Rank_t node, gasnetc_cep_t *cep) { const int first = !cep->hca->num_qps; for (int i = 0; i < gasnetc_alloc_qps; ++i, ++cep) { gasnetc_hca_t *hca = cep->hca; cep->epid = gasnetc_epid(node, i); cep->snd_cq_sema_p = hca->snd_cq_sema_p; #if GASNETC_IB_MAX_HCAS > 1 /* "Cache" the local keys associated w/ this cep */ if (gasneti_nodes > 1) { cep->rcv_lkey = hca->rcv_reg.handle->lkey; } cep->snd_lkey = hca->snd_reg.handle->lkey; #endif cep->rbuf_freelist = &hca->rbuf_freelist; // Prepost to SRQ for only one peer on each HCA if (gasnetc_use_srq && first) { for (int j = 0; j < gasnetc_am_rqst_per_qp; ++j) { gasnetc_rcv_post(cep, gasnetc_lifo_pop(cep->rbuf_freelist)); } } if (!GASNETI_NBRHD_JOBRANK_IS_LOCAL(node)) { // AM resources never used w/i NBRHD if (!gasnetc_use_srq) { for (int j = 0; j < 2 * gasnetc_am_oust_pp; ++j) { // Prepost one rcv buffer for each possible incomming Request or Reply gasnetc_rcv_post(cep, gasnetc_lifo_pop(cep->rbuf_freelist)); } } /* Setup semaphores/counters */ /* sq_sema now set when QP is created */ if (gasnetc_use_srq && (i < gasnetc_num_qps)) { gasnetc_sema_init(&cep->am_rem, 0, 0); } else { gasnetc_sema_init(&cep->am_rem, gasnetc_am_oust_pp, gasnetc_am_oust_pp); } } else { /* Should never use AM resources for loopback or same supernode */ /* XXX: is this now unreachable with new connect code? */ gasnetc_sema_init(&cep->am_rem, 0, 0); gasnetc_atomic_set(&cep->am_flow.credit, 0, 0); } hca->num_qps++; gasneti_assert_uint(hca->num_qps ,<=, hca->max_qps); } } extern void gasnetc_sndrcv_init_inline(void) { gasnetc_am_inline_limit_sndrcv = MIN(gasnetc_inline_limit, sizeof(gasnetc_am_tmp_buf_t)); #if !GASNETC_PIN_SEGMENT gasnetc_putinmove_limit_adjusted = gasnetc_putinmove_limit ? (gasnetc_putinmove_limit + gasnetc_inline_limit) : 0; #endif } extern void gasnetc_sndrcv_attach_peer(gex_Rank_t node, gasnetc_cep_t *cep) { #if GASNETC_PIN_SEGMENT for (int i = 0; i < gasnetc_alloc_qps; ++i, ++cep) { gasnetc_hca_t *hca = cep->hca; gasneti_assert(hca->rkeys); cep->rkey = hca->rkeys[node]; } #else /* Nothing currently needed */ #endif } #if GASNETC_IBV_SHUTDOWN static void gasnetc_unpin_unmap(gasnetc_hca_t *hca, gasnetc_memreg_t *reg) { if (reg->len) { gasnetc_unpin(hca, reg); gasnetc_unmap(reg); } } void gasnetc_sys_flush_reph(gex_Token_t token, gex_AM_Arg_t credits) { gasnetc_cep_t *cep = ((gasnetc_rbuf_t *)token)->cep; gasneti_assert(! gasnetc_use_srq); /* SRQ prohibits credit coallescing */ gasneti_assert(0 != credits); /* Should not have sent otherwise */ /* May reduce trafic by sending banked credits back sooner: */ gasnetc_am_credits_slack = 0; if (--credits) { /* Since this is a Reply, one credit has already been posted */ gasnetc_sema_up_n(&cep->am_rem, credits); } } static int gasnetc_close_recvd[16]; /* Note 16-bit GASNET_MAXNODES */ void gasnetc_sys_close_reqh(gex_Token_t token) { gex_Rank_t peer = gasnetc_msgsource(token); int distance, shift; distance = (peer > gasneti_mynode) ? peer - gasneti_mynode : peer + (gasneti_nodes - gasneti_mynode); gasneti_assert(GASNETI_POWEROFTWO(distance)); shift = 0; while ((1<rbuf_needReply); rbuf->rbuf_needReply = 0; /* we are terminating flow control */ } } extern void gasnetc_sndrcv_quiesce(void) { GASNET_BEGIN_FUNCTION(); // OK - not a critical-path gasnetc_hca_t *hca; gasnetc_EP_t ep = gasnetc_ep0; // TODO-EX: multi-EP suport /* suspend credit coallescing (if any) and return any banked credits */ if (! gasnetc_use_srq) { gex_Rank_t i; gasnetc_rbuf_t rbuf; #if GASNETI_THREADINFO_OPT rbuf.rbuf_threadinfo = GASNETI_MYTHREAD; #endif gasnetc_am_credits_slack = 0; for (i = 0; i < gasneti_nodes; ++i) { /* Stagger to avoid hot-spotting */ gex_Rank_t node = (i < gasneti_nodes - gasneti_mynode) ? (gasneti_mynode + i) : (gasneti_mynode - (gasneti_nodes - i)); gasnetc_cep_t *cep = GASNETC_NODE2CEP(ep, node); int qpi; if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(node) || !cep) continue; for (qpi = 0; qpi < gasnetc_alloc_qps; ++qpi, ++cep) { int cr = gasnetc_atomic_swap(&cep->am_flow.credit, 0, 0); if (!cr) continue; /* Since the banked credits count remote recv buffers we can send a "Phantom Reply". * This avoids soliciting a potentially unnecessary Reply. */ int fake_hidx = gasneti_handleridx(gasnetc_sys_close_reqh); rbuf.cep = cep; rbuf.rbuf_needReply = 1; #if GASNET_DEBUG rbuf.rbuf_handlerRunning = 1; #endif rbuf.rbuf_flags = GASNETC_MSG_GENFLAGS(1, gasneti_Short, 0, fake_hidx, node); rbuf.rr_ep = ep; gasnetc_ReplySysShort((gex_Token_t)&rbuf, NULL, gasneti_handleridx(gasnetc_sys_flush_reph), 1, cr); } } } /* drain in-flight AMs by allocating all of the AM credits */ { gex_Rank_t node; for (node = 0; node < gasneti_nodes; ++node) { gasnetc_cep_t *cep = GASNETC_NODE2CEP(ep, node); int qpi_offset = gasnetc_use_srq ? gasnetc_num_qps : 0; int qpi; if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(node) || !cep) continue; for (qpi = qpi_offset, cep += qpi_offset; qpi < gasnetc_alloc_qps; ++qpi, ++cep) { int remain = gasnetc_am_oust_pp; gasnetc_sema_t *sema = &cep->am_rem; GASNETI_SPIN_WHILE((remain -= gasnetc_sema_trydown_partial(sema, remain)), gasnetc_poll_both()); } } } { /* Dissemination barrier via special AM Request hander which does NOT return credits */ unsigned int shift, distance; for (shift = 0, distance = 1; distance < gasneti_nodes; ++shift, distance *= 2) { gex_Rank_t peer = (distance <= gasneti_mynode) ? gasneti_mynode - distance : gasneti_mynode + (gasneti_nodes - distance); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(peer)) { gex_AM_RequestShort0(gasneti_THUNK_TM, peer, gasneti_handleridx(gasnetc_sys_close_reqh), 0); } else { static gasnetc_counter_t dummy = GASNETC_COUNTER_INITIALIZER; /* So PFs don't run */ const int qp_offset = gasnetc_use_srq ? gasnetc_num_qps : 0; gasnetc_cep_t *cep = gasnetc_get_cep(ep, peer) + qp_offset; gasnetc_sema_up(&cep->am_rem); /* OK if some other AM Request gets in this gap; we'll block for the reply. */ gasnetc_RequestSysShort(cep->epid, &dummy, gasneti_handleridx(gasnetc_sys_close_reqh), 0); } GASNETI_SPIN_UNTIL(gasnetc_close_recvd[shift], gasnetc_poll_both()); gasnetc_close_recvd[shift] = 0; } } /* complete ALL send/put/get by allocating all of the CQ slots */ GASNETC_FOR_ALL_HCA(hca) { int remain = hca->snd_cq->cqe; gasnetc_sema_t *sema = hca->snd_cq_sema_p; GASNETI_SPIN_WHILE((remain -= gasnetc_sema_trydown_partial(sema, remain)), gasnetc_poll_both()); } /* Resume credit coallescing (in any) */ gasnetc_am_credits_slack = gasnetc_am_credits_slack_orig; } extern int gasnetc_sndrcv_shutdown(void) { gasnetc_hca_t *hca; int rc; GASNETC_FOR_ALL_HCA(hca) { #if GASNETC_IBV_SRQ if (gasnetc_use_srq && (gasneti_nodes > 1)) { rc = ibv_destroy_srq(hca->rqst_srq); GASNETC_IBV_CHECK(rc, "from ibv_destroy_srq(request)"); rc = ibv_destroy_srq(hca->repl_srq); GASNETC_IBV_CHECK(rc, "from ibv_destroy_srq(reply)"); } #endif rc = ibv_destroy_cq(hca->rcv_cq); GASNETC_IBV_CHECK(rc, "from ibv_destroy_cq(rcv_cq)"); rc = ibv_destroy_cq(hca->snd_cq); GASNETC_IBV_CHECK(rc, "from ibv_destroy_cq(snd_cq)"); #if GASNETC_USE_RCV_THREAD if (gasnetc_use_rcv_thread) { rc = ibv_destroy_comp_channel(hca->rcv_thread.compl); GASNETC_IBV_CHECK(rc, "from ibv_destroy_comp_chanel(rcv_thread)"); } #endif #if GASNETC_USE_SND_THREAD if (gasnetc_use_snd_thread) { rc = ibv_destroy_comp_channel(hca->snd_thread.compl); GASNETC_IBV_CHECK(rc, "from ibv_destroy_comp_chanel(snd_thread)"); } #endif gasnetc_unpin_unmap(hca, &hca->snd_reg); gasnetc_unpin_unmap(hca, &hca->rcv_reg); } return GASNET_OK; } #endif #if GASNETC_USE_RCV_THREAD || GASNETC_USE_SND_THREAD int gasnetc_query_progress_threads( gex_Client_t e_client, unsigned int *count_p, const gex_ProgressThreadInfo_t **info_p, gex_Flags_t flags) { // Leverage conduit-independent version for common error checks int result = gasneti_query_progress_threads(e_client,count_p,info_p,flags); if (result) return (result); *count_p = gasnetc_progress_thread_count; *info_p = gasnetc_progress_thread_count ? gasnetc_progress_thread_info : NULL; return GASNET_OK; } extern void gasnetc_sndrcv_start_thread(gex_Flags_t init_flags) { int defer = !!(init_flags & GEX_FLAG_DEFER_THREADS); #if GASNETC_USE_RCV_THREAD if (gasnetc_use_rcv_thread) { int rcv_max_rate = gasneti_getenv_int_withdefault("GASNET_RCV_THREAD_RATE", 0, 0); gasnetc_hca_t *hca; GASNETC_FOR_ALL_HCA(hca) { /* spawn the RCV thread */ hca->rcv_thread.fn = gasnetc_rcv_thread; hca->rcv_thread.fn_arg = hca; if (rcv_max_rate > 0) { hca->rcv_thread.thread_rate.ns = ((uint64_t)1E9) / rcv_max_rate; } hca->rcv_thread.keep_alive.ns = gasneti_getenv_int_withdefault("GASNET_RCV_THREAD_IDLE", 0, 0); #if GASNETC_SERIALIZE_POLL_CQ gasneti_assert(!gasnetc_rcv_thread_poll_exclusive || !gasnetc_rcv_thread_poll_serialize); // mutually exclusive if (gasnetc_rcv_thread_poll_exclusive) { hca->rcv_thread.exclusive_poll = &hca->poll_cq_semas.rcv; #if (GASNETC_IB_MAX_HCAS > 1) // Remove thread contention in the AMPoll path. // Note that this cannot safetly be done sooner, because AM-based comms // are used in startup logic prior to spawning this thread. gasnetc_rcv_poll_multi_hcas = 0; #endif } else if (gasnetc_rcv_thread_poll_serialize) { hca->rcv_thread.serialize_poll = &hca->poll_cq_semas.rcv; } #endif #if GASNETI_THREADINFO_OPT hca->rcv_threadinfo = NULL; #endif if (defer) { gex_ProgressThreadInfo_t *p = &gasnetc_progress_thread_info[gasnetc_progress_thread_count++]; gasneti_assert_uint(gasnetc_progress_thread_count, <=, GASNETC_MAX_PROGRESS_THREADS); p->gex_device_list = hca->hca_id; p->gex_thread_roles = GEX_THREAD_ROLE_RCV; p->gex_progress_fn = &gasnetc_progress_thread; p->gex_progress_arg = &hca->rcv_thread; } else { gasnetc_spawn_progress_thread(&hca->rcv_thread); } } } #endif #if GASNETC_USE_SND_THREAD if (gasnetc_use_snd_thread) { int snd_max_rate = gasneti_getenv_int_withdefault("GASNET_SND_THREAD_RATE", 0, 0); gasnetc_hca_t *hca; GASNETC_FOR_ALL_HCA(hca) { /* spawn the SND thread */ hca->snd_thread.fn = gasnetc_snd_thread; hca->snd_thread.fn_arg = hca; if (snd_max_rate > 0) { hca->snd_thread.thread_rate.ns = ((uint64_t)1E9) / snd_max_rate; } hca->snd_thread.keep_alive.ns = gasneti_getenv_int_withdefault("GASNET_SND_THREAD_IDLE", 0, 0); #if GASNETC_SERIALIZE_POLL_CQ gasneti_assert(!gasnetc_snd_thread_poll_exclusive || !gasnetc_snd_thread_poll_serialize); // mutually exclusive if (gasnetc_snd_thread_poll_exclusive) { hca->snd_thread.exclusive_poll = &hca->poll_cq_semas.snd; #if (GASNETC_IB_MAX_HCAS > 1) // Remove thread contention in the AMPoll path. // Note that this cannot safetly be done sooner, due to the // communication in startup logic prior to spawning this thread. gasnetc_snd_poll_multi_hcas = 0; #endif } else if (gasnetc_snd_thread_poll_serialize) { hca->snd_thread.serialize_poll = &hca->poll_cq_semas.snd; } #endif if (defer) { gex_ProgressThreadInfo_t *p = &gasnetc_progress_thread_info[gasnetc_progress_thread_count++]; gasneti_assert_uint(gasnetc_progress_thread_count, <=, GASNETC_MAX_PROGRESS_THREADS); p->gex_device_list = hca->hca_id; p->gex_thread_roles = GEX_THREAD_ROLE_SND; p->gex_progress_fn = &gasnetc_progress_thread; p->gex_progress_arg = &hca->snd_thread; } else { gasnetc_spawn_progress_thread(&hca->snd_thread); } } } #endif } extern void gasnetc_sndrcv_stop_thread(int block) { #if GASNETC_USE_RCV_THREAD if (gasnetc_use_rcv_thread) { gasnetc_hca_t *hca; GASNETC_FOR_ALL_HCA(hca) { /* stop the RCV thread if we have started it */ if (hca->rcv_thread.fn == gasnetc_rcv_thread) { gasnetc_stop_progress_thread(&hca->rcv_thread, block); } } } #endif #if GASNETC_USE_SND_THREAD if (gasnetc_use_snd_thread) { gasnetc_hca_t *hca; GASNETC_FOR_ALL_HCA(hca) { /* stop the SND thread if we have started it */ if (hca->snd_thread.fn == gasnetc_snd_thread) { gasnetc_stop_progress_thread(&hca->snd_thread, block); } } } #endif } #endif /* Just gasnetc_AMPoll w/o CHECKATTACH when !handler_context */ extern void gasnetc_sndrcv_poll(int handler_context) { GASNET_BEGIN_FUNCTION(); // OK - this is used only in init/exit paths gasnetc_do_poll(!handler_context, 1 GASNETI_THREAD_PASS); } extern void gasnetc_counter_wait_aux(gasnetc_counter_t *counter, int handler_context GASNETI_THREAD_FARG) { const gasnetc_atomic_val_t initiated = (counter->initiated & GASNETI_ATOMIC_MAX); gasnetc_atomic_t * const completed = &counter->completed; // caller has checked that (initiated != completed) // so the spin loops below are "DOUNTIL" if (handler_context) { // must not poll rcv queue in hander context GASNETI_SPIN_DOUNTIL((initiated == gasnetc_atomic_read(completed, 0)), gasnetc_poll_snd()); } else { GASNETI_SPIN_DOUNTIL((initiated == gasnetc_atomic_read(completed, 0)), { gasnetc_poll_both(); GASNETI_PROGRESSFNS_RUN(); }); } } #if GASNETC_PIN_SEGMENT /* * ############################################ * RDMA ops used when the segment is pre-pinned * ############################################ */ /* Perform an RDMA put * * Uses inline if possible, bounce buffers if "small enough" and the caller is planning to wait * for local completion. Otherwise zero-copy is used (with firehose if the source is not pre-pinned). * If firehose is disabled, then bounce buffers are used for unpinned sources. */ // TODO-EX: // Curently we may need to pre-increment (*local_cnt) and (*remote_cnt) in // order to prevent the counters from becoming balanced (as observed in the // corresponding callback) before the final ibv-level operation has been // injected. That requires a coresponding atomic-add (via the completion // callback) of the completed counter at the end. Ideally we would be able // to manage all the increments of the initiated counters (as done in // gasnetc_rdma_get()) such that premature counter balance would be // impossible. HOWEVER, attempts to do so w/o significant rewrites have // failed so far. The main issues are: // + One or both of the counters might not advance at all // + Identifying the *last* increment of local_cnt or remote_cnt // For certain cases we may be able to resolve both of those issues, notably // the cases in which only one of local_cnt or remote_cnt is non-NULL. // // Currently we entirely avoid the "bias" of the counter(s) only for the // case of the inline put. extern int gasnetc_rdma_put( gex_TM_t tm, gex_Rank_t rank, void *src_ptr, void *dst_ptr, size_t nbytes, gex_Flags_t flags, gasnetc_atomic_val_t *local_cnt, gasnetc_cb_t local_cb, gasnetc_atomic_val_t *remote_cnt, gasnetc_cb_t remote_cb GASNETI_THREAD_FARG) { gasnetc_EP_t ep = (gasnetc_EP_t) gasneti_e_tm_to_i_ep(tm); GASNETC_DECL_SR_DESC(sr_desc, GASNETC_SND_SG); // TODO-EX: // This will be replaced by general multi-registration support later const gex_EP_Location_t loc = gasneti_e_tm_rank_to_location(tm, rank, 0); const gex_Rank_t jobrank = loc.gex_rank; const int rem_epidx = gasneti_in_auxsegment(jobrank, dst_ptr, nbytes) ? -1 : loc.gex_ep_index; // To reach here legally, at least one of three things must be true: // 1. local ep is bound to non-host memory // 2. remote ep is neither primordial nor aux-seg // 3. remote jobrank is not in-nbrhd // Otherwise, PSHM should be used. gasneti_assert(!gasneti_i_segment_kind_is_host(ep->_segment) || (rem_epidx > 0) || !GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)); // Local "device memory" can never use inline or bounce buffers // TODO: maybe some devices classes can in the future? const int device_mem = !gasneti_i_segment_kind_is_host(ep->_segment); gasneti_assert(nbytes != 0); sr_desc->wr.rdma.remote_addr = (uintptr_t)dst_ptr; sr_desc_sg_lst[0].addr = (uintptr_t)src_ptr; /* Use a short-cut for sends that are short enough * * Note that we do this based only on the size, without checking whether * the caller cares about local completion, or whether zero-copy is possible. */ if ((nbytes <= gasnetc_inline_limit) && !device_mem) { gasnetc_do_put_inline(ep, jobrank, rem_epidx, sr_desc, nbytes, remote_cnt, remote_cb GASNETI_THREAD_PASS); return 0; } // May need to do a bit of extra work to prevent premature counter balance const int bias_remote_cnt = (remote_cb == gasnetc_cb_eop_put); if (bias_remote_cnt) ++(*remote_cnt); // Distinct cases below for host memory, depending on whether LC matters or not // TODO-EX: this may suggest 2 distinct functions are in order? if (device_mem) { gasneti_assert(gasnetc_in_bound_segment(ep, (uintptr_t)src_ptr, nbytes)); const int bias_local_cnt = (local_cb == gasnetc_cb_eop_alc); if (bias_local_cnt) ++(*local_cnt); // IB reports only a single completion, which is for RC. // PutBlocking and Put{NB,NBI} with GEX_EVENT_DEFER use *only* an RC counter, so we // must report IB-level completion there. // Otherwise, we report to the LC counter which also blocks RC (either at injection for // GEX_EVENT_NOW, or else at Test/Wait on the event due to the root/leaf relationship). gasnetc_atomic_val_t *cnt = local_cnt ? local_cnt : remote_cnt; gasnetc_cb_t cb = local_cnt ? local_cb : remote_cb; gasneti_assert(cb); // Currently never "fire-and-forget" to device memory size_t unsent = gasnetc_do_put_zerocp(ep, jobrank, rem_epidx, sr_desc, nbytes, cnt, cb GASNETI_THREAD_PASS); gasneti_assert_uint(unsent ,==, 0); if (bias_local_cnt) local_cb(local_cnt); } else if (local_cb) { const int bias_local_cnt = (local_cb == gasnetc_cb_eop_alc); if (bias_local_cnt) ++(*local_cnt); // Because IB lacks native indication of local completion (LC), the only ways to // detect LC are to wait for RC, or use bounce buffers to achieve synchronous LC. // So, use bounce buffers for a non-bulk put if "not too large". // Also use bounce buffers if (firehose disabled AND src is in neither the client // nor aux segment) OR zero copy fails such as for read-only memory (bug 3338). size_t to_xfer = nbytes; int is_nonbulk = (local_cb == gasnetc_cb_counter); // GEX_EVENT_NOW if ((is_nonbulk && (nbytes <= gasnetc_nonbulk_bounce_limit)) || (!GASNETC_USE_FIREHOSE && !gasnetc_in_bound_segment(ep, (uintptr_t)src_ptr, nbytes) && !gasneti_in_local_auxsegment((gasneti_EP_t)ep, src_ptr, nbytes)) || ((to_xfer = gasnetc_do_put_zerocp(ep, jobrank, rem_epidx, sr_desc, nbytes, local_cnt, local_cb GASNETI_THREAD_PASS)))) { gasnetc_do_put_bounce(ep, jobrank, rem_epidx, sr_desc, to_xfer, remote_cnt, remote_cb GASNETI_THREAD_PASS); } if (bias_local_cnt) local_cb(local_cnt); } else { // Use bounce buffers if (firehose disabled AND src is in neither the client // nor aux segment) OR zero copy fails such as for read-only memory (bug 3338). size_t to_xfer = nbytes; if ((!GASNETC_USE_FIREHOSE && !gasnetc_in_bound_segment(ep, (uintptr_t)src_ptr, nbytes) && !gasneti_in_local_auxsegment((gasneti_EP_t)ep, src_ptr, nbytes)) || ((to_xfer = gasnetc_do_put_zerocp(ep, jobrank, rem_epidx, sr_desc, nbytes, remote_cnt, remote_cb GASNETI_THREAD_PASS)))) { gasnetc_do_put_bounce(ep, jobrank, rem_epidx, sr_desc, to_xfer, remote_cnt, remote_cb GASNETI_THREAD_PASS); } } if (bias_remote_cnt) remote_cb(remote_cnt); return 0; } // Put specialized for needs of AM Long payload // * caller needs to control the qpi (via cep) // * always has local callbacks (never GEX_EVENT_DEFER) // * never has remote callbacks // * assumed never small enough for inline send (would be packed instead) extern int gasnetc_rdma_long_put( gasnetc_EP_t ep, gasnetc_cep_t *cep, void *src_ptr, void *dst_ptr, size_t nbytes, gex_Flags_t flags, gasnetc_atomic_val_t *local_cnt, gasnetc_cb_t local_cb GASNETI_THREAD_FARG) { gasnetc_epid_t epid = cep->epid; GASNETC_DECL_SR_DESC(sr_desc, GASNETC_SND_SG); // TODO-EX: // This will be replaced by general multi-registration support later // TODO: this lacks support for non-primordial EP since we are missing the index information const int rem_epidx = gasneti_in_auxsegment(gasnetc_epid2node(epid), dst_ptr, nbytes) ? -1 : 0; gasneti_assert(nbytes != 0); sr_desc->wr.rdma.remote_addr = (uintptr_t)dst_ptr; sr_desc_sg_lst[0].addr = (uintptr_t)src_ptr; // May need to do a bit of extra work to prevent premature counter balance const int bias_local_cnt = (local_cb == gasnetc_cb_eop_alc); if (bias_local_cnt) ++(*local_cnt); // Because IB lacks native indication of local completion (LC), the only ways to // detect LC are to wait for RC, or use bounce buffers to achieve synchronous LC. // So, use bounce buffers for if "not too large". // Also use bounce buffers if (firehose disabled AND src is in neither the client // nor aux segment) OR zero copy fails such as for read-only memory (bug 3338). size_t to_xfer = nbytes; int is_nonbulk = (local_cb == gasnetc_cb_counter); // GEX_EVENT_NOW if ((is_nonbulk && (nbytes <= gasnetc_nonbulk_bounce_limit)) || (!GASNETC_USE_FIREHOSE && !gasnetc_in_bound_segment(ep, (uintptr_t)src_ptr, nbytes) && !gasneti_in_local_auxsegment((gasneti_EP_t)ep, src_ptr, nbytes)) || ((to_xfer = gasnetc_do_put_zerocp(ep, epid, rem_epidx, sr_desc, nbytes, local_cnt, local_cb GASNETI_THREAD_PASS)))) { gasnetc_do_put_bounce(ep, epid, rem_epidx, sr_desc, to_xfer, NULL, NULL GASNETI_THREAD_PASS); } if (bias_local_cnt) local_cb(local_cnt); return 0; } /* Perform an RDMA get * * Uses zero-copy (with firehose if the destination is not pre-pinned). * If firehose is disabled, then bounce buffers are used for unpinned destinations. * * This function takes care to keep its increments of (*remote_cnt) an *extra* * step ahead of the ibv-level injections. This means it is not possible for * the initiated and completed counters to balance before to the last injection. */ extern int gasnetc_rdma_get( gex_TM_t tm, gex_Rank_t rank, void *src_ptr, void *dst_ptr, size_t nbytes, gex_Flags_t flags, gasnetc_atomic_val_t *remote_cnt, gasnetc_cb_t remote_cb GASNETI_THREAD_FARG) { gasnetc_EP_t ep = (gasnetc_EP_t) gasneti_e_tm_to_i_ep(tm); GASNETC_DECL_SR_DESC(sr_desc, GASNETC_SND_SG); // TODO-EX: // This will be replaced by general multi-registration support later const int loc_auxseg = gasneti_in_local_auxsegment((gasneti_EP_t)ep, dst_ptr, nbytes); const gex_EP_Location_t loc = gasneti_e_tm_rank_to_location(tm, rank, 0); const gex_Rank_t jobrank = loc.gex_rank; const int rem_epidx = gasneti_in_auxsegment(jobrank, src_ptr, nbytes) ? -1 : loc.gex_ep_index; // To reach here legally, at least one of three things must be true: // 1. local ep is bound to non-host memory // 2. remote ep is neither primordial nor aux-seg // 3. remote jobrank is not in-nbrhd // Otherwise, PSHM should be used. gasneti_assert(!gasneti_i_segment_kind_is_host(ep->_segment) || (rem_epidx > 0) || !GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)); gasneti_assert(nbytes != 0); gasneti_assert(remote_cnt != NULL); ++(*remote_cnt); sr_desc->wr.rdma.remote_addr = (uintptr_t)src_ptr; sr_desc_sg_lst[0].addr = (uintptr_t)dst_ptr; if (!GASNETC_USE_FIREHOSE && !gasnetc_in_bound_segment(ep, (uintptr_t)dst_ptr, nbytes) && !gasneti_in_local_auxsegment((gasneti_EP_t)ep, dst_ptr, nbytes)) { /* Firehose disabled. Use bounce buffers since dst_ptr is out-of-segment */ gasnetc_do_get_bounce(ep, jobrank, rem_epidx, sr_desc, nbytes, remote_cnt, remote_cb GASNETI_THREAD_PASS); } else { gasnetc_do_get_zerocp(ep, jobrank, rem_epidx, sr_desc, nbytes, remote_cnt, remote_cb GASNETI_THREAD_PASS); } return 0; } #else // !GASNETC_PIN_SEGMENT /* * ########################################### * RDMA ops when the segment is NOT pre-pinned * ########################################### */ /* RDMA put */ // TODO-EX: see comment prior to gasnetc_rdma_put() regarding counters extern int gasnetc_rdma_put( gex_TM_t tm, gex_Rank_t rank, void *src_ptr, void *dst_ptr, size_t nbytes, gex_Flags_t flags, gasnetc_atomic_val_t *local_cnt, gasnetc_cb_t local_cb, gasnetc_atomic_val_t *remote_cnt, gasnetc_cb_t remote_cb GASNETI_THREAD_FARG) { gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); gasnetc_EP_t ep = (gasnetc_EP_t) gasneti_e_tm_to_i_ep(tm); uintptr_t src = (uintptr_t)src_ptr; uintptr_t dst = (uintptr_t)dst_ptr; gasneti_assert(nbytes != 0); // May need to do a bit of extra work to prevent premature counter balance const int bias_local_cnt = (local_cb == gasnetc_cb_eop_alc); if (bias_local_cnt) ++(*local_cnt); const int bias_remote_cnt = (remote_cb == gasnetc_cb_eop_put); if (bias_remote_cnt) ++(*remote_cnt); do { gasnetc_sreq_t * const sreq = gasnetc_get_sreq(GASNETC_OP_INVALID GASNETI_THREAD_PASS); size_t count; sreq->epid = jobrank; sreq->comp.cb = remote_cb; sreq->comp.data = remote_cnt; sreq->fh_lc = local_cnt; sreq->fh_lc_cb = local_cb; sreq->fh_oust = NULL; count = gasnetc_fh_put_helper(ep, jobrank, sreq, local_cnt, remote_cnt, src, dst, nbytes GASNETI_THREAD_PASS); src += count; dst += count; nbytes -= count; } while (nbytes); // Fix the bias, if any, we introduced above if (bias_local_cnt) local_cb(local_cnt); if (bias_remote_cnt) remote_cb(remote_cnt); gasnetc_poll_rcv(); /* Progress may depend on firehose AM Reply */ return 0; } // Put specialized for needs of AM Long payload // * caller needs to control the qpi (via cep) // * always has local callbacks (never GEX_EVENT_DEFER) // * never has remote callbacks // * must block for firehose movement (if any) to compelte extern int gasnetc_rdma_long_put( gasnetc_EP_t ep, gasnetc_cep_t *cep, void *src_ptr, void *dst_ptr, size_t nbytes, gex_Flags_t flags, gasnetc_atomic_val_t *local_cnt, gasnetc_cb_t local_cb GASNETI_THREAD_FARG) { gasnetc_epid_t epid = cep->epid; uintptr_t src = (uintptr_t)src_ptr; uintptr_t dst = (uintptr_t)dst_ptr; gasneti_assert(nbytes != 0); // May need to do a bit of extra work to prevent premature counter balance const int bias_local_cnt = (local_cb == gasnetc_cb_eop_alc); if (bias_local_cnt) ++(*local_cnt); // May need to block for firehose misses to be resolved gasnetc_counter_t am_oust = GASNETC_COUNTER_INITIALIZER; do { gasnetc_sreq_t * const sreq = gasnetc_get_sreq(GASNETC_OP_INVALID GASNETI_THREAD_PASS); size_t count; sreq->epid = epid; sreq->comp.cb = NULL; sreq->comp.data = NULL; sreq->fh_lc = local_cnt; sreq->fh_lc_cb = local_cb; sreq->fh_oust = &am_oust; count = gasnetc_fh_put_helper(ep, epid, sreq, local_cnt, NULL, src, dst, nbytes GASNETI_THREAD_PASS); src += count; dst += count; nbytes -= count; } while (nbytes); // Fix the bias, if any, we introduced above if (bias_local_cnt) local_cb(local_cnt); // Stall for outstanding firehose misses // TODO: could eliminate stall when gasnetc_use_rcv_thread by using fh callback to inject header gasnetc_counter_wait(&am_oust, 0 GASNETI_THREAD_PASS); return 0; } /* Perform an RDMA get * * This function takes care to keep its increments of (*remote_cnt) an *extra* * step ahead of the ibv-level injections. This means it is not possible for * the initiated and completed counters to balance before to the last injection. * So, a caller does not need to take any additional "insurance". */ extern int gasnetc_rdma_get( gex_TM_t tm, gex_Rank_t rank, void *src_ptr, void *dst_ptr, size_t nbytes, gex_Flags_t flags, gasnetc_atomic_val_t *remote_cnt, gasnetc_cb_t remote_cb GASNETI_THREAD_FARG) { gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); gasnetc_EP_t ep = (gasnetc_EP_t) gasneti_e_tm_to_i_ep(tm); uintptr_t src = (uintptr_t)src_ptr; uintptr_t dst = (uintptr_t)dst_ptr; gasneti_assert(nbytes != 0); gasneti_assert(remote_cnt != NULL); ++(*remote_cnt); do { gasnetc_sreq_t * const sreq = gasnetc_get_sreq(GASNETC_OP_GET_ZEROCP GASNETI_THREAD_PASS); size_t count; sreq->epid = jobrank; sreq->comp.cb = remote_cb; sreq->comp.data = remote_cnt; count = gasnetc_fh_get_helper(ep, jobrank, sreq, dst, src, nbytes, remote_cnt GASNETI_THREAD_PASS); src += count; dst += count; nbytes -= count; } while (nbytes); gasnetc_poll_rcv(); /* Progress may depend on firehose AM Reply */ return 0; } #endif gasnet-2025.8.0/ibv-conduit/gasnet_core_fwd.h0000664000175000017500000003255415142313673021160 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_core_fwd.h $ * Description: GASNet header for ibv conduit core (forward definitions) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_FWD_H #define _GASNET_CORE_FWD_H #ifdef GASNET_CONDUIT_VAPI #error "VAPI-conduit is no longer supported" #endif #define GASNET_CORE_VERSION 2.17 #define GASNET_CORE_VERSION_STR _STRINGIFY(GASNET_CORE_VERSION) #define GASNET_CORE_NAME IBV #define GASNET_CORE_NAME_STR _STRINGIFY(GASNET_CORE_NAME) #define GASNET_CONDUIT_NAME GASNET_CORE_NAME #define GASNET_CONDUIT_NAME_STR _STRINGIFY(GASNET_CONDUIT_NAME) #define GASNET_CONDUIT_IBV 1 #define GASNETC_DEFAULT_SPAWNER GASNETC_IBV_SPAWNER_CONF // Client-facing indications of multirail support: // GASNET_IBV_MULTIRAIL: 1/undef for enabled/disabled // GASNET_IBV_MAX_HCAS: positive integer (1 when multirail disabled) #if GASNETC_IBV_MAX_HCAS_CONFIGURE #define GASNET_IBV_MULTIRAIL 1 #define GASNET_IBV_MAX_HCAS GASNETC_IBV_MAX_HCAS_CONFIGURE #else #undef GASNET_IBV_MULTIRAIL #define GASNET_IBV_MAX_HCAS 1 #endif #if defined(GASNET_SEGMENT_FAST) #define GASNETC_PIN_SEGMENT 1 #else #define GASNETC_PIN_SEGMENT 0 #endif // Size of a buffer to contain any AM with all its header, padding and payload #define GASNETC_BUFSZ GASNETC_IBV_MAX_MEDIUM /* 16K is the limit on the LID space, but we must allow more than 1 proc per node */ /* 64K corresponds to 16 bits used in the AM Header and 16-bit gex_Rank_t */ #define GASNET_MAXNODES 65535 /* GASNET_PSHM defined 1 if this conduit supports PSHM. leave undefined otherwise. */ /* As described in bug 3373, ibv_reg_mem() on Solaris only works with SYSV */ #if GASNETI_PSHM_ENABLED && !(PLATFORM_OS_SOLARIS && !GASNETI_PSHM_SYSV) #define GASNET_PSHM 1 #endif // PSHM and loopback support need to know largest Medium if larger than MAX(LUB{Request,Reply}Medium) #define GASNETC_MAX_MEDIUM_NBRHD GASNETC_BUFSZ /* defined to be 1 if gasnet_init guarantees that the remote-access memory segment will be aligned */ /* at the same virtual address on all nodes. defined to 0 otherwise */ #if GASNETI_DISABLE_ALIGNED_SEGMENTS || GASNET_PSHM #define GASNET_ALIGNED_SEGMENTS 0 /* user or PSHM disabled segment alignment */ #else #define GASNET_ALIGNED_SEGMENTS 1 #endif // If this conduit is considered a "portable conduit" only *conditionally*, // uncomment to enable calls to gasnetc_check_portable_conduit(void) as // described in gasnet_internal.c. //#define GASNETC_CHECK_PORTABLE_CONDUIT_HOOK 1 // uncomment for each MK_CLASS which the conduit supports. leave commented otherwise #define GASNET_HAVE_MK_CLASS_CUDA_UVA (GASNETI_MK_CLASS_CUDA_UVA_ENABLED && GASNET_SEGMENT_FAST) #define GASNET_HAVE_MK_CLASS_HIP (GASNETI_MK_CLASS_HIP_ENABLED && GASNET_SEGMENT_FAST) //#define GASNET_HAVE_MK_CLASS_ZE GASNETI_MK_CLASS_ZE_ENABLED // define to 1 if your conduit has "private" thread(s) which can run AM handlers #if GASNETC_IBV_RCV_THREAD #define GASNET_RCV_THREAD 1 #endif // define to 1 if your conduit has "private" thread(s) which progress sends of RMA and/or AM #if GASNETC_IBV_SND_THREAD #define GASNET_SND_THREAD 1 #endif #ifndef GASNETC_DYNAMIC_CONNECT #define GASNETC_DYNAMIC_CONNECT 1 #endif #if GASNETC_IBV_RCV_THREAD || GASNETC_IBV_SND_THREAD || (GASNETC_DYNAMIC_CONNECT && GASNETC_IBV_CONN_THREAD) /* uncomment if your conduit has "private" threads which might run conduit code and/or the client's AM handlers, even under GASNET_SEQ. this ensures locking is still done correctly, etc */ #define GASNETI_CONDUIT_THREADS 1 #endif // Conduit-specific implementation of gex_System_QueryProgressThreads() #if GASNETC_IBV_RCV_THREAD || GASNETC_IBV_SND_THREAD #define gex_System_QueryProgressThreads gasnetc_query_progress_threads #endif #if GASNETC_IBV_RCV_THREAD #define GASNET_HIDDEN_AM_CONCURRENCY_LEVEL 1 #else #define GASNET_HIDDEN_AM_CONCURRENCY_LEVEL 0 #endif /* define these to 1 if your conduit needs to augment the implementation of gasneti_reghandler() (in gasnet_internal.c) */ /* #define GASNETC_AMREGISTER 1 */ /* define this to 1 if your conduit supports PSHM, but cannot use the default interfaces. (see template-conduit/gasnet_core.c and gasnet_pshm.h) */ /* #define GASNETC_GET_HANDLER 1 */ /* uncomment each line for which your conduit supports the corresponding token info query. */ #define GASNET_SUPPORTS_TI_SRCRANK 1 #define GASNET_SUPPORTS_TI_EP 1 #define GASNET_SUPPORTS_TI_ENTRY 1 #define GASNET_SUPPORTS_TI_IS_REQ 1 #define GASNET_SUPPORTS_TI_IS_LONG 1 /* uncomment for each {Request,Reply} X {Medium,Long} pair for which your conduit implements the corresponding gasnetc_AM_{Prepare,Commit}*() in a "native" manner which "can avoid one or more payload copies relative to the corresponding fixed-payload AM call under the right conditions". See also "GASNETC_BUILD_NP_*", immediately below. */ #define GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM 1 #define GASNET_NATIVE_NP_ALLOC_REP_MEDIUM 1 #if GASNETC_PIN_SEGMENT #define GASNET_NATIVE_NP_ALLOC_REQ_LONG 1 #define GASNET_NATIVE_NP_ALLOC_REP_LONG 1 #endif /* conduits may define to '1' (or '0') for {Request,Reply} X {Medium,Long} pairs to force (or prevent) compilation of the corresponding pieces of the conduit-independent reference implementation. If unset, the default is equivalent to '!GASNET_NATIVE_NP_ALLOC_[foo]'. In other words: by default each reference implementation is built if and only if the conduit is not claiming a "native" implementation. This default is correct for most conduits. The conduit-independent implementation works in terms of the internal functions gasnetc_AM{Request,Reply}{Medium,Long}V(). Therefore, your conduit must provide the V-suffixed functions for any case with the corresponding GASNETC_BUILD_NP_* equal to '1' (explicitly or by default). */ /* #define GASNETC_BUILD_NP_REQ_MEDIUM (###) */ /* #define GASNETC_BUILD_NP_REP_MEDIUM (###) */ /* #define GASNETC_BUILD_NP_REQ_LONG (###) */ /* #define GASNETC_BUILD_NP_REP_LONG (###) */ /* uncomment for each conduit-provided Commit{Req,Rep}{Medium,Long}() which has the numargs argument even in an NDEBUG build (it is always passed in DEBUG builds). */ #define GASNETC_AM_COMMIT_REQ_MEDIUM_NARGS 1 #define GASNETC_AM_COMMIT_REP_MEDIUM_NARGS 1 #if GASNETC_PIN_SEGMENT #define GASNETC_AM_COMMIT_REQ_LONG_NARGS 1 #define GASNETC_AM_COMMIT_REP_LONG_NARGS 1 #endif #define GASNETI_AM_SRCDESC_EXTRA \ int _have_flow; \ int _head_len; \ void * _buf_alloc; \ void * _cep; \ void * _ep; \ uint8_t _inline_buf[128+8]; /* uncomment if your conduit's gasnetc_AMRequest{Short,Medium,Long}V() include a call to gasneti_AMPoll (or equivalent) for progress. The preferred implementation is to Poll only in the M-suffixed calls and not the V-suffixed calls (and GASNETC_REQUESTV_POLLS undefined). Used only by reference implementations (if any) of Prepare/Commit. */ /* #define GASNETC_REQUESTV_POLLS 1 */ /* If your conduit uses conduit-specific extensions to the basic object types, then define the corresponding SIZEOF macros below to return the total length of the conduit-specific object, including the prefix portion which must be the matching GASNETI_[OBJECT]_COMMON fields. Similarly, *_HOOK macros should be defined as callbacks to perform conduit-specific initialization and finalization tasks, if any. If a given SIZEOF macro is defined, but the corresponding INIT_HOOK is not, then space beyond the COMMON fields will be zero-initialized. In all cases, GASNETC_[OBJECT]_EXTRA_DECLS provides the place to provide necessary declarations (since this file is included very early). */ //#define GASNETC_CLIENT_EXTRA_DECLS (###) //#define GASNETC_CLIENT_INIT_HOOK(i_client) (###) //#define GASNETC_CLIENT_FINI_HOOK(i_client) (###) //#define GASNETC_SIZEOF_CLIENT_T() (###) #define GASNETC_SEGMENT_EXTRA_DECLS \ extern size_t gasnetc_sizeof_segment_t(void); //#define GASNETC_SEGMENT_INIT_HOOK(i_segment) (###) //#define GASNETC_SEGMENT_FINI_HOOK(i_segment) (###) #define GASNETC_SIZEOF_SEGMENT_T() \ gasnetc_sizeof_segment_t() //#define GASNETC_TM_EXTRA_DECLS (###) //#define GASNETC_TM_INIT_HOOK(i_tm) (###) //#define GASNETC_TM_FINI_HOOK(i_tm) (###) //#define GASNETC_SIZEOF_TM_T() (###) #define GASNETC_EP_EXTRA_DECLS \ extern size_t gasnetc_sizeof_ep_t(void); \ extern int gasnetc_ep_init_hook(gasneti_EP_t); #define GASNETC_EP_INIT_HOOK(i_ep) \ gasnetc_ep_init_hook(i_ep) //#define GASNETC_EP_FINI_HOOK(i_ep) (###) #define GASNETC_SIZEOF_EP_T() \ gasnetc_sizeof_ep_t() // Uncomment the following defines if conduit provides the corresponding hook. // See gasnet_internal.h for prototypes and brief descriptions. #define GASNETC_SEGMENT_ATTACH_HOOK 1 #define GASNETC_SEGMENT_CREATE_HOOK 1 #define GASNETC_SEGMENT_DESTROY_HOOK 1 //#define GASNETC_EP_BINDSEGMENT_HOOK 1 #define GASNETC_EP_PUBLISHBOUNDSEGMENT_HOOK 1 // Uncomment the following defines if conduit provides the corresponding hook. // See other/kinds/gasnet_kinds_internal.h for prototypes and brief descriptions. //#define GASNETC_MK_CREATE_HOOK 1 //#define GASNETC_MK_DESTROY_HOOK 1 #if GASNETC_PIN_SEGMENT // multi-EP NOT supported with remote firehose // If conduit supports GASNET_MAXEPS!=1, set default and (optional) max values here. // Leaving GASNETC_MAXEPS_DFLT unset will result in GASNET_MAXEPS=1, independent // of all other settings (appropriate for conduits without multi-ep support). // If set, GASNETC_MAXEPS_MAX it is used to limit a user's --with-maxeps (and a // global default limit is used otherwise). #define GASNETC_MAXEPS_DFLT 33 // Initial (limited) multi-EP support //#define GASNETC_MAXEPS_MAX ### // leave unset for default #endif /* this can be used to add conduit-specific statistical collection values (see gasnet_trace.h) */ #define GASNETC_CONDUIT_STATS(CNT,VAL,TIME) \ CNT(C, RCV_AM, cnt) \ VAL(C, RDMA_PUT_IN_MOVE, bytes) \ VAL(C, RDMA_PUT_INLINE, bytes) \ VAL(C, RDMA_PUT_BOUNCE, bytes) \ VAL(C, RDMA_PUT_ZEROCP, bytes) \ VAL(C, RDMA_PUT_READONLY, bytes) \ VAL(C, RDMA_GET_BOUNCE, bytes) \ VAL(C, RDMA_GET_ZEROCP, bytes) \ CNT(C, ALLOC_AM_SPARE, cnt) \ CNT(C, GET_AMREQ_CREDIT, cnt) \ TIME(C, GET_AMREQ_CREDIT_STALL, stalled time) \ TIME(C, GET_AMREQ_BUFFER_STALL, stalled time) \ CNT(C, GET_BBUF, cnt) \ TIME(C, GET_BBUF_STALL, stalled time) \ CNT(C, SPARE_REPLY_BBUF, cnt) \ CNT(C, GET_RATOMICBUF, cnt) \ TIME(C, GET_RATOMICBUF_STALL, stalled time) \ VAL(C, ALLOC_SREQ, sreqs) \ VAL(C, POST_SR, segments) \ CNT(C, POST_INLINE_SR, cnt) \ TIME(C, POST_SR_STALL_CQ, stalled time) \ TIME(C, POST_SR_STALL_SQ, stalled time) \ TIME(C, POST_SR_STALL_SQ2, stalled time) \ CNT(C, POST_SR_SPLIT, cnt) \ VAL(C, POST_SR_LIST, requests) \ CNT(C, SND_REAP_THR, cnt) \ VAL(C, SND_REAP, reaped) \ VAL(C, RCV_REAP, reaped) \ CNT(C, CONN_STATIC, peers) \ CNT(C, CONN_DYNAMIC, peers) \ TIME(C, CONN_TIME_ACTV, active connect time) \ TIME(C, CONN_TIME_PASV, passive connect time) \ TIME(C, CONN_TIME_A2P, active-became-passive connect time) \ TIME(C, CONN_REQ2REP, REQ-to-REP delay) \ TIME(C, CONN_RTU2ACK, RTU-to-ACK delay) \ VAL(C, CONN_REQ, resends) \ VAL(C, CONN_RTU, resends) \ CNT(C, CONN_REP, sent) \ CNT(C, CONN_NOREP, not sent) \ CNT(C, CONN_ACK, sent) \ CNT(C, CONN_NOACK, not sent) \ CNT(C, CONN_AAA, remained Active) \ CNT(C, CONN_AAP, became Passive) \ CNT(C, CONN_IMPLIED_ACK, cnt) \ TIME(C, CONN_STALL_CQ, stalled time) \ TIME(C, CONN_STALL_DESC, stalled time) \ TIME(C, FIREHOSE_MOVE, processing time) \ VAL(C, FIREHOSE_PIN, pages) \ VAL(C, FIREHOSE_UNPIN, pages) #define GASNETC_FATALSIGNAL_CALLBACK(sig) gasnetc_fatalsignal_callback(sig) extern void gasnetc_fatalsignal_callback(int _sig); #if GASNETC_IBV_ODP #define GASNETC_FATALSIGNAL_CLEANUP_CALLBACK(sig) gasnetc_fatalsignal_cleanup_callback(sig) extern void gasnetc_fatalsignal_cleanup_callback(int _sig); #endif #if PLATFORM_OS_DARWIN && !GASNET_SEQ #define GASNETC_PTHREAD_CREATE_OVERRIDE(create_fn, thread, attr, start_routine, arg) \ gasnetc_pthread_create(create_fn, thread, attr, start_routine, arg) #endif /* ------------------------------------------------------------------------------------ */ /* handler table access for PSHM (temporary global impl until PSHM can pass actual ep) */ #define GASNETC_GET_HANDLER 1 #define gasnetc_get_hentry(_ep,_index) (&gasnetc_ep0->_amtbl[(_index)]) #define gasnetc_get_handler(_ep,_index,_field) (gasnetc_get_hentry((_ep),(_index))->gex_##_field) #endif gasnet-2025.8.0/ibv-conduit/gasnet_ratomic.c0000664000175000017500000010073215142313673021013 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_ratomic.c $ * Description: GASNet Remote Atomics Implementation using IBV NIC offload * Copyright 2025, The Regents of the University of California * Terms of use are as specified in license.txt */ #define GASNETI_NEED_GASNET_RATOMIC_H 1 #define GASNETI_NEED_GASNET_COLL_H 1 #include #if GASNETC_BUILD_IBVRATOMIC // Else entire file is empty // // GASNet-EX Remote Atomics via offload to InfiniBand HCA // // Conforming HCAs support FADD and FCAS on U64 directly. // All the add/sub/inc/dec variants can be built for I64/U64 from FADD. // GET is implemented via (build-time choice) FADD(0) or FCAS(0,0), // either of which is a no-op. // // GET/CAS/FCAS for DBL are implemented via type-punning to U64. // // TODO-EX: In a multi-rail scenario, we are currently constrained to use a // single QP for all AD Ops (for correctness). Ideally, we'd use all QPs on // one HCA. However, in the multi-rail case we cannot (yet?) express "bind to // any QP on a fixed HCA". // // TODO-EX: The constraint above could be relaxed, allowing use of all QPs on // all HCAs, if they all report IBV_ATOMIC_GLOB. The code for this has been // written but is disabled due to lack of any suitable test system. // // TODO-EX: In a multi-rail scenario, if the first HCA reports IBV_ATOMIC_NONE, // then we select AM-based atomics. Ideally, we'd search for a more capable // HCA before giving up. // // TODO-EX: There is an *untested* assumption that result byteorder for the // HCAs in use in a given processes is single-valued. However, this can only // come into play for the *disabled* IBV_ATOMIC_GLOB-uses-multiple-HCAs case. // // TODO-EX: Add logic to avoid bounce-copy for in-segment *result_p? // PRO: eliminates buffer alloc/free and 8-byte copy in critical paths. // CON: arithmetic and branches for in-segment check and lkey lookup // TBD: is this even a case that matters? // // TODO-EX: Currently the completion callbacks lack any distinction between // fetching and non-fetching ops. Consequently, non-fetching ops currently // include an *unnecessary* REL fence (needed by fetching ops to ensure the // write to *result_p is ordered before eop/iop completion.) // // TODO-EX: Current generation Mellanox HCAs include masked FADD and CAS // as extensions to the standard atomics. These should allow a straight- // forward implementation of the existing OPs on the 32-bit types. // Additionally, the following additional operations become possible: // SET via masked CAS: // `compare_mask = 0`, `swap_mask = ~1`, `newval = operand1` // This will unconditionally write the entire word. // SWAP via masked FCAS: // `compare_mask = 0`, `swap_mask = ~1`, `newval = operand1` // This will unconditionally swap the entire word. // (F)OR via masked (F)CAS: // `compare_mask = 0`, `swap_mask = operand1`, `newval = ~0` // This will unconditionally write the appropriate 1 bits. // (F)AND via masked (F)CAS: // `compare_mask = 0`, `swap_mask = ~operand1`, `newval = 0` // This will unconditionally write the appropriate 0 bits. // (F)XOR via masked (F)ADD: // `add_mask = ~0` to divide the word into single-bit fields // This will perform addition without carries (which is XOR). // With appropriate adjustment to the masks, these apply to 32-bit as well. // HOWEVER, it appears that NVIDIA/Mellanox no longer supports the experimental // API version needed to access the masked atomics. // Notes on implementation of GEX_FLAG_AD_{REL,ACQ} // // Because the IBV APIs are thread-safe, we believe that both injection and // CQ polling contain sufficient memory fences. // // RELEASE: // We believe that injection of IBV-level communication includes at least // one release fence. // // ACQUIRE: // We believe removing a CQ entry includes at least one acquire fence. #include #include #include GASNETI_IDENT(gasnetc_IdentString_IbvAtomicOffload, "$GASNetIbvAtomicOffload: 1 $"); // // buffers for fetching ops // int gasnetc_ratomicbuf_limit; gasnetc_lifo_head_t gasnetc_ratomicbuf_freelist = GASNETI_LIFO_INITIALIZER; GASNETI_INLINE(gasnetc_get_ratomic_bbuf) void *gasnetc_get_ratomic_bbuf(int block GASNETI_THREAD_FARG) { GASNETC_STAT_EVENT(GET_RATOMICBUF); void *bbuf = gasnetc_lifo_pop(&gasnetc_ratomicbuf_freelist); if_pt (bbuf) { //done } else if (block) { GASNETC_TRACE_WAIT_BEGIN(); GASNETI_SPIN_DOUNTIL(bbuf, { gasnetc_poll_snd(); bbuf = gasnetc_lifo_pop(&gasnetc_ratomicbuf_freelist); }); GASNETC_TRACE_WAIT_END(GET_RATOMICBUF_STALL); } else { gasnetc_poll_snd(); bbuf = gasnetc_lifo_pop(&gasnetc_ratomicbuf_freelist); } gasneti_assert((bbuf != NULL) || !block); return bbuf; } // // completion callbacks // extern void gasnetc_cb_eop_rmw(gasnetc_atomic_val_t *p) { gasnete_eop_t *eop = gasneti_container_of(p, gasnete_eop_t, initiated_cnt); gasnete_eop_check(eop); // sync_writes orders our caller's (optional) write of the fetched value prior to eop completion gasneti_sync_writes(); // Non-atomic decrement is chaper than atomic increment of eop->completed_cnt. // Correct because (unlike Put and Get) there cannot be concurrency between // advancing this counter at AMO injection and the corresponding callback. (*p) -= 1; GASNETE_EOP_MARKDONE(eop); } extern void gasnetc_cb_iop_rmw(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_rmw_cnt); gasnete_iop_check(iop); // REL fence orders our caller's (optional) write of the fetched value prior to iop completion GASNETE_IOP_CNT_FINISH(iop, rmw, 1, GASNETI_ATOMIC_REL); } enum { use_any_qp = -1, // gasnetc_bind_cep() can use any QP use_one_qp = 0, // gasnetc_bind_cep() can use only qpi=0 }; #if (GASNETC_IB_MAX_HCAS == 1) #define gasnetc_ratomic_qpi use_any_qp #else static int gasnetc_ratomic_qpi = use_one_qp; #endif // // low-level OP injection // Subject to specialization on 'opcode' and 'fetching' when inlined // GASNETI_INLINE(gasnete_ratomic_inner) int gasnete_ratomic_inner( gasneti_TM_t i_tm, int fetching, void *result_p, gex_Rank_t tgt_rank, void *tgt_addr, gex_Flags_t flags, enum ibv_wr_opcode opcode, uint64_t operand1, uint64_t operand2, gasnetc_atomic_val_t *initiated_cnt, gasnetc_cb_t completion_cb GASNETI_THREAD_FARG) { void *bbuf = NULL; if (fetching) { bbuf = gasnetc_get_ratomic_bbuf(!(flags & GEX_FLAG_IMMEDIATE) GASNETI_THREAD_PASS); if (!bbuf) return 1; } gasnetc_EP_t ep = (gasnetc_EP_t) i_tm->_ep; gex_Rank_t jobrank = gasnete_ratomic_jobrank(i_tm, tgt_rank, flags); gasnetc_epid_t epid = gasnetc_epid(jobrank, gasnetc_ratomic_qpi); const int rem_auxseg = gasneti_in_auxsegment(jobrank, tgt_addr, sizeof(uint64_t)); gasnetc_sreq_t *sreq = gasnetc_get_sreq(GASNETC_OP_INVALID GASNETI_THREAD_PASS); gasnetc_cep_t *cep = gasnetc_bind_cep(ep, epid, sreq); GASNETC_DECL_SR_DESC(sr_desc, 1); sr_desc->wr.atomic.remote_addr = (uintptr_t)tgt_addr; sr_desc->wr.atomic.rkey = rem_auxseg ? cep->hca->aux_rkeys[jobrank] : GASNETC_SEG_RKEY(cep); sr_desc->num_sge = 1; sr_desc->sg_list[0].length = sizeof(uint64_t); if (!fetching) { gasneti_assert(! result_p); sreq->opcode = GASNETC_OP_ATOMIC; sr_desc->sg_list[0].addr = (uintptr_t)GASNETC_RATOMIC_SINK(cep); } else { gasneti_assert(result_p); gasneti_assert(bbuf); sreq->opcode = GASNETC_OP_ATOMIC_BOUNCE; sreq->amo_result = result_p; sreq->amo_bbuf = bbuf; sr_desc->sg_list[0].addr = (uintptr_t)sreq->amo_bbuf; } sr_desc->sg_list[0].lkey = cep->hca->aux_reg.handle->lkey; sr_desc->opcode = opcode; sr_desc->wr.atomic.compare_add = operand1; if (opcode == IBV_WR_ATOMIC_CMP_AND_SWP) { sr_desc->wr.atomic.swap = operand2; } sreq->comp.cb = completion_cb; sreq->comp.data = initiated_cnt; (*initiated_cnt) += 1; gasnetc_snd_post_common(sreq, sr_desc, 0, 0 GASNETI_THREAD_PASS); return 0; } GASNETI_INLINE(gasnete_ratomic_nb) gex_Event_t gasnete_ratomic_nb( gasneti_TM_t i_tm, int fetching, void *result_p, gex_Rank_t tgt_rank, void *tgt_addr, gex_Flags_t flags, enum ibv_wr_opcode opcode, uint64_t operand1, uint64_t operand2 GASNETI_THREAD_FARG) { gasnete_eop_t *eop = gasnete_eop_new(GASNETI_MYTHREAD); int imm = gasnete_ratomic_inner( i_tm, fetching, result_p, tgt_rank, tgt_addr, flags, opcode, operand1, operand2, &eop->initiated_cnt, gasnetc_cb_eop_rmw GASNETI_THREAD_PASS); if (imm) { SET_EVENT_DONE(eop, 0); gasnete_eop_free(eop GASNETI_THREAD_PASS); return GEX_EVENT_NO_OP; } return (gex_Event_t)eop; } GASNETI_INLINE(gasnete_ratomic_nbi) int gasnete_ratomic_nbi( gasneti_TM_t i_tm, int fetching, void *result_p, gex_Rank_t tgt_rank, void *tgt_addr, gex_Flags_t flags, enum ibv_wr_opcode opcode, uint64_t operand1, uint64_t operand2 GASNETI_THREAD_FARG) { gasnete_iop_t * const iop = GASNETI_MYTHREAD->current_iop; return gasnete_ratomic_inner( i_tm, fetching, result_p, tgt_rank, tgt_addr, flags, opcode, operand1, operand2, &iop->initiated_rmw_cnt, gasnetc_cb_iop_rmw GASNETI_THREAD_PASS); } // // Mid-level (inline) functions marshalling arguments to atomic op injection // #define GASNETE_IBVRATOMIC_MID(dtcode) \ _GASNETE_IBVRATOMIC_MID1(gasnete_ibvratomic##dtcode, dtcode##_type) #define _GASNETE_IBVRATOMIC_MID1(prefix, type) \ GASNETI_INLINE(prefix##_NB_Nadd) \ gex_Event_t prefix##_NB_Nadd(type addend, GASNETE_RATOMIC_ARGS_N0(type)) \ { \ gasneti_TM_t _i_tm = _real_ad->_tm; \ return gasnete_ratomic_nb (_i_tm, 0, NULL, _tgt_rank, _tgt_addr, \ _flags, IBV_WR_ATOMIC_FETCH_AND_ADD, \ addend, 0 GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_Nadd) \ int prefix##_NBI_Nadd(type addend, GASNETE_RATOMIC_ARGS_N0(type)) \ { \ gasneti_TM_t _i_tm = _real_ad->_tm; \ return gasnete_ratomic_nbi(_i_tm, 0, NULL, _tgt_rank, _tgt_addr, \ _flags, IBV_WR_ATOMIC_FETCH_AND_ADD, \ addend, 0 GASNETI_THREAD_PASS); \ } \ \ GASNETI_INLINE(prefix##_NB_Fadd) \ gex_Event_t prefix##_NB_Fadd(type addend, GASNETE_RATOMIC_ARGS_F0(type)) \ { \ gasneti_TM_t _i_tm = _real_ad->_tm; \ return gasnete_ratomic_nb (_i_tm, 1, _result_p, _tgt_rank, _tgt_addr, \ _flags, IBV_WR_ATOMIC_FETCH_AND_ADD, \ addend, 0 GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_Fadd) \ int prefix##_NBI_Fadd(type addend, GASNETE_RATOMIC_ARGS_F0(type)) \ { \ gasneti_TM_t _i_tm = _real_ad->_tm; \ return gasnete_ratomic_nbi(_i_tm, 1, _result_p, _tgt_rank, _tgt_addr, \ _flags, IBV_WR_ATOMIC_FETCH_AND_ADD, \ addend, 0 GASNETI_THREAD_PASS); \ } \ \ GASNETI_INLINE(prefix##_NB_Ncas) \ gex_Event_t prefix##_NB_Ncas(GASNETE_RATOMIC_ARGS_N2(type)) \ { \ gasneti_TM_t _i_tm = _real_ad->_tm; \ return gasnete_ratomic_nb (_i_tm, 0, NULL, _tgt_rank, _tgt_addr, \ _flags, IBV_WR_ATOMIC_CMP_AND_SWP, \ _operand1, _operand2 GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_Ncas) \ int prefix##_NBI_Ncas(GASNETE_RATOMIC_ARGS_N2(type)) \ { \ gasneti_TM_t _i_tm = _real_ad->_tm; \ return gasnete_ratomic_nbi(_i_tm, 0, NULL, _tgt_rank, _tgt_addr, \ _flags, IBV_WR_ATOMIC_CMP_AND_SWP, \ _operand1, _operand2 GASNETI_THREAD_PASS); \ } \ \ GASNETI_INLINE(prefix##_NB_Fcas) \ gex_Event_t prefix##_NB_Fcas(GASNETE_RATOMIC_ARGS_F2(type)) \ { \ gasneti_TM_t _i_tm = _real_ad->_tm; \ return gasnete_ratomic_nb (_i_tm, 1, _result_p, _tgt_rank, _tgt_addr, \ _flags, IBV_WR_ATOMIC_CMP_AND_SWP, \ _operand1, _operand2 GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_Fcas) \ int prefix##_NBI_Fcas(GASNETE_RATOMIC_ARGS_F2(type)) \ { \ gasneti_TM_t _i_tm = _real_ad->_tm; \ return gasnete_ratomic_nbi(_i_tm, 1, _result_p, _tgt_rank, _tgt_addr, \ _flags, IBV_WR_ATOMIC_CMP_AND_SWP, \ _operand1, _operand2 GASNETI_THREAD_PASS); \ } // GASNETE_IBVRATOMIC_MID(_gex_dt_U64) GASNETE_IBVRATOMIC_MID(_gex_dt_I64) // GET operations (type independent) // These are use nop CAS or FADD as an atomic Get // // These do not just call gasnete_ratomic_{nb,nbi}, since at least NBI // needs to use different counter and callback. #ifdef GASNETC_RATOMIC_GET_OP // Preserve existing value #else // Uncomment exactly one: //#define GASNETC_RATOMIC_GET_OP CMP_AND_SWP #define GASNETC_RATOMIC_GET_OP FETCH_AND_ADD #endif #define GASNETC_RATOMIC_GET_OPCODE _CONCAT(IBV_WR_ATOMIC_,GASNETC_RATOMIC_GET_OP) static gex_Event_t gasnete_ratomic_get_nb( gasneti_TM_t i_tm, void *result_p, gex_Rank_t tgt_rank, void *tgt_addr, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_eop_t *eop = gasnete_eop_new(GASNETI_MYTHREAD); int imm = gasnete_ratomic_inner( i_tm, 1, result_p, tgt_rank, tgt_addr, flags, GASNETC_RATOMIC_GET_OPCODE, 0, 0, &eop->initiated_cnt, gasnetc_cb_eop_get GASNETI_THREAD_PASS); if (imm) { SET_EVENT_DONE(eop, 0); gasnete_eop_free(eop GASNETI_THREAD_PASS); return GEX_EVENT_NO_OP; } return (gex_Event_t)eop; } static int gasnete_ratomic_get_nbi( gasneti_TM_t i_tm, void *result_p, gex_Rank_t tgt_rank, void *tgt_addr, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_iop_t * const iop = GASNETI_MYTHREAD->current_iop; return gasnete_ratomic_inner( i_tm, 1, result_p, tgt_rank, tgt_addr, flags, GASNETC_RATOMIC_GET_OPCODE, 0, 0, &iop->initiated_get_cnt, iop->next ? gasnetc_cb_nar_get : gasnetc_cb_iop_get GASNETI_THREAD_PASS); } // // Ratomic OP functions (called by top-level dispatch functions) which // call the GET or mid-level inline functions defined above. // // Accessors (GET) #define _GASNETE_IBVRATOMIC_DEF_GET(dtcode) \ static gex_Event_t gasnete_ibvratomic##dtcode##_NB_GET(GASNETE_RATOMIC_ARGS_F0(dtcode##_type)) { \ return gasnete_ratomic_get_nb (_real_ad->_tm, _result_p, _tgt_rank, _tgt_addr, \ sizeof(dtcode##_type), _flags GASNETI_THREAD_PASS); \ } \ static int gasnete_ibvratomic##dtcode##_NBI_GET(GASNETE_RATOMIC_ARGS_F0(dtcode##_type)) { \ return gasnete_ratomic_get_nbi(_real_ad->_tm, _result_p, _tgt_rank, _tgt_addr, \ sizeof(dtcode##_type), _flags GASNETI_THREAD_PASS); \ } // (F)ADD operations #define _GASNETE_IBVRATOMIC_DEF_ADD(dtcode,opstem,nargs,addend) \ _GASNETE_IBVRATOMIC_DEF_ADD1(dtcode, opstem,N##nargs,N,addend) \ _GASNETE_IBVRATOMIC_DEF_ADD1(dtcode,F##opstem,F##nargs,F,addend) #define _GASNETE_IBVRATOMIC_DEF_ADD1(dtcode,opname,args,fetching,addend) \ static gex_Event_t gasnete_ibvratomic##dtcode##_NB_##opname(GASNETE_RATOMIC_ARGS_##args(dtcode##_type)) { \ return gasnete_ibvratomic##dtcode##_NB_##fetching##add(addend,GASNETE_RATOMIC_PASS_##fetching##0); \ } \ static int gasnete_ibvratomic##dtcode##_NBI_##opname(GASNETE_RATOMIC_ARGS_##args(dtcode##_type)) { \ return gasnete_ibvratomic##dtcode##_NBI_##fetching##add(addend,GASNETE_RATOMIC_PASS_##fetching##0); \ } // (F)CAS operations on integer types #define _GASNETE_IBVRATOMIC_DEF_CAS(dtcode) \ _GASNETE_IBVRATOMIC_DEF_CAS1(dtcode, CAS,N2,N) \ _GASNETE_IBVRATOMIC_DEF_CAS1(dtcode,FCAS,F2,F) #define _GASNETE_IBVRATOMIC_DEF_CAS1(dtcode,opname,args,fetching) \ static gex_Event_t gasnete_ibvratomic##dtcode##_NB_##opname(GASNETE_RATOMIC_ARGS_##args(dtcode##_type)) { \ return gasnete_ibvratomic##dtcode##_NB_##fetching##cas(GASNETE_RATOMIC_PASS_##args); \ } \ static int gasnete_ibvratomic##dtcode##_NBI_##opname(GASNETE_RATOMIC_ARGS_##args(dtcode##_type)) { \ return gasnete_ibvratomic##dtcode##_NBI_##fetching##cas(GASNETE_RATOMIC_PASS_##args); \ } // (F)CAS operations on floating-point types #define _GASNETE_IBVRATOMIC_DEF_FP_CAS(dtcode) \ _GASNETE_IBVRATOMIC_DEF_FP_CAS1(dtcode, dtcode##_bits) // This extra pass expands the "bits" token prior to additional concatenation #define _GASNETE_IBVRATOMIC_DEF_FP_CAS1(dtcode, bits) \ _GASNETE_IBVRATOMIC_DEF_FP_CAS2(dtcode, bits) #define _GASNETE_IBVRATOMIC_DEF_FP_CAS2(dtcode, bits) \ static gex_Event_t gasnete_ibvratomic##dtcode##_NB_CAS(GASNETE_RATOMIC_ARGS_N2(dtcode##_type)) { \ GASNETI_RATOMIC_UNION(bits) _op1; _op1._gex_fp = _operand1; \ GASNETI_RATOMIC_UNION(bits) _op2; _op2._gex_fp = _operand2; \ return gasnete_ibvratomic_gex_dt_U##bits##_NB_Ncas( \ _real_ad, _tgt_rank, _tgt_addr, \ _op1._gex_ui, _op2._gex_ui, _flags GASNETI_THREAD_PASS); \ } \ static int gasnete_ibvratomic##dtcode##_NBI_CAS(GASNETE_RATOMIC_ARGS_N2(dtcode##_type)) { \ GASNETI_RATOMIC_UNION(bits) _op1; _op1._gex_fp = _operand1; \ GASNETI_RATOMIC_UNION(bits) _op2; _op2._gex_fp = _operand2; \ return gasnete_ibvratomic_gex_dt_U##bits##_NBI_Ncas( \ _real_ad, _tgt_rank, _tgt_addr, \ _op1._gex_ui, _op2._gex_ui, _flags GASNETI_THREAD_PASS); \ } \ static gex_Event_t gasnete_ibvratomic##dtcode##_NB_FCAS(GASNETE_RATOMIC_ARGS_F2(dtcode##_type)) { \ GASNETI_RATOMIC_UNION(bits) _op1; _op1._gex_fp = _operand1; \ GASNETI_RATOMIC_UNION(bits) _op2; _op2._gex_fp = _operand2; \ return gasnete_ibvratomic_gex_dt_U##bits##_NB_Fcas( \ _real_ad, (uint##bits##_t *)_result_p, _tgt_rank, _tgt_addr, \ _op1._gex_ui, _op2._gex_ui, _flags GASNETI_THREAD_PASS); \ } \ static int gasnete_ibvratomic##dtcode##_NBI_FCAS(GASNETE_RATOMIC_ARGS_F2(dtcode##_type)) { \ GASNETI_RATOMIC_UNION(bits) _op1; _op1._gex_fp = _operand1; \ GASNETI_RATOMIC_UNION(bits) _op2; _op2._gex_fp = _operand2; \ return gasnete_ibvratomic_gex_dt_U##bits##_NBI_Fcas( \ _real_ad, (uint##bits##_t *)_result_p, _tgt_rank, _tgt_addr, \ _op1._gex_ui, _op2._gex_ui, _flags GASNETI_THREAD_PASS); \ } // Unreachable functions for non-offloadable ops #define _GASNETE_IBVRATOMIC_BAD2(dtcode,opstem,nargs) \ _GASNETE_IBVRATOMIC_BAD1(dtcode,opstem,N##nargs) \ _GASNETE_IBVRATOMIC_BAD1(dtcode,F##opstem,F##nargs) #define _GASNETE_IBVRATOMIC_BAD1(dtcode,opname,args) \ static gex_Event_t gasnete_ibvratomic##dtcode##_NB_##opname(GASNETE_RATOMIC_ARGS_##args(dtcode##_type)) { \ gasneti_unreachable_error(("Invalid offload of gex_AD_OpNB_" dtcode##_string "(GEX_OP_" #opname ")")); \ return GEX_EVENT_INVALID; \ } \ static int gasnete_ibvratomic##dtcode##_NBI_##opname(GASNETE_RATOMIC_ARGS_##args(dtcode##_type)) { \ gasneti_unreachable_error(("Invalid offload of gex_AD_OpNBI_" dtcode##_string "(GEX_OP_" #opname ")")); \ return 0; \ } #define GASNETE_IBVRATOMIC_INT_DEFS(dtcode) \ _GASNETE_IBVRATOMIC_DEF_GET(dtcode) \ \ _GASNETE_IBVRATOMIC_DEF_ADD(dtcode,ADD,1,_operand1) \ _GASNETE_IBVRATOMIC_DEF_ADD(dtcode,SUB,1,-_operand1) \ _GASNETE_IBVRATOMIC_DEF_ADD(dtcode,INC,0,1) \ _GASNETE_IBVRATOMIC_DEF_ADD(dtcode,DEC,0,-1) \ \ _GASNETE_IBVRATOMIC_DEF_CAS(dtcode) \ \ _GASNETE_IBVRATOMIC_BAD2(dtcode,AND,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,OR,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,XOR,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,MULT,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,MIN,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,MAX,1) \ _GASNETE_IBVRATOMIC_BAD1(dtcode,SET,N1) \ _GASNETE_IBVRATOMIC_BAD1(dtcode,SWAP,F1) // GASNETE_IBVRATOMIC_INT_DEFS(_gex_dt_U64) GASNETE_IBVRATOMIC_INT_DEFS(_gex_dt_I64) #define GASNETE_IBVRATOMIC_FP_DEFS(dtcode) \ _GASNETE_IBVRATOMIC_DEF_GET(dtcode) \ \ _GASNETE_IBVRATOMIC_DEF_FP_CAS(dtcode) \ \ _GASNETE_IBVRATOMIC_BAD2(dtcode,ADD,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,SUB,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,INC,0) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,DEC,0) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,AND,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,OR,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,XOR,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,MULT,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,MIN,1) \ _GASNETE_IBVRATOMIC_BAD2(dtcode,MAX,1) \ _GASNETE_IBVRATOMIC_BAD1(dtcode,SET,N1) \ _GASNETE_IBVRATOMIC_BAD1(dtcode,SWAP,F1) // GASNETE_IBVRATOMIC_FP_DEFS(_gex_dt_DBL) // // Build the dispatch tables // #define GASNETE_IBVRATOMIC_TBL(dtcode) \ gasnete_ratomic##dtcode##_fn_tbl_t gasnete_ibvratomic##dtcode##_fn_tbl = \ GASNETE_RATOMIC_FN_TBL_INIT(gasnete_ibvratomic##dtcode,dtcode); GASNETE_IBVRATOMIC_TBL(_gex_dt_U64) GASNETE_IBVRATOMIC_TBL(_gex_dt_I64) GASNETE_IBVRATOMIC_TBL(_gex_dt_DBL) // // Masks of available capabilities // #define GASNETE_IBVRATOMIC_BASE_OPS ( GEX_OP_CAS | GEX_OP_FCAS | GEX_OP_GET ) // Note lack of SET #define GASNETE_IBVRATOMIC_FADD_OPS ( GEX_OP_ADD | GEX_OP_FADD | GEX_OP_SUB | GEX_OP_FSUB | \ GEX_OP_INC | GEX_OP_FINC | GEX_OP_DEC | GEX_OP_FDEC ) #define GASNETE_IBVRATOMIC_TYPES ( GEX_DT_I64 | GEX_DT_U64 | GEX_DT_DBL ) // HCA's hca_cap.atomic_cap enum { atomic_cap_uninitialized, atomic_cap_none, // Use AMs atomic_cap_hca, atomic_cap_glob }; static int gasnetc_atomic_cap = atomic_cap_uninitialized; // // Init-hook to install the dispatch tables (aka algorithm selection) // void gasnete_ibvratomic_init_hook(gasneti_AD_t real_ad) { const char *msg = ""; gex_Flags_t flags = real_ad->_flags; gasneti_TM_t real_tm = real_ad->_tm; gex_DT_t dt = real_ad->_dt; gex_OP_t ops = real_ad->_ops; // Check for unsupported dt or op(s) if (dt & ~GASNETE_IBVRATOMIC_TYPES) { msg = "unsupported datatype"; goto use_am; } gex_OP_t avail_ops = GASNETE_IBVRATOMIC_BASE_OPS; if (gasneti_dt_int(dt)) avail_ops |= GASNETE_IBVRATOMIC_FADD_OPS; if (ops & ~avail_ops) { msg = "unsupported operation(s) on a supported datatype"; goto use_am; } // Check for singleton, which is a pain to support for no clear benefit if (real_tm->_size == 1) { msg = "singleton team"; goto use_am; } // Check for supported cases that should favor AM over NIC if (flags & GEX_FLAG_AD_FAVOR_REMOTE) { // Client's flags want offload } else if (gasnetc_atomic_cap == atomic_cap_glob) { // HCA can interoperate with tools-based atomics w/i RANK and NBRHD } else if (flags & (GEX_FLAG_AD_FAVOR_MY_RANK | GEX_FLAG_AD_FAVOR_MY_NBRHD)) { // Client's flags favor AM-based atomics msg = "GEX_FLAG_AD_FAVOR_* flags(s)"; goto use_am; } #if GASNET_PSHM // TODO-EX: this closed form does not generalize for multi-EP nor TM_Split else if (gasneti_mysupernode.node_count == gasneti_nodes) { // Single-neighborhood case favors AM-based *if* the datatype is // "tools safe" (and thus not actually using AM). Otherwise, we // will assume that the NIC is a better option since it does not // rely on target attentiveness. msg = "enabling shared-memory optimization"; switch (dt) { case GEX_DT_U64: if (GASNETE_RATOMIC_PSHMSAFE_gex_dt_U64) goto use_am; break; case GEX_DT_I64: if (GASNETE_RATOMIC_PSHMSAFE_gex_dt_I64) goto use_am; break; case GEX_DT_DBL: if (GASNETE_RATOMIC_PSHMSAFE_gex_dt_DBL) goto use_am; break; default: gasneti_unreachable_error(("unknown data type %d", dt)); } } #endif switch (gasnetc_atomic_cap) { case atomic_cap_none: msg = "missing HCA support"; goto use_am; case atomic_cap_hca: // HCA-initiated atomics may use separate PCI read and write transactions, and // thus are not guaranteed to preserve atomic coherence wrt CPU AMO instructions real_ad->_tools_safe = 0; break; case atomic_cap_glob: real_ad->_tools_safe = 1; break; default: gasneti_unreachable_error(("invalid atomic_cap")); } switch (dt) { case GEX_DT_U64: real_ad->_fn_tbl = (gasnete_ratomic_fn_tbl_t)&gasnete_ibvratomic_gex_dt_U64_fn_tbl; break; case GEX_DT_I64: real_ad->_fn_tbl = (gasnete_ratomic_fn_tbl_t)&gasnete_ibvratomic_gex_dt_I64_fn_tbl; break; case GEX_DT_DBL: real_ad->_fn_tbl = (gasnete_ratomic_fn_tbl_t)&gasnete_ibvratomic_gex_dt_DBL_fn_tbl; break; default: gasneti_unreachable_error(("unknown data type %d", dt)); } real_ad->_is_ref = 0; return; use_am: GASNETI_TRACE_PRINTF(O,("gex_AD_Create(dt=%d, ops=0x%x): %s", (int)dt, (unsigned int)ops, msg)); gasnete_amratomic_init_hook(real_ad); return; } // Subsystem initialization // 1) query/log HCA atomic capabilty // 2) detect byteorder of FADD and FCAS results // 3) set gasnetc_ratomic_qpi int gasnetc_ratomic_init(gasnetc_EP_t ep0) { GASNET_BEGIN_FUNCTION(); // OK - not a critical-path gasneti_TM_t i_tm = ep0->_client->_tm0; gex_TM_t e_tm = gasneti_export_tm(i_tm); // // 1) check and log just the first HCA's reported atomics capability // gasneti_assert_int(gasnetc_atomic_cap ,==, atomic_cap_uninitialized); // quoted enum descriptions are from https://www.rdmamojo.com/2012/07/13/ibv_query_device/ switch (gasnetc_hca[0].hca_cap.atomic_cap) { case IBV_ATOMIC_NONE: // "Atomic operations aren't supported at all" GASNETI_TRACE_PRINTF(I,("gex_AD: HCA does not support atomics")); gasnetc_atomic_cap = atomic_cap_none; break; case IBV_ATOMIC_HCA: // "Atomicity is guaranteed between QPs on this device only" GASNETI_TRACE_PRINTF(I,("gex_AD: HCA supports device-scope atomicity")); gasnetc_atomic_cap = atomic_cap_hca; break; case IBV_ATOMIC_GLOB: // "Atomicity is guaranteed between this device and any other component, // such as CPUs, IO devices and other RDMA devices" GASNETI_TRACE_PRINTF(I,("gex_AD: HCA supports global-scope atomicity")); gasnetc_atomic_cap = atomic_cap_glob; break; default: gasneti_unreachable_error(("gex_AD: unknown hca_cap.atomic_cap value %i", (int)gasnetc_hca[0].hca_cap.atomic_cap)); } // Reduction to find global min if (gasneti_nodes > 1) { int32_t global_cap; int32_t local_cap = (int32_t) gasnetc_atomic_cap; gex_Event_Wait( gex_Coll_ReduceToAllNB(e_tm, &global_cap, &local_cap, GEX_DT_I32, sizeof(int32_t), 1, GEX_OP_MIN, NULL, NULL, 0)); if (global_cap != local_cap) { gasnetc_atomic_cap = global_cap; switch (gasnetc_atomic_cap) { case atomic_cap_none: GASNETI_TRACE_PRINTF(I,("gex_AD: at least one process lacks atomics support")); break; case atomic_cap_hca: GASNETI_TRACE_PRINTF(I,("gex_AD: at least one process supports only HCA-scope atomicity")); break; default: gasneti_unreachable_error(("gex_AD: impossible atomic cap reduction output")); } } } // Stop here if no support if (gasnetc_atomic_cap == atomic_cap_none) { GASNETI_TRACE_PRINTF(I,("gex_AD: disabled due to lack of HCA support")); return GASNET_OK; } // // 2) Check byteorder of FADD and FCAS results // // A location in aux segment we can use as needed uint64_t *tmp = (uint64_t *)GASNETC_RATOMIC_SINK(cep); // Two back-to-back loop-back FADD(1) operations: uint64_t result[2]; for (int i = 0; i < 2; ++i) { gex_Event_Wait( gasnete_ratomic_nb(i_tm, 1, &result[i], gasneti_mynode, tmp, 0, IBV_WR_ATOMIC_FETCH_AND_ADD, 1, 0 GASNETI_THREAD_PASS)); } // Check the two results to determine byteorder gasnetc_hca_t *hca = &gasnetc_hca[0]; hca->amo_bswap = (result[1] - result[0]) != 1; GASNETI_TRACE_PRINTF(I,("gex_AD: amo results are %sin host byteorder", hca->amo_bswap ? "not " : "")); #if GASNET_DEBUG // Try again to be sure for (int i = 0; i < 2; ++i) { gex_Event_Wait( gasnete_ratomic_nb(i_tm, 1, &result[i], gasneti_mynode, tmp, 0, IBV_WR_ATOMIC_FETCH_AND_ADD, 1, 0 GASNETI_THREAD_PASS)); } gasneti_assert_uint(result[1] - result[0] ,==, 1); #endif // // 3) set gasnetc_ratomic_qpi // Controls whether AD Ops will be issued on a single QP or striped over all of them. // #if (GASNETC_IB_MAX_HCAS > 1) switch (gasnetc_atomic_cap) { case atomic_cap_glob: #if 0 // TODO: enable if/when a (multi-rail + IBV_ATOMIC_GLOB) platform can be tested { // It is safe to use all QPs if and only if all HCAs report IBV_ATOMIC_GLOB gasnetc_ratomic_qpi = use_any_qp; gasnetc_hca_t *hca; GASNETC_FOR_ALL_HCA(hca) { if (hca->hca_cap.atomic_cap != IBV_ATOMIC_GLOB) { gasnetc_ratomic_qpi = use_one_qp; break; } else { // TODO: replace this untested homogeneity assumption with a real probe hca->amo_bswap = gasnetc_hca[0]->amo_bswap; } } break; } #else // fall-though #endif case atomic_cap_hca: // It is safe to use all QPs if and only if using a single HCA gasnetc_ratomic_qpi = (gasnetc_num_hcas == 1) ? use_any_qp : use_one_qp; break; default: gasneti_unreachable_error(("gex_AD: impossible atomic cap value")); } #else gasneti_static_assert(gasnetc_ratomic_qpi == use_any_qp); #endif GASNETI_TRACE_PRINTF(I,("gex_AD: using %s", (gasnetc_ratomic_qpi == use_any_qp)?"all QPs":"one QP")); return GASNET_OK; } #endif // GASNETC_BUILD_IBVRATOMIC gasnet-2025.8.0/ibv-conduit/gasnet_core_connect.c0000664000175000017500000030004115142313673022011 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_core_connect.c $ * Description: Connection management code * Copyright 2011, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include /* For open(), stat(), O_CREAT, etc.: */ #include #include #include #include // INT_MAX /* The following configuration cannot yet be overridden by environment variables. */ #define GASNETC_QP_MIN_RNR_TIMER 6 /*IB_RNR_NAK_TIMER_0_08*/ #define GASNETC_QP_STATIC_RATE 0 #define GASNETC_QP_RNR_RETRY 7 /* retry forever, but almost never happens */ #define GASNETC_PSN(_sender, _qpi) ((_sender)*gasnetc_alloc_qps + (_qpi)) /* Convenience iterators */ #define GASNETC_FOR_EACH_QPI(_conn_info, _qpi, _cep) \ for((_cep) = (_conn_info)->cep, (_qpi) = 0; \ (_qpi) < gasnetc_alloc_qps; ++(_cep), ++(_qpi)) // AMs need at most 2 scatter-gather entries when using gather-send for Medium // or packed-Long, while Puts and Long payloads need as many as GASNETC_SND_SG. // All Send Queues need to be able to accomodate either. #define GASNETC_MAX_SEND_SGE MAX(2, GASNETC_SND_SG) /* ------------------------------------------------------------------------------------ */ /* Global data */ gasnetc_sema_t gasnetc_zero_sema = GASNETC_SEMA_INITIALIZER(0, 0); #if GASNETC_DYNAMIC_CONNECT int gasnetc_ud_rcvs = 0; int gasnetc_ud_snds = 0; #endif #define GASNETC_XRC_HELP_MSG " - please try running with GASNET_USE_XRC=0 in your environment (or configure using '--disable-ibv-xrc' to entirely disable XRC support)" /* ------------------------------------------------------------------------------------ */ /* Common types */ typedef struct { gasneti_atomic_t ref_count; struct ibv_ah * ib_ah; } gasnetc_ah_t; /* Info used for connection establishment */ typedef struct { gex_Rank_t node; gasnetc_cep_t *cep; /* Vector of gasnet endpoints */ uint32_t *local_qpn; /* Local qpns of connections */ uint32_t *remote_qpn; /* Remote qpns of connections */ #if GASNETC_IBV_XRC uint32_t *local_xrc_qpn; /* Local qpns of XRC rcv qps */ uint32_t *remote_xrc_qpn; /* Remote qpns of XRC rcv qps */ uint32_t *xrc_remote_srq_num; /* Remote SRQ numbers */ #endif const gasnetc_port_info_t **port; } gasnetc_conn_info_t; /* Info exchanged for connection setup */ #if GASNETC_IBV_XRC typedef struct { uint32_t srq_num; uint32_t xrc_qpn; uint32_t qpn; } gasnetc_xrc_conn_data_t; #else /* Just exchange qpn. So no struct required */ #endif #if GASNETC_IBV_XRC #define GASNETC_SND_QP_NEEDS_MODIFY(_xrc_snd_qp,_state) \ (!gasnetc_use_xrc || ((_xrc_snd_qp).state < (_state))) #else #define GASNETC_SND_QP_NEEDS_MODIFY(_xrc_snd_qp,_state) 1 #endif const char *gasnetc_connectfile_in = NULL; const char *gasnetc_connectfile_out = NULL; int gasnetc_connectfile_out_base = 36; // Defaults to most compact /* ------------------------------------------------------------------------------------ */ #if GASNET_DEBUG && GASNETC_DYNAMIC_CONNECT /* Drop some UD packets randomly to aid debugging */ static unsigned int gasnetc_conn_drop_denom = 0; #include /* Uniformly distributed int in range [0..max_val] */ static unsigned int gasnetc_conn_rand_int(unsigned int max_val) { static unsigned short state[3]; static int done_init = 0; if_pf (!done_init) { gasneti_tick_t now = gasneti_ticks_now(); state[0] = getpid(); state[1] = (unsigned short) now; state[2] = (unsigned short) (now >> 16); done_init = 1; } return (unsigned int)(((double)(max_val+1.0)) * erand48(state)); } #endif /* ------------------------------------------------------------------------------------ */ /* Not gasnetc_lifo_ because accessed by both client and conn threads */ static gasneti_lifo_head_t sq_sema_freelist = GASNETI_LIFO_INITIALIZER; static void sq_sema_alloc(int count) { union dummy { gasnetc_sema_t sema; void *link; /* Ensure anough space for the lifo links */ } *p = (union dummy *) gasneti_malloc_aligned(GASNETI_CACHE_LINE_BYTES, count * sizeof(union dummy)); int i; gasneti_leak_aligned(p); for (i=0; ihandle, attr) #else typedef struct ibv_qp_init_attr gasnetc_qp_init_attr_t; #define gasnetc_create_qp(hca, attr) ibv_create_qp((hca)->pd, attr) #endif /* ------------------------------------------------------------------------------------ */ #if GASNETC_IBV_XRC typedef struct gasnetc_xrc_snd_qp_s { struct ibv_qp * handle; enum ibv_qp_state state; gasnetc_sema_t *sq_sema_p; } gasnetc_xrc_snd_qp_t; static gasnetc_xrc_snd_qp_t *gasnetc_xrc_snd_qp = NULL; #if GASNET_MAXNODES <= 65535 static uint16_t *gasnetc_xrcd_map = NULL; #else static uint32_t *gasnetc_xrcd_map = NULL; #endif static int gasnetc_xrcd_simple; static gasnetc_xrc_snd_qp_t * gasnetc_node2snd_qp(gex_Rank_t rank) { if (!gasnetc_use_xrc) return NULL; int idx = gasnetc_xrcd_simple ? gasneti_node2supernode(rank) : gasnetc_xrcd_map[rank]; return gasnetc_xrc_snd_qp + (idx * gasnetc_alloc_qps); } #define GASNETC_NODE2SND_QP(rank) gasnetc_node2snd_qp(rank) static uint32_t *gasnetc_xrc_rcv_qpn = NULL; /* Create one XRC rcv QP */ static int gasnetc_xrc_create_qp(gasnetc_cep_t *cep, gex_Rank_t node, int qpi) { gasnetc_hca_t *hca = cep->hca; gasnetc_xrcd_t *xrc_domain = hca->xrc_domain; const int cep_idx = node * gasnetc_alloc_qps + qpi; gasneti_atomic32_t *rcv_qpn_p = (gasneti_atomic32_t *)(&gasnetc_xrc_rcv_qpn[cep_idx]); uint32_t rcv_qpn = 0; #if GASNETC_IBV_XRC_OFED struct ibv_qp *xrc_recv_qp; #elif GASNETC_IBV_XRC_MLNX int ret; #endif gasneti_assert(gasnetc_xrc_rcv_qpn != NULL); gasneti_assert(sizeof(uint32_t) == sizeof(gasneti_atomic32_t)); /* Create the RCV QPs once per supernode and register in the non-creating node(s) */ /* QPN==1 is reserved, so we can use it as a "lock" value */ retry: #if GASNETC_IBV_XRC_OFED if (gasneti_atomic32_compare_and_swap(rcv_qpn_p, 0, 1, 0)) { gasnetc_qp_init_attr_t init_attr; memset(&init_attr, 0, sizeof(gasnetc_qp_init_attr_t)); init_attr.qp_type = IBV_QPT_XRC_RECV; init_attr.comp_mask = IBV_QP_INIT_ATTR_XRCD; init_attr.xrcd = xrc_domain; xrc_recv_qp = gasnetc_create_qp(hca, &init_attr); GASNETC_IBV_CHECK_PTR(xrc_recv_qp, "from gasnetc_create_qp(xrc_rcv)" GASNETC_XRC_HELP_MSG); gasneti_atomic32_set(rcv_qpn_p, xrc_recv_qp->qp_num, GASNETI_ATOMIC_REL); } else { struct ibv_qp_open_attr attr; gasneti_waituntil(1 != (rcv_qpn = gasneti_atomic32_read(rcv_qpn_p, 0))); /* includes rmb() */ if_pf (rcv_qpn == 0) goto retry; /* Should not happen */ memset(&attr, 0, sizeof(struct ibv_qp_open_attr)); attr.comp_mask = IBV_QP_OPEN_ATTR_NUM | IBV_QP_OPEN_ATTR_XRCD | IBV_QP_OPEN_ATTR_TYPE; attr.qp_num = rcv_qpn; attr.qp_type = IBV_QPT_XRC_RECV; attr.xrcd = xrc_domain; xrc_recv_qp = ibv_open_qp(hca->handle, &attr); GASNETC_IBV_CHECK_PTR(xrc_recv_qp, "from ibv_open_qp()" GASNETC_XRC_HELP_MSG); } cep->rcv_qp = xrc_recv_qp; #elif GASNETC_IBV_XRC_MLNX if (gasneti_atomic32_compare_and_swap(rcv_qpn_p, 0, 1, 0)) { struct ibv_qp_init_attr init_attr; init_attr.xrc_domain = xrc_domain; ret = ibv_create_xrc_rcv_qp(&init_attr, &rcv_qpn); GASNETC_IBV_CHECK(ret, "from ibv_create_xrc_rcv_qp()" GASNETC_XRC_HELP_MSG); gasneti_atomic32_set(rcv_qpn_p, rcv_qpn, GASNETI_ATOMIC_REL); } else { gasneti_waituntil(1 != (rcv_qpn = gasneti_atomic32_read(rcv_qpn_p, 0))); /* includes rmb() */ if_pf (rcv_qpn == 0) goto retry; /* Should not happen */ ret = ibv_reg_xrc_rcv_qp(xrc_domain, rcv_qpn); GASNETC_IBV_CHECK(ret, "from ibv_reg_xrc_rcv_qp()" GASNETC_XRC_HELP_MSG); } #endif return GASNET_OK; } static int gasnetc_xrc_modify_qp( gasnetc_cep_t *cep, struct ibv_qp_attr *attr, enum ibv_qp_attr_mask attr_mask) { #if GASNETC_IBV_XRC_OFED struct ibv_qp *xrc_qp = cep->rcv_qp; #elif GASNETC_IBV_XRC_MLNX gasnetc_xrcd_t *xrc_domain = cep->hca->xrc_domain; uint32_t xrc_qp_num = cep->rcv_qpn; #endif int retval; #if GASNETC_IBV_XRC_OFED retval = ibv_modify_qp(xrc_qp, attr, attr_mask); #elif GASNETC_IBV_XRC_MLNX retval = ibv_modify_xrc_rcv_qp(xrc_domain, xrc_qp_num, attr, attr_mask); #endif if_pf (retval == EINVAL) { struct ibv_qp_attr qp_attr; struct ibv_qp_init_attr qp_init_attr; int rc; #if GASNETC_IBV_XRC_OFED rc = ibv_query_qp(xrc_qp, &qp_attr, IBV_QP_STATE, &qp_init_attr); #elif GASNETC_IBV_XRC_MLNX rc = ibv_query_xrc_rcv_qp(xrc_domain, xrc_qp_num, &qp_attr, IBV_QP_STATE, &qp_init_attr); #endif if (!rc && (qp_attr.qp_state >= attr->qp_state)) { /* No actual error, just a race against another process */ retval = 0; } } return retval; } /* XXX: Requires that at least the first call is collective */ static char* gasnetc_xrc_tmpname(uint16_t mylid, int index, int domain) { static const char *tmpdir = NULL; static int tmpdir_len = -1; static pid_t pid; static const char pattern[] = "/GASNETxrc-%04x%01x%02x-%06x"; /* Max 11 + 7 + 1 + 6 + 1 = 26 */ const int filename_len = 26; char *filename; // At most 16 HCAs per process gasneti_assert_always(index >= 0); gasneti_assert_always_uint(index ,<, 16); // At most 256 XRC domains per supernode // Worst case for `n` HCAs per host with `r` open per process is `C(n,r)` possible // domains per host, where `C()` is "combinations of n pick r" = `n! / ( n! * (n-r)! )`. // The maximum over `r` occurs at `r = floor(n/2)`. // For n=10 this yields 252 possible domains, meaning that with current encoding, // we are assured of handling any configuration with no more than ten HCAs per host. gasneti_assert_always(domain >= 0); gasneti_assert_always_uint(domain ,<, 256); /* Initialize tmpdir and pid only on first call */ if (!tmpdir) { tmpdir = gasneti_tmpdir(); if (!tmpdir) { gasneti_fatalerror("XRC support requires valid $GASNET_TMPDIR, $TMPDIR or /tmp"); } tmpdir_len = strlen(tmpdir); /* Get PID of first proc per supernode */ pid = getpid(); /* Redundant, but harmless on other processes */ gasneti_pshmnet_bootstrapBroadcast(gasneti_request_pshmnet, &pid, sizeof(pid), &pid, 0); } filename = gasneti_malloc(tmpdir_len + filename_len); strncpy(filename, tmpdir, tmpdir_len); snprintf(filename + tmpdir_len, filename_len, pattern, (unsigned int)(mylid & 0xffff), (unsigned int)(index & 0xf), (unsigned int)(domain & 0xf), (unsigned int)(pid & 0xffffff)); gasneti_assert(strlen(filename) < (tmpdir_len + filename_len)); return filename; } // XRD domain (xrcd) info static int gasnetc_xrcd_global_count; // Number of XRC domains in the entire job static int gasnetc_xrcd_local_count; // Number of XRC domains in my supernode static int gasnetc_xrcd_local_rank; // Rank of my XRC domain within my suprnode static int gasnetc_xrcd_iam_leader; // Boolean, true in exactly one proc per XRC domain // qsort comparison fn static const uint16_t *gasnetc_xrc_remote_lids; static int _gasnetc_xrc_compare_keys(gex_Rank_t a_r, gex_Rank_t b_r) { // Primary key is supernode int a_s = gasneti_node2supernode(a_r); int b_s = gasneti_node2supernode(b_r); int result = (a_s - b_s); if (result) return result; // Secondary key is the array of gasnetc_num_ports lids return memcmp(gasnetc_xrc_remote_lids + a_r * gasnetc_num_ports, gasnetc_xrc_remote_lids + b_r * gasnetc_num_ports, sizeof(uint16_t) * gasnetc_num_ports); } static int _gasnetc_xrc_compare_fn(const void *a_p, const void *b_p) { gasneti_static_assert(GASNET_MAXNODES < INT_MAX); gex_Rank_t a_r = *(gex_Rank_t *)a_p; gex_Rank_t b_r = *(gex_Rank_t *)b_p; // Compare the keys int result = _gasnetc_xrc_compare_keys(a_r, b_r); if (result) return result; // tie-break using the rank itself return (int)a_r - (int)b_r; } // Compute XRC domain mebership // Return size of shared memory required for its management extern size_t gasnetc_xrc_preinit(const uint16_t *remote_lids) { // Map the xrc domains, where each is a unique (supernode, lids[]) tuple // We cannot map by just lids[] due to GASNET_SUPERNODE_MAX (or GASNETI_PSHM_MAX_NODES) // We don't form the actual keys in memory, and instead just permute an array of ranks gasnetc_xrc_remote_lids = remote_lids; gex_Rank_t *map = gasneti_malloc(gasneti_nodes * sizeof(gex_Rank_t)); for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) map[i] = i; qsort(map, gasneti_nodes, sizeof(gex_Rank_t), _gasnetc_xrc_compare_fn); // Allocate gasnetc_xrcd_map[], which is mapping from rank to a global // xrc domain number, used to index into gasnetc_xrc_snd_qp[]. // This will move to shared memory after PSHM has been initialized if (!gasneti_mysupernode.node_rank) { gasnetc_xrcd_map = gasneti_malloc(gasneti_nodes * sizeof(*gasnetc_xrcd_map)); } // Make a single pass over the sorted array to do the following: // + populate gasnetc_xrcd_map[] (one per supernode) // + count the number of xrc domains (distinct keys) globally // + count the number of xrc domains local to this supernode // + find which of the local xrc domains I belong to // + determine if I am the leader (lowest ranked member) of my xrc domain // Use the _gasnetc_xrc_compare_keys() for sanity gasnetc_xrcd_global_count = 0; gasnetc_xrcd_local_count = 0; gasnetc_xrcd_iam_leader = 0; for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) { gex_Rank_t curr = map[i]; if (!i || _gasnetc_xrc_compare_keys(curr, map[i-1])) { // First instance of this key ++gasnetc_xrcd_global_count; if (gasneti_node2supernode(curr) == gasneti_mysupernode.grp_rank) { // in local supernode ++gasnetc_xrcd_local_count; } if (curr == gasneti_mynode) { gasnetc_xrcd_iam_leader = 1; } } if (curr == gasneti_mynode) { gasnetc_xrcd_local_rank = gasnetc_xrcd_local_count - 1; } if (gasnetc_xrcd_map) { gasnetc_xrcd_map[curr] = gasnetc_xrcd_global_count - 1; } } gasneti_free(map); // Do we have the simple case of one XRC domain per supernode? gasnetc_xrcd_simple = (gasnetc_xrcd_global_count == gasneti_mysupernode.grp_count); if (gasnetc_xrcd_simple) { gasneti_assert_int(gasnetc_xrcd_local_rank ,==, 0); gasneti_assert_int(gasnetc_xrcd_local_count ,==, 1); if (gasnetc_xrcd_map) { gasneti_free(gasnetc_xrcd_map); gasnetc_xrcd_map = NULL; } } GASNETI_TRACE_PRINTF(I, ("Identified %d XRC domains globaly%s", gasnetc_xrcd_global_count, gasnetc_xrcd_simple?", one per supernode (simple case)":"")); GASNETI_TRACE_PRINTF(I, ("I am %s of XRC domain %d of %d within my supernode", gasnetc_xrcd_iam_leader?"the leader":"a member", gasnetc_xrcd_local_rank, gasnetc_xrcd_local_count)); // *May* need a single gasnetc_xrcd_map[]... size_t xrcd_map_bytes = gasnetc_xrcd_simple ? 0 : (gasneti_nodes * sizeof(*gasnetc_xrcd_map)); // ... plus a full gasnetc_xrc_rcv_qpn[] per local xrc domain... size_t xrc_rcv_qpn_bytes = gasneti_nodes * gasnetc_alloc_qps * sizeof(uint32_t); // .. and we cache pad each return GASNETI_ALIGNUP(xrcd_map_bytes, GASNETI_CACHE_LINE_BYTES) + GASNETI_ALIGNUP(xrc_rcv_qpn_bytes * gasnetc_xrcd_local_count, GASNETI_CACHE_LINE_BYTES); } /* Create an XRC domain per HCA and a shared RCV QPN table */ /* XXX: Requires that the call is collective */ extern int gasnetc_xrc_init(void **shared_mem_p) { const uint16_t mylid = gasnetc_port_tbl[0].port.lid; char *filename[GASNETC_IB_MAX_HCAS]; int index, fd; if (! gasnetc_xrcd_simple) { // We lack 1-to-1 correspondence between supernode and XRC domains, // but at least we can share a single gasnetc_xrcd_map[] per supernode. size_t xrcd_map_bytes = gasneti_nodes * sizeof(*gasnetc_xrcd_map); if (gasnetc_xrcd_map) { // built once per supernode in preinit GASNETI_MEMCPY(*shared_mem_p, gasnetc_xrcd_map, xrcd_map_bytes); gasneti_free(gasnetc_xrcd_map); } gasnetc_xrcd_map = *shared_mem_p; *shared_mem_p = (void *)GASNETI_ALIGNUP((uintptr_t)(*shared_mem_p) + xrcd_map_bytes, GASNETI_CACHE_LINE_BYTES); } /* Use per-supernode filename to create common XRC domain once per HCA */ GASNETC_FOR_ALL_HCA_INDEX(index) { gasnetc_hca_t *hca = &gasnetc_hca[index]; filename[index] = gasnetc_xrc_tmpname(mylid, index, gasnetc_xrcd_local_rank); fd = open(filename[index], O_CREAT, S_IWUSR|S_IRUSR); if (fd < 0) { gasneti_fatalerror("failed to create xrc domain file '%s': %d:%s", filename[index], errno, strerror(errno)); } #if GASNETC_IBV_XRC_OFED { struct ibv_xrcd_init_attr xrcd_attr; memset(&xrcd_attr, 0, sizeof(struct ibv_xrcd_init_attr)); xrcd_attr.comp_mask = IBV_XRCD_INIT_ATTR_FD | IBV_XRCD_INIT_ATTR_OFLAGS; xrcd_attr.fd = fd; xrcd_attr.oflags = O_CREAT; hca->xrc_domain = ibv_open_xrcd(hca->handle, &xrcd_attr); } #elif GASNETC_IBV_XRC_MLNX hca->xrc_domain = ibv_open_xrc_domain(hca->handle, fd, O_CREAT); #endif if (!hca->xrc_domain && errno == ENOSYS) { gasneti_fatalerror("Unable to create an XRC domain. " "Please see \"Lack of XRC support\" under Known Problems in GASNet's README-ibv."); } GASNETC_IBV_CHECK_PTR(hca->xrc_domain, "from ibv_open_xrc_domain()" GASNETC_XRC_HELP_MSG); (void) close(fd); } /* Place RCV QPN table in shared memory at per-domain offset */ uint32_t *xrc_shared_mem = *shared_mem_p; size_t domain_elems = gasneti_nodes * gasnetc_alloc_qps; gasnetc_xrc_rcv_qpn = xrc_shared_mem + (gasnetc_xrcd_local_rank * domain_elems); if (gasnetc_xrcd_iam_leader) { gasneti_pshm_prefault(gasnetc_xrc_rcv_qpn, domain_elems * sizeof(uint32_t)); } size_t total_elems = gasnetc_xrcd_local_count * domain_elems; *shared_mem_p = (void *)GASNETI_ALIGNUP(xrc_shared_mem + total_elems, GASNETI_CACHE_LINE_BYTES); /* Clean up once everyone is done w/ all files, and RCV QPN table is prefaulted */ gasneti_pshmnet_bootstrapBarrier(); GASNETC_FOR_ALL_HCA_INDEX(index) { (void)unlink(filename[index]); gasneti_free(filename[index]); } /* Allocate SND QP table */ gasnetc_xrc_snd_qp = gasneti_calloc(gasnetc_xrcd_global_count * gasnetc_alloc_qps, sizeof(gasnetc_xrc_snd_qp_t)); gasneti_leak(gasnetc_xrc_snd_qp); return GASNET_OK; } #endif /* GASNETC_IBV_XRC */ /* Distribute the qps to each peer round-robin over the ports. Returns NULL for cases that should not have any connection */ static const gasnetc_port_info_t * gasnetc_select_port(gex_Rank_t node, int qpi) { if (GASNETC_QPI_IS_REQ(qpi)) { /* Second half of table (if any) duplicates first half. */ qpi -= gasnetc_num_qps; } /* XXX: At some point we lost any attempt at true "round-robin" * that could have balanced port use when (num_qps % num_ports) != 0. * The problem there was that getting a distribution that both ends * agreed to was a big mess. Perhaps we bring that idea back later. * However, for now the same sequence of gasnetc_num_qps values is * repeated for each node. * XXX: If this changes, gasnetc_sndrcv_limits() must change to match. */ return &gasnetc_port_tbl[qpi % gasnetc_num_ports]; } /* Setup ports array for one node */ static int gasnetc_setup_ports(gasnetc_conn_info_t *conn_info) { static const gasnetc_port_info_t **ports = NULL; if_pf (!ports) { /* Distribute the qps over the ports, same for each node. */ int qpi; ports = gasneti_malloc(gasnetc_alloc_qps * sizeof(gasnetc_port_info_t *)); gasneti_leak(ports); for (qpi = 0; qpi < gasnetc_num_qps; ++qpi) { ports[qpi] = gasnetc_select_port(conn_info->node, qpi); #if GASNETC_IBV_SRQ if (gasnetc_use_srq) { /* Second half of table (if any) duplicates first half. This might NOT be the same as extending the loop */ ports[qpi + gasnetc_num_qps] = ports[qpi]; } #endif } } conn_info->port = ports; return GASNET_OK; } /* Create and destroy QPs to determine the inline data limit */ static void gasnetc_check_inline_limit(int port_num, int send_wr) { const gasnetc_port_info_t *port = &gasnetc_port_tbl[port_num]; gasnetc_hca_t *hca = &gasnetc_hca[port->hca_index]; struct ibv_qp * qp_handle; { gasnetc_qp_init_attr_t qp_init_attr; memset(&qp_init_attr, 0, sizeof(qp_init_attr)); qp_init_attr.cap.max_send_wr = send_wr; qp_init_attr.cap.max_recv_wr = gasnetc_use_srq ? 0 : gasnetc_am_oust_pp * 2; qp_init_attr.cap.max_send_sge = GASNETC_MAX_SEND_SGE; qp_init_attr.cap.max_recv_sge = 1; qp_init_attr.qp_context = NULL; /* XXX: Can/should we use this? */ #if HAVE_IBV_CREATE_QP_EX qp_init_attr.qp_type = gasnetc_use_xrc ? IBV_QPT_XRC_SEND : IBV_QPT_RC; qp_init_attr.comp_mask = IBV_QP_INIT_ATTR_PD; qp_init_attr.pd = hca->pd; #else qp_init_attr.qp_type = gasnetc_use_xrc ? IBV_QPT_XRC : IBV_QPT_RC; #endif qp_init_attr.sq_sig_all = !GASNETC_USE_SEND_SIGNALLED; qp_init_attr.srq = NULL; /* Should not influence inline data */ qp_init_attr.send_cq = hca->snd_cq; qp_init_attr.recv_cq = hca->rcv_cq; #if GASNETC_IBV_XRC_MLNX if (gasnetc_use_xrc) { qp_init_attr.xrc_domain = hca->xrc_domain; } #endif /* TODO: Binary search? */ while (1) { /* No query for max_inline_data limit */ qp_init_attr.cap.max_inline_data = gasnetc_inline_limit; errno = 0; qp_handle = gasnetc_create_qp(hca, &qp_init_attr); if (qp_handle != NULL) break; if (qp_init_attr.cap.max_inline_data == -1) { /* Automatic max not working, fall back on manual search */ gasnetc_inline_limit = 1024; continue; } if ((errno && errno != EINVAL) || (gasnetc_inline_limit == 0)) { gasneti_fatalerror("failed gasnetc_create_qp(inline probe) with errno=%d at gasnetc_inline_limit=%d", errno, (int)gasnetc_inline_limit); /* NOT REACHED */ } gasnetc_inline_limit = MIN(1024, gasnetc_inline_limit - 1); /* Try again */ } if (qp_init_attr.cap.max_inline_data < gasnetc_inline_limit) { /* Use returned value, which might be zero */ gasnetc_inline_limit = qp_init_attr.cap.max_inline_data; } (void) ibv_destroy_qp(qp_handle); } } /* Create endpoint(s) for a given peer * Outputs the qpn values in the array provided. */ static int gasnetc_qp_create(gasnetc_conn_info_t *conn_info) { gasnetc_cep_t *cep; int qpi; gasnetc_qp_init_attr_t qp_init_attr; const int max_recv_wr = gasnetc_use_srq ? 0 : gasnetc_am_oust_pp * 2; int max_send_wr = gasnetc_op_oust_pp; #if GASNETC_IBV_XRC const gex_Rank_t node = conn_info->node; gasnetc_xrc_snd_qp_t *xrc_snd_qp = GASNETC_NODE2SND_QP(node); #endif qp_init_attr.cap.max_inline_data = gasnetc_inline_limit; qp_init_attr.cap.max_send_wr = max_send_wr; qp_init_attr.cap.max_recv_wr = max_recv_wr; qp_init_attr.cap.max_send_sge = GASNETC_MAX_SEND_SGE; qp_init_attr.cap.max_recv_sge = 1; qp_init_attr.qp_context = NULL; /* XXX: Can/should we use this? */ #if HAVE_IBV_CREATE_QP_EX qp_init_attr.qp_type = gasnetc_use_xrc ? IBV_QPT_XRC_SEND : IBV_QPT_RC; qp_init_attr.comp_mask = IBV_QP_INIT_ATTR_PD; #else qp_init_attr.qp_type = gasnetc_use_xrc ? IBV_QPT_XRC : IBV_QPT_RC; #endif qp_init_attr.sq_sig_all = !GASNETC_USE_SEND_SIGNALLED; qp_init_attr.srq = NULL; GASNETC_FOR_EACH_QPI(conn_info, qpi, cep) { struct ibv_qp * hndl; const gasnetc_port_info_t *port = conn_info->port[qpi]; gasnetc_hca_t *hca = &gasnetc_hca[port->hca_index]; cep->hca = hca; #if GASNETC_IB_MAX_HCAS > 1 cep->hca_index = hca->hca_index; #endif cep->sq_sema_p = &gasnetc_zero_sema; #if HAVE_IBV_CREATE_QP_EX qp_init_attr.pd = hca->pd; #endif qp_init_attr.send_cq = hca->snd_cq; qp_init_attr.recv_cq = hca->rcv_cq; #if GASNETC_IBV_SRQ if (gasnetc_use_srq) { if (GASNETC_QPI_IS_REQ(qpi)) { qp_init_attr.srq = hca->rqst_srq; qp_init_attr.cap.max_send_wr = gasnetc_am_oust_pp; qp_init_attr.cap.max_send_sge = GASNETC_MAX_SEND_SGE; } else { qp_init_attr.srq = hca->repl_srq; qp_init_attr.cap.max_send_wr = gasnetc_op_oust_pp; qp_init_attr.cap.max_send_sge = GASNETC_MAX_SEND_SGE; } cep->srq = qp_init_attr.srq; max_send_wr = qp_init_attr.cap.max_send_wr; } #endif #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { gasnetc_xrc_create_qp(cep, node, qpi); hndl = xrc_snd_qp[qpi].handle; if (hndl) { /* per-supernode QP was already created - just reference it */ goto finish; } #if GASNETC_IBV_XRC_MLNX qp_init_attr.xrc_domain = hca->xrc_domain; #endif qp_init_attr.srq = NULL; } #endif hndl = gasnetc_create_qp(hca, &qp_init_attr); GASNETC_IBV_CHECK_PTR(hndl, "from gasnetc_create_qp()"); gasneti_assert(qp_init_attr.cap.max_recv_wr >= max_recv_wr); gasneti_assert(qp_init_attr.cap.max_send_wr >= max_send_wr); gasneti_assert(qp_init_attr.cap.max_inline_data >= gasnetc_inline_limit); #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { xrc_snd_qp[qpi].handle = hndl; xrc_snd_qp[qpi].state = IBV_QPS_RESET; } finish: cep->rcv_qpn = gasnetc_use_xrc ? conn_info->local_xrc_qpn[qpi] : hndl->qp_num; #elif GASNETC_IBV_SRQ cep->rcv_qpn = hndl->qp_num; #endif cep->qp_handle = hndl; conn_info->local_qpn[qpi] = hndl->qp_num; } return GASNET_OK; } /* create */ /* Advance QP state from RESET to INIT */ static int gasnetc_qp_reset2init(gasnetc_conn_info_t *conn_info, int active) { const gex_Rank_t node = conn_info->node; struct ibv_qp_attr qp_attr; enum ibv_qp_attr_mask qp_mask; gasnetc_cep_t *cep; int qpi; int rc; const enum ibv_access_flags qp_access_flags = (enum ibv_access_flags)(IBV_ACCESS_REMOTE_WRITE | IBV_ACCESS_REMOTE_READ | IBV_ACCESS_REMOTE_ATOMIC); #if GASNETC_IBV_XRC gasnetc_xrc_snd_qp_t *xrc_snd_qp = GASNETC_NODE2SND_QP(node); #endif qp_mask = (enum ibv_qp_attr_mask)(IBV_QP_STATE | IBV_QP_PKEY_INDEX | IBV_QP_PORT | IBV_QP_ACCESS_FLAGS); qp_attr.qp_state = IBV_QPS_INIT; qp_attr.qp_access_flags = qp_access_flags; GASNETC_FOR_EACH_QPI(conn_info, qpi, cep) { const gasnetc_port_info_t *port = conn_info->port[qpi]; #if GASNETC_IBV_SRQ qp_attr.qp_access_flags = qp_access_flags ^ (GASNETC_QPI_IS_REQ(qpi) ? IBV_ACCESS_REMOTE_READ : 0); #endif qp_attr.port_num = port->port_num; qp_attr.pkey_index = port->pkey_index; #if GASNETC_IBV_XRC if (gasnetc_use_xrc && active) { rc = gasnetc_xrc_modify_qp(cep, &qp_attr, qp_mask); GASNETC_IBV_CHECK(rc, "from gasnetc_xrc_modify_qp(INIT)" GASNETC_XRC_HELP_MSG); } #endif if (GASNETC_SND_QP_NEEDS_MODIFY(xrc_snd_qp[qpi], IBV_QPS_INIT)) { rc = ibv_modify_qp(cep->qp_handle, &qp_attr, qp_mask); GASNETC_IBV_CHECK(rc, "from ibv_modify_qp(INIT)"); #if GASNETC_IBV_XRC if (gasnetc_use_xrc) xrc_snd_qp[qpi].state = IBV_QPS_INIT; #endif } } gasnetc_sndrcv_init_peer(node, conn_info->cep); return GASNET_OK; } /* reset2init */ /* Advance QP state from INIT to RTR */ static int gasnetc_qp_init2rtr(gasnetc_conn_info_t *conn_info, int active) { const gex_Rank_t node = conn_info->node; struct ibv_qp_attr qp_attr; enum ibv_qp_attr_mask qp_mask; gasnetc_cep_t *cep; int qpi; int rc; #if GASNETC_IBV_XRC gasnetc_xrc_snd_qp_t *xrc_snd_qp = GASNETC_NODE2SND_QP(node); #endif qp_mask = (enum ibv_qp_attr_mask)(IBV_QP_STATE | IBV_QP_AV | IBV_QP_PATH_MTU | IBV_QP_RQ_PSN | IBV_QP_MAX_DEST_RD_ATOMIC | IBV_QP_DEST_QPN | IBV_QP_MIN_RNR_TIMER); qp_attr.qp_state = IBV_QPS_RTR; qp_attr.ah_attr.sl = 0; qp_attr.ah_attr.is_global = 0; qp_attr.ah_attr.static_rate = GASNETC_QP_STATIC_RATE; qp_attr.ah_attr.src_path_bits = 0; qp_attr.min_rnr_timer = GASNETC_QP_MIN_RNR_TIMER; GASNETC_FOR_EACH_QPI(conn_info, qpi, cep) { const gasnetc_port_info_t *port = conn_info->port[qpi]; qp_attr.max_dest_rd_atomic = port->rd_atom; qp_attr.path_mtu = gasnetc_max_mtu ? MIN(gasnetc_max_mtu, port->port.active_mtu) : port->port.active_mtu; qp_attr.rq_psn = GASNETC_PSN(node, qpi); qp_attr.ah_attr.dlid = port->remote_lids[node]; qp_attr.ah_attr.port_num = port->port_num; qp_attr.dest_qp_num = conn_info->remote_qpn[qpi]; #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { if (active) { rc = gasnetc_xrc_modify_qp(cep, &qp_attr, qp_mask); GASNETC_IBV_CHECK(rc, "from gasnetc_xrc_modify_qp(RTR)" GASNETC_XRC_HELP_MSG); } /* The normal QP will connect, below, to the peer's XRC rcv QP */ qp_attr.dest_qp_num = conn_info->remote_xrc_qpn[qpi]; } #endif if (GASNETC_SND_QP_NEEDS_MODIFY(xrc_snd_qp[qpi], IBV_QPS_RTR)) { rc = ibv_modify_qp(cep->qp_handle, &qp_attr, qp_mask); GASNETC_IBV_CHECK(rc, "from ibv_modify_qp(RTR)"); #if GASNETC_IBV_XRC if (gasnetc_use_xrc) xrc_snd_qp[qpi].state = IBV_QPS_RTR; #endif } } return GASNET_OK; } /* init2rtr */ /* Advance QP state from RTR to RTS */ static int gasnetc_qp_rtr2rts(gasnetc_conn_info_t *conn_info) { struct ibv_qp_attr qp_attr; enum ibv_qp_attr_mask qp_mask; gasnetc_cep_t *cep; int qpi; int rc; #if GASNETC_IBV_XRC const gex_Rank_t node = conn_info->node; gasnetc_xrc_snd_qp_t *xrc_snd_qp = GASNETC_NODE2SND_QP(node); #endif qp_mask = (enum ibv_qp_attr_mask)(IBV_QP_STATE | IBV_QP_SQ_PSN | IBV_QP_TIMEOUT | IBV_QP_RETRY_CNT | IBV_QP_RNR_RETRY | IBV_QP_MAX_QP_RD_ATOMIC); qp_attr.qp_state = IBV_QPS_RTS; qp_attr.timeout = gasnetc_qp_timeout; qp_attr.retry_cnt = gasnetc_qp_retry_count; qp_attr.rnr_retry = GASNETC_QP_RNR_RETRY; GASNETC_FOR_EACH_QPI(conn_info, qpi, cep) { #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { cep->xrc_remote_srq_num = conn_info->xrc_remote_srq_num[qpi]; } #endif if (GASNETC_SND_QP_NEEDS_MODIFY(xrc_snd_qp[qpi], IBV_QPS_RTS)) { const gasnetc_port_info_t *port = conn_info->port[qpi]; qp_attr.sq_psn = GASNETC_PSN(gasneti_mynode, qpi); qp_attr.max_rd_atomic = port->rd_atom; rc = ibv_modify_qp(cep->qp_handle, &qp_attr, qp_mask); GASNETC_IBV_CHECK(rc, "from ibv_modify_qp(RTS)"); #if GASNETC_IBV_XRC if (gasnetc_use_xrc) xrc_snd_qp[qpi].state = IBV_QPS_RTS; #endif } } return GASNET_OK; } /* rtr2rts */ /* Install Send Queue semaphore() */ static int gasnetc_set_sq_sema(gasnetc_conn_info_t *conn_info) { gasnetc_cep_t *cep; int qpi; #if GASNETC_IBV_XRC const gex_Rank_t node = conn_info->node; gasnetc_xrc_snd_qp_t *xrc_snd_qp = GASNETC_NODE2SND_QP(node); #endif GASNETC_FOR_EACH_QPI(conn_info, qpi, cep) { gasnetc_sema_t *sq_sema_p; int max_send_wr = (gasnetc_use_srq && GASNETC_QPI_IS_REQ(qpi)) ? gasnetc_am_oust_pp : gasnetc_op_oust_pp; #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { sq_sema_p = xrc_snd_qp[qpi].sq_sema_p; if (sq_sema_p) goto skip_init; xrc_snd_qp[qpi].sq_sema_p = sq_sema_get(); sq_sema_p = xrc_snd_qp[qpi].sq_sema_p; } else #endif { sq_sema_p = sq_sema_get(); } /* XXX: When could/should we use the *allocated* length? */ gasnetc_sema_init(sq_sema_p, max_send_wr, max_send_wr); #if GASNETC_IBV_XRC skip_init: #endif gasneti_sync_writes(); cep->sq_sema_p = sq_sema_p; } return GASNET_OK; } /* set_qp_sema */ static uint32_t conn_get_srq_num(struct ibv_srq *srq) { uint32_t result = 0; #if GASNETC_IBV_XRC_OFED int rc = ibv_get_srq_num(srq, &result); GASNETC_IBV_CHECK(rc, "from ibv_get_srq_num()" GASNETC_XRC_HELP_MSG); #elif GASNETC_IBV_XRC_MLNX result = srq->xrc_srq_num; #endif return result; } #if GASNETC_DYNAMIC_CONNECT /* ------------------------------------------------------------------------------------ */ /* Support for UD endpoint used for dynamic connection setup */ /* UD recv */ typedef struct { struct ibv_recv_wr wr; struct ibv_sge sg; } gasnetc_ud_rcv_desc_t; /* UD send */ typedef struct { gasnetc_ah_t *ah; /* shared space w/ freelist link ptr */ struct ibv_send_wr wr; struct ibv_sge sg; } gasnetc_ud_snd_desc_t; static uint32_t *conn_remote_ud_qpn = NULL; /* NOT gasnetc_lifo_t, since this is always subject to concurrent access */ static gasneti_lifo_head_t conn_snd_freelist = GASNETI_LIFO_INITIALIZER; #if GASNETC_USE_CONN_THREAD /* NOT gasnetc_sema_t, since this is always subject to concurrent access */ static gasneti_semaphore_t conn_ud_sema; static gasneti_semaphore_t *conn_ud_sema_p = &conn_ud_sema; #define conn_sema_up gasneti_semaphore_up #define conn_sema_trydown gasneti_semaphore_trydown #define conn_sema_partial gasneti_semaphore_trydown_partial #else static gasnetc_sema_t *conn_ud_sema_p = NULL; #define conn_sema_up gasnetc_sema_up #define conn_sema_trydown gasnetc_sema_trydown #define conn_sema_partial gasnetc_sema_trydown_partial #endif /* TODO: group the following into a UD-endpoint struct */ static struct ibv_qp * conn_ud_qp = NULL; static gasnetc_memreg_t conn_ud_reg; static gasnetc_port_info_t *conn_ud_port = NULL; static gasnetc_hca_t *conn_ud_hca = NULL; static int conn_ud_msg_sz = -1; #if GASNETC_USE_CONN_THREAD static gasnetc_progress_thread_t conn_thread; static struct ibv_cq * conn_ud_snd_cq = NULL; static struct ibv_cq * conn_ud_rcv_cq = NULL; static int conn_snd_poll(void); #else /* GASNETC_USE_CONN_THREAD */ # define conn_snd_poll() gasnetc_sndrcv_poll(1) #endif #define GASNETC_GRH_SIZE 40 /* Global Route Header is always 40 bytes */ /* TODO: If this continues to be a performance bottleneck then * consider cacheing since the AH is per Destination LID (the * target HCA's equivalent of a "MAC"), rather than per process. * Therefore reuse is possible w/ SMP/multi-core nodes. */ static gasnetc_ah_t * gasnetc_create_ah(gex_Rank_t node) { struct ibv_ah_attr ah_attr; gasnetc_ah_t *result; result = gasneti_calloc(1, sizeof(gasnetc_ah_t)); gasneti_atomic_set(&result->ref_count, 1, 0); { ah_attr.is_global = 0; ah_attr.sl = 0; ah_attr.src_path_bits = 0; ah_attr.dlid = conn_ud_port->remote_lids[node]; ah_attr.port_num = conn_ud_port->port_num; result->ib_ah = ibv_create_ah(conn_ud_hca->pd, &ah_attr); GASNETC_IBV_CHECK_PTR(result, "from ibv_create_ah()"); } return result; } static void gasnetc_put_ah(gasnetc_ah_t *ah) { if (gasneti_atomic_decrement_and_test(&ah->ref_count, 0)) { int vstat = ibv_destroy_ah(ah->ib_ah); GASNETC_IBV_CHECK(vstat, "from ibv__destroy_ah()"); gasneti_free(ah); } } /* Post a work request to the receive queue of the UD QP */ static void gasnetc_rcv_post_ud(gasnetc_ud_rcv_desc_t *desc) { int vstat; { struct ibv_recv_wr *bad_wr; vstat = ibv_post_recv(conn_ud_qp, &desc->wr, &bad_wr); } GASNETC_IBV_CHECK(vstat, "while posting a UD receive work request"); } /* Post a work request to the send queue of the UD QP */ static void gasnetc_snd_post_ud(gasnetc_ud_snd_desc_t *desc, gasnetc_ah_t *ah, gex_Rank_t node) { struct ibv_send_wr *wr = &desc->wr; int vstat; if (NULL == ah) { ah = gasnetc_create_ah(node); } else { gasneti_atomic_increment(&ah->ref_count, 0); } desc->ah = ah; // Loop until space is available for 1 new entry on the CQ. GASNETI_SPIN_UNTIL_TRACE(conn_sema_trydown(conn_ud_sema_p), C, CONN_STALL_CQ, conn_snd_poll()); { struct ibv_send_wr *bad_wr; wr->wr.ud.remote_qpn = conn_remote_ud_qpn[node]; wr->wr.ud.ah = ah->ib_ah; vstat = ibv_post_send(conn_ud_qp, wr, &bad_wr); } GASNETC_IBV_CHECK(vstat, "while posting a UD send work request"); } /* ------------------------------------------------------------------------------------ */ /* Sketch of the connection progress engine state space. * * [NONE] * | * v * +---------+---------+ * | | * v | * (send REQ) | * [REQ_SENT]----+ | * | | | * | v | * | (*recv REQ) v * v | (recv REP) * (recv REP) | (send REP) * [REP_RCVD]<---+---->[REP_SENT] * | | * v | * (send RTU) | * [RTU_SENT] v * | (recv RTU) * v (send ACK) * (recv ACK) | * [ACK_RCVD] | * | | * v v * +---------+---------+ * Key: | * (foo) = Comm. events v * [FOO] = States [DONE] * * * *: When both peers begin by sending a REQ, we have the "ACTIVE-ACTIVE" case. * This is resolved by BOTH peers treating one of the REQs as if it were a REP * instead (they carry the same payload). So, when a REQ is received in the * REQ_SENT state, one peer will move to REP_SENT and the other to REP_RCVD * (selected deterministically and without additional communication). * * If a message is lost then a resend will occur without a state change. * The following are the resends and are NOT depicted in the diagram above: * + Timer expires in REQ_SENT state - resend the REQ msg * + Timer expires in RTU_SENT state - resend the RTU msg * + REQ recvd in the REP_SENT state - resend the REP msg * + RTU recvd in the DONE state - resend the ACK msg * + REQ recvd in the RTU_SENT state - resend the REQ msg * The last one (recv REQ in RTU_SENT resends REQ) could use some explanation: * In this case because we are receiving REQ (rather than REP) from our peer, * we know that we are in the ACTIVE-ACTIVE case and we can reason that the * peer may not realize this yet (the other option is that this REQ is just * late). If our peer never received our REQ then it cannot move forward * without the data contained in a REQ or REP. So, the resolution is to * resend our REQ. * * GASNet-level state transitions: * + On the ACTIVE side the GASNet-level CEP is installed in the NODE2CEP * table on the transition to GASNETC_CONN_STATE_RTU_SENT, but it in a * receive-only state (Send Queue semaphore is zero). * + The ACTIVE peer transitions to the full send-and-receive state when * it receives the ACK that ensures the PASSIVE peer is ready to receive. * + The PASSIVE peer installs the CEP in the NODE2CEP table with full * capability to both send and receive when it receives the RTU, which * indicates the ACTIVE peer is ready to receive. * * Note that it is possible that due to multi-threading or packet loss an * AM sent from the PASSIVE peer to the ACTIVE one could arrive after the * ACTIVE peer has sent RTU, but before it has received the ACK. In this * case (and ONLY this case) it is possible for the ACTIVE peer to find * itself needing to send (an AMReply) even though the Send Queue semaphore * is zero! Fortunately, this case is easily detected in the code that * deals with the failed semaphore_try_down() and is already outside the * normal "fast path". The function gasnetc_conn_implied_ack() is called * to perform the work that would otherwise have been done when the * poll loop in the ACTIVE peer notices the ACK. */ typedef enum { /* State valid for both the ACTIVE and PASSIVE peer: */ GASNETC_CONN_STATE_NONE = 0, /* Newly created ACTIVE or PASSIVE */ /* States valid only for ACTIVE peer: */ GASNETC_CONN_STATE_REQ_SENT, /* Have sent REQ and am waiting for REP */ GASNETC_CONN_STATE_REP_RCVD, /* Have received REP but have not yet acted on it */ GASNETC_CONN_STATE_RTU_SENT, /* Have sent RTU and am waiting for ACK */ GASNETC_CONN_STATE_ACK_RCVD, /* Have received ACK but have not yet acted on it */ /* States valid only for PASIVE peer: */ GASNETC_CONN_STATE_REP_SENT, /* Have sent REP and am waiting for RTU */ /* State valid for both the ACTIVE and PASSIVE peer: */ GASNETC_CONN_STATE_DONE /* Have reached RTS - connection is ready */ } gasnetc_conn_state_t; typedef struct gasnetc_conn_s { struct gasnetc_conn_s *next, *prev; volatile gasnetc_conn_state_t state; gasnetc_conn_info_t info; gasnetc_ah_t *ah; gasneti_tick_t xmit_time; gasneti_tick_t reply_time; #if GASNETC_CONN_USE_SRTT int valid_rtt; #endif #if GASNETI_STATS_OR_TRACE gasneti_tick_t start_time; int start_active; #endif int ref_count; } gasnetc_conn_t; typedef enum { GASNETC_CONN_CMD_REQ = 1, GASNETC_CONN_CMD_REP, GASNETC_CONN_CMD_RTU, GASNETC_CONN_CMD_ACK } gasnetc_conn_cmd_t; #define GASNETC_CONN_CMD_MASK 0x0f #define GASNETC_CONN_IS_ORIG 0x10 static gasnetc_ud_snd_desc_t * conn_get_snd_desc(uint32_t flags) { gasnetc_ud_snd_desc_t *desc; GASNETI_SPIN_UNTIL_TRACE((desc = gasneti_lifo_pop(&conn_snd_freelist)), C, CONN_STALL_DESC, conn_snd_poll()); desc->wr.imm_data = flags | (gasneti_mynode << 16); return desc; } static void conn_send_data(gasnetc_conn_t *conn, uint32_t flags) { gasnetc_conn_info_t *conn_info = &conn->info; gasnetc_ud_snd_desc_t *desc = conn_get_snd_desc(flags); void *buf = (void *)(uintptr_t)desc->sg.addr; #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { gasnetc_xrc_conn_data_t *data = (gasnetc_xrc_conn_data_t *)buf; int qpi; for (qpi = 0; qpi < gasnetc_alloc_qps; ++qpi) { gasnetc_hca_t *hca = conn_info->cep[qpi].hca; struct ibv_srq *srq = GASNETC_QPI_IS_REQ(qpi) ? hca->rqst_srq : hca->repl_srq; data[qpi].srq_num = conn_get_srq_num(srq); data[qpi].xrc_qpn = conn_info->local_xrc_qpn[qpi]; data[qpi].qpn = conn_info->local_qpn[qpi]; } } else #endif { GASNETI_MEMCPY(buf, conn_info->local_qpn, conn_ud_msg_sz); } desc->sg.length = conn_ud_msg_sz; gasnetc_snd_post_ud(desc, conn->ah, conn_info->node); } static void conn_send_empty(gasnetc_ah_t *ah, gex_Rank_t node, uint32_t flags) { gasnetc_ud_snd_desc_t *desc = conn_get_snd_desc(flags); desc->sg.length = GASNETC_ALLOW_0BYTE_MSG ? 0 : 1; gasnetc_snd_post_ud(desc, ah, node); } #if GASNETC_USE_CONN_THREAD static int conn_snd_poll(void) { struct ibv_wc comp; int rc; rc = ibv_poll_cq(conn_ud_snd_cq, 1, &comp); if (rc == 1) { if_pf (comp.status != IBV_WC_SUCCESS) { gasneti_fatalerror("failed dynamic connection send work request"); } else if_pf(comp.opcode != IBV_WC_SEND) { gasneti_fatalerror("invalid dynamic connection send work completion"); } gasnetc_conn_snd_wc(&comp); return 1; } else if (GASNETC_IS_EXITING()) { /* shutdown in another thread */ } else if (rc != 0) { gasneti_fatalerror("failed dynamic connection send cq poll"); } return 0; } static void gasnetc_conn_thread(struct ibv_wc *comp_p, void *arg /* unused */) { gasneti_assert((comp_p->opcode == IBV_WC_RECV) || (comp_p->status != IBV_WC_SUCCESS)); if_pf (comp_p->status != IBV_WC_SUCCESS) { gasneti_fatalerror("aborting on reap of failed UD recv"); } gasnetc_conn_rcv_wc(comp_p); } #endif /* GASNETC_USE_CONN_THREAD */ /* ------------------------------------------------------------------------------------ */ /* Create UD QP and advance all the way to RTS */ static int gasnetc_qp_setup_ud(gasnetc_port_info_t *port, int fully_connected) { uint32_t gasnetc_conn_qpn = 0; struct ibv_qp_attr qp_attr; enum ibv_qp_attr_mask qp_mask; struct ibv_cq *send_cq, *recv_cq; uint32_t my_qkey = 0; uintptr_t addr; int rc; const int max_recv_wr = gasnetc_ud_rcvs; const int max_send_wr = gasnetc_ud_snds; #if GASNETC_IBV_XRC const int send_sz = gasnetc_alloc_qps * (gasnetc_use_xrc ? sizeof(gasnetc_xrc_conn_data_t) : sizeof(uint32_t)); #else const int send_sz = gasnetc_alloc_qps * sizeof(uint32_t); #endif #if 0 /* XXX: This is the correct value. */ const int recv_sz = send_sz + GASNETC_GRH_SIZE; /* recv size sees 40-byte GRH */ #else /* XXX: For unknown reason InfiniPath may need 4 EXTRA bytes or rcvr will drop. */ const int recv_sz = 4 + send_sz + GASNETC_GRH_SIZE; /* recv size sees 40-byte GRH */ #endif /* If this node is fully connected, just participate in the qpn Exchange, * but don't allocate any resources for the UD communications. */ if (fully_connected) { uint32_t *tmp = gasneti_malloc(gasneti_nodes * sizeof(uint32_t)); gasneti_assert(gasnetc_conn_qpn == 0); gasneti_bootstrapExchange(&gasnetc_conn_qpn, sizeof(gasnetc_conn_qpn), tmp); gasneti_free(tmp); return GASNET_OK; } /* Record frequently needed paramaters */ conn_ud_port = port; conn_ud_hca = &gasnetc_hca[port->hca_index]; conn_ud_msg_sz = send_sz; /* SETUP CONN THREAD */ #if !GASNETC_USE_CONN_THREAD /* nothing special to do here */ send_cq = conn_ud_hca->snd_cq; recv_cq = conn_ud_hca->rcv_cq; conn_ud_sema_p = conn_ud_hca->snd_cq_sema_p; #else { int cq_sz; /* Create CQ for UD recvs, configured for blocking completions */ rc = gasnetc_create_cq(conn_ud_hca->handle, gasnetc_ud_rcvs, &conn_ud_rcv_cq, &cq_sz, &conn_thread); GASNETC_IBV_CHECK(rc, "from gasnetc_create_cq(conn_rcv)"); /* Create CQ for UD sends */ rc = gasnetc_create_cq(conn_ud_hca->handle, gasnetc_ud_snds, &conn_ud_snd_cq, &cq_sz, NULL); GASNETC_IBV_CHECK(rc, "from gasnetc_create_cq(conn_snd)"); /* Spawn the thread */ conn_thread.fn = gasnetc_conn_thread; conn_thread.fn_arg = NULL; gasnetc_spawn_progress_thread(&conn_thread); } send_cq = conn_ud_snd_cq; recv_cq = conn_ud_rcv_cq; gasneti_semaphore_init(conn_ud_sema_p, gasnetc_ud_snds, gasnetc_ud_snds); #endif /* CREATE */ { struct ibv_qp_init_attr qp_init_attr; qp_init_attr.cap.max_send_wr = max_send_wr; qp_init_attr.cap.max_recv_wr = max_recv_wr; qp_init_attr.cap.max_send_sge = 1; qp_init_attr.cap.max_recv_sge = 1; qp_init_attr.qp_context = NULL; qp_init_attr.qp_type = IBV_QPT_UD; qp_init_attr.sq_sig_all = 1; qp_init_attr.srq = NULL; qp_init_attr.send_cq = send_cq; qp_init_attr.recv_cq = recv_cq; qp_init_attr.cap.max_inline_data = 0; conn_ud_qp = ibv_create_qp(conn_ud_hca->pd, &qp_init_attr); if_pf (NULL == conn_ud_qp) return GASNET_ERR_RESOURCE; gasnetc_conn_qpn = conn_ud_qp->qp_num; } /* Exchange the qpns */ if (NULL == conn_remote_ud_qpn) { conn_remote_ud_qpn = gasneti_malloc(gasneti_nodes * sizeof(uint32_t)); gasneti_leak(conn_remote_ud_qpn); } gasneti_bootstrapExchange(&gasnetc_conn_qpn, sizeof(gasnetc_conn_qpn), conn_remote_ud_qpn); /* Generate a per-job QKey from the qpns. * This value is "unpredictable" but might not be unique. In fact, * consecutive runs on the same nodes can produce the same value. * TODO: Is there some info already available to make this more unique? */ { uint64_t csum = gasneti_checksum(conn_remote_ud_qpn, gasneti_nodes * sizeof(uint32_t)); my_qkey = ((GASNETI_LOWORD(csum) << 5) | (GASNETI_LOWORD(csum) >> 27)) ^ GASNETI_HIWORD(csum); } /* Allocate pinned memory */ { const size_t size = GASNETI_PAGE_ALIGNUP((max_send_wr * send_sz) + /* XXX: Omit send if inline */ (max_recv_wr * recv_sz)); void *buf = gasnetc_mmap(size); if_pf (GASNETC_MMAP_FAILED == buf) { gasneti_fatalerror("Failed to allocate memory for dynamic connection setup"); } rc = gasnetc_pin(conn_ud_hca, buf, size, IBV_ACCESS_LOCAL_WRITE, &conn_ud_reg); GASNETC_IBV_CHECK(rc, "while pinning memory for dynamic connection setup"); addr = (uintptr_t)buf; } /* RESET -> INIT */ qp_mask = (enum ibv_qp_attr_mask)(IBV_QP_STATE | IBV_QP_PKEY_INDEX | IBV_QP_PORT | IBV_QP_QKEY); qp_attr.qp_state = IBV_QPS_INIT; qp_attr.pkey_index = port->pkey_index; qp_attr.qkey = my_qkey; qp_attr.port_num = port->port_num; rc = ibv_modify_qp(conn_ud_qp, &qp_attr, qp_mask); GASNETC_IBV_CHECK(rc, "from ibv_modify_qp(UD INIT)"); /* Post RCVs */ { static gasnetc_ud_rcv_desc_t *desc; int i; if (NULL == desc) { desc = gasneti_calloc(max_recv_wr, sizeof(gasnetc_ud_rcv_desc_t)); gasneti_leak(desc); } for (i = 0; i < max_recv_wr; ++i, ++desc, addr += recv_sz) { desc->wr.num_sge = 1; desc->wr.sg_list = &desc->sg; desc->wr.wr_id = 1 | (uintptr_t)desc; /* CQE will point back to this request */ desc->wr.next = NULL; desc->sg.length = recv_sz; desc->sg.addr = addr; desc->sg.lkey = conn_ud_reg.handle->lkey; gasnetc_rcv_post_ud(desc); } desc -= max_recv_wr; } /* INIT -> RTR */ qp_mask = IBV_QP_STATE; qp_attr.qp_state = IBV_QPS_RTR; rc = ibv_modify_qp(conn_ud_qp, &qp_attr, qp_mask); GASNETC_IBV_CHECK(rc, "from ibv_modify_qp(UD RTR)"); /* RTR -> RTS */ qp_mask = (enum ibv_qp_attr_mask)(IBV_QP_STATE | IBV_QP_SQ_PSN); qp_attr.qp_state = IBV_QPS_RTS; qp_attr.sq_psn = 0xcafef00d; rc = ibv_modify_qp(conn_ud_qp, &qp_attr, qp_mask); GASNETC_IBV_CHECK(rc, "from ibv_modify_qp(UD RTS)"); /* Create SNDs */ { static gasnetc_ud_snd_desc_t *desc; int i; if (NULL == desc) { desc = gasneti_calloc(max_send_wr, sizeof(gasnetc_ud_snd_desc_t)); gasneti_leak(desc); } for (i = 0; i < max_send_wr; ++i, ++desc, addr += send_sz) { desc->wr.num_sge = 1; desc->wr.sg_list = &desc->sg; desc->wr.wr_id = 1 | (uintptr_t)desc; /* CQE will point back to this request */ desc->wr.opcode = IBV_WR_SEND_WITH_IMM; desc->wr.send_flags = (enum ibv_send_flags)0; desc->wr.next = NULL; desc->wr.wr.ud.remote_qkey = my_qkey; #if GASNET_DEBUG desc->sg.length = ~0; #endif desc->sg.addr = addr; desc->sg.lkey = conn_ud_reg.handle->lkey; gasneti_lifo_push(&conn_snd_freelist, desc); } desc -= max_send_wr; } /* "warmup" the timers to ensure we don't pay the potentially high cost of the tick normalization while trying to manage retransmissions. */ (void) gasneti_tick_granularity(); return GASNET_OK; } /* setup_ud */ /* ------------------------------------------------------------------------------------ */ static gasneti_mutex_t gasnetc_conn_tbl_lock = GASNETI_MUTEX_INITIALIZER; static gasnetc_conn_t *gasnetc_conn_tbl = NULL; static gasnetc_conn_t * gasnetc_get_conn(gasnetc_EP_t ep, gex_Rank_t node) { gasnetc_conn_t *conn = gasnetc_conn_tbl; while (conn && (conn->info.node != node)) { conn = conn->next; } if (conn) { /* Found it - nothing more to do */ } else if (GASNETC_NODE2CEP(ep, node)) { /* Connection complet(ing) - nothing more to do */ } else { /* Create new */ conn = gasneti_malloc(sizeof(*conn)); conn->next = gasnetc_conn_tbl; conn->prev = NULL; if (gasnetc_conn_tbl) { gasnetc_conn_tbl->prev = conn; } gasnetc_conn_tbl = conn; #if GASNETI_STATS_OR_TRACE conn->start_time = GASNETI_TICKS_NOW_IFENABLED(C); conn->start_active = 0; #endif conn->state = GASNETC_CONN_STATE_NONE; conn->info.node = node; conn->info.cep = (gasnetc_cep_t *) gasneti_malloc_aligned(GASNETI_CACHE_LINE_BYTES, gasnetc_alloc_qps * sizeof(gasnetc_cep_t)); gasneti_leak_aligned(conn->info.cep); memset(conn->info.cep, 0, gasnetc_alloc_qps * sizeof(gasnetc_cep_t)); conn->info.local_qpn = gasneti_malloc(2 * gasnetc_alloc_qps * sizeof(uint32_t)); conn->info.remote_qpn = conn->info.local_qpn + gasnetc_alloc_qps; #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { conn->info.local_xrc_qpn = &gasnetc_xrc_rcv_qpn[node * gasnetc_alloc_qps]; conn->info.remote_xrc_qpn = gasneti_malloc(gasnetc_alloc_qps * sizeof(uint32_t)); conn->info.xrc_remote_srq_num = gasneti_malloc(gasnetc_alloc_qps * sizeof(uint32_t)); } #endif gasnetc_setup_ports(&conn->info); conn->ah = gasnetc_create_ah(node); conn->ref_count = 1; } return conn; } static void gasnetc_put_conn(gasnetc_conn_t *conn) { if (--conn->ref_count) return; if (conn->next) { conn->next->prev = conn->prev; } if (conn->prev) { conn->prev->next = conn->next; } else { gasnetc_conn_tbl = conn->next; } gasneti_free(conn->info.local_qpn); #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { gasneti_free(conn->info.remote_xrc_qpn); gasneti_free(conn->info.xrc_remote_srq_num); } #endif gasnetc_put_ah(conn->ah); gasneti_free(conn); } /* Defaults: * Min is 1ms which at least 25% more than the ENTIRE connect should take. * Max is (1 << 26) us, which, doubling from an inital min=1ms, means 65.536s. * Sum is upto 128s spent retrying EACH of the two round-trip message exchanges. * Of course, SRTT estimation means we don't follow a strict doubling path. * * We try to "learn" retransmit intervals dynamically, as follows. * + The number of "packets" sent to an given peer is just 2, making tuning per * peer nearly pointless. * + If pooling the RTT data across all connections then the number of packets may * often be too small to gain statistically meaningful RTT information, given the * high variance that will result from pooling info from multiple nodes. * + If pooling info per-supernode the data may still be high-variance when not * using a connection thread because the remote attentiveness influences the RTT. * + Summary of previous 3 items: not clear that smoothed-RTT estimators are useful. * + Despite the above, we attempt to estimate RTT pooling data across ALL peers. * + So we use SRTT estimation following advice given in RFC 1122: * - Use Karn's algorithm (but see below) to 1) use only unambiguous RTT values * to update the SRTT, and 2) carry-over backed-off RTO to next packet when no * updated SRTT is available to compute a "fresh" RTO. * - Use Van Jacobson's variance-aware RTO computation. However, we are using * the original (a+2v) version, not the (a+4v) version that was updated based * on behavior of TCP slow-start over SLIP. The reasoning is 2-fold: we are NOT * dealing with bandwidth-dominated links (and have constant a message length * besides); and our variance is already going to be artificially high due to * pooling over multiple peers. * + Karn's algorithm says to discard any RTT measurement for a packet that has been * retransmitted, because we cannot know if the response is to the original or one * of the resends. However, unlike TCP we can (and do) put info in the header * to keep Karn's rule about using only "unambiguous" RTT measurements while * admitting a larger set of measurements: * - A single header bit distinguishes the original packet and its reply. This * lets us use RTT measurements for replies to the original, even if there were * resends. This helps to more quickly raise a SRTT estimate that is too low, * while not allowing the carry-over of a backed-off RTO to excessively delay * any resends that are appropriate. * TODO: * + More replies could pass Karn's "unambiguous" test if we try harder. Though it * is unclear that there is a *need* to keep more samples, here are some ideas: * - A counter in the header could give the sequence for each resend, and be echoed * back in the reply. This could easily be used to distinguish not only replies * to the first send (as with the 1-bit modification), but also replies to the * most recent resend. Since both the first and last send timestamps are on hand * at the sender, unambiguous RTT computations would be possible for both these * cases. Would only need 4 or 5 bits, and at least 8 are easily available. * - Using the same counter as the previous item with the addition of a "log" of the * (re)send times would allow unambiguous RTT computation regardless of which of * multiple sends was the one to receive a reply. * - Sending a timestamp on a request (again echoed back in the reply) would allow * unambiguous RTT computation w/o the log, but at the expense of up to an 8-byte * timestamp. For the non-SRQ case current payload is only 4 bytes, making this * timestamp a non-trivial expansion of the payload. The log feels "cheaper". * + Use of the resend-sequence number mentioned above would allow use to independently * estimate loss rate in addition to RTT time, with the caveat that we cannot be * sure if loss was due to congestion in the fabric or overrun at the receiver. * While I have not done (or searched for in literature) the corresponding analysis, * I suspect that something intelligent might be done with this additional data. * * All of this may be more important if/when we want to to AM-over-UD or multicast. */ /* No matter what the rto value, don't give up before this many resends */ #ifndef GASNETC_CONN_RETEANSMIT_MIN #define GASNETC_CONN_RETEANSMIT_MIN 8 #endif /* While env vars are in us, these store ns */ static uint64_t gasnetc_conn_retransmit_min_ns = 1000 * 1000; static uint64_t gasnetc_conn_retransmit_max_ns = ((uint64_t)1 << 26) * 1000; /* NOTE: releases and reacquires the lock */ static void gasnetc_timed_conn_wait(gasnetc_conn_t *conn, gasnetc_conn_state_t state, void (*fn)(gasnetc_conn_t *, int)) { gasneti_tick_t prev_time = conn->xmit_time; int resends = 0; uint64_t now, timeout; #if GASNETC_CONN_USE_SRTT /* Variables for Van Jacobson's SRTT estimator */ static int64_t sa, sv, rto = 0; if_pf (!rto) { /* Init needed */ rto = gasnetc_conn_retransmit_min_ns; sa = (rto >> 1) << 3; sv = (rto >> 2) << 2; /* or ">> 3" for a+4v version */ } timeout = rto; #else timeout = gasnetc_conn_retransmit_min_ns; #endif gasneti_mutex_unlock(&gasnetc_conn_tbl_lock); while (1) { GASNETI_SPIN_WHILE((((now = gasneti_ticks_now()), 1) && (conn->state == state) && (gasneti_ticks_to_ns(now - prev_time) < timeout)), gasnetc_sndrcv_poll(0)); if (conn->state != state) break; /* Done */ timeout *= 2; if (timeout > gasnetc_conn_retransmit_max_ns) { if (resends >= GASNETC_CONN_RETEANSMIT_MIN) break; /* limit reached */ timeout = gasnetc_conn_retransmit_max_ns; } /* retransmit */ (*fn)(conn, 0); ++resends; /* Don't use 'now' here because it might include a stall in the resend: */ prev_time = gasneti_ticks_now(); } gasneti_mutex_lock(&gasnetc_conn_tbl_lock); #if GASNETC_CONN_USE_SRTT if_pt (conn->valid_rtt) { /* m, sa, sv and rto are as defined by Van Jacobson */ int64_t m = gasneti_ticks_to_ns(now - conn->xmit_time); #if GASNETI_STATS_OR_TRACE int64_t om = m; #endif m -= (sa >> 3); sa += m; if (m < 0) m = -m; m -= (sv >> 2); sv += m; rto = (sa >> 3) + (sv >> 1); /* or "+sv" for a+4v version */ GASNETI_TRACE_PRINTF(D, ("UD connection SRTT: m=%"PRId64", ns avg=%"PRId64" ns, var=%"PRId64" ns", om, (sa >> 3), (sv >> 2))); } else { /* Don't use an ambiguous rtt value to update estimates. * Instead we carry over the current (possibly backed-off) RTO. * TODO: header sequence number could further disambiguate */ rto = timeout; } #endif if (conn->state == state) { gasneti_fatalerror("Node %d timed out attempting dynamic connection to node %d (state = %d, %d resends over %gs)\n", (int)gasneti_mynode, (int)conn->info.node, state, resends, 1e-9 * gasneti_ticks_to_ns(now - conn->xmit_time)); } #if GASNETI_STATS_OR_TRACE switch(state) { case GASNETC_CONN_STATE_REQ_SENT: GASNETI_TRACE_EVENT_TIME(C, CONN_REQ2REP, (now - conn->xmit_time)); GASNETC_STAT_EVENT_VAL(CONN_REQ, resends); break; case GASNETC_CONN_STATE_RTU_SENT: GASNETI_TRACE_EVENT_TIME(C, CONN_RTU2ACK, (now - conn->xmit_time)); GASNETC_STAT_EVENT_VAL(CONN_RTU, resends); break; default: break; } #endif } static void conn_send_req(gasnetc_conn_t *conn, int flags) { conn_send_data(conn, GASNETC_CONN_CMD_REQ | flags); if (flags & GASNETC_CONN_IS_ORIG) { conn->xmit_time = gasneti_ticks_now(); #if GASNETC_CONN_USE_SRTT conn->valid_rtt = 0; #endif } } static void conn_send_rtu(gasnetc_conn_t *conn, int flags) { conn_send_empty(conn->ah, conn->info.node, GASNETC_CONN_CMD_RTU | flags); if (flags & GASNETC_CONN_IS_ORIG) { conn->xmit_time = gasneti_ticks_now(); #if GASNETC_CONN_USE_SRTT conn->valid_rtt = 0; #endif } } static void conn_send_rep(gasnetc_conn_t *conn, int flags) { conn_send_data(conn, GASNETC_CONN_CMD_REP | flags); GASNETC_STAT_EVENT(CONN_REP); } static void conn_send_ack(gasnetc_conn_t *conn, gex_Rank_t node, int flags) { conn_send_empty(conn ? conn->ah : NULL, node, GASNETC_CONN_CMD_ACK | flags); GASNETC_STAT_EVENT(CONN_ACK); } /* "wrapper" to centralize tracing/stats */ #if GASNETI_STATS_OR_TRACE GASNETI_INLINE(gasnetc_dynamic_done) void gasnetc_dynamic_done(gasnetc_conn_t *conn, int active) { GASNETC_STAT_EVENT(CONN_DYNAMIC); if (active) { GASNETI_TRACE_EVENT_TIME(C, CONN_TIME_ACTV, (gasneti_ticks_now() - conn->start_time)); GASNETI_TRACE_PRINTF(C, ("Dynamic connection to node %d", (int)conn->info.node)); } else if (conn->start_active) { GASNETI_TRACE_EVENT_TIME(C, CONN_TIME_A2P, (gasneti_ticks_now() - conn->start_time)); GASNETI_TRACE_PRINTF(C, ("Dynamic connection with node %d", (int)conn->info.node)); } else { GASNETI_TRACE_EVENT_TIME(C, CONN_TIME_PASV, (gasneti_ticks_now() - conn->start_time)); GASNETI_TRACE_PRINTF(C, ("Dynamic connection from node %d", (int)conn->info.node)); } } #else #define gasnetc_dynamic_done(c,a) ((void)0) #endif extern gasnetc_cep_t * gasnetc_connect_to(gasnetc_EP_t ep, gex_Rank_t node) { gasnetc_cep_t *result = NULL; gasneti_mutex_lock(&gasnetc_conn_tbl_lock); do { gasnetc_conn_t *conn = gasnetc_get_conn(ep, node); if (!conn || (conn->state != GASNETC_CONN_STATE_NONE)) { /* We are not the first to request this connection */ break; } #if GASNETI_STATS_OR_TRACE conn->start_active = 1; #endif if_pf (node >= gasneti_nodes) { gasneti_fatalerror("Connection requested to invalid node %d", (int)node); break; } (void) gasnetc_qp_create(&conn->info); conn->state = GASNETC_CONN_STATE_REQ_SENT; conn_send_req(conn, GASNETC_CONN_IS_ORIG); (void) gasnetc_qp_reset2init(&conn->info, 1); gasnetc_timed_conn_wait(conn, GASNETC_CONN_STATE_REQ_SENT, &conn_send_req); if ((conn->state == GASNETC_CONN_STATE_REP_SENT) || (conn->state == GASNETC_CONN_STATE_DONE)) { /* Resolved the active-active case by becoming the Passive peer */ gasnetc_put_conn(conn); break; } gasneti_assert(conn->state == GASNETC_CONN_STATE_REP_RCVD); (void) gasnetc_qp_init2rtr(&conn->info, 1); gasneti_sync_writes(); /* "finalize" cep data */ GASNETC_NODE2CEP(ep, node) = conn->info.cep; conn->state = GASNETC_CONN_STATE_RTU_SENT; if (node == gasneti_mynode) { conn->state = GASNETC_CONN_STATE_ACK_RCVD; } else { conn_send_rtu(conn, GASNETC_CONN_IS_ORIG); } gasnetc_sndrcv_attach_peer(node, conn->info.cep); (void) gasnetc_qp_rtr2rts(&conn->info); gasnetc_timed_conn_wait(conn, GASNETC_CONN_STATE_RTU_SENT, &conn_send_rtu); if (conn->state != GASNETC_CONN_STATE_DONE) { gasneti_assert(conn->state == GASNETC_CONN_STATE_ACK_RCVD); (void) gasnetc_set_sq_sema(&conn->info); conn->state = GASNETC_CONN_STATE_DONE; gasnetc_dynamic_done(conn, 1); } else { /* Connection completed by gasnetc_conn_implied_ack() */ } gasnetc_put_conn(conn); } while (0); gasneti_mutex_unlock(&gasnetc_conn_tbl_lock); GASNETI_SPIN_UNTIL((result = GASNETC_NODE2CEP(ep, node)), gasnetc_sndrcv_poll(0)); #if 0 /* Alpha (no longer supported) was only CPU which failed to order * dependent loads. So, this RMB (originally meant to ensure any * dereferences of *result will follow the read of result) is not * needed on any currently supported platform. */ gasneti_local_rmb(); #endif return result; } extern void gasnetc_conn_implied_ack(gasnetc_EP_t ep, gex_Rank_t node) { gasneti_mutex_lock(&gasnetc_conn_tbl_lock); #if !GASNETI_THREADS gasneti_assert((GASNETC_NODE2CEP(ep, node))->sq_sema_p == &gasnetc_zero_sema); #else if (GASNETC_NODE2CEP(ep, node)->sq_sema_p != &gasnetc_zero_sema) { /* We are not the first thread to notice the situation */ } else #endif { gasnetc_conn_t *conn = gasnetc_get_conn(ep, node); /* The only valid states are * + GASNETC_CONN_STATE_RTU_SENT * The ACK has not yet been received * + GASNETC_CONN_STATE_ACK_RCVD * The ACK was received in the same Poll as the current AM Request * and therefore gasnetc_connect_to() has not yet regained control. * * The !conn case is impossible in the single-threaded case, and in the * multi-threaded case is caught by (sq_sema_p != gasnetc_zero_sema) above. */ gasneti_assert(conn && ((conn->state == GASNETC_CONN_STATE_RTU_SENT) || (conn->state == GASNETC_CONN_STATE_ACK_RCVD))); (void) gasnetc_set_sq_sema(&conn->info); conn->state = GASNETC_CONN_STATE_DONE; gasnetc_dynamic_done(conn, 1); GASNETC_STAT_EVENT(CONN_IMPLIED_ACK); } gasneti_mutex_unlock(&gasnetc_conn_tbl_lock); } extern void gasnetc_conn_rcv_wc(struct ibv_wc *comp) { gasnetc_ud_rcv_desc_t *desc = (gasnetc_ud_rcv_desc_t *)(1 ^ (uintptr_t)comp->wr_id); gasnetc_conn_cmd_t cmd = (gasnetc_conn_cmd_t)(comp->imm_data & GASNETC_CONN_CMD_MASK); uint32_t is_orig = comp->imm_data & GASNETC_CONN_IS_ORIG; gex_Rank_t node = (comp->imm_data >> 16) & 0xffff; gasneti_tick_t now = gasneti_ticks_now(); #if GASNET_DEBUG /* Drop 1 in N to aid debugging */ if (gasnetc_conn_drop_denom && !gasnetc_conn_rand_int(gasnetc_conn_drop_denom)) { gasnetc_rcv_post_ud(desc); return; } #endif gasnetc_EP_t ep = gasnetc_ep0; // TODO-EX: multi-EP support gasneti_mutex_lock(&gasnetc_conn_tbl_lock); { gasnetc_conn_t *conn = gasnetc_get_conn(ep, node); gasnetc_conn_state_t state = conn ? conn->state : GASNETC_CONN_STATE_DONE; /* extract any remote data from the payload and repost desc ASAP */ if (((state == GASNETC_CONN_STATE_NONE) || (state == GASNETC_CONN_STATE_REQ_SENT)) && ((cmd == GASNETC_CONN_CMD_REQ) || (cmd == GASNETC_CONN_CMD_REP))) { gasnetc_conn_info_t *conn_info = &conn->info; void *payload = (void *)((uintptr_t)desc->sg.addr + GASNETC_GRH_SIZE); #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { gasnetc_xrc_conn_data_t *data = (gasnetc_xrc_conn_data_t *)payload; int qpi; for (qpi = 0; qpi < gasnetc_alloc_qps; ++qpi) { conn_info->xrc_remote_srq_num[qpi] = data[qpi].srq_num; conn_info->remote_xrc_qpn[qpi] = data[qpi].xrc_qpn; conn_info->remote_qpn[qpi] = data[qpi].qpn; } } else #endif { GASNETI_MEMCPY(conn_info->remote_qpn, payload, conn_ud_msg_sz); } } gasnetc_rcv_post_ud(desc); /* Now determine the action to take */ switch (cmd) { case GASNETC_CONN_CMD_REQ: if (state == GASNETC_CONN_STATE_NONE) { /* Normal case */ (void) gasnetc_qp_create(&conn->info); state = GASNETC_CONN_STATE_REP_SENT; conn_send_rep(conn, is_orig); conn->reply_time = now; } else if (state == GASNETC_CONN_STATE_REP_SENT) { /* Resend case */ if (gasneti_ticks_to_ns(now - conn->reply_time) < gasnetc_conn_retransmit_min_ns) { /* Recvd impossibly fast, indicating we were inattentive - don't resend yet. */ GASNETC_STAT_EVENT(CONN_NOREP); } else { conn_send_rep(conn, is_orig); } break; /* Do not advance QP state on resend */ } else if (state == GASNETC_CONN_STATE_REQ_SENT) { /* Resolve the active-active case by picking a winner and a loser. */ /* Use of odd/even spreads choice uniformly (not biased to high or low nodes) */ int higher = (node > gasneti_mynode); int odd_even = (node ^ gasneti_mynode) & 1; if (higher ^ odd_even) { state = GASNETC_CONN_STATE_REP_SENT; conn->ref_count = 2; GASNETC_STAT_EVENT(CONN_AAP); /* ...falls through to advance QP... */ } else { state = GASNETC_CONN_STATE_REP_RCVD; GASNETC_STAT_EVENT(CONN_AAA); break; /* do not advance QP state */ } } else if (state == GASNETC_CONN_STATE_RTU_SENT) { /* We must have "won" the active-active race while peer must have missed our REQ */ conn_send_req(conn, 0); break; /* Do not advance QP state */ } else { break; /* Do not advance QP state */ } /* Advance QP state, overlapped w/ network round-trip (if any) and remote work: */ if (conn->state == GASNETC_CONN_STATE_NONE) { (void) gasnetc_qp_reset2init(&conn->info, 1); } (void) gasnetc_qp_init2rtr(&conn->info, 1); gasnetc_sndrcv_attach_peer(node, conn->info.cep); (void) gasnetc_qp_rtr2rts(&conn->info); (void) gasnetc_set_sq_sema(&conn->info); break; case GASNETC_CONN_CMD_REP: if (state == GASNETC_CONN_STATE_REQ_SENT) { /* Normal case */ state = GASNETC_CONN_STATE_REP_RCVD; #if GASNETC_CONN_USE_SRTT conn->valid_rtt = is_orig; #endif } break; case GASNETC_CONN_CMD_RTU: { /* Since conn is freed after sending the first ACK this "cache" is the * best we can do "on the cheap" w/o something like TCP's TIME_WAIT. */ #define GASNETC_ACK_CACHE_SLOTS 8 /* Must be a power of 2 */ static gasneti_tick_t prev_ack_time[GASNETC_ACK_CACHE_SLOTS] = {0}; static gex_Rank_t prev_ack_node[GASNETC_ACK_CACHE_SLOTS] = {0}; const unsigned int slot = ((unsigned int)node) & (GASNETC_ACK_CACHE_SLOTS - 1); if (state == GASNETC_CONN_STATE_REP_SENT) { /* Normal case */ gasneti_sync_writes(); /* "finalize" cep data */ GASNETC_NODE2CEP(ep, node) = conn->info.cep; state = GASNETC_CONN_STATE_DONE; gasnetc_dynamic_done(conn, 0); conn_send_ack(conn, node, is_orig); prev_ack_time[slot] = now; prev_ack_node[slot] = node; } else if (state == GASNETC_CONN_STATE_DONE) { /* Resend case */ if ((node == prev_ack_node[slot]) && (gasneti_ticks_to_ns(now - prev_ack_time[slot]) < gasnetc_conn_retransmit_min_ns)) { /* Recvd impossibly fast, indicating we were inattentive - don't resend yet. */ GASNETC_STAT_EVENT(CONN_NOACK); } else { conn_send_ack(NULL, node, is_orig); } } break; } case GASNETC_CONN_CMD_ACK: if (state == GASNETC_CONN_STATE_RTU_SENT) { /* Normal case */ state = GASNETC_CONN_STATE_ACK_RCVD; #if GASNETC_CONN_USE_SRTT conn->valid_rtt = is_orig; #endif } break; } if (conn && conn->state != state) { conn->state = state; if (state == GASNETC_CONN_STATE_DONE) { gasnetc_put_conn(conn); } } } while(0); gasneti_mutex_unlock(&gasnetc_conn_tbl_lock); } extern void gasnetc_conn_snd_wc(struct ibv_wc *comp) { gasnetc_ud_snd_desc_t *desc = (void *)(uintptr_t)(1 ^ comp->wr_id); conn_sema_up(conn_ud_sema_p); gasnetc_put_ah(desc->ah); gasneti_lifo_push(&conn_snd_freelist, desc); } #endif /* GASNETC_DYNAMIC_CONNECT */ /* ------------------------------------------------------------------------------------ */ /* Support code for gasnetc_connect() */ /* Convert positive integer to string in base 2 to 36. * Returns count of digits actually written, or 0 on overflow. * Buffer is '\0' terminated except on overflow. * This is the "inverse" to strtol */ static int ltostr(char *buf, int buflen, long val, int base) { const char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; int i = 0; gasneti_assert((base > 1) && (base <= strlen(digits))); buflen--; /* reserve space for '\0' */ if_pt (buflen >= 1) { /* Work right-aligned in buf */ char *p = buf + buflen - 1; do { ldiv_t ld = ldiv(val, base); *(p--) = digits[ld.rem]; val = ld.quot; } while ((++i < buflen) && val); if_pf (val) return 0; /* Ran out of space */ /* Move to be left-aligned in buf */ memmove(buf, p+1, i); buf[i] = '\0'; } return i; } static int gen_tag(char *tag, int taglen, gex_Rank_t val, int base) { int len = ltostr(tag, taglen-1, val, base); gasneti_assert(len != 0); gasneti_assert(len < taglen-1); tag[len+0] = ':'; tag[len+1] = '\0'; return len + 1; } static long int my_strtol(const char *ptr, char **endptr, int base) { long int result = strtol(ptr,endptr,base); if_pf ((*endptr == ptr) || !*endptr) { gasneti_fatalerror("Invalid token reading connection table file"); } return result; } static gex_Rank_t get_next_conn(FILE *fp) { static int gasnetc_connectfile_in_base = 10; // Defaults to human readable/writable static gex_Rank_t range_lo = GASNET_MAXNODES; static gex_Rank_t range_hi = 0; if (range_lo > range_hi) { static char *tok = NULL; /* If there is no current token, find the next line with our tag */ while (!tok || (*tok == '\0')) { static char tag[18]; /* even base-2 will fit */ static size_t taglen = 0; if_pf (!taglen) { /* One-time initialization */ taglen = snprintf(tag, sizeof(tag), "%x:", gasneti_mynode); } do { static int is_header = 1; static char *buf = NULL; static size_t buflen = 0; if (gasneti_getline(&buf, &buflen, fp) == -1) { gasneti_free(buf); return GASNET_MAXNODES; } if_pf (is_header) { if (!strncmp(buf, "size:", 5)) { gex_Rank_t size = my_strtol(buf+5, &tok, 10); if (size != gasneti_nodes) { gasneti_fatalerror("Connection table input file is for %d nodes rather than %d", (int)size, (int)gasneti_nodes); } continue; } else if (!strncmp(buf, "base:", 5)) { gasnetc_connectfile_in_base = my_strtol(buf+5, &tok, 10); taglen = gen_tag(tag, sizeof(tag), gasneti_mynode, gasnetc_connectfile_in_base); continue; } is_header = 0; } tok = buf; } while (strncmp(tok, tag, taglen)); tok += taglen; while (*tok && isspace(*tok)) ++tok; } /* Parse the current token */ { char *p, *q; range_lo = range_hi = my_strtol(tok, &p, gasnetc_connectfile_in_base); range_hi = (*p == '-') ? my_strtol(p+1, &q, gasnetc_connectfile_in_base) : range_lo; } /* Advance to next token or end ot line */ while (*tok && !isspace(*tok)) ++tok; while (*tok && isspace(*tok)) ++tok; } return range_lo++; } /* ------------------------------------------------------------------------------------ */ /* Setup statically-connected communication */ static int gasnetc_connect_static(gasnetc_EP_t ep) { const int ceps = gasneti_nodes * gasnetc_alloc_qps; uint32_t *local_qpn = gasneti_calloc(ceps, sizeof(uint32_t)); uint32_t *remote_qpn = gasneti_calloc(ceps, sizeof(uint32_t)); gasnetc_conn_info_t *conn_info = gasneti_calloc(gasneti_nodes, sizeof(gasnetc_conn_info_t)); #if GASNETC_IBV_XRC uint32_t *xrc_remote_rcv_qpn = NULL; uint32_t *xrc_remote_srq_num = NULL; #endif gex_Rank_t node; gex_Rank_t static_nodes = gasneti_nodes; #if GASNETC_IBV_XRC gex_Rank_t static_supernodes = gasneti_nodemap_global_count - 1; #endif int i; gasnetc_cep_t *cep; /* First cep of given node */ uint8_t *peer_mask = NULL; /* Honor user's connections file if given */ { const char *envstr = gasnetc_connectfile_in; if (envstr) { const char *filename = gasnetc_parse_filename(envstr); FILE *fp; #ifdef HAVE_FOPEN64 fp = fopen64(filename, "r"); #else fp = fopen(filename, "r"); #endif if (!fp) { gasneti_console_message("ERROR","unable to open connection table input file '%s'", filename); } if (filename != envstr) gasneti_free((/* not const */ char *)filename); peer_mask = gasneti_calloc(gasneti_nodes, sizeof(uint8_t)); while (GASNET_MAXNODES != (node = get_next_conn(fp))) { gasneti_assert(node < gasneti_nodes); peer_mask[node] = 1; } fclose(fp); /* Since conn table is not always symmetric we must transpose-and-OR */ { uint8_t *transposed_mask = gasneti_malloc(gasneti_nodes * sizeof(uint8_t)); gasneti_bootstrapAlltoall(peer_mask, sizeof(uint8_t), transposed_mask); for (static_nodes = node = 0; node < gasneti_nodes; ++node) { peer_mask[node] = (peer_mask[node] || transposed_mask[node]); gasneti_assert((peer_mask[node] == 0) || (peer_mask[node] == 1)); static_nodes += peer_mask[node]; } gasneti_free(transposed_mask); } #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { uint8_t *supernode_mask = gasneti_calloc(gasneti_nodemap_global_count, sizeof(uint8_t)); for (node = 0; node < gasneti_nodes; ++node) { supernode_mask[gasneti_node2supernode(node)] |= peer_mask[node]; } for (static_supernodes = node = 0; node < gasneti_nodemap_global_count; ++node) { gasneti_assert((supernode_mask[node] == 0) || (supernode_mask[node] == 1)); static_supernodes += supernode_mask[node]; } gasneti_free(supernode_mask); } #endif } } #define GASNETC_IS_REMOTE_NODE(_node) (peer_mask ? peer_mask[_node] : 1) #define GASNETC_FOR_EACH_REMOTE_NODE(_node) \ for ((_node) = 0; (_node) < gasneti_nodes; ++(_node)) \ if (GASNETC_IS_REMOTE_NODE(_node)) /* Allocate the dense CEP table and populate the node2cep table. */ { static gasnetc_cep_t *cep_table; if (NULL == cep_table) { cep_table = (gasnetc_cep_t *) gasneti_malloc_aligned(GASNETI_CACHE_LINE_BYTES, static_nodes * gasnetc_alloc_qps * sizeof(gasnetc_cep_t)); gasneti_leak_aligned(cep_table); } for (node = 0, cep = cep_table; node < gasneti_nodes; ++node) { /* NOT randomized */ if (!GASNETC_IS_REMOTE_NODE(node)) continue; ep->cep_table[node] = cep; memset(cep, 0, gasnetc_alloc_qps * sizeof(gasnetc_cep_t)); cep += gasnetc_alloc_qps; } gasneti_assert((cep - cep_table) == (static_nodes * gasnetc_alloc_qps)); } /* Preallocate the SQ semaphores */ #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { sq_sema_alloc(static_supernodes * gasnetc_alloc_qps); } else #endif { sq_sema_alloc(static_nodes * gasnetc_alloc_qps); } /* Initialize connection tracking info and create QPs */ GASNETC_FOR_EACH_REMOTE_NODE(node) { i = node * gasnetc_alloc_qps; conn_info[node].node = node; conn_info[node].cep = GASNETC_NODE2CEP(ep, node); conn_info[node].local_qpn = &local_qpn[i]; #if GASNETC_IBV_XRC conn_info[node].local_xrc_qpn = &gasnetc_xrc_rcv_qpn[i]; #endif gasnetc_setup_ports(&conn_info[node]); (void)gasnetc_qp_create(&conn_info[node]); } /* exchange address info */ #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { /* Use single larger exchange rather then multiple smaller ones */ gasnetc_xrc_conn_data_t *local_tmp = gasneti_calloc(ceps, sizeof(gasnetc_xrc_conn_data_t)); gasnetc_xrc_conn_data_t *remote_tmp = gasneti_malloc(ceps * sizeof(gasnetc_xrc_conn_data_t)); for (i = node = 0; node < gasneti_nodes; ++node) { int qpi; cep = GASNETC_NODE2CEP(ep, node); for (qpi = 0; qpi < gasnetc_alloc_qps; ++qpi, ++i) { if (GASNETC_IS_REMOTE_NODE(node)) { gasnetc_hca_t *hca = cep[qpi].hca; struct ibv_srq *srq = GASNETC_QPI_IS_REQ(qpi) ? hca->rqst_srq : hca->repl_srq; local_tmp[i].srq_num = conn_get_srq_num(srq); } local_tmp[i].xrc_qpn = gasnetc_xrc_rcv_qpn[i]; local_tmp[i].qpn = local_qpn[i]; } } gasneti_bootstrapAlltoall(local_tmp, gasnetc_alloc_qps * sizeof(gasnetc_xrc_conn_data_t), remote_tmp); xrc_remote_rcv_qpn = gasneti_malloc(ceps * sizeof(uint32_t)); xrc_remote_srq_num = gasneti_malloc(ceps * sizeof(uint32_t)); for (i = 0; i < ceps; ++i) { xrc_remote_srq_num[i] = remote_tmp[i].srq_num; xrc_remote_rcv_qpn[i] = remote_tmp[i].xrc_qpn; remote_qpn[i] = remote_tmp[i].qpn; } gasneti_free(remote_tmp); gasneti_free(local_tmp); } else #endif gasneti_bootstrapAlltoall(local_qpn, gasnetc_alloc_qps*sizeof(uint32_t), remote_qpn); /* Advance state RESET -> INIT -> RTR. */ // One active process per XRC domain is sufficent (more just slow things down). #if GASNETC_IBV_XRC const int active = gasnetc_xrcd_iam_leader || !gasnetc_use_xrc; #else const int active = 1; #endif GASNETC_FOR_EACH_REMOTE_NODE(node) { i = node * gasnetc_alloc_qps; conn_info[node].remote_qpn = &remote_qpn[i]; #if GASNETC_IBV_XRC conn_info[node].remote_xrc_qpn = &xrc_remote_rcv_qpn[i]; conn_info[node].xrc_remote_srq_num = &xrc_remote_srq_num[i]; #endif (void)gasnetc_qp_reset2init(&conn_info[node], active); (void)gasnetc_qp_init2rtr(&conn_info[node], active); } /* QPs must reach RTS before we may continue (not strictly necessary in practice as long as we don't try to send until peers do.) */ gasneti_bootstrapBarrier(); /* Advance state RTR -> RTS */ GASNETC_FOR_EACH_REMOTE_NODE(node) { (void)gasnetc_qp_rtr2rts(&conn_info[node]); (void)gasnetc_set_sq_sema(&conn_info[node]); GASNETC_STAT_EVENT(CONN_STATIC); } #if GASNETC_IBV_XRC gasneti_free(xrc_remote_srq_num); gasneti_free(xrc_remote_rcv_qpn); #endif gasneti_free(conn_info); gasneti_free(remote_qpn); gasneti_free(local_qpn); gasneti_free(peer_mask); return static_nodes; } /* gasnetc_connect_static */ int gasnetc_conn_static = 1; #if GASNETC_DYNAMIC_CONNECT int gasnetc_conn_dynamic = 0; #endif /* Setup statically-connected communication and prepare for dynamic connections */ extern int gasnetc_connect_init(gasnetc_EP_t ep0) { int fully_connected = 0; /* Allocate node->cep lookup table */ { size_t size = gasneti_nodes*sizeof(gasnetc_cep_t *); if (! ep0->cep_table) { ep0->cep_table = (gasnetc_cep_t **) gasneti_malloc_aligned(GASNETI_CACHE_LINE_BYTES, size); gasneti_leak_aligned(ep0->cep_table); } memset(ep0->cep_table, 0, size); } #if GASNETC_DYNAMIC_CONNECT #if GASNET_DEBUG gasnetc_conn_drop_denom = gasneti_getenv_int_withdefault("GASNET_CONNECT_DROP_DENOM", 0, 0); #endif { /* Env vars are in us, but internal vars are in ns */ int64_t tmp_min, tmp_max; tmp_min = gasnetc_conn_retransmit_min_ns / 1000; tmp_min = gasneti_getenv_int_withdefault("GASNET_CONNECT_RETRANS_MIN", tmp_min, 0); tmp_max = gasnetc_conn_retransmit_max_ns / 1000; tmp_max = gasneti_getenv_int_withdefault("GASNET_CONNECT_RETRANS_MAX", tmp_max, 0); if (tmp_min >= tmp_max) { gasneti_console0_message("WARNING","GASNET_CONNECT_RETRANS_MIN >= GASNET_CONNECT_RETRANS_MAX. " "Using default values instead."); } else { gasnetc_conn_retransmit_min_ns = tmp_min * 1000; gasnetc_conn_retransmit_max_ns = tmp_max * 1000; } } #endif /* Determine the inline data limit given the QP parameters we will use. */ { const size_t orig_inline_limit = gasnetc_inline_limit; int i; for (i = 0; i < gasnetc_num_ports; ++i) { gasnetc_check_inline_limit(i, gasnetc_op_oust_pp); if (gasnetc_use_srq) { /* Corresponds to a Request QP */ gasnetc_check_inline_limit(i, gasnetc_am_oust_pp); } } /* warn on reduced inline limit */ if ((orig_inline_limit != (size_t)-1) && (gasnetc_inline_limit < orig_inline_limit)) { if (gasnet_getenv("GASNET_INLINESEND_LIMIT") != NULL) gasneti_console_message("WARNING", "Requested GASNET_INLINESEND_LIMIT %d reduced to HCA limit %d", (int)orig_inline_limit, (int)gasnetc_inline_limit); } GASNETI_TRACE_PRINTF(I, ("Final/effective GASNET_INLINESEND_LIMIT = %d", (int)gasnetc_inline_limit)); gasnetc_sndrcv_init_inline(); } /* Create static connections unless disabled */ if (gasnetc_conn_static) { gex_Rank_t static_nodes = gasnetc_connect_static(ep0); fully_connected = (static_nodes == gasneti_nodes); GASNETI_TRACE_PRINTF(I, ("%s connected at startup to %d of %d remote nodes", fully_connected ? "Fully" : "Partially", (int)static_nodes, (int)gasneti_nodes)); } else { GASNETI_TRACE_PRINTF(I, ("Static connection at startup has been disabled at user request")); } #if GASNETC_DYNAMIC_CONNECT if (!gasnetc_conn_dynamic) { GASNETI_TRACE_PRINTF(I, ("Dynamic connection has been disabled at user request")); } else if (gasnetc_conn_static && !gasnetc_connectfile_in) { GASNETI_TRACE_PRINTF(I, ("Dynamic connection automatically disabled for fully-connected job")); } else { /* TODO: allow env var to select specific port for UD */ gasnetc_qp_setup_ud(&gasnetc_port_tbl[0], fully_connected); } #else GASNETI_TRACE_PRINTF(I, ("Dynamic connection was disabled at library build time")); #endif return GASNET_OK; } /* gasnetc_connect_init */ /* ------------------------------------------------------------------------------------ */ /* Support code for gasneti_conn_fini */ static char dump_conn_line[512] = ""; static gex_Rank_t dump_conn_first = GASNET_MAXNODES; static gex_Rank_t dump_conn_prev; static void dump_conn_write(int fd, const char *buf, size_t len) { /* TODO: loop w/ retry on short writes? */ ssize_t rc = write(fd, buf, len); if_pf (rc != len) { gasneti_fatalerror("Write to connection file failed or truncated: rc=%"PRIdPTR" errno=%s(%i)", (intptr_t)rc, strerror(errno), errno); } } static void dump_conn_outln(int fd) { static char fullline[96]; static size_t taglen = 0; size_t len; if_pf (!taglen) { taglen = gen_tag(fullline, sizeof(fullline), gasneti_mynode, gasnetc_connectfile_out_base); } len = strlen(dump_conn_line+1); GASNETI_MEMCPY(fullline+taglen, dump_conn_line+1, len); len += taglen; fullline[len] = '\n'; dump_conn_write(fd, fullline, len+1); } static void dump_conn_out(int fd) { char elem[35]; size_t len, tmp; /* Leading space */ elem[0] = ' '; len = 1; /* dump_conn_first foramtted with desired base */ tmp = ltostr(elem+len, sizeof(elem)-len, dump_conn_first, gasnetc_connectfile_out_base); gasneti_assert(tmp != 0); len += tmp; if (dump_conn_prev != dump_conn_first) { /* Choose ' ' or '-' as separator */ elem[len++] = ((dump_conn_prev - dump_conn_first) > 1) ? '-' : ' '; /* dump_conn_prev foramtted with desired base */ tmp = ltostr(elem+len, sizeof(elem)-len, dump_conn_prev, gasnetc_connectfile_out_base); gasneti_assert(tmp != 0); len += tmp; elem[len] = '\0'; } gasneti_assert(len == strlen(elem)); gasneti_assert(len < sizeof(elem)); if (strlen(dump_conn_line) + len < sizeof(dump_conn_line)) { strcat(dump_conn_line, elem); } else { dump_conn_outln(fd); strcpy(dump_conn_line, elem); } } static void dump_conn_next(int fd, gex_Rank_t n) { if (dump_conn_first == GASNET_MAXNODES) { dump_conn_first = dump_conn_prev = n; return; } else if (n == dump_conn_prev+1) { dump_conn_prev = n; return; } dump_conn_out(fd); dump_conn_first = dump_conn_prev = n; } static void dump_conn_done(int fd) { if (dump_conn_first == GASNET_MAXNODES) return; dump_conn_out(fd); dump_conn_outln(fd); close(fd); } /* ------------------------------------------------------------------------------------ */ /* Fini optionally dumps the connection table and connect stats. */ extern int gasnetc_connect_fini(gasnetc_EP_t ep0) { gex_Rank_t n, count = 0; int fd = -1; /* Open file replacing any '%' in filename with node number */ { const char *envstr = gasnetc_connectfile_out; if (envstr) { const char *filename = gasnetc_parse_filename(envstr); int flags = O_APPEND | O_CREAT | O_WRONLY; #ifdef O_LARGEFILE flags |= O_LARGEFILE; #endif fd = open(filename, flags, S_IRUSR | S_IWUSR); if (fd < 0) { gasneti_console_message("ERROR","unable to open connection table output file '%s'", filename); } if (filename != envstr) gasneti_free((/* not const */ char *)filename); if (!gasneti_mynode || strchr(envstr, '%')) { char buf[16]; size_t len; int rc = ftruncate(fd,0); if_pf (rc < 0) { gasneti_fatalerror("Failed to truncate connection file: rc=%d errno=%s(%i)", rc, strerror(errno), errno); } len = snprintf(buf, sizeof(buf), "size:%d\n", gasneti_nodes); dump_conn_write(fd, buf, len); len = snprintf(buf, sizeof(buf), "base:%d\n", gasnetc_connectfile_out_base); dump_conn_write(fd, buf, len); } gasneti_bootstrapBarrier(); } } for (n = 0; n < gasneti_nodes; ++n) { gasnetc_cep_t *cep = GASNETC_NODE2CEP(ep0, n); int qpi; if (!cep) continue; for (qpi=0; qpi= 0) dump_conn_next(fd, n); ++count; break; } } } if (fd >= 0) dump_conn_done(fd); GASNETI_TRACE_PRINTF(C, ("Network traffic sent to %d of %d ranks", (int)count, (int)gasneti_nodes)); return GASNET_OK; } /* gasnetc_connect_fini */ /* ------------------------------------------------------------------------------------ */ #if GASNETC_IBV_SHUTDOWN /* Shutdown stops the progress thread (if any) and destroys all QPs. */ extern void gasnetc_connect_shutdown(gasnetc_EP_t ep0) { const int retries = 5; int trial; /* Stop progress thread */ #if GASNETC_USE_CONN_THREAD if (conn_thread.fn == gasnetc_conn_thread) { gasnetc_stop_progress_thread(&conn_thread, 1); } #endif /* Drain any outstanding sends */ #if GASNETC_USE_CONN_THREAD if (conn_ud_snd_cq) { int remain = gasnetc_ud_snds; GASNETI_SPIN_WHILE(remain, { conn_snd_poll(); remain -= conn_sema_partial(conn_ud_sema_p, remain); }); } #else /* conn_ud_hca->snd_cq, if any, has already been drained */ gasneti_assert((NULL == conn_ud_sema_p) || (0 == gasnetc_sema_read(conn_ud_sema_p))); #endif /* TODO: is this retry loop still necessary? */ for (trial = 0; trial < retries; ++trial) { int failed = 0; int node, qpi; for (node = 0; node < gasneti_nodes; ++node) { gasnetc_cep_t *cep = GASNETC_NODE2CEP(ep0, node); if (!cep) continue; for (qpi = 0; qpi < gasnetc_alloc_qps; ++qpi, ++cep) { #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { gasnetc_xrc_snd_qp_t *xrc_snd_qp = qpi + GASNETC_NODE2SND_QP(node); if (xrc_snd_qp->handle) { if (0 == ibv_destroy_qp(xrc_snd_qp->handle)) { xrc_snd_qp->handle = NULL; } else { failed = 1; } } } else #endif if (cep->qp_handle) { if (0 == ibv_destroy_qp(cep->qp_handle)) { cep->qp_handle = NULL; } else { failed = 1; } } } } #if GASNETC_IBV_XRC if (gasnetc_use_xrc) { for (node = 0; node < gasneti_nodes; ++node) { gasnetc_cep_t *cep = GASNETC_NODE2CEP(ep0, node); if (cep) { const int cep_idx = node * gasnetc_alloc_qps; gasneti_atomic32_t *rcv_qpn_p = (gasneti_atomic32_t *)(&gasnetc_xrc_rcv_qpn[cep_idx]); for (qpi = 0; qpi < gasnetc_alloc_qps; ++qpi, ++cep, ++rcv_qpn_p) { uint32_t rcv_qpn = gasneti_atomic32_read(rcv_qpn_p, 0); if (rcv_qpn > 1) { #if GASNETC_IBV_XRC_OFED int ret = ibv_destroy_qp(cep->rcv_qp); GASNETC_IBV_CHECK(ret, "from ibv_destroy_qp(rcv_qp)"); #elif GASNETC_IBV_XRC_MLNX int ret = ibv_unreg_xrc_rcv_qp(cep->hca->xrc_domain, rcv_qpn); GASNETC_IBV_CHECK(ret, "ibv_unreg_xrc_rcv_qp(rcv_qpn)"); #endif } } } } } #endif if (conn_ud_qp) { if (0 == ibv_destroy_qp(conn_ud_qp)) { conn_ud_qp = NULL; gasnetc_unpin(conn_ud_hca, &conn_ud_reg); gasnetc_unmap(&conn_ud_reg); gasneti_lifo_init(&conn_snd_freelist); } else { failed = 1; } } #if GASNETC_USE_CONN_THREAD if (conn_ud_snd_cq) { if (0 == ibv_destroy_cq(conn_ud_snd_cq)) { conn_ud_snd_cq = NULL; } else { failed = 1; } } if (conn_ud_rcv_cq) { if (0 == ibv_destroy_cq(conn_ud_rcv_cq)) { conn_ud_rcv_cq = NULL; } else { failed = 1; } } if (conn_thread.compl) { if (0 == ibv_destroy_comp_channel(conn_thread.compl)) { conn_thread.compl = NULL; } else { failed = 1; } } #endif if (!failed) break; GASNETI_TRACE_PRINTF(C, ("Connection shutdown attempt %d failed. Sleeping 1 second.", trial)); sleep(1); } if (trial == retries) { GASNETI_TRACE_PRINTF(C, ("Connection shutdown failed after %d attempts.", retries)); } } /* gasnetc_connect_shutdown */ #endif /* GASNETC_IBV_SHUTDOWN */ gasnet-2025.8.0/ibv-conduit/gasnet_extended.c0000664000175000017500000002512015142313673021152 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_extended.c $ * Description: GASNet Extended API over IB Verbs Implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include // for refbarrier.c #include #include #include /* ------------------------------------------------------------------------------------ */ /* Extended API Common Code ======================== Factored bits of extended API code common to most conduits, overridable when necessary */ extern void gasnetc_new_threaddata_callback(void **core_threadinfo); #define GASNETC_NEW_THREADDATA_CALLBACK(td) gasnetc_new_threaddata_callback(&((td)->gasnetc_threaddata)) #include "gasnet_extended_common.c" /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* called at startup to check configuration sanity */ static void gasnete_check_config(void) { gasneti_check_config_postattach(); gasnete_check_config_amref(); gasneti_assert(sizeof(gasnete_eop_t) >= sizeof(void*)); } extern void gasnete_init(void) { static int firstcall = 1; GASNETI_TRACE_PRINTF(C,("gasnete_init()")); gasneti_assert(firstcall); /* make sure we haven't been called before */ firstcall = 0; gasnete_check_config(); /* check for sanity */ gasneti_assert(gasneti_nodes >= 1 && gasneti_mynode < gasneti_nodes); { gasneti_threaddata_t *threaddata = NULL; #if GASNETI_MAX_THREADS > 1 /* register first thread (optimization) */ threaddata = _gasneti_mythread_slow(); #else /* register only thread (required) */ threaddata = gasnete_new_threaddata(); #endif #if !GASNETI_DISABLE_REFERENCE_EOP /* cause the first pool of eops to be allocated (optimization) */ GASNET_POST_THREADINFO(threaddata); gasnete_eop_t *eop = gasnete_eop_new(threaddata); GASNETE_EOP_MARKDONE(eop); gasnete_eop_free(eop GASNETI_THREAD_PASS); #endif } /* Initialize barrier resources */ gasnete_barrier_init(); /* Initialize team/collectives */ gasnete_coll_init_subsystem(); /* Initialize VIS subsystem */ gasnete_vis_init(); } /* ------------------------------------------------------------------------------------ */ /* Get/Put: ======== */ /* Use some or all of the reference implementation of get/put in terms of AMs * Configuration appears in gasnet_extended_fwd.h */ #include "gasnet_extended_amref.c" /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (explicit event) ========================================================== */ /* ------------------------------------------------------------------------------------ */ /* Conduits not using the gasnete_amref_ versions should implement at least the following: gasnete_get_nb gasnete_put_nb */ extern gex_Event_t gasnete_get_nb( gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_eop_t *op = gasnete_eop_new(GASNETI_MYTHREAD); /* XXX check error returns */ gasnetc_rdma_get(tm, rank, src, dest, nbytes, flags, &op->initiated_cnt, gasnetc_cb_eop_get GASNETI_THREAD_PASS); return (gex_Event_t)op; } extern gex_Event_t gasnete_put_nb( gex_TM_t tm, gex_Rank_t rank, void *dest, void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_eop_t *op = gasnete_eop_new(GASNETI_MYTHREAD); /* XXX check error returns */ #define GASNETC_RDMA_PUT(local_cnt, local_cb) \ gasnetc_rdma_put(tm, rank, src, dest, nbytes, flags, \ local_cnt, local_cb, \ &op->initiated_cnt, gasnetc_cb_eop_put \ GASNETI_THREAD_PASS) if (lc_opt == GEX_EVENT_NOW) { gasnetc_counter_t counter = GASNETC_COUNTER_INITIALIZER; GASNETC_RDMA_PUT(&counter.initiated, gasnetc_cb_counter); gasnetc_counter_wait(&counter, 0 GASNETI_THREAD_PASS); } else if (lc_opt == GEX_EVENT_DEFER) { GASNETC_RDMA_PUT(NULL, NULL); } else { gasneti_assume_leaf_is_pointer(lc_opt); GASNETE_EOP_LC_START(op); gasnetc_atomic_val_t start_cnt = op->initiated_alc; GASNETC_RDMA_PUT(&op->initiated_alc, gasnetc_cb_eop_alc); if (start_cnt == op->initiated_alc) { // Synchronous LC - reset the eop's LC state GASNETE_EOP_LC_FINISH(op); *lc_opt = GEX_EVENT_INVALID; } else { *lc_opt = gasneti_op_event(op, gasnete_eop_event_alc); } } return (gex_Event_t)op; } #undef GASNETC_RDMA_PUT /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (implicit event) ========================================================== */ /* ------------------------------------------------------------------------------------ */ /* Conduits not using the gasnete_amref_ versions should implement at least the following: gasnete_get_nbi gasnete_put_nbi */ extern int gasnete_get_nbi (gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t *op = mythread->current_iop; /* XXX check error returns */ gasnetc_rdma_get(tm, rank, src, dest, nbytes, flags, &op->initiated_get_cnt, op->next ? gasnetc_cb_nar_get : gasnetc_cb_iop_get GASNETI_THREAD_PASS); return 0; } extern int gasnete_put_nbi (gex_TM_t tm, gex_Rank_t rank, void *dest, void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t *op = mythread->current_iop; gasnetc_counter_t counter = GASNETC_COUNTER_INITIALIZER; gasnetc_atomic_val_t *local_cnt; gasnetc_cb_t local_cb; if (lc_opt == GEX_EVENT_GROUP) { local_cnt = &op->initiated_alc_cnt; local_cb = op->next ? gasnetc_cb_nar_alc : gasnetc_cb_iop_alc; } else if (lc_opt == GEX_EVENT_NOW) { local_cnt = &counter.initiated; local_cb = gasnetc_cb_counter; } else if (lc_opt == GEX_EVENT_DEFER) { local_cnt = NULL; local_cb = NULL; } else { gasneti_fatalerror("Invalid lc_opt argument to Put_nbi"); } /* XXX check error returns */ gasnetc_rdma_put(tm, rank, src, dest, nbytes, flags, local_cnt, local_cb, &op->initiated_put_cnt, op->next ? gasnetc_cb_nar_put : gasnetc_cb_iop_put GASNETI_THREAD_PASS); if (lc_opt == GEX_EVENT_NOW) gasnetc_counter_wait(&counter, 0 GASNETI_THREAD_PASS); return 0; } /* ------------------------------------------------------------------------------------ */ /* Blocking memory-to-memory transfers =================================== */ extern int gasnete_get (gex_TM_t tm, void* dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnetc_counter_t req_oust = GASNETC_COUNTER_INITIALIZER; /* XXX check error returns */ gasnetc_rdma_get(tm, rank, src, dest, nbytes, flags, &req_oust.initiated, gasnetc_cb_counter_rel GASNETI_THREAD_PASS); gasnetc_counter_wait(&req_oust, 0 GASNETI_THREAD_PASS); return 0; } extern int gasnete_put (gex_TM_t tm, gex_Rank_t rank, void* dest, /*const*/ void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnetc_counter_t req_oust = GASNETC_COUNTER_INITIALIZER; /* XXX check error returns */ gasnetc_rdma_put(tm, rank, src, dest, nbytes, flags, NULL, NULL, &req_oust.initiated, gasnetc_cb_counter GASNETI_THREAD_PASS); gasnetc_counter_wait(&req_oust, 0 GASNETI_THREAD_PASS); return 0; } /* ------------------------------------------------------------------------------------ */ /* Barriers: ========= */ // GASNET_BARRIER="IBDISSEM" is now an alias for "RDMADISSEM" #define GASNETE_BARRIER_READENV() do { \ if (GASNETE_ISBARRIER("IBDISSEM")) \ gasnete_coll_default_barrier_type = GASNETE_COLL_BARRIER_RDMADISSEM;\ } while (0) #define GASNETE_CONDUIT_RDMABARRIER(barrier, retval_ptr) \ (!strcmp(barrier,"IBDISSEM")) /* use reference implementation of barrier */ #define GASNETI_GASNET_EXTENDED_REFBARRIER_C 1 #include "gasnet_extended_refbarrier.c" #undef GASNETI_GASNET_EXTENDED_REFBARRIER_C /* ------------------------------------------------------------------------------------ */ /* Vector, Indexed & Strided: ========================= */ /* use reference implementation of scatter/gather and strided */ #include "gasnet_refvis.h" /* ------------------------------------------------------------------------------------ */ /* Collectives: ============ */ /* use reference implementation of collectives */ #include "gasnet_refcoll.h" /* ------------------------------------------------------------------------------------ */ /* Remote Atomics: ============== */ /* use reference implementation of remote atomics */ #include "gasnet_refratomic.h" /* ------------------------------------------------------------------------------------ */ /* Handlers: ========= */ static gex_AM_Entry_t const gasnete_handlers[] = { #ifdef GASNETE_REFBARRIER_HANDLERS GASNETE_REFBARRIER_HANDLERS(), #endif #ifdef GASNETE_REFVIS_HANDLERS GASNETE_REFVIS_HANDLERS() #endif #ifdef GASNETE_REFCOLL_HANDLERS GASNETE_REFCOLL_HANDLERS() #endif #ifdef GASNETE_AMREF_HANDLERS GASNETE_AMREF_HANDLERS() #endif #ifdef GASNETE_AMRATOMIC_HANDLERS GASNETE_AMRATOMIC_HANDLERS() #endif /* ptr-width independent handlers */ /* ptr-width dependent handlers */ GASNETI_HANDLER_EOT }; extern gex_AM_Entry_t const *gasnete_get_handlertable(void) { return gasnete_handlers; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/ibv-conduit/gasnet_ibv.h0000664000175000017500000000404215142313673020137 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_core_internal.h $ * Description: GASNet ibv conduit header for internal defns common to Core & Extended APIs * Copyright 2016, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _GASNET_IBV_H #define _GASNET_IBV_H #include /* ------------------------------------------------------------------------------------ * * Common op completion logic * ------------------------------------------------------------------------------------ */ // TODO-EX: the iop values of this enum are currently unused typedef enum { gasnetc_comptype_eop_alc, gasnetc_comptype_eop_get, gasnetc_comptype_eop_put, gasnetc_comptype_iop_alc, gasnetc_comptype_iop_get, gasnetc_comptype_iop_put, } gasnetc_comptype_t; GASNETI_INLINE(gasnetc_complete_eop) int gasnetc_complete_eop(gasnete_eop_t *eop, gasnetc_comptype_t type) { // Advance and test the proper counter gasnete_op_t *op = (gasnete_op_t*)eop; gasnetc_atomic_val_t completed; gasnetc_atomic_val_t initiated; switch (type) { case gasnetc_comptype_eop_alc: completed = gasnetc_atomic_add(&eop->completed_alc, 1, GASNETI_ATOMIC_ACQ); initiated = eop->initiated_alc; break; case gasnetc_comptype_eop_put: completed = gasnetc_atomic_add(&eop->completed_cnt, 1, GASNETI_ATOMIC_ACQ); initiated = eop->initiated_cnt; break; case gasnetc_comptype_eop_get: completed = gasnetc_atomic_add(&eop->completed_cnt, 1, GASNETI_ATOMIC_ACQ | GASNETI_ATOMIC_REL); initiated = eop->initiated_cnt; break; default: gasneti_unreachable(); } if (completed == (initiated & GASNETI_ATOMIC_MAX)) { switch (type) { case gasnetc_comptype_eop_alc: GASNETE_EOP_LC_FINISH(op); break; case gasnetc_comptype_eop_put: case gasnetc_comptype_eop_get: GASNETE_EOP_MARKDONE(op); break; default: gasneti_unreachable(); } return 1; } return 0; } #endif gasnet-2025.8.0/ibv-conduit/gasnet_core.h0000664000175000017500000001415215142313673020312 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_core.h $ * Description: GASNet header for ibv conduit core * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_H #define _GASNET_CORE_H #include /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ extern void gasnetc_exit(int _exitcode) GASNETI_NORETURN; GASNETI_NORETURNP(gasnetc_exit) #define gasnet_exit gasnetc_exit /* Some conduits permit gasnet_init(NULL,NULL). Define to 1 if this conduit supports this extension, or to 0 otherwise. */ #if !HAVE_MPI_SPAWNER || (GASNETI_MPI_VERSION >= 2) #define GASNET_NULL_ARGV_OK 1 #else #define GASNET_NULL_ARGV_OK 0 #endif /* ------------------------------------------------------------------------------------ */ extern int gasnetc_Client_Init( gex_Client_t *_client_p, gex_EP_t *_ep_p, gex_TM_t *_tm_p, const char *_clientName, int *_argc, char ***_argv, gex_Flags_t _flags); // gasnetex.h handles name-shifting of gex_Client_Init() /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ typedef struct { gasneti_mutex_t lock; #if GASNETI_STATS_OR_TRACE gasneti_tick_t acquiretime; #endif } gex_HSL_t; #if GASNETI_STATS_OR_TRACE #define GASNETC_LOCK_STAT_INIT ,0 #else #define GASNETC_LOCK_STAT_INIT #endif #define GEX_HSL_INITIALIZER { \ GASNETI_MUTEX_INITIALIZER \ GASNETC_LOCK_STAT_INIT \ } /* decide whether we have "real" HSL's */ #if GASNETI_THREADS || /* need for safety */ \ GASNET_DEBUG || GASNETI_STATS_OR_TRACE /* or debug/tracing */ #ifdef GASNETC_NULL_HSL #error bad defn of GASNETC_NULL_HSL #endif #else #define GASNETC_NULL_HSL 1 #endif #if GASNETC_NULL_HSL /* HSL's unnecessary - compile away to nothing */ #define gex_HSL_Init(hsl) #define gex_HSL_Destroy(hsl) #define gex_HSL_Lock(hsl) #define gex_HSL_Unlock(hsl) #define gex_HSL_Trylock(hsl) GASNET_OK #else extern void gasnetc_hsl_init (gex_HSL_t *_hsl); extern void gasnetc_hsl_destroy(gex_HSL_t *_hsl); extern void gasnetc_hsl_lock (gex_HSL_t *_hsl); extern void gasnetc_hsl_unlock (gex_HSL_t *_hsl); extern int gasnetc_hsl_trylock(gex_HSL_t *_hsl) GASNETI_WARN_UNUSED_RESULT; #define gex_HSL_Init gasnetc_hsl_init #define gex_HSL_Destroy gasnetc_hsl_destroy #define gex_HSL_Lock gasnetc_hsl_lock #define gex_HSL_Unlock gasnetc_hsl_unlock #define gex_HSL_Trylock gasnetc_hsl_trylock #endif /* ------------------------------------------------------------------------------------ */ /* Active Message Size Limits ========================== */ #define GASNETC_MEDIUM_HDRSZ (4) #define GASNETC_LONG_HDRSZ (SIZEOF_VOID_P + 4) #define GASNETC_MAX_ARGS_USER 16 #define GASNETC_MAX_ARGS_EXTRA 1 /* For flow-control info */ #define GASNETC_MAX_ARGS (GASNETC_MAX_ARGS_USER + GASNETC_MAX_ARGS_EXTRA) #define GASNETC_MAX_MEDIUM_(nargs) \ (GASNETC_BUFSZ - \ GASNETI_ALIGNUP_NOASSERT(GASNETC_MEDIUM_HDRSZ + 4*(GASNETC_MAX_ARGS_EXTRA+(nargs)), \ 8)) #define GASNETC_MAX_MEDIUM GASNETC_MAX_MEDIUM_(GASNETC_MAX_ARGS_USER) #define GASNETC_MAX_LONG_REQ (0x7fffffff) #define GASNETC_MAX_PACKEDLONG_(nargs) \ (GASNETC_BUFSZ - \ GASNETI_ALIGNUP_NOASSERT(GASNETC_LONG_HDRSZ + 4*(GASNETC_MAX_ARGS_EXTRA+(nargs)), \ 8)) #define GASNETC_MAX_PACKEDLONG GASNETC_MAX_PACKEDLONG_(GASNETC_MAX_ARGS_USER) #if GASNETC_PIN_SEGMENT #define GASNETC_MAX_LONG_REP GASNETC_MAX_LONG_REQ #else #define GASNETC_MAX_LONG_REP GASNETC_MAX_PACKEDLONG #endif #define gex_AM_MaxArgs() ((unsigned int)GASNETC_MAX_ARGS_USER) #define gex_AM_LUBRequestMedium() ((size_t)GASNETC_MAX_MEDIUM) #define gex_AM_LUBReplyMedium() ((size_t)GASNETC_MAX_MEDIUM) #define gex_AM_LUBRequestLong() ((size_t)GASNETC_MAX_LONG_REQ) #define gex_AM_LUBReplyLong() ((size_t)GASNETC_MAX_LONG_REP) // TODO-EX: Medium sizes can be further improved upon for PSHM case #define gasnetc_AM_MaxRequestMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,flags),(size_t)GASNETC_MAX_MEDIUM_(nargs)) #define gasnetc_AM_MaxReplyMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,flags),(size_t)GASNETC_MAX_MEDIUM_(nargs)) #define gasnetc_Token_MaxReplyMedium(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS3(token,lc_opt,flags),(size_t)GASNETC_MAX_MEDIUM_(nargs)) #define gasnetc_AM_MaxRequestLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_MAX_PACKEDLONG_(nargs) \ : gex_AM_LUBRequestLong())) #define gasnetc_AM_MaxReplyLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_MAX_PACKEDLONG_(nargs) \ : gex_AM_LUBReplyLong())) #define gasnetc_Token_MaxReplyLong(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS3(token,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_MAX_PACKEDLONG_(nargs) \ : gex_AM_LUBReplyLong())) /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #define GASNET_BLOCKUNTIL(cond) gasneti_polluntil(cond) /* ------------------------------------------------------------------------------------ */ #endif #include gasnet-2025.8.0/ibv-conduit/gasnet_extended_fwd.h0000664000175000017500000000644715142313673022032 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_extended_fwd.h $ * Description: GASNet Extended API Header (forward decls) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_EXTENDED_FWD_H #define _GASNET_EXTENDED_FWD_H #include #define GASNET_EXTENDED_VERSION GASNET_CORE_VERSION #define GASNET_EXTENDED_VERSION_STR _STRINGIFY(GASNET_EXTENDED_VERSION) #define GASNET_EXTENDED_NAME IBV #define GASNET_EXTENDED_NAME_STR _STRINGIFY(GASNET_EXTENDED_NAME) /* Addition(s) to barrier-types enum: */ #define GASNETE_COLL_CONDUIT_BARRIERS \ GASNETE_COLL_BARRIER_IBDISSEM #define GASNETI_EOP_IS_HANDLE 1 /* if conduit-internal threads may call the Extended API and/or they may run progress functions, then define GASNETE_CONDUIT_THREADS_USING_TD to the maximum COUNT of such threads to allocate space for their threaddata */ /* Each RCV thread needs a slot in the threadtable. The CONN thread doesn't. */ #if GASNETC_IBV_RCV_THREAD #ifdef GASNETC_IBV_MAX_HCAS_CONFIGURE #define GASNETE_CONDUIT_THREADS_USING_TD GASNETC_IBV_MAX_HCAS_CONFIGURE #else #define GASNETE_CONDUIT_THREADS_USING_TD 1 #endif #endif /* this can be used to add statistical collection values specific to the extended API implementation (see gasnet_help.h) */ #define GASNETE_CONDUIT_STATS(CNT,VAL,TIME) \ GASNETI_VIS_STATS(CNT,VAL,TIME) \ GASNETI_COLL_STATS(CNT,VAL,TIME) \ GASNETI_RATOMIC_STATS(CNT,VAL,TIME) \ GASNETI_FIREHOSE_STATS(CNT,VAL,TIME) \ CNT(C, DYNAMIC_THREADLOOKUP, cnt) #define GASNETE_AUXSEG_DECLS \ extern gasneti_auxseg_request_t gasnete_barr_auxseg_alloc(gasnet_seginfo_t *auxseg_info); #define GASNETE_AUXSEG_FNS() gasnete_barr_auxseg_alloc, /* We perform these blocking ops w/o the overhead of eop alloc/free: */ #define GASNETI_DIRECT_BLOCKING_GET 1 #define GASNETI_DIRECT_BLOCKING_PUT 1 /* Configure use of AM-based implementation of get/put */ /* NOTE: Barriers, Collectives, VIS may use GASNETE_USING_REF_* in algorithm selection */ // We want to call the amref versions for out-of-segment cases #define GASNETE_BUILD_AMREF_GET_HANDLERS 1 #define GASNETE_BUILD_AMREF_GET 1 #define GASNETE_BUILD_AMREF_PUT_HANDLERS 1 #define GASNETE_BUILD_AMREF_PUT 1 #if !defined(GASNET_DISABLE_MUNMAP_DEFAULT) && PLATFORM_ARCH_64 // default to disabling munmap due to bug 955 (firhose correctness) and bug 4164 (odp performance) #define GASNET_DISABLE_MUNMAP_DEFAULT 1 #endif // this VIS algorithm uses put/get with local-side buffers that are dynamically malloced and freed, // thus is only safe if we disabled malloc munmap to avoid running afowl of firehose bug3364/bug955 #ifdef PLATFORM_OS_SOLARIS // Does not suffer from bug 955 #define GASNETE_USE_REMOTECONTIG_GATHER_SCATTER_DEFAULT 1 #else // Linux and others, assume the worst #define GASNETE_USE_REMOTECONTIG_GATHER_SCATTER_DEFAULT gasneti_malloc_munmap_disabled #endif // Configure default VIS tuning knobs // 2020/3/8: Measurements on multiple systems show 3kb is a reasonable default (with NPAM and 64kb maxmedium) #define GASNETE_VIS_MAXCHUNK_DEFAULT 3072 #endif gasnet-2025.8.0/ibv-conduit/gasnet_core.c0000664000175000017500000071034515142313673020314 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_core.c $ * Description: GASNet ibv conduit Implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #define GASNETI_NEED_GASNET_MK_H 1 #include #include #include #include // access to eop and iop #include #include #include #include #include // (U)INT_MAX #include #include // ntohs() should be in one of these: #include #include GASNETI_IDENT(gasnetc_IdentString_Version, "$GASNetCoreLibraryVersion: " GASNET_CORE_VERSION_STR " $"); GASNETI_IDENT(gasnetc_IdentString_Name, "$GASNetCoreLibraryName: " GASNET_CORE_NAME_STR " $"); #if GASNETC_IBV_SRQ GASNETI_IDENT(gasnetc_IdentString_SRQ, "$GASNetIbvSRQ: 1 $"); #endif #if GASNETC_IBV_XRC GASNETI_IDENT(gasnetc_IdentString_XRC, "$GASNetIbvXRC: 1 $"); #if GASNETC_IBV_XRC_MLNX GASNETI_IDENT(gasnetc_IdentString_XRCAPI, "$GASNetIbvXRCAPI: Mellanox $"); #else GASNETI_IDENT(gasnetc_IdentString_XRCAPI, "$GASNetIbvXRCAPI: rdma-core $"); #endif #endif #if GASNETC_IBV_ODP GASNETI_IDENT(gasnetc_IdentString_ODP, "$GASNetIbvODP: 1 $"); #if GASNETC_IBV_ODP_MLNX GASNETI_IDENT(gasnetc_IdentString_ODPAPI, "$GASNetIbvODPAPI: Mellanox $"); #else GASNETI_IDENT(gasnetc_IdentString_ODPAPI, "$GASNetIbvODPAPI: rdma-core $"); #endif #endif GASNETI_IDENT(gasnetc_IdentString_AMMaxMedium, "$GASNetAMMaxMedium: " _STRINGIFY(GASNETC_IBV_MAX_MEDIUM) " $"); GASNETI_IDENT(gasnetc_IdentString_MaxHCAs, "$GASNetIbvMaxHCAs: " _STRINGIFY(GASNETC_IB_MAX_HCAS) " $"); #if GASNETC_IBV_MAX_HCAS_CONFIGURE GASNETI_IDENT(gasnetc_IdentString_Multirail, "$GASNetIbvMultirail: 1 $"); #endif #if GASNETC_USE_RCV_THREAD GASNETI_IDENT(gasnetc_IdentString_RcvThread, "$GASNetIbvRcvThread: 1 $"); #endif #if GASNETC_USE_SND_THREAD GASNETI_IDENT(gasnetc_IdentString_SndThread, "$GASNetIbvSndThread: 1 $"); #endif #if GASNETC_USE_CONN_THREAD GASNETI_IDENT(gasnetc_IdentString_ConnThread, "$GASNetIbvConnThread: 1 $"); #endif #if GASNETC_SERIALIZE_POLL_CQ GASNETI_IDENT(gasnetc_IdentString_SerializeCqPoll, "$GASNetIbvSerializeCqPoll: 1 $"); #endif int gex_System_QueryHiddenAMConcurrencyLevel(void) { #if !GASNETC_USE_RCV_THREAD gasneti_assert(! gasnetc_use_rcv_thread); #endif return gasnetc_use_rcv_thread ? 1 : 0; } gasnetc_EP_t gasnetc_ep0; // First EP created. Used by init, sys AMs, and shutdown. size_t gasnetc_sizeof_segment_t(void) { gasnetc_Segment_t segment; return sizeof(*segment); } size_t gasnetc_sizeof_ep_t(void) { gasnetc_EP_t ep; return sizeof(*ep); } /* ------------------------------------------------------------------------------------ */ /* Configuration ============== */ /* Minimum memory to reserve for firehoses in SEGMENT_FAST: */ #define GASNETC_MIN_FH_MEM (16*1024*1024) /* The following values can be overridden by environment variables. Variable names are formed by replacing GASNETC_DEFAULT_ by GASNET_ */ /* Default is to open one physical port per HCA */ #ifdef GASNETC_IBV_PORTS_CONFIGURE #define GASNETC_DEFAULT_IBV_PORTS GASNETC_IBV_PORTS_CONFIGURE #else #define GASNETC_DEFAULT_IBV_PORTS "" #endif /* Limits on in-flight (queued but not reaped) RDMA Ops */ #define GASNETC_DEFAULT_NETWORKDEPTH_TOTAL 255 /* Max ops (RDMA + AM) outstanding at source */ #define GASNETC_DEFAULT_NETWORKDEPTH_PP 24 /* Max ops (RDMA + AM) outstanding to each peer */ /* Limits on in-flight (queued but not acknowledged) AM Requests */ #define GASNETC_DEFAULT_AM_CREDITS_TOTAL MIN(256,(gasneti_nodes-1)*gasnetc_am_oust_pp) /* Max AM requests outstanding at source, 0 = automatic */ #define GASNETC_DEFAULT_AM_CREDITS_PP 12 /* Max AM requests outstanding to each peer */ #define GASNETC_DEFAULT_AM_CREDITS_SLACK 1 /* Max AM credits delayed by coalescing */ /* Limit on prepinned send bounce buffers */ #define GASNETC_DEFAULT_BBUF_COUNT 1024 /* Max bounce buffers prepinned, 0 = automatic */ /* Limit on AM recv buffers when using SRQ */ #define GASNETC_DEFAULT_RBUF_COUNT 1024 /* Max SRQ receive buffers posted, 0 = automatic */ /* Use of multiple QPs */ #define GASNETC_DEFAULT_NUM_QPS 0 /* 0 = one per HCA */ /* Protocol switch points */ #define GASNETC_DEFAULT_INLINESEND_LIMIT 72 #define GASNETC_DEFAULT_NONBULKPUT_BOUNCE_LIMIT (64*1024) #define GASNETC_DEFAULT_PACKEDLONG_LIMIT 4012 // See bug 4044 for discussion re: increasing this #if !GASNETC_PIN_SEGMENT #define GASNETC_DEFAULT_PUTINMOVE_LIMIT GASNETC_PUTINMOVE_LIMIT_MAX #endif size_t gasnetc_am_gather_min; #define GASNETC_DEFAULT_AM_GATHER_MIN 1500 #define GASNETC_DEFAULT_PUT_STRIPE_SZ 0 // Disabled by default #define GASNETC_DEFAULT_GET_STRIPE_SZ 0 // Disabled by default #define GASNETC_MINIMUM_PUT_STRIPE_SZ 4096 #define GASNETC_MINIMUM_GET_STRIPE_SZ 4096 /* Exit coordination timeouts */ #define GASNETC_DEFAULT_EXITTIMEOUT_MAX 480.0 // 8 min - extrapolated from Summit data in bug 4360 #define GASNETC_DEFAULT_EXITTIMEOUT_MIN 2.0 // 2 sec #define GASNETC_DEFAULT_EXITTIMEOUT_FACTOR 0.25 // 1/4 second per process static double gasnetc_exittimeout = GASNETC_DEFAULT_EXITTIMEOUT_MAX; /* Exit coordination setup */ static void gasnetc_exit_init(void); /* Maximum MTU (will silently lower to port capability) */ enum ibv_mtu gasnetc_max_mtu; /* HW level retry knobs */ int gasnetc_qp_timeout, gasnetc_qp_retry_count; #define GASNETC_DEFAULT_QP_TIMEOUT 18 /* about 1s */ #define GASNETC_DEFAULT_QP_RETRY_COUNT 7 #ifndef MT_MELLANOX_IEEE_VENDOR_ID #define MT_MELLANOX_IEEE_VENDOR_ID 0x02c9 #endif #ifndef PCI_DEVICE_ID_MELLANOX_TAVOR #define PCI_DEVICE_ID_MELLANOX_TAVOR 0x5a44 #endif static int gasnetc_exit_in_signal = 0; // to avoid certain things in signal context /* ------------------------------------------------------------------------------------ */ /* conduit-specific firehose region parameters * Note that these are kept to sane sizes rather than the HCA limit * 128kB is the peak of the bandwidth curve and thus a good size. * Some adapters have no limit on the number of regions supported (Omni-Path), * in which case we substitute gasnetc_fh_maxregions for the HCA queried value. * With 16m * 128KB we can pin up to 2TB of physical memory per host. * Note that GASNET_FIREHOSE_* env vars can override these. */ static unsigned int gasnetc_fh_maxregions = 16777216; static unsigned int gasnetc_fh_maxsize = 131072; /* ------------------------------------------------------------------------------------ */ #if (GASNETC_IB_MAX_HCAS > 1) int gasnetc_num_hcas = 1; int gasnetc_snd_poll_multi_hcas; int gasnetc_rcv_poll_multi_hcas; #endif gasnetc_hca_t gasnetc_hca[GASNETC_IB_MAX_HCAS]; uintptr_t gasnetc_max_msg_sz; int gasnetc_qp_rd_atom; gasnetc_port_info_t *gasnetc_port_tbl = NULL; int gasnetc_num_ports = 0; static uint64_t gasnetc_pin_maxsz; firehose_info_t gasnetc_firehose_info; static uintptr_t gasnetc_firehose_mem; static int gasnetc_firehose_reg; static uint32_t gasnetc_firehose_flags; int gasnetc_op_oust_limit; int gasnetc_op_oust_pp; int gasnetc_am_oust_limit; int gasnetc_am_oust_pp; int gasnetc_bbuf_limit; #if GASNETC_IBV_SRQ int gasnetc_rbuf_limit; int gasnetc_rbuf_set; #endif /* Maximum pinning capabilities of the HCA */ typedef struct gasnetc_pin_info_t_ { uint64_t physmemsz; uintptr_t memory; /* How much pinnable (per proc) */ uint32_t regions; int num_local; /* How many procs */ } gasnetc_pin_info_t; static gasnetc_pin_info_t gasnetc_pin_info; static const char *gasnetc_ibv_ports; static int gasnetc_ibv_ports_verbose; #if GASNET_TRACE static unsigned int gasnetc_pinned_blocks = 0; static size_t gasnetc_pinned_bytes = 0; #endif static int gasnetc_did_firehose_init = 0; static const enum ibv_access_flags gasneti_seg_access_flags = (enum ibv_access_flags) (IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE | IBV_ACCESS_REMOTE_READ | IBV_ACCESS_REMOTE_ATOMIC); gasneti_spawnerfn_t const *gasneti_spawner = NULL; /* ------------------------------------------------------------------------------------ */ /* Bootstrap collective wrappers */ extern void gasneti_bootstrapBarrier(void) { if (gasneti_attach_done) { #if GASNET_DEBUG gasneti_console0_message("DEVWARN","Indirect AM Barrier"); #endif gasneti_bootstrapBarrier_am(); } else { gasneti_spawner->Barrier(); } } extern void gasneti_bootstrapExchange(void *src, size_t len, void *dest) { if (gasneti_attach_done) { #if GASNET_DEBUG gasneti_console0_message("DEVWARN","Indirect AM Exchange"); #endif gasneti_bootstrapExchange_am(src, len, dest); } else { gasneti_spawner->Exchange(src, len, dest); } } /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* called at startup to check configuration sanity */ static void gasnetc_check_config(void) { gasneti_check_config_preinit(); gasneti_assert_always(offsetof(gasnetc_medmsg_t,args) == GASNETC_MEDIUM_HDRSZ); gasneti_assert_always(offsetof(gasnetc_longmsg_t,args) == GASNETC_LONG_HDRSZ); gasneti_assert_always(GASNETI_POWEROFTWO(GASNETC_BUFSZ)); #if GASNETI_THREADS // Verify cache-aligned size of gasnetc_cep_t gasneti_static_assert(sizeof(gasnetc_cep_t) % GASNETI_CACHE_LINE_BYTES == 0); #else // Verify elements of (unused) cache alignment computation // If you break the following line the compiler may not print the entirety on failure! gasneti_static_assert(sizeof(gasnetc_cep_t) == GASNETI_ALIGNUP_NOASSERT(_GASNETC_CEP_TO_PAD, sizeof(void*))); #endif } extern void gasnetc_unpin(gasnetc_hca_t *hca, gasnetc_memreg_t *reg) { int rc = ibv_dereg_mr(reg->handle); GASNETC_IBV_CHECK(rc, "from ibv_dereg_mr()"); #if GASNET_TRACE gasnetc_pinned_blocks -= 1; gasnetc_pinned_bytes -= reg->len; #endif } extern int gasnetc_pin(gasnetc_hca_t *hca, void *addr, size_t size, enum ibv_access_flags acl, gasnetc_memreg_t *reg) { gasneti_assert(((uintptr_t)addr % GASNET_PAGESIZE) == 0); gasneti_assert(((uintptr_t)size % GASNET_PAGESIZE) == 0); reg->handle = ibv_reg_mr(hca->pd, addr, size, acl); if_pf (reg->handle == NULL) return 1; reg->addr = (uintptr_t)addr; reg->len = size; #if GASNET_TRACE gasnetc_pinned_blocks += 1; gasnetc_pinned_bytes += reg->len; #endif return 0; } static void *gasnetc_try_pin_inner(size_t size, gasnetc_memreg_t *reg) { int vstat; void *addr; int h; addr = gasnetc_mmap(size); if (addr != GASNETC_MMAP_FAILED) { GASNETC_FOR_ALL_HCA_INDEX(h) { gasnetc_hca_t *hca = &gasnetc_hca[h]; vstat = gasnetc_pin(hca, addr, size, (enum ibv_access_flags)0, ®[h]); if (vstat != 0) { for (h -= 1; h >= 0; --h) { gasnetc_unpin(&gasnetc_hca[h], ®[h]); } gasnetc_munmap(addr, size); return NULL; } } } else { addr = NULL; } return addr; } /* Try to pin up to 'limit' in chunks no larger than size 'step' */ static uintptr_t gasnetc_trypin(uintptr_t limit, uintptr_t step) { gasnetc_memreg_t reg[GASNETC_IB_MAX_HCAS]; int h; while (limit >= GASNETI_MMAP_GRANULARITY) { /* step non-zero means try linear growth, else bisection */ uintptr_t size = step ? MIN(limit, step) : limit; uintptr_t half = GASNETI_PAGE_ALIGNDOWN(size / 2); if (gasnetc_try_pin_inner(size, reg) != NULL) { /* Success - recurse to try another chunk */ size += gasnetc_trypin(step ? (limit - size) : half, step); GASNETC_FOR_ALL_HCA_INDEX(h) { gasnetc_unpin(&gasnetc_hca[h], ®[h]); } gasnetc_unmap(®[0]); return size; } limit = half; step = 0; } return 0; } #if GASNET_ALIGNED_SEGMENTS /* Unused otherwise */ /* Reproduce the mmap()/munmap() steps to keep compatible VM spaces */ static void gasnetc_fakepin(uintptr_t limit, uintptr_t step) { if (limit != 0) { void *addr; step = MIN(limit, step); addr = gasnetc_mmap(step); if (addr != GASNETC_MMAP_FAILED) { gasnetc_fakepin(limit - step, step); gasnetc_munmap(addr, step); } } } #endif #ifndef GASNETC_PHYSMEM_MIN #define GASNETC_PHYSMEM_MIN (128*1024*1024) #endif static void gasnetc_physmem_check(const char *reason, uintptr_t limit) { if (limit < GASNETC_PHYSMEM_MIN) { char min_display[16]; char limit_display[16]; gasneti_format_number(GASNETC_PHYSMEM_MIN, min_display, sizeof(min_display), 1); gasneti_format_number(limit, limit_display, sizeof(limit_display), 1); gasneti_fatalerror( "%s yields GASNET_PHYSMEM_MAX of %"PRIuPTR" (%s), " "which is less than the minimum supported value of %s.", reason, limit, limit_display, min_display); } } static void gasnetc_physmem_report(double elapsed, gasnetc_pin_info_t *all_info) { gasneti_console0_message("WARNING","Probe of max pinnable memory completed in %gs.", elapsed); char valstr1[80], valstr2[80], valstr3[80]; double sum_frac, min_frac, max_frac; uintptr_t min_mem, max_mem; uint64_t sum_mem, sum_pin, min_pin, max_pin; sum_pin = min_pin = max_pin = all_info[0].memory; sum_mem = min_mem = max_mem = all_info[0].physmemsz; sum_frac = min_frac = max_frac = sum_pin / (double)sum_mem; for (gex_Rank_t i = 1; i < gasneti_nodes; ++i) { uintptr_t pin = all_info[i].memory; if (pin == ~((uintptr_t)0)) continue; // Not probed sum_pin += pin; min_pin = MIN(min_pin, pin); max_pin = MAX(max_pin, pin); uintptr_t mem = all_info[i].physmemsz; sum_mem += mem; min_mem = MIN(min_mem, mem); max_mem = MAX(max_mem, mem); double frac = pin / (double)mem; sum_frac += frac; min_frac = MIN(min_frac, frac); max_frac = MAX(max_frac, frac); } int single_valued = 0; if ((max_pin - min_pin) < ((uintptr_t)1 << 30)) { // less than 1G difference in ABSOLUTE size gasneti_format_number(min_pin, valstr1, sizeof(valstr1), 1); single_valued = 1; } else if ((max_frac - min_frac) < 0.05) { // less than 5 percentage points difference in RELATIVE size snprintf(valstr1, sizeof(valstr1), "%.3g", min_frac); single_valued = 1; } if (single_valued) { gasneti_console0_message("WARNING", "Probe of max pinnable memory has yielded '%s'.\n" " WARNING: If you have the same memory configuration on all nodes, then\n" " WARNING: to avoid this probe in the future either reconfigure using\n" " WARNING: --with-ibv-physmem-max='%s'\n" " WARNING: or run with environment variable\n" " WARNING: GASNET_PHYSMEM_MAX='%s'.", valstr1, valstr1, valstr1); } else { gasneti_console0_message("WARNING","Probe of max pinnable memory found varying results"); gasneti_format_number(sum_mem/gasneti_nodemap_global_count, valstr1, sizeof(valstr1), 1); gasneti_format_number(min_mem, valstr2, sizeof(valstr2), 1); gasneti_format_number(max_mem, valstr3, sizeof(valstr3), 1); gasneti_console0_message("WARNING"," Physical memory MEAN/MIN/MAX = %s / %s / %s", valstr1, valstr2, valstr3); gasneti_format_number(sum_pin/gasneti_nodemap_global_count, valstr1, sizeof(valstr1), 1); gasneti_format_number(min_pin, valstr2, sizeof(valstr2), 1); gasneti_format_number(max_pin, valstr3, sizeof(valstr3), 1); gasneti_console0_message("WARNING"," Pinnable memory MEAN/MIN/MAX = %s / %s / %s", valstr1, valstr2, valstr3); snprintf(valstr1, sizeof(valstr1), "%.3g", sum_frac/gasneti_nodemap_global_count); snprintf(valstr2, sizeof(valstr2), "%.3g", min_frac); snprintf(valstr3, sizeof(valstr3), "%.3g", max_frac); gasneti_console0_message("WARNING"," Pinnable fraction MEAN/MIN/MAX = %s / %s / %s", valstr1, valstr2, valstr3); // Report memory "lost" at min absolute size uintptr_t try_abs = min_pin; uintptr_t lost = all_info[0].memory - try_abs; sum_mem = max_mem = lost; sum_frac = max_frac = lost / (double)all_info[0].memory; for (gex_Rank_t i = 1; i < gasneti_nodes; ++i) { uintptr_t pin = all_info[i].memory; if (pin == ~((uintptr_t)0)) continue; // Not probed lost = pin - try_abs; sum_mem += lost; max_mem = MAX(max_mem, lost); double frac = lost / (double)pin; sum_frac += frac; max_frac = MAX(max_frac, frac); } gasneti_format_number(try_abs, valstr1, sizeof(valstr1), 1); gasneti_console0_message("WARNING"," Unusable pinned memory with an absolute max of '%s':\n", valstr1); gasneti_format_number(sum_mem, valstr1, sizeof(valstr1), 1); gasneti_format_number(sum_mem/gasneti_nodemap_global_count, valstr2, sizeof(valstr2), 1); gasneti_format_number(max_mem, valstr3, sizeof(valstr3), 1); gasneti_console0_message("WARNING"," SUM/MEAN/MAX = %s / %s / %s\n", valstr1, valstr2, valstr3); // Report memory "lost" at min relative size double try_rel = min_frac; lost = all_info[0].memory - (try_rel * all_info[0].physmemsz); sum_mem = max_mem = lost; sum_frac = max_frac = lost / (double)all_info[0].memory; for (gex_Rank_t i = 1; i < gasneti_nodes; ++i) { uintptr_t pin = all_info[i].memory; if (pin == ~((uintptr_t)0)) continue; // Not probed lost = pin - (try_rel * all_info[i].physmemsz); sum_mem += lost; max_mem = MAX(max_mem, lost); double frac = lost / (double)pin; sum_frac += frac; max_frac = MAX(max_frac, frac); } gasneti_console0_message("WARNING"," Unusable pinned memory with a relative max of '%.3g':\n", try_rel); gasneti_format_number(sum_mem, valstr1, sizeof(valstr1), 1); gasneti_format_number(sum_mem/gasneti_nodemap_global_count, valstr2, sizeof(valstr2), 1); gasneti_format_number(max_mem, valstr3, sizeof(valstr3), 1); gasneti_console0_message("WARNING"," SUM/MEAN/MAX = %s / %s / %s\n", valstr1, valstr2, valstr3); } gasneti_console0_message("WARNING","For more information see \"Slow PHYSMEM probe at start-up\" in ibv-conduit's README."); } /* Search for the total amount of memory we can pin per process. */ static void gasnetc_init_pin_info(int first_local, int num_local) { gasnetc_pin_info_t *all_info = gasneti_malloc(gasneti_nodes * sizeof(gasnetc_pin_info_t)); int i; /* * We bound our search by the smallest of: * env(GASNET_PHYSMEM_MAX) as described in README * User's current (soft) mlock limit (optional) * if FIREHOSE_M and FIREHOSE_MAXVICTIM_M are both set: * (SEGMENT_FAST ? MMAP_LIMIT : 0 ) + (FIREHOSE_M + FIREHOSE_MAXVICTIM_M + eplison) * * Unless env(GASNET_PHYSMEM_PROBE) is set to a "true" value, we will NOT verify any value * set by configure or the GASNET_PHYSMEM_MAX environment variable. */ #ifdef GASNETC_IBV_PHYSMEM_MAX_CONFIGURE #define GASNETC_DEFAULT_PHYSMEM_MAX GASNETC_IBV_PHYSMEM_MAX_CONFIGURE int do_probe_default = 0; #else #define GASNETC_DEFAULT_PHYSMEM_MAX "2/3" int do_probe_default = ! gasneti_getenv("GASNET_PHYSMEM_MAX"); #endif #ifdef GASNETC_IBV_PHYSMEM_PROBE_CONFIGURE do_probe_default = GASNETC_IBV_PHYSMEM_PROBE_CONFIGURE; #else // Will probe on request or if neither configure nor environment has provided a value #endif const int do_probe = gasneti_getenv_yesno_withdefault("GASNET_PHYSMEM_PROBE", do_probe_default); const int quiet = do_probe ? !gasneti_getenv_yesno_withdefault("GASNET_PHYSMEM_WARN", 1): 0; // We document that the behavior is undefined unless // GASNET_PHYSMEM_{PROBE,WARN} are single-valued. However, as noted in bug // 3769, the case of non-equal values can lead to non-collective calls to // gasneti_bootstrapExchange_am() (not a clean failure mode). // So, we do some extra work here to ensure single-valued behavior. // However, we do are not documenting this specific behavior to reserve // the right to silently change it in the future. struct { // TODO? pack into a single byte? int8_t do_probe; int8_t quiet; } *all_knobs, my_knobs = { do_probe, quiet }; all_knobs = gasneti_malloc(gasneti_nodes * sizeof(my_knobs)); gasneti_bootstrapExchange_am(&my_knobs, sizeof(my_knobs), all_knobs); #if 1 // Option 1: fatal error on mismatch if (!gasneti_mynode) { for (gex_Rank_t n = 0; n < gasneti_nodes; ++n) { if (do_probe != all_knobs[n].do_probe) { #ifdef GASNETC_IBV_PHYSMEM_MAX_CONFIGURE gasneti_fatalerror("GASNET_PHYSMEM_PROBE is not single-valued"); #else gasneti_fatalerror("GASNET_PHYSMEM_PROBE is not single-valued (might be defaulted from GASNET_PHYSMEM_MAX)"); #endif } if (quiet != all_knobs[n].quiet) { gasneti_fatalerror("GASNET_PHYSMEM_WARN is not single-valued"); } } } #else // Option 2: logical OR do_probe and AND of quiet // NOTE: if one pisks this option, one must also remove 'const' from decls for (gasnet_gex_Rank_t n = 0; n < gasneti_nodes; ++n) { do_probe |= all_knobs[n].do_probe; quiet &= all_knobs[n].quiet; } #endif gasneti_free(all_knobs); uint64_t physmemsz = gasneti_getPhysMemSz(1); #if PLATFORM_ARCH_32 uint64_t hardmax = 0xFFFFFFFF; #else uint64_t hardmax = 0; // unlimited #endif uint64_t limit = gasneti_getenv_memsize_withdefault( "GASNET_PHYSMEM_MAX", GASNETC_DEFAULT_PHYSMEM_MAX, GASNETC_PHYSMEM_MIN, hardmax, physmemsz, 0, 0); #if defined(RLIMIT_MEMLOCK) && GASNETC_HONOR_RLIMIT_MEMLOCK { /* Honor soft mlock limit (build-time option) */ struct rlimit r; if ((getrlimit(RLIMIT_MEMLOCK, &r) == 0) && (r.rlim_cur != RLIM_INFINITY)) { limit = MIN(limit, r.rlim_cur); gasnetc_physmem_check("Application of RLIMIT_MEMLOCK", limit); } } #endif { /* Honor Firehose params if set */ unsigned long fh_M = gasneti_parse_int(gasnet_getenv("GASNET_FIREHOSE_M"),(1<<20)); unsigned long fh_VM = gasneti_parse_int(gasnet_getenv("GASNET_FIREHOSE_MAXVICTIM_M"),(1<<20)); if (fh_M && fh_VM) { #if GASNETC_PIN_SEGMENT limit = MIN(limit, (fh_M + fh_VM + GASNETI_MMAP_LIMIT + GASNETI_MMAP_GRANULARITY)); #else limit = MIN(limit, (fh_M + fh_VM + GASNETI_MMAP_GRANULARITY)); #endif limit = GASNETI_PAGE_ALIGNDOWN(limit); gasnetc_physmem_check("Application of GASNET_FIREHOSE_M and GASNET_FIREHOSE_MAXVICTIM_M", limit); } } GASNETI_TRACE_PRINTF(I, ("Final/effective GASNET_PHYSMEM_MAX=%"PRIu64, limit)); gasnetc_pin_info.physmemsz = physmemsz; gasnetc_pin_info.memory = ~((uintptr_t)0); gasnetc_pin_info.num_local = num_local; // How many pinnable regions per host? unsigned int max_regions = UINT_MAX; GASNETC_FOR_ALL_HCA_INDEX(i) { unsigned int tmp = gasnetc_hca[i].hca_cap.max_mr; // Field has type `int` // Zero or above INT_MAX should use gasnetc_fh_maxregions if (tmp == 0) { // Treat zero as unbounded (e.g. Omni-Path) GASNETI_TRACE_PRINTF(I, ("HCA %d advertises hca_cap.max_mr == 0, treating as unbounded", i)); continue; } else if (tmp >= (unsigned int)INT_MAX) { // Treat INT_MAX (or negative int) as unbounded GASNETI_TRACE_PRINTF(I, ("HCA %d advertises hca_cap.max_mr >= INT_MAX, treating as unbounded", i)); continue; } max_regions = MIN(max_regions, tmp); } if (max_regions == UINT_MAX) { // For adapters not reporting a valid limit: max_regions = gasnetc_fh_maxregions; } { const char *key = "GASNET_PINNED_REGIONS_MAX"; const char *input = gasneti_getenv(key); int using_dflt = !input || !input[0]; // unset or empty if (using_dflt) { // Default (heuristic): cap use at same fraction of HCA resources as of physical memory gasnetc_pin_info.regions = max_regions * ((double)limit / physmemsz); } else { // User override - accept fractions or absolute value double dbl; int64_t val; if (gasneti_parse_dbl(input, &dbl)) { // Not a valid double val = gasneti_parse_int(input, 0); } else if ((dbl > 0.) && (dbl < 1.)) { // A double in interval (0,1) val = dbl * max_regions; } else { // A valid double outside (0,1) val = dbl; } const int64_t region_lower = 16; // arbitrary. firehose will further validate const int64_t region_upper = max_regions * 0.95; // 95% is arbitrary if (val > region_upper) { gasneti_fatalerror("%s='%s' is above the maximum value %d.", key, input, (int)region_upper); } else if (val < region_lower) { gasneti_fatalerror("%s='%s' is below the minimum value %d.", key, input, (int)region_lower); } gasnetc_pin_info.regions = val; } gasneti_envint_display(key, gasnetc_pin_info.regions, using_dflt, 0); } GASNETI_TRACE_PRINTF(I, ("Max pinnable regions per host: %u", (unsigned int)gasnetc_pin_info.regions)); if (do_probe) { int did_warn = 0; gasneti_tick_t start_time = gasneti_ticks_now(); // Warn if any node has more than 2G (unless QUIET) if (! quiet) { uint64_t *all_limits = gasneti_malloc(gasneti_nodes * sizeof(uint64_t)); gasneti_bootstrapExchange_am(&limit, sizeof(uint64_t), all_limits); if (!gasneti_mynode) { uint64_t max_limit = all_limits[0]; for (gex_Rank_t i = 1; i < gasneti_nodes; ++i) { max_limit = MAX(max_limit, all_limits[i]); } if (max_limit > ((uint64_t)2 << 30)) { gasneti_console0_message("WARNING","Beginning a potentially slow probe of max pinnable memory..."); did_warn = 1; } } gasneti_free(all_limits); } /* Now search for largest pinnable memory, on one process per machine */ uintptr_t step = ~(uintptr_t)0; GASNETC_FOR_ALL_HCA_INDEX(i) { step = MIN(step, gasnetc_hca[i].hca_cap.max_mr_size); } #if GASNETC_PIN_SEGMENT if (gasnetc_pin_maxsz && (step > gasnetc_pin_maxsz)) { step = MIN(step, gasnetc_pin_maxsz); } #endif step = GASNETI_PAGE_ALIGNDOWN(step); if (gasneti_mynode == first_local) { uintptr_t size = gasnetc_trypin(limit, step); if_pf (!size) { gasneti_fatalerror("Failure to determine the max pinnable memory. IBV may be misconfigured."); } gasnetc_pin_info.memory = size; } gasneti_bootstrapExchange_am(&gasnetc_pin_info, sizeof(gasnetc_pin_info_t), all_info); if (! quiet && ! gasneti_mynode) { // If warned above, or too slow, print the results and what to do with them. // We define "too slow" as 10s + log2(nodes) * 5s. double elapsed = 1.e-9 * gasneti_ticks_to_ns(gasneti_ticks_now() - start_time); double too_slow = 10.; for (gex_Rank_t i = gasneti_nodes/2; i; i >>= 1) too_slow += 5.; if (did_warn || (elapsed > too_slow)) { gasnetc_physmem_report(elapsed, all_info); } } #if GASNET_ALIGNED_SEGMENTS /* Just a waste of time otherwise */ if (gasneti_mynode != first_local) { /* Extra mmap traffic to ensure compatible VM spaces */ gasnetc_fakepin(all_info[first_local].memory, step); } gasneti_bootstrapBarrier_am(); // Ensure fakepin completes unmap before continuing #endif } else { /* Note that README says PHYSMEM_NOPROBE must be equal on all nodes */ gasnetc_pin_info.memory = limit; gasneti_bootstrapExchange_am(&gasnetc_pin_info, sizeof(gasnetc_pin_info_t), all_info); } /* Determine the global values (min of maxes) from the local values */ for (i = 0; i < gasneti_nodes; i++) { gasnetc_pin_info_t *info = &all_info[i]; limit = MIN(limit, info->memory); info->memory = GASNETI_PAGE_ALIGNDOWN(info->memory / info->num_local); info->regions /= info->num_local; gasnetc_pin_info.memory = MIN(gasnetc_pin_info.memory, info->memory ); gasnetc_pin_info.regions = MIN(gasnetc_pin_info.regions, info->regions); } gasneti_free(all_info); gasnetc_physmem_check("Probing O/S limits and HCA capabilities", limit); } enum gasnetc_segreg { gasnetc_segreg_aux, gasnetc_segreg_attach, // aka "primordial" gasnetc_segreg_create }; #if GASNET_HAVE_MK_CLASS_CUDA_UVA // Returns non-zero if should suggest missing driver as a reason for failure. static int gasnetc_check_cuda_uva_driver(void) { #if !PLATFORM_OS_LINUX return 0; #else // Look for GDR support. // Adapted from the GDR checking logic in Open MPI. return access("/sys/kernel/mm/memory_peers/nv_mem/version", F_OK); #endif } #endif #if GASNET_HAVE_MK_CLASS_HIP // Returns non-zero if should suggest missing driver as a reason for failure. static int gasnetc_check_hip_driver(void) { #if !PLATFORM_OS_LINUX return 0; #elif GASNETI_HIP_PLATFORM_NVIDIA // Look for GDR support. return access("/sys/kernel/mm/memory_peers/nv_mem/version", F_OK); #else // Look for AMD ROCmRDMA support (AMD Kernel Fusion Driver == amdkfd). return access("/sys/kernel/mm/memory_peers/amdkfd/version", F_OK); #endif } #endif static const char *gasnetc_segreg_failed(size_t size, enum gasnetc_segreg which, int why, gex_MK_Class_t mk_class) { const char *descr = ""; const char *hint1 = ""; const char *hint2 = ""; #if !GASNETI_PSHM_POSIX // N/A #elif PLATFORM_OS_LINUX #define GASNETC_PSHM_FS "/dev/shm" #elif PLATFORM_OS_NETBSD #define GASNETC_PSHM_FS "/var/shm" #elif PLATFORM_OS_FREEBSD || PLATFORM_OS_OPENBSD #define GASNETC_PSHM_FS "/tmp" #else // Cygwin, macOS and Solaris are not believed to back with a filesystem // Others are unknown #endif switch (mk_class) { case GEX_MK_CLASS_HOST: #ifdef GASNETC_PSHM_FS if (why == EFAULT) { hint1 = "\n This could be caused by insufficient space in " GASNETC_PSHM_FS " (or similar)."; } #endif if (which == gasnetc_segreg_attach) { hint2 = "\n Reducing the value of environment variable GASNET_MAX_SEGSIZE may help."; } else if (which == gasnetc_segreg_aux) { descr = " aux"; } break; #if GASNET_HAVE_MK_CLASS_CUDA_UVA case GEX_MK_CLASS_CUDA_UVA: descr = " CUDA_UVA"; if (why == EFAULT) { if (gasnetc_check_cuda_uva_driver()) { hint1 = "\n This could be caused by lack of required driver support or by exhaustion of BAR1 resources. See memory_kinds_implementation.md release notes."; } else { hint1 = "\n This could be caused by exhaustion of BAR1 resources. See memory_kinds_implementation.md release notes."; } } break; #endif #if GASNET_HAVE_MK_CLASS_HIP case GEX_MK_CLASS_HIP: descr = " HIP"; if (why == EFAULT) { if (gasnetc_check_hip_driver()) { hint1 = "\n This could be caused by lack of required driver support or by exhaustion of BAR1 resources. See memory_kinds_implementation.md release notes."; } else { hint1 = "\n This could be caused by exhaustion of BAR1 resources. See memory_kinds_implementation.md release notes."; } } break; #endif default: // avoids unhandled case warnings break; } char sizestr[16]; return gasneti_dynsprintf( "Unexpected error %s (errno=%d) when registering a %s%s segment%s%s", strerror(why), why, gasnett_format_number(size, sizestr, sizeof(sizestr), 1), descr, hint1, hint2); } #if GASNET_TRACE static const char *mtu_to_str(enum ibv_mtu mtu) { switch (mtu) { case IBV_MTU_256 : return "256"; case IBV_MTU_512 : return "512"; case IBV_MTU_1024: return "1024"; case IBV_MTU_2048: return "2048"; case IBV_MTU_4096: return "4096"; default: return (int)mtu ? "unknown" : "active_mtu"; } } #endif static char *gasnetc_auto_ports(const char * env_val); /* Process defaults and the environment to get configuration settings */ static int gasnetc_load_settings(void) { const char *tmp; int i; tmp = gasneti_getenv("GASNET_HCA_ID"); if (tmp && strlen(tmp)) { gasneti_console_message("WARNING", "GASNET_HCA_ID set in environment, but ignored. See gasnet/ibv-conduit/README."); } tmp = gasneti_getenv("GASNET_PORT_NUM"); if (tmp && strlen(tmp) && atoi(tmp)) { gasneti_console_message("WARNING", "GASNET_PORT_NUM set in environment, but ignored. See gasnet/ibv-conduit/README."); } gasnetc_ibv_ports_verbose = gasneti_getenv_int_withdefault("GASNET_IBV_PORTS_VERBOSE",1,0); (void) gasneti_hwloc_init(); // TODO: messages on error? gasnetc_ibv_ports = gasneti_getenv_hwloc_withdefault("GASNET_IBV_PORTS", GASNETC_DEFAULT_IBV_PORTS, "Socket", 1); if (! gasneti_strncasecmp("auto",gasnetc_ibv_ports,4)) { gasnetc_ibv_ports = gasnetc_auto_ports(gasnetc_ibv_ports); } #define GASNETC_ENVINT(program_var, env_key, default_val, minval, is_mem) do { \ int64_t _tmp = gasneti_getenv_int_withdefault(#env_key, default_val, is_mem); \ if (_tmp < minval) \ GASNETI_RETURN_ERRR(BAD_ARG, "("#env_key" < "#minval") in environment"); \ program_var = _tmp; \ } while (0) GASNETC_ENVINT(i, GASNET_MAX_MTU, 0, -1, 1); switch (i) { default: gasneti_console_message("WARNING", "ignoring invalid GASNET_MAX_MTU value %d.", i); /* fall through to "auto" case: */ GASNETI_FALLTHROUGH case 0: /* TODO: "automatic" might be more sophisticated than using the maximum */ case -1: gasnetc_max_mtu = (enum ibv_mtu)0; /* Use port's active_mtu */ break; case 256: gasnetc_max_mtu = IBV_MTU_256; break; case 512: gasnetc_max_mtu = IBV_MTU_512; break; case 1024: gasnetc_max_mtu = IBV_MTU_1024; break; case 2048: gasnetc_max_mtu = IBV_MTU_2048; break; case 4096: gasnetc_max_mtu = IBV_MTU_4096; break; } GASNETC_ENVINT(gasnetc_qp_timeout, GASNET_QP_TIMEOUT, GASNETC_DEFAULT_QP_TIMEOUT, 0, 0); if_pf (gasnetc_qp_timeout > 31) { gasneti_console_message("WARNING", "GASNET_QP_TIMEOUT reduced from the requested value, %d, to the maximum supported value 31.", (int)gasnetc_qp_timeout); gasnetc_qp_timeout = 31; } GASNETC_ENVINT(gasnetc_qp_retry_count, GASNET_QP_RETRY_COUNT, GASNETC_DEFAULT_QP_RETRY_COUNT, 1, 0); if_pf (gasnetc_qp_retry_count > 7) { gasneti_console_message("WARNING", "GASNET_QP_RETRY_COUNT reduced from the requested value, %d, to the maximum supported value 7.", (int)gasnetc_qp_retry_count); gasnetc_qp_retry_count = 7; } GASNETC_ENVINT(gasnetc_qp_rd_atom, GASNET_QP_RD_ATOM, 0, 0, 0); GASNETC_ENVINT(gasnetc_op_oust_pp, GASNET_NETWORKDEPTH_PP, GASNETC_DEFAULT_NETWORKDEPTH_PP, 1, 0); GASNETC_ENVINT(gasnetc_op_oust_limit, GASNET_NETWORKDEPTH_TOTAL, GASNETC_DEFAULT_NETWORKDEPTH_TOTAL, 0, 0); GASNETC_ENVINT(gasnetc_am_oust_pp, GASNET_AM_CREDITS_PP, GASNETC_DEFAULT_AM_CREDITS_PP, 1, 0); GASNETC_ENVINT(gasnetc_am_oust_limit, GASNET_AM_CREDITS_TOTAL, GASNETC_DEFAULT_AM_CREDITS_TOTAL, 0, 0); GASNETC_ENVINT(gasnetc_am_credits_slack, GASNET_AM_CREDITS_SLACK, GASNETC_DEFAULT_AM_CREDITS_SLACK, 0, 0); GASNETC_ENVINT(gasnetc_bbuf_limit, GASNET_BBUF_COUNT, GASNETC_DEFAULT_BBUF_COUNT, 0, 0); #if GASNETC_BUILD_IBVRATOMIC GASNETC_ENVINT(gasnetc_ratomicbuf_limit, GASNET_RATOMICBUF_COUNT, 0, 0, 0); #endif #if GASNETC_IBV_SRQ gasnetc_rbuf_set = (NULL != gasneti_getenv("GASNET_RBUF_COUNT")); GASNETC_ENVINT(gasnetc_rbuf_limit, GASNET_RBUF_COUNT, GASNETC_DEFAULT_RBUF_COUNT, 0, 0); #endif GASNETC_ENVINT(gasnetc_num_qps, GASNET_NUM_QPS, GASNETC_DEFAULT_NUM_QPS, 0, 0); GASNETC_ENVINT(gasnetc_inline_limit, GASNET_INLINESEND_LIMIT, GASNETC_DEFAULT_INLINESEND_LIMIT, -1, 0); GASNETC_ENVINT(gasnetc_nonbulk_bounce_limit, GASNET_NONBULKPUT_BOUNCE_LIMIT, GASNETC_DEFAULT_NONBULKPUT_BOUNCE_LIMIT, 0, 1); GASNETC_ENVINT(gasnetc_packedlong_limit, GASNET_PACKEDLONG_LIMIT, GASNETC_DEFAULT_PACKEDLONG_LIMIT, 0, 1); GASNETC_ENVINT(gasnetc_am_gather_min, GASNET_AM_GATHER_MIN, GASNETC_DEFAULT_AM_GATHER_MIN, -1, 1); if (gasnetc_am_gather_min == -1) { // -1 is the documented value to disable this optimization gasnetc_am_gather_min = INT_MAX; } GASNETC_ENVINT(gasnetc_put_stripe_sz, GASNET_PUT_STRIPE_SZ, GASNETC_DEFAULT_PUT_STRIPE_SZ, 0, 1024); GASNETC_ENVINT(gasnetc_get_stripe_sz, GASNET_GET_STRIPE_SZ, GASNETC_DEFAULT_GET_STRIPE_SZ, 0, 1024); #if !GASNETC_PIN_SEGMENT GASNETC_ENVINT(gasnetc_putinmove_limit, GASNET_PUTINMOVE_LIMIT, GASNETC_DEFAULT_PUTINMOVE_LIMIT, 0, 1); if_pf (gasnetc_putinmove_limit > GASNETC_PUTINMOVE_LIMIT_MAX) { gasneti_fatalerror("GASNET_PUTINMOVE_LIMIT (%"PRIuPTR") is larger than the max permitted (%"PRIuPTR")", (uintptr_t)gasnetc_putinmove_limit, (uintptr_t)GASNETC_PUTINMOVE_LIMIT_MAX); } #endif gasnetc_use_rcv_thread = gasneti_getenv_yesno_withdefault("GASNET_RCV_THREAD", 0); #if GASNETC_USE_RCV_THREAD && GASNETC_SERIALIZE_POLL_CQ if (gasnetc_use_rcv_thread) { tmp = gasneti_getenv_withdefault("GASNET_RCV_THREAD_POLL_MODE", "SERIALIZED"); if (! gasneti_strcasecmp(tmp, "EXCLUSIVE")) { gasnetc_rcv_thread_poll_serialize = 0; gasnetc_rcv_thread_poll_exclusive = 1; } else if (! gasneti_strcasecmp(tmp, "UNSERIALIZED")) { gasnetc_rcv_thread_poll_serialize = 0; gasnetc_rcv_thread_poll_exclusive = 0; } else if (! gasneti_strcasecmp(tmp, "SERIALIZED")) { gasnetc_rcv_thread_poll_serialize = 1; gasnetc_rcv_thread_poll_exclusive = 0; } else { gasneti_fatalerror("GASNET_RCV_THREAD_POLL_MODE \"%s\" is not valid", tmp); } } #endif gasnetc_use_snd_thread = gasneti_getenv_yesno_withdefault("GASNET_SND_THREAD", 0); #if GASNETC_USE_SND_THREAD && GASNETC_SERIALIZE_POLL_CQ if (gasnetc_use_snd_thread) { tmp = gasneti_getenv_withdefault("GASNET_SND_THREAD_POLL_MODE", "SERIALIZED"); if (! gasneti_strcasecmp(tmp, "EXCLUSIVE")) { gasnetc_snd_thread_poll_serialize = 0; gasnetc_snd_thread_poll_exclusive = 1; } else if (! gasneti_strcasecmp(tmp, "UNSERIALIZED")) { gasnetc_snd_thread_poll_serialize = 0; gasnetc_snd_thread_poll_exclusive = 0; } else if (! gasneti_strcasecmp(tmp, "SERIALIZED")) { gasnetc_snd_thread_poll_serialize = 1; gasnetc_snd_thread_poll_exclusive = 0; } else { gasneti_fatalerror("GASNET_RCV_THREAD_POLL_MODE \"%s\" is not valid", tmp); } } #endif /* Verify correctness/sanity of values */ if (gasnetc_use_rcv_thread && !GASNETC_USE_RCV_THREAD) { if (! gasneti_getenv_yesno_withdefault("GASNET_QUIET",0)) { // NOTE: clients that set env var GASNET_RCV_THREAD should // conditionalize that on `#if GASNET_RCV_THREAD` to avoid this warning. gasneti_console_message("WARNING", "AM receive thread enabled by environment variable\n" " GASNET_RCV_THREAD, but was disabled at GASNet build time.\n" " To suppress this message, either unset GASNET_RCV_THREAD, set\n" " GASNET_QUIET=1, or reconfigure with --enable-ibv-rcv-thread.\n" " (see ibv-conduit's README for more information)."); } gasnetc_use_rcv_thread = 0; } if (gasnetc_use_snd_thread && !GASNETC_USE_SND_THREAD) { if (! gasneti_getenv_yesno_withdefault("GASNET_QUIET",0)) { // NOTE: clients that set env var GASNET_SND_THREAD should // conditionalize that on `#if GASNET_SND_THREAD` to avoid this warning. gasneti_console_message("WARNING", "send progress thread enabled by environment variable\n" " GASNET_SND_THREAD, but was disabled at GASNet build time.\n" " To suppress this message, either unset GASNET_SND_THREAD, set\n" " GASNET_QUIET=1, or reconfigure with --enable-ibv-snd-thread.\n" " (see ibv-conduit's README for more information)."); } gasnetc_use_snd_thread = 0; } #if GASNETC_FH_OPTIONAL gasnetc_use_firehose = gasneti_getenv_yesno_withdefault("GASNET_USE_FIREHOSE", 1); if (!GASNETC_PIN_SEGMENT && !gasnetc_use_firehose) { gasneti_fatalerror("Use of the 'firehose' dynamic pinning library disabled by environment variable GASNET_USE_FIREHOSE, but is required in a GASNET_SEGMENT_" _STRINGIFY(GASNETI_SEGMENT_CONFIG) " configuration"); } #else if (!gasneti_getenv_yesno_withdefault("GASNET_USE_FIREHOSE", 1)) { gasneti_console_message("WARNING", "Environment variable GASNET_USE_FIREHOSE ignored. It is only available in a DEBUG build of GASNet"); } #endif #if GASNETC_IBV_SRQ /* Integer value becomes a boolean, though possibly not until gasnetc_sndrcv_init() */ gasnetc_use_srq = gasneti_getenv_int_withdefault("GASNET_USE_SRQ", -1, 0); /* My disabling SRQ early when possible we can avoid allocating resources we might not use. XXX: If we can, we should move AM resource computation here so we can avoid ever allocating unused resources. As per README: GASNET_USE_SRQ = 0: Never use SRQ GASNET_USE_SRQ > 0: Use SRQ for nodes >= GASNET_USE_SRQ (so 1 == Always) GASNET_USE_SRQ < 0: Use SRQ is memory savings would result (done in gasnetc_sndrcv_init()). */ if (gasnetc_use_srq > (int)gasneti_nodes) { /* Positive value of GASNET_USE_SRQ denotes a minumum node count */ GASNETI_TRACE_PRINTF(I, ("SRQ disabled because GASNET_USE_SRQ = %d is greater than nodes = %d", gasnetc_use_srq, gasneti_nodes)); gasnetc_use_srq = 0; } #endif #if GASNETC_IBV_XRC gasnetc_use_xrc = gasneti_getenv_int_withdefault("GASNET_USE_XRC", 1, 0); #endif /* XXX: Does SRQ make any of these invalid? */ if_pf (gasnetc_am_credits_slack >= gasnetc_am_oust_pp) { gasneti_console_message("WARNING", "GASNET_AM_CREDITS_SLACK reduced to GASNET_AM_CREDITS_PP-1 (from %d to %d)", gasnetc_am_credits_slack, gasnetc_am_oust_pp-1); gasnetc_am_credits_slack = gasnetc_am_oust_pp - 1; } if_pf (gasnetc_packedlong_limit > GASNETC_MAX_PACKEDLONG) { gasneti_console_message("WARNING", "GASNET_PACKEDLONG_LIMIT reduced from %u to %u", (unsigned int)gasnetc_packedlong_limit, (unsigned int)GASNETC_MAX_PACKEDLONG); gasnetc_packedlong_limit = GASNETC_MAX_PACKEDLONG; } #if GASNETC_DYNAMIC_CONNECT gasnetc_conn_static = gasneti_getenv_yesno_withdefault("GASNET_CONNECT_STATIC", 1); gasnetc_conn_dynamic = gasneti_getenv_yesno_withdefault("GASNET_CONNECT_DYNAMIC", 1); if (!gasnetc_conn_static && !gasnetc_conn_dynamic) { if (!gasneti_mynode) { gasneti_console_message("WARNING", "Both GASNET_CONNECT_STATIC and GASNET_CONNECT_DYNAMIC are FALSE. " "Enabling dynamic connection support."); } gasnetc_conn_dynamic = 1; } gasnetc_connectfile_in = gasneti_getenv_withdefault("GASNET_CONNECTFILE_IN", NULL); if (gasnetc_connectfile_in && !gasnetc_connectfile_in[0]) { // empty string gasnetc_connectfile_in = NULL; } gasnetc_connectfile_out = gasneti_getenv_withdefault("GASNET_CONNECTFILE_OUT", NULL); if (gasnetc_connectfile_out && !gasnetc_connectfile_out[0]) { // empty string gasnetc_connectfile_out = NULL; } gasnetc_connectfile_out_base = gasneti_getenv_int_withdefault("GASNET_CONNECTFILE_BASE", gasnetc_connectfile_out_base, 0); #endif /* Report */ GASNETI_TRACE_PRINTF(I,("ibv-conduit build time configuration settings = {")); GASNETI_TRACE_PRINTF(I,(" AM receives in internal thread %sabled (GASNETC_IBV_RCV_THREAD)", GASNETC_USE_RCV_THREAD ? "en" : "dis")); GASNETI_TRACE_PRINTF(I,(" Max. snd completions per poll %d (GASNETC_SND_REAP_LIMIT)", GASNETC_SND_REAP_LIMIT)); GASNETI_TRACE_PRINTF(I,(" Max. rcv completions per poll %d (GASNETC_RCV_REAP_LIMIT)", GASNETC_RCV_REAP_LIMIT)); GASNETI_TRACE_PRINTF(I, ("}")); GASNETI_TRACE_PRINTF(I,("ibv-conduit run time configuration settings = {")); if (gasnetc_ibv_ports && strlen(gasnetc_ibv_ports)) { GASNETI_TRACE_PRINTF(I, (" GASNET_IBV_PORTS = '%s'", gasnetc_ibv_ports)); } else { GASNETI_TRACE_PRINTF(I, (" GASNET_IBV_PORTS = empty or unset (probe all)")); } if (gasnetc_num_qps) { GASNETI_TRACE_PRINTF(I, (" GASNET_NUM_QPS = %d", gasnetc_num_qps)); } else { GASNETI_TRACE_PRINTF(I, (" GASNET_NUM_QPS = 0 (automatic)")); } GASNETI_TRACE_PRINTF(I, (" GASNET_NETWORKDEPTH_PP = %d", gasnetc_op_oust_pp)); GASNETI_TRACE_PRINTF(I, (" GASNET_NETWORKDEPTH_TOTAL = %d%s", gasnetc_op_oust_limit, gasnetc_op_oust_limit ? "" : " (automatic)")); GASNETI_TRACE_PRINTF(I, (" GASNET_AM_CREDITS_PP = %d", gasnetc_am_oust_pp)); GASNETI_TRACE_PRINTF(I, (" GASNET_AM_CREDITS_TOTAL = %d%s", gasnetc_am_oust_limit, gasnetc_am_oust_limit ? "" : " (automatic)")); GASNETI_TRACE_PRINTF(I, (" GASNET_AM_CREDITS_SLACK = %d", gasnetc_am_credits_slack)); GASNETI_TRACE_PRINTF(I, (" GASNET_BBUF_COUNT = %d%s", gasnetc_bbuf_limit, gasnetc_bbuf_limit ? "": " (automatic)")); #if GASNETC_BUILD_IBVRATOMIC GASNETI_TRACE_PRINTF(I, (" GASNET_RATOMICBUF_COUNT = %d%s", gasnetc_ratomicbuf_limit, gasnetc_ratomicbuf_limit ? "": " (automatic)")); #endif #if GASNETC_IBV_SRQ GASNETI_TRACE_PRINTF(I, (" GASNET_USE_SRQ = %d", gasnetc_use_srq)); GASNETI_TRACE_PRINTF(I, (" GASNET_RBUF_COUNT = %d%s", gasnetc_rbuf_limit, gasnetc_rbuf_limit ? "": " (automatic)")); #endif #if GASNETC_IBV_XRC GASNETI_TRACE_PRINTF(I, (" GASNET_USE_XRC = %d", gasnetc_use_xrc)); #endif GASNETI_TRACE_PRINTF(I, (" GASNET_INLINESEND_LIMIT = %d%s", (int)gasnetc_inline_limit, (gasnetc_inline_limit == (size_t)-1 ? " (automatic)" : ""))); GASNETI_TRACE_PRINTF(I, (" GASNET_NONBULKPUT_BOUNCE_LIMIT = %u", (unsigned int)gasnetc_nonbulk_bounce_limit)); #if !GASNETC_PIN_SEGMENT GASNETI_TRACE_PRINTF(I, (" GASNET_PUTINMOVE_LIMIT = %u", (unsigned int)gasnetc_putinmove_limit)); #endif #if GASNETC_USE_RCV_THREAD GASNETI_TRACE_PRINTF(I, (" GASNET_RCV_THREAD = %d (%sabled)", gasnetc_use_rcv_thread, gasnetc_use_rcv_thread ? "en" : "dis")); #else GASNETI_TRACE_PRINTF(I, (" GASNET_RCV_THREAD disabled at build time")); #endif #if GASNETC_USE_SND_THREAD GASNETI_TRACE_PRINTF(I, (" GASNET_SND_THREAD = %d (%sabled)", gasnetc_use_snd_thread, gasnetc_use_snd_thread ? "en" : "dis")); #else GASNETI_TRACE_PRINTF(I, (" GASNET_SND_THREAD disabled at build time")); #endif GASNETI_TRACE_PRINTF(I, (" GASNET_QP_TIMEOUT = %d (%g sec)", gasnetc_qp_timeout, 4.096e-6*(1<next = gasnetc_port_list; gasnetc_port_list = result; result->id = id; result->port = port; result->matched = 0; } static int gasnetc_match_port(const char *id, int port, int mark) { gasnetc_port_list_t *curr; int found; if (gasnetc_port_list != NULL) { found = 0; for (curr = gasnetc_port_list; curr && !found; curr = curr->next) { if (!curr->matched && !strcmp(id, curr->id)) { if (!port) { /* match HCA only */ found = 1; } else if (!curr->port || (curr->port == port)) { /* 0 is a wild card */ found = 1; curr->matched = mark; } } } } else { found = 1; } return found; } static void gasnetc_clear_ports(void) { gasnetc_port_list_t *curr; curr = gasnetc_port_list; while(curr) { gasnetc_port_list_t *next = curr->next; if (curr->matched == 0) { if (curr->port) { GASNETI_TRACE_PRINTF(C,("Probe left element '%s:%d' of GASNET_IBV_PORTS unused", curr->id, curr->port)); } else { GASNETI_TRACE_PRINTF(C,("Probe left element '%s' of GASNET_IBV_PORTS unused", curr->id)); } } gasneti_free(curr->id); gasneti_free(curr); curr = next; } gasnetc_port_list = NULL; } /* Return length of initial substring of S not containing C, * limited to LEN or unlimited if LEN is 0. */ static int gasnetc_scan(const char *s, int c, int len) { int i; for (i = 0; !len || (i < len); ++i) { if ((s[i] == '\0') || (s[i] == c)) return i; } return len; } static int gasnetc_parse_ports(const char *p) { int len = p ? strlen(p) : 0; while (len > 0) { int a = gasnetc_scan(p, '+', len); int b = gasnetc_scan(p, ':', a); char *hca = gasneti_strndup(p, b); if (b >= a-1) { gasnetc_add_port(gasneti_strndup(p, b), 0); } else { const char *r = p + b + 1; while (r < p + a) { int port = atoi(r); if (port) { gasnetc_add_port(gasneti_strndup(p, b), port); r += gasnetc_scan(r, ',', 0) + 1; } else { gasneti_free(hca); return 1; } } } gasneti_free(hca); p += a + 1; len -= a + 1; } return 0; } static const char* port_state_name(enum ibv_port_state port_state) { switch (port_state) { case IBV_PORT_DOWN: return "DOWN"; case IBV_PORT_INIT: return "INITIALIZE"; case IBV_PORT_ARMED: return "ARMED"; default: return "unknown"; } } static int16_t get_pkey(void) { static int16_t pkey = -1; static int first = 1; if (first) { first = 0; int64_t tmp = gasnett_getenv_int_withdefault("GASNET_IBV_PKEY", -1, 0); if (tmp == -1) { // Nothing to do } else { tmp &= ~(uint64_t)0x8000; // strip membership bit (but not sign bit) if ((tmp > 0x7fff) || (tmp < 2)) { gasneti_fatalerror("Invalid GASNET_IBV_PKEY '%s'", gasnett_getenv("GASNET_IBV_PKEY")); } } pkey = (int16_t)tmp; } return pkey; } // Scan HCAs and ports to identify ones that *should* work. // // This is used for both GASNET_IBV_LIST_PORTS and GASNET_IBV_PORTS=auto, and // so may be used to generate either a message or an array of device names. // If the `devices_p` argument is non-null, then upon return it will point // to an array (with length given by the return value) of HCA names. // If `devices_p` argument is NULL, then a console message implementing // GASNET_IBV_LIST_PORTS is generated and the return value is 0. static int gasnetc_scan_ports(const char ***devices_p) { int num_hcas = 0; struct ibv_device **hca_list = ibv_get_device_list(&num_hcas); char *msg = NULL; const char **devices = NULL; int count = 0; const char **hca_names = gasneti_malloc(num_hcas * sizeof(char *)); for (int hca_num = 0; hca_num < num_hcas; ++hca_num) { hca_names[hca_num] = ibv_get_device_name(hca_list[hca_num]); } uint32_t *hca_distances = NULL; if (!devices_p) { hca_distances = gasneti_malloc(num_hcas * sizeof(uint32_t)); if (0 > gasneti_hwloc_distances(num_hcas, hca_distances, hca_names, GASNETI_HWLOC_DISTANCES_NORMALIZE)) { gasneti_free(hca_distances); hca_distances = NULL; } } int good_count = 0; for (int hca_num = 0; hca_num < num_hcas; ++hca_num) { const char *hca_name = hca_names[hca_num]; #if HAVE_IBV_TRANSPORT_TYPE if (hca_list[hca_num]->transport_type != IBV_TRANSPORT_IB) { if (!devices_p) { msg = gasneti_sappendf(msg, " %s BAD - identifies as NON InfiniBand device\n", hca_name); } continue; // next hca_num } #endif struct ibv_context *hca_handle = ibv_open_device(hca_list[hca_num]); if (! hca_handle) { if (!devices_p) { msg = gasneti_sappendf(msg, " %s BAD - failed to open device\n", hca_name); } continue; // next hca_num } struct ibv_device_attr hca_attr; if (ibv_query_device(hca_handle, &hca_attr)) { if (!devices_p) { msg = gasneti_sappendf(msg, " %s BAD - failed to query device capabilities\n", hca_name); } (void) ibv_close_device(hca_handle); continue; // next hca_num } // Loop over ports on the HCA (numbering starts at 1) for (int port_num = 1; port_num <= hca_attr.phys_port_cnt; ++port_num) { struct ibv_port_attr port_attr; if (ibv_query_port(hca_handle, port_num, &port_attr)) { if (!devices_p) { msg = gasneti_sappendf(msg, " %s:%d BAD - failed to query port capabilities\n", hca_name, port_num); } continue; // next port_num } if (port_attr.state != IBV_PORT_ACTIVE) { if (!devices_p) { msg = gasneti_sappendf(msg, " %s:%d BAD - reports state=%s\n", hca_name, port_num, port_state_name(port_attr.state)); } continue; // next port_num } if (!port_attr.lid) { if (!devices_p) { msg = gasneti_sappendf(msg, " %s:%d BAD - reports LID=0\n", hca_name, port_num); } continue; // next port_num } int16_t pkey = get_pkey(); if (pkey >= 0) { int idx = -1; for (int i = 0; i < hca_attr.max_pkeys; ++i) { uint16_t pkey_val; if (ibv_query_pkey(hca_handle, port_num, i, &pkey_val)) { if (!devices_p) { msg = gasneti_sappendf(msg, " %s:%d BAD - failed to query pkeys\n", hca_name, port_num); } idx = i; break; } if (pkey == (ntohs(pkey_val) & 0x7fff)) { idx = i; break; } } if (idx < 0) { if (!devices_p) { msg = gasneti_sappendf(msg, " %s:%d BAD - not associated with user-specified pkey 0x%x\n", hca_name, port_num, (unsigned int)pkey); } continue; // next port_num } } if (devices_p) { devices = gasneti_realloc(devices, sizeof(char *) * (count+1)); devices[count++] = hca_name; break; // end port_num loop - only need one good port per HCA to list it } else { const char *dist_msg = ""; if (hca_distances) { if (hca_distances[hca_num] == GASNETI_HWLOC_DISTANCE_UNKNOWN) { dist_msg = " - distance ranking unknown"; } else { dist_msg = gasneti_dynsprintf(" - distance ranking %u", 1 + (unsigned int)hca_distances[hca_num]); } } msg = gasneti_sappendf(msg, " %s:%d GOOD%s\n", hca_name, port_num, dist_msg); } ++good_count; } (void) ibv_close_device(hca_handle); } if (devices_p) { gasneti_assert(! msg); gasneti_assert(! hca_distances); *devices_p = devices; } else { if (num_hcas) { int middle_val = good_count ? good_count : num_hcas; const char *middle_text = good_count ? "potentially" : "devices, but no"; gasneti_console_message("INFO", "Detected the following devices:ports\n%s" " Found %d %s usable InfiniBand ports", msg, middle_val, middle_text); } else { gasneti_console_message("INFO", "No IBV-compatible devices found\n"); } gasneti_free(msg); gasneti_free(hca_distances); } gasneti_free(hca_names); return count; } // Automatic ports selection using hwloc static char *gasnetc_auto_ports(const char * env_val) { char *result = NULL; // Get list of all devices which appear to be usable const char **devices = NULL; int count = gasnetc_scan_ports(&devices); // Use GASNET_IBV_PORTS to filter the device list. // // TODO: can/should filtering be moved inside gasnetc_scan_ports()? // TODO: we currently only apply the un-suffixed filter, but could/should // support a syntax like `GASNET_IBV_PORTS_TYPE=auto.socket`. const char *allowed_ports = gasneti_getenv_withdefault("GASNET_IBV_PORTS", GASNETC_DEFAULT_IBV_PORTS); if (allowed_ports && allowed_ports[0]) { if (gasnetc_parse_ports(allowed_ports)) { gasneti_console_message("WARNING", "Skipping automatic device selection via GASNET_IBV_PORTS_TYPE=%s: " "invalid GASNET_IBV_PORTS='%s'", env_val, allowed_ports); gasnetc_clear_ports(); goto out; } for (int i = 0; i < count; /*empty*/) { if (gasnetc_match_port(devices[i], 0, 0)) { ++i; } else { devices[i] = devices[--count]; // deletion } } gasnetc_clear_ports(); if (count < 1) { gasneti_console_message("WARNING", "Skipping automatic device selection via GASNET_IBV_PORTS_TYPE=%s: " "no usable ports found, possibly due to GASNET_IBV_PORTS='%s'", env_val, allowed_ports); goto out; } } // Submit the filtered device list to hwloc-based auto-selection logic { int *use = gasneti_malloc(count * sizeof(int)); int num_results = gasneti_hwloc_auto_select( 1, count, use, devices, (gasnetc_ibv_ports_verbose > 2), gasneti_spawner->Barrier, gasneti_spawner->HostBroadcast); if (num_results < 1) { const char *why = num_results ? "failure to initialize hwloc" : "no devices recognized by hwloc"; gasneti_console_message("WARNING", "Skipping automatic device selection via GASNET_IBV_PORTS_TYPE=%s: %s", env_val, why); gasneti_free(use); goto out; } for (int i = 0; i < count; ++i) { if (use[i] > 0) { result = result ? gasneti_sappendf(result, "+%s", devices[i]) : gasneti_strdup(devices[i]); } } } out: gasneti_free(devices); // shallow, since libibverbs owns the strings return result; } /* Try to find up to *port_count_p ACTIVE ports, replacing w/ the actual count */ static void gasnetc_probe_ports(int max_ports) { struct ibv_device **hca_list; int num_hcas; int ib_hcas; gasnetc_port_info_t *port_tbl; int port_count = 0; int hca_count = 0; int curr_hca; if (gasneti_getenv_yesno_withdefault("GASNET_IBV_LIST_PORTS", 0) && gasneti_check_node_list("GASNET_IBV_LIST_PORTS_NODES")) { gasnetc_scan_ports(NULL); } if (gasnetc_parse_ports(gasnetc_ibv_ports)) { GASNETI_TRACE_PRINTF(C,("Failed to parse GASNET_IBV_PORTS='%s'", gasnetc_ibv_ports)); gasnetc_clear_ports(); return; } if (max_ports) { GASNETI_TRACE_PRINTF(C,("Probing HCAs for active ports (max %d)", max_ports)); } else { GASNETI_TRACE_PRINTF(C,("Probing HCAs for active ports")); max_ports = 128; /* If you have more than 128 IB ports per node, then I owe you $20 :-) */ } port_tbl = gasneti_calloc(max_ports, sizeof(gasnetc_port_info_t)); num_hcas = 0; /* call will overwrite with actual count */ hca_list = ibv_get_device_list(&num_hcas); if ((hca_list == NULL) || (num_hcas == 0)) { GASNETI_TRACE_PRINTF(C,("Probe failed to locate any HCAs")); gasnetc_clear_ports(); return; } ib_hcas = num_hcas; #if HAVE_IBV_TRANSPORT_TYPE for (curr_hca = 0; curr_hca < num_hcas; ++curr_hca) { ib_hcas -= (hca_list[curr_hca]->transport_type != IBV_TRANSPORT_IB); } #endif if ((ib_hcas > GASNETC_IB_MAX_HCAS) && (gasnetc_port_list == NULL) && gasnetc_ibv_ports_verbose) { #if GASNETC_IBV_MAX_HCAS_CONFIGURE const char *current = "with '--with-ibv-max-hcas=" _STRINGIFY(GASNETC_IB_MAX_HCAS) "'"; #else const char *current = "without multi-rail support"; #endif gasneti_console_message("WARNING","Found %d IB HCAs, but GASNet was configured %s. " "To utilize all your HCAs, you should " "reconfigure GASNet using '--with-ibv-max-hcas=%d'. You can silence this warning " "by setting the environment variable GASNET_IBV_PORTS as described in the file " "'gasnet/ibv-conduit/README' to specify the desired HCA(s), or by setting the " "environment variable GASNET_IBV_PORTS_VERBOSE=0 to use the default.\n", num_hcas, current, num_hcas); } int16_t pkey = get_pkey(); /* Loop over list of HCAs */ for (curr_hca = 0; (hca_count < GASNETC_IB_MAX_HCAS) && (port_count < max_ports) && (curr_hca < num_hcas); ++curr_hca) { const char *hca_name = ibv_get_device_name(hca_list[curr_hca]); int rc; struct ibv_context * hca_handle; struct ibv_device_attr hca_cap; int found = 0; int curr_port; #if HAVE_IBV_TRANSPORT_TYPE if (hca_list[curr_hca]->transport_type != IBV_TRANSPORT_IB) { GASNETI_TRACE_PRINTF(C,("Probe skipping non-InfiniBand HCA '%s'", hca_name)); continue; } #endif if (!gasnetc_match_port(hca_name, 0, 0)) { GASNETI_TRACE_PRINTF(C,("Probe skipping HCA '%s' - no match in GASNET_IBV_PORTS", hca_name)); continue; } hca_handle = ibv_open_device(hca_list[curr_hca]); if (hca_handle != NULL) { GASNETI_TRACE_PRINTF(C,("Probe found HCA '%s'", hca_name)); } else { GASNETI_TRACE_PRINTF(C,("Probe failed to open HCA '%s'", hca_name)); continue; /* OK, keep trying HCAs */ } rc = ibv_query_device(hca_handle, &hca_cap); GASNETC_IBV_CHECK(rc, "from ibv_query_device()"); /* Loop over ports on the HCA (they start numbering at 1) */ for (curr_port = 1; (port_count < max_ports) && (curr_port <= hca_cap.phys_port_cnt); ++curr_port) { gasnetc_port_info_t *this_port = &port_tbl[port_count]; if (!gasnetc_match_port(hca_name, curr_port, 0)) { GASNETI_TRACE_PRINTF(C,("Probe skipping HCA '%s', port %d - no match in GASNET_IBV_PORTS", hca_name, curr_port)); continue; } (void) ibv_query_port(hca_handle, curr_port, &this_port->port); if (!this_port->port.lid) { GASNETI_TRACE_PRINTF(C,("Probe skipping HCA '%s', port %d - LID is zero", hca_name, curr_port)); continue; } if (this_port->port.state == IBV_PORT_ACTIVE) { ++port_count; ++found; this_port->port_num = curr_port; this_port->hca_index = hca_count; if (pkey < 0) { GASNETI_TRACE_PRINTF(C,("Using default pkey_index=0 for HCA '%s', port %d", hca_name, curr_port)); this_port->pkey_index = 0; } else { int i; for (i = 0; i < hca_cap.max_pkeys; ++i) { uint16_t pkey_val; if (ibv_query_pkey(hca_handle, curr_port, i, &pkey_val)) { gasneti_fatalerror("Failed to query pkeys for HCA '%s', port %d", hca_name, curr_port); } pkey_val = ntohs(pkey_val) & 0x7fff; if (pkey_val == pkey) { GASNETI_TRACE_PRINTF(C,("Using pkey_index %d for HCA '%s', port %d", i, hca_name, curr_port)); this_port->pkey_index = i; break; } } if (i == hca_cap.max_pkeys) { gasneti_fatalerror("Failed to locate index of requested pkey 0x%04x for HCA '%s', port %d", (unsigned int)pkey, hca_name, curr_port); } } if (gasnetc_qp_rd_atom) { /* Zero means use HCA/port limit */ int limit = MIN(hca_cap.max_qp_init_rd_atom, hca_cap.max_qp_rd_atom); if (gasnetc_qp_rd_atom > limit) { gasneti_console_message("WARNING","Requested GASNET_QP_RD_ATOM %d reduced to HCA limit %d", gasnetc_qp_rd_atom, limit); gasnetc_qp_rd_atom = limit; } this_port->rd_atom = gasnetc_qp_rd_atom; } else { this_port->rd_atom = MIN(hca_cap.max_qp_init_rd_atom, hca_cap.max_qp_rd_atom); } if (gasneti_spawn_verbose || (gasnetc_ibv_ports_verbose > 1)) { gasneti_console_message("INFO", "Using HCA:port '%s:%d' on hostname '%s'", hca_name, curr_port, gasneti_gethostname()); } else { GASNETI_TRACE_PRINTF(C,("Probe found HCA '%s', port %d", hca_name, curr_port)); } (void)gasnetc_match_port(hca_name, curr_port, 1); if (gasnetc_port_list == NULL) { /* By default one at most 1 port per HCA */ break; } } #if GASNET_TRACE else { GASNETI_TRACE_PRINTF(C,("Probe skipping HCA '%s', port %d - state = %s", hca_name, curr_port, port_state_name(this_port->port.state))); } #endif } /* Install or release the HCA */ if (found) { gasnetc_hca_t *hca = &gasnetc_hca[hca_count]; if (gasneti_getenv_yesno_withdefault("GASNET_IBV_MODEL_WARN", 1)) { const char *bad_model = NULL; if (!strncmp(hca_name, "hfi1_", 5)) bad_model = "Omni-Path"; if (!strncmp(hca_name, "qib", 3)) bad_model = "True Scale"; if (bad_model) { gasneti_console_message("WARNING", "Use of ibv-conduit with %s NIC %s is not recommended.\n" " See GASNet's ibv-conduit README for more information.\n" " Alternatively, you may set environment variable\n" " GASNET_IBV_MODEL_WARN=0 to silence this message.\n", bad_model, hca_name); } } memset(hca, 0, sizeof(gasnetc_hca_t)); hca->handle = hca_handle; hca->hca_index = hca_count; hca->hca_id = gasneti_strdup(hca_name); hca->hca_cap = hca_cap; gasneti_leak((/*non-const*/ void *)hca->hca_id); hca_count++; } else { (void) ibv_close_device(hca_handle); } } GASNETI_TRACE_PRINTF(C,("Probe found %d active port(s) on %d HCA(s)", port_count, hca_count)); gasnetc_clear_ports(); ibv_free_device_list(hca_list); #if (GASNETC_IB_MAX_HCAS > 1) gasnetc_num_hcas = hca_count; gasnetc_snd_poll_multi_hcas = (gasnetc_num_hcas > 1); // snd thread may override later gasnetc_rcv_poll_multi_hcas = (gasnetc_num_hcas > 1); // rcv thread may override later #endif gasnetc_num_ports = port_count; gasnetc_port_tbl = gasneti_realloc(port_tbl, port_count * sizeof(gasnetc_port_info_t)); gasneti_leak(gasnetc_port_tbl); } static int gasnetc_hca_report(void) { gasnetc_hca_t *hca; int h, i; /* Report/check hca and port properties */ GASNETC_FOR_ALL_HCA_INDEX(h) { hca = &gasnetc_hca[h]; GASNETI_TRACE_PRINTF(I,("ibv-conduit HCA properties (%d of %d) = {", h+1, gasnetc_num_hcas)); GASNETI_TRACE_PRINTF(I,(" HCA id = '%s'", hca->hca_id)); GASNETI_TRACE_PRINTF(I,(" HCA vendor id = 0x%x", (unsigned int)hca->hca_cap.vendor_id)); GASNETI_TRACE_PRINTF(I,(" HCA vendor part id = 0x%x", (unsigned int)hca->hca_cap.vendor_part_id)); GASNETI_TRACE_PRINTF(I,(" HCA hardware version = 0x%x", (unsigned int)hca->hca_cap.hw_ver)); GASNETI_TRACE_PRINTF(I,(" HCA firmware version = %.64s", hca->hca_cap.fw_ver)); GASNETI_TRACE_PRINTF(I,(" max_num_qp = %u", (unsigned int)hca->hca_cap.max_qp)); GASNETI_TRACE_PRINTF(I,(" max_qp_ous_wr = %u", (unsigned int)hca->hca_cap.max_qp_wr)); GASNETI_TRACE_PRINTF(I,(" max_num_sg_ent = %u", (unsigned int)hca->hca_cap.max_sge)); gasneti_assert_always(hca->hca_cap.max_sge >= GASNETC_SND_SG); gasneti_assert_always(hca->hca_cap.max_sge >= 1); #if 1 /* QP end points */ GASNETI_TRACE_PRINTF(I,(" max_qp_init_rd_atom = %u", (unsigned int)hca->hca_cap.max_qp_init_rd_atom)); gasneti_assert_always(hca->hca_cap.max_qp_init_rd_atom >= 1); /* RDMA Read support required */ GASNETI_TRACE_PRINTF(I,(" max_qp_ous_rd_atom = %u", (unsigned int)hca->hca_cap.max_qp_rd_atom)); gasneti_assert_always(hca->hca_cap.max_qp_rd_atom >= 1); /* RDMA Read support required */ #else GASNETI_TRACE_PRINTF(I,(" max_ee_init_rd_atom = %u", (unsigned int)hca->hca_cap.max_ee_init_rd_atom)); gasneti_assert_always(hca->hca_cap.max_ee_init_rd_atom >= 1); /* RDMA Read support required */ GASNETI_TRACE_PRINTF(I,(" max_ee_ous_rd_atom = %u", (unsigned int)hca->hca_cap.max_ee_rd_atom)); gasneti_assert_always(hca->hca_cap.max_ee_rd_atom >= 1); /* RDMA Read support required */ #endif GASNETI_TRACE_PRINTF(I,(" max_num_cq = %u", (unsigned int)hca->hca_cap.max_cq)); gasneti_assert_always(hca->hca_cap.max_cq >= 2); GASNETI_TRACE_PRINTF(I,(" max_num_ent_cq = %u", (unsigned int)hca->hca_cap.max_cqe)); GASNETI_TRACE_PRINTF(I,(" max_mr = %u", (unsigned int)hca->hca_cap.max_mr)); GASNETI_TRACE_PRINTF(I,(" max_mr_sz = %"PRIu64, (uint64_t)hca->hca_cap.max_mr_size)); /* Vendor/device-specific firmware checks */ /* NONE OF OUR KNOWN DEFECTS ARE PRESENT IN IBV-CAPABLE FW */ /* Per-port: */ for (i = 0; i < gasnetc_num_ports; ++i) { if (gasnetc_port_tbl[i].hca_index == h) { GASNETI_TRACE_PRINTF(I,(" port %d properties = {", (int)gasnetc_port_tbl[i].port_num)); GASNETI_TRACE_PRINTF(I,(" LID = %u", (unsigned int)gasnetc_port_tbl[i].port.lid)); GASNETI_TRACE_PRINTF(I,(" max_msg_sz = %u", (unsigned int)gasnetc_port_tbl[i].port.max_msg_sz)); GASNETI_TRACE_PRINTF(I,(" active_mtu = %s", mtu_to_str(gasnetc_port_tbl[i].port.active_mtu))); GASNETI_TRACE_PRINTF(I,(" }")); } } GASNETI_TRACE_PRINTF(I,("}")); /* end of HCA report */ } return GASNET_OK; } #if GASNETC_IBV_ODP static void gasneti_odp_init(void) { struct gasneti_odp_support { uint8_t missing; char hca_id[15]; } my_odp_support[GASNETC_IB_MAX_HCAS]; enum gasneti_odp_missing { missing_none = 0, // not missing anything == OK missing_general, missing_implicit, missing_xrc_read, missing_xrc_write, missing_rc_read, missing_rc_write }; const char *message[] = { "", "general ODP", "Implicit ODP", "XRC READ", "XRC WRITE" "RC READ", "RC WRITE" }; // TODO: support heterogenous multi-rail with some HCAs having ODP and others not. // This is not trivial because the RDMA logic picks ODP vs FH before picking an HCA. gasnetc_hca_t *hca; GASNETC_FOR_ALL_HCA(hca) { enum gasneti_odp_missing missing = missing_none; #if GASNETC_IBV_ODP_CORE struct ibv_query_device_ex_input input; input.comp_mask = 0; struct ibv_device_attr_ex attr; memset(&attr, 0, sizeof(attr)); int ret = ibv_query_device_ex(hca->handle, &input, &attr); int no_odp_general = !(attr.odp_caps.general_caps & IBV_ODP_SUPPORT); int no_odp_implicit = !(attr.odp_caps.general_caps & IBV_ODP_SUPPORT_IMPLICIT); uint32_t odp_caps = gasnetc_use_xrc ? attr.xrc_odp_caps : attr.odp_caps.per_transport_caps.rc_odp_caps; int no_odp_read = !(odp_caps & IBV_ODP_SUPPORT_READ); int no_odp_write = !(odp_caps & IBV_ODP_SUPPORT_WRITE); #elif GASNETC_IBV_ODP_MLNX struct ibv_exp_device_attr attr; memset(&attr, 0, sizeof(attr)); attr.comp_mask = IBV_EXP_DEVICE_ATTR_ODP | IBV_EXP_DEVICE_ATTR_EXP_CAP_FLAGS; int ret = ibv_exp_query_device(hca->handle, &attr); int no_odp_general = !(attr.exp_device_cap_flags & IBV_EXP_DEVICE_ODP); int no_odp_implicit = !(attr.odp_caps.general_odp_caps & IBV_EXP_ODP_SUPPORT_IMPLICIT); uint32_t odp_caps = gasnetc_use_xrc ? attr.odp_caps.per_transport_caps.xrc_odp_caps : attr.odp_caps.per_transport_caps.rc_odp_caps; int no_odp_read = !(odp_caps & IBV_EXP_ODP_SUPPORT_READ); int no_odp_write = !(odp_caps & IBV_EXP_ODP_SUPPORT_WRITE); #else #error Unknown ODP API variant #endif if (no_odp_general) { missing = missing_general; } else if (no_odp_implicit) { missing = missing_implicit; // TODO-EX: maybe support older systems lacking this bit? // Prior to ConnectX-4, implicit ODP was done in s/w and // + This can be identified because this caps bit was not set // + Implicit ODP emulation had 128MB limit // + Implicit ODP was valid for local only (invalid rkey) } else { if (no_odp_read) { missing = gasnetc_use_xrc? missing_xrc_read : missing_rc_read; } else if (no_odp_write) { missing = gasnetc_use_xrc? missing_xrc_write : missing_rc_write; } } if (missing != missing_none) { GASNETI_TRACE_PRINTF(C,("Disabled ODP - %s: %s support is missing.", hca->hca_id, message[(int)missing])); gasnetc_use_odp = 0; size_t max_len = sizeof(my_odp_support[0].hca_id) - 1; strncpy(my_odp_support[hca->hca_index].hca_id, hca->hca_id, max_len); my_odp_support[hca->hca_index].hca_id[max_len] = '\0'; } my_odp_support[hca->hca_index].missing = missing; } if (gasnetc_use_odp) { GASNETI_TRACE_PRINTF(I, ("Implicit ODP enabled")); // Create implict ODP registrations (currently only used locally) GASNETC_FOR_ALL_HCA(hca) { #if GASNETC_IBV_ODP_CORE unsigned int access_flags = (unsigned int)IBV_ACCESS_ON_DEMAND | (unsigned int)IBV_ACCESS_LOCAL_WRITE; hca->implicit_odp.handle = ibv_reg_mr(hca->pd, 0, SIZE_MAX, access_flags); #else struct ibv_exp_reg_mr_in in; memset(&in, 0, sizeof(in)); in.pd = hca->pd; in.exp_access = (enum ibv_exp_access_flags)( IBV_EXP_ACCESS_ON_DEMAND | IBV_EXP_ACCESS_LOCAL_WRITE ); in.length = IBV_EXP_IMPLICIT_MR_SIZE; hca->implicit_odp.handle = ibv_exp_reg_mr(&in); #endif GASNETC_IBV_CHECK_PTR(hca->implicit_odp.handle, "from ibv_reg_mr(implicit)"); hca->implicit_odp.lkey = hca->implicit_odp.handle->lkey; // flatten for quick access } } // Results by value of GASNET_ODP_VERBOSE: // 0: No output (and no comms either) // 1: Reports count of proceses missing support // 2: Reports detail, w/ HCA ids IFF multi-hca // 3: Reports detail w/ HCA ids unconditionally int verbose = gasneti_getenv_int_withdefault("GASNET_ODP_VERBOSE", 1, 0); if (verbose) { // Will exchange just a single byte when not reporting HCA ids // TODO: Only one process reports, so gather to 0 would be sufficient int show_ids = (verbose > 2) || (gasnetc_num_hcas > 1); size_t exchg_len = show_ids ? gasnetc_num_hcas * sizeof(struct gasneti_odp_support) : 1; size_t stride = show_ids ? sizeof(struct gasneti_odp_support) : 1; struct gasneti_odp_support *all_odp_support = gasneti_malloc(gasneti_nodes * exchg_len); gasneti_bootstrapExchange(my_odp_support, exchg_len, all_odp_support); if (! gasneti_mynode) { struct gasneti_odp_support *p = all_odp_support; // First just count the number of procs w/o OPD int non_odp_procs = 0; int with_xrc_procs = 0; for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) { int non_odp = 0; int with_xrc = 0; GASNETC_FOR_ALL_HCA(hca) { non_odp |= (p->missing != missing_none); with_xrc |= (p->missing == missing_xrc_read) || (p->missing == missing_xrc_write); p = (struct gasneti_odp_support *)((uintptr_t)p + stride); } non_odp_procs += non_odp; with_xrc_procs += with_xrc; } if (non_odp_procs) { int only_xrc_problem = (non_odp_procs == with_xrc_procs); const char *why = only_xrc_problem ? "due to conflict with XRC" : "which are missing support"; const char *less_msg = " To suppress this message set environment variable\n" " GASNET_ODP_VERBOSE=0 or reconfigure with --disable-ibv-odp\n" " (see ibv-conduit's README for more information).\n"; const char *more_msg = ""; if (only_xrc_problem) { more_msg = " Alternatively, one may set GASNET_USE_ODP or GASNET_USE_XRC\n" " to '0' to disable the corresponding feature.\n"; } else if (verbose) { more_msg = " To see additional details set environment variable\n" " GASNET_ODP_VERBOSE=2 (or higher).\n"; } // report the summary information (verbose > 0) gasneti_console0_message("WARNING", "ODP disabled on %d of %d processes %s.\n%s%s", (int)non_odp_procs, (int)gasneti_nodes, why, less_msg, more_msg); // report detailed information (verbose > 1) if (verbose > 1) { p = all_odp_support; for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) { GASNETC_FOR_ALL_HCA(hca) { if (p->missing != missing_none) { const char *msg = message[(int)p->missing]; if (show_ids) { gasneti_console0_message("WARNING"," Process %d (hca '%s'): %s support is missing.\n", i, p->hca_id, msg); } else { gasneti_console0_message("WARNING"," Process %d: %s support is missing.\n", i, msg); } } p = (struct gasneti_odp_support *)((uintptr_t)p + stride); } } } } } gasneti_free(all_odp_support); } } static void gasnetc_odp_dereg(gasnetc_hca_t *hca) { struct ibv_mr *handle; #if PLATFORM_ARCH_32 handle = (struct ibv_mr *) gasneti_atomic32_swap((gasneti_atomic32_t *) &hca->implicit_odp.handle, 0, 0); #else handle = (struct ibv_mr *) gasneti_atomic64_swap((gasneti_atomic64_t *) &hca->implicit_odp.handle, 0, 0); #endif if (handle) { ibv_dereg_mr(handle); } } // Testing shows that exiting without releasing the implicit ODP registration // leads to an (eventually fatal!) irreversible system memory leak. // So, we *must* do this for both normal and abnormal exits. static void gasnetc_odp_shutdown(void) { if (gasnetc_use_odp) { if (gasnetc_exit_in_signal) { static const char msg[] = "WARNING: ODP shutdown in signal context\n"; gasneti_unused_result( write(STDERR_FILENO, msg, sizeof(msg) - 1) ); (void) fsync(STDERR_FILENO); } gasnetc_hca_t *hca; GASNETC_FOR_ALL_HCA(hca) { gasnetc_odp_dereg(hca); } } } extern void gasnetc_fatalsignal_cleanup_callback(int sig) { // Note: caller has set SIGALRM handler alarm(30); gasnetc_odp_shutdown(); alarm(0); } #if HAVE_ON_EXIT static void gasnetc_odp_on_exit(int exitcode, void *arg) { gasnetc_odp_shutdown(); } #else static void gasnetc_odp_atexit(void) { gasnetc_odp_shutdown(); } #endif #endif // GASNETC_IBV_ODP static int gasnetc_init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { #if GASNET_PSHM void *shared_mem; #endif gasnetc_hca_t *hca; uint16_t *local_lid; uint16_t *remote_lid; gex_Rank_t node; int i; /* check system sanity */ gasnetc_check_config(); if (gasneti_init_done) GASNETI_RETURN_ERRR(NOT_INIT, "GASNet already initialized"); /* Initialize the bootstrapping support. */ /* Must come very early to get the global ENV. */ #if GASNET_DEBUG_VERBOSE gasneti_console_message("gasnetc_init","about to spawn..."); #endif gasneti_spawner = gasneti_spawnerInit(argc, argv, NULL, &gasneti_nodes, &gasneti_mynode); if (!gasneti_spawner) GASNETI_RETURN_ERRR(NOT_INIT, "GASNet job spawn failed"); gasneti_init_done = 1; /* enable early to allow tracing */ gasneti_freezeForDebugger(); /* Must init timers after global env, and preferably before tracing */ GASNETI_TICKS_INIT(); /* Now enable tracing of all the following steps */ gasneti_trace_init(argc, argv); // Ensure work-arounds like MLX5_SCATTER_TO_CQE are propogated gasneti_propagate_env("MLX5_", GASNETI_PROPAGATE_ENV_PREFIX); /* bootstrapInit may set gasneti_nodes==0 if would overflow 16-bit field */ if (!gasneti_nodes || (gasneti_nodes > GASNET_MAXNODES)) { GASNETI_RETURN_ERRR(RESOURCE, "job size exceeds ibv-conduit capabilities"); } // Derive nodemap by the default means. // We cannot use LID info if GASNET_IBV_PORTS is inhomogeneous (bug 4208) gasneti_nodemapInit(&gasneti_bootstrapExchange, NULL, 0, 0); // Process the environment for configuration/settings // Requires nodemap in general i = gasnetc_load_settings(); if (i != GASNET_OK) { return i; } #if GASNET_SEQ || GASNET_PARSYNC { // If possible, determine that this is truly a "single-threaded" run // without AM recv thread or connection thread. If so, then we // set MLX5_SINGLE_THREADED=1 in the environment to potentially // improve the performance of libibverbs. // This setting must precede any ibv calls to be effective. int st = 1; // Assume the best #if GASNETC_USE_RCV_THREAD || GASNETC_USE_SND_THREAD if (gasnetc_use_rcv_thread || gasnetc_use_snd_thread) st = 0; #endif #if GASNETC_USE_CONN_THREAD if (!gasnetc_conn_dynamic) { // Dynamic connect disabled in environment } else if (gasnetc_conn_static && !gasnetc_connectfile_in) { // Static connect enabled w/o constraint by a connect file => fully connected // NOTE: this is the default case } else { // Connection setup will spawn a dynamic connection thread *unless* // connection file is used to specify a fully connected job, which we // cannot reasonably detect here. st = 0; } #endif if (st) { char *tmp; if (NULL != (tmp = gasneti_getenv("MLX4_SINGLE_THREADED"))) { gasneti_envstr_display("MLX4_SINGLE_THREADED", tmp, 0); GASNETI_TRACE_PRINTF(I, ("Not overwriting MLX4_SINGLE_THREADED in environment")); } else { GASNETI_TRACE_PRINTF(I, ("Setting MLX4_SINGLE_THREADED=1 in environment")); gasneti_envstr_display("MLX4_SINGLE_THREADED", "1", 1); gasneti_setenv("MLX4_SINGLE_THREADED", "1"); } if (NULL != (tmp = gasneti_getenv("MLX5_SINGLE_THREADED"))) { gasneti_envstr_display("MLX5_SINGLE_THREADED", tmp, 0); GASNETI_TRACE_PRINTF(I, ("Not overwriting MLX5_SINGLE_THREADED in environment")); } else { GASNETI_TRACE_PRINTF(I, ("Setting MLX5_SINGLE_THREADED=1 in environment")); gasneti_envstr_display("MLX5_SINGLE_THREADED", "1", 1); gasneti_setenv("MLX5_SINGLE_THREADED", "1"); } } } #endif /* Find the port(s) to use */ gasnetc_probe_ports(gasnetc_num_qps); if (!gasnetc_num_qps) { /* Let the probe determine gasnetc_num_qps */ gasnetc_num_qps = gasnetc_num_ports; } if (!gasnetc_num_ports || (gasnetc_port_tbl == NULL)) { if (gasnetc_ibv_ports && strlen(gasnetc_ibv_ports)) { GASNETI_RETURN_ERRR(RESOURCE, "unable to open any HCA ports given in GASNET_IBV_PORTS"); } else { GASNETI_RETURN_ERRR(RESOURCE, "unable to open any HCA ports"); } } // Past probing of HCA ports, we are done with hwloc (void) gasneti_hwloc_fini(); #if GASNETC_HAVE_FENCED_PUTS gasnetc_use_fenced_puts = gasneti_getenv_yesno_withdefault("GASNET_USE_FENCED_PUTS", GASNETC_IBV_FENCED_PUTS_CONFIGURE); #else if (!gasneti_mynode && gasneti_getenv_yesno_withdefault("GASNET_USE_FENCED_PUTS", 0)) { gasneti_console_message("WARNING", "GASNET_USE_FENCED_PUTS requested, but ignored because GASNet was\n" " configured without multi-rail support. To suppress this message,\n" " you may either unset this environment variable or set it to '0'.\n" " Alternatively, you may configure using '--enable-ibv-multirail'.\n"); } #endif /* report hca/port properties */ gasnetc_hca_report(); // Attempt to maximize pinned memory limit (if any) before allocating any IBV resources #ifdef RLIMIT_MEMLOCK gasnett_maximize_rlimit(RLIMIT_MEMLOCK, "RLIMIT_MEMLOCK"); #endif /* get a pd for the QPs, SRQ and memory registration */ GASNETC_FOR_ALL_HCA(hca) { hca->pd = ibv_alloc_pd(hca->handle); GASNETC_IBV_CHECK_PTR(hca->pd, "from ibv_alloc_pd()"); } /* Check each HCA for feature support. */ #if GASNETC_IBV_SRQ if (gasnetc_use_srq) { GASNETC_FOR_ALL_HCA(hca) { struct ibv_srq_init_attr attr; struct ibv_srq *my_srq; memset(&attr, 0, sizeof(attr)); attr.attr.max_wr = 4; /* Arbitrary */ attr.attr.max_sge = 1; if (!hca->hca_cap.max_srq || !hca->hca_cap.max_srq_wr || (NULL == (my_srq = ibv_create_srq(hca->pd, &attr))) || ibv_destroy_srq(my_srq)) { gasnetc_use_srq = 0; break; } } if (!gasnetc_use_srq) { gasneti_console0_message( "WARNING","GASNET_USE_SRQ disabled because HCA lacks support.\n" " To suppress this message set environment variable\n" " GASNET_USE_SRQ=0 or reconfigure with --disable-ibv-srq.\n" ); } } #endif /* GASNETC_IBV_SRQ */ #if GASNETC_IBV_XRC if (gasnetc_use_xrc && !gasnetc_use_srq) { gasnetc_use_xrc =0 ; gasneti_console0_message( "WARNING","GASNET_USE_XRC disabled because SRQ is unavailable.\n" " To suppress this message set environment variable\n" " GASNET_USE_XRC=0 or reconfigure with --disable-ibv-xrc.\n" ); } else if (gasnetc_use_xrc) { GASNETC_FOR_ALL_HCA(hca) { if (0 == (hca->hca_cap.device_cap_flags & IBV_DEVICE_XRC)) { gasnetc_use_xrc =0 ; break; } } if (!gasnetc_use_xrc) { gasneti_console0_message( "WARNING","GASNET_USE_XRC disabled because HCA lacks support.\n" " To suppress this message set environment variable\n" " GASNET_USE_XRC=0 or reconfigure with --disable-ibv-xrc.\n" ); } } #endif /* GASNETC_IBV_XRC */ // Detect configuration differences (likely to be) due to heterogeneous clusters { const uint32_t srq_flag = 0x80000000; const uint32_t xrc_flag = 0x40000000; uint32_t config_word = (gasnetc_use_srq ? srq_flag : 0) | (gasnetc_use_xrc ? xrc_flag : 0) | ((gasnetc_num_hcas & 0xff) << 8) | (gasnetc_num_ports & 0xff); int srq_squashed = 0; uint32_t *all_configs = gasneti_malloc(gasneti_nodes * sizeof(config_word)); gasneti_bootstrapExchange(&config_word, sizeof(config_word), all_configs); #if GASNETC_IBV_SRQ // Auto-disable (with warning) SRQ if inhomogeneous for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) { if (srq_flag & (config_word ^ all_configs[i])) { gasnetc_use_srq = 0; #if GASNETC_IBV_XRC gasnetc_use_xrc = 0; srq_squashed = 1; #endif gasneti_console0_message( "WARNING","SRQ disabled because availability differs across nodes.\n" " To suppress this message set environment variable\n" " GASNET_USE_SRQ=0 or reconfigure with --disable-ibv-srq.\n"); } } #endif // GASNETC_IBV_SRQ #if GASNETC_IBV_XRC // Auto-disable (with warning) XRC if inhomogeneous // Note that if SRQ was "squashed" above, then we won't complain about both for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) { if (xrc_flag & (config_word ^ all_configs[i])) { gasnetc_use_xrc = 0; if (!srq_squashed) { gasneti_console0_message( "WARNING","XRC disabled because availability differs across nodes.\n" " To suppress this message set environment variable\n" " GASNET_USE_XRC=0 or reconfigure with --disable-ibv-xrc.\n"); } } } #endif // GASNETC_IBV_XRC // Fail gracefully if HCA or port counts are inhomogeneous if (!gasneti_mynode) { for (gex_Rank_t i = 1; i < gasneti_nodes; ++i) { if (0xff00 & (config_word ^ all_configs[i])) { gasneti_fatalerror("Inhomogeneous IB HCA count - cannot continue.\n" "See README for GASNet's ibv-conduit for more information, especially\n" "on multi-rail support and the GASNET_IBV_PORTS environment variable.\n" "First detected mismatch: proc 0: %d vs. proc %d: %d\n", gasnetc_num_hcas, (int)i, (int)(0xff & (all_configs[i] >> 8))); } if (0xff & (config_word ^ all_configs[i])) { gasneti_fatalerror("Inhomogeneous IB PORT count - cannot continue.\n" "See README for GASNet's ibv-conduit for more information, especially\n" "on multi-rail support and the GASNET_IBV_PORTS environment variable.\n" "First detected mismatch: proc 0: %d vs. proc %d: %d\n", gasnetc_num_ports, (int)i, (int)(0xff & all_configs[i])); } } } gasneti_free(all_configs); } /* Determine gasnetc_max_msg_sz and dependent variables */ gasnetc_max_msg_sz = gasnetc_port_tbl[0].port.max_msg_sz; for (i = 1; i < gasnetc_num_ports; ++i) { gasnetc_max_msg_sz = MIN(gasnetc_max_msg_sz, gasnetc_port_tbl[i].port.max_msg_sz); } gasnetc_nonbulk_bounce_limit = MIN(gasnetc_max_msg_sz, gasnetc_nonbulk_bounce_limit); // Determine striping params used in gasnet_core_sndrcv.c:gasnetc_zerocp_common() if (1 == gasnetc_num_ports) { // single path: no striping gasnetc_put_stripe_sz = gasnetc_max_msg_sz; gasnetc_get_stripe_sz = gasnetc_max_msg_sz; GASNETI_TRACE_PRINTF(I, ("RMA striping: disabled for single-path network")); } else { if (! gasnetc_put_stripe_sz) { gasnetc_put_stripe_sz = gasnetc_max_msg_sz; } else if (gasnetc_put_stripe_sz > gasnetc_max_msg_sz) { GASNETI_TRACE_PRINTF(I, ("RMA striping: reduced GASNET_PUT_STRIPE_SZ to HCA max message size")); gasnetc_put_stripe_sz = gasnetc_max_msg_sz; } else if (gasnetc_put_stripe_sz < GASNETC_MINIMUM_PUT_STRIPE_SZ) { if (!gasneti_mynode) { gasneti_console_message("WARNING", "increased GASNET_PUT_STRIPE_SZ to minimum size %d", GASNETC_MINIMUM_PUT_STRIPE_SZ); } gasnetc_put_stripe_sz = GASNETC_MINIMUM_PUT_STRIPE_SZ; } GASNETI_TRACE_PRINTF(I, ("RMA striping: final GASNET_PUT_STRIPE_SZ = %"PRIuSZ, gasnetc_put_stripe_sz)); if (! gasnetc_get_stripe_sz) { gasnetc_get_stripe_sz = gasnetc_max_msg_sz; } else if (gasnetc_get_stripe_sz > gasnetc_max_msg_sz) { GASNETI_TRACE_PRINTF(I, ("RMA striping: reduced GASNET_GET_STRIPE_SZ to HCA max message size")); gasnetc_get_stripe_sz = gasnetc_max_msg_sz; } else if (gasnetc_get_stripe_sz < GASNETC_MINIMUM_GET_STRIPE_SZ) { if (!gasneti_mynode) { gasneti_console_message("WARNING", "increased GASNET_GET_STRIPE_SZ to minimum size %d", GASNETC_MINIMUM_GET_STRIPE_SZ); } gasnetc_get_stripe_sz = GASNETC_MINIMUM_GET_STRIPE_SZ; } GASNETI_TRACE_PRINTF(I, ("RMA striping: final GASNET_GET_STRIPE_SZ = %"PRIuSZ, gasnetc_get_stripe_sz)); } gasnetc_put_stripe_split = MIN(2*gasnetc_put_stripe_sz, gasnetc_max_msg_sz); gasnetc_get_stripe_split = MIN(2*gasnetc_get_stripe_sz, gasnetc_max_msg_sz); /* Exchange LIDs */ local_lid = gasneti_calloc(gasnetc_num_ports, sizeof(uint16_t)); remote_lid = gasneti_calloc(gasnetc_num_ports * gasneti_nodes, sizeof(uint16_t)); for (i = 0; i < gasnetc_num_ports; ++i) { local_lid[i] = gasnetc_port_tbl[i].port.lid; } gasneti_bootstrapExchange(local_lid, gasnetc_num_ports * sizeof(uint16_t), remote_lid); gasneti_free(local_lid); /* compute various snd/rcv resource limits (requires node map) */ i = gasnetc_sndrcv_limits(); if (i != GASNET_OK) { return i; } #if GASNETC_IBV_XRC if ((gasneti_nodemap_global_count == 1) || (gasneti_nodemap_global_count == gasneti_nodes)) { /* No warning. Eliminates case(s) that would SEGV otherwise */ gasnetc_use_xrc = 0; } #endif #if GASNETC_IBV_ODP gasnetc_use_odp = gasneti_getenv_int_withdefault("GASNET_USE_ODP", 1, 0); if (gasnetc_use_odp) { gasneti_odp_init(); } #elif !GASNETC_IBV_ODP_DISABLED if (gasneti_getenv_int_withdefault("GASNET_ODP_VERBOSE", 1, 0)) { uint8_t found_odp_hca = 0; GASNETC_FOR_ALL_HCA(hca) { // Assume hca_id starting with "mlx5" (or higher) has ODP support if (!strncmp(hca->hca_id, "mlx", 3) && (atoi(hca->hca_id+3) >= 5)) { found_odp_hca = 1; break; } } // TODO: Only one process reports, so gather to 0 would be sufficient and // a SUM reduction even would be even better. uint8_t *all = gasneti_malloc(gasneti_nodes); gasneti_bootstrapExchange(&found_odp_hca, 1, all); if (!gasneti_mynode) { gex_Rank_t count = 0; for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) { count += all[i]; } if (count) { gasneti_console0_message( "WARNING","%d of %d processes have HCAs believed to support ODP. However, the\n" " corresponding software support was not found at configure time.\n" " Please see the README for GASNet's ibv-conduit for more info on ODP.\n" " To suppress this message set environment variable\n" " GASNET_ODP_VERBOSE=0 or reconfigure with --disable-ibv-odp\n" " (see ibv-conduit's README for more information).\n", (int)count, (int)gasneti_nodes); } } gasneti_free(all); } #endif // GASNETC_IBV_ODP #if GASNET_PSHM { size_t shared_size = 0; /* global lid table: */ shared_size += gasneti_nodes * gasnetc_num_ports * sizeof(uint16_t); shared_size = GASNETI_ALIGNUP(shared_size, GASNETI_CACHE_LINE_BYTES); #if GASNETC_IBV_XRC /* shared qpn table: */ if (gasnetc_use_xrc) { shared_size += gasnetc_xrc_preinit(remote_lid); shared_size = GASNETI_ALIGNUP(shared_size, GASNETI_CACHE_LINE_BYTES); } #endif shared_mem = gasneti_pshm_init(&gasneti_bootstrapNbrhdBroadcast, shared_size); } #endif /* transpose remote lids into port_tbl */ #if GASNET_PSHM { uint16_t *tmp = (uint16_t *)shared_mem; for (i = 0; i < gasnetc_num_ports; ++i) { gasnetc_port_tbl[i].remote_lids = tmp; if (0 == gasneti_nodemap_local_rank) { for (node = 0; node < gasneti_nodes; ++node) { *(tmp++) = remote_lid[node * gasnetc_num_ports + i]; } } else { tmp += gasneti_nodes; } } shared_mem = (void *)GASNETI_ALIGNUP(tmp, GASNETI_CACHE_LINE_BYTES); } #else for (i = 0; i < gasnetc_num_ports; ++i) { gasnetc_port_tbl[i].remote_lids = gasneti_malloc(gasneti_nodes * sizeof(uint16_t)); gasneti_leak(gasnetc_port_tbl[i].remote_lids); for (node = 0; node < gasneti_nodes; ++node) { gasnetc_port_tbl[i].remote_lids[node] = remote_lid[node * gasnetc_num_ports + i]; } } #endif gasneti_free(remote_lid); // Create first Client, EP and TM *here*, for use in subsequent bootstrap communication { // allocate the client object gasneti_Client_t client = gasneti_alloc_client(clientName, flags); *client_p = gasneti_export_client(client); // create the initial endpoint with internal handlers if (gex_EP_Create(ep_p, *client_p, GEX_EP_CAPABILITY_ALL, flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error creating initial endpoint"); gasneti_EP_t ep = gasneti_import_ep(*ep_p); gasnetc_ep0 = (gasnetc_EP_t)ep; // TODO-EX: this global variable to be removed // create the tm gasneti_TM_t tm = gasneti_alloc_tm(ep, gasneti_mynode, gasneti_nodes, flags); *tm_p = gasneti_export_tm(tm); } #if GASNETC_IBV_XRC /* allocate/initialize XRC resources, if any */ if (gasnetc_use_xrc) { i = gasnetc_xrc_init(&shared_mem); if (i != GASNET_OK) { return i; } } #endif /* allocate/initialize transport resources */ i = gasnetc_sndrcv_init(gasnetc_ep0); if (i != GASNET_OK) { return i; } /* Establish static connections and prepare for dynamic ones */ i = gasnetc_connect_init(gasnetc_ep0); if (i != GASNET_OK) { return i; } if (gasneti_spawn_verbose) { gasneti_console_message("gasnetc_init","spawn successful - proc %i/%i starting...", gasneti_mynode, gasneti_nodes); } /* From this point forward gasneti_bootstrap*() can safely be implemented * via AMs or "raw" IB if desired for efficiency (but no segment for RDMA). * Currently only Exchange (aka GatherAll) and Barrier are used beyond this point. */ gasneti_attach_done = 1; // Ready to use AM Short and Medium for bootstrap comms // Determine largest allowable single memory registration supported by the HCA(s) gasnetc_pin_maxsz = ~(uint64_t)0; GASNETC_FOR_ALL_HCA(hca) { gasnetc_pin_maxsz = MIN(gasnetc_pin_maxsz, hca->hca_cap.max_mr_size); } /* Find max pinnable size before we start carving up memory w/ mmap()s. * * Take care that only one process per LID (node) performs the probe. * The result is then divided by the number of processes on the adapter, * which is easily determined from the connection information we exchanged above. */ { GASNETI_TRACE_PRINTF(C,("I am node %d of %d on-node peers", gasneti_myhost.node_rank, gasneti_myhost.node_count)); /* Query the pinning limits of the HCA */ gasnetc_init_pin_info(gasneti_myhost.nodes[0], gasneti_myhost.node_count); gasneti_assert(gasnetc_pin_info.memory != 0); gasneti_assert(gasnetc_pin_info.memory != (uintptr_t)(-1)); gasneti_assert(gasnetc_pin_info.regions != 0); } uintptr_t mmap_limit; { uintptr_t local_limit; #if GASNET_SEGMENT_FAST /* Reserved memory needed by firehose on each node */ /* NOTE: We reserve this memory even when firehose is disabled, since the disable * is only made available for debugging. */ size_t reserved_mem = GASNETC_MIN_FH_MEM; if_pf (gasnetc_pin_info.memory < reserved_mem) { gasneti_fatalerror("Pinnable memory (%"PRIuPTR") is less than reserved minimum %"PRIuPTR, (uintptr_t)gasnetc_pin_info.memory, (uintptr_t)reserved_mem); } local_limit = (gasnetc_pin_info.memory - reserved_mem); #else local_limit = (uintptr_t)-1; #endif #ifdef GASNETI_MMAP_OR_PSHM // Bound per-host (sharedLimit) argument to gasneti_segmentLimit() // while properly reserving space for aux segments. uint64_t sharedLimit = gasneti_sharedLimit(); uint64_t hostAuxSegs = gasneti_myhost.node_count * gasneti_auxseg_preinit(); if (sharedLimit <= hostAuxSegs) { gasneti_fatalerror("per-host segment limit %"PRIu64" is too small to accommodate %i aux segments, " "total size %"PRIu64". You may need to adjust OS shared memory limits.", sharedLimit, gasneti_myhost.node_count, hostAuxSegs); } sharedLimit -= hostAuxSegs; mmap_limit = gasneti_segmentLimit(local_limit, sharedLimit, NULL, NULL); #else mmap_limit = local_limit; // No better info available #endif } /* allocate and attach an aux segment */ gasnet_seginfo_t auxseg = gasneti_auxsegAttach(gasnetc_pin_maxsz, &gasneti_bootstrapExchange_am); void *auxbase = auxseg.addr; uintptr_t auxsize = auxseg.size; /* The auxseg will be statically pinned even if the segment is not */ GASNETC_FOR_ALL_HCA(hca) { if (0 != gasnetc_pin(hca, auxbase, auxsize, gasneti_seg_access_flags, &hca->aux_reg)) { const char *msg = gasnetc_segreg_failed(auxsize, gasnetc_segreg_aux, errno, GEX_MK_CLASS_HOST); gasneti_fatalerror("%s", msg); } // TODO_EX: need scalable and/or lazy storage of aux segments and their rkeys hca->aux_rkeys = gasneti_malloc(gasneti_nodes*sizeof(uint32_t)); gasneti_bootstrapExchange_am(&hca->aux_reg.handle->rkey, sizeof(uint32_t), hca->aux_rkeys); } gasneti_assert(gasnetc_pin_info.memory > auxsize); gasneti_assert(gasnetc_pin_info.regions > 1); gasnetc_pin_info.memory -= auxsize; gasnetc_pin_info.regions -= 1; /* determine Max{Local,GLobal}SegmentSize */ gasneti_segmentInit(mmap_limit, &gasneti_bootstrapExchange_am, flags); gasnetc_exit_init(); #if 0 /* Done earlier to allow tracing */ gasneti_init_done = 1; #endif gasneti_bootstrapBarrier_am(); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ /* Helper for firehose init * Returns address (in static storage) of an array of preregistered regions */ static firehose_region_t * gasnetc_prereg_list(int *count_p) { static firehose_region_t prereg[2]; int c = 0; int h; /* Currently "snd_reg" and "aux_reg" are added to the firehose tables */ prereg[c].addr = gasnetc_hca[0].snd_reg.addr; prereg[c].len = gasnetc_hca[0].snd_reg.len; GASNETC_FOR_ALL_HCA_INDEX(h) { prereg[c].client.handle[h] = NULL; /* unreg must fail */ prereg[c].client.lkey[h] = gasnetc_hca[h].snd_reg.handle->lkey; prereg[c].client.rkey[h] = gasnetc_hca[h].snd_reg.handle->rkey; } ++c; prereg[c].addr = gasnetc_hca[0].aux_reg.addr; prereg[c].len = gasnetc_hca[0].aux_reg.len; GASNETC_FOR_ALL_HCA_INDEX(h) { prereg[c].client.handle[h] = NULL; /* unreg must fail */ prereg[c].client.lkey[h] = gasnetc_hca[h].aux_reg.handle->lkey; prereg[c].client.rkey[h] = gasnetc_hca[h].aux_reg.handle->rkey; } ++c; *count_p = c; return prereg; } /* ------------------------------------------------------------------------------------ */ extern int gasnetc_attach_primary(gex_Flags_t flags) { /* ------------------------------------------------------------------------------------ */ /* register fatal signal handlers */ /* catch fatal signals and convert to SIGQUIT */ gasneti_registerSignalHandlers(gasneti_defaultSignalHandler); /* (###) register any custom signal handlers required by your conduit * (e.g. to support interrupt-based messaging) */ /* ------------------------------------------------------------------------------------ */ /* Initialize firehose */ int using_firehose = GASNETC_USE_FIREHOSE && (gasneti_nodes > 1); #if GASNETC_IBV_ODP && GASNETC_PIN_SEGMENT // If using Impicit ODP for local addrs, then local firehose is unused using_firehose &= ! gasnetc_use_odp; #endif if (using_firehose) { int reg_count; firehose_region_t *prereg = gasnetc_prereg_list(®_count); size_t maxsz; uint64_t temp_fh_mem = gasnetc_pin_info.memory; // Math can exceed 4G and later fall below gasnetc_firehose_reg = gasnetc_pin_info.regions; /* Adjust for prepinned regions (they were pinned before init_pin_info probe) */ for (int i = 0; i < reg_count; ++i) { temp_fh_mem += prereg[i].len; } /* Now initialize firehose */ { gasnetc_firehose_flags = 0; #if GASNETC_PIN_SEGMENT /* Adjust for the pinned segment (which is not advertised to firehose as prepinned) */ // TODO-EX: Need a replacement for use of gasneti_MaxLocalSegmentSize // which is grossly inaccurate until the client segment has been registered. // TODO: shouldn't we use *local* values rather than max ones? gasneti_assert_always(temp_fh_mem > gasneti_MaxLocalSegmentSize); temp_fh_mem -= gasneti_MaxLocalSegmentSize; gasnetc_firehose_reg -= 1; gasnetc_firehose_flags |= FIREHOSE_INIT_FLAG_LOCAL_ONLY; #endif #if PLATFORM_OS_DARWIN gasnetc_firehose_flags |= FIREHOSE_INIT_FLAG_UNPIN_ON_FINI; #endif #if GASNETC_IBV_SHUTDOWN gasnetc_firehose_flags |= FIREHOSE_INIT_FLAG_UNPIN_ON_FINI | FIREHOSE_INIT_FLAG_MAY_REINIT; #endif #if PLATFORM_ARCH_32 gasnetc_firehose_mem = GASNETI_PAGE_ALIGNDOWN(MIN(temp_fh_mem, 0xFFFFFFFF)); #else gasnetc_firehose_mem = temp_fh_mem; #endif firehose_init(gasnetc_firehose_mem, gasnetc_firehose_reg, gasnetc_fh_maxsize, prereg, reg_count, gasnetc_firehose_flags, &gasnetc_firehose_info); gasnetc_did_firehose_init = 1; } /* Determine alignment (and max size) for fh requests - a power-of-two <= max_region/2 */ maxsz = MIN(gasnetc_max_msg_sz, gasnetc_firehose_info.max_LocalPinSize); #if !GASNETC_PIN_SEGMENT maxsz = MIN(maxsz, gasnetc_firehose_info.max_RemotePinSize); #endif gasneti_assert_always(maxsz >= (GASNET_PAGESIZE + gasnetc_inline_limit)); gasnetc_fh_align = GASNET_PAGESIZE; while ((gasnetc_fh_align * 2) <= (maxsz / 2)) { gasnetc_fh_align *= 2; } gasnetc_fh_align_mask = gasnetc_fh_align - 1; } /* ------------------------------------------------------------------------------------ */ /* primary attach complete */ gasneti_attach_done = 1; gasneti_bootstrapBarrier_am(); GASNETI_TRACE_PRINTF(C,("gasnetc_attach_primary(): primary attach complete")); gasnete_init(); /* init the extended API */ /* ensure extended API is initialized across nodes */ gasneti_bootstrapBarrier_am(); #if GASNETC_BUILD_IBVRATOMIC // Setup for offloaded remote atomics int i = gasnetc_ratomic_init(gasnetc_ep0); if (i != GASNET_OK) { return i; } #endif gasneti_nodemapFini(); #if GASNETC_USE_RCV_THREAD || GASNETC_USE_SND_THREAD /* Start progress thread(s), if applicable */ gasnetc_sndrcv_start_thread(flags); #endif return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ // Purely local memory registration and conduit-specific segment tracking // Applicable to both primordial and non-primordial segments static int gasnetc_segment_register(gasnetc_Segment_t segment, int is_attach) { #if GASNETC_PIN_SEGMENT GASNETI_TRACE_PRINTF(C,("Registering segment [%p, %p)", segment->_addr, segment->_ub)); gasnetc_hca_t *hca; GASNETC_FOR_ALL_HCA(hca) { // Register page-aligned bounding-box (since client-provided need not be aligned). gasnetc_memreg_t memreg; uintptr_t lb = GASNETI_PAGE_ALIGNDOWN(segment->_addr); uintptr_t ub = GASNETI_PAGE_ALIGNUP(segment->_ub); uintptr_t bb_size = ub - lb; int rc = gasnetc_pin(hca, (void*)lb, bb_size, gasneti_seg_access_flags, &memreg); if (rc) { if (gasneti_VerboseErrors) { gex_MK_Class_t mk_class = (segment->_kind == GEX_MK_HOST) ? GEX_MK_CLASS_HOST : gex_MK_QueryClass(segment->_kind); enum gasnetc_segreg which = is_attach ? gasnetc_segreg_attach : gasnetc_segreg_create; gasneti_console_message("WARNING", "%s", gasnetc_segreg_failed(segment->_size, which, errno, mk_class)); } #if (GASNETC_IB_MAX_HCAS > 1) for (int i = 0; i < hca->hca_index; ++i) { gasnetc_unpin(gasnetc_hca+i, segment->seg_reg+i); } #endif // TODO: can we do better sorting out failure modes? return GASNET_ERR_RESOURCE; } GASNETI_TRACE_PRINTF(I, ("Registered %"PRIuPTR" byte segment on HCA %d", segment->_size, hca->hca_index)); segment->seg_lkey[hca->hca_index] = memreg.handle->lkey; segment->seg_reg[hca->hca_index] = memreg; } #endif return GASNET_OK; } static int gasnetc_segment_deregister(gasnetc_Segment_t segment) { #if GASNETC_PIN_SEGMENT GASNETI_TRACE_PRINTF(C,("Deregistering segment [%p, %p)", segment->_addr, segment->_ub)); int h; GASNETC_FOR_ALL_HCA_INDEX(h) { gasnetc_unpin(gasnetc_hca+h, segment->seg_reg+h); } #endif return GASNET_OK; } #if GASNETC_PIN_SEGMENT static void gasnetc_install_np_rkeys( gex_Rank_t jobrank, gex_EP_Index_t idx, const uint32_t *new_rkeys) { gasneti_assume(idx < GASNET_MAXEPS); uint32_t *rkey_array = gasnetc_np_rkeys[idx]; if_pf (!rkey_array) { static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); rkey_array = gasnetc_np_rkeys[idx]; if (!rkey_array) { rkey_array = gasneti_calloc(gasneti_nodes * gasnetc_num_hcas, sizeof(uint32_t)); gasnetc_np_rkeys[idx] = rkey_array; } gasneti_mutex_unlock(&lock); } GASNETI_MEMCPY_SAFE(rkey_array + jobrank * gasnetc_num_hcas, new_rkeys, gasnetc_num_hcas * sizeof(uint32_t)); } #endif static int gasnetc_segment_exchange(gex_TM_t tm, gex_EP_t *eps, size_t num_eps) { #if GASNETC_PIN_SEGMENT // Exchange one 32-bit rkey per HCA struct exchg_data { gex_EP_Location_t loc; uint32_t rkey[1]; // Flexible array member } *local, *global, *p; size_t elem_sz = offsetof(struct exchg_data, rkey) + gasnetc_num_hcas * sizeof(uint32_t); local = gasneti_malloc(num_eps * elem_sz); // Pack p = local; for (gex_Rank_t i = 0; i < num_eps; ++i) { gex_EP_t ep = eps[i]; gasnetc_Segment_t segment = (gasnetc_Segment_t) gasneti_import_ep_valid(ep)->_segment; if (! segment) continue; p->loc.gex_rank = gasneti_mynode; p->loc.gex_ep_index = gex_EP_QueryIndex(ep); for (int j = 0; j < gasnetc_num_hcas; ++j) { p->rkey[j] = segment->seg_reg[j].handle->rkey; } p = (struct exchg_data *)(elem_sz + (uintptr_t)p); } size_t local_bytes = (uintptr_t)p - (uintptr_t)local; size_t total_bytes = gasneti_blockingRotatedExchangeV(tm, local, local_bytes, (void**)&global, NULL); gasneti_assert(total_bytes % elem_sz == 0); size_t total_eps = total_bytes / elem_sz; gasneti_free(local); // Unpack p = global; for (size_t i = 0; i < total_eps; ++i) { gex_Rank_t jobrank = p->loc.gex_rank; gex_EP_Index_t idx = p->loc.gex_ep_index; #if !GASNETC_BUILD_IBVRATOMIC if (jobrank == gasneti_mynode) { // Loopback for RMA is only used for remote atomics // So when they are not enabled, just fall through to advance p } else #endif if (! idx) { // Primordial: uint32_t *rkey = p->rkey; for (int j = 0; j < gasnetc_num_hcas; ++j) { gasnetc_hca_t *hca = gasnetc_hca + j; gasneti_assert(hca->rkeys); gasneti_assert(!hca->rkeys[jobrank] || hca->rkeys[jobrank] == rkey[hca->hca_index]); hca->rkeys[jobrank] = rkey[hca->hca_index]; } gasnetc_cep_t *cep = GASNETC_NODE2CEP(gasnetc_ep0, jobrank); if (cep) gasnetc_sndrcv_attach_peer(jobrank, cep); } else if (jobrank != gasneti_mynode) { // Remote + non-primordial: gasnetc_install_np_rkeys(jobrank, idx, p->rkey); } p = (struct exchg_data *)(elem_sz + (uintptr_t)p); } gasneti_free(global); #else // PIN_SEGMENT // Per-endpoint work: // TODO: multi-ep may require more work gex_Rank_t team_size = gex_TM_QuerySize(tm); for (size_t i = 0; i < team_size; ++i) { gex_EP_Location_t loc = gasneti_i_tm_rank_to_location(gasneti_import_tm_nonpair(tm), i, 0); gex_Rank_t jobrank = loc.gex_rank; if (jobrank == gasneti_mynode) { continue; } else if (! loc.gex_ep_index) { // TODO: this might be redundant? gasnetc_cep_t *cep = GASNETC_NODE2CEP(gasnetc_ep0, jobrank); if (cep) gasnetc_sndrcv_attach_peer(jobrank, cep); } } #endif // PIN_SEGMENT return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ int gasnetc_segment_create_hook(gex_Segment_t e_segment) { #if GASNETC_PIN_SEGMENT // Register the segment gasnetc_Segment_t segment = (gasnetc_Segment_t) gasneti_import_segment(e_segment); // Note: when gasnetc_segment_register() returns an error it has already // cleaned-up the conduit-specific state, satisfying the contract that this // hook (not a destroy hook) is responsible for cleanup when we return // anything other than GASNET_OK. return gasnetc_segment_register(segment, 0); #else return GASNET_OK; #endif } void gasnetc_segment_destroy_hook(gasneti_Segment_t i_segment) { #if GASNETC_PIN_SEGMENT gasneti_assert_zeroret( gasnetc_segment_deregister((gasnetc_Segment_t) i_segment) ); #endif } int gasnetc_segment_attach_hook(gex_Segment_t e_segment, gex_TM_t e_tm) { #if GASNETC_PIN_SEGMENT // Register the segment gasnetc_Segment_t segment = (gasnetc_Segment_t) gasneti_import_segment(e_segment); int rc = gasnetc_segment_register(segment, 1); if (rc) return rc; #endif // Exchange registration info gex_EP_t e_ep = gex_TM_QueryEP(e_tm); gasnetc_segment_exchange(e_tm, &e_ep, 1); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ // TODO-EX: this is a candidate for factorization (once we understand the per-conduit variations) extern int gasnetc_Client_Init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { gasneti_assert(client_p); gasneti_assert(ep_p); gasneti_assert(tm_p); gasneti_assert(clientName); #if !GASNET_NULL_ARGV_OK gasneti_assert(argc); gasneti_assert(argv); #endif // main init // TODO-EX: must split off per-client and per-endpoint portions if (!gasneti_init_done) { // First client // NOTE: gasnetc_init() creates the first Client, EP and TM for use in bootstrap comms int retval = gasnetc_init(client_p, ep_p, tm_p, clientName, argc, argv, flags); if (retval != GASNET_OK) GASNETI_RETURN(retval); #if 0 /* called within gasnetc_init to allow init tracing */ gasneti_trace_init(argc, argv); #endif } else { gasneti_fatalerror("No multi-client support"); } // Do NOT move this prior to the gasneti_trace_init() call GASNETI_TRACE_PRINTF(O,("gex_Client_Init: name='%s' argc_p=%p argv_p=%p flags=%d", clientName, (void *)argc, (void *)argv, flags)); if (0 == (flags & GASNETI_FLAG_INIT_LEGACY)) { /* primary attach */ if (GASNET_OK != gasnetc_attach_primary(flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error in primary attach"); /* ensure everything is initialized across all nodes */ gasnet_barrier(0, GASNET_BARRIERFLAG_UNNAMED); } else { gasneti_attach_done = 0; // Pending client call to gasnet_attach() } return GASNET_OK; } extern int gasnetc_ep_publishboundsegment_hook( gex_TM_t tm, gex_EP_t *eps, size_t num_eps, gex_Flags_t flags) { // Conduit-dependent parts // TODO: merge comms into gasneti_EP_PublishBoundSegment(). gasnetc_segment_exchange(tm, eps, num_eps); // Avoid race in which AMRequestLong triggers AMRepyLong before exchange completes remotely // TODO: barrier for multi-tm per-process gex_Event_Wait(gex_Coll_BarrierNB(tm, 0)); return GASNET_OK; } // Conduit-specififc hook to run at end of gex_EP_Create() int gasnetc_ep_init_hook(gasneti_EP_t i_ep) { gasnetc_EP_t c_ep = (gasnetc_EP_t) i_ep; // Conduit-specific validation #if GASNETC_PIN_SEGMENT if (i_ep->_index) { // Current non-primordial EP support is RMA-only if (i_ep->_caps & ~GEX_EP_CAPABILITY_RMA) { // Unsupported capability/ies requested GASNETI_RETURN_ERRR(BAD_ARG, "ibv-conduit supports only GEX_EP_CAPABILITY_RMA for non-primordial endpoints"); } } #else gasneti_static_assert(GASNET_MAXEPS == 1); #endif // Conduit-specific EP struct member(s): if (! i_ep->_index) { c_ep->cep_table = NULL; } else { // Simply share the QPs of EP0, which are sufficient for RMA // TODO: AM will require isolation that this sharing cannot provide gasneti_assert(gasnetc_ep0->cep_table); c_ep->cep_table = gasnetc_ep0->cep_table; } #if !GASNETC_PIN_SEGMENT { /* firehose handlers */ gex_AM_Entry_t *ftable = firehose_get_handlertable(); int len = 0; int numreg = 0; int dontcare = ! i_ep->_index; // Allocate indices on first call gasneti_assert(ftable); while (ftable[len].gex_fnptr) len++; /* calc len */ if (gasneti_amregister(i_ep, ftable, len, GASNETC_HANDLER_BASE, GASNETE_HANDLER_BASE, dontcare, &numreg) != GASNET_OK) GASNETI_RETURN_ERRR(RESOURCE, "Error registering firehose handlers"); gasneti_assert_int(numreg ,==, len); } #endif return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ /* Shutdown code - not always used */ #if GASNETC_IBV_SHUTDOWN void gasnetc_shutdown(void) { gasnetc_hca_t *hca; int rc; gasnetc_connect_shutdown(gasnetc_ep0); rc = gasnetc_sndrcv_shutdown(); if (rc != GASNET_OK) { gasneti_fatalerror("gasnetc_sndrcv_shutdown() failed"); } #if GASNETC_PIN_SEGMENT GASNETI_SEGTBL_LOCK(); gasneti_Segment_t seg; GASNETI_SEGTBL_FOR_EACH(seg) { gasnetc_segment_deregister((gasnetc_Segment_t)seg); } GASNETI_SEGTBL_UNLOCK(); #endif GASNETC_FOR_ALL_HCA(hca) { #if GASNETC_IBV_ODP if (gasnetc_use_odp) { gasnetc_odp_dereg(hca); } #endif if (hca->aux_reg.len) { gasnetc_unpin(hca, &hca->aux_reg); } rc = ibv_dealloc_pd(hca->pd); GASNETC_IBV_CHECK(rc, "from ibv_dealloc_pd()"); rc = ibv_close_device(hca->handle); GASNETC_IBV_CHECK(rc, "from ibv_close_device()"); } } #endif /* ------------------------------------------------------------------------------------ */ /* Exit handling code */ #ifndef GASNETI_HAVE_ATOMIC_CAS #error "required atomic compare-and-swap is not yet implemented for your CPU/OS/compiler" #endif gasneti_atomic_t gasnetc_exit_running = gasneti_atomic_init(0); /* boolean used by GASNETC_IS_EXITING */ /* gasneti_exit_code holds value to _exit() with */ static gasneti_atomic_t gasnetc_exit_reds = gasneti_atomic_init(0); /* count of reduce requests */ static gasneti_atomic_t gasnetc_exit_dist = gasneti_atomic_init(0); /* OR of reduce distances */ static gasneti_atomic_t gasnetc_exit_reqs = gasneti_atomic_init(0); /* count of remote exit requests */ static gasneti_atomic_t gasnetc_exit_reps = gasneti_atomic_init(0); /* count of remote exit replies */ static gasneti_atomic_t gasnetc_exit_done = gasneti_atomic_init(0); /* flag to show exit coordination done */ static gasnetc_counter_t gasnetc_exit_repl_oust = GASNETC_COUNTER_INITIALIZER; /* track send of our AM reply */ extern void gasnetc_fatalsignal_callback(int sig) { gasnetc_exit_in_signal = 1; } #define GASNETC_ROOT_NODE 0 enum { GASNETC_EXIT_ROLE_UNKNOWN, GASNETC_EXIT_ROLE_LEADER, GASNETC_EXIT_ROLE_MEMBER }; static gasneti_atomic_t gasnetc_exit_role = gasneti_atomic_init(GASNETC_EXIT_ROLE_UNKNOWN); static const char * volatile gasnetc_exit_state = "UNKNOWN STATE"; static gex_Rank_t gasnetc_exit_peers = 0; static const gex_Rank_t *gasnetc_exit_peer = NULL; // NOTE: Please keep GASNETC_EXIT_STATE_MAXLEN fairly "tight" to bound the // volume of garbage that might get printed in the event of memory corruption. #define GASNETC_EXIT_STATE_MAXLEN 50 #define GASNETC_EXIT_STATE(st) do { \ gasneti_static_assert(sizeof(st) <= GASNETC_EXIT_STATE_MAXLEN+1);\ gasnetc_exit_state = st; \ if (gasneti_spawn_verbose) /* %s to silence -Wformat-security */ \ gasneti_console_message("EXIT STATE", "%s", gasnetc_exit_state); \ } while (0) /* * Code to disable user's AM handlers when exiting. We need this because we must call * AMPoll to run core handlers, including ACKs for flow control. * * We do it this way because it adds absolutely nothing the normal execution path. * Thanks to Dan for the suggestion. */ static void gasnetc_noop(void) { return; } static void gasnetc_disable_AMs(void) { int i; for (i = GASNETE_HANDLER_BASE; i < GASNETC_MAX_NUMHANDLERS; ++i) { gasnetc_ep0->_amtbl[i].gex_fnptr = (gex_AM_Fn_t)&gasnetc_noop; } } #if GASNET_PSHM static gex_Rank_t *gasnetc_exit_child = NULL; static gex_Rank_t gasnetc_exit_children = 0; static gex_Rank_t gasnetc_exit_parent = 0; #endif static int gasnetc_exit_reduce(int exitcode, int64_t timeout_us) { gasneti_tick_t start_time = gasneti_ticks_now(); int rc, i; GASNETC_EXIT_STATE("exitcode reduction"); gasneti_assert(timeout_us > 0); /* If the remote request has arrived then we've already failed */ if (gasneti_atomic_read(&gasnetc_exit_reqs, 0)) return -1; #if GASNET_PSHM if (gasnetc_exit_children == gasneti_nodes) { /* Non-lead node */ GASNETC_EXIT_STATE("exitcode reduction: send to parent"); rc = gasnetc_RequestSysShort(gasnetc_exit_parent, NULL, gasneti_handleridx(gasnetc_exit_reduce_reqh), 2, exitcode, 0); if (rc != GASNET_OK) return -1; if (gasneti_atomic_read(&gasnetc_exit_reqs, 0)) return -1; GASNETC_EXIT_STATE("exitcode reduction: wait for parent"); do { if (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 > timeout_us) return -1; gasnetc_sndrcv_poll(0); if (gasneti_atomic_read(&gasnetc_exit_reqs, 0)) return -1; } while (gasneti_atomic_read(&gasnetc_exit_reds, 0) == 0); return 0; } else { /* Lead node */ GASNETC_EXIT_STATE("exitcode reduction: wait for children"); while (gasneti_atomic_read(&gasnetc_exit_reds, 0) < gasnetc_exit_children) { if (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 > timeout_us) return -1; gasnetc_sndrcv_poll(0); if (gasneti_atomic_read(&gasnetc_exit_reqs, 0)) return -1; } exitcode = gasneti_atomic_read(&gasneti_exit_code, GASNETI_ATOMIC_RMB_PRE); } #endif GASNETC_EXIT_STATE("exitcode reduction: dissemination"); for (i = 0; i < gasnetc_exit_peers; ++i) { const uint32_t distance = 1 << i; rc = gasnetc_RequestSysShort(gasnetc_exit_peer[i], NULL, gasneti_handleridx(gasnetc_exit_reduce_reqh), 2, exitcode, distance); if (rc != GASNET_OK) return -1; do { /* wait for completion of the proper receive, which might arrive out of order */ if (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 > timeout_us) return -1; gasnetc_sndrcv_poll(0); if (gasneti_atomic_read(&gasnetc_exit_reqs, 0)) return -1; } while (!(distance & gasneti_atomic_read(&gasnetc_exit_dist, 0))); exitcode = gasneti_atomic_read(&gasneti_exit_code, GASNETI_ATOMIC_RMB_PRE); } #if GASNET_PSHM GASNETC_EXIT_STATE("exitcode reduction: send to children"); for (i = 0; i < gasnetc_exit_children; ++i) { rc = gasnetc_RequestSysShort(gasnetc_exit_child[i], NULL, gasneti_handleridx(gasnetc_exit_reduce_reqh), 2, exitcode, 0); if (rc != GASNET_OK) return -1; gasnetc_sndrcv_poll(0); if (gasneti_atomic_read(&gasnetc_exit_reqs, 0)) return -1; if (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 > timeout_us) return -1; } #endif return 0; } /* gasnetc_exit_reduce_reqh: reduction on exitcode */ static void gasnetc_exit_reduce_reqh(gex_Token_t token, gex_AM_Arg_t arg0, gex_AM_Arg_t arg1) { gasneti_atomic_val_t exitcode = arg0; gasneti_atomic_val_t distance = arg1; gasneti_atomic_val_t prevcode; do { prevcode = gasneti_atomic_read(&gasneti_exit_code, 0); } while ((exitcode > prevcode) && !gasneti_atomic_compare_and_swap(&gasneti_exit_code, prevcode, exitcode, 0)); if (distance) { #if defined(GASNETI_HAVE_ATOMIC_ADD_SUB) /* atomic OR via ADD since no bit will be set more than once */ gasneti_assert(GASNETI_POWEROFTWO(distance)); gasneti_atomic_add(&gasnetc_exit_dist, distance, GASNETI_ATOMIC_REL); #elif defined(GASNETI_HAVE_ATOMIC_CAS) /* atomic OR via C-A-S */ uint32_t old_val; do { old_val = gasneti_atomic_read(&gasnetc_exit_dist, 0); } while (!gasneti_atomic_compare_and_swap(&gasnetc_exit_dist, old_val, old_val|distance, GASNETI_ATOMIC_REL)); #else #error "required atomic compare-and-swap is not yet implemented for your CPU/OS/compiler" #endif } else { gasneti_atomic_increment(&gasnetc_exit_reds, GASNETI_ATOMIC_REL); } } /* * gasnetc_exit_role_reqh() * * This request handler (invoked only on the "root" node) handles the election * of a single exit "leader", who will coordinate an orderly shutdown. */ static void gasnetc_exit_role_reqh(gex_Token_t token) { gex_Rank_t src = gasnetc_msgsource(token); int local_role, result; gasneti_assert(gasneti_mynode == GASNETC_ROOT_NODE); /* May only send this request to the root node */ /* What role would the local node get if the requester is made the leader? */ local_role = (src == GASNETC_ROOT_NODE) ? GASNETC_EXIT_ROLE_LEADER : GASNETC_EXIT_ROLE_MEMBER; /* Try atomically to assume the proper role. Result determines role of requester */ result = gasneti_atomic_compare_and_swap(&gasnetc_exit_role, GASNETC_EXIT_ROLE_UNKNOWN, local_role, 0) ? GASNETC_EXIT_ROLE_LEADER : GASNETC_EXIT_ROLE_MEMBER; /* Inform the requester of the outcome. */ GASNETI_SAFE(gasnetc_ReplySysShort(token, NULL, gasneti_handleridx(gasnetc_exit_role_reph), 1, (gex_AM_Arg_t)result)); } /* * gasnetc_exit_role_reph() * * This reply handler receives the result of the election of an exit "leader". * The reply contains the exit "role" this node should assume. */ static void gasnetc_exit_role_reph(gex_Token_t token, gex_AM_Arg_t arg0) { int role; /* May only receive this reply from the root node */ gasneti_assert(gasnetc_msgsource(token) == GASNETC_ROOT_NODE); /* What role has this node been assigned? */ role = (int)arg0; gasneti_assert((role == GASNETC_EXIT_ROLE_LEADER) || (role == GASNETC_EXIT_ROLE_MEMBER)); /* Set the role if not yet set. Then assert that the assigned role has been assumed. * This way the assertion is checking that if the role was obtained by other means * (namely by receiving an exit request) it must match the election result. */ gasneti_atomic_compare_and_swap(&gasnetc_exit_role, GASNETC_EXIT_ROLE_UNKNOWN, role, 0); gasneti_assert(gasneti_atomic_read(&gasnetc_exit_role, 0) == role); } /* * gasnetc_get_exit_role() * * This function returns the exit role immediately if known. Otherwise it sends an AMRequest * to determine its role and then polls the network until the exit role is determined, either * by the reply to that request, or by a remote exit request. * * Includes a timeout to bound how long to poll for a reply, and the return value will * be GASNETC_EXIT_ROLE_UNKNOWN if it expires. * However, should still be called with an alarm timer in-force in case we get hung sending. * * Note that if we get here as a result of a remote exit request then our role has already been * set to "member" and we won't touch the network from inside the request handler. */ static int gasnetc_get_exit_role(int64_t timeout_us) { int role = gasneti_atomic_read(&gasnetc_exit_role, 0); gasneti_assert(timeout_us > 0); if (role == GASNETC_EXIT_ROLE_UNKNOWN) { gasneti_tick_t start_time = gasneti_ticks_now(); /* Don't know our role yet. So, send an AM Request to determine our role */ GASNETI_SAFE(gasnetc_RequestSysShort(GASNETC_ROOT_NODE, NULL, gasneti_handleridx(gasnetc_exit_role_reqh), 0)); /* Now spin until somebody tells us what our role is */ do { gasnetc_sndrcv_poll(0); /* works even before _attach */ role = gasneti_atomic_read(&gasnetc_exit_role, 0); } while ((role == GASNETC_EXIT_ROLE_UNKNOWN) && (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 < timeout_us)); } return role; } /* gasnetc_exit_head * * All exit paths pass through here as the first step. * This function ensures that gasneti_exit_code is written only once * by the first call. * It also lets the handler for remote exit requests know if a local * request has already begun. * * returns non-zero on the first call only * returns zero on all subsequent calls */ static int gasnetc_exit_head(int exitcode) { static gasneti_atomic_t once = gasneti_atomic_init(1); int retval; gasneti_atomic_set(&gasnetc_exit_running, 1, GASNETI_ATOMIC_WMB_POST); retval = gasneti_atomic_decrement_and_test(&once, 0); if (retval) { /* Store the exit code for later use */ gasneti_atomic_set(&gasneti_exit_code, exitcode, GASNETI_ATOMIC_WMB_POST); } return retval; } /* gasnetc_exit_now * * First we set the atomic variable gasnetc_exit_done to allow the exit * of any threads which are spinning on it in gasnetc_exit(). * Then this function tries hard to actually terminate the calling thread. * If for some unlikely reason gasneti_killmyprocess() returns, we abort(). * * DOES NOT RETURN */ GASNETI_NORETURN static void gasnetc_exit_now(int exitcode) { /* If anybody is still waiting, let them go */ gasneti_atomic_set(&gasnetc_exit_done, 1, GASNETI_ATOMIC_WMB_POST); GASNETC_EXIT_STATE("calling gasneti_killmyprocess()"); gasneti_killmyprocess(exitcode); /* NOT REACHED */ gasneti_reghandler(SIGABRT, SIG_DFL); gasneti_fatalerror("gasnetc_exit_now aborting..."); /* NOT REACHED */ } /* gasnetc_exit_tail * * This the final exit code for the cases of local or remote requested exits. * It is not used for the return-from-main case. Nor is this code used if a fatal * signal (including SIGALRM on timeout) is encountered while trying to shutdown. * * Just a wrapper around gasnetc_exit_now() to actually terminate. * * DOES NOT RETURN */ static void gasnetc_exit_tail(void) GASNETI_NORETURN; static void gasnetc_exit_tail(void) { gasnetc_exit_now((int)gasneti_atomic_read(&gasneti_exit_code, GASNETI_ATOMIC_RMB_PRE)); /* NOT REACHED */ } /* gasnetc_exit_sighandler * * This signal handler is for a last-ditch exit when a signal arrives while * attempting the graceful exit. That includes SIGALRM if we get wedged. * * Just a (verbose) signal-handler wrapper for gasnetc_exit_now(). * * DOES NOT RETURN */ static void gasnetc_exit_sighandler(int sig) { int exitcode = (int)gasneti_atomic_read(&gasneti_exit_code, GASNETI_ATOMIC_RMB_PRE); static gasneti_atomic_t once = gasneti_atomic_init(1); gasnetc_exit_in_signal = 1; #if GASNET_DEBUG || GASNETC_IBV_ODP // protect until we reach reentrance check gasneti_reghandler(SIGALRM, gasnetc_exit_now); gasneti_unblocksig(SIGALRM); alarm(30); #endif #if GASNETC_IBV_ODP gasnetc_odp_shutdown(); // Avoid possible system memory leak #endif const char * state = gasnetc_exit_state; size_t state_len = gasneti_strnlen(state, GASNETC_EXIT_STATE_MAXLEN); /* note - can't call trace macros here, or even sprintf */ if (sig == SIGALRM) { static const char msg[] = "gasnet_exit(): WARNING: timeout during exit... goodbye. ["; gasneti_unused_result( write(STDERR_FILENO, msg, sizeof(msg) - 1) ); gasneti_unused_result( write(STDERR_FILENO, state, state_len) ); gasneti_unused_result( write(STDERR_FILENO, "]\n", 2) ); } else { static const char msg1[] = "gasnet_exit(): ERROR: signal "; static const char msg2[] = " received during exit... goodbye. ["; char digit; gasneti_unused_result( write(STDERR_FILENO, msg1, sizeof(msg1) - 1) ); char sigstr[4]; size_t n = gasneti_utoa(sig, sigstr, sizeof(sigstr), 10); gasneti_unused_result( write(STDERR_FILENO, sigstr, n) ); gasneti_unused_result( write(STDERR_FILENO, msg2, sizeof(msg2) - 1) ); gasneti_unused_result( write(STDERR_FILENO, state, state_len) ); gasneti_unused_result( write(STDERR_FILENO, "]\n", 2) ); } (void) fsync(STDERR_FILENO); if (gasneti_atomic_decrement_and_test(&once, 0)) { /* We ask the bootstrap support to kill us, but only once */ GASNETC_EXIT_STATE("in suicide timer"); gasneti_reghandler(SIGALRM, gasnetc_exit_sighandler); gasneti_unblocksig(SIGALRM); alarm(MAX(5,gasnetc_exittimeout)); gasneti_bootstrapAbort(exitcode); } else { gasnetc_exit_now(exitcode); } /* NOT REACHED */ } /* gasnetc_exit_leader * * We say a polite goodbye to our peers and then listen for their replies. * This forms the root node's portion of a barrier for graceful shutdown. * * The "goodbyes" are just an AM containing the desired exit code. * The AM helps ensure that on non-collective exits the "other" nodes know to exit. * If we see a "goodbye" from all of our peers we know we've managed to coordinate * an orderly shutdown. If not, then in gasnetc_exit_body() we can ask the bootstrap * support to kill the job in a less graceful way. * * Takes the exitcode and a timeout in us as arguments * * Returns 0 on success, non-zero on any sort of failure including timeout. */ static int gasnetc_exit_leader(int exitcode, int64_t timeout_us) { int i, rc; gasneti_tick_t start_time; gasneti_assert(timeout_us > 0); start_time = gasneti_ticks_now(); /* Notify phase */ for (i = 0; i < gasneti_nodes; ++i) { if (i == gasneti_mynode) continue; if (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 > timeout_us) return -1; rc = gasnetc_RequestSysShort(i, NULL, gasneti_handleridx(gasnetc_exit_reqh), 1, (gex_AM_Arg_t)exitcode); if (rc != GASNET_OK) return -1; } /* Wait phase - wait for replies from our N-1 peers */ while (gasneti_atomic_read(&gasnetc_exit_reps, 0) < (gasneti_nodes - 1)) { if (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 > timeout_us) return -1; gasnetc_sndrcv_poll(0); /* works even before _attach */ } return 0; } /* gasnetc_exit_member * * We wait for a polite goodbye from the exit leader. * * Takes a timeout in us as an argument * * Returns 0 on success, non-zero on timeout. */ static int gasnetc_exit_member(int64_t timeout_us) { gasneti_tick_t start_time; gasneti_assert(timeout_us > 0); start_time = gasneti_ticks_now(); /* wait until the exit request is received from the leader */ while (gasneti_atomic_read(&gasnetc_exit_reqs, 0) == 0) { if (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 > timeout_us) return -1; gasnetc_sndrcv_poll(0); /* works even before _attach */ } /* wait until our reply has been placed on the wire */ gasneti_sync_reads(); /* For non-atomic portion of gasnetc_exit_repl_oust */ GASNET_BEGIN_FUNCTION(); // OK - not a critical-path gasnetc_counter_wait(&gasnetc_exit_repl_oust, 1 GASNETI_THREAD_PASS); return 0; } /* gasnetc_exit_body * * This code is common to all the exit paths and is used to perform a hopefully graceful exit in * all cases. In the normal case of a collective call to gasnet_exit() (or return from main()), * we perform a MAX() reduction over the exitcodes and all processes will exit with the result. * If the exitcode reduction does not complete within gasnetc_exittimeout seconds, then we * assume that this is a NON-collective exit and that additional coordination is needed. In that * case, to coordinate a graceful shutdown gasnetc_get_exit_role() will select one node as * the "leader". That leader node will then send a remote exit request to each of its peers to * ensure they know that it is time to exit. If we fail to coordinate the shutdown, we ask the * bootstrap to shut us down agressively. Otherwise we return to our caller. Unless our caller * is the at-exit handler, we are typically followed by a call to gasnetc_exit_tail() to perform * the actual termination. Note also that this function will block all calling threads other than * the first until the shutdown code has been completed. */ static void gasnetc_exit_body(void) { int role, exitcode; int graceful = 0; int64_t timeout_us = gasnetc_exittimeout * 1.0e6; unsigned int timeout = (unsigned int)gasnetc_exittimeout; /* once we start a shutdown, ignore all future SIGQUIT signals or we risk reentrancy */ (void)gasneti_reghandler(SIGQUIT, SIG_IGN); /* Ensure only one thread ever continues past this point. * Others will spin here until time to die. * We can't/shouldn't use mutex code here since it is not signal-safe. */ #ifdef GASNETI_USE_GENERIC_ATOMICOPS #error "We need real atomic ops with signal-safety for gasnet_exit..." #endif { static gasneti_atomic_t exit_lock = gasneti_atomic_init(1); if (!gasneti_atomic_decrement_and_test(&exit_lock, 0)) { /* poll until it is time to exit */ while (!gasneti_atomic_read(&gasnetc_exit_done, GASNETI_ATOMIC_RMB_PRE)) { gasneti_sched_yield(); /* NOT safe to use sleep() here - conflicts with alarm() */ } gasnetc_exit_tail(); /* NOT REACHED */ } } #if GASNETC_USE_RCV_THREAD || GASNETC_USE_SND_THREAD // Stop progress thread(s), if applicable (won't kill self) gasnetc_sndrcv_stop_thread(0); #endif /* read exit code, stored by first caller to gasnetc_exit_head() */ exitcode = gasneti_atomic_read(&gasneti_exit_code, GASNETI_ATOMIC_RMB_PRE); /* Establish a last-ditch signal handler in case of failure. */ alarm(0); gasneti_reghandler(SIGALRM, gasnetc_exit_sighandler); #if GASNET_DEBUG gasneti_reghandler(SIGABRT, SIG_DFL); #else gasneti_reghandler(SIGABRT, gasnetc_exit_sighandler); #endif gasneti_reghandler(SIGILL, gasnetc_exit_sighandler); gasneti_reghandler(SIGSEGV, gasnetc_exit_sighandler); gasneti_reghandler(SIGFPE, gasnetc_exit_sighandler); gasneti_reghandler(SIGBUS, gasnetc_exit_sighandler); /* Disable processing of AMs, except core-specific ones */ gasnetc_disable_AMs(); // prevent possible GASNETI_CHECK_INJECT() failures when we communicate GASNETI_CHECK_INJECT_RESET(); if (gasneti_spawn_verbose) gasneti_console_message("EXIT STATE","gasnet_exit(%i)",exitcode); else GASNETI_TRACE_PRINTF(C,("gasnet_exit(%i)\n", exitcode)); /* Timed MAX(exitcode) reduction to clearly distinguish collective exit */ alarm(2 + timeout); // +2 is margin of safety around the timed reduction graceful = (gasnetc_exit_reduce(exitcode, timeout_us) == 0); // Second alarm to cover most of the remaining exit steps // TODO: 120 is arbitrary and hard-coded alarm(MAX(120, timeout)); GASNETC_EXIT_STATE("dumping final stats"); #if GASNET_TRACE { gasneti_heapstats_t stats; gasneti_getheapstats(&stats); GASNETI_TRACE_PRINTF(I, ("Conduit-internal memory use (%scludes segment):", GASNETC_PIN_SEGMENT ? "in" : "ex")); GASNETI_TRACE_PRINTF(I, (" allocated: %12"PRIu64" bytes in %8"PRIu64" objects", stats.live_bytes, stats.live_objects)); GASNETI_TRACE_PRINTF(I, (" pinned: %12"PRIu64" bytes in %8"PRIu64" objects", (uint64_t)gasnetc_pinned_bytes, (uint64_t)gasnetc_pinned_blocks)); GASNETI_TRACE_PRINTF(I, (" total: %12"PRIu64" bytes in %8"PRIu64" objects", (uint64_t)(stats.live_bytes + gasnetc_pinned_bytes), (uint64_t)(stats.live_objects + gasnetc_pinned_blocks))); } #if PLATFORM_OS_LINUX { FILE *fp; char line[256]; if (NULL != (fp = fopen("/proc/self/status","r"))) { while (fgets(line, sizeof(line)-1, fp)) { if (!strncmp(line, "Vm", 2)) { GASNETI_TRACE_PRINTF(I, ("%s", line)); } } fclose(fp); } } #endif #endif gasnetc_connect_fini(gasnetc_ep0); /* just stats reporting */ // Try to flush out all the output GASNETC_EXIT_STATE("flushing output"); { gasneti_flush_streams(); gasneti_trace_finish(); gasneti_sched_yield(); } if (!graceful) { // Timed reduction failed. So make a second attempt at a coordinated shutdown. // This has two global communication steps each with their own timeout interval exitcode = gasneti_atomic_read(&gasneti_exit_code, GASNETI_ATOMIC_RMB_PRE); GASNETC_EXIT_STATE("Exitcode reduction timed-out"); /* Determine our role (leader or member) in the coordination of this shutdown */ GASNETC_EXIT_STATE("performing non-collective exit"); unsigned int prev_timeout = alarm(2 + timeout); role = gasnetc_get_exit_role(timeout_us); GASNETC_EXIT_STATE("coordinating shutdown"); alarm(2 + timeout); // yet another alarm interval for the second comms step switch (role) { case GASNETC_EXIT_ROLE_LEADER: /* send all the remote exit requests and wait for the replies */ graceful = (gasnetc_exit_leader(exitcode, timeout_us) == 0); break; case GASNETC_EXIT_ROLE_MEMBER: /* wait for the exit request and reply before proceeding */ graceful = (gasnetc_exit_member(timeout_us) == 0); break; default: gasneti_assume(! graceful); } alarm(prev_timeout); // resume previous alarm } // Note we skip clean shutdown on non-collective exit or exit via signal if (graceful && !gasnetc_exit_in_signal) { #if GASNETC_IBV_SHUTDOWN GASNETC_EXIT_STATE("ibv quiesce"); gasnetc_sndrcv_quiesce(); #endif if (gasnetc_did_firehose_init) { GASNETC_EXIT_STATE("in firehose_fini()"); firehose_fini(); } #if GASNETC_IBV_SHUTDOWN GASNETC_EXIT_STATE("ibv shutdown"); gasnetc_shutdown(); #endif } #if GASNETC_IBV_ODP // Always need to shutdown ODP (safe no-op if we did full shutdown above) GASNETC_EXIT_STATE("odp shutdown"); gasnetc_odp_shutdown(); // Avoid possible system memory leak #endif // Try again to flush out any recent output GASNETC_EXIT_STATE("second output flush"); gasneti_flush_streams(); // One last alarm to cover the Fini or Abort // This has been observed to be the slowest step in some cases (see bug 4360) // TODO: 30 is arbitrary and hard-coded alarm(MAX(30, timeout)); /* XXX potential problems here if exiting from the "Wrong" thread, or from a signal handler */ { if (graceful) { GASNETC_EXIT_STATE("in gasneti_bootstrapFini() during graceful exit"); gasneti_bootstrapFini(); } else { /* We couldn't reach our peers, so hope the bootstrap code can kill the entire job */ GASNETC_EXIT_STATE("in gasneti_bootstrapAbort() during forceful exit"); gasneti_bootstrapAbort(exitcode); /* NOT REACHED */ } } alarm(0); } /* gasnetc_exit_reqh * * This is a core AM handler and is therefore available as soon as gasnet_init() * returns, even before gasnet_attach(). This handler is responsible for receiving the * remote exit requests from the leader node and replying. We call gasnetc_exit_head() * with the exitcode seen in the remote exit request. If this remote request is seen before * any local exit requests (normal or signal), then we are also responsible for starting the * exit procedure, via gasnetc_exit_{body,tail}(). Additionally, we are responsible for * firing off a SIGQUIT to let the user's handler, if any, run before we begin to exit. */ static void gasnetc_exit_reqh(gex_Token_t token, gex_AM_Arg_t arg0) { /* The leader will send this AM, but should _never_ receive it */ gasneti_assert(gasneti_atomic_read(&gasnetc_exit_role, 0) != GASNETC_EXIT_ROLE_LEADER); /* We should never receive this AM multiple times */ gasneti_assert(gasneti_atomic_read(&gasnetc_exit_reqs, 0) == 0); /* If we didn't already know, we are now certain our role is "member" */ (void)gasneti_atomic_compare_and_swap(&gasnetc_exit_role, GASNETC_EXIT_ROLE_UNKNOWN, GASNETC_EXIT_ROLE_MEMBER, 0); /* Send a reply so the leader knows we are reachable */ gasnetc_counter_inc(&gasnetc_exit_repl_oust); GASNETI_SAFE(gasnetc_ReplySysShort(token, &gasnetc_exit_repl_oust, gasneti_handleridx(gasnetc_exit_reph), /* no args */ 0)); gasneti_sync_writes(); /* For non-atomic portion of gasnetc_exit_repl_oust */ /* Count the exit requests, so gasnetc_exit_member() knows when to return */ gasneti_atomic_increment(&gasnetc_exit_reqs, 0); /* Initiate an exit IFF this is the first we've heard of it */ if (gasnetc_exit_head(arg0)) { gasneti_sighandlerfn_t handler; /* IMPORTANT NOTE * When we reach this point we are in a request handler which will never return. * Care should be taken to ensure this doesn't wedge the AM recv logic. * * This is currently safe because: * 1) request handlers are run w/ no locks held * 2) we poll for AMs in all the places we need them */ /* To try and be reasonably robust, want to avoid performing the shutdown and exit from signal * context if we can avoid it. However, we must raise SIGQUIT if the user has registered a handler. * Therefore we inspect what is registered before calling raise(). * * XXX we don't do this atomically w.r.t the signal * XXX we don't do the right thing w/ SIG_ERR and SIG_HOLD */ handler = gasneti_reghandler(SIGQUIT, SIG_IGN); if ((handler != gasneti_defaultSignalHandler) && #ifdef SIG_HOLD (handler != (gasneti_sighandlerfn_t)SIG_HOLD) && #endif (handler != (gasneti_sighandlerfn_t)SIG_ERR) && (handler != (gasneti_sighandlerfn_t)SIG_IGN) && (handler != (gasneti_sighandlerfn_t)SIG_DFL)) { (void)gasneti_reghandler(SIGQUIT, handler); #if 1 raise(SIGQUIT); /* Note: Both ISO C and POSIX assure us that raise() won't return until after the signal handler * (if any) has executed. However, if that handler calls gasnetc_exit(), we'll never return here. */ #elif 0 kill(getpid(),SIGQUIT); #else handler(SIGQUIT); #endif } else { /* No need to restore the handler, since _exit_body will set it to SIG_IGN anyway. */ } gasnetc_exit_body(); gasnetc_exit_tail(); /* NOT REACHED */ } return; } /* gasnetc_exit_reph * * Simply count replies */ static void gasnetc_exit_reph(gex_Token_t token) { gasneti_atomic_increment(&gasnetc_exit_reps, 0); } /* gasnetc_atexit * * This is a simple (at,on_}exit() handler to achieve a hopefully graceful exit. * We use the functions gasnetc_exit_{head,body}() to coordinate the shutdown. * Note that we don't call gasnetc_exit_tail() since we anticipate the normal * exit() procedures to shutdown the multi-threaded process nicely and also * because with atexit() we don't have access to the exit code! * * With atexit(), we don't have access to the exit code to send to the other * nodes in the event this is a non-collective exit. However, experience with at * lease one MPI suggests that when using MPI for bootstrap a non-zero return from * at least one executable is sufficient to produce that non-zero exit code from * the parallel job. Therefore, we can "safely" pass 0 to our peers and still * expect to preserve a non-zero exit code for the GASNet job as a whole. Of course * there is no _guarantee_ this will work with all bootstraps. */ static void gasnetc_atexit(int exitcode) { /* Check return from _head to avoid reentrance */ if (gasnetc_exit_head(exitcode)) { gasnetc_exit_body(); } return; } static void gasnetc_exit_init(void) { // Construct vector of the dissemination peers #if GASNET_PSHM gasnetc_exit_peers = gasneti_get_dissem_peers_pshm(&gasnetc_exit_peer); #else gasnetc_exit_peers = gasneti_get_dissem_peers(&gasnetc_exit_peer); #endif // register an exit-time callback for ODP (needed for GASNET_CATCH_EXIT=0 case) #if GASNETC_IBV_ODP if (gasnetc_use_odp) { #if HAVE_ON_EXIT on_exit(gasnetc_odp_on_exit, NULL); #else atexit(gasnetc_odp_atexit); #endif } #endif /* Handler for non-collective returns from main() */ // register process exit-time hook gasneti_registerExitHandler(gasnetc_atexit); #if GASNET_PSHM /* Extract info from nodemap that we'll need at exit */ if (gasneti_nodemap_local_rank) { gasnetc_exit_parent = gasneti_nodemap[gasneti_mynode]; gasnetc_exit_children = gasneti_nodes; } else { const gex_Rank_t children = gasneti_nodemap_local_count - 1; if (children) { const size_t len = children * sizeof(gex_Rank_t); gasnetc_exit_children = children; gasnetc_exit_child = gasneti_malloc(len); gasneti_leak(gasnetc_exit_child); GASNETI_MEMCPY(gasnetc_exit_child, gasneti_nodemap_local+1, len); } } #endif } /* gasnetc_exit * * This is the start of a locally requested exit from GASNet. * The caller might be the user, some part of the conduit which has detected an error, * or possibly gasneti_defaultSignalHandler() responding to a termination signal. */ extern void gasnetc_exit(int exitcode) { gasnetc_exit_head(exitcode); gasnetc_exit_body(); gasnetc_exit_tail(); /* NOT REACHED */ } /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #if GASNET_PSHM /* (###) GASNETC_GET_HANDLER * If your conduit will support PSHM, then there needs to be a way * for PSHM to see your handler table. If you use the recommended * implementation then you don't need to do anything special. * Othwerwise, #define GASNETC_GET_HANDLER in gasnet_core_fwd.h and * implement gasnetc_get_handler() as a macro in * gasnet_core_internal.h */ #endif // NOTE: unlike other conduits this gets used outside the file, and w/ AMPSHM tokens too! gex_Rank_t gasnetc_msgsource(gex_Token_t token) { gex_Rank_t sourceid; gasneti_assert(token); if (gasnetc_token_in_nbrhd(token)) { gex_Token_Info_t info; unsigned int rc = gasnetc_nbrhd_Token_Info(token, &info, GEX_TI_SRCRANK); gasneti_assert(rc & GEX_TI_SRCRANK); sourceid = info.gex_srcrank; } else { uint32_t flags = ((gasnetc_rbuf_t *)token)->rbuf_flags; if (GASNETC_MSG_HANDLERID(flags) >= GASNETE_HANDLER_BASE) { GASNETI_CHECKATTACH(); } sourceid = GASNETC_MSG_SRCIDX(flags); } gasneti_assert(sourceid < gasneti_nodes); return sourceid; } extern gex_TI_t gasnetc_Token_Info( gex_Token_t token, gex_Token_Info_t *info, gex_TI_t mask) { gasneti_assert(token); gasneti_assert(info); if (gasnetc_token_in_nbrhd(token)) { return gasnetc_nbrhd_Token_Info(token, info, mask); } const gasnetc_rbuf_t *rbuf = (gasnetc_rbuf_t *)token; uint32_t flags = rbuf->rbuf_flags; gex_TI_t result = 0; if (GASNETC_MSG_HANDLERID(flags) >= GASNETE_HANDLER_BASE) GASNETI_CHECKATTACH(); info->gex_srcrank = GASNETC_MSG_SRCIDX(flags); result |= GEX_TI_SRCRANK; #if GASNETI_STATS_OR_TRACE // STATS/TRACE of source of bootstrap AMs can reach here before gasneti_THUNK_TM is set info->gex_ep = gasneti_THUNK_TM ? gasneti_THUNK_EP : NULL; #else info->gex_ep = gasneti_THUNK_EP; #endif result |= GEX_TI_EP; info->gex_entry = &rbuf->rr_ep->_amtbl[GASNETC_MSG_HANDLERID(flags)]; result |= GEX_TI_ENTRY; info->gex_is_req = GASNETC_MSG_ISREQUEST(flags); result |= GEX_TI_IS_REQ; info->gex_is_long = (gasneti_Long == GASNETC_MSG_CATEGORY(flags)); result |= GEX_TI_IS_LONG; return GASNETI_TOKEN_INFO_RETURN(result, info, mask); } extern int gasnetc_AMPoll(GASNETI_THREAD_FARG_ALONE) { GASNETI_CHECKATTACH(); gasnetc_poll_both(); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ /* Active Message Request Functions ================================ */ // Helper to select an IB-level cep for AM Request injection static gasnetc_cep_t *gasnetc_am_select_cep(gasnetc_EP_t ep, gasnetc_epid_t dest) { #if GASNETC_IBV_SHUTDOWN /* Currently only the shutdown code uses dest to specify a "bound" value */ gasnetc_cep_t *cep = gasnetc_get_cep(ep, gasnetc_epid2node(dest)); const gasnetc_epid_t dest_qpi = gasnetc_epid2qpi(dest); #else gasnetc_cep_t *cep = gasnetc_get_cep(ep, dest); gasneti_assume(gasnetc_epid2qpi(dest) == 0); #endif #if GASNETC_IBV_SHUTDOWN if_pf (dest_qpi) { cep += (dest_qpi - 1); } else #endif { // SRQ requires shift to upper half of table cep += gasnetc_use_srq ? gasnetc_num_qps : 0; #if 0 /* TODO: could bind by largest avail credits (or at least favor non-zero over zero) */ int qpi = 0; if (gasnetc_num_qps > 1) { uint32_t best_credits; int i; /* gasnetc_poll_snd(); here? */ best_credits = gasnetc_sema_read(&cep[0].am_rem); for (i = 1; i < gasnetc_num_qps; ++i) { const uint32_t tmp = gasnetc_sema_read(&cep[i].am_rem); if (tmp > best_credits) { best_credits = tmp; qpi = i; } } } cep += qpi; #else cep += gasnetc_epid_select_qpi(cep, dest); #endif } return cep; } size_t gasnetc_am_inline_limit_sndrcv = 0; // Common logic for immediate allocation failures #if GASNETC_IMMEDIATE_AMPOLLS // Perform a full Poll, but only once and only the selected HCA // TODO-EX: stats/trace for this as distinct from ..._STALL static int gasnetc_imm_alloc_failure( gasnetc_sema_t * const sema, gasnetc_EP_t ep, gasnetc_cep_t *cep GASNETI_THREAD_FARG) { gasnetc_poll_rcv_hca(ep, cep->hca, GASNETC_RCV_REAP_LIMIT GASNETI_THREAD_PASS); if (gasnetc_sema_trydown(sema)) return 0; return 1; } #else // Never Poll #define gasnetc_imm_alloc_failure(sema,ep,cep_and_TI) 1 #endif // Common code for spinning on allocation failures GASNETI_NEVER_INLINE(gasnetc_am_sema_poll, static void gasnetc_am_sema_poll(gasnetc_sema_t * const sema, gasnetc_EP_t ep GASNETI_THREAD_FARG)) { // Since callers have already failed a trydown, this loop is a "DOUNTIL" GASNETI_SPIN_DOUNTIL(gasnetc_sema_trydown(sema), gasnetc_poll_rcv_all(ep, 1 GASNETI_THREAD_PASS)); } // Helper for allocation of flow-control credit // and (if needed) SRQ reply buffer accounting static int gasnetc_am_get_credit(gasnetc_EP_t ep, gasnetc_cep_t *cep, gex_Flags_t immediate GASNETI_THREAD_FARG) { GASNETC_STAT_EVENT(GET_AMREQ_CREDIT); { gasnetc_sema_t * const sema = &(cep->am_rem); if_pf (!gasnetc_sema_trydown(sema)) { if (immediate) { return gasnetc_imm_alloc_failure(sema, ep, cep GASNETI_THREAD_PASS); } else { GASNETC_TRACE_WAIT_BEGIN(); gasnetc_am_sema_poll(sema, ep GASNETI_THREAD_PASS); GASNETC_TRACE_WAIT_END(GET_AMREQ_CREDIT_STALL); } } } #if GASNETC_IBV_SRQ if (gasnetc_use_srq) { gasnetc_sema_t * const sema = &(cep->hca->am_sema); if_pf (!gasnetc_sema_trydown(sema)) { if (immediate) { if (gasnetc_imm_alloc_failure(sema, ep, cep GASNETI_THREAD_PASS)) { gasnetc_sema_up(&cep->am_rem); // Restore the allocated credit return 1; } } else { GASNETC_TRACE_WAIT_BEGIN(); gasnetc_am_sema_poll(sema, ep GASNETI_THREAD_PASS); GASNETC_TRACE_WAIT_END(GET_AMREQ_BUFFER_STALL); } } } #endif return 0; } // Helper for DEallocation of flow-control credit, and (if needed) // SRQ reply buffer accounting, upon IMMEDIATE failure. static void gasnetc_am_put_credit(gasnetc_cep_t *cep) { #if GASNETC_IBV_SRQ if (gasnetc_use_srq) { // Account for the posted-but-not-consumed reply buffer gasnetc_sema_up(&cep->hca->am_sema); } #endif // Restore the allocated credit gasnetc_sema_up(&cep->am_rem); } // Decide if Medium (or Packed Long) payload should be sent using gather-on-send GASNETI_INLINE(gasnetc_am_use_gather) int gasnetc_am_use_gather(gasnetc_EP_t ep, void *src_addr, int nbytes, gasnetc_cb_t local_cb) { #if GASNETC_PIN_SEGMENT return ((nbytes >= gasnetc_am_gather_min) && // Big enough to benefit (local_cb != gasnetc_cb_counter) && // Caller did NOT require synchronous LC (gasnetc_use_odp || // Registered via OPD ... gasnetc_in_bound_segment(ep, (uintptr_t)src_addr, nbytes))); // ... or in-segment #else return 0; #endif } // Helper to allocate a local buffer // INLINE because we don't want to always force (multiple) outputs to memory GASNETI_INLINE(gasnetc_am_get_buffer) int gasnetc_am_get_buffer(size_t buf_len, gex_Flags_t immediate, void *inline_buf, int is_reply, // Outputs: gasnetc_buffer_t **buf_p, gasnetc_buffer_t **buf_alloc_p GASNETI_THREAD_FARG) { void *buf; if (buf_len <= gasnetc_am_inline_limit_sndrcv) { // Inline send/put using the small buffer on-stack or in-sd buf = (gasnetc_buffer_t *)GASNETI_ALIGNUP(inline_buf, 8); gasneti_assert(*buf_alloc_p == NULL); } else { // Allocation of a pinned bounce buffer buf = gasnetc_get_bbuf_am(is_reply, !immediate GASNETI_THREAD_PASS); if (!buf) { // TODO-EX: stats/trace for this as distinct from ..._STALL gasneti_assert(immediate); return 1; } *buf_alloc_p = buf; } *buf_p = buf; return 0; } // Common logic to "commit" (construct and inject) // INLINE due to specialization opportunity on (at least) category and is_reply GASNETI_INLINE(gasnetc_am_commit) int gasnetc_am_commit( gasnetc_buffer_t *buf, gasnetc_buffer_t *buf_alloc, const gasneti_category_t category, const int is_reply, gasnetc_EP_t ep, gasnetc_cep_t *cep, gex_AM_Index_t handler, void *src_addr, size_t nbytes, void *dst_addr, size_t head_len, size_t copy_len, size_t gath_len, int in_place, const int have_flow, int numargs, gex_Flags_t immediate, gasnetc_atomic_val_t *local_cnt, gasnetc_cb_t local_cb, gasnetc_counter_t *counter, va_list argptr GASNETI_THREAD_FARG) { // AMs to in-nbrhd peers must currently use PSHM gasneti_assert(!GASNETI_NBRHD_JOBRANK_IS_LOCAL(gasnetc_epid2node(cep->epid))); // Allocate a SQ slot gasnetc_sreq_t *sreq = gasnetc_get_sreq(GASNETC_OP_AM GASNETI_THREAD_PASS); if (NULL == gasnetc_bind_cep_am(ep, cep->epid, sreq, !immediate, is_reply)) { gasneti_assert(immediate); goto out_bind_failed; } // For the IMMEDIATE case, try to reserve space on the CQ early. // If we make it past this point then there are no further "immediate // failure" opportunities, and thus we can be certain the AM *will* be sent. // This is important when have_flow!=0, since there is no means to reverse // the "grab" of banked credits while honoring `GASNET_AM_CREDITS_SLACK` (at // least not in a PAR build). if (immediate && !gasnetc_snd_reserve(cep)) { goto out_reserve_failed; } // Set header fields, memcpy payloads, and locate arguments gex_AM_Arg_t *args; switch (category) { case gasneti_Short: args = buf->shortmsg.args; break; case gasneti_Medium: buf->medmsg.nBytes = nbytes; args = buf->medmsg.args; if (in_place) { gasneti_assert_ptr(src_addr ,==, GASNETC_MSG_MED_DATA(buf, numargs + have_flow)); gasneti_assert_uint(copy_len ,==, nbytes); } else if (copy_len) { void *data = (void*)((uintptr_t)buf + head_len); gasneti_assert_ptr(data ,==, GASNETC_MSG_MED_DATA(buf, numargs + have_flow)); gasneti_assert_uint(copy_len ,==, nbytes); GASNETI_MEMCPY(data, src_addr, copy_len); } break; case gasneti_Long: buf->longmsg.destLoc = (uintptr_t)dst_addr; buf->longmsg.nBytes = nbytes; if (copy_len + gath_len) { // Packed Long optimization gasneti_assume(nbytes <= GASNETC_MAX_PACKEDLONG_(numargs)); buf->longmsg.nBytes |= 0x80000000; /* IDs the packedlong case */ if (in_place) { gasneti_assert_ptr(src_addr ,==, GASNETC_MSG_LONG_DATA(buf, numargs + have_flow)); gasneti_assert_uint(copy_len ,==, nbytes); } else if (copy_len) { void *data = (void*)((uintptr_t)buf + head_len); gasneti_assert_ptr(data ,==, GASNETC_MSG_LONG_DATA(buf, numargs + have_flow)); gasneti_assert_uint(copy_len ,==, nbytes); GASNETI_MEMCPY(data, src_addr, copy_len); } else { gasneti_assert_uint(gath_len ,==, nbytes); } } args = buf->longmsg.args; break; default: gasneti_unreachable_error(("Invalid AM category: 0x%x",(int)category)); } /* Assemble an array of arguments. */ if (have_flow) { /* credits travel packed in a "prefixed" argument, remaining args are shifted */ /* "Grab" info w/ atomic load-and-clear: */ const uint32_t credits = gasnetc_atomic_swap(&cep->am_flow.credit, 0, 0); gasneti_assume(credits <= 255); args[0] = GASNETC_GEN_HIDDEN_ARG(credits, numargs); GASNETI_TRACE_PRINTF(C,("SND_AM_CREDITS credits=%d\n", credits)); } for (int i = have_flow; i < (numargs + have_flow); ++i) { args[i] = va_arg(argptr, gex_AM_Arg_t); } /* send the AM */ { GASNETC_DECL_SR_DESC(sr_desc, 2); int numargs_field = have_flow ? GASNETC_MAX_ARGS : numargs; sr_desc->imm_data = GASNETC_MSG_GENFLAGS(!is_reply, category, numargs_field, handler, gasneti_mynode); sr_desc->opcode = IBV_WR_SEND_WITH_IMM; sr_desc->num_sge = 1; sr_desc->sg_list[0].addr = (uintptr_t)buf; sr_desc->sg_list[0].length = head_len + (in_place ? nbytes : copy_len); sr_desc->sg_list[0].lkey = GASNETC_SND_LKEY(cep); sreq->am_buff = buf_alloc; if_pf (counter) { // Caller requires remote completion indication gasneti_assert(!gath_len); sreq->comp.cb = gasnetc_cb_counter; sreq->comp.data = &counter->initiated; } #if GASNETC_PIN_SEGMENT else if (gath_len) { // Gather-on-send to concatenate header and payload sr_desc->num_sge = 2; sr_desc->sg_list[1].length = gath_len; sr_desc->sg_list[1].addr = (uintptr_t)src_addr; #if GASNETC_IBV_ODP sr_desc->sg_list[1].lkey = gasnetc_use_odp ? cep->hca->implicit_odp.lkey : GASNETC_SEG_LKEY(ep, cep); #else sr_desc->sg_list[1].lkey = GASNETC_SEG_LKEY(ep, cep); #endif sreq->comp.cb = local_cb; sreq->comp.data = local_cnt; ++(*local_cnt); } #endif int reserved = (immediate != 0); // CQ slot was pre-reserved if and only if immediate gasnetc_snd_post_common(sreq, sr_desc, reserved, !buf_alloc GASNETI_THREAD_PASS); } return 0; out_reserve_failed: gasnetc_sema_up(GASNETC_CEP_SQ_SEMA(cep)); out_bind_failed: sreq->opcode = GASNETC_OP_FREE; return GASNETC_FAIL_IMM; } // Subject to specialization upon inlining (e.g. category and is_reply) GASNETI_INLINE(gasnetc_ReqRepGeneric) int gasnetc_ReqRepGeneric(gasnetc_EP_t ep, const gasneti_category_t category, const int is_reply, gasnetc_cep_t *cep, gex_AM_Index_t handler, void *src_addr, size_t nbytes, void *dst_addr, gex_Flags_t flags, int numargs, gasnetc_atomic_val_t *local_cnt, gasnetc_cb_t local_cb, gasnetc_counter_t *counter, va_list argptr GASNETI_THREAD_FARG) { gex_Flags_t immediate = flags & GEX_FLAG_IMMEDIATE; int fail_type = GASNETC_FAIL_IMM; /* Reserve space for 1 extra argument if we *might* carry flow control * data. We need to know numargs before we allocate a large enough * buffer, which could block and thus delay the credit update. So, we * allow a race where we allocate space, but later send only zeros. */ const int have_flow = gasnetc_atomic_read(&(cep)->am_flow.credit, 0) ? 1 : 0; // Figure out lengths so we know if we can use inline or not. // Also starts Long payload Put if possible/necessary size_t head_len; // Length of header (padded in case of Medium) size_t copy_len = 0; // Length of payload to be copied (if any) size_t gath_len = 0; // Length of payload to be sent using gather-on-send (if any) switch (category) { case gasneti_Short: head_len = GASNETC_MSG_SHORT_ARGSEND(numargs + have_flow); #if !GASNETC_ALLOW_0BYTE_MSG if (!head_len) head_len = 4; /* Mellanox bug (zero-length sends) work-around */ #endif break; case gasneti_Medium: /* XXX: When nbytes == 0 GASNETC_MSG_MED_ARGSEND still rounds up to 8-byte boundary */ head_len = GASNETC_MSG_MED_ARGSEND(numargs + have_flow); if (gasnetc_am_use_gather(ep, src_addr, nbytes, local_cb)) { gath_len = nbytes; } else { copy_len = nbytes; } break; case gasneti_Long: head_len = GASNETC_MSG_LONG_ARGSEND(numargs + have_flow); if ((nbytes <= gasnetc_packedlong_limit) || (!GASNETC_PIN_SEGMENT && is_reply)) { /* Small enough to send like a Medium (always true of Reply when using remote firehose) */ if (gasnetc_am_use_gather(ep, src_addr, nbytes, local_cb)) { gath_len = nbytes; } else { copy_len = nbytes; } } else { /* When using firehose, Long Requests may need AMs for firehose moves and * so we MUST do any RDMA before getting credits. It can't hurt to queue * the Long RDMA as early as possible even when firehose is not in use. */ // Firehose replies MUST take the packedlong path: gasneti_assert(GASNETC_PIN_SEGMENT || !is_reply); // TODO-EX: should we pass flags other than 'immediate' to the payload Put int rc = gasnetc_rdma_long_put(ep, cep, src_addr, dst_addr, nbytes, immediate, local_cnt, local_cb GASNETI_THREAD_PASS); if (rc) { // TODO-EX: stats/trace for FAIL_IMM case fail_type = rc; goto out_no_put; } immediate = 0; // No turing back now! // TODO-EX: can we delay the Put to avoid disabling 'immediate'? } break; default: gasneti_unreachable_error(("Invalid AM category: 0x%x",(int)category)); } // Get the flow-control credit needed for Requests before a buffer. // This order ensures that we never hold the last pinned buffer // while spinning on the rcv queue waiting for credits. // If using SRQ, will also account for the rbuf needed for the Reply. if (!is_reply) { if (gasnetc_am_get_credit(ep, cep, immediate GASNETI_THREAD_PASS)) { goto out_no_credit; } } // If we can be certain that the message will be small enough for an // inline send/put, then we'll use this stack buffer (saving us from // accessing the shared pool of bounce buffers, which might block). char inline_buf[sizeof(gasnetc_am_tmp_buf_t) + 8]; { // Start of scope: 'buf_alloc' // Obtain an appropriate buffer in which to build the message gasnetc_buffer_t *buf, *buf_alloc = NULL; if (gasnetc_am_get_buffer(head_len + copy_len + gath_len, immediate, inline_buf, is_reply, &buf, &buf_alloc GASNETI_THREAD_PASS)) { gasneti_assert(immediate); goto out_no_buffer; } // Build and send the message if (gasnetc_am_commit( buf, buf_alloc, category, is_reply, ep, cep, handler, src_addr, nbytes, dst_addr, head_len, copy_len, gath_len, 0, have_flow, numargs, immediate, local_cnt, local_cb, counter, argptr GASNETI_THREAD_PASS)) { gasneti_assert(immediate); goto out_no_commit; } GASNETI_RETURN(GASNET_OK); // Normal return // "unwind" logic for failure returns: out_no_commit: if (buf_alloc) { gasnetc_put_bbuf(buf_alloc); } } // End of scope: 'buf_alloc' out_no_buffer: if (!is_reply) { gasnetc_am_put_credit(cep); } out_no_credit: out_no_put: return fail_type; // TODO-EX: this will eventually distinguish IMMEDIATE vs (resilient) failure } GASNETI_INLINE(gasnetc_RequestGeneric) int gasnetc_RequestGeneric(gasnetc_EP_t ep, const gasneti_category_t category, gasnetc_epid_t dest, gex_AM_Index_t handler, void *src_addr, size_t nbytes, void *dst_addr, gex_Flags_t flags, int numargs, gasnetc_atomic_val_t *local_cnt, gasnetc_cb_t local_cb, gasnetc_counter_t *counter, va_list argptr GASNETI_THREAD_FARG) { gasneti_assert(!GASNETI_NBRHD_JOBRANK_IS_LOCAL(gasnetc_epid2node(dest))); // never local return gasnetc_ReqRepGeneric( ep, category, 0, gasnetc_am_select_cep(ep, dest), handler, src_addr, nbytes, dst_addr, flags, numargs, local_cnt, local_cb, counter, argptr GASNETI_THREAD_PASS); } GASNETI_INLINE(gasnetc_ReplyGeneric) int gasnetc_ReplyGeneric(gasnetc_EP_t ep, const gasneti_category_t category, gasnetc_rbuf_t * const token, gex_AM_Index_t handler, void *src_addr, size_t nbytes, void *dst_addr, gex_Flags_t flags, int numargs, gasnetc_atomic_val_t *local_cnt, gasnetc_cb_t local_cb, gasnetc_counter_t *counter, va_list argptr GASNETI_THREAD_FARG) { gasneti_assert(token); gasneti_assert(token->rbuf_handlerRunning); gasneti_assert(GASNETC_MSG_ISREQUEST(token->rbuf_flags)); gasneti_assert(token->rbuf_needReply); int rc = gasnetc_ReqRepGeneric( ep, category, 1, token->cep, handler, src_addr, nbytes, dst_addr, flags, numargs, local_cnt, local_cb, counter, argptr GASNETI_THREAD_PASS); token->rbuf_needReply = rc; // 0 on success, 1 on immediate-failure (no branch) return rc; } extern int gasnetc_RequestSysShort(gasnetc_epid_t dest, gasnetc_counter_t *counter, gex_AM_Index_t handler, int numargs, ...) { GASNET_BEGIN_FUNCTION(); int retval; va_list argptr; const gex_Rank_t jobrank = gasnetc_epid2node(dest); GASNETI_TRACE_AMREQUESTSHORT(gasneti_THUNK_TM,jobrank,handler,/*flags*/0,numargs); /* ensure AM progress, but NOT progress functions */ gasnetc_poll_rcv(); gasnetc_EP_t ep = gasnetc_ep0; va_start(argptr, numargs); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { retval = gasnetc_nbrhd_RequestGeneric ( gasneti_Short, jobrank, handler, NULL, 0, NULL, 0, numargs, argptr GASNETI_THREAD_PASS); if_pf (counter) gasnetc_atomic_increment(&counter->completed, 0); } else { retval = gasnetc_RequestGeneric(ep, gasneti_Short, dest, handler, NULL, 0, NULL, 0, numargs, &counter->initiated, gasnetc_cb_counter, counter, argptr GASNETI_THREAD_PASS); } va_end(argptr); return retval; } extern int gasnetc_RequestSysMedium(gasnetc_epid_t dest, gasnetc_counter_t *counter, gex_AM_Index_t handler, void *source_addr, size_t nbytes, int numargs, ...) { GASNET_BEGIN_FUNCTION(); int retval; va_list argptr; const gex_Rank_t jobrank = gasnetc_epid2node(dest); GASNETI_TRACE_AMREQUESTMEDIUM(gasneti_THUNK_TM,jobrank,handler,source_addr,nbytes,/*flags*/0,numargs); /* ensure AM progress, but NOT progress functions */ gasnetc_poll_rcv(); gasnetc_EP_t ep = gasnetc_ep0; va_start(argptr, numargs); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { retval = gasnetc_nbrhd_RequestGeneric ( gasneti_Medium, jobrank, handler, source_addr, nbytes, NULL, 0, numargs, argptr GASNETI_THREAD_PASS); if_pf (counter) gasnetc_atomic_increment(&counter->completed, 0); } else { retval = gasnetc_RequestGeneric(ep, gasneti_Medium, dest, handler, source_addr, nbytes, NULL, 0, numargs, &counter->initiated, gasnetc_cb_counter, counter, argptr GASNETI_THREAD_PASS); } va_end(argptr); GASNETI_RETURN(retval); } extern int gasnetc_ReplySysShort(gex_Token_t token, gasnetc_counter_t *counter, gex_AM_Index_t handler, int numargs, ...) { int retval; va_list argptr; gasneti_assert(token); GASNETI_TRACE_AMREPLYSHORT(token,handler,/*flags*/0,numargs); va_start(argptr, numargs); if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric ( gasneti_Short, token, handler, NULL, 0, NULL, 0, numargs, argptr); if_pf (counter) gasnetc_atomic_increment(&counter->completed, 0); } else { gasnetc_rbuf_t *rbuf = (gasnetc_rbuf_t *)token; GASNET_POST_THREADINFO(rbuf->rbuf_threadinfo); gasnetc_EP_t ep = rbuf->rr_ep; gasneti_assert(ep == gasnetc_ep0); retval = gasnetc_ReplyGeneric(ep, gasneti_Short, rbuf, handler, NULL, 0, NULL, 0, numargs, &counter->initiated, gasnetc_cb_counter, counter, argptr GASNETI_THREAD_PASS); } va_end(argptr); return retval; } extern int gasnetc_ReplySysMedium(gex_Token_t token, gasnetc_counter_t *counter, gex_AM_Index_t handler, void *source_addr, size_t nbytes, int numargs, ...) { int retval; va_list argptr; gasneti_assert(token); GASNETI_TRACE_AMREPLYMEDIUM(token,handler,source_addr,nbytes,/*flags*/0,numargs); va_start(argptr, numargs); if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric ( gasneti_Medium, token, handler, source_addr, nbytes, NULL, 0, numargs, argptr); if_pf (counter) gasnetc_atomic_increment(&counter->completed, 0); } else { gasnetc_rbuf_t *rbuf = (gasnetc_rbuf_t *)token; GASNET_POST_THREADINFO(rbuf->rbuf_threadinfo); gasnetc_EP_t ep = rbuf->rr_ep; gasneti_assert(ep == gasnetc_ep0); retval = gasnetc_ReplyGeneric(ep, gasneti_Medium, rbuf, handler, source_addr, nbytes, NULL, 0, numargs, &counter->initiated, gasnetc_cb_counter, counter, argptr GASNETI_THREAD_PASS); } va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ // AM "cores" - no poll or progress fns GASNETI_INLINE(gasnetc_AMRequestShort) int gasnetc_AMRequestShort( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gasneti_assert(tm); gasnetc_EP_t ep = (gasnetc_EP_t) gasneti_e_tm_to_i_ep(tm); gasneti_assert(ep == gasnetc_ep0); gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { retval = gasnetc_nbrhd_RequestGeneric ( gasneti_Short, jobrank, handler, NULL, 0, NULL, 0, numargs, argptr GASNETI_THREAD_PASS); } else { retval = gasnetc_RequestGeneric(ep, gasneti_Short, jobrank, handler, NULL, 0, NULL, flags, numargs, NULL, NULL, NULL, argptr GASNETI_THREAD_PASS); } return (retval == GASNETC_FAIL_IMM); } GASNETI_INLINE(gasnetc_AMRequestMedium) int gasnetc_AMRequestMedium(gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gasneti_assert(tm); gasnetc_EP_t ep = (gasnetc_EP_t) gasneti_e_tm_to_i_ep(tm); gasneti_assert(ep == gasnetc_ep0); gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { gasneti_leaf_finish(lc_opt); // Always synchronous local completion retval = gasnetc_nbrhd_RequestGeneric ( gasneti_Medium, jobrank, handler, source_addr, nbytes, NULL, flags, numargs, argptr GASNETI_THREAD_PASS); } else { gasnetc_counter_t counter = GASNETC_COUNTER_INITIALIZER; gasnetc_atomic_val_t *local_cnt, start_cnt; gasnetc_cb_t local_cb; gasnete_eop_t *eop = NULL; if (gasneti_leaf_is_pointer(lc_opt)) { eop = gasnete_eop_new_alc(GASNETI_MYTHREAD); *lc_opt = (gex_Event_t)eop; start_cnt = eop->initiated_alc; local_cnt = &eop->initiated_alc; local_cb = gasnetc_cb_eop_alc; } else if (lc_opt == GEX_EVENT_NOW) { local_cnt = &counter.initiated; local_cb = gasnetc_cb_counter; } else if (lc_opt == GEX_EVENT_GROUP) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t *op = mythread->current_iop; local_cnt = &op->initiated_alc_cnt; local_cb = op->next ? gasnetc_cb_nar_alc : gasnetc_cb_iop_alc; } else { gasneti_fatalerror("Invalid lc_opt argument to RequestMedium"); } retval = gasnetc_RequestGeneric(ep, gasneti_Medium, jobrank, handler, source_addr, nbytes, NULL, flags, numargs, local_cnt, local_cb, NULL, argptr GASNETI_THREAD_PASS); if (eop) { gasneti_assume_leaf_is_pointer(lc_opt); // avoid maybe-uninitialized warning (bug 3756) if (start_cnt == eop->initiated_alc) { // Synchronous LC - reset LC state and pass-back INVALID_HANDLE as result GASNETE_EOP_LC_FINISH(eop); *lc_opt = GEX_EVENT_INVALID; gasnete_eop_free(eop GASNETI_THREAD_PASS); } } else if (lc_opt == GEX_EVENT_NOW) { #if 0 // Currently always synchronous LC when (local_cb == gasnetc_cb_counter) /* block for local completion of payload transfer */ gasnetc_counter_wait(&counter, 0 GASNETI_THREAD_PASS); #else gasneti_assert(counter.initiated == 0); gasneti_assert(gasnetc_atomic_read(&counter.completed,0) == 0); #endif } } return (retval == GASNETC_FAIL_IMM); } GASNETI_INLINE(gasnetc_AMRequestLong) int gasnetc_AMRequestLong( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gasneti_assert(tm); gasnetc_EP_t ep = (gasnetc_EP_t) gasneti_e_tm_to_i_ep(tm); gasneti_assert(ep == gasnetc_ep0); gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { gasneti_leaf_finish(lc_opt); // Always synchronous local completion retval = gasnetc_nbrhd_RequestGeneric ( gasneti_Long, jobrank, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr GASNETI_THREAD_PASS); } else { gasnetc_counter_t counter = GASNETC_COUNTER_INITIALIZER; gasnetc_atomic_val_t *local_cnt, start_cnt; gasnetc_cb_t local_cb; gasnete_eop_t *eop = NULL; if (gasneti_leaf_is_pointer(lc_opt)) { if (flags & GASNETI_FLAG_LC_OPT_IN) { gasnete_op_t *op = gasneti_event_op(*lc_opt); if (OPTYPE(op) == OPTYPE_IMPLICIT) { gasnete_iop_t *iop = (gasnete_iop_t*)op; gasneti_assert(gasneti_event_idx(*lc_opt) == gasnete_iop_event_alc); gasneti_assert(iop->next); // Within an NBI access region local_cnt = &iop->initiated_alc_cnt; local_cb = gasnetc_cb_nar_alc; } else { eop = (gasnete_eop_t*)op; gasneti_assert(gasneti_event_idx(*lc_opt) == gasnete_eop_event_alc); GASNETE_EOP_LC_START(eop); start_cnt = eop->initiated_alc; local_cnt = &eop->initiated_alc; local_cb = gasnetc_cb_eop_alc; } } else { eop = gasnete_eop_new_alc(GASNETI_MYTHREAD); *lc_opt = (gex_Event_t)eop; start_cnt = eop->initiated_alc; local_cnt = &eop->initiated_alc; local_cb = gasnetc_cb_eop_alc; } } else if (lc_opt == GEX_EVENT_NOW) { local_cnt = &counter.initiated; local_cb = gasnetc_cb_counter; } else if (lc_opt == GEX_EVENT_GROUP) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t *op = mythread->current_iop; local_cnt = &op->initiated_alc_cnt; local_cb = op->next ? gasnetc_cb_nar_alc : gasnetc_cb_iop_alc; } else { gasneti_fatalerror("Invalid lc_opt argument to RequestLong"); } retval = gasnetc_RequestGeneric(ep, gasneti_Long, jobrank, handler, source_addr, nbytes, dest_addr, flags, numargs, local_cnt, local_cb, NULL, argptr GASNETI_THREAD_PASS); if (lc_opt == GEX_EVENT_NOW) { /* block for local completion of RDMA transfer */ gasnetc_counter_wait(&counter, 0 GASNETI_THREAD_PASS); } else if (eop) { gasneti_assume_leaf_is_pointer(lc_opt); // avoid maybe-uninitialized warning (bug 3756) if (start_cnt == eop->initiated_alc) { // Synchronous LC - reset LC state and pass-back INVALID_HANDLE as result GASNETE_EOP_LC_FINISH(eop); *lc_opt = GEX_EVENT_INVALID; if (!(flags & GASNETI_FLAG_LC_OPT_IN)) { gasnete_eop_free(eop GASNETI_THREAD_PASS); } } } } return (retval == GASNETC_FAIL_IMM); } GASNETI_INLINE(gasnetc_AMReplyShort) int gasnetc_AMReplyShort( gex_Token_t token, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr) { int retval; gasneti_assert(token); if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric ( gasneti_Short, token, handler, NULL, 0, NULL, flags, numargs, argptr); } else { gasnetc_rbuf_t *rbuf = (gasnetc_rbuf_t *)token; GASNET_POST_THREADINFO(rbuf->rbuf_threadinfo); gasnetc_EP_t ep = rbuf->rr_ep; gasneti_assert(ep == gasnetc_ep0); retval = gasnetc_ReplyGeneric(ep, gasneti_Short, rbuf, handler, NULL, 0, NULL, flags, numargs, NULL, NULL, NULL, argptr GASNETI_THREAD_PASS); gasneti_assert(!rbuf->rbuf_needReply || (flags & GEX_FLAG_IMMEDIATE)); } return (retval == GASNETC_FAIL_IMM); } GASNETI_INLINE(gasnetc_AMReplyMedium) int gasnetc_AMReplyMedium( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { int retval; gasneti_assert(token); if_pt (gasnetc_token_in_nbrhd(token)) { gasneti_leaf_finish(lc_opt); // Always synchronous local completion retval = gasnetc_nbrhd_ReplyGeneric ( gasneti_Medium, token, handler, source_addr, nbytes, NULL, flags, numargs, argptr); } else { gasnetc_rbuf_t *rbuf = (gasnetc_rbuf_t *)token; GASNET_POST_THREADINFO(rbuf->rbuf_threadinfo); gasnetc_EP_t ep = rbuf->rr_ep; gasneti_assert(ep == gasnetc_ep0); gasnetc_counter_t counter = GASNETC_COUNTER_INITIALIZER; gasnetc_atomic_val_t *local_cnt, start_cnt; gasnetc_cb_t local_cb; gasnete_eop_t *eop = NULL; if (gasneti_leaf_is_pointer(lc_opt)) { eop = gasnete_eop_new_alc(GASNETI_MYTHREAD); *lc_opt = (gex_Event_t)eop; start_cnt = eop->initiated_alc; local_cnt = &eop->initiated_alc; local_cb = gasnetc_cb_eop_alc; } else if (lc_opt == GEX_EVENT_NOW) { local_cnt = &counter.initiated; local_cb = gasnetc_cb_counter; } else { gasneti_fatalerror("Invalid lc_opt argument to ReplyMedium"); } retval = gasnetc_ReplyGeneric(ep, gasneti_Medium, rbuf, handler, source_addr, nbytes, NULL, flags, numargs, local_cnt, local_cb, NULL, argptr GASNETI_THREAD_PASS); gasneti_assert(!rbuf->rbuf_needReply || (flags & GEX_FLAG_IMMEDIATE)); if (eop) { gasneti_assume_leaf_is_pointer(lc_opt); // avoid maybe-uninitialized warning (bug 3756) if (start_cnt == eop->initiated_alc) { // Synchronous LC - reset LC state and pass-back INVALID_HANDLE as result GASNETE_EOP_LC_FINISH(eop); *lc_opt = GEX_EVENT_INVALID; gasnete_eop_free(eop GASNETI_THREAD_PASS); } } else if (lc_opt == GEX_EVENT_NOW) { #if 0 // Currently always synchronous LC when (local_cb == gasnetc_cb_counter) /* block for local completion of payload transfer */ gasnetc_counter_wait(&counter, 1 /* handler context */ GASNETI_THREAD_PASS); #else gasneti_assert(counter.initiated == 0); gasneti_assert(gasnetc_atomic_read(&counter.completed,0) == 0); #endif } } return (retval == GASNETC_FAIL_IMM); } GASNETI_INLINE(gasnetc_AMReplyLong) int gasnetc_AMReplyLong( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { int retval; gasneti_assert(token); if_pt (gasnetc_token_in_nbrhd(token)) { gasneti_leaf_finish(lc_opt); // Always synchronous local completion retval = gasnetc_nbrhd_ReplyGeneric ( gasneti_Long, token, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr); } else { gasnetc_rbuf_t *rbuf = (gasnetc_rbuf_t *)token; GASNET_POST_THREADINFO(rbuf->rbuf_threadinfo); gasnetc_EP_t ep = rbuf->rr_ep; gasneti_assert(ep == gasnetc_ep0); #if GASNETC_PIN_SEGMENT gasnetc_counter_t counter = GASNETC_COUNTER_INITIALIZER; gasnetc_atomic_val_t *local_cnt, start_cnt; gasnetc_cb_t local_cb; gasnete_eop_t *eop = NULL; if (gasneti_leaf_is_pointer(lc_opt)) { if (flags & GASNETI_FLAG_LC_OPT_IN) { gasnete_op_t *op = gasneti_event_op(*lc_opt); if (OPTYPE(op) == OPTYPE_IMPLICIT) { gasnete_iop_t *iop = (gasnete_iop_t*)op; gasneti_assert(gasneti_event_idx(*lc_opt) == gasnete_iop_event_alc); gasneti_assert(iop->next); // Within an NBI access region local_cnt = &iop->initiated_alc_cnt; local_cb = gasnetc_cb_nar_alc; start_cnt = 0; // DEAD STORE: avoid a warning from gcc-7.3.0/aarch64 } else { eop = (gasnete_eop_t*)op; gasneti_assert(gasneti_event_idx(*lc_opt) == gasnete_eop_event_alc); GASNETE_EOP_LC_START(eop); start_cnt = eop->initiated_alc; local_cnt = &eop->initiated_alc; local_cb = gasnetc_cb_eop_alc; } } else { eop = gasnete_eop_new_alc(GASNETI_MYTHREAD); *lc_opt = (gex_Event_t)eop; start_cnt = eop->initiated_alc; local_cnt = &eop->initiated_alc; local_cb = gasnetc_cb_eop_alc; } } else if (lc_opt == GEX_EVENT_NOW) { local_cnt = &counter.initiated; local_cb = gasnetc_cb_counter; start_cnt = 0; // DEAD STORE: avoid a warning from gcc-7.3.0/aarch64 } else { gasneti_fatalerror("Invalid lc_opt argument to ReplyLong"); } retval = gasnetc_ReplyGeneric(ep, gasneti_Long, rbuf, handler, source_addr, nbytes, dest_addr, flags, numargs, local_cnt, local_cb, NULL, argptr GASNETI_THREAD_PASS); if (lc_opt == GEX_EVENT_NOW) { /* block for local completion of RDMA transfer */ gasnetc_counter_wait(&counter, 1 /* handler context */ GASNETI_THREAD_PASS); } else if (eop) { gasneti_assume_leaf_is_pointer(lc_opt); // avoid maybe-uninitialized warning (bug 3756) if (start_cnt == eop->initiated_alc) { // Synchronous LC - reset LC state and pass-back INVALID_HANDLE as result GASNETE_EOP_LC_FINISH(eop); *lc_opt = GEX_EVENT_INVALID; if (!(flags & GASNETI_FLAG_LC_OPT_IN)) { gasnete_eop_free(eop GASNETI_THREAD_PASS); } } } #else gasneti_leaf_finish(lc_opt); // Always "packed long", and thus locally-complete retval = gasnetc_ReplyGeneric(ep, gasneti_Long, rbuf, handler, source_addr, nbytes, dest_addr, flags, numargs, NULL, NULL, NULL, argptr GASNETI_THREAD_PASS); #endif gasneti_assert(!rbuf->rbuf_needReply || (flags & GEX_FLAG_IMMEDIATE)); } return (retval == GASNETC_FAIL_IMM); } /* ------------------------------------------------------------------------------------ */ // ---- NPAM common ---- GASNETI_INLINE(gasnetc_prepare_common) int gasnetc_prepare_common( gasneti_AM_SrcDesc_t sd, gasneti_category_t category, const int is_reply, gasnetc_cep_t *cep, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs GASNETI_THREAD_FARG) { // See gasnetc_ReqRepGeneric() for details const int have_flow = gasnetc_atomic_read(&(cep)->am_flow.credit, 0) ? 1 : 0; size_t nbytes, head_len; switch (category) { #if GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM || GASNET_NATIVE_NP_ALLOC_REP_MEDIUM case gasneti_Medium: nbytes = MIN(most_payload, GASNETC_MAX_MEDIUM_(nargs)); head_len = GASNETC_MSG_MED_ARGSEND(nargs + have_flow); break; #endif #if GASNET_NATIVE_NP_ALLOC_REQ_LONG || GASNET_NATIVE_NP_ALLOC_REP_LONG case gasneti_Long: { #if GASNETC_PIN_SEGMENT gasneti_static_assert(GASNETC_MAX_LONG_REQ == GASNETC_MAX_LONG_REP); size_t limit = client_buf ? GASNETC_MAX_LONG_REQ : GASNETC_MAX_PACKEDLONG_(nargs); #else size_t limit = client_buf ? (is_reply ? GASNETC_MAX_LONG_REP : GASNETC_MAX_LONG_REQ) : GASNETC_MAX_PACKEDLONG_(nargs); #endif nbytes = MIN(most_payload, limit); head_len = GASNETC_MSG_LONG_ARGSEND(nargs + have_flow); break; } #endif default: gasneti_unreachable_error(("Invalid AM category: 0x%x",(int)category)); } // Obtain an appropriate buffer in which to build the message // If an inline send is to be used, the buffer is in the sd itself // TODO: *might* "prove" use of gather-on-send to eliminate buffer allocation gasneti_static_assert(sizeof(gasnetc_am_tmp_buf_t) <= 128); const gex_Flags_t immediate = flags & GEX_FLAG_IMMEDIATE; gasnetc_buffer_t *buf, *buf_alloc = NULL; if (gasnetc_am_get_buffer(head_len + nbytes, immediate, &sd->_inline_buf, is_reply, &buf, &buf_alloc GASNETI_THREAD_PASS)) { gasneti_assert(immediate); return 1; } sd->_void_p = buf; sd->_lc_opt = lc_opt; sd->_size = nbytes; sd->_buf_alloc = buf_alloc; sd->_have_flow = have_flow; sd->_head_len = head_len; sd->_cep = cep; if (client_buf) { sd->_addr = (/*non-const*/void *)client_buf; #if GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM || GASNET_NATIVE_NP_ALLOC_REP_MEDIUM if (category == gasneti_Medium) { gasneti_leaf_finish(lc_opt); // Commit always yields synchronous LC of Medium } #endif } else { sd->_gex_buf = sd->_addr = (void*)((uintptr_t)sd->_void_p + head_len); } return 0; } static int gasnetc_commit_common( gasneti_AM_SrcDesc_t sd, gasneti_category_t category, const int is_reply, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, unsigned int nargs, gex_Flags_t commit_flags, va_list argptr GASNETI_THREAD_FARG) { gasnetc_counter_t counter = GASNETC_COUNTER_INITIALIZER; gasnetc_atomic_val_t *local_cnt, start_cnt; gasnetc_cb_t local_cb; gasnete_eop_t *eop = NULL; gex_Flags_t immediate = commit_flags & GEX_FLAG_IMMEDIATE; int is_cbuf = sd->_gex_buf == NULL; gex_Event_t *lc_opt = sd->_lc_opt; size_t copy_len = 0; // Length of payload to be copied (if any) size_t gath_len = 0; // Length of payload to be sent using gather-on-send (if any) if (is_cbuf) { gasneti_assert(lc_opt); if (gasneti_leaf_is_pointer(lc_opt)) { eop = gasnete_eop_new_alc(GASNETI_MYTHREAD); *lc_opt = (gex_Event_t)eop; start_cnt = eop->initiated_alc; local_cnt = &eop->initiated_alc; local_cb = gasnetc_cb_eop_alc; } else if (lc_opt == GEX_EVENT_NOW) { local_cnt = &counter.initiated; local_cb = gasnetc_cb_counter; } else if (lc_opt == GEX_EVENT_GROUP) { gasneti_assert(! is_reply); // Request only gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t *op = mythread->current_iop; local_cnt = &op->initiated_alc_cnt; local_cb = op->next ? gasnetc_cb_nar_alc : gasnetc_cb_iop_alc; } else { gasneti_fatalerror("Invalid lc_opt argument to Prepare/Commit %s%s", is_reply?"Reply":"Request", (category==gasneti_Medium)?"Medium":"Long"); } switch (category) { #if GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM || GASNET_NATIVE_NP_ALLOC_REP_MEDIUM case gasneti_Medium: if (gasnetc_am_use_gather(sd->_ep, sd->_addr, nbytes, local_cb)) { gath_len = nbytes; } else { copy_len = nbytes; } break; #endif #if GASNET_NATIVE_NP_ALLOC_REQ_LONG || GASNET_NATIVE_NP_ALLOC_REP_LONG case gasneti_Long: if ((nbytes <= gasnetc_packedlong_limit) || (!GASNETC_PIN_SEGMENT && is_reply)) { // Small enough to send like a Medium (forced for Reply w/ firehose) if (gasnetc_am_use_gather(sd->_ep, sd->_addr, nbytes, local_cb)) { gath_len = nbytes; } else { copy_len = nbytes; } } else { // Inject RMA int rc = gasnetc_rdma_long_put(sd->_ep, sd->_cep, sd->_addr, dest_addr, nbytes, /*imm*/0, local_cnt, local_cb GASNETI_THREAD_PASS); gasneti_assert(!rc); // Never fails, since never "immediate" immediate = 0; } break; #endif default: gasneti_unreachable_error(("Invalid AM category: 0x%x",(int)category)); } } else { gasneti_assert(!lc_opt); local_cb = NULL; local_cnt = NULL; // TODO: RDMA of Long payload can be beneficial copy_len = nbytes; } int rc = gasnetc_am_commit( sd->_void_p, sd->_buf_alloc, category, is_reply, sd->_ep, sd->_cep, handler, sd->_addr, nbytes, dest_addr, sd->_head_len, copy_len, gath_len, !is_cbuf, sd->_have_flow, nargs, immediate, local_cnt, local_cb, NULL, argptr GASNETI_THREAD_PASS); // TODO? For IMMEDIATE failure (rc != 0) an abbreviated version of the // following logic would be possible (but would add branches). if (eop) { gasneti_assume_leaf_is_pointer(lc_opt); // avoid maybe-uninitialized warning (bug 3756) if (start_cnt == eop->initiated_alc) { // Synchronous LC - reset LC state and pass-back INVALID_HANDLE as result GASNETE_EOP_LC_FINISH(eop); *lc_opt = GEX_EVENT_INVALID; gasnete_eop_free(eop GASNETI_THREAD_PASS); } } else if (lc_opt == GEX_EVENT_NOW) { switch (category) { #if GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM || GASNET_NATIVE_NP_ALLOC_REP_MEDIUM case gasneti_Medium: // Currently always synchronous LC gasneti_assert(counter.initiated == 0); gasneti_assert(gasnetc_atomic_read(&counter.completed,0) == 0); break; #endif #if GASNET_NATIVE_NP_ALLOC_REQ_LONG || GASNET_NATIVE_NP_ALLOC_REP_LONG case gasneti_Long: // block for local completion of RDMA transfer, if needed if (is_cbuf) gasnetc_counter_wait(&counter, is_reply GASNETI_THREAD_PASS); break; #endif default: gasneti_unreachable_error(("Invalid AM category: 0x%x",(int)category)); } } gasneti_assert(!rc || immediate); return rc; } static void gasnetc_cancel_common( gasneti_AM_SrcDesc_t sd, const int is_reply) { // flow-control if (is_reply) { gasnetc_rbuf_t *rbuf = (gasnetc_rbuf_t *) sd->_dest._reply._token; gasneti_assert(rbuf && !rbuf->rbuf_needReply); rbuf->rbuf_needReply = 1; } else { gasnetc_am_put_credit(sd->_cep); } // bounce buffer, if any if (sd->_buf_alloc) { gasnetc_put_bbuf(sd->_buf_alloc); } } // ---- external FPAM requests ---- extern int gasnetc_AMRequestShortM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTSHORT(tm,rank,handler,flags,numargs); /* ensure progress */ if (GASNETC_IMMEDIATE_WOULD_POLL(flags)) { gasnetc_poll_rcv(); GASNETI_PROGRESSFNS_RUN(); } va_list argptr; va_start(argptr, numargs); int retval = gasnetc_AMRequestShort(tm,rank,handler,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } #if !GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM extern int gasnetc_AMRequestMediumV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { return gasnetc_AMRequestMedium(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); } #endif extern int gasnetc_AMRequestMediumM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTMEDIUM(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs); /* ensure progress */ if (GASNETC_IMMEDIATE_WOULD_POLL(flags)) { gasnetc_poll_rcv(); GASNETI_PROGRESSFNS_RUN(); } va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestMedium(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return (retval == GASNETC_FAIL_IMM); } #if !GASNET_NATIVE_NP_ALLOC_REQ_LONG extern int gasnetc_AMRequestLongV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { return gasnetc_AMRequestLong(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); } #endif extern int gasnetc_AMRequestLongM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTLONG(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); /* ensure progress */ if (GASNETC_IMMEDIATE_WOULD_POLL(flags)) { gasnetc_poll_rcv(); GASNETI_PROGRESSFNS_RUN(); } va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestLong(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } // ---- external NPAM requests ---- #if GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM extern gex_AM_SrcDesc_t gasnetc_AM_PrepareRequestMedium( gex_TM_t tm, gex_Rank_t rank, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG, unsigned int nargs) { GASNETI_TRACE_PREP_REQUESTMEDIUM(tm,rank,client_buf,least_payload,most_payload,flags,nargs); GASNETC_IMMEDIATE_MAYBE_POLL(flags); // Ensure at least one poll upon Request injection gasneti_AM_SrcDesc_t sd = gasneti_init_request_srcdesc(GASNETI_THREAD_PASS_ALONE); GASNETI_COMMON_PREP_REQ(sd,tm,rank,client_buf,least_payload,most_payload,NULL,lc_opt,flags,nargs,Medium); flags &= ~(GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { sd = gasnetc_nbrhd_PrepareRequest(sd, gasneti_Medium, jobrank, client_buf, least_payload, most_payload, NULL, lc_opt, flags, nargs); } else { const gex_Flags_t immediate = flags & GEX_FLAG_IMMEDIATE; gasnetc_EP_t ep = (gasnetc_EP_t) gasneti_e_tm_to_i_ep(tm); gasneti_assert(ep == gasnetc_ep0); gasnetc_cep_t *cep = gasnetc_am_select_cep(ep, jobrank); if (gasnetc_am_get_credit(ep, cep, immediate GASNETI_THREAD_PASS)) { goto out_immediate; } else if (gasnetc_prepare_common(sd, gasneti_Medium, 0, cep, client_buf, least_payload, most_payload, lc_opt, flags, nargs GASNETI_THREAD_PASS)) { gasnetc_am_put_credit(cep); goto out_immediate; } else { gasneti_init_sd_poison(sd); sd->_is_nbrhd = 0; sd->_ep = ep; } } GASNETI_TRACE_PREP_RETURN(REQUEST_MEDIUM, sd); GASNETI_CHECK_SD(client_buf, least_payload, most_payload, sd); return gasneti_export_srcdesc(sd); out_immediate: gasneti_assert(flags & GEX_FLAG_IMMEDIATE); gasneti_reset_srcdesc(sd); GASNETI_TRACE_PREP_RETURN(REQUEST_MEDIUM, NULL); return gasneti_export_srcdesc(NULL); // GEX_AM_SRCDESC_NO_OP } extern int gasnetc_AM_CommitRequestMediumM( gex_AM_Index_t handler, size_t nbytes, gex_Flags_t commit_flags GASNETI_THREAD_FARG, unsigned int nargs, gex_AM_SrcDesc_t sd_arg, ...) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_COMMIT_REQ(sd,handler,nbytes,NULL,commit_flags,nargs,Medium); int rc = GASNET_OK; // assume success va_list argptr; va_start(argptr, sd_arg); if (sd->_is_nbrhd) { gasnetc_nbrhd_CommitRequest(sd, gasneti_Medium, handler, nbytes, NULL, argptr); } else { rc = gasnetc_commit_common(sd,gasneti_Medium,0,handler,nbytes,NULL,nargs,commit_flags,argptr GASNETI_THREAD_PASS); } va_end(argptr); if (!rc) gasneti_reset_srcdesc(sd); return rc; } int gasnetc_AM_CancelRequestMedium( gex_AM_SrcDesc_t sd_arg, gex_Flags_t flags) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_CANCEL_REQ(sd,flags,Medium); if (sd->_is_nbrhd) { gasnetc_nbrhd_CancelRequest(sd, gasneti_Medium, flags); } else { gasnetc_cancel_common(sd,0); } gasneti_reset_srcdesc(sd); return GASNET_OK; } #endif // GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM #if GASNET_NATIVE_NP_ALLOC_REQ_LONG extern gex_AM_SrcDesc_t gasnetc_AM_PrepareRequestLong( gex_TM_t tm, gex_Rank_t rank, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG, unsigned int nargs) { GASNETI_TRACE_PREP_REQUESTLONG(tm,rank,client_buf,least_payload,most_payload,dest_addr,flags,nargs); GASNETC_IMMEDIATE_MAYBE_POLL(flags); // Ensure at least one poll upon Request injection gasneti_AM_SrcDesc_t sd = gasneti_init_request_srcdesc(GASNETI_THREAD_PASS_ALONE); GASNETI_COMMON_PREP_REQ(sd,tm,rank,client_buf,least_payload,most_payload,dest_addr,lc_opt,flags,nargs,Long); flags &= ~(GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { sd = gasnetc_nbrhd_PrepareRequest(sd, gasneti_Long, jobrank, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs); } else { const gex_Flags_t immediate = flags & GEX_FLAG_IMMEDIATE; gasnetc_EP_t ep = (gasnetc_EP_t) gasneti_e_tm_to_i_ep(tm); gasneti_assert(ep == gasnetc_ep0); gasnetc_cep_t *cep = gasnetc_am_select_cep(ep, jobrank); if (gasnetc_am_get_credit(ep, cep, immediate GASNETI_THREAD_PASS)) { goto out_immediate; } else if (gasnetc_prepare_common(sd, gasneti_Long, 0, cep, client_buf, least_payload, most_payload, lc_opt, flags, nargs GASNETI_THREAD_PASS)) { gasnetc_am_put_credit(cep); goto out_immediate; } else { gasneti_init_sd_poison(sd); sd->_is_nbrhd = 0; sd->_ep = ep; } } GASNETI_TRACE_PREP_RETURN(REQUEST_LONG, sd); GASNETI_CHECK_SD(client_buf, least_payload, most_payload, sd); return gasneti_export_srcdesc(sd); out_immediate: gasneti_assert(flags & GEX_FLAG_IMMEDIATE); gasneti_reset_srcdesc(sd); GASNETI_TRACE_PREP_RETURN(REQUEST_LONG, NULL); return gasneti_export_srcdesc(NULL); // GEX_AM_SRCDESC_NO_OP } extern int gasnetc_AM_CommitRequestLongM( gex_AM_Index_t handler, size_t nbytes, void *dest_addr, gex_Flags_t commit_flags GASNETI_THREAD_FARG, unsigned int nargs, gex_AM_SrcDesc_t sd_arg, ...) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_COMMIT_REQ(sd,handler,nbytes,dest_addr,commit_flags,nargs,Long); int rc = GASNET_OK; // assume success va_list argptr; va_start(argptr, sd_arg); if (sd->_is_nbrhd) { gasnetc_nbrhd_CommitRequest(sd, gasneti_Long, handler, nbytes, dest_addr, argptr); } else { rc = gasnetc_commit_common(sd,gasneti_Long,0,handler,nbytes,dest_addr,nargs,commit_flags,argptr GASNETI_THREAD_PASS); } va_end(argptr); if (!rc) gasneti_reset_srcdesc(sd); return rc; } int gasnetc_AM_CancelRequestLong( gex_AM_SrcDesc_t sd_arg, gex_Flags_t flags) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_CANCEL_REQ(sd,flags,Long); if (sd->_is_nbrhd) { gasnetc_nbrhd_CancelRequest(sd, gasneti_Long, flags); } else { gasnetc_cancel_common(sd,0); } gasneti_reset_srcdesc(sd); return GASNET_OK; } #endif // GASNET_NATIVE_NP_ALLOC_REQ_LONG // ---- external FPAM replies ---- extern int gasnetc_AMReplyShortM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags, int numargs, ...) { gasneti_assert(token); GASNETI_COMMON_AMREPLYSHORT(token,handler,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyShort(token,handler,flags,numargs,argptr); va_end(argptr); return retval; } #if !GASNET_NATIVE_NP_ALLOC_REP_MEDIUM extern int gasnetc_AMReplyMediumV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { return gasnetc_AMReplyMedium(token,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr); } #endif extern int gasnetc_AMReplyMediumM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { gasneti_assert(token); GASNETI_COMMON_AMREPLYMEDIUM(token,handler,source_addr,nbytes,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyMedium(token,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr); va_end(argptr); return retval; } #if !GASNET_NATIVE_NP_ALLOC_REP_LONG extern int gasnetc_AMReplyLongV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { return gasnetc_AMReplyLong(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr); } #endif extern int gasnetc_AMReplyLongM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { gasneti_assert(token); GASNETI_COMMON_AMREPLYLONG(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyLong(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr); va_end(argptr); return retval; } // ---- external NPAM replies ---- #if GASNET_NATIVE_NP_ALLOC_REP_MEDIUM extern gex_AM_SrcDesc_t gasnetc_AM_PrepareReplyMedium( gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { GASNETI_TRACE_PREP_REPLYMEDIUM(token,client_buf,least_payload,most_payload,flags,nargs); gasneti_AM_SrcDesc_t sd; flags &= ~(GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); if (gasnetc_token_in_nbrhd(token)) { sd = gasnetc_nbrhd_PrepareReply(gasneti_Medium, token, client_buf, least_payload, most_payload, NULL, lc_opt, flags, nargs); } else { gasnetc_rbuf_t *rbuf = (gasnetc_rbuf_t *)token; gasneti_assert(rbuf); gasneti_assert(rbuf->rbuf_handlerRunning); gasneti_assert(GASNETC_MSG_ISREQUEST(rbuf->rbuf_flags)); gasneti_assert(rbuf->rbuf_needReply); GASNET_POST_THREADINFO(rbuf->rbuf_threadinfo); sd = gasneti_init_reply_srcdesc(GASNETI_THREAD_PASS_ALONE); GASNETI_COMMON_PREP_REP(sd,token,client_buf,least_payload,most_payload,NULL,lc_opt,flags,nargs,Medium); if (gasnetc_prepare_common(sd, gasneti_Medium, 1, rbuf->cep, client_buf, least_payload, most_payload, lc_opt, flags, nargs GASNETI_THREAD_PASS)) { gasneti_reset_srcdesc(sd); sd = NULL; // GEX_AM_SRCDESC_NO_OP } else { gasneti_init_sd_poison(sd); sd->_is_nbrhd = 0; sd->_dest._reply._token = token; sd->_ep = rbuf->rr_ep; rbuf->rbuf_needReply = 0; } } GASNETI_TRACE_PREP_RETURN(REPLY_MEDIUM, sd); GASNETI_CHECK_SD(client_buf, least_payload, most_payload, sd); return gasneti_export_srcdesc(sd); } extern int gasnetc_AM_CommitReplyMediumM( gex_AM_Index_t handler, size_t nbytes, gex_Flags_t commit_flags, unsigned int nargs, gex_AM_SrcDesc_t sd_arg, ...) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_COMMIT_REP(sd,handler,nbytes,NULL,commit_flags,nargs,Medium); int rc = GASNET_OK; // assume success va_list argptr; va_start(argptr, sd_arg); if (sd->_is_nbrhd) { gasnetc_nbrhd_CommitReply(sd, gasneti_Medium, handler, nbytes, NULL, argptr); } else { GASNET_POST_THREADINFO(sd->_thread); rc = gasnetc_commit_common(sd,gasneti_Medium,1,handler,nbytes,NULL,nargs,commit_flags,argptr GASNETI_THREAD_PASS); } va_end(argptr); if (!rc) gasneti_reset_srcdesc(sd); return rc; } int gasnetc_AM_CancelReplyMedium( gex_AM_SrcDesc_t sd_arg, gex_Flags_t flags) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_CANCEL_REP(sd,flags,Medium); if (sd->_is_nbrhd) { gasnetc_nbrhd_CancelReply(sd, gasneti_Medium, flags); } else { gasnetc_cancel_common(sd,1); } gasneti_reset_srcdesc(sd); return GASNET_OK; } #endif // GASNET_NATIVE_NP_ALLOC_REP_MEDIUM #if GASNET_NATIVE_NP_ALLOC_REP_LONG extern gex_AM_SrcDesc_t gasnetc_AM_PrepareReplyLong( gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { GASNETI_TRACE_PREP_REPLYLONG(token,client_buf,least_payload,most_payload,dest_addr,flags,nargs); gasneti_AM_SrcDesc_t sd; flags &= ~(GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); if (gasnetc_token_in_nbrhd(token)) { sd = gasnetc_nbrhd_PrepareReply(gasneti_Long, token, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs); } else { gasnetc_rbuf_t *rbuf = (gasnetc_rbuf_t *)token; gasneti_assert(rbuf); gasneti_assert(rbuf->rbuf_handlerRunning); gasneti_assert(GASNETC_MSG_ISREQUEST(rbuf->rbuf_flags)); gasneti_assert(rbuf->rbuf_needReply); GASNET_POST_THREADINFO(rbuf->rbuf_threadinfo); sd = gasneti_init_reply_srcdesc(GASNETI_THREAD_PASS_ALONE); GASNETI_COMMON_PREP_REP(sd,token,client_buf,least_payload,most_payload,dest_addr,lc_opt,flags,nargs,Long); if (gasnetc_prepare_common(sd, gasneti_Long, 1, rbuf->cep, client_buf, least_payload, most_payload, lc_opt, flags, nargs GASNETI_THREAD_PASS)) { gasneti_reset_srcdesc(sd); sd = NULL; // GEX_AM_SRCDESC_NO_OP } else { gasneti_init_sd_poison(sd); sd->_is_nbrhd = 0; sd->_dest._reply._token = token; sd->_ep = rbuf->rr_ep; rbuf->rbuf_needReply = 0; } } GASNETI_TRACE_PREP_RETURN(REPLY_LONG, sd); GASNETI_CHECK_SD(client_buf, least_payload, most_payload, sd); return gasneti_export_srcdesc(sd); } extern int gasnetc_AM_CommitReplyLongM( gex_AM_Index_t handler, size_t nbytes, void *dest_addr, gex_Flags_t commit_flags, unsigned int nargs, gex_AM_SrcDesc_t sd_arg, ...) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_COMMIT_REP(sd,handler,nbytes,dest_addr,commit_flags,nargs,Long); int rc = GASNET_OK; // assume success va_list argptr; va_start(argptr, sd_arg); if (sd->_is_nbrhd) { gasnetc_nbrhd_CommitReply(sd, gasneti_Long, handler, nbytes, dest_addr, argptr); } else { GASNET_POST_THREADINFO(sd->_thread); rc = gasnetc_commit_common(sd,gasneti_Long,1,handler,nbytes,dest_addr,nargs,commit_flags,argptr GASNETI_THREAD_PASS); } va_end(argptr); if (!rc) gasneti_reset_srcdesc(sd); return rc; } int gasnetc_AM_CancelReplyLong( gex_AM_SrcDesc_t sd_arg, gex_Flags_t flags) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_CANCEL_REP(sd,flags,Long); if (sd->_is_nbrhd) { gasnetc_nbrhd_CancelReply(sd, gasneti_Long, flags); } else { gasnetc_cancel_common(sd,1); } gasneti_reset_srcdesc(sd); return GASNET_OK; } #endif // GASNET_NATIVE_NP_ALLOC_REP_LONG /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ #if !GASNETC_NULL_HSL extern void gasnetc_hsl_init (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); gasneti_mutex_init(&(hsl->lock)); } extern void gasnetc_hsl_destroy(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); gasneti_mutex_destroy(&(hsl->lock)); } extern void gasnetc_hsl_lock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); { #if GASNETI_STATS_OR_TRACE gasneti_tick_t startlock = GASNETI_TICKS_NOW_IFENABLED(L); #endif #if GASNETC_HSL_SPINLOCK if_pf (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { if (gasneti_wait_mode == GASNET_WAIT_SPIN) { while (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { gasneti_spinloop_hint(); } } else { gasneti_mutex_lock(&(hsl->lock)); } } #else gasneti_mutex_lock(&(hsl->lock)); #endif #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); GASNETI_TRACE_EVENT_TIME(L, HSL_LOCK, hsl->acquiretime-startlock); #endif } } extern void gasnetc_hsl_unlock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); GASNETI_TRACE_EVENT_TIME(L, HSL_UNLOCK, GASNETI_TICKS_NOW_IFENABLED(L)-hsl->acquiretime); gasneti_mutex_unlock(&(hsl->lock)); } extern int gasnetc_hsl_trylock(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); { int locked = (gasneti_mutex_trylock(&(hsl->lock)) == 0); GASNETI_TRACE_EVENT_VAL(L, HSL_TRYLOCK, locked); if (locked) { #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); #endif } return locked ? GASNET_OK : GASNET_ERR_NOT_READY; } } #endif /* ------------------------------------------------------------------------------------ */ /* Private Handlers: ================ see mpi-conduit and extended-ref for examples on how to declare AM handlers here (for internal conduit use in bootstrapping, job management, etc.) */ static gex_AM_Entry_t const gasnetc_handlers[] = { GASNETC_COMMON_HANDLERS(), /* ptr-width independent handlers */ gasneti_handler_tableentry_no_bits(gasnetc_exit_reduce_reqh,2,REQUEST,SHORT,0), gasneti_handler_tableentry_no_bits(gasnetc_exit_role_reqh,0,REQUEST,SHORT,0), gasneti_handler_tableentry_no_bits(gasnetc_exit_role_reph,1,REPLY,SHORT,0), gasneti_handler_tableentry_no_bits(gasnetc_exit_reqh,1,REQUEST,SHORT,0), gasneti_handler_tableentry_no_bits(gasnetc_exit_reph,0,REPLY,SHORT,0), #if GASNETC_IBV_SHUTDOWN gasneti_handler_tableentry_no_bits(gasnetc_sys_flush_reph,1,REPLY,SHORT,0), gasneti_handler_tableentry_no_bits(gasnetc_sys_close_reqh,0,REQUEST,SHORT,0), #endif /* ptr-width dependent handlers */ // NONE currently GASNETI_HANDLER_EOT }; gex_AM_Entry_t const *gasnetc_get_handlertable(void) { return gasnetc_handlers; } /* ------------------------------------------------------------------------------------ */ /* Pthread_create wrapper: ====================== On Darwin we see that if the stacks of pthreads become dynamically pinned, then bad things are happening when they are later unmapped. To deal with this we are wrapping pthread_create() to provide our own stacks, which will not be unmapped automatically, and additionally we are passing the flag FIREHOSE_INIT_FLAG_UNPIN_ON_FINI to unpin all memory before it gets unmapped. XXX: Eventually we should be able to firehose_local_invalidate() the stacks we create and unmap them rather than leaking them as we do now. */ #if defined(GASNETC_PTHREAD_CREATE_OVERRIDE) /* Configuration */ #if PLATFORM_OS_DARWIN #include /* For mprotect */ #define GASNETC_DEFAULT_PTHREAD_STACKSZ (512*1024) #define GASNETC_PTHREAD_STACK_DIR (-1) #else #error "Override of pthread_create() attempted on unsupported platform" #endif struct gasnetc_pthread_args { void *real_arg; void *(*real_fn)(void *); void *stackaddr; /* exclusive of guard pages */ size_t stacksize; /* exclusive of guard pages */ struct gasnetc_pthread_args *next; /* once stacks are unused */ }; static struct { gasneti_mutex_t lock; struct gasnetc_pthread_args *list; } gasnetc_pthread_dead_stacks = {GASNETI_MUTEX_INITIALIZER, NULL}; static void gasnetc_pthread_cleanup_fn(void *arg) { /* Here we form a linked list of the "dead" stacks. * However, we can't reuse them until the threads are join()ed since * the threads are STILL RUNNING (this very function) when linked in. * XXX: Resolve this by overriding pthread_join() and linking there? */ struct gasnetc_pthread_args *args = arg; gasneti_mutex_lock(&gasnetc_pthread_dead_stacks.lock); args->next = gasnetc_pthread_dead_stacks.list; gasnetc_pthread_dead_stacks.list = args; gasneti_mutex_unlock(&gasnetc_pthread_dead_stacks.lock); } static void *gasnetc_pthread_start_fn(void *arg) { struct gasnetc_pthread_args *args = arg; void *retval = NULL; pthread_cleanup_push(&gasnetc_pthread_cleanup_fn, arg); retval = (*args->real_fn)(args->real_arg); pthread_cleanup_pop(1); return retval; } extern int gasnetc_pthread_create(gasneti_pthread_create_fn_t *create_fn, pthread_t *thread, const pthread_attr_t *attr, void * (*fn)(void *), void * arg) { pthread_attr_t my_attr = *attr; /* Copy it to maintain 'const' */ struct gasnetc_pthread_args *args; size_t stacksize; void *stackaddr; /* Get caller's stack size and address */ gasneti_assert_zeroret(pthread_attr_getstackaddr(&my_attr, &stackaddr)); gasneti_assert_zeroret(pthread_attr_getstacksize(&my_attr, &stacksize)); /* Use system's default stacksize if caller passed zero */ if (!stacksize) { #ifdef GASNETC_DEFAULT_PTHREAD_STACKSZ stacksize = GASNETC_DEFAULT_PTHREAD_STACKSZ; #else pthread_attr_t tmp_attr; pthread_attr_init(&tmp_attr); pthread_attr_getstacksize(&tmp_attr, &stacksize); pthread_attr_destroy(&tmp_attr); if (!stacksize) { gasneti_fatalerror("Failed to determine stack size in gasnetc_pthread_create()"); } #endif } if (stackaddr) { /* XXX: should we just assume they know what they are doing? */ gasneti_fatalerror("gasnetc_pthread_create() does not support caller provided stack address"); } else { /* Allocate memory w/ room for guard pages at both ends. * Note that these are not just for debugging/protection. * They also ensure no coalescing with adjacent pinned regions. * XXX: Coalescing doesn't matter yet, since we aren't doing * a firehose_local_invalidate() on them (we leak them instead). */ stackaddr = gasnetc_mmap(stacksize + 2 * GASNET_PAGESIZE); gasneti_assert_zeroret(mprotect(stackaddr, GASNET_PAGESIZE, PROT_NONE)); gasneti_assert_zeroret(mprotect((void *)((uintptr_t)stackaddr + stacksize + GASNET_PAGESIZE), GASNET_PAGESIZE, PROT_NONE)); #if (GASNETC_PTHREAD_STACK_DIR < 0) /* stack grows down */ stackaddr = (void *)((uintptr_t)stackaddr + stacksize + GASNET_PAGESIZE); #elif (GASNETC_PTHREAD_STACK_DIR > 0) /* stack grows up */ stackaddr = (void *)((uintptr_t)stackaddr + GASNET_PAGESIZE); #else #error "Don't know which way stacks grow" #endif } /* Set stack size/addr */ gasneti_assert_zeroret(pthread_attr_setstackaddr(&my_attr, stackaddr)); gasneti_assert_zeroret(pthread_attr_setstacksize(&my_attr, stacksize)); /* Build args structure (leaked by design) */; args = gasneti_malloc(sizeof(*args)); args->real_fn = fn; args->real_arg = arg; args->stackaddr = stackaddr; args->stacksize = stacksize; args->next = NULL; return (*create_fn)(thread, &my_attr, &gasnetc_pthread_start_fn, args); } #endif /* defined(GASNETC_PTHREAD_CREATE_OVERRIDE) */ /* ------------------------------------------------------------------------------------ */ /* If operating w/o mmap() we need access to a non-wraped free() */ #if !HAVE_MMAP #undef free extern int gasnetc_munmap(void *addr, size_t size) { free(addr); return 0; } #endif /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/ibv-conduit/contrib/0000775000175000017500000000000015142313673017305 5ustar alastairalastairgasnet-2025.8.0/ibv-conduit/contrib/gasnetrun_ibv.in0000664000175000017500000000110215142313673022475 0ustar alastairalastair#!@BOURNE_SHELL@ GASNET_IBV_SPAWNER="${GASNET_IBV_SPAWNER:-@GASNET_IBV_SPAWNER_CONF@}" export GASNET_IBV_SPAWNER GASNET_SPAWN_CONDUIT=IBV export GASNET_SPAWN_CONDUIT @MPIRUN_COMMON@ @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_SPAWN_HAVE_MPI=1 @HAVE_BOOTSTRAP_MPI_FALSE@GASNET_SPAWN_HAVE_MPI=0 export GASNET_SPAWN_HAVE_MPI @HAVE_BOOTSTRAP_PMI_TRUE@GASNET_SPAWN_HAVE_PMI=1 @HAVE_BOOTSTRAP_PMI_FALSE@GASNET_SPAWN_HAVE_PMI=0 export GASNET_SPAWN_HAVE_PMI @HAVE_BOOTSTRAP_SSH_TRUE@GASNET_SPAWN_HAVE_SSH=1 @HAVE_BOOTSTRAP_SSH_FALSE@GASNET_SPAWN_HAVE_SSH=0 export GASNET_SPAWN_HAVE_SSH @PERLSTART@ gasnet-2025.8.0/ibv-conduit/contrib/Makefile.am0000664000175000017500000000315015142313673021340 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/contrib/Makefile.am $ # Description: Makefile for GASNet IBV spawner # Terms of use are as specified in ibv-conduit/license.txt AUTOMAKE_OPTIONS = foreign 1.4 # Use of the MPI/PMI spawning support is optional if HAVE_BOOTSTRAP_MPI mpi_target_pl = gasnetrun_ibv-mpi.pl $(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl cp -f "$?" $@ else if HAVE_BOOTSTRAP_PMI mpi_target_pl = gasnetrun_ibv-mpi.pl $(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl cp -f "$?" $@ else mpi_target_pl = endif endif target = gasnetrun_ibv target_pl = $(target).pl # Need a bin_DATA rule, but automake disallows that. So, fake it. dotpldir = $(bindir) # Make sure the perl script and shell wrapper are always current locally. # This ensures we can run from the build directory if needed. $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart $(top_builddir)/other/mpirun_common: $(top_srcdir)/other/mpirun_common.in @cd $(top_builddir)/other && $(MAKE) mpirun_common $(target): $(top_builddir)/other/perlstart $(top_builddir)/other/mpirun_common all-local: $(target_pl) $(target) $(mpi_target_pl) $(target_pl): $(top_srcdir)/other/spawner/gasnetrun.pl cp -f "$<" $@ DISTCLEANFILES = $(target) $(target_pl) $(mpi_target_pl) # Conditionally install the .pl and its wrapper if USE_IBV_CONDUIT scripts = $(target) data = $(target_pl) $(mpi_target_pl) else scripts = data = endif bin_SCRIPTS = $(scripts) dotpl_DATA = $(data) gasnet-2025.8.0/ibv-conduit/contrib/Makefile.in0000664000175000017500000005366215142313673021366 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/contrib/Makefile.am $ # Description: Makefile for GASNet IBV spawner # Terms of use are as specified in ibv-conduit/license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = ibv-conduit/contrib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = gasnetrun_ibv CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dotpl_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gasnetrun_ibv.in \ $(top_srcdir)/config-aux/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = gasnetrun_ibv target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_FALSE@mpi_target_pl = @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@mpi_target_pl = gasnetrun_ibv-mpi.pl # Use of the MPI/PMI spawning support is optional @HAVE_BOOTSTRAP_MPI_TRUE@mpi_target_pl = gasnetrun_ibv-mpi.pl target_pl = $(target).pl # Need a bin_DATA rule, but automake disallows that. So, fake it. dotpldir = $(bindir) DISTCLEANFILES = $(target) $(target_pl) $(mpi_target_pl) @USE_IBV_CONDUIT_FALSE@scripts = # Conditionally install the .pl and its wrapper @USE_IBV_CONDUIT_TRUE@scripts = $(target) @USE_IBV_CONDUIT_FALSE@data = @USE_IBV_CONDUIT_TRUE@data = $(target_pl) $(mpi_target_pl) bin_SCRIPTS = $(scripts) dotpl_DATA = $(data) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ibv-conduit/contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign ibv-conduit/contrib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gasnetrun_ibv: $(top_builddir)/config.status $(srcdir)/gasnetrun_ibv.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) install-dotplDATA: $(dotpl_DATA) @$(NORMAL_INSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dotpldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dotpldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dotpldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dotpldir)" || exit $$?; \ done uninstall-dotplDATA: @$(NORMAL_UNINSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(dotpldir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) all-local installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dotplDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-dotplDATA .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ cscopelist-am ctags-am distclean distclean-generic distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am \ install-dotplDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-dotplDATA .PRECIOUS: Makefile @HAVE_BOOTSTRAP_MPI_TRUE@$(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl @HAVE_BOOTSTRAP_MPI_TRUE@ cp -f "$?" $@ @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@$(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@ cp -f "$?" $@ # Make sure the perl script and shell wrapper are always current locally. # This ensures we can run from the build directory if needed. $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart $(top_builddir)/other/mpirun_common: $(top_srcdir)/other/mpirun_common.in @cd $(top_builddir)/other && $(MAKE) mpirun_common $(target): $(top_builddir)/other/perlstart $(top_builddir)/other/mpirun_common all-local: $(target_pl) $(target) $(mpi_target_pl) $(target_pl): $(top_srcdir)/other/spawner/gasnetrun.pl cp -f "$<" $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/ibv-conduit/README0000664000175000017500000033347615142313673016545 0ustar alastairalastairREADME file for ibv-conduit =========================== Paul H. Hargrove @ TOC: @ @ Section: Overview @ @ Section: Where this conduit runs @ @ Section: Terminology @ @ Section: Build-time Configuration @ @ Section: Job Spawning @ @ Section: Runtime Configuration @ @ Section: Multi-rail Support @ @ Section: On-Demand Paging (ODP) Support @ @ Section: HCA Configuration @ @ Section: Remote Atomics @ @ Section: Advice to Client Authors @ @ Section: Known Problems @ @ Section: Core API @ @ Section: Extended API @ @ Section: Progress Threads Support @ @ Section: GEX_FLAG_IMMEDIATE Support @ @ Section: Graceful exits @ @ Section: References @ @ Section: Overview @ ibv-conduit implements GASNet over InfiniBand networks using the Open Fabrics Verbs API (www.openfabrics.org). The name "ibv" comes from a time when this API was known as "InfiniBand Verbs" (its library is still named libibverbs). @ Section: Where this conduit runs @ ibv-conduit runs over networks using the Open Fabrics Verbs API, such as InfiniBand. Platforms known to support this API include Linux, Solaris, AIX, Windows and FreeBSD. However, at this time only Linux and Solaris have been confirmed to run GASNet's ibv-conduit. While Open Fabrics Verbs also covers iWARP and RoCE, ibv-conduit does not currently support these networks. Users interested in contributing the necessary support (primarily use of "rdmacm" for connection setup) are encouraged to contact gasnet-devel@lbl.gov. Nearly all InfiniBand cards (known as Host Channel Adapters, or HCAs) have support for Open Fabrics Verbs, available from www.openfabrics.org or from the HCA or OS vendor. We have tested numerous InfiniBand HCAs from NVIDIA (formerly Mellanox). HCAs from other vendors have not been tested or have failed validation. While ibv-conduit may work on Omni-Path (OPA) HCAs from Intel or Cornelis Networks, we currently recommend use of ofi-conduit with the psm2 provider on such systems. While ibv-conduit may work on InfiniPath HCAs from PathScale/QLogic and True Scale HCAs from Intel, we instead recommend use of mpi-conduit on such systems. The performance of ibv-conduit relative to others on the same hardware will depend on your applications' communications patterns, the number of nodes you run on, and other parameters. Therefore, we do not make any specific recommendation as to which to use. We recommend that you benchmark your own workload if you are concerned with the very best possible performance. While ibv-conduit runs on Solaris, the libibverbs on Solaris is not compatible with GASNet's implementation of PSHM over POSIX shared memory. This is not normally of concern, because on Solaris GASNet defaults to an implementation of PSHM over SystemV shared memory. However, if one configures GASNet to use PSHM-over-POSIX on Solaris, then be advised that ibv-conduit will lack PSHM support and thus perform all communication within a compute node via the InfiniBand HCA instead of shared memory. @ Section: Terminology @ This document will use "NIC" (short for Network Interface Card) to refer to the physical object installed in a host and "connector" to refer to the external connections from the NIC to a network. The term "HCA" (short for Host Channel Adapter) will be used to refer to a device as enumerated by `ibv_get_device_list()` or the command-line utility `ibv_devices`. The HCA is the device driver's logical representation of the NIC, but there is not always a one-to-one correspondence, as described next. When a NIC has multiple connectors, the driver may present these either as a single HCA with multiple "ports" or as multiple single-port HCAs. Additionally, some systems will present more than one HCA per connector. This is typically done on systems where the NIC is connected to multiple I/O buses. On a compute node of the Summit system at OLCF, there are two external network cable connectors on a single NIC which is connected internally to two I/O buses. The driver presents four HCAs, one for each combination of external connector and internal I/O bus. So, for a single NIC with two connectors there are at least three ways the system may present the same resources: with 1, 2 or 4 HCAs. See the end of the description of the `GASNET_IBV_PORTS` environment variable for information on multiple ways to get a listing of HCAs and ports which ibv-conduit detects as available. The term "rail" is used in place of "HCA" in some contexts, but has the same meaning. In particular, one must enable multi-rail support in ibv-conduit if one is to use multiple HCAs (as defined above) in a given process. However, one can use multiple ports of a single multi-port HCA without enabling multi-rail. @ Section: Build-time Configuration @ Ibv-conduit can ensure good network attentiveness (timely processing of incoming AMs) by spawning an extra thread that remains blocked until the arrival of an Active Message. One can disable this thread by configuring GASNet with the flag '--disable-ibv-rcv-thread'. It is recommended that one NOT use this option, but instead disable the thread at runtime (see Runtime Configuration section). See also documentation on 'GASNET_RCV_THREAD*' environment variables. Ibv-conduit can provide optional asynchronous processing of RMA operation completions on initiators by spawning an extra thread that remains blocked pending completion of outstanding RMA ops. One can disable this thread by configuring GASNet with the flag '--disable-ibv-snd-thread'. It is recommended that one NOT use this option, but instead disable the thread at runtime (see Runtime Configuration section). See also documentation on 'GASNET_SND_THREAD*' environment variables. In a SEQ build of ibv-conduit, enabling either or both the receive or send progress thread introduces some overheads for thread serialization. If neither of the extra thread will be needed, one may disable *both* at build time to yield a small reduction in latencies by allowing these thread serialization operations to compile away in a SEQ build. By default, each ibv-conduit process in a GASNet job will open at most one Host Channel Adapter (HCA). To allow a process to utilize more than one HCA, specify '--with-ibv-max-hcas=N' at configure time (where 'N' is the number of HCAs to support per process). Alternatively, specifying '--enable-ibv-multirail' is equivalent to '--with-ibv-max-hcas=2' unless an explicit '--with-ibv-max-hcas=N' option provides a different value. Passing '--disable-ibv-multirail' overrides any explicit '--with-ibv-max-hcas=N' options. Note that multirail support includes provisions for correctness which can be relevant if using mutiple HCAs per *host*, even if using only a single HCA in each process. So, '--with-ibv-max-hcas=1' is distinct from '--disable-ibv-multirail'. Enabling multirail support (using '--with-ibv-max-hcas=1' if appropriate) is strongly recommended if one might ever use multiple HCAs per host. See 'GASNET_USE_FENCED_PUTS' in the Runtime Configuration section and "Bug 3447" in the Known Problems section for more information regarding the correctness issues. The use of specific HCA ports is controlled at run time by the environment variable GASNET_IBV_PORTS, described below. The default value of this variable can be set at configure time using '--with-ibv-ports=...'. Closely connected to selection of HCA ports is the setting of the environment variable GASNET_USE_FENCED_PUTS, also described below. Its default value can be set using '--with-ibv-fenced-puts=val' where 'val' is either '0' or '1'. Alternatively, '--with-ibv-fenced-puts' (with no argument) and '--without-ibv-fenced-puts' can be used to select defaults of 1 and 0, respectively. When using dynamic connections (see GASNET_CONNECT_DYNAMIC env var, below) there is an extra thread spawned to block for the arrival of connection requests. If needed, this can be disabled at configure time using '--disable-ibv-conn-thread'. By default, ibv-conduit uses 64KB buffers for AM Mediums, to yield gex_AM_LUB{Request,Reply}Medium() values tens of bytes smaller due to message headers. This default can be overridden by passing '--with-ibv-max-medium=N' for 'N' equal to any power-of-two from 1024 to 262144, inclusive. The default spawner to be used by the gasnetrun_ibv utility can be selected by configuring '--with-ibv-spawner=VALUE', where VALUE is one of 'mpi', 'pmi' or 'ssh'. If this option is not used, mpi is the default when available, and ssh otherwise. Here are some things to consider when selecting a default spawner: + The choice of spawner only affects the protocol used for parallel job setup and teardown; in particular it is NOT used to implement any part of the steady-state GASNet communication operations. As such, the selected protocol needs to be stable and co-exist with GASNet communication, but its performance efficiency is usually not a practical consideration. + mpi-spawner is the default when MPI is available precisely because it is so frequently present on systems where GASNet is to be installed. Additionally, very little (if any) configuration is required and the behavior is highly reliable. + pmi-spawner uses the same "Process Management Interface" which forms the basis for many mpirun implementations. When support is available, this spawner can be as easy to use and as reliable as mpi-spawner, but without the overheads of initializing an MPI runtime. + ssh-spawner depends only on the availability of a remote shell command such as ssh. For this reason ssh-spawner support is always compiled. However, it can be difficult (or impossible) to use on a cluster which was not setup to allow ssh to (and among) its compute nodes. For more information on configuration and use of these spawners, see README-{ssh,mpi,pmi}-spawner (installed) or other/{ssh,mpi,pmi}-spawner/README (source). By default, ibv-conduit serializes calls to `ibv_poll_cq()` in a manner which reduces time spent blocked on the mutex internal to its implementation. One can configure using `--disable-ibv-serialize-poll-cq` to disable this behavior. For more information, see the `GASNET_RCV_THREAD_POLL_MODE` environment variable documentation, below. @ Section: Job Spawning @ If using UPC++, Chapel, etc. the language-specific commands should be used to launch applications. Otherwise, applications can be launched using the gasnetrun_ibv utility: + usage summary: gasnetrun_ibv -n [options] [--] prog [program args] options: -n number of processes to run (required) -N number of nodes to run on (not always supported) -c number of cpus per process (not always supported) -E list of environment vars to propagate -v be verbose about what is happening -t test only, don't execute anything (implies -v) -k keep any temporary files created (implies -v) -spawner= force use of a specific spawner ([supported spawners]) -- ends option parsing There are as many as three possible methods (ssh, mpi and pmi) by which one can launch an ibv-conduit application. Ssh-based spawning is always available, and mpi- and pmi-based spawning are available if the respective support was located at configure time. The default is established at configure time (see section "Build-time Configuration"). To select a non-default spawner one may either use the "-spawner=" command- line argument or set the environment variable GASNET_IBV_SPAWNER to "ssh", "mpi" or "pmi". If both are used, then the command line argument takes precedence. It has been noted that some InfiniBand driver implementations may not allow for multiple open()s of the adapter. In this case, spawning via MPI is not possible because the MPI and GASNet implementations cannot share the adapter. If your GASNet jobs fail to spawn via MPI, but spawn correctly with ssh or pmi, then this may be the reason. If you need mpi-based spawning, our recommendation is to attempt to set the MPIRUN_CMD such that your MPI will not use InfiniBand (see mpi-spawner's README). If that is not possible, you may need to select a different MPI implementation. @ Section: Runtime Configuration @ There are a number of parameters in ibv-conduit which can be tuned at runtime via environment variables. General settings: ---------------- Ibv-conduit supports all of the standard GASNet environment variables and the optional GASNET_EXITTIMEOUT and GASNET_THREAD_STACK families of environment variables. See GASNet's top-level README for documentation. Spawner settings: ---------------- + GASNET_IBV_SPAWNER To override the default spawner for ibv-conduit jobs, one may set this environment variable as described in the section "Job Spawning", above. There are additional settings which control behaviors of the various spawners, as described in the respective READMEs (listed in section "Build-time Configuration", above). Connection settings: ------------------- Under normal conditions, Host Channel Adapters and Ports will be located and configured automatically. However, in the event you have multiple adapters or multiple active ports on a single adapter, you may wish to set environment variables to identify the correct HCAs and Ports. Or, you may wish to use non-default values for configuring connections. These parameters are permitted to take different values on each process. However, please see bug 4314 if process-specific values are needed. https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4314 See "Build-time Configuration", above, for information on enabling use of multiple HCAs in GASNet ibv-conduit. + GASNET_HCA_ID + GASNET_PORT_NUM ** UNSUPPORTED ** These environment variables, used in older releases, are no longer supported. Setting them to anything but the empty string will result in a run-time warning. + GASNET_NUM_QPS This variable gives the number of IB Queue Pairs (QPs) over which to stripe traffic between each pair of peers. This can yield an increase in throughput and bandwidth when multiple physical ports are used on one or more adapters. If the number of QPs exceeds the number of available physical ports then multiple QPs will be mapped round-robin to the ports. Be aware that mapping multiple QPs per port may yield either a performance improvement or a degradation, depending on traffic pattern. The default is 0, which means one QP per HCA/port used. + GASNET_IBV_PORTS By default, GASNet will open and use one active IB port on each HCA used, which will be all HCAs (when GASNET_NUM_QPS is zero), or the first GASNET_NUM_QPS HCAs found (when GASNET_NUM_QPS is non-zero). Setting GASNET_IBV_PORTS will specify a filter for which ports will be used. This can be used for instance to cause multiple physical ports to be used per HCA, or to specify specific ports and/or HCAs to be considered (up to GASNET_NUM_QPS if it is non-zero). This variable is a string of one or more HCA/port specifications, separated by '+' characters. Each such specification gives an HCA identifier and an optional comma-separated list of port numbers. The list of port numbers, if provided, is separated from the HCA id by a ':'. If a list of ports is given, only those ports may be used. Otherwise the first active port on the given HCA may be used. The following example allows the first active port on HCA mlx5_0, and only port 2 on mlx5_1: GASNET_IBV_PORTS="mlx5_0+mlx5_1:2". Note that this list is a *filter*, which means: + Duplicate entries do not cause multiple opens of a port or HCA + Entries describing non-existent HCAs are silently ignored + Entries describing inactive ports are silently ignored + Order is not significant. In particular if GASNET_NUM_QPS is less than the number of entries in GASNET_IBV_PORTS, ports are opened in the order detected, regardless of their order in GASNET_IBV_PORTS See 'GASNET_IBV_LIST_PORTS' and 'GASNET_IBV_LIST_PORTS_NODES' for how to enumerate available HCAs and the status of their ports. In most IBV distributions the 'ibv_devinfo' utility is also available to list the HCAs and the status of their ports. The default can be set at configure time using '--with-ibv-ports=...', and is empty (no filter) in the absence of that configure option. See also 'GASNET_IBV_PORTS_*', immediately below. + GASNET_IBV_PORTS_* The environment variable 'GASNET_IBV_PORTS', described immediately above, provides only a single setting and unless one uses some external means to give per-process settings, this cannot provide per-process control. This can make it difficult to get the best performance from multi-rail systems with multiple processes per node and architectural locality properties that affect PCI/adapter access efficiency. See "topology-aware environment variable families" in GASNet's top-level README for a description of how 'GASNET_IBV_PORTS_TYPE' can be used to establish process-specific values for 'GASNET_IBV_PORTS'. As a concrete example, on OLCF's Summit there are four HCAs in software, which represent connections from two I/O buses (one per socket) to two distinct InfiniBand rails. Use of the further I/O bus introduces a latency penalty, but achieving peak aggregate bandwidth requires the job to split traffic over both I/O buses and both rails. For most applications, we have observed the best latency and aggregate per- node bandwidth is achieved using a single HCA connected to the local socket's I/O bus. For an unbound process (or one bound to cores in both sockets) the performance suffers relative to the bound case, but the best average-case is achieved using two HCAs chosen to span both buses and both network rails. This yields the following recommendation as a good default for most applications running on this system: GASNET_IBV_PORTS='mlx5_0+mlx5_3' # Spanning both sockets (e.g. unbound) GASNET_IBV_PORTS_0='mlx5_0' # Bound to socket0 GASNET_IBV_PORTS_1='mlx5_3' # Bound to socket1 For an application which needs to maximize bandwidth of communication to/from processes in a single socket at a time, one must allow process to make use of both I/O buses and network rails (at the cost of increased latency and potentially reduced aggregate per-node bandwidth). This can be accomplished using two HCAs per processes as follows: GASNET_IBV_PORTS='mlx5_0+mlx5_3' GASNET_IBV_PORTS_1='mlx5_1+mlx5_2' This example illustrates the use of un-suffixed 'GASNET_IBV_PORTS' as a default when lacking a more specific setting. In particular, unbound processes and those bound to socket 0 will both use 'mlx5_0+mlx5_3' while processes bound to socket 1 will use 'mlx5_1+mlx5_2'. These specific recommendations are appropriate to the specific composition of a node of OLCF's Summit, and should not be considered as generic advice for use of all multi-HCA systems. Of course, even on the same system, your mileage may vary. There is currently limited support for GASNET_IBV_PORTS_TYPE == "auto", in which each process will be assigned exactly one HCA. This assignment will be based on the HCAs available after filtering by 'GASNET_IBV_PORTS', but currently ignoring computed-name variables, such as 'GASNET_IBV_PORTS_0'. Subject to that filtering (if any) assignments will be made to an HCA "nearest" to a given process based on hwloc's metrics. Such assignments will spread processes over eligible HCAs to minimize processes sharing any given HCA, subject to the other constraints. Additional details of the assignment algorithm are intentionally unspecified and subject to change. Details of ibv-conduit's "auto" behavior are subject to change in future releases, but efforts will be made to avoid incompatible changes. In particular, any characters after "auto" (case insensitive) are reserved for future enhancements, and are currently ignored. See "Bug 4769" in the Known Problems section for some important caveats. By default 'GASNET_IBV_PORTS_TYPE' is "Socket" and all other variables in this family are unset. + GASNET_IBV_PORTS_VERBOSE This integer setting controls the detail of any warnings printed when there are non-fatal issues related to the selection of HCAs and ports to be used. A value of 0 suppresses the warnings entirely. A value of 1 (the default) or higher will warn if one or more HCAs are excluded from consideration other than due to failure to match GASNET_IBV_PORTS (or the numerically suffixed variants). In particular, a warning is issued if more HCAs are detected than supported by '--with-ibv-max-hcas=N' (where N defaults to 2 when configured using `--enable-ibv-multirail`, and 1 otherwise). Values of 2 or higher request printing additional information. This setting defaults to 1. + GASNET_IBV_LIST_PORTS The value is a boolean: "0" to disable or "1" to enable the reporting of all detectable HCAs and the status of their ports. If libhwloc 2.0 or higher was detected at configure time, then this output includes a distance ranking for each HCA port for which the information can be found. A ranking of "1" denotes the topologically nearest HCAs (i.e. "first place"). If present, "2" will denote any HCA(s) less near than the "1" HCA(s) but nearer than any "3"s, etc. Note that ties are possible. See 'GASNET_IBV_LIST_PORTS_NODES' for how to limit which nodes report. The default is "0" (no report). + GASNET_IBV_LIST_PORTS_NODES If GASNET_IBV_LIST_PORTS is enabled, then this setting may be used to limit which nodes report HCAs/ports. The value is a list which may contain one or more integers or ranges separated by commas, such as "0,2-4,6". If unset, empty, or equal to "*" then all nodes will report (if enabled by GASNET_IBV_LIST_PORTS). The default is no limit on which nodes report. + GASNET_IBV_PKEY If set, this specifies the 15-bit InfiniBand Partition Key to use. Valid values are in the range 2 to 0x7fff. For compatibility, the membership bit (0x8000) is ignored. The default is to use the Partition Key installed at table index 0. + GASNET_QP_TIMEOUT This sets the timeout value used to configure InfiniBand QueuePairs. The IB specification uses (4.096us * 2^qp_timeout) as the length of time an HCA waits to receive and ACK from its peer before attempting retransmission. The default is currently 18 (roughly 1 second). + GASNET_QP_RETRY_COUNT This sets the maximum number of retransmissions due to ACK timeout before the HCA signals a fatal error. The default is currently 7 (the max supported by early Mellanox HCAs) + GASNET_QP_RD_ATOM This sets the number of per-connection resources allocated by the HCA for responding to RDMA Reads (and atomics, which GASNet does not use currently). Lower values use slightly less memory but may reduce the throughput of Get-intensive communications patterns. The default value is '0', which means to use the maximum supported value reported by the HCA. Other valid setting are typically in the range from 1 to 4. + GASNET_MAX_MTU This sets the maximum MTU to be used, and has the following valid values: -1, 0, 256, 512, 1024, 2048 or 4096. If the value is 0 GASNet will automatically select the MTU size. If the value is -1 GASNet will use the HCA port's active value. Otherwise the lesser of this setting or the port's active value will be used. The default is 0: automatic MTU selection. + GASNET_CONNECT_DYNAMIC This boolean setting determines if connections can be established on demand. The default value is TRUE. When GASNET_CONNECT_DYNAMIC is enabled, a node will connect on demand to any peer not previously connected at startup. However, if a node is fully connected to all peers at startup, then dynamic connections are automatically disabled on that node. Therefore, unless GASNET_CONNECT_STATIC or GASNET_CONNECTFILE_IN is set to a non-default value this variable has no effect. + GASNET_CONNECT_STATIC This setting determines if connections are established at startup. When GASNET_CONNECT_STATIC is enabled, a node will connect at startup to all peers indicated by the GASNET_CONNECTFILE_IN setting (see below), or to ALL peers if that variable is unset. The value is a boolean with a default of TRUE. + GASNET_CONNECTFILE_IN This setting provides a filename used to limit the connections established at startup, and is ignored if GASNET_CONNECT_STATIC is FALSE. Any '%' character in the value is replaced with the node number to allow (but not require) separate per-node files. The format of a connect file is a series of lines of the form: node: peer1 peer2 ... without leading whitespace. For example, to request that node 7 connect to nodes 0, 4 and 6: 7: 0 4 6 Line lengths are not limited, but the same node number may appear to the left of the colon on multiple lines to limit line lengths. So, the following is equivalent to the previous example: 7:0 4 7:6 Ranges are supported. So, the following connects node 6 with nodes 9, 10, 11 and 12: 6:9-12 Order is not significant (except in ranges), so neither lines nor peer numbers need to be sorted. Connections are bidirectional so the following: 1:0 0:1 describes only 1 connection between nodes 0 and 1 and only one of these two lines is required to establish it (though there is no error in specifying both). This is true regardless of whether using a single file or per-node files. An optional line size: N indicates the number of nodes in the job, and is validated against the size of the current job if present. An optional line base: N specifies a numeric base for interpretation of all node numbers on lines that follow. The default is 10 (decimal), and legal values range from 2 (binary) to 36 (uses digits '0'-'9' and 'a'-'z'). If present, the 'base' line only affects node numbers read from later lines, and therefore should appear at the start of the file. Values on the 'size' and 'base' lines are always read as decimal. The default is unset/empty (no limit on which nodes are connected at startup). + GASNET_CONNECTFILE_OUT This setting specifies a filename in which to generate connection information suitable for later use as GASNET_CONNECTFILE_IN. Any '%' character in the value is replaced with the node number to allow separate per-node files. Use of per-node files is strongly recommended, and on some file systems (notably NFS) is REQUIRED for correct operation. If desired, the separate files may be concatenated together after the run completes to produce a single file suitable for use as GASNET_CONNECTFILE_IN. Alternatively, the following perl one-liner will concatenate the files while removing all but the first instance of the 'base' and 'size' lines: perl -ne 'print unless (/(base|size)/ && $X{$_}++);' -- [FILES] where [FILES] denotes the list of per-node connection files and the combined file is generated on stdout. The connection information produced in the output file(s) lists only those connections actually used in the current run. Therefore a common use case is to set GASNET_CONNECTFILE_OUT on a fully-connected run, and then use the generated file(s) to limit static connections in subsequent runs. The default is to use base-36 for node numbers, which results in more compact files but is difficult for a human to read. See GASNET_CONNECTFILE_BASE, below, for how to change this. The default is unset/empty (no output files are generated). + GASNET_CONNECTFILE_BASE This setting controls the numeric base used for node numbers in GASNET_CONNECTFILE_OUT files. Valid values range from 2 (binary) to 36 (uses digits '0'-'9' and 'a'-'z'). The value of the setting is always parsed as base-10. The default value is 36. + GASNET_CONNECT_SNDS + GASNET_CONNECT_RCVS These two settings control the number of small buffers allocated to send and to receive dynamic connection requests, and are ignored if GASNET_CONNECT_DYNAMIC is FALSE, or on any node that is already fully connected at startup. Because the buffers are small and allocation is page granular there is seldom any benefit to reducing the default values. However, there are conditions under which increasing one or both may help reduce the latency of dynamic connections: + Dynamic connection setup is blocking at the initiator, but if using pthreads it is possible that one node may have dynamic connection requests in-progress to multiple nodes. So, if an application is highly-threaded it may be beneficial to increase GASNET_CONNECT_SNDS for greater concurrency of sends. + If a given node receives many simultaneous connection requests, any requests in excess of the allocated buffers will be dropped. The connection will be delayed until the requester retransmits. So, the average connection setup time in the presence of "bursty" requests may be reduced by increasing GASNET_CONNECT_RCVS. The default value of GASNET_CONNECT_SNDS is 4. The default value of GASNET_CONNECT_RCVS is MAX(6, 4 + 2*ceil(log_2(N_remote))) where "ceil()" denotes rounding up to an integer, "log_2()" is the base-2 logarithm and "N_remote" is the number of GASNet nodes minus "self" and any nodes reachable through shared memory (PSHM). + GASNET_CONNECT_RETRANS_MIN + GASNET_CONNECT_RETRANS_MAX These two settings control the minimum and maximum intervals between retransmission of messages used in establishing dynamic connections, and are ignored if GASNET_CONNECT_DYNAMIC is FALSE, or on any node that is already fully connected at startup. Values are in units of microseconds (10^-6 sec). The value of GASNET_CONNECT_RETRANS_MIN is the interval between sending an initial request and the first retransmission. Each retransmission doubles the interval before the next, up to the maximum value given by GASNET_CONNECT_RETRANS_MAX, after which the connection setup fails. Adjustment of these settings may help resolve timeouts on networks with high rates of UD packet loss. However, this is not recommended without consulting with the author and the defaults are therefore not documented here. Software configuration settings: ------------------------------- There are some optional behaviors in ibv-conduit that can be turned ON or OFF. These parameters are permitted to take different values on each process, though doing so may not be useful. However, please see bug 4314 if process-specifc values are needed. https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4314 + GASNET_RCV_THREAD This gives a boolean: "0" to disable, or "1" to enable, the use of an extra thread per-HCA to block waiting for an Active Message Request or Reply to arrive. This allows ibv-conduit to remain attentive to incoming AM traffic even while the application is not making any calls to GASNet. The down side is that when this thread wakes it must contend for CPU resources and for locks. Therefore, for an application that is calling GASNet sufficiently often, use of this thread may significantly INCREASE running time. However, on an SMP where an otherwise idle processor is available the use of this thread can REDUCE running time by relieving the application thread of the burden of servicing incoming AM Requests and Replies. Note that if '--disable-ibv-rcv-thread' was specified at build time then the extra thread is unavailable and any use of this environment variable to enable the thread will result in a warning, which can be suppressed by an end-user by setting GASNET_QUIET=1, or can be programmatically avoided in client code by conditioning a setenv() call on "#if GASNET_RCV_THREAD". Currently the default is disabled (0), but this is subject to change. NOTE: In releases prior to GASNet 1.18.2 the AM receive thread was unavailable for ibv-conduit, but that is no longer the case. + GASNET_RCV_THREAD_RATE If GASNET_RCV_THREAD is enabled, then this setting can be used to impose a limit on how frequently the AM receive thread may wake. This may be used to limit interference between the AM receive thread and the main application thread(s), while providing some network attentiveness when the application is not making GASNet calls. A non-zero value gives the desired maximum rate in wake-ups per second. However, see "Bug 4691" in the Known Problems section for information on when this limit may not be well enforced. The default value is 0, which means no limit is imposed. NOTE: A future release may implement GASNET_RCV_THREAD_LOAD to impose a limit on the *fraction* of time the thread spends awake. + GASNET_RCV_THREAD_IDLE If GASNET_RCV_THREAD is enabled, then this setting can be used to ensure that the AM receive thread will not sleep until some minimum time interval (in nanoseconds) has passed without processing any new events from the receive completion queue. If the value is zero (the default), then the thread will sleep as soon as a poll of the completion queue fails to return a new event. If this setting has a positive value, then the thread will continue attempting to poll the completion queue until at least the specified interval (in nanoseconds) has passed with no event arrivals on the completion queue. + GASNET_RCV_THREAD_POLL_MODE If GASNET_RCV_THREAD is enabled, then this setting determines if/how the AM receive thread participates in the serialization of calls to `ibv_poll_cq()`. This serialization can improve the throughput of clients with multiple threads (the AM receive thread included) by reducing the time spent blocked while polling. The following values (case-insensitive) are recognized: * 'serialized' - The AM receive thread will poll the completion queue for AM arrivals while participating in the same serialization protocol as client threads. (default) * 'unserialized' - The AM receive thread will poll the completion queue for AM arrivals without regard to the serialization protocol observed by client threads. * 'exclusive' - The AM receive thread will utilize the serialization protocol observed by client threads to become the only poller of the completion queue for AM arrivals. The default is "serialized". The value "exclusive" is the only option which directly affects the behavior of application threads. The others have only an indirect affect via the degree of contention they may experience due to the receive thread. If the AM receive thread is disabled (via `'--disable-ibv-rcv-thread` at configure time or via the `GASNET_RCV_THREAD` environment variable), then this setting is ignored. In particular, setting `GASNET_RCV_THREAD=0` and `GASNET_RCV_THREAD_POLL_MODE=exclusive` does not prevent application threads from polling the completion queue for AM arrivals. If serialization of calls to `ibv_poll_cq()` was disabled at configure time via `--disable-ibv-serialize-poll-cq`, then this setting is ignored and the behavior is equivalent to "unserialized". + GASNET_SND_THREAD This gives a boolean: "0" to disable, or "1" to enable, the use of an extra thread per-HCA to block waiting for send completion events. This allows ibv-conduit to progress RMA and some AM send operations even when no application threads are actively making calls into the GASNet library. The down side is that when this thread wakes it must contend for CPU resources and for locks. Therefore, for an application that is calling GASNet sufficiently often, use of this thread may INCREASE running time. However, on an SMP where an otherwise idle processor is available the use of this thread can REDUCE running time by relieving the application threads of the burden of servicing completion events. Note that if '--disable-ibv-snd-thread' was specified at build time then the extra thread is unavailable and any use of this environment variable to enable the thread will result in a warning, which can be suppressed by an end-user by setting GASNET_QUIET=1, or can be programmatically avoided in client code by conditioning a setenv() call on "#if GASNET_SND_THREAD". Currently the default is disabled (0), but this is subject to change. + GASNET_SND_THREAD_RATE Analogous to GASNET_RCV_THREAD_RATE, but for the thread enabled by `GASNET_SND_THREAD`. + GASNET_SND_THREAD_IDLE Analogous to GASNET_RCV_THREAD_IDLE, but for the thread enabled by `GASNET_SND_THREAD`. + GASNET_SND_THREAD_POLL_MODE Analogous to GASNET_RCV_THREAD_POLL_MODE, but for the thread enabled by `GASNET_SND_THREAD`. Pinnable memory probe configuration: ----------------------------------- In normal operation of ibv-conduit it is necessary to know how much memory may be registered (aka pinned) with the InfiniBand HCA(s). This is limited by multiple factors and thus cannot be determined by a simple query. Therefore, the default behavior is to attempt to mmap and register as much memory as possible at startup, and then release all the memory. When there are multiple GASNet processes on a shared memory node, one representative process will perform this probe. There are at least two well-known reasons why one may desire to limit or eliminate this probe. The first is the time spent performing the probe. The second is the possibility that the O/S or a batch execution environment may terminate a process that exceeds some limit on the virtual memory size of a process and/or may terminate the process with the largest size when memory is exhausted. Use of the following parameters allows one to bound, or to eliminate, this probe. + GASNET_MAXIMIZE_MEMLOCK This gives a boolean: "1" to enable or "0" to disable an attempt to raise the process's "RLIMIT_MEMLOCK" value to the maximum permitted value. This may be necessary to ensure sufficient memory can be pinned for RMA. If this attempt fails, it will do so without any warning or error. The default is "1". + GASNET_PHYSMEM_MAX If set, this parameter is used to determine the maximum amount of memory ibv-conduit may pin. This limits how large the GASNet segment can be, and how much memory is available for firehose (see below). The value gives an upper bound on pinnable memory per host, which is divided equally among processes on each host. The value may specify either a relative or absolute size. If the value parses as a floating-point value less than 1.0 (including fractions such as "5/8"), then this is taken as a fraction of the (estimated) physical memory. Otherwise the value is taken as an absolute memory size, with "M", "G" and "T" suffixes accepted to indicate units of Megabytes, Gigabytes, and Terabytes, respectively. This parameter *may* validly differ among processes. However, if the value differs among processes on the same host, the implementation will select just one value per host (the algorithm for the selection is unspecified). The default may be set at configure time using --with-ibv-physmem-max=VALUE, and otherwise is "2/3" (pin up to 2/3 of the estimated physical memory). The following two parameters must be equal across all processes, and the behavior otherwise is undefined. + GASNET_PHYSMEM_PROBE This gives a boolean: "1" to enable or "0" to disable the validation (potentially slow) of the GASNET_PHYSMEM_MAX value. By default the environment variable GASNET_PHYSMEM_MAX is trusted if set at runtime or when using a default given at configure time. If neither source has provided a value, the "2/3" default is taken as a maximum amount of memory that might be possible pinned, but the final limit is determined by probing the limits imposed by the O/S and HCA. This probe can take a significant period of time on large memory nodes. Therefore, enabling this probe may greatly slow startup, but can prevent unexpected runtime failures if the user-provided values exceed those imposed by the O/S and HCA. Therefore, it is recommended to enable this probe if one experiences any runtime failure consistent with an out-of-memory condition. The O/S limits may be hard limits from the kernel (Linux often allows at most 80% of physical memory to be pinned) or from resource limits (see 'ulimit' in a Bourne shell or 'limit' in a C-shell). The default is OFF (probe disabled) if configure or environment sets a value of GASNET_PHYSMEM_MAX. However, this can be changed to a default of ON or OFF by configuring using, respectively, --enable-ibv-physmem-probe or --disable-ibv-physmem-probe. + GASNET_PHYSMEM_WARN This gives a boolean: "1" to enable or "0" to disable the warning printed if/when the GASNET_PHYSMEM_MAX value is probed. Protocol configuration: ---------------------- The following environment variables control the selection of protocols for performing certain transfers. These parameters must be equal across all nodes, and the behavior otherwise is undefined. + GASNET_INLINESEND_LIMIT IBV includes an "inline send" operation that transfers the data to the HCA at the same time it transfers the request. This normally provides a measurable performance improvement, but is only available up to an hardware- and firmware-dependent maximum size. A value of 0 disables use of inline sends. A value of -1 causes use of the maximum value reported by the HCA. The default of 72 is normally correct. + GASNET_PACKEDLONG_LIMIT To perform an AMLong with non-empty payload, ibv-conduit must transfer both the payload and the header. For sufficiently small payloads, it is more efficient (in terms of both CPU overhead and network latency) to pack the header and payload together and copy the payload into place on the target before running the handler. Thus, for payload up to and including this size this packing is used. The default value is the maximum that, together with the maximum sized header, fits into a 4KiB transfer (currently 4012). A value of zero ensures the payload and header always travel separately. + GASNET_NONBULKPUT_BOUNCE_LIMIT This parameter sets the limit on the use of bounce buffers to achieve local completion of "non-bulk" PUT and AMLong payload transfers. When passing GEX_EVENT_NOW to perform a PUT or AMLong, the implementation must block until local completion. For PUTs with nbytes larger than GASNET_INLINESEND_LIMIT, and for AMLongs with nbytes larger than both GASNET_INLINESEND_LIMIT and GASNET_PACKEDLONG_LIMIT, ibv-conduit must either copy the data into bounce buffers, or block until remote completion is signaled by the HCA. Such transfers up to and including size GASNET_NONBULKPUT_BOUNCE_LIMIT are performed using bounce buffers while larger transfers stall return from injection until the RMA is acknowledged. The default value is 64KB. A value of zero disables use of bounce buffers. + GASNET_PUTINMOVE_LIMIT (only for GASNET_SEGMENT_{LARGE,EVERYTHING}) When the firehose algorithm (see below) is in use for managing the pinning of remote memory, a PUT that misses in the firehose cache may be accelerated by piggybacking data on the AMMedium that is used to obtain a remote pinning. The value of GASNET_PUTINMOVE_LIMIT is the maximum number of bytes to send in this way. The value is bounded by the maximum value set at compile time, and it is an error to request a larger value. Note that in a GASNET_SEGMENT_FAST configuration, the remote segment is pinned statically and this optimization is never applicable. The default value is 3KB (the current maximum value). A value of zero disables this optimization. + GASNET_PUT_STRIPE_SZ and GASNET_GET_STRIPE_SZ (experimental) When multiple HCA ports are used, the performance of a sufficiently large isolated RMA operation (one not overlapped with other communication) can be increased by subdividing it into multiple pieces striped over more than one path. These parameters specify the threshold above which striping is applied to RMA Put and Get operations, respectively. Suffixes "K", "M" and "G" can be used to specify units of Kilobytes, Megabytes and Gigabytes, respectively. The default units are Kilobytes. Use of a too-small value may limit the performance of large RMA operations by subdividing them into stripes too small to saturate the network. Use of a too-large value may limit the performance of RMA operations which are large enough to benefit from striping but below the value. Values exceeding the HCA's maximum transfer size will be silently reduced. These parameters are ignored if only a single HCA/port is in use. A value of zero uses the HCA's maximum transfer size as the stripe size, effectively disabling this optimization. The current default is zero (disabled). + GASNET_AM_GATHER_MIN This parameter sets the minimum payload size at which a multi-segment gather may be used to concatenate an AM header and payload. Below this minimum payload data is copied. The default value is 1500. A value of -1 disables multi-segment gather, using payload data copy at all payload sizes. + GASNET_USE_SRQ This controls whether IBV Shared Receive Queue (SRQ) support is used, but is ignored if GASNet was configured with --disable-ibv-srq. This setting defaults to -1, which means that SRQ will be used only if doing so would reduce memory usage (as determined from the value of the GASNET_RBUF_COUNT setting, described below). If set to a non-negative value, this setting give the minimum GASNet node count at which SRQ will be used, regardless of whether or not the memory usage would increase or decrease. A value of zero will disable SRQ. Examples: - GASNET_USE_SRQ unset or explicitly set to -1: SRQ is used ONLY if GASNET_RBUF_COUNT is less than the number of receive buffers required for the non-SRQ case. - GASNET_USE_SRQ <= job size [includes GASNET_USE_SRQ == 1] SRQ is used and GASNET_RBUF_COUNT is enforced as a maximum - GASNET_USE_SRQ > job size SRQ is NOT used and GASNET_RBUF_COUNT is ignored Note that the interpretation of the values 0 and 1 allow one to use this setting as a simple boolean if desired. + GASNET_USE_XRC This controls whether IBV eXtended Reliable Connection (XRC) support is used. However, it is is ignored if GASNet was configured with --disable-ibv-xrc, if XRC support was not found at configure time, or if SRQ support is not used (regardless of why), This setting defaults to 1 if SRQ support was enabled at configure time. As a result XRC will be used anytime SRQ is used. + GASNET_USE_ODP This boolean setting controls whether IBV On-Demand Paging (ODP) support should be used. If true, then ibv-conduit uses ODP on any compute nodes where the IBV library reports support is available. When ODP is NOT available on one or more compute nodes, a warning is issued. See GASNET_ODP_VERBOSE for information on controlling this warning. This setting is ignored if GASNet was configured with --disable-ibv-odp, or if ODP support was not found at configure time. This setting defaults to 1 if ODP support was enabled at configure time. + GASNET_ODP_VERBOSE This integer setting controls the detail of the warning printed when ODP support is enabled but is not present on one or more HCAs in the job. A value of 0 suppresses the warning entirely. A value of 1 will report a count of processes lacking support. Values of 2 or higher give increasing levels of detail concerning the missing support. This setting defaults to 1 if ODP support was enabled at configure time. + GASNET_USE_FENCED_PUTS This boolean setting controls the use of atomic operations to provide for correct remote completion detection in the presence of multiple HCAs. See "Bug 3447" in the Known Problems section for information on when one may wish to enable this setting. If enabled when multirail support was not enabled at configure time, a warning will be issued. The default can be set at configure time via '--with-ibv-fenced-puts=...' and is 0 (disabled) in the absence of that configure option. Resource usage parameters: ------------------------- The following environment variables control how much memory is preallocated at startup time to serve various functions. Because these resource pools do not grow dynamically, it is important that these parameters be sufficiently large, or performance degradation may result. The default settings should be sufficient for most conditions. You may need to lower some values if you have insufficient memory. + GASNET_RBUF_SPARES This gives the number of AM receive buffers used to hold header and payload of executing AM Request, and thus bounds the number of threads which may concurrently execute AM handlers "in place". Any threads beyond this limit must copy the header and payload before executing the handler. The default value reflects a heuristic estimate of the number of threads which might concurrently poll for AM arrivals. Reducing this parameter may reduce Active Message throughput. The following parameters must be equal across all nodes, and the behavior otherwise is undefined. + GASNET_NETWORKDEPTH_PP This gives the maximum number of ops (RDMA + AMs) which can be in-flight simultaneously from a node to each of its peers. Here "in-flight" means queued to the send work queue and not yet reaped from the send completion queue. This value is the depth of each send work queue. This limit is on the number of ibv-level ops in-flight, and the number of GASNet-level operations may be less (for example, when the length of a PUT or GET is larger than the HCA's maximum message length, or because an AM Long uses separate ops for the payload and header). The default value is 24. Reducing this parameter may limit small message throughput. If you believe your small message throughput is too low, you may try increasing this value. + GASNET_NETWORKDEPTH_TOTAL This gives the maximum number of ops (RDMA + AMs) which can be in-flight simultaneously from each node (with "in-flight" defined as in GASNET_NETWORKDEPTH_PP). The depth of the send completion queue is min(GASNET_NETWORKDEPTH_TOTAL, GASNET_NETWORKDEPTH_PP*(N-1)). If set to zero, the value is set to the maximum usable value computed from GASNET_NETWORKDEPTH_PP and the HCA's reported capabilities. The default value is 255. Reducing this parameter may limit small message throughput. If you believe your small message throughput is too low, you may try increasing this value (or setting it to zero), at a cost in additional memory consumption. + GASNET_AM_CREDITS_PP This give the maximum number of AM Requests which can be in-flight simultaneously from a node to each of its peers. Here "in-flight" means the Request is queued to the send work queue, but the matching Reply has not yet been processed for AM flow control (described in another section of this README). This is the number of buffers which must be preposted to each receive work queue for AM Requests. The default value is 12 (12*MaxMedium*(N-1) allocated for Request buffers). Reducing this parameter may limit Active Message throughput. If you believe your Active Message throughput is too low, you may try increasing this value. + GASNET_AM_CREDITS_TOTAL This gives the integer number of AM Requests which can be in-flight simultaneously from each node, with "in-flight" defined as in GASNET_AM_CREDITS_PP. If set to zero, the value is set to the maximum usable value computed from GASNET_AM_CREDITS_PP and the HCA's reported capabilities. The default value is MIN(256, (nodes-1)*GASNET_AM_CREDITS_PP). Reducing this parameter may limit Active Message throughput. If you believe your Active Message throughput is too low, you may try increasing this value (or setting it to zero), at a cost in additional pinned memory. + GASNET_AM_CREDITS_SLACK This gives the maximum number of flow-control credits that can be delayed at the responder. If a Request handler does not produce a Reply, a credit may be "banked" to be piggy-backed on the next Request or Reply headed to the requesting node. The value of GASNET_AM_CREDITS_SLACK gives the maximum number of credits that can be banked before a hidden Reply is generated to convey credits back to the requester. The default value is 1. GASNET_AM_CREDITS_SLACK will be silently reduced if needed to ensure deadlock will not occur, and is ignored when SRQ is used. Reducing this parameter to zero or setting it too high may increase the latency of Active Message traffic. + GASNET_RBUF_COUNT If SRQ support is unavailable or disabled, this parameter is ignored. See GASNET_USE_SRQ documentation for details of when SRQ is enabled. When SRQ is enabled this gives the max number of AM receive buffers allocated on each node. These buffers are needed for reception of AM headers and the payload of mediums, but are not used for RDMA. The actual number of buffers allocated is the lesser of the value of GASNET_RBUF_COUNT or a value computed from the GASNET_AM_* and GASNET_NETWORKDEPTH_* parameters described above. If set to zero, the value is limited only by the HCA's capabilities. The default value is 1024 (up to 1024*MaxMedium for buffers). Reducing this parameter may limit Active Message throughput. If you believe your Active Message throughput is too low, you may try increasing this value (or setting it to zero), at a cost in additional pinned memory. + GASNET_BBUF_COUNT This gives the max number of pre-pinned buffers allocated on each node. These buffers are needed for assembly of AM headers and the payload of mediums, and for some PUTs (see GASNET_NONBULKPUT_BOUNCE_LIMIT). The actual number of buffers allocated is the lesser of the values of GASNET_BBUF_COUNT and GASNET_NETWORKDEPTH_TOTAL, since the total network depth bounds the number of in-flight operations that might need these buffers. If set to zero, the value is set to GASNET_NETWORKDEPTH_TOTAL. The default value is 1024 (up to 1024*MaxMedium for buffers). Reducing this parameter limits the number of in-flight operations which consume bounce buffers. This includes AMs too large for an inline send and PUTs subject to the GASNET_NONBULKPUT_BOUNCE_LIMIT. If you believe that throughput of these operations is too small, you may try increasing this value (or setting it to zero), at a cost in additional pinned memory. + GASNET_PINNED_REGIONS_MAX This provides a limit on the number of pinned regions to be created. Similar to GASNET_PHYSMEM_MAX, the value gives an upper bound on pinned regions per host, which is divided equally among processes on each host. This may constrain dynamic registration via firehose (below). The value may specify either a relative or absolute size. If the value parses as a floating-point value less than 1.0 (including fractions such as "5/8"), then this is taken as a fraction of the maximum supported region count reported by the HCA(s). Otherwise the value is taken as an absolute region count. The default is to use a fraction of the HCA pinning resources equal to the fraction of physical memory given by GASNET_PHYSMEM_MAX, subject to a system-dependent maximum value. + GASNET_RATOMICBUF_COUNT This gives the max number of pre-pinned buffers allocated on each process for buffering of remote atomic operations, where each such buffer is one cache line in length. The actual number of buffers allocated is the lesser of the values of GASNET_RATOMICBUF_COUNT and GASNET_NETWORKDEPTH_TOTAL, since the total network depth bounds the number of operations that can utilize these buffers. If set to zero (the default), the value is set equal to GASNET_NETWORKDEPTH_TOTAL. Reducing this parameter limits the number of in-flight fetching remote atomic operations, which each consume one buffer. Firehose configuration: ---------------------- These parameters must be equal across all nodes, and the behavior otherwise is undefined. The following environment variables control the per-process resources used by the "firehose" [ref 1] dynamic registration library. By default, firehose will use as much pinned memory as the HCA and O/S will permit, bounded by GASNET_PHYSMEM_MAX. Resource use is divided into two pools. The main pool is for managing of pinning of the GASNet segment on remote nodes, while the "victim" pool is used to manage pinnings for local use. By default in a GASNET_SEGMENT_LARGE or GASNET_SEGMENT_EVERYTHING configurations, 75% of the pinnable memory will go in the main pool and 25% into the victim pool. In a GASNET_SEGMENT_FAST configuration, firehose is not needed for management of the statically pinned GASNet segment, and by default only a small fraction of the available memory is placed in the main pool for internal uses and the majority is placed in the victim pool. + GASNET_USE_FIREHOSE This environment variable is only available in a DEBUG build of GASNet (one configured with --enable-debug). This gives a boolean: "0" to disable or "1" to enable the use of the firehose dynamic pinning library in a GASNET_SEGMENT_FAST configuration. In a GASNET_SEGMENT_FAST configuration, the GASNet segment is registered (pinned) with the HCA at initialization time, because pinning is required for RDMA. However, GASNet allows for local addresses (source of a PUT or destination of a GET) to lie outside of the GASNet segment. So, to perform RDMA GETs and PUTs, ibv-conduit must either copy out-of-segment transfers though preregistered bounce buffers, or dynamically register memory. By default firehose is used to manage registration of out-of-segment memory. (default is ON). Setting this environment variable to "0" (or "no") will disable use of firehose, forcing the use of bounce buffers for out-of-segment transfers. This will result in a significantly lower peak bandwidth for large PUTs and GETs, with little or no effect on small message latency. It is available only for debugging purposes. In a GASNET_SEGMENT_LARGE or GASNET_SEGMENT_EVERYTHING configuration, the GASNet segment is not preregistered and use of firehose is required. Thus it is an error to disable firehose in such a configuration. + GASNET_FIREHOSE_M and GASNET_FIREHOSE_MAXVICTIM_M GASNET_FIREHOSE_M gives the amount of memory to place in the main pool, while GASNET_FIREHOSE_MAXVICTIM_M gives the amount of memory to place in the victim (local) pool. The suffixes "K", "M" and "G" are interpreted as Kilobytes, Megabytes and Gigabytes respectively, with "M" assumed if no suffix is given. When neither variable is set, the defaults are respectively 75% and 25% of the total pool. In a GASNET_SEGMENT_LARGE or GASNET_SEGMENT_EVERYTHING configuration, this pool's size is the maximum pinnable memory (but see below), while in a GASNET_SEGMENT_FAST configuration it is the same size as the prepinned bounce buffer pool. Note that, as used here, "maximum pinnable memory" may be less than determined from GASNET_PHYSMEM_MAX, and in particular may be constrained by the product of the number of pinnable regions and their maximum size. See, GASNET_FIREHOSE_MAXREGION_SIZE, GASNET_FIREHOSE_R and GASNET_FIREHOSE_MAXVICTIM_R for more information. If only one of these variables is set, then the other defaults such that their sum equals the total pool size. Therefore, to enlarge or reduce the total pool, one must set both. Since enlarging the total pool risks exhausting resources, potentially leading to crashes at runtime, doing so will result in a warning. + GASNET_FIREHOSE_R and GASNET_FIREHOSE_MAXVICTIM_R GASNET_FIREHOSE_R gives the maximum number of pinned regions to allocate for the management of the main pool, while GASNET_FIREHOSE_MAXVICTIM_R gives the maximum number of pinned regions to allocate for the management of the victim (local) pool. When neither variable is set, the default is to split the available pool of pinnable regions (see GASNET_PINNED_REGIONS_MAX) in proportion to the values of GASNET_FIREHOSE_M and GASNET_FIREHOSE_MAXVICTIM_M. If only one of these variables is set, then the other defaults such that their sum equals the total pool size. Therefore, to enlarge or reduce the total pool, one must set both. Since enlarging the total pool risks exhausting resources, potentially leading to crashes at runtime, doing so will result in a warning. The value of GASNET_FIREHOSE_R will be silently truncated if larger than (GASNET_FIREHOSE_M / GASNET_FIREHOSE_MAXREGION_SIZE), since additional regions would not be used. Similarly, GASNET_FIREHOSE_MAXVICTIM_R will be silently reduced if it would address more than GASNET_FIREHOSE_MAXVICTIM_M. + GASNET_FIREHOSE_MAXREGION_SIZE This gives the maximum size of a single dynamically pinned region, should be a multiple of the pagesize, and preferably a power of two. The suffixes "K", "M" and "G" are interpreted as Kilobytes, Megabytes and Gigabytes respectively, with "M" assumed if no suffix is given. The maximum addressable size of the main and victim pools are limited by the product of this region size and the number of firehose regions allocated to each pool. If the value of this parameter is set to 0, then it will be automatically adjusted to allow the main and victim pools to be addressed within the available number of regions, if doing so is possible subject to a system-dependent maximum (pagesize squared, or larger). The default value of this parameter is 128KB. + GASNET_FIREHOSE_TABLE_SCALE This parameter gives a floating point factor, used to scale the size of hash tables used in the firehose library relative to their default sizes. Smaller values producer smaller tables, saving memory at the expense of performance. The default value is 1. + GASNET_FIREHOSE_VERBOSE This gives a boolean: "0" to disable or "1" to enable the output of internal information of use to the developers. You may be asked to run with this environment variable set if you report a bug that appears related to the firehose algorithm. External library settings: -------------------------- These parameters must be equal across all nodes, and the behavior otherwise is undefined. + MLX4_SINGLE_THREADED and MLX5_SINGLE_THREADED In a SEQ or PARSYNC build, ibv-conduit will set these environment variables to '1' under appropriate conditions (which include the default configure and environment settings) to instruct libibverbs to elide locking. These variables influence the libibverbs implementations for, respectively, the "mlx4" and "mlx5" drivers. Here "appropriate conditions" means that ibv-conduit is not starting any asynchronous threads. In particular, these variables are *not* set by the conduit if use of GASNET_RCV_THREAD has requested the asynchronous AM receive thread, or if the combination of GASNET_CONN_* settings may require starting a thread to receive dynamic connection requests. For more information on these variables, see their respective documentation, above. In all cases, a user's setting of either variable is preserved, allowing an explicit setting of '0' to prevent the conduit from setting it to '1'. @ Section: Multi-rail Support @ Multi-rail support is OFF in GASNet ibv-conduit by default. By default, ibv-conduit will use only the first active port on the first active InfiniBand Host Channel Adapter (HCA). However, if more than one HCA port is enabled for use, ibv-conduit will stripe communications over them. See the sections "Build-time Configuration" and "Runtime Configuration" for information on how to enable use of more HCAs/ports, or to control which HCAs/ports are used. To first order, the use of multiple ports or multiple adapters will yield increases in both bandwidth (good) and software overhead (bad). How the resulting trade off works for a given application may be hard to predict. If one is concerned with obtaining the maximum possible performance for a given application, then experiment with the GASNET_NUM_QPS and/or GASNET_IBV_PORTS environment variables (documented in "Runtime Configuration") to determine how a given application runs best. IMPORTANT NOTE: The multi-rail support in ibv-conduit makes the assumption that the number of HCAs used in every process will be identical. One must use GASNET_IBV_PORTS to ensure that this property is true. Otherwise, the behavior is undefined (startup crash being the most likely). @ Section: On-Demand Paging (ODP) Support @ Recent NVIDIA/Mellanox HCAs (ConnectX-4 and newer) support a feature known as On-Demand Paging (ODP). Where this support is available, ibv-conduit can use it to reduce resource pressure on physical memory. By default, ibv-conduit will attempt to warn at runtime if this support does not appear to be available despite having either the required software or hardware. If you are using NVIDIA/Mellanox Connect4-X HCAs or newer and ibv-conduit warns about missing ODP support, we recommend that you install the latest "MLNX_OFED" distribution, available for download from NVIDIA. NVIDIA provides documentation on installing the software and upgrading the HCA firmware (if needed). At configure time, ibv-conduit does not know the hardware, firmware, or driver versions on the compute nodes and cannot, in general, assume the host running configure represents every node in the system. Therefore, ODP support is enabled by default whenever the necessary library support is detected by the configure script. If ibv-conduit warns about missing ODP support on a system in which there are no ODP-capable nodes, then we recommend reconfiguring GASNet using --disable-ibv-odp to both eliminate the warnings and avoid the small overhead of ODP support. However, in a heterogeneous system in which some subset of compute nodes do support ODP, one should set GASNET_ODP_VERBOSE=0 in the environment to suppress warnings from nodes lacking ODP support, while allowing ibv-conduit to continue using ODP on the remaining nodes. @ Section: HCA Configuration @ GASNet ibv-conduit should *not* require any specialized configuration of your HCAs to achieve normal, correct operation. However, this section documents any configuration that *may* help improve performance. We recommend you backup your configuration data prior to attempting any modification, and that you confirm that any changes made produce a measurable benefit before deciding to keep them. If trying a suggestion here results in no measurable improvement, then we recommend that you return the modified parameter(s) to their previous value(s). WE DISCLAIM ALL RESPONSIBILITY IF FOLLOWING ANY SUGGESTION HERE RESULTS IN AN UNSTABLE OR UNUSABLE SYSTEM. Please consult the documentation provided with your HCA drivers, and/or your vendor or system integrator for information on how to query or change your HCA's configuration parameters. + The HCA configuration parameter MAX_QP_OUS_RD_ATOM controls the number of simultaneous RDMA Reads for which a QP may act as Responder. Our testing on one system with a default value of 8, showed that increasing the value to 16 yielded approximately a 30% bandwidth improvement in an RDMA-GET benchmark. @ Section: Remote Atomics @ Support for offloaded atomics can be disabled at configure time using `--disable-ibv-atomics`. Otherwise, offload support is compiled in `GASNET_SEGMENT_FAST` mode builds only. There is currently no support for `LARGE` or `EVERYTHING` modes. See "Remote Atomics vs multi-rail" in the Known Problems section. The following table indicates the pairs of atomic operation and data type that are eligible for offload to the InfiniBand HCA. The offloaded atomics will be used when the arguments to gex_AD_Create() express only supported pairs (unless suppressed by use of GEX_FLAG_AD_FAVOR_MY_RANK or GEX_FLAG_AD_FAVOR_MY_NBRHD flags, or in a single-process run). I32 U32 I64 U64 FLT DBL --- --- --- --- --- --- SET: N N N N N N GET: N N Y Y N Y SWAP: N N N N N N (F)CAS: N N Y Y N Y (F)ADD: N N Y Y N N (F)SUB: N N Y Y N N (F)INC: N N Y Y N N (F)DEC: N N Y Y N N (F)MULT: N N N N N N (F)MIN: N N N N N N (F)MAX: N N N N N N (F)AND: N N N N N/A N/A (F)OR: N N N N N/A N/A (F)XOR: N N N N N/A N/A Y = offload is supported N = offload is not supported N/A indicates invalid op/type pairs Please note the complete lack of a SET operation. Clients will need to address this either by ensuring memory is initialized to known values prior to any potential access using `gex_AD_Op*()`, or through use of supported operations (such as GET followed by CAS in an interval free of concurrent updates). @ Section: Advice to Client Authors @ + Negotiated-payload Active Messages (NPAM) TL;DR: The results below, from one particular system, can be summarized in the following rules-of-thumb for use of NPAM with ibv-conduit in the *current* release: + Use of client-provided buffer is never advantageous. + Use of gasnet-provided buffer may be advantageous for Medium with sufficiently large payloads, where both latency and bandwidth can exceed those of FPAM. + Use of gasnet-provided buffer may be advantageous for Long payloads of sufficient length, where bandwidth is better than FPAM (but at the expense of worse latency). Note that as development continues, these finding are subject to change. Calls to gex_AM_Prepare{Request,Reply}{Medium,Long}() with client_buf != NULL are known as "client-provided buffer" calls. In this mode of operation, there is a small penalty in CPU overhead relative to the fixed-payload AM (FPAM) calls gex_AM_{Request,Reply}{Medium,Long}(), due primarily to the split-phase calling convention. While the design of NPAM allows for the possibility that NPAM with client-provided buffer could enable larger Medium payloads than FPAM, ibv-conduit currently does not provide that capability. Measurements of both AM Mediums and Long with client-provided buffer NPAM on OLCF's Summit show the latency penalty relative to FPAM in a Request/Reply "ping-pong" test is around 2% for payload sizes below a couple hundred bytes, and 1% or lower for payloads of 512 bytes or larger. For AM Longs the penalty eventually approaches zero for payloads of about 512KiB or larger. Throughput of a "flood" test with client-provided buffer NPAM shows penalties of about 8% at the smallest payload sizes, declining smoothly to 5% at the largest Medium payloads and approaching zero for Long payloads of about 512KiB or larger. Calls to gex_AM_Prepare{Request,Reply}{Medium,Long}() with client_buf == NULL are known as "gasnet-provided buffer" calls. In this mode of operation, in which GASNet allocates a buffer where client code assembles/generates the payload at AM injection time, there is a measurable advantage to NPAM for sufficiently large payloads, but a small penalty for small payloads. Measurements with gasnet-provided buffer NPAM on OLCF's Summit show the latency penalty in a Request/Reply "ping-pong" test is around 2% for payload sizes below a couple hundred bytes for both Medium and Long. For Mediums of 512 bytes or larger, the latency is improved over FPAM (by about 9% for large payloads). For Longs, the large payload latency is worse than for small payloads. Throughput of a "flood" test with Mediums shows similar behavior to ping-pong, with a throughput penalty of up to 5% for payload sizes 512 bytes and below, but improvements in throughput above 512 bytes (by about 17% for large payloads). For Longs there is a throughput penalty of up to 5% for payload sizes below about 2KiB, but for large payloads a latency improvement of 40% or more can be seen. Your mileage may vary. Relative performance may change in future releases. @ Section: Known Problems @ + Slow PHYSMEM probe at start-up As described in more detail above, the environment variables GASNET_PHYSMEM_MAX and GASNET_PHYSMEM_PROBE can be used to control an upper-bound on the amount of memory that ibv-conduit will attempt to register/pin. If configure was passed --with-ibv-physmem-max=VALUE, then the given VALUE is used as the default value of GASNET_PHYSMEM_MAX. However, if this environment variable is not set, and no value was given at configure time for GASNET_PHYSMEM_MAX, then the values "2/3" and "yes" are used for these two environment variables and a message will direct the user to this text. Running with GASNET_PHYSMEM_PROBE=1 will also direct one to this text. If all compute nodes probed are found to allow the same amount of memory to be pinned (either in absolute or relative terms), the message issued will indicate the value determined and how to use it at configure or run time. If there is a single memory configuration in use on your system, then configuring (or setting GASNET_PHYSMEM_MAX) as directed in that message will eliminate the time spent on the probe at startup, as well as the message. If the memory configuration varies among nodes on the system, it may not be safe to use a single recommended setting. There are at least three options available: 1. To avoid the probe at the potential cost of registering less than the maximum possible memory for communication, one can elect to use the minimum probed value reported by the probe output across all of the node configurations to be used. Depending of the actual configurations using an absolute (whole number) or relative (fraction or decimal) value may result in using nearer to the maximum memory on all nodes. The most robust option would be to configure using --with-ibv-physmem-max=VALUE, but running with GASNET_PHYSMEM_MAX=VALUE may be simpler. Unless one has configured with --enable-ibv-physmem-probe, or is running with GASNET_PHYSMEM_PROBE=1 in the environment, the given value will be used without running the probe. 2. If the time spent by the probe is not a concern, one can obtain the behavior (default in older releases) of probing for UP TO a (safe) default of 2/3 of apparent physical memory size on every run (without any message) by running with environment variable GASNET_PHYSMEM_WARN=0. 3. If 2/3 is too conservative, one can force a probe with an alternative value by configuring using --with-ibv-physmem-max=VALUE --enable-physmem-probe of running with GASNET_PHYSMEM_MAX=VALUE GASNET_PHYSMEM_PROBE=1 In either case, one may also want to set GASNET_PHYSMEM_WARN=0. + Crashes have been seen using QLogic's InfiniPath HCAs with ibv-conduit with default parameters. If you see crashes with a message containing FATAL ERROR: aborting on reap of failed send then we recommend setting the following two environment variables GASNET_NETWORKDEPTH_PP=8 GASNET_QP_RD_ATOM=1 In our testing this resulted in about a 2% reduction in peak bandwidth, but eliminated all instances of "aborting on reap of failed send". + Lack of XRC support XRC is a optional feature in the Open Fabrics Verbs API, for which GASNet's configure script will probe support. However, that probe is limited to determining if the XRC-related function calls will compile and link, and cannot distinguish platforms on which the calls are present but always fail. On such systems, the failure will be reported at runtime above a certain number of processes (86 with the defaults for all environment variables) with the following message: *** FATAL ERROR: Unable to create an XRC domain. Please see "Lack of XRC support" under Known Problems in GASNet's README-ibv. If you experience this error it is recommended that you reconfigure your build of GASNet with --disable-ibv-xrc. If that is not possible one can also set GASNET_USE_XRC=0 in your environment. + Remote Atomics vs multi-rail To ensure correct/consistent results, support for offload of remote atomics to the InfiniBand HCA will use only a single HCA. Currently, only the first HCA opened by ibv-conduit is probed for atomic support. This means that in a multi-rail system, atomics are eligible for offload only when the first used HCA advertises the necessary support. Additionally, when using multiple rails, the implementation can only use a single QP, while single-rail runs are capable of striping concurrent atomic operations over multiple QPs (for non-default vaules of GASNET_NUM_QPS). + Bug 495 and 955 The "firehose" implementation of dynamic memory registration in ibv-conduit is susceptible to incorrect behavior if it caches registration information for a page of virtual memory that is returned to the OS by munmap() and the same virtual address is allocated to the process again later. To avoid this in most cases, ibv-conduit defaults to GASNET_DISABLE_MUNMAP=1 (documented in the top-level README) on 64-bit systems. However, this can be undermined by the GASNet client in a number of ways. A (non-exhaustive) list of known potentially problematic behaviors include: + Calls to `mallopt(M_TRIM_THRESHOLD, X)` for X != -1. + Setting environment variable MALLOC_MMAP_THRESHOLD_ other than to -1. + Calls to `mallopt(M_MMAP_MAX, Y)` for Y != 0. + Setting environment variable MALLOC_MMAP_MAX_ other than to 0. + Replacing the glibc implementation of malloc/free with one that will munmap() memory at any time other than process exit. If your GASNet client code exhibits any of the above-listed behaviors, you should explicitly set GASNET_DISABLE_MUNMAP=0. This not only prevents ibv-conduit from applying its default of 1, but additionally (and more importantly) modifies other behaviors within GASNet to avoid memory management behaviors that could trigger the bug. However, this setting cannot protect client code which may use malloc()ed memory as the source or destination of GASNet communication calls if such memory is later returned to the OS via munmap(). The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=495 That bug report describes the problem in more detail, and lists the best known recommended work-around(s). + Bug 3447 In this release the implementation of ibv-conduit on multi-HCA InfiniBand networks may yield incorrect results for certain communication patterns. However, the environment variable GASNET_USE_FENCED_PUTS (described above) can correct for this problem at the expense of higher latency and reduced bandwidth for Put-based communications due to additional communication. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=3447 That bug report describes the conditions under which the problem may manifest, and the recommended work-arounds. + Bug 3693 In some circumstances, one may see the following message at startup: *** FATAL ERROR: Unexpected error Bad address (errno=14) when registering the segment If your system is configured to allow large SystemV shared memory segments, then this can be resolved by switching to SystemV instead of POSIX for GASNet's shared memory support. However, it is also possible that one just needs to increase the systems limit on POSIX shared memory allocations as described under "System Settings for POSIX Shared Memory" in GASNet's top-level README. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=3693 That bug report describes more about the problem, and provides more detail regarding the recommended work-around(s). + Bug 3816 When using On-Demand Paging (ODP), it is possible that abnormal exits (SIGKILL or _exit(), in particular) may lead to leaking memory at the system level, requiring a reboot to reclaim the lost memory. In extreme cases, the cumulative effect of many leaks could eventually lead to the Linux Out-Of-Memory killer being invoked, or even a kernel panic. If you use ODP and see evidence of available memory declining over time, and have reason to suspect a GASNet application is experiencing an abnormal exit, then it may be advisable to disable ODP (see On-Demand Paging (ODP) Support section). The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=3816 That bug report describes more about the problem, and provides more detail regarding the recommended work-around(s). + Bug 3838 When using On-Demand Paging (ODP), it has been observed that certain patterns of many small RMA operations (as seen in GASNet's testvis) may lead either to crashes or to communications "locking up" such that RMA operations issued do not complete and eventually new RMA operations cannot be initiated. Crashes typically produce a message containing the text snd status=2(local QP operation error) and aborting on reap of failed send though other messages may be possible. If you use ODP and experience crashes or hangs from an application with many RMA operations, then you should retry with ODP disabled (see On-Demand Paging (ODP) Support section). The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=3838 That bug report describes more about the problem, and provides more detail regarding the recommended work-around(s). + Bugs 4008 and 4009 On some systems, RMA Puts and AM Longs with source buffers on read-only pages (such as those that might be generated for const-qualified static variables) are not handled correctly. The most up-to-date information on this issue is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4008 (ODP) https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4009 (Solaris) Those bug reports provide more details, and will provide the most current information regarding any recommended work-around(s). + Bugs 4105 On systems with InfiniBand headers provided by recent versions of the rdma-core-devel package, the use of `__builtin_constant_p()` may result in a failure to link ibv-conduit applications. This is believe to only impact older PGI compilers, with none released in 2020 or later known to have this problem. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4105 + Bug 4314 While this file documents several environment variables as permitting different values on different processes, it is not always possible to achieve such a scenario. The most up-to-date information on this issue is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4314 + Bug 4658 One may experience RMA failures when ODP is enabled and the application executable is located on a GPFS filesystem. In some cases the problem manifests as an application hang, and in others as failure with a message like the following, where "local protection error" and "ZEROCP" are consistent portions of the details: *** ERROR (proc 1): snd status=4(local protection error) vendor_err=0x36 qp_num=0x63ec hca=mlx5_0 op=GET_ZEROCP dest=(proc:0, qpi:0) *** FATAL ERROR (proc 1): in gasnetc_snd_reap() at [redcted]/ibv-conduit/gasnet_core_sndrcv.c:1029: aborting on reap of failed send *** NOTICE (proc 1): Before reporting bugs, run with GASNET_BACKTRACE=1 in the environment to generate a backtrace. In a debug build, the first line will include additional operation metadata such as in the following: *** ERROR (proc 1): snd status=4(local protection error) vendor_err=0x36 qp_num=0x63ec hca=mlx5_0 op=GET_ZEROCP dest=(proc:0, qpi:0) flags=0 loc_addr=0x00000000 00ac1f98 rem_addr=0x00007fd9 17e353c0 length=4 While the example outputs above are for a Get operation, Puts are also impacted. Currently, workarounds include 1. Disabling ODP via `GASNET_USE_ODP=0` in the environment at runtime, or by passing `--disable-ibv-odp` to `configure` 2. Relocating the executable to a non-GPFS directory The most up-to-date information on this issue is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4658 + Bug 4691 Currently, the logic for GASNET_RCV_THREAD_RATE and GASNET_SND_THREAD_RATE may fail to limit the wake-ups per second under certain conditions, including under heavy load when application thread(s) are also actively polling. The most up-to-date information on this issue is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4691 + Bug 4769 Currently the implementation of GASNET_IBV_PORTS_TYPE=auto has limitations, some of which may result in unexpected loss of performance relative to a manual assignment using other settings. 1. Each process will be assigned only a single HCA, even when the most desirable configuration might utilize multiple HCAs. Example: On a host with two processes and four HCAs, the current algorithm will never use more than half of the HCAs. 2. Each process will only be assigned an HCA from among those which are (according to hwloc) topologically nearest to it. Consequently, any HCAs not "nearest" to at least one process will go unused. Example: On a host with two sockets, each with one associated HCA, pinning all process to a *single* socket (for instance to provide affinity to a GPU) will cause the current algorithm to ignore the HCA associated with the other socket. These limitations are specific to the current automatic HCA assignment algorithm activated by GASNET_IBV_PORTS_TYPE=auto. Both situations described above can be avoided by instead applying settings for "manual assignment" of HCAs, see the documentation above for GASNET_IBV_PORTS. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4769 + See the GASNet Bugzilla server for details on other known bugs: https://gasnet-bugs.lbl.gov/ @ Section: Core API @ + Flow-control for AMs. The AMs in ibv-conduit are just implemented as send/recv traffic. Therefore a send without a corresponding recv buffer preposted at the peer will be stalled by the RNR (receiver-not-ready) flow control in IB. However there are two reasons why we want to avoid this situation. The first is that if such a send is blocked by flow control, then the ordering semantics of IB tell us that all the gets and puts that we've initiated after the AM was sent are also stalled. Rather than let that happen, we should manually delay those which are dependent on the AM. The second reason is that under some conditions the RNR flow control is very poor. The problem is that once the intended receiver sends a RNR NAK to indicate no available recv buffers, IB has the SENDER's hardware/firmware poll for the receiver to become ready again! That leaves us with a choice between configuring a small polling interval and consuming a lot of bandwidth for this polling, or a large interval which leads to performance which is degraded more than necessary when IB flow control is asserted. For these reasons we implement some flow control at the AM level. The basic idea is that every REQUEST consumes one credit on the sending endpoint and every REPLY grants one credit on the receiving endpoint. Thus if M is the initial number of credits on each endpoint and every REQUEST has exactly one matching REPLY, then M becomes a limit on the number of un-acknowledged REQUESTS in flight on an endpoint. If we want to avoid RNR conditions, then we should start with M credits and M preposted recv buffers on each endpoint. This allows for only the receipt of M REQUESTS. In addition, a recv buffer will be posted on demand for a REPLY just before sending each REQUEST. It is a simple matter to count the credits when a REPLY is received and to poll for credits when needed to send a REQUEST. It is also simple to ensure the exactly-one-reply. We already ensure that at-most-one reply is sent by the request handler. Additionally we must check upon handler return for the case that the request handler sent no reply, and send one implicitly. We just use a special "system category" handler, gasnetc_SYS_ack, which doesn't even run a handler. To avoid using up 1/2 our bandwidth in the event of a REQUEST-REQUEST ping-pong, we perform some coalescing to avoid sending too many SYS_ack REPLIES. We keep up to GASNET_AM_CREDITS_SLACK "banked" on the responding node, sending the SYS_ack REPLY only if the number banked exceeds this limit. Credits which are banked get piggybacked on the next REQUEST or REPLY headed back to the original requester. To avoid a window of time between when we send a REPLY (credit) and when we post the recv buffer, we must post the replacement recv buffer BEFORE running an AM REQUEST handler. To do this we keep a pool of unposted recv buffers (also used for the on-demand posting of buffers needed for REPLIES). So, when we recv an AM REQUEST, we grab a free recv buffer from the pool and post it to the endpoint, and only then run the handler. We send an implicit reply if a REQUEST handler didn't send any REPLY. Finally we take the recv buffer containing the just-processed AM and we return it to the unposted pool. There is a corner case we must deal with when there are no spares left in the unposted pool. In this case we will copy the received REQUEST into a temporary (non-pinned) buffer before processing it. This allows us to repost the recv buffer immediately. Since the temporary buffer is not pinned, it cannot be used for receives. Therefore, we free the temporary buffer when the handler is done, rather than placing it in the unposted pool. If we reap multiple AMs in a single Poll, then we reuse the previous buffer as the "spare" for the next one, in place of grabbing one from the unposted pool each time. Thus, we touch the unposted pool at most twice per Poll, once for the first AM we receive and once at the end to put the recv buffer of the final AM back in the unposted pool. For the dedicated receive thread we can do even better, never touching the unposted pool at all, by always keeping a single thread-local "spare", initially acquired at startup. Note that when SRQ is used, no flow control is used. @ Section: Extended API @ [This section is still *mostly* accurate, but has not been kept up-to-date with respect to EX updates. Most notably: "LongAsync" is gone, "_bulk" has been supplanted by lc_opt options, and all the function names have changed.] Notes for myself for extended API: + The send completion facility consists of two pointers to counters, associated with each sbuf. If these pointers are non-NULL then the counter is decremented atomically when the send is complete. One counter is for awaiting reuse of local memory and is only be used for sbufs which are doing zero copy. This counter provides the mechanism for Longs and non-bulk puts to block before they return, and should be allocated as an automatic variable. The second counter is for request completion and should be non-NULL for every sbuf for which request completion would be checked (all gets & puts, but not the Longs). For nb and nbi the counter is waited on at sync-time. Therefore the explicit event is a struct containing the counter. + Similar to the reference implementation's cut-off between Mediums (which typically do a source-side copy) and Longs (which may not), we have a cut-off size, below which the RDMA-put operation will do source-side copies _iff_ local completion is desired (Long, put_nb, and put_nbi). + The gets are done w/ RDMA-reads, and use the sbuf bounce buffers if the local memory is not in the segment (or otherwise registered). The value gets also pass though the bounce buffers. Clearly there is no bulk/non-bulk distinction in terms of local memory reuse, just the alignment and optimal size distinctions. So, only the outstanding request counter on the sbuf is needed for syncs of all types of gets. + Table of when synchronization is needed Local Remote Operation Sync Sync -------------------------- LongAsync X X Long I X put_nb I S put_nbi I S put_nb_bulk X S put_nbi_bulk X S put_nb_val X S put_nbi_val X S put X I put_bulk X I put_val X I get_nb X S get_nbi X S get_nb_bulk X S get_nbi_bulk X S get X I get_bulk X I get_val X I X = Not needed at all (or not even applicable with _val forms) I = Needed before (I)nitiating function returns S = Needed before (S)ynchronizing function returns + Some minor tweaks are used to avoid allocation of counters in some cases. - For all the functions which require waiting on a counter in the initiating function, the counter can be allocated on the stack (as an automatic variable). - For the implicit-handle forms the request counter is in the thread-specific data, possibly in an access-region. - For the explicit event forms the request counter must be allocated from some pool, requiring some memory management work. This is done with a modification to the code from the reference implementation, and uses thread-local data to avoid locks. + The memsets can be more efficiently implemented as a _local_ memset followed by a PUT, for small enough sizes. This is not currently implemented. @ Section: Progress Threads Support As documented with the `GASNET_RCV_THREAD*` and `GASNET_SND_THREAD*` family of environment variables, ibv-conduit provides receive and send progress threads, with each process optionally having one of each for each HCAs used. Ibv-conduit supports use of `gex_Client_Init()` flag `GEX_FLAG_DEFER_THREADS` to defer starting these threads. See `docs/GASNet-EX.txt` for documentation on `gex_System_QueryProgressThreads()` for information on how the client should start the progress threads when using this flag. This support includes two implementation-defined behaviors: + It is permitted for the process to exit (normally or abnormally) prior to the client starting all deferred progress threads. This relaxes the "undefined behavior" in the conduit-independent documentation. + The names in the `gex_device_list` field of the structure describing each progress thread take the same form as environment variables such as `GASNET_IBV_PORTS`, except that they will not include any optional port number component. Examples include "mlx5_0" and "mlx6_2". These are notably the same identifiers used by hwloc to name "OpenFabrics" devices. @ Section: GEX_FLAG_IMMEDIATE Support The following summarizes the current state of support for GEX_FLAG_IMMEDIATE. Last reviewed against 2022.3.0 | SEGMENT | SEGMENT | SEGMENT | OPERATION | FAST | LARGE | EVERYTHING | ------------+-------------+------------+------------+ FPAM Short | Y | Y | Y | FPAM Medium | Y | Y | Y | FPAM Long | Note 1 | Note 1 | Note 1 | | | | | NPAM Medium | Y | Y | Y | NPAM Long | Note 2 | N | N | | | | | RMA Put | N | N | N | RMA Get | N | N | N | ------------+-------------+------------+------------+ Y = GEX_FLAG_IMMEDIATE is fully implemented N = GEX_FLAG_IMMEDIATE is ignored FPAM = Fixed-payload AM NPAM = Negotiated-payload AM For the notes which follow, define a "packed Long" as an AM Long having a payload size of GASNET_PACKEDLONG_LIMIT or less. Note 1: FPAM Long + For a packed Long the IMMEDIATE flag is fully implemented. For the LARGE and EVERYTHING segment modes, this notably includes all Reply calls because in those cases the payload is always packed. + Otherwise, the IMMEDIATE flag is ignored. Note 2: NPAM Long / FAST + For a packed Long the IMMEDIATE flag is fully implemented. This notably includes all calls with a GASNet-allocated buffer because in this case the payload is always packed. + Otherwise, the IMMEDIATE flag is *partially* implemented. The logic in Prepare is sensitive to AM flow-control credits and buffer allocation for the AM header, but ignores the possibility of a stall in injection of the payload transfer at Commit time. @ Section: Graceful exits @ On June 24, 2003 ibv-conduit now passes all 9 (I added two recently) of the cases in testexit. By "Pass" I mean that the entire gasnet job (tested up to 8-way across my 4 dual-processor machines) terminates with no orphans, and with tracing properly finalized (if tracing is enabled). On August 11, 2003 the graceful exit code was revised to send O(N) network traffic in the worst case, as opposed to the O(N^2) required in all cases in the first implementation. Additionally, the exit code is properly propagated through the bootstrap, to yield a correct exit code for the parallel job as a whole. If using MPI for bootstrapping, the actual exit code will depend on supported in a given MPI implementation (some ignore the exit code of the individual processes). This code is heavily commented, but for the curious, here is a description of the code. There are three paths by which an exit request can begin. The first is through gasnetc_exit(), which may be called by the user, by the conduit in certain error cases, and by the default signal handler for "termination signals". The second is via a remote exit request, passed between nodes to ensure full-job termination from non-collective exits. The third is via an atexit/on_exit handler, registered by gasnetc_init(), used to catch returns from main() and user calls to exit(). There are slight variations among the code in these three cases, but most of the work is common, and is performed by three functions: gasnetc_exit_head(), gasnetc_exit_body() and gasnetc_exit_tail(). The first of these, _head, is used to determine the "first" exit and store its exit code for later use. This is important because even a collective exit will involve receiving remote exit requests. Only if a remote exit request is received before any local calls to gasnetc_exit(), should the request handler initiate the exit. Note that even in the case of a collective exit it is possible for the first remote request to arrive before the local gasnetc_exit() call. However, that is made very unlikely by the timing and is nearly harmless since the only difference is the raising of SIGQUIT in response to a remote exit request, which is not done for locally-initiated ones. The second common function, _body(), is used to perform the "meat" of the shutdown. It begins by ignoring SIGQUIT to avoid re-entrance, and then blocks all but the first caller in a polling loop to avoid multiple threads from executing the shutdown code. While the template uses a mutex to block additional threads, ibv-conduit is using atomics to avoid problems with signal context. Once additional thread are blocked from making progress through _body(), the AM progress thread (if any) is terminated to prevent it from interfering. Because strange things can happen if we are trying to shutdown from a signal context, a signal handler is installed for all the "abort signals". This signal handler just calls _exit() with the exit code stored by _head(). Because we may have problems shutting down if certain locks were held when a signal arrived, we also install the signal handler for SIGALRM, and use the alarm() function to bound the time spent blocked in the shutdown code. While there is the risk that this alarm might go off "too soon" if the shutdown has lots of work to do, we can be certain that the correct exit code is still generated. An additional step to address signal context is the definition of GASNETC_FATALSIGNAL_CALLBACK in ibv-conduit/gasnet_core_fwd.h, which gives ibv-conduit the chance to set gasnetc_exit_in_signal=1 just before the conduit-independent signal-handling code can reach the exit path. If this variable is non-zero then certain operations known to be especially risky in signal-handler context are skipped. After signal handlers are established, _body calls gasnetc_disable_AMs() to zero the table of client-registered AM handlers (though preserving the internal ones). This helps avoid interference. Then _body calls gasnetc_exit_reduce() to try to perform a collective reduce-to-all over the exit codes. If this completes within a given timeout then we know the exit is collective (and "graceful" is set non-zero) and skip over the leader/member logic described in the next two paragraphs. If the reduction does not complete within the timeout, then _body next calls gasnetc_get_exit_role() to "elect" a leader node for the exit. This is done with an alarm() timer in force. The use of an "election" with a timeout ensures that we will exit, even if node 0 is wedged. The election of a leader proceeds by sending a system-category AM request to node 0, and spinning to wait for a corresponding reply, which will indicated if the local node is the "leader" or a "member" in the coordination of the graceful exit. The logic on node 0 ensures that the first "candidate" is always made the leader, not waiting for multiple AMs to arrive. Additionally the member nodes may, under circumstances described below, know before entering gasnetc_get_exit_role() that they are members, and will not bother to send an AMRequest to node 0. In either case gasnetc_get_exit_role() indicates to _body which role the local node is to assume. From _body, the single leader node will enter gasnetc_exit_leader() and will begin sending an remote exit request (system-category AM, so this will all work between _init and _attach) to each peer. Then the leader waits (with timeout, of course) for a reply from each peer. This request conveys the desired exit code to each node. It also will wake them out of a spin-loop, barrier, or other case where they were not yet aware of the need to exit. In the handler for the exit request, a node will send a reply back to the leader, so it knows all the nodes are reachable. It will set its role to "member" and, if no exit is in-progress, it will start the exit procedure, as described later. From _body, the member nodes all call gasnetc_exit_member(), which simply spins until the remote exit request has arrived from the leader. Regardless of whether exit coordination (the reduction, or exit requests and replies) completed within their timeouts, _body proceeds to flush stdout and stderr one last time and closes stdin, stdout and stderr. Finally, _body shuts down its bootstrap support. If either coordination was completed within the timeout, then the gasnetc_bootstrapFini() routine is called indicating that we'll not be making any more calls to the bootstrap code and expect to exit shortly. However, if both coordinations did fail we call gasnetc_bootstrapAbort(exitcode). This call is meant to request that the bootstrap terminate our job "with prejudice" since we failed to coordinate a graceful shutdown on our own. We do this to try to avoid orphans, but risk lots of unsightly error messages and possible loss of our exit code. Assuming we did not call _bootstrapAbort (which does not return) we finish _body by canceling our alarm timer and return to our caller. The final common routine is gasnetc_exit_tail(). This function just does the last bit of work to terminate the job. It is not included in _body because we let the atexit/on_exit() case terminate "normally" after _body returns. However, in the case of exits initiated via gasnet_exit() or remote exit request we call _tail to complete the exit. In _tail we set an atomic variable to wake any threads which were stuck polling in _body due to being other than the first thread to enter. Those threads should eventually wake and also call _tail to terminate. Next, we call gasneti_killmyprocess() to do any platform- specific magic required to get the entire multithreaded application to exit. Finally we call _exit() with the saved exit code. Given the routines gasnetc_exit_{head,body,tail}() the code for the three types of exit are pretty trivial. In particular, gasnetc_exit() just calls _head, _body and _tail with no additional logic. In the request handler for the exit request AM, we look at the return from _head to determine if this exit request is the first we've seen (inclusive of local calls to gasnet_exit() and our atexit/on_exit handler). If it IS the first exit request, then we raise a SIGQUIT, as required by the GASNet spec, to allow the user's handler to perform its cleanup. However, to get the most robust exit code we don't want to run the _body code from a signal handler context if we can avoided it. Therefore we inspect the signal handler and skip the raise() call if the handler is the gasnet default handler, SIG_DFL or SIG_IGN. After the raise() returns, or is skipped all together, we are certain that the user's handler, if any, has executed and has NOT called gasnet_exit(). If a user handler had called gasnet_exit(), then raise() would not have returned. So, if we reach the code after the possible raise(), we proceed to call gasnetc_exit_body() and _tail to complete the (hopefully) graceful exit of the gasnet job. It is important to note that if we get a remote exit request that initiates an exit, then we will never return from the handler. However, the design of the AM code in IBV conduit ensures that this will actually work without deadlock. For one, we never run handlers from signal context or with locks held. Thus we can expect a "clean" set of locks. Furthermore, we don't expect to do anything useful with the network once the request handler calls _body anyway. The atexit handler just calls _head and _body before returning to allow the exit to complete. In this case we have a little problem with the lack of access to the return code. Therefore we just pass 0 to _head, which _body then sends in the remote exit requests. Experience has shown that, at least with LAM/MPI for bootstrap, when all but one task exits with zero, the single non-zero exit code becomes the exit code for the parallel job. Therefore, using zero here gives the specified exit code from the parallel job for both collective and non-collective returns from main. If support is detected at configure time for on_exit(), then it is used rather than atexit(), and the problem of the missing return code vanishes. In the normal case of a collective exit, the reduce-to-all-with-timeout is performed in 3 steps. The first is an intra-supernode reduction. The second is a reduce-to-all over supernodes using the same communication pattern as the dissemination barrier, requiring ceil(log_2(SN)) rounds in which each supernode sends and receives one AM (where "SN" is number of supernodes). The third step is a supernode-scoped broadcast. For non-PSHM builds, only a dissemination based reduce-to-all is performed (steps 1 and 3 are eliminated and "supernode" is replace by "node" in the description of step 2). For the non-collective exits, there is both a "best case" and a "worst case" to consider: Best case: one node is way ahead of the others and can win the leader election and send remote exit requests before the others attempt the election. In this case the coordinated shutdown needs 1 round-trip for the election, followed by (N-1) round-trips for the remote exit request/reply, for a total of 2*N AMs sent (not counting those from the failed reduction). Worst case: all nodes attempt the election at roughly the same time and a full N round-trips take place for the election, followed by (N-1) round trips for the remote exit request/reply, for a total of 4*N-2 AMs sent (plus those from the failed reduction). The average case for non-collective exits is somewhere between those two. @ Section: References @ [1] Bell, Bonachea. "A New DMA Registration Strategy for Pinning-Based High Performance Networks", Workshop on Communication Architecture for Clusters (CAC'03), 2003. Also at https://gasnet.lbl.gov/ gasnet-2025.8.0/ibv-conduit/gasnet_ratomic_fwd.h0000664000175000017500000001475715142313673021673 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_ratomic_fwd.h $ * Description: GASNet Remote Atomics API Header (ibv-conduit specific forward decls) * Copyright 2025, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_RATOMIC_FWD_H #define _GASNET_RATOMIC_FWD_H // (###) Note to conduit authors: // When providing conduit-specific implementations of Remote Atomics, // one should clone this file to the conduit directory and make the // changes indicated by comments starting with (###). // Build IBV remote atomics by default if remote segment is statically pinned // unless disabled at configure time. #if defined(GASNETC_BUILD_IBVRATOMIC) // Normalize any forced value #if !GASNETC_BUILD_IBVRATOMIC #undef GASNETC_BUILD_IBVRATOMIC #else #undef GASNETC_BUILD_IBVRATOMIC #define GASNETC_BUILD_IBVRATOMIC 1 #endif #elif GASNET_SEGMENT_FAST && GASNETC_IBV_ATOMICS_CONFIGURE #define GASNETC_BUILD_IBVRATOMIC 1 #endif // **** // Section 1: control/configure AM-based reference implementation // // In general, the AM-based atomics may get used even in the presence of a // conduit-specific implementation (for instance, any time an AD has a type // or an operation not supported by the conduit). Some conduit properties // are relevant to the behavior of the AM-based reference implementation. // **** // 1a. GASNETE_RATOMIC_AMONLY // // If using extended-ref/ratomic/gasnet_ratomic_fwd.h file, then there is no // conduit-specific version. This define enables some optimization correct // only in the absence of conduit-specific atomics. #if !GASNETC_BUILD_IBVRATOMIC #define GASNETE_RATOMIC_AMONLY 1 #endif // 1b. GASNETE_AMRATOMIC_USE_RMA_gex_dt_* // // Enable optional use of RMA Put and Get for atomic SET and GET operations // within the AM-based atomics (rather than an AM that performs the SET or GET // using the target CPU). // // If the conduit's RMA Put and Get of naturally aligned 4 and/or 8 byte values // are free of word-tearing and intermediate values, as observed by the target // CPU, then we consider them "atomic" and AM-based Set and Get may use them. // TODO-EX: // For now we are not prepared to assume RMA of natually-aligned 4- and 8-byte // words are "tools safe" (free from word-tearing and intermediate values). // // TODO-EX: SIGNALSAFE is not the precise property we are looking for, // though it is accurate for the current tools implementations. #if 1 // GASNETI_ATOMIC32_NOT_SIGNALSAFE #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_I32 0 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_U32 0 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_FLT 0 #else #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_I32 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_U32 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_FLT 1 #endif #if 1 // GASNETI_ATOMIC64_NOT_SIGNALSAFE || PLATFORM_ARCH_32 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_I64 0 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_U64 0 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_DBL 0 #else #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_I64 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_U64 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_DBL 1 #endif // 1c. GASNETI_RATOMIC_STATS // // Stats needed by the RAtomic reference implementation // // (###) Conduits should merge this set of STATS counters with their own // to allow the reference implementation to continue compiling along side // the conduit-specific implementation(s). // // TODO-EX: find an alternative location to define the RAtomic reference // STATS so that conduits may *append* to them (rather than replicate) // when cloning this file. #ifndef GASNETI_RATOMIC_STATS #define GASNETI_RATOMIC_STATS(CNT,VAL,TIME) \ /* Currently empty */ #endif // **** // Section 2: control/configure conduit-specific remote atomics // // This section contains settings related to how conduit-specific remote // atomics interact with the rest of the system, such as the interaction // with atomics performed by the local CPU. // **** // 2a. GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_* // // Assert that all atomics implementations possible in the current build // are unconditionally "tools safe" (for each type independently). The // term "tools safe" here means that concurrent access via GASNet-Tools // will produce correct results. // // Each token GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE##dtcode should be 0 or 1: // 0: Honor _real_ad->_tools_safe (testing each instance dynamically) // 1: Ignore _real_ad->_tools_safe, assuming it is 1 (saves 1 branch) // Consumed by the GASNETE_RATOMIC_DISP() macro. // // (###) Conduits cloning this file must update these to be accurate. // For types which are never offloaded, the value '1' may be retained. // For a type which may be offloaded this value '0' should be used // *unless* the implementation is consistent with GASNet-Tools atomics. // HOWEVER, that is almost never a safe determination to make, since // Tools may use mutexes, etc. TL;DR: use 0 for offloadable types. // #if GASNETC_BUILD_IBVRATOMIC // Cannot assume always safe to use GASNet tools w/ 64-bit types #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_I32 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_U32 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_I64 0 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_U64 0 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_FLT 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_DBL 0 #else // NOT building IBV-specific atomics #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_I32 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_U32 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_I64 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_U64 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_FLT 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_DBL 1 #endif // 3. Hooks for conduit-specific extension to create and destroy // // These hooks are analogous to the following: // GASNETC_CLIENT_EXTRA_DECLS // GASNETC_CLIENT_INIT_HOOK // GASNETC_CLIENT_FINI_HOOK // GASNETC_SIZEOF_CLIENT_T // which are documented in template-conduit/gasnet_core_fwd.h #if GASNETC_BUILD_IBVRATOMIC #define GASNETC_AD_EXTRA_DECLS \ extern void gasnete_ibvratomic_init_hook(gasneti_AD_t); #define GASNETC_AD_INIT_HOOK(i_ad) gasnete_ibvratomic_init_hook(i_ad) //#define GASNETC_AD_FINI_HOOK(i_ad) (###) //#define GASNETC_SIZEOF_AD_T() (###) #endif #endif // _GASNET_RATOMIC_FWD_H gasnet-2025.8.0/ibv-conduit/gasnet_firehose.c0000664000175000017500000001076715142313673021171 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_firehose.c $ * Description: Client-specific firehose code * Copyright 2003, The Regents of the University of California * Terms of use are as specified in license.txt */ /* Implement client-specific callbacks for use by firehose-region */ #include #include #include #if GASNETI_STATS_OR_TRACE #define GASNETC_TRACE_MR(_event, _verb, _region) do { \ const firehose_region_t *_reg = (_region); \ int _pages = (int)(_reg->len/GASNET_PAGESIZE); \ GASNETI_TRACE_PRINTF(D, ("FIREHOSE_MOVE: " _STRINGIFY(_verb) \ " %d page(s) at " GASNETI_LADDRFMT, \ _pages, GASNETI_LADDRSTR(_reg->addr))); \ GASNETC_STAT_EVENT_VAL(_event, _pages); \ } while(0) #define GASNETC_TRACE_PIN(_region) GASNETC_TRACE_MR(FIREHOSE_PIN, pin, (_region)) #define GASNETC_TRACE_UNPIN(_region) GASNETC_TRACE_MR(FIREHOSE_UNPIN, unpin, (_region)) #else #define GASNETC_TRACE_PIN(_region) ((void)0) #define GASNETC_TRACE_UNPIN(_region) ((void)0) #endif static int region_is_mapped(firehose_region_t *region) { // Consider a region to be mapped unless msync() fails with ENOMEM // Inspired by https://renatocunha.com/2015/12/msync-pointer-validity/ // TODO: any better method(s) available? int ret = msync((void*)(uintptr_t)region->addr, region->len, MS_ASYNC); return !(ret && (ENOMEM == errno)); } extern int firehose_move_callback(gex_Rank_t node, const firehose_region_t *unpin_list, size_t unpin_num, firehose_region_t *pin_list, size_t pin_num) { GASNETC_TRACE_WAIT_BEGIN(); int rc; int h, i; const enum ibv_access_flags access = (enum ibv_access_flags) (IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE | IBV_ACCESS_REMOTE_READ); /* Take care of any unpins first */ for (i = 0; i < unpin_num; i++) { GASNETC_FOR_ALL_HCA_INDEX(h) { if (!unpin_list[i].client.handle[h]) { gasneti_assert(!h); // If this is not the first HCA then something is very wrong break; } rc = ibv_dereg_mr(unpin_list[i].client.handle[h]); GASNETC_IBV_CHECK(rc, "from ibv_dereg_mr"); } GASNETC_TRACE_UNPIN(&unpin_list[i]); } /* Take care of any pins */ for (i = 0; i < pin_num; i++) { firehose_region_t *region = pin_list + i; firehose_client_t *client = ®ion->client; gasneti_assert(region->addr % GASNET_PAGESIZE == 0); gasneti_assert(region->len % GASNET_PAGESIZE == 0); GASNETC_FOR_ALL_HCA_INDEX(h) { client->handle[h] = ibv_reg_mr(gasnetc_hca[h].pd, (void*)(uintptr_t)region->addr, region->len, access); if_pf (NULL == client->handle[h]) { if ((EFAULT == errno) && region_is_mapped(region)) { // Appears to be a failure as would occur with read-only memory (Bug 3338). // Continue with a NULL handle and zero lkey/rkey (should fail if used). // This results in a cached firehose, to avoid repeated registration failures. // Our conduit-specific defn of FH_MAY_MERGE prevents merging with valid regions. gasneti_assert(!h); // If this is not the first HCA then something is very wrong GASNETI_TRACE_PRINTF(D, ("FIREHOSE_MOVE: read-only memory found at " GASNETI_LADDRFMT, GASNETI_LADDRSTR(region->addr))); client->lkey[h] = client->rkey[h] = 0; break; } // else fatal gasneti_fatalerror("ibv_reg_mr failed in firehose_move_callback errno=%d (%s)", errno, strerror(errno)); } client->lkey[h] = client->handle[h]->lkey; client->rkey[h] = client->handle[h]->rkey; } GASNETC_TRACE_PIN(&pin_list[i]); } GASNETC_TRACE_WAIT_END(FIREHOSE_MOVE); return 0; } extern int firehose_remote_callback(gex_Rank_t node, const firehose_region_t *pin_list, size_t num_pinned, firehose_remotecallback_args_t *args) { #if GASNETC_PIN_SEGMENT /* DO NOTHING. IF WE GET CALLED WE COMPLAIN. */ gasneti_fatalerror("invalid attempted to call firehose_remote_callback()"); return -1; #else /* Memcpy payload into place */ gasneti_assert(args != NULL); gasneti_assert(args->addr != NULL); gasneti_assert(args->len > 0); GASNETI_MEMCPY(args->addr, args->data, args->len); gasneti_sync_writes(); return 0; #endif } gasnet-2025.8.0/ibv-conduit/gasnet_core_help.h0000664000175000017500000000141615142313673021321 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_core_help.h $ * Description: GASNet ibv conduit core Header Helpers (Internal code, not for client use) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_HELP_H #define _GASNET_CORE_HELP_H #include #if defined(GASNETC_PTHREAD_CREATE_OVERRIDE) #if !defined(PTHREAD_MUTEX_INITIALIZER) #error "Pthread support missing or broken" #endif extern int gasnetc_pthread_create(gasneti_pthread_create_fn_t *, pthread_t *, const pthread_attr_t *, void *(*)(void *), void *); #endif #endif gasnet-2025.8.0/ibv-conduit/Makefile.am0000664000175000017500000001343415142313673017706 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/Makefile.am $ # Description: Makefile for GASNet ibv conduit # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME=ibv ## Firehose fh_type=region include $(top_builddir)/other/firehose/firehose.mak ## ## SSH bootstrap support (built unless fork() is unavailable) ## if HAVE_BOOTSTRAP_SSH ssh_defines = -DHAVE_SSH_SPAWNER ssh_srcdir = $(top_srcdir)/other/ssh-spawner ssh_sources = $(ssh_srcdir)/gasnet_bootstrap_ssh.c ssh_deps = $(ssh_srcdir)/*.[ch] endif ## ## MPI bootstrap support (optional) ## XXX: should have a way to control this independent of MPI conduit ## if HAVE_BOOTSTRAP_MPI mpi_defines = -DHAVE_MPI_SPAWNER mpi_srcdir = $(top_srcdir)/other/mpi-spawner mpi_deps = $(mpi_srcdir)/*.[ch] # We must compile this one object with MPI_CC. mpi_special_objs = $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o: force @MPI_CC@ @MPI_CFLAGS@ $(LIBDEFINES) $(CONDUIT_EXTRALIBCFLAGS) $(LIBINCLUDES) \ $(MANUAL_MPICFLAGS) -o $@ -c $(mpi_srcdir)/gasnet_bootstrap_mpi.c endif ## ## PMI bootstrap support (optional) ## if HAVE_BOOTSTRAP_PMI pmi_cppflags = -DHAVE_PMI_SPAWNER @PMI_SPAWNER_CFLAGS@ pmi_srcdir = $(top_srcdir)/other/pmi-spawner pmi_sources = $(pmi_srcdir)/gasnet_bootstrap_pmi.c pmi_deps = $(pmi_srcdir)/*.[ch] endif ## ## HWLOC support (unconditional) ## hwloc_srcdir = $(top_srcdir)/other/hwloc hwloc_sources = $(hwloc_srcdir)/gasnet_hwloc.c hwloc_deps = $(hwloc_srcdir)/*.[ch] hwloc_extralibcflags = -I$(hwloc_srcdir) @HWLOC_CFLAGS@ ## ## IBV AM receiver and/or connection thread support (optional) ## if IBV_SEQ_THREADS # Conduit threads require GASNET_THREAD_DEFINES even for SEQ mode ibv_thread_defines = @GASNET_THREAD_DEFINES@ endif # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = contrib # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ gasnet_core.c \ gasnet_core_connect.c \ gasnet_core_sndrcv.c \ gasnet_core_thread.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h \ gasnet_extended.c \ gasnet_extended_fwd.h \ gasnet_firehose.c \ gasnet_ratomic.c \ gasnet_ibv.h \ gasnet_ratomic_fwd.h \ firehose_fwd.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiler command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(srcdir)/gasnet_core_connect.c \ $(srcdir)/gasnet_core_sndrcv.c \ $(srcdir)/gasnet_core_thread.c \ $(srcdir)/gasnet_extended.c \ $(srcdir)/gasnet_firehose.c \ $(srcdir)/gasnet_ratomic.c \ $(fh_sourcelist) \ $(hwloc_sources) \ $(ssh_sources) $(pmi_sources) # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = @IBV_CFLAGS@ \ $(fh_extralibcflags) $(hwloc_extralibcflags)\ $(ssh_defines) $(mpi_defines) $(pmi_cppflags) \ $(ibv_thread_defines) # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = $(fh_extraheaders) # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = $(fh_privheaders) gasnet_ibv.h # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = $(fh_extradeps) $(hwloc_deps) \ $(ssh_deps) $(mpi_deps) $(pmi_deps) # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = $(mpi_special_objs) $(fh_special_objs) # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time CONDUIT_KINDS = cuda_uva hip # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) CONDUIT_RUNCMD = @TOP_BUILDDIR@/ibv-conduit/contrib/gasnetrun_ibv -np %N %P %A # conduit-specific tests in ../tests directory CONDUIT_TESTS = # -------- Do not modify anything below this line -------- if BUILD_SEQ_LIBS libgasnet_ibv_seq_a_SOURCES = libraries_seq = libgasnet-ibv-seq.a endif if BUILD_PAR_LIBS libgasnet_ibv_par_a_SOURCES = libraries_par = libgasnet-ibv-par.a endif if BUILD_PARSYNC_LIBS libgasnet_ibv_parsync_a_SOURCES = libraries_parsync = libgasnet-ibv-parsync.a endif libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) include $(top_builddir)/other/Makefile-conduit.mak libgasnet-ibv-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-ibv-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-ibv-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync if USE_IBV_CONDUIT lib_LIBRARIES = $(libraries) all-local: $(lib_LIBRARIES) $(pkgconfig_files) clean-local: do-clean-local install-data-local: do-install-data-local uninstall-local: do-uninstall-local else $(top_srcdir)/gasnetex.h: do-error endif gasnet-2025.8.0/ibv-conduit/gasnet_core_internal.h0000664000175000017500000014067115142313673022214 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_core_internal.h $ * Description: GASNet ibv conduit header for internal definitions in Core API * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_CORE_INTERNAL_H #define _GASNET_CORE_INTERNAL_H #include #include // This establishes precedence in one central place #if GASNETC_IBV_ODP_MLNX && GASNETC_IBV_ODP_CORE #undef GASNETC_IBV_ODP_MLNX #endif #if GASNETC_IBV_ODP_MLNX #define GASNETI_NEED_VERBS_EXP_H 1 #endif #include #if GASNETI_NEED_VERBS_EXP_H #include #endif /* TODO: flatten these? */ #if HAVE_IBV_SRQ #define GASNETC_IBV_SRQ 1 #if !GASNET_PSHM #undef GASNETC_IBV_XRC #elif HAVE_IBV_CMD_OPEN_XRCD && HAVE_IBV_CREATE_QP_EX #define GASNETC_IBV_XRC 1 #define GASNETC_IBV_XRC_OFED 1 typedef struct ibv_xrcd gasnetc_xrcd_t; #elif HAVE_IBV_OPEN_XRC_DOMAIN #define GASNETC_IBV_XRC 1 #define GASNETC_IBV_XRC_MLNX 1 typedef struct ibv_xrc_domain gasnetc_xrcd_t; #endif #endif /* whether or not to use spin-locking for HSL's */ #define GASNETC_HSL_SPINLOCK 1 /* GASNETC_FH_OPTIONAL: whether or not firehose can be switched OFF at runtime */ /* Enabled by default for DEBUG builds. For NDEBUG builds, can force at compile time. */ #if defined(GASNETC_FH_OPTIONAL) /* Leave as-is */ #elif GASNET_DEBUG #define GASNETC_FH_OPTIONAL 1 #endif /* check (even in optimized build) for ibv errors */ #define GASNETC_IBV_CHECK(rc,msg) \ if_pf ((rc) != 0) \ { gasneti_fatalerror("Unexpected error %s (rc=%d errno=%d) %s",strerror(errno),(rc), errno,(msg)); } #define GASNETC_IBV_CHECK_PTR(ptr,msg) GASNETC_IBV_CHECK((ptr)==NULL,(msg)) #define GASNETC_CEP_SQ_SEMA(_cep) ((_cep)->sq_sema_p) #if GASNETC_IBV_SRQ #define GASNETC_QPI_IS_REQ(_qpi) ((_qpi) >= gasnetc_num_qps) #else #define GASNETC_QPI_IS_REQ(_qpi) (0) #endif /* check for exit in progress */ extern gasneti_atomic_t gasnetc_exit_running; #define GASNETC_IS_EXITING() gasneti_atomic_read(&gasnetc_exit_running, GASNETI_ATOMIC_RMB_PRE) /* May eventually be a hash? */ #define GASNETC_NODE2CEP(_ep,_node) ((_ep)->cep_table[_node]) /* * In theory all resources should be recovered automatically at process exit. * However, a least Solaris 11.2 has been seen to eventually begin returning * ENOSPC from ibv_create_cq() after a few thousand tests have run. * So, we will make a best-effort to at least destroy QPs and CQs. */ #if PLATFORM_OS_SOLARIS || GASNETC_IBV_QUIESCE #define GASNETC_IBV_SHUTDOWN 1 #endif /* ------------------------------------------------------------------------------------ */ /* Core handlers. * These are registered early and are available even before _attach() */ #define _hidx_gasnetc_ack 0 /* Special case */ #define _hidx_gasnetc_exit_reduce_reqh (GASNETC_HANDLER_BASE+0) #define _hidx_gasnetc_exit_role_reqh (GASNETC_HANDLER_BASE+1) #define _hidx_gasnetc_exit_role_reph (GASNETC_HANDLER_BASE+2) #define _hidx_gasnetc_exit_reqh (GASNETC_HANDLER_BASE+3) #define _hidx_gasnetc_exit_reph (GASNETC_HANDLER_BASE+4) #define _hidx_gasnetc_sys_flush_reph (GASNETC_HANDLER_BASE+5) #define _hidx_gasnetc_sys_close_reqh (GASNETC_HANDLER_BASE+6) /* add new core API handlers here and to the bottom of gasnet_core.c */ /* ------------------------------------------------------------------------------------ */ /* Configure gasnet_event_internal.h and gasnet_event.c */ // TODO-EX: prefix needs to move from "extended" to "core" #define gasnete_op_atomic_(_id) gasnetc_atomic_##_id #define GASNETE_HAVE_LC #define GASNETE_CONDUIT_EOP_FIELDS \ gasnetc_atomic_val_t initiated_cnt; \ gasnetc_atomic_t completed_cnt; \ gasnetc_atomic_val_t initiated_alc; \ gasnetc_atomic_t completed_alc; #define GASNETE_EOP_ALLOC_EXTRA(_eop) do { \ gasnetc_atomic_set(&(_eop)->completed_cnt, 0 , 0); \ gasnetc_atomic_set(&(_eop)->completed_alc, 0 , 0); \ } while (0) #define GASNETE_EOP_PREP_FREE_EXTRA(_eop) do { \ gasneti_assert(gasnetc_atomic_read(&(_eop)->completed_cnt, 0) \ == ((_eop)->initiated_cnt & GASNETI_ATOMIC_MAX)); \ gasneti_assert(gasnetc_atomic_read(&(_eop)->completed_alc, 0) \ == ((_eop)->initiated_alc & GASNETI_ATOMIC_MAX)); \ } while (0) #define _GASNETE_EOP_NEW_EXTRA GASNETE_EOP_PREP_FREE_EXTRA /* ------------------------------------------------------------------------------------ */ /* Internal threads */ /* GASNETC_USE_CONN_THREAD enables a progress thread for establishing dynamic connections. */ #if GASNETC_DYNAMIC_CONNECT && GASNETC_IBV_CONN_THREAD #define GASNETC_USE_CONN_THREAD 1 #else #define GASNETC_USE_CONN_THREAD 0 #endif /* GASNETC_USE_RCV_THREAD enables a progress thread for running AMs. */ #if GASNETC_IBV_RCV_THREAD #define GASNETC_USE_RCV_THREAD 1 #else #define GASNETC_USE_RCV_THREAD 0 #endif // GASNETC_USE_SND_THREAD enables a progress thread for reaping send completions #if GASNETC_IBV_SND_THREAD #define GASNETC_USE_SND_THREAD 1 #else #define GASNETC_USE_SND_THREAD 0 #endif /* ------------------------------------------------------------------------------------ */ /* Measures of concurency * * GASNETC_ANY_PAR Non-zero if multiple threads can be executing in GASNet. * This is inclusive of the AM receive thread. * GASNETC_CLI_PAR Non-zero if multiple _client_ threads can be executing in GASNet. * This excludes the AM receive thread. * These differ from GASNETI_THREADS and GASNETI_CLIENT_THREADS in that they don't count * GASNET_PARSYNC, since it has threads which do not enter GASNet concurrently. */ #if GASNET_PAR #define GASNETC_CLI_PAR 1 #else #define GASNETC_CLI_PAR 0 #endif #define GASNETC_ANY_PAR (GASNETC_CLI_PAR || GASNETC_USE_RCV_THREAD || GASNETC_USE_SND_THREAD) /* ------------------------------------------------------------------------------------ */ #if GASNETC_PIN_SEGMENT /* Max firehose per op is one per local scatter/gather segment */ #define GASNETC_MAX_FH GASNETC_SND_SG #else /* Max firehose per op is one per local scatter/gather segment + one remote */ #define GASNETC_MAX_FH (GASNETC_SND_SG + 1) #endif /* Define non-zero to allow loopback AMs to be assembled on the stack */ #define GASNETC_LOOPBACK_AMS_ON_STACK 1 /* ------------------------------------------------------------------------------------ */ #define GASNETC_ARGSEND_AUX(s,nargs) gasneti_offsetof(s,args[nargs]) typedef struct { gex_AM_Arg_t args[GASNETC_MAX_ARGS]; } gasnetc_shortmsg_t; #define GASNETC_MSG_SHORT_ARGSEND(nargs) GASNETC_ARGSEND_AUX(gasnetc_shortmsg_t,nargs) typedef struct { uint32_t nBytes; /* 16 bits would be sufficient if we ever need the space */ gex_AM_Arg_t args[GASNETC_MAX_ARGS]; } gasnetc_medmsg_t; #define GASNETC_MSG_MED_ARGSEND(nargs) /* Note 8-byte alignment for payload */ \ GASNETI_ALIGNUP(GASNETC_ARGSEND_AUX(gasnetc_medmsg_t,nargs), 8) #define GASNETC_MSG_MED_DATA(msg,nargs) \ ((void *)((uintptr_t)(msg) + GASNETC_MSG_MED_ARGSEND(nargs))) typedef struct { uintptr_t destLoc; int32_t nBytes; gex_AM_Arg_t args[GASNETC_MAX_ARGS]; } gasnetc_longmsg_t; #define GASNETC_MSG_LONG_ARGSEND(nargs) /* Note 8-byte alignment for payload */ \ GASNETI_ALIGNUP(GASNETC_ARGSEND_AUX(gasnetc_longmsg_t,nargs), 8) #define GASNETC_MSG_LONG_DATA(msg,nargs) \ ((void *)((uintptr_t)(msg) + GASNETC_MSG_LONG_ARGSEND(nargs))) typedef union { uint8_t raw[GASNETC_BUFSZ]; gasnetc_shortmsg_t shortmsg; gasnetc_medmsg_t medmsg; gasnetc_longmsg_t longmsg; } gasnetc_buffer_t; /* ------------------------------------------------------------------------------------ */ #if GASNETI_STATS_OR_TRACE #define GASNETC_TRACE_WAIT_BEGIN() \ gasneti_tick_t _waitstart = GASNETI_TICKS_NOW_IFENABLED(C) #else #define GASNETC_TRACE_WAIT_BEGIN() \ static char _dummy = (char)sizeof(_dummy) #endif #define GASNETC_TRACE_WAIT_END(name) \ GASNETI_TRACE_EVENT_TIME(C,name,gasneti_ticks_now() - _waitstart) #define GASNETC_STAT_EVENT(name) \ _GASNETI_STAT_EVENT(C,name) #define GASNETC_STAT_EVENT_VAL(name,val) \ _GASNETI_STAT_EVENT_VAL(C,name,val) /* ------------------------------------------------------------------------------------ */ /* Configuration */ /* Maximum number of segments to gather on send */ #define GASNETC_SND_SG 4 /* maximum number of ops reaped from the send CQ per poll */ #ifndef GASNETC_SND_REAP_LIMIT #define GASNETC_SND_REAP_LIMIT 32 #endif /* maximum number of ops reaped from the recv CQ per poll */ #ifndef GASNETC_RCV_REAP_LIMIT #define GASNETC_RCV_REAP_LIMIT 16 #endif /* Define non-zero if we want to allow the mlock rlimit to bound the * amount of memory we will pin. */ #ifndef GASNETC_HONOR_RLIMIT_MEMLOCK #define GASNETC_HONOR_RLIMIT_MEMLOCK 1 #endif /* Can one send a 0-byte payload? * TODO: autoconf or runtime probe if/when we can determine which systems need this */ #define GASNETC_ALLOW_0BYTE_MSG 0 /* Should dynamic connections use TCP-style rtt estimation? */ #ifndef GASNETC_CONN_USE_SRTT #define GASNETC_CONN_USE_SRTT 1 #endif // When passed GEX_FLAG_IMMEDIATE, may we poll send progress (once) on full SQ? // Doing so will not run AMs but might still perform non-trivial work such as // bounce-buffer copies to complete out-of-segment Gets, as well as returning // resources to their free lists/pools. // DEFAULT: yes #ifndef GASNETC_IMM_MAY_POLL_SQ #define GASNETC_IMM_MAY_POLL_SQ 1 #endif // When passed GEX_FLAG_IMMEDIATE, may we poll send progress (once) on full CQ? // Doing so will not run AMs but might still perform non-trivial work such as // bounce-buffer copies to complete out-of-segment Gets, as well as returning // resources to their free lists/pools. // DEFAULT: yes #ifndef GASNETC_IMM_MAY_POLL_CQ #define GASNETC_IMM_MAY_POLL_CQ 1 #endif /* ------------------------------------------------------------------------------------ */ /* Semaphore, lifo and atomics wrappers * * Only for GASNETC_ANY_PAR do we need true atomics. * In particular neither PARSYNC nor CONN_THREAD introduce concurrency, * but use of "weak" atomics would pay the unnecessary costs for those. */ #if GASNETC_ANY_PAR #define GASNETC_PARSEQ _PAR #define gasnetc_cons_atomic(_id) _CONCAT(gasneti_atomic_,_id) #define gasnetc_cons_atomic32(_id) _CONCAT(gasneti_atomic32_,_id) #define gasnetc_cons_atomic64(_id) _CONCAT(gasneti_atomic64_,_id) #else #define GASNETC_PARSEQ _SEQ #define gasnetc_cons_atomic(_id) _CONCAT(gasneti_nonatomic_,_id) #define gasnetc_cons_atomic32(_id) _CONCAT(gasneti_nonatomic32_,_id) #define gasnetc_cons_atomic64(_id) _CONCAT(gasneti_nonatomic64_,_id) #endif #define GASNETC_SEMA_INITIALIZER GASNETI_CONS_SEMA(GASNETC_PARSEQ,INITIALIZER) #define gasnetc_sema_t gasneti_cons_sema(GASNETC_PARSEQ,t) #define gasnetc_sema_init gasneti_cons_sema(GASNETC_PARSEQ,init) #define gasnetc_sema_read gasneti_cons_sema(GASNETC_PARSEQ,read) #define gasnetc_sema_up gasneti_cons_sema(GASNETC_PARSEQ,up) #define gasnetc_sema_up_n gasneti_cons_sema(GASNETC_PARSEQ,up_n) #define gasnetc_sema_trydown gasneti_cons_sema(GASNETC_PARSEQ,trydown) #define gasnetc_sema_trydown_partial \ gasneti_cons_sema(GASNETC_PARSEQ,trydown_partial) #define GASNETC_LIFO_INITIALIZER GASNETI_CONS_LIFO(GASNETC_PARSEQ,INITIALIZER) #define gasnetc_lifo_head_t gasneti_cons_lifo(GASNETC_PARSEQ,head_t) #define gasnetc_lifo_init gasneti_cons_lifo(GASNETC_PARSEQ,init) #define gasnetc_lifo_pop gasneti_cons_lifo(GASNETC_PARSEQ,pop) #define gasnetc_lifo_push gasneti_cons_lifo(GASNETC_PARSEQ,push) #define gasnetc_lifo_push_many gasneti_cons_lifo(GASNETC_PARSEQ,push_many) #define gasnetc_lifo_link gasneti_lifo_link #define gasnetc_lifo_next gasneti_lifo_next typedef gasnetc_cons_atomic(t) gasnetc_atomic_t; typedef gasnetc_cons_atomic(val_t) gasnetc_atomic_val_t; #define gasnetc_atomic_init gasnetc_cons_atomic(init) #define gasnetc_atomic_read gasnetc_cons_atomic(read) #define gasnetc_atomic_set gasnetc_cons_atomic(set) #define gasnetc_atomic_increment gasnetc_cons_atomic(increment) #define gasnetc_atomic_decrement_and_test gasnetc_cons_atomic(decrement_and_test) #define gasnetc_atomic_compare_and_swap gasnetc_cons_atomic(compare_and_swap) #define gasnetc_atomic_swap gasnetc_cons_atomic(swap) #define gasnetc_atomic_add gasnetc_cons_atomic(add) #define gasnetc_atomic_subtract gasnetc_cons_atomic(subtract) // Narrow subset used for pointers #if PLATFORM_ARCH_32 #define gasnetc_cons_atomic_ptr gasnetc_cons_atomic32 #else #define gasnetc_cons_atomic_ptr gasnetc_cons_atomic64 #endif typedef gasnetc_cons_atomic_ptr(t) gasnetc_atomic_ptr_t; #define gasnetc_atomic_ptr_init gasnetc_cons_atomic_ptr(init) #define gasnetc_atomic_ptr_set gasnetc_cons_atomic_ptr(set) #define gasnetc_atomic_ptr_read gasnetc_cons_atomic_ptr(read) #define gasnetc_atomic_ptr_compare_and_swap gasnetc_cons_atomic_ptr(compare_and_swap) #define gasnetc_atomic_ptr_swap gasnetc_cons_atomic_ptr(swap) /* ------------------------------------------------------------------------------------ */ /* Wrap mmap and munmap so we can do without them if required */ #if HAVE_MMAP #include /* For MAP_FAILED */ #define GASNETC_MMAP_FAILED MAP_FAILED #define gasnetc_mmap(_size) gasneti_mmap(_size) #define gasnetc_munmap(_ptr,_size) gasneti_munmap(_ptr,_size) #else #define GASNETI_MMAP_GRANULARITY (((size_t)1)<<22) /* 4 MB */ #define GASNETI_MMAP_LIMIT (((size_t)1)<<31) /* 2 GB */ #define GASNETC_MMAP_FAILED NULL extern int gasnetc_munmap(void *addr, size_t size); GASNETI_INLINE(gasnetc_mmap) void *gasnetc_mmap(size_t size) { void *result; return posix_memalign(&result, GASNET_PAGESIZE, size) ? GASNETC_MMAP_FAILED : result; } #endif /* ------------------------------------------------------------------------------------ */ /* Type and ops for rdma counters */ typedef struct { gasnetc_atomic_t completed; gasnetc_atomic_val_t initiated; } gasnetc_counter_t; #define GASNETC_COUNTER_INITIALIZER {gasnetc_atomic_init(0), 0} #define gasnetc_counter_init(P) do { gasnetc_atomic_set(&(P)->completed, 0, 0); \ (P)->initiated = 0; \ } while (0) #define gasnetc_counter_done(P) (((P)->initiated & GASNETI_ATOMIC_MAX) == \ gasnetc_atomic_read(&(P)->completed, 0)) #define gasnetc_counter_inc(P) do { (P)->initiated++; } while (0) #define gasnetc_counter_inc_by(P,v) do { (P)->initiated += (v); } while (0) #define gasnetc_counter_inc_if(P) do { if(P) gasnetc_counter_inc(P); } while (0) #define gasnetc_counter_inc_if_pf(P) do { if_pf(P) gasnetc_counter_inc(P); } while (0) #define gasnetc_counter_inc_if_pt(P) do { if_pt(P) gasnetc_counter_inc(P); } while (0) #define gasnetc_counter_dec(P) gasnetc_atomic_increment(&(P)->completed, 0) #define gasnetc_counter_dec_by(P,v) gasnetc_atomic_add(&(P)->completed,(v),0) #define gasnetc_counter_dec_if(P) do { if(P) gasnetc_counter_dec(P); } while (0) #define gasnetc_counter_dec_if_pf(P) do { if_pf(P) gasnetc_counter_dec(P); } while (0) #define gasnetc_counter_dec_if_pt(P) do { if_pt(P) gasnetc_counter_dec(P); } while (0) /* Wait until given counter is marked as done. * Note that no AMPoll is done in the best case. */ extern void gasnetc_counter_wait_aux(gasnetc_counter_t *counter, int handler_context GASNETI_THREAD_FARG); GASNETI_INLINE(gasnetc_counter_wait) void gasnetc_counter_wait(gasnetc_counter_t *counter, int handler_context GASNETI_THREAD_FARG) { if_pf (!gasnetc_counter_done(counter)) { gasnetc_counter_wait_aux(counter, handler_context GASNETI_THREAD_PASS); } gasneti_sync_reads(); } /* ------------------------------------------------------------------------------------ */ #if (GASNETC_IB_MAX_HCAS > 1) extern int gasnetc_num_hcas; #define GASNETC_FOR_ALL_HCA_INDEX(h) for (h = 0; h < gasnetc_num_hcas; ++h) #define GASNETC_FOR_ALL_HCA(p) for (p = &gasnetc_hca[0]; p < &gasnetc_hca[gasnetc_num_hcas]; ++p) #else #define gasnetc_num_hcas (1) #define GASNETC_FOR_ALL_HCA_INDEX(h) for (h = 0; h < 1; ++h) #define GASNETC_FOR_ALL_HCA(p) for (p = &gasnetc_hca[0]; p < &gasnetc_hca[1]; ++p) #endif /* ------------------------------------------------------------------------------------ */ // AuxSeg space for Remote Atomics and Fenced Puts extern gasneti_auxseg_request_t gasnetc_atomics_auxseg_alloc(gasnet_seginfo_t *auxseg_info); #define GASNETC_AUXSEG_FNS() gasnetc_atomics_auxseg_alloc, extern uint64_t *gasnetc_ratomic_sink; // TODO: one per HCA #define GASNETC_RATOMIC_SINK(cep) gasnetc_ratomic_sink #if (GASNETC_IB_MAX_HCAS > 1) extern gasnet_seginfo_t *gasnetc_fence_auxseg; #define GASNETC_FENCE_ADDR_(jobrank,n) \ ((uintptr_t)gasnetc_fence_auxseg[(jobrank)].addr + (n << GASNETI_CACHE_LINE_SHIFT)) #define GASNETC_FENCE_REM_ADDR(cep) GASNETC_FENCE_ADDR_(gasnetc_epid2node(cep->epid), 1) #define GASNETC_FENCE_LOC_ADDR(cep) GASNETC_FENCE_ADDR_(gasneti_mynode, 0) // Use AMO after Put to fence for strict memory model adherence extern int gasnetc_use_fenced_puts; #define GASNETC_USE_FENCED_PUTS gasnetc_use_fenced_puts #define GASNETC_HAVE_FENCED_PUTS 1 #else #define GASNETC_USE_FENCED_PUTS 0 #undef GASNETC_HAVE_FENCED_PUTS #endif /* ------------------------------------------------------------------------------------ */ // Either 0 or 1 to control use of IBV_SEND_SIGNALED // Currently only for fencing on multi-rail #define GASNETC_USE_SEND_SIGNALLED GASNETC_USE_FENCED_PUTS /* ------------------------------------------------------------------------------------ */ // Optional per-cq serialization of calls to ibv_poll_cq() #if GASNETC_ANY_PAR #ifndef GASNETC_SERIALIZE_POLL_CQ #define GASNETC_SERIALIZE_POLL_CQ GASNETC_IBV_SERIALIZE_POLL_CQ_CONFIGURE #endif #else #undef GASNETC_SERIALIZE_POLL_CQ #endif #if GASNETC_SERIALIZE_POLL_CQ #define GASNETC_POLL_CQ_UP(sema_p) \ gasnetc_atomic_set((sema_p),0,0) #define GASNETC_POLL_CQ_TRYDOWN(sema_p) \ (gasnetc_atomic_read((sema_p),0) || \ !gasnetc_atomic_compare_and_swap((sema_p),0,1,0)) #if GASNETC_USE_RCV_THREAD extern int gasnetc_rcv_thread_poll_serialize; extern int gasnetc_rcv_thread_poll_exclusive; #endif #if GASNETC_USE_SND_THREAD extern int gasnetc_snd_thread_poll_serialize; extern int gasnetc_snd_thread_poll_exclusive; #endif #else #define GASNETC_POLL_CQ_UP(sema_p) do {} while (0) #define GASNETC_POLL_CQ_TRYDOWN(sema_p) (0) #endif #define GASNETC_POLL_CQ_UP_SND(hca) GASNETC_POLL_CQ_UP(&((hca)->poll_cq_semas.snd)) #define GASNETC_POLL_CQ_UP_RCV(hca) GASNETC_POLL_CQ_UP(&((hca)->poll_cq_semas.rcv)) #define GASNETC_POLL_CQ_TRYDOWN_SND(hca) GASNETC_POLL_CQ_TRYDOWN(&((hca)->poll_cq_semas.snd)) #define GASNETC_POLL_CQ_TRYDOWN_RCV(hca) GASNETC_POLL_CQ_TRYDOWN(&((hca)->poll_cq_semas.rcv)) /* ------------------------------------------------------------------------------------ */ /* Description of a pre-pinned memory region */ typedef struct { struct ibv_mr * handle; /* used to release or modify the region */ uintptr_t addr; size_t len; } gasnetc_memreg_t; #if GASNETI_CONDUIT_THREADS typedef struct { /* Initialized by create_cq or spawn_progress_thread: */ pthread_t thread_id; struct { uint64_t ns; uint64_t timestamp; } thread_rate; struct { uint64_t ns; uint64_t timestamp; } keep_alive; struct ibv_cq * cq; struct ibv_comp_channel *compl; volatile int started; volatile int done; /* Initialized by client: */ void (*fn)(struct ibv_wc *, void *); void *fn_arg; gasnetc_atomic_t *serialize_poll; gasnetc_atomic_t *exclusive_poll; } gasnetc_progress_thread_t; #else typedef void gasnetc_progress_thread_t; #endif /* * gasnetc_epid_d is node and qp encoded together * passing just a node (the default) means any qp to that node */ typedef uint32_t gasnetc_epid_t; /* The 'epid' type holds 'node' in the low 16 bits. * The upper 16 bits holds a qp index (qpi). * A qpi of zero is a wildcard (an 'unbound' epid). * Therefore, setting epid=node means "use any qp for that node". * Non-zero qpi is 1 + the array index of the desired queue pair. */ #define gasnetc_epid2node(E) ((E)&0xffff) #define gasnetc_epid2qpi(E) ((E)>>16) #define gasnetc_epid(N,Q) ((N)|(((Q)+1)<<16)) /* Forward decl */ struct gasnetc_cep_t_; typedef struct gasnetc_cep_t_ gasnetc_cep_t; /* Structure for an HCA */ typedef struct { struct ibv_context * handle; gasnetc_memreg_t rcv_reg; gasnetc_memreg_t snd_reg; gasnetc_memreg_t aux_reg; #if GASNETC_PIN_SEGMENT uint32_t *rkeys; // RKeys registered at attach time #endif #if GASNETC_IBV_ODP struct { struct ibv_mr * handle; uint32_t lkey; } implicit_odp; #endif uint32_t *aux_rkeys; #if GASNETC_IBV_SRQ struct ibv_srq *rqst_srq; struct ibv_srq *repl_srq; gasnetc_sema_t am_sema; #endif gasnetc_sema_t *snd_cq_sema_p; #if GASNETC_IBV_XRC gasnetc_xrcd_t *xrc_domain; #endif struct ibv_cq * rcv_cq; struct ibv_cq * snd_cq; /* Includes Reply AMs when SRQ in use */ struct ibv_pd * pd; int hca_index; const char *hca_id; struct ibv_device_attr hca_cap; int qps; /* qps per peer */ int max_qps; /* maximum total over all peers */ int num_qps; /* current total over all peers */ #if GASNETC_BUILD_IBVRATOMIC int amo_bswap; // AMO result byteorder differs from host's #endif void *rbufs; gasnetc_lifo_head_t rbuf_freelist; #if GASNETC_USE_RCV_THREAD /* Rcv thread */ gasnetc_progress_thread_t rcv_thread; struct gasnetc_rbuf_s *rcv_thread_priv; #if GASNETI_THREADINFO_OPT gasnet_threadinfo_t rcv_threadinfo; #endif #endif #if GASNETC_USE_SND_THREAD /* Snd thread */ gasnetc_progress_thread_t snd_thread; #endif #if GASNETC_SERIALIZE_POLL_CQ struct { char pad0[GASNETI_CACHE_LINE_BYTES]; gasnetc_atomic_t snd; char pad1[GASNETI_CACHE_LINE_BYTES - sizeof(gasnetc_atomic_t)]; gasnetc_atomic_t rcv; char pad2[GASNETI_CACHE_LINE_BYTES - sizeof(gasnetc_atomic_t)]; } poll_cq_semas; #endif } gasnetc_hca_t; // Structure for a cep (connection end-point) // // WARNING This structure is carefully cache aligned. WARNING // WARNING When adding or removing fields: WARNING // WARNING + Add to Read/write or Read-only section as appropriate. WARNING // WARNING + Sort fields by size to avoid inter-field padding. WARNING // WARNING + Update _GASNETC_CEP_* macros to accurately track sizes. WARNING struct gasnetc_cep_t_ { // // Read/write fields // int used; // boolean - true if cep has sent traffic struct { // AM flow control coalescing (use of struct is historical) gasnetc_atomic_t credit; } am_flow; gasnetc_sema_t am_rem; // control in-flight AM Requests (remote rcv queue slots) // In a GASNETI_THREADS build, the type gasnetc_sema_t contains internal padding to make // it occupy a full cacheline (or a multiple thereof). // This is how much data came *before* the semaphore (assuming gasnetc_atomic_t alignment) #define _GASNETC_CEP_RW_EARLY GASNETI_ALIGNUP_NOASSERT(sizeof(int)+sizeof(gasnetc_atomic_t),\ sizeof(gasneti_weakatomic_t)) // This is total size of R/W fields, with possible trailing padding prior to R/O fields, // correct independent of GASNETI_THREADS #define _GASNETC_CEP_RW_BYTES GASNETI_ALIGNUP_NOASSERT(_GASNETC_CEP_RW_EARLY+sizeof(gasnetc_sema_t),\ sizeof(void *)) // // Read-only fields // // Many are duplicated from fields in cep->hca, as noted // These are sorted by size to get dense packing // 64-bit fields // None currently // Change _GASNETC_CEP_RW_BYTES's alignment to 8 if any are added // Pointer-width fields gasnetc_hca_t *hca; gasnetc_sema_t *snd_cq_sema_p; /* Limits in-flight ops (send completion queue slots). Copy of hca->snd_cq_sema_p */ gasnetc_sema_t *sq_sema_p; // Pointer to a sq_sema gasnetc_lifo_head_t *rbuf_freelist; /* Source of rcv buffers for AMs. Copy of &hca->rbuf_freelist */ struct ibv_qp *qp_handle; #define _GASNETC_CEP_PTR_0 5*sizeof(void*) #if GASNETC_IBV_SRQ struct ibv_srq *srq; // Copy of hca->repl_srq OR hca->rqst_srq #define _GASNETC_CEP_PTR_1 1*sizeof(void*) #else #define _GASNETC_CEP_PTR_1 0 #endif #if GASNETC_IBV_XRC_OFED struct ibv_qp *rcv_qp; #define _GASNETC_CEP_PTR_2 1*sizeof(void*) #else #define _GASNETC_CEP_PTR_2 0 #endif // 32-bit fields gasnetc_epid_t epid; // == uint32_t #define _GASNETC_CEP_32_0 4 #if GASNETC_PIN_SEGMENT uint32_t rkey; // Copy of hca->rkeys[gasnetc_epid2node(epid)] #define _GASNETC_CEP_32_1 1*4 #else #define _GASNETC_CEP_32_1 0 #endif #if (GASNETC_IB_MAX_HCAS > 1) uint32_t rcv_lkey; // Copy of hca->rcv_reg.handle->lkey uint32_t snd_lkey; // Copy of hca->snd_reg.handle->lkey int hca_index; // Copy of hca->hca_index #define _GASNETC_CEP_32_2 3*4 #else #define _GASNETC_CEP_32_2 0 #endif #if GASNETC_IBV_SRQ uint32_t rcv_qpn; #define _GASNETC_CEP_32_3 1*4 #else #define _GASNETC_CEP_32_3 0 #endif #if GASNETC_IBV_XRC uint32_t xrc_remote_srq_num; #define _GASNETC_CEP_32_4 1*4 #else #define _GASNETC_CEP_32_4 0 #endif #define _GASNETC_CEP_TO_PAD (\ _GASNETC_CEP_RW_BYTES + \ _GASNETC_CEP_PTR_0+_GASNETC_CEP_PTR_1+_GASNETC_CEP_PTR_2 + \ _GASNETC_CEP_32_0+_GASNETC_CEP_32_1+_GASNETC_CEP_32_2+_GASNETC_CEP_32_3+_GASNETC_CEP_32_4) #if GASNETI_THREADS char _pad0[GASNETI_CACHE_PAD(_GASNETC_CEP_TO_PAD)]; #endif }; /* Info used while probing for HCAs/ports */ typedef struct { int hca_index; /* Slot in gasnetc_hca[] */ uint8_t port_num; /* Port number */ uint16_t pkey_index; struct ibv_port_attr port; /* Port info */ int rd_atom; uint16_t *remote_lids; } gasnetc_port_info_t; // Conduit-specific EP type typedef struct gasnetc_EP_t_ { GASNETI_EP_COMMON // conduit-indep part as prefix gasnetc_cep_t **cep_table; // QP, flow-control, etc } *gasnetc_EP_t; extern gasnetc_EP_t gasnetc_ep0; // Conduit-specific Segment type typedef struct gasnetc_Segment_t_ { GASNETI_SEGMENT_COMMON // conduit-indep part as prefix #if GASNETC_PIN_SEGMENT // memory registation info (per-HCA) uint32_t seg_lkey[GASNETC_IB_MAX_HCAS]; gasnetc_memreg_t seg_reg[GASNETC_IB_MAX_HCAS]; #endif } *gasnetc_Segment_t; /* Description of a receive buffer. * * Note that use of the freelist will overwrite the first sizeof(void *) bytes (linkage). * Note the macros following the typedef are used to hide the existence of the union. */ typedef struct gasnetc_rbuf_s { union { void *linkage; struct { /* Fields intialized at recv time: */ #if GASNETI_THREADINFO_OPT gasnet_threadinfo_t threadinfo; #endif #if GASNET_DEBUG int handlerRunning; #endif int needReply; uint32_t flags; } am; } u; /* Field that changes each time the rbuf is posted */ gasnetc_cep_t *cep; /* Fields fixed for life of the rbuf as it is reused */ struct ibv_recv_wr rr_desc; /* recv request descriptor */ struct ibv_sge rr_sg; /* single-entry scatter list */ gasnetc_EP_t rr_ep; } gasnetc_rbuf_t; #if GASNET_DEBUG #define rbuf_handlerRunning u.am.handlerRunning #endif #define rbuf_needReply u.am.needReply #define rbuf_flags u.am.flags #define rbuf_threadinfo u.am.threadinfo #define GASNETC_OP_NEEDS_FENCE 0x1000 // Flag bit typedef enum { // Reminder: update gasnetc_opcode_str() when modifying this enum GASNETC_OP_FREE, GASNETC_OP_AM, GASNETC_OP_ATOMIC, GASNETC_OP_ATOMIC_BOUNCE, GASNETC_OP_GET_ZEROCP, #if GASNETC_PIN_SEGMENT && GASNETC_FH_OPTIONAL GASNETC_OP_GET_BOUNCE, #endif #if GASNETC_HAVE_FENCED_PUTS GASNETC_OP_FENCE, #endif #if !GASNETC_PIN_SEGMENT GASNETC_OP_PUT_INMOVE, #endif // Long payload puts do NOT need fencing (see bug 4049) GASNETC_OP_LONG_ZEROCP, GASNETC_OP_LONG_BOUNCE, // Following all have GASNETC_OP_NEEDS_FENCE bit set GASNETC_OP_PUT_INLINE = GASNETC_OP_NEEDS_FENCE, GASNETC_OP_PUT_ZEROCP, GASNETC_OP_PUT_BOUNCE, GASNETC_OP_INVALID } gasnetc_sreq_opcode_t; /* Use of IB's 32-bit immediate data: * 0-7: handlerID * 8-9: category * 10-14: numargs (5 bits, but only 0-GASNETC_MAX_ARGS are legal values) * 15: request (0) or reply (1) * 16-31: source node // TODO-EX: how to scale out past this limit? */ #define GASNETC_MSG_HANDLERID(flags) ((gex_AM_Index_t)(flags)) #define GASNETC_MSG_CATEGORY(flags) ((gasneti_category_t)(((flags) >> 8) & 0x3)) #define GASNETC_MSG_NUMARGS(flags) (((flags) >> 10) & 0x1f) #define GASNETC_MSG_ISREPLY(flags) ((flags) & (1<<15)) #define GASNETC_MSG_ISREQUEST(flags) (!GASNETC_MSG_ISREPLY(flags)) #define GASNETC_MSG_SRCIDX(flags) ((gex_Rank_t)((flags) >> 16) & 0xffff) #define GASNETC_MSG_GENFLAGS(isreq, cat, nargs, hand, srcidx) \ (gasneti_assert(0 == ((srcidx) & ~0xffff)), \ gasneti_assert(0 == ((nargs) & ~0x1f)), \ gasneti_assert(0 == ((cat) & ~3)), \ gasneti_assert((nargs) <= GASNETC_MAX_ARGS), \ gasneti_assert((srcidx) < gasneti_nodes), \ (uint32_t)( ((nargs) << 10 ) \ | ((isreq) ? 0 : (1<<15)) \ | ((srcidx) << 16 ) \ | ((cat) << 8 ) \ | ((hand) ))) // Use of a hidden 32-bit arg for piggy-backed credits + actual argument count #define GASNETC_GEN_HIDDEN_ARG(credits, numargs) ((credits) | (((numargs) + 1) << 16)) #define GASNETC_HIDDEN_ARG_CREDITS(args) ((args)[0] & 0xff) #define GASNETC_HIDDEN_ARG_FULL_NARGS(args) (((args)[0] >> 16) & 0x1f) typedef void (*gasnetc_cb_t)(gasnetc_atomic_val_t *); /* Description of a send request. * * Note that use of the freelist will overwrite the first sizeof(void *) bytes. */ typedef struct gasnetc_sreq_t_ { /* List linkage */ struct gasnetc_sreq_t_ *next; /* Opcode for completion, and as tag for union */ gasnetc_sreq_opcode_t opcode; /* Communication end point */ gasnetc_epid_t epid; gasnetc_cep_t *cep; /* Completion callback and initiated counter */ struct { gasnetc_cb_t cb; gasnetc_atomic_val_t *data; } comp; #if GASNET_DEBUG // Arguments for async error reporting // TODO: AMO (for fences only, atm)? union { struct { uintptr_t loc_addr; uintptr_t rem_addr; uint32_t length; } rdma; struct { uint32_t imm_data; int num_sge; uintptr_t addr[2]; uint32_t length[2]; } am; } args; enum ibv_send_flags send_flags; enum ibv_wr_opcode wr_opcode; #endif #if GASNETC_PIN_SEGMENT /* Firehose, bounce buffers, and AMs are mutually exclusive. */ union { struct { /* Firehose data */ int count; const firehose_request_t *ptr[GASNETC_MAX_FH]; } fh; struct { /* Bounce buffer data */ gasnetc_buffer_t *buff; void *addr; /* local address for bounced GETs */ size_t len; /* length for bounced GETs */ } bb; struct { /* AM buffer */ gasnetc_buffer_t *buff; } am; #if GASNETC_HAVE_FENCED_PUTS struct { // Atomic used to fence a multi-rail Put struct gasnetc_sreq_t_ *sreq; } fence; #endif } u; #define fh_count u.fh.count #define fh_ptr u.fh.ptr #define bb_buff u.bb.buff #define bb_addr u.bb.addr #define bb_len u.bb.len #define am_buff u.am.buff #define fence_sreq u.fence.sreq #else /* Firehose, and AMs are mutually exclusive. */ union { /* Firehose data */ struct { int count; const firehose_request_t *ptr[GASNETC_MAX_FH]; size_t len; size_t putinmove; /* bytes piggybacked on an Move AM */ uintptr_t loc_addr; uintptr_t rem_addr; gasnetc_EP_t ep; gasnetc_buffer_t *bbuf; gasnetc_atomic_t ready; /* 0 when loc and rem both ready */ gasnetc_counter_t *oust; /* fh transactions outstanding */ /* source memory refs completed (local completion) */ gasnetc_atomic_val_t *lc; gasnetc_cb_t lc_cb; } fh; struct { /* AM buffer */ gasnetc_buffer_t *buff; } am; #if GASNETC_IB_MAX_HCAS > 1 struct { // Atomic used to fence a multi-rail Put struct gasnetc_sreq_t_ *sreq; } fence; #endif } u; #define fh_count u.fh.count #define fh_ptr u.fh.ptr #define fh_len u.fh.len #define fh_putinmove u.fh.putinmove #define fh_loc_addr u.fh.loc_addr #define fh_rem_addr u.fh.rem_addr #define fh_ep u.fh.ep #define fh_bbuf u.fh.bbuf #define fh_ready u.fh.ready #define fh_oust u.fh.oust #define fh_lc u.fh.lc #define fh_lc_cb u.fh.lc_cb #define am_buff u.am.buff #define fence_sreq u.fence.sreq #endif } gasnetc_sreq_t; // Common #if GASNETC_BUILD_IBVRATOMIC #define amo_bbuf bb_buff #define amo_result bb_addr #endif /* Temporary buffer space used for constructing AMs on the stack */ typedef union { gasnetc_shortmsg_t shortmsg; gasnetc_medmsg_t medmsg; gasnetc_longmsg_t longmsg; uint8_t raw[128]; } gasnetc_am_tmp_buf_t; #if GASNETC_IB_MAX_HCAS > 1 #define GASNETC_SND_LKEY(_cep) ((_cep)->snd_lkey) #define GASNETC_RCV_LKEY(_cep) ((_cep)->rcv_lkey) #define GASNETC_SEG_LKEY(_ep,_cep) (((gasnetc_Segment_t)(_ep)->_segment)->seg_lkey[(_cep)->hca_index]) #else #define GASNETC_SND_LKEY(_cep) (gasnetc_hca[0].snd_reg.handle->lkey) #define GASNETC_RCV_LKEY(_cep) (gasnetc_hca[0].rcv_reg.handle->lkey) #define GASNETC_SEG_LKEY(_ep,_cep) (((gasnetc_Segment_t)(_ep)->_segment)->seg_lkey[0]) #endif #define GASNETC_SEG_RKEY(_cep) ((_cep)->rkey) /* ------------------------------------------------------------------------------------ */ /* Routines in gasnet_core_connect.c */ #if GASNETC_IBV_XRC extern size_t gasnetc_xrc_preinit(const uint16_t *remote_lids); extern int gasnetc_xrc_init(void **shared_mem_p); #endif extern int gasnetc_connect_init(gasnetc_EP_t ep0); // TODO-EX: multi-ep support? extern int gasnetc_connect_fini(gasnetc_EP_t ep0); // TODO-EX: multi-ep support? #if GASNETC_IBV_SHUTDOWN extern void gasnetc_connect_shutdown(gasnetc_EP_t ep0); // TODO-EX: multi-ep support? #endif #if GASNETC_DYNAMIC_CONNECT extern gasnetc_cep_t *gasnetc_connect_to(gasnetc_EP_t ep, gex_Rank_t node); extern void gasnetc_conn_implied_ack(gasnetc_EP_t ep, gex_Rank_t node); extern void gasnetc_conn_rcv_wc(struct ibv_wc *comp); extern void gasnetc_conn_snd_wc(struct ibv_wc *comp); #endif /* Callback functions in gasnet_core_sndrcv.c */ /* eop: */ extern void gasnetc_cb_eop_alc(gasnetc_atomic_val_t *); extern void gasnetc_cb_eop_put(gasnetc_atomic_val_t *); extern void gasnetc_cb_eop_get(gasnetc_atomic_val_t *); /* iop within nbi-accessregion: */ extern void gasnetc_cb_nar_alc(gasnetc_atomic_val_t *); extern void gasnetc_cb_nar_put(gasnetc_atomic_val_t *); extern void gasnetc_cb_nar_get(gasnetc_atomic_val_t *); /* iop not in nbi-accessregion: */ extern void gasnetc_cb_iop_alc(gasnetc_atomic_val_t *); extern void gasnetc_cb_iop_put(gasnetc_atomic_val_t *); extern void gasnetc_cb_iop_get(gasnetc_atomic_val_t *); /* gasnetc_counter_t: */ extern void gasnetc_cb_counter(gasnetc_atomic_val_t *); extern void gasnetc_cb_counter_rel(gasnetc_atomic_val_t *); /* Routines in gasnet_core_sndrcv.c */ extern int gasnetc_create_cq(struct ibv_context *, int, struct ibv_cq * *, int *, gasnetc_progress_thread_t *); extern int gasnetc_sndrcv_limits(void); extern int gasnetc_sndrcv_init(gasnetc_EP_t); extern void gasnetc_sys_flush_reph(gex_Token_t, gex_AM_Arg_t); extern void gasnetc_sys_close_reqh(gex_Token_t); extern void gasnetc_sndrcv_quiesce(void); extern int gasnetc_sndrcv_shutdown(void); extern void gasnetc_sndrcv_init_peer(gex_Rank_t node, gasnetc_cep_t *cep); extern void gasnetc_sndrcv_init_inline(void); extern void gasnetc_sndrcv_attach_peer(gex_Rank_t node, gasnetc_cep_t *cep); extern void gasnetc_sndrcv_start_thread(gex_Flags_t); extern void gasnetc_sndrcv_stop_thread(int block); extern void gasnetc_sndrcv_poll(int handler_context); extern int gasnetc_rdma_put( gex_TM_t tm, gex_Rank_t rank, void *src_ptr, void *dst_ptr, size_t nbytes, gex_Flags_t flags, gasnetc_atomic_val_t *local_cnt, gasnetc_cb_t local_cb, gasnetc_atomic_val_t *remote_cnt, gasnetc_cb_t remote_cb GASNETI_THREAD_FARG); extern int gasnetc_rdma_long_put( gasnetc_EP_t ep, gasnetc_cep_t *cep, void *src_ptr, void *dst_ptr, size_t nbytes, gex_Flags_t flags, gasnetc_atomic_val_t *local_cnt, gasnetc_cb_t local_cb GASNETI_THREAD_FARG); extern int gasnetc_rdma_get( gex_TM_t tm, gex_Rank_t rank, void *src_ptr, void *dst_ptr, size_t nbytes, gex_Flags_t flags, gasnetc_atomic_val_t *remote_cnt, gasnetc_cb_t remote_cb GASNETI_THREAD_FARG); extern gasnetc_buffer_t *gasnetc_get_bbuf(int block GASNETI_THREAD_FARG) GASNETI_MALLOC; GASNETI_MALLOCP(gasnetc_get_bbuf) #if GASNETC_IBV_SRQ extern gasnetc_buffer_t *gasnetc_get_bbuf_srq(int block, int is_reply GASNETI_THREAD_FARG) GASNETI_MALLOC; GASNETI_MALLOCP(gasnetc_get_bbuf_srq) #define gasnetc_get_bbuf_am(is_reply,block_and_ti) gasnetc_get_bbuf_srq(is_reply, block_and_ti) #else #define gasnetc_get_bbuf_am(is_reply,block_and_ti) gasnetc_get_bbuf(block_and_ti) #endif extern void gasnetc_put_bbuf(gasnetc_buffer_t *bbuf); extern gasnetc_sreq_t *gasnetc_get_sreq(gasnetc_sreq_opcode_t opcode GASNETI_THREAD_FARG) GASNETI_MALLOC; GASNETI_MALLOCP(gasnetc_get_sreq) extern gasnetc_epid_t gasnetc_epid_select_qpi(gasnetc_cep_t *ceps, gasnetc_epid_t epid); #if GASNETC_DYNAMIC_CONNECT || GASNETC_IBV_SRQ extern gasnetc_cep_t *gasnetc_bind_cep_inner(gasnetc_EP_t ep, gasnetc_epid_t epid, gasnetc_sreq_t *sreq, int block, int is_reply GASNETI_THREAD_FARG); #define gasnetc_bind_cep(ep,id,s) gasnetc_bind_cep_inner((ep),(id),(s),1,0 GASNETI_THREAD_PASS) #define gasnetc_bind_cep_am(ep,id,s,b,i) gasnetc_bind_cep_inner((ep),(id),(s),(b),(i) GASNETI_THREAD_PASS) #else extern gasnetc_cep_t *gasnetc_bind_cep_inner(gasnetc_EP_t ep, gasnetc_epid_t epid, gasnetc_sreq_t *sreq, int block); #define gasnetc_bind_cep(ep,id,s) gasnetc_bind_cep_inner((ep),(id),(s),1) #define gasnetc_bind_cep_am(ep,id,s,b,i) gasnetc_bind_cep_inner((ep),(id),(s),(b)) #endif extern int gasnetc_snd_reserve(gasnetc_cep_t * const cep); extern void gasnetc_snd_post_common( gasnetc_sreq_t *sreq, struct ibv_send_wr *sr_desc, int reserved, int is_inline GASNETI_THREAD_FARG); extern void gasnetc_poll_rcv_hca(gasnetc_EP_t ep, gasnetc_hca_t *hca, int limit GASNETI_THREAD_FARG); extern void gasnetc_poll_rcv_all(gasnetc_EP_t ep, int limit GASNETI_THREAD_FARG); extern int gasnetc_snd_reap(int limit); GASNETI_INLINE(gasnetc_do_poll) void gasnetc_do_poll(int poll_rcv, int poll_snd GASNETI_THREAD_FARG) { const gasnetc_EP_t ep = gasnetc_ep0; // TODO-EX: replace this via args if (poll_rcv) { gasnetc_poll_rcv_all(ep, GASNETC_RCV_REAP_LIMIT GASNETI_THREAD_PASS); } if (poll_snd) { (void)gasnetc_snd_reap(GASNETC_SND_REAP_LIMIT); } } #define gasnetc_poll_rcv() gasnetc_do_poll(1,0 GASNETI_THREAD_PASS) #define gasnetc_poll_snd() gasnetc_do_poll(0,1 GASNETI_THREAD_PASS) #define gasnetc_poll_both() gasnetc_do_poll(1,1 GASNETI_THREAD_PASS) /* Routines in gasnet_core_thread.c */ #if GASNETI_CONDUIT_THREADS extern void *gasnetc_progress_thread(void *arg); extern void gasnetc_spawn_progress_thread(gasnetc_progress_thread_t *pthr); extern void gasnetc_stop_progress_thread(gasnetc_progress_thread_t *pthr, int block); #endif /* General routines in gasnet_core.c */ extern gex_Rank_t gasnetc_msgsource(gex_Token_t token); extern int gasnetc_pin(gasnetc_hca_t *hca, void *addr, size_t size, enum ibv_access_flags acl, gasnetc_memreg_t *reg); extern void gasnetc_unpin(gasnetc_hca_t *hca, gasnetc_memreg_t *reg); #define gasnetc_unmap(reg) gasnetc_munmap((void *)((reg)->addr), (reg)->len) // Routines in gasnet_ratomic.c #if GASNETC_BUILD_IBVRATOMIC extern int gasnetc_ratomic_init(gasnetc_EP_t ep0); // TODO-EX: multi-ep support? #endif /* Bootstrap support */ extern gasneti_spawnerfn_t const *gasneti_spawner; /* This indirection allows us to drop-in a native implementation after init */ extern void gasneti_bootstrapBarrier(void); extern void gasneti_bootstrapExchange(void *src, size_t len, void *dest); #define gasneti_bootstrapBroadcast (*(gasneti_spawner->Broadcast)) #define gasneti_bootstrapNbrhdBroadcast (*(gasneti_spawner->NbrhdBroadcast)) #define gasneti_bootstrapAlltoall (*(gasneti_spawner->Alltoall)) #define gasneti_bootstrapAbort (*(gasneti_spawner->Abort)) #define gasneti_bootstrapCleanup (*(gasneti_spawner->Cleanup)) #define gasneti_bootstrapFini (*(gasneti_spawner->Fini)) /* Global configuration variables */ extern int gasnetc_op_oust_limit; extern int gasnetc_op_oust_pp; extern int gasnetc_am_oust_limit; extern int gasnetc_am_oust_pp; extern int gasnetc_bbuf_limit; #if GASNETC_BUILD_IBVRATOMIC extern int gasnetc_ratomicbuf_limit; #endif extern int gasnetc_conn_static; #if GASNETC_DYNAMIC_CONNECT extern int gasnetc_conn_dynamic; extern int gasnetc_ud_rcvs; extern int gasnetc_ud_snds; #else #define gasnetc_ud_rcvs 0 #define gasnetc_ud_snds 0 #endif extern const char * gasnetc_connectfile_in; extern const char * gasnetc_connectfile_out; extern int gasnetc_connectfile_out_base; extern int gasnetc_use_rcv_thread; extern int gasnetc_use_snd_thread; extern int gasnetc_am_credits_slack; extern int gasnetc_alloc_qps; /* Number of QPs per node in gasnetc_ceps[] */ extern int gasnetc_num_qps; /* How many QPs to use per peer */ extern size_t gasnetc_packedlong_limit; extern size_t gasnetc_inline_limit; extern size_t gasnetc_nonbulk_bounce_limit; #if !GASNETC_PIN_SEGMENT extern size_t gasnetc_putinmove_limit; #endif extern size_t gasnetc_am_inline_limit_sndrcv; #if GASNETC_FH_OPTIONAL #define GASNETC_USE_FIREHOSE GASNETT_PREDICT_TRUE(gasnetc_use_firehose) extern int gasnetc_use_firehose; #else #define GASNETC_USE_FIREHOSE 1 #endif extern enum ibv_mtu gasnetc_max_mtu; extern int gasnetc_qp_timeout; extern int gasnetc_qp_retry_count; #if GASNETC_PIN_SEGMENT extern uint32_t *gasnetc_np_rkeys[GASNET_MAXEPS]; #endif #if GASNETC_IBV_SRQ extern int gasnetc_rbuf_limit; extern int gasnetc_rbuf_set; extern int gasnetc_use_srq; #else #define gasnetc_use_srq 0 #endif #if GASNETC_IBV_XRC extern int gasnetc_use_xrc; #else #define gasnetc_use_xrc 0 #endif #if GASNETC_IBV_ODP extern int gasnetc_use_odp; #else #define gasnetc_use_odp 0 #endif /* Global variables */ extern gasnetc_hca_t gasnetc_hca[GASNETC_IB_MAX_HCAS]; extern uintptr_t gasnetc_max_msg_sz; extern size_t gasnetc_put_stripe_sz, gasnetc_put_stripe_split; extern size_t gasnetc_get_stripe_sz, gasnetc_get_stripe_split; extern size_t gasnetc_fh_align; extern size_t gasnetc_fh_align_mask; extern firehose_info_t gasnetc_firehose_info; extern gasnetc_port_info_t *gasnetc_port_tbl; extern int gasnetc_num_ports; #if GASNETC_DYNAMIC_CONNECT extern gasnetc_sema_t gasnetc_zero_sema; #endif #if (GASNETC_IB_MAX_HCAS > 1) extern int gasnetc_snd_poll_multi_hcas; extern int gasnetc_rcv_poll_multi_hcas; #endif #if GASNETC_BUILD_IBVRATOMIC extern gasnetc_lifo_head_t gasnetc_ratomicbuf_freelist; #endif /* ------------------------------------------------------------------------------------ */ /* Small (inline) helper functions */ #define GASNETC_DECL_SR_DESC(_name, _sg_lst_len) \ struct ibv_send_wr _name[1]; \ struct ibv_sge _CONCAT(_name,_sg_lst)[_sg_lst_len]; \ void *_CONCAT(_name,_dummy) = _gasnetc_sr_desc_init(_name, _CONCAT(_name,_sg_lst)) /* note intentional lack of final semicolon */ GASNETI_INLINE(_gasnetc_sr_desc_init) void *_gasnetc_sr_desc_init(struct ibv_send_wr *result, struct ibv_sge *sg_lst_p) { #if GASNET_DEBUG result->num_sge = 0; /* invalid to ensure caller sets it */ #endif result->sg_list = sg_lst_p; return result; } GASNETI_INLINE(gasnetc_get_cep) gasnetc_cep_t *gasnetc_get_cep(gasnetc_EP_t ep, gex_Rank_t node) { gasnetc_cep_t *result = GASNETC_NODE2CEP(ep, node); #if GASNETC_DYNAMIC_CONNECT if_pf (!result) { result = gasnetc_connect_to(ep, node); } #endif return result; } #if GASNETC_PIN_SEGMENT /* Test if a given addr is in a given GASNet segment or not. * Returns non-zero if address is inside the segment. * This test is used under the assumption that the client's arguments * to Put or Get will always correspond to a region which is entirely * IN or entirely OUT of the segment. */ GASNETI_INLINE(gasnetc_in_segment) int gasnetc_in_segment(const gasnetc_Segment_t seg, uintptr_t addr, size_t len) { if_pf (!seg) return 0; uint64_t offset = (uint64_t)addr - ((uint64_t)(uintptr_t)seg->_addr); // negative is a LARGE positive int result = (offset < ((uint64_t)seg->_size)); gasneti_assume(!result || (addr+len <= (uintptr_t)seg->_ub)); // single-segment assumption return result; } GASNETI_INLINE(gasnetc_in_bound_segment) int gasnetc_in_bound_segment(const gasnetc_EP_t ep, uintptr_t addr, size_t len) { gasneti_assert(ep); return gasnetc_in_segment((gasnetc_Segment_t)ep->_segment, addr, len); } #endif /* ------------------------------------------------------------------------------------ */ /* To return failures internally - suited for both integer and pointer returns * We distinguish only 2 cases - temporary lack of resources or permanent failure */ #define GASNETC_OK 0 #define GASNETC_FAIL_IMM 1 #define GASNETC_FAIL_ERR 2 // To test a pointer value that could be valid, NULL or one of these two "FAIL" codes #define GASNETC_FAILED_PTR(p) ((uintptr_t)(p)&0x3) /* ------------------------------------------------------------------------------------ */ /* System AM Request/Reply Functions * These can be called between init and attach. * They have an optional counter allowing one to test/block for local completion, * and take an epid a dest to optionally allow selection of a specific QP. */ extern int gasnetc_RequestSysShort(gasnetc_epid_t dest, gasnetc_counter_t *counter, /* counter for local completion */ gex_AM_Index_t handler, int numargs, ...); extern int gasnetc_RequestSysMedium(gasnetc_epid_t dest, gasnetc_counter_t *counter, /* counter for local completion */ gex_AM_Index_t handler, void *source_addr, size_t nbytes, int numargs, ...); extern int gasnetc_ReplySysShort(gex_Token_t token, gasnetc_counter_t *counter, /* counter for local completion */ gex_AM_Index_t handler, int numargs, ...); extern int gasnetc_ReplySysMedium(gex_Token_t token, gasnetc_counter_t *counter, /* counter for local completion */ gex_AM_Index_t handler, void *source_addr, size_t nbytes, int numargs, ...); #endif gasnet-2025.8.0/ibv-conduit/Makefile.in0000664000175000017500000010040715142313673017714 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/Makefile.am $ # Description: Makefile for GASNet ibv conduit # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = ibv-conduit ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = conduit.mak CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libgasnet_ibv_par_a_AR = $(AR) $(ARFLAGS) libgasnet_ibv_par_a_LIBADD = am_libgasnet_ibv_par_a_OBJECTS = libgasnet_ibv_par_a_OBJECTS = $(am_libgasnet_ibv_par_a_OBJECTS) libgasnet_ibv_parsync_a_AR = $(AR) $(ARFLAGS) libgasnet_ibv_parsync_a_LIBADD = am_libgasnet_ibv_parsync_a_OBJECTS = libgasnet_ibv_parsync_a_OBJECTS = \ $(am_libgasnet_ibv_parsync_a_OBJECTS) libgasnet_ibv_seq_a_AR = $(AR) $(ARFLAGS) libgasnet_ibv_seq_a_LIBADD = am_libgasnet_ibv_seq_a_OBJECTS = libgasnet_ibv_seq_a_OBJECTS = $(am_libgasnet_ibv_seq_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgasnet_ibv_par_a_SOURCES) \ $(libgasnet_ibv_parsync_a_SOURCES) \ $(libgasnet_ibv_seq_a_SOURCES) DIST_SOURCES = $(libgasnet_ibv_par_a_SOURCES) \ $(libgasnet_ibv_parsync_a_SOURCES) \ $(libgasnet_ibv_seq_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/conduit.mak.in \ $(top_srcdir)/config-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME = ibv fh_type = region @HAVE_BOOTSTRAP_SSH_TRUE@ssh_defines = -DHAVE_SSH_SPAWNER @HAVE_BOOTSTRAP_SSH_TRUE@ssh_srcdir = $(top_srcdir)/other/ssh-spawner @HAVE_BOOTSTRAP_SSH_TRUE@ssh_sources = $(ssh_srcdir)/gasnet_bootstrap_ssh.c @HAVE_BOOTSTRAP_SSH_TRUE@ssh_deps = $(ssh_srcdir)/*.[ch] @HAVE_BOOTSTRAP_MPI_TRUE@mpi_defines = -DHAVE_MPI_SPAWNER @HAVE_BOOTSTRAP_MPI_TRUE@mpi_srcdir = $(top_srcdir)/other/mpi-spawner @HAVE_BOOTSTRAP_MPI_TRUE@mpi_deps = $(mpi_srcdir)/*.[ch] # We must compile this one object with MPI_CC. @HAVE_BOOTSTRAP_MPI_TRUE@mpi_special_objs = $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o @HAVE_BOOTSTRAP_PMI_TRUE@pmi_cppflags = -DHAVE_PMI_SPAWNER @PMI_SPAWNER_CFLAGS@ @HAVE_BOOTSTRAP_PMI_TRUE@pmi_srcdir = $(top_srcdir)/other/pmi-spawner @HAVE_BOOTSTRAP_PMI_TRUE@pmi_sources = $(pmi_srcdir)/gasnet_bootstrap_pmi.c @HAVE_BOOTSTRAP_PMI_TRUE@pmi_deps = $(pmi_srcdir)/*.[ch] hwloc_srcdir = $(top_srcdir)/other/hwloc hwloc_sources = $(hwloc_srcdir)/gasnet_hwloc.c hwloc_deps = $(hwloc_srcdir)/*.[ch] hwloc_extralibcflags = -I$(hwloc_srcdir) @HWLOC_CFLAGS@ # Conduit threads require GASNET_THREAD_DEFINES even for SEQ mode @IBV_SEQ_THREADS_TRUE@ibv_thread_defines = @GASNET_THREAD_DEFINES@ # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = contrib # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ gasnet_core.c \ gasnet_core_connect.c \ gasnet_core_sndrcv.c \ gasnet_core_thread.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h \ gasnet_extended.c \ gasnet_extended_fwd.h \ gasnet_firehose.c \ gasnet_ratomic.c \ gasnet_ibv.h \ gasnet_ratomic_fwd.h \ firehose_fwd.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiler command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(srcdir)/gasnet_core_connect.c \ $(srcdir)/gasnet_core_sndrcv.c \ $(srcdir)/gasnet_core_thread.c \ $(srcdir)/gasnet_extended.c \ $(srcdir)/gasnet_firehose.c \ $(srcdir)/gasnet_ratomic.c \ $(fh_sourcelist) \ $(hwloc_sources) \ $(ssh_sources) $(pmi_sources) # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = @IBV_CFLAGS@ \ $(fh_extralibcflags) $(hwloc_extralibcflags)\ $(ssh_defines) $(mpi_defines) $(pmi_cppflags) \ $(ibv_thread_defines) # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = $(fh_extraheaders) # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = $(fh_privheaders) gasnet_ibv.h # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = $(fh_extradeps) $(hwloc_deps) \ $(ssh_deps) $(mpi_deps) $(pmi_deps) # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = $(mpi_special_objs) $(fh_special_objs) # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time CONDUIT_KINDS = cuda_uva hip # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) CONDUIT_RUNCMD = @TOP_BUILDDIR@/ibv-conduit/contrib/gasnetrun_ibv -np %N %P %A # conduit-specific tests in ../tests directory CONDUIT_TESTS = # -------- Do not modify anything below this line -------- @BUILD_SEQ_LIBS_TRUE@libgasnet_ibv_seq_a_SOURCES = @BUILD_SEQ_LIBS_TRUE@libraries_seq = libgasnet-ibv-seq.a @BUILD_PAR_LIBS_TRUE@libgasnet_ibv_par_a_SOURCES = @BUILD_PAR_LIBS_TRUE@libraries_par = libgasnet-ibv-par.a @BUILD_PARSYNC_LIBS_TRUE@libgasnet_ibv_parsync_a_SOURCES = @BUILD_PARSYNC_LIBS_TRUE@libraries_parsync = libgasnet-ibv-parsync.a libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) @USE_IBV_CONDUIT_TRUE@lib_LIBRARIES = $(libraries) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ibv-conduit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign ibv-conduit/Makefile $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): conduit.mak: $(top_builddir)/config.status $(srcdir)/conduit.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ if test -f $$p; then \ $(am__strip_dir) \ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive @USE_IBV_CONDUIT_FALSE@all-local: all-am: Makefile $(LIBRARIES) all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @USE_IBV_CONDUIT_FALSE@install-data-local: @USE_IBV_CONDUIT_FALSE@clean-local: @USE_IBV_CONDUIT_FALSE@uninstall-local: clean: clean-recursive clean-am: clean-generic clean-libLIBRARIES clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLIBRARIES uninstall-local .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am clean clean-generic clean-libLIBRARIES \ clean-local cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLIBRARIES uninstall-local .PRECIOUS: Makefile include $(top_builddir)/other/firehose/firehose.mak @HAVE_BOOTSTRAP_MPI_TRUE@$(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o: force @HAVE_BOOTSTRAP_MPI_TRUE@ @MPI_CC@ @MPI_CFLAGS@ $(LIBDEFINES) $(CONDUIT_EXTRALIBCFLAGS) $(LIBINCLUDES) \ @HAVE_BOOTSTRAP_MPI_TRUE@ $(MANUAL_MPICFLAGS) -o $@ -c $(mpi_srcdir)/gasnet_bootstrap_mpi.c include $(top_builddir)/other/Makefile-conduit.mak libgasnet-ibv-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-ibv-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-ibv-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync @USE_IBV_CONDUIT_TRUE@all-local: $(lib_LIBRARIES) $(pkgconfig_files) @USE_IBV_CONDUIT_TRUE@clean-local: do-clean-local @USE_IBV_CONDUIT_TRUE@install-data-local: do-install-data-local @USE_IBV_CONDUIT_TRUE@uninstall-local: do-uninstall-local @USE_IBV_CONDUIT_FALSE@$(top_srcdir)/gasnetex.h: do-error # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/ibv-conduit/gasnet_core_thread.c0000664000175000017500000002037415142313673021637 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/gasnet_core_thread.c $ * Description: GASNet ibv conduit implementation, progress thread logic * Copyright 2012, LBNL * Terms of use are as specified in license.txt */ #include #include #include #include #include /* If too many problems, one can disable here. */ #ifndef GASNETC_THREAD_CANCEL #define GASNETC_THREAD_CANCEL 1 #endif #if !GASNETI_CONDUIT_THREADS /* Protect against compiler warnings about "empty compilation unit" */ int gasnetc_thread_dummy = 1; #else static void my_cleanup(void *arg) { gasnetc_progress_thread_t * const pthr_p = arg; if (pthr_p->exclusive_poll) { GASNETC_POLL_CQ_UP(pthr_p->exclusive_poll); } GASNETI_TRACE_PRINTF(I, ("Terminated progress thread with id 0x%"PRIxPTR, (uintptr_t)(pthr_p->thread_id))); } #if GASNETC_THREAD_CANCEL && defined(PTHREAD_CANCEL_ENABLE) #define my_cancel_enable() (void)pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) #define my_cancel_disable() (void)pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL) #else #define my_cancel_enable() ((void)0) #define my_cancel_disable() ((void)0) #endif #if GASNETC_THREAD_CANCEL && defined(PTHREAD_CANCEL_DEFERRED) #define my_cancel_deferred() (void)pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL) #else #define my_cancel_deferred() ((void)0) #endif void * gasnetc_progress_thread(void *arg) { gasnetc_progress_thread_t * const pthr_p = arg; struct ibv_cq * const cq_hndl = pthr_p->cq; struct ibv_comp_channel * const compl_hndl= pthr_p->compl; void (* const fn)(struct ibv_wc *, void *)= pthr_p->fn; void * const fn_arg = pthr_p->fn_arg; const uint64_t thread_rate_ns = pthr_p->thread_rate.ns; const uint64_t keep_alive_ns = pthr_p->keep_alive.ns; gasnetc_atomic_t * const serialize_poll = pthr_p->serialize_poll; int fd = compl_hndl->fd; fd_set readfds; gasneti_assert(! pthr_p->started); pthr_p->thread_id = pthread_self(); gasneti_sync_writes(); pthr_p->started = 1; /* Setup completion channel for non-blocking access. * This way pthread_cancel() never needs to interrupt ibv calls. */ if (0 > fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK)) { gasneti_fatalerror("Could not set ibv completion channel to non-blocking mode"); } FD_ZERO(&readfds); FD_SET(fd, &readfds); my_cancel_deferred(); if (pthr_p->exclusive_poll) { gasneti_waitwhile( GASNETC_POLL_CQ_TRYDOWN(pthr_p->exclusive_poll) ); } pthread_cleanup_push(my_cleanup, arg); my_cancel_disable(); gasneti_assert_uint(pthr_p->keep_alive.timestamp ,==, 0); while (!pthr_p->done) { struct ibv_wc comp; int rc; if (serialize_poll) { if (GASNETC_POLL_CQ_TRYDOWN(serialize_poll)) { GASNETI_WAITHOOK(); continue; } rc = ibv_poll_cq(cq_hndl, 1, &comp); GASNETC_POLL_CQ_UP(serialize_poll); } else { rc = ibv_poll_cq(cq_hndl, 1, &comp); } if (rc == 1) { (fn)(&comp, fn_arg); /* Throttle thread's rate */ if_pf (thread_rate_ns) { uint64_t prev = pthr_p->thread_rate.timestamp; if_pt (prev) { uint64_t elapsed = gasneti_ticks_to_ns(gasneti_ticks_now() - prev); my_cancel_enable(); while (elapsed < thread_rate_ns) { gasneti_nsleep(thread_rate_ns - elapsed); elapsed = gasneti_ticks_to_ns(gasneti_ticks_now() - prev); } pthread_testcancel(); my_cancel_disable(); } pthr_p->thread_rate.timestamp = gasneti_ticks_now(); } // Now "active". So cancel any keep-alive interval. pthr_p->keep_alive.timestamp = 0; } else if (rc == 0) { struct ibv_cq * the_cq; void *the_ctx; int rc; // Keep alive? if (keep_alive_ns) { uint64_t prev = pthr_p->keep_alive.timestamp; uint64_t now = gasneti_ticks_now(); if (! prev) { // Start a new keep-alive interval pthr_p->keep_alive.timestamp = now; continue; } else { // Check for expiration of the keep-alive interval uint64_t elapsed = gasneti_ticks_to_ns(now - prev); if (elapsed < keep_alive_ns) continue; } // Keep-alive interval has expired. // Ensure we start a *new* one when we next wake: pthr_p->keep_alive.timestamp = 0; } /* block for event on the empty CQ */ my_cancel_enable(); FD_SET(fd, &readfds); /* should never *not* be set */ do { rc = select(fd+1, &readfds, NULL, NULL, NULL); if_pf (pthr_p->done) pthread_exit(NULL); } while ((rc < 0) && (errno == EINTR)); my_cancel_disable(); /* get the cq event, ack it, and rearm */ rc = ibv_get_cq_event(compl_hndl, &the_cq, &the_ctx); GASNETC_IBV_CHECK(rc, "from ibv_get_cq_event"); gasneti_assert(the_cq == cq_hndl); ibv_ack_cq_events(cq_hndl, 1); rc = ibv_req_notify_cq(cq_hndl, 0); GASNETC_IBV_CHECK(rc, "from ibv_req_notify_cq"); /* loop to poll for the new completion */ } else { GASNETC_IBV_CHECK(rc, "from ibv_poll_cq in async thread"); } } pthread_cleanup_pop(1); pthread_exit(NULL); return NULL; // unreachable } extern void gasnetc_spawn_progress_thread(gasnetc_progress_thread_t *pthr_p) { static gasneti_mutex_t init_lock = GASNETI_MUTEX_INITIALIZER; static size_t stack_sz = 0; pthread_attr_t attr; pthread_attr_init(&attr); gasneti_mutex_lock(&init_lock); if (!stack_sz) { /* Code to determine proper stack size */ /* TODO: move this logic to gasnet_internal.c for use in other conduits */ const size_t stack_min = gasneti_getenv_int_withdefault("GASNET_THREAD_STACK_MIN", 0, 1); const size_t stack_pad = gasneti_getenv_int_withdefault("GASNET_THREAD_STACK_PAD", 0, 1); size_t stack_dflt; #ifdef RLIMIT_STACK gasnett_maximize_rlimit(RLIMIT_STACK, "RLIMIT_STACK"); #endif gasneti_assert_zeroret(pthread_attr_getstacksize(&attr, &stack_dflt)); stack_sz = MAX(stack_min, stack_dflt + stack_pad); stack_sz = GASNETI_PAGE_ALIGNUP(stack_sz); if (0 != pthread_attr_setstacksize(&attr, stack_sz)) { /* Binary search between default (lo) and requested (hi) */ size_t lo = stack_dflt; size_t hi = stack_sz; while (lo != (stack_sz = lo + GASNETI_PAGE_ALIGNUP((hi - lo) >> 1))) { int rc = pthread_attr_setstacksize(&attr, stack_sz); if (rc == 0) { lo = stack_sz; } else if (rc == EINVAL){ hi = stack_sz; } else { /* Unknown error: silently give up and use the default */ stack_sz = stack_dflt; break; } } } GASNETI_TRACE_PRINTF(I, ("Stack size for progress thread(s) set to %"PRIuPTR"%s", (uintptr_t)stack_sz, (stack_sz == stack_dflt) ? " (default)" : "")); } gasneti_mutex_unlock(&init_lock); (void)pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); /* ignore failures */ if (stack_sz) gasneti_assert_zeroret(pthread_attr_setstacksize(&attr, stack_sz)); gasneti_assert_zeroret(pthread_create(&pthr_p->thread_id, &attr, gasnetc_progress_thread, pthr_p)); gasneti_assert_zeroret(pthread_attr_destroy(&attr)); GASNETI_TRACE_PRINTF(I, ("Spawned progress thread with id 0x%"PRIxPTR, (uintptr_t)(pthr_p->thread_id))); } extern void gasnetc_stop_progress_thread(gasnetc_progress_thread_t *pthr_p, int block) { if (! pthr_p->started) return; // nothing (yet) to stop gasneti_sync_reads(); pthread_t tid = pthr_p->thread_id; if (pthread_equal(pthread_self(), tid)) return; // no suicides if (pthr_p->done) return; /* no "over kill" */ pthr_p->done = 1; gasneti_sync_writes(); #if GASNETC_THREAD_CANCEL (void)pthread_cancel(tid); /* ignore failure */ #endif GASNETI_TRACE_PRINTF(I, ("Requested termination of progress thread with id 0x%"PRIxPTR, (uintptr_t)(tid))); if (block) { (void)pthread_join(tid, NULL); GASNETI_TRACE_PRINTF(I, ("Joined progress thread with id 0x%"PRIxPTR, (uintptr_t)(tid))); } else { (void)pthread_detach(tid); } } #endif gasnet-2025.8.0/ibv-conduit/firehose_fwd.h0000664000175000017500000000761215142313673020470 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/firehose_fwd.h $ * Description: Configuration of firehose code to fit ibv-conduit * Copyright 2003, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _IBV_FIREHOSE_FWD_H #define _IBV_FIREHOSE_FWD_H #if defined(__GNUC__) && !defined(inline) /* ANSI-ify the IB Verbs headers */ #define inline __inline__ #include #undef inline #else #include #endif #ifdef GASNETC_IBV_MAX_HCAS_CONFIGURE #define GASNETC_IB_MAX_HCAS GASNETC_IBV_MAX_HCAS_CONFIGURE #else /* no multi-rail support */ #define GASNETC_IB_MAX_HCAS 1 #endif /* Set this here because we need it to match */ #define FH_BUCKET_SIZE GASNET_PAGESIZE /* ibv-conduit uses firehose-region */ #define FIREHOSE_REGION /* ibv-conduit allows completion callbacks to run in handlers */ #define FIREHOSE_COMPLETION_IN_HANDLER /* ibv-conduit has a client_t */ #define FIREHOSE_CLIENT_T typedef struct _firehose_client_t { struct ibv_mr * handle[GASNETC_IB_MAX_HCAS]; /* used to release the region */ uint32_t lkey[GASNETC_IB_MAX_HCAS]; /* used for local access by HCA */ uint32_t rkey[GASNETC_IB_MAX_HCAS]; /* used for remote access by HCA */ } firehose_client_t; #if GASNET_SEGMENT_FAST /* unused, but cannot be empty */ typedef char firehose_remotecallback_args_t; #else // Using remote firehose #ifndef GASNETC_PUTINMOVE_LIMIT_MAX /* Compile-time max bytes to piggyback on a put/miss. * Environment can always specify a lesser limit, but not larger. * * Total size of firehose_remotecallback_args_t (below) must be no larger than * fits in a Medium payload, along with firehose's overhead which is * (1 + FH_MAX_UNPIN_REM) * sizeof(firehose_region_t) * Where sizeof(firehose_region_t) is * 2*SIZEOF_VOID_P + sizeof(firehose_client_t) * For a 64-bit platform and default values of FH_MAX_UNPIN_REM and GASNETC_IB_MAX_HCAS: * GASNETC_PUTINMOVE_LIMIT_MAX <= GASNETC_MAX_MEDIUM - 256 * For a 32-bit platform * GASNETC_PUTINMOVE_LIMIT_MAX <= GASNETC_MAX_MEDIUM - 168 * NOTE: these are correct at the time of writting, but subject to change. */ // Unfortunately we can't *perfectly* work everything out with the preprocessor. // Assumes ABI has "natural alignment" of struct members and (sizeof(size_t) <= sizeof(void*)) // Assumes FH_MAX_UNPIN_REM remains at default of 4, but that is not in scope here to verify #define _GASNETC_SIZEOF_FH_CLIENT_T (GASNETC_IB_MAX_HCAS*(SIZEOF_VOID_P+8)) #define _GASNETC_SIZEOF_FH_REGION_T (2*SIZEOF_VOID_P + _GASNETC_SIZEOF_FH_CLIENT_T) #define _GASNETC_SIZEOF_FH_CB_ARGS_T (2*SIZEOF_VOID_P) #define _GASNETC_PUTINMOVE_OVERHEAD ((1+4)*_GASNETC_SIZEOF_FH_REGION_T + _GASNETC_SIZEOF_FH_CB_ARGS_T) #define GASNETC_PUTINMOVE_LIMIT_MAX (GASNETC_BUFSZ - _GASNETC_PUTINMOVE_OVERHEAD) #if (GASNETC_PUTINMOVE_LIMIT_MAX > 3072) /* Diminishing returns as the value is increased beyond 3k */ #undef GASNETC_PUTINMOVE_LIMIT_MAX #define GASNETC_PUTINMOVE_LIMIT_MAX 3072 #elif (GASNETC_PUTINMOVE_LIMIT_MAX < 0) #error Insufficient space for 'firehose moves'. Please lower '--with-ibv-max-hcas=...' or raise '--with-ibv-max-medium=...' #undef GASNETC_PUTINMOVE_LIMIT_MAX #define GASNETC_PUTINMOVE_LIMIT_MAX 8 // prevents bad array size below from masking the #error above #endif #endif typedef struct { void *addr; size_t len; char data[GASNETC_PUTINMOVE_LIMIT_MAX]; } firehose_remotecallback_args_t; #endif #define FIREHOSE_REMOTE_CALLBACK_IN_HANDLER // Check the validity of a client_t GASNETI_INLINE(gasneti_valid_client_t) int gasneti_valid_client_t(const firehose_client_t *client) { return (NULL != client->handle[0]); } // Permit merge of a given region if and only if the client_t is "valid" #define FH_MAY_MERGE gasneti_valid_client_t #endif gasnet-2025.8.0/gasnet_tools.h0000664000175000017500000010566615142313673016312 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_tools.h $ * Description: GASNet Tools library * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_TOOLS_H #define _GASNET_TOOLS_H #define _IN_GASNET_TOOLS_H #define _INCLUDED_GASNET_TOOLS_H #if !defined(_INCLUDED_GASNETEX_H) && \ (defined(GASNET_SEQ) || defined(GASNET_PARSYNC) || defined(GASNET_PAR)) #error Objects that use both GASNet and GASNet tools must \ include gasnetex.h before gasnet_tools.h #endif #ifdef __cplusplus extern "C" { // cannot use GASNETI_BEGIN_EXTERNC here due to a header dependency cycle #endif /* Recognized (mutually-exclusive) definitions for threading behavior: GASNETT_THREAD_SAFE - may be defined by client to enable thread-safety. For gasnet.h clients, this is also enabled by GASNET_PAR GASNETT_THREAD_SINGLE - may be defined by client to explcitly disable thread-safety. For gasnet.h clients, this is also enabled by GASNET_SEQ and GASNET_PARSYNC GASNETT_LITE_MODE - tools-lite mode, for tools-only clients that want threading neutrality only provides the timer and membar interfaces If none of the above definitions are present, then thread-safety defaults to THREAD_SAFE if _REENTRANT or _THREAD_SAFE are defined and/or pthread.h is included, and THREAD_SINGLE otherwise. Headers should: test for GASNETI_THREADS to determine if multiple threads might exist (such as for backtracing) test for GASNETT_THREAD_SAFE to determine if multiple threads might call GASNet(_Tools) concurrently */ #if defined(GASNETT_LITE_MODE) + defined(GASNETT_THREAD_SAFE) + defined(GASNETT_THREAD_SINGLE) > 1 #error You must define at most one of: GASNETT_THREAD_SAFE, GASNETT_THREAD_SINGLE, GASNETT_LITE_MODE #endif #if defined(GASNETT_THREAD_SAFE) && (defined(GASNET_SEQ) || defined(GASNET_PARSYNC)) #error Conflicting threading definitions #endif #if defined(GASNETT_THREAD_SINGLE) && defined(GASNET_PAR) #error Conflicting threading definitions #endif #ifdef GASNETT_LITE_MODE #undef GASNETT_LITE_MODE #define GASNETT_LITE_MODE 1 #define GASNETT_THREAD_MODEL LITE #ifdef _INCLUDED_GASNETEX_H #error GASNETT_LITE_MODE not supported for libgasnet clients #endif #elif defined(GASNETT_THREAD_SAFE) || \ defined(GASNET_PAR) || \ (!defined(GASNET_SEQ) && !defined(GASNET_PARSYNC) && !defined(GASNETT_THREAD_SINGLE) && \ (defined(_REENTRANT) || defined(_THREAD_SAFE) || \ defined(PTHREAD_MUTEX_INITIALIZER))) #undef GASNETT_THREAD_SAFE #define GASNETT_THREAD_SAFE 1 #define GASNETT_THREAD_MODEL PAR #else #undef GASNETT_THREAD_SINGLE #define GASNETT_THREAD_SINGLE 1 #define GASNETT_THREAD_MODEL SEQ #endif #if GASNETT_THREAD_SAFE || defined(GASNET_PARSYNC) #ifndef GASNETI_THREADS #define GASNETI_THREADS 1 #endif #endif #include /* public spec version numbers */ #define GASNETT_SPEC_VERSION_MAJOR GASNETI_TOOLS_SPEC_VERSION_MAJOR #define GASNETT_SPEC_VERSION_MINOR GASNETI_TOOLS_SPEC_VERSION_MINOR #define GASNETT_RELEASE_VERSION_MAJOR GASNET_RELEASE_VERSION_MAJOR #define GASNETT_RELEASE_VERSION_MINOR GASNET_RELEASE_VERSION_MINOR #define GASNETT_RELEASE_VERSION_PATCH GASNET_RELEASE_VERSION_PATCH #include GASNETI_BEGIN_NOWARN #include /* allow conduit-specific tool helpers (eg elan timers) */ #ifdef GASNETI_TOOLS_HELPER #include _STRINGIFY(GASNETI_TOOLS_HELPER) #endif /* following preserves include ordering of gasnet_help.h */ #include #if !GASNETT_LITE_MODE #include #endif #include #include #include /* ------------------------------------------------------------------------------------ */ /* basic purely syntactic features */ #define GASNETT_IDENT(identName, identText) GASNETI_IDENT(identName, identText) #if defined(GASNET_PAGESIZE) #define GASNETT_PAGESIZE GASNET_PAGESIZE #elif defined(GASNETI_PAGESIZE) #define GASNETT_PAGESIZE GASNETI_PAGESIZE #endif #if defined(GASNETI_PAGESHIFT) #define GASNETT_PAGESHIFT GASNETI_PAGESHIFT #endif #define GASNETT_CACHE_LINE_BYTES GASNETI_CACHE_LINE_BYTES #define GASNETT_SYSTEM_TUPLE GASNETI_SYSTEM_TUPLE #define GASNETT_CONFIGURE_ARGS GASNETI_CONFIGURE_ARGS #if !GASNETI_COMPILER_IS_CC #define GASNETT_CONFIGURE_MISMATCH 1 /* indicate build compiler mismatches configure $CC */ #endif /* platform identifiers for the compiler detected at *configure*-time */ #define GASNETT_PLATFORM_COMPILER_IDSTR GASNETI_PLATFORM_COMPILER_IDSTR #define GASNETT_PLATFORM_COMPILER_FAMILYID GASNETI_PLATFORM_COMPILER_FAMILYID #define GASNETT_PLATFORM_COMPILER_ID GASNETI_PLATFORM_COMPILER_ID #define GASNETT_PLATFORM_COMPILER_VERSION GASNETI_PLATFORM_COMPILER_VERSION /* various configure-detected C compiler features available in only some compilers */ #define GASNETT_INLINE GASNETI_INLINE #define GASNETT_NEVER_INLINE GASNETI_NEVER_INLINE #define GASNETT_RESTRICT GASNETI_RESTRICT #define GASNETT_USED GASNETI_USED #define GASNETT_NORETURN GASNETI_NORETURN #define GASNETT_NORETURNP GASNETI_NORETURNP #define GASNETT_MALLOC GASNETI_MALLOC #define GASNETT_MALLOCP GASNETI_MALLOCP #define GASNETT_PURE GASNETI_PURE #define GASNETT_PUREP GASNETI_PUREP #define GASNETT_CONST GASNETI_CONST #define GASNETT_CONSTP GASNETI_CONSTP #define GASNETT_HOT GASNETI_HOT #define GASNETT_COLD GASNETI_COLD #define GASNETT_DEPRECATED GASNETI_DEPRECATED #define GASNETT_WARN_UNUSED_RESULT GASNETI_WARN_UNUSED_RESULT #define GASNETT_FORMAT_PRINTF GASNETI_FORMAT_PRINTF #define GASNETT_FORMAT_PRINTF_FUNCPTR GASNETI_FORMAT_PRINTF_FUNCPTR #define GASNETT_FALLTHROUGH GASNETI_FALLTHROUGH #define GASNETT_CURRENT_FUNCTION GASNETI_CURRENT_FUNCTION #define GASNETT_BEGIN_EXTERNC GASNETI_BEGIN_EXTERNC #define GASNETT_END_EXTERNC GASNETI_END_EXTERNC #define GASNETT_EXTERNC GASNETI_EXTERNC #define gasnett_constant_p gasneti_constant_p #define gasnett_unreachable gasneti_unreachable #define gasnett_assume gasneti_assume /* ------------------------------------------------------------------------------------ */ /* discard macro aguments w/ compiler-specific warning supression */ #define GASNETT_UNUSED_ARGS1 GASNETI_UNUSED_ARGS1 #define GASNETT_UNUSED_ARGS2 GASNETI_UNUSED_ARGS2 #define GASNETT_UNUSED_ARGS3 GASNETI_UNUSED_ARGS3 #define GASNETT_UNUSED_ARGS4 GASNETI_UNUSED_ARGS4 #define GASNETT_UNUSED_ARGS5 GASNETI_UNUSED_ARGS5 #define GASNETT_UNUSED_ARGS6 GASNETI_UNUSED_ARGS6 #define GASNETT_UNUSED_ARGS7 GASNETI_UNUSED_ARGS7 #define GASNETT_UNUSED_ARGS8 GASNETI_UNUSED_ARGS8 /* ------------------------------------------------------------------------------------ */ /* portable memory barriers */ #define gasnett_local_wmb() gasneti_local_wmb() #define gasnett_local_rmb() gasneti_local_rmb() #define gasnett_local_mb() gasneti_local_mb() #define gasnett_weak_wmb() gasneti_sync_writes() #define gasnett_weak_rmb() gasneti_sync_reads() #define gasnett_weak_mb() gasneti_sync_mem() #define gasnett_compiler_fence() gasneti_compiler_fence() #define GASNETT_MEMBAR_CONFIG GASNETI_MEMBAR_CONFIG /* ------------------------------------------------------------------------------------ */ /* microsecond-resolution sleep */ #define gasnett_nsleep(ns_delay) gasneti_nsleep(ns_delay) /* ------------------------------------------------------------------------------------ */ /* portable high-performance, low-overhead timers */ #define gasnett_tick_t gasneti_tick_t #define GASNETT_TICK_MIN GASNETI_TICK_MIN #define GASNETT_TICK_MAX GASNETI_TICK_MAX #define gasnett_ticks_to_us(ticks) gasneti_ticks_to_us(ticks) #define gasnett_ticks_to_ns(ticks) gasneti_ticks_to_ns(ticks) #define gasnett_ticks_now() gasneti_ticks_now() #define gasnett_tick_granularityus() gasneti_tick_granularity() #define gasnett_tick_overheadus() gasneti_tick_overhead() #define GASNETT_TIMER_CONFIG GASNETI_TIMER_CONFIG #define gasnett_gettimeofday_us() gasneti_gettimeofday_us() #ifdef GASNETI_USING_GETTIMEOFDAY #define GASNETT_USING_GETTIMEOFDAY 1 #endif #if !GASNETT_LITE_MODE /* ------------------------------------------------------------------------------------ */ /* portable atomic increment/decrement */ #define GASNETT_ATOMIC_NONE GASNETI_ATOMIC_NONE #define GASNETT_ATOMIC_RMB_PRE GASNETI_ATOMIC_RMB_PRE #define GASNETT_ATOMIC_RMB_POST GASNETI_ATOMIC_RMB_POST #define GASNETT_ATOMIC_RMB_POST_IF_TRUE GASNETI_ATOMIC_RMB_POST_IF_TRUE #define GASNETT_ATOMIC_RMB_POST_IF_FALSE GASNETI_ATOMIC_RMB_POST_IF_FALSE #define GASNETT_ATOMIC_WMB_PRE GASNETI_ATOMIC_WMB_PRE #define GASNETT_ATOMIC_WMB_POST GASNETI_ATOMIC_WMB_POST #define GASNETT_ATOMIC_REL GASNETI_ATOMIC_REL #define GASNETT_ATOMIC_ACQ GASNETI_ATOMIC_ACQ #define GASNETT_ATOMIC_ACQ_IF_TRUE GASNETI_ATOMIC_ACQ_IF_TRUE #define GASNETT_ATOMIC_ACQ_IF_FALSE GASNETI_ATOMIC_ACQ_IF_FALSE #define GASNETT_ATOMIC_MB_PRE GASNETI_ATOMIC_MB_PRE #define GASNETT_ATOMIC_MB_POST GASNETI_ATOMIC_MB_POST #define gasnett_atomic_val_t gasneti_atomic_val_t #define GASNETT_ATOMIC_MAX GASNETI_ATOMIC_MAX #define gasnett_atomic_sval_t gasneti_atomic_sval_t #define gasnett_atomic_signed(v) gasneti_atomic_signed(v) #define GASNETT_ATOMIC_SIGNED_MIN GASNETI_ATOMIC_SIGNED_MIN #define GASNETT_ATOMIC_SIGNED_MAX GASNETI_ATOMIC_SIGNED_MAX /* strong atomics always map to true atomic operations, regardless of threading mode */ #if GASNETI_ATOMICOPS_NOT_SIGNALSAFE #define GASNETT_STRONGATOMIC_NOT_SIGNALSAFE 1 #endif #define gasnett_strongatomic_t gasneti_atomic_t #define gasnett_strongatomic_read(p,f) gasneti_atomic_read(p,f) #define gasnett_strongatomic_init(v) gasneti_atomic_init(v) #define gasnett_strongatomic_set(p,v,f) gasneti_atomic_set(p,v,f) #define gasnett_strongatomic_increment(p,f) gasneti_atomic_increment(p,f) #define gasnett_strongatomic_decrement(p,f) gasneti_atomic_decrement(p,f) #define gasnett_strongatomic_decrement_and_test(p,f) \ gasneti_atomic_decrement_and_test(p,f) #ifdef GASNETI_HAVE_ATOMIC_CAS #define GASNETT_HAVE_STRONGATOMIC_CAS 1 #define gasnett_strongatomic_compare_and_swap(p,oldval,newval,f) \ gasneti_atomic_compare_and_swap(p,oldval,newval,f) #define gasnett_strongatomic_swap(p,val,f) gasneti_atomic_swap(p,val,f) #endif #ifdef GASNETI_HAVE_ATOMIC_ADD_SUB #define GASNETT_HAVE_STRONGATOMIC_ADD_SUB 1 #define gasnett_strongatomic_add(p,op,f) gasneti_atomic_add(p,op,f) #define gasnett_strongatomic_subtract(p,op,f) gasneti_atomic_subtract(p,op,f) #endif #if GASNETI_ATOMIC32_NOT_SIGNALSAFE #define GASNETT_STRONGATOMIC32_NOT_SIGNALSAFE 1 #endif #define gasnett_strongatomic32_t gasneti_atomic32_t #define gasnett_strongatomic32_read(p,f) gasneti_atomic32_read(p,f) #define gasnett_strongatomic32_init(v) gasneti_atomic32_init(v) #define gasnett_strongatomic32_set(p,v,f) gasneti_atomic32_set(p,v,f) #define gasnett_strongatomic32_compare_and_swap(p,oldval,newval,f) \ gasneti_atomic32_compare_and_swap(p,oldval,newval,f) #define gasnett_strongatomic32_swap(p,v,f) gasneti_atomic32_swap(p,v,f) #define gasnett_strongatomic32_add(p,v,f) gasneti_atomic32_add(p,v,f) #define gasnett_strongatomic32_subtract(p,v,f) gasneti_atomic32_subtract(p,v,f) #define gasnett_strongatomic32_increment(p,f) gasneti_atomic32_increment(p,f) #define gasnett_strongatomic32_decrement(p,f) gasneti_atomic32_decrement(p,f) #define gasnett_strongatomic32_decrement_and_test(p,f) \ gasneti_atomic32_decrement_and_test(p,f) #if GASNETI_ATOMIC64_NOT_SIGNALSAFE #define GASNETT_STRONGATOMIC64_NOT_SIGNALSAFE 1 #endif #define gasnett_strongatomic64_t gasneti_atomic64_t #define gasnett_strongatomic64_read(p,f) gasneti_atomic64_read(p,f) #define gasnett_strongatomic64_init(v) gasneti_atomic64_init(v) #define gasnett_strongatomic64_set(p,v,f) gasneti_atomic64_set(p,v,f) #define gasnett_strongatomic64_compare_and_swap(p,oldval,newval,f) \ gasneti_atomic64_compare_and_swap(p,oldval,newval,f) #define gasnett_strongatomic64_swap(p,v,f) gasneti_atomic64_swap(p,v,f) #define gasnett_strongatomic64_add(p,v,f) gasneti_atomic64_add(p,v,f) #define gasnett_strongatomic64_subtract(p,v,f) gasneti_atomic64_subtract(p,v,f) #define gasnett_strongatomic64_increment(p,f) gasneti_atomic64_increment(p,f) #define gasnett_strongatomic64_decrement(p,f) gasneti_atomic64_decrement(p,f) #define gasnett_strongatomic64_decrement_and_test(p,f) \ gasneti_atomic64_decrement_and_test(p,f) /* regular atomics map to either true atomics or sequential stubs, based on thread mode */ #if GASNETI_THREADS /* PAR, PARSYNC and thread-safe tools clients */ #ifdef GASNETI_HAVE_ATOMIC_CAS #define GASNETT_HAVE_ATOMIC_CAS 1 #endif #ifdef GASNETI_HAVE_ATOMIC_ADD_SUB #define GASNETT_HAVE_ATOMIC_ADD_SUB 1 #endif #define _gasnett_atomic_cons(_id) gasneti_atomic##_id #else /* GASNET_SEQ and non-thread-safe tools clients */ /* safe to use weak atomics here, because the client is single-threaded and should only be modifying atomics from the host CPU (using these calls). TODO: consider exposing "signal-safe" atomics (only avail on some platforms) */ #ifdef GASNETI_HAVE_WEAKATOMIC_CAS #define GASNETT_HAVE_ATOMIC_CAS 1 #endif #ifdef GASNETI_HAVE_WEAKATOMIC_ADD_SUB #define GASNETT_HAVE_ATOMIC_ADD_SUB 1 #endif #define _gasnett_atomic_cons(_id) gasneti_weakatomic##_id #endif #define gasnett_atomic_t _gasnett_atomic_cons(_t) #define gasnett_atomic_read(p,f) _gasnett_atomic_cons(_read)(p,f) #define gasnett_atomic_init(v) _gasnett_atomic_cons(_init)(v) #define gasnett_atomic_set(p,v,f) _gasnett_atomic_cons(_set)(p,v,f) #define gasnett_atomic_increment(p,f) _gasnett_atomic_cons(_increment)(p,f) #define gasnett_atomic_decrement(p,f) _gasnett_atomic_cons(_decrement)(p,f) #define gasnett_atomic_decrement_and_test(p,f) \ _gasnett_atomic_cons(_decrement_and_test)(p,f) #ifdef GASNETT_HAVE_ATOMIC_CAS #define gasnett_atomic_compare_and_swap(p,oldval,newval,f) \ _gasnett_atomic_cons(_compare_and_swap)(p,oldval,newval,f) #define gasnett_atomic_swap(p,val,f) _gasnett_atomic_cons(_swap)(p,val,f) #endif #ifdef GASNETT_HAVE_ATOMIC_ADD_SUB #define gasnett_atomic_add(p,op,f) _gasnett_atomic_cons(_add)(p,op,f) #define gasnett_atomic_subtract(p,op,f) _gasnett_atomic_cons(_subtract)(p,op,f) #endif #define gasnett_atomic32_t _gasnett_atomic_cons(32_t) #define gasnett_atomic32_read(p,f) _gasnett_atomic_cons(32_read)(p,f) #define gasnett_atomic32_init(v) _gasnett_atomic_cons(32_init)(v) #define gasnett_atomic32_set(p,v,f) _gasnett_atomic_cons(32_set)(p,v,f) #define gasnett_atomic32_increment(p,f) _gasnett_atomic_cons(32_increment)(p,f) #define gasnett_atomic32_decrement(p,f) _gasnett_atomic_cons(32_decrement)(p,f) #define gasnett_atomic32_decrement_and_test(p,f) \ _gasnett_atomic_cons(32_decrement_and_test)(p,f) #define gasnett_atomic32_compare_and_swap(p,oldval,newval,f) \ _gasnett_atomic_cons(32_compare_and_swap)(p,oldval,newval,f) #define gasnett_atomic32_swap(p,v,f) _gasnett_atomic_cons(32_swap)(p,v,f) #define gasnett_atomic32_add(p,v,f) _gasnett_atomic_cons(32_add)(p,v,f) #define gasnett_atomic32_subtract(p,v,f) _gasnett_atomic_cons(32_subtract)(p,v,f) #define gasnett_atomic64_t _gasnett_atomic_cons(64_t) #define gasnett_atomic64_read(p,f) _gasnett_atomic_cons(64_read)(p,f) #define gasnett_atomic64_init(v) _gasnett_atomic_cons(64_init)(v) #define gasnett_atomic64_set(p,v,f) _gasnett_atomic_cons(64_set)(p,v,f) #define gasnett_atomic64_increment(p,f) _gasnett_atomic_cons(64_increment)(p,f) #define gasnett_atomic64_decrement(p,f) _gasnett_atomic_cons(64_decrement)(p,f) #define gasnett_atomic64_decrement_and_test(p,f) \ _gasnett_atomic_cons(64_decrement_and_test)(p,f) #define gasnett_atomic64_compare_and_swap(p,oldval,newval,f) \ _gasnett_atomic_cons(64_compare_and_swap)(p,oldval,newval,f) #define gasnett_atomic64_swap(p,v,f) _gasnett_atomic_cons(64_swap)(p,v,f) #define gasnett_atomic64_add(p,v,f) _gasnett_atomic_cons(64_add)(p,v,f) #define gasnett_atomic64_subtract(p,v,f) _gasnett_atomic_cons(64_subtract)(p,v,f) #ifdef GASNETI_USE_GENERIC_ATOMICOPS #define GASNETT_USING_GENERIC_ATOMICOPS #endif #define GASNETT_ATOMIC_CONFIG GASNETI_ATOMIC_CONFIG #define GASNETT_ATOMIC32_CONFIG GASNETI_ATOMIC32_CONFIG #define GASNETT_ATOMIC64_CONFIG GASNETI_ATOMIC64_CONFIG /* ------------------------------------------------------------------------------------ */ /* environment utilities */ #define gasnett_format_number gasneti_format_number #define gasnett_parse_int gasneti_parse_int #define gasnett_setenv gasneti_setenv #define gasnett_unsetenv gasneti_unsetenv #define gasnett_getenv gasneti_getenv #define gasnett_getenv_withdefault gasneti_getenv_withdefault #define gasnett_getenv_yesno_withdefault gasneti_getenv_yesno_withdefault #define gasnett_getenv_int_withdefault gasneti_getenv_int_withdefault #define gasnett_getenv_dbl_withdefault gasneti_getenv_dbl_withdefault #define gasnett_verboseenv gasneti_verboseenv #define gasnett_envstr_display gasneti_envstr_display #define gasnett_envint_display gasneti_envint_display #define gasnett_envdbl_display gasneti_envdbl_display /* ------------------------------------------------------------------------------------ */ /* misc tools utilities */ /* return a (possibly empty) string of any configuration options that might negtively impact performance */ extern const char *gasnett_performance_warning_str(void); /* return a string representation of the compiled library's package version */ extern const char *gasnett_release_version_str(void); /* return an monotonically advancing integral representation of the compiled library's package version */ extern uint64_t gasnett_release_version(void); #define gasnett_sched_yield gasneti_sched_yield #define gasnett_cpu_count gasneti_cpu_count #define gasnett_flush_streams gasneti_flush_streams #define gasnett_close_streams gasneti_close_streams #define gasnett_getPhysMemSz gasneti_getPhysMemSz #define gasnett_fatalerror gasneti_fatalerror #define gasnett_fatalerror_nopos gasneti_fatalerror_nopos #define gasnett_killmyprocess gasneti_killmyprocess #define gasnett_current_loc gasneti_current_loc #define gasnett_exe_name gasneti_exe_name #define gasnett_sighandlerfn_t gasneti_sighandlerfn_t #define gasnett_reghandler gasneti_reghandler #define gasnett_checksum gasneti_checksum #define gasnett_isLittleEndian gasneti_isLittleEndian #define gasnett_set_affinity gasneti_set_affinity #define gasnett_gethostname gasneti_gethostname #define gasnett_spinloop_hint gasneti_spinloop_hint #define gasnett_freezeForDebuggerNow gasneti_freezeForDebuggerNow #define gasnett_freezeForDebuggerErr gasneti_freezeForDebuggerErr #define gasnett_backtrace_init gasneti_backtrace_init #define gasnett_print_backtrace gasneti_print_backtrace #define gasnett_print_backtrace_ifenabled gasneti_print_backtrace_ifenabled #define gasnett_count0s_copy gasneti_count0s_copy #define gasnett_count0s gasneti_count0s #define gasnett_count0s_uintptr_t gasneti_count0s_uintptr_t #define gasnett_count0s_uint32_t gasneti_count0s_uint32_t #define gasnett_count0s_uint64_t gasneti_count0s_uint64_t #define gasnett_mutex_t gasneti_mutex_t #define gasnett_mutex_init gasneti_mutex_init #define gasnett_mutex_destroy gasneti_mutex_destroy #define gasnett_mutex_destroy_ignoreerr gasneti_mutex_destroy_ignoreerr #define GASNETT_MUTEX_INITIALIZER GASNETI_MUTEX_INITIALIZER #define gasnett_mutex_lock gasneti_mutex_lock #define gasnett_mutex_trylock gasneti_mutex_trylock #define gasnett_mutex_unlock gasneti_mutex_unlock #define gasnett_mutex_assertlocked gasneti_mutex_assertlocked #define gasnett_mutex_assertunlocked gasneti_mutex_assertunlocked #define gasnett_rwlock_t gasneti_rwlock_t #define gasnett_rwlock_init gasneti_rwlock_init #define gasnett_rwlock_destroy gasneti_rwlock_destroy #define gasnett_rwlock_rdlock gasneti_rwlock_rdlock #define gasnett_rwlock_wrlock gasneti_rwlock_wrlock #define gasnett_rwlock_tryrdlock gasneti_rwlock_tryrdlock #define gasnett_rwlock_trywrlock gasneti_rwlock_trywrlock #define gasnett_rwlock_unlock gasneti_rwlock_unlock #define GASNETT_RWLOCK_INITIALIZER GASNETI_RWLOCK_INITIALIZER #define gasnett_rwlock_assertlocked gasneti_rwlock_assertlocked #define gasnett_rwlock_assertrdlocked gasneti_rwlock_assertrdlocked #define gasnett_rwlock_assertwrlocked gasneti_rwlock_assertwrlocked #define gasnett_rwlock_assertunlocked gasneti_rwlock_assertunlocked #define gasnett_cond_t gasneti_cond_t #define gasnett_cond_init gasneti_cond_init #define gasnett_cond_destroy gasneti_cond_destroy #define GASNETT_COND_INITIALIZER GASNETI_COND_INITIALIZER #define gasnett_cond_wait gasneti_cond_wait #define gasnett_cond_signal gasneti_cond_signal #define gasnett_cond_broadcast gasneti_cond_broadcast #define GASNETT_THREADKEY_DECLARE GASNETI_THREADKEY_DECLARE #define GASNETT_THREADKEY_DEFINE GASNETI_THREADKEY_DEFINE #define gasnett_threadkey_get(key) gasneti_threadkey_get(key) #define gasnett_threadkey_set(key,newval) gasneti_threadkey_set(key,newval) #define gasnett_threadkey_init(key) gasneti_threadkey_init(key) #define gasnett_threadkey_get_noinit(key) gasneti_threadkey_get_noinit(key) #define gasnett_threadkey_set_noinit(key,newval) gasneti_threadkey_set_noinit(key,newval) /* backtrace extensibility support */ typedef struct { const char *name; /* upper-case display name of backtrace function */ int (* fnp)(int); /* pointer to backtrace function */ int threadsupport; /* does backtrace function handle threads correctly? -ie backtrace the calling thread and optionally others as well */ } gasnett_backtrace_type_t; GASNETI_TENTATIVE_LIBRARY gasnett_backtrace_type_t gasnett_backtrace_user; /* ------------------------------------------------------------------------------------ */ /* GASNet tracing/stats support (automatically stubbed out when libgasnet absent) */ #if defined(_INCLUDED_GASNETEX_H) && defined(GASNET_SRCLINES) #define GASNETT_TRACE_SETSOURCELINE GASNETI_TRACE_SETSOURCELINE #define GASNETT_TRACE_GETSOURCELINE GASNETI_TRACE_GETSOURCELINE #define GASNETT_TRACE_FREEZESOURCELINE GASNETI_TRACE_FREEZESOURCELINE #define GASNETT_TRACE_UNFREEZESOURCELINE GASNETI_TRACE_UNFREEZESOURCELINE #else #define GASNETT_TRACE_SETSOURCELINE(file,line) ((void)0) #define GASNETT_TRACE_GETSOURCELINE(pfile,pline) ((void)0) #define GASNETT_TRACE_FREEZESOURCELINE() ((void)0) #define GASNETT_TRACE_UNFREEZESOURCELINE() ((void)0) #endif #if PLATFORM_COMPILER_PGI #include #endif GASNETI_FORMAT_PRINTF(_gasnett_trace_printf_noop,1,2, static void _gasnett_trace_printf_noop(const char *_format, ...)) { #if PLATFORM_COMPILER_PGI // Not reproducible with NVHPC compilers va_list _ap; va_start(_ap,_format); va_end(_ap); /* avoid a silly warning */ #endif return; } #if defined(GASNET_TRACE) && !GASNETI_BUILDING_TOOLS && (defined(_INCLUDED_GASNETEX_H) || !defined(__cplusplus)) GASNETT_FORMAT_PRINTF_FUNCPTR(_gasnett_trace_printf,1,2, GASNETI_TENTATIVE_CLIENT void (*_gasnett_trace_printf)(const char *_format, ...)); GASNETT_FORMAT_PRINTF_FUNCPTR(_gasnett_trace_printf_force,1,2, GASNETI_TENTATIVE_CLIENT void (*_gasnett_trace_printf_force)(const char *_format, ...)); #if PLATFORM_COMPILER_PGI /* bug 1703 - workaround a PGI bug using Gnu-style variadic macros which PGI supports */ // The PGI issue was fixed some time ago, probably late 2006, and does not impact NVHPC-branded releases #define GASNETT_TRACE_PRINTF(args...) \ (_gasnett_trace_printf ? _gasnett_trace_printf(args) : _gasnett_trace_printf_noop(args)) #define GASNETT_TRACE_PRINTF_FORCE(args...) \ (_gasnett_trace_printf_force ? _gasnett_trace_printf_force(args) : _gasnett_trace_printf_noop(args)) #else #define GASNETT_TRACE_PRINTF \ (*(_gasnett_trace_printf?_gasnett_trace_printf:&_gasnett_trace_printf_noop)) #define GASNETT_TRACE_PRINTF_FORCE \ (*(_gasnett_trace_printf_force?_gasnett_trace_printf_force:&_gasnett_trace_printf_noop)) #endif #ifdef _INCLUDED_GASNETEX_H #define GASNETT_TRACE_ENABLED GASNETI_TRACE_ENABLED(H) #define GASNETT_TRACE_GETMASK() GASNETI_TRACE_GETMASK() #define GASNETT_TRACE_SETMASK(mask) GASNETI_TRACE_SETMASK(mask) #define GASNETT_TRACE_GET_TRACELOCAL() GASNETI_TRACE_GET_TRACELOCAL() #define GASNETT_TRACE_SET_TRACELOCAL(newval) GASNETI_TRACE_SET_TRACELOCAL(newval) #else GASNETI_TENTATIVE_CLIENT int (*_gasnett_trace_enabled)(char _tracecat); #define GASNETT_TRACE_ENABLED (_gasnett_trace_enabled?_gasnett_trace_enabled('H'):0) #define GASNETT_TRACE_GETMASK() "" #define GASNETT_TRACE_SETMASK(mask) ((void)0) #define GASNETT_TRACE_GET_TRACELOCAL() (0) #define GASNETT_TRACE_SET_TRACELOCAL(newval) ((void)0) #endif #else #define GASNETT_TRACE_ENABLED 0 #define GASNETT_TRACE_PRINTF _gasnett_trace_printf_noop #define GASNETT_TRACE_PRINTF_FORCE _gasnett_trace_printf_noop #define GASNETT_TRACE_GETMASK() "" #define GASNETT_TRACE_SETMASK(mask) ((void)0) #define GASNETT_TRACE_GET_TRACELOCAL() (0) #define GASNETT_TRACE_SET_TRACELOCAL(newval) ((void)0) #endif #if defined(_INCLUDED_GASNETEX_H) && defined(GASNET_STATS) /* GASNETT_STATS_INIT can be called at any time to register a callback function, which will be invoked at stats dumping time (provided H stats are enabled) and passed a printf-like function that can be used to write output into the stats */ #define GASNETT_STATS_INIT(callbackfn) \ (gasnett_stats_callback = (callbackfn), GASNETI_STATS_ENABLED(H)) #define GASNETT_STATS_GETMASK() GASNETI_STATS_GETMASK() #define GASNETT_STATS_SETMASK(mask) GASNETI_STATS_SETMASK(mask) #define GASNETT_STATS_DUMP(reset) gasneti_stats_dump(reset) extern void gasneti_stats_dump(int _reset); GASNETI_FORMAT_PRINTF(_gasnett_stats_printf,1,2, extern void _gasnett_stats_printf(const char *format, ...)); GASNETI_FORMAT_PRINTF(_gasnett_stats_printf_force,1,2, extern void _gasnett_stats_printf_force(const char *format, ...)); #define GASNETT_STATS_PRINTF _gasnett_stats_printf #define GASNETT_STATS_PRINTF_FORCE _gasnett_stats_printf_force #else #define GASNETT_STATS_INIT(callbackfn) 0 #define GASNETT_STATS_GETMASK() "" #define GASNETT_STATS_SETMASK(mask) ((void)0) #define GASNETT_STATS_DUMP(reset) ((void)0) #define GASNETT_STATS_PRINTF _gasnett_trace_printf_noop #define GASNETT_STATS_PRINTF_FORCE _gasnett_trace_printf_noop #endif /* ------------------------------------------------------------------------------------ */ /* misc internal libgasnet-specific features we wish to expose when available */ #if defined(_INCLUDED_GASNETEX_H) /* these tools ONLY available when linking a libgasnet.a */ #ifdef HAVE_MMAP extern void *gasneti_mmap(uintptr_t _segsize); #define gasnett_mmap(sz) gasneti_mmap(sz) #else #define gasnett_mmap(sz) gasnett_fatalerror("gasnett_mmap not available") #endif extern int gasneti_run_diagnostics(int _iters, int _threadcnt, const char *_testsections, gex_TM_t _myteam, void* _myseg, gex_Rank_t _peer, void* _peerseg, unsigned int seed); extern void gasneti_diagnostic_gethandlers(gex_AM_Entry_t **_htable, int *_htable_cnt); #define gasnett_run_diagnostics gasneti_run_diagnostics #define gasnett_diagnostic_gethandlers gasneti_diagnostic_gethandlers #define GASNETT_FAST_ALIGNED_MEMCPY GASNETE_FAST_ALIGNED_MEMCPY #define GASNETT_FAST_UNALIGNED_MEMCPY GASNETE_FAST_UNALIGNED_MEMCPY #define GASNETT_VALUE_ASSIGN GASNETE_VALUE_ASSIGN #define GASNETT_VALUE_RETURN GASNETE_VALUE_RETURN #define GASNETT_MAX_THREADS GASNETI_MAX_THREADS #if GASNET_DEBUGMALLOC #define gasnett_debug_malloc(sz) gasneti_extern_malloc(sz) #define gasnett_debug_realloc(ptr,sz) gasneti_extern_realloc((ptr),(sz)) #define gasnett_debug_calloc(N,S) gasneti_extern_calloc((N),(S)) #define gasnett_debug_free(ptr) gasneti_extern_free(ptr) #define gasnett_debug_strdup(s) gasneti_extern_strdup(s) #define gasnett_debug_strndup(s,n) gasneti_extern_strndup(s,n) #define gasnett_debug_memcheck(ptr) gasneti_memcheck(ptr) #define gasnett_debug_memcheck_one() gasneti_memcheck_one() #define gasnett_debug_memcheck_all() gasneti_memcheck_all() #define gasnett_heapstats_t gasneti_heapstats_t #define gasnett_getheapstats(pstat) gasneti_getheapstats(pstat) #define gasnett_heapinfo_dump(f,o) gasneti_heapinfo_dump(f,o) #endif /* VIS string formatting */ #define gasnett_format_memveclist_bufsz gasneti_format_memveclist_bufsz #define gasnett_format_memveclist gasneti_format_memveclist #define gasnett_format_putvgetv_bufsz gasneti_format_putvgetv_bufsz #define gasnett_format_putvgetv gasneti_format_putvgetv #define gasnett_format_addrlist_bufsz gasneti_format_addrlist_bufsz #define gasnett_format_addrlist gasneti_format_addrlist #define gasnett_format_putigeti_bufsz gasneti_format_putigeti_bufsz #define gasnett_format_putigeti gasneti_format_putigeti #define gasnett_format_strides_bufsz gasneti_format_strides_bufsz #define gasnett_format_strides gasneti_format_strides #define gasnett_format_putsgets_bufsz gasneti_format_putsgets_bufsz #define gasnett_format_putsgets gasneti_format_putsgets /* Enum/mask string formatting */ #define gasnett_format_dt gasneti_format_dt #define gasnett_format_op gasneti_format_op #define gasnett_format_ti gasneti_format_ti #else #define gasnett_mmap(sz) gasnett_fatalerror("gasnett_mmap not available") #endif #if defined(GASNETI_ATOMIC_LOCK_TBL_DECLS) GASNETI_ATOMIC_LOCK_TBL_DECLS #endif #endif /* !GASNETT_LITE_MODE */ /* ------------------------------------------------------------------------------------ */ /* Build config sanity checking */ #if defined(GASNET_NDEBUG) #define GASNETT_DEBUG_CONFIG nodebug #else #define GASNETT_DEBUG_CONFIG debug #endif #define GASNETT_PTR_CONFIG GASNETI_PTR_CONFIG #define _GASNETT_LITE_CONFIG_STRING \ "RELEASE=" _STRINGIFY(GASNETI_RELEASE_VERSION) "," \ "SPEC=" _STRINGIFY(GASNETT_SPEC_VERSION_MAJOR) "." \ _STRINGIFY(GASNETT_SPEC_VERSION_MINOR) "," \ "PTR=" _STRINGIFY(GASNETI_PTR_CONFIG) "," \ _STRINGIFY(GASNETT_DEBUG_CONFIG) "," \ _STRINGIFY(GASNETT_THREAD_MODEL) "," \ _STRINGIFY(GASNETT_TIMER_CONFIG) "," \ _STRINGIFY(GASNETT_MEMBAR_CONFIG) #if GASNETT_LITE_MODE #define GASNETT_CONFIG_STRING _GASNETT_LITE_CONFIG_STRING #else #define GASNETT_CONFIG_STRING \ _GASNETT_LITE_CONFIG_STRING "," \ _STRINGIFY(GASNETT_ATOMIC_CONFIG) "," \ _STRINGIFY(GASNETT_ATOMIC32_CONFIG) "," \ _STRINGIFY(GASNETT_ATOMIC64_CONFIG) #endif #define GASNETT_LINKCONFIG_IDIOTCHECK(name) _CONCAT(gasnett_linkconfig_idiotcheck_,name) extern int GASNETT_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MAJOR_,GASNET_RELEASE_VERSION_MAJOR)); extern int GASNETT_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MINOR_,GASNET_RELEASE_VERSION_MINOR)); extern int GASNETT_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_PATCH_,GASNET_RELEASE_VERSION_PATCH)); extern int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_THREAD_MODEL); extern int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_DEBUG_CONFIG); extern int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_PTR_CONFIG); extern int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_TIMER_CONFIG); extern int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_MEMBAR_CONFIG); #if !GASNETT_LITE_MODE extern int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_ATOMIC_CONFIG); extern int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_ATOMIC32_CONFIG); extern int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_ATOMIC64_CONFIG); #endif static int *gasnett_linkconfig_idiotcheck(void); #if !PLATFORM_COMPILER_TINY /* avoid a tinyc bug */ #define GASNETI_IDIOTCHECK_RECURSIVE_REFERENCE 1 static int *(*_gasnett_linkconfig_idiotcheck)(void) = &gasnett_linkconfig_idiotcheck; #endif GASNETT_USED static int *gasnett_linkconfig_idiotcheck(void) { static int _val; _val += + GASNETT_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MAJOR_,GASNET_RELEASE_VERSION_MAJOR)) + GASNETT_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MINOR_,GASNET_RELEASE_VERSION_MINOR)) + GASNETT_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_PATCH_,GASNET_RELEASE_VERSION_PATCH)) + GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_THREAD_MODEL) + GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_DEBUG_CONFIG) + GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_PTR_CONFIG) + GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_TIMER_CONFIG) + GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_MEMBAR_CONFIG) #if !GASNETT_LITE_MODE + GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_ATOMIC_CONFIG) + GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_ATOMIC32_CONFIG) + GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_ATOMIC64_CONFIG) #endif ; #if GASNETI_IDIOTCHECK_RECURSIVE_REFERENCE if (_gasnett_linkconfig_idiotcheck == &gasnett_linkconfig_idiotcheck) _val += *(*_gasnett_linkconfig_idiotcheck)(); #endif return &_val; } /* ------------------------------------------------------------------------------------ */ GASNETI_END_NOWARN GASNETI_END_EXTERNC #undef _IN_GASNET_TOOLS_H #endif gasnet-2025.8.0/gasnet_pshm.h0000664000175000017500000003630615142313673016113 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_pshm.h $ * Description: GASNet infrastructure for shared memory communications * Copyright 2009, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _GASNET_SYSV_H #define _GASNET_SYSV_H #if !GASNET_PSHM #error "gasnet_pshm.h included in a non-PSHM build" #endif /* Must defined EXACTLY one */ /* TO DO: add to GASNet's config string */ #if defined(GASNETI_PSHM_POSIX) && !defined(GASNETI_PSHM_SYSV) && !defined(GASNETI_PSHM_FILE) && !defined(GASNETI_PSHM_XPMEM) #undef GASNETI_PSHM_POSIX #define GASNETI_PSHM_POSIX 1 #elif !defined(GASNETI_PSHM_POSIX) && defined(GASNETI_PSHM_SYSV) && !defined(GASNETI_PSHM_FILE) && !defined(GASNETI_PSHM_XPMEM) #undef GASNETI_PSHM_SYSV #define GASNETI_PSHM_SYSV 1 #elif !defined(GASNETI_PSHM_POSIX) && !defined(GASNETI_PSHM_SYSV) && defined(GASNETI_PSHM_FILE) && !defined(GASNETI_PSHM_XPMEM) #undef GASNETI_PSHM_FILE #define GASNETI_PSHM_FILE 1 #elif !defined(GASNETI_PSHM_POSIX) && !defined(GASNETI_PSHM_SYSV) && !defined(GASNETI_PSHM_FILE) && defined(GASNETI_PSHM_XPMEM) #undef GASNETI_PSHM_XPMEM #define GASNETI_PSHM_XPMEM 1 // Hooks: extern size_t gasneti_pshm_private_data_size(void); #define GASNETI_PSHM_PRIVATE_DATA_SIZE gasneti_pshm_private_data_size extern void gasneti_pshm_private_data_init(uintptr_t); #define GASNETI_PSHM_PRIVATE_DATA_INIT gasneti_pshm_private_data_init #else #error PSHM configuration must be exactly one of (GASNETI_PSHM_POSIX, GASNETI_PSHM_SYSV, GASNETI_PSHM_FILE, GASNETI_PSHM_XPMEM) #endif #if GASNET_PAGESIZE < 4096 #define GASNETI_PSHMNET_PAGESIZE 4096 #define GASNETI_PSHMNET_PAGESHIFT 12 #else #define GASNETI_PSHMNET_PAGESIZE GASNET_PAGESIZE #define GASNETI_PSHMNET_PAGESHIFT GASNETI_PAGESHIFT #endif /* In gasnet_mmap.c */ #define GASNETI_PSHM_UNIQUE_LEN 6 extern void *gasneti_mmap_vnet(uintptr_t segsize, gasneti_bootstrapBroadcastfn_t localbcastfn); extern void gasneti_unlink_vnet(void); /* Virtual network between processes within a shared * memory 'supernode'. * - Implemented as a set of message queues located in a shared memory space * provided by the client of this API. */ struct gasneti_pshmnet; /* opaque type */ typedef struct gasneti_pshmnet gasneti_pshmnet_t; /* Initialize pshm. * This includes allocating the PSHM memory region, initializing PSHM internal * state, and the request and reply networks for AMPSHM. * The first argument must be a conduit-specific exchange function. * The second argument is the amount of shared memory requested by the caller * for conduit-specific use, the address of which is returned. */ extern void *gasneti_pshm_init(gasneti_bootstrapBroadcastfn_t localbcastfn, size_t aux_sz); /* Provide a write of zero to at least one byte of each page in the given region */ extern void gasneti_pshm_prefault(void *addr, size_t len); /* PSHMnets needed for PSHM active messages. * * - Conduits using GASNET_PSHM must initialize these two vnets * to allow a fast implementation of Active Messages to run within the * supernode. Other vnets may be created as are needed or useful. * - Initialize these vnets before use via gasneti_pshmnet_init(). */ extern gasneti_pshmnet_t *gasneti_request_pshmnet; extern gasneti_pshmnet_t *gasneti_reply_pshmnet; /* Optional conduit-specific code if defaults in gasnet_pshm.c are not usable. * Conduits providing these should #define the appropriate token in gasnet_core_fwd.h * When a given token is NOT defined, internal default implementations are used. * * If gasnet_core_fwd.h defines GASNETC_GET_HANDLER, conduit must provide: * gasnetc_get_handler(endpoint,index,field) * Macro which returns the given field for the given handler 'index' * The 'field' will be one of the following literals * nargs, flags, fnptr, cdata, name * For use ONLY by gasnet_pshm.[ch] */ /* Returns amount of memory needed (rounded up to a multiple of the system * page size) needed for a new gasneti_pshmnet_t. * - Takes the number of nodes in the gasnet supernode. * - Reads the GASNET_PSHM_NETWORK_DEPTH environment variable, if set. */ extern size_t gasneti_pshmnet_memory_needed(gasneti_pshm_rank_t nodes); /* Creates a new virtual network within a gasnet shared memory supernode. * This function must be called collectively, and with a shared memory region * already created that is accessible to all nodes in the supernode * - 'start': starting address of region: must be page-aligned * - 'len': length of shared region: must be at least as long as the value * returned from gasneti_pshmnet_memory_needed(). * - 'nodes': count of the nodes in the supernode. */ extern gasneti_pshmnet_t * gasneti_pshmnet_init(void *start, size_t len, gasneti_pshm_rank_t node_count); /* Bootstrap barrier via pshmnet. * * This function has the following restrictions: * 1) It must be called after gasneti_pshmnet_init() has completed. * 2) It must be called collectively by all nodes in the vnet. */ extern void gasneti_pshmnet_bootstrapBarrier(void); /* Bootstrap barrier via pshmnet, with polling * Same as above but also progresses AMs */ extern void gasneti_pshmnet_bootstrapBarrierPoll(void); /* Bootstrap broadcast via pshmnet. * * This function has the following restrictions: * 1) It must be called after gasneti_pshmnet_init() has completed. * 2) It must be called collectively by all nodes in the vnet. * 3) It must be called with the vnet's recv queues empty. * 4) The rootpshmnode is the supernode-local rank. */ extern void gasneti_pshmnet_bootstrapBroadcast(gasneti_pshmnet_t *vnet, void *src, size_t len, void *dest, int rootpshmnode); /* Bootstrap exchange via pshmnet. * * This function has the following restrictions: * 1) It must be called after gasneti_pshmnet_init() has completed. * 2) It must be called collectively by all nodes in the vnet. * 3) It must be called with the vnet's recv queues empty. */ extern void gasneti_pshmnet_bootstrapExchange(gasneti_pshmnet_t *vnet, void *src, size_t len, void *dest); /* Bootstrap gather via pshmnet. * * This function has the following restrictions: * 1) It must be called after gasneti_pshmnet_init() has completed. * 2) It must be called collectively by all nodes in the vnet. * 3) It must be called with the vnet's recv queues empty. * 4) The rootpshmnode is the supernode-local rank. */ extern void gasneti_pshmnet_bootstrapGather(gasneti_pshmnet_t *vnet, void *src, size_t len, void *dest, int rootpshmnode); /* "critical sections" in which we notify peers if we abort() while * they are potentially blocked in gasneti_pshmnet_bootstrapBarrier(). */ extern void gasneti_pshm_cs_enter(const char *context, void (*callback)(void)); extern void gasneti_pshm_cs_leave(void); /* returns the maximum size payload that pshmnet can offer. This is the * maximum size one can ask of gasneti_pshmnet_get_send_buffer. */ extern size_t gasneti_pshmnet_max_payload(void); /* Returns send buffer, into which message should be written. Then * deliver_send_buffer() must be called, after which is is not safe to touch the * buffer any more. * - 'nbytes' must be <= gasneti_pshmnet_max_payload(). * - Returns NULL if no buffer is available (poll your receive queue, then try * again). * 'target' is rank relative to the supernode */ extern void * gasneti_pshmnet_get_send_buffer(gasneti_pshmnet_t *vnet, size_t nbytes, gasneti_pshm_rank_t target); /* "Sends" message to target process. * Notifies target that message is ready to be received. After calling, 'buf' * logically belongs to the target process, and the caller should not touch * the memory pointed to by 'buf' again. * 'nbytes' must be no larger than was passed to get_send_buffer * 'target' is rank relative to the supernode */ extern void gasneti_pshmnet_deliver_send_buffer(gasneti_pshmnet_t *vnet, void *buf, size_t nbytes, gasneti_pshm_rank_t target); /* Polls receipt queue for any messages from any sender. * - 'pbuf': address of pointer which will point to message (if successful) * - 'psize': out parameter (msg length will be written into memory) * - 'from': out parameter (sender supernode-relative rank written into memory) * * returns nonzero if no message to receive */ extern int gasneti_pshmnet_recv(gasneti_pshmnet_t *vnet, void **pbuf, size_t *psize, gasneti_pshm_rank_t *from); /* Called by msg receiver, to release memory after message processed. * It is not safe to refer to the memory pointed to by 'buf' after this call * is made. */ extern void gasneti_pshmnet_recv_release(gasneti_pshmnet_t *vnet, void *buf); /******************************************************************************* * AMPSHM: Active Messages over PSHMnet *******************************************************************************/ /* Processes pending messages: if 'repliesOnly', only checks the 'reply' * PSHM network (i.e. gasneti_reply_pshmnet). */ extern int gasneti_AMPSHMPoll(int repliesOnly GASNETI_THREAD_FARG); extern int gasneti_AMPSHM_RequestShort( gex_Rank_t jobrank, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG); extern int gasneti_AMPSHM_RequestMedium( gex_Rank_t jobrank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG); extern int gasneti_AMPSHM_RequestLong( gex_Rank_t jobrank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG); extern int gasneti_AMPSHM_ReplyShort( gex_Token_t token, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr); extern int gasneti_AMPSHM_ReplyMedium( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Flags_t flags, int numargs, va_list argptr); extern int gasneti_AMPSHM_ReplyLong( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Flags_t flags, int numargs, va_list argptr); int gasnetc_AMPSHM_PrepareRequestMedium(gasneti_AM_SrcDesc_t sd, gex_Rank_t jobrank, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs); void gasnetc_AMPSHM_CommitRequestMedium(gasneti_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, va_list argptr); int gasnetc_AMPSHM_CancelRequestMedium(gasneti_AM_SrcDesc_t sd, gex_Flags_t flags); int gasnetc_AMPSHM_PrepareRequestLong(gasneti_AM_SrcDesc_t sd, gex_Rank_t jobrank, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs); void gasnetc_AMPSHM_CommitRequestLong(gasneti_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, va_list argptr); int gasnetc_AMPSHM_CancelRequestLong(gasneti_AM_SrcDesc_t sd, gex_Flags_t flags); int gasnetc_AMPSHM_PrepareReplyMedium(gasneti_AM_SrcDesc_t sd, gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs); void gasnetc_AMPSHM_CommitReplyMedium(gasneti_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, va_list argptr); int gasnetc_AMPSHM_CancelReplyMedium(gasneti_AM_SrcDesc_t sd, gex_Flags_t flags); int gasnetc_AMPSHM_PrepareReplyLong(gasneti_AM_SrcDesc_t sd, gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs); void gasnetc_AMPSHM_CommitReplyLong(gasneti_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, va_list argptr); int gasnetc_AMPSHM_CancelReplyLong(gasneti_AM_SrcDesc_t sd, gex_Flags_t flags); /******************************************************************************* * Intra-supernode shared-memory barrier *******************************************************************************/ typedef struct { gasneti_atomic_t state; /* One done bit per phase and result in remaining bits */ gasneti_atomic_t ready; /* Indicates when initialization is completed */ int size; gex_AM_Arg_t volatile flags, value; /* supernode consensus for hierarchical barrier */ char _pad1[GASNETI_CACHE_PAD( 2*sizeof(gasneti_atomic_t) + sizeof(int) + 2*sizeof(gex_AM_Arg_t))]; /*---------------*/ struct gasneti_pshm_barrier_node { union gasneti_pshm_barrier_node_u { struct { int volatile value, flags; int volatile phase; } wmb; uint64_t volatile u64; } u; char _pad[GASNETI_CACHE_PAD(sizeof(union gasneti_pshm_barrier_node_u))]; } node[1]; /* VLA */ } gasneti_pshm_barrier_t; extern gasneti_pshm_barrier_t *gasneti_pshm_barrier; #endif /* _GASNET_SYSV_H */ gasnet-2025.8.0/gasnet_event.c0000664000175000017500000006741215142313673016262 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_event.c $ * Description: GASNet event/eop/iop common code * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include extern void _gasnete_iop_check(gasnete_iop_t *iop) { gasnete_iop_check(iop); } /* ------------------------------------------------------------------------------------ */ /* Op management ============= */ #if !GASNETI_DISABLE_REFERENCE_EOP // eop chunk format: // void *next_chunk; // *cache pad* // eop[0] // *cache pad* // eop[1] // ... // allocate more eops: only valid when the free pool is empty GASNETI_NEVER_INLINE(gasnete_eop_alloc, extern void gasnete_eop_alloc(gasneti_threaddata_t * const thread)) { gasnete_threadidx_t const threadidx = thread->threadidx; size_t const eopsz = GASNETI_ALIGNUP(sizeof(gasnete_eop_t),GASNETI_CACHE_LINE_BYTES); // eop size to ensure cache isolation thread->eop_num_bufs++; gasneti_assert(thread->eop_num_bufs); // check for overflow GASNETI_TRACE_PRINTF(I,("Growing thread eop pool to %"PRIuPTR, (uintptr_t)(GASNETE_EOP_CHUNKCNT*thread->eop_num_bufs))); // ensure we cache align the eops, even for an allocator that returns worst-case alignment void * const buf = gasneti_calloc(1,(sizeof(void *)-1) + (GASNETI_CACHE_LINE_BYTES-1) + eopsz * GASNETE_EOP_CHUNKCNT); gasneti_leak(buf); gasnete_eop_t * const first_eop = (gasnete_eop_t *)GASNETI_ALIGNUP((uintptr_t)buf + sizeof(void*),GASNETI_CACHE_LINE_BYTES); gasnete_eop_t *eop = first_eop; for (int i=0; i < GASNETE_EOP_CHUNKCNT; i++) { eop->threadidx = threadidx; #if GASNET_DEBUG // Returns to type==free_eop when on free list eop->event[0] = gasnete_event_type_free_eop; #else // Type==eop at all times eop->event[0] = gasnete_event_type_eop; #endif #ifdef GASNETE_EOP_ALLOC_EXTRA // Hook for conduit-specific initializations and assertions GASNETE_EOP_ALLOC_EXTRA(eop); #endif eop->next = (gasnete_eop_t *)((uintptr_t)eop + eopsz); eop = eop->next; } eop = (gasnete_eop_t *)((uintptr_t)eop - eopsz); // backup to last eop->next = NULL; // null terminate *(void **)buf = thread->eop_bufs; // link the chunk thread->eop_bufs = buf; gasneti_assert(!thread->eop_free); thread->eop_free = first_eop; #if GASNET_DEBUG { /* verify new free list got built correctly */ gasneti_memcheck(thread->eop_bufs); eop = first_eop; for (size_t i=0; i < GASNETE_EOP_CHUNKCNT; i++) { size_t eopidx = (((uintptr_t)eop) - ((uintptr_t)first_eop)) / eopsz; gasneti_assert_uint(eopidx ,==, i); // verify linkage gasneti_assert_ptr(eop ,==, (gasnete_eop_t *)GASNETI_ALIGNUP(eop,GASNETI_CACHE_LINE_BYTES)); // verify cache alignment eop = eop->next; } gasneti_assert(eop == NULL); } #endif } /* allocate a new iop */ GASNETI_NEVER_INLINE(gasnete_iop_alloc, static gasnete_iop_t *gasnete_iop_alloc(gasneti_threaddata_t * const thread)) { gasnete_iop_t *iop = (gasnete_iop_t *)gasneti_malloc(sizeof(gasnete_iop_t)); gasneti_leak(iop); thread->iop_num++; #if GASNET_DEBUG memset(iop, 0, sizeof(gasnete_iop_t)); /* set event[] and pad to known value */ #else memset(&iop->event, 0, sizeof(iop->event)); /* set event[] to known value */ #endif iop->event[0] = OPTYPE_IMPLICIT; iop->threadidx = thread->threadidx; iop->initiated_get_cnt = 0; iop->initiated_put_cnt = 0; iop->initiated_rmw_cnt = 0; gasnete_op_atomic_set(&(iop->completed_get_cnt), 0, 0); gasnete_op_atomic_set(&(iop->completed_put_cnt), 0, 0); gasnete_op_atomic_set(&(iop->completed_rmw_cnt), 0, 0); #if GASNETE_HAVE_LC iop->initiated_alc_cnt = 0; gasnete_op_atomic_set(&(iop->completed_alc_cnt), 0, 0); #endif #ifdef GASNETE_IOP_ALLOC_EXTRA // Hook for conduit-specific initializations and assertions GASNETE_IOP_ALLOC_EXTRA(iop); #endif return iop; } GASNETI_INLINE(_gasnete_iop_new) gasnete_iop_t *_gasnete_iop_new(gasneti_threaddata_t * const thread) { gasnete_iop_t *iop = thread->iop_free; if_pf (!iop) { gasneti_mutex_lock(&thread->foreign_lock); { // no branch needed - an empty list remains empty iop = thread->foreign_iops; thread->foreign_iops = NULL; } gasneti_mutex_unlock(&thread->foreign_lock); } return iop; } /* get a new iop */ extern gasnete_iop_t *gasnete_iop_new(gasneti_threaddata_t * const thread) { gasnete_iop_t *iop = _gasnete_iop_new(thread); if_pt (iop) { thread->iop_free = iop->next; gasneti_memcheck(iop); gasneti_assert_uint(iop->threadidx ,==, thread->threadidx); #if GASNET_DEBUG gasneti_assert_uint(OPTYPE(iop) ,==, gasnete_event_type_free_iop); iop->event[0] = gasnete_event_type_iop; #endif /* If using trace or stats, want meaningful counts when tracing NBI access regions */ #if GASNETI_STATS_OR_TRACE iop->initiated_get_cnt = 0; iop->initiated_put_cnt = 0; gasnete_op_atomic_set(&(iop->completed_get_cnt), 0, 0); gasnete_op_atomic_set(&(iop->completed_put_cnt), 0, 0); #endif } else { iop = gasnete_iop_alloc(thread); } iop->next = NULL; #ifdef GASNETE_IOP_NEW_EXTRA // Hook for conduit-specific initializations and assertions GASNETE_IOP_NEW_EXTRA(iop); #endif gasnete_iop_check(iop); return iop; } /* prepare to free an iop, but do not destroy anything that would * be necessary to test/wait on the iop. */ GASNETI_INLINE(gasnete_iop_prep_free) void gasnete_iop_prep_free(gasnete_iop_t *iop) { gasnete_iop_check(iop); gasneti_assert(EVENT_ALL_DONE(iop)); gasneti_assert(GASNETE_IOP_CNTDONE(iop,get)); gasneti_assert(GASNETE_IOP_CNTDONE(iop,put)); gasneti_assert(GASNETE_IOP_CNTDONE(iop,rmw)); gasneti_assert(GASNETE_IOP_LC_CNTDONE(iop)); gasneti_assert(iop->next == iop); #ifdef GASNETE_IOP_PREP_FREE_EXTRA // Hook for conduit-specific cleanups and assertions GASNETE_IOP_PREP_FREE_EXTRA(iop); #endif #if GASNET_DEBUG gasneti_assert_uint(iop->event[0] ,==, gasnete_event_type_iop); iop->event[0] = gasnete_event_type_pendingfree_iop; #endif } /* free an iop */ static void gasnete_iop_free(gasnete_iop_t *iop GASNETI_THREAD_FARG) { gasnete_iop_prep_free(iop); #ifdef GASNETE_IOP_FREE_EXTRA // Hook for conduit-specific cleanups // NOTE: Defining this adds an extra pass in {test,wait}_{some,all} and // therefore should only be used if there are steps that cannot safely be // performed in GASNETE_IOP_PREP_FREE_EXTRA. GASNETE_IOP_FREE_EXTRA(iop); #endif #if GASNET_DEBUG gasneti_assert_uint(iop->event[0] ,==, gasnete_event_type_pendingfree_iop); iop->event[0] = gasnete_event_type_free_iop; #endif gasneti_threaddata_t * const thread = gasnete_threadtable[iop->threadidx]; if (thread == GASNETI_MYTHREAD) { iop->next = thread->iop_free; thread->iop_free = iop; } else { gasneti_mutex_lock(&thread->foreign_lock); iop->next = thread->foreign_iops; thread->foreign_iops = iop; gasneti_mutex_unlock(&thread->foreign_lock); } } #endif // GASNETI_DISABLE_REFERENCE_EOP // ------------------------------------------------------------------------------------ // Inlines for "aop" and "nbi_accessregion" interfaces // Used by "gasneti_aop" portion of the GASNET-Internal OP Interface // and by begin/end nbi_accessregion GASNETI_INLINE(gasnete_aop_push) void gasnete_aop_push(gasnete_iop_t *iop, gasneti_threaddata_t * const thread) { gasneti_assert(iop != NULL); gasnete_iop_check(iop); gasneti_assert(thread == gasnete_threadtable[iop->threadidx]); gasneti_assert(iop->next == iop); // Distinguishes an iop returned from access region iop->next = thread->current_iop; thread->current_iop = iop; } // TODO: enforce prohibition against pop of client-created aop? GASNETI_INLINE(gasnete_aop_pop) gasnete_iop_t *gasnete_aop_pop(gasneti_threaddata_t * const thread) { gasnete_iop_t * const iop = thread->current_iop; gasneti_assert(iop->next != NULL); // Cannot pop the implicit iop thread->current_iop = iop->next; iop->next = iop; // Identify as returned from access region return iop; } GASNETI_INLINE(gasnete_aop_create) gasnete_iop_t *gasnete_aop_create(gasneti_threaddata_t * const thread) { gasnete_iop_t *iop = gasnete_iop_new(thread); // "Arm" all events and offset the counters to prevent them "firing" prematurely // TODO: should merge SET_EVENT_TYPE() calls into one write. iop->initiated_put_cnt++; iop->initiated_get_cnt++; iop->initiated_rmw_cnt++; SET_EVENT_TYPE(iop, gasnete_iop_event_put, gasnete_event_type_iop); SET_EVENT_TYPE(iop, gasnete_iop_event_get, gasnete_event_type_iop); SET_EVENT_TYPE(iop, gasnete_iop_event_rmw, gasnete_event_type_iop); #if GASNETE_HAVE_LC iop->initiated_alc_cnt++; SET_EVENT_TYPE(iop, gasnete_iop_event_alc, gasnete_event_type_lc); #endif iop->next = iop; // mark as returned from access region return iop; } GASNETI_INLINE(gasnete_aop_to_event) gex_Event_t gasnete_aop_to_event(gasnete_iop_t *iop) { gasneti_assert(iop->next == iop); // Distinguishes an iop returned from access region // Balance the offsets applied to each counter at creation GASNETE_IOP_CNT_FINISH_REG(iop, put, 1, 0); GASNETE_IOP_CNT_FINISH_REG(iop, get, 1, 0); GASNETE_IOP_CNT_FINISH_REG(iop, rmw, 1, 0); #if GASNETE_HAVE_LC GASNETE_IOP_CNT_FINISH_REG(iop, alc, 1, 0); #endif return (gex_Event_t)iop; } /* ------------------------------------------------------------------------------------ */ /* GASNET-Internal OP Interface */ // TODO-EX: EOP_INTERFACE // Must generalize IOP to encompass LC, RMW and future Event Categories // Anticipated implementation is to replace 'isget' with a member of the // gasnete_iop_event_* enum, and to use it to compute the address of the // initiated and completed counters. // Must generalize EOP to encompass LC // Initially we only have PUT and LC subevents, but the generalization // should allow for more, and thus likely resembles the plan for IOP. gasneti_eop_t *gasneti_eop_create(GASNETI_THREAD_FARG_ALONE) { gasnete_eop_t *op = gasnete_eop_new(GASNETI_MYTHREAD); return (gasneti_eop_t *)op; } gasneti_iop_t *gasneti_iop_register(unsigned int noperations, int isget GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t * const op = mythread->current_iop; gasnete_iop_check(op); if (isget) op->initiated_get_cnt += noperations; else op->initiated_put_cnt += noperations; gasnete_iop_check(op); return (gasneti_iop_t *)op; } int gasneti_op_is_eop(void *_op) { gasnete_op_t * op = _op; return OPTYPE(op) == OPTYPE_EXPLICIT; } void gasneti_eop_markdone(gasneti_eop_t *eop) { gasnete_eop_t *op = (gasnete_eop_t *)eop; gasnete_eop_check(op); GASNETE_EOP_MARKDONE(op); } void gasneti_iop_markdone(gasneti_iop_t *iop, unsigned int noperations, int isget) { gasnete_iop_t *op = (gasnete_iop_t *)iop; if (isget) GASNETE_IOP_CNT_FINISH(op, get, noperations, 0); else GASNETE_IOP_CNT_FINISH(op, put, noperations, 0); gasnete_iop_check(op); } gasneti_aop_t *gasneti_aop_create(GASNETI_THREAD_FARG_ALONE) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; return (gasneti_aop_t*) gasnete_aop_create(mythread); } gex_Event_t gasneti_aop_to_event(gasneti_aop_t *aop) { return gasnete_aop_to_event((gasnete_iop_t*) aop); } void gasneti_aop_push(gasneti_aop_t *aop GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_aop_push((gasnete_iop_t*) aop, mythread ); } gasneti_aop_t *gasneti_aop_pop(GASNETI_THREAD_FARG_ALONE) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; return (gasneti_aop_t*) gasnete_aop_pop(mythread); } // DO NOT USE THIS! // This exists only to permit "safe" testing in gasnet_diagnostic.c. void gasneti_nbi_ff_drain_(GASNETI_THREAD_FARG_ALONE) { gasneti_aop_t *aop = GASNETI_MYTHREAD->nbi_ff_aop; if (aop) { gex_Event_Wait( gasneti_aop_to_event(aop) ); GASNETI_MYTHREAD->nbi_ff_aop = NULL; } } // TODO-EX: EOP_INTERFACE // These next two are a stop-gap pending proper generalization. gasneti_iop_t *gasneti_iop_register_rmw(unsigned int noperations GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t * const op = mythread->current_iop; gasnete_iop_check(op); op->initiated_rmw_cnt += noperations; gasnete_iop_check(op); return (gasneti_iop_t *)op; } void gasneti_iop_markdone_rmw(gasneti_iop_t *iop, unsigned int noperations) { gasnete_iop_t *op = (gasnete_iop_t *)iop; GASNETE_IOP_CNT_FINISH(op, rmw, noperations, 0); gasnete_iop_check(op); } /* ------------------------------------------------------------------------------------ */ /* Synchronization for explicit-event non-blocking operations: =========================================================== */ #ifndef gasnete_test /* query an op for completeness * free it if complete * returns 0 or 1 */ GASNETI_INLINE(gasnete_op_try_free) int gasnete_op_try_free(gex_Event_t event GASNETI_THREAD_FARG) { #ifdef GASNETE_OP_TRY_FREE_EXTRA // Hook to operate on conduit-specific events GASNETE_OP_TRY_FREE_EXTRA(event); #error "GASNETE_OP_TRY_FREE_EXTRA not implemented in array test/wait ops" #endif gasnete_event_check(event); // "Fast-path" detects outstanding event w/o any branches if (EVENT_LIVE_MASK & *(volatile uint8_t *)event) return 0; // "Slow-path" must distinguish root from leaf const unsigned int idx = gasneti_event_idx(event); if_pt (! idx) { // It's a root event event if (EVENT_ANY_LIVE(event)) return 0; // TODO-EX: // Could potentially weaken "sync_reads" for some cases? // However, that might not be worth the branching it would require. gasneti_sync_reads(); // TODO-EX: the mask operation in OPTYPE() unnecessary? if_pt (OPTYPE((gasnete_op_t*)event) == OPTYPE_EXPLICIT) { gasnete_eop_free((gasnete_eop_t*)event GASNETI_THREAD_PASS); } else { gasnete_iop_free((gasnete_iop_t*)event GASNETI_THREAD_PASS); } } else { // It's a leaf event gasneti_assert(EVENT_DONE(gasneti_event_op(event), idx)); // confirm the EVENT_LIVE_MASK result gasneti_compiler_fence(); // TODO-EX: revisit this } return 1; } extern int gasnete_test(gex_Event_t event GASNETI_THREAD_FARG) { gasneti_assert(event != GEX_EVENT_INVALID); // invalid handled inline in header return gasnete_op_try_free(event GASNETI_THREAD_PASS) ? GASNET_OK : GASNET_ERR_NOT_READY; } #endif #if !defined(gasnete_test_all) || \ !defined(gasnete_test_some) GASNETI_INLINE(gasnete_bulk_free_eops) void gasnete_bulk_free_eops(gasnete_eop_t *head, gasnete_eop_t **tail_p, gasneti_threaddata_t * const thread GASNETI_THREAD_FARG) { gasneti_assert_uint(head->threadidx ,==, thread->threadidx); // TODO: validate entire list? #if GASNETI_MAX_THREADS > 1 if_pf (thread != GASNETI_MYTHREAD) { gasneti_mutex_lock(&thread->foreign_lock); *tail_p = thread->foreign_eops; thread->foreign_eops = head; gasneti_mutex_unlock(&thread->foreign_lock); } else #endif { *tail_p = thread->eop_free; thread->eop_free = head; } } GASNETI_INLINE(gasnete_bulk_free_iops) void gasnete_bulk_free_iops(gasnete_iop_t *head, gasnete_iop_t **tail_p, gasneti_threaddata_t * const thread GASNETI_THREAD_FARG) { gasneti_assert_uint(head->threadidx ,==, thread->threadidx); // TODO: validate entire list? #if GASNETI_MAX_THREADS > 1 if_pf (thread != GASNETI_MYTHREAD) { gasneti_mutex_lock(&thread->foreign_lock); *tail_p = thread->foreign_iops; thread->foreign_iops = head; gasneti_mutex_unlock(&thread->foreign_lock); } else #endif { *tail_p = thread->iop_free; thread->iop_free = head; } } GASNETI_INLINE(gasnete_test_array) int gasnete_test_array(const int is_all, gex_Event_t *pevent, size_t numevents GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; #if GASNETI_MAX_THREADS > 1 gasnete_threadidx_t eop_threadidx = GASNETE_INVALID_THREADIDX; gasnete_threadidx_t iop_threadidx = GASNETE_INVALID_THREADIDX; gasnete_eop_t *eop_head[2] = {NULL, NULL}; gasnete_eop_t **eop_tail_p[2] = {&eop_head[0], &eop_head[1]}; gasnete_iop_t *iop_head[2] = {NULL, NULL}; gasnete_iop_t **iop_tail_p[2] = {&iop_head[0], &iop_head[1]}; #else const gasnete_threadidx_t eop_threadidx = 0; const gasnete_threadidx_t iop_threadidx = 0; gasnete_eop_t *eop_head[1] = {NULL}; gasnete_eop_t **eop_tail_p[1] = {&eop_head[0]}; gasnete_iop_t *iop_head[1] = {NULL}; gasnete_iop_t **iop_tail_p[1] = {&iop_head[0]}; #endif int all_synced = 1; int some_synced = 0; int roots_synced = 0; int empty = 1; size_t to_retest = 0; gasneti_assert(pevent); // NOTE: We must allow leaves and their corresponding roots to appear in the // array in any order while ensuring that we don't sync a root but not some // corresponding leaf. The current approach is to make two passes, the first // testing all events. If and only if the first pass synced at least one // root and failed to sync at least one leaf, a second pass is made to retest // all of the remaining leaves. // // Between the two passes, the roots synced in the first pass are kept on // temporary linked-lists to avoid them being recycled from the free list // while their leaves are still being tested. Even in the absence of a // second pass, this will yield an efficient "bulk free". // Pass 1: test all events, evaluate 'empty', and count 'to_retest' for (size_t i = 0; i < numevents; i++) { const gex_Event_t event = pevent[i]; if (GEX_EVENT_INVALID != event) { gasnete_event_check(event); empty = 0; if (gasneti_event_idx(event)) { // It's a leaf if (EVENT_LIVE_MASK & *(volatile uint8_t *)pevent[i]) { // Do NOT "all_synced = 0" since we'll retry this leaf in second pass to_retest += 1; continue; } } else { // It's a root if (EVENT_ANY_LIVE(event)) { all_synced = 0; continue; } // TODO-EX: we need to revist this sync_reads() calll. // Can we weaken it for some cases (if the branches don't eliminate the benfits)? // Can we ever safely move it out of this loop? // Should it move inside the ..._prep_free() calls and become DEBUG only? // Of course, if any Gets were syned we still need at least one RMB before return. gasneti_sync_reads(); gasnete_op_t *op = (gasnete_op_t*)event; #if GASNETI_MAX_THREADS > 1 int other; #else const int other = 0; #endif if (OPTYPE(op) == OPTYPE_EXPLICIT) { // TODO-EX: the mask operation in OPTYPE() unnecessary? #if GASNETI_MAX_THREADS > 1 if (eop_threadidx == GASNETE_INVALID_THREADIDX) { eop_threadidx = op->threadidx; other = 0; } else { other = (eop_threadidx != op->threadidx); } #endif gasnete_eop_t *eop = (gasnete_eop_t*)op; gasnete_eop_prep_free(eop); *eop_tail_p[other] = eop; eop_tail_p[other] = &eop->next; eop->next = NULL; } else { #if GASNETI_MAX_THREADS > 1 if (iop_threadidx == GASNETE_INVALID_THREADIDX) { iop_threadidx = op->threadidx; other = 0; } else { other = (iop_threadidx != op->threadidx); } #endif gasnete_iop_t *iop = (gasnete_iop_t*)op; gasnete_iop_prep_free(iop); *iop_tail_p[other] = iop; iop_tail_p[other] = &iop->next; iop->next = NULL; } roots_synced = 1; } pevent[i] = GEX_EVENT_INVALID; some_synced = 1; } } // Pass 2: retest all still-live leaf events (if any) gasneti_assert(! gasneti_event_idx(GEX_EVENT_INVALID)); if (to_retest) { if (roots_synced) { size_t to_test = to_retest; for (size_t i = 0; to_test; i++) { gasneti_assert_uint(i ,<, numevents); const gex_Event_t event = pevent[i]; if (gasneti_event_idx(event)) { to_test -= 1; if (EVENT_LIVE_MASK & *(volatile uint8_t *)event) { all_synced = 0; } else { pevent[i] = GEX_EVENT_INVALID; some_synced = 1; } } } } else { all_synced = 0; } } // Bulk free "main" (first seen) thread's eops and iops if (eop_head[0]) { #if defined(GASNET_DEBUG) || defined(GASNETE_EOP_FREE_EXTRA) gasnete_eop_t *eop = eop_head[0]; do { #ifdef GASNETE_EOP_FREE_EXTRA GASNETE_EOP_FREE_EXTRA(eop); #endif #if GASNET_DEBUG eop->event[0] = gasnete_event_type_free_eop; #endif eop = eop->next; } while(eop); #endif gasnete_bulk_free_eops(eop_head[0], eop_tail_p[0], gasnete_threadtable[eop_threadidx] GASNETI_THREAD_PASS); } if (iop_head[0]) { #if defined(GASNET_DEBUG) || defined(GASNETE_IOP_FREE_EXTRA) gasnete_iop_t *iop = iop_head[0]; do { #ifdef GASNETE_IOP_FREE_EXTRA GASNETE_EOP_FREE_EXTRA(iop); #endif #if GASNET_DEBUG iop->event[0] = gasnete_event_type_free_iop; #endif iop = iop->next; } while(iop); #endif gasnete_bulk_free_iops(iop_head[0], iop_tail_p[0], gasnete_threadtable[iop_threadidx] GASNETI_THREAD_PASS); } #if GASNETI_MAX_THREADS > 1 // Individually (non-bulk) free remaining eops and iops (not beloning to "main" thread) // TODO-EX: sort/bin to amortize lock accesses? { gasnete_eop_t *eop = eop_head[1]; while (eop) { #ifdef GASNETE_EOP_FREE_EXTRA GASNETE_EOP_FREE_EXTRA(eop); #endif #if GASNET_DEBUG eop->event[0] = gasnete_event_type_free_eop; #endif gasnete_eop_t * const next = eop->next; gasnete_bulk_free_eops(eop, &eop->next, gasnete_threadtable[eop->threadidx] GASNETI_THREAD_PASS); eop = next; } gasnete_iop_t *iop = iop_head[1]; while (iop) { #ifdef GASNETE_IOP_FREE_EXTRA GASNETE_EOP_FREE_EXTRA(iop); #endif #if GASNET_DEBUG iop->event[0] = gasnete_event_type_free_iop; #endif gasnete_iop_t * const next = iop->next; gasnete_bulk_free_iops(iop, &iop->next, gasnete_threadtable[iop->threadidx] GASNETI_THREAD_PASS); iop = next; } } #endif return is_all ? all_synced : (some_synced || empty); } #endif #ifndef gasnete_test_some extern int gasnete_test_some (gex_Event_t *pevent, size_t numevents GASNETI_THREAD_FARG) { return gasnete_test_array(0, pevent, numevents GASNETI_THREAD_PASS) ? GASNET_OK : GASNET_ERR_NOT_READY; } #endif #ifndef gasnete_test_all extern int gasnete_test_all (gex_Event_t *pevent, size_t numevents GASNETI_THREAD_FARG) { return gasnete_test_array(1, pevent, numevents GASNETI_THREAD_PASS) ? GASNET_OK : GASNET_ERR_NOT_READY; } #endif /* ------------------------------------------------------------------------------------ */ /* Synchronization for implicit-event non-blocking operations: =========================================================== */ #ifndef gasnete_test_syncnbi_mask // TODO-EX: public header should dispatch to specialized functions on constant mask extern int gasnete_test_syncnbi_mask(gex_EC_t mask, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t *iop = mythread->current_iop; gasneti_assert_uint(iop->threadidx ,==, mythread->threadidx); gasneti_assert_uint(OPTYPE(iop) ,==, OPTYPE_IMPLICIT); #if GASNET_DEBUG if (iop->next != NULL) gasneti_fatalerror("VIOLATION: attempted to call gex_NBI_Test() inside an NBI access region"); #endif #if 0 // Version suitable for inlining when mask is constant if (mask & GASNETI_EC_ALC) { if (! GASNETE_IOP_LC_CNTDONE(iop)) return GASNET_ERR_NOT_READY; } if (mask & GASNETI_EC_PUT) { if (! GASNETE_IOP_CNTDONE(iop,put)) return GASNET_ERR_NOT_READY; } if (mask & GASNETI_EC_GET) { if (! GASNETE_IOP_CNTDONE(iop,get)) return GASNET_ERR_NOT_READY; } if (mask & GASNETI_EC_RMW) { if (! GASNETE_IOP_CNTDONE(iop,rmw)) return GASNET_ERR_NOT_READY; } #else // Version to reduce branches when mask is unknown gex_EC_t live_mask = 0; if (! GASNETE_IOP_LC_CNTDONE(iop)) live_mask |= GASNETI_EC_ALC; if (! GASNETE_IOP_CNTDONE(iop,put)) live_mask |= GASNETI_EC_PUT; if (! GASNETE_IOP_CNTDONE(iop,get)) live_mask |= GASNETI_EC_GET; if (! GASNETE_IOP_CNTDONE(iop,rmw)) live_mask |= GASNETI_EC_RMW; if (mask & live_mask) return GASNET_ERR_NOT_READY; #endif // TODO-EX: revisit this logic if (mask & (GASNETI_EC_GET|GASNETI_EC_RMW)) { gasneti_sync_reads(); } else { gasneti_compiler_fence(); } return GASNET_OK; } #endif /* ------------------------------------------------------------------------------------ */ /* Implicit access region synchronization ====================================== */ /* This implementation allows recursive access regions, although the spec does not require that */ /* operations are associated with the most immediately enclosing access region */ #ifndef gasnete_begin_nbi_accessregion extern void gasnete_begin_nbi_accessregion(gex_Flags_t flags, int allowrecursion GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; GASNETI_TRACE_PRINTF(S,("BEGIN_NBI_ACCESSREGION")); #if GASNET_DEBUG if (!allowrecursion && mythread->current_iop->next != NULL) gasneti_fatalerror("VIOLATION: tried to initiate a recursive NBI access region"); #endif gasnete_aop_push(gasnete_aop_create(mythread), mythread); } #endif #ifndef gasnete_end_nbi_accessregion extern gex_Event_t gasnete_end_nbi_accessregion(gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; #if GASNET_DEBUG if (mythread->current_iop->next == NULL) gasneti_fatalerror("VIOLATION: call to gasnete_end_nbi_accessregion() outside access region"); #endif gasnete_iop_t *iop = gasnete_aop_pop(mythread); GASNETI_TRACE_EVENT_VAL(S,END_NBI_ACCESSREGION,iop->initiated_get_cnt + iop->initiated_put_cnt); return gasnete_aop_to_event(iop); } #endif #ifndef gasnete_Event_QueryLeaf #if GASNET_DEBUG static void _gasnete_get_leaf_check(gasnete_op_t *op, gex_EC_t event_id) { if (gasneti_event_idx(op)) { gasneti_fatalerror("Non-root event passed to gex_Event_QueryLeaf()"); } switch (OPTYPE(op)) { case OPTYPE_IMPLICIT: { gasnete_iop_t *iop = (gasnete_iop_t*)op; gasnete_iop_check(iop); gasneti_assert(iop->next); // was returned from access region switch (event_id) { case GEX_EC_PUT: // fall-through... case GEX_EC_GET: // fall-through... case GEX_EC_RMW: // fall-through... case GEX_EC_LC: return; } break; } case OPTYPE_EXPLICIT: { gasnete_eop_t *eop = (gasnete_eop_t*)op; gasnete_eop_check(eop); switch (event_id) { case GEX_EC_LC: return; } break; } } gasneti_fatalerror("Invalid arguments to gex_Event_QueryLeaf()"); } #else #define _gasnete_get_leaf_check(op, event_id) ((void)0) #endif extern gex_Event_t gasnete_Event_QueryLeaf(gex_Event_t root, gex_EC_t event_id) { if (root == GEX_EVENT_INVALID) return GEX_EVENT_INVALID; gasnete_op_t *op = (gasnete_op_t*)root; _gasnete_get_leaf_check(op, event_id); gasneti_static_assert(gasnete_eop_event_alc == gasnete_iop_event_alc); switch (event_id) { // TODO_EX: did we really want to allow extraction of PUT and GET (root) events? case GEX_EC_PUT: return gasneti_op_event(op, gasnete_iop_event_put); case GEX_EC_GET: return gasneti_op_event(op, gasnete_iop_event_get); case GEX_EC_RMW: return gasneti_op_event(op, gasnete_iop_event_rmw); case GEX_EC_LC: return gasneti_op_event(op, gasnete_iop_event_alc); } gasneti_fatalerror("Invalid arguments to gex_Event_QueryLeaf()"); return GEX_EVENT_INVALID; // NOT REACHED } #endif /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/aclocal.m40000664000175000017500000012414015142313673015264 0ustar alastairalastair# generated automatically by aclocal 1.16.2 -*- Autoconf -*- # Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # -*- Autoconf -*- # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # # Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl AC_CONFIG_HEADERS($@)]) AC_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should simply use the 'AC][_PROG_CC' macro instead. Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', but upon 'ac_cv_prog_cc_stdc'.])]) AC_DEFUN([AM_C_PROTOTYPES], [AC_FATAL([automatic de-ANSI-fication support has been removed])]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([other/plpa/config/acinclude.m4]) m4_include([acinclude.m4]) gasnet-2025.8.0/udp-conduit/0000775000175000017500000000000015142313673015655 5ustar alastairalastairgasnet-2025.8.0/udp-conduit/conduit.mak.in0000664000175000017500000000236515142313673020427 0ustar alastairalastair#INSTRUCTIONS# Conduit-specific Makefile fragment settings #INSTRUCTIONS# #INSTRUCTIONS# The contents of this file are embedded into the #INSTRUCTIONS# *-(seq,par,parsync).mak Makefile fragments at conduit build time #INSTRUCTIONS# The settings in those fragments are used to build GASNet clients #INSTRUCTIONS# (including the GASNet tests). #INSTRUCTIONS# See the conduit-writer instructions in the generated fragments #INSTRUCTIONS# or $(top_srcdir)/other/fragment-head.mak.in for usage info. # AMUDP is C++-based, which requires us to link using the C++ compiler GASNET_LD_OVERRIDE = @CXX@ GASNET_LDFLAGS_OVERRIDE = @CXXFLAGS@ @LDFLAGS@ @cxxLDFLAGS@ # Linker feature requirements embedded in GASNET_LD(FLAGS) which are not satisfied solely by GASNET_LIBS # (eg possible dependence on implicit MPI or C++ libraries added by a linker wrapper in GASNET_LD): GASNET_LD_REQUIRES_CXX = 1 # hooks for using AMUDP library from within build tree ###NOINSTALL### # (nothing additional required for installed copy) ###NOINSTALL### CONDUIT_INCLUDES = -I@TOP_SRCDIR@/other/amudp -I@TOP_BUILDDIR@/other/amudp ###NOINSTALL### CONDUIT_LDFLAGS = CONDUIT_LIBDIRS = -L@TOP_BUILDDIR@/other/amudp ###NOINSTALL### CONDUIT_LIBS = $(CONDUIT_LIBDIRS) -lamudp @GASNET_UDP_LIBS@ gasnet-2025.8.0/udp-conduit/gasnet_core_fwd.h0000664000175000017500000002244115142313673021162 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/udp-conduit/gasnet_core_fwd.h $ * Description: GASNet header for UDP conduit core (forward definitions) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_FWD_H #define _GASNET_CORE_FWD_H #define GASNET_CORE_VERSION AMUDP_LIBRARY_VERSION #define GASNET_CORE_VERSION_STR _STRINGIFY(GASNET_CORE_VERSION) #define GASNET_CORE_NAME UDP #define GASNET_CORE_NAME_STR _STRINGIFY(GASNET_CORE_NAME) #define GASNET_CONDUIT_NAME GASNET_CORE_NAME #define GASNET_CONDUIT_NAME_STR _STRINGIFY(GASNET_CONDUIT_NAME) #define GASNET_CONDUIT_UDP 1 //#define GASNETC_DEFAULT_SPAWNER ### /* GASNET_PSHM defined 1 if this conduit supports PSHM. leave undefined otherwise. */ #if GASNETI_PSHM_ENABLED #define GASNET_PSHM 1 #endif /* defined to be 1 if gasnet_init guarantees that the remote-access memory segment will be aligned */ /* at the same virtual address on all nodes. defined to 0 otherwise */ #if GASNETI_DISABLE_ALIGNED_SEGMENTS || GASNET_PSHM #define GASNET_ALIGNED_SEGMENTS 0 /* user or PSHM disabled segment alignment */ #else /* udp-conduit supports both aligned and un-aligned */ #if defined(HAVE_MMAP) && !PLATFORM_ARCH_CRAYX1 #define GASNET_ALIGNED_SEGMENTS 1 #else #define GASNET_ALIGNED_SEGMENTS 0 #endif #endif #define GASNET_MAXNODES AMUDP_MAX_NUMTRANSLATIONS // If this conduit is considered a "portable conduit" only *conditionally*, // uncomment to enable calls to gasnetc_check_portable_conduit(void) as // described in gasnet_internal.c. //#define GASNETC_CHECK_PORTABLE_CONDUIT_HOOK 1 // uncomment for each MK_CLASS which the conduit supports. leave commented otherwise //#define GASNET_HAVE_MK_CLASS_CUDA_UVA GASNETI_MK_CLASS_CUDA_UVA_ENABLED //#define GASNET_HAVE_MK_CLASS_HIP GASNETI_MK_CLASS_HIP_ENABLED //#define GASNET_HAVE_MK_CLASS_ZE GASNETI_MK_CLASS_ZE_ENABLED // define to 1 if your conduit has "private" thread(s) which can run AM handlers //#define GASNET_RCV_THREAD 1 // define to 1 if your conduit has "private" thread(s) which progress sends of RMA and/or AM //#define GASNET_SND_THREAD 1 /* uncomment if your conduit has "private" threads which might run conduit code and/or the client's AM handlers, even under GASNET_SEQ. this ensures locking is still done correctly, etc */ //#define GASNETI_CONDUIT_THREADS 1 /* udp-conduit supports top-level poll throttling */ #define GASNETC_USING_SUSPEND_RESUME 1 /* override default error values to use those defined by AMUDP */ #define _GASNET_ERRORS #define _GASNET_ERR_BASE 10000 #define GASNET_ERR_NOT_INIT 1 #define GASNET_ERR_RESOURCE 3 #define GASNET_ERR_BAD_ARG 2 #define GASNET_ERR_NOT_READY (_GASNET_ERR_BASE+4) #define GASNET_ERR_BARRIER_MISMATCH (_GASNET_ERR_BASE+5) /* define these to 1 if your conduit needs to augment the implementation of gasneti_reghandler() (in gasnet_internal.c) */ #define GASNETC_AMREGISTER 1 /* define this to 1 if your conduit supports PSHM, but cannot use the default interfaces. (see template-conduit/gasnet_core.c and gasnet_pshm.h) */ /* #define GASNETC_GET_HANDLER 1 */ /* uncomment each line for which your conduit supports the corresponding token info query. */ #define GASNET_SUPPORTS_TI_SRCRANK 1 #define GASNET_SUPPORTS_TI_EP 1 #define GASNET_SUPPORTS_TI_ENTRY 1 #define GASNET_SUPPORTS_TI_IS_REQ 1 #define GASNET_SUPPORTS_TI_IS_LONG 1 /* uncomment for each {Request,Reply} X {Medium,Long} pair for which your conduit implements the corresponding gasnetc_AM_{Prepare,Commit}*() in a "native" manner which "can avoid one or more payload copies relative to the corresponding fixed-payload AM call under the right conditions". See also "GASNETC_BUILD_NP_*", immediately below. */ /* #define GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM 1 */ /* #define GASNET_NATIVE_NP_ALLOC_REP_MEDIUM 1 */ /* #define GASNET_NATIVE_NP_ALLOC_REQ_LONG 1 */ /* #define GASNET_NATIVE_NP_ALLOC_REP_LONG 1 */ /* conduits may define to '1' (or '0') for {Request,Reply} X {Medium,Long} pairs to force (or prevent) compilation of the corresponding pieces of the conduit-independent reference implementation. If unset, the default is equivalent to '!GASNET_NATIVE_NP_ALLOC_[foo]'. In other words: by default each reference implementation is built if and only if the conduit is not claiming a "native" implementation. This default is correct for most conduits. The conduit-independent implementation works in terms of the internal functions gasnetc_AM{Request,Reply}{Medium,Long}V(). Therefore, your conduit must provide the V-suffixed functions for any case with the corresponding GASNETC_BUILD_NP_* equal to '1' (explicitly or by default). */ /* #define GASNETC_BUILD_NP_REQ_MEDIUM (###) */ /* #define GASNETC_BUILD_NP_REP_MEDIUM (###) */ /* #define GASNETC_BUILD_NP_REQ_LONG (###) */ /* #define GASNETC_BUILD_NP_REP_LONG (###) */ /* uncomment for each conduit-provided Commit{Req,Rep}{Medium,Long}() which has the numargs argument even in an NDEBUG build (it is always passed in DEBUG builds). */ //#define GASNETC_AM_COMMIT_REQ_MEDIUM_NARGS 1 //#define GASNETC_AM_COMMIT_REP_MEDIUM_NARGS 1 //#define GASNETC_AM_COMMIT_REQ_LONG_NARGS 1 //#define GASNETC_AM_COMMIT_REP_LONG_NARGS 1 /* uncomment if your conduit's gasnetc_AMRequest{Short,Medium,Long}V() include a call to gasneti_AMPoll (or equivalent) for progress. The preferred implementation is to Poll only in the M-suffixed calls and not the V-suffixed calls (and GASNETC_REQUESTV_POLLS undefined). Used only by reference implementations (if any) of Prepare/Commit. */ #define GASNETC_REQUESTV_POLLS 1 /* If your conduit uses conduit-specific extensions to the basic object types, then define the corresponding SIZEOF macros below to return the total length of the conduit-specific object, including the prefix portion which must be the matching GASNETI_[OBJECT]_COMMON fields. Similarly, *_HOOK macros should be defined as callbacks to perform conduit-specific initialization and finalization tasks, if any. If a given SIZEOF macro is defined, but the corresponding INIT_HOOK is not, then space beyond the COMMON fields will be zero-initialized. In all cases, GASNETC_[OBJECT]_EXTRA_DECLS provides the place to provide necessary declarations (since this file is included very early). */ //#define GASNETC_CLIENT_EXTRA_DECLS (###) //#define GASNETC_CLIENT_INIT_HOOK(i_client) (###) //#define GASNETC_CLIENT_FINI_HOOK(i_client) (###) //#define GASNETC_SIZEOF_CLIENT_T() (###) //#define GASNETC_SEGMENT_EXTRA_DECLS (###) //#define GASNETC_SEGMENT_INIT_HOOK(i_segment) (###) //#define GASNETC_SEGMENT_FINI_HOOK(i_segment) (###) //#define GASNETC_SIZEOF_SEGMENT_T() (###) //#define GASNETC_TM_EXTRA_DECLS (###) //#define GASNETC_TM_INIT_HOOK(i_tm) (###) //#define GASNETC_TM_FINI_HOOK(i_tm) (###) //#define GASNETC_SIZEOF_TM_T() (###) //#define GASNETC_EP_EXTRA_DECLS (###) //#define GASNETC_EP_INIT_HOOK(i_ep) (###) //#define GASNETC_EP_FINI_HOOK(i_ep) (###) //#define GASNETC_SIZEOF_EP_T() (###) // Uncomment the following defines if conduit provides the corresponding hook. // See gasnet_internal.h for prototypes and brief descriptions. //#define GASNETC_SEGMENT_ATTACH_HOOK 1 //#define GASNETC_SEGMENT_CREATE_HOOK 1 //#define GASNETC_SEGMENT_DESTROY_HOOK 1 //#define GASNETC_EP_BINDSEGMENT_HOOK 1 //#define GASNETC_EP_PUBLISHBOUNDSEGMENT_HOOK 1 // Uncomment the following defines if conduit provides the corresponding hook. // See other/kinds/gasnet_kinds_internal.h for prototypes and brief descriptions. //#define GASNETC_MK_CREATE_HOOK 1 //#define GASNETC_MK_DESTROY_HOOK 1 // If conduit supports GASNET_MAXEPS!=1, set default and (optional) max values here. // Leaving GASNETC_MAXEPS_DFLT unset will result in GASNET_MAXEPS=1, independent // of all other settings (appropriate for conduits without multi-ep support). // If set, GASNETC_MAXEPS_MAX it is used to limit a user's --with-maxeps (and a // global default limit is used otherwise). //#define GASNETC_MAXEPS_DFLT ### // default num endpoints this conduit supports, undef means no multi-ep support //#define GASNETC_MAXEPS_MAX ### // leave unset for default /* this can be used to add conduit-specific statistical collection values (see gasnet_trace.h) */ #define GASNETC_CONDUIT_STATS(CNT,VAL,TIME) extern void gasnetc_stats_dump(int _reset); #define GASNETC_STATS_DUMP(reset) gasnetc_stats_dump(reset) #define GASNETC_FATALSIGNAL_CALLBACK(sig) gasnetc_fatalsignal_callback(sig) extern void gasnetc_fatalsignal_callback(int _sig); extern void _gasnetc_set_waitmode(int _wait_mode); #define gasnetc_set_waitmode(wait_mode) _gasnetc_set_waitmode(wait_mode) /* udp-conduit's default spawner produces random node placements. could in theory leave at 0 when SPAWNFN='L' */ #define GASNETC_DEFAULT_NODEMAP_EXACT 1 /* Configure gasnet_handle.[ch] */ // No validated support for hugetlbfs w/ or w/o PSHM at this time and risk of // issues if auto-enabled on an HPE Cray EX system (e.g. bug 4473). #if GASNETI_ARCH_CRAYEX #undef GASNETI_USE_HUGETLBFS #endif #endif gasnet-2025.8.0/udp-conduit/gasnet_core.h0000664000175000017500000001234215142313673020321 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/udp-conduit/gasnet_core.h $ * Description: GASNet header for UDP conduit core * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_H #define _GASNET_CORE_H #include #include /* TODO enhance AMUDP to support thread-safety */ /* TODO add UDP bypass to loopback messages */ /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ extern void gasnetc_exit(int _exitcode) GASNETI_NORETURN; GASNETI_NORETURNP(gasnetc_exit) #define gasnet_exit gasnetc_exit /* Some conduits permit gasnet_init(NULL,NULL). Define to 1 if this conduit supports this extension, or to 0 otherwise. */ #define GASNET_NULL_ARGV_OK 1 // convenience declaration extern void AMUDP_SPMDSetProc(int); /* ------------------------------------------------------------------------------------ */ extern int gasnetc_Client_Init( gex_Client_t *_client_p, gex_EP_t *_ep_p, gex_TM_t *_tm_p, const char *_clientName, int *_argc, char ***_argv, gex_Flags_t _flags); // gasnetex.h handles name-shifting of gex_Client_Init() /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ typedef struct { gasneti_mutex_t lock; #if GASNETI_STATS_OR_TRACE gasneti_tick_t acquiretime; #endif } gex_HSL_t; #if GASNETI_STATS_OR_TRACE #define GASNETC_LOCK_STAT_INIT ,0 #else #define GASNETC_LOCK_STAT_INIT #endif #define GEX_HSL_INITIALIZER { \ GASNETI_MUTEX_INITIALIZER \ GASNETC_LOCK_STAT_INIT \ } /* decide whether we have "real" HSL's */ #if GASNETI_THREADS || /* need for safety */ \ GASNET_DEBUG || GASNETI_STATS_OR_TRACE /* or debug/tracing */ #ifdef GASNETC_NULL_HSL #error bad defn of GASNETC_NULL_HSL #endif #else #define GASNETC_NULL_HSL 1 #endif #if GASNETC_NULL_HSL /* HSL's unnecessary - compile away to nothing */ #define gex_HSL_Init(hsl) #define gex_HSL_Destroy(hsl) #define gex_HSL_Lock(hsl) #define gex_HSL_Unlock(hsl) #define gex_HSL_Trylock(hsl) GASNET_OK #else extern void gasnetc_hsl_init (gex_HSL_t *_hsl); extern void gasnetc_hsl_destroy(gex_HSL_t *_hsl); extern void gasnetc_hsl_lock (gex_HSL_t *_hsl); extern void gasnetc_hsl_unlock (gex_HSL_t *_hsl); extern int gasnetc_hsl_trylock(gex_HSL_t *_hsl) GASNETI_WARN_UNUSED_RESULT; #define gex_HSL_Init gasnetc_hsl_init #define gex_HSL_Destroy gasnetc_hsl_destroy #define gex_HSL_Lock gasnetc_hsl_lock #define gex_HSL_Unlock gasnetc_hsl_unlock #define gex_HSL_Trylock gasnetc_hsl_trylock #endif /* ------------------------------------------------------------------------------------ */ /* Active Message Size Limits ========================== */ #define gex_AM_MaxArgs() ((unsigned int)AM_MaxShort()) #define gex_AM_LUBRequestMedium() ((size_t)MIN(AM_MaxMedium(), GASNETC_MAX_MEDIUM_NBRHD_DFLT)) #define gex_AM_LUBReplyMedium() ((size_t)MIN(AM_MaxMedium(), GASNETC_MAX_MEDIUM_NBRHD_DFLT)) #define gex_AM_LUBRequestLong() ((size_t)AM_MaxLong()) #define gex_AM_LUBReplyLong() ((size_t)AM_MaxLong()) // TODO-EX: Can these be improved upon, at least for PSHM case #define gasnetc_AM_MaxRequestMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS5(tm,rank,lc_opt,flags,nargs),gex_AM_LUBRequestMedium()) #define gasnetc_AM_MaxReplyMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS5(tm,rank,lc_opt,flags,nargs),gex_AM_LUBReplyMedium()) #define gasnetc_Token_MaxReplyMedium(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(token,lc_opt,flags,nargs),gex_AM_LUBReplyMedium()) #define gasnetc_AM_MaxRequestLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBRequestLong())) #define gasnetc_AM_MaxReplyLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBReplyLong())) #define gasnetc_Token_MaxReplyLong(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS3(token,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBReplyLong())) /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #define GASNET_BLOCKUNTIL(cond) gasneti_polluntil(cond) /* ------------------------------------------------------------------------------------ */ #endif #include gasnet-2025.8.0/udp-conduit/gasnet_core.c0000664000175000017500000012426715142313673020326 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/udp-conduit/gasnet_core.c $ * Description: GASNet UDP conduit Implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include #include #include #include #include GASNETI_IDENT(gasnetc_IdentString_Version, "$GASNetCoreLibraryVersion: " GASNET_CORE_VERSION_STR " $"); GASNETI_IDENT(gasnetc_IdentString_Name, "$GASNetCoreLibraryName: " GASNET_CORE_NAME_STR " $"); gex_AM_Entry_t *gasnetc_handler; // TODO-EX: will be replaced with per-EP tables static void gasnetc_traceoutput(int); static uint64_t gasnetc_networkpid; eb_t gasnetc_bundle; ep_t gasnetc_endpoint; gasneti_mutex_t gasnetc_AMlock = GASNETI_MUTEX_INITIALIZER; /* protect access to AMUDP */ volatile int gasnetc_AMLockYield = 0; #if GASNET_TRACE || GASNET_DEBUG extern void gasnetc_enteringHandler_hook(amudp_category_t cat, int isReq, int handlerId, void *token, void *buf, size_t nbytes, int numargs, uint32_t *args); extern void gasnetc_leavingHandler_hook(amudp_category_t cat, int isReq); #endif #if defined(GASNET_CSPAWN_CMD) #define GASNETC_DEFAULT_SPAWNFN C GASNETI_IDENT(gasnetc_IdentString_Default_CSpawnCommand, "$GASNetCSpawnCommand: " GASNET_CSPAWN_CMD " $"); #else /* AMUDP implicit ssh startup */ #define GASNETC_DEFAULT_SPAWNFN S #endif GASNETI_IDENT(gasnetc_IdentString_DefaultSpawnFn, "$GASNetDefaultSpawnFunction: " _STRINGIFY(GASNETC_DEFAULT_SPAWNFN) " $"); /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* called at startup to check configuration sanity */ static void gasnetc_check_config(void) { gasneti_check_config_preinit(); gasneti_static_assert(GASNET_MAXNODES <= AMUDP_MAX_SPMDPROCS); gasneti_static_assert(AMUDP_MAX_NUMHANDLERS >= 256); gasneti_static_assert(AMUDP_MAX_SEGLENGTH == (uintptr_t)-1); gasneti_static_assert(GASNET_ERR_NOT_INIT == AM_ERR_NOT_INIT); gasneti_static_assert(GASNET_ERR_RESOURCE == AM_ERR_RESOURCE); gasneti_static_assert(GASNET_ERR_BAD_ARG == AM_ERR_BAD_ARG); } void gasnetc_bootstrapBarrier(void) { int retval; AM_ASSERT_LOCKED(); /* need this because SPMDBarrier may poll */ GASNETI_AM_SAFE_NORETURN(retval,AMUDP_SPMDBarrier()); if_pf (retval) gasneti_fatalerror("failure in gasnetc_bootstrapBarrier()"); } void gasnetc_bootstrapExchange(void *src, size_t len, void *dest) { int retval; GASNETI_AM_SAFE_NORETURN(retval,AMUDP_SPMDAllGather(src, dest, len)); if_pf (retval) gasneti_fatalerror("failure in gasnetc_bootstrapExchange()"); } #if GASNET_PSHM // Currently used only in call to gasneti_pshm_init() // Naive (poorly scaling) "reference" SubsetBroadcast via AMUDP_SPMDAllGather() // Since every caller extracts the desired rootnode's contribution from an // AllGather, the NbrhdBroadcast and HostBroadcast are identical. static void gasnetc_bootstrapSubsetBroadcast(void *src, size_t len, void *dest, int rootnode) { void *tmp = gasneti_malloc(len * gasneti_nodes); gasneti_assert(NULL != src); if (gasneti_mynode != rootnode) { // silence a harmless valgrind error caused by sending potentially uninitialized bytes memset(src, 0, len); } gasnetc_bootstrapExchange(src, len, tmp); GASNETI_MEMCPY(dest, (void*)((uintptr_t)tmp + (len * rootnode)), len); gasneti_free(tmp); } #define gasnetc_bootstrapNbrhdBroadcast gasnetc_bootstrapSubsetBroadcast #define gasnetc_bootstrapHostBroadcast gasnetc_bootstrapSubsetBroadcast #endif #define INITERR(type, reason) do { \ if (gasneti_VerboseErrors) { \ gasneti_console_message("ERROR","GASNet initialization encountered an error: %s\n" \ " in %s at %s:%i", \ #reason, GASNETI_CURRENT_FUNCTION, __FILE__, __LINE__); \ } \ retval = GASNET_ERR_ ## type; \ goto done; \ } while (0) static int gasnetc_init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { int retval = GASNET_OK; /* check system sanity */ gasnetc_check_config(); /* --------- begin Master code ------------ */ if (!AMUDP_SPMDIsWorker(argv?*argv:NULL)) { /* assume we're an implicit master (we don't currently support explicit workers spawned without using the AMUDP SPMD API) */ int num_nodes; int i; char spawnfn; amudp_spawnfn_t fp = (amudp_spawnfn_t)NULL; if (!argv) { gasneti_fatalerror("implicit-master without argv not supported - use amudprun"); } /* pretend we're node 0, for purposes of verbose env reporting */ gasneti_init_done = 1; gasneti_mynode = 0; #if defined(GASNET_CSPAWN_CMD) { /* set configure default cspawn cmd */ const char *cmd = gasneti_getenv_withdefault("GASNET_CSPAWN_CMD",GASNET_CSPAWN_CMD); gasneti_setenv("GASNET_CSPAWN_CMD",cmd); } #endif /* parse node count from command line */ if (*argc < 2) { gasneti_console0_message("GASNet","Missing parallel node count"); gasneti_console0_message("GASNet","Specify node count as first argument, or use programming model spawn script to start job"); gasneti_console0_message("GASNet","Usage '%s {program arguments}'", (*argv)[0]); exit(-1); } /* * argv[1] is number of nodes; argv[0] is program name; argv is * list of arguments including program name and number of nodes. * We need to remove argv[1] when the argument array is passed * to the tic_main(). */ num_nodes = atoi((*argv)[1]); if (num_nodes < 1) { gasneti_console0_message("GASNet","Invalid number of nodes: %s", (*argv)[1]); gasneti_console0_message("GASNet","Usage '%s {program arguments}'", (*argv)[0]); exit (1); } /* remove the num_nodes argument */ for (i = 1; i < (*argc)-1; i++) { (*argv)[i] = (*argv)[i+1]; } (*argv)[(*argc)-1] = NULL; (*argc)--; /* get spawnfn */ spawnfn = *gasneti_getenv_withdefault("GASNET_SPAWNFN", _STRINGIFY(GASNETC_DEFAULT_SPAWNFN)); { /* ensure we pass the effective spawnfn to worker env */ char spawnstr[2]; spawnstr[0] = toupper(spawnfn); spawnstr[1] = '\0'; gasneti_setenv("GASNET_SPAWNFN",spawnstr); } /* ensure reliable localhost operation by forcing use of 127.0.0.1 * setting GASNET_MASTERIP to the empty string will prevent this */ if (('L' == toupper(spawnfn)) && !gasneti_getenv("GASNET_MASTERIP")) { gasneti_setenv("GASNET_MASTERIP","127.0.0.1"); } for (i=0; AMUDP_Spawnfn_Desc[i].abbrev; i++) { if (toupper(spawnfn) == toupper(AMUDP_Spawnfn_Desc[i].abbrev)) { fp = AMUDP_Spawnfn_Desc[i].fnptr; break; } } if (!fp) { gasneti_console0_message("GASNet","Invalid spawn function specified in GASNET_SPAWNFN"); gasneti_console0_message("GASNet","The following mechanisms are available:"); for (i=0; AMUDP_Spawnfn_Desc[i].abbrev; i++) { gasneti_console0_message("GASNet"," '%c' %s\n", toupper(AMUDP_Spawnfn_Desc[i].abbrev), AMUDP_Spawnfn_Desc[i].desc); } exit(1); } #if GASNET_DEBUG_VERBOSE gasneti_console_message("gasnetc_init","about to spawn..."); #endif retval = AMUDP_SPMDStartup(argc, argv, num_nodes, 0, fp, NULL, &gasnetc_bundle, &gasnetc_endpoint); /* master startup should never return */ gasneti_fatalerror("master AMUDP_SPMDStartup() failed"); } /* --------- begin Worker code ------------ */ AMLOCK(); if (gasneti_init_done) INITERR(NOT_INIT, "GASNet already initialized"); AMX_VerboseErrors = gasneti_VerboseErrors; AMUDP_SPMDkillmyprocess = gasneti_killmyprocess; #if GASNETI_CALIBRATE_TSC // Early x86*/Linux timer initialization before AMUDP_SPMDStartup() // // udp-conduit does not support user-provided values for GASNET_TSC_RATE* // (which fine-tune timer calibration on x86/Linux). This is partially due // to a dependency cycle at startup with envvar propagation, but more // importantly because the retransmission algorithm (and hence all conduit // comms) rely on gasnet timers to be accurate (at least approximately), so // we don't allow the user to weaken or disable their calibration. gasneti_unsetenv("GASNET_TSC_RATE"); gasneti_unsetenv("GASNET_TSC_RATE_TOLERANCE"); gasneti_unsetenv("GASNET_TSC_RATE_HARD_TOLERANCE"); GASNETI_TICKS_INIT(); #endif /* perform job spawn */ retval = AMUDP_SPMDStartup(argc, argv, 0, 0, NULL, /* dummies */ &gasnetc_networkpid, &gasnetc_bundle, &gasnetc_endpoint); if (retval != AM_OK) INITERR(RESOURCE, "worker AMUDP_SPMDStartup() failed"); gasneti_init_done = 1; /* enable early to allow tracing */ gasneti_getenv_hook = (/* cast drops const */ gasneti_getenv_fn_t*)&AMUDP_SPMDgetenvMaster; gasneti_check_env_prefix_hook = &AMUDP_check_env_prefix; gasneti_mynode = AMUDP_SPMDMyProc(); gasneti_nodes = AMUDP_SPMDNumProcs(); gasneti_freezeForDebugger(); // must come after getenv_hook is set #if !GASNETI_CALIBRATE_TSC /* Must init timers after global env, and preferably before tracing */ GASNETI_TICKS_INIT(); #endif /* enable tracing */ gasneti_trace_init(argc, argv); GASNETI_AM_SAFE(AMUDP_SPMDSetExitCallback(gasnetc_traceoutput)); /* for local spawn, assume we want to wait-block */ if (gasneti_getenv("GASNET_SPAWNFN") && *gasneti_getenv("GASNET_SPAWNFN") == 'L') { GASNETI_TRACE_PRINTF(C,("setting gasnet_set_waitmode(GASNET_WAIT_BLOCK) for localhost spawn")); gasnet_set_waitmode(GASNET_WAIT_BLOCK); } gasneti_spawn_verbose = gasneti_getenv_yesno_withdefault("GASNET_SPAWN_VERBOSE",0); if (gasneti_spawn_verbose) { gasneti_console_message("gasnetc_init","spawn successful - proc %i/%i starting...", gasneti_mynode, gasneti_nodes); } // Note intentional lack of env var tracing when just check for deprecated use if (gasneti_getenv("GASNET_USE_GETHOSTID") && !gasneti_getenv("GASNET_HOST_DETECT")) { // Legacy behavior: GASNET_USE_GETHOSTID demands use of gasneti_gethostid(), // but we ignore GASNET_USE_GETHOSTID if GASNET_HOST_DETECT is set. if (!gasneti_mynode) { gasneti_console_message("WARNING","GASNET_USE_GETHOSTID is deprecated. " "Use GASNET_HOST_DETECT instead."); } if (gasneti_getenv_yesno_withdefault("GASNET_USE_GETHOSTID", 0)) { gasneti_setenv("GASNET_HOST_DETECT", "gethostid"); } } { // Use (hash of) hostname and the local IP address to construct the nodemap // when GASNET_HOST_DETECT == "conduit" uint64_t local_id; en_t my_name; GASNETI_AM_SAFE( AM_GetTranslationName(gasnetc_endpoint, gasneti_mynode, &my_name) ); uint64_t csum = gasneti_hosthash(); local_id = GASNETI_MAKEWORD(GASNETI_HIWORD(csum) ^ GASNETI_LOWORD(csum), *(uint32_t *)(&my_name.sin_addr)); gasneti_nodemapInit(&gasnetc_bootstrapExchange, &local_id, sizeof(local_id), 0); } #if GASNET_PSHM gasneti_pshm_init(&gasnetc_bootstrapNbrhdBroadcast, 0); #endif // Create first Client, EP and TM *here*, for use in subsequent bootstrap communication { // allocate the client object gasneti_Client_t client = gasneti_alloc_client(clientName, flags); *client_p = gasneti_export_client(client); // create the initial endpoint with internal handlers if (gex_EP_Create(ep_p, *client_p, GEX_EP_CAPABILITY_ALL, flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error creating initial endpoint"); gasneti_EP_t ep = gasneti_import_ep(*ep_p); gasnetc_handler = ep->_amtbl; // TODO-EX: this global variable to be removed // create the tm gasneti_TM_t tm = gasneti_alloc_tm(ep, gasneti_mynode, gasneti_nodes, flags); *tm_p = gasneti_export_tm(tm); } gasnetc_bootstrapBarrier(); gasneti_attach_done = 1; // Ready to use AM Short and Medium for bootstrap comms uintptr_t mmap_limit; #if HAVE_MMAP { AMUNLOCK(); // Bound per-host (sharedLimit) argument to gasneti_segmentLimit() // while properly reserving space for aux segments. uint64_t sharedLimit = gasneti_sharedLimit(); uint64_t hostAuxSegs = gasneti_myhost.node_count * gasneti_auxseg_preinit(); if (sharedLimit <= hostAuxSegs) { gasneti_fatalerror("per-host segment limit %"PRIu64" is too small to accommodate %i aux segments, " "total size %"PRIu64". You may need to adjust OS shared memory limits.", sharedLimit, gasneti_myhost.node_count, hostAuxSegs); } sharedLimit -= hostAuxSegs; mmap_limit = gasneti_segmentLimit((uintptr_t)-1, sharedLimit, NULL, NULL); AMLOCK(); } #else // TODO-EX: we can at least look at rlimits but such logic belongs in conduit-indep code mmap_limit = (intptr_t)-1; #endif /* allocate and attach an aux segment */ (void) gasneti_auxsegAttach((uintptr_t)-1, &gasnetc_bootstrapExchange); /* determine Max{Local,GLobal}SegmentSize */ gasneti_segmentInit(mmap_limit, &gasnetc_bootstrapExchange, flags); AMUNLOCK(); gasneti_assert(retval == GASNET_OK); return retval; done: /* error return while locked */ AMUNLOCK(); GASNETI_RETURN(retval); } /* ------------------------------------------------------------------------------------ */ extern void _gasnetc_set_waitmode(int wait_mode) { if (wait_mode == GASNET_WAIT_BLOCK) { AMUDP_PoliteSync = 1; } else { AMUDP_PoliteSync = 0; } } /* ------------------------------------------------------------------------------------ */ extern int gasnetc_amregister(gex_AM_Index_t index, gex_AM_Entry_t *entry) { // NOTE: we do not currently attempt to hold the AMLOCK if (AM_SetHandler(gasnetc_endpoint, (handler_t)index, entry->gex_fnptr) != AM_OK) GASNETI_RETURN_ERRR(RESOURCE, "AM_SetHandler() failed while registering handlers"); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ static gasnet_seginfo_t myseg; extern int gasnetc_attach_primary(gex_Flags_t flags) { int retval = GASNET_OK; AMLOCK(); /* pause to make sure all nodes have called attach if a node calls gasnet_exit() between init/attach, then this allows us to process the AMUDP_SPMD control messages required for job shutdown */ gasnetc_bootstrapBarrier(); /* ------------------------------------------------------------------------------------ */ /* register fatal signal handlers */ /* catch fatal signals and convert to SIGQUIT */ gasneti_registerSignalHandlers(gasneti_defaultSignalHandler); // register process exit-time hook gasneti_registerExitHandler(gasnetc_exit); #if GASNET_TRACE || GASNET_DEBUG #if !GASNET_DEBUG if (GASNETI_TRACE_ENABLED(A)) #endif GASNETI_AM_SAFE(AMUDP_SetHandlerCallbacks(gasnetc_endpoint, gasnetc_enteringHandler_hook, gasnetc_leavingHandler_hook)); #endif // register all of memory as the AMX-level segment // this is needed for multi-segment support (aux + client at a minimum) retval = AM_SetSeg(gasnetc_endpoint, NULL, (uintptr_t)-1); if (retval != AM_OK) INITERR(RESOURCE, "AM_SetSeg() failed"); /* ------------------------------------------------------------------------------------ */ /* primary attach complete */ gasneti_attach_done = 1; gasnetc_bootstrapBarrier(); AMUNLOCK(); GASNETI_TRACE_PRINTF(C,("gasnetc_attach_primary(): primary attach complete\n")); gasnete_init(); /* init the extended API */ gasneti_nodemapFini(); /* ensure extended API is initialized across nodes */ AMLOCK(); gasnetc_bootstrapBarrier(); AMUNLOCK(); gasneti_assert(retval == GASNET_OK); return retval; done: /* error return while locked */ AMUNLOCK(); GASNETI_RETURN(retval); } /* ------------------------------------------------------------------------------------ */ // TODO-EX: this is a candidate for factorization (once we understand the per-conduit variations) extern int gasnetc_Client_Init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { gasneti_assert(client_p); gasneti_assert(ep_p); gasneti_assert(tm_p); gasneti_assert(clientName); #if !GASNET_NULL_ARGV_OK gasneti_assert(argc); gasneti_assert(argv); #endif // main init // TODO-EX: must split off per-client and per-endpoint portions if (!gasneti_init_done) { // First client // NOTE: gasnetc_init() creates the first Client, EP and TM for use in bootstrap comms int retval = gasnetc_init(client_p, ep_p, tm_p, clientName, argc, argv, flags); if (retval != GASNET_OK) GASNETI_RETURN(retval); #if 0 /* called within gasnetc_init to allow init tracing */ gasneti_trace_init(argc, argv); #endif } else { gasneti_fatalerror("No multi-client support"); } // Do NOT move this prior to the gasneti_trace_init() call GASNETI_TRACE_PRINTF(O,("gex_Client_Init: name='%s' argc_p=%p argv_p=%p flags=%d", clientName, (void *)argc, (void *)argv, flags)); if (0 == (flags & GASNETI_FLAG_INIT_LEGACY)) { /* primary attach */ if (GASNET_OK != gasnetc_attach_primary(flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error in primary attach"); /* ensure everything is initialized across all nodes */ gasnet_barrier(0, GASNET_BARRIERFLAG_UNNAMED); } else { gasneti_attach_done = 0; // Pending client call to gasnet_attach() } return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ static int gasnetc_exitcalled = 0; static void gasnetc_traceoutput(int exitcode) { if (!gasnetc_exitcalled) { gasneti_flush_streams(); gasneti_trace_finish(); } } extern void gasnetc_stats_dump(int reset) { /* dump AMUDP statistics */ if (GASNETI_STATS_ENABLED(C) || reset) { const char *statdump; int isglobal = 0; int retval = 0; amudp_stats_t stats = AMUDP_initial_stats; /* bug 2181 - lock state is unknown, eg we may be in handler context */ int shouldunlock; AMLOCK_CAUTIOUS(shouldunlock); if (isglobal) { /* TODO: tricky bit - if this exit is collective, we can display more interesting and useful statistics with collective cooperation. But there's no easy way to know for sure whether the exit is collective. */ /* TODO: want a bootstrap barrier here for global stats to ensure network is quiescent, but no way to do this unless we know things are collective */ if (gasneti_mynode != 0) { GASNETI_AM_SAFE_NORETURN(retval, AMUDP_GetEndpointStatistics(gasnetc_endpoint, &stats)); /* get statistics */ /* TODO: send stats to zero */ } else { amudp_stats_t *remote_stats = NULL; /* TODO: gather stats from all nodes */ GASNETI_AM_SAFE_NORETURN(retval, AMUDP_AggregateStatistics(&stats, remote_stats)); } } else { GASNETI_AM_SAFE_NORETURN(retval, AMUDP_GetEndpointStatistics(gasnetc_endpoint, &stats)); /* get statistics */ } if (reset && !retval) GASNETI_AM_SAFE_NORETURN(retval, AMUDP_ResetEndpointStatistics(gasnetc_endpoint)); if (GASNETI_STATS_ENABLED(C) && (gasneti_mynode == 0 || !isglobal) && !retval) { GASNETI_STATS_PRINTF(C,("--------------------------------------------------------------------------------")); GASNETI_STATS_PRINTF(C,("AMUDP Statistics:")); if (!isglobal) GASNETI_STATS_PRINTF(C,("*** AMUDP stat dump reflects only local node info, because gasnet_exit is non-collective ***")); statdump = AMUDP_DumpStatistics(NULL, &stats, isglobal); GASNETI_STATS_PRINTF(C,("\n%s",statdump)); /* note, dump has embedded '%' chars */ GASNETI_STATS_PRINTF(C,("--------------------------------------------------------------------------------")); } if (shouldunlock) AMUNLOCK(); } } extern void gasnetc_fatalsignal_callback(int sig) { if (gasnetc_exitcalled) { /* if we get a fatal signal during exit, it's almost certainly a signal-safety or UDP shutdown issue and not a client bug, so don't bother reporting it verbosely, just die silently */ #if 0 gasneti_fatalerror("gasnetc_fatalsignal_callback aborting..."); #endif gasneti_killmyprocess(1); } } extern void gasnetc_exit(int exitcode) { /* once we start a shutdown, ignore all future SIGQUIT signals or we risk reentrancy */ gasneti_reghandler(SIGQUIT, SIG_IGN); gasnetc_exitcalled = 1; { /* ensure only one thread ever continues past this point */ static gasneti_mutex_t exit_lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&exit_lock); } if (gasneti_spawn_verbose) gasneti_console_message("EXIT STATE","gasnet_exit(%i)",exitcode); else GASNETI_TRACE_PRINTF(C,("gasnet_exit(%i)\n", exitcode)); gasneti_flush_streams(); gasneti_trace_finish(); gasneti_sched_yield(); /* bug2181: try to prevent races where we exit while other local pthreads are in AMUDP can't use a blocking lock here, because may be in a signal context */ int dummy; AMLOCK_CAUTIOUS(dummy); AMUDP_SPMDExit(exitcode); gasneti_fatalerror("AMUDP_SPMDExit failed!"); } /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #if GASNET_PSHM /* (###) GASNETC_GET_HANDLER * If your conduit will support PSHM, then there needs to be a way * for PSHM to see your handler table. If you use the recommended * implementation then you don't need to do anything special. * Othwerwise, #define GASNETC_GET_HANDLER in gasnet_core_fwd.h and * implement gasnetc_get_handler() as a macro in * gasnet_core_internal.h */ #endif GASNETI_INLINE(gasnetc_msgsource) gex_Rank_t gasnetc_msgsource(gex_Token_t token) { #if GASNET_PSHM gasneti_assert(! gasnetc_token_in_nbrhd(token)); #endif gasneti_assert(token); int tmp; /* AMUDP wants an int, but gex_Rank_t is uint32_t */ gasneti_assert_zeroret(AMUDP_GetSourceId(token, &tmp)); gasneti_assert(tmp >= 0); gex_Rank_t sourceid = tmp; gasneti_assert_uint(sourceid ,<, gasneti_nodes); return sourceid; } extern gex_TI_t gasnetc_Token_Info( gex_Token_t token, gex_Token_Info_t *info, gex_TI_t mask) { gasneti_assert(token); gasneti_assert(info); if (gasnetc_token_in_nbrhd(token)) { return gasnetc_nbrhd_Token_Info(token, info, mask); } gex_TI_t result = 0; info->gex_srcrank = gasnetc_msgsource(token); result |= GEX_TI_SRCRANK; info->gex_ep = gasneti_THUNK_EP; result |= GEX_TI_EP; if (mask & (GEX_TI_ENTRY|GEX_TI_IS_REQ|GEX_TI_IS_LONG)) { handler_t index; amudp_category_t category; int is_req; gasneti_assert_zeroret(AMUDP_GetTokenInfo(token,&index,&category,&is_req)); info->gex_entry = gasneti_import_ep(gasneti_THUNK_EP)->_amtbl + index; result |= GEX_TI_ENTRY; info->gex_is_req = is_req; result |= GEX_TI_IS_REQ; info->gex_is_long = (category == amudp_Long); result |= GEX_TI_IS_LONG; } return GASNETI_TOKEN_INFO_RETURN(result, info, mask); } extern int gasnetc_AMPoll(GASNETI_THREAD_FARG_ALONE) { int retval; GASNETI_CHECKATTACH(); #if GASNET_PSHM gasneti_AMPSHMPoll(0 GASNETI_THREAD_PASS); #endif static unsigned int cntr; // In single-nbrhd case never need to poll the network for client AMs. // However, we'll still check for control traffic for orderly exit handling, on every 256th call. if (gasneti_mysupernode.grp_count > 1) { AMLOCK(); GASNETI_AM_SAFE_NORETURN(retval,AM_Poll(gasnetc_bundle)); AMUNLOCK(); } else if (! (0xff & cntr++)) { // Thread race here is harmless (this is a heuristic) // TODO-EX: a lock-free peek would allow elimination of this lock cycle AMLOCK(); GASNETI_AM_SAFE_NORETURN(retval,AMUDP_SPMDHandleControlTraffic(NULL)); AMUNLOCK(); } else { retval = GASNET_OK; } if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); else return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ /* Active Message Request Functions ================================ TODO-EX: "nbrhd" support means we could remove the unreachable loopback paths in AMUDP */ GASNETI_INLINE(gasnetc_AMRequestShort) int gasnetc_AMRequestShort( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* poll at least once, to assure forward progress */ retval = gasnetc_nbrhd_RequestGeneric( gasneti_Short, jobrank, handler, 0, 0, 0, flags, numargs, argptr GASNETI_THREAD_PASS); } else { AMLOCK_TOSEND(); GASNETI_AM_SAFE_NORETURN(retval, AMUDP_RequestVA(gasnetc_endpoint, jobrank, handler, numargs, argptr)); AMUNLOCK(); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMRequestShortM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTSHORT(tm,rank,handler,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestShort(tm,rank,handler,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMRequestMedium) int gasnetc_AMRequestMedium(gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gasneti_leaf_finish(lc_opt); // always locally completed gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* poll at least once, to assure forward progress */ retval = gasnetc_nbrhd_RequestGeneric( gasneti_Medium, jobrank, handler, source_addr, nbytes, 0, flags, numargs, argptr GASNETI_THREAD_PASS); } else { AMLOCK_TOSEND(); GASNETI_AM_SAFE_NORETURN(retval, AMUDP_RequestIVA(gasnetc_endpoint, jobrank, handler, source_addr, nbytes, numargs, argptr)); AMUNLOCK(); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMRequestMediumV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { return gasnetc_AMRequestMedium(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); } extern int gasnetc_AMRequestMediumM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTMEDIUM(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestMedium(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMRequestLong) int gasnetc_AMRequestLong( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gasneti_leaf_finish(lc_opt); // always locally completed gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* poll at least once, to assure forward progress */ retval = gasnetc_nbrhd_RequestGeneric( gasneti_Long, jobrank, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr GASNETI_THREAD_PASS); } else { uintptr_t dest_offset = (uintptr_t)dest_addr; AMLOCK_TOSEND(); GASNETI_AM_SAFE_NORETURN(retval, AMUDP_RequestXferVA(gasnetc_endpoint, jobrank, handler, source_addr, nbytes, dest_offset, 0, numargs, argptr)); AMUNLOCK(); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMRequestLongV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { return gasnetc_AMRequestLong(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); } extern int gasnetc_AMRequestLongM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTLONG(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestLong(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMReplyShort) int gasnetc_AMReplyShort( gex_Token_t token, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr) { int retval; if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Short, token, handler, 0, 0, 0, flags, numargs, argptr); } else { AM_ASSERT_LOCKED(); GASNETI_AM_SAFE_NORETURN(retval, AMUDP_ReplyVA(token, handler, numargs, argptr)); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMReplyShortM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags, int numargs, ...) { GASNETI_COMMON_AMREPLYSHORT(token,handler,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyShort(token,handler,flags,numargs,argptr); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMReplyMedium) int gasnetc_AMReplyMedium( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { int retval; gasneti_leaf_finish(lc_opt); // always locally completed if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Medium, token, handler, source_addr, nbytes, 0, flags, numargs, argptr); } else { AM_ASSERT_LOCKED(); GASNETI_AM_SAFE_NORETURN(retval, AMUDP_ReplyIVA(token, handler, source_addr, nbytes, numargs, argptr)); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMReplyMediumV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { return gasnetc_AMReplyMedium(token,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr); } extern int gasnetc_AMReplyMediumM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { GASNETI_COMMON_AMREPLYMEDIUM(token,handler,source_addr,nbytes,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyMedium(token,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMReplyLong) int gasnetc_AMReplyLong( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { int retval; gasneti_leaf_finish(lc_opt); // always locally completed if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Long, token, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr); } else { uintptr_t dest_offset = (uintptr_t)dest_addr; AM_ASSERT_LOCKED(); GASNETI_AM_SAFE_NORETURN(retval, AMUDP_ReplyXferVA(token, handler, source_addr, nbytes, dest_offset, numargs, argptr)); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMReplyLongV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { return gasnetc_AMReplyLong(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr); } extern int gasnetc_AMReplyLongM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { GASNETI_COMMON_AMREPLYLONG(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyLong(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ #if !GASNETC_NULL_HSL extern void gasnetc_hsl_init (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); gasneti_mutex_init(&(hsl->lock)); } extern void gasnetc_hsl_destroy(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); gasneti_mutex_destroy(&(hsl->lock)); } extern void gasnetc_hsl_lock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); { #if GASNETI_STATS_OR_TRACE gasneti_tick_t startlock = GASNETI_TICKS_NOW_IFENABLED(L); #endif #if GASNETC_HSL_SPINLOCK if_pf (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { if (gasneti_wait_mode == GASNET_WAIT_SPIN) { while (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { gasneti_spinloop_hint(); } } else { gasneti_mutex_lock(&(hsl->lock)); } } #else gasneti_mutex_lock(&(hsl->lock)); #endif #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); GASNETI_TRACE_EVENT_TIME(L, HSL_LOCK, hsl->acquiretime-startlock); #endif } } extern void gasnetc_hsl_unlock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); GASNETI_TRACE_EVENT_TIME(L, HSL_UNLOCK, GASNETI_TICKS_NOW_IFENABLED(L)-hsl->acquiretime); gasneti_mutex_unlock(&(hsl->lock)); } extern int gasnetc_hsl_trylock(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); { int locked = (gasneti_mutex_trylock(&(hsl->lock)) == 0); GASNETI_TRACE_EVENT_VAL(L, HSL_TRYLOCK, locked); if (locked) { #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); #endif } return locked ? GASNET_OK : GASNET_ERR_NOT_READY; } } #endif /* ------------------------------------------------------------------------------------ */ #if GASNET_TRACE || GASNET_DEBUG /* called when entering/leaving handler - also called when entering/leaving AM_Reply call */ extern void gasnetc_enteringHandler_hook(amudp_category_t cat, int isReq, int handlerId, void *token, void *buf, size_t nbytes, int numargs, uint32_t *args) { #if GASNET_DEBUG // TODO-EX: per-EP table const gex_AM_Entry_t * const handler_entry = &gasnetc_handler[handlerId]; gasneti_amtbl_check(handler_entry, numargs, (gasneti_category_t)cat, isReq); #endif switch (cat) { case amudp_Short: if (isReq) GASNETI_TRACE_AMSHORT_REQHANDLER(handlerId, token, numargs, args); else GASNETI_TRACE_AMSHORT_REPHANDLER(handlerId, token, numargs, args); break; case amudp_Medium: if (isReq) GASNETI_TRACE_AMMEDIUM_REQHANDLER(handlerId, token, buf, nbytes, numargs, args); else GASNETI_TRACE_AMMEDIUM_REPHANDLER(handlerId, token, buf, nbytes, numargs, args); break; case amudp_Long: if (isReq) GASNETI_TRACE_AMLONG_REQHANDLER(handlerId, token, buf, nbytes, numargs, args); else GASNETI_TRACE_AMLONG_REPHANDLER(handlerId, token, buf, nbytes, numargs, args); break; default: gasneti_unreachable_error(("Unknown handler type in gasnetc_enteringHandler_hook(): 0x%x",(int)cat)); } GASNETI_HANDLER_ENTER(isReq); } extern void gasnetc_leavingHandler_hook(amudp_category_t cat, int isReq) { switch (cat) { case amudp_Short: GASNETI_TRACE_PRINTF(A,("AM%s_SHORT_HANDLER: handler execution complete", (isReq?"REQUEST":"REPLY"))); \ break; case amudp_Medium: GASNETI_TRACE_PRINTF(A,("AM%s_MEDIUM_HANDLER: handler execution complete", (isReq?"REQUEST":"REPLY"))); \ break; case amudp_Long: GASNETI_TRACE_PRINTF(A,("AM%s_LONG_HANDLER: handler execution complete", (isReq?"REQUEST":"REPLY"))); \ break; default: gasneti_unreachable_error(("Unknown handler type in gasnetc_leavingHandler_hook(): 0x%x",(int)cat)); } GASNETI_HANDLER_LEAVE(isReq); } #endif /* ------------------------------------------------------------------------------------ */ /* Private Handlers: ================ see mpi-conduit and extended-ref for examples on how to declare AM handlers here (for internal conduit use in bootstrapping, job management, etc.) */ static gex_AM_Entry_t const gasnetc_handlers[] = { GASNETC_COMMON_HANDLERS(), /* ptr-width independent handlers */ /* ptr-width dependent handlers */ GASNETI_HANDLER_EOT }; gex_AM_Entry_t const *gasnetc_get_handlertable(void) { return gasnetc_handlers; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/udp-conduit/README0000664000175000017500000004732515142313673016550 0ustar alastairalastairGASNet udp-conduit documentation Dan Bonachea User Information: ----------------- udp-conduit is a portable implementation of GASNet over UDP, the User Datagram Protocol that is a standard component of the TCP/IP protocol suite. Where this conduit runs: ----------------------- udp-conduit is fully portable and should work correctly on any POSIX-like system with a functional TCP/IP stack and a working C++98 compiler. It is expected to provide competitive performance on standard Ethernet hardware. It is not intended for production use on networks that expose a high-performance network API, where an appropriate GASNet native conduit implementation should be preferred. It does not explicitly exploit any RDMA-over-Ethernet capabilities. In rare cases, systems may require tweaks to an IP firewall to allow UDP communication between compute nodes on the udp-conduit worker subnet. See more below. Optional compile-time settings: ------------------------------ * All the compile-time settings from extended-ref (see the extended-ref README) * Some OS's (notably Cygwin) default to a very low value for FD_SETSIZE in sys/select.h, which can limit job scaling because the master spawning process maintains 1 TCP socket per worker (or 3 with ROUTE_OUTPUT=1). Cygwin at least allows this value to be grown by the user at AMUDP library compile-time, eg: make MANUAL_DEFINES=-DFD_SETSIZE=1024 * Similarly, most OS's have a limit on the number of file descriptors (aka open files) per process, which may need to be raised on the master process to support large-scale runs with 1..3 TCP connections per worker. This is usually controlled from the shell's limit or ulimit command, subject to system-imposed hard limits. Choosing the udp-conduit spawn mechanism (GASNET_SPAWNFN): --------------------------------------------------------- udp-conduit is very a portable conduit, requiring only a UNIX-like system with a reasonable C/C++ compiler and a standard sockets-based TCP/IP stack (which includes UDP support). However, the one aspect that remains somewhat site-specific is the means for spawning the GASNet job across the UDP-connected worker nodes. Consequently, the primary user-visible configuration decision to be make when installing/using udp-conduit is the spawning mechanism to use for starting udp-conduit jobs. udp-conduit includes built-in support for several spawning mechanisms (including a very portable ssh-based spawner), and an extensibility option which allows you to plug in your own job spawning command, if desired. All udp-conduit jobs should be started from the console (or from wrapper scripts such as tcrun, upcrun) using a command such as: $ ./a.out [program args...] where the first argument is the number of GASNet nodes to spawn, and any subsequent arguments will be passed to the GASNet client as argc/argv upon return from gasnet_init(). The GASNET_SPAWNFN environment variable is used to tell udp-conduit which mechanism to use for spawning the worker node processes for the job, and may be one of the following values (some of which have additional related environment variables): * GASNET_SPAWNFN='L' (localhost spawn) Uses a standard UNIX fork/exec to spawn all the worker processes on the local machine, and UDP traffic between the nodes is sent over the localhost loopback interface (which usually bypasses network hardware, but not the kernel). Useful for debugging and testing, but probably not of interest for production jobs. * GASNET_SPAWNFN='S' (ssh/rsh-based spawn, the default spawner) Uses any command-line based ssh or rsh client to connect to worker nodes, which should be running an ssh/rsh daemon (ie sshd). Requires that users setup password-less authentication to the worker nodes (eg. using RSA public-key-based authentication and/or ssh-agent). Specifically, users need the ability to run a command such as: "ssh machinename echo hi" and have that command execute on the remote node without the need for typing any passwords. Finally, any network firewalls present must be configured such that the worker nodes have the ability to make TCP connections to the machine that executes the initial spawn command (used for bootstrapping) and such that the worker nodes can send UDP packets to each other (used to implement GASNet communication). See the ssh-agent tutorial here: https://upc.lbl.gov/docs/user/sshagent.shtml or the documentation for your ssh client/daemon for more information on setting up secure, password-less authentication for ssh. rsh-based spawning is also supported, although not generally recommended due to the inherent security flaws in rsh-based authentication (although it may still be appropriate on physically secure private networks). the ssh-based spawner also recognizes the following environment variables (the SSH_SERVERS value provides the names of the worker nodes running sshd and is required): option default description ---------------------------------------------------------------- SSH_CMD "ssh" ssh command to use. Can also be set to "rsh", or the name of any other remote shell spawner program/script with a similar interface. SSH_SERVERS none - must be provided space-delimited list of server names to pass to SSH_CMD, one per node, in order of priority (trailing extra server names ignored) may specify DNS names or IP addresses SSH_OPTIONS "" additional options to give SSH_CMD client SSH_REMOTE_PATH current working dir. the directory to use on remote machine must contain a copy of the udp-conduit a.out executable to be started (these variables may also optionally be prefixed with "AMUDP_" or "GASNET_") So for example, one could use the ssh spawner to start a job for an a.out executable linked against libgasnet-udp-*.a as follows (assuming a csh-like shell): $ ssh node0 echo ssh is working ssh is working $ setenv GASNET_SPAWNFN 'S' $ setenv GASNET_SSH_SERVERS 'node0 node1 node2 node3 node4 node5' $ ./a.out 3 arg1 arg2 arg3 Hello from node0 Hello from node1 Hello from node2 $ * GASNET_SPAWNFN='C' (custom spawner) The custom spawner allows the user and/or site installer to provide a custom command to be used for starting the worker processes across the worker nodes. This provides spawning extensibility - the custom command can invoke any arbitrary site-specific spawning command (for example to call to an OS-provided spawner, a batch system, or a custom-written wrapper script that performs whatever actions are necessary to start the job). The only required environment variable setting is CSPAWN_CMD, which provides to command to be invoked for performing the spawn, upon which the following substitutions are performed: %N => number of worker nodes requested %C => the command that should be run once by each worker node participating in the job %D => the current working directory %% => % %M => optional list of servers taken from CSPAWN_SERVERS (the first nproc are passed) %P => the program name as invoked (the original argv[0]) The custom command specified by CSPAWN_CMD is invoked exactly once at startup, and is responsible for starting all the %N remote worker processes and having them execute the command passed as %C, in a directory containing the a.out udp-conduit executable. The worker processes then use information passed within %C to connect to the master process on the spawning console and bootstrap the job. Note that any network firewalls present must be configured such that the worker nodes have the ability to make TCP connections to the machine that executes the initial spawn command (used for bootstrapping) and such that the worker nodes can send UDP packets to each other (used to implement GASNet communication). The custom spawner recognizes the following environment variables: option default description -------------------------------------------------- CSPAWN_CMD none the custom command to be called for spawning, after replacement of the patterns listed above the command must result in %N invocations of the %C command, once on each worker node CSPAWN_SERVERS none space-delimited list of servers to use - only required if %M is used in CSPAWN_CMD CSPAWN_ROUTE_OUTPUT 0 set this variable to request built-in stdout/stderr routing from worker processes to the console, if your CSPAWN_CMD doesn't automatically provide that capability. Note GASNET_ROUTE_OUTPUT is ignored for this spawner. (these variables may also optionally be prefixed with "AMUDP_" or "GASNET_") So for example, one could use the custom spawner in conjunction with an mpirun command in a mixed MPI+GASNet/udp-conduit executable to start a job for an a.out executable as follows (assuming a csh-like shell): $ setenv GASNET_SPAWNFN 'C' $ setenv GASNET_CSPAWN_CMD 'mpirun -np %N %C' $ ./a.out 3 arg1 arg2 arg3 Hello from node0 Hello from node1 Hello from node2 Similarly, one can use the srun command in SLURM: $ setenv GASNET_SPAWNFN 'C' $ setenv GASNET_CSPAWN_CMD 'srun -n %N %C' $ setenv GASNET_WORKER_RANK "SLURM_PROCID" // optional, see docs below Recognized environment variables: --------------------------------- * All the standard GASNet environment variables (see top-level README) * GASNET_NETWORKDEPTH - depth of network buffers to allocate. Specifically, the number of AMRequests that can be outstanding to a given peer before further requests to that peer will stall to await reply/ack. Use larger values to increase bandwidth on longer-latency networks. Note that internal buffer space grows linearly with depth, and specifying a value which is too large can lead to increased packet loss and retransmission costs on OS's with small UDP buffer limits or hardware that drops packets in response to congestion (includes most Ethernet hardware). * GASNET_SPAWNFN - job spawn mechanism to use (see above) * GASNET_RECVDEPTH - max depth in messages of the shared AM receive queue (shared by all incoming Requests and Replies from any peer). This limits the number of messages that can be received during a single Poll. Defaults to a reasonable value based on job size and GASNET_NETWORKDEPTH. * GASNET_SENDDEPTH - max number of AMRequests that each node can have outstanding, combined across ALL peers (as opposed to NETWORKDEPTH which is a per-peer limit). This can be used to limit AMRequest send buffer utilization in jobs where nodes communicate with a large number of distinct peers. Set to -1 to specify unlimited, which amounts to NETWORKDEPTH*jobsize. Defaults to a reasonable value based on job size and GASNET_NETWORKDEPTH. * GASNET_SOCKETBUFFER_INITIAL, GASNET_SOCKETBUFFER_MAX Set the initial and maximum socket buffer sizes (i.e. SO_SNDBUF/SO_RCVBUF) in bytes to request for worker sockets. These are the *kernel-side* buffers used to hold in-flight datagrams. INITIAL defaults to the lesser of MAX and RECVDEPTH * . Note that actual/achieved socket buffer sizes are also subject to kernel-imposed defaults and limits (e.g. on Linux determined by `/proc/sys/net/core/{r,w}mem_{default,max}`). * GASNET_REQUESTTIMEOUT_MAX - max timeout in microseconds before a request is considered undeliverable (a fatal error). Defaults to 30000000 (30 seconds). Can be set to 0 for infinite timeout, which can be useful when freezing processes for long periods of time during debugging sessions. * GASNET_REQUESTTIMEOUT_INITIAL, GASNET_REQUESTTIMEOUT_BACKOFF Advanced options for tweaking the retransmission algorithm (initial timeout in us, and timeout backoff multiplier). Larger timeouts allow more tolerance for network congestion and inattentiveness of remote nodes. Shorter timeouts provide faster recovery from packet loss (which is uncommon in most LANs), at a potential overhead cost of more useless retransmissions. Most users should probably leave these alone. * GASNET_ROUTE_OUTPUT If non-zero, this option request AMUDP perform explicit forwarding of stdout/stderr streams from the workers to the console using TCP socket connections. If zero, no explicit forwarding is performed and this duty is left up to the underlying system and job spawner. The default is system-dependent. * GASNET_LINEBUFFERSZ The size (in bytes) of the buffer used for line buffering of stdin/stdout. Should be large enough for decent bandwidth on multi-line chunks, but scales master-side memory utilization linearly with workers that generate output. Default 1024. Set to 0 to disable line buffering, which allows partial lines to be displayed sooner, but may result in concurrent output from multiple workers being interleaved on a single line. Has no effect if GASNET_ROUTE_OUTPUT is disabled. * GASNET_MASTERIP Specify the exact IP address which the worker nodes should use to connect to the master (spawning) node. By default the master node will pass the result of gethostname() to the worker nodes, which will then resolve that to an IP address using gethostbynname(). * GASNET_WORKERIP Specify the IP subnet to be used for communication among the worker nodes. By default, worker nodes will communicate among themselves using the same interface used to connect to the master node (see GASNET_MASTERIP, above). Example: GASNET_WORKERIP=192.168.0.0 * GASNET_ENV_CMD Specify the full path to the "env" command on the worker nodes. By default the value "env" is used, which is sufficient as long as the command can be found in the default search path. * GASNET_HOST_DETECT - host identification In addition to the standard options described in the top-level README, udp-conduit supports a "conduit" option. This option uses the 32-bit IP address and a hash of the hostname to form a 64-bit identifier. This is the default, even if configured using '--with-host-detect=...' to specify a different one. However, an explicit value of GASNET_HOST_DETECT in the environment is always honored. This default generally works well for the common case where all worker nodes have a single IP interface on the worker subnet (see `GASNET_WORKERIP` above). However if the worker nodes include a system with multiple distinct active IP addresses on the worker subnet, then it's recommended to set GASNET_HOST_DETECT to "hostid" or "hostname" (whichever is guaranteed to return a value that uniquely identifies each actual worker). Otherwise, the default of "conduit" could mistakenly identify such multi-IP worker nodes as distinct hosts, and thus ineligible for shared-memory communication. * GASNET_USE_GETHOSTID ** THIS VARIABLE IS DEPRECATED ** One can use GASNET_HOST_DETECT=gethostid to achieve the behavior previously requested using GASNET_USE_GETHOSTID=1. * GASNET_WORKER_RANK May be set to force a particular rank assignment for worker processes. If set by any process, then it must be set by all worker processes before init to a disjoint set of integers in the range [0..numprocs). It may alternatively be set to the name of another environment variable in the worker environment from which to retrieve the assignment (e.g. "SLURM_PROCID", "PMIX_RANK", "OMPI_COMM_WORLD_RANK", etc). Default behavior is arbitrary rank assignment that groups co-located processes. Known problems: --------------- * Udp-conduit does not support user-provided values for GASNET_TSC_RATE* (which fine-tune timer calibration on x86/Linux). This is partially due to a dependency cycle at startup with propagation of environment variables, but more importantly because the retransmission algorithm (and hence all conduit comms) rely on gasnet timers to be accurate (at least approximately), so we don't allow the user to weaken or disable their calibration. * See the GASNet Bugzilla server for details on other known bugs: https://gasnet-bugs.lbl.gov/ Future work: ------------ * Integrate ssh-spawner to remove spawning scalability issues. * Push thread-safety down into the AMUDP library, to expose more concurrency in GASNET_PAR mode. ============================================================================== Design Overview: ---------------- The core API implementation is a very thin wrapper around the AMUDP implementation by Dan Bonachea. See documentation in the other/amudp directory or the AMUDP webpage (https://gasnet.lbl.gov/amudp) for details. The udp-conduit directly uses the extended-ref implementation for the extended API - see the extended-ref directory for details. After some discussions at SC03, I decided it was worthwhile to provide a GASNet conduit that runs as-natively-as-possible on gigabit ethernet. Given the hardware characteristics of ethernet (most significantly, store-and-forward routing), we don't ever expect this to be a very low-latency target, however Ethernet is ubiquitous and the bandwidths can be respectable.. and we can certainly hope to do better than GASNet-over-AMMPI-over-MPICH-over-TCP-over-Ethernet, which was previously our only choice on Ethernet. Implementing udp-conduit was basically just a matter of adapting my mpi-conduit-over-AMMPI glue to accommodate my AM-over-UDP implementation (AMUDP), which Titanium tests show can significantly outperform AMMPI-over-MPICH-over-TCP (primarily because AM is a natural fit for much smarter reliability protocols than TCP and the connectionless model of UDP is more scalable). The GASNet-level design of udp-conduit is very similar to mpi-conduit. It's a bare core API implementation using the reference extended API implementation. All handlers and network access are serialized on client threads. There's no concurrent handler execution or conduit threads. GASNet segment is mmapped but not specially registered in any way. Both aligned and unaligned segments are supported. Unlike AMMPI (which is limited to MPI-1.1's functionality), AMUDP provides a fully functional job management system (which runs on the spawning console), which means that udp-conduit provides very robust job exit behavior - it passes all testexit tests and should never leave zombie processes. Current limitations: * AMUDP is implemented in C++ (fairly straightforward C++ with no templates, should work on any C++ compiler with support for simple exception-handling - works on every one I've tried). The GASNet configure script checks for C++ support if and only if udp-conduit is enabled - platforms lacking a C++ compiler should configure with --disable-udp. * job spawning is a little messy because we have to deal with site-specific wrinkles, especially for acquiring node names. However, AMUDP offers a number of job spawning options (the most portable being ssh-based spawn), and it's successfully been deployed on a number of systems. There is also spawner support for Localhost/fork (for debugging), and a "custom command" option for extensibility. * AMUDP was overhauled in June 2016 to greatly improve the scalability of udp-conduit's internal buffer and metadata utilization. The worker processes now scale nicely beyond 1000 nodes, and theoretically up to 1M nodes. However, the master process used by the spawner still defaults to opening 3 TCP connections with each compute process, which at large scale may exceed file descriptor limitations for the master process on some OS's (see "compile-time settings" above). This utilization can be reduced by setting AMUDP_ROUTE_OUTPUT=0, but this might result in stdout/stderr problems, depending on the spawner. Users interested in large-scale applications are highly recommended to use an appropriate native GASNet conduit, if one is available. gasnet-2025.8.0/udp-conduit/gasnet_core_help.h0000664000175000017500000000076315142313673021335 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/udp-conduit/gasnet_core_help.h $ * Description: GASNet MPI conduit core Header Helpers (Internal code, not for client use) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_HELP_H #define _GASNET_CORE_HELP_H #include #endif gasnet-2025.8.0/udp-conduit/Makefile.am0000664000175000017500000000763015142313673017717 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/udp-conduit/Makefile.am $ # Description: Makefile for GASNet udp conduit # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME=udp # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = . # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ gasnet_core.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiled command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(top_srcdir)/extended-ref/gasnet_extended.c # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = -I$(top_srcdir)/other/amudp -I$(top_builddir)/other/amudp # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = \ $(top_builddir)/other/amudp/amx_portable_platform.h \ $(top_srcdir)/other/amudp/amudp_const.h # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = \ $(top_builddir)/other/amudp/libamudp.a \ $(top_srcdir)/other/amudp/*.h $(top_builddir)/other/amudp/libamudp.a: force cd $(top_builddir)/other/amudp && $(MAKE) libamudp.a $(top_builddir)/other/amudp/amx_portable_platform.h: $(top_builddir)/other/amudp/libamudp.a # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time CONDUIT_KINDS = # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) CONDUIT_RUNCMD = %P %N %A #CONDUIT_RUNCMD = $(top_builddir)/other/amudp/amudprun -np %N -spawn $${GASNET_SPAWNFN:-L} %P %A # conduit-specific tests in ../tests directory CONDUIT_TESTS = testcxx testlegacycxx testtoolscxx # disable MPI tests for udp-*, because we probably don't have an MPI-capable C++ linker CONDUIT_TEST_MAKEARGS = MPI_TESTS="" MPI_TESTS_SEQ="" MPI_TESTS_PAR="" # -------- Do not modify anything below this line -------- if BUILD_SEQ_LIBS libgasnet_udp_seq_a_SOURCES = libraries_seq = libgasnet-udp-seq.a endif if BUILD_PAR_LIBS libgasnet_udp_par_a_SOURCES = libraries_par = libgasnet-udp-par.a endif if BUILD_PARSYNC_LIBS libgasnet_udp_parsync_a_SOURCES = libraries_parsync = libgasnet-udp-parsync.a endif libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) include $(top_builddir)/other/Makefile-conduit.mak libgasnet-udp-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-udp-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-udp-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync if USE_UDP_CONDUIT lib_LIBRARIES = $(libraries) all-local: $(lib_LIBRARIES) $(pkgconfig_files) clean-local: do-clean-local install-data-local: do-install-data-local uninstall-local: do-uninstall-local else $(top_srcdir)/gasnetex.h: do-error endif gasnet-2025.8.0/udp-conduit/gasnet_core_internal.h0000664000175000017500000001343015142313673022214 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/udp-conduit/gasnet_core_internal.h $ * Description: GASNet MPI conduit header for internal definitions in Core API * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_CORE_INTERNAL_H #define _GASNET_CORE_INTERNAL_H #include #include /* whether or not to use spin-locking for HSL's */ #define GASNETC_HSL_SPINLOCK 1 extern ep_t gasnetc_endpoint; extern gasneti_mutex_t gasnetc_AMlock; /* protect access to AMUDP */ extern volatile int gasnetc_AMLockYield; #if GASNETI_THREADS #define _AMLOCKYIELD() do { \ if_pf(gasnetc_AMLockYield) { \ int _i; \ for (_i = 0; _i < 10; _i++) \ gasneti_sched_yield(); \ } } while (0) #else #define _AMLOCKYIELD() ((void)0) #endif #define AMLOCK() do { \ _AMLOCKYIELD(); \ gasneti_mutex_lock(&gasnetc_AMlock); \ } while (0) #define AMLOCK_TOSEND() do { \ _AMLOCKYIELD(); \ gasneti_suspend_spinpollers(); \ gasneti_mutex_lock(&gasnetc_AMlock); \ gasneti_resume_spinpollers(); \ } while (0) #define AMUNLOCK() gasneti_mutex_unlock(&gasnetc_AMlock) #define AM_ASSERT_LOCKED() gasneti_mutex_assertlocked(&gasnetc_AMlock) #define AM_ASSERT_UNLOCKED() gasneti_mutex_assertunlocked(&gasnetc_AMlock) /* AMLOCK_CAUTIOUS is only for use in very limited contexts where lock status is unknown, eg exit-time processing */ #if GASNET_DEBUG /* ignore recursive lock attempts */ #define _AMLOCK_CAUTIOUS_HELPER() if (_gasneti_mutex_heldbyme(&gasnetc_AMlock)) break #else #define _AMLOCK_CAUTIOUS_HELPER() ((void)0) #endif #define AMLOCK_CAUTIOUS(shouldunlock) do { \ int _i; \ shouldunlock = 0; \ gasnetc_AMLockYield = 1; \ for (_i=0; _i < 50; _i++) { \ _AMLOCK_CAUTIOUS_HELPER(); \ if (!gasneti_mutex_trylock(&gasnetc_AMlock)) { \ shouldunlock = 1; break; \ } else gasneti_sched_yield(); \ } \ gasnetc_AMLockYield = 0; \ } while (0) /* ------------------------------------------------------------------------------------ * AM Error Handling * ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasneti_AMErrorName) const char *gasneti_AMErrorName(int errval) { switch (errval) { case AM_OK: return "AM_OK"; case AM_ERR_NOT_INIT: return "AM_ERR_NOT_INIT"; case AM_ERR_BAD_ARG: return "AM_ERR_BAD_ARG"; case AM_ERR_RESOURCE: return "AM_ERR_RESOURCE"; case AM_ERR_NOT_SENT: return "AM_ERR_NOT_SENT"; case AM_ERR_IN_USE: return "AM_ERR_IN_USE"; default: return "*unknown*"; } } /* ------------------------------------------------------------------------------------ */ /* make an AM call - if it fails, print error message and return */ #define GASNETI_AM_SAFE(fncall) do { \ int const _retcode = (fncall); \ if_pf (_retcode != AM_OK) { \ char msg[128]; \ snprintf(msg, sizeof(msg), \ "\nGASNet encountered an AM Error: %s(%i)\n", \ gasneti_AMErrorName(_retcode), _retcode); \ GASNETI_RETURN_ERRFR(RESOURCE, fncall, msg); \ } \ } while (0) /* ------------------------------------------------------------------------------------ */ /* make an AM call - if it fails, print error message and set retval to non-zero errcode * else, set retval to zero */ #define GASNETI_AM_SAFE_NORETURN(retval,fncall) do { \ gasneti_static_assert(AM_OK == 0); \ retval = (fncall); \ if_pf (retval) { \ if (gasneti_VerboseErrors) { \ gasneti_console_message("ERROR","GASNet %s encountered an AM Error: %s(%i)\n" \ " at %s:%i", \ GASNETI_CURRENT_FUNCTION, \ gasneti_AMErrorName(retval), \ retval, __FILE__, __LINE__); \ fflush(stderr); \ } \ } \ } while (0) /* ------------------------------------------------------------------------------------ */ /* add new core API handlers here and to the bottom of gasnet_core.c */ /* ------------------------------------------------------------------------------------ */ /* handler table (temporary global impl) */ extern gex_AM_Entry_t *gasnetc_handler; /* ------------------------------------------------------------------------------------ */ /* Configure gasnet_event_internal.h and gasnet_event.c */ // TODO-EX: prefix needs to move from "extended" to "core" // (###) Define as needed if iop counters should use something other than weakatomics: /* #define gasnete_op_atomic_(_id) gasnetc_atomic_##_id */ // (###) Define if conduit performs local-completion detection: /* #define GASNETE_HAVE_LC */ #endif gasnet-2025.8.0/udp-conduit/Makefile.in0000664000175000017500000007464215142313673017737 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/udp-conduit/Makefile.am $ # Description: Makefile for GASNet udp conduit # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = udp-conduit ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = conduit.mak CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libgasnet_udp_par_a_AR = $(AR) $(ARFLAGS) libgasnet_udp_par_a_LIBADD = am_libgasnet_udp_par_a_OBJECTS = libgasnet_udp_par_a_OBJECTS = $(am_libgasnet_udp_par_a_OBJECTS) libgasnet_udp_parsync_a_AR = $(AR) $(ARFLAGS) libgasnet_udp_parsync_a_LIBADD = am_libgasnet_udp_parsync_a_OBJECTS = libgasnet_udp_parsync_a_OBJECTS = \ $(am_libgasnet_udp_parsync_a_OBJECTS) libgasnet_udp_seq_a_AR = $(AR) $(ARFLAGS) libgasnet_udp_seq_a_LIBADD = am_libgasnet_udp_seq_a_OBJECTS = libgasnet_udp_seq_a_OBJECTS = $(am_libgasnet_udp_seq_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgasnet_udp_par_a_SOURCES) \ $(libgasnet_udp_parsync_a_SOURCES) \ $(libgasnet_udp_seq_a_SOURCES) DIST_SOURCES = $(libgasnet_udp_par_a_SOURCES) \ $(libgasnet_udp_parsync_a_SOURCES) \ $(libgasnet_udp_seq_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/conduit.mak.in \ $(top_srcdir)/config-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME = udp # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = . # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ gasnet_core.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiled command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(top_srcdir)/extended-ref/gasnet_extended.c # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = -I$(top_srcdir)/other/amudp -I$(top_builddir)/other/amudp # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = \ $(top_builddir)/other/amudp/amx_portable_platform.h \ $(top_srcdir)/other/amudp/amudp_const.h # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = \ $(top_builddir)/other/amudp/libamudp.a \ $(top_srcdir)/other/amudp/*.h # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time CONDUIT_KINDS = # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) CONDUIT_RUNCMD = %P %N %A #CONDUIT_RUNCMD = $(top_builddir)/other/amudp/amudprun -np %N -spawn $${GASNET_SPAWNFN:-L} %P %A # conduit-specific tests in ../tests directory CONDUIT_TESTS = testcxx testlegacycxx testtoolscxx # disable MPI tests for udp-*, because we probably don't have an MPI-capable C++ linker CONDUIT_TEST_MAKEARGS = MPI_TESTS="" MPI_TESTS_SEQ="" MPI_TESTS_PAR="" # -------- Do not modify anything below this line -------- @BUILD_SEQ_LIBS_TRUE@libgasnet_udp_seq_a_SOURCES = @BUILD_SEQ_LIBS_TRUE@libraries_seq = libgasnet-udp-seq.a @BUILD_PAR_LIBS_TRUE@libgasnet_udp_par_a_SOURCES = @BUILD_PAR_LIBS_TRUE@libraries_par = libgasnet-udp-par.a @BUILD_PARSYNC_LIBS_TRUE@libgasnet_udp_parsync_a_SOURCES = @BUILD_PARSYNC_LIBS_TRUE@libraries_parsync = libgasnet-udp-parsync.a libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) @USE_UDP_CONDUIT_TRUE@lib_LIBRARIES = $(libraries) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign udp-conduit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign udp-conduit/Makefile $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): conduit.mak: $(top_builddir)/config.status $(srcdir)/conduit.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ if test -f $$p; then \ $(am__strip_dir) \ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive @USE_UDP_CONDUIT_FALSE@all-local: all-am: Makefile $(LIBRARIES) all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @USE_UDP_CONDUIT_FALSE@install-data-local: @USE_UDP_CONDUIT_FALSE@clean-local: @USE_UDP_CONDUIT_FALSE@uninstall-local: clean: clean-recursive clean-am: clean-generic clean-libLIBRARIES clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLIBRARIES uninstall-local .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am clean clean-generic clean-libLIBRARIES \ clean-local cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLIBRARIES uninstall-local .PRECIOUS: Makefile $(top_builddir)/other/amudp/libamudp.a: force cd $(top_builddir)/other/amudp && $(MAKE) libamudp.a $(top_builddir)/other/amudp/amx_portable_platform.h: $(top_builddir)/other/amudp/libamudp.a include $(top_builddir)/other/Makefile-conduit.mak libgasnet-udp-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-udp-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-udp-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync @USE_UDP_CONDUIT_TRUE@all-local: $(lib_LIBRARIES) $(pkgconfig_files) @USE_UDP_CONDUIT_TRUE@clean-local: do-clean-local @USE_UDP_CONDUIT_TRUE@install-data-local: do-install-data-local @USE_UDP_CONDUIT_TRUE@uninstall-local: do-uninstall-local @USE_UDP_CONDUIT_FALSE@$(top_srcdir)/gasnetex.h: do-error # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/gasnet_basic.h0000664000175000017500000012536515142313673016231 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_basic.h $ * Description: GASNet basic header utils * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #if !defined(_IN_GASNETEX_H) && !defined(_IN_GASNET_TOOLS_H) #error This file is not meant to be included directly- clients should include gasnetex.h or gasnet_tools.h #endif #ifndef _GASNET_BASIC_H #define _GASNET_BASIC_H /* ------------------------------------------------------------------------------------ */ /* must precede everything else to ensure correct operation */ #include "portable_inttypes.h" #undef _PORTABLE_PLATFORM_H #include "gasnet_portable_platform.h" /* try to recognize the compiler in use as one present at configure time. note this can set both GASNETI_COMPILER_IS_CC and GASNETI_COMPILER_IS_MPI_CC when CC and MPI_CC present the same ID. */ #if PLATFORM_COMPILER_ID == GASNETI_PLATFORM_COMPILER_ID && \ PLATFORM_COMPILER_VERSION == GASNETI_PLATFORM_COMPILER_VERSION #define GASNETI_COMPILER_IS_CC 1 #endif #if PLATFORM_COMPILER_ID == GASNETI_PLATFORM_MPI_CC_ID && \ PLATFORM_COMPILER_VERSION == GASNETI_PLATFORM_MPI_CC_VERSION #define GASNETI_COMPILER_IS_MPI_CC 1 #endif #if PLATFORM_COMPILER_ID == GASNETI_PLATFORM_CXX_ID && \ PLATFORM_COMPILER_VERSION == GASNETI_PLATFORM_CXX_VERSION #define GASNETI_COMPILER_IS_CXX 1 #endif #if GASNETT_COMPILER_FORCE_MISMATCH // for testing purposes #undef GASNETI_COMPILER_IS_CC #undef GASNETI_COMPILER_IS_CXX #undef GASNETI_COMPILER_IS_MPI_CC #endif #if !defined(GASNETI_COMPILER_IS_CC) && \ !defined(GASNETI_COMPILER_IS_CXX) && \ !defined(GASNETI_COMPILER_IS_MPI_CC) /* detect when the compiler in use differs from the compilers tested by configure, indicating some of the configure-detected results may be invalid for this compilation this is permitted in certain VERY limited contexts, and activates conservative assumptions */ #define GASNETI_COMPILER_IS_UNKNOWN 1 #endif // preprocessor conditional: configure detected GASNETI_HAVE__ for the current compiler #define GASNETI_COMPILER_HAS(feature) ( \ (GASNETI_COMPILER_IS_CC && GASNETI_HAVE_CC_ ## feature) || \ (GASNETI_COMPILER_IS_CXX && GASNETI_HAVE_CXX_ ## feature) || \ (GASNETI_COMPILER_IS_MPI_CC && GASNETI_HAVE_MPI_CC_ ## feature) ) // GASNETI_COMPILER_HAS_BUILTIN: specialized for testing builtins #ifdef __has_builtin #define _GASNETI_HAS_BUILTIN(x) __has_builtin(x) #else #define _GASNETI_HAS_BUILTIN(x) 0 #endif #define GASNETI_COMPILER_HAS_BUILTIN(MACRO_NAME,token_name) \ (GASNETI_COMPILER_HAS(BUILTIN_ ## MACRO_NAME) || \ (GASNETI_COMPILER_IS_UNKNOWN && _GASNETI_HAS_BUILTIN(__builtin_ ## token_name))) // GASNETI_COMPILER_HAS_ATTRIBUTE: specialized for testing attributes #ifdef __has_attribute #define _GASNETI_HAS_ATTRIBUTE(x) __has_attribute(x) #else #define _GASNETI_HAS_ATTRIBUTE(x) 0 #endif #define GASNETI_COMPILER_HAS_ATTRIBUTE(MACRO_NAME,attrib_token) \ (GASNETI_COMPILER_HAS(ATTRIBUTE_ ## MACRO_NAME) || \ (GASNETI_COMPILER_IS_UNKNOWN && _GASNETI_HAS_ATTRIBUTE(attrib_token))) // GASNETI_COMPILER_HAS_CXX11_ATTRIBUTE: specialized for testing C++11 attributes #ifdef __has_cpp_attribute #define _GASNETI_HAS_CXX11_ATTRIBUTE(x) __has_cpp_attribute(x) #else #define _GASNETI_HAS_CXX11_ATTRIBUTE(x) 0 #endif // only trust configure results for C++ attrib if current C++ langlvl is >= configure C++ langlvl #define GASNETI_COMPILER_HAS_CXX11_ATTRIBUTE(MACRO_NAME,attrib_token) \ ((GASNETI_COMPILER_HAS(CXX11_ATTRIBUTE_ ## MACRO_NAME) && \ PLATFORM_COMPILER_CXX_LANGLVL >= GASNETI_PLATFORM_CXX_CXX_LANGLVL) \ || (GASNETI_COMPILER_IS_UNKNOWN && _GASNETI_HAS_CXX11_ATTRIBUTE(attrib_token))) // Platform-specific adjustments to query macros // // Some compilers have a broken implementation of one or more of the following Gnu/clang extension macros: // __has_builtin() __has_attribute() __has_cpp_attribute() // where "broken" means providing a definition that incorrectly returns non-zero answers in some cases. // Ban the use of the relevant macro on those particular compilers to ensure we never use it there. // Some compilers bitch about redefining these built-in macros, so instead we force our own // wrapper to conservatively always returns zero. #if PLATFORM_COMPILER_PATHSCALE /* broken builtin_assume on Linux */ \ || ( PLATFORM_COMPILER_PGI_CXX && PLATFORM_OS_DARWIN ) /* Bug 3736 */ #undef _GASNETI_HAS_BUILTIN #define _GASNETI_HAS_BUILTIN(x) 0 #endif #if PLATFORM_COMPILER_SUN /* bug 3666: Sun CC __has_attribute returns wrong answers and cannot be trusted */ #undef _GASNETI_HAS_ATTRIBUTE #define _GASNETI_HAS_ATTRIBUTE(x) 0 #endif #if (PLATFORM_COMPILER_GNU_CXX && PLATFORM_COMPILER_CXX_LANGLVL < 201100) \ /* g++ __has_cpp_attribute returns false positives with langlvl < C++11 */ \ || (PLATFORM_COMPILER_SUN_CXX && PLATFORM_COMPILER_VERSION_LT(5,15,0)) /* bug 3730 */ #undef _GASNETI_HAS_CXX11_ATTRIBUTE #define _GASNETI_HAS_CXX11_ATTRIBUTE(x) 0 #endif #if PLATFORM_COMPILER_CLANG && PLATFORM_COMPILER_VERSION_LT(3,6,0) // bug3801: old clangs report __has_attribute(__fallthrough__)=1, but incorrectly implement the attribute // in a way that leads to empty statement warnings when used as per GNU instructions #ifndef GASNETT_USE_GCC_ATTRIBUTE_FALLTHROUGH #define GASNETT_USE_GCC_ATTRIBUTE_FALLTHROUGH 0 #endif #endif #if PLATFORM_COMPILER_INTEL && PLATFORM_COMPILER_VERSION_GE(20,21,20210228) && !__INTEL_CLANG_COMPILER // bug4255: // The following misbehaviors have been observed in the 2021.2.0 release (and // newer) of the "Classic" Intel C/C++ compilers (icc/icpc) but not the // "oneAPI" compilers (icx/icpx). // 1) Intel C/C++ compilers report __has_attribute(__fallthrough__)=1, but // incorrectly implement the attribute when used as per GNU instructions. // a) The C compiler implements it in a way which produces: // warning #169: expected a declaration // b) The C++ compiler implements it in a way which *sometimes* produces: // warning #2621: attribute "__fallthrough__" does not apply here // 2) Intel C++ compilers report __has_cpp_attribute(fallthrough)=1, but // then complain of an unknown attribute when it is used: // warning #1292: unknown attribute "fallthrough" // 3) These C++ compilers also report __has_cpp_attrbute(clang::fallthrough)=1, // but using this attribute leads to yet another warning: // warning #3924: attribute namespace "clang" is unrecognized // No, __has_cpp_attrbute() is not *always* true. #ifndef GASNETT_USE_GCC_ATTRIBUTE_FALLTHROUGH #define GASNETT_USE_GCC_ATTRIBUTE_FALLTHROUGH 0 #endif #ifndef GASNETT_USE_CXX11_ATTRIBUTE_FALLTHROUGH #define GASNETT_USE_CXX11_ATTRIBUTE_FALLTHROUGH 0 #endif #ifndef GASNETT_USE_CXX11_ATTRIBUTE_CLANG__FALLTHROUGH #define GASNETT_USE_CXX11_ATTRIBUTE_CLANG__FALLTHROUGH 0 #endif #endif // As reported in UPC++ issue #601, NVHPC 23.3 has a flawed implementation // of the "pure" attribute. // TODO: end version once fixed #if PLATFORM_COMPILER_NVHPC && PLATFORM_COMPILER_VERSION_GE(23,3,0) #ifndef GASNETT_USE_GCC_ATTRIBUTE_PURE #define GASNETT_USE_GCC_ATTRIBUTE_PURE 0 #endif #endif // token expansion: expands to configure-detected token GASNETI__ for the current compiler // (which MUST NOT be #undef, although it can be #defined to blank) // or 'otherwise' in the case of a compiler mismatch #if GASNETI_COMPILER_IS_CC #define GASNETI_COMPILER_FEATURE(feature, otherwise) GASNETI_CC_ ## feature #elif GASNETI_COMPILER_IS_MPI_CC #define GASNETI_COMPILER_FEATURE(feature, otherwise) GASNETI_MPI_CC_ ## feature #elif GASNETI_COMPILER_IS_CXX #define GASNETI_COMPILER_FEATURE(feature, otherwise) GASNETI_CXX_ ## feature #else #define GASNETI_COMPILER_FEATURE(feature, otherwise) otherwise #endif /* include files that may conflict with macros defined later */ #ifdef HAVE_SYS_PARAM_H #include #endif #if PLATFORM_ARCH_32 #define GASNETI_PTR_CONFIG 32bit #elif PLATFORM_ARCH_64 #define GASNETI_PTR_CONFIG 64bit #else #error GASNet currently only supports 32-bit and 64-bit platforms #endif /* miscellaneous macro helpers */ #ifdef __cplusplus #define GASNETI_BEGIN_EXTERNC extern "C" { #define GASNETI_EXTERNC extern "C" #define GASNETI_END_EXTERNC } #else #define GASNETI_BEGIN_EXTERNC #define GASNETI_EXTERNC extern #define GASNETI_END_EXTERNC #endif /* Tentative definition declaration specifier macros * * GASNETI_TENTATIVE_CLIENT - a symbol that is tentative in the client, * and is optionally defined in the library * GASNETI_TENTATIVE_LIBRARY - a symbol that is tentative in the library, * and is optionally defined in the client * * Where tentative these expand to a common-block annotation, if appropriate. * Where not tentative, these expand to extern. * C++ clients where tentative definitions are not supported always see these as extern. * * GASNETI_TENTATIVE_LIBRARY_DEFN exists as a workaround for a GCC LTO bug: * https://sourceware.org/bugzilla/show_bug.cgi?id=23350 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86490 * the trick is to have an extern declaration precede the tentative definition, * which still places it in the common block but avoids the LTO bug. */ #if defined(__cplusplus) #define GASNETI_TENTATIVE_CLIENT extern #define GASNETI_TENTATIVE_LIBRARY extern #elif GASNETI_BUILDING_TOOLS || GASNETI_BUILDING_CONDUIT #if !GASNETI_COMPILER_IS_CC #error Attempted to build libgasnet with an unrecognized different compiler - please re-run configure. #endif #define GASNETI_TENTATIVE_CLIENT extern #define GASNETI_TENTATIVE_LIBRARY extern #define GASNETI_TENTATIVE_LIBRARY_DEFN GASNETI_COMMON #elif GASNETI_COMPILER_HAS_ATTRIBUTE(COMMON,__common__) #define GASNETI_TENTATIVE_CLIENT __attribute__((__common__)) #define GASNETI_TENTATIVE_LIBRARY extern #else // client C code with mismatched compiler and no attribute support #define GASNETI_TENTATIVE_CLIENT /* empty (be conservative) */ #define GASNETI_TENTATIVE_LIBRARY extern #endif /* pick up restrict keyword (or empty) appropriate for compiler in use OR client overrides of restict keywords: GASNETT_USE_RESTRICT gives the (possibly empty) keyword to use GASNETT_USE_RESTRICT_ON_TYPEDEFS boolean */ #ifdef GASNETT_USE_RESTRICT #define GASNETI_RESTRICT GASNETT_USE_RESTRICT #if GASNETT_USE_RESTRICT_ON_TYPEDEFS #define GASNETI_RESTRICT_MAY_QUALIFY_TYPEDEFS 1 #else #define GASNETI_RESTRICT_MAY_QUALIFY_TYPEDEFS 0 #endif #elif defined(GASNETT_USE_RESTRICT_ON_TYPEDEFS) #error GASNETT_USE_RESTRICT_ON_TYPEDEFS defined without GASNETT_USE_RESTRICT #else // mismatch behavior: define away to nothing, which should always be safe // define to 1 because 0 triggers use of (void*) in place of the typedef #define GASNETI_RESTRICT_NOOP // this intermediate avoids empty macro argument on next line #define GASNETI_RESTRICT GASNETI_COMPILER_FEATURE(RESTRICT,GASNETI_RESTRICT_NOOP) #define GASNETI_RESTRICT_MAY_QUALIFY_TYPEDEFS GASNETI_COMPILER_FEATURE(RESTRICT_MAY_QUALIFY_TYPEDEFS,1) #endif #if (!defined(GASNETT_USE_BUILTIN_CONSTANT_P) && GASNETI_COMPILER_HAS_BUILTIN(CONSTANT_P,constant_p)) || \ GASNETT_USE_BUILTIN_CONSTANT_P #define GASNETT_USE_BUILTIN_CONSTANT_P 1 #define gasneti_constant_p(_expr) __builtin_constant_p(_expr) #else #define gasneti_constant_p(_expr) (0) #endif #ifndef _STRINGIFY #define _STRINGIFY_HELPER(x) #x #define _STRINGIFY(x) _STRINGIFY_HELPER(x) #endif #ifndef _CONCAT #define _CONCAT_HELPER(a,b) a ## b #define _CONCAT(a,b) _CONCAT_HELPER(a,b) #endif #ifndef MIN #define MIN(x,y) ((x)<(y)?(x):(y)) #endif #ifndef MAX #define MAX(x,y) ((x)>(y)?(x):(y)) #endif //------------------------------------------------------------------------------------ // Meta-macros for fixed-count text generation // // The following family of macros (named with a integer suffix in N=0..GASNETI_META_MAX) // perform N expansions of the provided macros. // They take two 3-argument macros as arguments: // fnb(-1,0,1) is expanded exactly once as the base case // fni(i_minus_1, i, i_plus_1) is expanded exactly N times as the inductive case, // with i=[1..N] and i_minus_1=(i-1) and i_plus_1=(i+1) at each step // The ASC[N] variants expand the macros in ascending numerical order, // whereas the DES[N] variants expand the macros in descending order // Note that due to C preprocessor rules fnb and fni cannot themselves // contain an expansion of the same meta-macro (even with different arguments), // but can they can use the "other" meta-macro. // supported recursion depth #define GASNETI_META_MAX 16 // convenience macro, useful for base case #define GASNETI_META_EMPTY(a,b,c) #define GASNETI_META_ASC0(fnb,fni) fnb(-1,0,1) #define GASNETI_META_ASC1(fnb,fni) GASNETI_META_ASC0(fnb,fni) fni(0,1,2) #define GASNETI_META_ASC2(fnb,fni) GASNETI_META_ASC1(fnb,fni) fni(1,2,3) #define GASNETI_META_ASC3(fnb,fni) GASNETI_META_ASC2(fnb,fni) fni(2,3,4) #define GASNETI_META_ASC4(fnb,fni) GASNETI_META_ASC3(fnb,fni) fni(3,4,5) #define GASNETI_META_ASC5(fnb,fni) GASNETI_META_ASC4(fnb,fni) fni(4,5,6) #define GASNETI_META_ASC6(fnb,fni) GASNETI_META_ASC5(fnb,fni) fni(5,6,7) #define GASNETI_META_ASC7(fnb,fni) GASNETI_META_ASC6(fnb,fni) fni(6,7,8) #define GASNETI_META_ASC8(fnb,fni) GASNETI_META_ASC7(fnb,fni) fni(7,8,9) #define GASNETI_META_ASC9(fnb,fni) GASNETI_META_ASC8(fnb,fni) fni(8,9,10) #define GASNETI_META_ASC10(fnb,fni) GASNETI_META_ASC9(fnb,fni) fni(9,10,11) #define GASNETI_META_ASC11(fnb,fni) GASNETI_META_ASC10(fnb,fni) fni(10,11,12) #define GASNETI_META_ASC12(fnb,fni) GASNETI_META_ASC11(fnb,fni) fni(11,12,13) #define GASNETI_META_ASC13(fnb,fni) GASNETI_META_ASC12(fnb,fni) fni(12,13,14) #define GASNETI_META_ASC14(fnb,fni) GASNETI_META_ASC13(fnb,fni) fni(13,14,15) #define GASNETI_META_ASC15(fnb,fni) GASNETI_META_ASC14(fnb,fni) fni(14,15,16) #define GASNETI_META_ASC16(fnb,fni) GASNETI_META_ASC15(fnb,fni) fni(15,16,17) #define GASNETI_META_DES0(fnb,fni) fnb(-1,0,1) #define GASNETI_META_DES1(fnb,fni) fni(0,1,2) GASNETI_META_DES0(fnb,fni) #define GASNETI_META_DES2(fnb,fni) fni(1,2,3) GASNETI_META_DES1(fnb,fni) #define GASNETI_META_DES3(fnb,fni) fni(2,3,4) GASNETI_META_DES2(fnb,fni) #define GASNETI_META_DES4(fnb,fni) fni(3,4,5) GASNETI_META_DES3(fnb,fni) #define GASNETI_META_DES5(fnb,fni) fni(4,5,6) GASNETI_META_DES4(fnb,fni) #define GASNETI_META_DES6(fnb,fni) fni(5,6,7) GASNETI_META_DES5(fnb,fni) #define GASNETI_META_DES7(fnb,fni) fni(6,7,8) GASNETI_META_DES6(fnb,fni) #define GASNETI_META_DES8(fnb,fni) fni(7,8,9) GASNETI_META_DES7(fnb,fni) #define GASNETI_META_DES9(fnb,fni) fni(8,9,10) GASNETI_META_DES8(fnb,fni) #define GASNETI_META_DES10(fnb,fni) fni(9,10,11) GASNETI_META_DES9(fnb,fni) #define GASNETI_META_DES11(fnb,fni) fni(10,11,12) GASNETI_META_DES10(fnb,fni) #define GASNETI_META_DES12(fnb,fni) fni(11,12,13) GASNETI_META_DES11(fnb,fni) #define GASNETI_META_DES13(fnb,fni) fni(12,13,14) GASNETI_META_DES12(fnb,fni) #define GASNETI_META_DES14(fnb,fni) fni(13,14,15) GASNETI_META_DES13(fnb,fni) #define GASNETI_META_DES15(fnb,fni) fni(14,15,16) GASNETI_META_DES14(fnb,fni) #define GASNETI_META_DES16(fnb,fni) fni(15,16,17) GASNETI_META_DES15(fnb,fni) // Extended variant that also threads three arbitrary arguments though the expansion chain #define GASNETI_META3_EMPTY(a,b,c,a1,a2,a3) #define GASNETI_META3_ASC0(fnb,fni,a1,a2,a3) fnb(-1,0,1,a1,a2,a3) #define GASNETI_META3_ASC1(fnb,fni,a1,a2,a3) GASNETI_META3_ASC0(fnb,fni,a1,a2,a3) fni(0,1,2,a1,a2,a3) #define GASNETI_META3_ASC2(fnb,fni,a1,a2,a3) GASNETI_META3_ASC1(fnb,fni,a1,a2,a3) fni(1,2,3,a1,a2,a3) #define GASNETI_META3_ASC3(fnb,fni,a1,a2,a3) GASNETI_META3_ASC2(fnb,fni,a1,a2,a3) fni(2,3,4,a1,a2,a3) #define GASNETI_META3_ASC4(fnb,fni,a1,a2,a3) GASNETI_META3_ASC3(fnb,fni,a1,a2,a3) fni(3,4,5,a1,a2,a3) #define GASNETI_META3_ASC5(fnb,fni,a1,a2,a3) GASNETI_META3_ASC4(fnb,fni,a1,a2,a3) fni(4,5,6,a1,a2,a3) #define GASNETI_META3_ASC6(fnb,fni,a1,a2,a3) GASNETI_META3_ASC5(fnb,fni,a1,a2,a3) fni(5,6,7,a1,a2,a3) #define GASNETI_META3_ASC7(fnb,fni,a1,a2,a3) GASNETI_META3_ASC6(fnb,fni,a1,a2,a3) fni(6,7,8,a1,a2,a3) #define GASNETI_META3_ASC8(fnb,fni,a1,a2,a3) GASNETI_META3_ASC7(fnb,fni,a1,a2,a3) fni(7,8,9,a1,a2,a3) #define GASNETI_META3_ASC9(fnb,fni,a1,a2,a3) GASNETI_META3_ASC8(fnb,fni,a1,a2,a3) fni(8,9,10,a1,a2,a3) #define GASNETI_META3_ASC10(fnb,fni,a1,a2,a3) GASNETI_META3_ASC9(fnb,fni,a1,a2,a3) fni(9,10,11,a1,a2,a3) #define GASNETI_META3_ASC11(fnb,fni,a1,a2,a3) GASNETI_META3_ASC10(fnb,fni,a1,a2,a3) fni(10,11,12,a1,a2,a3) #define GASNETI_META3_ASC12(fnb,fni,a1,a2,a3) GASNETI_META3_ASC11(fnb,fni,a1,a2,a3) fni(11,12,13,a1,a2,a3) #define GASNETI_META3_ASC13(fnb,fni,a1,a2,a3) GASNETI_META3_ASC12(fnb,fni,a1,a2,a3) fni(12,13,14,a1,a2,a3) #define GASNETI_META3_ASC14(fnb,fni,a1,a2,a3) GASNETI_META3_ASC13(fnb,fni,a1,a2,a3) fni(13,14,15,a1,a2,a3) #define GASNETI_META3_ASC15(fnb,fni,a1,a2,a3) GASNETI_META3_ASC14(fnb,fni,a1,a2,a3) fni(14,15,16,a1,a2,a3) #define GASNETI_META3_ASC16(fnb,fni,a1,a2,a3) GASNETI_META3_ASC15(fnb,fni,a1,a2,a3) fni(15,16,17,a1,a2,a3) #include /* get standard types, esp size_t */ // gasneti_offsetof is our version of C's offsetof() that allows field arguments // containing non-constant expressions. If the member_field_expr contains only // constant expressions then the result is a constant, otherwise it is non-constant. // Some compilers (eg XLC) complain about using stddef.h offsetof() for this purpose #if PLATFORM_COMPILER_XLC || PLATFORM_COMPILER_PATHSCALE #define gasneti_offsetof(type, member_field_expr) \ ((size_t)(uintptr_t)&(((type *)NULL)->member_field_expr)) #elif PLATFORM_COMPILER_CRAY // seen to botch all the remotely normal expressions involving constant addresses extern volatile int gasnet_frozen; #define GASNETI_OFFSET_BASE (&gasnet_frozen) #define gasneti_offsetof(type, member_field_expr) \ ((size_t)((uintptr_t)&(((type *)GASNETI_OFFSET_BASE)->member_field_expr) - \ (uintptr_t)GASNETI_OFFSET_BASE)) #else #define gasneti_offsetof offsetof #endif // gasneti_container_of() // Given address of a structure member, recreate a pointer to the structure. // Use of gasneti_offsetof() allows 'field' to be a non-constant expression. // ptr = member pointer // type = container's type // field = member's field name #define gasneti_container_of(ptr,type,field) \ ((type*) ((uintptr_t)(ptr) - gasneti_offsetof(type,field))) /* splitting and reassembling 64-bit quantities */ #define GASNETI_MAKEWORD(hi,lo) ((((uint64_t)(hi)) << 32) | (((uint64_t)(lo)) & 0xFFFFFFFF)) #define GASNETI_HIWORD(arg) ((uint32_t)(((uint64_t)(arg)) >> 32)) #if PLATFORM_COMPILER_INTEL /* This form avoids a #69 truncation warning while generating identical code */ #define GASNETI_LOWORD(arg) ((uint32_t)((uint64_t)(arg) & 0xFFFFFFFF)) #else #define GASNETI_LOWORD(arg) ((uint32_t)((uint64_t)(arg))) #endif /* assembling "signatures" from 2, 4 or 8 (7-bit ASCII) characters */ #if PLATFORM_ARCH_LITTLE_ENDIAN #define GASNETI_SIGNATURE2(c0,c1) ((uint16_t)((c0)|((c1)<<8))) #define GASNETI_SIGNATURE4(c0,c1,c2,c3) ((uint32_t)((c0)|((c1)<<8)|((c2)<<16)|((uint32_t)(c3)<<24))) #define GASNETI_SIGNATURE8(c0,c1,c2,c3,c4,c5,c6,c7) \ GASNETI_MAKEWORD(GASNETI_SIGNATURE4(c4,c5,c6,c7),GASNETI_SIGNATURE4(c0,c1,c2,c3)) #else #define GASNETI_SIGNATURE2(c0,c1) ((uint16_t)(((c0)<<8)|(c1))) #define GASNETI_SIGNATURE4(c0,c1,c2,c3) ((uint32_t)(((uint32_t)(c0)<<24)|((c1)<<16)|((c2)<<8)|(c3))) #define GASNETI_SIGNATURE8(c0,c1,c2,c3,c4,c5,c6,c7) \ GASNETI_MAKEWORD(GASNETI_SIGNATURE4(c0,c1,c2,c3),GASNETI_SIGNATURE4(c4,c5,c6,c7)) #endif /* magic numbers for identifying/protecting types * WARNING: GASNETI_{CHECK,IMPORT}_MAGIC() may evaluate the arguments more than once! */ #define GASNETI_MAKE_MAGIC(c0,c1,c2,c3) GASNETI_SIGNATURE8('g','e','x',':',c0,c1,c2,c3) #define GASNETI_MAKE_BAD_MAGIC(c0,c1,c2,c3) GASNETI_SIGNATURE8('B','A','D',':',c0,c1,c2,c3) typedef union { uint64_t _u; char _c[8]; } gasneti_magic_t; #if GASNET_DEBUG #define GASNETI_INIT_MAGIC(p,m) ((void)((p)->_magic._u = (m))) #define GASNETI_CHECK_MAGIC(p,m) do { \ if ((p) && ((p)->_magic._u != (m))) { \ char buf1[GASNETI_MAX_MAGICSZ]; gasneti_format_magic(buf1, (p)->_magic._u); \ char buf2[GASNETI_MAX_MAGICSZ]; gasneti_format_magic(buf2, (m)); \ gasneti_fatalerror("Found magic %s when expecting %s, aka %s", buf1, buf2, #m); \ } \ } while (0) #define GASNETI_IMPORT_MAGIC(p,type) do { \ if ((p) && ((p)->_magic._u == GASNETI_##type##_BAD_MAGIC)) { \ gasneti_fatalerror("Likely use-after-free error for " #type " object"); \ } \ GASNETI_CHECK_MAGIC(p,GASNETI_##type##_MAGIC); \ } while (0) #else #define GASNETI_INIT_MAGIC(p,m) ((void)0) #define GASNETI_CHECK_MAGIC(p,m) ((void)0) #define GASNETI_IMPORT_MAGIC(p,t) ((void)0) #endif /* Non-asserting alignment macros * Use for instance in * char buffer[GASNETI_ALIGNUP_NOASSERT(sizeof(struct foo), GASNETI_CACHE_LINE_BYTES)]; * where the expression must be a compile-time constant (no assertion). * One should really use the asserting versions when possible. */ #define GASNETI_ALIGNDOWN_NOASSERT(p,P) (((uintptr_t)(p))&~((uintptr_t)((P)-1))) #define GASNETI_ALIGNUP_NOASSERT(p,P) (GASNETI_ALIGNDOWN_NOASSERT((uintptr_t)(p)+((uintptr_t)((P)-1)),P)) /* alignment macros */ #define GASNETI_POWEROFTWO(P) (((P)&((P)-1)) == 0) #define GASNETI_ALIGNDOWN(p,P) (gasneti_assert(GASNETI_POWEROFTWO(P)), \ GASNETI_ALIGNDOWN_NOASSERT((p),(P))) #define GASNETI_ALIGNUP(p,P) (GASNETI_ALIGNDOWN((uintptr_t)(p)+((uintptr_t)((P)-1)),P)) #define GASNETI_PAGE_ALIGNDOWN(p) (GASNETI_ALIGNDOWN(p,GASNET_PAGESIZE)) #define GASNETI_PAGE_ALIGNUP(p) (GASNETI_ALIGNUP(p,GASNET_PAGESIZE)) /* GASNETI_CACHE_PAD() */ #if 0 /* This version can yield 0-byte padding, which upsets some compilers */ #define GASNETI_CACHE_PAD(SZ) (GASNETI_ALIGNUP_NOASSERT((SZ),GASNETI_CACHE_LINE_BYTES)-(SZ)) #else #define GASNETI_CACHE_PAD(SZ) (GASNETI_ALIGNUP_NOASSERT((SZ+1),GASNETI_CACHE_LINE_BYTES)-(SZ)) #endif #ifndef GASNET_PAGESIZE #ifdef GASNETI_PAGESIZE #define GASNET_PAGESIZE GASNETI_PAGESIZE #else #error GASNET_PAGESIZE unknown and not set by conduit #endif #if GASNET_PAGESIZE <= 0 #error bad defn of GASNET_PAGESIZE #endif #endif /* special GCC features */ /* work around bug 1620 unless client has explicitly set GASNETT_USE_GCC_ATTRIBUTE_ALWAYSINLINE */ #if PLATFORM_COMPILER_PATHSCALE && !defined(GASNETT_USE_GCC_ATTRIBUTE_ALWAYSINLINE) #define GASNETT_USE_GCC_ATTRIBUTE_ALWAYSINLINE 0 #endif #if PLATFORM_COMPILER_SUN_C && __SUNPRO_C < 0x570 #define GASNETI_PRAGMA(x) /* not supported in older versions (550 fails, 570 works) */ #else #define GASNETI_PRAGMA(x) _Pragma ( #x ) #endif #if (!defined(GASNETT_USE_PRAGMA_GCC_DIAGNOSTIC) && GASNETI_COMPILER_HAS(PRAGMA_GCC_DIAGNOSTIC)) || \ GASNETT_USE_PRAGMA_GCC_DIAGNOSTIC #define GASNETT_USE_PRAGMA_GCC_DIAGNOSTIC 1 #if defined(__cplusplus) #define _GASNETI_NOWARN_IGNORES_C_ONLY #else #define _GASNETI_NOWARN_IGNORES_C_ONLY \ GASNETI_PRAGMA(GCC diagnostic ignored "-Wstrict-prototypes") \ GASNETI_PRAGMA(GCC diagnostic ignored "-Wmissing-prototypes") #endif #define GASNETI_BEGIN_NOWARN \ GASNETI_PRAGMA(GCC diagnostic push) \ _GASNETI_NOWARN_IGNORES_C_ONLY \ GASNETI_PRAGMA(GCC diagnostic ignored "-Wunused-function") \ GASNETI_PRAGMA(GCC diagnostic ignored "-Wunused-variable") \ GASNETI_PRAGMA(GCC diagnostic ignored "-Wunused-value") \ GASNETI_PRAGMA(GCC diagnostic ignored "-Wunused-parameter") \ GASNETI_PRAGMA(GCC diagnostic ignored "-Wunused") #define GASNETI_END_NOWARN \ GASNETI_PRAGMA(GCC diagnostic pop) #else #define GASNETI_BEGIN_NOWARN #define GASNETI_END_NOWARN #endif /* If we have recognized the compiler, pick up its attribute support */ #if GASNETI_COMPILER_HAS(ATTRIBUTE) || defined(__has_attribute) #define GASNETI_HAVE_GCC_ATTRIBUTE 1 /* __has_attribute(x) macro provided by some compilers gives the ability * to probe attributes at compile time. The following do not use this * detection mechanism because the probes are context dependent: * ATTRIBUTE_FORMAT_FUNCPTR * ATTRIBUTE_FORMAT_FUNCPTR_ARG */ #ifndef GASNETT_USE_GCC_ATTRIBUTE_ALWAYSINLINE #define GASNETT_USE_GCC_ATTRIBUTE_ALWAYSINLINE \ GASNETI_COMPILER_HAS_ATTRIBUTE(ALWAYSINLINE,__always_inline__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_NOINLINE #define GASNETT_USE_GCC_ATTRIBUTE_NOINLINE \ GASNETI_COMPILER_HAS_ATTRIBUTE(NOINLINE,__noinline__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_MALLOC #define GASNETT_USE_GCC_ATTRIBUTE_MALLOC \ GASNETI_COMPILER_HAS_ATTRIBUTE(MALLOC,__malloc__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_WARNUNUSEDRESULT #define GASNETT_USE_GCC_ATTRIBUTE_WARNUNUSEDRESULT \ GASNETI_COMPILER_HAS_ATTRIBUTE(WARNUNUSEDRESULT,__warn_unused_result__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_USED #define GASNETT_USE_GCC_ATTRIBUTE_USED \ GASNETI_COMPILER_HAS_ATTRIBUTE(USED,__used__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_MAYALIAS #define GASNETT_USE_GCC_ATTRIBUTE_MAYALIAS \ GASNETI_COMPILER_HAS_ATTRIBUTE(MAYALIAS,__may_alias__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_NORETURN #define GASNETT_USE_GCC_ATTRIBUTE_NORETURN \ GASNETI_COMPILER_HAS_ATTRIBUTE(NORETURN,__noreturn__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_PURE #define GASNETT_USE_GCC_ATTRIBUTE_PURE \ GASNETI_COMPILER_HAS_ATTRIBUTE(PURE,__pure__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_CONST #define GASNETT_USE_GCC_ATTRIBUTE_CONST \ GASNETI_COMPILER_HAS_ATTRIBUTE(CONST,__const__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_HOT #define GASNETT_USE_GCC_ATTRIBUTE_HOT \ GASNETI_COMPILER_HAS_ATTRIBUTE(HOT,__hot__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_COLD #define GASNETT_USE_GCC_ATTRIBUTE_COLD \ GASNETI_COMPILER_HAS_ATTRIBUTE(COLD,__cold__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_DEPRECATED #define GASNETT_USE_GCC_ATTRIBUTE_DEPRECATED \ GASNETI_COMPILER_HAS_ATTRIBUTE(DEPRECATED,__deprecated__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_FALLTHROUGH #define GASNETT_USE_GCC_ATTRIBUTE_FALLTHROUGH \ GASNETI_COMPILER_HAS_ATTRIBUTE(FALLTHROUGH,__fallthrough__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_FORMAT #define GASNETT_USE_GCC_ATTRIBUTE_FORMAT \ GASNETI_COMPILER_HAS_ATTRIBUTE(FORMAT,__format__) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_FORMAT_FUNCPTR #define GASNETT_USE_GCC_ATTRIBUTE_FORMAT_FUNCPTR \ GASNETI_COMPILER_HAS(ATTRIBUTE_FORMAT_FUNCPTR) #endif #ifndef GASNETT_USE_GCC_ATTRIBUTE_FORMAT_FUNCPTR_ARG #define GASNETT_USE_GCC_ATTRIBUTE_FORMAT_FUNCPTR_ARG \ GASNETI_COMPILER_HAS(ATTRIBUTE_FORMAT_FUNCPTR_ARG) #endif #endif /* C++11 attributes */ // The Clang C compiler defines __has_cpp_attribute(), expanding to 0. // However, it errors on __has_cpp_attribute(namespage::token) and thus // we check for __cplusplus even though that could be seen as redundant. #if defined(__cplusplus) && \ (GASNETI_COMPILER_HAS(CXX11_ATTRIBUTE) || defined(__has_cpp_attribute)) #ifndef GASNETT_USE_CXX11_ATTRIBUTE_FALLTHROUGH #define GASNETT_USE_CXX11_ATTRIBUTE_FALLTHROUGH \ GASNETI_COMPILER_HAS_CXX11_ATTRIBUTE(FALLTHROUGH,fallthrough) #endif #ifndef GASNETT_USE_CXX11_ATTRIBUTE_CLANG__FALLTHROUGH #define GASNETT_USE_CXX11_ATTRIBUTE_CLANG__FALLTHROUGH \ GASNETI_COMPILER_HAS_CXX11_ATTRIBUTE(CLANG__FALLTHROUGH,clang::fallthrough) #endif #endif /* GASNETI_WARN_UNUSED_RESULT: warn if function's return value is ignored */ #if GASNETT_USE_GCC_ATTRIBUTE_WARNUNUSEDRESULT #define GASNETI_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) #else #define GASNETI_WARN_UNUSED_RESULT #endif /* GASNETI_MALLOC: assert return value is unaliased, and should not be ignored */ #if GASNETT_USE_GCC_ATTRIBUTE_MALLOC #define GASNETI_MALLOC __attribute__((__malloc__)) GASNETI_WARN_UNUSED_RESULT #else #define GASNETI_MALLOC GASNETI_WARN_UNUSED_RESULT #endif /* pragma version of GASNETI_MALLOC */ #if PLATFORM_COMPILER_SUN_C #define GASNETI_MALLOCP(fnname) GASNETI_PRAGMA(returns_new_memory(fnname)) #else #define GASNETI_MALLOCP(fnname) #endif /* GASNETI_USED: assert that function is used and must not be ommited from object file */ #if GASNETT_USE_GCC_ATTRIBUTE_USED #define GASNETI_USED __attribute__((__used__)) #else #define GASNETI_USED #endif /* GASNETI_MAY_ALIAS override(s) */ #if !defined(GASNETT_USE_GCC_ATTRIBUTE_MAYALIAS) && !GASNETI_BUG1389_WORKAROUND && GASNETI_COMPILER_IS_UNKNOWN /* Apply conservative default based on compiler version if user did not * define GASNETT_USE_GCC_ATTRIBUTE_MAYALIAS nor --enable-conservative-local-copy */ #if PLATFORM_COMPILER_GNU && PLATFORM_COMPILER_VERSION_GE(4,4,0) #define GASNETT_USE_GCC_ATTRIBUTE_MAYALIAS 1 #endif #endif /* GASNETI_MAY_ALIAS: annotate type as not subject to ANSI aliasing rules */ #if GASNETT_USE_GCC_ATTRIBUTE_MAYALIAS #define GASNETI_MAY_ALIAS __attribute__((__may_alias__)) #else #define GASNETI_MAY_ALIAS /* may_alias attribute is sometimes required for correctness */ #if PLATFORM_COMPILER_GNU && PLATFORM_COMPILER_VERSION_GE(4,4,0) && !GASNETI_BUG1389_WORKAROUND #error "GCC's __may_alias__ attribute is required for correctness in gcc >= 4.4, but is disabled or unsupported." #endif #endif /* GASNETI_NORETURN: assert that function does not return to caller */ #if GASNETT_USE_GCC_ATTRIBUTE_NORETURN #define GASNETI_NORETURN __attribute__((__noreturn__)) #else #define GASNETI_NORETURN #endif /* pragma version of GASNETI_NORETURN */ #if PLATFORM_COMPILER_SUN_C #define GASNETI_NORETURNP(fnname) GASNETI_PRAGMA(does_not_return(fnname)) #elif PLATFORM_COMPILER_XLC && 0 /* this *should* work but it causes bizarre compile failures, so disable it */ #define GASNETI_NORETURNP(fnname) GASNETI_PRAGMA(leaves(fnname)) #else #define GASNETI_NORETURNP(fnname) #endif /* GASNETI_PURE: assert that function is "pure" */ /* pure function: one with no effects except the return value, and * return value depends only on the parameters and/or global variables. * prohibited from performing volatile accesses, compiler fences, I/O, * changing any global variables (including statically scoped ones), or * calling any functions that do so */ #if GASNETT_USE_GCC_ATTRIBUTE_PURE #define GASNETI_PURE __attribute__((__pure__)) #else #define GASNETI_PURE #endif /* pragma version of GASNETI_PURE */ #if PLATFORM_COMPILER_XLC && PLATFORM_ARCH_BIG_ENDIAN && \ !(PLATFORM_OS_DARWIN && __xlC__ <= 0x0600) /* bug 1542 */ #define GASNETI_PUREP(fnname) GASNETI_PRAGMA(isolated_call(fnname)) #else #define GASNETI_PUREP(fnname) #endif /* GASNETI_CONST: assert that function is "const" */ /* const function: a more restricted form of pure function, with all the * same restrictions, except additionally the return value must NOT * depend on global variables or anything pointed to by the arguments */ #if GASNETT_USE_GCC_ATTRIBUTE_CONST #define GASNETI_CONST __attribute__((__const__)) #else #define GASNETI_CONST GASNETI_PURE #endif /* pragma version of GASNETI_CONST */ #if PLATFORM_COMPILER_SUN_C #define GASNETI_CONSTP(fnname) GASNETI_PRAGMA(no_side_effect(fnname)) #else #define GASNETI_CONSTP(fnname) GASNETI_PUREP(fnname) #endif // bug 3673: Cannot use Cray pragma _CRI inline_always here #if GASNETT_USE_GCC_ATTRIBUTE_ALWAYSINLINE /* bug1525: gcc's __always_inline__ attribute appears to be maximally aggressive */ #define _GASNETI_ALWAYS_INLINE(fnname) __attribute__((__always_inline__)) #else #define _GASNETI_ALWAYS_INLINE(fnname) #endif #if GASNET_DEBUG #define _GASNETI_INLINE_MODIFIER static #elif defined(__cplusplus) #define _GASNETI_INLINE_MODIFIER inline #elif __STDC_VERSION__ >= 199901L #define _GASNETI_INLINE_MODIFIER GASNETI_COMPILER_FEATURE(INLINE_MODIFIER,static inline) #else #define _GASNETI_INLINE_MODIFIER GASNETI_COMPILER_FEATURE(INLINE_MODIFIER,static) #endif /* GASNETI_INLINE: Most forceful inlining demand available. * Might generate errors in cases where inlining is semantically impossible * (eg recursive functions, varargs fns) */ #if GASNET_DEBUG #define GASNETI_INLINE(fnname) static #else #define GASNETI_INLINE(fnname) _GASNETI_ALWAYS_INLINE(fnname) _GASNETI_INLINE_MODIFIER #endif /* GASNETI_NEVER_INLINE: Most forceful demand available to disable inlining for function. */ // bug 3673: Cannot use Cray pragma _CRI inline_never here #if GASNETT_USE_GCC_ATTRIBUTE_NOINLINE #ifdef __noinline__ /* e.g. nvcc's host_defines */ #define GASNETI_NEVER_INLINE(fnname,declarator) __attribute__((noinline)) declarator #else #define GASNETI_NEVER_INLINE(fnname,declarator) __attribute__((__noinline__)) declarator #endif #elif PLATFORM_COMPILER_SUN_C #define GASNETI_NEVER_INLINE(fnname,declarator) declarator; GASNETI_PRAGMA(no_inline(fnname)) declarator #else #define GASNETI_NEVER_INLINE(fnname,declarator) declarator #endif /* GASNETI_HOT (COLD): assert function is frequently (infrequently) called */ #if GASNETT_USE_GCC_ATTRIBUTE_HOT #define GASNETI_HOT __attribute__((__hot__)) #else #define GASNETI_HOT #endif #if GASNETT_USE_GCC_ATTRIBUTE_COLD #define GASNETI_COLD __attribute__((__cold__)) #else #define GASNETI_COLD #endif /* GASNETI_DEPRECATED: mark a function as deprecated (subject to future removal) */ #if GASNETT_USE_GCC_ATTRIBUTE_DEPRECATED #define GASNETI_DEPRECATED __attribute__((__deprecated__)) #else #define GASNETI_DEPRECATED #endif /* GASNETI_FALLTHROUGH: annotate a switch case as intentionally lacking "break". Legal only between a statement and subsequent "case" (where "break" normally appears) or label. Not legal (or necessary) between back-to-back cases w/o intervening statements. */ #if GASNETT_USE_GCC_ATTRIBUTE_FALLTHROUGH // Syntax requires the attribute to be attached to a null statement (the semicolon). #define GASNETI_FALLTHROUGH __attribute__((__fallthrough__)) ; #elif GASNETT_USE_CXX11_ATTRIBUTE_FALLTHROUGH #define GASNETI_FALLTHROUGH [[fallthrough]] ; #elif GASNETT_USE_CXX11_ATTRIBUTE_CLANG__FALLTHROUGH #define GASNETI_FALLTHROUGH [[clang::fallthrough]] ; #else #define GASNETI_FALLTHROUGH #endif /* GASNETI_FORMAT_PRINTF: enable gcc printf format checking of function args */ #if GASNETT_USE_GCC_ATTRIBUTE_FORMAT #define GASNETI_FORMAT_PRINTF(fnname,fmtarg,firstvararg,declarator) \ __attribute__((__format__ (__printf__, fmtarg, firstvararg))) declarator #else #define GASNETI_FORMAT_PRINTF(fnname,fmtarg,firstvararg,declarator) declarator #endif /* GASNETI_FORMAT_PRINTF_FUNCPTR: like GASNETI_FORMAT_PRINTF but applied to a function pointer */ #if GASNETT_USE_GCC_ATTRIBUTE_FORMAT_FUNCPTR #define GASNETI_FORMAT_PRINTF_FUNCPTR GASNETI_FORMAT_PRINTF #else #define GASNETI_FORMAT_PRINTF_FUNCPTR(fnpname,fmtarg,firstvararg,declarator) declarator #endif /* GASNETI_FORMAT_PRINTF_FUNCPTR_ARG: GASNETI_FORMAT_PRINTF_FUNCPTR applied to a function argument */ #if GASNETT_USE_GCC_ATTRIBUTE_FORMAT_FUNCPTR_ARG #define GASNETI_FORMAT_PRINTF_FUNCPTR_ARG GASNETI_FORMAT_PRINTF #else #define GASNETI_FORMAT_PRINTF_FUNCPTR_ARG(fnpname,fmtarg,firstvararg,declarator) declarator #endif /* ------------------------------------------------------------------------------------ */ /* GASNETI_IDENT() takes a unique identifier and a textual string and embeds the textual string in the executable file */ #define _GASNETI_IDENT(identName, identText) \ extern char volatile identName[]; \ char volatile identName[] = identText; \ GASNETI_COLD \ extern char *_##identName##_identfn(void) { return (char*)identName; } \ extern char *_##identName##_identfn(void) /* swallow semicolon */ #if PLATFORM_COMPILER_CRAY && !PLATFORM_ARCH_X86_64 /* fouls up concatenation in ident string */ #if PLATFORM_COMPILER_VERSION_LT(6,0,0) #define GASNETI_PRAGMA_SEMI ; #else /* Cray CC v6.0+ complains if a semicolon follows a _Pragma() */ #define GASNETI_PRAGMA_SEMI #endif #define GASNETI_IDENT(identName, identText) \ GASNETI_PRAGMA(_CRI ident identText) GASNETI_PRAGMA_SEMI \ _GASNETI_IDENT(identName, identText) #elif PLATFORM_COMPILER_XLC /* #pragma comment(user,"text...") or _Pragma ( "comment (user,\"text...\")" ); are both supposed to work according to compiler docs, but both appear to be broken */ #define GASNETI_IDENT(identName, identText) \ _GASNETI_IDENT(identName, identText) #else #define GASNETI_IDENT _GASNETI_IDENT #endif /* ------------------------------------------------------------------------------------ */ /* Branch prediction: these macros return the value of the expression given, but pass on a hint that you expect the value to be true or false. Use them to wrap the conditional expression in an if stmt when you have strong reason to believe the branch will frequently go in one direction and the branch is a bottleneck */ #ifndef GASNETT_PREDICT_TRUE #if (!defined(GASNETT_USE_BUILTIN_EXPECT) && GASNETI_COMPILER_HAS_BUILTIN(EXPECT,expect)) || \ GASNETT_USE_BUILTIN_EXPECT #define GASNETT_USE_BUILTIN_EXPECT 1 /* cast to uintptr_t avoids warnings on some compilers about passing non-integer arguments to __builtin_expect(), and we don't use (int) because on some systems this is smaller than (void*) and causes other warnings bug 3664: PREDICT_TRUE negates exp to hint equality to zero */ #define GASNETT_PREDICT_TRUE(exp) (!__builtin_expect( (!(uintptr_t)(exp)), 0 )) #define GASNETT_PREDICT_FALSE(exp) ( __builtin_expect( ( (uintptr_t)(exp)), 0 )) #else #define GASNETT_PREDICT_TRUE(exp) (exp) #define GASNETT_PREDICT_FALSE(exp) (exp) #endif #endif /* if with branch prediction */ #ifndef if_pf #define if_pf(cond) if (GASNETT_PREDICT_FALSE(cond)) #define if_pt(cond) if (GASNETT_PREDICT_TRUE(cond)) #endif /* ------------------------------------------------------------------------------------ */ /* Non-binding prefetch hints: These macros take a single address expression and provide a hint to prefetch the corresponding memory to L1 cache for either reading or for writing. These are non-binding hints and so the argument need not always be a valid pointer. For instance, GASNETI_PREFETCH_{READ,WRITE}_HINT(NULL) is explicitly permitted. The macros may expand to nothing, so the argument must not have side effects. */ #if (!defined(GASNETT_USE_BUILTIN_PREFETCH) && GASNETI_COMPILER_HAS_BUILTIN(PREFETCH,prefetch)) || \ GASNETT_USE_BUILTIN_PREFETCH #define GASNETT_USE_BUILTIN_PREFETCH 1 #define GASNETI_PREFETCH_READ_HINT(P) __builtin_prefetch((void *)(P),0) #define GASNETI_PREFETCH_WRITE_HINT(P) __builtin_prefetch((void *)(P),1) #else #define GASNETI_PREFETCH_READ_HINT(P) ((void)0) #define GASNETI_PREFETCH_WRITE_HINT(P) ((void)0) #endif /* ------------------------------------------------------------------------------------ */ // Misc builtins #if !defined(GASNETT_USE_ASSUME) && GASNETI_COMPILER_HAS(ASSUME) #define GASNETT_USE_ASSUME 1 #endif #if !defined(GASNETT_USE_BUILTIN_ASSUME) && GASNETI_COMPILER_HAS_BUILTIN(ASSUME,assume) #define GASNETT_USE_BUILTIN_ASSUME 1 #endif #if !defined(GASNETT_USE_BUILTIN_UNREACHABLE) && GASNETI_COMPILER_HAS_BUILTIN(UNREACHABLE,unreachable) #define GASNETT_USE_BUILTIN_UNREACHABLE 1 #endif /* ------------------------------------------------------------------------------------ */ // Handling of unused macro arguments // // When writing function-like macros, it is often necessary to ensure that // every argument is evaluated exactly once for side-effects. However, the // simple idiom `((void)(arg))` is not always sufficient because some // compilers will warn about expressions/statements "with no effect". // // This `GASNETI_UNUSED_ARGS{1..8}()` family of macros hides any // compiler-specific means of suppressing such warnings, and // provides a self-documenting name as well. // // Contrived example: // #define OPTION_1_OF_3(x,y,z) (GASNETI_UNUSED_ARGS2(y,z),(x)) // #define OPTION_2_OF_3(x,y,z) (GASNETI_UNUSED_ARGS2(x,z),(y)) // #define OPTION_3_OF_3(x,y,z) (GASNETI_UNUSED_ARGS2(x,y),(z)) // See also: gasnetc_{AM,Token}_Max*() macros. #if PLATFORM_COMPILER_PGI // Not needed with NVHPC-branded releases GASNETI_INLINE(gasneti_empty_function) void gasneti_empty_function(void) {} #define GASNETI_UNUSED_ARG_PRE_ gasneti_empty_function(), #endif #ifndef GASNETI_UNUSED_ARG_PRE_ #define GASNETI_UNUSED_ARG_PRE_ //empty #endif #ifndef GASNETI_UNUSED_ARG_ #define GASNETI_UNUSED_ARG_(x) (void)(x) #endif #define GASNETI_UNUSED_ARGS1(a1) \ (GASNETI_UNUSED_ARG_PRE_ GASNETI_UNUSED_ARG_(a1)) #define GASNETI_UNUSED_ARGS2(a1,a2) \ (GASNETI_UNUSED_ARG_PRE_ GASNETI_UNUSED_ARG_(a1),GASNETI_UNUSED_ARG_(a2)) #define GASNETI_UNUSED_ARGS3(a1,a2,a3) \ (GASNETI_UNUSED_ARG_PRE_ GASNETI_UNUSED_ARG_(a1),GASNETI_UNUSED_ARG_(a2),\ GASNETI_UNUSED_ARG_(a3)) #define GASNETI_UNUSED_ARGS4(a1,a2,a3,a4) \ (GASNETI_UNUSED_ARG_PRE_ GASNETI_UNUSED_ARG_(a1),GASNETI_UNUSED_ARG_(a2),\ GASNETI_UNUSED_ARG_(a3),GASNETI_UNUSED_ARG_(a4)) #define GASNETI_UNUSED_ARGS5(a1,a2,a3,a4,a5) \ (GASNETI_UNUSED_ARG_PRE_ GASNETI_UNUSED_ARG_(a1),GASNETI_UNUSED_ARG_(a2),\ GASNETI_UNUSED_ARG_(a3),GASNETI_UNUSED_ARG_(a4),GASNETI_UNUSED_ARG_(a5)) #define GASNETI_UNUSED_ARGS6(a1,a2,a3,a4,a5,a6) \ (GASNETI_UNUSED_ARG_PRE_ GASNETI_UNUSED_ARG_(a1),GASNETI_UNUSED_ARG_(a2),\ GASNETI_UNUSED_ARG_(a3),GASNETI_UNUSED_ARG_(a4),GASNETI_UNUSED_ARG_(a5),\ GASNETI_UNUSED_ARG_(a6)) #define GASNETI_UNUSED_ARGS7(a1,a2,a3,a4,a5,a6,a7) \ (GASNETI_UNUSED_ARG_PRE_ GASNETI_UNUSED_ARG_(a1),GASNETI_UNUSED_ARG_(a2),\ GASNETI_UNUSED_ARG_(a3),GASNETI_UNUSED_ARG_(a4),GASNETI_UNUSED_ARG_(a5),\ GASNETI_UNUSED_ARG_(a6),GASNETI_UNUSED_ARG_(a7)) #define GASNETI_UNUSED_ARGS8(a1,a2,a3,a4,a5,a6,a7,a8) \ (GASNETI_UNUSED_ARG_PRE_ GASNETI_UNUSED_ARG_(a1),GASNETI_UNUSED_ARG_(a2),\ GASNETI_UNUSED_ARG_(a3),GASNETI_UNUSED_ARG_(a4),GASNETI_UNUSED_ARG_(a5),\ GASNETI_UNUSED_ARG_(a6),GASNETI_UNUSED_ARG_(a7),GASNETI_UNUSED_ARG_(a8)) /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/config-aux/0000775000175000017500000000000015142313673015462 5ustar alastairalastairgasnet-2025.8.0/config-aux/mkinstalldirs0000775000175000017500000000672215142313673020277 0ustar alastairalastair#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the 'mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because '.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gasnet-2025.8.0/config-aux/missing0000775000175000017500000001533015142313673017063 0ustar alastairalastair#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gasnet-2025.8.0/config-aux/config.guess0000775000175000017500000014044615142313673020013 0ustar alastairalastair#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2021 Free Software Foundation, Inc. timestamp='2021-01-25' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . me=$(echo "$0" | sed -e 's,.*/,,') usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039 { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$driver" break fi done if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac } # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu #else #include /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl #endif #endif EOF eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl; then LIBC=musl fi # If the system lacks a compiler, then just pick glibc. # We could probably try harder. if [ "$LIBC" = unknown ]; then LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)) case "$UNAME_MACHINE_ARCH" in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') machine="${arch}${endian}"-unknown ;; *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; *:OS108:*:*) echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; *:Twizzler:*:*) echo "$UNAME_MACHINE"-unknown-twizzler exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) echo mips-dec-osf1 exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') ;; *5.*) UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "$( (/bin/universe) 2>/dev/null)" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case $(/usr/bin/uname -p) in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:*:*) case "$(/usr/bin/arch -k)" in Series*|S4*) UNAME_RELEASE=$(uname -v) ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "$(/bin/arch)" in sun3) echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && SYSTEM_NAME=$("$dummy" "$dummyarg") && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=$(/usr/bin/uname -p) if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then echo m88k-dg-dgux"$UNAME_RELEASE" else echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then IBM_REV=$(/usr/bin/oslevel) else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if test "$HP_ARCH" = hppa2.0w then set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then echo "$UNAME_MACHINE"-unknown-osf1mk else echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=$(uname -p) set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi else echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf fi exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=$(/usr/bin/uname -p) case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; i*:CYGWIN*:*) echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) case "$UNAME_MACHINE" in x86) echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; i*:UWIN*:*) echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; *:GNU:*:*) # the GNU system echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" exit ;; *:Minix:*:*) echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel #undef mips64 #undef mips64el #if ${IS_GLIBC} && defined(_ABI64) LIBCABI=gnuabi64 #else #if ${IS_GLIBC} && defined(_ABIN32) LIBCABI=gnuabin32 #else LIBCABI=${LIBC} #endif #endif #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa64r6 #else #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa32r6 #else #if defined(__mips64) CPU=mips64 #else CPU=mips #endif #endif #endif #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #endif #endif EOF eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) set_cc_for_build LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null then LIBCABI="$LIBC"x32 fi fi echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case $(/bin/uname -X | grep "^Machine") in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=$(sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=$( (uname -p) 2>/dev/null) echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then echo mips-nec-sysv"$UNAME_RELEASE" else echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; arm64:Darwin:*:*) echo aarch64-apple-darwin"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=$(uname -p) case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac if command -v xcode-select > /dev/null 2> /dev/null && \ ! xcode-select --print-path > /dev/null 2> /dev/null ; then # Avoid executing cc if there is no toolchain installed as # cc will be a stub that puts up a graphical alert # prompting the user to install developer tools. CC_FOR_BUILD=no_compiler_found else set_cc_for_build fi if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=$(uname -p) if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk"$UNAME_RELEASE" exit ;; NSV-*:NONSTOP_KERNEL:*:*) echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; NSX-*:NONSTOP_KERNEL:*:*) echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; *:*VMS:*:*) UNAME_MACHINE=$( (uname -p) 2>/dev/null) case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" exit ;; i*86:rdos:*:*) echo "$UNAME_MACHINE"-pc-rdos exit ;; *:AROS:*:*) echo "$UNAME_MACHINE"-unknown-aros exit ;; x86_64:VMkernel:*:*) echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; *:Unleashed:*:*) echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" exit ;; esac # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" < #include #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #include #if defined(_SIZE_T_) || defined(SIGLOST) #include #endif #endif #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) #include #if defined (BSD) #if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); #else #if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); #else printf ("vax-dec-bsd\n"); exit (0); #endif #endif #else printf ("vax-dec-bsd\n"); exit (0); #endif #else #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname un; uname (&un); printf ("vax-dec-ultrix%s\n", un.release); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname *un; uname (&un); printf ("mips-dec-ultrix%s\n", un.release); exit (0); #else printf ("mips-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <&2 </dev/null || echo unknown) uname -r = $( (uname -r) 2>/dev/null || echo unknown) uname -s = $( (uname -s) 2>/dev/null || echo unknown) uname -v = $( (uname -v) 2>/dev/null || echo unknown) /usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) /bin/uname -X = $( (/bin/uname -X) 2>/dev/null) hostinfo = $( (hostinfo) 2>/dev/null) /bin/universe = $( (/bin/universe) 2>/dev/null) /usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) /bin/arch = $( (/bin/arch) 2>/dev/null) /usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) /usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF fi exit 1 # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gasnet-2025.8.0/config-aux/depcomp0000775000175000017500000005601615142313673017047 0ustar alastairalastair#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gasnet-2025.8.0/config-aux/install-sh0000775000175000017500000003452315142313673017475 0ustar alastairalastair#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gasnet-2025.8.0/config-aux/Makefile.am0000664000175000017500000000065615142313673017525 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- AUTOMAKE_OPTIONS = foreign EXTRA_DIST = config.guess config.sub depcomp install-sh missing mkinstalldirs distclean-local: rm -f Makefile # These appear here to enforce check-prefix-vars early in the top-level recursive install traversal install-data-local: @$(MAKE) -C .. check-prefix-vars install-exec-local: @$(MAKE) -C .. check-prefix-vars gasnet-2025.8.0/config-aux/compile0000775000175000017500000001635015142313673017045 0ustar alastairalastair#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: gasnet-2025.8.0/config-aux/config.sub0000664000175000017500000010315415142313673017446 0ustar alastairalastair#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2021 Free Software Foundation, Inc. timestamp='2021-01-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=$(echo "$0" | sed -e 's,.*/,,') usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type # shellcheck disable=SC2162 IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | convergent* | ncr* | news | 32* | 3600* | 3100* \ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | ultra | tti* | harris | dolphin | highlevel | gould \ | cbm | ns | masscomp | apple | axis | knuth | cray \ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 basic_os= ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; convex-c1) basic_machine=c1-convex basic_os=bsd ;; convex-c2) basic_machine=c2-convex basic_os=bsd ;; convex-c32) basic_machine=c32-convex basic_os=bsd ;; convex-c34) basic_machine=c34-convex basic_os=bsd ;; convex-c38) basic_machine=c38-convex basic_os=bsd ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv4 ;; i*86v) cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=sysv ;; i*86sol2) cpu=$(echo "$1" | sed -e 's/86.*/86/') vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next case $basic_os in openstep*) ;; nextstep*) ;; ns2*) basic_os=nextstep2 ;; *) basic_os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=$(echo "$basic_machine" | sed 's/-.*//') ;; *-*) # shellcheck disable=SC2162 IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x$basic_os != x then # First recognize some ad-hoc caes, or perhaps split kernel-os, or else just # set os. case $basic_os in gnu/linux*) kernel=linux os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|') ;; os2-emx) kernel=os2 os=$(echo $basic_os | sed -e 's|os2-emx|emx|') ;; nto-qnx*) kernel=nto os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|') ;; *-*) # shellcheck disable=SC2162 IFS="-" read kernel os <&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) ;; uclinux-uclibc* ) ;; -dietlibc* | -newlib* | -musl* | -uclibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 exit 1 ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; vxworks-simlinux | vxworks-simwindows | vxworks-spe) ;; nto-qnx*) ;; os2-emx) ;; *-eabi* | *-gnueabi*) ;; -*) # Blank kernel with real OS is always fine. ;; *-*) echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$os in *-riscix*) vendor=acorn ;; *-sunos*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gasnet-2025.8.0/config-aux/Makefile.in0000664000175000017500000004124415142313673017534 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = config-aux ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in compile config.guess \ config.sub depcomp install-sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign EXTRA_DIST = config.guess config.sub depcomp install-sh missing mkinstalldirs all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config-aux/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign config-aux/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-exec-local install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-exec-local \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \ uninstall uninstall-am .PRECIOUS: Makefile distclean-local: rm -f Makefile # These appear here to enforce check-prefix-vars early in the top-level recursive install traversal install-data-local: @$(MAKE) -C .. check-prefix-vars install-exec-local: @$(MAKE) -C .. check-prefix-vars # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/.autom4te.cfg0000664000175000017500000000037415142313673015727 0ustar alastairalastair## ------------------ ## ## User Preferences. ## ## ------------------ ## begin-language: "Autoconf" args: --no-cache end-language: "Autoconf" begin-language: "Autoconf-without-aclocal-m4" args: --no-cache end-language: "Autoconf-without-aclocal-m4" gasnet-2025.8.0/gasnet_trace.h0000664000175000017500000016410015142313673016234 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_trace.h $ * Description: GASNet Tracing Helpers (Internal code, not for client use) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_TRACE_H #define _GASNET_TRACE_H #include /* ------------------------------------------------------------------------------------ */ /* Statistical collection & tracing See README for user-interface usage information */ #if GASNETI_STATS_OR_TRACE /* emit trace info and increment a stat ctr */ #define GASNETI_TRACE_EVENT(type, name) do { \ _GASNETI_STAT_EVENT (type, name); \ _GASNETI_TRACE_EVENT(type, name); \ } while (0) /* emit trace info and accumulate an integer stat value */ #define GASNETI_TRACE_EVENT_VAL(type, name, val) do { \ gasneti_statctr_t _te_val = (val); \ _GASNETI_STAT_EVENT_VAL (type, name, _te_val); \ _GASNETI_TRACE_EVENT_VAL(type, name, _te_val); \ } while (0) /* emit trace info and accumulate a time stat value */ #define GASNETI_TRACE_EVENT_TIME(type, name, time) do { \ gasneti_tick_t _te_time = (time); \ _GASNETI_STAT_EVENT_TIME(type, name, _te_time); \ _GASNETI_TRACE_EVENT_TIME(type, name, _te_time); \ } while (0) #else #define GASNETI_TRACE_EVENT(type, name) ((void)0) #define GASNETI_TRACE_EVENT_VAL(type, name, val) ((void)0) #define GASNETI_TRACE_EVENT_TIME(type, name, time) ((void)0) #endif #if GASNET_TRACE /* print a string on the trace Ex: GASNETI_TRACE_MSG(C, "init complete") */ #define GASNETI_TRACE_MSG(type, string) \ GASNETI_TRACE_PRINTF(type, ("%s",(string))) /* print a formatted string on output Ex: GASNETI_TRACE_PRINTF(C, ("%i buffers free", numbufs)) (note the extra parentheses around arg) */ #define GASNETI_TRACE_PRINTF(type, args) do { \ if (GASNETI_TRACE_ENABLED(type)) { \ char *_tpf_msg = gasneti_dynsprintf args; \ gasneti_trace_output(#type, _tpf_msg, 1); \ } \ } while(0) #else #define GASNETI_TRACE_MSG(type, string) ((void)0) #define GASNETI_TRACE_PRINTF(type, args) ((void)0) #endif #if GASNET_STATS /* print an arbitrary string of statistical output on the trace Ex: GASNETI_STATS_MSG(C, "init complete") */ #define GASNETI_STATS_MSG(type, string) \ GASNETI_STATS_PRINTF(type, ("%s",(string))) /* print a formatted string of statistical output on the trace Ex: GASNETI_STATS_PRINTF(C, ("%i buffers free", numbufs)) (note the extra parentheses around arg) */ #define GASNETI_STATS_PRINTF(type, args) do { \ if (GASNETI_STATS_ENABLED(type)) { \ char *_spf_msg = gasneti_dynsprintf args; \ gasneti_stats_output(#type, _spf_msg, 0); \ } \ } while(0) #else #define GASNETI_STATS_MSG(type, string) ((void)0) #define GASNETI_STATS_PRINTF(type, args) ((void)0) #endif /* allow for dump of conduit-core specific statistics */ #ifndef GASNETC_STATS_DUMP #define GASNETC_STATS_DUMP(reset) ((void)0) #endif /* allow for dump of conduit-extended specific statistics */ #ifndef GASNETE_STATS_DUMP #define GASNETE_STATS_DUMP(reset) ((void)0) #endif #ifndef GASNETI_STATS_ECHOED_TO_TRACEFILE #define GASNETI_STATS_ECHOED_TO_TRACEFILE 1 #endif #if GASNET_SRCLINES /* GASNETI_TRACE_SETSOURCELINE(filename, linenum): set the current "high-level" source file and line for the current thread to the given value. This information is used to dump out current line information into the tracefile along with each trace message. Passing a NULL filename implies no change to the current filename GASNETI_TRACE_GETSOURCELINE(pfilename, plinenum): fetch the current "high-level" source file and line for the current thread into *pfilename and *plinenum. no-op when tracing is off. */ #if GASNETI_CLIENT_THREADS extern void gasneti_trace_setsourceline(const char *_filename, unsigned int _linenum); extern void gasneti_trace_getsourceline(const char **_pfilename, unsigned int *_plinenum); extern void gasneti_trace_freezesourceline(void); extern void gasneti_trace_unfreezesourceline(void); #else extern const char *gasneti_srcfilename; extern unsigned int gasneti_srclinenum; extern unsigned int gasneti_srcfreeze; GASNETI_INLINE(gasneti_trace_setsourceline) void gasneti_trace_setsourceline(const char *_filename, unsigned int _linenum) { if_pt (gasneti_srcfreeze == 0) { if_pt (_filename != NULL) gasneti_srcfilename = _filename; gasneti_srclinenum = _linenum; } } GASNETI_INLINE(gasneti_trace_getsourceline) void gasneti_trace_getsourceline(const char **_pfilename, unsigned int *_plinenum) { *_pfilename = gasneti_srcfilename; *_plinenum = gasneti_srclinenum; } GASNETI_INLINE(gasneti_trace_freezesourceline) void gasneti_trace_freezesourceline(void) { gasneti_srcfreeze++; } GASNETI_INLINE(gasneti_trace_unfreezesourceline) void gasneti_trace_unfreezesourceline(void) { gasneti_assert_int(gasneti_srcfreeze ,>, 0); gasneti_srcfreeze--; } #endif /* GASNETI_SRCLINES_FORCE ensures we always track srclines otherwise we only track them as needed for tracing purposes */ #ifdef GASNETI_SRCLINES_FORCE #if 1 /* All currently supported platforms */ #define GASNETI_SRCLINE_TRACKING() (1) #endif #else #define GASNETI_SRCLINE_TRACKING() GASNETI_TRACE_ENABLED(N) #endif #if 1 /* All currently supported platforms */ #define GASNETI_TRACE_SETSOURCELINE(filename, linenum) \ (GASNETI_SRCLINE_TRACKING() ? gasneti_trace_setsourceline((const char *)filename, (unsigned int)linenum) : ((void)0)) #endif #define GASNETI_TRACE_GETSOURCELINE(pfilename, plinenum) \ (GASNETI_SRCLINE_TRACKING() ? gasneti_trace_getsourceline(pfilename, plinenum) : ((void)0)) #define GASNETI_TRACE_FREEZESOURCELINE() \ (GASNETI_SRCLINE_TRACKING() ? gasneti_trace_freezesourceline() : ((void)0)) #define GASNETI_TRACE_UNFREEZESOURCELINE() \ (GASNETI_SRCLINE_TRACKING() ? gasneti_trace_unfreezesourceline() : ((void)0)) #else #define GASNETI_TRACE_SETSOURCELINE(filename, linenum) ((void)0) #define GASNETI_TRACE_GETSOURCELINE(pfilename, plinenum) ((void)0) #define GASNETI_TRACE_FREEZESOURCELINE() ((void)0) #define GASNETI_TRACE_UNFREEZESOURCELINE() ((void)0) #endif /* ------------------------------------------------------------------------------------ */ /* misc helpers for specific tracing scenarios */ #define GASNETI_TMFMT "%s" #define GASNETI_TMSTR(tm) gasneti_formattm(tm) #define GASNETI_TMRANKFMT GASNETI_TMFMT ":%i" #define GASNETI_TMRANKSTR(tm,rank) GASNETI_TMSTR(tm),(rank) // Team and *self* rank (note multiple evaluation of tm): #define GASNETI_TMSELFFMT GASNETI_TMRANKFMT #define GASNETI_TMSELFSTR(tm) GASNETI_TMRANKSTR(tm,gex_TM_QueryRank(tm)) #if PLATFORM_ARCH_32 #define GASNETI_LADDRFMT "0x%08" PRIxPTR #define GASNETI_LADDRSTR(ptr) ((uintptr_t)(ptr)) #define GASNETI_RADDRFMT "(" GASNETI_TMRANKFMT ",0x%08" PRIxPTR ")" #define GASNETI_RADDRSTR(tm,rank,ptr) GASNETI_TMRANKSTR((tm),(rank)),GASNETI_LADDRSTR(ptr) #else #define GASNETI_LADDRFMT "0x%08x %08x" #define GASNETI_LADDRSTR(ptr) GASNETI_HIWORD(ptr), GASNETI_LOWORD(ptr) #define GASNETI_RADDRFMT "(" GASNETI_TMRANKFMT ",0x%08x %08x)" #define GASNETI_RADDRSTR(tm,rank,ptr) GASNETI_TMRANKSTR((tm),(rank)),GASNETI_LADDRSTR(ptr) #endif #if GASNET_TRACE #define GASNETI_TRACE_GETPUT(type, name, nbytes, tm, rank) \ GASNETI_TRACE_PRINTF(type, ("%s: %s = %6" PRIuPTR ", peer = " \ GASNETI_TMRANKFMT, #name, \ gasneti_stats[(int)GASNETI_STAT_##name]._desc,\ (uintptr_t)(nbytes), GASNETI_TMRANKSTR((tm),(rank)))); #define GASNETI_TRACE_GETPUT_NONLOCAL GASNETI_TRACE_GETPUT #define GASNETI_TRACE_GETPUT_LOCAL(type, name, nbytes, tm, rank) do { \ if (GASNETI_TRACE_ENABLED(type) && !gasneti_trace_suppresslocal) \ GASNETI_TRACE_GETPUT(type, name, nbytes, tm, rank); \ } while (0) #else #define GASNETI_TRACE_GETPUT_NONLOCAL(type, name, nbytes, tm, rank) ((void)0) #define GASNETI_TRACE_GETPUT_LOCAL(type, name, nbytes, tm, rank) ((void)0) #endif #define GASNETI_TRACE_GET_NAMED(name,locality,tm,dest,rank,src,nbytes) do { \ _GASNETI_STAT_EVENT_VAL (G, name, (nbytes)); \ GASNETI_TRACE_GETPUT_##locality(G, name, (nbytes), (tm), (rank)); \ GASNETI_TRACE_PRINTF(D,(#name ": " GASNETI_LADDRFMT" <- " GASNETI_RADDRFMT" (%" PRIuPTR " bytes)", \ GASNETI_LADDRSTR(dest), GASNETI_RADDRSTR((tm),(rank),(src)), \ (uintptr_t)(nbytes))); \ } while (0) #if GASNETI_STATS_OR_TRACE #define GASNETI_TRACE_PUT_NAMED(name,locality,tm,rank,dest,src,nbytes) do { \ void *_tpn_src = (src); /* workaround for CrayC warning */ \ _GASNETI_STAT_EVENT_VAL (P, name, (nbytes)); \ GASNETI_TRACE_GETPUT_##locality(P, name, (nbytes), tm, rank); \ GASNETI_TRACE_PRINTF(D,(#name ": " GASNETI_RADDRFMT" <- " GASNETI_LADDRFMT" (%" PRIuPTR " bytes): %s", \ GASNETI_RADDRSTR((tm),(rank),(dest)), GASNETI_LADDRSTR(_tpn_src), \ (uintptr_t)(nbytes), gasneti_formatdata(_tpn_src,(nbytes)))); \ } while (0) #else #define GASNETI_TRACE_PUT_NAMED(name,locality,tm,rank,dest,src,nbytes) ((void)0) #endif /* tracing for remote gets/puts */ #define GASNETI_TRACE_GET(variety,tm,dest,rank,src,nbytes) \ GASNETI_TRACE_GET_NAMED(GET_##variety,NONLOCAL,tm,dest,rank,src,nbytes) #define GASNETI_TRACE_PUT(variety,tm,rank,dest,src,nbytes) \ GASNETI_TRACE_PUT_NAMED(PUT_##variety,NONLOCAL,tm,rank,dest,src,nbytes) /* tracing for local gets/puts (separation allows suppression of trace output) */ #define GASNETI_TRACE_GET_LOCAL(variety,tm,dest,rank,src,nbytes) \ GASNETI_TRACE_GET_NAMED(GET_##variety##_LOCAL,LOCAL,tm,dest,rank,src,nbytes) #define GASNETI_TRACE_PUT_LOCAL(variety,tm,rank,dest,src,nbytes) \ GASNETI_TRACE_PUT_NAMED(PUT_##variety##_LOCAL,LOCAL,tm,rank,dest,src,nbytes) /*------------------------------------------------------------------------------------*/ #if GASNETI_STATS_OR_TRACE #define GASNETI_TRACE_TM_BARRIER(name, tm, flags) do { \ _GASNETI_STAT_EVENT(B,name); \ GASNETI_TRACE_PRINTF(B,(#name": TM=" GASNETI_TMFMT " flags=%d", \ GASNETI_TMSTR(tm), flags)); \ } while (0) #else #define GASNETI_TRACE_TM_BARRIER(name, tm, flags) ((void)0) #endif /*------------------------------------------------------------------------------------*/ #define GASNETI_TRACE_TRYSYNC(name,success) \ GASNETI_TRACE_EVENT_VAL(S,name,((success) == GASNET_OK?1:0)) #if GASNETI_STATS_OR_TRACE #define GASNETI_TRACE_WAITSYNC_BEGIN() \ gasneti_tick_t _waitstart = GASNETI_TICKS_NOW_IFENABLED(S) #else #define GASNETI_TRACE_WAITSYNC_BEGIN() ((void)0) #endif #if GASNET_STATS typedef void (*gasnett_stats_callback_t)(void (*)(const char *, ...)); extern void (*gasnett_stats_callback)( GASNETI_FORMAT_PRINTF_FUNCPTR_ARG(_format,1,2,void (*_format)(const char *, ...)) ); #endif #define GASNETI_TRACE_WAITSYNC_END(name) \ GASNETI_TRACE_EVENT_TIME(S,name,GASNETI_TICKS_NOW_IFENABLED(S) - _waitstart) /*------------------------------------------------------------------------------------*/ /* AM Request/Reply tracing helpers */ #define _GASNETI_TRACE_GATHERARGS(numargs,lastarg) \ char _tga_argstr[256]; \ if (GASNETI_TRACE_ENABLED(A)) { \ char *_tga_aptr = _tga_argstr; \ size_t _tga_aspace = sizeof(_tga_argstr); \ va_list _tga_argptr; \ *_tga_aptr = '\0'; \ va_start(_tga_argptr, lastarg); \ for (int _tga_i=0;_tga_i<(numargs);_tga_i++) { \ /* must be int due to default argument promotion */ \ int _tga_len = snprintf(_tga_aptr,_tga_aspace," 0x%08x", \ (int)(uint32_t)va_arg(_tga_argptr,int)); \ _tga_aptr += _tga_len; _tga_aspace -= _tga_len; \ } \ va_end(_tga_argptr); \ } #define GASNETI_TRACE_AMSHORT(name,tm,rank,handler,flags,numargs) do { \ _GASNETI_TRACE_GATHERARGS(numargs,numargs); \ _GASNETI_STAT_EVENT(A,name); \ GASNETI_TRACE_PRINTF(A,(#name": dest=" GASNETI_TMRANKFMT \ " handler=%i flags=0x%x args:%s", \ GASNETI_TMRANKSTR(tm,rank),handler,flags,_tga_argstr)); \ } while(0) #define GASNETI_TRACE_AMMEDIUM(name,tm,rank,handler,source_addr,nbytes,flags,numargs) do { \ _GASNETI_TRACE_GATHERARGS(numargs,numargs); \ _GASNETI_STAT_EVENT_VAL(A,name,nbytes); \ GASNETI_TRACE_PRINTF(A,(#name": dest=" GASNETI_TMRANKFMT \ " handler=%i source_addr=" GASNETI_LADDRFMT \ " nbytes=%" PRIuSZ " flags=0x%x args:%s", \ GASNETI_TMRANKSTR(tm,rank),handler,GASNETI_LADDRSTR(source_addr),(size_t)nbytes,flags,_tga_argstr)); \ GASNETI_TRACE_PRINTF(D,(#name": payload data: %s", gasneti_formatdata(source_addr,nbytes))); \ } while(0) #define GASNETI_TRACE_AMLONG(name,tm,rank,handler,source_addr,nbytes,dest_addr,flags,numargs) do {\ _GASNETI_TRACE_GATHERARGS(numargs,numargs); \ _GASNETI_STAT_EVENT_VAL(A,name,nbytes); \ GASNETI_TRACE_PRINTF(A,(#name": dest=" GASNETI_TMRANKFMT \ " handler=%i source_addr=" GASNETI_LADDRFMT \ " nbytes=%" PRIuSZ " dest_addr=" GASNETI_LADDRFMT" flags=0x%x args:%s", \ GASNETI_TMRANKSTR(tm,rank),handler,GASNETI_LADDRSTR(source_addr),(size_t)nbytes, \ GASNETI_LADDRSTR(dest_addr),flags,_tga_argstr)); \ GASNETI_TRACE_PRINTF(D,(#name": payload data: %s", gasneti_formatdata(source_addr,nbytes))); \ } while(0) #define GASNETI_TRACE_PREP_MEDIUM(name,tm,rank,cbuf,least_pl,most_pl,flags,numargs) do { \ GASNETI_TRACE_PRINTF(A,(#name": dest=" GASNETI_TMRANKFMT " client_buf=" GASNETI_LADDRFMT \ " least_payload=%" PRIuSZ \ " most_payload=%" PRIuSZ " flags=0x%x numargs=%i", \ GASNETI_TMRANKSTR(tm,rank),GASNETI_LADDRSTR(cbuf),(size_t)least_pl,(size_t)most_pl, \ flags,(int)numargs)); \ } while(0) #define GASNETI_TRACE_PREP_LONG(name,tm,rank,cbuf,least_pl,most_pl,dest_addr,flags,numargs) do { \ GASNETI_TRACE_PRINTF(A,(#name": dest=" GASNETI_TMRANKFMT " client_buf=" GASNETI_LADDRFMT \ " least_payload=%" PRIuSZ \ " most_payload=%" PRIuSZ " dest_addr=" GASNETI_LADDRFMT \ " flags=0x%x numargs=%i", \ GASNETI_TMRANKSTR(tm,rank),GASNETI_LADDRSTR(cbuf),(size_t)least_pl,(size_t)most_pl, \ GASNETI_LADDRSTR(dest_addr),flags,(int)numargs)); \ } while(0) #define _GASNETI_TRACE_PREP_RETURN(name,sd) do { \ gasneti_AM_SrcDesc_t _tpr_sd = (sd); \ if (_tpr_sd) { \ _GASNETI_STAT_EVENT_VAL(A,name,_tpr_sd->_size); \ GASNETI_TRACE_PRINTF(A,(#name": return { Addr=" GASNETI_LADDRFMT " Size=%" PRIuSZ " }", \ GASNETI_LADDRSTR(_tpr_sd->_addr), (size_t)(_tpr_sd->_size))); \ } else { \ GASNETI_TRACE_PRINTF(A,(#name": return GEX_AM_SRCDESC_NO_OP")); \ } \ } while(0) #define GASNETI_TRACE_COMMIT_MEDIUM(name,handler,source_addr,nbytes,flags,numargs) do { \ _GASNETI_TRACE_GATHERARGS(numargs,sd_arg); /* assumes sd_arg is final fixed arg */ \ _GASNETI_STAT_EVENT_VAL(A,name,nbytes); \ GASNETI_TRACE_PRINTF(A,(#name": handler=%i nbytes=%" PRIuSZ " flags=0x%x args:%s", \ handler,(size_t)nbytes,flags,_tga_argstr)); \ GASNETI_TRACE_PRINTF(D,(#name": payload data: %s", gasneti_formatdata(source_addr,nbytes))); \ } while(0) #define GASNETI_TRACE_COMMIT_LONG(name,handler,source_addr,nbytes,dest_addr,flags, numargs) do { \ _GASNETI_TRACE_GATHERARGS(numargs,sd_arg); /* assumes sd_arg is final fixed arg */ \ _GASNETI_STAT_EVENT_VAL(A,name,nbytes); \ GASNETI_TRACE_PRINTF(A,(#name": handler=%i nbytes=%" PRIuSZ " dest_addr=" GASNETI_LADDRFMT" flags=0x%x args:%s", \ handler,(size_t)nbytes,GASNETI_LADDRSTR(dest_addr),flags,_tga_argstr)); \ GASNETI_TRACE_PRINTF(D,(#name": payload data: %s", gasneti_formatdata(source_addr,nbytes))); \ } while(0) #define GASNETI_TRACE_CANCEL(name,sd,flags) do { \ _GASNETI_STAT_EVENT(A,name); \ GASNETI_TRACE_PRINTF(A,(#name": flags=%d", flags)); \ } while(0) #if GASNET_TRACE #define GASNETI_TRACE_AMREQUESTSHORT(tm,dest,handler,flags,numargs) \ GASNETI_TRACE_AMSHORT(AMREQUEST_SHORT,tm,dest,handler,flags,numargs) #define GASNETI_TRACE_AMREPLYSHORT(token,handler,flags,numargs) do { \ gex_Token_Info_t _tar_info; \ gex_Token_Info(token, &_tar_info, GEX_TI_SRCRANK); \ GASNETI_TRACE_AMSHORT(AMREPLY_SHORT,NULL,_tar_info.gex_srcrank,handler,flags,numargs); \ GASNETI_TRACE_PRINTF(C,("AMREPLY_SHORT: Reply token: %s", \ gasneti_formatdata(&token, sizeof(token)))); \ } while(0) #define GASNETI_TRACE_AMREQUESTMEDIUM(tm,dest,handler,source_addr,nbytes,flags,numargs) \ GASNETI_TRACE_AMMEDIUM(AMREQUEST_MEDIUM,tm,dest,handler,source_addr,nbytes,flags,numargs) #define GASNETI_TRACE_AMREPLYMEDIUM(token,handler,source_addr,nbytes,flags,numargs) do { \ gex_Token_Info_t _tar_info; \ gex_Token_Info(token, &_tar_info, GEX_TI_SRCRANK); \ GASNETI_TRACE_AMMEDIUM(AMREPLY_MEDIUM,NULL,_tar_info.gex_srcrank,handler,source_addr,nbytes,flags,numargs); \ GASNETI_TRACE_PRINTF(C,("AMREPLY_MEDIUM: Reply token: %s", \ gasneti_formatdata(&token, sizeof(token)))); \ } while(0) #define GASNETI_TRACE_AMREQUESTLONG(tm,dest,handler,source_addr,nbytes,dest_addr,flags,numargs) \ GASNETI_TRACE_AMLONG(AMREQUEST_LONG,tm,dest,handler,source_addr,nbytes,dest_addr,flags,numargs) #define GASNETI_TRACE_AMREPLYLONG(token,handler,source_addr,nbytes,dest_addr,flags,numargs) do { \ gex_Token_Info_t _tar_info; \ gex_Token_Info(token, &_tar_info, GEX_TI_SRCRANK); \ GASNETI_TRACE_AMLONG(AMREPLY_LONG,NULL,_tar_info.gex_srcrank,handler,source_addr,nbytes,dest_addr,flags,numargs); \ GASNETI_TRACE_PRINTF(C,("AMREPLY_LONG: Reply token: %s", \ gasneti_formatdata(&token, sizeof(token)))); \ } while(0) #define GASNETI_TRACE_PREP_REQUESTMEDIUM(tm,dest,cbuf,least_pl,most_pl,flags,numargs) \ GASNETI_TRACE_PREP_MEDIUM(PREP_REQUEST_MEDIUM,tm,dest,cbuf,least_pl,most_pl,flags,numargs) #define GASNETI_TRACE_PREP_REPLYMEDIUM(token,cbuf,least_pl,most_pl,flags,numargs) do { \ gex_Token_Info_t _tar_info; \ gex_Token_Info(token, &_tar_info, GEX_TI_SRCRANK); \ GASNETI_TRACE_PREP_MEDIUM(PREP_REPLY_MEDIUM,NULL,_tar_info.gex_srcrank,cbuf,least_pl,most_pl,flags,numargs); \ } while(0) #define GASNETI_TRACE_PREP_REQUESTLONG(tm,dest,cbuf,least_pl,most_pl,dest_addr,flags,numargs) \ GASNETI_TRACE_PREP_LONG(PREP_REQUEST_LONG,tm,dest,cbuf,least_pl,most_pl,dest_addr,flags,numargs) #define GASNETI_TRACE_PREP_REPLYLONG(token,cbuf,least_pl,most_pl,dest_addr,flags,numargs) do { \ gex_Token_Info_t _tar_info; \ gex_Token_Info(token, &_tar_info, GEX_TI_SRCRANK); \ GASNETI_TRACE_PREP_LONG(PREP_REPLY_LONG,NULL,_tar_info.gex_srcrank,cbuf,least_pl,most_pl,dest_addr,flags,numargs);\ } while(0) #define GASNETI_TRACE_PREP_RETURN(name,sd) _GASNETI_TRACE_PREP_RETURN(PREP_##name,sd) #define GASNETI_TRACE_COMMIT_REQUESTMEDIUM(handler,source_addr,nbytes,flags,numargs) \ GASNETI_TRACE_COMMIT_MEDIUM(COMMIT_REQUEST_MEDIUM,handler,source_addr,nbytes,flags,numargs) #define GASNETI_TRACE_COMMIT_REPLYMEDIUM(handler,source_addr,nbytes,flags,numargs) \ GASNETI_TRACE_COMMIT_MEDIUM(COMMIT_REPLY_MEDIUM,handler,source_addr,nbytes,flags,numargs) #define GASNETI_TRACE_COMMIT_REQUESTLONG(handler,source_addr,nbytes,dest_addr,flags,numargs) \ GASNETI_TRACE_COMMIT_LONG(COMMIT_REQUEST_LONG,handler,source_addr,nbytes,dest_addr,flags,numargs) #define GASNETI_TRACE_COMMIT_REPLYLONG(handler,source_addr,nbytes,dest_addr,flags,numargs) \ GASNETI_TRACE_COMMIT_LONG(COMMIT_REPLY_LONG,handler,source_addr,nbytes,dest_addr,flags,numargs) #define GASNETI_TRACE_CANCEL_REQUESTMEDIUM(sd,flags) \ GASNETI_TRACE_CANCEL(CANCEL_REQUEST_MEDIUM,sd,flags) #define GASNETI_TRACE_CANCEL_REPLYMEDIUM(sd,flags) \ GASNETI_TRACE_CANCEL(CANCEL_REPLY_MEDIUM,sd,flags) #define GASNETI_TRACE_CANCEL_REQUESTLONG(sd,flags) \ GASNETI_TRACE_CANCEL(CANCEL_REQUEST_LONG,sd,flags) #define GASNETI_TRACE_CANCEL_REPLYLONG(sd,flags) \ GASNETI_TRACE_CANCEL(CANCEL_REPLY_LONG,sd,flags) #elif GASNET_STATS #define GASNETI_TRACE_AMREQUESTSHORT(tm,dest,handler,flags,numargs) \ GASNETI_TRACE_EVENT(A,AMREQUEST_SHORT) #define GASNETI_TRACE_AMREPLYSHORT(token,handler,flags,numargs) \ GASNETI_TRACE_EVENT(A,AMREPLY_SHORT) #define GASNETI_TRACE_AMREQUESTMEDIUM(tm,dest,handler,source_addr,nbytes,flags,numargs) \ GASNETI_TRACE_EVENT_VAL(A,AMREQUEST_MEDIUM,nbytes) #define GASNETI_TRACE_AMREPLYMEDIUM(token,handler,source_addr,nbytes,flags,numargs) \ GASNETI_TRACE_EVENT_VAL(A,AMREPLY_MEDIUM,nbytes) #define GASNETI_TRACE_AMREQUESTLONG(tm,dest,handler,source_addr,nbytes,dest_addr,flags,numargs) \ GASNETI_TRACE_EVENT_VAL(A,AMREQUEST_LONG,nbytes) #define GASNETI_TRACE_AMREPLYLONG(token,handler,source_addr,nbytes,dest_addr,flags,numargs) \ GASNETI_TRACE_EVENT_VAL(A,AMREPLY_LONG,nbytes) #define GASNETI_TRACE_PREP_REQUESTMEDIUM(tm,dest,cbuf,least_pl,most_pl,flags,numargs) ((void)0) #define GASNETI_TRACE_PREP_REPLYMEDIUM(token,cbuf,least_pl,most_pl,flags,numargs) ((void)0) #define GASNETI_TRACE_PREP_REQUESTLONG(tm,dest,cbuf,least_pl,most_pl,dest_addr,flags,numargs) ((void)0) #define GASNETI_TRACE_PREP_REPLYLONG(token,cbuf,least_pl,most_pl,dest_addr,flags,numargs) ((void)0) #define GASNETI_TRACE_PREP_RETURN(name,sd) \ _GASNETI_TRACE_PREP_RETURN(PREP_##name,sd) #define GASNETI_TRACE_COMMIT_REQUESTMEDIUM(handler,source_addr,nbytes,flags,numargs) \ GASNETI_TRACE_EVENT_VAL(A,COMMIT_REQUEST_MEDIUM,nbytes) #define GASNETI_TRACE_COMMIT_REPLYMEDIUM(handler,source_addr,nbytes,flags,numargs) \ GASNETI_TRACE_EVENT_VAL(A,COMMIT_REPLY_MEDIUM,nbytes) #define GASNETI_TRACE_COMMIT_REQUESTLONG(handler,source_addr,nbytes,dest_addr,flags,numargs) \ GASNETI_TRACE_EVENT_VAL(A,COMMIT_REQUEST_LONG,nbytes) #define GASNETI_TRACE_COMMIT_REPLYLONG(handler,source_addr,nbytes,dest_addr,flags,numargs) \ GASNETI_TRACE_EVENT_VAL(A,COMMIT_REPLY_LONG,nbytes) #define GASNETI_TRACE_CANCEL_REQUESTMEDIUM(sd,flags) \ GASNETI_TRACE_EVENT(A,CANCEL_REQUEST_MEDIUM) #define GASNETI_TRACE_CANCEL_REPLYMEDIUM(sd,flags) \ GASNETI_TRACE_EVENT(A,CANCEL_REPLY_MEDIUM) #define GASNETI_TRACE_CANCEL_REQUESTLONG(sd,flags) \ GASNETI_TRACE_EVENT(A,CANCEL_REQUEST_LONG) #define GASNETI_TRACE_CANCEL_REPLYLONG(sd,flags) \ GASNETI_TRACE_EVENT(A,CANCEL_REPLY_LONG) #else #define GASNETI_TRACE_AMREQUESTSHORT(tm,dest,handler,flags,numargs) ((void)0) #define GASNETI_TRACE_AMREPLYSHORT(token,handler,flags,numargs) ((void)0) #define GASNETI_TRACE_AMREQUESTMEDIUM(tm,dest,handler,source_addr,nbytes,flags,numargs) ((void)0) #define GASNETI_TRACE_AMREPLYMEDIUM(token,handler,source_addr,nbytes,flags,numargs) ((void)0) #define GASNETI_TRACE_AMREQUESTLONG(tm,dest,handler,source_addr,nbytes,dest_addr,flags,numargs) ((void)0) #define GASNETI_TRACE_AMREPLYLONG(token,handler,source_addr,nbytes,dest_addr,flags,numargs) ((void)0) #define GASNETI_TRACE_PREP_REQUESTMEDIUM(tm,dest,cbuf,least_pl,most_pl,flags,numargs) ((void)0) #define GASNETI_TRACE_PREP_REPLYMEDIUM(token,cbuf,least_pl,most_pl,flags,numargs) ((void)0) #define GASNETI_TRACE_PREP_REQUESTLONG(tm,dest,cbuf,least_pl,most_pl,dest_addr,flags,numargs) ((void)0) #define GASNETI_TRACE_PREP_REPLYLONG(token,cbuf,least_pl,most_pl,dest_addr,flags,numargs) ((void)0) #define GASNETI_TRACE_PREP_RETURN(name,sd) ((void)0) #define GASNETI_TRACE_COMMIT_REQUESTMEDIUM(handler,source_addr,nbytes,flags,numargs) ((void)0) #define GASNETI_TRACE_COMMIT_REPLYMEDIUM(handler,source_addr,nbytes,flags,numargs) ((void)0) #define GASNETI_TRACE_COMMIT_REQUESTLONG(handler,source_addr,nbytes,dest_addr,flags,numargs) ((void)0) #define GASNETI_TRACE_COMMIT_REPLYLONG(handler,source_addr,nbytes,dest_addr,flags,numargs) ((void)0) #define GASNETI_TRACE_CANCEL_REQUESTMEDIUM(sd,flags) ((void)0) #define GASNETI_TRACE_CANCEL_REPLYMEDIUM(sd,flags) ((void)0) #define GASNETI_TRACE_CANCEL_REQUESTLONG(sd,flags) ((void)0) #define GASNETI_TRACE_CANCEL_REPLYLONG(sd,flags) ((void)0) #endif /* ------------------------------------------------------------------------------------ */ /* AM Handler tracing */ #if GASNETI_STATS_OR_TRACE #define _GASNETI_TRACE_GATHERHANDLERARGS(numargs, arghandle) \ char _tgha_argstr[256]; \ if (GASNETI_TRACE_ENABLED(A)) { \ char *_tgha_aptr = _tgha_argstr; \ size_t _tgha_aspace = sizeof(_tgha_argstr); \ *_tgha_aptr = 0; \ for (int _tgha_i=0;_tgha_i<(numargs);_tgha_i++) { \ /* here we assume args are stored in an array named by arghandle */ \ int _tgha_len = snprintf(_tgha_aptr,_tgha_aspace," 0x%08x", \ (int)((uint32_t*)(arghandle))[_tgha_i]); \ _tgha_aptr += _tgha_len; _tgha_aspace -= _tgha_len; \ } \ } #define _GASNETI_TRACE_HANDLER(name, info, timask) do { \ if ((timask) & GEX_TI_ENTRY) { \ const gex_AM_Entry_t * const _th_hentry = info.gex_entry; \ const void * const * _th_fnptr = (const void * const *)&(_th_hentry->gex_fnptr); \ const char *_th_hname = _th_hentry->gex_name ? _th_hentry->gex_name : "(none)"; \ /* TODO-EX: print symbolc flags when available */ \ GASNETI_TRACE_PRINTF(A,(#name": handler: name='%s' fnptr=%p flags=0x%x cdata=%p", \ _th_hname, *_th_fnptr, \ _th_hentry->gex_flags,_th_hentry->gex_cdata)); \ } \ } while(0) #define _GASNETI_TRACE_AMSHORT_HANDLER(name, handlerid, token, numargs, arghandle) do { \ _GASNETI_TRACE_GATHERHANDLERARGS(numargs, arghandle); \ _GASNETI_STAT_EVENT(A,name); \ gex_Token_Info_t _tah_info; \ gex_TI_t _tah_timask = gex_Token_Info(token, &_tah_info, GEX_TI_SRCRANK|GEX_TI_EP|GEX_TI_ENTRY);\ gex_Client_t _tah_client = _tah_info.gex_ep ? gex_EP_QueryClient(_tah_info.gex_ep) : NULL; \ const char *_tah_cname = _tah_client ? gex_Client_QueryName(_tah_client) : "N/A"; \ GASNETI_TRACE_PRINTF(A,(#name": client='%s' src=%i handler=%i args:%s", \ _tah_cname,(int)_tah_info.gex_srcrank,(int)(handlerid),_tgha_argstr)); \ _GASNETI_TRACE_HANDLER(name, _tah_info, _tah_timask); \ GASNETI_TRACE_PRINTF(C,(#name": token: %s", \ gasneti_formatdata((void*)&(token), sizeof(token)))); \ } while(0) #define _GASNETI_TRACE_AMMEDLONG_HANDLER(name, handlerid, token, addr, nbytes, numargs, arghandle) do { \ _GASNETI_TRACE_GATHERHANDLERARGS(numargs, arghandle); \ _GASNETI_STAT_EVENT(A,name); \ gex_Token_Info_t _tah_info; \ gex_TI_t _tah_timask = gex_Token_Info(token, &_tah_info, GEX_TI_SRCRANK|GEX_TI_EP|GEX_TI_ENTRY); \ gex_Client_t _tah_client = _tah_info.gex_ep ? gex_EP_QueryClient(_tah_info.gex_ep) : NULL; \ const char *_tah_cname = _tah_client ? gex_Client_QueryName(_tah_client) : "N/A"; \ GASNETI_TRACE_PRINTF(A,(#name": client='%s' src=%i handler=%i addr=" GASNETI_LADDRFMT \ " nbytes=%" PRIuSZ " args:%s", \ _tah_cname,(int)_tah_info.gex_srcrank,(int)(handlerid),GASNETI_LADDRSTR(addr), \ (size_t)nbytes,_tgha_argstr)); \ _GASNETI_TRACE_HANDLER(name, _tah_info, _tah_timask); \ GASNETI_TRACE_PRINTF(C,(#name": token: %s", \ gasneti_formatdata((void *)&(token), sizeof(token)))); \ GASNETI_TRACE_PRINTF(D,(#name": payload data: %s", gasneti_formatdata(addr,nbytes))); \ } while(0) #define GASNETI_TRACE_AMSHORT_REQHANDLER(handlerid, token, numargs, arghandle) \ _GASNETI_TRACE_AMSHORT_HANDLER(AMREQUEST_SHORT_HANDLER, handlerid, token, numargs, arghandle) #define GASNETI_TRACE_AMSHORT_REPHANDLER(handlerid, token, numargs, arghandle) \ _GASNETI_TRACE_AMSHORT_HANDLER(AMREPLY_SHORT_HANDLER, handlerid, token, numargs, arghandle) #define GASNETI_TRACE_AMMEDIUM_REQHANDLER(handlerid, token, addr, nbytes, numargs, arghandle) \ _GASNETI_TRACE_AMMEDLONG_HANDLER(AMREQUEST_MEDIUM_HANDLER, handlerid, token, addr, nbytes, numargs, arghandle) #define GASNETI_TRACE_AMMEDIUM_REPHANDLER(handlerid, token, addr, nbytes, numargs, arghandle) \ _GASNETI_TRACE_AMMEDLONG_HANDLER(AMREPLY_MEDIUM_HANDLER, handlerid, token, addr, nbytes, numargs, arghandle) #define GASNETI_TRACE_AMLONG_REQHANDLER(handlerid, token, addr, nbytes, numargs, arghandle) \ _GASNETI_TRACE_AMMEDLONG_HANDLER(AMREQUEST_LONG_HANDLER, handlerid, token, addr, nbytes, numargs, arghandle) #define GASNETI_TRACE_AMLONG_REPHANDLER(handlerid, token, addr, nbytes, numargs, arghandle) \ _GASNETI_TRACE_AMMEDLONG_HANDLER(AMREPLY_LONG_HANDLER, handlerid, token, addr, nbytes, numargs, arghandle) #else /* Note EMPTY triggers an icc optimizer bug (gasnet bug #1378) */ #define GASNETI_TRACE_AMSHORT_REQHANDLER(handlerid, token, numargs, arghandle) \ do {} while (0) #define GASNETI_TRACE_AMSHORT_REPHANDLER(handlerid, token, numargs, arghandle) \ do {} while (0) #define GASNETI_TRACE_AMMEDIUM_REQHANDLER(handlerid, token, addr, nbytes, numargs, arghandle) \ do {} while (0) #define GASNETI_TRACE_AMMEDIUM_REPHANDLER(handlerid, token, addr, nbytes, numargs, arghandle) \ do {} while (0) #define GASNETI_TRACE_AMLONG_REQHANDLER(handlerid, token, addr, nbytes, numargs, arghandle) \ do {} while (0) #define GASNETI_TRACE_AMLONG_REPHANDLER(handlerid, token, addr, nbytes, numargs, arghandle) \ do {} while (0) #endif /* ------------------------------------------------------------------------------------ */ /* Vector, Indexed & Strided tracing */ #if GASNETI_STATS_OR_TRACE #define _GASNETI_TRACE_PUTVGETV(name,type,tm,rank,dstcount,dstlist,srccount,srclist) do { \ if (GASNETI_TRACE_ENABLED(D)) { \ char *_tmp_str = (char *)gasneti_extern_malloc(gasneti_format_putvgetv_bufsz((dstcount),(srccount))); \ size_t _totalsz = gasneti_format_putvgetv(_tmp_str,(tm),(rank),(dstcount),(dstlist),(srccount),(srclist)); \ GASNETI_TRACE_EVENT_VAL(type,name,_totalsz); \ GASNETI_TRACE_PRINTF(D,(#name ": %s", _tmp_str)); \ gasneti_extern_free(_tmp_str); \ } else GASNETI_TRACE_EVENT_VAL(type,name, gasnete_memveclist_stats(dstcount,dstlist)._totalsz); \ } while (0) #define _GASNETI_TRACE_PUTIGETI(name,type,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen) do { \ if (GASNETI_TRACE_ENABLED(D)) { \ char *_tmp_str = (char *)gasneti_extern_malloc(gasneti_format_putigeti_bufsz((dstcount),(srccount))); \ size_t _totalsz = gasneti_format_putigeti(_tmp_str,(tm),(rank),(dstcount),(dstlist),(dstlen), \ (srccount),(srclist),(srclen)); \ GASNETI_TRACE_EVENT_VAL(type,name,_totalsz); \ GASNETI_TRACE_PRINTF(D,(#name ": %s", _tmp_str)); \ gasneti_extern_free(_tmp_str); \ } else GASNETI_TRACE_EVENT_VAL(type,name, (dstcount)*(dstlen)); \ } while (0) #define _GASNETI_TRACE_PUTSGETS(name,type,tm,rank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels) do { \ if (GASNETI_TRACE_ENABLED(D)) { \ char *_tmp_str = (char *)gasneti_extern_malloc(gasneti_format_putsgets_bufsz(stridelevels)); \ size_t _totalsz = gasneti_format_putsgets(_tmp_str,NULL,(tm),(rank),(dstaddr),(dststrides), \ (srcaddr),(srcstrides),(elemsz),(count),(stridelevels)); \ GASNETI_TRACE_EVENT_VAL(type,name,_totalsz); \ GASNETI_TRACE_PRINTF(D,(#name ": %s", _tmp_str)); \ gasneti_extern_free(_tmp_str); \ } else GASNETI_TRACE_EVENT_VAL(type,name, gasnete_strided_datasize(elemsz,count,stridelevels)); \ } while (0) #define GASNETI_TRACE_PUTV(name,tm,rank,dstcount,dstlist,srccount,srclist) \ _GASNETI_TRACE_PUTVGETV(name,P,tm,rank,dstcount,dstlist,srccount,srclist) #define GASNETI_TRACE_GETV(name,tm,rank,dstcount,dstlist,srccount,srclist) \ _GASNETI_TRACE_PUTVGETV(name,G,tm,rank,dstcount,dstlist,srccount,srclist) #define GASNETI_TRACE_PUTI(name,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen) \ _GASNETI_TRACE_PUTIGETI(name,P,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen) #define GASNETI_TRACE_GETI(name,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen) \ _GASNETI_TRACE_PUTIGETI(name,G,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen) #define GASNETI_TRACE_PUTS(name,tm,rank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels) \ _GASNETI_TRACE_PUTSGETS(name,P,tm,rank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels) #define GASNETI_TRACE_GETS(name,tm,rank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels) \ _GASNETI_TRACE_PUTSGETS(name,G,tm,rank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels) #else #define GASNETI_TRACE_PUTV(name,tm,rank,dstcount,dstlist,srccount,srclist) #define GASNETI_TRACE_GETV(name,tm,rank,dstcount,dstlist,srccount,srclist) #define GASNETI_TRACE_PUTI(name,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen) #define GASNETI_TRACE_GETI(name,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen) #define GASNETI_TRACE_PUTS(name,tm,rank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels) #define GASNETI_TRACE_GETS(name,tm,rank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels) #endif /* ------------------------------------------------------------------------------------ */ /* Internal implementation of statistical/tracing output */ typedef uint64_t gasneti_statctr_t; #define GASNETI_STATCTR_MIN ((gasneti_statctr_t)0) #define GASNETI_STATCTR_MAX ((gasneti_statctr_t)-1) #define GASNETI_TICKS_NOW_IFENABLED(type) \ ((GASNETI_STATS_ENABLED(type) || GASNETI_TRACE_ENABLED(type)) ? \ gasneti_ticks_now():(gasneti_tick_t)0) typedef struct { gasneti_statctr_t _count; gasneti_statctr_t _minval; gasneti_statctr_t _maxval; gasneti_statctr_t _sumval; } gasneti_stat_intval_t; typedef struct { gasneti_statctr_t _count; gasneti_tick_t _minval; gasneti_tick_t _maxval; gasneti_tick_t _sumval; } gasneti_stat_timeval_t; /* startup & cleanup called by GASNet */ extern void gasneti_trace_init(int *_argc, char ***_argv); extern void gasneti_trace_finish(void); extern FILE *gasneti_open_outputfile(const char *_filename, const char *_desc); /* defines all the types */ #define GASNETI_ALLTYPES "GPRSWXBLAIOCDNH" /* GASNETI_ALL_STATS lists all the statistics values we gather, in the format: (type,name,value_description) */ #define GASNETI_ALL_STATS(CNT,VAL,TIME) \ VAL(G, GET, sz) \ VAL(G, GET_BULK, sz) \ VAL(G, GET_NB, sz) \ VAL(G, GET_NB_BULK, sz) \ VAL(G, GET_NB_VAL, sz) \ VAL(G, GET_NBI, sz) \ VAL(G, GET_NBI_BULK, sz) \ VAL(G, GET_VAL, sz) \ \ VAL(G, GET_LOCAL, sz) \ VAL(G, GET_BULK_LOCAL, sz) \ VAL(G, GET_NB_LOCAL, sz) \ VAL(G, GET_NB_BULK_LOCAL, sz) \ VAL(G, GET_NB_VAL_LOCAL, sz) \ VAL(G, GET_NBI_LOCAL, sz) \ VAL(G, GET_NBI_BULK_LOCAL, sz) \ VAL(G, GET_VAL_LOCAL, sz) \ \ VAL(P, PUT, sz) \ VAL(P, PUT_BULK, sz) \ VAL(P, PUT_NB, sz) \ VAL(P, PUT_NB_BULK, sz) \ VAL(P, PUT_NB_VAL, sz) \ VAL(P, PUT_NBI, sz) \ VAL(P, PUT_NBI_BULK, sz) \ VAL(P, PUT_NBI_VAL, sz) \ VAL(P, PUT_VAL, sz) \ \ VAL(P, PUT_LOCAL, sz) \ VAL(P, PUT_BULK_LOCAL, sz) \ VAL(P, PUT_NB_LOCAL, sz) \ VAL(P, PUT_NB_BULK_LOCAL, sz) \ VAL(P, PUT_NB_VAL_LOCAL, sz) \ VAL(P, PUT_NBI_LOCAL, sz) \ VAL(P, PUT_NBI_BULK_LOCAL, sz) \ VAL(P, PUT_NBI_VAL_LOCAL, sz) \ VAL(P, PUT_VAL_LOCAL, sz) \ \ VAL(G, GETV_BULK, sz) \ VAL(G, GETV_NB_BULK, sz) \ VAL(G, GETV_NBI_BULK, sz) \ VAL(G, GETI_BULK, sz) \ VAL(G, GETI_NB_BULK, sz) \ VAL(G, GETI_NBI_BULK, sz) \ VAL(G, GETS_BULK, sz) \ VAL(G, GETS_NB_BULK, sz) \ VAL(G, GETS_NBI_BULK, sz) \ \ VAL(P, PUTV_BULK, sz) \ VAL(P, PUTV_NB_BULK, sz) \ VAL(P, PUTV_NBI_BULK, sz) \ VAL(P, PUTI_BULK, sz) \ VAL(P, PUTI_NB_BULK, sz) \ VAL(P, PUTI_NBI_BULK, sz) \ VAL(P, PUTS_BULK, sz) \ VAL(P, PUTS_NB_BULK, sz) \ VAL(P, PUTS_NBI_BULK, sz) \ \ /* Remote Atomics performed via GASNet Tools */ \ CNT(R, RATOMIC_NB_I32_CPU, cnt) \ CNT(R, RATOMIC_NB_U32_CPU, cnt) \ CNT(R, RATOMIC_NB_I64_CPU, cnt) \ CNT(R, RATOMIC_NB_U64_CPU, cnt) \ CNT(R, RATOMIC_NB_FLT_CPU, cnt) \ CNT(R, RATOMIC_NB_DBL_CPU, cnt) \ CNT(R, RATOMIC_NBI_I32_CPU, cnt) \ CNT(R, RATOMIC_NBI_U32_CPU, cnt) \ CNT(R, RATOMIC_NBI_I64_CPU, cnt) \ CNT(R, RATOMIC_NBI_U64_CPU, cnt) \ CNT(R, RATOMIC_NBI_FLT_CPU, cnt) \ CNT(R, RATOMIC_NBI_DBL_CPU, cnt) \ \ /* Remote Atomics performed via AM */ \ CNT(R, RATOMIC_NB_I32_AM, cnt) \ CNT(R, RATOMIC_NB_U32_AM, cnt) \ CNT(R, RATOMIC_NB_I64_AM, cnt) \ CNT(R, RATOMIC_NB_U64_AM, cnt) \ CNT(R, RATOMIC_NB_FLT_AM, cnt) \ CNT(R, RATOMIC_NB_DBL_AM, cnt) \ CNT(R, RATOMIC_NBI_I32_AM, cnt) \ CNT(R, RATOMIC_NBI_U32_AM, cnt) \ CNT(R, RATOMIC_NBI_I64_AM, cnt) \ CNT(R, RATOMIC_NBI_U64_AM, cnt) \ CNT(R, RATOMIC_NBI_FLT_AM, cnt) \ CNT(R, RATOMIC_NBI_DBL_AM, cnt) \ \ /* Remote Atomics performed via conduit */ \ CNT(R, RATOMIC_NB_I32_NIC, cnt) \ CNT(R, RATOMIC_NB_U32_NIC, cnt) \ CNT(R, RATOMIC_NB_I64_NIC, cnt) \ CNT(R, RATOMIC_NB_U64_NIC, cnt) \ CNT(R, RATOMIC_NB_FLT_NIC, cnt) \ CNT(R, RATOMIC_NB_DBL_NIC, cnt) \ CNT(R, RATOMIC_NBI_I32_NIC, cnt) \ CNT(R, RATOMIC_NBI_U32_NIC, cnt) \ CNT(R, RATOMIC_NBI_I64_NIC, cnt) \ CNT(R, RATOMIC_NBI_U64_NIC, cnt) \ CNT(R, RATOMIC_NBI_FLT_NIC, cnt) \ CNT(R, RATOMIC_NBI_DBL_NIC, cnt) \ \ /* TODO-EX: "SYNCNB" name is out-of-date */ \ VAL(S, TEST_SYNCNB, success) \ VAL(S, TEST_SYNCNB_ALL, success) \ VAL(S, TEST_SYNCNB_SOME, success) \ TIME(S, WAIT_SYNCNB, waittime) \ TIME(S, WAIT_SYNCNB_ALL, waittime) \ TIME(S, WAIT_SYNCNB_SOME, waittime) \ \ VAL(S, TEST_SYNCNBI_ALL, success) \ VAL(S, TEST_SYNCNBI_GETS, success) \ VAL(S, TEST_SYNCNBI_PUTS, success) \ VAL(S, TEST_SYNCNBI, success) \ TIME(S, WAIT_SYNCNBI_ALL, waittime) \ TIME(S, WAIT_SYNCNBI_GETS, waittime) \ TIME(S, WAIT_SYNCNBI_PUTS, waittime) \ TIME(S, WAIT_SYNCNBI, waittime) \ \ VAL(I, END_NBI_ACCESSREGION, numops) \ \ CNT(B, BARRIER_NOTIFY, cnt) \ TIME(B, BARRIER_NOTIFYWAIT, notify-wait interval) \ TIME(B, BARRIER_ASYNC_COMPLETION, notify-wait interval) \ TIME(B, BARRIER_WAIT, waittime) \ TIME(B, BARRIER, single-phase barrier time) \ VAL(B, BARRIER_TRY, success) \ \ CNT(B, COLL_BARRIER, cnt) \ CNT(B, COLL_BARRIER_NB, cnt) \ \ TIME(L, HSL_LOCK, waittime) \ TIME(L, HSL_UNLOCK, holdtime) \ VAL(L, HSL_TRYLOCK, success) \ \ CNT(A, AMREQUEST_SHORT, cnt) \ VAL(A, AMREQUEST_MEDIUM, sz) \ VAL(A, AMREQUEST_LONG, sz) \ CNT(A, AMREPLY_SHORT, cnt) \ VAL(A, AMREPLY_MEDIUM, sz) \ VAL(A, AMREPLY_LONG, sz) \ \ VAL(A, PREP_REQUEST_MEDIUM, sz) \ VAL(A, PREP_REQUEST_LONG, sz) \ VAL(A, PREP_REPLY_MEDIUM, sz) \ VAL(A, PREP_REPLY_LONG, sz) \ VAL(A, COMMIT_REQUEST_MEDIUM, sz) \ VAL(A, COMMIT_REQUEST_LONG, sz) \ VAL(A, COMMIT_REPLY_MEDIUM, sz) \ VAL(A, COMMIT_REPLY_LONG, sz) \ CNT(A, CANCEL_REQUEST_MEDIUM, cnt) \ CNT(A, CANCEL_REQUEST_LONG, cnt) \ CNT(A, CANCEL_REPLY_MEDIUM, cnt) \ CNT(A, CANCEL_REPLY_LONG, cnt) \ \ CNT(A, AMREQUEST_SHORT_HANDLER, cnt) \ CNT(A, AMREQUEST_MEDIUM_HANDLER, cnt) \ CNT(A, AMREQUEST_LONG_HANDLER, cnt) \ CNT(A, AMREPLY_SHORT_HANDLER, cnt) \ CNT(A, AMREPLY_MEDIUM_HANDLER, cnt) \ CNT(A, AMREPLY_LONG_HANDLER, cnt) \ \ CNT(X, AMPOLL, cnt) \ \ VAL(I, GASNET_MALLOC, sz) \ VAL(I, GASNET_FREE, sz) \ \ GASNETC_CONDUIT_STATS(CNT,VAL,TIME) \ GASNETE_CONDUIT_STATS(CNT,VAL,TIME) /* GASNETC_CONDUIT_STATS and GASNETE_CONDUIT_STATS provide a way for conduits to declare their own statistics (which should be given type C or I) */ #ifndef GASNETC_CONDUIT_STATS #define GASNETC_CONDUIT_STATS(CNT,VAL,TIME) #endif #ifndef GASNETE_CONDUIT_STATS #define GASNETE_CONDUIT_STATS(CNT,VAL,TIME) #endif /* these are legal even without STATS/TRACE */ extern size_t gasneti_format_memveclist_bufsz(size_t _count); extern gasneti_memveclist_stats_t gasneti_format_memveclist(char *_buf, size_t _count, gex_Memvec_t const *_list); extern size_t gasneti_format_putvgetv_bufsz(size_t _dstcount, size_t _srccount); extern size_t gasneti_format_putvgetv(char *_buf, gex_TM_t _tm, gex_Rank_t _rank, size_t _dstcount, gex_Memvec_t const _dstlist[], size_t _srccount, gex_Memvec_t const _srclist[]); extern size_t gasneti_format_addrlist_bufsz(size_t _count); extern gasneti_addrlist_stats_t gasneti_format_addrlist(char *_buf, size_t _count, void * const *_list, size_t _len); extern size_t gasneti_format_putigeti_bufsz(size_t _dstcount, size_t _srccount); extern size_t gasneti_format_putigeti(char *_buf, gex_TM_t _tm, gex_Rank_t _rank, size_t _dstcount, void * const _dstlist[], size_t _dstlen, size_t _srccount, void * const _srclist[], size_t _srclen); extern size_t gasneti_format_strides_bufsz(size_t _count); extern void gasneti_format_strides(char *_buf, size_t _count, const ptrdiff_t *_list); extern size_t gasneti_format_putsgets_bufsz(size_t _stridelevels); extern size_t gasneti_format_putsgets(char *_buf, void *_pstats, gex_TM_t _tm, gex_Rank_t _rank, void *_dstaddr, const ptrdiff_t _dststrides[], void *_srcaddr, const ptrdiff_t _srcstrides[], size_t _elemsz, const size_t _count[], size_t _stridelevels); extern const char *gasneti_formattm(gex_TM_t _tm); extern const char *gasneti_formatmk(gex_MK_t _mk); // Prints a *set* of values to a caller-provided buffer. // Call with NULL buffer returns required length. extern size_t gasneti_format_dt(char *_buf, gex_DT_t _dt); extern size_t gasneti_format_op(char *_buf, gex_OP_t _op); extern size_t gasneti_format_ti(char *_buf, gex_TI_t _ti); extern size_t gasneti_format_flags_amreg(char *_buf, gex_Flags_t _flags); // Magic number trace formatting - available even without STATS/TRACE #define GASNETI_MAX_MAGICSZ 29 // "0x" + 16 hex digits + "(" + 8 chars + ")\0" extern void gasneti_format_magic(char *_buf, uint64_t _magic); GASNETI_FORMAT_PRINTF(gasneti_dynsprintf,1,2, extern char *gasneti_dynsprintf(const char *_format,...)); #if GASNETI_STATS_OR_TRACE #define _GASNETI_BUILD_ENUM(type,name,desc) GASNETI_STAT_##name, typedef enum { GASNETI_ALL_STATS(_GASNETI_BUILD_ENUM, _GASNETI_BUILD_ENUM, _GASNETI_BUILD_ENUM) GASNETI_STAT_COUNT } gasneti_statidx_t; #undef _GASNETI_BUILD_ENUM typedef struct { const char * const _type; const char * const _name; const char * const _desc; } gasneti_statinfo_t; extern gasneti_statinfo_t gasneti_stats[]; extern FILE *gasneti_tracefile; extern FILE *gasneti_statsfile; extern char *gasneti_formatdata(void *_p, size_t _nbytes); extern char *gasneti_format_eploc(const gex_EP_Location_t *_members, size_t _nmembers); extern void gasneti_trace_output(const char *_type, const char *_msg, int _traceheader); extern void gasneti_stats_output(const char *_type, const char *_msg, int _traceheader); extern char gasneti_tracetypes[]; extern char gasneti_statstypes[]; extern char gasneti_trace_maskstr[]; extern char gasneti_stats_maskstr[]; extern void gasneti_trace_updatemask(const char *_newmask, char *_maskstr, char *_types); extern int gasneti_trace_suppresslocal; #endif #if GASNET_TRACE #define GASNETI_TRACE_ENABLED(type) (gasneti_tracetypes[(int)*(char*)#type]) #define GASNETI_TRACE_GETMASK() ((const char *)gasneti_trace_maskstr) #define GASNETI_TRACE_SETMASK(mask) gasneti_trace_updatemask(mask, gasneti_trace_maskstr, gasneti_tracetypes) #define GASNETI_TRACE_GET_TRACELOCAL() (!gasneti_trace_suppresslocal) #define GASNETI_TRACE_SET_TRACELOCAL(newval) do { \ int _val = (newval); \ GASNETI_TRACE_PRINTF(I,("%s GASNET_TRACELOCAL",(_val?"Enabling":"Disabling"))); \ gasneti_trace_suppresslocal = !_val; \ } while (0) #define GASNETI_MAYBE_TRACEFILE gasneti_tracefile #else #define GASNETI_TRACE_ENABLED(type) 0 #define GASNETI_MAYBE_TRACEFILE ((FILE *)NULL) #endif #if GASNET_STATS #define GASNETI_STATS_ENABLED(type) (gasneti_statstypes[(int)*(char*)#type]) #define GASNETI_STATS_GETMASK() ((const char *)gasneti_stats_maskstr) #define GASNETI_STATS_SETMASK(mask) gasneti_trace_updatemask(mask, gasneti_stats_maskstr, gasneti_statstypes) #else #define GASNETI_STATS_ENABLED(type) 0 #endif #if GASNET_TRACE #define _GASNETI_TRACE_EVENT(type, name) \ GASNETI_TRACE_PRINTF(type, ("%s", #name)) #define _GASNETI_TRACE_EVENT_VAL(type, name, val) \ GASNETI_TRACE_PRINTF(type, ("%s: %s = %6" PRIu64, \ #name, gasneti_stats[(int)GASNETI_STAT_##name]._desc, (uint64_t)val)) #define _GASNETI_TRACE_EVENT_TIME(type, name, time) \ GASNETI_TRACE_PRINTF(type, ("%s: %s = %6.3fus", \ #name, gasneti_stats[(int)GASNETI_STAT_##name]._desc, \ gasneti_ticks_to_ns(time)/1000.0)) #else #define _GASNETI_TRACE_EVENT(type, name) ((void)0) #define _GASNETI_TRACE_EVENT_VAL(type, name, val) ((void)0) #define _GASNETI_TRACE_EVENT_TIME(type, name, time) ((void)0) #endif #if GASNET_STATS #define _GASNETI_DECL_CTR(type,name,desc) \ extern gasneti_statctr_t gasneti_stat_ctr_##name; #define _GASNETI_DECL_INTVAL(type,name,desc) \ extern gasneti_stat_intval_t gasneti_stat_intval_##name; #define _GASNETI_DECL_TIMEVAL(type,name,desc) \ extern gasneti_stat_timeval_t gasneti_stat_timeval_##name; GASNETI_ALL_STATS(_GASNETI_DECL_CTR, _GASNETI_DECL_INTVAL, _GASNETI_DECL_TIMEVAL) #undef _GASNETI_DECL_CTR #undef _GASNETI_DECL_INTVAL #undef _GASNETI_DECL_TIMEVAL extern void gasneti_stat_count_accumulate(gasneti_statctr_t *_pctr); extern void gasneti_stat_intval_accumulate(gasneti_stat_intval_t *_pintval, gasneti_statctr_t _val); extern void gasneti_stat_timeval_accumulate(gasneti_stat_timeval_t *_pintval, gasneti_tick_t _val); #define _GASNETI_STAT_EVENT(type, name) do { \ if (GASNETI_STATS_ENABLED(type)) \ gasneti_stat_count_accumulate(&gasneti_stat_ctr_##name); \ } while (0) #define _GASNETI_STAT_EVENT_VAL(type, name, val) do { \ if (GASNETI_STATS_ENABLED(type)) \ gasneti_stat_intval_accumulate(&gasneti_stat_intval_##name,(gasneti_statctr_t)val);\ } while (0) #define _GASNETI_STAT_EVENT_TIME(type, name, time) do { \ if (GASNETI_STATS_ENABLED(type)) \ gasneti_stat_timeval_accumulate(&gasneti_stat_timeval_##name,(gasneti_tick_t)time);\ } while (0) #else #define _GASNETI_STAT_EVENT(type, name) ((void)0) #define _GASNETI_STAT_EVENT_VAL(type, name, val) ((void)0) #define _GASNETI_STAT_EVENT_TIME(type, name, time) ((void)0) #endif #define GASNETI_STAT_EVENT _GASNETI_STAT_EVENT #define GASNETI_STAT_EVENT_VAL _GASNETI_STAT_EVENT_VAL #define GASNETI_STAT_EVENT_TIME _GASNETI_STAT_EVENT_TIME /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/gasnet_am.h0000664000175000017500000020254515142313673015541 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_am.h $ * Description: GASNet header for conduit-independent code for Active Messages * Copyright 2002, Dan Bonachea * Copyright 2018, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _GASNET_AM_H #define _GASNET_AM_H /* ------------------------------------------------------------------------------------ */ /* common error-checking code for AM request/reply entry points */ // TODO-EX: GASNETI_CHECK_ERRR should *not* be returning the error code - need error handling callback instead #define GASNETI_CHECK_LEGACY_REQUEST(tm,flags) _GASNETI_CHECK_LEGACY("AMRequest",tm,flags) #define GASNETI_COMMON_AMREQUESTSHORT(tm,rank,handler,flags,numargs) do { \ GASNETI_CHECKATTACH(); \ GASNETI_CHECK_LEGACY_REQUEST(tm,flags); \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_CLIENT)); \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_ALLOC)); \ gasneti_assert_int(numargs ,>=, 0); \ gasneti_assert_int(numargs ,<=, gex_AM_MaxArgs()); \ GASNETI_TRACE_AMREQUESTSHORT(tm,rank,handler,flags,numargs); \ GASNETI_CHECK_INJECT(); \ GASNETI_CHECK_ERRR((rank >= gasneti_nodes),BAD_ARG,"node index too high"); \ } while (0) #define GASNETI_COMMON_AMREQUESTMEDIUM(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs) do { \ GASNETI_CHECKATTACH(); \ GASNETI_CHECK_LEGACY_REQUEST(tm,flags); \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_CLIENT)); \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_ALLOC)); \ gasneti_assert_int(numargs ,>=, 0); \ gasneti_assert_int(numargs ,<=, gex_AM_MaxArgs()); \ GASNETI_TRACE_AMREQUESTMEDIUM(tm,rank,handler,source_addr,nbytes,flags,numargs); \ GASNETI_CHECK_INJECT(); \ GASNETI_CHECK_ERRR((rank >= gasneti_nodes),BAD_ARG,"node index too high"); \ GASNETI_CHECK_ERRR((nbytes > gex_AM_MaxRequestMedium(tm,rank,lc_opt,flags,numargs)),\ BAD_ARG,"nbytes too large"); \ GASNETI_CHECK_ERRR((lc_opt == NULL),BAD_ARG,"lc_opt=NULL is invalid"); \ GASNETI_CHECK_ERRR((lc_opt == GEX_EVENT_DEFER),BAD_ARG,"EVENT_DEFER is invalid for Requests"); \ } while (0) #define GASNETI_COMMON_AMREQUESTLONG(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs) do { \ GASNETI_CHECKATTACH(); \ GASNETI_CHECK_LEGACY_REQUEST(tm,flags); \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_CLIENT)); \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_ALLOC)); \ gasneti_assert_int(numargs ,>=, 0); \ gasneti_assert_int(numargs ,<=, gex_AM_MaxArgs()); \ GASNETI_TRACE_AMREQUESTLONG(tm,rank,handler,source_addr,nbytes,dest_addr,flags,numargs); \ GASNETI_CHECK_INJECT(); \ GASNETI_CHECK_ERRR((rank >= gasneti_nodes),BAD_ARG,"node index too high"); \ GASNETI_CHECK_ERRR((nbytes > gex_AM_MaxRequestLong(tm,rank,lc_opt,flags,numargs)), \ BAD_ARG,"nbytes too large"); \ GASNETI_CHECK_ERRR((lc_opt == NULL),BAD_ARG,"lc_opt=NULL is invalid"); \ GASNETI_CHECK_ERRR((lc_opt == GEX_EVENT_DEFER),BAD_ARG,"EVENT_DEFER is invalid for Requests"); \ GASNETI_CHECK_ERRR(nbytes /* 0-byte case must pass dest_addr unchecked */ && \ !gasneti_in_segment(tm,rank,dest_addr,nbytes), \ BAD_ARG,"destination address out of segment range"); \ } while (0) #define GASNETI_COMMON_AMREPLYSHORT(token,handler,flags,numargs) do { \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_CLIENT)); \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_ALLOC)); \ gasneti_assert_int(numargs ,>=, 0); \ gasneti_assert_int(numargs ,<=, gex_AM_MaxArgs()); \ GASNETI_TRACE_AMREPLYSHORT(token,handler,flags,numargs); \ GASNETI_CHECK_INJECT_REPLY(); \ } while (0) #define GASNETI_COMMON_AMREPLYMEDIUM(token,handler,source_addr,nbytes,lc_opt,flags,numargs) do { \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_CLIENT)); \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_ALLOC)); \ gasneti_assert_int(numargs ,>=, 0); \ gasneti_assert_int(numargs ,<=, gex_AM_MaxArgs()); \ GASNETI_TRACE_AMREPLYMEDIUM(token,handler,source_addr,nbytes,flags,numargs); \ GASNETI_CHECK_INJECT_REPLY(); \ GASNETI_CHECK_ERRR((nbytes > gasnetc_Token_MaxReplyMedium(token,lc_opt,flags,numargs)),\ BAD_ARG,"nbytes too large"); \ GASNETI_CHECK_ERRR((lc_opt == NULL),BAD_ARG,"lc_opt=NULL is invalid"); \ GASNETI_CHECK_ERRR((lc_opt == GEX_EVENT_DEFER),BAD_ARG,"EVENT_DEFER is invalid for Replies"); \ GASNETI_CHECK_ERRR((lc_opt == GEX_EVENT_GROUP),BAD_ARG,"EVENT_GROUP is invalid for Replies"); \ } while (0) #define GASNETI_COMMON_AMREPLYLONG(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs) do { \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_CLIENT)); \ gasneti_assert(! (flags & GEX_FLAG_AM_PREPARE_LEAST_ALLOC)); \ gasneti_assert_int(numargs ,>=, 0); \ gasneti_assert_int(numargs ,<=, gex_AM_MaxArgs()); \ GASNETI_TRACE_AMREPLYLONG(token,handler,source_addr,nbytes,dest_addr,flags,numargs); \ GASNETI_CHECK_INJECT_REPLY(); \ GASNETI_CHECK_ERRR((nbytes > gasnetc_Token_MaxReplyLong(token,lc_opt,flags,numargs)), \ BAD_ARG,"nbytes too large"); \ GASNETI_CHECK_ERRR((lc_opt == NULL),BAD_ARG,"lc_opt=NULL is invalid"); \ GASNETI_CHECK_ERRR((lc_opt == GEX_EVENT_DEFER),BAD_ARG,"EVENT_DEFER is invalid for Replies"); \ GASNETI_CHECK_ERRR((lc_opt == GEX_EVENT_GROUP),BAD_ARG,"EVENT_GROUP is invalid for Replies"); \ /* TODO: AM on non-primordial EP cannot use (THUNK_TM,srcrank) to find remote segment*/ \ gex_Token_Info_t _crl_info; \ gex_Token_Info(token, &_crl_info, GEX_TI_SRCRANK); \ GASNETI_CHECK_ERRR(nbytes /* 0-byte case must pass dest_addr unchecked */ && \ !gasneti_in_segment(gasneti_THUNK_TM,_crl_info.gex_srcrank, \ dest_addr,nbytes), \ BAD_ARG,"destination address out of segment range"); \ } while (0) /* ------------------------------------------------------------------------------------ */ /* utility macros for dispatching AM handlers */ #if GASNET_DEBUG // Note: use of GASNETI_MYTHREAD_GET_OR_LOOKUP is necessary here // to ensure we do not require FARG/POST'd context in callers. #define GASNETI_HANDLER_ENTER(isReq) \ do { \ gasneti_threaddata_t * const mythread = \ GASNETI_MYTHREAD_GET_OR_LOOKUP; \ if (mythread) { /* some conduits use AMs very early */ \ int *cntr_p = isReq ? &mythread->request_handler_active \ : &mythread->reply_handler_active; \ gasneti_assert_int(*cntr_p ,==, 0); /* No recursion */ \ *cntr_p = 1; \ } \ } while (0) #define GASNETI_HANDLER_LEAVE(isReq) \ do { \ gasneti_threaddata_t * const mythread = \ GASNETI_MYTHREAD_GET_OR_LOOKUP; \ if (mythread) { /* some conduits use AMs very early */ \ int *cntr_p = isReq ? &mythread->request_handler_active \ : &mythread->reply_handler_active; \ gasneti_assert_int(*cntr_p ,==, 1); \ *cntr_p = 0; \ } \ } while (0) #else #define GASNETI_HANDLER_ENTER(isReq) ((void)0) #define GASNETI_HANDLER_LEAVE(isReq) ((void)0) #endif #define _gasneti_harg(a,b,c) ,gex_AM_Arg_t #define _gasneti_harg_pass(Nm1,N,Np1) ,_pArgs[Nm1] #define _gasneti_Short_handlerfn_typedefN(Nm1,N,Np1) \ typedef void (*gasneti_Short_handlerfn_type_##N)(gex_Token_t GASNETI_META_DES##N(GASNETI_META_EMPTY,_gasneti_harg)); GASNETI_META_ASC16(_gasneti_Short_handlerfn_typedefN,_gasneti_Short_handlerfn_typedefN) #define _gasneti_Short_RunCaseN(Nm1,N,Np1) \ case N: ((gasneti_Short_handlerfn_type_##N)_phandlerfn)(_token GASNETI_META_ASC##N(GASNETI_META_EMPTY,_gasneti_harg_pass)); break; #define GASNETI_RUN_HANDLER_SHORT(isReq, hid, phandlerfn, token, pArgs, numargs) do { \ gex_AM_Fn_t const _phandlerfn = (gex_AM_Fn_t)(phandlerfn); \ gex_Token_t const _token = (token); \ gex_AM_Arg_t const * const _pArgs = (gex_AM_Arg_t *)(pArgs); \ int const _numargs = (numargs); \ if (isReq) GASNETI_TRACE_AMSHORT_REQHANDLER(hid, _token, _numargs, _pArgs); \ else GASNETI_TRACE_AMSHORT_REPHANDLER(hid, _token, _numargs, _pArgs); \ gasneti_assert(_phandlerfn); gasneti_assert(_token); \ gasneti_assert(_pArgs || !_numargs); \ GASNETI_HANDLER_ENTER(isReq); \ switch (_numargs) { \ GASNETI_META_DES16(_gasneti_Short_RunCaseN,_gasneti_Short_RunCaseN) \ default: gasneti_unreachable_error(("Invalid numargs=%i",_numargs)); \ } \ GASNETI_HANDLER_LEAVE(isReq); \ GASNETI_TRACE_PRINTF(A,("AM%s_SHORT_HANDLER: handler execution complete", (isReq?"REQUEST":"REPLY"))); \ } while (0) #define _gasneti_MedLong_handlerfn_typedefN(Nm1,N,Np1) \ typedef void (*gasneti_MedLong_handlerfn_type_##N)(gex_Token_t, void *, size_t GASNETI_META_DES##N(GASNETI_META_EMPTY,_gasneti_harg)); GASNETI_META_ASC16(_gasneti_MedLong_handlerfn_typedefN,_gasneti_MedLong_handlerfn_typedefN) #define _gasneti_MedLong_RunCaseN(Nm1,N,Np1) \ case N: ((gasneti_MedLong_handlerfn_type_##N)_phandlerfn)(_token, _pData, _datalen GASNETI_META_ASC##N(GASNETI_META_EMPTY,_gasneti_harg_pass)); break; #define _GASNETI_RUN_HANDLER_MEDLONG(MEDLONG, isReq, hid, phandlerfn, token, pArgs, numargs, pData, datalen, extrachecks) do { \ gex_AM_Fn_t const _phandlerfn = (gex_AM_Fn_t)(phandlerfn); \ gex_Token_t const _token = (token); \ gex_AM_Arg_t const * const _pArgs = (gex_AM_Arg_t *)(pArgs); \ int const _numargs = (numargs); \ void * const _pData = (void *)(pData); \ size_t const _datalen = (datalen); \ if (isReq) GASNETI_TRACE_AM##MEDLONG##_REQHANDLER(hid, _token, _pData, _datalen, _numargs, _pArgs); \ else GASNETI_TRACE_AM##MEDLONG##_REPHANDLER(hid, _token, _pData, _datalen, _numargs, _pArgs); \ gasneti_assert(_phandlerfn); gasneti_assert(_token); \ gasneti_assert(_pArgs || !_numargs); \ gasneti_assert(_pData || !_datalen); \ extrachecks; \ GASNETI_HANDLER_ENTER(isReq); \ switch (_numargs) { \ GASNETI_META_DES16(_gasneti_MedLong_RunCaseN,_gasneti_MedLong_RunCaseN) \ default: gasneti_unreachable_error(("Invalid numargs=%i",_numargs)); \ } \ GASNETI_HANDLER_LEAVE(isReq); \ } while (0) // by default, we guarantee double-word alignment for data payload of medium xfers #ifndef GASNETI_MEDBUF_ALIGNMENT #define GASNETI_MEDBUF_ALIGNMENT 8 #endif #define GASNETI_RUN_HANDLER_MEDIUM(isReq, hid, phandlerfn, token, pArgs, numargs, pData, datalen) do { \ _GASNETI_RUN_HANDLER_MEDLONG(MEDIUM, isReq, hid, phandlerfn, token, pArgs, numargs, pData, datalen, \ if (_datalen) gasneti_assert_uint(((uintptr_t)_pData) % GASNETI_MEDBUF_ALIGNMENT ,==, 0)); \ GASNETI_TRACE_PRINTF(A,("AM%s_MEDIUM_HANDLER: handler execution complete", (isReq?"REQUEST":"REPLY"))); \ } while (0) #define GASNETI_RUN_HANDLER_LONG(isReq, hid, phandlerfn, token, pArgs, numargs, pData, datalen) do { \ _GASNETI_RUN_HANDLER_MEDLONG(LONG, isReq, hid, phandlerfn, token, pArgs, numargs, pData, datalen, \ ((void)0)); \ GASNETI_TRACE_PRINTF(A,("AM%s_LONG_HANDLER: handler execution complete", (isReq?"REQUEST":"REPLY"))); \ } while (0) /* ------------------------------------------------------------------------------------ */ /* AM handler registration and management */ typedef enum { gasneti_Short=0, gasneti_Medium=1, gasneti_Long=2 } gasneti_category_t; /* default AM handler for unregistered entries - prints a fatal error */ GASNETI_COLD extern void gasneti_defaultAMHandler(gex_Token_t token); extern int gasneti_amtbl_init(gasneti_EP_t i_ep); extern int gasneti_amregister( gasneti_EP_t i_ep, gex_AM_Entry_t *input, int numentries, int lowlimit, int highlimit, int dontcare, int *numregistered); extern int gasneti_amregister_client(gasneti_EP_t i_ep, gex_AM_Entry_t *input, size_t numentries); extern int gasneti_amregister_legacy(gasneti_EP_t i_ep, gasnet_handlerentry_t *input, int numentries); #if GASNET_DEBUG extern void gasneti_amtbl_check(const gex_AM_Entry_t *entry, int nargs, gasneti_category_t category, int isReq); #else #define gasneti_amtbl_check(entry, nargs, category, isReq) ((void)0) #endif // AM "catch all" for defaultAMHandler and similar #define GASNETI_FLAG_AM_ANY \ ( GEX_FLAG_AM_SHORT|GEX_FLAG_AM_MEDIUM|GEX_FLAG_AM_LONG | \ GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_REPLY ) /* ------------------------------------------------------------------------------------ */ /* common logic for gex_Token_Info() */ // OR of all the required bits #define GASNETI_TI_REQUIRED (GEX_TI_SRCRANK | GEX_TI_EP) #if GASNET_DEBUG extern gex_TI_t gasneti_token_info_return(gex_TI_t result, gex_Token_Info_t * info, gex_TI_t mask); #define GASNETI_TOKEN_INFO_RETURN gasneti_token_info_return #else #define GASNETI_TOKEN_INFO_RETURN(result, info, mask) (result) #endif /* ------------------------------------------------------------------------------------ */ // GASNETC_GET_HANDLER provides a conduit with the means to control how the // neighborhood AM support accesses the AM handler table. #ifndef GASNETC_GET_HANDLER /* Assumes conduit has gasnetc_handler[] as in template-conduit */ // TODO-EX: gasnetc_handler to be replaced w/ per-endpoint data when defined #define gasnetc_get_hentry(_ep,_index) (&gasnetc_handler[(_index)]) #define gasnetc_get_handler(_ep,_index,_field) (gasnetc_get_hentry((_ep),(_index))->gex_##_field) #endif /* ------------------------------------------------------------------------------------ */ // Management of per-thread MaxMedium-sized buffers, one each for Request and Reply. // These are used for "loopback" (same process) AM Mediums. // However, they are also useful for NPAM (so long as Commit provides synchronous LC). #include /* for gasnetc_handler[] */ #ifndef gasneti_alloc_perthread_medium_buffer // allows conduit-specifc overrides extern void gasneti_medium_buffer_cleanup_threaddata(void *buf); GASNETI_INLINE(gasneti_alloc_perthread_medium_buffer) void *gasneti_alloc_perthread_medium_buffer(int isReq GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; if_pf (! mythread->requestBuf) { // Allocate both buffers, ensuring GASNETI_MEDBUF_ALIGNMENT (dflt 8-byte) alignment of each size_t padded_max_med = GASNETI_ALIGNUP(GASNETC_MAX_MEDIUM_NBRHD, GASNETI_MEDBUF_ALIGNMENT); size_t sz = padded_max_med + GASNETC_MAX_MEDIUM_NBRHD; uint8_t *buf = gasneti_malloc_aligned(GASNETI_MEDBUF_ALIGNMENT, sz); gasneti_leak_aligned(buf); mythread->requestBuf = buf; mythread->replyBuf = buf + padded_max_med; gasnete_register_threadcleanup(gasneti_medium_buffer_cleanup_threaddata, buf); } #if GASNET_DEBUG if (isReq) { gasneti_assert(! mythread->requestBuf_live); mythread->requestBuf_live = 1; } else { gasneti_assert(! mythread->replyBuf_live); mythread->replyBuf_live = 1; } #endif return isReq ? mythread->requestBuf : mythread->replyBuf; } #if GASNET_DEBUG static void gasneti_free_perthread_medium_buffer(void *buf, int isReq GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; if (isReq) { gasneti_assert(buf == mythread->requestBuf); gasneti_assert(mythread->requestBuf_live); mythread->requestBuf_live = 0; } else { gasneti_assert(buf == mythread->replyBuf); gasneti_assert(mythread->replyBuf_live); mythread->replyBuf_live = 0; } } #else #define gasneti_free_perthread_medium_buffer(buf, isReq_and_TI) ((void)0) #endif #endif /* ------------------------------------------------------------------------------------ */ /* common logic for Negotiated Payload AMs */ // Common argument processing, debug checks and trace/stats #if GASNET_DEBUG extern void gasneti_init_sd_poison(gasneti_AM_SrcDesc_t sd); extern int gasneti_test_sd_poison(void *addr, size_t len); #define _GASNETI_CHECK_PREPARE(cbuf, least_payload, most_payload, limit, lc_opt, nargs, is_req, cat) \ do { \ const char *_reqrep = is_req ? "Request" : "Reply"; \ if (cbuf == NULL) { \ if (lc_opt != NULL) \ gasneti_fatalerror("gex_AM_Prepare%s" _STRINGIFY(cat) ": " \ "only NULL is a valid lc_opt value when client_buf is NULL", _reqrep); \ } else if (lc_opt == NULL) { \ gasneti_fatalerror("gex_AM_Prepare%s" _STRINGIFY(cat) ": lc_opt must be non-NULL " \ "when client_buf is non-NULL", _reqrep); \ } else if (is_req) { \ if (!gasneti_leaf_is_pointer(lc_opt) && (lc_opt != GEX_EVENT_NOW) && (lc_opt != GEX_EVENT_GROUP))\ gasneti_fatalerror("gex_AM_Prepare%s" _STRINGIFY(cat) ": only pointer-to-event, " \ "GEX_EVENT_NOW and GEX_EVENT_GROUP are valid lc_opt values " \ "when client_buf is non-NULL", _reqrep); \ } else { \ if (!gasneti_leaf_is_pointer(lc_opt) && (lc_opt != GEX_EVENT_NOW)) \ gasneti_fatalerror("gex_AM_Prepare%s" _STRINGIFY(cat) ": only pointer-to-event, " \ "and GEX_EVENT_NOW are valid lc_opt values " \ "when client_buf is non-NULL", _reqrep); \ } \ if (lc_opt && gasneti_leaf_is_pointer(lc_opt)) { \ *lc_opt = GEX_EVENT_NO_OP; \ } \ if (nargs > gex_AM_MaxArgs()) \ gasneti_fatalerror("gex_AM_Prepare%s" _STRINGIFY(cat) ": " \ "numargs larger than gex_AM_MaxArgs() (%u > %u)", \ _reqrep, (unsigned int)nargs, (unsigned int)gex_AM_MaxArgs()); \ if (least_payload > most_payload) \ gasneti_fatalerror("gex_AM_Prepare%s" _STRINGIFY(cat) ": " \ "least_payload larger than most_payload (%"PRIuPTR" > %"PRIuPTR")", \ _reqrep, (uintptr_t)least_payload, (uintptr_t)most_payload); \ if (least_payload > limit) \ gasneti_fatalerror("gex_AM_Prepare%s" _STRINGIFY(cat) ": least_payload larger than gex_AM_Max%s" \ _STRINGIFY(cat) "() (%"PRIuPTR" > %"PRIuPTR")", \ _reqrep, _reqrep, (uintptr_t)least_payload, (uintptr_t)limit); \ } while(0) #define GASNETI_COMMON_PREP_REQ(sd,tm,dest,cbuf,least_pl,most_pl,dest_addr,lc_opt,flags,nargs,cat) \ do { \ sd->_category = (int)gasneti_##cat; \ sd->_dest_addr = dest_addr; \ sd->_nargs = nargs; \ gex_Flags_t tmp_flags = flags | (cbuf ? GEX_FLAG_AM_PREPARE_LEAST_CLIENT \ : GEX_FLAG_AM_PREPARE_LEAST_ALLOC); \ size_t limit = gex_AM_MaxRequest##cat(tm,dest,lc_opt,tmp_flags,nargs); \ gex_Rank_t tm_size = gasneti_e_tm_size(tm); \ if (dest >= tm_size) \ gasneti_fatalerror("gex_AM_PrepareRequest" _STRINGIFY(cat) ": " \ "destination rank out-of-range (%lu >= %lu)", \ (unsigned long)dest, (unsigned long)tm_size); \ _GASNETI_CHECK_PREPARE(cbuf,least_pl,most_pl,limit,lc_opt,nargs,1,cat); \ } while(0) #define GASNETI_COMMON_PREP_REP(sd,token,cbuf,least_pl,most_pl,dest_addr,lc_opt,flags,nargs,cat) \ do { \ sd->_category = (int)gasneti_##cat; \ sd->_dest_addr = dest_addr; \ sd->_nargs = nargs; \ gex_Flags_t tmp_flags = flags | (cbuf ? GEX_FLAG_AM_PREPARE_LEAST_CLIENT \ : GEX_FLAG_AM_PREPARE_LEAST_ALLOC); \ size_t limit = gasnetc_Token_MaxReply##cat(token,lc_opt,tmp_flags,nargs); \ _GASNETI_CHECK_PREPARE(cbuf,least_pl,most_pl,limit,lc_opt,nargs,0,cat); \ } while(0) #define _GASNETI_CHECK_COMMIT(sd,handler,nbytes,dest_addr,flags,nargs,is_req,cat) \ do { \ const char *_reqrep = is_req ? "Request" : "Reply"; \ if (!sd) \ gasneti_fatalerror("gex_AM_Commit%s" _STRINGIFY(cat) "%d: " \ "passed invalid gex_AM_SrcDesc (GEX_AM_SRCDESC_NO_OP == 0)", _reqrep, nargs); \ if (sd->_thread != _gasneti_mythread_slow()) \ gasneti_fatalerror("gex_AM_Commit%s" _STRINGIFY(cat) "%d: " \ "return from Prepare passed to Commit in a different thread", _reqrep, nargs);\ if (sd->_isreq != is_req) \ gasneti_fatalerror("gex_AM_Commit%s" _STRINGIFY(cat) "%d: " \ "paired with incompatible Prepare (%s)", \ _reqrep, nargs, (sd->_isreq?"Request":"Reply")); \ if (sd->_category != (int)gasneti_##cat) \ gasneti_fatalerror("gex_AM_Commit%s" _STRINGIFY(cat) "%d: " \ "paired with incompatible Prepare (%s)", \ _reqrep, nargs, (sd->_category==(int)gasneti_Long?"Long":"Medium")); \ if (sd->_nargs != nargs) \ gasneti_fatalerror("gex_AM_Commit%s" _STRINGIFY(cat) "%d: " \ "paired with incompatible Prepare (nargs = %d)", \ _reqrep, nargs, sd->_nargs); \ if (sd->_size < nbytes) \ gasneti_fatalerror("gex_AM_Commit%s" _STRINGIFY(cat) "%d: " \ "nbytes larger than returned from Prepare (%"PRIuPTR" > %"PRIuPTR")", \ _reqrep, nargs, (uintptr_t)nbytes, (uintptr_t)sd->_size); \ if ((sd->_dest_addr != NULL) && \ !((dest_addr == sd->_dest_addr) || ((dest_addr == NULL) && (nbytes == 0)))) \ gasneti_fatalerror("gex_AM_Commit%s" _STRINGIFY(cat) "%d: " \ "dest_addr does not match the value passed to Prepare", _reqrep, nargs); \ if (sd->_gex_buf) { \ if (gasneti_test_sd_poison(sd->_gex_buf, nbytes)) \ gasneti_fatalerror("gex_AM_Commit%s" _STRINGIFY(cat) "%d: " \ "client did not write to the GASNet-provided buffer", \ _reqrep, nargs); \ } \ if (flags & ~GEX_FLAG_IMMEDIATE) { \ gasneti_fatalerror("gex_AM_Commit%s" _STRINGIFY(cat) "%d: " \ "Invalid flags=0x%x", _reqrep, nargs, flags); \ } \ } while(0) #define GASNETI_COMMON_COMMIT_REQ(sd,handler,nbytes,dest_addr,flags,nargs,cat) do { \ GASNETI_TRACE_COMMIT_REQUEST##cat(handler,(sd?sd->_addr:NULL),(sd?sd->_size:0),dest_addr,flags,(sd?sd->_nargs:0)); \ _GASNETI_CHECK_COMMIT(sd,handler,nbytes,dest_addr,flags,nargs,1,cat); \ } while(0) #define GASNETI_COMMON_COMMIT_REP(sd,handler,nbytes,dest_addr,flags,nargs,cat) do { \ GASNETI_TRACE_COMMIT_REPLY##cat(handler,(sd?sd->_addr:NULL),(sd?sd->_size:0),dest_addr,flags,(sd?sd->_nargs:0)); \ _GASNETI_CHECK_COMMIT(sd,handler,nbytes,dest_addr,flags,nargs,0,cat); \ } while(0) #define _GASNETI_CHECK_CANCEL(sd,is_req,cat) \ do { \ const char *_reqrep = is_req ? "Request" : "Reply"; \ if (!sd) \ gasneti_fatalerror("gex_AM_Cancel%s" _STRINGIFY(cat) ": " \ "passed invalid gex_AM_SrcDesc (GEX_AM_SRCDESC_NO_OP == 0)", _reqrep); \ if (sd->_thread != _gasneti_mythread_slow()) \ gasneti_fatalerror("gex_AM_Cancel%s" _STRINGIFY(cat) ": " \ "return from Prepare passed to Cancel in a different thread", _reqrep);\ if (sd->_isreq != is_req) \ gasneti_fatalerror("gex_AM_Cancel%s" _STRINGIFY(cat) ": " \ "paired with incompatible Prepare (%s)", \ _reqrep, (sd->_isreq?"Request":"Reply")); \ if (sd->_category != (int)gasneti_##cat) \ gasneti_fatalerror("gex_AM_Cancel%s" _STRINGIFY(cat) ": " \ "paired with incompatible Prepare (%s)", \ _reqrep, (sd->_category==(int)gasneti_Long?"Long":"Medium")); \ } while(0) #define GASNETI_COMMON_CANCEL_REQ(sd,flags,cat) do { \ GASNETI_TRACE_CANCEL_REQUEST##cat(sd,flags); \ _GASNETI_CHECK_CANCEL(sd,1,cat); \ } while(0) #define GASNETI_COMMON_CANCEL_REP(sd,flags,cat) do { \ GASNETI_TRACE_CANCEL_REPLY##cat(sd,flags); \ _GASNETI_CHECK_CANCEL(sd,0,cat); \ } while(0) #define GASNETI_CHECK_SD(cbuf, least_payload, most_payload, sd) \ do { \ if (!sd) break; \ if (cbuf) { \ gasneti_assert(sd->_addr == cbuf); \ } else { \ gasneti_assert(0 == (((uintptr_t) sd->_addr) % GASNETI_MEDBUF_ALIGNMENT)); \ } \ gasneti_assert(sd->_size >= least_payload); \ gasneti_assert(sd->_size <= most_payload); \ } while(0) #else #define gasneti_init_sd_poison(sd) ((void)0) #if GASNET_TRACE // Need to store nargs from Prep to Commit to trace the args #define _GASNETI_COMMON_PREP_NARGS(sd,nargs) ((void)(sd->_nargs = nargs)) #else #define _GASNETI_COMMON_PREP_NARGS(sd,nargs) ((void)0) #endif #define GASNETI_COMMON_PREP_REQ(sd,tm,dest,cbuf,least_pl,most_pl,dest_addr,lc_opt,flags,nargs,cat) do { \ _GASNETI_COMMON_PREP_NARGS(sd,nargs); \ } while(0) #define GASNETI_COMMON_PREP_REP(sd,token,cbuf,least_pl,most_pl,dest_addr,lc_opt,flags,nargs,cat) do { \ _GASNETI_COMMON_PREP_NARGS(sd,nargs); \ } while(0) #define GASNETI_COMMON_COMMIT_REQ(sd,handler,nbytes,dest_addr,flags,nargs_arg,cat) \ GASNETI_TRACE_COMMIT_REQUEST##cat(handler,sd->_addr,sd->_size,dest_addr,flags,sd->_nargs) #define GASNETI_COMMON_COMMIT_REP(sd,handler,nbytes,dest_addr,flags,nargs_arg,cat) \ GASNETI_TRACE_COMMIT_REPLY##cat(handler,sd->_addr,sd->_size,dest_addr,flags,sd->_nargs) #define GASNETI_COMMON_CANCEL_REQ(sd,flags,cat) \ GASNETI_TRACE_CANCEL_REQUEST##cat(sd,flags) #define GASNETI_COMMON_CANCEL_REP(sd,flags,cat) \ GASNETI_TRACE_CANCEL_REPLY##cat(sd,flags) #define GASNETI_CHECK_SD(cbuf, least_payload, most_payload, sd) ((void)0) #endif #define GASNETI_TRACE_COMMIT_REQUESTMedium(handler,source_addr,nbytes,dest_addr,flags,numargs) \ GASNETI_TRACE_COMMIT_REQUESTMEDIUM(handler,source_addr,nbytes,flags,numargs) #define GASNETI_TRACE_COMMIT_REQUESTLong(handler,source_addr,nbytes,dest_addr,flags,numargs) \ GASNETI_TRACE_COMMIT_REQUESTLONG(handler,source_addr,nbytes,dest_addr,flags,numargs) #define GASNETI_TRACE_COMMIT_REPLYMedium(handler,source_addr,nbytes,dest_addr,flags,numargs) \ GASNETI_TRACE_COMMIT_REPLYMEDIUM(handler,source_addr,nbytes,flags,numargs) #define GASNETI_TRACE_COMMIT_REPLYLong(handler,source_addr,nbytes,dest_addr,flags,numargs) \ GASNETI_TRACE_COMMIT_REPLYLONG(handler,source_addr,nbytes,dest_addr,flags,numargs) #define GASNETI_TRACE_CANCEL_REQUESTMedium(sd,flags) \ GASNETI_TRACE_CANCEL_REQUESTMEDIUM(sd,flags) #define GASNETI_TRACE_CANCEL_REQUESTLong(sd,flags) \ GASNETI_TRACE_CANCEL_REQUESTLONG(sd,flags) #define GASNETI_TRACE_CANCEL_REPLYMedium(sd,flags) \ GASNETI_TRACE_CANCEL_REPLYMEDIUM(sd,flags) #define GASNETI_TRACE_CANCEL_REPLYLong(sd,flags) \ GASNETI_TRACE_CANCEL_REPLYLONG(sd,flags) #ifndef _GEX_AM_SRCDESC_T // Allocate a buffer (use IFF client_buf is NULL) GASNETI_INLINE(gasneti_alloc_npam_buffer) void *gasneti_alloc_npam_buffer(gasneti_AM_SrcDesc_t sd, int isReq) { gasneti_assert_uint(sd->_size ,<=, GASNETC_REF_NPAM_MAX_ALLOC); GASNET_POST_THREADINFO(sd->_thread); void *result = gasneti_alloc_perthread_medium_buffer(isReq GASNETI_THREAD_PASS); return (sd->_gex_buf = sd->_addr = result); } GASNETI_INLINE(gasneti_free_npam_buffer) void gasneti_free_npam_buffer(gasneti_AM_SrcDesc_t sd) { gasneti_assert(sd->_tofree); GASNET_POST_THREADINFO(sd->_thread); gasneti_free_perthread_medium_buffer(sd->_tofree, sd->_isreq GASNETI_THREAD_PASS); sd->_tofree = NULL; } #if GASNETI_NEED_INIT_SRCDESC void gasneti_init_srcdesc(GASNETI_THREAD_FARG_ALONE); #endif // Get the thread-specfic SD for Requests // Initializing on first call if necessary (DEBUG or when using THREADINFO_OPT) GASNETI_INLINE(gasneti_init_request_srcdesc) gasneti_AM_SrcDesc_t gasneti_init_request_srcdesc(GASNETI_THREAD_FARG_ALONE) { #if GASNETI_NEED_INIT_SRCDESC if_pf (! GASNETI_MYTHREAD->sd_is_init) gasneti_init_srcdesc(GASNETI_THREAD_PASS_ALONE); #endif gasneti_AM_SrcDesc_t sd = &GASNETI_MYTHREAD->request_sd; #if GASNET_DEBUG if (sd->_magic._u == GASNETI_AM_SRCDESC_MAGIC) { gasneti_fatalerror("Bad state - likely due to back-to-back gex_AM_PrepareRequest*() calls"); } GASNETI_CHECK_INJECT(); GASNETI_CHECK_MAGIC(sd, GASNETI_AM_SRCDESC_BAD_MAGIC); GASNETI_INIT_MAGIC(sd, GASNETI_AM_SRCDESC_MAGIC); // Check invariant(s) assumed by users of the srcdesc: gasneti_assert(! sd->_tofree); #endif sd->_gex_buf = NULL; return sd; } // Get the thread-specfic SD for Replies // Initializing on first call if necessary (DEBUG or when using THREADINFO_OPT) GASNETI_INLINE(gasneti_init_reply_srcdesc) gasneti_AM_SrcDesc_t gasneti_init_reply_srcdesc(GASNETI_THREAD_FARG_ALONE) { #if GASNETI_NEED_INIT_SRCDESC if_pf (! GASNETI_MYTHREAD->sd_is_init) gasneti_init_srcdesc(GASNETI_THREAD_PASS_ALONE); #endif gasneti_AM_SrcDesc_t sd = &GASNETI_MYTHREAD->reply_sd; #if GASNET_DEBUG if (sd->_magic._u == GASNETI_AM_SRCDESC_MAGIC) { gasneti_fatalerror("Bad state - likely due to back-to-back gex_AM_PrepareReply*() calls"); } GASNETI_CHECK_INJECT_REPLY(); GASNETI_CHECK_MAGIC(sd, GASNETI_AM_SRCDESC_BAD_MAGIC); GASNETI_INIT_MAGIC(sd, GASNETI_AM_SRCDESC_MAGIC); #endif sd->_gex_buf = NULL; return sd; } // Return a thread-specific SD to its "inactive" state // Must remain non-destructive (other than manipulating _magic) // so this can occur in a Commit prior to use of the data. GASNETI_INLINE(gasneti_reset_srcdesc) void gasneti_reset_srcdesc(gasneti_AM_SrcDesc_t sd) { #if GASNET_DEBUG if (sd->_magic._u == GASNETI_AM_SRCDESC_BAD_MAGIC) { gasneti_fatalerror("Bad state - likely due to back-to-back gex_AM_Commit%s*() calls", sd->_isreq ? "Request" : "Reply"); } GASNETI_CHECK_MAGIC(sd, GASNETI_AM_SRCDESC_MAGIC); GASNETI_INIT_MAGIC(sd, GASNETI_AM_SRCDESC_BAD_MAGIC); #endif } // Combined import and reset // // This is used in the reference implementation of Commit to "close" the // Prepare/Commit interval immediately upon entry, rather than via a call to // gasneti_reset_srcdesc() just prior to return (which is "best practice" as // shown in template-conduit). This difference allows for the underlying // conduit to use, as necessary, calls prohibited in a Prepare/Commit interval // without concern over GASNETI_CHECK_INJECT() as seen in Bug 4174 prior to // addition of this "consume" API. This is safe because such communication // cannot deadlock on a limited resource given that the reference implementation // holds (at most) a malloc'ed buffer. The same is not true in general of a // native NPAM implementation. GASNETI_INLINE(gasneti_consume_srcdesc) gasneti_AM_SrcDesc_t gasneti_consume_srcdesc(gex_AM_SrcDesc_t e_sd) { gasneti_AM_SrcDesc_t i_sd = gasneti_import_srcdesc(e_sd); gasneti_reset_srcdesc(i_sd); return i_sd; } GASNETI_INLINE(gasneti_prepare_common) GASNETI_WARN_UNUSED_RESULT void *gasneti_prepare_common( gasneti_AM_SrcDesc_t sd, int isReq, const void *client_buf, size_t size, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { sd->_is_nbrhd = 0; sd->_lc_opt = lc_opt; sd->_flags = flags; sd->_nargs = nargs; sd->_size = size; if (client_buf) { sd->_addr = (/*non-const*/void *)client_buf; return NULL; } else { return gasneti_alloc_npam_buffer(sd, isReq); } } GASNETI_INLINE(gasneti_prepare_request_common) GASNETI_WARN_UNUSED_RESULT void *gasneti_prepare_request_common( gasneti_AM_SrcDesc_t sd, gex_TM_t tm, gex_Rank_t rank, const void *client_buf, size_t size, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { sd->_dest._request._tm = tm; sd->_dest._request._rank = rank; return gasneti_prepare_common(sd, 1, client_buf, size, lc_opt, flags, nargs); } GASNETI_INLINE(gasneti_prepare_reply_common) GASNETI_WARN_UNUSED_RESULT void *gasneti_prepare_reply_common( gasneti_AM_SrcDesc_t sd, gex_Token_t token, const void *client_buf, size_t size, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { sd->_dest._reply._token = token; return gasneti_prepare_common(sd, 0, client_buf, size, lc_opt, flags, nargs); } #endif // _GEX_AM_SRCDESC_T /* INTERNAL Active Message Request/Reply w/ va_list ================================================ NOTE: These functions do not TRACE or perform complete argument validation. These Request functions do not AMPoll. Those are the caller's responsibility. */ extern int gasnetc_AMRequestMediumV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG); #ifndef gasneti_AMRequestMediumV #define gasneti_AMRequestMediumV(tm,rank,hidx,src_addr,nbytes,lc_opt,flags,nargs,args) \ gasnetc_AMRequestMediumV(tm,rank,hidx,src_addr,nbytes,lc_opt,flags,nargs,args GASNETI_THREAD_GET) #endif extern int gasnetc_AMRequestLongV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG); #ifndef gasneti_AMRequestLongV #define gasneti_AMRequestLongV(tm,rank,hidx,src_addr,nbytes,dst_addr,lc_opt,flags,nargs,args) \ gasnetc_AMRequestLongV(tm,rank,hidx,src_addr,nbytes,dst_addr,lc_opt,flags,nargs,args GASNETI_THREAD_GET) #endif extern int gasnetc_AMReplyMediumV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr); #ifndef gasneti_AMReplyMediumV #define gasneti_AMReplyMediumV(token,hidx,src_addr,nbytes,lc_opt,flags,nargs,args) \ gasnetc_AMReplyMediumV(token,hidx,src_addr,nbytes,lc_opt,flags,nargs,args) #endif extern int gasnetc_AMReplyLongV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr); #ifndef gasneti_AMReplyLongV #define gasneti_AMReplyLongV(token,hidx,src_addr,nbytes,dst_addr,lc_opt,flags,nargs,args) \ gasnetc_AMReplyLongV(token,hidx,src_addr,nbytes,dst_addr,lc_opt,flags,nargs,args) #endif /* ------------------------------------------------------------------------------------ */ // Types and macros common to loopback and PSHM // TODO-EX: "promote" conduit-independent gasnetc_nbrhd_* interfaces to gasneti_nbrhd_* typedef struct { gex_Token_Info_t ti; #if GASNET_DEBUG int8_t handlerRunning; int8_t replyIssued; #endif #if GASNETI_THREADINFO_OPT gasnet_threadinfo_t threadinfo; #endif } gasnetc_nbrhd_token_t; #define gasnetc_token_in_nbrhd(tok) ((uintptr_t)(tok)&1) #define GASNETI_POST_THREADINFO_FROM_NBRHD_TOKEN(token) \ GASNET_POST_THREADINFO((gasneti_assert(gasnetc_token_in_nbrhd(token)), \ ((gasnetc_nbrhd_token_t *)(1^(uintptr_t)(token)))->threadinfo)) // gasnetc_nbrhd_token_init is used to forge a conduit-independent nbrhd token that can be used to invoke a client AM handler // It currently has three main clients: // Loopback AM delivery, PSHM AM delivery, VIS peer completion callback support // NOTE 1: The caller of this function is responsible for populating real_token->ti.gex_is_long after return // NOTE 2: src_jobrank is permitted to specify remote ranks, in order to support VIS PC // NOTE 3: If real_token->threadinfo is to be used, caller must set after return GASNETI_INLINE(gasnetc_nbrhd_token_init) gex_Token_t gasnetc_nbrhd_token_init( gasnetc_nbrhd_token_t *real_token, gex_Rank_t src_jobrank, gex_AM_Entry_t *entry, int isReq) { gasneti_assert(!((uintptr_t)real_token & 1)); //gasneti_assert(GASNETI_NBRHD_JOBRANK_IS_LOCAL(src_jobrank)); // allow VIS PC to fake a remote token using this routine #if !(PLATFORM_COMPILER_PGI && PLATFORM_COMPILER_VERSION_LT(17,9,0)) // Bug 3587 // generic msgsource() requires srcrank first gasneti_assert(!offsetof(gasnetc_nbrhd_token_t,ti.gex_srcrank)); #endif real_token->ti.gex_srcrank = src_jobrank; real_token->ti.gex_ep = gasneti_THUNK_EP; real_token->ti.gex_entry = entry; real_token->ti.gex_is_req = isReq; #if GASNET_DEBUG real_token->handlerRunning = 1; real_token->replyIssued = 0; #endif return (gex_Token_t)(1|(uintptr_t)real_token); } extern gex_TI_t gasnetc_nbrhd_Token_Info( gex_Token_t token, gex_Token_Info_t *info, gex_TI_t mask); #ifdef GASNETC_ENTERING_HANDLER_HOOK #define GASNETC_NBRHD_ENTERING_HANDLER_HOOK GASNETC_ENTERING_HANDLER_HOOK #else /* extern void enterHook(int cat, int isReq, int handlerId, gex_Token_t *token, * void *buf, size_t nbytes, int numargs, gex_AM_Arg_t *args); */ #define GASNETC_NBRHD_ENTERING_HANDLER_HOOK(cat,isReq,handlerId,token,buf,nbytes,numargs,args) ((void)0) #endif #ifdef GASNETC_LEAVING_HANDLER_HOOK #define GASNETC_NBRHD_LEAVING_HANDLER_HOOK GASNETC_LEAVING_HANDLER_HOOK #else /* extern void leaveHook(int cat, int isReq); */ #define GASNETC_NBRHD_LEAVING_HANDLER_HOOK(cat,isReq) ((void)0) #endif #if GASNET_DEBUG #define gasnetc_token_pre_reply_checks(token) do { \ gasneti_assert(gasnetc_token_in_nbrhd(token)); \ gasnetc_nbrhd_token_t *real_token = (gasnetc_nbrhd_token_t *)(1^(uintptr_t)token); \ gasneti_assert(real_token); \ gasneti_assert(real_token->ti.gex_is_req); \ gasneti_assert(!real_token->replyIssued); \ } while (0) #define gasnetc_token_post_reply_checks(token, retval) do { \ gasnetc_nbrhd_token_t *real_token = (gasnetc_nbrhd_token_t *)(1^(uintptr_t)token); \ real_token->replyIssued = !retval; \ } while (0) #else #define gasnetc_token_pre_reply_checks(token) ((void)0) #define gasnetc_token_post_reply_checks(token,retval) ((void)0) #endif /* ------------------------------------------------------------------------------------ */ // Code shared by loopback (same-process) FP and NP // After sd, next 3 params (isFixed, isReq, category) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_loopback_prepare_inner) int gasnetc_loopback_prepare_inner( gasneti_AM_SrcDesc_t sd, const int isFixed, const int isReq, const gasneti_category_t category, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs GASNETI_THREAD_FARG) { sd->_nargs = nargs; if (category == gasneti_Medium) { sd->_void_p = gasneti_alloc_perthread_medium_buffer(isReq GASNETI_THREAD_PASS); } gasneti_assert(sd->_tofree == NULL); if (isFixed) { sd->_addr = (/*non-const*/void *)client_buf; } else { if (client_buf) { size_t limit = (category == gasneti_Medium) ? GASNETC_REF_NPAM_MAX_ALLOC : GASNETC_MAX_LONG_NBRHD; sd->_size = MIN(limit, most_payload); sd->_addr = (/*non-const*/void *)client_buf; gasneti_leaf_finish(lc_opt); } else if (category == gasneti_Medium) { // NPAM Medium with GASNet-allocated buffer sd->_size = MIN(GASNETC_REF_NPAM_MAX_ALLOC, most_payload); sd->_addr = sd->_gex_buf = sd->_void_p; } else { // NPAM Long with GASNet-allocated buffer sd->_size = MIN(GASNETC_REF_NPAM_MAX_ALLOC, most_payload); sd->_tofree = gasneti_alloc_npam_buffer(sd, isReq); } } return 0; } // After sd, next 3 params (isFixed, isReq, category) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_loopback_commit_inner) void gasnetc_loopback_commit_inner( gasneti_AM_SrcDesc_t sd, const int isFixed, const int isReq, const gasneti_category_t category, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, va_list argptr GASNETI_THREAD_FARG) { const int numargs = sd->_nargs; // Stage payload to final location, buf void *buf; switch (category) { case gasneti_Short: buf = NULL; break; case gasneti_Medium: buf = sd->_void_p; if (isFixed || (buf != sd->_addr)) GASNETI_MEMCPY_SAFE_EMPTY(buf, sd->_addr, nbytes); break; case gasneti_Long: buf = dest_addr; GASNETI_MEMCPY_SAFE_EMPTY(buf, sd->_addr, nbytes); break; default: gasneti_unreachable_error(("Invalid category=%i",(int)category)); } gex_AM_Arg_t pargs[GASNETC_MAX_ARGS_NBRHD]; gex_EP_t ep = NULL; // TODO-EX: get true value gex_AM_Entry_t *handler_entry = gasnetc_get_hentry(ep, handler); gex_AM_Fn_t handler_fn = handler_entry->gex_fnptr; gasnetc_nbrhd_token_t real_token; const gex_Token_t token = gasnetc_nbrhd_token_init(&real_token, gasneti_mynode, handler_entry, isReq); #if GASNETI_THREADINFO_OPT real_token.threadinfo = GASNETI_MYTHREAD; #endif real_token.ti.gex_is_long = (category == gasneti_Long); gasneti_assert_int(numargs ,>=, 0); gasneti_assert_int(numargs ,<=, GASNETC_MAX_ARGS_NBRHD); gasneti_amtbl_check(handler_entry, numargs, category, isReq); for (int i = 0; i < numargs; i++) { pargs[i] = (gex_AM_Arg_t)va_arg(argptr, gex_AM_Arg_t); } GASNETC_NBRHD_ENTERING_HANDLER_HOOK(category,isReq,handler,token,buf,nbytes,numargs,pargs); switch (category) { case gasneti_Short: GASNETI_RUN_HANDLER_SHORT(isReq,handler,handler_fn,token,pargs,numargs); break; case gasneti_Medium: GASNETI_RUN_HANDLER_MEDIUM(isReq,handler,handler_fn,token,pargs,numargs,buf,nbytes); break; case gasneti_Long: GASNETI_RUN_HANDLER_LONG(isReq,handler,handler_fn,token,pargs,numargs,buf,nbytes); break; default: gasneti_unreachable_error(("Invalid category=%i",(int)category)); } GASNETC_NBRHD_LEAVING_HANDLER_HOOK(category,isReq); #if GASNET_DEBUG real_token.handlerRunning = 0; #endif if (category == gasneti_Medium) { // All Mediums gasneti_free_perthread_medium_buffer(buf, isReq GASNETI_THREAD_PASS); } else if(!isFixed && sd->_gex_buf) { // NPAM Long with GASNet-allocated buffer gasneti_assert(category == gasneti_Long); gasneti_free_npam_buffer(sd); } } /* ------------------------------------------------------------------------------------ */ // FP-AM for loopback (same-process) // First 2 params (isReq, category) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_loopback_ReqRepGeneric) int gasnetc_loopback_ReqRepGeneric( int isReq, gasneti_category_t category, gex_AM_Index_t handler, void *source_addr, int nbytes, void *dest_addr, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { struct gasneti_AM_SrcDesc the_sd; the_sd._tofree = NULL; gasnetc_loopback_prepare_inner(&the_sd, 1, isReq, category, source_addr, 0, 0, dest_addr, NULL, flags, numargs GASNETI_THREAD_PASS); gasneti_assume(the_sd._tofree == NULL); // in case the optimizer lost track gasnetc_loopback_commit_inner(&the_sd, 1, isReq, category, handler, nbytes, dest_addr, argptr GASNETI_THREAD_PASS); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ // FP-AM for "nbrhd" (PSHM and loopback) // NOTE: except for IMMEDIATE no-op case, always synchronous LC // Parameter 'category' will be a manifest constant // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_nbrhd_RequestGeneric) int gasnetc_nbrhd_RequestGeneric( gasneti_category_t category, gex_Rank_t jobrank, gex_AM_Index_t handler, void *source_addr, int nbytes, void *dest_ptr, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { gasneti_assert(GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)); #if GASNET_PSHM switch(category) { case gasneti_Short: return gasneti_AMPSHM_RequestShort(jobrank, handler, flags, numargs, argptr GASNETI_THREAD_PASS); break; case gasneti_Medium: return gasneti_AMPSHM_RequestMedium(jobrank, handler, source_addr, nbytes, flags, numargs, argptr GASNETI_THREAD_PASS); break; case gasneti_Long: return gasneti_AMPSHM_RequestLong(jobrank, handler, source_addr, nbytes, dest_ptr, flags, numargs, argptr GASNETI_THREAD_PASS); break; default: gasneti_unreachable_error(("Invalid category=%i",(int)category)); } return 0; #else return gasnetc_loopback_ReqRepGeneric( 1, category, handler, source_addr, nbytes, dest_ptr, flags, numargs, argptr GASNETI_THREAD_PASS); #endif } // Parameter 'category' will be a manifest constant // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_nbrhd_ReplyGeneric) int gasnetc_nbrhd_ReplyGeneric( gasneti_category_t category, gex_Token_t token, gex_AM_Index_t handler, void *source_addr, int nbytes, void *dest_ptr, gex_Flags_t flags, int numargs, va_list argptr) { gasnetc_token_pre_reply_checks(token); int retval; #if GASNET_PSHM switch(category) { case gasneti_Short: retval = gasneti_AMPSHM_ReplyShort(token, handler, flags, numargs, argptr); break; case gasneti_Medium: retval = gasneti_AMPSHM_ReplyMedium(token, handler, source_addr, nbytes, flags, numargs, argptr); break; case gasneti_Long: retval = gasneti_AMPSHM_ReplyLong(token, handler, source_addr, nbytes, dest_ptr, flags, numargs, argptr); break; default: gasneti_unreachable_error(("Invalid category=%i",(int)category)); } #else GASNETI_POST_THREADINFO_FROM_NBRHD_TOKEN(token); retval = gasnetc_loopback_ReqRepGeneric( 0, category, handler, source_addr, nbytes, dest_ptr, flags, numargs, argptr GASNETI_THREAD_PASS); #endif gasnetc_token_post_reply_checks(token, retval); return retval; } /* ------------------------------------------------------------------------------------ */ // NP-AM for loopback (same-process, thus lacking destination arguments) // After sd, next 2 params (isReq, category) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_loopback_Prepare) int gasnetc_loopback_Prepare( gasneti_AM_SrcDesc_t sd, const int isReq, const gasneti_category_t category, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { GASNET_POST_THREADINFO(sd->_thread); gasneti_assert(sd->_is_nbrhd); return gasnetc_loopback_prepare_inner( sd, 0, isReq, category, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs GASNETI_THREAD_PASS); } // After sd, next 2 params (isReq, category) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_loopback_Commit) void gasnetc_loopback_Commit( gasneti_AM_SrcDesc_t sd, const int isReq, const gasneti_category_t category, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, va_list argptr) { GASNET_POST_THREADINFO(sd->_thread); gasneti_assert(sd->_is_nbrhd); gasnetc_loopback_commit_inner( sd, 0, isReq, category, handler, nbytes, dest_addr, argptr GASNETI_THREAD_PASS); } // After sd, remaining params (isReq, category) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_loopback_Cancel) int gasnetc_loopback_Cancel( gasneti_AM_SrcDesc_t sd, const int isReq, const gasneti_category_t category) { GASNET_POST_THREADINFO(sd->_thread); gasneti_assert(sd->_is_nbrhd); if (category == gasneti_Medium) { // All Mediums gasneti_free_perthread_medium_buffer(sd->_void_p, isReq GASNETI_THREAD_PASS); } else if (sd->_gex_buf) { // NPAM Long with GASNet-allocated buffer gasneti_assert(category == gasneti_Long); gasneti_free_npam_buffer(sd); } return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ // NP-AM for "nbrhd" (PSHM and loopback) // Parameter 'category' will be a manifest constant // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_nbrhd_PrepareRequest) gasneti_AM_SrcDesc_t gasnetc_nbrhd_PrepareRequest( gasneti_AM_SrcDesc_t sd, gasneti_category_t category, gex_Rank_t jobrank, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { gasneti_assert(GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)); sd->_is_nbrhd = 1; int imm; #if GASNET_PSHM if (category == gasneti_Medium) { imm = gasnetc_AMPSHM_PrepareRequestMedium(sd, jobrank, client_buf, least_payload, most_payload, lc_opt, flags, nargs); } else { imm = gasnetc_AMPSHM_PrepareRequestLong(sd, jobrank, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs); } #else imm = gasnetc_loopback_Prepare(sd, 1, category, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs); #endif if (imm) { gasneti_assert(! sd->_tofree); gasneti_reset_srcdesc(sd); sd = NULL; // GEX_AM_SRCDESC_NO_OP } else { gasneti_init_sd_poison(sd); } return sd; } // Parameter 'category' will be a manifest constant // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_nbrhd_CommitRequest) void gasnetc_nbrhd_CommitRequest( gasneti_AM_SrcDesc_t sd, gasneti_category_t category, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, va_list argptr) { #if GASNET_PSHM if (category == gasneti_Medium) { gasnetc_AMPSHM_CommitRequestMedium(sd, handler, nbytes, argptr); } else { gasnetc_AMPSHM_CommitRequestLong(sd, handler, nbytes, dest_addr, argptr); } #else gasnetc_loopback_Commit(sd, 1, category, handler, nbytes, dest_addr, argptr); #endif } // Parameter 'category' will be a manifest constant // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_nbrhd_CancelRequest) int gasnetc_nbrhd_CancelRequest( gasneti_AM_SrcDesc_t sd, gasneti_category_t category, gex_Flags_t flags) { #if GASNET_PSHM if (category == gasneti_Medium) { return gasnetc_AMPSHM_CancelRequestMedium(sd, flags); } else { return gasnetc_AMPSHM_CancelRequestLong(sd, flags); } #else return gasnetc_loopback_Cancel(sd, 1, category); #endif } // Parameter 'category' will be a manifest constant // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_nbrhd_PrepareReply) gasneti_AM_SrcDesc_t gasnetc_nbrhd_PrepareReply( gasneti_category_t category, gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { GASNETI_POST_THREADINFO_FROM_NBRHD_TOKEN(token); gasneti_AM_SrcDesc_t sd = gasneti_init_reply_srcdesc(GASNETI_THREAD_PASS_ALONE); sd->_is_nbrhd = 1; #if GASNET_DEBUG sd->_dest._reply._token = token; #endif if (category == gasneti_Medium) { GASNETI_COMMON_PREP_REP(sd,token,client_buf,least_payload,most_payload,dest_addr,lc_opt,flags,nargs,Medium); } else { GASNETI_COMMON_PREP_REP(sd,token,client_buf,least_payload,most_payload,dest_addr,lc_opt,flags,nargs,Long); } gasnetc_token_pre_reply_checks(token); int imm; #if GASNET_PSHM if (category == gasneti_Medium) { imm = gasnetc_AMPSHM_PrepareReplyMedium(sd, token, client_buf, least_payload, most_payload, lc_opt, flags, nargs); } else { imm = gasnetc_AMPSHM_PrepareReplyLong(sd, token, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs); } #else imm = gasnetc_loopback_Prepare(sd, 0, category, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs); #endif gasnetc_token_post_reply_checks(token, imm); if (imm) { gasneti_assert(! sd->_tofree); gasneti_reset_srcdesc(sd); sd = NULL; // GEX_AM_SRCDESC_NO_OP } else { gasneti_init_sd_poison(sd); } return sd; } // Parameter 'category' will be a manifest constant // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_nbrhd_CommitReply) void gasnetc_nbrhd_CommitReply( gasneti_AM_SrcDesc_t sd, gasneti_category_t category, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, va_list argptr) { #if GASNET_PSHM if (category == gasneti_Medium) { gasnetc_AMPSHM_CommitReplyMedium(sd, handler, nbytes, argptr); } else { gasnetc_AMPSHM_CommitReplyLong(sd, handler, nbytes, dest_addr, argptr); } #else gasnetc_loopback_Commit(sd, 0, category, handler, nbytes, dest_addr, argptr); #endif } // Parameter 'category' will be a manifest constant // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_nbrhd_CancelReply) int gasnetc_nbrhd_CancelReply( gasneti_AM_SrcDesc_t sd, gasneti_category_t category, gex_Flags_t flags) { #if GASNET_DEBUG const gex_Token_t token = sd->_dest._reply._token; gasneti_assert(gasnetc_token_in_nbrhd(token)); gasnetc_nbrhd_token_t *real_token = (gasnetc_nbrhd_token_t *)(1^(uintptr_t)token); gasneti_assert(real_token); gasneti_assert(real_token->replyIssued); real_token->replyIssued = 0; #endif #if GASNET_PSHM if (category == gasneti_Medium) { return gasnetc_AMPSHM_CancelReplyMedium(sd, flags); } else { return gasnetc_AMPSHM_CancelReplyLong(sd, flags); } #else return gasnetc_loopback_Cancel(sd, 0, category); #endif } #endif gasnet-2025.8.0/smp-conduit/0000775000175000017500000000000015142313673015664 5ustar alastairalastairgasnet-2025.8.0/smp-conduit/conduit.mak.in0000664000175000017500000000321115142313673020425 0ustar alastairalastair#INSTRUCTIONS# Conduit-specific Makefile fragment settings #INSTRUCTIONS# #INSTRUCTIONS# The contents of this file are embedded into the #INSTRUCTIONS# *-(seq,par,parsync).mak Makefile fragments at conduit build time #INSTRUCTIONS# The settings in those fragments are used to build GASNet clients #INSTRUCTIONS# (including the GASNet tests). #INSTRUCTIONS# See the conduit-writer instructions in the generated fragments #INSTRUCTIONS# or $(top_srcdir)/other/fragment-head.mak.in for usage info. # When using an MPI-based bootstrapper, we must # link using the system MPI compiler @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LD_OVERRIDE = @MPI_CC@ @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LDFLAGS_OVERRIDE = @MPI_CFLAGS@ @LDFLAGS@ @HAVE_BOOTSTRAP_MPI_TRUE@MPI_COMPAT_LIBS = @MPI_LIBS@ # Linker feature requirements embedded in GASNET_LD(FLAGS) which are not satisfied solely by GASNET_LIBS # (eg possible dependence on implicit MPI or C++ libraries added by a linker wrapper in GASNET_LD): @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LD_REQUIRES_MPI = 1 # Some platforms need extra -libs for the socket calls in ssh-spawner: @HAVE_BOOTSTRAP_SSH_TRUE@SSH_LIBS = @SSH_SPAWNER_LIBS@ CONDUIT_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ CONDUIT_LIBS = @SMP_LIBS@ $(MPI_COMPAT_LIBS) $(SSH_LIBS) @PMI_SPAWNER_LIBS@ # Clients may want/need to know which spawners we support: GASNET_SPAWNER_DEFAULT = fork GASNET_SPAWNER_FORK = 1 @HAVE_BOOTSTRAP_PMI_TRUE@GASNET_SPAWNER_PMI = 1 @HAVE_BOOTSTRAP_PMI_FALSE@GASNET_SPAWNER_PMI = 0 @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_SPAWNER_MPI = 1 @HAVE_BOOTSTRAP_MPI_FALSE@GASNET_SPAWNER_MPI = 0 @HAVE_BOOTSTRAP_SSH_TRUE@GASNET_SPAWNER_SSH = 1 @HAVE_BOOTSTRAP_SSH_FALSE@GASNET_SPAWNER_SSH = 0 gasnet-2025.8.0/smp-conduit/gasnet_core_fwd.h0000664000175000017500000002416715142313673021200 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/gasnet_core_fwd.h $ * Description: GASNet header for smp conduit core (forward definitions) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_FWD_H #define _GASNET_CORE_FWD_H #define GASNET_CORE_VERSION 2.1 #define GASNET_CORE_VERSION_STR _STRINGIFY(GASNET_CORE_VERSION) #define GASNET_CORE_NAME SMP #define GASNET_CORE_NAME_STR _STRINGIFY(GASNET_CORE_NAME) #define GASNET_CONDUIT_NAME GASNET_CORE_NAME #define GASNET_CONDUIT_NAME_STR _STRINGIFY(GASNET_CONDUIT_NAME) #define GASNET_CONDUIT_SMP 1 #define GASNETC_DEFAULT_SPAWNER GASNETC_SMP_SPAWNER_CONF /* GASNET_PSHM defined 1 if this conduit supports PSHM. leave undefined otherwise. */ #if GASNETI_PSHM_ENABLED #define GASNET_PSHM 1 #endif /* defined to be 1 if gasnet_init guarantees that the remote-access memory segment will be aligned */ /* at the same virtual address on all nodes. defined to 0 otherwise */ /* segment alignment on smp is moot, as there is only a single node */ #if GASNETI_PSHM_ENABLED #define GASNET_ALIGNED_SEGMENTS 0 /* use of PSHM prevents segment alignment */ #else #define GASNET_ALIGNED_SEGMENTS 1 #endif #if !GASNET_PSHM #define GASNETI_GASNETC_AMPOLL /* empty */ #define gasnetc_AMPoll GASNET_OK GASNETI_THREAD_SWALLOW #endif // If this conduit is considered a "portable conduit" only *conditionally*, // uncomment to enable calls to gasnetc_check_portable_conduit(void) as // described in gasnet_internal.c. //#define GASNETC_CHECK_PORTABLE_CONDUIT_HOOK 1 // uncomment for each MK_CLASS which the conduit supports. leave commented otherwise //#define GASNET_HAVE_MK_CLASS_CUDA_UVA GASNETI_MK_CLASS_CUDA_UVA_ENABLED //#define GASNET_HAVE_MK_CLASS_HIP GASNETI_MK_CLASS_HIP_ENABLED //#define GASNET_HAVE_MK_CLASS_ZE GASNETI_MK_CLASS_ZE_ENABLED // define to 1 if your conduit has "private" thread(s) which can run AM handlers //#define GASNET_RCV_THREAD 1 // define to 1 if your conduit has "private" thread(s) which progress sends of RMA and/or AM //#define GASNET_SND_THREAD 1 /* uncomment if your conduit has "private" threads which might run conduit code and/or the client's AM handlers, even under GASNET_SEQ. this ensures locking is still done correctly, etc */ //#define GASNETI_CONDUIT_THREADS 1 /* define these to 1 if your conduit needs to augment the implementation of gasneti_reghandler() (in gasnet_internal.c) */ /* #define GASNETC_AMREGISTER 1 */ /* define this to 1 if your conduit supports PSHM, but cannot use the default interfaces. (see template-conduit/gasnet_core.c and gasnet_pshm.h) */ /* #define GASNETC_GET_HANDLER 1 */ /* uncomment each line for which your conduit supports the corresponding token info query. */ #define GASNET_SUPPORTS_TI_SRCRANK 1 #define GASNET_SUPPORTS_TI_EP 1 #define GASNET_SUPPORTS_TI_ENTRY 1 #define GASNET_SUPPORTS_TI_IS_REQ 1 #define GASNET_SUPPORTS_TI_IS_LONG 1 // smp-conduit falls into a degenerate case with respect to the definition of a // "native" NPAM implementation, which is specified to only denote behavior of // the "network transport" which does not exist in smp-conduit. In smp-conduit // the *only* transport is the shared-memory one (which is guaranteed to provide // native behavior for NPAM Medium). // // Consequently, setting GASNET_NATIVE_NP_ALLOC_{REQ,REP}_MEDIUM is technically // redundant (and deliberately underspecified). However, it was deemed more // helpful than harmful to client authors to have them set, so that clients // don't need additional work to recognize/optimize for this special case. // // With GASNET_NATIVE_NP_ALLOC_{REQ,REP}_MEDIUM set, it becomes necessary to // also set GASNETC_BUILD_NP_{REQ,REP}_MEDIUM to ensure the reference // implementation is compiled. /* uncomment for each {Request,Reply} X {Medium,Long} pair for which your conduit implements the corresponding gasnetc_AM_{Prepare,Commit}*() in a "native" manner which "can avoid one or more payload copies relative to the corresponding fixed-payload AM call under the right conditions". See also "GASNETC_BUILD_NP_*", immediately below. */ // see "smp-conduit falls into a degenerate case", above #define GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM 1 #define GASNET_NATIVE_NP_ALLOC_REP_MEDIUM 1 /* #define GASNET_NATIVE_NP_ALLOC_REQ_LONG 1 */ /* #define GASNET_NATIVE_NP_ALLOC_REP_LONG 1 */ /* conduits may define to '1' (or '0') for {Request,Reply} X {Medium,Long} pairs to force (or prevent) compilation of the corresponding pieces of the conduit-independent reference implementation. If unset, the default is equivalent to '!GASNET_NATIVE_NP_ALLOC_[foo]'. In other words: by default the reference implementation is built if and only if the conduit is not claiming a "native" implementation. This default is correct for most conduits. The conduit-independent implementation works in terms of the internal functions gasnetc_AM{Request,Reply}{Medium,Long}V(). Therefore, your conduit must provide the V-suffixed functions for any case with the corresponding GASNETC_BUILD_NP_* equal to '1' (explicitly or by default). */ // see "smp-conduit falls into a degenerate case", above #define GASNETC_BUILD_NP_REQ_MEDIUM 1 #define GASNETC_BUILD_NP_REP_MEDIUM 1 /* #define GASNETC_BUILD_NP_REQ_LONG (###) */ /* #define GASNETC_BUILD_NP_REP_LONG (###) */ /* uncomment for each conduit-provided Commit{Req,Rep}{Medium,Long}() which has the numargs argument even in an NDEBUG build (it is always passed in DEBUG builds). */ //#define GASNETC_AM_COMMIT_REQ_MEDIUM_NARGS 1 //#define GASNETC_AM_COMMIT_REP_MEDIUM_NARGS 1 //#define GASNETC_AM_COMMIT_REQ_LONG_NARGS 1 //#define GASNETC_AM_COMMIT_REP_LONG_NARGS 1 /* uncomment if your conduit's gasnetc_AMRequest{Short,Medium,Long}V() include a call to gasneti_AMPoll (or equivalent) for progress. The preferred implementation is to Poll only in the M-suffixed calls and not the V-suffixed calls (and GASNETC_REQUESTV_POLLS undefined). Used only by reference implementations (if any) of Prepare/Commit. */ /* #define GASNETC_REQUESTV_POLLS 1 */ /* If your conduit uses conduit-specific extensions to the basic object types, then define the corresponding SIZEOF macros below to return the total length of the conduit-specific object, including the prefix portion which must be the matching GASNETI_[OBJECT]_COMMON fields. Similarly, *_HOOK macros should be defined as callbacks to perform conduit-specific initialization and finalization tasks, if any. If a given SIZEOF macro is defined, but the corresponding INIT_HOOK is not, then space beyond the COMMON fields will be zero-initialized. In all cases, GASNETC_[OBJECT]_EXTRA_DECLS provides the place to provide necessary declarations (since this file is included very early). */ //#define GASNETC_CLIENT_EXTRA_DECLS (###) //#define GASNETC_CLIENT_INIT_HOOK(i_client) (###) //#define GASNETC_CLIENT_FINI_HOOK(i_client) (###) //#define GASNETC_SIZEOF_CLIENT_T() (###) //#define GASNETC_SEGMENT_EXTRA_DECLS (###) //#define GASNETC_SEGMENT_INIT_HOOK(i_segment) (###) //#define GASNETC_SEGMENT_FINI_HOOK(i_segment) (###) //#define GASNETC_SIZEOF_SEGMENT_T() (###) //#define GASNETC_TM_EXTRA_DECLS (###) //#define GASNETC_TM_INIT_HOOK(i_tm) (###) //#define GASNETC_TM_FINI_HOOK(i_tm) (###) //#define GASNETC_SIZEOF_TM_T() (###) //#define GASNETC_EP_EXTRA_DECLS (###) //#define GASNETC_EP_INIT_HOOK(i_ep) (###) //#define GASNETC_EP_FINI_HOOK(i_ep) (###) //#define GASNETC_SIZEOF_EP_T() (###) // Uncomment the following defines if conduit provides the corresponding hook. // See gasnet_internal.h for prototypes and brief descriptions. //#define GASNETC_SEGMENT_ATTACH_HOOK 1 //#define GASNETC_SEGMENT_CREATE_HOOK 1 //#define GASNETC_SEGMENT_DESTROY_HOOK 1 //#define GASNETC_EP_BINDSEGMENT_HOOK 1 //#define GASNETC_EP_PUBLISHBOUNDSEGMENT_HOOK 1 // Uncomment the following defines if conduit provides the corresponding hook. // See other/kinds/gasnet_kinds_internal.h for prototypes and brief descriptions. //#define GASNETC_MK_CREATE_HOOK 1 //#define GASNETC_MK_DESTROY_HOOK 1 // If conduit supports GASNET_MAXEPS!=1, set default and (optional) max values here. // Leaving GASNETC_MAXEPS_DFLT unset will result in GASNET_MAXEPS=1, independent // of all other settings (appropriate for conduits without multi-ep support). // If set, GASNETC_MAXEPS_MAX it is used to limit a user's --with-maxeps (and a // global default limit is used otherwise). //#define GASNETC_MAXEPS_DFLT ### // default num endpoints this conduit supports, undef means no multi-ep support //#define GASNETC_MAXEPS_MAX ### // leave unset for default /* this can be used to add conduit-specific statistical collection values (see gasnet_trace.h) */ #define GASNETC_CONDUIT_STATS(CNT,VAL,TIME) #if GASNET_PSHM #define GASNETC_FATALSIGNAL_CLEANUP_CALLBACK(sig) gasnetc_fatalsignal_cleanup_callback(sig) extern void gasnetc_fatalsignal_cleanup_callback(int sig); #endif /* ------------------------------------------------------------------------------------ */ // Always loopback (self or PSHM) #define gex_Token_Info gasnetc_nbrhd_Token_Info // V-suffixed routines are unreachable since "nbrhd" Prepare/Commit // do all the work for Negotiated Payload AMs #define gasneti_AMRequestMediumV(tm,rank,hidx,src_addr,nbytes,lc_opt,flags,nargs,args) \ (gasneti_unreachable(), 0) #define gasneti_AMRequestLongV(tm,rank,hidx,src_addr,nbytes,dst_addr,lc_opt,flags,nargs,args) \ (gasneti_unreachable(), 0) #define gasneti_AMReplyMediumV(token,hidx,src_addr,nbytes,lc_opt,flags,nargs,args) \ (gasneti_unreachable(), 0) #define gasneti_AMReplyLongV(token,hidx,src_addr,nbytes,dst_addr,lc_opt,flags,nargs,args) \ (gasneti_unreachable(), 0) // No validated support for hugetlbfs w/ or w/o PSHM at this time and risk of // issues if auto-enabled on an HPE Cray EX system (e.g. bug 4473). #if GASNETI_ARCH_CRAYEX #undef GASNETI_USE_HUGETLBFS #endif #endif gasnet-2025.8.0/smp-conduit/gasnet_extended.c0000664000175000017500000001217715142313673021201 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/gasnet_extended.c $ * Description: GASNet Extended API Reference Implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include // for refbarrier.c #include #include /* ------------------------------------------------------------------------------------ */ /* Extended API Common Code ======================== Factored bits of extended API code common to most conduits, overridable when necessary */ #include "gasnet_extended_common.c" /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* called at startup to check configuration sanity */ static void gasnete_check_config(void) { gasneti_check_config_postattach(); //gasnete_check_config_amref(); - UNUSED gasneti_assert(sizeof(gasnete_eop_t) >= sizeof(void*)); } extern void gasnete_init(void) { static int firstcall = 1; GASNETI_TRACE_PRINTF(C,("gasnete_init()")); gasneti_assert(firstcall); /* make sure we haven't been called before */ firstcall = 0; gasnete_check_config(); /* check for sanity */ gasneti_assert(gasneti_nodes >= 1 && gasneti_mynode < gasneti_nodes); { gasneti_threaddata_t *threaddata = NULL; #if GASNETI_MAX_THREADS > 1 /* register first thread (optimization) */ threaddata = _gasneti_mythread_slow(); #else /* register only thread (required) */ threaddata = gasnete_new_threaddata(); #endif #if !GASNETI_DISABLE_REFERENCE_EOP /* cause the first pool of eops to be allocated (optimization) */ GASNET_POST_THREADINFO(threaddata); gasnete_eop_t *eop = gasnete_eop_new(threaddata); GASNETE_EOP_MARKDONE(eop); gasnete_eop_free(eop GASNETI_THREAD_PASS); #endif } /* Initialize barrier resources */ gasnete_barrier_init(); /* Initialize team/collectives */ gasnete_coll_init_subsystem(); /* Initialize VIS subsystem */ gasnete_vis_init(); } /* ------------------------------------------------------------------------------------ */ /* Get/Put: ======== */ /* Use some or all of the reference implementation of get/put in terms of AMs * Configuration appears in gasnet_extended_fwd.h */ //#include "gasnet_extended_amref.c" -- UNUSED /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (explicit event) ========================================================== */ /* ------------------------------------------------------------------------------------ */ /* Conduits not using the gasnete_amref_ versions should implement at least the following: gasnete_get_nb gasnete_put_nb smp-conduit's implementation appears in gasnet_extended_help_extra.h */ /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (implicit event) ========================================================== */ /* ------------------------------------------------------------------------------------ */ /* Conduits not using the gasnete_amref_ versions should implement at least the following: gasnete_get_nbi gasnete_put_nbi smp-conduit's implementation appears in gasnet_extended_help_extra.h */ /* ------------------------------------------------------------------------------------ */ /* Barriers: ========= */ /* use reference implementation of barrier */ #define GASNETI_GASNET_EXTENDED_REFBARRIER_C 1 #include "gasnet_extended_refbarrier.c" #undef GASNETI_GASNET_EXTENDED_REFBARRIER_C /* ------------------------------------------------------------------------------------ */ /* Vector, Indexed & Strided: ========================= */ /* use reference implementation of scatter/gather and strided */ #include "gasnet_refvis.h" /* ------------------------------------------------------------------------------------ */ /* Collectives: ============ */ /* use reference implementation of collectives */ #include "gasnet_refcoll.h" /* ------------------------------------------------------------------------------------ */ /* Remote Atomics: ============== */ /* use reference implementation of remote atomics */ #include "gasnet_refratomic.h" /* ------------------------------------------------------------------------------------ */ /* Handlers: ========= */ static gex_AM_Entry_t const gasnete_handlers[] = { #ifdef GASNETE_REFBARRIER_HANDLERS GASNETE_REFBARRIER_HANDLERS(), #endif #ifdef GASNETE_REFVIS_HANDLERS GASNETE_REFVIS_HANDLERS() #endif #ifdef GASNETE_REFCOLL_HANDLERS GASNETE_REFCOLL_HANDLERS() #endif #ifdef GASNETE_AMREF_HANDLERS GASNETE_AMREF_HANDLERS() #endif #ifdef GASNETE_AMRATOMIC_HANDLERS GASNETE_AMRATOMIC_HANDLERS() #endif /* ptr-width independent handlers */ /* ptr-width dependent handlers */ GASNETI_HANDLER_EOT }; extern gex_AM_Entry_t const *gasnete_get_handlertable(void) { return gasnete_handlers; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/smp-conduit/gasnet_core.h0000664000175000017500000001227415142313673020334 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/gasnet_core.h $ * Description: GASNet header for smp conduit core * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_H #define _GASNET_CORE_H #include /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ extern void gasnetc_exit(int _exitcode) GASNETI_NORETURN; GASNETI_NORETURNP(gasnetc_exit) #define gasnet_exit gasnetc_exit /* Some conduits permit gasnet_init(NULL,NULL). Define to 1 if this conduit supports this extension, or to 0 otherwise. */ #define GASNET_NULL_ARGV_OK 1 /* ------------------------------------------------------------------------------------ */ extern int gasnetc_Client_Init( gex_Client_t *_client_p, gex_EP_t *_ep_p, gex_TM_t *_tm_p, const char *_clientName, int *_argc, char ***_argv, gex_Flags_t _flags); // gasnetex.h handles name-shifting of gex_Client_Init() /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ typedef struct { gasneti_mutex_t lock; #if GASNETI_STATS_OR_TRACE gasneti_tick_t acquiretime; #endif } gex_HSL_t; #if GASNETI_STATS_OR_TRACE #define GASNETC_LOCK_STAT_INIT ,0 #else #define GASNETC_LOCK_STAT_INIT #endif #define GEX_HSL_INITIALIZER { \ GASNETI_MUTEX_INITIALIZER \ GASNETC_LOCK_STAT_INIT \ } /* decide whether we have "real" HSL's */ #if GASNETI_THREADS || /* need for safety */ \ GASNET_DEBUG || GASNETI_STATS_OR_TRACE /* or debug/tracing */ #ifdef GASNETC_NULL_HSL #error bad defn of GASNETC_NULL_HSL #endif #else #define GASNETC_NULL_HSL 1 #endif #if GASNETC_NULL_HSL /* HSL's unnecessary - compile away to nothing */ #define gex_HSL_Init(hsl) #define gex_HSL_Destroy(hsl) #define gex_HSL_Lock(hsl) #define gex_HSL_Unlock(hsl) #define gex_HSL_Trylock(hsl) GASNET_OK #else extern void gasnetc_hsl_init (gex_HSL_t *_hsl); extern void gasnetc_hsl_destroy(gex_HSL_t *_hsl); extern void gasnetc_hsl_lock (gex_HSL_t *_hsl); extern void gasnetc_hsl_unlock (gex_HSL_t *_hsl); extern int gasnetc_hsl_trylock(gex_HSL_t *_hsl) GASNETI_WARN_UNUSED_RESULT; #define gex_HSL_Init gasnetc_hsl_init #define gex_HSL_Destroy gasnetc_hsl_destroy #define gex_HSL_Lock gasnetc_hsl_lock #define gex_HSL_Unlock gasnetc_hsl_unlock #define gex_HSL_Trylock gasnetc_hsl_trylock #endif /* ------------------------------------------------------------------------------------ */ /* Active Message Size Limits ========================== */ #define gex_AM_MaxArgs() ((unsigned int)16) #define gex_AM_LUBRequestMedium() ((size_t)GASNETC_MAX_MEDIUM) #define gex_AM_LUBReplyMedium() ((size_t)GASNETC_MAX_MEDIUM) #define gex_AM_LUBRequestLong() ((size_t)GASNETC_MAX_LONG) #define gex_AM_LUBReplyLong() ((size_t)GASNETC_MAX_LONG) // TODO-EX: can these be improved upon? #define gasnetc_AM_MaxRequestMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS5(tm,rank,lc_opt,flags,nargs),gex_AM_LUBRequestMedium()) #define gasnetc_AM_MaxReplyMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS5(tm,rank,lc_opt,flags,nargs),gex_AM_LUBReplyMedium()) #define gasnetc_Token_MaxReplyMedium(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(token,lc_opt,flags,nargs),gex_AM_LUBReplyMedium()) #define gasnetc_AM_MaxRequestLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBRequestLong())) #define gasnetc_AM_MaxReplyLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBReplyLong())) #define gasnetc_Token_MaxReplyLong(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS3(token,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBReplyLong())) /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #if GASNET_PSHM #define GASNET_BLOCKUNTIL(cond) gasneti_polluntil(cond) #else #define GASNET_BLOCKUNTIL(cond) do { \ while (!(cond)) { \ GASNETI_WAITHOOK(); \ } \ gasneti_sync_reads(); \ } while (0) #endif /* ------------------------------------------------------------------------------------ */ #endif #include gasnet-2025.8.0/smp-conduit/gasnet_extended_fwd.h0000664000175000017500000000504515142313673022042 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/gasnet_extended_fwd.h $ * Description: GASNet Extended API Header (forward decls) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_EXTENDED_FWD_H #define _GASNET_EXTENDED_FWD_H #define GASNET_EXTENDED_VERSION GASNET_CORE_VERSION #define GASNET_EXTENDED_VERSION_STR _STRINGIFY(GASNET_EXTENDED_VERSION) #define GASNET_EXTENDED_NAME SMP #define GASNET_EXTENDED_NAME_STR _STRINGIFY(GASNET_EXTENDED_NAME) #define GASNETI_EOP_IS_HANDLE 1 /* if conduit-internal threads may call the Extended API and/or they may run progress functions, then define GASNETE_CONDUIT_THREADS_USING_TD to the maximum COUNT of such threads to allocate space for their threaddata */ #if 0 #define GASNETE_CONDUIT_THREADS_USING_TD ### #endif #if GASNET_PSHM #define GASNETE_COLL_CONDUIT_BARRIERS GASNETE_COLL_BARRIER_PSHM #define GASNETE_BARRIER_DEFAULT "PSHM" #define GASNETE_BARRIER_READENV() do { \ if(GASNETE_ISBARRIER("PSHM")) gasnete_coll_default_barrier_type = GASNETE_COLL_BARRIER_PSHM; \ } while (0) #define GASNETE_BARRIER_INIT(TEAM, TYPE) do { \ if ((TYPE) == GASNETE_COLL_BARRIER_PSHM && \ (TEAM) == GASNET_TEAM_ALL) { \ gasnete_pshmbarrier_init(TEAM); \ } \ } while (0) #endif /* GASNET_PSHM */ /* this can be used to add statistical collection values specific to the extended API implementation (see gasnet_help.h) */ #define GASNETE_CONDUIT_STATS(CNT,VAL,TIME) \ GASNETI_VIS_STATS(CNT,VAL,TIME) \ GASNETI_COLL_STATS(CNT,VAL,TIME) \ GASNETI_RATOMIC_STATS(CNT,VAL,TIME) \ CNT(C, DYNAMIC_THREADLOOKUP, cnt) #define GASNETE_AUXSEG_DECLS \ extern gasneti_auxseg_request_t gasnete_barr_auxseg_alloc(gasnet_seginfo_t *auxseg_info); #define GASNETE_AUXSEG_FNS() gasnete_barr_auxseg_alloc, /* NOT using the AM-based implementation of get/put */ #define GASNETE_USING_REF_EXTENDED_GET 0 #define GASNETE_USING_REF_EXTENDED_PUT 0 /* Compile out VIS algorithms that should never be used in shared memory */ #define GASNETE_USE_AMPIPELINE 0 #define GASNETE_USE_REMOTECONTIG_GATHER_SCATTER 0 /* All the "real work" is in gasnet_extended_help_extra.h */ #define GASNETE_HAVE_EXTENDED_HELP_EXTRA_H 1 #endif gasnet-2025.8.0/smp-conduit/gasnet_core.c0000664000175000017500000011756115142313673020334 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/gasnet_core.c $ * Description: GASNet smp conduit Implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include #include #include #include #include GASNETI_IDENT(gasnetc_IdentString_Version, "$GASNetCoreLibraryVersion: " GASNET_CORE_VERSION_STR " $"); GASNETI_IDENT(gasnetc_IdentString_Name, "$GASNetCoreLibraryName: " GASNET_CORE_NAME_STR " $"); gex_AM_Entry_t *gasnetc_handler; // TODO-EX: will be replaced with per-EP tables /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* called at startup to check configuration sanity */ static void gasnetc_check_config(void) { gasneti_check_config_preinit(); /* add code to do some sanity checks on the number of nodes, handlers * and/or segment sizes */ } static void gasnetc_bootstrapExchange(void *src, size_t len, void *dest) { #if GASNET_PSHM gasneti_assert(gasneti_request_pshmnet != NULL); gasneti_pshmnet_bootstrapExchange(gasneti_request_pshmnet, src, len, dest); #else gasneti_assert(gasneti_nodes == 1); /* trivial because we only have one node */ memmove(dest, src, len); #endif } static void gasnetc_bootstrapBroadcast(void *src, size_t len, void *dest, int rootnode) { #if GASNET_PSHM gasneti_assert(gasneti_request_pshmnet != NULL); gasneti_pshmnet_bootstrapBroadcast(gasneti_request_pshmnet, src, len, dest, rootnode); #else gasneti_assert(gasneti_nodes == 1); /* trivial because we only have one node */ gasneti_assert(rootnode == 0); memmove(dest, src, len); #endif } static void gasnetc_bootstrapBarrier(void) { /* add code here to implement an external barrier this barrier should not rely on AM or the GASNet API because it's used during bootstrapping before such things are fully functional It need not be particularly efficient, because we only call it a few times and only during bootstrapping - it just has to work correctly If your underlying spawning or batch system provides barrier functionality, that would probably be a good choice for this */ #if GASNET_PSHM gasneti_pshmnet_bootstrapBarrier(); #else gasneti_assert(gasneti_nodes == 1); /* trivial because we only have one node */ #endif } /* ------------------------------------------------------------------------------------ */ /* PSHM Support Functions ====================== */ #if GASNET_PSHM #include #include static int *gasnetc_fds = NULL; #define GASNETC_DEFAULT_EXITTIMEOUT_MAX 5. #define GASNETC_DEFAULT_EXITTIMEOUT_MIN 1. #define GASNETC_DEFAULT_EXITTIMEOUT_FACTOR 0.1 static double gasnetc_exittimeout = GASNETC_DEFAULT_EXITTIMEOUT_MAX; static int gasnetc_remoteexit_signal = SIGQUIT; static struct gasnetc_exit_data { gasneti_atomic_t master; gasneti_atomic_t exitcode; volatile sig_atomic_t pid_tbl[1]; /* Variable length */ } *gasnetc_exit_data = NULL; #define GASNETC_EXIT_DATA_SZ \ gasneti_offsetof(struct gasnetc_exit_data, pid_tbl[gasneti_nodes]) #ifdef GASNETC_USE_SOCKETPAIR #include #endif #ifdef HAVE_PR_SET_PDEATHSIG #include #include static int gasnetc_use_pdeathsig = 0; #endif /* Retain a non-zero exit code (first one if possible) */ static void gasnetc_set_exitcode(int exitcode) { if (exitcode && gasnetc_exit_data) { #ifdef GASNETI_HAVE_ATOMIC_CAS /* Retain the first non-zero exit code */ (void)gasneti_atomic_compare_and_swap(&gasnetc_exit_data->exitcode, 0, exitcode, GASNETI_ATOMIC_WMB_POST); #else /* Race is OK, since keeping first exit code is only desired, not required */ if (!gasneti_atomic_read(&gasnetc_exit_data->exitcode, 0)) { gasneti_atomic_set(&gasnetc_exit_data->exitcode, exitcode, GASNETI_ATOMIC_WMB_POST); } #endif } } static int gasnetc_get_exitcode(void) { /* assumes exit prior to allocation of gasnetc_exit_data is always an error */ return gasnetc_exit_data ? gasneti_atomic_read(&gasnetc_exit_data->exitcode, 0) : -1; } static void gasnetc_exit_barrier_notify(int exitcode) { if (gasnetc_exit_data) { gasnetc_set_exitcode(exitcode); gasnetc_exit_data->pid_tbl[gasneti_mynode] = 0; } } static int gasnetc_exit_barrier_timed_wait(void) { if (gasnetc_exit_data) { int64_t timeout = 1e9 * gasnetc_exittimeout; gasneti_tick_t start_time = gasneti_ticks_now(); gex_Rank_t i; gasneti_assert(timeout > 0); gasneti_local_rmb(); for (i = 0; i < gasneti_nodes; i++) { int expire = 0; gasneti_waituntil( ( gasnetc_exit_data->pid_tbl[i] == 0 ) || ( expire = (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) > timeout) )); if (expire) { /* Elect exactly one master */ return gasneti_atomic_decrement_and_test(&gasnetc_exit_data->master, 0); } } } return 0; } /* TODO: use a process group (would require SIGT{STP,TIN,TOU} handling) */ static void gasnetc_signal_job(int sig) { if (gasnetc_exit_data) { gex_Rank_t i; for (i = 0; i < gasneti_nodes; i++) { pid_t pid = gasnetc_exit_data->pid_tbl[i]; if (!pid || (i == gasneti_mynode)) continue; (void)kill(pid, sig); (void)kill(pid, SIGCONT); } } } extern void gasnetc_fatalsignal_cleanup_callback(int sig) { gasnetc_exit_barrier_notify(128 + sig); { // bug3624: pause to reduce the chance that concurrent crashes // across nodes might kill each other while backtraces are printing struct timeval tv; // use signal-safe sleep tv.tv_sec = 1; tv.tv_usec = 0; select(0, NULL, NULL, NULL, &tv); } gasnetc_signal_job(gasnetc_remoteexit_signal); } static void gasnetc_exit_sighand(int sig_recvd) { int sig_to_send = sig_recvd; int fatal = 0; switch (sig_recvd) { case SIGABRT: case SIGILL: case SIGSEGV: case SIGBUS: case SIGFPE: /* These signals indicates a bug in the exit handling code. */ (void)gasneti_reghandler(sig_recvd, SIG_DFL); /* avoid recursion - do as early as possible */ gasneti_console_message("ERROR","exit code received fatal signal %d - Terminating", sig_recvd); sig_to_send = SIGKILL; fatal = 1; break; case SIGALRM: { /* This signal indicates a non-collective exit */ static int count = 0; switch (count++) { case 0: sig_to_send = gasnetc_remoteexit_signal; break; case 1: sig_to_send = SIGTERM; break; default: sig_to_send = SIGKILL; break; } alarm((unsigned int)(1 + gasnetc_exittimeout)); break; } } /* Signals are forwarded to the rest of the job */ gasnetc_signal_job(sig_to_send); /* rearm */ if (!fatal) { gasneti_reghandler(sig_recvd, gasnetc_exit_sighand); } } static void gasnetc_remote_exit_sighand(int sig) { gasneti_sighandlerfn_t handler; /* Run the SIGQUIT handler, if any */ handler = gasneti_reghandler(SIGQUIT, SIG_IGN); if ((handler != gasneti_defaultSignalHandler) && #ifdef SIG_HOLD (handler != (gasneti_sighandlerfn_t)SIG_HOLD) && #endif (handler != (gasneti_sighandlerfn_t)SIG_ERR) && (handler != (gasneti_sighandlerfn_t)SIG_IGN) && (handler != (gasneti_sighandlerfn_t)SIG_DFL)) { (void)gasneti_reghandler(SIGQUIT, handler); #if 1 gasneti_raise(SIGQUIT); /* Note: Both ISO C and POSIX assure us that raise() won't return until after the signal handler * (if any) has executed. However, if that handler calls gasnetc_exit(), we'll never return here. */ #elif 0 kill(getpid(),SIGQUIT); #else handler(SIGQUIT); #endif } gasnetc_exit(0); } static int gasnetc_set_fl(int fd, unsigned int bits) { int flags = fcntl(fd, F_GETFL, 0); if (flags >= 0) { flags |= bits; if (fcntl(fd, F_SETFL, flags) < 0) return -1; } return flags; } static int gasnetc_clr_fl(int fd, unsigned int bits) { int flags = fcntl(fd, F_GETFL, 0); if (flags >= 0) { flags &= ~bits; if (fcntl(fd, F_SETFL, flags) < 0) return -1; } return flags; } #ifdef GASNETC_HAVE_O_ASYNC static void gasnetc_arm_sigio(int fd) { if (gasnetc_set_fl(fd, O_ASYNC) > 0) { (void) fcntl(fd, F_SETOWN, getpid()); } } static void gasnetc_disarm_sigio(int fd) { gasnetc_clr_fl(fd, O_ASYNC); } #endif static void gasnetc_fork_children(void) { gex_Rank_t i; /* An initial pid table is kept in private memory */ gasnetc_exit_data = gasneti_calloc(1, GASNETC_EXIT_DATA_SZ); gasnetc_exit_data->pid_tbl[0] = getpid(); /* Space for pipes/sockets connecting node 0 to others */ gasnetc_fds = gasneti_malloc(2 * gasneti_nodes * sizeof(int)); gasneti_leak(gasnetc_fds); gasneti_assert(gasneti_mynode == -1); { /* set O_APPEND on stdout and stderr (same reasons as in bug 2136) */ int rc; rc = gasnetc_set_fl(STDOUT_FILENO, O_APPEND); gasneti_assert( rc >= 0 ); rc = gasnetc_set_fl(STDERR_FILENO, O_APPEND); gasneti_assert( rc >= 0 ); } gasneti_mynode = 0; for (i = 1; i < gasneti_nodes; i++) { int rc, fork_return; /* pipe or socket for intra-process bootstrap comms. * Sockets are used on systems where they can trigger a signal on disconnect. * Otherwise, we use pipes (which we assume are cheaper than PF_LOCAL sockets). * Note that we still try to arm pipes for SIGIO, but the behavior is less portable. */ #if defined(GASNETC_USE_SOCKETPAIR) && defined(GASNETC_HAVE_O_ASYNC) #if defined(PF_LOCAL) rc = socketpair(PF_LOCAL, SOCK_STREAM, 0, &gasnetc_fds[2 * i]); #elif defined(PF_UNIX) rc = socketpair(PF_UNIX, SOCK_STREAM, 0, &gasnetc_fds[2 * i]); #endif #else rc = pipe(&gasnetc_fds[2 * i]); #endif if (rc < 0) { gasneti_fatalerror("Failed to create control pipe/socket for process %i: (%d) %s", i, errno, strerror(errno)); } fork_return = fork(); if (fork_return < 0) { gasnetc_signal_job(SIGTERM); gasneti_fatalerror("Failed to fork process %i: (%d) %s", i, errno, strerror(errno)); } if (fork_return) { /* I am parent */ gasnetc_exit_data->pid_tbl[i] = fork_return; gasneti_assert_zeroret( close(gasnetc_fds[2 * i]) ); /* unused end of pipe/socket */ } else { /* I am child */ gasneti_mynode = i; if (freopen("/dev/null", "r", stdin) != stdin) { gasneti_fatalerror("GASNet node %d failed to redirect STDIN", (int)i); } gasneti_free(gasnetc_exit_data); gasnetc_exit_data = NULL; #ifdef HAVE_PR_SET_PDEATHSIG if (gasnetc_use_pdeathsig) { /* Request generation of signal when parent exits */ prctl(PR_SET_PDEATHSIG, gasnetc_remoteexit_signal); } #endif /* close unused end of pipes/sockets */ for (i = 1; i <= gasneti_mynode; ++i) { gasneti_assert_zeroret( close(gasnetc_fds[2 * i + 1]) ); } return; } } } static void gasnetc_join_children(void) { int children = gasneti_nodes - 1; // In case we run nested in a SIGALRM-induced exit, we explicitly // unblock SIGALRM, since alarm() *might* not do so itself. gasneti_unblocksig(SIGALRM); gasneti_reghandler(SIGALRM, gasnetc_exit_sighand); alarm((unsigned int)(1 + gasnetc_exittimeout)); while (children) { int pid, status, rc; pid = wait(&status); if (pid < 0) { if (errno == EINTR) continue; /* Probably the alarm */ if (errno == ECHILD) break; /* We lost count somehow. */ gasnetc_signal_job(SIGTERM); gasneti_fatalerror("Unexpected wait() failure: %d(%s) - Terminating job", errno, strerror(errno)); } --children; /* Job will return w/ first non-zero exit code observed */ rc = -1; /* Unknown */ if (WIFEXITED(status)) { rc = WEXITSTATUS(status); } else if (WIFSIGNALED(status)) { rc = 128 + WTERMSIG(status); /* Consistent w/ most shells */ } gasnetc_set_exitcode(rc); } alarm(0); } // Broadcast usable prior to bring-up of PSHM // This is used for the NbrhdBcast fn in gasneti_pshm_init() // Also suitable as a HostBcast // However, supports only (root == 0) static void gasnetc_bootstrapSubsetBroadcast(void *src, size_t len, void *dest, int root) { ssize_t rc; int i; gasneti_assert(gasnetc_fds != NULL); gasneti_assert(root == 0); if (gasneti_mynode == 0) { for (i = 1; i < gasneti_nodes; ++i) { do { rc = write(gasnetc_fds[2 * i + 1], src, len); /* retry on interruption */ } while ((rc == -1) && (errno == EINTR)); gasneti_assert(rc == len); } memmove(dest, src, len); } else { do { rc = read(gasnetc_fds[2 * gasneti_mynode], dest, len); /* retry on interruption */ } while ((rc == -1) && (errno == EINTR)); if (!rc) { /* rc==0 occurs only if node0 exited prematurely */ gasneti_fatalerror("Node0 died unexpectedly"); } gasneti_assert(rc == len); } } static int gasnetc_get_pshm_nodecount(void) { gex_Rank_t nodes = gasneti_getenv_int_withdefault("GASNET_PSHM_NODES", 0, 0); int politedefault; if (nodes > GASNETI_PSHM_MAX_NODES) { gasneti_fatalerror("Nodes requested (%d) > maximum (%d)", (int)nodes, GASNETI_PSHM_MAX_NODES); } else if (nodes == 0) { gasneti_console_message("WARNING","GASNET_PSHM_NODES not specified: running with 1 process. Did you mean to launch using gasnetrun_smp?"); nodes = 1; } /* Set default to 'polite' synchronization if nodes > CPU's */ politedefault = gasnett_cpu_count() > 0 && nodes > gasnett_cpu_count(); gasnet_set_waitmode(politedefault ? GASNET_WAIT_BLOCK : GASNET_WAIT_SPIN); return nodes; } #else /* PSHM */ static void gasnetc_bootstrapSubsetBroadcast(void *src, size_t len, void *dest, int root) { gasneti_assert(gasneti_mynode == 0); gasneti_assert(root == 0); GASNETI_MEMCPY_SAFE_IDENTICAL(dest, src, len); } #endif /* PSHM */ /* ------------------------------------------------------------------------------------ */ /* Fork()-based Spawner ==================== */ GASNETI_IDENT(gasnetc_IdentString_HaveFORKSpawner, "$GASNetFORKSpawner: 1 $"); static gasneti_spawnerfn_t const fork_spawner; static gasneti_spawnerfn_t const * gasnetc_bootstrapInit_fork(int *argc, char ***argv, gex_Rank_t *nodes, gex_Rank_t *mynode) { #if GASNET_PSHM gasneti_nodes = gasnetc_get_pshm_nodecount(); #ifdef GASNETC_REMOTEEXIT_SIGNAL gasnetc_remoteexit_signal = GASNETC_REMOTEEXIT_SIGNAL; #elif defined(GASNETC_HAVE_O_ASYNC) gasnetc_remoteexit_signal = SIGIO; #elif defined(SIGURG) gasnetc_remoteexit_signal = SIGURG; #else gasnetc_remoteexit_signal = SIGUSR1; #endif #if defined(HAVE_PR_SET_PDEATHSIG) && !defined(GASNETC_USE_SOCKETPAIR) { /* check safety of prctl(PR_SET_PDEATHSIG, ...) */ struct utsname name; if (0 == uname(&name)) { const char *dot = strchr(name.release,'.'); if (NULL != dot) { int major = atoi(name.release); int minor = atoi(dot + 1); gasnetc_use_pdeathsig = ((100 * major + minor) >= 206); /* 2.6.0 kernel or newer */ } } } #endif /* A fork in the road! */ gasnetc_fork_children(); // sets gasneti_mynode #else gasneti_mynode = 0; gasneti_nodes = 1; #endif return &fork_spawner; } static void gasnetc_bootstrapFini(void) { #if GASNET_PSHM if (gasneti_mynode) { gasnetc_join_children(); } #endif } static gasneti_spawnerfn_t const fork_spawner = { gasnetc_bootstrapBarrier, gasnetc_bootstrapExchange, gasnetc_bootstrapBroadcast, gasnetc_bootstrapSubsetBroadcast, // Nbhrhd gasnetc_bootstrapSubsetBroadcast, // Host NULL, // Alltoall (unused) NULL, // Abort (unused) NULL, // Cleanup (unused) gasnetc_bootstrapFini, }; /* ------------------------------------------------------------------------------------ */ // Spawner used by the conduit static gasneti_spawnerfn_t const *gasnetc_spawner = NULL; // Spawner (if any) tested in gasnet_diagnostic.c // Will never point to conduit-specific one, which cannot pass the tests. gasneti_spawnerfn_t const *gasneti_spawner = NULL; static int gasnetc_init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { #if GASNET_PSHM int i; #endif /* check system sanity */ gasnetc_check_config(); if (gasneti_init_done) GASNETI_RETURN_ERRR(NOT_INIT, "GASNet already initialized"); gasneti_init_done = 1; /* enable early to allow tracing */ gasneti_spawn_verbose = gasneti_getenv_yesno_withdefault("GASNET_SPAWN_VERBOSE",0); if (gasneti_spawn_verbose) gasneti_console_message("gasnetc_init","about to spawn..."); /* Must init timers after global env, and preferably before tracing */ /* Note that we are intentionly doing this before we fork() */ GASNETI_TICKS_INIT(); /* add code here to bootstrap the nodes for your conduit */ const char *spawner_env = gasneti_getenv_withdefault("GASNET_SMP_SPAWNER", GASNETC_DEFAULT_SPAWNER); if (! gasneti_strcasecmp(spawner_env, "FORK")) { gasnetc_spawner = gasnetc_bootstrapInit_fork(argc, argv, &gasneti_nodes, &gasneti_mynode); } else { gasnetc_spawner = gasneti_spawnerInit(argc, argv, NULL, &gasneti_nodes, &gasneti_mynode); gasneti_spawner = gasnetc_spawner; } if (!gasnetc_spawner) GASNETI_RETURN_ERRR(NOT_INIT, "GASNet job spawn failed"); #if GASNET_PSHM gasneti_reghandler(gasnetc_remoteexit_signal, gasnetc_remote_exit_sighand); gasnetc_exittimeout = gasneti_get_exittimeout(GASNETC_DEFAULT_EXITTIMEOUT_MAX, GASNETC_DEFAULT_EXITTIMEOUT_MIN, GASNETC_DEFAULT_EXITTIMEOUT_FACTOR, GASNETC_DEFAULT_EXITTIMEOUT_MIN); #endif gasneti_freezeForDebugger(); // bug 4596: must come AFTER worker process creation /* enable tracing */ gasneti_trace_init(argc, argv); if (gasnetc_spawner == &fork_spawner) { /* Trivial all-zero nodemap */ gasneti_nodemap = gasneti_calloc(gasneti_nodes, sizeof(gex_Rank_t)); gasneti_nodemapParse(); } else { gasneti_nodemapInit(gasnetc_spawner->Exchange, NULL, 0, 0); if (gasneti_mysupernode.grp_count != 1) { #if GASNET_PSHM gasneti_fatalerror("Invalid attempt to launch a multi-host smp-conduit job. " "For multi-host jobs, please rebuild your executable with a " "different conduit. For smp-conduit jobs, please ensure " "your job spawner places processes on just a single host."); #else gasneti_fatalerror("Invalid attempt to launch a multi-process smp-conduit job " "without PSHM. For multi-process support in smp-conduit, " "please reconfigure GASNet with --enable-pshm."); #endif } } if (gasneti_spawn_verbose) { gasneti_console_message("gasnetc_init","spawn successful - proc %i/%i starting...", gasneti_mynode, gasneti_nodes); } #if GASNET_PSHM if (gasnetc_spawner == &fork_spawner) { #ifdef HAVE_PR_SET_PDEATHSIG if (gasnetc_use_pdeathsig){ GASNETI_TRACE_PRINTF(C,("using PR_SET_PDEATHSIG for process control")); } #endif #ifdef GASNETC_USE_SOCKETPAIR GASNETI_TRACE_PRINTF(C,("using SIGIO for process control")); #endif } { struct gasnetc_exit_data *tmp; tmp = gasneti_pshm_init(gasnetc_spawner->NbrhdBroadcast, GASNETC_EXIT_DATA_SZ); if (gasnetc_spawner != &fork_spawner) { // Fill-in the pid table in shared space tmp->pid_tbl[gasneti_mynode] = getpid(); } else if (!gasneti_mynode) { // Copy the pre-fork() pid table to shared space GASNETI_MEMCPY(tmp, gasnetc_exit_data, GASNETC_EXIT_DATA_SZ); gasneti_free(gasnetc_exit_data); } if (!gasneti_mynode) { gasneti_atomic_set(&tmp->master, 1, 0); gasneti_atomic_set(&tmp->exitcode, 0, 0); } gasnetc_exit_data = tmp; gasnetc_spawner->Barrier(); } // Done with bootstrap comms (if any) over gasnetc_fds[] if (! gasnetc_fds) { // Nothing to do here } else if (0 == gasneti_mynode) { for (i = 1; i < gasneti_nodes; ++i) { const int fd = gasnetc_fds[2 * i + 1]; #ifdef GASNETC_HAVE_O_ASYNC /* Arm for SIGIO when any child closes the socket/pipe */ gasnetc_arm_sigio(fd); #else gasneti_assert_zeroret( close(fd) ); #endif } } else { const int fd = gasnetc_fds[2 * gasneti_mynode]; /* Arm for SIGIO when parent (node0) closes the socket/pipe */ #ifdef GASNETC_HAVE_O_ASYNC gasnetc_arm_sigio(fd); #else gasneti_assert_zeroret( close(fd) ); #endif } #endif // Create first Client, EP and TM *here*, for use in subsequent bootstrap communication { // allocate the client object gasneti_Client_t client = gasneti_alloc_client(clientName, flags); *client_p = gasneti_export_client(client); // create the initial endpoint with internal handlers if (gex_EP_Create(ep_p, *client_p, GEX_EP_CAPABILITY_ALL, flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error creating initial endpoint"); gasneti_EP_t ep = gasneti_import_ep(*ep_p); gasnetc_handler = ep->_amtbl; // TODO-EX: this global variable to be removed // create the tm gasneti_TM_t tm = gasneti_alloc_tm(ep, gasneti_mynode, gasneti_nodes, flags); *tm_p = gasneti_export_tm(tm); } gasneti_attach_done = 1; // Ready to use AM Short and Medium for bootstrap comms uintptr_t mmap_limit; #if HAVE_MMAP // Bound per-host (sharedLimit) argument to gasneti_segmentLimit() // while properly reserving space for aux segments. uint64_t sharedLimit = gasneti_sharedLimit(); uint64_t hostAuxSegs = gasneti_myhost.node_count * gasneti_auxseg_preinit(); if (sharedLimit <= hostAuxSegs) { gasneti_fatalerror("per-host segment limit %"PRIu64" is too small to accommodate %i aux segments, " "total size %"PRIu64". You may need to adjust OS shared memory limits.", sharedLimit, gasneti_myhost.node_count, hostAuxSegs); } sharedLimit -= hostAuxSegs; mmap_limit = gasneti_segmentLimit((uintptr_t)-1, sharedLimit, NULL, gasnetc_spawner->Barrier); #else // TODO-EX: we can at least look at rlimits but such logic belongs in conduit-indep code mmap_limit = (intptr_t)-1; #endif /* allocate and attach an aux segment */ (void) gasneti_auxsegAttach((uintptr_t)-1, gasnetc_spawner->Exchange); /* determine Max{Local,GLobal}SegmentSize */ gasneti_segmentInit(mmap_limit, gasnetc_spawner->Exchange, flags); #if 0 /* Enable this if you wish to use the default GASNet services for broadcasting the environment from one compute node to all the others (for use in gasnet_getenv(), which needs to return environment variable values from the "spawning console"). You need to provide two functions (gasnetc_bootstrapExchange and gasnetc_bootstrapBroadcast) which the system can safely and immediately use to broadcast and exchange information between nodes (gasnetc_bootstrapBroadcast is optional but highly recommended). See gasnet/other/mpi-spawner/gasnet_bootstrap_mpi.c for definitions of these two functions in terms of MPI collective operations. This system assumes that at least one of the compute nodes has a copy of the full environment from the "spawning console" (if this is not true, you'll need to implement something yourself to get the values from the spawning console) If your job system already always propagates environment variables to all the compute nodes, then you probably don't need this. */ gasneti_setupGlobalEnvironment(gasneti_nodes, gasneti_mynode, gasnetc_bootstrapExchange, gasnetc_bootstrapBroadcast); #endif return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ extern int gasnetc_attach_primary(gex_Flags_t flags) { /* ------------------------------------------------------------------------------------ */ /* register fatal signal handlers */ /* catch fatal signals and convert to SIGQUIT */ gasneti_registerSignalHandlers(gasneti_defaultSignalHandler); /* register any custom signal handlers required by your conduit * (e.g. to support interrupt-based messaging) */ // register process exit-time hook gasneti_registerExitHandler(gasnetc_exit); /* ------------------------------------------------------------------------------------ */ /* primary attach complete */ gasneti_attach_done = 1; gasnetc_spawner->Barrier(); GASNETI_TRACE_PRINTF(C,("gasnetc_attach_primary(): primary attach complete")); gasnete_init(); /* init the extended API */ gasneti_nodemapFini(); /* ensure extended API is initialized across nodes */ gasnetc_spawner->Barrier(); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ // TODO-EX: this is a candidate for factorization (once we understand the per-conduit variations) extern int gasnetc_Client_Init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { gasneti_assert(client_p); gasneti_assert(ep_p); gasneti_assert(tm_p); gasneti_assert(clientName); #if !GASNET_NULL_ARGV_OK gasneti_assert(argc); gasneti_assert(argv); #endif // main init // TODO-EX: must split off per-client and per-endpoint portions if (!gasneti_init_done) { // First client // NOTE: gasnetc_init() creates the first Client, EP and TM for use in bootstrap comms int retval = gasnetc_init(client_p, ep_p, tm_p, clientName, argc, argv, flags); if (retval != GASNET_OK) GASNETI_RETURN(retval); #if 0 /* called within gasnetc_init to allow init tracing */ gasneti_trace_init(argc, argv); #endif } else { gasneti_fatalerror("No multi-client support"); } // Do NOT move this prior to the gasneti_trace_init() call GASNETI_TRACE_PRINTF(O,("gex_Client_Init: name='%s' argc_p=%p argv_p=%p flags=%d", clientName, (void *)argc, (void *)argv, flags)); if (0 == (flags & GASNETI_FLAG_INIT_LEGACY)) { /* primary attach */ if (GASNET_OK != gasnetc_attach_primary(flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error in primary attach"); /* ensure everything is initialized across all nodes */ gasnet_barrier(0, GASNET_BARRIERFLAG_UNNAMED); } else { gasneti_attach_done = 0; // Pending client call to gasnet_attach() } return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ extern void gasnetc_exit(int exitcode) { /* once we start a shutdown, ignore all future SIGQUIT signals or we risk reentrancy */ gasneti_reghandler(SIGQUIT, SIG_IGN); #if GASNET_PSHM /* same goes for the remote exit signal */ gasneti_reghandler(gasnetc_remoteexit_signal, SIG_IGN); #ifdef HAVE_PR_SET_PDEATHSIG if (gasneti_mynode && gasnetc_use_pdeathsig) { /* Disable generation of signal when parent exits */ prctl(PR_SET_PDEATHSIG, 0); } #endif #ifdef GASNETC_HAVE_O_ASYNC if (gasnetc_fds) { /* Disable generation of SIGIO when parent or children exits */ if (0 == gasneti_mynode) { int i; for (i = 1; i < gasneti_nodes; ++i) { gasnetc_disarm_sigio(gasnetc_fds[2 * i + 1]); } } else { gasnetc_disarm_sigio(gasnetc_fds[2 * gasneti_mynode]); } } #endif gasnetc_exit_barrier_notify(exitcode); #endif { /* ensure only one thread ever continues past this point */ static gasneti_mutex_t exit_lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&exit_lock); } if (gasneti_spawn_verbose) gasneti_console_message("EXIT STATE","gasnet_exit(%i)",exitcode); else GASNETI_TRACE_PRINTF(C,("gasnet_exit(%i)\n", exitcode)); gasneti_flush_streams(); gasneti_trace_finish(); gasneti_sched_yield(); /* add code here to terminate the job across _all_ nodes with gasneti_killmyprocess(exitcode) (not regular exit()), preferably after raising a SIGQUIT to inform the client of the exit */ #if GASNET_PSHM /* Attempt to coordinate the exit */ gasneti_registerSignalHandlers(gasnetc_exit_sighand); if (gasnetc_exit_barrier_timed_wait()) { /* Invoke directly, not via SIGALRM */ gasnetc_exit_sighand(SIGALRM); } gasnetc_spawner->Fini(); exitcode = gasnetc_get_exitcode(); #endif gasneti_killmyprocess(exitcode); } /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #if GASNET_PSHM /* (###) GASNETC_GET_HANDLER * If your conduit will support PSHM, then there needs to be a way * for PSHM to see your handler table. If you use the recommended * implementation then you don't need to do anything special. * Othwerwise, #define GASNETC_GET_HANDLER in gasnet_core_fwd.h and * implement gasnetc_get_handler() as a macro in * gasnet_core_internal.h */ #endif #if GASNET_PSHM extern int gasnetc_AMPoll(GASNETI_THREAD_FARG_ALONE) { GASNETI_CHECKATTACH(); return gasneti_AMPSHMPoll(0 GASNETI_THREAD_PASS); } #else /* no polling required for smp-conduit */ #endif /* ------------------------------------------------------------------------------------ */ /* Active Message Request Functions ================================ */ // TODO-EX: only IMMEDIATE implemented #define GASNETC_SUPPORTED_AM_FLAGS (GEX_FLAG_IMMEDIATE|GASNETI_FLAG_G2EX_DEBUG) extern int gasnetc_AMRequestShortM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { int retval; va_list argptr; gasneti_assert(!(flags & ~GASNETC_SUPPORTED_AM_FLAGS)); GASNETI_COMMON_AMREQUESTSHORT(tm,rank,handler,flags,numargs); GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* poll at least once, to assure forward progress */ va_start(argptr, numargs); /* pass in last argument */ /* call the generic requestor */ gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); retval = gasnetc_nbrhd_RequestGeneric( gasneti_Short, jobrank, handler, 0, 0, 0, flags, numargs, argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } extern int gasnetc_AMRequestMediumM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { int retval; va_list argptr; gasneti_assert(!(flags & ~GASNETC_SUPPORTED_AM_FLAGS)); GASNETI_COMMON_AMREQUESTMEDIUM(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs); gasneti_leaf_finish(lc_opt); // always locally completed GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* poll at least once, to assure forward progress */ va_start(argptr, numargs); /* pass in last argument */ /* call the generic requestor */ gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); retval = gasnetc_nbrhd_RequestGeneric( gasneti_Medium, jobrank, handler, source_addr, nbytes, 0, flags, numargs, argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } extern int gasnetc_AMRequestLongM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { int retval; va_list argptr; gasneti_assert(!(flags & ~(GASNETC_SUPPORTED_AM_FLAGS|GASNETI_FLAG_PEER_SEG_AUX))); // TODO-EX: implement more GASNETI_COMMON_AMREQUESTLONG(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); gasneti_leaf_finish(lc_opt); // always locally completed GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* poll at least once, to assure forward progress */ va_start(argptr, numargs); /* pass in last argument */ /* call the generic requestor */ gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); retval = gasnetc_nbrhd_RequestGeneric( gasneti_Long, jobrank, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } extern int gasnetc_AMReplyShortM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags, int numargs, ...) { int retval; va_list argptr; gasneti_assert(!(flags & ~GASNETC_SUPPORTED_AM_FLAGS)); GASNETI_COMMON_AMREPLYSHORT(token,handler,flags,numargs); va_start(argptr, numargs); /* pass in last argument */ /* call the generic requestor */ retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Short, token, handler, 0, 0, 0, flags, numargs, argptr); va_end(argptr); return retval; } extern int gasnetc_AMReplyMediumM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { int retval; va_list argptr; gasneti_assert(!(flags & ~GASNETC_SUPPORTED_AM_FLAGS)); GASNETI_COMMON_AMREPLYMEDIUM(token,handler,source_addr,nbytes,lc_opt,flags,numargs); gasneti_leaf_finish(lc_opt); // always locally completed va_start(argptr, numargs); /* pass in last argument */ /* call the generic requestor */ retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Medium, token, handler, source_addr, nbytes, 0, flags, numargs, argptr); va_end(argptr); return retval; } extern int gasnetc_AMReplyLongM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { int retval; va_list argptr; gasneti_assert(!(flags & ~(GASNETC_SUPPORTED_AM_FLAGS|GASNETI_FLAG_PEER_SEG_AUX))); // TODO-EX: implement more GASNETI_COMMON_AMREPLYLONG(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); gasneti_leaf_finish(lc_opt); // always locally completed va_start(argptr, numargs); /* pass in last argument */ /* call the generic requestor */ retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Long, token, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ #if !GASNETC_NULL_HSL extern void gasnetc_hsl_init (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); gasneti_mutex_init(&(hsl->lock)); } extern void gasnetc_hsl_destroy(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); gasneti_mutex_destroy(&(hsl->lock)); } extern void gasnetc_hsl_lock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); { #if GASNETI_STATS_OR_TRACE gasneti_tick_t startlock = GASNETI_TICKS_NOW_IFENABLED(L); #endif #if GASNETC_HSL_SPINLOCK if_pf (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { if (gasneti_wait_mode == GASNET_WAIT_SPIN) { while (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { gasneti_spinloop_hint(); } } else { gasneti_mutex_lock(&(hsl->lock)); } } #else gasneti_mutex_lock(&(hsl->lock)); #endif #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); GASNETI_TRACE_EVENT_TIME(L, HSL_LOCK, hsl->acquiretime-startlock); #endif } } extern void gasnetc_hsl_unlock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); GASNETI_TRACE_EVENT_TIME(L, HSL_UNLOCK, GASNETI_TICKS_NOW_IFENABLED(L)-hsl->acquiretime); gasneti_mutex_unlock(&(hsl->lock)); } extern int gasnetc_hsl_trylock(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); { int locked = (gasneti_mutex_trylock(&(hsl->lock)) == 0); GASNETI_TRACE_EVENT_VAL(L, HSL_TRYLOCK, locked); if (locked) { #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); #endif } return locked ? GASNET_OK : GASNET_ERR_NOT_READY; } } #endif /* ------------------------------------------------------------------------------------ */ /* Private Handlers: ================ see mpi-conduit and extended-ref for examples on how to declare AM handlers here (for internal conduit use in bootstrapping, job management, etc.) */ static gex_AM_Entry_t const gasnetc_handlers[] = { GASNETC_COMMON_HANDLERS(), /* ptr-width independent handlers */ /* ptr-width dependent handlers */ GASNETI_HANDLER_EOT }; gex_AM_Entry_t const *gasnetc_get_handlertable(void) { return gasnetc_handlers; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/smp-conduit/contrib/0000775000175000017500000000000015142313673017324 5ustar alastairalastairgasnet-2025.8.0/smp-conduit/contrib/gasnetrun_smp.in0000664000175000017500000000117115142313673022541 0ustar alastairalastair#!@BOURNE_SHELL@ GASNET_SMP_SPAWNER="${GASNET_SMP_SPAWNER:-@GASNET_SMP_SPAWNER_CONF@}" export GASNET_SMP_SPAWNER GASNET_SPAWN_CONDUIT=SMP export GASNET_SPAWN_CONDUIT @MPIRUN_COMMON@ @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_SPAWN_HAVE_MPI=1 @HAVE_BOOTSTRAP_MPI_FALSE@GASNET_SPAWN_HAVE_MPI=0 export GASNET_SPAWN_HAVE_MPI @HAVE_BOOTSTRAP_PMI_TRUE@GASNET_SPAWN_HAVE_PMI=1 @HAVE_BOOTSTRAP_PMI_FALSE@GASNET_SPAWN_HAVE_PMI=0 export GASNET_SPAWN_HAVE_PMI @HAVE_BOOTSTRAP_SSH_TRUE@GASNET_SPAWN_HAVE_SSH=1 @HAVE_BOOTSTRAP_SSH_FALSE@GASNET_SPAWN_HAVE_SSH=0 export GASNET_SPAWN_HAVE_SSH GASNET_SPAWN_HAVE_FORK=1 export GASNET_SPAWN_HAVE_FORK @PERLSTART@ gasnet-2025.8.0/smp-conduit/contrib/Makefile.am0000664000175000017500000000313415142313673021361 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/contrib/Makefile.am $ # Description: Makefile for GASNet SMP spawner # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 # Use of the MPI/PMI spawning support is optional if HAVE_BOOTSTRAP_MPI mpi_target_pl = gasnetrun_smp-mpi.pl $(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl cp -f "$?" $@ else if HAVE_BOOTSTRAP_PMI mpi_target_pl = gasnetrun_smp-mpi.pl $(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl cp -f "$?" $@ else mpi_target_pl = endif endif target = gasnetrun_smp target_pl = $(target).pl # Need a bin_DATA rule, but automake disallows that. So, fake it. dotpldir = $(bindir) # Make sure the perl script and shell wrapper are always current locally. # This ensures we can run from the build directory if needed. $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart $(top_builddir)/other/mpirun_common: $(top_srcdir)/other/mpirun_common.in @cd $(top_builddir)/other && $(MAKE) mpirun_common $(target): $(top_builddir)/other/perlstart $(top_builddir)/other/mpirun_common all-local: $(target_pl) $(target) $(mpi_target_pl) $(target_pl): $(top_srcdir)/other/spawner/gasnetrun.pl cp -f "$<" $@ DISTCLEANFILES = $(target) $(target_pl) $(mpi_target_pl) # Conditionally install the .pl and its wrapper if USE_SMP_CONDUIT scripts = $(target) data = $(target_pl) $(mpi_target_pl) else scripts = data = endif bin_SCRIPTS = $(scripts) dotpl_DATA = $(data) gasnet-2025.8.0/smp-conduit/contrib/Makefile.in0000664000175000017500000005364615142313673021407 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/contrib/Makefile.am $ # Description: Makefile for GASNet SMP spawner # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = smp-conduit/contrib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = gasnetrun_smp CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dotpl_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gasnetrun_smp.in \ $(top_srcdir)/config-aux/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = gasnetrun_smp target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_FALSE@mpi_target_pl = @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@mpi_target_pl = gasnetrun_smp-mpi.pl # Use of the MPI/PMI spawning support is optional @HAVE_BOOTSTRAP_MPI_TRUE@mpi_target_pl = gasnetrun_smp-mpi.pl target_pl = $(target).pl # Need a bin_DATA rule, but automake disallows that. So, fake it. dotpldir = $(bindir) DISTCLEANFILES = $(target) $(target_pl) $(mpi_target_pl) @USE_SMP_CONDUIT_FALSE@scripts = # Conditionally install the .pl and its wrapper @USE_SMP_CONDUIT_TRUE@scripts = $(target) @USE_SMP_CONDUIT_FALSE@data = @USE_SMP_CONDUIT_TRUE@data = $(target_pl) $(mpi_target_pl) bin_SCRIPTS = $(scripts) dotpl_DATA = $(data) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign smp-conduit/contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign smp-conduit/contrib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gasnetrun_smp: $(top_builddir)/config.status $(srcdir)/gasnetrun_smp.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) install-dotplDATA: $(dotpl_DATA) @$(NORMAL_INSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dotpldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dotpldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dotpldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dotpldir)" || exit $$?; \ done uninstall-dotplDATA: @$(NORMAL_UNINSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(dotpldir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) all-local installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dotplDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-dotplDATA .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ cscopelist-am ctags-am distclean distclean-generic distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am \ install-dotplDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-dotplDATA .PRECIOUS: Makefile @HAVE_BOOTSTRAP_MPI_TRUE@$(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl @HAVE_BOOTSTRAP_MPI_TRUE@ cp -f "$?" $@ @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@$(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@ cp -f "$?" $@ # Make sure the perl script and shell wrapper are always current locally. # This ensures we can run from the build directory if needed. $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart $(top_builddir)/other/mpirun_common: $(top_srcdir)/other/mpirun_common.in @cd $(top_builddir)/other && $(MAKE) mpirun_common $(target): $(top_builddir)/other/perlstart $(top_builddir)/other/mpirun_common all-local: $(target_pl) $(target) $(mpi_target_pl) $(target_pl): $(top_srcdir)/other/spawner/gasnetrun.pl cp -f "$<" $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/smp-conduit/README0000664000175000017500000001745515142313673016560 0ustar alastairalastairGASNet smp-conduit documentation Dan Bonachea User Information: ----------------- smp-conduit provides a single-node loopback GASNet implementation for smp or uniprocessor systems lacking network hardware, or where all the cores to be used coexist within a hardware-shared memory. Where this conduit runs: ----------------------- smp-conduit is extremely portable and should run anywhere with a POSIX-like environment and hardware-shared memory. smp-conduit jobs can be launched directly in the same manner as normal POSIX executables - ie on the command line, no spawner script is required. However, in order to take advantage of the facilities in modern batch systems (such as control over CPU, GPU and memory affinity), the provided `gasnetrun_smp` script may also be used, as well as launchers like `mpirun` or SLURM's `srun` Optional configure options: -------------------------- * --with-smp-spawner=... controls the default value of the environment variable `GASNET_SMP_SPAWNER`, described under "Recognized environment variables". See the top-level README for information regarding process-shared memory (PSHM) support and the associated family of `--(en|dis)able-pshm*` configure options. Without PSHM enabled, smp-conduit provides only a single GASNet process. With PSHM, multiple processes can be used on a single host; these will communicate through shared memory. Job spawning: ------------- If using UPC++, Chapel, etc. the language-specific commands should be used to launch applications. Otherwise, applications can be launched using the gasnetrun_smp utility: + usage summary: gasnetrun_smp -n [options] [--] prog [program args] options: -n number of processes to run -c number of cpus per process (not always supported) -E list of environment vars to propagate -v be verbose about what is happening -t test only, don't execute anything (implies -v) -k keep any temporary files created (implies -v) -spawner= force use of a specific spawner ([supported spawners]) -- ends option parsing There are as many as four possible methods (fork, ssh, mpi and pmi) by which `gasnetrun_smp` can launch an smp-conduit application. For more information, see the description of the environment variable `GASNET_SMP_SPAWNER`, below. That variable's documentation is also applicable to launch via the same MPI or PMI launch utilities which `gasnetrun_smp` uses. As an alternative to using `gasnetrun_smp`, it is also possible to launch an smp-conduit application directly on the command line without any utilities. For information on controlling the number of processes in an smp-conduit job launched in this manner, see the description of the environment variable `GASNET_PSHM_NODES`, below. Optional compile-time settings: ------------------------------ * All the compile-time settings from extended-ref (see the extended-ref README) Recognized environment variables: --------------------------------- * GASNET_SMP_SPAWNER This environment variable determines what job spawner mechanism the application is expected to interact with. When using the `gasnetrun_smp` utility (described later in this document) this also controls the default job spawner to be used. However, when *not* using `gasnetrun_smp` is it necessary to ensure this variable is set to match the spawner in use. Supported values (case insensitive) include: + "fork" - this is the default unless another has been specified at configure time, and selects a built-in job launch mechanism. See also "GASNET_PSHM_NODES", below. + "mpi" - this selects job launch via `mpirun`, `mpiexec`, or similar as appropriate to the MPI implementation (if any) detected at configure time. This option is only available if a working MPI implementation was detected by `configure`. See also the mpi-spawner README. + "pmi" - this selects job launch using the PMI family of protocols, via such utilities as `srun` and some `mpirun` implementations. This option is only available if a PMI client library was detected by `configure`. See also the pmi-spawner README. + "ssh" - this selects job launch using GASNet-specific logic provided by the `gasnetrun_smp` utility. Relative to using `ssh directly` (such as via `ssh [host] env GASNET_PSHM_NODES=[n] ./a.out`) this option can automatically identify an allocated `[host]` with many batch systems, and can (via `-E`) provide some control over environment propagation. See also the ssh-spawner README. Note that when using `gasnetrun_smp`, the optional `-spawner=...` command line option has precedence over this envirnoment variable. * GASNET_PSHM_NODES When process-shared memory (PSHM) support is enabled at configure time and the application is launched without use of a job spawner (e.g. `gasnetrun_smp`, `mpirun`, `srun`, etc.), this variable controls the number of GASNet smp-conduit processes to fork at job launch. These processes will communicate through shared memory using PSHM. For more details PSHM support, see the top-level README. If PSHM is enabled but an explicit job spawner is used (see GASNET_SMP_SPAWNER above), this variable is ignored and the spawner-specific command line controls the number of GASNet smp-conduit processes. If PSHM is disabled, this variable is ignored and smp-conduit jobs consist of only a single process (but the client may still utilize thread-level parallelism within that process, in GASNET_PAR mode). * GASNET_BARRIER=PSHM (default when PSHM support is enabled) Enables shared-memory implementation of GASNet barriers * All the standard GASNet environment variables (see top-level README) Known problems: --------------- * Bug 3480 It has been observed on Cray systems running CLE6 that following a call to munmap(), there may be a delay before the physical page frames are available for reallocation. At startup GASNet normally tries to determine the largest available mmap() region, which is then unmapped, leading to the possibility that subsequent allocation of a large GASNet segment may fail if timing is "just right". The configure option --enable-bug3480-workaround will enable retries and an additional barrier to prevent the failure mode described above, at the cost of a small additional delay at startup. In this release, the provided cross-configure-cray-xc-* scripts AUTOMATICALLY enable the work-around if CLE6 is detected. If you do *not* desire the work-around, then you may pass the option --disable-bug3480-workaround to the cross-configure script. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=3480 It is currently unknown if this problem is specific to Cray XC systems. * Bug 3727 The smp-conduit support for remote atomics is limited to certain datatypes. In general, support encompasses all datatypes on LP64 platforms but is limited to 32-bit datatypes on ILP32 platforms. However, there are exceptions on both types of platform, many of which are compiler dependent. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=3727 That bug report describes the problem in more detail. * See the GASNet Bugzilla server for details on other known bugs: https://gasnet-bugs.lbl.gov/ Future work: ------------ =============================================================================== Design Overview: ---------------- All puts/gets are local accesses (with the locality check removed at compile time). When PSHM is not in use all AM handlers execute synchronously on the calling thread, and segment alignment is trivially guaranteed. gasnet-2025.8.0/smp-conduit/gasnet_extended_help_extra.h0000664000175000017500000000771515142313673023423 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/gasnet_extended_help_extra.h $ * Description: GASNet Extended smp-specific Header * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_EXTENDED_HELP_EXTRA_H #define _GASNET_EXTENDED_HELP_EXTRA_H /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (explicit event) ========================================================= */ GASNETI_INLINE(gasnete_get_nb) GASNETI_WARN_UNUSED_RESULT gex_Event_t gasnete_get_nb( gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_unreachable(); return GEX_EVENT_INVALID; } #define gasnete_get_nb gasnete_get_nb GASNETI_INLINE(gasnete_put_nb) GASNETI_WARN_UNUSED_RESULT gex_Event_t gasnete_put_nb( gex_TM_t tm, gex_Rank_t rank, void *dest, void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_unreachable(); return GEX_EVENT_INVALID; } #define gasnete_put_nb gasnete_put_nb /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (implicit event) ========================================================== */ GASNETI_INLINE(gasnete_get_nbi) int gasnete_get_nbi (gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_unreachable(); return 0; } #define gasnete_get_nbi gasnete_get_nbi GASNETI_INLINE(gasnete_put_nbi) int gasnete_put_nbi (gex_TM_t tm, gex_Rank_t rank, void *dest, void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_unreachable(); return 0; } #define gasnete_put_nbi gasnete_put_nbi /* ------------------------------------------------------------------------------------ */ /* Value Put ========= */ GASNETI_INLINE(gasnete_put_val) int gasnete_put_val( gex_TM_t tm, gex_Rank_t rank, void *dest, gex_RMA_Value_t value, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_unreachable(); return 0; } #define gasnete_put_val gasnete_put_val GASNETI_INLINE(gasnete_put_nb_val) GASNETI_WARN_UNUSED_RESULT gex_Event_t gasnete_put_nb_val( gex_TM_t tm, gex_Rank_t rank, void *dest, gex_RMA_Value_t value, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_unreachable(); return GEX_EVENT_INVALID; } #define gasnete_put_nb_val gasnete_put_nb_val /* nbi is trivially identical to blocking */ #define gasnete_put_nbi_val gasnete_put_val /* ------------------------------------------------------------------------------------ */ /* Blocking Value Get ================== */ GASNETI_INLINE(gasnete_get_val) gex_RMA_Value_t gasnete_get_val( gex_TM_t tm, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_unreachable(); return 0; } #define gasnete_get_val gasnete_get_val /* Blocking Get and Put ==================== */ // Blocking Get identical to nbi #define gasnete_get gasnete_get_nbi // Blocking Put identical to nbi except for lack of lc_opt argument #define gasnete_put(tm,rank,dest,src,nbytes,flags_and_TI) \ gasnete_put_nbi(tm,rank,dest,src,nbytes,GEX_EVENT_NOW,flags_and_TI) #endif gasnet-2025.8.0/smp-conduit/gasnet_core_help.h0000664000175000017500000000123115142313673021333 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/gasnet_core_help.h $ * Description: GASNet smp conduit core Header Helpers (Internal code, not for client use) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_HELP_H #define _GASNET_CORE_HELP_H #include #define GASNETC_MAX_ARGS 16 #define GASNETC_MAX_MEDIUM MIN(65536, GASNETC_MAX_MEDIUM_NBRHD_DFLT) #define GASNETC_MAX_LONG ((size_t)0x7fffffff) /* unlimited */ #endif gasnet-2025.8.0/smp-conduit/Makefile.am0000664000175000017500000001113515142313673017721 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/Makefile.am $ # Description: Makefile for GASNet smp conduit # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME=smp ## ## SSH bootstrap support (built unless fork() is unavailable) ## if HAVE_BOOTSTRAP_SSH ssh_defines = -DHAVE_SSH_SPAWNER ssh_srcdir = $(top_srcdir)/other/ssh-spawner ssh_sources = $(ssh_srcdir)/gasnet_bootstrap_ssh.c ssh_deps = $(ssh_srcdir)/*.[ch] endif ## ## MPI bootstrap support (optional) ## XXX: should have a way to control this independent of MPI conduit ## if HAVE_BOOTSTRAP_MPI mpi_defines = -DHAVE_MPI_SPAWNER mpi_srcdir = $(top_srcdir)/other/mpi-spawner mpi_deps = $(mpi_srcdir)/*.[ch] # We must compile this one object with MPI_CC. mpi_special_objs = $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o: force @MPI_CC@ @MPI_CFLAGS@ $(LIBDEFINES) $(CONDUIT_EXTRALIBCFLAGS) $(LIBINCLUDES) \ $(MANUAL_MPICFLAGS) -o $@ -c $(mpi_srcdir)/gasnet_bootstrap_mpi.c endif ## ## PMI bootstrap support (optional) ## if HAVE_BOOTSTRAP_PMI pmi_cppflags = -DHAVE_PMI_SPAWNER @PMI_SPAWNER_CFLAGS@ pmi_srcdir = $(top_srcdir)/other/pmi-spawner pmi_sources = $(pmi_srcdir)/gasnet_bootstrap_pmi.c pmi_deps = $(pmi_srcdir)/*.[ch] endif # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = contrib # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ gasnet_core.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h \ gasnet_extended.c \ gasnet_extended_fwd.h \ gasnet_extended_help_extra.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiler command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(srcdir)/gasnet_extended.c \ $(ssh_sources) $(pmi_sources) # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = $(ssh_defines) $(mpi_defines) $(pmi_cppflags) # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = $(ssh_deps) $(mpi_deps) $(pmi_deps) # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = $(mpi_special_objs) # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time CONDUIT_KINDS = # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) CONDUIT_RUNCMD = @TOP_BUILDDIR@/smp-conduit/contrib/gasnetrun_smp -np %N %P %A if USE_PSHM else CONDUIT_TEST_MAKEARGS = TEST_NODES=1 CONDUIT_TESTPARAMS=testbarrierconf_nodes=1 endif # conduit-specific tests in ../tests directory CONDUIT_TESTS = # -------- Do not modify anything below this line -------- if BUILD_SEQ_LIBS libgasnet_smp_seq_a_SOURCES = libraries_seq = libgasnet-smp-seq.a endif if BUILD_PAR_LIBS libgasnet_smp_par_a_SOURCES = libraries_par = libgasnet-smp-par.a endif if BUILD_PARSYNC_LIBS libgasnet_smp_parsync_a_SOURCES = libraries_parsync = libgasnet-smp-parsync.a endif libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) include $(top_builddir)/other/Makefile-conduit.mak libgasnet-smp-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-smp-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-smp-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync if USE_SMP_CONDUIT lib_LIBRARIES = $(libraries) all-local: $(lib_LIBRARIES) $(pkgconfig_files) clean-local: do-clean-local install-data-local: do-install-data-local uninstall-local: do-uninstall-local else $(top_srcdir)/gasnetex.h: do-error endif gasnet-2025.8.0/smp-conduit/gasnet_core_internal.h0000664000175000017500000000160115142313673022220 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/gasnet_core_internal.h $ * Description: GASNet smp conduit header for internal definitions in Core API * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_CORE_INTERNAL_H #define _GASNET_CORE_INTERNAL_H #include /* whether or not to use spin-locking for HSL's */ #define GASNETC_HSL_SPINLOCK 1 /* ------------------------------------------------------------------------------------ */ /* add new core API handlers here and to the bottom of gasnet_core.c */ /* ------------------------------------------------------------------------------------ */ /* handler table (temporary global impl) */ extern gex_AM_Entry_t *gasnetc_handler; /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/smp-conduit/Makefile.in0000664000175000017500000007631015142313673017740 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/smp-conduit/Makefile.am $ # Description: Makefile for GASNet smp conduit # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = smp-conduit ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = conduit.mak CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libgasnet_smp_par_a_AR = $(AR) $(ARFLAGS) libgasnet_smp_par_a_LIBADD = am_libgasnet_smp_par_a_OBJECTS = libgasnet_smp_par_a_OBJECTS = $(am_libgasnet_smp_par_a_OBJECTS) libgasnet_smp_parsync_a_AR = $(AR) $(ARFLAGS) libgasnet_smp_parsync_a_LIBADD = am_libgasnet_smp_parsync_a_OBJECTS = libgasnet_smp_parsync_a_OBJECTS = \ $(am_libgasnet_smp_parsync_a_OBJECTS) libgasnet_smp_seq_a_AR = $(AR) $(ARFLAGS) libgasnet_smp_seq_a_LIBADD = am_libgasnet_smp_seq_a_OBJECTS = libgasnet_smp_seq_a_OBJECTS = $(am_libgasnet_smp_seq_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgasnet_smp_par_a_SOURCES) \ $(libgasnet_smp_parsync_a_SOURCES) \ $(libgasnet_smp_seq_a_SOURCES) DIST_SOURCES = $(libgasnet_smp_par_a_SOURCES) \ $(libgasnet_smp_parsync_a_SOURCES) \ $(libgasnet_smp_seq_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/conduit.mak.in \ $(top_srcdir)/config-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME = smp @HAVE_BOOTSTRAP_SSH_TRUE@ssh_defines = -DHAVE_SSH_SPAWNER @HAVE_BOOTSTRAP_SSH_TRUE@ssh_srcdir = $(top_srcdir)/other/ssh-spawner @HAVE_BOOTSTRAP_SSH_TRUE@ssh_sources = $(ssh_srcdir)/gasnet_bootstrap_ssh.c @HAVE_BOOTSTRAP_SSH_TRUE@ssh_deps = $(ssh_srcdir)/*.[ch] @HAVE_BOOTSTRAP_MPI_TRUE@mpi_defines = -DHAVE_MPI_SPAWNER @HAVE_BOOTSTRAP_MPI_TRUE@mpi_srcdir = $(top_srcdir)/other/mpi-spawner @HAVE_BOOTSTRAP_MPI_TRUE@mpi_deps = $(mpi_srcdir)/*.[ch] # We must compile this one object with MPI_CC. @HAVE_BOOTSTRAP_MPI_TRUE@mpi_special_objs = $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o @HAVE_BOOTSTRAP_PMI_TRUE@pmi_cppflags = -DHAVE_PMI_SPAWNER @PMI_SPAWNER_CFLAGS@ @HAVE_BOOTSTRAP_PMI_TRUE@pmi_srcdir = $(top_srcdir)/other/pmi-spawner @HAVE_BOOTSTRAP_PMI_TRUE@pmi_sources = $(pmi_srcdir)/gasnet_bootstrap_pmi.c @HAVE_BOOTSTRAP_PMI_TRUE@pmi_deps = $(pmi_srcdir)/*.[ch] # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = contrib # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ gasnet_core.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h \ gasnet_extended.c \ gasnet_extended_fwd.h \ gasnet_extended_help_extra.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiler command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(srcdir)/gasnet_extended.c \ $(ssh_sources) $(pmi_sources) # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = $(ssh_defines) $(mpi_defines) $(pmi_cppflags) # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = $(ssh_deps) $(mpi_deps) $(pmi_deps) # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = $(mpi_special_objs) # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time CONDUIT_KINDS = # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) CONDUIT_RUNCMD = @TOP_BUILDDIR@/smp-conduit/contrib/gasnetrun_smp -np %N %P %A @USE_PSHM_FALSE@CONDUIT_TEST_MAKEARGS = TEST_NODES=1 CONDUIT_TESTPARAMS=testbarrierconf_nodes=1 # conduit-specific tests in ../tests directory CONDUIT_TESTS = # -------- Do not modify anything below this line -------- @BUILD_SEQ_LIBS_TRUE@libgasnet_smp_seq_a_SOURCES = @BUILD_SEQ_LIBS_TRUE@libraries_seq = libgasnet-smp-seq.a @BUILD_PAR_LIBS_TRUE@libgasnet_smp_par_a_SOURCES = @BUILD_PAR_LIBS_TRUE@libraries_par = libgasnet-smp-par.a @BUILD_PARSYNC_LIBS_TRUE@libgasnet_smp_parsync_a_SOURCES = @BUILD_PARSYNC_LIBS_TRUE@libraries_parsync = libgasnet-smp-parsync.a libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) @USE_SMP_CONDUIT_TRUE@lib_LIBRARIES = $(libraries) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign smp-conduit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign smp-conduit/Makefile $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): conduit.mak: $(top_builddir)/config.status $(srcdir)/conduit.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ if test -f $$p; then \ $(am__strip_dir) \ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive @USE_SMP_CONDUIT_FALSE@all-local: all-am: Makefile $(LIBRARIES) all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @USE_SMP_CONDUIT_FALSE@install-data-local: @USE_SMP_CONDUIT_FALSE@clean-local: @USE_SMP_CONDUIT_FALSE@uninstall-local: clean: clean-recursive clean-am: clean-generic clean-libLIBRARIES clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLIBRARIES uninstall-local .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am clean clean-generic clean-libLIBRARIES \ clean-local cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLIBRARIES uninstall-local .PRECIOUS: Makefile @HAVE_BOOTSTRAP_MPI_TRUE@$(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o: force @HAVE_BOOTSTRAP_MPI_TRUE@ @MPI_CC@ @MPI_CFLAGS@ $(LIBDEFINES) $(CONDUIT_EXTRALIBCFLAGS) $(LIBINCLUDES) \ @HAVE_BOOTSTRAP_MPI_TRUE@ $(MANUAL_MPICFLAGS) -o $@ -c $(mpi_srcdir)/gasnet_bootstrap_mpi.c include $(top_builddir)/other/Makefile-conduit.mak libgasnet-smp-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-smp-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-smp-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync @USE_SMP_CONDUIT_TRUE@all-local: $(lib_LIBRARIES) $(pkgconfig_files) @USE_SMP_CONDUIT_TRUE@clean-local: do-clean-local @USE_SMP_CONDUIT_TRUE@install-data-local: do-install-data-local @USE_SMP_CONDUIT_TRUE@uninstall-local: do-uninstall-local @USE_SMP_CONDUIT_FALSE@$(top_srcdir)/gasnetex.h: do-error # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/gasnet_atomic_fwd.h0000664000175000017500000002252515142313673017256 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_atomic_fwd.h $ * Description: GASNet header for platform-specific selection of atomic implementation * Copyright 2018, Regents of the University of California * Terms of use are as specified in license.txt * * This file is used by gasnet_atomicops.h and configure. */ #if !defined(_IN_GASNET_TOOLS_H) && !defined(_IN_GASNETEX_H) && !defined(GASNETI_IN_CONFIGURE) #error This file is not meant to be included directly- clients should include gasnetex.h or gasnet_tools.h #endif #ifndef _GASNET_ATOMIC_FWD_H #define _GASNET_ATOMIC_FWD_H /* ------------------------------------------------------------------------------------ */ // The purpose of this file is to define each of GASNETI_ATOMIC{,32,64}_IMPL to one of // the following. Any changes should be kept consistent with GASNET_GET_ATOMIC_IMPL() // in configure.in. #define GASNETI_ATOMIC_IMPL_GENERIC 0 #define GASNETI_ATOMIC_IMPL_NATIVE 1 #define GASNETI_ATOMIC_IMPL_OS 2 #define GASNETI_ATOMIC_IMPL_SYNC 3 #define GASNETI_ATOMIC_IMPL_HYBRID 4 #define GASNETI_ATOMIC_IMPL_SPECIAL 5 // *ONLY* when we are using a probed compiler can we use/trust configure probed values // Otherwise they remain undefined #if GASNETI_IN_CONFIGURE || !GASNETI_COMPILER_IS_UNKNOWN #define GASNETI_CONFIG_ARCH_PPC64 GASNETI_ARCH_PPC64 #define GASNETI_CONFIG_ARCH_ULTRASPARC GASNETI_ARCH_ULTRASPARC #define GASNETI_CONFIG_HAVE_ARM_CMPXCHG GASNETI_HAVE_ARM_CMPXCHG #define GASNETI_CONFIG_HAVE_SPARC32_64BIT_ASM GASNETI_HAVE_SPARC32_64BIT_ASM #endif #if GASNETI_IN_CONFIGURE // When in configure provide what gasnet_asm.h would otherwise #define GASNETI_HAVE_GCC_ASM GASNETI_HAVE_CC_GCC_ASM #define GASNETI_HAVE_SIMPLE_ASM GASNETI_HAVE_CC_SIMPLE_ASM #define GASNETI_HAVE_SYNC_ATOMICS_32 GASNETI_HAVE_CC_SYNC_ATOMICS_32 #define GASNETI_HAVE_SYNC_ATOMICS_64 GASNETI_HAVE_CC_SYNC_ATOMICS_64 #endif /* ------------------------------------------------------------------------------------ */ /* Identify special cases lacking native support */ #if PLATFORM_ARCH_MIPS && defined(HAVE_SGIDEFS_H) /* For _MIPS_ISA and _MIPS_SIM values on some MIPS platforms */ #include #endif #if defined(GASNETI_FORCE_GENERIC_ATOMICOPS) || /* for debugging */ \ (PLATFORM_ARCH_ARM && !defined(GASNETI_CONFIG_HAVE_ARM_CMPXCHG)) || \ (PLATFORM_ARCH_MIPS && defined(_MIPS_ISA) && (_MIPS_ISA < 2)) || \ PLATFORM_COMPILER_TINY || /* not worth special case atomics implementation */ \ PLATFORM_ARCH_MICROBLAZE /* no atomic instructions */ #define GASNETI_USE_GENERIC_ATOMICOPS 1 #elif defined(GASNETI_FORCE_OS_ATOMICOPS) /* for debugging */ #define GASNETI_USE_OS_ATOMICOPS 1 #elif defined(GASNETI_FORCE_COMPILER_ATOMICOPS) || /* for debugging */ \ (PLATFORM_COMPILER_XLC && GASNETI_HAVE_SYNC_ATOMICS_32) || \ (PLATFORM_ARCH_SPARC && PLATFORM_COMPILER_CLANG /* TODO: not using GCC ASM due to Bug 3805 */) || \ PLATFORM_ARCH_AARCH64 || \ PLATFORM_ARCH_S390 || \ PLATFORM_ARCH_TILE || \ PLATFORM_ARCH_RISCV /* TODO: can (should?) do TILE and AARCH64 natively */ /* TODO: probe for an XLC version with non-broken gcc inline asm support? */ #define GASNETI_USE_COMPILER_ATOMICOPS 1 #endif /* ------------------------------------------------------------------------------------ */ // NOTE: This logic *MUST* be kept in sync with gasnet_atomic_bits.h // // However, care must be taken with compiler properties which are determined // using configure probes. Preprocessor identifiers for these properties // cannot be used directly here and should be replaced by a GASNET_CONFIG_* // identifier (one defined above, or new ones added). #if defined(GASNETI_USE_GENERIC_ATOMICOPS) // Nothing to define #elif defined(GASNETI_USE_COMPILER_ATOMICOPS) #if GASNETI_HAVE_SYNC_ATOMICS_32 #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_SYNC #if PLATFORM_ARCH_64 && GASNETI_HAVE_SYNC_ATOMICS_64 #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_SYNC #endif #endif #elif defined(GASNETI_USE_OS_ATOMICOPS) #if PLATFORM_OS_CYGWIN #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_OS #if PLATFORM_ARCH_64 #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_OS #endif #endif #elif PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_MIC /* x86 and Athlon64/Opteron and MIC */ #if (PLATFORM_COMPILER_SUN && !GASNETI_HAVE_GCC_ASM) // Native via NON-inline ASM #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_SPECIAL #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_SPECIAL #elif PLATFORM_COMPILER_GNU || PLATFORM_COMPILER_INTEL || \ PLATFORM_COMPILER_PATHSCALE || PLATFORM_COMPILER_PGI || \ PLATFORM_COMPILER_CLANG || PLATFORM_COMPILER_SUN || \ PLATFORM_COMPILER_NVHPC // Native via inline ASM #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_NATIVE #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_NATIVE #elif PLATFORM_COMPILER_OPEN64 // Native via inline ASM, but lacking 64-bit atomics on ILP32 #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_NATIVE #if PLATFORM_ARCH_64 #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_NATIVE #endif #elif (PLATFORM_ARCH_X86_64 && PLATFORM_COMPILER_CRAY) // Native via compiler intrinsics #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_NATIVE #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_NATIVE #endif #elif PLATFORM_ARCH_SPARC #if defined(__sparcv9) || defined(__sparcv9cpu) || \ defined(__sparc_v9__) || defined(GASNETI_CONFIG_ARCH_ULTRASPARC) /* SPARC v9 ISA */ #if PLATFORM_COMPILER_GNU // Native via inline ASM #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_NATIVE #if PLATFORM_ARCH_64 || GASNETI_CONFIG_HAVE_SPARC32_64BIT_ASM #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_NATIVE #endif #elif PLATFORM_COMPILER_SUN // Native via NON-inline ASM #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_SPECIAL #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_SPECIAL #endif #endif #elif PLATFORM_ARCH_POWERPC #if GASNETI_HAVE_GCC_ASM #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_NATIVE #if PLATFORM_ARCH_64 #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_NATIVE #elif defined(GASNETI_CONFIG_ARCH_PPC64) // ILP32 on PPC64 #if PLATFORM_OS_DARWIN #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_HYBRID #elif PLATFORM_OS_LINUX #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_NATIVE #endif #endif #endif #elif PLATFORM_ARCH_MIPS #if PLATFORM_OS_LINUX && PLATFORM_COMPILER_GNU #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_NATIVE #if defined(_MIPS_SIM) && (_MIPS_SIM >= 2) /* N32 or 64-bit ABI */ #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_NATIVE #endif #endif #elif PLATFORM_ARCH_ARM && defined(GASNETI_CONFIG_HAVE_ARM_CMPXCHG) #if PLATFORM_OS_LINUX && (PLATFORM_COMPILER_GNU || PLATFORM_COMPILER_CLANG) #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_NATIVE #endif /* ------------------------------------------------------------------------------------ */ #else /* Unknown ARCH will "fall through" to use of the generics */ #endif // Apply defaults #ifndef GASNETI_ATOMIC32_IMPL #define GASNETI_ATOMIC32_IMPL GASNETI_ATOMIC_IMPL_GENERIC #endif #ifndef GASNETI_ATOMIC64_IMPL #define GASNETI_ATOMIC64_IMPL GASNETI_ATOMIC_IMPL_GENERIC #endif #ifndef GASNETI_ATOMIC_IMPL #if GASNETI_FORCE_64BIT_ATOMICOPS #define GASNETI_ATOMIC_IMPL GASNETI_ATOMIC64_IMPL #else #define GASNETI_ATOMIC_IMPL GASNETI_ATOMIC32_IMPL #endif #endif #undef GASNETI_CONFIG_ARCH_PPC64 #undef GASNETI_CONFIG_ARCH_ULTRASPARC #undef GASNETI_CONFIG_HAVE_ARM_CMPXCHG #undef GASNETI_CONFIG_HAVE_SPARC32_64BIT_ASM // Sanity checks on relationship between 32- and 64-bit implementations: // 1) 64-bit atomics are either same-as-32-bit, GENERIC or HYBRID // 2) 64-bit NATIVE implies 32-bit NATIVE // 3) 64-bit SYNC implies 32-bit SYNC // 4) 64-bit OS implies 32-bit OS // 5) 64-bit HYBRID implies 32-bit NATIVE // 6) 32-bit HYBRID does not exist #if /* Rule #1: 64-bit is one of (32-bit, GENERIC, HYBRID) */ \ ((GASNETI_ATOMIC64_IMPL != GASNETI_ATOMIC32_IMPL) && \ (GASNETI_ATOMIC64_IMPL != GASNETI_ATOMIC_IMPL_GENERIC) && \ (GASNETI_ATOMIC64_IMPL != GASNETI_ATOMIC_IMPL_HYBRID)) || \ /* Rule #2: 64-bit NATIVE implies 32-bit NATIVE */ \ ((GASNETI_ATOMIC64_IMPL == GASNETI_ATOMIC_IMPL_NATIVE) && \ (GASNETI_ATOMIC32_IMPL != GASNETI_ATOMIC_IMPL_NATIVE)) || \ /* Rule #3: 64-bit SYNC implies 32-bit SYNC */ \ ((GASNETI_ATOMIC64_IMPL == GASNETI_ATOMIC_IMPL_SYNC) && \ (GASNETI_ATOMIC32_IMPL != GASNETI_ATOMIC_IMPL_SYNC)) || \ /* Rule #4: 64-bit OS implies 32-bit OS */ \ ((GASNETI_ATOMIC64_IMPL == GASNETI_ATOMIC_IMPL_OS) && \ (GASNETI_ATOMIC32_IMPL != GASNETI_ATOMIC_IMPL_OS)) || \ /* Rule #5: 64-bit HYBRID implies 32-bit NATIVE */ \ ((GASNETI_ATOMIC64_IMPL == GASNETI_ATOMIC_IMPL_HYBRID) && \ (GASNETI_ATOMIC32_IMPL != GASNETI_ATOMIC_IMPL_NATIVE)) || \ /* Rule #6: 32-bit HYBRID does not exist */ \ (GASNETI_ATOMIC32_IMPL == GASNETI_ATOMIC_IMPL_HYBRID) #error Internal error - unexpected atomics configuration #endif #endif // _GASNET_ATOMIC_FWD_H gasnet-2025.8.0/gasnet_am.c0000664000175000017500000013276315142313673015540 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_am.c $ * Description: GASNet conduit-independent code for Active Messages * Copyright 2002, Dan Bonachea * Copyright 2018, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include /* ------------------------------------------------------------------------------------ */ extern void gasneti_defaultAMHandler(gex_Token_t token) { gex_Token_Info_t info; info.gex_srcrank = GEX_RANK_INVALID; // to print -1 if query were to fail gex_TI_t rc = gex_Token_Info(token, &info, GEX_TI_SRCRANK | GEX_TI_ENTRY); gex_Rank_t srcnode = info.gex_srcrank; if (rc & GEX_TI_ENTRY) gasneti_assert(info.gex_entry); gasneti_fatalerror("GASNet node %i/%i received an AM message from node %i for a handler index%s " "with no associated AM handler function registered", (int)gasneti_mynode, (int)gasneti_nodes, (int)srcnode, (rc & GEX_TI_ENTRY) ? gasneti_dynsprintf(" %d", (int)(uintptr_t)info.gex_entry->gex_cdata) : ""); } /* ------------------------------------------------------------------------------------ */ // Validate a handler table prior to registration static void gasneti_am_validate( const gex_AM_Entry_t *table, int numentries) { if (!numentries) return; // Internally-constructed legacy table should be all-or-nothing. if (table[0].gex_nargs == GASNETI_HANDLER_NARGS_UNK || table[0].gex_flags & GASNETI_FLAG_INIT_LEGACY) { for (int i = 0; i < numentries; ++i) { gasneti_assert_always_uint(table[i].gex_nargs ,==, GASNETI_HANDLER_NARGS_UNK); gasneti_assert_always_uint(table[i].gex_flags ,==, (GASNETI_FLAG_AM_ANY | GASNETI_FLAG_INIT_LEGACY)); } return; } // Normal tables have several rules to check: for (int i = 0; i < numentries; ++i) { int idx = table[i].gex_index; if_pf (table[i].gex_nargs > gex_AM_MaxArgs()) { gasneti_fatalerror("AM Handler table entry %d: invalid gex_nargs: %d (Max %d)", i, (int)table[i].gex_nargs, (int)gex_AM_MaxArgs()); } if_pf (0 == (table[i].gex_flags & (GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_REPLY))) { gasneti_fatalerror("AM Handler table entry %d(idx=%d): invalid gex_flags: contains neither GEX_FLAG_AM_REQUEST nor GEX_FLAG_AM_REPLY", i, idx); } gex_Flags_t category = table[i].gex_flags & (GEX_FLAG_AM_SHORT|GEX_FLAG_AM_MEDIUM|GEX_FLAG_AM_LONG); const char *cat_msg = NULL; switch (category) { case 0: cat_msg = "none of GEX_FLAG_AM_SHORT, GEX_FLAG_AM_MEDIUM, or GEX_FLAG_AM_LONG"; break; case GEX_FLAG_AM_SHORT|GEX_FLAG_AM_MEDIUM|GEX_FLAG_AM_LONG: cat_msg = "invalid combination (GEX_FLAG_AM_SHORT | GEX_FLAG_AM_MEDIUM | GEX_FLAG_AM_LONG)"; break; case GEX_FLAG_AM_SHORT|GEX_FLAG_AM_MEDIUM: cat_msg = "invalid combination (GEX_FLAG_AM_SHORT | GEX_FLAG_AM_MEDIUM )"; break; case GEX_FLAG_AM_SHORT|GEX_FLAG_AM_LONG: cat_msg = "invalid combination (GEX_FLAG_AM_SHORT | GEX_FLAG_AM_LONG)"; break; } if_pf (cat_msg) { gasneti_fatalerror("AM Handler table entry %d(idx=%d): invalid gex_flags: contains %s", i, idx, cat_msg); } } } #if GASNETC_AMREGISTER /* Use a conduit-specific hook at registration */ extern int gasnetc_amregister(gex_AM_Index_t, gex_AM_Entry_t *); #endif // Register handlers in the range [lowlimit,highlimit) // Thread-safety is the caller's responsibility extern int gasneti_amregister( gasneti_EP_t i_ep, gex_AM_Entry_t *input, int numentries, int lowlimit, int highlimit, int dontcare, int *numregistered) { int i; *numregistered = 0; gasneti_am_validate(input, numentries); gex_AM_Entry_t *output = i_ep->_amtbl; for (i = 0; i < numentries; i++) { int newindex; if ((input[i].gex_index == 0 && !dontcare) || (input[i].gex_index && dontcare)) continue; else if (input[i].gex_index) newindex = input[i].gex_index; else { /* deterministic assignment of dontcare indexes from top down */ for (newindex = highlimit-1; newindex >= lowlimit; newindex--) { if (!output[newindex].gex_index) break; // 0 index marks free entry } if (newindex < lowlimit) { char s[255]; snprintf(s, sizeof(s), "Too many handlers. (limit=%i)", highlimit - lowlimit); GASNETI_RETURN_ERRR(BAD_ARG, s); } } /* ensure handlers fall into the proper range of pre-assigned values */ if (newindex < lowlimit || newindex >= highlimit) { char s[255]; snprintf(s, sizeof(s), "handler index (%i) out of range [%i..%i)", newindex, lowlimit, highlimit); GASNETI_RETURN_ERRR(BAD_ARG, s); } /* discover duplicates */ if (output[newindex].gex_index) // entry is taken GASNETI_RETURN_ERRR(BAD_ARG, "handler index not unique"); /* register a single handler with conduit-specifc hook, if any */ #if GASNETC_AMREGISTER int rc = gasnetc_amregister((gex_AM_Index_t)newindex, &input[i]); if (GASNET_OK != rc) return rc; #endif /* The check below for !input[i].index is redundant and present * only to defeat the over-aggressive optimizer in pathcc 2.1 */ if (dontcare && !input[i].gex_index) input[i].gex_index = newindex; /* Install the entire table entry */ gasneti_assert(! output[newindex].gex_index); output[newindex] = input[i]; #if GASNET_TRACE { const char *name = input[i].gex_name ? gasneti_dynsprintf(", name='%s'", input[i].gex_name) : ""; void *fnptr = *(void**)&input[i].gex_fnptr; // level of indirection avoids -pedantic warning char *flags = gasneti_malloc(gasneti_format_flags_amreg(NULL, input[i].gex_flags)); gasneti_format_flags_amreg(flags, input[i].gex_flags); const char *nargs = (input[i].gex_nargs == GASNETI_HANDLER_NARGS_UNK) ? "" : gasneti_dynsprintf(", nargs=%u", input[i].gex_nargs); if (newindex >= GASNETI_CLIENT_HANDLER_BASE) { GASNETI_TRACE_PRINTF(O,("Registered AM handler %d: client table entry=%d, flags=%s%s, fnptr=%p%s%s", newindex, i, flags, nargs, fnptr, name, dontcare ? ", input index was zero" : "")); } else { gasneti_static_assert(GASNETE_HANDLER_BASE > GASNETC_HANDLER_BASE); const char *api = (newindex >= GASNETE_HANDLER_BASE) ? "extended" : "core"; GASNETI_TRACE_PRINTF(D,("Registered AM handler %d: %s API, flags=%s%s, fnptr=%p%s", newindex, api, flags, nargs, fnptr, name)); } gasneti_free(flags); } #endif (*numregistered)++; } return GASNET_OK; } // Register client handlers // This function backs gex_EP_RegisterHandlers() and gasnet_attach() // and provides per-EP serialization of such calls. // Internal calls occuring within gex_Client_Init() and gex_Client_Create() // do not participate in this serialization, since they operated exclusively // on an EP prior to returning it to the client. extern int gasneti_amregister_client( gasneti_EP_t i_ep, gex_AM_Entry_t *input, size_t numentries) { if_pf (numentries == 0) return GASNET_OK; if_pf (numentries > GASNETC_MAX_NUMHANDLERS - GEX_AM_INDEX_BASE) GASNETI_RETURN_ERRR(BAD_ARG,"Tried to register too many handlers"); if_pf (input == NULL) GASNETI_RETURN_ERRR(BAD_ARG,"Invalid AM handler table"); gasneti_mutex_lock(&i_ep->_amtbl_lock); /* first pass - assign all fixed-index handlers */ int numreg1 = 0; if (gasneti_amregister(i_ep, input, numentries, GASNETI_CLIENT_HANDLER_BASE, GASNETC_MAX_NUMHANDLERS, 0, &numreg1) != GASNET_OK) { gasneti_mutex_unlock(&i_ep->_amtbl_lock); GASNETI_RETURN_ERRR(RESOURCE,"Error registering fixed-index client handlers"); } /* second pass - fill in dontcare-index handlers */ int numreg2 = 0; if (gasneti_amregister(i_ep, input, numentries, GASNETI_CLIENT_HANDLER_BASE, GASNETC_MAX_NUMHANDLERS, 1, &numreg2) != GASNET_OK) { gasneti_mutex_unlock(&i_ep->_amtbl_lock); GASNETI_RETURN_ERRR(RESOURCE,"Error registering variable-index client handlers"); } gasneti_mutex_unlock(&i_ep->_amtbl_lock); gasneti_assert_uint(numreg1 + numreg2 ,==, numentries); return GASNET_OK; } // Wrapper to provide continued support for GASNet-1 legacy handler tables, // such as through gasnet_attach(). Only supports the clients's index range. // TODO-EX: should be absorbed into an eventual conduit-indep gasnet_attach() extern int gasneti_amregister_legacy( gasneti_EP_t i_ep, gasnet_handlerentry_t *table, int numentries) { if_pf (numentries == 0) return GASNET_OK; if_pf (numentries > GASNETC_MAX_NUMHANDLERS - GEX_AM_INDEX_BASE) GASNETI_RETURN_ERRR(BAD_ARG,"Tried to register too many handlers"); if_pf (numentries < 0) GASNETI_RETURN_ERRR(BAD_ARG,"Invalid AM handler table size"); if_pf (table == NULL) GASNETI_RETURN_ERRR(BAD_ARG,"Invalid AM handler table"); /* create temporary ex-compatible table */ gex_AM_Entry_t *extable = gasneti_calloc(numentries, sizeof(gex_AM_Entry_t)); for (int i = 0; i < numentries; ++i) { extable[i].gex_index = table[i].index; extable[i].gex_fnptr = table[i].fnptr; extable[i].gex_nargs = GASNETI_HANDLER_NARGS_UNK; extable[i].gex_flags = GASNETI_FLAG_AM_ANY | GASNETI_FLAG_INIT_LEGACY; } /* register */ if (gasneti_amregister_client(i_ep, extable, numentries) != GASNET_OK) { gasneti_free(extable); GASNETI_RETURN_ERRR(RESOURCE,"Error registering client handlers"); } /* copy back from temporary ex-compatible table */ for (int i = 0; i < numentries; ++i) { table[i].index = extable[i].gex_index; } gasneti_free(extable); return GASNET_OK; } // Initialize handler table in a given EP extern int gasneti_amtbl_init(gasneti_EP_t i_ep) { gex_AM_Entry_t *output = i_ep->_amtbl; static const char *fnname = "gasneti_defaultAMHandler"; for (int i = 0; i < GASNETC_MAX_NUMHANDLERS; i++) { output[i].gex_index = 0; // marks an unused entry output[i].gex_nargs = GASNETI_HANDLER_NARGS_UNK; output[i].gex_flags = GASNETI_FLAG_AM_ANY; output[i].gex_fnptr = (gex_AM_Fn_t)gasneti_defaultAMHandler; output[i].gex_cdata = (void *)(uintptr_t)i; output[i].gex_name = fnname; } gasneti_mutex_init(&i_ep->_amtbl_lock); return GASNET_OK; } #if GASNET_DEBUG && !defined(gasneti_amtbl_check) // Validate call to a handler extern void gasneti_amtbl_check(const gex_AM_Entry_t *entry, int nargs, gasneti_category_t category, int isReq) { char buf[128] = {'\0'}; const char *msg = NULL; if ((entry->gex_nargs != nargs) && (entry->gex_nargs != GASNETI_HANDLER_NARGS_UNK)) { snprintf(buf, sizeof(buf), "registered with nargs=%d but called with %d", entry->gex_nargs, nargs); msg = buf; } else if (isReq && !(entry->gex_flags & GEX_FLAG_AM_REQUEST)) { msg = "invoked as a Request handler, but not registered with GEX_FLAG_AM_REQUEST"; } else if (!isReq && !(entry->gex_flags & GEX_FLAG_AM_REPLY)) { msg = "invoked as a Reply handler, but not registered with GEX_FLAG_AM_REPLY"; } else if (category == gasneti_Short && !(entry->gex_flags & GEX_FLAG_AM_SHORT)) { msg = "invoked as a Short handler, but not registered with GEX_FLAG_AM_SHORT"; } else if (category == gasneti_Medium && !(entry->gex_flags & GEX_FLAG_AM_MEDIUM)) { msg = "invoked as a Medium handler, but not registered with GEX_FLAG_AM_MEDIUM"; } else if (category == gasneti_Long && !(entry->gex_flags & GEX_FLAG_AM_LONG)) { msg = "invoked as a Long handler, but not registered with GEX_FLAG_AM_LONG"; } if (msg) { char fnaddr[32]; const char *fnname = entry->gex_name; if (!fnname) { (void) snprintf(fnaddr, sizeof(fnaddr), "%p", *(void**)&entry->gex_fnptr); // level of indirection avoids -pedantic warning fnname = fnaddr; } gasneti_fatalerror("AM handler %d (%s) %s", entry->gex_index, fnname, msg); } } #endif /* ------------------------------------------------------------------------------------ */ extern int gex_EP_RegisterHandlers( gex_EP_t ep, gex_AM_Entry_t *table, size_t numentries) { GASNETI_TRACE_PRINTF(O,("gex_EP_RegisterHandlers: ep=%p table=%p numentries=%"PRIuSZ, (void*)ep, (void*)table, numentries)); return gasneti_amregister_client(gasneti_import_ep_valid(ep), table, numentries); } /* ------------------------------------------------------------------------------------ */ #if GASNET_DEBUG // Post processing of gex_Token_Info() results extern gex_TI_t gasneti_token_info_return(gex_TI_t result, gex_Token_Info_t *info, gex_TI_t mask) { // Validate client's requested mask if (mask & ~GEX_TI_ALL) { gasneti_fatalerror("Mask argument to gex_Token_Info() includes unknown bits"); } // Validate conduit's returned mask (any requested+required fields missing?); gasneti_assert_uint( (~result & (mask & GASNETI_TI_REQUIRED)) ,==, 0); #if GASNET_SUPPORTS_TI_ENTRY gasneti_assert_uint( (~result & (mask & GEX_TI_ENTRY)) ,==, 0); #endif #if GASNET_SUPPORTS_TI_IS_REQ gasneti_assert_uint( (~result & (mask & GEX_TI_IS_REQ)) ,==, 0); #endif #if GASNET_SUPPORTS_TI_IS_LONG gasneti_assert_uint( (~result & (mask & GEX_TI_IS_LONG)) ,==, 0); #endif // For each field set: validate if (result & GEX_TI_SRCRANK) { gasneti_assert_uint(info->gex_srcrank ,<, gasneti_nodes); } if (result & GEX_TI_EP) { // TODO-EX: will need some means to validate in conduit-independent manner // NULL THUNK_TM may occur in bootstrap collectives before ep0 exists gasneti_assert(!gasneti_THUNK_TM || info->gex_ep == gasneti_THUNK_EP); } if (result & GEX_TI_ENTRY) { gasneti_assert(info->gex_entry); gasneti_am_validate(info->gex_entry, 1); } if (result & GEX_TI_IS_REQ) { gasneti_assert_uint(info->gex_is_req ,==, !!info->gex_is_req); // Is 0 or 1 if (result & GEX_TI_ENTRY) { gasneti_assert(info->gex_entry->gex_flags & (info->gex_is_req ? GEX_FLAG_AM_REQUEST : GEX_FLAG_AM_REPLY)); } } if (result & GEX_TI_IS_LONG) { gasneti_assert_uint(info->gex_is_long ,==, !!info->gex_is_long); // Is 0 or 1 if (result & GEX_TI_ENTRY) { gasneti_assert(info->gex_entry->gex_flags & (info->gex_is_long ? GEX_FLAG_AM_LONG : GEX_FLAG_AM_SHORT|GEX_FLAG_AM_MEDIUM)); } } // From here forward, consider only the requested subset of the conduit-provided result result &= mask; // For each field not requested or requested but not set: INvalidate if (!(result & GEX_TI_SRCRANK)) { info->gex_srcrank = GEX_RANK_INVALID; } if (!(result & GEX_TI_EP)) { info->gex_ep = NULL; } if (!(result & GEX_TI_ENTRY)) { info->gex_entry = NULL; } if (!(result & GEX_TI_IS_REQ)) { info->gex_is_req = 2; // true invalidation not possible for a boolean } if (!(result & GEX_TI_IS_LONG)) { info->gex_is_long = 2; // true invalidation not possible for a boolean } return result; } #endif /* ------------------------------------------------------------------------------------ */ // Error checking for AM payload queries #if GASNET_DEBUG // TODO-EX: are there any additional checks still possible here? static void check_max_payload_args( const char *fname, gasneti_category_t category, int isReq, const gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { if (lc_opt == GEX_EVENT_DEFER) { gasneti_fatalerror("Call to %s() with invalid lc_opt=GEX_EVENT_DEFER", fname); } if (!isReq && (lc_opt == GEX_EVENT_GROUP)) { gasneti_fatalerror("Call to %s() with invalid lc_opt=GEX_EVENT_GROUP", fname); } if (lc_opt && gasneti_leaf_is_pointer(lc_opt)) { // Following assumes minimum 4-byte alignment of gex_Event_t if (0x3 & (uintptr_t)lc_opt) { gasneti_fatalerror("Call to %s() with invalid lc_opt=%p", fname, (void *)lc_opt); } // Following attempts to elicit SIGSEGV/SIGBUS/SIGILL on bogus pointers static uintptr_t dummy; dummy += (uintptr_t) *(volatile gex_Event_t *)lc_opt; } if ((flags & GEX_FLAG_AM_PREPARE_LEAST_CLIENT) && (flags & GEX_FLAG_AM_PREPARE_LEAST_ALLOC)) { gasneti_fatalerror("Call to %s() with mutually-exclusive " "GEX_FLAG_AM_PREPARE_LEAST_CLIENT and " "GEX_FLAG_AM_PREPARE_LEAST_ALLOC both set in flags argument", fname); } if (nargs > gex_AM_MaxArgs()) { gasneti_fatalerror("Call to %s() with nargs=%u greater than gex_AM_MaxArgs()=%u", fname, nargs, (unsigned int)gex_AM_MaxArgs()); } } static void check_max_payload_result(gex_Flags_t flags, size_t lub, size_t result) { gasneti_assert_uint(result ,>=, 512); gasneti_assert((result >= lub) || (flags & GEX_FLAG_AM_PREPARE_LEAST_CLIENT) || (flags & GEX_FLAG_AM_PREPARE_LEAST_ALLOC)); } #define GASNETC_IS_REQ(reqrep) _GASNETC_IS_REQ_##reqrep #define _GASNETC_IS_REQ_Request 1 #define _GASNETC_IS_REQ_Reply 0 #define DEFN_AM_MAX_FN(reqrep,cat) \ size_t gex_AM_Max##reqrep##cat( \ gex_TM_t tm, gex_Rank_t rank, \ const gex_Event_t *lc_opt, gex_Flags_t flags, \ unsigned int nargs) \ { \ const char *fname = "gex_AM_Max" #reqrep #cat; \ gasneti_TM_t real_tm = gasneti_import_tm(tm); \ /* TODO-EX: remove allowance for real_tm == NULL */ \ gex_Rank_t tm_size = gasneti_i_tm_size(real_tm); \ if (real_tm && (rank != GEX_RANK_INVALID) && (rank >= tm_size)) { \ gasneti_fatalerror("Call to %s() with invalid rank=%i", \ fname, (int)rank); \ } \ gasneti_category_t category = gasneti_##cat; \ int isReq = GASNETC_IS_REQ(reqrep); \ check_max_payload_args(fname, category, isReq,lc_opt, flags, nargs); \ size_t result = gasnetc_AM_Max##reqrep##cat(tm,rank,lc_opt,flags,nargs); \ check_max_payload_result(flags, gex_AM_LUB##reqrep##cat(), result); \ return result; \ } #define DEFN_TOKEN_MAX_FN(reqrep,cat) \ size_t gex_Token_Max##reqrep##cat( \ gex_Token_t token, \ const gex_Event_t *lc_opt, gex_Flags_t flags, \ unsigned int nargs) \ { \ const char *fname = "gex_Token_Max" #reqrep #cat; \ gasneti_category_t category = gasneti_##cat; \ int isReq = GASNETC_IS_REQ(reqrep); \ check_max_payload_args(fname, category, isReq,lc_opt, flags, nargs); \ size_t result = gasnetc_Token_Max##reqrep##cat(token,lc_opt,flags,nargs); \ check_max_payload_result(flags, gex_AM_LUB##reqrep##cat(), result); \ return result; \ } DEFN_AM_MAX_FN(Request,Medium) DEFN_AM_MAX_FN(Request,Long) DEFN_AM_MAX_FN(Reply,Medium) DEFN_AM_MAX_FN(Reply,Long) DEFN_TOKEN_MAX_FN(Reply,Medium) DEFN_TOKEN_MAX_FN(Reply,Long) #undef DEFN_AM_MAX_FN #undef DEFN_TOKEN_MAX_FN #endif /* ------------------------------------------------------------------------------------ */ // Implementation of Negotiated-Payload AMs // // For conduit's without specialization of NP-AM, this provides the entire // default implementation, using malloc() to obtain gasnet-owned buffers (if // any) at Prepare and using gasneti_AM{Request,Reply}{Medium,Long}V() to // perform the AM injection at Commit. // // TODO-EX: This default is not a "good" implementation for any conduit. // TODO-EX: Native conduits should provide their own negotiated-payload and // ideally implement it and fixed-payload in terms of a common base. // TODO-EX: This default's use of GEX_EVENT_NOW for gasnet-owned buffers could // be replaced with &event, *if* a progress function (or dependent // operation) were available to reap them and free buffers. However, // that is only fruitful with a conduit which can provide asynchronous // local completion other than by copying the payload. // Conduits can enable build (possibly name-shifted?) of the four pieces of the // reference implementation by defining GASNETC_BUILD_NP_{REQ,REP}_{MEDIUM,LONG} // to '1'; or they may disable them by defining to '0'. // Otherwise, these default to following !GASNET_NATIVE_NP_ALLOC_*. // #ifdef GASNETC_BUILD_NP_REQ_MEDIUM // Keep conduit's definition #elif !GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM #define GASNETC_BUILD_NP_REQ_MEDIUM 1 #endif #ifdef GASNETC_BUILD_NP_REP_MEDIUM // Keep conduit's definition #elif !GASNET_NATIVE_NP_ALLOC_REP_MEDIUM #define GASNETC_BUILD_NP_REP_MEDIUM 1 #endif #ifdef GASNETC_BUILD_NP_REQ_LONG // Keep conduit's definition #elif !GASNET_NATIVE_NP_ALLOC_REQ_LONG #define GASNETC_BUILD_NP_REQ_LONG 1 #endif #ifdef GASNETC_BUILD_NP_REP_LONG // Keep conduit's definition #elif !GASNET_NATIVE_NP_ALLOC_REP_LONG #define GASNETC_BUILD_NP_REP_LONG 1 #endif #ifndef _GEX_AM_SRCDESC_T #ifndef gasneti_import_srcdesc gasneti_AM_SrcDesc_t gasneti_import_srcdesc(gex_AM_SrcDesc_t _srcdesc) { const gasneti_AM_SrcDesc_t _real_srcdesc = GASNETI_IMPORT_POINTER(gasneti_AM_SrcDesc_t,_srcdesc); GASNETI_CHECK_MAGIC(_real_srcdesc, GASNETI_AM_SRCDESC_MAGIC); gasneti_assert(!_real_srcdesc || (_real_srcdesc->_thread == _gasneti_mythread_slow())); return _real_srcdesc; } gasneti_AM_SrcDesc_t gasneti_import_srcdesc_valid(gex_AM_SrcDesc_t srcdesc) { gasneti_assert(srcdesc != GEX_AM_SRCDESC_NO_OP); return gasneti_import_srcdesc(srcdesc); } #endif #ifndef gasneti_export_srcdesc gex_AM_SrcDesc_t gasneti_export_srcdesc(gasneti_AM_SrcDesc_t _real_srcdesc) { GASNETI_CHECK_MAGIC(_real_srcdesc, GASNETI_AM_SRCDESC_MAGIC); return GASNETI_EXPORT_POINTER(gex_AM_SrcDesc_t, _real_srcdesc); } #endif #if GASNETI_NEED_INIT_SRCDESC void gasneti_init_srcdesc(GASNETI_THREAD_FARG_ALONE) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasneti_assert(! mythread->sd_is_init); // Yes, we start "BAD": GASNETI_INIT_MAGIC(&mythread->request_sd, GASNETI_AM_SRCDESC_BAD_MAGIC); GASNETI_INIT_MAGIC(&mythread->reply_sd, GASNETI_AM_SRCDESC_BAD_MAGIC); mythread->request_sd._thread = mythread; mythread->reply_sd._thread = mythread; #if GASNET_DEBUG mythread->request_sd._isreq = 1; mythread->reply_sd._isreq = 0; #endif gasneti_assert( mythread->request_sd._tofree == NULL ); gasneti_assert( mythread->reply_sd._tofree == NULL ); mythread->sd_is_init = 1; } #endif // GASNETI_NEED_INIT_SRCDESC #if GASNET_DEBUG void gasneti_checknpam(int for_reply GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; if (mythread->sd_is_init) { // Never valid to communicate between Prepare/Commit of Reply if (mythread->reply_sd._magic._u == GASNETI_AM_SRCDESC_MAGIC) { gasneti_fatalerror("Invalid GASNet call (communication injection or poll) between gex_AM_PrepareReply() and the corresponding Commit on this thread"); } // It *is* valid to send a Reply which may dynamically run // *within* the execution of gex_AM_{Prepare,Commit}Request() if (!for_reply && mythread->request_sd._magic._u == GASNETI_AM_SRCDESC_MAGIC) { gasneti_fatalerror("Invalid GASNet call (communication injection or poll) between gex_AM_PrepareRequest() and the corresponding Commit on this thread"); } } } // Conduits can call this from gasnet_exit() to disarm gasneti_checknpam() to // enable use of AM for exit coordination even if exiting between a Prepare // and the following Commit. // // TODO: Opt-in use of gex_AM_Cancel*() when available and safe. void gasneti_checknpam_disarm(void) { GASNET_BEGIN_FUNCTION(); // OK - not a critical-path gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; if (mythread->sd_is_init) { GASNETI_INIT_MAGIC(&mythread->request_sd, GASNETI_AM_SRCDESC_BAD_MAGIC); GASNETI_INIT_MAGIC(&mythread->reply_sd, GASNETI_AM_SRCDESC_BAD_MAGIC); } } #endif // GASNET_DEBUG #endif // _GEX_AM_SRCDESC_T #if GASNETC_BUILD_NP_REQ_MEDIUM extern gex_AM_SrcDesc_t gasnetc_AM_PrepareRequestMedium( gex_TM_t tm, gex_Rank_t rank, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG, unsigned int nargs) { GASNETI_TRACE_PREP_REQUESTMEDIUM(tm,rank,client_buf,least_payload,most_payload,flags,nargs); gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); // Ensure at least one poll upon Request injection (exactly one if possible) #if GASNETC_REQUESTV_POLLS // Conduit's Request{Medium,Long}V will AMPoll in Commit if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) GASNETC_IMMEDIATE_MAYBE_POLL(flags); #else GASNETC_IMMEDIATE_MAYBE_POLL(flags); #endif gasneti_AM_SrcDesc_t sd = gasneti_init_request_srcdesc(GASNETI_THREAD_PASS_ALONE); GASNETI_COMMON_PREP_REQ(sd,tm,rank,client_buf,least_payload,most_payload,NULL,lc_opt,flags,nargs,Medium); flags &= ~(GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { sd = gasnetc_nbrhd_PrepareRequest(sd, gasneti_Medium, jobrank, client_buf, least_payload, most_payload, NULL, lc_opt, flags, nargs); } else { // In reference implementation, GEX_FLAG_AM_PREPARE_LEAST_ALLOC is also the MAX we allocate gex_Flags_t limit_flags = client_buf ? flags : (flags | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); size_t limit = gex_AM_MaxRequestMedium(tm, rank, lc_opt, limit_flags, nargs); size_t size = MIN(most_payload, limit); sd->_tofree = gasneti_prepare_request_common(sd, tm, rank, client_buf, size, lc_opt, flags, nargs); gasneti_init_sd_poison(sd); } GASNETI_TRACE_PREP_RETURN(REQUEST_MEDIUM, sd); GASNETI_CHECK_SD(client_buf, least_payload, most_payload, sd); return gasneti_export_srcdesc(sd); } #endif // GASNETC_BUILD_NP_REQ_MEDIUM #if GASNETC_BUILD_NP_REP_MEDIUM extern gex_AM_SrcDesc_t gasnetc_AM_PrepareReplyMedium( gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { GASNETI_TRACE_PREP_REPLYMEDIUM(token,client_buf,least_payload,most_payload,flags,nargs); gasneti_AM_SrcDesc_t sd; flags &= ~(GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); if (gasnetc_token_in_nbrhd(token)) { sd = gasnetc_nbrhd_PrepareReply(gasneti_Medium, token, client_buf, least_payload, most_payload, NULL, lc_opt, flags, nargs); } else { GASNET_BEGIN_FUNCTION(); // conduit-specialization should post from token instead sd = gasneti_init_reply_srcdesc(GASNETI_THREAD_PASS_ALONE); GASNETI_COMMON_PREP_REP(sd,token,client_buf,least_payload,most_payload,NULL,lc_opt,flags,nargs,Medium); // In reference implementation, GEX_FLAG_AM_PREPARE_LEAST_ALLOC is also the MAX we allocate gex_Flags_t limit_flags = client_buf ? flags : (flags | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); size_t limit = gex_Token_MaxReplyMedium(token, lc_opt, limit_flags, nargs); size_t size = MIN(most_payload, limit); sd->_tofree = gasneti_prepare_reply_common(sd, token, client_buf, size, lc_opt, flags, nargs); gasneti_init_sd_poison(sd); } GASNETI_TRACE_PREP_RETURN(REPLY_MEDIUM, sd); GASNETI_CHECK_SD(client_buf, least_payload, most_payload, sd); return gasneti_export_srcdesc(sd); } #endif // GASNETC_BUILD_NP_REP_MEDIUM #if GASNETC_BUILD_NP_REQ_LONG extern gex_AM_SrcDesc_t gasnetc_AM_PrepareRequestLong( gex_TM_t tm, gex_Rank_t rank, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG, unsigned int nargs) { GASNETI_TRACE_PREP_REQUESTLONG(tm,rank,client_buf,least_payload,most_payload,dest_addr,flags,nargs); gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); // Ensure at least one poll upon Request injection (exactly one if possible) #if GASNETC_REQUESTV_POLLS // Conduit's Request{Medium,Long}V will AMPoll in Commit if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) GASNETC_IMMEDIATE_MAYBE_POLL(flags); #else GASNETC_IMMEDIATE_MAYBE_POLL(flags); #endif gasneti_AM_SrcDesc_t sd = gasneti_init_request_srcdesc(GASNETI_THREAD_PASS_ALONE); GASNETI_COMMON_PREP_REQ(sd,tm,rank,client_buf,least_payload,most_payload,dest_addr,lc_opt,flags,nargs,Long); flags &= ~(GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { sd = gasnetc_nbrhd_PrepareRequest(sd, gasneti_Long, jobrank, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs); } else { // In reference implementation, GEX_FLAG_AM_PREPARE_LEAST_ALLOC is also the MAX we allocate gex_Flags_t limit_flags = client_buf ? flags : (flags | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); size_t limit = gex_AM_MaxRequestLong(tm, rank, lc_opt, limit_flags, nargs); size_t size = MIN(most_payload, limit); sd->_tofree = gasneti_prepare_request_common(sd, tm, rank, client_buf, size, lc_opt, flags, nargs); sd->_dest_addr = dest_addr; gasneti_init_sd_poison(sd); } GASNETI_TRACE_PREP_RETURN(REQUEST_LONG, sd); GASNETI_CHECK_SD(client_buf, least_payload, most_payload, sd); return gasneti_export_srcdesc(sd); } #endif // GASNETC_BUILD_NP_REQ_LONG #if GASNETC_BUILD_NP_REP_LONG extern gex_AM_SrcDesc_t gasnetc_AM_PrepareReplyLong( gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { GASNETI_TRACE_PREP_REPLYLONG(token,client_buf,least_payload,most_payload,dest_addr,flags,nargs); gasneti_AM_SrcDesc_t sd; flags &= ~(GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); if (gasnetc_token_in_nbrhd(token)) { sd = gasnetc_nbrhd_PrepareReply(gasneti_Long, token, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs); } else { GASNET_BEGIN_FUNCTION(); // conduit-specialization should post from token instead sd = gasneti_init_reply_srcdesc(GASNETI_THREAD_PASS_ALONE); GASNETI_COMMON_PREP_REP(sd,token,client_buf,least_payload,most_payload,dest_addr,lc_opt,flags,nargs,Long); // In reference implementation, GEX_FLAG_AM_PREPARE_LEAST_ALLOC is also the MAX we allocate gex_Flags_t limit_flags = client_buf ? flags : (flags | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); size_t limit = gex_Token_MaxReplyLong(token, lc_opt, limit_flags, nargs); size_t size = MIN(most_payload, limit); sd->_tofree = gasneti_prepare_reply_common(sd, token, client_buf, size, lc_opt, flags, nargs); sd->_dest_addr = dest_addr; gasneti_init_sd_poison(sd); } GASNETI_TRACE_PREP_RETURN(REPLY_LONG, sd); GASNETI_CHECK_SD(client_buf, least_payload, most_payload, sd); return gasneti_export_srcdesc(sd); } #endif // GASNETC_BUILD_NP_REP_LONG #if GASNETC_BUILD_NP_REQ_MEDIUM int gasnetc_AM_CommitRequestMediumM( gex_AM_Index_t handler, size_t nbytes, gex_Flags_t commit_flags GASNETI_THREAD_FARG, #if GASNET_DEBUG unsigned int nargs_arg, #endif gex_AM_SrcDesc_t sd_arg, ...) { // Conduit authors are cautioned against use of gasneti_consume_srcdesc() in native // NPAM implementations. See the comment preceding its definition in gasnet_am.h. gasneti_AM_SrcDesc_t sd = gasneti_consume_srcdesc(sd_arg); GASNETI_COMMON_COMMIT_REQ(sd,handler,nbytes,NULL,commit_flags,nargs_arg,Medium); int retval = GASNET_OK; // assume success va_list argptr; va_start(argptr, sd_arg); if (sd->_is_nbrhd) { gasnetc_nbrhd_CommitRequest(sd, gasneti_Medium, handler, nbytes, NULL, argptr); } else { GASNET_POST_THREADINFO(GASNETI_THREAD_PASS_ALONE); gex_TM_t tm = sd->_dest._request._tm; gex_Rank_t rank = sd->_dest._request._rank; void *src_addr = sd->_addr; gex_Event_t *lc_opt = sd->_lc_opt ? sd->_lc_opt : /* GASNet-owned buffer: */ GEX_EVENT_NOW; gex_Flags_t flags = (sd->_flags & ~(GEX_FLAG_IMMEDIATE | GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC)) | (commit_flags & GEX_FLAG_IMMEDIATE); unsigned int nargs = sd->_nargs; retval = gasneti_AMRequestMediumV(tm, rank, handler, src_addr, nbytes, lc_opt, flags, nargs, argptr); if (retval) { gasneti_assert(commit_flags & GEX_FLAG_IMMEDIATE); // only permissible reason to return non-zero #if GASNET_DEBUG GASNETI_INIT_MAGIC(sd, GASNETI_AM_SRCDESC_MAGIC); // reverse part of "consume" #endif } else if (sd->_tofree) { gasneti_free_npam_buffer(sd); } } va_end(argptr); return retval; } #endif // GASNETC_BUILD_NP_REQ_MEDIUM #if GASNETC_BUILD_NP_REP_MEDIUM int gasnetc_AM_CommitReplyMediumM( gex_AM_Index_t handler, size_t nbytes, gex_Flags_t commit_flags, #if GASNET_DEBUG unsigned int nargs_arg, #endif gex_AM_SrcDesc_t sd_arg, ...) { // Conduit authors are cautioned against use of gasneti_consume_srcdesc() in native // NPAM implementations. See the comment preceding its definition in gasnet_am.h. gasneti_AM_SrcDesc_t sd = gasneti_consume_srcdesc(sd_arg); GASNETI_COMMON_COMMIT_REP(sd,handler,nbytes,NULL,commit_flags,nargs_arg,Medium); int retval = GASNET_OK; // assume success va_list argptr; va_start(argptr, sd_arg); if (sd->_is_nbrhd) { gasnetc_nbrhd_CommitReply(sd, gasneti_Medium, handler, nbytes, NULL, argptr); } else { gex_Token_t token = sd->_dest._reply._token; void *src_addr = sd->_addr; gex_Event_t *lc_opt = sd->_lc_opt ? sd->_lc_opt : /* GASNet-owned buffer: */ GEX_EVENT_NOW; gex_Flags_t flags = (sd->_flags & ~(GEX_FLAG_IMMEDIATE | GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC)) | (commit_flags & GEX_FLAG_IMMEDIATE); unsigned int nargs = sd->_nargs; retval = gasneti_AMReplyMediumV(token, handler, src_addr, nbytes, lc_opt, flags, nargs, argptr); if (retval) { gasneti_assert(commit_flags & GEX_FLAG_IMMEDIATE); // only permissible reason to return non-zero #if GASNET_DEBUG GASNETI_INIT_MAGIC(sd, GASNETI_AM_SRCDESC_MAGIC); // reverse part of "consume" #endif } else if (sd->_tofree) { gasneti_free_npam_buffer(sd); } } va_end(argptr); return retval; } #endif // GASNETC_BUILD_NP_REP_MEDIUM #if GASNETC_BUILD_NP_REQ_LONG int gasnetc_AM_CommitRequestLongM( gex_AM_Index_t handler, size_t nbytes, void *dest_addr, gex_Flags_t commit_flags GASNETI_THREAD_FARG, #if GASNET_DEBUG unsigned int nargs_arg, #endif gex_AM_SrcDesc_t sd_arg, ...) { // Conduit authors are cautioned against use of gasneti_consume_srcdesc() in native // NPAM implementations. See the comment preceding its definition in gasnet_am.h. gasneti_AM_SrcDesc_t sd = gasneti_consume_srcdesc(sd_arg); GASNETI_COMMON_COMMIT_REQ(sd,handler,nbytes,dest_addr,commit_flags,nargs_arg,Long); int retval = GASNET_OK; // assume success va_list argptr; va_start(argptr, sd_arg); if (sd->_is_nbrhd) { gasnetc_nbrhd_CommitRequest(sd, gasneti_Long, handler, nbytes, dest_addr, argptr); } else { GASNET_POST_THREADINFO(GASNETI_THREAD_PASS_ALONE); gex_TM_t tm = sd->_dest._request._tm; gex_Rank_t rank = sd->_dest._request._rank; void *src_addr = sd->_addr; gex_Event_t *lc_opt = sd->_lc_opt ? sd->_lc_opt : /* GASNet-owned buffer: */ GEX_EVENT_NOW; gex_Flags_t flags = (sd->_flags & ~(GEX_FLAG_IMMEDIATE | GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC)) | (commit_flags & GEX_FLAG_IMMEDIATE); unsigned int nargs = sd->_nargs; retval = gasneti_AMRequestLongV(tm, rank, handler, src_addr, nbytes, dest_addr, lc_opt, flags, nargs, argptr); if (retval) { gasneti_assert(commit_flags & GEX_FLAG_IMMEDIATE); // only permissible reason to return non-zero #if GASNET_DEBUG GASNETI_INIT_MAGIC(sd, GASNETI_AM_SRCDESC_MAGIC); // reverse part of "consume" #endif } else if (sd->_tofree) { gasneti_free_npam_buffer(sd); } } va_end(argptr); return retval; } #endif // GASNETC_BUILD_NP_REQ_LONG #if GASNETC_BUILD_NP_REP_LONG int gasnetc_AM_CommitReplyLongM( gex_AM_Index_t handler, size_t nbytes, void *dest_addr, gex_Flags_t commit_flags, #if GASNET_DEBUG unsigned int nargs_arg, #endif gex_AM_SrcDesc_t sd_arg, ...) { // Conduit authors are cautioned against use of gasneti_consume_srcdesc() in native // NPAM implementations. See the comment preceding its definition in gasnet_am.h. gasneti_AM_SrcDesc_t sd = gasneti_consume_srcdesc(sd_arg); GASNETI_COMMON_COMMIT_REP(sd,handler,nbytes,dest_addr,commit_flags,nargs_arg,Long); int retval = GASNET_OK; // assume success va_list argptr; va_start(argptr, sd_arg); if (sd->_is_nbrhd) { gasnetc_nbrhd_CommitReply(sd, gasneti_Long, handler, nbytes, dest_addr, argptr); } else { gex_Token_t token = sd->_dest._reply._token; void *src_addr = sd->_addr; gex_Event_t *lc_opt = sd->_lc_opt ? sd->_lc_opt : /* GASNet-owned buffer: */ GEX_EVENT_NOW; gex_Flags_t flags = (sd->_flags & ~(GEX_FLAG_IMMEDIATE | GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC)) | (commit_flags & GEX_FLAG_IMMEDIATE); unsigned int nargs = sd->_nargs; retval = gasneti_AMReplyLongV(token, handler, src_addr, nbytes, dest_addr, lc_opt, flags, nargs, argptr); if (retval) { gasneti_assert(commit_flags & GEX_FLAG_IMMEDIATE); // only permissible reason to return non-zero #if GASNET_DEBUG GASNETI_INIT_MAGIC(sd, GASNETI_AM_SRCDESC_MAGIC); // reverse part of "consume" #endif } else if (sd->_tofree) { gasneti_free_npam_buffer(sd); } } va_end(argptr); return retval; } #endif // GASNETC_BUILD_NP_REP_LONG #if GASNETC_BUILD_NP_REQ_MEDIUM int gasnetc_AM_CancelRequestMedium( gex_AM_SrcDesc_t sd_arg, gex_Flags_t flags) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_CANCEL_REQ(sd,flags,Medium); if (sd->_is_nbrhd) { gasnetc_nbrhd_CancelRequest(sd, gasneti_Medium, flags); } else if (sd->_tofree) { gasneti_free_npam_buffer(sd); } gasneti_reset_srcdesc(sd); return GASNET_OK; } #endif // GASNETC_BUILD_NP_REQ_MEDIUM #if GASNETC_BUILD_NP_REP_MEDIUM int gasnetc_AM_CancelReplyMedium( gex_AM_SrcDesc_t sd_arg, gex_Flags_t flags) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_CANCEL_REP(sd,flags,Medium); if (sd->_is_nbrhd) { gasnetc_nbrhd_CancelReply(sd, gasneti_Medium, flags); } else if (sd->_tofree) { gasneti_free_npam_buffer(sd); } gasneti_reset_srcdesc(sd); return GASNET_OK; } #endif // GASNETC_BUILD_NP_REP_MEDIUM #if GASNETC_BUILD_NP_REQ_LONG int gasnetc_AM_CancelRequestLong( gex_AM_SrcDesc_t sd_arg, gex_Flags_t flags) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_CANCEL_REQ(sd,flags,Long); if (sd->_is_nbrhd) { gasnetc_nbrhd_CancelRequest(sd, gasneti_Long, flags); } else if (sd->_tofree) { gasneti_free_npam_buffer(sd); } gasneti_reset_srcdesc(sd); return GASNET_OK; } #endif // GASNETC_BUILD_NP_REQ_LONG #if GASNETC_BUILD_NP_REP_LONG int gasnetc_AM_CancelReplyLong( gex_AM_SrcDesc_t sd_arg, gex_Flags_t flags) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_CANCEL_REP(sd,flags,Long); if (sd->_is_nbrhd) { gasnetc_nbrhd_CancelReply(sd, gasneti_Long, flags); } else if (sd->_tofree) { gasneti_free_npam_buffer(sd); } gasneti_reset_srcdesc(sd); return GASNET_OK; } #endif // GASNETC_BUILD_NP_REP_LONG /* ------------------------------------------------------------------------------------ */ // gasneti_free_aligned() is a macro, preventing direct registration as a cleanupfn void gasneti_medium_buffer_cleanup_threaddata(void *buf) { gasneti_free_aligned(buf); } extern gex_TI_t gasnetc_nbrhd_Token_Info( gex_Token_t token, gex_Token_Info_t *info, gex_TI_t mask) { gasneti_assert(token); gasneti_assert(info); *info = ((gasnetc_nbrhd_token_t *)(1^(uintptr_t)token))->ti; gex_TI_t result = GEX_TI_SRCRANK | GEX_TI_EP | GEX_TI_ENTRY | GEX_TI_IS_REQ | GEX_TI_IS_LONG; return GASNETI_TOKEN_INFO_RETURN(result, info, mask); } /* ------------------------------------------------------------------------------------ */ size_t gasneti_format_flags_amreg(char *buf, gex_Flags_t flags) { size_t rc = 1; if (buf) buf[0] = '\0'; #define APPEND_TOKEN(string) do { \ if (buf) strcat(buf, string); \ rc += strlen(string); \ } while (0) #define CHECK_ONE_FLAG(value) \ if ((flags & GEX_FLAG_AM_##value) == GEX_FLAG_AM_##value) { APPEND_TOKEN(#value); } if (flags & GASNETI_FLAG_INIT_LEGACY) { APPEND_TOKEN("GASNet-1"); } else if ((flags & GASNETI_FLAG_AM_ANY) == GASNETI_FLAG_AM_ANY) { APPEND_TOKEN("WILDCARD"); } else { CHECK_ONE_FLAG(MEDLONG) else // must check first in this group CHECK_ONE_FLAG(SHORT) else CHECK_ONE_FLAG(MEDIUM) else CHECK_ONE_FLAG(LONG) APPEND_TOKEN("|"); CHECK_ONE_FLAG(REQREP) else // must check first in this group CHECK_ONE_FLAG(REQUEST) else CHECK_ONE_FLAG(REPLY) } #undef CHECK_ONE_FLAG #undef APPEND_TOKEN if (buf) gasneti_assert_uint(rc ,==, 1+strlen(buf)); return rc; } gasnet-2025.8.0/ucx-conduit/0000775000175000017500000000000015142313673015664 5ustar alastairalastairgasnet-2025.8.0/ucx-conduit/conduit.mak.in0000664000175000017500000000367115142313673020437 0ustar alastairalastair#INSTRUCTIONS# Conduit-specific Makefile fragment settings #INSTRUCTIONS# #INSTRUCTIONS# The contents of this file are embedded into the #INSTRUCTIONS# *-(seq,par,parsync).mak Makefile fragments at conduit build time #INSTRUCTIONS# The settings in those fragments are used to build GASNet clients #INSTRUCTIONS# (including the GASNet tests). #INSTRUCTIONS# See the conduit-writer instructions in the generated fragments #INSTRUCTIONS# or $(top_srcdir)/other/fragment-head.mak.in for usage info. # When using an MPI-based bootstrapper, we must link using the system MPI compiler @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LD_OVERRIDE = @MPI_CC@ @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LDFLAGS_OVERRIDE = @MPI_CFLAGS@ @LDFLAGS@ @HAVE_BOOTSTRAP_MPI_TRUE@MPI_COMPAT_LIBS = @MPI_LIBS@ # Linker feature requirements embedded in GASNET_LD(FLAGS) which are not satisfied solely by GASNET_LIBS # (eg possible dependence on implicit MPI or C++ libraries added by a linker wrapper in GASNET_LD): @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LD_REQUIRES_MPI = 1 # Some platforms need extra -libs for the socket calls in ssh-spawner: @HAVE_BOOTSTRAP_SSH_TRUE@SSH_LIBS = @SSH_SPAWNER_LIBS@ CONDUIT_LDFLAGS = @UCX_LDFLAGS@ @PMI_SPAWNER_LDFLAGS@ @CUDA_UVA_LDFLAGS@ @HIP_LDFLAGS@ CONDUIT_LIBS = @UCX_LIBS@ $(MPI_COMPAT_LIBS) $(SSH_LIBS) @PMI_SPAWNER_LIBS@ @CUDA_UVA_LIBS@ @HIP_LIBS@ # (###) If this conduit has internal conduit threads, then it needs # threading flags and libs - even in GASNET_SEQ mode CONDUIT_DEFINES_SEQ = @GASNET_THREAD_DEFINES@ CONDUIT_LIBS_SEQ = @GASNET_THREAD_LIBS@ # Clients may want/need to know which spawners we support: GASNET_SPAWNER_DEFAULT = @GASNET_UCX_SPAWNER_CONF@ GASNET_SPAWNER_FORK = 0 @HAVE_BOOTSTRAP_PMI_TRUE@GASNET_SPAWNER_PMI = 1 @HAVE_BOOTSTRAP_PMI_FALSE@GASNET_SPAWNER_PMI = 0 @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_SPAWNER_MPI = 1 @HAVE_BOOTSTRAP_MPI_FALSE@GASNET_SPAWNER_MPI = 0 @HAVE_BOOTSTRAP_SSH_TRUE@GASNET_SPAWNER_SSH = 1 @HAVE_BOOTSTRAP_SSH_FALSE@GASNET_SPAWNER_SSH = 0 gasnet-2025.8.0/ucx-conduit/gasnet_ucx_req.h0000664000175000017500000000666015142313673021054 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/gasnet_ucx_req.h $ * Description: GASNet ucx conduit implementation, transport send/receive logic * Copyright 2019-2020, Mellanox Technologies, Inc. All rights reserved. * Terms of use are as specified in license.txt */ #ifndef _GASNET_UCX_REQ_H #define _GASNET_UCX_REQ_H #include #define GASNETC_UCX_PROGRESS_CNT 8 #define GASNETC_UCX_RCV_REAP_MAX 10 #define GASNETC_UCX_MSG_HNDL_PER_POLL 10 #define GASNETC_UCX_BUF_SEND_POOL_SIZE 8 #define GASNETC_UCX_BUF_RECV_POOL_DFLT GASNETC_UCX_RCV_REAP_MAX #define GASNETC_UCX_REQ_POOL_SIZE GASNETC_UCX_BUF_SEND_POOL_SIZE #if !GASNETC_PIN_SEGMENT #define GASNETC_UCX_IOV_MAX 2 #endif typedef enum { GASNETC_UCX_INIT = 0, GASNETC_UCX_ACTIVE, GASNETC_UCX_COMPLETE, GASNETC_UCX_CANCEL, GASNETC_UCX_FAILED } gasnetc_ucx_req_status_t; typedef struct { gex_Rank_t src; gex_AM_Index_t handler; // 8 bits uint8_t am_type : 2; uint8_t is_req : 1; uint8_t numargs : 5; #if !GASNETC_PIN_SEGMENT // Used for Long AM only, but "free" since fills padding ahead of `size` uint8_t is_packed; #endif uint32_t size; // END OF SHORT uint32_t payload_size; // END OF MEDUIM void *dst_addr; // END OF LONG } gasnetc_sreq_hdr_t; typedef struct { GASNETC_LIST_CLASS; char *data; size_t bytes_used; #if !GASNETC_PIN_SEGMENT char *long_data_ptr; size_t long_bytes_used; #endif } gasnetc_buffer_t; typedef struct { GASNETC_LIST_CLASS; gasneti_list_t *list; gasnetc_sreq_hdr_t *am_hdr; gex_AM_Arg_t *args; gasnetc_buffer_t buffer; #if !GASNETC_PIN_SEGMENT ucp_dt_iov_t sendiov[GASNETC_UCX_IOV_MAX]; uint32_t iov_count; #endif } gasnetc_am_req_t; typedef struct { GASNETC_LIST_CLASS; gasnetc_ucx_req_status_t status; gasnetc_am_req_t *am_req; gasnetc_buffer_t buffer; void *result_p; struct { gasnetc_cbfunc_t cbfunc; gasneti_atomic_val_t *cbdata; } completion; ucs_status_t ucs_status; } gasnetc_ucx_request_t; #define GASNETC_BUF_DATA(__buf) ((__buf).data) #define GASNETC_BUF_PTR(__buf) ((__buf).data + (__buf).bytes_used) #define GASNETC_BUF_SIZE(__buf) ((__buf).bytes_used) #define GASNETC_BUF_SET_OFFSET(__buf, __offs) ((__buf).bytes_used = (__offs)) #define GASNETC_AM_HDR_ADD_BYTES(__req, __bytes) \ ((__req)->am_hdr->size += __bytes) #define GASNETC_BUF_ADD_SEND_BYTES(__req, __offs) \ do { \ GASNETC_AM_HDR_ADD_BYTES(__req, __offs); \ (__req)->buffer.bytes_used += (__offs); \ } while(0) #if GASNETC_PIN_SEGMENT #define GASNETC_BUF_RESET(__buf) ((__buf).bytes_used = 0) #else #define GASNETC_BUF_LDATA(__buf) ((__buf).long_data_ptr) #define GASNETC_BUF_LSIZE(__buf) ((__buf).long_bytes_used) #define GASNETC_BUF_RESET(__buf) \ do { \ (__buf).bytes_used = 0; \ (__buf).long_bytes_used = 0; \ } while(0) #endif extern void gasnetc_req_init(void *request); extern int gasnetc_recv_init(void); extern void gasnetc_recv_fini(void); #endif /* _GASNET_UCX_REQ_H */ gasnet-2025.8.0/ucx-conduit/gasnet_core_sndrcv.c0000664000175000017500000012310515142313673021702 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/gasnet_core_sndrcv.c $ * Description: GASNet ucx conduit implementation, transport send/receive logic * Copyright 2019-2020, Mellanox Technologies, Inc. All rights reserved. * Terms of use are as specified in license.txt */ #include #include #include #include #include GASNETI_INLINE(gasnetc_ucx_progress) int gasnetc_ucx_progress(void); GASNETI_INLINE(gasnetc_am_req_reset) void gasnetc_am_req_reset(gasnetc_am_req_t *am_req); GASNETI_INLINE(gasnetc_req_free) void gasnetc_req_free(void *req); GASNETI_INLINE(gasnetc_rreq_release) void gasnetc_rreq_release(gasnetc_ucx_request_t *req); size_t gasnetc_ammed_bufsz = (size_t)(-1); // "goes boom" if not overwritten /* ------------------------------------------------------------------------------------ */ /* File-scoped completion callbacks ================================ */ extern int gasnetc_complete_eop(gasnete_eop_t *eop, gasnetc_comptype_t type) { // Advance and test the proper counter gasnete_op_t *op = (gasnete_op_t*)eop; gasnetc_atomic_val_t completed; gasnetc_atomic_val_t initiated; switch (type) { case gasnetc_comptype_eop_alc: completed = gasnetc_atomic_add(&eop->completed_alc, 1, GASNETI_ATOMIC_ACQ); initiated = eop->initiated_alc; break; case gasnetc_comptype_eop_put: completed = gasnetc_atomic_add(&eop->completed_cnt, 1, GASNETI_ATOMIC_ACQ); initiated = eop->initiated_cnt; break; case gasnetc_comptype_eop_get: completed = gasnetc_atomic_add(&eop->completed_cnt, 1, GASNETI_ATOMIC_ACQ | GASNETI_ATOMIC_REL); initiated = eop->initiated_cnt; break; default: gasneti_unreachable(); } if (completed == (initiated & GASNETI_ATOMIC_MAX)) { switch (type) { case gasnetc_comptype_eop_alc: GASNETE_EOP_LC_FINISH(op); break; case gasnetc_comptype_eop_put: case gasnetc_comptype_eop_get: GASNETE_EOP_MARKDONE(op); break; default: gasneti_unreachable(); } return 1; } return 0; } // EOP completion callbacks extern void gasnetc_cb_eop_alc(gasnetc_atomic_val_t *p) { gasnete_eop_t *eop = gasneti_container_of(p, gasnete_eop_t, initiated_alc); gasnete_eop_check(eop); (void) gasnetc_complete_eop(eop, gasnetc_comptype_eop_alc); } extern void gasnetc_cb_eop_put(gasnetc_atomic_val_t *p) { gasnete_eop_t *eop = gasneti_container_of(p, gasnete_eop_t, initiated_cnt); gasnete_eop_check(eop); (void) gasnetc_complete_eop(eop, gasnetc_comptype_eop_put); } extern void gasnetc_cb_eop_get(gasnetc_atomic_val_t *p) { gasnete_eop_t *eop = gasneti_container_of(p, gasnete_eop_t, initiated_cnt); gasnete_eop_check(eop); (void) gasnetc_complete_eop(eop, gasnetc_comptype_eop_get); } // NAR (nbi-accessregion) completion callbacks extern void gasnetc_cb_nar_alc(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_alc_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_REG(iop, alc, 1, GASNETI_ATOMIC_NONE); } extern void gasnetc_cb_nar_put(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_put_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_REG(iop, put, 1, GASNETI_ATOMIC_NONE); } extern void gasnetc_cb_nar_get(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_get_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_REG(iop, get, 1, GASNETI_ATOMIC_REL); } extern void gasnetc_cb_nar_rmw(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_rmw_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_REG(iop, rmw, 1, GASNETI_ATOMIC_NONE); } // IOP (non accessregion) completion callbacks extern void gasnetc_cb_iop_alc(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_alc_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_INT(iop, alc, 1, GASNETI_ATOMIC_NONE); } extern void gasnetc_cb_iop_put(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_put_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_INT(iop, put, 1, GASNETI_ATOMIC_NONE); } extern void gasnetc_cb_iop_get(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_get_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_INT(iop, get, 1, GASNETI_ATOMIC_REL); } extern void gasnetc_cb_iop_rmw(gasnetc_atomic_val_t *p) { gasnete_iop_t *iop = gasneti_container_of(p, gasnete_iop_t, initiated_rmw_cnt); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH_INT(iop, rmw, 1, GASNETI_ATOMIC_NONE); } // gasnetc_counter_t completion callbacks extern void gasnetc_cb_counter(gasnetc_atomic_val_t *cnt) { gasnetc_counter_t *counter = gasneti_container_of(cnt, gasnetc_counter_t, initiated); gasnetc_atomic_increment(&counter->completed, 0); } extern void gasnetc_cb_counter_rel(gasnetc_atomic_val_t *cnt) { gasnetc_counter_t *counter = gasneti_container_of(cnt, gasnetc_counter_t, initiated); gasnetc_atomic_increment(&counter->completed, GASNETI_ATOMIC_REL); } extern void gasnetc_counter_wait(gasnetc_counter_t *counter, int outside_handler_context GASNETI_THREAD_FARG) { const gasnetc_atomic_val_t initiated = (counter->initiated & GASNETI_ATOMIC_MAX); gasnetc_atomic_t * const completed = &counter->completed; if_pf (!gasnetc_counter_done(counter)) { if (outside_handler_context) { GASNETI_SPIN_DOUNTIL(initiated == gasnetc_atomic_read(completed, 0), gasnetc_poll_sndrcv(GASNETC_LOCK_REGULAR GASNETI_THREAD_PASS)); } else { // must not poll rcv queue in hander context GASNETI_SPIN_DOUNTIL(initiated == gasnetc_atomic_read(completed, 0), gasnetc_poll_snd(GASNETC_LOCK_REGULAR GASNETI_THREAD_PASS)); } } } /* ------------------------------------------------------------------------------------ */ /* Req/Mem pool functions ====================== */ // May AM Long logic assume in-order delivery? static int gasnetc_am_in_order = 1; #if GASNETI_STATS_OR_TRACE // Accounting for extra send-side buffers for Reply static size_t gasnetc_extra_reply_bufs = 0; #endif GASNETI_INLINE(gasnetc_sreq_alloc) gasnetc_am_req_t *gasnetc_sreq_alloc(gasneti_list_t *list) { gasnetc_am_req_t *am_req; GASNETI_LIST_ITEM_ALLOC(am_req, gasnetc_am_req_t, gasnetc_am_req_reset); am_req->buffer.data = gasneti_malloc_aligned(GASNETI_MEDBUF_ALIGNMENT, gasnetc_ammed_bufsz); GASNETC_BUF_RESET(am_req->buffer); #if !GASNETC_PIN_SEGMENT am_req->buffer.long_data_ptr = NULL; #endif am_req->list = list; if (list) { gasneti_list_enq(am_req->list, am_req); } return am_req; } // TODO: bug 4334: // Code below allocates distinct small objects for each individual send buffer // and its associated gasnetc_am_req_t, without any attention to cache-line // alignment or allocator overheads. This should be refactored to use large // allocations that are divided into cache-line-aligned chunks. Ideally the // region holding buffers can also be preemptively registered with UCX to // reduce time/space registration overheads and improve TLB utilization. void gasnetc_send_init(void) { gasneti_list_init(&gasneti_ucx_module.send_queue); // Pool for sending AM Requests gasneti_list_init(&gasneti_ucx_module.sreq_free_req); for (int i = 0; i < GASNETC_UCX_REQ_POOL_SIZE; i++) { (void) gasnetc_sreq_alloc(&gasneti_ucx_module.sreq_free_req); } // Pool for sending AM Replies gasneti_list_init(&gasneti_ucx_module.sreq_free_rep); for (int i = 0; i < GASNETC_UCX_REQ_POOL_SIZE; i++) { (void) gasnetc_sreq_alloc(&gasneti_ucx_module.sreq_free_rep); } { // AM Long logic may assume in-order if nbhrd contains all proc on this host. // TODO: if !one_nbrhd, might parse UCX_GASNET_TLS (or UCX_TLS) to check // for a setting which excludes use of UCX shared memory transports. // See bug 4155 for the issue this helps us address #if !GASNET_PSHM gasneti_assert_uint(gasneti_mysupernode.node_count ,==, 1); #endif const int one_nbrhd = (gasneti_mysupernode.node_count == gasneti_myhost.node_count); gasnetc_am_in_order = gasneti_getenv_yesno_withdefault("GASNET_UCX_AM_ORDERED_TLS", one_nbrhd); } } void gasnetc_send_fini(void) { gasnetc_am_req_t *am_req; gasnetc_ucx_request_t *request; /* wait and release queued send requests */ while(NULL != (request = GASNETI_LIST_POP( &gasneti_ucx_module.send_queue, gasnetc_ucx_request_t))){ if (GASNETC_UCX_ACTIVE == request->status) { ucp_request_cancel(gasneti_ucx_module.ucp_worker, request); while (GASNETC_UCX_ACTIVE == request->status) { gasnetc_ucx_progress(); // TODO-next: interrupt if stuck here for a long time } gasneti_list_rem(&gasneti_ucx_module.send_queue, request); gasnetc_req_free(request); } } gasneti_list_fini(&gasneti_ucx_module.send_queue); /* release pools of send requests */ while(NULL != (am_req = GASNETI_LIST_POP( &gasneti_ucx_module.sreq_free_req, gasnetc_am_req_t))){ gasneti_free_aligned(am_req->buffer.data); gasneti_free(am_req); } gasneti_list_fini(&gasneti_ucx_module.sreq_free_req); while(NULL != (am_req = GASNETI_LIST_POP( &gasneti_ucx_module.sreq_free_rep, gasnetc_am_req_t))){ gasneti_free_aligned(am_req->buffer.data); gasneti_free(am_req); } gasneti_list_fini(&gasneti_ucx_module.sreq_free_rep); } GASNETI_INLINE(gasnetc_am_req_get) gasnetc_am_req_t *gasnetc_am_req_get(int is_request GASNETI_THREAD_FARG) { gasnetc_am_req_t *am_req; gasnetc_ucx_progress(); if (is_request) { GASNETI_SPIN_UNTIL((am_req = GASNETI_LIST_POP(&gasneti_ucx_module.sreq_free_req, gasnetc_am_req_t)), gasnetc_poll_sndrcv(GASNETC_LOCK_INLINE GASNETI_THREAD_PASS)); } else { // Try at most twice (with a poll between) to allocate from the pool for reply buffers. // Excessive polling risks buffering additional UCX traffic, pushing us toward OOM. am_req = GASNETI_LIST_POP(&gasneti_ucx_module.sreq_free_rep, gasnetc_am_req_t); if (am_req) goto out; gasnetc_poll_snd(GASNETC_LOCK_INLINE GASNETI_THREAD_PASS); am_req = GASNETI_LIST_POP(&gasneti_ucx_module.sreq_free_rep, gasnetc_am_req_t); if_pt (am_req) goto out; // Next, try once to "borrow" from the request buffer pool // It will be returned to that pool upon completion am_req = GASNETI_LIST_POP(&gasneti_ucx_module.sreq_free_req, gasnetc_am_req_t); if_pt (am_req) { GASNETI_STAT_EVENT(C, BORROW_REPLY_BUF); goto out; } // Finally, dynamically allocate an extra one to be freed when completed // We need a gasnetc_am_req_t to send a reply, but have failed to find // one in the free pools, even after (multiple) attempt to progress ucx. // This likely inattentive peer(s) OR peers stuck in this same place! // Since we currently lack the necessary isolation to progress only the // reception of replies, that latter option spells deadlock if we spin // poll indefinitely. Currently, the best option is to (temporarily) // grow the pool and thus buffer the outgoing reply. // Unfortunately, there is no a priori bound on this growth! // TODO: Bug 4359 for isolation and/or flow-control to avoid this mess. #if GASNETI_STATS_OR_TRACE gasnetc_extra_reply_bufs +=1; GASNETI_STAT_EVENT_VAL(C, EXTRA_REPLY_BUF, gasnetc_extra_reply_bufs); #endif // NULL list argument marks this allocation to be freed when complete am_req = gasnetc_sreq_alloc(NULL); } out: return am_req; } GASNETI_INLINE(gasnetc_am_req_reset) void gasnetc_am_req_reset(gasnetc_am_req_t *am_req) { gasneti_assert(am_req && "Wrong req pointer"); GASNETI_LIST_RESET(am_req); #if !GASNETC_PIN_SEGMENT am_req->iov_count = 0; #endif GASNETC_BUF_RESET(am_req->buffer); memset(&am_req->am_hdr, 0, sizeof(am_req->am_hdr)); } GASNETI_INLINE(gasnetc_am_req_release) void gasnetc_am_req_release(gasnetc_am_req_t *am_req) { GASNETI_DBG_LIST_ITEM_CHECK(am_req); #if !GASNETC_PIN_SEGMENT if (am_req->buffer.long_data_ptr) { gasneti_free(am_req->buffer.long_data_ptr); am_req->buffer.long_data_ptr = NULL; } #endif if_pf (! am_req->list) { // allocated to meet temporary burst #if GASNETI_STATS_OR_TRACE gasnetc_extra_reply_bufs -=1; #endif gasneti_free_aligned(am_req->buffer.data); gasneti_free(am_req); } else { gasnetc_am_req_reset(am_req); gasneti_list_enq(am_req->list, am_req); } } /* Format send request =================== */ #if !GASNETC_PIN_SEGMENT GASNETI_INLINE(gasnetc_req_add_iov) void gasnetc_req_add_iov(gasnetc_am_req_t *am_req, void *buffer, size_t nbytes) { gasneti_assert((am_req->iov_count != GASNETC_UCX_IOV_MAX) && "Wrong iov count"); gasneti_assert(nbytes); am_req->sendiov[am_req->iov_count].buffer = buffer; am_req->sendiov[am_req->iov_count].length = nbytes; am_req->iov_count++; GASNETC_AM_HDR_ADD_BYTES(am_req, nbytes); } #endif GASNETI_INLINE(gasnetc_am_req_format) void gasnetc_am_req_format(gasnetc_am_req_t *am_req, gasnetc_ucx_am_type_t am_type, gex_AM_Index_t handler, uint8_t is_packed, uint8_t is_req, int numargs, va_list argptr, uint32_t nbytes, void *dst_addr GASNETI_THREAD_FARG) { gasneti_assert(am_req); gasneti_assert(am_req->buffer.data); gasneti_assert(0 == GASNETC_BUF_SIZE(am_req->buffer)); gasneti_static_assert(GASNETC_UCX_SHORT_HDR_SIZE(0) == offsetof(gasnetc_sreq_hdr_t, payload_size)); gasneti_static_assert(GASNETC_UCX_MED_HDR_SIZE(0) == offsetof(gasnetc_sreq_hdr_t, dst_addr)); gasneti_static_assert(GASNETC_UCX_LONG_HDR_SIZE(0) == sizeof(gasnetc_sreq_hdr_t)); am_req->am_hdr = (gasnetc_sreq_hdr_t*)GASNETC_BUF_PTR(am_req->buffer); am_req->am_hdr->size = 0; am_req->am_hdr->am_type = am_type; am_req->am_hdr->handler = handler; #if !GASNETC_PIN_SEGMENT am_req->am_hdr->is_packed = is_packed; #endif am_req->am_hdr->is_req = is_req; am_req->am_hdr->src = gasneti_mynode; am_req->am_hdr->numargs = numargs; size_t header_size; switch (am_type) { case GASNETC_UCX_AM_SHORT: header_size = GASNETC_UCX_SHORT_HDR_SIZE(0); break; case GASNETC_UCX_AM_MEDIUM: { am_req->am_hdr->payload_size = nbytes; header_size = GASNETC_UCX_MED_HDR_SIZE(0); break; } case GASNETC_UCX_AM_LONG: { am_req->am_hdr->payload_size = nbytes; am_req->am_hdr->dst_addr = dst_addr; header_size = GASNETC_UCX_LONG_HDR_SIZE(0); break; } default: gasneti_unreachable_error(("Invalid am_type in gasnetc_am_req_format")); } GASNETC_BUF_ADD_SEND_BYTES(am_req, header_size); am_req->args = (gex_AM_Arg_t*)GASNETC_BUF_PTR(am_req->buffer); GASNETC_BUF_ADD_SEND_BYTES(am_req, GASNETC_ARGS_SIZE(numargs)); gasneti_assert(GASNETC_ARGS_SIZE(numargs) <= GASNETC_MAX_ARGS_SIZE); if (numargs) { for (int i = 0; i < numargs; i++) { am_req->args[i] = va_arg(argptr, gex_AM_Arg_t); } } if (GASNETC_UCX_AM_MEDIUM == am_type) { /* the payload following the arguments must be aligned * to GASNETI_MEDBUF_ALIGNMENT */ unsigned int padding_size = GASNETC_AMMED_PADDING_SIZE(numargs); gasneti_assert_uint(padding_size ,<, GASNETI_MEDBUF_ALIGNMENT); GASNETC_BUF_ADD_SEND_BYTES(am_req, padding_size); } } /* ------------------------------------------------------------------------------------ */ /* RMA functions ============= */ gasnetc_mem_info_t * gasnetc_find_mem_info(void *addr, int nbytes, gex_Rank_t rank) { // TODO-future: use UCS rcache gasnetc_mem_info_t *mem_info; // TODO: thread safety in list traversal? GASNETI_LIST_FOREACH(mem_info, &gasneti_ucx_module.ep_tbl[rank].mem_tbl, gasnetc_mem_info_t) { if (GASNETC_ADDR_IN_RANGE(mem_info->addr, mem_info->length, addr, nbytes)) { return mem_info; } } return NULL; } static void gasnetc_ucx_rma_cb(void *request, ucs_status_t status) { gasnetc_ucx_request_t *req = (gasnetc_ucx_request_t*) request; if (status != UCS_OK) { gasneti_fatalerror("UCX RDMA operation failed: %s", ucs_status_string(status)); } if (req->completion.cbfunc) { req->completion.cbfunc(req->completion.cbdata); } req->completion.cbfunc = NULL; req->completion.cbdata = NULL; ucp_request_free(request); return; } int gasnetc_ucx_putget_inner(int is_put, gex_Rank_t jobrank, void *buffer, uint32_t nbytes, void *remote_addr, gasnetc_atomic_val_t *local_cnt, gasnetc_cbfunc_t local_cb, gasnetc_atomic_val_t *remote_cnt, gasnetc_cbfunc_t remote_cb) { gasnetc_ucx_request_t *req; ucp_ep_h ep = GASNETC_UCX_GET_EP(jobrank); gasnetc_mem_info_t * minfo; int immediate = 0; minfo = gasnetc_find_mem_info(remote_addr, nbytes, jobrank); if (NULL == minfo) { gasneti_fatalerror("rkey cannot found"); } if (local_cnt) (*local_cnt)++; req = gasnetc_putget_fn(is_put, ep, buffer, nbytes, remote_addr, minfo->rkey, gasnetc_ucx_rma_cb); if (NULL == req) { /* completed inplace */ if (local_cb) { local_cb(local_cnt); } immediate = 1; } else { if_pf (UCS_PTR_IS_ERR(req)) { gasneti_fatalerror("UCX RDMA put failed: %s", ucs_status_string(UCS_PTR_STATUS(req))); } req->completion.cbdata = local_cnt; req->completion.cbfunc = local_cb; } if (remote_cnt) { (*remote_cnt)++; req = ucp_ep_flush_nb(ep, 0, gasnetc_ucx_rma_cb); if (req == NULL) { remote_cb(remote_cnt); } else { req->completion.cbdata = remote_cnt; req->completion.cbfunc = remote_cb; } } return immediate; } /* ------------------------------------------------------------------------------------ */ /* Send/recv requests ================== */ GASNETI_INLINE(gasnetc_req_reset) void gasnetc_req_reset(void *request) { gasnetc_ucx_request_t *req = (gasnetc_ucx_request_t *) request; req->status = GASNETC_UCX_INIT; req->am_req = NULL; } void gasnetc_req_init(void *request) { GASNETI_DBG_LIST_ITEM_SET_MAGIC(request); gasnetc_req_reset(request); } GASNETI_INLINE(gasnetc_req_free) void gasnetc_req_free(void *req) { gasnetc_ucx_request_t *request = (gasnetc_ucx_request_t *) req; if (request->am_req) { gasnetc_am_req_release(request->am_req); } gasnetc_req_reset(request); ucp_request_free(request); } static void gasnetc_ucx_send_handler(void *request, ucs_status_t status) { gasnetc_ucx_request_t *req = (gasnetc_ucx_request_t *)request; req->status = GASNETC_UCX_COMPLETE; if (UCS_ERR_CANCELED == status) { req->status = GASNETC_UCX_CANCEL; return; } if (req->completion.cbfunc) { req->completion.cbfunc(req->completion.cbdata); } req->completion.cbfunc = NULL; req->completion.cbdata = NULL; exit: gasneti_list_rem(&gasneti_ucx_module.send_queue, req); gasnetc_req_free(req); } GASNETI_INLINE(gasnetc_send_req) void gasnetc_send_req(gasnetc_am_req_t *am_req, gex_Rank_t jobrank, gasnetc_atomic_val_t *local_cnt, gasnetc_cbfunc_t local_cb) { gasnetc_ucx_request_t *request = NULL; ucp_ep_h server_ep = gasneti_ucx_module.ep_tbl[jobrank].server_ep; void *src_ptr; size_t count; ucp_datatype_t datatype; #if GASNETC_PIN_SEGMENT src_ptr = (void*)GASNETC_BUF_DATA(am_req->buffer); count = GASNETC_BUF_SIZE(am_req->buffer); datatype = ucp_dt_make_contig(1); #else if_pt (!am_req->iov_count) { src_ptr = (void*)GASNETC_BUF_DATA(am_req->buffer); count = GASNETC_BUF_SIZE(am_req->buffer); datatype = ucp_dt_make_contig(1); } else { gasneti_assert((am_req->iov_count <= GASNETC_UCX_IOV_MAX) && "Wrong iov count"); src_ptr = (void*)am_req->sendiov; count = (size_t)am_req->iov_count; datatype = ucp_dt_make_iov(); } #endif if (local_cnt) (*local_cnt)++; request = ucp_tag_send_nb(server_ep, src_ptr, count, datatype, (ucp_tag_t)0, gasnetc_ucx_send_handler); if_pf (UCS_PTR_IS_ERR(request)) { gasnetc_am_req_release(am_req); gasneti_fatalerror("UCX recv request failed: %s", ucs_status_string(UCS_PTR_STATUS(request))); /* Doesn't return */ } if (NULL == request) { /* request was completed in place */ if (local_cb) { local_cb(local_cnt); } gasnetc_am_req_release(am_req); goto exit; } request->am_req = am_req; request->completion.cbdata = local_cnt; request->completion.cbfunc = local_cb; request->status = GASNETC_UCX_ACTIVE; gasneti_list_enq(&gasneti_ucx_module.send_queue, request); exit: return; } /* ------------------------------------------------------------------------------------ */ /* Active Message Request Functions ================================ */ int gasnetc_am_reqrep_inner(gasnetc_ucx_am_type_t am_type, gex_Rank_t jobrank, gex_AM_Index_t handler, gex_Flags_t flags, uint8_t is_request, int numargs, va_list argptr, void *src_addr, uint32_t nbytes, void *dst_addr, gasnetc_atomic_val_t *local_cnt, gasnetc_cbfunc_t local_cb GASNETI_THREAD_FARG) { gasnetc_am_req_t *am_req; GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); am_req = gasnetc_am_req_get(is_request GASNETI_THREAD_PASS); gasneti_assert(am_req); #define __am_req_format(__is_packed) \ gasnetc_am_req_format(am_req, am_type, handler, __is_packed, \ is_request, numargs, argptr, nbytes, dst_addr \ GASNETI_THREAD_PASS) if (!nbytes) { /* GASNETC_UCX_AM_SHORT always goes this way */ __am_req_format(0); goto send; } if (GASNETC_UCX_AM_MEDIUM == am_type ) { __am_req_format(0); gasneti_assert(src_addr); gasneti_assert_uint(nbytes ,<=, GASNETC_MAX_MED_(numargs)); /* pack payload */ GASNETI_MEMCPY(GASNETC_BUF_PTR(am_req->buffer), src_addr, nbytes); GASNETC_BUF_ADD_SEND_BYTES(am_req, nbytes); } else { gasneti_assert(GASNETC_UCX_AM_LONG == am_type); gasneti_assert(src_addr); gasneti_assert(dst_addr); #if GASNETC_PIN_SEGMENT // TODO: packed Long // TODO: locality check would permit in-order assumption for off-node __am_req_format(0); if (gasnetc_am_in_order) { // Launch payload put with no stall prior to sending header gasnetc_ucx_putget_inner(1, jobrank, src_addr, nbytes, dst_addr, local_cnt, local_cb, NULL, NULL); } else { // Launch payload put and stall for remote completion prior to sending the header // See bug 4155 for the motivation gasnetc_counter_t rc_counter = GASNETC_COUNTER_INITIALIZER; gasnetc_ucx_putget_inner(1, jobrank, src_addr, nbytes, dst_addr, NULL, NULL, &rc_counter.initiated, gasnetc_cb_counter); GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); gasnetc_counter_wait(&rc_counter, is_request GASNETI_THREAD_PASS); GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); } // Do not delay LC for header send: local_cnt = NULL; local_cb = NULL; #else // GASNETC_PIN_SEGMENT __am_req_format(1); if (nbytes <= GASNETC_MAX_MED_(numargs)) { GASNETI_MEMCPY(GASNETC_BUF_PTR(am_req->buffer), src_addr, nbytes); GASNETC_BUF_ADD_SEND_BYTES(am_req, nbytes); } else { gasnetc_req_add_iov(am_req, GASNETC_BUF_DATA(am_req->buffer), GASNETC_BUF_SIZE(am_req->buffer)); am_req->buffer.long_data_ptr = gasneti_malloc(nbytes); GASNETI_MEMCPY(am_req->buffer.long_data_ptr, src_addr, nbytes); am_req->buffer.long_bytes_used = nbytes; gasnetc_req_add_iov(am_req, am_req->buffer.long_data_ptr, nbytes); } gasneti_assume(local_cnt == NULL); gasneti_assume(local_cb == NULL); #endif // GASNETC_PIN_SEGMENT } send: // NOTE: local_cnt/local_cb here are NOT used for Longs. // Rather they provide LC stall for Short headers during shutdown gasnetc_send_req(am_req, jobrank, local_cnt, local_cb); GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); return GASNET_OK; } int gasnetc_AM_ReqRepGeneric(gasnetc_ucx_am_type_t am_type, gex_Rank_t jobrank, gex_AM_Index_t handler, gex_Event_t *lc_opt, gex_Flags_t flags, uint8_t is_request, int numargs, va_list argptr, void *src_addr, uint32_t nbytes, void *dst_addr GASNETI_THREAD_FARG) { int retval; gasnete_eop_t *eop = NULL; gasnetc_counter_t *counter_ptr = NULL; gasnetc_cbfunc_t cbfunc = NULL; gasnetc_atomic_val_t *local_cnt = NULL; gasnetc_atomic_val_t start_cnt; #if GASNETC_PIN_SEGMENT gasnetc_counter_t counter = GASNETC_COUNTER_INITIALIZER; #endif if (GASNETC_UCX_AM_LONG == am_type) { #if GASNETC_PIN_SEGMENT gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; if (gasneti_leaf_is_pointer(lc_opt)) { eop = gasnete_eop_new_alc(mythread); start_cnt = eop->initiated_alc; local_cnt = &eop->initiated_alc; cbfunc = gasnetc_cb_eop_alc; *lc_opt = (gex_Event_t) eop; } else if (lc_opt == GEX_EVENT_GROUP) { gasnete_iop_t *iop = mythread->current_iop; local_cnt = &iop->initiated_alc_cnt; cbfunc = iop->next ? gasnetc_cb_nar_alc : gasnetc_cb_iop_alc; } else { gasneti_assert(lc_opt == GEX_EVENT_NOW); local_cnt = &counter.initiated; cbfunc = gasnetc_cb_counter; counter_ptr = &counter; } #else // GASNETC_PIN_SEGMENT gasneti_leaf_finish(lc_opt); // synchronous local completion #endif } retval = gasnetc_am_reqrep_inner(am_type, jobrank, handler, flags, is_request, numargs, argptr, src_addr, nbytes, dst_addr, local_cnt, cbfunc GASNETI_THREAD_PASS); gasneti_assert(!retval); // at least until IMMEDIATE support is added #if GASNETC_PIN_SEGMENT if (GASNETC_UCX_AM_LONG == am_type) { if (counter_ptr) { gasneti_assert_ptr(GEX_EVENT_NOW ,==, lc_opt); gasnetc_counter_wait(counter_ptr, is_request GASNETI_THREAD_PASS); } else if (eop) { gasneti_assume_leaf_is_pointer(lc_opt); // avoid maybe-uninitialized warning (like ibv bug 3756) if (start_cnt == eop->initiated_alc) { // Synchronous LC - reset LC state and pass-back INVALID_HANDLE GASNETE_EOP_LC_FINISH(eop); *lc_opt = GEX_EVENT_INVALID; gasnete_eop_free(eop GASNETI_THREAD_PASS); } } } #endif return retval; } void gasnetc_ProcessRecv(void *buf, size_t size) { gasnetc_sreq_hdr_t *am_hdr = (gasnetc_sreq_hdr_t*)buf; gex_AM_Index_t handler_id = am_hdr->handler; int numargs = am_hdr->numargs; int is_req = am_hdr->is_req; gasnetc_ucx_am_type_t am_type = am_hdr->am_type; const gex_AM_Fn_t handler_fn = gasnetc_handler[handler_id].gex_fnptr; gex_Token_t token_ptr = (gex_Token_t)am_hdr; switch(am_type) { case GASNETC_UCX_AM_SHORT: { size_t args_offset = GASNETC_UCX_SHORT_HDR_SIZE(0); gex_AM_Arg_t *args = (gex_AM_Arg_t*)((uintptr_t)buf + args_offset); gasneti_assert_uint(size ,==, args_offset + GASNETC_ARGS_SIZE(numargs)); GASNETI_RUN_HANDLER_SHORT(is_req, handler_id, handler_fn, token_ptr, args, numargs); break; } case GASNETC_UCX_AM_MEDIUM: { size_t args_offset = GASNETC_UCX_MED_HDR_SIZE(0); gex_AM_Arg_t *args = (gex_AM_Arg_t*)((uintptr_t)buf + args_offset); size_t header_size = GASNETC_UCX_MED_HDR_SIZE_PADDED(numargs); size_t nbytes = am_hdr->payload_size; gasneti_assert_uint(size ,==, header_size + nbytes); char *data = (char*)((uintptr_t)buf + header_size); GASNETI_RUN_HANDLER_MEDIUM(is_req, handler_id, handler_fn, token_ptr, args, numargs, data, nbytes); break; } case GASNETC_UCX_AM_LONG: { size_t args_offset = GASNETC_UCX_LONG_HDR_SIZE(0); gex_AM_Arg_t *args = (gex_AM_Arg_t*)((uintptr_t)buf + args_offset); size_t header_size = GASNETC_UCX_LONG_HDR_SIZE(numargs); size_t nbytes = am_hdr->payload_size; #if GASNETC_PIN_SEGMENT gasneti_assert_uint(size ,==, header_size); #else int is_packed = am_hdr->is_packed; gasneti_assert_uint(size ,==, header_size + (is_packed?nbytes:0)); if (is_packed) { if (am_hdr->payload_size > 0) { gasneti_assert(am_hdr->dst_addr); char *data = (char*)((uintptr_t)buf + header_size); GASNETI_MEMCPY(am_hdr->dst_addr, data, nbytes); } } #endif GASNETI_RUN_HANDLER_LONG(is_req, handler_id, handler_fn, token_ptr, args, numargs, am_hdr->dst_addr, nbytes); break; } } } GASNETI_INLINE(gasnetc_ucx_progress) int gasnetc_ucx_progress(void) { int status; for(int i = 0; (status = ucp_worker_progress(gasneti_ucx_module.ucp_worker)) && i < GASNETC_UCX_PROGRESS_CNT; i++); return status; } GASNETI_INLINE(gasnetc_recv_post) void gasnetc_recv_post(gasnetc_ucx_request_t *req) { GASNETI_DBG_LIST_ITEM_CHECK(req); gasnetc_req_reset(req); req->ucs_status = ucp_tag_recv_nbr(gasneti_ucx_module.ucp_worker, req->buffer.data, gasnetc_ammed_bufsz, ucp_dt_make_contig(1), 0, 0, req); if_pf (req->ucs_status < 0) { gasneti_fatalerror("UCX post request failed: %s", ucs_status_string(UCS_PTR_STATUS(req->ucs_status))); } } #if GASNETC_PIN_SEGMENT int gasnetc_recv_init(void) { int i; gasnetc_ucx_request_t *req; ucp_context_attr_t attr; ucs_status_t status; gasneti_list_init(&gasneti_ucx_module.recv_queue); attr.field_mask = UCP_ATTR_FIELD_REQUEST_SIZE; status = ucp_context_query(gasneti_ucx_module.ucp_context, &attr); gasneti_ucx_module.request_size = attr.request_size; // TODO: See comment preceding gasnetc_send_init regarding bug 4334 for (i = 0; i < GASNETC_UCX_RCV_REAP_MAX; i++) { void *ucx_req = gasneti_malloc(gasneti_ucx_module.request_size + sizeof(gasnetc_ucx_request_t)); req = (gasnetc_ucx_request_t*) (((char*) ucx_req) + gasneti_ucx_module.request_size); gasnetc_req_init(req); req->buffer.data = gasneti_malloc_aligned(GASNETI_MEDBUF_ALIGNMENT, gasnetc_ammed_bufsz); gasneti_list_enq(&gasneti_ucx_module.recv_queue, req); gasnetc_recv_post(req); } return GASNET_OK; } void gasnetc_recv_fini(void) { gasnetc_ucx_request_t *req; void *ucx_req; while(NULL != (req = GASNETI_LIST_POP(&gasneti_ucx_module.recv_queue, gasnetc_ucx_request_t))) { ucx_req = ((char*) req) - gasneti_ucx_module.request_size; gasneti_free_aligned(req->buffer.data); gasneti_free(ucx_req); } gasneti_list_fini(&gasneti_ucx_module.recv_queue); } #else // GASNETC_PIN_SEGMENT int gasnetc_recv_init(void) { int i; gasnetc_am_req_t *rreq; gasneti_list_init(&gasneti_ucx_module.recv_queue); gasneti_list_init(&gasneti_ucx_module.rreq_free); // TODO: See comment preceding gasnetc_send_init regarding bug 4334 for (i = 0; i < GASNETC_UCX_RCV_REAP_MAX; i++) { GASNETI_LIST_ITEM_ALLOC(rreq, gasnetc_am_req_t, gasnetc_am_req_reset); rreq->buffer.data = gasneti_malloc_aligned(GASNETI_MEDBUF_ALIGNMENT, gasnetc_ammed_bufsz); rreq->buffer.long_data_ptr = NULL; GASNETC_BUF_RESET(rreq->buffer); gasneti_list_enq(&gasneti_ucx_module.rreq_free, rreq); } return GASNET_OK; } void gasnetc_recv_fini(void) { gasnetc_am_req_t *rreq; gasnetc_ucx_request_t *ucx_req; while (NULL != (ucx_req = GASNETI_LIST_POP(&gasneti_ucx_module.recv_queue, gasnetc_ucx_request_t))) { gasnetc_rreq_release(ucx_req); } gasneti_list_fini(&gasneti_ucx_module.recv_queue); while (NULL != (rreq = GASNETI_LIST_POP(&gasneti_ucx_module.rreq_free, gasnetc_am_req_t))) { gasneti_free_aligned(rreq->buffer.data); #if !GASNETC_PIN_SEGMENT gasneti_assert(!rreq->buffer.long_bytes_used); gasneti_assert(!rreq->buffer.long_data_ptr); #endif gasneti_free(rreq); } gasneti_list_fini(&gasneti_ucx_module.rreq_free); } #endif // GASNETC_PIN_SEGMENT #if GASNETC_PIN_SEGMENT int gasnetc_poll_sndrcv(gasnetc_lock_mode_t lmode GASNETI_THREAD_FARG) { gasnetc_ucx_request_t *req, *tmp; gasnetc_sreq_hdr_t *am_hdr; GASNETC_LOCK_ACQUIRE(lmode); gasnetc_ucx_progress(); req = gasneti_list_head(&gasneti_ucx_module.recv_queue); if (ucp_request_is_completed(req)) { tmp = GASNETI_LIST_POP(&gasneti_ucx_module.recv_queue, gasnetc_ucx_request_t); gasneti_assume(tmp == req); am_hdr = (gasnetc_sreq_hdr_t*)req->buffer.data; GASNETC_BUF_SET_OFFSET(req->buffer, am_hdr->size); gasnetc_ProcessRecv(GASNETC_BUF_DATA(req->buffer), GASNETC_BUF_SIZE(req->buffer)); gasnetc_recv_post(req); gasneti_list_enq(&gasneti_ucx_module.recv_queue, req); } gasnetc_ucx_progress(); GASNETC_LOCK_RELEASE(lmode); #if GASNET_PSHM if (lmode == GASNETC_LOCK_REGULAR) { gasneti_AMPSHMPoll(0 GASNETI_THREAD_PASS); } else if (lmode == GASNETC_LOCK_INLINE) { /* `gasneti_AMPSHMPoll` should be called outside the lock */ GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); gasneti_AMPSHMPoll(0 GASNETI_THREAD_PASS); GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); } #endif return 0; } void gasnetc_poll_snd(gasnetc_lock_mode_t lmode GASNETI_THREAD_FARG) { GASNETC_LOCK_ACQUIRE(lmode); gasnetc_ucx_progress(); GASNETC_LOCK_RELEASE(lmode); #if GASNET_PSHM if (lmode == GASNETC_LOCK_REGULAR) { gasneti_AMPSHMPoll(1 GASNETI_THREAD_PASS); } else if (lmode == GASNETC_LOCK_INLINE) { /* `gasneti_AMPSHMPoll` should be called outside the lock */ GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); gasneti_AMPSHMPoll(1 GASNETI_THREAD_PASS); GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); } #endif } #else // GASNETC_PIN_SEGMENT static void gasneti_ucx_recv_handler(void *request, ucs_status_t status, ucp_tag_recv_info_t *info) { gasnetc_ucx_request_t *req = (gasnetc_ucx_request_t*) request; if (UCS_ERR_CANCELED == status) { req->status = GASNETC_UCX_CANCEL; return; } if (status != UCS_OK) { req->status = GASNETC_UCX_FAILED; return; } if (req->status != GASNETC_UCX_INIT) { // enqueue the complete request to process in gasnetc_poll_sndrcv() gasneti_assert(req->am_req && ((info->length == GASNETC_BUF_SIZE(req->am_req->buffer)) || (info->length == GASNETC_BUF_LSIZE(req->am_req->buffer)))); gasneti_list_enq(&gasneti_ucx_module.recv_queue, req); } else { // The request was completed synchronously and cannot be enqueued // here due to lack of the am_req field. // So, it is enqueued by gasnetc_poll_snd instead } req->status = GASNETC_UCX_COMPLETE; } // Despite the name, this function also advances two-stage AM reception // However, it does not run any AM handlers void gasnetc_poll_snd(gasnetc_lock_mode_t lmode GASNETI_THREAD_FARG) { uint32_t probe_cnt = 0, probe_max; gasnetc_ucx_request_t *request = NULL; void *buf_ptr = NULL; ucp_tag_recv_info_t info_tag; ucp_tag_message_h msg_tag; gasnetc_am_req_t *rreq; GASNETC_LOCK_ACQUIRE(lmode); // Must progress at least once, even if rreq_free is empty, // in order to advance sends gasnetc_ucx_progress(); // Drain up to GASNETC_UCX_RCV_REAP_MAX incoming receives (but not more than // available entries in rreq_free), posting the buffers needed to complete // reception. probe_max = gasneti_list_size(&gasneti_ucx_module.rreq_free); probe_max = MIN(probe_max, GASNETC_UCX_RCV_REAP_MAX); while((probe_cnt++) < probe_max) { gasnetc_ucx_progress(); // check for new messages msg_tag = ucp_tag_probe_nb(gasneti_ucx_module.ucp_worker, 0, 0, 1, &info_tag); if (NULL == msg_tag) { break; } // allocate/initialize an gasnetc_am_req_t for asynchronous message reception rreq = GASNETI_LIST_POP(&gasneti_ucx_module.rreq_free, gasnetc_am_req_t); if (info_tag.length > gasnetc_ammed_bufsz) { // TODO/TBD: can/should tag bits pass the header length to allow use // of a 2-element iovec for reception, splitting the header from the // payload? rreq->buffer.long_data_ptr = gasneti_malloc(info_tag.length); rreq->buffer.long_bytes_used = info_tag.length; buf_ptr = rreq->buffer.long_data_ptr; } else { // TODO/TBD: can this case be handled w/ pre-posted receives as in // the GASNETC_PIN_SEGMENT case, using a tag bit to separate the // two classes of AM reception? rreq->buffer.bytes_used = info_tag.length; buf_ptr = rreq->buffer.data; } // "match" the new message, allowing UCX to complete reception request = (gasnetc_ucx_request_t*) ucp_tag_msg_recv_nb(gasneti_ucx_module.ucp_worker, buf_ptr, info_tag.length, ucp_dt_make_contig(1), msg_tag, gasneti_ucx_recv_handler); if (UCS_PTR_IS_ERR(request)) { gasneti_fatalerror("UCX recv request failed: %s", ucs_status_string(UCS_PTR_STATUS(request))); /* gasneti_fatalerror doesn't return */ } // link rreq from the recv_nb request request->am_req = rreq; if (GASNETC_UCX_COMPLETE == request->status) { // The request was completed synchronously and therefore // was not added to the recv_queue by gasneti_ucx_recv_handler(). // So enqueue the complete request to process in gasnetc_poll_sndrcv() gasneti_list_enq(&gasneti_ucx_module.recv_queue, request); } else { request->status = GASNETC_UCX_ACTIVE; } } // TODO: trace/stats for probe_cnt? GASNETC_LOCK_RELEASE(lmode); } // Dequeue a completed request GASNETI_INLINE(gasneti_req_probe_complete) gasnetc_ucx_request_t *gasneti_req_probe_complete(gasneti_list_t *req_list) { gasnetc_ucx_request_t *req; req = (gasnetc_ucx_request_t*)gasneti_list_deq(req_list); if (NULL != req) { gasneti_assert(GASNETC_UCX_COMPLETE == req->status); gasneti_assert(req->am_req->buffer.bytes_used || req->am_req->buffer.long_bytes_used); } return req; } GASNETI_INLINE(gasnetc_rreq_release) void gasnetc_rreq_release(gasnetc_ucx_request_t *req) { gasnetc_am_req_t *am_req = req->am_req; if (GASNETC_BUF_LSIZE(am_req->buffer)) { gasneti_free(GASNETC_BUF_LDATA(am_req->buffer)); GASNETC_BUF_LDATA(am_req->buffer) = NULL; } GASNETC_BUF_RESET(am_req->buffer); gasneti_list_enq(&gasneti_ucx_module.rreq_free, am_req); gasnetc_req_reset(req); ucp_request_release(req); } int gasnetc_poll_sndrcv(gasnetc_lock_mode_t lmode GASNETI_THREAD_FARG) { int recv_list_size = 0; gasnetc_ucx_request_t *request = NULL; gasneti_list_t local_recv_list; GASNETC_LOCK_ACQUIRE(lmode); // progress UCX and move completed receives to the recv_queue gasnetc_poll_snd(GASNETC_LOCK_INLINE GASNETI_THREAD_PASS); gasnetc_ucx_progress(); // With the lock held, dequeue a batch of up to GASNETC_UCX_MSG_HNDL_PER_POLL // completed receives for processing without the lock held recv_list_size = gasneti_list_size(&gasneti_ucx_module.recv_queue); if_pt (!recv_list_size) { goto exit; } gasneti_list_init(&local_recv_list); int num_recv = MIN(recv_list_size, GASNETC_UCX_MSG_HNDL_PER_POLL); for (int i = 0; i < num_recv; ++i) { request = gasneti_req_probe_complete(&gasneti_ucx_module.recv_queue); gasneti_assert(request); gasneti_list_enq(&local_recv_list, request); } GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); // handle the batch of received messages GASNETI_LIST_FOREACH(request, &local_recv_list, gasnetc_ucx_request_t) { gasneti_assert(request->am_req->buffer.bytes_used || request->am_req->buffer.long_bytes_used); if_pt (GASNETC_BUF_SIZE(request->am_req->buffer)) { gasnetc_ProcessRecv(GASNETC_BUF_DATA(request->am_req->buffer), GASNETC_BUF_SIZE(request->am_req->buffer)); } else { gasnetc_ProcessRecv(GASNETC_BUF_LDATA(request->am_req->buffer), GASNETC_BUF_LSIZE(request->am_req->buffer)); } } GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); // release the batch requests while(NULL != (request = GASNETI_LIST_POP(&local_recv_list, gasnetc_ucx_request_t))) { gasnetc_rreq_release(request); } gasneti_list_fini(&local_recv_list); exit: GASNETC_LOCK_RELEASE(lmode); return recv_list_size; } #endif // GASNETC_PIN_SEGMENT void gasnetc_send_list_wait(gasnetc_lock_mode_t lmode GASNETI_THREAD_FARG) { size_t send_size; GASNETI_SPIN_DOWHILE(send_size, { GASNETC_LOCK_ACQUIRE(lmode); gasnetc_poll_sndrcv(GASNETC_LOCK_INLINE GASNETI_THREAD_PASS); send_size = gasneti_list_size(&gasneti_ucx_module.send_queue); GASNETC_LOCK_RELEASE(lmode); }); } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/ucx-conduit/gasnet_core_fwd.h0000664000175000017500000002203415142313673021167 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/gasnet_core_fwd.h $ * Description: GASNet header for ucx conduit core (forward definitions) * Copyright 2002, Dan Bonachea * Copyright 2019, Mellanox Technologies LTD. All rights reserved. * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_FWD_H #define _GASNET_CORE_FWD_H #define GASNET_CORE_VERSION 0.7 #define GASNET_CORE_VERSION_STR _STRINGIFY(GASNET_CORE_VERSION) #define GASNET_CORE_NAME UCX #define GASNET_CORE_NAME_STR _STRINGIFY(GASNET_CORE_NAME) #define GASNET_CONDUIT_NAME GASNET_CORE_NAME #define GASNET_CONDUIT_NAME_STR _STRINGIFY(GASNET_CONDUIT_NAME) #define GASNET_CONDUIT_UCX 1 #define GASNETC_DEFAULT_SPAWNER GASNETC_UCX_SPAWNER_CONF // PSHM and loopback support need to know largest Medium if larger than MAX(LUB{Request,Reply}Medium) #define GASNETC_MAX_MEDIUM_NBRHD GASNETC_MAX_MED_(0) /* GASNET_PSHM defined 1 if this conduit supports PSHM. leave undefined otherwise. */ #if GASNETI_PSHM_ENABLED #define GASNET_PSHM 1 #endif /* defined to be 1 if gasnet_init guarantees that the remote-access memory segment will be aligned */ /* at the same virtual address on all nodes. defined to 0 otherwise */ #if GASNETI_DISABLE_ALIGNED_SEGMENTS || GASNET_PSHM #define GASNET_ALIGNED_SEGMENTS 0 /* user or PSHM disabled segment alignment */ #else #define GASNET_ALIGNED_SEGMENTS 1//### #endif // If this conduit is considered a "portable conduit" only *conditionally*, // uncomment to enable calls to gasnetc_check_portable_conduit(void) as // described in gasnet_internal.c. // TODO: As originally noted in bug 4438, our intent is to only recommend // ucx-conduit for use with supported hardware (currently Mellanox ConnectX-5 // or newer). If/when UCP can provide us with information about this selected // transports OR we recode to UCT (and thus control the selection), we should // apply this conduit-specific knowledge to implement this hook. //#define GASNETC_CHECK_PORTABLE_CONDUIT_HOOK 1 // uncomment for each MK_CLASS which the conduit supports. leave commented otherwise #define GASNET_HAVE_MK_CLASS_CUDA_UVA (GASNETI_MK_CLASS_CUDA_UVA_ENABLED && !GASNET_SEGMENT_EVERYTHING) #define GASNET_HAVE_MK_CLASS_HIP (GASNETI_MK_CLASS_HIP_ENABLED && !GASNET_SEGMENT_EVERYTHING) //#define GASNET_HAVE_MK_CLASS_ZE GASNETI_MK_CLASS_ZE_ENABLED // define to 1 if your conduit has "private" thread(s) which can run AM handlers //#define GASNET_RCV_THREAD 1 // define to 1 if your conduit has "private" thread(s) which progress sends of RMA and/or AM //#define GASNET_SND_THREAD 1 /* uncomment if your conduit has "private" threads which might run conduit code and/or the client's AM handlers, even under GASNET_SEQ. this ensures locking is still done correctly, etc */ //#define GASNETI_CONDUIT_THREADS 1 /* define these to 1 if your conduit needs to augment the implementation of gasneti_reghandler() (in gasnet_internal.c) */ #if 0 #define GASNETC_AMREGISTER 1 #endif /* define this to 1 if your conduit supports PSHM, but cannot use the default interfaces. (see template-conduit/gasnet_core.c and gasnet_pshm.h) */ #if 0 #define GASNETC_GET_HANDLER 1 #endif /* uncomment each line for which your conduit supports the corresponding token info query. */ #define GASNET_SUPPORTS_TI_SRCRANK 1 #define GASNET_SUPPORTS_TI_EP 1 #define GASNET_SUPPORTS_TI_ENTRY 1 #define GASNET_SUPPORTS_TI_IS_REQ 1 #define GASNET_SUPPORTS_TI_IS_LONG 1 /* uncomment for each {Request,Reply} X {Medium,Long} pair for which your conduit implements the corresponding gasnetc_AM_{Prepare,Commit}*() in a "native" manner which "can avoid one or more payload copies relative to the corresponding fixed-payload AM call under the right conditions". See also "GASNETC_BUILD_NP_*", immediately below. */ /* #define GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM 1 */ /* #define GASNET_NATIVE_NP_ALLOC_REP_MEDIUM 1 */ /* #define GASNET_NATIVE_NP_ALLOC_REQ_LONG 1 */ /* #define GASNET_NATIVE_NP_ALLOC_REP_LONG 1 */ /* conduits may define to '1' (or '0') for {Request,Reply} X {Medium,Long} pairs to force (or prevent) compilation of the corresponding pieces of the conduit-independent reference implementation. If unset, the default is equivalent to '!GASNET_NATIVE_NP_ALLOC_[foo]'. In other words: by default each reference implementation is built if and only if the conduit is not claiming a "native" implementation. This default is correct for most conduits. The conduit-independent implementation works in terms of the internal functions gasnetc_AM{Request,Reply}{Medium,Long}V(). Therefore, your conduit must provide the V-suffixed functions for any case with the corresponding GASNETC_BUILD_NP_* equal to '1' (explicitly or by default). */ /* #define GASNETC_BUILD_NP_REQ_MEDIUM (###) */ /* #define GASNETC_BUILD_NP_REP_MEDIUM (###) */ /* #define GASNETC_BUILD_NP_REQ_LONG (###) */ /* #define GASNETC_BUILD_NP_REP_LONG (###) */ /* uncomment for each conduit-provided Commit{Req,Rep}{Medium,Long}() which has the numargs argument even in an NDEBUG build (it is always passed in DEBUG builds). */ //#define GASNETC_AM_COMMIT_REQ_MEDIUM_NARGS 1 //#define GASNETC_AM_COMMIT_REP_MEDIUM_NARGS 1 //#define GASNETC_AM_COMMIT_REQ_LONG_NARGS 1 //#define GASNETC_AM_COMMIT_REP_LONG_NARGS 1 /* uncomment if your conduit's gasnetc_AMRequest{Short,Medium,Long}V() include a call to gasneti_AMPoll (or equivalent) for progress. The preferred implementation is to Poll only in the M-suffixed calls and not the V-suffixed calls (and GASNETC_REQUESTV_POLLS undefined). Used only by reference implementations (if any) of Prepare/Commit. */ /* #define GASNETC_REQUESTV_POLLS 1 */ /* If your conduit uses conduit-specific extensions to the basic object types, then define the corresponding SIZEOF macros below to return the total length of the conduit-specific object, including the prefix portion which must be the matching GASNETI_[OBJECT]_COMMON fields. Similarly, *_HOOK macros should be defined as callbacks to perform conduit-specific initialization and finalization tasks, if any. If a given SIZEOF macro is defined, but the corresponding INIT_HOOK is not, then space beyond the COMMON fields will be zero-initialized. In all cases, GASNETC_[OBJECT]_EXTRA_DECLS provides the place to provide necessary declarations (since this file is included very early). */ //#define GASNETC_CLIENT_EXTRA_DECLS (###) //#define GASNETC_CLIENT_INIT_HOOK(i_client) (###) //#define GASNETC_CLIENT_FINI_HOOK(i_client) (###) //#define GASNETC_SIZEOF_CLIENT_T() (###) #define GASNETC_SEGMENT_EXTRA_DECLS \ extern size_t gasnetc_sizeof_segment_t(void); //#define GASNETC_SEGMENT_INIT_HOOK(i_segment) (###) //#define GASNETC_SEGMENT_FINI_HOOK(i_segment) (###) #define GASNETC_SIZEOF_SEGMENT_T() \ gasnetc_sizeof_segment_t() //#define GASNETC_TM_EXTRA_DECLS (###) //#define GASNETC_TM_INIT_HOOK(i_tm) (###) //#define GASNETC_TM_FINI_HOOK(i_tm) (###) //#define GASNETC_SIZEOF_TM_T() (###) #define GASNETC_EP_EXTRA_DECLS \ extern int gasnetc_ep_init_hook(gasneti_EP_t); #define GASNETC_EP_INIT_HOOK(i_ep) \ gasnetc_ep_init_hook(i_ep) //#define GASNETC_EP_FINI_HOOK(i_ep) (###) //#define GASNETC_SIZEOF_EP_T() (###) // Uncomment the following defines if conduit provides the corresponding hook. // See gasnet_internal.h for prototypes and brief descriptions. #define GASNETC_SEGMENT_ATTACH_HOOK 1 #define GASNETC_SEGMENT_CREATE_HOOK 1 #define GASNETC_SEGMENT_DESTROY_HOOK 1 //#define GASNETC_EP_BINDSEGMENT_HOOK 1 #define GASNETC_EP_PUBLISHBOUNDSEGMENT_HOOK 1 // Uncomment the following defines if conduit provides the corresponding hook. // See other/kinds/gasnet_kinds_internal.h for prototypes and brief descriptions. //#define GASNETC_MK_CREATE_HOOK 1 //#define GASNETC_MK_DESTROY_HOOK 1 // If conduit supports GASNET_MAXEPS!=1, set default and (optional) max values here. // Leaving GASNETC_MAXEPS_DFLT unset will result in GASNET_MAXEPS=1, independent // of all other settings (appropriate for conduits without multi-ep support). // If set, GASNETC_MAXEPS_MAX it is used to limit a user's --with-maxeps (and a // global default limit is used otherwise). #define GASNETC_MAXEPS_DFLT 33 // Initial (limited) multi-EP support //#define GASNETC_MAXEPS_MAX ### // leave unset for default /* this can be used to add conduit-specific statistical collection values (see gasnet_trace.h) */ #define GASNETC_CONDUIT_STATS(CNT,VAL,TIME) \ CNT(C, BORROW_REPLY_BUF, cnt) \ VAL(C, EXTRA_REPLY_BUF, depth) #define GASNETC_FATALSIGNAL_CALLBACK(sig) gasnetc_fatalsignal_callback(sig) extern void gasnetc_fatalsignal_callback(int _sig); // No validated support for hugetlbfs w/ or w/o PSHM at this time and risk of // issues if auto-enabled on an HPE Cray EX system (e.g. bug 4473). #if GASNETI_ARCH_CRAYEX #undef GASNETI_USE_HUGETLBFS #endif #endif gasnet-2025.8.0/ucx-conduit/gasnet_ratomic.c0000664000175000017500000010225015142313673021027 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/gasnet_ratomic.c $ * Description: GASNet Remote Atomics API Header (forward decls) * Copyright 2019-2020, Mellanox Technologies, Inc. All rights reserved. * Terms of use are as specified in license.txt */ #define GASNETI_NEED_GASNET_RATOMIC_H 1 #include #include #include #include #include #include "gasnet_ucx_req.h" #define GASNETE_DT_INT_APPLY(FN) \ FN(_gex_dt_I32) FN(_gex_dt_U32) \ FN(_gex_dt_I64) FN(_gex_dt_U64) // + fetching INC or DEC: must generate +/- 1 operand for FADD #define GASNETE_UCX_RATOMIC_PREP_FINC(op_idx) \ gasneti_assert((op_idx == gasneti_op_idx_FINC) || \ (op_idx == gasneti_op_idx_FDEC)); \ uint64_t inc = (op_idx == gasneti_op_idx_FINC) ? 1 : -1 #define GASNETE_UCX_RATOMIC_PREP_INC(op_idx) \ gasneti_assert((op_idx == gasneti_op_idx_INC) || \ (op_idx == gasneti_op_idx_DEC)); \ uint64_t inc = (op_idx == gasneti_op_idx_INC) ? 1 : -1 // + fetching single-operand: need to negate operand for FSUB #define GASNETE_UCX_RATOMIC_PREP_FOP(op_idx) /* integer */ \ uint64_t op1 = (op_idx == gasneti_op_idx_FSUB) ? -operand1 : operand1 #define GASNETE_UCX_RATOMIC_PREP_OP(op_idx) /* integer */ \ uint64_t op1 = (op_idx == gasneti_op_idx_SUB) ? -operand1 : operand1 GASNETI_INLINE(amo_fetch_op_map_gex_dt_I32) ucp_atomic_fetch_op_t amo_fetch_op_map_gex_dt_I32(gasneti_op_idx_t op_idx) { switch (op_idx) { case gasneti_op_idx_FADD: return UCP_ATOMIC_FETCH_OP_FADD; /* Atomic Fetch and add */ case gasneti_op_idx_GET: return UCP_ATOMIC_FETCH_OP_FADD; /* Atomic Fetch and add 0 */ case gasneti_op_idx_SET: return UCP_ATOMIC_FETCH_OP_SWAP; /* Atomic swap, ignore fetch */ case gasneti_op_idx_FAND: return UCP_ATOMIC_FETCH_OP_FAND; /* Atomic Fetch and and */ case gasneti_op_idx_FSUB: return UCP_ATOMIC_FETCH_OP_FADD; /* Atomic Fetch and add x */ case gasneti_op_idx_SWAP: return UCP_ATOMIC_FETCH_OP_SWAP; /* Atomic swap */ case gasneti_op_idx_FCAS: return UCP_ATOMIC_FETCH_OP_CSWAP;/* Atomic conditional swap */ case gasneti_op_idx_FOR: return UCP_ATOMIC_FETCH_OP_FOR; /* Atomic Fetch and or */ case gasneti_op_idx_FXOR: return UCP_ATOMIC_FETCH_OP_FXOR; /* Atomic Fetch and xor */ case gasneti_op_idx_FINC: return UCP_ATOMIC_FETCH_OP_FADD; /* Atomic Fetch and add 1 */ case gasneti_op_idx_FDEC: return UCP_ATOMIC_FETCH_OP_FADD; /* Atomic Fetch and add -1 */ case gasneti_op_idx_CAS: return UCP_ATOMIC_FETCH_OP_CSWAP;/* Atomic conditional swap, ignore fetch */ default: gasneti_fatalerror("unknown AMO operation"); } return UCP_ATOMIC_FETCH_OP_LAST; } GASNETI_INLINE(amo_post_op_map_gex_dt_I32) ucp_atomic_post_op_t amo_post_op_map_gex_dt_I32(gasneti_op_idx_t op_idx) { switch (op_idx) { case gasneti_op_idx_ADD: return UCP_ATOMIC_POST_OP_ADD; case gasneti_op_idx_SUB: return UCP_ATOMIC_POST_OP_ADD; case gasneti_op_idx_AND: return UCP_ATOMIC_POST_OP_AND; case gasneti_op_idx_OR: return UCP_ATOMIC_POST_OP_OR; case gasneti_op_idx_XOR: return UCP_ATOMIC_POST_OP_XOR; case gasneti_op_idx_INC: return UCP_ATOMIC_POST_OP_ADD; case gasneti_op_idx_DEC: return UCP_ATOMIC_POST_OP_ADD; default: gasneti_fatalerror("unknown AMO operation"); } return UCP_ATOMIC_POST_OP_LAST; } #define amo_fetch_op_map_gex_dt_U32 amo_fetch_op_map_gex_dt_I32 #define amo_fetch_op_map_gex_dt_I64 amo_fetch_op_map_gex_dt_I32 #define amo_fetch_op_map_gex_dt_U64 amo_fetch_op_map_gex_dt_I32 #define amo_post_op_map_gex_dt_U32 amo_post_op_map_gex_dt_I32 #define amo_post_op_map_gex_dt_I64 amo_post_op_map_gex_dt_I32 #define amo_post_op_map_gex_dt_U64 amo_post_op_map_gex_dt_I32 static void gasnetc_ucx_amo_cb(void *request, ucs_status_t status) { gasnetc_ucx_request_t *req = (gasnetc_ucx_request_t*) request; if (status != UCS_OK) { gasneti_fatalerror("UCX AMO operation failed: %s", ucs_status_string(status)); } if (req->completion.cbfunc) { req->completion.cbfunc(req->completion.cbdata); } req->completion.cbfunc = NULL; req->completion.cbdata = NULL; ucp_request_free(request); return; } GASNETI_INLINE(gasnete_ratomic_fetch_inner) int gasnete_ratomic_fetch_inner(gex_Rank_t rank, const int length, void *tgt_addr, ucp_atomic_fetch_op_t op, int op_cnt, void *result_p, uint64_t operand1, uint64_t operand2, gasnetc_atomic_val_t *initiated_cnt, gasnetc_cbfunc_t complete_cb) { gasnetc_ucx_request_t *req; ucp_ep_h ep = GASNETC_UCX_GET_EP(rank); gasnetc_mem_info_t *mem_info; int result_free = 0; gasneti_assert((8 == length) || (4 == length)); mem_info = gasnetc_find_mem_info(tgt_addr, length, rank); if (NULL == mem_info) { gasneti_fatalerror("UCX atomic operation failed: rkey cannot be found"); } if (NULL == result_p) { result_p = gasneti_malloc(length); result_free = 1; } if (op_cnt == 2) { if (4 == length) { uint32_t *tmp = result_p; *tmp = operand2; } else if (8 == length) { uint64_t *tmp = result_p; *tmp = operand2; } } (*initiated_cnt)++; req = (gasnetc_ucx_request_t *) ucp_atomic_fetch_nb(ep, op, operand1, result_p, length, (uint64_t)tgt_addr, mem_info->rkey, gasnetc_ucx_amo_cb); if (NULL == req) { /* completed inplace */ if (result_free) { gasneti_free(result_p); } if (complete_cb) { complete_cb(initiated_cnt); } return 1; } if_pf (UCS_PTR_IS_ERR(req)) { gasneti_fatalerror("UCX atomic operation failed: %s", ucs_status_string(UCS_PTR_STATUS(req))); } req->completion.cbdata = initiated_cnt; req->completion.cbfunc = complete_cb; req->result_p = result_free ? result_p : NULL; return 0; } // NB-specific wrapper around gasnete_ratomic_inner() GASNETI_INLINE(gasnete_ratomic_fetch_nb) gex_Event_t gasnete_ratomic_fetch_nb(const int length, void *result_p, gasneti_TM_t i_tm, gex_Rank_t tgt_rank, void *tgt_addr, ucp_atomic_fetch_op_t op, int op_cnt, uint64_t operand1, uint64_t operand2, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_eop_t * const eop = gasnete_eop_new(GASNETI_MYTHREAD); gex_Rank_t rank = gasnete_ratomic_jobrank(i_tm, tgt_rank, flags); ucp_ep_h ep = GASNETC_UCX_GET_EP(rank); GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); // TODO: add support GEX_FLAG_IMMEDIATE flag gasnete_ratomic_fetch_inner(rank, length, tgt_addr, op, op_cnt, result_p, operand1, operand2, &eop->initiated_cnt, gasnetc_cb_eop_get); GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); return (gex_Event_t) eop; } int gasnete_ratomic_fetch_nbi(const int length, void *result_p, gasneti_TM_t i_tm, gex_Rank_t tgt_rank, void *tgt_addr, ucp_atomic_fetch_op_t op, int op_cnt, uint64_t operand1, uint64_t operand2, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t * const iop = mythread->current_iop; gex_Rank_t rank = gasnete_ratomic_jobrank(i_tm, tgt_rank, flags); GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); // TODO: add support GEX_FLAG_IMMEDIATE flag gasnete_ratomic_fetch_inner(rank, length, tgt_addr, op, op_cnt, result_p, operand1, operand2, &iop->initiated_rmw_cnt, iop->next ? gasnetc_cb_nar_rmw : gasnetc_cb_iop_rmw); GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); return 0; } int gasnete_ratomic_set_nbi(const int length, void *result_p, gasneti_TM_t i_tm, gex_Rank_t tgt_rank, void *tgt_addr, ucp_atomic_fetch_op_t op, uint64_t operand1, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t * const iop = mythread->current_iop; gex_Rank_t rank = gasnete_ratomic_jobrank(i_tm, tgt_rank, flags); GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); // TODO: add support GEX_FLAG_IMMEDIATE flag gasnete_ratomic_fetch_inner(rank, length, tgt_addr, op, 1, result_p, operand1, 0, &iop->initiated_put_cnt, iop->next ? gasnetc_cb_nar_put : gasnetc_cb_iop_put); GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); return 0; } int gasnete_ratomic_get_nbi(const int length, void *result_p, gasneti_TM_t i_tm, gex_Rank_t tgt_rank, void *tgt_addr, ucp_atomic_fetch_op_t op, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t * const iop = mythread->current_iop; gex_Rank_t rank = gasnete_ratomic_jobrank(i_tm, tgt_rank, flags); GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); // TODO: add support GEX_FLAG_IMMEDIATE flag gasnete_ratomic_fetch_inner(rank, length, tgt_addr, op, 0, result_p, 0, 0, &iop->initiated_get_cnt, iop->next ? gasnetc_cb_nar_get : gasnetc_cb_iop_get); GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); return 0; } GASNETI_INLINE(gasnete_ratomic_post_inner) int gasnete_ratomic_post_inner(const int length, gasneti_TM_t i_tm, gex_Rank_t tgt_rank, void *tgt_addr, ucp_atomic_post_op_t op, uint64_t operand, gasnetc_atomic_val_t *cnt, gasnetc_cbfunc_t cbfunc, gex_Flags_t flags) { gex_Rank_t rank = gasnete_ratomic_jobrank(i_tm, tgt_rank, flags); gasnetc_mem_info_t *mem_info; ucp_ep_h ep = GASNETC_UCX_GET_EP(rank); gasnetc_ucx_request_t *req; ucs_status_t status; int immediate = 0; gasneti_assert((8 == length) || (4 == length)); mem_info = gasnetc_find_mem_info(tgt_addr, length, rank); if (NULL == mem_info) { gasneti_fatalerror("atomic post operation failed: rkey cannot be found"); } status = ucp_atomic_post(ep, op, operand, length, (uint64_t)tgt_addr, mem_info->rkey); if_pf (UCS_OK != status) { gasneti_fatalerror("atomic post operation failed: %s", ucs_status_string(UCS_PTR_STATUS(status))); } if_pt (cnt) { (*cnt)++; req = ucp_ep_flush_nb(ep, 0, gasnetc_ucx_amo_cb); if (req == NULL) { cbfunc(cnt); immediate = 1; } else { req->completion.cbdata = cnt; req->completion.cbfunc = cbfunc; } } return immediate; } GASNETI_INLINE(gasnete_ratomic_post_nb) gex_Event_t gasnete_ratomic_post_nb(const int length, gasneti_TM_t i_tm, gex_Rank_t tgt_rank, void *tgt_addr, ucp_atomic_post_op_t op, uint64_t operand, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_eop_t * const eop = gasnete_eop_new(GASNETI_MYTHREAD); GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); // TODO: add support GEX_FLAG_IMMEDIATE flag gasnete_ratomic_post_inner(length, i_tm, tgt_rank, tgt_addr, op, operand, &eop->initiated_cnt, gasnetc_cb_eop_put, flags); GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); return (gex_Event_t) eop; } GASNETI_INLINE(gasnete_ratomic_post_nbi) int gasnete_ratomic_post_nbi(const int length, gasneti_TM_t i_tm, gex_Rank_t tgt_rank, void *tgt_addr, ucp_atomic_post_op_t op, uint64_t operand, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t * const iop = mythread->current_iop; GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); // TODO: add support GEX_FLAG_IMMEDIATE flag gasnete_ratomic_post_inner(length, i_tm, tgt_rank, tgt_addr, op, operand, &iop->initiated_rmw_cnt, iop->next ? gasnetc_cb_nar_rmw : gasnetc_cb_iop_rmw, flags); GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); return 0; } #define GASNETE_UCXRATOMIC_MID(dtcode) \ _GASNETE_UCXRATOMIC_MID1(gasnete_ucxratomic##dtcode, dtcode##_isint, dtcode##_type, dtcode) // This extra pass expands the "isint" token prior to additional concatenation #define _GASNETE_UCXRATOMIC_MID1(prefix, isint, type, dtcode) \ _GASNETE_UCXRATOMIC_MID2(prefix, isint, type, dtcode) #define _GASNETE_UCXRATOMIC_MID2(prefix, isint, type, dtcode) \ GASNETI_INLINE(prefix##_NB_N0) \ gex_Event_t prefix##_NB_N0( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_post_op_t op = amo_post_op_map##dtcode(op_idx); \ GASNETE_UCX_RATOMIC_PREP_INC(op_idx); \ return gasnete_ratomic_post_nb(sizeof(type), ad->_tm, \ tgt_rank, tgt_addr, op, inc, \ flags GASNETI_THREAD_PASS); \ return GEX_EVENT_INVALID; \ } \ GASNETI_INLINE(prefix##_NB_N1) \ gex_Event_t prefix##_NB_N1( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_post_op_t op = amo_post_op_map##dtcode(op_idx); \ GASNETE_UCX_RATOMIC_PREP_OP(op_idx); \ return gasnete_ratomic_post_nb(sizeof(type), ad->_tm, \ tgt_rank, tgt_addr, op, op1, \ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NB_N2) \ gex_Event_t prefix##_NB_N2( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, type operand2, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ return \ gasnete_ratomic_fetch_nb(sizeof(type), NULL, ad->_tm, \ tgt_rank, tgt_addr, op, 2, operand1,\ operand2, \ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NB_F0) \ gex_Event_t prefix##_NB_F0( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ GASNETE_UCX_RATOMIC_PREP_FINC(op_idx); \ return \ gasnete_ratomic_fetch_nb(sizeof(type), result_p,ad->_tm, \ tgt_rank, tgt_addr, op, 1, inc, 0,\ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NB_F1) \ gex_Event_t prefix##_NB_F1( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ GASNETE_UCX_RATOMIC_PREP_FOP(op_idx); \ return \ gasnete_ratomic_fetch_nb(sizeof(type), result_p, ad->_tm, \ tgt_rank, tgt_addr, op, 1, op1,0, \ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NB_F2) \ gex_Event_t prefix##_NB_F2( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, type operand2, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ return \ gasnete_ratomic_fetch_nb(sizeof(type), result_p, ad->_tm, \ tgt_rank, tgt_addr, op, 2, \ operand1, operand2, \ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NB_S1) \ gex_Event_t prefix##_NB_S1( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ return \ gasnete_ratomic_fetch_nb(sizeof(type), NULL, ad->_tm, \ tgt_rank, tgt_addr, op, 1, operand1,\ 0, flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NB_G0) \ gex_Event_t prefix##_NB_G0( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ return \ gasnete_ratomic_fetch_nb(sizeof(type), result_p, ad->_tm, \ tgt_rank, tgt_addr, op, 0, 0, 0, \ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_N0) \ int prefix##_NBI_N0( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_post_op_t op = amo_post_op_map##dtcode(op_idx); \ GASNETE_UCX_RATOMIC_PREP_INC(op_idx); \ return gasnete_ratomic_post_nbi(sizeof(type), ad->_tm, \ tgt_rank, tgt_addr, op, inc,\ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_N1) \ int prefix##_NBI_N1( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_post_op_t op = amo_post_op_map##dtcode(op_idx); \ GASNETE_UCX_RATOMIC_PREP_OP(op_idx); \ return gasnete_ratomic_post_nbi(sizeof(type), ad->_tm, \ tgt_rank, tgt_addr, op, op1,\ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_N2) \ int prefix##_NBI_N2( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, type operand2, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ return \ gasnete_ratomic_fetch_nbi(sizeof(type), NULL, ad->_tm, \ tgt_rank, tgt_addr, op, 2, operand1, \ operand2, \ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_F0) \ int prefix##_NBI_F0( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ GASNETE_UCX_RATOMIC_PREP_FINC(op_idx); \ return \ gasnete_ratomic_fetch_nbi(sizeof(type), result_p,ad->_tm, \ tgt_rank, tgt_addr, op, 1, inc, 0, \ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_F1) \ int prefix##_NBI_F1( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ GASNETE_UCX_RATOMIC_PREP_FOP(op_idx); \ return \ gasnete_ratomic_fetch_nbi(sizeof(type), result_p, ad->_tm,\ tgt_rank, tgt_addr, op, 1, op1,0, \ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_F2) \ int prefix##_NBI_F2( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, type operand2, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ return \ gasnete_ratomic_fetch_nbi(sizeof(type), result_p, ad->_tm,\ tgt_rank, tgt_addr, op, 2, operand1,\ operand2,flags GASNETI_THREAD_PASS);\ } \ GASNETI_INLINE(prefix##_NBI_S1) \ int prefix##_NBI_S1( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ return \ gasnete_ratomic_set_nbi(sizeof(type), NULL, ad->_tm, \ tgt_rank, tgt_addr, op, operand1, \ flags GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_G0) \ int prefix##_NBI_G0( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ ucp_atomic_fetch_op_t op = amo_fetch_op_map##dtcode(op_idx);\ return \ gasnete_ratomic_get_nbi(sizeof(type), result_p, ad->_tm, \ tgt_rank, tgt_addr, op, \ flags GASNETI_THREAD_PASS); \ } GASNETE_DT_INT_APPLY(GASNETE_UCXRATOMIC_MID) #define GASNETE_UCXRATOMIC_DEFS(dtcode) \ _GASNETE_UCXRATOMIC_DEFS1(dtcode, dtcode##_isint) // This extra pass expands the "isint" token prior to additional concatenation #define _GASNETE_UCXRATOMIC_DEFS1(dtcode, isint) \ _GASNETE_UCXRATOMIC_DEFS2(dtcode, isint) #define _GASNETE_UCXRATOMIC_DEFS2(dtcode, isint) \ _GASNETE_UCXRATOMIC_DEFN_INT##isint(dtcode,AND,1) \ _GASNETE_UCXRATOMIC_DEFN_INT##isint(dtcode,OR,1) \ _GASNETE_UCXRATOMIC_DEFN_INT##isint(dtcode,XOR,1) \ _GASNETE_UCXRATOMIC_DEFN2(dtcode,ADD,1) \ _GASNETE_UCXRATOMIC_DEFN2(dtcode,SUB,1) \ _GASNETE_UCXRATOMIC_DEFN2(dtcode,MULT,1) \ _GASNETE_UCXRATOMIC_DEFN2(dtcode,MIN,1) \ _GASNETE_UCXRATOMIC_DEFN2(dtcode,MAX,1) \ _GASNETE_UCXRATOMIC_DEFN2(dtcode,INC,0) \ _GASNETE_UCXRATOMIC_DEFN2(dtcode,DEC,0) \ _GASNETE_UCXRATOMIC_DEFN1(dtcode,SET,S1) \ _GASNETE_UCXRATOMIC_DEFN1(dtcode,GET,G0) \ _GASNETE_UCXRATOMIC_DEFN1(dtcode,SWAP,F1) \ _GASNETE_UCXRATOMIC_DEFN1(dtcode,FCAS,F2) \ _GASNETE_UCXRATOMIC_DEFN1(dtcode,CAS,N2) #define _GASNETE_UCXRATOMIC_DEFN_INT0(dtcode,opname,nargs) /*empty*/ #define _GASNETE_UCXRATOMIC_DEFN_INT1 _GASNETE_UCXRATOMIC_DEFN2 #define _GASNETE_UCXRATOMIC_DEFN2(dtcode,opstem,nargs) \ _GASNETE_UCXRATOMIC_DEFN1(dtcode,opstem,N##nargs) \ _GASNETE_UCXRATOMIC_DEFN1(dtcode,F##opstem,F##nargs) #define _GASNETE_UCXRATOMIC_DEFN1(dtcode,opname,args) \ static gex_Event_t gasnete_ucxratomic##dtcode##_NB_##opname(GASNETE_RATOMIC_ARGS_##args(dtcode##_type)) { \ return gasnete_ucxratomic##dtcode##_NB_##args(gasneti_op_idx_##opname,GASNETE_RATOMIC_PASS_##args); \ } \ static int gasnete_ucxratomic##dtcode##_NBI_##opname(GASNETE_RATOMIC_ARGS_##args(dtcode##_type)) { \ return gasnete_ucxratomic##dtcode##_NBI_##args(gasneti_op_idx_##opname,GASNETE_RATOMIC_PASS_##args); \ } #define GASNETE_RATOMIC_ARGS_S1 GASNETE_RATOMIC_ARGS_N1 #define GASNETE_RATOMIC_ARGS_G0 GASNETE_RATOMIC_ARGS_F0 #define GASNETE_RATOMIC_PASS_S1 GASNETE_RATOMIC_PASS_N1 #define GASNETE_RATOMIC_PASS_G0 GASNETE_RATOMIC_PASS_F0 GASNETE_DT_INT_APPLY(GASNETE_UCXRATOMIC_DEFS) #define GASNETE_UCXRATOMIC_TBL(dtcode) \ gasnete_ratomic##dtcode##_fn_tbl_t gasnete_ucxratomic##dtcode##_fn_tbl = \ GASNETE_RATOMIC_FN_TBL_INIT(gasnete_ucxratomic##dtcode,dtcode); GASNETE_DT_INT_APPLY(GASNETE_UCXRATOMIC_TBL) // Masks of missing capabilities #define GASNETE_UCXRATOMIC_NO_MULT (GEX_OP_MULT | GEX_OP_FMULT) #define GASNETE_UCXRATOMIC_NO_MINMAX (GEX_OP_MIN | GEX_OP_FMIN | GEX_OP_MAX | GEX_OP_FMAX) #define GASNETE_UCXRATOMIC_BADOPS_gex_dt_I32 (GASNETE_UCXRATOMIC_NO_MULT | GASNETE_UCXRATOMIC_NO_MINMAX) #define GASNETE_UCXRATOMIC_BADOPS_gex_dt_U32 (GASNETE_UCXRATOMIC_NO_MULT | GASNETE_UCXRATOMIC_NO_MINMAX) #define GASNETE_UCXRATOMIC_BADOPS_gex_dt_I64 (GASNETE_UCXRATOMIC_NO_MULT | GASNETE_UCXRATOMIC_NO_MINMAX) #define GASNETE_UCXRATOMIC_BADOPS_gex_dt_U64 (GASNETE_UCXRATOMIC_NO_MULT | GASNETE_UCXRATOMIC_NO_MINMAX) void gasnete_ucxratomic_init_hook(gasneti_AD_t real_ad) { gex_Flags_t flags = real_ad->_flags; gasneti_TM_t real_tm = real_ad->_tm; gex_DT_t dt = real_ad->_dt; gex_OP_t ops = real_ad->_ops; // Check for cases that should favor AM over NIC if (! (flags & GEX_FLAG_AD_FAVOR_REMOTE)) { if (flags & (GEX_FLAG_AD_FAVOR_MY_RANK | GEX_FLAG_AD_FAVOR_MY_NBRHD)) { // Client's flags favor AM-based atomics goto use_am; } else if (real_tm->_size == 1) { // Singleton team case favors AM-based goto use_am; } #if GASNET_PSHM // TODO-EX: once atomics are supported on non-primordial endpoints, // this closed form could incorrectly enable tools-based atomic ops // in the initator (bypassing AM) on memory which is not cross-mapped. // TODO-EX: this closed form misses an optimization opportunity for // cases in which the primordial team spans multiple neighborhoods, but // the AD's team only includes EPs within a single nbrhd (bound to // primordial segments). In this case the reference implementation can // always bypass AM and operate directly on cross-mapped shared segments // (without concerns for attentiveness). else if (gasneti_mysupernode.node_count == gasneti_nodes) { // Single-neighborhood case favors AM-based *if* the datatype is // "tools safe" (and thus not actually using AM). Otherwise, we // will assume that the NIC is a better option since it does not // rely on target attentiveness. #define GASNETE_UCXRATOMIC_TOOLS_CASE(dtcode) \ case dtcode##_dtype: \ if (GASNETE_RATOMIC_PSHMSAFE##dtcode) goto use_am; \ break; switch (dt) { GASNETE_DT_APPLY(GASNETE_UCXRATOMIC_TOOLS_CASE) default: gasneti_unreachable(); } #undef GASNETE_UCXRATOMIC_TOOLS_CASE } #endif } #define GASNETE_UCXRATOMIC_TBL_CASE(dtcode) \ case dtcode##_dtype: \ if (ops & GASNETE_UCXRATOMIC_BADOPS##dtcode) goto use_am; \ real_ad->_fn_tbl = (gasnete_ratomic_fn_tbl_t) &gasnete_ucxratomic##dtcode##_fn_tbl; \ real_ad->_tools_safe = 0; \ real_ad->_is_ref = 0; \ return; switch(dt) { GASNETE_DT_INT_APPLY(GASNETE_UCXRATOMIC_TBL_CASE) default: ((void)0); // FLT and DBL fall-through to 'use_am' below } #undef GASNETE_UCXRATOMIC_TBL_CASE use_am: gasnete_amratomic_init_hook(real_ad); return; } gasnet-2025.8.0/ucx-conduit/gasnet_extended.c0000664000175000017500000002417515142313673021202 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/gasnet_extended.c $ * Description: GASNet Extended API Reference Implementation * Copyright 2002, Dan Bonachea * Copyright 2019-2020, Mellanox Technologies LTD. All rights reserved. * Terms of use are as specified in license.txt */ #include // for refbarrier.c #include #include #include #include /* ------------------------------------------------------------------------------------ */ /* Extended API Common Code ======================== Factored bits of extended API code common to most conduits, overridable when necessary */ #include "gasnet_extended_common.c" /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* called at startup to check configuration sanity */ static void gasnete_check_config(void) { gasneti_check_config_postattach(); gasnete_check_config_amref(); gasneti_static_assert(sizeof(gasnete_eop_t) >= sizeof(void*)); } extern void gasnete_init(void) { static int firstcall = 1; GASNETI_TRACE_PRINTF(C,("gasnete_init()")); gasneti_assert(firstcall); /* make sure we haven't been called before */ firstcall = 0; gasnete_check_config(); /* check for sanity */ gasneti_assert_uint(gasneti_nodes ,>=, 1); gasneti_assert_uint(gasneti_mynode ,<, gasneti_nodes); { gasneti_threaddata_t *threaddata = NULL; #if GASNETI_MAX_THREADS > 1 /* register first thread (optimization) */ threaddata = _gasneti_mythread_slow(); #else /* register only thread (required) */ threaddata = gasnete_new_threaddata(); #endif #if !GASNETI_DISABLE_REFERENCE_EOP /* cause the first pool of eops to be allocated (optimization) */ GASNET_POST_THREADINFO(threaddata); gasnete_eop_t *eop = gasnete_eop_new(threaddata); GASNETE_EOP_MARKDONE(eop); gasnete_eop_free(eop GASNETI_THREAD_PASS); #endif } /* Initialize barrier resources */ gasnete_barrier_init(); /* Initialize team/collectives */ gasnete_coll_init_subsystem(); /* Initialize VIS subsystem */ gasnete_vis_init(); } /* ------------------------------------------------------------------------------------ */ /* Get/Put: ======== */ /* Use some or all of the reference implementation of get/put in terms of AMs * Configuration appears in gasnet_extended_fwd.h */ #include "gasnet_extended_amref.c" /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (explicit event) ========================================================== */ /* ------------------------------------------------------------------------------------ */ /* Conduits not using the gasnete_amref_ versions should implement at least the following: gasnete_get_nb gasnete_put_nb */ static void gasnetc_ucx_rma_cb(void *request, ucs_status_t status) { gasnetc_ucx_request_t *req = (gasnetc_ucx_request_t*) request; if (status != UCS_OK) { gasneti_fatalerror("UCX RDMA operation failed: %s", ucs_status_string(status)); } if (req->completion.cbfunc) { req->completion.cbfunc(req->completion.cbdata); } req->completion.cbfunc = NULL; req->completion.cbdata = NULL; ucp_request_free(request); return; } #if GASNETC_PIN_SEGMENT extern gex_Event_t gasnete_get_nb( gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(! gasnete_mapped_at(tm,rank,src)); // else PSHM/loopback gasnete_eop_t *eop = gasnete_eop_new(GASNETI_MYTHREAD); gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); gasnetc_ucx_putget_inner(0, jobrank, dest, nbytes, src, &eop->initiated_cnt, gasnetc_cb_eop_get, NULL, NULL); GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); return (gex_Event_t)eop; } extern gex_Event_t gasnete_put_nb( gex_TM_t tm, gex_Rank_t rank, void *dest, void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(! gasnete_mapped_at(tm,rank,dest)); // else PSHM/loopback gasnetc_counter_t counter = GASNETC_COUNTER_INITIALIZER; gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); gasnete_eop_t *eop = gasnete_eop_new(GASNETI_MYTHREAD); GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); if (lc_opt == GEX_EVENT_NOW) { gasnetc_ucx_putget_inner(1, jobrank, src, nbytes, dest, &counter.initiated, gasnetc_cb_counter, &eop->initiated_cnt, gasnetc_cb_eop_put); } else if (lc_opt == GEX_EVENT_DEFER) { gasnetc_ucx_putget_inner(1, jobrank, src, nbytes, dest, NULL, NULL, &eop->initiated_cnt, gasnetc_cb_eop_put); } else { GASNETE_EOP_LC_START(eop); gasnetc_atomic_val_t start_cnt = eop->initiated_alc; gasnetc_ucx_putget_inner(1, jobrank, src, nbytes, dest, &eop->initiated_alc, gasnetc_cb_eop_alc, &eop->initiated_cnt, gasnetc_cb_eop_put); if (start_cnt == eop->initiated_alc) { // Synchronous LC - reset the eop's LC state GASNETE_EOP_LC_FINISH(eop); *lc_opt = GEX_EVENT_INVALID; } else { *lc_opt = gasneti_op_event(eop, gasnete_eop_event_alc); } } GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); if (lc_opt == GEX_EVENT_NOW) { gasnetc_counter_wait(&counter, 0 GASNETI_THREAD_PASS); } return (gex_Event_t)eop; } /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (implicit event) ========================================================== */ /* ------------------------------------------------------------------------------------ */ /* Conduits not using the gasnete_amref_ versions should implement at least the following: gasnete_get_nbi gasnete_put_nbi */ extern int gasnete_get_nbi (gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(! gasnete_mapped_at(tm,rank,src)); // else PSHM/loopback gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t *op = mythread->current_iop; gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); gasnetc_ucx_putget_inner(0, jobrank, dest, nbytes, src, &op->initiated_get_cnt, op->next ? gasnetc_cb_nar_get : gasnetc_cb_iop_get, NULL, NULL); GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); return 0; } extern int gasnete_put_nbi (gex_TM_t tm, gex_Rank_t rank, void *dest, void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(! gasnete_mapped_at(tm,rank,dest)); // else PSHM/loopback gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t *op = mythread->current_iop; gasnetc_counter_t counter = GASNETC_COUNTER_INITIALIZER; gasnetc_cbfunc_t local_cb; gasnetc_atomic_val_t *local_cnt; gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (lc_opt == GEX_EVENT_GROUP) { local_cnt = &op->initiated_alc_cnt; local_cb = op->next ? gasnetc_cb_nar_alc : gasnetc_cb_iop_alc; } else if (lc_opt == GEX_EVENT_NOW) { local_cnt = &counter.initiated; local_cb = gasnetc_cb_counter; } else if (lc_opt == GEX_EVENT_DEFER) { local_cnt = NULL; local_cb = NULL; } else { gasneti_fatalerror("Invalid lc_opt argument to Put_nbi"); } GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); gasnetc_ucx_putget_inner(1, jobrank, src, nbytes, dest, local_cnt, local_cb, &op->initiated_put_cnt, op->next ? gasnetc_cb_nar_put : gasnetc_cb_iop_put); GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); if (lc_opt == GEX_EVENT_NOW) { gasnetc_counter_wait(&counter, 1 GASNETI_THREAD_PASS); } return 0; } #endif /* ------------------------------------------------------------------------------------ */ /* Barriers: ========= */ /* use reference implementation of barrier */ #define GASNETI_GASNET_EXTENDED_REFBARRIER_C 1 #include "gasnet_extended_refbarrier.c" #undef GASNETI_GASNET_EXTENDED_REFBARRIER_C /* ------------------------------------------------------------------------------------ */ /* Vector, Indexed & Strided: ========================= */ /* use reference implementation of scatter/gather and strided */ #include "gasnet_refvis.h" /* ------------------------------------------------------------------------------------ */ /* Collectives: ============ */ /* use reference implementation of collectives */ #include "gasnet_refcoll.h" /* ------------------------------------------------------------------------------------ */ /* Remote Atomics: ============== */ /* use reference implementation of remote atomics */ #include "gasnet_refratomic.h" /* ------------------------------------------------------------------------------------ */ /* Handlers: ========= */ static gex_AM_Entry_t const gasnete_handlers[] = { #ifdef GASNETE_REFBARRIER_HANDLERS GASNETE_REFBARRIER_HANDLERS(), #endif #ifdef GASNETE_REFVIS_HANDLERS GASNETE_REFVIS_HANDLERS() #endif #ifdef GASNETE_REFCOLL_HANDLERS GASNETE_REFCOLL_HANDLERS() #endif #ifdef GASNETE_AMREF_HANDLERS GASNETE_AMREF_HANDLERS() #endif #ifdef GASNETE_AMRATOMIC_HANDLERS GASNETE_AMRATOMIC_HANDLERS() #endif /* ptr-width independent handlers */ /* ptr-width dependent handlers */ GASNETI_HANDLER_EOT }; extern gex_AM_Entry_t const *gasnete_get_handlertable(void) { return gasnete_handlers; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/ucx-conduit/gasnet_core.h0000664000175000017500000001707315142313673020336 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/gasnet_core.h $ * Description: GASNet header for ucx conduit core * Copyright 2002, Dan Bonachea * Copyright 2019-2020, Mellanox Technologies LTD. All rights reserved. * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_H #define _GASNET_CORE_H #include /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ extern void gasnetc_exit(int _exitcode) GASNETI_NORETURN; GASNETI_NORETURNP(gasnetc_exit) #define gasnet_exit gasnetc_exit /* Some conduits permit gasnet_init(NULL,NULL). Define to 1 if this conduit supports this extension, or to 0 otherwise. */ #if !HAVE_MPI_SPAWNER || (GASNETI_MPI_VERSION >= 2) #define GASNET_NULL_ARGV_OK 1 #else #define GASNET_NULL_ARGV_OK 0 #endif /* ------------------------------------------------------------------------------------ */ extern int gasnetc_Client_Init( gex_Client_t *_client_p, gex_EP_t *_ep_p, gex_TM_t *_tm_p, const char *_clientName, int *_argc, char ***_argv, gex_Flags_t _flags); // gasnetex.h handles name-shifting of gex_Client_Init() /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ typedef struct { gasneti_mutex_t lock; #if GASNETI_STATS_OR_TRACE gasneti_tick_t acquiretime; #endif } gex_HSL_t; #if GASNETI_STATS_OR_TRACE #define GASNETC_LOCK_STAT_INIT ,0 #else #define GASNETC_LOCK_STAT_INIT #endif #define GEX_HSL_INITIALIZER { \ GASNETI_MUTEX_INITIALIZER \ GASNETC_LOCK_STAT_INIT \ } /* decide whether we have "real" HSL's */ #if GASNETI_THREADS || /* need for safety */ \ GASNET_DEBUG || GASNETI_STATS_OR_TRACE /* or debug/tracing */ #ifdef GASNETC_NULL_HSL #error bad defn of GASNETC_NULL_HSL #endif #else #define GASNETC_NULL_HSL 1 #endif #if GASNETC_NULL_HSL /* HSL's unnecessary - compile away to nothing */ #define gex_HSL_Init(hsl) #define gex_HSL_Destroy(hsl) #define gex_HSL_Lock(hsl) #define gex_HSL_Unlock(hsl) #define gex_HSL_Trylock(hsl) GASNET_OK #else extern void gasnetc_hsl_init (gex_HSL_t *_hsl); extern void gasnetc_hsl_destroy(gex_HSL_t *_hsl); extern void gasnetc_hsl_lock (gex_HSL_t *_hsl); extern void gasnetc_hsl_unlock (gex_HSL_t *_hsl); extern int gasnetc_hsl_trylock(gex_HSL_t *_hsl) GASNETI_WARN_UNUSED_RESULT; #define gex_HSL_Init gasnetc_hsl_init #define gex_HSL_Destroy gasnetc_hsl_destroy #define gex_HSL_Lock gasnetc_hsl_lock #define gex_HSL_Unlock gasnetc_hsl_unlock #define gex_HSL_Trylock gasnetc_hsl_trylock #endif /* ------------------------------------------------------------------------------------ */ /* Active Message Size Limits ========================== */ extern size_t gasnetc_ammed_bufsz; #define GASNETC_MAX_ARGS 16 #define GASNETC_ARGS_SIZE(numargs) (sizeof(gex_AM_Arg_t) * (numargs)) #define GASNETC_MAX_ARGS_SIZE GASNETC_ARGS_SIZE(GASNETC_MAX_ARGS) #define GASNETC_UCX_SHORT_HDR_SIZE(nargs) (12 + GASNETC_ARGS_SIZE(nargs)) #define GASNETC_UCX_MED_HDR_SIZE(nargs) (16 + GASNETC_ARGS_SIZE(nargs)) #define GASNETC_UCX_MED_HDR_SIZE_PADDED(nargs) \ GASNETI_ALIGNUP_NOASSERT(GASNETC_UCX_MED_HDR_SIZE(nargs),8) #define GASNETC_MAX_MED_(nargs) \ (gasnetc_ammed_bufsz - GASNETC_UCX_MED_HDR_SIZE_PADDED(nargs)) #define GASNETC_MAX_LONG INT_MAX #define GASNETC_UCX_LONG_HDR_SIZE(nargs) (24 + GASNETC_ARGS_SIZE(nargs)) #define GASNETC_MAX_LONG_(nargs) (GASNETC_MAX_LONG - GASNETC_UCX_LONG_HDR_SIZE(nargs)) #define GASNETC_AMMED_PADDING_SIZE(__nargs) \ (GASNETI_ALIGNUP(GASNETC_UCX_MED_HDR_SIZE(__nargs), \ GASNETI_MEDBUF_ALIGNMENT) \ - GASNETC_UCX_MED_HDR_SIZE(__nargs)) #define gex_AM_MaxArgs() ((unsigned int)GASNETC_MAX_ARGS) #define gex_AM_LUBRequestMedium() (GASNETC_MAX_MED_(GASNETC_MAX_ARGS)) #define gex_AM_LUBReplyMedium() (GASNETC_MAX_MED_(GASNETC_MAX_ARGS)) #define gex_AM_LUBRequestLong() (GASNETC_MAX_LONG_(GASNETC_MAX_ARGS)) #define gex_AM_LUBReplyLong() (GASNETC_MAX_LONG_(GASNETC_MAX_ARGS)) #define gasnetc_AM_MaxRequestMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,flags),(size_t)(GASNETC_MAX_MED_(nargs))) #define gasnetc_AM_MaxReplyMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,flags),(size_t)(GASNETC_MAX_MED_(nargs))) #define gasnetc_Token_MaxReplyMedium(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS3(token,lc_opt,flags),(size_t)(GASNETC_MAX_MED_(nargs))) #define gasnetc_AM_MaxRequestLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS3(tm,rank,lc_opt), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? (GASNETI_UNUSED_ARGS1(nargs),GASNETC_REF_NPAM_MAX_ALLOC) \ : GASNETC_MAX_LONG_(nargs))) #define gasnetc_AM_MaxReplyLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS3(tm,rank,lc_opt), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? (GASNETI_UNUSED_ARGS1(nargs),GASNETC_REF_NPAM_MAX_ALLOC) \ : GASNETC_MAX_LONG_(nargs))) #define gasnetc_Token_MaxReplyLong(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS2(token,lc_opt), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? (GASNETI_UNUSED_ARGS1(nargs),GASNETC_REF_NPAM_MAX_ALLOC) \ : GASNETC_MAX_LONG_(nargs))) /* Example for true functions: */ #if 0 extern GASNETI_PURE size_t gasnetc_AM_MaxRequestMedium( gex_TM_t _tm, gex_Rank_t _rank, const gex_Event_t *_lc_opt, gex_Flags_t _flags, unsigned int _nargs); GASNETI_PUREP(gasnetc_AM_MaxRequestMedium) extern GASNETI_PURE size_t gasnetc_AM_MaxReplyMedium( gex_TM_t _tm, gex_Rank_t _rank, const gex_Event_t *_lc_opt, gex_Flags_t _flags, unsigned int _nargs); GASNETI_PUREP(gasnetc_AM_MaxReplyMedium) extern GASNETI_PURE size_t gasnetc_AM_MaxRequestLong( gex_TM_t _tm, gex_Rank_t _rank, const gex_Event_t *_lc_opt, gex_Flags_t _flags, unsigned int _nargs); GASNETI_PUREP(gasnetc_AM_MaxRequestLong) extern GASNETI_PURE size_t gasnetc_AM_MaxReplyLong( gex_TM_t _tm, gex_Rank_t _rank, const gex_Event_t *_lc_opt, gex_Flags_t _flags, unsigned int _nargs); GASNETI_PUREP(gasnetc_AM_MaxReplyLong) extern GASNETI_PURE size_t gasnetc_Token_MaxReplyMedium( gex_Token_t _token, const gex_Event_t *_lc_opt, gex_Flags_t _flags, unsigned int _nargs); GASNETI_PUREP(gasnetc_Token_MaxReplyMedium) extern GASNETI_PURE size_t gasnetc_Token_MaxReplyLong( const gex_Token_t _token, gex_Event_t *_lc_opt, gex_Flags_t _flags, unsigned int _nargs); GASNETI_PUREP(gasnetc_Token_MaxReplyLong) #endif /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #define GASNET_BLOCKUNTIL(cond) gasneti_polluntil(cond) /* ------------------------------------------------------------------------------------ */ #endif #include gasnet-2025.8.0/ucx-conduit/gasnet_extended_fwd.h0000664000175000017500000000706215142313673022043 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/gasnet_extended_fwd.h $ * Description: GASNet Extended API Header for ucx Conduit (forward decls) * Copyright 2002, Dan Bonachea * Copyright 2019-2020, Mellanox Technologies LTD. All rights reserved. * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_EXTENDED_FWD_H #define _GASNET_EXTENDED_FWD_H #define GASNET_EXTENDED_VERSION GASNET_CORE_VERSION #define GASNET_EXTENDED_VERSION_STR _STRINGIFY(GASNET_EXTENDED_VERSION) #define GASNET_EXTENDED_NAME UCX #define GASNET_EXTENDED_NAME_STR _STRINGIFY(GASNET_EXTENDED_NAME) #define GASNETI_EOP_IS_HANDLE 1 /* Configure use of AM-based implementation of get/put */ /* NOTE: Barriers, Collectives, VIS may use GASNETE_USING_REF_* in algorithm selection */ #if defined(GASNET_SEGMENT_FAST) || defined(GASNET_SEGMENT_LARGE) #define GASNETE_USING_REF_EXTENDED_GET 0 #define GASNETE_USING_REF_EXTENDED_PUT 0 #else #define GASNETE_USING_REF_EXTENDED_GET 1 #define GASNETE_USING_REF_EXTENDED_PUT 1 #endif /* this can be used to add statistical collection values specific to the extended API implementation (see gasnet_help.h) */ #define GASNETE_CONDUIT_STATS(CNT,VAL,TIME) \ GASNETI_VIS_STATS(CNT,VAL,TIME) \ GASNETI_COLL_STATS(CNT,VAL,TIME) \ GASNETI_RATOMIC_STATS(CNT,VAL,TIME) \ CNT(C, DYNAMIC_THREADLOOKUP, cnt) #define GASNETE_AUXSEG_DECLS \ extern gasneti_auxseg_request_t gasnete_barr_auxseg_alloc(gasnet_seginfo_t *auxseg_info); #define GASNETE_AUXSEG_FNS() gasnete_barr_auxseg_alloc, /* * When implementing a conduit-specific implementation of the Extended API, one * can #define the following to 1 to change certain behaviors in gasnet_extended.h. * Alternatively, one can #define GASNETE_HAVE_EXTENDED_HELP_EXTRA_H and defined * these in a conduit-specific gasnet_extended_help_extra.h. * * GASNETI_DIRECT_BLOCKING_GET * unset: gasnete_get() via gasnete_wait(gasnete_get_nb()) * set: conduit provides it own gasnete_get() * * GASNETI_DIRECT_BLOCKING_PUT * unset: gasnete_put() via gasnete_wait(gasnete_put_nb()) * set: conduit provides it own gasnete_put() * * GASNETI_DIRECT_PUT_VAL * unset: gasnete_put_val() via gasnete_put() * set: conduit provides it own gasnete_put_val() * * GASNETI_DIRECT_PUT_NB_VAL * unset: extern gasnete_put_nb_val() in gasnet_extended.c (or a macro) * set: conduit provides own gasnete_put_nb_val() as an inline * * GASNETI_DIRECT_PUT_NBI_VAL * unset: gasnete_put_nbi_val() via gasnete_put_nbi() * set: conduit provides own gasnete_put_nbi_val() * * GASNETI_DIRECT_GET_VAL * unset: extern gasnete_get_val() in gasnet_extended.c (or a macro) * set: conduit provides own gasnete_get_val() as an inline */ /* We perform these blocking ops w/o the overhead of eop alloc/free: */ //#define GASNETI_DIRECT_BLOCKING_GET 1 //#define GASNETI_DIRECT_BLOCKING_PUT 1 /* Implement all "base" operations directly via amref: */ #if !defined(GASNET_SEGMENT_FAST) && !defined(GASNET_SEGMENT_LARGE) #define gasnete_amref_get_nb gasnete_get_nb #define gasnete_amref_put_nb gasnete_put_nb #define gasnete_amref_get_nbi gasnete_get_nbi #define gasnete_amref_put_nbi gasnete_put_nbi #endif #if !defined(GASNET_DISABLE_MUNMAP_DEFAULT) && PLATFORM_ARCH_64 // default to disabling munmap due to bug 4164 (odp performance) #define GASNET_DISABLE_MUNMAP_DEFAULT 1 #endif #endif gasnet-2025.8.0/ucx-conduit/gasnet_core.c0000664000175000017500000022367515142313673020340 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/gasnet_core.c $ * Description: GASNet ucx conduit Implementation * Copyright 2002, Dan Bonachea * Copyright 2019-2020, Mellanox Technologies LTD. All rights reserved. * Terms of use are as specified in license.txt */ #include #include #include #include #include #include #include GASNETI_IDENT(gasnetc_IdentString_Version, "$GASNetCoreLibraryVersion: " GASNET_CORE_VERSION_STR " $"); GASNETI_IDENT(gasnetc_IdentString_Name, "$GASNetCoreLibraryName: " GASNET_CORE_NAME_STR " $"); GASNETI_IDENT(gasnetc_IdentString_AMMaxMediumDefault, "$GASNetAMMaxMediumDefault: " _STRINGIFY(GASNETC_UCX_MAX_MEDIUM_DFLT) " $"); enum { GASNETC_EXIT_ROLE_UNKNOWN, GASNETC_EXIT_ROLE_LEADER, GASNETC_EXIT_ROLE_MEMBER }; static const char * volatile gasnetc_exit_state = "UNKNOWN STATE"; // NOTE: Please keep GASNETC_EXIT_STATE_MAXLEN fairly "tight" to bound the // volume of garbage that might get printed in the event of memory corruption. #define GASNETC_EXIT_STATE_MAXLEN 60 #define GASNETC_EXIT_STATE(st) do { \ gasneti_static_assert(sizeof(st) <= GASNETC_EXIT_STATE_MAXLEN+1);\ gasnetc_exit_state = st; \ if (gasneti_spawn_verbose) /* %s to silence -Wformat-security */ \ gasneti_console_message("EXIT STATE", "%s", gasnetc_exit_state); \ } while (0) #define GASNETC_ROOT_NODE 0 int gasnetc_exit_running = 0; /* boolean used to identify that exit process is started */ static int gasnetc_exit_in_signal = 0; /* to avoid certain things in signal context */ extern void gasnetc_fatalsignal_callback(int sig) { gasnetc_exit_in_signal = 1; } /* gasnete_threadidx_t used to identify what thread an exit process was started */ gasnete_threadidx_t gasnetc_exit_thread = 0 ; static gasneti_atomic_t gasnetc_exit_done = gasneti_atomic_init(0); /* flag to show exit coordination done */ /* gasneti_exit_code holds value to _exit() with */ static gasneti_atomic_t gasnetc_exit_dist = gasneti_atomic_init(0); /* OR of reduce distances */ static gasneti_atomic_t gasnetc_exit_reds = gasneti_atomic_init(0); /* count of reduce requests */ static gasneti_atomic_t gasnetc_exit_reqs = gasneti_atomic_init(0); /* count of remote exit requests */ static gasneti_atomic_t gasnetc_exit_reps = gasneti_atomic_init(0); /* count of remote exit replies */ static gasneti_atomic_t gasnetc_exit_role = gasneti_atomic_init(GASNETC_EXIT_ROLE_UNKNOWN); static gasnetc_counter_t gasnetc_exit_repl_oust = GASNETC_COUNTER_INITIALIZER; /* track send of our AM reply */ /* If UCX routines are invoked from a signal handler function, the behavior of * the program is undefined. This flag uses to avoid use of UCX communications * in sighandler context.*/ static gasneti_atomic_t gasnetc_exit_atsighandler = gasneti_atomic_init(0); static void gasnetc_atexit(int exitcode); static void gasnetc_exit_init(void); // gex_TM_t used for AM-based bootstrap collectives and exit handling static gex_TM_t gasnetc_bootstrap_tm = NULL; /* Exit coordination timeouts */ #define GASNETC_DEFAULT_EXITTIMEOUT_MAX 480.0 // 8 min - extrapolated from Summit data in bug 4360 #define GASNETC_DEFAULT_EXITTIMEOUT_MIN 2.0 // 2 sec #define GASNETC_DEFAULT_EXITTIMEOUT_FACTOR 0.25 // 1/4 second per process static double gasnetc_exittimeout = GASNETC_DEFAULT_EXITTIMEOUT_MAX; gex_AM_Entry_t *gasnetc_handler; // TODO-EX: will be replaced with per-EP tables gasneti_spawnerfn_t const *gasneti_spawner = NULL; gasneti_ucx_module_t gasneti_ucx_module; static char *gasnetc_ucx_addr_array = NULL; size_t gasnetc_sizeof_segment_t(void) { gasnetc_Segment_t segment; return sizeof(*segment); } /* ------------------------------------------------------------------------------------ */ /* Bootstrap collective wrappers */ extern void gasneti_bootstrapBarrier(void) { if (gasneti_attach_done) { gasneti_bootstrapBarrier_am(); } else { gasneti_spawner->Barrier(); } } extern void gasneti_bootstrapExchange(void *src, size_t len, void *dest) { if (gasneti_attach_done) { gasneti_bootstrapExchange_am(src, len, dest); } else { gasneti_spawner->Exchange(src, len, dest); } } /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* called at startup to check configuration sanity */ static void gasnetc_check_config(void) { gasneti_check_config_preinit(); /* (###) add code to do some sanity checks on the number of nodes, handlers * and/or segment sizes */ } GASNETI_INLINE(gasnetc_msgsource) gex_Rank_t gasnetc_msgsource(gex_Token_t token) { gex_Rank_t sourceid; gasneti_assert(token); if (gasnetc_token_in_nbrhd(token)) { gex_Token_Info_t info; unsigned int rc = gasnetc_nbrhd_Token_Info(token, &info, GEX_TI_SRCRANK); gasneti_assert(rc & GEX_TI_SRCRANK); sourceid = info.gex_srcrank; } else { gasnetc_sreq_hdr_t *hdr = (gasnetc_sreq_hdr_t*)token; sourceid = hdr->src; } gasneti_assert(sourceid < gasneti_nodes); return sourceid; } static int gasnetc_connect_static(void) { int i; ucs_status_t status; ucp_ep_params_t ep_params; for (i = 0; i < gasneti_nodes; ++i) { ep_params.field_mask = UCP_EP_PARAM_FIELD_REMOTE_ADDRESS; ep_params.address = (ucp_address_t*)gasneti_ucx_module.ep_tbl[i].ucx_addr; status = ucp_ep_create(gasneti_ucx_module.ucp_worker, &ep_params, &gasneti_ucx_module.ep_tbl[i].server_ep); if (UCS_OK != status) { return GASNET_ERR_NOT_INIT; } } return GASNET_OK; } static void gasnetc_connect_shutdown(void) { for (int i = 0; i < gasneti_nodes; ++i) { gasneti_ucx_module.ep_tbl[i].ucx_addr = NULL; ucp_ep_destroy(gasneti_ucx_module.ep_tbl[i].server_ep); } gasneti_free(gasnetc_ucx_addr_array); } void gasnetc_ucx_empty_complete_cb(void *req, ucs_status_t status) { } static int gasnetc_ucx_worker_flush(void) { ucs_status_t status; ucs_status_ptr_t request; request = ucp_worker_flush_nb(gasneti_ucx_module.ucp_worker, 0, gasnetc_ucx_empty_complete_cb); if_pt (NULL == request) { return GASNET_OK; } else if_pf(UCS_PTR_IS_ERR(request)) { gasneti_fatalerror("UCX worker wait failed: %d, %s", UCS_PTR_STATUS(request), ucs_status_string(UCS_PTR_STATUS(request))); } do { status = ucp_request_check_status(request); ucp_worker_progress(gasneti_ucx_module.ucp_worker); } while (status == UCS_INPROGRESS); if (UCS_OK != status) { gasneti_fatalerror("UCX worker wait failed: %d, %s", UCS_PTR_STATUS(request), ucs_status_string(UCS_PTR_STATUS(request))); } ucp_request_free(request); return GASNET_OK; } #if GASNETC_PIN_SEGMENT static int gasnetc_mem_map(void* addr, size_t size, gasnetc_mem_info_t *reg) { ucp_mem_map_params_t mem_params; ucs_status_t status; memset(&mem_params, 0, sizeof(ucp_mem_map_params_t)); mem_params.field_mask = UCP_MEM_MAP_PARAM_FIELD_ADDRESS | UCP_MEM_MAP_PARAM_FIELD_LENGTH; mem_params.length = size; mem_params.address = addr; status = ucp_mem_map(gasneti_ucx_module.ucp_context, &mem_params, ®->mem_h); if (status != UCS_OK) { gasneti_fatalerror("Attach segment failed: %s", ucs_status_string(UCS_PTR_STATUS(status))); } return GASNET_OK; } static void gasnetc_minfo_reset(gasnetc_mem_info_t *minfo) { gasneti_assert(NULL != minfo); memset(minfo, 0, sizeof(gasnetc_mem_info_t)); } static gasnetc_mem_info_t* gasnetc_segment_register(void *seg_start, size_t segsize) { GASNETI_TRACE_PRINTF(C,("Registering segment [%p, %p)", seg_start, (void*)(segsize + (uintptr_t)seg_start))); ucs_status_t status; gasnet_ep_info_t * my_ep_info = &gasneti_ucx_module.ep_tbl[gasneti_mynode]; gasnetc_mem_info_t *mem_info; gasneti_list_t mem_info_list; gasneti_list_init(&mem_info_list); GASNETI_LIST_ITEM_ALLOC(mem_info, gasnetc_mem_info_t, gasnetc_minfo_reset); gasneti_list_enq(&mem_info_list, mem_info); status = gasnetc_mem_map((void *)seg_start, segsize, mem_info); if (status != UCS_OK) { gasneti_fatalerror("Memory map failed: %s", ucs_status_string(UCS_PTR_STATUS(status))); } status = ucp_rkey_pack(gasneti_ucx_module.ucp_context, mem_info->mem_h, &mem_info->buffer, &mem_info->bsize); if (status != UCS_OK) { ucp_mem_unmap(gasneti_ucx_module.ucp_context, mem_info->mem_h); gasneti_fatalerror("rkey pack failed: %s", ucs_status_string(UCS_PTR_STATUS(status))); } gasneti_rkey_unpack(my_ep_info->server_ep, mem_info->buffer, &mem_info->rkey); mem_info->addr = (void *)seg_start; mem_info->length = segsize; /* move added mem_info to local table */ gasneti_list_enq(&my_ep_info->mem_tbl, mem_info); return mem_info; } static int gasnetc_segment_deregister(gasnetc_Segment_t segment) { GASNETI_TRACE_PRINTF(C,("Deregistering segment [%p, %p)", segment->_addr, segment->_ub)); gasnet_ep_info_t *my_ep_info = &gasneti_ucx_module.ep_tbl[gasneti_mynode]; gasnetc_mem_info_t *mem_info = segment->mem_info; gasneti_list_rem(&my_ep_info->mem_tbl, mem_info); ucs_status_t status; status = ucp_mem_unmap(gasneti_ucx_module.ucp_context, mem_info->mem_h); if (status != UCS_OK) { gasneti_console_message("WARNING", "ucp_mem_unmap failed: %s", ucs_status_string(status)); return GASNET_ERR_BAD_ARG; } ucp_rkey_buffer_release(mem_info->buffer); ucp_rkey_destroy(mem_info->rkey); gasneti_free(mem_info); return GASNET_OK; } // Exchange client segment info static int gasnetc_segment_exchange(gex_TM_t tm, gex_EP_t *eps, size_t num_eps) { // Count/allocate local space size_t local_bytes = 0; for (gex_Rank_t i = 0; i < num_eps; ++i) { gasnetc_Segment_t segment = (gasnetc_Segment_t) gasneti_import_ep_valid(eps[i])->_segment; if (!segment || !segment->_size) continue; gasnetc_mem_info_t* mem_info = segment->mem_info; gasneti_assert(mem_info); gasneti_assert(mem_info->bsize < UINT16_MAX); local_bytes += sizeof(gex_EP_Location_t) // (jobrank,ep_index) + sizeof(uint16_t) // bsize + mem_info->bsize; // buffer } void *local = gasneti_malloc(local_bytes); // Pack size_t offset = 0; for (gex_Rank_t i = 0; i < num_eps; ++i) { gasnetc_Segment_t segment = (gasnetc_Segment_t) gasneti_import_ep_valid(eps[i])->_segment; if (!segment || !segment->_size) continue; gasnetc_mem_info_t* mem_info = segment->mem_info; gasneti_assert(mem_info); uint16_t bsize = mem_info->bsize; gex_EP_Location_t loc; loc.gex_rank = gasneti_mynode; loc.gex_ep_index = gex_EP_QueryIndex(eps[i]); gasneti_mem_pack(local, &loc, sizeof(loc), 0, offset); gasneti_mem_pack(local, &bsize, sizeof(bsize), 0, offset); gasneti_mem_pack(local, mem_info->buffer, bsize, 0, offset); } // Exchange void *global; size_t total_bytes = gasneti_blockingRotatedExchangeV(tm, local, local_bytes, &global, NULL); gasneti_free(local); // Unpack offset = 0; while (offset < total_bytes) { gex_EP_Location_t loc; gasneti_mem_unpack(&loc, global, sizeof(loc), 0, offset); uint16_t bsize; gasneti_mem_unpack(&bsize, global, sizeof(bsize), 0, offset); gasneti_assert(bsize); char * buffer = (char *)global + offset; offset += bsize; gex_Rank_t jobrank = loc.gex_rank; if (jobrank == gasneti_mynode) continue; // self // TODO-EX: when comms merged w/ conduit-indep, this will be avail in the exchanged data gasneti_assert(gasneti_seginfo_tbl[loc.gex_ep_index]); gasnet_seginfo_t *si = gasneti_seginfo_tbl[loc.gex_ep_index] + jobrank; void *addr = si->addr; uintptr_t length = si->size; gasnet_ep_info_t * ep_info = &gasneti_ucx_module.ep_tbl[jobrank]; // Multiple calls to Publish must not create duplicate entries for the // same endpoint. // TODO: Current data structures are not sensitive to endpoint, nor do they // keep any reference count. So, non-trivial work will be required to // support an eventual Unpublish API. // TODO: thread safety in list traversal? { gasnetc_mem_info_t* mem_info; int found = 0; GASNETI_LIST_FOREACH(mem_info, &ep_info->mem_tbl, gasnetc_mem_info_t) { found = ((mem_info->addr == addr ) && (mem_info->length == length)); if (found) break; } if (found) continue; } gasnetc_mem_info_t* new_mem_info; GASNETI_LIST_ITEM_ALLOC(new_mem_info, gasnetc_mem_info_t, gasnetc_minfo_reset); new_mem_info->addr = addr; new_mem_info->length = length; new_mem_info->bsize = 0; new_mem_info->buffer = NULL; ucp_ep_h ep = GASNETC_UCX_GET_EP(jobrank); gasneti_rkey_unpack(ep, buffer, &new_mem_info->rkey); gasneti_list_enq(&ep_info->mem_tbl, new_mem_info); // TODO: thread safety? } gasneti_free(global); return 0; } // Exchange aux segment info static int gasnetc_segment_exchange_aux(gasnetc_mem_info_t* mem_info) { gasneti_assert(mem_info->bsize <= UINT16_MAX); uint16_t bsize = mem_info->bsize; // identify max rkey size // TODO: bootstrap reduction? uint16_t rkey_max_size = bsize; uint16_t *rkey_sizes = gasneti_calloc(gasneti_nodes, sizeof(rkey_max_size)); gasneti_bootstrapExchange(&rkey_max_size, sizeof(rkey_max_size), rkey_sizes); for (gex_Rank_t i = 0; i < gasneti_nodes; i++) { rkey_max_size = MAX(rkey_max_size, rkey_sizes[i]); } gasneti_free(rkey_sizes); // "pack" and exchange the mem_info->buffer // local_buf is needed in case mem_info->buffer is shorter than rkey_max_size void * recv_buf = gasneti_malloc(rkey_max_size * gasneti_nodes); void * local_buf = gasneti_malloc(rkey_max_size); GASNETI_MEMCPY(local_buf, mem_info->buffer, bsize); gasneti_bootstrapExchange(local_buf, rkey_max_size, recv_buf); gasneti_free(local_buf); /* TODO: * + When using PSHM we could store rkeys just once per supernode * + When not fully connected, we could utilize sparse storage */ char * buffer = recv_buf; for (gex_Rank_t jobrank = 0; jobrank < gasneti_nodes; jobrank++, buffer += rkey_max_size) { if (jobrank == gasneti_mynode) { continue; } GASNETI_LIST_ITEM_ALLOC(mem_info, gasnetc_mem_info_t, gasnetc_minfo_reset); mem_info->addr = gasneti_seginfo_aux[jobrank].addr; mem_info->length = gasneti_seginfo_aux[jobrank].size; mem_info->bsize = 0; mem_info->buffer = NULL; ucp_ep_h ep = GASNETC_UCX_GET_EP(jobrank); gasneti_rkey_unpack(ep, buffer, &mem_info->rkey); gasnet_ep_info_t * ep_info = &gasneti_ucx_module.ep_tbl[jobrank]; gasneti_list_enq(&ep_info->mem_tbl, mem_info); // TODO: thread safety? } gasneti_free(recv_buf); return GASNET_OK; } static void gasnetc_unpin_segment(void) { gex_Rank_t i; for (i = 0; i < gasneti_nodes; i++) { ucs_status_t status; gasnetc_mem_info_t *mem_info; gasneti_list_t *mem_tbl = &gasneti_ucx_module.ep_tbl[i].mem_tbl; while(NULL != (mem_info = GASNETI_LIST_POP(mem_tbl, gasnetc_mem_info_t))) { // TODO: factor or merge w/ gasnetc_deregister_segment() if (gasneti_mynode == i) { status = ucp_mem_unmap(gasneti_ucx_module.ucp_context, mem_info->mem_h); if (status != UCS_OK) { gasneti_fatalerror("Attach segment failed: %s", ucs_status_string(UCS_PTR_STATUS(status))); } ucp_rkey_buffer_release(mem_info->buffer); } else { gasneti_assert_ptr(mem_info->buffer ,==, NULL); } ucp_rkey_destroy(mem_info->rkey); GASNETI_LIST_RESET(mem_info) gasneti_free(mem_info); } gasneti_list_fini(mem_tbl); } } #endif // GASNETC_PIN_SEGMENT static void gasnetc_ucx_fini(void) { GASNETC_EXIT_STATE("gasnetc_ucx_fini called"); gasnetc_ucx_worker_flush(); GASNETC_EXIT_STATE("gasnetc_ucx_worker_flush called"); gasnetc_send_fini(); GASNETC_EXIT_STATE("gasnetc_send_fini called"); /* cleanup UCX */ gasnetc_connect_shutdown(); GASNETC_EXIT_STATE("gasnetc_connect_shutdown called"); #if GASNETC_PIN_SEGMENT gasnetc_unpin_segment(); #endif ucp_worker_destroy(gasneti_ucx_module.ucp_worker); GASNETC_EXIT_STATE("ucp_worker_destroy called"); gasnetc_recv_fini(); GASNETC_EXIT_STATE("gasnetc_recv_fini called"); ucp_cleanup(gasneti_ucx_module.ucp_context); GASNETC_EXIT_STATE("ucp_cleanup called"); gasneti_free(gasneti_ucx_module.ep_tbl); // If exiting from AM handler context, then we hold the lock. // So to avoid errors, we just let it leak. // gasneti_mutex_destroy(&gasneti_ucx_module.ucp_worker_lock); } static int gasnetc_init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { ucp_config_t *config; ucs_status_t status; ucp_params_t ucp_params; ucp_worker_params_t worker_params; gasnet_ep_info_t local_ep; ucp_address_t *ucx_local_addr; gex_Rank_t i; int rc; /* check system sanity */ gasnetc_check_config(); if (gasneti_init_done) GASNETI_RETURN_ERRR(NOT_INIT, "GASNet already initialized"); #if GASNET_DEBUG_VERBOSE gasneti_console_message("gasnetc_init","about to spawn..."); #endif /* (###) bootstrap the nodes for your conduit - may need to modify if not using * the unified spawning infrastructure */ gasneti_spawner = gasneti_spawnerInit(argc, argv, NULL, &gasneti_nodes, &gasneti_mynode); if (!gasneti_spawner) GASNETI_RETURN_ERRR(NOT_INIT, "GASNet job spawn failed"); gasneti_init_done = 1; // bug 4598: freeze following process spawning and environment propagation gasneti_freezeForDebugger(); /* Must init timers after global env, and preferably before tracing */ GASNETI_TICKS_INIT(); /* Now enable tracing of all the following steps */ gasneti_trace_init(argc, argv); if (gasneti_spawn_verbose) { gasneti_console_message("gasnetc_init","spawn successful - proc %i/%i starting...", gasneti_mynode, gasneti_nodes); } gasnetc_exittimeout = gasneti_get_exittimeout(GASNETC_DEFAULT_EXITTIMEOUT_MAX, GASNETC_DEFAULT_EXITTIMEOUT_MIN, GASNETC_DEFAULT_EXITTIMEOUT_FACTOR, GASNETC_DEFAULT_EXITTIMEOUT_MIN); // Process GASNET_UCX_MAX_MEDIUM // This must be done at least early enough to be used in setup of PSHM // Placement here allows for the possibility that UCX init may need the max medium { size_t lub_medium = gasneti_getenv_int_withdefault("GASNET_UCX_MAX_MEDIUM", GASNETC_UCX_MAX_MEDIUM_DFLT, 1); if (lub_medium < 512) { gasneti_fatalerror("GASNET_UCX_MAX_MEDIUM setting (%"PRIdSZ") is not valid. " "The value must be no less than 512. " "See ucx-conduit README for more details.", lub_medium); } size_t max_med_overhead = GASNETC_UCX_MED_HDR_SIZE_PADDED(GASNETC_MAX_ARGS); gasnetc_ammed_bufsz = lub_medium + max_med_overhead; } /* Ensure uniform UCX_* env vars */ gasneti_propagate_env("UCX_", GASNETI_PROPAGATE_ENV_PREFIX); /* * Initialize UCX */ status = ucp_config_read(NULL, NULL, &config); if (status != UCS_OK) { GASNETI_RETURN_ERRFR(RESOURCE, "Fail to read UCX config: %s", ucs_status_string(status)); } ucp_params.features = UCP_FEATURE_TAG | UCP_FEATURE_RMA | UCP_FEATURE_AMO32 | UCP_FEATURE_AMO64; ucp_params.request_size = sizeof(gasnetc_ucx_request_t); ucp_params.request_init = gasnetc_req_init; ucp_params.request_cleanup = NULL; ucp_params.field_mask = UCP_PARAM_FIELD_FEATURES | UCP_PARAM_FIELD_REQUEST_SIZE | UCP_PARAM_FIELD_REQUEST_INIT | UCP_PARAM_FIELD_REQUEST_CLEANUP; status = ucp_init(&ucp_params, config, &gasneti_ucx_module.ucp_context); ucp_config_release(config); if (UCS_OK != status) { return GASNET_ERR_NOT_INIT; } gasneti_mutex_init(&gasneti_ucx_module.ucp_worker_lock); #ifdef GASNETC_UCX_THREADS gasneti_ucx_module.lock_cnt = 0; gasneti_ucx_module.lock_tid = GASNETE_INVALID_THREADIDX; #endif worker_params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE; worker_params.thread_mode = UCS_THREAD_MODE_SINGLE; status = ucp_worker_create(gasneti_ucx_module.ucp_context, &worker_params, &gasneti_ucx_module.ucp_worker); if (UCS_OK != status) { gasneti_fatalerror("Init failed: %s", ucs_status_string(UCS_PTR_STATUS(status))); } status = ucp_worker_get_address(gasneti_ucx_module.ucp_worker, &local_ep.ucx_addr, &local_ep.ucx_addr_len); if (UCS_OK != status) { gasneti_fatalerror("Init failed: %s", ucs_status_string(UCS_PTR_STATUS(status))); } /* Two-stage endpoint exchange: * 1 exchange EP sizes, get max ep-size * 2 use max ep size to exchange */ gasneti_ucx_module.ep_tbl = gasneti_calloc(gasneti_nodes, sizeof(local_ep)); size_t *ep_sizes = gasneti_calloc(gasneti_nodes, sizeof(*ep_sizes)); size_t max_ep_size = 0; gasneti_bootstrapExchange(&local_ep.ucx_addr_len, sizeof(size_t), ep_sizes); for (i = 0; i < gasneti_nodes; i++) { gasneti_ucx_module.ep_tbl[i].ucx_addr_len = ep_sizes[i]; max_ep_size = MAX(max_ep_size, ep_sizes[i]); } ucx_local_addr = gasneti_calloc(1, max_ep_size); GASNETI_MEMCPY(ucx_local_addr, local_ep.ucx_addr, local_ep.ucx_addr_len); gasnetc_ucx_addr_array = gasneti_calloc(gasneti_nodes, max_ep_size); gasneti_bootstrapExchange(ucx_local_addr, max_ep_size, gasnetc_ucx_addr_array); for (i = 0; i < gasneti_nodes; i++) { size_t offset = max_ep_size * i; gasneti_ucx_module.ep_tbl[i].ucx_addr = (ucp_address_t*)(gasnetc_ucx_addr_array + offset); } ucp_worker_release_address(gasneti_ucx_module.ucp_worker, local_ep.ucx_addr); gasneti_free(ep_sizes); gasneti_free(ucx_local_addr); for (i = 0; i < gasneti_nodes; i++) { gasneti_list_init(&gasneti_ucx_module.ep_tbl[i].mem_tbl); } /* (###) Add code here to determine which GASNet nodes may share memory. The collection of nodes sharing memory are known as a "supernode". The (first) data structure to describe this is gasneti_nodemap[]: For all i: gasneti_nodemap[i] is the lowest node number collocated w/ node i where nodes are considered collocated if they have the same node "ID". Or in English: "gasneti_nodemap[] maps from node to first node on the same supernode." If the conduit has already communicated endpoint address information or a similar identifier that is unique per shared-memory compute node, then that info can be passed via arguments 2 through 4. Otherwise the conduit should pass a non-null bootstrapExchange function as argument 1 to use platform-specific IDs, such as gethostid(). See gasneti_nodemapInit() in gasnet_internal.c for more usage documentation. See below for info on gasnetc_bootstrapExchange() If the conduit can build gasneti_nodemap[] w/o assistance, it should call gasneti_nodemapParse() after constructing it (instead of nodemapInit()). */ gasneti_nodemapInit(&gasneti_bootstrapExchange, NULL, 0, 0); #if GASNET_PSHM /* (###) If your conduit will support PSHM, you should initialize it here. * The 1st argument is normally gasneti_spawner->NbrhdBroadcast or equivalent * The 2nd argument is the amount of shared memory space needed for any * conduit-specific uses. * The return value is a pointer to the space requested by the 2nd argument. * It is advisable that the conduit ensure pages in this space are touched, * possibly using gasneti_pshm_prefault(), prior to use of gasneti_segmentLimit() * or similar memory probes. */ (void) gasneti_pshm_init(&gasneti_bootstrapNbrhdBroadcast, 0); #endif // Create first Client, EP and TM *here*, for use in subsequent bootstrap communication { // allocate the client object gasneti_Client_t client = gasneti_alloc_client(clientName, flags); *client_p = gasneti_export_client(client); // create the initial endpoint with internal handlers if (gex_EP_Create(ep_p, *client_p, GEX_EP_CAPABILITY_ALL, flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error creating initial endpoint"); gasneti_EP_t ep = gasneti_import_ep(*ep_p); gasnetc_handler = ep->_amtbl; // TODO-EX: this global variable to be removed // create the tm gasneti_TM_t tm = gasneti_alloc_tm(ep, gasneti_mynode, gasneti_nodes, flags); *tm_p = gasnetc_bootstrap_tm = gasneti_export_tm(tm); } // Establish connections with all nodes if (GASNET_OK != (status = gasnetc_connect_static())) { return status; } // Initialize send and recv resources if (GASNET_OK != (rc = gasnetc_recv_init())) { return rc; } gasnetc_send_init(); gasneti_attach_done = 1; // Ready to use AM Short and Medium for bootstrap comms /* allocate and attach an aux segment */ gasnet_seginfo_t auxseg = gasneti_auxsegAttach((uintptr_t)-1, gasneti_bootstrapExchange); void *auxbase = auxseg.addr; uintptr_t auxsize = auxseg.size; uintptr_t limit = gasneti_segmentLimit((uintptr_t)-1, (uint64_t)-1, NULL, NULL); /* determine Max{Local,GLobal}SegmentSize */ gasneti_segmentInit(limit, &gasneti_bootstrapExchange, flags); #if GASNETC_PIN_SEGMENT /* pin the aux segment and exchange the RKeys */ gasnetc_mem_info_t *mem_info = gasnetc_segment_register(auxbase, auxsize); gasnetc_segment_exchange_aux(mem_info); #endif gasneti_console0_message("WARNING", "ucx-conduit is experimental and should not be used for performance measurements.\n" " WARNING: Please see `ucx-conduit/README` for more details."); gasneti_registerExitHandler(gasnetc_atexit); gasnetc_exit_init(); return GASNET_OK; } static void gasnetc_defaultSignalHandler(int sig) { gasneti_atomic_set(&gasnetc_exit_atsighandler, 1, 0); gasneti_defaultSignalHandler(sig); } /* ------------------------------------------------------------------------------------ */ extern int gasnetc_attach_primary(gex_Flags_t flags) { /* ------------------------------------------------------------------------------------ */ /* register fatal signal handlers */ /* catch fatal signals and convert to SIGQUIT */ gasneti_registerSignalHandlers(gasnetc_defaultSignalHandler); /* (###) register any custom signal handlers required by your conduit * (e.g. to support interrupt-based messaging) */ /* ------------------------------------------------------------------------------------ */ /* primary attach complete */ gasneti_attach_done = 1; gasneti_bootstrapBarrier(); GASNETI_TRACE_PRINTF(C,("gasnetc_attach_primary(): primary attach complete")); gasnete_init(); /* init the extended API */ gasneti_nodemapFini(); /* ensure extended API is initialized across nodes */ gasneti_bootstrapBarrier(); /* (###) Optionally (but recommended) free spawner's idle resources. * Safe even if spawner collectives are used after attach */ gasneti_bootstrapCleanup(); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ int gasnetc_segment_create_hook(gex_Segment_t e_segment) { #if GASNETC_PIN_SEGMENT // Register the segment gasnetc_Segment_t segment = (gasnetc_Segment_t) gasneti_import_segment_valid(e_segment); segment->mem_info = gasnetc_segment_register(segment->_addr, segment->_size); if (! segment->mem_info) { // TODO: non-fatal error handling: // Once gasnetc_segment_register() can return NULL on error, either it or // this path must cleanup any conduit-specific state prior to error return. // However, currently all failure modes in gasnetc_segment_register() call // gasneti_fatalerror(). return GASNET_ERR_BAD_ARG; } #endif return GASNET_OK; } void gasnetc_segment_destroy_hook(gasneti_Segment_t i_segment) { #if GASNETC_PIN_SEGMENT gasneti_assert_zeroret( gasnetc_segment_deregister((gasnetc_Segment_t) i_segment) ); #endif } int gasnetc_segment_attach_hook(gex_Segment_t e_segment, gex_TM_t e_tm) { int rc = gasnetc_segment_create_hook(e_segment); if (rc) return rc; #if GASNETC_PIN_SEGMENT // Exchange the RKeys gex_EP_t e_ep = gex_TM_QueryEP(e_tm); gasnetc_segment_exchange(e_tm, &e_ep, 1); #endif return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ // TODO-EX: this is a candidate for factorization (once we understand the per-conduit variations) extern int gasnetc_Client_Init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { gasneti_assert(client_p); gasneti_assert(ep_p); gasneti_assert(tm_p); gasneti_assert(clientName); #if !GASNET_NULL_ARGV_OK gasneti_assert(argc); gasneti_assert(argv); #endif // main init // TODO-EX: must split off per-client and per-endpoint portions if (!gasneti_init_done) { // First client // NOTE: gasnetc_init() creates the first Client, EP and TM for use in bootstrap comms int retval = gasnetc_init(client_p, ep_p, tm_p, clientName, argc, argv, flags); if (retval != GASNET_OK) GASNETI_RETURN(retval); #if 0 /* called within gasnetc_init to allow init tracing */ gasneti_trace_init(argc, argv); #endif } else { gasneti_fatalerror("No multi-client support"); } // Do NOT move this prior to the gasneti_trace_init() call GASNETI_TRACE_PRINTF(O,("gex_Client_Init: name='%s' argc_p=%p argv_p=%p flags=%d", clientName, (void *)argc, (void *)argv, flags)); if (0 == (flags & GASNETI_FLAG_INIT_LEGACY)) { /* primary attach */ if (GASNET_OK != gasnetc_attach_primary(flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error in primary attach"); /* ensure everything is initialized across all nodes */ gasnet_barrier(0, GASNET_BARRIERFLAG_UNNAMED); } else { gasneti_attach_done = 0; // Pending client call to gasnet_attach() } return GASNET_OK; } extern int gasnetc_ep_publishboundsegment_hook( gex_TM_t tm, gex_EP_t *eps, size_t num_eps, gex_Flags_t flags) { #if GASNETC_PIN_SEGMENT // Conduit-dependent parts // TODO: merge comms into gasneti_EP_PublishBoundSegment(). gasnetc_segment_exchange(tm, eps, num_eps); #endif // Avoid race in which AMRequestLong triggers AMRepyLong before exchange completes remotely // TODO: barrier for multi-tm per-process gex_Event_Wait(gex_Coll_BarrierNB(tm, 0)); return GASNET_OK; } // Conduit-specififc hook to run at end of gex_EP_Create() int gasnetc_ep_init_hook(gasneti_EP_t i_ep) { // Conduit-specific validation if (i_ep->_index) { // Current non-primordial EP support is RMA-only if (i_ep->_caps & ~GEX_EP_CAPABILITY_RMA) { // Unsupported capability/ies requested GASNETI_RETURN_ERRR(BAD_ARG, "ucx-conduit supports only GEX_EP_CAPABILITY_RMA for non-primordial endpoints"); } } return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ // Exit handling logic static gex_Rank_t gasnetc_dissem_peers = 0; static const gex_Rank_t *gasnetc_dissem_peer = NULL; static void gasnetc_exit_init(void) { gasnetc_dissem_peers = gasneti_get_dissem_peers(&gasnetc_dissem_peer); } /* gasnetc_exit_now * * First we set the atomic variable gasnetc_exit_done to allow the exit * of any threads which are spinning on it in gasnetc_exit(). * Then this function tries hard to actually terminate the calling thread. * If for some unlikely reason gasneti_killmyprocess() returns, we abort(). * * DOES NOT RETURN */ GASNETI_NORETURN static void gasnetc_exit_now(int exitcode) { /* If anybody is still waiting, let them go */ gasneti_atomic_set(&gasnetc_exit_done, 1, GASNETI_ATOMIC_WMB_POST); GASNETC_EXIT_STATE("calling gasneti_killmyprocess()"); gasneti_killmyprocess(exitcode); /* NOT REACHED */ gasneti_reghandler(SIGABRT, SIG_DFL); gasneti_fatalerror("gasnetc_exit_now aborting..."); /* NOT REACHED */ } static void gasnetc_noop(void) { return; } static void gasnetc_disable_AMs(void) { int i; for (i = GASNETE_HANDLER_BASE; i < GASNETC_MAX_NUMHANDLERS; ++i) { gasnetc_handler[i].gex_fnptr = (gex_AM_Fn_t)&gasnetc_noop; } } /* gasnetc_exit_sighandler * * This signal handler is for a last-ditch exit when a signal arrives while * attempting the graceful exit. That includes SIGALRM if we get wedged. * * Just a (verbose) signal-handler wrapper for gasnetc_exit_now(). * * DOES NOT RETURN */ static void gasnetc_exit_sighandler(int sig) { int exitcode = (int)gasneti_atomic_read(&gasneti_exit_code, GASNETI_ATOMIC_RMB_PRE); static gasneti_atomic_t once = gasneti_atomic_init(1); #if GASNET_DEBUG // protect until we reach reentrance check gasneti_reghandler(SIGALRM, _exit); gasneti_unblocksig(SIGALRM); alarm(30); #endif const char * state = gasnetc_exit_state; size_t state_len = gasneti_strnlen(state, GASNETC_EXIT_STATE_MAXLEN); /* note - can't call trace macros here, or even sprintf */ if (sig == SIGALRM) { static const char msg[] = "gasnet_exit(): WARNING: timeout during exit... goodbye. ["; gasneti_unused_result( write(STDERR_FILENO, msg, sizeof(msg) - 1) ); gasneti_unused_result( write(STDERR_FILENO, state, state_len) ); gasneti_unused_result( write(STDERR_FILENO, "]\n", 2) ); } else { static const char msg1[] = "gasnet_exit(): ERROR: signal "; static const char msg2[] = " received during exit... goodbye. ["; char digit; gasneti_unused_result( write(STDERR_FILENO, msg1, sizeof(msg1) - 1) ); char sigstr[4]; size_t n = gasneti_utoa(sig, sigstr, sizeof(sigstr), 10); gasneti_unused_result( write(STDERR_FILENO, sigstr, n) ); gasneti_unused_result( write(STDERR_FILENO, msg2, sizeof(msg2) - 1) ); gasneti_unused_result( write(STDERR_FILENO, state, state_len) ); gasneti_unused_result( write(STDERR_FILENO, "]\n", 2) ); } (void) fsync(STDERR_FILENO); if (gasneti_atomic_decrement_and_test(&once, 0)) { /* We ask the bootstrap support to kill us, but only once */ GASNETC_EXIT_STATE("in suicide timer"); gasneti_reghandler(SIGALRM, gasnetc_exit_sighandler); gasneti_unblocksig(SIGALRM); alarm(MAX(5,gasnetc_exittimeout)); gasneti_bootstrapAbort(exitcode); } else { gasnetc_exit_now(exitcode); } /* NOT REACHED */ } /* gasnetc_exit_head * * All exit paths pass through here as the first step. * This function ensures that gasneti_exit_code is written only once * by the first call. * It also lets the handler for remote exit requests know if a local * request has already begun. * * returns non-zero on the first call only * returns zero on all subsequent calls */ static int gasnetc_exit_head(int exitcode) { GASNET_BEGIN_FUNCTION(); int rc = 0; GASNETC_LOCK_ACQUIRE(GASNETC_LOCK_REGULAR); if (!gasnetc_exit_running) { gasneti_atomic_set(&gasneti_exit_code, exitcode, GASNETI_ATOMIC_WMB_POST); gasnetc_exit_running = 1; #ifdef GASNETC_UCX_THREADS gasnetc_exit_thread = GASNETC_MY_THREADIDX; #endif rc = 1; } GASNETC_LOCK_RELEASE(GASNETC_LOCK_REGULAR); return rc; } static void gasnetc_exit_tail(void) GASNETI_NORETURN; static void gasnetc_exit_tail(void) { gasnetc_exit_now((int)gasneti_atomic_read(&gasneti_exit_code, GASNETI_ATOMIC_RMB_PRE)); /* NOT REACHED */ } void gasnetc_exit_threads(void) { GASNET_BEGIN_FUNCTION(); #if GASNET_DEBUG GASNETC_LOCK_UCX(); gasneti_assert(gasnetc_exit_running); GASNETC_UNLOCK_UCX(); #endif /* poll until it is time to exit */ while (!gasneti_atomic_read(&gasnetc_exit_done, GASNETI_ATOMIC_RMB_PRE)) { gasneti_sched_yield(); /* NOT safe to use sleep() here - conflicts with alarm() */ } gasnetc_exit_tail(); /* NOT REACHED */ } static int gasnetc_exit_reduce(int exitcode, int64_t timeout_us) { GASNET_BEGIN_FUNCTION(); gasneti_tick_t start_time = gasneti_ticks_now(); int rc, i; gasneti_assert(timeout_us > 0); /* If the remote request has arrived then we've already failed */ if (gasneti_atomic_read(&gasnetc_exit_reqs, 0)) return -1; GASNETC_EXIT_STATE("exitcode reduction: dissemination"); for (i = 0; i < gasnetc_dissem_peers; ++i) { const uint32_t distance = 1 << i; rc = gasnetc_RequestSysShort(gasnetc_dissem_peer[i], NULL, gasneti_handleridx(gasnetc_exit_reduce_reqh), 2, exitcode, distance); if (rc != GASNET_OK) return -1; do { /* wait for completion of the proper receive, which might arrive out of order */ if (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 > timeout_us) return -1; gasnetc_poll_sndrcv(GASNETC_LOCK_REGULAR GASNETI_THREAD_PASS); if (gasneti_atomic_read(&gasnetc_exit_reqs, 0)) return -1; } while (!(distance & gasneti_atomic_read(&gasnetc_exit_dist, 0))); exitcode = gasneti_atomic_read(&gasneti_exit_code, GASNETI_ATOMIC_RMB_PRE); } return 0; } static void gasnetc_exit_role_reqh(gex_Token_t token) { gex_Rank_t src = gasnetc_msgsource(token); int local_role, result; /* What role would the local node get if the requester is made the leader? */ local_role = (src == gasneti_mynode) ? GASNETC_EXIT_ROLE_LEADER : GASNETC_EXIT_ROLE_MEMBER; /* Try atomically to assume the proper role. Result determines role of requester */ result = gasneti_atomic_compare_and_swap(&gasnetc_exit_role, GASNETC_EXIT_ROLE_UNKNOWN, local_role, 0) ? GASNETC_EXIT_ROLE_LEADER : GASNETC_EXIT_ROLE_MEMBER; /* Inform the requester of the outcome. */ GASNETI_SAFE(gasnetc_ReplySysShort(token, NULL, gasneti_handleridx(gasnetc_exit_role_reph), 1, (gex_AM_Arg_t)result)); } static void gasnetc_exit_role_reph(gex_Token_t token, gex_AM_Arg_t arg0) { int role = (int)arg0; gasneti_assert((role == GASNETC_EXIT_ROLE_LEADER) || (role == GASNETC_EXIT_ROLE_MEMBER)); /* Set the role if not yet set. Then assert that the assigned role has been assumed. * This way the assertion is checking that if the role was obtained by other means * (namely by receiving an exit request) it must match the election result. */ gasneti_atomic_compare_and_swap(&gasnetc_exit_role, GASNETC_EXIT_ROLE_UNKNOWN, role, 0); gasneti_assert(gasneti_atomic_read(&gasnetc_exit_role, 0) == role); } /* * gasnetc_get_exit_role() * * This function returns the exit role immediately if known. Otherwise it sends an AMRequest * to determine its role and then polls the network until the exit role is determined, either * by the reply to that request, or by a remote exit request. * * Includes a timeout to bound how long to poll for a reply, and the return value will * be GASNETC_EXIT_ROLE_UNKNOWN if it expires. * However, should still be called with an alarm timer in-force in case we get hung sending. * * Note that if we get here as a result of a remote exit request then our role has already been * set to "member" and we won't touch the network from inside the request handler. * * TODO: can/should an UCX-level atomic CAS replace the AM round-trip? */ static int gasnetc_get_exit_role(int64_t timeout_us) { GASNET_BEGIN_FUNCTION(); int role = gasneti_atomic_read(&gasnetc_exit_role, 0); gasneti_assert(timeout_us > 0); if (role == GASNETC_EXIT_ROLE_UNKNOWN) { gasneti_tick_t start_time = gasneti_ticks_now(); // Don't know our role yet. So, send an AM Request to determine our role GASNETI_SAFE(gasnetc_RequestSysShort(GASNETC_ROOT_NODE, NULL, gasneti_handleridx(gasnetc_exit_role_reqh), 0)); // Now spin (w/ time limit) until somebody tells us our role do { gasnetc_poll_sndrcv(GASNETC_LOCK_REGULAR GASNETI_THREAD_PASS); role = gasneti_atomic_read(&gasnetc_exit_role, 0); } while ((role == GASNETC_EXIT_ROLE_UNKNOWN) && (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 < timeout_us)); } return role; } static int gasnetc_exit_leader(int exitcode, int64_t timeout_us) { GASNET_BEGIN_FUNCTION(); int i, rc; gasneti_tick_t start_time; gasneti_assert(timeout_us > 0); start_time = gasneti_ticks_now(); /* Notify phase */ for (i = 0; i < gasneti_nodes; ++i) { if (i == gasneti_mynode) continue; if (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 > timeout_us) return -1; rc = gasnetc_RequestSysShort(i, NULL, gasneti_handleridx(gasnetc_exit_reqh), 1, (gex_AM_Arg_t)exitcode); if (rc != GASNET_OK) return -1; } /* Wait phase - wait for replies from our N-1 peers */ while (gasneti_atomic_read(&gasnetc_exit_reps, 0) < (gasneti_nodes - 1)) { if (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 > timeout_us) return -1; gasnetc_poll_sndrcv(GASNETC_LOCK_REGULAR GASNETI_THREAD_PASS); } return 0; } /* gasnetc_exit_member * * We wait for a polite goodbye from the exit leader. * * Takes a timeout in us as an argument * * Returns 0 on success, non-zero on timeout. */ static int gasnetc_exit_member(int64_t timeout_us) { GASNET_BEGIN_FUNCTION(); // OK - not a critical-path gasneti_tick_t start_time; gasneti_assert(timeout_us > 0); start_time = gasneti_ticks_now(); /* wait until the exit request is received from the leader */ while (gasneti_atomic_read(&gasnetc_exit_reqs, 0) == 0) { if (gasneti_ticks_to_ns(gasneti_ticks_now() - start_time) / 1000 > timeout_us) { return -1; } gasnetc_poll_sndrcv(GASNETC_LOCK_REGULAR GASNETI_THREAD_PASS); } /* wait until our reply has been placed on the wire */ gasneti_sync_reads(); /* For non-atomic portion of gasnetc_exit_repl_oust */ gasnetc_counter_wait(&gasnetc_exit_repl_oust, 1 GASNETI_THREAD_PASS); return 0; } static void gasnetc_exit_body(void) { GASNET_BEGIN_FUNCTION(); int exitcode; int graceful = 0; int64_t timeout_us = gasnetc_exittimeout * 1.0e6; unsigned int timeout = (unsigned int)gasnetc_exittimeout; int role; #if GASNET_DEBUG && GASNET_PAR { GASNETC_LOCK_UCX(); gasneti_assert(GASNETC_MY_THREADIDX == gasnetc_exit_thread); GASNETC_UNLOCK_UCX(); } #endif /* once we start a shutdown, ignore all future SIGQUIT signals or we risk reentrancy */ (void)gasneti_reghandler(SIGQUIT, SIG_IGN); /* read exit code, stored by first caller to gasnetc_exit_head() */ exitcode = gasneti_atomic_read(&gasneti_exit_code, GASNETI_ATOMIC_RMB_PRE); /* Establish a last-ditch signal handler in case of failure. */ alarm(0); gasneti_reghandler(SIGALRM, gasnetc_exit_sighandler); #if GASNET_DEBUG gasneti_reghandler(SIGABRT, SIG_DFL); #else gasneti_reghandler(SIGABRT, gasnetc_exit_sighandler); #endif gasneti_reghandler(SIGILL, gasnetc_exit_sighandler); gasneti_reghandler(SIGSEGV, gasnetc_exit_sighandler); gasneti_reghandler(SIGFPE, gasnetc_exit_sighandler); gasneti_reghandler(SIGBUS, gasnetc_exit_sighandler); /* Disable processing of AMs, except core-specific ones */ gasnetc_disable_AMs(); // prevent possible GASNETI_CHECK_INJECT() failures when we communicate GASNETI_CHECK_INJECT_RESET(); if (gasneti_spawn_verbose) gasneti_console_message("EXIT STATE","gasnet_exit(%i)",exitcode); else GASNETI_TRACE_PRINTF(C,("gasnet_exit(%i)\n", exitcode)); /* Timed MAX(exitcode) reduction to clearly distinguish collective exit */ alarm(2 + timeout); // +2 is margin of safety around the timed reduction graceful = (gasnetc_exit_reduce(exitcode, timeout_us) == 0); // A second alarm timer for most of the remaining exit steps // TODO: 120 is arbitrary and hard-coded alarm(MAX(120, timeout)); // Try to flush out all the output GASNETC_EXIT_STATE("flushing output"); { gasneti_flush_streams(); gasneti_trace_finish(); gasneti_sched_yield(); } if (!graceful) { // Timed reduction failed. So make a second attempt at a coordinated shutdown. // This has two global communication steps each with their own timeout interval exitcode = gasneti_atomic_read(&gasneti_exit_code, GASNETI_ATOMIC_RMB_PRE); GASNETC_EXIT_STATE("performing non-collective exit"); unsigned int prev_timeout = alarm(2 + timeout); role = gasnetc_get_exit_role(timeout_us); GASNETC_EXIT_STATE("coordinating shutdown"); alarm(2 + timeout); // yet another alarm interval for the second comms step switch (role) { case GASNETC_EXIT_ROLE_LEADER: /* send all the remote exit requests and wait for the replies */ graceful = (gasnetc_exit_leader(exitcode, timeout_us) == 0); break; case GASNETC_EXIT_ROLE_MEMBER: graceful = (gasnetc_exit_member(timeout_us) == 0); break; default: gasneti_assume(! graceful); } alarm(prev_timeout); // resume previous alarm } // Note we skip cleanly shutdown on non-collective exit or exit via signal if (graceful && !gasnetc_exit_in_signal) { GASNETC_EXIT_STATE("flushing ucx requests: waiting for sends completions"); gasnetc_send_list_wait(GASNETC_LOCK_REGULAR GASNETI_THREAD_PASS); gasneti_spawner->Barrier(); // Always spawner GASNETC_EXIT_STATE("flushing ucx requests: waiting for recvs completions"); while(gasnetc_poll_sndrcv(GASNETC_LOCK_REGULAR GASNETI_THREAD_PASS)); } // One last alarm to cover the Fini or Abort // This has been observed to be the slowest step in some cases (see bug 4360) // TODO: 30 is arbitrary and hard-coded alarm(MAX(30, timeout)); if (graceful) { GASNETC_EXIT_STATE("ucx finalization"); gasnetc_ucx_fini(); GASNETC_EXIT_STATE("in gasneti_bootstrapFini() during graceful exit"); gasneti_bootstrapFini(); } else { GASNETC_EXIT_STATE("in gasneti_bootstrapAbort() during forceful exit"); gasneti_bootstrapAbort(exitcode); } alarm(0); } extern void gasnetc_exit(int exitcode) { /* checking at sighandler now, ucx shouldn't be used in signal * handler function */ if (gasneti_atomic_read(&gasnetc_exit_atsighandler, 0)) { gasneti_bootstrapAbort(exitcode); gasnetc_exit_tail(); /* NOT REACHED */ } gasnetc_exit_head(exitcode); gasnetc_exit_body(); gasnetc_exit_tail(); /* NOT REACHED */ } /* gasnetc_atexit * * This is a simple (at,on_}exit() handler to achieve a hopefully graceful exit. * We use the functions gasnetc_exit_{head,body}() to coordinate the shutdown. * Note that we don't call gasnetc_exit_tail() since we anticipate the normal * exit() procedures to shutdown the multi-threaded process nicely and also * because with atexit() we don't have access to the exit code! * * With atexit(), we don't have access to the exit code to send to the other * nodes in the event this is a non-collective exit. However, experience with at * lease one MPI suggests that when using MPI for bootstrap a non-zero return from * at least one executable is sufficient to produce that non-zero exit code from * the parallel job. Therefore, we can "safely" pass 0 to our peers and still * expect to preserve a non-zero exit code for the GASNet job as a whole. Of course * there is no _guarantee_ this will work with all bootstraps. */ static void gasnetc_atexit(int exitcode) { /* Check return from _head to avoid reentrance */ if (gasnetc_exit_head(exitcode)) { gasnetc_exit_body(); } return; } static void gasnetc_exit_reqh(gex_Token_t token, gex_AM_Arg_t arg0) { /* The leader will send this AM, but should _never_ receive it */ gasneti_assert(gasneti_atomic_read(&gasnetc_exit_role, 0) != GASNETC_EXIT_ROLE_LEADER); /* We should never receive this AM multiple times */ gasneti_assert(gasneti_atomic_read(&gasnetc_exit_reqs, 0) == 0); /* If we didn't already know, we are now certain our role is "member" */ (void)gasneti_atomic_compare_and_swap(&gasnetc_exit_role, GASNETC_EXIT_ROLE_UNKNOWN, GASNETC_EXIT_ROLE_MEMBER, 0); /* Send a reply so the leader knows we are reachable */ GASNETI_SAFE(gasnetc_ReplySysShort(token, &gasnetc_exit_repl_oust, gasneti_handleridx(gasnetc_exit_reph), /* no args */ 0)); gasneti_sync_writes(); /* For non-atomic portion of gasnetc_exit_repl_oust */ /* Count the exit requests, so gasnetc_exit_member() knows when to return */ gasneti_atomic_increment(&gasnetc_exit_reqs, 0); /* Initiate an exit IFF this is the first we've heard of it */ if (gasnetc_exit_head(arg0)) { gasneti_sighandlerfn_t handler; /* IMPORTANT NOTE * When we reach this point we are in a request handler which will never return. * Care should be taken to ensure this doesn't wedge the AM recv logic. * * This is currently safe because: * 1) request handlers are run w/ no locks held * 2) we poll for AMs in all the places we need them */ /* To try and be reasonably robust, want to avoid performing the shutdown and exit from signal * context if we can avoid it. However, we must raise SIGQUIT if the user has registered a handler. * Therefore we inspect what is registered before calling raise(). * * XXX we don't do this atomically w.r.t the signal * XXX we don't do the right thing w/ SIG_ERR and SIG_HOLD */ handler = gasneti_reghandler(SIGQUIT, SIG_IGN); if ((handler != gasneti_defaultSignalHandler) && #ifdef SIG_HOLD (handler != (gasneti_sighandlerfn_t)SIG_HOLD) && #endif (handler != (gasneti_sighandlerfn_t)SIG_ERR) && (handler != (gasneti_sighandlerfn_t)SIG_IGN) && (handler != (gasneti_sighandlerfn_t)SIG_DFL)) { (void)gasneti_reghandler(SIGQUIT, handler); #if 1 raise(SIGQUIT); /* Note: Both ISO C and POSIX assure us that raise() won't return until after the signal handler * (if any) has executed. However, if that handler calls gasnetc_exit(), we'll never return here. */ #elif 0 kill(getpid(),SIGQUIT); #else handler(SIGQUIT); #endif } else { /* No need to restore the handler, since _exit_body will set it to SIG_IGN anyway. */ } gasnetc_exit_body(); gasnetc_exit_tail(); /* NOT REACHED */ } return; } /* gasnetc_exit_reph * * Simply count replies */ static void gasnetc_exit_reph(gex_Token_t token) { gasneti_atomic_increment(&gasnetc_exit_reps, 0); } /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #if GASNET_PSHM /* (###) GASNETC_GET_HANDLER * If your conduit will support PSHM, then there needs to be a way * for PSHM to see your handler table. If you use the recommended * implementation then you don't need to do anything special. * Othwerwise, #define GASNETC_GET_HANDLER in gasnet_core_fwd.h and * implement gasnetc_get_handler() as a macro in * gasnet_core_internal.h * * (###) Tokens and "nbrhd" (loopback and PSHM): * To permit conduit-specific tokens to co-exist with ones used by the * conduit-independent implementation of AMs within the neighborhood, * the nbrhd implementation produces tokens with the least-significant * bit set (assuming the conduit never will). This restricts the * conduit's implemention of tokens, but allows the common choice in * which tokens are pointers to a type with alignment greater than 1. */ #endif extern gex_TI_t gasnetc_Token_Info( gex_Token_t token, gex_Token_Info_t *info, gex_TI_t mask) { const gasnetc_sreq_hdr_t *hdr = (gasnetc_sreq_hdr_t*)token; gasneti_assert(token); gasneti_assert(info); /* (###) If your conduit is using the default support for AMs within * a Neighborhood (including loopback) then this hook is necessary. */ if (gasnetc_token_in_nbrhd(token)) { return gasnetc_nbrhd_Token_Info(token, info, mask); } /* (###) Recommended implementation is to set all supported fields without * testing bits in 'mask'. The exception to this would be for fields that * the conduit considers "costly" to populate. */ gex_TI_t result = 0; /* (###) add code here to write the source into info->gex_srcrank */ info->gex_srcrank = hdr->src; result |= GEX_TI_SRCRANK; /* (###) add code here to write the receiving EP into info->gex_ep */ info->gex_ep = gasneti_THUNK_EP; result |= GEX_TI_EP; /* (###) add code here to write the address of the handle entry into info->gex_entry (optional) */ info->gex_entry = gasneti_import_ep(gasneti_THUNK_EP)->_amtbl + hdr->handler; result |= GEX_TI_ENTRY; /* (###) add code here to set boolean "is a request" field info->gex_is_req (optional) */ info->gex_is_req = hdr->is_req; result |= GEX_TI_IS_REQ; /* (###) add code here to set boolean "is a long" field info->gex_is_long (optional) */ info->gex_is_long = (hdr->am_type == GASNETC_UCX_AM_LONG); result |= GEX_TI_IS_LONG; return GASNETI_TOKEN_INFO_RETURN(result, info, mask); } extern int gasnetc_AMPoll(GASNETI_THREAD_FARG_ALONE) { GASNETI_CHECKATTACH(); #if GASNET_PSHM /* (###) If your conduit will support PSHM, let it make progress here. */ gasneti_AMPSHMPoll(0 GASNETI_THREAD_PASS); #endif /* protected progress of UCX */ gasnetc_poll_sndrcv(GASNETC_LOCK_REGULAR GASNETI_THREAD_PASS); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ /* Active Message Request Functions ================================ */ extern int gasnetc_RequestSysShort(gex_Rank_t jobrank, gasnetc_counter_t *counter, gex_AM_Index_t handler, int numargs, ...) { GASNET_BEGIN_FUNCTION(); int retval; va_list argptr; GASNETI_TRACE_AMREQUESTMEDIUM(gasneti_THUNK_TM,jobrank,handler,NULL,0,/*flags*/0,numargs); /* ensure AM progress, but NOT progress functions */ gasnetc_poll_sndrcv(GASNETC_LOCK_REGULAR GASNETI_THREAD_PASS); va_start(argptr, numargs); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { retval = gasnetc_nbrhd_RequestGeneric ( gasneti_Short, jobrank, handler, NULL, 0, NULL, 0, numargs, argptr GASNETI_THREAD_PASS); } else { gasnetc_cbfunc_t cbfunc = counter ? gasnetc_cb_counter : NULL; gasnetc_atomic_val_t *local_cnt = counter ? &counter->initiated : NULL; retval = gasnetc_am_reqrep_inner(GASNETC_UCX_AM_SHORT, jobrank, handler, 0, 1, numargs, argptr, NULL, 0, NULL, local_cnt, cbfunc GASNETI_THREAD_PASS); } va_end(argptr); return retval; } extern int gasnetc_ReplySysShort(gex_Token_t token, gasnetc_counter_t *counter, gex_AM_Index_t handler, int numargs, ...) { GASNET_BEGIN_FUNCTION(); int retval; va_list argptr; gasneti_assert(token); GASNETI_TRACE_AMREPLYSHORT(token,handler,/*flags*/0,numargs); va_start(argptr, numargs); if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric ( gasneti_Short, token, handler, NULL, 0, NULL, 0, numargs, argptr); } else { gex_Rank_t jobrank = gasnetc_msgsource(token); gasnetc_cbfunc_t cbfunc = counter ? gasnetc_cb_counter : NULL; gasnetc_atomic_val_t *local_cnt = counter ? &counter->initiated : NULL; retval = gasnetc_am_reqrep_inner(GASNETC_UCX_AM_SHORT, jobrank, handler, 0, 0, numargs, argptr, NULL, 0, NULL, local_cnt, cbfunc GASNETI_THREAD_PASS); } va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMRequestShort) int gasnetc_AMRequestShort( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { retval = gasnetc_nbrhd_RequestGeneric(gasneti_Short, jobrank, handler, 0, 0, 0, flags, numargs, argptr GASNETI_THREAD_PASS); } else { retval = gasnetc_AM_ReqRepGeneric(GASNETC_UCX_AM_SHORT, jobrank, handler, NULL, flags, 1, numargs, argptr, NULL, 0, NULL GASNETI_THREAD_PASS); } return retval; } extern int gasnetc_AMRequestShortM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTSHORT(tm,rank,handler,flags,numargs); GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* (###) poll at least once, to assure forward progress */ va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestShort(tm,rank,handler,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } #if GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM #error gasnetc_AM_PrepareRequestMedium unimplemented #else GASNETI_INLINE(gasnetc_AMRequestMedium) int gasnetc_AMRequestMedium(gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { gasneti_leaf_finish(lc_opt); // synchronous LC retval = gasnetc_nbrhd_RequestGeneric( gasneti_Medium, jobrank, handler, source_addr, nbytes, 0, flags, numargs, argptr GASNETI_THREAD_PASS); } else { gasneti_leaf_finish(lc_opt); // TODO-EX: should support async local completion retval = gasnetc_AM_ReqRepGeneric(GASNETC_UCX_AM_MEDIUM, jobrank, handler, NULL, flags, 1, numargs, argptr, source_addr, nbytes, NULL GASNETI_THREAD_PASS); } return retval; } extern int gasnetc_AMRequestMediumV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { return gasnetc_AMRequestMedium(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); } extern int gasnetc_AMRequestMediumM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTMEDIUM(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs); GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* (###) poll at least once, to assure forward progress */ va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestMedium(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } #endif // GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM GASNETI_INLINE(gasnetc_AMRequestLong) int gasnetc_AMRequestLong( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { gasneti_leaf_finish(lc_opt); // synchronous LC retval = gasnetc_nbrhd_RequestGeneric( gasneti_Long, jobrank, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr GASNETI_THREAD_PASS); } else { retval = gasnetc_AM_ReqRepGeneric(GASNETC_UCX_AM_LONG, jobrank, handler, lc_opt, flags, 1, numargs, argptr, source_addr, nbytes, dest_addr GASNETI_THREAD_PASS); } return retval; } extern int gasnetc_AMRequestLongV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { return gasnetc_AMRequestLong(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); } extern int gasnetc_AMRequestLongM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTLONG(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* (###) poll at least once, to assure forward progress */ va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestLong(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMReplyShort) int gasnetc_AMReplyShort( gex_Token_t token, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr) { int retval; if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Short, token, handler, 0, 0, 0, flags, numargs, argptr); } else { GASNET_BEGIN_FUNCTION(); // TODO: could embed threadinfo in token gex_Rank_t jobrank = gasnetc_msgsource(token); retval = gasnetc_AM_ReqRepGeneric(GASNETC_UCX_AM_SHORT, jobrank, handler, NULL, flags, 0, numargs, argptr, NULL, 0, NULL GASNETI_THREAD_PASS); } return retval; } extern int gasnetc_AMReplyShortM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags, int numargs, ...) { GASNETI_COMMON_AMREPLYSHORT(token,handler,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyShort(token,handler,flags,numargs,argptr); va_end(argptr); return retval; } #if GASNET_NATIVE_NP_ALLOC_REP_MEDIUM #error gasnetc_AM_PrepareReplyMedium unimplemented #else // This provides a template implementing the following two external functions: // int gasnetc_AMReplyMediumV() // int gasnetc_AMReplyMediumM() // See comments preceding gasnetc_AMRequestMedium() for more information. GASNETI_INLINE(gasnetc_AMReplyMedium) int gasnetc_AMReplyMedium( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { int retval; if_pt (gasnetc_token_in_nbrhd(token)) { gasneti_leaf_finish(lc_opt); // synchronous LC retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Medium, token, handler, source_addr, nbytes, 0, flags, numargs, argptr); } else { GASNET_BEGIN_FUNCTION(); // TODO: could embed threadinfo in token gex_Rank_t jobrank = gasnetc_msgsource(token); gasneti_leaf_finish(lc_opt); // TODO-EX: should support async local completion retval = gasnetc_AM_ReqRepGeneric(GASNETC_UCX_AM_MEDIUM, jobrank, handler, NULL, flags, 0, numargs, argptr, source_addr, nbytes, NULL GASNETI_THREAD_PASS); } return retval; } extern int gasnetc_AMReplyMediumV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { return gasnetc_AMReplyMedium(token,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr); } extern int gasnetc_AMReplyMediumM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { GASNETI_COMMON_AMREPLYMEDIUM(token,handler,source_addr,nbytes,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyMedium(token,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr); va_end(argptr); return retval; } #endif // GASNET_NATIVE_NP_ALLOC_REP_MEDIUM GASNETI_INLINE(gasnetc_AMReplyLong) int gasnetc_AMReplyLong( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { int retval; if_pt (gasnetc_token_in_nbrhd(token)) { gasneti_leaf_finish(lc_opt); // synchronous LC retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Long, token, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr); } else { GASNET_BEGIN_FUNCTION(); // TODO: could embed threadinfo in token gex_Rank_t jobrank = gasnetc_msgsource(token); retval = gasnetc_AM_ReqRepGeneric(GASNETC_UCX_AM_LONG, jobrank, handler, lc_opt, flags, 0, numargs, argptr, source_addr, nbytes, dest_addr GASNETI_THREAD_PASS); } return retval; } extern int gasnetc_AMReplyLongV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { return gasnetc_AMReplyLong(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr); } extern int gasnetc_AMReplyLongM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { GASNETI_COMMON_AMREPLYLONG(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyLong(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ #if !GASNETC_NULL_HSL extern void gasnetc_hsl_init (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); gasneti_mutex_init(&(hsl->lock)); } extern void gasnetc_hsl_destroy(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); gasneti_mutex_destroy(&(hsl->lock)); } extern void gasnetc_hsl_lock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); { #if GASNETI_STATS_OR_TRACE gasneti_tick_t startlock = GASNETI_TICKS_NOW_IFENABLED(L); #endif #if GASNETC_HSL_SPINLOCK if_pf (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { if (gasneti_wait_mode == GASNET_WAIT_SPIN) { while (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { gasneti_spinloop_hint(); } } else { gasneti_mutex_lock(&(hsl->lock)); } } #else gasneti_mutex_lock(&(hsl->lock)); #endif #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); GASNETI_TRACE_EVENT_TIME(L, HSL_LOCK, hsl->acquiretime-startlock); #endif } } extern void gasnetc_hsl_unlock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); GASNETI_TRACE_EVENT_TIME(L, HSL_UNLOCK, GASNETI_TICKS_NOW_IFENABLED(L)-hsl->acquiretime); gasneti_mutex_unlock(&(hsl->lock)); } extern int gasnetc_hsl_trylock(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); { int locked = (gasneti_mutex_trylock(&(hsl->lock)) == 0); GASNETI_TRACE_EVENT_VAL(L, HSL_TRYLOCK, locked); if (locked) { #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); #endif } return locked ? GASNET_OK : GASNET_ERR_NOT_READY; } } #endif /* ------------------------------------------------------------------------------------ */ /* Exit handling code */ #ifndef GASNETI_HAVE_ATOMIC_CAS #error "required atomic compare-and-swap is not yet implemented for your CPU/OS/compiler" #endif /* gasnetc_exit_reduce_reqh: reduction on exitcode */ /* gasnetc_exit_reduce_reqh: reduction on exitcode */ static void gasnetc_exit_reduce_reqh(gex_Token_t token, gex_AM_Arg_t arg0, gex_AM_Arg_t arg1) { gasneti_atomic_val_t exitcode = arg0; gasneti_atomic_val_t distance = arg1; gasneti_atomic_val_t prevcode; do { prevcode = gasneti_atomic_read(&gasneti_exit_code, 0); } while ((exitcode > prevcode) && !gasneti_atomic_compare_and_swap(&gasneti_exit_code, prevcode, exitcode, 0)); if (distance) { #if defined(GASNETI_HAVE_ATOMIC_ADD_SUB) /* atomic OR via ADD since no bit will be set more than once */ gasneti_assert(GASNETI_POWEROFTWO(distance)); gasneti_atomic_add(&gasnetc_exit_dist, distance, GASNETI_ATOMIC_REL); #elif defined(GASNETI_HAVE_ATOMIC_CAS) /* atomic OR via C-A-S */ uint32_t old_val; do { old_val = gasneti_atomic_read(&gasnetc_exit_dist, 0); } while (!gasneti_atomic_compare_and_swap(&gasnetc_exit_dist, old_val, old_val|distance, GASNETI_ATOMIC_REL)); #else #error "required atomic compare-and-swap is not yet implemented for your CPU/OS/compiler" #endif } else { gasneti_atomic_increment(&gasnetc_exit_reds, GASNETI_ATOMIC_REL); } } /* ------------------------------------------------------------------------------------ */ /* Private Handlers: ================ see mpi-conduit and extended-ref for examples on how to declare AM handlers here (for internal conduit use in bootstrapping, job management, etc.) */ static gex_AM_Entry_t const gasnetc_handlers[] = { GASNETC_COMMON_HANDLERS(), /* ptr-width independent handlers */ gasneti_handler_tableentry_no_bits(gasnetc_exit_reduce_reqh,2,REQUEST,SHORT,0), gasneti_handler_tableentry_no_bits(gasnetc_exit_role_reqh,0,REQUEST,SHORT,0), gasneti_handler_tableentry_no_bits(gasnetc_exit_role_reph,1,REPLY,SHORT,0), gasneti_handler_tableentry_no_bits(gasnetc_exit_reqh,1,REQUEST,SHORT,0), gasneti_handler_tableentry_no_bits(gasnetc_exit_reph,0,REPLY,SHORT,0), /* ptr-width dependent handlers */ GASNETI_HANDLER_EOT }; gex_AM_Entry_t const *gasnetc_get_handlertable(void) { return gasnetc_handlers; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/ucx-conduit/contrib/0000775000175000017500000000000015142313673017324 5ustar alastairalastairgasnet-2025.8.0/ucx-conduit/contrib/gasnetrun_ucx.in0000664000175000017500000000110315142313673022534 0ustar alastairalastair#!@BOURNE_SHELL@ GASNET_UCX_SPAWNER="${GASNET_UCX_SPAWNER:-@GASNET_UCX_SPAWNER_CONF@}" export GASNET_UCX_SPAWNER GASNET_SPAWN_CONDUIT=UCX export GASNET_SPAWN_CONDUIT @MPIRUN_COMMON@ @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_SPAWN_HAVE_MPI=1 @HAVE_BOOTSTRAP_MPI_FALSE@GASNET_SPAWN_HAVE_MPI=0 export GASNET_SPAWN_HAVE_MPI @HAVE_BOOTSTRAP_PMI_TRUE@GASNET_SPAWN_HAVE_PMI=1 @HAVE_BOOTSTRAP_PMI_FALSE@GASNET_SPAWN_HAVE_PMI=0 export GASNET_SPAWN_HAVE_PMI @HAVE_BOOTSTRAP_SSH_TRUE@GASNET_SPAWN_HAVE_SSH=1 @HAVE_BOOTSTRAP_SSH_FALSE@GASNET_SPAWN_HAVE_SSH=0 export GASNET_SPAWN_HAVE_SSH @PERLSTART@ gasnet-2025.8.0/ucx-conduit/contrib/Makefile.am0000664000175000017500000000315015142313673021357 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/contrib/Makefile.am $ # Description: Makefile for GASNet UCX spawner # Terms of use are as specified in ucx-conduit/license.txt AUTOMAKE_OPTIONS = foreign 1.4 # Use of the MPI/PMI spawning support is optional if HAVE_BOOTSTRAP_MPI mpi_target_pl = gasnetrun_ucx-mpi.pl $(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl cp -f "$?" $@ else if HAVE_BOOTSTRAP_PMI mpi_target_pl = gasnetrun_ucx-mpi.pl $(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl cp -f "$?" $@ else mpi_target_pl = endif endif target = gasnetrun_ucx target_pl = $(target).pl # Need a bin_DATA rule, but automake disallows that. So, fake it. dotpldir = $(bindir) # Make sure the perl script and shell wrapper are always current locally. # This ensures we can run from the build directory if needed. $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart $(top_builddir)/other/mpirun_common: $(top_srcdir)/other/mpirun_common.in @cd $(top_builddir)/other && $(MAKE) mpirun_common $(target): $(top_builddir)/other/perlstart $(top_builddir)/other/mpirun_common all-local: $(target_pl) $(target) $(mpi_target_pl) $(target_pl): $(top_srcdir)/other/spawner/gasnetrun.pl cp -f "$<" $@ DISTCLEANFILES = $(target) $(target_pl) $(mpi_target_pl) # Conditionally install the .pl and its wrapper if USE_UCX_CONDUIT scripts = $(target) data = $(target_pl) $(mpi_target_pl) else scripts = data = endif bin_SCRIPTS = $(scripts) dotpl_DATA = $(data) gasnet-2025.8.0/ucx-conduit/contrib/Makefile.in0000664000175000017500000005366215142313673021405 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/contrib/Makefile.am $ # Description: Makefile for GASNet UCX spawner # Terms of use are as specified in ucx-conduit/license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = ucx-conduit/contrib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = gasnetrun_ucx CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dotpl_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gasnetrun_ucx.in \ $(top_srcdir)/config-aux/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = gasnetrun_ucx target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_FALSE@mpi_target_pl = @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@mpi_target_pl = gasnetrun_ucx-mpi.pl # Use of the MPI/PMI spawning support is optional @HAVE_BOOTSTRAP_MPI_TRUE@mpi_target_pl = gasnetrun_ucx-mpi.pl target_pl = $(target).pl # Need a bin_DATA rule, but automake disallows that. So, fake it. dotpldir = $(bindir) DISTCLEANFILES = $(target) $(target_pl) $(mpi_target_pl) @USE_UCX_CONDUIT_FALSE@scripts = # Conditionally install the .pl and its wrapper @USE_UCX_CONDUIT_TRUE@scripts = $(target) @USE_UCX_CONDUIT_FALSE@data = @USE_UCX_CONDUIT_TRUE@data = $(target_pl) $(mpi_target_pl) bin_SCRIPTS = $(scripts) dotpl_DATA = $(data) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ucx-conduit/contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign ucx-conduit/contrib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gasnetrun_ucx: $(top_builddir)/config.status $(srcdir)/gasnetrun_ucx.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) install-dotplDATA: $(dotpl_DATA) @$(NORMAL_INSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dotpldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dotpldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dotpldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dotpldir)" || exit $$?; \ done uninstall-dotplDATA: @$(NORMAL_UNINSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(dotpldir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) all-local installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dotplDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-dotplDATA .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ cscopelist-am ctags-am distclean distclean-generic distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am \ install-dotplDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-dotplDATA .PRECIOUS: Makefile @HAVE_BOOTSTRAP_MPI_TRUE@$(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl @HAVE_BOOTSTRAP_MPI_TRUE@ cp -f "$?" $@ @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@$(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@ cp -f "$?" $@ # Make sure the perl script and shell wrapper are always current locally. # This ensures we can run from the build directory if needed. $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart $(top_builddir)/other/mpirun_common: $(top_srcdir)/other/mpirun_common.in @cd $(top_builddir)/other && $(MAKE) mpirun_common $(target): $(top_builddir)/other/perlstart $(top_builddir)/other/mpirun_common all-local: $(target_pl) $(target) $(mpi_target_pl) $(target_pl): $(top_srcdir)/other/spawner/gasnetrun.pl cp -f "$<" $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/ucx-conduit/README0000664000175000017500000004225415142313673016553 0ustar alastairalastairGASNet ucx-conduit documentation Mellanox Technologies LTD Copyright (c) 2019-2021. Portions copyright 2021-2025, The Regents of the University of California. Boris I. Karasev Artem Y. Polyakov Paul H. Hargrove @ TOC: @ @ Section: Overview @ @ Section: Where this conduit runs @ @ Section: Build-time Configuration @ @ Section: Job Spawning @ @ Section: Runtime Configuration @ @ Section: Multi-rail Support @ @ Section: On-Demand Paging (ODP) Support @ @ Section: HCA Configuration @ @ Section: Known Problems @ @ Section: Design Overview @ @ Section: Graceful exits @ @ Section: References @ @ Section: Overview @ Ucx-conduit implements GASNet over the Unified Communication X (UCX) framework (see https://www.openucx.org/ for general information on UCX). This conduit is feature-complete and supports Active Messages and hardware-offload of RMA and Atomic operations. Performance tuning is is planned as future work. Since this conduit is considered "experimental" pending performance-tuning work, it is disabled by default. It can be enabled explicitly at configure time using either `--enable-ucx` or `--enable-ucx=probe`. Either option will enable ucx-conduit if `configure` locates the prerequisites. The difference is that the first option makes failure to locate the prerequisites fatal in `configure`. @ Section: Where this conduit runs @ The conduit is based on Unified Communication X (UCX) communication library (see https://www.openucx.org/ for general information on UCX). UCX is an open-source project developed in collaboration between industry, laboratories, and academia to create an open-source production-grade communication framework for data-centric and high-performance applications. The UCX library can be downloaded from repositories (e.g., Fedora/RedHat yum repositories). The UCX library is also part of Mellanox OFED (a.k.a "MLNX_OFED") and the NVIDIA/Mellanox HPC-X Software Toolkit. The conduit is tested and known to work with - NVIDIA/Mellanox InfiniBand and RoCE devices starting from ConnectX-5 - UCX library version 1.6 and above - Linux platform For NVIDIA/Mellanox adapters, UCX conduit supports all transports: RC, UD and DC. For large-scale applications, it is recommended to use DC transport for scalability reasons. @ Section: Build-time Configuration @ In order to enable the conduit, the option '--enable-ucx' must be passed to configure. By default, ucx-conduit will not be built. See `configure --help` for additional ucx-related configure options. See the extended-ref README for the GASNet general-purpose configuration parameters. --with-ucx-max-medium=[value] By default gex_AM_LUB{Request,Reply}Medium() return 65456, which is a 64KiB buffer minus overheads such as handler arguments. This configure option sets the default value for the GASNET_UCX_MAX_MEDIUM environment variable, which determines the LUB size at runtime. The value cannot be less than 512. The default value is 65456. @ Section: Job Spawning @ If using UPC++, Chapel, etc. the language-specific commands should be used to launch applications. Otherwise, applications can be launched using the gasnetrun_ucx utility: + usage summary: gasnetrun_ucx -n [options] [--] prog [program args] options: -n number of processes to run (required) -N number of nodes to run on (not always supported) -c number of cpus per process (not always supported) -E list of environment vars to propagate -v be verbose about what is happening -t test only, don't execute anything (implies -v) -k keep any temporary files created (implies -v) -spawner= force use of a specific spawner ([supported spawners]) -- ends option parsing There are as many as three possible methods (ssh, mpi and pmi) by which one can launch an ucx-conduit application. Ssh-based spawning is always available, and mpi- and pmi-based spawning are available if the respective support was located at configure time. The default is established at configure time (see section "Build-time Configuration"). The choice of spawner only affects the protocol used for parallel job setup and teardown; in particular it is NOT used to implement any part of the steady-state GASNet communication operations. As such, the selected protocol needs to be stable and co-exist with GASNet communication, but its performance efficiency is usually not a practical consideration. To select a non-default spawner one may either use the "-spawner=" command- line argument or set the environment variable GASNET_UCX_SPAWNER to "ssh", "mpi" or "pmi". If both are used, then the command line argument takes precedence. @ Section: Runtime Configuration @ Ucx-conduit supports all of the standard GASNet environment variables and the optional GASNET_EXITTIMEOUT family of environment variables. See GASNet's top-level README for documentation. Additional environment variables: + GASNET_UCX_AM_ORDERED_TLS This Boolean setting determines if the logic for transfer of AM Long payloads may assume UCX is using an in-order transport. This results in faster transfers, but could yield data corruption if the payload and header are reordered. Setting to 1 forces this optimization, while 0 disables it. The default is to enable this setting if the conduit can determine that GASNet's PSHM (which guarantees ordering) is used for all intra-node communication, as opposed to UCX shared-memory transport which does not guarantee ordering (see bug 4155). + GASNET_UCX_MAX_MEDIUM This setting determines the size of buffers used for AM Mediums, and thus the return value of the gex_AM_LUB{Request,Reply}Medium() queries. The value cannot be less than 512. Unless a different value was set using --with-ucx-max-medium=[value] at configure time, the default value is 65456. In order to control UCX parameters (i.e. device or transport selection), environment variables are used. Most commonly used variables are described on the UCX Wiki page https://github.com/openucx/ucx/wiki/UCX-environment-parameters For the full list of tuning knobs supported by a particular UCX version, see the output of `ucx_info -f`. Previous versions of this document described a "personalized prefix" feature of the UCX library which resulted in a recommendation to use "UCX_GASNET_" or "GASNET_UCX_", depending on the UCX version in use. It has since been determined that this UCX feature is not reliable. Therfore, that prior recommendation is withdrawn. One should use such variable names as "UCX_TLS" and *not* variants such as "UCX_GASNET_TLS" or "GASNET_UCX_TLS". The "UCX_TLS" environment variable controls transport selection and is one of the most commonly used UCX parameters. Available options are: $ ucx_info -f | grep UCX_TLS -B 23 | head -n 20 # # Comma-separated list of transports to use. The order is not meaningful. # - all : use all the available transports. # - sm/shm : all shared memory transports (mm, cma, knem). # - mm : shared memory transports - only memory mappers. # - ugni : ugni_smsg and ugni_rdma (uses ugni_udt for bootstrap). # - ib : all infiniband transports (rc/rc_mlx5, ud/ud_mlx5, dc_mlx5). # - rc_v : rc verbs (uses ud for bootstrap). # - rc_x : rc with accelerated verbs (uses ud_mlx5 for bootstrap). # - rc : rc_v and rc_x (preferably if available). # - ud_v : ud verbs. # - ud_x : ud with accelerated verbs. # - ud : ud_v and ud_x (preferably if available). # - dc/dc_x : dc with accelerated verbs. # - tcp : sockets over TCP/IP. # - cuda : CUDA (NVIDIA GPU) memory support. # - rocm : ROCm (AMD GPU) memory support. # Using a \ prefix before a transport name treats it as an explicit transport name # and disables aliasing. # In order to ensure ucx-conduit is being used with supported NVIDIA/Mellanox devices, the following transport set is recommended to exclude unsupported networks: "UCX_TLS=ib,sm,self". To leverage UCX support for GPU device memory for GASNet-EX Memory Kinds, one may append ",cuda" or ",rocm". However, please see "Known Problems" for issues with UCX support for GPU device memory. Ucx-conduit supports all of the standard and the optional GASNET_EXITTIMEOUT GASNet environment variables. See GASNet's top-level README for documentation. @ Section: Multi-rail Support @ UCX supports multi-rail configurations, and ucx-conduit has been successfully tested on such systems. Please consult the online UCX documentation at https://www.openucx.org/ for information on configuring the use of multiple network rails. @ Section: On-Demand Paging (ODP) Support @ The conduit supports ODP through UCX, see "UCX_IB_REG_METHODS" UCX environment variable. @ Section: Known Problems @ + This conduit does not support NVIDIA/Mellanox ConnectX-4 adapters, or older. This is unlikely to change. + Support for segment-everything mode is currently disabled due to unbounded memory use in AMLong (especially as used in the "amref" implementation of RMA). Restored support for `--enable-segment-everything` is an area for future work. + Bug 4172 In hybrid MPI applications there are conditions which can trigger a crash at exit time due to a call to MPI_Barrier() by ucx-conduit after MPI_Finalize() by the application. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4172 + Bug 4301 As descried in the "Runtime Configuration" section, UCX versions 1.9 and newer use prefix of "GASNET_UCX" for private (per client of UCX) configuration. However, this same prefix is used by ucx-conduit for its own environment settings. The result is that, by default, the UCX library may issue warnings which include text like the following: "UCX WARN unused env variable: GASNET_UCX_SPAWNER" and "(set UCX_WARN_UNUSED_ENV_VARS=n to suppress this warning)" The work-around is to set UCX_WARN_UNUSED_ENV_VARS=n as the message recommends. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4301 + Bug 4337 Some Active Message traffic patterns may induce ucx-conduit to perform excessive buffering within the UCX library. This can lead to unexpectedly large memory consumption, which in turn may lead to multiple fatal error modes. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4337 + Bug 4384 Use of GASNet-EX "CUDA_UVA" memory kinds with ucx-conduit may crash due to incorrect default algorithm selection inside UCX for RMA transfers involving device memory. For UCX versions 1.11.0 and newer, there are work-arounds based on setting environment variables to modify the algorithm selection to be correct for device memory at the expense of slowing of host memory RMA. Currently, the most reliable work-around is to set the following MLX5_SCATTER_TO_CQE=0 UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 The MLX5_SCATTER_TO_CQE=0 may or may not be required, depending on the underlying InfiniBand software stack. Omitting it may provide a small performance benefit on systems where it is not required for correctness. There is no known work-around for versions of UCX prior to 1.11.0. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4384 + Bug 4393 The use by ucx-conduit of UCX's support for CUDA devices currently lacks the manipulation of CUDA contexts required for correct multi-device operation. Use of the recommended "UCX_TLS=ib,sm,self" setting is an effective work-around. Others are described in the bug report. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4393 * Bug 4474 When using hugepages together with NVIDIA/Mellanox InfiniBand and RoCE devices, it may be necessary to set `RDMAV_HUGEPAGES_SAFE=1` in the environment. Failure to do so may result in a self-explanatory error message: UCX ERROR ibv_reg_mr(address=0x7f49c5a02800, length=2048, access=0xf) failed: Invalid argument. Application is using HUGE pages. Please set environment variable RDMAV_HUGEPAGES_SAFE=1 The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4474 + See the GASNet Bugzilla server for details on other known bugs: https://gasnet-bugs.lbl.gov/ @ Section: Design Overview @ The UCX conduit implements GASNet core and extended API for UCX-compatible network adapters. Where: (a) Core API includes conduit resource initialization and cleanup functionality along with Active Message communication; (b) Extended API includes one-sided and atomic operations support. References: + UCX API documentation: https://openucx.github.io/ucx/api/latest/html/index.html (most recent) https://openucx.github.io/ucx/api/v1.6/html/index.html (oldest supported) Resource allocation and initialization: During GASNet initialization, every process creates a UCX worker, participates in the exchange of worker addresses (with Allgather communication pattern), and creates UCP endpoints representing connections to all other processes in the GASNet job. In addition, a set of service buffers for Active Messages is allocated and all required UCP memory registrations and memory key exchanges are performed. Active Message: UCX conduit implementation is using pools of pre-allocated AM header buffers that are used for all types of AMs. Sending of Requests and Replies each use a distinct pool, while reception of AMs uses a third pool. For AM Medium messages, the payload is always copied to the buffer holding the header, to reduce the latency in absence of local completion options ("lc_opt") support. This behavior will be reconsidered in the future. For Long AMs payload transfer is implemented using RDMA Put operation. RDMA/AMO: Implementation of RDMA Put and Atomic operations is a thin layer on top of UCP primitives. In addition, "ucp_ep_flush_nb" is used to implement remote completion tracking. UCX directly supports most atomic operations on integer types, while the remaining operations are handled by the generic GASNet implementation. The following table indicates the pairs of atomic operation and data type that are eligible for execution via UCX. The UCX atomics will be used when the arguments to gex_AD_Create() express only supported pairs (unless suppressed by use of GEX_FLAG_AD_FAVOR_MY_RANK or GEX_FLAG_AD_FAVOR_MY_NBRHD flags, or in a run spanning a single shared memory nbrhd). I32/U32/I64/U64 FLT/DBL --- --------------- ------ SET: Y N GET: Y N SWAP: Y N (F)CAS: Y N (F)ADD: Y N (F)SUB: Y N (F)INC: Y N (F)DEC: Y N (F)MULT: N N (F)MIN: N N (F)MAX: N N (F)AND: Y N (F)OR: Y N (F)XOR: Y N Y = offload is supported N = offload is not supported @ Section: Graceful exits @ Graceful exits are supported by the conduit. The design is based on ibv-conduit description (see ibv-conduit README). @ Section: Future work @ + Implement non-trivial support for local completion options ("lc_opt") + Implement native support for Negotiated-Payload Active Message (NPAM) + Additional round of performance analysis and tuning. + Investigate older UCX versions and hardware compatibility and update README. + Support Graceful exits if rank 0 has failed. + Restore `--enable-segment-everything` mode: - Fix performance and memory usage of AMLong in `--enable-segment-everything` mode. - Apply ODP to optimize `--enable-segment-everything` mode. NOTE: In FAST and LARGE modes, receive buffers are preposted to the tag-matching APIs at initialization, and reposted as quickly as the received AMs have been executed. However, in EVERYTHING mode there are NO preposted receives. Instead, every internal poll (both inside and outside handler context) calls `ucp_tag_probe_nb()` to determine the length necessary in order to post the receive for the message (for which the underlying transport has at least transferred the length and tag, plus maybe the payload in an eager protocol). In general (unless eager) the AM send buffer at the initiator will remain allocated until this matching receive is posted. Thus, one may deadlock if there is some path by which an AM injector is waiting for send buffers when all of them are tied up with AMs sent to inattentive peers. gasnet-2025.8.0/ucx-conduit/gasnet_ratomic_fwd.h0000664000175000017500000001311615142313673021676 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/gasnet_ratomic_fwd.h $ * Description: GASNet Remote Atomics API Header (forward decls) * Copyright 2017, The Regents of the University of California * Copyright 2019-2020, Mellanox Technologies LTD. All rights reserved. * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_RATOMIC_FWD_H #define _GASNET_RATOMIC_FWD_H // (###) Note to conduit authors: // When providing conduit-specific implementations of Remote Atomics, // one should clone this file to the conduit directory and make the // changes indicated by comments starting with (###). // **** // Section 1: control/configure AM-based reference implementation // // In general, the AM-based atomics may get used even in the presence of a // conduit-specific implementation (for instance, any time an AD has a type // or an operation not supported by the conduit). Some conduit properties // are relevant to the behavior of the AM-based reference implementation. // **** // 1a. GASNETE_RATOMIC_AMONLY // // If using extended-ref/ratomic/gasnet_ratomic_fwd.h file, then there is no // conduit-specific version. This define enables some optimization correct // only in the absence of conduit-specific atomics. // // (###) Conduits cloning the file *must* remove (or comment-out) this define! #if !defined(GASNET_SEGMENT_FAST) && !defined(GASNET_SEGMENT_LARGE) #define GASNETE_RATOMIC_AMONLY 1 #endif // 1b. GASNETE_AMRATOMIC_USE_RMA_gex_dt_* // // Enable optional use of RMA Put and Get for atomic SET and GET operations // within the AM-based atomics (rather than an AM that performs the SET or GET // using the target CPU). // // If the conduit's RMA Put and Get of naturally aligned 4 and/or 8 byte values // are free of word-tearing and intermediate values, as observed by the target // CPU, then we consider them "atomic" and AM-based Set and Get may use them. // // (###) replace 'if 0' with 'if 1' below if appropriate // #if 0 // (###) change '0' to '1' if 32-bit RMA Put and Get are atomic #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_I32 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_U32 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_FLT 1 #endif #if 0 // (###) change '0' to '1' if 64-bit RMA Put and Get are atomic #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_I64 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_U64 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_DBL 1 #endif // 1c. GASNETI_RATOMIC_STATS // // Stats needed by the RAtomic reference implementation // // (###) Conduits should merge this set of STATS counters with their own // to allow the reference implementation to continue compiling along side // the conduit-specific implementation(s). // // TODO-EX: find an alternative location to define the RAtomic reference // STATS so that conduits may *append* to them (rather than replicate) // when cloning this file. #ifndef GASNETI_RATOMIC_STATS #define GASNETI_RATOMIC_STATS(CNT,VAL,TIME) \ /* Currently empty */ #endif // **** // Section 2: control/configure conduit-specific remote atomics // // This section contains settings related to how conduit-specific remote // atomics interact with the rest of the system, such as the interaction // with atomics performed by the local CPU. // **** // 2a. GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_* // // Assert that all atomics implementations possible in the current build // are unconditionally "tools safe" (for each type independently). The // term "tools safe" here means that concurrent access via GASNet-Tools // will produce correct results. // // Each token GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE##dtcode should be 0 or 1: // 0: Honor _real_ad->_tools_safe (testing each instance dynamically) // 1: Ignore _real_ad->_tools_safe, assuming it is 1 (saves 1 branch) // Consumed by the GASNETE_RATOMIC_DISP() macro. // // (###) Conduits cloning this file must update these to be accurate. // For types which are never offloaded, the value '1' may be retained. // For a type which may be offloaded this value '0' should be used // *unless* the implementation is consistent with GASNet-Tools atomics. // HOWEVER, that is almost never a safe determination to make, since // Tools may use mutexes, etc. TL;DR: use 0 for offloadable types. // #if defined(GASNET_SEGMENT_FAST) || defined(GASNET_SEGMENT_LARGE) #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_I32 0 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_U32 0 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_I64 0 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_U64 0 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_FLT 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_DBL 1 #else #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_I32 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_U32 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_I64 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_U64 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_FLT 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_DBL 1 #endif // 3. Hooks for conduit-specific extension to create and destroy // // These hooks are analogous to the following: // GASNETC_CLIENT_EXTRA_DECLS // GASNETC_CLIENT_INIT_HOOK // GASNETC_CLIENT_FINI_HOOK // GASNETC_SIZEOF_CLIENT_T // which are documented in template-conduit/gasnet_core_fwd.h #define GASNETC_AD_EXTRA_DECLS \ extern void gasnete_ucxratomic_init_hook(gasneti_AD_t); #define GASNETC_AD_INIT_HOOK(i_ad) gasnete_ucxratomic_init_hook(i_ad) //#define GASNETC_AD_FINI_HOOK(i_ad) (###) //#define GASNETC_SIZEOF_AD_T() (###) #endif // _GASNET_RATOMIC_FWD_H gasnet-2025.8.0/ucx-conduit/license.txt0000664000175000017500000000473115142313673020054 0ustar alastairalastairGlobal-Address Space Networking for Exascale (GASNet-EX) Copyright (c) 2000-2025, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. Mellanox Technologies LTD Copyright (c) 2021, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory, U.S. Dept. of Energy, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to Lawrence Berkeley National Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such enhancements or derivative works thereof, in binary and source code form. gasnet-2025.8.0/ucx-conduit/gasnet_core_help.h0000664000175000017500000000130215142313673021332 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/gasnet_core_help.h $ * Description: GASNet ucx conduit core Header Helpers (Internal code, not for client use) * Copyright 2002, Dan Bonachea * Copyright 2019, Mellanox Technologies LTD. All rights reserved. * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_HELP_H #define _GASNET_CORE_HELP_H #include #if defined(GASNET_SEGMENT_FAST) || defined(GASNET_SEGMENT_LARGE) #define GASNETC_PIN_SEGMENT 1 #else #define GASNETC_PIN_SEGMENT 0 #endif #endif gasnet-2025.8.0/ucx-conduit/Makefile.am0000664000175000017500000001123515142313673017722 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/template-conduit/Makefile.am $ # Description: Makefile for GASNet ucx conduit # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME=ucx # ## SSH bootstrap support (built unless fork() is unavailable) ## if HAVE_BOOTSTRAP_SSH ssh_defines = -DHAVE_SSH_SPAWNER ssh_srcdir = $(top_srcdir)/other/ssh-spawner ssh_sources = $(ssh_srcdir)/gasnet_bootstrap_ssh.c ssh_deps = $(ssh_srcdir)/*.[ch] endif ## ## MPI bootstrap support (optional) ## if HAVE_BOOTSTRAP_MPI mpi_defines = -DHAVE_MPI_SPAWNER mpi_srcdir = $(top_srcdir)/other/mpi-spawner mpi_deps = $(mpi_srcdir)/*.[ch] # We must compile this one object with MPI_CC. mpi_special_objs = $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o: force @MPI_CC@ @MPI_CFLAGS@ $(LIBDEFINES) $(CONDUIT_EXTRALIBCFLAGS) $(LIBINCLUDES) \ $(MANUAL_MPICFLAGS) -o $@ -c $(mpi_srcdir)/gasnet_bootstrap_mpi.c endif ## ## PMI bootstrap support (optional) ## if HAVE_BOOTSTRAP_PMI pmi_cppflags = -DHAVE_PMI_SPAWNER @PMI_SPAWNER_CFLAGS@ pmi_srcdir = $(top_srcdir)/other/pmi-spawner pmi_sources = $(pmi_srcdir)/gasnet_bootstrap_pmi.c pmi_deps = $(pmi_srcdir)/*.[ch] endif # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = contrib # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ license.txt \ gasnet_core.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h \ gasnet_core_sndrcv.c \ gasnet_ucx_req.h \ gasnet_extended.c \ gasnet_extended_fwd.h \ gasnet_ratomic.c \ gasnet_ratomic_fwd.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiler command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(srcdir)/gasnet_core_sndrcv.c \ $(srcdir)/gasnet_extended.c \ $(srcdir)/gasnet_ratomic.c \ $(ssh_sources) $(pmi_sources) # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = @UCX_CFLAGS@ $(ssh_defines) $(mpi_defines) $(pmi_cppflags) # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = gasnet_ucx_req.h # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = $(ssh_deps) $(mpi_deps) $(pmi_deps) # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = $(mpi_special_objs) # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time CONDUIT_KINDS = cuda_uva hip # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) CONDUIT_RUNCMD = @TOP_BUILDDIR@/ucx-conduit/contrib/gasnetrun_ucx -np %N %P %A # conduit-specific tests in ../tests directory CONDUIT_TESTS = # -------- Do not modify anything below this line -------- if BUILD_SEQ_LIBS libgasnet_ucx_seq_a_SOURCES = libraries_seq = libgasnet-ucx-seq.a endif if BUILD_PAR_LIBS libgasnet_ucx_par_a_SOURCES = libraries_par = libgasnet-ucx-par.a endif if BUILD_PARSYNC_LIBS libgasnet_ucx_parsync_a_SOURCES = libraries_parsync = libgasnet-ucx-parsync.a endif libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) include $(top_builddir)/other/Makefile-conduit.mak libgasnet-ucx-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-ucx-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-ucx-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync if USE_UCX_CONDUIT lib_LIBRARIES = $(libraries) all-local: $(lib_LIBRARIES) $(pkgconfig_files) clean-local: do-clean-local install-data-local: do-install-data-local uninstall-local: do-uninstall-local else $(top_srcdir)/gasnetex.h: do-error endif gasnet-2025.8.0/ucx-conduit/gasnet_core_internal.h0000664000175000017500000005321215142313673022225 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ucx-conduit/gasnet_core_internal.h $ * Description: GASNet ucx conduit header for internal definitions in Core API * Copyright 2002, Dan Bonachea * Copyright 2019-2020, Mellanox Technologies LTD. All rights reserved. * Terms of use are as specified in license.txt */ #ifndef _GASNET_CORE_INTERNAL_H #define _GASNET_CORE_INTERNAL_H #include #include #include /* whether or not to use spin-locking for HSL's */ #define GASNETC_HSL_SPINLOCK 1 /* ------------------------------------------------------------------------------------ */ #define _hidx_gasnetc_exit_reduce_reqh (GASNETC_HANDLER_BASE+0) #define _hidx_gasnetc_exit_role_reqh (GASNETC_HANDLER_BASE+1) #define _hidx_gasnetc_exit_role_reph (GASNETC_HANDLER_BASE+2) #define _hidx_gasnetc_exit_reqh (GASNETC_HANDLER_BASE+3) #define _hidx_gasnetc_exit_reph (GASNETC_HANDLER_BASE+4) /* add new core API handlers here and to the bottom of gasnet_core.c */ /* ------------------------------------------------------------------------------------ */ /* handler table (temporary global impl) */ extern gex_AM_Entry_t *gasnetc_handler; /* ------------------------------------------------------------------------------------ */ /* Configure gasnet_event_internal.h and gasnet_event.c */ // TODO-EX: prefix needs to move from "extended" to "core" // (###) Define as needed if iop counters should use something other than weakatomics: /* #define gasnete_op_atomic_(_id) gasnetc_atomic_##_id */ // (###) Define if conduit performs local-completion detection: /* #define GASNETE_HAVE_LC */ #define GASNETE_HAVE_LC /* Atomics wrappers * * Only for GASNETC_ANY_PAR do we need true atomics. * In particular neither PARSYNC nor CONN_THREAD introduce concurrency, * but use of "weak" atomics would pay the unnecessary costs for those. */ #if GASNET_PAR #define GASNETC_PARSEQ _PAR #define gasnetc_cons_atomic(_id) _CONCAT(gasneti_atomic_,_id) #else #define GASNETC_PARSEQ _SEQ #define gasnetc_cons_atomic(_id) _CONCAT(gasneti_nonatomic_,_id) #endif typedef gasnetc_cons_atomic(t) gasnetc_atomic_t; typedef gasnetc_cons_atomic(val_t) gasnetc_atomic_val_t; #define gasnetc_atomic_init gasnetc_cons_atomic(init) #define gasnetc_atomic_read gasnetc_cons_atomic(read) #define gasnetc_atomic_set gasnetc_cons_atomic(set) #define gasnetc_atomic_increment gasnetc_cons_atomic(increment) #define gasnetc_atomic_decrement_and_test gasnetc_cons_atomic(decrement_and_test) #define gasnetc_atomic_compare_and_swap gasnetc_cons_atomic(compare_and_swap) #define gasnetc_atomic_swap gasnetc_cons_atomic(swap) #define gasnetc_atomic_add gasnetc_cons_atomic(add) #define gasnetc_atomic_subtract gasnetc_cons_atomic(subtract) #define GASNETE_CONDUIT_EOP_FIELDS \ gasnetc_atomic_val_t initiated_cnt; \ gasnetc_atomic_t completed_cnt; \ gasnetc_atomic_val_t initiated_alc; \ gasnetc_atomic_t completed_alc; typedef void (*gasnetc_cbfunc_t)(gasnetc_atomic_val_t *); typedef struct { gasnetc_atomic_t completed; gasnetc_atomic_val_t initiated; } gasnetc_counter_t; #define GASNETC_COUNTER_INITIALIZER {gasnetc_atomic_init(0), 0} #define gasnetc_counter_inc(P) do { (P)->initiated++; } while (0) #define gasnetc_counter_done(P) (((P)->initiated & GASNETI_ATOMIC_MAX) == \ gasnetc_atomic_read(&(P)->completed, 0)) typedef enum { gasnetc_comptype_eop_alc, gasnetc_comptype_eop_get, gasnetc_comptype_eop_put } gasnetc_comptype_t; /* Callback functions in gasnet_core_sndrcv.c */ extern int gasnetc_complete_eop(gasnete_eop_t *eop, gasnetc_comptype_t type); /* eop: */ extern void gasnetc_cb_eop_alc(gasnetc_atomic_val_t *); extern void gasnetc_cb_eop_put(gasnetc_atomic_val_t *); extern void gasnetc_cb_eop_get(gasnetc_atomic_val_t *); /* iop within nbi-accessregion: */ extern void gasnetc_cb_nar_alc(gasnetc_atomic_val_t *); extern void gasnetc_cb_nar_put(gasnetc_atomic_val_t *); extern void gasnetc_cb_nar_get(gasnetc_atomic_val_t *); extern void gasnetc_cb_nar_rmw(gasnetc_atomic_val_t *); /* iop not in nbi-accessregion: */ extern void gasnetc_cb_iop_alc(gasnetc_atomic_val_t *); extern void gasnetc_cb_iop_put(gasnetc_atomic_val_t *); extern void gasnetc_cb_iop_get(gasnetc_atomic_val_t *); extern void gasnetc_cb_iop_rmw(gasnetc_atomic_val_t *); /* gasnetc_counter_t */ extern void gasnetc_cb_counter(gasnetc_atomic_val_t *cnt); extern void gasnetc_cb_counter_rel(gasnetc_atomic_val_t *cnt); extern void gasnetc_counter_wait(gasnetc_counter_t *counter, int handler_context GASNETI_THREAD_FARG); /* * Bootstrap support */ extern gasneti_spawnerfn_t const *gasneti_spawner; // Indirection allows use of the AM-based implementation after init extern void gasneti_bootstrapBarrier(void); extern void gasneti_bootstrapExchange(void *src, size_t len, void *dest); #define gasneti_bootstrapBroadcast (*(gasneti_spawner->Broadcast)) #define gasneti_bootstrapNbrhdBroadcast (*(gasneti_spawner->NbrhdBroadcast)) #define gasneti_bootstrapAlltoall (*(gasneti_spawner->Alltoall)) #define gasneti_bootstrapAbort (*(gasneti_spawner->Abort)) #define gasneti_bootstrapCleanup (*(gasneti_spawner->Cleanup)) #define gasneti_bootstrapFini (*(gasneti_spawner->Fini)) #if GASNET_PAR #define GASNETC_UCX_THREADS #endif /* check for exit in progress */ extern int gasnetc_exit_running; extern gasnete_threadidx_t gasnetc_exit_thread; #ifdef GASNETC_UCX_THREADS #define GASNETC_MY_THREADIDX (GASNETI_MYTHREAD->threadidx) #define GASNETC_LOCK_UCX() \ do { \ if ((gasneti_ucx_module.lock_tid == GASNETE_INVALID_THREADIDX) || \ gasneti_ucx_module.lock_tid != GASNETC_MY_THREADIDX) { \ gasneti_mutex_lock(&gasneti_ucx_module.ucp_worker_lock); \ gasneti_assert(!gasneti_ucx_module.lock_cnt); \ gasneti_ucx_module.lock_tid = GASNETC_MY_THREADIDX; \ } else { \ gasneti_assert(gasneti_ucx_module.lock_cnt); \ } \ gasneti_ucx_module.lock_cnt++; \ gasneti_assert(gasneti_ucx_module.lock_cnt); \ } while (0) #define GASNETC_UNLOCK_UCX() \ do { \ gasneti_assert(gasneti_ucx_module.lock_cnt); \ gasneti_assert(gasneti_ucx_module.lock_tid == GASNETC_MY_THREADIDX); \ gasneti_ucx_module.lock_cnt--; \ if (0 == gasneti_ucx_module.lock_cnt) { \ gasneti_ucx_module.lock_tid = GASNETE_INVALID_THREADIDX; \ gasneti_mutex_unlock(&gasneti_ucx_module.ucp_worker_lock); \ } \ } while (0) #define GASNETC_LOCK_ACQUIRE_REGULAR() \ do { \ GASNETC_LOCK_UCX(); \ if_pf (gasnetc_exit_running) { \ if (gasnetc_exit_thread != GASNETC_MY_THREADIDX) { \ GASNETC_UNLOCK_UCX(); \ gasnetc_exit_threads(); \ } \ } \ } while(0) #define GASNETC_LOCK_RELEASE_REGULAR() GASNETC_UNLOCK_UCX() #define GASNETC_LOCK_ACQUIRE(mode) \ do { \ switch(mode) { \ case GASNETC_LOCK_REGULAR: \ GASNETC_LOCK_ACQUIRE_REGULAR(); \ break; \ case GASNETC_LOCK_INLINE: \ break; \ } \ } while(0) #define GASNETC_LOCK_RELEASE(mode) \ do { \ switch(mode) { \ case GASNETC_LOCK_REGULAR: \ GASNETC_LOCK_RELEASE_REGULAR(); \ break; \ case GASNETC_LOCK_INLINE: \ break; \ } \ } while(0) #else #define GASNETC_LOCK_ACQUIRE(lmode) ((void)0) #define GASNETC_LOCK_RELEASE(lmode) ((void)0) #define GASNETC_LOCK_UCX() ((void)0) #define GASNETC_UNLOCK_UCX() ((void)0) #endif #if GASNET_DEBUG_VERBOSE #define GASNETC_UCX_DEBUG_PRINT(fmt, ...) \ do { \ gasneti_console_message("DEBUG", fmt "\n", ## __VA_ARGS__); \ } while (0) #else #define GASNETC_UCX_DEBUG_PRINT(fmt, ...) ((void)0) #endif /* AM message type */ typedef enum { GASNETC_UCX_AM_SHORT = 0, GASNETC_UCX_AM_MEDIUM, GASNETC_UCX_AM_LONG } gasnetc_ucx_am_type_t; typedef enum { GASNETC_LOCK_INLINE, GASNETC_LOCK_REGULAR } gasnetc_lock_mode_t; typedef void (*gasneti_list_item_free_fn)(void *); typedef struct gasneti_list_item_s { #if GASNET_DEBUG int magic; #endif struct gasneti_list_item_s *next, *prev; } gasneti_list_item_t; typedef struct gasneti_list_s { gasneti_list_item_t *head, *tail; size_t count; } gasneti_list_t; #define GASNETC_LIST_CLASS gasneti_list_item_t super typedef struct _gasnetc_mem_info { GASNETC_LIST_CLASS; void * buffer; size_t bsize; void * addr; size_t length; ucp_rkey_h rkey; ucp_mem_h mem_h; } gasnetc_mem_info_t; typedef struct _gasnet_ep_info { ucp_ep_h server_ep; ucp_address_t *ucx_addr; size_t ucx_addr_len; gasneti_list_t mem_tbl; } gasnet_ep_info_t; typedef struct _gasneti_ucx_module { ucp_context_h ucp_context; ucp_worker_h ucp_worker; gasneti_mutex_t ucp_worker_lock; gasnet_ep_info_t * ep_tbl; size_t request_size; gasneti_list_t sreq_free_req;// AM requests gasneti_list_t sreq_free_rep;// AM replies gasneti_list_t send_queue; /* list of pending send requests */ gasneti_list_t recv_queue; /* queue of pending to process reqs */ #if !GASNETC_PIN_SEGMENT gasneti_list_t rreq_free; /* pool of available recv reqs */ #endif #ifdef GASNETC_UCX_THREADS gasnete_threadidx_t lock_tid; /* thread id owner */ uint32_t lock_cnt; /* lock recursive counter */ #endif } gasneti_ucx_module_t; // Conduit-specific Segment type typedef struct gasnetc_Segment_t_ { GASNETI_SEGMENT_COMMON // conduit-indep part as prefix #if GASNETC_PIN_SEGMENT // memory registation info gasnetc_mem_info_t *mem_info; #endif } *gasnetc_Segment_t; typedef enum { gasnetc_rdma_op_put, gasnetc_rdma_op_get, } gasnetc_rdma_op_t; typedef ucs_status_ptr_t (*gasnetc_putget_fn_t)(ucp_ep_h ep, void *buffer, uint32_t nbytes, void *remote_addr, ucp_rkey_h rkey, ucp_send_callback_t cb); #define GASNETC_PUTGET_FNNAME(rop) gasnetc_##rop##_req #define GASNETC_PUTGET_FNDEF(rop) \ GASNETI_INLINE(GASNETC_PUTGET_FNNAME(rop)) \ ucs_status_ptr_t GASNETC_PUTGET_FNNAME(rop)(ucp_ep_h ep, void *buffer, \ uint32_t nbytes, void *remote_addr, ucp_rkey_h rkey,\ ucp_send_callback_t cb) \ { \ return ucp_##rop##_nb(ep, buffer, nbytes, (uint64_t)remote_addr, rkey, cb); \ } GASNETC_PUTGET_FNDEF(put) GASNETC_PUTGET_FNDEF(get) #define gasnetc_putget_fn(isput, ep, buffer, nbytes, addr, rkey, cb) \ (isput) ? GASNETC_PUTGET_FNNAME(put)(ep, buffer, nbytes, addr, rkey, cb) : \ GASNETC_PUTGET_FNNAME(get)(ep, buffer, nbytes, addr, rkey, cb) extern gasneti_ucx_module_t gasneti_ucx_module; #define GASNETC_UCX_GET_EP(_rank) \ gasneti_ucx_module.ep_tbl[_rank].server_ep; #define gasneti_mem_pack(_dst, _src, _len, _pad, _off) \ do { \ gasneti_assert(_pad ? (_pad >= _len) : 1); \ GASNETI_MEMCPY(((char*)(_dst)) + (_off), _src, _len); \ (_off) += (_pad > 0 ? _pad : _len); \ } while(0); #define gasneti_mem_unpack(_dst, _src, _len, _pad, _off) \ do { \ gasneti_assert(_pad ? (_pad >= _len) : 1); \ GASNETI_MEMCPY(_dst, ((char*)(_src)) + (_off), _len); \ (_off) += (_pad > 0 ? _pad : _len); \ } while(0); #define gasneti_rkey_unpack(_ep, _buf, _rkey_ptr) \ do { \ ucs_status_t status; \ status = ucp_ep_rkey_unpack(_ep, _buf, _rkey_ptr); \ if (status != UCS_OK) { \ gasneti_fatalerror("rkey unpack failed: %s", \ ucs_status_string(UCS_PTR_STATUS(status))); \ } \ } while(0); #define GASNETC_ADDR_IN_RANGE(seg_addr, seg_size, addr, len) \ ( ( ((uintptr_t)seg_addr) <= ((uintptr_t)addr) ) && \ ( ((uintptr_t)seg_addr) + (uintptr_t)seg_size >= \ (((uintptr_t)addr) + (uintptr_t)len) ) ) int gasnetc_AM_ReqRepGeneric(gasnetc_ucx_am_type_t am_type, gex_Rank_t jobrank, gex_AM_Index_t handler, gex_Event_t *lc_opt, gex_Flags_t flags, uint8_t is_request, int numargs, va_list argptr, void *src_addr, uint32_t nbytes, void *dst_addr GASNETI_THREAD_FARG); extern int gasnetc_poll_sndrcv(gasnetc_lock_mode_t lmode GASNETI_THREAD_FARG); extern void gasnetc_poll_snd(gasnetc_lock_mode_t lmode GASNETI_THREAD_FARG); extern void gasnetc_send_init(void); extern void gasnetc_send_fini(void); extern void gasnetc_ProcessRecv(void *buf, size_t size); extern void gasnetc_send_list_wait(gasnetc_lock_mode_t lmode GASNETI_THREAD_FARG); extern gasnetc_mem_info_t * gasnetc_find_mem_info(void *addr, int nbytes, gex_Rank_t rank); extern int gasnetc_ucx_putget_inner(int is_put, gex_Rank_t jobrank, void *buffer, uint32_t nbytes, void *remote_addr, gasnetc_atomic_val_t *local_cnt, gasnetc_cbfunc_t local_cb, gasnetc_atomic_val_t *remote_cnt, gasnetc_cbfunc_t remote_cb); int gasnetc_am_reqrep_inner(gasnetc_ucx_am_type_t am_type, gex_Rank_t jobrank, gex_AM_Index_t handler, gex_Flags_t flags, uint8_t is_request, int numargs, va_list argptr, void *src_addr, uint32_t nbytes, void *dst_addr, gasnetc_atomic_val_t *local_cnt, gasnetc_cbfunc_t local_cb GASNETI_THREAD_FARG); extern int gasnetc_RequestSysShort(gex_Rank_t jobrank, gasnetc_counter_t *counter, gex_AM_Index_t handler, int numargs, ...); extern int gasnetc_ReplySysShort(gex_Token_t token, gasnetc_counter_t *counter, gex_AM_Index_t handler, int numargs, ...); extern void gasnetc_exit_threads(void); /* List functions ============== */ #if GASNET_DEBUG #define GASNETI_LIST_MAGIC 0x54544545 #define GASNETI_DBG_LIST_ITEM_CHECK(item) \ do { \ gasneti_list_item_t *_item = (gasneti_list_item_t*)(item); \ gasneti_assert(_item); \ gasneti_assert(_item->magic == GASNETI_LIST_MAGIC); \ } while(0) #define GASNETI_DBG_LIST_ITEM_SET_MAGIC(item) \ do { \ gasneti_list_item_t *_item = (gasneti_list_item_t*)(item); \ gasneti_assert(_item); \ _item->magic = GASNETI_LIST_MAGIC; \ } while(0) #else #define GASNETI_DBG_LIST_ITEM_CHECK(item) ((void)0) #define GASNETI_DBG_LIST_ITEM_SET_MAGIC(item) ((void)0) #endif #define GASNETI_LIST_ITEM_ALLOC(item, type, reset_fn) \ do { \ void (*reset)(type *) = reset_fn; \ item = (type *) gasneti_malloc(sizeof(type)); \ if (NULL != reset) { \ reset(item); \ } \ GASNETI_DBG_LIST_ITEM_SET_MAGIC(item); \ } while(0) #define GASNETI_LIST_RESET(item) \ do { \ gasneti_list_item_t *_item = (gasneti_list_item_t*)(item); \ _item->next = NULL; \ _item->prev = NULL; \ } while(0); GASNETI_INLINE(gasneti_list_init) void gasneti_list_init(gasneti_list_t *list) { gasneti_assert(list); list->head = gasneti_malloc(sizeof(gasneti_list_item_t)); list->tail = gasneti_malloc(sizeof(gasneti_list_item_t)); #if GASNET_DEBUG list->head->magic = 0; list->tail->magic = 0; #endif list->head->next = list->tail; list->head->prev = NULL; list->tail->prev = list->head; list->tail->next = NULL; gasneti_assert(list->tail->prev); list->count = 0; } GASNETI_INLINE(gasneti_list_fini) void gasneti_list_fini(gasneti_list_t *list) { gasneti_assert(list); gasneti_assert(!list->count); gasneti_assert(list->head->next == list->tail); gasneti_assert(list->head == list->tail->prev); gasneti_free(list->head); gasneti_free(list->tail); /* protect the list */ list->head = NULL; list->tail = NULL; } GASNETI_INLINE(gasneti_list_enq) void gasneti_list_enq(gasneti_list_t *list, void *ptr) { gasneti_assert(list); GASNETI_DBG_LIST_ITEM_CHECK(ptr); gasneti_assert(list->tail->prev); gasneti_assert(list->head->next); gasneti_list_item_t *item = (gasneti_list_item_t*)ptr; /* setup connection to the previous elem */ item->prev = list->tail->prev; item->prev->next = item; /* setup connection to the dummy tail elem */ item->next = list->tail; list->tail->prev = item; /* increase element count */ list->count++; } GASNETI_INLINE(gasneti_list_deq) gasneti_list_item_t *gasneti_list_deq(gasneti_list_t *list) { gasneti_assert(list); gasneti_assert(list->tail->prev); gasneti_assert(list->head->next); gasneti_list_item_t *item = list->head->next; if (item == list->tail) { return NULL; } list->head->next = item->next; item->next->prev = list->head; item->next = NULL; item->prev = NULL; list->count--; return item; } GASNETI_INLINE(gasneti_list_head) void *gasneti_list_head(gasneti_list_t *list) { gasneti_assert(list); gasneti_assert(list->tail->prev); gasneti_assert(list->head->next); if_pf (!list->count) { return NULL; } GASNETI_DBG_LIST_ITEM_CHECK(list->head->next); return list->head->next; } GASNETI_INLINE(gasneti_list_size) size_t gasneti_list_size(gasneti_list_t *list) { gasneti_assert(list); return list->count; } GASNETI_INLINE(gasneti_list_rem) void *gasneti_list_rem(gasneti_list_t *list, void *ptr) { gasneti_list_item_t *item = (gasneti_list_item_t*)ptr; gasneti_assert(list); GASNETI_DBG_LIST_ITEM_CHECK(item); if ((list->head == item) || (list->tail == item)) { return NULL; } item->prev->next = item->next; item->next->prev = item->prev; /* protect the list */ item->next = item->prev = NULL; list->count--; return item; } #define GASNETI_LIST_POP(list, type) \ (gasneti_list_size(list) ? (type*) gasneti_list_deq(list) : (type*) NULL) #define GASNETI_LIST_FOREACH(item, list, type) \ for (item = (type *) (list)->head->next; \ item != (type *) (list)->tail; \ item = (type *) ((gasneti_list_item_t *) (item))->next) #endif // _GASNET_CORE_INTERNAL_H gasnet-2025.8.0/ucx-conduit/Makefile.in0000664000175000017500000007652615142313673017751 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/template-conduit/Makefile.am $ # Description: Makefile for GASNet ucx conduit # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = ucx-conduit ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = conduit.mak CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libgasnet_ucx_par_a_AR = $(AR) $(ARFLAGS) libgasnet_ucx_par_a_LIBADD = am_libgasnet_ucx_par_a_OBJECTS = libgasnet_ucx_par_a_OBJECTS = $(am_libgasnet_ucx_par_a_OBJECTS) libgasnet_ucx_parsync_a_AR = $(AR) $(ARFLAGS) libgasnet_ucx_parsync_a_LIBADD = am_libgasnet_ucx_parsync_a_OBJECTS = libgasnet_ucx_parsync_a_OBJECTS = \ $(am_libgasnet_ucx_parsync_a_OBJECTS) libgasnet_ucx_seq_a_AR = $(AR) $(ARFLAGS) libgasnet_ucx_seq_a_LIBADD = am_libgasnet_ucx_seq_a_OBJECTS = libgasnet_ucx_seq_a_OBJECTS = $(am_libgasnet_ucx_seq_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgasnet_ucx_par_a_SOURCES) \ $(libgasnet_ucx_parsync_a_SOURCES) \ $(libgasnet_ucx_seq_a_SOURCES) DIST_SOURCES = $(libgasnet_ucx_par_a_SOURCES) \ $(libgasnet_ucx_parsync_a_SOURCES) \ $(libgasnet_ucx_seq_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/conduit.mak.in \ $(top_srcdir)/config-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME = ucx # @HAVE_BOOTSTRAP_SSH_TRUE@ssh_defines = -DHAVE_SSH_SPAWNER @HAVE_BOOTSTRAP_SSH_TRUE@ssh_srcdir = $(top_srcdir)/other/ssh-spawner @HAVE_BOOTSTRAP_SSH_TRUE@ssh_sources = $(ssh_srcdir)/gasnet_bootstrap_ssh.c @HAVE_BOOTSTRAP_SSH_TRUE@ssh_deps = $(ssh_srcdir)/*.[ch] @HAVE_BOOTSTRAP_MPI_TRUE@mpi_defines = -DHAVE_MPI_SPAWNER @HAVE_BOOTSTRAP_MPI_TRUE@mpi_srcdir = $(top_srcdir)/other/mpi-spawner @HAVE_BOOTSTRAP_MPI_TRUE@mpi_deps = $(mpi_srcdir)/*.[ch] # We must compile this one object with MPI_CC. @HAVE_BOOTSTRAP_MPI_TRUE@mpi_special_objs = $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o @HAVE_BOOTSTRAP_PMI_TRUE@pmi_cppflags = -DHAVE_PMI_SPAWNER @PMI_SPAWNER_CFLAGS@ @HAVE_BOOTSTRAP_PMI_TRUE@pmi_srcdir = $(top_srcdir)/other/pmi-spawner @HAVE_BOOTSTRAP_PMI_TRUE@pmi_sources = $(pmi_srcdir)/gasnet_bootstrap_pmi.c @HAVE_BOOTSTRAP_PMI_TRUE@pmi_deps = $(pmi_srcdir)/*.[ch] # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = contrib # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ license.txt \ gasnet_core.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h \ gasnet_core_sndrcv.c \ gasnet_ucx_req.h \ gasnet_extended.c \ gasnet_extended_fwd.h \ gasnet_ratomic.c \ gasnet_ratomic_fwd.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiler command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(srcdir)/gasnet_core_sndrcv.c \ $(srcdir)/gasnet_extended.c \ $(srcdir)/gasnet_ratomic.c \ $(ssh_sources) $(pmi_sources) # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = @UCX_CFLAGS@ $(ssh_defines) $(mpi_defines) $(pmi_cppflags) # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = gasnet_ucx_req.h # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = $(ssh_deps) $(mpi_deps) $(pmi_deps) # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = $(mpi_special_objs) # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time CONDUIT_KINDS = cuda_uva hip # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) CONDUIT_RUNCMD = @TOP_BUILDDIR@/ucx-conduit/contrib/gasnetrun_ucx -np %N %P %A # conduit-specific tests in ../tests directory CONDUIT_TESTS = # -------- Do not modify anything below this line -------- @BUILD_SEQ_LIBS_TRUE@libgasnet_ucx_seq_a_SOURCES = @BUILD_SEQ_LIBS_TRUE@libraries_seq = libgasnet-ucx-seq.a @BUILD_PAR_LIBS_TRUE@libgasnet_ucx_par_a_SOURCES = @BUILD_PAR_LIBS_TRUE@libraries_par = libgasnet-ucx-par.a @BUILD_PARSYNC_LIBS_TRUE@libgasnet_ucx_parsync_a_SOURCES = @BUILD_PARSYNC_LIBS_TRUE@libraries_parsync = libgasnet-ucx-parsync.a libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) @USE_UCX_CONDUIT_TRUE@lib_LIBRARIES = $(libraries) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ucx-conduit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign ucx-conduit/Makefile $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): conduit.mak: $(top_builddir)/config.status $(srcdir)/conduit.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ if test -f $$p; then \ $(am__strip_dir) \ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive @USE_UCX_CONDUIT_FALSE@all-local: all-am: Makefile $(LIBRARIES) all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @USE_UCX_CONDUIT_FALSE@clean-local: @USE_UCX_CONDUIT_FALSE@install-data-local: @USE_UCX_CONDUIT_FALSE@uninstall-local: clean: clean-recursive clean-am: clean-generic clean-libLIBRARIES clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLIBRARIES uninstall-local .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am clean clean-generic clean-libLIBRARIES \ clean-local cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLIBRARIES uninstall-local .PRECIOUS: Makefile @HAVE_BOOTSTRAP_MPI_TRUE@$(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o: force @HAVE_BOOTSTRAP_MPI_TRUE@ @MPI_CC@ @MPI_CFLAGS@ $(LIBDEFINES) $(CONDUIT_EXTRALIBCFLAGS) $(LIBINCLUDES) \ @HAVE_BOOTSTRAP_MPI_TRUE@ $(MANUAL_MPICFLAGS) -o $@ -c $(mpi_srcdir)/gasnet_bootstrap_mpi.c include $(top_builddir)/other/Makefile-conduit.mak libgasnet-ucx-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-ucx-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-ucx-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync @USE_UCX_CONDUIT_TRUE@all-local: $(lib_LIBRARIES) $(pkgconfig_files) @USE_UCX_CONDUIT_TRUE@clean-local: do-clean-local @USE_UCX_CONDUIT_TRUE@install-data-local: do-install-data-local @USE_UCX_CONDUIT_TRUE@uninstall-local: do-uninstall-local @USE_UCX_CONDUIT_FALSE@$(top_srcdir)/gasnetex.h: do-error # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/gasnet_diagnostic.c0000664000175000017500000020067015142313673017260 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_diagnostic.c $ * Description: GASNet internal diagnostics * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include /* filthy hack to allow simultaneous use of gasnet-internal and test.h facilities */ #undef malloc #undef calloc #undef realloc #undef free #undef strdup #undef strndup #undef assert #define TEST_OMIT_CONFIGSTRINGS 1 #include <../tests/test.h> /* this file should *only* contain symbols used for internal diagnostics, so that we can avoid needlessly linking it into production executables everything except the main entry point should be static, to prevent namespace pollution */ GASNETT_IDENT(gasneti_IdentString_diagnostics, "$GASNetDiagnostics: () INCLUDES gasnet_diagnostic.o $"); #if GASNET_PAR static void * thread_fn(void *arg); #endif static int num_threads = 1; static int peer = -1; static void * myseg = NULL; static void * peerseg = NULL; static int iters = 0; static int iters0 = 0; static int iters2 = 0; #define gasneti_diag_hidx_base 128 #define gasnetc_diag_hidx_base 160 #define gasnete_diag_hidx_base 200 static int gasneti_diag_havehandlers = 0; /* true iff caller has registered our handler table */ static int id = 0; #define TEST_HEADER(desc) \ PTHREAD_BARRIER(num_threads); \ if (!id) TEST_SECTION_BEGIN(); \ PTHREAD_BARRIER(num_threads); \ if (TEST_SECTION_ENABLED() && \ (MSG0("%c: %s %s...",TEST_SECTION_NAME(), \ (num_threads > 1?"parallel":"sequential"),desc),1)) #ifdef GASNETC_DIAGNOSTICS_SETUP GASNETC_DIAGNOSTICS_SETUP /* can include helper source files, etc */ #endif #ifdef GASNETE_DIAGNOSTICS_SETUP GASNETE_DIAGNOSTICS_SETUP /* can include helper source files, etc */ #endif #ifndef GASNETC_RUN_DIAGNOSTICS_SEQ #define GASNETC_RUN_DIAGNOSTICS_SEQ(iters) (0) #endif #ifndef GASNETC_RUN_DIAGNOSTICS_PAR #define GASNETC_RUN_DIAGNOSTICS_PAR(iters,threadid,numthreads) (0) #endif #ifndef GASNETE_RUN_DIAGNOSTICS_SEQ #define GASNETE_RUN_DIAGNOSTICS_SEQ(iters) (0) #endif #ifndef GASNETE_RUN_DIAGNOSTICS_PAR #define GASNETE_RUN_DIAGNOSTICS_PAR(iters,threadid,numthreads) (0) #endif /* ------------------------------------------------------------------------------------ */ /* misc sequential tests */ #if GASNET_DEBUG extern gasneti_auxseg_request_t gasneti_auxseg_dummy(gasnet_seginfo_t *auxseg_info); static void auxseg_test(void) { BARRIER(); TEST_HEADER("auxseg test") { gasneti_auxseg_dummy((void *)(uintptr_t)-1); /* call self-test */ } } #else #define auxseg_test() TEST_HEADER("auxseg test - SKIPPED") do { } while(0) #endif static void mutex_test(int id); static void rwlock_test(int id); static void spinlock_test(int id); static void cond_test(int id); static void semaphore_test(int id); static void lifo_test(int id); static void atomic128_test(int id); static void malloc_test(int id); static void progressfns_test(int id); static void op_test(int id); static void spawner_test(void); static void hbarrier_test(void); static void rexchgv_test(void); static void vlide_test(void); static gex_TM_t myteam; /* ------------------------------------------------------------------------------------ */ /* run iters iterations of diagnostics and return zero on success must be called collectively by exactly one thread on each node in par mode, the test may internally spawn up to threadcnt threads */ extern int gasneti_run_diagnostics(int iter_cnt, int threadcnt, const char *testsections, gex_TM_t myteam_arg, void *myseg_arg, gex_Rank_t peer_arg, void *peerseg_arg, unsigned int seed_arg) { test_errs = 0; iters = iter_cnt; iters2 = (iters <= INT_MAX/100) ? iters*100 : iters; iters0 = MAX(1,iters/100); gex_Rank_t mynode = gex_TM_QueryRank(myteam_arg); gex_Rank_t nnodes = gex_TM_QuerySize(myteam_arg); myteam = myteam_arg; myseg = myseg_arg; peer = peer_arg; peerseg = peerseg_arg; TEST_SRAND(seed_arg); #if !GASNET_SEGMENT_EVERYTHING for (gex_Rank_t rank =0; rank < nnodes; rank++) { void *owneraddr; void *localaddr; uintptr_t size; GASNET_Safe(gex_Segment_QueryBound(myteam_arg, rank, &owneraddr, &localaddr, &size)); gasneti_assert_always_uint(size ,>=, TEST_SEGSZ); gasneti_assert_always_uint((((uintptr_t)owneraddr) % PAGESZ) ,==, 0); gasneti_assert_always_uint((((uintptr_t)localaddr) % PAGESZ) ,==, 0); if (rank == mynode) { gasneti_assert_always_ptr(owneraddr ,==, localaddr); gasneti_assert_always_ptr(owneraddr ,==, myseg); } else if (rank == peer) { gasneti_assert_always_ptr(owneraddr ,==, peerseg); } } #endif if (testsections) TEST_SECTION_PARSE(testsections); gasneti_assert_always(gasneti_THUNK_TM == myteam); gasneti_assert_always(gasneti_THUNK_EP == gex_TM_QueryEP(myteam)); gasneti_assert_always(gasneti_THUNK_CLIENT == gex_TM_QueryClient(myteam)); gasneti_assert_always(gasneti_THUNK_SEGMENT == gex_EP_QuerySegment(gex_TM_QueryEP(myteam))); TEST_GENERICS_WARNING(); auxseg_test(); BARRIER(); TEST_HEADER("malloc test") malloc_test(0); BARRIER(); TEST_HEADER("gasneti_mutex_t test") mutex_test(0); BARRIER(); TEST_HEADER("gasneti_cond_t test") cond_test(0); BARRIER(); TEST_HEADER("gasneti_rwlock_t test") rwlock_test(0); BARRIER(); spinlock_test(0); BARRIER(); semaphore_test(0); BARRIER(); atomic128_test(0); BARRIER(); lifo_test(0); BARRIER(); progressfns_test(0); BARRIER(); op_test(0); BARRIER(); TEST_HEADER("conduit tests") { BARRIER(); test_errs += GASNETC_RUN_DIAGNOSTICS_SEQ(iters); BARRIER(); test_errs += GASNETE_RUN_DIAGNOSTICS_SEQ(iters); } BARRIER(); #if HAVE_SSH_SPAWNER || HAVE_MPI_SPAWNER || HAVE_PMI_SPAWNER spawner_test(); BARRIER(); #endif TEST_HEADER("host-scoped barrier test") hbarrier_test(); TEST_HEADER("RotatedExchangeV test") rexchgv_test(); TEST_HEADER("VLIDE test") vlide_test(); #if GASNET_PAR num_threads = threadcnt; MSG0("spawning %i threads...", num_threads); test_createandjoin_pthreads(num_threads, &thread_fn, NULL, 0); #endif BARRIER(); MSG0("GASNet internal diagnostics complete."); return test_errs; } #undef MSG0 #undef ERR #define MSG0 THREAD_MSG0(id) #define ERR THREAD_ERR(id) /* ------------------------------------------------------------------------------------ */ /* mixed parallel / sequential tests */ /* ------------------------------------------------------------------------------------ */ static void malloc_test(int id) { int i, cnt = 0; int maxobjs; void **ptrs; gasneti_heapstats_t stats_before, stats_after; /* try to trigger any warm-up allocations potentially caused by barrier */ if (id == 0) { /* each node takes a turn being a late arrival */ for (i=0; i < gasneti_nodes; i++) { if (i == gasneti_mynode) { uint64_t goal = gasnett_ticks_to_us(gasnett_ticks_now()) + 100000; /* 0.1s */ while (gasnett_ticks_to_us(gasnett_ticks_now()) < goal) { gasnett_sched_yield(); } } BARRIER(); } } for (i=0; i < num_threads; i++) { if (i == id) BARRIER(); /* each thread gets a chance */ PTHREAD_LOCALBARRIER(num_threads); } // bug 2788: try to isolate this test from conduit allocations that may take place during global barrier sleep(1); gasnet_AMPoll(); PTHREAD_LOCALBARRIER(num_threads); if (!id) gasneti_getheapstats(&stats_before); PTHREAD_LOCALBARRIER(num_threads); gasneti_memcheck_all(); ptrs = gasneti_malloc_allowfail(8); gasneti_assert_always(ptrs); gasneti_free(ptrs); ptrs = gasneti_realloc(NULL,8); gasneti_assert_always(ptrs); gasneti_free(ptrs); gasneti_free(NULL); PTHREAD_LOCALBARRIER(num_threads); maxobjs = MIN(iters0,10000/num_threads); ptrs = gasneti_calloc(maxobjs,sizeof(void*)); for (i = 0; i < maxobjs; i++) gasneti_assert_always(ptrs[i] == NULL); for (i = 0; i < iters/num_threads; i++) { gasneti_memcheck_one(); if (cnt == maxobjs || (cnt > 0 && TEST_RAND_ONEIN(2))) { size_t idx = TEST_RAND(0,cnt-1); gasneti_assert_always(ptrs[idx]); gasneti_memcheck(ptrs[idx]); if (TEST_RAND_ONEIN(2)) { gasneti_free(ptrs[idx]); cnt--; ptrs[idx] = ptrs[cnt]; ptrs[cnt] = NULL; } else { ptrs[idx] = gasneti_realloc(ptrs[idx],TEST_RAND(1,16*1024)); } } else { void *p; if (TEST_RAND_ONEIN(2)) { p = gasneti_malloc(TEST_RAND(1,1024)); } else { p = gasneti_calloc(1,TEST_RAND(1,1024)); } if (TEST_RAND_ONEIN(4)) { gasneti_leak(p); } gasneti_memcheck(p); gasneti_assert_always(p); gasneti_assert_always(ptrs[cnt] == NULL); ptrs[cnt] = p; cnt++; } } gasneti_memcheck_all(); for (i = 0; i < cnt; i++) { gasneti_free(ptrs[i]); } gasneti_free(ptrs); gasneti_memcheck_all(); PTHREAD_LOCALBARRIER(num_threads); for (i = 0; i < iters/num_threads; i++) { int alignsz; for (alignsz = 1; alignsz < MIN(GASNET_PAGESIZE,64*1024); alignsz *= 2) { size_t sz = TEST_RAND(1,alignsz*2); char * p = gasneti_malloc_aligned(alignsz,sz); gasneti_assert_always(p); gasneti_assert_always_uint((((uintptr_t)p) & (alignsz-1)) ,==, 0); p[0] = 'x'; p[sz - 1] = 'y'; if (TEST_RAND_ONEIN(4)) { gasneti_leak_aligned(p); } gasneti_free_aligned(p); } } gasneti_memcheck_all(); PTHREAD_LOCALBARRIER(num_threads); if (!id) { gasneti_getheapstats(&stats_after); #if GASNET_DEBUG { #if GASNETI_CONDUIT_THREADS double tol = 0.1; /* allow for some heap change if a conduit thread is around */ #else double tol = 0; /* we have all the threads, and nothing else should be allocating */ #endif int64_t delta_bytes = (int64_t)stats_before.live_bytes - (int64_t)stats_after.live_bytes; int64_t delta_objects = (int64_t)stats_before.live_objects - (int64_t)stats_after.live_objects; if (delta_bytes < 0) delta_bytes = -delta_bytes; if (delta_objects < 0) delta_objects = -delta_objects; if (delta_bytes/(double)stats_after.live_bytes > tol || delta_objects/(double)stats_after.live_objects > tol) MSG("ERROR: unexpected heap size change:\n" " stats_before.live_bytes=%"PRIu64" stats_after.live_bytes=%"PRIu64"\n" " stats_before.live_objects=%"PRIu64" stats_after.live_objects=%"PRIu64, stats_before.live_bytes, stats_after.live_bytes, stats_before.live_objects, stats_after.live_objects); } #endif } sleep(1); PTHREAD_BARRIER(num_threads); } /* ------------------------------------------------------------------------------------ */ static void cond_test(int id) { static gasneti_cond_t cond1 = GASNETI_COND_INITIALIZER; static gasneti_cond_t cond2; static gasneti_mutex_t lock1 = GASNETI_MUTEX_INITIALIZER; static uint32_t done = 0; int i; PTHREAD_BARRIER(num_threads); if (!id) { gasneti_cond_init(&cond2); gasneti_cond_destroy(&cond2); gasneti_cond_init(&cond2); gasneti_mutex_lock(&lock1); gasneti_cond_signal(&cond1); gasneti_cond_signal(&cond2); gasneti_cond_broadcast(&cond1); gasneti_cond_broadcast(&cond2); gasneti_mutex_unlock(&lock1); } PTHREAD_BARRIER(num_threads); if (!id) { /* awake thread */ for (i = 0; i < iters2; i++) { gasneti_mutex_lock(&lock1); if (i&1) { gasneti_cond_signal(&cond1); } else { gasneti_cond_broadcast(&cond1); } gasneti_mutex_unlock(&lock1); if (TEST_RAND_ONEIN(iters)) gasnett_sched_yield(); } gasneti_mutex_lock(&lock1); done = 1; gasneti_cond_broadcast(&cond1); gasneti_mutex_unlock(&lock1); } else { gasneti_mutex_lock(&lock1); while (!done) { gasneti_mutex_assertlocked(&lock1); gasneti_cond_wait(&cond1, &lock1); } gasneti_mutex_unlock(&lock1); gasneti_mutex_assertunlocked(&lock1); } PTHREAD_BARRIER(num_threads); } /* ------------------------------------------------------------------------------------ */ static void mutex_test(int id) { static gasneti_mutex_t lock1 = GASNETI_MUTEX_INITIALIZER; static gasneti_mutex_t lock2; static unsigned int counter; unsigned int count = iters2 / num_threads; int i; PTHREAD_BARRIER(num_threads); if (!id) { for (i=0; i<10; i++) { gasneti_mutex_assertunlocked(&lock1); gasneti_mutex_lock(&lock1); gasneti_mutex_assertlocked(&lock1); gasneti_mutex_unlock(&lock1); gasneti_mutex_assertunlocked(&lock1); gasneti_assert_always_int(gasneti_mutex_trylock(&lock1) ,==, GASNET_OK); gasneti_mutex_assertlocked(&lock1); gasneti_mutex_unlock(&lock1); gasneti_mutex_init(&lock2); gasneti_mutex_assertunlocked(&lock2); gasneti_mutex_lock(&lock2); gasneti_mutex_assertlocked(&lock2); gasneti_mutex_unlock(&lock2); gasneti_mutex_assertunlocked(&lock2); gasneti_mutex_destroy(&lock2); } counter = 0; } PTHREAD_BARRIER(num_threads); for (i=0;i= 0; j--) { check[j]++; } numwrites[id]++; } if (!writer) { /* read lock */ if (i & 1) { int retval; for (int t = 0; t < 100; t++) { // bounded try loop retval = gasneti_rwlock_tryrdlock(&lock1); if (!retval) break; // success gasneti_assert_always_int(retval ,==, EBUSY); } if (retval == EBUSY) gasneti_rwlock_rdlock(&lock1); // gave up on try, block instead } else { gasneti_rwlock_rdlock(&lock1); } gasneti_rwlock_assertrdlocked(&lock1); } { /* read-only check */ const unsigned int val = check[0]; /* try to detect a concurrent writer */ int k; for (j=0; j < 10; j++) { for (k=0; k < NUMCHECK; k++) { unsigned int cv = check[k]; if_pf (cv != val) ERR("failed rwlock test: check[%i]=%i expecting=%i", k, cv, val); } } } gasneti_rwlock_unlock(&lock1); } PTHREAD_BARRIER(num_threads); if (!id) { /* final verification */ int sum = 0; for (i=0; i < num_threads; i++) sum += numwrites[i]; gasneti_assert_always(sum > 0); for (i=0; i < NUMCHECK; i++) { unsigned int cv = check[i]; if_pf (cv != sum) ERR("failed rwlock test: check[%i]=%i expecting=%i", i, cv, sum); } gasneti_free(numwrites); } PTHREAD_BARRIER(num_threads); } /* ------------------------------------------------------------------------------------ */ #if GASNETI_HAVE_SPINLOCK static void spinlock_test(int id) { static gasneti_atomic_t lock1 = GASNETI_SPINLOCK_INITIALIZER; static gasneti_atomic_t lock2; static unsigned int counter; unsigned int count = iters2 / num_threads; int i; PTHREAD_BARRIER(num_threads); TEST_HEADER("spinlock test"); else return; if (!id) { gasneti_spinlock_lock(&lock1); gasneti_spinlock_unlock(&lock1); gasneti_assert_always_int(gasneti_spinlock_trylock(&lock1) ,==, GASNET_OK); gasneti_spinlock_unlock(&lock1); gasneti_spinlock_init(&lock2); gasneti_spinlock_lock(&lock2); gasneti_spinlock_unlock(&lock2); gasneti_spinlock_destroy(&lock2); gasneti_spinlock_init(&lock2); counter = 0; } PTHREAD_BARRIER(num_threads); for (i=0;i= 64) ? (one64<<(i-64)) : 0; gasneti_atomic128_set(var128, tmphi, tmplo, 0); gasneti_atomic128_read(&readhi, &readlo, var128, 0); if ((readlo != tmplo) || (readhi != tmphi)) ERR("gasneti_atomic128_set/gasneti_atomic128_read got wrong value on bit %i", i); if (gasneti_atomic128_compare_and_swap(var128, 0, 0, tmphi, tmplo, 0)) ERR("gasneti_atomic128_compare_and_swap succeeded at bit %i when it should have failed", i); if (!gasneti_atomic128_compare_and_swap(var128, tmphi, tmplo, 0, 0, 0)) ERR("gasneti_atomic128_compare_and_swap failed at bit %i when it should have succeeded", i); } /* double bit-marching tests */ for (i=0;i<128;i++) { int j; for (j=0;j= 64) ? (one64<<(i-64)) : 0; const uint64_t tmplo_j = (j < 64) ? (one64<= 64) ? (one64<<(j-64)) : 0; const uint64_t tmplo = tmplo_i | tmplo_j; const uint64_t tmphi = tmphi_i | tmphi_j; gasneti_atomic128_set(var128, tmphi, tmplo, 0); if (gasneti_atomic128_compare_and_swap(var128, tmphi_i, tmplo_i, tmphi, tmplo, 0) || gasneti_atomic128_compare_and_swap(var128, tmphi_j, tmplo_j, tmphi, tmplo, 0)) ERR("gasneti_atomic128_compare_and_swap succeeded at bits %i and %i when it should have failed", i, j); } } gasneti_atomic128_set(var128, iters, 0, 0); for (i=0;i 0); gasneti_assert_always(cnt_b > 0); /* disable progress fns and quiesce the system */ PTHREAD_BARRIER(num_threads); if (!id) GASNETI_PROGRESSFNS_DISABLE(gasneti_pf_debug_boolean,BOOLEAN); GASNETI_PROGRESSFNS_DISABLE(gasneti_pf_debug_counted,COUNTED); PTHREAD_BARRIER(num_threads); for (i=0; i < 1000; i++) { gasnet_AMPoll(); gasneti_sched_yield(); } if (!id) gex_Event_WaitAll(pf_events, pf_event_cnt, 0); PTHREAD_BARRIER(num_threads); cnt_c = pf_cnt_counted; cnt_b = pf_cnt_boolean; PTHREAD_BARRIER(num_threads); // (again) do some work that might cause progress fns to run // these use only the lower halves of the segments for (i=0; i < 2; i++) { int tmp = 42; gex_RMA_PutBlocking(myteam, peer, rem_buf, &tmp, sizeof(tmp), 0); gex_RMA_GetBlocking(myteam, &tmp, peer, rem_buf, sizeof(tmp), 0); gex_RMA_PutBlocking(myteam, peer, rem_buf, loc_buf, 1024, 0); gex_RMA_GetBlocking(myteam, loc_buf, peer, rem_buf, 1024, 0); gasnet_AMPoll(); } PTHREAD_BARRIER(num_threads); /* ensure they did not run */ gasneti_assert_always_int(cnt_c ,==, pf_cnt_counted); gasneti_assert_always_int(cnt_b ,==, pf_cnt_boolean); } GASNET_BLOCKUNTIL(gasneti_weakatomic_read(&progressfn_req_sent,0) == gasneti_weakatomic_read(&progressfn_rep_rcvd,0)); #endif } /* ------------------------------------------------------------------------------------ */ static void noop_reqh(gex_Token_t token, void *buf, size_t nbytes) { /* empty */ } static void op_test(int id) { int iter; GASNET_BEGIN_FUNCTION(); PTHREAD_BARRIER(num_threads); TEST_HEADER("internal op interface test"); else return; size_t max_medium = gasnetc_AM_MaxRequestMedium(myteam,peer,GEX_EVENT_GROUP,0,0); size_t max_long = gasnetc_AM_MaxRequestLong(myteam,peer,GEX_EVENT_GROUP,0,0); for (iter=0; iter < iters0; iter++) { static const void **share = NULL; int peerid = ( id + 1 ) % num_threads; PTHREAD_BARRIER(num_threads); gex_NBI_Wait(GEX_EC_ALL,0); PTHREAD_LOCALBARRIER(num_threads); if (!id) share = test_malloc(sizeof(void *)*num_threads); PTHREAD_LOCALBARRIER(num_threads); { gasneti_eop_t *eop; gex_Event_t h; eop = gasneti_eop_create(GASNETI_THREAD_PASS_ALONE); gasneti_assert_always(eop); h = gasneti_eop_to_event(eop); gasneti_assert_always_int(gex_Event_Test(h) ,==, GASNET_ERR_NOT_READY); share[id] = eop; /* hand-off eop to neighbor thread */ PTHREAD_LOCALBARRIER(num_threads); gasneti_eop_markdone(share[peerid]); /* mark right neighbor's eop done */ PTHREAD_LOCALBARRIER(num_threads); gasneti_assert_always_int(gex_Event_Test(h) ,==, GASNET_OK); } PTHREAD_LOCALBARRIER(num_threads); { /* inc the get and put counts on my iop */ gasneti_iop_t *iop = gasneti_iop_register(1, 0 GASNETI_THREAD_PASS); gasneti_assert_always(iop); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_PUT,0) ,==, GASNET_ERR_NOT_READY); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_GET,0) ,==, GASNET_OK); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_ALL,0) ,==, GASNET_ERR_NOT_READY); gasneti_assert_always_ptr(iop ,==, gasneti_iop_register(2, 1 GASNETI_THREAD_PASS)); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_PUT,0) ,==, GASNET_ERR_NOT_READY); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_GET,0) ,==, GASNET_ERR_NOT_READY); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_ALL,0) ,==, GASNET_ERR_NOT_READY); share[id] = iop; /* hand-off iop to neighbor thread */ PTHREAD_LOCALBARRIER(num_threads); gasneti_iop_markdone(share[peerid], 1, 0); /* mark right neighbor's iop puts done */ PTHREAD_LOCALBARRIER(num_threads); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_PUT,0) ,==, GASNET_OK); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_GET,0) ,==, GASNET_ERR_NOT_READY); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_ALL,0) ,==, GASNET_ERR_NOT_READY); PTHREAD_LOCALBARRIER(num_threads); gasneti_iop_markdone(share[peerid], 2, 1); /* mark right neighbor's iop gets done */ PTHREAD_LOCALBARRIER(num_threads); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_PUT,0) ,==, GASNET_OK); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_GET,0) ,==, GASNET_OK); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_ALL,0) ,==, GASNET_OK); } PTHREAD_LOCALBARRIER(num_threads); { int isget; for (isget = 0; isget <= 1; isget++) { #define ASSERT_NBI_SYNCED() do { \ gasneti_assert_always_int(gex_NBI_Test(GEX_EC_PUT,0) ,==, GASNET_OK); \ gasneti_assert_always_int(gex_NBI_Test(GEX_EC_GET,0) ,==, GASNET_OK); \ gasneti_assert_always_int(gex_NBI_Test(GEX_EC_ALL,0) ,==, GASNET_OK); \ } while (0) #define ASSERT_NBI_NOTSYNCED() do { \ if (isget) { \ gasneti_assert_always_int(gex_NBI_Test(GEX_EC_PUT,0) ,==, GASNET_OK); \ gasneti_assert_always_int(gex_NBI_Test(GEX_EC_GET,0) ,==, GASNET_ERR_NOT_READY); \ gasneti_assert_always_int(gex_NBI_Test(GEX_EC_ALL,0) ,==, GASNET_ERR_NOT_READY); \ } else { \ gasneti_assert_always_int(gex_NBI_Test(GEX_EC_PUT,0) ,==, GASNET_ERR_NOT_READY); \ gasneti_assert_always_int(gex_NBI_Test(GEX_EC_GET,0) ,==, GASNET_OK); \ gasneti_assert_always_int(gex_NBI_Test(GEX_EC_ALL,0) ,==, GASNET_ERR_NOT_READY); \ } \ } while (0) gasneti_iop_t *iop1, *iop2; gasneti_iop_t *peer_iop1, *peer_iop2; ASSERT_NBI_SYNCED(); iop1 = gasneti_iop_register(5, isget GASNETI_THREAD_PASS); /* iop1 = 5 */ gasneti_assert_always(iop1); ASSERT_NBI_NOTSYNCED(); PTHREAD_LOCALBARRIER(num_threads); share[id] = iop1; /* hand-off iop1 to neighbor thread */ PTHREAD_LOCALBARRIER(num_threads); peer_iop1 = share[peerid]; gasneti_iop_markdone(peer_iop1, 2, isget); /* iop1 -= 2 */ PTHREAD_LOCALBARRIER(num_threads); ASSERT_NBI_NOTSYNCED(); { /* implicit access region */ gex_Event_t h; gasneti_eop_t *eop; gex_Event_t h2; gex_NBI_BeginAccessRegion(0); iop2 = gasneti_iop_register(1, isget GASNETI_THREAD_PASS); /* iop2 = 1 */ gasneti_assert_always(iop2); gasneti_assert_always(iop2 != iop1); PTHREAD_LOCALBARRIER(num_threads); share[id] = iop2; /* hand-off iop2 to neighbor thread */ PTHREAD_LOCALBARRIER(num_threads); peer_iop2 = share[peerid]; gasneti_iop_markdone(peer_iop2, 1, isget); /* iop2 -= 1 */ PTHREAD_LOCALBARRIER(num_threads); gasneti_assert_always(iop2 == gasneti_iop_register(2, isget GASNETI_THREAD_PASS)); /* iop2 += 2 */ eop = gasneti_eop_create(GASNETI_THREAD_PASS_ALONE); gasneti_assert_always(eop); h2 = gasneti_eop_to_event(eop); gasneti_assert_always_int(gex_Event_Test(h2) ,==, GASNET_ERR_NOT_READY); h = gex_NBI_EndAccessRegion(0); gasneti_assert_always_int(gex_Event_Test(h) ,==, GASNET_ERR_NOT_READY); gasneti_assert_always_int(gex_Event_Test(h2) ,==, GASNET_ERR_NOT_READY); PTHREAD_LOCALBARRIER(num_threads); gasneti_iop_markdone(peer_iop1, 2, isget); /* iop1 -= 2 */ PTHREAD_LOCALBARRIER(num_threads); ASSERT_NBI_NOTSYNCED(); gasneti_assert_always_int(gex_Event_Test(h) ,==, GASNET_ERR_NOT_READY); gasneti_assert_always_int(gex_Event_Test(h2) ,==, GASNET_ERR_NOT_READY); PTHREAD_LOCALBARRIER(num_threads); gasneti_iop_markdone(peer_iop2, 1, isget); /* iop2 -= 1 */ PTHREAD_LOCALBARRIER(num_threads); ASSERT_NBI_NOTSYNCED(); gasneti_assert_always_int(gex_Event_Test(h) ,==, GASNET_ERR_NOT_READY); gasneti_assert_always_int(gex_Event_Test(h2) ,==, GASNET_ERR_NOT_READY); PTHREAD_LOCALBARRIER(num_threads); gasneti_iop_markdone(peer_iop1, 1, isget); /* iop1 -= 1 */ PTHREAD_LOCALBARRIER(num_threads); ASSERT_NBI_SYNCED(); gasneti_assert_always_int(gex_Event_Test(h) ,==, GASNET_ERR_NOT_READY); gasneti_assert_always_int(gex_Event_Test(h2) ,==, GASNET_ERR_NOT_READY); PTHREAD_LOCALBARRIER(num_threads); gasneti_assert_always_ptr(iop1 ,==, gasneti_iop_register(2, isget GASNETI_THREAD_PASS)); /* iop1 += 2 */ ASSERT_NBI_NOTSYNCED(); gasneti_assert_always_int(gex_Event_Test(h) ,==, GASNET_ERR_NOT_READY); gasneti_assert_always_int(gex_Event_Test(h2) ,==, GASNET_ERR_NOT_READY); PTHREAD_LOCALBARRIER(num_threads); gasneti_iop_markdone(peer_iop2, 1, isget); /* iop2 -= 1 */ PTHREAD_LOCALBARRIER(num_threads); ASSERT_NBI_NOTSYNCED(); gasneti_assert_always_int(gex_Event_Test(h) ,==, GASNET_OK); gasneti_assert_always_int(gex_Event_Test(h2) ,==, GASNET_ERR_NOT_READY); PTHREAD_LOCALBARRIER(num_threads); gasneti_iop_markdone(peer_iop1, 2, isget); /* iop1 -= 2 */ PTHREAD_LOCALBARRIER(num_threads); ASSERT_NBI_SYNCED(); gasneti_assert_always_int(gex_Event_Test(h2) ,==, GASNET_ERR_NOT_READY); share[id] = eop; /* hand-off eop to neighbor thread */ PTHREAD_LOCALBARRIER(num_threads); gasneti_eop_markdone(share[peerid]); /* mark right neighbor's eop done */ PTHREAD_LOCALBARRIER(num_threads); gasneti_assert_always_int(gex_Event_Test(h2) ,==, GASNET_OK); ASSERT_NBI_SYNCED(); PTHREAD_LOCALBARRIER(num_threads); } } } PTHREAD_LOCALBARRIER(num_threads); { // Test free of other threads' ops and subsequent reuse. #define RAND_EVENT(output) do { \ gasneti_eop_t *_eop; \ gasneti_iop_t *_iop; \ int _r = TEST_RAND(0,10); \ switch (_r) { \ case 0: case 1: /* IOP put or get */ \ gex_NBI_BeginAccessRegion(0); \ _iop = gasneti_iop_register(1, _r GASNETI_THREAD_PASS); \ (output) = gex_NBI_EndAccessRegion(0); \ gasneti_iop_markdone(_iop, 1, _r); \ break; \ default: /* EOP */ \ _eop = gasneti_eop_create(GASNETI_THREAD_PASS_ALONE); \ (output) = gasneti_eop_to_event(_eop); \ gasneti_eop_markdone(_eop); \ break; \ } \ } while(0) const int opcount = 252; // must be divisible by 3 and 4 gasneti_assert_always(! (opcount%4)); gasneti_assert_always(! (opcount%3)); // Arrays of events (interleaved from 4 threads) // populated by passing around the ring of threads. gex_Event_t *events = test_malloc(opcount * 2 * sizeof(gex_Event_t)); for (int j = 0; j < 4; ++j) { for (int i = j; i < opcount; i += 4) { RAND_EVENT(events[i]); } share[id] = events; PTHREAD_LOCALBARRIER(num_threads); events = (gex_Event_t *)share[peerid]; PTHREAD_LOCALBARRIER(num_threads); } // The events are reaped in groups of 3 events to // get varying mixes of local and foreign events. for (int i = 0; i < opcount; i += 3) { if (TEST_RAND_ONEIN(2)) { gasneti_assert_always_int(gex_Event_Test(events[i+0]) ,==, GASNET_OK); gasneti_assert_always_int(gex_Event_Test(events[i+1]) ,==, GASNET_OK); gasneti_assert_always_int(gex_Event_Test(events[i+2]) ,==, GASNET_OK); } else { gasneti_assert_always_int(gex_Event_TestAll(events+i,3,0) ,==, GASNET_OK); } } PTHREAD_LOCALBARRIER(num_threads); // Issue twice the original number of ops to encourage reuse of foreign-freed ops for (int i = 0; i < 2*opcount; ++i) { RAND_EVENT(events[i]); } gasneti_assert_always_int(gex_Event_TestAll(events,2*opcount,0) ,==, GASNET_OK); test_free(events); #undef RAND_EVENT } PTHREAD_LOCALBARRIER(num_threads); { // Test "aop" interfaces gex_NBI_Wait(GEX_EC_ALL,0); gasneti_aop_t *aop = gasneti_aop_create(GASNETI_THREAD_PASS_ALONE); gasneti_aop_push(aop GASNETI_THREAD_PASS); gasneti_assert_always_ptr(aop ,==, gasneti_aop_pop(GASNETI_THREAD_PASS_ALONE)); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_ALL,0) ,==, GASNET_OK); gex_Event_t ev = gasneti_aop_to_event(aop); gasneti_assert_always_int(gex_Event_Test(ev) ,==, GASNET_OK); } PTHREAD_LOCALBARRIER(num_threads); { // Test NBI fire-and-forget regions // Divide each segment into four disjoint regions for use as sources and destinations: const size_t region_len = TEST_SEGSZ/4; char *loc_src = (char *)myseg; char *loc_dst = (char *)myseg + region_len; char *rem_src = (char *)peerseg + 2*region_len; char *rem_dst = (char *)peerseg + 3*region_len; gex_NBI_Wait(GEX_EC_ALL,0); gasneti_begin_nbi_ff(GASNETI_THREAD_PASS_ALONE); const size_t max_sz = MIN(128*1024,region_len); for (size_t sz = 1; sz <= max_sz; sz = (sz < 64?sz*2:sz*8)) { gex_RMA_PutNBI(myteam, peer, rem_dst, loc_src, sz, GEX_EVENT_DEFER, 0); gex_RMA_GetNBI(myteam, loc_dst, peer, rem_src, sz, 0); if (sz <= max_medium) { gex_AM_RequestMedium0(myteam, peer, gasneti_diag_hidx_base + 2, loc_src, sz, GEX_EVENT_GROUP, 0); } if (sz <= max_long) { gex_AM_RequestLong0(myteam, peer, gasneti_diag_hidx_base + 2, loc_src, sz, rem_dst, GEX_EVENT_GROUP, 0); } } gasneti_end_nbi_ff(GASNETI_THREAD_PASS_ALONE); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_PUT,0) ,==, GASNET_OK); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_GET,0) ,==, GASNET_OK); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_AM,0) ,==, GASNET_OK); gasneti_assert_always_int(gex_NBI_Test(GEX_EC_ALL,0) ,==, GASNET_OK); } PTHREAD_LOCALBARRIER(num_threads); if (!id) { test_free(share); share = NULL; } } // Avert you eyes. The following call prevents this subtest from leaving // NBI operations in-flight that may still be modifying memory in such a way // as to interfere with later tests. // TODO: Reserve some portion of the segment for the exclusive use of the // fire-and-forget tests and remove this call. gasneti_nbi_ff_drain_(GASNETI_THREAD_PASS_ALONE); PTHREAD_BARRIER(num_threads); } /* ------------------------------------------------------------------------------------ */ #if GASNET_PAR static void * thread_fn(void *arg) { int test_errs = 0; int id = (int)(uintptr_t)arg; PTHREAD_BARRIER(num_threads); TEST_HEADER("gasneti_mutex_t test") mutex_test(id); PTHREAD_BARRIER(num_threads); TEST_HEADER("gasneti_cond_t test") cond_test(id); PTHREAD_BARRIER(num_threads); TEST_HEADER("gasneti_rwlock_t test") rwlock_test(id); PTHREAD_BARRIER(num_threads); spinlock_test(id); PTHREAD_BARRIER(num_threads); semaphore_test(id); PTHREAD_BARRIER(num_threads); lifo_test(id); PTHREAD_BARRIER(num_threads); TEST_HEADER("malloc test") malloc_test(id); PTHREAD_BARRIER(num_threads); progressfns_test(id); PTHREAD_BARRIER(num_threads); op_test(id); PTHREAD_BARRIER(num_threads); TEST_HEADER("conduit tests") { PTHREAD_BARRIER(num_threads); test_errs += GASNETC_RUN_DIAGNOSTICS_PAR(iters,id,num_threads); PTHREAD_BARRIER(num_threads); test_errs += GASNETE_RUN_DIAGNOSTICS_PAR(iters,id,num_threads); } PTHREAD_BARRIER(num_threads); return (void *)(uintptr_t)test_errs; } #endif /* ------------------------------------------------------------------------------------ */ #if HAVE_SSH_SPAWNER || HAVE_MPI_SPAWNER || HAVE_PMI_SPAWNER || GASNET_CONDUIT_SMP extern gasneti_spawnerfn_t const *gasneti_spawner; static void spawner_test(void) { if (!gasneti_spawner) { TEST_HEADER("bootstrap functions test - SKIPPED"); else return; return; } else { TEST_HEADER("bootstrap functions test"); else return; } int iters1 = MAX(5,MIN(50,iters/100)); #define DATUM_SZ 32 typedef uint8_t datum_t[DATUM_SZ]; #define INIT_DATUM(datum,iter,node,sz) do { \ uint8_t val = (iter) ^ (node) ^ (sz); \ for (int lcv = 0; lcv < sz; ++lcv, ++val) { \ (datum)[lcv] = val; \ } \ } while (0) #define CHECK_DATUM(datum,iter,node,sz,name) do { \ uint8_t val = (iter) ^ (node) ^ (sz); \ for (int lcv = 0; lcv < sz; ++lcv, ++val) { \ if ((datum)[lcv] != val) { \ MSG("ERROR: %s test failed at sz=%d", name, (int)sz); \ test_errs += 1; \ break; \ } \ } \ } while (0) datum_t my_datum, other_datum; datum_t *all_data = gasneti_calloc(gasneti_nodes, sizeof(datum_t)); // Frequent Cleanup calls will check that each operation works correctly after one. // Additionally, here we make sure back-to-back calls are safe gasneti_spawner->Cleanup(); gasneti_spawner->Cleanup(); { // Barrier // Using RMA to (weakly) validate barrier correctness // Lack of progress (both RMA and AM) in bootstrap ops constrains what we can do. char * mysegmid = (char *)myseg + TEST_SEGSZ/2; int once = 0; gex_Rank_t tmp = gasneti_mynode; for (int i = 0; i < iters1; ++i, ++tmp) { *(gex_Rank_t *)myseg = tmp; gasneti_spawner->Barrier(); gex_Rank_t val = gex_RMA_GetBlockingVal(myteam, peer, peerseg, sizeof(val), 0); gex_Event_t ev = gex_Coll_BarrierNB(myteam, 0); if (val != peer + i) { if (!once) { MSG("ERROR: Barrier test failed"); test_errs += 1; once = 1; } } gex_Event_Wait(ev); // ensure peer's Get completes before next bootstrap barrier } // back-to-back barriers for (int i = 0; i < iters1; ++i) { gasneti_spawner->Barrier(); } } gasneti_spawner->Cleanup(); { // Broadcast gex_Rank_t step = MAX(1, gasneti_nodes / iters1); for (int i = 0; i < iters1; ++i) { gex_Rank_t root = (step * i) % gasneti_nodes; for (size_t sz = 1; sz <= sizeof(datum_t); sz *= 2) { INIT_DATUM(my_datum, i, gasneti_mynode, sz); gasneti_spawner->Broadcast(my_datum, sz, other_datum, root); CHECK_DATUM(other_datum, i, root, sz, "Broadcast"); } } } { // Broadcast (in-place) gex_Rank_t step = MAX(1, gasneti_nodes / iters1); for (int i = 0; i < iters1; ++i) { gex_Rank_t root = (step * i) % gasneti_nodes; for (size_t sz = 1; sz <= sizeof(datum_t); sz *= 2) { INIT_DATUM(other_datum, i, gasneti_mynode, sz); gasneti_spawner->Broadcast(other_datum, sz, other_datum, root); CHECK_DATUM(other_datum, i, root, sz, "Broadcast (in-place)"); } } } gasneti_spawner->Cleanup(); { // NbrhdBroadcast // We need a constant number of iterations for this collective call. // However, gasneti_nodemap_local_count is not always single-valued. // So this could double-test some roots for (int i = 0; i < iters1; ++i) { gex_Rank_t root = gasneti_nodemap_local[i % gasneti_nodemap_local_count]; for (size_t sz = 1; sz <= sizeof(datum_t); sz *= 2) { INIT_DATUM(my_datum, i, gasneti_mynode, sz); gasneti_spawner->NbrhdBroadcast(my_datum, sz, other_datum, root); CHECK_DATUM(other_datum, i, root, sz, "NbrhdBroadcast"); } } } { // NbrhdBroadcast (in-place) for (int i = 0; i < iters1; ++i) { gex_Rank_t root = gasneti_nodemap_local[i % gasneti_nodemap_local_count]; for (size_t sz = 1; sz <= sizeof(datum_t); sz *= 2) { INIT_DATUM(other_datum, i, gasneti_mynode, sz); gasneti_spawner->NbrhdBroadcast(other_datum, sz, other_datum, root); CHECK_DATUM(other_datum, i, root, sz, "NbrhdBroadcast (in-place)"); } } } gasneti_spawner->Cleanup(); { // HostBroadcast // We need a constant number of iterations for this collective call. // However, gasneti_myhost.node_count is not always single-valued. // So this could double-test some roots for (int i = 0; i < iters1; ++i) { gex_Rank_t root = gasneti_myhost.nodes[i % gasneti_myhost.node_count]; for (size_t sz = 1; sz <= sizeof(datum_t); sz *= 2) { INIT_DATUM(my_datum, i, gasneti_mynode, sz); gasneti_spawner->HostBroadcast(my_datum, sz, other_datum, root); CHECK_DATUM(other_datum, i, root, sz, "HostBroadcast"); } } } { // HostBroadcast (in-place) for (int i = 0; i < iters1; ++i) { gex_Rank_t root = gasneti_myhost.nodes[i % gasneti_myhost.node_count]; for (size_t sz = 1; sz <= sizeof(datum_t); sz *= 2) { INIT_DATUM(other_datum, i, gasneti_mynode, sz); gasneti_spawner->HostBroadcast(other_datum, sz, other_datum, root); CHECK_DATUM(other_datum, i, root, sz, "HostBroadcast (in-place)"); } } } gasneti_spawner->Cleanup(); { // Exchange for (int i = 0; i < iters1; ++i) { for (size_t sz = 1; sz <= sizeof(datum_t); sz *= 2) { uint8_t *dst = (uint8_t *)all_data; INIT_DATUM(my_datum, i, gasneti_mynode, sz); gasneti_spawner->Exchange(my_datum, sz, all_data); for (int n = 0; n < gasneti_nodes; ++n, dst+=sz) { CHECK_DATUM(dst, i, n, sz, "Exchange"); } } } } { // Exchange (in-place) for (int i = 0; i < iters1; ++i) { for (size_t sz = 1; sz <= sizeof(datum_t); sz *= 2) { uint8_t *dst = (uint8_t *)all_data; uint8_t *src = dst + sz*gasneti_mynode; INIT_DATUM(src, i, gasneti_mynode, sz); gasneti_spawner->Exchange(src, sz, all_data); for (int n = 0; n < gasneti_nodes; ++n, dst+=sz) { CHECK_DATUM(dst, i, n, sz, "Exchange (in-place)"); } } } } gasneti_spawner->Cleanup(); { // Alltoall uint8_t *src_data = gasneti_calloc(gasneti_nodes, sizeof(datum_t)); for (int i = 0; i < iters1; ++i) { for (size_t sz = 1; sz <= sizeof(datum_t); sz *= 2) { for (int n = 0; n < gasneti_nodes; ++n) { INIT_DATUM(src_data + n*sz, i, gasneti_mynode + n*gasneti_nodes, sz); } uint8_t *dst = (uint8_t *)all_data; gasneti_spawner->Alltoall(src_data, sz, all_data); for (int n = 0; n < gasneti_nodes; ++n, dst+=sz) { CHECK_DATUM(dst, i, n + gasneti_mynode*gasneti_nodes, sz, "Alltoall"); } } } gasneti_free(src_data); } { // Alltoall (in-place) uint8_t *src_data = (uint8_t *)all_data; for (int i = 0; i < iters1; ++i) { for (size_t sz = 1; sz <= sizeof(datum_t); sz *= 2) { for (int n = 0; n < gasneti_nodes; ++n) { INIT_DATUM(src_data + n*sz, i, gasneti_mynode + n*gasneti_nodes, sz); } uint8_t *dst = (uint8_t *)all_data; gasneti_spawner->Alltoall(src_data, sz, all_data); for (int n = 0; n < gasneti_nodes; ++n, dst+=sz) { CHECK_DATUM(dst, i, n + gasneti_mynode*gasneti_nodes, sz, "Alltoall (in-place)"); } } } } gasneti_free(all_data); } #endif /* ------------------------------------------------------------------------------------ */ static void hbarrier_test(void) { // Currently, this is just to ensure this little-used interface gets tested // TODO: // + Maybe verify that barrier property holds? // + Maybe verify AM progress made within this barrier? for (int i = 0; i < iters0; ++i) { gasneti_host_barrier(); } } /* ------------------------------------------------------------------------------------ */ static void rexchgv_test(void) { uint64_t data[10]; const size_t elem_sz = sizeof(data[0]); const size_t total_len = gasneti_nodes * sizeof(data); const int N = sizeof(data)/elem_sz; // total values per rank for (int i = 0; i < N; ++i) { data[i] = gasneti_mynode + i * gasneti_nodes; } for (int iter = 0; iter < iters0; ++iter) { // Choose splits between first and second exchanges // First iteration is deterministic and the rest are random int part1, part2; if (!iter) { part1 = 0; part2 = N; } else { // Note that RAND() is in-sync across ranks, which we intentionally purturb part1 = (TEST_RAND(0,N) + gasneti_mynode) % N; part2 = N - part1; } uint64_t *data1, *data2; size_t *len1, *len2; size_t partial_len1, partial_len2; partial_len1 = gasneti_blockingRotatedExchangeV(myteam, data, part1*elem_sz, (void**)&data1, &len1); if (partial_len1) { gasneti_assert_always_uint(*len1 ,==, part1*elem_sz); } else { gasneti_assert_always(data1 == NULL); gasneti_assert_always(len1 == NULL); } partial_len2 = gasneti_blockingRotatedExchangeV(myteam, data+part1, part2*elem_sz, (void**)&data2, &len2); if (partial_len2) { gasneti_assert_always_uint(*len2 ,==, part2*elem_sz); } else { gasneti_assert_always(data2 == NULL); gasneti_assert_always(len2 == NULL); } { // Validate lengths satisfy alignment and summation properties gasneti_assert_always_uint(partial_len1 + partial_len2 ,==, total_len); gasneti_assert_always_uint(partial_len1 % elem_sz ,==, 0); gasneti_assert_always_uint(partial_len2 % elem_sz ,==, 0); size_t sum1 = 0; size_t sum2 = 0; for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) { size_t tmp1 = len1 ? len1[i] : 0; gasneti_assert_always_uint(tmp1 % elem_sz ,==, 0); sum1 += tmp1; size_t tmp2 = len2 ? len2[i] : 0; gasneti_assert_always_uint(tmp2 % elem_sz ,==, 0); sum2 += tmp2; gasneti_assert_always_uint(tmp1 + tmp2 ,==, sizeof(data)); } gasneti_assert_always_uint(partial_len1 ,==, sum1); gasneti_assert_always_uint(partial_len2 ,==, sum2); } { // Validate content uint64_t *p1 = data1; uint64_t *p2 = data2; for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) { int count1 = len1 ? (int)(len1[i] / elem_sz) : 0; uint64_t want = (gasneti_mynode + i) % gasneti_nodes; // Not simply i, due to rotation for (int j = 0; j < count1; ++j, ++p1, want += gasneti_nodes) { gasneti_assert_always_uint(*p1 ,==, want); } int count2 = len2 ? (int)(len2[i] / elem_sz) : 0; for (int j = 0; j < count2; ++j, ++p2, want += gasneti_nodes) { gasneti_assert_always_uint(*p2 ,==, want); } } } gasneti_free(data1); gasneti_free(data2); gasneti_free(len1); gasneti_free(len2); } } /* ------------------------------------------------------------------------------------ */ #include "gasnet_vlide.h" static void vlide_test(void) { // Unit test for VLIDE compression algorithm used by VIS // This is a purely serial test with no communication. // Manual knobs for testing less-important configurations: #if GASNETI_VLIDE_TEST_INT64 typedef uint64_t val_t; typedef val_t valint_t; #else typedef void * val_t; typedef uintptr_t valint_t; #endif #if GASNETI_VLIDE_TEST_TRIVIAL #define VLIDE_ENCODE GASNETI_VLIDE_ENCODE_TRIVIAL #define VLIDE_DECODE GASNETI_VLIDE_DECODE_TRIVIAL #else #define VLIDE_ENCODE GASNETI_VLIDE_ENCODE #define VLIDE_DECODE GASNETI_VLIDE_DECODE #endif const int max_entries = 1000; val_t * const input_buffer = gasneti_malloc(max_entries*sizeof(val_t)); uint8_t * const output_buffer = gasneti_calloc(max_entries+1,10); // choose an arbitrary starting point that looks like a pointer val_t const start = (val_t)(uintptr_t)input_buffer; uint64_t dist[12] = { 0 }; for (int iter = 0; iter < iters; iter++) { int entries = TEST_RAND(1,max_entries); // ENCODE val_t oldval = 0; val_t newval = start; uint8_t *p = output_buffer; int i = 0; do { input_buffer[i] = newval; // encode one entry uint8_t * const oldp = p; VLIDE_ENCODE(p, (valint_t)oldval, (valint_t)newval); gasneti_assert_always_ptr(p ,>, oldp); // sanity check gasneti_assert_always_ptr(p ,<=, oldp+10); // sanity check dist[p-oldp]++; // record encoding size distribution // compute next random value in a rough gaussian distribution centered on val oldval = newval; int bits = TEST_RAND(TEST_RAND(0,63),63); uint64_t mask = ((uint64_t)-1) >> bits; // select random number of low bits uint64_t rword = 0; // compute a random word for (int j=0; j < 8; j++) { rword <<= 8; rword |= TEST_RAND(0,255); } // randomly flip some of the low bits newval = (val_t)(valint_t)(((uint64_t)(valint_t)newval) ^ (rword & mask)); } while(++i < entries); uint8_t * const endp = p; // DECODE oldval = 0; newval = 0; p = output_buffer; for (i = 0; i < entries; i++) { uint8_t * const oldp = p; valint_t tmp; // tmp used to silence strict-aliasing warnings from gcc VLIDE_DECODE(p, (valint_t)oldval, tmp); newval = (val_t)tmp; gasneti_assert_always_ptr(p ,>, oldp); // sanity check gasneti_assert_always_ptr(p ,<=, oldp+10); // sanity check // verify we decoded the correct value: gasneti_assert_always_uint((valint_t)newval ,==, (valint_t)input_buffer[i]); oldval = newval; } // verify agreement on end of buffer gasneti_assert_always_ptr(p ,==, endp); } #if GASNET_DEBUG_VERBOSE if (!gasneti_mynode) { uint64_t enc_sz = 0; uint64_t orig_sz = 0; MSG0("VLIDE encoding size distribution:"); for (size_t i=0; i < sizeof(dist)/sizeof(dist[0]); i++) { MSG0("%2i: %8" PRIu64, (int)i, dist[i]); enc_sz += dist[i]*i; orig_sz += dist[i]*sizeof(val_t); } MSG0("VLIDE space savings: %.3f%%", 100.0*(orig_sz-enc_sz)/orig_sz); } #endif gasneti_free(input_buffer); gasneti_free(output_buffer); } /* ------------------------------------------------------------------------------------ */ static gex_AM_Entry_t gasneti_diag_handlers[] = { #ifdef GASNETC_DIAG_HANDLERS GASNETC_DIAG_HANDLERS(), /* should start at gasnetc_diag_hidx_base */ #endif #ifdef GASNETE_DIAG_HANDLERS GASNETE_DIAG_HANDLERS(), /* should start at gasnete_diag_hidx_base */ #endif { gasneti_diag_hidx_base + 0, (gex_AM_Fn_t)progressfn_reqh, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDLONG, 0 }, { gasneti_diag_hidx_base + 1, (gex_AM_Fn_t)progressfn_reph, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_MEDIUM, 0 }, { gasneti_diag_hidx_base + 2, (gex_AM_Fn_t)noop_reqh, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDLONG, 0 } }; void gasneti_diagnostic_gethandlers(gex_AM_Entry_t **htable, int *htable_cnt) { assert(htable && htable_cnt); *htable = gasneti_diag_handlers; *htable_cnt = (int)(sizeof(gasneti_diag_handlers)/sizeof(gex_AM_Entry_t)); gasneti_diag_havehandlers = 1; } gasnet-2025.8.0/gasnet_mmap.c0000664000175000017500000031227215142313673016070 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_mmap.c $ * Description: GASNet memory-mapping utilities * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include #include #include #if GASNET_PSHM && (GASNETI_PSHM_FILE || GASNETI_PSHM_POSIX) && HAVE_FSTATVFS #include #endif #if PLATFORM_OS_LINUX && !GASNETI_BUG3480_WORKAROUND // Suspect bug 3480 #define GASNETI_BUG3480_MSG "\nYour system is suspected to be impacted by bug 3480" #else #define GASNETI_BUG3480_MSG #endif #if defined(GASNETI_MMAP_OR_PSHM) && !defined(HAVE_MMAP) #if PLATFORM_OS_CYGWIN && (GASNETI_PSHM_POSIX || GASNETI_PSHM_FILE) /* Use of mmap() for PSHM over POSIX or FILE is a less-than-general case. * So on Cygwin define HAVE_MMAP for those cases only. */ #define HAVE_MMAP 1 /* And we need these, which would otherwise appear in gasnet_internal.h */ extern void *gasneti_mmap(uintptr_t segsize); extern void gasneti_munmap(void *segbase, uintptr_t segsize); #else /* Ensure PSHM over SYSV never actually calls mmap() */ #define mmap %%%ERROR__GASNet_does_not_support_mmap_in_this_configuration%%% #define munmap %%%ERROR__GASNet_does_not_support_munmap_in_this_configuration%%% #endif #endif #if defined(GASNETI_MMAP_OR_PSHM) && defined(GASNETI_USE_HUGETLBFS) #define gasneti_mmap_aligndown(sz) gasneti_mmap_aligndown_huge(sz) #define gasneti_mmap_alignup(sz) gasneti_mmap_alignup_huge(sz) #define gasneti_mmap_pagesize() gasneti_hugepagesize() #else #define gasneti_mmap_aligndown(sz) GASNETI_PAGE_ALIGNDOWN(sz) #define gasneti_mmap_alignup(sz) GASNETI_PAGE_ALIGNUP(sz) #define gasneti_mmap_pagesize() GASNETI_PAGESIZE #endif // In a PSHM-enabled library, gasneti_use_shared_allocator controls whether a // PSHM-compatible segment will be allocated and cross-mapped for eligible // cases. Currently "eligible" includes the aux segment, primordial segment, // and the "vnet" PSHM segment. // Specifically, when the value is zero the "regular" gasneti_mmap() is used to // allocate "regular" memory and no cross-mapping is done. // Currently the only valid/usable case for zero in a PSHM-enabled library is // when environment variable GASNET_USE_PSHM_SINGLETON is false. #if GASNET_PSHM int gasneti_use_shared_allocator = 1; #else #define gasneti_use_shared_allocator 0 #endif #ifdef GASNETI_MMAP_OR_PSHM #if GASNET_PSHM && !defined(_POSIX_C_SOURCE) && PLATFORM_OS_SOLARIS #define _POSIX_C_SOURCE 200112L /* Required for shm_{open,unlink} decls */ #include #undef _POSIX_C_SOURCE #elif HAVE_MMAP #include #elif !defined(MAP_FAILED) #define MAP_FAILED ((void*)(uintptr_t)(-1LL)) #endif #if GASNET_PSHM && defined(GASNETI_PSHM_XPMEM) #if defined(HAVE_XPMEM_H) /* Cray XPMEM */ #include typedef struct xpmem_addr gasneti_xpmem_addr_t; typedef xpmem_segid_t gasneti_xpmem_segid_t; typedef xpmem_apid_t gasneti_xpmem_apid_t; #define gasneti_xpmem_apid apid #elif defined(HAVE_SN_XPMEM_H) /* SGI XPMEM */ #include typedef xpmem_addr_t gasneti_xpmem_addr_t; typedef int64_t gasneti_xpmem_segid_t; typedef int64_t gasneti_xpmem_apid_t; #define gasneti_xpmem_apid id #endif #endif /* TODO: Below are a couple cases where we want to use the lower portion of the O/S-provided mmap()ed region to create our segment because one must ensure some alignment which is greater than the page size. Instead of forcing the use of the bottom portion, we *could* change the trimming logic to use a chosen granularity other than that of GASNETI_PAGESIZE (such as the huge page size). */ #ifdef GASNETI_USE_HUGETLBFS GASNETI_IDENT(gasneti_IdentString_Hugetlbfs, "$GASNetHugetlbfs: 1 $"); #include static int _gasneti_use_hugetlbfs = -1; static uintptr_t _gasneti_hugepagesize = 0; static const char *gasneti_hugetlbfs_tmpdir; static void _gasneti_hugepage_init(void) { static int is_init = 0; if (is_init) { gasneti_sync_reads(); } else { char valstr[16]; int dflt = getenv("HUGETLB_DEFAULT_PAGE_SIZE") ? 1 : 0; // intentionally not gasneti_getenv() if (gasneti_getenv_yesno_withdefault("GASNET_USE_HUGEPAGES", dflt)) { _gasneti_use_hugetlbfs = 1; _gasneti_hugepagesize = gethugepagesize(); gasneti_assert_always(_gasneti_hugepagesize != 0); gasneti_assert_always_uint(_gasneti_hugepagesize % GASNETI_PAGESIZE ,==, 0); static const char *recommendation = "Please consult your sysadmin to determine if hugetlbfs mount points are configured on your system. " "You might also set environment variable HUGETLB_DEFAULT_PAGE_SIZE to try a different page size, " "or GASNET_USE_HUGEPAGES=0 to disable use of huge pages in GASNet."; gasneti_hugetlbfs_tmpdir = hugetlbfs_find_path(); if (!gasneti_hugetlbfs_tmpdir) { gasneti_fatalerror("libhugetlbfs could not find a mount point for %"PRIuPTR"-byte pages. %s", _gasneti_hugepagesize, recommendation); } if (access(gasneti_hugetlbfs_tmpdir, R_OK|W_OK|X_OK)) { gasneti_fatalerror("The libhugetlbfs mount point for %"PRIuPTR"-byte pages is not accessible. %s", _gasneti_hugepagesize, recommendation); } GASNETI_TRACE_PRINTF(I, ("gethugepagesize() yields %s", gasnett_format_number(_gasneti_hugepagesize, valstr, sizeof(valstr), 1))); } else { _gasneti_use_hugetlbfs = 0; _gasneti_hugepagesize = GASNETI_PAGESIZE; GASNETI_TRACE_PRINTF(I, ("hugepage use disabled, using standard pages (%s)", gasnett_format_number(_gasneti_hugepagesize, valstr, sizeof(valstr), 1))); } gasneti_sync_writes(); is_init = 1; } } size_t gasneti_use_hugetlbfs(void) { if_pf (_gasneti_use_hugetlbfs < 0) _gasneti_hugepage_init(); gasneti_assert(_gasneti_use_hugetlbfs >= 0); return _gasneti_use_hugetlbfs; } size_t gasneti_hugepagesize(void) { if_pf (_gasneti_hugepagesize == 0) _gasneti_hugepage_init(); gasneti_assert(_gasneti_hugepagesize != 0); return _gasneti_hugepagesize; } static uintptr_t gasneti_mmap_aligndown_huge(uintptr_t sz) { return GASNETI_ALIGNDOWN(sz, gasneti_hugepagesize()); } static uintptr_t gasneti_mmap_alignup_huge(uintptr_t sz) { return GASNETI_ALIGNUP(sz, gasneti_hugepagesize()); } #endif #if !HAVE_MMAP /* Skip the following platform checks */ #elif PLATFORM_OS_CYGWIN && !GASNET_PSHM #error mmap without PSHM not supported on Cygwin - it doesnt work properly #elif PLATFORM_ARCH_MIC #define GASNETI_MMAP_FLAGS (MAP_ANONYMOUS | MAP_PRIVATE | MAP_POPULATE) #endif #ifndef GASNETI_MMAP_FLAGS #ifndef GASNETI_MMAP_NORESERVE #if defined(MAP_NORESERVE) || defined(HAVE_MAP_NORESERVE) /* bug 1358: try to avoid allocating swap space, if possible */ #define GASNETI_MMAP_NORESERVE MAP_NORESERVE #else #define GASNETI_MMAP_NORESERVE 0 #endif #endif /* find an appropriate flag for anonymous mmap */ #if defined(MAP_ANONYMOUS) || defined(HAVE_MAP_ANONYMOUS) #define GASNETI_MAP_ANONYMOUS MAP_ANONYMOUS #elif defined(MAP_ANON) || defined(HAVE_MAP_ANON) #define GASNETI_MAP_ANONYMOUS MAP_ANON #else /* assume no direct capability exists, fall back on mapping /dev/zero */ #define GASNETI_MAP_ANONYMOUS 0 #ifndef GASNETI_MMAP_FILE #define GASNETI_MMAP_FILE "/dev/zero" #endif #endif #define GASNETI_MMAP_FLAGS (GASNETI_MAP_ANONYMOUS | MAP_PRIVATE | GASNETI_MMAP_NORESERVE) #endif #ifndef GASNETI_MMAP_FIXED_FLAG #define GASNETI_MMAP_FIXED_FLAG MAP_FIXED #endif #ifndef GASNETI_MMAP_NOTFIXED_FLAG #define GASNETI_MMAP_NOTFIXED_FLAG 0 #endif /* Flag, if any, to prevent write-back of file-based mappings */ #ifdef MAP_NOSYNC #define GASNETI_MMAP_NOSYNC_FLAG MAP_NOSYNC #endif #ifndef GASNETI_MMAP_NOSYNC_FLAG #define GASNETI_MMAP_NOSYNC_FLAG 0 #endif #if GASNET_PSHM && PLATFORM_OS_CYGWIN /* CYGWIN: may not honor the address passed to shmat() */ #define GASNETI_PSHM_MAP_FIXED_IGNORED 1 #endif #if HAVE_MMAP /* ------------------------------------------------------------------------------------ */ static void *gasneti_mmap_internal(void *segbase, uintptr_t segsize, int fixed_mayfail) { static int gasneti_mmapfd = -1; gasneti_tick_t t1, t2; int mmap_errno; void *ptr; #ifdef GASNETI_MMAP_FILE if (gasneti_mmapfd == -1) { gasneti_mmapfd = open(GASNETI_MMAP_FILE, O_RDWR); if (gasneti_mmapfd == -1) gasneti_fatalerror("failed to open "GASNETI_MMAP_FILE" for mmap : %s\n",strerror(errno)); } #endif t1 = gasneti_ticks_now(); #if defined(GASNETI_USE_HUGETLBFS) ptr = gasneti_huge_mmap(segbase, segsize); #else ptr = mmap(segbase, segsize, (PROT_READ|PROT_WRITE), (GASNETI_MMAP_FLAGS | (segbase==NULL?GASNETI_MMAP_NOTFIXED_FLAG:GASNETI_MMAP_FIXED_FLAG)), gasneti_mmapfd, 0); #endif mmap_errno = errno; t2 = gasneti_ticks_now(); #ifdef GASNETI_MMAP_FILE /* close(gasneti_mmapfd); NOPE: we reuse one static fd */ #endif GASNETI_TRACE_PRINTF(C, ("mmap %s("GASNETI_LADDRFMT", %"PRIuPTR"): %.3fus => "GASNETI_LADDRFMT"%s%s\n", (segbase == NULL?"":"fixed"), GASNETI_LADDRSTR(segbase), segsize, gasneti_ticks_to_ns(t2-t1)/1000.0, GASNETI_LADDRSTR(ptr), (ptr == MAP_FAILED?" MAP_FAILED: ":""), (ptr == MAP_FAILED?strerror(mmap_errno):""))); if (ptr == MAP_FAILED && mmap_errno != ENOMEM) { #if PLATFORM_OS_CYGWIN if (mmap_errno != EACCES) /* Cygwin stupidly returns EACCES for insuff mem */ #elif PLATFORM_OS_SOLARIS if (mmap_errno != EAGAIN) /* Solaris stupidly returns EAGAIN for insuff mem */ #endif gasneti_fatalerror("unexpected error in mmap%s for size %"PRIuPTR": %s\n", (segbase == NULL?"":" fixed"), segsize, strerror(mmap_errno)); } if ((ptr != (void*)GASNETI_PAGE_ALIGNDOWN(ptr)) && (ptr != MAP_FAILED)) { gasneti_fatalerror("mmap result "GASNETI_LADDRFMT" is not aligned to GASNET_PAGESIZE %lu (0x%lx)", GASNETI_LADDRSTR(ptr), (unsigned long)GASNET_PAGESIZE, (unsigned long)GASNET_PAGESIZE); } if (segbase && ptr == MAP_FAILED) { if (fixed_mayfail) { errno = mmap_errno; return MAP_FAILED; } gasneti_fatalerror("mmap fixed failed at "GASNETI_LADDRFMT" for size %"PRIuPTR": %s" GASNETI_BUG3480_MSG, GASNETI_LADDRSTR(segbase), segsize, strerror(mmap_errno)); } if (segbase && segbase != ptr) { gasneti_fatalerror("mmap fixed moved from "GASNETI_LADDRFMT" to "GASNETI_LADDRFMT" for size %"PRIuPTR"\n", GASNETI_LADDRSTR(segbase), GASNETI_LADDRSTR(ptr), segsize); } return ptr; } extern void *gasneti_mmap_fixed(void *segbase, uintptr_t segsize, int mayfail) { return gasneti_mmap_internal(segbase, segsize, mayfail); } extern void *gasneti_mmap(uintptr_t segsize) { return gasneti_mmap_internal(NULL, segsize, 0); } #endif /* HAVE_MMAP */ #if GASNET_PSHM /* an array of filenames/keys with length 1+gasneti_pshm_nodes, the +1 is for AMs */ #if defined(GASNETI_PSHM_SYSV) #include static key_t *gasneti_pshm_sysvkeys = NULL; #elif defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_POSIX) static char **gasneti_pshmname = NULL; #elif defined(GASNETI_PSHM_XPMEM) static gasneti_xpmem_segid_t *gasneti_pshm_segids = NULL; // shared static gasneti_xpmem_segid_t gasneti_pshm_segid_aux; // private static gasneti_xpmem_apid_t *gasneti_pshm_apids = NULL; // Hooks to allocate shared space in which to to store gasneti_pshm_segids[] size_t gasneti_pshm_private_data_size(void) { return gasneti_pshm_nodes * sizeof(gasneti_xpmem_segid_t); } void gasneti_pshm_private_data_init(uintptr_t addr) { gasneti_pshm_segids = (gasneti_xpmem_segid_t *)addr; } #endif static char *gasneti_pshm_tmpfile_ = NULL; static char *gasneti_pshm_tmpfile = NULL; #define GASNETI_PSHM_PREFIX_LEN1 6 /* "/GASNT" */ #define GASNETI_PSHM_PREFIX_LEN (GASNETI_PSHM_PREFIX_LEN1 + GASNETI_PSHM_UNIQUE_LEN) static int gasneti_pshm_mkstemp(const char *prefix, const char *tmpdir) { int tmpfd; if (!tmpdir || !strlen(tmpdir)) { errno = ENOTDIR; return -1; } gasneti_pshm_tmpfile_ = gasneti_realloc(gasneti_pshm_tmpfile_, strlen(tmpdir) + GASNETI_PSHM_PREFIX_LEN + 1); strcpy(gasneti_pshm_tmpfile_, tmpdir); strcat(gasneti_pshm_tmpfile_, prefix); /* Now try to create a unique file in the given directory */ tmpfd = mkstemp(gasneti_pshm_tmpfile_); if (tmpfd >= 0) { gasneti_local_wmb(); gasneti_pshm_tmpfile = gasneti_pshm_tmpfile_; close(tmpfd); return 0; } else { return -1; } } #ifdef GASNETI_PSHM_SYSV static int gasneti_pshm_settemp(const char *unique, const char *prefix, const char *tmpdir) { int tmpfd; int len; if (gasneti_pshm_tmpfile) return 0; if (!tmpdir || !strlen(tmpdir)) { errno = ENOTDIR; return -1; } gasneti_pshm_tmpfile_ = gasneti_realloc(gasneti_pshm_tmpfile_, strlen(tmpdir) + GASNETI_PSHM_PREFIX_LEN + 1); strcpy(gasneti_pshm_tmpfile_, tmpdir); strcat(gasneti_pshm_tmpfile_, prefix); /* Note: 'unique' might not be NUL terminated */ len = strlen(gasneti_pshm_tmpfile_); memcpy(gasneti_pshm_tmpfile_ + len - GASNETI_PSHM_UNIQUE_LEN, unique, GASNETI_PSHM_UNIQUE_LEN); /* Now try to verify the file exists */ tmpfd = open(gasneti_pshm_tmpfile_, O_RDWR); if (tmpfd >= 0) { gasneti_local_wmb(); gasneti_pshm_tmpfile = gasneti_pshm_tmpfile_; close(tmpfd); return 0; } else { return -1; } } #endif #if defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_SYSV) || defined(GASNETI_PSHM_POSIX) static const char *gasneti_pshm_makeunique(const char *unique) { static char prefix[] = "/GASNTXXXXXX"; #if defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_SYSV) const char *tmpdir = gasneti_tmpdir(); #endif size_t tmpdir_len = 0; #if !defined(GASNETI_PSHM_SYSV) size_t base_len; char *allnames; #endif int i; gasneti_assert_uint(strlen(prefix) ,==, GASNETI_PSHM_PREFIX_LEN); #if defined(GASNETI_PSHM_FILE) && defined(GASNETI_USE_HUGETLBFS) if (gasneti_use_hugetlbfs()) { gasneti_assert(gasneti_hugetlbfs_tmpdir); tmpdir = gasneti_hugetlbfs_tmpdir; } #endif #if defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_SYSV) tmpdir_len = strlen(tmpdir); #endif if (!unique) { /* We get to pick the unique bits */ #if defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_SYSV) if (gasneti_pshm_mkstemp(prefix, tmpdir)) { gasneti_fatalerror("mkstemp() failed to find a unique prefix: %s", strerror(errno)); } #else /* We do NOT honor $TMPDIR, since setting it to a job-specific * value would interfere with our purpose here of finding a * name that is unique per-NODE. */ if ( gasneti_pshm_mkstemp(prefix, "/tmp") && gasneti_pshm_mkstemp(prefix, "/var/tmp") && gasneti_pshm_mkstemp(prefix, "/usr/tmp") #if PLATFORM_OS_LINUX && gasneti_pshm_mkstemp(prefix, "/dev/shm") #endif ) { /* We'll HOPE that our pid's low 24 bits are good enough for node-scope uniqueness */ static const char pattern[] = "/GASNT%06x"; gasneti_pshm_tmpfile = gasneti_realloc(gasneti_pshm_tmpfile, sizeof(prefix)); /* inc. \0 */ snprintf(gasneti_pshm_tmpfile, sizeof(prefix), pattern, (0xFFFFFFU & (unsigned int)getpid())); } #endif /* Don't unlink() it until we no longer require uniqueness */ /* Strip away the tmpdir to yield a unique prefix */ unique = strrchr(gasneti_pshm_tmpfile, '/'); gasneti_assert_uint(strlen(unique) ,==, GASNETI_PSHM_PREFIX_LEN); unique += GASNETI_PSHM_PREFIX_LEN1; } #if defined(GASNETI_PSHM_SYSV) gasneti_pshm_settemp(unique, prefix, tmpdir); key_t *keys = (key_t *)gasneti_malloc((gasneti_pshm_nodes+1)*sizeof(key_t));; for (i = 0; i <= gasneti_pshm_nodes; ++i) { key_t key = ftok(gasneti_pshm_tmpfile, i + 1); if (key == (key_t)-1){ gasneti_fatalerror("failed to produce a unique SYSV key value for %s and rank %d, from ftok: %s", gasneti_pshm_tmpfile, i, strerror(errno)); } #if GASNETI_PSHM_MAX_NODES > 255 else { /* ftok() is documented (on many systems) as using only low 8 bits - so verify */ int j; for (j = 0; j < i; ++j) { if_pf (key == keys[j]) { key = (key_t)-1; gasneti_fatalerror("failed to produce a unique SYSV key value for %s and rank %d, dup of %d", gasneti_pshm_tmpfile, i, j); } } } #endif keys[i] = key; } gasneti_local_wmb(); gasneti_pshm_sysvkeys = keys; #else /* Three base-36 "digits" provide 46,656 unique names, even if case-insensitive. */ #if GASNETI_PSHM_MAX_NODES > 255 gasneti_assert_always_uint(gasneti_pshm_nodes ,<, (36*36*36)); #endif /* Note: 'unique' might not be NUL terminated */ memcpy(prefix + GASNETI_PSHM_PREFIX_LEN1, unique, GASNETI_PSHM_UNIQUE_LEN); char **names = (char **)gasneti_malloc((gasneti_pshm_nodes+1)*sizeof(char*)); base_len = tmpdir_len + GASNETI_PSHM_PREFIX_LEN; allnames = (char *)gasneti_malloc((gasneti_pshm_nodes+1)*(base_len + 4)); for (i = 0; i <= gasneti_pshm_nodes; ++i) { const char tbl[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; const unsigned int namelen = (base_len + 4); char *filename = allnames + (i * namelen); const int base = 36; int digit = i; #ifdef GASNETI_PSHM_FILE memcpy(filename, tmpdir, tmpdir_len); #endif memcpy(filename + tmpdir_len, prefix, GASNETI_PSHM_PREFIX_LEN); filename[base_len + 2] = tbl[digit % base]; digit /= base; filename[base_len + 1] = tbl[digit % base]; digit /= base; filename[base_len + 0] = tbl[digit]; filename[base_len + 3] = '\0'; names[i] = filename; } gasneti_local_wmb(); gasneti_pshmname = names; #endif return unique; } #endif #endif /* GASNET_PSHM */ #if defined(GASNETI_PSHM_XPMEM) //----------------------------------------------------------------------------- // Bug 3806/3815: Workaround XPMEM incompatibility with Cray perftools-lite #define GASNETI_XPMEM_WRAP(error_result, xpmem_call) do { \ int err, retry; \ uint64_t pause=1; \ int sigprof = 0; \ struct sigaction act_save; \ for (retry=0; retry < 10; retry++) { \ xpmem_call; \ err = errno; \ if_pt (result != error_result) break; /* success */ \ /* error handling: */ \ if (err == EFAULT || err == EINTR) { \ GASNETI_TRACE_PRINTF(I,("GASNETI_XPMEM_WRAP("#xpmem_call") failed: %s(%i) (retry=%i)\n", strerror(err), err, retry)); \ if (!sigprof) { /* attempt to block the sampling signal that triggers the defect */ \ if (getenv("PAT_RT_SAMPLING_SIGNAL")) sigprof=atoi(getenv("PAT_RT_SAMPLING_SIGNAL")); \ if (sigprof <= 0 || sigprof > SIGRTMAX) sigprof = SIGPROF; \ struct sigaction act_ign; \ act_ign.sa_handler = SIG_IGN; act_ign.sa_flags = SA_RESTART; \ if (sigaction(sigprof, 0, &act_save)) { \ perror("sigaction(save)"); \ sigprof = 0; \ } else if (sigaction(sigprof, &act_ign, 0)) perror("sigaction(clear)"); \ /*gasneti_console_message("INFO","SIGPROF sa_flags=\t%x sa_handler=%p sa_sigaction=%p", act_save.sa_flags, act_save.sa_handler, act_save.sa_sigaction);*/ \ } \ /* wait a bit.. */ \ pause = MIN(1e9,pause<<3); \ gasneti_nsleep(pause); \ continue; /* retry */ \ } else break; /* unrecognized error */ \ } \ if_pf (result == error_result) { \ gasneti_console_message("WARNING", #xpmem_call" failed: %s(%i) (%i retries)\n", strerror(err), err, retry); \ } \ if (sigprof) { /* restore signal handler */ \ if (sigaction(sigprof, &act_save, 0)) perror("sigaction(restore)"); \ } \ errno = err; \ } while (0) extern gasneti_xpmem_segid_t gasneti_xpmem_make(void *base, size_t size) { gasneti_xpmem_segid_t result; #if HAVE_XPMEM_MAKE_2 GASNETI_XPMEM_WRAP((gasneti_xpmem_segid_t)(-1), result = xpmem_make_2(base, size, XPMEM_PERMIT_MODE, (void *)(uintptr_t)0600)); #else GASNETI_XPMEM_WRAP((gasneti_xpmem_segid_t)(-1), result = xpmem_make(base, size, XPMEM_PERMIT_MODE, (void *)(uintptr_t)0600)); #endif return result; } extern xpmem_apid_t gasneti_xpmem_get(xpmem_segid_t segid) { gasneti_xpmem_apid_t result; #if HAVE_XPMEM_MAKE_2 GASNETI_XPMEM_WRAP((gasneti_xpmem_apid_t)-1, result = xpmem_get_2(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL)); #else GASNETI_XPMEM_WRAP((gasneti_xpmem_apid_t)-1, result = xpmem_get(segid, XPMEM_RDWR, XPMEM_PERMIT_MODE, NULL)); #endif return result; } //----------------------------------------------------------------------------- #endif #if defined(GASNETI_USE_HUGETLBFS) /* Apply the default hugepage size (if enabled) for mapping of the requested size. * The given size is adjusted for proper alignment and returned. */ static uintptr_t maybe_huge_pagesz(void *addr, uintptr_t size) { static uintptr_t pagesz = 0; if (!pagesz) pagesz = gasneti_hugepagesize(); gasneti_assert_uint((uintptr_t)addr % pagesz ,==, 0); /* alignment check */ return GASNETI_ALIGNUP(size, pagesz); } extern void *gasneti_huge_mmap(void *addr, uintptr_t size) { int mmap_flags = MAP_SHARED | (addr ? GASNETI_MMAP_FIXED_FLAG : GASNETI_MMAP_NOTFIXED_FLAG); int fd = -1; if (gasneti_use_hugetlbfs()) { fd = hugetlbfs_unlinked_fd(); } else { mmap_flags |= GASNETI_MAP_ANONYMOUS; } void *ptr = mmap(addr, maybe_huge_pagesz(addr, size), (PROT_READ|PROT_WRITE), mmap_flags, fd, 0); if (fd >= 0) { int save_errno = errno; (void) close(fd); errno = save_errno; } return ptr; } extern void gasneti_huge_munmap(void *addr, uintptr_t size) { if (munmap(addr, maybe_huge_pagesz(addr, size)) != 0) gasneti_fatalerror("munmap("GASNETI_LADDRFMT",%"PRIuPTR") failed: %s\n", GASNETI_LADDRSTR(addr), size, strerror(errno)); } #endif /* defined(GASNETI_USE_HUGETLBFS) */ #if GASNET_PSHM static void gasneti_pshm_unlink(int pshm_rank); /* create the object/region/segment and return its address */ static void * gasneti_pshm_mmap(int pshm_rank, void *segbase, size_t segsize) { const int create = (pshm_rank == gasneti_pshm_mynode) || ((pshm_rank == gasneti_pshm_nodes) && !gasneti_pshm_mynode); void * ptr = MAP_FAILED; gasneti_assert(gasneti_use_shared_allocator); #if defined(GASNETI_PSHM_SYSV) const int flags = S_IRUSR | S_IWUSR | (create ? ( IPC_CREAT | IPC_EXCL ) : 0); /* Create and size in 1 step */ int id = shmget(gasneti_pshm_sysvkeys[pshm_rank], segsize, flags); if (id == -1) { #if PLATFORM_OS_CYGWIN if (errno == ENOSYS) { gasneti_fatalerror("Cygwin's SystemV shared memory support is not enabled."); } #endif if (errno == EINVAL) { // shmget() returns EINVAL for (size > SHMMAX), among other causes // TODO: can we confirm that is the actual cause? errno = ENOMEM; } if (errno == ENOSPC) { // shmget() returns ENOSPC for (total_size > SHMALL), among other causes // TODO: can we confirm that is the actual cause? errno = ENOMEM; } ptr = MAP_FAILED; goto out; } /* map */ ptr = shmat(id, segbase, 0); if (ptr == (void *)(intptr_t)(-1)) ptr = MAP_FAILED; #elif defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_POSIX) const int flags = O_RDWR | (create ? ( O_CREAT | O_EXCL ) : 0); const char *filename = gasneti_pshmname[pshm_rank]; int fd = -1; /* create or open */ #if defined(GASNETI_PSHM_FILE) #if defined(GASNETI_USE_HUGETLBFS) segsize = maybe_huge_pagesz(segbase, segsize); #endif fd = open(filename, flags, S_IRUSR | S_IWUSR); #elif defined(GASNETI_PSHM_POSIX) fd = shm_open(filename, flags, S_IRUSR | S_IWUSR); #if PLATFORM_OS_DARWIN if ((fd == -1) && (errno == EEXIST)) { /* Work around Darwin stupidity observed by Filip */ int retries_remain = 32; do { gasneti_sched_yield(); fd = shm_open(filename, flags, S_IRUSR | S_IWUSR); } while ((fd == -1) && (errno == EEXIST) && retries_remain--); } #endif #else #error #endif if (fd == -1) { ptr = MAP_FAILED; goto out; } /* size on create only */ if (create && ftruncate(fd, segsize)) { /* resize failed - fall through */ } else { /* map */ const int mmap_flags = MAP_SHARED | GASNETI_MMAP_NOSYNC_FLAG | (segbase ? GASNETI_MMAP_FIXED_FLAG : GASNETI_MMAP_NOTFIXED_FLAG); ptr = mmap(segbase, segsize, (PROT_READ|PROT_WRITE), mmap_flags, fd, 0); } { const int save_errno = errno; (void) close(fd); errno = save_errno; } #elif defined(GASNETI_PSHM_XPMEM) if (create) { #if GASNETI_USE_HUGETLBFS ptr = gasneti_huge_mmap(segbase, segsize); #else const int mmap_flags = GASNETI_MAP_ANONYMOUS | MAP_SHARED | \ (segbase ? GASNETI_MMAP_FIXED_FLAG : GASNETI_MMAP_NOTFIXED_FLAG); ptr = mmap(segbase, segsize, (PROT_READ|PROT_WRITE), mmap_flags, 0, 0); #endif } else { gasneti_xpmem_segid_t segid; segid = (pshm_rank == gasneti_pshm_nodes) ? gasneti_pshm_segid_aux : gasneti_pshm_segids[pshm_rank]; gasneti_xpmem_apid_t apid = gasneti_xpmem_get(segid); if (apid != (gasneti_xpmem_apid_t)-1) { #if HAVE_XPMEM_MAKE_2 ptr = xpmem_attach_2(apid, 0, segsize, segbase); #else gasneti_xpmem_addr_t xa; xa.offset = 0; xa.gasneti_xpmem_apid = apid; ptr = xpmem_attach(xa, segsize, segbase); #endif } gasneti_pshm_apids[pshm_rank] = apid; } #else #error #endif if_pf (create && (ptr == MAP_FAILED)) { const int save_errno = errno; gasneti_pshm_unlink(pshm_rank); errno = save_errno; } out: GASNETI_TRACE_PRINTF(I, ("gasneti_pshm_mmap(%d, %p, %"PRIuSZ") create=%d ptr=%p", pshm_rank, segbase, segsize, create, ptr)); return ptr; } /* Helper: remove local object's mapping from address space */ static void gasneti_pshm_munmap(void *segbase, uintptr_t segsize) { gasneti_assert(segsize > 0); GASNETI_TRACE_PRINTF(I, ("gasneti_pshm_munmap(%p, %"PRIuSZ")", segbase, segsize)); if (! gasneti_use_shared_allocator) { gasneti_munmap(segbase, segsize); return; } #if defined(GASNETI_PSHM_SYSV) if (shmdt(segbase) != 0) { gasneti_fatalerror("shmdt("GASNETI_LADDRFMT") failed: %s\n", GASNETI_LADDRSTR(segbase), strerror(errno)); } #elif defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_POSIX) || defined(GASNETI_PSHM_XPMEM) gasneti_munmap(segbase, segsize); #else #error #endif gasneti_pshm_unlink(gasneti_pshm_mynode); } static void gasneti_munmap_remote(gex_Rank_t pshm_rank, void *segbase, uintptr_t segsize) { gasneti_assert(gasneti_use_shared_allocator); gasneti_assert(segsize > 0); #if defined(GASNETI_PSHM_SYSV) if (shmdt(segbase) != 0) { gasneti_fatalerror("shmdt("GASNETI_LADDRFMT") failed: %s\n", GASNETI_LADDRSTR(segbase), strerror(errno)); } #elif defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_POSIX) gasneti_munmap(segbase, segsize); #elif defined(GASNETI_PSHM_XPMEM) #if HAVE_XPMEM_MAKE_2 xpmem_detach_2(segbase, segsize); xpmem_release_2(gasneti_pshm_apids[pshm_rank]); #else xpmem_detach(segbase); xpmem_release(gasneti_pshm_apids[pshm_rank]); #endif #else #error #endif } // If `do_sync` is non-zero, then must be called collectively and will // include a barrier if one is necessary for access to written data. // Otherwise, safe to call non-collectively. GASNETI_INLINE(gasneti_publish_segment) void gasneti_publish_segment(gasnet_seginfo_t segment, int do_sync) { void *segbase = segment.addr; uintptr_t segsize = segment.size; #if defined(GASNETI_PSHM_XPMEM) /* Create and publish xpmem segment ids */ gasneti_pshm_segids[gasneti_pshm_mynode] = gasneti_xpmem_make(segbase, segsize); if (do_sync) gasneti_pshmnet_bootstrapBarrier(); #else /* empty */ #endif } /* Helper: destroy the "attach point" */ static void gasneti_pshm_unlink(int pshm_rank){ if (!gasneti_use_shared_allocator) return; #if defined(GASNETI_PSHM_SYSV) int shmget_id = shmget(gasneti_pshm_sysvkeys[pshm_rank], 0, 0); (void)shmctl(shmget_id, IPC_RMID, NULL); #elif defined(GASNETI_PSHM_FILE) const char *filename = gasneti_pshmname[pshm_rank]; (void)unlink(filename); #elif defined(GASNETI_PSHM_POSIX) const char *filename = gasneti_pshmname[pshm_rank]; (void)shm_unlink(filename); #elif defined(GASNETI_PSHM_XPMEM) /* Nothing to do */ #else #error #endif } /* gasneti_pshm_unlink() so the shared memory will disappear upon exit. * This must be called collectively, because barriers are * used to prevent races against shm_open() before or after. */ static void gasneti_unlink_segments(void) { gasneti_pshmnet_bootstrapBarrier(); #if defined(GASNETI_PSHM_XPMEM) /* Nothing to do because gasneti_pshm_unlink() is a no-op */ #else gasneti_pshm_unlink(gasneti_pshm_mynode); gasneti_pshmnet_bootstrapBarrier(); #endif } /* Try to unlink everything we can, ignoring errors */ static void gasneti_cleanup_shm(void) { if (!gasneti_use_shared_allocator) return; // nothing to cleanup #ifdef GASNETI_PSHM_SYSV /* Unlink the segments and vnet */ if (gasneti_pshm_sysvkeys) { gasneti_local_rmb(); for (int i=0; i "GASNETI_LADDRFMT"%s%s\n", (segbase == NULL?"":"fixed"), GASNETI_LADDRSTR(segbase), segsize, gasneti_ticks_to_ns(t2-t1)/1000.0, GASNETI_LADDRSTR(ptr), (ptr == MAP_FAILED?" MAP_FAILED: ":""), (ptr == MAP_FAILED?strerror(mmap_errno):""))); if ((ptr == MAP_FAILED) && !may_fail) { gasneti_cleanup_shm(); int is_aux = (pshmnode == gasneti_pshm_nodes); const char *type = is_aux ? "aux" : "client"; const char *op = ((pshmnode == gasneti_pshm_mynode) || (is_aux && !gasneti_pshm_mynode)) ? "allocation" : "cross-mapping"; if (mmap_errno != ENOMEM) { #if PLATFORM_OS_CYGWIN if (mmap_errno != EACCES) /* Cygwin stupidly returns EACCES for insuff mem */ #elif PLATFORM_OS_SOLARIS if (mmap_errno != EAGAIN) /* Solaris stupidly returns EAGAIN for insuff mem */ #endif gasneti_fatalerror("unexpected error in %s%s of %s segment of size %"PRIuPTR": %s\n", (segbase == NULL?"":"fixed-address "), op, type, segsize, strerror(mmap_errno)); } if (!segbase) { gasneti_fatalerror("%s failed for %s segment of size %"PRIuPTR": %s", op, type, segsize, strerror(mmap_errno)); } else { gasneti_fatalerror("fixed-address %s failed at "GASNETI_LADDRFMT" for %s segment of size %"PRIuPTR": %s" GASNETI_BUG3480_MSG, op, GASNETI_LADDRSTR(segbase), type, segsize, strerror(mmap_errno)); } } if ((ptr != (void*)GASNETI_PAGE_ALIGNDOWN(ptr)) && (ptr != MAP_FAILED)) { gasneti_cleanup_shm(); gasneti_fatalerror("mmap result "GASNETI_LADDRFMT" is not aligned to GASNET_PAGESIZE %lu (0x%lx)", GASNETI_LADDRSTR(ptr), (unsigned long)GASNET_PAGESIZE, (unsigned long)GASNET_PAGESIZE); } #if !GASNETI_PSHM_MAP_FIXED_IGNORED if (segbase && (segbase != ptr) && (ptr != MAP_FAILED)) { gasneti_cleanup_shm(); gasneti_fatalerror("mmap fixed moved from "GASNETI_LADDRFMT" to "GASNETI_LADDRFMT" for size %"PRIuPTR, GASNETI_LADDRSTR(segbase), GASNETI_LADDRSTR(ptr), segsize); } #endif return ptr; } static void *gasneti_mmap_remote_shared(void *segbase, uintptr_t segsize, gex_Rank_t pshmnode) { gasneti_assert_uint(pshmnode ,<, gasneti_pshm_nodes); return gasneti_mmap_shared_internal(pshmnode, segbase, segsize, 0); } extern void *gasneti_mmap_shared_fixed(void *segbase, uintptr_t segsize, int mayfail) { return gasneti_mmap_shared_internal(gasneti_pshm_mynode, segbase, segsize, mayfail); } extern void *gasneti_mmap_shared(uintptr_t segsize) { return gasneti_mmap_shared_internal(gasneti_pshm_mynode, NULL, segsize, 1); } extern void *gasneti_mmap_vnet(uintptr_t size, gasneti_bootstrapBroadcastfn_t nbrhdbcastfn) { void *ptr = MAP_FAILED; int save_errno = 0; #if defined(GASNETI_PSHM_SYSV) && PLATFORM_OS_CYGWIN /* Cygwin may raise SIGSYS when SysV support is absent. This will yield more informative error messages. */ gasneti_sighandlerfn_t prev_handler = gasneti_reghandler(SIGSYS, SIG_IGN); #endif // Step 0 (unconditional) // All processes perform common declaration/allocation/initialization #if defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_SYSV) || defined(GASNETI_PSHM_POSIX) char unique[GASNETI_PSHM_UNIQUE_LEN]; #elif defined(GASNETI_PSHM_XPMEM) gasneti_xpmem_segid_t segid = (gasneti_xpmem_segid_t)(-1); gasneti_pshm_apids = gasneti_use_shared_allocator ? gasneti_malloc(sizeof(gasneti_xpmem_apid_t) * (gasneti_pshm_nodes + 1)) : NULL; #else #error "Unknown PSHM implementation" #endif // Step 1 (IFF gasneti_use_shared_allocator) // First process in each supernode creates the segment and any names/keys/etc. if (gasneti_use_shared_allocator && !gasneti_pshm_mynode) { #if defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_SYSV) || defined(GASNETI_PSHM_POSIX) const char *tmp = gasneti_pshm_makeunique(NULL); memcpy(unique, tmp, GASNETI_PSHM_UNIQUE_LEN); ptr = gasneti_mmap_shared_internal(gasneti_pshm_nodes, NULL, size, 1); #elif defined(GASNETI_PSHM_XPMEM) ptr = gasneti_mmap_shared_internal(gasneti_pshm_nodes, NULL, size, 1); if (ptr != MAP_FAILED) { segid = gasneti_xpmem_make(ptr, size); } #endif save_errno = errno; } // Step 2 (unconditional) // Neighborhood-scoped bcast communicates the names/keys/etc. generated by the firsts // Needed even when !gasneti_use_shared_allocator, since some implementations // of nbrhdbcast communicate globally, and there might be nbhrds in which // gasneti_use_shared_allocator is non-zero (e.g. 3 procs on 2 hosts). #if defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_SYSV) || defined(GASNETI_PSHM_POSIX) (*nbrhdbcastfn)(unique, GASNETI_PSHM_UNIQUE_LEN, unique, gasneti_pshm_firstnode); #elif defined(GASNETI_PSHM_XPMEM) (*nbrhdbcastfn)(&segid, sizeof(segid), &gasneti_pshm_segid_aux, gasneti_pshm_firstnode); #endif // Step 3 (unconditional, since gasneti_pshm_mynode!=0 implies use of shared allocator) // Processes other than the first attach if (gasneti_pshm_mynode != 0) { gasneti_assert(gasneti_use_shared_allocator); #if defined(GASNETI_PSHM_FILE) || defined(GASNETI_PSHM_SYSV) || defined(GASNETI_PSHM_POSIX) (void)gasneti_pshm_makeunique(unique); ptr = gasneti_mmap_shared_internal(gasneti_pshm_nodes, NULL, size, 1); #elif defined(GASNETI_PSHM_XPMEM) ptr = gasneti_mmap_shared_internal(gasneti_pshm_nodes, NULL, size, 1); #endif save_errno = errno; } // Step 4 (IFF !gasneti_use_shared_allocator) // Allocate "regular" memory if (! gasneti_use_shared_allocator) { gasneti_assert_always_ptr(ptr ,==, MAP_FAILED); // NOT set since decl ptr = gasneti_mmap(size); errno = save_errno; } #if defined(GASNETI_PSHM_SYSV) && PLATFORM_OS_CYGWIN gasneti_reghandler(SIGSYS, prev_handler); #endif /* restore the pertinent errno, if any */ errno = save_errno; return (ptr == MAP_FAILED) ? NULL : ptr; } extern void gasneti_unlink_vnet(void) { gasneti_pshm_unlink(gasneti_pshm_nodes); } #endif /* GASNET_PSHM */ /* ------------------------------------------------------------------------------------ */ #if HAVE_MMAP extern void gasneti_munmap(void *segbase, uintptr_t segsize) { gasneti_tick_t t1, t2; gasneti_assert(segsize > 0); t1 = gasneti_ticks_now(); #if defined(GASNETI_USE_HUGETLBFS) gasneti_huge_munmap(segbase, segsize); #else if (munmap(segbase, segsize) != 0) gasneti_fatalerror("munmap("GASNETI_LADDRFMT",%"PRIuPTR") failed: %s\n", GASNETI_LADDRSTR(segbase), segsize, strerror(errno)); #endif t2 = gasneti_ticks_now(); GASNETI_TRACE_PRINTF(D,("munmap("GASNETI_LADDRFMT", %"PRIuPTR"): %.3fus\n", GASNETI_LADDRSTR(segbase), segsize, gasneti_ticks_to_ns(t2-t1)/1000.0) ); } #endif /* ------------------------------------------------------------------------------------ */ #if GASNET_PSHM #define gasneti_do_mmap gasneti_mmap_shared #define gasneti_do_mmap_fixed gasneti_mmap_shared_fixed #define gasneti_do_munmap gasneti_pshm_munmap #else #define gasneti_do_mmap gasneti_mmap #define gasneti_do_mmap_fixed gasneti_mmap_fixed #define gasneti_do_munmap gasneti_munmap #endif #if GASNETI_BUG3480_WORKAROUND // Bounded retry on FIXED mappings static void *gasneti_mmap_fixed_with_retry(void *segbase, uintptr_t segsize, int mayfail) { const uint64_t max_delay = 2e7; uint64_t delay = 1e3; const int max_retries = 100; int retries = 0; void *ptr = gasneti_do_mmap_fixed(segbase, segsize, 1); while ((ptr == MAP_FAILED) && (errno == ENOMEM) && (retries++ < max_retries)) { GASNETI_TRACE_PRINTF(I, ("Bug 3480: retry #%d delay %gs\n", retries, 1e-9*delay)); (void) gasneti_nsleep(delay); delay = MIN(max_delay, delay * 2); ptr = gasneti_do_mmap_fixed(segbase, segsize, 1); } if (ptr == MAP_FAILED && !mayfail) { int save_errno = errno; #if GASNET_PSHM gasneti_cleanup_shm(); #endif gasneti_fatalerror("mmap fixed failed at "GASNETI_LADDRFMT" for size %"PRIuPTR": %s", GASNETI_LADDRSTR(segbase), segsize, strerror(save_errno)); } return ptr; } #undef gasneti_do_mmap_fixed #define gasneti_do_mmap_fixed gasneti_mmap_fixed_with_retry // Host-scoped barrier used between unmap and re-map. // This is needed even in the presence of PHSM support because // gasneti_pshmnet_bootstrapBarrier() may have a narrower scope // when GASNET_SUPERNODE_MAXSIZE is set. #define gasneti_bug3480_fence() gasneti_host_barrier() #else #define gasneti_bug3480_fence() ((void)0) #endif // GASNETI_BUG3480_WORKAROUND /* binary search for segment - returns location, not mmaped */ static gasnet_seginfo_t gasneti_mmap_binary_segsrch(uintptr_t lowsz, uintptr_t highsz) { gasnet_seginfo_t si; if (highsz - lowsz <= MAX(GASNETI_MMAP_GRANULARITY,gasneti_mmap_pagesize())) { si.size = 0; si.addr = NULL; return si; } si.size = gasneti_mmap_aligndown((lowsz + (highsz - lowsz) / 2)); gasneti_assert(si.size > 0); si.addr = gasneti_do_mmap(si.size); if (si.addr == MAP_FAILED) return gasneti_mmap_binary_segsrch(lowsz, si.size); else { gasnet_seginfo_t si_temp; gasneti_do_munmap(si.addr, si.size); si_temp = gasneti_mmap_binary_segsrch(si.size, highsz); if (si_temp.size) return si_temp; else return si; } } /* descending linear search for segment - returns location mmaped */ static gasnet_seginfo_t gasneti_mmap_lineardesc_segsrch(uintptr_t highsz) { const uintptr_t pagesize = gasneti_mmap_pagesize(); gasnet_seginfo_t si; si.addr = MAP_FAILED; si.size = highsz; while (si.addr == MAP_FAILED && si.size > pagesize) { si.size -= pagesize; si.addr = gasneti_do_mmap(si.size); } if (si.addr == MAP_FAILED) { si.addr = NULL; si.size = 0; } return si; } /* ascending linear search for segment - returns location, not mmaped */ static gasnet_seginfo_t gasneti_mmap_linearasc_segsrch(uintptr_t highsz) { const uintptr_t pagesize = gasneti_mmap_pagesize(); gasnet_seginfo_t si; gasnet_seginfo_t last_si = { NULL, 0 }; si.size = pagesize; si.addr = gasneti_do_mmap(si.size); while (si.addr != MAP_FAILED && si.size <= highsz) { last_si = si; gasneti_do_munmap(last_si.addr, last_si.size); si.size += pagesize; si.addr = gasneti_do_mmap(si.size); } if (si.addr == MAP_FAILED) return last_si; else { gasneti_do_munmap(si.addr, si.size); return si; } } /* Differs from gasneti_mmap_segment_search() in that: * + maxsz must already be page aligned and non-zero * + zero-length result is not an error */ static gasnet_seginfo_t _gasneti_mmap_segment_search_inner(uintptr_t maxsz) { gasnet_seginfo_t si; uintptr_t prevsz = 0; int mmaped = 0; again: gasneti_assert(maxsz); gasneti_assert_uint(maxsz ,==, gasneti_mmap_aligndown(maxsz)); si.addr = gasneti_do_mmap(maxsz); if (si.addr != MAP_FAILED) { /* succeeded at max value - done */ si.size = maxsz; mmaped = 1; } else { /* use a search to find largest possible */ #if 0 /* linear descending search best on systems with fast mmap-failed and very slow unmap and/or mmap-succeed */ si = gasneti_mmap_lineardesc_segsrch(maxsz); mmaped = 1; #elif 0 /* linear ascending search best on systems with fast mmap-succeed and fast unmap but very slow mmap-failed */ si = gasneti_mmap_linearasc_segsrch(maxsz); mmaped = 0; #else /* binary search best for systems with well-balanced mmap performance */ si = gasneti_mmap_binary_segsrch(0, maxsz); mmaped = 0; #endif } if (si.addr == NULL) { si.size = 0; return si; } gasneti_assert(si.addr != NULL && si.addr != MAP_FAILED && si.size > 0); gasneti_assert_uint(si.size % GASNET_PAGESIZE ,==, 0); if (mmaped && ((uintptr_t)si.addr) % GASNET_PAGESIZE == 0) { /* aligned and mmaped - nothing to do */ } else { /* need to page-align base */ if (mmaped) gasneti_do_munmap(si.addr, si.size); // ensure alignment of base and size to expected granularity, even if system's page size is smaller { uintptr_t begin = (uintptr_t)si.addr; uintptr_t end = (uintptr_t)si.addr + si.size; begin = GASNETI_PAGE_ALIGNUP(begin); end = GASNETI_PAGE_ALIGNDOWN(end); si.addr = (void *)begin; si.size = end - begin; if (si.size == 0) goto fail; } // perform a *fixed* mapping to preserve alignment achieved above void *ptr = gasneti_do_mmap_fixed(si.addr, si.size, 1); if (ptr == MAP_FAILED && errno == ENOMEM) { // Failed to mmap a size at which the probe had once succeeded (bug 3812). // Attempt bounded linear-descending retries. const uintptr_t pagesize = gasneti_mmap_pagesize(); for (int i = 1; i <= 4; ++i) { if (si.size <= pagesize) goto fail; si.size -= pagesize; ptr = gasneti_do_mmap_fixed(si.addr, si.size, 1); if (ptr != MAP_FAILED) { GASNETI_TRACE_PRINTF(I, ("Segment search final mmap trimmed by %"PRIuPTR, i * pagesize)); break; } else if (errno != ENOMEM) { // unexpected failure - skip to "second chance" or give up break; } } } if (ptr == MAP_FAILED) { if (!prevsz) { // "Second chance" (used at most once) // Restart using the most recent failed size as the new maximum GASNETI_TRACE_PRINTF(I, ("Segment search final mmap failed. Starting second-chance search.")); prevsz = maxsz = si.size; goto again; } else { goto fail; } } #if GASNETI_PSHM_MAP_FIXED_IGNORED si.addr = ptr; #else gasneti_assert_ptr(si.addr ,==, ptr); #endif } if (prevsz) { GASNETI_TRACE_PRINTF(I, ("Segment search second-chance reduced size by %"PRIuPTR, prevsz - si.size)); } GASNETI_TRACE_PRINTF(I, ("Segment search final size: %"PRIuPTR, si.size)); gasneti_assert(si.addr != NULL && si.addr != MAP_FAILED && si.size > 0); gasneti_assert_uint(((uintptr_t)si.addr) % GASNET_PAGESIZE ,==, 0); gasneti_assert_uint(si.size % GASNET_PAGESIZE ,==, 0); return si; fail: GASNETI_TRACE_PRINTF(I, ("Segment search failed (found max size of 0)")); si.addr = NULL; si.size = 0; return si; } /* gasneti_mmap_segment_search allocates the largest possible page-aligned mmap * with sz <= maxsz and returns the base address and size */ extern gasnet_seginfo_t gasneti_mmap_segment_search(uintptr_t maxsz) { gasnet_seginfo_t si; maxsz = gasneti_mmap_aligndown(maxsz); if (maxsz == 0) { si.size = 0; si.addr = NULL; return si; } si = _gasneti_mmap_segment_search_inner(maxsz); if (si.addr == NULL) gasneti_fatalerror("Unable to find an adequate mmap segment."); return si; } /* ------------------------------------------------------------------------------------ */ #endif /* GASNETI_MMAP_OR_PSHM */ GASNETI_IDENT(gasneti_IdentString_DefaultMaxSegsizeStr, "$GASNetDefaultMaxSegsizeStr: " GASNETI_MAX_SEGSIZE_CONFIGURE " $"); /* return user-selected limit for the max segment size, as gleaned from several sources */ const char *gasnet_max_segsize_str; // intentional tentative definition, to allow client override uint64_t gasnet_max_segsize; // DEPRECATED: intentional tentative definition, to allow client override uintptr_t gasneti_max_segsize(void) { static uintptr_t result = 0; uint64_t tmp; if (!result) { uintptr_t auxsegsz = gasneti_auxseg_preinit(); uint64_t pph = gasneti_myhost.node_count; gasneti_assert(pph > 0); /* start with the configure-selected default */ const char *dflt = GASNETI_MAX_SEGSIZE_CONFIGURE; /* next, check the compile-time overrides */ if (gasnet_max_segsize) { // lower-priority deprecated override, interpreted as /p static char tmp[80]; snprintf(tmp,sizeof(tmp),"%"PRIu64"/p",gasnet_max_segsize); dflt = tmp; } if (gasnet_max_segsize_str) { // higher-priority string override dflt = gasnet_max_segsize_str; } #if PLATFORM_ARCH_32 && !defined(GASNETI_ALLOW_HUGE_32BIT_SEGMENT) /* need to be careful about overflow on 32-bit: can't use a full 4 GB due to sign bit problems on the int argument to mmap() for some 32-bit systems so use 2GB - pagesz */ uint64_t hardmax = (((uint64_t)1)<<31) - GASNET_PAGESIZE; #else uint64_t hardmax = (uint64_t)-1; // unlimited #endif // finally, check the environment override, parse the result and factor in min/max/auxseg uint64_t val = gasneti_getenv_memsize_withdefault("GASNET_MAX_SEGSIZE", dflt, GASNET_PAGESIZE, hardmax, gasneti_getPhysMemSz(1), pph, 0); // round UP to nearest huge page, if needed, to ensure we don't truncate client's MAX_SEGSIZE request val = gasneti_mmap_alignup(val); gasneti_assert_uint(val ,==, GASNETI_PAGE_ALIGNDOWN(val)); gasneti_assert_uint(val ,>=, GASNET_PAGESIZE); gasneti_assert_uint(val ,<=, hardmax); result = (uintptr_t)val; gasneti_assert_uint(result ,==, val); // overflow check } return result; } // gasneti_sharedLimit() // // Returns the per-host shared memory limit ("the limit") imposed by the active // PSHM implementation and current resource utilization. If PSHM is not // enabled, or if there are no limits specific to the implementation, returns // gasneti_getPhysMemSz() or (uint64_t)-1 if that call should fail. // // Limits by PSHM implementation: // FILE: free space reported by fstatvfs() if available // POSIX: free space reported by fstatvfs() if available // SYSV: UNIMPLEMENTED (but probably not needed) // We are not yet checking for the "shmall" or "shmmaxpgs" limits, // from which we'd need to subtract the current segments as one // might see with `ipcs`. HOWEVER, unlike the filesystem limits // for FILE and POSIX, we believe that the segmentLimit() probe // will observe the actual free resources, and NOT overcommit. // XPMEM: NONE - just windows into other proc's address space // uint64_t gasneti_sharedLimit(void) { uint64_t sharedLimit; // Start with appropriate system-dependent memory limits { const uint64_t hostmem = gasneti_getPhysMemSz(0); sharedLimit = hostmem ? hostmem : (uint64_t)-1; } #if GASNET_PSHM && (GASNETI_PSHM_FILE || GASNETI_PSHM_POSIX) && HAVE_FSTATVFS if (gasneti_use_shared_allocator) { // Apply limits appropriate to filesystem-backed allocation const int flags = O_RDWR | O_CREAT | O_EXCL; const mode_t mode = S_IRUSR | S_IWUSR; const char *filename = gasneti_pshmname[gasneti_pshm_mynode]; struct statvfs buf; #if GASNETI_PSHM_POSIX int fd = shm_open(filename, flags, mode); #else int fd = open(filename, flags, mode); #endif if (fd >= 0) { // TODO: for now we ignore any errors here if (0 == fstatvfs(fd, &buf)) { uint64_t free_space = (uint64_t)buf.f_bsize * (uint64_t)buf.f_bavail; if (free_space) { sharedLimit = MIN(sharedLimit, free_space); } } (void) close(fd); #if GASNETI_PSHM_POSIX (void) shm_unlink(filename); #else (void) unlink(filename); #endif } } #endif return sharedLimit; } #ifdef GASNETI_MMAP_OR_PSHM /* perform a coordinated mmap probe to determine the max memory that can be mmap()ed while considering multiple GASNet nodes per shared memory node localLimit is an optional conduit-specific upper limit per GASNet node sharedLimit is an optional upper limit per host requires an exchangefn callback function that can be used to exchange data and a barrierfn callback to perform a barrier returns a value suitable for use as localSegmentLimit in a call to gasneti_segmentInit() for exchangefn and barrierfn: the implementations are only required to perform their functions with respect the peers on a host (though exchangefn does require a "full" third argument). however, global implementations are acceptable If exchangefn is NULL, then gasneti_host_sumu64() is used, which required that gex_AM_RequestShort() be usable. If barrierfn is NULL, then gasneti_host_barrier() is used, which requires that gex_AM_RequestShort() be usable. So a conduit only needs to provide an exchangefn or barrierfn when gex_AM_RequestShort() is not usable, or when it can provide a more efficient alternative. */ uintptr_t gasneti_segmentLimit(uintptr_t localLimit, uint64_t sharedLimit, gasneti_bootstrapExchangefn_t exchangefn, gasneti_bootstrapBarrierfn_t barrierfn) { int i; const gex_Rank_t local_count = gasneti_myhost.node_count; #if GASNET_PSHM gasneti_pshm_cs_enter(" in gasneti_segmentLimit()", &gasneti_cleanup_shm); #endif // This is assumed implictly gasneti_assert_uint(gasneti_mmap_pagesize() ,>=, GASNETI_PAGESIZE); if (! barrierfn) barrierfn = &gasneti_host_barrier; gasneti_assert(gasneti_nodemap); /* Apply intial limits, even if not sharing nodes */ uintptr_t auxsegsz = gasneti_auxseg_preinit(); uintptr_t maxsz = MAX(GASNETI_MMAP_LIMIT, auxsegsz); maxsz = gasneti_mmap_alignup(maxsz); if ((uint64_t)localLimit > sharedLimit) localLimit = sharedLimit; maxsz = MIN(maxsz, localLimit); /* Coordinate the search IFF there are any shared nodes. */ if (gasneti_myhost.grp_count != gasneti_nodes) { gasnet_seginfo_t se = {0,0}; /* Ensure our probe will not collectively exceed the shareLimit, if any. */ if ((sharedLimit != (uint64_t)-1) && (local_count > 1)) { uint64_t tmp = sharedLimit / local_count; tmp = MIN(tmp,(uintptr_t)-1); // avoid overflowing 32-bit maxsz on ILP32 maxsz = MIN(maxsz,tmp); } /* Allow each node in a given host to probe SEQUENTIALLY, and then collect the results */ maxsz = gasneti_mmap_aligndown(maxsz); #if GASNET_PSHM if (maxsz && (gasneti_myhost.grp_count == gasneti_mysupernode.grp_count)) { /* host==supernode */ for (i = 0; i < gasneti_nodemap_local_count; ++i) { if (i == gasneti_nodemap_local_rank) { se = _gasneti_mmap_segment_search_inner(maxsz); maxsz = se.size; } /* Bcast because we can use "declining expectations" to potentially speed later probes */ gasneti_pshmnet_bootstrapBroadcast(gasneti_request_pshmnet, &maxsz, sizeof(uintptr_t), &maxsz, i); if (!maxsz) break; } } else #endif if (maxsz) { /* Find widest host */ gex_Rank_t rounds = 0; { const gex_Rank_t num_hosts = gasneti_myhost.grp_count; gex_Rank_t *tmp = gasneti_calloc(num_hosts, sizeof(gex_Rank_t)); for (i = 0; i < gasneti_nodes; ++i) { const gex_Rank_t host = gasneti_nodeinfo[i].host; gasneti_assert_uint(host ,<, num_hosts); tmp[host] += 1; rounds = MAX(rounds, tmp[host]); } gasneti_free(tmp); } for (i = 0; i < rounds; ++i) { if (i == gasneti_myhost.node_rank) { se = _gasneti_mmap_segment_search_inner(maxsz); } (*barrierfn)(); } } // Compute the host-local mean uint64_t sum = 0; if (exchangefn) { uintptr_t *sz_exchg = gasneti_calloc(gasneti_nodes, sizeof(uintptr_t)); (*exchangefn)(&se.size, sizeof(uintptr_t), sz_exchg); for (i = 0; i < local_count; ++i) { sum += sz_exchg[gasneti_myhost.nodes[i]]; } gasneti_free(sz_exchg); } else { sum = gasneti_host_sumu64(se.size); } { maxsz = gasneti_mmap_aligndown(sum / local_count); #if GASNET_PSHM /* The probe completed has determined how much memory we can map. * However, we now need to be sure that multiple segments will fit. * The limit could be, for instance, due to * + RLIMIT_AS or RLIMIT_VMEM * + size of the holes in the address space (especially on 32-bit arch) * NOTE: must use pshm's view of supernode, which may be less than nodemap's. */ if (se.size) gasneti_do_munmap(se.addr, se.size); gasneti_unlink_segments(); /* Includes supernode-scoped barrier to complete munmap()s */ if (gasneti_myhost.grp_count != gasneti_mysupernode.grp_count) { // num_hosts != num_supernodes (multiple supernodes on at least one node) // Lacking a node-scoped barrier, we require a full barrier to complete munmap()s (*barrierfn)(); } se.size = 0; if (gasneti_pshm_mynode == 0 && maxsz) { gasnet_seginfo_t *tmp_se = gasneti_calloc(gasneti_pshm_nodes,sizeof(gasnet_seginfo_t)); int done; /* Iterate until we find a size for which N segments fit. * Ideally the first pass finds that the size probed above works. * If rlimit or total address space limit the mapping, then the first * iteration determines the right size and the second verifies it. * If we are limited by the size of the holes in the address space * then it may take several iterations to work out what fits. * TODO: If we reach a 3rd pass perhaps we could try something else? */ do { sum = 0; done = 1; for (i = 0; i < gasneti_pshm_nodes; ++i) { tmp_se[i] = _gasneti_mmap_segment_search_inner(maxsz); gasneti_pshm_unlink(gasneti_pshm_mynode); sum += tmp_se[i].size; if (tmp_se[i].size != maxsz) { done = 0; if (tmp_se[i].size < GASNETI_MMAP_GRANULARITY) break; } } for (i = 0; i < gasneti_pshm_nodes; ++i) { if (tmp_se[i].size) gasneti_do_munmap(tmp_se[i].addr, tmp_se[i].size); tmp_se[i].size = 0; } maxsz = gasneti_mmap_aligndown(sum / gasneti_pshm_nodes); } while (!done && maxsz); gasneti_free(tmp_se); } /* supernode-local communication of the maxsz results */ gasneti_pshmnet_bootstrapBroadcast(gasneti_request_pshmnet, &maxsz, sizeof(uintptr_t), &maxsz, 0); /* Unlink the shared segments to prevent leaks (they are recreated in segmentInit) */ gasneti_unlink_segments(); #endif } /* Free held resources */ if (se.size) gasneti_do_munmap(se.addr, se.size); (*barrierfn)(); /* Ensures munmap()s complete on-node before return */ } #if GASNET_PSHM gasneti_pshm_cs_leave(); #endif return maxsz; } #endif /* GASNETI_MMAP_OR_PSHM */ // State between segmentInit() and segmentAttach() #ifdef GASNETI_MMAP_OR_PSHM static gasnet_seginfo_t gasneti_presegment = {0,0}; #endif #if GASNET_ALIGNED_SEGMENTS static uintptr_t gasneti_maxbase; #endif /* do the work necessary for initing a standard segment map in arbitrary memory uses mmap if available, or malloc otherwise requires an exchange callback function that can be used to exchange data sets max local & global segment size localSegmentLimit provides an optional conduit-specific limit on max segment sz (for example, to limit size based on physical memory availability) pass (uintptr_t)-1 for unlimited Use of gasneti_segmentLimit() can help determine the right value to pass here keeps internal state for attach */ void gasneti_segmentInit(uintptr_t localSegmentLimit, gasneti_bootstrapExchangefn_t exchangefn, gex_Flags_t flags) { const int legacy_mode = flags & GASNETI_FLAG_INIT_LEGACY; #if GASNET_PSHM gasneti_pshm_cs_enter(" in gasneti_segmentInit()", &gasneti_cleanup_shm); #endif gasneti_assert_uint(gasneti_MaxLocalSegmentSize ,==, 0); gasneti_assert_uint(gasneti_MaxGlobalSegmentSize ,==, 0); gasneti_assert(exchangefn); gasneti_assert_uint(gasneti_nodes ,>, 0); gasneti_assert_uint(gasneti_mynode ,<, gasneti_nodes); #if GASNET_SEGMENT_EVERYTHING // Initialize global data gasneti_leak(gasneti_seginfo = gasneti_malloc(gasneti_nodes*sizeof(gasnet_seginfo_t))); gasneti_seginfo_tbl[0] = gasneti_seginfo; for (gex_Rank_t i = 0; i < gasneti_nodes; i++) { gasneti_seginfo[i].addr = NULL; gasneti_seginfo[i].size = (uintptr_t)-1; } gasneti_MaxLocalSegmentSize = (uintptr_t)-1; gasneti_MaxGlobalSegmentSize = (uintptr_t)-1; #else // GASNET_SEGMENT_EVERYTHING // PART 0: allocate (and zero-initialize) global data gasneti_leak(gasneti_seginfo = gasneti_calloc(gasneti_nodes, sizeof(gasnet_seginfo_t))); gasneti_seginfo_tbl[0] = gasneti_seginfo; // PART I: allocate "pre-segment" #ifdef GASNETI_MMAP_OR_PSHM localSegmentLimit = MIN(localSegmentLimit, GASNETI_MMAP_LIMIT); #endif localSegmentLimit = gasneti_mmap_aligndown(localSegmentLimit); #ifdef GASNETI_MMAP_OR_PSHM // NOTE: If the conduit did not derive localSegmentLimit from a call to // gasneti_segmentLimit(), then this call might lead to unexpected failures // (such as bug 651) due to it's lack of coordination among processes. gasneti_presegment = gasneti_mmap_segment_search(localSegmentLimit); GASNETI_TRACE_PRINTF(C, ("My segment: addr="GASNETI_LADDRFMT" sz=%"PRIuPTR, GASNETI_LADDRSTR(gasneti_presegment.addr), gasneti_presegment.size)); #else #if GASNET_ALIGNED_SEGMENTS && !GASNET_CONDUIT_SMP #error bad config: dont know how to provide GASNET_ALIGNED_SEGMENTS when !HAVE_MMAP #endif #endif #if GASNET_PSHM gasneti_unlink_segments(); gasneti_pshm_cs_leave(); #endif // PART II: Exchange segment info if needed for later stage // TODO-EX: Non-scalable exchange where a reduce is probably sufficient #ifdef GASNETI_MMAP_OR_PSHM gasnet_seginfo_t *gasneti_segexch = NULL; if (1) { // TODO-EX: in anticipation of alignment and Max*SegmentSize being runtime choices /* gather the mmap segment location */ gasneti_segexch = gasneti_malloc(gasneti_nodes*sizeof(gasnet_seginfo_t)); (*exchangefn)(&gasneti_presegment, sizeof(gasnet_seginfo_t), gasneti_segexch); } #endif // PART III: Optionally align segments #if GASNET_ALIGNED_SEGMENTS && defined(GASNETI_MMAP_OR_PSHM) if (legacy_mode) { // Aligned segments only available to GASNet-1 clients if (gasneti_nodes > 1) { /* bug 2067 - detect if the compute nodes are using Linux's 'intentional VM space randomization' * security feature, which is known to break GASNET_ALIGNED_SEGMENTS, esp at large scale */ FILE *fp = fopen("/proc/sys/kernel/randomize_va_space", "r"); if (fp) { int VMrand = fgetc(fp); if (VMrand != EOF && VMrand != '0') { const char *wmsg = "It appears your compute nodes are using a Linux security feature " "which intentionally randomizes the virtual address space, " "but GASNet was configured to optimize for congruent address spaces. " "You probably need to re-configure with --disable-aligned-segments to avoid " "errors at job startup (especially for runs with large node count or shared segment size)."; if (!gasneti_getenv_yesno_withdefault("GASNET_QUIET",0)) { gasneti_console_message("WARNING", "%s", wmsg); } else { GASNETI_TRACE_PRINTF(I, ("WARNING: %s", wmsg)); } } fclose(fp); } } // Find highest start and lowest end among all segments uintptr_t maxbase = (uintptr_t)gasneti_segexch[0].addr; uintptr_t minend = (uintptr_t)gasneti_segexch[0].addr + gasneti_segexch[0].size; for (int i = 1; i < gasneti_nodes; i++) { maxbase = MAX(maxbase, (uintptr_t)gasneti_segexch[i].addr); minend = MIN(minend, (uintptr_t)gasneti_segexch[i].addr + gasneti_segexch[i].size); } char alignstats[255]; snprintf(alignstats, sizeof(alignstats), "Segment alignment stats: " "maxbase = "GASNETI_LADDRFMT" " "minend = "GASNETI_LADDRFMT" ", GASNETI_LADDRSTR(maxbase), GASNETI_LADDRSTR(minend)); alignstats[sizeof(alignstats)-1] = '\0'; GASNETI_TRACE_MSG(C, alignstats); if (maxbase >= minend) { /* no overlap - maybe should be a fatal error... */ const char *wmsg = "unable to locate overlapping mmap segments: " "perhaps you need to re-configure with --disable-aligned-segments"; GASNETI_TRACE_MSG(I, wmsg); if (!gasneti_getenv_yesno_withdefault("GASNET_QUIET",0)) { gasneti_console0_message("WARNING","%s\n%s", wmsg, alignstats); for (int i = 0; i < gasneti_nodes; i++) { gasneti_console0_message("WARNING", " %i: seg=["GASNETI_LADDRFMT","GASNETI_LADDRFMT"]" " size=%"PRIuPTR"\n", i, GASNETI_LADDRSTR(gasneti_segexch[i].addr), GASNETI_LADDRSTR(((uintptr_t)gasneti_segexch[i].addr)+gasneti_segexch[i].size), gasneti_segexch[i].size); } } else { GASNETI_TRACE_PRINTF(I, ("WARNING: %s\n%s", wmsg, alignstats)); } // Zero my size (in two place) to yield Max{Local,Global}SegmentSize == 0 gasneti_presegment.size = 0; gasneti_segexch[gasneti_mynode].size = 0; } else { // Trim sizes to reflect begining at maxbase (for finding MaxGlobalSegmentSize) for (int i = 0; i < gasneti_nodes; i++) { gasneti_segexch[i].size -= (maxbase - (uintptr_t)gasneti_segexch[i].addr); } } gasneti_maxbase = maxbase; } #endif // PART IV: Compute Max{Local,Remote}SegmentSize if (1) { // TODO-EX: in anticipation of Max{Local,Global}SegmentSize becoming optional #ifdef GASNETI_MMAP_OR_PSHM /* compute min and max sizes across nodes */ uintptr_t maxsize = gasneti_segexch[0].size; uintptr_t minsize = gasneti_segexch[0].size; for (int i = 1; i < gasneti_nodes; i++) { maxsize = MAX(maxsize, gasneti_segexch[i].size); minsize = MIN(minsize, gasneti_segexch[i].size); } #if GASNET_TRACE char segstats[255]; snprintf(segstats, sizeof(segstats), "Segment stats: " "maxsize = %"PRIuPTR" " "minsize = %"PRIuPTR" ", maxsize, minsize); segstats[sizeof(segstats)-1] = '\0'; GASNETI_TRACE_MSG(C, segstats); #endif gasneti_MaxLocalSegmentSize = gasneti_presegment.size; gasneti_MaxGlobalSegmentSize = minsize; #else /* !GASNETI_MMAP_OR_PSHM */ /* some systems don't support mmap - TODO: safe mechanism to determine a true max seg sz, for now just trust gasneti_max_segsize */ gasneti_MaxLocalSegmentSize = GASNETI_PAGE_ALIGNDOWN(MIN(localSegmentLimit, gasneti_max_segsize())); gasneti_MaxGlobalSegmentSize = gasneti_MaxLocalSegmentSize; #endif GASNETI_TRACE_PRINTF(C, ("MaxLocalSegmentSize = %"PRIuPTR" MaxGlobalSegmentSize = %"PRIuPTR, gasneti_MaxLocalSegmentSize, gasneti_MaxGlobalSegmentSize)); gasneti_assert_uint(gasneti_MaxLocalSegmentSize % GASNET_PAGESIZE ,==, 0); gasneti_assert_uint(gasneti_MaxGlobalSegmentSize % GASNET_PAGESIZE ,==, 0); gasneti_assert_uint(gasneti_MaxGlobalSegmentSize ,<=, gasneti_MaxLocalSegmentSize); gasneti_assert_uint(gasneti_MaxLocalSegmentSize ,<=, localSegmentLimit); } // PART V: Discard the pre-segment if not supporting GASNet-1's attach #ifdef GASNETI_MMAP_OR_PSHM if (!legacy_mode) { if (gasneti_presegment.addr) gasneti_do_munmap(gasneti_presegment.addr, gasneti_presegment.size); gasneti_presegment.addr = NULL; gasneti_presegment.size = 0; } #endif #ifdef GASNETI_MMAP_OR_PSHM gasneti_free(gasneti_segexch); #endif #endif // GASNET_SEGMENT_EVERYTHING } /* ------------------------------------------------------------------------------------ */ // Allocate/map memory for a GASNet segment // + Auxiliary segment via gex_Client_Init() or gasnet_init() // + Client segment via gex_Segment_Attach() or gasnet_attach() // + Client segment via gex_Segment_Create() // // If (flags & GASNETI_FLAG_INIT_LEGACY) this is a GASNet-1 segment // If pshm_compat non-zero then allocate PSHM cross-mappable memory int gasneti_segment_map( gasnet_seginfo_t *segment_p, uintptr_t segsize, int pshm_compat, gex_Flags_t flags) { GASNETI_TRACE_PRINTF(I, ("gasneti_segment_map: size=%"PRIuPTR", pshm_compat=%d, flags=0x%x", segsize, pshm_compat, flags)); #ifdef GASNETI_MMAP_OR_PSHM if (flags & GASNETI_FLAG_INIT_LEGACY) { /* in "legacy_mode" we consume the presegment */ *segment_p = gasneti_presegment; } else #endif { /* otherwise, we are working from scratch */ segment_p->size = 0; segment_p->addr = NULL; } void *segbase = NULL; #ifdef GASNETI_MMAP_OR_PSHM { // Different (un)map ops to support shared (cross-mappable via PSHM) and private mappings void* (*mmap_fn)(uintptr_t); void* (*mmap_fixed_fn)(void *, uintptr_t, int); void (*munmap_fn)(void *, uintptr_t); #if GASNET_PSHM if (pshm_compat) { mmap_fn = gasneti_mmap_shared; mmap_fixed_fn = gasneti_mmap_shared_fixed; munmap_fn = gasneti_pshm_munmap; } else #endif { mmap_fn = gasneti_mmap; mmap_fixed_fn = gasneti_mmap_fixed; munmap_fn = gasneti_munmap; } if (segsize == 0) { /* no segment */ if (segment_p->addr && segment_p->size) { munmap_fn(segment_p->addr, segment_p->size); } segbase = NULL; } else if (segment_p->addr) { /* a pre-segment exists */ #if GASNET_ALIGNED_SEGMENTS segbase = (void*)gasneti_maxbase; #else segbase = segment_p->addr; #endif gasneti_assert_uint(segsize ,<=, segment_p->size); if (GASNETI_PSHM_P || (segment_p->size != segsize) || (segment_p->addr != segbase)) { munmap_fn(segment_p->addr, segment_p->size); gasneti_bug3480_fence(); #if GASNETI_PSHM_MAP_FIXED_IGNORED segbase = #endif mmap_fixed_fn(segbase, segsize, 0); } else { gasneti_bug3480_fence(); } } else { /* need segment from scratch */ segbase = mmap_fn(segsize); if (MAP_FAILED == segbase) { // TODO-EX: improve error handling here (e.g. ENOMEM might be returned to caller) int mmap_errno = errno; #if GASNET_PSHM gasneti_cleanup_shm(); #endif gasneti_fatalerror("mmap failed for segment of size %"PRIuPTR": %s", segsize, strerror(mmap_errno)); } } } #else /* !GASNETI_MMAP_OR_PSHM */ /* for the T3E, and other platforms which don't support mmap */ // TODO_EX: if we think non-mmap support remains important: // + move to segmentInit and use presegment // + perform full binary search // + use hidden base (as in gasneti_malloc_aligned) to support free segbase = gasneti_malloc_allowfail(segsize + GASNET_PAGESIZE); while (!segbase) { segsize = GASNETI_PAGE_ALIGNDOWN(segsize/2); if (segsize == 0) break; segbase = gasneti_malloc_allowfail(segsize + GASNET_PAGESIZE); } if (segbase) { segbase = (void *)GASNETI_PAGE_ALIGNUP(segbase); } #endif /* GASNETI_MMAP_OR_PSHM */ gasneti_assert_uint(((uintptr_t)segbase) % GASNET_PAGESIZE ,==, 0); gasneti_assert_uint(segsize % GASNET_PAGESIZE ,==, 0); GASNETI_TRACE_PRINTF(C, ("Final segment: segbase="GASNETI_LADDRFMT" segsize=%"PRIuPTR, GASNETI_LADDRSTR(segbase), segsize)); segment_p->addr = segbase; segment_p->size = segsize; return GASNET_OK; } int gasneti_segment_unmap( gasnet_seginfo_t *segment_p, int pshm_compat) { gasneti_assert(segment_p->size); #ifdef GASNETI_MMAP_OR_PSHM // Different unmap ops to support shared (cross-mappable via PSHM) and private mappings #if GASNET_PSHM if (pshm_compat) { gasneti_pshm_munmap(segment_p->addr, segment_p->size); } else #endif { gasneti_munmap(segment_p->addr, segment_p->size); } #else /* !GASNETI_MMAP_OR_PSHM */ // TODO_EX: if we think non-mmap support remains important then we need something here #endif /* GASNETI_MMAP_OR_PSHM */ return GASNET_OK; } #if GASNET_PSHM // Cross-map the remote shared segments // TODO-EX: need scalable data structures in place of seginfo and gasneti_nodeinfo static // TODO-EX: static for now, at least void gasneti_segment_cross_map(gasnet_seginfo_t *seginfo) { gasneti_nodeinfo[gasneti_mynode].offset = 0; gasneti_pshm_rank_t local_rank = 0; gasneti_publish_segment(seginfo[gasneti_mynode], 1); // collective // Note that we try to avoid iteration over all nodes. // For the case of supernode peers with contiguous ranks we examine no extra nodes for (gex_Rank_t node = gasneti_pshm_firstnode; local_rank < gasneti_pshm_nodes; node++) { if (! gasneti_pshm_jobrank_in_supernode(node)) continue; gasneti_assert_uint(local_rank ,==, gasneti_pshm_jobrank_to_local_rank(node)); if (node != gasneti_mynode) { const uintptr_t size = seginfo[node].size; void *segbase = gasneti_mmap_remote_shared(NULL, size, local_rank); gasneti_assert_uint(((uintptr_t)segbase) % GASNET_PAGESIZE ,==, 0); gasneti_assert_uint(size % GASNET_PAGESIZE ,==, 0); // TODO-EX: single global gasneti_nodeinfo is a problem (eg for aux vs client) gasneti_nodeinfo[node].offset = (uintptr_t)segbase - (uintptr_t)seginfo[node].addr; GASNETI_TRACE_PRINTF(C, ("Remote segment %d: segbase="GASNETI_LADDRFMT" segsize=%"PRIuPTR, (int)node, GASNETI_LADDRSTR(segbase), size)); } ++local_rank; } /* Barrier #1 ensures all attaches complete before unlinking */ gasneti_pshmnet_bootstrapBarrier(); gasneti_cleanup_shm(); /* Barrier #2 ensures unlinking completes before return, so crashes cannot leak segments */ gasneti_pshmnet_bootstrapBarrier(); } #endif /* GASNET_PSHM */ // Create a segment (primordial or aux) and exchange seginfo // Only if pshm_segment non-zero then cross-maps the memory w/i the nbrhd static gasnet_seginfo_t gasneti_do_attach_segment( uintptr_t segsize, gasnet_seginfo_t *all_segments, gex_TM_t tm, gasneti_bootstrapExchangefn_t exchangefn, int pshm_segment, gex_Flags_t flags) { #if GASNET_PSHM /* Avoid leaking shared memory files in case of non-collective exit between init/attach */ const char *context = (all_segments == gasneti_seginfo_aux) ? " while attaching the aux segment" : " while attaching the client segment"; if (pshm_segment) { gasneti_pshm_cs_enter(context, &gasneti_cleanup_shm); gasneti_pshmnet_bootstrapBarrier(); } #endif gasnet_seginfo_t local_segment; int rc = gasneti_segment_map(&local_segment, segsize, pshm_segment, flags); if (rc != GASNET_OK) { gasneti_fatalerror("Unexpected failure return from gasneti_segment_map()"); } // Exchange segment information // TODO-EX: need scalable replacement for full seginfo arrays if (tm) { // Use collectives if available gasneti_blockingExchange(tm, &local_segment, sizeof(gasnet_seginfo_t), all_segments); #if GASNET_PSHM // Needed if a pshm bootstrap operation may follow use of AMs if (pshm_segment) { gasneti_pshmnet_bootstrapBarrierPoll(); } #endif } else { // gasneti_assert(all_segments == gasneti_seginfo_aux); // Eventually only auxseg should use exchangefn gasneti_assert(exchangefn); (*exchangefn)(&local_segment, sizeof(gasnet_seginfo_t), all_segments); } #if GASNET_PSHM if (pshm_segment) { gasneti_segment_cross_map(all_segments); gasneti_pshm_cs_leave(); } #endif return local_segment; } /* ------------------------------------------------------------------------------------ */ static void gasneti_record_seginfo( gex_Rank_t jobrank, gex_EP_Index_t ep_index, void *addr, uintptr_t size) { gasneti_assert(jobrank < gasneti_nodes); gasneti_assert(ep_index < GASNET_MAXEPS); gasnet_seginfo_t *si_tbl = gasneti_seginfo_tbl[ep_index]; if_pf (!si_tbl) { gasneti_assert(ep_index); // Never NULL for primordial EP static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); si_tbl = gasneti_seginfo_tbl[ep_index]; if (!si_tbl) { si_tbl = gasneti_calloc(gasneti_nodes, sizeof(gasnet_seginfo_t)); gasneti_seginfo_tbl[ep_index] = si_tbl; } gasneti_mutex_unlock(&lock); } gasnet_seginfo_t *si = si_tbl + jobrank; // Assert that we never overwrite a valid segment with new values #if GASNET_SEGMENT_EVERYTHING const uintptr_t dflt = ep_index ? 0 : ~(uintptr_t)0; #else const uintptr_t dflt = 0; #endif gasneti_assert((si->size == dflt) || si->size == size); gasneti_assert((si->addr == NULL) || si->addr == addr); si->addr = addr; si->size = size; } extern int gex_EP_BindSegment( gex_EP_t ep, gex_Segment_t segment, gex_Flags_t flags) { gasneti_Segment_t i_segment = gasneti_import_segment(segment); gasneti_EP_t i_ep = gasneti_import_ep(ep); gex_EP_Index_t safe_idx = i_ep ? i_ep->_index : -1; // TODO: macros for formatting when naming segments in tracing? // TODO: macros for formatting when naming endpoints in tracing? GASNETI_TRACE_PRINTF(O,("gex_EP_BindSegment: segment=%p, EP index=%d, flags=%d", (void *)segment, safe_idx, flags)); GASNETI_CHECK_INJECT(); if (ep == GEX_EP_INVALID) { GASNETI_RETURN_ERRR(BAD_ARG,"Invalid call to gex_EP_BindSegment() with GEX_EP_INVALID"); } if (segment == GEX_SEGMENT_INVALID) { GASNETI_RETURN_ERRR(BAD_ARG,"Invalid call to gex_EP_BindSegment() with GEX_SEGMENT_INVALID"); } if (!safe_idx && !gasneti_i_segment_kind_is_host(i_segment)) { GASNETI_RETURN_ERRR(BAD_ARG,"Invalid call to gex_EP_BindSegment() with primordial endpoint and device memory segment. To use device memory, one must gex_EP_Create() an additional endpoint, bind a device segment to it using gex_EP_BindSegment(), followed by gex_EP_PublishBoundSegment() to enable remote access."); } if (flags) { GASNETI_RETURN_ERRR(BAD_ARG,"Invalid call to gex_EP_BindSegment() with non-zero flags"); } if (i_ep->_segment) { GASNETI_RETURN_ERRR(BAD_ARG,"Invalid call to gex_EP_BindSegment() on EP with a bound segment"); } #if GASNETC_EP_BINDSEGMENT_HOOK GASNETI_SAFE_PROPAGATE( gasnetc_ep_bindsegment_hook(i_ep, i_segment, flags) ); #endif i_ep->_segment = i_segment; gasneti_record_seginfo(gasneti_mynode, i_ep->_index, i_segment->_addr, i_segment->_size); gasneti_legacy_segment_attach_hook(i_ep); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ extern int gex_EP_PublishBoundSegment( gex_TM_t tm, gex_EP_t *eps, size_t num_eps, gex_Flags_t flags) { GASNETI_TRACE_PRINTF(O,("gex_EP_PublishBoundSegment: tm="GASNETI_TMSELFFMT", num_ep=%"PRIuSZ", flags=%d", GASNETI_TMSELFSTR(tm), num_eps, flags)); GASNETI_CHECK_INJECT(); if (flags) { gasneti_fatalerror("Invalid call to gex_EP_PublishBoundSegment() with non-zero flags"); } // Conduit-indep segment fields struct exchg_data { gex_EP_Location_t loc; void *addr; uintptr_t size; // TODO: probably need the "class" from _kind } *local, *global, *p; size_t elem_sz = sizeof(struct exchg_data); // NOTE: explicit NULL case for !num_eps prevents (at least) GCC 12 LTO from // incorrectly warning that gasneti_blockingRotatedExchangeV() reads from a // zero-byte allocation. local = num_eps ? gasneti_malloc(num_eps * elem_sz) : NULL; // Pack p = local; for (gex_Rank_t i = 0; i < num_eps; ++i) { gex_EP_t ep = eps[i]; gasneti_Segment_t segment = gasneti_import_ep(ep)->_segment; if (! segment) continue; p->loc.gex_rank = gasneti_mynode; p->loc.gex_ep_index = gex_EP_QueryIndex(ep); p->addr = segment->_addr; p->size = segment->_size; // TODO: kind class ++p; } // ExchangeV (variable-contribution GatherAll) // Since data is self-describing ('loc' field) we do NOT require that the // payload is in rank order, and so can use gasneti_blockingRotatedExchangeV(). // // TODO: Build/use "VisitAllV" since no need to construct entire array in memory // TODO: Use the lengths array (final argument) to omit the jobranks from the comms? // The downside is the need for forward rank->jobrank lookups instead. // If *those* might communicate, then the current scheme makes more sense. size_t local_bytes = elem_sz * (p - local); size_t total_bytes = gasneti_blockingRotatedExchangeV(tm, local, local_bytes, (void**)&global, NULL); size_t total_eps = total_bytes / elem_sz; gasneti_free(local); // Unpack p = global; for (size_t i = 0; i < total_eps; ++i, ++p) { gasneti_record_seginfo(p->loc.gex_rank, p->loc.gex_ep_index, p->addr, p->size); } gasneti_free(global); #if GASNET_PSHM // BIG-TODO: PSHM cross-mapping ?? // * Currently even cross-mapping of the primordial EP's segment is not // possible // * Main issue is that, in general, the current logic is collective over // supernode (in gasneti_publish_segment()). Only XPMEM currently // communicates anything, but that case uses a supernode-scope exchange to // populate a global variable (not workable for this case for two // reasons). #endif #if GASNETC_EP_PUBLISHBOUNDSEGMENT_HOOK // TODO: this should be at least two distict hooks for pack and unpack // of data in the exchange operation above, instead of a distinct exchange. return gasnetc_ep_publishboundsegment_hook(tm, eps, num_eps, flags); #else return GASNET_OK; #endif } /* ------------------------------------------------------------------------------------ */ int gasneti_segmentAttach( gex_Segment_t *segment_p, gex_TM_t tm, uintptr_t segsize, gex_Flags_t flags) { #if GASNET_DEBUG // TODO-EX: detection of multiple calls until we support them static int called = 0; gasneti_assert(!called); called = 1; #endif gasneti_EP_t i_ep = gasneti_import_tm_nonpair(tm)->_ep; gasneti_Client_t i_client = i_ep->_client; /* ------------------------------------------------------------------------------------ */ /* register segment */ // First portion of Segment_Create, plus cross-mapping and seginfo propagation: gasnet_seginfo_t myseg = gasneti_do_attach_segment(segsize, gasneti_seginfo, tm, NULL, gasneti_use_shared_allocator, flags); // Sanity checks: void *segbase = myseg.addr; segsize = myseg.size; gasneti_assert_uint(((uintptr_t)segbase) % GASNET_PAGESIZE ,==, 0); gasneti_assert_uint(segsize % GASNET_PAGESIZE ,==, 0); // Final portion of Segment_Create: gasneti_Segment_t i_segment = gasneti_alloc_segment(i_client, segbase, segsize, GEX_MK_HOST, 0, flags); gasneti_segtbl_add(i_segment); // EP_BindSegment: i_ep->_segment = i_segment; gasneti_legacy_segment_attach_hook(i_ep); // After local segment is attached, call optional client-provided hook // Should call BEFORE any conduit-specific pinning/registration of the segment if (gasnet_client_attach_hook) { gasnet_client_attach_hook(segbase, segsize); } #if GASNETC_EP_BINDSEGMENT_HOOK if (gasnetc_ep_bindsegment_hook(i_ep, i_segment, flags)) { gasneti_fatalerror("Failed to bind segment to endpoint in %s", (flags & GASNETI_FLAG_INIT_LEGACY) ? "gasnet_attach" : "gex_Segment_Attach"); } #endif // sanity check (but should be true "by construction") gasneti_assert_ptr(gasneti_seginfo[gasneti_mynode].addr ,==, segbase); gasneti_assert_uint(gasneti_seginfo[gasneti_mynode].size ,==, segsize); // output: *segment_p = gasneti_export_segment(i_segment); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ uint8_t gasneti_segment_read_dummy; // global so compiler cannot realize this is write-only int gasneti_segmentCreate( gex_Segment_t *segment_p, gasneti_Client_t client, gex_Addr_t address, uintptr_t length, gex_MK_t kind, gex_Flags_t flags) { gasneti_Segment_t segment = gasneti_import_segment(GEX_SEGMENT_INVALID); gasneti_assert(segment_p); gasneti_assert(! flags); gasneti_assert(length); gasneti_assert(kind != GEX_MK_INVALID); if (kind == GEX_MK_HOST) { int client_allocated = (address != NULL); if (client_allocated) { // Client-allocated segment // TODO: stronger checks such as for read-only memory? // Check that at least the first and last bytes can be read, with some // trickery to hopefully prevent the compiler from discarding the access. volatile uint8_t *bytes = address; gasneti_segment_read_dummy += bytes[0] + bytes[length - 1]; } else { // GASNet-allocated segment gasnet_seginfo_t seginfo; int rc = gasneti_segment_map(&seginfo, GASNETI_PAGE_ALIGNUP(length), 0, flags); if (rc != GASNET_OK) { gasneti_fatalerror("Unexpected failure return from gasneti_segment_map()"); } address = seginfo.addr; length = seginfo.size; } // Create the Segment object segment = gasneti_alloc_segment(client, address, length, kind, client_allocated, flags); } else { int rc = gasneti_MK_Segment_Create(&segment, client, address, length, kind, flags); if (rc) return rc; } gasneti_assert(segment != NULL); gasneti_assert(segment->_client == client); gasneti_assert(segment->_kind == kind); gasneti_segtbl_add(segment); *segment_p = gasneti_export_segment(segment); return GASNET_OK; } int gasneti_segmentDestroy( gasneti_Segment_t i_segment, int create_hook_succeeded) { gasneti_assert(i_segment); #if GASNETC_SEGMENT_DESTROY_HOOK // Call conduit-specific hook ONLY if create hook has run // successfully (and there is a destroy hook) if (create_hook_succeeded) { gasnetc_segment_destroy_hook(i_segment); } #endif #if GASNET_HAVE_MK_CLASS_MULTIPLE if (i_segment->_kind != GEX_MK_HOST) { gasneti_MK_Segment_Destroy(i_segment); } #else gasneti_assert_ptr(i_segment->_kind ,==, GEX_MK_HOST); if (! i_segment->_client_allocated) { gasnet_seginfo_t si; si.addr = i_segment->_addr; si.size = i_segment->_size; gasneti_assert_zeroret( gasneti_segment_unmap(&si, 0) ); } #endif gasneti_segtbl_del(i_segment); gasneti_free_segment(i_segment); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ /* Used to pass the nodemap information to the client * Similar to gasneti_getSegmentInfo(). * */ extern int gasneti_getNodeInfo(gasnet_nodeinfo_t *nodeinfo_table, int numentries) { GASNETI_CHECKINIT(); if_pf (numentries <= 0) { if (numentries == 0) return GASNET_OK; else GASNETI_RETURN_ERR(BAD_ARG); } gasneti_assert(nodeinfo_table); if_pf (numentries > gasneti_nodes) numentries = gasneti_nodes; if (gasneti_nodeinfo) { memcpy(nodeinfo_table, gasneti_nodeinfo, numentries*sizeof(gasnet_nodeinfo_t)); } else { gex_Rank_t i; for (i=0; i < numentries; i++) { nodeinfo_table[i].host = i; nodeinfo_table[i].supernode = i; #if GASNET_PSHM nodeinfo_table[i].offset = 0; #endif } } return GASNET_OK; } // Provides information about supernode peers (the caller's "neighborhood") // // TODO: Could improve "safety" by not exposing addr of critical internal data // TODO: Could reduce memory use if array lived in shared memory extern void gex_System_QueryNbrhdInfo( gex_RankInfo_t **info_p, gex_Rank_t *info_count_p, gex_Rank_t *my_info_index_p) { GASNETI_CHECKINIT(); #if GASNET_PSHM if (info_p) { gasneti_static_assert(sizeof(gex_RankInfo_t) == sizeof(gex_Rank_t)); *info_p = (gex_RankInfo_t *) gasneti_mysupernode.nodes; } if (info_count_p) { *info_count_p = gasneti_mysupernode.node_count; } if (my_info_index_p) { *my_info_index_p = gasneti_mysupernode.node_rank; } #else if (info_p) { gasneti_static_assert(sizeof(gex_RankInfo_t) == sizeof(gex_Rank_t)); *info_p = (gex_RankInfo_t *) &gasneti_mynode; } if (info_count_p) { *info_count_p = 1; } if (my_info_index_p) { *my_info_index_p = 0; } #endif } // Provides information about compute-node peers (same O/S image, files system, etc.) // // TODO: Could improve "safety" by not exposing addr of critical internal data // TODO: Could reduce memory use if array lived in shared memory extern void gex_System_QueryHostInfo( gex_RankInfo_t **info_p, gex_Rank_t *info_count_p, gex_Rank_t *my_info_index_p) { GASNETI_CHECKINIT(); if (info_p) { gasneti_static_assert(sizeof(gex_RankInfo_t) == sizeof(gex_Rank_t)); *info_p = (gex_RankInfo_t *) gasneti_myhost.nodes; } if (info_count_p) { *info_count_p = gasneti_myhost.node_count; } if (my_info_index_p) { *my_info_index_p = gasneti_myhost.node_rank; } } extern void gex_System_QueryMyPosition( gex_Rank_t *nbrhd_set_size_p, gex_Rank_t *nbrhd_set_rank_p, gex_Rank_t *host_set_size_p, gex_Rank_t *host_set_rank_p) { GASNETI_CHECKINIT(); if (nbrhd_set_size_p) { *nbrhd_set_size_p = gasneti_mysupernode.grp_count; } if (nbrhd_set_rank_p) { *nbrhd_set_rank_p = gasneti_mysupernode.grp_rank; } if (host_set_size_p) { *host_set_size_p = gasneti_myhost.grp_count; } if (host_set_rank_p) { *host_set_rank_p = gasneti_myhost.grp_rank; } } /* ------------------------------------------------------------------------------------ */ /* seginfo initialization and manipulation */ extern int gasneti_getSegmentInfo(gasnet_seginfo_t *seginfo_table, int numentries) { GASNETI_CHECKATTACH(); gasneti_memcheck(gasneti_seginfo_aux); gasneti_memcheck(gasneti_seginfo); #if GASNET_DEBUG /* sanity checks */ #if GASNET_SEGMENT_EVERYTHING { int i; /* sanity check seg-everything condition */ for (i=0; i < gasneti_nodes; i++) { gasneti_assert(gasneti_seginfo[i].addr == 0 && gasneti_seginfo[i].size == (uintptr_t)-1); } } #else { int i; #if GASNET_ALIGNED_SEGMENTS void *segbase = NULL; #endif for (i=0; i < gasneti_nodes; i++) { if (gasneti_seginfo_aux[i].size == 0) { gasneti_assert(gasneti_seginfo_aux[i].addr == 0); gasneti_assert(gasneti_seginfo[i].addr == 0); } else { #if GASNET_ALIGNED_SEGMENTS if (gasneti_maxbase) { // non-zero IFF gasneti_segmentInit() passed GASNETI_FLAG_INIT_LEGACY /* sanity check that segments are aligned */ if (!segbase) segbase = gasneti_seginfo[i].addr; else if (gasneti_seginfo[i].addr != segbase) gasneti_fatalerror("Failed sanity check for aligned segments with GASNET_ALIGNED_SEGMENTS"); } #endif /* sanity check that client and aux segments do not overlap */ if (gasneti_seginfo[i].size > 0) { uintptr_t seg_ub = (uintptr_t)gasneti_seginfo[i].addr + gasneti_seginfo[i].size; uintptr_t aux_ub = (uintptr_t)gasneti_seginfo_aux[i].addr + gasneti_seginfo_aux[i].size; gasneti_assert((seg_ub <= (uintptr_t)gasneti_seginfo_aux[i].addr) || (aux_ub <= (uintptr_t)gasneti_seginfo[i].addr)); } /* misc segment sanity checks */ gasneti_assert_uint(((uintptr_t)gasneti_seginfo_aux[i].addr) % GASNET_PAGESIZE ,==, 0); gasneti_assert_uint(((uintptr_t)gasneti_seginfo[i].addr) % GASNET_PAGESIZE ,==, 0); } } } #endif #endif if_pf (numentries <= 0) { if (numentries == 0) return GASNET_OK; else GASNETI_RETURN_ERR(BAD_ARG); } gasneti_assert(seginfo_table); if_pf (numentries > gasneti_nodes) numentries = gasneti_nodes; memcpy(seginfo_table, gasneti_seginfo, numentries*sizeof(gasnet_seginfo_t)); return GASNET_OK; } // Inlining decision left to the compiler static int gasneti_query_bound_segment( gex_TM_t tm, gex_Rank_t rank, void **owneraddr_p, void **localaddr_p, uintptr_t *size_p) { // Trivial implementation using legacy data structures and assumptions. gex_EP_Location_t loc = gasneti_e_tm_rank_to_location(tm, rank, 0); gex_Rank_t jobrank = loc.gex_rank; gex_EP_Index_t idx = loc.gex_ep_index; // TODO-EX: Scalable storage gasnet_seginfo_t *si_array = gasneti_seginfo_tbl[idx]; if (!idx) gasneti_assert(si_array == gasneti_seginfo); // TODO-EX: cannot always tell no segment from zero-length segment if (!si_array || !si_array[jobrank].addr) return 1; // No bound segment if (owneraddr_p) { *owneraddr_p = si_array[jobrank].addr; } if (size_p){ *size_p = si_array[jobrank].size; } if (localaddr_p) { // TODO-EX: this depends on legacy assumptions about cross-mapping if (!idx && GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { #if GASNET_PSHM gasneti_assert(gasneti_nodeinfo); *localaddr_p = (void*)((uintptr_t)gasneti_seginfo[jobrank].addr + gasneti_nodeinfo[jobrank].offset); #else *localaddr_p = gasneti_seginfo[jobrank].addr; #endif } else { *localaddr_p = NULL; } } return 0; } // DEPRECATED int gex_Segment_QueryBound( gex_TM_t tm, gex_Rank_t rank, void **owneraddr_p, void **localaddr_p, uintptr_t *size_p) { GASNETI_TRACE_PRINTF(O,("gex_Segment_QueryBound: tm:rank=" GASNETI_TMRANKFMT, GASNETI_TMRANKSTR(tm,rank))); GASNETI_CHECK_INJECT(); return gasneti_query_bound_segment(tm, rank, owneraddr_p, localaddr_p, size_p); } // TODO: once representation is not dense, must return GEX_EVENT_NO_OP // for unknown/missing data when flags contains GEX_FLAG_IMMEDIATE. gex_Event_t gex_EP_QueryBoundSegmentNB( gex_TM_t tm, gex_Rank_t rank, void **owneraddr_p, void **localaddr_p, uintptr_t *size_p, gex_Flags_t flags) { GASNETI_TRACE_PRINTF(O,("gex_EP_QueryBoundSegmentNB: tm:rank=" GASNETI_TMRANKFMT " flags=0x%x", GASNETI_TMRANKSTR(tm,rank), flags)); if (! (flags & GEX_FLAG_IMMEDIATE)) GASNETI_CHECK_INJECT(); int rc = gasneti_query_bound_segment(tm, rank, owneraddr_p, localaddr_p, size_p); if (rc && size_p) { // non-zero rc means not bound, which we return as 0-length. *size_p = 0; } return GEX_EVENT_INVALID; } /* ------------------------------------------------------------------------------------ */ /* Aux-seg support */ #include /* for GASNETC_AUXSEG_{FNS,DECLS} */ /* lists of internal functions that want auxseg (with trailing commas) */ /* conduit-specific auxseg fns */ #ifndef GASNETC_AUXSEG_FNS #define GASNETC_AUXSEG_FNS() #endif /* extended-ref auxseg fns */ #ifndef GASNETE_AUXSEG_FNS #define GASNETE_AUXSEG_FNS() #endif /* extended-ref collectives auxseg fns */ #ifndef GASNETE_COLL_AUXSEG_FNS #define GASNETE_COLL_AUXSEG_FNS() #endif gasneti_auxseg_request_t gasneti_auxseg_dummy(gasnet_seginfo_t *auxseg_info); #ifdef GASNETC_AUXSEG_DECLS GASNETC_AUXSEG_DECLS #endif #ifdef GASNETE_AUXSEG_DECLS GASNETE_AUXSEG_DECLS #endif #ifdef GASNETE_COLL_AUXSEG_DECLS GASNETE_COLL_AUXSEG_DECLS #endif gasneti_auxsegregfn_t gasneti_auxsegfns[] = { GASNETC_AUXSEG_FNS() GASNETE_AUXSEG_FNS() GASNETE_COLL_AUXSEG_FNS() #if GASNET_DEBUG gasneti_auxseg_dummy, #endif NULL }; /* page-aligned size of auxseg */ static gasneti_auxseg_request_t gasneti_auxseg_total_alignedsz = { 0, 0 }; static gasneti_auxseg_request_t *gasneti_auxseg_alignedsz = NULL; #if GASNET_DEBUG #define GASNETI_AUXSEG_DUMMY_SZ 463 gasneti_auxseg_request_t gasneti_auxseg_dummy(gasnet_seginfo_t *auxseg_info) { gasneti_auxseg_request_t retval; static gasnet_seginfo_t *auxseg_save = NULL; int selftest = (auxseg_info == (void*)(uintptr_t)-1); if (gasneti_nodes > 4) { if (selftest && !gasneti_mynode) gasneti_console_message("auxseg-diagnostic", "self-test SKIPPED due to job scale"); retval.minsz = 0; retval.optimalsz = 0; return retval; } retval.minsz = 213; retval.optimalsz = GASNETI_AUXSEG_DUMMY_SZ; if (auxseg_info == NULL) return retval; /* initial query */ if (selftest) { /* self test */ gasneti_assert(auxseg_save); } else { /* auxseg granted */ gasneti_assert(!auxseg_save); auxseg_save = gasneti_malloc(gasneti_nodes*sizeof(gasnet_seginfo_t)); memcpy(auxseg_save, auxseg_info, gasneti_nodes*sizeof(gasnet_seginfo_t)); gasneti_leak(auxseg_save); /* Needed by self test, if any */ } for (int i=0; i < gasneti_nodes; i++) { gasneti_assert(auxseg_save[i].addr); gasneti_assert_uint(((uintptr_t)auxseg_save[i].addr) % GASNETI_CACHE_LINE_BYTES ,==, 0); gasneti_assert_uint(((uintptr_t)auxseg_save[i].addr) % 8 ,==, 0); gasneti_assert_uint(auxseg_save[i].size ,>=, retval.minsz); gasneti_assert_uint(auxseg_save[i].size ,<=, retval.optimalsz); } for (int i=0; i < auxseg_save[gasneti_mynode].size; i++) { uint8_t *p = (uint8_t *)auxseg_save[gasneti_mynode].addr; #define AUXSEG_TESTVAL(i) ((uint8_t)(8|((i+0x3F)^(i>>8)))) if (selftest) gasneti_assert_uint(p[i] ,==, AUXSEG_TESTVAL(i)); else p[i] = AUXSEG_TESTVAL(i); #undef AUXSEG_TESTVAL } return retval; } #endif // collect and return optimal auxseg size sum, padded to page size // may be called multiple times, subsequent calls return cached value uintptr_t gasneti_auxseg_preinit(void) { static uintptr_t gasneti_auxseg_sz = 0; if (gasneti_auxseg_sz) return gasneti_auxseg_sz; // only the first call computes requirements const int numfns = (sizeof(gasneti_auxsegfns)/sizeof(gasneti_auxsegregfn_t))-1; gasneti_assert(gasneti_auxsegfns[numfns] == NULL); if (numfns > 0) { gasneti_auxseg_alignedsz = gasneti_calloc(numfns,sizeof(gasneti_auxseg_request_t)); gasneti_leak(gasneti_auxseg_alignedsz); } /* collect requests */ for (int i = 0; i < numfns; i++) { gasneti_auxseg_alignedsz[i] = (gasneti_auxsegfns[i])(NULL); gasneti_auxseg_total_alignedsz.minsz += GASNETI_ALIGNUP(gasneti_auxseg_alignedsz[i].minsz,GASNETI_CACHE_LINE_BYTES); gasneti_auxseg_total_alignedsz.optimalsz += GASNETI_ALIGNUP(gasneti_auxseg_alignedsz[i].optimalsz,GASNETI_CACHE_LINE_BYTES); } gasneti_auxseg_total_alignedsz.minsz = gasneti_mmap_alignup(gasneti_auxseg_total_alignedsz.minsz); gasneti_auxseg_total_alignedsz.optimalsz = gasneti_mmap_alignup(gasneti_auxseg_total_alignedsz.optimalsz); gasneti_auxseg_sz = gasneti_auxseg_total_alignedsz.optimalsz; GASNETI_TRACE_PRINTF(C, ("gasneti_auxseg_preinit(): gasneti_auxseg_sz = %"PRIuPTR, gasneti_auxseg_sz)); gasneti_assert_uint(gasneti_auxseg_sz % gasneti_mmap_pagesize() ,==, 0); return gasneti_auxseg_sz; } /* provide auxseg to GASNet components and init secondary segment arrays requires input seginfo has been initialized to the correct values */ void gasneti_auxseg_attach(gasnet_seginfo_t *auxseg_info) { const int numfns = (sizeof(gasneti_auxsegfns)/sizeof(gasneti_auxsegregfn_t))-1; gasneti_assert(gasneti_auxsegfns[numfns] == NULL); if (numfns > 0) { gasnet_seginfo_t *si = gasneti_malloc(gasneti_nodes*sizeof(gasnet_seginfo_t)); memcpy(si, auxseg_info, gasneti_nodes*sizeof(gasnet_seginfo_t)); uintptr_t auxseg_sz = auxseg_info[gasneti_mynode].size; for (int j = 0; j < gasneti_nodes; j++) { gasneti_assert_uint((uintptr_t)si[j].addr % GASNET_PAGESIZE ,==, 0); gasneti_assert_uint((uintptr_t)si[j].addr % GASNETI_CACHE_LINE_BYTES ,==, 0); gasneti_assert_uint((uintptr_t)si[j].size ,==, auxseg_sz); si[j].size = gasneti_auxseg_alignedsz[0].optimalsz; } for (int i = 0; i < numfns; i++) { GASNETI_TRACE_PRINTF(C,("gasneti_auxseg_attach() fn[%i] => ("GASNETI_LADDRFMT".."GASNETI_LADDRFMT") (%"PRIuPTR" bytes)", i, GASNETI_LADDRSTR(si[gasneti_mynode].addr), GASNETI_LADDRSTR(((uintptr_t)si[gasneti_mynode].addr)+si[gasneti_mynode].size), si[gasneti_mynode].size)); (gasneti_auxsegfns[i])(si); if (i+1 < numfns) { for (int j = 0; j < gasneti_nodes; j++) { si[j].addr = (void *)(((uintptr_t)si[j].addr) + gasneti_auxseg_alignedsz[i].optimalsz); si[j].addr = (void *)GASNETI_ALIGNUP(si[j].addr,GASNETI_CACHE_LINE_BYTES); si[j].size = gasneti_auxseg_alignedsz[i+1].optimalsz; } } } gasneti_free(si); } #if GASNET_PSHM // TODO-EX: this is a hack until AttachRemote can set the right offset array for (int i = 0; i < gasneti_pshm_nodes; i++){ const gex_Rank_t node = gasneti_nodemap_local[i]; gasneti_nodeinfo[node].auxoffset = gasneti_nodeinfo[node].offset; } #endif } /* common case use of gasneti_auxseg_{preinit,attach} for conduits using gasneti_segmentAttach() */ gasnet_seginfo_t gasneti_auxsegAttach(uint64_t maxsize, gasneti_bootstrapExchangefn_t exchangefn) { uintptr_t auxsize = gasneti_auxseg_preinit(); if (auxsize > maxsize) { /* TODO: implement request downsizing down to minsz */ gasneti_fatalerror("GASNet internal auxseg size (%"PRIuPTR" bytes) exceeds available limit (%"PRIu64" bytes)", auxsize, maxsize); } gasneti_leak(gasneti_seginfo_aux = gasneti_malloc(gasneti_nodes*sizeof(gasnet_seginfo_t))); gasnet_seginfo_t local_segment = gasneti_do_attach_segment(auxsize, gasneti_seginfo_aux, NULL, exchangefn, gasneti_use_shared_allocator, 0); gasneti_auxseg_attach(gasneti_seginfo_aux); gasneti_assert_uint(gasneti_seginfo_aux[gasneti_mynode].size ,==, auxsize); return local_segment; } gasnet-2025.8.0/tests/0000775000175000017500000000000015142313673014564 5ustar alastairalastairgasnet-2025.8.0/tests/testlockcontend.c0000664000175000017500000001536315142313673020143 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testlockcontend.c $ * Description: GASNet lock performance test * Measures the overhead associated with contended locks * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #ifndef GASNET_PAR #error This test can only be built for GASNet PAR configuration #endif static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int mynode = 0; int iters=0; void *myseg = NULL; int accuracy = 0; int maxthreads = 2; int threads = 1; void header(const char *desc) { printf("\n---- %s ----\n" " Threads Total time Avg. time\n" " ------- ---------- ---------\n", desc); } void report(int threads, int64_t totaltime, int iters) { char format[80]; snprintf(format, sizeof(format), "%c: %%6i %%%i.%if s %%%i.%if us\n", TEST_SECTION_NAME(), (4+accuracy), accuracy, (4+accuracy), accuracy); printf(format, threads, totaltime/1.0E9, (totaltime/1000.0)/iters); fflush(stdout); } /* placed in a function to avoid excessive inlining */ gasnett_tick_t ticktime(void) { return gasnett_ticks_now(); } uint64_t tickcvt(gasnett_tick_t ticks) { return gasnett_ticks_to_ns(ticks); } void* thread_fn1(void*); void* thread_fn2(void*); void* thread_fn3(void*); void* thread_fn4(void*); /* ------------------------------------------------------------------------------------ */ /* This tester measures the performance of contended HSLs and pthread mutexes. */ int main(int argc, char **argv) { GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testlockcontend", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); test_init("testlockcontend",1,"(maxthreads) (iters) (accuracy) (test sections)"); if (argc > 1) maxthreads = atoi(argv[1]); maxthreads = test_thread_limit(maxthreads); if (maxthreads < 1) { printf("Threads must be between 1 and %i\n", TEST_MAXTHREADS); gasnet_exit(-1); } if (argc > 2) iters = atoi(argv[2]); if (!iters) iters = 1000000; if (argc > 3) accuracy = atoi(argv[3]); if (!accuracy) accuracy = 3; if (argc > 4) TEST_SECTION_PARSE(argv[4]); if (argc > 5) test_usage(); mynode = gex_TM_QueryRank(myteam); myseg = TEST_MYSEG(); if (mynode == 0) { printf("Running locks performance test with 1..%i threads and %i iterations...\n",maxthreads,iters); fflush(stdout); MSG0("Spawning pthreads..."); if (TEST_SECTION_BEGIN_ENABLED()) { header("lock/unlock contended pthread mutex (others in thread barrier)"); test_createandjoin_pthreads(threads = maxthreads, &thread_fn1, NULL, 0); } if (TEST_SECTION_BEGIN_ENABLED()) { header("lock/unlock contended HSL (others in thread barrier)"); test_createandjoin_pthreads(threads = maxthreads, &thread_fn2, NULL, 0); } if (TEST_SECTION_BEGIN_ENABLED()) { header("lock/unlock contended pthread mutex (no other threads)"); for (threads=1; threads<=maxthreads; ++threads) { test_createandjoin_pthreads(threads, &thread_fn3, NULL, 0); } } if (TEST_SECTION_BEGIN_ENABLED()) { header("lock/unlock contended HSL (no other threads)"); for (threads=1; threads<=maxthreads; ++threads) { test_createandjoin_pthreads(threads, &thread_fn4, NULL, 0); } } } BARRIER(); MSG("done."); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ #undef MSG0 #undef ERR #define MSG0 THREAD_MSG0(id) #define ERR THREAD_ERR(id) pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; char _pad[GASNETT_CACHE_LINE_BYTES] = { 0 }; /* bug 2231 workaround */ gex_HSL_t hsl = GEX_HSL_INITIALIZER; /* ------------------------------------------------------------------------------------ */ #define TIME_OPERATION_SOME(id, op) \ do { \ PTHREAD_LOCALBARRIER(threads); \ { int i, _thr, _iters = iters, _warmupiters = MAX(1,iters/10);\ gasnett_tick_t start,end; /* use ticks interface */ \ for (i=0; i < _warmupiters; i++) { op; } /* warm-up */ \ for (_thr = 1; _thr <= threads; ++_thr) { \ PTHREAD_LOCALBARRIER(threads); \ start = ticktime(); \ if (id < _thr) for (i=0; i < _iters; i++) { op; } \ PTHREAD_LOCALBARRIER(threads); \ end = ticktime(); \ if (!id) \ report(_thr, tickcvt(end - start), iters); \ } \ } \ } while (0) void * thread_fn1(void *arg) { GASNET_BEGIN_FUNCTION(); int id = (int)(uintptr_t)arg; TIME_OPERATION_SOME(id, { pthread_mutex_lock(&mutex); pthread_mutex_unlock(&mutex); }); return NULL; } void * thread_fn2(void *arg) { GASNET_BEGIN_FUNCTION(); int id = (int)(uintptr_t)arg; TIME_OPERATION_SOME(id, { gex_HSL_Lock(&hsl); gex_HSL_Unlock(&hsl); }); return NULL; } /* ------------------------------------------------------------------------------------ */ #define TIME_OPERATION_ALL(id, op) \ do { \ PTHREAD_LOCALBARRIER(threads); \ { int i, _iters = iters, _warmupiters = MAX(1,iters/10); \ gasnett_tick_t start,end; /* use ticks interface */ \ for (i=0; i < _warmupiters; i++) { op; } /* warm-up */ \ PTHREAD_LOCALBARRIER(threads); \ start = ticktime(); \ for (i=0; i < _iters; i++) { op; } \ PTHREAD_LOCALBARRIER(threads); \ end = ticktime(); \ if (!id) \ report(threads, tickcvt(end - start), iters); \ } \ } while (0) void * thread_fn3(void *arg) { GASNET_BEGIN_FUNCTION(); int id = (int)(uintptr_t)arg; TIME_OPERATION_ALL(id, { pthread_mutex_lock(&mutex); pthread_mutex_unlock(&mutex); }); return NULL; } void * thread_fn4(void *arg) { GASNET_BEGIN_FUNCTION(); int id = (int)(uintptr_t)arg; TIME_OPERATION_ALL(id, { gex_HSL_Lock(&hsl); gex_HSL_Unlock(&hsl); }); return NULL; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testcoll.c0000664000175000017500000006605715142313673016577 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testcoll.c $ * Description: GASNet collectives test * Copyright 2002-2004, Jaein Jeong and Dan Bonachea * Terms of use are as specified in license.txt */ #include #include "gasnet_coll.h" #if GASNET_PAR #define DEFAULT_THREADS 2 #else #define DEFAULT_THREADS 1 #endif static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int datasize; int numprocs; int iters = 0; int images; /* numproc * threads */ int threads = DEFAULT_THREADS; /* per node */ #define TEST_SEGSZ_EXPR (sizeof(int)*(threads*datasize+numprocs)) #include "test.h" #if GASNET_PAR #define local_barrier() PTHREAD_LOCALBARRIER(threads) #define global_barrier() PTHREAD_BARRIER(threads) #else #define local_barrier() do {} while(0) #define global_barrier() BARRIER() #endif typedef struct { int local_id; int mythread; int myproc; int peerthread; gasnet_coll_handle_t *hndl; char _pad[GASNETT_CACHE_LINE_BYTES]; } thread_data_t; #define PROLOGUE(NAME) \ GASNET_BEGIN_FUNCTION(); \ const char name[] = NAME; \ int myproc = (randomize(td), td->myproc); \ int mythread = td->mythread; \ int peerthread = td->peerthread; \ gasnet_coll_handle_t *hndl = td->hndl static int *R; static int **Aw, **Bw, **Cw, **Dw, **Ew, **Fw, **Gw; static int ***Av, ***Bv, ***Cv, ***Dv, ***Ev, ***Fv, ***Gv; /* All nodes must get the same random sequence */ static void randomize(thread_data_t *td) { local_barrier(); if (td->local_id == 0) { int i; static int srand_phase = 1; TEST_SRAND(srand_phase++); for (i=0; ilocal_id) MSG0 #define CALL(FUNC,DST,SRC,FLAGS) \ gasnet_coll_##FUNC(GASNET_TEAM_ALL,DST,SRC,sizeof(int),\ FLAGS|GASNET_COLL_SRC_IN_SEGMENT|GASNET_COLL_DST_IN_SEGMENT); #define DEFN(PREFIX, DESC) \ /* NO/NO - in/out data is not generated/consumed in same barrier phase */ \ void PREFIX##_NONO(int root, thread_data_t *td) { \ PROLOGUE(DESC " NO/NO"); \ int flags = GASNET_COLL_LOCAL| GASNET_COLL_IN_NOSYNC | GASNET_COLL_OUT_NOSYNC; \ int j; \ \ MSG00("Starting %s test", name); \ \ for (j = 0; j < iters; ++j) { \ gex_Rank_t i; \ \ *LOCAL(A) = (mythread == root) ? R[j] : -1; \ *LOCAL(B) = mythread; \ for (i = 0; i < images; ++i) { \ LOCAL(D)[i] = i * R[j] + mythread; \ } \ \ global_barrier(); \ \ CALL(broadcast, ALL(A), ROOT(A), flags); \ CALL(gather, ROOT(C), ALL(B), flags); \ CALL(scatter, ALL(E), ROOT(D), flags); \ CALL(gather_all, ALL(F), ALL(B), flags); \ CALL(exchange, ALL(G), ALL(D), flags); \ \ global_barrier(); \ \ if (*LOCAL(A) != R[j]) { \ MSG("ERROR: %s broadcast validation failed", name); \ gasnet_exit(1); \ } \ if (mythread == root) { \ for (i = 0; i < images; ++i) { \ if (LOCAL(C)[i] != i) { \ MSG("ERROR: %s gather validation failed %d %d", name, LOCAL(C)[i], (int)i);\ gasnet_exit(1); \ } \ } \ } \ if (*LOCAL(E) != mythread*R[j] + root) { \ MSG("ERROR: %s scatter validation failed %d %d", name, *LOCAL(E), mythread*R[j] + root); \ gasnet_exit(1); \ } \ for (i = 0; i < images; ++i) { \ if (LOCAL(F)[i] != i) { \ MSG("ERROR: %s gather_all validation failed", name); \ gasnet_exit(1); \ } \ } \ for (i = 0; i < images; ++i) { \ if (LOCAL(G)[i] != i + mythread*R[j]) { \ MSG("ERROR: %s exchange validation failed", name); \ gasnet_exit(1); \ } \ } \ } \ \ global_barrier(); /* ensure validation completes before next test */ \ } \ /* MY/MY - in/out data is generated/consumed locally in same barrier phase */\ void PREFIX##_MYMY(int root, thread_data_t *td) { \ PROLOGUE(DESC " MY/MY"); \ int flags = GASNET_COLL_LOCAL| GASNET_COLL_IN_MYSYNC | GASNET_COLL_OUT_MYSYNC; \ int j; \ \ MSG00("Starting %s test", name); \ \ for (j = 0; j < iters; ++j) { \ gex_Rank_t i; \ \ *LOCAL(A) = (mythread == root) ? R[j] : -1; \ *LOCAL(B) = mythread; \ \ CALL(broadcast, ALL(A), ROOT(A), flags); \ if (*LOCAL(A) != R[j]) { \ MSG("ERROR: %s broadcast validation failed %d %d on %d", name, *LOCAL(A), R[j], mythread); \ gasnet_exit(1); \ } \ CALL(gather, ROOT(C), ALL(B), flags); \ if (mythread == root) { \ for (i = 0; i < images; ++i) { \ if (LOCAL(C)[i] != i) { \ MSG("ERROR: %s gather validation failed", name); \ gasnet_exit(1); \ } \ LOCAL(C)[i] *= R[j]; \ } \ } \ CALL(scatter, ALL(B), ROOT(C), flags); \ if (*LOCAL(B) != mythread*R[j]) { \ MSG("ERROR: %s scatter validation failed", name); \ gasnet_exit(1); \ } \ CALL(gather_all, ALL(C), ALL(B), flags); \ for (i = 0; i < images; ++i) { \ if (LOCAL(C)[i] != i*R[j]) { \ MSG("ERROR: %s gather_all validation failed", name); \ gasnet_exit(1); \ } \ LOCAL(C)[i] += mythread; \ } \ CALL(exchange, ALL(D), ALL(C), flags); \ for (i = 0; i < images; ++i) { \ if (LOCAL(D)[i] != i + mythread*R[j]) { \ MSG("ERROR: %s exchange validation failed", name); \ gasnet_exit(1); \ } \ } \ } \ \ global_barrier(); /* ensure validation completes before next test */ \ } \ /* ALL/ALL - data is generated/consumed *remotely* in same barrier phase */ \ void PREFIX##_ALLALL(int root, thread_data_t *td) { \ PROLOGUE(DESC " ALL/ALL"); \ int flags = GASNET_COLL_LOCAL| GASNET_COLL_IN_ALLSYNC | GASNET_COLL_OUT_ALLSYNC; \ gex_Rank_t rootproc = root/threads; \ gex_Rank_t peerproc = peerthread/threads; \ int j; \ int tmp; \ \ MSG00("Starting %s test", name); \ \ for (j = 0; j < iters; ++j) { \ gex_Rank_t i; \ \ tmp = (peerthread == root) ? R[j] : -1; \ gex_RMA_PutBlocking(myteam, peerproc, REMOTE(A,peerthread), &tmp, sizeof(int), 0);\ \ CALL(broadcast, ALL(A), ROOT(A), flags); \ gex_RMA_GetBlocking(myteam, &tmp, peerproc, REMOTE(A,peerthread), sizeof(int), 0);\ if (tmp != R[j]) { \ MSG("ERROR: %s broadcast validation failed", name); \ gasnet_exit(1); \ } \ tmp = peerthread; \ gex_RMA_PutBlocking(myteam, peerproc, REMOTE(B,peerthread), &tmp, sizeof(int), 0);\ CALL(gather, ROOT(C), ALL(B), flags); \ gex_RMA_GetBlocking(myteam, LOCAL(D), rootproc, REMOTE(C,root), images*sizeof(int), 0); \ for (i = 0; i < images; ++i) { \ if (LOCAL(D)[i] != i) { \ MSG("ERROR: %s gather validation failed", name); \ gasnet_exit(1); \ } \ } \ global_barrier(); /* to avoid conflict on D */ \ tmp = mythread * R[j]; \ gex_RMA_PutBlocking(myteam, rootproc, REMOTE(D,root)+mythread, &tmp, sizeof(int), 0);\ CALL(scatter, ALL(B), ROOT(D), flags); \ gex_RMA_GetBlocking(myteam, &tmp, peerproc, REMOTE(B,peerthread), sizeof(int), 0);\ if (tmp != peerthread*R[j]) { \ MSG("ERROR: %s scatter validation failed expected: %d got %d", name, peerthread*R[j], tmp); \ gasnet_exit(1); \ } \ global_barrier(); /* to avoid conflict on B */ \ tmp = peerthread*R[j] - 1; \ gex_RMA_PutBlocking(myteam, peerproc, REMOTE(B,peerthread), &tmp, sizeof(int), 0);\ CALL(gather_all, ALL(C), ALL(B), flags); \ gex_RMA_GetBlocking(myteam, LOCAL(D), peerproc, REMOTE(C,peerthread), images*sizeof(int), 0);\ for (i = 0; i < images; ++i) { \ if (LOCAL(D)[i] != i*R[j] - 1) { \ MSG("ERROR: %s gather_all validation failed", name); \ gasnet_exit(1); \ } \ } \ global_barrier(); /* to avoid conflict on C & D */ \ for (i = 0; i < images; ++i) { \ LOCAL(C)[i] += peerthread; \ } \ gex_RMA_PutBlocking(myteam, peerproc, REMOTE(D,peerthread), LOCAL(C), images*sizeof(int), 0);\ CALL(exchange, ALL(C), ALL(D), flags); \ gex_RMA_GetBlocking(myteam, LOCAL(D), peerproc, REMOTE(C,peerthread), images*sizeof(int), 0);\ for (i = 0; i < images; ++i) { \ if (LOCAL(D)[i] != i + peerthread*R[j] - 1) { \ MSG("ERROR: %s exchange validation failed", name); \ gasnet_exit(1); \ } \ } \ } \ \ global_barrier(); /* ensure validation completes before next test */ \ } \ void PREFIX##_NB(int root, thread_data_t *td) { \ PROLOGUE(DESC " NB"); \ int flags = GASNET_COLL_LOCAL| GASNET_COLL_IN_MYSYNC | GASNET_COLL_OUT_MYSYNC; \ gex_Rank_t i; \ int j; \ \ MSG00("Starting %s test", name); \ \ for (j = 0; j < iters; ++j) { \ *LOCALi(j,A) = (mythread == root) ? R[j] : -1; \ *LOCALi(j,B) = mythread; \ hndl[j] = CALL(broadcast##_nb, ALLi(j,A), ROOTi(j,A), flags); \ } \ for (j = 0; j < iters; ++j) { \ gasnet_coll_wait_sync(hndl[j]); \ if (*LOCALi(j,A) != R[j]) { \ MSG("ERROR: %s broadcast validation failed", name); \ gasnet_exit(1); \ } \ hndl[j] = CALL(gather##_nb, ROOTi(j,C), ALLi(j,B), flags); \ } \ for (j = 0; j < iters; ++j) { \ gasnet_coll_wait_sync(hndl[j]); \ if (mythread == root) { \ for (i = 0; i < images; ++i) { \ if (LOCALi(j,C)[i] != i) { \ MSG("ERROR: %s gather validation failed", name); \ gasnet_exit(1); \ } \ LOCALi(j,C)[i] *= R[j]; \ } \ } \ hndl[j] = CALL(scatter##_nb, ALLi(j,B), ROOTi(j,C), flags); \ } \ for (j = 0; j < iters; ++j) { \ gasnet_coll_wait_sync(hndl[j]); \ if (*LOCALi(j,B) != mythread*R[j]) { \ MSG("ERROR: %s scatter validation failed", name); \ gasnet_exit(1); \ } \ hndl[j] = CALL(gather_all##_nb, ALLi(j,C), ALLi(j,B), flags); \ } \ for (j = 0; j < iters; ++j) { \ gasnet_coll_wait_sync(hndl[j]); \ for (i = 0; i < images; ++i) { \ if (LOCALi(j,C)[i] != i*R[j]) { \ MSG("ERROR: %s gather_all validation failed", name); \ gasnet_exit(1); \ } \ LOCALi(j,C)[i] += mythread; \ } \ hndl[j] = CALL(exchange##_nb, ALLi(j,D), ALLi(j,C), flags); \ } \ for (j = 0; j < iters; ++j) { \ gasnet_coll_wait_sync(hndl[j]); \ for (i = 0; i < images; ++i) { \ if (LOCALi(j,D)[i] != i + mythread*R[j]) { \ MSG("ERROR: %s exchange validation failed", name); \ gasnet_exit(1); \ } \ } \ } \ \ global_barrier(); /* ensure validation completes before next test */ \ } #define ALL(X) ALLi(0,X) #define ROOT(X) ROOTi(0,X) #define REMOTE(X,N) REMOTEi(0,X,N) #define LOCAL(X) LOCALi(0,X) #define LOCALi(i,X) REMOTEi(i,X,mythread) #define ALLi(i,X) X##v[i][mythread] #define ROOTi(i,X) root, (mythread==root)?X##v[i][root]:NULL #define REMOTEi(i,X,N) (X##v[i][N]) DEFN(testLS, "LOCAL/single-addr") #undef ALLi #undef ROOTi #undef REMOTEi static void *test_malloc_2D(int count, size_t size) { char *tmp; void **result; int j; tmp = test_malloc(count * (sizeof(void*) + size)); result = (void **)tmp; tmp += count * sizeof(void *); for (j = 0; j < count; ++j) { result[j] = (void *)tmp; tmp += size; } return (void *)result; } #define test_free_2D test_free static volatile int done = 0; void *thread_main(void *arg) { thread_data_t *td = arg; int i; #if GASNET_PAR if (td->local_id >= threads) { while (!done) gasnet_AMPoll(); return NULL; } #endif td->hndl = test_malloc(iters*sizeof(gasnet_coll_handle_t)); /* Run w/ root = (first, middle, last) w/o duplication */ for (i = 0; i < 3; ++i) { int root; if (i == 0) { root = 0; } else if (i == 1) { if (images < 3) continue; root = images / 2; } else { if (images < 2) continue; root = images - 1; } MSG00("Running tests with root = %d", (int)root); testLS_NONO(root, td); testLS_MYMY(root, td); testLS_ALLALL(root, td); testLS_NB(root, td); } test_free(td->hndl); PTHREAD_LOCALBARRIER(threads); done = 1; return NULL; } int main(int argc, char **argv) { static int *A, *B, *C, *D, *E, *F, *G; gex_Rank_t myproc, i; int pollers = 0; int j; /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testcoll", &argc, &argv, 0)); int arg = 1; int help = 0; while (argc > arg) { if (!strcmp(argv[arg], "-p")) { #if GASNET_PAR ++arg; if (argc > arg) { pollers = atoi(argv[arg]); arg++; } else help = 1; #else if (0 == gex_TM_QueryRank(myteam)) { fprintf(stderr, "testcoll %s\n", GASNET_CONFIG_STRING); fprintf(stderr, "ERROR: The -p option is only available in the PAR configuration.\n"); fflush(NULL); } sleep(1); gasnet_exit(1); #endif } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (argc > arg) { iters = atoi(argv[arg]); ++arg; } if (iters < 1) { iters = 1000; } #if GASNET_PAR if (argc > arg) { threads = atoi(argv[arg]); ++arg; } threads = test_thread_limit(threads); if (threads < 1) { printf("ERROR: Threads must be between 1 and %d\n", TEST_MAXTHREADS); exit(EXIT_FAILURE); } // NO MULTI-IMAGE SUPPORT IN CURRENT COLLECTIVES if (threads > 1) { MSG0("WARNING: thread count reduced to 1 (no multi-image support)"); threads = 1; } #endif /* get SPMD info */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); images = numprocs * threads; datasize = iters * (3 + 4 * images); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); #if GASNET_PAR #define USAGE "[options] (iters) (threadcnt)\n" \ " The -p option gives the number of polling threads, specified as\n" \ " a non-negative integer argument (default is no polling threads).\n" #else #define USAGE "(iters)\n" #endif test_init("testcoll",0,USAGE); TEST_SET_WAITMODE(threads + pollers); if (argc > arg || help) test_usage(); MSG0("Running coll test(s) with %d iterations.", iters); R = test_malloc(iters*sizeof(int)); /* Number if ints to store */ /* Carve some variables out of the (aligned) segment: */ Aw = test_malloc(iters * sizeof(int *)); Bw = test_malloc(iters * sizeof(int *)); Cw = test_malloc(iters * sizeof(int *)); Dw = test_malloc(iters * sizeof(int *)); Ew = test_malloc(iters * sizeof(int *)); Fw = test_malloc(iters * sizeof(int *)); Gw = test_malloc(iters * sizeof(int *)); A = (int *)TEST_MYSEG(); /* int [1*iters] */ B = A + 1*iters; /* int [1*iters] */ C = B + 1*iters; /* int [N*iters] */ D = C + images*iters; /* int [N*iters] */ E = D + images*iters; /* int [1*iters] */ F = E + 1*iters; /* int [N*iters] */ G = F + images*iters; /* int [N*iters] */ for (j = 0; j < iters; ++j) { Aw[j] = A + j; Bw[j] = B + j; Cw[j] = C + j*images; Dw[j] = D + j*images; Ew[j] = E + j; Fw[j] = F + j*images; Gw[j] = G + j*images; } /* The unaligned equivalents */ Av = test_malloc_2D(iters, images * sizeof(int *)); Bv = test_malloc_2D(iters, images * sizeof(int *)); Cv = test_malloc_2D(iters, images * sizeof(int *)); Dv = test_malloc_2D(iters, images * sizeof(int *)); Ev = test_malloc_2D(iters, images * sizeof(int *)); Fv = test_malloc_2D(iters, images * sizeof(int *)); Gv = test_malloc_2D(iters, images * sizeof(int *)); for (i = 0; i < images; ++i) { /* Using (TEST_SEG(n) + n) yields unaligned even when the segments are aligned. This is to help catch any case where addresses might have been misused that might go undetected if the addresses were aligned */ A = (int *)TEST_SEG(i/threads) + (i/threads) + datasize*(i%threads); B = A + 1*iters; C = B + 1*iters; D = C + images*iters; E = D + images*iters; F = E + 1*iters; G = F + images*iters; for (j = 0; j < iters; ++j) { Av[j][i] = A + j; Bv[j][i] = B + j; Cv[j][i] = C + j*images; Dv[j][i] = D + j*images; Ev[j][i] = E + j; Fv[j][i] = F + j*images; Gv[j][i] = G + j*images; } } BARRIER(); #if GASNET_PAR int total_threads = threads+pollers; MSG("Forking %d gasnet threads (%d active, %d polling)", total_threads, threads, pollers); { thread_data_t* tt_thread_data = test_malloc(total_threads*sizeof(thread_data_t)); for (int i = 0; i < threads; i++) { tt_thread_data[i].myproc = myproc; tt_thread_data[i].local_id = i; tt_thread_data[i].mythread = i + threads * myproc; tt_thread_data[i].peerthread = i + threads * (((myproc ^ 1) == numprocs) ? myproc : (myproc ^ 1)); } for (int i = threads; i < total_threads; ++i) { // polling threads only read the local_id tt_thread_data[i].local_id = i; } test_createandjoin_pthreads(total_threads, &thread_main, tt_thread_data, sizeof(tt_thread_data[0])); test_free(tt_thread_data); } #else { thread_data_t td; td.myproc = myproc; td.local_id = 0; td.mythread = myproc; td.peerthread = ((myproc ^ 1) == numprocs) ? myproc : (myproc ^ 1); thread_main(&td); } #endif BARRIER(); test_free(Aw); test_free(Bw); test_free(Cw); test_free(Dw); test_free_2D(Av); test_free_2D(Bv); test_free_2D(Cv); test_free_2D(Dv); test_free(R); MSG("done."); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testhello.c0000664000175000017500000000427115142313673016737 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testhello.c $ * Description: GASNet "Hello, World" test/example * Copyright 2010, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include /* Macro to check return codes and terminate with useful message. */ #define GASNET_SAFE(fncall) do { \ int _retval; \ if ((_retval = fncall) != GASNET_OK) { \ fprintf(stderr, "ERROR calling: %s\n" \ " at: %s:%i\n" \ " error: %s (%s)\n", \ #fncall, __FILE__, __LINE__, \ gasnet_ErrorName(_retval), gasnet_ErrorDesc(_retval)); \ fflush(stderr); \ gasnet_exit(_retval); \ } \ } while(0) int main(int argc, char **argv) { gex_Rank_t rank, size; size_t segsz = GASNET_PAGESIZE; int argi; gex_Client_t myclient; gex_EP_t myep; gex_TM_t myteam; gex_Segment_t mysegment; GASNET_SAFE(gex_Client_Init(&myclient, &myep, &myteam, "testhello", &argc, &argv, 0)); rank = gex_TM_QueryRank(myteam); size = gex_TM_QuerySize(myteam); argi = 1; if (argi < argc) { if (!strcmp(argv[argi], "-m")) { segsz = gasnet_getMaxLocalSegmentSize(); } else { size_t tmp = atol(argv[argi]); if (tmp) segsz = tmp; } ++argi; } GASNET_SAFE(gex_Segment_Attach(&mysegment, myteam, segsz)); /* Only first and last print here, to keep managable I/O volume at scale */ if (!rank || (rank == size-1)) printf("Hello from node %d of %d\n", (int)rank, (int)size); /* Spec says client should include a barrier before gasnet_exit() */ gasnet_barrier_notify(0,GASNET_BARRIERFLAG_ANONYMOUS); gasnet_barrier_wait(0,GASNET_BARRIERFLAG_ANONYMOUS); gasnet_exit(0); /* Not reached in most implementations */ return 0; } gasnet-2025.8.0/tests/testgasnet.c0000664000175000017500000022024615142313673017117 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testgasnet.c $ * Description: General GASNet correctness tests * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include /* limit segsz to prevent stack overflows for seg_everything tests */ #define TEST_MAXTHREADS 10 #ifndef TEST_SEGSZ #define TEST_SEGSZ (128*1024) /* for put/overwrite test */ #endif #include #define TEST_GASNETEX 1 #define SHORT_REQ_BASE GEX_AM_INDEX_BASE test_static_assert_file(GEX_AM_INDEX_BASE <= 128); #include /* Define to get one big function that pushes the gcc inliner heursitics */ #undef TESTGASNET_NO_SPLIT #if !defined(GASNET_HIDDEN_AM_CONCURRENCY_LEVEL) #error Missing GASNET_HIDDEN_AM_CONCURRENCY_LEVEL definition #endif #if PLATFORM_COMPILER_PGI_CXX // Not reproducible with NVHPC compilers // suppress warnings on PGI C++ 19.10/macos about intentional constant controlling expressions #pragma diag_suppress 236 #endif TEST_BACKTRACE_DECLS(); void doit(int partner, int *partnerseg); void doit0(int partner, int *partnerseg); void doit1(int partner, int *partnerseg); void doit2(int partner, int *partnerseg); void doit3(int partner, int *partnerseg); /*void doit4(int partner, int *partnerseg); -- removed along with the memset*() calls */ void doit5(int partner, int *partnerseg); void doit6(int partner, int *partnerseg); void doit7(int partner, int *partnerseg); void doit8(int partner, int *partnerseg); static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; static gex_Rank_t myrank; static gex_Rank_t numranks; /* ------------------------------------------------------------------------------------ */ #if GASNET_SEGMENT_EVERYTHING typedef struct { void *static_seg; void *common_seg; void *malloc_seg; void *sbrk_seg; void *mmap_seg; void *stack_seg; } test_everything_seginfo_t; test_everything_seginfo_t myinfo; test_everything_seginfo_t partnerinfo; int done = 0; GASNETT_EXTERNC void seg_everything_reqh(gex_Token_t token) { gex_AM_ReplyMedium0(token, 251, &myinfo, sizeof(test_everything_seginfo_t), GEX_EVENT_NOW, 0); } GASNETT_EXTERNC void seg_everything_reph(gex_Token_t token, void *buf, size_t nbytes) { assert(nbytes == sizeof(test_everything_seginfo_t)); memcpy(&partnerinfo, buf, nbytes); gasnett_local_wmb(); done = 1; } #define EVERYTHING_SEG_HANDLERS() \ { 250, (handler_fn_t)seg_everything_reqh, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0, NULL, NULL }, \ { 251, (handler_fn_t)seg_everything_reph, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_MEDIUM, 0, NULL, NULL }, char _static_seg[TEST_SEGSZ+PAGESZ] = {1}; char _common_seg[TEST_SEGSZ+PAGESZ]; void everything_tests(int partner) { char _stack_seg[TEST_SEGSZ+PAGESZ]; if (myrank == 0) MSG("*** gathering data segment info for SEGMENT_EVERYTHING tests..."); BARRIER(); myinfo.static_seg = alignup_ptr(&_static_seg, PAGESZ); myinfo.common_seg = alignup_ptr(&_common_seg, PAGESZ); myinfo.malloc_seg = alignup_ptr(test_malloc(TEST_SEGSZ+PAGESZ), PAGESZ); myinfo.sbrk_seg = alignup_ptr(sbrk(TEST_SEGSZ+PAGESZ), PAGESZ); #ifdef HAVE_MMAP myinfo.mmap_seg = alignup_ptr(gasnett_mmap(TEST_SEGSZ+PAGESZ), PAGESZ); #endif myinfo.stack_seg = alignup_ptr(&_stack_seg, PAGESZ); BARRIER(); /* fetch partner's addresses into partnerinfo */ gex_AM_RequestShort0(myteam, (gex_Rank_t)partner, 250, 0); GASNET_BLOCKUNTIL(done); BARRIER(); /* test that remote access works will all the various data areas */ if (myrank == 0) MSG(" --- testgasnet w/ static data area ---"); doit(partner, (int*)partnerinfo.static_seg); if (myrank == 0) MSG(" --- testgasnet w/ common block data area ---"); doit(partner, (int*)partnerinfo.common_seg); if (myrank == 0) MSG(" --- testgasnet w/ malloc data area ---"); doit(partner, (int*)partnerinfo.malloc_seg); if (myrank == 0) MSG(" --- testgasnet w/ sbrk data area ---"); doit(partner, (int*)partnerinfo.sbrk_seg); #ifdef HAVE_MMAP if (myrank == 0) MSG(" --- testgasnet w/ mmap'd data area ---"); doit(partner, (int*)partnerinfo.mmap_seg); #endif if (myrank == 0) MSG(" --- testgasnet w/ stack data area ---"); doit(partner, (int*)partnerinfo.stack_seg); BARRIER(); } #else #define EVERYTHING_SEG_HANDLERS() #endif #if GASNET_PAR #define MAX_THREADS 10 #else #define MAX_THREADS 1 #endif int num_threads = MAX_THREADS; void test_threadinfo(int threadid, int numthreads) { int i; gasnet_threadinfo_t my_ti; static gasnet_threadinfo_t all_ti[MAX_THREADS]; { GASNET_BEGIN_FUNCTION(); my_ti = GASNET_GET_THREADINFO(); } { gasnet_threadinfo_t ti = GASNET_GET_THREADINFO(); assert_always(ti == my_ti); } { GASNET_POST_THREADINFO(my_ti); gasnet_threadinfo_t ti = GASNET_GET_THREADINFO(); assert_always(ti == my_ti); } { GASNET_BEGIN_FUNCTION(); { GASNET_BEGIN_FUNCTION(); gasnet_threadinfo_t ti = GASNET_GET_THREADINFO(); assert_always(ti == my_ti); } { GASNET_POST_THREADINFO(GASNET_GET_THREADINFO()); gasnet_threadinfo_t ti = GASNET_GET_THREADINFO(); assert_always(ti == my_ti); } } assert(threadid < numthreads && numthreads <= MAX_THREADS); all_ti[threadid] = my_ti; PTHREAD_LOCALBARRIER(numthreads); if (my_ti) { // If non-NULL, IDs must be unique for (i = 0; i < numthreads; i++) { if (i != threadid) assert_always(my_ti != all_ti[i]); } } else { // If *any* ID is NULL, *all* must be NULL for (i = 0; i < numthreads; i++) { assert_always(all_ti[i] == NULL); } } PTHREAD_LOCALBARRIER(numthreads); } /* ------------------------------------------------------------------------------------ */ /* test libgasnet-specific gasnet_tools interfaces */ #if GASNET_PAR /* thread-parallel gasnet_tools tests */ #ifdef __cplusplus extern "C" #endif void *test_libgasnetpar_tools(void *p) { int idx = (int)(uintptr_t)p; PTHREAD_LOCALBARRIER(num_threads); test_threadinfo(idx, num_threads); PTHREAD_LOCALBARRIER(num_threads); #if GASNETI_ARCH_IBMPE /* Don't pin threads because system s/w will have already done so */ #else if (gasnett_getenv_yesno_withdefault("GASNET_TEST_SET_AFFINITY",1)) { // We can do little more than test for lack of crash here. // We will warn if the call fails on a platforms we support. // However, it is an ERROR if the call returns success when // GASNETT_SET_AFFINITY_SUPPORT is not defined. int rc = gasnett_set_affinity(idx); #if GASNETT_SET_AFFINITY_SUPPORT if (rc) { MSG("*** WARNING - gasnett_set_affinity() failed unexpectedly, possibly due to running in an environment which has already pinned processes. One may set GASNET_TEST_SET_AFFINITY=0 to skip this test."); } #else if (!rc) { MSG("*** ERROR - GASNETT_SET_AFFINITY RETURNED SUCCESS UNEXPECTEDLY!!!!!"); } #endif } #endif PTHREAD_LOCALBARRIER(num_threads); return NULL; } #endif void test_libgasnet_tools(void) { void *p; TEST_TRACING_MACROS(); #ifdef HAVE_MMAP p = gasnett_mmap(GASNETT_PAGESIZE); assert_always(p); assert_always(((uintptr_t)p)%GASNETT_PAGESIZE == 0); #endif test_threadinfo(0, 1); #if GASNET_DEBUGMALLOC { char *ptr = (char *)gasnett_debug_malloc(10); char *ptr2; gasnett_heapstats_t hs; assert_always(ptr); gasnett_debug_memcheck(ptr); ptr = (char *)gasnett_debug_realloc(ptr,20); assert_always(ptr); gasnett_debug_free(ptr); ptr = (char *)gasnett_debug_calloc(10,20); strcpy(ptr,"testing 1 2 3"); ptr2 = gasnett_debug_strdup(ptr); assert_always(ptr2 && ptr != ptr2 && !strcmp(ptr,ptr2)); gasnett_debug_free(ptr2); ptr2 = gasnett_debug_strndup(ptr,4); assert_always(ptr2 && ptr != ptr2 && !strncmp(ptr,ptr2,4) && strlen(ptr2) == 4); gasnett_debug_memcheck_one(); gasnett_debug_memcheck_all(); gasnett_debug_free(ptr2); gasnett_debug_free(ptr); gasnett_getheapstats(&hs); } #endif { static int c1,c2,c3,c4,c5,c6,c7,c8; // zero-initialized counters #define MACRO8A(a1,a2,a3,a4,a5,a6,a7,a8) \ (GASNETT_UNUSED_ARGS8(a1,a2,a3,a4,a5,a6,a7,a8),8) #define MACRO7A(a1,a2,a3,a4,a5,a6,a7) \ (GASNETT_UNUSED_ARGS7(a1,a2,a3,a4,a5,a6,a7),7) #define MACRO6A(a1,a2,a3,a4,a5,a6) \ (GASNETT_UNUSED_ARGS6(a1,a2,a3,a4,a5,a6),6) #define MACRO5A(a1,a2,a3,a4,a5) \ (GASNETT_UNUSED_ARGS5(a1,a2,a3,a4,a5),5) #define MACRO4A(a1,a2,a3,a4) \ (GASNETT_UNUSED_ARGS4(a1,a2,a3,a4),4) #define MACRO3A(a1,a2,a3) \ (GASNETT_UNUSED_ARGS3(a1,a2,a3),3) #define MACRO2A(a1,a2) \ (GASNETT_UNUSED_ARGS2(a1,a2),2) #define MACRO1A(a1) \ (GASNETT_UNUSED_ARGS1(a1),1) int x; x = MACRO8A(++c8,++c7,++c6,++c5,++c4,++c3,++c2,++c1); x = MACRO7A(++c8,++c7,++c6,++c5,++c4,++c3,++c2); x = MACRO6A(++c8,++c7,++c6,++c5,++c4,++c3); x = MACRO5A(++c8,++c7,++c6,++c5,++c4); x = MACRO4A(++c8,++c7,++c6,++c5); x = MACRO3A(++c8,++c7,++c6); x = MACRO2A(++c8,++c7); x = MACRO1A(++c8); assert_always(c1 == 1); assert_always(c2 == 2); assert_always(c3 == 3); assert_always(c4 == 4); assert_always(c5 == 5); assert_always(c6 == 6); assert_always(c7 == 7); assert_always(c8 == 8); assert_always(x == 1); #define MACRO8B(a0,a1,a2,a3,a4,a5,a6,a7,a8) do {\ x += (a0);\ GASNETT_UNUSED_ARGS8(a1,a2,a3,a4,a5,a6,a7,a8);\ } while (0) #define MACRO7B(a0,a1,a2,a3,a4,a5,a6,a7) do {\ x += (a0);\ GASNETT_UNUSED_ARGS7(a1,a2,a3,a4,a5,a6,a7);\ } while (0) #define MACRO6B(a0,a1,a2,a3,a4,a5,a6) do {\ x += (a0);\ GASNETT_UNUSED_ARGS6(a1,a2,a3,a4,a5,a6);\ } while (0) #define MACRO5B(a0,a1,a2,a3,a4,a5) do {\ x += (a0);\ GASNETT_UNUSED_ARGS5(a1,a2,a3,a4,a5);\ } while (0) #define MACRO4B(a0,a1,a2,a3,a4) do {\ x += (a0);\ GASNETT_UNUSED_ARGS4(a1,a2,a3,a4);\ } while (0) #define MACRO3B(a0,a1,a2,a3) do {\ x += (a0);\ GASNETT_UNUSED_ARGS3(a1,a2,a3);\ } while (0) #define MACRO2B(a0,a1,a2) do {\ x += (a0);\ GASNETT_UNUSED_ARGS2(a1,a2);\ } while (0) #define MACRO1B(a0,a1) do {\ x += (a0);\ GASNETT_UNUSED_ARGS1(a1);\ } while (0) MACRO8B(8,++c8,++c7,++c6,++c5,++c4,++c3,++c2,++c1); MACRO7B(7,++c8,++c7,++c6,++c5,++c4,++c3,++c2); MACRO6B(6,++c8,++c7,++c6,++c5,++c4,++c3); MACRO5B(5,++c8,++c7,++c6,++c5,++c4); MACRO4B(4,++c8,++c7,++c6,++c5); MACRO3B(3,++c8,++c7,++c6); MACRO2B(2,++c8,++c7); MACRO1B(1,++c8); assert_always(c1 == 1*2); assert_always(c2 == 2*2); assert_always(c3 == 3*2); assert_always(c4 == 4*2); assert_always(c5 == 5*2); assert_always(c6 == 6*2); assert_always(c7 == 7*2); assert_always(c8 == 8*2); assert_always(x == 37); } #if GASNET_PAR num_threads = test_thread_limit(num_threads); test_createandjoin_pthreads(num_threads, &test_libgasnetpar_tools, NULL, 0); #endif MSG("*** passed libgasnet_tools test!!"); } /* ------------------------------------------------------------------------------------ */ static const char *clientname = "testgasnet"; static const gex_Flags_t clientflags = 0; int main(int argc, char **argv) { uintptr_t local_segsz, global_segsz; int partner; TEST_SRAND(((unsigned int)TIME()) & 0xFFFF); gex_AM_Entry_t handlers[] = { EVERYTHING_SEG_HANDLERS() ALLAM_HANDLERS() }; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, clientname, &argc, &argv, clientflags)); if (GEX_SEGMENT_INVALID != gex_EP_QuerySegment(myep)) { MSG("*** ERROR - FAILED EP NO-SEGMENT TEST!!!!!"); } assert_always(gex_EP_QueryIndex(myep) == 0); myrank = gex_TM_QueryRank(myteam); numranks = gex_TM_QuerySize(myteam); local_segsz = gasnet_getMaxLocalSegmentSize(); global_segsz = gasnet_getMaxGlobalSegmentSize(); #if GASNET_SEGMENT_EVERYTHING assert_always(local_segsz == (uintptr_t)-1); assert_always(global_segsz == (uintptr_t)-1); #else assert_always(local_segsz >= global_segsz); assert_always(local_segsz % GASNET_PAGESIZE == 0); assert_always(global_segsz % GASNET_PAGESIZE == 0); assert_always(global_segsz > 0); #endif { uintptr_t size = (uintptr_t)-3; void *owneraddr = (void*)&size; void *localaddr = (void*)&size; // No segments have been created/bound yet. // Local bound-segment query must succeed synchronously and return zero size: gex_Event_t ev = gex_EP_QueryBoundSegmentNB(myteam, myrank, NULL, NULL, &size, 0); if (ev != GEX_EVENT_INVALID || size) { MSG("*** ERROR - FAILED NO BOUND SEGMENT TEST!!!!!"); } // Remote bound-segment query must not "fail", and must return zero size: size = (uintptr_t)-4; gex_Rank_t peer = (myrank + 1) % numranks; ev = gex_EP_QueryBoundSegmentNB(myteam, peer, NULL, NULL, &size, 0); if (ev == GEX_EVENT_NO_OP || (gex_Event_Wait(ev),0) || size) { MSG("*** ERROR - FAILED NO BOUND SEGMENT TEST!!!!!"); } // DEPRECATED queries must return non-zero and preserve output locations: size = (uintptr_t)-5; if (!gex_Segment_QueryBound(myteam, myrank, &owneraddr, &localaddr, &size) || !gex_Segment_QueryBound(myteam, peer, &owneraddr, &localaddr, &size) || owneraddr != (void*)&size || localaddr != (void*)&size || size != (uintptr_t)-5) { MSG("*** ERROR - FAILED NO BOUND SEGMENT TEST!!!!!"); } BARRIER(); } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, handlers, sizeof(handlers)/sizeof(gex_AM_Entry_t))); test_init("testgasnet",0,""); assert(TEST_SEGSZ >= 2*sizeof(int)*NUMHANDLERS_PER_TYPE); TEST_PRINT_CONDUITINFO(); { char lstr[50], gstr[50]; gasnett_format_number(local_segsz, lstr, sizeof(lstr), 1); gasnett_format_number(global_segsz, gstr, sizeof(gstr), 1); MSG0(" MaxLocalSegmentSize on node0: %s\n" " MaxGlobalSegmentSize: %s", lstr, gstr); } BARRIER(); { int smaj = GEX_SPEC_VERSION_MAJOR; int smin = GEX_SPEC_VERSION_MINOR; int rmaj = GASNET_RELEASE_VERSION_MAJOR; int rmin = GASNET_RELEASE_VERSION_MINOR; int rpat = GASNET_RELEASE_VERSION_PATCH; // TODO-EX: (smaj > 0) when we reach 1.0 assert_always(smaj >= 0 && smin >= 0 && rmaj > 0 && rmin >= 0 && rpat >= 0); } { int i; printf("my args: argc=%i argv=[", argc); for (i=0; i < argc; i++) { printf("%s'%s'",(i>0?" ":""),argv[i]); } printf("]\n"); fflush(stdout); } BARRIER(); TEST_BACKTRACE_INIT(argv[0]); TEST_BACKTRACE(); test_libgasnet_tools(); partner = (myrank + 1) % numranks; #if GASNET_SEGMENT_EVERYTHING everything_tests(partner); #else doit(partner, (int *)TEST_SEG(partner)); #endif MSG("done."); gasnet_exit(0); return 0; } gex_Event_t *am_lcopt[] = { GEX_EVENT_NOW, GEX_EVENT_GROUP, NULL }; gex_Flags_t am_flags[] = { GEX_FLAG_IMMEDIATE, 0, GEX_FLAG_IMMEDIATE | GEX_FLAG_AM_PREPARE_LEAST_CLIENT, GEX_FLAG_AM_PREPARE_LEAST_CLIENT, GEX_FLAG_IMMEDIATE | GEX_FLAG_AM_PREPARE_LEAST_ALLOC, GEX_FLAG_AM_PREPARE_LEAST_ALLOC }; #define AM_LCOPT_CNT ((int)(sizeof(am_lcopt)/sizeof(am_lcopt[0]))) #define AM_FLAGS_CNT ((int)(sizeof(am_flags)/sizeof(am_flags[0]))) typedef struct { uint32_t RequestMedium[AM_LCOPT_CNT][AM_FLAGS_CNT]; // uint32_t to ensure the struct fits under 512 bytes uint32_t ReplyMedium[AM_LCOPT_CNT][AM_FLAGS_CNT]; size_t RequestLong[AM_LCOPT_CNT][AM_FLAGS_CNT]; size_t ReplyLong[AM_LCOPT_CNT][AM_FLAGS_CNT]; } amsz_t; extern gex_AM_Entry_t sizecheck_handlers[]; GASNETT_EXTERNC void sizecheck_reqh(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t args) { gex_Rank_t r = test_msgsource(token); assert_always(r < numranks); assert_always(args >= 0 && args <= (gex_AM_Arg_t)gex_AM_MaxArgs()); assert_always(nbytes == sizeof(amsz_t)); amsz_t *max = (amsz_t *)buf; // verify that AMMax*() return symmetric results in both directions for (int lci = 0; lci < AM_LCOPT_CNT; lci++) { for (int flagsi = 0; flagsi < AM_FLAGS_CNT; flagsi++) { #define CHECK_MAX(cat) do { \ gex_Flags_t flags = am_flags[flagsi]; \ gex_Event_t *lcopt = am_lcopt[lci]; \ if ((lcopt == GEX_EVENT_GROUP) && strstr(#cat, "Reply")) break; \ size_t val = gex_AM_Max##cat(myteam, r, lcopt, flags, args); \ if (val != max->cat[lci][flagsi]) \ MSG("*** ERROR - FAILED MAX SYMMETRY TEST! args=%i lci=%i flagsi=%i", \ args,lci,flagsi); \ if (flags & (GEX_FLAG_AM_PREPARE_LEAST_CLIENT | \ GEX_FLAG_AM_PREPARE_LEAST_ALLOC)) break; /* exclude from LUB */ \ size_t lubval = gex_AM_LUB##cat(); \ if (val < lubval) \ MSG("*** ERROR - FAILED HANDLER LUB/MAX TEST! args=%i rank=%i lci=%i flagsi=%i", \ args,(int)r,lci,flagsi); \ } while (0) CHECK_MAX(RequestMedium); CHECK_MAX(ReplyMedium); CHECK_MAX(RequestLong); CHECK_MAX(ReplyLong); } // flags } // lc #undef CHECK_MAX gex_AM_ReplyShort0(token, sizecheck_handlers[1].gex_index, 0); #if !PLATFORM_COMPILER_XLC // Skip due to external bug 4205 // verify that payload queries evalute their args exactly once #define CHECK_TOKEN_MAX_EVAL(cat) \ do { \ int a = 0, b = 0, c = 0, d = 0; \ (void) gex_Token_MaxReply##cat((a++,token),(b++,GEX_EVENT_NOW),(c++,0),(d++,0)); \ assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); \ } while (0) CHECK_TOKEN_MAX_EVAL(Medium); CHECK_TOKEN_MAX_EVAL(Long); #undef CHECK_TOKEN_MAX_EVAL #endif } gasnett_atomic_t sizecheck_ack = gasnett_atomic_init(0); GASNETT_EXTERNC void sizecheck_reph(gex_Token_t token) { assert_always(gasnett_atomic_read(&sizecheck_ack,0) > 0); gasnett_atomic_decrement(&sizecheck_ack,0); } gex_AM_Entry_t sizecheck_handlers[] = { // deliberately registered as don't-care indexes { 0, (handler_fn_t)sizecheck_reqh, GEX_FLAG_AM_MEDIUM|GEX_FLAG_AM_REQUEST, 1, 0, "sizecheck_reqh" }, { 0, (handler_fn_t)sizecheck_reph, GEX_FLAG_AM_SHORT|GEX_FLAG_AM_REPLY, 0, 0, "sizecheck_reph" }, }; void doit(int partner, int *partnerseg) { BARRIER(); // check predefined object constants #define CHECK_ZERO_CONSTANT(type, constant) do { \ static type vz; \ type v = constant; \ test_static_assert(sizeof(constant) == sizeof(type)); \ assert_always(sizeof(constant) == sizeof(v)); \ assert_always(!memcmp(&v,&vz,sizeof(type))); \ } while (0) CHECK_ZERO_CONSTANT(gex_Segment_t, GEX_SEGMENT_INVALID); CHECK_ZERO_CONSTANT(gex_TM_t, GEX_TM_INVALID); CHECK_ZERO_CONSTANT(gex_Client_t, GEX_CLIENT_INVALID); CHECK_ZERO_CONSTANT(gex_EP_t, GEX_EP_INVALID); CHECK_ZERO_CONSTANT(gex_MK_t, GEX_MK_INVALID); #define CHECK_NONZERO_CONSTANT(type, constant) do { \ static type vz; \ type v = constant; \ test_static_assert(sizeof(constant) == sizeof(type)); \ assert_always(sizeof(constant) == sizeof(v)); \ assert_always(memcmp(&v,&vz,sizeof(type))); \ } while (0) CHECK_NONZERO_CONSTANT(gex_MK_t, GEX_MK_HOST); if (strcmp(clientname, gex_Client_QueryName(myclient))) { MSG("*** ERROR - FAILED CLIENT NAME TEST!!!!!"); } if (clientflags != gex_Client_QueryFlags(myclient)) { MSG("*** ERROR - FAILED CLIENT FLAGS TEST!!!!!"); } if (myclient != gex_EP_QueryClient(myep)) { MSG("*** ERROR - FAILED EP CLIENT TEST!!!!!"); } if (myclient != gex_TM_QueryClient(myteam)) { MSG("*** ERROR - FAILED TM CLIENT TEST!!!!!"); } if (myep != gex_TM_QueryEP(myteam)) { MSG("*** ERROR - FAILED TM EP TEST!!!!!"); } #define TEST_CDATA(type,var) do { \ static char *cdata_##type = 0; \ if ((char *)gex_##type##_QueryCData(var) != cdata_##type) \ MSG("*** ERROR - FAILED %s TEST!!!!!", "gex_" #type "_QueryCData"); \ cdata_##type = strdup(#type " cdata"); \ gex_##type##_SetCData(var, cdata_##type); \ char *temp = (char *)gex_##type##_QueryCData(var); \ if (temp != cdata_##type) \ MSG("*** ERROR - FAILED %s TEST!!!!!", "gex_" #type "_SetCData"); \ } while(0) TEST_CDATA(Client,myclient); TEST_CDATA(EP,myep); TEST_CDATA(TM,myteam); #if GASNET_SEGMENT_EVERYTHING // test.h intercepted gex_Segment_Attach() but does not fake a gex_Segment_t #else if (myclient != gex_Segment_QueryClient(mysegment)) { MSG("*** ERROR - FAILED SEGMENT CLIENT TEST!!!!!"); } if (mysegment != gex_EP_QuerySegment(myep)) { MSG("*** ERROR - FAILED EP SEGMENT TEST!!!!!"); } TEST_CDATA(Segment,mysegment); { void *owneraddr, *localaddr; uintptr_t size; // Local segment query must locate the segment and give same data as direct queries gex_Event_t ev = gex_EP_QueryBoundSegmentNB(myteam, myrank, &owneraddr, &localaddr, &size, GEX_FLAG_IMMEDIATE); if (ev != GEX_EVENT_INVALID || size != gex_Segment_QuerySize(mysegment) || owneraddr != gex_Segment_QueryAddr(mysegment) || owneraddr != localaddr) { MSG("*** ERROR - FAILED LOCAL BOUND SEGMENT TEST!!!!!"); } // and DEPRECATED API should too: owneraddr = localaddr = NULL; size = 0; if (gex_Segment_QueryBound(myteam, myrank, &owneraddr, &localaddr, &size) || size != gex_Segment_QuerySize(mysegment) || owneraddr != gex_Segment_QueryAddr(mysegment) || owneraddr != localaddr) { MSG("*** ERROR - FAILED LOCAL BOUND SEGMENT TEST!!!!!"); } { gex_Rank_t peer = (myrank + 1) % numranks; size = 0; owneraddr = NULL; localaddr = (void*)&size; // Remote bound-segment IMMEDIATE queries may fail, but can never return a real event ev = gex_EP_QueryBoundSegmentNB(myteam, peer, &owneraddr, &localaddr, &size, GEX_FLAG_IMMEDIATE); if (ev == GEX_EVENT_NO_OP) { // IMMEDIATE "failed. Non-IMMEDIATE retry must locate the segment. ev = gex_EP_QueryBoundSegmentNB(myteam, peer, &owneraddr, &localaddr, &size, 0); if (ev == GEX_EVENT_NO_OP) { MSG("*** ERROR - FAILED REMOTE BOUND SEGMENT TEST!!!!!"); } gex_Event_Wait(ev); } else if (ev != GEX_EVENT_INVALID) { // "real" event (or entirely bogus value) returned from an IMMEDIATE query MSG("*** ERROR - FAILED REMOTE BOUND SEGMENT TEST!!!!!"); } // Successfully query must set all outputs to "plausible" values if (!size || !owneraddr || localaddr == (void*)&size) { MSG("*** ERROR - FAILED REMOTE BOUND SEGMENT TEST!!!!!"); } // and DEPRECATED API should match: void *owneraddr2 = NULL; void *localaddr2 = NULL; uintptr_t size2 = 0; if (gex_Segment_QueryBound(myteam, peer, &owneraddr2, &localaddr2, &size2) || size2 != size || owneraddr2 != owneraddr || localaddr2 != localaddr) { MSG("*** ERROR - FAILED REMOTE BOUND SEGMENT TEST!!!!!"); } } } // To be removed: assert(gex_Segment_QueryAddr(mysegment) == TEST_MYSEG()); assert(gex_Segment_QuerySize(mysegment) >= TEST_SEGSZ_REQUEST); #endif #if !GASNET_CONDUIT_SMP { CHECK_ZERO_CONSTANT(gex_AD_t, GEX_AD_INVALID); gex_AD_t ad; gex_DT_t domain_type = GEX_DT_U32; gex_OP_t domain_ops = GEX_OP_FADD|GEX_OP_SWAP; gex_Flags_t domain_flags = GEX_FLAG_PEER_SEG_OFFSET; gex_AD_Create(&ad, myteam, domain_type, domain_ops, domain_flags); if (myteam != gex_AD_QueryTM(ad)) { MSG("*** ERROR - FAILED ATOMIC DOMAIN TM TEST!!!!!"); } if (domain_type != gex_AD_QueryDT(ad)) { MSG("*** ERROR - FAILED ATOMIC DOMAIN DATATYPE TEST!!!!!"); } if (domain_ops != gex_AD_QueryOps(ad)) { MSG("*** ERROR - FAILED ATOMIC DOMAIN OPS TEST!!!!!"); } if (domain_flags != gex_AD_QueryFlags(ad)) { MSG("*** ERROR - FAILED ATOMIC DOMAIN FLAGS TEST!!!!!"); } // Don't use TEST_CDATA because EVERYTHING reaches here multiple times w/ different objects if (NULL != gex_AD_QueryCData(ad)) { MSG("*** ERROR - FAILED gex_AD_QueryCData TEST!!!!!"); } gex_AD_SetCData(ad, (void*) ad); if (ad != gex_AD_QueryCData(ad)) { MSG("*** ERROR - FAILED gex_AD_QueryCData TEST!!!!!"); } gex_AD_Destroy(ad); } #endif { gex_RankInfo_t *neighbor_array; gex_Rank_t neighbor_size, neighbor_rank; gex_System_QueryNbrhdInfo(&neighbor_array, &neighbor_size, &neighbor_rank); assert_always(neighbor_array != NULL); assert_always((neighbor_size > 0) && (neighbor_size <= gex_System_QueryJobSize())); assert_always(neighbor_rank < neighbor_size); assert_always(neighbor_array[neighbor_rank].gex_jobrank == gex_System_QueryJobRank()); for (gex_Rank_t i = 0; i < neighbor_size; ++i) { // Check sort: assert_always(!i || (neighbor_array[i].gex_jobrank > neighbor_array[i-1].gex_jobrank)); } gex_RankInfo_t *host_array; gex_Rank_t host_size, host_rank; gex_System_QueryHostInfo(&host_array, &host_size, &host_rank); assert_always(host_array != NULL); assert_always((host_size > 0) && (host_size <= gex_System_QueryJobSize())); assert_always(host_rank < host_size); assert_always(host_array[host_rank].gex_jobrank == gex_System_QueryJobRank()); for (gex_Rank_t i = 0; i < host_size; ++i) { // Check sort: assert_always(!i || (host_array[i].gex_jobrank > host_array[i-1].gex_jobrank)); } // Nbrhd must be a subset of Host: // Note that since both arrays are sorted this check is linear in time for (gex_Rank_t nidx = 0, hidx = 0; nidx < neighbor_size; ++nidx) { for (/*empty*/; hidx < host_size; ++hidx) { if (neighbor_array[nidx].gex_jobrank == host_array[hidx].gex_jobrank) break; } assert_always(hidx < host_size); // fail if nbrhd member not found in host_array } #if !GASNET_SEGMENT_EVERYTHING // Exercise sharing to validate ranks in neighbor_array BARRIER(); for (gex_Rank_t i = 0; i < neighbor_size; ++i) { gex_Rank_t *crossmap = NULL; size_t size; gex_Event_Wait( gex_EP_QueryBoundSegmentNB(myteam, neighbor_array[i].gex_jobrank, NULL, (void**)&crossmap, &size, 0) ); assert_always(size != 0); assert_always(crossmap != NULL); crossmap[neighbor_rank] = myrank; } BARRIER(); gex_Rank_t *myseg = (gex_Rank_t *)TEST_MYSEG(); for (gex_Rank_t i = 0; i < neighbor_size; ++i) { assert_always(neighbor_array[i].gex_jobrank == myseg[i]); } BARRIER(); #endif } { gex_Rank_t n_proc = gex_System_QueryJobSize(); gex_Rank_t n_size, n_rank, h_size, h_rank; gex_System_QueryMyPosition(&n_size, &n_rank, &h_size, &h_rank); // Ranks in both sets must be less than set size: assert_always(n_size > n_rank); assert_always(h_size > h_rank); // #proc >= #nbrhd >= #host: assert_always(n_proc >= n_size && n_size >= h_size); } assert_always(gex_System_GetVerboseErrors()); gex_System_SetVerboseErrors(0); assert_always(!gex_System_GetVerboseErrors()); gex_System_SetVerboseErrors(1); assert_always(gex_System_GetVerboseErrors()); gex_System_SetVerboseErrors(0); static int queried_progress_threads = 0; if (! queried_progress_threads) { // Multiple calls are UB // Test expected failure from gex_System_QueryProgressThreads() // in the absence of GEX_FLAG_DEFER_THREADS at init time unsigned int count; const gex_ProgressThreadInfo_t *data; int rc = gex_System_QueryProgressThreads(myclient, &count, &data, 0); assert_always(rc == GASNET_ERR_RESOURCE); queried_progress_threads = 1; } gex_System_SetVerboseErrors(1); /* width-independent computation of an integer variable with unknown unsigned type */ #if PLATFORM_ARCH_LITTLE_ENDIAN #define compute_uint_val(lval_u64,var) do { \ lval_u64 = 0; \ for (size_t i=0; i < sizeof(var); i++) { \ lval_u64 <<= 8; \ lval_u64 |= *(((uint8_t*)(&(var)+1)) - (i + 1)); \ } \ } while (0) #else #define compute_uint_val(lval_u64,var) do { \ lval_u64 = 0; \ for (size_t i=0; i < sizeof(var); i++) { \ lval_u64 <<= 8; \ lval_u64 |= *(((uint8_t*)&(var)) + i); \ } \ } while (0) #endif #define assert_inttype(type) do { \ volatile char a[(type)1.1f]; \ volatile type v = (signed char)0x55; /* warnings here mean non-compliance */ \ assert_always((double)(type)1.1f < 1.1f); \ uint64_t val; compute_uint_val(val,v); \ assert_always(val == 0x55); \ } while (0) #define assert_signed(type) do { \ volatile type v = 0; /* prevent warnings */ \ assert_inttype(type); \ assert_always((type)(v-1) < v); \ test_static_assert((type)(-1) < (type)0); \ } while (0) #define assert_unsigned(type) do { \ volatile type v = 0; /* prevent warnings */ \ assert_inttype(type); \ assert_always((type)(v-1) > v); \ test_static_assert((type)(-1) > (type)0); \ } while (0) #define assert_arr_unaliased(type, arr) do { \ size_t const cnt = sizeof(arr)/sizeof(type); \ for (size_t i = 0; i < cnt; i++) { \ type other = 0; \ for (size_t j = 0; j < cnt; j++) { \ if (i != j) { \ other |= arr[j]; \ } \ } \ /* arr[i] has at least one unique bit: */ \ assert_always((other | arr[i]) != other); \ } \ } while (0) #define assert_arr_disjointbits(type, arr) do {\ size_t const cnt = sizeof(arr)/sizeof(type); \ for (size_t i = 0; i < cnt; i++) { \ for (size_t j = i+1; j < cnt; j++) { \ assert_always((arr[i] & arr[j]) == 0); \ } \ } \ } while (0) #define assert_arr_nonzero(type, arr) do { \ size_t const cnt = sizeof(arr)/sizeof(type); \ for (size_t i = 0; i < cnt; i++) { \ assert_always(arr[i] != 0); \ } \ } while (0) #define assert_arr_all_val(type, arr, allval) do { \ size_t const cnt = sizeof(arr)/sizeof(type); \ type some = 0; \ for (size_t i = 0; i < cnt; i++) { \ some |= arr[i]; \ } \ assert_always((some & ~allval) == 0); \ } while (0) // Format one random mask of each possible popcount() including 0 #define test_format(type,array,format_fn) do { \ const int elems = sizeof(array)/sizeof(type); \ type val = 0; \ for (int i = 0; i <= elems; ++i) { \ if (i) { \ type prev = val; \ do { \ val |= array[TEST_RAND(0,elems-1)]; \ } while (val == prev); \ } \ size_t sz = format_fn(NULL, val); \ char *buf = (char*) test_malloc(sz); \ size_t rc = format_fn(buf, val); \ assert_always(rc <= sz); \ assert_always(strlen(buf) < sz); \ test_free(buf); \ } \ } while (0) /* sanity check macros and system types */ assert_signed(int8_t); assert_signed(int16_t); assert_signed(int32_t); assert_signed(int64_t); assert_signed(intptr_t); assert_signed(ssize_t); assert_signed(ptrdiff_t); assert_unsigned(uint8_t); assert_unsigned(uint16_t); assert_unsigned(uint32_t); assert_unsigned(uint64_t); assert_unsigned(uintptr_t); assert_unsigned(size_t); /* team/rank tests */ assert_unsigned(gex_Rank_t); assert(myrank == gex_TM_QueryRank(myteam)); assert(numranks == gex_TM_QuerySize(myteam)); assert_always(myrank == gex_System_QueryJobRank()); assert_always(numranks == gex_System_QueryJobSize()); assert_always(myrank < numranks); assert_always(numranks < GEX_RANK_INVALID); /* max thread query */ #if GASNET_SEQ assert_always(gex_System_QueryMaxThreads() == 1); #else // Not a spec requirement, but a reasonable assumption for any implementation assert_always(gex_System_QueryMaxThreads() > 1); #endif // Hidden AM concurrency query assert_always(gex_System_QueryHiddenAMConcurrencyLevel() >= 0); assert_always(gex_System_QueryHiddenAMConcurrencyLevel() <= GASNET_HIDDEN_AM_CONCURRENCY_LEVEL); /* ep_index/ep_location tests */ assert_unsigned(gex_EP_Index_t); for (gex_Rank_t i = 0; i < numranks; ++i) { gex_EP_Location_t ep_loc = gex_TM_TranslateRankToEP(myteam, i, 0); assert_always(ep_loc.gex_rank == i); assert_always(ep_loc.gex_rank == gex_TM_TranslateRankToJobrank(myteam,i)); assert_always(ep_loc.gex_ep_index == 0); } /* AM limit tests */ assert_always(gex_AM_MaxArgs() >= 2*MAX(sizeof(int),sizeof(void*))); assert_always(gex_AM_LUBRequestMedium() >= 512); assert_always(gex_AM_LUBReplyMedium() >= 512); assert_always(gex_AM_LUBRequestLong() >= 512); assert_always(gex_AM_LUBReplyLong() >= 512); #if !PLATFORM_COMPILER_XLC // Skip due to external bug 4205 // verify that payload queries evalute their args exactly once #define CHECK_AM_MAX_EVAL(name) \ do { \ int a = 0, b = 0, c = 0, d = 0, e = 0; \ (void) gex_AM_Max##name((a++,myteam),(b++,GEX_RANK_INVALID),(c++,GEX_EVENT_NOW),(d++,0),(e++,0)); \ assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); assert_always(e==1); \ } while (0) CHECK_AM_MAX_EVAL(RequestMedium); CHECK_AM_MAX_EVAL(RequestLong); CHECK_AM_MAX_EVAL(ReplyMedium); CHECK_AM_MAX_EVAL(ReplyLong); #undef CHECK_AM_MAX_EVAL #endif static int firsttime = 1; if (firsttime) { size_t numhand = sizeof(sizecheck_handlers)/sizeof(gex_AM_Entry_t); GASNET_Safe(gex_EP_RegisterHandlers(myep, sizecheck_handlers, numhand)); const int maxidx = 255 - test_num_am_handlers; // Offset by any don't care registrations in test.h for (size_t i = 0; i < numhand; i++) assert_always(sizecheck_handlers[i].gex_index == maxidx - i); firsttime = 0; BARRIER(); } /* verify Max >= LUB and is non-increasing as args grows */ amsz_t lub; memset(&lub,-1,sizeof(lub)); assert(sizeof(amsz_t) <= 512); assert(sizeof(amsz_t) <= gex_AM_LUBRequestMedium()); for (int args = 0; args <= (int)gex_AM_MaxArgs(); args += (int)gex_AM_MaxArgs()) { amsz_t ranklub; memset(&ranklub,-1,sizeof(ranklub)); for (gex_Rank_t d = 0; d <= numranks; d++) { gex_Rank_t r; if (d == numranks) r = GEX_RANK_INVALID; // min of maxes else r = (myrank + d) % numranks; amsz_t max; memset(&max,0,sizeof(max)); // avoid a valgrind warning for uninit bytes for (int lci = 0; lci < AM_LCOPT_CNT; lci++) { for (int flagsi = 0; flagsi < AM_FLAGS_CNT; flagsi++) { #define GET_MAX(cat) do { \ gex_Flags_t flags = am_flags[flagsi]; \ gex_Event_t *lcopt = am_lcopt[lci]; \ if ((lcopt == GEX_EVENT_GROUP) && strstr(#cat, "Reply")) break; \ size_t val = gex_AM_Max##cat(myteam, r, lcopt, flags, args); \ if (args) { \ size_t more_args = val; \ for (int j = args-1; j >= 0; --j) { \ size_t less_args = gex_AM_Max##cat(myteam, r, lcopt, flags, j); \ if (less_args < more_args) { \ MSG("*** ERROR - FAILED MAX ARGS MONOTONICITY TEST! " \ "args=%i rank=%i lci=%i flagsi=%i", j,(int)r,lci,flagsi); \ break; \ } \ more_args = less_args; \ } \ } \ max.cat[lci][flagsi] = val; \ assert_always(max.cat[lci][flagsi] == val); /* check overflow */ \ if (r < GEX_RANK_INVALID) { \ ranklub.cat[lci][flagsi] = MIN(val,ranklub.cat[lci][flagsi]); \ } else if (val != ranklub.cat[lci][flagsi]) { \ MSG("*** ERROR - FAILED ALL-RANK LUB TEST! args=%i lci=%i flagsi=%i", \ args,lci,flagsi); \ } \ if (flags & (GEX_FLAG_AM_PREPARE_LEAST_CLIENT | \ GEX_FLAG_AM_PREPARE_LEAST_ALLOC)) break; /* exclude from LUB */ \ lub.cat[0][0] = MIN(val,lub.cat[0][0]); \ size_t lubval = gex_AM_LUB##cat(); \ if (val < lubval) \ MSG("*** ERROR - FAILED LUB/MAX TEST! args=%i rank=%i lci=%i flagsi=%i", \ args,(int)r,lci,flagsi); \ } while (0) GET_MAX(RequestMedium); GET_MAX(ReplyMedium); GET_MAX(RequestLong); GET_MAX(ReplyLong); } // flags } // lc if (r == GEX_RANK_INVALID) break; else { gasnett_atomic_increment(&sizecheck_ack,0); gex_AM_RequestMedium1(myteam, r, sizecheck_handlers[0].gex_index, &max, sizeof(max), GEX_EVENT_NOW, 0, args); } } // rank } // args #define CHECK_LUB(cat) do { \ size_t lubval = gex_AM_LUB##cat(); \ if (lub.cat[0][0] != lubval) { \ MSG("*** ERROR - FAILED LUB TEST!"); \ } \ } while (0) CHECK_LUB(RequestMedium); CHECK_LUB(ReplyMedium); CHECK_LUB(RequestLong); CHECK_LUB(ReplyLong); #undef CHECK_LUB #undef GET_MAX GASNET_BLOCKUNTIL(gasnett_atomic_read(&sizecheck_ack,0) == 0); BARRIER(); /* Event tests */ gex_Event_t invalid = GEX_EVENT_INVALID; gex_Event_t noop = GEX_EVENT_NO_OP; assert_always(invalid == 0); assert_always(noop != invalid); gex_Event_t lc = noop; size_t sz = MIN(8192,TEST_SEGSZ/2); //gex_Event_t rc = gex_RMA_PutNB(myteam, partner, sz, 0, sz, &lc, GEX_FLAG_SELF_SEG_OFFSET | GEX_FLAG_PEER_SEG_OFFSET); // TODO-EX gex_Event_t rc = gex_RMA_PutNB(myteam, partner, (char *)partnerseg + sz, TEST_MYSEG(), sz, &lc, GEX_FLAG_SELF_SEG_BOUND | GEX_FLAG_PEER_SEG_BOUND); assert_always(rc != noop); assert_always(lc != noop); if (rc) { gex_Event_t qlc = gex_Event_QueryLeaf(rc, GEX_EC_LC); if (lc && qlc) assert_always(lc == qlc); gex_Event_Wait(lc); assert_always(!gex_Event_Test(lc)); assert_always(!gex_Event_TestSome(&lc,1,0)); assert_always(!gex_Event_TestAll(&lc,1,0)); assert_always(!gex_Event_Test(qlc)); assert_always(!gex_Event_TestSome(&qlc,1,0)); assert_always(!gex_Event_TestAll(&qlc,1,0)); gex_Event_t qlc2 = gex_Event_QueryLeaf(rc, GEX_EC_LC); if (lc && qlc2) assert_always(lc == qlc2); assert_always(!gex_Event_Test(qlc2)); assert_always(!gex_Event_TestSome(&qlc2,1,0)); assert_always(!gex_Event_TestAll(&qlc2,1,0)); gex_Event_Wait(rc); } #ifndef TESTGASNET_NO_SPLIT doit0(partner, partnerseg); } void doit0(int partner, int *partnerseg) { #endif // GEX_FLAG_PEER_NEVER_SELF *might* alias GEX_FLAG_PEER_NEVER_NBRHD #if (GEX_FLAG_PEER_NEVER_SELF == GEX_FLAG_PEER_NEVER_NBRHD) #define MAYBE_GEX_FLAG_PEER_NEVER_SELF /*empty*/ #else // Note the trailing comma in this defn #define MAYBE_GEX_FLAG_PEER_NEVER_SELF GEX_FLAG_PEER_NEVER_SELF, #endif /* misc type tests */ assert_inttype(gex_Flags_t); // flags used in calls to initiate communication #define COMM_INIT_FLAGS \ GEX_FLAG_IMMEDIATE, \ \ GEX_FLAG_SELF_SEG_UNKNOWN, \ GEX_FLAG_SELF_SEG_SOME, \ GEX_FLAG_SELF_SEG_BOUND, \ GEX_FLAG_SELF_SEG_OFFSET, \ GEX_FLAG_PEER_SEG_UNKNOWN, \ GEX_FLAG_PEER_SEG_SOME, \ GEX_FLAG_PEER_SEG_BOUND, \ GEX_FLAG_PEER_SEG_OFFSET, \ MAYBE_GEX_FLAG_PEER_NEVER_SELF \ GEX_FLAG_PEER_NEVER_NBRHD, \ /*GEX_FLAG_LC_COPY_YES, */ \ /*GEX_FLAG_LC_COPY_NO, */ static gex_Flags_t const flags_arr[] = { // ensure all the flags exist COMM_INIT_FLAGS GEX_FLAG_AM_PREPARE_LEAST_CLIENT, GEX_FLAG_AM_PREPARE_LEAST_ALLOC, GEX_FLAG_AD_MY_RANK, GEX_FLAG_AD_MY_NBRHD, GEX_FLAG_AD_ACQ, GEX_FLAG_AD_REL, GEX_FLAG_AD_FAVOR_MY_RANK, GEX_FLAG_AD_FAVOR_MY_NBRHD, GEX_FLAG_AD_FAVOR_REMOTE, GEX_FLAG_AM_SHORT, GEX_FLAG_AM_MEDIUM, GEX_FLAG_AM_LONG, GEX_FLAG_AM_MEDLONG, GEX_FLAG_AM_REQUEST, GEX_FLAG_AM_REPLY, GEX_FLAG_AM_REQREP, GEX_FLAG_ENABLE_LEAF_LC, GEX_FLAG_TM_SCRATCH_SIZE_MIN, // DEPRECATED since spec 0.11 but still valid GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED, GEX_FLAG_TM_GLOBAL_SCRATCH, GEX_FLAG_TM_LOCAL_SCRATCH, GEX_FLAG_TM_SYMMETRIC_SCRATCH, GEX_FLAG_TM_NO_SCRATCH, GEX_FLAG_SCRATCH_SEG_OFFSET, GEX_FLAG_GLOBALLY_QUIESCED, GEX_FLAG_RANK_IS_JOBRANK, GEX_FLAG_HINT_ACCEL_AD, GEX_FLAG_HINT_ACCEL_COLL, GEX_FLAG_HINT_ACCEL_ALL, GEX_FLAG_USES_GASNET1, GEX_FLAG_DEFER_THREADS, }; assert_arr_nonzero(gex_Flags_t, flags_arr); // No zero values // Ensure lack of aliasing within groups of flags potentially passed togther static gex_Flags_t const flags_rma[] = { // gex_RMA_* initiation COMM_INIT_FLAGS }; assert_arr_unaliased(gex_Flags_t, flags_rma); static gex_Flags_t const flags_ammax[] = { // gex_AM_Max* prepare-specific GEX_FLAG_AM_PREPARE_LEAST_CLIENT, GEX_FLAG_AM_PREPARE_LEAST_ALLOC, }; assert_arr_unaliased(gex_Flags_t, flags_ammax); static gex_Flags_t const flags_adc[] = { // gex_AD_Create GEX_FLAG_AD_FAVOR_MY_RANK, GEX_FLAG_AD_FAVOR_MY_NBRHD, GEX_FLAG_AD_FAVOR_REMOTE, }; assert_arr_unaliased(gex_Flags_t, flags_adc); static gex_Flags_t const flags_ad[] = { // gex_AD_Op* initiation COMM_INIT_FLAGS GEX_FLAG_AD_MY_RANK, GEX_FLAG_AD_MY_NBRHD, GEX_FLAG_AD_ACQ, GEX_FLAG_AD_REL, GEX_FLAG_RANK_IS_JOBRANK, }; assert_arr_unaliased(gex_Flags_t, flags_ad); static gex_Flags_t const flags_amreg[] = { // gex_EP_RegisterHandlers GEX_FLAG_AM_SHORT, GEX_FLAG_AM_MEDIUM, GEX_FLAG_AM_LONG, // GEX_FLAG_AM_MEDLONG is an intentional alias GEX_FLAG_AM_REQUEST, GEX_FLAG_AM_REPLY, // GEX_FLAG_AM_REQREP is an intentional alias }; assert_arr_unaliased(gex_Flags_t, flags_amreg); static gex_Flags_t const flags_vis[] = { // gex_VIS_* initiation COMM_INIT_FLAGS GEX_FLAG_ENABLE_LEAF_LC, }; assert_arr_unaliased(gex_Flags_t, flags_vis); static gex_Flags_t const flags_tm[] = { // gex_TM_Split, Create, etc. GEX_FLAG_TM_SCRATCH_SIZE_MIN, // DEPRECATED since spec 0.11 but still valid GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED, GEX_FLAG_TM_GLOBAL_SCRATCH, GEX_FLAG_TM_LOCAL_SCRATCH, GEX_FLAG_TM_SYMMETRIC_SCRATCH, GEX_FLAG_TM_NO_SCRATCH, GEX_FLAG_SCRATCH_SEG_OFFSET, }; assert_arr_unaliased(gex_Flags_t, flags_tm); static gex_Flags_t const flags_ep[] = { // gex_EP_Create, excludes ALL GEX_FLAG_HINT_ACCEL_AD, GEX_FLAG_HINT_ACCEL_COLL, }; assert_arr_nonzero(gex_Flags_t, flags_ep); // No zero values // Not yet specified: assert_arr_unaliased(gex_Flags_t, flags_ep); assert_arr_all_val(gex_EP_Capabilities_t, flags_ep, GEX_FLAG_HINT_ACCEL_ALL); // ALL includes them all static gex_Flags_t const flags_client[] = { // gex_Client_Init GEX_FLAG_USES_GASNET1, GEX_FLAG_DEFER_THREADS, }; assert_arr_unaliased(gex_Flags_t, flags_client); assert_inttype(gex_EC_t); static gex_EC_t const ec_all = GEX_EC_ALL; static gex_EC_t const ec_arr[] = { // all the flags but _ALL GEX_EC_GET, GEX_EC_PUT, GEX_EC_AM, GEX_EC_LC, GEX_EC_RMW }; assert_arr_nonzero(gex_EC_t, ec_arr); // No zero values assert_arr_all_val(gex_EC_t, ec_arr, ec_all); // ALL includes them all assert_inttype(gex_TI_t); static gex_TI_t const ti_all = GEX_TI_ALL; static gex_TI_t const ti_arr[] = { // all flags but _ALL GEX_TI_SRCRANK, GEX_TI_EP, GEX_TI_ENTRY, GEX_TI_IS_REQ, GEX_TI_IS_LONG }; // TI constants should not alias, because they are used to indicate // field validity, and thus cannot be safely conflated in general // in particular, each flag needs at least one unique bit assert_arr_unaliased(gex_TI_t, ti_arr); assert_arr_all_val(gex_TI_t, ti_arr, ti_all); // ALL includes them all test_format(gex_TI_t, ti_arr, gasnett_format_ti); assert_inttype(gex_EP_Capabilities_t); static gex_EP_Capabilities_t const ep_cap_all = GEX_EP_CAPABILITY_ALL; static gex_EP_Capabilities_t const ep_cap_arr[] = { // all flags but _ALL GEX_EP_CAPABILITY_RMA, GEX_EP_CAPABILITY_AM, GEX_EP_CAPABILITY_VIS, GEX_EP_CAPABILITY_COLL, GEX_EP_CAPABILITY_AD }; assert_arr_nonzero(gex_EP_Capabilities_t, ep_cap_arr); // No zero values // Not yet specified: assert_arr_unaliased(gex_EP_Capabilities_t, ep_cap_arr); assert_arr_all_val(gex_EP_Capabilities_t, ep_cap_arr, ep_cap_all); // ALL includes them all gex_RMA_Value_t val = 0; test_mark_used(val); test_static_assert(sizeof(gex_RMA_Value_t) == SIZEOF_GEX_RMA_VALUE_T); test_static_assert(sizeof(gex_RMA_Value_t) >= sizeof(void *)); test_static_assert(sizeof(gex_RMA_Value_t) >= sizeof(long)); assert_unsigned(gex_RMA_Value_t); gex_AM_Index_t ind = 0; test_mark_used(ind); assert_unsigned(gex_AM_Index_t); gex_AM_Arg_t arg = 0; test_mark_used(arg); test_static_assert(sizeof(gex_AM_Arg_t) >= 4); assert_signed(gex_AM_Arg_t); gex_AM_SrcDesc_t sd = 0; test_mark_used(sd); CHECK_ZERO_CONSTANT(gex_AM_SrcDesc_t, GEX_AM_SRCDESC_NO_OP); assert_inttype(gex_DT_t); static gex_DT_t const datatypes_arr[] = { // ensure all the specified values exist GEX_DT_I32, GEX_DT_U32, GEX_DT_I64, GEX_DT_U64, GEX_DT_FLT, GEX_DT_DBL, GEX_DT_USER }; assert_arr_unaliased(gex_DT_t, datatypes_arr); // verify alias-free assert_arr_disjointbits(gex_DT_t, datatypes_arr); // and disjoint bits test_format(gex_DT_t, datatypes_arr, gasnett_format_dt); assert_inttype(gex_OP_t); static gex_OP_t const ops_arr[] = { // ensure all the specfied values exist GEX_OP_AND, GEX_OP_OR, GEX_OP_XOR, GEX_OP_ADD, GEX_OP_SUB, GEX_OP_MULT, GEX_OP_MIN, GEX_OP_MAX, GEX_OP_INC, GEX_OP_DEC, GEX_OP_SET, GEX_OP_CAS, GEX_OP_FAND, GEX_OP_FOR, GEX_OP_FXOR, GEX_OP_FADD, GEX_OP_FSUB, GEX_OP_FMULT, GEX_OP_FMIN, GEX_OP_FMAX, GEX_OP_FINC, GEX_OP_FDEC, GEX_OP_SWAP, GEX_OP_FCAS, GEX_OP_GET, GEX_OP_USER, GEX_OP_USER_NC }; assert_arr_unaliased(gex_OP_t, ops_arr); // verify alias-free assert_arr_disjointbits(gex_OP_t, ops_arr); // and disjoint bits test_format(gex_OP_t, ops_arr, gasnett_format_op); for (size_t i = 0; ; i++) { gex_OP_t nfop = ops_arr[i]; gex_OP_t fop = ops_arr[i+12]; assert_always(GEX_OP_TO_FETCHING(nfop) == fop); assert_always(GEX_OP_TO_NONFETCHING(fop) == nfop); if (nfop == GEX_OP_SET) break; } #define typeissigned < #define typeisunsigned > #define assert_field_int(structtype, fieldtype, fieldname, signedop) do { \ static volatile structtype S; \ assert_inttype(fieldtype); \ assert_always(sizeof(S.fieldname) == sizeof(fieldtype)); \ assert_always((fieldtype)(S.fieldname-1) signedop (fieldtype)0); \ } while (0) #define assert_field_int_unspec(structtype, fieldname) do { \ static volatile structtype S; \ S.fieldname = (signed char)0x55;/* warnings here mean non-compliance */ \ assert_always(S.fieldname > 1); /* warnings here mean non-compliance */ \ uint64_t val; compute_uint_val(val,S.fieldname); \ assert_always(val == 0x55); \ } while (0) #define assert_field_pointer(structtype, fieldtype, fieldname) do { \ static structtype S; \ static fieldtype v; \ S.fieldname = v; /* warnings here mean non-compliance */ \ v = S.fieldname; /* warnings here mean non-compliance */ \ static fieldtype *p; \ p = &(S.fieldname); /* warnings here mean non-compliance */ \ S.fieldname = *p; /* warnings here mean non-compliance */ \ assert_always(sizeof(S.fieldname) == sizeof(fieldtype)); \ } while (0) #define assert_field_object(structtype, fieldtype, fieldname) do { \ static structtype S; \ static fieldtype *p; \ S.fieldname = (fieldtype)0; /* warnings here mean non-compliance */ \ p = &(S.fieldname); /* warnings here mean non-compliance */ \ S.fieldname = *p; /* warnings here mean non-compliance */ \ assert_always(sizeof(S.fieldname) == sizeof(fieldtype)); \ } while (0) #define assert_field_constint(structtype, fieldtype, fieldname, signedop) do { \ static volatile union { \ char _x; \ structtype S; \ } U = { 0 }; \ assert_inttype(fieldtype); \ assert_always(sizeof(U.S.fieldname) == sizeof(fieldtype)); \ assert_always((fieldtype)(U.S.fieldname-1) signedop (fieldtype)0); \ } while (0) assert_field_int(gex_AM_Entry_t, gex_AM_Index_t, gex_index, typeisunsigned); assert_field_int(gex_AM_Entry_t, gex_Flags_t, gex_flags, typeisunsigned); assert_field_int(gex_AM_Entry_t, unsigned int, gex_nargs, typeisunsigned); assert_field_pointer(gex_AM_Entry_t, gex_AM_Fn_t, gex_fnptr); assert_field_pointer(gex_AM_Entry_t, const void *, gex_cdata); assert_field_pointer(gex_AM_Entry_t, const char *, gex_name); assert_field_int(gex_Token_Info_t, gex_Rank_t, gex_srcrank, typeisunsigned); assert_field_object(gex_Token_Info_t, gex_EP_t, gex_ep); assert_field_pointer(gex_Token_Info_t, const gex_AM_Entry_t *, gex_entry); assert_field_int_unspec(gex_Token_Info_t, gex_is_req); assert_field_int_unspec(gex_Token_Info_t, gex_is_long); assert_field_constint(gex_RankInfo_t, gex_Rank_t, gex_jobrank, typeisunsigned); assert_field_int(gex_EP_Location_t, gex_Rank_t, gex_rank, typeisunsigned); assert_field_int(gex_EP_Location_t, gex_EP_Index_t, gex_ep_index, typeisunsigned); MSG("*** passed object test!!"); #ifndef TESTGASNET_NO_SPLIT doit1(partner, partnerseg); } void doit1(int partner, int *partnerseg) { #endif BARRIER(); /* blocking test */ { int val1=0, val2=0; val1 = myrank + 100; gex_RMA_PutBlocking(myteam, partner, partnerseg, &val1, sizeof(int), 0); gex_RMA_GetBlocking(myteam, &val2, partner, partnerseg, sizeof(int), 0); if (val2 == (int)(myrank + 100)) MSG("*** passed blocking test!!"); else MSG("*** ERROR - FAILED BLOCKING TEST!!!!!"); } BARRIER(); /* blocking list test */ #define iters 100 { GASNET_BEGIN_FUNCTION(); gex_Event_t events[iters]; int val1; int vals[iters]; int success = 1; int i; for (i = 0; i < iters; i++) { val1 = 100 + i + myrank; events[i] = gex_RMA_PutNB(myteam, partner, partnerseg+i, &val1, sizeof(int), GEX_EVENT_NOW, 0); } gex_Event_WaitAll(events, iters, 0); for (i = 0; i < iters; i++) { events[i] = gex_RMA_GetNB(myteam, &vals[i], partner, partnerseg+i, sizeof(int), 0); } gex_Event_WaitAll(events, iters, 0); for (i=0; i < iters; i++) { if (vals[i] != 100 + (int)myrank + i) { MSG("*** ERROR - FAILED NB LIST TEST!!! vals[%i] = %i, expected %i", i, vals[i], 100 + myrank + i); success = 0; } } if (success) MSG("*** passed blocking list test!!"); } #ifndef TESTGASNET_NO_SPLIT doit2(partner, partnerseg); } void doit2(int partner, int *partnerseg) { #endif BARRIER(); { /* implicit test */ GASNET_BEGIN_FUNCTION(); int vals[100]; int i, success=1; for (i=0; i < 100; i++) { int tmp = myrank + i; gex_RMA_PutNBI(myteam, partner, partnerseg+i, &tmp, sizeof(int), GEX_EVENT_NOW, 0); } gex_NBI_Wait(GEX_EC_PUT,0); for (i=0; i < 100; i++) { gex_RMA_GetNBI(myteam, &vals[i], partner, partnerseg+i, sizeof(int), 0); } gex_NBI_Wait(GEX_EC_GET,0); for (i=0; i < 100; i++) { if (vals[i] != (int)myrank + i) { MSG("*** ERROR - FAILED NBI TEST!!! vals[%i] = %i, expected %i", i, vals[i], myrank + i); success = 0; } } if (success) MSG("*** passed nbi test!!"); } #ifndef TESTGASNET_NO_SPLIT doit3(partner, partnerseg); } void doit3(int partner, int *partnerseg) { #endif BARRIER(); { /* value test */ GASNET_BEGIN_FUNCTION(); int i, success=1; unsigned char *partnerbase2 = (unsigned char *)(partnerseg+300); for (i=0; i < 100; i++) { gex_RMA_PutBlockingVal(myteam, partner, partnerseg+i, 1000 + myrank + i, sizeof(int), 0); } for (i=0; i < 100; i++) { gex_Event_Wait(gex_RMA_PutNBVal(myteam, partner, partnerseg+i+100, 1000 + myrank + i, sizeof(int), 0)); } for (i=0; i < 100; i++) { gex_RMA_PutNBIVal(myteam, partner, partnerseg+i+200, 1000 + myrank + i, sizeof(int), 0); } gex_NBI_Wait(GEX_EC_PUT,0); for (i=0; i < 100; i++) { int tmp1 = gex_RMA_GetBlockingVal(myteam, partner, partnerseg+i, sizeof(int), 0); int tmp2 = gex_RMA_GetBlockingVal(myteam, partner, partnerseg+i+200, sizeof(int), 0); if (tmp1 != 1000 + (int)myrank + i || tmp2 != 1000 + (int)myrank + i) { MSG("*** ERROR - FAILED INT VALUE TEST 1!!!"); printf("node %i/%i i=%i tmp1=%i tmp2=%i (1000 + myrank + i)=%i\n", (int)myrank, (int)numranks, i, tmp1, tmp2, 1000 + myrank + i); fflush(stdout); success = 0; } } for (i=0; i < 100; i++) { gex_RMA_PutBlockingVal(myteam, partner, partnerbase2+i, 100 + myrank + i, sizeof(unsigned char), 0); } for (i=0; i < 100; i++) { gex_Event_Wait(gex_RMA_PutNBVal(myteam, partner, partnerbase2+i+100, 100 + myrank + i, sizeof(unsigned char), 0)); } for (i=0; i < 100; i++) { gex_RMA_PutNBIVal(myteam, partner, partnerbase2+i+200, 100 + myrank + i, sizeof(unsigned char), 0); } gex_NBI_Wait(GEX_EC_PUT,0); for (i=0; i < 100; i++) { unsigned int tmp1 = (unsigned int)gex_RMA_GetBlockingVal(myteam, partner, partnerbase2+i, sizeof(unsigned char), 0); unsigned int tmp2 = (unsigned int)gex_RMA_GetBlockingVal(myteam, partner, partnerbase2+i+200, sizeof(unsigned char), 0); if (tmp1 != (unsigned char)(100 + myrank + i) || tmp2 != (unsigned char)(100 + myrank + i)) { MSG("*** ERROR - FAILED CHAR VALUE TEST 1!!!"); printf("node %i/%i i=%i tmp1=%i tmp2=%i (100 + myrank + i)=%i\n", (int)myrank, (int)numranks, i, tmp1, tmp2, 100 + myrank + i); fflush(stdout); success = 0; } } if (success) MSG("*** passed value test!!"); } #ifndef TESTGASNET_NO_SPLIT doit5(partner, partnerseg); } void doit5(int partner, int *partnerseg) { #endif BARRIER(); /* NB and NBI put/overwrite/get tests */ #define MAXVALS (1024) #define MAXSZ (MAXVALS*8) #define INSEGCHUNKS 3 #define NUMCHUNKS 6 #define SEGSZ (MAXSZ*NUMCHUNKS) #define VAL(sz, chunkid, iter) \ (((uint64_t)(sz) << 36) | ((uint64_t)(chunkid) << 32) | ((uint64_t)(100 + myrank) << 16) | ((iter) & 0xFF)) assert(TEST_SEGSZ >= 2*SEGSZ); { GASNET_BEGIN_FUNCTION(); uint64_t *localpos=(uint64_t *)test_malloc(SEGSZ); int success = 1; int i, sz; for (i = 0; i < MAX(1,iters/10); i++) { uint64_t *segpos=(uint64_t *)TEST_MYSEG(); uint64_t *rsegpos=(uint64_t *)((char*)partnerseg+SEGSZ); for (sz = 1; sz <= MAXSZ; sz*=2) { gex_Event_t event; gex_Event_t lcevt; int elems = sz/8; uint64_t val[NUMCHUNKS]; for (int chunk=0; chunk < NUMCHUNKS; chunk++) { val[chunk] = VAL(sz, chunk, i); /* setup known src value */ if (sz < 8) { elems = 1; memset(localpos+chunk*elems, (val[chunk] & 0xFF), sz); memset(segpos+chunk*elems, (val[chunk] & 0xFF), sz); memset(&val[chunk], (val[chunk] & 0xFF), sz); } else { for (int j=0; j < elems; j++) { (localpos+chunk*elems)[j] = val[chunk]; (segpos+chunk*elems)[j] = val[chunk]; } } } event = gex_RMA_PutNB(myteam, partner, rsegpos, localpos, sz, GEX_EVENT_DEFER, 0); gex_Event_Wait(event); memset(localpos, 0xAA, sz); /* clear */ event = gex_RMA_PutNB(myteam, partner, rsegpos+elems, localpos+elems, sz, GEX_EVENT_NOW, 0); memset(localpos+elems, 0xBB, sz); /* clear */ gex_Event_Wait(event); lcevt = GEX_EVENT_INVALID; event = gex_RMA_PutNB(myteam, partner, rsegpos+2*elems, localpos+2*elems, sz, &lcevt, 0); gex_Event_Wait(lcevt); memset(localpos+2*elems, 0xCC, sz); /* clear */ gex_Event_Wait(event); event = gex_RMA_PutNB(myteam, partner, rsegpos+3*elems, segpos+3*elems, sz, GEX_EVENT_DEFER, 0); gex_Event_Wait(event); memset(segpos+3*elems, 0xDD, sz); /* clear */ event = gex_RMA_PutNB(myteam, partner, rsegpos+4*elems, segpos+4*elems, sz, GEX_EVENT_NOW, 0); memset(segpos+4*elems, 0xEE, sz); /* clear */ gex_Event_Wait(event); lcevt = GEX_EVENT_INVALID; event = gex_RMA_PutNB(myteam, partner, rsegpos+5*elems, segpos+5*elems, sz, &lcevt, 0); gex_Event_Wait(lcevt); memset(segpos+5*elems, 0xFF, sz); /* clear */ gex_Event_Wait(event); for (int chunk=0; chunk < NUMCHUNKS; chunk++) { gex_RMA_GetBlocking(myteam, localpos, partner, rsegpos+chunk*elems, sz, 0); for (int j=0; j < elems; j++) { int ok; if (sz < 8) ok = !memcmp(&(localpos[j]), &val[chunk], sz); else ok = (localpos[j] == val[chunk]); if (!ok) { MSG("*** ERROR - FAILED %s-SEG PUT_NB/OVERWRITE TEST!!! sz=%i j=%i (got=%016" PRIx64 " expected=%016" PRIx64 ")", (chunk < INSEGCHUNKS ? "IN" : "OUT-OF"), sz, j, localpos[j], val[chunk]); success = 0; } } } } } test_free(localpos); if (success) MSG("*** passed nb put/overwrite test!!"); } { GASNET_BEGIN_FUNCTION(); uint64_t *localpos=(uint64_t *)test_malloc(SEGSZ); int success = 1; int i, sz; for (i = 0; i < MAX(1,iters/10); i++) { uint64_t *segpos=(uint64_t *)TEST_MYSEG(); uint64_t *rsegpos=(uint64_t *)((char*)partnerseg+SEGSZ); for (sz = 1; sz <= MAXSZ; sz*=2) { int elems = sz/8; uint64_t val[NUMCHUNKS]; for (int chunk=0; chunk < NUMCHUNKS; chunk++) { val[chunk] = VAL(sz, chunk, i+91); /* setup known src value, different from NB test */ if (sz < 8) { elems = 1; memset(localpos+chunk*elems, (val[chunk] & 0xFF), sz); memset(segpos+chunk*elems, (val[chunk] & 0xFF), sz); memset(&val[chunk], (val[chunk] & 0xFF), sz); } else { for (int j=0; j < elems; j++) { (localpos+chunk*elems)[j] = val[chunk]; (segpos+chunk*elems)[j] = val[chunk]; } } } gex_RMA_PutNBI(myteam, partner, rsegpos, localpos, sz, GEX_EVENT_DEFER, 0); gex_NBI_Wait(GEX_EC_PUT,0); memset(localpos, 0xAA, sz); /* clear */ gex_RMA_PutNBI(myteam, partner, rsegpos+elems, localpos+elems, sz, GEX_EVENT_NOW, 0); memset(localpos+elems, 0xBB, sz); /* clear */ gex_RMA_PutNBI(myteam, partner, rsegpos+2*elems, localpos+2*elems, sz, GEX_EVENT_GROUP, 0); gex_NBI_Wait(GEX_EC_LC, 0); memset(localpos+2*elems, 0xCC, sz); /* clear */ gex_RMA_PutNBI(myteam, partner, rsegpos+3*elems, segpos+3*elems, sz, GEX_EVENT_DEFER, 0); gex_NBI_Wait(GEX_EC_PUT,0); memset(segpos+3*elems, 0xDD, sz); /* clear */ gex_RMA_PutNBI(myteam, partner, rsegpos+4*elems, segpos+4*elems, sz, GEX_EVENT_NOW, 0); memset(segpos+4*elems, 0xEE, sz); /* clear */ gex_RMA_PutNBI(myteam, partner, rsegpos+5*elems, segpos+5*elems, sz, GEX_EVENT_GROUP, 0); gex_NBI_Wait(GEX_EC_LC, 0); memset(segpos+5*elems, 0xFF, sz); /* clear */ gex_NBI_Wait(GEX_EC_PUT,0); for (int chunk=0; chunk < NUMCHUNKS; chunk++) { gex_RMA_GetBlocking(myteam, localpos, partner, rsegpos+chunk*elems, sz, 0); for (int j=0; j < elems; j++) { int ok; if (sz < 8) ok = !memcmp(&(localpos[j]), &val[chunk], sz); else ok = (localpos[j] == val[chunk]); if (!ok) { MSG("*** ERROR - FAILED %s-SEG PUT_NBI/OVERWRITE TEST!!! sz=%i j=%i (got=%016" PRIx64 " expected=%016" PRIx64 ")", (chunk < INSEGCHUNKS ? "IN" : "OUT-OF"), sz, j, localpos[j], val[chunk]); success = 0; } } } } } test_free(localpos); if (success) MSG("*** passed nbi put/overwrite test!!"); } #ifndef TESTGASNET_NO_SPLIT doit6(partner, partnerseg); } void doit6(int partner, int *partnerseg) { #endif BARRIER(); { /* all ams test */ int i; static int base = 0; for (i=0; i < 10; i++) { ALLAM_REQ(partner); GASNET_BLOCKUNTIL(ALLAM_DONE(base+i+1)); } base += i; MSG("*** passed AM test!!"); } #ifndef TESTGASNET_NO_SPLIT doit7(partner, partnerseg); } void doit7(int partner, int *partnerseg) { #endif BARRIER(); /* Invoke all the atomics, once each. * This is a compile/link check, used to ensure that clients can link all the * the atomics (especially from c++ when testgasnet is built as textcxx). * This is distinct from testtools, which checks that these "do the right thing". */ #ifndef GASNETT_HAVE_ATOMIC_CAS #define gasnett_atomic_compare_and_swap(a,b,c,d) ((void)0) #define gasnett_atomic_swap(a,b,c) ((void)0) #endif #ifndef GASNETT_HAVE_ATOMIC_ADD_SUB #define gasnett_atomic_add(a,b,c) ((void)0) #define gasnett_atomic_subtract(a,b,c) ((void)0) #endif #ifndef GASNETT_HAVE_STRONGATOMIC_CAS #define gasnett_strongatomic_compare_and_swap(a,b,c,d) ((void)0) #define gasnett_strongatomic_swap(a,b,c) ((void)0) #endif #ifndef GASNETT_HAVE_STRONGATOMIC_ADD_SUB #define gasnett_strongatomic_add(a,b,c) ((void)0) #define gasnett_strongatomic_subtract(a,b,c) ((void)0) #endif #define TEST_ATOMICS(scalar,class) do { \ gasnett_##class##_t val = gasnett_##class##_init(1); \ scalar tmp = gasnett_##class##_read(&val, 0); \ gasnett_##class##_set(&val, tmp, 0); \ gasnett_##class##_increment(&val, 0); \ gasnett_##class##_decrement(&val, 0); \ (void) gasnett_##class##_decrement_and_test(&val, 0); \ (void) gasnett_##class##_compare_and_swap(&val, 0, 1 ,0); \ (void) gasnett_##class##_swap(&val, 1 ,0); \ (void) gasnett_##class##_add(&val, tmp ,0); \ (void) gasnett_##class##_subtract(&val, tmp ,0); \ } while(0) { gasnett_atomic_sval_t stmp = gasnett_atomic_signed((gasnett_atomic_val_t)0); gasnett_atomic_increment((gasnett_atomic_t*)&stmp,0); TEST_ATOMICS(gasnett_atomic_val_t, atomic); TEST_ATOMICS(gasnett_atomic_val_t, strongatomic); TEST_ATOMICS(uint32_t, atomic32); TEST_ATOMICS(uint32_t, strongatomic32); TEST_ATOMICS(uint64_t, atomic64); TEST_ATOMICS(uint64_t, strongatomic64); } /* Serial tests of optional internal 128-bit atomics have * moved to gasnet_diagnostic.c (run from testinternal). */ #ifndef TESTGASNET_NO_SPLIT doit8(partner, partnerseg); } void doit8(int partner, int *partnerseg) { #endif BARRIER(); // check that RMA calls evaluate arguments exactly once #if !PLATFORM_COMPILER_XLC // Skip due to external bug 4205 #if PLATFORM_COMPILER_GNU_CXX && GASNETT_USE_PRAGMA_GCC_DIAGNOSTIC // DO NOT emulate the following warning suppression behavior! // These warnings are often an indication of genuine undefined behavior. // // The code in this test may (at least with g++) generate warnings about // sequence points. They are safe to suppress/ignore here *ONLY* because // (a) they are necessary/intrinsic to the property being tested AND // (b) the test includes assertions that the "right" behavior occurs. // // Any "reasonable" client can/should use a temporary variable to hold any // parameter(s) which are the subject of such warnings. // See also: Bug 4313 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsequence-point" #endif { int val = 0, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; gex_RMA_PutBlocking((++a,myteam), (++b,partner), (++c,partnerseg), (++d,&val), (++e,sizeof(val)), (f++,0)); assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); assert_always(e==1); assert_always(f==1); } { int val = 0, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0; gex_Event_Wait( gex_RMA_PutNB((++a,myteam), (++b,partner), (++c,partnerseg), (++d,&val), (++e,sizeof(val)), (++f,GEX_EVENT_NOW), (g++,0)) ); assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); assert_always(e==1); assert_always(f==1); assert_always(g==1); } { int val = 0, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0; gex_RMA_PutNBI((++a,myteam), (++b,partner), (++c,partnerseg), (++d,&val), (++e,sizeof(val)), (++f,GEX_EVENT_NOW), (g++,0)); gex_NBI_Wait(GEX_EC_PUT,0); assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); assert_always(e==1); assert_always(f==1); assert_always(g==1); } { int val = 0, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; gex_RMA_PutBlockingVal((++a,myteam), (++b,partner), (++c,partnerseg), (++d,val), (++e,sizeof(val)), (++f,0)); assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); assert_always(e==1); assert_always(f==1); } { int val = 0, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; gex_Event_Wait( gex_RMA_PutNBVal((++a,myteam), (++b,partner), (++c,partnerseg), (++d,val), (++e,sizeof(val)), (++f,0))); assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); assert_always(e==1); assert_always(f==1); } { int val = 0, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; gex_RMA_PutNBIVal((++a,myteam), (++b,partner), (++c,partnerseg), (++d,val), (++e,sizeof(val)), (++f,0)); gex_NBI_Wait(GEX_EC_PUT,0); assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); assert_always(e==1); } { int val = 0, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; gex_RMA_GetBlocking((++a,myteam), (++b,&val), (++c,partner), (++d,partnerseg), (++e,sizeof(val)), (f++,0)); assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); assert_always(e==1); assert_always(f==1); } { int val = 0, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; gex_Event_Wait( gex_RMA_GetNB((++a,myteam), (++b,&val), (++c,partner), (++d,partnerseg), (++e,sizeof(val)), (f++,0))); assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); assert_always(e==1); assert_always(f==1); } { int val = 0, a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; gex_RMA_GetNBI((++a,myteam), (++b,&val), (++c,partner), (++d,partnerseg), (++e,sizeof(val)), (f++,0)); gex_NBI_Wait(GEX_EC_GET,0); assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); assert_always(e==1); assert_always(f==1); } { int a = 0, b = 0, c = 0, d = 0, e = 0; int val = gex_RMA_GetBlockingVal((++a,myteam), (++b,partner), (++c,partnerseg), (++d,sizeof(val)), (++e,0)); assert_always(a==1); assert_always(b==1); assert_always(c==1); assert_always(d==1); assert_always(e==1); } #if PLATFORM_COMPILER_GNU_CXX && GASNETT_USE_PRAGMA_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif #endif BARRIER(); // Checks for graceful degradation where support is missing or limited. // As features become widely support these should be removed in favor // of complete tests (and conduit-specific KnownFailures if needed). // Suspend verbose errors since some of these test are expected to fail gex_System_SetVerboseErrors(0); // Sane GASNET_MAXEPS and graceful failure of EP_Create if (GASNET_MAXEPS < 1) { MSG("*** ERROR - INVALID MAXEPS SETTING!!!!!"); } else if (GASNET_MAXEPS == 1) { gex_EP_t ep; int rc = gex_EP_Create(&ep, myclient, GEX_EP_CAPABILITY_RMA, 0); if (rc != GASNET_ERR_RESOURCE) { MSG("*** ERROR - EXCESS EP_CREATE DID NOT FAIL AS EXPECTED!!!!!"); } } else { // testtmpair covers creation of multiple EPs where implemented } // Restore verbose errors gex_System_SetVerboseErrors(1); BARRIER(); } gasnet-2025.8.0/tests/testthreads.c0000664000175000017500000005322215142313673017266 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testthreads.c $ * * Description: GASNet threaded tester. * The test initializes GASNet and forks off up to 256 threads. Each of * these threads randomly chooses from a set of communication operations for * a given amount of iterations. The idea is to detect race errors by having * many threads concurrently use different GASNet communication operations. * * Copyright 2003, Christian Bell * Terms of use are as specified in license.txt */ #include "test.h" static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; static gex_Rank_t myrank; static gex_Rank_t numranks; #if !defined(GASNET_PAR) #ifdef TEST_MPI #ifdef GASNET_SEQ /* special hacks to allow testmpi-seq */ #define TEST_SEGZ_PER_THREAD TEST_SEGSZ #define TEST_MAXTHREADS 1 #endif #else #error This test can only be built for GASNet PAR configuration #endif #endif typedef struct _threaddata_t { int tid; /* global thread id */ int ltid; /* local thread id (index into each node's array of threaddata_t) */ int tid_peer; /* global thread id of remote peer thread */ int tid_peer_local; /* global thread id of local peer thread */ volatile int flag; char _pad[GASNETT_CACHE_LINE_BYTES]; } threaddata_t; typedef void (*testfunc_t)(threaddata_t *); typedef gex_AM_Arg_t harg_t; /* configurable parameters */ #define DEFAULT_ITERS 50 int iters = DEFAULT_ITERS; int sleep_min_us = 1; int sleep_max_us = 250000; int amiters_max = 50; int verbose = 0; int amtrace = 0; int threadstress = 0; #if PLATFORM_COMPILER_TINY /* Appears unable to expand GASNETT_TRACE_SETSOURCELINE multiple times per line. * The instance in MSG should be sufficient, right? */ #define ACTION_PRINTF \ if (verbose) MSG #else #define ACTION_PRINTF \ if (GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), verbose) MSG #endif int sizes[] = { 0, /* gex_AM_LUBRequestMedium()-1 */ 0, /* gex_AM_LUBRequestMedium() */ 0, /* gex_AM_LUBRequestMedium()+1 */ 0, /* gex_AM_LUBReplyMedium()-1 */ 0, /* gex_AM_LUBReplyMedium() */ 0, /* gex_AM_LUBReplyMedium()+1 */ 0, /* gex_AM_LUBRequestLong()-1 */ 0, /* gex_AM_LUBRequestLong() */ 0, /* gex_AM_LUBRequestLong()+1 */ 0, /* gex_AM_LUBReplyLong()-1 */ 0, /* gex_AM_LUBReplyLong() */ 0, /* gex_AM_LUBReplyLong()+1 */ /* some other interesting fixed values */ 0, 1, 9, 128, 256, 1024, 2048, 4095, 4096, 4097, 16384, 30326, TEST_SEGZ_PER_THREAD }; #define SIZES_NUM (sizeof(sizes)/sizeof(int)) #define RANDOM_SIZE() (sizes[ (rand() % SIZES_NUM)]) int AM_loopback = 0; #if GASNET_PAR int threads_num = 4; #else int threads_num = 1; #endif gex_Rank_t *tt_thread_map; void **tt_addr_map; threaddata_t *tt_thread_data; void *myseg; #ifdef GASNET_PAR #define thread_barrier() PTHREAD_BARRIER(threads_num) #else #define thread_barrier() ((void)0) #endif void alloc_thread_data(int threads); void free_thread_data(void); void * threadmain(void *args); /* GASNet Test functions */ void test_sleep(threaddata_t *tdata); void test_put(threaddata_t *tdata); void test_get(threaddata_t *tdata); void test_amshort(threaddata_t *tdata); void test_ammedium(threaddata_t *tdata); void test_amlong(threaddata_t *tdata); #if TEST_MPI void init_test_mpi(int *argc, char ***argv); void attach_test_mpi(void); void finalize_test_mpi(void); void mpi_barrier(threaddata_t *tdata); void test_mpi(threaddata_t *tdata); void mpi_handler(gex_Token_t token, harg_t tid, harg_t sz); void mpi_probehandler(gex_Token_t token, harg_t tid); void mpi_replyhandler(gex_Token_t token, harg_t tid); #endif testfunc_t test_functions_all[] = { test_sleep, test_put, test_get, test_amshort, test_ammedium, test_amlong #if TEST_MPI , test_mpi #endif }; #define NUM_FUNCTIONS (sizeof(test_functions_all)/sizeof(testfunc_t)) /* This array remains uninitialized */ testfunc_t test_functions[NUM_FUNCTIONS] = { 0 }; static int functions_num = 0; /* AM Handlers */ void ping_shorthandler(gex_Token_t token, harg_t tid); void pong_shorthandler(gex_Token_t token, harg_t tid); void ping_medhandler(gex_Token_t token, void *buf, size_t nbytes, harg_t tid, harg_t repsz); void pong_medhandler(gex_Token_t token, void *buf, size_t nbytes, harg_t tid); void ping_longhandler(gex_Token_t token, void *buf, size_t nbytes, harg_t tid, harg_t target_id, harg_t repsz); void pong_longhandler(gex_Token_t token, void *buf, size_t nbytes, harg_t tid); #define hidx_ping_shorthandler 201 #define hidx_pong_shorthandler 202 #define hidx_ping_medhandler 203 #define hidx_pong_medhandler 204 #define hidx_ping_longhandler 205 #define hidx_pong_longhandler 206 #define hidx_mpi_handler 207 #define hidx_mpi_probehandler 208 #define hidx_mpi_replyhandler 209 gex_AM_Entry_t htable[] = { { hidx_ping_shorthandler, (gex_AM_Fn_t)ping_shorthandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 1 }, { hidx_pong_shorthandler, (gex_AM_Fn_t)pong_shorthandler, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_SHORT, 1 }, { hidx_ping_medhandler, (gex_AM_Fn_t)ping_medhandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 2 }, { hidx_pong_medhandler, (gex_AM_Fn_t)pong_medhandler, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_MEDIUM, 1 }, { hidx_ping_longhandler, (gex_AM_Fn_t)ping_longhandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, 3 }, { hidx_pong_longhandler, (gex_AM_Fn_t)pong_longhandler, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_LONG, 1 }, #if TEST_MPI { hidx_mpi_handler, (gex_AM_Fn_t)mpi_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 2 }, { hidx_mpi_probehandler, (gex_AM_Fn_t)mpi_probehandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 1 }, { hidx_mpi_replyhandler, (gex_AM_Fn_t)mpi_replyhandler, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_SHORT, 1 }, #endif }; #define HANDLER_TABLE_SIZE (sizeof(htable)/sizeof(gex_AM_Entry_t)) int main(int argc, char **argv) { int i; const char *getopt_str; int opt_p=0, opt_g=0, opt_m=0; int opt_S=0, opt_M=0, opt_L=0; #if TEST_MPI #if TEST_INIT_MPI_FIRST init_test_mpi(&argc, &argv); #endif getopt_str = "pgSMLamlvtdi:"; #else getopt_str = "pgSMLalvtdi:"; #endif GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testthreads", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, HANDLER_TABLE_SIZE)); myrank = gex_TM_QueryRank(myteam); numranks = gex_TM_QuerySize(myteam); myseg = TEST_SEG(myrank); #if TEST_MPI #if !TEST_INIT_MPI_FIRST init_test_mpi(&argc, &argv); #endif #define TEST_MPI_USAGE " -m use MPI calls \n" #else #define TEST_MPI_USAGE "" #endif #if GASNET_PAR #define TEST_THREAD_USAGE " []\n\n" \ " must be between 1 and %u \n" #define TEST_THREAD_USAGE_ARGS (unsigned int)TEST_MAXTHREADS, #else #define TEST_THREAD_USAGE "\n\n" #define TEST_THREAD_USAGE_ARGS #endif static char usage[2048]; snprintf(usage, sizeof(usage), "[ -pgSMLalvtd ] [ -i ]" TEST_THREAD_USAGE "no options means run all tests with %i iterations\n" "options: \n" " -p use puts \n" " -g use gets \n" " -S use Active Message Shorts \n" " -M use Active Message Mediums \n" " -L use Active Message Longs \n" " -a use all Active Messages (-S -M -L) \n" " -l use local Active Messages \n" TEST_MPI_USAGE " -v output information about actions taken \n" " -t include AM handler actions with -v \n" " -d dynamic thread creation stress test \n" " -i use iterations per thread \n", TEST_THREAD_USAGE_ARGS DEFAULT_ITERS); test_init("testthreads",0, usage); while ((i = getopt (argc, argv, getopt_str)) != EOF) { switch (i) { case 'p': opt_p = 1; break; case 'g': opt_g = 1; break; case 'S': opt_S = 1; break; case 'M': opt_M = 1; break; case 'L': opt_L = 1; break; case 'a': opt_S = opt_M = opt_L = 1; break; case 'm': opt_m = 1; break; case 'l': AM_loopback = 1; break; case 'i': iters = atoi(optarg); break; case 'v': verbose = 1; break; case 't': amtrace = 1; break; case 'd': threadstress = 1; break; default: test_usage(); } } if (opt_p) test_functions[functions_num++] = test_put; if (opt_g) test_functions[functions_num++] = test_get; if (opt_S) test_functions[functions_num++] = test_amshort; if (opt_M) test_functions[functions_num++] = test_ammedium; if (opt_L) test_functions[functions_num++] = test_amlong; #if TEST_MPI if (opt_m) test_functions[functions_num++] = test_mpi; #endif if (amtrace) verbose = 1; /* Assume all test functions if no option is passed */ if (functions_num == 0) { MSG("running all functions!"); memcpy(test_functions, test_functions_all, sizeof(test_functions_all)); functions_num = NUM_FUNCTIONS; } argc -= optind; if (argc > 1) test_usage(); else if (argc == 1) { argv += optind; threads_num = atoi(argv[0]); } #if GASNET_PAR threads_num = test_thread_limit(threads_num); #endif if (threads_num < 1) { printf("ERROR: Threads must be between 1 and %u\n",(unsigned int)TEST_MAXTHREADS); exit(EXIT_FAILURE); } if (numranks == 1 && threads_num == 1) { printf("ERROR: Threads must be greater than 1 when running a single process\n"); exit(EXIT_FAILURE); } /* limit sizes to a reasonable size */ #define LIMIT(sz) MIN(sz,4194304) { int sz = 0; sizes[sz++] = LIMIT(gex_AM_LUBRequestMedium()-1); sizes[sz++] = LIMIT(gex_AM_LUBRequestMedium()); sizes[sz++] = LIMIT(gex_AM_LUBRequestMedium()+1); sizes[sz++] = LIMIT(gex_AM_LUBReplyMedium()-1); sizes[sz++] = LIMIT(gex_AM_LUBReplyMedium()); sizes[sz++] = LIMIT(gex_AM_LUBReplyMedium()+1); sizes[sz++] = LIMIT(gex_AM_LUBRequestLong()-1); sizes[sz++] = LIMIT(gex_AM_LUBRequestLong()); sizes[sz++] = LIMIT(gex_AM_LUBRequestLong()+1); sizes[sz++] = LIMIT(gex_AM_LUBReplyLong()-1); sizes[sz++] = LIMIT(gex_AM_LUBReplyLong()); sizes[sz++] = LIMIT(gex_AM_LUBReplyLong()+1); assert(sizes[sz] == 0); } alloc_thread_data(threads_num); #if TEST_MPI attach_test_mpi(); #endif #ifdef GASNET_PAR if (threadstress) { int spawniters = MAX(1,iters/threads_num); int i; MSG("Dynamic thread creation stress test, %d gasnet threads, (%d at a time)", spawniters*threads_num, threads_num); iters = 10; /* enough iters to ensure we get thread registration */ for (i = 0; i < spawniters; i++) { test_createandjoin_pthreads(threads_num, &threadmain, tt_thread_data, sizeof(threaddata_t)); TEST_PROGRESS_BAR(i, spawniters); } } else { MSG("Forking %d gasnet threads and running %d iterations", threads_num, iters); test_createandjoin_pthreads(threads_num, &threadmain, tt_thread_data, sizeof(threaddata_t)); } #else /* for testmpi-seq and -parsync */ #ifdef GASNET_SEQ MSG("Running with 1 thread/node for GASNET_SEQ mode"); #else MSG("Running with 1 thread/node for GASNET_PARSYNC mode"); #endif threadmain(tt_thread_data); #endif BARRIER(); free_thread_data(); MSG("Tests complete"); BARRIER(); #if TEST_MPI && TEST_CLOBBER_MPI // Forcibly finalize MPI, even though GASNet might still be using it // This is BAD practice and appears here only for corner-case testing puroposes finalize_test_mpi(); #endif gasnet_exit(0); return 0; } void * threadmain(void *args) { int i, idx; testfunc_t func; threaddata_t *td = (threaddata_t *) args; TEST_SRAND(((int)TIME()) * td->tid); thread_barrier(); if (!threadstress) MSG("tid=%3d> starting.", td->tid); for (i = 0; i < iters; i++) { idx = TEST_RAND(0,functions_num-1); func = test_functions[idx]; assert(func != NULL); func(td); if (td->ltid == 0 && !threadstress) TEST_PROGRESS_BAR(i, iters); } thread_barrier(); if (!threadstress) MSG("tid=%3d> done.", td->tid); return NULL; } void alloc_thread_data(int threads) { int tot_threads = numranks * threads; tt_thread_map = (gex_Rank_t *) test_malloc(sizeof(gex_Rank_t) * tot_threads); tt_thread_data = (threaddata_t *) test_malloc(sizeof(threaddata_t) * threads); tt_addr_map = (void **) test_malloc(sizeof(void *) * tot_threads); /* Initialize the thread to node map array and local thread data */ { int i, j, tid, base; void *segbase; threaddata_t *td; for (i = 0; i < numranks; i++) { segbase = TEST_SEG(i); base = i * threads; for (j = 0; j < threads; j++) { tid = base + j; tt_thread_map[tid] = i; tt_addr_map[tid] = (void *) ((uintptr_t) segbase + (uintptr_t) (j * TEST_SEGZ_PER_THREAD)); if (i == myrank) { td = &tt_thread_data[j]; td->tid = tid; td->ltid = j; td->tid_peer_local = base + ((j+1) % threads); td->tid_peer = (numranks == 1) ? ((tid+1) % threads) : ((tid+threads) % tot_threads); assert_always(td->tid_peer != tid); } } } } } void free_thread_data(void) { test_free(tt_thread_map); test_free(tt_addr_map); test_free(tt_thread_data); } /****************************************************************/ /* AM Handlers */ #if PLATFORM_COMPILER_TINY /* Appears unable to expand GASNETT_TRACE_SETSOURCELINE multiple times per line. * The instance in MSG should be sufficient, right? */ #define PRINT_AM(x) \ if (amtrace) ACTION_PRINTF x #else #define PRINT_AM(x) \ if (GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), amtrace) ACTION_PRINTF x #endif void ping_shorthandler(gex_Token_t token, harg_t idx) { gex_Rank_t node = test_msgsource(token); PRINT_AM(("node=%2d> AMShort Request for (%d,%d)", (int)myrank, (int)node, (int)idx)); assert(idx >= 0 && idx < threads_num); assert(node < numranks); gex_AM_ReplyShort1(token, hidx_pong_shorthandler, 0, idx); } void pong_shorthandler(gex_Token_t token, harg_t idx) { int tid = tt_thread_data[idx].tid; PRINT_AM(("node=%2d> AMShort Reply for tid=%d, (%d,%d)", (int)myrank, tid, (int)myrank, (int)idx)); assert(idx >= 0 && idx < threads_num); assert(tid >= 0 && tid < threads_num*numranks); tt_thread_data[idx].flag++; } void ping_medhandler(gex_Token_t token, void *buf, size_t nbytes, harg_t idx, harg_t repsz) { gex_Rank_t node = test_msgsource(token); PRINT_AM(("node=%2d> AMMedium Request for (%d,%d)", (int)myrank, (int)node, (int)idx)); assert(idx >= 0 && idx < threads_num); assert(node < numranks); assert(nbytes <= gex_AM_MaxRequestMedium(myteam,node,GEX_EVENT_NOW,0,2)); assert((uintptr_t)buf+nbytes < (uintptr_t)myseg || (uintptr_t)buf >= (uintptr_t)myseg + TEST_SEGSZ); nbytes = MIN(nbytes, (size_t)(uint32_t)repsz); gex_AM_ReplyMedium1(token, hidx_pong_medhandler, buf, nbytes, GEX_EVENT_NOW, 0, idx); } void pong_medhandler(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t idx) { int tid = tt_thread_data[idx].tid; gex_Rank_t node = test_msgsource(token); PRINT_AM(("node=%2d> AMMedium Reply for tid=%d, (%d,%d)", (int)myrank, tid, (int)myrank, (int)idx)); assert(idx >= 0 && idx < threads_num); assert(tid >= 0 && tid < threads_num*numranks); assert(nbytes <= gex_AM_MaxReplyMedium(myteam,node,GEX_EVENT_NOW,0,1)); assert((uintptr_t)buf+nbytes < (uintptr_t)myseg || (uintptr_t)buf >= (uintptr_t)myseg + TEST_SEGSZ); tt_thread_data[idx].flag++; } void ping_longhandler(gex_Token_t token, void *buf, size_t nbytes, harg_t idx, harg_t target_id, harg_t repsz) { int tid; void *paddr; gex_Rank_t node = test_msgsource(token); tid = node * threads_num + idx; paddr = tt_addr_map[tid]; PRINT_AM(("node=%2d> AMLong Request for (%d,%d)", (int)myrank, (int)node, (int)idx)); assert(idx >= 0 && idx < threads_num); assert(node < numranks); assert(nbytes <= gex_AM_MaxRequestLong(myteam,node,GEX_EVENT_NOW,0,3)); assert(buf == tt_addr_map[target_id]); assert((uintptr_t)buf + nbytes <= (uintptr_t)myseg + TEST_SEGSZ); nbytes = MIN(nbytes, (size_t)(uint32_t)repsz); gex_AM_ReplyLong1(token, hidx_pong_longhandler, buf, nbytes, paddr, GEX_EVENT_NOW, 0, idx); } void pong_longhandler(gex_Token_t token, void *buf, size_t nbytes, harg_t idx) { int tid = tt_thread_data[idx].tid; gex_Rank_t node = test_msgsource(token); PRINT_AM(("node=%2d> AMLong Reply for tid=%d, (%d,%d)", (int)myrank, tid, (int)myrank, (int)idx)); assert(idx >= 0 && idx < threads_num); assert(tid >= 0 && tid < threads_num*numranks); assert(nbytes <= gex_AM_MaxReplyLong(myteam,node,GEX_EVENT_NOW,0,1)); assert(buf == tt_addr_map[myrank * threads_num + idx]); assert((uintptr_t)buf + nbytes <= (uintptr_t)myseg + TEST_SEGSZ); tt_thread_data[idx].flag++; } /****************************************************************/ /* GASNet testers */ void test_sleep(threaddata_t *tdata) { unsigned usecs = (unsigned) sleep_min_us + (rand() % (sleep_max_us - sleep_min_us)); ACTION_PRINTF("tid=%3d> sleeping %.3f millisecs", tdata->tid, usecs/1000.0); { uint64_t goal = gasnett_ticks_to_us(gasnett_ticks_now()) + usecs; while (gasnett_ticks_to_us(gasnett_ticks_now()) < goal) gasnett_sched_yield(); } ACTION_PRINTF("tid=%3d> awaking", tdata->tid); } void test_put(threaddata_t *tdata) { int peer = tdata->tid_peer; int node = tt_thread_map[peer]; void *laddr = tt_addr_map[tdata->tid]; void *raddr = tt_addr_map[peer]; int len; do { len = RANDOM_SIZE(); } while (len > TEST_SEGZ_PER_THREAD); ACTION_PRINTF("tid=%3d> put (%p,%8d) -> tid=%3d,node=%d,addr=%p", tdata->tid, laddr, len, peer, node, raddr); gex_RMA_PutBlocking(myteam, node, raddr, laddr, len, 0); } void test_get(threaddata_t *tdata) { int peer = tdata->tid_peer; int node = tt_thread_map[peer]; void *laddr = tt_addr_map[tdata->tid]; void *raddr = tt_addr_map[peer]; int len; do { len = RANDOM_SIZE(); } while (len > TEST_SEGZ_PER_THREAD); ACTION_PRINTF("tid=%3d> get (%p,%8d) <- tid=%3d,node=%d,addr=%p", tdata->tid, laddr, len, peer, node, raddr); gex_RMA_GetBlocking(myteam, laddr, node, raddr, len, 0); } #define RANDOM_PEER(tdata) \ (AM_loopback ? \ (rand() % 2 == 0 ? tdata->tid_peer \ : tdata->tid_peer_local) \ : tdata->tid_peer) void test_amshort(threaddata_t *tdata) { int peer = RANDOM_PEER(tdata); int node = tt_thread_map[peer]; ACTION_PRINTF("tid=%3d> AMShortRequest to tid=%3d", tdata->tid, peer); tdata->flag = -1; gasnett_local_wmb(); gex_AM_RequestShort1(myteam, node, hidx_ping_shorthandler, 0, tdata->ltid); GASNET_BLOCKUNTIL(tdata->flag == 0); tdata->flag = -1; ACTION_PRINTF("tid=%3d> AMShortRequest to tid=%3d complete.", tdata->tid, peer); } void test_ammedium(threaddata_t *tdata) { int peer = RANDOM_PEER(tdata); int node = tt_thread_map[peer]; void *laddr = tt_addr_map[tdata->tid]; size_t len; do { len = RANDOM_SIZE(); } while (len > gex_AM_MaxRequestMedium(myteam,node,GEX_EVENT_NOW,0,2)); ACTION_PRINTF("tid=%3d> AMMediumRequest (sz=%7d) to tid=%3d", tdata->tid, (int)len, peer); tdata->flag = -1; gasnett_local_wmb(); gex_AM_RequestMedium2(myteam, node, hidx_ping_medhandler, laddr, len, GEX_EVENT_NOW, 0, tdata->ltid, (harg_t)MIN((size_t)0xfffffffU, gex_AM_MaxReplyMedium(myteam,node,GEX_EVENT_NOW,0,1))); GASNET_BLOCKUNTIL(tdata->flag == 0); tdata->flag = -1; ACTION_PRINTF("tid=%3d> AMMediumRequest to tid=%3d complete.", tdata->tid, peer); } void test_amlong(threaddata_t *tdata) { int peer = RANDOM_PEER(tdata); int node = tt_thread_map[peer]; void *laddr = tt_addr_map[tdata->tid]; void *raddr = tt_addr_map[peer]; size_t len; do { len = RANDOM_SIZE(); } while ((len > gex_AM_MaxRequestLong(myteam,node,GEX_EVENT_NOW,0,3)) || (len > TEST_SEGZ_PER_THREAD)); tdata->flag = -1; gasnett_local_wmb(); ACTION_PRINTF("tid=%3d> AMLongRequest (sz=%7d) to tid=%3d", tdata->tid, (int)len, peer); gex_AM_RequestLong3(myteam, node, hidx_ping_longhandler, laddr, len, raddr, GEX_EVENT_NOW, 0, tdata->ltid, peer, (harg_t)MIN((size_t)0xfffffffU, gex_AM_MaxReplyLong(myteam,node,GEX_EVENT_NOW,0,1))); GASNET_BLOCKUNTIL(tdata->flag == 0); tdata->flag = -1; ACTION_PRINTF("tid=%3d> AMLongRequest to tid=%3d complete.", tdata->tid, peer); } gasnet-2025.8.0/tests/testreadonly.c0000664000175000017500000001145215142313673017450 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testreadonly.c $ * Description: GASNet read-only data correctness tests * Copyright (c) 2019, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #ifndef TEST_SEGSZ #define TEST_SEGSZ 4*GASNET_PAGESIZE #endif #include // Constant data, long enough not to xfer via an inline send, packed // long, or similar copy-based mechanism. // // NOTE length of this string is limited by C99 only requiring 4095 byte // strings. We don't currently attempt to get near that max. This means that // a failure mode that delivers zeros beyond the length of this string will go // undetected. However, the failure modes seen for read-only data in the past // don't transfer any data, making the length of the validation less critical. static const char rodata[TEST_SEGSZ] = "Fourscore and seven years ago our fathers brought forth, on this " "continent, a new nation, conceived in liberty, and dedicated to the " "proposition that all men are created equal. Now we are engaged in a great " "civil war, testing whether that nation, or any nation so conceived, and so " "dedicated, can long endure. We are met on a great battle-field of that " "war. We have come to dedicate a portion of that field, as a final " "resting-place for those who here gave their lives, that that nation might " "live. It is altogether fitting and proper that we should do this. But, " "in a larger sense, we cannot dedicate, we cannot consecrate - we cannot " "hallow - this ground. The brave men, living and dead, who struggled here, " "have consecrated it far above our poor power to add or detract. The world " "will little note, nor long remember what we say here, but it can never " "forget what they did here. It is for us the living, rather, to be " "dedicated here to the unfinished work which they who fought here have thus " "far so nobly advanced. It is rather for us to be here dedicated to the " "great task remaining before us - that from these honored dead we take " "increased devotion to that cause for which they here gave the last full " "measure of devotion - that we here highly resolve that these dead shall " "not have died in vain - that this nation, under God, shall have a new " "birth of freedom, and that government of the people, by the people, for " "the people, shall not perish from the earth."; static int flag = 0; void handler(gex_Token_t token, void *buf, size_t len) { flag = 1; } gex_AM_Entry_t htable[] = { { 0, (gex_AM_Fn_t)handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, 0, NULL, NULL } }; int main(int argc, char **argv) { gex_Client_t myclient; gex_EP_t myep; gex_TM_t myteam; gex_Segment_t mysegment; #if GASNET_CONDUIT_IBV // This is a hack to avoid triggering Bug 4008, which is believed // to be caused by a bug in Mellanox's software stack. setenv("GASNET_USE_ODP", "0", 0 /* NO overwrite if already set */); #endif GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testreadonly", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testreadonly",0,"(iters)"); int iters = 0; if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 10; if (argc > 2) test_usage(); gex_Rank_t rank = gex_TM_QueryRank(myteam); gex_Rank_t size = gex_TM_QuerySize(myteam); MSG0("Running read-only source test with %d iterations", iters); gex_Rank_t peer = (rank + 1) % size; void *src = (void*)rodata; void *dst = TEST_SEG(peer); void *loc = TEST_MYSEG(); size_t max_sz = sizeof(rodata); int hidx = htable[0].gex_index; size_t max_long = gex_AM_MaxRequestLong(myteam, peer, GEX_EVENT_NOW, 0, 0); // TODO: Is there value to testing any of the following: // + Non-blocking Puts // + Long with async LC // + ReplyLong for (int i = 0; i < iters; ++i) { for (size_t sz = 1; sz <= max_sz; sz *= 2) { gex_RMA_PutBlocking(myteam, peer, dst, src, sz, 0); gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); if (memcmp(rodata, loc, sz)) { MSG("ERROR: Bad data from %lld byte gex_RMA_PutBlocking", (long long)sz); } memset(loc, 0xaa, max_sz); gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); if (sz <= max_long) { gex_AM_RequestLong0(myteam, peer, hidx, src, sz, dst, GEX_EVENT_NOW, 0); GASNET_BLOCKUNTIL(flag); if (memcmp(rodata, loc, sz)) { MSG("ERROR: Bad data from %lld byte gex_AM_RequestLong0", (long long)sz); } memset(loc, 0x55, max_sz); flag = 0; gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); } } } MSG0("done."); gasnet_exit(0); return 0; /* Not reached in most implementations */ } gasnet-2025.8.0/tests/testsmall.c0000664000175000017500000005751115142313673016751 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testsmall.c $ * Description: GASNet non-bulk get/put performance test * measures the ping-pong average round-trip time and * average flood throughput of GASNet gets and puts * over varying payload size and synchronization mechanisms * Copyright 2002, Jaein Jeong and Dan Bonachea * Terms of use are as specified in license.txt */ #include #if GASNET_HAVE_MK_CLASS_MULTIPLE #include #endif int numprocs; size_t maxsz = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR (2*(uintptr_t)alignup(maxsz,PAGESZ)) #endif #include "test.h" #if GASNET_HAVE_MK_CLASS_ZE #include "zekind.h" #endif #define GASNET_HEADNODE 0 #define PRINT_LATENCY 0 #define PRINT_THROUGHPUT 1 typedef struct { size_t datasize; int iters; uint64_t time; } stat_struct_t; static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; gex_AM_Entry_t handler_table[2]; int insegment = 1; int myproc; int peerproc = -1; int iamsender = 0; int unitsMB = 0; int doputs = 1; int dogets = 1; void *tgtmem; char *msgbuf; #if GASNET_HAVE_MK_CLASS_MULTIPLE static int use_loc_gpu = 0; static int use_rem_gpu = 1; #else #define use_loc_gpu 0 #define use_rem_gpu 0 #endif #define init_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _init_stat #define update_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _update_stat #define print_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _print_stat void _init_stat(stat_struct_t *st, size_t sz) { st->iters = 0; st->datasize = sz; st->time = 0; } void _update_stat(stat_struct_t *st, uint64_t temptime, int iters) { st->iters += iters; st->time += temptime; } void _print_stat(int myproc, stat_struct_t *st, const char *name, int operation) { switch (operation) { case PRINT_LATENCY: printf("%c: %2i - %10li byte : %7i iters," " latency %10i us total, %9.3f us ave. (%s)\n", TEST_SECTION_NAME(), myproc, (long) st->datasize, st->iters, (int) st->time, ((double)st->time) / st->iters, name); fflush(stdout); break; case PRINT_THROUGHPUT: printf((unitsMB?"%c: %2i - %10li byte : %7i iters, throughput %11.6f MB/sec (%s)\n": "%c: %2i - %10li byte : %7i iters, throughput %11.3f KB/sec (%s)\n"), TEST_SECTION_NAME(), myproc, (long) st->datasize, st->iters, ((int)st->time == 0 ? 0.0 : (1000000.0 * st->datasize * st->iters / (unitsMB?(1024.0*1024.0):1024.0)) / ((int)st->time)), name); fflush(stdout); break; default: break; } } void roundtrip_test(int iters, size_t nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; /* initialize statistics */ init_stat(&st, nbytes); if (!use_loc_gpu) memset(msgbuf, 1, nbytes); BARRIER(); if (iamsender && doputs) { /* measure the round-trip time of put */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_PutBlocking(myteam, peerproc, tgtmem, msgbuf, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutBlocking latency", PRINT_LATENCY); } /* initialize statistics */ init_stat(&st, nbytes); if (iamsender && dogets) { /* measure the round-trip time of get */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_GetBlocking(myteam, msgbuf, peerproc, tgtmem, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && dogets) { print_stat(myproc, &st, "GetBlocking latency", PRINT_LATENCY); } } void oneway_test(int iters, size_t nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; /* initialize statistics */ init_stat(&st, nbytes); if (!use_loc_gpu) memset(msgbuf, 1, nbytes); BARRIER(); if (iamsender && doputs) { /* measure the throughput of put */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_PutBlocking(myteam, peerproc, tgtmem, msgbuf, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutBlocking throughput", PRINT_THROUGHPUT); } /* initialize statistics */ init_stat(&st, nbytes); if (iamsender && dogets) { /* measure the throughput of get */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_GetBlocking(myteam, msgbuf, peerproc, tgtmem, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && dogets) { print_stat(myproc, &st, "GetBlocking throughput", PRINT_THROUGHPUT); } } void roundtrip_nbi_test(int iters, size_t nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; /* initialize statistics */ init_stat(&st, nbytes); if (!use_loc_gpu) memset(msgbuf, 1, nbytes); BARRIER(); if (iamsender && doputs) { /* measure the round-trip time of nonblocking implicit put */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_PutNBI(myteam, peerproc, tgtmem, msgbuf, nbytes, GEX_EVENT_NOW, 0); gex_NBI_Wait(GEX_EC_PUT,0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutNBI+NOW latency", PRINT_LATENCY); } /* initialize statistics */ init_stat(&st, nbytes); if (iamsender && dogets) { /* measure the round-trip time of nonblocking implicit get */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_GetNBI(myteam, msgbuf, peerproc, tgtmem, nbytes, 0); gex_NBI_Wait(GEX_EC_GET,0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && dogets) { print_stat(myproc, &st, "GetNBI latency", PRINT_LATENCY); } } void oneway_nbi_test(int iters, size_t nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; /* initialize statistics */ init_stat(&st, nbytes); if (!use_loc_gpu) memset(msgbuf, 1, nbytes); BARRIER(); if (iamsender && doputs) { /* measure the throughput of nonblocking implicit put */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_PutNBI(myteam, peerproc, tgtmem, msgbuf, nbytes, GEX_EVENT_NOW, 0); } gex_NBI_Wait(GEX_EC_PUT,0); end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutNBI+NOW throughput", PRINT_THROUGHPUT); } /* initialize statistics */ init_stat(&st, nbytes); if (iamsender && dogets) { /* measure the throughput of nonblocking implicit get */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_GetNBI(myteam, msgbuf, peerproc, tgtmem, nbytes, 0); } gex_NBI_Wait(GEX_EC_GET,0); end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && dogets) { print_stat(myproc, &st, "GetNBI throughput", PRINT_THROUGHPUT); } } void roundtrip_nb_test(int iters, size_t nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; gex_Event_t hdlget, hdlput; /* initialize statistics */ init_stat(&st, nbytes); if (!use_loc_gpu) memset(msgbuf, 1, nbytes); BARRIER(); if (iamsender && doputs) { /* measure the round-trip time of nonblocking put */ begin = TIME(); for (i = 0; i < iters; i++) { hdlput = gex_RMA_PutNB(myteam, peerproc, tgtmem, msgbuf, nbytes, GEX_EVENT_NOW, 0); gex_Event_Wait(hdlput); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutNB+NOW latency", PRINT_LATENCY); } /* initialize statistics */ init_stat(&st, nbytes); if (iamsender && dogets) { /* measure the round-trip time of nonblocking get */ begin = TIME(); for (i = 0; i < iters; i++) { hdlget = gex_RMA_GetNB(myteam, msgbuf, peerproc, tgtmem, nbytes, 0); gex_Event_Wait(hdlget); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && dogets) { print_stat(myproc, &st, "GetNB latency", PRINT_LATENCY); } } void oneway_nb_test(int iters, size_t nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; /*gex_Event_t hdlget, hdlput;*/ gex_Event_t *events; /* initialize statistics */ init_stat(&st, nbytes); events = (gex_Event_t*) test_malloc(sizeof(gex_Event_t) * iters); if (!use_loc_gpu) memset(msgbuf, 1, nbytes); BARRIER(); if (iamsender && doputs) { /* measure the throughput of sending a message */ begin = TIME(); /*for (i = 0; i < iters; i++) { hdlput = gex_RMA_PutNB(myteam, peerproc, tgtmem, msgbuf, nbytes, GEX_EVENT_NOW, 0); gex_Event_Wait(hdlput); }*/ for (i = 0; i < iters; i++) { events[i] = gex_RMA_PutNB(myteam, peerproc, tgtmem, msgbuf, nbytes, GEX_EVENT_NOW, 0); } gex_Event_WaitAll(events, iters, 0); end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutNB+NOW throughput", PRINT_THROUGHPUT); } /* initialize statistics */ init_stat(&st, nbytes); if (iamsender && dogets) { /* measure the throughput of receiving a message */ begin = TIME(); /*for (i = 0; i < iters; i++) { hdlget = gex_RMA_GetNB(myteam, msgbuf, peerproc, tgtmem, nbytes, 0); gex_Event_Wait(hdlget); }*/ for (i = 0; i < iters; i++) { events[i] = gex_RMA_GetNB(myteam, msgbuf, peerproc, tgtmem, nbytes, 0); } gex_Event_WaitAll(events, iters, 0); end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && dogets) { print_stat(myproc, &st, "GetNB throughput", PRINT_THROUGHPUT); } test_free(events); } int main(int argc, char **argv) { size_t min_payload = 1; size_t max_payload; size_t max_step = 0; void *myseg; void *alloc = NULL; int arg; int iters = 0; size_t j; int firstlastmode = 0; int fullduplexmode = 0; int crossmachinemode = 0; int skipwarmup = 0; size_t segsz = 0; #if GASNET_HAVE_MK_CLASS_MULTIPLE int use_cuda_uva = 0; int use_hip = 0; int use_ze = 0; #endif int use_host = 1; int help = 0; /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testsmall", &argc, &argv, 0)); /* parse arguments */ arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-in")) { insegment = 1; ++arg; } else if (!strcmp(argv[arg], "-out")) { insegment = 0; ++arg; } else if (!strcmp(argv[arg], "-f")) { firstlastmode = 1; ++arg; } else if (!strcmp(argv[arg], "-c")) { crossmachinemode = 1; ++arg; } else if (!strcmp(argv[arg], "-a")) { fullduplexmode = 1; ++arg; } else if (!strcmp(argv[arg], "-m")) { unitsMB = 1; ++arg; } else if (!strcmp(argv[arg], "-p")) { dogets = 0; doputs = 1; ++arg; } else if (!strcmp(argv[arg], "-g")) { dogets = 1; doputs = 0; ++arg; } else if (!strcmp(argv[arg], "-s")) { skipwarmup = 1; ++arg; } else if (!strcmp(argv[arg], "-minsz")) { ++arg; if (argc > arg) { min_payload = gasnett_parse_int(argv[arg], 1); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-max-step")) { ++arg; if (argc > arg) { max_step = gasnett_parse_int(argv[arg], 1); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-segsz")) { // UNDOCUMENTED ++arg; if (argc > arg) { segsz = gasnett_parse_int(argv[arg], 1024*1024); arg++; } else help = 1; #if GASNET_HAVE_MK_CLASS_MULTIPLE #if GASNET_HAVE_MK_CLASS_CUDA_UVA } else if (!strcmp(argv[arg], "-cuda-uva")) { use_cuda_uva = 1; use_hip = 0; use_ze = 0; use_host = 0; ++arg; #endif #if GASNET_HAVE_MK_CLASS_HIP } else if (!strcmp(argv[arg], "-hip")) { use_hip = 1; use_cuda_uva = 0; use_ze = 0; use_host = 0; ++arg; #endif #if GASNET_HAVE_MK_CLASS_ZE } else if (!strcmp(argv[arg], "-ze")) { use_cuda_uva = 0; use_hip = 0; use_ze = 1; use_host = 0; ++arg; #endif } else if (!strcmp(argv[arg], "-host")) { use_cuda_uva = 0; use_hip = 0; use_ze = 0; use_host = 1; ++arg; } else if (!strcmp(argv[arg], "-local-gpu")) { use_loc_gpu = 1; ++arg; } else if (!strcmp(argv[arg], "-local-host")) { use_loc_gpu = 0; ++arg; } else if (!strcmp(argv[arg], "-remote-gpu")) { use_rem_gpu = 1; ++arg; } else if (!strcmp(argv[arg], "-remote-host")) { use_rem_gpu = 0; ++arg; #endif } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (argc > arg) { iters = atoi(argv[arg]); arg++; } if (!iters) iters = 1000; if (argc > arg) { maxsz = gasnett_parse_int(argv[arg],1); arg++; } if (!maxsz) maxsz = 2048; /* 2 KB default */ if (argc > arg) { TEST_SECTION_PARSE(argv[arg]); arg++; } #if GASNET_HAVE_MK_CLASS_MULTIPLE if (use_host) { use_loc_gpu = use_rem_gpu = 0; } #endif max_payload = maxsz; if (!max_step) max_step = maxsz; /* get SPMD info (needed for segment size) */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); #ifdef GASNET_SEGMENT_EVERYTHING if (maxsz > TEST_SEGSZ/2) { MSG("maxsz must be <= %"PRIuPTR" on GASNET_SEGMENT_EVERYTHING", (uintptr_t)(TEST_SEGSZ/2)); gasnet_exit(1); } #endif if (segsz == 0) { segsz = TEST_SEGSZ_REQUEST; } else if (segsz < TEST_SEGSZ_REQUEST) { ERR("Command line -segsz %"PRIuPTR" is less than %"PRIuPTR, (uintptr_t)segsz, (uintptr_t)(TEST_SEGSZ_REQUEST)); gasnet_exit(1); } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, segsz)); #if GASNET_HAVE_MK_CLASS_MULTIPLE #define KIND_USAGE_BEGIN \ "\n" \ " Memory kind selection (last-used has precedence):\n" \ " -host Test host memory, aka GEX_MK_CLASS_HOST (default)\n" #define KIND_USAGE_END \ " Memory kind buffer location (ignored with -host):\n" \ " Local buffer location (last-used has precedence):\n" \ " -local-host Local buffer is in host memory (default)\n" \ " -local-gpu Local buffer is in GPU memory\n" \ " Remote buffer location (last-used has precedence):\n" \ " -remote-host Remote buffer is in host memory\n" \ " -remote-gpu Remote buffer is in GPU memory (default)" #else #define KIND_USAGE_BEGIN // empty #define KIND_USAGE_END // empty #endif #if GASNET_HAVE_MK_CLASS_CUDA_UVA #define KIND_USAGE_CUDA_UVA " -cuda-uva Test GEX_MK_CLASS_CUDA_UVA\n" #else #define KIND_USAGE_CUDA_UVA // empty #endif #if GASNET_HAVE_MK_CLASS_HIP #define KIND_USAGE_HIP " -hip Test GEX_MK_CLASS_HIP\n" #else #define KIND_USAGE_HIP // empty #endif #if GASNET_HAVE_MK_CLASS_ZE #define KIND_USAGE_ZE " -ze Test GEX_MK_CLASS_ZE\n" #else #define KIND_USAGE_ZE // empty #endif test_init("testsmall",1, "[options] (iters) (maxsz) (test_sections)\n" " The '-in' or '-out' option selects whether the initiator-side\n" " memory is in the GASNet segment or not (default is 'in').\n" " The -p/-g option selects puts only or gets only (default is both).\n" " The -s option skips warm-up iterations\n" " The -m option enables MB/sec units for bandwidth output (MB=2^20 bytes).\n" " The -a option enables full-duplex mode, where all nodes send.\n" " The -c option enables cross-machine pairing, default is nearest neighbor.\n" " The -f option enables 'first/last' mode, where the first/last\n" " nodes communicate with each other, while all other nodes sit idle.\n" " The '-minsz N' option sets the minimum transfer size tested (default is 1).\n" " The '-max-step N' option selects the maximum step between transfer sizes,\n" " which by default advance by doubling until maxsz is reached." KIND_USAGE_BEGIN KIND_USAGE_CUDA_UVA KIND_USAGE_HIP KIND_USAGE_ZE KIND_USAGE_END ); if (help || argc > arg) test_usage(); if (max_payload < min_payload) { ERR("maxsz must be >= %li\n",(long) min_payload); test_usage(); } if (!firstlastmode) { /* Only allow 1 or even number for numprocs */ if (numprocs > 1 && numprocs % 2 != 0) { MSG0("WARNING: This test requires a unary or even number of nodes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harnesses for smp-conduit */ } } /* Setting peer thread rank */ if (firstlastmode) { peerproc = (myproc == 0 ? numprocs-1 : 0); iamsender = (fullduplexmode ? myproc == 0 || myproc == numprocs-1 : myproc == 0); } else if (numprocs == 1) { peerproc = 0; iamsender = 1; } else if (crossmachinemode) { if (myproc < numprocs / 2) { peerproc = myproc + numprocs/2; iamsender = 1; } else { peerproc = myproc - numprocs/2; iamsender = fullduplexmode; } } else { peerproc = (myproc % 2) ? (myproc - 1) : (myproc + 1); iamsender = (fullduplexmode || myproc % 2 == 0); } myseg = TEST_SEG(myproc); tgtmem = (void*)(alignup(maxsz,PAGESZ) + (uintptr_t)TEST_SEG(peerproc)); #if GASNET_HAVE_MK_CLASS_MULTIPLE test_static_assert(GASNET_MAXEPS >= 2); gex_EP_t gpu_ep; gex_MK_t kind; gex_Segment_t d_segment = GEX_SEGMENT_INVALID; gex_MK_Create_args_t args; args.gex_flags = 0; int use_device = 0; if (use_cuda_uva) { MSG0("***NOTICE***: Using EXPERIMENTAL/UNTUNED support for CUDA UVA memory kind (local %s, remote %s)", (use_loc_gpu ? "GPU" : "host"), (use_rem_gpu ? "GPU" : "host")); args.gex_class = GEX_MK_CLASS_CUDA_UVA; args.gex_args.gex_class_cuda_uva.gex_CUdevice = 0; use_device = 1; } if (use_hip) { MSG0("***NOTICE***: Using EXPERIMENTAL/UNTUNED support for HIP memory kind (local %s, remote %s)", (use_loc_gpu ? "GPU" : "host"), (use_rem_gpu ? "GPU" : "host")); args.gex_class = GEX_MK_CLASS_HIP; args.gex_args.gex_class_hip.gex_hipDevice = 0; use_device = 1; } if (use_ze) { MSG0("***NOTICE***: Using EXPERIMENTAL/UNTUNED support for ZE memory kind (local %s, remote %s)", (use_loc_gpu ? "GPU" : "host"), (use_rem_gpu ? "GPU" : "host")); #if GASNET_HAVE_MK_CLASS_ZE if (! test_open_ze_device(0, &args)) { FATALERR("GEX_MK_CLASS_ZE: could not find a GPU device"); } #endif use_device = 1; } if (use_device) { // Due to bug 4149, single-process + use_device is currently unsupported if (numprocs == 1) { MSG0("WARNING: Device memory mode requires more than one process. Test skipped.\n"); gasnet_exit(0); } GASNET_Safe( gex_MK_Create(&kind, myclient, &args, 0) ); GASNET_Safe( gex_Segment_Create(&d_segment, myclient, NULL, segsz, kind, 0) ); GASNET_Safe( gex_EP_Create(&gpu_ep, myclient, GEX_EP_CAPABILITY_RMA, 0) ); GASNET_Safe( gex_EP_BindSegment(gpu_ep, d_segment, 0) ); gex_EP_PublishBoundSegment(myteam, &gpu_ep, 1, 0); // The "trick" to diverting RMA operation to the remote GPU memory myteam = gex_TM_Pair(use_loc_gpu ? gpu_ep : myep, use_rem_gpu ? gex_EP_QueryIndex(gpu_ep) : 0); gex_Event_Wait( gex_EP_QueryBoundSegmentNB(myteam, peerproc, (void**)&tgtmem, NULL, NULL, 0) ); } #endif if (insegment) { #if GASNET_HAVE_MK_CLASS_MULTIPLE msgbuf = use_loc_gpu ? gex_Segment_QueryAddr(d_segment) : (void *) myseg; #else msgbuf = (void *) myseg; #endif } else { alloc = (void *) test_calloc((maxsz+PAGESZ)*2,1); /* calloc prevents valgrind warnings */ msgbuf = (void *) alignup(((uintptr_t)alloc), PAGESZ); /* ensure page alignment of base */ } assert(((uintptr_t)msgbuf) % PAGESZ == 0); if (myproc == 0) { MSG("Running %i iterations of %s%s%snon-bulk %s%s%s with local addresses %sside the segment for sizes: %li...%li\n", iters, (firstlastmode ? "first/last " : ""), (fullduplexmode ? "full-duplex ": ""), (crossmachinemode ? "cross-machine ": ""), doputs?"put":"", (doputs&&dogets)?"/":"", dogets?"get":"", insegment ? "in" : "out", (long) min_payload, (long) max_payload); if (segsz > TEST_SEGSZ_REQUEST) { MSG("Using non-default segment size %"PRIuPTR, (uintptr_t)segsz); } } BARRIER(); if (iamsender && !skipwarmup) { /* pay some warm-up costs */ int i; int warm_iters = MIN(iters, 32767); /* avoid hitting 65535-handle limit */ gex_Event_t *h = test_malloc(2*sizeof(gex_Event_t)*warm_iters); for (i = 0; i < warm_iters; i++) { gex_RMA_PutBlocking(myteam, peerproc, tgtmem, msgbuf, 8, 0); gex_RMA_GetBlocking(myteam, msgbuf, peerproc, tgtmem, 8, 0); gex_RMA_PutNBI(myteam, peerproc, tgtmem, msgbuf, 8, GEX_EVENT_NOW, 0); gex_RMA_GetNBI(myteam, msgbuf, peerproc, tgtmem, 8, 0); h[i] = gex_RMA_PutNB(myteam, peerproc, tgtmem, msgbuf, 8, GEX_EVENT_NOW, 0); h[i+warm_iters] = gex_RMA_GetNB(myteam, msgbuf, peerproc, tgtmem, 8, 0); } gex_RMA_PutBlocking(myteam, peerproc, tgtmem, msgbuf, max_payload, 0); gex_RMA_GetBlocking(myteam, msgbuf, peerproc, tgtmem, max_payload, 0); gex_Event_WaitAll(h, 2*warm_iters, 0); gex_NBI_Wait(GEX_EC_ALL,0); test_free(h); } BARRIER(); // Double payload at each iter, subject to max_step // but include max_payload which may not otherwise be visited #define ADVANCE(sz) do { \ size_t step = MIN(max_step, sz); \ if (!sz) { \ sz = 1; \ } else if (sz < max_payload && sz+step > max_payload) { \ sz = max_payload; \ } else { \ sz += step; \ } \ } while (0) if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; ) { roundtrip_test(iters, j); ADVANCE(j); } if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; ) { oneway_test(iters, j); ADVANCE(j); } if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; ) { roundtrip_nbi_test(iters, j); ADVANCE(j); } if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; ) { oneway_nbi_test(iters, j); ADVANCE(j); } if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; ) { roundtrip_nb_test(iters, j); ADVANCE(j); } if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; ) { oneway_nb_test(iters, j); ADVANCE(j); } BARRIER(); if (alloc) test_free(alloc); MSG0("done."); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testtools.c0000664000175000017500000021334315142313673016776 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testtools.c $ * Description: helpers for GASNet tests * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #define TEST_GASNET_TOOLS_ONLY #include "test.h" #include /* For INT_MAX */ /* specifically omit gasnetex.h/test.h to test independence */ #if defined(_GASNETEX_H) || defined(TEST_GASNETEX_H) #error testtools should *not* include gasnetex.h #endif #if GASNETT_THREAD_SAFE int NUM_THREADS = 0; gasnett_atomic_t thread_flag[TEST_MAXTHREADS]; int valX[TEST_MAXTHREADS]; int valY[TEST_MAXTHREADS]; gasnett_atomic_t atomicX[TEST_MAXTHREADS]; int32_t valX32[TEST_MAXTHREADS]; int32_t valY32[TEST_MAXTHREADS]; gasnett_atomic32_t atomicX32[TEST_MAXTHREADS]; int64_t valX64[TEST_MAXTHREADS]; int64_t valY64[TEST_MAXTHREADS]; gasnett_atomic64_t atomicX64[TEST_MAXTHREADS]; #endif #define DEFAULT_THREADS 10 #define DEFAULT_ITERS 100 int iters = 0; #define TEST_HEADER_PREFIX() ((void)0) #define TEST_HEADER(desc) \ TEST_HEADER_PREFIX(); \ if (TEST_SECTION_BEGIN_ENABLED() && \ (MSG0("%c: %s",TEST_SECTION_NAME(),desc),1)) TEST_BACKTRACE_DECLS(); void * thread_fn(void *arg); /* test gasnet tools modifier convenience macros */ GASNETT_INLINE(test_dummy) void test_dummy(void * GASNETT_RESTRICT p) {} void test_dummy2(void) GASNETT_NORETURN; GASNETT_NORETURNP(test_dummy2) void test_dummy2(void) { gasnett_fatalerror("test_dummy2"); } GASNETT_EXTERNC void test_dummy5(void); GASNETT_BEGIN_EXTERNC void *test_dummy3(void) GASNETT_MALLOC; void *test_dummy3(void) { return malloc(1); } GASNETT_INLINE(test_dummy4) GASNETT_MALLOC void *test_dummy4(void) { return malloc(1); } void test_dummy5(void) { } GASNETT_END_EXTERNC double volatile d_junk = 0; GASNETT_THREADKEY_DECLARE(sertest_key1); GASNETT_THREADKEY_DEFINE(sertest_key1); GASNETT_THREADKEY_DEFINE(sertest_key2); GASNETT_THREADKEY_DEFINE(partest_key1); GASNETT_THREADKEY_DEFINE(partest_key2); #define test_threadkeys(key1,key2) do { \ void *val = gasnett_threadkey_get(key1); \ assert_always(val == NULL); \ gasnett_threadkey_set(key1,(void *)&val); \ val = gasnett_threadkey_get(key1); \ assert_always(val == &val); \ \ gasnett_threadkey_init(key2); \ val = gasnett_threadkey_get_noinit(key2); \ assert_always(val == NULL); \ gasnett_threadkey_set_noinit(key2,(void *)&val); \ val = gasnett_threadkey_get_noinit(key2); \ assert_always(val == &val); \ gasnett_threadkey_init(key2); \ val = gasnett_threadkey_get_noinit(key2); \ assert_always(val == &val); \ } while (0) int main(int argc, char **argv) { /* avoid unused function warnings */ uintptr_t test_dummies = (uintptr_t)&test_dummy ^ (uintptr_t)&test_dummy2 ^ (uintptr_t)&test_dummy3 ^ (uintptr_t)&test_dummy4 ^ (uintptr_t)&test_dummy5 ^ (uintptr_t)&test_dummies; test_init("testtools", 0,"(iters) (num_threads) (tests_to_run)"); const char *exename = gasnett_exe_name(); if (!exename || !*exename) MSG("WARNING: gasnett_exe_name() failed to discover exename"); else MSG("gasnett_exe_name()='%s'",exename); TEST_BACKTRACE_INIT(argv[0]); if (argc > 1) iters = atoi(argv[1]); if (iters < 1) iters = DEFAULT_ITERS; #if GASNETT_THREAD_SAFE if (argc > 2) NUM_THREADS = atoi(argv[2]); if (NUM_THREADS < 1) NUM_THREADS = DEFAULT_THREADS; NUM_THREADS = test_thread_limit(NUM_THREADS); #else if (argc > 2 && atoi(argv[2]) != 1) { ERR("no pthreads - only one thread available."); test_usage(); } #endif if (argc > 3) TEST_SECTION_PARSE(argv[3]); if (argc > 4) test_usage(); TEST_GENERICS_WARNING(); #if GASNETT_THREAD_SAFE MSG("Running testtools with %i iterations and %i threads", iters, NUM_THREADS); #else MSG("Running testtools with %i iterations", iters); #endif #if PLATFORM_ARCH_32 && !PLATFORM_ARCH_64 assert_always(sizeof(void*) == 4); #elif !PLATFORM_ARCH_32 && PLATFORM_ARCH_64 assert_always(sizeof(void*) == 8); #else #error must #define exactly one of PLATFORM_ARCH_32 or PLATFORM_ARCH_64 #endif { int smaj = GASNETT_SPEC_VERSION_MAJOR; int smin = GASNETT_SPEC_VERSION_MINOR; int rmaj = GASNETT_RELEASE_VERSION_MAJOR; int rmin = GASNETT_RELEASE_VERSION_MINOR; int rpat = GASNETT_RELEASE_VERSION_PATCH; assert_always(smaj > 0 && smin >= 0 && rmaj > 0 && rmin >= 0 && rpat >= 0); uint64_t ver = rmaj * (uint64_t)1000000 + rmin * (uint64_t)10000 + rpat; assert_always(ver == gasnett_release_version()); const char *version_str = _STRINGIFY(GASNET_RELEASE_VERSION_MAJOR) "." _STRINGIFY(GASNET_RELEASE_VERSION_MINOR) "." _STRINGIFY(GASNET_RELEASE_VERSION_PATCH); assert_always(!strcmp(version_str, gasnett_release_version_str())); } #if defined(GASNETT_PAGESIZE) && defined(GASNETT_PAGESHIFT) if (0x1 << GASNETT_PAGESHIFT != GASNETT_PAGESIZE) ERR("bad pagesizes: GASNETT_PAGESHIFT=%i GASNETT_PAGESIZE=%i", GASNETT_PAGESHIFT, GASNETT_PAGESIZE); else MSG("System page size is 2^%i == %i", GASNETT_PAGESHIFT, GASNETT_PAGESIZE); #endif { int cpucnt = gasnett_cpu_count(); MSG("CPU count estimated to be: %i", cpucnt); assert_always(cpucnt >= 0); } MSG("Cache line size estimated to be: %i", GASNETT_CACHE_LINE_BYTES); if ((GASNETT_CACHE_LINE_BYTES & (GASNETT_CACHE_LINE_BYTES-1)) != 0) ERR("GASNETT_CACHE_LINE_BYTES not a power of two!"); { uint64_t val = gasnett_getPhysMemSz(0); char sz_str[50]; gasnett_format_number(val, sz_str, sizeof(sz_str), 1); if (val == 0) MSG("WARNING: gasnett_getPhysMemSz() failed to discover physical memory size."); else { MSG("Physical memory size estimated to be: %s", sz_str); if (val > (1ULL<<50) || val < (1ULL<<20)) ERR("gasnett_getPhysMemSz() got a ridiculous result: %" PRIu64 " bytes", val); } } { char tmp_str[50]; gasnett_format_number(0, tmp_str, sizeof(tmp_str), 1); assert_always(gasnett_parse_int(tmp_str, 1) == 0); gasnett_format_number(0, tmp_str, sizeof(tmp_str), 0); assert_always(gasnett_parse_int(tmp_str, 0) == 0); for (int i=0; i < 62; i++) { int64_t x = (((int64_t)1) << i); int64_t y; gasnett_format_number(x, tmp_str, sizeof(tmp_str), 1); y = gasnett_parse_int(tmp_str, 1); if (x != y) ERR("gasnett_format_number/gasnett_parse_int memsz mismatch: %" PRId64 " != %" PRId64 " (%s)", x, y, tmp_str); gasnett_format_number(x, tmp_str, sizeof(tmp_str), 0); y = gasnett_parse_int(tmp_str, 0); if (x != y) ERR("gasnett_format_number/gasnett_parse_int mismatch: %" PRId64 " != %" PRId64 " (%s)", x, y, tmp_str); } } gasnett_sched_yield(); gasnett_flush_streams(); gasnett_maximize_rlimits(); TEST_TRACING_MACROS(); TEST_HEADER("Testing high-performance timers and sleep...") { /* high performance timers */ int timeiters = MAX(1,iters / 10); gasnett_tick_t ticktimemin = GASNETT_TICK_MIN; gasnett_tick_t ticktimemax = GASNETT_TICK_MAX; #if PLATFORM_OS_CYGWIN || PLATFORM_OS_SUBFAMILY_WSL // bug 2410: avoid false negatives due to cygwin's high gettimeofday() reference timer granularity double default_slack = 0.05; // 50 ms for cygwin #else double default_slack = 0.01; // 10 ms, sufficient for most platforms #endif double slack = gasnett_getenv_dbl_withdefault("GASNET_TEST_TIME_SLACK", default_slack); double overhead = gasnett_tick_overheadus(); double granularity = gasnett_tick_granularityus(); /* Aiming for 'total' microseconds of busy waits, with 25% of it in the last iteration, but need a non-trivial number of ticks to pass int each iteration. */ uint64_t total = 20 * 1000000; uint64_t us_delay = (uint64_t)((0.75*total) / timeiters); uint64_t min_delay = (uint64_t)MAX(1, 50*granularity); if (us_delay < min_delay) { us_delay = min_delay; timeiters = (int)((0.75*total) / min_delay); } if (!(ticktimemin < ticktimemax)) ERR("!(min < max)"); if (!(gasnett_ticks_now() > ticktimemin)) ERR("!(now > min)"); if (!(gasnett_ticks_now() < ticktimemax)) ERR("!(now < max)"); if (granularity <= 0.0 || overhead <= 0.0) { ERR("nonsensical timer overhead/granularity measurements:\n" " overhead: %.3fus granularity: %.3fus\n",overhead, granularity); } else if ((granularity+10*slack) < 0.5*overhead) { /* allow some leeway for noise at granularities approaching cycle speed */ // leeway is scaled by slack to allow disabling this test // on platforms where timers are unreliable (eg cpu emulator) MSG("WARNING: suspicious timer overhead/granularity measurements: (this can be caused by high system noise)\n" " overhead: %.3fus granularity: %.3fus\n",overhead, granularity); } gasnett_tick_t start, begin = gasnett_ticks_now(); /* outer time point */ uint64_t startref, beginref = gasnett_gettimeofday_us(); for (int i=0; i < timeiters; i++) { if (i == timeiters - 1) { start = begin; /* use outer time point for base of last iteration */ startref = beginref; us_delay = total; /* consume the remainder (about 25%) of the total interval */ } else { start = gasnett_ticks_now(); /* inner time point */ startref = gasnett_gettimeofday_us(); } if (i % MAX(1,timeiters/3) == 0) sleep(1); /* sleep wait */ { /* busy wait */ gasnett_tick_t last = start; do { gasnett_tick_t next = gasnett_ticks_now(); if (next < last) ERR("gasnett_ticks_now not monotonic! !(%" PRIu64 " <= %" PRIu64 ")", (uint64_t)last, (uint64_t)next); if (next <= GASNETT_TICK_MIN) ERR("gasnett_ticks_to_us()=%" PRIu64 " <= GASNETT_TICK_MIN=%" PRIu64, (uint64_t)next, (uint64_t)GASNETT_TICK_MIN); if (next >= GASNETT_TICK_MAX) ERR("gasnett_ticks_to_us()=%" PRIu64 " >= GASNETT_TICK_MAX=%" PRIu64, (uint64_t)next, (uint64_t)GASNETT_TICK_MAX); d_junk = 1.0001 * d_junk; last = next; } while (gasnett_ticks_to_us(last-start) < us_delay); } gasnett_tick_t end = gasnett_ticks_now(); uint64_t endref = gasnett_gettimeofday_us(); int time = gasnett_ticks_to_us(end) - gasnett_ticks_to_us(start); int timeref = endref - startref; if (abs(timeref - time) > (int)(slack * 1.e6)) ERR("timer and reference differ by more than %g sec:\n" "\ttime=%i timeref=%i delta=%g sec\n", slack,time,timeref,1.e-6*abs(timeref - time)); if (abs( (int)((gasnett_ticks_to_us(end) - gasnett_ticks_to_us(start)) - gasnett_ticks_to_us(end - start)) ) > 1) ERR("ticks_to_us(A) - ticks_to_us(B) != ticks_to_us(A-B)"); if (abs( (int)(gasnett_ticks_to_ns(end - start)/1000 - gasnett_ticks_to_us(end - start)) ) > 1) ERR("ticks_to_ns(A)/1000 != ticks_to_us(A)"); } for (uint64_t ns_delay = 10; ns_delay < (uint64_t)2e9; ns_delay *= 14) { gasnett_tick_t start = gasnett_ticks_now(); int rc = gasnett_nsleep(ns_delay); gasnett_tick_t end = gasnett_ticks_now(); if (rc) ERR("gasnett_nsleep returned non-zero"); double elapsed_plus = gasnett_ticks_to_ns(end - start) + 0.0005 * ns_delay + 1000 * granularity; if (elapsed_plus < ns_delay) ERR("gasnett_nsleep(%" PRIu64 ") returned at least %" PRIu64 " nanoseconds too early", ns_delay, (uint64_t)(ns_delay - elapsed_plus)); } } TEST_HEADER("Testing zero-byte counting...") { /* gasnett_count0s*() */ static const char src[24] = { '\0', '1', '\0', '2', '\0', '3', '\0', '4', '5', '6', '7', '8', '\0', '9', '\0', 'a', 'b', '\0', 'c', 'd', 'e', 'f', 'g', 'h' }; char dst_guarded[24+16]; char *dst = dst_guarded+8; for (int i=0;i<8;++i) { /* src alignment */ for (int j=0;j<8;++j) { /* dst alignment */ for (int l=0;l<16;++l) { /* length */ memset(dst_guarded, 0, sizeof(dst_guarded)); int z0 = gasnett_count0s_copy(dst+j, src+i, l); if (memcmp(dst+j, src+i, l)) ERR("memory mismatch from gasnett_count0s_copy(dst+%i, src+%i, %i)",i,j,l); int z1 = gasnett_count0s(dst+j, l); int z2,k; for (z2=0,k=0;k=0;i--) { gasnett_atomic_decrement(&var,0); if (gasnett_atomic_read(&var,0) != (gasnett_atomic_val_t)(2*iters + i)) ERR("gasnett_atomic_decrement got wrong value"); } for (int i=0;i=1;i--) { if (gasnett_atomic_decrement_and_test(&var,0)) ERR("gasnett_atomic_decrement_and_test got wrong value"); if (gasnett_atomic_read(&var,0) != (gasnett_atomic_val_t)(i)) ERR("gasnett_atomic_decrement_and_test set wrong value"); } if (!gasnett_atomic_decrement_and_test(&var,0)) ERR("gasnett_atomic_decrement_and_test got wrong value at zero"); if (gasnett_atomic_read(&var,0) != 0) ERR("gasnett_atomic_decrement_and_test set wrong value at zero"); #if defined(GASNETT_HAVE_ATOMIC_CAS) gasnett_atomic_set(&var, 0, 0); for (int i=0;i 0 ? 1 : 0); } #if GASNETT_THREAD_SAFE #undef MSG0 #undef ERR #define MSG0 THREAD_MSG0(id) #define ERR THREAD_ERR(id) gasnett_atomic_t up = gasnett_atomic_init(0); gasnett_atomic_t down = gasnett_atomic_init(0); gasnett_atomic_t x1 = gasnett_atomic_init(10000); gasnett_atomic_t x2 = gasnett_atomic_init(10000); gasnett_atomic_t x3 = gasnett_atomic_init(10000); gasnett_atomic_t x4 = gasnett_atomic_init(10000); gasnett_atomic_t x5 = gasnett_atomic_init(10000); gasnett_atomic_t _thread_barrier = gasnett_atomic_init(0); #define THREAD_BARRIER() do { \ barcnt++; \ gasnett_atomic_increment(&_thread_barrier, GASNETT_ATOMIC_REL); \ while (gasnett_atomic_read(&_thread_barrier,0) < \ (gasnett_atomic_val_t)(barcnt*NUM_THREADS)) { \ gasnett_sched_yield(); \ } \ gasnett_local_rmb(); /* Acquire */ \ } while(0) \ #undef TEST_HEADER_PREFIX #define TEST_HEADER_PREFIX() THREAD_BARRIER() void * thread_fn(void *arg) { const int id = (int)(uintptr_t)arg; int barcnt = 0; char th_test_section = test_section; #define test_section th_test_section /* Avoid overflow to ensure a sane iters2 value. */ const int iters2 = (iters >= (INT_MAX / 100)) ? (INT_MAX & ~1) : (100 * iters); /* Parallel atomic-op pounding test assumes iters2 is even */ assert_always(iters2 % 2 == 0); /* sanity check - ensure unique threadids */ if (!gasnett_atomic_decrement_and_test(thread_flag+id,0)) { ERR("thread %i failed sanity check", id); } /* sanity check - ensure thread barriers are working */ TEST_HEADER("parallel atomic-op barrier test...") { for (int i=0;i (gasnett_atomic_val_t)NUM_THREADS) gasnett_sched_yield(); gasnett_atomic_set(&up, 0, 0); /* Why the _REL?. The set(up) above must complete before the dec(down). * Otherwise, it might clobber an increment by another thread in the next count-up. */ gasnett_atomic_decrement(&down, GASNETT_ATOMIC_REL); while (gasnett_atomic_read(&down,0) > 0) gasnett_sched_yield(); tmp = gasnett_atomic_read(&down,0); if (tmp != 0) ERR("count-down post-barrier read: %i != 0", tmp); } } TEST_HEADER("parallel threadkey test...") { /* parallel threadkey test */ test_threadkeys(partest_key1,partest_key2); } TEST_HEADER("parallel atomic-op pounding test...") { gasnett_atomic_set(&x1, 5, 0); gasnett_atomic_set(&x2, 5+iters2*NUM_THREADS, 0); gasnett_atomic_set(&x3, 5, 0); gasnett_atomic_set(&x4, 5+iters2*NUM_THREADS, 0); THREAD_BARRIER(); for (int i=0;i> 24) & 0xFF) != (v & 0xFF) || ((v >> 16) & 0xFF) != (v & 0xFF) || ((v >> 8) & 0xFF) != (v & 0xFF)) ERR("observed word tearing on gasnett_atomic_set"); v = gasnett_atomic_read(&x4,0); /* bottom byte may have increased by up to NUM_THREADS, but high bytes must be same */ if (((v >> 24) & 0xFF) != ((v >> 8) & 0xFF) || ((v >> 16) & 0xFF) != ((v >> 8) & 0xFF)) ERR("observed word tearing on gasnett_atomic_set/gasnett_atomic_increment"); v = gasnett_atomic_read(&x5,0); v += NUM_THREADS; /* bottom byte may have decreased by up to NUM_THREADS, but high bytes must be same */ if (((v >> 24) & 0xFF) != ((v >> 8) & 0xFF) || ((v >> 16) & 0xFF) != ((v >> 8) & 0xFF)) ERR("observed word tearing on gasnett_atomic_set/gasnett_atomic_decrement"); } } if (NUM_THREADS <= 100) { /* need 2*NUM_THREADS + 1 < 255 to prevent byte overflow */ static gasnett_atomic32_t a1 = gasnett_atomic32_init(0); static gasnett_atomic32_t a2 = gasnett_atomic32_init(0); uint32_t x = id + 1; uint32_t myval = (x << 24) | (x << 16) | (x << 8) | x; for (int i=0;i> 24) & 0xFF) != (v & 0xFF) || ((v >> 16) & 0xFF) != (v & 0xFF) || ((v >> 8) & 0xFF) != (v & 0xFF)) ERR("observed word tearing on gasnett_atomic32_set"); v = gasnett_atomic32_read(&a2,0); /* bottom byte may have increased by up to NUM_THREADS, but high bytes must be same */ if (((v >> 24) & 0xFF) != ((v >> 8) & 0xFF) || ((v >> 16) & 0xFF) != ((v >> 8) & 0xFF)) ERR("observed word tearing on gasnett_atomic32_set/gasnett_atomic32_compare_and_swap"); } } { /* No overflow until we're into the tens of thousands of threads */ static gasnett_atomic64_t a1 = gasnett_atomic64_init(0); static gasnett_atomic64_t a2 = gasnett_atomic64_init(0); static struct { /* Try to trigger bad alignment if possible */ char c; gasnett_atomic64_t a; } s1 = {0, gasnett_atomic64_init(0)}; static struct { /* Try to trigger bad alignment if possible */ char c; double d; } s2 = {0, -1.0}; uint64_t x = id + 1; uint64_t myval = (x << 48) | (x << 32) | (x << 16) | x; for (int i=0;i> 48) & 0xFFFF) != (v & 0xFFFF) || ((v >> 32) & 0xFFFF) != (v & 0xFFFF) || ((v >> 16) & 0xFFFF) != (v & 0xFFFF)) ERR("observed word tearing on gasnett_atomic64_set alignment test"); v = gasnett_atomic64_read((gasnett_atomic64_t *)(void *)&s2.d,0); /* (void*) suppresses g++ warning (bug 2158) */ if (((v >> 48) & 0xFFFF) != (v & 0xFFFF) || ((v >> 32) & 0xFFFF) != (v & 0xFFFF) || ((v >> 16) & 0xFFFF) != (v & 0xFFFF)) ERR("observed word tearing on gasnett_atomic64_set double alignment test"); v = gasnett_atomic64_read(&a1,0); if (((v >> 48) & 0xFFFF) != (v & 0xFFFF) || ((v >> 32) & 0xFFFF) != (v & 0xFFFF) || ((v >> 16) & 0xFFFF) != (v & 0xFFFF)) ERR("observed word tearing on gasnett_atomic64_set"); v = gasnett_atomic64_read(&a2,0); /* bottom byte may have increased by up to NUM_THREADS, but high bytes must be same */ if (((v >> 48) & 0xFFFF) != ((v >> 16) & 0xFFFF) || ((v >> 32) & 0xFFFF) != ((v >> 16) & 0xFFFF)) ERR("observed word tearing on gasnett_atomic64_set/gasnett_atomic64_compare_and_swap"); } } } TEST_HEADER("parallel membar test...") { { const int partner = (id + 1) % NUM_THREADS; /* Allow for wrap-around/overflow */ #define BIGGER(_x, _y) ((int)(_y - _x) > 0) valX[id] = 0; valY[id] = 0; THREAD_BARRIER(); for (int i=0;i= (GASNETT_ATOMIC_MAX / NUM_THREADS)) ? (GASNETT_ATOMIC_MAX / NUM_THREADS) : iters; gasnett_atomic_val_t const goal = NUM_THREADS * share; gasnett_atomic_val_t oldval; /* Look for missing or doubled updates by taking an equal share of increments */ while (woncnt < share && (oldval = gasnett_atomic_read(&counter2,0)) != goal) { if (gasnett_atomic_compare_and_swap(&counter2, oldval, (oldval + 1), 0)) { woncnt++; } } THREAD_BARRIER(); oldval = gasnett_atomic_read(&counter2,0); if (oldval != goal) ERR("failed compare-and-swap test: counter=%u expecting=%u", (unsigned)oldval, (unsigned)goal); if (woncnt != share) ERR("failed compare-and-swap test: woncnt=%u share=%u", (unsigned)woncnt, (unsigned)share); /* Now try spinlock construct */ THREAD_BARRIER(); for (gasnett_atomic_val_t i=0;i= limit) { ERR("gasnett_atomic_swap read an impossible value 0x%x", (unsigned)idx); } else { if_pf (array[idx] != 0) ERR("gasnett_atomic_swap produced a duplicate value %d", (int)idx); array[idx] = 1; } } } THREAD_BARRIER(); if (!id) { /* One final swap to simplify the validation */ gasnett_atomic_val_t idx = gasnett_atomic_swap(&var, GASNETT_ATOMIC_MAX, 0); if_pf (idx >= limit) { ERR("gasnett_atomic_swap read an impossible value 0x%x", (unsigned)idx); } else { if_pf (array[idx] != 0) ERR("gasnett_atomic_swap produced a duplicate value %d", (int)idx); array[idx] = 1; } /* Now scan the array to ensure no values were missed */ for (idx = 0; idx < limit; ++idx) { if (array[idx] != 1) ERR("gasnett_atomic_swap missed an update at %d", (int)idx); array[idx] = 0; /* reset for next iteration */ } } THREAD_BARRIER(); } } #else MSG0(" NOTE: gasnett_atomic_swap() is missing"); #endif { // Same for 32-bit fixed-width atomics static gasnett_atomic32_t var = gasnett_atomic32_init(GASNETT_ATOMIC_MAX); THREAD_BARRIER(); for (int i = 0; i < iters; ++i) { for (uint32_t j = id; j < limit; j += NUM_THREADS) { uint32_t idx = gasnett_atomic32_swap(&var, j, 0); if_pt (idx != GASNETT_ATOMIC_MAX) { if_pf (idx >= limit) { ERR("gasnett_atomic32_swap read an impossible value 0x%x", (unsigned)idx); } else { if (array[idx] != 0) ERR("gasnett_atomic32_swap produced a duplicate value %d", (int)idx); array[idx] = 1; } } } THREAD_BARRIER(); if (!id) { uint32_t idx = gasnett_atomic32_swap(&var, GASNETT_ATOMIC_MAX, 0); if (idx >= limit) { ERR("gasnett_atomic32_swap read an impossible value 0x%x", (unsigned)idx); } else { if (array[idx] != 0) ERR("gasnett_atomic32_swap produced a duplicate value %u", (int)idx); array[idx] = 1; } for (idx = 0; idx < limit; ++idx) { if (array[idx] != 1) ERR("gasnett_atomic32_swap missed an update at %d", (int)idx); array[idx] = 0; } } THREAD_BARRIER(); } } { // Same for 64-bit fixed-width atomics // There is an extra wrinkle in this case: // We map the updates into both upper and lower halves of a 64-bit word #define FWD(n) ((n)&1 ? (n) : (uint64_t)(n)<<32) #define BWD(n) (((n)&0xFFFFFFFFu) | ((n)>>32)) static gasnett_atomic64_t var = gasnett_atomic64_init(GASNETT_ATOMIC_MAX); THREAD_BARRIER(); for (int i = 0; i < iters; ++i) { for (uint64_t j = id; j < limit; j += NUM_THREADS) { uint64_t read = gasnett_atomic64_swap(&var, FWD(j), 0); if_pt (read != GASNETT_ATOMIC_MAX) { uint64_t idx = BWD(read); if_pf ((idx >= limit) || ((read & 0xFFFFFFFFu) && (read >> 32))) { ERR("gasnett_atomic64_swap read an impossible value 0x%" PRIx64, read); } else { if_pf (array[idx] != 0) ERR("gasnett_atomic64_swap produced a duplicate value %d", (int)idx); array[idx] = 1; } } } THREAD_BARRIER(); if (!id) { uint64_t read = gasnett_atomic64_swap(&var, GASNETT_ATOMIC_MAX, 0); uint64_t idx = BWD(read); if_pf ((idx >= limit) || ((read & 0xFFFFFFFFu) && (read >> 32))) { ERR("gasnett_atomic64_swap read an impossible value 0x%" PRIx64, read); } else { if_pf (array[idx] != 0) ERR("gasnett_atomic64_swap produced a duplicate value %d", (int)idx); array[idx] = 1; } for (idx = 0; idx < limit; ++idx) { if (array[idx] != 1) ERR("gasnett_atomic64_swap missed an update at %d", (int)idx); array[idx] = 0; } } THREAD_BARRIER(); } #undef FWD #undef BWD } if (0 == id) { test_free(array); } } TEST_HEADER("parallel add test...") { const gasnett_atomic_val_t limit = MIN(GASNETT_ATOMIC_MAX, 8192); static char *array; if (!id) { array = (char *)test_calloc(sizeof(char), limit); } #if GASNETT_HAVE_ATOMIC_ADD_SUB { static gasnett_atomic_t var = gasnett_atomic_init(0); THREAD_BARRIER(); for (int i = 0; i < iters; ++i) { /* Produce all values in [0,limit) with each thread owning a share of the space. The 'array' tracks which values have been seen and ensures no duplicates. */ for (gasnett_atomic_val_t j = id; j < limit; j += NUM_THREADS) { gasnett_atomic_val_t idx = gasnett_atomic_add(&var, 1, 0) - 1; if_pf (idx >= limit) { ERR("gasnett_atomic_add read an impossible value 0x%x", (unsigned)idx); } else { if_pf (array[idx] != 0) ERR("gasnett_atomic_add produced a duplicate value %d", (int)idx); array[idx] = 1; } } THREAD_BARRIER(); if (!id) { /* Now scan the array to ensure no values were missed */ for (gasnett_atomic_val_t idx = 0; idx < limit; ++idx) { if (array[idx] != 1) ERR("gasnett_atomic_add missed an update at %d", (int)idx); array[idx] = 0; /* reset for next iteration */ } gasnett_atomic_set(&var, 0, 0); } THREAD_BARRIER(); } } #else MSG0(" NOTE: gasnett_atomic_add() is missing"); #endif { // Same for 32-bit fixed-width atomics static gasnett_atomic32_t var = gasnett_atomic32_init(0); THREAD_BARRIER(); for (int i = 0; i < iters; ++i) { for (uint32_t j = id; j < limit; j += NUM_THREADS) { uint32_t idx = gasnett_atomic32_add(&var, 1, 0) - 1; if_pf (idx >= limit) { ERR("gasnett_atomic32_add read an impossible value 0x%x", (unsigned)idx); } else { if_pf (array[idx] != 0) ERR("gasnett_atomic32_add produced a duplicate value %d", (int)idx); array[idx] = 1; } } THREAD_BARRIER(); if (!id) { for (uint32_t idx = 0; idx < limit; ++idx) { if (array[idx] != 1) ERR("gasnett_atomic32_add missed an update at %d", (int)idx); array[idx] = 0; } gasnett_atomic32_set(&var, 0, 0); } THREAD_BARRIER(); } } { // Same for 64-bit fixed-width atomics // There is an extra wrinkle in this case: // We map the updates into both upper and lower halves of a 64-bit word #define FWD(n) ((n)&1 ? (1) : (uint64_t)1<<32) #define BWD(n) (((n)&0xFFFFFFFFu) + ((n)>>32)) static gasnett_atomic64_t var = gasnett_atomic64_init(0); THREAD_BARRIER(); for (int i = 0; i < iters; ++i) { for (uint64_t j = id; j < limit; j += NUM_THREADS) { uint64_t read = gasnett_atomic64_add(&var, FWD(j), 0); uint64_t idx = BWD(read) - 1; if_pf (idx >= limit) { ERR("gasnett_atomic64_add read an impossible value 0x%" PRIx64, read); } else { if_pf (array[idx] != 0) ERR("gasnett_atomic64_add produced a duplicate value %d", (int)idx); array[idx] = 1; } } THREAD_BARRIER(); if (!id) { for (uint64_t idx = 0; idx < limit; ++idx) { if (array[idx] != 1) ERR("gasnett_atomic64_add missed an update at %d", (int)idx); array[idx] = 0; } gasnett_atomic64_set(&var, 0, 0); } THREAD_BARRIER(); } #undef FWD #undef BWD } if (0 == id) { test_free(array); } } TEST_HEADER("parallel atomic-op fence test...") { int const partner = (id + 1) % NUM_THREADS; unsigned int lx, ly; gasnett_atomic_set(&atomicX[id], 0, 0); gasnett_atomic32_set(&atomicX32[id], 0, 0); gasnett_atomic64_set(&atomicX64[id], 0, 0); valY[id] = 0; valY32[id] = 0; valY64[id] = 0; THREAD_BARRIER(); /* First a pass through w/ WMB and RMB */ for (int i=0;i=0;i--) { #if defined(GASNETT_HAVE_ATOMIC_ADD_SUB) { int step = i & 4; valY[id] -= step; gasnett_atomic_subtract(&atomicX[id], step, GASNETT_ATOMIC_REL); lx = gasnett_atomic_read(&atomicX[partner], GASNETT_ATOMIC_ACQ); ly = valY[partner]; if (BIGGER(lx,ly)) ERR("pounding fenced sub/read mismatch (rmb/wmb): lx=%u ly=%u", lx, ly); } #endif #if defined(GASNETT_HAVE_ATOMIC_CAS) { uint32_t oldval; valY[id]--; do { oldval = gasnett_atomic_read(&atomicX[id], 0); } while (!gasnett_atomic_compare_and_swap(&atomicX[id], oldval, oldval - 1, GASNETT_ATOMIC_REL)); lx = gasnett_atomic_read(&atomicX[partner], GASNETT_ATOMIC_ACQ); ly = valY[partner]; if (BIGGER(lx,ly)) ERR("pounding fenced c-a-s/read mismatch (rmb/wmb): lx=%u ly=%u", lx, ly); } #endif --valY[id]; gasnett_atomic_decrement(&atomicX[id], GASNETT_ATOMIC_REL); lx = gasnett_atomic_read(&atomicX[partner], GASNETT_ATOMIC_ACQ); ly = valY[partner]; if (BIGGER(lx,ly)) ERR("pounding fenced dec/read mismatch (rmb/wmb): lx=%u ly=%u", lx, ly); valY[id] = 6*i; gasnett_atomic_set(&atomicX[id], 6*i, GASNETT_ATOMIC_REL); lx = gasnett_atomic_read(&atomicX[partner], GASNETT_ATOMIC_ACQ); ly = valY[partner]; if (BIGGER(lx,ly)) ERR("pounding fenced set/read mismatch (rmb/wmb): lx=%u ly=%u", lx, ly); } THREAD_BARRIER(); gasnett_atomic_set(&atomicX[id], 0, 0); gasnett_atomic32_set(&atomicX32[id], 0, 0); gasnett_atomic64_set(&atomicX64[id], 0, 0); valY[id] = 0; valY32[id] = 0; valY64[id] = 0; THREAD_BARRIER(); /* Second pass through w/ MB used for both WMB and RMB */ for (int i=0;i=0;i--) { #if defined(GASNETT_HAVE_ATOMIC_ADD_SUB) { int step = i & 4; valY[id] -= step; gasnett_atomic_subtract(&atomicX[id], step, GASNETT_ATOMIC_MB_PRE); lx = gasnett_atomic_read(&atomicX[partner], GASNETT_ATOMIC_MB_POST); ly = valY[partner]; if (BIGGER(lx,ly)) ERR("pounding fenced sub/read mismatch (mb/mb): lx=%u ly=%u", lx, ly); } #endif #if defined(GASNETT_HAVE_ATOMIC_CAS) { uint32_t oldval; valY[id]--; do { oldval = gasnett_atomic_read(&atomicX[id], 0); } while (!gasnett_atomic_compare_and_swap(&atomicX[id], oldval, oldval - 1, GASNETT_ATOMIC_MB_PRE)); lx = gasnett_atomic_read(&atomicX[partner], GASNETT_ATOMIC_MB_POST); ly = valY[partner]; if (BIGGER(lx,ly)) ERR("pounding fenced c-a-s/read mismatch (mb/mb): lx=%u ly=%u", lx, ly); } #endif --valY[id]; gasnett_atomic_decrement(&atomicX[id], GASNETT_ATOMIC_MB_PRE); lx = gasnett_atomic_read(&atomicX[partner], GASNETT_ATOMIC_MB_POST); ly = valY[partner]; if (BIGGER(lx,ly)) ERR("pounding fenced dec/read mismatch (mb/mb): lx=%u ly=%u", lx, ly); valY[id] = 6*i; gasnett_atomic_set(&atomicX[id], 6*i, GASNETT_ATOMIC_MB_PRE); lx = gasnett_atomic_read(&atomicX[partner], GASNETT_ATOMIC_MB_POST); ly = valY[partner]; if (BIGGER(lx,ly)) ERR("pounding fenced set/read mismatch (mb/mb): lx=%u ly=%u", lx, ly); } } THREAD_BARRIER(); return NULL; } #endif gasnet-2025.8.0/tests/testlegacy.c0000664000175000017500000007664515142313673017116 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testlegacy.c $ * Description: General GASNet correctness tests for legacy api * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include /* limit segsz to prevent stack overflows for seg_everything tests */ #define TEST_MAXTHREADS 10 #include #define TEST_GASNET 1 #define SHORT_REQ_BASE 128 #include /* Define to get one big function that pushes the gcc inliner heursitics */ #undef TESTGASNET_NO_SPLIT #if PLATFORM_COMPILER_PGI_CXX // Not reproducible with NVHPC compilers // suppress warnings on PGI C++ 19.10/macos about intentional constant controlling expressions #pragma diag_suppress 236 #endif TEST_BACKTRACE_DECLS(); void doit(int partner, int *partnerseg); void doit1(int partner, int *partnerseg); void doit2(int partner, int *partnerseg); void doit3(int partner, int *partnerseg); void doit4(int partner, int32_t *partnerseg); void doit5(int partner, int *partnerseg); void doit6(int partner, int *partnerseg); void doit7(int partner, int *partnerseg); /* ------------------------------------------------------------------------------------ */ #if GASNET_SEGMENT_EVERYTHING typedef struct { void *static_seg; void *common_seg; void *malloc_seg; void *sbrk_seg; void *mmap_seg; void *stack_seg; } test_everything_seginfo_t; test_everything_seginfo_t myinfo; test_everything_seginfo_t partnerinfo; int done = 0; void seg_everything_reqh(gasnet_token_t token) { GASNET_Safe(gasnet_AMReplyMedium0(token, 251, &myinfo, sizeof(test_everything_seginfo_t))); } void seg_everything_reph(gasnet_token_t token, void *buf, size_t nbytes) { assert(nbytes == sizeof(test_everything_seginfo_t)); memcpy(&partnerinfo, buf, nbytes); gasnett_local_wmb(); done = 1; } #define EVERYTHING_SEG_HANDLERS() \ { 250, (handler_fn_t)seg_everything_reqh }, \ { 251, (handler_fn_t)seg_everything_reph }, char _static_seg[TEST_SEGSZ+PAGESZ] = {1}; char _common_seg[TEST_SEGSZ+PAGESZ]; void everything_tests(int partner) { char _stack_seg[TEST_SEGSZ+PAGESZ]; if (gasnet_mynode() == 0) MSG("*** gathering data segment info for SEGMENT_EVERYTHING tests..."); BARRIER(); myinfo.static_seg = alignup_ptr(&_static_seg, PAGESZ); myinfo.common_seg = alignup_ptr(&_common_seg, PAGESZ); myinfo.malloc_seg = alignup_ptr(test_malloc(TEST_SEGSZ+PAGESZ), PAGESZ); myinfo.sbrk_seg = alignup_ptr(sbrk(TEST_SEGSZ+PAGESZ), PAGESZ); #ifdef HAVE_MMAP myinfo.mmap_seg = alignup_ptr(gasnett_mmap(TEST_SEGSZ+PAGESZ), PAGESZ); #endif myinfo.stack_seg = alignup_ptr(&_stack_seg, PAGESZ); BARRIER(); /* fetch partner's addresses into partnerinfo */ GASNET_Safe(gasnet_AMRequestShort0((gasnet_node_t)partner, 250)); GASNET_BLOCKUNTIL(done); BARRIER(); /* test that remote access works will all the various data areas */ if (gasnet_mynode() == 0) MSG(" --- testgasnet w/ static data area ---"); doit(partner, (int*)partnerinfo.static_seg); if (gasnet_mynode() == 0) MSG(" --- testgasnet w/ common block data area ---"); doit(partner, (int*)partnerinfo.common_seg); if (gasnet_mynode() == 0) MSG(" --- testgasnet w/ malloc data area ---"); doit(partner, (int*)partnerinfo.malloc_seg); if (gasnet_mynode() == 0) MSG(" --- testgasnet w/ sbrk data area ---"); doit(partner, (int*)partnerinfo.sbrk_seg); #ifdef HAVE_MMAP if (gasnet_mynode() == 0) MSG(" --- testgasnet w/ mmap'd data area ---"); doit(partner, (int*)partnerinfo.mmap_seg); #endif if (gasnet_mynode() == 0) MSG(" --- testgasnet w/ stack data area ---"); doit(partner, (int*)partnerinfo.stack_seg); BARRIER(); } #else #define EVERYTHING_SEG_HANDLERS() #endif #if GASNET_PAR #define MAX_THREADS 10 #else #define MAX_THREADS 1 #endif int num_threads = MAX_THREADS; void test_threadinfo(int threadid, int numthreads) { int i; gasnet_threadinfo_t my_ti; static gasnet_threadinfo_t all_ti[MAX_THREADS]; { GASNET_BEGIN_FUNCTION(); my_ti = GASNET_GET_THREADINFO(); } { gasnet_threadinfo_t ti = GASNET_GET_THREADINFO(); assert_always(ti == my_ti); } { GASNET_POST_THREADINFO(my_ti); gasnet_threadinfo_t ti = GASNET_GET_THREADINFO(); assert_always(ti == my_ti); } assert(threadid < numthreads && numthreads <= MAX_THREADS); all_ti[threadid] = my_ti; PTHREAD_LOCALBARRIER(numthreads); if (my_ti) { // If non-NULL, IDs must be unique for (i = 0; i < numthreads; i++) { if (i != threadid) assert_always(my_ti != all_ti[i]); } } else { // If *any* ID is NULL, *all* must be NULL for (i = 0; i < numthreads; i++) { assert_always(all_ti[i] == NULL); } } PTHREAD_LOCALBARRIER(numthreads); } /* ------------------------------------------------------------------------------------ */ /* test libgasnet-specific gasnet_tools interfaces */ #if GASNET_PAR /* thread-parallel gasnet_tools tests */ #ifdef __cplusplus extern "C" #endif void *test_libgasnetpar_tools(void *p) { int idx = (int)(uintptr_t)p; PTHREAD_LOCALBARRIER(num_threads); test_threadinfo(idx, num_threads); PTHREAD_LOCALBARRIER(num_threads); #if GASNETI_ARCH_IBMPE /* Don't pin threads because system s/w will have already done so */ #else if (gasnett_getenv_yesno_withdefault("GASNET_TEST_SET_AFFINITY",1)) { // We can do little more than test for lack of crash here. // We will warn if the call fails on a platforms we support. // However, it is an ERROR if the call returns success when // GASNETT_SET_AFFINITY_SUPPORT is not defined. int rc = gasnett_set_affinity(idx); #if GASNETT_SET_AFFINITY_SUPPORT if (rc) { MSG("*** WARNING - gasnett_set_affinity() failed unexpectedly, possibly due to running in an environment which has already pinned processes. One may set GASNET_TEST_SET_AFFINITY=0 to skip this test."); } #else if (!rc) { MSG("*** ERROR - GASNETT_SET_AFFINITY RETURNED SUCCESS UNEXPECTEDLY!!!!!"); } #endif } #endif PTHREAD_LOCALBARRIER(num_threads); return NULL; } #endif void test_libgasnet_tools(void) { void *p; TEST_TRACING_MACROS(); #ifdef HAVE_MMAP p = gasnett_mmap(GASNETT_PAGESIZE); assert_always(p); assert_always(((uintptr_t)p)%GASNETT_PAGESIZE == 0); #endif test_threadinfo(0, 1); #if GASNET_DEBUGMALLOC { char *ptr = (char *)gasnett_debug_malloc(10); char *ptr2; gasnett_heapstats_t hs; assert_always(ptr); gasnett_debug_memcheck(ptr); ptr = (char *)gasnett_debug_realloc(ptr,20); assert_always(ptr); gasnett_debug_free(ptr); ptr = (char *)gasnett_debug_calloc(10,20); strcpy(ptr,"testing 1 2 3"); ptr2 = gasnett_debug_strdup(ptr); assert_always(ptr2 && ptr != ptr2 && !strcmp(ptr,ptr2)); gasnett_debug_free(ptr2); ptr2 = gasnett_debug_strndup(ptr,4); assert_always(ptr2 && ptr != ptr2 && !strncmp(ptr,ptr2,4) && strlen(ptr2) == 4); gasnett_debug_memcheck_one(); gasnett_debug_memcheck_all(); gasnett_debug_free(ptr2); gasnett_debug_free(ptr); gasnett_getheapstats(&hs); } #endif #if GASNET_PAR num_threads = test_thread_limit(num_threads); test_createandjoin_pthreads(num_threads, &test_libgasnetpar_tools, NULL, 0); #endif MSG("*** passed libgasnet_tools test!!"); } /* ------------------------------------------------------------------------------------ */ int main(int argc, char **argv) { uintptr_t local_segsz, global_segsz; int partner; gasnet_handlerentry_t handlers[] = { EVERYTHING_SEG_HANDLERS() ALLAM_HANDLERS() }; GASNET_Safe(gasnet_init(&argc, &argv)); local_segsz = gasnet_getMaxLocalSegmentSize(); global_segsz = gasnet_getMaxGlobalSegmentSize(); #if GASNET_SEGMENT_EVERYTHING assert_always(local_segsz == (uintptr_t)-1); assert_always(global_segsz == (uintptr_t)-1); #else assert_always(local_segsz >= global_segsz); assert_always(local_segsz % GASNET_PAGESIZE == 0); assert_always(global_segsz % GASNET_PAGESIZE == 0); assert_always(global_segsz > 0); #endif #if 0 assert_always(GASNET_ERR_NOT_INIT == gasnet_init(&argc, &argv)); /* Duplicate init */ #endif GASNET_Safe(gasnet_attach(handlers, sizeof(handlers)/sizeof(gasnet_handlerentry_t), TEST_SEGSZ_REQUEST, TEST_MINHEAPOFFSET)); #if 0 assert_always(GASNET_ERR_NOT_INIT == /* Duplicate attach */ gasnet_attach(handlers, sizeof(handlers)/sizeof(gasnet_handlerentry_t), TEST_SEGSZ_REQUEST, TEST_MINHEAPOFFSET)); #endif test_init("testlegacy",0,""); assert(TEST_SEGSZ >= 2*sizeof(int)*NUMHANDLERS_PER_TYPE); /* Legacy expansion of TEST_PRINT_CONDUITINFO(): */ MSG0("%s conduit: v%s GASNET_ALIGNED_SEGMENTS=%i\n" " gasnet_AMMaxArgs(): %i\n" " gasnet_AMMaxMedium(): %i\n" " gasnet_AMMaxLongRequest(): %i\n" " gasnet_AMMaxLongReply(): %i" , _STRINGIFY(GASNET_CORE_NAME), _STRINGIFY(GASNET_CORE_VERSION), GASNET_ALIGNED_SEGMENTS, (int)gasnet_AMMaxArgs(), (int)gasnet_AMMaxMedium(), (int)gasnet_AMMaxLongRequest(), (int)gasnet_AMMaxLongReply()); { char lstr[50], gstr[50]; gasnett_format_number(local_segsz, lstr, sizeof(lstr), 1); gasnett_format_number(global_segsz, gstr, sizeof(gstr), 1); MSG0(" MaxLocalSegmentSize on node0: %s\n" " MaxGlobalSegmentSize: %s", lstr, gstr); } BARRIER(); { int smaj = GASNET_SPEC_VERSION_MAJOR; int smin = GASNET_SPEC_VERSION_MINOR; int rmaj = GASNET_RELEASE_VERSION_MAJOR; int rmin = GASNET_RELEASE_VERSION_MINOR; int rpat = GASNET_RELEASE_VERSION_PATCH; int smaj2 = GASNET_VERSION; assert_always(smaj > 0 && smin >= 0 && rmaj > 0 && rmin >= 0 && rpat >= 0); assert_always(smaj == smaj2); } { int i; printf("my args: argc=%i argv=[", argc); for (i=0; i < argc; i++) { printf("%s'%s'",(i>0?" ":""),argv[i]); } printf("]\n"); fflush(stdout); } BARRIER(); TEST_BACKTRACE_INIT(argv[0]); TEST_BACKTRACE(); test_libgasnet_tools(); partner = (gasnet_mynode() + 1) % gasnet_nodes(); #if GASNET_SEGMENT_EVERYTHING everything_tests(partner); #else doit(partner, (int *)TEST_SEG(partner)); #endif MSG("done."); gasnet_exit(0); return 0; } void doit(int partner, int *partnerseg) { int mynode = gasnet_mynode(); // Verify documented equivalences provided by g2ex // DO NOT CHANGE IDENTIFIER PREFIXES IN THIS FUNCTION // verify that two types (and optionally two integer constant expressions) // are all the same type and fully equal / assignment compatible #define assert_equal(t1, t2, c1, c2) do { \ static t1 volatile v1 = c2; \ static t2 volatile v2 = c1; \ t1 volatile * const p1 = &v2; \ t2 volatile * const p2 = &v1; \ test_static_assert(sizeof(t1) == sizeof(t2)); \ assert_always(c1 == c2); \ assert_always(v1 == c1); \ assert_always(v2 == c2); \ v1 = v2; v2 = v1; \ assert_always(v1 == v2); \ assert_always(*p1 == *p2); \ } while (0) #define assert_equal_nonscalar(t1, t2, c1, c2) do { \ static t1 v1 = c2; \ static t2 v2 = c1; \ t1 * const p1 = &v2; \ t2 * const p2 = &v1; \ test_static_assert(sizeof(t1) == sizeof(t2)); \ assert_always(!memcmp(p1,p2,sizeof(t1))); \ v1 = v2; v2 = v1; \ assert_always(!memcmp(p1,p2,sizeof(t1))); \ } while (0) // Note: asymmetric use of `pu` avoids self-compare warnings #define assert_field_compat(t1, f1, t2, f2) do { \ static union { t1 v1; t2 v2; } u, *pu = &u; \ static t1 v1; \ static t2 v2; \ test_static_assert(sizeof(t1) == sizeof(t2)); \ assert_always((void*)&u.v1 == (void*)&u.v2); \ assert_always(sizeof(u.v1.f1) == sizeof(u.v2.f2)); \ assert_always(&u.v1.f1 == &pu->v2.f2); \ v1.f1 = v2.f2; v2.f2 = v1.f1; \ } while (0) // types assert_equal(gasnet_handle_t, gex_Event_t, GASNET_INVALID_HANDLE, GEX_EVENT_INVALID); assert_equal(gasnet_node_t, gex_Rank_t, GEX_RANK_INVALID, GEX_RANK_INVALID); assert_always(GASNET_MAXNODES <= GEX_RANK_INVALID); assert_equal(gasnet_token_t, gex_Token_t, NULL, NULL); assert_equal(gasnet_handler_t, gex_AM_Index_t, 0, 0); assert_equal(gasnet_handlerarg_t, gex_AM_Arg_t, 0, 0); assert_equal(gasnet_register_value_t, gex_RMA_Value_t, SIZEOF_GASNET_REGISTER_VALUE_T, SIZEOF_GEX_RMA_VALUE_T); assert_equal_nonscalar(gasnet_hsl_t, gex_HSL_t, GASNET_HSL_INITIALIZER, GEX_HSL_INITIALIZER); assert_field_compat(gasnet_memvec_t, addr, gex_Memvec_t, gex_addr); assert_field_compat(gasnet_memvec_t, len, gex_Memvec_t, gex_len); // AM limits assert_always(MIN(gex_AM_LUBRequestMedium(),gex_AM_LUBReplyMedium()) == gasnet_AMMaxMedium()); assert_always(gex_AM_LUBRequestLong() == gasnet_AMMaxLongRequest()); assert_always(gex_AM_LUBReplyLong() == gasnet_AMMaxLongReply()); // Rank-vs-node assert_always(gex_System_QueryJobRank() == gasnet_mynode()); assert_always(gex_System_QueryJobSize() == gasnet_nodes()); // {Nbrhd,Host}Info and MyPosition vs getNodeInfo { gasnet_nodeinfo_t *nodeinfo = (gasnet_nodeinfo_t *) test_malloc(gasnet_nodes() * sizeof(gasnet_nodeinfo_t)); GASNET_Safe(gasnet_getNodeInfo(nodeinfo, gasnet_nodes())); gasnet_node_t mysupernode_id = nodeinfo[mynode].supernode; gasnet_node_t mysupernode_size = 0; gasnet_node_t mysupernode_rank = GEX_RANK_INVALID; gasnet_node_t myhost_id = nodeinfo[mynode].host; gasnet_node_t myhost_size = 0; gasnet_node_t myhost_rank = GEX_RANK_INVALID; for (gasnet_node_t i = 0; i < gasnet_nodes(); ++i) { if (i == gasnet_mynode()) { mysupernode_rank = mysupernode_size; myhost_rank = myhost_size; } if (nodeinfo[i].supernode == mysupernode_id) mysupernode_size += 1; if (nodeinfo[i].host == myhost_id) myhost_size += 1; } assert_always(mysupernode_size >= 1); assert_always(mysupernode_rank != GEX_RANK_INVALID); assert_always(myhost_size >= 1); assert_always(myhost_rank != GEX_RANK_INVALID); gex_RankInfo_t *neighbor_array; gex_Rank_t neighbor_size, neighbor_rank; gex_System_QueryNbrhdInfo(&neighbor_array, &neighbor_size, &neighbor_rank); assert_always(neighbor_size == mysupernode_size); assert_always(neighbor_rank == mysupernode_rank); assert_always(neighbor_array != NULL); for (gasnet_node_t i = 0; i < mysupernode_size; ++i) { assert_always(nodeinfo[neighbor_array[i].gex_jobrank].supernode == mysupernode_id); } gex_RankInfo_t *host_array; gex_Rank_t host_size, host_rank; gex_System_QueryHostInfo(&host_array, &host_size, &host_rank); assert_always(host_size == myhost_size); assert_always(host_rank == myhost_rank); assert_always(host_array != NULL); for (gasnet_node_t i = 0; i < myhost_size; ++i) { assert_always(nodeinfo[host_array[i].gex_jobrank].host == myhost_id); } gasnet_node_t max_supernode = 0; gasnet_node_t max_host = 0; for (gasnet_node_t i = 0; i < gasnet_nodes(); ++i) { max_supernode = MAX(max_supernode, nodeinfo[i].supernode); max_host = MAX(max_host , nodeinfo[i].host ); } gex_Rank_t n_size, n_rank, h_size, h_rank; gex_System_QueryMyPosition(&n_size, &n_rank, &h_size, &h_rank); assert_always(n_size == 1 + max_supernode); assert_always(n_rank == nodeinfo[gasneti_mynode].supernode); assert_always(h_size == 1 + max_host); assert_always(h_rank == nodeinfo[gasneti_mynode].host); test_free(nodeinfo); } // GEX objects { gex_Client_t client; gex_EP_t endpoint; gex_TM_t tm; gex_Segment_t segment; gasnet_QueryGexObjects(&client, &endpoint, &tm, &segment); assert_always(gex_EP_QueryClient(endpoint) == client); assert_always(gex_TM_QueryClient(tm) == client); assert_always(gex_TM_QueryEP(tm) == endpoint); #if !GASNET_SEGMENT_EVERYTHING assert_always(gex_Segment_QueryClient(segment) == client); assert_always(gex_Segment_QueryAddr(segment) == TEST_MYSEG()); assert_always(gex_Segment_QuerySize(segment) >= TEST_SEGSZ_REQUEST); #endif } MSG("*** passed object test!!"); #ifndef TESTGASNET_NO_SPLIT doit1(partner, partnerseg); } void doit1(int partner, int *partnerseg) { int mynode = gasnet_mynode(); #endif BARRIER(); /* blocking test */ { int val1=0, val2=0; val1 = mynode + 100; gasnet_put(partner, partnerseg, &val1, sizeof(int)); gasnet_get(&val2, partner, partnerseg, sizeof(int)); if (val2 == (mynode + 100)) MSG("*** passed blocking test!!"); else MSG("*** ERROR - FAILED BLOCKING TEST!!!!!"); } BARRIER(); /* blocking list test */ #define iters 100 { GASNET_BEGIN_FUNCTION(); gasnet_handle_t handles[iters]; int val1; int vals[iters]; int success = 1; int i; for (i = 0; i < iters; i++) { val1 = 100 + i + mynode; handles[i] = gasnet_put_nb(partner, partnerseg+i, &val1, sizeof(int)); } gasnet_wait_syncnb_all(handles, iters); for (i = 0; i < iters; i++) { handles[i] = gasnet_get_nb(&vals[i], partner, partnerseg+i, sizeof(int)); } gasnet_wait_syncnb_all(handles, iters); for (i=0; i < iters; i++) { if (vals[i] != 100 + mynode + i) { MSG("*** ERROR - FAILED NB LIST TEST!!! vals[%i] = %i, expected %i", i, vals[i], 100 + mynode + i); success = 0; } } if (success) MSG("*** passed blocking list test!!"); } #ifndef TESTGASNET_NO_SPLIT doit2(partner, partnerseg); } void doit2(int partner, int *partnerseg) { int mynode = gasnet_mynode(); #endif BARRIER(); { /* implicit test */ GASNET_BEGIN_FUNCTION(); int vals[100]; int i, success=1; for (i=0; i < 100; i++) { int tmp = mynode + i; gasnet_put_nbi(partner, partnerseg+i, &tmp, sizeof(int)); } gasnet_wait_syncnbi_puts(); for (i=0; i < 100; i++) { gasnet_get_nbi(&vals[i], partner, partnerseg+i, sizeof(int)); } gasnet_wait_syncnbi_gets(); for (i=0; i < 100; i++) { if (vals[i] != mynode + i) { MSG("*** ERROR - FAILED NBI TEST!!! vals[%i] = %i, expected %i", i, vals[i], mynode + i); success = 0; } } if (success) MSG("*** passed nbi test!!"); } #ifndef TESTGASNET_NO_SPLIT doit3(partner, partnerseg); } void doit3(int partner, int *partnerseg) { int mynode = gasnet_mynode(); #endif BARRIER(); { /* value test */ GASNET_BEGIN_FUNCTION(); int i, success=1; unsigned char *partnerbase2 = (unsigned char *)(partnerseg+300); for (i=0; i < 100; i++) { gasnet_put_val(partner, partnerseg+i, 1000 + mynode + i, sizeof(int)); } for (i=0; i < 100; i++) { gasnet_wait_syncnb(gasnet_put_nb_val(partner, partnerseg+i+100, 1000 + mynode + i, sizeof(int))); } for (i=0; i < 100; i++) { gasnet_put_nbi_val(partner, partnerseg+i+200, 1000 + mynode + i, sizeof(int)); } gasnet_wait_syncnbi_puts(); for (i=0; i < 100; i++) { int tmp1 = gasnet_get_val(partner, partnerseg+i, sizeof(int)); int tmp2 = gasnet_get_val(partner, partnerseg+i+200, sizeof(int)); if (tmp1 != 1000 + mynode + i || tmp2 != 1000 + mynode + i) { MSG("*** ERROR - FAILED INT VALUE TEST 1!!!"); printf("node %i/%i i=%i tmp1=%i tmp2=%i (1000 + mynode + i)=%i\n", (int)gasnet_mynode(), (int)gasnet_nodes(), i, tmp1, tmp2, 1000 + mynode + i); fflush(stdout); success = 0; } } { gasnet_valget_handle_t handles[100]; for (i=0; i < 100; i++) { handles[i] = gasnet_get_nb_val(partner, partnerseg+i+100, sizeof(int)); } for (i=0; i < 100; i++) { int tmp = (int)gasnet_wait_syncnb_valget(handles[i]); if (tmp != 1000 + mynode + i) { MSG("*** ERROR - FAILED INT VALUE TEST 2!!!"); printf("node %i/%i i=%i tmp1=%i (1000 + mynode + i)=%i\n", (int)gasnet_mynode(), (int)gasnet_nodes(), i, tmp, 1000 + mynode + i); fflush(stdout); success = 0; } } } for (i=0; i < 100; i++) { gasnet_put_val(partner, partnerbase2+i, 100 + mynode + i, sizeof(unsigned char)); } for (i=0; i < 100; i++) { gasnet_wait_syncnb(gasnet_put_nb_val(partner, partnerbase2+i+100, 100 + mynode + i, sizeof(unsigned char))); } for (i=0; i < 100; i++) { gasnet_put_nbi_val(partner, partnerbase2+i+200, 100 + mynode + i, sizeof(unsigned char)); } gasnet_wait_syncnbi_puts(); for (i=0; i < 100; i++) { unsigned int tmp1 = (unsigned int)gasnet_get_val(partner, partnerbase2+i, sizeof(unsigned char)); unsigned int tmp2 = (unsigned int)gasnet_get_val(partner, partnerbase2+i+200, sizeof(unsigned char)); if (tmp1 != (unsigned char)(100 + mynode + i) || tmp2 != (unsigned char)(100 + mynode + i)) { MSG("*** ERROR - FAILED CHAR VALUE TEST 1!!!"); printf("node %i/%i i=%i tmp1=%i tmp2=%i (100 + mynode + i)=%i\n", (int)gasnet_mynode(), (int)gasnet_nodes(), i, tmp1, tmp2, 100 + mynode + i); fflush(stdout); success = 0; } } { gasnet_valget_handle_t handles[100]; for (i=0; i < 100; i++) { handles[i] = gasnet_get_nb_val(partner, partnerbase2+i+100, sizeof(unsigned char)); } for (i=0; i < 100; i++) { unsigned int tmp = (unsigned int)gasnet_wait_syncnb_valget(handles[i]); if (tmp != (unsigned char)(100 + mynode + i)) { MSG("*** ERROR - FAILED CHAR VALUE TEST 2!!!"); printf("node %i/%i i=%i tmp1=%i (100 + mynode + i)=%i\n", (int)gasnet_mynode(), (int)gasnet_nodes(), i, tmp, 100 + mynode + i); fflush(stdout); success = 0; } } } if (success) MSG("*** passed value test!!"); } #ifndef TESTGASNET_NO_SPLIT doit4(partner, (int32_t *)partnerseg); } void doit4(int partner, int32_t *partnerseg) { /* int mynode = gasnet_mynode(); UNUSED */ #endif BARRIER(); { /* memset test */ GASNET_BEGIN_FUNCTION(); int i, success=1; int32_t vals[300]; gasnet_memset(partner, partnerseg, 0x55, 100*sizeof(int32_t)); gasnet_wait_syncnb(gasnet_memset_nb(partner, partnerseg+100, 0x66, 100*sizeof(int32_t))); gasnet_memset_nbi(partner, partnerseg+200, 0x77, 100*sizeof(int32_t)); gasnet_wait_syncnbi_puts(); gasnet_get(&vals, partner, partnerseg, 300*sizeof(int32_t)); for (i=0; i < 100; i++) { const int32_t five = 0x55555555; const int32_t six = 0x66666666; const int32_t seven = 0x77777777; if (vals[i] != five) { MSG("*** ERROR - FAILED MEMSET TEST!!!"); success = 0; } if (vals[i+100] != six) { MSG("*** ERROR - FAILED MEMSET TEST!!!"); success = 0; } if (vals[i+200] != seven) { MSG("*** ERROR - FAILED MEMSET TEST!!!"); success = 0; } } if (success) MSG("*** passed memset test!!"); } #ifndef TESTGASNET_NO_SPLIT doit5(partner, (int *)partnerseg); } void doit5(int partner, int *partnerseg) { int mynode = gasnet_mynode(); #endif BARRIER(); /* NB and NBI put/overwrite/get tests */ #define MAXVALS (1024) #define MAXSZ (MAXVALS*8) #define SEGSZ (MAXSZ*4) #define VAL(sz, iter) \ (((uint64_t)(sz) << 32) | ((uint64_t)(100 + mynode) << 16) | ((iter) & 0xFF)) assert(TEST_SEGSZ >= 2*SEGSZ); { GASNET_BEGIN_FUNCTION(); uint64_t *localvals=(uint64_t *)test_malloc(SEGSZ); int success = 1; int i, sz; for (i = 0; i < MAX(1,iters/10); i++) { uint64_t *localpos=localvals; uint64_t *segpos=(uint64_t *)TEST_MYSEG(); uint64_t *rsegpos=(uint64_t *)((char*)partnerseg+SEGSZ); for (sz = 1; sz <= MAXSZ; sz*=2) { gasnet_handle_t handle; int elems = sz/8; int j; uint64_t val = VAL(sz, i); /* setup known src value */ if (sz < 8) { elems = 1; memset(localpos, (val & 0xFF), sz); memset(segpos, (val & 0xFF), sz); memset(&val, (val & 0xFF), sz); } else { for (j=0; j < elems; j++) { localpos[j] = val; segpos[j] = val; } } handle = gasnet_put_nb_bulk(partner, rsegpos, localpos, sz); gasnet_wait_syncnb(handle); handle = gasnet_put_nb(partner, rsegpos+elems, localpos, sz); memset(localpos, 0xCC, sz); /* clear */ gasnet_wait_syncnb(handle); handle = gasnet_put_nb_bulk(partner, rsegpos+2*elems, segpos, sz); gasnet_wait_syncnb(handle); handle = gasnet_put_nb(partner, rsegpos+3*elems, segpos, sz); memset(segpos, 0xCC, sz); /* clear */ gasnet_wait_syncnb(handle); gasnet_wait_syncnb(gasnet_get_nb(localpos, partner, rsegpos, sz)); gasnet_wait_syncnb(gasnet_get_nb_bulk(localpos+elems, partner, rsegpos+elems, sz)); gasnet_wait_syncnb(gasnet_get_nb(segpos, partner, rsegpos+2*elems, sz)); gasnet_wait_syncnb(gasnet_get_nb_bulk(segpos+elems, partner, rsegpos+3*elems, sz)); for (j=0; j < elems*2; j++) { int ok; if (sz < 8) ok = !memcmp(&(localpos[j]), &val, sz); else ok = localpos[j] == val; if (!ok) { MSG("*** ERROR - FAILED OUT-OF-SEG PUT_NB/OVERWRITE TEST!!! sz=%i j=%i (got=%016" PRIx64 " expected=%016" PRIx64 ")", (sz), j, localpos[j], val); success = 0; } if (sz < 8) ok = !memcmp(&(segpos[j]), &val, sz); else ok = segpos[j] == val; if (!ok) { MSG("*** ERROR - FAILED IN-SEG PUT_NB/OVERWRITE TEST!!! sz=%i j=%i (got=%016" PRIx64 " expected=%016" PRIx64 ")", (sz), j, segpos[j], val); success = 0; } } } } test_free(localvals); if (success) MSG("*** passed nb put/overwrite test!!"); } { GASNET_BEGIN_FUNCTION(); uint64_t *localvals=(uint64_t *)test_malloc(SEGSZ); int success = 1; int i, sz; for (i = 0; i < MAX(1,iters/10); i++) { uint64_t *localpos=localvals; uint64_t *segpos=(uint64_t *)TEST_MYSEG(); uint64_t *rsegpos=(uint64_t *)((char*)partnerseg+SEGSZ); for (sz = 1; sz <= MAXSZ; sz*=2) { int elems = sz/8; int j; uint64_t val = VAL(sz, i+91); /* setup known src value, different from NB test */ if (sz < 8) { elems = 1; memset(localpos, (val & 0xFF), sz); memset(segpos, (val & 0xFF), sz); memset(&val, (val & 0xFF), sz); } else { for (j=0; j < elems; j++) { localpos[j] = val; segpos[j] = val; } } gasnet_put_nbi_bulk(partner, rsegpos, localpos, sz); gasnet_wait_syncnbi_puts(); gasnet_put_nbi(partner, rsegpos+elems, localpos, sz); memset(localpos, 0xCC, sz); /* clear */ gasnet_wait_syncnbi_puts(); gasnet_put_nbi_bulk(partner, rsegpos+2*elems, segpos, sz); gasnet_wait_syncnbi_puts(); gasnet_put_nbi(partner, rsegpos+3*elems, segpos, sz); memset(segpos, 0xCC, sz); /* clear */ gasnet_wait_syncnbi_puts(); gasnet_get_nbi(localpos, partner, rsegpos, sz); gasnet_wait_syncnbi_gets(); gasnet_get_nbi_bulk(localpos+elems, partner, rsegpos+elems, sz); gasnet_wait_syncnbi_gets(); gasnet_get_nbi(segpos, partner, rsegpos+2*elems, sz); gasnet_wait_syncnbi_gets(); gasnet_get_nbi_bulk(segpos+elems, partner, rsegpos+3*elems, sz); gasnet_wait_syncnbi_gets(); for (j=0; j < elems*2; j++) { int ok; if (sz < 8) ok = !memcmp(&(localpos[j]), &val, sz); else ok = localpos[j] == val; if (!ok) { MSG("*** ERROR - FAILED OUT-OF-SEG PUT_NBI/OVERWRITE TEST!!! sz=%i j=%i (got=%016" PRIx64 " expected=%016" PRIx64 ")", (sz), j, localpos[j], val); success = 0; } if (sz < 8) ok = !memcmp(&(segpos[j]), &val, sz); else ok = segpos[j] == val; if (!ok) { MSG("*** ERROR - FAILED IN-SEG PUT_NBI/OVERWRITE TEST!!! sz=%i j=%i (got=%016" PRIx64 " expected=%016" PRIx64 ")", (sz), j, segpos[j], val); success = 0; } } } } test_free(localvals); if (success) MSG("*** passed nbi put/overwrite test!!"); } #ifndef TESTGASNET_NO_SPLIT doit6(partner, (int *)partnerseg); } void doit6(int partner, int *partnerseg) { #endif BARRIER(); { /* all ams test */ int i; static int base = 0; for (i=0; i < 10; i++) { ALLAM_REQ(partner); GASNET_BLOCKUNTIL(ALLAM_DONE(base+i+1)); } base += i; MSG("*** passed AM test!!"); } #ifndef TESTGASNET_NO_SPLIT doit7(partner, (int *)partnerseg); } void doit7(int partner, int *partnerseg) { #endif BARRIER(); /* Invoke all the atomics, once each. * This is a compile/link check, used to ensure that clients can link all the * the atomics (especially from c++ when testgasnet is built as textcxx). * This is distinct from testtools, which checks that these "do the right thing". */ #ifndef GASNETT_HAVE_ATOMIC_CAS #define gasnett_atomic_compare_and_swap(a,b,c,d) ((void)0) #define gasnett_atomic_swap(a,b,c) ((void)0) #endif #ifndef GASNETT_HAVE_ATOMIC_ADD_SUB #define gasnett_atomic_add(a,b,c) ((void)0) #define gasnett_atomic_subtract(a,b,c) ((void)0) #endif #ifndef GASNETT_HAVE_STRONGATOMIC_CAS #define gasnett_strongatomic_compare_and_swap(a,b,c,d) ((void)0) #define gasnett_strongatomic_swap(a,b,c) ((void)0) #endif #ifndef GASNETT_HAVE_STRONGATOMIC_ADD_SUB #define gasnett_strongatomic_add(a,b,c) ((void)0) #define gasnett_strongatomic_subtract(a,b,c) ((void)0) #endif #define TEST_ATOMICS(scalar,class) do { \ gasnett_##class##_t val = gasnett_##class##_init(1); \ scalar tmp = gasnett_##class##_read(&val, 0); \ gasnett_##class##_set(&val, tmp, 0); \ gasnett_##class##_increment(&val, 0); \ gasnett_##class##_decrement(&val, 0); \ (void) gasnett_##class##_decrement_and_test(&val, 0); \ (void) gasnett_##class##_compare_and_swap(&val, 0, 1 ,0); \ (void) gasnett_##class##_swap(&val, 1 ,0); \ (void) gasnett_##class##_add(&val, tmp ,0); \ (void) gasnett_##class##_subtract(&val, tmp ,0); \ } while(0) { gasnett_atomic_sval_t stmp = gasnett_atomic_signed((gasnett_atomic_val_t)0); test_mark_used(stmp); TEST_ATOMICS(gasnett_atomic_val_t, atomic); TEST_ATOMICS(gasnett_atomic_val_t, strongatomic); TEST_ATOMICS(uint32_t, atomic32); TEST_ATOMICS(uint32_t, strongatomic32); TEST_ATOMICS(uint64_t, atomic64); TEST_ATOMICS(uint64_t, strongatomic64); } /* Serial tests of optional internal 128-bit atomics have * moved to gasnet_diagnostic.c (run from testinternal). */ BARRIER(); } gasnet-2025.8.0/tests/testexit.c0000664000175000017500000004222615142313673016607 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testexit.c $ * Description: GASNet gasnet_exit correctness test * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int mynode, nodes; int peer = -1; int testid = 0; int use_allnodes = 0; int use_threads = 0; int numpthreads = 4; volatile int signal_bt = 0; #define thread_barrier() PTHREAD_BARRIER(numpthreads) /* test various modes of exiting a GASNet program. Basically, none of these should hang or leave orphaned processes. Those with non-collective exit should cause the SIGQUIT handler to fire on the non-exiting nodes. */ const char *testdesc_seq[] = { "simultaneous collective gasnet_exit(1)", "simultaneous return from main()... exit_code 2", "non-collective gasnet_exit(3), others in barrier", "non-collective SIGINT, others in barrier ... exit_code 4", "non-collective gasnet_exit(5), others in spin-loop", "collective gasnet_exit(6) between init()/attach()", "non-collective gasnet_exit(7) between init()/attach()", "non-collective return(8) from main(), others in barrier", "non-collective return(9) from main(), others in spin-loop", "collective gasnet_exit(10) from AM handlers on all nodes", "non-collective gasnet_exit(11) from AM handler on one node", "non-collective gasnet_exit(12) from AM handler on one node (loopback)", "non-collective gasnet_exit(13) from AM handler on one node (N requests)", "non-collective gasnet_exit(14) following PrepareRequestMedium()", "non-collective gasnet_exit(15) following PrepareReplyMedium()", }; #define NUMTEST_SEQ (sizeof(testdesc_seq)/sizeof(char*)) #define TESTBASE_SEQ 1 const char *testdesc_par[] = { #ifdef GASNET_PAR "collective gasnet_exit(51) from all pthreads on all nodes", "non-collective gasnet_exit(52) from one pthread, other local in barrier", "non-collective gasnet_exit(53) from one pthread, others in spin-loop", "non-collective gasnet_exit(54) from one pthread, others in poll-loop", "non-collective gasnet_exit(55) from one pthread, others sending messages", #define NUMTEST_PAR (sizeof(testdesc_par)/sizeof(char*)) #else NULL #define NUMTEST_PAR 0 #endif }; #define TESTBASE_PAR 51 const char *testid2desc(int testid) { unsigned int maybe_seq = testid - TESTBASE_SEQ; if (maybe_seq < NUMTEST_SEQ) return testdesc_seq[maybe_seq]; unsigned int maybe_par = testid - TESTBASE_PAR; if (maybe_par < NUMTEST_PAR) return testdesc_par[maybe_par]; return "ERROR"; } const char *crashtestdesc[] = { "gasnett_print_backtrace() from main", "gasnett_print_backtrace() from SIGQUIT handler", "gasnett_fatalerror()", "abort()", "segmentation fault", "bus error", "floating-point exception" }; #define NUMCRASHTEST (sizeof(crashtestdesc)/sizeof(char*)) void do_crash_test(int crashid); static char *peerseg; static char *replyseg; #define hidx_exit_handler 201 #define hidx_noop_handler 202 #define hidx_ping_handler 203 #define hidx_npam_handler 204 void test_exit_handler(gex_Token_t token, gex_AM_Arg_t exitcode) { gasnet_exit((int)exitcode); } void ping_handler(gex_Token_t token, void *buf, size_t nbytes) { static int x = 1; x = !x;/* harmless race */ if (x) gex_AM_ReplyMedium0(token, hidx_noop_handler, buf, nbytes, GEX_EVENT_NOW, 0); else gex_AM_ReplyLong0(token, hidx_noop_handler, buf, nbytes, replyseg, GEX_EVENT_NOW, 0); } void noop_handler(gex_Token_t token, void *buf, size_t nbytes) { } void npam_handler(gex_Token_t token, gex_AM_Arg_t exitcode) { gex_AM_SrcDesc_t sd; sd = gex_AM_PrepareReplyMedium(token, NULL, 0, 0, NULL, 0, 0); if (mynode == nodes-1) { gasnet_exit(exitcode); } gex_AM_CommitReplyMedium0(sd, hidx_noop_handler, 0); } #ifdef GASNET_PAR void *workerthread(void *args) { int mythread = (int)(intptr_t)args; thread_barrier(); switch (testid) { case 51: gasnet_exit(testid); break; case 52: if (mynode == 0) { if (mythread == 0) { sleep(1); gasnet_exit(testid); MSG("TEST FAILED!!"); } else if (mythread == 1) BARRIER(); } else { if (mythread == 0) while(1) GASNET_Safe(gasnet_AMPoll()); } while(1) ; break; case 53: if (mynode == 0 && mythread == 0) { sleep(1); gasnet_exit(testid); } else while(1); break; case 54: if (mynode == 0 && mythread == 0) { sleep(1); gasnet_exit(testid); } else while(1) GASNET_Safe(gasnet_AMPoll()); break; case 55: if (mynode == 0 && mythread == 0) { sleep(1); gasnet_exit(testid); } else { int junk = 42; int lim = MIN(MIN(MIN(MIN( gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0), gex_AM_MaxReplyMedium (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0)), gex_AM_MaxRequestLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0)), gex_AM_MaxReplyLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0)), (TEST_SEGSZ / 2)); char *p = malloc(lim); while (1) { switch (rand() % 18) { case 0: GASNET_Safe(gasnet_AMPoll()); break; case 1: gex_AM_RequestMedium0(myteam, peer, hidx_noop_handler, p, 4, GEX_EVENT_NOW, 0); break; case 2: gex_AM_RequestMedium0(myteam, peer, hidx_ping_handler, p, 4, GEX_EVENT_NOW, 0); break; case 3: gex_AM_RequestMedium0(myteam, peer, hidx_noop_handler, p, lim, GEX_EVENT_NOW, 0); break; case 4: gex_AM_RequestMedium0(myteam, peer, hidx_ping_handler, p, lim, GEX_EVENT_NOW, 0); break; case 5: gex_AM_RequestLong0(myteam, peer, hidx_noop_handler, p, 4, peerseg, GEX_EVENT_NOW, 0); break; case 6: gex_AM_RequestLong0(myteam, peer, hidx_ping_handler, p, 4, peerseg, GEX_EVENT_NOW, 0); break; case 7: gex_AM_RequestLong0(myteam, peer, hidx_noop_handler, p, lim, peerseg, GEX_EVENT_NOW, 0); break; case 8: gex_AM_RequestLong0(myteam, peer, hidx_ping_handler, p, lim, peerseg, GEX_EVENT_NOW, 0); break; case 9: gex_RMA_PutBlocking(myteam, peer, peerseg, &junk, sizeof(int), 0); break; case 10: gex_RMA_GetBlocking(myteam, &junk, peer, peerseg, sizeof(int), 0); break; case 11: gex_RMA_PutBlocking(myteam, peer, peerseg, p, lim, 0); break; case 12: gex_RMA_GetBlocking(myteam, p, peer, peerseg, lim, 0); break; case 13: gex_RMA_PutNBI(myteam, peer, peerseg, &junk, sizeof(int), GEX_EVENT_NOW, 0); break; case 14: gex_RMA_GetNBI(myteam, &junk, peer, peerseg, sizeof(int), 0); break; case 15: gex_RMA_PutNBI(myteam, peer, peerseg, p, lim, GEX_EVENT_NOW, 0); break; case 16: gex_RMA_GetNBI(myteam, p, peer, peerseg, lim, 0); break; case 17: gex_NBI_Wait(GEX_EC_ALL,0); break; } } } break; default: if (testid >= 100 && testid < 100+NUMCRASHTEST) { if (mythread == 0) do_crash_test(testid); thread_barrier(); } else { FATALERR("bad test id"); } } /* if we ever reach here, something really bad happenned */ FATALERR("TEST FAILED!!"); return NULL; } #endif typedef void (*test_sighandlerfn_t)(int); void testSignalHandler(int sig) { if (sig != SIGQUIT) { FATALERR("got an unexpected signal!"); } else if (signal_bt == 1) { gasnett_print_backtrace(STDERR_FILENO); signal_bt = 2; return; } else { MSG("in SIGQUIT handler, calling gasnet_exit(4)..."); gasnet_exit(4); } } int main(int argc, char **argv) { #define MAXLINE 255 static char usagestr[MAXLINE*(NUMTEST_SEQ+NUMTEST_PAR+NUMCRASHTEST)]; char testdescstr[MAXLINE]; gex_AM_Entry_t htable[] = { { hidx_exit_handler, (gex_AM_Fn_t)test_exit_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 1 }, { hidx_ping_handler, (gex_AM_Fn_t)ping_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDLONG, 0 }, { hidx_noop_handler, (gex_AM_Fn_t)noop_handler, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_MEDLONG, 0 }, { hidx_npam_handler, (gex_AM_Fn_t)npam_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 1 }, }; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testexit", &argc, &argv, 0)); { int i = 200+NUMCRASHTEST; #ifdef GASNET_PAR i += 200; snprintf(usagestr,sizeof(usagestr), "[-r] (exittestnum:%i..%i,%i..%i | crashtestnum:100..%i) (num_pthreads)", (int)TESTBASE_SEQ, (int)(TESTBASE_SEQ+NUMTEST_SEQ-1), (int)TESTBASE_PAR, (int)(TESTBASE_PAR+NUMTEST_PAR-1), i-1); #else snprintf(usagestr,sizeof(usagestr), "[-r] (exittestnum:%i..%i | crashtestnum:100..%i)", (int)TESTBASE_SEQ, (int)(TESTBASE_SEQ+NUMTEST_SEQ-1), i-1); #endif strcat(usagestr, "\n -r: reverse the node numbering"); strcat(usagestr, "\n\n Exit tests:\n"); for (i = 0; i < NUMTEST_SEQ; i++) { char tmp[MAXLINE]; snprintf(tmp,MAXLINE," %3i: %s\n", i+TESTBASE_SEQ, testdesc_seq[i]); strcat(usagestr, tmp); } for (i = 0; i < NUMTEST_PAR; i++) { char tmp[MAXLINE]; snprintf(tmp,MAXLINE," %3i: %s\n", i+TESTBASE_PAR, testdesc_par[i]); strcat(usagestr, tmp); } strcat(usagestr, "\n Crash tests: (add 100 to activate all nodes"); #ifdef GASNET_PAR strcat(usagestr,", add 200 to use multiple threads"); #endif strcat(usagestr, ")\n"); for (i = 0; i < NUMCRASHTEST; i++) { char tmp[MAXLINE]; snprintf(tmp,MAXLINE," %3i: %s\n", i+100, crashtestdesc[i]); strcat(usagestr, tmp); } } test_init_early("testexit",0,usagestr); mynode = gex_TM_QueryRank(myteam); nodes = gex_TM_QuerySize(myteam); argv++; argc--; if (argc > 0 && !strcmp(*argv, "-r")) { mynode = nodes-(mynode+1); argv++; argc--; } if (argc > 0) { testid = atoi(*argv); argv++; argc--; } #ifdef GASNET_PAR if (argc > 0) { numpthreads = atoi(*argv); argv++; argc--; } numpthreads = test_thread_limit(numpthreads); #endif unsigned int maybe_seq = testid - TESTBASE_SEQ; unsigned int maybe_par = testid - TESTBASE_PAR; if (argc > 0 || testid <= 0 || ((testid < 100) && (maybe_seq >= NUMTEST_SEQ) && (maybe_par >= NUMTEST_PAR)) || numpthreads <= 1) test_usage_early(); peer = (mynode + 1) % nodes; if (testid < 100) { snprintf(testdescstr, sizeof(testdescstr), "Running exit test %i: %s",testid, testid2desc(testid)); } else { int dispid = testid; const char *thread = "", *node = ""; #ifdef GASNET_PAR if (testid >= 300) { thread = ", from one pthread w/others in thread barrier"; testid -= 200; use_threads = 1; } #endif if (testid >= 200) { node = ", with all nodes active"; testid -= 100; use_allnodes = 1; } if (testid < 100 || testid >= 100+NUMCRASHTEST) test_usage_early(); snprintf(testdescstr, sizeof(testdescstr), "Running crash test %i: %s%s%s",dispid, crashtestdesc[testid-100],thread,node); } if (testid == 6 || testid == 7) { PUTS0(testdescstr); gasnett_sched_yield(); sleep(1); if (testid == 6) { gasnet_exit(testid); FATALERR("gasnet_exit failed"); } else if (testid == 7 && mynode == nodes - 1) { gasnet_exit(testid); FATALERR("gasnet_exit failed"); } } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); /* register a SIGQUIT handler, as permitted by GASNet spec */ gasnett_reghandler(SIGQUIT, testSignalHandler); peerseg = TEST_SEG(peer); replyseg = (char *)TEST_SEG((mynode + nodes - 1) % nodes) + (TEST_SEGSZ / 2); BARRIER(); PUTS0(testdescstr); BARRIER(); switch (testid) { case 1: gasnet_exit(testid); break; case 2: return testid; break; case 3: if (mynode == nodes-1) { sleep(1); gasnet_exit(testid); } else BARRIER(); break; case 4: if (mynode == nodes-1) { sleep(1); /*raise(SIGINT); */ kill(getpid(), SIGINT); /* more reliable */ while (1) gasnett_sched_yield(); /* await delivery */ } else BARRIER(); break; case 5: if (mynode == nodes-1) { sleep(1); gasnet_exit(testid); } else while(1); break; case 8: if (mynode == nodes-1) { sleep(1); return testid; } else BARRIER(); break; case 9: if (mynode == nodes-1) { sleep(1); return testid; } else while(1); break; case 10: gex_AM_RequestShort1(myteam, peer, hidx_exit_handler, 0, testid); while(1) GASNET_Safe(gasnet_AMPoll()); break; case 11: if (mynode == 0) { gex_AM_RequestShort1(myteam, nodes-1, hidx_exit_handler, 0, testid); } while(1) GASNET_Safe(gasnet_AMPoll()); break; case 12: if (mynode == nodes-1) { gex_AM_RequestShort1(myteam, mynode, hidx_exit_handler, 0, testid); } while(1) GASNET_Safe(gasnet_AMPoll()); break; case 13: gex_AM_RequestShort1(myteam, nodes-1, hidx_exit_handler, 0, testid); while(1) GASNET_Safe(gasnet_AMPoll()); break; case 14: { gex_AM_SrcDesc_t sd; sd = gex_AM_PrepareRequestMedium(myteam, peer, NULL, 0, 0, NULL, 0, 0); if (mynode == nodes-1) { gasnet_exit(testid); } gex_AM_CommitRequestMedium0(sd, hidx_noop_handler, 0); while(1) GASNET_Safe(gasnet_AMPoll()); break; } case 15: gex_AM_RequestShort1(myteam, peer, hidx_npam_handler, 0, testid); while(1) GASNET_Safe(gasnet_AMPoll()); break; default: #ifdef GASNET_PAR if ((testid >= TESTBASE_PAR) && (testid < TESTBASE_PAR + NUMTEST_PAR)) { test_createandjoin_pthreads(numpthreads, &workerthread, NULL, 0); } #endif if (testid >= 100 && testid < 100+NUMCRASHTEST) { #ifdef GASNET_PAR if (use_threads) { test_createandjoin_pthreads(numpthreads, &workerthread, NULL, 0); } else #endif do_crash_test(testid); } else { FATALERR("bad test id: %i", testid); } } /* if we ever reach here, something really bad happenned */ FATALERR("TEST FAILED!!"); return 0; } void do_crash_test(int crashid) { switch(crashid) { case 100: if (use_allnodes || mynode == nodes-1) { sleep(1); gasnett_print_backtrace(STDERR_FILENO); } BARRIER(); gasnet_exit(0); break; case 101: if (use_allnodes || mynode == nodes-1) { sleep(1); signal_bt = 1; kill(getpid(), SIGQUIT); while (signal_bt != 2) gasnett_sched_yield(); /* await delivery */ } else BARRIER(); BARRIER(); gasnet_exit(0); break; case 102: if (use_allnodes || mynode == nodes-1) { gasnett_fatalerror("Synthetic fatal error"); FATALERR("gasnett_fatalerror FAILED!!"); } BARRIER(); break; case 103: if (use_allnodes || mynode == nodes-1) { abort(); FATALERR("abort() FAILED!!"); } BARRIER(); break; case 104: if (use_allnodes || mynode == nodes-1) { static char volatile *p = NULL; *p = *p + 10; FATALERR("Failed to generate a segmentation fault"); } BARRIER(); break; case 105: if (use_allnodes || mynode == nodes-1) { static uint64_t myarr[3]; static char *p = ((char *)(myarr+1))+1; *(uint16_t volatile *)p = *(uint16_t volatile *)p + 10; *(uint32_t volatile *)p = *(uint32_t volatile *)p + 10; *(uint64_t volatile *)p = *(uint64_t volatile *)p + 10; *(float volatile *)p = *(float volatile *)p + 10; *(double volatile *)p = *(double volatile *)p + 10; gasnett_sched_yield(); sleep(1); MSG("Failed to generate implicit SIGBUS, trying raise(SIGBUS).."); raise(SIGBUS); gasnett_sched_yield(); sleep(1); MSG("Failed to generate implicit SIGBUS, trying kill(%li,SIGBUS)..",(long)getpid()); kill(getpid(), SIGBUS); gasnett_sched_yield(); sleep(1); FATALERR("Failed to generate a bus error"); } BARRIER(); break; case 106: if (use_allnodes || mynode == nodes-1) { static double volatile d = 0.0; static int volatile i = 0; d = 16.0 / d; d = 1.0E30; for (;i < 100;i++) d *= d; d = 1.0; for (;i < 1000;i++) d /= 1.0E30; i = 16 / i; gasnett_sched_yield(); sleep(1); MSG("Failed to generate implicit SIGFPE, trying raise(SIGFPE).."); raise(SIGFPE); gasnett_sched_yield(); sleep(1); MSG("Failed to generate implicit SIGFPE, trying kill(%li,SIGFPE)..",(long)getpid()); kill(getpid(), SIGFPE); gasnett_sched_yield(); sleep(1); FATALERR("Failed to generate a floating-point exception"); } BARRIER(); break; default: FATALERR("bad test id: %i", crashid); } } gasnet-2025.8.0/tests/testrand.c0000664000175000017500000001001515142313673016551 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testrand.c $ * Description: GASNet get/put performance test * measures measures the total time to write to each page of the * remote test segment, using blocking puts in a random order. * This is meant to measure the cost of dynamic pinning. * Copyright 2002-4, Jaein Jeong and Dan Bonachea * Terms of use are as specified in license.txt */ /************************************************************ testrand.c: measures the cost of randomly ordered writes to the remote segment to stress test dynamic pinning. *************************************************************/ #include uintptr_t maxsz = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR ((uintptr_t)maxsz) #endif #include "test.h" static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int myproc; int numprocs; int peerproc; unsigned int seed = 0; size_t nbytes = 8; void *remmem; void *locmem; #undef rem_addr /* AIX 5.3 header bug */ void do_test(void) {GASNET_BEGIN_FUNCTION(); size_t i; int64_t begin, end; int iamsender = (myproc % 2 == 0); size_t pagesz = MAX(PAGESZ, nbytes); size_t pages = maxsz / pagesz; void **loc_addr = test_malloc(pages * sizeof(void *)); void **rem_addr = test_malloc(pages * sizeof(void *)); if (iamsender) { /* create in-order arrays of page addresses */ for (i = 0; i < pages; ++i) { loc_addr[i] = (void *)((uintptr_t)locmem + (i * pagesz)); rem_addr[i] = (void *)((uintptr_t)remmem + (i * pagesz)); } /* permute the arrays separately */ for (i = 0; i < pages - 1; ++i) { size_t j; void *tmp; j = TEST_RAND(0,pages - 1 - i); tmp = loc_addr[i+j]; loc_addr[i+j] = loc_addr[i]; loc_addr[i] = tmp; j = TEST_RAND(0,pages - 1 - i); tmp = rem_addr[i+j]; rem_addr[i+j] = rem_addr[i]; rem_addr[i] = tmp; } } BARRIER(); if (iamsender) { GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__); begin = TIME(); for (i = 0; i < pages; ++i) { gex_RMA_PutBlocking(myteam, peerproc, rem_addr[i], loc_addr[i], nbytes, 0); } end = TIME(); printf("Proc %3i - %5"PRIuSZ" bytes, seed %10u, %7"PRIuSZ" pages: %12"PRIi64" us total, %9.3f us ave. per page\n", myproc, nbytes, seed, pages, (end-begin), ((double)(end-begin))/pages); fflush(stdout); sleep(1); } BARRIER(); test_free(loc_addr); test_free(rem_addr); } int main(int argc, char **argv) { /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testrand", &argc, &argv, 0)); /* parse arguments */ if (argc > 1) nbytes = atol(argv[1]); if (argc > 2) { maxsz = atol(argv[2]); maxsz = MAX(maxsz, nbytes); maxsz = alignup(maxsz, PAGESZ); } else maxsz = 1024*1024; if (argc > 3) seed = atoi(argv[3]); if (!seed) seed = (int)TIME(); TEST_SRAND(seed); #ifdef GASNET_SEGMENT_EVERYTHING if (maxsz > TEST_SEGSZ) { MSG("maxsz must be <= %"PRIuPTR" on GASNET_SEGMENT_EVERYTHING",(uintptr_t)TEST_SEGSZ); gasnet_exit(1); } #endif GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); test_init("testrand",1, "nbytes (segsz) (seed)"); if ((argc < 2) || (argc > 4)) test_usage(); /* get SPMD info */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); /* Only allow even number for numprocs */ if (numprocs % 2 != 0) { MSG0("WARNING: This test requires an even number of nodes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harnesses for smp-conduit */ } /* Setting peer thread rank */ peerproc = (myproc % 2) ? (myproc - 1) : (myproc + 1); remmem = (void *) TEST_SEG(peerproc); locmem = (void *) TEST_MYSEG(); do_test(); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testtoolscxx.cc0000664000175000017500000000041215142313673017653 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testtoolscxx.cc $ * Description: General GASNet correctness tests in C++ * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include "testtools.c" gasnet-2025.8.0/tests/testteambcast.c0000664000175000017500000001476115142313673017604 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testteambcast.c $ * See license.txt for terms * Rajesh Nishtala and Yili Zheng */ /* Description: basic GASNet team implementation test, team barrier test, and team broadcast test. Column teams and row teams of a process grid are created and team barriers are performed on these teams. */ #include #include #define MAX_SIZE 8192 #define SCRATCH_SIZE (4*1024*1024) #define COLL_BUFF_SIZE (SIZEOF_INT * MAX_SIZE) #define TEST_SEGSZ (SCRATCH_SIZE + 2*COLL_BUFF_SIZE) #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int main(int argc, char **argv) { int iters=0; int64_t start,total; gex_Rank_t nrows, ncols, my_row, my_col; gex_TM_t my_row_tm, my_col_tm; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testteambcast", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); uint8_t *A = TEST_MYSEG(); uint8_t *B = A + SCRATCH_SIZE; uint8_t *C = B + COLL_BUFF_SIZE; int *SrcArray = (int*) B; int *DstArray = (int*) C; test_init("testteambcast", 1, "(nrows) (ncols) (iters)"); gex_Rank_t mynode = gex_TM_QueryRank(myteam); gex_Rank_t nodes = gex_TM_QuerySize(myteam); if (argc > 4) test_usage(); if (argc > 1) { nrows = atoi(argv[1]); } else { nrows = 1 + !(nodes & 1); /* 1 if odd, 2 if even */ } if (argc > 2) { ncols = atoi(argv[2]); } else { ncols = nodes / nrows; } assert_always(nrows*ncols == nodes); if (argc > 3) iters = atoi(argv[3]); if (!iters) iters = 20; if (mynode == 0) { printf("Running team test with a %u-by-%u grid and %i iterations...\n", nrows, ncols, iters); fflush(stdout); } BARRIER(); my_row = mynode / ncols; my_col = mynode % ncols; struct { uint8_t *addr; size_t size; } teamA_scratch, teamB_scratch; { uint8_t *addr = A; uintptr_t size = SCRATCH_SIZE / 2; assert_always(size >= 4096); // some non-trivial (non-zero) size teamA_scratch.addr = addr; teamA_scratch.size = size; teamB_scratch.addr = addr + size; teamB_scratch.size = size; } gex_TM_Split(&my_row_tm, myteam, my_row, my_col, teamA_scratch.addr, teamA_scratch.size, 0); gex_TM_Split(&my_col_tm, myteam, my_col, my_row, teamB_scratch.addr, teamB_scratch.size, 0); if (my_col == 0) { printf("row team %u: Running team barrier test with row teams...\n", my_row); fflush(stdout); } BARRIER(); start = TIME(); for (int i=0; i < iters*10; i++) { gex_Event_Wait(gex_Coll_BarrierNB(my_row_tm, 0)); } total = TIME() - start; if (my_col == 0) { printf("row team %u: total time: %8.3f sec, avg row team Barrier latency: %8.3f us\n", my_row, ((float)total)/1000000, ((float)total)/(iters*10)); fflush(stdout); } if (my_row == 0) { printf("col team %u: Running team barrier test with column teams...\n", my_col); fflush(stdout); } BARRIER(); start = TIME(); for (int i=0; i < iters*10; i++) { gex_Event_Wait(gex_Coll_BarrierNB(my_col_tm, 0)); } total = TIME() - start; if (my_row == 0) { printf("col team %u: total time: %8.3f sec Avg column team Barrier latency: %8.3f us\n", my_col, ((float)total)/1000000, ((float)total)/(iters*10)); fflush(stdout); } BARRIER(); /*first do team0 broadcast*/ for (size_t sz = 1; sz<=MAX_SIZE; sz=sz*2) { int root = 0; for (int i=0; i %d %d (expecting %d)\n", mynode, i, DstArray[i], expected); gasnet_exit(1); } } BARRIER(); /*time this*/ start = TIME(); for (int i=0; i %"PRIuPTR" byte broadcast team all time: %8.3f usec\n",mynode,(uintptr_t)sz*sizeof(int), ((float)total)/(iters)); fflush(stdout); } } BARRIER(); /*next do row broadcasts*/ for (size_t sz = 1; sz<=MAX_SIZE; sz=sz*2) { for (int i=0; i %d %d (expecting %d)\n", mynode, i, DstArray[i], expected); gasnet_exit(1); } } BARRIER(); /*time this*/ start = TIME(); for (int i=0; i %"PRIuPTR" byte broadcast row team %u time: %8.3f usec\n",mynode,(uintptr_t)sz*sizeof(int), my_row, ((float)total)/(iters)); fflush(stdout); } } BARRIER(); /*next do col broadcasts*/ for (size_t sz = 1; sz<=MAX_SIZE; sz=sz*2) { for (int i=0; i %d %d (expecting %d)\n", mynode, i, DstArray[i], expected); gasnet_exit(1); } } BARRIER(); /*time this*/ start = TIME(); for (int i=0; i %"PRIuPTR" byte broadcast col team %u time: %8.3f usec\n",mynode,(uintptr_t)sz*sizeof(int), my_col, ((float)total)/(iters)); fflush(stdout); } } gex_TM_Destroy(my_row_tm, NULL, 0); gex_TM_Destroy(my_col_tm, NULL, 0); BARRIER(); MSG("done."); gasnet_exit(0); /* for faster exit */ return 0; } gasnet-2025.8.0/tests/testhsl.c0000664000175000017500000001520715142313673016423 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testhsl.c $ * Description: GASNet HSL correctness test * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int peer = -1; int flag = 0; uint64_t iters = 100; gex_HSL_t globallock = GEX_HSL_INITIALIZER; void okhandler3(gex_Token_t token) { gex_HSL_Lock(&globallock); flag++; gex_HSL_Unlock(&globallock); } void badhandler1(gex_Token_t token) { gex_HSL_Lock(&globallock); } void badhandler2(gex_Token_t token) { gex_HSL_Lock(&globallock); gex_AM_ReplyShort0(token, 250, 0); } uint64_t counter = 0; void increq(gex_Token_t token) { gex_HSL_Lock(&globallock); counter++; gex_HSL_Unlock(&globallock); gex_AM_ReplyShort0(token, 222, 0); } gex_HSL_t replock = GEX_HSL_INITIALIZER; uint64_t repcounter = 0; void increp(gex_Token_t token) { gex_HSL_Lock(&replock); repcounter++; gex_HSL_Unlock(&replock); } void donothing(gex_Token_t token) { } #if GASNET_PAR int NUM_THREADS = 4; void * thread_fn(void *arg); #endif int main(int argc, char **argv) { int mynode, nodes; gex_AM_Entry_t htable[] = { { 203, (gex_AM_Fn_t)okhandler3, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 }, { 221, (gex_AM_Fn_t)increq, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 }, { 222, (gex_AM_Fn_t)increp, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_SHORT, 0 }, { 231, (gex_AM_Fn_t)badhandler1, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 }, { 232, (gex_AM_Fn_t)badhandler2, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 }, { 250, (gex_AM_Fn_t)donothing, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 } }; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testhsl", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testhsl",0,"(0|errtestnum:1..16)"); mynode = gex_TM_QueryRank(myteam); nodes = gex_TM_QuerySize(myteam); peer = (mynode + 1) % nodes; if (argc < 2) test_usage(); { int errtest = atoi(argv[1]); gex_HSL_t lock1 = GEX_HSL_INITIALIZER; gex_HSL_t lock2; gex_HSL_Init(&lock2); MSG0("testing legal local cases..."); gex_HSL_Lock(&lock1); gex_HSL_Lock(&lock2); assert(mynode == gex_TM_QueryRank(myteam)); assert(nodes == gex_TM_QuerySize(myteam)); gex_HSL_Unlock(&lock2); gex_HSL_Unlock(&lock1); assert_always(gex_HSL_Trylock(&lock1) == GASNET_OK); gex_HSL_Unlock(&lock1); BARRIER(); MSG0("testing legal AM cases..."); gex_AM_RequestShort0(myteam, peer, 203, 0); GASNET_BLOCKUNTIL(flag == 1); BARRIER(); if (errtest) { int dummy = 0; MSG0("testing illegal case %i...", errtest); switch(errtest) { case 1: gex_HSL_Init(&lock1); break; case 2: gex_HSL_Destroy(&lock1); gex_HSL_Destroy(&lock1); break; case 3: gex_HSL_Unlock(&lock1); break; case 4: gex_HSL_Lock(&lock1); gex_HSL_Lock(&lock2); gex_HSL_Unlock(&lock1); break; case 5: gex_HSL_Lock(&lock1); gex_HSL_Lock(&lock1); break; case 6: dummy += gex_HSL_Trylock(&lock1); dummy += gex_HSL_Trylock(&lock1); break; case 7: gex_HSL_Lock(&lock1); gasnet_AMPoll(); break; case 8: gex_AM_RequestShort0(myteam, mynode, 231, 0); GASNET_BLOCKUNTIL(0); break; case 9: gex_AM_RequestShort0(myteam, mynode, 232, 0); GASNET_BLOCKUNTIL(0); break; case 10: gex_HSL_Lock(&lock1); gex_AM_RequestShort0(myteam, mynode, 250, 0); gex_HSL_Unlock(&lock1); break; case 11: gex_HSL_Lock(&lock1); sleep(2); gex_HSL_Unlock(&lock1); goto done; break; case 12: dummy += gex_HSL_Trylock(&lock1); sleep(2); gex_HSL_Unlock(&lock1); goto done; break; default: ERR("bad err test num."); test_usage(); } FATALERR("FAILED: err test failed."); } else { #if GASNET_PAR MSG0("Spawning pthreads..."); NUM_THREADS = test_thread_limit(NUM_THREADS); test_createandjoin_pthreads(NUM_THREADS, &thread_fn, NULL, 0); #endif } } done: BARRIER(); MSG0("done."); BARRIER(); gasnet_exit(0); return 0; } #if GASNET_PAR #undef MSG0 #undef ERR #define MSG0 THREAD_MSG0(id) #define ERR THREAD_ERR(id) void * thread_fn(void *arg) { int id = (int)(uintptr_t)arg; uint64_t iters2 = iters*100; uint64_t i; counter = 0; repcounter = 0; PTHREAD_BARRIER(NUM_THREADS); MSG0("hsl exclusion test, local-only..."); for (i=0;i * Terms of use are as specified in license.txt * * Description: GASNet Core Monotonic checksum test * This stress tests the ability of the core to successfully send * AM Requests/Replies through get and/or put functions. * * Get version: * 1. Node A generates 'n' random seeds and keeps a local checksum for each * . .(barrier) * 2. Node B gets the 'n' seeds from Node A and keeps its checksum for each * . .(barrier) * 3. Node A gets the checksum hashes from Node B and compares them against * its own copy once the gets are sync'd * * Put version: * Steps 2 and 3 are puts for each other node. */ #include "test.h" #define DEBUG_TRACE #define CHKSUM_LENGTH 8 #define CHKSUM_NUM 64 #define CHKSUM_TOTAL CHKSUM_LENGTH*CHKSUM_NUM #define TESTSafe(x, msg) do { \ if (!(x)) { printf msg; gasnet_exit(1); } } while (0) typedef struct { uint32_t seed; unsigned char chksum[CHKSUM_TOTAL]; } monoseed_t; monoseed_t *_mseed; static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int myproc; int numproc; int peerproc; int numprocs; gasnet_seginfo_t *seginfo_table; /* Test specific globals */ int chksum_iters = 0; gasnett_atomic_t chksum_success = gasnett_atomic_init(0); gasnett_atomic_t chksum_received = gasnett_atomic_init(0); #define CHKSUM_DUMP(chksum) do { \ int i = 0; \ uint8_t *c = (uint8_t *)chksum; \ printf("0x"); \ for (i = 0; i < CHKSUM_TOTAL; i++) \ printf("%0x", c[i]); \ } while (0); #ifdef VERBOSE void monoseed_trace(int iter, int seed, void *chksum_loc, void *chksum_rem) { printf("%d> iter=%4d, seed=%12d, chksum_local=", myproc, iter, seed); CHKSUM_DUMP(chksum_loc); if (chksum_rem != NULL) { printf(" chksum_remote="); CHKSUM_DUMP(chksum_rem); } printf("\n"); fflush(stdout); } #else #define monoseed_trace(iter, seed, chksum_loc, chksum_rem) #endif void chksum_gen(int seed, void *buf) { int i; uint64_t chksum; uint8_t *p = buf; chksum = test_checksum((void *)&seed, 4); for (i = 0; i < CHKSUM_NUM; i++) { chksum = test_checksum((void *)&chksum, CHKSUM_LENGTH); memcpy(p, &chksum, CHKSUM_LENGTH); p += CHKSUM_LENGTH; } return; } void monoseed_init(int num) { int i; if (myproc % 2 == 0) { _mseed = (monoseed_t *) test_malloc(sizeof(monoseed_t) * num); srand((int)TIME()); for (i = 0; i < num; i++) { _mseed[i].seed = (int) rand() + 1; chksum_gen(_mseed[i].seed, &_mseed[i].chksum); } } return; } void chksum_test(int iters) { int i; int iamsender, iamreceiver; int received; #ifdef VERBOSE int nloop = 0; #endif iamsender = (myproc % 2 == 0); iamreceiver = !iamsender; BARRIER(); if (iamsender) { for (i = 0; i < iters; i++) gex_AM_RequestShort2(myteam, (gex_Rank_t)peerproc, 201, 0, i, _mseed[i].seed); } while ( (received = gasnett_atomic_read(&chksum_received,0)) < iters ) { /* if (iamreceiver) { if (received % 5 == 0) { printf("sleep 1\n"); sleep(1); } } */ #ifdef VERBOSE nloop++; if (nloop % 1000 == 0) { printf("TEST[%d] nloop = %d chksum_received = %d\n", myproc,nloop,received); } #endif gasnet_AMPoll(); } #ifdef VERBOSE printf("TEST[%d] COMPLETE: nloop = %d chksum_received = %d\n", myproc,nloop,received); #endif BARRIER(); if (iamsender) { int success = gasnett_atomic_read(&chksum_success,0); printf("chksum_test(%d) passed %d/%d\n", chksum_iters, success, received); } } /* * Format is * AMRequestShort2(dest, chksum_reqh, i, seed) * * chksum_reqh(i, seed) generates the checksum and replies with a Medium * * AMReplyMedium(token, chksum_reph, src, nbytes, i) * * chksum_reph(i, src, nbytes) compares src[nbytes] to its copy of the * checksum at i */ void chksum_reqh(gex_Token_t token, gex_AM_Arg_t iter, gex_AM_Arg_t seed) { unsigned char chksum_reqbuf[CHKSUM_TOTAL]; gasnett_atomic_increment(&chksum_received, 0); chksum_gen(seed, &chksum_reqbuf); monoseed_trace(iter, seed, &chksum_reqbuf, NULL); GASNET_Safe( gex_AM_ReplyMedium1(token, 202, &chksum_reqbuf, CHKSUM_TOTAL, GEX_EVENT_NOW, 0, iter)); return; } void chksum_reph(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t iter) { gasnett_atomic_increment(&chksum_received, 0); assert_always(iter < chksum_iters && iter >= 0); assert_always(nbytes == CHKSUM_TOTAL); monoseed_trace(iter, _mseed[iter].seed, &_mseed[iter].chksum, buf); if (memcmp(&_mseed[iter].chksum, buf, CHKSUM_LENGTH) == 0) gasnett_atomic_increment(&chksum_success, 0); else { printf("iter %3d failed! chksum_local=", (int)iter); CHKSUM_DUMP(&_mseed[iter].chksum); printf(" chksum_remote="); CHKSUM_DUMP(buf); printf("\n"); } return; } /* Test handlers */ int main(int argc, char **argv) { int iters = 0; gex_AM_Entry_t htable[] = { { 201, (gex_AM_Fn_t)chksum_reqh, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 2 }, { 202, (gex_AM_Fn_t)chksum_reph, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_MEDIUM, 1 } }; /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testcore1", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testcore1",0,"(iters)"); assert(CHKSUM_TOTAL <= gex_AM_LUBReplyMedium()); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 1000; if (argc > 2) test_usage(); /* get SPMD info */ chksum_iters = iters; myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); /* Only allow even number for numprocs */ if (numprocs % 2 != 0) { MSG0("WARNING: This test requires an even number of nodes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harnesses for smp-conduit */ } peerproc = (myproc % 2) ? myproc-1 : myproc+1; seginfo_table = (gasnet_seginfo_t *) test_malloc(sizeof(gasnet_seginfo_t) * numprocs); printf("%d> starting monoseed_init(%d)\n", myproc, iters); monoseed_init(iters); printf("%d> starting chksums_test(%d)\n", myproc, iters); chksum_test(iters); gasnet_exit(0); return(0); } gasnet-2025.8.0/tests/testsegment.c0000664000175000017500000003467115142313673017305 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testsegment.c $ * Copyright (c) 2020, The Regents of the University of California * * Description: GASNet "disaggregated Attach" test. * * This test binds a segment to a primordial endpoint using * gex_Segment_Create(), gex_EP_BindSegment(), and gex_EP_PublishBoundSegment() * rather than gex_Segment_Attach(), performing RMA, AM and VIS operations * to verify correctness. */ // WARNING: This test exercises an EXPERIMENTAL feature. // One should not clone the logic in this test as a template for use of the // gex_Segment_Create, gex_EP_BindSegment, and gex_EP_PublishBoundSegment APIs #include #include // Unused #ifndef TEST_SEGSZ #define TEST_SEGSZ PAGESZ #endif #include // ------------------------------------------------------------------------------------ static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Rank_t myrank, nranks; // ------------------------------------------------------------------------------------ // NOT fully general, but sufficient for this test #if PLATFORM_ARCH_32 #define PTR_NARGS 1 #define PTR_ARGS gex_AM_Arg_t arg0 #define PTR_PACK(ptr) ((gex_AM_Arg_t)(ptr)) #define PTR_UNPACK() ((void *)arg0) #elif PLATFORM_ARCH_64 #define PTR_NARGS 2 #define PTR_ARGS gex_AM_Arg_t arg0, gex_AM_Arg_t arg1 #define PTR_PACK(ptr) ((gex_AM_Arg_t)TEST_HIWORD(ptr)), \ ((gex_AM_Arg_t)TEST_LOWORD(ptr)) #define PTR_UNPACK() ((void *)((((uint64_t)(arg0)) << 32) | \ (((uint64_t)(arg1)) & 0xFFFFFFFF))) #endif // ------------------------------------------------------------------------------------ static volatile int ping_rcvd = 0; static volatile int pong_rcvd = 0; #define hidx_ping 200 #define hidx_pong 201 static void ping_handler(gex_Token_t token, void *buf, size_t nbytes, PTR_ARGS) { assert_always(! ping_rcvd); ping_rcvd = 1; // Payload value is our jobrank, address is in the handler arg(s) gex_AM_ReplyLong0(token, hidx_pong, &myrank, sizeof(gex_Rank_t), PTR_UNPACK(), GEX_EVENT_NOW, 0); } static void pong_handler(gex_Token_t token, void *buf, size_t nbytes) { assert_always(! pong_rcvd); pong_rcvd = 1; } // handler table gex_AM_Entry_t htable[] = { { hidx_ping, (gex_AM_Fn_t)ping_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, PTR_NARGS }, { hidx_pong, (gex_AM_Fn_t)pong_handler, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_LONG, 0 } }; #define HANDLER_TABLE_SIZE (sizeof(htable)/sizeof(gex_AM_Entry_t)) // ------------------------------------------------------------------------------------ int main(int argc, char **argv) { int seedoffset = 0; int client_segment = 1; int random_segment = 0; int page_align = 0; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testsegment", &argc, &argv, 0)); int help = 0; int argi = 1; while (argc > argi) { if (!strcmp(argv[argi], "-client-seg")) { client_segment = 1; ++argi; } else if (!strcmp(argv[argi], "-gasnet-seg")) { client_segment = 0; ++argi; } else if (!strcmp(argv[argi], "-random-seg")) { random_segment = 1; ++argi; } else if (!strcmp(argv[argi], "-page-align")) { page_align = 1; ++argi; } else if (!strcmp(argv[argi], "-no-page-align")) { page_align = 0; ++argi; } else if (argv[argi][0] == '-') { help = 1; ++argi; } else break; } test_init("testsegment", 0, "[options] (seed)\n" " Segment allocation options:\n" " -client-seg: Test client-allocated segments (default)\n" " -gasnet-seg: Test GASNet-allocated segments\n" " -random-seg: Test with a random mix of the two options above\n" " Segment alignment options:\n" " -no-page-align: Use unaligned address and length (default)\n" " -page-align: Use page-aligned adddress and length\n" " seed seed offset for PRNG \n"); if (argi < argc) { seedoffset = atoi(argv[argi]); argi++; } if (argi < argc || help) test_usage(); myrank = gex_TM_QueryRank(myteam); nranks = gex_TM_QuerySize(myteam); if (seedoffset == 0) { seedoffset = (((unsigned int)TIME()) & 0xFFFF); // TEST_BCAST() requires a gex_Segment_Attach() call, which we intentionally omit gex_Event_Wait(gex_Coll_BroadcastNB(myteam, 0, &seedoffset, &seedoffset, sizeof(seedoffset), 0)); } TEST_SRAND(myrank+seedoffset); MSG0("Running segment bind/publish test with %saligned address and length, seed=%d", page_align?"page-":"un", seedoffset); if (random_segment) { client_segment = TEST_RAND_ONEIN(2); MSG("This process using a %s-allocated segment", client_segment?"client":"gasnet"); } else { MSG0("Using %s-allocated segment on all processes", client_segment?"client":"gasnet"); } GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); { unsigned int offset = page_align ? 0 : 16; #if MISSING_MULTI_SEGMENT_SUPPORT int have_gseg = !client_segment; int have_cseg = client_segment; #else int have_gseg = 1; int have_cseg = 1; #endif // Test creation of a GASNet-allocated segment gex_Segment_t g_segment = GEX_SEGMENT_INVALID; if (have_gseg) { size_t g_segment_size = GASNET_PAGESIZE - offset; GASNET_Safe(gex_Segment_Create(&g_segment, myclient, NULL, g_segment_size, GEX_MK_HOST, 0)); if ((g_segment == GEX_SEGMENT_INVALID) || (gex_Segment_QueryAddr(g_segment) == NULL) || (gex_Segment_QuerySize(g_segment) < g_segment_size)) { ERR("FAILED GASNET-ALLOCATED SEGMENT CREATE TEST"); } } // Test creation of a client-allocated segment // TODO: should also cover client allocation from mmap(), stack and static data. gex_Segment_t c_segment = GEX_SEGMENT_INVALID; uint8_t *c_segment_addr = NULL; size_t c_segment_size = 0; if (have_cseg) { uint8_t *c_segment_mem = (uint8_t *) test_malloc(GASNET_PAGESIZE); c_segment_addr = c_segment_mem + offset; c_segment_size = GASNET_PAGESIZE - 2*offset; GASNET_Safe(gex_Segment_Create(&c_segment, myclient, c_segment_addr, c_segment_size, GEX_MK_HOST, 0)); if ((c_segment == GEX_SEGMENT_INVALID) || (gex_Segment_QueryAddr(c_segment) != c_segment_addr) || (gex_Segment_QuerySize(c_segment) != c_segment_size)) { ERR("FAILED CLIENT-ALLOCATED SEGMENT CREATE TEST"); } } // Test pre-bind (no segments yet) Publish // Should not fail, nor interfere with the post-Bind use of Publish if (GASNET_OK != gex_EP_PublishBoundSegment(myteam, &myep, 1, 0)) { ERR("FAILED EARLY SEGMENT PUBLISH TEST"); } // Pick a segment for the main tests // The other is used in one later test and then destroyed gex_Segment_t seg, other_seg; void * seg_addr; uintptr_t seg_size; if (client_segment) { assert(have_cseg); seg = c_segment; seg_addr = c_segment_addr; seg_size = c_segment_size; other_seg = g_segment; } else { assert(have_gseg); seg = g_segment; seg_addr = gex_Segment_QueryAddr(g_segment); seg_size = gex_Segment_QuerySize(g_segment); other_seg = c_segment; } // Verify desired behavior for erroneous arguments to gex_EP_BindSegment(), // taking care to provide valid values for two of the three arguments. // NOTE: specification does not require diagnosis of these errors, nor // specify the error code to be used if one does diagnose them. gex_System_SetVerboseErrors(0); // invalid ep if (GASNET_ERR_BAD_ARG != gex_EP_BindSegment(GEX_EP_INVALID, seg, 0)) { ERR("FAILED GEX_EP_INVALID BIND TEST"); } // invalid segment if (GASNET_ERR_BAD_ARG != gex_EP_BindSegment(myep, GEX_SEGMENT_INVALID, 0)) { ERR("FAILED GEX_SEGMENT_INVALID BIND TEST"); } // invalid flags // NOTE: currently, all non-zero flags values are invalid, but that may change if (GASNET_ERR_BAD_ARG != gex_EP_BindSegment(myep, seg, 1)) { ERR("FAILED INVALID FLAGS BIND TEST"); } gex_System_SetVerboseErrors(1); // Bind the chosen segment and validate if (gex_EP_BindSegment(myep, seg, 0)) { ERR("FAILED CALL TO gex_EP_BindSegment"); } { void *tmp_addr; size_t tmp_size; gex_Event_Wait( gex_EP_QueryBoundSegmentNB(myteam, myrank, &tmp_addr, NULL, &tmp_size, 0) ); if ((seg != gex_EP_QuerySegment(myep)) || (tmp_addr != seg_addr) || (tmp_size != seg_size)) { ERR("FAILED SEGMENT EP BIND TEST"); } } #if !MISSING_MULTI_SEGMENT_SUPPORT gex_System_SetVerboseErrors(0); // Verify desired behavior for erroneous double-bind // NOTE: specification does not require diagnosis nor specify the error code if (GASNET_ERR_BAD_ARG != gex_EP_BindSegment(myep, other_seg, 0)) { ERR("FAILED DOUBLE-BIND TEST"); } gex_System_SetVerboseErrors(1); gex_Segment_Destroy(other_seg, 0); #endif // Publish the segment over a permuted temporary team, // consisting all odds in reverse order followed by evens in reverse order. // Additionally, we perform the Publish in two calls with random membership. { gex_TM_t tmp_tm = GEX_TM_INVALID; int key = (myrank & 1 ? 0 : nranks) + (nranks - myrank); gex_TM_Split(&tmp_tm, myteam, 0, key, NULL, 0, GEX_FLAG_TM_NO_SCRATCH); assert_always(tmp_tm != GEX_TM_INVALID); assert_always(nranks == gex_TM_QuerySize(tmp_tm)); int coin_flip = TEST_RAND_ONEIN(2); if ((GASNET_OK != gex_EP_PublishBoundSegment(tmp_tm, &myep, coin_flip, 0)) || (GASNET_OK != gex_EP_PublishBoundSegment(tmp_tm, &myep, !coin_flip, 0))) { ERR("FAILED PERMUTED SEGMENT PUBLISH TEST"); } GASNET_Safe(gex_TM_Destroy(tmp_tm, NULL, 0)); } #if GASNET_MAXEPS > 1 // Test binding same segment to a second endpoint gex_EP_t ep2; if ((GASNET_OK != gex_EP_Create(&ep2, myclient, GEX_EP_CAPABILITY_RMA, 0)) || (GASNET_OK != gex_EP_BindSegment(ep2, seg, 0)) || (GASNET_OK != gex_EP_PublishBoundSegment(myteam, &ep2, 1, 0))) { ERR("FAILED MULTI-BOUND SEGMENT TEST"); } // TODO: Unpublish, Unbind and Destroy #endif // Prepare for comms gex_Rank_t peer = (myrank + 1) % nranks; void *loc_base, *rem_base; gex_Event_Wait( gex_EP_QueryBoundSegmentNB(myteam, peer, &rem_base, NULL, NULL, 0) ); loc_base = seg_addr; // TODO: validate gex_EP_QueryBoundSegmentNB() for some non-trivial set of // processes, not just self and the one peer chosen for communication. // TODO: fix PSHM support and remove this mess: int sender = 1; // Initiates Put, Get and Request int target = 1; // Target of a sender gex_Rank_t nbrhd_set_size; gex_System_QueryMyPosition(&nbrhd_set_size, NULL, NULL, NULL); if (nbrhd_set_size != nranks) { // More ranks than nbrhds => at least one non-singleton nbrhd gex_Rank_t anti_peer = (myrank + nranks - 1) % nranks; // Sends us a Request gex_RankInfo_t *nbrhdinfo; gex_Rank_t nbrhdsize; gex_System_QueryNbrhdInfo(&nbrhdinfo, &nbrhdsize, NULL); for (gex_Rank_t i = 0; i < nbrhdsize; ++i) { if (nbrhdinfo[i].gex_jobrank == anti_peer) { target = 0; } if (nbrhdinfo[i].gex_jobrank == peer) { // Would communicate w/i the nbrhd, which is not currently supported MSG("WARNING: skipping intra-nbrhd initiator role on this process."); sleep(2); sender = 0; } } #if !GASNET_CONDUIT_SMP MSG0("NOTE: setting GASNET_SUPERNODE_MAXSIZE=1 will enable skipped tests."); #endif } // Put, Get and AMLong to exercise the segment // TODO: Test collectives w/ scratch space carved out of the segment. // TODO: Can Long payloads be made large to prevent packed-long optimizations? { gex_Rank_t *loc_array = (gex_Rank_t *)loc_base; loc_array[0] = myrank; // Source of Gets loc_array[1] = GEX_RANK_INVALID; // Destination of Put loc_array[2] = GEX_RANK_INVALID; // Destination of RequestLong loc_array[3] = GEX_RANK_INVALID; // Destination of ReplyLong loc_array[4] = GEX_RANK_INVALID; // Destination of loopback Put BARRIER(); if (sender) { int failed = 0; gex_Rank_t *rem_array = (gex_Rank_t *)rem_base; gex_Rank_t read_val; gex_Event_t get_ev = gex_RMA_GetNB(myteam, &read_val, peer, rem_array, sizeof(gex_Rank_t), 0); gex_RMA_PutBlocking(myteam, peer, rem_array + 1, &peer, sizeof(gex_Rank_t), 0); gex_AM_RequestLong(myteam, peer, hidx_ping, &peer, sizeof(gex_Rank_t), rem_array + 2, GEX_EVENT_NOW, 0, PTR_PACK(loc_array + 3)); // Validate Get result gex_Event_Wait(get_ev); failed += (read_val != peer); // Validate AMReplyLong payload GASNET_BLOCKUNTIL(pong_rcvd); failed += (loc_array[3] != peer); if (failed) { ERR("Initiator checks FAILED %d test(s).", failed); } else { MSG("Initiator checks passed."); } } // Validate Put and AMRequestLong payload (if any) // Ping follows blocking Put (Put+Sync+Send), thus proving Put completion if (target) { int failed = 0; GASNET_BLOCKUNTIL(ping_rcvd); failed += (loc_array[1] != myrank); // Put failed += (loc_array[2] != myrank); // RequestLong payload if (failed) { ERR("Target checks FAILED %d test(s).", failed); } else { MSG("Target checks passed."); } } { // Alawys test loopback int failed = 0; gex_Rank_t read_val = gex_RMA_GetBlockingVal(myteam, myrank, loc_array, sizeof(gex_Rank_t), 0); failed += (read_val != myrank); gex_RMA_PutBlockingVal(myteam, myrank, loc_array + 4, myrank, sizeof(gex_Rank_t), 0); failed += (loc_array[4] != myrank); if (failed) { ERR("Loopback checks FAILED %d test(s).", failed); } else { MSG("Loopback checks passed."); } } } // Test no-op (redundant) Publish if (GASNET_OK != gex_EP_PublishBoundSegment(myteam, &myep, 1, 0)) { ERR("FAILED NO-OP SEGMENT PUBLISH TEST"); } } BARRIER(); MSG("done."); gasnet_exit(0); return 0; } gasnet-2025.8.0/tests/testlarge.c0000664000175000017500000005626615142313673016741 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testlarge.c $ * Description: GASNet bulk (EVENT_DEFER) get/put performance test * measures the ping-pong average round-trip time and * average flood throughput of GASNet gets and puts * over varying payload size and synchronization mechanisms * Copyright 2002, Jaein Jeong and Dan Bonachea * Terms of use are as specified in license.txt */ /************************************************************ testlarge.c: measures the bandwidth of get and put for large messages with payload size (512 .. limit bytes) also measures the barrier time. *************************************************************/ #include #if GASNET_HAVE_MK_CLASS_MULTIPLE #include #endif int numprocs; size_t maxsz = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR ((numprocs==1?2:1)*(uintptr_t)alignup(maxsz,PAGESZ)) #endif #include "test.h" #if GASNET_HAVE_MK_CLASS_ZE #include "zekind.h" #endif #define GASNET_HEADNODE 0 #define PRINT_LATENCY 0 #define PRINT_THROUGHPUT 1 static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; typedef struct { size_t datasize; int iters; uint64_t time; double max_throughput; } stat_struct_t; gex_AM_Entry_t handler_table[2]; int insegment = 1; int myproc; int peerproc = -1; int iamsender = 0; int unitsMB = 0; int doputs = 1; int dogets = 1; int lbufs = 0; #if GASNET_HAVE_MK_CLASS_MULTIPLE static int use_loc_gpu = 0; static int use_rem_gpu = 1; #else #define use_loc_gpu 0 #define use_rem_gpu 0 #endif size_t min_payload = 0; size_t max_payload; size_t max_step = 0; char *tgtmem; void *msgbuf; #define init_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _init_stat #define update_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _update_stat #define print_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _print_stat void _init_stat(stat_struct_t *st, size_t sz) { st->iters = 0; st->datasize = sz; st->time = 0; } void _update_stat(stat_struct_t *st, uint64_t temptime, int iters) { st->iters += iters; st->time += temptime; } void _print_stat(int myproc, stat_struct_t *st, const char *name, int operation) { switch (operation) { case PRINT_LATENCY: printf("%c: %3i - %10li byte : %7i iters," " latency %12i us total, %9.3f us ave. (%s)\n", TEST_SECTION_NAME(), myproc, (long) st->datasize, st->iters, (int) st->time, ((double)st->time) / st->iters, name); fflush(stdout); break; case PRINT_THROUGHPUT: printf((unitsMB ? "%c: %3i - %10li byte : %7i iters, throughput %11.6f MB/sec (%s)\n": "%c: %3i - %10li byte : %7i iters, throughput %11.3f KB/sec (%s)\n"), TEST_SECTION_NAME(), myproc, (long) st->datasize, st->iters, ((int)st->time == 0 ? 0.0 : (1000000.0 * st->datasize * st->iters / (unitsMB?(1024.0*1024.0):1024.0)) / ((int)st->time)), name); fflush(stdout); break; default: break; } } // Double payload at each iter, subject to max_step // but include max_payload which may not otherwise be visited #define ADVANCE(sz) do { \ size_t step = MIN(max_step, sz); \ if (!sz) { \ sz = 1; \ } else if (sz < max_payload && sz+step > max_payload) { \ sz = max_payload; \ } else { \ sz += step; \ } \ } while (0) void bulk_test(int iters) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t stget, stput; size_t payload; for (payload = min_payload; payload <= max_payload && payload > 0; ) { init_stat(&stput, payload); BARRIER(); if (iamsender && doputs) { /* measure the throughput of sending a message */ begin = TIME(); if (lbufs > 1) { for (i = 0; i < iters; i++) { void *loc_addr = (void*)((uintptr_t)msgbuf + max_payload * (i%lbufs)); gex_RMA_PutBlocking(myteam, peerproc, tgtmem, loc_addr, payload, 0); } } else { for (i = 0; i < iters; i++) { gex_RMA_PutBlocking(myteam, peerproc, tgtmem, msgbuf, payload, 0); } } end = TIME(); update_stat(&stput, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &stput, "PutBlocking throughput", PRINT_THROUGHPUT); } init_stat(&stget, payload); if (iamsender && dogets) { /* measure the throughput of receiving a message */ begin = TIME(); if (lbufs > 1) { for (i = 0; i < iters; i++) { void *loc_addr = (void*)((uintptr_t)msgbuf + max_payload * (i%lbufs)); gex_RMA_GetBlocking(myteam, loc_addr, peerproc, tgtmem, payload, 0); } } else { for (i = 0; i < iters; i++) { gex_RMA_GetBlocking(myteam, msgbuf, peerproc, tgtmem, payload, 0); } } end = TIME(); update_stat(&stget, (end - begin), iters); } BARRIER(); if (iamsender && dogets) { print_stat(myproc, &stget, "GetBlocking throughput", PRINT_THROUGHPUT); } ADVANCE(payload); } } void bulk_test_nbi(int iters, int doalc) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t stget, stput; size_t payload; gex_Event_t *lc_opt = doalc ? GEX_EVENT_GROUP : GEX_EVENT_DEFER; for (payload = min_payload; payload <= max_payload && payload > 0; ) { init_stat(&stput, payload); BARRIER(); if (iamsender && doputs) { /* measure the throughput of sending a message */ begin = TIME(); if (lbufs > 1) { for (i = 0; i < iters; i++) { void *loc_addr = (void*)((uintptr_t)msgbuf + max_payload * (i%lbufs)); gex_RMA_PutNBI(myteam, peerproc, tgtmem, loc_addr, payload, lc_opt, 0); } } else { for (i = 0; i < iters; i++) { gex_RMA_PutNBI(myteam, peerproc, tgtmem, msgbuf, payload, lc_opt, 0); } } gex_NBI_Wait(doalc ? GEX_EC_ALL : GEX_EC_PUT, 0); end = TIME(); update_stat(&stput, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { const char *name = doalc ? "PutNBI+GROUP throughput" : "PutNBI+DEFER throughput"; print_stat(myproc, &stput, name, PRINT_THROUGHPUT); } init_stat(&stget, payload); if (iamsender && dogets && !doalc) { /* measure the throughput of receiving a message */ begin = TIME(); if (lbufs > 1) { for (i = 0; i < iters; i++) { void *loc_addr = (void*)((uintptr_t)msgbuf + max_payload * (i%lbufs)); gex_RMA_GetNBI(myteam, loc_addr, peerproc, tgtmem, payload, 0); } } else { for (i = 0; i < iters; i++) { gex_RMA_GetNBI(myteam, msgbuf, peerproc, tgtmem, payload, 0); } } gex_NBI_Wait(GEX_EC_GET,0); end = TIME(); update_stat(&stget, (end - begin), iters); } BARRIER(); if (iamsender && dogets && !doalc) { print_stat(myproc, &stget, "GetNBI throughput", PRINT_THROUGHPUT); } ADVANCE(payload); } } void bulk_test_nb(int iters, int doalc) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t stget, stput; gex_Event_t *events; size_t payload; int nevents = iters * (doalc ? 2 : 1); events = (gex_Event_t *) test_malloc(sizeof(gex_Event_t) * nevents); for (payload = min_payload; payload <= max_payload && payload > 0; ) { init_stat(&stput, payload); BARRIER(); if (iamsender && doputs) { /* measure the throughput of sending a message */ gex_Event_t *lc_opt = doalc ? (events+iters) : GEX_EVENT_DEFER; begin = TIME(); if (lbufs > 1) { for (i = 0; i < iters; i++, lc_opt += doalc) { void *loc_addr = (void*)((uintptr_t)msgbuf + max_payload * (i%lbufs)); events[i] = gex_RMA_PutNB(myteam, peerproc, tgtmem, loc_addr, payload, lc_opt, 0); } } else { for (i = 0; i < iters; i++, lc_opt += doalc) { events[i] = gex_RMA_PutNB(myteam, peerproc, tgtmem, msgbuf, payload, lc_opt, 0); } } gex_Event_WaitAll(events, nevents, 0); end = TIME(); update_stat(&stput, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { const char *name = doalc ? "PutNB+event throughput" : "PutNB+DEFER throughput"; print_stat(myproc, &stput, name, PRINT_THROUGHPUT); } init_stat(&stget, payload); if (iamsender && dogets && !doalc) { /* measure the throughput of receiving a message */ begin = TIME(); if (lbufs > 1) { for (i = 0; i < iters; i++) { void *loc_addr = (void*)((uintptr_t)msgbuf + max_payload * (i%lbufs)); events[i] = gex_RMA_GetNB(myteam, loc_addr, peerproc, tgtmem, payload, 0); } } else { for (i = 0; i < iters; i++) { events[i] = gex_RMA_GetNB(myteam, msgbuf, peerproc, tgtmem, payload, 0); } } gex_Event_WaitAll(events, iters, 0); end = TIME(); update_stat(&stget, (end - begin), iters); } BARRIER(); if (iamsender && dogets && !doalc) { print_stat(myproc, &stget, "GetNB throughput", PRINT_THROUGHPUT); } ADVANCE(payload); } test_free(events); } int main(int argc, char **argv) { int iters = 0; int arg; void *myseg; void *alloc = NULL; int firstlastmode = 0; int fullduplexmode = 0; int crossmachinemode = 0; int skipwarmup = 0; size_t segsz = 0; #if GASNET_HAVE_MK_CLASS_MULTIPLE int use_cuda_uva = 0; int use_hip = 0; int use_ze = 0; #endif int use_host = 1; int help = 0; /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testlarge", &argc, &argv, 0)); /* parse arguments */ arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-in")) { insegment = 1; ++arg; } else if (!strcmp(argv[arg], "-out")) { insegment = 0; ++arg; } else if (!strcmp(argv[arg], "-f")) { firstlastmode = 1; ++arg; } else if (!strcmp(argv[arg], "-c")) { crossmachinemode = 1; ++arg; } else if (!strcmp(argv[arg], "-a")) { fullduplexmode = 1; ++arg; } else if (!strcmp(argv[arg], "-m")) { unitsMB = 1; ++arg; } else if (!strcmp(argv[arg], "-p")) { dogets = 0; doputs = 1; ++arg; } else if (!strcmp(argv[arg], "-g")) { dogets = 1; doputs = 0; ++arg; } else if (!strcmp(argv[arg], "-s")) { skipwarmup = 1; ++arg; } else if (!strcmp(argv[arg], "-minsz")) { ++arg; if (argc > arg) { min_payload = gasnett_parse_int(argv[arg], 1); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-max-step")) { ++arg; if (argc > arg) { max_step = gasnett_parse_int(argv[arg], 1); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-lbufs")) { ++arg; if (argc > arg) { lbufs = atoi(argv[arg]); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-segsz")) { ++arg; if (argc > arg) { segsz = gasnett_parse_int(argv[arg], 1024*1024); arg++; } else help = 1; #if GASNET_HAVE_MK_CLASS_MULTIPLE #if GASNET_HAVE_MK_CLASS_CUDA_UVA } else if (!strcmp(argv[arg], "-cuda-uva")) { use_cuda_uva = 1; use_hip = 0; use_ze = 0; use_host = 0; ++arg; #endif #if GASNET_HAVE_MK_CLASS_HIP } else if (!strcmp(argv[arg], "-hip")) { use_hip = 1; use_cuda_uva = 0; use_ze = 0; use_host = 0; ++arg; #endif #if GASNET_HAVE_MK_CLASS_ZE } else if (!strcmp(argv[arg], "-ze")) { use_cuda_uva = 0; use_hip = 0; use_ze = 1; use_host = 0; ++arg; #endif } else if (!strcmp(argv[arg], "-host")) { use_cuda_uva = 0; use_hip = 0; use_ze = 0; use_host = 1; ++arg; } else if (!strcmp(argv[arg], "-local-gpu")) { use_loc_gpu = 1; ++arg; } else if (!strcmp(argv[arg], "-local-host")) { use_loc_gpu = 0; ++arg; } else if (!strcmp(argv[arg], "-remote-gpu")) { use_rem_gpu = 1; ++arg; } else if (!strcmp(argv[arg], "-remote-host")) { use_rem_gpu = 0; ++arg; #endif } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (argc > arg) { iters = atoi(argv[arg]); arg++; } if (!iters) iters = 1000; if (argc > arg) { maxsz = gasnett_parse_int(argv[arg], 1); arg++; } if (!maxsz) maxsz = 2*1024*1024; /* 2 MB default */ if (argc > arg) { TEST_SECTION_PARSE(argv[arg]); arg++; } #if GASNET_HAVE_MK_CLASS_MULTIPLE if (use_host) { use_loc_gpu = use_rem_gpu = 0; } #endif if (!max_step) max_step = maxsz; if (!min_payload) min_payload = 16; if (!insegment) { // silently map out-of-range to iters if ((lbufs < 0) || (lbufs > iters)) lbufs = iters; } else if (lbufs) { MSG0("WARNING: Ignoring '-lbufs N' without '-out'."); lbufs = 1; } if (!lbufs) lbufs = 1; // default /* get SPMD info (needed for segment size) */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); #ifdef GASNET_SEGMENT_EVERYTHING if (maxsz > TEST_SEGSZ) { ERR("maxsz must be <= %"PRIuPTR" on GASNET_SEGMENT_EVERYTHING",(uintptr_t)TEST_SEGSZ); gasnet_exit(1); } #endif if (segsz == 0) { segsz = TEST_SEGSZ_REQUEST; } else if (segsz < TEST_SEGSZ_REQUEST) { ERR("Command line -segsz %"PRIuPTR" is less than %"PRIuPTR, (uintptr_t)segsz, (uintptr_t)(TEST_SEGSZ_REQUEST)); gasnet_exit(1); } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, segsz)); #if GASNET_HAVE_MK_CLASS_MULTIPLE #define KIND_USAGE_BEGIN \ "\n" \ " Memory kind selection (last-used has precedence):\n" \ " -host Test host memory, aka GEX_MK_CLASS_HOST (default)\n" #define KIND_USAGE_END \ " Memory kind buffer location (ignored with -host):\n" \ " Local buffer location (last-used has precedence):\n" \ " -local-host Local buffer is in host memory (default)\n" \ " -local-gpu Local buffer is in GPU memory\n" \ " Remote buffer location (last-used has precedence):\n" \ " -remote-host Remote buffer is in host memory\n" \ " -remote-gpu Remote buffer is in GPU memory (default)" #else #define KIND_USAGE_BEGIN // empty #define KIND_USAGE_END // empty #endif #if GASNET_HAVE_MK_CLASS_CUDA_UVA #define KIND_USAGE_CUDA_UVA " -cuda-uva Test GEX_MK_CLASS_CUDA_UVA\n" #else #define KIND_USAGE_CUDA_UVA // empty #endif #if GASNET_HAVE_MK_CLASS_HIP #define KIND_USAGE_HIP " -hip Test GEX_MK_CLASS_HIP\n" #else #define KIND_USAGE_HIP // empty #endif #if GASNET_HAVE_MK_CLASS_ZE #define KIND_USAGE_ZE " -ze Test GEX_MK_CLASS_ZE\n" #else #define KIND_USAGE_ZE // empty #endif test_init("testlarge",1, "[options] (iters) (maxsz) (test_sections)\n" " The '-in' or '-out' option selects whether the initiator-side\n" " memory is in the GASNet segment or not (default is 'in').\n" " The -p/-g option selects puts only or gets only (default is both).\n" " The -s option skips warm-up iterations\n" " The -m option enables MB/sec units for bandwidth output (MB=2^20 bytes).\n" " The -a option enables full-duplex mode, where all nodes send.\n" " The -c option enables cross-machine pairing, default is nearest neighbor.\n" " The -f option enables 'first/last' mode, where the first/last\n" " nodes communicate with each other, while all other nodes sit idle.\n" " The '-minsz N' option sets the minimum transfer size tested (default is 16).\n" " The '-max-step N' option selects the maximum step between transfer sizes,\n" " which by default advance by doubling until maxsz is reached.\n" " The '-segsz N' option sets the segment space to use (in MB).\n" " The default is the minimum necessary to complete the tests.\n" " The '-lbufs N' option is valid only with '-out' and sets the number of\n" " distinct local (initiator-side) buffers to cycle through (default is 1)." KIND_USAGE_BEGIN KIND_USAGE_CUDA_UVA KIND_USAGE_HIP KIND_USAGE_ZE KIND_USAGE_END ); if (help || argc > arg) test_usage(); max_payload = maxsz; if (max_payload < min_payload) { ERR("maxsz (%"PRIuPTR") must be >= %"PRIuPTR"\n",(uintptr_t)max_payload,(uintptr_t)min_payload); test_usage(); } if (!firstlastmode) { /* Only allow 1 or even number for numprocs */ if (numprocs > 1 && numprocs % 2 != 0) { MSG0("WARNING: This test requires a unary or even number of nodes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harnesses for smp-conduit */ } } /* Setting peer thread rank */ if (firstlastmode) { peerproc = (myproc == 0 ? numprocs-1 : 0); iamsender = (fullduplexmode ? myproc == 0 || myproc == numprocs-1 : myproc == 0); } else if (numprocs == 1) { peerproc = 0; iamsender = 1; } else if (crossmachinemode) { if (myproc < numprocs / 2) { peerproc = myproc + numprocs/2; iamsender = 1; } else { peerproc = myproc - numprocs/2; iamsender = fullduplexmode; } } else { peerproc = (myproc % 2) ? (myproc - 1) : (myproc + 1); iamsender = (fullduplexmode || myproc % 2 == 0); } myseg = TEST_SEG(myproc); tgtmem = (numprocs > 1) ? TEST_SEG(peerproc) : (void*)(alignup(maxsz,PAGESZ) + (uintptr_t)myseg); #if GASNET_HAVE_MK_CLASS_MULTIPLE test_static_assert(GASNET_MAXEPS >= 2); gex_EP_t gpu_ep; gex_MK_t kind; gex_Segment_t d_segment = GEX_SEGMENT_INVALID; gex_MK_Create_args_t args; args.gex_flags = 0; int use_device = 0; if (use_cuda_uva) { MSG0("***NOTICE***: Using EXPERIMENTAL/UNTUNED support for CUDA UVA memory kind (local %s, remote %s)", (use_loc_gpu ? "GPU" : "host"), (use_rem_gpu ? "GPU" : "host")); args.gex_class = GEX_MK_CLASS_CUDA_UVA; args.gex_args.gex_class_cuda_uva.gex_CUdevice = 0; use_device = 1; } if (use_hip) { MSG0("***NOTICE***: Using EXPERIMENTAL/UNTUNED support for HIP memory kind (local %s, remote %s)", (use_loc_gpu ? "GPU" : "host"), (use_rem_gpu ? "GPU" : "host")); args.gex_class = GEX_MK_CLASS_HIP; args.gex_args.gex_class_hip.gex_hipDevice = 0; use_device = 1; } if (use_ze) { MSG0("***NOTICE***: Using EXPERIMENTAL/UNTUNED support for ZE memory kind (local %s, remote %s)", (use_loc_gpu ? "GPU" : "host"), (use_rem_gpu ? "GPU" : "host")); #if GASNET_HAVE_MK_CLASS_ZE if (! test_open_ze_device(0, &args)) { FATALERR("GEX_MK_CLASS_ZE: could not find a GPU device"); } #endif use_device = 1; } if (use_device) { // Due to bug 4149, single-process + use_device is currently unsupported if (numprocs == 1) { MSG0("WARNING: Device memory mode requires more than one process. Test skipped.\n"); gasnet_exit(0); } GASNET_Safe( gex_MK_Create(&kind, myclient, &args, 0) ); GASNET_Safe( gex_Segment_Create(&d_segment, myclient, NULL, segsz, kind, 0) ); GASNET_Safe( gex_EP_Create(&gpu_ep, myclient, GEX_EP_CAPABILITY_RMA, 0) ); GASNET_Safe( gex_EP_BindSegment(gpu_ep, d_segment, 0) ); gex_EP_PublishBoundSegment(myteam, &gpu_ep, 1, 0); // The "trick" to diverting RMA operation to local and/or remote GPU memory myteam = gex_TM_Pair(use_loc_gpu ? gpu_ep : myep, use_rem_gpu ? gex_EP_QueryIndex(gpu_ep) : 0); gex_Event_Wait( gex_EP_QueryBoundSegmentNB(myteam, peerproc, (void**)&tgtmem, NULL, NULL, 0) ); } #endif if (insegment) { #if GASNET_HAVE_MK_CLASS_MULTIPLE msgbuf = use_loc_gpu ? gex_Segment_QueryAddr(d_segment) : (void *) myseg; #else msgbuf = (void *) myseg; #endif } else { alloc = (void *) test_calloc(maxsz*lbufs+PAGESZ,1); // calloc prevents valgrind warnings msgbuf = (void *) alignup(((uintptr_t)alloc), PAGESZ); /* ensure page alignment of base */ } assert(((uintptr_t)msgbuf) % PAGESZ == 0); if (myproc == 0) { MSG("Running %i iterations of %s%s%sbulk %s%s%s with %d local address%s %sside the segment for sizes: %"PRIuPTR"...%"PRIuPTR"\n", iters, (firstlastmode ? "first/last " : ""), (fullduplexmode ? "full-duplex ": ""), (crossmachinemode ? "cross-machine ": ""), doputs?"put":"", (doputs&&dogets)?"/":"", dogets?"get":"", lbufs, (lbufs>1)?"s":"", insegment ? "in" : "out", (uintptr_t)min_payload, (uintptr_t)max_payload); if (segsz > TEST_SEGSZ_REQUEST) { MSG("Using non-default segment size %"PRIuPTR, (uintptr_t)segsz); } } BARRIER(); if (iamsender && !skipwarmup) { /* pay some warm-up costs */ int i; int warm_iters = MIN(iters, 32767); /* avoid hitting 65535-handle limit */ gex_Event_t *h = test_malloc(2*sizeof(gex_Event_t)*warm_iters); for (i = 0; i < warm_iters; i++) { gex_RMA_PutBlocking(myteam, peerproc, tgtmem, msgbuf, 8, 0); gex_RMA_GetBlocking(myteam, msgbuf, peerproc, tgtmem, 8, 0); gex_RMA_PutNBI(myteam, peerproc, tgtmem, msgbuf, 8, GEX_EVENT_DEFER, 0); gex_RMA_GetNBI(myteam, msgbuf, peerproc, tgtmem, 8, 0); h[i] = gex_RMA_PutNB(myteam, peerproc, tgtmem, msgbuf, 8, GEX_EVENT_DEFER, 0); h[i+warm_iters] = gex_RMA_GetNB(myteam, msgbuf, peerproc, tgtmem, 8, 0); } if (lbufs > 1) { for (i = 0; i < lbufs; i++) { void * loc_addr = (void*)((uintptr_t)msgbuf + max_payload * i); gex_RMA_PutBlocking(myteam, peerproc, tgtmem, loc_addr, max_payload, 0); gex_RMA_GetBlocking(myteam, loc_addr, peerproc, tgtmem, max_payload, 0); } } else { gex_RMA_PutBlocking(myteam, peerproc, tgtmem, msgbuf, max_payload, 0); gex_RMA_GetBlocking(myteam, msgbuf, peerproc, tgtmem, max_payload, 0); } gex_Event_WaitAll(h, warm_iters*2, 0); gex_NBI_Wait(GEX_EC_ALL,0); test_free(h); } BARRIER(); if (TEST_SECTION_BEGIN_ENABLED()) bulk_test(iters); if (TEST_SECTION_BEGIN_ENABLED()) bulk_test_nbi(iters,0); if (TEST_SECTION_BEGIN_ENABLED()) bulk_test_nb(iters,0); if (TEST_SECTION_BEGIN_ENABLED()) bulk_test_nbi(iters,1); if (TEST_SECTION_BEGIN_ENABLED()) bulk_test_nb(iters,1); BARRIER(); if (alloc) test_free(alloc); MSG0("done."); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testfaddperf.c0000664000175000017500000003232615142313673017411 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testfaddperf.c $ * Description: GASNet remote atomics performance test * Measures average round-trip time and average flood throughput * of the GEX_OP_(F)ADD remote atomic operations * Copyright 2002, Jaein Jeong and Dan Bonachea * Copyright (c) 2017, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include "test.h" static int iters = 0; static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; #include static int myproc; static int numprocs; static int peerproc = -1; static int iamsender = 0; static int hotspotmode = 0; static void* myseg; static void* peerseg; static gex_AD_t myad; #define PRINT_LATENCY 0 #define PRINT_THROUGHPUT 1 typedef struct { int iters; uint64_t time; } stat_struct_t; #define init_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _init_stat #define update_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _update_stat #define print_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _print_stat void _init_stat(stat_struct_t *st) { st->iters = 0; st->time = 0; } void _update_stat(stat_struct_t *st, uint64_t temptime, int iters) { st->iters += iters; st->time += temptime; } void _print_stat(int myproc, stat_struct_t *st, const char *type, const char *opstr, int operation) { switch (operation) { case PRINT_LATENCY: printf("%c: %2i : %7i iters, latency %10i us total, %9.3f us ave. (%s %s latency)\n", TEST_SECTION_NAME(), myproc, st->iters, (int) st->time, ((double)st->time) / st->iters, type, opstr); fflush(stdout); break; case PRINT_THROUGHPUT: printf("%c: %2i : %7i iters, throughput %15.3f ops/sec (%s %s throughput)\n", TEST_SECTION_NAME(), myproc, st->iters, ((int)st->time == 0 ? 0.0 : ((1.e6 * (double)st->iters / st->time))), type, opstr); fflush(stdout); break; default: break; } } #define TEST_DECL(_tcode, _type) \ void _tcode##_lat_test(gex_OP_t opcode, const char *opstr) \ {GASNET_BEGIN_FUNCTION(); \ int64_t begin, end; \ stat_struct_t st; \ _type result; \ \ /* initialize statistics */ \ init_stat(&st); \ \ * (_type *) myseg = 0; \ \ BARRIER(); \ \ if (iamsender) { \ /* measure the round-trip time of (F)ADD/NB */ \ begin = TIME(); \ for (int i = 0; i < iters; i++) { \ gex_Event_Wait( \ gex_AD_OpNB_##_tcode(myad, &result, peerproc, peerseg, \ opcode, i&15, 9999, 0)); \ } \ end = TIME(); \ update_stat(&st, (end - begin), iters); \ } \ \ BARRIER(); \ \ if (iamsender) { \ print_stat(myproc, &st, #_tcode, opstr, PRINT_LATENCY); \ } \ } \ void _tcode##_tput_test(gex_OP_t opcode, const char *opstr) \ {GASNET_BEGIN_FUNCTION(); \ int64_t begin, end; \ stat_struct_t st; \ _type *results = test_malloc(iters * sizeof(_type)); \ \ /* initialize statistics */ \ init_stat(&st); \ \ BARRIER(); \ \ if (iamsender) { \ /* measure the throughput of (F)ADD/NBI */ \ begin = TIME(); \ for (int i = 0; i < iters; i++) { \ gex_AD_OpNBI_##_tcode(myad, results + i, peerproc, peerseg, \ opcode, i&15, 9999, 0); \ } \ gex_NBI_Wait(GEX_EC_RMW, 0); \ if (hotspotmode) BARRIER(); \ end = TIME(); \ update_stat(&st, (end - begin), iters); \ } else { \ if (hotspotmode) BARRIER(); \ } \ \ BARRIER(); \ \ if (iamsender) { \ print_stat(myproc, &st, #_tcode, opstr, PRINT_THROUGHPUT); \ } \ \ test_free(results); \ } \ void do_##_tcode(int skipwarmup, gex_OP_t opcode, const char *opstr) \ {GASNET_BEGIN_FUNCTION(); \ gex_AD_Create(&myad, myteam, GEX_DT_##_tcode, opcode, 0); \ if (iamsender && !skipwarmup) { \ _type result; \ int warm_iters = MIN(iters, 10000); \ gex_Event_t *ph = test_malloc(warm_iters * sizeof(gex_Event_t)); \ for (int i = 0; i < warm_iters; ++i) { \ ph[i] = gex_AD_OpNB_##_tcode(myad, &result, peerproc, peerseg, \ opcode, 1, 9999, 0); \ gex_AD_OpNBI_##_tcode(myad, &result, peerproc, peerseg, \ opcode, 1, 9999, 0); \ } \ gex_NBI_Wait(GEX_EC_RMW,0); \ gex_Event_WaitAll(ph, warm_iters, 0); \ test_free(ph); \ } \ \ BARRIER(); \ \ if (TEST_SECTION_BEGIN_ENABLED()) _tcode##_lat_test(opcode, opstr); \ if (TEST_SECTION_BEGIN_ENABLED()) _tcode##_tput_test(opcode, opstr); \ \ BARRIER(); \ \ gex_AD_Destroy(myad); \ } TEST_DECL(U32, uint32_t) TEST_DECL(U64, uint64_t) TEST_DECL(FLT, float) TEST_DECL(DBL, double) int main(int argc, char **argv) { int arg; int firstlastmode = 0; int fullduplexmode = 0; int crossmachinemode = 0; int skipwarmup = 0; int help = 0; /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testfaddperf", &argc, &argv, 0)); /* parse arguments */ arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-f")) { firstlastmode = 1; ++arg; } else if (!strcmp(argv[arg], "-c")) { crossmachinemode = 1; ++arg; } else if (!strcmp(argv[arg], "-a")) { fullduplexmode = 1; ++arg; } else if (!strcmp(argv[arg], "-S")) { hotspotmode = 1; ++arg; } else if (!strcmp(argv[arg], "-s")) { skipwarmup = 1; ++arg; } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (argc > arg) { iters = atoi(argv[arg]); arg++; } if (!iters) iters = 10000; if (argc > arg) { TEST_SECTION_PARSE(argv[arg]); arg++; } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); test_init("testfaddperf",1, "[options] (iters) (test_sections)\n" " The -s option skips warm-up iterations\n" " The -a option enables full-duplex mode, where all nodes send.\n" " The -S option enables single-counter mode, where all nodes send to node zero.\n" " The -c option enables cross-machine pairing, default is nearest neighbor.\n" " The -f option enables 'first/last' mode, where the first/last\n" " nodes communicate with each other, while all other nodes sit idle.\n"); if (help || argc > arg) test_usage(); // TODO: -p for polling threads in PAR builds /* get SPMD info */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); if (!firstlastmode) { /* Only allow 1 or even number for numprocs */ if (numprocs > 1 && numprocs % 2 != 0) { MSG0("WARNING: This test requires a unary or even number of nodes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harnesses for smp-conduit */ } } /* Setting peer thread rank */ if (firstlastmode) { peerproc = (myproc == 0 ? numprocs-1 : 0); iamsender = (fullduplexmode ? myproc == 0 || myproc == numprocs-1 : myproc == 0); } else if (numprocs == 1) { peerproc = 0; iamsender = 1; } else if (crossmachinemode) { if (myproc < numprocs / 2) { peerproc = myproc + numprocs/2; iamsender = 1; } else { peerproc = myproc - numprocs/2; iamsender = fullduplexmode; } } else if (hotspotmode) { peerproc = 0; iamsender = 1; } else { peerproc = (myproc % 2) ? (myproc - 1) : (myproc + 1); iamsender = (fullduplexmode || myproc % 2 == 0); } myseg = TEST_MYSEG(); peerseg = TEST_SEG(peerproc); MSG0("Running %i iterations of %s%s%s%sremote atomic (F)ADD perfomance tests\n", iters, (firstlastmode ? "first/last " : ""), (fullduplexmode ? "full-duplex ": ""), (crossmachinemode ? "cross-machine ": ""), (hotspotmode ? "single-counter ": "")); BARRIER(); do_U32(skipwarmup, GEX_OP_FADD, "FADD"); do_U32(skipwarmup, GEX_OP_ADD, "ADD"); do_U64(skipwarmup, GEX_OP_FADD, "FADD"); do_U64(skipwarmup, GEX_OP_ADD, "ADD"); do_FLT(skipwarmup, GEX_OP_FADD, "FADD"); do_FLT(skipwarmup, GEX_OP_ADD, "ADD"); do_DBL(skipwarmup, GEX_OP_FADD, "FADD"); do_DBL(skipwarmup, GEX_OP_ADD, "ADD"); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testcollperf.c0000664000175000017500000007157015142313673017450 0ustar alastairalastair/* * testcollperf2.c * gasnet_tree_coll * * Created by Rajesh Nishtala on 10/1/07. * Copyright 2007 Berkeley UPC Group. All rights reserved. * */ /* The primary aim of this tester is to measure the performance and correctness of the various collectives at larger message sizes. It is NOT intended as a tester to measure correctness of synchronization options that is covered testcoll */ #include #include "gasnet_coll.h" #define DEFAULT_OUTER_VERIFICATION_ITERS 2 #define DEFAULT_INNER_VERIFICATION_ITERS 50 #define DEFAULT_PERFORMANCE_ITERS 0 #ifndef ALL_COLL_ENABLED #define ALL_COLL_ENABLED 1 #define BROADCAST_ENABLED 0 #define SCATTER_ENABLED 0 #define GATHER_ENABLED 0 #define GATHER_ALL_ENABLED 0 #define EXCHANGE_ENABLED 0 #define REDUCE_ENABLED 0 #define REDUCE_ALL_ENABLED 0 #endif #ifndef NB_TESTS_ENABLED #define NB_TESTS_ENABLED 1 #endif #define ROOT_THREAD 0 /* max data size for the test in bytes*/ #define DEFAULT_MAX_DATA_SIZE 32768 #define PRINT_TIMERS 1 #define VERBOSE_VERIFICATION_OUTPUT 0 /*max_dsize is a variable set in main*/ #define TOTAL_THREADS threads_per_node*gex_TM_QuerySize(myteam) #if 1 #define ERROR_EXIT() gasnet_exit(1) #else #define ERROR_EXIT() do {} while(0) #endif static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; gex_Rank_t mynode; gex_Rank_t nodes; gasnet_image_t threads_per_node; gasnet_image_t THREADS; int inner_verification_iters; int outer_verification_iters; int performance_iters; size_t max_data_size; static int src_insegment = 1; static int dst_insegment = 1; #define SEG_PER_THREAD (sizeof(int)*max_data_size*(inner_verification_iters)*TOTAL_THREADS) #define TEST_SEGSZ_EXPR ((src_insegment+dst_insegment) * SEG_PER_THREAD*threads_per_node) #define TEST_USE_PRIMORDIAL_THREAD 1 #include "test.h" #define COLL_BARRIER() PTHREAD_BARRIER(threads_per_node) typedef struct { int my_local_thread; int mythread; gasnet_coll_handle_t *hndl; char _pad[GASNETT_CACHE_LINE_BYTES]; uint8_t *mysrc, *mydest; uint8_t *node_src, *node_dst; } thread_data_t; uint8_t **my_srcs; uint8_t **my_dsts; void fill_flag_str(int flags, char *outstr) { if(flags & GASNET_COLL_IN_NOSYNC && flags & GASNET_COLL_OUT_NOSYNC) { strcpy(outstr, "no/no"); } else if(flags & GASNET_COLL_IN_NOSYNC && flags & GASNET_COLL_OUT_MYSYNC) { strcpy(outstr, "no/my"); } else if(flags & GASNET_COLL_IN_NOSYNC && flags & GASNET_COLL_OUT_ALLSYNC) { strcpy(outstr, "no/all"); } else if(flags & GASNET_COLL_IN_MYSYNC && flags & GASNET_COLL_OUT_NOSYNC) { strcpy(outstr, "my/no"); } else if(flags & GASNET_COLL_IN_MYSYNC && flags & GASNET_COLL_OUT_MYSYNC) { strcpy(outstr, "my/my"); } else if(flags & GASNET_COLL_IN_MYSYNC && flags & GASNET_COLL_OUT_ALLSYNC) { strcpy(outstr, "my/all"); } else if(flags & GASNET_COLL_IN_ALLSYNC && flags & GASNET_COLL_OUT_NOSYNC) { strcpy(outstr, "all/no"); } else if(flags & GASNET_COLL_IN_ALLSYNC && flags & GASNET_COLL_OUT_MYSYNC) { strcpy(outstr, "all/my"); } else if(flags & GASNET_COLL_IN_ALLSYNC && flags & GASNET_COLL_OUT_ALLSYNC) { strcpy(outstr, "all/all"); } } void scale_ptrM(void * out_ptr[], void * const in_ptr[], size_t elem_count, size_t elem_size, gasnet_image_t total_images) { int i; for(i=0; imy_local_thread==0 && performance_iters>0) MSG0("%c: %d> %s/%s %s sync_mode: (%s) tree: %s size: %"PRIuPTR" bytes time: %g us", \ TEST_SECTION_NAME(), td->mythread, addr_mode, num_addrs,\ coll_str, sync_mode, gasnett_getenv("GASNET_COLL_ROOTED_GEOM"), \ (uintptr_t) nelem*sizeof(int), (double)gasnett_ticks_to_us(total_ticks)/performance_iters) #else #define print_timer(td, coll_str, addr_mode, num_addrs, sync_mode, nelem, total_ticks) #endif void run_SINGLE_ADDR_test(thread_data_t *td, uint8_t **dst_arr, uint8_t **src_arr, size_t nelem, int root_thread, int in_flags) { /* all threads pass the same pointers for src and dest*/ int i,j,t,k; int flags = in_flags | (src_insegment ? GASNET_COLL_SRC_IN_SEGMENT : 0) | (dst_insegment ? GASNET_COLL_DST_IN_SEGMENT : 0); int *src, *dst; char output_str[8]; gasnett_tick_t begin, end; char flag_str[8]; gex_Event_t *handles = performance_iters ? test_malloc(sizeof(gasnet_coll_handle_t)*performance_iters) : NULL; fill_flag_str(flags, flag_str); { src = ((int*) td->mysrc); dst = ((int*) td->mydest); strcpy(output_str, "LOCAL"); } #if BROADCAST_ENABLED || ALL_COLL_ENABLED for(k=0; kmythread == root_thread) { for(i=0; i broadcast verification @ iteration: %d ... expected %d got %d", (int) td->mythread, (int) (i/nelem), expected, dst[i]); ERROR_EXIT(); } } } COLL_BARRIER(); begin = gasnett_ticks_now(); if(flags & GASNET_COLL_IN_NOSYNC) {COLL_BARRIER();} for(i=0; imythread == root_thread) { for(i=0; imythread*nelem+j); if(dst[i*nelem+j] != expected) { MSG("%d> scatter verification @ iteration: %d ... expected %d got %d", td->mythread, i, expected, dst[i*nelem+j]); ERROR_EXIT(); } } } } COLL_BARRIER(); begin = gasnett_ticks_now(); if(flags & GASNET_COLL_IN_NOSYNC) {COLL_BARRIER();} for(i=0; imythread*nelem+j; } } if(root_thread == td->mythread) { for(i=0; imythread == root_thread) { for(i=0; i gather verification @ iteration: %d ... expected %d got %d", td->mythread, (int)(i/(THREADS*nelem)), expected, dst[i]); } } } } COLL_BARRIER(); begin = gasnett_ticks_now(); if(flags & GASNET_COLL_IN_NOSYNC) {COLL_BARRIER();} for(i=0; imythread*nelem+j; } } for(i=0; i gather_all verification @ iteration: %d ... expected %d got %d", td->mythread, (int)(i/(nelem*THREADS)), expected, dst[i]); ERROR_EXIT(); } } } COLL_BARRIER(); begin = gasnett_ticks_now(); if(flags & GASNET_COLL_IN_NOSYNC) {COLL_BARRIER();} for(i=0; imythread*10000; dst[i] = -1; } if(flags & GASNET_COLL_IN_NOSYNC) {COLL_BARRIER();} for(i=0; imythread*nelem+j); if(dst[i*nelem*THREADS+t*nelem+j] != expected) { MSG("%d> exchange verification @ iteration: %d ... expected %d got %d", td->mythread, i, expected, dst[i*nelem*THREADS+t*nelem+j]); ERROR_EXIT(); } } } } } COLL_BARRIER(); begin = gasnett_ticks_now(); if(flags & GASNET_COLL_IN_NOSYNC) {COLL_BARRIER();} for(i=0; imythread) { for(i=0; imythread == root_thread) { for(i=0; i reduce verification @ iteration: %d,%d ... expected %d got %d", td->mythread, i, j, expected, dst[i*nelem+j]); ERROR_EXIT(); } else if(0) { MSG("%d> reduce passed @ iteration: %d,%d ... expected %d got %d", td->mythread, i, j, expected, dst[i*nelem+j]); } } } } } COLL_BARRIER(); begin = gasnett_ticks_now(); if(flags & GASNET_COLL_IN_NOSYNC) {COLL_BARRIER();} for(i=0; i reduce_all verification @ iteration: %d,%d ... expected %d got %d", td->mythread, i, j, expected, dst[i*nelem+j]); ERROR_EXIT(); } else if(0) { MSG("%d> reduce_all passed @ iteration: %d,%d ... expected %d got %d", td->mythread, i, j, expected, dst[i*nelem+j]); } } } } COLL_BARRIER(); begin = gasnett_ticks_now(); if(flags & GASNET_COLL_IN_NOSYNC) {COLL_BARRIER();} for(i=0; imy_local_thread==0 && VERBOSE_VERIFICATION_OUTPUT) MSG0("%c: %s/SINGLE-addr sync_mode: %s size: %"PRIuPTR" bytes root: %d. PASS", TEST_SECTION_NAME(), output_str, flag_str, (uintptr_t) (sizeof(int)*nelem), root_thread); COLL_BARRIER(); test_free(handles); } static double szfactor = 2.; void *thread_main(void *arg) { thread_data_t *td = (thread_data_t*) arg; double sz; int flag_iter; gex_Rank_t root_thread = ROOT_THREAD; int skip_msg_printed = 0; COLL_BARRIER(); for(flag_iter=0; flag_iter<9; flag_iter++) { int flags; PTHREAD_BARRIER(threads_per_node); if(td->my_local_thread==0) TEST_SECTION_BEGIN(); COLL_BARRIER(); if(TEST_SECTION_ENABLED()) { switch(flag_iter) { case 0: flags = GASNET_COLL_IN_NOSYNC | GASNET_COLL_OUT_NOSYNC; break; case 1: flags = GASNET_COLL_IN_NOSYNC | GASNET_COLL_OUT_MYSYNC; break; case 2: flags = GASNET_COLL_IN_NOSYNC | GASNET_COLL_OUT_ALLSYNC; break; case 3: flags = GASNET_COLL_IN_MYSYNC | GASNET_COLL_OUT_NOSYNC; break; case 4: flags = GASNET_COLL_IN_MYSYNC | GASNET_COLL_OUT_MYSYNC; break; case 5: flags = GASNET_COLL_IN_MYSYNC | GASNET_COLL_OUT_ALLSYNC; break; case 6: flags = GASNET_COLL_IN_ALLSYNC | GASNET_COLL_OUT_NOSYNC; break; case 7: flags = GASNET_COLL_IN_ALLSYNC | GASNET_COLL_OUT_MYSYNC; break; case 8: flags = GASNET_COLL_IN_ALLSYNC | GASNET_COLL_OUT_ALLSYNC; break; default: continue; } COLL_BARRIER(); for(sz = 1; sz<=max_data_size; sz*=szfactor) { run_SINGLE_ADDR_test(td, my_dsts, my_srcs, (size_t)sz, root_thread, flags|GASNET_COLL_LOCAL); } if(td->my_local_thread==0 && !VERBOSE_VERIFICATION_OUTPUT) { size_t final_size = (size_t) (sz/szfactor); char flag_str[8]; fill_flag_str(flags, flag_str); MSG0("%c: sync_mode: %s %d-%"PRIuPTR" bytes root: %d. PASS", TEST_SECTION_NAME(), flag_str, (int)(sizeof(int)*1), (uintptr_t) sizeof(int)*final_size, (int) root_thread); } } } gasnet_coll_dumpTuningState(NULL, GASNET_TEAM_ALL); gasnet_coll_dumpProfile(NULL, GASNET_TEAM_ALL); MSG("thread %d> done", td->mythread); return NULL; } int main(int argc, char **argv) { static uint8_t *A, *B; int i,j; int help = 0; thread_data_t *td_arr; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testcollperf", &argc, &argv, 0)); int arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-szfactor")) { ++arg; if (argc > arg) { szfactor = atof(argv[arg]); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-src-in")) { src_insegment = 1; ++arg; } else if (!strcmp(argv[arg], "-src-out")) { src_insegment = 0; ++arg; } else if (!strcmp(argv[arg], "-src-in")) { dst_insegment = 1; ++arg; } else if (!strcmp(argv[arg], "-dst-out")) { dst_insegment = 0; ++arg; } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if(argc > arg) { max_data_size = MAX(atoi(argv[arg])/sizeof(int),1); arg++; } else { max_data_size = DEFAULT_MAX_DATA_SIZE/sizeof(int); } if (argc > arg) { outer_verification_iters = MAX(1,atoi(argv[arg])); arg++; } else { outer_verification_iters = DEFAULT_OUTER_VERIFICATION_ITERS; } if (argc > arg) { inner_verification_iters = MAX(1,atoi(argv[arg])); arg++; } else { inner_verification_iters = DEFAULT_INNER_VERIFICATION_ITERS; } /* make sure that there is at least 1 inner verification iteration since this is waht we use for the performance runs*/ inner_verification_iters = MAX(1, inner_verification_iters); if(argc > arg) { performance_iters = atoi(argv[arg]); arg++; } else { performance_iters = DEFAULT_PERFORMANCE_ITERS; } #if GASNET_PAR #define PAR_USAGE "(thread count per node) " #else #define PAR_USAGE "" #endif /* Need to test_init before gasnet_attach to use TEST_LOCALPROCS() */ test_init_early("testcollperf",(performance_iters != 0), "[options] (max data size) (outer_verification_iters) (inner_verification_iters) (performance_iters) " PAR_USAGE "(test sections)\n" " The '-{src,dst}-{in,out} options selects whether src and dst\n" " buffers are in the GASNet segment or not (defaults are 'in').\n" " -szfactor \n" " selects f as growth factor for data sizes." ); #if GASNET_PAR if (argc > arg) { threads_per_node = atoi(argv[arg]); arg++; } else { if (gasnett_getenv_yesno_withdefault("GASNET_TEST_POLITE_SYNC",0)) { /* May overcommit only if somebody already expected it */ threads_per_node = gasnett_cpu_count(); } else { threads_per_node = gasnett_cpu_count() / TEST_LOCALPROCS(); } threads_per_node = MIN(threads_per_node, 4); threads_per_node = test_thread_limit(threads_per_node); threads_per_node = MAX(threads_per_node, 1); } if (threads_per_node > TEST_MAXTHREADS || threads_per_node < 1) { printf("ERROR: Threads must be between 1 and %d\n", TEST_MAXTHREADS); exit(EXIT_FAILURE); } // NO MULTI-IMAGE SUPPORT IN CURRENT COLLECTIVES if (threads_per_node > 1) { MSG0("WARNING: thread count reduced to 1 (no multi-image support)"); threads_per_node = 1; } #else threads_per_node = 1; #endif if (argc > arg) { TEST_SECTION_PARSE(argv[arg]); arg++; } if (help || argc > arg) test_usage(); /* get SPMD info */ mynode = gex_TM_QueryRank(myteam); nodes = gex_TM_QuerySize(myteam); THREADS = nodes * threads_per_node; /* do some sanity checking of the input arguments*/ /* the total memory that we will need to attach is inner_verification_iters*total_images*my_images*2*sizeof(int)*max_data_size*/ /* make sure that this value is about less than or equal to half the maximum gasnet segment */ /* if it is not scale down inner_verification_iters and scale up outer_verification_iters until we match*/ { size_t curr_req = inner_verification_iters * THREADS * threads_per_node * sizeof(int) * max_data_size * 2; size_t max_mem_usage = gasnet_getMaxGlobalSegmentSize()/2; MSG0("command line args:\n" " max_data_size = %"PRIuPTR"\n" " bytes outer_verification_iters = %d\n" " inner_verification_iters = %d\n" " performance_iters = %d\n" " threads_per_node = %d\n" " szfactor = %.2f\n" " src addresses %sside the segment\n" " dst addresses %sside the segment\n", (uintptr_t)(max_data_size*sizeof(int)), outer_verification_iters, inner_verification_iters, performance_iters, (int) threads_per_node, szfactor, (src_insegment ? "in" : "out"), (dst_insegment ? "in" : "out")); if(curr_req > max_mem_usage) { MSG0("WARNING: inner iterations too large.\n"); MSG0("Scaling down inner iterations and scaling up outer iterations to compensate\n"); while(curr_req > max_mem_usage && inner_verification_iters > 1) { inner_verification_iters /=2; outer_verification_iters *=2; curr_req = inner_verification_iters * THREADS * threads_per_node * sizeof(int) * max_data_size * 2; } /* we can't scale down inner verifications further than 1 so we have to scale down the data size until it fits*/ if(inner_verification_iters ==1 && curr_req > max_mem_usage) { MSG0("WARNING: scaled inner iterations down to 1 but still not enough room in segment."); MSG0("WARNING: scaling down datasize"); } while(inner_verification_iters == 1 && curr_req > max_mem_usage && max_data_size > 0) { max_data_size /=2; curr_req = inner_verification_iters * THREADS * threads_per_node * sizeof(int) * max_data_size * 2; } if(max_data_size ==0) { MSG0("ERROR: Segment too small ... can't run testcollperf"); gasnet_exit(1); } MSG0("adjusted args: max_data_size=%"PRIuPTR" bytes outer_verification_iters=%d inner_verification_iters=%d performance_iters=%d threads_per_node=%d ", (uintptr_t)(max_data_size*sizeof(int)), outer_verification_iters, inner_verification_iters, performance_iters, (int) threads_per_node); } } TEST_SET_WAITMODE(threads_per_node); if (0 != TEST_SEGSZ_REQUEST) { GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); } { size_t sz = SEG_PER_THREAD * threads_per_node; A = src_insegment ? (uint8_t*)TEST_MYSEG() : test_malloc(sz); B = dst_insegment ? (uint8_t*)TEST_MYSEG() + src_insegment*sz : test_malloc(sz); } my_srcs = (uint8_t**) test_malloc(sizeof(uint8_t*)*threads_per_node); my_dsts = (uint8_t**) test_malloc(sizeof(uint8_t*)*threads_per_node); td_arr = (thread_data_t*) test_malloc(sizeof(thread_data_t)*threads_per_node); for(i=0; i #define SCRATCH_SIZE (2*1024*1024) #ifndef TEST_SEGSZ #define TEST_SEGSZ (PAGESZ + 6*SCRATCH_SIZE) // 6 teams's scratch + page for comms #endif #include /* for sqrt() */ #include #ifndef SCRATCH_QUERY_FLAG #define SCRATCH_QUERY_FLAG GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED #endif static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam, rowtm, coltm; static gex_Segment_t mysegment; static gex_Rank_t myrank; static uintptr_t scratch_addr, scratch_end; // handler indices #define hidx_pong_shorthandler 200 #define hidx_rank_shorthandler 201 #define hidx_rank_medlonghandler 202 // handler functions static gasnett_atomic_t am_cntr = gasnett_atomic_init(0); void pong_shorthandler(gex_Token_t token, gex_AM_Arg_t arg0) { gex_Token_Info_t info; gex_TI_t rc = gex_Token_Info(token, &info, GEX_TI_SRCRANK); assert_always((gex_Rank_t)arg0 == info.gex_srcrank); gasnett_atomic_increment(&am_cntr, 0); } void am_validate(gex_Token_t token, gex_AM_Arg_t arg0, gex_AM_Arg_t arg1) { assert_always((gex_Rank_t)arg0 == myrank); gex_Token_Info_t info; gex_TI_t rc = gex_Token_Info(token, &info, GEX_TI_SRCRANK); assert_always((gex_Rank_t)arg1 == info.gex_srcrank); gex_AM_ReplyShort1(token, hidx_pong_shorthandler, 0, (gex_AM_Arg_t)myrank); } void rank_shorthandler(gex_Token_t token, gex_AM_Arg_t arg0, gex_AM_Arg_t arg1) { am_validate(token, arg0, arg1); } void rank_medlonghandler(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t arg0, gex_AM_Arg_t arg1) { am_validate(token, arg0, arg1); } // handler table gex_AM_Entry_t htable[] = { { hidx_pong_shorthandler, (gex_AM_Fn_t)pong_shorthandler, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_SHORT, 1 }, { hidx_rank_shorthandler, (gex_AM_Fn_t)rank_shorthandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 2 }, { hidx_rank_medlonghandler, (gex_AM_Fn_t)rank_medlonghandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDLONG, 2 } }; #define HANDLER_TABLE_SIZE (sizeof(htable)/sizeof(gex_AM_Entry_t)) // Odds-in-row team (exercise new_tmp_p = NULL case): static gex_TM_t oddtm; static void *odd_scratch; static size_t odd_scratch_sz; static void do_odds(void) { oddtm = rowtm; // init just to check whether overwritten int odd = myrank & 1; gex_TM_t *new_tm_p = odd ? &oddtm : NULL; gex_TM_Split(new_tm_p, rowtm, 0, 0, odd_scratch, odd_scratch_sz, 0); if (odd) { assert_always(oddtm != rowtm); gex_Rank_t size = gex_TM_QuerySize(oddtm); assert_always(size <= gex_TM_QuerySize(rowtm)); // Check that tie-breaks on key==0 respect order in parent team. // Taking a short-cut here knowning parent (rowtm) is in jobrank order and contiguous. gex_Rank_t first = gex_TM_TranslateRankToJobrank(oddtm, 0); for (gex_Rank_t rank = 1; rank < size; ++rank) { gex_Rank_t jobrank = gex_TM_TranslateRankToJobrank(oddtm, rank); assert_always(jobrank == first + 2*rank); } // Check gex_TM_TranslateJobrankToRank() for a guaranteed non-member assert_always(GEX_RANK_INVALID == gex_TM_TranslateJobrankToRank(oddtm,0)); } else { assert_always(oddtm == rowtm); // Should be unchanged } } // Evens only team (exercise Create) static gex_TM_t eventm; static void *even_scratch; static size_t even_scratch_sz; static void do_evens(void) { static int reps = 0; eventm = coltm; // init just to check whether overwritten int even = !(myrank & 1); gex_Rank_t nmembers = even ? (gex_TM_QuerySize(myteam) + 1)/2 : 0; gex_EP_Location_t *members = test_calloc(sizeof(gex_EP_Location_t), nmembers); for (gex_Rank_t i = 0; i < nmembers; ++ i) members[i].gex_rank = i * 2; gex_Flags_t scratch_flag = (++reps & 1) ? GEX_FLAG_TM_LOCAL_SCRATCH : GEX_FLAG_TM_NO_SCRATCH; gex_TM_Create(&eventm, 1, myteam, members, nmembers, &even_scratch, even_scratch_sz, scratch_flag); if (even) { assert_always(eventm != coltm); assert_always(gex_TM_QuerySize(eventm) == nmembers); for (gex_Rank_t rank = 0; rank < nmembers; ++rank) { gex_Rank_t jobrank = gex_TM_TranslateRankToJobrank(eventm, rank); assert_always(jobrank == 2*rank); } } else { assert_always(eventm == coltm); // Should be unchanged } test_free(members); } static void *threadmain(void *id) { if (id) { do_evens(); } else { do_odds(); } return NULL; } int main(int argc, char **argv) { gex_Rank_t peer; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testsplit", &argc, &argv, 0)); test_init("testsplit", 0, "(nrows) (ncols)"); myrank = gex_TM_QueryRank(myteam); gex_Rank_t nranks = gex_TM_QuerySize(myteam); gex_Rank_t nrows; if (argc > 1) { nrows = atoi(argv[1]); } else { /* search for as near to square as possible */ nrows = sqrt(nranks); while (nranks % nrows) --nrows; } gex_Rank_t ncols; if (argc > 2) { ncols = atoi(argv[2]); } else { ncols = nranks / nrows; } assert_always(nrows*ncols == nranks); gex_Rank_t myrow = myrank / ncols; gex_Rank_t mycol = myrank % ncols; MSG0("Running split test with a %u-by-%u grid.", (int)nrows, (int)ncols); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); BARRIER(); // Will reserve all but first page of segment for scratch space scratch_addr = PAGESZ + (uintptr_t)TEST_MYSEG(); scratch_end = TEST_SEGSZ + (uintptr_t)TEST_MYSEG(); size_t scratch_sz; // Spec says NULL new_tm_p returns zero. scratch_sz = gex_TM_Split(NULL, myteam, 0, 1, 0, 0, GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED); assert_always(scratch_sz == 0); // Row team: rowtm = myteam; // init just to check whether overwritten scratch_sz = gex_TM_Split(&rowtm, myteam, myrow, 1+2*mycol, 0, 0, SCRATCH_QUERY_FLAG); assert_always((scratch_addr + scratch_sz) <= scratch_end); gex_TM_Split(&rowtm, myteam, myrow, 1+2*mycol, (void*)scratch_addr, scratch_sz, 0); scratch_addr += scratch_sz; assert_always(rowtm != myteam); assert_always(gex_TM_QueryRank(rowtm) == mycol); assert_always(gex_TM_QuerySize(rowtm) == ncols); for (gex_Rank_t rank = 0; rank < ncols; ++rank) { gex_Rank_t jobrank = myrow*ncols + rank; assert_always(gex_TM_TranslateRankToJobrank(rowtm, rank) == jobrank); assert_always(gex_TM_TranslateJobrankToRank(rowtm, jobrank) == rank); gex_EP_Location_t ep_loc = gex_TM_TranslateRankToEP(rowtm, rank, 0); assert_always(ep_loc.gex_rank == jobrank); assert_always(ep_loc.gex_ep_index == 0); } // Column team: coltm = myteam; // init just to check whether overwritten scratch_sz = gex_TM_Split(&coltm, myteam, mycol, myrow, 0, 0, SCRATCH_QUERY_FLAG); assert_always((scratch_addr + scratch_sz) <= scratch_end); gex_TM_Split(&coltm, myteam, mycol, myrow, (void*)scratch_addr, scratch_sz, 0); scratch_addr += scratch_sz; assert_always(coltm != myteam); assert_always(gex_TM_QueryRank(coltm) == myrow); assert_always(gex_TM_QuerySize(coltm) == nrows); for (gex_Rank_t rank = 0; rank < nrows; ++rank) { gex_Rank_t jobrank = mycol + ncols*rank; assert_always(gex_TM_TranslateRankToJobrank(coltm, rank) == jobrank); assert_always(gex_TM_TranslateJobrankToRank(coltm, jobrank) == rank); gex_EP_Location_t ep_loc = gex_TM_TranslateRankToEP(coltm, rank, 0); assert_always(ep_loc.gex_rank == jobrank); assert_always(ep_loc.gex_ep_index == 0); } // Singleton team (also tests a 2nd-level split, of coltm, and GEX_FLAG_TM_NO_SCRATCH): gex_TM_t onetm = coltm; // init just to check whether overwritten gex_TM_Split(&onetm, coltm, myrank, 0, NULL, 0, GEX_FLAG_TM_NO_SCRATCH); assert_always(onetm != coltm); assert_always(gex_TM_QueryRank(onetm) == 0); assert_always(gex_TM_QuerySize(onetm) == 1); assert_always(gex_TM_TranslateRankToJobrank(onetm, 0) == myrank); assert_always(gex_TM_TranslateJobrankToRank(onetm, myrank) == 0); // Odds team tests odd_scratch = (void*)scratch_addr; odd_scratch_sz = gex_TM_Split((myrank & 1) ? &oddtm : NULL, rowtm, 0, 0, 0, 0, SCRATCH_QUERY_FLAG); assert_always((scratch_addr + odd_scratch_sz) <= scratch_end); scratch_addr += odd_scratch_sz; do_odds(); // Evens team test even_scratch = (void*)scratch_addr; even_scratch_sz = gex_TM_Create(NULL, 1, myteam, NULL, myrank & 1 ? 0 : (nranks+1)/2, NULL, 0, SCRATCH_QUERY_FLAG); assert_always((scratch_addr + even_scratch_sz) <= scratch_end); scratch_addr += even_scratch_sz; do_evens(); // "Rev" team reversing order of TM0 gex_TM_t revtm = myteam; // init just to check whether overwritten const int alpha = 7, beta = 4; int mykey = alpha + beta * (nranks - (myrank + 1)); scratch_sz = gex_TM_Split(&revtm, myteam, 0xf00, mykey, 0, 0, SCRATCH_QUERY_FLAG); assert_always((scratch_addr + scratch_sz) <= scratch_end); gex_TM_Split(&revtm, myteam, 0xf00, mykey, (void*)scratch_addr, scratch_sz, 0); scratch_addr += scratch_sz; assert_always(revtm != myteam); assert_always(gex_TM_QuerySize(revtm) == nranks); assert_always(gex_TM_QueryRank(revtm) == (nranks - (myrank + 1))); // // Some basic validation by communicating w/i the new teams // gex_Rank_t rank_var, *rank_ptr; gex_Rank_t *rank_arr = TEST_MYSEG(); rank_arr[0] = myrank; rank_arr[1] = GEX_RANK_INVALID; rank_arr[2] = GEX_RANK_INVALID; BARRIER(); // Try loopback Gets N ways: rank_ptr = TEST_MYSEG(); rank_var = gex_RMA_GetBlockingVal(myteam, myrank, rank_ptr, sizeof(gex_Rank_t), 0); assert_always(rank_var == myrank); rank_var = GEX_RANK_INVALID; gex_RMA_GetBlocking(onetm, &rank_var, 0, rank_ptr, sizeof(gex_Rank_t), 0); assert_always(rank_var == myrank); rank_var = GEX_RANK_INVALID; gex_Event_Wait(gex_RMA_GetNB(rowtm, &rank_var, mycol, rank_ptr, sizeof(gex_Rank_t), 0)); assert_always(rank_var == myrank); rank_var = GEX_RANK_INVALID; gex_RMA_GetNBI(coltm, &rank_var, myrow, rank_ptr, sizeof(gex_Rank_t), 0); gex_NBI_Wait(GEX_EC_GET, 0); assert_always(rank_var == myrank); BARRIER(); // Blocking loop-back Put on singleton team peer = 0; rank_ptr = (gex_Rank_t *)TEST_SEG_TM(onetm, peer); assert_always(rank_ptr == rank_arr); rank_var = myrank ^ 42; gex_RMA_PutBlocking(onetm, 0, rank_ptr, &rank_var, sizeof(rank_var), 0); assert_always(rank_arr[0] == rank_var); // PutNB on row ring peer = (mycol+1)%ncols; // mycol and ncols are position in, and length of, the row rank_ptr = (gex_Rank_t *)TEST_SEG_TM(rowtm, peer); gex_Event_Wait(gex_RMA_PutNB(rowtm, peer, rank_ptr+1, &myrank, sizeof(myrank), GEX_EVENT_NOW, 0)); gex_Event_Wait(gex_Coll_BarrierNB(rowtm, 0)); assert_always(rank_arr[1] == gex_TM_TranslateRankToJobrank(rowtm, (mycol+ncols-1)%ncols)); // PutNBI on col ring peer = (myrow+1)%nrows; // myrow and nrows are position in, and length of, the col rank_ptr = (gex_Rank_t *)TEST_SEG_TM(coltm, peer); gex_RMA_PutNBI(coltm, peer, rank_ptr+2, &myrank, sizeof(myrank), GEX_EVENT_NOW, 0); gex_NBI_Wait(GEX_EC_PUT, 0); gex_Event_Wait(gex_Coll_BarrierNB(coltm, 0)); assert_always(rank_arr[2] == gex_TM_TranslateRankToJobrank(coltm, (myrow+nrows-1)%nrows)); // AM tests GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); BARRIER(); peer = (mycol+1)%ncols; gex_AM_RequestShort2(rowtm, peer, hidx_rank_shorthandler, 0, (gex_AM_Arg_t)gex_TM_TranslateRankToJobrank(rowtm, peer), (gex_AM_Arg_t)myrank); peer = (myrow+1)%nrows; gex_AM_RequestMedium2(coltm, peer, hidx_rank_medlonghandler, NULL, 0, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)gex_TM_TranslateRankToJobrank(coltm, peer), (gex_AM_Arg_t)myrank); gex_AM_RequestLong2(onetm, 0, hidx_rank_medlonghandler, NULL, 0, TEST_MYSEG(), GEX_EVENT_NOW, 0, (gex_AM_Arg_t)myrank, (gex_AM_Arg_t)myrank); GASNET_BLOCKUNTIL(gasnett_atomic_read(&am_cntr,0) == 3); BARRIER(); // Barrier over evens or odds (to exercise them) and then destroy { gex_TM_t tm = (myrank & 1) ? oddtm : eventm; gex_Event_Wait(gex_Coll_BarrierNB(tm, 0)); gex_Memvec_t scratch_out; int rc = gex_TM_Destroy(tm, &scratch_out, GEX_FLAG_GLOBALLY_QUIESCED); assert_always(rc); assert_always(scratch_out.gex_addr == (void*)((myrank & 1) ? odd_scratch : even_scratch)); assert_always(scratch_out.gex_len == ((myrank & 1) ? odd_scratch_sz : even_scratch_sz)); } // REcreate and REdestroy repeatedly in an attempt to exhaust 12-bit space for (int i=0; i<4096; ++i) { do_evens(); do_odds(); assert_always(! gex_TM_Destroy((myrank & 1) ? oddtm : eventm, NULL, 0)); } // More destruction { // NO_SCRATCH case must not write to *scratch_p gex_Memvec_t scratch_out; scratch_out.gex_addr = (void*)&myclient; scratch_out.gex_len = myrank; assert_always(! gex_TM_Destroy(onetm, &scratch_out, 0)); assert_always(scratch_out.gex_addr == (void*)&myclient); assert_always(scratch_out.gex_len == myrank); } assert_always(! gex_TM_Destroy(rowtm, NULL, 0)); assert_always(! gex_TM_Destroy(coltm, NULL, 0)); assert_always(! gex_TM_Destroy(revtm, NULL, 0)); MSG("done."); gasnet_exit(0); /* for faster exit */ return 0; } gasnet-2025.8.0/tests/testvis.c0000664000175000017500000023470515142313673016444 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testvis.c $ * Description: GASNet Vector, Indexed & Strided correctness tests * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include /* select a larger than default segment, because this test needs plenty of memory to play with */ uintptr_t segsz = (16*1024*1024); #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR ((uintptr_t)alignup(segsz,PAGESZ)) #endif static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_TM_t team0; static gex_Rank_t ranks, jobrank; static gex_Segment_t mysegment; #ifndef RENUMBER_TEAM // can be defined to non-zero to use a renumbered team for communication (bug 4145) #define RENUMBER_TEAM 0 #endif #include /* VEC_SZ sets the size/offset alignment of all data accesses we support sizes 1, 4 and 8 1 provides the most general test of aligned and unaligned accesses 8 provides the best detection and diagnostics of erroneous data movements by the conduit */ #ifndef VEC_SZ #define VEC_SZ 1 #endif #if VEC_SZ == 8 #define VEC_T uint64_t #define SEG_VALUE(node, idx) (((uint64_t)0x8000000000000000ULL) | ((uint64_t)(node) << 32) | (uint64_t)(idx)) #define HEAP_VALUE(node, idx) (((uint64_t)0x0000000000000000ULL) | ((uint64_t)(node) << 32) | (uint64_t)(idx)) #define VEC_FMT "0x%08x %08x" #define VEC_STR(val) (int)TEST_HIWORD(val), (int)TEST_LOWORD(val) #elif VEC_SZ == 4 #define VEC_T uint32_t #define SEG_VALUE(node, idx) (((uint32_t)0x8000000) | (((uint32_t)(node)&0xF) << 24) | (((uint32_t)(idx))&0x00FFFFFF)) #define HEAP_VALUE(node, idx) (((uint32_t)0x0000000) | (((uint32_t)(node)&0xF) << 24) | (((uint32_t)(idx))&0x00FFFFFF)) #define VEC_FMT "0x%08x" #define VEC_STR(val) (int)(val) #elif VEC_SZ == 1 #define VEC_T uint8_t #define SEG_VALUE(node, idx) (((uint8_t)0x80) | (((uint32_t)(node)&0x7) << 4) | (((uint8_t)(idx))&0xF)) #define HEAP_VALUE(node, idx) (((uint8_t)0x00) | (((uint32_t)(node)&0x7) << 4) | (((uint8_t)(idx))&0xF)) #define VEC_FMT "0x%02x" #define VEC_STR(val) (int)(val) #else #error unknown VEC_SZ #endif #define NUM_AREAS 4 size_t max_veclen = 100; size_t max_idxlen = 8192; size_t max_stridedim = 20; size_t max_chunksz = 256; size_t max_inflight_ops = 16; #define RUN_VECTOR 1 #define RUN_INDEXED 2 #define RUN_STRIDED 4 #define RUN_TRANSPOSE 8 #define RUN_NB 16 #if GASNET_SEGMENT_EVERYTHING #define segeverything 1 #else #define segeverything 0 #endif /* shuffle the ordering in a list */ #define SHUFFLE_ARRAY(T, list, cnt) do { \ size_t _i; \ for (_i=0;_i<(cnt);_i++) { \ size_t _a = TEST_RAND(_i, (cnt)-1); \ T _tmp = (list)[_a]; \ (list)[_a] = (list)[_i]; \ (list)[_i] = _tmp; \ } \ } while(0) #define SHUFFLE_LIST(T, v) SHUFFLE_ARRAY(T, (v)->list, (v)->count) int verify = 1; int showtiming = 0; /* ------------------------------------------------------------------------------------ */ typedef struct { uint64_t checksum; size_t count; /* in segments */ uintptr_t totalsz; /* in bytes */ gex_Memvec_t *list; } test_memvec_list; void _verify_memvec_list(test_memvec_list *mv, const char *file, int line) { size_t i, sum; if (mv->checksum != test_checksum(mv->list, mv->count*sizeof(gex_Memvec_t))) FATALERR("Checksum mismatch in verify_memvec_list at %s:%i", file, line); sum = 0; for (i=0; i < mv->count; i++) { sum += mv->list[i].gex_len; } if (mv->totalsz != sum) FATALERR("totalsz mismatch in verify_memvec_list at %s:%i", file, line); } #define verify_memvec_list(mv) do { \ if (verify) _verify_memvec_list((mv), __FILE__, __LINE__); \ } while (0) /* build a memvec over the area [addr...addr+len*VEC_SZ] note elemlen is a VEC_T element count */ test_memvec_list *rand_memvec_list(void *addr, size_t elemlen, int allowoverlap) { test_memvec_list *mv; size_t count = TEST_RAND_PICK(TEST_RAND(1, MIN(max_veclen,elemlen)), TEST_RAND(1, TEST_RAND(1, TEST_RAND(1, MIN(max_veclen,elemlen))))); size_t per = 0; if (TEST_RAND_ONEIN(20)) count = 0; if (count > 0) per = elemlen / count; mv = test_calloc(1,sizeof(test_memvec_list)+count*sizeof(gex_Memvec_t)); mv->count = count; mv->list = (gex_Memvec_t *)(mv+1); mv->totalsz = 0; if (allowoverlap) { size_t i; for (i = 0; i < count; i++) { size_t offset = TEST_RAND(0, elemlen-1); size_t len = TEST_RAND(0, MIN(per,elemlen-offset)); if (TEST_RAND_ONEIN(20)) { mv->list[i].gex_addr = NULL; mv->list[i].gex_len = 0; } else { mv->list[i].gex_addr = ((VEC_T*)addr)+offset; mv->list[i].gex_len = VEC_SZ*len; mv->totalsz += VEC_SZ*len; } } } else { /* build non-overlapping, monotonically increasing vectors */ if (TEST_RAND_PICK(0,1)) { size_t i; size_t lim = 0; for (i = 0; i < count; i++) { if (TEST_RAND_ONEIN(20)) { mv->list[i].gex_addr = NULL; mv->list[i].gex_len = 0; } else { size_t offset = TEST_RAND(lim, per*(i+1)-1); size_t len = TEST_RAND(0, per*(i+1)-offset); mv->list[i].gex_addr = ((VEC_T*)addr)+offset; mv->list[i].gex_len = VEC_SZ*len; mv->totalsz += VEC_SZ*len; lim = offset + len; assert(lim <= per*(i+1) && lim <= elemlen); } } } else { size_t i; size_t lim = 0; for (i = 0; i < count; i++) { if (TEST_RAND_ONEIN(20)) { mv->list[i].gex_addr = NULL; mv->list[i].gex_len = 0; } else { size_t offset = TEST_RAND(lim, lim+(elemlen-lim)/4); size_t len = TEST_RAND(0, (elemlen-offset)/2); mv->list[i].gex_addr = ((VEC_T*)addr)+offset; mv->list[i].gex_len = VEC_SZ*len; mv->totalsz += VEC_SZ*len; lim = offset + len; assert(lim <= elemlen); } } } SHUFFLE_LIST(gex_Memvec_t,mv); } mv->checksum = test_checksum(mv->list, mv->count*sizeof(gex_Memvec_t)); verify_memvec_list(mv); return mv; } test_memvec_list *buildcontig_memvec_list(void *addr, size_t elemlen, size_t areasz) { test_memvec_list *mv = test_calloc(1,sizeof(test_memvec_list)+sizeof(gex_Memvec_t)); mv->count = 1; mv->list = (gex_Memvec_t*)(mv+1); mv->totalsz = ((uintptr_t)elemlen)*VEC_SZ; mv->list[0].gex_addr = ((VEC_T*)addr) + TEST_RAND(0,areasz-elemlen); mv->list[0].gex_len = elemlen*VEC_SZ; mv->checksum = test_checksum(mv->list, sizeof(gex_Memvec_t)); return mv; } /* make same size */ void trim_memvec_list(test_memvec_list *one, test_memvec_list *two) { test_memvec_list *p; uintptr_t totalsz = MIN(one->totalsz, two->totalsz); if (one->totalsz > totalsz) p = one; else p = two; while (p->totalsz > totalsz) { uintptr_t diff = p->totalsz - totalsz; if (diff < p->list[p->count-1].gex_len) { p->list[p->count-1].gex_len -= diff; p->totalsz -= diff; } else { p->totalsz -= p->list[p->count-1].gex_len; p->count--; } } p->checksum = test_checksum(p->list, p->count*sizeof(gex_Memvec_t)); verify_memvec_list(p); assert(one->totalsz == two->totalsz); } void _verify_memvec_data_both(test_memvec_list *src, void *result, gex_Rank_t nodeid, VEC_T *areaptr, const char *context, const char *file, int line) { VEC_T *p = result; size_t i,j; for (i = 0; i < src->count; i++) { for (j = 0; j < src->list[i].gex_len/VEC_SZ; j ++) { VEC_T srcval; VEC_T resval = *p; if (areaptr == NULL) /* local src */ srcval = ((VEC_T *)(src->list[i].gex_addr))[j]; else { /* remote src */ size_t offset = (VEC_T *)(src->list[i].gex_addr) + j - areaptr; srcval = SEG_VALUE(nodeid, offset); } if (srcval != resval) { ERR("ERROR: mismatch at memvec segment %i, element %i\n" " expected val="VEC_FMT"\n" " actual val="VEC_FMT"\n" " at %s:%s:%i\n", (int)i, (int)j, VEC_STR(srcval), VEC_STR(resval), context, file, line); { size_t sz = gasnett_format_memveclist_bufsz(src->count); char *buf = test_malloc(sz); gasnett_format_memveclist(buf, src->count, src->list); ERR("memvec: %s\n", buf); } FATALERR("testvis failed."); } p++; } } } #define verify_memvec_data(src,result,context) do { \ if (verify) _verify_memvec_data_both((src),(result),mynode,NULL,(context),__FILE__,__LINE__); \ } while (0) #define verify_memvec_data_remote(src,result,node,areaptr,context) do { \ if (verify) _verify_memvec_data_both((src),(result),(node),(areaptr),(context),__FILE__,__LINE__); \ } while (0) /* ------------------------------------------------------------------------------------ */ typedef struct { uint64_t checksum; uintptr_t totalsz; /* in bytes */ size_t count; /* in segments */ size_t chunklen; /* in bytes */ void * *list; } test_addr_list; void _verify_addr_list(test_addr_list *al, const char *file, int line) { if (al->totalsz != al->count*al->chunklen) FATALERR("Inconsistent totalsz in verify_addr_list at %s:%i", file, line); if (al->checksum != test_checksum(al->list, al->count*sizeof(void *))) FATALERR("Checksum mismatch in verify_addr_list at %s:%i", file, line); } #define verify_addr_list(al) do { \ if (verify) _verify_addr_list((al), __FILE__, __LINE__); \ } while (0) /* generate two chunksizes */ void rand_chunkelem(size_t *one, size_t *two) { if (TEST_RAND_ONEIN(2)) { size_t *tmp = one; one = two; two = tmp; } switch (TEST_RAND(0,2)) { case 0: { /* same chunksz */ *one = TEST_RAND(1, TEST_RAND(1, max_chunksz)); *two = *one; break; } case 1: { /* one a multiple of another */ size_t factor = TEST_RAND(1, TEST_RAND(1, TEST_RAND(1, max_chunksz))); *one = (TEST_RAND(factor, max_chunksz) / factor); *two = *one * factor; break; } case 2: { /* both a small multiple of underlying factor */ size_t onemult = TEST_RAND(1, 5); size_t twomult = TEST_RAND(1, 5); size_t factor = TEST_RAND(1, max_chunksz/MAX(onemult, twomult)); *one = factor * onemult; *two = factor * twomult; break; } default: FATALERR("TEST_RAND failure"); } assert(*one >= 1 && *one <= max_chunksz); assert(*two >= 1 && *two <= max_chunksz); } /* build a addrlist over the area [addr...addr+len*VEC_SZ] note elemlen is a VEC_T element count */ test_addr_list *rand_addr_list(void *addr, size_t chunkelem, size_t elemlen, int allowoverlap) { test_addr_list *al; size_t count; size_t maxchunks = MIN(max_idxlen, elemlen/chunkelem); count = TEST_RAND_PICK(TEST_RAND(1, maxchunks), TEST_RAND(1, TEST_RAND(1, TEST_RAND(1, maxchunks)))); if (TEST_RAND_ONEIN(20)) count = 0; al = test_calloc(1,sizeof(test_addr_list)+count*sizeof(void *)); al->count = count; al->list = (void **)(al+1); if (allowoverlap) { size_t i; for (i = 0; i < count; i++) { size_t offset = TEST_RAND(0, elemlen-chunkelem); al->list[i] = ((VEC_T*)addr)+offset; } } else { size_t i; size_t lim = 0; size_t per = 0; if (count > 0) { per = elemlen / count; assert(chunkelem <= per); } /* build non-overlapping, monotonically increasing vectors */ for (i = 0; i < count; i++) { size_t offset = TEST_RAND(lim, per*(i+1)-chunkelem); al->list[i] = ((VEC_T*)addr)+offset; lim = offset + chunkelem; } assert(lim <= elemlen); SHUFFLE_LIST(void *,al); } al->chunklen = chunkelem*VEC_SZ; al->totalsz = al->count*al->chunklen; al->checksum = test_checksum(al->list, al->count*sizeof(void *)); verify_addr_list(al); return al; } test_addr_list *buildcontig_addr_list(void *addr, size_t elemlen, size_t areasz) { test_addr_list *al = test_calloc(1,sizeof(test_addr_list)+sizeof(void *)); al->list = (void **)(al+1); al->list[0] = ((VEC_T*)addr) + TEST_RAND(0,areasz-elemlen); if (elemlen == 0) { al->count = 0; al->chunklen = VEC_SZ; } else { al->count = 1; al->chunklen = elemlen*VEC_SZ; } al->totalsz = ((uintptr_t)al->count)*al->chunklen; al->checksum = test_checksum(al->list, al->count*sizeof(void *)); verify_addr_list(al); return al; } /* make same size */ void trim_addr_list(test_addr_list *one, test_addr_list *two) { while (one->totalsz != two->totalsz) { test_addr_list *p; if (one->totalsz > two->totalsz) p = one; else p = two; p->count--; p->totalsz -= p->chunklen; } one->checksum = test_checksum(one->list, one->count*sizeof(void *)); two->checksum = test_checksum(two->list, two->count*sizeof(void *)); verify_addr_list(one); verify_addr_list(two); assert(one->totalsz == two->totalsz); } void _verify_addr_list_data_both(test_addr_list *src, void *result, gex_Rank_t nodeid, VEC_T *areaptr, const char *context, const char *file, int line) { VEC_T *p = result; size_t chunkelem = src->chunklen / VEC_SZ; size_t i,j; for (i = 0; i < src->count; i++) { for (j = 0; j < chunkelem; j++) { VEC_T srcval; VEC_T resval = *p; if (areaptr == NULL) /* local src */ srcval = ((VEC_T *)(src->list[i]))[j]; else { /* remote src */ size_t offset = ((VEC_T *)(src->list[i]))+j - areaptr; srcval = SEG_VALUE(nodeid, offset); } if (srcval != resval) { ERR("ERROR: mismatch at chunk %i, element %i\n" " expected val="VEC_FMT"\n" " actual val="VEC_FMT"\n" " at %s:%s:%i\n", (int)i, (int)j, VEC_STR(srcval), VEC_STR(resval), context, file, line); { size_t sz = gasnett_format_addrlist_bufsz(src->count); char *buf = test_malloc(sz); gasnett_format_addrlist(buf, src->count, src->list, src->chunklen); ERR("addrlist: %s\n", buf); } FATALERR("testvis failed."); } p++; } } } #define verify_addr_list_data(src,result,context) do { \ if (verify) _verify_addr_list_data_both((src),(result),mynode,NULL,(context),__FILE__,__LINE__); \ } while (0) #define verify_addr_list_data_remote(src,result,node,areaptr,context) do { \ if (verify) _verify_addr_list_data_both((src),(result),(node),(areaptr),(context),__FILE__,__LINE__); \ } while (0) /* ------------------------------------------------------------------------------------ */ #define PRINT_VECTOR(dest, vector, nelem) do { \ assert(sizeof(dest) > 16); \ char *_p = (dest); \ *_p++ = '['; \ for (size_t i=0; i < (nelem); i++) { \ snprintf(_p, sizeof(dest) - (_p - (dest))-3, "%lli", (long long int)(vector)[i]); \ if (i < (nelem)-1) strcat(_p, ", "); \ _p+=strlen(_p); \ } \ *_p++ = ']'; *_p = 0; \ } while (0) /* ------------------------------------------------------------------------------------ */ typedef struct { uint64_t checksum; size_t _descsz; /* in bytes */ uintptr_t totalsz; /* in bytes */ size_t srcvolume; /* in bytes */ size_t dstvolume; /* in bytes */ void *srcaddr; void *dstaddr; size_t *srcextents; /* in elem */ size_t *dstextents; /* in elem */ size_t *srcstrides; /* in bytes */ size_t *dststrides; /* in bytes */ size_t *contigstrides; /* in bytes */ size_t *count; /* count[0] in bytes, count[1+] in elem */ size_t stridelevels; } test_strided_desc; void _verify_strided_desc(test_strided_desc *sd, const char *file, int line) { size_t i; size_t sz = 1; size_t srcvol = VEC_SZ; size_t dstvol = VEC_SZ; if (sd->checksum != test_checksum(((uint64_t*)sd)+1, sd->_descsz-8)) FATALERR("Checksum mismatch in verify_strided_desc at %s:%i", file, line); sz = 1; for (i=0; i < sd->stridelevels; i++) { sz *= sd->count[i]; srcvol *= sd->srcextents[i]; dstvol *= sd->dstextents[i]; assert_always(sd->contigstrides[i] == sz); if (i == 0) assert_always(sd->count[i]/VEC_SZ <= sd->srcextents[i] && sd->count[i]/VEC_SZ <= sd->dstextents[i]); else assert_always(sd->count[i] <= sd->srcextents[i] && sd->count[i] <= sd->dstextents[i]); assert_always(sd->srcstrides[i] == srcvol); assert_always(sd->dststrides[i] == dstvol); } sz *= sd->count[i]; srcvol *= sd->srcextents[i]; dstvol *= sd->dstextents[i]; if (i == 0) assert_always(sd->count[i]/VEC_SZ <= sd->srcextents[i] && sd->count[i]/VEC_SZ <= sd->dstextents[i]); else assert_always(sd->count[i] <= sd->srcextents[i] && sd->count[i] <= sd->dstextents[i]); assert_always(sz == sd->totalsz); assert_always(sd->srcvolume == srcvol); assert_always(sd->dstvolume == dstvol); if (sz != 0) assert_always(sd->count[0] >= VEC_SZ && sd->count[0] % VEC_SZ == 0); if (sd->stridelevels > 0) { assert_always(sd->srcvolume == sd->srcstrides[sd->stridelevels-1]*sd->srcextents[sd->stridelevels]); assert_always(sd->dstvolume == sd->dststrides[sd->stridelevels-1]*sd->dstextents[sd->stridelevels]); } } #define verify_strided_desc(sd) do { \ if (verify) _verify_strided_desc((sd), __FILE__, __LINE__); \ } while (0) /* build a strided set over the area [srcaddr...srcaddr+elemlen*VEC_SZ] and [dstaddr...dstaddr+elemlen*VEC_SZ] note elemlen is a VEC_T element count */ test_strided_desc *rand_strided_desc(void *srcaddr, void *dstaddr, void *contigaddr, size_t elemlen) { size_t dim = TEST_RAND(2, TEST_RAND(2, TEST_RAND(2, max_stridedim+1))); size_t sz; test_strided_desc *sd; size_t i; if (TEST_RAND_ONEIN(10)) dim = 1; /* 1-dim (fully contiguous) */ sz = sizeof(test_strided_desc)+6*dim*sizeof(size_t); sd = test_calloc(1,sz); sd->_descsz = sz; sd->srcstrides = (size_t *)(sd+1); sd->dststrides = ((size_t *)(sd+1))+dim; sd->srcextents = ((size_t *)(sd+1))+2*dim; sd->dstextents = ((size_t *)(sd+1))+3*dim; sd->count = ((size_t *)(sd+1))+4*dim; sd->contigstrides = ((size_t *)(sd+1))+5*dim; sd->stridelevels = dim-1; { size_t volume = TEST_RAND(elemlen*7/8, elemlen); /* in elem */ size_t srcmax = 0; size_t dstmax = 0; sd->srcextents[0] = volume; sd->dstextents[0] = volume; /* choose dimensional extents */ for (i = 1; i < dim; i++) { size_t prev; prev = sd->srcextents[srcmax]; sd->srcextents[i] = TEST_RAND(1,TEST_RAND(1, prev-1)); sd->srcextents[srcmax] /= sd->srcextents[i]; sd->srcextents[i] = prev / sd->srcextents[srcmax]; if (sd->srcextents[i] > sd->srcextents[srcmax]) srcmax = i; prev = sd->dstextents[dstmax]; sd->dstextents[i] = TEST_RAND(1,TEST_RAND(1, prev-1)); sd->dstextents[dstmax] /= sd->dstextents[i]; sd->dstextents[i] = prev / sd->dstextents[dstmax]; if (sd->dstextents[i] > sd->dstextents[dstmax]) dstmax = i; } SHUFFLE_ARRAY(size_t,sd->srcextents, dim); SHUFFLE_ARRAY(size_t,sd->dstextents, dim); /* select counts */ for (i = 0; i < dim; i++) { size_t maxcnt = MIN(sd->srcextents[i],sd->dstextents[i]); sd->count[i] = TEST_RAND(TEST_RAND(1, maxcnt), maxcnt); } /* multiply up dimensions */ sd->srcvolume = VEC_SZ; sd->dstvolume = VEC_SZ; for (i = 0; i < dim; i++) { /* strides[dim-1] is calculated but ignored (harmless) */ sd->srcvolume *= sd->srcextents[i]; sd->srcstrides[i] = sd->srcvolume; sd->dstvolume *= sd->dstextents[i]; sd->dststrides[i] = sd->dstvolume; } assert(sd->srcvolume <= volume*VEC_SZ); assert(sd->dstvolume <= volume*VEC_SZ); sd->srcaddr = ((VEC_T*)srcaddr) + TEST_RAND(0, elemlen-(sd->srcvolume/VEC_SZ)); sd->dstaddr = ((VEC_T*)dstaddr) + TEST_RAND(0, elemlen-(sd->dstvolume/VEC_SZ)); if (TEST_RAND_ONEIN(20)) { /* zero sz */ sd->count[TEST_RAND(0, dim-1)] = 0; } else if (TEST_RAND_ONEIN(20)) { /* some null high dims */ size_t cnt = TEST_RAND(1, dim); for (i=dim-cnt; i < dim; i++) sd->count[i] = 1; } else if (TEST_RAND_ONEIN(20)) { /* some null low dims */ size_t cnt = TEST_RAND(1, dim); for (i=0; i < cnt; i++) sd->count[i] = 1; } else if (TEST_RAND_ONEIN(20)) { /* maximal counts */ for (i=0; i < dim; i++) sd->count[i] = MIN(sd->srcextents[i],sd->dstextents[i]); } /* compute count-dependent quantities */ sd->count[0] *= VEC_SZ; sd->totalsz = 1; for (i = 0; i < dim; i++) { sd->totalsz *= sd->count[i]; sd->contigstrides[i] = sd->totalsz; } sd->checksum = test_checksum(((uint64_t*)sd)+1, sd->_descsz-8); verify_strided_desc(sd); return sd; } } void _verify_strided_desc_data_both(test_strided_desc *desc, void *result, gex_Rank_t nodeid, VEC_T *areaptr, const char *context, const char *file, int line) { size_t dim = (desc->stridelevels+1); size_t * idx; size_t * const count = desc->count; size_t * const srcstrides = desc->srcstrides; /* size_t * const dststrides = desc->dststrides; */ VEC_T *resultp = result; size_t srcoffset = 0; /* in bytes */ size_t curdim = 0; if (desc->totalsz == 0) return; /* empty */ idx = test_calloc(sizeof(size_t), dim); while (curdim < dim) { /* body */ VEC_T srcval; VEC_T resval = *resultp; if (areaptr == NULL) /* local src */ srcval = *(VEC_T *)(((char*)desc->srcaddr) + srcoffset); else { /* remote src */ size_t fulloffset = ((VEC_T *)(((char*)desc->srcaddr) + srcoffset)) - areaptr; srcval = SEG_VALUE(nodeid, fulloffset); } if (srcval != resval) { char idxstr[255]; PRINT_VECTOR(idxstr, idx, dim); ERR("mismatch at location %s\n" " expected val="VEC_FMT"\n" " actual val="VEC_FMT"\n" " at %s:%s:%i\n", idxstr, VEC_STR(srcval), VEC_STR(resval), context, file, line); { size_t sz = gasnett_format_putsgets_bufsz(desc->stridelevels); char *buf = test_malloc(sz); gasnett_format_putsgets(buf, NULL, myteam, nodeid, desc->dstaddr, (ptrdiff_t*)desc->dststrides, desc->srcaddr, (ptrdiff_t*)desc->srcstrides, desc->count[0], desc->count+1, desc->stridelevels); ERR("strided desc: %s\n", buf); } FATALERR("testvis failed."); } /* increment */ if (idx[0] < count[0]-VEC_SZ) { idx[0] += VEC_SZ; srcoffset += VEC_SZ; assert(idx[0] < count[0]); } else { idx[0] = 0; srcoffset -= count[0]-VEC_SZ; for (curdim = 1; curdim < dim; curdim++) { if (idx[curdim] < count[curdim]-1) { idx[curdim]++; srcoffset += srcstrides[curdim-1]; assert(idx[curdim] < count[curdim]); break; } else { idx[curdim] = 0; srcoffset -= srcstrides[curdim-1]*(count[curdim]-1); } } } resultp++; } test_free(idx); } #define verify_strided_desc_data(desc,result,context) do { \ if (verify) _verify_strided_desc_data_both((desc),(result),mynode,NULL,(context),__FILE__,__LINE__); \ } while (0) #define verify_strided_desc_data_remote(desc,result,node,areaptr,context) do { \ if (verify) _verify_strided_desc_data_both((desc),(result),(node),(areaptr),(context),__FILE__,__LINE__); \ } while (0) /* ------------------------------------------------------------------------------------ */ typedef struct { uint64_t checksum; size_t _descsz; /* in bytes */ size_t totalsz; /* in bytes */ size_t srcvolume; /* in bytes */ size_t dstvolume; /* in bytes */ void *srcaddr; void *dstaddr; void *contigaddr; size_t *srcextents; /* in elems */ size_t *dstextents; /* in elems */ size_t *dim_map; /* dim_map[dst_dim] == src_dim */ size_t *rev_map; /* inverted dim_map */ ptrdiff_t *srcstrides; /* in bytes */ ptrdiff_t *dststrides; /* in bytes */ ptrdiff_t *contigstrides; /* in bytes */ size_t *count; size_t *verify_count; ptrdiff_t *verify_srcstrides; void *verify_srcaddr; void *verify_contigaddr; size_t stridelevels; size_t elemsz; } test_xpose_desc; void _verify_xpose_desc(test_xpose_desc const *xd, const char *file, int line) { if (xd->checksum != test_checksum(((uint64_t*)xd)+1, xd->_descsz-8)) FATALERR("Checksum mismatch in verify_xpose_desc at %s:%i", file, line); size_t sz = xd->elemsz; size_t srcvol = sz; size_t dstvol = sz; uint8_t *srclo = xd->srcaddr; uint8_t *srchi = srclo; uint8_t *dstlo = xd->dstaddr; uint8_t *dsthi = dstlo; uint8_t *clo = xd->contigaddr; uint8_t *chi = clo; int shuffled = (xd->dim_map == NULL); if (shuffled) { assert(!xd->dim_map && !xd->rev_map); assert(xd->verify_count && xd->verify_srcstrides); } else { assert(xd->dim_map && xd->rev_map); assert(!xd->verify_count && !xd->verify_srcstrides); } for (size_t i = 0; i < xd->stridelevels; i++) { if (!shuffled){ assert_always(xd->rev_map[xd->dim_map[i]] == i); assert_always(xd->dim_map[xd->rev_map[i]] == i); assert_always(xd->contigstrides[i] == sz); } sz *= xd->count[i]; assert_always(xd->count[i] <= xd->dstextents[i]); if (!shuffled) { assert_always(xd->count[i] <= xd->srcextents[xd->dim_map[i]]); assert_always(labs(xd->srcstrides[xd->rev_map[i]]) == srcvol); assert_always(labs(xd->dststrides[i]) == dstvol); } srcvol *= xd->srcextents[i]; dstvol *= xd->dstextents[i]; if (xd->srcstrides[i] >= 0) srchi += xd->srcstrides[i] * ((ptrdiff_t)xd->count[i] - 1); else srclo += xd->srcstrides[i] * ((ptrdiff_t)xd->count[i] - 1); if (xd->dststrides[i] >= 0) dsthi += xd->dststrides[i] * ((ptrdiff_t)xd->count[i] - 1); else dstlo += xd->dststrides[i] * ((ptrdiff_t)xd->count[i] - 1); if (xd->contigstrides[i] >= 0) chi += xd->contigstrides[i] * ((ptrdiff_t)xd->count[i] - 1); else clo += xd->contigstrides[i] * ((ptrdiff_t)xd->count[i] - 1); } assert_always(sz == xd->totalsz); if (sz != 0) assert_always(xd->elemsz >= VEC_SZ && xd->elemsz % VEC_SZ == 0); assert_always(srcvol == xd->srcvolume); assert_always(dstvol == xd->dstvolume); size_t srcbounds = srchi - srclo + xd->elemsz; size_t dstbounds = dsthi - dstlo + xd->elemsz; size_t cbounds = chi - clo + xd->elemsz; assert_always(srcbounds <= xd->srcvolume); assert_always(dstbounds <= xd->dstvolume); assert_always(cbounds == xd->totalsz); } #define verify_xpose_desc(xd) do { \ if (verify) _verify_xpose_desc((xd), __FILE__, __LINE__); \ } while (0) /* build an xpose set over the area [srcaddr...srcaddr+elemlen*VEC_SZ] and [dstaddr...dstaddr+elemlen*VEC_SZ] note elemlen is a VEC_T element count */ test_xpose_desc *rand_xpose_desc(void *srcaddr, void *dstaddr, void *contigaddr, size_t elemlen) { size_t dim = TEST_RAND(2, TEST_RAND(2, max_stridedim)); size_t sz = sizeof(test_xpose_desc)+10*dim*MAX(sizeof(ptrdiff_t),sizeof(size_t)); test_xpose_desc *xd = test_calloc(1,sz); xd->_descsz = sz; xd->stridelevels = dim; size_t vecs_per_elem = TEST_RAND(1,TEST_RAND(1,16)); xd->elemsz = VEC_SZ*vecs_per_elem; elemlen /= vecs_per_elem; xd->srcstrides = (ptrdiff_t *)(xd+1); xd->dststrides = xd->srcstrides+dim; xd->contigstrides = xd->dststrides+dim; xd->count = (size_t *)(xd->contigstrides+dim); xd->srcextents = xd->count+dim; xd->dstextents = xd->srcextents+dim; xd->dim_map = xd->dstextents+dim; xd->rev_map = xd->dim_map+dim; xd->verify_count = xd->rev_map+dim; xd->verify_srcstrides = (ptrdiff_t*)xd->verify_count+dim; size_t volume = TEST_RAND(elemlen*7/8, elemlen); /* in elem */ size_t srcmax = 0; size_t dstmax = 0; xd->srcextents[0] = volume; xd->dstextents[0] = volume; /* choose dimensional extents */ for (size_t i = 1; i < dim; i++) { size_t prev,min,max; prev = xd->srcextents[srcmax]; max = MAX(1,prev/2); min = MIN(2,max); xd->srcextents[i] = TEST_RAND(min,TEST_RAND(min, max)); xd->srcextents[srcmax] /= xd->srcextents[i]; xd->srcextents[i] = prev / xd->srcextents[srcmax]; if (xd->srcextents[i] > xd->srcextents[srcmax]) srcmax = i; prev = xd->dstextents[dstmax]; max = MAX(1,prev/2); min = MIN(2,max); xd->dstextents[i] = TEST_RAND(min,TEST_RAND(min, max)); xd->dstextents[dstmax] /= xd->dstextents[i]; xd->dstextents[i] = prev / xd->dstextents[dstmax]; if (xd->dstextents[i] > xd->dstextents[dstmax]) dstmax = i; } SHUFFLE_ARRAY(size_t,xd->srcextents, dim); SHUFFLE_ARRAY(size_t,xd->dstextents, dim); // generate a transpositional map for (size_t i = 0; i < dim; i++) { xd->dim_map[i] = i; } #if !DISABLE_TRANSPOSE SHUFFLE_ARRAY(size_t,xd->dim_map, dim); #endif for (size_t i = 0; i < dim; i++) { xd->rev_map[xd->dim_map[i]] = i; } /* select counts */ int maximizecnt = TEST_RAND_ONEIN(20); for (size_t i = 0; i < dim; i++) { size_t maxcnt = MIN(xd->srcextents[xd->dim_map[i]],xd->dstextents[i]); size_t mincnt = MIN(2,maxcnt); if (maximizecnt) xd->count[i] = maxcnt; else xd->count[i] = TEST_RAND(TEST_RAND(mincnt, maxcnt), maxcnt); } /* multiply up dimensions */ xd->srcvolume = xd->elemsz; xd->dstvolume = xd->elemsz; for (size_t i = 0; i < dim; i++) { xd->srcstrides[xd->rev_map[i]] = xd->srcvolume; xd->srcvolume *= xd->srcextents[i]; xd->dststrides[i] = xd->dstvolume; xd->dstvolume *= xd->dstextents[i]; } assert(xd->srcvolume <= volume*xd->elemsz); assert(xd->dstvolume <= volume*xd->elemsz); xd->srcaddr = ((VEC_T*)srcaddr) + TEST_RAND(0, (elemlen*vecs_per_elem)-(xd->srcvolume/VEC_SZ)); xd->dstaddr = ((VEC_T*)dstaddr) + TEST_RAND(0, (elemlen*vecs_per_elem)-(xd->dstvolume/VEC_SZ)); /* compute count-dependent quantities */ xd->totalsz = xd->elemsz; for (size_t i = 0; i < dim; i++) { xd->contigstrides[i] = (ptrdiff_t)xd->totalsz; xd->totalsz *= xd->count[i]; } xd->contigaddr = ((VEC_T*)contigaddr) + TEST_RAND(0, (elemlen*vecs_per_elem)-(xd->totalsz/VEC_SZ)); xd->verify_contigaddr = xd->contigaddr; #if !DISABLE_INVERSION #define INVERT_STRIDE(d, addr, strides, count) do { \ addr = (uint8_t*)addr + strides[d]*(ptrdiff_t)(count[d]-1); \ strides[d] = -strides[d]; \ } while (0) if (TEST_RAND_ONEIN(2)) { // invert some src dimensions for (size_t i = 0; i < dim; i++) { if (TEST_RAND_ONEIN(2)) { // flip! INVERT_STRIDE(i, xd->srcaddr, xd->srcstrides, xd->count); } } } #endif xd->verify_srcaddr = xd->srcaddr; #if !DISABLE_SHUFFLE if (TEST_RAND_ONEIN(8)) { /* shuffle dimensions on all sides */ // Swapping dimensions on both sides does not affect the semantics of a transfer, // it just permutes the canonical order in which elements are visited. // Verification uses a fixed linear element-wise traversal for the contig side, // (ie we don't permute the order of the linear verification traversal) // so it needs to also traverse the source values element-wise in their original // un-permuted order, hence we preserve the unpermuted srcstrides/count for verification. memcpy(xd->verify_count,xd->count,sizeof(size_t)*dim); memcpy(xd->verify_srcstrides,xd->srcstrides,sizeof(ptrdiff_t)*dim); for (size_t a = 0; a < dim-1; a++) { size_t const b = TEST_RAND(a+1,dim-1); assert(a != b); assert(a < dim-1); assert(b <= dim-1); #define SWAP_ENTRY(array, type) do { \ type tmp = array[a]; array[a] = array[b]; array[b] = tmp; \ } while(0) SWAP_ENTRY(xd->srcstrides, ptrdiff_t); SWAP_ENTRY(xd->dststrides, ptrdiff_t); SWAP_ENTRY(xd->contigstrides, ptrdiff_t); SWAP_ENTRY(xd->count, size_t); SWAP_ENTRY(xd->srcextents, size_t); SWAP_ENTRY(xd->dstextents, size_t); // dim_map would need more significant fixup to remain correct post-shuffle, // and we no longer really need it at this point xd->dim_map = NULL; xd->rev_map = NULL; #undef SWAP_ENTRY } #if !DISABLE_INVERSION if (TEST_RAND_ONEIN(2)) { // invert some dimensions all around for (size_t i = 0; i < dim; i++) { if (TEST_RAND_ONEIN(2)) { // flip! INVERT_STRIDE(i, xd->srcaddr, xd->srcstrides, xd->count); INVERT_STRIDE(i, xd->dstaddr, xd->dststrides, xd->count); INVERT_STRIDE(i, xd->contigaddr, xd->contigstrides, xd->count); } } } #endif } else { xd->verify_count = NULL; xd->verify_srcstrides = NULL; } #endif xd->checksum = test_checksum(((uint64_t*)xd)+1, xd->_descsz-8); verify_xpose_desc(xd); return xd; } void _verify_xpose_desc_data_both(test_xpose_desc *desc, gex_Rank_t nodeid, VEC_T *areaptr, const char *context, const char *file, int line) { size_t const dim = desc->stridelevels; size_t * const count = (desc->verify_count ? desc->verify_count : desc->count); ptrdiff_t * const srcstrides = (desc->verify_srcstrides ? desc->verify_srcstrides : desc->srcstrides); VEC_T const *resultp = desc->verify_contigaddr; ptrdiff_t srcoffset = 0; /* in bytes */ size_t curdim = 0; size_t const vecs_per_elem = desc->elemsz / VEC_SZ; assert(vecs_per_elem * VEC_SZ == desc->elemsz); if (desc->totalsz == 0) return; /* empty */ size_t * const idx = test_calloc(sizeof(size_t), dim); while (curdim < dim) { for (size_t v = 0; v < vecs_per_elem; v++) { /* body */ VEC_T srcval; VEC_T resval = *resultp; ptrdiff_t srcboffset = srcoffset + v*VEC_SZ; ptrdiff_t srcvoffset = srcboffset/VEC_SZ; assert(srcvoffset * VEC_SZ == srcboffset); VEC_T *srcptr = ((VEC_T*)desc->verify_srcaddr) + srcvoffset; ptrdiff_t areavoffset = srcptr - areaptr; if (areaptr == NULL) /* local src */ srcval = *srcptr; else { /* remote src */ srcval = SEG_VALUE(nodeid, areavoffset); } if (srcval != resval) { char idxstr[255]; PRINT_VECTOR(idxstr, idx, dim); char dimstr[255]; if (desc->dim_map) PRINT_VECTOR(dimstr, desc->dim_map, dim); else strcpy(dimstr,"(shuffled)"); ERR("mismatch at element %s.%i\n" " srcboffset= 0x%lx (%li)\n" " srcvoffset= 0x%lx (%li)\n" " areavoffset=0x%lx (%li)\n" " expected val="VEC_FMT"\n" " actual val="VEC_FMT"\n" " dim_map=%s\n" " at %s:%s:%i\n", idxstr, (int)v, (long int)srcboffset, (long int)srcboffset, (long int)srcvoffset, (long int)srcvoffset, (long int)areavoffset, (long int)areavoffset, VEC_STR(srcval), VEC_STR(resval), dimstr, context, file, line); { size_t sz = gasnett_format_putsgets_bufsz(desc->stridelevels); char *buf = test_malloc(sz); gasnett_format_putsgets(buf, NULL, myteam, nodeid, desc->dstaddr, desc->dststrides, desc->srcaddr, desc->srcstrides, desc->elemsz, desc->count, desc->stridelevels); ERR("strided desc: %s\n", buf); } FATALERR("testvis failed."); } resultp++; } // v /* increment */ for (curdim = 0; curdim < dim; curdim++) { if (idx[curdim] < count[curdim]-1) { idx[curdim]++; srcoffset += srcstrides[curdim]; assert(idx[curdim] < count[curdim]); break; } else { assert(idx[curdim] == count[curdim] - 1); idx[curdim] = 0; srcoffset -= srcstrides[curdim]*(ptrdiff_t)(count[curdim]-1); } } } // while test_free(idx); } #define verify_xpose_desc_data(desc,context) do { \ if (verify) _verify_xpose_desc_data_both((desc),mynode,NULL,(context),__FILE__,__LINE__); \ } while (0) #define verify_xpose_desc_data_remote(desc,node,areaptr,context) do { \ if (verify) _verify_xpose_desc_data_both((desc),(node),(areaptr),(context),__FILE__,__LINE__); \ } while (0) /* ------------------------------------------------------------------------------------ */ VEC_T *myseg = NULL; VEC_T *partnerseg = NULL; VEC_T *heapseg = NULL; size_t areasz; /* in elem */ int mynode, partner; VEC_T *my_seg_read_area; VEC_T *my_seg_write1_area; VEC_T *my_seg_write2_area; VEC_T *my_seg_remotewrite_area; VEC_T *my_heap_read_area; VEC_T *my_heap_write1_area; VEC_T *my_heap_write2_area; VEC_T *my_heap_unused_area; VEC_T *partner_seg_read_area; VEC_T *partner_seg_remotewrite_area; void checkmem(void) { if (verify) { /* check for corruption of read-only memory segments */ size_t i; for (i = 0; i < areasz; i++) { if (my_seg_read_area[i] != SEG_VALUE(mynode, i)) FATALERR("detected corruption in my_seg_read_area[%i]\n", (int)i); if (my_heap_read_area[i] != HEAP_VALUE(mynode, i)) FATALERR("detected corruption in my_heap_read_area[%i]\n", (int)i); } } } // restore a section of my_heap_read_area after an overwrite test void restore_heap_read_area(VEC_T *addr, size_t cnt) { ptrdiff_t const offset = addr - my_heap_read_area; assert(offset >= 0 && offset + cnt <= areasz); for (size_t i = 0; i < cnt; i++) *(addr++) = HEAP_VALUE(mynode, offset+i); } /* ------------------------------------------------------------------------------------ */ typedef struct { uint32_t packetsz; // entire packet gex_Rank_t srcjobrank; } test_pcheader_t; #define PC_VALUE(node, idx) ((((uint8_t)(node)&0xF) << 4) | (((uint8_t)(idx))&0xF)) size_t pcsend_cnt = 0; test_pcheader_t *rand_pcheader(size_t *packetsz) { size_t sz; if (TEST_RAND_ONEIN(8)) sz = 0; else if (TEST_RAND_ONEIN(8)) sz = GEX_VIS_MAX_PEERCOMPLETION; else sz = TEST_RAND(0,GEX_VIS_MAX_PEERCOMPLETION); assert_always(sz <= GEX_VIS_MAX_PEERCOMPLETION); *packetsz = sz; pcsend_cnt++; if (sz == 0) return NULL; test_pcheader_t *pcheader = test_malloc(sz); if (sz < sizeof(test_pcheader_t)) { // degenerate header memset(pcheader, (uint8_t)sz, sz); } else { pcheader->packetsz = sz; pcheader->srcjobrank = jobrank; uint8_t *payload = (uint8_t*)(pcheader+1); size_t payloadsz = sz-sizeof(test_pcheader_t); for (size_t i=0; i < payloadsz; i++) { payload[i] = PC_VALUE(jobrank, i); } } return pcheader; } void verify_pcheader(test_pcheader_t *pcheader, size_t sz, gex_Rank_t srcjobrank) { assert_always(sz <= GEX_VIS_MAX_PEERCOMPLETION); if (!verify) return; if (sz < sizeof(test_pcheader_t)) { // degenerate header uint8_t *payload = (uint8_t*)pcheader; for (size_t i=0; i < sz; i++) { uint8_t actual = payload[i]; uint8_t expect = sz; if (actual != sz) ERR("peer completion payload (sz=%i) mismatch at element %i: expect=0x%02x actual=0x%02x\n", (int)sz,(int)i,expect,actual); } } else { assert_always(pcheader->packetsz == sz); assert_always(pcheader->srcjobrank == srcjobrank); uint8_t *payload = (uint8_t*)(pcheader+1); size_t payloadsz = sz-sizeof(test_pcheader_t); for (size_t i=0; i < payloadsz; i++) { uint8_t expect = PC_VALUE(srcjobrank, i); uint8_t actual = payload[i]; if (expect != actual) ERR("peer completion payload (sz=%i) mismatch at element %i: expect=0x%02x actual=0x%02x\n", (int)sz,(int)i,expect,actual); } } } #define hidx_pcverify 250 gasnett_atomic_t pcarrival_cnt = gasnett_atomic_init(0); GASNETT_EXTERNC void pcverify_reph(gex_Token_t token, void *buf, size_t nbytes); gex_AM_Entry_t pcverify_reph_entry = { hidx_pcverify, (gex_AM_Fn_t)pcverify_reph, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_MEDIUM, 0, (void *)&pcarrival_cnt, "testvis_pcverify_reph" }; void pcverify_reph(gex_Token_t token, void *buf, size_t nbytes) { gasnett_atomic_increment(&pcarrival_cnt,0); gex_Rank_t mysender = (jobrank + ranks - 1) % ranks; // check all token properties are legit gex_Token_Info_t info; gex_TI_t rc = gex_Token_Info(token, &info, GEX_TI_ALL); assert_always(rc & GEX_TI_SRCRANK); assert_always(info.gex_srcrank == mysender); assert_always(rc & GEX_TI_EP); assert_always(info.gex_ep == myep); if (rc & GEX_TI_IS_REQ) assert_always(info.gex_is_req == 0); if (rc & GEX_TI_IS_LONG) assert_always(info.gex_is_long == 0); if (rc & GEX_TI_ENTRY) { #define CHECK_FIELD(fname) assert_always(info.gex_entry->fname == pcverify_reph_entry.fname) CHECK_FIELD(gex_index); CHECK_FIELD(gex_fnptr); CHECK_FIELD(gex_flags); CHECK_FIELD(gex_nargs); CHECK_FIELD(gex_cdata); CHECK_FIELD(gex_name); #undef CHECK_FIELD } verify_pcheader(buf, nbytes, mysender); } #ifndef PC_FREQ // 1 = always, 0 = never #define PC_FREQ 8 #endif // schedule a peer completion handler for next VIS injection, if the Fates deem #define PC_SCHEDULE(p_pcheader) do { \ if (PC_FREQ == 0 || !TEST_RAND_ONEIN(PC_FREQ)) *(p_pcheader) = 0; \ else { \ size_t _pcsz; \ test_pcheader_t *_pcaddr = rand_pcheader(&_pcsz); \ gex_VIS_SetPeerCompletionHandler(hidx_pcverify, _pcaddr, _pcsz, 0); \ *(p_pcheader) = _pcaddr; \ } \ } while (0) // release any temp storage used for peer completion injection #define PC_FREE(p_pcheader) (test_free(*(p_pcheader)),*(p_pcheader) = 0) // collective operation to check all peer completions have arrived globally void verify_pc_arrivals(void) { BARRIER(); if (!verify) return; gex_RMA_PutBlocking(myteam, partner, partner_seg_remotewrite_area, &pcsend_cnt, sizeof(pcsend_cnt), 0); BARRIER(); size_t expect = *(size_t*)my_seg_remotewrite_area; size_t actual = gasnett_atomic_read(&pcarrival_cnt,0); for (int i=0; i < 5 && actual < expect; i++) { // bounded stall for global quiescence of PC sleep(1); gasnet_AMPoll(); actual = gasnett_atomic_read(&pcarrival_cnt,0); } if (actual != expect) { ERR("peer completion arrival mismatch expect=%i actual=%i\n", (int)expect,(int)actual); } BARRIER(); } /* ------------------------------------------------------------------------------------ */ typedef struct { test_memvec_list *vsrc; test_memvec_list *vdst; test_memvec_list *vtmp; test_addr_list *isrc; test_addr_list *idst; test_addr_list *itmp; test_strided_desc *sdesc; VEC_T *stmpbuf; test_xpose_desc *xdesc; test_pcheader_t *pcheader; } test_op; #define TIME_DECL() \ struct { \ uint64_t iters; \ uint64_t minsz, maxsz, sumsz; \ gasnett_tick_t sumtm; \ double minbw, maxbw; \ } putinfo = { 0,(uint64_t)-1,0,0,0,1E300,0 }, \ getinfo = { 0,(uint64_t)-1,0,0,0,1E300,0 } #define _TIMED_OP(op,sz,pg) do { \ gasnett_tick_t _op_tm = gasnett_ticks_now(); \ int64_t const _op_sz = (sz); \ { op; } \ _op_tm = gasnett_ticks_now() - _op_tm; \ pg##info.sumsz += _op_sz; \ pg##info.sumtm += _op_tm; \ if (_op_sz > 0 && \ _op_sz < pg##info.minsz) pg##info.minsz = _op_sz; \ if (_op_sz > pg##info.maxsz) pg##info.maxsz = _op_sz; \ { double _op_bw = ((double)_op_sz)/_op_tm; \ if (_op_sz > 0 && \ _op_bw < pg##info.minbw) pg##info.minbw = _op_bw; \ if (_op_tm > 0 && \ _op_bw > pg##info.maxbw) pg##info.maxbw = _op_bw; \ } \ pg##info.iters++; \ } while (0) #define TIMED_PUT(op,sz) _TIMED_OP(op,sz,put) #define TIMED_GET(op,sz) _TIMED_OP(op,sz,get) #define _TIME_OUTPUT(flavor,pg) do { \ double _tickspersec = 1.0E18 / gasnett_ticks_to_ns(1000000000); \ double _totaldata = ((double)pg##info.sumsz) / (1024*1024); \ double _maxbw = pg##info.maxbw * _tickspersec / (1024*1024); \ double _minbw = pg##info.minbw * _tickspersec / (1024*1024); \ double _avgbw = (_totaldata / pg##info.sumtm) * _tickspersec; \ MSG(#pg #flavor" bandwidth (MB/s): %8.6f avg, %8.6f max, %8.6f min", \ _avgbw, _maxbw, _minbw); \ } while (0) #define TIME_OUTPUT(flavor) do { \ if (showtiming) _TIME_OUTPUT(flavor,put); \ if (showtiming) _TIME_OUTPUT(flavor,get); \ if (showtiming) \ MSG("data size: %8.3fMB total, %8.3fKB avg, %8.3fKB min, %8.3fKB max", \ putinfo.sumsz/1048576.0, putinfo.sumsz/1024.0/putinfo.iters, \ putinfo.minsz/1024.0, putinfo.maxsz/1024.0); \ } while (0) void doit(int iters, int runtests) { GASNET_BEGIN_FUNCTION(); test_pcheader_t *pcheader = 0; /* break up the segments and hook up our area pointers */ my_seg_read_area = myseg; my_seg_write1_area = myseg+areasz; my_seg_write2_area = myseg+2*areasz; my_seg_remotewrite_area = myseg+3*areasz; my_heap_read_area = heapseg; my_heap_write1_area = heapseg+areasz; my_heap_write2_area = heapseg+2*areasz; my_heap_unused_area = heapseg+3*areasz; partner_seg_read_area = partnerseg; partner_seg_remotewrite_area = partnerseg+3*areasz; if (verify) { /* init memory segments to known values */ size_t i; for (i = 0; i < areasz; i++) { my_seg_read_area[i] = SEG_VALUE(mynode, i); my_heap_read_area[i] = HEAP_VALUE(mynode, i); } } BARRIER(); /*---------------------------------------------------------------------------------*/ if (runtests & RUN_VECTOR) { int iter; TIME_DECL(); MSG("Vector... (max_veclen=%i)",(int)max_veclen); for (iter = 0; iter < iters; iter++) { /* put test */ { test_memvec_list *src; test_memvec_list *dst; test_memvec_list *tmp; VEC_T *src_area = TEST_RAND_PICK(my_heap_read_area, my_seg_read_area); src = rand_memvec_list(src_area, areasz, 1); dst = rand_memvec_list(partner_seg_remotewrite_area, areasz, 0); trim_memvec_list(src, dst); tmp = buildcontig_memvec_list(TEST_RAND_PICK(my_heap_write2_area, my_seg_write2_area), dst->totalsz/VEC_SZ, areasz); #define CALL(fn) fn(myteam, partner, dst->count, dst->list, src->count, src->list, flags) gex_Flags_t flags = 0; PC_SCHEDULE(&pcheader); if (src_area == my_heap_read_area && TEST_RAND_ONEIN(2)) { // LC overwrite test gex_Event_t RC = GEX_EVENT_INVALID; gex_Event_t LC = GEX_EVENT_INVALID; flags = GEX_FLAG_ENABLE_LEAF_LC; int const flavor = TEST_RAND(1,3); switch (flavor) { case 1: // NB RC = CALL(gex_VIS_VectorPutNB); LC = gex_Event_QueryLeaf(RC, GEX_EC_LC); break; case 2: // NBI CALL(gex_VIS_VectorPutNBI); break; case 3: // NBI-AR gex_NBI_BeginAccessRegion(0); CALL(gex_VIS_VectorPutNBI); RC = gex_NBI_EndAccessRegion(0); LC = gex_Event_QueryLeaf(RC, GEX_EC_LC); break; } if (LC) gex_Event_Wait(LC); else gex_NBI_Wait(GEX_EC_LC, 0); for (ptrdiff_t i=src->count-1; i >= 0; i--) // clear if (src->list[i].gex_len) memset(src->list[i].gex_addr, 0, src->list[i].gex_len); if (RC) gex_Event_Wait(RC); else gex_NBI_Wait(GEX_EC_PUT, 0); for (size_t i=0; i < src->count; i++) // restore if (src->list[i].gex_len) restore_heap_read_area(src->list[i].gex_addr, src->list[i].gex_len/VEC_SZ); } else { TIMED_PUT(CALL(gex_VIS_VectorPutBlocking),dst->totalsz); } #undef CALL verify_memvec_list(src); verify_memvec_list(dst); TIMED_GET(gex_VIS_VectorGetBlocking(myteam, tmp->count, tmp->list, partner, dst->count, dst->list, 0),dst->totalsz); verify_memvec_list(tmp); verify_memvec_list(dst); verify_memvec_data(src, tmp->list[0].gex_addr, "gasnet_putv_bulk/gasnet_getv_bulk test"); test_free(src); test_free(dst); test_free(tmp); PC_FREE(&pcheader); } /* get test */ { test_memvec_list *src; test_memvec_list *dst; test_memvec_list *tmp; void *dstarea = TEST_RAND_PICK(my_heap_write1_area, my_seg_write1_area); src = rand_memvec_list(partner_seg_read_area, areasz, 1); dst = rand_memvec_list(dstarea, areasz, 0); trim_memvec_list(src, dst); tmp = buildcontig_memvec_list(my_seg_write2_area, dst->totalsz/VEC_SZ, areasz); gex_VIS_VectorGetBlocking(myteam, dst->count, dst->list, partner, src->count, src->list, 0); verify_memvec_list(src); verify_memvec_list(dst); if ((segeverything || dstarea == my_seg_write1_area) && TEST_RAND_PICK(0,1)) { gex_VIS_VectorGetBlocking(myteam, tmp->count, tmp->list, mynode, dst->count, dst->list, 0); } else { gex_VIS_VectorPutBlocking(myteam, mynode, tmp->count, tmp->list, dst->count, dst->list, 0); } verify_memvec_list(tmp); verify_memvec_list(dst); verify_memvec_data_remote(src, tmp->list[0].gex_addr, partner, partner_seg_read_area, "gasnet_getv_bulk test"); test_free(src); test_free(dst); test_free(tmp); } TEST_PROGRESS_BAR(iter, iters); } BARRIER(); checkmem(); TIME_OUTPUT(v); } else BARRIER(); verify_pc_arrivals(); BARRIER(); /*---------------------------------------------------------------------------------*/ if (runtests & RUN_INDEXED) { int iter; TIME_DECL(); MSG("Indexed... (max_idxlen=%i, max_chunksz=%i)",(int)max_idxlen,(int)max_chunksz); for (iter = 0; iter < iters; iter++) { /* put test */ { test_addr_list *src; test_addr_list *dst; test_addr_list *tmp; size_t srcchunkelem, dstchunkelem; rand_chunkelem(&srcchunkelem, &dstchunkelem); VEC_T *src_area = TEST_RAND_PICK(my_heap_read_area, my_seg_read_area); src = rand_addr_list(src_area, srcchunkelem, areasz, 1); dst = rand_addr_list(partner_seg_remotewrite_area, dstchunkelem, areasz, 0); trim_addr_list(src, dst); tmp = buildcontig_addr_list(TEST_RAND_PICK(my_heap_write2_area, my_seg_write2_area), dst->totalsz/VEC_SZ, areasz); #define CALL(fn) fn(myteam, partner, dst->count, dst->list, dst->chunklen, src->count, src->list, src->chunklen, flags) gex_Flags_t flags = 0; PC_SCHEDULE(&pcheader); if (src_area == my_heap_read_area && TEST_RAND_ONEIN(2)) { // LC overwrite test gex_Event_t RC = GEX_EVENT_INVALID; gex_Event_t LC = GEX_EVENT_INVALID; flags = GEX_FLAG_ENABLE_LEAF_LC; int const flavor = TEST_RAND(1,3); switch (flavor) { case 1: // NB RC = CALL(gex_VIS_IndexedPutNB); LC = gex_Event_QueryLeaf(RC, GEX_EC_LC); break; case 2: // NBI CALL(gex_VIS_IndexedPutNBI); break; case 3: // NBI-AR gex_NBI_BeginAccessRegion(0); CALL(gex_VIS_IndexedPutNBI); RC = gex_NBI_EndAccessRegion(0); LC = gex_Event_QueryLeaf(RC, GEX_EC_LC); break; } if (LC) gex_Event_Wait(LC); else gex_NBI_Wait(GEX_EC_LC, 0); if (src->chunklen) for (ptrdiff_t i=src->count-1; i >= 0; i--) // clear memset(src->list[i], 0, src->chunklen); if (RC) gex_Event_Wait(RC); else gex_NBI_Wait(GEX_EC_PUT, 0); if (src->chunklen) for (size_t i=0; i < src->count; i++) // restore restore_heap_read_area(src->list[i], src->chunklen/VEC_SZ); } else { TIMED_PUT(CALL(gex_VIS_IndexedPutBlocking),dst->totalsz); } #undef CALL verify_addr_list(src); verify_addr_list(dst); TIMED_GET(gex_VIS_IndexedGetBlocking(myteam, tmp->count, tmp->list, tmp->chunklen, partner, dst->count, dst->list, dst->chunklen, 0),dst->totalsz); verify_addr_list(tmp); verify_addr_list(dst); verify_addr_list_data(src, tmp->list[0], "gasnet_puti_bulk/gasnet_geti_bulk test"); test_free(src); test_free(dst); test_free(tmp); PC_FREE(&pcheader); } /* get test */ { test_addr_list *src; test_addr_list *dst; test_addr_list *tmp; void *dstarea = TEST_RAND_PICK(my_heap_write1_area, my_seg_write1_area); size_t srcchunkelem, dstchunkelem; rand_chunkelem(&srcchunkelem, &dstchunkelem); src = rand_addr_list(partner_seg_read_area, srcchunkelem, areasz, 1); dst = rand_addr_list(dstarea, dstchunkelem, areasz, 0); trim_addr_list(src, dst); tmp = buildcontig_addr_list(my_seg_write2_area, dst->totalsz/VEC_SZ, areasz); gex_VIS_IndexedGetBlocking(myteam, dst->count, dst->list, dst->chunklen, partner, src->count, src->list, src->chunklen, 0); verify_addr_list(src); verify_addr_list(dst); if ((segeverything || dstarea == my_seg_write1_area) && TEST_RAND_PICK(0,1)) { gex_VIS_IndexedGetBlocking(myteam, tmp->count, tmp->list, tmp->chunklen, mynode, dst->count, dst->list, dst->chunklen, 0); } else { gex_VIS_IndexedPutBlocking(myteam, mynode, tmp->count, tmp->list, tmp->chunklen, dst->count, dst->list, dst->chunklen, 0); } verify_addr_list(tmp); verify_addr_list(dst); verify_addr_list_data_remote(src, tmp->list[0], partner, partner_seg_read_area, "gasnet_geti_bulk test"); test_free(src); test_free(dst); test_free(tmp); } TEST_PROGRESS_BAR(iter, iters); } BARRIER(); checkmem(); TIME_OUTPUT(i); } else BARRIER(); verify_pc_arrivals(); BARRIER(); /*---------------------------------------------------------------------------------*/ if (runtests & RUN_STRIDED) { int iter; TIME_DECL(); MSG("Strided (linear)... (max_stridedim=%i)",(int)max_stridedim); for (iter = 0; iter < iters; iter++) { /* put test */ { test_strided_desc *desc; void *srcarea = TEST_RAND_PICK(my_heap_read_area, my_seg_read_area); void *dstarea = partner_seg_remotewrite_area; void *tmparea = TEST_RAND_PICK(my_heap_write2_area, my_seg_write2_area); VEC_T *tmpbuf; desc = rand_strided_desc(srcarea, dstarea, tmparea, areasz); tmpbuf = ((VEC_T*)tmparea) + TEST_RAND(0,areasz - desc->totalsz/VEC_SZ); // randomized tmpbuf position // push strided local data to strided peer segment #define CALL(fn) fn(myteam, partner, desc->dstaddr, (ptrdiff_t*)desc->dststrides, desc->srcaddr, (ptrdiff_t*)desc->srcstrides, desc->count[0], desc->count+1, desc->stridelevels, flags) gex_Flags_t flags = 0; PC_SCHEDULE(&pcheader); if (srcarea == my_heap_read_area && TEST_RAND_ONEIN(2) && desc->totalsz > 0) { // LC overwrite test gex_Event_t RC = GEX_EVENT_INVALID; gex_Event_t LC = GEX_EVENT_INVALID; flags = GEX_FLAG_ENABLE_LEAF_LC; int const flavor = TEST_RAND(1,3); switch (flavor) { case 1: // NB RC = CALL(gex_VIS_StridedPutNB); LC = gex_Event_QueryLeaf(RC, GEX_EC_LC); break; case 2: // NBI CALL(gex_VIS_StridedPutNBI); break; case 3: // NBI-AR gex_NBI_BeginAccessRegion(0); CALL(gex_VIS_StridedPutNBI); RC = gex_NBI_EndAccessRegion(0); LC = gex_Event_QueryLeaf(RC, GEX_EC_LC); break; } if (LC) gex_Event_Wait(LC); else gex_NBI_Wait(GEX_EC_LC, 0); // clear memset(desc->srcaddr, 0, desc->count[0]); if (RC) gex_Event_Wait(RC); else gex_NBI_Wait(GEX_EC_PUT, 0); // restore restore_heap_read_area(desc->srcaddr, desc->count[0]/VEC_SZ); } else { TIMED_PUT(CALL(gex_VIS_StridedPutBlocking),desc->totalsz); } #undef CALL verify_strided_desc(desc); // pull it back to contiguous local tmp TIMED_GET(gex_VIS_StridedGetBlocking(myteam, tmpbuf, (ptrdiff_t*)desc->contigstrides, partner, desc->dstaddr, (ptrdiff_t*)desc->dststrides, desc->count[0], desc->count+1, desc->stridelevels, 0),desc->totalsz); verify_strided_desc(desc); verify_strided_desc_data(desc, tmpbuf, "gex_VIS_Strided{Put,Get}Blocking linear test"); test_free(desc); PC_FREE(&pcheader); } /* get test */ { test_strided_desc *desc; void *srcarea = partner_seg_read_area; void *dstarea = TEST_RAND_PICK(my_heap_write1_area, my_seg_write1_area); void *tmparea = my_seg_write2_area; VEC_T *tmpbuf; desc = rand_strided_desc(srcarea, dstarea, tmparea, areasz); tmpbuf = ((VEC_T*)tmparea) + TEST_RAND(0,areasz - desc->totalsz/VEC_SZ); // randomized tmpbuf position // pull strided peer data to strided local area gex_VIS_StridedGetBlocking(myteam, desc->dstaddr, (ptrdiff_t*)desc->dststrides, partner, desc->srcaddr, (ptrdiff_t*)desc->srcstrides, desc->count[0], desc->count+1, desc->stridelevels, 0); verify_strided_desc(desc); if ((segeverything || dstarea == my_seg_write1_area) && TEST_RAND_PICK(0,1)) { // loopback get: strided local data to contiguous local tmp gex_VIS_StridedGetBlocking(myteam, tmpbuf, (ptrdiff_t*)desc->contigstrides, mynode, desc->dstaddr, (ptrdiff_t*)desc->dststrides, desc->count[0], desc->count+1, desc->stridelevels, 0); } else { // loopback put: strided local data to contiguous local tmp gex_VIS_StridedPutBlocking(myteam, mynode, tmpbuf, (ptrdiff_t*)desc->contigstrides, desc->dstaddr, (ptrdiff_t*)desc->dststrides, desc->count[0], desc->count+1, desc->stridelevels, 0); } verify_strided_desc(desc); verify_strided_desc_data_remote(desc, tmpbuf, partner, partner_seg_read_area, "gex_VIS_StridedGetBlocking linear test"); test_free(desc); } TEST_PROGRESS_BAR(iter, iters); } BARRIER(); checkmem(); TIME_OUTPUT(s); } else BARRIER(); verify_pc_arrivals(); BARRIER(); /*---------------------------------------------------------------------------------*/ if ((runtests & RUN_TRANSPOSE) && max_stridedim >= 2) { TIME_DECL(); MSG("Strided (transpositional)... (max_stridedim=%i)",(int)max_stridedim); for (int iter = 0; iter < iters; iter++) { /* get test */ { void *srcarea = partner_seg_read_area; void *dstarea = NULL; // not used void *tmparea = TEST_RAND_PICK(my_heap_write1_area, my_seg_write1_area); test_xpose_desc *desc = rand_xpose_desc(srcarea, dstarea, tmparea, areasz); // pull strided peer data to contig local area gex_VIS_StridedGetBlocking(myteam, desc->contigaddr, desc->contigstrides, partner, desc->srcaddr, desc->srcstrides, desc->elemsz, desc->count, desc->stridelevels, 0); verify_xpose_desc(desc); verify_xpose_desc_data_remote(desc, partner, partner_seg_read_area, "gex_VIS_StridedGetBlocking transpose test"); test_free(desc); } /* put/get test */ { void *srcarea = TEST_RAND_PICK(my_heap_read_area, my_seg_read_area); void *dstarea = partner_seg_remotewrite_area; void *tmparea = TEST_RAND_PICK(my_heap_write2_area, my_seg_write2_area); test_xpose_desc *desc = rand_xpose_desc(srcarea, dstarea, tmparea, areasz); // push strided local data to strided peer segment PC_SCHEDULE(&pcheader); TIMED_PUT(gex_VIS_StridedPutBlocking(myteam, partner, desc->dstaddr, desc->dststrides, desc->srcaddr, desc->srcstrides, desc->elemsz, desc->count, desc->stridelevels, 0),desc->totalsz); verify_xpose_desc(desc); // pull it back to contiguous local tmp TIMED_GET(gex_VIS_StridedGetBlocking(myteam, desc->contigaddr, desc->contigstrides, partner, desc->dstaddr, desc->dststrides, desc->elemsz, desc->count, desc->stridelevels, 0),desc->totalsz); verify_xpose_desc(desc); verify_xpose_desc_data(desc, "gex_VIS_Strided{Put,Get}Blocking transpose test"); test_free(desc); PC_FREE(&pcheader); } /* get/pack test */ { void *srcarea = partner_seg_read_area; void *dstarea = TEST_RAND_PICK(my_heap_write1_area, my_seg_write1_area); void *tmparea = my_seg_write2_area; test_xpose_desc *desc = rand_xpose_desc(srcarea, dstarea, tmparea, areasz); // pull strided peer data to strided local area gex_VIS_StridedGetBlocking(myteam, desc->dstaddr, desc->dststrides, partner, desc->srcaddr, desc->srcstrides, desc->elemsz, desc->count, desc->stridelevels, 0); verify_xpose_desc(desc); if ((segeverything || dstarea == my_seg_write1_area) && TEST_RAND_PICK(0,1)) { // loopback get: strided local data to contiguous local tmp gex_VIS_StridedGetBlocking(myteam, desc->contigaddr, desc->contigstrides, mynode, desc->dstaddr, desc->dststrides, desc->elemsz, desc->count, desc->stridelevels, 0); } else { // loopback put: strided local data to contiguous local tmp gex_VIS_StridedPutBlocking(myteam, mynode, desc->contigaddr, desc->contigstrides, desc->dstaddr, desc->dststrides, desc->elemsz, desc->count, desc->stridelevels, 0); } verify_xpose_desc(desc); verify_xpose_desc_data_remote(desc, partner, partner_seg_read_area, "gex_VIS_StridedGetBlocking/pack transpose test"); test_free(desc); } TEST_PROGRESS_BAR(iter, iters); } BARRIER(); checkmem(); TIME_OUTPUT(x); } else BARRIER(); verify_pc_arrivals(); BARRIER(); /*---------------------------------------------------------------------------------*/ if (runtests & RUN_NB) { int iter; MSG("Non-blocking tests... (max_inflight_ops=%i)",(int)max_inflight_ops); for (iter = 0; iter < iters; iter++) { size_t numops = TEST_RAND(1, max_inflight_ops); gex_Event_t *events = test_calloc(sizeof(gex_Event_t), numops); test_op *ops = test_calloc(sizeof(test_op), numops); size_t opareasz = areasz / numops; size_t i; /* puts */ for(i=0; i < numops; i++) { /* VEC_T *op_my_seg_write1_area = my_seg_write1_area + opareasz*i; */ VEC_T *op_my_seg_write2_area = my_seg_write2_area + opareasz*i; /* VEC_T *op_my_heap_write1_area = my_heap_write1_area + opareasz*i; */ VEC_T *op_my_heap_write2_area = my_heap_write2_area + opareasz*i; VEC_T *op_partner_seg_remotewrite_area = partner_seg_remotewrite_area + opareasz*i; int last_case = 4; if (max_stridedim < 2) last_case = 3; gex_Flags_t flags = TEST_RAND_PICK(0,GEX_FLAG_IMMEDIATE); if (!(flags & GEX_FLAG_IMMEDIATE)) PC_SCHEDULE(&(ops[i].pcheader)); // peer completion currently prohibited with IMMEDIATE int fail; switch (TEST_RAND(1,last_case)) { case 1: { ops[i].vsrc = rand_memvec_list(TEST_RAND_PICK(my_heap_read_area, my_seg_read_area), areasz, 1); ops[i].vdst = rand_memvec_list(op_partner_seg_remotewrite_area, opareasz, 0); trim_memvec_list(ops[i].vsrc, ops[i].vdst); ops[i].vtmp = buildcontig_memvec_list(TEST_RAND_PICK(op_my_heap_write2_area, op_my_seg_write2_area), ops[i].vdst->totalsz/VEC_SZ, opareasz); reputv: if (TEST_RAND_ONEIN(2)) { events[i] = gex_VIS_VectorPutNB(myteam, partner, ops[i].vdst->count, ops[i].vdst->list, ops[i].vsrc->count, ops[i].vsrc->list, flags); fail = (events[i] == GEX_EVENT_NO_OP); } else fail = gex_VIS_VectorPutNBI(myteam, partner, ops[i].vdst->count, ops[i].vdst->list, ops[i].vsrc->count, ops[i].vsrc->list, flags); verify_memvec_list(ops[i].vsrc); verify_memvec_list(ops[i].vdst); if (fail) { assert_always(flags & GEX_FLAG_IMMEDIATE); events[i] = 0; flags &= ~GEX_FLAG_IMMEDIATE; goto reputv; } break; } case 2: { size_t srcchunkelem, dstchunkelem; rand_chunkelem(&srcchunkelem, &dstchunkelem); ops[i].isrc = rand_addr_list(TEST_RAND_PICK(my_heap_read_area, my_seg_read_area), srcchunkelem, areasz, 1); ops[i].idst = rand_addr_list(op_partner_seg_remotewrite_area, dstchunkelem, opareasz, 0); trim_addr_list(ops[i].isrc, ops[i].idst); ops[i].itmp = buildcontig_addr_list(TEST_RAND_PICK(op_my_heap_write2_area, op_my_seg_write2_area), ops[i].idst->totalsz/VEC_SZ, opareasz); reputi: if (TEST_RAND_ONEIN(2)) { events[i] = gex_VIS_IndexedPutNB(myteam, partner, ops[i].idst->count, ops[i].idst->list, ops[i].idst->chunklen, ops[i].isrc->count, ops[i].isrc->list, ops[i].isrc->chunklen, flags); fail = (events[i] == GEX_EVENT_NO_OP); } else fail = gex_VIS_IndexedPutNBI(myteam, partner, ops[i].idst->count, ops[i].idst->list, ops[i].idst->chunklen, ops[i].isrc->count, ops[i].isrc->list, ops[i].isrc->chunklen, flags); verify_addr_list(ops[i].isrc); verify_addr_list(ops[i].idst); if (fail) { assert_always(flags & GEX_FLAG_IMMEDIATE); events[i] = 0; flags &= ~GEX_FLAG_IMMEDIATE; goto reputi; } break; } case 3: { void *srcarea = TEST_RAND_PICK(my_heap_read_area, my_seg_read_area); void *dstarea = op_partner_seg_remotewrite_area; void *tmparea = TEST_RAND_PICK(op_my_heap_write2_area, op_my_seg_write2_area); ops[i].sdesc = rand_strided_desc(srcarea, dstarea, tmparea, opareasz); ops[i].stmpbuf = ((VEC_T*)tmparea) + TEST_RAND(0,opareasz - ops[i].sdesc->totalsz/VEC_SZ); reputs: if (TEST_RAND_ONEIN(2)) { events[i] = gex_VIS_StridedPutNB(myteam, partner, ops[i].sdesc->dstaddr, (ptrdiff_t*)ops[i].sdesc->dststrides, ops[i].sdesc->srcaddr, (ptrdiff_t*)ops[i].sdesc->srcstrides, ops[i].sdesc->count[0], ops[i].sdesc->count+1, ops[i].sdesc->stridelevels, flags); fail = (events[i] == GEX_EVENT_NO_OP); } else fail = gex_VIS_StridedPutNBI(myteam, partner, ops[i].sdesc->dstaddr, (ptrdiff_t*)ops[i].sdesc->dststrides, ops[i].sdesc->srcaddr, (ptrdiff_t*)ops[i].sdesc->srcstrides, ops[i].sdesc->count[0], ops[i].sdesc->count+1, ops[i].sdesc->stridelevels, flags); verify_strided_desc(ops[i].sdesc); if (fail) { assert_always(flags & GEX_FLAG_IMMEDIATE); events[i] = 0; flags &= ~GEX_FLAG_IMMEDIATE; goto reputs; } break; } case 4: { void *srcarea = TEST_RAND_PICK(my_heap_read_area, my_seg_read_area); void *dstarea = op_partner_seg_remotewrite_area; void *tmparea = TEST_RAND_PICK(op_my_heap_write2_area, op_my_seg_write2_area); ops[i].xdesc = rand_xpose_desc(srcarea, dstarea, tmparea, opareasz); reputx: if (TEST_RAND_ONEIN(2)) { events[i] = gex_VIS_StridedPutNB(myteam, partner, ops[i].xdesc->dstaddr, ops[i].xdesc->dststrides, ops[i].xdesc->srcaddr, ops[i].xdesc->srcstrides, ops[i].xdesc->elemsz, ops[i].xdesc->count, ops[i].xdesc->stridelevels, flags); fail = (events[i] == GEX_EVENT_NO_OP); } else fail = gex_VIS_StridedPutNBI(myteam, partner, ops[i].xdesc->dstaddr, ops[i].xdesc->dststrides, ops[i].xdesc->srcaddr, ops[i].xdesc->srcstrides, ops[i].xdesc->elemsz, ops[i].xdesc->count, ops[i].xdesc->stridelevels, flags); verify_xpose_desc(ops[i].xdesc); if (fail) { assert_always(flags & GEX_FLAG_IMMEDIATE); events[i] = 0; flags &= ~GEX_FLAG_IMMEDIATE; goto reputx; } break; } } } /* sync */ gex_Event_WaitAll(events, numops, 0); gex_NBI_Wait(GEX_EC_ALL,0); for(i=0; i < numops; i++) PC_FREE(&(ops[i].pcheader)); /* gets */ for(i=0; i < numops; i++) { gex_Flags_t flags = TEST_RAND_PICK(0,GEX_FLAG_IMMEDIATE); int fail; if (ops[i].vsrc != NULL) { assert(ops[i].vdst != NULL && ops[i].vtmp != NULL); regetv: if (TEST_RAND_ONEIN(2)) { events[i] = gex_VIS_VectorGetNB(myteam, ops[i].vtmp->count, ops[i].vtmp->list, partner, ops[i].vdst->count, ops[i].vdst->list, flags); fail = (events[i] == GEX_EVENT_NO_OP); } else fail = gex_VIS_VectorGetNBI(myteam, ops[i].vtmp->count, ops[i].vtmp->list, partner, ops[i].vdst->count, ops[i].vdst->list, flags); verify_memvec_list(ops[i].vtmp); verify_memvec_list(ops[i].vdst); if (fail) { assert_always(flags & GEX_FLAG_IMMEDIATE); events[i] = 0; flags &= ~GEX_FLAG_IMMEDIATE; goto regetv; } } else if (ops[i].isrc != NULL) { assert(ops[i].idst != NULL && ops[i].itmp != NULL); regeti: if (TEST_RAND_ONEIN(2)) { events[i] = gex_VIS_IndexedGetNB(myteam, ops[i].itmp->count, ops[i].itmp->list, ops[i].itmp->chunklen, partner, ops[i].idst->count, ops[i].idst->list, ops[i].idst->chunklen, flags); fail = (events[i] == GEX_EVENT_NO_OP); } else fail = gex_VIS_IndexedGetNBI(myteam, ops[i].itmp->count, ops[i].itmp->list, ops[i].itmp->chunklen, partner, ops[i].idst->count, ops[i].idst->list, ops[i].idst->chunklen, flags); verify_addr_list(ops[i].itmp); verify_addr_list(ops[i].idst); if (fail) { assert_always(flags & GEX_FLAG_IMMEDIATE); events[i] = 0; flags &= ~GEX_FLAG_IMMEDIATE; goto regeti; } } else if (ops[i].sdesc != NULL) { regets: if (TEST_RAND_ONEIN(2)) { events[i] = gex_VIS_StridedGetNB(myteam, ops[i].stmpbuf, (ptrdiff_t*)ops[i].sdesc->contigstrides, partner, ops[i].sdesc->dstaddr, (ptrdiff_t*)ops[i].sdesc->dststrides, ops[i].sdesc->count[0], ops[i].sdesc->count+1, ops[i].sdesc->stridelevels, flags); fail = (events[i] == GEX_EVENT_NO_OP); } else fail = gex_VIS_StridedGetNBI(myteam, ops[i].stmpbuf, (ptrdiff_t*)ops[i].sdesc->contigstrides, partner, ops[i].sdesc->dstaddr, (ptrdiff_t*)ops[i].sdesc->dststrides, ops[i].sdesc->count[0], ops[i].sdesc->count+1, ops[i].sdesc->stridelevels, flags); verify_strided_desc(ops[i].sdesc); if (fail) { assert_always(flags & GEX_FLAG_IMMEDIATE); events[i] = 0; flags &= ~GEX_FLAG_IMMEDIATE; goto regets; } } else { assert(ops[i].xdesc != NULL); regetx: if (TEST_RAND_ONEIN(2)) { events[i] = gex_VIS_StridedGetNB(myteam, ops[i].xdesc->contigaddr, ops[i].xdesc->contigstrides, partner, ops[i].xdesc->dstaddr, ops[i].xdesc->dststrides, ops[i].xdesc->elemsz, ops[i].xdesc->count, ops[i].xdesc->stridelevels, flags); fail = (events[i] == GEX_EVENT_NO_OP); } else fail = gex_VIS_StridedGetNBI(myteam, ops[i].xdesc->contigaddr, ops[i].xdesc->contigstrides, partner, ops[i].xdesc->dstaddr, ops[i].xdesc->dststrides, ops[i].xdesc->elemsz, ops[i].xdesc->count, ops[i].xdesc->stridelevels, flags); verify_xpose_desc(ops[i].xdesc); if (fail) { assert_always(flags & GEX_FLAG_IMMEDIATE); events[i] = 0; flags &= ~GEX_FLAG_IMMEDIATE; goto regetx; } } } /* sync */ gex_Event_WaitAll(events, numops, 0); gex_NBI_Wait(GEX_EC_ALL,0); for(i=0; i < numops; i++) { if (ops[i].vsrc != NULL) { assert(ops[i].vdst != NULL && ops[i].vtmp != NULL); verify_memvec_list(ops[i].vsrc); verify_memvec_list(ops[i].vdst); verify_memvec_list(ops[i].vtmp); verify_memvec_data(ops[i].vsrc, ops[i].vtmp->list[0].gex_addr, "non-blocking gasnet_putv_bulk/gasnet_getv_bulk test"); test_free(ops[i].vsrc); test_free(ops[i].vdst); test_free(ops[i].vtmp); } else if (ops[i].isrc != NULL) { assert(ops[i].idst != NULL && ops[i].itmp != NULL); verify_addr_list(ops[i].isrc); verify_addr_list(ops[i].idst); verify_addr_list(ops[i].itmp); verify_addr_list_data(ops[i].isrc, ops[i].itmp->list[0], "non-blocking gasnet_puti_bulk/gasnet_geti_bulk test"); test_free(ops[i].isrc); test_free(ops[i].idst); test_free(ops[i].itmp); } else if (ops[i].sdesc) { assert(ops[i].sdesc != NULL && ops[i].stmpbuf != NULL); verify_strided_desc_data(ops[i].sdesc, ops[i].stmpbuf, "gasnet_puts_bulk/gasnet_gets_bulk test"); test_free(ops[i].sdesc); } else { assert(ops[i].xdesc); verify_xpose_desc_data(ops[i].xdesc, "gasnet_puts_bulk/gasnet_gets_bulk test"); test_free(ops[i].xdesc); } } test_free(events); test_free(ops); TEST_PROGRESS_BAR(iter, iters); } BARRIER(); checkmem(); } else BARRIER(); verify_pc_arrivals(); /*---------------------------------------------------------------------------------*/ BARRIER(); } /* ------------------------------------------------------------------------------------ */ int main(int argc, char **argv) { int iters = 100; int seedoffset = 0; int runtests = 0; int halfduplex = 0; int i; assert_always(VEC_SZ == sizeof(VEC_T)); GASNET_Safe(gex_Client_Init(&myclient, &myep, &team0, "testvis", &argc, &argv, 0)); test_init_early("testvis",0, "[options] (iters) (seed)\n" " -v/-i/-s/-x/-n run vector/indexed/strided/transpositional/non-blocking tests (defaults to all)\n" " -d disable correctness verification checks\n" " -o one-way (half duplex) mode\n" " -t enable timing output\n" " -mm segment space to use (in MB)\n" " -mv max vector length (in elements)\n" " -mi max index addr list length (in elements)\n" " -ms max striding dimensions\n" " -mn max in-flight non-blocking operations\n" " -mc max chunk size (in bytes)\n" " iters number of testing iterations\n" " seed seed offset for PRNG \n" ); for (i = 1; i < argc; i++) { if (argv[i][0] == '-' && (argv[i][1] == 'm' || argv[i][1] == 'M')) { char argtype = argv[i][2]; char *valptr = &argv[i][3]; if (!*valptr) { if (i+1 < argc) valptr = argv[++i]; else test_usage_early(); } int64_t argval = gasnett_parse_int(valptr, 0); if (argval == 0) test_usage_early(); switch(argtype) { // -m* case 'm': case 'M': segsz = gasnett_parse_int(valptr, 1024*1024); break; case 'v': case 'V': max_veclen = argval; break; case 'i': case 'I': max_idxlen = argval; break; case 's': case 'S': max_stridedim = argval; break; case 'c': case 'C': max_chunksz = gasnett_parse_int(valptr, 1); break; case 'n': case 'N': max_inflight_ops = argval; break; default: test_usage_early(); } } else if (argv[i][0] == '-') { int j; for (j = 1; argv[i][j]; j++) { switch(argv[i][j]) { case 'v': case 'V': runtests |= RUN_VECTOR; break; case 'i': case 'I': runtests |= RUN_INDEXED; break; case 's': case 'S': runtests |= RUN_STRIDED; break; case 'x': case 'X': runtests |= RUN_TRANSPOSE; break; case 'n': case 'N': runtests |= RUN_NB; break; case 'd': case 'D': verify = 0; break; case 'o': case 'O': halfduplex = 1; break; case 't': case 'T': showtiming = 1; break; default: test_usage_early(); } } } else break; } int runall = RUN_VECTOR | RUN_INDEXED | RUN_STRIDED | RUN_TRANSPOSE | RUN_NB; if (runtests == 0) runtests = runall; if (i < argc) { iters = atoi(argv[i]); i++; } if (i < argc) { seedoffset = atoi(argv[i]); i++; } if (i < argc) test_usage_early(); GASNET_Safe(gex_Segment_Attach(&mysegment, team0, TEST_SEGSZ_REQUEST)); jobrank = gex_TM_QueryRank(team0); ranks = gex_TM_QuerySize(team0); #if RENUMBER_TEAM // use a non-primordial team that rotates all the rank numbers by RENUMBER_TEAM gex_TM_Split(&myteam, team0, 0, (jobrank+RENUMBER_TEAM)%ranks, 0, 0, GEX_FLAG_TM_NO_SCRATCH); #else myteam = team0; #endif areasz = TEST_SEGSZ/NUM_AREAS/VEC_SZ; /* in elem */ mynode = gex_TM_QueryRank(myteam); myseg = TEST_SEG(jobrank); partner = (mynode + 1) % ranks; partnerseg = TEST_SEG((partner+ranks-(RENUMBER_TEAM%ranks))%ranks); heapseg = (VEC_T *)test_malloc(TEST_SEGSZ); assert_always(gex_EP_RegisterHandlers(myep, &pcverify_reph_entry, 1) == GASNET_OK); if (seedoffset == 0) { seedoffset = (((unsigned int)TIME()) & 0xFFFF); TEST_BCAST(&seedoffset, 0, &seedoffset, sizeof(seedoffset)); } TEST_SRAND(mynode+seedoffset); char segstr[64]; gasnett_format_number(segsz, segstr, sizeof(segstr), 1); MSG("running %i iterations of %s%s%s%s%s%s test (seed=%i, VEC_SZ=%i, PC_FREQ=%i, segsz=%s)%s...", iters, (halfduplex?"half-duplex ":""), (runtests&RUN_VECTOR?"V":""), (runtests&RUN_INDEXED?"I":""), (runtests&RUN_STRIDED?"S":""), (runtests&RUN_TRANSPOSE?"X":""), (runtests&RUN_NB?"N":""), mynode+seedoffset, VEC_SZ, PC_FREQ, segstr, (verify?"":" (verification disabled)") ); if (halfduplex && mynode % 2 == 1) runtests = 0; /* odd nodes passive */ doit(iters, runtests); test_free(heapseg); #if RENUMBER_TEAM gex_Memvec_t junk; gex_TM_Destroy(myteam, &junk, GEX_FLAG_GLOBALLY_QUIESCED); #endif MSG("done."); gasnet_exit(0); return 0; } gasnet-2025.8.0/tests/testcore5.c0000664000175000017500000002763515142313673016662 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testcore5.c $ * Description: GASNet Active Messages var args conformance/correctness test * Copyright (c) 2013, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; size_t maxsz = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR (2*(uintptr_t)maxsz) #endif #include #if PLATFORM_ARCH_32 #define MAX_ARGS 8 #else #define MAX_ARGS 16 #endif gex_AM_Arg_t rand_args[MAX_ARGS]; #define RAND_ARG(idx) (rand_args[(idx)-1]) uint8_t *rand_payload; int iters = 10; gex_Rank_t mynode = 0; gex_Rank_t peer = 0; gex_Rank_t from = 0; uint8_t *myseg = NULL; uint8_t *peerseg = NULL; uint8_t *fromseg = NULL; #define hidx_mybase 150 #define hidx_ping_shorthandler (hidx_mybase + 1) #define hidx_pong_shorthandler (hidx_mybase + 2) #define hidx_ping_medhandler (hidx_mybase + 3) #define hidx_pong_medhandler (hidx_mybase + 4) #define hidx_ping_longhandler (hidx_mybase + 5) #define hidx_pong_longhandler (hidx_mybase + 6) /* For > 0 args we use first arg to distinguish request/reply */ #define hidx_Shandler(args) (hidx_mybase + 3*args + 4) #define hidx_Mhandler(args) (hidx_mybase + 3*args + 5) #define hidx_Lhandler(args) (hidx_mybase + 3*args + 6) /* Preprocess-time iterator with distinct base case */ #define HITER1(base,macro) base #define HITER2(base,macro) HITER1(base,macro) macro(2) #define HITER3(base,macro) HITER2(base,macro) macro(3) #define HITER4(base,macro) HITER3(base,macro) macro(4) #define HITER5(base,macro) HITER4(base,macro) macro(5) #define HITER6(base,macro) HITER5(base,macro) macro(6) #define HITER7(base,macro) HITER6(base,macro) macro(7) #define HITER8(base,macro) HITER7(base,macro) macro(8) #define HITER9(base,macro) HITER8(base,macro) macro(9) #define HITER10(base,macro) HITER9(base,macro) macro(10) #define HITER11(base,macro) HITER10(base,macro) macro(11) #define HITER12(base,macro) HITER11(base,macro) macro(12) #define HITER13(base,macro) HITER12(base,macro) macro(13) #define HITER14(base,macro) HITER13(base,macro) macro(14) #define HITER15(base,macro) HITER14(base,macro) macro(15) #define HITER16(base,macro) HITER15(base,macro) macro(16) #define HARG_(val) , RAND_ARG(val) #define HARGS(args) HITER##args(arg1+RAND_ARG(1),HARG_) #define HARGPROTO_(val) , gex_AM_Arg_t arg##val #define HARGPROTO(args) HITER##args(gex_AM_Arg_t arg1,HARGPROTO_) /* Simpler iterator over required arg counts */ #if PLATFORM_ARCH_32 #define HFOREACH(macro) \ macro(1) macro(2) macro(3) macro(4) \ macro(5) macro(6) macro(7) macro(8) #else #define HFOREACH(macro) \ macro(1) macro(2) macro(3) macro(4) \ macro(5) macro(6) macro(7) macro(8) \ macro(9) macro(10) macro(11) macro(12)\ macro(13) macro(14) macro(15) macro(16) #endif #define MSZ(args) \ MIN(maxsz,MIN(gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,args), \ gex_AM_MaxReplyMedium (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,args))) #define LSZ(args) \ MIN(maxsz,MIN(gex_AM_MaxRequestLong(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,args), \ gex_AM_MaxReplyLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,args))) #define DEST(n) myteam, (n) #define SARGS(dest,args) (dest, hidx_Shandler(args), 0, HARGS(args)) #define MARGS(dest,args) (dest, hidx_Mhandler(args), rand_payload, MSZ(args), \ GEX_EVENT_NOW, 0, HARGS(args)) #define LARGS(dest,args,isRep) (dest, hidx_Lhandler(args), rand_payload, \ LSZ(args), (isRep?fromseg:peerseg) + isRep*LSZ(args), \ GEX_EVENT_NOW, 0, HARGS(args)) /* NOTE: This extra step appears needed for pgcc (bug 2796) */ #define DO_CALL(fn,args) (fn args) enum { op_done, op_srep, op_mrep, op_lrep }; #define HCHECK(val) ; assert_always(arg##val == RAND_ARG(val)) #define HBODY(args) do { \ gex_AM_Arg_t operation = arg1 - RAND_ARG(1); \ gex_Rank_t srcid = test_msgsource(token); \ assert_always(srcid == (operation == op_done ? peer : from)); \ HITER##args((void)0,HCHECK); \ arg1 = op_done; \ switch(operation) { \ case op_done: \ flag++; \ break; \ case op_srep: \ DO_CALL(gex_AM_ReplyShort, SARGS(token,args)); \ break; \ case op_mrep: \ DO_CALL(gex_AM_ReplyMedium, MARGS(token,args)); \ break; \ case op_lrep: \ DO_CALL(gex_AM_ReplyLong, LARGS(token,args,1)); \ break; \ default: \ FATALERR("Invalid operation = %d", (int)operation); \ } \ } while(0); #define HDEFN(args) \ void Shandler##args(gex_Token_t token, HARGPROTO(args)) \ { HBODY(args); } \ void Mhandler##args(gex_Token_t token, void *buf, size_t nbytes, HARGPROTO(args))\ { MSGCHECK(MSZ(args)); HBODY(args); } \ void Lhandler##args(gex_Token_t token, void *buf, size_t nbytes, HARGPROTO(args))\ { MSGCHECK(LSZ(args)); memset(buf, 0xa5, nbytes); HBODY(args); } #define HTABLE(args) \ { hidx_Shandler(args), (gex_AM_Fn_t)Shandler##args, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_SHORT, args }, \ { hidx_Mhandler(args), (gex_AM_Fn_t)Mhandler##args, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_MEDIUM, args }, \ { hidx_Lhandler(args), (gex_AM_Fn_t)Lhandler##args, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_LONG, args }, #define HTEST(args) \ MSG0("testing %d-argument AM calls", args); \ for (i = 0; i < iters; ++i) { \ gex_AM_Arg_t arg1; \ int goal = flag + 1; \ randomize(); \ arg1 = op_srep; \ DO_CALL(gex_AM_RequestShort,SARGS(DEST(peer),args)); \ GASNET_BLOCKUNTIL(flag == goal); ++goal; \ arg1 = op_mrep; \ DO_CALL(gex_AM_RequestMedium,MARGS(DEST(peer),args)); \ GASNET_BLOCKUNTIL(flag == goal); ++goal; \ arg1 = op_lrep; \ DO_CALL(gex_AM_RequestLong,LARGS(DEST(peer),args,0)); \ GASNET_BLOCKUNTIL(flag == goal); ++goal; \ } #define MSGCHECK(size) do { \ assert_always(nbytes == size); \ if (memcmp(buf, rand_payload, nbytes)) \ FATALERR("Payload verification failed in %s", \ GASNETT_CURRENT_FUNCTION); \ } while(0) /* Define all the handlers */ volatile int flag = 0; HFOREACH(HDEFN) void ping_shorthandler(gex_Token_t token) { gex_AM_ReplyShort(token, hidx_pong_shorthandler, 0); } void pong_shorthandler(gex_Token_t token) { flag++; } void ping_medhandler(gex_Token_t token, void *buf, size_t nbytes) { MSGCHECK(MSZ(0)); gex_AM_ReplyMedium(token, hidx_pong_medhandler, rand_payload, nbytes, GEX_EVENT_NOW, 0); } void pong_medhandler(gex_Token_t token, void *buf, size_t nbytes) { MSGCHECK(MSZ(0)); flag++; } void ping_longhandler(gex_Token_t token, void *buf, size_t nbytes) { MSGCHECK(LSZ(0)); memset(buf, 0xa5, nbytes); gex_AM_ReplyLong(token, hidx_pong_longhandler, rand_payload, nbytes, fromseg + LSZ(0), GEX_EVENT_NOW, 0); } void pong_longhandler(gex_Token_t token, void *buf, size_t nbytes) { MSGCHECK(LSZ(0)); memset(buf, 0xa5, nbytes); flag++; } static void randomize(void) { int i; BARRIER(); for (i=0; i 1) iters = atoi(argv[1]); if (iters <= 0) iters = 10; if (argc > 2) maxsz = (size_t)gasnett_parse_int(argv[2], 1); if (maxsz <= 0) maxsz = 2*1024*1024; medsz = MAX(gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0), gex_AM_MaxReplyMedium (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0)); medsz = MIN(maxsz, medsz); longsz = MAX(gex_AM_MaxRequestLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0), gex_AM_MaxReplyLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0)); longsz = MIN(maxsz, longsz); maxsz = MAX(medsz,longsz); if (argc > 3) seed = atoi(argv[3]); if (!seed) seed = (int)TIME(); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testcore5", 0, "(iters) (maxsz) (seed)"); if (argc > 4) test_usage(); TEST_BCAST(&seed, 0, &seed, sizeof(seed)); TEST_SRAND(seed); TEST_PRINT_CONDUITINFO(); mynode = gex_TM_QueryRank(myteam); gex_Rank_t nnodes = gex_TM_QuerySize(myteam); if (nnodes%2) { // w/ odd # of ranks, last one talks to self int last = nnodes - 1; if (mynode == last) { peer = from = mynode; } else { peer = (mynode + 1) % last; from = (mynode + last - 1) % last; } } else { peer = (mynode + 1) % nnodes; from = (mynode + nnodes - 1) % nnodes; } myseg = TEST_MYSEG(); peerseg = TEST_SEG(peer); fromseg = TEST_SEG(from); rand_payload = test_malloc(maxsz); MSG0("Running %i iterations of var args AM interface tests with medsz=%"PRIuPTR" longsz=%"PRIuPTR" seed=%u", iters, (uintptr_t)medsz, (uintptr_t)longsz, seed); MSG0("testing 0-argument AM calls"); for (i = 0; i < iters; ++i) { int goal = flag + 1; randomize(); gex_AM_RequestShort(myteam, peer, hidx_ping_shorthandler, 0); GASNET_BLOCKUNTIL(flag == goal); ++goal; gex_AM_RequestMedium(myteam, peer, hidx_ping_medhandler, rand_payload, MSZ(0), GEX_EVENT_NOW, 0); GASNET_BLOCKUNTIL(flag == goal); ++goal; gex_AM_RequestLong(myteam, peer, hidx_ping_longhandler, rand_payload, LSZ(0), peerseg, GEX_EVENT_NOW, 0); GASNET_BLOCKUNTIL(flag == goal); ++goal; } /* Now 1 ... 8 or 16 */ HFOREACH(HTEST) BARRIER(); MSG("done."); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testval.c0000664000175000017500000003142015142313673016412 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testval.c $ * Description: GASNet value get/put performance test * measures the ping-pong average round-trip time and * average flood throughput of GASNet gets and puts * over varying payload size and synchronization mechanisms * Copyright 2002, Jaein Jeong and Dan Bonachea * Terms of use are as specified in license.txt */ #include #if PLATFORM_ARCH_64 int maxsz = 8; #else int maxsz = 4; #endif int iters = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR (maxsz*iters) #endif #include "test.h" static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; #define GASNET_HEADNODE 0 #define PRINT_LATENCY 0 #define PRINT_THROUGHPUT 1 typedef struct { int datasize; int iters; uint64_t time; } stat_struct_t; gex_AM_Entry_t handler_table[2]; int myproc; int numprocs; int peerproc = -1; int iamsender = 0; int unitsMB = 0; int doputs = 1; int dogets = 1; uint8_t *tgtmem; #define init_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _init_stat #define update_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _update_stat #define print_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _print_stat void _init_stat(stat_struct_t *st, int sz) { st->iters = 0; st->datasize = sz; st->time = 0; } void _update_stat(stat_struct_t *st, uint64_t temptime, int iters) { st->iters += iters; st->time += temptime; } void _print_stat(int myproc, stat_struct_t *st, const char *name, int operation) { switch (operation) { case PRINT_LATENCY: printf("%c: %2i - %10i byte : %7i iters," " latency %10i us total, %9.3f us ave. (%s)\n", TEST_SECTION_NAME(), myproc, st->datasize, st->iters, (int) st->time, ((double)st->time) / st->iters, name); fflush(stdout); break; case PRINT_THROUGHPUT: printf((unitsMB?"%c: %2i - %10i byte : %7i iters, throughput %11.6f MB/sec (%s)\n": "%c: %2i - %10i byte : %7i iters, throughput %11.3f KB/sec (%s)\n"), TEST_SECTION_NAME(), myproc, st->datasize, st->iters, ((int)st->time == 0 ? 0.0 : (1000000.0 * st->datasize * st->iters / (unitsMB?(1024.0*1024.0):1024.0)) / ((int)st->time)), name); fflush(stdout); break; default: break; } } void roundtrip_test(int nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; gex_RMA_Value_t reg = 1; /* initialize statistics */ init_stat(&st, nbytes); BARRIER(); if (iamsender && doputs) { /* measure the round-trip time of put */ begin = TIME(); for (i = 0; i < iters; i++) { unsigned int offset = i * nbytes; gex_RMA_PutBlockingVal(myteam, peerproc, tgtmem+offset, (gex_RMA_Value_t)i, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutBlockingVal latency", PRINT_LATENCY); } /* initialize statistics */ init_stat(&st, nbytes); if (iamsender && dogets) { /* measure the round-trip time of get */ begin = TIME(); for (i = 0; i < iters; i++) { unsigned int offset = i * nbytes; reg ^= gex_RMA_GetBlockingVal(myteam, peerproc, tgtmem+offset, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && dogets) { print_stat(myproc, &st, "GetBlockingVal latency", PRINT_LATENCY); } } void oneway_test(int nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; gex_RMA_Value_t reg = 1; /* initialize statistics */ init_stat(&st, nbytes); BARRIER(); if (iamsender && doputs) { /* measure the throughput of put */ begin = TIME(); for (i = 0; i < iters; i++) { unsigned int offset = i * nbytes; gex_RMA_PutBlockingVal(myteam, peerproc, tgtmem+offset, (gex_RMA_Value_t)i, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutBlockingVal throughput", PRINT_THROUGHPUT); } /* initialize statistics */ init_stat(&st, nbytes); if (iamsender && dogets) { /* measure the throughput of get */ begin = TIME(); for (i = 0; i < iters; i++) { unsigned int offset = i * nbytes; reg ^= gex_RMA_GetBlockingVal(myteam, peerproc, tgtmem+offset, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && dogets) { print_stat(myproc, &st, "GetBlockingVal throughput", PRINT_THROUGHPUT); } } void roundtrip_nb_test(int nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; gex_Event_t hdlput; /* initialize statistics */ init_stat(&st, nbytes); BARRIER(); if (iamsender && doputs) { /* measure the round-trip time of nonblocking put */ begin = TIME(); for (i = 0; i < iters; i++) { unsigned int offset = i * nbytes; hdlput = gex_RMA_PutNBVal(myteam, peerproc, tgtmem+offset, (gex_RMA_Value_t)i, nbytes, 0); gex_Event_Wait(hdlput); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutNBVal latency", PRINT_LATENCY); } } void oneway_nb_test(int nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; gex_Event_t *pevents; gex_RMA_Value_t reg = 1; /* initialize statistics */ init_stat(&st, nbytes); pevents = (gex_Event_t*) test_malloc(sizeof(gex_Event_t) * iters); BARRIER(); if (iamsender && doputs) { /* measure the throughput of sending a message */ begin = TIME(); for (i = 0; i < iters; i++) { unsigned int offset = i * nbytes; pevents[i] = gex_RMA_PutNBVal(myteam, peerproc, tgtmem+offset, (gex_RMA_Value_t)i, nbytes, 0); } gex_Event_WaitAll(pevents, iters, 0); end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutNBVal throughput", PRINT_THROUGHPUT); } test_free(pevents); } void roundtrip_nbi_test(int nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; /* initialize statistics */ init_stat(&st, nbytes); BARRIER(); if (iamsender && doputs) { /* measure the round-trip time of nonblocking implicit put */ begin = TIME(); for (i = 0; i < iters; i++) { unsigned int offset = i * nbytes; gex_RMA_PutNBIVal(myteam, peerproc, tgtmem+offset, (gex_RMA_Value_t)i, nbytes, 0); gex_NBI_Wait(GEX_EC_PUT,0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutNBIVal latency", PRINT_LATENCY); } } void oneway_nbi_test(int nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; /* initialize statistics */ init_stat(&st, nbytes); BARRIER(); if (iamsender && doputs) { /* measure the throughput of nonblocking implicit put */ begin = TIME(); for (i = 0; i < iters; i++) { unsigned int offset = i * nbytes; gex_RMA_PutNBIVal(myteam, peerproc, tgtmem+offset, (gex_RMA_Value_t)i, nbytes, 0); } gex_NBI_Wait(GEX_EC_PUT,0); end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender && doputs) { print_stat(myproc, &st, "PutNBIVal throughput", PRINT_THROUGHPUT); } } int main(int argc, char **argv) { int min_payload, max_payload; void *myseg; void *alloc; int arg; int j; int firstlastmode = 0; int fullduplexmode = 0; int crossmachinemode = 0; int skipwarmup = 0; int help = 0; /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testval", &argc, &argv, 0)); /* parse arguments */ arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-f")) { firstlastmode = 1; ++arg; } else if (!strcmp(argv[arg], "-c")) { crossmachinemode = 1; ++arg; } else if (!strcmp(argv[arg], "-a")) { fullduplexmode = 1; ++arg; } else if (!strcmp(argv[arg], "-m")) { unitsMB = 1; ++arg; } else if (!strcmp(argv[arg], "-p")) { dogets = 0; doputs = 1; ++arg; } else if (!strcmp(argv[arg], "-g")) { dogets = 1; doputs = 0; ++arg; } else if (!strcmp(argv[arg], "-s")) { skipwarmup = 1; ++arg; } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (argc > arg) { iters = atoi(argv[arg]); arg++; } if (!iters) iters = 10000; if (argc > arg) { maxsz = atoi(argv[arg]); arg++; } if (!maxsz || maxsz > sizeof(gex_RMA_Value_t)) maxsz = sizeof(gex_RMA_Value_t); if (argc > arg) { TEST_SECTION_PARSE(argv[arg]); arg++; } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); test_init("testval",1, "[options] (iters) (maxsz) (test_sections)\n" " The -p/-g option selects puts only or gets only (default is both).\n" " The -s option skips warm-up iterations\n" " The -m option enables MB/sec units for bandwidth output (MB=2^20 bytes).\n" " The -a option enables full-duplex mode, where all nodes send.\n" " The -c option enables cross-machine pairing, default is nearest neighbor.\n" " The -f option enables 'first/last' mode, where the first/last\n" " nodes communicate with each other, while all other nodes sit idle.\n"); if (help || argc > arg) test_usage(); min_payload = 1; max_payload = maxsz; /* get SPMD info */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); if (!firstlastmode) { /* Only allow 1 or even number for numprocs */ if (numprocs > 1 && numprocs % 2 != 0) { MSG0("WARNING: This test requires a unary or even number of nodes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harnesses for smp-conduit */ } } /* Setting peer thread rank */ if (firstlastmode) { peerproc = (myproc == 0 ? numprocs-1 : 0); iamsender = (fullduplexmode ? myproc == 0 || myproc == numprocs-1 : myproc == 0); } else if (numprocs == 1) { peerproc = 0; iamsender = 1; } else if (crossmachinemode) { if (myproc < numprocs / 2) { peerproc = myproc + numprocs/2; iamsender = 1; } else { peerproc = myproc - numprocs/2; iamsender = fullduplexmode; } } else { peerproc = (myproc % 2) ? (myproc - 1) : (myproc + 1); iamsender = (fullduplexmode || myproc % 2 == 0); } myseg = TEST_SEG(myproc); tgtmem = TEST_SEG(peerproc); MSG0("Running %i iterations of %s%s%snon-bulk value put/get for sizes: %i...%i\n", iters, (firstlastmode ? "first/last " : ""), (fullduplexmode ? "full-duplex ": ""), (crossmachinemode ? "cross-machine ": ""), min_payload, max_payload); BARRIER(); if (iamsender && !skipwarmup) { /* pay some warm-up costs */ int i; int warm_iters = MIN(iters, 32767); /* avoid hitting 65535-handle limit */ gex_Event_t *ph = test_malloc(sizeof(gex_Event_t)*warm_iters); gex_RMA_Value_t reg = 1; for (i = 0; i < warm_iters; i++) { gex_RMA_PutBlockingVal(myteam, peerproc, tgtmem, reg, max_payload, 0); reg ^= gex_RMA_GetBlockingVal(myteam, peerproc, tgtmem, max_payload, 0); ph[i] = gex_RMA_PutNBVal(myteam, peerproc, tgtmem, reg, max_payload, 0); gex_RMA_PutNBIVal(myteam, peerproc, tgtmem, reg, max_payload, 0); } gex_NBI_Wait(GEX_EC_PUT,0); gex_Event_WaitAll(ph, warm_iters, 0); test_free(ph); } BARRIER(); if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; j *= 2) roundtrip_test(j); if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; j *= 2) oneway_test(j); if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; j *= 2) roundtrip_nb_test(j); if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; j *= 2) oneway_nb_test(j); if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; j *= 2) roundtrip_nbi_test(j); if (TEST_SECTION_BEGIN_ENABLED()) for (j = min_payload; j <= max_payload && j > 0; j *= 2) oneway_nbi_test(j); BARRIER(); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/README0000664000175000017500000000640715142313673015453 0ustar alastairalastairThis directory contains correctness tests and performance microbenchmarks for GASNet. For convenience, the mpi directory also contains some comparable MPI performance microbenchmarks, some contributed from outside sources. See the top-level GASNet README for information on running all the tests using the GASNet Makefile-based test harness. See comments at the top of each file for test description, and run any test with --help to see usage information for individual tests. Coding standards for GASNet tests: --------------------------------- All GASNet test code must adhere to the following coding standards: * All of the general linguistic coding standards listed in the top-level GASNet README-devel * Tests should only use public GASNet interfaces (ie prefixed with gasnet_ or gasnett_). Tests must never invoke gasneti_, gasnetc_ or gasnete_ interfaces - this ensures test portability across GASNet conduits and GASNet implementations. Any tests of GASNet internal functionality belong in ../gasnet_diagnostic.c, where they will be invoked by testinternal. * test.h contains numerous tools which capture common idioms for GASNet test code. Test authors should be familiar with the services provided by this header and use them rather than re-implementing ad-hoc solutions. Specifically: - All tests must invoke test_init immediately after attach to register usage info and init the framework. Failures in argument parsing should call test_usage(). - Tests needing segment space should use TEST_SEGSZ_REQUEST and TEST_SEG instead of gasnet_getSegmentInfo, as the former handles SEGMENT_EVERYTHING correctly - Barriers should be written as BARRIER(), unless there's a reason to directly invoke the GASNet barrier functions (like testing barrier correctness) - Threaded barriers should use PTHREAD_BARRIER(numthreads) or PTHREAD_LOCALBARRIER(numthreads) - Non-fatal errors should issue a message using ERR("msg",...) (works just like printf) - Fatal errors should be written as FATALERR("msg",...) (works just like gasnett_fatalerror) - Informational messages should use MSG("msg",...) instead of printf, or MSG0("msg",...) if the message is collective and should only be issued by node 0 - Allocation should use test_malloc, test_calloc, test_free - Calls to the core API should be surrounded with GASNET_Safe() - Pthread creation should be done using test_createandjoin_pthreads - Timing should be done with TIME() or gasnett_ticks_now() (latter provides ns granularity) - Tests needing random numbers should use TEST_RAND and friends, and should include an optional seed argument that is passed to TEST_SRAND - Tests with many optional parts should use the TEST_SECTION* interface - Tests needing a computational delay should use test_delay In all cases, see existing tests for examples of correct usage. * All else being equal, when writing new test code it's usually preferable to expand an existing test with related functionality rather than creating a whole new test, unless one is testing a truly novel aspect of functionality or performance. This helps to reduce build time and nightly test cost for the tests. * New tests should be added to tests/Makefile.in (with appropriate arguments, if necessary) and also to tests/harness/gasnet-tests/harness.conf gasnet-2025.8.0/tests/testratomic.c0000664000175000017500000014554015142313673017277 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testratomic.c $ * Description: GASNet remote atomics correctness tests * Copyright (c) 2017, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include static size_t scratch_sz1; static size_t scratch_sz2; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR (PAGESZ + scratch_sz1 + scratch_sz2) // space for test + 2 teams #endif #include // NOTE regarding "atomic access phases": // // Currently, each of the subtests in this file uses the same 16 bytes (or // less) at the start of each rank's segment. The rules for use of multiple // ADs with the same target location requires a "transition" between atomic // access phases. While the mechanism(s) for that are not fully specified // yet, we do have the grantee that AD destruction ends an atomic access // phase. For that reason, all current subtests are grantee with respect to // phases only because they each quiesce and destroy the AD before the next // subtest begins. static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; #include #include #include static gex_Rank_t myrank; static gex_Rank_t numranks; static gex_Rank_t peer; static void *peerseg; static int iters = 0; /* Hidden state for error reporting and recovery */ static const char* subtest = "N/A"; #define SUBTEST(_name) subtest = _name static int prev_fail = 0; static int failures = 0; static int multinbrhd; static int mynbrhd; // jobrank of first member of the neighborhood static gex_Rank_t neighbor; // next neighbor w/ wrap-around, possibly self. static gex_Rank_t nbrhdsize; // size of the neighborhood static gex_Rank_t nbrhdrank; // rank in the neighborhood static gex_RankInfo_t *nbrhdinfo; // Macros to simplify iteration over types #define I32_type int32_t #define I32_isint 1 #define U32_type uint32_t #define U32_isint 1 #define I64_type int64_t #define I64_isint 1 #define U64_type uint64_t #define U64_isint 1 #define FLT_type float #define FLT_isint 0 #define DBL_type double #define DBL_isint 0 #define FORALL_DT(MACRO) \ MACRO(I32) MACRO(U32) \ MACRO(I64) MACRO(U64) \ MACRO(FLT) MACRO(DBL) // Randomizes coverage over NB and NBI #define _TEST_OP_BLOCKING(_tcode,_ad,_result,_tgt_rank,_tgt_addr,_op,_op1,_op2,_flags) do {\ if (TEST_RAND_ONEIN(2)) { \ gex_Event_Wait(gex_AD_OpNB_##_tcode(_ad,_result,_tgt_rank,_tgt_addr,_op,_op1,_op2,_flags)); \ } else { \ gex_AD_OpNBI_##_tcode(_ad,_result,_tgt_rank,_tgt_addr,_op,_op1,_op2,_flags); \ gex_EC_t ec; \ switch (_op) { \ case GEX_OP_SET: ec = GEX_EC_PUT; break; \ case GEX_OP_GET: ec = GEX_EC_GET; break; \ default: ec = GEX_EC_RMW; break; \ } \ gex_NBI_Wait(ec,0); \ } \ } while (0) // This is mostly for improved legibility (omitting both unused args) #define _TEST_OP_GET(_tcode,_ad,_result,_tgt_rank,_tgt_addr,_flags) \ _TEST_OP_BLOCKING(_tcode,_ad,_result,_tgt_rank,_tgt_addr,GEX_OP_GET,911,911,_flags) // To ensure good coverage of offloaded atomics, we provide an emulated SET // (via GET+RMW) when inclusion of GEX_OP_SET (typically used only for // initialization) might otherwise prevent selection of offload for other // operations in an AD. // This is a blocking operation, intended for initialization, and in general is // only correct when there are no other concurrent access to the target // location. // TODO: (F)XOR would work for integer types (only), if there is ever need. #define _TEST_OP_SET_OPS ( GEX_OP_SET | \ GEX_OP_ADD | GEX_OP_FADD | \ GEX_OP_CAS | GEX_OP_FCAS ) #define _TEST_OP_SET(_tcode,_ops,_ad,_tgt_rank,_tgt_addr,_val,_flags) do { \ if (_ops & GEX_OP_SET) { \ _TEST_OP_BLOCKING(_tcode,_ad,NULL,_tgt_rank,_tgt_addr,GEX_OP_SET,_val,0,_flags); \ } else if (_ops & _TEST_OP_SET_OPS) { \ assert(ops & GEX_OP_GET); \ _tcode##_type tmp_get; \ _TEST_OP_BLOCKING(_tcode,_ad,&tmp_get,_tgt_rank,_tgt_addr,GEX_OP_GET,0,0,_flags); \ /* fetching before non-fetching to favor checking of result */ \ if (_ops & GEX_OP_FADD) { \ _tcode##_type tmp_fetch; \ _tcode##_type tmp_op = _val - tmp_get; \ _TEST_OP_BLOCKING(_tcode,_ad,&tmp_fetch,_tgt_rank,_tgt_addr,GEX_OP_FADD,tmp_op,0,_flags); \ assert(tmp_fetch == tmp_get); \ } else if (_ops & GEX_OP_FCAS) { \ _tcode##_type tmp_fetch; \ _TEST_OP_BLOCKING(_tcode,_ad,&tmp_fetch,_tgt_rank,_tgt_addr,GEX_OP_FCAS,tmp_get,_val,_flags); \ assert(tmp_fetch == tmp_get); \ } else if (_ops & GEX_OP_ADD) { \ _tcode##_type tmp_fetch; \ _tcode##_type tmp_op = _val - tmp_get; \ _TEST_OP_BLOCKING(_tcode,_ad,NULL,_tgt_rank,_tgt_addr,GEX_OP_ADD,tmp_op,0,_flags); \ } else if (_ops & GEX_OP_CAS) { \ _tcode##_type tmp_fetch; \ _TEST_OP_BLOCKING(_tcode,_ad,NULL,_tgt_rank,_tgt_addr,GEX_OP_CAS,tmp_get,_val,_flags); \ } \ } else { \ assert_always(0 && "no SET operation"); \ } \ } while (0) /* Blocking atomic via either NB or NBI (chosen at random) */ /* With or without IMMEDIATE (also at random) */ /* With or without RANK_IS_JOBRANK (also at random) */ /* Note that some arguments and variables are hard-coded */ #define _TEST_ROP(_tcode, _result_p, _opcode, _op1, _op2) do { \ gex_Flags_t flags = TEST_RAND_ONEIN(2) ? GEX_FLAG_IMMEDIATE : 0; \ gex_Rank_t tgt = peer; \ if (TEST_RAND_ONEIN(4)) { \ flags |= GEX_FLAG_RANK_IS_JOBRANK; \ tgt = gex_TM_TranslateRankToJobrank(gex_AD_QueryTM(ad), tgt); \ } \ if (TEST_RAND_ONEIN(2)) { \ gex_Event_t ev; \ while (GEX_EVENT_NO_OP == \ (ev = gex_AD_OpNB_##_tcode(ad,_result_p,tgt,peerseg,_opcode,_op1,_op2,flags))) {\ assert_always(flags & GEX_FLAG_IMMEDIATE); \ flags &= ~GEX_FLAG_IMMEDIATE; \ } \ gex_Event_Wait(ev); \ } else { \ while (gex_AD_OpNBI_##_tcode(ad,_result_p,tgt,peerseg,_opcode,_op1,_op2,flags)) { \ assert_always(flags & GEX_FLAG_IMMEDIATE); \ flags &= ~GEX_FLAG_IMMEDIATE; \ } \ gex_EC_t ec; \ switch (_opcode) { \ case GEX_OP_SET: ec = GEX_EC_PUT; break; \ case GEX_OP_GET: ec = GEX_EC_GET; break; \ default: ec = GEX_EC_RMW; break; \ } \ gex_NBI_Wait(ec,0); \ } \ } while (0) // Update mirror value // Also store remotely if (and only if) previous check failed #define _TEST_ROP_MIRROR(_tcode, _newval) do { \ _tcode##_mirror = _newval; \ if_pf (prev_fail) { \ _TEST_OP_SET(_tcode,ops,ad,peer,peerseg,_tcode##_mirror,0); \ } \ prev_fail = 0; \ } while (0) /* Test an atomic op (fetching and non-fetching variants) * NC suffix = no change */ #define TEST_ROP_NC(_tcode, _opcode, _op1, _op2) do { \ if (! (_opcode & ops)) break; \ _TEST_ROP(_tcode, NULL, _opcode, _op1, _op2); \ } while (0) #define TEST_ROP_FETCH_NC(_tcode, _opcode, _op1, _op2) do { \ if (! (_opcode & ops)) break; \ _TEST_ROP(_tcode, &_tcode##_fetch, _opcode, _op1, _op2); \ prev_fail = (_tcode##_fetch != _tcode##_mirror); \ if_pf (prev_fail) { \ ++failures; \ static int once = 0; \ if (!once) { \ ERR("Valued fetched by \"%s\" did not match expected value " \ "(got %d, want %d)\n", subtest, \ (int)_tcode##_fetch, (int)_tcode##_mirror); \ once = 1; \ } \ } \ } while (0) /* As above, but also update the expected value and store * it remotely if the most recent fetching op failed validation */ #define TEST_ROP(_tcode, _opcode, _op1, _op2, _newval) do { \ TEST_ROP_NC(_tcode, _opcode, _op1, _op2); \ if (_opcode & ops) _TEST_ROP_MIRROR(_tcode, _newval); \ } while (0) #define TEST_ROP_FETCH(_tcode, _opcode, _op1, _op2, _newval) do { \ TEST_ROP_FETCH_NC(_tcode, _opcode, _op1, _op2); \ if (_opcode & ops) _TEST_ROP_MIRROR(_tcode, _newval); \ } while (0) /* Randomized testing of atomic ops */ #define TEST_RAND_DECL(_dtcode) \ TEST_RAND_DECL1(_dtcode, _dtcode##_type, _dtcode##_isint, \ _dtcode##_mirror, _dtcode##_unused, _dtcode##_x, _dtcode##_y) /* extra pass to expand concatenations: */ #define TEST_RAND_DECL1(_tcode, _type, _isint, mirror, unused, x, y) \ TEST_RAND_DECL2(_tcode, _type, _isint, mirror, unused, x, y) #define TEST_RAND_DECL2(_tcode, _type, _isint, mirror, unused, x, y) \ static _type _tcode##_fetch, mirror, unused, x, y; \ GASNETT_NEVER_INLINE(test_rand1_##_tcode, \ void test_rand1_##_tcode(gex_AD_t ad, gex_OP_t ops, int64_t lo, int64_t hi)) {\ SUBTEST("SET(x)"); \ _TEST_OP_SET(_tcode,ops,ad,peer,peerseg,x,0); \ _tcode##_mirror = x; \ SUBTEST("GET(x)"); \ TEST_ROP_FETCH_NC(_tcode, GEX_OP_GET, unused, unused); \ SUBTEST("SET(0)"); \ _TEST_OP_SET(_tcode,ops,ad,peer,peerseg,0,0); \ _tcode##_mirror = 0; \ SUBTEST("GET(0)"); \ TEST_ROP_FETCH_NC(_tcode, GEX_OP_GET, unused, unused); \ } \ GASNETT_NEVER_INLINE(test_rand2_##_tcode, \ void test_rand2_##_tcode(gex_AD_t ad, gex_OP_t ops, int64_t lo, int64_t hi)) {\ SUBTEST("FINC()"); \ TEST_ROP_FETCH(_tcode, GEX_OP_FINC, unused, unused, mirror + 1); \ SUBTEST("INC()"); \ TEST_ROP(_tcode, GEX_OP_INC, unused, unused, mirror + 1); \ SUBTEST("FADD(x+1)"); \ TEST_ROP_FETCH(_tcode, GEX_OP_FADD, (x+1), unused, mirror + x + 1); \ SUBTEST("ADD(x+1)"); \ TEST_ROP(_tcode, GEX_OP_ADD, (x+1), unused, mirror + x + 1); \ } \ GASNETT_NEVER_INLINE(test_rand3_##_tcode, \ void test_rand3_##_tcode(gex_AD_t ad, gex_OP_t ops, int64_t lo, int64_t hi)) {\ SUBTEST("FDEC()"); \ TEST_ROP_FETCH(_tcode, GEX_OP_FDEC, unused, unused, mirror - 1); \ SUBTEST("DEC()"); \ TEST_ROP(_tcode, GEX_OP_DEC, unused, unused, mirror - 1); \ SUBTEST("FSUB(x)"); \ TEST_ROP_FETCH(_tcode, GEX_OP_FSUB, x, unused, mirror - x); \ SUBTEST("SUB(x)"); \ TEST_ROP(_tcode, GEX_OP_SUB, x, unused, mirror - x); \ } \ GASNETT_NEVER_INLINE(test_rand4_##_tcode, \ void test_rand4_##_tcode(gex_AD_t ad, gex_OP_t ops, int64_t lo, int64_t hi)) {\ SUBTEST("FMULT(x)"); \ TEST_ROP_FETCH(_tcode, GEX_OP_FMULT, x, unused, mirror * x); \ SUBTEST("MULT(x)"); \ TEST_ROP(_tcode, GEX_OP_MULT, x, unused, mirror * x); \ } \ GASNETT_NEVER_INLINE(test_rand5_##_tcode, \ void test_rand5_##_tcode(gex_AD_t ad, gex_OP_t ops, int64_t lo, int64_t hi)) {\ SUBTEST("SWAP(x)"); \ TEST_ROP_FETCH(_tcode, GEX_OP_SWAP, x, unused, x); \ SUBTEST("FCAS(mirror,mirror) - PASS"); \ TEST_ROP_FETCH_NC(_tcode, GEX_OP_FCAS, mirror, mirror); \ SUBTEST("FCAS(mirror+1,0) - FAIL"); \ TEST_ROP_FETCH_NC(_tcode, GEX_OP_FCAS, mirror+1, 0); \ } \ GASNETT_NEVER_INLINE(test_rand6_##_tcode, \ void test_rand6_##_tcode(gex_AD_t ad, gex_OP_t ops, int64_t lo, int64_t hi)) {\ SUBTEST("FCAS(mirror,random) - PASS"); \ y = (_type)TEST_RAND(lo,hi); \ TEST_ROP_FETCH(_tcode, GEX_OP_FCAS, mirror, y, y); \ SUBTEST("FCAS(random,random) - FAIL"); \ do { y = (_type)TEST_RAND(lo,hi); } while (y == mirror);\ TEST_ROP_FETCH_NC(_tcode, GEX_OP_FCAS, y, y); \ SUBTEST("GET(fcas)"); \ TEST_ROP_FETCH_NC(_tcode, GEX_OP_GET, unused, unused); \ } \ GASNETT_NEVER_INLINE(test_rand7_##_tcode, \ void test_rand7_##_tcode(gex_AD_t ad, gex_OP_t ops, int64_t lo, int64_t hi)) {\ SUBTEST("CAS(mirror,mirror) - PASS"); \ TEST_ROP_NC(_tcode, GEX_OP_CAS, mirror, mirror); \ SUBTEST("GET(cas1)"); \ TEST_ROP_FETCH_NC(_tcode, GEX_OP_GET, unused, unused); \ SUBTEST("CAS(mirror+1,0) - FAIL"); \ TEST_ROP_NC(_tcode, GEX_OP_CAS, mirror+1, 0); \ SUBTEST("GET(cas2)"); \ TEST_ROP_FETCH_NC(_tcode, GEX_OP_GET, unused, unused); \ } \ GASNETT_NEVER_INLINE(test_rand8_##_tcode, \ void test_rand8_##_tcode(gex_AD_t ad, gex_OP_t ops, int64_t lo, int64_t hi)) {\ SUBTEST("CAS(mirror,random) - PASS"); \ y = (_type)TEST_RAND(lo,hi); \ TEST_ROP(_tcode, GEX_OP_CAS, mirror, y, y); \ SUBTEST("GET(cas3)"); \ TEST_ROP_FETCH_NC(_tcode, GEX_OP_GET, unused, unused); \ SUBTEST("CAS(random,random) - FAIL"); \ do { y = (_type)TEST_RAND(lo,hi); } while (y == mirror);\ TEST_ROP_NC(_tcode, GEX_OP_CAS, y, y); \ SUBTEST("GET(cas4)"); \ TEST_ROP_FETCH_NC(_tcode, GEX_OP_GET, unused, unused); \ } \ GASNETT_NEVER_INLINE(test_rand9_##_tcode, \ void test_rand9_##_tcode(gex_AD_t ad, gex_OP_t ops, int64_t lo, int64_t hi)) {\ SUBTEST("MIN(random)"); \ y = (_type)TEST_RAND(lo,hi); \ y = TEST_RAND_ONEIN(2) ? y : ((_type)-1) * y; \ TEST_ROP(_tcode, GEX_OP_MIN, y, unused, MIN(mirror,y)); \ SUBTEST("FMIN(random)"); \ y = (_type)TEST_RAND(lo,hi); \ y = TEST_RAND_ONEIN(2) ? y : ((_type)-1) * y; \ TEST_ROP_FETCH(_tcode, GEX_OP_FMIN, y, unused, MIN(mirror,y)); \ SUBTEST("MAX(random)"); \ y = (_type)TEST_RAND(lo,hi); \ y = TEST_RAND_ONEIN(2) ? y : ((_type)-1) * y; \ TEST_ROP(_tcode, GEX_OP_MAX, y, unused, MAX(mirror,y)); \ SUBTEST("FMAX(random)"); \ y = (_type)TEST_RAND(lo,hi); \ y = TEST_RAND_ONEIN(2) ? y : ((_type)-1) * y; \ TEST_ROP_FETCH(_tcode, GEX_OP_FMAX, y, unused, MAX(mirror,y)); \ } \ GASNETT_NEVER_INLINE(test_rand_##_tcode, \ void test_rand_##_tcode(gex_AD_t ad, int64_t lo, int64_t hi, const char *msg)) {\ mirror = 0; \ gex_OP_t ops = gex_AD_QueryOps(ad); \ MSG0(" Randomized ops test with operation set 0x%x%s", \ (unsigned int)ops, msg); \ for (int i = 0; i < iters; ++i) { \ unused = (_type)TEST_RAND(lo,hi); /* garbage */ \ /* first few iterations are NON-random (0, 1, 2) */ \ x = (i <= 2) ? (_type)i : (_type)TEST_RAND(lo,hi); \ test_rand1_##_tcode(ad, ops, lo, hi); \ test_rand2_##_tcode(ad, ops, lo, hi); \ test_rand3_##_tcode(ad, ops, lo, hi); \ test_rand4_##_tcode(ad, ops, lo, hi); \ test_rand5_##_tcode(ad, ops, lo, hi); \ test_rand6_##_tcode(ad, ops, lo, hi); \ test_rand7_##_tcode(ad, ops, lo, hi); \ test_rand8_##_tcode(ad, ops, lo, hi); \ test_rand9_##_tcode(ad, ops, lo, hi); \ TEST_RAND_BITS##_isint(_tcode,_type,mirror,unused,x,y); \ SUBTEST("GET(final)"); \ TEST_ROP_FETCH_NC(_tcode, GEX_OP_GET, unused, unused); \ } \ if (failures) { \ MSG(" Total: %d failures for type " #_type, failures); \ failures = 0; \ } \ } #define TEST_RAND_BITS0(_tcode,_type,mirror,unused,x,y) /*empty*/ #define TEST_RAND_BITS1(_tcode,_type,mirror,unused,x,y) \ SUBTEST("AND(random)"); \ y = (_type)TEST_RAND(lo,hi); \ TEST_ROP(_tcode, GEX_OP_AND, y, unused, mirror & y); \ SUBTEST("FAND(random)"); \ y = (_type)TEST_RAND(lo,hi); \ TEST_ROP_FETCH(_tcode, GEX_OP_FAND, y, unused, mirror & y); \ SUBTEST("OR(random)"); \ y = (_type)TEST_RAND(lo,hi); \ TEST_ROP(_tcode, GEX_OP_OR, y, unused, mirror | y); \ SUBTEST("FOR(random)"); \ y = (_type)TEST_RAND(lo,hi); \ TEST_ROP_FETCH(_tcode, GEX_OP_FOR, y, unused, mirror | y); \ SUBTEST("XOR(random)"); \ y = (_type)TEST_RAND(lo,hi); \ TEST_ROP(_tcode, GEX_OP_XOR, y, unused, mirror ^ y); \ SUBTEST("FXOR(random)"); \ y = (_type)TEST_RAND(lo,hi); \ TEST_ROP_FETCH(_tcode, GEX_OP_FXOR, y, unused, mirror ^ y); \ // FORALL_DT(TEST_RAND_DECL) /* Deterministic testing of AD_MY_* flags */ #define TEST_FLAGS_DECL(_tcode) \ GASNETT_NEVER_INLINE(test_flags_##_tcode, \ void test_flags_##_tcode(gex_AD_t ad)) { \ gex_TM_t testtm = gex_AD_QueryTM(ad); \ gex_Event_t ev; \ _tcode##_type result, operand; \ _tcode##_type unused = 911; /* garbage */ \ MSG0(" Flags test"); \ \ /* MY_RANK and MY_NBRHD applied to self */ \ operand = myrank + 1; \ ev = gex_AD_OpNB_##_tcode(ad,NULL,myrank,TEST_MYSEG(),GEX_OP_SET, \ operand,unused,GEX_FLAG_AD_MY_RANK); \ gex_Event_Wait(ev); \ gex_AD_OpNBI_##_tcode(ad,&result,myrank,TEST_MYSEG(),GEX_OP_FADD, \ operand,unused,GEX_FLAG_AD_MY_RANK); \ gex_NBI_Wait(GEX_EC_RMW,0); \ assert_always(result == operand); \ ev = gex_AD_OpNB_##_tcode(ad,&result,myrank,TEST_MYSEG(),GEX_OP_FADD, \ operand,unused,GEX_FLAG_AD_MY_NBRHD); \ gex_Event_Wait(ev); \ assert_always(result == 2*operand); \ BARRIER(); \ \ /* MY_NBRHD applied to not-self-unless-no-other-valid-choice */ \ void * nbr_addr = TEST_SEG_TM(testtm, neighbor); \ assert(nbr_addr); \ operand = neighbor + 1; \ gex_AD_OpNBI_##_tcode(ad,&result,neighbor,nbr_addr,GEX_OP_FADD, \ operand,unused,GEX_FLAG_AD_MY_NBRHD); \ gex_NBI_Wait(GEX_EC_RMW,0); \ assert_always(result == 3*operand); \ } FORALL_DT(TEST_FLAGS_DECL) /* (F)ADD/(F)INC race test */ #define TEST_CNTR_DECL(_tcode) \ GASNETT_NEVER_INLINE(test_cntr_##_tcode, \ void test_cntr_##_tcode(gex_AD_t ad, int max_goal)) { \ gex_TM_t testtm = gex_AD_QueryTM(ad); \ gex_OP_t ops = gex_AD_QueryOps(ad); \ MSG0(" Central-counter concurrent updates test (FADD/ADD/FINC/INC)"); \ _tcode##_type unused = 911; /* garbage */ \ int goal = MIN(iters, max_goal); \ int my_share = (goal / numranks) + ((myrank < (goal % numranks)) ? 1 : 0); \ if (!myrank) { \ _TEST_OP_SET(_tcode,ops,ad,0,TEST_MYSEG(),0,GEX_FLAG_AD_MY_RANK);\ } \ BARRIER(); \ _tcode##_type result; \ { /* Next line intentionally shadows two globals */ \ gex_Rank_t peer = 0; void * peerseg = TEST_SEG_TM(testtm, 0); \ _tcode##_type prev_result = 0; \ int remain = my_share; \ while (remain) { \ if (TEST_RAND_ONEIN(20)) { /* Mix in an occasional GET */ \ _TEST_ROP(_tcode, &result, GEX_OP_GET, unused, unused); \ } else if (TEST_RAND_ONEIN(2)) { \ /* (F)ADD with a small (possibly 0) random increment */ \ const int max_incr = 4; \ int incr = (remain < max_incr) ? 1 : TEST_RAND(0, max_incr); \ remain -= incr; \ if (TEST_RAND_ONEIN(2)) { \ _TEST_ROP(_tcode, &result, GEX_OP_FADD, incr, unused); \ } else { \ _TEST_ROP(_tcode, NULL, GEX_OP_ADD, incr, unused); \ continue; /* skip checks of monotonicity and range */ \ } \ } else { \ /* (F)INC */ \ remain -= 1; \ if (TEST_RAND_ONEIN(2)) { \ _TEST_ROP(_tcode, &result, GEX_OP_FINC, unused, unused); \ } else { \ _TEST_ROP(_tcode, NULL, GEX_OP_INC, unused, unused); \ continue; /* skip checks of monotonicity and range */ \ } \ } \ assert_always(!prev_result || result >= prev_result); \ assert_always(result < goal); \ prev_result = result; \ } \ } \ BARRIER(); \ if (!myrank) { \ _TEST_OP_GET(_tcode,ad,&result,0,TEST_MYSEG(),GEX_FLAG_AD_MY_RANK); \ assert_always(result == goal); \ } \ } FORALL_DT(TEST_CNTR_DECL) /* FCAS race test */ #define TEST_FCAS_DECL(_tcode) \ GASNETT_NEVER_INLINE(test_fcas_##_tcode, \ void test_fcas_##_tcode(gex_AD_t ad, int max_goal)) { \ gex_TM_t testtm = gex_AD_QueryTM(ad); \ gex_OP_t ops = gex_AD_QueryOps(ad); \ MSG0(" Central-counter concurrent updates test (FCAS)"); \ _tcode##_type unused = 911; /* garbage */ \ int goal = MIN(iters, max_goal); \ int my_share = (goal / numranks) + ((myrank < (goal % numranks)) ? 1 : 0); \ if (!myrank) { \ _TEST_OP_SET(_tcode,ops,ad,0,TEST_MYSEG(),0,GEX_FLAG_AD_MY_RANK); \ } \ BARRIER(); \ _tcode##_type result; \ { /* Next line intentionally shadows two globals */ \ gex_Rank_t peer = 0; void * peerseg = TEST_SEG_TM(testtm, 0); \ _tcode##_type oldval = 0; \ int remain = my_share; \ while (remain) { \ int swapped; \ if (TEST_RAND_ONEIN(20)) { /* Mix in an occasional GET */ \ _TEST_ROP(_tcode, &result, GEX_OP_GET, unused, unused); \ swapped = 0; \ } else { \ _TEST_ROP(_tcode, &result, GEX_OP_FCAS, oldval, oldval+1); \ swapped = (oldval == result) ? 1 : 0; \ } \ assert_always(!oldval || result >= oldval); \ assert_always(result < goal); \ oldval = result + swapped; \ remain -= swapped; \ } \ } \ BARRIER(); \ if (!myrank) { \ _TEST_OP_GET(_tcode,ad,&result,0,TEST_MYSEG(),GEX_FLAG_AD_MY_RANK); \ assert_always(result == goal); \ } \ } FORALL_DT(TEST_FCAS_DECL) /* Producer/consume ring tests */ #define _TEST_RING_DECL(_tcode,_op) \ GASNETT_NEVER_INLINE(_test_ring_##_op##_##_tcode, \ void _test_ring_##_op##_##_tcode(gex_AD_t ad, uint64_t max_val, int nbrhd)) { \ gex_TM_t testtm = gex_AD_QueryTM(ad); \ gex_OP_t ops = gex_AD_QueryOps(ad); \ int have_set = !!(ops & GEX_OP_SET); \ int set_added = have_set && (GEX_OP_##_op != GEX_OP_SET); \ MSG0(" Producer/consumer %s ring test (" #_op "%s)", \ (nbrhd ? "multiple" : "single"), \ (set_added ? " + SET" : "")); \ const gex_Flags_t flags = nbrhd ? GEX_FLAG_AD_MY_NBRHD : 0; \ const gex_Rank_t tgt = nbrhd ? neighbor : peer; \ const int wrap = (tgt <= myrank); \ _tcode##_type *myX = (_tcode##_type *)TEST_MYSEG(); \ _tcode##_type *myY = myX + 1; \ _tcode##_type *tgtX = (_tcode##_type *)TEST_SEG_TM(testtm, tgt); \ _tcode##_type *tgtY = tgtX + 1; \ unsigned int limit = iters/numranks; \ limit = MIN(limit, INT_MAX); \ limit = (unsigned int) MIN((uint64_t) limit, max_val); \ /* Take steps to test widest possible range... */ \ uint64_t step = max_val / (limit + 1); \ /* ... subject to a constraint that low half cannot be zero */ \ step -= (step & ((((uint64_t)1)<<(4*sizeof(step)))-1)) ? 0 : 1; \ /* start at 0, except first rank in each ring will start at step */ \ { const _tcode##_type init = step * (nbrhd ? !nbrhdrank : !myrank); \ _TEST_OP_SET(_tcode,ops,ad,myrank,myX,init,GEX_FLAG_AD_MY_RANK); \ _TEST_OP_SET(_tcode,ops,ad,myrank,myY,init,GEX_FLAG_AD_MY_RANK); \ } \ BARRIER(); \ for (unsigned int i = 0; i < limit; ++i) { \ const _tcode##_type expect = ((_tcode##_type)step) * (i + 1); \ _tcode##_type readX = 0; \ _tcode##_type readY = 0; \ /* CONSUMER: First OP uses ACQ */ \ while (1) { \ _TEST_RING_CONSUME_##_op(_tcode); \ if (readY == expect) { \ if (readX < readY) { \ static int once = 0; \ if (!once) { \ ERR("Read Y value %" PRIu64 " newer than Read X value" \ " %" PRIu64, (uint64_t)readY, (uint64_t)readX); \ once = 1; \ } \ } \ break; \ } \ if (readY != (expect - step)) { \ static int once = 0; \ if (!once) { \ ERR("Read Y value %" PRIu64 " did not match expected %" PRIu64 \ " nor previous expected value %" PRIu64 " at iteration %u", \ (uint64_t)readY, (uint64_t)(expect - step), (uint64_t)expect, i); \ once = 1; \ } \ } \ test_yield_if_polite(); \ gasnet_AMPoll(); \ } \ if (readX != expect) { \ static int once = 0; \ if (!once) { \ ERR("Read X value %" PRIu64 " did not match expected %" PRIu64 " at iteration %u", \ (uint64_t)readX, (uint64_t)expect, i); \ once = 1; \ } \ } \ /* PRODUCER: write(X) + write(Y,REL) */ \ _TEST_RING_PRODUCE_##_op(_tcode); \ } \ BARRIER(); \ } \ void test_ring_##_op##_##_tcode(gex_AD_t ad, uint64_t max_val, int nbrhd) { \ _test_ring_##_op##_##_tcode(ad, max_val, 0); \ if (nbrhd) _test_ring_##_op##_##_tcode(ad, max_val, 1); \ } // // Producers: // Mix SET with the OP for which the subtest is named (SET, SWAP, FCAS, ADD, XOR) // #define _TEST_RING_PRODUCE(_tcode,_opA,_op1A,_opB,_op1B) do { \ const uint64_t prev = step * (i + wrap); \ const uint64_t next = (prev + step); \ const _tcode##_type op1A = (_tcode##_type)(_op1A); \ const _tcode##_type op1B = (_tcode##_type)(_op1B); \ const _tcode##_type op2 = (_tcode##_type)(next); \ _tcode##_type tmp; \ _TEST_OP_BLOCKING(_tcode,ad,&tmp,tgt,tgtX,GEX_OP_##_opA,op1A,op2,flags); \ _TEST_OP_BLOCKING(_tcode,ad,&tmp,tgt,tgtY,GEX_OP_##_opB,op1B,op2,flags|GEX_FLAG_AD_REL); \ } while (0) #define _TEST_RING_PRODUCE1(_tcode,_op,_op1) _TEST_RING_PRODUCE(_tcode,_op,_op1,_op,_op1) #define _TEST_RING_PRODUCE2(_tcode,_op,_op1) \ switch (have_set ? TEST_RAND(0,3) : 3) { \ case 0: _TEST_RING_PRODUCE(_tcode,SET,next,SET,next); break; \ case 1: _TEST_RING_PRODUCE(_tcode,SET,next,_op,_op1); break; \ case 2: _TEST_RING_PRODUCE(_tcode,_op,_op1,SET,next); break; \ case 3: _TEST_RING_PRODUCE(_tcode,_op,_op1,_op,_op1); break; \ } #define _TEST_RING_PRODUCE_SET(_tcode) _TEST_RING_PRODUCE1(_tcode,SET,next) #define _TEST_RING_PRODUCE_SWAP(_tcode) _TEST_RING_PRODUCE2(_tcode,SWAP,next) #define _TEST_RING_PRODUCE_FCAS(_tcode) _TEST_RING_PRODUCE2(_tcode,FCAS,prev) #define _TEST_RING_PRODUCE_ADD(_tcode) _TEST_RING_PRODUCE2(_tcode,ADD,step) #define _TEST_RING_PRODUCE_XOR(_tcode) _TEST_RING_PRODUCE2(_tcode,XOR,(prev^next)) // // Consumers: // // When producer uses SET or SWAP, consumer uses only GET. // When producer uses FCAS, consumer mixes GET with a no-op FCAS(0,0). // When producer uses ADD, consumer mixes GET with a no-op FADD(0). // When producer uses XOR, consumer mixes GET with a no-op FXOR(0). // #define _TEST_RING_CONSUME(_tcode,_opA,_opB) do { \ _TEST_OP_BLOCKING(_tcode,ad,&readY,myrank,myY,GEX_OP_##_opA,0,0,GEX_FLAG_AD_MY_RANK|GEX_FLAG_AD_ACQ); \ _TEST_OP_BLOCKING(_tcode,ad,&readX,myrank,myX,GEX_OP_##_opB,0,0,GEX_FLAG_AD_MY_RANK); \ } while (0) #define _TEST_RING_CONSUME1(_tcode) _TEST_RING_CONSUME(_tcode,GET,GET) #define _TEST_RING_CONSUME2(_tcode,_op) \ switch (TEST_RAND(0,3)) { \ case 0: _TEST_RING_CONSUME(_tcode,GET,GET); break; \ case 1: _TEST_RING_CONSUME(_tcode,GET,_op); break; \ case 2: _TEST_RING_CONSUME(_tcode,_op,GET); break; \ case 3: _TEST_RING_CONSUME(_tcode,_op,_op); break; \ } #define _TEST_RING_CONSUME_SET(_tcode) _TEST_RING_CONSUME1(_tcode) #define _TEST_RING_CONSUME_SWAP(_tcode) _TEST_RING_CONSUME1(_tcode) #define _TEST_RING_CONSUME_FCAS(_tcode) _TEST_RING_CONSUME2(_tcode,FCAS) #define _TEST_RING_CONSUME_ADD(_tcode) _TEST_RING_CONSUME2(_tcode,FADD) #define _TEST_RING_CONSUME_XOR(_tcode) _TEST_RING_CONSUME2(_tcode,FXOR) // #define TEST_RING_DECL(_tcode) \ _TEST_RING_DECL(_tcode,SET) \ _TEST_RING_DECL(_tcode,SWAP) \ _TEST_RING_DECL(_tcode,FCAS) \ _TEST_RING_DECL(_tcode,ADD) \ _TEST_RING_DECL(_tcode,XOR) FORALL_DT(TEST_RING_DECL) GASNETT_NEVER_INLINE(doit, void doit(gex_TM_t testtm, gex_DT_t dt)) { gex_OP_t all_ops = GEX_OP_ADD | GEX_OP_SUB | GEX_OP_MULT | GEX_OP_MIN | GEX_OP_MAX | GEX_OP_INC | GEX_OP_DEC | GEX_OP_FADD | GEX_OP_FSUB | GEX_OP_FMULT | GEX_OP_FMIN | GEX_OP_FMAX | GEX_OP_FINC | GEX_OP_FDEC | GEX_OP_SET | GEX_OP_GET | GEX_OP_SWAP | GEX_OP_FCAS | GEX_OP_CAS; if ((dt != GEX_DT_FLT) && (dt != GEX_DT_DBL)) { all_ops |= GEX_OP_AND | GEX_OP_OR | GEX_OP_XOR | GEX_OP_FAND | GEX_OP_FOR | GEX_OP_FXOR; } #define MSG_CASE(dtcode) \ case GEX_DT_##dtcode: MSG0(" Tests for type " _STRINGIFY(dtcode##_type)); break; switch (dt) { FORALL_DT(MSG_CASE) } // Conduit- and type-specific op to use for initializing using _TEST_OP_SET(). // Valid values are SET, FCAS, or FADD. gex_OP_t test_op_set = GEX_OP_SET; #if GASNET_CONDUIT_IBV // For 64-bit types, ibv-conduit can offload FCAS and integer FADD, but not SET. // Do not randomize since selection must be single-valued. switch (dt) { case GEX_DT_U64: test_op_set = GEX_OP_FADD; break; case GEX_DT_I64: case GEX_DT_DBL: test_op_set = GEX_OP_FCAS; break; default: test_op_set = GEX_OP_SET; break; } #else test_op_set = GEX_OP_SET; #endif // Test of AD-specific flags { gex_AD_t ad; gex_AD_Create(&ad, testtm, dt, GEX_OP_SET | GEX_OP_FADD, 0); BARRIER(); #define FLAGS_CASE(dtcode) \ case GEX_DT_##dtcode: test_flags_##dtcode(ad); break; switch (dt) { FORALL_DT(FLAGS_CASE) } gex_AD_Destroy(ad); } // Max values for "ring", "cntr", "fcas" tests // max_int: Must be an 'int' which can be represented exactly in the tested datatype // max_u64: Must be a 'uint64_t' which can be represented exactly in the tested datatype uint64_t max_u64 = 0; int max_int; switch (dt) { case GEX_DT_U32: max_u64 = ((uint32_t)-1); break; case GEX_DT_I32: max_u64 = ((uint32_t)-1) >> 1; break; case GEX_DT_U64: max_u64 = ((uint64_t)-1); break; case GEX_DT_I64: max_u64 = ((uint64_t)-1) >> 1; break; case GEX_DT_FLT: max_u64 = (uint64_t)1 << (FLT_MANT_DIG-1); break; case GEX_DT_DBL: max_u64 = (uint64_t)1 << (DBL_MANT_DIG-1); break; } max_int = (int) MIN((uint64_t)INT_MAX, max_u64); // Tests of ACQ/REL signaling on a ring, using several different ops to signal // Only run per-neighborhood rings on team0, and when there are multiple neighborhoods const int nbrhd = (testtm == myteam) && multinbrhd; #define RING_TEST(op1,op2,add_set,bitwise) \ if (!bitwise || (dt!=GEX_DT_FLT && dt!=GEX_DT_DBL)) { \ gex_AD_t ad; \ gex_OP_t test_ops = GEX_OP_##op1 | GEX_OP_##op2 | \ (add_set ? GEX_OP_SET : 0); \ /* set_op will be non-zero if only if an "extra" op is needed by _TEST_OP_SET() */ \ gex_OP_t set_op = (test_ops & _TEST_OP_SET_OPS) ? 0 : test_op_set; \ gex_AD_Create(&ad, testtm, dt, (test_ops | set_op | GEX_OP_GET), 0); \ BARRIER(); \ switch (dt) { FORALL_DT(RING_##op1##_CASE) } \ gex_AD_Destroy(ad); \ } #define RING_SET_CASE(dtcode) case GEX_DT_##dtcode: test_ring_SET_##dtcode(ad, max_u64, nbrhd); break; #define RING_SWAP_CASE(dtcode) case GEX_DT_##dtcode: test_ring_SWAP_##dtcode(ad, max_u64, nbrhd); break; #define RING_FCAS_CASE(dtcode) case GEX_DT_##dtcode: test_ring_FCAS_##dtcode(ad, max_u64, nbrhd); break; #define RING_ADD_CASE(dtcode) case GEX_DT_##dtcode: test_ring_ADD_##dtcode(ad, max_u64, nbrhd); break; #define RING_XOR_CASE(dtcode) case GEX_DT_##dtcode: test_ring_XOR_##dtcode(ad, max_u64, nbrhd); break; // 1. SET RING_TEST(SET,SET,0,0) // 2. (F)OP w/o SET RING_TEST(FCAS,FCAS,0,0) RING_TEST(ADD,FADD,0,0) if (test_op_set != GEX_OP_SET) { // Not different from #3 unless we're avoiding use of GEX_OP_SET, // such as for a (conduit,type) for which SET would prelude offload. RING_TEST(SWAP,SWAP,0,0) RING_TEST(XOR,FXOR,0,1) } // 3. (F)OP w/ SET RING_TEST(FCAS,FCAS,1,0) RING_TEST(ADD,FADD,1,0) RING_TEST(SWAP,SWAP,1,0) RING_TEST(XOR,FXOR,1,1) // Test of contended (F)ADD/(F)INC (central counter) { gex_AD_t ad; gex_AD_Create(&ad, testtm, dt, GEX_OP_GET | GEX_OP_ADD | GEX_OP_FADD | GEX_OP_INC | GEX_OP_FINC, 0); BARRIER(); #define CNTR_CASE(dtcode) \ case GEX_DT_##dtcode: test_cntr_##dtcode(ad, max_int); break; switch (dt) { FORALL_DT(CNTR_CASE) } gex_AD_Destroy(ad); } // Test of contended FCAS (central counter) { gex_AD_t ad; gex_AD_Create(&ad, testtm, dt, GEX_OP_GET | GEX_OP_FCAS, 0); BARRIER(); #define FCAS_CASE(dtcode) \ case GEX_DT_##dtcode: test_fcas_##dtcode(ad,max_int); break; switch (dt) { FORALL_DT(FCAS_CASE) } gex_AD_Destroy(ad); } // Range of random numbers // Chosen to exercise as many bits of each type as possible within constraints: // + lo and hi must be int64_t (valid for use with TEST_RAND) // + For x in [lo,hi] 2*x*x must be representable exactly in the target type // (because 2*x*x is the max value reached by the series of arithmetic ops) int64_t lo = 0; int64_t hi = 0; test_static_assert(FLT_RADIX == 2); // check that 2*hi*hi does not overflow, but same for hi+1 does #define CHECK_LIMIT(type,hi) do { \ assert( (type)(2*hi*hi) > hi ); \ assert( (type)(2*(hi+1)*(hi+1)) < hi ); \ } while (0) switch (dt) { case GEX_DT_U32: hi = 0xB504; // floor(sqrt((2^32-1)/2)) lo = 0; CHECK_LIMIT(uint32_t,hi); break; case GEX_DT_I32: hi = (1<<15) - 1; lo = -hi; CHECK_LIMIT(int32_t,hi); break; case GEX_DT_U64: hi = 0xB504F333ull; // floor(sqrt((2^64-1)/2)) lo = 0; CHECK_LIMIT(uint64_t,hi); break; case GEX_DT_I64: hi = (1U<<31) - 1; lo = -hi; CHECK_LIMIT(int64_t,hi); break; case GEX_DT_FLT: hi = 1 << (FLT_MANT_DIG / 2); lo = -hi; break; case GEX_DT_DBL: hi = 1 << (DBL_MANT_DIG / 2); lo = -hi; break; } // TODO: deterministic tests of bitwise ops (see testtools for examples) // TODO: deterministic tests of known corner cases (if/when specified) // Integer overflow behaviors // Floating-point +/- zero behavior // TODO: randomized tests of important subsets // SET/GET/FCAS (universal) // SET/GET/FCAS/SWAP (MCS locks and Nemesis queues) // SET/GET/FADD // TODO: concurrent tests of correctness of more ops // Randomized testing for (int subtest = 0; subtest < 2; ++subtest) { gex_OP_t ops = 0; const char *msg = ""; switch (subtest) { case 0: // Test all ops legal for the data type ops = all_ops; break; case 1: // Whitebox testing of conduits with native implementations msg = " (conduit-specialized ops)"; ops = all_ops; // This logic reduces "ops" to the conduit's specialized subset #if GASNET_CONDUIT_ARIES // 1) No MULT for any type ops &= ~(GEX_OP_MULT | GEX_OP_FMULT); // 2) No MIN or MAX for the unsigned integer types if ((dt == GEX_DT_U32) || (dt == GEX_DT_U64)) { ops &= ~(GEX_OP_MIN | GEX_OP_FMIN | GEX_OP_MAX | GEX_OP_FMAX); } // 3) No ADD (or its derivatives) for double if (dt == GEX_DT_DBL) { ops &= ~(GEX_OP_ADD | GEX_OP_FADD | GEX_OP_SUB | GEX_OP_FSUB | GEX_OP_INC | GEX_OP_FINC | GEX_OP_DEC | GEX_OP_FDEC); } #elif GASNET_CONDUIT_UCX // 1) No FP types if ((dt == GEX_DT_FLT) || (dt == GEX_DT_DBL)) continue; // 2) No MULT, MIN or MAX ops &= ~(GEX_OP_MULT | GEX_OP_FMULT | GEX_OP_MIN | GEX_OP_FMIN | GEX_OP_MAX | GEX_OP_FMAX); #elif GASNET_CONDUIT_IBV if ((dt == GEX_DT_U64) || (dt == GEX_DT_I64)) { ops = (GEX_OP_ADD | GEX_OP_FADD | GEX_OP_SUB | GEX_OP_FSUB | GEX_OP_INC | GEX_OP_FINC | GEX_OP_DEC | GEX_OP_FDEC | GEX_OP_GET | /* NO SET */ GEX_OP_CAS | GEX_OP_FCAS ); } else if (dt == GEX_DT_DBL) { ops = (GEX_OP_GET | /* NO SET */ GEX_OP_CAS | GEX_OP_FCAS); } else { continue; // No open-box testing for other types } #else continue; // No open-box testing #endif } gex_AD_t ad; gex_AD_Create(&ad, testtm, dt, ops, 0); BARRIER(); #define RAND_CASE(dtcode) \ case GEX_DT_##dtcode: test_rand_##dtcode(ad,lo,hi,msg); break; switch (dt) { FORALL_DT(RAND_CASE) } BARRIER(); gex_AD_Destroy(ad); } } void doall(gex_TM_t tm) { myrank = gex_TM_QueryRank(tm); numranks = gex_TM_QuerySize(tm); peer = (myrank + 1) % numranks; peerseg = TEST_SEG_TM(tm, peer); if (tm == myteam) { neighbor = nbrhdinfo[(nbrhdrank + 1) % nbrhdsize].gex_jobrank; } else { // Search for a neighbor in the team (eventually finding self if no others). for (gex_Rank_t r = 1; r <= nbrhdsize; ++r) { neighbor = gex_TM_TranslateJobrankToRank(tm, nbrhdinfo[(nbrhdrank + r) % nbrhdsize].gex_jobrank); if (neighbor != GEX_RANK_INVALID) break; } assert(neighbor != GEX_RANK_INVALID); } doit(tm, GEX_DT_U32); doit(tm, GEX_DT_I32); doit(tm, GEX_DT_U64); doit(tm, GEX_DT_I64); doit(tm, GEX_DT_FLT); doit(tm, GEX_DT_DBL); } /* ------------------------------------------------------------------------------------ */ int main(int argc, char **argv) { GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testratomic", &argc, &argv, 0)); int arg = 1; if (argc > arg) { iters = atoi(argv[arg]); ++arg; } if (!iters) iters = 1000; unsigned int seedoffset = 0; if (argc > arg) { seedoffset = atoi(argv[arg]); ++arg; } gex_System_QueryNbrhdInfo(&nbrhdinfo, &nbrhdsize, &nbrhdrank); multinbrhd = (nbrhdsize != gex_TM_QuerySize(myteam)); mynbrhd = (int)nbrhdinfo[0].gex_jobrank; // need scratch sizes before Attatch gex_TM_t subtm = GEX_TM_INVALID; int color = gex_TM_QueryRank(myteam) & 1; // odds & evens scratch_sz1 = gex_TM_Split(&subtm, myteam, color, 0, 0, 0, GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED); scratch_sz2 = gex_TM_Split(&subtm, myteam, mynbrhd, 0, 0, 0, GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); test_init("testratomic",0,"(iters) (seed0)"); TEST_SET_WAITMODE(1); gex_Rank_t self = gex_TM_QueryRank(myteam); if (seedoffset == 0) { seedoffset = (((unsigned int)TIME()) & 0xFFFF); TEST_BCAST(&seedoffset, 0, &seedoffset, sizeof(seedoffset)); } TEST_SRAND(self+seedoffset); MSG("Running %i iterations of remote atomics tests (seed = %u).", iters, self+seedoffset); BARRIER(); MSG0("Running tests using all ranks"); doall(myteam); // TODO: use gex_TM_Destroy(subtm) and do away with scratch_offset uintptr_t scratch_offset = PAGESZ; if (gex_TM_QuerySize(myteam) > 1) { BARRIER(); MSG0("Running tests using odd/even subteams"); gex_TM_Split(&subtm, myteam, color, 0, (void*)(scratch_offset + (uintptr_t)TEST_MYSEG()), scratch_sz1, 0); scratch_offset + scratch_sz1; assert_always(subtm != GEX_TM_INVALID); doall(subtm); } if (multinbrhd) { BARRIER(); MSG0("Running tests using nbrhd subteams"); gex_TM_Split(&subtm, myteam, mynbrhd, 0, (void*)(scratch_offset + (uintptr_t)TEST_MYSEG()), scratch_sz2, 0); scratch_offset + scratch_sz2; assert_always(subtm != GEX_TM_INVALID); doall(subtm); } int32_t errs = test_errs; gex_Event_Wait( gex_Coll_ReduceToAllNB(myteam, &errs, &errs, GEX_DT_I32, sizeof(errs), 1, GEX_OP_ADD, NULL, NULL, 0)); MSG0("done. (detected %i errors)", (int)errs); BARRIER(); gasnet_exit(!!errs); return !!errs; } gasnet-2025.8.0/tests/testbarrierconf.c0000664000175000017500000004163615142313673020136 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testbarrierconf.c $ * Description: GASNet barrier performance test * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #ifndef PERFORM_MIXED_NAMED_ANON_TESTS #define PERFORM_MIXED_NAMED_ANON_TESTS 1 #endif static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; static int do_try = 0; GASNETT_INLINE(my_barrier_wait) int my_barrier_wait(int value, int flags) { int rc; if (do_try) { rc = gasnet_barrier_try(value, flags); while (rc == GASNET_ERR_NOT_READY) { gasnett_sched_yield(); rc = gasnet_barrier_try(value, flags); } } else { rc = gasnet_barrier_wait(value, flags); } return rc; } #define hidx_done_shorthandler 200 volatile int done = 0; void done_shorthandler(gex_Token_t token) { done = 1; } gex_AM_Entry_t htable[] = { { hidx_done_shorthandler, (gex_AM_Fn_t)done_shorthandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0, NULL, NULL } }; static void * doTest(void *arg); static int mynode, nodes, iters; int main(int argc, char **argv) { int pollers = 0; int arg; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testbarrierconf", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, 1)); #if GASNET_PAR test_init("testbarrierconf", 0, "[-t] [-p polling_threads] (iters)\n" " The -p option gives a number of polling threads to spawn (default is 0).\n" " The -t option replaces barrier_wait calls with looping on barrier_try"); #else test_init("testbarrierconf", 0, "[-t] (iters)\n" " The -t option replaces barrier_wait calls with looping on barrier_try"); #endif arg = 1; while (argc-arg >= 1) { if (!strcmp(argv[arg], "-p")) { #ifdef GASNET_PAR if (argc-arg < 2) { if (mynode == 0) { fprintf(stderr, "testbarrierconf %s\n", GASNET_CONFIG_STRING); fprintf(stderr, "ERROR: The -p option requires an argument.\n"); fflush(NULL); } sleep(1); gasnet_exit(1); } pollers = test_thread_limit(atoi(argv[arg+1])+1)-1; arg += 2; #else if (mynode == 0) { fprintf(stderr, "testbarrierconf %s\n", GASNET_CONFIG_STRING); fprintf(stderr, "ERROR: The -p option is only available in the PAR configuration.\n"); fflush(NULL); } sleep(1); gasnet_exit(1); #endif } else if (!strcmp(argv[arg], "-t")) { do_try = 1; arg += 1; } else break; } if (argc-arg >= 1) iters = atoi(argv[arg]); if (iters <= 0) iters = 1000; if (argc-arg >= 2) test_usage(); mynode = gex_TM_QueryRank(myteam); nodes = gex_TM_QuerySize(myteam); if (mynode == 0) { const char * mode = do_try ? "try" : "wait"; #ifdef GASNET_PAR printf("Running barrier_%s conformance test with %d iterations and %i extra polling threads...\n", mode, iters,pollers); #else printf("Running barrier_%s conformance test with %d iterations...\n", mode, iters); #endif fflush(stdout); } BARRIER(); TEST_SET_WAITMODE_RESERVE(pollers+1, 1); #ifdef GASNET_PAR if (pollers) test_createandjoin_pthreads(pollers+1,doTest,NULL,0); else #endif doTest(NULL); MSG("done."); gasnet_exit(0); return 0; } static void * doTest(void *arg) { int i = 0; int result; if (arg) { /* I am a polling thread */ GASNET_BLOCKUNTIL(done); return NULL; } BARRIER(); if (!PERFORM_MIXED_NAMED_ANON_TESTS) { if (mynode == 0) { MSG("WARNING: skipping tests which mix named and anonymous barriers, " "which are known to fail in this configuration"); } BARRIER(); } /* Test for required failures: */ for (i = 0; i < iters; ++i) { /* node 0 indicates mismatch on entry: */ gasnet_barrier_notify(0, !mynode ? GASNET_BARRIERFLAG_MISMATCH : 0); result = my_barrier_wait(0, !mynode ? GASNET_BARRIERFLAG_MISMATCH : 0); if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect barrier mismatch indicated on notify."); gasnet_exit(1); } /* node 0 indicates mismatch on blocking barrier: */ result = gasnet_barrier(0, !mynode ? GASNET_BARRIERFLAG_MISMATCH : 0); if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect barrier mismatch indicated in blocking barrier."); gasnet_exit(1); } /* ids differ between notify and wait */ gasnet_barrier_notify(0, 0); result = my_barrier_wait(1, 0); if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect mismatch between id at notify and wait."); gasnet_exit(1); } /* Flags can (as of GASNet 1.20) differ between notify and wait: */ gasnet_barrier_notify(0, GASNET_BARRIERFLAG_ANONYMOUS); result = my_barrier_wait(0, 0); if (result != GASNET_OK) { MSG("ERROR: Failed to allow anonymous notify with named wait."); gasnet_exit(1); } if (!gasnet_barrier_result(&result)) { MSG("ERROR: Wrong gasnet_barrier_result() return from anonymous notify with named wait."); gasnet_exit(1); } gasnet_barrier_notify(0, 0); result = my_barrier_wait(0, GASNET_BARRIERFLAG_ANONYMOUS); if (result != GASNET_OK) { MSG("ERROR: Failed to allow named notify with anonymous wait."); gasnet_exit(1); } if (gasnet_barrier_result(&result)) { MSG("ERROR: Wrong gasnet_barrier_result() return from named notify with anonymous wait."); gasnet_exit(1); } else if (0 != result) { MSG("ERROR: Wrong gasnet_barrier_result() value from named notify with anonymous wait."); gasnet_exit(1); } // GASNet-EX barriers can overlap { gex_Event_t ev[8]; const int count = sizeof(ev) / sizeof(*ev); // Initiate multiple split-phase barriers: for (int i = 0; i < count; ++i) { ev[i] = gex_Coll_BarrierNB(myteam, 0); } // Retire them out-of-order for (int i = 0; i < count; ++i) { gex_Event_Wait(ev[(mynode + i) % count]); } } if (nodes > 1) { int j; for (j = 0; j < nodes; ++j) { if (PERFORM_MIXED_NAMED_ANON_TESTS) { /* Mix many named with one anonymous: */ if (mynode == j) { gasnet_barrier_notify(12345, GASNET_BARRIERFLAG_ANONYMOUS); result = my_barrier_wait(12345, GASNET_BARRIERFLAG_ANONYMOUS); } else { gasnet_barrier_notify(5551212, 0); result = my_barrier_wait(5551212, 0); } if (result != GASNET_OK) { MSG("ERROR: Failed to match anon notify on node %d with named notify elsewhere.", j); gasnet_exit(1); } if (gasnet_barrier_result(&result)) { MSG("ERROR: Wrong gasnet_barrier_result() return from mixed test #1"); gasnet_exit(1); } else if (5551212 != result) { MSG("ERROR: Wrong gasnet_barrier_result() value from mixed test #1"); gasnet_exit(1); } /* Mix many named with one anonymous (blocking): */ if (mynode == j) { result = gasnet_barrier(12345, GASNET_BARRIERFLAG_ANONYMOUS); } else { result = gasnet_barrier(5551212, 0); } if (result != GASNET_OK) { MSG("ERROR: Failed to match anon node %d with named barier elsewhere.", j); gasnet_exit(1); } if (gasnet_barrier_result(&result)) { MSG("ERROR: Wrong gasnet_barrier_result() return from mixed test #1b"); gasnet_exit(1); } else if (5551212 != result) { MSG("ERROR: Wrong gasnet_barrier_result() value from mixed test #1b"); gasnet_exit(1); } /* Mix many named with one anonymous notify plus named wait: */ if (mynode == j) { gasnet_barrier_notify(12345, GASNET_BARRIERFLAG_ANONYMOUS); result = my_barrier_wait(5551212, 0); } else { gasnet_barrier_notify(5551212, 0); result = my_barrier_wait(5551212, 0); } if (result != GASNET_OK) { MSG("ERROR: Failed to match anon notify and named wait on node %d with named notify elsewhere.", j); gasnet_exit(1); } if (gasnet_barrier_result(&result)) { MSG("ERROR: Wrong gasnet_barrier_result() return from mixed test #2"); gasnet_exit(1); } else if (5551212 != result) { MSG("ERROR: Wrong gasnet_barrier_result() value from mixed test #2"); gasnet_exit(1); } /* Mix many named with one anonymous notify plus MISnamed wait: */ if (mynode == j) { gasnet_barrier_notify(12345, GASNET_BARRIERFLAG_ANONYMOUS); result = my_barrier_wait(12345, 0); if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect anon notify and mis-named wait on node %d with named notify elsewhere.", j); gasnet_exit(1); } } else { gasnet_barrier_notify(5551212, 0); result = my_barrier_wait(5551212, 0); /* neither required not prohibited from signalling an error here. */ } /* Mix one named with many anonymous: */ if (mynode == j) { gasnet_barrier_notify(0xcafef00d, 0); result = my_barrier_wait(0xcafef00d, 0); } else { gasnet_barrier_notify(911, GASNET_BARRIERFLAG_ANONYMOUS); result = my_barrier_wait(911, GASNET_BARRIERFLAG_ANONYMOUS); } if (result != GASNET_OK) { MSG("ERROR: Failed to match named notify on node %d with anon notify elsewhere.", j); gasnet_exit(1); } if (gasnet_barrier_result(&result)) { MSG("ERROR: Wrong gasnet_barrier_result() return from mixed test #4"); gasnet_exit(1); } else if (0xcafef00d != result) { MSG("ERROR: Wrong gasnet_barrier_result() value from mixed test #4"); gasnet_exit(1); } /* Mix one named with many anonymous (blocking): */ if (mynode == j) { result = gasnet_barrier(0xcafef00d, 0); } else { result = gasnet_barrier(911, GASNET_BARRIERFLAG_ANONYMOUS); } if (result != GASNET_OK) { MSG("ERROR: Failed to match named barrier on node %d with anon elsewhere.", j); gasnet_exit(1); } if (gasnet_barrier_result(&result)) { MSG("ERROR: Wrong gasnet_barrier_result() return from mixed test #4b"); gasnet_exit(1); } else if (0xcafef00d != result) { MSG("ERROR: Wrong gasnet_barrier_result() value from mixed test #4b"); gasnet_exit(1); } } /* All named (blocking): */ result = gasnet_barrier(i, 0); if (result != GASNET_OK) { MSG("ERROR: Failed to pass on properly matched barrier"); gasnet_exit(1); } if (gasnet_barrier_result(&result)) { MSG("ERROR: Wrong gasnet_barrier_result() return from matching barrier"); gasnet_exit(1); } else if (i != result) { MSG("ERROR: Wrong gasnet_barrier_result() value from matching barrier"); gasnet_exit(1); } /* All anon (blocking): */ result = gasnet_barrier(i^j, GASNET_BARRIERFLAG_ANONYMOUS); if (result != GASNET_OK) { MSG("ERROR: Failed to pass on all-anonymous barrier"); gasnet_exit(1); } if (!gasnet_barrier_result(&result)) { MSG("ERROR: Wrong gasnet_barrier_result() return from all-anonymous barrier"); gasnet_exit(1); } /* All named: */ gasnet_barrier_notify(i, 0); result = my_barrier_wait(i, 0); if (result != GASNET_OK) { MSG("ERROR: Failed to pass on properly matched notify/wait"); gasnet_exit(1); } if (gasnet_barrier_result(&result)) { MSG("ERROR: Wrong gasnet_barrier_result() return from matching notify/wait"); gasnet_exit(1); } else if (i != result) { MSG("ERROR: Wrong gasnet_barrier_result() value from matching notify/wait"); gasnet_exit(1); } /* All anon: */ gasnet_barrier_notify(i^j, GASNET_BARRIERFLAG_ANONYMOUS); result = my_barrier_wait(i^j, 0); if (result != GASNET_OK) { MSG("ERROR: Failed to pass on all-anonymous notify"); gasnet_exit(1); } if (!gasnet_barrier_result(&result)) { MSG("ERROR: Wrong gasnet_barrier_result() return from all-anonymous notify"); gasnet_exit(1); } /* Mismatched id: */ gasnet_barrier_notify(mynode == j, 0); result = my_barrier_wait(mynode == j, 0); if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect different notify id on node %d.", j); gasnet_exit(1); } /* Mismatched id (blocking): */ result = gasnet_barrier(mynode == j, 0); if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect different barrier id on node %d.", j); gasnet_exit(1); } /* Node j indicates mismatch on entry: */ gasnet_barrier_notify(0, (j == mynode) ? GASNET_BARRIERFLAG_MISMATCH : 0); result = my_barrier_wait(0, (j == mynode) ? GASNET_BARRIERFLAG_MISMATCH : 0); if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect barrier mismatch indicated on notify by node %d.", j); gasnet_exit(1); } /* Node j indicates mismatch on barrier: */ result = gasnet_barrier(0, (j == mynode) ? GASNET_BARRIERFLAG_MISMATCH : 0); if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect barrier mismatch indicated by node %d.", j); gasnet_exit(1); } #if 0 /* TBD: is this case clearly defined by the spec? */ /* Node j indicates anon+mismatch on entry: */ gasnet_barrier_notify(0, GASNET_BARRIERFLAG_ANONYMOUS | ((j == mynode) ? GASNET_BARRIERFLAG_MISMATCH : 0)); result = my_barrier_wait(0, GASNET_BARRIERFLAG_ANONYMOUS | ((j == mynode) ? GASNET_BARRIERFLAG_MISMATCH : 0)); if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect anonymous barrier mismatch indicated on notify by node %d."); gasnet_exit(1); } #endif } } else if (i == 0) { /* DOB: only warn once per run */ MSG0("WARNING: pair mismatch tests skipped (only 1 node)"); } if (nodes > 2 && i < MAX(2,iters/1000)) { // limit iterations of the node^2 test below int j, k; for (j = 0; j < nodes; ++j) { for (k = 0; k < nodes; ++k) { if (k == j) continue; if (PERFORM_MIXED_NAMED_ANON_TESTS) { /* Mix two names and anonymous: */ if (mynode == j) { gasnet_barrier_notify(1592, 0); result = my_barrier_wait(1592, 0); } else if (mynode == k) { gasnet_barrier_notify(1776, 0); result = my_barrier_wait(1776, 0); } else { gasnet_barrier_notify(12345, GASNET_BARRIERFLAG_ANONYMOUS); result = my_barrier_wait(12345, GASNET_BARRIERFLAG_ANONYMOUS); } if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect mismatched names (on %d and %d) intermixed with anon.", j, k); gasnet_exit(1); } /* Mix two names and anonymous (blocking): */ if (mynode == j) { result = gasnet_barrier(1592, 0); } else if (mynode == k) { result = gasnet_barrier(1776, 0); } else { result = gasnet_barrier(12345, GASNET_BARRIERFLAG_ANONYMOUS); } if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect mismatched names (on %d and %d) intermixed with anon.", j, k); gasnet_exit(1); } /* Mix one named with many anonymous, of which one gives MISnamed wait: */ if (mynode == j) { gasnet_barrier_notify(511, GASNET_BARRIERFLAG_ANONYMOUS); result = my_barrier_wait(511, 0); if (result != GASNET_ERR_BARRIER_MISMATCH) { MSG("ERROR: Failed to detect anon notify and mis-named wait on node %d with one named notify elsewhere.", k); gasnet_exit(1); } } else { gasnet_barrier_notify(42, (mynode == k) ? 0: GASNET_BARRIERFLAG_ANONYMOUS); result = my_barrier_wait(42, (mynode == k) ? 0: GASNET_BARRIERFLAG_ANONYMOUS); /* neither required not prohibited from signalling an error here. */ } } } } } else if (i == 0) { /* DOB: only warn once per run */ MSG0("WARNING: multiway mismatch tests skipped (less than 3 nodes)"); } TEST_PROGRESS_BAR(i, iters); BARRIER(); } gex_AM_RequestShort0(myteam, mynode, hidx_done_shorthandler, 0); return NULL; } gasnet-2025.8.0/tests/testze.c0000664000175000017500000002602015142313673016246 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testze.c $ * Copyright (c) 2022, The Regents of the University of California * * Description: test of GEX_MK_CLASS_ZE * * This test verifies correctness of gex_MK_Create() for the device class * GEX_MK_CLASS_ZE. This includes checking the expected behavior of builds * both with and without configure-time enable of support for this device * class. */ #include #include #include static size_t len = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR (2*len) #endif #include #if GASNET_HAVE_MK_CLASS_ZE #include "zekind.h" #endif static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; static gex_Rank_t myrank; static gex_Rank_t nranks; static uint8_t *cmp_buffer; #if GASNET_HAVE_MK_CLASS_ZE static int equalDH(uint8_t *d_ptr, uint8_t *h_ptr, size_t len) { return 1; // UNIMPLEMENTED! } #endif #define CHECK_DEVICE(label,d_ptr,h_ptr,len) \ do { \ if (! equalDH(d_ptr,h_ptr,len)) { \ ERR(label " verification failed"); \ } else { \ MSG(label " verification NOT IMPLEMENTED"); \ } \ } while (0) #define CHECK_HOST(label,h_ptr1,h_ptr2,len) \ do { \ if (memcmp(h_ptr1,h_ptr2,len)) { \ ERR(label " verification failed"); \ } else { \ MSG(label " verification passed"); \ } \ } while (0) int main(int argc, char **argv) { int client_segment = 1; int seed = 0; int rc; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testze", &argc, &argv, 0)); test_init("testze", 0, "[options] (size) (seed)\n" " Segment allocation options:\n" " -client-seg: Test client-allocated device segment (default)\n" " -gasnet-seg: Test GASNet-allocated device segment\n" " size length of segment\n" " seed seed for PRNG\n"); int help = 0; int argi = 1; while (argc > argi) { if (!strcmp(argv[argi], "-client-seg")) { client_segment = 1; ++argi; } else if (!strcmp(argv[argi], "-gasnet-seg")) { client_segment = 0; ++argi; } else if (argv[argi][0] == '-') { help = 1; ++argi; } else break; } if (argi < argc) { len = atol(argv[argi]); ++argi; } if (len == 0) { len = 8*1024*1024; } if (argi < argc) { seed = atoi(argv[argi]); ++argi; } if (seed == 0) { seed = (((unsigned int)TIME()) & 0xFFFF); } if (argi < argc || help) test_usage(); cmp_buffer = test_malloc(len); uint8_t *loc1 = test_malloc(len); uint8_t *loc2 = test_malloc(len); uint8_t *array1 = test_malloc(len); uint8_t *array2 = test_malloc(len); myrank = gex_TM_QueryRank(myteam); nranks = gex_TM_QuerySize(myteam); gex_Rank_t peer = (myrank + 1) % nranks; if (nranks == 1) { // TODO: remove once loopback kinds works correctly MSG0("WARNING: This test requires a minimum of two nodes. Test skipped.\n"); gasnet_exit(0); // prevents false negatives, such as from test harnesses for smp-conduit } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); MSG0("Running oneAPI Level Zero non-local xfer tests with size %lu, PRNG seed %d, and %s-allocated device segment", (unsigned long)len, seed, client_segment ? "client" : "GASNet"); const char *zeam = getenv("ZE_AFFINITY_MASK"); // Intentionally NOT gasnet_getenv() if (zeam) { MSG("ZE_AFFINITY_MASK='%s'", zeam); } else { MSG("ZE_AFFINITY_MASK is unset"); } TEST_BCAST(&seed, 0, &seed, sizeof(seed)); TEST_SRAND(seed); for (size_t i = 0; i < len; ++i) { unsigned int r = TEST_RAND(0,65535); array1[i] = r & 0xff; array2[i] = (r >> 8) & 0xff; } BARRIER(); gex_EP_t gpu1_ep, gpu2_ep; gex_MK_t kind; gex_MK_Create_args_t args; args.gex_flags = 0; args.gex_class = GEX_MK_CLASS_ZE; args.gex_args.gex_class_ze.gex_zeDevice = NULL; args.gex_args.gex_class_ze.gex_zeContext = NULL; args.gex_args.gex_class_ze.gex_zeMemoryOrdinal = 0; #if GASNET_HAVE_MK_CLASS_ZE { if (GASNET_HAVE_MK_CLASS_MULTIPLE != 1) { ERR("Invalid GASNET_HAVE_MK_CLASS_MULTIPLE"); } test_static_assert(GASNET_MAXEPS >= 2); int count = 0; ze_result_t result = zeInit(0); if (result) { MSG("GEX_MK_CLASS_ZE: skipped - initialization failed (%d)", (int)result); } else { count = test_open_ze_device(0, &args); if (!count) { MSG("GEX_MK_CLASS_ZE: skipped - could not find a GPU device"); } } if (!count) { // If this lack of a device is NOT a collective property, then we want // to at least balance the collective operations (to avoid hanging). // However, at least one peer will fail a gex_EP_QueryBoundSegmentNB(). // For the case all ranks lack a GPU, this test *will* exit gracefully. GASNET_Safe( gex_EP_PublishBoundSegment(myteam, NULL, 0, 0) ); GASNET_Safe( gex_EP_PublishBoundSegment(myteam, NULL, 0, 0) ); for (int i = 0; i < 4; ++i) BARRIER(); // currently exactly one per case } else { MSG("device enumeration found %d GPU devices", count); ze_device_handle_t device = args.gex_args.gex_class_ze.gex_zeDevice; ze_context_handle_t context = args.gex_args.gex_class_ze.gex_zeContext; uint8_t *client_gpu1 = NULL; uint8_t *client_gpu2 = NULL; if (client_segment) { ze_device_mem_alloc_desc_t aDesc = {ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC,}; check_zecall( zeMemAllocDevice( context, &aDesc, TEST_SEGSZ_REQUEST, 64, device, (void**)&client_gpu1 ) ); check_zecall( zeMemAllocDevice( context, &aDesc, TEST_SEGSZ_REQUEST, 64, device, (void**)&client_gpu2 ) ); } // Create and Destroy a kind kind = GEX_MK_INVALID; GASNET_Safe( gex_MK_Create(&kind, myclient, &args, 0) ); assert_always(kind != GEX_MK_INVALID); gex_MK_Destroy(kind, 0); // Create the Kind "for keeps" // TODO: if multiple devices, this should optionally create kinds using two devices kind = GEX_MK_INVALID; GASNET_Safe( gex_MK_Create(&kind, myclient, &args, 0) ); assert_always(kind != GEX_MK_INVALID); // Create the first GPU segment gex_Segment_t d_segment1 = GEX_SEGMENT_INVALID; GASNET_Safe( gex_Segment_Create(&d_segment1, myclient, client_gpu1, TEST_SEGSZ_REQUEST, kind, 0)); uint8_t *loc_gpu1 = gex_Segment_QueryAddr(d_segment1); if (client_segment) assert_always(loc_gpu1 == client_gpu1); // Create first GPU endpoint and bind its segment GASNET_Safe( gex_EP_Create(&gpu1_ep, myclient, GEX_EP_CAPABILITY_RMA, 0)); GASNET_Safe( gex_EP_BindSegment(gpu1_ep, d_segment1, 0) ); GASNET_Safe( gex_EP_PublishBoundSegment(myteam, &gpu1_ep, 1, 0) ); // Repeat to create a second local GPU segment gex_Segment_t d_segment2 = GEX_SEGMENT_INVALID; GASNET_Safe( gex_Segment_Create(&d_segment2, myclient, client_gpu2, TEST_SEGSZ_REQUEST, kind, 0)); uint8_t *loc_gpu2 = gex_Segment_QueryAddr(d_segment2); if (client_segment) assert_always(loc_gpu2 == client_gpu2); GASNET_Safe( gex_EP_Create(&gpu2_ep, myclient, GEX_EP_CAPABILITY_RMA, 0)); GASNET_Safe( gex_EP_BindSegment(gpu2_ep, d_segment2, 0) ); GASNET_Safe( gex_EP_PublishBoundSegment(myteam, &gpu2_ep, 1, 0) ); // TM pairs for several possible pairings gex_EP_Index_t host_epidx = gex_EP_QueryIndex(myep); gex_EP_Index_t gpu1_epidx = gex_EP_QueryIndex(gpu1_ep); gex_EP_Index_t gpu2_epidx = gex_EP_QueryIndex(gpu2_ep); assert_always(host_epidx == 0); assert_always(gpu1_epidx == 1); assert_always(gpu2_epidx == 2); gex_TM_t LH_RG1 = gex_TM_Pair(myep, gpu1_epidx); gex_TM_t LH_RG2 = gex_TM_Pair(myep, gpu2_epidx); gex_TM_t LG1_RG1 = gex_TM_Pair(gpu1_ep, gpu1_epidx); gex_TM_t LG2_RG2 = gex_TM_Pair(gpu2_ep, gpu2_epidx); gex_TM_t LG1_RG2 = gex_TM_Pair(gpu1_ep, gpu2_epidx); gex_TM_t LG2_RG1 = gex_TM_Pair(gpu2_ep, gpu1_epidx); uint8_t *rem_gpu1; size_t queried_len; gex_Event_Wait( gex_EP_QueryBoundSegmentNB(LH_RG1, peer, (void**)&rem_gpu1, NULL, &queried_len, 0) ); assert_always(queried_len == TEST_SEGSZ_REQUEST); uint8_t *rem_gpu2; gex_Event_Wait( gex_EP_QueryBoundSegmentNB(LH_RG2, peer, (void**)&rem_gpu2, NULL, &queried_len, 0) ); assert_always(queried_len == TEST_SEGSZ_REQUEST); // Case 1. Puts - local host to remote gpus // BEFORE: GPU1=uninit:uninit GPU2=uninit:uninit // AFTER: GPU1=array1:uninit GPU2=array2:uninit gex_RMA_PutNBI(LH_RG1, peer, rem_gpu1, array1, len, GEX_EVENT_DEFER, 0); gex_RMA_PutNBI(LH_RG2, peer, rem_gpu2, array2, len, GEX_EVENT_DEFER, 0); gex_NBI_Wait(GEX_EC_PUT,0); BARRIER(); CHECK_DEVICE("Case 1a", loc_gpu1, array1, len); CHECK_DEVICE("Case 1b", loc_gpu2, array2, len); // Case 2. Gets - remote gpus to local host // BEFORE: GPU1=array1:uninit GPU2=array2:uninit // AFTER: GPU1=array1:uninit GPU2=array2:uninit gex_Event_t get_events[2] = { gex_RMA_GetNB(LH_RG1, loc1, peer, rem_gpu1, len, 0), gex_RMA_GetNB(LH_RG2, loc2, peer, rem_gpu2, len, 0) }; gex_Event_WaitAll(get_events, 2, 0); CHECK_HOST("Case 2a", loc1, array1, len); CHECK_HOST("Case 2b", loc2, array2, len); BARRIER(); // Case 3. Put - local gpus to remote gpus "cross over" // BEFORE: GPU1=array1:uninit GPU2=array2:uninit // AFTER: GPU1=array1:array2 GPU2=array2:array1 gex_RMA_PutBlocking(LG1_RG2, peer, rem_gpu2+len, loc_gpu1, len, 0); BARRIER(); CHECK_DEVICE("Case 3a", loc_gpu2+len, array1, len); gex_RMA_PutBlocking(LG2_RG1, peer, rem_gpu1+len, loc_gpu2, len, 0); BARRIER(); CHECK_DEVICE("Case 3b", loc_gpu1+len, array2, len); // Case 4. Get - remote gpus to local gpus // BEFORE: GPU1=array1:array2 GPU2=array2:array1 // AFTER: GPU1=array1:array1 GPU2=array2:array2 gex_RMA_GetBlocking(LG1_RG1, loc_gpu1+len, peer, rem_gpu1, len, 0); CHECK_DEVICE("Case 4a", loc_gpu1+len, array1, len); gex_RMA_GetBlocking(LG2_RG2, loc_gpu2+len, peer, rem_gpu2, len, 0); CHECK_DEVICE("Case 4b", loc_gpu2+len, array2, len); if (!test_errs) MSG("GEX_MK_CLASS_ZE: success"); } // TODO: once supported: Destroy Segments, Kinds and Endpoints; free GPU memory } #else { gex_System_SetVerboseErrors(0); int rc = gex_MK_Create(&kind, myclient, &args, 0); assert_always(rc == GASNET_ERR_BAD_ARG); MSG("GEX_MK_CLASS_ZE: correct failure due to missing support"); } #endif // Just to ensure these exist: args.gex_class = GEX_MK_CLASS_HOST; kind = GEX_MK_HOST; test_free(array2); test_free(array1); test_free(loc2); test_free(loc1); test_free(cmp_buffer); MSG("done."); BARRIER(); gasnet_exit(0); return 0; } gasnet-2025.8.0/tests/testprogthr.c0000664000175000017500000001211015142313673017310 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testprogthr.c $ * Description: GASNet progress threads tests * Copyright 2024, The Regents of the University of California * Terms of use are as specified in license.txt */ // WARNING: This test exercises an EXPERIMENTAL feature. // WARNING: This test may use internal knowledge of the current // implementation to perform open-box testing. // Such uses are marked and should not be cloned into client code. #include #include #ifndef TEST_SEGSZ #define TEST_SEGSZ PAGESZ #endif #include #ifdef HAVE_PTHREAD_H #include #endif static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; static gex_Rank_t myrank; static gex_Rank_t nranks; static gex_Rank_t next_rank; static void* next_seg; #define hidx_ping_handler GEX_AM_INDEX_BASE+0 #define hidx_pong_handler GEX_AM_INDEX_BASE+1 volatile int flag = 0; void ping_handler(gex_Token_t token) { gex_AM_ReplyShort0(token, hidx_pong_handler, 0); } void pong_handler(gex_Token_t token) { flag++; } static void do_comms(void) { // Simple AM Short ping-pong { int prev = flag; gex_AM_RequestShort0(myteam, next_rank, hidx_ping_handler, 0); GASNET_BLOCKUNTIL(flag == prev+1); } // Back-to-back Put and Get { int snd = myrank + 100; int rcv = -1; gex_RMA_PutBlocking(myteam, next_rank, next_seg, &snd, sizeof(int), 0); gex_RMA_GetBlocking(myteam, &rcv, next_rank, next_seg, sizeof(int), 0); assert_always(rcv == snd); } } int main(int argc, char **argv) { // Opt-in via environment vaiables only if the current conduit // has been built with the corresponding support (may avoid warnings). #if GASNET_RCV_THREAD gasnett_setenv("GASNET_RCV_THREAD", "YES"); #endif #if GASNET_SND_THREAD gasnett_setenv("GASNET_SND_THREAD", "YES"); #endif GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testprogthr", &argc, &argv, GEX_FLAG_DEFER_THREADS)); gex_AM_Entry_t htable[] = { { hidx_ping_handler, (gex_AM_Fn_t)ping_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 }, { hidx_pong_handler, (gex_AM_Fn_t)pong_handler, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_SHORT, 0 }, }; GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testprogthr",0,""); myrank = gex_System_QueryJobRank(); nranks = gex_System_QueryJobSize(); next_rank = (myrank + 1) % nranks; GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); next_seg = TEST_SEG(next_rank); gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); // Perform some communication for (int i = 0; i <100; ++i) do_comms(); BARRIER(); unsigned int count; const gex_ProgressThreadInfo_t *info; GASNET_Safe( gex_System_QueryProgressThreads(myclient, &count, &info, 0) ); MSG("Conduit has %u progress thread(s)", count); #ifdef HAVE_PTHREAD_H int have_rcv_thread = 0; // Spec says order doesn't matter. So we'll create threads in reverse order. for (int i = (count-1); i >= 0; i--) { assert_always( info[i].gex_progress_fn ); assert_always( info[i].gex_device_list ); // NOTE: The following are tests of current implementation behaviors, using // internal knowledge which is subject to change at any time. // Therefore, it is unsafe to clone anything from these open-box tests. // BEGIN open-box testing assert_always( info[i].gex_progress_arg ); assert_always( strlen(info[i].gex_device_list) ); // END open-box testing #if !GASNET_RCV_THREAD if (info[i].gex_thread_roles & GEX_THREAD_ROLE_RCV) { ERR("Unexpected GEX_THREAD_ROLE_RCV"); } #endif #if !GASNET_SND_THREAD if (info[i].gex_thread_roles & GEX_THREAD_ROLE_SND) { ERR("Unexpected GEX_THREAD_ROLE_SND"); } #endif have_rcv_thread |= (info[i].gex_thread_roles & GEX_THREAD_ROLE_RCV); const char *roles_str; switch (info[i].gex_thread_roles) { case 0: roles_str = "NONE"; ERR("Unexpected gex_thread_roles == 0"); break; case GEX_THREAD_ROLE_RCV: roles_str = "RCV"; break; case GEX_THREAD_ROLE_SND: roles_str = "SND"; break; case (GEX_THREAD_ROLE_RCV|GEX_THREAD_ROLE_SND): roles_str = "RCV+SND"; break; default: roles_str = "UNKNOWN ROLE(S)"; break; } pthread_t tid; check_zeroret( pthread_create(&tid, NULL, info[i].gex_progress_fn, info[i].gex_progress_arg) ); MSG("Created tid %p for %s on device(s) %s", (void*)(uintptr_t)tid, roles_str, info[i].gex_device_list); sleep(1); // an attempt to yield } if (have_rcv_thread) assert_always(GASNET_HIDDEN_AM_CONCURRENCY_LEVEL); assert_always(have_rcv_thread == !!gex_System_QueryHiddenAMConcurrencyLevel()); // Perform some communication for (int i = 0; i <100; ++i) do_comms(); #else if (count) { MSG0("WARNING: Thread spawning skipped due to lack of pthreads support."); } #endif BARRIER(); MSG0("done."); gasnet_exit(!! test_errs); return 0; } gasnet-2025.8.0/tests/testlogGP.c0000664000175000017500000002450115142313673016642 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testlogGP.c $ * Description: GASNet logGP tester. * measures the ping-pong average round-trip time and * average flood throughput of GASNet gets and puts * over varying payload size and synchronization mechanisms * Copyright 2002, Jaein Jeong and Dan Bonachea * Terms of use are as specified in license.txt */ #define TEST_DELAY 1 #include "test.h" static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; #define GASNET_HEADNODE 0 enum { PRINT_EEL, PRINT_OVERHEAD, PRINT_GAP, PRINT_BIG_G }; typedef struct { int datasize; int iters; int64_t time; } stat_struct_t; gex_AM_Entry_t handler_table[2]; int myproc; int numprocs; int peerproc = -1; int iamsender = 0; int pollcnt = 0; void *mymem; void *peermem; #define init_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _init_stat #define update_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _update_stat #define print_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _print_stat void _init_stat(stat_struct_t *st, int sz) { st->iters = 0; st->datasize = sz; st->time = 0; } void _update_stat(stat_struct_t *st, int64_t temptime, int iters) { st->iters += iters; st->time += temptime; } void _print_stat(int myproc, stat_struct_t *st, const char *name, int operation) { switch (operation) { case PRINT_EEL: printf("Proc %2i - %7i byte : %5i iters," " %10i us elapsed = %9.3f us/msg (%s)\n", myproc, st->datasize, st->iters, (int) st->time, (0.5*(float)st->time) / st->iters, name); fflush(stdout); break; case PRINT_OVERHEAD: printf("Proc %2i - %7i byte : %5i iters," " %10i us difference = %9.3f us/msg (%s)\n", myproc, st->datasize, st->iters, (int) st->time, ((float)st->time) / st->iters, name); fflush(stdout); break; case PRINT_GAP: printf("Proc %2i - %7i byte : %5i iters," " %10i us elapsed = %9.3f us/msg (%s)\n", myproc, st->datasize, st->iters, (int) st->time, ((float)st->time) / st->iters, name); fflush(stdout); break; case PRINT_BIG_G: printf("Proc %2i - %7i byte : %5i iters," " %10i us elapsed = %9.3f us/Kb (%s)\n", myproc, st->datasize, st->iters, (int) st->time, (1024.0*(float)st->time) / ((float)st->iters * (float)st->datasize), name); fflush(stdout); break; default: printf("ERROR\n"); break; } } void put_tests(int iters, int nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin=0, end, delay_time, loops=0; static stat_struct_t st; memset(mymem, 0, nbytes); BARRIER(); if (iamsender) { /* measure the round-trip time of put */ init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_PutBlocking(myteam, peerproc, peermem, mymem, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); print_stat(myproc, &st, "put: EEL - PutBlocking", PRINT_EEL); } BARRIER(); if (iamsender) { /* measure baseline (no cpu loop) gap for nonblocking explicit bulk puts */ init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { gex_Event_t h = gex_RMA_PutNB(myteam, peerproc, peermem, mymem, nbytes, GEX_EVENT_DEFER, 0); gex_Event_Wait(h); } end = TIME(); update_stat(&st, (end - begin), iters); /* Seek number of loops needed to exceed running time by 20% or more */ delay_time = 1.2 * st.time; loops = test_calibrate_delay(iters, pollcnt, &delay_time); /* Now measure overhead */ init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { gex_Event_t h = gex_RMA_PutNB(myteam, peerproc, peermem, mymem, nbytes, GEX_EVENT_DEFER, 0); test_delay(loops, pollcnt); gex_Event_Wait(h); } end = TIME(); update_stat(&st, (end - begin) - delay_time, iters); print_stat(myproc, &st, "put: o_i - PutNB+DEFER", PRINT_OVERHEAD); } BARRIER(); /* target-side overhead takes more work: */ if (iamsender) { for (i = 0; i < iters; i++) { gex_Event_t h = gex_RMA_PutNB(myteam, peerproc, peermem, mymem, nbytes, GEX_EVENT_DEFER, 0); gex_Event_Wait(h); } } else { init_stat(&st, nbytes); begin = TIME(); } BARRIER(); if (iamsender) { /* DO NOTHING */ } else { end = TIME(); update_stat(&st, (end - begin), iters); delay_time = 1.2 * st.time; loops = test_calibrate_delay(iters, pollcnt, &delay_time); } BARRIER(); if (iamsender) { for (i = 0; i < iters; i++) { gex_Event_t h = gex_RMA_PutNB(myteam, peerproc, peermem, mymem, nbytes, GEX_EVENT_DEFER, 0); gex_Event_Wait(h); } } else { init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { test_delay(loops, pollcnt); } end = TIME(); update_stat(&st, (end - begin) - delay_time, iters); print_stat(myproc, &st, "put: o_t - PutNB+DEFER", PRINT_OVERHEAD); } BARRIER(); if (iamsender) { /* measure the throughput of nonblocking implicit put */ init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_PutNBI(myteam, peerproc, peermem, mymem, nbytes, GEX_EVENT_NOW, 0); } gex_NBI_Wait(GEX_EC_PUT,0); end = TIME(); update_stat(&st, (end - begin), iters); print_stat(myproc, &st, "put: gap - PutNBI+NOW", PRINT_GAP); } BARRIER(); if (iamsender) { /* measure the throughput of nonblocking implicit bulk put */ init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_PutNBI(myteam, peerproc, peermem, mymem, nbytes, GEX_EVENT_DEFER, 0); } gex_NBI_Wait(GEX_EC_PUT,0); end = TIME(); update_stat(&st, (end - begin), iters); print_stat(myproc, &st, "put: G - PutNBI+DEFER", PRINT_BIG_G); } } void get_tests(int iters, int nbytes) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin=0, end, delay_time, loops=0; static stat_struct_t st; memset(mymem, 0, nbytes); BARRIER(); if (iamsender) { /* measure the round-trip time of get */ init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_GetBlocking(myteam, mymem, peerproc, peermem, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); print_stat(myproc, &st, "get: EEL - GetBlocking", PRINT_EEL); } BARRIER(); if (iamsender) { /* measure baseline (no cpu loop) gap for nonblocking explicit bulk gets */ init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { gex_Event_t h = gex_RMA_GetNB(myteam, mymem, peerproc, peermem, nbytes, 0); gex_Event_Wait(h); } end = TIME(); update_stat(&st, (end - begin), iters); /* Seek number of loops needed to exceed running time by 20% or more */ delay_time = 1.2 * st.time; loops = test_calibrate_delay(iters, pollcnt, &delay_time); /* Now measure overhead */ init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { gex_Event_t h = gex_RMA_GetNB(myteam, mymem, peerproc, peermem, nbytes, 0); test_delay(loops, pollcnt); gex_Event_Wait(h); } end = TIME(); update_stat(&st, (end - begin) - delay_time, iters); print_stat(myproc, &st, "get: o_i - GetNB", PRINT_OVERHEAD); } BARRIER(); /* target-side overhead takes more work: */ if (iamsender) { for (i = 0; i < iters; i++) { gex_Event_t h = gex_RMA_GetNB(myteam, mymem, peerproc, peermem, nbytes, 0); gex_Event_Wait(h); } } else { init_stat(&st, nbytes); begin = TIME(); } BARRIER(); if (iamsender) { /* DO NOTHING */ } else { end = TIME(); update_stat(&st, (end - begin), iters); delay_time = 1.2 * st.time; loops = test_calibrate_delay(iters, pollcnt, &delay_time); } BARRIER(); if (iamsender) { for (i = 0; i < iters; i++) { gex_Event_t h = gex_RMA_GetNB(myteam, mymem, peerproc, peermem, nbytes, 0); gex_Event_Wait(h); } } else { init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { test_delay(loops, pollcnt); } end = TIME(); update_stat(&st, (end - begin) - delay_time, iters); print_stat(myproc, &st, "get: o_t - GetNB", PRINT_OVERHEAD); } BARRIER(); if (iamsender) { /* measure the throughput of nonblocking implicit get */ init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_GetNBI(myteam, mymem, peerproc, peermem, nbytes, 0); } gex_NBI_Wait(GEX_EC_GET,0); end = TIME(); update_stat(&st, (end - begin), iters); print_stat(myproc, &st, "get: gap - GetNBI", PRINT_GAP); } BARRIER(); if (iamsender) { /* measure the throughput of nonblocking implicit put */ init_stat(&st, nbytes); begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_GetNBI(myteam, mymem, peerproc, peermem, nbytes, 0); } gex_NBI_Wait(GEX_EC_GET,0); end = TIME(); update_stat(&st, (end - begin), iters); print_stat(myproc, &st, "get: G - GetNBI", PRINT_BIG_G); } } int main(int argc, char **argv) { int iters = 0; int i; char usagestr[255]; /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testlogGP", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); snprintf(usagestr, sizeof(usagestr), "iters pollcnt sizes...\n" " sizes are limited to %"PRIuPTR, (uintptr_t)TEST_SEGSZ); test_init("testlogGP",1, usagestr); /* parse arguments */ if (argc < 4) test_usage(); iters = atoi(argv[1]); if (!iters) iters = 1; pollcnt = atoi(argv[2]); /* get SPMD info */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); /* Only allow even number for numprocs */ if (numprocs % 2 != 0) { MSG0("WARNING: This test requires an even number of nodes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harnesses for smp-conduit */ } /* initialize global data in my thread */ mymem = (void *) TEST_MYSEG(); /* Setting peer thread rank */ peerproc = (myproc % 2) ? (myproc - 1) : (myproc + 1); iamsender = (myproc % 2 == 0); peermem = (void *) TEST_SEG(peerproc); for (i = 3; i < argc; ++i) { int size = atoi(argv[i]); if (size < 0 || size > TEST_SEGSZ) { MSG0("size is limited to <= %"PRIuPTR"\n", (uintptr_t)TEST_SEGSZ); continue; } put_tests(iters, size); get_tests(iters, size); } BARRIER(); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testimm.c0000664000175000017500000004126315142313673016420 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testimm.c $ * Description: GASNet Active Messages IMMEDIATE test * Copyright (c) 2018-2024, The Regents of the University of California * Terms of use are as specified in license.txt */ // TODOs: // + Additional schedule options: // - Randomized // May have static randomization at start of run, or dynamic per-operation // - Work-sharing option // Rather than statically partitioning the ops per-rank, just keep a total count // - "nbrhd-balanced" in which consecutive operations are to distinct nbrhds // This should reduce ingress bottlenecks, but may not "fit" if nbrhds have unequal sizes // + Synchronous (GEX_EVENT_NOW) operation(s) #include static size_t param_SZ = 0; #define TEST_SEGSZ_EXPR ((uintptr_t)param_SZ) #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; gex_Rank_t myrank = 0; gex_Rank_t numrank = 0; gex_RankInfo_t *nbrhdinfo = NULL; gex_Rank_t nbrhdsize; // size of the neighborhood, or 1 for PSHM-only static int64_t param_Z = 0; static long param_B = 0; static long param_N = 0; static int in_segment = 1; static enum { TEST_POLL_NEXT, TEST_POLL_RETRY, TEST_POLL_LAZY, TEST_POLL_ALWAYS } poll_mode; static void *local_addr; static long *remain; static gasnett_atomic_t expect = gasnett_atomic_init(0); #define hidx_expect_dec_handler 200 #define hidx_expect_set_handler 201 void expect_dec_handler(gex_Token_t token, void *buf, size_t nbytes) { // decrement the counter gasnett_atomic_decrement(&expect, 0); } void expect_set_handler(gex_Token_t token, void *buf, size_t nbytes) { // set the counter and reply with a decrement assert(nbytes == sizeof(gasnett_atomic_val_t)); gasnett_atomic_set(&expect, *(gasnett_atomic_val_t*)buf, 0); gex_AM_ReplyMedium0(token, hidx_expect_dec_handler, NULL, 0, GEX_EVENT_NOW, 0); } void doMed(gex_Flags_t imm_flag); void doLong(gex_Flags_t imm_flag); void doPut(gex_Flags_t imm_flag); void doGet(gex_Flags_t imm_flag); int main(int argc, char **argv) { gex_AM_Entry_t htable[] = { { hidx_expect_dec_handler, (gex_AM_Fn_t)expect_dec_handler, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_MEDLONG, 0 }, { hidx_expect_set_handler, (gex_AM_Fn_t)expect_set_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 0 } }; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testimm", &argc, &argv, 0)); myrank = gex_TM_QueryRank(myteam); numrank = gex_TM_QuerySize(myteam); int enable_given = 0; int enable_med = 0; int enable_long = 0; int enable_put = 0; int enable_get = 0; int force_mixed = 0; int help = 0; int arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-z")) { ++arg; if (argc > arg) { param_Z = atol(argv[arg]); arg++; } else help = 1; param_Z = MAX(param_Z, 0); } else if (!strcmp(argv[arg], "-b")) { ++arg; if (argc > arg) { param_B = atol(argv[arg]); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-m")) { ++arg; enable_med = enable_given = 1; } else if (!strcmp(argv[arg], "-l")) { ++arg; enable_long = enable_given = 1; } else if (!strcmp(argv[arg], "-p")) { ++arg; enable_put = enable_given = 1; } else if (!strcmp(argv[arg], "-g")) { ++arg; enable_get = enable_given = 1; } else if (!strcmp(argv[arg], "-mixed")) { ++arg; force_mixed = 1; } else if (!strcmp(argv[arg], "-in")) { ++arg; in_segment = 1; } else if (!strcmp(argv[arg], "-out")) { ++arg; in_segment = 0; } else if (!strcmp(argv[arg], "-poll-next")) { ++arg; poll_mode = TEST_POLL_NEXT; } else if (!strcmp(argv[arg], "-poll-retry")) { ++arg; poll_mode = TEST_POLL_RETRY; } else if (!strcmp(argv[arg], "-poll-lazy")) { ++arg; poll_mode = TEST_POLL_LAZY; } else if (!strcmp(argv[arg], "-poll-always")) { ++arg; poll_mode = TEST_POLL_ALWAYS; } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (!enable_given) { enable_med = enable_long = 1; } if (argc > arg) { param_N = atol(argv[arg]); ++arg; } if (!param_N) param_N = 10000; if (argc > arg) { param_SZ = atoi(argv[arg]); ++arg; } if (!param_SZ) { param_SZ = 1024*1024; } if (enable_med) { param_SZ = MIN(param_SZ, gex_AM_LUBRequestMedium()); } if (enable_long) { param_SZ = MIN(param_SZ, gex_AM_LUBRequestLong()); } if (!param_Z) param_Z = 500; if (!param_B) param_B = param_N; // what UPC would call indefinite layout GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testimm",1, "[options] (msgcnt) (msgsz)\n" " Active rank 0 injects msgcnt operations of size msgsz to each passive peer.\n" " Note that msgsz will be reduced if RequestMedium or RequestLong are\n" " to be timed and msgsz would exceed the respective LUBRequest limit.\n" " Options:\n" " -in / -out\n" " Selects whether the initiator's buffer is in the GASNet segment\n" " or not (default is 'in').\n" " -m / -l / -p / -g\n" " Respectively enable timing of the RequestMedium, RequestLong, \n" " PutNBI and GetNBI operations.\n" " The default is to test all four operations, except omitting\n" " Put and Get in runs with only shared-memory communication.\n" " -mixed\n" " By default this test excludes passive ranks that are reachable\n" " via shared-memory communication, unless that is *all* ranks.\n" " This option overrides this behavior, allowing the test to use\n" " a mix of shared-memory and network communication. This test\n" " does not exercise \"best practices\" for this configuration.\n" " -z \n" " Sets the minimum interval (in us) between poll calls by passive\n" " ranks (default is 500). Actual inter-poll delays may be longer.\n" " -b \n" " Sets block size of nominal communication schedule, where\n" " \"nominal\" means the schedule applied in the absence of\n" " back-pressure indication due to GEX_FLAG_IMMEDIATE.\n" " 0 (default) sends all to each rank before advancing\n" " 1 sends only one per rank before advancing\n" " N sends N per rank before advancing\n" " -poll-* options select the polling policy (default is -poll-next):\n" " -poll-next poll upon back pressure, advancing to the next peer\n" " -poll-retry poll upon back pressure, retrying the same peer once\n" " -poll-lazy advance to the next peer upon back pressure,\n" " but poll only between loops over peers\n" " -poll-always advance to the next peer upon back pressure,\n" " but poll before every IMMEDIATE operation\n" ); if (help || argc > arg) test_usage(); if (numrank < 2) { MSG0("WARNING: This test requires two or more ranks. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harness */ } TEST_PRINT_CONDUITINFO(); char *space = NULL; char nbrhd_warning[64] = ""; gex_System_QueryNbrhdInfo(&nbrhdinfo, &nbrhdsize, NULL); int nbrhd_only = (nbrhdsize == numrank); if (!myrank) { if (nbrhdsize == 1) { // The passive ranks are all OUTSIDE our neighborhood } else if (nbrhdsize == numrank) { // The passive ranks are all INSIDE our neighborhood nbrhdinfo = NULL; // suppress filtering nbrhdsize = 1; // and correct reported passive rank count assert(nbrhd_only); #if !GASNET_CONDUIT_SMP // would be "just noise" for smp-conduit strcpy(nbrhd_warning, "\n WARNING: all ranks are reachable via shared-memory"); #endif } else if (force_mixed) { // Mixed case: but commandline ask us not to omit ranks within our neighborhood snprintf(nbrhd_warning, sizeof(nbrhd_warning), "\n WARNING: %d shared-memory rank%s allowed by -mixed option", (nbrhdsize-1), (nbrhdsize>2)?"s":""); nbrhdinfo = NULL; // suppress filtering nbrhdsize = 1; // and correct reported passive rank count } else { // Mixed case: we will omit ranks within our neighborhood snprintf(nbrhd_warning, sizeof(nbrhd_warning), "\n WARNING: %d shared-memory rank%s omitted", (nbrhdsize-1), (nbrhdsize>2)?"s":""); } if (in_segment) { local_addr = TEST_MYSEG(); } else { space = test_malloc(param_SZ + PAGESZ); local_addr = alignup_ptr(space, PAGESZ); } remain = test_malloc(sizeof(long) * numrank); } // rank 0 if (!enable_given) { enable_put = enable_get = !nbrhd_only; } MSG0("Running testimm with %d ranks\n" " active rank issues %ld operations per rank, each of length %ld\n" " active rank's local addresses %sside the segment\n" " nominal schedule issues operations in blocks of %ld\n" " polling policy is \"%s\"\n" " %d passive rank%s sleep (at least) %"PRIi64"us between polls\n" " operations timed:%s%s%s%s" "%s", numrank, param_N, (long)param_SZ, (in_segment ? "in" : "out"), param_B, (poll_mode==TEST_POLL_NEXT ? "next" : (poll_mode==TEST_POLL_RETRY ? "retry" : (poll_mode==TEST_POLL_ALWAYS ? "always" : "lazy"))), (numrank-nbrhdsize), (numrank-nbrhdsize>1)?"s":"", param_Z, enable_med?" RequestMedium":"", enable_long?" RequestLong":"", enable_put?" PutNBI":"", enable_get?" GetNBI":"", nbrhd_warning ); if (enable_med) { doMed(0); doMed(GEX_FLAG_IMMEDIATE); } if (enable_long) { doLong(0); doLong(GEX_FLAG_IMMEDIATE); } if (enable_put) { doPut(0); doPut(GEX_FLAG_IMMEDIATE); } if (enable_get) { doGet(0); doGet(GEX_FLAG_IMMEDIATE); } if (!myrank) { test_free(space); test_free(remain); } BARRIER(); MSG("done."); gasnet_exit(0); return 0; } void sleepy_barrier(uint64_t interval_ns) { gex_Event_t bar = gex_Coll_BarrierNB(myteam,0); do { gasnett_nsleep(interval_ns); gasnet_AMPoll(); } while (gex_Event_Test(bar) != GASNET_OK); } void passive(void) { uint64_t interval_ns = 1000 * param_Z; sleepy_barrier(interval_ns); // start barrier (passive) do { gasnett_nsleep(interval_ns); gasnet_AMPoll(); } while (gasnett_atomic_read(&expect, 0)); // await AM arrivals sleepy_barrier(interval_ns); // end barrier (passive) } #define ACTIVE(OPERATION, SYNC) do { \ int done; \ do { \ done = 1; \ for (gex_Rank_t r = 1; r < numrank; ++r) { \ long count, limit = MIN(param_B, remain[r]); \ for (count = 0; count < limit; ++count) { \ int did_retry = 0; \ if ((poll_mode == TEST_POLL_ALWAYS) && imm_flag)\ gasnet_AMPoll(); \ retry: \ if ( OPERATION ) { /* got IMM backpressure */ \ switch (poll_mode) { \ case TEST_POLL_RETRY: \ if (!did_retry) { \ gasnet_AMPoll(); \ did_retry = 1; \ goto retry; \ } \ break; \ case TEST_POLL_NEXT: \ gasnet_AMPoll(); \ break; \ case TEST_POLL_LAZY: break; \ case TEST_POLL_ALWAYS: break; \ default: gasnett_unreachable(); \ } \ break; /* end injection to this peer */ \ } \ } \ remain[r] -= count; \ done &= !remain[r]; \ } /* end loop over ranks */ \ if ((poll_mode == TEST_POLL_LAZY) && imm_flag) \ gasnet_AMPoll(); \ } while (!done); \ gex_NBI_Wait(SYNC,0); \ } while (0) void init_remain(int isAMtest) { for (gex_Rank_t r = 1; r < numrank; ++r) remain[r] = param_N; if (nbrhdinfo) { // Optionally exclude PSHM-peers by zeroing their remain[] for (gex_Rank_t i = 0; i < nbrhdsize; ++i) remain[nbrhdinfo[i].gex_jobrank] = 0; } if (isAMtest) { gasnett_atomic_set(&expect, 0, 0); for (gex_Rank_t r = 1; r < numrank; ++r) { if (remain[r]) { // tell each passive rank what to expect gasnett_atomic_val_t val = (gasnett_atomic_val_t)remain[r]; assert((long)val == remain[r]); gasnett_atomic_increment(&expect, 0); gex_AM_RequestMedium0(myteam, r, hidx_expect_set_handler, &val, sizeof(val), GEX_EVENT_NOW, 0); } } do { // await acknowledgment gasnet_AMPoll(); } while (gasnett_atomic_read(&expect, 0)); } gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); // start barrier (active) } void report(const char *name, gex_Flags_t imm_flag, double elapsed, double *prev) { char delta[32]; if (*prev > 0.0) { snprintf(delta, sizeof(delta), ", %+.2f%% improvement", 100.*((*prev) - elapsed)/(*prev)); } else { delta[0] = '\0'; } double bw = ((double)param_N * param_SZ) / (elapsed * 1024 * 1024); printf("%-8s IMM=%c completed in %7.3f seconds (%7.3f MiB/s)%s\n", name, imm_flag?'Y':'N', elapsed, bw, delta); *prev = elapsed; } void doMed(gex_Flags_t imm_flag) { if (myrank) { passive(); } else { init_remain(1); gasnett_tick_t start_ticks = gasnett_ticks_now(); ACTIVE( gex_AM_RequestMedium0(myteam, r, hidx_expect_dec_handler, local_addr, param_SZ, GEX_EVENT_GROUP, imm_flag), GEX_EC_AM ); gasnett_tick_t end_ticks = gasnett_ticks_now(); double elapsed = 1e-9 * gasnett_ticks_to_ns(end_ticks - start_ticks); static double prev; report("MEDIUM:", imm_flag, elapsed, &prev); gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); // end barrier (active) } } void doLong(gex_Flags_t imm_flag) { if (myrank) { passive(); } else { init_remain(1); gasnett_tick_t start_ticks = gasnett_ticks_now(); ACTIVE( gex_AM_RequestLong0(myteam, r, hidx_expect_dec_handler, local_addr, param_SZ, TEST_SEG(r), GEX_EVENT_GROUP, imm_flag), GEX_EC_AM ); gasnett_tick_t end_ticks = gasnett_ticks_now(); double elapsed = 1e-9 * gasnett_ticks_to_ns(end_ticks - start_ticks); static double prev; report("LONG:", imm_flag, elapsed, &prev); gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); // end barrier (active) } } void doPut(gex_Flags_t imm_flag) { if (myrank) { passive(); } else { init_remain(0); gasnett_tick_t start_ticks = gasnett_ticks_now(); ACTIVE( gex_RMA_PutNBI(myteam, r, TEST_SEG(r), local_addr, param_SZ, GEX_EVENT_DEFER, imm_flag), GEX_EC_PUT ); gasnett_tick_t end_ticks = gasnett_ticks_now(); double elapsed = 1e-9 * gasnett_ticks_to_ns(end_ticks - start_ticks); static double prev; report("PUT:", imm_flag, elapsed, &prev); gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); // end barrier (active) } } void doGet(gex_Flags_t imm_flag) { if (myrank) { passive(); } else { init_remain(0); gasnett_tick_t start_ticks = gasnett_ticks_now(); ACTIVE( gex_RMA_GetNBI(myteam, local_addr, r, TEST_SEG(r), param_SZ, imm_flag), GEX_EC_GET ); gasnett_tick_t end_ticks = gasnett_ticks_now(); double elapsed = 1e-9 * gasnett_ticks_to_ns(end_ticks - start_ticks); static double prev; report("GET:", imm_flag, elapsed, &prev); gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); // end barrier (active) } } gasnet-2025.8.0/tests/testtmpair.c0000664000175000017500000004634315142313673017136 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testtmpair.c $ * Copyright (c) 2020, The Regents of the University of California * * Description: Test of gex_TM_Pair() for communication initiation */ #include #include struct test_segment { gex_Rank_t local[6]; // Local in-segment temporaries gex_Rank_t get_src; // Source of various Gets gex_Rank_t put_dst[6]; // Destinations of various Puts x6 gex_Rank_t fp_req_dst; // FPAM LongRequest dst gex_Rank_t fp_rep_dst; // FPAM LongReply dst gex_Rank_t np_req_dst; // NPAM LongRequest dst gex_Rank_t np_rep_dst; // NPAM LongReply dst gex_Rank_t vis_src; // VIS Gets gex_Rank_t vis_dst[6]; // VIS Puts x6 }; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR sizeof(struct test_segment) #endif #include #if 1 // To count failures, not reporting detail #define CHECK(cond) failed += !(cond) #else // To stop at first failure #define CHECK(cond) assert(cond) #endif // ------------------------------------------------------------------------------------ static gex_Client_t myclient; static gex_Segment_t mysegment; static gex_EP_t myep; static gex_TM_t myteam; static gex_Rank_t myrank, nranks; static gex_Rank_t next, prev; // ------------------------------------------------------------------------------------ static gex_Rank_t *fp_reply_dst; static gex_Rank_t *np_reply_dst; enum { hidx_short_ping = GEX_AM_INDEX_BASE, hidx_short_pong, hidx_med_ping, hidx_med_pong, hidx_long_ping, hidx_long_pong, hidx_npmed_ping, hidx_npmed_pong, hidx_nplong_ping, hidx_nplong_pong, }; #define HANDLER_DECLS(hname) \ static gasnett_atomic_t hname##_cntr = gasnett_atomic_init(0); \ static gex_Rank_t hname##_from = GEX_RANK_INVALID; #define HANDLER_COMMON(hname) do { \ gex_Token_Info_t info; \ gex_TI_t rc = gex_Token_Info(token, &info, GEX_TI_SRCRANK); \ hname##_from = info.gex_srcrank; \ gasnett_atomic_increment(&hname##_cntr, GASNETT_ATOMIC_REL); \ } while (0) HANDLER_DECLS(short_ping) static void short_ping_handler(gex_Token_t token) { HANDLER_COMMON(short_ping); gex_AM_ReplyShort0(token, hidx_short_pong, 0); } HANDLER_DECLS(short_pong) static void short_pong_handler(gex_Token_t token) { HANDLER_COMMON(short_pong); } HANDLER_DECLS(med_ping) static void med_ping_handler(gex_Token_t token, void *buf, size_t nbytes) { HANDLER_COMMON(med_ping); gex_AM_ReplyMedium0(token, hidx_med_pong, buf, nbytes, GEX_EVENT_NOW, 0); assert(myrank == *(gex_Rank_t*)buf); } HANDLER_DECLS(med_pong) static void med_pong_handler(gex_Token_t token, void *buf, size_t nbytes) { HANDLER_COMMON(med_pong); assert(next == *(gex_Rank_t*)buf); } HANDLER_DECLS(long_ping) static void long_ping_handler(gex_Token_t token, void *buf, size_t nbytes) { HANDLER_COMMON(long_ping); gex_AM_ReplyLong0(token, hidx_long_pong, buf, nbytes, fp_reply_dst, GEX_EVENT_NOW, 0); assert(myrank == *(gex_Rank_t*)buf); } HANDLER_DECLS(long_pong) static void long_pong_handler(gex_Token_t token, void *buf, size_t nbytes) { HANDLER_COMMON(long_pong); assert(next == *(gex_Rank_t*)buf); } HANDLER_DECLS(npmed_ping) static void npmed_ping_handler(gex_Token_t token, void *buf, size_t nbytes) { HANDLER_COMMON(npmed_ping); // Not bothering w/ the complexity of NPAM here since token is indep of TM-Pair gex_AM_ReplyMedium0(token, hidx_npmed_pong, buf, nbytes, GEX_EVENT_NOW, 0); assert(myrank == *(gex_Rank_t*)buf); } HANDLER_DECLS(npmed_pong) static void npmed_pong_handler(gex_Token_t token, void *buf, size_t nbytes) { HANDLER_COMMON(npmed_pong); assert(next == *(gex_Rank_t*)buf); } HANDLER_DECLS(nplong_ping) static void nplong_ping_handler(gex_Token_t token, void *buf, size_t nbytes) { HANDLER_COMMON(nplong_ping); // Not bothering w/ the complexity of NPAM here since token is indep of TM-Pair gex_AM_ReplyLong0(token, hidx_nplong_pong, buf, nbytes, np_reply_dst, GEX_EVENT_NOW, 0); assert(myrank == *(gex_Rank_t*)buf); } HANDLER_DECLS(nplong_pong) static void nplong_pong_handler(gex_Token_t token, void *buf, size_t nbytes) { HANDLER_COMMON(nplong_pong); assert(next == *(gex_Rank_t*)buf); } // handler table gex_AM_Entry_t htable[] = { { hidx_short_ping, (gex_AM_Fn_t)short_ping_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 }, { hidx_short_pong, (gex_AM_Fn_t)short_pong_handler, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_SHORT, 0 }, { hidx_med_ping, (gex_AM_Fn_t)med_ping_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 0 }, { hidx_med_pong, (gex_AM_Fn_t)med_pong_handler, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_MEDIUM, 0 }, { hidx_long_ping, (gex_AM_Fn_t)long_ping_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, 0 }, { hidx_long_pong, (gex_AM_Fn_t)long_pong_handler, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_LONG, 0 }, { hidx_npmed_ping, (gex_AM_Fn_t)npmed_ping_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 0 }, { hidx_npmed_pong, (gex_AM_Fn_t)npmed_pong_handler, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_MEDIUM, 0 }, { hidx_nplong_ping, (gex_AM_Fn_t)nplong_ping_handler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, 0 }, { hidx_nplong_pong, (gex_AM_Fn_t)nplong_pong_handler, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_LONG, 0 } }; #define HANDLER_TABLE_SIZE (sizeof(htable)/sizeof(gex_AM_Entry_t)) // ------------------------------------------------------------------------------------ int main(int argc, char **argv) { GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testtmpair", &argc, &argv, 0)); // TODO: control over how many EPs and how they are paired (loc,rem) test_init("testpair", 0, "(test_sections)"); if (argc > 1) TEST_SECTION_PARSE(argv[1]); if (argc > 2) test_usage(); myrank = gex_TM_QueryRank(myteam); nranks = gex_TM_QuerySize(myteam); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, HANDLER_TABLE_SIZE)); next = (myrank + 1) % nranks; prev = (myrank + nranks - 1) % nranks; const int num_eps = MIN(4, GASNET_MAXEPS); // TODO: command line arg to control this gex_EP_t *eps = test_malloc(num_eps * sizeof(gex_EP_t)); gex_Segment_t *segs = test_malloc(num_eps * sizeof(gex_Segment_t)); gex_EP_Capabilities_t ep_caps = 0; eps[0] = myep; segs[0] = mysegment; { // Limit capabilities to those required by the enabled tests for (gex_EP_Index_t idx = 0; idx < num_eps; ++idx) { if (TEST_SECTION_BEGIN_ENABLED()) ep_caps |= GEX_EP_CAPABILITY_RMA; // Get if (TEST_SECTION_BEGIN_ENABLED()) ep_caps |= GEX_EP_CAPABILITY_RMA; // Put if (TEST_SECTION_BEGIN_ENABLED()) ep_caps |= GEX_EP_CAPABILITY_AM; // AM if (TEST_SECTION_BEGIN_ENABLED()) ep_caps |= GEX_EP_CAPABILITY_VIS; // VIS } test_section = '\0'; // Limit capabilities to those currently implementd by the current conduit #if GASNET_CONDUIT_IBV ep_caps &= GEX_EP_CAPABILITY_RMA; #elif GASNET_CONDUIT_UCX ep_caps &= GEX_EP_CAPABILITY_RMA; #elif GASNET_CONDUIT_OFI ep_caps &= GEX_EP_CAPABILITY_RMA; #elif GASNET_MAXEPS > 1 MSG0("Update required in testtmpair.c for conduit-specific capabilities."); #endif for (gex_EP_Index_t idx = 1; idx < num_eps; ++idx) { GASNET_Safe(gex_EP_Create(eps+idx, myclient, ep_caps, 0)); } for (gex_EP_Index_t idx = 1; idx < num_eps; ++idx) { GASNET_Safe(gex_Segment_Create(segs+idx, myclient, NULL, TEST_SEGSZ_EXPR, GEX_MK_HOST, 0)); GASNET_Safe(gex_EP_BindSegment(eps[idx], segs[idx], 0)); } gex_EP_PublishBoundSegment(myteam, eps+1, num_eps-1, 0); } // Paranoia to prevent accidental use: myteam = GEX_TM_INVALID; for (int iter = 0; iter < num_eps; ++iter) { gex_EP_Index_t loc_idx, rem_idx; // TODO: "mix it up", such that non-equal local and remote indices communicate. // However, that requires addition thought to managing two local segments if we // are to continue using in-segment local addresses. loc_idx = rem_idx = iter; gex_EP_Capabilities_t test_caps = (loc_idx || rem_idx) ? ep_caps : GEX_EP_CAPABILITY_ALL; gex_TM_t pair = gex_TM_Pair(eps[loc_idx], rem_idx); const size_t rank_sz = sizeof(gex_Rank_t); struct test_segment *loc_seg; if (!loc_idx) { // Required for GASNET_SEGMENT_EVERYTHING, buy always correct loc_seg = (struct test_segment *) TEST_MYSEG(); } else { loc_seg = gex_Segment_QueryAddr(segs[loc_idx]); } struct test_segment *rem_seg; struct test_segment *prev_seg; if (!rem_idx) { // Required for GASNET_SEGMENT_EVERYTHING, buy always correct rem_seg = (struct test_segment *) TEST_SEG(next); prev_seg = (struct test_segment *) TEST_SEG(prev); } else { gex_Event_Wait( gex_EP_QueryBoundSegmentNB(pair, next, (void**)&rem_seg, NULL, NULL, 0) ); gex_Event_Wait( gex_EP_QueryBoundSegmentNB(pair, prev, (void**)&prev_seg, NULL, NULL, 0) ); } loc_seg->get_src = myrank; for (int i = 0; i < 6; ++i) { loc_seg->put_dst[i] = GEX_RANK_INVALID; } loc_seg->fp_req_dst = GEX_RANK_INVALID; loc_seg->fp_req_dst = GEX_RANK_INVALID; loc_seg->np_rep_dst = GEX_RANK_INVALID; loc_seg->np_rep_dst = GEX_RANK_INVALID; loc_seg->vis_src = prev; for (int i = 0; i < 6; ++i) { loc_seg->vis_dst[i] = GEX_RANK_INVALID; } // Cannot use QueryBound in handler context fp_reply_dst = &prev_seg->fp_rep_dst; np_reply_dst = &prev_seg->np_rep_dst; BARRIER(); // RMA Get tests if (!TEST_SECTION_BEGIN_ENABLED()) { // Nothing to do } else if (! (test_caps & GEX_EP_CAPABILITY_RMA)) { MSG0("%c: Skipping RMA Get tests for pair (%d,%d) - RMA not yet supported for non-primordial EPs", TEST_SECTION_NAME(), loc_idx, rem_idx); } else { MSG0("%c: Starting RMA Get tests for pair (%d,%d)", TEST_SECTION_NAME(), loc_idx, rem_idx); int rc; gex_Event_t ev; gex_Rank_t *dst_array = loc_seg->local; gex_Rank_t *src_addr = &rem_seg->get_src; for (int i = 0; i < 4; ++i) { dst_array[i] = GEX_RANK_INVALID; } gex_Rank_t *dst = &dst_array[0]; ev = gex_RMA_GetNB(pair, dst++, next, src_addr, rank_sz, 0); rc = gex_RMA_GetNBI(pair, dst++, next, src_addr, rank_sz, 0); assert(!rc); rc = gex_RMA_GetBlocking(pair, dst++, next, src_addr, rank_sz, 0); assert(!rc); *(dst++) = gex_RMA_GetBlockingVal(pair, next, src_addr, rank_sz, 0); gex_Event_Wait(ev); gex_NBI_Wait(GEX_EC_GET, 0); int failed = 0; for (int i = 0; i < 4; ++i) { CHECK(dst_array[i] == next); } if (failed) { ERR("Tests of Get APIs FAILED %d test(s).", failed); } } // RMA Put tests if (!TEST_SECTION_BEGIN_ENABLED()) { // Nothing to do } else if (! (test_caps & GEX_EP_CAPABILITY_RMA)) { MSG0("%c: Skipping RMA Put tests for pair (%d,%d) - RMA not yet supported for non-primordial EPs", TEST_SECTION_NAME(), loc_idx, rem_idx); } else { MSG0("%c: Starting RMA Put tests for pair (%d,%d)", TEST_SECTION_NAME(), loc_idx, rem_idx); int rc; gex_Event_t ev[2]; gex_Rank_t *dst = &rem_seg->put_dst[0]; gex_Rank_t *src = &loc_seg->local[0]; *src = next; ev[0] = gex_RMA_PutNB(pair, next, dst++, src, rank_sz, GEX_EVENT_NOW, 0); ev[1] = gex_RMA_PutNBVal(pair, next, dst++, next, rank_sz, 0); rc = gex_RMA_PutNBI(pair, next, dst++, src, rank_sz, GEX_EVENT_NOW, 0); assert(!rc); rc = gex_RMA_PutNBIVal(pair, next, dst++, next, rank_sz, 0); assert(!rc); rc = gex_RMA_PutBlocking(pair, next, dst++, src, rank_sz, 0); assert(!rc); rc = gex_RMA_PutBlockingVal(pair, next, dst++, next, rank_sz, 0); assert(!rc); gex_Event_WaitAll(ev, sizeof(ev)/sizeof(ev[0]), 0); gex_NBI_Wait(GEX_EC_PUT, 0); BARRIER(); int failed = 0; for (int i = 0; i < 6; ++i) { CHECK(loc_seg->put_dst[i] == myrank); loc_seg->put_dst[i] = myrank; // prevent cascading failure, such as in VIS } if (failed) { ERR("Tests of Put APIs FAILED %d test(s).", failed); } } // TODO: Long tests probably don't use RMA on conduits w/ "packed long" if (!TEST_SECTION_BEGIN_ENABLED()) { // AM Tests // Nothing to do } else if (! (test_caps & GEX_EP_CAPABILITY_AM)) { MSG0("%c: Skipping AM Request tests for pair (%d,%d) - AMs not yet supported for non-primordial EPs", TEST_SECTION_NAME(), loc_idx, rem_idx); } else { MSG0("%c: Starting AM Request tests for pair (%d,%d)", TEST_SECTION_NAME(), loc_idx, rem_idx); static gasnett_atomic_val_t cntr_target = 0; // Payload limit queries size_t maxmedreq = gex_AM_MaxRequestMedium(pair,next,GEX_EVENT_NOW,0,0); assert_always(maxmedreq >= gex_AM_LUBRequestMedium()); size_t maxmedrep = gex_AM_MaxReplyMedium (pair,next,GEX_EVENT_NOW,0,0); assert_always(maxmedrep >= gex_AM_LUBReplyMedium()); size_t maxlongreq = gex_AM_MaxRequestLong (pair,next,GEX_EVENT_NOW,0,0); assert_always(maxlongreq >= gex_AM_LUBRequestLong()); size_t maxlongrep = gex_AM_MaxReplyLong (pair,next,GEX_EVENT_NOW,0,0); assert_always(maxlongrep >= gex_AM_LUBReplyLong()); // FPAM injection gex_Rank_t *fp_dst = &rem_seg->fp_req_dst; gex_AM_RequestShort0 (pair, next, hidx_short_ping, 0); gex_AM_RequestMedium0(pair, next, hidx_med_ping, &next, sizeof(gex_Rank_t), GEX_EVENT_NOW, 0); gex_AM_RequestLong0 (pair, next, hidx_long_ping, &next, sizeof(gex_Rank_t), fp_dst, GEX_EVENT_NOW, 0); // NPAM injection gex_Rank_t *np_dst = &rem_seg->np_req_dst; gex_AM_SrcDesc_t sd; sd = gex_AM_PrepareRequestMedium(pair, next, &next, rank_sz, rank_sz, GEX_EVENT_NOW, 1, 0); gex_AM_CommitRequestMedium0(sd, hidx_npmed_ping, rank_sz); sd = gex_AM_PrepareRequestLong(pair, next, &next, rank_sz, rank_sz, NULL, GEX_EVENT_NOW, 0, 0); gex_AM_CommitRequestLong0 (sd, hidx_nplong_ping, rank_sz, np_dst); cntr_target += 1; GASNET_BLOCKUNTIL((cntr_target <= gasnett_atomic_read(&short_ping_cntr, 0)) && (cntr_target <= gasnett_atomic_read(&short_pong_cntr, 0)) && (cntr_target <= gasnett_atomic_read(&med_ping_cntr, 0)) && (cntr_target <= gasnett_atomic_read(&med_pong_cntr, 0)) && (cntr_target <= gasnett_atomic_read(&long_ping_cntr, 0)) && (cntr_target <= gasnett_atomic_read(&long_pong_cntr, 0)) && (cntr_target <= gasnett_atomic_read(&npmed_ping_cntr, 0)) && (cntr_target <= gasnett_atomic_read(&npmed_pong_cntr, 0)) && (cntr_target <= gasnett_atomic_read(&nplong_ping_cntr, 0)) && (cntr_target <= gasnett_atomic_read(&nplong_pong_cntr, 0))); // Note the ACQUIRE semantics of BLOCKUNTIL int failed = 0; CHECK(cntr_target == gasnett_atomic_read(&short_ping_cntr,0)); CHECK(short_ping_from == prev); CHECK(cntr_target == gasnett_atomic_read(&short_pong_cntr,0)); CHECK(short_pong_from == next); CHECK(cntr_target == gasnett_atomic_read(&med_ping_cntr,0)); CHECK(med_ping_from == prev); CHECK(cntr_target == gasnett_atomic_read(&med_pong_cntr,0)); CHECK(med_pong_from == next); CHECK(cntr_target == gasnett_atomic_read(&long_ping_cntr,0)); CHECK(long_ping_from == prev); CHECK(loc_seg->fp_req_dst == myrank); CHECK(cntr_target == gasnett_atomic_read(&long_pong_cntr,0)); CHECK(long_pong_from == next); CHECK(loc_seg->fp_rep_dst == next); CHECK(cntr_target == gasnett_atomic_read(&npmed_ping_cntr,0)); CHECK(npmed_ping_from == prev); CHECK(cntr_target == gasnett_atomic_read(&npmed_pong_cntr,0)); CHECK(npmed_pong_from == next); CHECK(cntr_target == gasnett_atomic_read(&nplong_ping_cntr,0)); CHECK(nplong_ping_from == prev); CHECK(loc_seg->np_req_dst == myrank); CHECK(cntr_target == gasnett_atomic_read(&nplong_pong_cntr,0)); CHECK(nplong_pong_from == next); CHECK(loc_seg->np_rep_dst == next); if (failed) { ERR("Tests of AM APIs FAILED %d test(s).", failed); } } if (!TEST_SECTION_BEGIN_ENABLED()) { // VIS Indexed Tests // Nothing to do } else if (! (test_caps & GEX_EP_CAPABILITY_VIS)) { MSG0("%c: Skipping VIS Indxed tests for pair (%d,%d) - VIS not yet supported for non-primordial EPs", TEST_SECTION_NAME(), loc_idx, rem_idx); } else { MSG0("%c: Starting VIS Indexed tests for pair (%d,%d)", TEST_SECTION_NAME(), loc_idx, rem_idx); // gex_VIS_{Vector,Indexed,Strided}{Put,Get}{NB,NBI,Blocking} == 18 entry points // TODO: currently we cover only Indexed, which we *hope* is representative gex_Rank_t S[2]; S[0] = myrank; S[1] = next; gex_Rank_t D[6] = { GEX_RANK_INVALID, GEX_RANK_INVALID, GEX_RANK_INVALID, GEX_RANK_INVALID, GEX_RANK_INVALID, GEX_RANK_INVALID}; void *loc_src_list[2]; loc_src_list[0] = S+0; loc_src_list[1] = S+1; void *rem_src_list[2]; rem_src_list[0] = &rem_seg->get_src; rem_src_list[1] = &rem_seg->vis_src; int dst_idx[] = {1,0,2,3,5,4}; void *loc_dst_list[6]; void *rem_dst_list[6]; for (int i = 0; i < 6; ++i) { loc_dst_list[i] = dst_idx[i] + D; rem_dst_list[i] = dst_idx[i] + rem_seg->vis_dst; } gex_Event_t puti_ev = gex_VIS_IndexedPutNB(pair, next, 2, rem_dst_list+0, rank_sz, 2, loc_src_list, rank_sz, 0); gex_VIS_IndexedPutNBI(pair, next, 2, rem_dst_list+2, rank_sz, 2, loc_src_list, rank_sz, 0); gex_VIS_IndexedPutBlocking(pair, next, 2, rem_dst_list+4, rank_sz, 2, loc_src_list, rank_sz, 0); gex_Event_t geti_ev = gex_VIS_IndexedGetNB(pair, 2, loc_dst_list+0, rank_sz, next, 2, rem_src_list, rank_sz, 0); gex_VIS_IndexedGetNBI(pair, 2, loc_dst_list+2, rank_sz, next, 2, rem_src_list, rank_sz, 0); gex_VIS_IndexedGetBlocking(pair, 2, loc_dst_list+4, rank_sz, next, 2, rem_src_list, rank_sz, 0); gex_Event_Wait(puti_ev); gex_Event_Wait(geti_ev); gex_NBI_Wait(GEX_EC_GET | GEX_EC_PUT, 0); BARRIER(); int failed = 0; CHECK(loc_seg->vis_dst[0] == myrank); CHECK(loc_seg->vis_dst[1] == prev); CHECK(loc_seg->vis_dst[2] == prev); CHECK(loc_seg->vis_dst[3] == myrank); CHECK(loc_seg->vis_dst[4] == myrank); CHECK(loc_seg->vis_dst[5] == prev); CHECK(D[0] == myrank); CHECK(D[1] == next); CHECK(D[2] == next); CHECK(D[3] == myrank); CHECK(D[4] == myrank); CHECK(D[5] == next); if (failed) { ERR("Tests of VIS APIs FAILED %d test(s).", failed); } } } BARRIER(); MSG("done."); gasnet_exit(0); return 0; } gasnet-2025.8.0/tests/testnbr.c0000664000175000017500000010666715142313673016431 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testnbr.c $ * Description: MG-like Neighbor exchange * Copyright 2005, Christian Bell * Terms of use are as specified in license.txt */ /************************************************************ * testnbr.c: * NAS MG modelled microbenchmark to measure the cost of nbr ghost cell * exchanges. The benchmark replicates ghost exchanges over all dimensions * (two of which generate strided data communication). * *************************************************************/ #include #include uintptr_t maxsegmentsz; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR ((uintptr_t)maxsegmentsz) #endif #include "test.h" static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; typedef struct { int datasize; int iters; int dims; int axis; int category; uint64_t time; double max_throughput; } stat_struct_t; uintptr_t topalloc = 0; FILE *nbr_fp; int maxlevel = 4; int myproc; int nprocs; #define CACHELINE_SZ 128 #define POWER_OF_TWO(P) (((P)&((P)-1)) == 0) #define PX_SZ (nb->dims[2]*nb->dims[1]) #define PY_SZ (nb->dims[2]*nb->dims[0]) #define PZ_SZ (nb->dims[1]*nb->dims[0]) #define AX 0 #define AY 1 #define AZ 2 #define AALL 3 #define LINEARIZEPROC(nb,k,j,i) (k*(nb)->procGrid[1]*(nb)->procGrid[0] + \ j*(nb)->procGrid[0] + i) #define GHOST_TYPE_PUT 0 #define GHOST_TYPE_AMLONG 1 #define GHOST_DIR_UPPER 0 #define GHOST_DIR_LOWER 1 #define GP_BLOCK(x) do { gex_Event_t h = (x); \ if ((h) != GEX_EVENT_INVALID) gex_Event_Wait(h); } while (0) /* * Memory requirements for this test differ according to the type of ghost * exchange being performed. They all have the per-processor data grid size * memory requirement based on the level of the grid. * * Over all axes x,y,z planes along the z axis (xy) planes are contiguous in * memory. This requires exchanges along the x and y axes to have some form * of non-contiguous communication. * * * The following types of ghost exchanges are done: * * 1. UPC (Parry's MG) * * Over each dimension, pack boundary plane in a buffer, send the buffer * and signal the nbr with a put. * * Each processor spins on the signal waiting to unpack the buffer back * into local computation data. * * Memory reqs: * * 2. Non-blocking GASNet (similar to UPC version) * * 2. GASNet Active-Messages, AMLong * * Pack into buffer send AMLong. * * Receiver runs handler, unpacks the data and increments a counter */ typedef struct _nbr_t { int dimsz; /* global dimension size */ /* 0 => yz plane * 1 => xz plane * 2 => xy plane (contiguous) */ int procGrid[3]; int idGrid[3]; /* Upper and Lower nbrs in each dimension (grid id) */ int idGridUpper[3]; int idGridLower[3]; /* Upper and Lower nbrs in each dimension (GASNet node ids) */ gex_Rank_t nodeidUpper[3]; gex_Rank_t nodeidLower[3]; /* Cache dims in all Lower nbrs */ int dimsLower[3]; /* blocks per grid element in each dimension */ int elemsPerDim; int dims[3]; int facesz[3]; /* Face sz for each axis in elements */ uintptr_t totalSize; /* Different mechanisms for Ghost exchanges */ double *Ldata; /* Local computation data */ uintptr_t *Dir; /* Remote computation data, flattened 3d cube */ uintptr_t *Diryz; /* Target for yz boundary exchanges */ uintptr_t *Dirxz; /* Target for xz boundary exchanges */ uintptr_t *DirSync; /* Target sync locations for notifies */ uintptr_t *DirSyncComm3; /* Target sync after comm3 phase */ /* Target communication buffers for non-contiguous planes */ double *yzBuffer; double *xzBuffer; /* xyBuffer requires no packing */ /* Arrays into communicaiton buffers, for low/up nbr in each dim */ double *dimBufs[3][2]; /* Two local communication buffers for non-contiguous planes */ double *yzCommBuffer; double *xzCommBuffer; /* For AM-long based updates XXX *not* cache friendly for floating funcs */ int amdims[3][2]; /* Loop iterations to kill time */ int64_t loopiters; /* For computing medians at node 0 */ stat_struct_t *stats0; } nbr_t; /* Only one-level for now */ nbr_t Nbr; #define AREF(nb,k,j,i) (nb->Ldata[(k)*(nb)->dims[1]*(nb)->dims[0] + \ (j)*(nb)->dims[0] + i]) #define NBR_SYNC_LEN (1 + CACHELINE_SZ/sizeof(int)) #define NBR_SYNC_OFF(axis,id,phase) (NBR_SYNC_LEN*(4*(axis)+2*(id)+(phase))) #define NBR_SYNCADDR(base,axis,id,phase) \ (((volatile int*)(base)) + NBR_SYNC_OFF(axis,id,phase)) void setupGrid(nbr_t *nb, int level); void allocMultiGrid(nbr_t *nb); void initNbr(nbr_t *nb); void freeNbr(nbr_t *nb); void estimateMemSegment(nbr_t *nb, uintptr_t *local, uintptr_t *segment); void ghostExchUPCMG (nbr_t *nb, int iters, int axis, int pairwise_sync); void ghostExchGASNetNonBlock(nbr_t *nb, int iters, int axis, int pairwise_sync); void ghostExchAMLong (nbr_t *nb, int iters, int axis); gex_Event_t ge_put (nbr_t *nb, int type, int dir, int axis, int *flag); gex_Event_t ge_notify(nbr_t *nb, int dir, int axis); void ge_wait (nbr_t *nb, int dir, int axis); void ge_unpack(nbr_t *nb, double *src, size_t destp, int axis); void pairwise_signal_nbrs(nbr_t *nb, gex_Event_t *h_nbr, int axis_in, int phase); void pairwise_wait_nbrs (nbr_t *nb, gex_Event_t *h_nbr, int axis_in, int phase); #define hidx_ghostReqHandler 201 static void ghostReqHandler(gex_Token_t token, void *buf, size_t nbytes, int axis, int destp) { double *src = (double *)buf; int face = (destp != 0); if (axis != AZ) ge_unpack(&Nbr, src, destp, axis); Nbr.amdims[axis][face] = 1; return; } gex_AM_Entry_t htable[] = { { hidx_ghostReqHandler, (gex_AM_Fn_t)ghostReqHandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, 2, NULL, NULL } }; #define init_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _init_stat #define update_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _update_stat #define print_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _print_stat void _init_stat(nbr_t *nb, stat_struct_t *st, int axis, int dims, int sz) { memset(st, 0, sizeof(*st)); /* prevent valgrind warnings about struct padding */ st->iters = 0; st->dims = dims; st->datasize = sz; st->axis = axis; st->time = 0; if (st->axis != AALL) st->category = (nb->nodeidUpper[axis] != myproc) + (nb->nodeidLower[axis] != myproc); else st->category = 3; } void _update_stat(stat_struct_t *st, uint64_t temptime, int iters) { st->iters += iters; st->time += temptime; } void _print_stat(nbr_t *nb, int myproc, stat_struct_t *st, const char *name) { int i,c; float cattimes[4] = { 0.0 }; int catcount[4] = { 0 }; double stdev[4]; double ttime; /* Update statistics at zero. * If we are doing a per-axis test, we separate the printed values * within three categories based on the type of nbr updates that * were completed. * * Updates to Upper/Lower nbr can be * 1. Global/Global (both updates required communication) * 2. Global/Local or Local/Global (only one update req'd comm). * 3. Local/Local (no updates required communication) * 4. Don't care (either local/global) */ gex_RMA_PutBlocking(myteam, 0, nb->stats0 + myproc, st, sizeof(stat_struct_t), 0); BARRIER(); if (myproc) return; /* Find average in each category of face updates */ for (i = 0; i < nprocs; i++) { c = nb->stats0[i].category; assert(c >= 0 && c <= 3); cattimes[c] += ((float)nb->stats0[i].time) / nb->stats0[i].iters; catcount[c]++; } /* Calculate average */ for (i = 0; i < 4; i++) { if (catcount[i] > 0) cattimes[i] /= (float) catcount[i]; else cattimes[i] = .0; } /* Calculate stdev for each category*/ for (c = 0; c < 4; c++) { if (catcount[c] < 2) stdev[c] = .0; else { double sumsq = .0; double devmean = .0; double procavg; double divm; for (i = 0; i < nprocs; i++) { if (nb->stats0[i].category != c) continue; procavg = ((double)nb->stats0[i].time)/nb->stats0[i].iters; devmean = (double)cattimes[c] - procavg; sumsq += devmean*devmean; } divm = sumsq / (catcount[c]-1); stdev[c] = sqrt(divm); } } if (catcount[3] > 0) { /* Don't care about various global/local distinctions */ printf("DIM %4i fullexch %8i byte : %5i iters, %9.2f +/- %8.2f us ave (%s)\n", st->dims, st->datasize, st->iters, cattimes[3], stdev[3], name); } else { printf("DIM %4i axis %c %8i byte : %5i iters, %9.2f +/- %8.2f us ave (%s)\n", st->dims, 'x'+st->axis, st->datasize, st->iters, cattimes[2], stdev[2], name ); } if (nbr_fp != NULL) { int cat = catcount[3] > 0 ? 3 : 2; fprintf(nbr_fp, "%-11s %c %4i %8i %9.2f %8.2f ", name, cat == 3 ? 'F' : st->axis + 'x', st->dims, st->datasize, cattimes[cat], stdev[cat]); for (i = 0; i < nprocs; i++) { if (nb->stats0[i].category != cat) { ttime = .0; } else ttime = ((float)nb->stats0[i].time) / nb->stats0[i].iters; fprintf(nbr_fp, " %9.2f", ttime); } fprintf(nbr_fp, "\n"); fflush(nbr_fp); } fflush(stdout); } int level_dims[][20] = { { 16,32,48,64,80,96,112,128,0 }, { 16,32,48,64,80,96,112,128,144,160,176,192,208,224,240,256,0 }, { 32,64,96,128,160,192,224,256,288,320,352,384,416,448,480,512,0 }, { 64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,0 } }; int main(int argc, char **argv) { int level = 0, i; int alldimensions = 1; int upctestonly = 0; char *nbrf; uintptr_t insegsz, outsegsz; int iters = 150; int dim; int maxdim = 0; int axis; int argn = 1; int help = 0; /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testnbr", &argc, &argv, 0)); /* get SPMD info */ myproc = gex_TM_QueryRank(myteam); nprocs = gex_TM_QuerySize(myteam); /* XXX parse args: iters min max */ while (argc > argn && *argv[argn] == '-') { char c = argv[argn][1]; if (c == 'f') alldimensions = 0; else if (c == 'm') upctestonly = 1; else help = 1; argn++; } if (argc > argn) { iters = atoi(argv[argn++]); if (!iters) help = 1; } if (argc > argn) { level = atoi(argv[argn++]); if (!(level >= 0 && level < 4)) help = 1; } for (i = 0; i < level_dims[level][i]; i++) maxdim = MAX(level_dims[level][i], maxdim); /* setup max grid we intend to use, so we can get enough * memory per proc at startup */ if (help || !POWER_OF_TWO(nprocs)) maxsegmentsz = PAGESZ; else { setupGrid(&Nbr, maxdim); estimateMemSegment(&Nbr, &insegsz, &outsegsz); maxsegmentsz = outsegsz + PAGESZ*nprocs; } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testnbr",1, "[-f] [-m] [iters] [level]\n\n" "-f run full nbr exchange (NAS MG) instead of per axis\n" "-m run UPC version of GASNet MG test only\n" "[iters] How many iterations per exchange (default = 150)\n" "[level] select level of dimensions (default level = 0)\n" " level=0 dims=<16,32,48,64,80,96,112,128>\n" " level=1 dims=<16,32,48,64, .. 128,160,192,224,256>\n" " level=2 dims=<32,64,96,128, .. 320,352,384,416,448,480,512>\n" " level=3 dims=<32,64,96,128, .. 928,960,992,1024>\n\n" ); if (help) test_usage(); if (!POWER_OF_TWO(nprocs)) { MSG0("WARNING: This test requires a power of two number of processes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives */ } TEST_SET_WAITMODE(1); initNbr(&Nbr); BARRIER(); /* Run test over all axes: * 0 -> x: yz planes * 1 -> y: xz planes * 2 -> z: xy planes * 3 -> x,y,z Full MG-like Neighbor exchange */ /* We may want to gather extended info in a file */ if (!myproc && (nbrf = gasnet_getenv("NBRTEST_FILE")) != NULL) { nbr_fp = fopen(nbrf, "w"); if (nbr_fp == NULL) { fprintf(stderr, "Can't open NBRTEST_FILE %s\n", nbrf); gasnet_exit(1); } printf("Saving extended output to %s\n", nbrf); } else nbr_fp = NULL; if (!myproc) { printf("\ntestnbr running %d %s" " (%d procs over processor grid = %2i x %2i x %2i)\n", iters, alldimensions ? "ghost exchanges per axis" : "full (NAS MG-like) ghost exchanges", nprocs, Nbr.procGrid[0], Nbr.procGrid[1], Nbr.procGrid[2]); printf( "\nReported times are the medians across all processors only" " for ghost exchanges that incur network communication\n"); } BARRIER(); if (alldimensions) { for (axis = 0; axis <= 2; axis++) { if (!myproc) { if (axis == 2) printf("\nExchange over 'z' contiguous axis, grid = %d procs\n", Nbr.procGrid[2]); else printf("\nExchange over '%c' non-contiguous axis, grid = " "%d procs (DIM%s x stride %s)\n", 'x' + axis, Nbr.procGrid[axis], axis==0 ? "^2" : "", axis==0 ? "DIM" : "1"); fflush(stdout); } BARRIER(); for (i = 0; level_dims[level][i] != 0; i++) { dim = level_dims[level][i]; setupGrid(&Nbr, dim); allocMultiGrid(&Nbr); BARRIER(); /* In the alldimensions test, run only the non-blocking * pairwise and the AMLong versions */ ghostExchUPCMG(&Nbr, 1, axis, 0); /* Dry run */ ghostExchUPCMG(&Nbr, iters, axis, 0); } BARRIER(); if (upctestonly) continue; for (i = 0; level_dims[level][i] != 0; i++) { dim = level_dims[level][i]; setupGrid(&Nbr, dim); allocMultiGrid(&Nbr); BARRIER(); /* In the alldimensions test, run only the non-blocking * pairwise and the AMLong versions */ ghostExchGASNetNonBlock(&Nbr, 1, axis, 1); /* Dry run */ ghostExchGASNetNonBlock(&Nbr, iters, axis, 1); } BARRIER(); for (i = 0; level_dims[level][i] != 0; i++) { dim = level_dims[level][i]; setupGrid(&Nbr, dim); allocMultiGrid(&Nbr); BARRIER(); ghostExchAMLong(&Nbr, 1, axis); /* Dry run */ ghostExchAMLong(&Nbr, iters, axis); } } } else { axis = 3; /* Full ghost exchange, no individual axis */ BARRIER(); for (i = 0; level_dims[level][i] != 0; i++) { dim = level_dims[level][i]; setupGrid(&Nbr, dim); allocMultiGrid(&Nbr); BARRIER(); ghostExchUPCMG(&Nbr, 1, axis, 0); /* Dry run */ ghostExchUPCMG(&Nbr, iters, axis, 0); } BARRIER(); if (!upctestonly) { for (i = 0; level_dims[level][i] != 0; i++) { dim = level_dims[level][i]; setupGrid(&Nbr, dim); allocMultiGrid(&Nbr); BARRIER(); ghostExchGASNetNonBlock(&Nbr, 1, axis, 1); /* Dry run */ ghostExchGASNetNonBlock(&Nbr, iters, axis, 1); } BARRIER(); for (i = 0; level_dims[level][i] != 0; i++) { dim = level_dims[level][i]; setupGrid(&Nbr, dim); allocMultiGrid(&Nbr); BARRIER(); ghostExchAMLong(&Nbr, 1, axis); /* Dry run */ ghostExchAMLong(&Nbr, iters, axis); } } } freeNbr(&Nbr); BARRIER(); if (nbr_fp != NULL) fclose(nbr_fp); gasnet_exit(0); return 0; } void setupGrid(nbr_t *nb, int dimsz) { int t_grid = 1; int axis; int elemsPerDim, totelemsPerDim; nb->procGrid[0] = 1; nb->procGrid[1] = 1; nb->procGrid[2] = 1; /* setup the processor grid */ while (t_grid*2 <= nprocs) { nb->procGrid[0] *= 2; t_grid *= 2; if (t_grid*2 <= nprocs) { nb->procGrid[1] *= 2; t_grid *= 2; if (t_grid*2 <= nprocs) { nb->procGrid[2] *= 2; t_grid *= 2; } } } assert(t_grid == nprocs); /* Setup the proc id in the grid */ t_grid = myproc; nb->idGrid[0] = (myproc % (nb->procGrid[0]*nb->procGrid[1])) % nb->procGrid[0]; nb->idGrid[1] = (myproc % (nb->procGrid[0]*nb->procGrid[1])) / nb->procGrid[0]; nb->idGrid[2] = myproc/(nb->procGrid[0]*nb->procGrid[1]); /* Setup the number of blocks per grid element in each dimension. Total * elements per dimension contains an extra two boundary elements */ nb->elemsPerDim = elemsPerDim = dimsz;/*(2<<(unsigned)level);*/ totelemsPerDim = elemsPerDim + 2; nb->totalSize = 1; /* Setup lower and upper nbrs in each dimension */ for (axis = 0; axis <= 2; axis++) { int blocksz = elemsPerDim / nb->procGrid[axis]; /* We don't handle corner cases, yet */ assert_always(blocksz > 0); assert_always(elemsPerDim > nb->procGrid[axis]); assert_always(elemsPerDim % nb->procGrid[axis] == 0); nb->idGridUpper[axis] = nb->idGrid[axis] == nb->procGrid[axis]-1 ? 0 : nb->idGrid[axis]+1; nb->idGridLower[axis] = nb->idGrid[axis] == 0 ? nb->procGrid[axis]-1 : nb->idGrid[axis]-1; /* Now map the grid onto actual nodes */ switch (axis) { case 0: /* X axis */ nb->nodeidUpper[0] = LINEARIZEPROC(nb, nb->idGrid[2],nb->idGrid[1],nb->idGridUpper[0]); nb->nodeidLower[0] = LINEARIZEPROC(nb, nb->idGrid[2],nb->idGrid[1],nb->idGridLower[0]); break; case 1: /* Y axis */ nb->nodeidUpper[1] = LINEARIZEPROC(nb, nb->idGrid[2],nb->idGridUpper[1],nb->idGrid[0]); nb->nodeidLower[1] = LINEARIZEPROC(nb, nb->idGrid[2],nb->idGridLower[1],nb->idGrid[0]); break; case 2: /* Z axis */ nb->nodeidUpper[2] = LINEARIZEPROC(nb, nb->idGridUpper[2],nb->idGrid[1],nb->idGrid[0]); nb->nodeidLower[2] = LINEARIZEPROC(nb, nb->idGridLower[2],nb->idGrid[1],nb->idGrid[0]); break; default: break; } /* Don't forget boundary elements in each dimension */ blocksz += 2; /* XXX assumption of equal block distribution */ nb->dimsLower[axis] = blocksz; nb->totalSize *= (long) blocksz; nb->dims[axis] = blocksz; } nb->facesz[0] = nb->dims[1]*nb->dims[2]; nb->facesz[1] = nb->dims[0]*nb->dims[2]; nb->facesz[2] = nb->dims[0]*nb->dims[1]; nb->dimsz = dimsz; if (0) { fprintf(stdout, "%2d> level %2d [%1d,%1d,%1d] in grid [%1d,%1d,%1d] has " "[%1d,%1d],[%1d,%1d],[%1d,%1d] OR" "[%1d,%1d],[%1d,%1d],[%1d,%1d]\n", myproc, dimsz, nb->idGrid[0], nb->idGrid[1], nb->idGrid[2], nb->procGrid[0], nb->procGrid[1], nb->procGrid[2], nb->idGridLower[0], nb->idGridUpper[0], nb->idGridLower[1], nb->idGridUpper[1], nb->idGridLower[2], nb->idGridUpper[2], (int)(nb->nodeidLower[0]), (int)(nb->nodeidUpper[0]), (int)(nb->nodeidLower[1]), (int)(nb->nodeidUpper[1]), (int)(nb->nodeidLower[2]), (int)(nb->nodeidUpper[2])); } } /* * Estimate segment memory requirements for parry's ghost */ void estimateMemSegment(nbr_t *nb, uintptr_t *local, uintptr_t *segment) { uintptr_t outseg = 0; uintptr_t inseg = 0; outseg += /* local xz and yz comm buffers, 2 boundaries each */ (nb->dims[0]*nb->dims[2]*2 + nb->dims[1]*nb->dims[2]*2) * sizeof(double); outseg += /* per-processor directories: Dir, Dirxy, Dirxz, Diryz, DirSync, DirSyncComm3 */ nprocs*6*sizeof(uintptr_t); inseg += /* sync flags for each cube face, on a separate cache line */ (sizeof(int)*8*2*2*NBR_SYNC_LEN); inseg += /* xz,yz and xy target comm buffers, 2 boundaries each */ (PX_SZ+PY_SZ+PZ_SZ)*2*sizeof(double); inseg += /* comm buffers for non-contiguous planes */ (PX_SZ+PY_SZ)*2*sizeof(double); inseg += /* Actual computation data, page aligned */ alignup((uintptr_t)(nb->totalSize * sizeof(double)), PAGESZ); inseg += /* room for stats */ sizeof(stat_struct_t) * nprocs; *local = outseg; *segment = inseg; return; } void freeNbr(nbr_t *nb) { free(nb->Dir); free(nb->Diryz); free(nb->Dirxz); free(nb->DirSync); free(nb->DirSyncComm3); } void initNbr(nbr_t *nb) { nb->Dir = (uintptr_t *) calloc(nprocs, sizeof(uintptr_t)); nb->Diryz = (uintptr_t *) calloc(nprocs, sizeof(uintptr_t)); nb->Dirxz = (uintptr_t *) calloc(nprocs, sizeof(uintptr_t)); nb->DirSync = (uintptr_t *) calloc(nprocs, sizeof(uintptr_t)); nb->DirSyncComm3 = (uintptr_t *) calloc(nprocs, sizeof(uintptr_t)); return; } /* * Carve out our segment according to the grid dimensions currently set in Nb */ void allocMultiGrid(nbr_t *nb) { int i; char *segaddr; for (i = 0; i < nprocs; i++) { /* segaddr points to beginning of shared GASNet segment */ segaddr = (char *) TEST_SEG(i); /* Common to parry and amlong approaches */ nb->Dir[i] = (uintptr_t) segaddr; segaddr += alignup(nb->totalSize * sizeof(double), PAGESZ); nb->Diryz[i] = (uintptr_t) segaddr; segaddr += 2*PX_SZ*sizeof(double); nb->Dirxz[i] = (uintptr_t) segaddr; segaddr += 2*PY_SZ*sizeof(double); if (myproc == i) { nb->dimBufs[0][0] = nb->yzBuffer = (double *) nb->Diryz[i]; nb->dimBufs[0][1] = nb->dimBufs[0][0] + PX_SZ; nb->dimBufs[1][0] = nb->xzBuffer = (double *) nb->Dirxz[i]; nb->dimBufs[1][1] = nb->dimBufs[1][0] + PY_SZ; nb->Ldata = (double *) nb->Dir[i]; } if (myproc == i) nb->yzCommBuffer = (double *) segaddr; segaddr += 2*PX_SZ*sizeof(double); if (myproc == i) nb->xzCommBuffer = (double *) segaddr; segaddr += 2*PY_SZ*sizeof(double) ; /* Dirsync requires counters on separate cache lines */ segaddr += NBR_SYNC_LEN*sizeof(int); nb->DirSync[i] = (uintptr_t) segaddr; segaddr += 8*NBR_SYNC_LEN*sizeof(int); nb->DirSyncComm3[i] = (uintptr_t) segaddr; segaddr += 8*NBR_SYNC_LEN*sizeof(int); if (i == 0) {/* save address for stats at 0 */ /* No allocator to give us word alignement */ segaddr = alignup_ptr(segaddr,8); nb->stats0 = (stat_struct_t *) segaddr; segaddr += sizeof(stat_struct_t)*nprocs; } if (myproc == i) { topalloc = (uintptr_t) segaddr; if (topalloc >= (uintptr_t) TEST_SEG(myproc) + TEST_SEGSZ) { fprintf(stderr, "DIM %d too large for segment\n", nb->dimsz); gasnet_exit(1); } } } } void ge_unpack(nbr_t *nb, double *src, size_t destp, int axis) { int n,i,j,k; int dk = nb->dims[2]; int dj = nb->dims[1]; int di = nb->dims[0]; n=0; switch (axis) { case 0: /* X axis, yz plane, n * stride n */ for (k=0; k < dk; k++) for (j = 0; j < dj; j++) AREF(nb,k,j,destp) = src[n++]; break; case 1: /* Y axis, xz plane, n * stride 1 */ for (k=0; k < dk; k++) for (i=0; i < di; i++) AREF(nb,k,destp,i) = src[n++]; break; case 2: /* Z axis, xy plane, 1 * stride 1 */ break; default: break; } return; } /* * if (axis == AALL), do all axis (full ghost exchange) */ void ghostExchUPCMGOrig(nbr_t *nb, int iters, int axis_in, int pairwise_sync) { int i, j, axis; int axis_tot; uint64_t begin, end; stat_struct_t stcomm3; int axes[3]; gex_Event_t hput; if (axis_in == AALL) { axes[0] = 0; axes[1] = 1; axes[2] = 2; axis_tot = 3; init_stat(nb, &stcomm3, axis_in, nb->dimsz, (PX_SZ+PY_SZ+PZ_SZ)*sizeof(double)*2); } else { axes[0] = axis_in; axis_tot = 1; init_stat(nb, &stcomm3, axis_in, nb->dimsz, nb->facesz[axis_in]*sizeof(double)*2); } BARRIER(); for (i = 0; i < iters; i++) { begin = TIME(); for (j = 0; j < axis_tot; j++) { axis = axes[j]; /* Send data to upper and lower nbr, in turn */ hput = ge_put(nb, GHOST_TYPE_PUT, GHOST_DIR_UPPER, axis, NULL); if (hput != GEX_EVENT_INVALID) { gex_Event_Wait(hput); gex_Event_Wait( ge_notify(nb, GHOST_DIR_UPPER, axis) ); ge_wait(nb, GHOST_DIR_UPPER, axis); } hput = ge_put(nb, GHOST_TYPE_PUT, GHOST_DIR_LOWER, axis, NULL); if (hput != GEX_EVENT_INVALID) { gex_Event_Wait(hput); gex_Event_Wait( ge_notify(nb, GHOST_DIR_LOWER, axis) ); ge_wait(nb, GHOST_DIR_LOWER, axis); } } end = TIME(); BARRIER(); /* don't include the barrier time */ update_stat(&stcomm3, (end-begin), 1); } if (iters > 1) { print_stat(nb, myproc, &stcomm3, "UPC-MG"); } BARRIER(); return; } /* * if (axis == AALL), do all axis (full ghost exchange) */ void ghostExchUPCMG(nbr_t *nb, int iters, int axis_in, int pairwise_sync) { int i, j, axis; int axis_tot; uint64_t begin, end; stat_struct_t stcomm3; int axes[3]; gex_Event_t hput1, hput2; if (axis_in == AALL) { axes[0] = 0; axes[1] = 1; axes[2] = 2; axis_tot = 3; init_stat(nb, &stcomm3, axis_in, nb->dimsz, (PX_SZ+PY_SZ+PZ_SZ)*sizeof(double)*2); } else { axes[0] = axis_in; axis_tot = 1; init_stat(nb, &stcomm3, axis_in, nb->dimsz, nb->facesz[axis_in]*sizeof(double)*2); } BARRIER(); for (i = 0; i < iters; i++) { begin = TIME(); for (j = 0; j < axis_tot; j++) { axis = axes[j]; /* Send data to upper and lower nbr, in turn */ hput1 = ge_put(nb, GHOST_TYPE_PUT, GHOST_DIR_UPPER, axis, NULL); hput2 = ge_put(nb, GHOST_TYPE_PUT, GHOST_DIR_LOWER, axis, NULL); if (hput1 != GEX_EVENT_INVALID) { gex_Event_Wait(hput1); gex_Event_Wait( ge_notify(nb, GHOST_DIR_UPPER, axis) ); } if (hput2 != GEX_EVENT_INVALID) { gex_Event_Wait(hput2); gex_Event_Wait( ge_notify(nb, GHOST_DIR_LOWER, axis) ); } if (hput1 != GEX_EVENT_INVALID) ge_wait(nb, GHOST_DIR_LOWER, axis); if (hput2 != GEX_EVENT_INVALID) ge_wait(nb, GHOST_DIR_UPPER, axis); } end = TIME(); BARRIER(); /* don't include the barrier time */ update_stat(&stcomm3, (end-begin), 1); } if (iters > 1) { print_stat(nb, myproc, &stcomm3, "UPC-MG"); } BARRIER(); return; } /* * Parry uses UPC-level shared directories to propagate the location of * per-thread communication buffers. */ void ghostExchGASNetNonBlock(nbr_t *nb, int iters, int axis_in, int pairwise_sync) { unsigned int i, j, axis, face; volatile int *syncflag; uint64_t begin, end; stat_struct_t stcomm3; gex_Event_t hput[2]; gex_Event_t sput[6]; int axes[3]; int axis_tot; int sfaces, sfacedone[2]; int rfaces, rfacedone[2]; int sent; if (axis_in == AALL) { /* Here we start with axis 'z' since it's the contiguous one and will * overlap subsequent non-contiguous axis that require packing */ axes[0] = 0; axes[1] = 1; axes[2] = 2; axis_tot = 3; init_stat(nb, &stcomm3, axis_in, nb->dimsz, (PX_SZ+PY_SZ+PZ_SZ)*sizeof(double)*2); } else { axes[0] = axis_in; axis_tot = 1; init_stat(nb, &stcomm3, axis_in, nb->dimsz, nb->facesz[axis_in]*sizeof(double)*2); } BARRIER(); for (i = 0; i < iters; i++) { sent = 0; begin = TIME(); for (j = 0; j < axis_tot; j++) { axis = axes[j]; /* Both lower and upper faces can proceed independently */ hput[1] = ge_put(nb, GHOST_TYPE_PUT, GHOST_DIR_LOWER, axis, NULL); hput[0] = ge_put(nb, GHOST_TYPE_PUT, GHOST_DIR_UPPER, axis, NULL); /* Mark locally completed puts as done */ rfacedone[0] = sfacedone[0] = (hput[0] == GEX_EVENT_INVALID); rfacedone[1] = sfacedone[1] = (hput[1] == GEX_EVENT_INVALID); rfaces = sfaces = sfacedone[0] + sfacedone[1]; /* * Poll until either one of these conditions are fulfilled: * 1. A notify is received (other proc is done with update) * 2. A non-blocking put is completed. */ while (!(sfaces == 2 && rfaces == 2)) { /* Any of upper or lower face is complete ? */ for (face=0; face<2; face++) { if (rfacedone[face]) continue; syncflag = NBR_SYNCADDR(nb->DirSync[myproc], axis, !face, 0); if (*syncflag != 0) { /* Unless the axis is contiguous, unpack data */ if (axis != AZ) { ge_unpack(nb, nb->dimBufs[axis][face], face ? nb->dims[axis]-1 : 0, axis); } *syncflag = 0; rfacedone[face] = 1; rfaces++; } } /* Any of *our* ghost exchanges complete ? */ gasnet_AMPoll(); if (gex_Event_TestSome(hput, 2, 0) == GASNET_ERR_NOT_READY) continue; /* Which face has completed */ for (face=0; face<2; face++) { /* Unless the face is done or not ready, skip it */ if (sfacedone[face] || hput[face] != GEX_EVENT_INVALID) continue; sput[sent] = ge_notify(nb, face ? GHOST_DIR_LOWER : GHOST_DIR_UPPER, axis); sfacedone[face] = 1; sfaces++; sent++; } /* Try to progress events in sput[] */ gasnet_AMPoll(); gex_Event_TestAll(sput, sent, 0); } /* When the loop ends, we've received face updates from both * nbrs */ } end = TIME(); update_stat(&stcomm3, (end-begin), 1); /* We don't time the sync here since it's essentially free. The notify * is simply a non-blocking signal, we don't care when it completes * locally. */ gex_Event_WaitAll(sput, sent, 0); BARRIER(); } if (iters > 1) { print_stat(nb, myproc, &stcomm3, "GASNet-NB"); } BARRIER(); return; } /* * Pairwise sync with nbrs. * * It's currently unused in all three versions of nbr exchanges. */ void pairwise_signal_nbrs(nbr_t *nb, gex_Event_t *h_nbr, int axis_in, int phase) { int i, axis, axis_tot; int axes[3]; int destup, destdown; if (axis_in == AALL) { axis_tot = 3; axes[0] = 0; axes[1] = 1; axes[2] = 2; } else { axis_tot = 1; axes[0] = axis_in; } for (i = 0; i < axis_tot; i++) { axis = axes[i]; destup = nb->nodeidUpper[axis]; destdown = nb->nodeidLower[axis]; h_nbr[i*2+0] = gex_RMA_PutNBVal(myteam, destup, (void *) NBR_SYNCADDR(nb->DirSyncComm3[destup], axis, 1, phase), 1, sizeof(int), 0); h_nbr[i*2+1] = gex_RMA_PutNBVal(myteam, destdown, (void *) NBR_SYNCADDR(nb->DirSyncComm3[destdown], axis, 0, phase), 1, sizeof(int), 0); } } void pairwise_wait_nbrs(nbr_t *nb, gex_Event_t *h_nbr, int axis_in, int phase) { int i, axis, axis_tot; int nfaces; int faces = 0; int axes[3]; volatile int *syncflag; if (axis_in == AALL) { nfaces = 6; axes[0] = 0; axes[1] = 1; axes[2] = 2; axis_tot = 3; } else { nfaces = 2; axes[0] = axis_in; axis_tot = 1; } /* Reap our previous phase handles and poll on local signals */ gex_Event_WaitAll(h_nbr, nfaces, 0); do { faces = 0; gasnet_AMPoll(); for (i = 0; i < axis_tot; i++) { axis = axes[i]; syncflag = NBR_SYNCADDR(nb->DirSyncComm3[myproc], axis, 0, phase); if (*syncflag) faces++; syncflag = NBR_SYNCADDR(nb->DirSyncComm3[myproc], axis, 1, phase); if (*syncflag) faces++; } } while (faces < nfaces); /* Reset signal locations for current phase */ for (i = 0; i < axis_tot; i++) { axis = axes[i]; syncflag = NBR_SYNCADDR(nb->DirSyncComm3[myproc], axis, 0, phase); *syncflag = 0; syncflag = NBR_SYNCADDR(nb->DirSyncComm3[myproc], axis, 1, phase); *syncflag = 0; } } void ghostExchAMLong(nbr_t *nb, int iters, int axis_in) { int i, j, axis, axis_tot; size_t maxmsg = 0; int axes[3]; uint64_t begin, end; stat_struct_t stcomm3; if (axis_in == AALL) { axes[0] = 0; axes[1] = 1; axes[2] = 2; axis_tot = 3; init_stat(nb, &stcomm3, axis_in, nb->dimsz, (PX_SZ+PY_SZ+PZ_SZ)*sizeof(double)*2); } else { axes[0] = axis_in; axis_tot = 1; init_stat(nb, &stcomm3, axis_in, nb->dimsz, nb->facesz[axis_in]*sizeof(double)*2); } /* skip this test if dimensions are larger than AMLong. This test does not * require global coordination since the dimensions are split up equally. */ for (i = 0; i < axis_tot; i++) maxmsg = MAX(maxmsg, nb->facesz[i]*sizeof(double)); if (maxmsg > gex_AM_MaxRequestLong(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,2)) { if (!myproc) { printf("Skipping AMLong with dim=%d (%"PRIuPTR" > AMMaxLongRequest())\n", nb->dimsz, (uintptr_t)maxmsg); fflush(stdout); } return; } BARRIER(); for (i = 0; i < iters; i++) { nb->amdims[0][0] = nb->amdims[0][1] = nb->amdims[1][0] = nb->amdims[1][1] = nb->amdims[2][0] = nb->amdims[2][1] = 0; BARRIER(); begin = TIME(); for (j = 0; j < axis_tot; j++) { axis = axes[j]; ge_put(nb, GHOST_TYPE_AMLONG, GHOST_DIR_UPPER, axis, &nb->amdims[axis][0]); ge_put(nb, GHOST_TYPE_AMLONG, GHOST_DIR_LOWER, axis, &nb->amdims[axis][1]); /* Wait until the face update is completed */ while (!(nb->amdims[axis][0] && nb->amdims[axis][1])) gasnet_AMPoll(); nb->amdims[axis][0] = nb->amdims[axis][1] = 0; } end = TIME(); update_stat(&stcomm3, (end-begin), 1); BARRIER(); } if (iters > 1) { print_stat(nb, myproc, &stcomm3, "AMLongAsync"); } BARRIER(); return; } gex_Event_t ge_put(nbr_t *nb, int type, int dir, int axis, int *flag) { int n=0,i,j,k; int dk = nb->dims[2]; int dj = nb->dims[1]; int di = nb->dims[0]; double *src, *dest; int srcp, destp; size_t len; gex_Rank_t node; if (dir == GHOST_DIR_UPPER) { node = nb->nodeidUpper[axis]; srcp = nb->dims[axis]-2; destp = 0; } else { /* GHOST_DIR_LOWER */ node = nb->nodeidLower[axis]; srcp = 1; destp = nb->dimsLower[axis]-1; } /* take care of both axes that require packing */ switch(axis) { case AX: if (node == myproc) { for (k=0; k < dk; k++) for (j=0; j < dj; j++) AREF(nb,k,j,destp) = AREF(nb,k,j,srcp); goto local_copy; } else { for (k = 0; k < dk; k++) for (j = 0; j < dj; j++) nb->yzCommBuffer[n++] = AREF(nb,k,j,srcp); src = nb->yzCommBuffer; dest = (double *) nb->Diryz[node] + (destp!=0)*PX_SZ; len = PX_SZ*sizeof(double); /* send packed buf */ } break; case AY: if (node == myproc) { for (k = 0; k < dk; k++) for (i = 0; i < di; i++) AREF(nb,k,destp,i) = AREF(nb,k,srcp,i); goto local_copy; } else { for (k = 0; k < dk; k++) for (i = 0; i < di; i++) nb->xzCommBuffer[n++] = AREF(nb,k,srcp,i); src = nb->xzCommBuffer; dest = (double *) nb->Dirxz[node] + (destp!=0)*PY_SZ; len = PY_SZ*sizeof(double); /* send packed buf */ } break; case AZ: src = (double *) nb->Ldata + srcp*dj*di; dest = (double *) nb->Dir[node] + destp*PZ_SZ; len = PZ_SZ*sizeof(double); if (node == myproc) { memcpy(dest,src,PZ_SZ*sizeof(double)); goto local_copy; } break; default: FATALERR("Unrecognized axis in ge_put"); } if (type == GHOST_TYPE_AMLONG) { /* By now, send an AMLong with data */ // TODO-EX: Restore "Async" nature of this when lc_opt=handle is supported // TODO-EX: was "gasnet_AMRequestLongAsync2(node,hidx_ghostReqHandler,src,len,dest, axis,destp)" gex_AM_RequestLong2(myteam,node,hidx_ghostReqHandler,src,len,dest,GEX_EVENT_NOW,0,axis,destp); return GEX_EVENT_INVALID; } else { return gex_RMA_PutNB(myteam, node, dest, src, len, GEX_EVENT_DEFER, 0); } local_copy: if (type == GHOST_TYPE_AMLONG) *flag = 1; return GEX_EVENT_INVALID; } gex_Event_t ge_notify(nbr_t *nb, int dir, int axis) { int islower = (dir == GHOST_DIR_LOWER); int node = islower ? nb->nodeidLower[axis] : nb->nodeidUpper[axis]; volatile int *syncflag = NBR_SYNCADDR(nb->DirSync[node], axis, islower, 0); if (node == myproc) { *syncflag = 1; return GEX_EVENT_INVALID; } else return gex_RMA_PutNBVal(myteam, node, (void *)syncflag, 1, sizeof(int), 0); } void ge_wait(nbr_t *nb, int dir, int axis) { int islower = (dir == GHOST_DIR_LOWER); volatile int *syncaddr = NBR_SYNCADDR(nb->DirSync[myproc], axis, islower, 0); int destp = islower ? nb->dims[axis]-1 : 0; double *src = nb->dimBufs[axis][dir]; while (*syncaddr == 0) { gasnet_AMPoll(); } /* Unless the axis is contiguous, unpack received data */ if (axis != AZ) ge_unpack(nb, src, destp, axis); *syncaddr = 0; return; } gasnet-2025.8.0/tests/testhip.c0000664000175000017500000003066115142313673016416 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testhip.c $ * Copyright (c) 2021, The Regents of the University of California * * Description: test of GEX_MK_CLASS_HIP * * This test verifies correctness of gex_MK_Create() for the device class * GEX_MK_CLASS_HIP. This includes checking the expected behavior of builds * both with and without configure-time enable of support for this device * class. */ #include #include #include #if GASNET_HAVE_MK_CLASS_HIP #include #endif static size_t len = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR (2*len) #endif #include #define check_hipcall(op) do { \ int _retval = (op); \ if_pf(_retval) { \ FATALERR(#op": %s(%i)", \ hipGetErrorName(_retval), \ _retval); \ } \ } while (0) static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; static gex_Rank_t myrank; static gex_Rank_t nranks; static uint8_t *cmp_buffer; #if GASNET_HAVE_MK_CLASS_HIP static int equalDH(uint8_t *d_ptr, uint8_t *h_ptr, size_t len) { hipMemcpyDtoH(cmp_buffer, (hipDeviceptr_t)d_ptr, len); int result = !memcmp(cmp_buffer, h_ptr, len); if (!result) { // Restore expected content to avoid cascading failures hipMemcpyHtoD((hipDeviceptr_t)d_ptr, h_ptr, len); } return result; } #endif #define CHECK_DEVICE(label,d_ptr,h_ptr,len) \ do { \ if (! equalDH(d_ptr,h_ptr,len)) { \ ERR(label " verification failed"); \ } else { \ MSG(label " verification passed"); \ } \ } while (0) #define CHECK_HOST(label,h_ptr1,h_ptr2,len) \ do { \ if (memcmp(h_ptr1,h_ptr2,len)) { \ ERR(label " verification failed"); \ } else { \ MSG(label " verification passed"); \ } \ } while (0) int main(int argc, char **argv) { int client_segment = 1; int seed = 0; int rc; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testhip", &argc, &argv, 0)); test_init("testhip", 0, "[options] (size) (seed)\n" " Segment allocation options:\n" " -client-seg: Test client-allocated GPU segment (default)\n" " -gasnet-seg: Test GASNet-allocated GPU segment\n" " size length of segment\n" " seed seed for PRNG\n"); int help = 0; int argi = 1; while (argc > argi) { if (!strcmp(argv[argi], "-client-seg")) { client_segment = 1; ++argi; } else if (!strcmp(argv[argi], "-gasnet-seg")) { client_segment = 0; ++argi; } else if (argv[argi][0] == '-') { help = 1; ++argi; } else break; } if (argi < argc) { len = atol(argv[argi]); ++argi; } if (len == 0) { len = 8*1024*1024; } if (argi < argc) { seed = atoi(argv[argi]); ++argi; } if (seed == 0) { seed = (((unsigned int)TIME()) & 0xFFFF); } if (argi < argc || help) test_usage(); cmp_buffer = test_malloc(len); uint8_t *loc1 = test_malloc(len); uint8_t *loc2 = test_malloc(len); uint8_t *array1 = test_malloc(len); uint8_t *array2 = test_malloc(len); myrank = gex_TM_QueryRank(myteam); nranks = gex_TM_QuerySize(myteam); gex_Rank_t peer = (myrank + 1) % nranks; if (nranks == 1) { // TODO: remove once loopback kinds works correctly MSG0("WARNING: This test requires a minimum of two nodes. Test skipped.\n"); gasnet_exit(0); // prevents false negatives, such as from test harnesses for smp-conduit } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); MSG0("Running HIP non-local xfer tests with size %lu, PRNG seed %d, and %s-allocated GPU segment", (unsigned long)len, seed, client_segment ? "client" : "GASNet"); const char *hvd = getenv("HIP_VISIBLE_DEVICES"); // Intentionally NOT gasnet_getenv() if (hvd) { MSG("HIP_VISIBLE_DEVICES='%s'", hvd); } else { MSG("HIP_VISIBLE_DEVICES is unset"); } const char *rvd = getenv("ROCR_VISIBLE_DEVICES"); // Intentionally NOT gasnet_getenv() if (rvd) { MSG("ROCR_VISIBLE_DEVICES='%s'", rvd); } else { MSG("ROCR_VISIBLE_DEVICES is unset"); } #ifdef __HIP_PLATFORM_NVIDIA__ const char *cvd = getenv("CUDA_VISIBLE_DEVICES"); // Intentionally NOT gasnet_getenv() if (cvd) { MSG("CUDA_VISIBLE_DEVICES='%s'", cvd); } else { MSG("CUDA_VISIBLE_DEVICES is unset"); } #endif TEST_BCAST(&seed, 0, &seed, sizeof(seed)); TEST_SRAND(seed); for (size_t i = 0; i < len; ++i) { unsigned int r = TEST_RAND(0,65535); array1[i] = r & 0xff; array2[i] = (r >> 8) & 0xff; } BARRIER(); gex_EP_t gpu1_ep, gpu2_ep; gex_MK_t kind; gex_MK_Create_args_t args; args.gex_flags = 0; args.gex_class = GEX_MK_CLASS_HIP; args.gex_args.gex_class_hip.gex_hipDevice = 0; #if GASNET_HAVE_MK_CLASS_HIP { if (GASNET_HAVE_MK_CLASS_MULTIPLE != 1) { ERR("Invalid GASNET_HAVE_MK_CLASS_MULTIPLE"); } test_static_assert(GASNET_MAXEPS >= 2); int count; hipInit(0); if (hipGetDeviceCount(&count) || !count) { MSG("GEX_MK_CLASS_HIP: skipped - could not find a HIP device"); // If this lack of a device is NOT a collective property, then we want // to at least balance the collective operations (to avoid hanging). // However, at least one peer will fail a gex_EP_QueryBoundSegmentNB(). // For the case all ranks lack a GPU, this test *will* exit gracefully. GASNET_Safe( gex_EP_PublishBoundSegment(myteam, NULL, 0, 0) ); GASNET_Safe( gex_EP_PublishBoundSegment(myteam, NULL, 0, 0) ); for (int i = 0; i < 4; ++i) BARRIER(); // currently exactly one per case } else { MSG("hipGetDeviceCount reports %d devices", count); uint8_t *client_gpu1 = NULL; uint8_t *client_gpu2 = NULL; if (client_segment) { hipDeviceptr_t dptr; check_hipcall( hipMalloc((void **)&dptr, TEST_SEGSZ_REQUEST) ); client_gpu1 = (uint8_t *) dptr; check_hipcall( hipMalloc((void **)&dptr, TEST_SEGSZ_REQUEST) ); client_gpu2 = (uint8_t *) dptr; } // Create and Destroy a kind kind = GEX_MK_INVALID; GASNET_Safe( gex_MK_Create(&kind, myclient, &args, 0) ); assert_always(kind != GEX_MK_INVALID); gex_MK_Destroy(kind, 0); // Create the Kind "for keeps" // TODO: if multiple devices, this should optionally create kinds using two devices kind = GEX_MK_INVALID; GASNET_Safe( gex_MK_Create(&kind, myclient, &args, 0) ); assert_always(kind != GEX_MK_INVALID); // If multiple devices are available, call hipSetDevice() to switch int curr_dev, tmp_dev; if (count > 1) { check_hipcall( hipSetDevice(1) ); curr_dev = 1; } else { curr_dev = 0; } // Create the first GPU segment gex_Segment_t d_segment1 = GEX_SEGMENT_INVALID; GASNET_Safe( gex_Segment_Create(&d_segment1, myclient, client_gpu1, TEST_SEGSZ_REQUEST, kind, 0)); uint8_t *loc_gpu1 = gex_Segment_QueryAddr(d_segment1); if (client_segment) assert_always(loc_gpu1 == client_gpu1); // Confirm the gex_Segment_Create() did NOT change the current device check_hipcall( hipGetDevice(&tmp_dev) ); assert_always(tmp_dev == curr_dev); // If GASNet performed allocation, check that it did so on the proper device if (!client_segment) { hipPointerAttribute_t attr; check_hipcall( hipPointerGetAttributes(&attr, loc_gpu1) ); assert_always(attr.device == 0); } // Create first GPU endpoint and bind its segment GASNET_Safe( gex_EP_Create(&gpu1_ep, myclient, GEX_EP_CAPABILITY_RMA, 0)); GASNET_Safe( gex_EP_BindSegment(gpu1_ep, d_segment1, 0) ); GASNET_Safe( gex_EP_PublishBoundSegment(myteam, &gpu1_ep, 1, 0) ); // Repeat to create a second local GPU segment gex_Segment_t d_segment2 = GEX_SEGMENT_INVALID; GASNET_Safe( gex_Segment_Create(&d_segment2, myclient, client_gpu2, TEST_SEGSZ_REQUEST, kind, 0)); uint8_t *loc_gpu2 = gex_Segment_QueryAddr(d_segment2); if (client_segment) assert_always(loc_gpu2 == client_gpu2); check_hipcall( hipGetDevice(&tmp_dev) ); assert_always(tmp_dev == curr_dev); if (!client_segment) { hipPointerAttribute_t attr; check_hipcall( hipPointerGetAttributes(&attr, loc_gpu2) ); assert_always(attr.device == 0); } GASNET_Safe( gex_EP_Create(&gpu2_ep, myclient, GEX_EP_CAPABILITY_RMA, 0)); GASNET_Safe( gex_EP_BindSegment(gpu2_ep, d_segment2, 0) ); GASNET_Safe( gex_EP_PublishBoundSegment(myteam, &gpu2_ep, 1, 0) ); // TM pairs for several possible pairings gex_EP_Index_t host_epidx = gex_EP_QueryIndex(myep); gex_EP_Index_t gpu1_epidx = gex_EP_QueryIndex(gpu1_ep); gex_EP_Index_t gpu2_epidx = gex_EP_QueryIndex(gpu2_ep); assert_always(host_epidx == 0); assert_always(gpu1_epidx == 1); assert_always(gpu2_epidx == 2); gex_TM_t LH_RG1 = gex_TM_Pair(myep, gpu1_epidx); gex_TM_t LH_RG2 = gex_TM_Pair(myep, gpu2_epidx); gex_TM_t LG1_RG1 = gex_TM_Pair(gpu1_ep, gpu1_epidx); gex_TM_t LG2_RG2 = gex_TM_Pair(gpu2_ep, gpu2_epidx); gex_TM_t LG1_RG2 = gex_TM_Pair(gpu1_ep, gpu2_epidx); gex_TM_t LG2_RG1 = gex_TM_Pair(gpu2_ep, gpu1_epidx); uint8_t *rem_gpu1; size_t queried_len; gex_Event_Wait( gex_EP_QueryBoundSegmentNB(LH_RG1, peer, (void**)&rem_gpu1, NULL, &queried_len, 0) ); assert_always(queried_len == TEST_SEGSZ_REQUEST); uint8_t *rem_gpu2; gex_Event_Wait( gex_EP_QueryBoundSegmentNB(LH_RG2, peer, (void**)&rem_gpu2, NULL, &queried_len, 0) ); assert_always(queried_len == TEST_SEGSZ_REQUEST); // Case 1. Puts - local host to remote gpus // BEFORE: GPU1=uninit:uninit GPU2=uninit:uninit // AFTER: GPU1=array1:uninit GPU2=array2:uninit gex_RMA_PutNBI(LH_RG1, peer, rem_gpu1, array1, len, GEX_EVENT_DEFER, 0); gex_RMA_PutNBI(LH_RG2, peer, rem_gpu2, array2, len, GEX_EVENT_DEFER, 0); gex_NBI_Wait(GEX_EC_PUT,0); BARRIER(); CHECK_DEVICE("Case 1a", loc_gpu1, array1, len); CHECK_DEVICE("Case 1b", loc_gpu2, array2, len); // Case 2. Gets - remote gpus to local host // BEFORE: GPU1=array1:uninit GPU2=array2:uninit // AFTER: GPU1=array1:uninit GPU2=array2:uninit gex_Event_t get_events[2] = { gex_RMA_GetNB(LH_RG1, loc1, peer, rem_gpu1, len, 0), gex_RMA_GetNB(LH_RG2, loc2, peer, rem_gpu2, len, 0) }; gex_Event_WaitAll(get_events, 2, 0); CHECK_HOST("Case 2a", loc1, array1, len); CHECK_HOST("Case 2b", loc2, array2, len); BARRIER(); // Case 3. Put - local gpus to remote gpus "cross over" // BEFORE: GPU1=array1:uninit GPU2=array2:uninit // AFTER: GPU1=array1:array2 GPU2=array2:array1 gex_RMA_PutBlocking(LG1_RG2, peer, rem_gpu2+len, loc_gpu1, len, 0); BARRIER(); CHECK_DEVICE("Case 3a", loc_gpu2+len, array1, len); gex_RMA_PutBlocking(LG2_RG1, peer, rem_gpu1+len, loc_gpu2, len, 0); BARRIER(); CHECK_DEVICE("Case 3b", loc_gpu1+len, array2, len); // Case 4. Get - remote gpus to local gpus // BEFORE: GPU1=array1:array2 GPU2=array2:array1 // AFTER: GPU1=array1:array1 GPU2=array2:array2 gex_RMA_GetBlocking(LG1_RG1, loc_gpu1+len, peer, rem_gpu1, len, 0); CHECK_DEVICE("Case 4a", loc_gpu1+len, array1, len); gex_RMA_GetBlocking(LG2_RG2, loc_gpu2+len, peer, rem_gpu2, len, 0); CHECK_DEVICE("Case 4b", loc_gpu2+len, array2, len); if (!test_errs) MSG("GEX_MK_CLASS_HIP: success"); } // TODO: once supported: Destroy Segments, Kinds and Endpoints; free GPU memory } #else { gex_System_SetVerboseErrors(0); int rc = gex_MK_Create(&kind, myclient, &args, 0); assert_always(rc == GASNET_ERR_BAD_ARG); MSG("GEX_MK_CLASS_HIP: correct failure due to missing support"); } #endif // Just to ensure these exist: args.gex_class = GEX_MK_CLASS_HOST; kind = GEX_MK_HOST; test_free(array2); test_free(array1); test_free(loc2); test_free(loc1); test_free(cmp_buffer); MSG("done."); BARRIER(); gasnet_exit(0); return 0; } gasnet-2025.8.0/tests/testcore2.c0000664000175000017500000010077515142313673016654 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testcore2.c $ * Copyright 2007, Dan Bonachea * Terms of use are as specified in license.txt * * Description: GASNet Core checksum test * This stress tests the ability of the core to successfully send * AM Requests/Replies (fixed- and negotiated-payload) with correct data delivery * testing is run 'iters' times with Medium/Long payload sizes ranging from 1..'max_payload', * with up to 'depth' AMs in-flight from a given node at any moment * */ #include // for size_t #include #include size_t max_payload = 0; int depth = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR ((uintptr_t)max_payload*depth*5) #endif #include "test.h" static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int myproc; int peerproc; int fromproc; int numprocs; int iters = 0; unsigned int seed = 0; size_t maxmed; size_t maxlong; size_t least_payload_req_med_client; size_t least_payload_req_med_alloc; size_t least_payload_rep_med_client; size_t least_payload_rep_med_alloc; size_t least_payload_req_long_client; size_t least_payload_req_long_alloc; size_t least_payload_rep_long_client; size_t least_payload_rep_long_alloc; size_t *all_sizes; volatile int done = 0; int allowretry = 1; uint8_t *myseg; /* my segment */ int doinseg = 1; int dooutseg = 1; #define INSEG(iter) ((doinseg&&dooutseg)?(iter&0x1):doinseg) #define ITERSEG(iter) (INSEG(iter)?localseg:privateseg) uint8_t *peerreqseg; /* long request landing zone */ uint8_t *peerrepseg; /* long reply landing zone */ uint8_t *localseg; uint8_t *privateseg; uint8_t *longreplysrc; // Division of AM argument into two bit fields. // Note that 8 would probably be more than sufficient for either. #define CHUNK_BITS 16 #define SZ_BITS 16 test_static_assert_file((CHUNK_BITS + SZ_BITS) <= 32); // Test three injection modes #define INJMODE(iter) ((iter)%3) #define INJ_FP 0 #define INJ_NP_CB 1 #define INJ_NP_GB 2 GASNETT_THREADKEY_DECLARE(mythread); GASNETT_THREADKEY_DEFINE(mythread); #define ELEM_VALUE(iter,chunkidx,elemidx) \ ((((uint8_t)(iter)&0x3) << 6) | (((uint8_t)(chunkidx)&0x3) << 4) | (((uint8_t)(elemidx))&0xF)) void init_chunk(uint8_t *buf, size_t sz, int iter, int chunkidx) { size_t elemidx; for (elemidx = 0; elemidx < sz; elemidx++) { buf[chunkidx*sz+elemidx] = ELEM_VALUE(iter,chunkidx,elemidx); } } void validate_chunk(const char *context, uint8_t *buf, size_t sz, int iter, int chunkidx) { size_t elemidx; int errcnt = 0; int doretry = 0; retry: for (elemidx = 0; elemidx < sz; elemidx++) { uint8_t actual = buf[elemidx]; uint8_t expected = ELEM_VALUE(iter,chunkidx,elemidx); if (actual != expected) { int id = (uintptr_t)gasnett_threadkey_get(mythread); ERR("TH%i data mismatch at sz=%i iter=%i chunk=%i elem=%i : actual=%02x expected=%02x in %s", id, (int)sz,iter,chunkidx,(int)elemidx, (unsigned int)actual,(unsigned int)expected, context); errcnt++; } } if (errcnt && allowretry && !doretry) { doretry = 1; errcnt = 0; sleep(1); goto retry; } else if (doretry) { if (errcnt == 0) MSG("retry DID clear errors"); else MSG("retry DID NOT clear errors"); } } size_t MIN4(size_t a, size_t b, size_t c, size_t d) { size_t x1 = MIN(a,b); size_t x2 = MIN(c,d); return MIN(x1,x2); } /* Test handlers */ #define hidx_ping_medhandler 203 #define hidx_pong_medhandler 204 #define hidx_ping_longhandler 205 #define hidx_pong_longhandler 206 gasnett_atomic_t pong_recvd; #define INIT_CHECKS(is_req) do { \ assert_always(test_msgsource(token) == (is_req ? fromproc \ : peerproc)); \ assert_always(iter < iters); \ assert_always(nbytes <= max_payload); \ } while (0) void ping_medhandler(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t iter, gex_AM_Arg_t arg1) { INIT_CHECKS(1); int chunkidx = arg1 & ((1<= least_payload); assert(gex_AM_SrcDescSize(sd) <= most_payload); assert(gex_AM_SrcDescAddr(sd) == buf); if (TEST_RAND_ONEIN(8)) { GASNET_Safe( gex_AM_CancelReplyMedium(sd, 0) ); goto retry; } len = MIN(len, gex_AM_SrcDescSize(sd)); if (TEST_RAND_ONEIN(4)) { imm_commit = gex_AM_CommitReplyMedium2_v2(sd, hidx_pong_medhandler, len, GEX_FLAG_IMMEDIATE, iter, arg1); if (imm_commit && TEST_RAND_ONEIN(2)) { imm_commit = gex_AM_CommitReplyMedium2_v2(sd, hidx_pong_medhandler, len, 0, iter, arg1); assert(! imm_commit); } } else { gex_AM_CommitReplyMedium2(sd, hidx_pong_medhandler, len, iter, arg1); } break; case INJ_NP_GB: // Negotiated-payload without client-provided buffer sd = gex_AM_PrepareReplyMedium(token, NULL, least_payload, most_payload, NULL, flags, 2); imm = (sd == GEX_AM_SRCDESC_NO_OP); // IMMEDIATE was NO OP if (imm) break; assert(gex_AM_SrcDescSize(sd) >= least_payload); assert(gex_AM_SrcDescSize(sd) <= most_payload); if (TEST_RAND_ONEIN(8)) { GASNET_Safe( gex_AM_CancelReplyMedium(sd, 0) ); goto retry; } len = MIN(len, gex_AM_SrcDescSize(sd)); memcpy(gex_AM_SrcDescAddr(sd), buf, len); if (TEST_RAND_ONEIN(4)) { imm_commit = gex_AM_CommitReplyMedium2_v2(sd, hidx_pong_medhandler, len, GEX_FLAG_IMMEDIATE, iter, arg1); if (imm_commit && TEST_RAND_ONEIN(2)) { imm_commit = gex_AM_CommitReplyMedium2_v2(sd, hidx_pong_medhandler, len, 0, iter, arg1); assert(! imm_commit); } } else { gex_AM_CommitReplyMedium2(sd, hidx_pong_medhandler, len, iter, arg1); } break; } if (imm) { assert(flags & GEX_FLAG_IMMEDIATE); flags &= ~GEX_FLAG_IMMEDIATE; goto retry; } if (imm_commit) { GASNET_Safe( gex_AM_CancelReplyMedium(sd, 0) ); goto retry; } if ((injmode != INJ_NP_GB) && TEST_RAND_ONEIN(5)) { memset(buf, 0xaa, len); } else { validate_chunk("Medium Request (post-reply)", buf, nbytes, iter, arg1); } } void pong_medhandler(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t iter, gex_AM_Arg_t arg1) { INIT_CHECKS(0); int chunkidx = arg1 & ((1<> CHUNK_BITS]; validate_chunk("Long Request", buf, nbytes, iter, chunkidx); gex_AM_SrcDesc_t sd; uint8_t *srcbuf = INSEG(iter) ? buf : longreplysrc+chunkidx*curr_sz; uint8_t *dstbuf = peerrepseg+chunkidx*curr_sz; gex_Flags_t flags = TEST_RAND_ONEIN(5) ? GEX_FLAG_IMMEDIATE : 0; void * maybe_dest = TEST_RAND_ONEIN(2) ? dstbuf : NULL; // Passing dest_addr to Prepare is optional size_t most_payload = TEST_RAND(nbytes, 2*nbytes); int injmode = INJMODE(iter); // [0..2] size_t max_least_payload = (injmode == 1) ? least_payload_rep_long_client : least_payload_rep_long_alloc; size_t least_payload = TEST_RAND(MIN(nbytes, max_least_payload), MIN(most_payload, max_least_payload)); size_t len = TEST_RAND(nbytes - nbytes/2, nbytes); retry: ; int imm = 0; int imm_commit = 0; switch (injmode) { // [0..2] case INJ_FP: // Fixed-payload if (srcbuf != buf) memcpy(srcbuf, buf, len); imm = gex_AM_ReplyLong2(token, hidx_pong_longhandler, srcbuf, len, dstbuf, GEX_EVENT_NOW, flags, iter, arg1); break; case INJ_NP_CB: // Negotiated-payload with client-provided buffer // TODO: (lc_opt = &event) is legal, but we lack logic to test/wait outside handler context // additionally, we could not safely send buf with async LC sd = gex_AM_PrepareReplyLong(token, srcbuf, least_payload, most_payload, maybe_dest, GEX_EVENT_NOW, flags, 2); imm = (sd == GEX_AM_SRCDESC_NO_OP); // IMMEDIATE was NO OP if (imm) break; assert(gex_AM_SrcDescSize(sd) >= least_payload); assert(gex_AM_SrcDescSize(sd) <= most_payload); assert(gex_AM_SrcDescAddr(sd) == srcbuf); if (TEST_RAND_ONEIN(8)) { GASNET_Safe( gex_AM_CancelReplyLong(sd, 0) ); goto retry; } len = MIN(len, gex_AM_SrcDescSize(sd)); if (srcbuf != buf) memcpy(srcbuf, buf, len); // according to INSEG - not due to Prepare if (TEST_RAND_ONEIN(4)) { imm_commit = gex_AM_CommitReplyLong2_v2(sd, hidx_pong_longhandler, len, dstbuf, GEX_FLAG_IMMEDIATE, iter, arg1); if (imm_commit && TEST_RAND_ONEIN(2)) { imm_commit = gex_AM_CommitReplyLong2_v2(sd, hidx_pong_longhandler, len, dstbuf, 0, iter, arg1); assert(! imm_commit); } } else { gex_AM_CommitReplyLong2(sd, hidx_pong_longhandler, len, dstbuf, iter, arg1); } break; case INJ_NP_GB: // Negotiated-payload without client-provided buffer sd = gex_AM_PrepareReplyLong(token, NULL, least_payload, most_payload, maybe_dest, NULL, flags, 2); imm = (sd == GEX_AM_SRCDESC_NO_OP); // IMMEDIATE was NO OP if (imm) break; assert(gex_AM_SrcDescSize(sd) >= least_payload); assert(gex_AM_SrcDescSize(sd) <= most_payload); if (TEST_RAND_ONEIN(8)) { GASNET_Safe( gex_AM_CancelReplyLong(sd, 0) ); goto retry; } len = MIN(len, gex_AM_SrcDescSize(sd)); memcpy(gex_AM_SrcDescAddr(sd), buf, len); if (TEST_RAND_ONEIN(4)) { imm_commit = gex_AM_CommitReplyLong2_v2(sd, hidx_pong_longhandler, len, dstbuf, GEX_FLAG_IMMEDIATE, iter, arg1); if (imm_commit && TEST_RAND_ONEIN(2)) { imm_commit = gex_AM_CommitReplyLong2_v2(sd, hidx_pong_longhandler, len, dstbuf, 0, iter, arg1); assert(! imm_commit); } } else { gex_AM_CommitReplyLong2(sd, hidx_pong_longhandler, len, dstbuf, iter, arg1); } break; } if (imm) { assert(flags & GEX_FLAG_IMMEDIATE); flags &= ~GEX_FLAG_IMMEDIATE; goto retry; } if (imm_commit) { GASNET_Safe( gex_AM_CancelReplyLong(sd, 0) ); goto retry; } if ((injmode != INJ_NP_GB) && !INSEG(iter) && TEST_RAND_ONEIN(5)) { memset(srcbuf, 0x55, len); } } void pong_longhandler(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t iter, gex_AM_Arg_t arg1) { INIT_CHECKS(0); int chunkidx = arg1 & ((1< arg) { if (!strcmp(argv[arg], "-p")) { doprime = 1; ++arg; } else if (!strcmp(argv[arg], "-u")) { dosizesync = 0; ++arg; } else if (!strcmp(argv[arg], "-s")) { domultith = 0; ++arg; } else if (!strcmp(argv[arg], "-n")) { allowretry = 0; ++arg; } else if (!strcmp(argv[arg], "-in")) { doinseg = 1; dooutseg = 0; ++arg; } else if (!strcmp(argv[arg], "-out")) { doinseg = 0; dooutseg = 1; ++arg; } else if (!strcmp(argv[arg], "-m")) { AMOPT(); domed = 1; ++arg; } else if (!strcmp(argv[arg], "-l")) { AMOPT(); dolong = 1; ++arg; } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (argc > arg) { iters = atoi(argv[arg]); arg++; } if (!iters) iters = 30; if (argc > arg) { max_payload = atoi(argv[arg]); arg++; } if (!max_payload) max_payload = 1024*1024; if (argc > arg) { depth = atoi(argv[arg]); arg++; } if (!depth) depth = 16; depth = MIN(depth, (1< arg) { seed = atoi(argv[arg]); ++arg; } /* limit max_payload to largest allowed with 2 arguments */ maxmed = MIN4(gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,2), gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,GEX_FLAG_IMMEDIATE,2), gex_AM_MaxReplyMedium (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,2), gex_AM_MaxReplyMedium (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,GEX_FLAG_IMMEDIATE,2)); maxlong = MIN4(gex_AM_MaxRequestLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,2), gex_AM_MaxRequestLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,GEX_FLAG_IMMEDIATE,2), gex_AM_MaxReplyLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,2), gex_AM_MaxReplyLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,GEX_FLAG_IMMEDIATE,2)); max_payload = MIN(max_payload,MAX(maxmed,maxlong)); if (!domed) max_payload = MIN(max_payload, maxlong); if (!dolong) max_payload = MIN(max_payload, maxmed); /* largest least_payload values */ gex_Flags_t f1 = GEX_FLAG_AM_PREPARE_LEAST_CLIENT; gex_Flags_t f2 = GEX_FLAG_AM_PREPARE_LEAST_ALLOC; least_payload_req_med_client = MIN( gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f1,2), gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f1|GEX_FLAG_IMMEDIATE,2)); least_payload_req_med_alloc = MIN( gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f2,2), gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f2|GEX_FLAG_IMMEDIATE,2)); least_payload_rep_med_client = MIN( gex_AM_MaxReplyMedium (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f1,2), gex_AM_MaxReplyMedium (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f1|GEX_FLAG_IMMEDIATE,2)); least_payload_rep_med_alloc = MIN( gex_AM_MaxReplyMedium (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f2,2), gex_AM_MaxReplyMedium (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f2|GEX_FLAG_IMMEDIATE,2)); least_payload_req_long_client = MIN( gex_AM_MaxRequestLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f1,2), gex_AM_MaxRequestLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f1|GEX_FLAG_IMMEDIATE,2)); least_payload_req_long_alloc = MIN( gex_AM_MaxRequestLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f2,2), gex_AM_MaxRequestLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f2|GEX_FLAG_IMMEDIATE,2)); least_payload_rep_long_client = MIN( gex_AM_MaxReplyLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f1,2), gex_AM_MaxReplyLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f1|GEX_FLAG_IMMEDIATE,2)); least_payload_rep_long_alloc = MIN( gex_AM_MaxReplyLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f2,2), gex_AM_MaxReplyLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,f2|GEX_FLAG_IMMEDIATE,2)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testcore2",0,"[options] (iters) (max_payload) (depth) (seed)\n" " -m test AMMedium (defaults to all types)\n" " -l test AMLong (defaults to all types)\n" " -p prime the AMLong transfer areas with puts, to encourage pinning\n" " -u loosen sychronization to allow diff payload sizes to be in flight at once\n" " -s single-threaded PAR mode (default is to start a polling thread in PAR mode)\n" " -n no retry on failure\n" " -in/-out use only in- or out-of-segment sources for AMLong (default is both)\n" ); if (help || argc > arg) test_usage(); TEST_PRINT_CONDUITINFO(); /* get SPMD info */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); if (seed == 0) { seed = (((unsigned int)TIME()) & 0xFFFF); TEST_BCAST(&seed, 0, &seed, sizeof(seed)); } TEST_SRAND(seed+myproc); if (numprocs%2) { // w/ odd # of ranks, last one talks to self int last = numprocs - 1; if (myproc == last) { peerproc = fromproc = myproc; } else { peerproc = (myproc + 1) % last; fromproc = (myproc + last - 1) % last; } } else { peerproc = (myproc + 1) % numprocs; fromproc = (myproc + numprocs - 1) % numprocs; } myseg = TEST_MYSEG(); peerreqseg = TEST_SEG(peerproc); peerrepseg = (uint8_t*)TEST_SEG(fromproc) + max_payload*depth*2; localseg = myseg + max_payload*depth*4; assert_always(TEST_SEGSZ >= max_payload*depth*5); privateseg = test_malloc(max_payload*depth*2); /* out-of-seg request src, long reply src */ longreplysrc = privateseg+max_payload*depth; #ifdef GASNET_PAR if (domultith) test_createandjoin_pthreads(2,doit,NULL,0); else #endif doit(0); BARRIER(); test_free(privateseg); MSG("done. (detected %i errs)", test_errs); gasnet_exit(test_errs > 0 ? 1 : 0); return 0; } void *doit(void *id) { gasnett_threadkey_set(mythread,id); if ((uintptr_t)id != 0) { /* additional threads polling, to encourage handler concurrency */ while (!done) { gasnet_AMPoll(); gasnett_sched_yield(); } return 0; } MSG0("Running %sAM%s%s%s correctness test %s%swith %i iterations, max_payload=%" PRIu64 ", depth=%i, seed=%u ...", #if GASNET_PAR (domultith?"multi-threaded ":"single-threaded "), #else "", #endif (amopt?(domed?" Medium":""):""),(amopt?(dolong?" Long":""):""), ((doinseg^dooutseg)?(doinseg?" in-segment":" out-of-segment"):""), (dosizesync?"":"loosely-synced "), (doprime?"with priming ":""), iters,(uint64_t)max_payload,depth,seed); BARRIER(); if (doprime) { /* issue some initial puts that cover the Long regions, to try and trigger dynamic pinning */ int chunkidx; for (chunkidx = 0; chunkidx < depth; chunkidx++) { /* AMRequestLong primer */ gex_RMA_PutBlocking(myteam, peerproc, peerreqseg+chunkidx*max_payload, privateseg+chunkidx*max_payload, max_payload, 0); gex_RMA_PutBlocking(myteam, peerproc, peerreqseg+chunkidx*max_payload, localseg+chunkidx*max_payload, max_payload, 0); /* AMReplyLong primer */ gex_RMA_PutBlocking(myteam, peerproc, peerrepseg+chunkidx*max_payload, myseg+chunkidx*max_payload, max_payload, 0); gex_RMA_PutBlocking(myteam, peerproc, peerrepseg+chunkidx*max_payload, longreplysrc+chunkidx*max_payload, max_payload, 0); } BARRIER(); } // Build sorted array of sizes int num_sz = 3; // maxmed, maxlong and max_payload for (size_t sz = max_payload; sz; sz >>= 1) { ++num_sz; } all_sizes = test_calloc(num_sz, sizeof(size_t)); { size_t max1 = MIN(max_payload, MIN(maxmed, maxlong)); size_t max2 = MIN(max_payload, MAX(maxmed, maxlong)); int i = 0; size_t save_sz = 1; for (size_t sz = 1; sz <= max_payload; ) { all_sizes[i++] = sz; assert(i <= num_sz); /* double sz each time, but make sure to also exactly hit MaxMedium, MaxLong and max payload */ size_t next_sz = save_sz * 2; if (sz < max1 && next_sz > max1) sz = max1; else if (sz < max2 && next_sz > max2) sz = max2; else if (sz < max_payload && next_sz > max_payload) sz = max_payload; else { sz = save_sz = next_sz; } } num_sz = i; } assert_always(num_sz < (1<= least_payload); assert(gex_AM_SrcDescSize(sd) <= most_payload); assert(gex_AM_SrcDescAddr(sd) == src); if (TEST_RAND_ONEIN(8)) { GASNET_Safe( gex_AM_CancelRequestMedium(sd, 0) ); goto retry_med; } len = MIN(len, gex_AM_SrcDescSize(sd)); if (TEST_RAND_ONEIN(4)) { imm_commit = gex_AM_CommitRequestMedium2_v2(sd, hidx_ping_medhandler, len, GEX_FLAG_IMMEDIATE, iter, arg1); if (imm_commit && TEST_RAND_ONEIN(2)) { imm_commit = gex_AM_CommitRequestMedium2_v2(sd, hidx_ping_medhandler, len, 0, iter, arg1); assert(! imm_commit); } } else { gex_AM_CommitRequestMedium2(sd, hidx_ping_medhandler, len, iter, arg1); } if (imm_commit) { // nothing to wait for } else if (lc_opt == GEX_EVENT_GROUP) { gex_NBI_Wait(GEX_EC_AM,0); } else if (lc_opt != GEX_EVENT_NOW) { (void)gex_Event_QueryLeaf(lc, GEX_EC_LC); // should fail if not a root event gex_Event_Wait(lc); } break; } case INJ_NP_GB: // Negotiated-payload without client-provided buffer sd = gex_AM_PrepareRequestMedium(myteam, peerproc, NULL, least_payload, most_payload, NULL, flags, 2); imm = (sd == GEX_AM_SRCDESC_NO_OP); // IMMEDIATE was NO OP if (imm) break; assert(gex_AM_SrcDescSize(sd) >= least_payload); assert(gex_AM_SrcDescSize(sd) <= most_payload); if (TEST_RAND_ONEIN(8)) { GASNET_Safe( gex_AM_CancelRequestMedium(sd, 0) ); goto retry_med; } len = MIN(len, gex_AM_SrcDescSize(sd)); memcpy(gex_AM_SrcDescAddr(sd), srcbuf, len); if (TEST_RAND_ONEIN(4)) { imm_commit = gex_AM_CommitRequestMedium2_v2(sd, hidx_ping_medhandler, len, GEX_FLAG_IMMEDIATE, iter, arg1); if (imm_commit && TEST_RAND_ONEIN(2)) { imm_commit = gex_AM_CommitRequestMedium2_v2(sd, hidx_ping_medhandler, len, 0, iter, arg1); assert(! imm_commit); } } else { gex_AM_CommitRequestMedium2(sd, hidx_ping_medhandler, len, iter, arg1); } break; } if (imm) { assert(flags & GEX_FLAG_IMMEDIATE); flags &= ~GEX_FLAG_IMMEDIATE; goto retry_med; } if (imm_commit) { GASNET_Safe( gex_AM_CancelRequestMedium(sd, 0) ); goto retry_med; } if (src == tmpbuf) memset(tmpbuf, 0xa5, len); // overwrite source } /* wait for completion */ GASNET_BLOCKUNTIL(gasnett_atomic_read(&pong_recvd,0) == depth); } if (sz <= maxlong) { if (dolong) { /* test Long AMs */ gasnett_atomic_set(&pong_recvd,0,0); for (chunkidx = 0; chunkidx < depth; chunkidx++) { gex_AM_Arg_t arg1 = chunkidx | (sz_idx << CHUNK_BITS); gex_AM_SrcDesc_t sd; void *srcbuf = srcseg+chunkidx*sz; void *dstbuf = peerreqseg+chunkidx*sz; gex_Flags_t flags = TEST_RAND_ONEIN(5) ? GEX_FLAG_IMMEDIATE : 0; void * maybe_dest = TEST_RAND_ONEIN(2) ? dstbuf : NULL; // Passing dest_addr to Prepare is optional size_t most_payload = TEST_RAND(sz, 2*sz); int injmode = INJMODE(iter); // [0..2] size_t max_least_payload = (injmode == INJ_NP_CB) ? least_payload_req_long_client : least_payload_req_long_alloc; size_t least_payload = TEST_RAND(MIN(sz - sz/2, max_least_payload), MIN(most_payload, max_least_payload)); size_t len = TEST_RAND(sz - sz/2, sz); uint8_t *src = srcbuf; if ((injmode != INJ_NP_GB) && TEST_RAND_ONEIN(5)) { memcpy(tmpbuf, srcbuf, len); src = tmpbuf; } retry_long: ; int imm = 0; int imm_commit = 0; switch (injmode) { // [0..2] case INJ_FP: // Fixed-payload imm = gex_AM_RequestLong2(myteam, peerproc, hidx_ping_longhandler, src, len, dstbuf, GEX_EVENT_NOW, flags, iter, arg1); break; case INJ_NP_CB: // Negotiated-payload with client-provided buffer { gex_Event_t lc = GEX_EVENT_NO_OP; gex_Event_t *lc_opt = NULL; switch (TEST_RAND(0,2)) { case 0: lc_opt = &lc; break; case 1: lc_opt = GEX_EVENT_NOW; break; case 2: lc_opt = GEX_EVENT_GROUP; break; } sd = gex_AM_PrepareRequestLong(myteam, peerproc, src, least_payload, most_payload, maybe_dest, lc_opt, flags, 2); imm = (sd == GEX_AM_SRCDESC_NO_OP); // IMMEDIATE was NO OP if (imm) break; assert(gex_AM_SrcDescSize(sd) >= least_payload); assert(gex_AM_SrcDescSize(sd) <= most_payload); assert(gex_AM_SrcDescAddr(sd) == src); if (TEST_RAND_ONEIN(8)) { GASNET_Safe( gex_AM_CancelRequestLong(sd, 0) ); goto retry_long; } len = MIN(len, gex_AM_SrcDescSize(sd)); if (TEST_RAND_ONEIN(4)) { imm_commit = gex_AM_CommitRequestLong2_v2(sd, hidx_ping_longhandler, len, dstbuf, GEX_FLAG_IMMEDIATE, iter, arg1); if (imm_commit && TEST_RAND_ONEIN(2)) { imm_commit = gex_AM_CommitRequestLong2_v2(sd, hidx_ping_longhandler, len, dstbuf, 0, iter, arg1); assert(! imm_commit); } } else { gex_AM_CommitRequestLong2(sd, hidx_ping_longhandler, len, dstbuf, iter, arg1); } if (imm_commit) { // nothing to wait for } else if (lc_opt == GEX_EVENT_GROUP) { gex_NBI_Wait(GEX_EC_AM,0); } else if (lc_opt != GEX_EVENT_NOW) { (void)gex_Event_QueryLeaf(lc, GEX_EC_LC); // should fail if not a root event gex_Event_Wait(lc); } break; } case INJ_NP_GB: // Negotiated-payload without client-provided buffer sd = gex_AM_PrepareRequestLong(myteam, peerproc, NULL, least_payload, most_payload, maybe_dest, NULL, flags, 2); imm = (sd == GEX_AM_SRCDESC_NO_OP); // IMMEDIATE was NO OP if (imm) break; assert(gex_AM_SrcDescSize(sd) >= least_payload); assert(gex_AM_SrcDescSize(sd) <= most_payload); if (TEST_RAND_ONEIN(8)) { GASNET_Safe( gex_AM_CancelRequestLong(sd, 0) ); goto retry_long; } len = MIN(len, gex_AM_SrcDescSize(sd)); memcpy(gex_AM_SrcDescAddr(sd), srcbuf, len); if (TEST_RAND_ONEIN(4)) { imm_commit = gex_AM_CommitRequestLong2_v2(sd, hidx_ping_longhandler, len, dstbuf, GEX_FLAG_IMMEDIATE, iter, arg1); if (imm_commit && TEST_RAND_ONEIN(2)) { imm_commit = gex_AM_CommitRequestLong2_v2(sd, hidx_ping_longhandler, len, dstbuf, 0, iter, arg1); assert(! imm_commit); } } else { gex_AM_CommitRequestLong2(sd, hidx_ping_longhandler, len, dstbuf, iter, arg1); } break; } if (imm) { assert(flags & GEX_FLAG_IMMEDIATE); flags &= ~GEX_FLAG_IMMEDIATE; goto retry_long; } if (imm_commit) { GASNET_Safe( gex_AM_CancelRequestLong(sd, 0) ); goto retry_long; } if (src == tmpbuf) memset(tmpbuf, 0x5a, len); // overwrite source } /* wait for completion */ GASNET_BLOCKUNTIL(gasnett_atomic_read(&pong_recvd,0) == depth); } } } } test_free(tmpbuf); BARRIER(); done = 1; return(0); } gasnet-2025.8.0/tests/testcudauva.c0000664000175000017500000003127115142313673017264 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testcudauva.c $ * Copyright (c) 2021, The Regents of the University of California * * Description: test of GEX_MK_CLASS_CUDA_UVA * * This test verifies correctness of gex_MK_Create() for the device class * GEX_MK_CLASS_CUDA_UVA. This includes checking the expected behavior of * builds both with and without configure-time enable of support for this * device class. */ #include #include #include #if GASNET_HAVE_MK_CLASS_CUDA_UVA #include #endif static size_t len = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR (2*len) #endif #include #define check_cudacall(op) do { \ int _retval = (op); \ if_pf(_retval) { \ const char *_errorname; \ cuGetErrorName(_retval, &_errorname); \ FATALERR(#op": %s(%i)",_errorname,_retval); \ } \ } while (0) static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; static gex_Rank_t myrank; static gex_Rank_t nranks; static uint8_t *cmp_buffer; #if GASNET_HAVE_MK_CLASS_CUDA_UVA static int equalDH(uint8_t *d_ptr, uint8_t *h_ptr, size_t len) { cuMemcpyDtoH(cmp_buffer, (CUdeviceptr)d_ptr, len); int result = !memcmp(cmp_buffer, h_ptr, len); if (!result) { // Restore expected content to avoid cascading failures cuMemcpyHtoD((CUdeviceptr)d_ptr, h_ptr, len); } return result; } #endif #define CHECK_DEVICE(label,d_ptr,h_ptr,len) \ do { \ if (! equalDH(d_ptr,h_ptr,len)) { \ ERR(label " verification failed"); \ } else { \ MSG(label " verification passed"); \ } \ } while (0) #define CHECK_HOST(label,h_ptr1,h_ptr2,len) \ do { \ if (memcmp(h_ptr1,h_ptr2,len)) { \ ERR(label " verification failed"); \ } else { \ MSG(label " verification passed"); \ } \ } while (0) int main(int argc, char **argv) { int client_segment = 1; int seed = 0; int rc; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testcudauva", &argc, &argv, 0)); test_init("testcudauva", 0, "[options] (size) (seed)\n" " Segment allocation options:\n" " -client-seg: Test client-allocated GPU segment (default)\n" " -gasnet-seg: Test GASNet-allocated GPU segment\n" " size length of segment\n" " seed seed for PRNG\n"); int help = 0; int argi = 1; while (argc > argi) { if (!strcmp(argv[argi], "-client-seg")) { client_segment = 1; ++argi; } else if (!strcmp(argv[argi], "-gasnet-seg")) { client_segment = 0; ++argi; } else if (argv[argi][0] == '-') { help = 1; ++argi; } else break; } if (argi < argc) { len = atol(argv[argi]); ++argi; } if (len == 0) { len = 8*1024*1024; } if (argi < argc) { seed = atoi(argv[argi]); ++argi; } if (seed == 0) { seed = (((unsigned int)TIME()) & 0xFFFF); } if (argi < argc || help) test_usage(); cmp_buffer = test_malloc(len); uint8_t *loc1 = test_malloc(len); uint8_t *loc2 = test_malloc(len); uint8_t *array1 = test_malloc(len); uint8_t *array2 = test_malloc(len); myrank = gex_TM_QueryRank(myteam); nranks = gex_TM_QuerySize(myteam); gex_Rank_t peer = (myrank + 1) % nranks; if (nranks == 1) { // TODO: remove once loopback kinds works correctly MSG0("WARNING: This test requires a minimum of two nodes. Test skipped.\n"); gasnet_exit(0); // prevents false negatives, such as from test harnesses for smp-conduit } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); MSG0("Running CUDA UVA non-local xfer tests with size %lu, PRNG seed %d, and %s-allocated GPU segment", (unsigned long)len, seed, client_segment ? "client" : "GASNet"); const char *cvd = getenv("CUDA_VISIBLE_DEVICES"); // Intentionally NOT gasnet_getenv() if (cvd) { MSG("CUDA_VISIBLE_DEVICES='%s'", cvd); } else { MSG("CUDA_VISIBLE_DEVICES is unset"); } const char *nvd = getenv("NVIDIA_VISIBLE_DEVICES"); // Intentionally NOT gasnet_getenv() if (nvd) { MSG("NVIDIA_VISIBLE_DEVICES='%s'", nvd); } else { MSG("NVIDIA_VISIBLE_DEVICES is unset"); } TEST_BCAST(&seed, 0, &seed, sizeof(seed)); TEST_SRAND(seed); for (size_t i = 0; i < len; ++i) { unsigned int r = TEST_RAND(0,65535); array1[i] = r & 0xff; array2[i] = (r >> 8) & 0xff; } BARRIER(); gex_EP_t gpu1_ep, gpu2_ep; gex_MK_t kind; gex_MK_Create_args_t args; args.gex_flags = 0; args.gex_class = GEX_MK_CLASS_CUDA_UVA; args.gex_args.gex_class_cuda_uva.gex_CUdevice = 0; #if GASNET_HAVE_MK_CLASS_CUDA_UVA { if (GASNET_HAVE_MK_CLASS_MULTIPLE != 1) { ERR("Invalid GASNET_HAVE_MK_CLASS_MULTIPLE"); } test_static_assert(GASNET_MAXEPS >= 2); int count; cuInit(0); if (cuDeviceGetCount(&count) || !count) { MSG("GEX_MK_CLASS_CUDA_UVA: skipped - could not find a CUDA device"); // If this lack of a device is NOT a collective property, then we want // to at least balance the collective operations (to avoid hanging). // However, at least one peer will fail a gex_EP_QueryBoundSegmentNB(). // For the case all ranks lack a GPU, this test *will* exit gracefully. GASNET_Safe( gex_EP_PublishBoundSegment(myteam, NULL, 0, 0) ); GASNET_Safe( gex_EP_PublishBoundSegment(myteam, NULL, 0, 0) ); for (int i = 0; i < 4; ++i) BARRIER(); // currently exactly one per case } else { MSG("cuDeviceGetCount reports %d devices", count); CUcontext ctx; check_cudacall( cuDevicePrimaryCtxRetain(&ctx, 0) ); check_cudacall( cuCtxPushCurrent(ctx) ); CUdevice dev; check_cudacall( cuCtxGetDevice(&dev) ); uint8_t *client_gpu1 = NULL; uint8_t *client_gpu2 = NULL; if (client_segment) { CUdeviceptr dptr; check_cudacall( cuMemAlloc(&dptr, TEST_SEGSZ_REQUEST) ); client_gpu1 = (uint8_t *) dptr; check_cudacall( cuMemAlloc(&dptr, TEST_SEGSZ_REQUEST) ); client_gpu2 = (uint8_t *) dptr; } // Create and Destroy a kind kind = GEX_MK_INVALID; GASNET_Safe( gex_MK_Create(&kind, myclient, &args, 0) ); assert_always(kind != GEX_MK_INVALID); gex_MK_Destroy(kind, 0); // Create the Kind "for keeps" // TODO: if multiple devices, this should optionally create kinds using two devices kind = GEX_MK_INVALID; GASNET_Safe( gex_MK_Create(&kind, myclient, &args, 0) ); assert_always(kind != GEX_MK_INVALID); // If multiple devices are available switch to context on another CUcontext curr_ctx, tmp_ctx; if (count > 1) { check_cudacall( cuDevicePrimaryCtxRetain(&curr_ctx, 1) ); check_cudacall( cuCtxPushCurrent(curr_ctx) ); } else { curr_ctx = ctx; } // Create the first GPU segment gex_Segment_t d_segment1 = GEX_SEGMENT_INVALID; GASNET_Safe( gex_Segment_Create(&d_segment1, myclient, client_gpu1, TEST_SEGSZ_REQUEST, kind, 0)); uint8_t *loc_gpu1 = gex_Segment_QueryAddr(d_segment1); if (client_segment) assert_always(loc_gpu1 == client_gpu1); // Confirm the gex_Segment_Create() did NOT change the current context check_cudacall( cuCtxGetCurrent(&tmp_ctx) ); assert_always(tmp_ctx == curr_ctx); // If GASNet performed allocation, check that it did so on the proper context if (!client_segment) { check_cudacall( cuPointerGetAttribute(&tmp_ctx, CU_POINTER_ATTRIBUTE_CONTEXT, (CUdeviceptr)loc_gpu1) ); assert_always(tmp_ctx == ctx); } // Create first GPU endpoint and bind its segment GASNET_Safe( gex_EP_Create(&gpu1_ep, myclient, GEX_EP_CAPABILITY_RMA, 0)); GASNET_Safe( gex_EP_BindSegment(gpu1_ep, d_segment1, 0) ); GASNET_Safe( gex_EP_PublishBoundSegment(myteam, &gpu1_ep, 1, 0) ); // Repeat to create a second local GPU segment gex_Segment_t d_segment2 = GEX_SEGMENT_INVALID; GASNET_Safe( gex_Segment_Create(&d_segment2, myclient, client_gpu2, TEST_SEGSZ_REQUEST, kind, 0)); uint8_t *loc_gpu2 = gex_Segment_QueryAddr(d_segment2); if (client_segment) assert_always(loc_gpu2 == client_gpu2); check_cudacall( cuCtxGetCurrent(&tmp_ctx) ); assert_always(tmp_ctx == curr_ctx); if (!client_segment) { check_cudacall( cuPointerGetAttribute(&tmp_ctx, CU_POINTER_ATTRIBUTE_CONTEXT, (CUdeviceptr)loc_gpu2) ); assert_always(tmp_ctx == ctx); } GASNET_Safe( gex_EP_Create(&gpu2_ep, myclient, GEX_EP_CAPABILITY_RMA, 0)); GASNET_Safe( gex_EP_BindSegment(gpu2_ep, d_segment2, 0) ); GASNET_Safe( gex_EP_PublishBoundSegment(myteam, &gpu2_ep, 1, 0) ); // TM pairs for several possible pairings gex_EP_Index_t host_epidx = gex_EP_QueryIndex(myep); gex_EP_Index_t gpu1_epidx = gex_EP_QueryIndex(gpu1_ep); gex_EP_Index_t gpu2_epidx = gex_EP_QueryIndex(gpu2_ep); assert_always(host_epidx == 0); assert_always(gpu1_epidx == 1); assert_always(gpu2_epidx == 2); gex_TM_t LH_RG1 = gex_TM_Pair(myep, gpu1_epidx); gex_TM_t LH_RG2 = gex_TM_Pair(myep, gpu2_epidx); gex_TM_t LG1_RG1 = gex_TM_Pair(gpu1_ep, gpu1_epidx); gex_TM_t LG2_RG2 = gex_TM_Pair(gpu2_ep, gpu2_epidx); gex_TM_t LG1_RG2 = gex_TM_Pair(gpu1_ep, gpu2_epidx); gex_TM_t LG2_RG1 = gex_TM_Pair(gpu2_ep, gpu1_epidx); uint8_t *rem_gpu1; size_t queried_len; gex_Event_Wait( gex_EP_QueryBoundSegmentNB(LH_RG1, peer, (void**)&rem_gpu1, NULL, &queried_len, 0) ); assert_always(queried_len == TEST_SEGSZ_REQUEST); uint8_t *rem_gpu2; gex_Event_Wait( gex_EP_QueryBoundSegmentNB(LH_RG2, peer, (void**)&rem_gpu2, NULL, &queried_len, 0) ); assert_always(queried_len == TEST_SEGSZ_REQUEST); // Case 1. Puts - local host to remote gpus // BEFORE: GPU1=uninit:uninit GPU2=uninit:uninit // AFTER: GPU1=array1:uninit GPU2=array2:uninit gex_RMA_PutNBI(LH_RG1, peer, rem_gpu1, array1, len, GEX_EVENT_DEFER, 0); gex_RMA_PutNBI(LH_RG2, peer, rem_gpu2, array2, len, GEX_EVENT_DEFER, 0); gex_NBI_Wait(GEX_EC_PUT,0); BARRIER(); CHECK_DEVICE("Case 1a", loc_gpu1, array1, len); CHECK_DEVICE("Case 1b", loc_gpu2, array2, len); // Case 2. Gets - remote gpus to local host // BEFORE: GPU1=array1:uninit GPU2=array2:uninit // AFTER: GPU1=array1:uninit GPU2=array2:uninit gex_Event_t get_events[2] = { gex_RMA_GetNB(LH_RG1, loc1, peer, rem_gpu1, len, 0), gex_RMA_GetNB(LH_RG2, loc2, peer, rem_gpu2, len, 0) }; gex_Event_WaitAll(get_events, 2, 0); CHECK_HOST("Case 2a", loc1, array1, len); CHECK_HOST("Case 2b", loc2, array2, len); BARRIER(); // Case 3. Put - local gpus to remote gpus "cross over" // BEFORE: GPU1=array1:uninit GPU2=array2:uninit // AFTER: GPU1=array1:array2 GPU2=array2:array1 gex_RMA_PutBlocking(LG1_RG2, peer, rem_gpu2+len, loc_gpu1, len, 0); BARRIER(); CHECK_DEVICE("Case 3a", loc_gpu2+len, array1, len); gex_RMA_PutBlocking(LG2_RG1, peer, rem_gpu1+len, loc_gpu2, len, 0); BARRIER(); CHECK_DEVICE("Case 3b", loc_gpu1+len, array2, len); // Case 4. Get - remote gpus to local gpus // BEFORE: GPU1=array1:array2 GPU2=array2:array1 // AFTER: GPU1=array1:array1 GPU2=array2:array2 gex_RMA_GetBlocking(LG1_RG1, loc_gpu1+len, peer, rem_gpu1, len, 0); CHECK_DEVICE("Case 4a", loc_gpu1+len, array1, len); gex_RMA_GetBlocking(LG2_RG2, loc_gpu2+len, peer, rem_gpu2, len, 0); CHECK_DEVICE("Case 4b", loc_gpu2+len, array2, len); if (!test_errs) MSG("GEX_MK_CLASS_CUDA_UVA: success"); check_cudacall( cuCtxSetCurrent(NULL) ); check_cudacall( cuDevicePrimaryCtxRelease(0) ); if (count > 1) { check_cudacall( cuDevicePrimaryCtxRelease(1) ); } } // TODO: once supported: Destroy Segments, Kinds and Endpoints; free GPU memory } #else { gex_System_SetVerboseErrors(0); int rc = gex_MK_Create(&kind, myclient, &args, 0); assert_always(rc == GASNET_ERR_BAD_ARG); MSG("GEX_MK_CLASS_CUDA_UVA: correct failure due to missing support"); } #endif // Just to ensure these exist: args.gex_class = GEX_MK_CLASS_HOST; kind = GEX_MK_HOST; test_free(array2); test_free(array1); test_free(loc2); test_free(loc1); test_free(cmp_buffer); MSG("done."); BARRIER(); gasnet_exit(0); return 0; } gasnet-2025.8.0/tests/testtoken.c0000664000175000017500000002131015142313673016745 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testtoken.c $ * Copyright (c) 2023, The Regents of the University of California * * Description: Tests of gex_Token_Info() */ #include #include #include "string.h" #ifndef TEST_SEGSZ #define TEST_SEGSZ PAGESZ #endif #include // ------------------------------------------------------------------------------------ static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; static gex_Rank_t myrank; static gex_Rank_t prev_rank, next_rank; static void *prev_base, *next_base; // ------------------------------------------------------------------------------------ // Even though srcrank is "known", we send it one way to ensure gex_nargs is non-constant static void SReq(gex_Token_t token, gex_AM_Arg_t srcrank); static void SRep(gex_Token_t token); static void MReq(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t srcrank); static void MRep(gex_Token_t token, void *buf, size_t nbytes); static void LReq(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t srcrank); static void LRep(gex_Token_t token, void *buf, size_t nbytes); enum { am_short = 0, am_medium, am_long }; const gex_Flags_t cflags[] = { GEX_FLAG_AM_SHORT, GEX_FLAG_AM_MEDIUM, GEX_FLAG_AM_LONG }; const int mycdata[6] = { 42, 511, 911, 0, -1, 777 }; #define hidx_SReq (GEX_AM_INDEX_BASE + 2*am_short + 0) #define hidx_SRep (GEX_AM_INDEX_BASE + 2*am_short + 1) #define hidx_MReq (GEX_AM_INDEX_BASE + 2*am_medium + 0) #define hidx_MRep (GEX_AM_INDEX_BASE + 2*am_medium + 1) #define hidx_LReq (GEX_AM_INDEX_BASE + 2*am_long + 0) #define hidx_LRep (GEX_AM_INDEX_BASE + 2*am_long + 1) gex_AM_Entry_t htable[] = { { hidx_SReq, (gex_AM_Fn_t)SReq, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 1, &mycdata[0], "Alpha" }, { hidx_SRep, (gex_AM_Fn_t)SRep, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_SHORT, 0, &mycdata[1], "Bravo" }, { hidx_MReq, (gex_AM_Fn_t)MReq, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 1, &mycdata[2], "Charlie" }, { hidx_MRep, (gex_AM_Fn_t)MRep, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_MEDIUM, 0, &mycdata[3], "Delta" }, { hidx_LReq, (gex_AM_Fn_t)LReq, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, 1, &mycdata[4], "Echo" }, { hidx_LRep, (gex_AM_Fn_t)LRep, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_LONG, 0, &mycdata[5], "Foxtrot" } }; #define HANDLER_TABLE_SIZE (sizeof(htable)/sizeof(gex_AM_Entry_t)) // ------------------------------------------------------------------------------------ gex_TI_t supported = GEX_TI_ALL; // will remove bits for any queries which fail gasnett_atomic_t error_cnt = gasnett_atomic_init(0); gasnett_atomic_t reply_cnt = gasnett_atomic_init(0); static void common(gex_Token_t token, gex_Rank_t srcrank, int is_req, int category, gex_AM_Fn_t fnptr) { gex_Token_Info_t info; gex_TI_t mask = gex_Token_Info(token, &info, GEX_TI_ALL); static gex_HSL_t lock = GEX_HSL_INITIALIZER; gex_HSL_Lock(&lock); supported &= mask; gex_HSL_Unlock(&lock); #define CHECK(cond) do { \ if (!(cond)) { \ fprintf(stderr, "Check failed: " #cond "\n"); \ gasnett_atomic_increment(&error_cnt, 0); \ } \ } while (0) CHECK(mask & GEX_TI_SRCRANK); CHECK(info.gex_srcrank == srcrank); CHECK(mask & GEX_TI_EP); CHECK(info.gex_ep == myep); #if (GASNET_SUPPORTS_TI_IS_REQ == 1) CHECK(mask & GEX_TI_IS_REQ); #elif defined(GASNET_SUPPORTS_TI_IS_REQ) #error GASNET_SUPPORTS_TI_IS_REQ is neither '1' nor undefined #endif if (mask & GEX_TI_IS_REQ) CHECK(info.gex_is_req == is_req); #if (GASNET_SUPPORTS_TI_IS_LONG == 1) CHECK(mask & GEX_TI_IS_LONG); #elif defined(GASNET_SUPPORTS_TI_IS_LONG) #error GASNET_SUPPORTS_TI_IS_LONG is neither '1' nor undefined #endif if (mask & GEX_TI_IS_LONG) CHECK(info.gex_is_long == (category == am_long)); #if (GASNET_SUPPORTS_TI_ENTRY == 1) CHECK(mask & GEX_TI_ENTRY); #elif defined(GASNET_SUPPORTS_TI_ENTRY) #error GASNET_SUPPORTS_TI_ENTRY is neither '1' nor undefined #endif if (mask & GEX_TI_ENTRY) { unsigned int myindex = 2*category + !is_req; gex_Flags_t flags = (is_req ? GEX_FLAG_AM_REQUEST : GEX_FLAG_AM_REPLY) | cflags[category]; CHECK(info.gex_entry->gex_index == GEX_AM_INDEX_BASE + myindex); CHECK(info.gex_entry->gex_fnptr == fnptr); CHECK(info.gex_entry->gex_flags == flags); CHECK(info.gex_entry->gex_nargs == is_req); CHECK(info.gex_entry->gex_cdata == mycdata + myindex); CHECK(info.gex_entry->gex_name == htable[myindex].gex_name); // pointer equality, not strcmp() } #undef CHECK } static void SReq(gex_Token_t token, gex_AM_Arg_t srcrank) { common(token, srcrank, 1, am_short, (gex_AM_Fn_t)&SReq); gex_AM_ReplyShort0(token, hidx_SRep, 0); } static void SRep(gex_Token_t token) { common(token, next_rank, 0, am_short, (gex_AM_Fn_t)&SRep); gasnett_atomic_increment(&reply_cnt, 0); } static void MReq(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t srcrank) { common(token, srcrank, 1, am_medium, (gex_AM_Fn_t)&MReq); gex_AM_ReplyMedium0(token, hidx_MRep, NULL, 0, GEX_EVENT_NOW, 0); } static void MRep(gex_Token_t token, void *buf, size_t nbytes) { common(token, next_rank, 0, am_medium, (gex_AM_Fn_t)&MRep); gasnett_atomic_increment(&reply_cnt, 0); } static void LReq(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t srcrank) { common(token, srcrank, 1, am_long, (gex_AM_Fn_t)&LReq); gex_AM_ReplyLong0(token, hidx_LRep, NULL, 0, prev_base, GEX_EVENT_NOW, 0); } static void LRep(gex_Token_t token, void *buf, size_t nbytes) { common(token, next_rank, 0, am_long, (gex_AM_Fn_t)&LRep); gasnett_atomic_increment(&reply_cnt, 0); } // ------------------------------------------------------------------------------------ int main(int argc, char **argv) { GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testtoken", &argc, &argv, 0)); int help = (argc != 1); test_init("testtoken", 0, ""); gex_Rank_t nranks = gex_TM_QuerySize(myteam); myrank = gex_TM_QueryRank(myteam); next_rank = (myrank + 1) % nranks; prev_rank = (myrank + nranks - 1) % nranks; GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); gex_Event_Wait(gex_EP_QueryBoundSegmentNB(myteam, next_rank, &next_base, NULL, NULL, 0)); gex_Event_Wait(gex_EP_QueryBoundSegmentNB(myteam, prev_rank, &prev_base, NULL, NULL, 0)); gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); gex_AM_RequestShort1 (myteam, next_rank, hidx_SReq, 0, myrank); gex_AM_RequestMedium1(myteam, next_rank, hidx_MReq, NULL, 0, GEX_EVENT_NOW, 0, myrank); gex_AM_RequestLong1 (myteam, next_rank, hidx_LReq, NULL, 0, next_base, GEX_EVENT_NOW, 0, myrank); GASNET_BLOCKUNTIL(3 == gasnett_atomic_read(&reply_cnt, 0)); { gex_Rank_t num_nbrhd; gex_System_QueryMyPosition(&num_nbrhd, NULL, NULL, NULL); if (num_nbrhd == 1) { MSG0("WARNING: unable to test optional query support due to having only shared-memory peers"); } else { // Since PSHM (currently) implements all optional queries, // we use a reduction to look for *any* unsupported cases. uint64_t tmp = supported; // overkill rather than matching width of gex_TI_t gex_Event_Wait(gex_Coll_ReduceToOneNB(myteam, 0, &tmp, &tmp, GEX_DT_U64, sizeof(tmp), 1, GEX_OP_AND, NULL, NULL, 0)); if (!myrank) { #define CHECKDEF(query) do { \ if (0 == (supported & query)) { \ MSG0("ERROR: Optional " #query " query is not supported, but feature macro is defined"); \ gasnett_atomic_increment(&error_cnt, 0); \ } \ } while (0) #define CHECKUNDEF(query) do { \ if (supported & query) { \ MSG0("WARNING: Optional " #query " query appears to be supported, but feature macro is undefined"); \ } else { \ MSG0("INFO: Optional " #query " query is not supported"); \ } \ } while (0) #ifdef GASNET_SUPPORTS_TI_ENTRY CHECKDEF(GEX_TI_ENTRY); #else CHECKUNDEF(GEX_TI_ENTRY); #endif #ifdef GASNET_SUPPORTS_TI_IS_REQ CHECKDEF(GEX_TI_IS_REQ); #else CHECKUNDEF(GEX_TI_IS_REQ); #endif #ifdef GASNET_SUPPORTS_TI_IS_LONG CHECKDEF(GEX_TI_IS_LONG); #else CHECKUNDEF(GEX_TI_IS_LONG); #endif #undef CHECKDEF #undef CHECKUNDEF } } } int errors = (int)gasnett_atomic_read(&error_cnt,0); if (errors) { MSG("ERROR: %d errors detected", errors); } gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); MSG0("done."); gasnet_exit(errors); return 0; } gasnet-2025.8.0/tests/testmisc.c0000664000175000017500000005334415142313673016574 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testmisc.c $ * Description: GASNet misc performance test * Measures the overhead associated with a number of purely local * operations that involve no communication. * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int mynode = 0; int iters=0; void *myseg = NULL; int accuracy = 0; void report(const char *desc, int64_t totaltime, int iters) { if (mynode == 0) { char format[80]; snprintf(format, sizeof(format), "%c: %%-50s: %%%i.%if s %%%i.%if us\n", TEST_SECTION_NAME(), (4+accuracy), accuracy, (4+accuracy), accuracy); printf(format, desc, totaltime/1.0E9, (totaltime/1000.0)/iters); fflush(stdout); } } /* placed in a function to avoid excessive inlining */ gasnett_tick_t ticktime(void) { return gasnett_ticks_now(); } uint64_t tickcvt(gasnett_tick_t ticks) { return gasnett_ticks_to_ns(ticks); } void doit1(void); void doit2(void); void doit3(void); void doit4(void); void doit5(void); void doit6(void); void doit7(void); void doit8(void); /* ------------------------------------------------------------------------------------ */ #define hidx_null_shorthandler 201 #define hidx_justreply_shorthandler 202 #define hidx_null_medhandler 203 #define hidx_justreply_medhandler 204 #define hidx_null_longhandler 205 #define hidx_justreply_longhandler 206 void null_shorthandler(gex_Token_t token) { } void justreply_shorthandler(gex_Token_t token) { gex_AM_ReplyShort0(token, hidx_null_shorthandler, 0); } void null_medhandler(gex_Token_t token, void *buf, size_t nbytes) { } void justreply_medhandler(gex_Token_t token, void *buf, size_t nbytes) { gex_AM_ReplyMedium0(token, hidx_null_medhandler, buf, nbytes, GEX_EVENT_NOW, 0); } void null_longhandler(gex_Token_t token, void *buf, size_t nbytes) { } void justreply_longhandler(gex_Token_t token, void *buf, size_t nbytes) { gex_AM_ReplyLong0(token, hidx_null_longhandler, buf, nbytes, buf, GEX_EVENT_NOW, 0); } /* ------------------------------------------------------------------------------------ */ /* This tester measures the performance of a number of miscellaneous GASNet functions that don't involve actual communication, to assist in evaluating the overhead of the GASNet layer itself */ int main(int argc, char **argv) { gex_AM_Entry_t htable[] = { { hidx_null_shorthandler, (gex_AM_Fn_t)null_shorthandler, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_SHORT, 0 }, { hidx_justreply_shorthandler, (gex_AM_Fn_t)justreply_shorthandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 }, { hidx_null_medhandler, (gex_AM_Fn_t)null_medhandler, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_MEDIUM, 0 }, { hidx_justreply_medhandler, (gex_AM_Fn_t)justreply_medhandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 0 }, { hidx_null_longhandler, (gex_AM_Fn_t)null_longhandler, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_LONG, 0 }, { hidx_justreply_longhandler, (gex_AM_Fn_t)justreply_longhandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, 0 } }; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testmisc", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testmisc",1,"(iters) (accuracy_digits) (test_sections)"); mynode = gex_TM_QueryRank(myteam); myseg = TEST_MYSEG(); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 100000; if (argc > 2) accuracy = atoi(argv[2]); if (!accuracy) accuracy = 3; if (argc > 3) TEST_SECTION_PARSE(argv[3]); if (argc > 4) test_usage(); TEST_SRAND(((unsigned int)TIME()) & 0xFFFF); if (mynode == 0) { printf("Running misc performance test with %i iterations...\n",iters); printf("%-50s Total time Avg. time\n" "%-50s ---------- ---------\n", "", ""); fflush(stdout); } doit1(); MSG("done."); gasnet_exit(0); return 0; } #define TIME_OPERATION_FULL(desc, preop, op, postop) \ if (TEST_SECTION_ENABLED()) \ { int i, _iters = iters, _warmupiters = MAX(1,iters/10); \ gasnett_tick_t start,end; /* use ticks interface */ \ BARRIER(); /* for best accuracy */ \ preop; /* warm-up */ \ for (i=0; i < _warmupiters; i++) { op; } \ postop; \ BARRIER(); \ start = ticktime(); \ preop; \ for (i=0; i < _iters; i++) { op; } \ postop; \ end = ticktime(); \ BARRIER(); \ if (((const char *)(desc)) && ((char*)(desc))[0]) \ report((desc), tickcvt(end - start), iters); \ else report("Line " _STRINGIFY(__LINE__), tickcvt(end - start), iters); \ } #define TIME_OPERATION(desc, op) TIME_OPERATION_FULL(desc, {}, op, {}) char p[1]; gex_HSL_t hsl = GEX_HSL_INITIALIZER; gasnett_atomic_t a = gasnett_atomic_init(0); gasnett_atomic32_t a32 = gasnett_atomic32_init(0); gasnett_atomic64_t a64 = gasnett_atomic64_init(0); int32_t temp = 0; gasnett_tick_t timertemp = 0; int8_t bigtemp[1024]; gex_Event_t events[8]; /* ------------------------------------------------------------------------------------ */ void doit1(void) { GASNET_BEGIN_FUNCTION(); { int i; for (i=0;i<8;i++) { events[i] = GEX_EVENT_INVALID; } } TEST_SECTION_BEGIN(); TIME_OPERATION("Tester overhead", {}); TIME_OPERATION("gasnett_ticks_now()", { timertemp = gasnett_ticks_now(); }); TIME_OPERATION("gasnett_ticks_to_us()", { timertemp = (gasnett_tick_t)gasnett_ticks_to_us(timertemp); }); TIME_OPERATION("gasnett_ticks_to_ns()", { timertemp = (gasnett_tick_t)gasnett_ticks_to_ns(timertemp); }); TEST_SECTION_BEGIN(); TIME_OPERATION("Do-nothing gasnet_AMPoll()", { gasnet_AMPoll(); }); TIME_OPERATION("Loopback do-nothing gex_AM_RequestShort0()", { gex_AM_RequestShort0(myteam, mynode, hidx_null_shorthandler, 0); }); TIME_OPERATION("Loopback do nothing AM short request-reply", { gex_AM_RequestShort0(myteam, mynode, hidx_justreply_shorthandler, 0); }); TIME_OPERATION("Loopback do-nothing gex_AM_RequestMedium0()", { gex_AM_RequestMedium0(myteam, mynode, hidx_null_medhandler, p, 0, GEX_EVENT_NOW, 0); }); TIME_OPERATION("Loopback do nothing AM medium request-reply", { gex_AM_RequestMedium0(myteam, mynode, hidx_justreply_medhandler, p, 0, GEX_EVENT_NOW, 0); }); TIME_OPERATION("Loopback do-nothing gex_AM_RequestLong0()", { gex_AM_RequestLong0(myteam, mynode, hidx_null_longhandler, p, 0, myseg, GEX_EVENT_NOW, 0); }); TIME_OPERATION("Loopback do nothing AM long request-reply", { gex_AM_RequestLong0(myteam, mynode, hidx_justreply_longhandler, p, 0, myseg, GEX_EVENT_NOW, 0); }); doit2(); } /* ------------------------------------------------------------------------------------ */ volatile int val_true = 1; volatile int val_false = 0; int val_junk = 0; void doit2(void) { GASNET_BEGIN_FUNCTION(); TEST_SECTION_BEGIN(); #if defined(GASNET_PAR) || defined (GASNET_PARSYNC) { static gasnett_mutex_t mutex = GASNETT_MUTEX_INITIALIZER; TIME_OPERATION("lock/unlock uncontended gasnet mutex", { gasnett_mutex_lock(&mutex); gasnett_mutex_unlock(&mutex); }); } { static gasnett_rwlock_t rwlock = GASNETT_RWLOCK_INITIALIZER; TIME_OPERATION("rdlock/unlock uncontended gasnet rwlock", { gasnett_rwlock_rdlock(&rwlock); gasnett_rwlock_unlock(&rwlock); }); TIME_OPERATION("wrlock/unlock uncontended gasnet rwlock", { gasnett_rwlock_wrlock(&rwlock); gasnett_rwlock_unlock(&rwlock); }); } #endif TIME_OPERATION("lock/unlock uncontended HSL (" _STRINGIFY(TEST_PARSEQ) " mode)", { gex_HSL_Lock(&hsl); gex_HSL_Unlock(&hsl); }); TEST_SECTION_BEGIN(); #define MESSY(i) ((((i+14)*i)+(i+23)*i)&4) TIME_OPERATION("if_pf correct", { if_pf(val_false) val_false ^= MESSY(i); else val_junk++; }); TIME_OPERATION("if_pf incorrect", { if_pf(val_true) val_junk++; else val_true ^= MESSY(i); }); TIME_OPERATION("if_pt correct", { if_pt(val_true) val_junk++; else val_true ^= MESSY(i); }); TIME_OPERATION("if_pt incorrect", { if_pt(val_false) val_false ^= MESSY(i); else val_junk++;}); TEST_SECTION_BEGIN(); TIME_OPERATION("gasnett_local_wmb", gasnett_local_wmb()); TIME_OPERATION("gasnett_local_rmb", gasnett_local_rmb()); TIME_OPERATION("gasnett_local_mb", gasnett_local_mb()); TEST_SECTION_BEGIN(); TIME_OPERATION("gasnett_atomic_read", gasnett_atomic_read(&a,0)); TIME_OPERATION("gasnett_atomic_set", gasnett_atomic_set(&a,1,0)); TIME_OPERATION("gasnett_atomic_increment", gasnett_atomic_increment(&a,0)); TIME_OPERATION("gasnett_atomic_increment.rel", gasnett_atomic_increment(&a,GASNETT_ATOMIC_REL)); TIME_OPERATION("gasnett_atomic_decrement", gasnett_atomic_decrement(&a,0)); TIME_OPERATION("gasnett_atomic_decrement.acq", gasnett_atomic_decrement(&a,GASNETT_ATOMIC_ACQ)); TIME_OPERATION("gasnett_atomic_decrement_and_test", gasnett_atomic_decrement_and_test(&a,0)); TIME_OPERATION("gasnett_atomic_decrement_and_test.acq", gasnett_atomic_decrement_and_test(&a,GASNETT_ATOMIC_ACQ)); #if defined(GASNETT_HAVE_ATOMIC_CAS) TIME_OPERATION_FULL("gasnett_atomic_compare_and_swap (result=1)", { gasnett_atomic_set(&a,0,0); }, { gasnett_atomic_compare_and_swap(&a,0,0,0); }, {}); TIME_OPERATION_FULL("gasnett_atomic_compare_and_swap.acq (result=1)", { gasnett_atomic_set(&a,0,0); }, { gasnett_atomic_compare_and_swap(&a,0,0,GASNETT_ATOMIC_ACQ); }, {}); TIME_OPERATION_FULL("gasnett_atomic_compare_and_swap (result=0)", { gasnett_atomic_set(&a,1,0); }, { gasnett_atomic_compare_and_swap(&a,0,0,0); }, {}); TIME_OPERATION_FULL("gasnett_atomic_compare_and_swap.acq (result=0)", { gasnett_atomic_set(&a,1,0); }, { gasnett_atomic_compare_and_swap(&a,0,0,GASNETT_ATOMIC_ACQ); }, {}); TIME_OPERATION("gasnett_atomic_swap", gasnett_atomic_swap(&a,i,0)); TIME_OPERATION("gasnett_atomic_swap.acq", gasnett_atomic_swap(&a,i,GASNETT_ATOMIC_ACQ)); TIME_OPERATION("gasnett_atomic_swap.rel", gasnett_atomic_swap(&a,i,GASNETT_ATOMIC_REL)); #endif #if defined(GASNETT_HAVE_ATOMIC_ADD_SUB) TIME_OPERATION("gasnett_atomic_add", gasnett_atomic_add(&a,i,0)); TIME_OPERATION("gasnett_atomic_add.rel", gasnett_atomic_add(&a,i,GASNETT_ATOMIC_REL)); TIME_OPERATION("gasnett_atomic_subtract", gasnett_atomic_subtract(&a,i,0)); TIME_OPERATION("gasnett_atomic_subtract.acq", gasnett_atomic_subtract(&a,i,GASNETT_ATOMIC_ACQ)); #endif TEST_SECTION_BEGIN(); TIME_OPERATION("gasnett_atomic32_read", gasnett_atomic32_read(&a32,0)); TIME_OPERATION("gasnett_atomic32_set", gasnett_atomic32_set(&a32,1,0)); TIME_OPERATION("gasnett_atomic32_increment", gasnett_atomic32_increment(&a32,0)); TIME_OPERATION("gasnett_atomic32_decrement", gasnett_atomic32_decrement(&a32,0)); TIME_OPERATION("gasnett_atomic32_decrement_and_test", gasnett_atomic32_decrement_and_test(&a32,0)); TIME_OPERATION_FULL("gasnett_atomic32_compare_and_swap (result=1)", { gasnett_atomic32_set(&a32,0,0); }, { gasnett_atomic32_compare_and_swap(&a32,0,0,0); }, {}); TIME_OPERATION_FULL("gasnett_atomic32_compare_and_swap (result=0)", { gasnett_atomic32_set(&a32,1,0); }, { gasnett_atomic32_compare_and_swap(&a32,0,0,0); }, {}); TIME_OPERATION("gasnett_atomic32_swap", gasnett_atomic32_swap(&a32,i,0)); TIME_OPERATION("gasnett_atomic32_add", gasnett_atomic32_add(&a32,i,0)); TIME_OPERATION("gasnett_atomic32_subtract", gasnett_atomic32_subtract(&a32,i,0)); TEST_SECTION_BEGIN(); TIME_OPERATION("gasnett_atomic64_read", gasnett_atomic64_read(&a64,0)); TIME_OPERATION("gasnett_atomic64_set", gasnett_atomic64_set(&a64,1,0)); TIME_OPERATION("gasnett_atomic64_increment", gasnett_atomic64_increment(&a64,0)); TIME_OPERATION("gasnett_atomic64_decrement", gasnett_atomic64_decrement(&a64,0)); TIME_OPERATION("gasnett_atomic64_decrement_and_test", gasnett_atomic64_decrement_and_test(&a64,0)); TIME_OPERATION_FULL("gasnett_atomic64_compare_and_swap (result=1)", { gasnett_atomic64_set(&a64,0,0); }, { gasnett_atomic64_compare_and_swap(&a64,0,0,0); }, {}); TIME_OPERATION_FULL("gasnett_atomic64_compare_and_swap (result=0)", { gasnett_atomic64_set(&a64,1,0); }, { gasnett_atomic64_compare_and_swap(&a64,0,0,0); }, {}); TIME_OPERATION("gasnett_atomic64_swap", gasnett_atomic64_swap(&a64,i,0)); TIME_OPERATION("gasnett_atomic64_add", gasnett_atomic64_add(&a64,i,0)); TIME_OPERATION("gasnett_atomic64_subtract", gasnett_atomic64_subtract(&a64,i,0)); doit3(); } /* ------------------------------------------------------------------------------------ */ GASNETT_THREADKEY_DEFINE(key); void doit3(void) { void * volatile x = 0; volatile gasnet_threadinfo_t ti; static volatile uintptr_t y = 0; TEST_SECTION_BEGIN(); { GASNET_BEGIN_FUNCTION(); gasnett_threadkey_init(key); TIME_OPERATION("gasnett_threadkey_get (" _STRINGIFY(TEST_PARSEQ) " mode)", { x = gasnett_threadkey_get(key); }); TIME_OPERATION("gasnett_threadkey_set (" _STRINGIFY(TEST_PARSEQ) " mode)", { gasnett_threadkey_set(key, x); }); TIME_OPERATION("gasnett_threadkey_get_noinit (" _STRINGIFY(TEST_PARSEQ) " mode)", { x = gasnett_threadkey_get_noinit(key); }); TIME_OPERATION("gasnett_threadkey_set_noinit (" _STRINGIFY(TEST_PARSEQ) " mode)", { gasnett_threadkey_set_noinit(key, x); }); } TEST_SECTION_BEGIN(); /* TODO: How to suppress unused var warnings in the timings of * GASNET_BEGIN_FUNCTION and GASNET_POST_THREADINFO w/o knowledge of * how they are implemented AND w/o adding operations that would * effect the timings. */ TIME_OPERATION("GASNET_BEGIN_FUNCTION (" _STRINGIFY(TEST_PARSEQ) " mode)", { GASNET_BEGIN_FUNCTION(); }); TIME_OPERATION("GASNET_BEGIN_FUNCTION (" _STRINGIFY(TEST_PARSEQ) " mode) w/possible use", { GASNET_BEGIN_FUNCTION(); if (y) y ^= (uintptr_t)GASNET_GET_THREADINFO(); }); memset((void *)&ti,0,sizeof(ti)); TIME_OPERATION("GASNET_POST_THREADINFO (" _STRINGIFY(TEST_PARSEQ) " mode)", { GASNET_POST_THREADINFO(ti); }); { GASNET_BEGIN_FUNCTION(); TIME_OPERATION("GASNET_GET_THREADINFO (w/ BEGIN) (" _STRINGIFY(TEST_PARSEQ) " mode)", { y ^= (uintptr_t)GASNET_GET_THREADINFO(); }); } TIME_OPERATION("GASNET_GET_THREADINFO (no BEGIN) (" _STRINGIFY(TEST_PARSEQ) " mode)", { y ^= (uintptr_t)GASNET_GET_THREADINFO(); }); doit4(); } /* ------------------------------------------------------------------------------------ */ void doit4(void) { GASNET_BEGIN_FUNCTION(); TEST_SECTION_BEGIN(); TIME_OPERATION("local 4-byte gex_RMA_PutBlocking", { gex_RMA_PutBlocking(myteam, mynode, myseg, &temp, 4, 0); }); TIME_OPERATION("local 4-byte gex_RMA_PutNB", { gex_Event_Wait(gex_RMA_PutNB(myteam, mynode, myseg, &temp, 4, GEX_EVENT_NOW, 0)); }); TIME_OPERATION_FULL("local 4-byte gex_RMA_PutNBI", {}, { gex_RMA_PutNBI(myteam, mynode, myseg, &temp, 4, GEX_EVENT_NOW, 0); }, { gex_NBI_Wait(GEX_EC_PUT, 0); }); TIME_OPERATION("local 4-byte gex_RMA_PutNB/bulk", { gex_Event_Wait(gex_RMA_PutNB(myteam, mynode, myseg, &temp, 4, GEX_EVENT_DEFER, 0)); }); TIME_OPERATION_FULL("local 4-byte gex_RMA_PutNBI/bulk", {}, { gex_RMA_PutNBI(myteam, mynode, myseg, &temp, 4, GEX_EVENT_DEFER, 0); }, { gex_NBI_Wait(GEX_EC_PUT, 0); }); TIME_OPERATION("local 4-byte gex_RMA_PutBlockingVal", { gex_RMA_PutBlockingVal(myteam, mynode, myseg, temp, 4, 0); }); TIME_OPERATION("local 4-byte gex_RMA_PutNBVal", { gex_Event_Wait(gex_RMA_PutNBVal(myteam, mynode, myseg, temp, 4, 0)); }); TIME_OPERATION_FULL("local 4-byte gex_RMA_PutNBIVal", {}, { gex_RMA_PutNBIVal(myteam, mynode, myseg, temp, 4, 0); }, { gex_NBI_Wait(GEX_EC_PUT, 0); }); TIME_OPERATION("local 1024-byte gex_RMA_PutBlocking", { gex_RMA_PutBlocking(myteam, mynode, myseg, &bigtemp, 1024, 0); }); doit5(); } /* ------------------------------------------------------------------------------------ */ void doit5(void) { GASNET_BEGIN_FUNCTION(); TIME_OPERATION("local 4-byte gex_RMA_GetBlocking", { gex_RMA_GetBlocking(myteam, &temp, mynode, myseg, 4, 0); }); TIME_OPERATION("local 4-byte gex_RMA_GetNB", { gex_Event_Wait(gex_RMA_GetNB(myteam, &temp, mynode, myseg, 4, 0)); }); TIME_OPERATION_FULL("local 4-byte gex_RMA_GetNBI", {}, { gex_RMA_GetNBI(myteam, &temp, mynode, myseg, 4, 0); }, { gex_NBI_Wait(GEX_EC_GET, 0); }); TIME_OPERATION("local 4-byte gex_RMA_GetBlockingVal", { temp = (int32_t)gex_RMA_GetBlockingVal(myteam, mynode, myseg, 4, 0); }); TIME_OPERATION("local 1024-byte gex_RMA_GetBlocking", { gex_RMA_GetBlocking(myteam, &bigtemp, mynode, myseg, 1024, 0); }); doit6(); } /* ------------------------------------------------------------------------------------ */ void doit6(void) { GASNET_BEGIN_FUNCTION(); { int32_t temp1 = 0; int32_t temp2 = 0; int32_t volatile *ptemp1 = &temp1; int32_t volatile *ptemp2 = &temp2; TIME_OPERATION("local 4-byte assignment", { *(ptemp1) = *(ptemp2); }); } { int8_t temp1[1024]; int8_t temp2[1024]; TIME_OPERATION("local 1024-byte memcpy", { memcpy(temp1, temp2, 1024); }); } doit7(); } /* ------------------------------------------------------------------------------------ */ void doit7(void) { GASNET_BEGIN_FUNCTION(); TEST_SECTION_BEGIN(); TIME_OPERATION("do-nothing gex_Event_Wait()", { gex_Event_Wait(GEX_EVENT_INVALID); }); TIME_OPERATION("do-nothing gex_Event_Test()", { int junk = gex_Event_Test(GEX_EVENT_INVALID); }); TIME_OPERATION("do-nothing gex_Event_WaitAll() (8 events)", { gex_Event_WaitAll(events, 8, 0); }); TIME_OPERATION("do-nothing gex_Event_WaitSome() (8 events)", { gex_Event_WaitSome(events, 8, 0); }); TIME_OPERATION("do-nothing gex_Event_TestAll() (8 events)", { gex_Event_TestAll(events, 8, 0); }); TIME_OPERATION("do-nothing gex_Event_TestSome() (8 events)", { gex_Event_TestSome(events, 8, 0); }); TIME_OPERATION("do-nothing gex_NBI_Wait(ALL)", { gex_NBI_Wait(GEX_EC_ALL, 0); }); TIME_OPERATION("do-nothing gex_NBI_Wait(PUT)", { gex_NBI_Wait(GEX_EC_PUT, 0); }); TIME_OPERATION("do-nothing gex_NBI_Wait(GET)", { gex_NBI_Wait(GEX_EC_GET, 0); }); TIME_OPERATION("do-nothing gex_NBI_Test(ALL)", { int junk = gex_NBI_Test(GEX_EC_ALL, 0); }); TIME_OPERATION("do-nothing gex_NBI_Test(PUT)", { int junk = gex_NBI_Test(GEX_EC_PUT, 0); }); TIME_OPERATION("do-nothing gex_NBI_Test(GET)", { int junk = gex_NBI_Test(GEX_EC_GET, 0); }); TIME_OPERATION("do-nothing begin/end nbi accessregion", { gex_NBI_BeginAccessRegion(0); gex_Event_Wait(gex_NBI_EndAccessRegion(0)); }); TEST_SECTION_BEGIN(); TIME_OPERATION("single-node barrier", { gasnet_barrier_notify(0,GASNET_BARRIERFLAG_ANONYMOUS); gasnet_barrier_wait(0,GASNET_BARRIERFLAG_ANONYMOUS); }); if (TEST_SECTION_ENABLED() && (gex_TM_QuerySize(myteam) > 1)) MSG0("Note: this is actually the barrier time for %i nodes, " "since you're running with more than one node.\n", (int)gex_TM_QuerySize(myteam)); doit8(); } /* ------------------------------------------------------------------------------------ */ void doit8(void) { GASNET_BEGIN_FUNCTION(); /* buffers, aligned and not on the stack */ static long src[(1024 + sizeof(void*)) / sizeof(long)]; static long dst[(1024 + sizeof(void*)) / sizeof(long)]; const char *s = (const char *)src; char *d = (char *)dst; TEST_SECTION_BEGIN(); if (TEST_SECTION_ENABLED()) { int i; for (i = 0; i < sizeof(src); i++) { ((uint8_t*)src)[i] = TEST_RAND(0,255); } } TIME_OPERATION("1024-byte gasnett_count0s()", { int junk = gasnett_count0s(s, 1024); }); TIME_OPERATION("1024-byte gasnett_count0s_copy()", { int junk = gasnett_count0s_copy(d, s, 1024); }); TIME_OPERATION("1024-byte gasnett_count0s() + memcpy()", { int junk = gasnett_count0s(s, 1024); (void)memcpy(d,s,1024); }); s += sizeof(void*) / 2; d += sizeof(void*) / 2; TIME_OPERATION("unaligned 1024-byte gasnett_count0s()", { int junk = gasnett_count0s(s, 1024); }); TIME_OPERATION("unaligned 1024-byte gasnett_count0s_copy()", { int junk = gasnett_count0s_copy(d, s, 1024); }); TIME_OPERATION("unaligned 1024-byte gasnett_count0s() + memcpy()", { int junk = gasnett_count0s(s, 1024); (void)memcpy(d,s,1024); }); s -= 1; d += 1; TIME_OPERATION("misaligned 1024-byte gasnett_count0s_copy()", { int junk = gasnett_count0s_copy(d, s, 1024); }); TIME_OPERATION("misaligned 1024-byte gasnett_count0s() + memcpy()", { int junk = gasnett_count0s(s, 1024); (void)memcpy(d,s,1024); }); { volatile int temp; int volatile *ptr = &temp; TIME_OPERATION("gasnett_count0s_uint32_t()", { (*ptr) = gasnett_count0s_uint32_t((uint32_t)i); }); TIME_OPERATION("gasnett_count0s_uint64_t()", { (*ptr) = gasnett_count0s_uint64_t((uint64_t)i); }); } } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testcxx.cc0000664000175000017500000000054515142313673016601 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testcxx.cc $ * Description: General GASNet correctness tests in C++ * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include #include "testgasnet.c" gasnet-2025.8.0/tests/testlegacycxx.cc0000664000175000017500000000057015142313673017764 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testlegacycxx.cc $ * Description: Legacy GASNet-1 correctness tests in C++ * Copyright (c) 2017, The Regents of the University of California * Terms of use are as specified in license.txt */ // Test inclusion of gasnet.h after gasnetex.h (bug 3704) #include #include #include "testlegacy.c" gasnet-2025.8.0/tests/testcore4.c0000664000175000017500000002767015142313673016660 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testcore4.c $ * Description: GASNet Active Messages conformance/correctness test * Copyright (c) 2010, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; size_t maxsz = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR (2*(uintptr_t)maxsz) #endif #include #if PLATFORM_ARCH_32 #define MAX_ARGS 8 #else #define MAX_ARGS 16 #endif gex_AM_Arg_t rand_args[MAX_ARGS]; #define RAND_ARG(idx) (rand_args[(idx)-1]) uint8_t *rand_payload; int iters = 10; gex_Rank_t mynode = 0; gex_Rank_t peer = 0; gex_Rank_t from = 0; uint8_t *myseg = NULL; uint8_t *peerseg = NULL; uint8_t *fromseg = NULL; #define hidx_mybase 150 #define hidx_ping_shorthandler (hidx_mybase + 1) #define hidx_pong_shorthandler (hidx_mybase + 2) #define hidx_ping_medhandler (hidx_mybase + 3) #define hidx_pong_medhandler (hidx_mybase + 4) #define hidx_ping_longhandler (hidx_mybase + 5) #define hidx_pong_longhandler (hidx_mybase + 6) /* For > 0 args we use first arg to distinguish request/reply */ #define hidx_Shandler(args) (hidx_mybase + 3*args + 4) #define hidx_Mhandler(args) (hidx_mybase + 3*args + 5) #define hidx_Lhandler(args) (hidx_mybase + 3*args + 6) /* Preprocess-time iterator with distinct base case */ #define HITER1(base,macro) base #define HITER2(base,macro) HITER1(base,macro) macro(2) #define HITER3(base,macro) HITER2(base,macro) macro(3) #define HITER4(base,macro) HITER3(base,macro) macro(4) #define HITER5(base,macro) HITER4(base,macro) macro(5) #define HITER6(base,macro) HITER5(base,macro) macro(6) #define HITER7(base,macro) HITER6(base,macro) macro(7) #define HITER8(base,macro) HITER7(base,macro) macro(8) #define HITER9(base,macro) HITER8(base,macro) macro(9) #define HITER10(base,macro) HITER9(base,macro) macro(10) #define HITER11(base,macro) HITER10(base,macro) macro(11) #define HITER12(base,macro) HITER11(base,macro) macro(12) #define HITER13(base,macro) HITER12(base,macro) macro(13) #define HITER14(base,macro) HITER13(base,macro) macro(14) #define HITER15(base,macro) HITER14(base,macro) macro(15) #define HITER16(base,macro) HITER15(base,macro) macro(16) #define HARG_(val) , RAND_ARG(val) #define HARGS(args) HITER##args(arg1+RAND_ARG(1),HARG_) #define HARGPROTO_(val) , gex_AM_Arg_t arg##val #define HARGPROTO(args) HITER##args(gex_AM_Arg_t arg1,HARGPROTO_) /* Simpler iterator over required arg counts */ #if PLATFORM_ARCH_32 #define HFOREACH(macro) \ macro(1) macro(2) macro(3) macro(4) \ macro(5) macro(6) macro(7) macro(8) #else #define HFOREACH(macro) \ macro(1) macro(2) macro(3) macro(4) \ macro(5) macro(6) macro(7) macro(8) \ macro(9) macro(10) macro(11) macro(12)\ macro(13) macro(14) macro(15) macro(16) #endif #define MSZ(args) \ MIN(maxsz,MIN(gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,args), \ gex_AM_MaxReplyMedium (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,args))) #define LSZ(args) \ MIN(maxsz,MIN(gex_AM_MaxRequestLong(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,args), \ gex_AM_MaxReplyLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,args))) #define DEST(n) myteam, (n) #define SARGS(dest,args) (dest, hidx_Shandler(args), 0, HARGS(args)) #define MARGS(dest,args) (dest, hidx_Mhandler(args), rand_payload, MSZ(args), \ GEX_EVENT_NOW, 0, HARGS(args)) #define LARGS(dest,args,isRep) (dest, hidx_Lhandler(args), rand_payload, \ LSZ(args), (isRep?fromseg:peerseg) + isRep*LSZ(args), \ GEX_EVENT_NOW, 0, HARGS(args)) /* NOTE: This extra step appears needed for pgcc (bug 2796) */ #define DO_CALL(fn,args) (fn args) enum { op_done, op_srep, op_mrep, op_lrep }; #define HCHECK(val) ; assert_always(arg##val == RAND_ARG(val)) #define HBODY(args) do { \ gex_AM_Arg_t operation = arg1 - RAND_ARG(1); \ gex_Rank_t srcid = test_msgsource(token); \ assert_always(srcid == (operation == op_done ? peer : from)); \ HITER##args((void)0,HCHECK); \ arg1 = op_done; \ switch(operation) { \ case op_done: \ flag++; \ break; \ case op_srep: \ DO_CALL(gex_AM_ReplyShort##args, SARGS(token,args)); \ break; \ case op_mrep: \ DO_CALL(gex_AM_ReplyMedium##args, MARGS(token,args)); \ break; \ case op_lrep: \ DO_CALL(gex_AM_ReplyLong##args, LARGS(token,args,1)); \ break; \ default: \ FATALERR("Invalid operation = %d", (int)operation); \ } \ } while(0); #define HDEFN(args) \ void Shandler##args(gex_Token_t token, HARGPROTO(args)) \ { HBODY(args); } \ void Mhandler##args(gex_Token_t token, void *buf, size_t nbytes, HARGPROTO(args))\ { MSGCHECK(MSZ(args)); HBODY(args); } \ void Lhandler##args(gex_Token_t token, void *buf, size_t nbytes, HARGPROTO(args))\ { MSGCHECK(LSZ(args)); memset(buf, 0xa5, nbytes); HBODY(args); } #define HTABLE(args) \ { hidx_Shandler(args), (gex_AM_Fn_t)Shandler##args, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_SHORT, args }, \ { hidx_Mhandler(args), (gex_AM_Fn_t)Mhandler##args, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_MEDIUM, args }, \ { hidx_Lhandler(args), (gex_AM_Fn_t)Lhandler##args, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_LONG, args }, #define HTEST(args) \ MSG0("testing %d-argument AM calls", args); \ for (i = 0; i < iters; ++i) { \ gex_AM_Arg_t arg1; \ int goal = flag + 1; \ randomize(); \ arg1 = op_srep; \ DO_CALL(gex_AM_RequestShort##args,SARGS(DEST(peer),args)); \ GASNET_BLOCKUNTIL(flag == goal); ++goal; \ arg1 = op_mrep; \ DO_CALL(gex_AM_RequestMedium##args,MARGS(DEST(peer),args));\ GASNET_BLOCKUNTIL(flag == goal); ++goal; \ arg1 = op_lrep; \ DO_CALL(gex_AM_RequestLong##args,LARGS(DEST(peer),args,0));\ GASNET_BLOCKUNTIL(flag == goal); ++goal; \ } #define MSGCHECK(size) do { \ assert_always(nbytes == size); \ if (memcmp(buf, rand_payload, nbytes)) \ FATALERR("Payload verification failed in %s", \ GASNETT_CURRENT_FUNCTION); \ } while(0) /* Define all the handlers */ volatile int flag = 0; HFOREACH(HDEFN) void ping_shorthandler(gex_Token_t token) { gex_AM_ReplyShort0(token, hidx_pong_shorthandler, 0); } void pong_shorthandler(gex_Token_t token) { flag++; } void ping_medhandler(gex_Token_t token, void *buf, size_t nbytes) { MSGCHECK(MSZ(0)); gex_AM_ReplyMedium0(token, hidx_pong_medhandler, rand_payload, nbytes, GEX_EVENT_NOW, 0); } void pong_medhandler(gex_Token_t token, void *buf, size_t nbytes) { MSGCHECK(MSZ(0)); flag++; } void ping_longhandler(gex_Token_t token, void *buf, size_t nbytes) { MSGCHECK(LSZ(0)); memset(buf, 0xa5, nbytes); gex_AM_ReplyLong0(token, hidx_pong_longhandler, rand_payload, nbytes, fromseg + LSZ(0), GEX_EVENT_NOW, 0); } void pong_longhandler(gex_Token_t token, void *buf, size_t nbytes) { MSGCHECK(LSZ(0)); memset(buf, 0xa5, nbytes); flag++; } static void randomize(void) { int i; BARRIER(); for (i=0; i 1) iters = atoi(argv[1]); if (iters <= 0) iters = 10; if (argc > 2) maxsz = (size_t)gasnett_parse_int(argv[2], 1); if (maxsz <= 0) maxsz = 2*1024*1024; medsz = MAX(gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0), gex_AM_MaxReplyMedium (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0)); medsz = MIN(maxsz, medsz); longsz = MAX(gex_AM_MaxRequestLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0), gex_AM_MaxReplyLong (myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0)); longsz = MIN(maxsz, longsz); maxsz = MAX(medsz,longsz); if (argc > 3) seed = atoi(argv[3]); if (!seed) seed = (int)TIME(); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testcore4", 0, "(iters) (maxsz) (seed)"); if (argc > 4) test_usage(); TEST_BCAST(&seed, 0, &seed, sizeof(seed)); TEST_SRAND(seed); TEST_PRINT_CONDUITINFO(); mynode = gex_TM_QueryRank(myteam); gex_Rank_t nnodes = gex_TM_QuerySize(myteam); if (nnodes%2) { // w/ odd # of ranks, last one talks to self int last = nnodes - 1; if (mynode == last) { peer = from = mynode; } else { peer = (mynode + 1) % last; from = (mynode + last - 1) % last; } } else { peer = (mynode + 1) % nnodes; from = (mynode + nnodes - 1) % nnodes; } myseg = TEST_MYSEG(); peerseg = TEST_SEG(peer); fromseg = TEST_SEG(from); rand_payload = test_malloc(maxsz); MSG0("Running %i iterations of AM interface tests with medsz=%"PRIuPTR" longsz=%"PRIuPTR" seed=%u", iters, (uintptr_t)medsz, (uintptr_t)longsz, seed); MSG0("testing 0-argument AM calls"); for (i = 0; i < iters; ++i) { int goal = flag + 1; randomize(); gex_AM_RequestShort0(myteam, peer, hidx_ping_shorthandler, 0); GASNET_BLOCKUNTIL(flag == goal); ++goal; gex_AM_RequestMedium0(myteam, peer, hidx_ping_medhandler, rand_payload, MSZ(0), GEX_EVENT_NOW, 0); GASNET_BLOCKUNTIL(flag == goal); ++goal; gex_AM_RequestLong0(myteam, peer, hidx_ping_longhandler, rand_payload, LSZ(0), peerseg, GEX_EVENT_NOW, 0); GASNET_BLOCKUNTIL(flag == goal); ++goal; } /* Now 1 ... 8 or 16 */ HFOREACH(HTEST) BARRIER(); test_free(rand_payload); MSG("done."); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testinternal.c0000664000175000017500000000466515142313673017457 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testinternal.c $ * Description: GASNet internal diagnostic tests * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; /* ------------------------------------------------------------------------------------ */ int main(int argc, char **argv) { int iters = 0, threads=0; int arg = 1; gex_AM_Entry_t *htable; int htable_cnt; char *test_sections = NULL; gasnett_diagnostic_gethandlers(&htable, &htable_cnt); GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testinternal", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, htable_cnt)); #if GASNET_PAR test_init("testinternal",0,"(iters) (threadcnt) (test_sections) (seed)"); #else test_init("testinternal",0,"(iters) (test_sections) (seed)"); #endif TEST_PRINT_CONDUITINFO(); if (argc > arg) iters = atoi(argv[arg++]); if (iters < 1) iters = 1000; #if GASNET_PAR if (argc > arg) threads = atoi(argv[arg++]); #endif if (threads < 1) threads = 4; #if GASNET_PAR threads = test_thread_limit(threads); #endif if (argc > arg) test_sections = argv[arg++]; unsigned int seed = 0; if (argc > arg) seed = atoi(argv[arg++]); if (seed == 0) { seed = (((unsigned int)TIME()) & 0xFFFF); TEST_BCAST(&seed, 0, &seed, sizeof(seed)); } // NOTE: Because TEST_RAND state is per-TU, TEST_SRAND() call is in gasnett_run_diagnostics() #if GASNET_PAR MSG0("Running GASNet internal diagnostics with iters=%i and threads=%i (seed %u)", iters, threads, seed); #else MSG0("Running GASNet internal diagnostics with iters=%i (seed %u)", iters, seed); #endif gex_Rank_t myrank = gex_TM_QueryRank(myteam); gex_Rank_t numrank = gex_TM_QuerySize(myteam); gex_Rank_t peer = (myrank + 1) % numrank; BARRIER(); void *myseg = TEST_SEG(myrank); void *peerseg = TEST_SEG(peer); test_errs = gasnett_run_diagnostics(iters, threads, test_sections, myteam, myseg, peer, peerseg, seed); BARRIER(); if (test_errs) ERR("gasnett_run_diagnostics(%i) failed.", iters); gasnet_exit(test_errs); return 0; } gasnet-2025.8.0/tests/testmpi.c0000664000175000017500000003277415142313673016432 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testmpi.c $ * Description: General GASNet correctness tests * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #if _FORTIFY_SOURCE > 0 && __OPTIMIZE__ <= 0 /* silence an annoying MPICH/Linux warning */ #undef _FORTIFY_SOURCE #endif #include #define TEST_MPI 1 #include "testthreads.c" static char *MPI_ErrorName(int errval) { const char *code = NULL; char systemErrDesc[MPI_MAX_ERROR_STRING+10]; int len = MPI_MAX_ERROR_STRING; static char msg[MPI_MAX_ERROR_STRING+100]; switch (errval) { case MPI_ERR_BUFFER: code = "MPI_ERR_BUFFER"; break; case MPI_ERR_COUNT: code = "MPI_ERR_COUNT"; break; case MPI_ERR_TYPE: code = "MPI_ERR_TYPE"; break; case MPI_ERR_TAG: code = "MPI_ERR_TAG"; break; case MPI_ERR_COMM: code = "MPI_ERR_COMM"; break; case MPI_ERR_RANK: code = "MPI_ERR_RANK"; break; case MPI_ERR_REQUEST: code = "MPI_ERR_REQUEST"; break; case MPI_ERR_ROOT: code = "MPI_ERR_ROOT"; break; case MPI_ERR_GROUP: code = "MPI_ERR_GROUP"; break; case MPI_ERR_OP: code = "MPI_ERR_OP"; break; case MPI_ERR_TOPOLOGY: code = "MPI_ERR_TOPOLOGY"; break; case MPI_ERR_DIMS: code = "MPI_ERR_DIMS"; break; case MPI_ERR_ARG: code = "MPI_ERR_ARG"; break; case MPI_ERR_UNKNOWN: code = "MPI_ERR_UNKNOWN"; break; case MPI_ERR_TRUNCATE: code = "MPI_ERR_TRUNCATE"; break; case MPI_ERR_OTHER: code = "MPI_ERR_OTHER"; break; case MPI_ERR_INTERN: code = "MPI_ERR_INTERN"; break; case MPI_ERR_PENDING: code = "MPI_ERR_PENDING"; break; case MPI_ERR_IN_STATUS: code = "MPI_ERR_IN_STATUS"; break; case MPI_ERR_LASTCODE: code = "MPI_ERR_LASTCODE"; break; default: code = "*unknown MPI error*"; } if (MPI_Error_string(errval, systemErrDesc, &len) != MPI_SUCCESS || len == 0) strcpy(systemErrDesc, "(no description available)"); snprintf(msg, sizeof(msg), "%s(%i): %s", code, errval, systemErrDesc); return msg; } #define MPI_SAFE(fncall) do { \ int retcode = (fncall); \ if_pf (retcode != MPI_SUCCESS) { \ char msg[1024]; \ snprintf(msg, sizeof(msg), "\ntestmpi encountered an MPI ERROR: %s(%i)\n", MPI_ErrorName(retcode), retcode); \ } \ } while (0) void dump_args(int argc, char **argv) { int i; printf("my args: argc=%i argv=[", argc); for (i=0; i < argc; i++) { printf("%s'%s'",(i>0?" ":""),argv[i]); } printf("]\n"); fflush(stdout); } #ifndef HAVE_MPI_INIT_THREAD #define HAVE_MPI_INIT_THREAD (MPI_VERSION >= 2) #endif #ifndef HAVE_MPI_QUERY_THREAD #define HAVE_MPI_QUERY_THREAD (MPI_VERSION >= 2) #endif // called by a single thread either before or after gex_Client_Init void init_test_mpi(int *argc, char ***argv) { int initialized = 0; #if 0 dump_args(*argc, *argv); #endif /* initialize MPI, if necessary */ MPI_SAFE(MPI_Initialized(&initialized)); #if !HAVE_MPI_INIT_THREAD if (!initialized) { printf("Initializing MPI... (legacy MPI-1 mode)\n"); MPI_SAFE(MPI_Init(argc, argv)); // legacy init } #else #ifndef MPI_THREAD_REQUIRE #if GASNET_SEQ // technically should also assert !CONDUIT_THREADS #define MPI_THREAD_REQUIRE MPI_THREAD_SINGLE #elif GASNET_CONDUIT_MPI || CONDUIT_USES_MPI // bug 3521: private mutex means we need full thread safety if conduit uses MPI in steady-state #define MPI_THREAD_REQUIRE MPI_THREAD_MULTIPLE #else #define MPI_THREAD_REQUIRE MPI_THREAD_SERIALIZED // this test is only MPI consumer #endif #endif int required = MPI_THREAD_REQUIRE; int provided = -1; if (!initialized) { printf("Initializing MPI...\n"); MPI_SAFE(MPI_Init_thread(argc, argv, required, &provided)); } else { #if HAVE_MPI_QUERY_THREAD MPI_SAFE(MPI_Query_thread(&provided)); #else provided = required; // hope for the best #endif } #if !VERBOSE if (provided < required) #endif { printf("MPI Thread safety: required=%i provided=%i (%i=SINGLE %i=FUNNELED %i=SERIALIZED %i=MULTIPLE)\n", required, provided, MPI_THREAD_SINGLE, MPI_THREAD_FUNNELED, MPI_THREAD_SERIALIZED, MPI_THREAD_MULTIPLE); } if (provided < required) { fprintf(stderr,"ERROR: MPI implementation does not report sufficient thread safety to correctly run this test.\n"); abort(); // cannot use FATALERR this early } #endif #if 0 dump_args(*argc, *argv); #endif #if GASNET_CONDUIT_UDP && !DISABLE_UDP_MPI_RANKS { // optional: tell udp-conduit to use the MPI process numbering int mpirank; MPI_SAFE(MPI_Comm_rank(MPI_COMM_WORLD, &mpirank)); AMUDP_SPMDSetProc(mpirank); } #endif MPI_SAFE(MPI_Barrier(MPI_COMM_WORLD)); } int *mpirank_to_gasnetnode = NULL; int *gasnetnode_to_mpirank = NULL; MPI_Request *mpi_recvhandle; MPI_Request *mpi_sendhandle; char **mpi_buf; int *mpi_bufsz; /* called by a single thread after gasnet_attach and args parsing */ void attach_test_mpi(void) { int mpirank; int gasnet_node; int mpinodes; int tot_threads; int i; MPI_SAFE(MPI_Barrier(MPI_COMM_WORLD)); /* setup gasnetnode <=> mpi mpirank mappings */ gasnetnode_to_mpirank = test_malloc(sizeof(int)*numranks); mpirank_to_gasnetnode = test_malloc(sizeof(int)*numranks); MPI_SAFE(MPI_Comm_rank(MPI_COMM_WORLD, &mpirank)); MPI_SAFE(MPI_Comm_size(MPI_COMM_WORLD, &mpinodes)); printf("GASNet node %i == MPI node %i\n", (int)myrank, mpirank); if (myrank != mpirank) printf("WARNING: Node numbering between GASNet and MPI do not coincide\n"); assert_always(mpinodes == numranks && mpirank >= 0 && mpirank < mpinodes); gasnet_node = myrank; MPI_SAFE(MPI_Allgather(&gasnet_node,sizeof(int),MPI_BYTE, mpirank_to_gasnetnode,sizeof(int),MPI_BYTE, MPI_COMM_WORLD)); assert_always(mpirank_to_gasnetnode[mpirank] == myrank); for (i = 0; i < mpinodes; i++) gasnetnode_to_mpirank[i] = -1; for (i = 0; i < mpinodes; i++) gasnetnode_to_mpirank[mpirank_to_gasnetnode[i]] = i; for (i = 0; i < mpinodes; i++) assert_always(gasnetnode_to_mpirank[i] != -1); tot_threads = threads_num * numranks; mpi_recvhandle = test_malloc(sizeof(MPI_Request)*tot_threads); mpi_sendhandle = test_malloc(sizeof(MPI_Request)*tot_threads); mpi_buf = test_malloc(sizeof(char *)*tot_threads); mpi_bufsz = test_malloc(sizeof(int)*tot_threads); for (i = 0; i < tot_threads; i++) { mpi_recvhandle[i] = MPI_REQUEST_NULL; mpi_sendhandle[i] = MPI_REQUEST_NULL; mpi_buf[i] = NULL; mpi_bufsz[i] = 0; } MPI_SAFE(MPI_Barrier(MPI_COMM_WORLD)); } // Used solely for corner-case exit testing void finalize_test_mpi(void) { MPI_SAFE(MPI_Finalize()); } void mpi_barrier(threaddata_t *tdata) { #if GASNET_PAR static gasnett_mutex_t barrier_mutex = GASNETT_MUTEX_INITIALIZER; static gasnett_cond_t barrier_cond = GASNETT_COND_INITIALIZER; static volatile int barrier_count = 0; static int volatile phase = 0; gasnett_mutex_lock(&barrier_mutex); barrier_count++; if (barrier_count < threads_num) { int myphase = phase; while (myphase == phase) { gasnett_cond_wait(&barrier_cond, &barrier_mutex); } } else { /* All threads here - now do the MPI barrier */ MPI_SAFE(MPI_Barrier(MPI_COMM_WORLD)); barrier_count = 0; phase = !phase; gasnett_cond_broadcast(&barrier_cond); } gasnett_mutex_unlock(&barrier_mutex); #else MPI_SAFE(MPI_Barrier(MPI_COMM_WORLD)); #endif } #if MPI_THREADSAFE #define MPI_LOCK() #define MPI_UNLOCK() #else static gex_HSL_t mpi_hsl = GEX_HSL_INITIALIZER; #define MPI_LOCK() gex_HSL_Lock(&mpi_hsl) #define MPI_UNLOCK() gex_HSL_Unlock(&mpi_hsl) #endif void mpi_handler(gex_Token_t token, harg_t tid, harg_t sz) { int mpipeer; int tag; char *buf; gex_Rank_t node = test_msgsource(token); PRINT_AM(("node=%2d> AMShort MPI Request for tid=%i, nbytes=%i\n", (int)myrank, (int)tid, (int)sz)); assert(tt_thread_map[tid] == node); assert(sz > 0); mpipeer = gasnetnode_to_mpirank[node]; tag = tid; buf = (char*)test_malloc(sz); MPI_LOCK(); assert(mpi_buf[tid] == NULL); assert(mpi_recvhandle[tid] == MPI_REQUEST_NULL); assert(mpi_sendhandle[tid] == MPI_REQUEST_NULL); mpi_buf[tid] = buf; mpi_bufsz[tid] = sz; ACTION_PRINTF("node=%2d> setting MPI_Irecv, %i bytes\n", (int)myrank, (int)sz); MPI_SAFE(MPI_Irecv(mpi_buf[tid], sz, MPI_BYTE, mpipeer, tag, MPI_COMM_WORLD, &(mpi_recvhandle[tid]))); assert(mpi_recvhandle[tid] != MPI_REQUEST_NULL); MPI_UNLOCK(); } void mpi_probehandler(gex_Token_t token, harg_t tid) { int mpipeer; int tag; int reply = 0; gex_Rank_t node = test_msgsource(token); assert(tt_thread_map[tid] == node); mpipeer = gasnetnode_to_mpirank[node]; tag = tid; MPI_LOCK(); if (mpi_recvhandle[tid] != MPI_REQUEST_NULL) { MPI_Status status; int flag = 0; MPI_SAFE(MPI_Test(&mpi_recvhandle[tid],&flag,&status)); if (flag) { int sz = mpi_bufsz[tid]; assert(mpi_recvhandle[tid] == MPI_REQUEST_NULL); assert(mpi_sendhandle[tid] == MPI_REQUEST_NULL); assert(mpi_buf[tid] != NULL && sz >= 0); ACTION_PRINTF("node=%2d> sending MPI reply message, %i bytes\n", (int)myrank, sz); MPI_SAFE(MPI_Isend(mpi_buf[tid], sz, MPI_BYTE, mpipeer, 10000+tag, MPI_COMM_WORLD, &(mpi_sendhandle[tid]))); assert(mpi_sendhandle[tid] != MPI_REQUEST_NULL); } } else if (mpi_sendhandle[tid] != MPI_REQUEST_NULL) { MPI_Status status; int flag = 0; MPI_SAFE(MPI_Test(&mpi_sendhandle[tid],&flag,&status)); if (flag) { assert(mpi_recvhandle[tid] == MPI_REQUEST_NULL); assert(mpi_sendhandle[tid] == MPI_REQUEST_NULL); reply = 1; } } else { /* nothing to do */ } MPI_UNLOCK(); if (reply) { assert(mpi_buf[tid] != NULL); test_free(mpi_buf[tid]); mpi_buf[tid] = NULL; PRINT_AM(("node=%2d> Sending AMShort MPI Reply for tid=%i\n", (int)myrank, (int)tid)); gex_AM_ReplyShort1(token, hidx_mpi_replyhandler, 0, tid); } } void mpi_replyhandler(gex_Token_t token, harg_t tid) { int ltid = tid - myrank*threads_num; PRINT_AM(("node=%2d> Got AMShort MPI Reply for tid=%d\n", (int)myrank, (int)tid)); assert(tt_thread_map[tid] == myrank); tt_thread_data[ltid].flag = 0; } int mpi_test(MPI_Request *handle) { MPI_Status status; int flag = 0; if (*handle == MPI_REQUEST_NULL) return 1; MPI_LOCK(); MPI_SAFE(MPI_Test(handle,&flag,&status)); MPI_UNLOCK(); if (flag) return 1; else return 0; } /* spin-poll until a request is complete */ void mpi_complete(MPI_Request *handle) { while (1) { if (mpi_test(handle)) return; GASNET_Safe(gasnet_AMPoll()); } } void test_mpi(threaddata_t *tdata) { MPI_Request sendhandle = MPI_REQUEST_NULL; MPI_Request recvhandle = MPI_REQUEST_NULL; int peer = tdata->tid_peer; int node = tt_thread_map[peer]; int mpipeer = gasnetnode_to_mpirank[node]; int sz; char *sendbuf; char *recvbuf; int tag = tdata->tid; int i; do { sz = RANDOM_SIZE(); } while (sz == 0); /* some MPI's may barf on 0 byte send/recv */ sendbuf = (char*)test_malloc(sz); recvbuf = (char*)test_malloc(sz); for (i=0; i < MIN(sz,4096); i++) { /* randomize at least the first 4 KB */ sendbuf[i] = (char)rand(); } ACTION_PRINTF("tid=%3d> starting MPI ping-pong with tid=%3d.\n", tdata->tid, peer); MPI_LOCK(); ACTION_PRINTF("tid=%3d> setting MPI_Irecv, %i bytes\n", tdata->tid, sz); MPI_SAFE(MPI_Irecv(recvbuf, sz, MPI_BYTE, mpipeer, 10000+tag, MPI_COMM_WORLD, &recvhandle)); assert(recvhandle != MPI_REQUEST_NULL); ACTION_PRINTF("tid=%3d> sending MPI message, %i bytes\n", tdata->tid, sz); MPI_SAFE(MPI_Isend(sendbuf, sz, MPI_BYTE, mpipeer, tag, MPI_COMM_WORLD, &sendhandle)); assert(sendhandle != MPI_REQUEST_NULL); MPI_UNLOCK(); tdata->flag = -1; gasnett_local_wmb(); ACTION_PRINTF("tid=%3d> MPI AMShortRequest to tid=%3d\n", tdata->tid, peer); gex_AM_RequestShort2(myteam, node, hidx_mpi_handler, 0, tdata->tid, sz); while (tdata->flag != 0) { ACTION_PRINTF("tid=%3d> MPI probe AMShortRequest to tid=%3d\n", tdata->tid, peer); gex_AM_RequestShort1(myteam, node, hidx_mpi_probehandler, 0, tdata->tid); gasnett_sched_yield(); test_sleep(tdata); GASNET_Safe(gasnet_AMPoll()); mpi_test(&sendhandle); /* occasional testing may be required for progress */ mpi_test(&recvhandle); } tdata->flag = -1; mpi_complete(&sendhandle); mpi_complete(&recvhandle); /* verify */ for (i=0; i < sz; i++) { if (sendbuf[i] != recvbuf[i]) FATALERR("mismatch at element %i in MPI test.", i); } test_free(sendbuf); test_free(recvbuf); ACTION_PRINTF("tid=%3d> MPI ping-pong with tid=%3d complete.\n", tdata->tid, peer); } gasnet-2025.8.0/tests/testteam.c0000664000175000017500000000643515142313673016566 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testteam.c $ * Copyright (c) 2009, The Regents of the University of California */ /* Description: basic test of split and barrier using row and col teams */ #include #ifndef TEST_SEGSZ #define TEST_SEGSZ (2*1024*1024) #endif #include /* for sqrt() */ #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int main(int argc, char **argv) { int iters=0; int64_t start,total; gex_Rank_t nrows, ncols, my_row, my_col; gex_TM_t my_row_tm, my_col_tm; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testteam", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); test_init("testteam", 1, "(iters) (nrows) (ncols)"); gex_Rank_t mynode = gex_TM_QueryRank(myteam); gex_Rank_t nodes = gex_TM_QuerySize(myteam); if (argc > 4) test_usage(); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 10000; if (argc > 2) { nrows = atoi(argv[2]); } else { /* search for as near to square as possible */ nrows = sqrt(nodes); while (nodes % nrows) --nrows; } if (argc > 3) { ncols = atoi(argv[3]); } else { ncols = nodes / nrows; } assert_always(nrows*ncols == nodes); MSG0("Running team test with a %u-by-%u grid and %i iterations...\n", (int)nrows, (int)ncols, iters); BARRIER(); my_row = mynode / ncols; my_col = mynode % ncols; struct { uint8_t *addr; size_t size; } teamA_scratch, teamB_scratch; { uint8_t *addr = TEST_MYSEG(); uintptr_t size = TEST_SEGSZ / 2; assert_always(size >= 4096); // some non-trivial (non-zero) size teamA_scratch.addr = addr; teamA_scratch.size = size; teamB_scratch.addr = addr + size; teamB_scratch.size = size; } gex_TM_Split(&my_row_tm, myteam, my_row, 1+2*my_col /*gaps*/, teamA_scratch.addr, teamA_scratch.size, 0); gex_TM_Split(&my_col_tm, myteam, my_col, my_row, teamB_scratch.addr, teamB_scratch.size, 0); if (my_col == 0) { printf("row team %u: Running team barrier test with row teams...\n", (int)my_row); fflush(stdout); } BARRIER(); start = TIME(); for (int i=0; i < iters; i++) { gex_Event_Wait(gex_Coll_BarrierNB(my_row_tm, 0)); } total = TIME() - start; if (my_col == 0) { printf("row team %u: total time: %8.3f sec, avg row team Barrier latency: %8.3f us\n", (int)my_row, ((float)total)/1000000, ((float)total)/iters); fflush(stdout); } if (my_row == 0) { printf("col team %u: Running team barrier test with column teams...\n", (int)my_col); fflush(stdout); } BARRIER(); start = TIME(); for (int i=0; i < iters; i++) { gex_Event_Wait(gex_Coll_BarrierNB(my_row_tm, 0)); } total = TIME() - start; if (my_row == 0) { printf("col team %u: total time: %8.3f sec Avg column team Barrier latency: %8.3f us\n", (int)my_col, ((float)total)/1000000, ((float)total)/iters); fflush(stdout); } BARRIER(); gex_TM_Destroy(my_row_tm, NULL, 0); gex_TM_Destroy(my_col_tm, NULL, 0); MSG("done."); gasnet_exit(0); /* for faster exit */ return 0; } gasnet-2025.8.0/tests/testcontend.c0000664000175000017500000005003715142313673017267 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testcontend.c $ * * Description: GASNet threaded contention tester. * The test initializes GASNet and forks off up to 256 threads. * The test measures the level of inter-thread contention for local * network resources with various different usage patterns. * * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #include "test.h" #ifndef GASNET_PAR #error This test can only be built for GASNet PAR configuration #endif static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; static gex_Rank_t myrank; static gex_Rank_t numranks; typedef struct { int activecnt; int passivecnt; } threadcnt_t; typedef gex_AM_Arg_t harg_t; /* configurable parameters */ #define DEFAULT_ITERS 50 int iters = DEFAULT_ITERS; int amactive; int peer = -1; char *peerseg = NULL; int threads; struct { char pad0[GASNETT_CACHE_LINE_BYTES]; gasnett_atomic_t _pong; char pad1[GASNETT_CACHE_LINE_BYTES - sizeof(gasnett_atomic_t)]; volatile int _signal_done; char pad2[GASNETT_CACHE_LINE_BYTES - sizeof(int)]; } globals = {{0}, gasnett_atomic_init(0), {0}, 0, {0}}; #define pong globals._pong #define signal_done globals._signal_done #define thread_barrier() PTHREAD_BARRIER(threads) int revthreads = 0; #define ARG2THREAD(arg) (revthreads?(threads-1)-(int)(intptr_t)args:(int)(intptr_t)args) typedef void * (*threadmain_t)(void *args); /* AM Handlers */ void ping_shorthandler(gex_Token_t token); void pong_shorthandler(gex_Token_t token); void markdone_shorthandler(gex_Token_t token); #define hidx_ping_shorthandler 201 #define hidx_pong_shorthandler 202 #define hidx_markdone_shorthandler 203 gex_AM_Entry_t htable[] = { { hidx_ping_shorthandler, (gex_AM_Fn_t)ping_shorthandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 }, { hidx_pong_shorthandler, (gex_AM_Fn_t)pong_shorthandler, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_SHORT, 0 }, { hidx_markdone_shorthandler, (gex_AM_Fn_t)markdone_shorthandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 }, }; #define HANDLER_TABLE_SIZE (sizeof(htable)/sizeof(gex_AM_Entry_t)) #define SPINPOLL_UNTIL(cond) do { while (!(cond)) gasnet_AMPoll(); } while (0) #define BARRIER_UNTIL(cond) do { \ if (mythread == 0) SPINPOLL_UNTIL(cond); \ else if (mythread == 1) { \ /* one thread sits in barrier during test */ \ gasnet_barrier_notify(0,GASNET_BARRIERFLAG_ANONYMOUS); \ GASNET_Safe(gasnet_barrier_wait(0,GASNET_BARRIERFLAG_ANONYMOUS)); \ } \ } while (0) int _havereport = 0; char _reportstr[644]; static gasnett_atomic_t pgcounter = gasnett_atomic_init(0); const char *getreport(void) { if (_havereport) { _havereport = 0; return _reportstr; } else return NULL; } void report(gasnett_tick_t ticks) { double timeus = (double)gasnett_ticks_to_ns(ticks)/1000; char pgcount[32] = {0}; gasnett_atomic_val_t count = gasnett_atomic_swap(&pgcounter,0,0); if (count && (timeus > 0.)) snprintf(pgcount, sizeof(pgcount), "%12lu ops/s", (unsigned long)(count/(timeus*1e-6))); snprintf(_reportstr, sizeof(_reportstr), "%7.3f us\t%5.3f sec%s", timeus/iters, timeus/1000000, pgcount); _havereport = 1; } /* testing functions */ #define AMPINGPONG(fnname, POLLUNTIL) \ void * fnname(void *args) { \ int mythread = ARG2THREAD(args); \ static int nonzero_present = 0; \ gasnett_tick_t start, end; \ signal_done = 0; \ if (mythread != 0) nonzero_present = 1; \ thread_barrier(); \ if (mythread == 0) { \ int i; \ gasnett_atomic_set(&pong,0,0); \ start = gasnett_ticks_now(); \ for (i = 0; i < iters; i++) { \ gex_AM_RequestShort0(myteam, peer, hidx_ping_shorthandler, 0); \ POLLUNTIL(gasnett_atomic_read(&pong,0) > i); \ } \ end = gasnett_ticks_now(); \ gex_AM_RequestShort0(myteam, peer, hidx_markdone_shorthandler, 0); \ gex_AM_RequestShort0(myteam, myrank, hidx_markdone_shorthandler, 0); \ if (!nonzero_present) { \ mythread = 1; /* ensure it runs once, impersonating thread1 */ \ POLLUNTIL(signal_done); \ mythread = 0; \ } \ } else { \ POLLUNTIL(signal_done); \ } \ thread_barrier(); \ nonzero_present = 0; \ if (mythread == 0 && amactive) report(end-start); \ return NULL; \ } AMPINGPONG(ampingpong_poll_active, SPINPOLL_UNTIL) AMPINGPONG(ampingpong_block_active, GASNET_BLOCKUNTIL) AMPINGPONG(ampingpong_barrier_active, BARRIER_UNTIL) #define PUTGETPINGPONG(fnname, POLLUNTIL, putgetstmt) \ void * fnname(void *args) { \ struct { \ char pad0[GASNETT_CACHE_LINE_BYTES]; \ int64_t datum; \ char pad1[GASNETT_CACHE_LINE_BYTES-sizeof(int64_t)]; \ } locals = {{0}, 0, {0}}; \ int mythread = ARG2THREAD(args); \ static int nonzero_present = 0; \ gasnett_tick_t start, end; \ signal_done = 0; \ if (mythread != 0) nonzero_present = 1; \ thread_barrier(); \ if (mythread == 0) { \ int i; \ gasnett_atomic_set(&pong,0,0); \ start = gasnett_ticks_now(); \ for (i = 0; i < iters; i++) { \ putgetstmt; \ } \ end = gasnett_ticks_now(); \ gex_AM_RequestShort0(myteam, peer, hidx_markdone_shorthandler, 0); \ gex_AM_RequestShort0(myteam, myrank, hidx_markdone_shorthandler, 0); \ if (!nonzero_present) { \ mythread = 1; /* ensure it runs once, impersonating thread1 */ \ POLLUNTIL(signal_done); \ mythread = 0; \ } \ } else { \ POLLUNTIL(signal_done); \ } \ thread_barrier(); \ nonzero_present = 0; \ if (mythread == 0 && amactive) report(end-start); \ return NULL; \ } PUTGETPINGPONG(put_poll_active, SPINPOLL_UNTIL, gex_RMA_PutBlocking(myteam, peer, peerseg, &locals.datum, 8, 0)) PUTGETPINGPONG(get_poll_active, SPINPOLL_UNTIL, gex_RMA_GetBlocking(myteam, &locals.datum, peer, peerseg, 8, 0)) PUTGETPINGPONG(put_block_active, GASNET_BLOCKUNTIL, gex_RMA_PutBlocking(myteam, peer, peerseg, &locals.datum, 8, 0)) PUTGETPINGPONG(get_block_active, GASNET_BLOCKUNTIL, gex_RMA_GetBlocking(myteam, &locals.datum, peer, peerseg, 8, 0)) PUTGETPINGPONG(put_barrier_active, BARRIER_UNTIL, gex_RMA_PutBlocking(myteam, peer, peerseg, &locals.datum, 8, 0)) PUTGETPINGPONG(get_barrier_active, BARRIER_UNTIL, gex_RMA_GetBlocking(myteam, &locals.datum, peer, peerseg, 8, 0)) #define PGFIGHT(fnname, putgetstmt_loner, putgetstmt_rest) \ void * fnname(void *args) { \ struct { \ char pad0[GASNETT_CACHE_LINE_BYTES]; \ int64_t datum; \ char pad1[GASNETT_CACHE_LINE_BYTES-sizeof(int64_t)]; \ } locals = {{0}, 0, {0}}; \ int mythread = ARG2THREAD(args); \ gasnett_tick_t start, end; \ signal_done = 0; \ if (mythread == 0) gasnett_atomic_set(&pgcounter,0,0); \ thread_barrier(); \ if (mythread == 0) { \ int i; \ start = gasnett_ticks_now(); \ for (i = 0; i < iters; i++) { \ putgetstmt_loner; \ } \ end = gasnett_ticks_now(); \ gex_AM_RequestShort0(myteam, peer, hidx_markdone_shorthandler, 0); \ gex_AM_RequestShort0(myteam, myrank, hidx_markdone_shorthandler, 0); \ gasnett_atomic_add(&pgcounter,iters,0); \ } else { \ gasnett_atomic_val_t count = 0; \ while(!signal_done) { \ putgetstmt_rest; \ count++; \ } \ gasnett_atomic_add(&pgcounter,count,0); \ } \ thread_barrier(); \ if (mythread == 0 && amactive) report(end-start); \ return NULL; \ } \ PGFIGHT(put_put_active, gex_RMA_PutBlocking(myteam, peer, peerseg, &locals.datum, 8, 0), gex_RMA_PutBlocking(myteam, peer, peerseg, &locals.datum, 8, 0)) PGFIGHT(put_get_active, gex_RMA_PutBlocking(myteam, peer, peerseg, &locals.datum, 8, 0), gex_RMA_GetBlocking(myteam, &locals.datum, peer, peerseg, 8, 0)) PGFIGHT(get_put_active, gex_RMA_GetBlocking(myteam, &locals.datum, peer, peerseg, 8, 0), gex_RMA_PutBlocking(myteam, peer, peerseg, &locals.datum, 8, 0)) PGFIGHT(get_get_active, gex_RMA_GetBlocking(myteam, &locals.datum, peer, peerseg, 8, 0), gex_RMA_GetBlocking(myteam, &locals.datum, peer, peerseg, 8, 0)) void * poll_passive(void *args) { int mythread = ARG2THREAD(args); signal_done = 0; thread_barrier(); while (!signal_done) gasnet_AMPoll(); thread_barrier(); return NULL; } void * block_passive(void *args) { int mythread = ARG2THREAD(args); signal_done = 0; thread_barrier(); GASNET_BLOCKUNTIL(signal_done); thread_barrier(); return NULL; } void * barrier_passive(void *args) { int mythread = ARG2THREAD(args); signal_done = 0; thread_barrier(); while (!signal_done) gasnet_AMPoll(); if (mythread == 0) { /* match the barrier the active side is waiting for */ gasnet_barrier_notify(0,GASNET_BARRIERFLAG_ANONYMOUS); GASNET_Safe(gasnet_barrier_wait(0,GASNET_BARRIERFLAG_ANONYMOUS)); } thread_barrier(); return NULL; } typedef struct { const char *desc; threadmain_t activefunc; threadmain_t passivefunc; } fntable_t; fntable_t fntable[] = { { "AM Ping-pong vs. spin-AMPoll()", ampingpong_poll_active, poll_passive }, { "AM Ping-pong vs. BLOCKUNTIL", ampingpong_block_active, block_passive }, { "gex_RMA_PutBlocking vs. spin-AMPoll()", put_poll_active, poll_passive }, { "gex_RMA_PutBlocking vs. BLOCKUNTIL", put_block_active, block_passive }, { "gex_RMA_GetBlocking vs. spin-AMPoll()", get_poll_active, poll_passive }, { "gex_RMA_GetBlocking vs. BLOCKUNTIL", get_block_active, block_passive }, { "gex_RMA_PutBlocking vs. gex_RMA_PutBlocking", put_put_active, poll_passive }, { "gex_RMA_PutBlocking vs. gex_RMA_GetBlocking", put_get_active, poll_passive }, { "gex_RMA_GetBlocking vs. gex_RMA_PutBlocking", get_put_active, poll_passive }, { "gex_RMA_GetBlocking vs. gex_RMA_GetBlocking", get_get_active, poll_passive }, { "AM Ping-pong vs. local barrier", ampingpong_barrier_active, barrier_passive }, { "gex_RMA_PutBlocking vs. local barrier", put_barrier_active, barrier_passive }, { "gex_RMA_GetBlocking vs. local barrier", get_barrier_active, barrier_passive }, }; #define NUM_FUNC (sizeof(fntable)/sizeof(fntable_t)) int tcountentries; threadcnt_t *tcount; void *workerthread(void *args) { int fnidx; int mythread = ARG2THREAD(args); for (fnidx = 0; fnidx < NUM_FUNC; fnidx++) { int tcountpos; if (mythread == 0) TEST_SECTION_BEGIN(); thread_barrier(); if (!TEST_SECTION_ENABLED()) { thread_barrier(); continue; } if (mythread == 0 && myrank == 0) { MSG("%c: --------------------------------------------------------------------------", TEST_SECTION_NAME()); MSG("%c: Running test %s", TEST_SECTION_NAME(), fntable[fnidx].desc); MSG("%c: --------------------------------------------------------------------------", TEST_SECTION_NAME()); MSG("%c: Active-end threads\tPassive-end threads\t IterTime\tTotalTime", TEST_SECTION_NAME()); MSG("%c: --------------------------------------------------------------------------", TEST_SECTION_NAME()); } for (tcountpos = 0; tcountpos < tcountentries; tcountpos++) { threadmain_t mainfn = amactive ? fntable[fnidx].activefunc : fntable[fnidx].passivefunc; int participating_threads = amactive ? tcount[tcountpos].activecnt : tcount[tcountpos].passivecnt; thread_barrier(); if (mythread < participating_threads) mainfn(args); else { /* match barriers */ thread_barrier(); thread_barrier(); } thread_barrier(); if (mythread == 0 && amactive) { const char *rpt = getreport(); if (rpt) MSG("%c:\t %d\t\t\t %d\t\t%s", TEST_SECTION_NAME(), tcount[tcountpos].activecnt, tcount[tcountpos].passivecnt, rpt); } } } return NULL; } int main(int argc, char **argv) { int maxthreads = 4; int i; int arg; int help = 0; threadcnt_t *ptcount; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testcontend", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, HANDLER_TABLE_SIZE)); myrank = gex_TM_QueryRank(myteam); numranks = gex_TM_QuerySize(myteam); test_init("testcontend",1,"[options] (maxthreads) (iters) (test_sections)\n" " The -rev option reverses thread numbering"); arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-rev")) { revthreads = 1; ++arg; } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (argc > arg) { maxthreads = atoi(argv[arg]); ++arg; } if (argc > arg) { iters = atoi(argv[arg]); ++arg; } if (argc > arg) { TEST_SECTION_PARSE(argv[arg]); ++arg; } if (argc > arg || help) test_usage(); if (maxthreads > TEST_MAXTHREADS || maxthreads < 1) { printf("Threads must be between 1 and %i\n", TEST_MAXTHREADS); gasnet_exit(-1); } maxthreads = test_thread_limit(maxthreads); if (numranks % 2 != 0) { MSG0("WARNING: This test requires an even number of nodes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harnesses for smp-conduit */ } if (myrank == 0) { MSG("Running testcontend with 1..%i threads and %i iterations", maxthreads, iters); } tcountentries = 3 * maxthreads; tcount = test_malloc(tcountentries * sizeof(threadcnt_t)); ptcount = tcount; for (i = 1; i <= maxthreads; i++) { ptcount->activecnt = i; ptcount->passivecnt = 1; ptcount++; } for (i = 1; i <= maxthreads; i++) { ptcount->activecnt = 1; ptcount->passivecnt = i; ptcount++; } for (i = 1; i <= maxthreads; i++) { ptcount->activecnt = i; ptcount->passivecnt = i; ptcount++; } peer = (myrank + 1) % numranks; amactive = (myrank % 2 == 0); peerseg = TEST_SEG(peer); /* create all worker threads */ threads = maxthreads; test_createandjoin_pthreads(maxthreads, &workerthread, NULL, 0); BARRIER(); if (myrank == 0) MSG("Tests complete"); BARRIER(); gasnet_exit(0); return 0; } /****************************************************************/ /* AM Handlers */ void ping_shorthandler(gex_Token_t token) { gex_AM_ReplyShort0(token, hidx_pong_shorthandler, 0); } void pong_shorthandler(gex_Token_t token) { gasnett_atomic_increment(&pong,0); } void markdone_shorthandler(gex_Token_t token) { signal_done = 1; } gasnet-2025.8.0/tests/testbarrierlate.c0000664000175000017500000001544315142313673020133 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testbarrierlate.c $ * Description: GASNet barrier performance test * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #define TEST_DELAY 1 #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int main(int argc, char **argv) { struct delay_s { int64_t delay_us; int64_t delay_loops; } delay_params; int mynode, nodes, iters=0; int64_t start,total,delay_us,baseline_us; int64_t min_time, max_time, avg_time; int64_t delay_loops = 0; int j, i = 0; int pause_len; int pollcnt = 0; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testbarrierlate", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); test_init("testbarrierlate",1,"(iters) (pollcnt)"); mynode = gex_TM_QueryRank(myteam); nodes = gex_TM_QuerySize(myteam); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 10000; if (argc > 2) pollcnt = atoi(argv[2]); if (argc > 3) test_usage(); if (mynode == 0) { printf("Running barrier late arrival test with %i iterations, pollcnt=%i...\n",iters, pollcnt); fflush(stdout); } BARRIER(); /* warmup */ for (i=0; i < MIN(100,iters/100); i++) { gasnet_barrier_notify(0, GASNET_BARRIERFLAG_ANONYMOUS); GASNET_Safe(gasnet_barrier_wait(0, GASNET_BARRIERFLAG_ANONYMOUS)); } BARRIER(); start = TIME(); for (i=0; i < iters; i++) { gasnet_barrier_notify(0, GASNET_BARRIERFLAG_ANONYMOUS); GASNET_Safe(gasnet_barrier_wait(0, GASNET_BARRIERFLAG_ANONYMOUS)); } baseline_us = TIME() - start; BARRIER(); if (mynode == 0) { printf("Total time: %8.3f sec Avg Anon. Barrier latency: %8.3f us\n", ((float)baseline_us)/1000000, ((float)baseline_us)/iters); fflush(stdout); } /* Calibrate a delay loop. Given "iters" and "delay_us", we determine the argument * we need when calling test_delay() iters times, to get a _total_ delay no less than * delay_us. The value of delay_us is overwritten with the achieved delay. * We calibrate the delay on exactly one node to avoid spoiling timings on * overcommitted CPUs. Nodes not performing the calibration sleep for at least twice * the time we are calibrating for. (No way to be sure this is enough, since * calibration is iterative.) */ BARRIER(); pause_len = 1 + 4 * (baseline_us + 999999)/1000000; if (mynode == 0) { struct delay_s *p = (struct delay_s *)TEST_MYSEG(); start = TIME(); printf("Calibrating delay loop (expect at least a %d sec pause)...\n", pause_len); fflush(stdout); p->delay_us = 2*baseline_us; /* delay at least two full barrier times */ p->delay_loops = test_calibrate_delay(iters, pollcnt, &(p->delay_us)); } else { sleep(pause_len); } BARRIER(); gex_RMA_GetBlocking(myteam, &delay_params, 0, TEST_SEG(0), sizeof(struct delay_s), 0); delay_us = delay_params.delay_us; delay_loops = delay_params.delay_loops; if (mynode == 0) { printf("Calibration complete (actual pause = %5.3f sec).\n", (float)((TIME()-start)/1000000.0)); printf("Ideal loop time = %8.3f sec.\n", (float)(delay_us)/1000000.0); fflush(stdout); } /* Take turns being late to notify * We insert a delay before the _notify() on one node. * This simulates a load imbalance between barriers. * The time reported is how much the barrier costs excluding the delay. * This reported time will often be less than the full barrier because * some progress was made by the other nodes. */ avg_time = 0; max_time = 0; min_time = (int64_t)1 << 62; /* good enough */ for (j=0; j < nodes; j++) { BARRIER(); start = TIME(); for (i=0; i < iters; i++) { if (j == mynode) { test_delay(delay_loops, pollcnt); } gasnet_barrier_notify(0, GASNET_BARRIERFLAG_ANONYMOUS); GASNET_Safe(gasnet_barrier_wait(0, GASNET_BARRIERFLAG_ANONYMOUS)); } total = TIME() - start; if (mynode == 0) { printf("Total time: %8.3f sec Late-notify test on node %d\n", ((float)total)/1000000, j); fflush(stdout); } total -= delay_us; avg_time += total; min_time = MIN(min_time, total); max_time = MAX(max_time, total); } avg_time /= nodes; if (mynode == 0) { printf("Total difference: %8.3f sec Late notify() Anon. Barrier net latency, minimum: %8.3f us (%6.2f%%)\n", ((float)min_time)/1000000, ((float)min_time)/iters, ((float)min_time * 100.)/baseline_us); printf("Total difference: %8.3f sec Late notify() Anon. Barrier net latency, maximum: %8.3f us (%6.2f%%)\n", ((float)max_time)/1000000, ((float)max_time)/iters, ((float)max_time * 100.)/baseline_us); printf("Total difference: %8.3f sec Late notify() Anon. Barrier net latency, average: %8.3f us (%6.2f%%)\n", ((float)avg_time)/1000000, ((float)avg_time)/iters, ((float)avg_time * 100.)/baseline_us); fflush(stdout); } /* Take turns being late to wait * We insert a delay between the _notify() and _wait() on one node. * This simulates a load imbalance between barrier notify and wait. * The time reported is how much the barrier costs excluding the delay. * This reported time will often be less than the full barrier because * some progress was made by the other nodes. */ avg_time = 0; max_time = 0; min_time = (int64_t)1 << 62; /* good enough */ for (j=0; j < nodes; j++) { BARRIER(); start = TIME(); for (i=0; i < iters; i++) { gasnet_barrier_notify(0, GASNET_BARRIERFLAG_ANONYMOUS); if (j == mynode) { test_delay(delay_loops, pollcnt); } GASNET_Safe(gasnet_barrier_wait(0, GASNET_BARRIERFLAG_ANONYMOUS)); } total = TIME() - start; if (mynode == 0) { printf("Total time: %8.3f sec Late-wait test on node %d\n", ((float)total)/1000000, j); fflush(stdout); } total -= delay_us; avg_time += total; min_time = MIN(min_time, total); max_time = MAX(max_time, total); } avg_time /= nodes; if (mynode == 0) { printf("Total difference: %8.3f sec Late wait() Anon. Barrier net latency, minimum: %8.3f us (%6.2f%%)\n", ((float)min_time)/1000000, ((float)min_time)/iters, ((float)min_time * 100.)/baseline_us); printf("Total difference: %8.3f sec Late wait() Anon. Barrier net latency, maximum: %8.3f us (%6.2f%%)\n", ((float)max_time)/1000000, ((float)max_time)/iters, ((float)max_time * 100.)/baseline_us); printf("Total difference: %8.3f sec Late wait() Anon. Barrier net latency, average: %8.3f us (%6.2f%%)\n", ((float)avg_time)/1000000, ((float)avg_time)/iters, ((float)avg_time * 100.)/baseline_us); fflush(stdout); } BARRIER(); MSG("done."); gasnet_exit(0); return 0; } gasnet-2025.8.0/tests/testalltoall.c0000664000175000017500000002360115142313673017436 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testalltoall.c $ * Description: GASNet AM all-to-all correctness tests * Copyright (c) 2020, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include #include static int do_reply = 0; static gasnett_atomic_t counter; enum { hidx_ping_shorthandler = GEX_AM_INDEX_BASE, hidx_ping_medhandler, hidx_pong_shorthandler, hidx_pong_medhandler }; void ping_shorthandler(gex_Token_t token) { if (do_reply) gex_AM_ReplyShort0(token, hidx_pong_shorthandler, 0); else gasnett_atomic_increment(&counter,0); } void ping_medhandler(gex_Token_t token, void *buf, size_t nbytes) { if (do_reply) gex_AM_ReplyMedium0(token, hidx_pong_medhandler, buf, nbytes, GEX_EVENT_NOW, 0); else gasnett_atomic_increment(&counter,0); } void pong_shorthandler(gex_Token_t token) { gasnett_atomic_increment(&counter,0); } void pong_medhandler(gex_Token_t token, void *buf, size_t nbytes) { gasnett_atomic_increment(&counter,0); } gex_AM_Entry_t htable[] = { { hidx_ping_shorthandler, (gex_AM_Fn_t)ping_shorthandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 }, { hidx_ping_medhandler, (gex_AM_Fn_t)ping_medhandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 0 }, { hidx_pong_shorthandler, (gex_AM_Fn_t)pong_shorthandler, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_SHORT, 0 }, { hidx_pong_medhandler, (gex_AM_Fn_t)pong_medhandler, GEX_FLAG_AM_REPLY |GEX_FLAG_AM_MEDIUM, 0 }, }; /* ------------------------------------------------------------------------------------ */ static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; static gex_Rank_t myrank; static gex_Rank_t numranks; /* ------------------------------------------------------------------------------------ */ // Produce a sequence of ranks to send to according to one of three paterns static enum { SEQUENCE_POLITE, // Each rank starts sending to self SEQUENCE_HOTSPOT, // Each rank starts sending to 0 SEQUENCE_RANDOM // Each rank uses a distinct random sequence } seq_type = SEQUENCE_RANDOM; static gex_Rank_t *rank_array = NULL; void init_ranks(void) { int first_call = !rank_array; if (first_call) { rank_array = test_malloc(numranks * sizeof(gex_Rank_t)); // consecutive entries, starting from 0 or self gex_Rank_t start = (seq_type == SEQUENCE_POLITE) ? myrank : 0; for (gex_Rank_t r = 0; r < numranks; ++r) { rank_array[r] = (r+start) % numranks; } } if (seq_type == SEQUENCE_RANDOM) { // permute the array on *every* call // TODO: Currently this is used to shuffle the array once every "round". // However, there are alternatives which would provide greater randomness, // and could even create a bias that favors consecutive sends to the same // peer or to peers on the same node. Use of the same space to count AMs // sent to each peer should be sufficient for that purpose. for (gex_Rank_t r = 0; r < numranks-1; ++r) { gex_Rank_t p = TEST_RAND(r, numranks - 1); gex_Rank_t tmp = rank_array[r]; rank_array[r] = rank_array[p]; rank_array[p] = tmp; } } } /* ------------------------------------------------------------------------------------ */ int main(int argc, char **argv) { int progress = 0; int min_size = 0; int step_size = 0; int help = 0; uint8_t payload_byte = 0; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testalltoall", &argc, &argv, 0)); myrank = gex_TM_QueryRank(myteam); numranks = gex_TM_QuerySize(myteam); //GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); UNUSED GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); int argi = 1; while (argc > argi) { if (!strcmp(argv[argi], "-random")) { seq_type = SEQUENCE_RANDOM; ++argi; } else if (!strcmp(argv[argi], "-polite")) { seq_type = SEQUENCE_POLITE; ++argi; } else if (!strcmp(argv[argi], "-hotspot")) { seq_type = SEQUENCE_HOTSPOT; ++argi; } else if (!strcmp(argv[argi], "-progress")) { // UNDOCUMENTED progress = 1; ++argi; } else if (!strcmp(argv[argi], "-min-size")) { ++argi; if (argc > argi) { min_size = atoi(argv[argi]); argi++; } else help = 1; } else if (!strcmp(argv[argi], "-step-size")) { ++argi; if (argc > argi) { step_size = atoi(argv[argi]); argi++; } else help = 1; } else if (!strcmp(argv[argi], "-reply")) { do_reply = 1; ++argi; } else if (!strcmp(argv[argi], "-no-reply")) { do_reply = 0; ++argi; } else if (!strcmp(argv[argi], "-payload-byte")) { ++argi; if (argc > argi) { payload_byte = atoi(argv[argi]); argi++; } else help = 1; } else if (argv[argi][0] == '-') { help = 1; ++argi; } else break; } int iters = 0; if (argc > argi) { iters = atoi(argv[argi]); ++argi; } if (!iters) iters = 1000; size_t med_sz = 0; if (argc > argi) { med_sz = atoi(argv[argi]); ++argi; } if (!med_sz) med_sz = MIN(gex_AM_LUBRequestMedium(),gex_AM_LUBReplyMedium()); unsigned int seed = 0; if (argc > argi) { seed = atoi(argv[argi]); ++argi; } if (!seed) seed = ((unsigned int)TIME() ^ myrank) & 0xFFFF; TEST_SRAND(seed); if ((min_size < 0) || (min_size > med_sz)) min_size = med_sz; if ((step_size < 0) || (step_size > med_sz)) step_size = 0; // TODO: test sections test_init("testalltoall",0,"[options] (iters) (maxsz) (seed)\n" " -payload-byte N\n" " Medium payload buffer is initialized to this value mod 256.\n" " The default is zero.\n" " The following options determine the communication pattern:\n" " -random: each process sends to others in a distinct random order\n" " -polite: each process sends round-robin starting with itself\n" " -hotspot: each process sends round-robin starting with process 0\n" " The default for this option group is '-random'.\n" " The following options control the use of AM Replies:\n" " -no-reply: no Replies will be sent\n" " -reply: every Request will send a corresponding Reply\n" " The default for this option group is '-no-reply'.\n" " The following options determine the Medium payload size(s):\n" " -min-size N\n" " Sets the minimum payload size.\n" " Invalid values (less than zero or larger than the maximum)\n" " will set the minimum equal to the maximum.\n" " -step-size N\n" " Sets a value by which the payload size increases at each\n" " successive Request, starting from the minimum and wrapping\n" " back to the minimum when the size would exceed the maximum.\n" " Invalid values (zero or larger than the maximum) select\n" " uniformly distributed random payload sizes, rather than\n" " fixed-width steps.\n" " The default for this option group is '-min-size 0 -step-size 0'."); if (help || argc > argi) test_usage(); int rounds = (iters + numranks - 1) / numranks; iters = rounds * numranks; int tick = iters/10; void *payload = test_malloc(med_sz); memset(payload, payload_byte, med_sz); gasnett_atomic_set(&counter,0,0); fflush(stdout); fflush(stderr); sleep(1); BARRIER(); MSG0("Running %d iterations", iters); switch (seq_type) { case SEQUENCE_RANDOM: MSG0(" peer sequence: random"); break; case SEQUENCE_POLITE: MSG0(" peer sequence: polite"); break; case SEQUENCE_HOTSPOT: MSG0(" peer sequence: hotspot"); break; } MSG0(" replies: %s", do_reply?"YES":"NO"); MSG0(" payload byte: 0x%02x", payload_byte); MSG0("Starting Short0 test"); for (int r = 0, sent = 1; r < rounds; ++r) { init_ranks(); for (gex_Rank_t i = 0; i < numranks; ++i, ++sent) { gex_AM_RequestShort0(myteam, rank_array[i], hidx_ping_shorthandler, 0); if (progress && !((iters-sent) % tick)) { MSG0("Sent %d of %d (%d %s received)", sent, iters, (int)gasnett_atomic_read(&counter,0), do_reply ? "replies" : "requests"); } } } GASNET_BLOCKUNTIL(gasnett_atomic_read(&counter,0) == iters); gasnett_atomic_set(&counter,0,0); BARRIER(); MSG0("Starting Medium0 test"); if (min_size == med_sz) { MSG0(" payload size: %"PRIuSZ, med_sz); } else if (step_size) { MSG0(" payload size: in [%d, %"PRIuSZ"] with step size of %d", min_size, med_sz, step_size); } else { MSG0(" payload size: in [%d, %"PRIuSZ"] with uniform random distribution", min_size, med_sz); } size_t prev_sz = med_sz; // wrap to min in first iteration for (int r = 0, sent = 1; r < rounds; ++r) { init_ranks(); for (gex_Rank_t i = 0; i < numranks; ++i, ++sent) { size_t sz; if (step_size) { sz = prev_sz + step_size; if (sz > med_sz) sz = min_size; } else { sz = TEST_RAND(min_size, med_sz); } assert(sz <= med_sz); assert(sz >= min_size); prev_sz = sz; gex_AM_RequestMedium0(myteam, rank_array[i], hidx_ping_medhandler, payload, sz, GEX_EVENT_GROUP, 0); if (progress && !((iters-sent) % tick)) { MSG0("Sent %d of %d (%d %s received)", sent, iters, (int)gasnett_atomic_read(&counter,0), do_reply ? "replies" : "requests"); } } } gex_NBI_Wait(GEX_EC_AM,0); GASNET_BLOCKUNTIL(gasnett_atomic_read(&counter,0) == iters); gasnett_atomic_set(&counter,0,0); BARRIER(); // TODO: Long0 MSG0("done."); test_free(rank_array); test_free(payload); gasnet_exit(0); return 0; } gasnet-2025.8.0/tests/delay.c0000664000175000017500000000164115142313673016030 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/delay.c $ * Description: * Copyright 2004, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include #include static volatile float x, y; static volatile float z = (1.00001); float test_bogus(void) { /* ensure the values escape (otherwise x is dead) */ return x+y+z; } void test_delay (int64_t n, int pollcnt) { int64_t i,j; y = z; x = 1.0; if (pollcnt) { /* include pollcnt AMPolls, evenly interspersed */ int64_t n_chunk = n / (pollcnt+1); for (j=0; j #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; gex_Rank_t mynode = 0; gex_Rank_t next = 0; gex_Rank_t prev = 0; void *myseg = NULL; void *nextseg = NULL; void *prevseg = NULL; void *addr_tbl[] = { (void*)NULL, /* Will become myseg */ (void*)NULL, (void*)(uintptr_t)1, (void*)(~(uintptr_t)0), #if PLATFORM_ARCH_32 (void*)(uintptr_t)0x12345678 #else (void*)(uintptr_t)0x123456789abcdefLL #endif }; #define NUM_ADDRS (sizeof(addr_tbl)/sizeof(addr_tbl[0])) #define hidx_ping_medhandler 201 #define hidx_pong_medhandler 202 #define hidx_ping_longhandler 203 #define hidx_pong_longhandler 204 volatile int flag = 0; void ping_medhandler(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t addr_idx) { void *source_addr = addr_tbl[(int)addr_idx]; gex_AM_ReplyMedium0(token, hidx_pong_medhandler, source_addr, 0, GEX_EVENT_NOW, 0); } void pong_medhandler(gex_Token_t token, void *buf, size_t nbytes) { flag++; } void ping_longhandler(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t addr_idx) { void *source_addr = addr_tbl[(int)addr_idx]; if (buf != (addr_idx ? source_addr : prevseg)) { ERR("Long Request handler received buf=%p when expecting %p", buf, source_addr); } gex_AM_ReplyLong1(token, hidx_pong_longhandler, source_addr, 0, source_addr, GEX_EVENT_NOW, 0, addr_idx); } void pong_longhandler(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t addr_idx) { void *source_addr = addr_tbl[(int)addr_idx]; if (buf != (addr_idx ? source_addr : nextseg)) { ERR("Long Reply handler received buf=%p when expecting %p", buf, source_addr); } flag++; } /* ------------------------------------------------------------------------------------ */ static void testAMSrcAddr(void); int main(int argc, char **argv) { gex_AM_Entry_t htable[] = { { hidx_ping_medhandler, (gex_AM_Fn_t)ping_medhandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 1 }, { hidx_pong_medhandler, (gex_AM_Fn_t)pong_medhandler, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_MEDIUM, 0 }, { hidx_ping_longhandler, (gex_AM_Fn_t)ping_longhandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, 1 }, { hidx_pong_longhandler, (gex_AM_Fn_t)pong_longhandler, GEX_FLAG_AM_REPLY|GEX_FLAG_AM_LONG, 1 } }; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testcore3", &argc, &argv, 0)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testcore3", 0, "[no argument]"); if (argc > 1) test_usage(); TEST_PRINT_CONDUITINFO(); mynode = gex_TM_QueryRank(myteam); gex_Rank_t nnodes = gex_TM_QuerySize(myteam); next = (mynode + 1) % nnodes; prev = (mynode + nnodes - 1) % nnodes; BARRIER(); // Test once prior to binding segments to the endpoints // addr_tbl[0] == nextseg == prevseg trivially (all NULL) testAMSrcAddr(); BARRIER(); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); // Test again with a bound segment and intialized addr_tbl[0], nextseg and prevseg // (though they are all still NULL for GASNET_SEGMENT_EVERTHING) addr_tbl[0] = myseg = TEST_MYSEG(); nextseg = TEST_SEG(next); prevseg = TEST_SEG(prev); BARRIER(); testAMSrcAddr(); MSG("done."); gasnet_exit(test_errs ? 1 : 0); return 0; } /* ------------------------------------------------------------------------------------ */ void testAMSrcAddr(void) { GASNET_BEGIN_FUNCTION(); flag = 0; // GASNet spec says we ignore source_addr when nbytes==0, for both Medium and Long. // So, this test attempts various invalid source_address values. // We pass the index, i, to allow the Reply to test all the values as well. for (int i = 0; i < NUM_ADDRS; ++i) { void *source_addr = addr_tbl[i]; int goal = flag + 1; gex_AM_RequestMedium1(myteam, next, hidx_ping_medhandler, source_addr, 0, GEX_EVENT_NOW, 0, i); GASNET_BLOCKUNTIL(flag == goal); ++goal; // GASNet-EX requires initiator's "dest_addr" be passed to handler as "buf", even when nbytes==0 // So, we test that behavior in both the request and reply handlers. gex_AM_RequestLong1(myteam, next, hidx_ping_longhandler, source_addr, 0, source_addr, GEX_EVENT_NOW, 0, i); GASNET_BLOCKUNTIL(flag == goal); ++goal; } BARRIER(); } gasnet-2025.8.0/tests/testalign.c0000664000175000017500000002327115142313673016727 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testalign.c $ * Description: GASNet get/put alignment-sensitivity test * measures flood throughput of GASNet gets and puts * over varying payload alignments and fixed payload size * Copyright 2002-2004, Jaein Jeong and Dan Bonachea * Terms of use are as specified in license.txt */ int size = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR (size + PAGESZ) #endif #include "test.h" #define DEFAULT_SZ (32*1024) #define PRINT_LATENCY 0 #define PRINT_THROUGHPUT 1 static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; typedef struct { int datasize; int alignment; int iters; uint64_t time; } stat_struct_t; int insegment = 1; int dogets = 1; int doputs = 1; int myproc; int numprocs; int peerproc; int iamsender = 0; int unitsMB = 0; char *rembuf; char *locbuf; #define init_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _init_stat #define update_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _update_stat #define print_stat \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__), _print_stat void _init_stat(stat_struct_t *st, int sz, int al) { st->iters = 0; st->alignment = al; st->datasize = sz; st->time = 0; } void _update_stat(stat_struct_t *st, uint64_t temptime, int iters) { st->iters += iters; st->time += temptime; } void _print_stat(int myproc, stat_struct_t *st, const char *name, int operation) { switch (operation) { case PRINT_LATENCY: printf("%c: Proc %2i - %5i byte %5i byte aligned : %7i iters," " latency %10i us total, %9.3f us ave. (%s)\n", TEST_SECTION_NAME(), myproc, st->datasize, st->alignment, st->iters, (int) st->time, ((float)st->time) / st->iters, name); fflush(stdout); break; case PRINT_THROUGHPUT: printf((unitsMB?"%c: Proc %2i - %5i byte %5i byte aligned : %7i iters, throughput %11.6f MB/sec (%s)\n": "%c: Proc %2i - %5i byte %5i byte aligned : %7i iters, throughput %11.3f KB/sec (%s)\n"), TEST_SECTION_NAME(), myproc, st->datasize, st->alignment, st->iters, ((int)st->time == 0 ? 0.0 : (1000000.0 * st->datasize * st->iters / (unitsMB?(1024.0*1024.0):1024.0)) / ((int)st->time)), name); fflush(stdout); break; default: break; } } void oneway_test(int iters, int nbytes, int alignment) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; int pad = (alignment % PAGESZ); if (doputs) { /* initialize statistics */ init_stat(&st, nbytes, alignment); memset(locbuf+pad, 1, nbytes); BARRIER(); if (iamsender) { /* measure the throughput of bulk put */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_PutBlocking(myteam, peerproc, rembuf, locbuf+pad, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender) { print_stat(myproc, &st, "PutBlocking throughput", PRINT_THROUGHPUT); } } if (dogets) { /* initialize statistics */ init_stat(&st, nbytes, alignment); if (iamsender) { /* measure the throughput of bulk get */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_GetBlocking(myteam, locbuf, peerproc, rembuf+pad, nbytes, 0); } end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender) { print_stat(myproc, &st, "GetBlocking throughput", PRINT_THROUGHPUT); } } } void oneway_nbi_test(int iters, int nbytes, int alignment) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; int pad = (alignment % PAGESZ); if (doputs) { /* initialize statistics */ init_stat(&st, nbytes, alignment); memset(locbuf+pad, 1, nbytes); BARRIER(); if (iamsender) { /* measure the throughput of nonblocking implicit bulk put */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_PutNBI(myteam, peerproc, rembuf, locbuf+pad, nbytes, GEX_EVENT_DEFER, 0); } gex_NBI_Wait(GEX_EC_PUT,0); end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender) { print_stat(myproc, &st, "PutNBI+DEFER throughput", PRINT_THROUGHPUT); } } if (dogets) { /* initialize statistics */ init_stat(&st, nbytes, alignment); if (iamsender) { /* measure the throughput of nonblocking implicit get */ begin = TIME(); for (i = 0; i < iters; i++) { gex_RMA_GetNBI(myteam, locbuf, peerproc, rembuf+pad, nbytes, 0); } gex_NBI_Wait(GEX_EC_GET,0); end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender) { print_stat(myproc, &st, "GetNBI throughput", PRINT_THROUGHPUT); } } } void oneway_nb_test(int iters, int nbytes, int alignment) {GASNET_BEGIN_FUNCTION(); int i; int64_t begin, end; stat_struct_t st; gex_Event_t *events = (gex_Event_t*) test_malloc(sizeof(gex_Event_t) * iters); int pad = (alignment % PAGESZ); if (doputs) { /* initialize statistics */ init_stat(&st, nbytes, alignment); memset(locbuf+pad, 1, nbytes); BARRIER(); if (iamsender) { /* measure the throughput of sending a message */ begin = TIME(); for (i = 0; i < iters; i++) { events[i] = gex_RMA_PutNB(myteam, peerproc, rembuf, locbuf+pad, nbytes, GEX_EVENT_DEFER, 0); } gex_Event_WaitAll(events, iters, 0); end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender) { print_stat(myproc, &st, "PutNB+DEFER throughput", PRINT_THROUGHPUT); } } if (dogets) { /* initialize statistics */ init_stat(&st, nbytes, alignment); if (iamsender) { /* measure the throughput of receiving a message */ begin = TIME(); for (i = 0; i < iters; i++) { events[i] = gex_RMA_GetNB(myteam, locbuf, peerproc, rembuf+pad, nbytes, 0); } gex_Event_WaitAll(events, iters, 0); end = TIME(); update_stat(&st, (end - begin), iters); } BARRIER(); if (iamsender) { print_stat(myproc, &st, "GetNB throughput", PRINT_THROUGHPUT); } } test_free(events); } int main(int argc, char **argv) { int arg; int iters = 0; int j; int help = 0; int crossmachinemode = 0; /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testalign", &argc, &argv, 0)); /* parse arguments */ arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-in")) { insegment = 1; ++arg; } else if (!strcmp(argv[arg], "-out")) { insegment = 0; ++arg; } else if (!strcmp(argv[arg], "-g")) { dogets = 1; doputs = 0; ++arg; } else if (!strcmp(argv[arg], "-p")) { doputs = 1; dogets = 0; ++arg; } else if (!strcmp(argv[arg], "-c")) { crossmachinemode = 1; ++arg; } else if (!strcmp(argv[arg], "-m")) { unitsMB = 1; ++arg; } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (argc > arg) iters = atoi(argv[arg++]); if (!iters) iters = 1000; if (argc > arg) size = atoi(argv[arg++]); if (!size) size = DEFAULT_SZ; if (argc > arg) { TEST_SECTION_PARSE(argv[arg]); arg++; } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); test_init("testalign", 1, "[options] (iters) (size) (test_sections)\n" " The '-in' or '-out' option selects whether the initiator-side\n" " memory is in the GASNet segment or not (default is 'in').\n" " The -p/-g option selects puts only or gets only (default is both).\n" " The -c option enables cross-machine pairing, default is nearest neighbor.\n" " The -m option enables MB/sec units for bandwidth output (MB=2^20 bytes)."); if (help || argc > arg) test_usage(); /* get SPMD info */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); /* Only allow even number for numprocs */ if (numprocs % 2 != 0) { MSG0("WARNING: This test requires an even number of nodes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harnesses for smp-conduit */ } /* Setting peer thread rank */ if (crossmachinemode) { gex_Rank_t half = numprocs / 2; iamsender = (myproc < half); peerproc = myproc + (iamsender ? half : -half); } else { peerproc = (myproc + 1) % numprocs; iamsender = !(myproc % 2); } rembuf = (void *) TEST_SEG(peerproc); MSG0("Running %i iterations of %sbulk %s%s%s with local addresses %sside the segment for size %i\n", iters, (crossmachinemode ? "cross-machine " : ""), (doputs ? "put" : ""), ((doputs && dogets) ? "/" : ""), (dogets ? "get ": ""), insegment ? "in" : "out", size); /* initialize global data in my thread */ if (insegment) { locbuf = (void *)TEST_MYSEG(); } else { /* size + 1 page of alignment + initial alignment padding of PAGESZ-1 */ uintptr_t tmp = (uintptr_t) test_malloc(size + 2 * PAGESZ - 1); locbuf = (void *)((tmp + PAGESZ - 1) & ~(PAGESZ - 1)); } BARRIER(); if (TEST_SECTION_BEGIN_ENABLED()) for (j = 1; j <= PAGESZ; j *= 2) oneway_test(iters, size, j); if (TEST_SECTION_BEGIN_ENABLED()) for (j = 1; j <= PAGESZ; j *= 2) oneway_nbi_test(iters, size, j); if (TEST_SECTION_BEGIN_ENABLED()) for (j = 1; j <= PAGESZ; j *= 2) oneway_nb_test(iters, size, j); BARRIER(); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/zekind.h0000664000175000017500000000466415142313673016233 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/zekind.h $ * Description: common code for test using ZE memory kind * Copyright (c) 2023, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _ZEKIND_H #define _ZEKIND_H #include #include #if !GASNET_HAVE_MK_CLASS_ZE #error This header is only for use when GASNET_HAVE_MK_CLASS_ZE is defined non-zero #endif #include #define check_zecall(op) do { \ ze_result_t _ret = op; \ if (_ret != ZE_RESULT_SUCCESS) { \ FATALERR("GEX_MK_CLASS_ZE: %s FAILED", #op); \ } \ } while (0) // Initializes args_p for the ZE GPU device with given deviceOrdinal, if any. // Returns number of GPU devices found // Caller must compare to the deviceOrdinal to determine if args_p has been initialized static int test_open_ze_device(int deviceOrdinal, gex_MK_Create_args_t *args_p) { uint32_t driverCount = 0; check_zecall( zeInit(ZE_INIT_FLAG_GPU_ONLY) ); check_zecall( zeDriverGet(&driverCount, NULL) ); ze_driver_handle_t *driverArray = test_calloc(driverCount, sizeof(ze_driver_handle_t)); check_zecall( zeDriverGet(&driverCount, driverArray) ); int found = 0; for (uint32_t i = 0; i < driverCount; ++i) { ze_driver_handle_t driver = driverArray[i]; uint32_t deviceCount = 0; check_zecall( zeDeviceGet(driver, &deviceCount, NULL) ); ze_device_handle_t *deviceArray = test_calloc(deviceCount, sizeof(ze_device_handle_t)); check_zecall( zeDeviceGet(driver, &deviceCount, deviceArray) ); for (uint32_t j = 0; j < deviceCount; ++j) { ze_device_handle_t device = deviceArray[j]; ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES,}; check_zecall( zeDeviceGetProperties(device, &deviceProperties) ); if (deviceProperties.type != ZE_DEVICE_TYPE_GPU) continue; if (found == deviceOrdinal) { ze_context_handle_t context; ze_context_desc_t cDesc = {ZE_STRUCTURE_TYPE_CONTEXT_DESC,}; check_zecall( zeContextCreate(driver, &cDesc, &context) ); args_p->gex_class = GEX_MK_CLASS_ZE; args_p->gex_args.gex_class_ze.gex_zeDevice = device; args_p->gex_args.gex_class_ze.gex_zeContext = context; args_p->gex_args.gex_class_ze.gex_zeMemoryOrdinal = 0; } found += 1; } test_free(deviceArray); } test_free(driverArray); return found; } #endif // _ZEKIND_H gasnet-2025.8.0/tests/testenv.c0000664000175000017500000000447215142313673016427 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testenv.c $ * Description: GASNet environment variable propagation test * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; #include #ifndef TEST_VAR #define TEST_VAR "GASNET_DUMMY" #endif #ifndef TEST_VAL #define TEST_VAL "GASNet dummy value" #endif const char *expect_args[] = { "GASNet", "is", "Global Address Space Networking" }; int expect_argc = 1 + sizeof(expect_args)/sizeof(char *); int main(int argc, char **argv) { char usagestr[255]; char tmp[1024]; int i; const char *startup_val = NULL; const char *running_val = NULL; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testenv", &argc, &argv, 0)); startup_val = gasnet_getenv(TEST_VAR); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); usagestr[0] = '\0'; for (i=0; i < expect_argc-1; i++) { strcat(usagestr,"'"); strcat(usagestr,expect_args[i]); strcat(usagestr,"' "); } test_init("testenv",0,usagestr); BARRIER(); running_val = gasnet_getenv(TEST_VAR); BARRIER(); if (!startup_val) ERR("gasnet_getenv('%s') between init/attach returned NULL", TEST_VAR); else if (strcmp(startup_val, TEST_VAL)) ERR("gasnet_getenv('%s') between init/attach returned '%s', expected '%s'", TEST_VAR, startup_val, TEST_VAL); if (!running_val) ERR("gasnet_getenv('%s') after attach returned NULL", TEST_VAR); else if (strcmp(running_val, TEST_VAL)) ERR("gasnet_getenv('%s') after attach returned '%s', expected '%s'", TEST_VAR, running_val, TEST_VAL); BARRIER(); snprintf(tmp, sizeof(tmp), "argc=%i, argv[] = ", argc); for (i=0; i < argc; i++) { char tmp2[255]; snprintf(tmp2, sizeof(tmp2), "%s'%s'", (i>0?", ":""), argv[i]); strcat(tmp, tmp2); } MSG("%s",tmp); if (argc != expect_argc) ERR("argc == %i, expected %i", argc, expect_argc); else { for (i=1; i * Terms of use are as specified in license.txt */ #include #include #include typedef struct { int my_local_thread; int mythread; char _pad[GASNETT_CACHE_LINE_BYTES]; } thread_data_t; static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int mynode, nodes, iters, threads_per_node=0; #define MYBARRIER() \ GASNET_Safe(gasnet_coll_barrier(GASNET_TEAM_ALL, 0, GASNET_BARRIERFLAG_UNNAMED)) void *thread_main(void *arg) { thread_data_t *td = (thread_data_t*) arg; int i; int64_t start,total; MYBARRIER(); if (td->mythread == 0) { #if GASNET_PAR printf("Running team barrier test with %i iterations and %i threads/proc...\n",iters,threads_per_node); #else printf("Running team barrier test with %i iterations...\n",iters); #endif fflush(stdout); } MYBARRIER(); start = TIME(); for (i=0; i < iters; i++) { gasnet_coll_barrier_notify(GASNET_TEAM_ALL, i, 0); GASNET_Safe(gasnet_coll_barrier_wait(GASNET_TEAM_ALL, i, 0)); } total = TIME() - start; MYBARRIER(); if (td->mythread == 0) { printf("Total time: %8.3f sec Avg Named Barrier latency: %8.3f us\n", ((float)total)/1000000, ((float)total)/iters); fflush(stdout); } MYBARRIER(); start = TIME(); for (i=0; i < iters; i++) { gasnet_coll_barrier_notify(GASNET_TEAM_ALL, 0, GASNET_BARRIERFLAG_ANONYMOUS); GASNET_Safe(gasnet_coll_barrier_wait(GASNET_TEAM_ALL, 0, GASNET_BARRIERFLAG_ANONYMOUS)); } total = TIME() - start; MYBARRIER(); if (td->mythread == 0) { printf("Total time: %8.3f sec Avg Anon. Barrier latency: %8.3f us\n", ((float)total)/1000000, ((float)total)/iters); fflush(stdout); } MYBARRIER(); return NULL; } int main(int argc, char **argv) { int i = 0; thread_data_t *td_arr; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testteambarrier", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); mynode = gex_TM_QueryRank(myteam); nodes = gex_TM_QuerySize(myteam); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 10000; #if GASNET_PAR test_init("testteambarrier", 2, "(iters) (threadcount) (test sections)"); if (argc > 2) { threads_per_node = atoi(argv[2]); } else { if (gasnett_getenv_yesno_withdefault("GASNET_TEST_POLITE_SYNC",0)) { /* May overcommit only if somebody already expected it */ threads_per_node = gasnett_cpu_count(); } else { threads_per_node = gasnett_cpu_count() / TEST_LOCALPROCS(); } threads_per_node = MIN(threads_per_node, 8); threads_per_node = test_thread_limit(threads_per_node); threads_per_node = MAX(threads_per_node, 1); } if (threads_per_node > TEST_MAXTHREADS || threads_per_node < 1) { printf("ERROR: Threads must be between 1 and %d\n", TEST_MAXTHREADS); exit(EXIT_FAILURE); } // NO MULTI-IMAGE SUPPORT IN CURRENT COLLECTIVES if (threads_per_node > 1) { MSG0("WARNING: thread count reduced to 1 (no multi-image support)"); threads_per_node = 1; } if (argc > 3) TEST_SECTION_PARSE(argv[3]); if (argc > 4) test_usage(); #else test_init("testteambarrier", 1, "(iters) (test sections)"); threads_per_node = 1; if (argc > 3) test_usage(); if (argc > 2) TEST_SECTION_PARSE(argv[2]); #endif TEST_SET_WAITMODE(threads_per_node); td_arr = (thread_data_t*) test_malloc(sizeof(thread_data_t)*threads_per_node); for(i=0; i * Terms of use are as specified in license.txt */ #include int numnode = 0; uintptr_t maxsz = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR (((numnode&1)?2:1)*(uintptr_t)alignup(maxsz,SIZEOF_GEX_RMA_VALUE_T)) #endif #include static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int mynode = 0; void *myseg = NULL; int sender, recvr; int peer; uintptr_t max_step = 0; void *request_addr = NULL; void *reply_addr = NULL; gex_Event_t *lc_opt = GEX_EVENT_NOW; gex_Event_t *np_req_lc_opt = GEX_EVENT_NOW; gex_Event_t *np_rep_lc_opt = GEX_EVENT_NOW; void report(const char *desc, int64_t totaltime, int iters, uintptr_t sz, int rt) { if (sender) { char nodestr[10]; if (numnode > 2) snprintf(nodestr,sizeof(nodestr),"%i: ",mynode); else nodestr[0] = '\0'; printf("%c: %s%-46s: %6.3f sec %8.3f us", TEST_SECTION_NAME(), nodestr, desc, ((double)totaltime)/1000000, ((double)totaltime)/iters); if (sz) printf(" %7.3f MB/s", (((double)sz)*(rt?2:1)*iters/(1024*1024)) / (((double)totaltime)/1000000)); printf("\n"); fflush(stdout); } } gex_HSL_t inchsl = GEX_HSL_INITIALIZER; #define INC(var) do { \ gex_HSL_Lock(&inchsl); \ var++; \ gex_HSL_Unlock(&inchsl); \ } while (0) /* ------------------------------------------------------------------------------------ */ static enum { SRC_NOOP = 0, // send untouched source buffer (default) SRC_GENERATE, // "generate" payload (w/o memory reads) SRC_MEMCPY, // memcpy fixed payload to source buffer } src_mode; static int use_np = 0; static int np_cbuf = 0; static void* zero_buffer; GASNETT_INLINE(prep_payload) void prep_payload(uint8_t *dst, size_t len) { if (!len) return; assert(! ((uintptr_t)dst % SIZEOF_GEX_RMA_VALUE_T)); switch (src_mode) { case SRC_NOOP: #if DEBUG if (use_np) (*dst)++; // defeat poison check #endif return; break; case SRC_MEMCPY: memcpy(dst, zero_buffer, len); break; case SRC_GENERATE: { uint8_t *p = dst; for (size_t words = len / SIZEOF_GEX_RMA_VALUE_T; words; --words) { *(gex_RMA_Value_t *)p = words; p += SIZEOF_GEX_RMA_VALUE_T; } for (size_t bytes = len % SIZEOF_GEX_RMA_VALUE_T; bytes; --bytes) { *(p++) = bytes; } break; } } } #define RequestMedium0(tm,rank,hidx,src_addr,nbytes,lc_opt,flags) do { \ if (use_np) { \ void *cbuf = np_cbuf ? src_addr : NULL; \ gex_AM_SrcDesc_t sd = \ gex_AM_PrepareRequestMedium(tm,rank,cbuf,nbytes,nbytes,np_req_lc_opt,0,0); \ assert(gex_AM_SrcDescSize(sd) == nbytes); \ prep_payload(gex_AM_SrcDescAddr(sd), nbytes); \ gex_AM_CommitRequestMedium0(sd, hidx, nbytes); \ } else { \ prep_payload(src_addr, nbytes); \ gex_AM_RequestMedium0(tm, rank, hidx, src_addr, nbytes, lc_opt, flags); \ } \ } while (0) #define ReplyMedium0(token,hidx,src_addr,nbytes,lc_opt,flags) do { \ if (use_np) { \ void *cbuf = np_cbuf ? src_addr : NULL; \ gex_AM_SrcDesc_t sd = \ gex_AM_PrepareReplyMedium(token,cbuf,nbytes,nbytes,np_rep_lc_opt,0,0); \ assert(gex_AM_SrcDescSize(sd) == nbytes); \ prep_payload(gex_AM_SrcDescAddr(sd), nbytes); \ gex_AM_CommitReplyMedium0(sd, hidx, nbytes); \ } else { \ prep_payload(src_addr, nbytes); \ gex_AM_ReplyMedium0(token, hidx, src_addr, nbytes, lc_opt, flags); \ } \ } while (0) #define RequestLong0(tm,rank,hidx,src_addr,nbytes,dst_addr,lc_opt,flags) do { \ if (use_np) { \ void *cbuf = np_cbuf ? src_addr : NULL; \ gex_AM_SrcDesc_t sd = \ gex_AM_PrepareRequestLong(tm,rank,cbuf,nbytes,nbytes,dst_addr,np_req_lc_opt,0,0);\ assert(gex_AM_SrcDescSize(sd) == nbytes); \ prep_payload(gex_AM_SrcDescAddr(sd), nbytes); \ gex_AM_CommitRequestLong0(sd, hidx, nbytes, dst_addr); \ } else { \ prep_payload(src_addr, nbytes); \ gex_AM_RequestLong0(tm, rank, hidx, src_addr, nbytes, dst_addr, lc_opt, flags); \ } \ } while (0) #define ReplyLong0(token,hidx,src_addr,nbytes,dst_addr,lc_opt,flags) do { \ if (use_np) { \ void *cbuf = np_cbuf ? src_addr : NULL; \ gex_AM_SrcDesc_t sd = \ gex_AM_PrepareReplyLong(token,cbuf,nbytes,nbytes,dst_addr,np_rep_lc_opt,0,0); \ assert(gex_AM_SrcDescSize(sd) == nbytes); \ prep_payload(gex_AM_SrcDescAddr(sd), nbytes); \ gex_AM_CommitReplyLong0(sd, hidx, nbytes, dst_addr); \ } else { \ prep_payload(src_addr, nbytes); \ gex_AM_ReplyLong0(token, hidx, src_addr, nbytes, dst_addr, lc_opt, flags); \ } \ } while (0) /* ------------------------------------------------------------------------------------ */ gex_AM_Entry_t htable[]; #define hidx_ping_shorthandler htable[0].gex_index #define hidx_pong_shorthandler htable[1].gex_index #define hidx_ping_medhandler htable[2].gex_index #define hidx_pong_medhandler htable[3].gex_index #define hidx_ping_longhandler htable[4].gex_index #define hidx_pong_longhandler htable[5].gex_index #define hidx_ping_shorthandler_flood htable[6].gex_index #define hidx_pong_shorthandler_flood htable[7].gex_index #define hidx_ping_medhandler_flood htable[8].gex_index #define hidx_pong_medhandler_flood htable[9].gex_index #define hidx_ping_longhandler_flood htable[10].gex_index #define hidx_pong_longhandler_flood htable[11].gex_index #define hidx_done_shorthandler htable[12].gex_index volatile int flag = 0; void ping_shorthandler(gex_Token_t token) { gex_AM_ReplyShort0(token, hidx_pong_shorthandler, 0); } void pong_shorthandler(gex_Token_t token) { flag++; } void ping_medhandler(gex_Token_t token, void *buf, size_t nbytes) { ReplyMedium0(token, hidx_pong_medhandler, buf, nbytes, GEX_EVENT_NOW, 0); } void pong_medhandler(gex_Token_t token, void *buf, size_t nbytes) { flag++; } void ping_longhandler(gex_Token_t token, void *buf, size_t nbytes) { ReplyLong0(token, hidx_pong_longhandler, buf, nbytes, reply_addr, GEX_EVENT_NOW, 0); } void pong_longhandler(gex_Token_t token, void *buf, size_t nbytes) { flag++; } /* ------------------------------------------------------------------------------------ */ void ping_shorthandler_flood(gex_Token_t token) { gex_AM_ReplyShort0(token, hidx_pong_shorthandler_flood, 0); } void pong_shorthandler_flood(gex_Token_t token) { INC(flag); } void ping_medhandler_flood(gex_Token_t token, void *buf, size_t nbytes) { ReplyMedium0(token, hidx_pong_medhandler_flood, buf, nbytes, GEX_EVENT_NOW, 0); } void pong_medhandler_flood(gex_Token_t token, void *buf, size_t nbytes) { INC(flag); } void ping_longhandler_flood(gex_Token_t token, void *buf, size_t nbytes) { ReplyLong0(token, hidx_pong_longhandler_flood, buf, nbytes, reply_addr, GEX_EVENT_NOW, 0); } void pong_longhandler_flood(gex_Token_t token, void *buf, size_t nbytes) { INC(flag); } volatile int done = 0; void done_shorthandler(gex_Token_t token) { done = 1; } /* ------------------------------------------------------------------------------------ */ gex_AM_Entry_t htable[] = { { 0, (gex_AM_Fn_t)ping_shorthandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)pong_shorthandler, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_SHORT, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)ping_medhandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)pong_medhandler, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_MEDIUM, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)ping_longhandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)pong_longhandler, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_LONG, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)ping_shorthandler_flood, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)pong_shorthandler_flood, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_SHORT, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)ping_medhandler_flood, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)pong_medhandler_flood, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_MEDIUM, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)ping_longhandler_flood, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)pong_longhandler_flood, GEX_FLAG_AM_REQREP|GEX_FLAG_AM_LONG, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)done_shorthandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0, NULL, NULL } }; /* ------------------------------------------------------------------------------------ */ int skipwarmup = 0; int crossmachinemode = 0; int insegment = 1; int asynclc = 0; int iters=0; int warmupiters=0; int pollers=0; int i = 0; uintptr_t maxmedreq, maxmedrep, maxlongreq, maxlongrep; void *doAll(void*); int main(int argc, char **argv) { int help=0; int arg=1; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testam", &argc, &argv, 0)); mynode = gex_TM_QueryRank(myteam); numnode = gex_TM_QuerySize(myteam); arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-p")) { #if GASNET_PAR pollers = test_thread_limit(atoi(argv[arg+1])+1)-1; arg += 2; #else if (0 == mynode) { fprintf(stderr, "testam %s\n", GASNET_CONFIG_STRING); fprintf(stderr, "ERROR: The -p option is only available in the PAR configuration.\n"); fflush(NULL); } sleep(1); gasnet_exit(1); #endif } else if (!strcmp(argv[arg], "-in")) { insegment = 1; ++arg; } else if (!strcmp(argv[arg], "-out")) { insegment = 0; ++arg; } else if (!strcmp(argv[arg], "-c")) { crossmachinemode = 1; ++arg; } else if (!strcmp(argv[arg], "-s")) { ++arg; skipwarmup = 1; } else if (!strcmp(argv[arg], "-sync-req")) { asynclc = 0; lc_opt = GEX_EVENT_NOW; ++arg; } else if (!strcmp(argv[arg], "-async-req")) { asynclc = 1; lc_opt = GEX_EVENT_GROUP; ++arg; } else if (!strcmp(argv[arg], "-fp")) { use_np = 0; ++arg; } else if (!strcmp(argv[arg], "-np-cb")) { use_np = 1; np_cbuf = 1; ++arg; } else if (!strcmp(argv[arg], "-np-gb")) { use_np = 1; np_cbuf = 0; ++arg; } else if (!strcmp(argv[arg], "-src-noop")) { src_mode = SRC_NOOP; ++arg; } else if (!strcmp(argv[arg], "-src-generate")) { src_mode = SRC_GENERATE; ++arg; } else if (!strcmp(argv[arg], "-src-memcpy")) { src_mode = SRC_MEMCPY; ++arg; } else if (!strcmp(argv[arg], "-max-step")) { ++arg; if (argc > arg) { max_step = atoi(argv[arg]); arg++; } else help = 1; } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (argc > arg) { iters = atoi(argv[arg]); ++arg; } if (!iters) iters = 1000; if (argc > arg) { maxsz = atoi(argv[arg]); ++arg; } if (!maxsz) maxsz = 2*1024*1024; if (argc > arg) { TEST_SECTION_PARSE(argv[arg]); ++arg; } if (!max_step) max_step = maxsz; warmupiters = MIN(iters, 10000); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); #if GASNET_PAR #define PAR_USAGE \ " The -p option gives the number of polling threads, specified as\n" \ " a non-negative integer argument (default is no polling threads).\n" #else #define PAR_USAGE "" #endif test_init("testam", 1, "[options] (iters) (maxsz) (test_sections)\n" " The '-in' or '-out' option selects whether the requestor's\n" " buffer is in the GASNet segment or not (default is 'in').\n" PAR_USAGE " The '-max-step N' option selects the maximum step between payload sizes,\n" " which by default advance by doubling until the max size is reached.\n" " The '-sync-req' or '-async-req' option selects synchronous or asynchronous\n" " local completion of Medium and Long Requests (default is synchronous).\n" " The '-fp', '-np-gb' or '-np-cb' option selects Fixed- or Negotiated-Payload\n" " for Medium and Long AMs, as follows:\n" " -fp: Fixed-Payload (default)\n" " -np-gb: Negotiated-Payload with GASNet-provided buffer\n" " -np-cb: Negotiated-Payload with client-provided buffer\n" " The '-src-*' options select treatment of the payload buffer used for\n" " Medium and Long AMs, as follows:\n" " -src-noop: no per-operation initialization (default)\n" " -src-generate: initialized (w/o memory reads) on each AM injection\n" " -src-memcpy: initialized using memcpy() on each AM injection\n" " The -s option skips warm-up iterations.\n" " The -c option enables cross-machine pairing (default is nearest neighbor).\n"); if (help || argc > arg) test_usage(); TEST_PRINT_CONDUITINFO(); if (insegment) { myseg = TEST_MYSEG(); } else { char *space = test_malloc(alignup(maxsz,PAGESZ) + PAGESZ); myseg = alignup_ptr(space, PAGESZ); } if (src_mode == SRC_MEMCPY) { zero_buffer = test_calloc(maxsz, 1); } np_req_lc_opt = np_cbuf ? lc_opt : NULL; np_rep_lc_opt = np_cbuf ? GEX_EVENT_NOW : NULL; if (crossmachinemode) { if ((numnode%2) && (mynode == numnode-1)) { sender = 1; peer = mynode; } else { gex_Rank_t half = numnode / 2; sender = (mynode < half); peer = sender ? (mynode + half) : (mynode - half); } } else { peer = mynode ^ 1; sender = mynode % 2 == 0; if (peer == numnode) { peer = mynode; } } gex_Event_t *tmp_lc_opt = use_np ? np_req_lc_opt : lc_opt; gex_Flags_t flags = use_np ? ( np_cbuf ? GEX_FLAG_AM_PREPARE_LEAST_CLIENT : GEX_FLAG_AM_PREPARE_LEAST_ALLOC) : 0; maxmedreq = MIN(maxsz, gex_AM_MaxRequestMedium(myteam,peer,tmp_lc_opt,flags,0)); maxmedrep = MIN(maxsz, gex_AM_MaxReplyMedium (myteam,peer,GEX_EVENT_NOW,flags,0)); maxlongreq = MIN(maxsz, gex_AM_MaxRequestLong (myteam,peer,tmp_lc_opt,flags,0)); maxlongrep = MIN(maxsz, gex_AM_MaxReplyLong (myteam,peer,GEX_EVENT_NOW,flags,0)); recvr = !sender || (peer == mynode); // Long Request and Reply (distinct for loopback) reply_addr = TEST_SEG(peer); request_addr = (peer == mynode) ? (void*)((uintptr_t)reply_addr + alignup(maxsz,SIZEOF_GEX_RMA_VALUE_T)) : reply_addr; BARRIER(); #if GASNET_PAR #define PAR_FMT " %i extra recvr polling threads\n" #define PAR_ARG ,pollers #else #define PAR_FMT /*empty*/ #define PAR_ARG /*empty*/ #endif if (mynode == 0) { printf("Running %i iterations of %s AM performance with:\n" " local addresses %sside the segment%s\n" " %ssynchronous LC for Requests%s\n" " %s\n" " %s\n" PAR_FMT " ...\n", iters, (crossmachinemode ? "cross-machine ": ""), (insegment ? "in" : "out"), (insegment ? " (default)" : ""), (asynclc ? "a": ""), (asynclc ? "": " (default)"), (!use_np ? "fixed-Payload (default)" :(np_cbuf ? "negotiated-Payload with client-provided buffer" : "negotiated-Payload with GASNet-provided buffer")), ((src_mode == SRC_NOOP) ? "no payload initialization (default)" :(src_mode == SRC_GENERATE) ? "payload initialized by computation" : "payload initialized using memcpy()") PAR_ARG ); printf(" Msg Sz Description Total time Avg. time Bandwidth\n" " ------ ----------- ---------- --------- ---------\n"); fflush(stdout); } #if GASNET_PAR TEST_SET_WAITMODE(pollers+1); if (pollers) test_createandjoin_pthreads(pollers+1,doAll,NULL,0); else #endif doAll(NULL); MSG("done."); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ void doAMShort(void) { GASNET_BEGIN_FUNCTION(); if (TEST_SECTION_BEGIN_ENABLED() && sender && !skipwarmup) { /* warm-up */ flag = 0; for (i=0; i < warmupiters; i++) { gex_AM_RequestShort0(myteam, peer, hidx_ping_shorthandler_flood, 0); } GASNET_BLOCKUNTIL(flag == warmupiters); gex_AM_RequestShort0(myteam, peer, hidx_ping_shorthandler, 0); GASNET_BLOCKUNTIL(flag == warmupiters+1); } BARRIER(); /* ------------------------------------------------------------------------------------ */ if (TEST_SECTION_ENABLED() && sender) { int64_t start = TIME(); flag = -1; for (i=0; i < iters; i++) { gex_AM_RequestShort0(myteam, peer, hidx_ping_shorthandler, 0); GASNET_BLOCKUNTIL(flag == i); } report(" AMShort ping-pong roundtrip ReqRep",TIME() - start, iters, 0, 1); } BARRIER(); /* ------------------------------------------------------------------------------------ */ if (TEST_SECTION_ENABLED()) { int64_t start = TIME(); flag = -1; BARRIER(); if (sender && recvr) { assert(peer == mynode); for (i=0; i < iters; i++) { int lim = i << 1; gex_AM_RequestShort0(myteam, peer, hidx_pong_shorthandler, 0); GASNET_BLOCKUNTIL(flag == lim); lim++; gex_AM_RequestShort0(myteam, peer, hidx_pong_shorthandler, 0); GASNET_BLOCKUNTIL(flag == lim); } } else if (sender) { for (i=0; i < iters; i++) { gex_AM_RequestShort0(myteam, peer, hidx_pong_shorthandler, 0); GASNET_BLOCKUNTIL(flag == i); } } else if (recvr) { for (i=0; i < iters; i++) { GASNET_BLOCKUNTIL(flag == i); gex_AM_RequestShort0(myteam, peer, hidx_pong_shorthandler, 0); } } report(" AMShort ping-pong roundtrip ReqReq",TIME() - start, iters, 0, 1); if (mynode == 0) { printf("\n"); fflush(stdout); } } BARRIER(); /* ------------------------------------------------------------------------------------ */ if (TEST_SECTION_ENABLED()) { if (sender) { int64_t start = TIME(); flag = 0; BARRIER(); for (i=0; i < iters; i++) { gex_AM_RequestShort0(myteam, peer, hidx_pong_shorthandler_flood, 0); } if (recvr) GASNET_BLOCKUNTIL(flag == iters); BARRIER(); report(" AMShort flood one-way Req",TIME() - start, iters, 0, 0); } else { flag = 0; BARRIER(); GASNET_BLOCKUNTIL(flag == iters); BARRIER(); } if (mynode == 0) { printf("\n"); fflush(stdout); } } BARRIER(); /* ------------------------------------------------------------------------------------ */ if (TEST_SECTION_ENABLED() && sender) { int64_t start = TIME(); flag = 0; for (i=0; i < iters; i++) { gex_AM_RequestShort0(myteam, peer, hidx_ping_shorthandler_flood, 0); } GASNET_BLOCKUNTIL(flag == iters); report(" AMShort flood roundtrip ReqRep",TIME() - start, iters, 0, 1); if (mynode == 0) { printf("\n"); fflush(stdout); } } BARRIER(); } /* ------------------------------------------------------------------------------------ */ #define ADVANCESZ(sz, maxsz) do { \ int step = MIN(max_step, sz); \ if (!sz) sz = 1; \ else if (sz < maxsz && sz+step > maxsz) { \ /* indicate final non-power-of-two sz */ \ if (!mynode) printf(" max:\n"); \ sz = maxsz; \ } else sz += step; \ } while (0) #define TESTAM_PERF(DESC_STR, AMREQUEST, PING_HIDX, PONG_HIDX, \ MAXREQ, MAXREP, DEST) do { \ uintptr_t MAXREQREP = MIN(MAXREQ, MAXREP); \ if (sender && !skipwarmup && \ (TEST_SECTION_ENABLED_FWD(1) || TEST_SECTION_ENABLED_FWD(2) || \ TEST_SECTION_ENABLED_FWD(3) || TEST_SECTION_ENABLED_FWD(4) || \ TEST_SECTION_ENABLED_FWD(5))) { /* warm-up */ \ flag = 0; \ AMREQUEST(myteam, peer, PING_HIDX, myseg, \ MAXREQREP DEST, lc_opt, 0); \ GASNET_BLOCKUNTIL(flag == 1); \ if (asynclc) gex_NBI_Wait(GEX_EC_AM,0); \ for (i=0; i < warmupiters; i++) { \ AMREQUEST(myteam, peer, PING_HIDX##_flood, myseg, \ MAXREQREP DEST, lc_opt, 0); \ } \ GASNET_BLOCKUNTIL(flag == warmupiters+1); \ if (asynclc) gex_NBI_Wait(GEX_EC_AM,0); \ } \ BARRIER(); \ /* ---------------------------------------------------------- */ \ if (TEST_SECTION_BEGIN_ENABLED()) { \ uintptr_t sz; \ char msg[255]; \ for (sz = 0; sz <= MAXREQREP; ) { \ snprintf(msg, sizeof(msg), \ "%7"PRIuPTR" "DESC_STR" ping-pong roundtrip ReqRep", sz); \ BARRIER(); \ if (sender) { \ int64_t start = TIME(); \ flag = -1; \ for (i=0; i < iters; i++) { \ AMREQUEST(myteam, peer, PING_HIDX, myseg, \ sz DEST, lc_opt, 0); \ GASNET_BLOCKUNTIL(flag == i); \ } \ if (asynclc) gex_NBI_Wait(GEX_EC_AM,0); \ report(msg,TIME() - start, iters, sz, 1); \ } \ BARRIER(); \ ADVANCESZ(sz, MAXREQREP); \ } \ if (mynode == 0) { printf("\n"); fflush(stdout); } \ } \ BARRIER(); \ /* ---------------------------------------------------------- */ \ if (TEST_SECTION_BEGIN_ENABLED()) { \ uintptr_t sz; \ char msg[255]; \ for (sz = 0; sz <= MAXREQ; ) { \ snprintf(msg, sizeof(msg), \ "%7"PRIuPTR" "DESC_STR" ping-pong roundtrip ReqReq", sz); \ BARRIER(); \ { \ int64_t start = TIME(); \ flag = -1; \ BARRIER(); \ if (sender && recvr) { \ assert(peer == mynode); \ for (i=0; i < iters; i++) { \ int lim = i << 1; \ AMREQUEST(myteam, peer, PONG_HIDX, myseg, sz DEST, lc_opt, 0); \ GASNET_BLOCKUNTIL(flag == lim); \ lim++; \ AMREQUEST(myteam, peer, PONG_HIDX, myseg, sz DEST, lc_opt, 0); \ GASNET_BLOCKUNTIL(flag == lim); \ } \ } else if (sender) { \ for (i=0; i < iters; i++) { \ AMREQUEST(myteam, peer, PONG_HIDX, myseg, sz DEST, lc_opt, 0); \ GASNET_BLOCKUNTIL(flag == i); \ } \ } else if (recvr) { \ for (i=0; i < iters; i++) { \ GASNET_BLOCKUNTIL(flag == i); \ AMREQUEST(myteam, peer, PONG_HIDX, myseg, sz DEST, lc_opt, 0); \ } \ } \ if (asynclc) gex_NBI_Wait(GEX_EC_AM,0); \ report(msg,TIME() - start, iters, sz, 1); \ } \ BARRIER(); \ ADVANCESZ(sz, MAXREQ); \ } \ if (mynode == 0) { printf("\n"); fflush(stdout); } \ } \ BARRIER(); \ /* ---------------------------------------------------------- */ \ if (TEST_SECTION_BEGIN_ENABLED()) { \ uintptr_t sz; \ char msg[255]; \ for (sz = 0; sz <= MAXREQ; ) { \ flag = 0; \ snprintf(msg, sizeof(msg), \ "%7"PRIuPTR" "DESC_STR" flood one-way Req", sz); \ BARRIER(); \ if (sender) { \ int64_t start = TIME(); \ for (i=0; i < iters; i++) { \ AMREQUEST(myteam, peer, PONG_HIDX##_flood, myseg, sz DEST, lc_opt, 0); \ } \ if (recvr) GASNET_BLOCKUNTIL(flag == iters); \ if (asynclc) gex_NBI_Wait(GEX_EC_AM,0); \ BARRIER(); \ report(msg,TIME() - start, iters, sz, 0); \ } else { \ GASNET_BLOCKUNTIL(flag == iters); \ BARRIER(); \ } \ BARRIER(); \ ADVANCESZ(sz, MAXREQ); \ } \ if (mynode == 0) { printf("\n"); fflush(stdout); } \ } \ BARRIER(); \ /* ---------------------------------------------------------- */ \ if (TEST_SECTION_BEGIN_ENABLED()) { \ uintptr_t sz; \ char msg[255]; \ for (sz = 0; sz <= MAXREQREP; ) { \ snprintf(msg, sizeof(msg), \ "%7"PRIuPTR" "DESC_STR" flood roundtrip ReqRep", sz); \ BARRIER(); \ if (sender) { \ int64_t start = TIME(); \ flag = 0; \ for (i=0; i < iters; i++) { \ AMREQUEST(myteam, peer, PING_HIDX##_flood, myseg, sz DEST, lc_opt, 0); \ } \ GASNET_BLOCKUNTIL(flag == iters); \ if (asynclc) gex_NBI_Wait(GEX_EC_AM,0); \ report(msg,TIME() - start, iters, sz, 1); \ } \ BARRIER(); \ ADVANCESZ(sz, MAXREQREP); \ } \ if (mynode == 0) { printf("\n"); fflush(stdout); } \ } \ BARRIER(); \ /* ---------------------------------------------------------- */ \ if (TEST_SECTION_BEGIN_ENABLED()) { \ uintptr_t sz; int64_t start; \ char msg[255]; \ for (sz = 0; sz <= MAXREQ; ) { \ snprintf(msg, sizeof(msg), \ "%7"PRIuPTR" "DESC_STR" flood two-way Req", sz); \ flag = 0; \ BARRIER(); \ start = TIME(); \ for (i=0; i < iters; i++) { \ AMREQUEST(myteam, peer, PONG_HIDX##_flood, myseg, sz DEST, lc_opt, 0); \ } \ GASNET_BLOCKUNTIL(flag == iters); \ if (asynclc) gex_NBI_Wait(GEX_EC_AM,0); \ report(msg,TIME() - start, iters, sz, 0); \ \ BARRIER(); \ ADVANCESZ(sz, MAXREQ); \ } \ if (mynode == 0) { printf("\n"); fflush(stdout); } \ } \ BARRIER(); \ } while (0) #define MEDDEST #define LONGDEST , request_addr /* ------------------------------------------------------------------------------------ */ void doAMMed(void) { GASNET_BEGIN_FUNCTION(); TESTAM_PERF("AMMedium ", RequestMedium0, hidx_ping_medhandler, hidx_pong_medhandler, maxmedreq, maxmedrep, MEDDEST); } /* ------------------------------------------------------------------------------------ */ void doAMLong(void) { GASNET_BEGIN_FUNCTION(); TESTAM_PERF("AMLong ", RequestLong0, hidx_ping_longhandler, hidx_pong_longhandler, maxlongreq, maxlongrep, LONGDEST); } /* ------------------------------------------------------------------------------------ */ void *doAll(void *ptr) { if (ptr) { if (recvr) GASNET_BLOCKUNTIL(done); } else { doAMShort(); doAMMed(); doAMLong(); if (recvr) gex_AM_RequestShort0(myteam, mynode, hidx_done_shorthandler, 0); } return NULL; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/Makefile.in0000664000175000017500000005623215142313673016641 0ustar alastairalastair# $Source: bitbucket.org:berkeleylab/gasnet.git/tests/Makefile.in $ # Description: Makefile for GASNet tests # @configure_input@ # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt all: @echo This Makefile is not intended to be called directly @echo do a "make tests-seq" or "make tests-par" within the conduit directory # linker to be used for MPI programs GASNET_MPI_CC = @MPI_CC@ GASNET_MPI_LD = $(GASNET_MPI_CC) srcdir="@TOP_SRCDIR@/tests" configfile=/dev/null # must be overridden by caller include $(configfile) @HAVE_PTHREAD_TRUE@tools_fragment = @TOP_BUILDDIR@/gasnet_tools-par.mak @HAVE_PTHREAD_FALSE@tools_fragment = @TOP_BUILDDIR@/gasnet_tools-seq.mak $(tools_fragment): force cd @TOP_BUILDDIR@ && $(MAKE) `basename $@` -include $(tools_fragment) Makefile: @TOP_SRCDIR@/tests/Makefile.in $(tools_fragment) cd @TOP_BUILDDIR@ ; \ CONFIG_HEADERS= CONFIG_FILES=tests/Makefile ./config.status # GASNet-related MPI tests @USE_MPI_COMPAT_TRUE@ MPI_TESTS_SEQ = testmpi @USE_MPI_COMPAT_TRUE@ MPI_TESTS_PAR = # C++ tests CXX_TESTS = testcxx testlegacycxx testtoolscxx # non-GASNet plain MPI tests MPI1_TESTS = \ testmpiperf \ testmpicollperf \ testmpinbr \ testosumpi_bw \ testosumpi_bw2 \ testosumpi_lat \ testosumpi_bcast_lat MPI2_TESTS = \ testosumpi2_put_lat \ testosumpi2_put_bw \ testosumpi2_put_bw2 \ testosumpi2_get_lat \ testosumpi2_get_bw \ testosumpi2_acc_lat MPI_TESTS = $(MPI1_TESTS) $(MPI2_TESTS) # Tests using pthreads in SEQ builds: @HAVE_PTHREAD_TRUE@ PTHREAD_TESTS = \ @HAVE_PTHREAD_TRUE@ testprogthr # tests that can be built in any mode # in order of most useful execution # NOTE: if you add a test here that is expected to pass on all conduits, # please also add it to harness/gasnet-tests/harness.conf testprograms_seq = \ testgasnet \ testlegacy \ testtools \ testinternal \ testenv \ testhsl \ testsmall \ testlarge \ testval \ testam \ testmisc \ testcore1 \ testcore2 \ testcore3 \ testcore4 \ testcore5 \ testslice \ testbarrier \ testbarrierconf \ testbarrierlate \ testlogGP \ testalign \ testrand \ testexit \ testvis \ testcoll \ testcollperf \ testteambarrier \ testteambcast \ testreduce \ testteam \ testnbr \ testvisperf \ testqueue \ testratomic \ testfaddperf \ testimm \ testsplit \ testacc \ testsegment \ testtmpair \ testreadonly \ testalltoall \ testtoken \ testcudauva \ testhip \ testze \ $(PTHREAD_TESTS) \ $(CONDUIT_TESTS) \ $(MPI_TESTS_SEQ) # tests that should only be built in PARSYNC and PAR modes testprograms_parsync = \ # tests that should only be built in PAR mode testprograms_par = \ testthreads \ testcontend \ testlockcontend \ $(MPI_TESTS_PAR) # misc files to clean clean_files = \ testhello \ $(TESTEXIT_SCRIPT) testprograms = $(testprograms_seq) $(testprograms_parsync) $(testprograms_par) $(MPI_TESTS) $(CXX_TESTS) tests-seq: clean $(testprograms_seq) tests-parsync: clean $(testprograms_seq) $(testprograms_parsync) tests-par: clean $(testprograms_seq) $(testprograms_parsync) $(testprograms_par) tests-mpi: $(MPI1_TESTS) tests-mpi2: $(MPI2_TESTS) clean: rm -f $(testprograms:=@EXESUFFIX@) $(clean_files) distclean: rm -f Makefile @GASNET_SEGMENT_FAST_TRUE@GASNET_SEGMENT_STR="FAST" @GASNET_SEGMENT_LARGE_TRUE@GASNET_SEGMENT_STR="LARGE" @GASNET_SEGMENT_EVERYTHING_TRUE@GASNET_SEGMENT_STR="EVERYTHING" @BUILDCONFIG_DEBUG_TRUE@ GASNET_DEBUG_STR="debug" @BUILDCONFIG_DEBUG_FALSE@GASNET_DEBUG_STR="nodebug" GASNET_CONFIG_STR=$(GASNET_SEGMENT_STR)-$(GASNET_DEBUG_STR) @CROSS_COMPILING_TRUE@CROSS_COMPILING=yes @CROSS_COMPILING_FALSE@CROSS_COMPILING=no @BUILDCONFIG_DEBUG_TRUE@@DEBUGMALLOC_TRUE@DEBUG_MALLOC=@DEBUGMALLOC_VAR@=$${@DEBUGMALLOC_VAR@-@DEBUGMALLOC_VAL@} TEST_ENV=$(DEBUG_MALLOC) TEST_INOUT= # max lines (per test) of "ERROR" output to present in the final summary from run-tests # setting to 0 means unbounded, but that (or very large) may crash the shell TEST_MAX_FAILURE_LINES=16 # default node count TEST_NODES=2 # provide args, env and node counts for specific tests, user can override with MANUAL_TESTPARAMS TEST_PARAMS= \ testalign_args="$(TEST_INOUT)"; \ testam_args="$(TEST_INOUT)"; \ testlarge_args="$(TEST_INOUT)"; \ testsmall_args="$(TEST_INOUT)"; \ testcore2_args="$(TEST_INOUT)"; \ testcore1_args="1000"; \ testhsl_args="0"; \ testrand_args="1024"; \ testlogGP_args="1000 0 8 65536"; \ testthreads_args="2"; \ testmisc_nodes="1"; \ testbarrierconf_nodes="3"; \ testmpi_args="2"; \ testmpiperf_args="BPFE 1000"; \ testqueue_args="$(TEST_INOUT) 1 256 262144"; \ testenv_args='GASNet is \"Global Address Space Networking\"'; \ testenv_env='GASNET_DUMMY="GASNet dummy value"' \ testvisperf_args="$(TEST_INOUT) -maxdata 131072 -maxcontig 512 10"; \ testslice_args="1024000 10 10"; \ testcollperf_args="-szfactor 4 16384 2 50 0"; \ testinternal_env="PMI_MAX_KVS_ENTRIES=$${PMI_MAX_KVS_ENTRIES:-1000000}";\ $(CONDUIT_TESTPARAMS) dummy=1 ; \ $(MANUAL_TESTPARAMS) dummy=1 ; # omit tests that are supposed to fail or known to cause failures # testexit: requires special handling, provided by run-testexit # testreadonly: known to fail on multiple system (at least bugs 4008, 4009, 4046 and 4179) # MPI_TESTS_*: lack infrastructure here to launch via mpirun vs $(CONDUIT_RUNCMD) testprograms_err = \ testexit \ testreadonly \ $(MPI_TESTS_SEQ) \ $(MPI_TESTS_PAR) # tests that do not link libgasnet and should execute directly on the frontend with no spawner # (except in the case of cross-compilation, where we run them on the compute node using MPIRUN_CMD) testprograms_nongasnet = \ testtools testtoolscxx CONDUIT_NAME_UC=`echo $(CONDUIT_NAME) | @AWK@ '{print toupper($$0)}'` awk_cmdbuild={ qargs="'"'"$$args"'"'"; \ gsub(ENVIRON["'"'"DQUOTE"'"'"],ENVIRON["'"'"BACKSLASH"'"'"]ENVIRON["'"'"DQUOTE"'"'"],qargs); \ gsub("'"'"%C"'"'", "'"'"%P %A"'"'"); \ gsub("'"'"%P"'"'", "'"'"./$$file"'"'"); \ gsub("'"'"%L"'"'", "'"'"DUMMY"'"'"); \ gsub("'"'"%V "'"'","'"'""'"'"); \ gsub("'"'"%N"'"'", "'"'"$$nodes"'"'"); \ gsub("'"'"%M"'"'", "'"'"$$nodes"'"'"); \ gsub("'"'"%A"'"'", "'"'"$$args"'"'"); \ gsub("'"'"%D"'"'", "'"'"$$cwd"'"'"); \ gsub("'"'"%H"'"'", "'"'"$${GASNET_NODEFILE:-$$PBS_NODEFILE}"'"'"); \ gsub("'"'"%Q"'"'", qargs); print } perl_threadscan=print $$1 if (/\\\$$GASNetThreadModel: GASNET_([^ ]*) \\\$$/); run-tests: force @$(TEST_PARAMS) \ export `echo "$(TEST_PARAMS)" | @AWK@ 'BEGIN {FS="=";RS=";"}{ print $$1 }'` ; \ line='+++++++++++++++++++++++++++++++++++++++' ; line="$$line$$line" ; \ BACKSLASH='\' export BACKSLASH ; \ DQUOTE='"' export DQUOTE ; \ tests_to_run="" export tests_to_run ; \ tests_to_ignore="" export tests_to_ignore ; \ for file in $(testprograms) ; do if test -x "$$file" ; then \ if test "`echo \" $(testprograms_err) \"| grep \" $$file \"; exit 0`"; then \ tests_to_ignore="$$tests_to_ignore $$file" ; \ elif test -z "`echo \" $$tests_to_run \"| grep \" $$file \"; exit 0`"; then \ tests_to_run="$$tests_to_run $$file" ; \ fi ; \ fi ; done ; \ echo $$line ; \ echo " Running $(CONDUIT_NAME)-conduit tests:" ; \ if test "$(TESTS)" ; then \ tests_to_run="$(TESTS)" ; tests_to_ignore="" ; \ fi ; \ for file in $$tests_to_run ; do echo " $$file" ; done ; \ if test "$$tests_to_ignore" ; then \ echo " Ignoring tests: $$tests_to_ignore" ; \ fi ; \ echo " If this fails to spawn a job," \ "you may need to re-run with a command like:" ; \ echo " gmake run-tests $(CONDUIT_NAME_UC)_RUNCMD=\"$(CONDUIT_RUNCMD)\"" ; \ echo $$line ; \ TEST_RUNCMD="$$$(CONDUIT_NAME_UC)_RUNCMD" export TEST_RUNCMD ; \ TEST_RUNCMD="`eval echo $$TEST_RUNCMD`" ; \ if test -z "$$TEST_RUNCMD" ; then \ TEST_RUNCMD="$(CONDUIT_RUNCMD)" ; \ fi ; \ MPI_RUNCMD="$${MPI_RUNCMD:=@TOP_BUILDDIR@/mpi-conduit/contrib/gasnetrun_mpi -np %N %C}" \ export MPI_RUNCMD ; \ if test -z "$$TIMECMD" ; then \ TIMECMD="@TIMECMD@" ; \ fi ; \ for file in $$tests_to_run ; do \ test_nongasnet=`echo " $(testprograms_nongasnet) "| grep " $$file "` ; \ test_mpi=`echo " $(MPI_TESTS) " | grep " $$file "` ; \ if test "$$test_nongasnet" -a "$(CROSS_COMPILING)" = "yes"; then \ test_mpi=1 ; eval $${file}_nodes=1 ; \ fi ; \ args="$$""$${file}_args" ; \ args="`eval echo $$args`" ; \ env="$$""$${file}_env" ; \ env="`eval echo $$env`" ; \ nodes="$$\{""$${file}_nodes-$(TEST_NODES)\}" ; \ nodes="`eval eval echo $$nodes`" ; \ cwd=`pwd` ; \ if test "$$test_mpi" ; then \ echo "*** Running MPI test $$file ***" ; \ awk_cmdbuild=`echo "$(awk_cmdbuild)"` ; \ cmd=`echo "$$MPI_RUNCMD" | eval @AWK@ \'$$awk_cmdbuild\'` ; \ faildesc="MPI test: $$file $$args" ; \ elif test "$$test_nongasnet" ; then \ echo "*** Running conduit-independent $$file ***" ; \ cmd="./$$file $$args" ; \ faildesc="$(CONDUIT_NAME)-conduit/$(GASNET_CONFIG_STR)/$$file $$args" ; \ else \ threadmode=`@PERL@ -n -e '$(perl_threadscan)' \ $$file@EXESUFFIX@ 2> /dev/null` ; \ echo "*** Running $(CONDUIT_NAME)-conduit $$file" \ "in $$threadmode/$(GASNET_SEGMENT_STR) mode ***" ; \ awk_cmdbuild=`echo "$(awk_cmdbuild)"` ; \ cmd=`echo "$$TEST_RUNCMD" | eval @AWK@ \'$$awk_cmdbuild\'` ; \ faildesc="$(CONDUIT_NAME)-conduit/$$threadmode-$(GASNET_CONFIG_STR)/$$file $$args" ; \ fi; \ echo "$$cmd" ; \ ( eval env $$env $(TEST_ENV) \ $$TIMECMD $$cmd || echo "ERROR: Test exited with failure code=$$?" ) \ 2>&1 | tee .test-output ; \ failure=`@PERL@ -ne 'if ((/ERROR/ || /fatal signal/) && !(/Retrying allocation/ || /GASNET_FREEZE_ON_ERROR/)) { print; if (++$$lines == $(TEST_MAX_FAILURE_LINES)) { print "ERROR OUTPUT TRUNCATED AT $(TEST_MAX_FAILURE_LINES) LINES\n"; exit 0; }}' .test-output` ; \ if test "$$failure" != "" ; then \ echo " " >> $(TESTLOG) ; \ echo " *-* $$faildesc *-*" >> $(TESTLOG) ; \ echo " " >> $(TESTLOG) ; \ echo "$$failure" >> $(TESTLOG) ; \ fi ; \ rm -f .test-output ; \ echo $$line ; \ done ; \ echo "TESTS COMPLETE" TESTEXIT_SCRIPT=run-testexit TESTEXIT_SEQMIN=1 TESTEXIT_SEQMAX=13 TESTEXIT_PARMIN=51 TESTEXIT_PARMAX=55 do-run-testexit: force @echo "Building $(TESTEXIT_SCRIPT) script..." @echo "#!/bin/sh" > $(TESTEXIT_SCRIPT) @nodes=$${TEST_NODES-2} ; args="" ; file="testexit" ; \ BACKSLASH='\' export BACKSLASH ; \ DQUOTE='"' export DQUOTE ; \ awk_cmdbuild=`echo "$(awk_cmdbuild)"` ; \ cmd=`echo "$(CONDUIT_RUNCMD)" | eval @AWK@ \'$$awk_cmdbuild\'` ; \ echo "INTERACTIVE_RUNCMD='$$cmd'" >> $(TESTEXIT_SCRIPT) @echo "BATCH_RUNCMD='testexit'" >> $(TESTEXIT_SCRIPT) @echo '#BATCH_RUNCMD="$$INTERACTIVE_RUNCMD"' >> $(TESTEXIT_SCRIPT) @echo 'if test "$$PBS_O_WORKDIR" ; then ' >> $(TESTEXIT_SCRIPT) @echo ' cd "$$PBS_O_WORKDIR"' >> $(TESTEXIT_SCRIPT) @echo 'fi' >> $(TESTEXIT_SCRIPT) @echo 'if test "$$MP_PROCS" -o "$$PBS_NODEFILE" ; then' >> $(TESTEXIT_SCRIPT) @echo ' RUNCMD="$$BATCH_RUNCMD"' >> $(TESTEXIT_SCRIPT) @echo "else" >> $(TESTEXIT_SCRIPT) @echo ' RUNCMD="$$INTERACTIVE_RUNCMD"' >> $(TESTEXIT_SCRIPT) @echo "fi" >> $(TESTEXIT_SCRIPT) @if test -z "$$TIMECMD" ; then \ TIMECMD="@TIMECMD@" ; \ fi ; \ echo "TIMECMD='$$TIMECMD'" >> $(TESTEXIT_SCRIPT) @echo "@DEBUGMALLOC_VAR@=$${@DEBUGMALLOC_VAR@-@DEBUGMALLOC_VAL@}; export @DEBUGMALLOC_VAR@" >> $(TESTEXIT_SCRIPT) @if test "`echo ' mpi udp ' | grep ' $(CONDUIT_NAME) '`" != "" ; then \ echo "have_interrupt=0" >> $(TESTEXIT_SCRIPT) ; \ else \ echo "have_interrupt=1" >> $(TESTEXIT_SCRIPT) ; \ fi @echo 'echo "Starting run-testexit at: `date`"' >> $(TESTEXIT_SCRIPT) @echo 'ID="`hostname`-$$MP_CHILD$$PBS_NODENUM"' >> $(TESTEXIT_SCRIPT) @echo 'line="----------------------------------"' >> $(TESTEXIT_SCRIPT) @echo 'line="$$line$$line"' >> $(TESTEXIT_SCRIPT) @i=`expr $(TESTEXIT_SEQMIN) - 1`; \ needinterrupt="5 9 53" ; export needinterrupt ; \ while test "$$i" != "$(TESTEXIT_PARMAX)" ; do \ i=`expr $$i + 1`; \ echo "" >> $(TESTEXIT_SCRIPT) ; \ if test "`echo ' '$$needinterrupt' ' | grep ' '$$i' '`" != "" ; then \ echo 'if test "$$have_interrupt" = "1" ; then' >> $(TESTEXIT_SCRIPT) ; \ fi ; \ echo 'echo "$$line"' >> $(TESTEXIT_SCRIPT) ; \ echo 'echo "$$ID: testexit '$$i'"' >> $(TESTEXIT_SCRIPT) ; \ echo 'echo "$$RUNCMD"'" $$i" >> $(TESTEXIT_SCRIPT) ; \ echo '$$TIMECMD $$RUNCMD'" $$i" >> $(TESTEXIT_SCRIPT) ; \ echo 'echo "$$ID: result=$$?"' >> $(TESTEXIT_SCRIPT) ; \ echo "sleep 1" >> $(TESTEXIT_SCRIPT) ; \ if test "`echo ' '$$needinterrupt' ' | grep ' '$$i' '`" != "" ; then \ echo 'else' >> $(TESTEXIT_SCRIPT) ; \ echo "echo 'Test $$i SKIPPED - conduit lacks interrupts'" >> $(TESTEXIT_SCRIPT) ; \ echo 'fi' >> $(TESTEXIT_SCRIPT) ; \ fi ; \ if test "$$i" = "$(TESTEXIT_SEQMAX)" ; then \ i=`expr $(TESTEXIT_PARMIN) - 1`; \ echo 'threadmode=`@PERL@ -n -e '"'"'$(perl_threadscan)'"'"' ' \ 'testexit@EXESUFFIX@ 2> /dev/null`' >> $(TESTEXIT_SCRIPT) ; \ echo 'if test "$$threadmode" = "SEQ" -o ' \ '"$$threadmode" = "PARSYNC" ; then' >> $(TESTEXIT_SCRIPT) ; \ echo ' echo "WARNING: testexit was compiled' \ 'in GASNET_$$threadmode mode"' >> $(TESTEXIT_SCRIPT) ; \ echo ' echo "WARNING: be sure to recompile the test in' \ 'GASNET_PAR mode for full results"' >> $(TESTEXIT_SCRIPT) ; \ echo 'else' >> $(TESTEXIT_SCRIPT) ; \ fi ; \ done ; \ echo 'fi' >> $(TESTEXIT_SCRIPT) @echo 'echo "$$ID: done."' >> $(TESTEXIT_SCRIPT) @chmod +x $(TESTEXIT_SCRIPT) @echo "Complete. Starting execution..." @./$(TESTEXIT_SCRIPT) KEEPTMP_CFLAGS = $(patsubst %,@KEEPTMP_CFLAGS@,$(KEEPTMPS)) # testtools is a special minimal case for an app that just uses GASNet tools # it uses the variables provided by the gasnet_tools-{seq,par}.mak @USE_MPI_CONDUIT_TRUE@@CROSS_COMPILING_TRUE@FAKE_DEFS = -DGASNETI_TOOLS_CONDUIT=MPI testtools: force @cd @TOP_BUILDDIR@ && $(MAKE) lib$(GASNETTOOLS_TOOLLIB_NAME).a $(GASNETTOOLS_CC) $(GASNETTOOLS_CPPFLAGS) $(GASNETTOOLS_CFLAGS) $(FAKE_DEFS) -c -o $@.o $(srcdir)/$@.c $(GASNETTOOLS_LD) $(GASNETTOOLS_LDFLAGS) -o $@ $@.o $(GASNETTOOLS_LIBS) @test -n '$(KEEPTMPS)' || ( cmd="rm -f $@.o"; echo "$$cmd"; eval "$$cmd" ) # As above w/ a c++ tools client testtoolscxx: force @if test -z "$(GASNETTOOLS_CXX)"; then \ echo "ERROR: testtoolscxx target requested, but no c++ compiler is configured"; \ exit 1; \ fi @cd @TOP_BUILDDIR@ && $(MAKE) lib$(GASNETTOOLS_TOOLLIB_NAME).a $(GASNETTOOLS_CXX) $(GASNETTOOLS_CPPFLAGS) $(GASNETTOOLS_CXXFLAGS) $(FAKE_DEFS) -c -o $@.o $(srcdir)/$@.cc $(GASNETTOOLS_CXX) $(GASNETTOOLS_CXXFLAGS) $(GASNETTOOLS_LDFLAGS) -o $@ $@.o $(GASNETTOOLS_LIBS) @test -n '$(KEEPTMPS)' || ( cmd="rm -f $@.o"; echo "$$cmd"; eval "$$cmd" ) # some tests need delay.o testlogGP: delay.o testlogGP_extraobjs = delay.o testbarrierlate: delay.o testbarrierlate_extraobjs = delay.o # some tests need other/amx/testam.h AMX_INC = -I@TOP_SRCDIR@/other/amx testgasnet_extraincs = $(AMX_INC) testlegacy_extraincs = $(AMX_INC) testcxx_extraincs = $(AMX_INC) testlegacycxx_extraincs = $(AMX_INC) # some tests need cuda.h and other related options testcudauva_extracflags = @CUDA_UVA_CFLAGS@ # some tests need hip_runtime.h other related options testhip_extracflags = @HIP_CFLAGS@ # some tests need ze_api.h other related options testze_extracflags = @ZE_CFLAGS@ # some tests need libpthreads even in a SEQ build testprogthr_extralibs = @GASNET_THREAD_LIBS@ # delay function, used by multiple tests # need to deliberately exclude and disable optimization for this object file to prevent breaking delay NOOPT_FLAG=-O0 delay.o: force $(GASNET_CC) $(GASNET_CPPFLAGS) $(GASNET_MISC_CFLAGS) $(KEEPTMP_CFLAGS) $(NOOPT_FLAG) $(MANUAL_CFLAGS) -c -o $@ $(srcdir)/$*.c mpi-check: force @if test -z "$(GASNET_MPI_CC)" ; then \ echo "ERROR: requested building an MPI test, but configure detected no MPI compiler." ; \ echo " Issue make again with GASNET_MPI_CC=" ; \ exit 1 ; \ fi # testmpi must be compiled like an MPI program with GASNet support testmpi: mpi-check force $(GASNET_MPI_CC) -I$(srcdir) $(GASNET_CPPFLAGS) @MPI_CFLAGS@ $(KEEPTMP_CFLAGS) $(MANUAL_MPICFLAGS) -c -o $@.o $(srcdir)/$@.c $(GASNET_MPI_LD) $(GASNET_LDFLAGS) @MPI_CFLAGS@ -o $@ $@.o $(GASNET_LIBS) @MPI_LIBS@ $(MANUAL_LIBS) $($@_extralibs) @test -n '$(KEEPTMPS)' || ( cmd="rm -f $@.o"; echo "$$cmd"; eval "$$cmd" ) # the following are just plain MPI programs # testmpinbr requires libm $(MPI_TESTS): mpi-check force $(GASNET_MPI_CC) -I$(srcdir)/mpi -I@TOP_SRCDIR@/other @MPI_CFLAGS@ $(KEEPTMP_CFLAGS) $(MANUAL_MPICFLAGS) -c -o $@.o $(srcdir)/mpi/$@.c $(GASNET_MPI_LD) $(GASNET_LDFLAGS) @MPI_CFLAGS@ -o $@ $@.o @MPI_LIBS@ @LIBM@ $(MANUAL_LIBS) @test -n '$(KEEPTMPS)' || ( cmd="rm -f $@.o"; echo "$$cmd"; eval "$$cmd" ) # test{,legacy}cxx test support for compiling a C++-based GASNet client # this is unlikely to work on conduits requiring a special linker (eg mpi-conduit) testcxx testlegacycxx: force @if test -z "$(GASNET_CXX)"; then \ echo "ERROR: $@ target requested, but no c++ compiler is configured"; \ exit 1; \ fi $(GASNET_CXX) -I$(srcdir) $($@_extraincs) $(GASNET_CXXCPPFLAGS) $(KEEPTMP_CFLAGS) $(GASNET_DEVWARN_CXXFLAGS) $(GASNET_CXXFLAGS) $($@_extracxxflags) -c -o $@.o $(srcdir)/$@.cc $(GASNET_CXX) $(GASNET_CXXFLAGS) $(GASNET_LDFLAGS) -o $@ $@.o $($@_extraobjs) $(GASNET_LIBS) $($@_extralibs) @test -n '$(KEEPTMPS)' || ( cmd="rm -f $@.o"; echo "$$cmd"; eval "$$cmd" ) # This is a model for how GASNet clients should be built: test% : force $(GASNET_CC) -I$(srcdir) $($@_extraincs) $(GASNET_CPPFLAGS) $(KEEPTMP_CFLAGS) $(GASNET_DEVWARN_CFLAGS) $(GASNET_CFLAGS) $($@_extracflags) -c -o $@.o $(srcdir)/$@.c $(GASNET_LD) $(GASNET_LDFLAGS) -o $@ $@.o $($@_extraobjs) $(GASNET_LIBS) $($@_extralibs) @test -n '$(KEEPTMPS)' || ( cmd="rm -f $@.o"; echo "$$cmd"; eval "$$cmd" ) force: .PHONY: force all tests-mpi tests-mpi2 gasnet-2025.8.0/tests/harness/0000775000175000017500000000000015142313673016227 5ustar alastairalastairgasnet-2025.8.0/tests/harness/libgasnet/0000775000175000017500000000000015142313673020177 5ustar alastairalastairgasnet-2025.8.0/tests/harness/libgasnet/Makefile0000664000175000017500000000723715142313673021650 0ustar alastairalastairall: @echo This Makefile is not intended to be called directly. @echo It is used for running unit tests within the automated testing harness provided with the Berkeley UPC runtime. @echo For information on downloading and using Berkeley UPC, see: https://upc.lbl.gov @exit 1 # legacy harness support GASNET_SRCDIR ?= $(TOP_SRCDIR)/gasnet GASNET_BLDDIR ?= $(TOP_BUILDDIR)/gasnet PERL ?= perl LIBGASNET_LOGDIR ?= $(HARNESS_LOGDIR) LIBGASNET_CONFIGURE ?= configure# can also be cross-configure-* LIBGASNET_CONFIGURE_ARGS ?=$(shell $(PERL) -ne 'if (m/^\s*CONFIGURE_ARGS\s*=\s*(.*)$$/) { print $$1; }' < $(GASNET_BLDDIR)/Makefile )# configure args LIBGASNET_CONFIGURE_ARGS_EXTRA ?=# extra configure args to append LIBGASNET_CONFIGURE_ENV ?=# envvars for configure SUITE_BUILD_DIR:=$(shell pwd)/bgasnet do-configure: force rm -Rf $(SUITE_BUILD_DIR)$(BUILD_VARIANT) mkdir $(SUITE_BUILD_DIR)$(BUILD_VARIANT) @logfile=$(LIBGASNET_LOGDIR)/libgasnet-configure$(BUILD_VARIANT).log ; \ configure=$(GASNET_SRCDIR)/$(LIBGASNET_CONFIGURE) ; \ crossconfig=$(GASNET_SRCDIR)/other/contrib/$(LIBGASNET_CONFIGURE) ; \ if ! test -x $$configure && test -x $$crossconfig ; then \ ln -s $$crossconfig $$configure ; \ fi ; \ set -x ; \ ( cd $(SUITE_BUILD_DIR)$(BUILD_VARIANT) && \ env $(LIBGASNET_CONFIGURE_ENV) \ $$configure $(LIBGASNET_CONFIGURE_ARGS) $(LIBGASNET_CONFIGURE_ARGS_EXTRA) ) > $$logfile 2>&1 ; \ rc=$$? ; cat $$logfile ; exit $$rc _configure: force @rm -f $@ $(MAKE) do-configure BUILD_VARIANT= @echo '#!/bin/sh' > $@ ; chmod +x $@ _configure_%: force @rm -f $@ $(MAKE) do-configure BUILD_VARIANT=$(patsubst _configure%,%,$@) @echo '#!/bin/sh' > $@ ; chmod +x $@ do-preclean-mpi: force $(MAKE) -C $(SUITE_BUILD_DIR)/other/ammpi clean do-preclean-udp: force $(MAKE) -C $(SUITE_BUILD_DIR)/other/amudp clean do-preclean-%: force echo $@ do-clean: force $(MAKE) do-preclean-$(NETWORK) $(MAKE) -C $(SUITE_BUILD_DIR)/$(NETWORK)-conduit clean do-conduit: force $(MAKE) do-clean $(MAKE) -C $(SUITE_BUILD_DIR)/$(NETWORK)-conduit $(MAKE_TARGET) $(MAKE) do-clean LIBGASNET_PEDANTIC_WOFF ?= LIBGASNET_PEDANTIC_WOFF_C ?= LIBGASNET_PEDANTIC_WOFF_CXX ?= LIBGASNET_PEDANTIC_FLAGS ?= \ MANUAL_CFLAGS="-std=c99 -pedantic $(LIBGASNET_PEDANTIC_WOFF) $(LIBGASNET_PEDANTIC_WOFF_C)" \ MANUAL_CXXFLAGS="-std=c++11 -pedantic $(LIBGASNET_PEDANTIC_WOFF) $(LIBGASNET_PEDANTIC_WOFF_CXX)" pedantic-%: $(SUITE_BUILD_DIR) force @rm -f $@ @network=`echo $@ | $(PERL) -pe 's/^(.*)-(.*)-(.*)$$/$$2/'`; \ target=`echo $@ | $(PERL) -pe 's/^(.*)-(.*)-(.*)$$/$$3/'`; \ logfile=$(LIBGASNET_LOGDIR)/libgasnet-$@.log ; \ set -x ; \ ( $(MAKE) do-conduit NETWORK=$$network MAKE_TARGET=$$target $(LIBGASNET_PEDANTIC_FLAGS) ) > $$logfile 2>&1 ; \ rc=$$? ; cat $$logfile ; exit $$rc @echo '#!/bin/sh' > $@ ; chmod +x $@ LIBGASNET_ALT_TEST ?= testgasnet do-alt-test: $(SUITE_BUILD_DIR) force @rm -f $(TARGET) @network=`echo $(TARGET) | $(PERL) -pe 's/^(.*)-(.*)-(.*)$$/$$2/'`; \ parseq=`echo $(TARGET) | $(PERL) -pe 's/^(.*)-(.*)-(.*)$$/$$3/'`; \ logfile=$(LIBGASNET_LOGDIR)/libgasnet-$(TARGET).log ; \ set -x ; \ case $(LIBGASNET_ALT_TEST) in \ none) target=$$parseq;; \ *) target=$(LIBGASNET_ALT_TEST)-$$parseq;; \ esac; \ ( $(MAKE) do-conduit NETWORK=$$network MAKE_TARGET=$$target ) > $$logfile 2>&1 ; \ rc=$$? ; cat $$logfile ; exit $$rc @echo '#!/bin/sh' > $(TARGET) ; chmod +x $(TARGET) alt_t-%: force ; $(MAKE) do-alt-test TARGET=$@ SUITE_BUILD_DIR='$(SUITE_BUILD_DIR)_alt_t' alt_s-%: force ; $(MAKE) do-alt-test TARGET=$@ SUITE_BUILD_DIR='$(SUITE_BUILD_DIR)_alt_s' alt_ts-%: force ; $(MAKE) do-alt-test TARGET=$@ SUITE_BUILD_DIR='$(SUITE_BUILD_DIR)_alt_ts' force: .PHONY: force gasnet-2025.8.0/tests/harness/libgasnet/harness.conf0000664000175000017500000002423515142313673022517 0ustar alastairalastair# This suite is independent of UPC compiler: KnownFailureAnySpec # # Build libgasnet with -pedantic # Enabled by feature libgasnet_pedantic # BEGIN_DEFAULT_CONFIG MakeFlags: Flags: Files: $TESTNAME$.c DynamicThreads: $DEFAULT$ StaticThreads: 0 CompileResult: pass PassExpr: 0 FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: CompileTimeLimit: 2 * $DEFAULT$ RequireFeature: gasnet,libgasnet_pedantic ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC ProcPerNode: 1 Pthreads: 0 TimeLimit: 0 # Ignore some warnings from cuda.h WarningFilter: all ; '.*?include/cuda.h:.*?-Wc11-extensions.*?' WarningFilter: all ; '.*?include/cuda.h:.*?-Wpedantic.*?' # Ignore some warnings from hip/*.h WarningFilter: all ; '.*?/include/hip/.*?warning:.*?-Wextra-semi.*?' WarningFilter: all ; '.*?/include/hip/.*?warning: ISO C does not allow extra .\073. .*?-Wpedantic.*?' # \073 = semi-colon # Ignore some warnings from libfabric WarningFilter: all ; '.*?include/rdma/.*?\.h:.*?-Wc11-extensions.*?' WarningFilter: all ; '.*?include/rdma/.*?\.h:.*?unnamed structs/unions.*?-Wpedantic.*?' END_DEFAULT_CONFIG # Callers may need to alter the commands invoked by this suite, # and can do so via the following overridable environment variables: # # LIBGASNET_CONFIGURE : configure script to use (default is "configure") # but can be set to "cross-configure-whatever" # LIBGASNET_CONFIGURE_ENV : # environment var=val settings to set in the configure environment (default empty) # LIBGASNET_CONFIGURE_ARGS : # arguments to pass to configure (defaults to the same args passed to gasnet configure) # LIBGASNET_CONFIGURE_ARGS_EXTRA : # optional configure arguments to append (default empty) # LIBGASNET_LOGDIR : directory for storing build logs (default is normal logdir) # LIBGASNET_PEDANTIC_FLAGS : make flags to enable pedantic build # (defaults to passing MANUAL_C(XX)FLAGS for gnu-style -pedantic args) # LIBGASNET_PEDANTIC_WOFF_C # LIBGASNET_PEDANTIC_WOFF_CXX # LIBGASNET_PEDANTIC_WOFF : # optional warning suppression flags for pedantic tests to pass to C/C++/both # (default to empty, and ignored if LIBGASNET_PEDANTIC_FLAGS is set) # setup a fresh build tree, isolated from other suites TestName: _configure CompileTimeLimit: 6 * $DEFAULT$ WarningFilter: all ; '.*' # ignore normal error/warning strings in configure output # libgasnet -pedantic tests TestName: pedantic-smp-seq RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_smp TestName: pedantic-smp-par RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_smp,gasnet_has_par TestName: pedantic-udp-seq RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_udp TestName: pedantic-udp-par RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_udp,gasnet_has_par TestName: pedantic-mpi-seq RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_mpi TestName: pedantic-mpi-par RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_mpi,gasnet_has_par TestName: pedantic-ofi-seq RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_ofi TestName: pedantic-ofi-par RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_ofi,gasnet_has_par TestName: pedantic-ibv-seq RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_ibv TestName: pedantic-ibv-par RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_ibv,gasnet_has_par TestName: pedantic-ucx-seq RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_ucx TestName: pedantic-ucx-par RequireFeature: gasnet,libgasnet_pedantic,gasnet_has_ucx,gasnet_has_par # # Compile and link a test with a library configured with "alternate" trace, # and/or stats modes relative to the containing build. # Normally this means enabling in NDEBUG builds and disabling in DEBUG ones. # # Subsets enabled by features: # libgasnet_alt_t test with inverted --(en|dis)able-trace # libgasnet_alt_s test with inverted --(en|dis)able-stats # libgasnet_alt_ts test with inverted --(en|dis)able-trace and --(en|dis)able-stats # BEGIN_DEFAULT_CONFIG MakeFlags: Flags: Files: $TESTNAME$.c DynamicThreads: $DEFAULT$ StaticThreads: 0 CompileResult: pass PassExpr: 0 FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: CompileTimeLimit: 2 * $DEFAULT$ RequireFeature: gasnet ProhibitFeature: hack_for_nonupc_test ProcPerNode: 1 Pthreads: 0 TimeLimit: 0 # Ignore some warnings from hip/*.h WarningFilter: all ; '.*?/include/hip/.*?warning: type defaults to .int. in declaration.*?' # Two hip/*.h inliner warnings, one of which unfortunately contains the token "Error" on multiple lines WarningFilter: all ; '.*?hipErrorToCudaError.*?' WarningFilter: all ; '.*?warning: called from here \[-Winline\].*?' END_DEFAULT_CONFIG # Behavior can be controlled via the following overridable environment variables: # LIBGASNET_ALT_TEST : # name of the test to compile and link (default is "testgasnet") # "tests" will build "tests-seq" or "tests-par" instead of a single test # "none" will build the library ("seq" or "par"), but not link any tests # LIBGASNET_CONFIGURE_ARGS_EXTRA_ALT_T # LIBGASNET_CONFIGURE_ARGS_EXTRA_ALT_S # LIBGASNET_CONFIGURE_ARGS_EXTRA_ALT_TS : # optional configure arguments to append (default empty) # note these are used instead of LIBGASNET_CONFIGURE_ARGS_EXTRA (not additive) # # The following are used as described above for libgasnet -pedantic # LIBGASNET_CONFIGURE # LIBGASNET_CONFIGURE_ENV # LIBGASNET_CONFIGURE_ARGS # LIBGASNET_LOGDIR # libgasnet_alt_t configure and tests TestName: _configure_alt_t RequireFeature: gasnet,libgasnet_alt_t CompileTimeLimit: 6 * $DEFAULT$ WarningFilter: all ; '.*' # ignore normal error/warning strings in configure output MakeFlags: trace ; LIBGASNET_CONFIGURE_ARGS_EXTRA="--disable-trace !LIBGASNET_CONFIGURE_ARGS_EXTRA_ALT_T!" MakeFlags: !trace ; LIBGASNET_CONFIGURE_ARGS_EXTRA="--enable-trace !LIBGASNET_CONFIGURE_ARGS_EXTRA_ALT_T!" TestName: alt_t-smp-seq RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_smp TestName: alt_t-smp-par RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_smp,gasnet_has_par TestName: alt_t-udp-seq RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_udp TestName: alt_t-udp-par RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_udp,gasnet_has_par TestName: alt_t-mpi-seq RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_mpi TestName: alt_t-mpi-par RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_mpi,gasnet_has_par TestName: alt_t-ofi-seq RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_ofi TestName: alt_t-ofi-par RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_ofi,gasnet_has_par TestName: alt_t-ibv-seq RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_ibv TestName: alt_t-ibv-par RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_ibv,gasnet_has_par TestName: alt_t-ucx-seq RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_ucx TestName: alt_t-ucx-par RequireFeature: gasnet,libgasnet_alt_t,gasnet_has_ucx,gasnet_has_par # libgasnet_alt_s configure and tests TestName: _configure_alt_s RequireFeature: gasnet,libgasnet_alt_s CompileTimeLimit: 6 * $DEFAULT$ WarningFilter: all ; '.*' # ignore normal error/warning strings in configure output MakeFlags: stats ; LIBGASNET_CONFIGURE_ARGS_EXTRA="--disable-stats !LIBGASNET_CONFIGURE_ARGS_EXTRA_ALT_S!" MakeFlags: !stats ; LIBGASNET_CONFIGURE_ARGS_EXTRA="--enable-stats !LIBGASNET_CONFIGURE_ARGS_EXTRA_ALT_S!" TestName: alt_s-smp-seq RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_smp TestName: alt_s-smp-par RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_smp,gasnet_has_par TestName: alt_s-udp-seq RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_udp TestName: alt_s-udp-par RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_udp,gasnet_has_par TestName: alt_s-mpi-seq RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_mpi TestName: alt_s-mpi-par RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_mpi,gasnet_has_par TestName: alt_s-ofi-seq RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_ofi TestName: alt_s-ofi-par RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_ofi,gasnet_has_par TestName: alt_s-ibv-seq RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_ibv TestName: alt_s-ibv-par RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_ibv,gasnet_has_par TestName: alt_s-ucx-seq RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_ucx TestName: alt_s-ucx-par RequireFeature: gasnet,libgasnet_alt_s,gasnet_has_ucx,gasnet_has_par # libgasnet_alt_ts configure and tests TestName: _configure_alt_ts RequireFeature: gasnet,libgasnet_alt_ts CompileTimeLimit: 6 * $DEFAULT$ WarningFilter: all ; '.*' # ignore normal error/warning strings in configure output MakeFlags: trace && stats ; LIBGASNET_CONFIGURE_ARGS_EXTRA="--disable-trace --disable-stats !LIBGASNET_CONFIGURE_ARGS_EXTRA_ALT_TS!" MakeFlags: trace && !stats ; LIBGASNET_CONFIGURE_ARGS_EXTRA="--disable-trace --enable-stats !LIBGASNET_CONFIGURE_ARGS_EXTRA_ALT_TS!" MakeFlags: !trace && stats ; LIBGASNET_CONFIGURE_ARGS_EXTRA="--enable-trace --disable-stats !LIBGASNET_CONFIGURE_ARGS_EXTRA_ALT_TS!" MakeFlags: !trace && !stats ; LIBGASNET_CONFIGURE_ARGS_EXTRA="--enable-trace --enable-stats !LIBGASNET_CONFIGURE_ARGS_EXTRA_ALT_TS!" TestName: alt_ts-smp-seq RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_smp TestName: alt_ts-smp-par RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_smp,gasnet_has_par TestName: alt_ts-udp-seq RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_udp TestName: alt_ts-udp-par RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_udp,gasnet_has_par TestName: alt_ts-mpi-seq RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_mpi TestName: alt_ts-mpi-par RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_mpi,gasnet_has_par TestName: alt_ts-ofi-seq RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_ofi TestName: alt_ts-ofi-par RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_ofi,gasnet_has_par TestName: alt_ts-ibv-seq RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_ibv TestName: alt_ts-ibv-par RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_ibv,gasnet_has_par TestName: alt_ts-ucx-seq RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_ucx TestName: alt_ts-ucx-par RequireFeature: gasnet,libgasnet_alt_ts,gasnet_has_ucx,gasnet_has_par gasnet-2025.8.0/tests/harness/external-upcxx/0000775000175000017500000000000015142313673021216 5ustar alastairalastairgasnet-2025.8.0/tests/harness/external-upcxx/Makefile0000664000175000017500000005443615142313673022672 0ustar alastairalastairUPCXX_GIT_REPO ?=# Set to a git repo address to enable git-based fetch UPCXX_EXTRAS_GIT_REPO ?=# Set to a git repo address to enable git-based fetch UPCXX_GIT_COMMIT ?= develop UPCXX_EXTRAS_GIT_COMMIT ?= develop UPCXX_BLDDIR ?= $(HARNESS_WORKDIR)/upcxx UPCXX_INSTDIR ?= $(HARNESS_WORKDIR)/upcxx-inst UPCXX_TMPDIR ?= $(HARNESS_WORKDIR)/upcxx-tmp UPCXX_CONDUIT ?= $(NETWORK)# Default to same conduit as the enclosing harness run UPCXX_EXTRA_FLAGS ?=# extra flags to add to both compilers for lib and tests, may be set by pushbuild/end-user UPCXX_EXTRA_TEST_FLAGS ?=# extra flags to add to tests (but not lib), may be set by pushbuild/end-user UPCXX_TEST_FLAGS ?=# per-test flags reserved for use by harness.conf UPCXX_CONFIGURE_EXTRA ?=# extra flags to add to UPC++ configure command line UPCXX_MAKE_J ?= -j4 # concurrency of GNU Make steps UPCXX_FC ?= $(shell which gfortran) # legacy harness support GASNET_BLDDIR ?= $(TOP_BUILDDIR)/gasnet # ensure all child invocations see the same conduit defined by UPCXX_CONDUIT, # even if the enclosing environment contains conflicting values export UPCXX_NETWORK := $(UPCXX_CONDUIT) export UPCXX_GASNET_CONDUIT := $(UPCXX_CONDUIT) # Options for providing GASNET: # 1. set UPCXX_GASNET to an existing build path to use. # The remaining options assume $(GASNET_BLDDIR) is a valid build dir # 2. set UPCXX_GASNET to an existing source path to use. # This one notably implies this CI will configure and build GASNet. # 3. set UPCXX_TARBALL_GASNET=1 to create a GASNet tarball and use it # This one notably implies this CI will configure and build GASNet. # 4. Default is to point at the existing $(GASNET_BLDDIR) build. # # All three options will use the provided build directory only in the # '_upcxx' test (the UPC++ configure step) and not after. ifneq ($(strip $(UPCXX_GASNET)),) UPCXX_EXTERNAL_GASNET:=1 CONFIGURE_GASNET:=$(strip $(UPCXX_GASNET)) ifeq ($(wildcard $(strip $(UPCXX_GASNET))/gasnet_config.h),) UPCXX_GASNET_SOURCES:=1 endif else ifneq ($(strip $(UPCXX_TARBALL_GASNET)),) CONFIGURE_GASNET:=$(UPCXX_BLDDIR)/gasnet.tar.gz # actual filename will vary UPCXX_GASNET_SOURCES:=1 else # default to using builddir CONFIGURE_GASNET:=$(GASNET_BLDDIR) endif endif ifeq ($(UPCXX_GASNET_SOURCES),1) # UPCXX_GASNET=srcdir and UPCXX_TARBALL_GASNET configure GASNet CONFIGURE_FRAGMENTS:=$(GASNET_BLDDIR) # Don't pollute configure with harness flags UNSET_VARS = CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS endif CONFIGURE_FRAGMENTS ?= $(CONFIGURE_GASNET) UPCXX_TESTMODE ?= wrap HARNESS_LOGDIR ?= . LOGFILE = $(HARNESS_LOGDIR)/upcxx.log TO_LOG = >> $(LOGFILE) 2>&1 # Various UPC++ scripts require bash SHELL := /bin/bash PIPEEXIT := ; ( exit $${PIPESTATUS[0]} ) # bashism to preserve first exit code in a pipe # Paths and options for standard tools WGET ?= wget -nv GZCAT ?= gzip -cd TAR ?= tar UNZIP ?= unzip P7ZIP ?= 7za GIT ?= git PERL ?= perl # only used in the check-testsuite target # GASNET_CODEMODE currently simply follows UPCXX_CODEMODE GASNET_CODEMODE=$(UPCXX_CODEMODE) # Logic to extract GASNet's compiler variables. # intentionally ignore the environment here because it is set by harness # use UPCXX_TEST_ENV to override if necessary. # We use a sub-shell to avoid pulling in the entire makefile fragment. # TODO: may want to handle LDFLAGS here as well? GASNET_VARS = $(shell $(MAKE) --no-print-directory echovars FRAGMENT=$(strip $(UPCXX_CONDUIT))) FRAGMENT=#empty by default ifneq ($(FRAGMENT),) # use any fragment we can find -include $(CONFIGURE_FRAGMENTS)/$(FRAGMENT)-conduit/$(FRAGMENT)-seq.mak -include $(CONFIGURE_FRAGMENTS)/$(FRAGMENT)-conduit/$(FRAGMENT)-par.mak echovars: force; @echo "CC='$(GASNET_CC)' CXX='$(GASNET_CXX)'" .PHONY: echovars endif ifneq ($(strip $(UPCXX_TEST_ENV)),) DO_ENV := export $(UPCXX_TEST_ENV) else DO_ENV := : # empty command to be safely preceded or followed by '&&' or ';' endif CONFIGURE_ENV = \ export $(GASNET_VARS) && $(DO_ENV) && \ export CC="$$CC $(strip $(UPCXX_EXTRA_FLAGS))" CXX="$$CXX $(strip $(UPCXX_EXTRA_FLAGS))" # UPCXX_EXTRA_FLAGS must be applied on three distinct paths: # # 1. When building libupcxx (LIB_BUILD_ENV) # If NOT configuring GASNet, then UPCXX_EXTRA_FLAGS needs to appear # in the MANUAL_{C,CXX}FLAGS when libupcxx is built, otherwise the # setting of CONFIGURE_ENV, above, is sufficient ifneq ($(strip $(UPCXX_EXTRA_FLAGS)),) ifneq ($(UPCXX_GASNET_SOURCES),1) LIB_BUILD_ENV = env MANUAL_CFLAGS="$(strip $(UPCXX_EXTRA_FLAGS))" MANUAL_CXXFLAGS="$(strip $(UPCXX_EXTRA_FLAGS))" endif endif # # 2. When building tests via inst-test, wrap-test or using CMake # This is handled by upcxx-meta, which will record the configure-time # values of CC and CXX even when this CI is not configuring GASNet # # 3. When building make-based tests (MAKE_TEST_ENV) # Handled by setting CC and CXX to their values reported by upcxx-meta MAKE_TEST_ENV = \ CC="$$($(UPCXX_INSTDIR)/bin/upcxx-meta CC)" \ CXXFLAGS="$(UPCXX_EXTRA_TEST_FLAGS) $(UPCXX_TEST_FLAGS)" \ CXX="$$($(UPCXX_INSTDIR)/bin/upcxx-meta CXX) $(UPCXX_EXTRA_TEST_FLAGS) $(UPCXX_TEST_FLAGS)" \ UPCXX_INSTALL=$(UPCXX_INSTDIR) # Parametrized support for download/unpack UPCXX_DOWNLOAD ?=# one of "unzip", "p7zip" or "tgz", default to auto-detect from downloaded archive suffix upcxx_dl_suffix_unzip := .zip upcxx_dl_suffix_p7zip := .zip upcxx_dl_suffix_tgz := .tar.gz upcxx_dl_suffix=$(upcxx_dl_suffix_$(strip $(UPCXX_DOWNLOAD))) ifeq ($(strip $(upcxx_dl_suffix)),) upcxx_dl_suffix := .zip endif #UPCXX_URL ?= https://upc-bugs.lbl.gov/nightly/unlisted/berkeleylab-upcxx-$(UPCXX_GIT_COMMIT)$(upcxx_dl_suffix) UPCXX_URL ?= https://bitbucket.org/berkeleylab/upcxx/get/$(UPCXX_GIT_COMMIT)$(upcxx_dl_suffix) #UPCXX_EXTRAS_URL ?= https://upc-bugs.lbl.gov/nightly/unlisted/berkeleylab-upcxx-extras-$(UPCXX_EXTRAS_GIT_COMMIT).tar.gz UPCXX_EXTRAS_URL ?= https://bitbucket.org/berkeleylab/upcxx-extras/get/$(UPCXX_EXTRAS_GIT_COMMIT)$(upcxx_dl_suffix) VERSION_FILE=$(HARNESS_LOGDIR)/git_$(PRODUCT) upcxx-download: force rm -Rf $(DESTDIR) $(UPCXX_TMPDIR) && mkdir $(UPCXX_TMPDIR) @if test -n "$(GIT_REPO)" ; then \ set -x ; cd $(UPCXX_TMPDIR) && $(GIT) archive --remote=$(GIT_REPO) --format=zip --prefix=git-archive/ --output=git-archive.zip $(GIT_COMMIT) || exit 2 ; \ elif ( expr $(URL) : file:/ || expr /$(URL) : // ) >/dev/null; then \ set -x ; cd $(UPCXX_TMPDIR) && ln -s $(URL:file:%=%) . ; \ else \ set -x ; cd $(UPCXX_TMPDIR) && $(WGET) $(URL) 2>&1 || ( cat wget-log 2> /dev/null ; exit 3 ) || exit $$? ; \ fi cd $(UPCXX_TMPDIR) && cat wget-log 2> /dev/null ; rm -f wget-log ; exit 0 @UPCXX_TESTDIR=`pwd` && \ cd $(UPCXX_TMPDIR) && UPCXX_ARCHIVE=`/bin/ls` && UPCXX_DOWNLOAD="$(strip $(UPCXX_DOWNLOAD))" && \ if test -z "$$UPCXX_DOWNLOAD" ; then \ case "$$UPCXX_ARCHIVE" in \ *.zip) UPCXX_DOWNLOAD=unzip ;; \ *.p7z|*.7z) UPCXX_DOWNLOAD=p7zip ;; \ *.tar.gz|*.tgz) UPCXX_DOWNLOAD=tgz ;; \ *) echo "ERROR: Unknown archive suffix on '$$UPCXX_ARCHIVE': Set UPCXX_DOWNLOAD=(unzip,p7zip,tgz)" ; exit 1; \ esac \ fi && \ echo Fetched $$UPCXX_ARCHIVE : UPCXX_DOWNLOAD=$$UPCXX_DOWNLOAD && \ $(MAKE) -f $$UPCXX_TESTDIR/Makefile upcxx-unpack-$$UPCXX_DOWNLOAD UPCXX_ARCHIVE="$$UPCXX_ARCHIVE" && \ rm -f $(UPCXX_TMPDIR)/$$UPCXX_ARCHIVE mv $(UPCXX_TMPDIR)/* $(DESTDIR) # archive's root dir will vary rmdir $(UPCXX_TMPDIR) @echo "$(PRODUCT) version: `cat $(VERSION_FILE) 2>/dev/null`" @if grep -q '^#define' $(DESTDIR)/src/git_version.h 2>/dev/null ; then \ ver=`grep '^#define' $(DESTDIR)/src/git_version.h | cut -f3 -d' '` ; \ if test -n "$$ver" ; then \ echo "$$ver" > $(VERSION_FILE) ; \ echo "$(PRODUCT) describe: $$ver" ; \ fi; \ fi # Three ways to unpack the archive: # Option 1: "unzip" - .zip w/ unzip # This is the favored approach because it gives us the hash and uses a widely available utility. upcxx-unpack-unzip: force; $(UNZIP) -qz $(UPCXX_ARCHIVE) > $(VERSION_FILE) && $(UNZIP) -q $(UPCXX_ARCHIVE) # Option 2: "p7zip" - .zip w/ 7za (from p7zip package) # This also gives us the hash, but uses a less widely available utility. # However, it is sometimes necessary because many unzip installations contain a bug w.r.t. symlinks upcxx-unpack-p7zip: force $(P7ZIP) x -bd $(UPCXX_ARCHIVE) 2>&1 | tee -a $(VERSION_FILE).p7z $(PIPEEXIT) @-grep 'Comment = ' $(VERSION_FILE).p7z | cut -f3 -d' ' > $(VERSION_FILE) # Option 3: "tgz" - tar + gzip # This is the most portable, but cannot extract the hash unless git is available upcxx-unpack-tgz: force @-$(GZCAT) $(UPCXX_ARCHIVE) | $(GIT) get-tar-commit-id > $(VERSION_FILE) ; exit 0 $(GZCAT) $(UPCXX_ARCHIVE) | $(TAR) xf - #### .PHONY: upcxx-download upcxx-unpack-unzip upcxx-unpack-p7zip upcxx-unpack-tgz # Symlink or simple script that corresponds to # RunCmd = ./launcher -np %N %P %A launcher: -rm -f $@ @UPCXXRUN=$(UPCXX_INSTDIR)/bin/upcxx-run; \ if test -f $$UPCXXRUN ; then set -x ; \ ln -s $$UPCXXRUN $@ ; \ else \ echo "ERROR: $$UPCXXRUN is missing" ; exit 1 ; \ fi # similar for MPI progs # best-effort when missing mpi-conduit: # 1. leverage conduit's launcher # a. some conduit's gasnetrun_ may be a valid mpi launcher # b. other conduit's may support mpi-spawner # 2. final fallback is mpirun launcher-mpi: -rm -f $@ @gasnet_bindir=$(UPCXX_INSTDIR)/gasnet.$(GASNET_CODEMODE)/bin; \ if test -x $$gasnet_bindir/gasnetrun_mpi ; then \ set -x ; ln -s $$gasnet_bindir/gasnetrun_mpi $@ ; \ else \ conduit_launcher=$$gasnet_bindir/gasnetrun_$(UPCXX_CONDUIT); \ case "$(UPCXX_CONDUIT)" in \ *) \ if test -r $$conduit_launcher-mpi.pl ; then \ mpi_launcher="$$conduit_launcher -spawner=mpi"; \ else \ mpi_launcher=mpirun; \ fi; \ set -x; \ echo '#!/bin/sh' > $@ ; \ echo "exec $$mpi_launcher" '"$$@"' >> $@ ; \ echo 'echo "ERROR: failed to find mpirun, gasnetrun_mpi or a conduit-specific alternative." ; exit 1' >> $@ ; \ chmod +x $@ \ ;; \ esac; \ fi _upcxx: force -rm -Rf upcxx-built upcxx-install launcher launcher-mpi $(LOGFILE) echo ======== UPCXX download ======== | tee $(LOGFILE) $(PIPEEXIT) ( set -x ; $(MAKE) upcxx-download PRODUCT=upcxx URL=$(UPCXX_URL) GIT_REPO=$(UPCXX_GIT_REPO) GIT_COMMIT=$(UPCXX_GIT_COMMIT) DESTDIR=$(UPCXX_BLDDIR) ) 2>&1 | tee -a $(LOGFILE) $(PIPEEXIT) echo ======== UPCXX EXTRAS download ======== | tee -a $(LOGFILE) $(PIPEEXIT) ( set -x ; $(MAKE) upcxx-download PRODUCT=upcxx_extras URL=$(UPCXX_EXTRAS_URL) GIT_REPO=$(UPCXX_EXTRAS_GIT_REPO) GIT_COMMIT=$(UPCXX_EXTRAS_GIT_COMMIT) DESTDIR=$(UPCXX_BLDDIR)/extras ) 2>&1 | tee -a $(LOGFILE) ; exit 0 # deliberately ignore failures @echo UPCXX_GASNET=$(UPCXX_GASNET) UPCXX_BLDDIR=$(UPCXX_BLDDIR) $(TO_LOG) @echo CONFIGURE_GASNET=$(CONFIGURE_GASNET) CONFIGURE_FRAGMENTS=$(CONFIGURE_FRAGMENTS) $(TO_LOG) @if test -n "$(UPCXX_EXTERNAL_GASNET)" ; then \ echo ======== UPCXX_GASNET:external ========; set -x; \ elif test -n "$(UPCXX_TARBALL_GASNET)" ; then \ echo ======== UPCXX_GASNET:tarball ========; set -x; \ $(MAKE) dist -C $(GASNET_BLDDIR) ; \ else \ echo ======== UPCXX_GASNET:builddir ========; set -x; \ fi $(TO_LOG) -echo PATH="$$PATH" $(TO_LOG) @-( set -x; $(CONFIGURE_ENV) ; $$CC --version ) 2>&1 | egrep -i -v -e error -e warning $(TO_LOG) @-( $(CONFIGURE_ENV) ; set -x ; $$CXX --version ) 2>&1 | egrep -i -v -e error -e warning $(TO_LOG) @-( $(CONFIGURE_ENV) ; set -x ; $(MAKE) --version ) 2>&1 | egrep -i -v -e error -e warning $(TO_LOG) @-( $(CONFIGURE_ENV) ; set -x ; $(CMAKE) --version ) 2>&1 | egrep -i -v -e error -e warning $(TO_LOG) @( echo ======== Configure UPCXX ========; set -x; \ if test -n "$(UPCXX_TARBALL_GASNET)" ; then \ gasnet=`ls -1t $(GASNET_BLDDIR)/GASNet-*.tar.gz | head -1` ; \ else \ gasnet=$(CONFIGURE_GASNET); \ fi ; \ cd $(UPCXX_BLDDIR) && $(CONFIGURE_ENV) && \ $(UPCXX_BASH) ./configure --prefix=$(UPCXX_INSTDIR) --with-gasnet=$$gasnet \ --disable-auto-conduit-detect --with-default-network=$(UPCXX_CONDUIT) \ --enable-single=$(GASNET_CODEMODE) $(UPCXX_CONFIGURE_EXTRA) || exit 1; \ ) $(TO_LOG) @( echo ======== Build UPCXX RT libs ========; set -x; \ $(LIB_BUILD_ENV) \ $(MAKE) $(UPCXX_MAKE_J) -C $(UPCXX_BLDDIR) all || exit 1; \ ) $(TO_LOG) @touch upcxx-built @echo '#!/bin/sh' > $@ ; chmod +x $@ _upcxx-inst: upcxx-built rm -Rf $(UPCXX_INSTDIR) $@ @( echo ======== UPCXX install ========; set -x; \ $(MAKE) -C $(UPCXX_BLDDIR) $(UPCXX_MAKE_J) install || exit 1; ) $(TO_LOG) /bin/ls -alR $(UPCXX_INSTDIR) $(TO_LOG) $(UPCXX_INSTDIR)/bin/upcxx-info $(TO_LOG) @echo "NOTE: Please ignore expected 'Config file not found' messages above " $(TO_LOG) $(MAKE) launcher launcher-mpi 2>&1 | tee -a $(LOGFILE) $(PIPEEXIT) @touch upcxx-install @echo '#!/bin/sh' > $@ ; chmod +x $@ _upcxx-smoke_test: upcxx-built @( echo ======== UPCXX make check ========; set -x; \ $(MAKE) -C $(UPCXX_BLDDIR) $(UPCXX_MAKE_J) check || exit 1; ) $(TO_LOG) @echo '#!/bin/sh' > $@ ; chmod +x $@ # Build a single test from the installed UPCXX directory inst_test: upcxx-install @set -x ; $(DO_ENV) && \ source $(UPCXX_INSTDIR)/bin/upcxx-meta SET ; \ $$CXX $$CXXFLAGS $$CPPFLAGS $$LDFLAGS -o $(TEST_EXE) $(TEST_PATH) $(UPCXX_EXTRA_TEST_FLAGS) $(UPCXX_TEST_FLAGS) $$LIBS # Build a single test using the upcxx wrapper wrap_test: upcxx-install @set -x ; $(DO_ENV) && \ $(UPCXX_INSTDIR)/bin/upcxx -o $(TEST_EXE) $(TEST_PATH) $(UPCXX_EXTRA_TEST_FLAGS) $(UPCXX_TEST_FLAGS) # Build a single test using the dev-tests target in the UPC++ Makefile (only valid for in-repo tests) make_test: upcxx-install @set -x ; $(DO_ENV) && \ $(MAKE) -C $(UPCXX_BLDDIR) $(UPCXX_MAKE_J) dev-tests-$(GASNET_CODEMODE) NETWORKS=$(UPCXX_CONDUIT) \ TESTS=^test-$(TEST_EXE) EXTRAFLAGS="$(UPCXX_EXTRA_TEST_FLAGS) $(UPCXX_TEST_FLAGS)" @mv $(UPCXX_BLDDIR)/test-$(TEST_EXE)-$(GASNET_CODEMODE)-$(UPCXX_CONDUIT) $(TEST_EXE) IGNORE_TESTS_PAT=neg-.+|getenv|promise_multiple_results|promise_reused|quiescence_failure|issue105|hello_via_shell check-testsuite: $(MAKE) -C $(UPCXX_BLDDIR) $(UPCXX_MAKE_J) dev-tests-$(GASNET_CODEMODE) UPCXX_DRY_RUN=1 NETWORKS=$(UPCXX_CONDUIT) > check-testsuite.log @$(PERL) -ne 'BEGIN { open F, "harness.conf" or die $$!; while () { $$tests{$$1}=1 if (m/^TestName:\s*(\S+)/); }; }' \ -e 'if (m/^Compiling test-(.+)-(opt|debug)/) { if(not ($$tests{$$1} || $$1 =~ m/^($(IGNORE_TESTS_PAT))-(seq|par)/)) { print "$$1\n"; $$err=1; } }' \ -e 'END { if ($$err) { print "ERROR: Tests above missing from harness.conf\n"; } else { print "SUCCESS\n"; } }' \ < check-testsuite.log @echo '#!/bin/sh' > $@ ; chmod +x $@ VPATH = \ $(UPCXX_BLDDIR)/test \ $(UPCXX_BLDDIR)/test/ccs \ $(UPCXX_BLDDIR)/test/uts \ $(UPCXX_BLDDIR)/test/regression \ $(UPCXX_BLDDIR)/example \ $(UPCXX_BLDDIR)/example/prog-guide \ $(UPCXX_BLDDIR)/example/compute-pi \ $(UPCXX_BLDDIR)/example/serialization \ $(UPCXX_BLDDIR)/bench \ $(UPCXX_BLDDIR)/extras/extensions/allocator \ $(UPCXX_BLDDIR)/extras/extensions/padded_device_allocator \ $(UPCXX_BLDDIR)/extras/examples/rpc_ff_quiescence \ $(UPCXX_BLDDIR)/extras/examples/vector_accumulate \ $(UPCXX_BLDDIR)/extras/tutorials/2021-11/examples \ $(UPCXX_BLDDIR)/extras/tutorials/2021-11/solutions # strip off threadmode from target name and export it %-seq :: force ; $(MAKE) UPCXX_THREADMODE=seq TEST_EXE=$@ $*-exe %-par :: force ; $(MAKE) UPCXX_THREADMODE=par TEST_EXE=$@ $*-exe # Pattern rule builds tests, using logic dependent on TESTMODE %-exe :: %.cpp force @ UPCXX_TESTMODE="$(strip $(UPCXX_TESTMODE))" ; \ if test "$$UPCXX_TESTMODE" = "meta" ; then set -x ; \ $(MAKE) inst_test TEST_PATH=$< ; \ elif test "$$UPCXX_TESTMODE" = "wrap" ; then set -x ; \ $(MAKE) wrap_test TEST_PATH=$< ; \ elif test "$$UPCXX_TESTMODE" = "make" ; then set -x ; \ $(MAKE) make_test ; \ else \ echo "Unrecognized UPCXX_TESTMODE=$$UPCXX_TESTMODE" ; exit 100; \ fi # tests/ccs ccs-%-exe :: ccs-%.sh force @set -x ; $(DO_ENV) && \ $(MAKE) -C $(UPCXX_BLDDIR) $(UPCXX_MAKE_J) dev-tests-$(GASNET_CODEMODE) NETWORKS=$(UPCXX_CONDUIT) \ TESTS=^test-ccs-$*-$(UPCXX_THREADMODE) EXTRAFLAGS="$(UPCXX_EXTRA_TEST_FLAGS) $(UPCXX_TEST_FLAGS)" set -e -x; \ longname="test-ccs-$*-$(UPCXX_THREADMODE)-$(GASNET_CODEMODE)-$(UPCXX_CONDUIT)"; \ rm -Rf ./$$longname $(TEST_EXE) $(TEST_EXE).runcmd; \ if test -e $(UPCXX_BLDDIR)/$$longname.runcmd ; then \ mv $(UPCXX_BLDDIR)/$$longname .; \ mv $(UPCXX_BLDDIR)/$$longname.runcmd $(TEST_EXE).runcmd; \ ln -sf $$longname $(TEST_EXE); \ else \ mv $(UPCXX_BLDDIR)/$$longname $(TEST_EXE); \ fi # upcxx-examples guppie guppie-%-exe :: $(UPCXX_BLDDIR)/extras/examples/gups/upcxx upcxx-install force @set -x ; env $(MAKE_TEST_ENV) $(MAKE) -C $< clean guppie-$* mv $&1 | tee -a $(LOGFILE) $(PIPEEXIT) ( set -x ; $(MAKE) upcxx-download PRODUCT=sympack_input URL=$(SYMPACK_INPUT_URL) GIT_REPO= GIT_COMMIT= DESTDIR=$(SYMPACK_DIR)/input ) 2>&1 | tee -a $(LOGFILE) $(PIPEEXIT) mv $(SYMPACK_DIR)/input/$(SYMPACK_INPUT_PROBLEM).rb sympack-input.rb @echo '#!/bin/sh' > $@ ; chmod +x $@ sympack-exe :: upcxx-install force -rm -Rf $(SYMPACK_DIR)/$(UPCXX_THREADMODE) mkdir $(SYMPACK_DIR)/$(UPCXX_THREADMODE) cd $(SYMPACK_DIR)/$(UPCXX_THREADMODE) && ( set -x ; \ case "$(UPCXX_THREADMODE)" in seq) export SYMPACK_THREADS=-DENABLE_THREADS=OFF ;; \ par) export SYMPACK_THREADS=-DENABLE_THREADS=ON ;; esac; \ export UPCXX_CODEMODE=$(UPCXX_CODEMODE) UPCXX_VERBOSE=1 ; \ export $(MAKE_TEST_ENV) FC="$(UPCXX_FC)" ; \ $(CMAKE) --version ; \ $(CMAKE) -DCMAKE_PREFIX_PATH=$(UPCXX_INSTDIR) $(CMAKE_ARGS) $(CMAKE_FC_ARGS) \ -DENABLE_PTSCOTCH=OFF -DENABLE_SCOTCH=OFF -DENABLE_PARMETIS=OFF -DENABLE_METIS=OFF \ $(SYMPACK_CUDA) $$SYMPACK_THREADS $(SYMPACK_BUILD) \ .. ) $(MAKE) -C $(SYMPACK_DIR)/$(UPCXX_THREADMODE) $(SYMPACK_DRIVER) VERBOSE=1 mv $(SYMPACK_DIR)/$(UPCXX_THREADMODE)/$(SYMPACK_DRIVER) $(TEST_EXE) sympack2D-exe :: force $(MAKE) SYMPACK_DRIVER=run_sympack2D sympack-exe sympack2D_cuda-exe :: force $(MAKE) SYMPACK_DRIVER=run_sympack2D SYMPACK_CUDA=-DENABLE_CUDA=ON sympack-exe force: .PHONY: force inst_test gasnet-2025.8.0/tests/harness/external-upcxx/harness.conf0000664000175000017500000017765615142313673023556 0ustar alastairalastair# This suite is independent of UPC compiler: KnownFailureAnySpec # ------------------------------------------ # Single-threaded tests # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: SUCCESS FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: AppEnv: report_file=- TimeLimit: $DEFAULT$ RequireFeature: gasnet,upcxx ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC RunCmd: ./launcher -np %N %P %A MakeFlags: debug ; UPCXX_CODEMODE=debug MakeFlags: nodebug ; UPCXX_CODEMODE=opt SaveOutput: 1 END_DEFAULT_CONFIG # ------------------------------------------ # Tests to compile, but not run TestName: _upcxx CompileTimeLimit: 4 * $DEFAULT$ ProhibitFeature: hack_for_nonupc_test || hack_for_upcxx_smoke_test WarningFilter: all ; 'WARNING: .* platform has not been validated.*?\nWARNING:.*?' WarningFilter: all ; 'WARNING: --enable-single=.*?\nWARNING:.*?\nWARNING:.*?' # `clang++ -std=c++14 -pedantic` warns if (as is the case in some of our automated # testing) GASNet configure's value of `CXX` lacks `-pedantic` and thus detects # support for this attribute. WarningFilter: cc_clang ; '.*?warning: use of the .fallthrough. attribute is a C\+\+.. extension.*?' TimeLimit: 0 TestName: _upcxx-inst ProhibitFeature: hack_for_nonupc_test || hack_for_upcxx_smoke_test CompileTimeLimit: 4 * $DEFAULT$ WarningFilter: all ; '.*?ERROR: failed to find mpirun.*?' TimeLimit: 0 # This is an opt-in only *alternative* to the full suite # Currently it runs "make check" and requires that _upcxx has been built first # Since this *runs* tests in the harness compile stage, it is not typically suited to batch environments # Usage: --suite=external-upcxx --add_feature=upcxx_smoke_test --include=prohibit-feature:hack_for_upcxx_smoke_test TestName: _upcxx-smoke_test CompileTimeLimit: 10 * $DEFAULT$ RequireFeature: upcxx,upcxx_smoke_test ProhibitFeature: hack_for_upcxx_smoke_test TimeLimit: 0 TestName: cmake-seq CompileTimeLimit: $DEFAULT$ * 2 ProhibitFeature: missing_cmake TestName: seq-threadmode-seq TimeLimit: 0 TestName: par-threadmode-seq CompileResult: fail TestName: debug-codemode-seq TimeLimit: 0 RequireFeature: upcxx,debug TestName: o3-codemode-seq TimeLimit: 0 RequireFeature: upcxx,nodebug TestName: check-testsuite TimeLimit: 0 # ------------------------------------------ # Tests that don't use GASNet # Can only be safely launched as a local executable TestName: hello-seq DynamicThreads: 1 RunCmd: %P %A PassExpr: ^Hello world # ------------------------------------------ # General Tests: TestName: hello_gasnet-seq PassExpr: ^Hello from 0 TestName: hello_upcxx-seq ProhibitFeature: hack_for_nonupc_test || hack_for_upcxx_smoke_test MakeFlags: UPCXX_TESTMODE=meta PassExpr: ^Hello from 0 TestName: version-seq TestName: future-seq KnownFailure: compile-failure ; cc_pgi ; issue 334: PGI 20.1 crash on test/future and when_all(one_fut).wait() TestName: serialization-seq TestName: dist_object-seq TestName: dist_when_here-seq TestName: team_when_here-seq TestName: barrier-seq TestName: rpc_barrier-seq TestName: rpc_ff_ring-seq TestName: rput-seq TestName: rput-cover-seq TestName: rput_rpc_cx-seq AppEnv: UPCXX_WARN_EMPTY_RMA=0 TestName: atomics-seq # Output scales with number of compute nodes, but we cannot "spell" that in harness.conf FileLimit: $DEFAULT$ * $THREADS$ TestName: collectives-seq #KnownFailure: compile-all ; upcxx_tests_cxx2a ; issue 368: Header compile failure with GCC 10.1 and -std=c++2a on non-trivial collectives #KnownFailure: compile-warning ; cc_gnu ; issue 376: warnings from GCC 10.1 in reduce.hpp for boolean reductions TestName: team-create-seq TestName: completion-seq TestName: local_team-seq TestName: memory_kinds-seq AppEnv: has_issue_588 ; FI_MR_CUDA_CACHE_MONITOR_ENABLED=0 TestName: uts_ranks-seq TestName: vis-seq AppEnv: UPCXX_WARN_EMPTY_RMA=0 #KnownFailure: run-crash ; os_darwin && cc_gnu ; issue 127 (Mac+gcc+VIS breaks on lpc operation with seq and par) TestName: vis_stress-seq AppEnv: UPCXX_WARN_EMPTY_RMA=0 TestName: alloc-seq AppArgs: 10 FileLimit: 1000 + 5000 * $THREADS$ TestName: copy-seq FailExpr: WARNING: UPC.. GPU support #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: copy-cover-seq MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-purge-option=-g" AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ KnownFailure: run-crash ; network_ofi && ofi_cxi_provider && pshm_xpmem ; Bug 4750 - ofi/cxi fails dynamic registration of "other segment" with xpmem TestName: memberof-seq ProhibitFeature: debug && (cpu_mips64 || cpu_mips64el) # too big -> "relocation truncated to fit: R_MIPS_GOT16" # squash warnings from intentional non-compliant use of offsetof() in upcxx_memberof_unsafe: MakeFlags: cc_subfamily_nvidia && (cc_gnu || cc_clang); UPCXX_TEST_FLAGS="-Xcompiler -Wno-invalid-offsetof" MakeFlags: !cc_subfamily_nvidia && (cc_gnu || cc_clang) ; UPCXX_TEST_FLAGS="-Wno-invalid-offsetof" MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="--diag_suppress1427 -purge-option=-g" MakeFlags: cc_pgi && !(upcxx_issue_390 && debug) ; UPCXX_TEST_FLAGS="--diag_suppress1427" # Cygwin assembler runs out of space without optimization: MakeFlags: os_cygwin && debug ; UPCXX_TEST_FLAGS="-codemode=debug -O1 -Wno-invalid-offsetof" TestName: serialize_large_obj-seq TestName: segment_allocator-seq TestName: view-seq MakeFlags: UPCXX_TESTMODE=make KnownFailure: compile-failure ; cc_intel && os_darwin && nodebug ; issue 559 (Compile error on test/view from Intel compiler on macOS with optional.hpp) # The following is specific to GCC-15 (and probably later), but we cannot (yet?) express compiler versions KnownFailure: run-crash ; cc_gnu && cpu_aarch64 && network_udp && !debug ; Apparent GCC or libstdc++ bug TestName: lpc_barrier-seq DynamicThreads: 1 MakeFlags: UPCXX_TESTMODE=make #MakeFlags: static_link ; UPCXX_TEST_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive" UPCXX_TESTMODE=make # bug3813 TestName: lpc-stress-seq DynamicThreads: 1 MakeFlags: UPCXX_TESTMODE=make TestName: global_ptr-seq # squash erroneous warnings on PGI 19.10(only, issue #284) from upcxx_memberof on non-trivial type (non-trivial default constructor) MakeFlags: cc_pgi ; UPCXX_TEST_FLAGS="--diag_suppress1427" TestName: rpc-ctor-trace-seq CompileTimeLimit: $DEFAULT$ * 2 MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-purge-option=-g" AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 TestName: verbose-ctor-trace-seq FileLimit: 15000 * $THREADS$ TestName: rpc_source_cx-seq TestName: lpc-ctor-trace-seq MakeFlags: UPCXX_TESTMODE=make TestName: serialize_cvref-seq TestName: bad-alloc-seq TestName: bad-segment-alloc-seq RequireFeature: upcxx_cuda || upcxx_hip TestName: cuda-context-seq RequireFeature: upcxx_cuda MakeFlags: network_ucx ; UPCXX_TEST_FLAGS="-DSKIP_DEVICE_FREE" # bug 4396 MakeFlags: network_ofi && ofi_verbs_provider ; UPCXX_TEST_FLAGS="-DSKIP_DEVICE_FREE" # bug 4504 AppEnv: has_issue_588 ; FI_MR_CUDA_CACHE_MONITOR_ENABLED=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 # Compiler fails to realize delete of last_alloc tracks that of last_dev: WarningFilter: cc_gnu && !debug; '.*?device_allocator.hpp[0-9:]* warning: .last_alloc. may be used uninitialized.*?' TestName: ze_device-seq RequireFeature: upcxx_ze TestName: shared-seg-query-seq TestName: nodiscard-seq MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-purge-option=-g" #KnownFailure: compile-failure ; cc_pgi && debug ; issue 390 (PGI debug symbol ICE prior to 19.4) TimeLimit: 0 TestName: as_eager-seq TestName: sys-header-exclude-seq TimeLimit: 0 TestName: optional-seq TestName: persona_scope-seq # ------------------------------------------ # Benchmarks: # The BenchmarkResult units below are in bytes/sec, but there's no way to express that in harness TestName: put_flood-seq TimeLimit: 2*$DEFAULT$ BenchmarkResult: size=8, kind="lat", how="upcxx".*?bw=([^,]+)(,) AppEnv: network_ucx; fixed_iters=5000 # work-around unbounded-buffering behavior (issue 322) #KnownFailure: run-all ; (cc_clang || cc_gnu) && nodebug ; issue 184 (bench/put_flood crashes on clang-7/opt/Linux) TestName: nebr_exchange-seq BenchmarkResult: bw=([^,]+),.*?via="rput"(,) KnownFailure: run-crash ; os_cygwin && cc_clang ; issue 188 (bench/nebr_exchange crash on Cygwin/clang) TestName: gpu_microbenchmark-seq DynamicThreads: 2 # want to avoid 2+ppn which increases PCI traffic and actually runs much slower TimeLimit: 2*$DEFAULT$ AppArgs: -t 10 -w 10 -gg -sg -gs -pg # deliberately omit host memory xfers to avoid output line limit AppEnv: UPCXX_SHARED_HEAP_SIZE=1GB AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no BenchmarkResult: message size = 4194304 byte.*?\n\s*Local GPU -> Remote GPU:[^,]+, ([^ ]+) (GB/s) RequireFeature: upcxx_cuda || upcxx_hip FileLimit: 128*1024 #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-purge-option=-g" CompileTimeLimit: $DEFAULT$ * 2 TestName: misc_perf-seq AppArgs: 1000 BenchmarkResult: upcxx::progress\s*:[^s]*s\s*([^ ]+)\s*(us) MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-purge-option=-g" TestName: rpc_perf-seq AppArgs: 100 10 1048576 BenchmarkResult: 0:\s+1\s+[^s]*s\s+([^ ]+)\s*(us) TestName: rpc_imm-seq AppArgs: 10000 1000 8192 1 ProhibitFeature: network_ucx # ucx has only trivial support for imm and unbounded buffering that leads to problems with this pattern BenchmarkResult: 0:\s+1\s+[^s]*s\s+([^ ]+)\s*(us) TimeLimit: $DEFAULT$ * 2 TestName: imm_dynamic-seq AppArgs: -z 500 10000 64 BenchmarkResult: RPC_FF:[^+]+\+([^%]+)(% improvement) # ------------------------------------------ # Regression suite: TestName: issue88-seq TestName: issue108-seq TestName: issue128-seq TestName: issue138-seq AppEnv: UPCXX_SHARED_HEAP_SIZE=128MB TimeLimit: $DEFAULT$ * 2 MakeFlags: os_cygwin ; UPCXX_TEST_FLAGS="-DMINIMAL -g0 -Wa,-mbig-obj" # issue 278 MakeFlags: (cc_pgi && !(upcxx_issue_390 && debug)) || (!cc_pgi && precious_compiler_license) ; UPCXX_TEST_FLAGS="-DMINIMAL" # issue 278 MakeFlags: cc_nvhpc && cpu_powerpc64le; UPCXX_TEST_FLAGS="-DMINIMAL" # variant on issue 278 MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-DMINIMAL -purge-option=-g" MakeFlags: cpu_riscv64 ; UPCXX_TEST_FLAGS="-DMINIMAL" # no bug(s). just too slow otherwise #KnownFailure: compile-all ; cc_pgi && debug ; PGI+debug entries ICE on issue138 instantiations ProhibitFeature: cpu_mips64 || cpu_mips64el # even MINIMAL exceeds ABI limits (linker failure) TestName: issue140-seq TimeLimit: $DEFAULT$ / 4 #KnownFailure: run-time ; all ; issue 140 (upcxx::discharge() does not discharge remote_cx::as_rpc()) TestName: issue141-seq TestName: issue170-seq TestName: issue185-seq TimeLimit: 0 TestName: issue210-seq TestName: issue219-seq TimeLimit: 0 TestName: issue223-seq PassExpr: done. TestName: issue224-seq TimeLimit: 0 TestName: issue234-seq #KnownFailure: compile-all ; ; issue 234 (Generalized operation completion for barrier_async and broadcast) #KnownFailure: compile-all ; upcxx_tests_cxx2a ; issue 368: Header compile failure with GCC 10.1 and -std=c++2a on non-trivial collectives TestName: issue242-seq TimeLimit: 0 # crashes on most targets. superseded by spec-issue176 TestName: issue262-seq TestName: issue266-seq TestName: issue267-seq #KnownFailure: compile-all ; upcxx_tests_cxx2a ; issue 368: Header compile failure with GCC 10.1 and -std=c++2a on non-trivial collectives TestName: issue277-seq TestName: issue280-seq TestName: issue288-seq TestName: issue312-seq #KnownFailure: compile-all ; ; issue 312 (dist_id::here() does not compile) TestName: issue323-seq TestName: issue333-seq TimeLimit: 0 #KnownFailure: compile-all ; ; issue 333: Multiply defined symbol detail::device_allocator_core::min_alignment w/ std=c++2a TestName: issue336-seq #KnownFailure: run-all ; ; issue 336: Serialization for statically massive types ProhibitFeature: os_cygwin # leaves run-away procs consuming 100% CPU TestName: issue343-seq TestName: issue355-seq #KnownFailure: compile-all ; ; issue 355: upcxx::view broken with asymmetric deserialization TestName: issue356-seq #KnownFailure: compile-all ; ; issue 356: SERIALIZED_{FIELDS,VALUES} incorrectly require public constructors TestName: issue367-seq TestName: issue367b-seq TestName: issue371-seq TestName: issue380-seq TestName: issue391-seq TestName: issue394-seq TestName: issue400-seq TestName: issue402-seq TestName: issue405-seq #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: issue407-seq TestName: issue408-seq TestName: issue412b-seq TimeLimit: 0 TestName: issue413-seq TestName: issue419-seq TestName: issue421-seq #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: issue421b-seq #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: issue421c-seq TestName: issue427-seq TestName: issue427b-seq TestName: issue428-seq TimeLimit: 0 TestName: issue440-seq TestName: issue447-seq TestName: issue450-seq TimeLimit: 0 TestName: issue462-seq TestName: issue473-seq TestName: issue477-seq TestName: issue478-seq TestName: issue482-seq TestName: issue483-seq TestName: issue512-seq TestName: issue547-seq MakeFlags: !cc_subfamily_nvidia && (cc_clang || cc_gnu) ; UPCXX_TEST_FLAGS="-Wno-self-move" MakeFlags: cc_subfamily_nvidia && (cc_clang || cc_gnu) ; UPCXX_TEST_FLAGS="-Xcompiler -Wno-self-move" TestName: issue552-seq TestName: issue609-seq TestName: issue613b-seq TimeLimit: 0 TestName: spec-issue104-seq TestName: spec-issue144b-seq TestName: spec-issue144c-seq TestName: spec-issue158-seq TestName: spec-issue160-seq TestName: spec-issue170-seq TestName: spec-issue176-seq TestName: spec-issue189-seq AppEnv: has_issue_588 ; FI_MR_CUDA_CACHE_MONITOR_ENABLED=0 TestName: spec-issue198-seq TestName: spec-issue199-seq TestName: spec-issue204-seq # Spurious warning seen with `-Wall` and GCC 13: KnownFailure: compile-warning ; cc_gnu && !debug; issue 613: Warnings from persona.hpp # ------------------------------------------ # Guide examples: TestName: hello-world-seq PassExpr: ^Hello world from TestName: rb1d-seq PassExpr: ^Converged at 5590 TestName: rb1d-rpc-seq PassExpr: ^Converged at 5590 TestName: rb1d-rpcinit-seq PassExpr: ^Converged at 5590 TestName: dmap-test-seq TestName: dmap-async-insert-test-seq TimeLimit: $DEFAULT$ * 1.5 TestName: dmap-async-find-test-seq TimeLimit: $DEFAULT$ * 1.5 TestName: dmap-quiescence-test-seq TestName: dmap-atomics-test-seq TestName: dmap-conjoined-test-seq TestName: dmap-promises-test-seq TestName: team_simple-seq TestName: team_advanced-seq TestName: team_create_sub-seq TestName: local-team-seq TestName: non-contig-example-seq TestName: view-accumulate-seq TestName: view-histogram1-seq TestName: view-histogram2-seq TestName: h-d-seq RequireFeature: upcxx_cuda AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: h-d-remote-seq RequireFeature: upcxx_cuda AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: serial-fields-seq TestName: serial-values-seq TestName: serial-recursive-seq TestName: serial-custom-seq TestName: rput-rpc-seq # default "fast floating point mode" in recent oneAPI compilers leads to nuisance warnings (two versions): WarningFilter: cc_clang ; '.*?warning: comparison with NaN always evaluates to false in fast floating point modes.*?' WarningFilter: cc_clang ; '.*?warning: explicit comparison with NaN in fast floating point mode.*?' TestName: reduce-complex-minloc-seq TestName: broadcast-example-seq # ------------------------------------------ # serialization examples TestName: upcxx_serialized_fields-seq TestName: upcxx_serialized_values-seq TestName: upcxx_serialized_fields_recursive-seq TestName: upcxx_serialized_values_recursive-seq TestName: upcxx_serialization-seq TestName: upcxx_serialization_nested-seq TestName: serialize_abstract_base-seq TestName: unrolled_list-seq # ------------------------------------------ # General examples TestName: compute-pi-seq AppArgs: 10000 PassExpr: ^pi estimate: 3.1 TestName: compute-pi-multi-examples-seq AppArgs: 10000 TestName: rpc-then-rget-seq TestName: team-self-seq # ------------------------------------------ # Tutorial examples/exercises: # hello-world-file deliberately skipped because it outputs exclusively to file # hello-world-file-synchronized deliberately skipped because it calls sync() TestName: hello-world-rpc-to-0-seq PassExpr: Hello from TestName: jac1d-seq TestName: dmap-insert-test-seq TestName: dmap-erase-update-test-seq TestName: drmap-insert-test-seq TestName: pi-no-overlap-seq PassExpr: PI estimated to 3 TestName: pi-conjoined-seq PassExpr: PI estimated to 3 TestName: pi-no-barrier-seq PassExpr: PI estimated to 3 TestName: ex1-seq PassExpr: # no convenient way to validate output.txt TestName: ex2-seq TestName: ex3-seq TestName: ex4-seq MakeFlags: UPCXX_TEST_FLAGS="-DFIND_CHECKS" KnownFailure: run-crash ; network_ibv && has_bug_4039 ; Bug 4039 - intermittent ibv crashes in upcxx/ex4 # ------------------------------------------ # upcxx-extras TestName: allocator-example-seq # The following is specific to GCC-15 (and probably later), but we cannot (yet?) express compiler versions KnownFailure: run-crash ; cc_gnu && debug ; upcc-extras analogue to Issue 643 (vector::reserve v. resize) TestName: vector_accumulate_example-seq TestName: rpc_ff_quiescence-seq TestName: padded_device_allocator-example-seq RequireFeature: upcxx_cuda || upcxx_hip TestName: laplace2d-seq AppArgs: 100 4096 TestName: cannon-seq AppArgs: 2048 AppEnv: UPCXX_SHARED_HEAP_SIZE=256MB DynamicThreads: 1, 4, 16 # Cannon alg requires a perfect square rank count BenchmarkResult: Compute:\s*(\S+)\s*(s) ProhibitFeature: missing_cblas || (os_darwin && cc_gnu) # Homebrew gcc cannot parse Apple #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: cannon_cuda-seq AppArgs: (_threads == 1) ; 512 # reduce matrix size for single-rank, avoid BAR1 limit on Tesla AppArgs: (_threads > 1) ; 2048 AppEnv: UPCXX_SHARED_HEAP_SIZE=256MB DynamicThreads: 1, 4, 16 # Cannon alg requires a perfect square rank count RequireFeature: upcxx_cuda_compute_30 BenchmarkResult: Compute:\s*(\S+)\s*(s) ProhibitFeature: missing_cblas || missing_cublas || (os_darwin && cc_gnu) # Homebrew gcc cannot parse Apple #KnownFailure: run-match ; (_threads > 4) ; issue 381 (cannon_cuda fails to validate with 16 ranks) #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ # ------------------------------------------ # upcxx-extras dist_array TestName: DA-alltoall-seq TestName: DA-basic-seq TestName: DA-cache-seq TestName: DA-fileinput-seq TestName: DA-jacobi-seq TestName: DA-scatter-seq # ------------------------------------------ # misc examples TestName: cuda_vecadd-seq RequireFeature: upcxx_cuda_compute_30 MakeFlags: nodebug ; CXXFLAGS=-O3 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 TestName: hip_vecadd-seq RequireFeature: upcxx_hip MakeFlags: nodebug ; CXXFLAGS=-O3 AppEnv: hip_platform_nvidia && has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 TestName: sycl_vecadd-seq RequireFeature: upcxx_ze,sycl MakeFlags: nodebug ; CXXFLAGS=-O3 # backend compiler's warning-supression flags in LDFLAGS can lead to warnings from SYCL linker WarningFilter: '.*?warning: unknown warning option.*?' # ------------------------------------------ # Multi-threaded tests # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: SUCCESS FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: AppEnv: report_file=- TimeLimit: $DEFAULT$ RequireFeature: gasnet_has_par,upcxx ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC RunCmd: ./launcher -np %N %P %A MakeFlags: debug ; UPCXX_CODEMODE=debug MakeFlags: nodebug ; UPCXX_CODEMODE=opt SaveOutput: 1 END_DEFAULT_CONFIG # ------------------------------------------ # Tests to compile, but not run TestName: cmake-par CompileTimeLimit: $DEFAULT$ * 2 ProhibitFeature: missing_cmake TestName: seq-threadmode-par CompileResult: fail TestName: par-threadmode-par TimeLimit: 0 TestName: debug-codemode-par TimeLimit: 0 RequireFeature: gasnet_has_par,upcxx,debug TestName: o3-codemode-par TimeLimit: 0 RequireFeature: gasnet_has_par,upcxx,nodebug # ------------------------------------------ # Tests that don't use GASNet # Can only be safely launched as a local executable TestName: hello_threads-par DynamicThreads: 1 RunCmd: %P %A PassExpr: ^Done MakeFlags: static_link ; UPCXX_TEST_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive" #KnownFailure: run-crash ; os_cnl ; Bug 3813 - Crashes using C++11 threads on Cray systems TestName: uts_threads-par DynamicThreads: 1 RunCmd: %P %A MakeFlags: static_link ; UPCXX_TEST_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive" #KnownFailure: run-crash ; os_darwin && cc_gnu ; issue 49 (uts_{threads,hybrid,omp_ranks}/lpc_barrier crash on (High)Sierra w/ g++) #KnownFailure: run-crash ; os_cnl ; Bug 3813 - Crashes using C++11 threads on Cray systems # ------------------------------------------ # General Tests: TestName: hello_gasnet-par PassExpr: ^Hello from 0 TestName: hello_upcxx-par ProhibitFeature: hack_for_nonupc_test || hack_for_upcxx_smoke_test MakeFlags: UPCXX_TESTMODE=meta PassExpr: ^Hello from 0 TestName: version-par TestName: future-par KnownFailure: compile-failure ; cc_pgi ; issue 334: PGI 20.1 crash on test/future and when_all(one_fut).wait() TestName: serialization-par TestName: dist_object-par TestName: dist_when_here-par TestName: team_when_here-par TestName: barrier-par TestName: rpc_barrier-par TestName: rpc_ff_ring-par TestName: rput-par TestName: rput-cover-par TestName: rput_rpc_cx-par AppEnv: UPCXX_WARN_EMPTY_RMA=0 TestName: rput_thread-par TestName: atomics-par # Output scales with number of compute nodes, but we cannot "spell" that in harness.conf FileLimit: $DEFAULT$ * $THREADS$ TestName: collectives-par #KnownFailure: compile-all ; upcxx_tests_cxx2a ; issue 368: Header compile failure with GCC 10.1 and -std=c++2a on non-trivial collectives #KnownFailure: compile-warning ; cc_gnu ; issue 376: warnings from GCC 10.1 in reduce.hpp for boolean reductions TestName: team-create-par TestName: completion-par TestName: local_team-par TestName: memory_kinds-par AppEnv: has_issue_588 ; FI_MR_CUDA_CACHE_MONITOR_ENABLED=0 TestName: vis-par AppEnv: UPCXX_WARN_EMPTY_RMA=0 #KnownFailure: run-crash ; os_darwin && cc_gnu ; issue 127 (Mac+gcc+VIS breaks on lpc operation with seq and par) TestName: vis_stress-par AppEnv: UPCXX_WARN_EMPTY_RMA=0 TestName: alloc-par AppArgs: 10 FileLimit: 1000 + 5000 * $THREADS$ TestName: copy-par FailExpr: WARNING: UPC.. GPU support #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: copy-cover-par MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-purge-option=-g" AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ KnownFailure: run-crash ; network_ofi && ofi_cxi_provider && pshm_xpmem ; Bug 4750 - ofi/cxi fails dynamic registration of "other segment" with xpmem TestName: memberof-par ProhibitFeature: debug && (cpu_mips64 || cpu_mips64el) # too big -> "relocation truncated to fit: R_MIPS_GOT16" # squash warnings from intentional non-compliant use of offsetof() in upcxx_memberof_unsafe: MakeFlags: cc_subfamily_nvidia && (cc_gnu || cc_clang); UPCXX_TEST_FLAGS="-Xcompiler -Wno-invalid-offsetof" MakeFlags: !cc_subfamily_nvidia && (cc_gnu || cc_clang) ; UPCXX_TEST_FLAGS="-Wno-invalid-offsetof" MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="--diag_suppress1427 -purge-option=-g" MakeFlags: cc_pgi && !(upcxx_issue_390 && debug) ; UPCXX_TEST_FLAGS="--diag_suppress1427" # Cygwin assembler runs out of space without optimization: MakeFlags: os_cygwin && debug ; UPCXX_TEST_FLAGS="-codemode=debug -O1 -Wno-invalid-offsetof" TestName: serialize_large_obj-par TestName: segment_allocator-par TestName: view-par KnownFailure: compile-failure ; cc_intel && os_darwin && nodebug ; issue 559 (Compile error on test/view from Intel compiler on macOS with optional.hpp) # The following is specific to GCC-15 (and probably later), but we cannot (yet?) express compiler versions KnownFailure: run-crash ; cc_gnu && cpu_aarch64 && network_udp && !debug ; Apparent GCC or libstdc++ bug TestName: lpc_barrier-par DynamicThreads: 1 #MakeFlags: static_link ; UPCXX_TEST_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive" # bug3813 #KnownFailure: run-crash ; os_darwin && cc_gnu ; issue 49 (uts_{threads,hybrid,omp_ranks}/lpc_barrier crash on (High)Sierra w/ g++) #KnownFailure: run-crash ; os_cnl ; Bug 3813 - Crashes using C++11 threads on Cray systems TestName: lpc-stress-par DynamicThreads: 1 TestName: uts_ranks-par TestName: uts_hybrid-par #KnownFailure: run-crash ; os_darwin && cc_gnu ; issue 49 (uts_{threads,hybrid,omp_ranks}/lpc_barrier crash on (High)Sierra w/ g++) TestName: global_ptr-par # squash erroneous warnings on PGI 19.10(only, issue #284) from upcxx_memberof on non-trivial type (non-trivial default constructor) MakeFlags: cc_pgi ; UPCXX_TEST_FLAGS="--diag_suppress1427" TestName: rpc-ctor-trace-par CompileTimeLimit: $DEFAULT$ * 2 MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-purge-option=-g" AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 TestName: verbose-ctor-trace-par FileLimit: 15000 * $THREADS$ TestName: rpc_source_cx-par TestName: lpc-ctor-trace-par TestName: serialize_cvref-par TestName: bad-alloc-par TestName: bad-segment-alloc-par RequireFeature: upcxx_cuda || upcxx_hip TestName: cuda-context-par RequireFeature: upcxx_cuda MakeFlags: network_ucx ; UPCXX_TEST_FLAGS="-DSKIP_DEVICE_FREE" # bug 4396 MakeFlags: network_ofi && ofi_verbs_provider ; UPCXX_TEST_FLAGS="-DSKIP_DEVICE_FREE" # bug 4504 AppEnv: has_issue_588 ; FI_MR_CUDA_CACHE_MONITOR_ENABLED=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 # Compiler fails to realize delete of last_alloc tracks that of last_dev: WarningFilter: cc_gnu && !debug; '.*?device_allocator.hpp[0-9:]* warning: .last_alloc. may be used uninitialized.*?' TestName: ze_device-par RequireFeature: upcxx_ze TestName: shared-seg-query-par TestName: nodiscard-par MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-purge-option=-g" #KnownFailure: compile-failure ; cc_pgi && debug ; issue 390 (PGI debug symbol ICE prior to 19.4) TimeLimit: 0 TestName: as_eager-par TestName: sys-header-exclude-par TimeLimit: 0 TestName: optional-par TestName: persona_scope-par # ------------------------------------------ # Benchmarks: TestName: put_flood-par TimeLimit: 2*$DEFAULT$ BenchmarkResult: size=8, kind="lat", how="upcxx".*?bw=([^,]+)(,) AppEnv: network_ucx; fixed_iters=5000 # work-around unbounded-buffering behavior (issue 322) #KnownFailure: run-all ; (cc_clang || cc_gnu) && nodebug ; issue 184 (bench/put_flood crashes on clang-7/opt/Linux) TestName: nebr_exchange-par BenchmarkResult: bw=([^,]+),.*?via="rput"(,) KnownFailure: run-crash ; os_cygwin && cc_clang ; issue 188 (bench/nebr_exchange crash on Cygwin/clang) TestName: gpu_microbenchmark-par DynamicThreads: 2 # want to avoid 2+ppn which increases PCI traffic and actually runs much slower TimeLimit: 2*$DEFAULT$ AppArgs: -t 10 -w 10 -gg -sg -gs -pg # deliberately omit host memory xfers to avoid output line limit AppEnv: UPCXX_SHARED_HEAP_SIZE=1GB AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no BenchmarkResult: message size = 4194304 byte.*?\n\s*Local GPU -> Remote GPU:[^,]+, ([^ ]+) (GB/s) RequireFeature: gasnet_has_par && (upcxx_cuda || upcxx_hip) FileLimit: 128*1024 #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-purge-option=-g" CompileTimeLimit: $DEFAULT$ * 2 TestName: misc_perf-par AppArgs: 1000 BenchmarkResult: upcxx::progress\s*:[^s]*s\s*([^ ]+)\s*(us) MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-purge-option=-g" TestName: rpc_perf-par AppArgs: 100 10 1048576 BenchmarkResult: 0:\s+1\s+[^s]*s\s+([^ ]+)\s*(us) TestName: rpc_imm-par AppArgs: 10000 1000 8192 1 ProhibitFeature: network_ucx # ucx has only trivial support for imm and unbounded buffering that leads to problems with this pattern BenchmarkResult: 0:\s+1\s+[^s]*s\s+([^ ]+)\s*(us) TimeLimit: $DEFAULT$ * 2 TestName: imm_dynamic-par AppArgs: -z 500 10000 64 BenchmarkResult: RPC_FF:[^+]+\+([^%]+)(% improvement) # ------------------------------------------ # Regression suite: TestName: issue88-par TestName: issue108-par TestName: issue128-par TestName: issue138-par AppEnv: UPCXX_SHARED_HEAP_SIZE=128MB TimeLimit: $DEFAULT$ * 2 MakeFlags: os_cygwin ; UPCXX_TEST_FLAGS="-DMINIMAL -g0 -Wa,-mbig-obj" # issue 278 MakeFlags: (cc_pgi && !(upcxx_issue_390 && debug)) || (!cc_pgi && precious_compiler_license) ; UPCXX_TEST_FLAGS="-DMINIMAL" # issue 278 MakeFlags: cc_nvhpc && cpu_powerpc64le; UPCXX_TEST_FLAGS="-DMINIMAL" # variant on issue 278 MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-DMINIMAL -purge-option=-g" MakeFlags: cpu_riscv64 ; UPCXX_TEST_FLAGS="-DMINIMAL" # no bug(s). just too slow otherwise #KnownFailure: compile-all ; cc_pgi && debug ; PGI+debug entries ICE on issue138 instantiations ProhibitFeature: cpu_mips64 || cpu_mips64el # even MINIMAL exceeds ABI limits (linker failure) TestName: issue140-par TimeLimit: $DEFAULT$ / 4 #KnownFailure: run-time ; all ; issue 140 (upcxx::discharge() does not discharge remote_cx::as_rpc()) TestName: issue141-par TestName: issue142-par TestName: issue168-par TimeLimit: $DEFAULT$ / 4 # expected to deadlock and time out #KnownFailure: run-all ; ; issue 168 (upcxx::progress_required always return 0 for rpc chain with cx as lpc) TestName: issue170-par TestName: issue185-par TimeLimit: 0 TestName: issue210-par TestName: issue219-par TimeLimit: 0 TestName: issue223-par PassExpr: done. TestName: issue224-par TimeLimit: 0 TestName: issue234-par #KnownFailure: compile-all ; ; issue 234 (Generalized operation completion for barrier_async and broadcast) #KnownFailure: compile-all ; upcxx_tests_cxx2a ; issue 368: Header compile failure with GCC 10.1 and -std=c++2a on non-trivial collectives TestName: issue242-par TimeLimit: 0 # crashes on most targets. superseded by spec-issue176 TestName: issue262-par TestName: issue266-par TestName: issue267-par #KnownFailure: compile-all ; upcxx_tests_cxx2a ; issue 368: Header compile failure with GCC 10.1 and -std=c++2a on non-trivial collectives TestName: issue277-par TestName: issue280-par TestName: issue288-par TestName: issue312-par #KnownFailure: compile-all ; ; issue 312 (dist_id::here() does not compile) TestName: issue323-par TestName: issue333-par TimeLimit: 0 TestName: issue336-par #KnownFailure: run-all ; ; issue 336: Serialization for statically massive types ProhibitFeature: os_cygwin # leaves run-away procs consuming 100% CPU TestName: issue343-par TestName: issue355-par #KnownFailure: compile-all ; ; issue 355: upcxx::view broken with asymmetric deserialization TestName: issue356-par #KnownFailure: compile-all ; ; issue 356: SERIALIZED_{FIELDS,VALUES} incorrectly require public constructors TestName: issue367-par TestName: issue367b-par TestName: issue371-par TestName: issue380-par TestName: issue391-par TestName: issue394-par TestName: issue400-par TestName: issue402-par TestName: issue405-par #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: issue407-par TestName: issue408-par TestName: issue412b-par TimeLimit: 0 TestName: issue413-par TestName: issue419-par TestName: issue421-par #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: issue421b-par #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: issue421c-par TestName: issue427-par TestName: issue427b-par TestName: issue428-par TimeLimit: 0 TestName: issue432-par RequireFeature: upcxx_cuda || upcxx_hip MakeFlags: cc_pgi && upcxx_issue_390 && debug ; UPCXX_TEST_FLAGS="-purge-option=-g" AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: issue440-par TestName: issue447-par TestName: issue450-par TimeLimit: 0 TestName: issue462-par TestName: issue473-par TestName: issue477-par TestName: issue478-par TestName: issue482-par TestName: issue483-par TestName: issue512-par TestName: issue547-par MakeFlags: !cc_subfamily_nvidia && (cc_clang || cc_gnu) ; UPCXX_TEST_FLAGS="-Wno-self-move" MakeFlags: cc_subfamily_nvidia && (cc_clang || cc_gnu) ; UPCXX_TEST_FLAGS="-Xcompiler -Wno-self-move" TestName: issue552-par TestName: issue609-par TestName: issue613b-par TimeLimit: 0 TestName: spec-issue104-par TestName: spec-issue144b-par TestName: spec-issue144c-par TestName: spec-issue158-par TestName: spec-issue160-par TestName: spec-issue170-par TestName: spec-issue176-par TestName: spec-issue189-par AppEnv: has_issue_588 ; FI_MR_CUDA_CACHE_MONITOR_ENABLED=0 TestName: spec-issue198-par TestName: spec-issue199-par TestName: spec-issue204-par # Spurious warning seen with `-Wall` and GCC 13: KnownFailure: compile-warning ; cc_gnu && !debug; issue 613: Warnings from persona.hpp # ------------------------------------------ # Guide examples: TestName: hello-world-par PassExpr: ^Hello world from TestName: rb1d-par PassExpr: ^Converged at 5590 TestName: rb1d-rpc-par PassExpr: ^Converged at 5590 TestName: rb1d-rpcinit-par PassExpr: ^Converged at 5590 TestName: dmap-test-par TestName: dmap-async-insert-test-par TimeLimit: $DEFAULT$ * 1.5 TestName: dmap-async-find-test-par TimeLimit: $DEFAULT$ * 1.5 TestName: dmap-quiescence-test-par TestName: dmap-atomics-test-par TestName: dmap-conjoined-test-par TestName: dmap-promises-test-par TestName: team_simple-par TestName: team_advanced-par TestName: team_create_sub-par TestName: local-team-par TestName: non-contig-example-par TestName: view-accumulate-par TestName: view-histogram1-par TestName: view-histogram2-par TestName: view-matrix-tasks-par # persona-example spins 11 threads/proc, leading to overcommit, # so turn down the proc count and iteration count TestName: persona-example-par DynamicThreads: 2 AppArgs: 1000 AppEnv: UPCXX_OVERSUBSCRIBED=1 #KnownFailure: run-time ; upcxx_lpc_inbox_locked ; issue 245 (persona-example deadlocks with UPCXX_LPC_INBOX=locked) TestName: persona-example-rputs-par TestName: h-d-par RequireFeature: gasnet_has_par,upcxx_cuda AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: h-d-remote-par AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 RequireFeature: gasnet_has_par,upcxx_cuda #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: serial-fields-par TestName: serial-values-par TestName: serial-recursive-par TestName: serial-custom-par TestName: rput-rpc-par # default "fast floating point mode" in recent oneAPI compilers leads to nuisance warnings (two versions): WarningFilter: cc_clang ; '.*?warning: comparison with NaN always evaluates to false in fast floating point modes.*?' WarningFilter: cc_clang ; '.*?warning: explicit comparison with NaN in fast floating point mode.*?' TestName: reduce-complex-minloc-par TestName: broadcast-example-par # ------------------------------------------ # serialization examples TestName: upcxx_serialized_fields-par TestName: upcxx_serialized_values-par TestName: upcxx_serialized_fields_recursive-par TestName: upcxx_serialized_values_recursive-par TestName: upcxx_serialization-par TestName: upcxx_serialization_nested-par TestName: serialize_abstract_base-par TestName: unrolled_list-par # ------------------------------------------ # General examples TestName: compute-pi-par AppArgs: 10000 PassExpr: ^pi estimate: 3.1 TestName: compute-pi-multi-examples-par AppArgs: 10000 TestName: rpc-then-rget-par TestName: team-self-par # ------------------------------------------ # Tutorial examples/exercises: TestName: hello-world-rpc-to-0-par PassExpr: Hello from TestName: jac1d-par TestName: dmap-insert-test-par TestName: dmap-erase-update-test-par TestName: drmap-insert-test-par TestName: pi-no-overlap-par PassExpr: PI estimated to 3 TestName: pi-conjoined-par PassExpr: PI estimated to 3 TestName: pi-no-barrier-par PassExpr: PI estimated to 3 TestName: ex1-par PassExpr: # no convenient way to validate output.txt TestName: ex2-par TestName: ex3-par TestName: ex4-par MakeFlags: UPCXX_TEST_FLAGS="-DFIND_CHECKS" KnownFailure: run-crash ; network_ibv && has_bug_4039 ; Bug 4039 - intermittent ibv crashes in upcxx/ex4 # ------------------------------------------ # upcxx-extras TestName: allocator-example-par # The following is specific to GCC-15 (and probably later), but we cannot (yet?) express compiler versions KnownFailure: run-crash ; cc_gnu && debug ; upcc-extras analogue to Issue 643 (vector::reserve v. resize) TestName: vector_accumulate_example-par TestName: rpc_ff_quiescence-par TestName: padded_device_allocator-example-par RequireFeature: upcxx_cuda || upcxx_hip TestName: laplace2d-par AppArgs: 100 4096 TestName: cannon-par AppArgs: 2048 AppEnv: UPCXX_SHARED_HEAP_SIZE=256MB DynamicThreads: 1, 4, 16 # Cannon alg requires a perfect square rank count BenchmarkResult: Compute:\s*(\S+)\s*(s) ProhibitFeature: missing_cblas || (os_darwin && cc_gnu) # Homebrew gcc cannot parse Apple #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: cannon_cuda-par AppArgs: (_threads == 1) ; 512 # reduce matrix size for single-rank, avoid BAR1 limit on Tesla AppArgs: (_threads > 1) ; 2048 AppEnv: UPCXX_SHARED_HEAP_SIZE=256MB DynamicThreads: 1, 4, 16 # Cannon alg requires a perfect square rank count RequireFeature: upcxx_cuda_compute_30 BenchmarkResult: Compute:\s*(\S+)\s*(s) ProhibitFeature: missing_cblas || missing_cublas || (os_darwin && cc_gnu) # Homebrew gcc cannot parse Apple #KnownFailure: run-match ; (_threads > 4) ; issue 381 (cannon_cuda fails to validate with 16 ranks) #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ # ------------------------------------------ # upcxx-extras dist_array TestName: DA-alltoall-par TestName: DA-basic-par TestName: DA-cache-par TestName: DA-fileinput-par TestName: DA-jacobi-par TestName: DA-scatter-par TestName: DA-threads-par # ------------------------------------------ # misc examples TestName: cuda_vecadd-par RequireFeature: upcxx_cuda_compute_30 MakeFlags: nodebug ; CXXFLAGS=-O3 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 TestName: hip_vecadd-par RequireFeature: upcxx_hip MakeFlags: nodebug ; CXXFLAGS=-O3 AppEnv: hip_platform_nvidia && has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 TestName: sycl_vecadd-par RequireFeature: upcxx_ze,sycl MakeFlags: nodebug ; CXXFLAGS=-O3 # backend compiler's warning-supression flags in LDFLAGS can lead to warnings from SYCL linker WarningFilter: '.*?warning: unknown warning option.*?' # ------------------------------------------ # OpenMP interop tests # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: SUCCESS FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: AppEnv: report_file=- TimeLimit: $DEFAULT$ RequireFeature: gasnet_has_par,upcxx ProhibitFeature: missing_openmp,hack_for_nonupc_test # mark this suite as non-UPC RunCmd: ./launcher -np %N env OMP_NUM_THREADS=4 %P %A MakeFlags: debug ; UPCXX_CODEMODE=debug MakeFlags: nodebug ; UPCXX_CODEMODE=opt MakeFlags: UPCXX_TEST_FLAGS="-fopenmp" # default is -fopenmp MakeFlags: cc_pgi ; UPCXX_TEST_FLAGS="-mp" MakeFlags: cc_subfamily_nvidia ; UPCXX_TEST_FLAGS="-Xcompiler -fopenmp" MakeFlags: cc_clang && cc_subfamily_intel ; UPCXX_TEST_FLAGS="-qopenmp" SaveOutput: 1 # OpenMP library yields this warning on Cray systems: WarningFilter: all ; '.*?warning: Using .dlopen. in statically linked applications.*?' END_DEFAULT_CONFIG TestName: uts_omp-par DynamicThreads: 1 RunCmd: %P %A AppEnv: OMP_NUM_THREADS=10 #KnownFailure: run-crash ; os_darwin && cc_gnu ; issue 92 (aka issue 49) TestName: uts_omp_ranks-par #KnownFailure: run-crash ; os_darwin && cc_gnu ; issue 49 (uts_{threads,hybrid,omp_ranks}/lpc_barrier crash on (High)Sierra w/ g++) #KnownFailure: run-all ; os_linux && cc_clang ; issue 93 (uts_omp_ranks crash w/ clang on Linux/x86-64) TestName: rput-omp-par TestName: rpc-omp-par # ------------------------------------------ # upcxx-extras : guppie # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: passed FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: AppEnv: TimeLimit: $DEFAULT$ RequireFeature: gasnet,upcxx ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC RunCmd: ./launcher -np %N %P %A # Note "reset" of LDFLAGS avoids problems with those in harness environment MakeFlags: debug ; UPCXX_CODEMODE=debug LDFLAGS= MakeFlags: nodebug ; UPCXX_CODEMODE=opt LDFLAGS= SaveOutput: 1 BenchmarkResult: rate\s*=\s*(\S+)\s*(Mup/s) AppArgs: -l20 -m1 -h0 END_DEFAULT_CONFIG TestName: guppie-rma-seq AppArgs: -l20 -m1 -h0.10 TestName: guppie-amo-seq TestName: guppie-amo-pipe-seq TestName: guppie-rpc-seq TestName: guppie-rpc_ff-seq TestName: guppie-rma-par RequireFeature: gasnet_has_par,upcxx AppArgs: -l20 -m1 -h0.10 TestName: guppie-amo-par RequireFeature: gasnet_has_par,upcxx TestName: guppie-amo-pipe-par RequireFeature: gasnet_has_par,upcxx TestName: guppie-rpc-par RequireFeature: gasnet_has_par,upcxx TestName: guppie-rpc_ff-par RequireFeature: gasnet_has_par,upcxx # ------------------------------------------ # upcxx-extras : jac3d # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: SUCCESS FailExpr: FAIL ExitCode: 0 BuildCmd: make,notrans AppEnv: TimeLimit: $DEFAULT$ ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC RunCmd: ./launcher -np %N %P %A MakeFlags: debug ; UPCXX_CODEMODE=debug OPT=-g MakeFlags: nodebug ; UPCXX_CODEMODE=opt OPT=-O3 SaveOutput: 1 BenchmarkResult: GFLOPS\s*:\s*([^\n]+)\n(?:.|\n)*?(Gflops) AppArgs: -N 256 -i 1000 END_DEFAULT_CONFIG TestName: jac3d-seq RequireFeature: upcxx_cuda_compute_30 #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ TestName: jac3d-par RequireFeature: gasnet_has_par,upcxx_cuda_compute_30 #KnownFailure: run-all ; cc_pgi ; issue 421: upcxx::copy unsupported on PGI C++ # ------------------------------------------ # upcxx-extras : kokkos MonteCarlo # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: pi est = 3.14 FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppEnv: TimeLimit: $DEFAULT$ ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC RunCmd: ./launcher -np %N env OMP_NUM_THREADS=4 OMP_PROC_BIND=spread OMP_PLACES=threads %P %A MakeFlags: debug ; UPCXX_CODEMODE=debug MakeFlags: nodebug ; UPCXX_CODEMODE=opt WarningFilter: all ; '.*?Kokkos_Error\.[co].*?' WarningFilter: cc_clang ; '.*?warning: argument unused during compilation: .--offload-arch.*?' WarningFilter: cc_gnu ; '.*?offsetof applied to non-POD types.*?' RequireFeature: kokkos SaveOutput: 1 END_DEFAULT_CONFIG TestName: kokkos_montecarlo-seq MakeFlags: KOKKOS_DEVICES=Threads AppArgs: 23 --kokkos-num-threads=4 #KnownFailure: compile-failure ; upcxx_cuda ; Bug 4668 - Errors building non-GPU Kokkos tests on GPU systems w/ Kokkos 4.2 TestName: kokkos_montecarlo-par MakeFlags: KOKKOS_DEVICES=Threads AppArgs: 23 --kokkos-num-threads=4 #KnownFailure: compile-failure ; upcxx_cuda ; Bug 4668 - Errors building non-GPU Kokkos tests on GPU systems w/ Kokkos 4.2 TestName: kokkos_montecarlo_openmp-seq MakeFlags: KOKKOS_DEVICES=OpenMP AppArgs: 23 ProhibitFeature: missing_openmp #KnownFailure: compile-failure ; upcxx_cuda ; Bug 4668 - Errors building non-GPU Kokkos tests on GPU systems w/ Kokkos 4.2 TestName: kokkos_montecarlo_openmp-par MakeFlags: KOKKOS_DEVICES=OpenMP AppArgs: 23 ProhibitFeature: missing_openmp #KnownFailure: compile-failure ; upcxx_cuda ; Bug 4668 - Errors building non-GPU Kokkos tests on GPU systems w/ Kokkos 4.2 TestName: kokkos_montecarlo_cuda-seq AppArgs: 33 --kokkos-disable-warnings MakeFlags: KOKKOS_DEVICES=Cuda RequireFeature: kokkos,upcxx_cuda_compute_30 ProhibitFeature: cc_clang # Makefile.kokkos is broken for nvcc_wrapper around clang WarningFilter: nvlink warning : Skipping incompatible.*? TestName: kokkos_montecarlo_cuda-par AppArgs: 33 --kokkos-disable-warnings MakeFlags: KOKKOS_DEVICES=Cuda RequireFeature: kokkos,upcxx_cuda_compute_30 ProhibitFeature: cc_clang # Makefile.kokkos is broken for nvcc_wrapper around clang WarningFilter: nvlink warning : Skipping incompatible.*? TestName: kokkos_montecarlo_hip-seq AppArgs: 33 --kokkos-disable-warnings MakeFlags: KOKKOS_DEVICES=Hip RequireFeature: kokkos,upcxx_hip ProhibitFeature: hip_platform_nvidia # Kokkos doesn't know how to handle this case TestName: kokkos_montecarlo_hip-par AppArgs: 33 --kokkos-disable-warnings MakeFlags: KOKKOS_DEVICES=Hip RequireFeature: kokkos,upcxx_hip ProhibitFeature: hip_platform_nvidia # Kokkos doesn't know how to handle this case # ------------------------------------------ # upcxx-extras : kokkos 3d Halo # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: SUCCESS FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppEnv: TimeLimit: $DEFAULT$ ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC RunCmd: ./launcher -np %N env OMP_NUM_THREADS=4 OMP_PROC_BIND=spread OMP_PLACES=threads %P %A MakeFlags: debug ; UPCXX_CODEMODE=debug MakeFlags: nodebug ; UPCXX_CODEMODE=opt WarningFilter: all ; '.*?Kokkos_Error\.[co].*?' WarningFilter: cc_clang ; '.*?warning: argument unused during compilation: .--offload-arch.*?' WarningFilter: cc_gnu ; '.*?offsetof applied to non-POD types.*?' RequireFeature: kokkos SaveOutput: 1 BenchmarkResult: 100 .* Time \(([^\s]+).*(seconds) END_DEFAULT_CONFIG TestName: kokkos_3dhalo-seq MakeFlags: KOKKOS_DEVICES=Threads AppArgs: --kokkos-num-threads=4 #KnownFailure: compile-failure ; upcxx_cuda ; Bug 4668 - Errors building non-GPU Kokkos tests on GPU systems w/ Kokkos 4.2 TestName: kokkos_3dhalo-par MakeFlags: KOKKOS_DEVICES=Threads AppArgs: --kokkos-num-threads=4 #KnownFailure: compile-failure ; upcxx_cuda ; Bug 4668 - Errors building non-GPU Kokkos tests on GPU systems w/ Kokkos 4.2 TestName: kokkos_3dhalo_openmp-seq MakeFlags: KOKKOS_DEVICES=OpenMP AppArgs: ProhibitFeature: missing_openmp #KnownFailure: compile-failure ; upcxx_cuda ; Bug 4668 - Errors building non-GPU Kokkos tests on GPU systems w/ Kokkos 4.2 TestName: kokkos_3dhalo_openmp-par MakeFlags: KOKKOS_DEVICES=OpenMP AppArgs: ProhibitFeature: missing_openmp #KnownFailure: compile-failure ; upcxx_cuda ; Bug 4668 - Errors building non-GPU Kokkos tests on GPU systems w/ Kokkos 4.2 TestName: kokkos_3dhalo_cuda-seq AppArgs: --kokkos-disable-warnings MakeFlags: KOKKOS_DEVICES=Cuda RequireFeature: kokkos,upcxx_cuda_compute_30 ProhibitFeature: cc_clang # Makefile.kokkos is broken for nvcc_wrapper around clang WarningFilter: nvlink warning : Skipping incompatible.*? # incorrect analysis of lock scope (explained clearly in code comment) by nvcc: WarningFilter: '.*?device_allocator.hpp\([0-9]*\): warning \0433002-D: constructor used to create discarded object.*?' TestName: kokkos_3dhalo_cuda-par AppArgs: --kokkos-disable-warnings MakeFlags: KOKKOS_DEVICES=Cuda RequireFeature: kokkos,upcxx_cuda_compute_30 ProhibitFeature: cc_clang # Makefile.kokkos is broken for nvcc_wrapper around clang WarningFilter: nvlink warning : Skipping incompatible.*? # incorrect analysis of lock scope (explained clearly in code comment) by nvcc: WarningFilter: '.*?device_allocator.hpp\([0-9]*\): warning \0433002-D: constructor used to create discarded object.*?' TestName: kokkos_3dhalo_hip-seq AppArgs: --kokkos-disable-warnings MakeFlags: KOKKOS_DEVICES=Hip RequireFeature: kokkos,upcxx_hip ProhibitFeature: hip_platform_nvidia # Kokkos doesn't know how to handle this case TestName: kokkos_3dhalo_hip-par AppArgs: --kokkos-disable-warnings MakeFlags: KOKKOS_DEVICES=Hip RequireFeature: kokkos,upcxx_hip ProhibitFeature: hip_platform_nvidia # Kokkos doesn't know how to handle this case # ------------------------------------------ # upcxx-extras : extend-add # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: SUCCESS FailExpr: FAIL ExitCode: 0 BuildCmd: make,notrans AppEnv: TimeLimit: $DEFAULT$ * 3 ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC RunCmd: ./launcher -np %N %P %A # Note "reset" of LDFLAGS avoids problems with those in harness environment MakeFlags: debug ; UPCXX_CODEMODE=debug OPT=-g LDFLAGS= MakeFlags: nodebug ; UPCXX_CODEMODE=opt OPT="-O3 -DNDEBUG" LDFLAGS= MakeFlags: cc_pgi ; UPCXX_EXTENDADD_EXTRA="-w -Mnoopenmp" SaveOutput: 1 BenchmarkResult: multifrontal_factorization maximum value:\s*([^\s]+)\s*(s) AppEnv: UPCXX_SHARED_HEAP_SIZE=1GB AppArgs: !UPCXX_EXTENDADD_INPUTPATH!/audikw_1/audikw_1_$THREADS$.dmp END_DEFAULT_CONFIG TestName: extend-add_upcxx-seq RequireFeature: upcxx,upcxx_extendadd TestName: extend-add_upcxx-par RequireFeature: gasnet_has_par,upcxx,upcxx_extendadd # NOTE: # The following two are MPI applications, which "RequireFeature: mpi_extendadd". # This feature should be asserted only if one sees value to compiling and # running the MPI codes, all build prerequisites are met, and ./launcher-mpi is # known to "just work". # # TODO: # One could ensure ./launcher-mpi will "just work" on more systems if these # tests included the logic for the `mpi_compat*` family of features, used for # the MPI compatibility tests in the gasnet-tests suite. TestName: extend-add_mpi_p2p-seq RunCmd: ./launcher-mpi -np %N %P %A RequireFeature: mpi_extendadd TestName: extend-add_mpi_collective-seq RunCmd: ./launcher-mpi -np %N %P %A RequireFeature: mpi_extendadd # ------------------------------------------ # symPACK # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: Norm of residual after factorization FailExpr: FAIL ExitCode: 0 BuildCmd: make,notrans AppEnv: TimeLimit: $DEFAULT$ * 3 ProhibitFeature: hack_for_nonupc_test | missing_fortran # symPACK requires an ABI-compatible Fortran compiler (in UPCXX_FC) RunCmd: !network_udp ; ./launcher-mpi -np %N %P %A RunCmd: network_udp ; ./launcher -np %N %P %A # Note "reset" of LDFLAGS avoids problems with those in harness environment MakeFlags: debug ; UPCXX_CODEMODE=debug SYMPACK_BUILD=-DCMAKE_BUILD_TYPE=Debug LDFLAGS= MakeFlags: nodebug ; UPCXX_CODEMODE=opt SYMPACK_BUILD=-DCMAKE_BUILD_TYPE=Release LDFLAGS= # MakeFlags setting of `UPCXX_TEST_FLAGS` must deal w/ mutiple issues: # 1. symPACK is not gcc Wall/Wextra-clean # 2. symPACK has shown issues with C++17 and up. So, to deal with testers # passing `-std=c++2a` in `UPCXX_EXTRA_TEST_FLAGS`, we revert to the # default language level explicitly (and unconditionally) MakeFlags: cc_gnu ; UPCXX_TEST_FLAGS="-std=c++11 -Wno-all -Wno-extra" MakeFlags: cc_intel ; UPCXX_TEST_FLAGS="-std=c++14" MakeFlags: !(cc_intel || cc_gnu) ; UPCXX_TEST_FLAGS="-std=c++11" SaveOutput: 1 BenchmarkResult: Factorization time:\s*([^\s]+)\s*(seconds)? AppEnv: UPCXX_SHARED_HEAP_SIZE=2GB GASNET_MAX_SEGSIZE=2064MB AppEnv: network_udp ; GASNET_SPAWNFN=C GASNET_CSPAWN_CMD="./launcher-mpi -np %N %C" AppEnv: os_darwin ; UPCXX_CCS_MAX_SEGMENTS=512 AppArgs: -in sympack-input.rb -ordering MMD -nrhs 1 -fallback terminate -gpu_v WarningFilter: all ; '.*?warning: libgfortran.*?may conflict with libgfortran.*?' WarningFilter: all ; 'CMake Warning.*?\n.*?could not find a (BLAS|LAPACK).*?' # Seen on NERSC Cori w/ CMake 3.22.1 and GCC 11.2.0: WarningFilter: cc_gnu ; '.*?cc1: warning: command-line option .*? is valid for Fortran but not for C' # Seen on macOS w/ CMake 3.27.4 and GCC 13.1.0 WarningFilter: cc_gnu && os_darwin ; '.*?f951: Warning: command-line option .*? is valid for C.*? but not for Fortran' # Seen with AMD and Cray compilers (both llvm-based) WarningFilter: cc_clang ; '.*?warning: loop not unrolled.*?' END_DEFAULT_CONFIG TestName: _sympack RequireFeature: upcxx,upcxx_sympack TimeLimit: 0 TestName: sympack-seq RequireFeature: upcxx,upcxx_sympack CompileTimeLimit: $DEFAULT$ * 2 TestName: sympack-par RequireFeature: gasnet_has_par,upcxx,upcxx_sympack CompileTimeLimit: $DEFAULT$ * 2 TestName: sympack2D-seq RequireFeature: upcxx,upcxx_sympack CompileTimeLimit: $DEFAULT$ * 2 TestName: sympack2D-par RequireFeature: gasnet_has_par,upcxx,upcxx_sympack CompileTimeLimit: $DEFAULT$ * 2 TestName: sympack2D_cuda-seq RequireFeature: upcxx,upcxx_sympack,upcxx_cuda_compute_30 CompileTimeLimit: $DEFAULT$ * 2 #AppEnv: SLURM_GPUS_PER_TASK=1 TestName: sympack2D_cuda-par RequireFeature: gasnet_has_par,upcxx,upcxx_sympack,upcxx_cuda_compute_30 CompileTimeLimit: $DEFAULT$ * 2 #AppEnv: SLURM_GPUS_PER_TASK=1 # ------------------------------------------ # UPC interoperability # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: SUCCESS FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: AppEnv: GASNET_MAX_SEGSIZE=64MB UPC_SHARED_HEAP_SIZE=64MB UPCXX_SHARED_HEAP_SIZE=32MB UPCXX_WARN_UPC=0 TimeLimit: $DEFAULT$ RequireFeature: gasnet,upcxx,runtime_upcr ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC RunCmd: ./launcher -np %N %P %A MakeFlags: debug ; UPCXX_CODEMODE=debug MakeFlags: nodebug ; UPCXX_CODEMODE=opt SaveOutput: 1 END_DEFAULT_CONFIG TestName: upc-main_upc-seq TestName: upc-main_upcxx-seq TestName: upc-alloc-seq AppArgs: 10 32 FileLimit: 1200 + 2000 * $THREADS$ TestName: upc-arrval_upc-seq TestName: upc-arrval_upcxx-seq # PAR UPC interop requires upcr/configure --enable-uses-threads and harness -add_feature=uses_threads_support TestName: upc-main_upc-par RequireFeature: gasnet_has_par,upcxx,uses_threads_support TestName: upc-main_upcxx-par RequireFeature: gasnet_has_par,upcxx,uses_threads_support TestName: upc-alloc-par RequireFeature: gasnet_has_par,upcxx,uses_threads_support AppArgs: 10 32 FileLimit: 1200 + 2000 * $THREADS$ TestName: upc-arrval_upc-par RequireFeature: gasnet_has_par,upcxx,uses_threads_support TestName: upc-arrval_upcxx-par RequireFeature: gasnet_has_par,upcxx,uses_threads_support # upcc -pthreads tests, require PAR UPC++ but not -uses-threads # Note that AppEnv appends, overriding the GASNET_MAX_SEGSIZE given above TestName: upc-pth_main_upc-par RequireFeature: pthread_support,upcxx,runtime_upcr AppEnv: GASNET_MAX_SEGSIZE=128MB TestName: upc-pth_arrval_upc-par RequireFeature: pthread_support,upcxx,runtime_upcr AppEnv: GASNET_MAX_SEGSIZE=128MB # ------------------------------------------ # CCS SEQ Tests # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: SUCCESS FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: TimeLimit: $DEFAULT$ RequireFeature: gasnet && upcxx && network_udp && (os_linux || os_darwin) ProhibitFeature: upcxx_force_legacy_relocations,hack_for_nonupc_test RunCmd: bash -c "./launcher -network udp -np %N $( %P.runcmd %A )" MakeFlags: debug ; UPCXX_CODEMODE=debug MakeFlags: nodebug ; UPCXX_CODEMODE=opt MakeFlags: have_fpic; UPCXX_LIB_FPIC=1 SaveOutput: 1 END_DEFAULT_CONFIG TestName: ccs-inlib-seq RequireFeature: have_fpic && gasnet_has_par && upcxx && network_udp && (os_linux || os_darwin) FileLimit: 150000 TestName: ccs-asymmetric1-seq TestName: ccs-asymmetric2-seq TestName: ccs-dynamic-dynupcxx-seq RequireFeature: have_fpic && gasnet && upcxx && network_udp && (os_linux || os_darwin) FileLimit: 150000 TestName: ccs-dynamic-seq RequireFeature: have_fpic && gasnet && upcxx && network_udp && (os_linux || os_darwin) FileLimit: 150000 TestName: ccs-python-seq RequireFeature: have_fpic && have_python_headers && gasnet && upcxx && network_udp && (os_linux || os_darwin) FileLimit: 2000000 # ------------------------------------------ # CCS PAR Tests # ------------------------------------------ BEGIN_DEFAULT_CONFIG Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: $DEFAULT$ Pthreads: 0 CompileResult: pass PassExpr: SUCCESS FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: TimeLimit: $DEFAULT$ RequireFeature: gasnet_has_par && upcxx && network_udp && (os_linux || os_darwin) ProhibitFeature: upcxx_force_legacy_relocations,hack_for_nonupc_test RunCmd: bash -c "./launcher -network udp -np %N $( %P.runcmd %A )" MakeFlags: debug ; UPCXX_CODEMODE=debug MakeFlags: nodebug ; UPCXX_CODEMODE=opt MakeFlags: have_fpic; UPCXX_LIB_FPIC=1 SaveOutput: 1 END_DEFAULT_CONFIG TestName: ccs-inlib-par RequireFeature: have_fpic && gasnet_has_par && upcxx && network_udp && (os_linux || os_darwin) FileLimit: 150000 TestName: ccs-asymmetric1-par TestName: ccs-asymmetric2-par TestName: ccs-dynamic-dynupcxx-par RequireFeature: have_fpic && gasnet_has_par && upcxx && network_udp && (os_linux || os_darwin) FileLimit: 150000 TestName: ccs-dynamic-par RequireFeature: have_fpic && gasnet_has_par && upcxx && network_udp && (os_linux || os_darwin) FileLimit: 150000 TestName: ccs-python-par RequireFeature: have_fpic && have_python_headers && gasnet_has_par && upcxx && network_udp && (os_linux || os_darwin) FileLimit: 2000000 gasnet-2025.8.0/tests/harness/README0000664000175000017500000000140215142313673017104 0ustar alastairalastairThis directory contains the meta-data files required for running GASNet unit tests, among others, within the automated "pagoda test harness". For information on the test harness, contact gasnet-staff@lbl.gov None of the files in this directory or its children are intended for stand-alone testing. gasnet-tests: harness driver for the GASNet unit tests, and some misc checking targets libgasnet: harness drivers for testing builds of the GASNet library under a wide range of conditions, such as with pedantic compiler options or differing configure options. amudp/ammpi: harness drivers for the AMUDP/AMMPI unit tests. These assume the corresponding GASNet conduit has been configured in. external-*: harness drivers for "smoke testing" with various GASNet clients gasnet-2025.8.0/tests/harness/external-legion/0000775000175000017500000000000015142313673021324 5ustar alastairalastairgasnet-2025.8.0/tests/harness/external-legion/Makefile0000664000175000017500000002020415142313673022762 0ustar alastairalastairLEGION_GIT_REPO ?= StanfordLegion/legion LEGION_GIT_COMMIT ?= stable LEGION_BLDDIR ?= $(HARNESS_WORKDIR)/legion LEGION_TMPDIR ?= $(HARNESS_WORKDIR)/legion-tmp LEGION_GASNET ?= # Path to an existing installation, if any LEGION_CONDUIT ?= $(NETWORK) # Default to same conduit as the enclosing harness run LEGION_MAKE_ARGS ?= -j4 # legacy harness support GASNET_BLDDIR ?= $(TOP_BUILDDIR)/gasnet HARNESS_LOGDIR ?= . LOGFILE = $(HARNESS_LOGDIR)/legion.log TO_LOG = >> $(LOGFILE) 2>&1 # Paths and options for standard tools WGET ?= wget -nv GZCAT ?= gzip -cd TAR ?= tar UNZIP ?= unzip P7ZIP ?= 7za GIT ?= git # Strip whitespace to simplify later use LEGION_GASNET := $(strip $(LEGION_GASNET)) LEGION_CONDUIT := $(strip $(LEGION_CONDUIT)) # Logic to extract GASNet's compiler variables. # We use a sub-shell to avoid pulling in the entire makefile fragment. # TODO: may want to handle LDFLAGS here as well? GASNET_VARS = $(shell $(MAKE) --no-print-directory echovars FRAGMENT=$(LEGION_CONDUIT)) FRAGMENT=#empty by default ifneq ($(FRAGMENT),) include $(LEGION_GASNET_INST)/include/$(FRAGMENT)-conduit/$(FRAGMENT)-par.mak echovars: force; @echo "CC='$(GASNET_CC)' CXX='$(GASNET_CXX)'" .PHONY: echovars endif RUNTIME_TARGETS = librealm.a liblegion.a SEED_DIR = $(LEGION_BLDDIR)/examples/circuit # NOTE: must not be an OMP or CUDA test ifeq ($(LEGION_GASNET1),1) LEGION_NET_ENV = USE_GASNET=1 GASNET="$(LEGION_GASNET_INST)" else LEGION_NET_ENV = REALM_NETWORKS=gasnetex GASNET_ROOT="$(LEGION_GASNET_INST)" endif COMMON_ENV = \ LG_RT_DIR="$(LEGION_BLDDIR)/runtime" \ $(LEGION_NET_ENV) CONDUIT=$(LEGION_CONDUIT) \ $(GASNET_VARS) DO_MAKE = env $(COMMON_ENV) $(LEGION_TEST_ENV) $(MAKE) $(LEGION_MAKE_ARGS) # Parametrized support for download/unpack LEGION_DOWNLOAD ?=# one of "unzip", "p7zip" or "tgz", default auto-detects using LEGION_URL suffix LEGION_DOWNLOAD := $(strip $(LEGION_DOWNLOAD)) legion_dl_suffix_unzip := .zip legion_dl_suffix_p7zip := .zip legion_dl_suffix_tgz := .tar.gz legion_dl_suffix=$(legion_dl_suffix_$(LEGION_DOWNLOAD)) ifeq ($(strip $(legion_dl_suffix)),) legion_dl_suffix := .zip endif LEGION_URL ?= https://github.com/$(LEGION_GIT_REPO)/archive/$(LEGION_GIT_COMMIT)$(legion_dl_suffix) LEGION_ARCHIVE ?= $(notdir $(LEGION_URL)) legion-download: force rm -Rf $(LEGION_BLDDIR) $(LEGION_TMPDIR) && mkdir $(LEGION_TMPDIR) if ( expr $(LEGION_URL) : file:/ || expr /$(LEGION_URL) : // ) >/dev/null; then \ set -x ; cd $(LEGION_TMPDIR) && ln -s $(LEGION_URL:file:%=%) . ; \ else \ set -x ; cd $(LEGION_TMPDIR) && $(WGET) $(LEGION_URL) 2>&1 || ( cat wget-log 2> /dev/null ; exit 3 ) || exit $$? ; \ fi cd $(LEGION_TMPDIR) && cat wget-log 2> /dev/null ; rm -f wget-log ; exit 0 @LEGION_TESTDIR=`pwd` && \ cd $(LEGION_TMPDIR) && LEGION_ARCHIVE=`/bin/ls` && LEGION_DOWNLOAD="$(LEGION_DOWNLOAD)" && \ if test -z "$$LEGION_DOWNLOAD" ; then \ case "$$LEGION_ARCHIVE" in \ *.zip) LEGION_DOWNLOAD=unzip ;; \ *.p7z|*.7z) LEGION_DOWNLOAD=p7zip ;; \ *.tar.gz|*.tgz) LEGION_DOWNLOAD=tgz ;; \ *) echo "ERROR: Unknown archive suffix on '$$LEGION_ARCHIVE': Set LEGION_DOWNLOAD=(unzip,p7zip,tgz)" ; exit 1; \ esac \ fi && \ echo Fetched $$LEGION_ARCHIVE : LEGION_DOWNLOAD=$$LEGION_DOWNLOAD && \ $(MAKE) -f $$LEGION_TESTDIR/Makefile legion-unpack-$$LEGION_DOWNLOAD LEGION_ARCHIVE="$$LEGION_ARCHIVE" && \ rm -f $(LEGION_TMPDIR)/$$LEGION_ARCHIVE mv $(LEGION_TMPDIR)/* $(LEGION_BLDDIR) # archive's root dir will vary rmdir $(LEGION_TMPDIR) # Three ways to unpack the archive: # Option 1: "unzip" - .zip w/ unzip # This is the favored approach because it gives us the hash and uses a widely available utility. legion-unpack-unzip: force; $(UNZIP) -z $(LEGION_ARCHIVE) && $(UNZIP) -q $(LEGION_ARCHIVE) # Option 2: "p7zip" - .zip w/ 7za (from p7zip package) # This also gives us the hash, but uses a less widely available utility. # However, it is sometimes necessary because many unzip installations contain a bug w.r.t. symlinks legion-unpack-p7zip: force; $(P7ZIP) x -bd $(LEGION_ARCHIVE) # Option 3: "tgz" - tar + gzip # This is the most portable, but cannot extract the hash unless git is available legion-unpack-tgz: force -$(GZCAT) $(LEGION_ARCHIVE) | $(GIT) get-tar-commit-id; exit 0 $(GZCAT) $(LEGION_ARCHIVE) | $(TAR) xf - #### .PHONY: legion-download legion-unpack-unzip legion-unpack-p7zip legion-unpack-tgz # Apply upsteam or local patches, if any legion_patches ?= legion-patch: force cd $(LEGION_BLDDIR) && \ for p in $(legion_patches); do $(WGET) $$p && patch -p1 < `basename $$p`; done .PHONY: legion-patch # Either install GASNet (empty LEGION_GASNET) or use in-place ifeq ($(LEGION_GASNET),) export LEGION_GASNET_INST = $(LEGION_BLDDIR)/gasnet legion-gasnet: force if test -d "$(LEGION_GASNET_INST)"; then \ rm -Rf "$(LEGION_GASNET_INST)"; \ elif test -e "$(LEGION_GASNET_INST)"; then \ rm -f "$(LEGION_GASNET_INST)"; \ fi @echo ======== Installing GASNet at $(LEGION_GASNET_INST) ======== $(MAKE) install -C $(GASNET_BLDDIR) prefix="$(LEGION_GASNET_INST)" else export LEGION_GASNET_INST = $(LEGION_GASNET) legion-gasnet: force @if test -f "$(LEGION_GASNET_INST)/include/gasnet.h"; then \ echo ======== Using GASNet pre-installed at $(LEGION_GASNET_INST) ========; \ else \ echo ERROR: No GASNet install at $(LEGION_GASNET_INST) \ exit 1; \ fi endif .PHONY: legion-gasnet # Symlink or simple script that corresponds to # RunCmd = ./launcher -np %N %P %A launcher: case $(LEGION_CONDUIT) in \ smp) echo '#!/bin/sh' > $@ ; \ echo 'N=$$2;shift 2;eval env GASNET_PSHM_NODES=$$N "$$@"' >> $@ ; \ chmod +x $@;; \ udp) ln -s "$(LEGION_GASNET_INST)"/bin/amudprun $@;; \ *) ln -s "$(LEGION_GASNET_INST)"/bin/gasnetrun_$(LEGION_CONDUIT) $@;; \ esac # Pre-build the runtime libs to separate the output from that of first test build rtlibs: force ( echo ======== Prebuild Legion RT libs in $(SEED_DIR) ========; \ $(DO_MAKE) -C $(SEED_DIR) $(RUNTIME_TARGETS) \ ) $(TO_LOG) .PHONY: rtlibs _legion_clean: force ( echo ======== Cleaning Legion RT libs via $(SEED_DIR) ========; \ $(DO_MAKE) -C $(SEED_DIR) clean \ ) $(TO_LOG) @echo '#!/bin/sh' > $@ ; chmod +x $@ .PHONY: _legion_clean _legion: force rm -Rf legion-built launcher $(LOGFILE) $(call safe_tee_dance, $(MAKE) legion-download) $(call safe_tee_dance, $(MAKE) legion-patch) $(PERL) -pi -e s,mpi_interop,realm_saxpy,g -- $(LEGION_BLDDIR)/test.py # replace bogus test $(call safe_tee_dance, $(MAKE) legion-gasnet) @echo '#!/bin/sh' > $@ ; chmod +x $@ $(MAKE) launcher rtlibs @touch legion-built # Runs of test.py: TESTS_PY = legion_cxx regent fuzzer realm external private perf $(TESTS_PY): legion-built cd $(LEGION_BLDDIR) && \ env $(COMMON_ENV) LAUNCHER="echo Would run: " $(LEGION_TEST_ENV) \ ./test.py --use gasnet --test $@ 2>&1 @echo '#!/bin/sh' > $@ ; chmod +x $@ # Build a single test one_test: legion-built ( echo ======== Rebuild Legion RT libs in $(TEST_DIR) ========; \ $(DO_MAKE) -C $(LEGION_BLDDIR)/$(TEST_DIR) $(RUNTIME_TARGETS) \ ) $(TO_LOG) $(DO_MAKE) -C $(LEGION_BLDDIR)/$(TEST_DIR) mv $(LEGION_BLDDIR)/$(TEST_DIR)/$(TEST_EXE) . ( cd $(LEGION_BLDDIR)/$(TEST_DIR) && \ rm -f $(TEST_EXE).o $(RUNTIME_TARGETS) || exit 0 \ ) $(TO_LOG) # examples/: EXAMPLES = circuit dynamic_registration ghost ghost_pull realm_saxpy spmd_cgsolver virtual_map $(EXAMPLES): force; $(MAKE) one_test TEST_DIR=examples/$@ TEST_EXE=$@ # tutorial/: TUTORIALS = hello_world tasks_and_futures index_tasks global_vars logical_regions \ physical_regions privileges partitioning multiple_partitions custom_mapper $(TUTORIALS): force; $(MAKE) one_test TEST_DIR=tutorial/??_$@ TEST_EXE=$@ # test/: TESTS = attach_file_mini $(TESTS): force; $(MAKE) one_test TEST_DIR=test/$@ TEST_EXE=$@ force: .PHONY: force one_test $(TESTS_PY) # Run a command, with output to both stdout and $(LOGFILE), preserving exit code of the command # Based on https://unix.stackexchange.com/questions/14270/get-exit-status-of-process-thats-piped-to-another/70675#70675 safe_tee_dance = (((($1; echo $$? >&3) 2>&1 | tee -a $(LOGFILE) >&4) 3>&1) | (read rc; exit $$rc)) 4>&1 gasnet-2025.8.0/tests/harness/external-legion/harness.conf0000664000175000017500000000654415142313673023647 0ustar alastairalastair# This suite is independent of UPC compiler: KnownFailureAnySpec BEGIN_DEFAULT_CONFIG MakeFlags: debug; DEBUG=1 MakeFlags: !debug; DEBUG=0 Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: 1 Pthreads: 0 CompileResult: pass PassExpr: SUCCESS! FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: AppEnv: network_udp; GASNET_QUIET=1 TimeLimit: $DEFAULT$ RequireFeature: gasnet_has_par,legion # segment_everything: heap management # hack_for_nonupc_test: mark this suite as non-UPC ProhibitFeature: segment_everything,hack_for_nonupc_test RunCmd: ./launcher -np %N %P %A WarningFilter: os_cnl ; .*?warning: Using .dlopen. in statically linked applications.*? WarningFilter: cc_intel ; .*?warning .*?: option .-Wno-strict-overflow. not supported.*? WarningFilter: cc_intel ; .*?warning .*?: ignoring unknown option .-Wno-strict-overflow.*? WarningFilter: os_darwin ; ld: warning: direct access in function .*? likely caused by different translation units being compiled with different visibility settings. END_DEFAULT_CONFIG # ------------------------------------------ # Tests to compile, but not run TestName: _legion CompileTimeLimit: 4 * $DEFAULT$ # So this test can match the "runnable" filter: RunCmd: true PassExpr: 0 # ------------------------------------------ # Examples directory: TestName: circuit # default "fast floating point mode" in recent oneAPI compilers leads to nuisance warnings (two versions): WarningFilter: cc_clang ; '.*?warning: comparison with NaN always evaluates to false in fast floating point modes.*?' WarningFilter: cc_clang ; '.*?warning: explicit comparison with NaN in fast floating point mode.*?' TestName: ghost AppArgs: -ll:cpu 4 PassExpr: Test completed. TestName: ghost_pull AppArgs: -ll:cpu 4 PassExpr: Test completed. TestName: realm_saxpy WarningFilter: cc_clang ; .*?warning: .*?Wenum-compare-switch.*? # Output is version dependent PassExpr: (SUCCESS!|success -) TestName: spmd_cgsolver AppArgs: -ll:cpu 4 PassExpr: spmd tasks complete TestName: virtual_map PassExpr: 0 # ------------------------------------------ # Tutorials directory: TestName: hello_world PassExpr: Hello World! SaveOutput: 1 # Helps debug spawner TestName: tasks_and_futures PassExpr: Fibonacci\(6\) = 8 TestName: index_tasks PassExpr: All checks passed! TestName: global_vars PassExpr: 0 # No output verification TestName: logical_regions PassExpr: Successfully cleaned up all of our resources TestName: physical_regions TestName: privileges TestName: partitioning TestName: multiple_partitions TestName: custom_mapper # ------------------------------------------ # Test directory: TestName: attach_file_mini PassExpr: 0 # No output verification KnownFailure: run-all; os_darwin ; https://github.com/StanfordLegion/legion/issues/213 # ------------------------------------------ # Clean up - MUST BE LAST TestName: _legion_clean RequireFeature: gasnet_has_par,legion,legion_clean # So this test can match the "runnable" filter: RunCmd: true PassExpr: 0 # ------------------------------------------ # DO NOT ADD ANY TESTS BELOW THIS LINE gasnet-2025.8.0/tests/harness/ammpi/0000775000175000017500000000000015142313673017332 5ustar alastairalastairgasnet-2025.8.0/tests/harness/ammpi/Makefile0000664000175000017500000000335515142313673021000 0ustar alastairalastairall: @echo This Makefile is not intended to be called directly. @echo It is used for running unit tests within the automated testing harness provided with the Berkeley UPC runtime. @echo For information on downloading and using Berkeley UPC, see: https://upc.lbl.gov @exit 1 # legacy harness support GASNET_BLDDIR ?= $(TOP_BUILDDIR)/gasnet PERL ?= perl AMX_FLAVOR=mpi CONDUIT_DIR=$(GASNET_BLDDIR)/$(AMX_FLAVOR)-conduit CONDUIT_FRAG=$(CONDUIT_DIR)/$(AMX_FLAVOR)-seq.mak AMX_DIR=$(GASNET_BLDDIR)/other/am$(AMX_FLAVOR) SPAWNER_DIR=$(CONDUIT_DIR)/contrib SPAWNER=gasnetrun_mpi gasnetrun_mpi.pl Makefile: $(CONDUIT_FRAG) $(CONDUIT_FRAG): @if test -d $(CONDUIT_DIR) ; then \ $(MAKE) -C $(CONDUIT_DIR) $(@F) || exit 1 \ else \ echo ERROR: $(AMX_FLAVOR)-conduit build directory not found ; \ fi -include $(CONDUIT_DIR)/$(AMX_FLAVOR)-seq.mak amxdist: force PASSTHRU_PHONY=check check-exports tests amxdist $(PASSTHRU_PHONY): force $(MAKE) -C $(AMX_DIR) $@ @echo '#!/bin/sh' > $@ ; chmod +x $@ distcheck: $(SPAWNER) force rm -Rf am$(AMX_FLAVOR)[0-9].[0-9]* $(MAKE) -C $(AMX_DIR) amxdist @set -x ; \ TESTDIR=`pwd` ; \ cd $(AMX_DIR) && \ VERSION=`/bin/ls -t am$(AMX_FLAVOR)*.tar.gz | $(PERL) -ne 'if (m@am$(AMX_FLAVOR)(.+)\.tar.gz@) { print "$$1"; exit; }'` ; \ DIR="am$(AMX_FLAVOR)$$VERSION" ; \ gunzip -c $$DIR.tar.gz | tar xvf - && \ cd $$DIR && \ $(MAKE) all tests CC="$(GASNET_LD)" && \ cp ./testam$(EXESUFFIX) $$TESTDIR/$@$(EXESUFFIX) test%: $(SPAWNER) force $(MAKE) -C $(AMX_DIR) $@ @cp $(AMX_DIR)/$@$(EXESUFFIX) $@$(EXESUFFIX) $(SPAWNER): $(MAKE) -C $(SPAWNER_DIR) $@ cp $(SPAWNER_DIR)/$@ $@ force: .PHONY: force gasnet-2025.8.0/tests/harness/ammpi/harness.conf0000664000175000017500000000546115142313673021652 0ustar alastairalastair# This suite is independent of UPC compiler: KnownFailureAnySpec BEGIN_DEFAULT_CONFIG MakeFlags: Flags: Files: $TESTNAME$.c DynamicThreads: $DEFAULT$ StaticThreads: 0 CompileResult: pass PassExpr: 0 FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans TimeLimit: 0 RequireFeature: gasnet_has_mpi ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC ProcPerNode: 1 Pthreads: 0 END_DEFAULT_CONFIG # ------------------------------------------ # Tests to compile, but not run TestName: check-exports RequireFeature: gasnet_has_mpi,cc_gnu # Other compilers have too many odd symbol manglings TestName: amxdist RequireFeature: gasnet_has_mpi,amx_standalone # This tests stand-alone functionality and is off by default PassExpr: ready for distribution TestName: tests ProhibitFeature: network_mpi # handled below TestName: distcheck RequireFeature: gasnet_has_mpi,amx_standalone # This tests stand-alone functionality and is off by default AppArgs: 100 P TimeLimit: $DEFAULT$ RunCmd: ./gasnetrun_mpi -np %N %P %A WarningFilter: WARNING: Using Makefile.generic.*? WarningFilter: .*?-Wunused.*? WarningFilter: .*?AMMPI_Error.*? WarningFilter: .*?warning: statement not reached.*? # Warning due to conflict with cloned portable_platform.h in vendor-provided Open MPI WarningFilter: os_solaris && cc_sun ; .*?mpi_portable_platform.*?warning: macro redefined: PLATFORM_.*? PassExpr: Worker 0 done. BEGIN_DEFAULT_CONFIG MakeFlags: Flags: Files: $TESTNAME$.c DynamicThreads: 1,$DEFAULT$ # test loopback and parallel StaticThreads: 0 CompileResult: pass RunCmd: ./gasnetrun_mpi -np %N %P %A PassExpr: 0 FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: TimeLimit: $DEFAULT$ RequireFeature: network_mpi ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC ProcPerNode: 1 Pthreads: 0 END_DEFAULT_CONFIG # ------------------------------------------ # General run tests TestName: testping AppArgs: 100 P PassExpr: microseconds total BenchmarkResult: (\S+)\s*(us / request) TestName: testlatency AppArgs: 100 P PassExpr: microseconds total BenchmarkResult: (\S+)\s*(us / request) TestName: testlatencyM AppArgs: 100 P 64 PassExpr: microseconds total BenchmarkResult: (\S+)\s*(us / request) TestName: testbulk AppArgs: 100 1048576 P H PassExpr: microseconds total BenchmarkResult: Worker.*?throughput:\s*(\S+)\s*(KB/sec) TestName: testam AppArgs: 100 P PassExpr: Worker 0 done. TestName: testbounce AppArgs: 100 P PassExpr: microseconds total BenchmarkResult: Worker 0.*?throughput:\s*(\S+)\s*(KB/sec) TestName: testreduce PassExpr: Result verified! TestName: testgetput AppArgs: 100 PassExpr: Proc 0 verified. TestName: testreadwrite AppArgs: 100 PassExpr: Proc 0 verified. gasnet-2025.8.0/tests/harness/external-chapel/0000775000175000017500000000000015142313673021303 5ustar alastairalastairgasnet-2025.8.0/tests/harness/external-chapel/Makefile0000664000175000017500000002252215142313673022746 0ustar alastairalastairCHAPEL_GIT_REPO ?= chapel-lang/chapel CHAPEL_GIT_COMMIT ?= main# was 'master' prior to June 21, 2021 CHAPEL_MAKE_ARGS ?= -j4 CHAPEL_BLDDIR ?= $(HARNESS_WORKDIR)/chapel CHAPEL_TMPDIR ?= $(HARNESS_WORKDIR)/chapel-tmp CHAPEL_HOME ?= $(HARNESS_WORKDIR)/chapel-inst CHAPEL_CONDUIT ?= $(NETWORK) # Default to same conduit as the enclosing harness run CHAPEL_PATH_PRE ?=# empty - if set must end with : CHAPEL_PATH_POST ?=# empty - if set must start with : CHAPEL_SHELL ?= $(shell test -n "$${ZSH_VERSION+set}$${BASH_VERSION+set}" && echo bash || echo sh) # legacy harness support GASNET_SRCDIR ?= $(TOP_SRCDIR)/gasnet # Since some time in late April 2021, unset is no longer acceptable in general CHPL_LLVM ?= none HARNESS_LOGDIR ?= . LOGFILE ?= $(HARNESS_LOGDIR)/chapel.log # Paths and options for standard tools PERL ?= perl WGET ?= wget -nv GZCAT ?= gzip -cd TAR ?= tar UNZIP ?= unzip P7ZIP ?= 7za GIT ?= git # Must not inherit these from harness environment: unexport LD LDFLAGS LIBS unexport CC CFLAGS unexport CXX CXXFLAGS unexport AR RANLIB # Parametrized support for download/unpack CHAPEL_DOWNLOAD ?=# one of "unzip", "p7zip" or "tgz", default to auto-detect from downloaded archive suffix chapel_dl_suffix_unzip := .zip chapel_dl_suffix_p7zip := .zip chapel_dl_suffix_tgz := .tar.gz chapel_dl_suffix=$(chapel_dl_suffix_$(strip $(CHAPEL_DOWNLOAD))) ifeq ($(strip $(chapel_dl_suffix)),) chapel_dl_suffix := .zip endif CHAPEL_URL ?= https://github.com/$(CHAPEL_GIT_REPO)/archive/$(CHAPEL_GIT_COMMIT)$(chapel_dl_suffix) CHAPEL_ARCHIVE ?= $(notdir $(CHAPEL_URL)) chapel-download: force rm -Rf $(CHAPEL_BLDDIR) $(CHAPEL_TMPDIR) && mkdir $(CHAPEL_TMPDIR) if ( expr $(CHAPEL_URL) : file:/ || expr /$(CHAPEL_URL) : // ) >/dev/null; then \ set -x ; cd $(CHAPEL_TMPDIR) && ln -s $(CHAPEL_URL:file:%=%) . ; \ else \ set -x ; cd $(CHAPEL_TMPDIR) && $(WGET) $(CHAPEL_URL) 2>&1 || ( cat wget-log 2> /dev/null ; exit 3 ) || exit $$? ; \ fi cd $(CHAPEL_TMPDIR) && cat wget-log 2> /dev/null ; rm -f wget-log ; exit 0 @CHAPEL_TESTDIR=`pwd` && \ cd $(CHAPEL_TMPDIR) && CHAPEL_ARCHIVE=`/bin/ls` && CHAPEL_DOWNLOAD="$(strip $(CHAPEL_DOWNLOAD))" && \ if test -z "$$CHAPEL_DOWNLOAD" ; then \ case "$$CHAPEL_ARCHIVE" in \ *.zip) CHAPEL_DOWNLOAD=unzip ;; \ *.p7z|*.7z) CHAPEL_DOWNLOAD=p7zip ;; \ *.tar.gz|*.tgz) CHAPEL_DOWNLOAD=tgz ;; \ *) echo "ERROR: Unknown archive suffix on '$$CHAPEL_ARCHIVE': Set CHAPEL_DOWNLOAD=(unzip,p7zip,tgz)" ; exit 1; \ esac \ fi && \ echo Fetched $$CHAPEL_ARCHIVE : CHAPEL_DOWNLOAD=$$CHAPEL_DOWNLOAD && \ $(MAKE) -f $$CHAPEL_TESTDIR/Makefile chapel-unpack-$$CHAPEL_DOWNLOAD CHAPEL_ARCHIVE="$$CHAPEL_ARCHIVE" && \ rm -f $(CHAPEL_TMPDIR)/$$CHAPEL_ARCHIVE mv $(CHAPEL_TMPDIR)/* $(CHAPEL_BLDDIR) # archive's root dir will vary rmdir $(CHAPEL_TMPDIR) # Three ways to unpack the archive: # Option 1: "unzip" - .zip w/ unzip # This is the favored approach because it gives us the hash and uses a widely available utility. chapel-unpack-unzip: force; $(UNZIP) -z $(CHAPEL_ARCHIVE) && $(UNZIP) -q $(CHAPEL_ARCHIVE) # Option 2: "p7zip" - .zip w/ 7za (from p7zip package) # This also gives us the hash, but uses a less widely available utility. # However, it is sometimes necessary because many unzip installations contain a bug w.r.t. symlinks chapel-unpack-p7zip: force; $(P7ZIP) x -bd $(CHAPEL_ARCHIVE) # Option 3: "tgz" - tar + gzip # This is the most portable, but cannot extract the hash unless git is available chapel-unpack-tgz: force -$(GZCAT) $(CHAPEL_ARCHIVE) | $(GIT) get-tar-commit-id; exit 0 $(GZCAT) $(CHAPEL_ARCHIVE) | $(TAR) xf - #### .PHONY: chapel-download chapel-unpack-unzip chapel-unpack-p7zip chapel-unpack-tgz ifneq ($(strip $(CHPL_COMM_DEBUG)),) CHPL_GASNET_MORE_CFG_OPTIONS += --enable-debug CHAPEL_MAKE_RUNTIME_ARGS += DEBUG=1 WARNINGS=1 ASSERTS=1 endif CHAPEL_MAKE_ARGS += CHPL_GASNET_MORE_CFG_OPTIONS="$(CHPL_GASNET_MORE_CFG_OPTIONS)" # Define CHPL_LAUNCHER for some conduits without our desired defaults. # Note that these have not necessarily all been tested. chapel_launcher_opt = $(chapel_launcher_$(strip $(CHAPEL_CONDUIT))) # Kludge some launchers that can be constructed as a simple delta from another: chapel-launcher: force @true # currently no special cases to deal with here clone-launcher: force src=gasnetrun_$(SRC_CONDUIT); dst=gasnetrun_$(DST_CONDUIT); \ cd $(CHAPEL_BLDDIR)/runtime/src/launch && \ if test -d $$dst; then \ echo ERROR: target $$dst of $@ exists >&2; exit 1; \ fi && \ cp -Rp $$src $$dst && \ mv $$dst/launch-$$src.c $$dst/launch-$$dst.c && \ $(PERL) -pi -e 's/_$(SRC_CONDUIT)/_$(DST_CONDUIT)/g' -- $$dst/* .PHONY: chapel-launcher clone-launcher COMMON_ENV = PATH=$(CHAPEL_PATH_PRE)$$PATH$(CHAPEL_PATH_POST) \ CHPL_LLVM=$(CHPL_LLVM) CONFIG_ENV = $(COMMON_ENV) $(chapel_launcher_opt) \ CHPL_COMM=gasnet CHPL_COMM_SUBSTRATE=$(CHAPEL_CONDUIT) ifneq ($(strip $(CHPL_COMM_DEBUG)),) COMMON_ENV += CHPL_COMM_DEBUG=$(CHPL_COMM_DEBUG) endif # Apply upsteam or local patches, if any chapel_patches ?= chapel-patch: force cd $(CHAPEL_BLDDIR) && \ for p in $(chapel_patches); do $(WGET) $$p && patch -p1 < `basename $$p`; done .PHONY: chapel-patch # Build and (optionally) install Chapel compiler and runtime _chapel: force rm -f chapel-built $(call safe_tee_dance, $(MAKE) chapel-download) $(call safe_tee_dance, $(MAKE) chapel-patch) $(MAKE) chapel-launcher cd $(CHAPEL_BLDDIR)/third-party/gasnet && mv gasnet-src gasnet-src.dist cp -Rp $(GASNET_SRCDIR) $(CHAPEL_BLDDIR)/third-party/gasnet/gasnet-src mkdir -p "$(CHAPEL_HOME)" cd $(CHAPEL_BLDDIR) && . util/setchplenv.$(CHAPEL_SHELL) && ( \ env $(CONFIG_ENV) $(CHAPEL_BUILD_ENV) ./configure --chpl-home="$(CHAPEL_HOME)" && \ env $(COMMON_ENV) $(CHAPEL_BUILD_ENV) $(MAKE) $(CHAPEL_MAKE_ARGS) compiler && \ env $(COMMON_ENV) $(CHAPEL_BUILD_ENV) $(MAKE) $(CHAPEL_MAKE_ARGS) $(CHAPEL_MAKE_RUNTIME_ARGS) runtime && \ env $(COMMON_ENV) $(CHAPEL_BUILD_ENV) $(MAKE) $(CHAPEL_MAKE_ARGS) all \ ) >> $(LOGFILE) 2>&1 if test "$(CHAPEL_HOME)" != "$(CHAPEL_BLDDIR)"; then \ cd $(CHAPEL_BLDDIR) && . util/setchplenv.$(CHAPEL_SHELL) && \ env $(COMMON_ENV) $(CHAPEL_BUILD_ENV) $(MAKE) $(CHAPEL_MAKE_ARGS) install && \ env $(COMMON_ENV) $(CHAPEL_BUILD_ENV) $(MAKE) $(CHAPEL_MAKE_ARGS) clean; \ fi >> $(LOGFILE) 2>&1 @echo '#!/bin/sh' > $@ ; chmod +x $@ @touch chapel-built _chapel_clean: force cd $(CHAPEL_BLDDIR) && . util/setchplenv.$(CHAPEL_SHELL) && \ env $(COMMON_ENV) $(CHAPEL_BUILD_ENV) \ $(MAKE) $(CHAPEL_MAKE_ARGS) clean >> $(LOGFILE) 2>&1 @echo '#!/bin/sh' > $@ ; chmod +x $@ # Not reliable other than on UDP, and wants to *run* the test check: chapel-built cd $(CHAPEL_BLDDIR) && . util/setchplenv.$(CHAPEL_SHELL) && \ env $(COMMON_ENV) $(CHAPEL_CHECK_ENV) \ $(MAKE) check @echo '#!/bin/sh' > $@ ; chmod +x $@ # # Build one test # test_common: chapel-built rm -f $(TEST_EXE) $(TEST_EXE)_real cd $(CHAPEL_HOME) && . util/setchplenv.$(CHAPEL_SHELL) && cd $(CURDIR) && \ env $(COMMON_ENV) $(CHAPEL_TEST_ENV) \ $(MAKE) -C $(CHAPEL_BLDDIR)/$(TEST_DIR) $(REAL_EXE) CHPL_FLAGS+="$(chpl_flags_$(TEST_EXE))" 2>&1 mv $(CHAPEL_BLDDIR)/$(TEST_DIR)/$(REAL_EXE) $(TEST_EXE) if test -e $(CHAPEL_BLDDIR)/$(TEST_DIR)/$(REAL_EXE)_real; then \ mv $(CHAPEL_BLDDIR)/$(TEST_DIR)/$(REAL_EXE)_real $(TEST_EXE)_real; \ fi one_test: force # Using the tests natural name $(MAKE) test_common REAL_EXE=$(TEST_EXE) alt_test: force # Using an alternate test name $(MAKE) test_common .PHONY: test_common one_test alt_test # top-level examples EXAMPLES = hello hello2-module hello3-datapar hello4-datapar-dist hello5-taskpar hello6-taskpar-dist $(EXAMPLES): force; $(MAKE) one_test TEST_EXE=$@ TEST_DIR=examples # directory examples/benchmarks BENCHMARKS = lcals lulesh miniMD $(BENCHMARKS): force; $(MAKE) one_test TEST_EXE=$@ TEST_DIR=examples/benchmarks/$@ # directory examples/benchmarks/hpcc HPCC = stream stream-ep ra ra-atomics $(HPCC): force; $(MAKE) one_test TEST_EXE=$@ TEST_DIR=examples/benchmarks/hpcc chpl_flags_ra = -O -s useOn=true chpl_flags_ra-atomics = -O unexport $(addprefix chpl_flags_,$(HPCC)) # directory examples/benchmarks/isx ISX = isx-strong isx-weak isx-weakISO $(ISX): force; $(MAKE) alt_test TEST_EXE=$@ REAL_EXE=isx TEST_DIR=examples/benchmarks/isx # directory examples/primers PRIMERS = \ arrays arrayVectorOps associative atomics chpldoc.doc classes \ distributions domains fileIO genericClasses iterators locales \ modules opaque parIters procedures randomNumbers ranges reductions \ slices sparse syncsingle taskParallel timers varargs variables \ voidVariables $(PRIMERS): force; $(MAKE) one_test TEST_EXE=$@ TEST_DIR=examples/primers/$@ # directory examples/programs PROGRAMS = beer genericStack jacobi linkedList norm prodCons quicksort tree $(PROGRAMS): force; $(MAKE) one_test TEST_EXE=$@ TEST_DIR=examples/programs/$@ force: .PHONY: force # Run a command, with output to both stdout and $(LOGFILE), preserving exit code of the command # Based on https://unix.stackexchange.com/questions/14270/get-exit-status-of-process-thats-piped-to-another/70675#70675 safe_tee_dance = (((($1; echo $$? >&3) 2>&1 | tee -a $(LOGFILE) >&4) 3>&1) | (read rc; exit $$rc)) 4>&1 gasnet-2025.8.0/tests/harness/external-chapel/harness.conf0000664000175000017500000000646215142313673023625 0ustar alastairalastair# This suite is independent of UPC compiler: KnownFailureAnySpec BEGIN_DEFAULT_CONFIG # debug harness runs - ensure Chapel runtime will also use a debug build: MakeFlags: debug; CHPL_COMM_DEBUG=1 # compiler families known to Chapel *only* where default is not sufficient MakeFlags: cc_intel && !prgenv_intel; CHPL_HOST_COMPILER=intel MakeFlags: cc_pgi && !prgenv_pgi; CHPL_HOST_COMPILER=pgi MakeFlags: cc_nvhpc && !(prgenv_nvhpc || prgenv_nvidia) ; CHPL_HOST_COMPILER=pgi CHPL_HOST_CC=nvc CHPL_HOST_CXX=nvc++ MakeFlags: cc_gnu && os_darwin; CHPL_HOST_COMPILER=gnu MakeFlags: cc_pathscale ; CHPL_HOST_COMPILER=pathscale MakeFlags: cc_clang && !(prgenv_cray||prgenv_amd||prgenv_aocc||prgenv_intel); CHPL_HOST_COMPILER=clang MakeFlags: cc_clang && !(prgenv_cray||prgenv_amd||prgenv_aocc||prgenv_intel) && cc_subfamily_intel; CHPL_HOST_CC=icx CHPL_HOST_CXX=icpx MakeFlags: cc_xlc ; CHPL_HOST_COMPILER=ibm # Flags: Files: DynamicThreads: $DEFAULT$ StaticThreads: 0 ProcPerNode: 1 Pthreads: 0 CompileResult: pass PassExpr: 0 FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: AppEnv: RunCmd: env -u HOSTNAME -u "BASH_FUNC_module()" %P -nl %N %A TimeLimit: $DEFAULT$ RequireFeature: gasnet,chapel ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC # Sigh - builds are far too noisy to apply precise filters WarningFilter: .*?(chpl__auto_destroy_Error|error|warning|WARNING).*? END_DEFAULT_CONFIG # TODO: BenchmarkResults are all misreported as MFLOPS due to harness limitations # ------------------------------------------ # Tests to compile, but not run TestName: _chapel CompileTimeLimit: 10 * $DEFAULT$ # So this test can match the "runnable" filter: RunCmd: true PassExpr: 0 # ------------------------------------------ # General tests from examples/ TestName: hello4-datapar-dist DynamicThreads: 2 PassExpr: from iteration 100 of 100 TestName: hello6-taskpar-dist DynamicThreads: 2 PassExpr: from locale 1 of 2 SaveOutput: 1 # to diagnose spawner misbehaviors # ------------------------------------------ # HPCC benchmarks TestName: ra AppArgs: --n=10 DynamicThreads: 3 PassExpr: Validation: SUCCESS BenchmarkResult:Performance \(GUPS\) = ([0-9.eE+-]+) TestName: ra-atomics AppArgs: --n=16 --N_U=4096 DynamicThreads: 3 PassExpr: Validation: SUCCESS BenchmarkResult:Performance \(GUPS\) = ([0-9.eE+-]+) # ------------------------------------------ # ISX benchmark TestName: isx-strong AppArgs: --testrun=true --mode=strong --printTimings=false --perBucketMultiply=1 DynamicThreads: 4 PassExpr: Verification successful! TestName: isx-weak AppArgs: --testrun=true --mode=weak --printTimings=false --perBucketMultiply=1 DynamicThreads: 4 PassExpr: Verification successful! TestName: isx-weakISO AppArgs: --testrun=true --mode=weakISO --printTimings=false --perBucketMultiply=1 DynamicThreads: 4 PassExpr: Verification successful! # ------------------------------------------ # Clean up - MUST BE LAST TestName: _chapel_clean RequireFeature: gasnet,chapel,chapel_clean # So this test can match the "runnable" filter: RunCmd: true PassExpr: 0 # ------------------------------------------ # DO NOT ADD ANY TESTS BELOW THIS LINE gasnet-2025.8.0/tests/harness/amudp/0000775000175000017500000000000015142313673017335 5ustar alastairalastairgasnet-2025.8.0/tests/harness/amudp/Makefile0000664000175000017500000000647215142313673021006 0ustar alastairalastairall: @echo This Makefile is not intended to be called directly. @echo It is used for running unit tests within the automated testing harness provided with the Berkeley UPC runtime. @echo For information on downloading and using Berkeley UPC, see: https://upc.lbl.gov @exit 1 # legacy harness support GASNET_BLDDIR ?= $(TOP_BUILDDIR)/gasnet PERL ?= perl AMX_FLAVOR=udp CONDUIT_DIR=$(GASNET_BLDDIR)/$(AMX_FLAVOR)-conduit CONDUIT_FRAG=$(CONDUIT_DIR)/$(AMX_FLAVOR)-seq.mak AMX_DIR=$(GASNET_BLDDIR)/other/am$(AMX_FLAVOR) Makefile: $(CONDUIT_FRAG) $(CONDUIT_FRAG): @if test -d $(CONDUIT_DIR) ; then \ $(MAKE) -C $(CONDUIT_DIR) $(@F) || exit 1 \ else \ echo ERROR: $(AMX_FLAVOR)-conduit build directory not found ; \ fi -include $(CONDUIT_DIR)/$(AMX_FLAVOR)-seq.mak amxdist: force PASSTHRU_PHONY=check check-exports tests amxdist $(PASSTHRU_PHONY): force $(MAKE) -C $(AMX_DIR) $@ @echo '#!/bin/sh' > $@ ; chmod +x $@ distcheck: force rm -Rf am$(AMX_FLAVOR)[0-9].[0-9]* $(MAKE) -C $(AMX_DIR) amxdist @set -x ; \ TESTDIR=`pwd` ; \ cd $(AMX_DIR) && \ VERSION=`/bin/ls -t am$(AMX_FLAVOR)*.tar.gz | $(PERL) -ne 'if (m@am$(AMX_FLAVOR)(.+)\.tar.gz@) { print "$$1"; exit; }'` ; \ DIR="am$(AMX_FLAVOR)$$VERSION" ; \ gunzip -c $$DIR.tar.gz | tar xvf - && \ cd $$DIR && \ $(MAKE) all tests CC="$(GASNET_CC)" CXX="$(GASNET_LD)" && \ cp ./amudprun$(EXESUFFIX) $$TESTDIR/amudprun-sa$(EXESUFFIX) && \ cp ./testam$(EXESUFFIX) $$TESTDIR/$@$(EXESUFFIX) amudprun: $(MAKE) -C $(AMX_DIR) $@$(EXESUFFIX) @cp $(AMX_DIR)/$@$(EXESUFFIX) . # This target tests the Makefile target that builds amudprun for the host system # When cross-compiling, this requries access to host compilers (which differ from the usual target compilers) # UPCR and harness have proper support for host C compilers, but unfortunately not host C++ compilers # For non-cross-compile, we default these to GASNet's target C++ compiler # For cross-compile, the user should set HOST_CXX(FLAGS) in the harness environment # We deliberately ban the MANUAL_* flags here, as they may not be appropriate for the host compiler # note this "banning" is only effective for cross-compile, otherwise MANUAL_CFLAGS is already folded into HOST_CFLAGS by harness amudprun-host: rm -Rf $(GASNET_BLDDIR)/other/amudp/.host @echo "Harness default settings:" 1>&2 ; \ set -x ; HOST_CC='$(HOST_CC)' HOST_CFLAGS='$(HOST_CFLAGS)' HOST_CXX='$(HOST_CXX)' HOST_CXXFLAGS='$(HOST_CXXFLAGS)' HOST_LDFLAGS='$(HOST_LDFLAGS)' HOST_LIBS='$(HOST_LIBS)' ; set +x ; \ if test -z "$$HOST_CXX" ; then \ echo "Defaulting HOST_CXX(FLAGS) to GASNET_CXX(FLAGS)" 1>&2 ; set -x ; \ eval HOST_`$(MAKE) --no-print-directory -f $(GASNET_BLDDIR)/Makefile echovar VARNAME=CXX` ; \ eval HOST_`$(MAKE) --no-print-directory -f $(GASNET_BLDDIR)/Makefile echovar VARNAME=CXXFLAGS` ; \ fi ; \ set -x ; \ $(MAKE) -C $(AMX_DIR) $@$(EXESUFFIX) CC="$$HOST_CC $$HOST_CFLAGS" CXX="$$HOST_CXX $$HOST_CXXFLAGS" platform_ldflags="$$HOST_LDFLAGS $$HOST_LIBS" \ MANUAL_CFLAGS='' MANUAL_CXXFLAGS='' MANUAL_DEFINES='' MANUAL_LIBS='' MANUAL_LDFLAGS='' @cp $(AMX_DIR)/$@$(EXESUFFIX) . test%: amudprun force $(MAKE) -C $(AMX_DIR) $@ @cp $(AMX_DIR)/$@$(EXESUFFIX) . force: .PHONY: force gasnet-2025.8.0/tests/harness/amudp/harness.conf0000664000175000017500000000635715142313673021662 0ustar alastairalastair# This suite is independent of UPC compiler: KnownFailureAnySpec BEGIN_DEFAULT_CONFIG MakeFlags: Flags: Files: $TESTNAME$.c DynamicThreads: $DEFAULT$ StaticThreads: 0 CompileResult: pass PassExpr: 0 FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans TimeLimit: 0 RequireFeature: gasnet_has_udp ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC ProcPerNode: 1 Pthreads: 0 END_DEFAULT_CONFIG # ------------------------------------------ # Tests to compile, but not run TestName: check-exports RequireFeature: false # C++ has too many odd symbol manglings TestName: amxdist RequireFeature: gasnet_has_udp,amx_standalone # This tests stand-alone functionality and is off by default PassExpr: ready for distribution TestName: tests ProhibitFeature: network_udp # handled below WarningFilter: os_cnl ; .*?warning: Using 'gethostbyname' in statically linked applications.*? TestName: distcheck RequireFeature: gasnet_has_udp,amx_standalone # This tests stand-alone functionality and is off by default AppArgs: 100 P AppEnv: A=A B=B C=C ABC=ABC AReallyLongEnvironmentName="A Really Long Environment Value" TimeLimit: $DEFAULT$ RunCmd: ./amudprun-sa -np %N %P %A WarningFilter: WARNING: Using Makefile.generic.*? WarningFilter: .*?-Wunused.*? WarningFilter: .*?AMUDP_Error.*? PassExpr: Worker 0 done. MakeFlags: os_solaris ; HOSTSYSTEM=solaris MakeFlags: cc_pgi ; MANUAL_DEFINES="-w !MANUAL_DEFINES!" # avoid noisy PGI warnings MakeFlags: cc_pgi && os_darwin ; MANUAL_DEFINES="-w !MANUAL_DEFINES!" MANUAL_LDFLAGS="-Wl,-no_compact_unwind !MANUAL_LDFLAGS!" # bug 3377 TestName: amudprun-host RequireFeature: gasnet_has_udp,amx_standalone # This tests stand-alone functionality and is off by default MakeFlags: os_solaris ; HOSTSYSTEM=solaris BEGIN_DEFAULT_CONFIG MakeFlags: Flags: Files: $TESTNAME$.c DynamicThreads: 1,$DEFAULT$ # test loopback and parallel StaticThreads: 0 CompileResult: pass RunCmd: ./amudprun -np %N %P %A PassExpr: 0 FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: TimeLimit: $DEFAULT$ RequireFeature: network_udp ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC ProcPerNode: 1 Pthreads: 0 END_DEFAULT_CONFIG # ------------------------------------------ # General run tests TestName: testping AppArgs: 100 P PassExpr: microseconds total BenchmarkResult: (\S+)\s*(us / request) TestName: testlatency AppArgs: 100 P PassExpr: microseconds total BenchmarkResult: (\S+)\s*(us / request) TestName: testlatencyM AppArgs: 100 P 64 PassExpr: microseconds total BenchmarkResult: (\S+)\s*(us / request) TestName: testbulk AppArgs: 100 1048576 P H PassExpr: microseconds total BenchmarkResult: Worker.*?throughput:\s*(\S+)\s*(KB/sec) TestName: testam AppArgs: 100 P AppEnv: A=A B=B C=C ABC=ABC AReallyLongEnvironmentName="A Really Long Environment Value" PassExpr: Worker 0 done. TestName: testbounce AppArgs: 100 P PassExpr: microseconds total BenchmarkResult: Worker 0.*?throughput:\s*(\S+)\s*(KB/sec) TestName: testreduce PassExpr: Result verified! TestName: testgetput AppArgs: 100 PassExpr: Proc 0 verified. TestName: testreadwrite AppArgs: 100 PassExpr: Proc 0 verified. gasnet-2025.8.0/tests/harness/gasnet-tests/0000775000175000017500000000000015142313673020650 5ustar alastairalastairgasnet-2025.8.0/tests/harness/gasnet-tests/crash-filter0000775000175000017500000000063215142313673023162 0ustar alastairalastair#!/bin/sh #set -x # This wrapper script is used to run a command while filtering the output to hide # crash strings from the crash detection logic in runjobs, and forcing a zero exit code. # All command output is forced to stdout PERL=${PERL:-perl} # disable core files for this intentional crash ulimit -c 0 "$@" 2>&1 | $PERL -pe "s/Caught a fatal/==Redacted==/ ; s/terminated with/==Redacted==/" exit 0 gasnet-2025.8.0/tests/harness/gasnet-tests/Makefile0000664000175000017500000000620615142313673022314 0ustar alastairalastairall: @echo This Makefile is not intended to be called directly. @echo It is used for running unit tests within the automated testing harness provided with the Berkeley UPC runtime. @echo For information on downloading and using Berkeley UPC, see: https://upc.lbl.gov @exit 1 # legacy harness support UPCR_BLDDIR ?= $(TOP_BUILDDIR) GASNET_BLDDIR ?= $(TOP_BUILDDIR)/gasnet GASNET_SRCDIR ?= $(TOP_SRCDIR)/gasnet PERL ?= perl CONDUIT_DIR=$(GASNET_BLDDIR)/$(NETWORK)-conduit testcxx%: force ; $(MAKE) do-cxx-test EXE=$@ testlegacycxx%: force ; $(MAKE) do-cxx-test EXE=$@ do-cxx-test: force @if test -n "`$(UPCC) --network=udp --echo-var UPCR_LD 2>/dev/null`"; then \ makename=`echo $(EXE) | $(PERL) -pe 's/_.*-(seq|par|parsync)$$/-$$1/'`; \ cmdname=`echo $(EXE) | $(PERL) -pe 's/(_.*)?-(seq|par|parsync)$$//'`; \ echo "$$makename => $$cmdname => $(EXE)" ; set -x ; \ $(MAKE) -C $(CONDUIT_DIR) $$makename MANUAL_CXXFLAGS="$(MANUAL_CXXFLAGS)" && \ cp -f $(CONDUIT_DIR)/$$cmdname$(EXESUFFIX) $(EXE)$(EXESUFFIX); \ else \ echo '#!/bin/sh' > $(EXE) ; chmod +x $(EXE); \ fi # One rule to rule them all # test(.*)(_.*)?-(seq|par|parsync) gets made as test$1-$3 into executable test$1 and copied to $0 test%: force @makename=`echo $@ | $(PERL) -pe 's/_.*-(seq|par|parsync)$$/-$$1/'`; \ cmdname=`echo $@ | $(PERL) -pe 's/(_.*)?-(seq|par|parsync)$$//'`; \ echo "$$makename => $$cmdname => $@" ; set -x ; \ $(MAKE) -C $(CONDUIT_DIR) $$makename MANUAL_CFLAGS="$(MANUAL_CFLAGS)" && \ cp -f $(CONDUIT_DIR)/$$cmdname$(EXESUFFIX) $@$(EXESUFFIX) testconduitspecific: force @if test "$(NETWORK)" = "mpi" ; then \ conduit_test=testmpi ; \ conduit_mode=par ; \ fi ; \ if test "$(NETWORK)" = "udp" ; then \ conduit_test=testcxx ; \ conduit_mode=par ; \ fi ; \ if test "$$conduit_test" = "" ; then \ conduit_test=testam ; \ conduit_mode=parsync ; \ fi ; \ $(MAKE) -C $(CONDUIT_DIR) $$conduit_test-$$conduit_mode MANUAL_CFLAGS="$(MANUAL_CFLAGS)" && \ cp -f $(CONDUIT_DIR)/$$conduit_test$(EXESUFFIX) $@$(EXESUFFIX) parsync: force @$(MAKE) -C $(CONDUIT_DIR) $@ @echo '#!/bin/sh' > $@ ; chmod +x $@ ident: cp -f $(GASNET_SRCDIR)/other/contrib/ident . check-exports: force @$(MAKE) -C $(CONDUIT_DIR) $@ @echo '#!/bin/sh' > $@ ; chmod +x $@ check-tools-exports: force @$(MAKE) -C $(GASNET_BLDDIR) check-exports @echo '#!/bin/sh' > $@ ; chmod +x $@ check-libupcr-exports: force @$(MAKE) -C $(UPCR_BLDDIR) check-exports @echo '#!/bin/sh' > $@ ; chmod +x $@ do-check-other: force @rm -f $(GASNET_BLDDIR)/other/check-pp-tgt$(EXESUFFIX) @$(MAKE) -C $(GASNET_BLDDIR)/other check-local @cp -f $(GASNET_BLDDIR)/other/check-pp-tgt$(EXESUFFIX) $(EXE)$(EXESUFFIX) check-other: force ; $(MAKE) do-check-other EXE=$@ check-other-cross: force ; $(MAKE) do-check-other EXE=$@ check-other-pedantic: force ; $(MAKE) do-check-other EXE=$@ force: .PHONY: force gasnet-2025.8.0/tests/harness/gasnet-tests/harness.conf0000664000175000017500000020601615142313673023167 0ustar alastairalastair# This suite is independent of UPC compiler: KnownFailureAnySpec BEGIN_DEFAULT_CONFIG MakeFlags: Flags: Files: $TESTNAME$.c DynamicThreads: $DEFAULT$ StaticThreads: 0 CompileResult: pass PassExpr: 0 FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: # ensure smp/no-pshm jobs silently downgrade to single-process: AppEnv: network_smp && nopshm ; UPCRUN_ALLOW_1PROC_DOWNGRADE=1 TimeLimit: 1.5 * $DEFAULT$ RequireFeature: gasnet ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC ProcPerNode: 1 Pthreads: 0 # When using distcc+clang we lose suppression of warnings # for the expansions of macros declared in system headers: # + glibc's inline strcmp when one string is < 3 chars WarningFilter: (cc_clang && distcc) && nodebug ; .*? warning: array index [23] is past the end of the array .*? END_DEFAULT_CONFIG # ------------------------------------------ # Capture environment and spawner data # Single and default process counts with default ProcPerNode TestName: testhello-seq AppEnv: GASNET_VERBOSEENV=1 GASNET_SPAWN_VERBOSE=1 AppEnv: network_ibv ; GASNET_IBV_LIST_PORTS=1 GASNET_IBV_PORTS_VERBOSE=3 AppEnv: network_ofi ; GASNET_OFI_LIST_DEVICES=1 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel SaveOutput: 1 ProcPerNode: $DEFAULT$ ProhibitFeature: runtime_upcr # lacks ident strings required by upcrun WarningFilter: .*?warning: statement not reached.*? # Run with 2 processes and (if available) 1-ppn TestName: testhello_1ppn-seq AppEnv: GASNET_VERBOSEENV=1 GASNET_SPAWN_VERBOSE=1 AppEnv: network_ibv ; GASNET_IBV_LIST_PORTS=1 GASNET_IBV_PORTS_VERBOSE=3 AppEnv: network_ofi ; GASNET_OFI_LIST_DEVICES=1 SaveOutput: 1 DynamicThreads: 2 ProcPerNode: 1 ProhibitFeature: runtime_upcr # lacks ident strings required by upcrun WarningFilter: .*?warning: statement not reached.*? # Run `ident` utility to capture compiled-in configuration, sorted for ease of comparison. TestName: testhello_ident-seq MakeFlags: ident # actually a second target, rather than a flag SaveOutput: 1 DynamicThreads: 1 RunCmd: sh -c "./ident %P | sort" PassExpr: GASNetConfig WarningFilter: .*?warning: statement not reached.*? # ------------------------------------------ # Tests to compile, but not run # complicated calling convention, known to hang in several cases TestName: testexit-seq TimeLimit: 0 #Fixed in SS12.2+#KnownFailure: compile-failure ; cc_sun && cpu_i386 && nodebug ; bug 2938 - suncc crash building testexit WarningFilter: cc_xlc; '.*? 1500-010: .*?' # Infinite loop in main() TestName: check-exports TimeLimit: 0 RequireFeature: gasnet,cc_gnu # Other compilers have too many odd symbol manglings #KnownFailure: compile-failure ; os_bgq ; BG/Q headers leak UCI parse/encode/decode symbols TestName: check-tools-exports TimeLimit: 0 RequireFeature: gasnet,cc_gnu # Other compilers have too many odd symbol manglings #KnownFailure: compile-failure ; os_bgq ; BG/Q headers leak UCI parse/encode/decode symbols TestName: check-libupcr-exports RequireFeature: gasnet,cc_gnu,runtime_upcr # Other compilers have too many odd symbol manglings TimeLimit: 0 TestName: testgasnet_Wextra-seq MakeFlags: MANUAL_CFLAGS="-Wall -Wextra -Wno-unused -Wno-unused-parameter !MANUAL_CFLAGS!" RequireFeature: gasnet && (cc_clang||cc_gnu) TimeLimit: 0 # Comments to suppress implicit-fallthrough warnings don't work w/i macros (bug 3692) WarningFilter: all ; .*?Wimplicit-fallthrough.*? TestName: testgasnet_Wextra-par MakeFlags: MANUAL_CFLAGS="-Wall -Wextra -Wno-unused -Wno-unused-parameter !MANUAL_CFLAGS!" RequireFeature: gasnet_has_par && (cc_clang||cc_gnu) TimeLimit: 0 # Comments to suppress implicit-fallthrough warnings don't work w/i macros (bug 3692) WarningFilter: all ; .*?Wimplicit-fallthrough.*? TestName: testgasnet_mismatch-seq MakeFlags: MANUAL_CFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH !MANUAL_CFLAGS!" WarningFilter: all ; .*? warning: function might be possible candidate for .(gnu_)?printf. format attribute.*? TimeLimit: 0 # Some compilers have broken runtime feature tests (such as __has_builtin or # __has_attribute) that prevent us from providing annotations which would # prevent certain warnings in a mismatch compile. MakeFlags: cc_pathscale ; MANUAL_CFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH -Wno-uninitialized !MANUAL_CFLAGS!" TestName: testgasnet_mismatch-par MakeFlags: MANUAL_CFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH !MANUAL_CFLAGS!" WarningFilter: all ; .*? warning: function might be possible candidate for .(gnu_)?printf. format attribute.*? RequireFeature: gasnet_has_par TimeLimit: 0 # Some compilers have broken runtime feature tests (such as __has_builtin or # __has_attribute) that prevent us from providing annotations which would # prevent certain warnings in a mismatch compile. MakeFlags: cc_pathscale ; MANUAL_CFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH -Wno-uninitialized !MANUAL_CFLAGS!" TestName: testlegacy_Wextra-seq MakeFlags: MANUAL_CFLAGS="-Wall -Wextra -Wno-unused -Wno-unused-parameter !MANUAL_CFLAGS!" RequireFeature: gasnet && (cc_clang||cc_gnu) TimeLimit: 0 TestName: testlegacy_Wextra-par MakeFlags: MANUAL_CFLAGS="-Wall -Wextra -Wno-unused -Wno-unused-parameter !MANUAL_CFLAGS!" RequireFeature: gasnet_has_par && (cc_clang||cc_gnu) TimeLimit: 0 TestName: testlegacy_mismatch-seq MakeFlags: MANUAL_CFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH !MANUAL_CFLAGS!" WarningFilter: all ; .*? warning: function might be possible candidate for .(gnu_)?printf. format attribute.*? TimeLimit: 0 # Some compilers have broken runtime feature tests (such as __has_builtin or # __has_attribute) that prevent us from providing annotations which would # prevent certain warnings in a mismatch compile. MakeFlags: cc_pathscale ; MANUAL_CFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH -Wno-uninitialized !MANUAL_CFLAGS!" TestName: testlegacy_mismatch-par MakeFlags: MANUAL_CFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH !MANUAL_CFLAGS!" WarningFilter: all ; .*? warning: function might be possible candidate for .(gnu_)?printf. format attribute.*? RequireFeature: gasnet_has_par TimeLimit: 0 # Some compilers have broken runtime feature tests (such as __has_builtin or # __has_attribute) that prevent us from providing annotations which would # prevent certain warnings in a mismatch compile. MakeFlags: cc_pathscale ; MANUAL_CFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH -Wno-uninitialized !MANUAL_CFLAGS!" # test{,legacy}cxx* don't create a GASNet executable to run unless udp-conduit was configured TestName: testcxx-seq RequireFeature: gasnet_has_udp TimeLimit: 0 #KnownFailure: compile-failure ; cc_pgi && cpu_powerpc64le && debug ; EXTERNAL: Bug 3380 - pgcc 16.10 Community Edition for OpenPower ICE building libgasnet (Fixed at or before 17.4) #KnownFailure: compile-crash ; cc_pgi ; EXTERNAL: Bug 3757 - pgc++-18.x ICE on test(legacy)cxx and testtoolscxx-par TestName: testcxx-par RequireFeature: gasnet_has_udp,gasnet_has_par TimeLimit: 0 #KnownFailure: compile-failure ; cc_pgi && cpu_powerpc64le && debug ; EXTERNAL: Bug 3380 - pgcc 16.10 Community Edition for OpenPower ICE building libgasnet (Fixed at or before 17.4) #KnownFailure: compile-crash ; cc_pgi ; EXTERNAL: Bug 3757 - pgc++-18.x ICE on test(legacy)cxx and testtoolscxx-par TestName: testcxx_Wextra-seq MakeFlags: MANUAL_CXXFLAGS="-Wall -Wextra -Wno-unused -Wno-unused-parameter !MANUAL_CXXFLAGS!" RequireFeature: gasnet_has_udp && (cc_clang||cc_gnu) TimeLimit: 0 # Comments to suppress implicit-fallthrough warnings don't work w/i macros (bug 3692) WarningFilter: all ; .*?Wimplicit-fallthrough.*? TestName: testcxx_Wextra-par MakeFlags: MANUAL_CXXFLAGS="-Wall -Wextra -Wno-unused -Wno-unused-parameter !MANUAL_CXXFLAGS!" RequireFeature: gasnet_has_udp && gasnet_has_par && (cc_clang||cc_gnu) TimeLimit: 0 # Comments to suppress implicit-fallthrough warnings don't work w/i macros (bug 3692) WarningFilter: all ; .*?Wimplicit-fallthrough.*? TestName: testcxx_mismatch-seq MakeFlags: MANUAL_CXXFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH !MANUAL_CXXFLAGS!" WarningFilter: all ; .*? warning: function might be possible candidate for .(gnu_)?printf. format attribute.*? RequireFeature: gasnet_has_udp TimeLimit: 0 # Some annotations used to prevent warnings lack matching runtime feature # tests which would enable their application in a mismatch compile. MakeFlags: cc_gnu ; MANUAL_CXXFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH -DGASNETT_USE_PRAGMA_GCC_DIAGNOSTIC -Wno-unknown-pragmas !MANUAL_CXXFLAGS!" # Some compilers have broken runtime feature tests (such as __has_builtin or # __has_attribute) that prevent us from providing annotations which would # prevent certain warnings in a mismatch compile. MakeFlags: cc_pathscale ; MANUAL_CXXFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH -Wno-uninitialized !MANUAL_CXXFLAGS!" #KnownFailure: compile-crash ; cc_pgi ; EXTERNAL: Bug 3757 - pgc++-18.x ICE on test(legacy)cxx and testtoolscxx-par TestName: testcxx_mismatch-par MakeFlags: MANUAL_CXXFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH !MANUAL_CXXFLAGS!" WarningFilter: all ; .*? warning: function might be possible candidate for .(gnu_)?printf. format attribute.*? RequireFeature: gasnet_has_udp && gasnet_has_par TimeLimit: 0 # Some annotations used to prevent warnings lack matching runtime feature # tests which would enable their application in a mismatch compile. MakeFlags: cc_gnu ; MANUAL_CXXFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH -DGASNETT_USE_PRAGMA_GCC_DIAGNOSTIC -Wno-unknown-pragmas !MANUAL_CXXFLAGS!" # Some compilers have broken runtime feature tests (such as __has_builtin or # __has_attribute) that prevent us from providing annotations which would # prevent certain warnings in a mismatch compile. MakeFlags: cc_pathscale ; MANUAL_CXXFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH -Wno-uninitialized !MANUAL_CXXFLAGS!" #KnownFailure: compile-crash ; cc_pgi ; EXTERNAL: Bug 3757 - pgc++-18.x ICE on test(legacy)cxx and testtoolscxx-par TestName: testlegacycxx-seq RequireFeature: gasnet_has_udp TimeLimit: 0 WarningFilter: cc_gnu ; .*?distcheck-old.*? NULL \n?used in arithmetic.*? # g++-2.96 dislikes (NULL == NULL) WarningFilter: cc_open64 ; .*? NULL used in arithmetic.*? # OpenCC dislikes (NULL == NULL) #KnownFailure: compile-crash ; cc_pgi ; EXTERNAL: Bug 3757 - pgc++-18.x ICE on test(legacy)cxx and testtoolscxx-par TestName: testlegacycxx-par RequireFeature: gasnet_has_udp,gasnet_has_par TimeLimit: 0 WarningFilter: cc_gnu ; .*?distcheck-old.*? NULL \n?used in arithmetic.*? # g++-2.96 dislikes (NULL == NULL) WarningFilter: cc_open64 ; .*? NULL used in arithmetic.*? # OpenCC dislikes (NULL == NULL) #KnownFailure: compile-crash ; cc_pgi ; EXTERNAL: Bug 3757 - pgc++-18.x ICE on test(legacy)cxx and testtoolscxx-par TestName: testlegacycxx_Wextra-seq MakeFlags: MANUAL_CXXFLAGS="-Wall -Wextra -Wno-unused -Wno-unused-parameter !MANUAL_CXXFLAGS!" RequireFeature: gasnet_has_udp && (cc_clang||cc_gnu) TimeLimit: 0 TestName: testlegacycxx_Wextra-par MakeFlags: MANUAL_CXXFLAGS="-Wall -Wextra -Wno-unused -Wno-unused-parameter !MANUAL_CXXFLAGS!" RequireFeature: gasnet_has_udp && gasnet_has_par && (cc_clang||cc_gnu) TimeLimit: 0 TestName: testlegacycxx_mismatch-seq MakeFlags: MANUAL_CXXFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH !MANUAL_CXXFLAGS!" WarningFilter: all ; .*? warning: function might be possible candidate for .(gnu_)?printf. format attribute.*? WarningFilter: cc_gnu ; .*?distcheck-old.*? NULL \n?used in arithmetic.*? # g++-2.96 dislikes (NULL == NULL) WarningFilter: cc_open64 ; .*? NULL used in arithmetic.*? # OpenCC dislikes (NULL == NULL) RequireFeature: gasnet_has_udp TimeLimit: 0 # Some compilers have broken runtime feature tests (such as __has_builtin or # __has_attribute) that prevent us from providing annotations which would # prevent certain warnings in a mismatch compile. MakeFlags: cc_pathscale ; MANUAL_CXXFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH -Wno-uninitialized !MANUAL_CXXFLAGS!" #KnownFailure: compile-crash ; cc_pgi ; EXTERNAL: Bug 3757 - pgc++-18.x ICE on test(legacy)cxx and testtoolscxx-par TestName: testlegacycxx_mismatch-par MakeFlags: MANUAL_CXXFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH !MANUAL_CXXFLAGS!" WarningFilter: all ; .*? warning: function might be possible candidate for .(gnu_)?printf. format attribute.*? WarningFilter: cc_gnu ; .*?distcheck-old.*? NULL \n?used in arithmetic.*? # g++-2.96 dislikes (NULL == NULL) WarningFilter: cc_open64 ; .*? NULL used in arithmetic.*? # OpenCC dislikes (NULL == NULL) RequireFeature: gasnet_has_udp && gasnet_has_par TimeLimit: 0 # Some compilers have broken runtime feature tests (such as __has_builtin or # __has_attribute) that prevent us from providing annotations which would # prevent certain warnings in a mismatch compile. MakeFlags: cc_pathscale ; MANUAL_CXXFLAGS="-DGASNETT_COMPILER_FORCE_MISMATCH -Wno-uninitialized !MANUAL_CXXFLAGS!" #KnownFailure: compile-crash ; cc_pgi ; EXTERNAL: Bug 3757 - pgc++-18.x ICE on test(legacy)cxx and testtoolscxx-par # ------------------------------------------ # Conduit-free tests TestName: check-other RequireFeature: gasnet ProhibitFeature: cross_compiling SaveOutput: 1 RunCmd: %P %A TestName: check-other-cross RequireFeature: gasnet,cross_compiling TimeLimit: 0 # check pedantic compile restrictions on gasnet_portable_platform.h: TestName: check-other-pedantic RequireFeature: gasnet,cc_gnu ProhibitFeature: cc_subfamily_nvidia MakeFlags: cc_gnu ; MANUAL_CFLAGS="-pedantic -Wall -Wextra -Wundef -ansi" TimeLimit: 0 # ------------------------------------------ # General SEQ tests TestName: testgasnet-seq DynamicThreads: 1,$DEFAULT$ # test loopback and parallel FileLimit: 1000 + 2300 * $THREADS$ # SEGMENT_EVERYTHING, hostnames and pathnames make this limit problematic #KnownFailure: run-all ; cpu_i386 && cc_sun && nodebug ; bug2154 (testgasnet failures on cloon_cc_pthreads-opt) #Fixed in SS12.2+#KnownFailure: compile-failure ; cc_sun && (cpu_i386 || cpu_x86_64) && nodebug ; bug 2710 (Sun CC crash compiling testgasnet) ## May fail user backtrace test if $TMPDIR is not valid on compute node(s) TestName: testlegacy-seq DynamicThreads: 1,$DEFAULT$ # test loopback and parallel FileLimit: 1000 + 2300 * $THREADS$ # SEGMENT_EVERYTHING, hostnames and pathnames make this limit problematic ## May fail user backtrace test if $TMPDIR is not valid on compute node(s) TestName: testinternal-seq TimeLimit: 2 * $DEFAULT$ AppEnv: os_cnl && !network_mpi; PMI_MAX_KVS_ENTRIES=1000000 AppEnv: ofi_verbs_provider ; GASNET_OFI_RECEIVE_BUFF_SIZE=recv # work around bug 4179 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel KnownFailure: run-time ; network_ofi && ofi_udp_provider ; Bug 4513 - ofi/udp hang in testinternal progress functions tests TestName: testenv-seq AppArgs: GASNet is "Global Address Space Networking" AppEnv: GASNET_DUMMY="GASNet dummy value" #KnownFailure: run-all ; os_aix && (network_mpi || network_lapi) ; bug1039 (poe mishandles quoted program arguments) # clang warns on glibc's inline strcmp when one string is < 3 chars WarningFilter: cc_clang && nodebug ; .*? warning: array index 3 is past the end of the array .*? TestName: testsmall-seq FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(PutBlocking latency\)) TestName: testlarge-seq AppArgs: 100 2097152 FileLimit: 8200 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) TestName: testval-seq FileLimit: 3000 + 1750 * $THREADS$ BenchmarkResult: 8 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutBlockingVal throughput\)) TestName: testam-seq AppArgs: -sync-req DynamicThreads: 1,$DEFAULT$ # test loopback and parallel FileLimit: 16000 + 15500 * $THREADS$ BenchmarkResult: AMShort ping-pong, roundtrip latency\s+:\s+\S+ sec\s+(\S+) (us) #KnownFailure: run-all ; cpu_x86_64 && network_elan ; bug1444 (elan exceptions on elan4/Opteron mu & hive) WarningFilter: cc_clang ; .*? warning: self-comparison always evaluates to false .*? TestName: testam_async-seq AppArgs: -async-req FileLimit: 16000 + 15500 * $THREADS$ BenchmarkResult: max:\n.* AMMedium\s+flood\s+one-way\s+Req\s+:.*us\s+(\S+) (MB/s) WarningFilter: cc_clang ; .*? warning: self-comparison always evaluates to false .*? TestName: testcore1-seq AppArgs: 1000 TestName: testcore2-seq DynamicThreads: 1,$DEFAULT$ # test loopback and parallel # bug955 - firehose mishandles free (see bug 3989): AppEnv: network_ibv && cpu_32 ; GASNET_DISABLE_MUNMAP=1 AppArgs: network_ibv && cpu_32 ; -m # Only Medium, since ref NPAM Long tickles bug 955/3989 # Avoid triggering kernel OOM-killer on 32-bit MIPS Malta AppArgs: (_threads > 1) && malta && cpu_32; 0 524288 TestName: testcore3-seq DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testcore4-seq DynamicThreads: 1,$DEFAULT$ # test loopback and parallel #KnownFailure: compile-failure ; cc_pgi ; bug2796 (testcore4 compilation failure w/ PGI compiler) TimeLimit: 2 * $DEFAULT$ TestName: testcore5-seq DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TimeLimit: 2 * $DEFAULT$ TestName: testtoken-seq TimeLimit: $DEFAULT$ TestName: testbarrier-seq BenchmarkResult: Avg Anon. Barrier latency:\s+(\S+) (us) TestName: testlogGP-seq AppArgs: 1000 0 8 65536 FileLimit: 1250 + 1600 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters,\s+\S+ us difference =\s+(\S+) (us/msg \(put: o_i - PutNB\+DEFER\)) MakeFlags: cc_cray ; MANUAL_CFLAGS=-hnomessage=3140 # bug 3847: hide a warning about delay.o # testvis behavioral notes: # - ALL modes of testvis will end up invoking contiguous RMA for some operations # (e.g. fully contiguous ops, strided/indexed where the contiguous chunk size exceeds GASNET_VIS_MAXCHUNK) # - VIS_AMPIPE=0 disables use of the AMMedium packing pipeline entirely, # which means the test will no longer use AM to move data or stress AMs # - VIS_REMOTECONTIG=0 disables the remotecontig algorithm inside the library # that includes malloc/free of temporary bounce buffers used in RMA. # This algorithm is the only one that might result in the test munmapping # buffers previously used for RMA, which historically tickles defects in dynamic registration. # - When the above algorithms are disabled, the "fallback" is fine-grained RMA TestName: testvis-seq AppEnv: GASNET_VIS_AMPIPE=0 GASNET_VIS_REMOTECONTIG=0 AppArgs: 50 #KnownFailure: run-crash ; os_bgq && debug; Bug 3819 - testvis out-of-memory failures on BG/Q TestName: testvis_pack-seq AppEnv: GASNET_VIS_AMPIPE=1 GASNET_VIS_REMOTECONTIG=1 AppEnv: network_ibv && cpu_32 ; GASNET_DISABLE_MUNMAP=1 # bug955 - firehose mishandles free AppArgs: 50 ProhibitFeature: network_smp TestName: testvisperf-seq AppArgs: -maxdata 131072 -maxcontig 512 10 FileLimit: 10000 + 5500 * $THREADS$ TestName: testmisc-seq BenchmarkResult: Do-nothing gasnet_AMPoll\(\)\s+:\s+\S+ sec\s+(\S+) (us/iter) DynamicThreads: 1 #KnownFailure: run-all ; cc_sun && cpu_sparc ; bug 1417 (Solaris 2.10/SunC 5.8 fails testmisc-par with -g) #KnownFailure: run-crash ; cc_gnu && os_darwin && nodebug ; Bug 3080 - testmisc failures w/ Apple XCode TestName: testalign-seq AppArgs: 100 FileLimit: 1400 + 6350 * $THREADS$ BenchmarkResult: byte\s+4 byte aligned :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) TestName: testrand-seq BenchmarkResult: Timer granularity: .. (\S+) (us), overhead: . \S+ us AppArgs: 1024 TestName: testbarrierconf-seq DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testbarrierconf_t-seq AppArgs: -t DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testbarrierlate-seq BenchmarkResult: Late notify\(\) Anon. Barrier net latency, average:\s+(\S+) (us) MakeFlags: cc_cray ; MANUAL_CFLAGS=-hnomessage=3140 # bug 3847: hide a warning about delay.o TestName: testcoll-seq DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testnbr-seq TimeLimit: 3 * $DEFAULT$ TestName: testqueue-seq DynamicThreads: $DEFAULT$ FileLimit: 15500 + 11100 * $THREADS$ AppArgs: 1 256 262144 WarningFilter: cc_pathscale && nodebug; 'WARNING.*?number of phis is too big.*?' TestName: testhsl-seq AppArgs: 0 WarningFilter: cc_xlc; '.*? 1500-010: .*?' # Infinite loop in main() #KnownFailure: compile-failure ; cc_pgi && cpu_powerpc64le && debug ; EXTERNAL: Bug 3380 - pgcc 16.10 Community Edition for OpenPower ICE building libgasnet (Fixed at or before 17.4) TestName: testtools-seq DynamicThreads: 1 # avoid false negatives when num_pthreads < num_threads SaveOutput: 1 # bug 3337: CPU timers are inaccurate in a virtualized environment, # where tsc register is virtualized. Disable that test and retain others. # Real users on KVM/QEMU/etc. should configure --enable-force-gettimeofday AppEnv: qemu || kvm ; GASNET_TEST_TIME_SLACK=300 #KnownFailure: run-limit ; os_bgq && cc_xlc && nodebug ; word-tearing w/ xlc on BG/Q # The nightly irun_cross_compiler tester avoids bugs 3019 and 1712 #KnownFailure: run-exit ; rosetta ; Bug 3019 - testtools is faked as mpi-conduit, which is not available #KnownFailure: run-match ; rosetta ; Bug 1712 - timer and atomics inaccuracy with PPC binaries on MacIntel # Filter away two known warnings under AIX due to bug 2554 WarningFilter: os_aix; ld: 0711-224 WARNING: Duplicate symbol: gasnett_backtrace_user.*? WarningFilter: os_aix; ld: 0711-341 WARNING: Replaced XTY_CM symbol gasnett_backtrace_user.*? TestName: testtoolscxx-seq DynamicThreads: 1 # avoid false negatives when num_pthreads < num_threads SaveOutput: 1 RequireFeature: gasnet_has_udp AppEnv: qemu || kvm ; GASNET_TEST_TIME_SLACK=300 #KnownFailure: run-limit ; os_bgq && cc_xlc && nodebug ; word-tearing w/ xlc on BG/Q TestName: testslice-seq TestName: testslice_foreign-seq AppArgs: -c -f ProcPerNode: 2 # interesting failure modes depend on multiple ppn DynamicThreads: 4,$DEFAULT$ KnownFailure: run-crash ; network_ofi && ofi_cxi_provider && pshm_xpmem ; Bug 4750 - ofi/cxi fails dynamic registration of "other segment" with xpmem TestName: testcollperf-seq AppArgs: (_threads <= 4) ; -szfactor 4 16384 2 25 0 AppArgs: (_threads > 4 && _threads <= 8) ; -szfactor 4 16384 2 10 0 AppArgs: (_threads > 8) ; -szfactor 4 16384 2 2 0 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testcollperf_src_out-seq AppArgs: (_threads <= 4) ; -src-out -szfactor 4 16384 2 5 0 AppArgs: (_threads > 4 && _threads <= 8) ; -src-out -szfactor 4 16384 2 2 0 AppArgs: (_threads > 8) ; -src-out -szfactor 4 16384 2 1 0 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testcollperf_dst_out-seq AppArgs: (_threads <= 4) ; -dst-out -szfactor 4 16384 2 5 0 AppArgs: (_threads > 4 && _threads <= 8) ; -dst-out -szfactor 4 16384 2 2 0 AppArgs: (_threads > 8) ; -dst-out -szfactor 4 16384 2 1 0 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testcollperf_both_out-seq AppArgs: (_threads <= 4) ; -src-out -dst-out -szfactor 4 16384 2 5 0 AppArgs: (_threads > 4 && _threads <= 8) ; -src-out -dst-out -szfactor 4 16384 2 2 0 AppArgs: (_threads > 8) ; -src-out -dst-out -szfactor 4 16384 2 1 0 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testteam-seq TestName: testteambarrier-seq TestName: testteambcast-seq FileLimit: 2400 + 2500 * $THREADS$ TestName: testreduce-seq TestName: testreduce_single-seq AppArgs: 0 1 TestName: testreduce_medium-seq AppArgs: 100 512 TestName: testreduce_large-seq AppArgs: 50 1024 AppEnv: GASNET_COLL_SCRATCH_SIZE=2K TestName: testreduce_bug4361-seq AppEnv: GASNET_COLL_P2P_EAGER_SCALE=4 DynamicThreads: 9 TestName: testratomic-seq DynamicThreads: 1,$DEFAULT$ # test loopback and parallel CompileTimeLimit: 2 * $DEFAULT$ KnownFailure: compile-crash ; cc_gnu && (cpu_sparc64 || cpu_sparc) && cpu_32 && nodebug ; testratomic crashes gcc on opt/sparc/v8+ (both Linux and Solaris) #KnownFailure: compile-failure ; cc_sun && debug ; Bug 3729 - testratomic crashes sun 12.6 compiler in debug #KnownFailure: run-match ; (cc_clang || cc_pgi) && cpu_powerpc64le && nodebug ; Bug 3742 - testratomic failure with pgi and clang on ppc64el ProhibitFeature: os_solaris && cc_sun # compiler crashes - not worth the wallclock time TestName: testfaddperf-seq DynamicThreads: 1,$DEFAULT$ # test loopback and parallel FileLimit: 2200 + 1200 * $THREADS$ BenchmarkResult: total,\s+(\S+) (us ave\. \(U32 FADD latency\)) TestName: testfaddperf_S-seq FileLimit: 1200 + 2000 * $THREADS$ BenchmarkResult: iters, throughput\s+(\S+) (ops/sec \(U32 FADD throughput\)) AppArgs: -S TestName: testimm-seq AppArgs: (network_udp || network_mpi); 5000 # Just half the iters for reference conduits TestName: testacc-seq ProcPerNode: 2 # many failure modes depend on multiple ppn # AppArgs are ADDITIVE. So only one of these should ever be permitted to match AppArgs: (network_udp || network_mpi); 50000 AppArgs: network_smp ; 1000000 TestName: testsegment-seq AppArgs: -random-seg TestName: testtmpair-seq DynamicThreads: 1,$DEFAULT$ # test loopback and parallel #KnownFailure: run-all ; ibv_dynamic_connect ; Bug 4196 - ibv: dynamic connect does not support multiple endpoints TestName: testreadonly-seq #KnownFailure: run-all ; network_ibv ; Bug 3338 - ibv_reg_mr failure (EFAULT/Bad address) on read-only data #KnownFailure: run-all ; network_ibv && ibv_odp ; Bug 4008 - testreadonly failure with ibv/odp KnownFailure: run-all ; network_ucx ; Bug 4046 - testreadonly failure with ucx KnownFailure: run-all ; network_ibv && os_solaris ; Bug 4009 - testreadonly failure with ibv on Solaris KnownFailure: run-all ; network_ofi && ofi_verbs_provider ; Bug 4420 - testreadonly failure with ofi/verbs KnownFailure: run-all ; network_ofi && ofi_cxi_provider ; Bug 4503 - testreadonly failure with ofi/cxi TestName: testalltoall-seq AppArgs: -progress AppEnv: ofi_cxi_provider ; GASNET_OFI_RECEIVE_BUFF_SIZE=recv # work around bug 4461 TestName: testprogthr-seq # CUDA_UVA memory kind testing # Intentionally runs even w/o "kind_cuda_uva" feature TestName: testcudauva-seq BenchmarkResult: node 0/.*?CUDA_VISIBLE_DEVICES.(.*)() TestName: testcudauva_small-seq RequireFeature: kind_cuda_uva AppArgs: 8 AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no TestName: testcudauva_gseg-seq RequireFeature: kind_cuda_uva AppArgs: -gasnet-seg TestName: testsmall_cuda_uva_gg-seq RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-gpu -remote-gpu AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(PutBlocking latency\)) TestName: testsmall_cuda_uva_gh-seq RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-gpu -remote-host AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(PutBlocking latency\)) TestName: testsmall_cuda_uva_hg-seq RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-host -remote-gpu FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(PutBlocking latency\)) TestName: testlarge_cuda_uva_gg-seq RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-gpu -remote-gpu 100 2097152 AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) TestName: testlarge_cuda_uva_gh-seq RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-gpu -remote-host 100 2097152 AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) TestName: testlarge_cuda_uva_hg-seq RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-host -remote-gpu 100 2097152 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) # HIP memory kind testing # Note that HIP-based tests are susceptible to some bugs normally associated # with kind_cuda_uva when using HIP on an Nvidia GPU. # Intentionally runs even w/o "kind_hip" feature TestName: testhip-seq BenchmarkResult: node 0/.*?HIP_VISIBLE_DEVICES.(.*)() MakeFlags: cc_gnu ; MANUAL_CFLAGS="-Wno-inline" # multiple inlining warnings in hip_runtime_api.h TestName: testhip_small-seq RequireFeature: kind_hip MakeFlags: cc_gnu ; MANUAL_CFLAGS="-Wno-inline" # multiple inlining warnings in hip_runtime_api.h AppArgs: 8 AppEnv: hip_platform_nvidia && has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: hip_platform_nvidia && has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: hip_platform_nvidia && has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 TestName: testhip_gseg-seq RequireFeature: kind_hip MakeFlags: cc_gnu ; MANUAL_CFLAGS="-Wno-inline" # multiple inlining warnings in hip_runtime_api.h AppArgs: -gasnet-seg TestName: testsmall_hip_gg-seq RequireFeature: kind_hip AppArgs: -hip -local-gpu -remote-gpu AppEnv: hip_platform_nvidia && has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: hip_platform_nvidia && has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: hip_platform_nvidia && has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(PutBlocking latency\)) TestName: testsmall_hip_gh-seq RequireFeature: kind_hip AppArgs: -hip -local-gpu -remote-host AppEnv: hip_platform_nvidia && has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: hip_platform_nvidia && has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: hip_platform_nvidia && has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(PutBlocking latency\)) TestName: testsmall_hip_hg-seq RequireFeature: kind_hip AppArgs: -hip -local-host -remote-gpu FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(PutBlocking latency\)) TestName: testlarge_hip_gg-seq RequireFeature: kind_hip AppArgs: -hip -local-gpu -remote-gpu 100 2097152 AppEnv: hip_platform_nvidia && has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: hip_platform_nvidia && has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: hip_platform_nvidia && has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) TestName: testlarge_hip_gh-seq RequireFeature: kind_hip AppArgs: -hip -local-gpu -remote-host 100 2097152 AppEnv: hip_platform_nvidia && has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: hip_platform_nvidia && has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: hip_platform_nvidia && has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) TestName: testlarge_hip_hg-seq RequireFeature: kind_hip AppArgs: -hip -local-host -remote-gpu 100 2097152 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) # ZE memory kind testing # NOTE: testlarge is currently capped at 32786 bytes instead of 2097152 # Intentionally runs even w/o "kind_ze" feature TestName: testze-seq BenchmarkResult: node 0/.*?ZE_AFFINITY_MASK.(.*)() TestName: testze_small-seq RequireFeature: kind_ze AppArgs: 8 TestName: testze_gseg-seq RequireFeature: kind_ze AppArgs: -gasnet-seg TestName: testsmall_ze_gg-seq RequireFeature: kind_ze AppArgs: -ze -local-gpu -remote-gpu FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(PutBlocking latency\)) TestName: testsmall_ze_gh-seq RequireFeature: kind_ze AppArgs: -ze -local-gpu -remote-host FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(PutBlocking latency\)) TestName: testsmall_ze_hg-seq RequireFeature: kind_ze AppArgs: -ze -local-host -remote-gpu FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(PutBlocking latency\)) TestName: testlarge_ze_gg-seq RequireFeature: kind_ze AppArgs: -ze -local-gpu -remote-gpu 100 2097152 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) TestName: testlarge_ze_gh-seq RequireFeature: kind_ze AppArgs: -ze -local-gpu -remote-host 100 2097152 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) TestName: testlarge_ze_hg-seq RequireFeature: kind_ze AppArgs: -ze -local-host -remote-gpu 100 2097152 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) # Minimal tests of MPI interoperability # + Feature `mpi_compat` enables compilation and run of these tests # + Feature `mpi_compat_mpi_spawner` sets environment for MPI spawner # + Feature `mpi_compat_mpirun` sets the RunCmd to `mpirun ...` # TODO: more control over launch, perhaps via a level of indirection to a script? TestName: testmpi_init_gfirst-seq RequireFeature: mpi_compat AppEnv: mpi_compat_mpi_spawner ; GASNET_IBV_SPAWNER=mpi GASNET_OFI_SPAWNER=mpi GASNET_UCX_SPAWNER=mpi RunCmd: mpi_compat_mpirun ; mpirun -np %N %P %A TestName: testmpi_init_mfirst-seq RequireFeature: mpi_compat MakeFlags: MANUAL_DEFINES="-DTEST_INIT_MPI_FIRST !MANUAL_DEFINES!" AppEnv: network_aries ; GASNET_GNI_MEMREG=256 # see bug 4639 AppEnv: mpi_compat_mpi_spawner ; GASNET_IBV_SPAWNER=mpi GASNET_OFI_SPAWNER=mpi GASNET_UCX_SPAWNER=mpi RunCmd: mpi_compat_mpirun ; mpirun -np %N %P %A # minimal test for working on-demand backtrace TestName: testexit_bt-seq AppArgs: 100 PassExpr: do_crash_test FailExpr: backtrace failed ProhibitFeature: missing_backtrace TimeLimit: 300 MakeFlags: cc_pgi && os_darwin ; KEEPTMPS=1 # debugger needs testexit.o KnownFailure: run-match ; nodebug ; Debug symbols unreliable in opt mode # do NOT add more known failures here - use -add_feature=missing_backtrace instead to avoid potential timeouts WarningFilter: cc_xlc; '.*? 1500-010: .*?' # Infinite loop in main() # test backtrace from a SIGABRT TestName: testexit_bt_abort-seq AppArgs: 103 AppEnv: GASNET_BACKTRACE=1 PassExpr: do_crash_test FailExpr: backtrace failed RunCmd: ./crash-filter $UPCRUN_CMD$ # Prohibit solaris+ibv due to bug3895: CQ leak ProhibitFeature: missing_backtrace || (os_solaris && network_ibv) TimeLimit: 300 MakeFlags: cc_pgi && os_darwin ; KEEPTMPS=1 # debugger needs testexit.o KnownFailure: run-match ; nodebug ; Debug symbols unreliable in opt mode KnownFailure: run-match ; cpu_sparc64 ; Sparc64 cannot backtrace out of signal context KnownFailure: run-match ; cpu_mips64 && cpu_64 ; MIPS LP64 ABI backtrace breaks at libc boundary (broken gdb?) KnownFailure: run-match ; os_netbsd ; Bug 4047 - Cannot backtrace across signals in NetBSD 9 KnownFailure: run-match ; os_solaris && cpu_x86_64 ; Cannot backtrace across signals in Solaris / x86_64 KnownFailure: run-match ; os_openbsd ; Cannot backtrace across signals in OpenBSD 7 KnownFailure: run-match ; cpu_powerpc64 && cc_gnu ; Cannot backtrace across signals in PPC64-BE + GCC KnownFailure: run-match ; trans_gupc ; Cannot backtrace across signals in GCC/UPC # No KnownFailures for zombies or hung debuggers. -add_feature=missing_backtrace instead WarningFilter: cc_xlc; '.*? 1500-010: .*?' # Infinite loop in main() # ------------------------------------------ # BEGIN PTHREADED TESTS BEGIN_DEFAULT_CONFIG MakeFlags: Flags: Files: $TESTNAME$.c DynamicThreads: $DEFAULT$ StaticThreads: 0 CompileResult: pass PassExpr: 0 FailExpr: ERROR ExitCode: 0 BuildCmd: make,notrans AppArgs: # ensure smp/no-pshm jobs silently downgrade to single-process: AppEnv: network_smp && nopshm ; UPCRUN_ALLOW_1PROC_DOWNGRADE=1 TimeLimit: 2 * $DEFAULT$ RequireFeature: gasnet_has_par ProhibitFeature: hack_for_nonupc_test # mark this suite as non-UPC ProcPerNode: 1 Pthreads: 0 # When using distcc+clang we lose suppression of warnings # for the expansions of macros declared in system headers: # + glibc's inline strcmp when one string is < 3 chars WarningFilter: (cc_clang && distcc) && nodebug ; .*? warning: array index [23] is past the end of the array .*? END_DEFAULT_CONFIG # ------------------------------------------ # General PAR tests TestName: testgasnet-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel FileLimit: 1000 + 2300 * $THREADS$ # SEGMENT_EVERYTHING, hostnames and pathnames make this limit problematic #KnownFailure: run-all ; cpu_x86_64 && network_elan ; bug1445 (gasnett_set_affinity broken on hive) #KnownFailure: run-crash ; os_irix && cpu_32 ; bug2482 (32-bit testgasnet-par exhausts memory) #Fixed in SS12.2+#KnownFailure: compile-failure ; cc_sun && (cpu_i386 || cpu_x86_64) && nodebug ; bug 2710 (Sun CC crash compiling testgasnet) ## May fail user backtrace test if $TMPDIR is not valid on compute node(s) TestName: testlegacy-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel FileLimit: 1000 + 2300 * $THREADS$ # SEGMENT_EVERYTHING, hostnames and pathnames make this limit problematic ## May fail user backtrace test if $TMPDIR is not valid on compute node(s) TestName: testinternal-par TimeLimit: 2 * $DEFAULT$ AppEnv: os_cnl && !network_mpi; PMI_MAX_KVS_ENTRIES=1000000 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel # Should NOT see these 2 in nightly testing becasue we --enable-force-generic-atomicops #KnownFailure: run-match ; rosetta ; Bug 1712 - timer and atomics inaccuracy with PPC binaries on MacIntel #KnownFailure: run-crash ; rosetta ; Bug 1712 - timer and atomics inaccuracy with PPC binaries on MacIntel AppEnv: ofi_verbs_provider ; GASNET_OFI_RECEIVE_BUFF_SIZE=recv # work around bug 4179 KnownFailure: run-time ; network_ofi && ofi_udp_provider ; Bug 4513 - ofi/udp hang in testinternal progress functions tests TestName: testenv-par AppArgs: GASNet is "Global Address Space Networking" AppEnv: GASNET_DUMMY="GASNet dummy value" #KnownFailure: run-all ; os_aix && (network_mpi || network_lapi) ; bug1039 (poe mishandles quoted program arguments) TestName: testsmall-par FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(GetBlocking latency\)) TestName: testlarge-par AppArgs: 100 2097152 FileLimit: 8200 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(GetNB throughput\)) TestName: testval-par FileLimit: 3000 + 1750 * $THREADS$ BenchmarkResult: 8 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(GetBlockingVal throughput\)) TestName: testam-par AppArgs: -sync-req -p 1 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel FileLimit: 16000 + 15500 * $THREADS$ BenchmarkResult: AMShort ping-pong, roundtrip latency\s+:\s+\S+ sec\s+(\S+) (us) #KnownFailure: run-all ; cpu_x86_64 && network_elan ; bug1444 (elan exceptions on elan4/Opteron mu & hive) WarningFilter: cc_clang ; .*? warning: self-comparison always evaluates to false .*? KnownFailure: run-crash ; os_openbsd ; Bug 4087 - Intermittent {testam,testbarrierconf_{p,tp}}-par crash-at-exit on OpenBSD TestName: testam_async-par AppArgs: -async-req -p 1 FileLimit: 16000 + 15500 * $THREADS$ BenchmarkResult: max:\n.* AMMedium\s+flood\s+one-way\s+Req\s+:.*us\s+(\S+) (MB/s) WarningFilter: cc_clang ; .*? warning: self-comparison always evaluates to false .*? TestName: testcore1-par AppArgs: 1000 TestName: testcore2-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel # bug955 - firehose mishandles free (see bug 3989, including for why this may not be effective): AppEnv: network_ibv && cpu_32 ; GASNET_DISABLE_MUNMAP=1 AppArgs: network_ibv && cpu_32 ; -m # Only Medium, since ref NPAM Long tickles bug 955/3989 # Avoid triggering kernel OOM-killer on 32-bit MIPS Malta AppArgs: (_threads > 1) && malta && cpu_32; 0 524288 KnownFailure: run-all ; nodebug && cc_sun && os_solaris && cpu_sparc && cpu_32 ; Bug 4207 - testcore2 failure on EX-solaris_sparc32-smp-cc-pshm-opt TestName: testcore3-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testcore4-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel #KnownFailure: compile-failure ; cc_pgi ; bug2796 (testcore4 compilation failure w/ PGI compiler) TestName: testcore5-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testtoken-par TimeLimit: $DEFAULT$ TestName: testbarrier-par AppArgs: -p 1 BenchmarkResult: Avg Named Barrier latency:\s+(\S+) (us) TestName: testlogGP-par AppArgs: 1000 0 8 65536 FileLimit: 1250 + 1600 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters,\s+\S+ us difference =\s+(\S+) (us/msg \(get: o_i - GetNB\)) MakeFlags: cc_cray ; MANUAL_CFLAGS=-hnomessage=3140 # bug 3847: hide a warning about delay.o TestName: testvis-par AppEnv: GASNET_VIS_AMPIPE=0 GASNET_VIS_REMOTECONTIG=0 AppArgs: 50 #KnownFailure: run-crash ; os_bgq && debug; Bug 3819 - testvis out-of-memory failures on BG/Q TestName: testvis_pack-par AppEnv: GASNET_VIS_AMPIPE=1 GASNET_VIS_REMOTECONTIG=1 AppEnv: network_ibv && cpu_32 ; GASNET_DISABLE_MUNMAP=1 # bug955 - firehose mishandles free AppArgs: 50 ProhibitFeature: network_smp TestName: testvisperf-par AppArgs: -maxdata 131072 -maxcontig 512 10 FileLimit: 10000 + 5500 * $THREADS$ TestName: testmisc-par BenchmarkResult: Do-nothing gasnet_AMPoll\(\)\s+:\s+\S+ sec\s+(\S+) (us/iter) DynamicThreads: 1 #KnownFailure: run-all ; cc_sun && cpu_sparc ; bug 1417 (Solaris 2.10/SunC 5.8 fails testmisc-par with -g) #KnownFailure: run-crash ; cc_gnu && os_darwin && nodebug ; Bug 3080 - testmisc failures w/ Apple XCode TestName: testalign-par AppArgs: 100 FileLimit: 1400 + 6350 * $THREADS$ BenchmarkResult: byte\s+4 byte aligned :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(GetNB throughput\)) TestName: testrand-par BenchmarkResult: Timer granularity: .. \S+ us, overhead: . (\S+) (us) AppArgs: 1024 TestName: testbarrierconf-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testbarrierconf_t-par AppArgs: -t DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TestName: testbarrierconf_p-par AppArgs: -p 1 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel KnownFailure: run-crash ; os_openbsd ; Bug 4087 - Intermittent {testam,testbarrierconf_{p,tp}}-par crash-at-exit on OpenBSD TestName: testbarrierconf_tp-par AppArgs: -t -p 1 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel KnownFailure: run-crash ; os_openbsd ; Bug 4087 - Intermittent {testam,testbarrierconf_{p,tp}}-par crash-at-exit on OpenBSD TestName: testbarrierlate-par BenchmarkResult: Late wait\(\) Anon. Barrier net latency, average:\s+(\S+) (us) MakeFlags: cc_cray ; MANUAL_CFLAGS=-hnomessage=3140 # bug 3847: hide a warning about delay.o # Typically overcommits CPUs by a factor of 2, so reduce iters TestName: testcoll-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel AppArgs: 200 # Conduits using alloca() work-around bug 2079 #KnownFailure: run-all ; cc_pgi && cpu_x86_64 ; Bug 2079 - "stack overflow" w/ PGI TestName: testcoll_p-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel AppArgs: -p 1 200 1 # One active thread and one polling thread KnownFailure: run-all ; os_openbsd ; takes one hour to run to completion (and may take a SIGKILL to actually die) TestName: testnbr-par TimeLimit: 3 * $DEFAULT$ TestName: testqueue-par DynamicThreads: $DEFAULT$ FileLimit: 15500 + 11100 * $THREADS$ AppArgs: 1 256 262144 WarningFilter: cc_pathscale && nodebug; 'WARNING.*?number of phis is too big.*?' TestName: testhsl-par AppArgs: 0 WarningFilter: cc_xlc; '.*? 1500-010: .*?' # Infinite loop in main() #KnownFailure: compile-failure ; cc_pgi && cpu_powerpc64le && debug ; EXTERNAL: Bug 3380 - pgcc 16.10 Community Edition for OpenPower ICE building libgasnet (Fixed at or before 17.4) #KnownFailure: run-time ; cc_sparc64 ; Bug 3864 - testhsl-par hangs on SPARC64 TestName: testtools-par DynamicThreads: 1 # avoid false negatives when num_pthreads < num_threads SaveOutput: 1 # bug 3337: CPU timers are inaccurate in a virtualized environment, # where tsc register is virtualized. Disable that test and retain others. # Real users on KVM/QEMU/etc. should configure --enable-force-gettimeofday AppEnv: qemu || kvm ; GASNET_TEST_TIME_SLACK=300 #KnownFailure: run-limit ; os_bgq && cc_xlc && nodebug ; word-tearing w/ xlc on BG/Q # The nightly irun_cross_compiler tester avoids bugs 3019 and 1712 #KnownFailure: run-exit ; rosetta ; Bug 3019 - testtools is faked as mpi-conduit, which is not available #KnownFailure: run-match ; rosetta ; Bug 1712 - timer and atomics inaccuracy with PPC binaries on MacIntel # Filter away two known warnings under AIX due to bug 2554 WarningFilter: os_aix; ld: 0711-224 WARNING: Duplicate symbol: gasnett_backtrace_user.*? WarningFilter: os_aix; ld: 0711-341 WARNING: Replaced XTY_CM symbol gasnett_backtrace_user.*? TestName: testtoolscxx-par DynamicThreads: 1 # avoid false negatives when num_pthreads < num_threads SaveOutput: 1 RequireFeature: gasnet_has_udp,gasnet_has_par AppEnv: qemu || kvm ; GASNET_TEST_TIME_SLACK=300 #KnownFailure: run-limit ; os_bgq && cc_xlc && nodebug ; word-tearing w/ xlc on BG/Q #KnownFailure: compile-crash ; cc_pgi ; EXTERNAL: Bug 3757 - pgc++-18.x ICE on test(legacy)cxx and testtoolscxx-par TestName: testslice-par TestName: testslice_foreign-par AppArgs: -c -f ProcPerNode: 2 # interesting failure modes depend on multiple ppn DynamicThreads: 4,$DEFAULT$ KnownFailure: run-crash ; network_ofi && ofi_cxi_provider && pshm_xpmem ; Bug 4750 - ofi/cxi fails dynamic registration of "other segment" with xpmem TestName: testcollperf-par AppArgs: (_threads <= 4) ; -szfactor 4 16384 2 25 0 AppArgs: (_threads > 4 && _threads <= 8) ; -szfactor 4 16384 2 10 0 AppArgs: (_threads > 8) ; -szfactor 4 16384 2 2 0 AppEnv: GASNET_TEST_THREAD_LIMIT=2 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TimeLimit: 8 * $DEFAULT$ # Conduits using alloca() work-around bug 2079 #KnownFailure: run-all ; cc_pgi && cpu_x86_64 ; Bug 2079 - "stack overflow" w/ PGI TestName: testcollperf_src_out-par AppArgs: (_threads <= 4) ; -src-out -szfactor 4 16384 2 5 0 AppArgs: (_threads > 4 && _threads <= 8) ; -src-out -szfactor 4 16384 2 2 0 AppArgs: (_threads > 8) ; -src-out -szfactor 4 16384 2 1 0 AppEnv: GASNET_TEST_THREAD_LIMIT=2 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TimeLimit: 8 * $DEFAULT$ TestName: testcollperf_dst_out-par AppArgs: (_threads <= 4) ; -dst-out -szfactor 4 16384 2 5 0 AppArgs: (_threads > 4 && _threads <= 8) ; -dst-out -szfactor 4 16384 2 2 0 AppArgs: (_threads > 8) ; -dst-out -szfactor 4 16384 2 1 0 AppEnv: GASNET_TEST_THREAD_LIMIT=2 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TimeLimit: 8 * $DEFAULT$ TestName: testcollperf_both_out-par AppArgs: (_threads <= 4) ; -src-out -dst-out -szfactor 4 16384 2 5 0 AppArgs: (_threads > 4 && _threads <= 8) ; -src-out -dst-out -szfactor 4 16384 2 2 0 AppArgs: (_threads > 8) ; -src-out -dst-out -szfactor 4 16384 2 1 0 AppEnv: GASNET_TEST_THREAD_LIMIT=2 DynamicThreads: 1,$DEFAULT$ # test loopback and parallel TimeLimit: 8 * $DEFAULT$ TestName: testteam-par TestName: testteambarrier-par TimeLimit: 2 * $DEFAULT$ AppEnv: GASNET_TEST_THREAD_LIMIT=2 TestName: testteambcast-par FileLimit: 2400 + 2500 * $THREADS$ TestName: testreduce-par TestName: testreduce_p-par AppArgs: -p 1 TestName: testreduce_single-par AppArgs: 0 1 TestName: testreduce_medium-par AppArgs: 100 512 TestName: testreduce_large-par AppArgs: 50 1024 AppEnv: GASNET_COLL_SCRATCH_SIZE=2K TestName: testreduce_bug4361-par AppEnv: GASNET_COLL_P2P_EAGER_SCALE=4 DynamicThreads: 9 TestName: testratomic-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel CompileTimeLimit: 2 * $DEFAULT$ #KnownFailure: compile-failure ; cc_sun && debug ; Bug 3729 - testratomic crashes sun 12.6 compiler in debug #KnownFailure: run-match ; (cc_clang || cc_pgi) && cpu_powerpc64le && nodebug ; Bug 3742 - testratomic failure with pgi and clang on ppc64el ProhibitFeature: os_solaris && cc_sun # compiler crashes - not worth the wallclock time TestName: testfaddperf-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel FileLimit: 2200 + 1200 * $THREADS$ BenchmarkResult: total,\s+(\S+) (us ave\. \(U32 FADD latency\)) TestName: testfaddperf_S-par FileLimit: 1200 + 2000 * $THREADS$ BenchmarkResult: iters, throughput\s+(\S+) (ops/sec \(U32 FADD throughput\)) AppArgs: -S TestName: testimm-par AppArgs: (network_udp || network_mpi); 5000 # Just half the iters for reference conduits TestName: testacc-par ProcPerNode: 2 # many failure modes depend on multiple ppn # AppArgs are ADDITIVE. So only one of these should ever be permitted to match AppArgs: (network_udp || network_mpi); 50000 AppArgs: network_smp ; 1000000 TestName: testsegment-par AppArgs: -random-seg TestName: testtmpair-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel #KnownFailure: run-all ; ibv_dynamic_connect ; Bug 4196 - ibv: dynamic connect does not support multiple endpoints TestName: testreadonly-par #KnownFailure: run-all ; network_ibv ; Bug 3338 - ibv_reg_mr failure (EFAULT/Bad address) on read-only data #KnownFailure: run-all ; network_ibv && ibv_odp ; Bug 4008 - testreadonly failure with ibv/odp KnownFailure: run-all ; network_ucx ; Bug 4046 - testreadonly failure with ucx KnownFailure: run-all ; network_ibv && os_solaris ; Bug 4009 - testreadonly failure with ibv on Solaris KnownFailure: run-all ; network_ofi && ofi_verbs_provider ; Bug 4420 - testreadonly failure with ofi/verbs KnownFailure: run-all ; network_ofi && ofi_cxi_provider ; Bug 4503 - testreadonly failure with ofi/cxi TestName: testalltoall-par AppArgs: -progress AppEnv: ofi_cxi_provider ; GASNET_OFI_RECEIVE_BUFF_SIZE=recv # work around bug 4461 TestName: testprogthr-par # CUDA_UVA memory kind testing # Intentionally runs even w/o "kind_cuda_uva" feature TestName: testcudauva-par BenchmarkResult: node 0/.*? cuDeviceGetCount reports (\d+) (devices) TestName: testcudauva_gseg-par RequireFeature: kind_cuda_uva AppArgs: -gasnet-seg TestName: testsmall_cuda_uva_gg-par RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-gpu -remote-gpu AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(GetBlocking latency\)) TestName: testsmall_cuda_uva_gh-par RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-gpu -remote-host AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(GetBlocking latency\)) TestName: testsmall_cuda_uva_hg-par RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-host -remote-gpu FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(GetBlocking latency\)) TestName: testlarge_cuda_uva_gg-par RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-gpu -remote-gpu 100 2097152 AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(GetNB throughput\)) TestName: testlarge_cuda_uva_gh-par RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-gpu -remote-host 100 2097152 AppEnv: has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 AppEnv: has_bug_4494 ; FI_VERBS_INLINE_SIZE=0 AppEnv: has_bug_4554 ; FI_HMEM_CUDA_USE_GDRCOPY=no FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(GetNB throughput\)) TestName: testlarge_cuda_uva_hg-par RequireFeature: kind_cuda_uva AppArgs: -cuda-uva -local-host -remote-gpu 100 2097152 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(GetNB throughput\)) # HIP memory kind testing # Note that HIP-based tests are susceptible to some bugs normally associated # with kind_cuda_uva when using HIP on an Nvidia GPU. # Intentionally runs even w/o "kind_hip" feature TestName: testhip-par BenchmarkResult: node 0/.*? hipGetDeviceCount reports (\d+) (devices) MakeFlags: cc_gnu ; MANUAL_CFLAGS="-Wno-inline" # multiple inlining warnings in hip_runtime_api.h TestName: testhip_gseg-par RequireFeature: kind_hip MakeFlags: cc_gnu ; MANUAL_CFLAGS="-Wno-inline" # multiple inlining warnings in hip_runtime_api.h AppArgs: -gasnet-seg TestName: testsmall_hip_gg-par RequireFeature: kind_hip AppArgs: -hip -local-gpu -remote-gpu AppEnv: hip_platform_nvidia && has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: hip_platform_nvidia && has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(GetBlocking latency\)) TestName: testsmall_hip_gh-par RequireFeature: kind_hip AppArgs: -hip -local-gpu -remote-host AppEnv: hip_platform_nvidia && has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: hip_platform_nvidia && has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(GetBlocking latency\)) TestName: testsmall_hip_hg-par RequireFeature: kind_hip AppArgs: -hip -local-host -remote-gpu FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(GetBlocking latency\)) TestName: testlarge_hip_gg-par RequireFeature: kind_hip AppArgs: -hip -local-gpu -remote-gpu 100 2097152 AppEnv: hip_platform_nvidia && has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: hip_platform_nvidia && has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(GetNB throughput\)) TestName: testlarge_hip_gh-par RequireFeature: kind_hip AppArgs: -hip -local-gpu -remote-host 100 2097152 AppEnv: hip_platform_nvidia && has_bug_4151 ; MLX5_SCATTER_TO_CQE=0 AppEnv: hip_platform_nvidia && has_bug_4384 ; UCX_IB_TX_INLINE_RESP=0 UCX_ZCOPY_THRESH=0 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(GetNB throughput\)) TestName: testlarge_hip_hg-par RequireFeature: kind_hip AppArgs: -hip -local-host -remote-gpu 100 2097152 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(GetNB throughput\)) # ZE memory kind testing # NOTE: testlarge is currently capped at 32786 bytes instead of 2097152 # Intentionally runs even w/o "kind_ze" feature TestName: testze-par BenchmarkResult: node 0/.*? device enumeration found (\d+) (GPU devices) TestName: testze_gseg-par RequireFeature: kind_ze AppArgs: -gasnet-seg TestName: testsmall_ze_gg-par RequireFeature: kind_ze AppArgs: -ze -local-gpu -remote-gpu FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(GetBlocking latency\)) TestName: testsmall_ze_gh-par RequireFeature: kind_ze AppArgs: -ze -local-gpu -remote-host FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(GetBlocking latency\)) TestName: testsmall_ze_hg-par RequireFeature: kind_ze AppArgs: -ze -local-host -remote-gpu FileLimit: 9000 + 7350 * $THREADS$ BenchmarkResult: -\s+8 byte :\s+\S+ iters, latency\s+\S+ us total,\s+(\S+) (us ave. \(GetBlocking latency\)) TestName: testlarge_ze_gg-par RequireFeature: kind_ze AppArgs: -ze -local-gpu -remote-gpu 100 2097152 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) TestName: testlarge_ze_gh-par RequireFeature: kind_ze AppArgs: -ze -local-gpu -remote-host 100 2097152 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) TestName: testlarge_ze_hg-par RequireFeature: kind_ze AppArgs: -ze -local-host -remote-gpu 100 2097152 FileLimit: 6400 + 7100 * $THREADS$ BenchmarkResult: 2097152 byte :\s+\S+ iters, throughput\s+(\S+) (KB/sec \(PutNB\+DEFER throughput\)) # Minimal tests of MPI interoperability # See comments in the corresponding -seq section TestName: testmpi_init_gfirst-par RequireFeature: mpi_compat AppEnv: GASNET_MPI_THREAD=multiple AppEnv: mpi_compat_mpi_spawner ; GASNET_IBV_SPAWNER=mpi GASNET_OFI_SPAWNER=mpi GASNET_UCX_SPAWNER=mpi RunCmd: mpi_compat_mpirun ; mpirun -np %N %P %A TestName: testmpi_init_mfirst-par RequireFeature: mpi_compat MakeFlags: MANUAL_DEFINES="-DTEST_INIT_MPI_FIRST !MANUAL_DEFINES!" AppEnv: network_aries ; GASNET_GNI_MEMREG=256 # see bug 4639 AppEnv: mpi_compat_mpi_spawner ; GASNET_IBV_SPAWNER=mpi GASNET_OFI_SPAWNER=mpi GASNET_UCX_SPAWNER=mpi RunCmd: mpi_compat_mpirun ; mpirun -np %N %P %A # minimal test for working on-demand backtrace TestName: testexit_bt-par AppArgs: 300 2 PassExpr: do_crash_test FailExpr: backtrace failed ProhibitFeature: missing_backtrace TimeLimit: 300 MakeFlags: cc_pgi && os_darwin ; KEEPTMPS=1 # debugger needs testexit.o KnownFailure: run-match ; nodebug ; Debug symbols unreliable in opt mode # do NOT add more known failures here - use -add_feature=missing_backtrace instead to avoid potential timeouts WarningFilter: cc_xlc; '.*? 1500-010: .*?' # Infinite loop in main() # test backtrace from a SIGABRT TestName: testexit_bt_abort-par AppArgs: 303 2 AppEnv: GASNET_BACKTRACE=1 PassExpr: do_crash_test FailExpr: backtrace failed RunCmd: ./crash-filter $UPCRUN_CMD$ # Prohibit cygwin due to bug3856: signals are unreliable on cygwin/PAR and lead to zombies # Prohibit solaris+ibv due to bug3895: CQ leak ProhibitFeature: missing_backtrace || os_cygwin || (os_solaris && network_ibv) TimeLimit: 300 MakeFlags: cc_pgi && os_darwin ; KEEPTMPS=1 # debugger needs testexit.o KnownFailure: run-match ; nodebug ; Debug symbols unreliable in opt mode KnownFailure: run-match ; cpu_sparc64 ; Sparc64 cannot backtrace out of signal context KnownFailure: run-match ; cpu_mips64 && cpu_64 ; MIPS LP64 ABI backtrace breaks at libc boundary (broken gdb?) KnownFailure: run-match ; os_netbsd ; Bug 4047 - Cannot backtrace across signals in NetBSD 9 KnownFailure: run-match ; os_solaris && cpu_x86_64 ; Cannot backtrace across signals in Solaris / x86_64 KnownFailure: run-match ; os_openbsd ; Cannot backtrace across signals in OpenBSD 7 KnownFailure: run-match ; cpu_powerpc64 && cc_gnu ; Cannot backtrace across signals in PPC64-BE + GCC KnownFailure: run-match ; trans_gupc ; Cannot backtrace across signals in GCC/UPC # No KnownFailures for zombies or hung debuggers. -add_feature=missing_backtrace instead WarningFilter: cc_xlc; '.*? 1500-010: .*?' # Infinite loop in main() # ------------------------------------------ # PAR-only tests TestName: testthreads-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel AppArgs: 2 TestName: testthreads_wide-par DynamicThreads: 1,$DEFAULT$ # test loopback and parallel AppArgs: -i 10 # conditional AppArgs and AppEnv are additive: AppArgs: !(testthreads_500 || testthreads_1000 || testthreads_2000) ; 255 AppEnv: testthreads_500 ; GASNET_MAX_THREADS=512 AppArgs: testthreads_500 ; 500 AppEnv: testthreads_1000 ; GASNET_MAX_THREADS=1024 AppArgs: testthreads_1000 ; 1000 AppEnv: testthreads_2000 ; GASNET_MAX_THREADS=2048 AppArgs: testthreads_2000 ; 2000 FileLimit: 4096 * $THREADS$ + 100 * $THREADS$ * 2000 TestName: testcontend-par AppEnv: GASNET_TEST_POLITE_SYNC=0 TimeLimit: 3 * $DEFAULT$ FileLimit: 6900 + 4290 * $THREADS$ # ------------------------------------------ # PARSYNC tests # Build parysync lib, fitering all known warnings (compile only) TestName: parsync CompileTimeLimit: 2 * $DEFAULT$ TimeLimit: 0 #KnownFailure: compile-warning ; ; bug 2148 (parsync gasnet tests cause harness failures) #WarningFilter: cc_gnu && nodebug && ( cpu_mips || cpu_mipsel || cpu_mips64 || cpu_mips64el || cpu_powerpc64 ); '.*?gasnet_mmap.*?ret. may be used uninitialized.*?' # bug 4227 # Filter away harmless inliner warnings (gcc 4.7+) WarningFilter: cc_gnu; .*?-Winline.*? # Filter away apparent bug in gcc-llvm WarningFilter: cc_gnu; .*?gasnet_bootstrap_ssh.*? warning: missing sentinel in function call.*? # Filter away warning on bad code from OFED WarningFilter: cc_intel; '.*?/verbs\.h.*?: warning \04361: .*?' # Harmless warnings about vargs function pointers, additionally "error" makes harness thing compiler failed WarningFilter: cc_cray; 'CC-3185 .*?' WarningFilter: cc_cray; '.*?When resolving pointer function "gasneti_fatalerror".*?' WarningFilter: cc_cray && nodebug ; 'CC-7212.*?gasnet.pshm.c.*?\n?.*?"the_sd".*?' # bug 3721 WarningFilter: cc_cray && nodebug ; 'CC-7212.*?gasnet_core.c.*?\n?.*?"the_sd".*?' # bug 3721 # Compilers get too smart analyzing gasnete_eopaddr_isnil(EOPADDR_NIL) WarningFilter: cc_gnu || cc_clang; .*?gasnet_extended.*? warning: self-comparison always evaluates to true .*? # Warning due to conflict with cloned portable_platform.h in vendor-provided Open MPI WarningFilter: os_solaris && cc_sun ; .*?mpi_portable_platform.*?warning: macro redefined: PLATFORM_.*? # Filter "may be used uninitialized" warnings due to weaknesses in gcc-4.4.7 on BG/Q # However, by design this filter will *not* match occurrences in the pami-conduit directory #WarningFilter: os_bgq && cc_gnu; '.*?(? * Terms of use are as specified in license.txt */ #include #include #ifndef PERFORM_MIXED_NAMED_ANON_TESTS #define PERFORM_MIXED_NAMED_ANON_TESTS 1 #endif #ifndef TEST_UNNAMED_BARRIER #define TEST_UNNAMED_BARRIER 1 #endif static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int mynode, nodes, iters = 0; static int do_try = 0; static int do_block = 0; static int blocking_result = 0; GASNETT_INLINE(my_barrier_notify) void my_barrier_notify(int value, int flags) { int rc; if (do_block) { blocking_result = gasnet_barrier(value, flags); } else { gasnet_barrier_notify(value, flags); } } GASNETT_INLINE(my_barrier_wait) int my_barrier_wait(int value, int flags) { int rc; if (do_try) { do { rc = gasnet_barrier_try(value, flags); } while (rc == GASNET_ERR_NOT_READY); } else if (do_block) { rc = blocking_result; } else { rc = gasnet_barrier_wait(value, flags); } return rc; } #define hidx_done_shorthandler 200 volatile int done = 0; void done_shorthandler(gex_Token_t token) { done = 1; } gex_AM_Entry_t htable[] = { { hidx_done_shorthandler, (gex_AM_Fn_t)done_shorthandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0, NULL, NULL } }; static void * doTest(void *); int main(int argc, char **argv) { const char *kind = ""; int pollers = 0; int arg = 1; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testbarrier", &argc, &argv, 0)); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, 1)); #if GASNET_PAR test_init("testbarrier", 1, "[-t] [-p polling_threads] (iters)\n" " The -p option gives a number of polling threads to spawn (default is 0).\n" " The -b option replaces barrier_notify calls with blocking barrier calls\n" " The -t option replaces barrier_wait calls with looping on barrier_try"); #else test_init("testbarrier", 1, "[-t] (iters)\n" " The -b option replaces barrier_notify calls with blocking barrier calls\n" " The -t option replaces barrier_wait calls with looping on barrier_try"); #endif mynode = gex_TM_QueryRank(myteam); nodes = gex_TM_QuerySize(myteam); while (argc-arg >= 1) { if (!strcmp(argv[arg], "-p")) { #if GASNET_PAR pollers = test_thread_limit(atoi(argv[arg+1])+1)-1; arg += 2; #else if (mynode == 0) { fprintf(stderr, "testbarrier %s\n", GASNET_CONFIG_STRING); fprintf(stderr, "ERROR: The -p option is only available in the PAR configuration.\n"); fflush(NULL); } sleep(1); gasnet_exit(1); #endif } else if (!strcmp(argv[arg], "-t")) { do_try = 1; kind = " polling"; arg += 1; } else if (!strcmp(argv[arg], "-b")) { do_block = 1; kind = " blocking"; arg += 1; } else break; } if (argc-arg >= 1) iters = atoi(argv[arg]); if (!iters) iters = 10000; if (argc-arg >= 2) test_usage(); if (do_try && do_block) { if (!mynode) fprintf(stderr, "ERROR: The -b and -t options are mutually exclusive.\n"); gasnet_exit(1); } #if !defined(GASNET_PAR) MSG0("Running%s barrier test with %i iterations...\n",kind,iters); #else MSG0("Running%s barrier test with %i iterations and %i extra polling threads...\n",kind,iters,pollers); TEST_SET_WAITMODE(pollers+1); if (pollers) test_createandjoin_pthreads(pollers+1,doTest,NULL,0); else #endif doTest(NULL); BARRIER(); MSG("done."); gasnet_exit(0); return 0; } static void * doTest(void *arg) { int warmups = MIN(100, iters/100); int64_t start,total; int result; int i = 0; if (arg) { /* I am a polling thread */ GASNET_BLOCKUNTIL(done); return NULL; } /* Warmup Named */ for (i=0; i < warmups; i++) { my_barrier_notify(i, 0); GASNET_Safe(my_barrier_wait(i, 0)); assert_always(!gasnet_barrier_result(&result)); } BARRIER(); start = TIME(); for (i=0; i < iters; i++) { my_barrier_notify(i, 0); GASNET_Safe(my_barrier_wait(i, 0)); } total = TIME() - start; BARRIER(); if (mynode == 0) { printf("Total time: %8.3f sec Avg Named Barrier latency: %8.3f us\n", ((float)total)/1000000, ((float)total)/iters); fflush(stdout); } BARRIER(); /* Warmup Anonymous */ for (i=0; i < warmups; i++) { my_barrier_notify(0, GASNET_BARRIERFLAG_ANONYMOUS); GASNET_Safe(my_barrier_wait(0, GASNET_BARRIERFLAG_ANONYMOUS)); assert_always(gasnet_barrier_result(&result)); } BARRIER(); start = TIME(); for (i=0; i < iters; i++) { my_barrier_notify(0, GASNET_BARRIERFLAG_ANONYMOUS); GASNET_Safe(my_barrier_wait(0, GASNET_BARRIERFLAG_ANONYMOUS)); } total = TIME() - start; BARRIER(); if (mynode == 0) { printf("Total time: %8.3f sec Avg Anon. Barrier latency: %8.3f us\n", ((float)total)/1000000, ((float)total)/iters); fflush(stdout); } BARRIER(); if (!PERFORM_MIXED_NAMED_ANON_TESTS) { if (mynode == 0) { MSG("WARNING: skipping tests which mix named and anonymous barriers, " "which are known to fail in this configuration"); } } else { int parity = (mynode & 1); /* Warmup Mixed */ for (i=0; i < warmups; i++, parity ^= 1) { int value = parity ? iters : 0; int flags = parity ? 0 : GASNET_BARRIERFLAG_ANONYMOUS; my_barrier_notify(value, flags); GASNET_Safe(my_barrier_wait(value, flags)); assert_always(!gasnet_barrier_result(&result) || (nodes == 1)); } BARRIER(); start = TIME(); for (i=0; i < iters; i++, parity ^= 1) { int value = parity ? iters : 0; int flags = parity ? 0 : GASNET_BARRIERFLAG_ANONYMOUS; my_barrier_notify(value, flags); GASNET_Safe(my_barrier_wait(value, flags)); } total = TIME() - start; BARRIER(); if (mynode == 0) { printf("Total time: %8.3f sec Avg Mixed Barrier latency: %8.3f us\n", ((float)total)/1000000, ((float)total)/iters); fflush(stdout); } } BARRIER(); #if TEST_UNNAMED_BARRIER /* Warmup Unnamed */ for (i=0; i < warmups; i++) { my_barrier_notify(0, GASNET_BARRIERFLAG_UNNAMED); GASNET_Safe(my_barrier_wait(0, GASNET_BARRIERFLAG_UNNAMED)); assert_always(gasnet_barrier_result(&result)); } BARRIER(); start = TIME(); for (i=0; i < iters; i++) { my_barrier_notify(0, GASNET_BARRIERFLAG_UNNAMED); GASNET_Safe(my_barrier_wait(0, GASNET_BARRIERFLAG_UNNAMED)); } total = TIME() - start; BARRIER(); if (mynode == 0) { printf("Total time: %8.3f sec Avg Uname Barrier latency: %8.3f us\n", ((float)total)/1000000, ((float)total)/iters); fflush(stdout); } BARRIER(); #endif // gex_Coll_BarrierBlocking: (undcoumented) for (i=0; i < warmups; i++) { gex_Coll_BarrierBlocking(myteam,0); } BARRIER(); start = TIME(); for (i=0; i < iters; i++) { gex_Coll_BarrierBlocking(myteam,0); } total = TIME() - start; BARRIER(); if (mynode == 0) { printf("Total time: %8.3f sec Avg GEX Blocking Barrier latency: %8.3f us\n", ((float)total)/1000000, ((float)total)/iters); fflush(stdout); } BARRIER(); // gex_Coll_BarrierNB: for (i=0; i < warmups; i++) { gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); } BARRIER(); start = TIME(); for (i=0; i < iters; i++) { gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); } total = TIME() - start; BARRIER(); if (mynode == 0) { printf("Total time: %8.3f sec Avg GEX NB Barrier latency: %8.3f us\n", ((float)total)/1000000, ((float)total)/iters); fflush(stdout); } BARRIER(); gex_AM_RequestShort0(myteam, mynode, hidx_done_shorthandler, 0); return NULL; } gasnet-2025.8.0/tests/testvisperf.c0000664000175000017500000005311215142313673017310 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testvisperf.c $ * Description: GASNet VIS performance test * Copyright 2006 Dan Bonachea * Terms of use are as specified in license.txt */ #include #include "gasnet_vis.h" uintptr_t maxsz = 0; size_t areasz = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR (maxsz) #endif #include "test.h" static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int insegment = 1; int doputs = 1; int dogets = 1; int doNB = 0; int remotecontig = 0; int localcontig = 0; size_t stridelevels = 2; int myproc; int numprocs; int peerproc = -1; int iamsender = 0; void *Lbase, *Rbase; gex_Event_t *evts = NULL; size_t evtcnt = 0; size_t min_payload = 0, max_payload = 0; size_t min_contig = 0, max_contig = 0; double contigfactor = 8; double datafactor = 2; int densitysteps = 4; typedef enum { TEST_V=0, TEST_I=1, TEST_S=2 } test_vis_t; int dovis[] = { 1, 1, 1 }; const char *visdesc[] = { "VECTOR", "INDEXED", "STRIDED" }; gex_Memvec_t *make_vlist(void *baseaddr, size_t stride, size_t cnt, size_t chunksz) { gex_Memvec_t *retval = test_malloc(cnt*sizeof(gex_Memvec_t)); if (cnt > 1) assert(stride >= chunksz); for (size_t i = 0; i < cnt; i++) { retval[i].gex_addr = ((char*)baseaddr)+i*stride; retval[i].gex_len = chunksz; } return retval; } void * *make_ilist(void *baseaddr, size_t stride, size_t cnt, size_t chunksz) { void * *retval = test_malloc(cnt*sizeof(void *)); if (cnt > 1) assert(stride >= chunksz); for (size_t i = 0; i < cnt; i++) { retval[i] = ((char*)baseaddr)+i*stride; } return retval; } int main(int argc, char **argv) { long iters = 0; int arg; void *alloc = NULL; int firstlastmode = 0; int fullduplexmode = 0; int crossmachinemode = 0; int singlesender = 0; int help = 0; /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testvisperf", &argc, &argv, 0)); /* parse arguments */ arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-in")) { insegment = 1; ++arg; } else if (!strcmp(argv[arg], "-out")) { insegment = 0; ++arg; } else if (!strcmp(argv[arg], "-sl")) { ++arg; if (argc > arg) { stridelevels = atol(argv[arg]); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-mincontig")) { ++arg; if (argc > arg) { min_contig = atol(argv[arg]); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-maxcontig")) { ++arg; if (argc > arg) { max_contig = atol(argv[arg]); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-contigfactor")) { ++arg; if (argc > arg) { contigfactor = atof(argv[arg]); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-mindata")) { ++arg; if (argc > arg) { min_payload = atol(argv[arg]); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-maxdata")) { ++arg; if (argc > arg) { max_payload = atol(argv[arg]); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-datafactor")) { ++arg; if (argc > arg) { datafactor = atof(argv[arg]); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-densitysteps")) { ++arg; if (argc > arg) { densitysteps = atoi(argv[arg]); arg++; } else help = 1; } else if (!strcmp(argv[arg], "-f")) { firstlastmode = 1; ++arg; } else if (!strcmp(argv[arg], "-c")) { crossmachinemode = 1; ++arg; } else if (!strcmp(argv[arg], "-a")) { fullduplexmode = 1; ++arg; } else if (!strcmp(argv[arg], "-p")) { dogets = 0; doputs = 1; ++arg; } else if (!strcmp(argv[arg], "-g")) { dogets = 1; doputs = 0; ++arg; } else if (!strcmp(argv[arg], "-r")) { remotecontig = 1; ++arg; } else if (!strcmp(argv[arg], "-l")) { localcontig = 1; ++arg; } else if (!strcmp(argv[arg], "-nb")) { doNB = 1; ++arg; } else if (!strcmp(argv[arg], "-nbi")) { doNB = 0; ++arg; } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } const char *iterstr = "0.1"; // default iters if (argc > arg) { iterstr = argv[arg]; arg++; } if (argc > arg) { TEST_SECTION_PARSE(argv[arg]); arg++; } if (min_contig && max_contig && min_contig > max_contig) { ERR("min_contig > max_contig"); help = 1; } if (min_payload && max_payload && min_payload > max_payload) { ERR("min_payload > max_payload"); help = 1; } if (min_payload && min_contig && min_payload < min_contig) { ERR("min_payload < min_contig"); help = 1; } if (max_contig && max_payload && max_contig > max_payload) { ERR("max_contig > max_payload"); help = 1; } if (contigfactor <= 1) { ERR("contigfactor <= 1"); help = 1; } if (datafactor <= 1) { ERR("datafactor <= 1"); help = 1; } if (!max_payload) max_payload = 2*1024*1024; /* 2 MB default */ areasz = gasnet_getMaxGlobalSegmentSize(); if (insegment) areasz = aligndown(areasz/2,PAGESZ); max_payload = MIN(areasz, max_payload); areasz = aligndown(MIN(max_payload * densitysteps,areasz),PAGESZ); if (insegment) maxsz = areasz*2; else maxsz = areasz; if (!min_contig) min_contig = 8; if (!max_contig) max_contig = MIN(256*1024,max_payload); if (!min_payload) min_payload = min_contig; GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); test_init("testvisperf",1, "[options] (iters) (test_sections)\n" " -p/-g selects puts only or gets only (default is both).\n" " -r/-l selects remotely contiguous or locally contiguous (default is neither).\n" " -mindata/-maxdata \n" " selects sz as min/max data payload per operation.\n" " -mincontig/-maxcontig \n" " selects sz as min/max contig size.\n" " -datafactor/-contigfactor \n" " selects f as growth factor for data/contig sizes.\n" " -densitysteps \n" " selects d density steps, inclusive from 100%..100/d%\n" " -sl selects n striding levels (default is 2).\n" " -in/-out selects whether the initiator-side\n" " memory is in the GASNet segment or not (default is in-segment).\n" " -a enables full-duplex mode, where all nodes send.\n" " -c enables cross-machine pairing, default is nearest neighbor.\n" " -f enables 'first/last' mode, where the first/last\n" " nodes communicate with each other, while all other nodes sit idle.\n" " -nbi use NBI-mode synchronization (default)\n" " -nb use NB-mode synchronization" ); if (help || argc > arg) test_usage(); /* get SPMD info */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); if (!firstlastmode) { /* Only allow 1 or even number for numprocs */ if (numprocs > 1 && numprocs % 2 != 0) { MSG0("WARNING: This test requires a unary or even number of nodes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harnesses for smp-conduit */ } } /* Setting peer thread rank */ if (firstlastmode) { peerproc = (myproc == 0 ? numprocs-1 : 0); iamsender = (fullduplexmode ? myproc == 0 || myproc == numprocs-1 : myproc == 0); } else if (numprocs == 1) { peerproc = 0; iamsender = 1; } else if (crossmachinemode) { if (myproc < numprocs / 2) { peerproc = myproc + numprocs/2; iamsender = 1; } else { peerproc = myproc - numprocs/2; iamsender = fullduplexmode; } } else { peerproc = (myproc % 2) ? (myproc - 1) : (myproc + 1); iamsender = (fullduplexmode || myproc % 2 == 0); } singlesender = (numprocs == 1) || ((numprocs == 2 || firstlastmode) && !fullduplexmode); Rbase = TEST_SEG(peerproc); if (insegment) { Lbase = (uint8_t*)TEST_SEG(myproc) + areasz; Lbase = alignup_ptr(Lbase, PAGESZ); /* ensure page alignment of base */ } else { alloc = test_calloc(areasz+PAGESZ,1); /* use calloc to prevent valgrind warnings */ Lbase = alignup_ptr(alloc, PAGESZ); /* ensure page alignment of base */ } assert(((uintptr_t)Lbase) % PAGESZ == 0); if (strchr(iterstr,'.')) TEST_ASI_INIT(iterstr); else iters = atol(iterstr); if (myproc == 0) { MSG0("Running %s iterations of %s%s%snon-contiguous put/get %s %s%s\n" " local data %s-segment for payload sizes: %" PRIuSZ "...%" PRIuSZ " (datafactor=%.2f)\n" " contig sizes: %" PRIuSZ "...%" PRIuSZ " (contigfactor=%.2f)\n" " densitysteps=%i stridelevels=%" PRIuSZ , iterstr, (firstlastmode ? "first/last " : ""), (fullduplexmode ? "full-duplex ": ""), (crossmachinemode ? "cross-machine ": ""), (doNB?"NB":"NBI"), (remotecontig?"(remotely-contiguous)":""), (localcontig?"(locally-contiguous)":""), insegment ? "in" : "out", min_payload, max_payload, datafactor, min_contig, max_contig, contigfactor, densitysteps, stridelevels); // estimate total test run time if (strchr(iterstr,'.')) { int measurements = 0; char sec = 'A'; for (test_vis_t viscat = TEST_V; viscat <= TEST_S; viscat++) { for (int isget = 0; isget < 2; isget++) { if (!strchr(test_sections,sec++) && test_sections[0]) continue; if (isget && !dogets) continue; if (!isget && !doputs) continue; if (!dovis[viscat]) continue; size_t lastcontigsz = 0; for (double rawcontigsz = min_contig; rawcontigsz <= max_contig; rawcontigsz *= contigfactor) { size_t contigsz = (size_t)rawcontigsz; if (contigsz == lastcontigsz) continue; if (contigsz > max_payload) continue; lastcontigsz = contigsz; size_t lastdatasz = 0; for (double rawdatasz = min_payload; rawdatasz <= max_payload; rawdatasz *= datafactor) { size_t datasz = aligndown((size_t)rawdatasz,contigsz); if (datasz == lastdatasz) continue; lastdatasz = datasz; for (int di = 0; di < densitysteps; di++) { measurements++; } } } } } double ttime = 2 * MAX(TEST_ASI_MININTERVAL,atof(iterstr)) * measurements; MSG0("ESTIMATED test run time: ~ %d sec (%0.1f min)",(int)ttime,ttime/60); } MSG0("rows are databytes/op : bandwidth values in MiB/s"); } BARRIER(); for (test_vis_t viscat = TEST_V; viscat <= TEST_S; viscat++) { for (int isget = 0; isget < 2; isget++) { if (TEST_SECTION_BEGIN_ENABLED()) { if (isget && !dogets) continue; if (!isget && !doputs) continue; if (!dovis[viscat]) continue; size_t lastcontigsz = 0; for (double rawcontigsz = min_contig; rawcontigsz <= max_contig; rawcontigsz *= contigfactor) { size_t contigsz = (size_t)rawcontigsz; if (contigsz == lastcontigsz) continue; if (contigsz > max_payload) continue; lastcontigsz = contigsz; TEST_ASI_NEW_TEST(); if (!myproc) { printf("\n%c: %s %s CONTIGSZ = %"PRIuSZ"\n", TEST_SECTION_NAME(), visdesc[(int)viscat], (isget?"GET":"PUT"), contigsz); printf(" density:"); for (int di = 0; di < densitysteps; di++) { printf("%8i%%", (int)((densitysteps-di)*100.0/densitysteps)); } printf("\n"); } size_t lastdatasz = 0; for (double rawdatasz = min_payload; rawdatasz <= max_payload; rawdatasz *= datafactor) { size_t datasz = aligndown((size_t)rawdatasz,contigsz); if (datasz == lastdatasz) continue; lastdatasz = datasz; char mystr[255]; if (singlesender) snprintf(mystr, sizeof(mystr), "%8"PRIuSZ": ", datasz); else snprintf(mystr, sizeof(mystr), "P%i: %6"PRIuSZ": ", myproc, datasz); for (int di = 0; di < densitysteps; di++) { gasnett_tick_t begin=0, end=0; size_t Lcnt = (localcontig ? 1 : datasz/contigsz); size_t Rcnt = (remotecontig? 1 : datasz/contigsz); size_t Lsz = datasz/Lcnt; size_t Rsz = datasz/Rcnt; void **Lilist = NULL; void **Rilist = NULL; gex_Memvec_t *Lvlist = NULL; gex_Memvec_t *Rvlist = NULL; ptrdiff_t *Lstrides = NULL; ptrdiff_t *Rstrides = NULL; size_t *_LRcount = NULL; size_t *LRcount = NULL; size_t stride = contigsz*(((double)densitysteps)/(densitysteps-di)); assert(stride >= contigsz); if (stride * MAX(Lcnt,Rcnt) > areasz) { strcat(mystr," - "); continue; } if (iamsender) { /* setup metadata */ switch (viscat) { case TEST_V: Lvlist = make_vlist(Lbase, stride, Lcnt, Lsz); Rvlist = make_vlist(Rbase, stride, Rcnt, Rsz); break; case TEST_I: Lilist = make_ilist(Lbase, stride, Lcnt, Lsz); Rilist = make_ilist(Rbase, stride, Rcnt, Rsz); break; case TEST_S: { size_t chunkcnt = datasz/contigsz; int dim; Lstrides = test_malloc(sizeof(ptrdiff_t)*stridelevels); Rstrides = test_malloc(sizeof(ptrdiff_t)*stridelevels); _LRcount = test_malloc(sizeof(size_t)*(stridelevels+1)); _LRcount[0] = contigsz; // temporary using legacy count format for convenience Lstrides[0] = (localcontig ? contigsz : stride); Rstrides[0] = (remotecontig ? contigsz : stride); for (dim = 1; dim < stridelevels; dim++) { size_t factor = 1; for (size_t fi = 1; fi <= chunkcnt/(2*(stridelevels-dim)); fi++) /* choose a reasonable factor */ if (chunkcnt/fi*fi == chunkcnt) factor = fi; _LRcount[dim] = factor; chunkcnt /= factor; Lstrides[dim] = _LRcount[dim]*Lstrides[dim-1]; Rstrides[dim] = _LRcount[dim]*Rstrides[dim-1]; } _LRcount[stridelevels] = chunkcnt; LRcount = _LRcount+1; { size_t tmp = contigsz; for (dim = 0; dim < stridelevels; dim++) tmp *= LRcount[dim]; assert(tmp == datasz); } break; } } } #define DOIT(iters) do { \ if (doNB && iters > evtcnt) { \ test_free(evts); \ evts = test_malloc(iters * sizeof(gex_Event_t)); \ evtcnt = iters; \ } \ switch (viscat) { \ case TEST_V: \ if (doNB) { \ if (isget) for (long i = 0; i < iters; i++) \ evts[i] = gex_VIS_VectorGetNB(myteam,Lcnt,Lvlist,peerproc,Rcnt,Rvlist,0);\ else for (long i = 0; i < iters; i++) \ evts[i] = gex_VIS_VectorPutNB(myteam,peerproc,Rcnt,Rvlist,Lcnt,Lvlist,0);\ } else { \ if (isget) for (long i = 0; i < iters; i++) \ gex_VIS_VectorGetNBI(myteam,Lcnt,Lvlist,peerproc,Rcnt,Rvlist,0); \ else for (long i = 0; i < iters; i++) \ gex_VIS_VectorPutNBI(myteam,peerproc,Rcnt,Rvlist,Lcnt,Lvlist,0); \ } \ break; \ case TEST_I: \ if (doNB) { \ if (isget) for (long i = 0; i < iters; i++) \ evts[i] = \ gex_VIS_IndexedGetNB(myteam,Lcnt,Lilist,Lsz,peerproc,Rcnt,Rilist,Rsz,0);\ else for (long i = 0; i < iters; i++) \ evts[i] = \ gex_VIS_IndexedPutNB(myteam,peerproc,Rcnt,Rilist,Rsz,Lcnt,Lilist,Lsz,0);\ } else { \ if (isget) for (long i = 0; i < iters; i++) \ gex_VIS_IndexedGetNBI(myteam,Lcnt,Lilist,Lsz,peerproc,Rcnt,Rilist,Rsz,0);\ else for (long i = 0; i < iters; i++) \ gex_VIS_IndexedPutNBI(myteam,peerproc,Rcnt,Rilist,Rsz,Lcnt,Lilist,Lsz,0);\ } \ break; \ case TEST_S: \ if (doNB) { \ if (isget) for (long i = 0; i < iters; i++) \ evts[i] = \ gex_VIS_StridedGetNB(myteam,Lbase,Lstrides,peerproc,Rbase,Rstrides, \ contigsz,LRcount,stridelevels,0); \ else for (long i = 0; i < iters; i++) \ evts[i] = \ gex_VIS_StridedPutNB(myteam,peerproc,Rbase,Rstrides,Lbase,Lstrides, \ contigsz,LRcount,stridelevels,0); \ } else { \ if (isget) for (long i = 0; i < iters; i++) \ gex_VIS_StridedGetNBI(myteam,Lbase,Lstrides,peerproc,Rbase,Rstrides, \ contigsz,LRcount,stridelevels,0); \ else for (long i = 0; i < iters; i++) \ gex_VIS_StridedPutNBI(myteam,peerproc,Rbase,Rstrides,Lbase,Lstrides, \ contigsz,LRcount,stridelevels,0); \ } \ break; \ } \ if (doNB) gex_Event_WaitAll(evts, iters, 0); \ else gex_NBI_Wait(GEX_EC_ALL,0); \ } while (0) if (iamsender) DOIT(1); /* pay some warm-up costs */ BARRIER(); if (iamsender) { TEST_ASI_BEGIN(name,iters,datasz,MIN(di,TEST_ASI_BANKS-1)); begin = gasnett_ticks_now(); DOIT(iters); end = gasnett_ticks_now(); TEST_ASI_END(name,iters); } BARRIER(); if (iamsender) { char tmp[80]; double secs = gasnett_ticks_to_ns(end - begin)/1.0E9; double dataMB = ((double)datasz) * iters / (1024*1024); snprintf(tmp, sizeof(tmp), " %8.3f", dataMB / secs); strcat(mystr, tmp); } if (Lilist) test_free(Lilist); if (Rilist) test_free(Rilist); if (Lvlist) test_free(Lvlist); if (Rvlist) test_free(Rvlist); if (Lstrides) test_free(Lstrides); if (Rstrides) test_free(Rstrides); if (_LRcount) test_free(_LRcount); } if (iamsender) { printf("%s\n", mystr); fflush(stdout); } BARRIER(); } } } } } BARRIER(); if (alloc) test_free(alloc); gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testacc.c0000664000175000017500000000671115142313673016363 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testacc.c $ * Description: GASNet memory model conformance test using a lock-protected accumulator * Copyright (c) 2019, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include #include #include // Note that local 'want_val' and global 'data' accumulators have the same // (unsigned) type and are kept synchronized such that overflow is harmless. typedef uint32_t data_t; int main(int argc, char **argv) { gex_Client_t myclient; gex_EP_t myep; gex_TM_t myteam; gex_Segment_t mysegment; int failed = 0; int iters = 0; GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testacc", &argc, &argv, 0)); if (argc > 1) iters = atoi(argv[1]); if (iters <= 0) iters = 100000; gex_Rank_t myrank = gex_TM_QueryRank(myteam); gex_Rank_t nranks = gex_TM_QuerySize(myteam); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ)); test_init("testacc",0,"(iters)"); MSG0("Running testacc with %d iterations", iters); TEST_SET_WAITMODE(1); /* Two shared vars, 'lock' and 'data', are on first and last process. Both sit at base of their segment (unless that would overlap). */ gex_Rank_t lock_rank = 0; gex_Rank_t *lock_addr = (gex_Rank_t *) TEST_SEG(lock_rank); gex_Rank_t data_rank = nranks - 1; data_t *data_addr = (data_t *) TEST_SEG(data_rank) + (lock_rank == data_rank); /* initialize both vars locally: */ if (lock_rank == myrank) *lock_addr = 0; if (data_rank == myrank) *data_addr = 0; /* now the fun begins... */ gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); { const gex_Rank_t next_rank = (myrank + 1) % nranks; const data_t incr = nranks * (nranks + 1) / 2; data_t want_val = myrank * (myrank + 1) / 2; for (int i = 0; i < iters; ++i, want_val += incr) { /* Acquire the lock: */ while (myrank != gex_RMA_GetBlockingVal(myteam, lock_rank, lock_addr, sizeof(gex_Rank_t), 0)) { test_yield_if_polite(); gasnet_AMPoll(); } gasnett_local_rmb(); /* Read and Write the accumulator: */ data_t curr_val = gex_RMA_GetBlockingVal(myteam, data_rank, data_addr, sizeof(data_t), 0); data_t next_val = want_val + (myrank + 1); gex_RMA_PutBlockingVal(myteam, data_rank, data_addr, next_val, sizeof(data_t), 0); /* Pass lock ownership to the next process: */ gasnett_local_wmb(); gex_RMA_PutBlockingVal(myteam, lock_rank, lock_addr, next_rank, sizeof(gex_Rank_t), 0); /* Check value read from accumulator (outside of critical section): */ if (curr_val != want_val) { const int msg_limit = 10; if (failed < msg_limit) { MSG("*** ERROR - FAILED at %d: difference = %ld\n", i, (long)(want_val-curr_val)); } else if (failed == msg_limit) { MSG("*** NOTICE - suppressing errors beyond per-rank limit of %d", msg_limit); } ++failed; } TEST_PROGRESS_BAR(i, iters); } } gex_Event_Wait(gex_Coll_BarrierNB(myteam,0)); int32_t errs = test_errs; gex_Event_Wait( gex_Coll_ReduceToAllNB(myteam, &errs, &errs, GEX_DT_I32, sizeof(errs), 1, GEX_OP_ADD, NULL, NULL, 0)); if (errs) { MSG0("FAIL - detected %i errors", (int)errs); } else { MSG0("done."); } gasnet_exit(errs != 0); return 0; /* Not reached */ } gasnet-2025.8.0/tests/testqueue.c0000664000175000017500000005451715142313673016770 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testqueue.c $ * Description: GASNet put/get injection performance test * measures the average non-blocking put/get injection time * for increasing number of back-to-back operations * over varying payload size and synchronization mechanisms * reveals software-imposed queue depth backpressure limitations * Copyright 2002, Jaein Jeong and Dan Bonachea * Terms of use are as specified in license.txt */ #include int maxsz = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR ((uintptr_t)(maxsz + alignup(maxsz,PAGESZ))) #endif #include "test.h" static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; int insegment = 1; int myproc; int numprocs; int peerproc = -1; int iamsender = 0; int iamrecver = 0; int multisender = 0; int min_payload; int max_payload; int maxdepth = 0; char *tgtmem; void *msgbuf; gex_Event_t *events; volatile gex_RMA_Value_t regval = 5551212; #define hidx_ping_shorthandler 201 #define hidx_ping_medhandler 202 #define hidx_ping_longhandler 203 gasnett_atomic_t amcount = gasnett_atomic_init(0); void ping_shorthandler(gex_Token_t token) { gasnett_atomic_increment(&amcount,0); } void ping_medhandler(gex_Token_t token, void *buf, size_t nbytes) { gasnett_atomic_increment(&amcount,0); } void ping_longhandler(gex_Token_t token, void *buf, size_t nbytes) { gasnett_atomic_increment(&amcount,0); } gex_AM_Entry_t htable[] = { { hidx_ping_shorthandler, (gex_AM_Fn_t)ping_shorthandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, 0 }, { hidx_ping_medhandler, (gex_AM_Fn_t)ping_medhandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 0 }, { hidx_ping_longhandler, (gex_AM_Fn_t)ping_longhandler, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, 0 } }; int iters = 0; int arg; void *myseg; void *alloc; int firstlastmode = 0; int fullduplexmode = 0; int help = 0; int do_puts = 0, do_gets = 0, do_amshort = 0, do_ammedium = 0, do_amlong = 0; int numflavors = 0; int numsync = 0; int do_bulk = 0, do_nonbulk = 0, do_value = 0; int do_implicit = 0, do_explicit = 0, do_blocking = 0; void do_bulkputs(void); void do_nonbulkputgets(void); void do_valueputgets(void); void do_blockingputgets(void); void do_amtests(void); int main(int argc, char **argv) { /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testqueue", &argc, &argv, 0)); /* parse arguments */ arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-in")) { insegment = 1; ++arg; } else if (!strcmp(argv[arg], "-out")) { insegment = 0; ++arg; } else if (!strcmp(argv[arg], "-f")) { firstlastmode = 1; ++arg; } else if (!strcmp(argv[arg], "-a")) { fullduplexmode = 1; ++arg; } else if (!strcmp(argv[arg], "-p")) { do_puts = 1; numflavors++; ++arg; } else if (!strcmp(argv[arg], "-g")) { do_gets = 1; numflavors++; ++arg; } else if (!strcmp(argv[arg], "-s")) { do_amshort = 1; numflavors++; ++arg; } else if (!strcmp(argv[arg], "-m")) { do_ammedium = 1; numflavors++; ++arg; } else if (!strcmp(argv[arg], "-l")) { do_amlong = 1; numflavors++; ++arg; } else if (!strcmp(argv[arg], "-b")) { do_bulk = 1; ++arg; } else if (!strcmp(argv[arg], "-n")) { do_nonbulk = 1; ++arg; } else if (!strcmp(argv[arg], "-v")) { do_value = 1; ++arg; } else if (!strcmp(argv[arg], "-i")) { do_implicit = 1; numsync++; ++arg; } else if (!strcmp(argv[arg], "-e")) { do_explicit = 1; numsync++; ++arg; } else if (!strcmp(argv[arg], "-k")) { do_blocking = 1; numsync++; ++arg; } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (fullduplexmode && firstlastmode) help = 1; if (argc > arg+3) help = 1; if (argc > arg) { iters = atoi(argv[arg]); arg++; } if (!iters) iters = 10; if (argc > arg) { maxdepth = atoi(argv[arg]); arg++; } if (!maxdepth) maxdepth = 1024; /* 1024 default */ if (argc > arg) { maxsz = atoi(argv[arg]); arg++; } if (!maxsz) maxsz = 2*1024*1024; /* 2 MB default */ #ifdef GASNET_SEGMENT_EVERYTHING if (maxsz > TEST_SEGSZ) { MSG("maxsz must be <= %"PRIuPTR" on GASNET_SEGMENT_EVERYTHING",(uintptr_t)TEST_SEGSZ); gasnet_exit(1); } #endif GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); GASNET_Safe(gex_EP_RegisterHandlers(myep, htable, sizeof(htable)/sizeof(gex_AM_Entry_t))); test_init("testqueue",1,"[-in|-out|-a|-f] [type options] (iters) (maxdepth) (maxsz)\n" " The '-in' or '-out' option selects whether the initiator-side\n" " memory is in the GASNet segment or not (default is 'in').\n" " The -a option enables full-duplex mode, where all nodes send.\n" " The -f option enables 'first/last' mode, where the first node\n" " sends to the last, while all other nodes sit idle.\n" " Test types to run: (defaults to everything)\n" " -p : puts\n" " -g : gets\n" " -s : AMShort\n" " -m : AMMedium\n" " -l : AMLong\n" " -n : Test non-bulk put/gets\n" " -b : Test bulk put/gets\n" " -v : Test value-based put/gets\n" " -i : Test implicit-handle put/gets/medium/long\n" " -e : Test explicit-handle put/gets/medium/long\n" " -k : Test blocking put/gets/medium/long\n"); if (help) test_usage(); min_payload = 1; max_payload = maxsz; if (numflavors == 0) { /* default to all */ do_puts = 1; do_gets = 1; do_amshort = 1; do_ammedium = 1; do_amlong = 1; } if (numsync == 0) { /* default to all */ do_implicit = 1; do_explicit = 1; do_blocking = 1; } if (!do_bulk && !do_nonbulk && !do_value) { do_bulk = 1; do_nonbulk = 1; do_value = 1; } if (!do_implicit && !do_explicit && !do_blocking) { do_implicit = 1; do_explicit = 1; do_blocking = 1; } if (max_payload < min_payload) { printf("ERROR: maxsz must be >= %i\n",min_payload); gasnet_exit(1); } /* get SPMD info */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); if (!firstlastmode) { /* Only allow 1 or even number for numprocs */ if (numprocs > 1 && numprocs % 2 != 0) { MSG0("WARNING: This test requires a unary or even number of nodes. Test skipped.\n"); gasnet_exit(0); /* exit 0 to prevent false negatives in test harnesses for smp-conduit */ } } /* Setting peer thread rank */ if (firstlastmode) { peerproc = numprocs-1; iamsender = (myproc == 0); iamrecver = (myproc == numprocs-1); multisender = 0; } else if (numprocs == 1) { peerproc = 0; iamsender = 1; iamrecver = 1; multisender = 0; } else { peerproc = (myproc % 2) ? (myproc - 1) : (myproc + 1); iamsender = (fullduplexmode || myproc % 2 == 0); iamrecver = (fullduplexmode || !iamsender); multisender = (fullduplexmode || numprocs >= 4); } multisender = 1; /* messes up output on some systems */ myseg = TEST_SEG(myproc); tgtmem = (char*)TEST_SEG(peerproc) + alignup(maxsz, PAGESZ); if (insegment) { msgbuf = (void *) myseg; } else { alloc = (void *) test_calloc(maxsz+PAGESZ,1); /* use calloc to prevent valgrind warnings */ msgbuf = (void *) alignup(((uintptr_t)alloc), PAGESZ); /* ensure page alignment of base */ } assert(((uintptr_t)msgbuf) % PAGESZ == 0); MSG0("Running %squeue test with local addr %sside segment, iters=%i, maxdepth=%i, sz: %i...%i", firstlastmode ? "first/last " : (fullduplexmode ? "full-duplex ": ""), insegment ? "in" : "out", iters, maxdepth, min_payload, max_payload); MSG0("x-axis: queue depth, y-axis: message size, injection time in microseconds\n"); BARRIER(); events = (gex_Event_t *) test_malloc(sizeof(gex_Event_t) * maxdepth); do_bulkputs(); do_nonbulkputgets(); do_valueputgets(); do_blockingputgets(); do_amtests(); BARRIER(); test_free(events); if (!insegment) { test_free(alloc); } gasnet_exit(0); return 0; } #define QUEUE_TEST(OPDESC, OP, SYNC, RECVRSYNC, PAYLOAD_LIMIT) do { \ int depth, payload, last_payload; \ BARRIER(); \ MSG0("\n%s\n--------------------\n", OPDESC); \ { char header[1024]; \ char *pheader = header; \ size_t hused = 0; \ snprintf(pheader, sizeof(header) - hused, " "); \ pheader += strlen(pheader); hused = pheader - header; \ for (depth = 1; depth <= maxdepth; depth *= 2) { \ snprintf(pheader, sizeof(header) - hused, " %7i", depth); \ pheader += strlen(pheader); hused = pheader - header; \ } \ PUTS0(header); \ } \ last_payload = (((PAYLOAD_LIMIT) <= 0) ? max_payload : \ MIN(max_payload, (PAYLOAD_LIMIT))); \ for (payload = min_payload; payload <= last_payload; payload *= 2) { \ char row[1024]; \ char *prow = row; \ size_t rused = 0; \ if (payload < 0) break; /* Overflow */ \ snprintf(prow, sizeof(row) - rused, "%-8i", payload); \ prow += strlen(prow); rused = prow - row; \ if (!multisender) { \ fputs(row,stdout); fflush(stdout); \ prow = row; rused = 0; \ } \ depth = 1; \ if (iamsender) { /* Prime i-cache, free-lists, firehose, etc. */ \ int i = 0; \ OP; \ { SYNC; } \ } \ if (iamrecver) { RECVRSYNC; } \ for (depth = 1; depth <= maxdepth; depth *= 2) { \ BARRIER(); \ \ if (iamsender) { \ int iter,i; \ gasnett_tick_t total = 0, \ min = GASNETT_TICK_MAX, \ max = GASNETT_TICK_MIN; \ for (iter = 0; iter < iters; iter++) { \ gasnett_tick_t begin, end, thistime; \ BARRIER(); \ /* measure time to inject depth operations of payload sz */ \ begin = gasnett_ticks_now(); \ for (i = 0; i < depth; i++) { \ OP; \ } \ end = gasnett_ticks_now(); \ { SYNC; } \ if (iamrecver) { RECVRSYNC; } \ BARRIER(); \ thistime = (end - begin); \ total += thistime; \ min = MIN(min,thistime); \ max = MAX(max,thistime); \ } \ { double avgus = gasnett_ticks_to_ns(total) / 1000.0 / \ (double)iters / (double)depth; \ double minus = gasnett_ticks_to_ns(min) / 1000.0 / (double)depth; \ double maxus = gasnett_ticks_to_ns(max) / 1000.0 / (double)depth; \ int prec; \ if (avgus < 1000.0) prec = 3; \ else if (avgus < 10000.0) prec = 2; \ else if (avgus < 100000.0) prec = 1; \ else prec = 0; \ snprintf(prow, sizeof(row) - rused, " %7.*f", prec, avgus); \ prow += strlen(prow); rused = prow - row; \ if (!multisender) { \ fputs(row,stdout); fflush(stdout); \ prow = row; rused = 0; \ } \ } \ } else { \ int i; \ for (i = 0; i < iters; i++) { \ BARRIER(); \ if (iamrecver) { RECVRSYNC; } \ BARRIER(); \ } \ } \ } \ if (iamsender) { \ puts(row); fflush(stdout); \ } \ } \ } while (0) void do_bulkputs(void) { if (do_puts && do_bulk && do_explicit) { QUEUE_TEST("gex_RMA_PutNB/bulk", events[i] = gex_RMA_PutNB(myteam, peerproc, tgtmem, msgbuf, payload, GEX_EVENT_DEFER, 0), gex_Event_WaitAll(events, depth, 0), (void)0, 0); } if (do_puts && do_bulk && do_implicit) { QUEUE_TEST("gex_RMA_PutNBI/bulk", gex_RMA_PutNBI(myteam, peerproc, tgtmem, msgbuf, payload, GEX_EVENT_DEFER, 0), gex_NBI_Wait(GEX_EC_ALL,0), (void)0, 0); } } void do_nonbulkputgets(void) { if (do_puts && do_nonbulk && do_explicit) { QUEUE_TEST("gex_RMA_PutNB", events[i] = gex_RMA_PutNB(myteam, peerproc, tgtmem, msgbuf, payload, GEX_EVENT_NOW, 0), gex_Event_WaitAll(events, depth, 0), (void)0, 0); } if (do_gets && do_explicit) { QUEUE_TEST("gex_RMA_GetNB", events[i] = gex_RMA_GetNB(myteam, msgbuf, peerproc, tgtmem, payload, 0), gex_Event_WaitAll(events, depth, 0), (void)0, 0); } if (do_puts && do_nonbulk && do_implicit) { QUEUE_TEST("gex_RMA_PutNBI", gex_RMA_PutNBI(myteam, peerproc, tgtmem, msgbuf, payload, GEX_EVENT_NOW, 0), gex_NBI_Wait(GEX_EC_ALL,0), (void)0, 0); } if (do_gets && do_implicit) { QUEUE_TEST("gex_RMA_GetNBI", gex_RMA_GetNBI(myteam, msgbuf, peerproc, tgtmem, payload, 0), gex_NBI_Wait(GEX_EC_ALL,0), (void)0, 0); } } void do_valueputgets(void) { if (do_puts && do_value && do_explicit) { QUEUE_TEST("gex_RMA_PutNBVal", events[i] = gex_RMA_PutNBVal(myteam, peerproc, tgtmem, regval, payload, 0), gex_Event_WaitAll(events, depth, 0), (void)0, SIZEOF_GEX_RMA_VALUE_T); } if (do_puts && do_value && do_implicit) { QUEUE_TEST("gex_RMA_PutNBIVal", gex_RMA_PutNBIVal(myteam, peerproc, tgtmem, regval, payload, 0), gex_NBI_Wait(GEX_EC_ALL,0), (void)0, SIZEOF_GEX_RMA_VALUE_T); } } void do_blockingputgets(void) { if (do_puts && do_blocking) { QUEUE_TEST("gex_RMA_PutBlocking (BLOCKING - represents round-trip latency)", gex_RMA_PutBlocking(myteam, peerproc, tgtmem, msgbuf, payload, 0), (void)0, (void)0, 0); } if (do_gets && do_blocking) { QUEUE_TEST("gex_RMA_GetBlocking (BLOCKING - represents round-trip latency)", gex_RMA_GetBlocking(myteam, msgbuf, peerproc, tgtmem, payload, 0), (void)0, (void)0, 0); } if (do_puts && do_value && do_blocking) { QUEUE_TEST("gex_RMA_PutBlockingVal (BLOCKING - represents round-trip latency)", gex_RMA_PutBlockingVal(myteam, peerproc, tgtmem, regval, payload, 0), (void)0, (void)0, SIZEOF_GEX_RMA_VALUE_T); } if (do_gets && do_value && do_blocking) { QUEUE_TEST("gex_RMA_GetBlockingVal (BLOCKING - represents round-trip latency)", regval ^= gex_RMA_GetBlockingVal(myteam, peerproc, tgtmem, payload, 0), (void)0, (void)0, SIZEOF_GEX_RMA_VALUE_T); } } void do_amtests(void) { if (do_amshort) { gasnett_atomic_set(&amcount, 0, 0); QUEUE_TEST("gex_AM_RequestShort0", gex_AM_RequestShort0(myteam, peerproc, hidx_ping_shorthandler, 0), (void)0, { assert(iamrecver); GASNET_BLOCKUNTIL(gasnett_atomic_read(&amcount,0) == depth); gasnett_atomic_set(&amcount, 0, 0); }, min_payload); } if (do_ammedium && do_blocking) { gasnett_atomic_set(&amcount, 0, 0); QUEUE_TEST("gex_AM_RequestMedium0 (blocking for LC)", gex_AM_RequestMedium0(myteam, peerproc, hidx_ping_medhandler, msgbuf, payload, GEX_EVENT_NOW, 0), (void)0, { assert(iamrecver); GASNET_BLOCKUNTIL(gasnett_atomic_read(&amcount,0) == depth); gasnett_atomic_set(&amcount, 0, 0); }, gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0)); } if (do_ammedium && do_explicit) { QUEUE_TEST("gex_AM_RequestMedium0 (explicit handle for LC)", gex_AM_RequestMedium0(myteam, peerproc, hidx_ping_medhandler, msgbuf, payload, &events[i], 0), gex_Event_WaitAll(events, depth, 0), { assert(iamrecver); GASNET_BLOCKUNTIL(gasnett_atomic_read(&amcount,0) == depth); gasnett_atomic_set(&amcount, 0, 0); }, gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,NULL,0,0)); } if (do_ammedium && do_implicit) { QUEUE_TEST("gex_AM_RequestMedium0 (implicit handle for LC)", gex_AM_RequestMedium0(myteam, peerproc, hidx_ping_medhandler, msgbuf, payload, GEX_EVENT_GROUP, 0), gex_NBI_Wait(GEX_EC_ALL,0), { assert(iamrecver); GASNET_BLOCKUNTIL(gasnett_atomic_read(&amcount,0) == depth); gasnett_atomic_set(&amcount, 0, 0); }, gex_AM_MaxRequestMedium(myteam,GEX_RANK_INVALID,GEX_EVENT_GROUP,0,0)); } if (do_amlong && do_blocking) { gasnett_atomic_set(&amcount, 0, 0); QUEUE_TEST("gex_AM_RequestLong0 (blocking for LC)", gex_AM_RequestLong0(myteam, peerproc, hidx_ping_longhandler, msgbuf, payload, tgtmem, GEX_EVENT_NOW, 0), (void)0, { assert(iamrecver); GASNET_BLOCKUNTIL(gasnett_atomic_read(&amcount,0) == depth); gasnett_atomic_set(&amcount, 0, 0); }, gex_AM_MaxRequestLong(myteam,GEX_RANK_INVALID,GEX_EVENT_NOW,0,0)); } if (do_amlong && do_explicit) { QUEUE_TEST("gex_AM_RequestLong0 (explicit handle for LC)", gex_AM_RequestLong0(myteam, peerproc, hidx_ping_longhandler, msgbuf, payload, tgtmem, &events[i], 0), gex_Event_WaitAll(events, depth, 0), { assert(iamrecver); GASNET_BLOCKUNTIL(gasnett_atomic_read(&amcount,0) == depth); gasnett_atomic_set(&amcount, 0, 0); }, gex_AM_MaxRequestLong(myteam,GEX_RANK_INVALID,NULL,0,0)); } if (do_amlong && do_implicit) { QUEUE_TEST("gex_AM_RequestLong0 (implicit handle for LC)", gex_AM_RequestLong0(myteam, peerproc, hidx_ping_longhandler, msgbuf, payload, tgtmem, GEX_EVENT_GROUP, 0), gex_NBI_Wait(GEX_EC_ALL,0), { assert(iamrecver); GASNET_BLOCKUNTIL(gasnett_atomic_read(&amcount,0) == depth); gasnett_atomic_set(&amcount, 0, 0); }, gex_AM_MaxRequestLong(myteam,GEX_RANK_INVALID,GEX_EVENT_GROUP,0,0)); } } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/testslice.c0000664000175000017500000002104215142313673016726 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testslice.c $ * Description: GASNet randomized get/put correctness validation test * Copyright 2007, Parry Husbands and Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include #include #include #include #include size_t arenasz = 0; int doforeign = 0; #ifndef TEST_SEGSZ #define TEST_SEGSZ_EXPR ((uintptr_t)arenasz*(doforeign?4:2)) #endif #include "test.h" static gex_Client_t myclient; static gex_EP_t myep; static gex_TM_t myteam; static gex_Segment_t mysegment; static gex_Rank_t peerproc; #define OUTPUT_SUCCESS 0 uint64_t failures = 0; void assert_eq(char *x, char *y, int len, int start, int i, int j, const char *msg) { int k; int error = 0; for(k=0;k < len;k++) { if(x[k] != y[k]) { error=1; break; } } if(error) { ERR("FAILURE %s outer iteration %d inner iteration %d starting point = %d length = %d",msg,i,j,start,len); failures++; } else { #if OUTPUT_SUCCESS MSG("SUCCESS %s outer iteration %d inner iteration %d starting point = %d length = %d",msg,i,j,start,len); #endif } } void do_put(void *dst, void *src, size_t len) { switch(TEST_RAND(0,6)) { case 0: gex_RMA_PutBlocking(myteam, peerproc, dst, src, len, 0); break; case 1: gex_Event_Wait(gex_RMA_PutNB(myteam, peerproc, dst, src, len, GEX_EVENT_NOW, 0)); break; case 2: gex_Event_Wait(gex_RMA_PutNB(myteam, peerproc, dst, src, len, GEX_EVENT_DEFER, 0)); break; case 3: { gex_Event_t lc_ev; gex_Event_Wait(gex_RMA_PutNB(myteam, peerproc, dst, src, len, &lc_ev, 0)); break; } case 4: gex_RMA_PutNBI(myteam, peerproc, dst, src, len, GEX_EVENT_NOW, 0); gex_NBI_Wait(GEX_EC_PUT, 0); break; case 5: gex_RMA_PutNBI(myteam, peerproc, dst, src, len, GEX_EVENT_DEFER, 0); gex_NBI_Wait(GEX_EC_PUT, 0); break; case 6: gex_RMA_PutNBI(myteam, peerproc, dst, src, len, GEX_EVENT_GROUP, 0); gex_NBI_Wait(GEX_EC_PUT|GEX_EC_LC, 0); break; } } void do_get(void *dst, void *src, size_t len) { switch(TEST_RAND(0,2)) { case 0: gex_RMA_GetBlocking(myteam, dst, peerproc, src, len, 0); break; case 1: gex_Event_Wait(gex_RMA_GetNB(myteam, dst, peerproc, src, len, 0)); break; case 2: gex_RMA_GetNBI(myteam, dst, peerproc, src, len, 0); gex_NBI_Wait(GEX_EC_GET, 0); break; } } int main(int argc, char **argv) { int outer_iterations = 0; int inner_iterations = 0; int seedoffset = 0; gex_Rank_t numprocs, myproc; int crossmachinemode = 0; int help = 0; /* call startup */ GASNET_Safe(gex_Client_Init(&myclient, &myep, &myteam, "testslice", &argc, &argv, 0)); /* get SPMD info */ myproc = gex_TM_QueryRank(myteam); numprocs = gex_TM_QuerySize(myteam); // Parse cmdline args int arg = 1; while (argc > arg) { if (!strcmp(argv[arg], "-c")) { crossmachinemode = 1; ++arg; } else if (!strcmp(argv[arg], "-f")) { doforeign = 1; ++arg; } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (argc > arg) { arenasz = gasnett_parse_int(argv[arg], 1); ++arg; } if (!arenasz) arenasz = 1024*1024*16; if (argc > arg) { outer_iterations = atoi(argv[arg]); ++arg; } if (!outer_iterations) outer_iterations = 10; if (argc > arg) { inner_iterations = atoi(argv[arg]); ++arg; } if (!inner_iterations) inner_iterations = 10; if (argc > arg) { seedoffset = atoi(argv[arg]); ++arg; } if (doforeign) { gex_Rank_t nbrhd_set_size; gex_System_QueryMyPosition(&nbrhd_set_size, NULL, NULL, NULL); if (nbrhd_set_size == numprocs) { // all nbrhs are single-process MSG0("WARNING: Ignoring '-f' since there are no foreign segments."); doforeign = 0; } } GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ)); test_init("testslice",0, "[options] (arena size) (iterations) (# of sizes per iteration) (seed)\n" " The -c option enables cross-machine pairing, default is nearest neighbor.\n" " The -f option enables use of a 'foreign' GASNet segment (one cross-mapped\n" " from another process) as the 'local' address for communications."); if (help || argc > arg) test_usage(); if (crossmachinemode) { if ((numprocs%2) && (myproc == numprocs-1)) { peerproc = myproc; } else { gex_Rank_t half = numprocs / 2; peerproc = (myproc < half) ? (myproc + half) : (myproc - half); } } else { peerproc = (myproc + 1) % numprocs; } if (seedoffset == 0) { seedoffset = (((unsigned int)TIME()) & 0xFFFF); TEST_BCAST(&seedoffset, 0, &seedoffset, sizeof(seedoffset)); } TEST_SRAND(myproc+seedoffset); MSG0("Running %s%stest with arena size=%"PRIuSZ" outer iterations=%d inner iterations=%d seed=%d", (crossmachinemode ? "cross-machine ": ""), (doforeign ? "foreign-segment ": ""), arenasz,outer_iterations, inner_iterations, seedoffset); // Allocate two shadow regions the same size as the arena char *shadow_region_1, *shadow_region_2; if (doforeign) { // Use cross-mapped (localized) segment of a neighbor if possible gex_RankInfo_t *nbrhdinfo = NULL; gex_Rank_t nbrhdsize, nbrhdrank; gex_System_QueryNbrhdInfo(&nbrhdinfo, &nbrhdsize, &nbrhdrank); // Using segment of "left" (-1) neighbor to avoid (when possible) using same as peerproc gex_Rank_t nbrproc = nbrhdinfo[(nbrhdrank + nbrhdsize - 1) % nbrhdsize].gex_jobrank; char *nbr_seg_local_addr = NULL; gex_Event_Wait( gex_EP_QueryBoundSegmentNB(myteam, nbrproc, NULL, (void**)&nbr_seg_local_addr, NULL, 0) ); assert_always(nbr_seg_local_addr != NULL); shadow_region_1 = nbr_seg_local_addr + 2*arenasz; } else { // Just plain local memory shadow_region_1 = (char *) test_malloc(2*arenasz); } shadow_region_2 = shadow_region_1 + arenasz; // Initialize the two shadow regions with random bytes and zeros, respectively // We take care to ensure "owner writes" even for foreign segments { uint32_t *tmp1 = (uint32_t *) (doforeign ? ((char *)TEST_MYSEG() + 2*arenasz) : shadow_region_1); for(size_t k=0;k < arenasz / sizeof(uint32_t);k++) { tmp1[k] = TEST_RAND(0, UINT32_MAX); } char *tmp2 = (doforeign ? ((char *)TEST_MYSEG() + 3*arenasz) : shadow_region_2); memset(tmp2,0,arenasz); } char *local_base = (char *)TEST_MYSEG(); char *target_base = (char *)TEST_SEG(peerproc) + arenasz; BARRIER(); /* Big loop performing the following */ for(int i=0;i < outer_iterations;i++) { /* Pick a starting point anywhere in the segment */ size_t starting_point = TEST_RAND(0,(arenasz-1)); for(int j=0;j < inner_iterations;j++) { /* Pick a length */ size_t len = TEST_RAND(1,arenasz-starting_point); size_t remote_starting_point = TEST_RAND(0,arenasz-len); size_t local_starting_point_1 = TEST_RAND(0,arenasz-len); size_t local_starting_point_2 = TEST_RAND(0,arenasz-len); char *remote = target_base + remote_starting_point; char *local = local_base + local_starting_point_1; char *shadow1 = shadow_region_1 + starting_point; char *shadow2 = shadow_region_2 + local_starting_point_2;; /* Perform operations */ /* Out of segment put from shadow_region 1 to remote */ do_put(remote, shadow1, len); /* In segment get from remote to local segment */ do_get(local, remote, len); /* Verify */ assert_eq(shadow1, local, len, starting_point, i, j, "Out of segment put + in segment get"); /* Out of segment get from remote to shadow_region_2 (starting from 0) */ do_get(shadow2, remote, len); /* Verify */ assert_eq(shadow2, shadow1, len, starting_point, i, j, "Out of segment get"); } TEST_PROGRESS_BAR(i,outer_iterations); BARRIER(); } if (!doforeign) test_free(shadow_region_1); if(!failures) { MSG("testslice PASSED"); } gasnet_exit(0); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/tests/test.h0000664000175000017500000015634115142313673015726 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/test.h $ * Description: helpers for GASNet tests * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _TEST_H #define _TEST_H #ifdef TEST_GASNET_TOOLS_ONLY /* do not use gasnetex.h */ #include #else #include #include #define TEST_GASNETEX_H #endif #include #include #include #include #include #include #include #include #if defined(HAVE_PTHREAD_H) && \ (defined(GASNET_PAR) || defined(GASNET_PARSYNC) || GASNETT_THREAD_SAFE) #define TEST_PAR 1 #include #endif GASNETT_BEGIN_EXTERNC #if !defined(DEBUG) && !defined(NDEBUG) #ifdef GASNET_DEBUG #define DEBUG 1 #else #define NDEBUG 1 #endif #endif #if PLATFORM_COMPILER_SUN_C /* disable a harmless warning */ #pragma error_messages(off, E_STATEMENT_NOT_REACHED) #endif /* bug 1206: several systems (notably Compaq C++ and OSX gcc) have an assert.h header which is broken in one or more subtle ways. Don't trust the system assert.h. */ #include #undef assert /* Grumble... On Solaris-x86 /usr/include/sys/regset.h polutes the namespace */ #if PLATFORM_OS_SOLARIS && (PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64) #if defined(_SYS_REGSET_H) && defined(ERR) #undef ERR #endif #endif // this macro is for annotating variables as "used" so compilers don't warn #if PLATFORM_COMPILER_OPEN64 #define test_mark_used(var) ((void)var) #else #define test_mark_used(var) ((void)(&var?0:0)) #endif #if HAVE_SRAND_DETERMINISTIC /* OpenBSD "breaks" rand() by design */ #define srand(seed) srand_deterministic(seed) #endif #define assert_always(expr) \ ((expr) ? (void)0 : (void)FATALERR("Assertion failure: %s", #expr)) #ifdef NDEBUG #define assert(x) ((void)0) #else #define assert(x) assert_always(x) #endif #ifndef _CONCAT #define _CONCAT_HELPER(a,b) a ## b #define _CONCAT(a,b) _CONCAT_HELPER(a,b) #endif /* ------------------------------------------------------------------------------------ */ // Static assertions : assert a property at compile time, generate an error otherwise // `cond` must be an integer constant expression - ie no non-integer types or variable references // static assertion in a block scope // safe to use multiple times per line (eg in a macro expansion) #define test_static_assert(cond) do { \ static const char *_test_static_assert[ (cond) ?1:-1] = { "Static assertion: " #cond }; \ test_mark_used(_test_static_assert); \ } while (0) // static assertion at file scope // safe to use multiple times per line only in C99 mode, not C++ mode #define test_static_assert_file(cond) \ static const char *_CONCAT(_test_static_assert_file_,__LINE__)[ (cond) ?1:-1] /* ------------------------------------------------------------------------------------ */ /* generic message output utility test_makeMsg(baseformatargs, msgpred, isfatal, msgeval): baseformatargs - parenthesized printf-style argument defining the generic stem msgpred - predicate which must evaluate to true to perform message output (eg 1 for always) isfatal - literal 1 to request an abort after the message output, literal 0 otherwise msgeval - expression which is evaluated in a critical section, immediately before each message output (or 0 for none) */ #if PLATFORM_COMPILER_PATHSCALE typedef void (*_testformatter_fn_t)(const char *format, ...); #define BUG3343_WORKAROUND(expr) ((_testformatter_fn_t)(expr)) #else #define BUG3343_WORKAROUND(expr) expr #endif #define test_makeMsg(baseformatargs, msgpred, isfatal, msgeval) \ BUG3343_WORKAROUND( \ ( _test_makeErrMsg baseformatargs , \ ( (msgpred) ? (void)(msgeval) : (_test_squashmsg = 1, (void)0) ) , \ _test_doErrMsg##isfatal ) ) #ifdef _INCLUDED_GASNET_H #define TEST_MYPROC gasnet_mynode() #define TEST_PROCS gasnet_nodes() #else #define TEST_MYPROC gex_System_QueryJobRank() #define TEST_PROCS gex_System_QueryJobSize() #endif /* define several useful messaging macros */ static int test_errs = 0; #ifdef TEST_GASNETEX_H #define MSG test_makeMsg(("node %i/%i %s\n", (int)TEST_MYPROC, (int)TEST_PROCS, "%s"), 1, 0, \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__)) #define MSG0 test_makeMsg(("%s\n","%s"), (TEST_MYPROC == 0), 0, \ GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__)) #define _TERR(isfatal) \ test_makeMsg(("ERROR: node %i/%i %s (at %s:%i)\n", \ (int)TEST_MYPROC, (int)TEST_PROCS, "%s",__FILE__, __LINE__), 1, isfatal, \ (test_errs++, GASNETT_TRACE_SETSOURCELINE(__FILE__,__LINE__))) #define THREAD_MSG0(id) test_makeMsg(("%s\n","%s"), (TEST_MYPROC == 0 && id == 0), 0, 0) #define THREAD_ERR(id) test_makeMsg(("ERROR: node %i/%i thread %i: %s (at %s:%i)\n", \ (int)TEST_MYPROC, (int)TEST_PROCS,id, "%s", __FILE__, __LINE__), 1, 0, test_errs++) #else #define MSG test_makeMsg(("%s\n","%s"), 1, 0, 0) #define MSG0 MSG #define _TERR(isfatal) test_makeMsg(("ERROR: %s (at %s:%i)\n","%s",__FILE__, __LINE__), 1, isfatal, test_errs++) #define THREAD_MSG0(id) test_makeMsg(("%s\n","%s"), (id == 0), 0, 0) #define THREAD_ERR(id) test_makeMsg(("ERROR: thread %i: %s (at %s:%i)\n", \ id, "%s", __FILE__, __LINE__), 1, 0, test_errs++) #endif #define ERR _TERR(0) #define FATALERR _TERR(1) /* The following two help us avoid warnings from a gcc that doesn't like seeing a lone non-literal argument to printf() and family. */ #define PUTS(_s) MSG("%s",(_s)) #define PUTS0(_s) MSG0("%s",(_s)) #define _TEST_MSG_BUFSZ 1024 static char _test_baseformat[_TEST_MSG_BUFSZ]; static volatile int _test_squashmsg = 0; #if TEST_PAR static gasnett_mutex_t _test_msg_lock = GASNETT_MUTEX_INITIALIZER; #define _test_LOCKMSG() gasnett_mutex_lock(&_test_msg_lock) #define _test_UNLOCKMSG() gasnett_mutex_unlock(&_test_msg_lock) #else #define _test_LOCKMSG() ((void)0) #define _test_UNLOCKMSG() ((void)0) #endif /* define two versions of _test_doErrMsg, * so the fatal one can have a GASNETT_NORETURN attribute */ #define _test_doErrMsg_functor(suff, code) \ GASNETT_FORMAT_PRINTF(_test_doErrMsg##suff,1,2, \ static void _test_doErrMsg##suff(const char *format, ...)) { \ if (_test_squashmsg) _test_squashmsg = 0; \ else { \ char output[_TEST_MSG_BUFSZ]; \ va_list argptr; \ va_start(argptr, format); /* pass in last argument */ \ { int sz = vsnprintf(output, _TEST_MSG_BUFSZ, format, argptr); \ if (sz >= (_TEST_MSG_BUFSZ-5) || sz < 0) \ strcpy(output+(_TEST_MSG_BUFSZ-5),"..."); \ } \ va_end(argptr); \ printf(_test_baseformat, output); \ GASNETT_TRACE_PRINTF(_test_baseformat, output); \ fflush(stdout); \ } \ code /* conditionally fatal */ \ } _test_doErrMsg_functor(0, { _test_UNLOCKMSG(); }) GASNETT_NORETURN _test_doErrMsg_functor(1, { fflush(NULL); sleep(1); abort(); }) GASNETT_NORETURNP(_test_doErrMsg1) #undef _test_doErrMsg_functor GASNETT_FORMAT_PRINTF(_test_makeErrMsg,1,2, static void _test_makeErrMsg(const char *format, ...)) { va_list argptr; _test_LOCKMSG(); va_start(argptr, format); /* pass in last argument */ { int sz = vsnprintf(_test_baseformat, _TEST_MSG_BUFSZ, format, argptr); if (sz >= (_TEST_MSG_BUFSZ-5) || sz < 0) strcpy(_test_baseformat+(_TEST_MSG_BUFSZ-5),"..."); } va_end(argptr); } /* ------------------------------------------------------------------------------------ */ /* misc tools */ #ifndef MIN #define MIN(x,y) ((x)<(y)?(x):(y)) #endif #ifndef MAX #define MAX(x,y) ((x)>(y)?(x):(y)) #endif #define test_checksum gasnett_checksum #define PAGESZ GASNETT_PAGESIZE #define alignup(a,b) ((((a)+(b)-1)/(b))*(b)) #define alignup_ptr(a,b) ((void *)(((((uintptr_t)(a))+(b)-1)/(b))*(b))) #define aligndown(a,b) (((a)/(b))*(b)) #define TEST_HIWORD(arg) ((uint32_t)(((uint64_t)(arg)) >> 32)) #define TEST_LOWORD(arg) ((uint32_t)((uint64_t)(arg))) // Two 64-bit PRNGs are available // + "LCG64" uses 64-bit Linear Congruential Generator // + "RANDn" uses multiple calls to rand(). #if defined(_TEST_USE_LCG64) // Keep setting #else // Current default is LCG64, which provides cross-platform reproducibility #define _TEST_USE_LCG64 1 #endif static int _test_rand_is_init = 0; #if _TEST_USE_LCG64 // NOTE: this state and seed operation are per compilation unit. // TODO: If/when we write tests spanning multiple source files we may // need to move the PRNG state into its own object file. static uint64_t _test_rand_val = 5551212; #define TEST_SRAND(seed) (_test_rand_is_init=1,(void)(_test_rand_val = (seed))) #else #define TEST_SRAND(seed) (_test_rand_is_init=1,srand(seed)) #endif // Some platforms are missing these from stdint.h by default in C++ mode (without __STDC_LIMIT_MACROS) #ifndef INT64_MAX #ifdef __INT64_MAX__ #define INT64_MAX __INT64_MAX__ #else #define INT64_MAX (0x7fffffffffffffffLL) #endif #endif #ifndef INT64_MIN #define INT64_MIN (-INT64_MAX - 1) #endif // NOTE: (high - low + 1) must be <= INT64_MAX to avoid undefined behavior static int64_t _test_rand(int64_t low, int64_t high) { assert(_test_rand_is_init); assert(low <= high); assert(low <= high+1); /* We will overflow otherwise */ // conservatively avoid the use of the high bit to avoid any chance of overflow // this could be made tighter, but this utility is not intended for generating 64-bits of randomness assert(low > INT64_MIN/2); assert(high < INT64_MAX/2); uint64_t const range = high - low + 1; #if _TEST_USE_LCG64 // Implement the well-known LCG PRNG with widely used parameters. // For an explanation of the LCG algorithm: // https://en.wikipedia.org/wiki/Linear_congruential_generator // or any CS text (such as Knuth) covering pseudo-random number generation. // For an example of where this particular generator is in use: // https://nuclear.llnl.gov/CNP/rng/rngman/ // and specifically the description of *this* generator: // https://nuclear.llnl.gov/CNP/rng/rngman/node4.html // which states this multiplier is also the default for lcg64 in SPRNG: // http://www.sprng.org/sprng.html _test_rand_val *= 2862933555777941757ull; _test_rand_val += 3037000493ull; // "mix" bits to compensate for lower randomness of least-signficant bits uint64_t val = _test_rand_val ^ TEST_HIWORD(_test_rand_val); #else // The "RANDn" generator accumulates 8 random bits at a time using // multiple calls to libc's rand(), making only as many calls as // are required to meet the requested [low,high] range. assert(RAND_MAX >= 255); // C99 guarantees 32k+ uint64_t rs = range; uint64_t val = 0; do { val = (val << 8) ^ rand(); rs >>= 8; } while (rs); #endif int64_t result = (int64_t)(val % range) + low; assert(result >= low && result <= high); return result; } #define TEST_RAND(low,high) _test_rand((low), (high)) #define TEST_RAND_PICK(a,b) (TEST_RAND(0,1)==1?(a):(b)) #define TEST_RAND_ONEIN(p) (TEST_RAND(1,p) == 1) #define check_zeroret(op) do { \ int _retval = (op); \ if_pf(_retval) FATALERR(#op": %s(%i)",strerror(_retval), _retval); \ } while (0) #define check_nzeroret(op) do { \ int _retval = (op); \ if_pf(!_retval) FATALERR(#op": %s(%i)",strerror(_retval), _retval); \ } while (0) static char test_section; static char test_sections[255]; #define TEST_SECTION_BEGIN() ((void)(!test_section ? test_section = 'A' : test_section++)) #define TEST_SECTION_ENABLED_FWD(n) ((!test_sections[0] || strchr(test_sections, test_section+(n)))) #define TEST_SECTION_ENABLED() TEST_SECTION_ENABLED_FWD(0) #define TEST_SECTION_BEGIN_ENABLED() (TEST_SECTION_BEGIN(), TEST_SECTION_ENABLED()) #define TEST_SECTION_NAME() ((char)test_section) #define TEST_SECTION_PARSE(arg) do { \ const char *p = (arg); \ char *q = test_sections; \ while (*p) *(q++) = toupper((int)*(p++)); \ } while (0) /* ------------------------------------------------------------------------------------ */ /* timing - TIME() returns a microsecond time-stamp */ #ifdef FORCE_GETTIMEOFDAY #define TIME() gasnett_gettimeofday_us() #else #define TIME() gasnett_ticks_to_us(gasnett_ticks_now()) #endif #define test_ns_to_ticks(_ns) \ (gasnett_tick_t)((_ns)*((double)(1<<30))/gasnett_ticks_to_ns(1<<30)) /* ------------------------------------------------------------------------------------ */ // Auto-scaling Iteration support // Macros to support scaling the iterations of a test to meet a target running time // For macro usage example, see testvisperf.c // For operational details, build with MANUAL_DEFINES=-DTEST_ASI_DEBUG #ifndef TEST_ASI_DEBUG #define TEST_ASI_DEBUG 0 #endif #ifndef TEST_ASI_BANKS #define TEST_ASI_BANKS 10 #endif #ifndef TEST_ASI_MININTERVAL #define TEST_ASI_MININTERVAL 0.001 // min acceptable interval, in seconds #endif static gasnett_tick_t _test_asi_interval = 0; // min interval and enable static gasnett_tick_t _test_asi_begin = 0; static size_t _test_asi_iters[TEST_ASI_BANKS]; static size_t _test_asi_sz[TEST_ASI_BANKS]; static size_t _test_asi_retry; static int _test_asi_bank; // init the ASI subsystem, with a string specifying the target time interval for each test #define TEST_ASI_INIT(interval_str) do { \ const char *_str = (interval_str); \ if (!_str || !*_str) _str = "1.0"; \ double _time = atof(_str); \ _time = MAX(_time, TEST_ASI_MININTERVAL); \ _test_asi_interval = test_ns_to_ticks(_time*1.0e9); \ assert_always(labs((long)(_time*1000 - /* within 10ms */\ gasnett_ticks_to_ns(_test_asi_interval)/1.0e6)) < 10); \ if (TEST_ASI_DEBUG) \ MSG0(" ASI: test interval: %0.3f sec",_time); \ } while (0) // inform ASI we are starting a new test so wipe timing state #define TEST_ASI_NEW_TEST() do { \ memset(_test_asi_sz,0,sizeof(_test_asi_sz)); \ memset(_test_asi_iters,0,sizeof(_test_asi_iters)); \ } while (0) // begin a timed region, with a label name and size "cost", computes iters // test can optionally use up to TEST_ASI_BANKS separate banks of iter/size state // Call this BEFORE test's own begin timer #define TEST_ASI_BEGIN(name,iters,size,bank) do { \ if (_test_asi_interval) { \ {size_t _new_sz = (size); \ int _bank = (bank); \ assert(_bank < TEST_ASI_BANKS); \ assert(_new_sz > 0); \ _test_asi_retry = 0; \ if (!_test_asi_sz[_bank]) { /* first use this test */ \ _test_asi_iters[_bank] = 1; /* slow start and warmup */ \ _test_asi_sz[_bank] = _new_sz; \ } else if (_new_sz != _test_asi_sz[_bank]) { /* scale */ \ _test_asi_iters[_bank] *= \ ((double) _test_asi_sz[_bank] / _new_sz ); \ _test_asi_iters[_bank] = MAX(1,_test_asi_iters[_bank]); \ _test_asi_sz[_bank] = _new_sz; \ } \ _test_asi_bank = _bank; \ } _TEST_ASI_##name: \ assert(_test_asi_iters[_test_asi_bank] > 0); \ (iters) = _test_asi_iters[_test_asi_bank]; \ _test_asi_begin = gasnett_ticks_now(); \ } \ } while (0) // end a timed region, may increase iters and branch back to the named label // call this AFTER test's own end timer #define TEST_ASI_END(name,iters) do { \ if (_test_asi_interval) { \ assert(_test_asi_begin); \ gasnett_tick_t _int = gasnett_ticks_now() - _test_asi_begin; \ _test_asi_begin = 0; \ if (_int < _test_asi_interval) { /* too fast, retry */ \ _test_asi_iters[_test_asi_bank] *= 2; \ _test_asi_retry++; \ goto _TEST_ASI_##name; \ } \ if (TEST_ASI_DEBUG) \ MSG(" ASI: retries=%d final iters=%i final time=%0.3fs", \ (int)_test_asi_retry,(int)_test_asi_iters[_test_asi_bank],\ (double)gasnett_ticks_to_ns(_int)/1.0e9); \ if (_int > 3*_test_asi_interval) { /* too slow, reset next */ \ _test_asi_sz[_test_asi_bank] = 0; \ } \ } \ } while (0) /* ------------------------------------------------------------------------------------ */ /* memory management */ static void *_test_malloc(size_t sz, const char *curloc) { void *ptr; ptr = malloc(sz); if (ptr == NULL) FATALERR("Failed to malloc(%" PRIuPTR ") bytes at %s\n",(uintptr_t)sz,curloc); return ptr; } static void *_test_calloc(size_t sz, const char *curloc) { void *retval = _test_malloc(sz, curloc); if (retval) memset(retval, 0, sz); return retval; } #define test_malloc(sz) _test_malloc((sz), __FILE__ ":" _STRINGIFY(__LINE__)) #define test_calloc(N,S) _test_calloc((N*S), __FILE__ ":" _STRINGIFY(__LINE__)) #define test_free(p) free(p) /* ------------------------------------------------------------------------------------ */ /* progress bar */ #ifndef TEST_PROGRESS_STEPS #define TEST_PROGRESS_STEPS 10 #endif /* node 0 caller should call with curriter=0..(numiters-1) */ #define TEST_PROGRESS_BAR(curriter, numiters) do { \ static int _breakwidth, _breakpt; \ if_pf(curriter == 0) { \ _breakwidth = MAX(1,((numiters)/TEST_PROGRESS_STEPS)); \ _breakpt = _breakwidth; \ } \ if (((curriter)+1) == _breakpt) { \ MSG0("%i%%",(int)(100.0*((curriter)+1)/(numiters))); \ _breakpt += _breakwidth; \ } \ } while (0) /* ------------------------------------------------------------------------------------ */ /* Functions for obtaining calibrated delays */ #ifdef TEST_DELAY /* NOTE: If you #define TEST_DELAY, be certain Makefile.in shows you depend on delay.o */ extern void test_delay(int64_t n, int pollcnt); /* in delay.o */ /* smallest number of delay loops to try in calibration */ #ifndef TEST_DELAY_LOOP_MIN #define TEST_DELAY_LOOP_MIN 100 #endif /* max number of calibration iterations to wait for convergance */ #ifndef TEST_DELAY_CALIBRATION_LIMIT #define TEST_DELAY_CALIBRATION_LIMIT 100 #endif /* Compute the number of loops needed to get no less that the specified delay * when executing "test_delay(loops, pollcnt)" exactly 'iters' times. * * Returns the number of loops needed and overwrites the argument with the * actual achieved delay for 'iters' calls to "delay(*time_p)". * The 'time_p' is given in microseconds. */ static int64_t test_calibrate_delay(int iters, int pollcnt, int64_t *time_p) { int64_t begin, end, time; float target = *time_p; float ratio = 0.0; int i; int64_t loops = 0; int caliters = 0; do { if (loops == 0) { loops = TEST_DELAY_LOOP_MIN; /* first pass */ } else { int64_t tmp = loops * ratio; if (tmp > loops) { loops = tmp; } else { loops += 1; /* ensure progress in the face of round-off */ } assert(loops < 1ll<<62); } begin = TIME(); for (i = 0; i < iters; i++) { test_delay(loops, pollcnt); } end = TIME(); time = end - begin; assert(time >= 0); if (time == 0) ratio = 2.0;/* handle systems with very high granularity clocks */ else ratio = target / (float)time; caliters++; if (caliters > TEST_DELAY_CALIBRATION_LIMIT) FATALERR("test_calibrate_delay(%i,%i,%i) failed to converge after %i iterations.\n", iters, pollcnt, (int)*time_p, iters); #if 0 printf("loops=%" PRIi64 "\n",loops); fflush(stdout); printf("ratio=%f target=%f time=%" PRIi64 "\n",ratio,target,time); fflush(stdout); #endif } while (ratio > 1.0); *time_p = time; return loops; } #endif /* ------------------------------------------------------------------------------------ */ /* config strings */ #ifndef TEST_OMIT_CONFIGSTRINGS #ifdef TEST_GASNETEX_H #define TEST_CONFIG_STRING GASNET_CONFIG_STRING #define TEST_TITANIUM_BACKEND "gasnet-" GASNET_CONDUIT_NAME_STR "-uni" #else #ifndef GASNETI_TOOLS_CONDUIT #define GASNETI_TOOLS_CONDUIT SMP #endif #define TEST_TITANIUM_BACKEND "sequential" #define TEST_CONFIG_STRING \ "RELEASE=x,SPEC=x,CONDUIT=" _STRINGIFY(GASNETI_TOOLS_CONDUIT) "(" _STRINGIFY(GASNETI_TOOLS_CONDUIT) "-x/REFERENCE-x),THREADMODEL=PAR,SEGMENT=FAST,PTR=x,align,nodebug,notrace,nostats" #endif /* mimic Berkeley UPC build config strings, to allow running GASNet tests using upcrun */ GASNETT_IDENT(GASNetT_IdentString_link_GASNetConfig, "$GASNetConfig: () " TEST_CONFIG_STRING " $"); #if !TEST_PAR /* pthread support is compiled out - ensure upcrun never tries to use it */ #if GASNET_PSHM || (defined(GASNETI_PSHM_ENABLED) && defined(TEST_GASNET_TOOLS_ONLY)) #define TEST_SHMEM_CONFIG "pshm" #else #define TEST_SHMEM_CONFIG "none" #endif #else /* mimic pthreads, to ensure harness -pthreads=T -threads=N will run us such a setup will only run the gasnet test on N/T nodes (as opposed to N as one might like) but the alternative is not to run at all. harness -nopthreads does not have this problem. */ #if GASNET_PSHM || (defined(GASNETI_PSHM_ENABLED) && defined(TEST_GASNET_TOOLS_ONLY)) #define TEST_SHMEM_CONFIG "pthreads/pshm" #else #define TEST_SHMEM_CONFIG "pthreads" #endif GASNETT_IDENT(GASNetT_IdentString_PthCnt, "$UPCRDefaultPthreadCount: 1 $"); #endif GASNETT_IDENT(GASNetT_IdentString_link_UPCRConfig, "$UPCRConfig: () " TEST_CONFIG_STRING ",SHMEM=" TEST_SHMEM_CONFIG ",SHAREDPTRREP=packed,dynamicthreads $"); GASNETT_IDENT(GASNetT_IdentString_link_upcver, "$UPCVersion: () *** GASNet test *** $"); GASNETT_IDENT(GASNetT_IdentString_link_compileline, "$UPCCompileLine: () *** GASNet test *** $"); GASNETT_IDENT(GASNetT_IdentString_link_compiletime, "$UPCCompileTime: () " __DATE__ " " __TIME__ " $"); GASNETT_IDENT(GASNetT_IdentString_HeapSz, "$UPCRDefaultHeapSizes: UPC_SHARED_HEAP_OFFSET=0 UPC_SHARED_HEAP_SIZE=0 $"); #if PLATFORM_ARCH_32 GASNETT_IDENT(GASNetT_IdentString_PtrSz, "$UPCRSizeof: void_ptr=( $"); #else GASNETT_IDENT(GASNetT_IdentString_PtrSz, "$UPCRSizeof: void_ptr=, $"); #endif GASNETT_IDENT(GASNetT_IdentString_ABI, "$UPCRBinaryInterface: " GASNETT_SYSTEM_TUPLE " $"); /* Ditto for Titanium tcrun */ GASNETT_IDENT(GASNetT_TiBackend_IdentString, "$TitaniumBackend: " TEST_TITANIUM_BACKEND " $"); GASNETT_IDENT(GASNetT_TiCompiler_IdentString, "$TitaniumCompilerFlags: *** GASNet test *** -g $"); #endif #if TEST_PAR /* create numthreads pthreads to call start_routine. if threadarg_arr is NULL, then a unique 0-based integer threadid is passed as arg to start_routine else threadarg_arr is an array of numthreads opaque datastructures of size threadarg_elemsz bytes each, and each thread recieves a pointer to a unique element of this array as the arg to start_routine then join the threads and add any non-zero results to test_errs TEST_USE_PRIMORDIAL_THREAD can be defined to spawn only numthreads-1 new pthreads and run the last on this thread */ #ifndef TEST_USE_PRIMORDIAL_THREAD #if PLATFORM_OS_SUBFAMILY_CNL /* some do default thread pinning that can mess with our results */ #define TEST_USE_PRIMORDIAL_THREAD 1 #else #define TEST_USE_PRIMORDIAL_THREAD 0 #endif #endif #ifndef TEST_MAXTHREADS /* TEST_MAXTHREADS is a compile-time constant */ #if GASNETT_MAX_THREADS > 1 /* may be missing for tools-only */ #define TEST_MAXTHREADS_SYSTEM GASNETT_MAX_THREADS #else #define TEST_MAXTHREADS_SYSTEM 256 #endif #define TEST_MAXTHREADS (TEST_MAXTHREADS_SYSTEM + TEST_USE_PRIMORDIAL_THREAD - 1) #endif /* Runtime enforcement of TEST_MAXTHREADS, GASNET_TEST_THREAD_LIMIT, or platform-specific limits */ static int test_thread_limit(int numthreads) { int limit = gasnett_getenv_int_withdefault("GASNET_TEST_THREAD_LIMIT", TEST_MAXTHREADS, 0); limit = MIN(limit, TEST_MAXTHREADS); /* Ignore attempt to raise above TEST_MAXTHREADS */ return MIN(numthreads, limit); } #if HAVE_PTHREAD_SETCONCURRENCY && __cplusplus // ensure we have a declaration for the configure-detected function #undef pthread_setconcurrency #ifndef __THROW #define __THROW #endif extern "C" int pthread_setconcurrency(int) __THROW; #endif static void test_createandjoin_pthreads(int numthreads, void *(*start_routine)(void *), void *threadarg_arr, size_t threadarg_elemsz) { int i; int jointhreads = 0; uint8_t *threadarg_pos = (uint8_t *)threadarg_arr; pthread_t *threadid = (pthread_t *)test_malloc(sizeof(pthread_t)*numthreads); #if HAVE_PTHREAD_SETCONCURRENCY pthread_setconcurrency(numthreads); #endif for(i=0;i static void test_pthread_barrier(unsigned int local_pthread_count, int doGASNetbarrier) { static gasnett_mutex_t barrier_mutex = GASNETT_MUTEX_INITIALIZER; static volatile int phase = 0; static volatile unsigned int barrier_count = 0; static sem_t sem[2]; gasnett_mutex_lock(&barrier_mutex); { int myphase = phase; static volatile int firsttime = 1; if (firsttime) { check_zeroret(sem_init(&sem[0], 0, 0)); check_zeroret(sem_init(&sem[1], 0, 0)); firsttime = 0; } barrier_count++; if (barrier_count < local_pthread_count) { gasnett_mutex_unlock(&barrier_mutex); check_zeroret(sem_wait(&sem[myphase])); } else { int i; if (doGASNetbarrier) BARRIER(); barrier_count = 0; phase = !phase; gasnett_mutex_unlock(&barrier_mutex); for (i=0; i < (int)(local_pthread_count-1); i++) { check_zeroret(sem_post(&sem[myphase])); } } } } #else static void test_pthread_barrier(unsigned int local_pthread_count, int doGASNetbarrier) { /* cond variables must be phased on some OS's (HPUX) */ static struct { gasnett_cond_t cond; gasnett_mutex_t mutex; } barrier[2] = { { GASNETT_COND_INITIALIZER, GASNETT_MUTEX_INITIALIZER }, { GASNETT_COND_INITIALIZER, GASNETT_MUTEX_INITIALIZER }}; static volatile unsigned int barrier_count = 0; static volatile int phase = 0; const int myphase = phase; gasnett_mutex_lock(&(barrier[myphase].mutex)); barrier_count = 1 + barrier_count; // C++20 deprecates ++ and += on volatile if (barrier_count < local_pthread_count) { /* CAUTION: changing the "do-while" to a "while" triggers a bug in the SunStudio 2006-08 * compiler for x86_64. See https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=1858 * which includes a link to Sun's own database entry for this issue. */ do { gasnett_cond_wait(&(barrier[myphase].cond), &(barrier[myphase].mutex)); } while (myphase == phase); } else { /* Now do the gasnet barrier */ if (doGASNetbarrier) BARRIER(); barrier_count = 0; phase = !phase; gasnett_cond_broadcast(&(barrier[myphase].cond)); } gasnett_mutex_unlock(&(barrier[myphase].mutex)); } #endif #define PTHREAD_BARRIER(local_pthread_count) \ test_pthread_barrier(local_pthread_count, 1) #define PTHREAD_LOCALBARRIER(local_pthread_count) \ test_pthread_barrier(local_pthread_count, 0) #else #define PTHREAD_BARRIER(local_pthread_count) do { \ PTHREAD_LOCALBARRIER(local_pthread_count); \ BARRIER(); \ } while (0) #define PTHREAD_LOCALBARRIER(local_pthread_count) do { \ if (local_pthread_count != 1) \ FATALERR("cannot call PTHREAD_BARRIER in GASNET_SEQ mode"); \ } while (0) #endif /* cheap and simple broadcast operation */ #define TEST_BCAST(dst, rootid, src, sz) do { \ assert_always(_test_tm0 != GEX_TM_INVALID); \ gex_Event_Wait(gex_Coll_BroadcastNB(_test_tm0, (rootid), (dst), (src), (sz), 0)); \ } while (0) /* ------------------------------------------------------------------------------------ */ /* standard messages */ static void TEST_DEBUGPERFORMANCE_WARNING(void) { if (TEST_MYPROC == 0) { const char *warning = gasnett_performance_warning_str(); if (*warning) { fflush(NULL); fprintf(stdout, "-----------------------------------------------------------------------\n" " WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n" "\n" " GASNet was configured and built with these optional features enabled:\n" "%s" " This usually has a SERIOUS impact on performance, so you should NOT\n" " trust any performance numbers reported in this run!!!\n" " You should configure and build from scratch without the configure\n" " flags that enable the optional additional checking/reporting.\n" "\n" " WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n" "-----------------------------------------------------------------------\n", warning); fflush(NULL); } } } #define TEST_PRINT_CONDUITINFO() do { \ MSG0("%s conduit: v%s GASNET_ALIGNED_SEGMENTS=%i\n" \ " gex_AM_MaxArgs(): %i\n" \ " gex_AM_LUBRequestMedium(): %i\n" \ " gex_AM_LUBReplyMedium(): %i\n" \ " gex_AM_LUBRequestLong(): %i\n" \ " gex_AM_LUBReplyLong(): %i" \ , \ _STRINGIFY(GASNET_CORE_NAME), _STRINGIFY(GASNET_CORE_VERSION), \ GASNET_ALIGNED_SEGMENTS, \ (int)gex_AM_MaxArgs(), \ (int)gex_AM_LUBRequestMedium(), \ (int)gex_AM_LUBReplyMedium(), \ (int)gex_AM_LUBRequestLong(), \ (int)gex_AM_LUBReplyLong()); \ } while (0) #if defined(GASNET_SEQ) #define TEST_PARSEQ SEQ #elif defined(GASNET_PAR) #define TEST_PARSEQ PAR #elif defined(GASNET_PARSYNC) #define TEST_PARSEQ PARSYNC #endif /* ------------------------------------------------------------------------------------ */ /* segment management */ #ifndef TEST_SEGSZ_PADFACTOR #define TEST_SEGSZ_PADFACTOR 1 #endif #define TEST_SEGSZ_REQUEST (TEST_SEGSZ_PADFACTOR*TEST_SEGSZ) #if defined(GASNET_PAR) || defined(GASNET_PARSYNC) #ifndef TEST_MAXTHREADS #define TEST_MAXTHREADS GASNETT_MAX_THREADS #endif #ifndef TEST_SEGZ_PER_THREAD // provides a default per-thread segsize when TEST_SEGSZ not defined #define TEST_SEGZ_PER_THREAD ((uintptr_t)64*1024) #endif #ifndef TEST_SEGSZ // TEST_SEGSZ provides a statically-known override value #ifdef TEST_SEGSZ_EXPR // TEST_SEGSZ_EXPR provides a value not statically known #define TEST_SEGSZ alignup(TEST_SEGSZ_EXPR,PAGESZ) #else #define TEST_SEGSZ alignup(TEST_MAXTHREADS*TEST_SEGZ_PER_THREAD,PAGESZ) test_static_assert_file(TEST_SEGSZ >= (TEST_MAXTHREADS*TEST_SEGZ_PER_THREAD)); #endif #endif #else #ifndef TEST_SEGSZ #ifdef TEST_SEGSZ_EXPR #define TEST_SEGSZ alignup(TEST_SEGSZ_EXPR,PAGESZ) #else #define TEST_SEGSZ alignup(64*1024,PAGESZ) #endif #endif #endif #ifndef TEST_SEGSZ_EXPR // validate TEST_SEGSZ properties, when the value is statically-known test_static_assert_file(TEST_SEGSZ > 0); test_static_assert_file(TEST_SEGSZ % PAGESZ == 0); test_static_assert_file(TEST_SEGSZ_REQUEST % PAGESZ == 0); #endif #define TEST_MINHEAPOFFSET alignup(128*4096,PAGESZ) #if (TEST_MINHEAPOFFSET % PAGESZ) != 0 #error Bad TEST_MINHEAPOFFSET #endif static size_t test_num_am_handlers = 0; #ifdef GASNET_SEGMENT_EVERYTHING /* following trivially handles the case where static data is aligned across the nodes, and also works on X-1 where the static data is misaligned across nodes. The only assumption is that AM mediums, barriers and atomics work properly We intercept the gasnet_attach or gex_Segment_Attach call and do the segment exchange there */ static gasnet_seginfo_t *_test_seginfo; static int _test_seggather_idx; static gasnett_atomic_t _test_seggather_done = gasnett_atomic_init(0); static void _test_seggather(gex_Token_t token, void *buf, size_t nbytes) { assert(nbytes == sizeof(gasnet_seginfo_t)); assert(_test_seginfo != NULL); gex_Rank_t srcid = test_msgsource(token); assert(srcid < TEST_PROCS); _test_seginfo[srcid] = *(gasnet_seginfo_t *)buf; gasnett_atomic_increment(&_test_seggather_done, GASNETT_ATOMIC_REL); } static int _test_segbcast_idx; static gasnett_atomic_t _test_segbcast_count = gasnett_atomic_init(0); static void _test_segbcast(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t idx) { void *dst = (void*)((uintptr_t)_test_seginfo + idx * gex_AM_LUBRequestMedium()); memcpy(dst, buf, nbytes); gasnett_atomic_increment(&_test_segbcast_count, GASNETT_ATOMIC_REL); } static int _test_create_test_segment(gex_TM_t tm, uintptr_t segsize) { #ifdef TEST_SEGSZ_EXPR /* dynamically allocate segment */ uint8_t *_test_hidden_seg; #else /* use a block of static data as the segment */ static uint8_t _test_hidden_seg[TEST_SEGSZ+PAGESZ]; #endif int i; gasnet_seginfo_t myseg; gex_AM_Entry_t mytab[] = { { 0, (gex_AM_Fn_t)_test_seggather, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 0, NULL, NULL }, { 0, (gex_AM_Fn_t)_test_segbcast, GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, 1, NULL, NULL } }; size_t numentries = sizeof(mytab)/sizeof(gex_AM_Entry_t); test_num_am_handlers += numentries; GASNET_Safe(gex_EP_RegisterHandlers(gex_TM_QueryEP(tm), mytab, numentries)); _test_seggather_idx = mytab[0].gex_index; _test_segbcast_idx = mytab[1].gex_index; gex_Rank_t myrank = gex_TM_QueryRank(tm); gex_Rank_t numrank = gex_TM_QuerySize(tm); _test_seginfo = (gasnet_seginfo_t *)test_calloc(numrank,sizeof(gasnet_seginfo_t)); #ifdef TEST_SEGSZ_EXPR _test_hidden_seg = (uint8_t *)test_malloc(TEST_SEGSZ+PAGESZ); #endif myseg = _test_seginfo[myrank]; myseg.addr = ((void *)(((uint8_t*)_test_hidden_seg) + (((((uintptr_t)_test_hidden_seg)%PAGESZ) == 0)? 0 : (PAGESZ-(((uintptr_t)_test_hidden_seg)%PAGESZ))))); myseg.size = TEST_SEGSZ; BARRIER(); gex_AM_RequestMedium0(tm, 0, _test_seggather_idx, &myseg, sizeof(gasnet_seginfo_t), GEX_EVENT_NOW, 0); { const size_t total_bytes = numrank*sizeof(gasnet_seginfo_t); const size_t msg_bytes = gex_AM_LUBRequestMedium(); const int msg_count = (total_bytes + msg_bytes - 1) / msg_bytes; if (myrank == 0) { size_t remain = total_bytes; void *payload = _test_seginfo; int idx; GASNET_BLOCKUNTIL((int)gasnett_atomic_read(&_test_seggather_done, 0) == (int)numrank); for (idx = 0; idx < msg_count; ++idx) { const size_t nbytes = MIN(remain, msg_bytes); for (i=0; i < (int)numrank; i++) { gex_AM_RequestMedium1(tm, i, _test_segbcast_idx, payload, nbytes, GEX_EVENT_NOW, 0, idx); } remain -= nbytes; payload = (void*)((uintptr_t)payload + nbytes); } } GASNET_BLOCKUNTIL((int)gasnett_atomic_read(&_test_segbcast_count, 0) == msg_count); } BARRIER(); for (i=0; i < (int)numrank; i++) { assert_always(_test_seginfo[i].size >= TEST_SEGSZ); assert_always((((uintptr_t)_test_seginfo[i].addr) % PAGESZ) == 0); } return GASNET_OK; } #ifdef _INCLUDED_GASNET_H static int _test_attach(gasnet_handlerentry_t *table, int numentries, uintptr_t segsize, uintptr_t minheapoffset) { /* do regular attach, then setup seg_everything segment */ GASNET_Safe(gasnet_attach(table, numentries, segsize, minheapoffset)); gasnet_QueryGexObjects(NULL,NULL,&_test_tm0,NULL); return _test_create_test_segment(_test_tm0, segsize); } #undef gasnet_attach #define gasnet_attach _test_attach #endif static int _test_Segment_Attach( gex_Segment_t *segment_p, gex_TM_t tm, uintptr_t length) { _test_tm0 = tm; return _test_create_test_segment(tm, length); } #undef gex_Segment_Attach #define gex_Segment_Attach _test_Segment_Attach #define TEST_SEG(node) (assert(_test_seginfo), _test_seginfo[node].addr) #else /* Segment FAST or LARGE * Wrap gasnet_attach() or gex_Segment_Attach() to validate * the allocated segment size, alignment, etc. */ #ifdef _INCLUDED_GASNET_H static int _test_attach(gasnet_handlerentry_t *table, int numentries, uintptr_t segsize, uintptr_t minheapoffset) { GASNET_Safe(gasnet_attach(table, numentries, segsize, minheapoffset)); gex_Rank_t i; gasnet_seginfo_t *s = (gasnet_seginfo_t *)test_malloc(TEST_PROCS*sizeof(gasnet_seginfo_t)); GASNET_Safe(gasnet_getSegmentInfo(s, TEST_PROCS)); for (i=0; i < TEST_PROCS; i++) { assert_always(s[i].size >= TEST_SEGSZ); assert_always(((uintptr_t)s[i].size) % PAGESZ == 0); #if GASNET_ALIGNED_SEGMENTS == 1 assert_always(s[i].addr == s[0].addr); #endif } test_free(s); gasnet_QueryGexObjects(NULL,NULL,&_test_tm0,NULL); return GASNET_OK; } #undef gasnet_attach #define gasnet_attach _test_attach #endif static int _test_Segment_Attach( gex_Segment_t *segment_p, gex_TM_t tm, uintptr_t length) { GASNET_Safe(gex_Segment_Attach(segment_p, tm, length)); BARRIER(); for (gex_Rank_t i=0; i < TEST_PROCS; i++) { uintptr_t _size; gex_Event_Wait( gex_EP_QueryBoundSegmentNB(tm, i, NULL, NULL, &_size, 0) ); assert_always(_size >= TEST_SEGSZ); assert_always(((uintptr_t)_size) % PAGESZ == 0); } _test_tm0 = tm; return GASNET_OK; } #undef gex_Segment_Attach #define gex_Segment_Attach _test_Segment_Attach static void* _test_seg(gex_Rank_t rank) { void *addr = NULL; gex_Flags_t imm = (rank == TEST_MYPROC) ? GEX_FLAG_IMMEDIATE : 0; gex_Event_t ev = gex_EP_QueryBoundSegmentNB(_test_tm0, rank, &addr, NULL, NULL, imm); if (!imm) gex_Event_Wait(ev); else assert (ev == GEX_EVENT_INVALID); return addr; } #define TEST_SEG(rank) _test_seg(rank) #endif #define TEST_MYSEG() (TEST_SEG(TEST_MYPROC)) // helper for SEGMENT_EVERYTHING static void *TEST_SEG_TM(gex_TM_t tm, gex_Rank_t rank) { #if GASNET_SEGMENT_EVERYTHING return TEST_SEG(gex_TM_TranslateRankToJobrank(tm, rank)); #else void *result; gex_Flags_t imm = (rank == gex_TM_QueryRank(tm)) ? GEX_FLAG_IMMEDIATE : 0; gex_Event_t ev = gex_EP_QueryBoundSegmentNB(tm, rank, &result, NULL, NULL, imm); if (!imm) gex_Event_Wait(ev); else assert (ev == GEX_EVENT_INVALID); return result; #endif } /* ------------------------------------------------------------------------------------ */ /* segment alignment */ #if defined(GASNET_SEGMENT_EVERYTHING) || !GASNET_ALIGNED_SEGMENTS || !defined(_INCLUDED_GASNET_H) static int TEST_ALIGNED_SEGMENTS(void) { static volatile int is_aligned = -1; if_pf (is_aligned < 0) { int result = 1; /* Assume aligned until we find otherwise */ void *addr0 = TEST_SEG(0); gex_Rank_t i; for (i = 1; i < TEST_PROCS; i++) { if (TEST_SEG(i) != addr0) { result = 0; break; } } is_aligned = result; } return is_aligned; } #else #define TEST_ALIGNED_SEGMENTS() 1 #endif /* ------------------------------------------------------------------------------------ */ /* local process and thread count management */ static gex_Rank_t _test_firstnode; static int _test_localprocs(void) { /* First call is not thread safe */ static gex_Rank_t count = 0; if (!count) { gex_System_QueryHostInfo(NULL, &count, NULL); } assert(count > 0); return count; } #define TEST_LOCALPROCS() (_test_localprocs()) static int _test_in_polite_mode = 0; static void test_yield_if_polite(void) { if (_test_in_polite_mode) gasnett_sched_yield(); } static void _test_set_waitmode(int threads, int reserve_cores) { const int local_procs = TEST_LOCALPROCS(); if (gasnett_getenv_yesno_withdefault("GASNET_TEST_POLITE_SYNC",0)) return; // already set #if TEST_PAR if (threads > 1) { int threads_serialized = 0; #if PLATFORM_OS_OPENBSD /* check for userland "uthreads" running on a single core */ pthread_attr_t attr; pthread_attr_init(&attr); threads_serialized = (0 != pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)); #endif if (threads_serialized) { if (_test_firstnode == TEST_MYPROC) MSG("WARNING: per-proc thread count (%i) exceeds platform's concurrency " "- enabling \"polite\", low-performance synchronization algorithms", threads); gasnet_set_waitmode(GASNET_WAIT_BLOCK); _test_in_polite_mode = 1; return; } } #endif threads *= local_procs; if (threads + reserve_cores > gasnett_cpu_count()) { if (_test_firstnode == TEST_MYPROC) { char reserve[80]; if (reserve_cores) sprintf(reserve, " + %i reserved cores", reserve_cores); else reserve[0] = 0; MSG("WARNING: per-node thread count (%i%s) exceeds actual cpu count (%i) " "- enabling \"polite\", low-performance synchronization algorithms", threads, reserve, gasnett_cpu_count()); } gasnet_set_waitmode(GASNET_WAIT_BLOCK); _test_in_polite_mode = 1; } } // Compute whether `th` (single-valued) threads per process for the current host // would lead to overcommit, and set waitmode appropriately. // The second variant reserves additional cores to leave idle, eg for system daemons #define TEST_SET_WAITMODE(th) _test_set_waitmode(th,0) #define TEST_SET_WAITMODE_RESERVE(th,reserve) _test_set_waitmode(th,reserve) #endif /* TEST_GASNETEX_H */ /* ------------------------------------------------------------------------------------ */ /* test initialization boilerplate */ #if PLATFORM_ARCH_ALPHA || PLATFORM_ARCH_CRAYT3E #define TEST_SIG_INIT() gasnett_reghandler(SIGFPE, SIG_IGN) #else #define TEST_SIG_INIT() #endif static void TEST_GENERICS_WARNING(void) { #ifdef TEST_GASNETEX_H if (TEST_MYPROC == 0) #endif { #ifdef GASNETT_USING_GETTIMEOFDAY fflush(NULL); fprintf(stdout, "WARNING: using gettimeofday() for timing measurement - all short-term time measurements\n" "WARNING: will be very rough and include significant timer overheads\n"); fflush(NULL); #endif #ifdef GASNETT_USING_GENERIC_ATOMICOPS fflush(NULL); fprintf(stdout, "WARNING: using generic mutex-based GASNet atomics, which are likely to have high overhead\n" "WARNING: consider implementing true GASNet atomics, if supported by your platform/compiler\n"); fflush(NULL); #endif } } static const char *_test_usagestr = NULL; static const char *_test_testname = NULL; static const char *_test_argvzero = NULL; static void _test_usage(int early) { #ifdef TEST_GASNETEX_H if (TEST_MYPROC == 0) { fprintf(stderr, "%s %s\n", _test_testname, GASNET_CONFIG_STRING); fprintf(stderr, "Usage: %s %s%s", _test_argvzero, _test_usagestr, (_test_usagestr[strlen(_test_usagestr)-1] == '\n' ? "" : "\n")); fflush(NULL); sleep(1); gasnet_exit(1); } else { /* wait to die */ if (early) { // we are waiting for node 0 to kill the job, but cannot safely AMpoll before attach // wait for a bounded time, and then force an exit to prevent zombies on polling-only conduits gasnett_tick_t starttime = gasnett_ticks_now(); sleep(1); while (gasnett_ticks_to_us(gasnett_ticks_now()-starttime)<5000000) gasnett_sched_yield(); gasnet_exit(-1); } else BARRIER(); } #else fprintf(stderr, "%s %s\n", _test_testname, GASNETT_CONFIG_STRING); fprintf(stderr, "Usage: %s %s%s", _test_argvzero, _test_usagestr, (_test_usagestr[strlen(_test_usagestr)-1] == '\n' ? "" : "\n")); fflush(NULL); sleep(1); exit(1); #endif } #define test_usage() _test_usage(0) #define test_usage_early() _test_usage(1) static void _test_init(const char *testname, int reports_performance, int early, int argc, const char * const *argv, const char *usagestr) { /* convenient place to put inits we want in all tests */ int i; _test_usagestr = strdup(usagestr); _test_testname = strdup(testname); _test_argvzero = strdup(argv[0]); for (i = 0; i < argc; i++) { /* check for standard help option */ if (!strcmp(argv[i],"-h") || !strcmp(argv[i],"--h") || !strcmp(argv[i],"-help") || !strcmp(argv[i],"--help")) _test_usage(early); } TEST_SIG_INIT(); #ifdef TEST_GASNETEX_H if (!early) BARRIER(); if (reports_performance) { TEST_DEBUGPERFORMANCE_WARNING(); TEST_GENERICS_WARNING(); if (TEST_MYPROC == 0) fprintf(stdout, "Timer granularity: <= %.3f us, overhead: ~ %.3f us\n", gasnett_tick_granularityus(), gasnett_tick_overheadus()); fflush(NULL); } if (gasnett_getenv_yesno_withdefault("GASNET_TEST_POLITE_SYNC",0)) { MSG0("WARNING: GASNET_TEST_POLITE_SYNC is set - enabling \"polite\", low-performance synchronization algorithms"); gasnet_set_waitmode(GASNET_WAIT_BLOCK); _test_in_polite_mode = 1; } MSG0("=====> %s nprocs=%d config=%s compiler=%s/%s sys=%s", testname, (int)TEST_PROCS, GASNET_CONFIG_STRING, _STRINGIFY(PLATFORM_COMPILER_FAMILYNAME), PLATFORM_COMPILER_VERSION_STR, GASNETT_SYSTEM_TUPLE); fflush(NULL); /* must use malloc here, pre-attach if "early" */ gex_Rank_t nbrhd_rank; gex_System_QueryMyPosition(NULL,&nbrhd_rank,NULL,NULL); if (!early) { BARRIER(); } else gasnett_nsleep(250000); MSG("hostname is: %s (supernode=%i pid=%i)", gasnett_gethostname(), (int)nbrhd_rank, (int)getpid()); fflush(NULL); if (!early) BARRIER(); #else MSG0("=====> %s config=%s compiler=%s/%s sys=%s", testname, GASNETT_CONFIG_STRING, _STRINGIFY(PLATFORM_COMPILER_FAMILYNAME), PLATFORM_COMPILER_VERSION_STR, GASNETT_SYSTEM_TUPLE); MSG("hostname is: %s (pid=%i)", gasnett_gethostname(), (int)getpid()); fflush(NULL); #endif if (gasnett_verboseenv()) MSG("%s running...", testname); } #define test_init(testname, reports_performance, usagestr) \ _test_init(testname, reports_performance, 0, argc, (const char * const *)argv, usagestr) #define test_init_early(testname, reports_performance, usagestr) \ _test_init(testname, reports_performance, 1, argc, (const char * const *)argv, usagestr) #define TEST_BACKTRACE_DECLS() \ static int test_my_backtrace = 0; \ static volatile int test_my_backtrace_ran = 0; \ GASNETT_EXTERNC int test_my_backtrace_fn(int fd) { \ if (test_my_backtrace_ran != -1) { \ /* Indicate FAILURE if we were not testing */ \ /* So the next available mechanism will run. */ \ return 1; \ } \ test_my_backtrace_ran = 1; \ return 0; \ } \ gasnett_backtrace_type_t gasnett_backtrace_user = { \ "USER", &test_my_backtrace_fn, 1 \ } #define TEST_BACKTRACE_INIT(_exename) \ /* Only test our backtrace handler if the user is not trying to backtrace */ \ /* Bug 3644: cannot reliably override GASNET_BACKTRACE_TYPE if already set */ \ if (!gasnett_getenv("GASNET_BACKTRACE") && \ !gasnett_getenv("GASNET_BACKTRACE_TYPE")) { \ test_my_backtrace = 1; \ gasnett_setenv("GASNET_BACKTRACE_TYPE","USER"); \ } \ gasnett_backtrace_init(_exename) #define TEST_BACKTRACE() do { \ if (test_my_backtrace) { \ test_my_backtrace_ran = -1; \ gasnett_print_backtrace(STDOUT_FILENO); \ if (test_my_backtrace_ran != 1) { \ ERR("failed to run user-supplied backtrace code\n");\ } \ } \ } while(0) #define TEST_TRACING_MACROS() do { \ const char *file; test_mark_used(file); \ unsigned int line; test_mark_used(line); \ GASNETT_TRACE_GETSOURCELINE(&file, &line); \ GASNETT_TRACE_SETSOURCELINE(file, line); \ GASNETT_TRACE_FREEZESOURCELINE(); \ GASNETT_TRACE_UNFREEZESOURCELINE(); \ if (GASNETT_TRACE_ENABLED) \ GASNETT_TRACE_PRINTF("TEST_TRACING_MACROS: GASNETT_TRACE_PRINTF(%i)",42); \ GASNETT_TRACE_PRINTF_FORCE("TEST_TRACING_MACROS: GASNETT_TRACE_PRINTF_FORCE(%i)",42); \ GASNETT_TRACE_SETMASK(GASNETT_TRACE_GETMASK()); \ GASNETT_STATS_SETMASK(GASNETT_STATS_GETMASK()); \ GASNETT_TRACE_SET_TRACELOCAL(GASNETT_TRACE_GET_TRACELOCAL()); \ GASNETT_STATS_PRINTF("TEST_TRACING_MACROS: GASNETT_STATS_PRINTF(%i)",42); \ GASNETT_STATS_PRINTF_FORCE("TEST_TRACING_MACROS: GASNETT_STATS_PRINTF_FORCE(%i)",42); \ GASNETT_STATS_DUMP(/*reset=*/1); \ } while (0) GASNETT_END_EXTERNC #endif gasnet-2025.8.0/tests/testreduce.c0000664000175000017500000004630515142313673017107 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/tests/testreduce.c $ * Description: test of user-defined reductions * Copyright 2018, The Regents of the University of California * Terms of use are as specified in license.txt */ #define SCRATCH_SIZE (2*1024*1024) #ifndef TEST_SEGSZ #define TEST_SEGSZ (PAGESZ + SCRATCH_SIZE) // even team's scratch + pad #endif #include #include #include #include #include #include #include // Size of vector static int Nelem; #define NELEM_DEFAULT 64 // Polymorphic operator for a commutative operation: addition void op_ADD(const void * arg1, void * arg2_and_out, size_t count, const void * cdata) { gex_DT_t dt = (gex_DT_t)(uintptr_t)cdata; switch (dt) { case GEX_DT_I32: case GEX_DT_U32: { const uint32_t * restrict x = arg1; uint32_t * restrict y = arg2_and_out; for (size_t i = 0; i < count; ++i) y[i] += x[i]; break; } case GEX_DT_I64: case GEX_DT_U64: { const uint64_t * restrict x = arg1; uint64_t * restrict y = arg2_and_out; for (size_t i = 0; i < count; ++i) y[i] += x[i]; break; } case GEX_DT_FLT: { const float * restrict x = arg1; float * restrict y = arg2_and_out; for (size_t i = 0; i < count; ++i) y[i] += x[i]; break; } case GEX_DT_DBL: { const double * restrict x = arg1; double * restrict y = arg2_and_out; for (size_t i = 0; i < count; ++i) y[i] += x[i]; break; } } } // Type and operator for a non-commutative operation: strcat // "Post-concatenates" two null-terminated strings (e.g. "arg2 .= arg1" in perl) static size_t myDT_sz; void op_concat(const void * arg1, void * arg2_and_out, size_t count, const void * cdata) { const size_t dt_sz = (size_t)(uintptr_t)cdata; const char * restrict x = arg1; char * restrict y = arg2_and_out; for (size_t i = 0; i < count; ++i, x+=dt_sz, y+=dt_sz) { strcat(y,x); } } // Macros to ease other macros #define I32_TYPE int32_t #define U32_TYPE uint32_t #define I64_TYPE int64_t #define U64_TYPE uint64_t #define FLT_TYPE float #define DBL_TYPE double // Convenience to avoid calling TEST_RAND with lo==hi #define RAND_ROOT(size) ((size == 1) ? 0 : TEST_RAND(0, size-1)) // Test ADD (both built-in and user-defined for a built-in DT #define TEST_ADD(DT) do { \ typedef DT##_TYPE TYPE; \ size_t nbytes = Nelem * sizeof(TYPE); \ TYPE *answers = test_malloc(iters * nbytes); \ TYPE *src = test_malloc(iters * nbytes); \ TYPE *dst = answers; \ int failures = 0; \ int local_count = 0; \ for (int i = 0; i < Nelem; ++i) src[i] = (rank + i); \ for (int i = 0; i < iters; ++i) { \ if (TEST_RAND_ONEIN(5)) { \ memset(dst, 0xaa, nbytes); \ ev[i] = gex_Coll_ReduceToAllNB(tm, dst, src, \ GEX_DT_##DT, sizeof(TYPE), Nelem, \ GEX_OP_ADD, NULL, NULL, 0); \ local_count += 1; \ dst += Nelem; \ } else { \ gex_Rank_t root = RAND_ROOT(size); \ if (root == rank) memset(dst, 0x55, nbytes); \ ev[i] = gex_Coll_ReduceToOneNB(tm, root, dst, src, \ GEX_DT_##DT, sizeof(TYPE), Nelem, \ GEX_OP_ADD, NULL, NULL, 0); \ if (root == rank) { \ local_count += 1; \ dst += Nelem; \ } \ } \ } \ gex_Event_WaitAll(ev, iters, 0); \ dst = answers; \ for (int i = 0; i < local_count; ++i) { \ for (int j = 0; j < Nelem; ++j) { \ uint64_t got = *dst++; \ if (got != correct[j]) { \ MSG("Mismatch GEX_OP_ADD(GEX_DT_" #DT "), iter=%i, elem=%i" \ " (got=%" PRIu64 ", want=%" PRIu64 ")", i, j, got, correct[j]); \ ++failures; \ } \ } \ } \ local_count = 0; \ dst = answers; \ for (int i = 0; i < iters; ++i) { \ if (TEST_RAND_ONEIN(5)) { \ memset(dst, 0xee, nbytes); \ ev[i] = gex_Coll_ReduceToAllNB(tm, dst, src, \ GEX_DT_##DT, sizeof(TYPE), Nelem, \ GEX_OP_USER, &op_ADD, \ (void*)(uintptr_t)GEX_DT_##DT, 0); \ local_count += 1; \ dst += Nelem; \ } else { \ gex_Rank_t root = RAND_ROOT(size); \ if (root == rank) memset(dst, 0x33, nbytes); \ ev[i] = gex_Coll_ReduceToOneNB(tm, root, dst, src, \ GEX_DT_##DT, sizeof(TYPE), Nelem, \ GEX_OP_USER, &op_ADD, \ (void*)(uintptr_t)GEX_DT_##DT, 0); \ if (root == rank) { \ local_count += 1; \ dst += Nelem; \ } \ } \ } \ gex_Event_WaitAll(ev, iters, 0); \ dst = answers; \ for (int i = 0; i < local_count; ++i) { \ for (int j = 0; j < Nelem; ++j) { \ uint64_t got = *dst++; \ if (got != correct[j]) { \ MSG("Mismatch GEX_OP_USER(GEX_DT_" #DT "), iter=%i, elem=%i" \ " (got=%" PRIu64 ", want=%" PRIu64 ")", i, j, got, correct[j]); \ ++failures; \ } \ } \ } \ test_free(src); \ test_free(answers); \ if (failures) ERR("GEX_DT_" #DT ": %d failures", failures); \ gex_Event_Wait(gex_Coll_BarrierNB(tm,0)); \ } while (0) static int iters = 0; // // GEX_OP ADD // Test for every type which can exactly represent Sum(ranks). // This tests both built-in and user-defines ADD operations // TODO: split to make a team small enough to test instead of skipping? // TODO: args to limit which tests? // void do_test_add(gex_TM_t tm) { gex_Rank_t rank = gex_TM_QueryRank(tm); gex_Rank_t size = gex_TM_QuerySize(tm); uint64_t *correct = test_malloc(iters * Nelem * sizeof(uint64_t)); gex_Event_t *ev = test_malloc(iters * sizeof(gex_Event_t)); assert_always(size <= INT32_MAX - Nelem); // Note use of a wide i to prevent overflow in intermediate value(s) for (uint64_t i = 0; i < Nelem; ++i) { correct[i] = ((size + i) * (size + i - 1) - i * (i - 1)) / 2; } uint64_t biggest = correct[Nelem-1]; if (biggest <= (uint64_t) INT32_MAX) { MSG0("Running ADD:GEX_DT_I32 test..."); TEST_ADD(I32); } else { MSG0("WARNING: skipping ADD:GEX_DT_I32 test (would overflow)"); } if (biggest <= (uint64_t)UINT32_MAX) { MSG0("Running ADD:GEX_DT_U32 test..."); TEST_ADD(U32); } else { MSG0("WARNING: skipping ADD:GEX_DT_U32 test (would overflow)"); } MSG0("Running ADD:GEX_DT_I64 test..."); TEST_ADD(I64); MSG0("Running ADD:GEX_DT_U64 test..."); TEST_ADD(U64); if (biggest < (uint64_t)pow(FLT_RADIX, FLT_MANT_DIG)) { MSG0("Running ADD:GEX_DT_FLT test..."); TEST_ADD(FLT); } else { MSG0("WARNING: skipping ADD:GEX_DT_FLT test (exceeds mantissa bits)"); } if (biggest < (uint64_t)pow(FLT_RADIX, DBL_MANT_DIG)) { MSG0("Running ADD:GEX_DT_DBL test..."); TEST_ADD(DBL); } else { MSG0("WARNING: skipping ADD:GEX_DT_DBL test (exceeds mantissa bits)"); } test_free(ev); test_free(correct); } // // Test "concat" operator on user-defined data type (a fixed-len char[]) // void do_test_user(gex_TM_t tm) { MSG0("Running GEX_DT_USER tests..."); gex_Rank_t rank = gex_TM_QueryRank(tm); gex_Rank_t size = gex_TM_QuerySize(tm); // Use just 'A' - 'Z' for ease of debugging by humans #define BASE_CHAR 'A' #define NUM_CHAR 26 size_t dt_sz = size + 1; // One for '\0' terminator char *InStrings = test_calloc(1, Nelem * dt_sz * sizeof(char)); char *OutStrings = test_malloc(Nelem * dt_sz * sizeof(char)); for (size_t i = 0; i < Nelem; ++i) { char *p = InStrings + i * dt_sz; p[0] = BASE_CHAR + ((rank + i) % NUM_CHAR); p[1] = '\0'; } // GEX_OP_USER(GEX_DT_USER): OP(x,y) := strcat(y,x) // Due to permitted assumption of commutativity, order is unspecified. // However, the reduction must preserve number of instances of each char. int failures = 0; for (int i = 0; i < iters; ++i) { gex_Rank_t root = RAND_ROOT(size); if (TEST_RAND_ONEIN(5)) { gex_Event_Wait( gex_Coll_ReduceToAllNB(tm, OutStrings, InStrings, GEX_DT_USER, dt_sz, Nelem, GEX_OP_USER, &op_concat, (void*)(uintptr_t)dt_sz, 0)); } else { gex_Event_Wait( gex_Coll_ReduceToOneNB(tm, root, OutStrings, InStrings, GEX_DT_USER, dt_sz, Nelem, GEX_OP_USER, &op_concat, (void*)(uintptr_t)dt_sz, 0)); } if (rank==root) { // Even in ToAll case, one (random) proc verifies for (size_t j = 0; j < Nelem; ++j) { const char *str = OutStrings + j * dt_sz; // Count the number of occurances of each char gex_Rank_t tally[NUM_CHAR]; memset(tally, 0, sizeof(tally)); for (size_t k = 0; k < (dt_sz-1); ++k) { uint8_t idx = str[k] - BASE_CHAR; if (idx > 25) { ++failures; } else { ++tally[idx]; } } // Check counts against the expected ones gex_Rank_t numer = size / NUM_CHAR; gex_Rank_t denom = size % NUM_CHAR; for (int k = 0; k < NUM_CHAR; ++k) { size_t expect = (numer + (k < denom)); failures += (tally[(j + k) % NUM_CHAR] != expect); } } } } if (failures) ERR("GEX_OP_USER(GEX_DT_USER): %d failures", failures); gex_Event_Wait(gex_Coll_BarrierNB(tm,0)); // GEX_OP_USER_NC(GEX_DT_USER): OP(x,y) := strcat(y,x) // Due to non-commutativity, order must be preserved. #if 0 // TODO: enabled once GEX_OP_USER_NC is implemented failures = 0; for (int i = 0; i < iters; ++i) { gex_Rank_t root = RAND_ROOT(size); if (TEST_RAND_ONEIN(5)) { gex_Event_Wait( gex_Coll_ReduceToAllNB(tm, OutStrings, InStrings, GEX_DT_USER, dt_sz, Nelem, GEX_OP_USER_NC, &op_concat, (void*)(uintptr_t)dt_sz, 0)); } else { gex_Event_Wait( gex_Coll_ReduceToOneNB(tm, root, OutStrings, InStrings, GEX_DT_USER, dt_sz, Nelem, GEX_OP_USER_NC, &op_concat, (void*)(uintptr_t)dt_sz, 0)); } if (rank==root) { // Even in ToAll case, one (random) proc verifies for (size_t j = 0; j < Nelem; ++j) { // validate result against properly ordered (lexically reversed) result const char *str = OutStrings + j * dt_sz; int idx = (j + (size - 1)) % NUM_CHAR; for (size_t k = 0; k < (dt_sz-1); ++k) { failures += (str[k] != BASE_CHAR + idx); // not using % since (-1 % x) is -1, not (x-1) idx = idx ? (idx - 1) : (NUM_CHAR - 1); } } } } if (failures) ERR("GEX_OP_USER_NC(GEX_DT_USER): %d failures", failures); gex_Event_Wait(gex_Coll_BarrierNB(tm,0)); #endif test_free(OutStrings); test_free(InStrings); } void do_tests(gex_TM_t tm) { do_test_add(tm); // GEX_OP_ADD do_test_user(tm); // GEX_DT_USER // // TODO: test the remaining built-in operators. // // Validation: // Option 1: Assuming the user-defined ADD passed above, use a user-defined // reduction as the reference for validation of each built-in // operator. // Option 2: Follow the pattern of the ADD test above, and chose inputs that // provide a locally computable reference for validation. // // GEX_OP_MULT: // There is concern over FP Mult and exact reproducibility. // If (and only if) we assume a "high-quality" implementation with full // reproducability of the order of evaliuation it *might* be reasonable to // exect bit-wise idenitcal results from the built-in and user-defined // versions of the same operator (use Option 1, above). However, that sounds // risky. // An alternative to use Option 2, picking the input with care such that the // product will never (even at an intermediate value in the worst-case // application of commutativity) require more than the available mantissa // digits (24 for IEEE float). // Another alternative is to test for equality within "epsilon". However, // without help from a skilled numerical analyst (or a text by one), it is // not obvious how that would need to scale with the number of ranks. // // GEX_OP_{MIN,MAX}: // No issues are anticipated, as long as we do not include Nan, Inf or // negative-0 among the FP inputs. // // GEX_OP_{AND,OR}: // Care is needed to avoid inputs which "saturate" the output. Otherwise the // values 0 and ~0 could be arrived at "accidentally" and still pass // validation. // // GEX_OP_XOR: // No issues are anticipated. // } static gex_TM_t myteam; static gex_TM_t subtm = GEX_TM_INVALID; static int done = 0; void *thread_main(void *arg) { int tid = (int)(uintptr_t)arg; #if GASNET_PAR if (tid) { GASNET_BLOCKUNTIL(done); return NULL; } #else assert_always(!tid); #endif MSG0("Testing over all ranks:"); do_tests(myteam); MSG0("Testing over odd/even subteams:"); do_tests(subtm); done = 1; return NULL; } int main(int argc, char **argv) { gex_Client_t myclient; gex_EP_t myep; gex_Segment_t mysegment; int pollers = 0; gex_Client_Init(&myclient, &myep, &myteam, "testreduce", &argc, &argv, 0); int arg = 1; int help = 0; while (argc > arg) { if (!strcmp(argv[arg], "-p")) { #if GASNET_PAR ++arg; if (argc > arg) { pollers = atoi(argv[arg]); arg++; } else help = 1; #else if (0 == gex_TM_QueryRank(myteam)) { fprintf(stderr, "testcoll %s\n", GASNET_CONFIG_STRING); fprintf(stderr, "ERROR: The -p option is only available in the PAR configuration.\n"); fflush(NULL); } sleep(1); gasnet_exit(1); #endif } else if (argv[arg][0] == '-') { help = 1; ++arg; } else break; } if (argc > arg) { iters = atoi(argv[arg]); ++arg; } if (!iters) iters = 1000; if (argc > arg) { Nelem = atoi(argv[arg]); ++arg; } if (!Nelem) Nelem = NELEM_DEFAULT; unsigned int seed = 0; if (argc > arg) { seed = atoi(argv[arg]); ++arg; } #if GASNET_PAR #define USAGE "[options] (iters) (nelem) (seed)\n" \ " The -p option gives the number of polling threads, specified as\n" \ " a non-negative integer argument (default is no polling threads)." #else #define USAGE "(iters) (nelem) (seed)" #endif test_init("testreduce",0,USAGE); TEST_SET_WAITMODE(1 + pollers); if (argc > arg || help) test_usage(); GASNET_Safe(gex_Segment_Attach(&mysegment, myteam, TEST_SEGSZ_REQUEST)); BARRIER(); if (seed == 0) { seed = (((unsigned int)TIME()) & 0xFFFF); TEST_BCAST(&seed, 0, &seed, sizeof(seed)); } TEST_SRAND(seed); // SAME seed MSG0("Running %i iterations of %i-element reduction tests (seed = %u).", iters, Nelem, seed); int color = gex_TM_QueryRank(myteam) & 1; // odds & evens size_t scratch_sz = gex_TM_Split(&subtm, myteam, color, 0, 0, 0, GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED); gex_TM_Split(&subtm, myteam, color, 0, (void*)TEST_MYSEG(), scratch_sz, 0); #if GASNET_PAR MSG("Forking %d gasnet threads (1 active, %d polling)", pollers+1, pollers); test_createandjoin_pthreads(pollers+1, &thread_main, NULL, 0); #else thread_main(NULL); #endif GASNET_Safe(gex_TM_Destroy(subtm, NULL, 0)); BARRIER(); MSG0("done."); gasnet_exit(0); /* Not reached in most implementations */ return 0; } gasnet-2025.8.0/README0000664000175000017500000026202615142313673014312 0ustar alastairalastair======================================================================= ======================================================================= *** GASNet-EX Software Release *** GASNet-EX is the next generation of the GASNet-1 communication system. The GASNet interfaces are being redesigned to accommodate the emerging needs of exascale supercomputing, providing communication services to a variety of PGAS programming models on current and future HPC architectures. GASNet-EX is a work-in-progress. Many features remain to be specified, implemented, and/or tuned. Users interested in learning what's new in GASNet-EX are recommended to peruse the ChangeLog file in this directory for a summary of recent developments. The docs/GASNet-EX.txt file provides more detailed information about the evolving EX specification. GASNet-EX notably includes a backwards-compatibility layer to assist in migration of current GASNet-1 client software. Existing GASNet clients can get started by relying on this layer (provided in gasnet.h), and incrementally add calls to the new gex_* interfaces (defined in gasnetex.h, which is automatically included by gasnet.h) to access new EX features and capabilities. For details, see docs/gasnet1_differences.md. Feedback or questions on any matters related to the GASNet-EX project are welcomed at: gasnet-devel@lbl.gov ======================================================================= ======================================================================= README file for GASNet https://gasnet.lbl.gov This is a user manual for GASNet. Anyone planning on using GASNet (either directly or indirectly) should consult this file for usage instructions. Other documentation: * In this README the "docs directory" means either docs/ in the source directory or ${prefix}/share/doc/gasnet/ in an installation of GASNet. * For GASNet licensing and usage terms, see license.txt. * For documentation on a particular GASNet conduit, see the README file in the conduit directory (also installed as README- in the docs directory). * For documentation on job spawning mechanisms, see the README file in the corresponding other/*-spawner directory (also installed as README-*-spawner in the docs directory). * For documentation on the communication-independent GASNet-tools library, see README-tools. * Additional information, including the GASNet specification and our bug tracking database, is available from https://gasnet.lbl.gov * Anyone planning to modify or add to the GASNet code base should also read the developer documents, available in the GASNet git repository, which can be browsed online: https://bitbucket.org/berkeleylab/gasnet/src/develop + README-devel: GASNet design information and coding standards + README-git: Rules developers are expected to follow when committing + template-conduit: A fill-in-the-blanks conduit code skeleton Contents of this file: * Introduction * Building and Installing GASNet * Manual control over compile and link flags * Basic Usage Information * Conduit Status * Launching/Running GASNet Applications * Single-node Development Options * Supported Platforms * Recognized Environment Variables * GASNet exit * GASNet tracing & statistical collection * GASNet Collectives * GASNet debug malloc services * GASNet inter-Process SHared Memory (PSHM) * MPI Interoperability * Contact Info and Support Introduction ============ GASNet is a language-independent, low-level networking layer that provides network-independent, high-performance communication primitives tailored for implementing parallel global address space SPMD languages and libraries such as UPC, UPC++, Co-Array Fortran, Legion, Chapel, and many others. The interface is primarily intended as a compilation target and for use by runtime library writers (as opposed to end users), and the primary goals are high performance, interface portability, and expressiveness. GASNet stands for "Global-Address Space Networking". The GASNet API is defined in the specification, which is included with this archive in docs/, and the definitive version is located on the GASNet webpage: https://gasnet.lbl.gov/ This README accompanies the GASNet source distribution, which includes implementations of the GASNet API for various popular HPC and general-purpose network hardwares. We use the term "conduit" to refer to any complete implementation of the GASNet API which targets a specific network device or lower-level networking layer. A conduit is comprised of any required headers, source files and supporting libraries necessary to provide the functionality of the GASNet API to GASNet clients. This distribution additionally includes a library of communication-independent portability tools called the "GASNet tools", which are used in the conduit implementations and also made available to clients (see README-tools for details). System Requirements =================== GASNet is extremely portable, and runs on most systems that are relevant to HPC production or development (and many that are not). The minimum system requirements are: * A POSIX-like environment, e.g. Linux or another version of Unix. For Mac systems, the free 'Xcode command-line tools' from the Apple Store. For Windows systems one needs either of two options: + The free 'Cygwin' toolkit (https://www.cygwin.com/) + Windows 10 Subsystem for Linux, a.k.a. WSL (https://docs.microsoft.com/en-us/windows/wsl/) * GNU make (version 3.79 or newer). * Perl (version 5.005 or newer). * The following standard Unix tools: 'awk', 'sed', 'env', 'basename', 'dirname', and a Bourne-compatible shell (e.g. bash). * A C compiler with at least minimal C99 support. We explicitly support most OS's, architectures and compilers in widespread use today. See the 'Supported Platforms' section for details on systems we've recently validated. Most distributed-memory GASNet conduits have additional requirements, based on their interactions with network hardware and other implementation details. For example: * mpi-conduit requires an MPI-1.1 or newer compliant MPI implementation. * udp-conduit requires POSIX socket libraries and a C++98 or newer compiler. See each conduit README for additional details on system requirements. Building and Installing GASNet ============================== Here are the steps to build GASNet: * Step 0 (optional): ./Bootstrap Runs the autoconf tools to build a configure script (this can be done on any system and may already have been done for you). If you are keeping a copy of the GASNet sources in your own source control repository (CVS, svn, Hg, Git, etc.), then please also see "Source Control and GASNet" in README-devel (in the GASNet git repo). * Step 1: ./configure (options) Generate the Makefiles tailored to your system, creating a build tree in the current working directory. You can run configure from a different directory to place your build files somewhere other than inside the source tree (a nice option when maintaining several build trees on the same source tree). Any compiler flags required for correct operation on your system (e.g. to select the correct ABI) should be included in the values of CC, CXX and MPI_CC. For example to build 32-bit code when your gcc and g++ default to 64-bit: configure CC='gcc -m32' CXX='g++ -m32' MPI_CC='mpicc -m32' or similarly, if you want libgasnet to contain debugging symbols: configure CC='gcc -g' CXX='g++ -g' (however also see --enable-debug, below) Some of the useful configure options: --help - display all available configure options --prefix=/install/path - set the directory where GASNet will be installed --enable-debug - build GASNet in a debugging mode. This turns on C-level debugger options and also enables extensive error and sanity checking system-wide, which is highly recommended for developing and debugging GASNet clients (but should NEVER be used for performance testing). --enable-debug also implies --enable-{trace,stats,debug-malloc}, but these can still be selectively --disable'd. --enable-trace - turn on GASNet tracing (see usage info below) --enable-stats - turn on GASNet statistical collection (see usage info below) --enable-debug-malloc - use GASNet debugging malloc (see usage info below) --enable-segment-{fast,large,everything} - select a GASNet segment configuration (see the GASNet spec for more info) --enable-pshm - Build GASNet with inter-Process SHared Memory (PSHM) support. This feature uses shared memory communication among the processes (aka GASNet nodes) within a single compute node (where the other alternatives are multi-threading via a PAR or PARSYNC build; or use of the conduit's API to perform the communication). Note that not all conduits and operating systems support this feature. For more information, see the section below entitled "GASNet inter-Process SHared Memory (PSHM)". --with-max-segsize= - configure-time default value for GASNET_MAX_SEGSIZE, which is used when GASNET_MAX_SEGSIZE is not set at runtime. See the description of the GASNET_MAX_SEGSIZE environment variable below for details. Configure will detect various interesting features about your system and compilers, including which GASNet conduits are supported. For cross-compilation support, look for an appropriate cross configure script in other/contrib/ and link it into your top-level source directory and invoke it in place of configure. Example for the Cray XC with slurm: cd ln -s other/contrib/cross-configure-cray-xc-slurm . cd /cross-configure-cray-xc-slurm (configure_options) For cross-compilation support on platforms without scripts in other/contrib see the instructions in other/cross-configure-help.c. [NOTE: We currently don't distribute the cross-configure-help.c in our normal distribution. If you think you need it, contact us at gasnet-devel@lbl.gov] On HPE Cray EX (aka "Shasta") systems, we recommend the following configure arguments to use the vendor's compiler wrappers: --with-cc=cc --with-cxx=CC --with-mpi-cc=cc Additionally, exactly one of the following is recommended to ensure that ofi-conduit is built for the appropriate libfabric provider: * HPE Cray EX with Slingshot-10 (100Gbps) NICs: --with-ofi-provider=verbs * HPE Cray EX with Slingshot-11 (200Gbps) NICs: --with-ofi-provider=cxi * HPE Cray EX with BOTH NIC types: --with-ofi-provider=generic On Linux clusters with Omni-Path networks from Intel or Cornelis Networks, we recommend the following configure arguments to avoid using ibv-conduit over an emulated libibverbs: --disable-ibv --enable-ofi --with-ofi-provider=psm2 On Linux InfiniBand clusters with InfiniPath HCAs from PathScale/QLogic or True Scale HCAs from Intel, we recommend the following configure arguments to use mpi-conduit (and to avoid using ibv-conduit or ofi-conduit): --enable-mpi --disable-ibv --disable-ofi * Step 2: make all Build the GASNet libraries. A number of other useful makefile targets are available from the top-level: make {seq,par,parsync} build the conduit libraries in a given mode make tests-{seq,par,parsync} build all the GASNet tests in a given mode make run-tests-{seq,par,parsync} build and run all the GASNet tests in a given mode make (run-)tests-installed-{seq,par,parsync} use the installed library to build (and run) all the GASNet tests make run-tests run whatever tests are already built in the conduit directories make run-tests TESTS="test1 test2..." run specifically-listed tests that are already built in the conduit directories make DO_WHAT="" build selected makefile target in all supported conduit directories Each conduit directory also has several useful makefile targets: make {seq,par,parsync} build the conduit libraries in a given mode make tests-{seq,par,parsync} build the conduit tests in a given mode make testXXX build just testXXX, in SEQ mode make testXXX-{seq,par,parsync} build just testXXX, in a given mode make run-tests-{seq,par,parsync} build and run the conduit tests in a given mode make (run-)tests-installed-{seq,par,parsync} use the installed library to build (and run) all the GASNet tests make run-tests run whatever tests are already built in the conduit directory make run-tests TESTS="test1 test2..." run specifically-listed tests that are already built in the conduit directory make run-testexit build a script to run the testexit tester and run it Compilation and linker flags for the GASNet libraries and tests can be augmented from the command-line by setting the following variables in the make command, as described in more detail in the next section: make MANUAL_CFLAGS=... Flags to add on the C compile for GASNet libs, clients & tests make MANUAL_CXXFLAGS=... Flags to add on the C++ compile for GASNet libs, clients & tests make MANUAL_MPICFLAGS=... Flags to add on the mpicc compile for GASNet libs, clients & tests make MANUAL_DEFINES=... Flags to add on all compiles for GASNet libs, clients & tests make MANUAL_LDFLAGS=... Linker flags to add for GASNet clients & tests make MANUAL_LIBS=... Linker library flags to add for GASNet clients & tests Note this feature should be used sparingly, as some flags can invalidate the results of tests performed at configure time. The preferred way to add arbitrary flags is in the $CC, $CXX and $MPI_CC variables passed to configure. The following misc make variables can also be set to affect GASNet compilation: make SEPARATE_CC=1 Build libgasnet using separate C compiler invocations, rather than one big one. make KEEPTMPS=1 Keep temporary files generated by the C compiler, if supported. * Step 3 (optional): make install Install GASNet to the directory chosen at configure time. This will create an include directory with a sub-directory for each supported conduit, and a lib directory containing a library file for each supported conduit, as well as any supporting libraries. GASNet may also be used directly from the build directory, as a convenience to eliminate steps if you are making changes to GASNet or its configuration. Manual control over compile and link flags ========================================== As described in the previous section, the recommended mechanism for passing flags to the compilers used by GASNet is to include them in the definition of the compiler variable itself (e.g. CC='gcc -m64'). These will be followed on the command line by flags chosen by GASNet's configure script instead of using the standard CFLAGS and CXXFLAGS make variables. If there is a need to pass flags that override ones chosen by configure, then one may set MANUAL_CFLAGS, MANUAL_CXXFLAGS and MANUAL_MPICFLAGS on the 'make' command line, and these are guaranteed to appear on the compilation command line after the ones chosen by configure. Additionally, MANUAL_DEFINES is provided to pass flags to all three compilers, but its order on the command line is not guaranteed (since it is intended for position-independent command line options such as '-Dfoo=10'). Note that GASNet does not assume that MPI_CC is the same compiler as CC (though that is recommended), and therefore invokes it using a distinct MANUAL_MPICFLAGS, instead of MANUAL_CFLAGS. The MPI C compiler is used to compile a portion of mpi-conduit (AMMPI) and the MPI-based spawner code used by several conduits; and to link executables for mpi-conduit and any conduit in which the MPI-based spawner is enabled. Similarly, the C++ compiler is used to compile a portion of udp-conduit (AMUDP) and to link udp-conduit executables. Finally, the make variables MANUAL_LDFLAGS and MANUAL_LIBS are provided to add to the link command lines, after the respective configure-detected settings. They are intended for flags such as '-Ldir' and '-lfoo', respectively. Since they do not have compiler-specific variants, their use is limited to compiler-independent flags unless special care is taken with the selection of the make target to ensure that make only invokes one compiler as a linker. All of the MANUAL_* make variables described above are honored by the Makefile infrastructure used to build GASNet's libraries and tests. Additionally, the makefile fragments (next section) use these variables when compiling client code. Basic Usage Information ======================= See the README for each GASNet conduit implementation for specific usage information, but generally client programs should #include (and nothing else), and use the conduit-provided compilation settings. The best way to get the correct compiler flags for your GASNet client is to "include" the appropriate makefile fragment for the conduit and configuration you want in your Makefile, and use the variables it defines in the Makefile rules for your GASNet client code. For example: ---------------------------- include $(gasnet_prefix)/include/mpi-conduit/mpi-seq.mak .c.o: $(GASNET_CC) $(GASNET_CPPFLAGS) $(GASNET_CFLAGS) -c -o $@ $< .cc.o: $(GASNET_CXX) $(GASNET_CXXCPPFLAGS) $(GASNET_CXXFLAGS) -c -o $@ $< myprog: myprog.o $(GASNET_LD) $(GASNET_LDFLAGS) -o $@ $< $(GASNET_LIBS) ---------------------------- See tests/Makefile for another example of compiling GASNet client code. For more fine-grained control, the flags variables break-down as follows: GASNET_CFLAGS is an alias for: $(GASNET_OPT_CFLAGS) $(GASNET_MISC_CFLAGS) GASNET_CPPFLAGS is an alias for: $(GASNET_MISC_CPPFLAGS) $(GASNET_DEFINES) $(GASNET_INCLUDES) GASNET_CXXFLAGS is an alias for: $(GASNET_OPT_CXXFLAGS) $(GASNET_MISC_CXXFLAGS) GASNET_CXXCPPFLAGS is an alias for: $(GASNET_MISC_CXXCPPFLAGS) $(GASNET_DEFINES) $(GASNET_INCLUDES) The content of these variables follow these general guidelines: * GASNET_[CC,CXX] contain the configure-detected C and C++ compilers used to build GASNet and guaranteed to work with any compiler-specific flags embedded in the corresponding variables. Clients are strongly advised to compile all modules using these same compilers to ensure object compatibility. * GASNET_INCLUDES contains only and all -I preprocessor flags * GASNET_DEFINES contains only and all -D or -U preprocessor flags * GASNET_OPT_* contain compiler-specific flags controlling the debug/opt level * GASNET_MISC_* contain other needed compiler-specific compile-time flags * GASNET_LD contains one of the configure-detected compilers (CC, CXX or MPI_CC) which should be used to link the GASNet client executable, in order to guarantee satisfaction of conduit library dependencies (eg on C++ or MPI). * GASNET_LIBS contains only and all -L or -l link-time flags * GASNET_LDFLAGS contains other needed link-time flags, which may be GASNET_LD-specific This summary is provided for informational purposes only - altering or omitting any of the flags contained in these variables could result in a non-functional build environment. Using GASNet with pkg-config ---------------------------- As a convenience, the same variables described in the previous section are also available via the UNIX pkg-config utility. For example, if pkg-config is installed on your system and the GASNet .pc files are in your PKG_CONFIG_PATH, then you can retrieve the value for GASNET_CC for udp-conduit in GASNET_SEQ mode with a command like: pkg-config gasnet-udp-seq --variable=GASNET_CC Note the pkg-config --cflags and --libs arguments retrieve the appropriate subset of GASNet variables, but pkg-config does not offer aliases corresponding to GASNET_CC, GASNET_LD or the GASNET_*CXX* variables. Use the `pkg-config --variable=` syntax to retrieve these. Here is a complete example of using pkg-config with GASNet in a Makefile: PKG_CONFIG_PATH = $(gasnet_prefix)/lib/pkgconfig pkg = gasnet-udp-seq .c.o: `pkg-config $(pkg) --variable=GASNET_CC` `pkg-config $(pkg) --cflags` -c -o $@ $< .cc.o: `pkg-config $(pkg) --variable=GASNET_CXX` `pkg-config $(pkg) --variable=GASNET_CXXCPPFLAGS` \ `pkg-config $(pkg) --variable=GASNET_CXXFLAGS` -c -o $@ $< myprog: myprog.o `pkg-config $(pkg) --variable=GASNET_LD` -o $@ $< `pkg-config $(pkg) --libs` Conduit Status ============== The GASNet distribution includes multiple complete implementations of the GASNet API targeting particular lower-level networking layers. Each of these implementations is called a 'conduit'. In some cases the lower-level layer is a proprietary or hardware-specific network API, whereas in other cases the target API is a portable standard (although in some cases this distinction is blurred). The corresponding GASNet conduits can be loosely categorized as either 'native' or 'portable' conduits. Below is the list of conduits in the current distribution, and their high-level status. Many conduits are supported on multiple platforms (CPU architectures, operating systems and compilers) - see the 'Supported Platforms' section for more details on platforms. For more detailed info about each conduit, please consult the corresponding conduit README. Portable conduits: ----------------- smp-conduit: SMP loopback (shared memory) The conduit of choice for GASNet operation within a single shared-memory node. Rigorously tested and supported on all current platforms. udp-conduit: UDP/IP (part of the TCP/IP protocol suite) The conduit of choice for GASNet over Ethernet, supported on any TCP/IP-compliant network. Rigorously tested over Ethernet and supported on most current platforms (see below). mpi-conduit: MPI (Message Passing Interface) A portable implementation of GASNet over MPI-1.1 or later. Intended as a reference implementation for systems lacking native conduit support. Rigorously tested and supported on most current platforms (see below). ucx-conduit: Unified Communication X framework [EXPERIMENTAL] GASNet over the Unified Communication X framework (UCX). This conduit is currently experimental, and is not yet carefully tuned for performance. It has only been validated on NVIDIA/Mellanox InfiniBand devices starting from ConnectX-5. ofi-conduit: Open Fabrics Interfaces (most providers) GASNet over the Open Fabrics Interface framework (libfabric). This conduit is functionally complete but not yet carefully tuned for performance. With the exception of Slingshot and Omni-Path networks (where ofi-conduit is either the best or only option and considered "native"), users are advised to use other conduits compatible with their hardware. Native, high-performance conduits: --------------------------------- ibv-conduit: InfiniBand Verbs GASNet over the OpenFabrics Verbs API. Rigorously tested and supported over InfiniBand hardware on all supported systems (see below). Believed to also work on other hardware offering a standard-compliant Verbs layer. ofi-conduit: Open Fabrics Interfaces (select providers/networks) GASNet over the Open Fabrics Interface framework (libfabric). This conduit is functionally complete but not yet carefully tuned for performance. On Slingshot and Omni-Path networks, ofi-conduit is either the best or only option available. On only those systems, ofi-conduit is categorized as a native, high-performance conduit. Launching/Running GASNet Applications ===================================== This section provides pointers to information regarding the configuration and use of the job spawning mechanisms provided in GASNet. Often, runtimes or frameworks which are clients of GASNet provide their own utilities for application launch (aka spawning). Users of such utilities should refer to their respective documentation for advice which is specific to the client. However, the information referenced in this section most often remains relevant to configuration. smp-conduit: This conduit uses a conduit-specific spawning mechanism. See smp-conduit/README for documentation. udp-conduit: This conduit offers a choice among several conduit-specific spawning mechanisms. See udp-conduit/README for documentation. mpi-conduit: This conduit uses MPI for job spawning. In addition to the documentation for the `mpirun` (or equivalent) specific to your MPI implementation, see mpi-conduit/README and other/mpi-spawner/README for documentation. ibv-conduit, ofi-conduit and ucx-conduit: These conduits can use ssh, MPI or PMI for spawning. For documentation, see the individual *-conduit/README files, as well as the files other/ssh-spawner/README, other/mpi-spawner/README and other/pmi-spawner/README In the text above, document locations are given as those in the GASNet sources. When installed, they are located in $prefix/share/doc/GASNet as README-[topic], where [topic] may be a conduit such as "ibv" or a spawner such as "ssh-spawner". Single-node Development Options =============================== GASNet supports hardware configurations ranging from HPC supercomputers and clusters to individual workstations and laptops. Often the easiest way to develop and debug code is in a single-node environment, so this section provides conduit recommendations for development. It should also be noted that configure option --enable-debug is highly recommended for finding bugs when developing GASNet client code. Option 1. smp-conduit ---------------------- This is a pure shared-memory implementation and should be the fastest and easiest to use option. GASNet's shared memory support should work "out of the box" (no special configuration options required) on common laptop, desktop, and workstation environments, including Linux, macOS, Windows with Cygwin, Windows 10 Subsystem for Linux (WSL), and Solaris. Option 2. udp-conduit ---------------------- By default this will be a shared-memory implementation within your single node, indistinguishable from smp-conduit except for small issues like job launch and stdin/out/err handling. However, one can disable shared memory (by passing --disable-pshm at configure time or by setting the environment variable GASNET_SUPERNODE_MAXSIZE=1 at runtime). This may be more realistic for testing of the expected behaviors in multi-node systems. Option 3. mpi-conduit ---------------------- If you have a MPI installed (and in your $PATH when GASNet is configured) then everything said for udp-conduit holds true for mpi-conduit, including the ability to disable shared-memory support. Additionally, since MPI will very likely use shared-memory internally, you can get multi-node like isolation at the GASNet level with the performance of shared-memory communication (much better than udp). Supported Platforms =================== Platforms where GASNet and Berkeley UPC have been successfully tested include: OS/Architecture/compiler/ABI: network conduits ---------------------------------------------- * Linux/x86-Ethernet/{gcc,clang}32: smp, mpi, udp * Linux/x86-InfiniBand/gcc/32: smp, mpi, udp, ibv * Linux/x86/IntelC/32: smp, mpi, udp * Linux/x86/PortlandGroupC/32: smp, mpi, udp * Linux/x86_64-Ethernet/{gcc,clang,PGI}/{32,64}: smp, mpi, udp, ofi * Linux/x86_64-InfiniBand/{gcc,clang,PathScale,NVHPC,IntelC,Intel oneAPI}/64: smp, mpi, udp, ibv * Linux/x86_64-Omni-Path/gcc/64: smp, mpi, udp, ofi * Linux/x86_64/x86-Open64/64: smp, udp, # * Linux/PowerPC-Ethernet/{gcc,clang}/{32,64}: smp, mpi, udp * Linux/PowerPC-HFI/gcc/32: smp, mpi, udp & * Linux/PPC64le/{gcc,clang,pgi,NVHPC,xlc}/64: smp, mpi, udp, ibv # * Linux/MIPS/gcc/{32,n32,64}: smp, udp, # * Linux/MIPS64el/gcc/{32,n32,64}: smp, udp, # * FreeBSD/{x86,amd64}/{gcc,clang}/{32,64}: smp, mpi, udp * OpenBSD/{x86,amd64}/{gcc,clang}/{32,64}: smp, mpi, udp * NetBSD/{x86,amd64}/{gcc,clang}/{32,64}: smp, mpi, udp * Solaris10/SPARC/gcc/{32,64}: smp, udp, mpi * Solaris10/x86/gcc/{32,64}: smp, udp, mpi * OpenSolaris/x86/gcc/{32,64}: smp, udp, # * Solaris11Express/x86/gcc/{32,64}: smp, udp, mpi, ibv * Solaris11/x86/gcc/{32,64}: smp, udp, mpi, ibv * MSWindows-Cygwin/{x86,x86_64}/{gcc,clang}/{32,64}: smp, udp, mpi (OpenMPI) * MSWindows10-Linux(WSL)/{gcc,clang}/64: smp, udp, mpi * macOS/{x86,x86_64}/icc/{32,64}: smp, udp, mpi & * macOS/{x86,x86_64}/{gcc,clang}/{32,64}: smp, udp, mpi * macOS/{x86,x86_64}/PGI/{32,64}: smp, udp, # * macOS/AARCH64/{gcc,clang}/64: smp, udp, # * CNL/Cray-XT/{gcc,PGI,PathScale,Intel}/64: smp, mpi & * CNL/Cray-XE/{gcc,PGI,PathScale,Intel,Cray}/64: smp, mpi & * CNL/Cray-XK/{gcc,PGI,PathScale,Intel,Cray}/64: smp, mpi & * CNL/HPE-Cray-EX/{gcc,Cray}/64: smp, mpi, ofi * Linux/Cray-XD1/{gcc,PGI}/64: smp, mpi & * ucLinux/Microblaze/gcc/32: smp, udp, #%& * Linux/ARM/{gcc,clang}/32: smp, udp, # * Linux/AARCH64/{gcc,clang}/64: smp, udp, mpi # = We have not tested MPI but have no reasons to doubt that mpi-conduit would work. % = System lacks pthreads or they are broken & = System has not been tested in recent releases due to lack of access. Reports of success or failure on this system are strongly encouraged. BETA = Support for this system is in beta state, please report your experiences. This list is not meant to be exhaustive. Other combinations of the platforms above are likely to also work, these are just the systems we've personally tested. Several of the systems listed using a vendor-specific C compiler can also use gcc as the underlying C compiler, although we generally recommend the vendor C compiler for performance reasons. The following compilers are believed to work on platforms listed above, with the provided minimum version: Gnu (gcc 3.0+), LLVM (clang 3.6+), Apple (Xcode 7.1+), PGI (pgcc 11.0 to 20.4), NVHPC (20.9+), Intel (icc 16+), Intel oneAPI (icx 21+), IBM XL (xlc 13+), Cray (CCE 8.6+) Recognized Environment Variables ================================ Users of language- or application-specific wrappers for job launch should also consult the wrapper's documentation. Such wrappers often have options to set these environment variables while also enabling any corresponding language- or application-specific support. In the following descriptions, a "Boolean" setting is one which accepts "1", "y" and "yes" as TRUE and "0", "n" and "no" as FALSE (all case-insensitive). While the descriptions use "0" or "1" to be concrete, one may substitute any of these aliases. * GASNET_VERBOSEENV: Boolean setting to output information about environment variable settings read by the conduit that affect conduit behavior. * GASNET_FREEZE: Boolean setting to make GASNet pause and wait for a debugger to attach on startup * GASNET_FREEZE_ON_ERROR: Boolean setting to make GASNet pause and wait for a debugger to attach on any fatal errors or fatal signals * GASNET_FREEZE_SIGNAL: set to a signal name (e.g. "SIGINT" or "SIGUSR1") to specify a signal that will cause the process to freeze and await debugger attach. * GASNET_TRACEFILE, GASNET_TRACEMASK, GASNET_STATSFILE, GASNET_STATSMASK, GASNET_TRACEFLUSH, GASNET_TRACELOCAL, GASNET_TRACENODES, GASNET_STATSNODES: control tracing & statistical features, if enabled at configure time. See usage information below. * GASNET_TEST_POLITE_SYNC: Boolean setting to enable polite-mode synchronization for the GASNet tests (only), for running with overcommitted CPUs. * GASNET_MALLOC_* : control the GASNet debug malloc features, if enabled at configure time. See usage information below. * GASNET_MAX_SEGSIZE - control the upper limit for FAST/LARGE segment size on most conduits This setting defaults to the value passed to configure: --with-max-segsize= In FAST and LARGE segment configurations, GASNet probes each compute node at startup to determine an upper-limit on the available space for use in the GASNet segment (and some other large internal objects). This value provides one upper-limit to that probe, which also has the effect of limiting the space available for client segments (as reported by gasnet_getMaxLocalSegmentSize()). has the following format: size_spec ( / opt_suffix ) where 'size_spec' is either an absolute memory size: [0-9]+{KB,MB,GB} or a fraction of compute node physical memory: 0.85 and 'opt_suffix' is one of the following: (or empty, which means "P") "P" : means the limit is per-process and EXCLUDES internal GASNet objects "H" : means the limit is host-wide and INCLUDES internal GASNet objects Examples: "0.85/H" : limit host-wide use at 85% of physical memory (this is also the default) "4GB/P" : try to ensure 4GB per process of GASNet shared segment space The default behavior of this option has grown considerably smarter over time, so it's anticipated that most clients will never need to set this. * GASNET_DISABLE_MUNMAP - Boolean setting to request the use of mallopt() on glibc systems to disable mmap-based allocation for satisfying malloc. This can be used to work-around a known bug in firehose (bug 495) that could lead to incorrect behavior after free()ing out-of-segment memory areas previously used for communication. Note that on some systems (32-bit Linux in particular) the disable is only partly effective because once the sbrk()-controlled heap reaches the bottom of shared libraries, glibc will use mmap() used to obtain memory regardless of any options one can control. The default is conduit-dependent. * GASNET_MAX_THREADS - per-node limit on the number of GASNet client pthreads (in PAR and PARSYNC modes) that can simultaneously be live on each GASNet node. This is subject to the hard limit established by configure --with-max-pthreads-per-node, and pthread limits that may be imposed by specific conduits (see conduit README). * GASNET_SUPERNODE_MAXSIZE - limit on size of a GASNet "supernode" (aka "neigborhood"). This is the maximum number of processes that will be grouped into a shared-memory "supernode"/"neigborhood" used by shared-memory communication (PSHM). The size and membership of the local neigborhood are reported by gex_System_QueryNbrhdInfo(), and by the legacy gasnet_getNodeInfo(). A value of zero (the default) means no limit. * GASNET_USE_PSHM_SINGLETON - Boolean to control shared memory use in "singleton" neigborhoods (ones with only a single process). By default, this setting is "0" and a process in a singleton neigborhood will allocate memory using mmap() with the flag MAP_ANONYMOUS (or similar if that is not supported), instead of allocating sharable memory (such as via POSIX or SysV shared memory). This default behavior *may* reduce pressure on limited shared memory pools to potentially enable use of a larger segment and can result in lower-cost page faults (if any) when accessing the segment. However, it may also disable use of hugepages (if any) which might have occurred otherwise. This variable can be set to "1" to disable this singleton-specific behavior, ensuring that memory allocation in a singleton neigborhood is performed in exactly the same manner as in any other. * GASNET_PSHM_BARRIER_HIER - Boolean setting to enable/disable hierarchical shared-memory barrier. When shared-memory communication (PSHM) is enabled, the default behavior of most of GASNet's barrier implementations is to use a two-stage barrier which coordinates within each supernode/neigborhood before communicating across the network. This variable can be set to "0" to disable this optimization. * GASNET_USE_HUGEPAGES - Boolean setting to enable/disable use of huge pages. This variable is silently ignored if hugetlbfs support was not enabled at configure time. Otherwise, the value defaults to "1" if the environment variable "HUGETLB_DEFAULT_PAGE_SIZE" is set and "0" if it is not. A value of "1" enables the use of libhugetlbfs for certain memory allocations such as GASNet-allocated segments and some internal buffers. A value of "0" tells GASNet-EX to instead allocate normal pages, as it would if hugetlbfs support was not enabled. * GASNET_CATCH_EXIT - Boolean setting, where a "0" prevents GASNet from forcing global job termination (via atexit() or on_exit()) when a process calls exit() or returns from main(). GASNet's default behavior helps prevent orphaned processes that can occur in some systems after an incomplete job termination, but may interfere with some profiling tools that write output inside atexit handlers. Setting this variable may allow those tools to operate, but the client code (or other entity) must assume responsibility for ensuring no orphan processes are left behind. Note this variable does not affect the behavior of explicit calls to gasnet_exit() (either directly or indirectly via calls like upc_global_exit(), returning from UPC main(), or reaching the GASNet default fatal signal handler) which will still bypass atexit handlers and kill the job. The recommended method to ensure the execution of atexit handlers is to run with GASNET_CATCH_EXIT=0 and collectively invoke libc exit(). * GASNET_NO_CATCH_SIGNAL - specify a comma separated list of signals to exclude from GASNet default signal handling. Formats "SIGSEGV", "SEGV", "sigsegv", "segv", and "11" are accepted. If the value of this environment variable is "*" (alone, with no leading or trailing whitespace), GASNet will not register the default handler for any signal. The default handler provides GASNet's backtrace support and ensures clean exits when fatal signals are received. Disabling this handler may allow use of other tools for debugging of signals, but is not intended for production use. * GASNET_BACKTRACE - Boolean setting to request the generation of stack backtraces on most fatal errors. The format/content of these backtraces varies by platform. On some platforms no backtrace support is available and this variable will be ignored. Backtraces are sent to stderr and to the trace file if tracing is active (see below). WARNING: Some fatal errors may involve memory corruption or other abnormal conditions that could cause the backtrace code to hang. For this reason we do not recommend setting GASNET_BACKTRACE by default (though there is no performance penalty for doing so). When reporting bugs, one is strongly encouraged to include a backtrace if possible. The backtrace is almost always more detailed if GASNet is built with debugging enabled, but may still be useful to a GASNet developer in a non-debug build. If tracing is active (see below) then a copy of the backtrace will be sent to the trace file. This file may provide developers with potentially useful information about activities prior to the error. * GASNET_BACKTRACE_NODES - if enabled by GASNET_BACKTRACE then this provides an optional list of nodes on which to permit backtraces. The list may contain one or more integers or ranges separated by commas, such as "0,2-4,6". If unset, empty, or equal to "*" then all nodes may generate backtraces. * GASNET_BACKTRACE_SIGNAL: set to a signal name (e.g. "SIGINT" or "SIGUSR1") to specify a signal that will cause the process to generate an immediate backtrace, and then continue executing. This is useful for getting a convenient backtrace for a "hung" process. * GASNET_BACKTRACE_TYPE - set to a comma-delimited, ordered list of mechanisms (i.e. different debugger tools) to try when generating a backtrace for GASNET_BACKTRACE. The default value (visible via GASNET_VERBOSEENV) includes all mechanisms detected as supported on the current platform. * GASNET_BACKTRACE_MT - Boolean setting requesting multi-threaded backtraces when supported by the backtrace mechanism. This overrides the default, which is generally "1" for thread-safe builds and SEQ builds with conduit-internal threads. Otherwise, the default is "0". * GASNET_DISABLE_ENVDECODE/GASNET_DISABLE_ARGDECODE - Boolean setting to disable the automatic decoding of environment variable values/command-line arguments. Some GASNet spawners automatically encode shell meta-characters passing through non-GASNet spawn scripts, in to order to ensure their safe delivery to the GASNet client program. * GASNET_SPAWN_VERBOSE - Boolean setting to enable console debugging output of operations related to job creation and teardown. Details vary by configuration. * GASNET_BARRIER - select the communication algorithm for use in GASNet barriers. The following values are available on all conduits: AMDISSEM - uses Active Messages to implement the Dissemination barrier algorithm as described in section 3.3 of John M. Mellor-Crummey and Michael L. Scott. "Algorithms for scalable synchronization on shared-memory multiprocessors." ACM ToCS, 9(1):21 65, 1991. RDMADISSEM - uses Put operations to implement the Dissemination algorithm. DISSEM - auto-selects either AMDISSEM or RDMADISSEM The AMDISSEM or RDMADISSEM algorithm is selected automatically based on conduit-specific criteria. In general RDMADISSEM is favored when the GASNet Extended API is implemented natively. AMCENTRAL - uses Active Messages to manipulate a single centralized counter. This is an inherently non-scalable barrier which does not honor the setting of GASNET_PSHM_BARRIER_HIER to enable shared-memory optimizations. Therefore, this choice is available only for debugging purposes. In addition to those choices, many conduits have additional network-specific barrier algorithms documented in the corresponding conduit READMEs. The default is DISSEM, unless the conduit README documents another default. * GASNET_PSHM_BARRIER_RADIX - set radix for intra-node barrier algorithm For configurations using PSHM (a function of OS and conduit) the GASNet barrier is performed in intra-node and inter-node stages. This environment variable is the radix of the tree-based intra-node (shared-memory) barrier. If zero (default) then radix = size - 1, resulting in a "flat tree" (linear time) If positive, then the given value is the out-degree of an N-ary tree. If negative, then a tree is built with the processes in groups of size = -radix. The first process in each group is the parent of the others in that group. The rank==0 process is the parent of the other group-representatives (in addition to being the parent of the others in its own group). The default is 0 (linear) on most platforms. * GASNET_PSHM_NETWORK_DEPTH - set depth of the intra-node AM network For configurations using PSHM (the default on most systems) GASNet implements intra-node Active Messages using a shared-memory queue. This variable sets the "network depth" of this implementation in units of maximum-sized messages. A process can send at least this many out-bound intra-node AMs concurrently (to any peer) before the implementation might stall awaiting peer attentiveness to retire AMs. When sending smaller messages, the effective depth is greater due to allocating less space in the queue than would be needed for a maximum-sized message. The default is 32 and the minimum is 4. * GASNET_NODEMAP_EXACT - Boolean setting to enable an exact algorithm for discovery of shared memory nodes. Several GASNet conduits use mmap() and/or conduit-specific memory registration resources to establish the GASNet segment. When multiple GASNet nodes (processes) run on the same O/S node, there is a potential for competition for resources which can be managed by coordinating among the processes. When PSHM support is enabled, multiple processes on the same O/S node must be identified so they can cross-mmap() their GASNet segments. Processes sharing the same O/S node can be discovered using an algorithm that runs in time linear in the number of GASNet nodes, and which is sufficient for all common process layout patterns. However, this approach may fail to discover sharing in unusual cases. Setting this variable to "1" enables an algorithm that is certain to find all sharing of memory, but has an expected running time proportional to N*log(N). The default is currently "1": use of the slower, but safer, exact algorithm. * GASNET_VIS_AMPIPE - Boolean setting to enable packing of most non-contiguous put/gets into AMMediums, with each packet of size approx MaxMedium (the only exception being cases where both sides happen to be fully contiguous, in which case we skip packing). The default is conduit-dependent. * GASNET_VIS_{PUT,GET}_MAXCHUNK - limits the max size of a contiguous chunk which will be packed by AM pipelining in a strided/indexed/vector put or get, respectively. The chunk size may additionally be limited based on the size that will fit in one MaxMedium. The default value is conduit-specific. * GASNET_VIS_MAXCHUNK - Provides a default value for GASNET_VIS_{PUT,GET}_MAXCHUNK, to be used when the more specific knob is unset. * GASNET_VIS_REMOTECONTIG - Boolean setting to enable a pack & RDMA algorithm for gather puts and scatter gets - i.e. cases that are locally non-contiguous but remotely contiguous. The default is conduit-dependent. * GASNET_COLL_SCRATCH_SIZE - Specifies the size of the scratch space allocated on each rank for internal use in collective communications. This is the preferred size allocated for the initial team, and is the value returned from a query using GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED. If the size is set too low, then the performance of collectives may suffer. This parameter must be single-valued (same value on all processes). A value of zero is permitted, but any value below some implementation-specific minimum value will be silently increased to that minimum. Defaults to 2MB per rank. * GASNET_COLL_ENABLE_SEARCH - Boolean setting to enable autotuning of collectives * GASNET_COLL_TUNING_FILE - file to read and/or write collective autotuning data For usage information, see the file autotuner.txt in the docs directory. * GASNET_FS_SYNC - Boolean setting to enable a sync() call (or equivalent) at exit time. Default is "0". Try this setting if you experience truncated output. * GASNET_TMPDIR: if set to a valid directory name this is used instead of TMPDIR or "/tmp" as a location for creating temporary files. * GASNET_SD_INIT, GASNET_SD_INITVAL and GASNET_SD_INITLEN These variables are *only* recognized in a build configured with --enable-debug. When using the negotiated-payload AM APIs, GASNet can optionally initialize the start of buffers it allocates at Prepare time with a defined pattern, and verify at Commit time that the client has over-written this "canary". To reduce overhead, only a fixed-length pattern is used. However, to avoid false alarms, this length must be sufficiently long to make the probability of matching the client data very low. GASNET_SD_INIT - Boolean setting which defaults to "1" in debug builds (and is effectively "0" otherwise) Setting to a "0" disables the initialization and checking GASNET_SD_INITVAL - Defaults to "NAN" Specifies the initialization pattern. See GASNET_MALLOC_INITVAL for more info. GASNET_SD_INITLEN - Defaults to 128 Specifies the length of the "canary" used for this checking. If 'nbytes' passed to the Commit call is less than this length, then no checking will be performed. If set too small then the likelihood of random payloads corresponding to the initialization pattern may lead to false positives. The minimum is 1 byte and smaller values will be silently replaced by 1. * GASNET_HOST_DETECT To implement gex_System_QueryHostInfo() and to construct shared-memory "neigborhoods", GASNet must map the hosts (compute nodes) in a job. This requires a unique identifier for each host. This string-valued setting selects the identifier used. The following are implemented for most conduits: "gethostid" - the 32-bit value returned by POSIX gethostid() "hostname" - a 64-bit hash of the hostname (as reported by POSIX gethostname()) Some conduits support: "conduit" - a network-specific identifier (such as a MAC address) On networks providing the "conduit" option, conduit-specific documentation will describe whether it is supported in addition to the two listed above, or if it is the *only* supported option. The default is determined as follows (from highest to lowest priority): IF "conduit" is supported THEN "conduit" is the default. ELSEIF configured using '--with-host-detect=...' THEN the "..." is the default. ELSEIF gethostid() is available THEN "gethostid" is the default. ELSE "hostname" is the default. * OPTIONAL: GASNET_EXITTIMEOUT, GASNET_EXITTIMEOUT_MAX, GASNET_EXITTIMEOUT_MIN, and GASNET_EXITTIMEOUT_FACTOR - control exit-coordination timeout. Some conduits use a timeout to distinguish orderly job exit from uncoordinated failure of one or more nodes. This is important to help avoid leaving "orphan" processes on the nodes. These environment variables allow the user to adjust the length of time that the conduit will wait to establish contact among all nodes before deciding that an exit is uncoordinated. By default, the timeout is computed as GASNET_EXITTIMEOUT = min(GASNET_EXITTIMEOUT_MAX, GASNET_EXITTIMEOUT_MIN + nodes * GASNET_EXITTIMEOUT_FACTOR) Setting GASNET_EXITTIMEOUT provides a specific value, ignoring this formula. Setting one or more of the others will compute a value for GASNET_EXITTIMEOUT using the formula above (and defaults for any variables not set in the environment). Currently most conduits honor these settings. Smp-conduit honors these settings only when PSHM-support is enabled. Default values differ among these conduits. * OPTIONAL: GASNET_THREAD_STACK_MIN, GASNET_THREAD_STACK_PAD Some conduits spawn additional threads internally for various purposes, which may include running client's AM handlers. If such AM handlers have unusually large stack space requirements, a mechanism is required to ensure these internal threads will have large enough stacks. These settings allow one to control the stack sizes of these internal threads. The stack size requested from the system will be computed as stack_size = MAX(GASNET_THREAD_STACK_MIN, GASNET_THREAD_STACK_PAD + default) where "default" denotes the system's default thread stack size, and values of both variables have been rounded-up to a multiple of the page size. The actual stack size may be smaller (e.g. to satisfy rlimits) or larger (for instance, the next power of two in some implementations). The default for both settings is zero, which results in using the system default size for thread stacks. * OPTIONAL: topology-aware environment variables Some conduits are capable of applying a certain degree of intelligence to the selection of NICs based on the job and host topology. They have in common the use of the behaviors described here. Current variables of this sort are: ibv-conduit: 'GASNET_IBV_PORTS_TYPE' (default: "Socket") ofi-conduit: 'GASNET_OFI_DEVICE_TYPE' (default: "Socket") This description uses '[BASE]' to replace the portion of these variable names preceding '_TYPE'. Single-quotes (') are used to identify variable names (or portions of them) in prose, while double-quotes (") are use for example values. Where a conduit documents a "topology-aware environment variable": - Values of '[BASE]_TYPE' are matched using case-insensitive comparisons. - If '[BASE]_TYPE' is unset, the default value listed above is used. - If '[BASE]_TYPE' begins with "Auto" then automatic device selection is enabled (if available), as documented in the conduit-specific README (including treatment of the computed-name variables described below). - If '[BASE]_TYPE' is set to "None" then it, and the computed-name variables described below, are ignored and the conduit will use the value of the variable '[BASE]', subject to conduit-specific defaults. - A valid value of '[BASE]_TYPE' consists of a required type (defined next) optionally followed by an arithmetic operation (described later). - Valid types name either a GASNet-defined property (based on process rank numbering) or hwloc-defined object type (based on process pinning and affinity to elements of the system). - The following GASNet-defined types are always supported: + "JRank" Process's jobrank Such as returned from `gex_System_QueryJobRank()` + "HRank" Process's host-relative rank Such as from the third argument to `gex_System_QueryHostInfo()` + "NRank" Process's nbrhd-relative rank Such as from the third argument to `gex_System_QueryNbrhdInfo()` - If 'hwloc' is detected at configure time, then its set of object types are also valid types. Documentation for your version of hwloc should be considered definitive. However, the following are some example object types which are known to be useful: + "Core" Logical ID (or IDs) of the CPU core(s) to which the process is bound. + "Node" or "NUMANode" Logical ID (or IDs) of the NUMA node(s) containing the CPU core(s) to which the process is bound. + "Socket" or "Package" Logical ID (or IDs) of the CPU package(s) containing the CPU core(s) to which the process is bound. - Independently on every process, the selected type is used to identify one or more integers, which are used to generate a process-specific integer-suffixed "computed variable name". When more than a single integer is applicable, they are used in increasing order and separated by underscores. + Example 1: [BASE]_TYPE = "HRank" The first process on each host will use the variable named '[BASE]_0'. The second process on each host will use the variable named '[BASE]_1'. + Example 2: [BASE]_TYPE = "NUMANode" A process bound to at least one core each in NUMA nodes 0 and 2 (and in no other NUMA nodes) will use the variable name '[BASE]_0_2' - If the computed-name variable is set, then it takes precedence over the variable '[BASE]'. Otherwise, '[BASE]' is used if set. Finally, the conduit-specific default value for '[BASE]' will be used if '[BASE]' is also unset. + Example 3: GASNET_IBV_PORTS_TYPE = "Socket" GASNET_IBV_PORTS = "mlx5_0+mlx5_1" GASNET_IBV_PORTS_0 = "mlx5_0" GASNET_IBV_PORTS_1 = "mlx5_1" GASNET_IBV_PORTS_0_1 is unset This example may be suitable for use of ibv-conduit on a hypothetical dual-socket system having one NIC with affinity to each socket. Any process bound entirely to cores in socket 0 will use "mlx5_0" while any process bound entirely to cores in socket 1 will use "mlx5_1". Processes which are bound to a set of cores spanning both sockets (including the case of no binding) will have a computed variable name of 'GASNET_IBV_PORTS_0_1'. Since that variable is unset, the defaulting behavior will cause such processes to use the value of '[BASE]'. In this example 'GASNET_IBV_PORTS' = "mlx5_0+mlx5_1", which denotes use of both NICs via ibv-conduit's multi-rail support. - As noted earlier, the value of the '[BASE]_TYPE' variable may optionally include an arithmetic operation "[OP][N]" after the type, as follows: + Whitespace is permitted before and after the [OP]. + The [N] must be an integer constant. Base-10 is the default, but a "0" prefix causes parsing as an octal (base-8) value and a "0x" prefix causes parsing as a hexadecimal (base-16) value. + Valid [OP] values (operations) are: * [OP] = "/" (division): Yields the quotient from integer division by [N] * [OP] = "%" (modulo): Yields the remainder from integer division by [N] + Only zero or one operation suffix is supported. Providing more than one such suffix yields an error. - Use of an operation suffix can be useful to assign processes to NICs when there is not a one-to-one mapping to/from an hwloc object type. + Example 4: Round-robin placement by host rank with four IB NICs GASNET_IBV_PORTS_TYPE = "HRank % 4" GASNET_IBV_PORTS_0 = "mlx5_0" GASNET_IBV_PORTS_1 = "mlx5_1" GASNET_IBV_PORTS_2 = "mlx5_2" GASNET_IBV_PORTS_3 = "mlx5_3" This example may be suitable for use of ibv-conduit on a hypothetical system with four NICs which are topologically equidistant from all CPU cores. + Example 5: Blocked placement by core with four IB NICs GASNET_IBV_PORTS_TYPE = "Core/8" GASNET_IBV_PORTS_0 = "mlx5_0" GASNET_IBV_PORTS_1 = "mlx5_1" GASNET_IBV_PORTS_2 = "mlx5_0" GASNET_IBV_PORTS_3 = "mlx5_1" This example may be suitable for use of ibv-conduit on a hypothetical 32-core system in which cores 0-7 and 16-23 are topologically nearest to NIC "mlx5_0", and the others are nearest to NIC "mlx5_1". Similar to the case in Example 3 (without an arithmetic operation), processes with bindings spanning multiple values of the computed type value will have computed variable names such as 'GASNET_IBV_PORTS_0_3'. One can make reasonable assignment for the "good" cases with the addition of the following two settings, which cover bindings spanning multiple core ranges with affinity to the same NIC: GASNET_IBV_PORTS_0_2 = "mlx5_0" GASNET_IBV_PORTS_1_3 = "mlx5_1" Thanks to defaulting, just one more setting is sufficient to cover all possible cases involving cores with a mix of affinities, including the unbound case, where we will elect to use both NICs: GASNET_IBV_PORTS = "mlx5_0+mlx5_1" This is notably much simpler than explicit settings for each of the nine remaining cases involving two, three or four type values. - Note that the hwloc object types are all related to the CPU binding of a process. Use with a process which is not bound could lead to use of suffixed variable names like '[BASE]_0_1_2_3_4_5_6_7' (or worse). The means to achieve CPU binding of processes depends on multiple factors, the most common of which is the choice of batch system. Documentation for this topic is beyond the scope of this document. * OPTIONAL: GASNET_HWLOC_QUERY In connection with the "topology-aware environment variables" described above, conduits may use hwloc to query the CPU binding of the process. When doing so there are two queries which can be used: - GASNET_HWLOC_QUERY="thread" (uses HWLOC_CPUBIND_THREAD) This query returns the "cpuset" of the calling thread, which in GASNet's current usage is the thread running `gex_Client_Init()` or `gasnet_init()`. - GASNET_HWLOC_QUERY="process" (uses HWLOC_CPUBIND_PROCESS) This query returns the "cpuset" of the entire process, including all threads which are members of the process at the time of the call to `gex_Client_Init()` or `gasnet_init()`. Neither is perfect in all circumstances: - Use of "thread" may report a cpuset which is "too narrow" if the calling thread has been bound to a subset of the CPUs to be used in the actual application run. - Use of "process" may report a cpuset which is "too wide" if libraries or user code start their own threads prior to GASNet initialization, which then manipulate their CPU binding to be anything not fully contained in the original cpuset. This might happen even before `main()` such as via static initializers in C++. - Neither provides accurate information if the CPU binding is modified after initialization of GASNet. The current default is GASNET_HWLOC_QUERY="thread". When a conduit is using hwloc, one may set GASNET_HWLOC_QUERY to either "thread" or "process" (case insensitive) to force one or the other. * see conduit-specific documentation in conduit directories for more settings GASNet exit =========== GASNet clients desiring robustness and portability should not call _exit(). Normal process termination should be done using gasnet_exit(), exit() or return from main(). Use of these paths allows GASNet to ensure proper shutdown. This includes efforts to avoid zombie/orphan processes in the case of non-collective exits, and proper release of network resources. This second point is important because we are aware of multiple network stacks which can permanently leak system resources if they are not explicitly released. We acknowledge that this represents a restriction that may be hard to satisfy. We fully intend to separate library termination from process termination in a future release. GASNet tracing & statistical collection ======================================= GASNet includes an extensive tracing and statistical collection utility for monitoring communication events in GASNet applications. To use, configure with --enable-stats and/or --enable-trace (or --enable-debug, which implies both of these by default), and run your program as usual. In order to see the trace/stats output, you must set the environment variable GASNET_TRACEFILE and/or GASNET_STATSFILE as explained below. Note that system performance is likely to be degraded as a result of tracing and statistical collection. This is still true even when output is disabled by not setting this GASNET_TRACEFILE/GASNET_STATSFILE (so production builds should not enable tracing/stats at GASNet configure time). Optional environment variable settings: GASNET_TRACEFILE - specify a file name to receive the trace output may also be "stdout" or "stderr", (or "-" to indicate stderr) each node may have its output directed to a separate file, and any '%' character in the value is replaced by the node number at runtime (e.g. GASNET_TRACEFILE="mytrace-%") unsetting this environment variable (or setting it to empty) disables tracing output (although the trace code still has performance impact) GASNET_TRACENODES - specify an optional list of nodes on which to generate tracing output (if enabled by GASNET_TRACEFILE). List may contain one or more integers or ranges separated by commas, such as "0,2-4,6". If empty or equal to "*" then all nodes may generate tracing output. GASNET_STATSFILE - specify a filename to receive statistical output operates analogously to GASNET_TRACEFILE GASNET_STATSNODES - limit nodes to generate statistical output operates analogously to GASNET_TRACENODES GASNET_TRACEMASK - specify the types of trace messages to report A string containing one or more of the following letters: G - gets P - puts R - remote atomics S - non-blocking synchronization W - collective operations (excluding barriers) B - barriers L - locks A - AM requests/replies (and handler execution, if conduit-supported) X - AMPoll I - informational messages about system status or performance alerts O - Object creation, modification and destruction C - conduit-specific (low-level) messages D - Detailed message data for gets/puts/AMreqrep N - Line number information from client source files H - High-level messages from the client U - Unsuppressable messages, which are always output (use with caution) default: (all of the above) Additionally, use of '^' as the first character of the mask causes the mask to be interpreted as its complement. For instance "^X" enables all types except "X" (with "U" remaining unsuppressable). GASNET_STATSMASK - specify the types of statistics to collect and report operates analogously to GASNET_TRACEMASK GASNET_TRACEFLUSH - set this variable to force a file system flush after every write to the tracefile. This seriously degrades tracing performance, but ensures any final trace messages before a crash are flushed into the tracefile. GASNET_TRACELOCAL - set to control whether the PG trace messages for local (i.e. loopback) put/get operations are entered into the trace file or suppressed (they are included by default). This can be used to reduce tracing overhead and trace file size for clients with a large number of local put/get operations which are not of interest. GASNet Collectives ================== GASNet includes interfaces for collective operations, which is still evolving. The design for the interfaces is located under the source directory in docs/collective_notes.txt. Anyone planning to implement a client that uses these collective should contact us (gasnet-devel@lbl.gov) first to determine the completeness and stability of the relevant portions of the implementation. In GASNet 1.14.0 we introduce a mechanism for auto-tuning of collectives in which a variety of algorithms are tried for each collective operation in a user's application and the best choice can be recorded in a file for use in future runs. For more information, see the file autotuner.txt in the docs directory. GASNet debug malloc services ============================ GASNet includes a debug malloc implementation that can be used to find local heap corruption bugs in GASNet itself and also in GASNet client applications (notably Berkeley UPC). To use, configure GASNet with --enable-debug-malloc (or --enable-debug which implies --enable-debug-malloc), and run your program as usual. GASNet will regularly scan the heap for corruption at malloc events and AMPoll's and report any detected problems. If you're a GASNet client writer, you should see the gasnett_debug_malloc functions in gasnet_tools.h to tie your applications into the GASNet debug malloc services. Note the debug malloc implementation imposes some CPU and memory consumption overhead relative to the system malloc implementation (it's implemented as a thin wrapper around the system malloc). This means heap behavior is likely to be somewhat perturbed relative to the normal mode of operation, however the overhead is probably less than it would be with third-party heap corruption tools such as efence or purify (at some cost in lost precision). Optional environment variable settings (recognized only when debugging malloc is enabled): GASNET_MALLOC_INIT: When set to 1, every byte of allocated memory is initialized to the value specified by GASNET_MALLOC_INITVAL. This can be useful for detecting use of uninitialized data. GASNET_MALLOC_CLOBBER: When set to 1, every byte of freed memory is overwritten with the value specified by GASNET_MALLOC_CLOBBERVAL. This can be useful for detecting inadvertent use of freed data. GASNET_MALLOC_INITVAL, GASNET_MALLOC_CLOBBERVAL: The data value to use for allocation init or free clobbering, respectively. The value may be specified as a decimal integer matching the pattern: "-?[0-9]+" or a hexadecimal integer matching the pattern: "0x[0-9A-F]+". If the value is between 0 and 255 (inclusive) it is taken to be an 8-bit value which is used to overwrite every byte in the given region. Otherwise, it is taken to be a 64-bit value which is used to overwrite the given region in 8-byte chunks. The value may also be one of "NAN", "sNAN" or "qNAN", which select a double-precision signaling or quiet NAN, which is likely to propagate through floating point calculations and cause segmentation faults when used as a pointer. Both values default to "NAN". GASNET_MALLOC_LEAKALL: set to 1 to leak all freed objects, ensuring they are not re-allocated during subsequent mallocs. This has an obvious cost in memory consumption, but can be helpful for tracking bugs in conjunction with GASNET_MALLOC_CLOBBER for tracking usage of dead objects. GASNET_MALLOC_SCANFREED: set to 1 to enable scanning of freed objects, to detect write-after-free errors. This option implies GASNET_MALLOC_LEAKALL and GASNET_MALLOC_CLOBBER. GASNET_MALLOC_EXTRACHECK: set to 1 to enable more frequent checking for memory corruption (at a cost in performance) GASNET_MALLOCFILE: specify a file name to receive a report of malloc heap behavior and utilization at process exit. Includes a list of leaked objects. The filename may also be "stdout" or "stderr", (or "-" to indicate stderr) Each node may have its output directed to a separate file, and any '%' character in the value is replaced by the node number at runtime (e.g. GASNET_MALLOCFILE="mallocreport-%"). These output files are human-readable, but can be passed to gasnet_trace for summarization. GASNET_MALLOCNODES: limit which nodes will generate a malloc report. operates analogously to GASNET_TRACENODES GASNet inter-Process SHared Memory (PSHM) ========================================= GASNet's PSHM support provides mechanism to communicate through shared memory among processes on the same compute node (ie sharing a cache-coherent physical memory). Inter-process communication through shared memory is usually the fastest way for processes sharing a compute node to communicate. GASNet clients are free to use any combination of processes communicating through PSHM and client pthreads within processes (in GASNET_PAR mode) to implement on-node parallelism, and all such execution contexts may perform network communication (with an appropriate conduit). GASNet's PSHM support is enabled by default unless one is cross-compiling, or running Cygwin prior to version 2.0. However, most cross-compilation scripts enable it with any additional settings as required. If desired, PSHM can be disabled by passing --disable-pshm at configure time. In addition to configure-time control, the environment variable GASNET_SUPERNODE_MAXSIZE sets a limit on the number of processes that will be grouped into a shared-memory "supernode". By default all co-located processes are grouped into one supernode, but the value can be set to 1 to disable the use of shared-memory for communication. The PSHM support in GASNet can operate via three generic mechanisms: POSIX shared memory, SystemV shared memory, or mmap()ed disk files. POSIX shared memory is recommended as the best option in most cases, but is not always available (many kernels can be configured not to support it), or may not permit large-enough allocations. See "System Settings for POSIX Shared Memory", below, for information on sizing of allocations. In the absence of the POSIX shared memory, users are advised to use the SystemV shared memory as the next-best option. However, see "System Settings for SystemV Shared Memory", below, for information about configuring a system to use SystemV shared memory. In the absence of both POSIX and SystemV shared memory, a user may try using mmap()ed disk files. However, on some systems we see significant performance degradation when using files (apparently due to committing the changes from memory to disk). Unless PSHM is disabled, the default behavior of the configure step is to probe for support via exactly one preferred mechanism. For Solaris the preferred mechanism is SystemV, while for all other platforms it is POSIX. If the preferred mechanism is not supported (or is explicitly disabled) then there is no automatic fallback to any other mechanism. So, if one wishes to use another mechanism, one should explicitly disable the default (POSIX or SysV) support and enable the desired mechanism: Common Usage Summary (flags to pass to the configure script): ---------------------------------------------------------- OFF: --disable-pshm POSIX: no flags required (default unless cross-compiling) SYSV: --disable-pshm-posix --enable-pshm-sysv FILE: --disable-pshm-posix --enable-pshm-file Solaris Usage Summary (as above except that SysV is default) ---------------------------------------------------------- OFF: --disable-pshm POSIX: --disable-pshm-sysv --enable-pshm-posix SYSV: no flags required (default) FILE: --disable-pshm-sysv --enable-pshm-file There are also implementations which are specific to certain platforms: For Cray XE, XK and XC systems, PSHM-over-XPMEM is enabled automatically by the corresponding cross-configure scripts. However, one can also optionally enable PSHM-over-XPMEM on an SGI Altix as follows: XPMEM: --enable-pshm --disable-pshm-posix --enable-pshm-xpmem For Linux systems with libhugetlbfs and a hugetlbfs mount, there is also experimental support for mmap()ed files on hugetlbfs, which can be enabled with: HUGETLBFS: --disable-pshm-posix --enable-pshm-hugetlbfs System Settings for POSIX Shared Memory: --------------------------------------- On most systems (all but Solaris and some cross-compiled platforms), the default implementation of PSHM uses POSIX shared memory. On many operating systems the amount of available POSIX shared memory is controlled by the sizing of a pseudo-filesystem that consumes space in memory (and sometimes swap space) rather than stable storage. If this filesystem is not large enough, it can limit the amount of POSIX shared memory which can be allocated for the GASNet segment. Insufficient available POSIX shared memory may either lead to failures at start-up, or to SIGBUS or SIGSEGV later in a run (if the OS has permitted allocation of more virtual address space than is actually available). If one encounters either of these failure modes when GASNet is configured to use POSIX shared memory, then one should check the space available (see below) and may need to increase the corresponding system settings. Setting these parameters is system-specific and requires administrator privileges. On most modern Linux distribution, POSIX shared memory allocations reside in the /dev/shm filesystem (of type 'tmpfs'), though /var/shm and /run/shm are also used in some cases. The mechanism for sizing of this filesystem varies greatly between distributions. Please consult the documentation for your specific Linux distribution for instructions to resize. In particular, be advised that distributions may mount this filesystem early in the boot process, without regards to any entry in /etc/fstab. On macOS, Cygwin and Solaris, there are no settings (known to us at this time) required to increase the space available for allocation as POSIX shared memory. On FreeBSD, POSIX shared memory allocations reside in the /tmp filesystem, which is normally of type 'tmpfs'. This filesystem often defaults to having no limit on its size other than the sum of physical memory and swap space. However, the size can be set in /etc/fstab. See the fstab(5) and tmpfs(5) manpages for more information. On NetBSD, POSIX shared memory allocations reside in the /var/shm filesystem (of type 'tmpfs'), which can be sized in /etc/fstab. See the fstab(5) and mount_tmpfs(8) manpages for more information. On OpenBSD, POSIX shared memory allocations reside in the /tmp filesystem, which is normally a filesystem of type 'mfs' and can be sized in /etc/fstab. See the fstab(5) and mount_mfs(8) manpages for more information. System Settings for SystemV Shared Memory: ----------------------------------------- SystemV shared memory is the second most widely used implementation of PSHM after POSIX shared memory. It is used by default on Solaris, and is recommended on most other systems when POSIX does not work for any reason. On most operating systems the amount of available SystemV shared memory and the number of shared memory segments is controlled by the kernel parameters: shmmax, shmall and shmmni. shmmax = largest size of a shared memory segment (in bytes) shmall = total amount of memory allocatable as shared (in pages) shmmni = maximum number of shared memory segments Insufficient amount of SystemV shared memory will lead to failures at start-up of any application using a runtime configured to use PSHM over SystemV. Setting these parameters is system-specific and requires administrator privileges. * Examples of configuration: These examples are for 64-bit systems, and essentially allow unlimited amounts of memory to be used for GASNet segments. These assume you are running no more than 127 processes per node. If you have more cores (or cpu threads) then increase the shmmni value to the maximum number of processes you wish to be be able to run, plus 1. Some examples below do not include a setting for shmmni because the system defaults are large enough in general, and often cannot be reduced. For 32-bit systems, use 2147483647 for the shmmax value to avoid a potential overflow. - Linux: Add the following three lines to /etc/sysctl.conf (sudo required): kernel.shmmax=1099511627776 kernel.shmall=268435456 kernel.shmmni=128 To activate the new settings reboot, or run the following: sudo /sbin/sysctl -p /etc/sysctl.conf - macOS: Add the following three lines to /etc/sysctl.conf (sudo required): kern.sysv.shmmax=1099511627776 kern.sysv.shmall=268435456 kern.sysv.shmmni=128 To activate the new settings reboot, or run the following: grep ^kern.sysv.shm /etc/sysctl.conf | sudo xargs /usr/sbin/sysctl -w - FreeBSD: Add the following two lines to /etc/sysctl.conf (sudo required): kern.ipc.shmmax=1099511627776 kern.ipc.shmall=268435456 To activate the new settings reboot, or run the following: sudo /sbin/sysctl -f /etc/sysctl.conf - NetBSD: Add the following two lines to /etc/sysctl.conf (sudo required): kern.ipc.shmmax=1099511627776 kern.ipc.shmmaxpgs=268435456 To activate the new settings reboot, or run the following: sudo /sbin/sysctl -f /etc/sysctl.conf - OpenBSD: Add the following two lines to /etc/sysctl.conf (sudo required): kern.shminfo.shmmax=2147483647 kern.shminfo.shmall=268435456 To activate the new settings reboot, or run the following: grep ^kern.shminfo /etc/sysctl.conf | sudo xargs /sbin/sysctl -w - Solaris: Depends on version. Please see the Sun/Oracle documentation. However, on recent releases the defaults are sufficient. - Cygwin: If you have not done so yet, please Read the Cygwin documentation on "cygserver-config" to create an initial /etc/cygsever.conf and start the server as a Windows service (optional). You may then edit /etc/cygserver to edit kern.ipc.shmmaxpgs kern.ipc.shmmni kern.ipc.shmseg Except for shmmaxpgs, the defaults are often large enough. These configuration values are only read when cygserver starts. So, read the Cygwin documentation to determine if/how to restart the cygserver service. Under Cygwin-1.5 you may also need to add "server" to the value of the CYGWIN environment variable. Again, you should see the Cygwin documentation for more information on this subject. Warning to users of macOS: ------------------------- We have evidence which suggests that there is a kernel bug in all releases of macOS though at least 10.12 (Sierra) which leads to a small leak of kernel memory (perhaps a few 10s of bytes) each time POSIX or SystemV shared memory is used. This may, after tens of thousands of runs of GASNet applications using PSHM, lead to a low memory condition contributing to slow performance and eventually to total memory exhaustion. In normal usage, it is reasonable to expect that a Mac laptop or desktop system will be rebooted for software updates frequently enough that this leak will not impact normal users. Also note that --enable-pshm-file is NOT recommended for use on macOS, where it has been seen to cause VERY slow startup times. IMPORTANT: SYSTEM CLEANING OF PSHM OBJECTS: ------------------------------------------ If a GASNet application using PSHM is terminated before ending the initialization phase, there is a possibility that the shared memory objects will remain in the system. A large amount of memory or disk space can remain allocated, preventing users from fully utilizing all available hardware resources. In the SystemV case, the allocated (but not released) shared memory segments can be listed via the "ipcs" command, and can be removed via the "ipcrm" command. Note that on the systems with a batch scheduler, the "ipcs" and "ipcrm" instructions need to be run on the compute nodes. In the mmap()ed file case, the allocated but not released shared memory files can be found in the directory pointed by the TMPDIR environment variable (default: /tmp). These files are named with the prefix GASNT (the lack of an 'E' is not a typo), and can be deleted using the "rm" command. The case of mmap()ed file on hugetlbfs is like the regular mmap()ed file case except that the directory will be the hugetlbfs mount point. This is typically something like /dev/hugepages. If uncertain of the mount point, the command "mount|grep hugetlbfs" should locate it for you. The case of POSIX shared memory is OS-specific, but in most cases the shared memory objects are visible in the file system. On systems we use for development, we have observed the following defaults: * Linux: located in /dev/shm with a filename prefix of "GASNT" * Cygwin: located in /dev/shm with a filename prefix of "GASNT" * Solaris: located in /tmp with a filename prefix of ".SHMDGASNT" * OpenBSD: located in /tmp with long random names suffixed by ".shm" * NetBSD: located in /var/shm with a filename prefix of ".shmobj_GASNT" MPI Interoperability ==================== The Message Passing Interface (MPI) is a ubiquitous portable interface for communication in scientific computing and is used both directly and indirectly by various applications and libraries. In most cases GASNet is implemented natively on the various SAN interconnects, bypassing the MPI layer in order to provide the best possible performance. This means that in general GASNet does NOT use MPI for performing communication (the only notable exception being mpi-conduit, which is a portable implementation of GASNet over MPI). In some cases GASNet can use MPI to assist in parallel job creation and termination (thereby taking advantage of the existing MPI infrastructure), but in those cases it will not use MPI during the steady state of operation - only at startup and shutdown. Although GASNet is not implemented using MPI, it is *compatible* with MPI - GASNet and MPI can be used together within the same network and even within the same program. However, there are a few subtle issues to be dealt with when using both communication systems in the same process, because in those cases GASNet and MPI must both be initialized properly and cooperate to "share" the resources of the network and physical memory. This section describes issues that arise when combining the use of MPI-based communication and GASNet communication within a single process. The information described here applies to any case where a single process attempts to access the network hardware using both GASNet and MPI, even when such usage occurs at different levels within a layered application (for example, a UPC application which uses GASNet via the Berkeley UPC compiler and makes calls to a helper library that communicates using MPI). MPI requires exactly one initialization call before MPI communication can be used within a process. The GASNet implementation may or may not automatically initialize the MPI library, depending on the conduit and various configuration settings. Therefore, processes using both communication libraries must be prepared to correctly handle either situation - the recommended way to arbitrate this is using the MPI_Initialized() call which reports whether or not the MPI layer has been initialized. Here is some example code for accomplishing this: int isMPIinit; int main(int argc, char **argv) { size_t segment_size = 64*1024*1024; /* want 64MB segment in this example */ size_t segment_max; gasnet_init(&argc, &argv); segment_max = gasnet_getMaxGlobalSegmentSize(); if (segment_size > segment_max) segment_size = segment_max; gasnet_attach(NULL, 0, segment_size, 0); gasnet_barrier_notify(0, GASNET_BARRIERFLAG_ANONYMOUS); gasnet_barrier_wait(0, GASNET_BARRIERFLAG_ANONYMOUS); if (MPI_Initialized(&isMPIinit) != MPI_OK) { /* test if MPI already init */ fprintf(stderr, "Error calling MPI_Initialized()\n"); abort(); } if (!isMPIinit) MPI_Init(argc, argv); /* MPI not init, so do it */ /* ... use MPI as usual ... */ MPI_Barrier(MPI_COMM_WORLD); /* ... use GASNet as usual ... */ gasnet_barrier_notify(0, GASNET_BARRIERFLAG_ANONYMOUS); gasnet_barrier_wait(0, GASNET_BARRIERFLAG_ANONYMOUS); ... if (!isMPIinit) MPI_Finalize(); return 0; } The MPI_Initialized call checks to make sure MPI hasn't already been initialized by GASNet, which will be the case on mpi-conduit and possibly on other conduits that use MPI for job startup. Any MPI usage internal to GASNet uses a private MPI communicator, preventing any potential interference with MPI use by the GASNet client. The code which initializes the MPI layer is also responsible for finalizing it before exit. An extensive example is available in tests/testmpi.c, which implements various interoperability tests between GASNet and MPI. There are a few other important caveats to be aware of when mixing GASNet and MPI: * GASNet must be configured with MPI_CC set to the exact *same* MPI installation that will be used when building any GASNet client code using MPI. Note that many MPI implementations are not binary-compatible across versions, so upgrading the MPI compiler usually requires a fresh configure/build/install of GASNet with the new MPI implementation if you intend to mix GASNet and MPI. * When a node is inside a blocking MPI call, most conduits will be prevented from servicing many GASNet requests from remote nodes. Similarly, GASNet blocking calls will generally not ensure progress of MPI communication. This means that arbitrarily interleaving blocking MPI calls with GASNet calls (e.g. UPC shared accesses) can easily lead to deadlock. In order to ensure safety and portably correct operation across networks, GASNet communication operations and user MPI calls should be isolated from each other by barriers, by strictly adhering to the following "Time-Phasing" protocol: - When the application starts, the first MPI or GASNet call issued from any node should be considered to put the application in 'MPI' or 'GASNet' mode, respectively. - When an application is in 'MPI' mode, and needs to switch to using GASNet, it should collectively execute an 'MPI_Barrier()' as the last MPI call before issuing any GASNet communication calls. Once any GASNet communication has occurred from any node, the program should be considered to have switched to 'GASNet' mode. - When an application is in 'GASNet' mode, and an MPI call that may cause network traffic is needed, a collective call to 'gasnet_barrier_notify()' followed by a 'gasnet_barrier_wait()' should be executed as the last GASNet communication before any MPI calls are made. Once any MPI functions have been called from any thread, the program should be considered to be in 'MPI' mode. If this simple construct--GASNet code must be followed by a GASNet barrier, and MPI code must be followed by an MPI_Barrier--is followed, this deadlock should not occur. This protocol is demonstrated in the code above. * GASNet and MPI both number processes with a unique non-negative index (i.e. gasnet_mynode() and MPI_Comm_rank(MPI_COMM_WORLD)). Every attempt is made to ensure this numbering matches between layers, but it might not always be possible to ensure this. To maximize portability, apps using both layers should use a GASNet or MPI collective (e.g. AllGather) to build a table of ids and translate rank identifiers as needed. * Note that GASNet language clients such as UPC or Titanium might include compilation modes where multiple language-level threads are implemented as pthreads within a single process, which will map to a single GASNet node id (and hence a single MPI rank). Clients using such threading should ensure they are using a pthread-safe implementation of MPI (GASNet is thread-safe by virtue of PAR mode), and be aware that MPI messages sent to a particular node might be received by any pthread at the target (unless steps are taken to avoid this, e.g. using an MPI tag). * There are various network-specific issues that may arise when combining GASNet with specific MPI implementations, most notably related to job creation and spawning mechanisms. Please see the README file in each conduit directory for network-specific discussion of issues with MPI interoperability. Contact Info and Support ======================== For the latest GASNet downloads, publications, and specifications, please visit: https://gasnet.lbl.gov For bug reports and feature requests, please submit a ticket in the GASNet Bugzilla: https://gasnet-bugs.lbl.gov You may find an instant solution to your problem by searching the bug database! GASNet has several mailing lists for support: gasnet-users@lbl.gov General questions or inquiries regarding the installation or use of GASNet. Any users can join the list from the web site above. gasnet-devel@lbl.gov GASNet developers list (multi-institution) gasnet-announce@lbl.gov GASNet release announcements. Join on the web site above. -------------------------------------------------------------------------- The canonical version of this document is located here: https://bitbucket.org/berkeleylab/gasnet/src/master/README For more information, please email: gasnet-users@lbl.gov or visit the GASNet home page at: https://gasnet.lbl.gov -------------------------------------------------------------------------- gasnet-2025.8.0/gasnet_trace.c0000664000175000017500000013762015142313673016236 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_trace.c $ * Description: GASNet implementation of internal helpers * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #define GASNETI_NEED_GASNET_VIS_H 1 #define GASNETI_NEED_GASNET_COLL_H 1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* ------------------------------------------------------------------------------------ */ /* GASNet Tracing and Statistics */ #if GASNET_TRACE GASNETI_IDENT(gasneti_IdentString_trace, "$GASNetTracingEnabled: 1 $"); #endif #if GASNET_STATS GASNETI_IDENT(gasneti_IdentString_stats, "$GASNetStatisticsEnabled: 1 $"); #endif gasneti_mutex_t gasneti_tracelock = GASNETI_MUTEX_INITIALIZER; #if GASNET_STATS static gasneti_mutex_t gasneti_statlock = GASNETI_MUTEX_INITIALIZER; #define GASNETI_STAT_LOCK() gasneti_mutex_lock(&gasneti_statlock); #define GASNETI_STAT_UNLOCK() gasneti_mutex_unlock(&gasneti_statlock); #endif #define GASNETI_MAX_MASKBITS 256 char gasneti_tracetypes[GASNETI_MAX_MASKBITS]; char gasneti_tracetypes_all[GASNETI_MAX_MASKBITS]; char gasneti_statstypes[GASNETI_MAX_MASKBITS]; char gasneti_statstypes_all[GASNETI_MAX_MASKBITS]; char gasneti_trace_maskstr[GASNETI_MAX_MASKBITS+1]; char gasneti_stats_maskstr[GASNETI_MAX_MASKBITS+1]; int gasneti_trace_suppresslocal; FILE *gasneti_tracefile = NULL; FILE *gasneti_statsfile = NULL; #if GASNETI_STATS_OR_TRACE static gasneti_tick_t starttime; #endif /* ------------------------------------------------------------------------------------ */ // Tools tracing interface support #if GASNET_STATS void (*gasnett_stats_callback)( GASNETI_FORMAT_PRINTF_FUNCPTR_ARG(format,1,2,void (*format)(const char *, ...)) ) = NULL; #endif static int _gasnett_trace_enabled_body(char tracecat) { return GASNETI_TRACE_ENABLED(tracecat); } int (*_gasnett_trace_enabled)(char tracecat) = &_gasnett_trace_enabled_body; #ifndef TMPBUFSZ #define TMPBUFSZ 1024 #endif #define _GASNETT_TS_PRINTF_DOIT(TS,cat) do { \ char output[TMPBUFSZ]; \ if (TS##_ENABLED(cat)) { /* skip some varargs overhead */ \ va_list argptr; \ va_start(argptr, format); /* pass in last argument */ \ { int sz = vsnprintf(output, TMPBUFSZ, format, argptr); \ if (sz >= (TMPBUFSZ-5) || sz < 0) strcpy(output+(TMPBUFSZ-5),"..."); \ } \ va_end(argptr); \ TS##_MSG(cat, output); \ } \ } while (0) #if GASNET_TRACE GASNETI_FORMAT_PRINTF(_gasnett_trace_printf_body,1,2, static void _gasnett_trace_printf_body(const char *format, ...)) { _GASNETT_TS_PRINTF_DOIT(GASNETI_TRACE,H); } GASNETI_FORMAT_PRINTF(_gasnett_trace_printf_force_body,1,2, static void _gasnett_trace_printf_force_body(const char *format, ...)) { _GASNETT_TS_PRINTF_DOIT(GASNETI_TRACE,U); } GASNETT_FORMAT_PRINTF_FUNCPTR(_gasnett_trace_printf,1,2, void (*_gasnett_trace_printf)(const char *format, ...)) = _gasnett_trace_printf_body; GASNETT_FORMAT_PRINTF_FUNCPTR(_gasnett_trace_printf_force,1,2, void (*_gasnett_trace_printf_force)(const char *format, ...)) = _gasnett_trace_printf_force_body; #endif #if GASNET_STATS GASNETI_FORMAT_PRINTF(_gasnett_stats_printf,1,2, extern void _gasnett_stats_printf(const char *format, ...)) { _GASNETT_TS_PRINTF_DOIT(GASNETI_STATS,H); } GASNETI_FORMAT_PRINTF(_gasnett_stats_printf_force,1,2, extern void _gasnett_stats_printf_force(const char *format, ...)) { _GASNETT_TS_PRINTF_DOIT(GASNETI_STATS,U); } #endif #undef _GASNETT_TRACE_PRINTF_DOIT #undef TMPBUFSZ /* ------------------------------------------------------------------------------------ */ /* VIS trace formatting - these are legal even without STATS/TRACE */ extern size_t gasneti_format_memveclist_bufsz(size_t count) { size_t res = 200+count*50; gasneti_assume(res > 0); // silence a warning observed on gcc 7.2.1 (Advance-Toolchain-at11.0) return res; } extern gasneti_memveclist_stats_t gasneti_format_memveclist(char *buf, size_t count, gex_Memvec_t const *list) { const size_t bufsz = gasneti_format_memveclist_bufsz(count); char * p = buf; size_t j=0; gasneti_memveclist_stats_t stats = gasnete_memveclist_stats(count, list); sprintf(p, "%"PRIuSZ" entries, totalsz=%"PRIuSZ", bounds=["GASNETI_LADDRFMT"..."GASNETI_LADDRFMT"]\n" "list=[", count, stats._totalsz, GASNETI_LADDRSTR(stats._minaddr), GASNETI_LADDRSTR(stats._maxaddr)); p += strlen(p); for (size_t i=0; i < count; i++) { j++; sprintf(p, "{"GASNETI_LADDRFMT",%5"PRIuSZ"}", GASNETI_LADDRSTR(list[i].gex_addr), list[i].gex_len); if (i < count-1) { strcat(p, ", "); if (j % 4 == 0) strcat(p,"\n "); } p += strlen(p); gasneti_assert_uint(p-buf ,<, bufsz); } strcat(p,"]"); p += strlen(p); gasneti_assert_uint(p-buf ,<, bufsz); return stats; } extern size_t gasneti_format_putvgetv_bufsz(size_t dstcount, size_t srccount) { return 200+dstcount*50+srccount*50; } extern size_t gasneti_format_putvgetv(char *buf, gex_TM_t tm, gex_Rank_t rank, size_t dstcount, gex_Memvec_t const dstlist[], size_t srccount, gex_Memvec_t const srclist[]) { const int bufsz = gasneti_format_putvgetv_bufsz(dstcount, srccount); char * dstlist_str = (char *)gasneti_malloc(gasneti_format_memveclist_bufsz(dstcount)); char * srclist_str = (char *)gasneti_malloc(gasneti_format_memveclist_bufsz(srccount)); gasneti_memveclist_stats_t dststats = gasneti_format_memveclist(dstlist_str, dstcount, dstlist); (void) gasneti_format_memveclist(srclist_str, srccount, srclist); sprintf(buf,"(%"PRIuSZ" data bytes) peer="GASNETI_TMRANKFMT"\n" "dst: %s\nsrc: %s", dststats._totalsz, GASNETI_TMRANKSTR(tm,rank), dstlist_str, srclist_str); gasneti_assert_uint(strlen(buf) ,<, bufsz); gasneti_free(dstlist_str); gasneti_free(srclist_str); return dststats._totalsz; } extern size_t gasneti_format_addrlist_bufsz(size_t count) { size_t res = 200+count*25; gasneti_assume(res > 0); // silence a warning observed on gcc 7.2.1 (Advance-Toolchain-at11.0) return res; } extern gasneti_addrlist_stats_t gasneti_format_addrlist(char *buf, size_t count, void * const *list, size_t len) { const size_t bufsz = gasneti_format_addrlist_bufsz(count); char * p = buf; size_t j=0; gasneti_addrlist_stats_t stats = gasnete_addrlist_stats((count), (list), (len)); sprintf(p, "%"PRIuSZ" entries, totalsz=%"PRIuSZ", len=%"PRIuSZ", bounds=["GASNETI_LADDRFMT"..."GASNETI_LADDRFMT"]\n" "list=[", count, count*len, len, GASNETI_LADDRSTR(stats._minaddr), GASNETI_LADDRSTR(stats._maxaddr)); p += strlen(p); for (size_t i=0; i < count; i++) { j++; sprintf(p, GASNETI_LADDRFMT, GASNETI_LADDRSTR(list[i])); if (i < count-1) { strcat(p, ", "); if (j % 8 == 0) strcat(p,"\n "); } p += strlen(p); gasneti_assert_uint(p-buf ,<, bufsz); } strcat(p,"]"); p += strlen(p); gasneti_assert_uint(p-buf ,<, bufsz); return stats; } extern size_t gasneti_format_putigeti_bufsz(size_t dstcount, size_t srccount) { return 500+dstcount*25+srccount*25; } extern size_t gasneti_format_putigeti(char *buf, gex_TM_t tm, gex_Rank_t rank, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen) { const int bufsz = gasneti_format_putigeti_bufsz(dstcount, srccount); char * dstlist_str = (char *)gasneti_malloc(gasneti_format_addrlist_bufsz(dstcount)); char * srclist_str = (char *)gasneti_malloc(gasneti_format_addrlist_bufsz(srccount)); size_t totalsz = dstcount * dstlen; (void) gasneti_format_addrlist(dstlist_str, dstcount, (void * const *)dstlist, dstlen); (void) gasneti_format_addrlist(srclist_str, srccount, (void * const *)srclist, srclen); size_t len = snprintf(buf,bufsz,"(%"PRIuSZ" data bytes) peer="GASNETI_TMRANKFMT"\n" "dst: %s\nsrc: %s", totalsz, GASNETI_TMRANKSTR(tm,rank), dstlist_str, srclist_str); gasneti_assert_uint(len ,<, bufsz); gasneti_free(dstlist_str); gasneti_free(srclist_str); return totalsz; } extern size_t gasneti_format_strides_bufsz(size_t count) { return count*30+10; } extern void gasneti_format_strides(char *buf, size_t count, const ptrdiff_t *list) { const int bufsz = gasneti_format_strides_bufsz(count); char * p = buf; strcpy(p,"["); p++; for (size_t i=0; i < count; i++) { sprintf(p, "%"PRIdPD, list[i]); if (i < count-1) strcat(p, ", "); p += strlen(p); gasneti_assert_uint(p-buf ,<, bufsz); } strcat(p,"]"); p++; gasneti_assert_uint(p-buf ,<, bufsz); } extern size_t gasneti_format_putsgets_bufsz(size_t stridelevels) { return 500+3*stridelevels*50; } extern size_t gasneti_format_putsgets(char *buf, void *_pstats, gex_TM_t tm, gex_Rank_t rank, void *dstaddr, const ptrdiff_t dststrides[], void *srcaddr, const ptrdiff_t srcstrides[], size_t elemsz, const size_t count[], size_t stridelevels) { // TODO-EX: trace tm and flags gasneti_assert(buf); // initial degenerate cases if_pf (elemsz == 0) { sprintf(buf,"(0 data bytes) elemsz=0"); return 0; } if_pf (stridelevels == 0) { sprintf(buf,"(%"PRIuSZ" data bytes) peer="GASNETI_TMRANKFMT" stridelevels=0 elemsz=%"PRIuSZ"\n" "dst: dstaddr="GASNETI_LADDRFMT"\n" "src: srcaddr="GASNETI_LADDRFMT, elemsz, GASNETI_TMRANKSTR(tm,rank), elemsz, GASNETI_LADDRSTR(dstaddr), GASNETI_LADDRSTR(srcaddr) ); return elemsz; } // general case const int bufsz = gasneti_format_putsgets_bufsz(stridelevels); char * srcstrides_str = (char *)gasneti_malloc(gasneti_format_strides_bufsz(stridelevels)); char * dststrides_str = (char *)gasneti_malloc(gasneti_format_strides_bufsz(stridelevels)); char * count_str = (char *)gasneti_malloc(gasneti_format_strides_bufsz(stridelevels)); size_t const totalsz = gasnete_strided_datasize(elemsz, count, stridelevels); void const *dstbase = dstaddr; size_t const dstextent = gasnete_strided_bounds(dststrides, elemsz, count, stridelevels, &dstbase); void const *srcbase = srcaddr; size_t const srcextent = gasnete_strided_bounds(srcstrides, elemsz, count, stridelevels, &srcbase); gasneti_format_strides(srcstrides_str, stridelevels, srcstrides); gasneti_format_strides(dststrides_str, stridelevels, dststrides); gasneti_assert_uint(sizeof(ptrdiff_t) ,==, sizeof(size_t)); gasneti_format_strides(count_str, stridelevels, (const ptrdiff_t *)count); sprintf(buf,"(%"PRIuSZ" data bytes) peer="GASNETI_TMRANKFMT" stridelevels=%"PRIuSZ" elemsz=%"PRIuSZ" count=%s\n" "dst: dstaddr="GASNETI_LADDRFMT" dststrides=%s\n" " extent=%"PRIuSZ" bounds=["GASNETI_LADDRFMT"..."GASNETI_LADDRFMT"]\n" "src: srcaddr="GASNETI_LADDRFMT" srcstrides=%s\n" " extent=%"PRIuSZ" bounds=["GASNETI_LADDRFMT"..."GASNETI_LADDRFMT"]\n" , totalsz, GASNETI_TMRANKSTR(tm,rank), stridelevels, elemsz, count_str, GASNETI_LADDRSTR(dstaddr), dststrides_str, dstextent, GASNETI_LADDRSTR(dstbase), GASNETI_LADDRSTR((uint8_t *)dstbase+dstextent-1), GASNETI_LADDRSTR(srcaddr), srcstrides_str, srcextent, GASNETI_LADDRSTR(srcbase), GASNETI_LADDRSTR((uint8_t *)srcbase+srcextent-1) ); gasneti_assert_uint(strlen(buf) ,<, bufsz); gasneti_free(srcstrides_str); gasneti_free(dststrides_str); gasneti_free(count_str); return totalsz; } /* ------------------------------------------------------------------------------------ */ /* Enum/mask trace formatting - these are legal even without STATS/TRACE */ // Returns number of bytes written (or "would have been" for buf == NULL), including the '\0'. // For val==0 the output is "(empty)" // For val containing bits not named in the input, the output is "(invalid)" static size_t gasneti_format_mask(char *buf, uint64_t val, size_t count, const char **names, const char *prefix) { gasneti_assert_uint(count ,<, 64); if (!val) { const char *answer = "(empty)"; if (buf) strcpy(buf, answer); return (1 + strlen(answer)); } if (val & ~(((uint64_t)1 << count) - 1)) { const char *answer = "(invalid)"; if (buf) strcpy(buf, answer); return (1 + strlen(answer)); } size_t prefixlen = strlen(prefix); size_t rc = 1; if (buf) buf[0] = '\0'; for (int i = 0; i < count; ++i) { uint64_t mask = (uint64_t)1 << i; if (! (val & mask)) continue; const char *name = names[i]; if (buf) { if (rc != 1) strcat(buf, "|"); strcat(buf, prefix); strcat(buf, name); } rc += (rc==1?0:1) + prefixlen + strlen(name); } if (buf) gasneti_assert_uint(rc ,==, 1+strlen(buf)); return rc; } size_t gasneti_format_dt(char *buf, gex_DT_t dt) { static const char* names[] = {"I32", "U32", "I64", "U64", "FLT", "DBL", "USER"}; return gasneti_format_mask(buf,dt,sizeof(names)/sizeof(char *),names,"GEX_DT_"); } size_t gasneti_format_op(char *buf, gex_OP_t op) { static const char* names[] = { "AND", "OR", "XOR", "ADD", "SUB", "MULT", "MIN", "MAX", "INC", "DEC", "SET", "CAS", "UNK12", "UNK13", "UNK14", // 12 - 14 reserved "FAND", "FOR", "FXOR", "FADD", "FSUB", "FMULT", "FMIN", "FMAX", "FINC", "FDEC", "SWAP", "FCAS", "GET", "UNK28", "UNK29", // 28 - 29 reserved "USER", "USER_NC" }; return gasneti_format_mask(buf,op,sizeof(names)/sizeof(char *),names,"GEX_OP_"); } size_t gasneti_format_ti(char *buf, gex_TI_t ti) { static const char* names[] = { "SRCRANK", "ENTRY", "IS_REQ", "IS_LONG", "EP" }; return gasneti_format_mask(buf,ti,sizeof(names)/sizeof(char *),names,"GEX_TI_"); } /* ------------------------------------------------------------------------------------ */ /* Magic number trace formatting - legal even without STATS/TRACE */ void gasneti_format_magic(char *buf, uint64_t magic) { char *p = buf + snprintf(buf, GASNETI_MAX_MAGICSZ, "0x%016" PRIx64 "(", magic); gasneti_magic_t m; m._u = magic; for (int i = 0; i < sizeof(uint64_t); ++i) { unsigned char c = m._c[i]; *(p++) = isprint((int)c) ? c : '?'; } *(p++) = ')'; *(p++) = '\0'; gasneti_assert_uint(strlen(buf) ,==, GASNETI_MAX_MAGICSZ-1); } /* ------------------------------------------------------------------------------------ */ /* line number control */ #if GASNET_SRCLINES #if GASNETI_CLIENT_THREADS GASNETI_THREADKEY_DEFINE(gasneti_srclineinfo_key); typedef struct { const char *filename; unsigned int linenum; unsigned int frozen; } gasneti_srclineinfo_t; static void gasneti_srclineinfo_cleanup_threaddata(void *_td) { gasneti_threadkey_set(gasneti_srclineinfo_key, NULL); gasneti_free(_td); } GASNETI_INLINE(gasneti_mysrclineinfo) gasneti_srclineinfo_t *gasneti_mysrclineinfo(void) { gasneti_srclineinfo_t *srclineinfo = gasneti_threadkey_get(gasneti_srclineinfo_key); if_pt (srclineinfo) { gasneti_memcheck(srclineinfo); return srclineinfo; } else { /* first time we've seen this thread - need to set it up */ gasneti_srclineinfo_t *srclineinfo = gasneti_calloc(1,sizeof(gasneti_srclineinfo_t)); gasneti_threadkey_set(gasneti_srclineinfo_key, srclineinfo); gasnete_register_threadcleanup(gasneti_srclineinfo_cleanup_threaddata, srclineinfo); gasneti_leak(srclineinfo); return srclineinfo; } } void gasneti_trace_setsourceline(const char *filename, unsigned int linenum) { gasneti_srclineinfo_t *sli = gasneti_mysrclineinfo(); if_pf (sli->frozen > 0) return; if_pt (filename) sli->filename = filename; sli->linenum = linenum; } extern void gasneti_trace_getsourceline(const char **pfilename, unsigned int *plinenum) { gasneti_srclineinfo_t *sli = gasneti_mysrclineinfo(); *pfilename = sli->filename; *plinenum = sli->linenum; } extern void gasneti_trace_freezesourceline(void) { gasneti_srclineinfo_t *sli = gasneti_mysrclineinfo(); sli->frozen++; } extern void gasneti_trace_unfreezesourceline(void) { gasneti_srclineinfo_t *sli = gasneti_mysrclineinfo(); gasneti_assert_int(sli->frozen ,>, 0); sli->frozen--; } #else const char *gasneti_srcfilename = NULL; unsigned int gasneti_srclinenum = 0; unsigned int gasneti_srcfreeze = 0; #endif #endif // gasneti_dynsprintf() available even w/o TRACE/STATS // For instance, for generating portions of error messages #if 1 #define BUFSZ 8192 #define NUMBUFS 4 typedef struct { int bufidx; char bufs[NUMBUFS][BUFSZ]; } gasneti_printbuf_t; GASNETI_THREADKEY_DEFINE(gasneti_printbuf_key); static void gasneti_printbuf_cleanup_threaddata(void *_td) { gasneti_threadkey_set(gasneti_printbuf_key, NULL); gasneti_free(_td); } static char *gasneti_getbuf(void) { gasneti_printbuf_t * printbuf; if ((printbuf = gasneti_threadkey_get(gasneti_printbuf_key)) == NULL) { printbuf = gasneti_malloc(sizeof(gasneti_printbuf_t)); gasneti_threadkey_set(gasneti_printbuf_key, printbuf); printbuf->bufidx = 0; gasnete_register_threadcleanup(gasneti_printbuf_cleanup_threaddata, printbuf); gasneti_leak(printbuf); } gasneti_memcheck(printbuf); printbuf->bufidx = (printbuf->bufidx+1) % NUMBUFS; return printbuf->bufs[printbuf->bufidx]; } /* format and return a string result caller should not deallocate string, they are recycled automatically */ extern char *gasneti_dynsprintf(const char *format, ...) { va_list argptr; char *output = gasneti_getbuf(); va_start(argptr, format); /* pass in last argument */ { int sz = vsnprintf(output, BUFSZ, format, argptr); if (sz >= (BUFSZ-5) || sz < 0) strcpy(output+(BUFSZ-5),"..."); } va_end(argptr); return output; } #endif #if GASNETI_STATS_OR_TRACE #define BUILD_STATS(type,name,desc) { #type, #name, #desc }, gasneti_statinfo_t gasneti_stats[] = { GASNETI_ALL_STATS(BUILD_STATS, BUILD_STATS, BUILD_STATS) {NULL, NULL, NULL} }; /* give gcc enough information to type-check our format strings */ GASNETI_FORMAT_PRINTF(gasneti_file_vprintf,2,0, static void gasneti_file_vprintf(FILE *fp, const char *format, va_list argptr)); GASNETI_FORMAT_PRINTF(gasneti_trace_printf,1,2, static void gasneti_trace_printf(const char *format, ...)); GASNETI_FORMAT_PRINTF(gasneti_stats_printf,1,2, static void gasneti_stats_printf(const char *format, ...)); GASNETI_FORMAT_PRINTF(gasneti_tracestats_printf,1,2, static void gasneti_tracestats_printf(const char *format, ...)); #define BYTES_PER_LINE 16 #define MAX_LINES 10 /* format a block of data into a string and return it - caller should not deallocate string, they are recycled automatically */ extern char *gasneti_formatdata(void *p, size_t nbytes) { uint8_t *data = (uint8_t *)p; char *output = gasneti_getbuf(); *output = '\0'; if (nbytes <= 8) { /* fits on one line */ size_t i; for (i=0; i < nbytes; i++) { char temp[5]; sprintf(temp,"%02x ",(int)data[i]); strcat(output, temp); } } else { size_t line; size_t col; size_t byteidx = 0; strcat(output,"\n"); for (line=0;line%s (%c) %s%s", (int)gasneti_mynode, (int)(uintptr_t)pthread_self(), time, srclinestr, *type, msg, (msg[strlen(msg)-1]=='\n'?"":"\n")); #else fprintf(fp, "%i %8.6fs>%s (%c) %s%s", (int)gasneti_mynode, time, srclinestr, *type, msg, (msg[strlen(msg)-1]=='\n'?"":"\n")); #endif } else { fprintf(fp, "%i> (%c) %s%s", (int)gasneti_mynode, *type, msg, (msg[strlen(msg)-1]=='\n'?"":"\n")); } GASNETI_TRACEFILE_FLUSH(fp); } /* dump message to tracefile */ extern void gasneti_trace_output(const char *type, const char *msg, int traceheader) { if (gasneti_tracefile) { double time = gasneti_ticks_to_ns(gasneti_ticks_now() - starttime) / 1.0E9; gasneti_mutex_lock(&gasneti_tracelock); if (gasneti_tracefile) gasneti_file_output(gasneti_tracefile, time, type, msg, traceheader); gasneti_mutex_unlock(&gasneti_tracelock); } } extern void gasneti_stats_output(const char *type, const char *msg, int traceheader) { if (gasneti_tracefile || gasneti_statsfile) { double time = gasneti_ticks_to_ns(gasneti_ticks_now() - starttime) / 1.0E9; gasneti_mutex_lock(&gasneti_tracelock); if (gasneti_statsfile) gasneti_file_output(gasneti_statsfile, time, type, msg, traceheader); #if GASNETI_STATS_ECHOED_TO_TRACEFILE if (gasneti_tracefile && gasneti_tracefile != gasneti_statsfile) /* stat output also goes to trace */ gasneti_file_output(gasneti_tracefile, time, type, msg, traceheader); #endif gasneti_mutex_unlock(&gasneti_tracelock); } } extern void gasneti_tracestats_output(const char *type, const char *msg, int traceheader) { if (gasneti_tracefile || gasneti_statsfile) { double time = gasneti_ticks_to_ns(gasneti_ticks_now() - starttime) / 1.0E9; gasneti_mutex_lock(&gasneti_tracelock); if (gasneti_statsfile) gasneti_file_output(gasneti_statsfile, time, type, msg, traceheader); if (gasneti_tracefile && gasneti_tracefile != gasneti_statsfile) gasneti_file_output(gasneti_tracefile, time, type, msg, traceheader); gasneti_mutex_unlock(&gasneti_tracelock); } } /* private helper for gasneti_trace/stats_printf */ static void gasneti_file_vprintf(FILE *fp, const char *format, va_list argptr) { gasneti_mutex_assertlocked(&gasneti_tracelock); gasneti_assert(fp); int rc; rc = fprintf(fp, "%i> ", (int)gasneti_mynode); gasneti_assert_always_int(rc ,>=, 3); rc = vfprintf(fp, format, argptr); gasneti_assert_always_int(rc ,>=, 0); if (format[strlen(format)-1]!='\n') fprintf(fp, "\n"); GASNETI_TRACEFILE_FLUSH(fp); } /* dump message to tracefile with simple header */ static void gasneti_trace_printf(const char *format, ...) { va_list argptr; if (gasneti_tracefile) { gasneti_mutex_lock(&gasneti_tracelock); if (gasneti_tracefile) { va_start(argptr, format); /* pass in last argument */ gasneti_file_vprintf(gasneti_tracefile, format, argptr); va_end(argptr); } gasneti_mutex_unlock(&gasneti_tracelock); } } static void gasneti_stats_printf(const char *format, ...) { va_list argptr; if (gasneti_tracefile || gasneti_statsfile) { gasneti_mutex_lock(&gasneti_tracelock); if (gasneti_statsfile) { va_start(argptr, format); /* pass in last argument */ gasneti_file_vprintf(gasneti_statsfile, format, argptr); va_end(argptr); } #if GASNETI_STATS_ECHOED_TO_TRACEFILE if (gasneti_tracefile && gasneti_tracefile != gasneti_statsfile) { /* stat output also goes to trace */ va_start(argptr, format); /* pass in last argument */ gasneti_file_vprintf(gasneti_tracefile, format, argptr); va_end(argptr); } #endif gasneti_mutex_unlock(&gasneti_tracelock); } } static void gasneti_tracestats_printf(const char *format, ...) { va_list argptr; if (gasneti_tracefile || gasneti_statsfile) { gasneti_mutex_lock(&gasneti_tracelock); if (gasneti_statsfile) { va_start(argptr, format); /* pass in last argument */ gasneti_file_vprintf(gasneti_statsfile, format, argptr); va_end(argptr); } if (gasneti_tracefile && gasneti_tracefile != gasneti_statsfile) { va_start(argptr, format); /* pass in last argument */ gasneti_file_vprintf(gasneti_tracefile, format, argptr); va_end(argptr); } gasneti_mutex_unlock(&gasneti_tracelock); } } #endif extern FILE *gasneti_open_outputfile(const char *filename, const char *desc) { FILE *fp = NULL; char pathtemp[255]; if (!strcmp(filename, "stderr") || !strcmp(filename, "-")) { filename = "stderr"; fp = stderr; } else if (!strcmp(filename, "stdout")) { filename = "stdout"; fp = stdout; } else { strcpy(pathtemp,filename); while (strchr(pathtemp,'%')) { /* replace any '%' with node num */ char temp[255]; char *p = strchr(pathtemp,'%'); *p = '\0'; sprintf(temp,"%s%i%s",pathtemp,(int)gasneti_mynode,p+1); strcpy(pathtemp,temp); } filename = pathtemp; { #if PLATFORM_OS_CYGWIN const char mode[] = "wt"; #else const char mode[] = "w"; #endif #ifdef HAVE_FOPEN64 fp = fopen64(filename, mode); #else fp = fopen(filename, mode); #endif } if (!fp) { gasneti_console_message("ERROR", "Failed to open '%s' for %s output (%s). Redirecting output to stderr.\n", filename, desc, strerror(errno)); filename = "stderr"; fp = stderr; } } gasneti_console_message("GASNet reporting enabled", "%s output directed to %s\n", desc, filename); return fp; } /* check node restriction */ extern int gasneti_check_node_list(const char *listvar) { unsigned long node = (unsigned long)gasneti_mynode; char *p = gasneti_getenv_withdefault(listvar,NULL); if (!p || !*p) return 1; while (p && *p) { unsigned long val1, val2; int match; if (*p == '*') return 1; match = sscanf(p, "%lu-%lu", &val1, &val2); if (match == 1) { if (node == val1) return 1; } else if (match == 2) { if ((node >= val1) && (node <= val2)) return 1; } p = strchr(p, ','); if (p) ++p; } return 0; } /* overwrite the current stats/trace mask (types) with the provided human-readable newmask, updating the human-readable maskstr. Unrecognized human-readable types are ignored. */ extern void gasneti_trace_updatemask(const char *newmask, char *maskstr, char *types) { char *typesall = NULL; const char *desc; const char *p; char *newmaskstr = maskstr; int complement = newmask && (newmask[0] == '^'); if (types == gasneti_tracetypes) { typesall = gasneti_tracetypes_all; desc = "GASNET_TRACEMASK"; #if !GASNET_TRACE return; #endif } else if (types == gasneti_statstypes) { typesall = gasneti_statstypes_all; desc = "GASNET_STATSMASK"; #if !GASNET_STATS return; #endif } else gasneti_fatalerror("Bad call to gasneti_trace_updatemask"); { static gasneti_mutex_t maskupdate_mutex = GASNETI_MUTEX_INITIALIZER; /* ensure mutual exclusion for concurrent mask updates - we do not attempt to prevent races with concurrent tracing, any such desired synchronization must be provided by the client */ gasneti_mutex_lock(&maskupdate_mutex); for (p = GASNETI_ALLTYPES; *p; p++) { gasneti_assert(!types[(int)*p] || typesall[(int)*p]); types[(int)*p] = !!strchr(newmask, *p) ^ complement; typesall[(int)*p] |= types[(int)*p]; if (types[(int)*p]) *(newmaskstr++) = *p; } *newmaskstr = '\0'; types['U'] = 1; /* category U is not in GASNETI_ALLTYPES, but is always enabled */ typesall['U'] = 1; { /* ensure tracemask change messages always makes it into the trace */ char tmpi = gasneti_tracetypes[(int)'I']; gasneti_tracetypes[(int)'I'] = 1; GASNETI_TRACE_PRINTF(I,("Setting %s to: %s", desc, maskstr)); gasneti_tracetypes[(int)'I'] = tmpi; } gasneti_mutex_unlock(&maskupdate_mutex); } } #if GASNET_DEBUGMALLOC static const char *gasneti_mallocreport_filename = NULL; #endif extern void gasneti_trace_init(int *pargc, char ***pargv) { char *argv0 = NULL; gasneti_free(gasneti_malloc(1)); /* touch the malloc system to ensure it's intialized */ static char procid_str[32]; // init the process identifier used in error reporting sprintf(procid_str, "proc %i", (int)gasneti_mynode); gasneti_procid_str = procid_str; /* If we didn't receive argc and argv from caller, try to get the full * command line from the system. */ if (!pargc || !pargv) gasneti_argv_from_system(&pargc,&pargv); if (pargc && pargv) { /* ensure the arguments have been decoded */ gasneti_decode_args(pargc, pargv); argv0 = (*pargv)[0]; } { // update gasneti_exe_name (if needed) and init backtrace char *exename = (char *)gasneti_exe_name(); gasneti_assert(exename); if (!*exename && argv0 && *argv0) { gasneti_qualify_path(exename, argv0); } if (*exename) { gasneti_backtrace_init(exename); } } #if GASNETI_STATS_OR_TRACE starttime = gasneti_ticks_now(); { /* setup tracefile */ FILE *gasneti_tracefile_tmp = NULL, *gasneti_statsfile_tmp = NULL; char *tracefilename = gasneti_getenv_withdefault("GASNET_TRACEFILE",""); char *statsfilename = gasneti_getenv_withdefault("GASNET_STATSFILE",""); if (tracefilename && !strcmp(tracefilename, "")) tracefilename = NULL; if (tracefilename && !gasneti_check_node_list("GASNET_TRACENODES")) tracefilename = NULL; if (statsfilename && !strcmp(statsfilename, "")) statsfilename = NULL; if (statsfilename && !gasneti_check_node_list("GASNET_STATSNODES")) statsfilename = NULL; #if GASNET_TRACE || (GASNET_STATS && GASNETI_STATS_ECHOED_TO_TRACEFILE) if (tracefilename) { gasneti_tracefile_tmp = gasneti_open_outputfile(tracefilename, #if GASNET_TRACE "tracing" #if GASNET_STATS && GASNETI_STATS_ECHOED_TO_TRACEFILE " and " #endif #endif #if GASNET_STATS && GASNETI_STATS_ECHOED_TO_TRACEFILE "statistical" #endif ); } else #endif gasneti_tracefile_tmp = NULL; #if GASNET_STATS if (statsfilename) gasneti_statsfile_tmp = gasneti_open_outputfile(statsfilename, "statistical"); else #endif gasneti_statsfile_tmp = NULL; /* query tracing environment variables with tracing still disabled */ #if GASNET_TRACE if (gasneti_tracefile_tmp) { GASNETI_TRACE_SETMASK(gasneti_getenv_withdefault("GASNET_TRACEMASK", GASNETI_ALLTYPES)); } else GASNETI_TRACE_SETMASK(""); #endif #if GASNET_STATS if (gasneti_statsfile_tmp || gasneti_tracefile_tmp) { GASNETI_STATS_SETMASK(gasneti_getenv_withdefault("GASNET_STATSMASK", GASNETI_ALLTYPES)); } else GASNETI_STATS_SETMASK(""); #endif gasneti_autoflush = gasneti_getenv_yesno_withdefault("GASNET_TRACEFLUSH",0); gasneti_trace_suppresslocal = !gasneti_getenv_yesno_withdefault("GASNET_TRACELOCAL",1); /* begin tracing */ gasneti_tracefile = gasneti_tracefile_tmp; gasneti_statsfile = gasneti_statsfile_tmp; } { time_t ltime; char temp[1024]; time(<ime); strcpy(temp, ctime(<ime)); if (temp[strlen(temp)-1] == '\n') temp[strlen(temp)-1] = '\0'; gasneti_tracestats_printf("Program %s (pid=%i) starting on %s at: %s", gasneti_exe_name(), (int)getpid(), gasnett_gethostname(), temp); } if (pargc && pargv && (gasneti_tracefile || gasneti_statsfile)) { size_t sz = 80; for (int i=0; i < *pargc; i++) { const char *arg = (*pargv)[i]; sz += (arg?strlen(arg):0) + 8; } char *temp = gasneti_malloc(sz); char *p = temp; *p = 0; for (int i=0; i < *pargc; i++) { const char *arg = (*pargv)[i]; if (!arg) strcpy(p,""); else { int hasspace = 0; for (const char *q = arg; *q && !hasspace; q++) if (isspace((int)*q)) hasspace = 1; if (hasspace) sprintf(p, "'%s'", arg); else sprintf(p, "%s", arg); } if (i < *pargc-1) strcat(p, " "); p += strlen(p); } gasneti_tracestats_printf("Command-line: %s", temp); gasneti_free(temp); } gasneti_tracestats_printf("GASNET_CONFIG_STRING: %s", GASNET_CONFIG_STRING); gasneti_tracestats_printf("GASNet build timestamp: " __DATE__ " " __TIME__); gasneti_tracestats_printf("GASNet configure args: %s", GASNETI_CONFIGURE_ARGS); gasneti_tracestats_printf("GASNet configure buildid: " GASNETI_BUILD_ID); gasneti_tracestats_printf("GASNet system tuple: " GASNETI_SYSTEM_TUPLE); gasneti_tracestats_printf("GASNet configure system: " GASNETI_SYSTEM_NAME); gasneti_tracestats_printf("gex_System_QueryJobRank(): %i", (int)gex_System_QueryJobRank()); gasneti_tracestats_printf("gex_System_QueryJobSize(): %i", (int)gex_System_QueryJobSize()); gasneti_tracestats_printf("gasneti_cpu_count(): %i", (int)gasneti_cpu_count()); gasneti_tracestats_printf("gasneti_getPhysMemSz(): %"PRIu64, gasneti_getPhysMemSz(0)); #if GASNET_STATS gasneti_stats_printf("GASNET_STATSMASK: %s", GASNETI_STATS_GETMASK()); #endif #if GASNET_TRACE gasneti_trace_printf("GASNET_TRACEMASK: %s", GASNETI_TRACE_GETMASK()); gasneti_trace_printf("GASNET_TRACEFLUSH: %i", gasneti_autoflush); gasneti_trace_printf("GASNET_TRACELOCAL: %i", !gasneti_trace_suppresslocal); #endif #if GASNET_NDEBUG { const char *NDEBUG_warning = "tracing/statistical collection may adversely affect application performance."; gasneti_stats_printf("WARNING: %s", NDEBUG_warning); gasneti_console0_message("WARNING", "%s", NDEBUG_warning); } #endif #ifdef GASNETI_USING_GETTIMEOFDAY gasneti_tracestats_printf("WARNING: using gettimeofday() for timing measurement - " "all short-term time measurements will be very rough and include significant timer overheads"); #endif gasneti_tracestats_printf("Timer granularity: ~ %.3f us, overhead: ~ %.3f us", gasneti_tick_granularity(), gasneti_tick_overhead()); gasneti_tracestats_forceflush(); #endif /* GASNETI_STATS_OR_TRACE */ #if GASNET_DEBUGMALLOC #if GASNET_NDEBUG { const char *NDEBUG_warning = "debugging malloc may adversely affect application performance."; #if GASNETI_STATS_OR_TRACE gasneti_stats_printf("WARNING: %s", NDEBUG_warning); #endif gasneti_console0_message("WARNING", "%s", NDEBUG_warning); } #endif gasneti_mallocreport_filename = gasneti_getenv_withdefault("GASNET_MALLOCFILE",""); if (gasneti_mallocreport_filename && !strcmp(gasneti_mallocreport_filename, "")) gasneti_mallocreport_filename = NULL; if (gasneti_mallocreport_filename && !gasneti_check_node_list("GASNET_MALLOCNODES")) gasneti_mallocreport_filename = NULL; #endif } /* output statistical summary to statsfile, optionally resetting counters */ extern void gasneti_stats_dump(int reset) { #if GASNET_STATS if (!gasneti_statsfile #if GASNETI_STATS_ECHOED_TO_TRACEFILE && !gasneti_tracefile #endif ) return; // output is disabled on this process static gasneti_mutex_t stats_dump_lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&stats_dump_lock); /* reenable all statistics that have ever been enabled, for the final aggregation dump */ char statstypes_tmp[GASNETI_MAX_MASKBITS]; // save current mask memcpy(statstypes_tmp, gasneti_statstypes, GASNETI_MAX_MASKBITS); memcpy(gasneti_statstypes, gasneti_statstypes_all, GASNETI_MAX_MASKBITS); gasneti_tracestats_output("U","Generating statistical summary",1); if (gasnett_stats_callback && GASNETI_STATS_ENABLED(H)) { gasneti_stats_printf("--------------------------------------------------------------------------------"); (*gasnett_stats_callback)(gasneti_stats_printf); } gasneti_stats_printf("--------------------------------------------------------------------------------"); gasneti_stats_printf("GASNet Statistical Summary:"); const gasneti_statctr_t clear_ctr = 0; const gasneti_stat_intval_t clear_intval = { 0, GASNETI_STATCTR_MAX, GASNETI_STATCTR_MIN, 0 }; const gasneti_stat_timeval_t clear_timeval = { 0, GASNETI_TICK_MAX, GASNETI_TICK_MIN, 0 }; // initialize some stat accumulators #define AGGRNAME(cat,type) aggregate_##cat##_##type #define AGGR(type) \ gasneti_statctr_t AGGRNAME(ctr,type) = clear_ctr; \ gasneti_stat_intval_t AGGRNAME(intval,type) = clear_intval; \ gasneti_stat_timeval_t AGGRNAME(timeval,type) = clear_timeval; AGGR(G); AGGR(P); AGGR(S); AGGR(R); AGGR(W); AGGR(X); AGGR(B); AGGR(L); AGGR(A); AGGR(I); AGGR(C); AGGR(D); #define ACCUM(pacc, pintval) do { \ pacc->_count += pintval->_count; \ if (pintval->_minval < pacc->_minval) pacc->_minval = pintval->_minval; \ if (pintval->_maxval > pacc->_maxval) pacc->_maxval = pintval->_maxval; \ pacc->_sumval += pintval->_sumval; \ } while (0) #define CALC_AVG(sum,count) ((count) == 0 ? (double)-1 : (double)(sum) / (double)(count)) #define DUMP_CTR(type,name,desc) \ if (GASNETI_STATS_ENABLED(type)) { \ gasneti_statctr_t *p = &gasneti_stat_ctr_##name; \ gasneti_stats_printf(" %-25s %6"PRIu64, \ #name" "#desc":", *p); \ AGGRNAME(ctr,type) += *p; \ if (reset) *p = clear_ctr; \ } #define DUMP_INTVAL(type,name,desc) \ if (GASNETI_STATS_ENABLED(type)) { \ gasneti_stat_intval_t *p = &gasneti_stat_intval_##name; \ const char *pdesc = #desc; \ if (!p->_count) \ gasneti_stats_printf(" %-25s %6i", #name":", 0); \ else \ gasneti_stats_printf(" %-25s %6"PRIu64" avg/min/max/total" \ " %s = %.3f/%"PRIu64"/%"PRIu64"/%"PRIu64, \ #name":", p->_count, pdesc, \ CALC_AVG(p->_sumval,p->_count), \ p->_minval, p->_maxval, p->_sumval); \ ACCUM((&AGGRNAME(intval,type)), p); \ if (reset) *p = clear_intval; \ } #define DUMP_TIMEVAL(type,name,desc) \ if (GASNETI_STATS_ENABLED(type)) { \ gasneti_stat_timeval_t *p = &gasneti_stat_timeval_##name; \ const char *pdesc = #desc; \ if (!p->_count) \ gasneti_stats_printf(" %-25s %6i", #name":", 0); \ else \ gasneti_stats_printf(" %-25s %6"PRIu64" avg/min/max/total" \ " %s (us) = %.3f/%.3f/%.3f/%.3f", \ #name":", p->_count, pdesc, \ gasneti_ticks_to_ns(CALC_AVG(p->_sumval, p->_count))/1000.0, \ gasneti_ticks_to_ns(p->_minval)/1000.0, \ gasneti_ticks_to_ns(p->_maxval)/1000.0, \ gasneti_ticks_to_ns(p->_sumval)/1000.0); \ ACCUM((&AGGRNAME(timeval,type)), p); \ if (reset) *p = clear_timeval; \ } GASNETI_STAT_LOCK(); GASNETI_ALL_STATS(DUMP_CTR, DUMP_INTVAL, DUMP_TIMEVAL); GASNETI_STAT_UNLOCK(); // output aggregated values in accumulators gasneti_stats_printf(" "); gasneti_stats_printf(" "); #define DUMP_AGGR_SZ(type,name) do { \ if (GASNETI_STATS_ENABLED(type)) { \ gasneti_stat_intval_t *p = &AGGRNAME(intval,type); \ if (!p->_count) \ gasneti_stats_printf("%-25s %6i","Total "#name":",0); \ else \ gasneti_stats_printf("%-25s %6"PRIu64" avg/min/max/total" \ " sz = %.3f/%"PRIu64"/%"PRIu64"/%"PRIu64, \ "Total "#name":", \ p->_count, CALC_AVG(p->_sumval,p->_count), \ p->_minval, p->_maxval, p->_sumval); \ } \ } while (0) DUMP_AGGR_SZ(G,gets); DUMP_AGGR_SZ(P,puts); DUMP_AGGR_SZ(W,collectives); if (GASNETI_STATS_ENABLED(S)) { gasneti_stat_intval_t *try_succ = &AGGRNAME(intval,S); gasneti_stat_timeval_t *wait_time = &AGGRNAME(timeval,S); if (!try_succ->_count) gasneti_stats_printf("%-25s %6i","Total try sync. calls:",0); else gasneti_stats_printf("%-25s %6"PRIu64" try success rate = %.3f%% \n", "Total try sync. calls:", try_succ->_count, CALC_AVG(try_succ->_sumval, try_succ->_count) * 100.0); if (!wait_time->_count) gasneti_stats_printf("%-25s %6i","Total wait sync. calls:",0); else gasneti_stats_printf("%-25s %6"PRIu64" avg/min/max/total waittime (us) = %.3f/%.3f/%.3f/%.3f", "Total wait sync. calls:", wait_time->_count, gasneti_ticks_to_ns(CALC_AVG(wait_time->_sumval, wait_time->_count))/1000.0, gasneti_ticks_to_ns(wait_time->_minval)/1000.0, gasneti_ticks_to_ns(wait_time->_maxval)/1000.0, gasneti_ticks_to_ns(wait_time->_sumval)/1000.0); } if (GASNETI_STATS_ENABLED(A)) gasneti_stats_printf("%-25s %6"PRIu64, "Total AM's:", AGGRNAME(ctr,A)); gasneti_stats_printf("--------------------------------------------------------------------------------"); GASNETC_STATS_DUMP(reset); /* allow for dump of conduit-core specific statistics */ GASNETE_STATS_DUMP(reset); /* allow for dump of conduit-extended specific statistics */ if (reset) gasneti_tracestats_output("U","Stats have been RESET at client request.",1); gasneti_tracestats_forceflush(); memcpy(gasneti_statstypes, statstypes_tmp, GASNETI_MAX_MASKBITS); // restore gasneti_mutex_unlock(&stats_dump_lock); #endif } extern void gasneti_trace_finish(void) { #if GASNETI_STATS_OR_TRACE static gasneti_mutex_t gasneti_tracefinishlock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&gasneti_tracefinishlock); if (gasneti_tracefile || gasneti_statsfile) { double time = gasneti_ticks_to_ns(gasneti_ticks_now() - starttime) / 1.0E9; gasneti_tracestats_printf("Total application run time: %10.6fs", time); gasneti_tracestats_forceflush(); gasneti_stats_dump(0); gasneti_mutex_lock(&gasneti_tracelock); if (gasneti_tracefile && gasneti_tracefile != stdout && gasneti_tracefile != stderr) fclose(gasneti_tracefile); if (gasneti_statsfile && gasneti_statsfile != stdout && gasneti_statsfile != stderr) fclose(gasneti_statsfile); gasneti_tracefile = NULL; gasneti_statsfile = NULL; gasneti_mutex_unlock(&gasneti_tracelock); gasneti_mutex_unlock(&gasneti_tracefinishlock); sleep(1); /* pause to ensure everyone has written trace if this is a collective exit */ } #endif #if GASNET_DEBUGMALLOC if (gasneti_mallocreport_filename) gasneti_heapinfo_dump(gasneti_mallocreport_filename, 1); #endif } /* ------------------------------------------------------------------------------------ */ #if GASNET_STATS #define DEF_CTR(type,name,desc) \ gasneti_statctr_t gasneti_stat_ctr_##name = 0; #define DEF_INTVAL(type,name,desc) \ gasneti_stat_intval_t gasneti_stat_intval_##name = \ { 0, GASNETI_STATCTR_MAX, GASNETI_STATCTR_MIN, 0 }; #define DEF_TIMEVAL(type,name,desc) \ gasneti_stat_timeval_t gasneti_stat_timeval_##name = \ { 0, GASNETI_TICK_MAX, GASNETI_TICK_MIN, 0 }; GASNETI_ALL_STATS(DEF_CTR, DEF_INTVAL, DEF_TIMEVAL) /* TODO: these routines are probably a bottleneck for stats performance, especially with pthreads. We could reduce the performance impact of statistical collection by using inlined functions that increment weak atomics or thread-private counters that are combined at shutdown. */ extern void gasneti_stat_count_accumulate(gasneti_statctr_t *pctr) { GASNETI_STAT_LOCK(); (*pctr)++; GASNETI_STAT_UNLOCK(); } extern void gasneti_stat_intval_accumulate(gasneti_stat_intval_t *pintval, gasneti_statctr_t val) { GASNETI_STAT_LOCK(); pintval->_count++; pintval->_sumval += val; if_pf (val > pintval->_maxval) pintval->_maxval = val; if_pf (val < pintval->_minval) pintval->_minval = val; GASNETI_STAT_UNLOCK(); } extern void gasneti_stat_timeval_accumulate(gasneti_stat_timeval_t *pintval, gasneti_tick_t val) { GASNETI_STAT_LOCK(); pintval->_count++; pintval->_sumval += val; if_pf (val > pintval->_maxval) pintval->_maxval = val; if_pf (val < pintval->_minval) pintval->_minval = val; GASNETI_STAT_UNLOCK(); } #endif gasnet-2025.8.0/gasnet_timer.h0000664000175000017500000004740015142313673016261 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_timer.h $ * Description: GASNet Timer library (Internal code, not for client use) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #if !defined(_IN_GASNETEX_H) && !defined(_IN_GASNET_TOOLS_H) #error This file is not meant to be included directly- clients should include gasnetex.h or gasnet_tools.h #endif #ifndef _GASNET_TIMER_H #define _GASNET_TIMER_H /* general includes (to avoid repetition below) */ #include #include #include #include /* ------------------------------------------------------------------------------------ */ /* High-performance system timer library see README-tools for usage information */ // Note to implementers: // // When using assembly (inline or special) to implement gasneti_ticks_now() care // must be taken to ensure (via preprocessor) that such code is reachable only // by compilers which will accept it. In particular, unknown compilers should // result in "#define GASNETI_USING_SLOW_TIMERS 1" to use a function call. #if defined(GASNETC_CONDUIT_SPECIFIC_TIMERS) #if !defined(gasneti_ticks_to_ns) || !defined(gasneti_ticks_now) /* conduit-specific timers must be implemented using a macro */ #error Incomplete conduit-specific timer impl. #endif #elif defined(GASNETI_FORCE_GETTIMEOFDAY) || defined(GASNETI_FORCE_POSIX_REALTIME) /* bug3508: forced portable timer implementation overrides compilation of native timers */ /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_OS_SOLARIS #if 1 /* workaround bizarre failures on gcc 3.2.1 - seems they sometimes use a union to implement longlong_t and hence hrtime_t, and the test to determine this is (__STDC__ - 0 == 0) which is totally bogus */ typedef uint64_t gasneti_tick_t; GASNETI_INLINE(gasneti_ticks_now) gasneti_tick_t gasneti_ticks_now(void) { union { hrtime_t _in; gasneti_tick_t _out; } _t; _t._in = gethrtime(); return _t._out; } #define gasneti_ticks_to_ns(st) (st) #else typedef hrtime_t gasneti_tick_t; GASNETI_INLINE(gasneti_ticks_to_ns) uint64_t gasneti_ticks_to_ns(gasneti_tick_t _st) { gasneti_static_assert(sizeof(gasneti_tick_t) == 8); return *(uint64_t*)&_st; } #define gasneti_ticks_now() (gethrtime()) #define GASNETI_TICK_MAX ((gasneti_tick_t)(((uint64_t)-1)>>1)) #endif /* ------------------------------------------------------------------------------------ */ #elif (PLATFORM_OS_LINUX || PLATFORM_OS_OPENBSD || \ GASNETI_HAVE_SYSCTL_MACHDEP_TSC_FREQ) && \ (PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_MIC) typedef uint64_t gasneti_tick_t; #if GASNETI_HAVE_GCC_ASM GASNETI_INLINE(gasneti_ticks_now) uint64_t gasneti_ticks_now (void) { uint64_t _ret; #if (PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_MIC) uint32_t _lo, _hi; __asm__ __volatile__("rdtsc" : "=a" (_lo), "=d" (_hi) /* no inputs */); _ret = ((uint64_t)_lo) | (((uint64_t)_hi)<<32); #elif PLATFORM_ARCH_X86 __asm__ __volatile__("rdtsc" : "=A" (_ret) /* no inputs */); #else #error Unreachable #endif return _ret; } #elif PLATFORM_COMPILER_SUN && GASNETI_ASM_AVAILABLE /* The current compiler has asm, but lacks full GNU-style asm() support. * * Defining GASNETI_TICKS_NOW_BODY at library build time will use the * given asm() as the body of a function gasneti_slow_ticks_now() and * replace calls to gasneti_ticks_now() with calls to the "special" * gasneti_slow_ticks_now(). * * Defining GASNETI_TICKS_NOW_BODY when compiling client code will only * perform the gasneti_ticks_now()->gasneti_slow_ticks_now() redirection * and the actual asm() here is ignored. Since gasneti_slow_ticks_now() * is always present in the library, this makes no assumption about * what level of inline asm() support was present at library built time. */ #if PLATFORM_ARCH_X86 #define GASNETI_TICKS_NOW_BODY GASNETI_ASM_SPECIAL("rdtsc"); #elif PLATFORM_ARCH_X86_64 #define GASNETI_TICKS_NOW_BODY \ GASNETI_ASM_SPECIAL( \ "\txorq %rax, %rax \n" \ "\trdtsc \n" \ "\tshlq $32, %rdx \n" \ "\torq %rdx, %rax" ); #endif #elif PLATFORM_COMPILER_CRAY GASNETI_INLINE(gasneti_ticks_now) uint64_t gasneti_ticks_now (void) { return (uint64_t) _rtc(); } #else #define GASNETI_USING_SLOW_TIMERS 1 #endif extern double gasneti_calibrate_tsc(void); #define GASNETI_CALIBRATE_TSC 1 #define GASNETI_TIMER_DEFN \ double gasneti_timer_Tick = 0.0; \ int gasneti_timer_firstTime = 1; extern double gasneti_timer_Tick; /* inverse GHz */ extern int gasneti_timer_firstTime; GASNETI_INLINE(gasneti_ticks_to_ns) uint64_t gasneti_ticks_to_ns(gasneti_tick_t _st) { if_pf (gasneti_timer_firstTime) { gasneti_timer_Tick = gasneti_calibrate_tsc(); /* Too much to inline */ gasneti_assert(gasneti_timer_Tick != 0.0); gasneti_sync_writes(); gasneti_timer_firstTime = 0; } else gasneti_sync_reads(); return (uint64_t)(_st * gasneti_timer_Tick); } /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_POWERPC && PLATFORM_OS_LINUX /* Use the 64-bit "timebase" register on both 32- and 64-bit PowerPC CPUs */ #include #include typedef uint64_t gasneti_tick_t; #if GASNETI_HAVE_GCC_ASM #if PLATFORM_COMPILER_CLANG /* or something to force? */ /* Clang's integrated assembler (correctly) warns that mftb* are deprecated */ #define GASNETI_MFTB(_reg) "mfspr %" #_reg ",268" #define GASNETI_MFTBL(_reg) "mfspr %" #_reg ",268" #define GASNETI_MFTBU(_reg) "mfspr %" #_reg ",269" #else #define GASNETI_MFTB(_reg) "mftb %" #_reg #define GASNETI_MFTBL(_reg) "mftbl %" #_reg #define GASNETI_MFTBU(_reg) "mftbu %" #_reg #endif GASNETI_INLINE(gasneti_ticks_now) uint64_t gasneti_ticks_now(void) { uint64_t _ret; #if PLATFORM_ARCH_64 __asm__ __volatile__(GASNETI_MFTB(0) : "=r" (_ret) : /* no inputs */); #else /* Note we must read hi twice to protect against wrap of lo */ uint32_t _o_hi, _hi, _lo; __asm__ __volatile__("0: \n\t" GASNETI_MFTBU(0) "\n\t" GASNETI_MFTBL(1) "\n\t" GASNETI_MFTBU(2) "\n\t" "cmpw %0, %2\n\t" "bne- 0b\n\t" : "=r" (_o_hi), "=r" (_lo), "=r" (_hi) : /* no inputs */); _ret = ((uint64_t)_hi << 32) | _lo; #endif return _ret; } #undef GASNETI_MFTB #undef GASNETI_MFTBL #undef GASNETI_MFTBU #else #define GASNETI_USING_SLOW_TIMERS 1 #endif #define GASNETI_TIMER_DEFN \ double gasneti_timer_Tick = 0.0; \ int gasneti_timer_firstTime = 1; extern double gasneti_timer_Tick; /* inverse GHz */ extern int gasneti_timer_firstTime; GASNETI_INLINE(gasneti_ticks_to_ns) uint64_t gasneti_ticks_to_ns(gasneti_tick_t _st) { if_pf (gasneti_timer_firstTime) { uint32_t _freq; DIR *_dp = opendir("/proc/device-tree/cpus"); struct dirent *_de = NULL; FILE *_fp = NULL; double _MHz = 0.0; char _fname[128]; if (!_dp) gasneti_fatalerror("Failure in opendir('/proc/device-tree/cpus'): %s",strerror(errno)); do { _de = readdir(_dp); if (_de && ( _de->d_name == strstr(_de->d_name, "PowerPC,") || /* PowerPC */ _de->d_name == strstr(_de->d_name, "cpu@0") /* IBM cell */ )) { break; } } while (_de); if (!_de) gasneti_fatalerror("Failure to find a PowerPC CPU in /proc/device-tree/cpus"); snprintf(_fname, sizeof(_fname), "/proc/device-tree/cpus/%.*s/timebase-frequency", 24, _de->d_name); closedir(_dp); _fp = fopen(_fname, "r"); if (!_fp) gasneti_fatalerror("Failure in fopen('%s','r'): %s\n",_fname,strerror(errno)); if (fread((void *)(&_freq), sizeof(uint32_t), 1, _fp) != 1) gasneti_fatalerror("Failure to read timebase frequency from '%s': %s", _fname, strerror(errno)); #if PLATFORM_ARCH_LITTLE_ENDIAN /* value is always big-endian */ _freq = ((_freq & 0x000000ff) << 24) | ((_freq & 0x0000ff00) << 8) | ((_freq & 0x00ff0000) >> 8) | ((_freq & 0xff000000) >> 24); #endif fclose(_fp); if (_freq == 0) { /* Playstation3 */ char _input[255]; _fp = fopen("/proc/cpuinfo", "r"); if (!_fp) gasneti_fatalerror("Failure in fopen('/proc/cpuinfo','r')=%s",strerror(errno)); while (!feof(_fp) && fgets(_input, 255, _fp)) { if (strstr(_input,"timebase")) { char *_p = strchr(_input,':'); if (_p) { _freq = atoi(_p+1); break; } } } fclose(_fp); } // ensure it looks reasonable (1MHz to 2Ghz) gasneti_assert_uint(_freq ,>, 1000000); gasneti_assert_uint(_freq ,<, 2000000000); gasneti_timer_Tick = 1.0e9 / _freq; gasneti_sync_writes(); gasneti_timer_firstTime = 0; } else gasneti_sync_reads(); return (uint64_t)(_st * gasneti_timer_Tick); } /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_OS_CYGWIN #include /* note: QueryPerformanceCounter is a Win32 API call On modern processors with constant-rate TSC this expands to rdtsc. Older systems have a QueryPerformanceFrequency() which use a system call to query the ACPI counter to ensure reliablity across CPU cycle speedstepping, etc. rdtsc has lower overhead, but only works on Pentium or later, and on certain older CPUs produces wildly incorrect results if the CPU decides to change clock rate mid-run (and there's no reliable way to get the correct cycle multiplier short of timing a known-length delay and hoping for the best) See https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx */ typedef uint64_t gasneti_tick_t; #define GASNETI_TIMER_DEFN \ double gasneti_timer_Tick = 0.0; \ int gasneti_timer_firstTime = 1; extern double gasneti_timer_Tick; /* inverse GHz */ extern int gasneti_timer_firstTime; GASNETI_INLINE(gasneti_ticks_now) gasneti_tick_t gasneti_ticks_now(void) { LARGE_INTEGER _val; gasneti_assert_nzeroret(QueryPerformanceCounter(&_val)); gasneti_assert(_val.QuadPart > 0); return (gasneti_tick_t)_val.QuadPart; } GASNETI_INLINE(gasneti_ticks_to_ns) uint64_t gasneti_ticks_to_ns(gasneti_tick_t _st) { if_pf (gasneti_timer_firstTime) { LARGE_INTEGER _temp; gasneti_assert_nzeroret(QueryPerformanceFrequency(&_temp)); gasneti_timer_Tick = 1.0E9 / ((double)_temp.QuadPart); gasneti_sync_writes(); gasneti_timer_firstTime = 0; } else gasneti_sync_reads(); return (uint64_t)(_st * gasneti_timer_Tick); } /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_OS_DARWIN /* See http://developer.apple.com/qa/qa2004/qa1398.html */ #include typedef uint64_t gasneti_tick_t; #define GASNETI_TIMER_DEFN \ double gasneti_timer_Tick = 0.0; \ int gasneti_timer_firstTime = 1; extern double gasneti_timer_Tick; /* inverse GHz */ extern int gasneti_timer_firstTime; #define gasneti_ticks_now() mach_absolute_time() GASNETI_INLINE(gasneti_ticks_to_ns) uint64_t gasneti_ticks_to_ns(gasneti_tick_t _st) { if_pf (gasneti_timer_firstTime) { mach_timebase_info_data_t _tb; gasneti_assert_zeroret(mach_timebase_info(&_tb)); gasneti_timer_Tick = ((double)_tb.numer) / ((double)_tb.denom); gasneti_sync_writes(); gasneti_timer_firstTime = 0; } else gasneti_sync_reads(); return (uint64_t)(_st * gasneti_timer_Tick); } /* ------------------------------------------------------------------------------------ */ #elif GASNETI_HAVE_AARCH64_CNTVCT_EL0 /* AARCH64/ARMv8 Virtual Timer Count register */ #include typedef uint64_t gasneti_tick_t; #define GASNETI_TIMER_DEFN \ double gasneti_timer_Tick = 0.0; \ int gasneti_timer_firstTime = 1; extern double gasneti_timer_Tick; /* inverse GHz */ extern int gasneti_timer_firstTime; #if GASNETI_HAVE_GCC_ASM GASNETI_INLINE(gasneti_ticks_now) gasneti_tick_t gasneti_ticks_now(void) { gasneti_tick_t _ret; __asm__ __volatile__ ("isb\n\t" "mrs %0,CNTVCT_EL0" : "=r" (_ret) : /* no inputs */ : "memory"); return _ret; } #else #define GASNETI_USING_SLOW_TIMERS #endif GASNETI_INLINE(gasneti_ticks_to_ns) uint64_t gasneti_ticks_to_ns(gasneti_tick_t _st) { if_pf (gasneti_timer_firstTime) { uint64_t _freq; __asm__ __volatile__ ("mrs %0,CNTFRQ_EL0" : "=r" (_freq)); gasneti_timer_Tick = 1.0E9/_freq; gasneti_sync_writes(); gasneti_timer_firstTime = 0; } else gasneti_sync_reads(); return (uint64_t)(_st * gasneti_timer_Tick); } /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_MICROBLAZE && (defined(MB_CC) || defined(MB_FSL_CC)) typedef uint64_t gasneti_tick_t; GASNETI_INLINE(gasneti_ticks_now) #if GASNETI_HAVE_GCC_ASM gasneti_tick_t gasneti_ticks_now(void) { unsigned int _msr, _tmp; gasneti_tick_t _retval; #if defined(MB_CC) __asm__ __volatile__("mfs %0, rmsr\n\t" "andi %1, %0, ~2\n\t" "mts rmsr, %1\n\t" "mfchl %M2\n\t" "mfccl %L2\n\t" "mts rmsr, %0\n\t" : "=r"(_msr), "=r"(_tmp), "=r"(_retval) : /* no inputs */); #elif defined(MB_FSL_CC) __asm__ __volatile__("mfs %0, rmsr\n\t" "andi %1, %0, ~2\n\t" "mts rmsr, %1\n\t" "get %M2, rfsl6\n\t" "cget %L2, rfsl7\n\t" "mts rmsr, %0\n\t" : "=r"(_msr), "=r"(_tmp), "=r"(_retval) : /* no inputs */); #endif return _retval; } #else #define GASNETI_USING_SLOW_TIMERS 1 #endif GASNETI_INLINE(gasneti_ticks_to_us) gasneti_tick_t gasneti_ticks_to_us(gasneti_tick_t _st) { unsigned int _h0 = (unsigned int) (_st >> 32); unsigned int _l0 = (unsigned int) (_st >> 0); if (_h0 == 0) return (((gasneti_tick_t) _l0) / MB_TICKS_PER_US); else return (_st / MB_TICKS_PER_US); } GASNETI_INLINE(gasneti_ticks_to_ns) gasneti_tick_t gasneti_ticks_to_ns(gasneti_tick_t _st) { unsigned int _h0 = (unsigned int) (_st >> 32); unsigned int _l0 = (unsigned int) (_st >> 0); if (_h0 == 0) return (((gasneti_tick_t) _l0) * (1000 / MB_TICKS_PER_US)); else return (_st * (1000 / MB_TICKS_PER_US)); } /* ------------------------------------------------------------------------------------ */ #elif HAVE_CLOCK_GETTIME /* POSIX realtime support - when available, usually outperforms gettimeofday */ #define GASNETI_USING_POSIX_REALTIME 1 /* ------------------------------------------------------------------------------------ */ #else /* use slow, portable timers */ #define GASNETI_USING_GETTIMEOFDAY 1 #endif #if GASNETI_USING_SLOW_TIMERS && GASNETI_COMPILER_IS_CC #error unknown compiler - dont know how to read timer registers #endif /* ------------------------------------------------------------------------------------ */ /* completely portable (low-performance) microsecond granularity wall-clock time */ extern uint64_t gasneti_gettimeofday_us(void); /* completely portable (low-performance) potentially-nanosecond granularity wall-clock time */ extern uint64_t gasneti_wallclock_ns(void); /* portable implementations */ #if defined(GASNETI_FORCE_GETTIMEOFDAY) || defined(GASNETI_USING_GETTIMEOFDAY) #undef GASNETI_USING_GETTIMEOFDAY #define GASNETI_USING_GETTIMEOFDAY 1 /* portable microsecond granularity wall-clock timer */ typedef uint64_t _gasneti_tick_t; extern uint64_t gasneti_ticks_gtod_us(void); #undef gasneti_tick_t #define gasneti_tick_t _gasneti_tick_t #undef gasneti_ticks_to_us #define gasneti_ticks_to_us(st) ((gasneti_tick_t)(st)) #undef gasneti_ticks_to_ns #define gasneti_ticks_to_ns(st) (((gasneti_tick_t)(st))*1000) #undef gasneti_ticks_now #define gasneti_ticks_now() ((gasneti_tick_t)gasneti_ticks_gtod_us()) #elif defined(GASNETI_FORCE_POSIX_REALTIME) || defined(GASNETI_USING_POSIX_REALTIME) #undef GASNETI_USING_POSIX_REALTIME #define GASNETI_USING_POSIX_REALTIME 1 typedef uint64_t _gasneti_tick_t; extern uint64_t gasneti_ticks_posix_ns(void); #undef gasneti_tick_t #define gasneti_tick_t _gasneti_tick_t #undef gasneti_ticks_now #define gasneti_ticks_now() gasneti_ticks_posix_ns() #undef gasneti_ticks_to_us #define gasneti_ticks_to_us(st) (((gasneti_tick_t)(st))/1000) #undef gasneti_ticks_to_ns #define gasneti_ticks_to_ns(st) ((gasneti_tick_t)(st)) #endif #ifdef gasneti_ticks_now // bug 3458: may be using posixrt or gettimeofday #undef GASNETI_TICKS_NOW_BODY #elif defined(GASNETI_TICKS_NOW_BODY) #define GASNETI_USING_SLOW_TIMERS 1 extern void gasneti_slow_ticks_now(void); #define gasneti_ticks_now() ((*(gasneti_tick_t (*)(void))(&gasneti_slow_ticks_now))()) #elif defined(GASNETI_USING_SLOW_TIMERS) // Compiler w/o necessary asm support (could be CXX, MPI_CC or unknown) extern gasneti_tick_t gasneti_slow_ticks_now(void); #define gasneti_ticks_now() gasneti_slow_ticks_now() #endif #ifndef gasneti_ticks_to_us #define gasneti_ticks_to_us(st) (gasneti_ticks_to_ns(st)/1000) #endif #ifndef GASNETI_TICK_MIN #define GASNETI_TICK_MIN ((gasneti_tick_t)0) #endif #ifndef GASNETI_TICK_MAX #define GASNETI_TICK_MAX ((gasneti_tick_t)-1) #endif #if GASNETI_USING_GETTIMEOFDAY #if defined(GASNETI_FORCE_GETTIMEOFDAY) #define GASNETI_TIMER_CONFIG timers_forced_os #else #define GASNETI_TIMER_CONFIG timers_os #endif #elif GASNETI_USING_POSIX_REALTIME #if defined(GASNETI_FORCE_POSIX_REALTIME) #define GASNETI_TIMER_CONFIG timers_forced_posixrt #else #define GASNETI_TIMER_CONFIG timers_posixrt #endif #else #define GASNETI_TIMER_CONFIG timers_native #endif /* return a double value representing the approximate microsecond overhead and granularity of the current timers. Overhead is the average wall-clock time consumed while reading the timer value once, and granularity is the minimum observable non-zero interval between two timer readings (which may be limited only by overhead, or may be significantly higher on systems where the underlying timer advances in discrete "jumps" of time much larger than the overhead) When measuring an event of length (L) using two surrounding timer calls, the measured time interval will be: L + overhead +- granularity */ extern double gasneti_tick_metric(int _idx); #define gasneti_tick_granularity() gasneti_tick_metric(0) #define gasneti_tick_overhead() gasneti_tick_metric(1) /* ------------------------------------------------------------------------------------ */ /* Initialization of timer subsystem. * Should perform any/all expensive operations.*/ #ifndef GASNETI_TICKS_INIT #define GASNETI_TICKS_INIT() do { \ (void)gasneti_ticks_now(); \ (void)gasneti_ticks_to_ns(1); \ (void)gasneti_tick_granularity(); \ } while (0) #endif /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/extended-ref/0000775000175000017500000000000015142313673015774 5ustar alastairalastairgasnet-2025.8.0/extended-ref/gasnet_extended_common.c0000664000175000017500000004627615142313673022670 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/gasnet_extended_common.c $ * Description: GASNet Extended API Common code * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ GASNETI_IDENT(gasnete_IdentString_Version, "$GASNetExtendedLibraryVersion: " GASNET_EXTENDED_VERSION_STR " $"); GASNETI_IDENT(gasnete_IdentString_ExtendedName, "$GASNetExtendedLibraryName: " GASNET_EXTENDED_NAME_STR " $"); /* ------------------------------------------------------------------------------------ */ /* Thread Management ================= */ #ifndef GASNETE_THREADING_CUSTOM /* top-level disable for all threading-related code */ #if GASNETI_MAX_THREADS <= 256 gasneti_threaddata_t *gasnete_threadtable[GASNETI_MAX_THREADS] = { 0 }; #else #define GASNETI_DYNAMIC_THREADTABLE 1 gasneti_threaddata_t **gasnete_threadtable = NULL; #endif static int gasnete_numthreads = 0; /* current thread count */ int gasnete_maxthreadidx = 0; /* high-water mark of thread indexes issued */ static gasneti_mutex_t threadtable_lock = GASNETI_MUTEX_INITIALIZER; #if GASNETI_MAX_THREADS > 1 /* pthread thread-specific ptr to our threaddata (or NULL for a thread never-seen before) */ GASNETI_THREADKEY_DEFINE(gasnete_threaddata); #endif #ifndef GASNETI_DEFAULT_MAX_THREADS #define GASNETI_DEFAULT_MAX_THREADS 1024 #endif extern uint64_t gasneti_max_threads(void) { static uint64_t val = 0; if (!val) { gasneti_mutex_lock(&threadtable_lock); if (!val) { val = MIN(GASNETI_MAX_THREADS, GASNETI_DEFAULT_MAX_THREADS); val = gasneti_getenv_int_withdefault("GASNET_MAX_THREADS", val, 0); if (val > GASNETI_MAX_THREADS) { gasneti_console0_message("WARNING", "GASNET_MAX_THREADS value exceeds permissable limit (%i), " "lowering it to match. %s", GASNETI_MAX_THREADS, GASNETI_MAX_THREADS_REASON); } val = MIN(GASNETI_MAX_THREADS, val); } gasneti_mutex_unlock(&threadtable_lock); } gasneti_sync_reads(); gasneti_assert_uint(val ,<=, GASNETI_MAX_THREADS); return val; } extern void gasneti_fatal_threadoverflow(const char *subsystem) { uint64_t maxthreads = gasneti_max_threads(); const char *reason; if (maxthreads < GASNETI_MAX_THREADS) reason = "To raise this limit, set environment variable GASNET_MAX_THREADS."; else reason = GASNETI_MAX_THREADS_REASON; gasneti_fatalerror("GASNet %s: Too many simultaneous local client threads (limit=%"PRIu64"). %s", subsystem, maxthreads, reason); } /* ------------------------------------------------------------------------------------ */ /* initing a thread's data upon thread discovery */ #ifndef GASNETE_INIT_THREADDATA #define GASNETE_INIT_THREADDATA(thread) gasnete_init_threaddata(thread) static void gasnete_init_threaddata(gasneti_threaddata_t *threaddata) { // TODO-EX: need an override? gasneti_mutex_init(&(threaddata->foreign_lock)); threaddata->foreign_eops = NULL; threaddata->foreign_iops = NULL; #ifndef GASNETE_NEW_THREADDATA_EOP_INIT #define GASNETE_NEW_THREADDATA_EOP_INIT(threaddata) \ (threaddata)->eop_free = NULL #endif GASNETE_NEW_THREADDATA_EOP_INIT(threaddata); #ifndef GASNETE_NEW_THREADDATA_IOP_INIT #define GASNETE_NEW_THREADDATA_IOP_INIT(threaddata) \ (threaddata)->current_iop = gasnete_iop_new(threaddata) #endif GASNETE_NEW_THREADDATA_IOP_INIT(threaddata); /* give the conduit a chance to setup thread context via callbacks note gasneti_threaddata_t is zero-init, so only non-zero field inits are required */ #ifdef GASNETC_NEW_THREADDATA_CALLBACK GASNETC_NEW_THREADDATA_CALLBACK(threaddata); #endif #ifdef GASNETE_NEW_THREADDATA_CALLBACK GASNETE_NEW_THREADDATA_CALLBACK(threaddata); #endif } #endif /* ------------------------------------------------------------------------------------ */ /* freeing a thread's data upon thread exit */ #ifndef GASNETE_FREE_THREADDATA #define GASNETE_FREE_THREADDATA(thread) gasnete_free_threaddata(thread) // Return zero on success static int gasnete_free_threaddata(gasneti_threaddata_t *thread) { int leak = 0; #ifndef GASNETE_IOP_ISDONE #define GASNETE_IOP_ISDONE(iop) gasnete_iop_isdone(iop) #endif #ifndef GASNETE_FREE_IOPS // TODO-EX: checks related to foreign iops? #define GASNETE_FREE_IOPS(thread) { \ int missing = thread->iop_num; \ \ /* active iop */ \ gasnete_iop_t *iop = thread->current_iop; \ gasneti_assert(iop->next == NULL); /* not inside an NBI access region */ \ if (GASNETE_IOP_ISDONE(iop)){ /* no outstanding NBI ops */ \ gasneti_free(iop); \ missing--; \ } \ \ /* fire-and-forget iop */ \ gasneti_aop_t *aop = thread->nbi_ff_aop; \ if (aop) { \ /* One must first balance counters, otherwise can never become "done". */ \ /* However, this must be done only once or new imbalance results. */ \ gasneti_assert(! thread->is_undead); \ iop = (gasnete_iop_t *) gasneti_aop_to_event(aop); \ if (GASNETE_IOP_ISDONE(iop)) { \ thread->nbi_ff_aop = NULL; \ gasneti_free(iop); \ missing--; \ } \ } \ \ /* iop free lists */ \ for (int i = 0; i < 2; ++i) { \ if (i) { \ gasneti_mutex_lock(&thread->foreign_lock); \ iop = thread->foreign_iops; \ thread->foreign_iops = NULL; \ gasneti_mutex_unlock(&thread->foreign_lock); \ } else { \ iop = thread->iop_free; \ } \ while (iop) { \ gasnete_iop_t *next = iop->next; \ gasneti_assert(GASNETE_IOP_ISDONE(iop)); /* active in free list == bad */ \ gasneti_free(iop); \ missing--; \ iop = next; \ } \ } \ if (missing) { \ /* TODO: handle this better? */ \ GASNETI_TRACE_PRINTF(I, ("%d iops leaked", missing)); \ leak = 1; \ } \ } #endif GASNETE_FREE_IOPS(thread); #ifndef GASNETE_FREE_EOPS // TODO-EX: checks related to foreign eops? #define GASNETE_FREE_EOPS(thread) { \ size_t num_bufs = thread->eop_num_bufs; \ size_t total_eops = num_bufs * GASNETE_EOP_CHUNKCNT; \ size_t missing = total_eops; \ gasnete_eop_t *eop; \ eop = thread->eop_free; \ while (eop) { --missing; eop = eop->next; } \ gasneti_mutex_lock(&thread->foreign_lock); \ eop = thread->foreign_eops; \ while (eop) { --missing; eop = eop->next; } \ gasneti_mutex_unlock(&thread->foreign_lock); \ if (missing) { \ /* TODO: handle this better? */ \ GASNETI_TRACE_PRINTF(I, ("%"PRIuPTR" eops missing at thread destruction, leaking %"PRIuPTR" eops", \ (uintptr_t)missing, (uintptr_t)total_eops)); \ leak = 1; \ } else { \ void **eopbuf = (void **)thread->eop_bufs; \ while (eopbuf) { \ /* TODO: check for in-flight eops */ \ gasneti_assert(num_bufs-- > 0); \ void **next = *eopbuf; \ gasneti_free(eopbuf); \ eopbuf = next; \ } \ gasneti_assert_uint(num_bufs ,==, 0); \ } \ } #endif GASNETE_FREE_EOPS(thread); /* conduits needing additional cleanups should use gasnete_register_threadcleanup */ /* Must leak the threaddata if any iops or eops are unaccounted for */ thread->is_undead = leak; if (leak) return 1; /* threaddata itself */ gasneti_free(thread); return 0; } #endif /* ------------------------------------------------------------------------------------ */ /* thread table and cleanup callback management */ #ifndef GASNETE_THREAD_CLEANUP_DELAY #define GASNETE_THREAD_CLEANUP_DELAY 1 /* number of times to postpone pthread_setspecific callback */ #endif #if GASNETI_MAX_THREADS > 1 /* pthread_key_t are used explicitly to get callback on thread termination */ static pthread_key_t gasnete_threaddata_cleanup; static pthread_key_t gasnete_threadless_cleanup; static void gasnete_threadless_cleanup_fn(void *); static void gasnete_threaddata_cleanup_fn(void *); static void gasnete_threadkey_init(void) { static int keycreated = 0; gasneti_mutex_lock(&threadtable_lock); if (!keycreated) { pthread_key_create(&gasnete_threaddata_cleanup, &gasnete_threaddata_cleanup_fn); pthread_key_create(&gasnete_threadless_cleanup, &gasnete_threadless_cleanup_fn); keycreated = 1; } gasneti_mutex_unlock(&threadtable_lock); } #else gasnete_thread_cleanup_t *gasnete_threadless_cleanup; #endif extern void gasnete_register_threadcleanup(void (*cleanupfn)(void *), void *context) { gasneti_threaddata_t *thread = NULL; gasnete_thread_cleanup_t *newcleanup = gasneti_malloc(sizeof(gasnete_thread_cleanup_t)); gasneti_leak(newcleanup); newcleanup->_cleanupfn = cleanupfn; newcleanup->_context = context; #if GASNETI_MAX_THREADS > 1 thread = gasneti_threadkey_get(gasnete_threaddata); #endif if (thread) { /* usual case - extended API thread init before register */ newcleanup->_next = thread->thread_cleanup; thread->thread_cleanup = newcleanup; } else { /* save away the cleanups for now */ #if GASNETI_MAX_THREADS > 1 gasnete_threadkey_init(); newcleanup->_next = pthread_getspecific(gasnete_threadless_cleanup); pthread_setspecific(gasnete_threadless_cleanup, newcleanup); #else newcleanup->_next = gasnete_threadless_cleanup; gasnete_threadless_cleanup = newcleanup; #endif } } static void gasnete_threadless_cleanup_fn(void *_lifo) { #if GASNETI_MAX_THREADS > 1 if (pthread_getspecific(gasnete_threaddata_cleanup)) { /* thread exists - delay for thread cleanup */ pthread_setspecific(gasnete_threadless_cleanup, _lifo); return; } #endif { /* extended API thread never created - run destructors here */ gasnete_thread_cleanup_t *cleanuplist = (gasnete_thread_cleanup_t *)_lifo; gasnete_thread_cleanup_t *nextcleanup; while ((nextcleanup = cleanuplist) != NULL) { cleanuplist = nextcleanup->_next; nextcleanup->_cleanupfn(nextcleanup->_context); gasneti_free(nextcleanup); } } } static void gasnete_threaddata_cleanup_fn(void *_thread) { gasneti_threaddata_t *thread = _thread; int idx = thread->threadidx; #if GASNETI_MAX_THREADS > 1 /* ensure gasnete_threaddata remains valid for this thread while we run destructors */ if (!gasneti_threadkey_get(gasnete_threaddata)) gasneti_threadkey_set(gasnete_threaddata, thread); /* postpone destructor for specified iterations, to support GASNet client destructors */ if (thread->thread_cleanup_delay < GASNETE_THREAD_CLEANUP_DELAY) { thread->thread_cleanup_delay++; pthread_setspecific(gasnete_threaddata_cleanup, thread); return; } #endif GASNETI_TRACE_PRINTF(C,("thread %i exiting\n", idx)); { gasnete_thread_cleanup_t *cleanuplist; gasnete_thread_cleanup_t *nextcleanup; /* run cleanups in LIFO order, with multiple passes to catch registrations within cleanupfns */ while (1) { if ((cleanuplist = thread->thread_cleanup) != NULL) thread->thread_cleanup = NULL; #if GASNETI_MAX_THREADS > 1 else if ((cleanuplist = pthread_getspecific(gasnete_threadless_cleanup)) != NULL) pthread_setspecific(gasnete_threadless_cleanup, NULL); #else else if ((cleanuplist = gasnete_threadless_cleanup) != NULL) gasnete_threadless_cleanup = NULL; #endif else break; while ((nextcleanup = cleanuplist) != NULL) { cleanuplist = nextcleanup->_next; nextcleanup->_cleanupfn(nextcleanup->_context); gasneti_free(nextcleanup); } } } gasneti_mutex_lock(&threadtable_lock); if (! GASNETE_FREE_THREADDATA(thread)) { gasnete_threadtable[idx] = NULL; gasnete_numthreads--; } gasneti_mutex_unlock(&threadtable_lock); } GASNETI_NEVER_INLINE(gasnete_new_threaddata, extern void * gasnete_new_threaddata(void)) { gasneti_threaddata_t *threaddata = (gasneti_threaddata_t *)gasneti_calloc(1,sizeof(gasneti_threaddata_t)); int idx; uint64_t maxthreads = gasneti_max_threads(); gasneti_assert_uint(maxthreads ,<=, (((uint64_t)1)<<(sizeof(gasnete_threadidx_t)*8))); gasneti_leak(threaddata); gasneti_mutex_lock(&threadtable_lock); #if GASNETI_DYNAMIC_THREADTABLE if (!gasnete_threadtable) { gasneti_assert(gasnete_numthreads == 0); gasnete_threadtable = (gasneti_threaddata_t **)gasneti_calloc(maxthreads, sizeof(gasneti_threaddata_t*)); } #endif gasnete_numthreads++; if (gasnete_numthreads > maxthreads) gasneti_fatal_threadoverflow("Extended API"); /* find a free slot */ if (gasnete_threadtable[gasnete_numthreads-1] == NULL) idx = gasnete_numthreads-1; else { /* keep table somewhat compacted */ for (idx = 0; idx < maxthreads; idx++) { gasneti_assume(idx < GASNETI_MAX_THREADS); // silence a buggy array-bounds warning from gcc-5 if (gasnete_threadtable[idx] == NULL) break; } } gasneti_assert(idx < GASNETI_MAX_THREADS && idx < maxthreads && gasnete_threadtable[idx] == NULL); if (idx > gasnete_maxthreadidx) gasnete_maxthreadidx = idx; gasnete_threadtable[idx] = threaddata; threaddata->threadidx = idx; gasneti_mutex_unlock(&threadtable_lock); #if GASNETI_MAX_THREADS > 1 /* setup TLS identification */ gasneti_assert(gasneti_threadkey_get(gasnete_threaddata) == NULL); gasneti_threadkey_set(gasnete_threaddata, threaddata); /* register pthread destructor */ gasnete_threadkey_init(); pthread_setspecific(gasnete_threaddata_cleanup, threaddata); #endif GASNETE_INIT_THREADDATA(threaddata); GASNETI_TRACE_PRINTF(C,("gasnete_new_threaddata: idx=%i, numthreads=%i", threaddata->threadidx, gasnete_numthreads)); return threaddata; } /* PURE function (returns same value for a given thread every time) */ #if (GASNETI_MAX_THREADS > 1) && !defined(_GASNETI_MYTHREAD_SLOW) // THIS FUNCTION SHOULD NEVER BE CALLED DIRECTLY // Most code should use GASNETI_MYTHREAD, or as a last resort _gasneti_mythread_slow() extern gasneti_threaddata_t *_gasnete_mythread_slow_slow(void) { gasneti_threaddata_t *threaddata = gasneti_threadkey_get(gasnete_threaddata); #ifdef GASNETI_RECORD_DYNAMIC_THREADLOOKUP GASNETI_RECORD_DYNAMIC_THREADLOOKUP(); #endif if_pf (!threaddata) { /* first time we've seen this thread - need to set it up */ threaddata = gasnete_new_threaddata(); } gasneti_memcheck(threaddata); return threaddata; } #endif void gasneti_finalize_all_nbi_ff(gex_Event_t **events_p, size_t *count_p GASNETI_THREAD_FARG) { const gasnete_threadidx_t mytid = GASNETI_MYTHREAD->threadidx; gasneti_assert(events_p); gasneti_assert(count_p); gasneti_mutex_lock(&threadtable_lock); gex_Event_t *events = gasneti_malloc(gasnete_numthreads * sizeof(gex_Event_t *)); int count = 0; for (int th_idx = 0; th_idx <= gasnete_maxthreadidx; ++th_idx) { gasneti_threaddata_t *thread = gasnete_threadtable[th_idx]; if (!thread) continue; // Attempt to atomically "steal" the nbi_ff aop from the threaddata. // This includes an acquire fence to reduce the likelihood of subsequently // reading out-of-date info. However, there is no certainty that concurrent // activity in a live thread will behave well. #if GASNETT_HAVE_ATOMIC_CAS uintptr_t aop_field = (uintptr_t) &(thread->nbi_ff_aop); #if PLATFORM_ARCH_64 uintptr_t aop_addr = gasneti_atomic64_swap((gasneti_atomic64_t *)aop_field, 0, GASNETI_ATOMIC_ACQ); #elif PLATFORM_ARCH_32 uintptr_t aop_addr = gasneti_atomic32_swap((gasneti_atomic32_t *)aop_field, 0, GASNETI_ATOMIC_ACQ); #else #error #endif gasneti_aop_t *aop = (gasneti_aop_t *)aop_addr; #else gasneti_aop_t *aop = thread->nbi_ff_aop; thread->nbi_ff_aop = NULL; gasneti_sync_reads(); #endif if (aop) { // Balance counters at most once. Thread exit may have done so already. gex_Event_t ev = thread->is_undead ? (gex_Event_t) aop : gasneti_aop_to_event(aop); events[count++] = ev; // Reowner to calling thread to prevents sync from "behaving badly", // such as by adding to the foreign_iops list in the orignal owner // which may have exited. gasnete_iop_t *iop = (gasnete_iop_t *) ev; if (iop->threadidx != mytid) { iop->threadidx = mytid; GASNETI_MYTHREAD->iop_num ++; } } } gasneti_mutex_unlock(&threadtable_lock); *events_p = events; *count_p = count; } #endif /* GASNETE_THREADING_CUSTOM */ /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/extended-ref/gasnet_extended_help.h0000664000175000017500000005622215142313673022325 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/gasnet_extended_help.h $ * Description: GASNet Extended API Header Helpers (Internal code, not for client use) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_EXTENDED_HELP_H #define _GASNET_EXTENDED_HELP_H #include /* ------------------------------------------------------------------------------------ */ // TODO-EX: Eliminate GASNETE_FAST_ALIGNED_MEMCPY (which no longer has any internal // callers) and redirect the tools interface elsewhere. This should include removal // of GASNETI_BUG1389_WORKAROUND and many corresponding bits (configure option, config // string, interaction w/ GASNETI_MAY_ALIAS, etc.) /* bug 1389: need to prevent bad optimizations on GASNETE_FAST_ALIGNED_MEMCPY due to ansi-aliasing rules added in C99 that foolishly outlaw type-punning. Exploit a union of all possible base types of the given size as a loophole in the rules. Other options include forcing gasneti_compiler_fence before&after the type-punning, globally disabling ansi aliasing using compiler flags, or redundantly copying the first byte of the value as a (char *) (last is not guaranteed to work) See also instances of GASNETI_BUG1389_WORKAROUND, which enable a very conservative approach using memcpy() and compiler fences. This is to allow us to determine if a given failure may be related to a recurrance of bug 1389. */ typedef union { uint8_t _gasnete_anytype_u8; /* might be a compiler builtin type */ #if (SIZEOF__BOOL == 1) && defined(GASNETI_COMPILER_IS_CC) _Bool _gasnete_anytype_b; #endif #if SIZEOF_CHAR == 1 char _gasnete_anytype_c; #endif #if SIZEOF_SHORT == 1 short _gasnete_anytype_s; #endif } GASNETI_MAY_ALIAS gasnete_anytype8_t; #ifndef INTTYPES_16BIT_MISSING typedef union { uint16_t _gasnete_anytype_u16; /* might be a compiler builtin type */ gasnete_anytype8_t _gasnete_anytype_at8; /* necessary for structs of two 8-bit types */ #if (SIZEOF__BOOL == 2) && defined(GASNETI_COMPILER_IS_CC) _Bool _gasnete_anytype_b; #endif #if SIZEOF_SHORT == 2 short _gasnete_anytype_s; #endif #if SIZEOF_INT == 2 int _gasnete_anytype_i; #endif } GASNETI_MAY_ALIAS gasnete_anytype16_t; #endif typedef union { uint32_t _gasnete_anytype_u32; /* might be a compiler builtin type */ #ifndef INTTYPES_16BIT_MISSING gasnete_anytype16_t _gasnete_anytype_at16; /* necessary for structs of two 16-bit types */ #endif #if (SIZEOF__BOOL == 4) && defined(GASNETI_COMPILER_IS_CC) _Bool _gasnete_anytype_b; #endif #if SIZEOF_SHORT == 4 short _gasnete_anytype_s; #endif #if SIZEOF_INT == 4 int _gasnete_anytype_i; #endif #if SIZEOF_LONG == 4 long _gasnete_anytype_l; #endif #if SIZEOF_FLOAT == 4 float _gasnete_anytype_f; #endif #if SIZEOF_VOID_P == 4 void *_gasnete_anytype_p; intptr_t _gasnete_anytype_ip; /* might be a compiler builtin type */ #endif } GASNETI_MAY_ALIAS gasnete_anytype32_t; typedef union { uint64_t _gasnete_anytype_u64; /* might be a compiler builtin type */ gasnete_anytype32_t _gasnete_anytype_at32; /* necessary for structs of two 32-bit types */ #if (SIZEOF__BOOL == 8) && defined(GASNETI_COMPILER_IS_CC) _Bool _gasnete_anytype_b; #endif #if SIZEOF_INT == 8 int _gasnete_anytype_i; #endif #if SIZEOF_LONG == 8 long _gasnete_anytype_l; #endif #if SIZEOF_LONG_LONG == 8 long long _gasnete_anytype_ll; #endif #if SIZEOF_DOUBLE == 8 double _gasnete_anytype_d; #endif #if SIZEOF_LONG_DOUBLE == 8 long double _gasnete_anytype_ld; #endif #if (SIZEOF_FLOAT__COMPLEX == 8) && defined(GASNETI_COMPILER_IS_CC) float _Complex _gasnete_anytype_fc; #endif #if SIZEOF_VOID_P == 8 void *_gasnete_anytype_p; intptr_t _gasnete_anytype_ip; /* might be a compiler builtin type */ #endif } GASNETI_MAY_ALIAS gasnete_anytype64_t; #if INTTYPES_16BIT_MISSING /* deal with Cray's annoying lack of 16-bit types on some platforms */ #define GASNETE_OMIT_WHEN_MISSING_16BIT(code) #else #define GASNETE_OMIT_WHEN_MISSING_16BIT(code) code #endif #if PLATFORM_ARCH_CRAYT3E /* T3E ridiculously sets the sizes of all unions above to 8 bytes */ #define gasnete_anytype8_t uint8_t #define gasnete_anytype32_t uint32_t #define gasnete_anytype64_t uint64_t #define GASNETE_ANYTYPE_LVAL(ptr,bits) (*((gasnete_anytype##bits##_t *)(ptr))) #else #define GASNETE_ANYTYPE_LVAL(ptr,bits) (((gasnete_anytype##bits##_t *)(ptr))->_gasnete_anytype_u##bits) #endif /* undefined results if the regions are overlapping */ #ifdef GASNETI_BUG1389_WORKAROUND #define GASNETE_FAST_ALIGNED_MEMCPY(dest, src, nbytes) do { \ gasneti_compiler_fence(); \ memcpy(dest, src, nbytes); \ gasneti_compiler_fence(); \ } while(0) #else #define GASNETE_FAST_ALIGNED_MEMCPY(dest, src, nbytes) do { \ const void * const _fam_src = (src); \ void * const _fam_dst = (dest); \ size_t const _fam_nbytes = (nbytes); \ switch(_fam_nbytes) { \ case 0: \ break; \ case 1: *((gasnete_anytype8_t *)_fam_dst) = \ *((gasnete_anytype8_t *)_fam_src); \ break; \ GASNETE_OMIT_WHEN_MISSING_16BIT( \ case 2: *((gasnete_anytype16_t *)_fam_dst) = \ *((gasnete_anytype16_t *)_fam_src); \ break; \ ) \ case 4: *((gasnete_anytype32_t *)_fam_dst) = \ *((gasnete_anytype32_t *)_fam_src); \ break; \ case 8: *((gasnete_anytype64_t *)_fam_dst) = \ *((gasnete_anytype64_t *)_fam_src); \ break; \ default: \ memcpy(_fam_dst, _fam_src, _fam_nbytes); \ } \ } while(0) #endif /* GASNETI_BUG1389_WORKAROUND */ // TODO-EX: remove these if/when all uses are updated #define GASNETE_FAST_UNALIGNED_MEMCPY(d,s,n) GASNETI_MEMCPY(d,s,n) /* given the address of a gex_RMA_Value_t object and the number of significant bytes, return the byte address where significant bytes begin */ #ifdef WORDS_BIGENDIAN #define GASNETE_STARTOFBITS(regvalptr,nbytes) \ (((uint8_t*)(regvalptr)) + ((sizeof(gex_RMA_Value_t)-nbytes))) #else /* little-endian */ #define GASNETE_STARTOFBITS(regvalptr,nbytes) (regvalptr) #endif /* The value written to the target address is a direct byte copy of the 8*nbytes low-order bits of value, written with the endianness appropriate for an nbytes integral value on the current architecture */ #ifdef GASNETI_BUG1389_WORKAROUND #define GASNETE_VALUE_ASSIGN(dest, value, nbytes) do { \ gasneti_compiler_fence(); \ memcpy((dest), GASNETE_STARTOFBITS(&(value),nbytes), nbytes); \ gasneti_compiler_fence(); \ } while(0) #else #define GASNETE_VALUE_ASSIGN(dest, value, nbytes) do { \ switch (nbytes) { \ case 0: \ break; \ case 1: GASNETE_ANYTYPE_LVAL(dest,8) = (uint8_t)(value); \ break; \ GASNETE_OMIT_WHEN_MISSING_16BIT( \ case 2: GASNETE_ANYTYPE_LVAL(dest,16) = (uint16_t)(value); \ break; \ ) \ case 4: GASNETE_ANYTYPE_LVAL(dest,32) = (uint32_t)(value); \ break; \ case 8: GASNETE_ANYTYPE_LVAL(dest,64) = (uint64_t)(value); \ break; \ default: /* no such native nbytes integral type */ \ memcpy((dest), GASNETE_STARTOFBITS(&(value),nbytes), nbytes); \ } \ } while (0) #endif /* GASNETI_BUG1389_WORKAROUND */ /* interpret *src as a ptr to an nbytes type, and return the value as a gex_RMA_Value_t */ #ifdef GASNETI_BUG1389_WORKAROUND #define GASNETE_VALUE_RETURN(src, nbytes) do { \ gex_RMA_Value_t _result = 0; \ gasneti_compiler_fence(); \ memcpy(GASNETE_STARTOFBITS(&_result,nbytes), src, nbytes); \ return _result; \ } while(0) #else #define GASNETE_VALUE_RETURN(src, nbytes) do { \ size_t __gvr_nbytes = (nbytes); \ gasneti_assert(__gvr_nbytes > 0); \ gasneti_assert_uint(__gvr_nbytes ,<=, sizeof(gex_RMA_Value_t)); \ switch (__gvr_nbytes) { \ case 1: return (gex_RMA_Value_t)GASNETE_ANYTYPE_LVAL(src,8); \ GASNETE_OMIT_WHEN_MISSING_16BIT( \ case 2: return (gex_RMA_Value_t)GASNETE_ANYTYPE_LVAL(src,16); \ ) \ case 4: return (gex_RMA_Value_t)GASNETE_ANYTYPE_LVAL(src,32); \ case 8: return (gex_RMA_Value_t)GASNETE_ANYTYPE_LVAL(src,64); \ default: { /* no such native nbytes integral type */ \ gex_RMA_Value_t _result = 0; \ memcpy(GASNETE_STARTOFBITS(&_result,nbytes), src, __gvr_nbytes); \ return _result; \ } \ } \ } while (0) #endif /* GASNETI_BUG1389_WORKAROUND */ /* gasnete_loopback{get,put}_memsync() go after a get or put is done with both source * and destination on the local node. This is only done if GASNet was configured * for the stricter memory consistency model. * The put_memsync belongs after the memory copy to ensure that writes are committed in * program order. * The get_memsync belongs after the memory copy to ensure that if the value(s) read * is used to predicate any subsequent reads, that the reads are done in program order. * Note that because gasnet_gets may read multiple words, it's possible that the * values fetched in a multi-word get may reflect concurrent strict writes by other CPU's * in a way that appears to violate program order, eg: * CPU0: gex_RMA_PutBlockingVal(myteam,mynode,&A[0],someval,1,0); * gex_RMA_PutBlockingVal(myteam,mynode,&A[1],someval,1,0); * CPU1: gex_RMA_GetBlocking(myteam,dest,mynode,&A[0],someval,2,0) ; // may see updated A[1] but not A[0] * but there doesn't seem to be much we can do about that (adding another rmb before the * get does not solve the problem, because the two puts may globally complete in the middle * of the get's execution, after copying A[0] but before copying A[1]). It's a fundamental * result of the fact that multi-word gasnet put/gets are not performed atomically * (and for performance reasons, cannot be). */ #ifdef GASNETI_MEMSYNC_ON_LOOPBACK #define gasnete_loopbackput_memsync() gasneti_local_wmb() #define gasnete_loopbackget_memsync() gasneti_local_rmb() #else #define gasnete_loopbackput_memsync() #define gasnete_loopbackget_memsync() #endif /* helper macros */ #define GASNETI_CHECKZEROSZ_GET(variety,tm,dest,rank,src,nbytes) do { \ if_pf (nbytes == 0) { \ GASNETI_TRACE_GET_LOCAL(variety,tm,dest,rank,src,nbytes); \ /*GASNETI_CHECK_INJECT();*/ \ return 0; \ } } while(0) #define GASNETI_CHECKZEROSZ_PUT(variety,tm,rank,dest,src,nbytes) do { \ if_pf (nbytes == 0) { \ GASNETI_TRACE_PUT_LOCAL(variety,tm,rank,dest,src,nbytes); \ /*GASNETI_CHECK_INJECT();*/ \ return 0; \ } } while(0) #define GASNETI_CHECKZEROSZ_NAMED(tracecall,nbytes) do { \ if_pf (nbytes == 0) { \ tracecall; \ /*GASNETI_CHECK_INJECT();*/ \ return 0; \ } } while(0) #define GASNETI_CHECK_LEGACY_PUT(tm,flags) _GASNETI_CHECK_LEGACY("put",tm,flags) #define GASNETI_CHECK_LEGACY_GET(tm,flags) _GASNETI_CHECK_LEGACY("get",tm,flags) #if GASNET_DEBUG #define GASNETI_CHECK_PUT_LCOPT(lc_opt, isnbi) do { \ gex_Event_t *_gcpl_lc_opt = (lc_opt); \ /* GEX_EVENT_{NOW,DEFER} always permitted */ \ if_pf (_gcpl_lc_opt == NULL) \ gasneti_fatalerror("gex_RMA_Put*(lc_opt=NULL) is invalid"); \ else if_pf (isnbi && gasneti_leaf_is_pointer(_gcpl_lc_opt)) \ gasneti_fatalerror("gex_RMA_PutNBI(lc_opt=) is invalid (NB only)"); \ else if_pf (!isnbi && _gcpl_lc_opt == GEX_EVENT_GROUP) \ gasneti_fatalerror("gex_RMA_PutNB(lc_opt=GEX_EVENT_GROUP) is invalid (NBI only)"); \ } while (0) #else #define GASNETI_CHECK_PUT_LCOPT(lc_opt, isnbi) do { } while (0) #endif // GASNETI_NBRHD_* convenience macros // // All macros described here have the same semantics both with and without PSHM. // Those taking (e_tm,rank) correctly handle TM-pair and multi-EP. // Those taking only a jobrank are *not* multi-EP aware and therefore cannot be used // alone to determine if a address is cross-mapped. // // NOTE: all macros may evalute their arguments zero, one or more times. // // Queries on process membership in caller's NBRHD // // + GASNETI_NBRHD_LOCAL(e_tm,rank) // + GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank) // These return non-zero iff the indicated rank is in caller's neighborhood. // Note that while these can (at least currently) be used to reliably determine // if a primordial or aux segment is cross-mapped, they are not useful for // non-primordial segments. // // Queries on cross-mapped client segments // // + For all three of the following GASNETI_NBRHD_MAPPED* macros, it is required // that the EP exists and has a bound segment. If either of these requirements // is not satisfied, then the behavior of the call is undefined. // // + GASNETI_NBRHD_MAPPED(e_tm,rank) // This Boolean query determines if the target EP's bound segment is // cross-mapped into the calling process. This notably does NOT query // anything about the local EP such as whether it has a bound host-memory // segment. // // + GASNETI_NBRHD_MAPPED_ADDR(e_tm,rank,addr) // Returns the address in the caller's address space for the given // (non-NULL) address in the target EP's bound segment, if that segment is // cross-mapped and the address lies within that segment. If the address is // NULL or otherwise outside the target segment, the behavior is undefined. // If the target segment is not cross-mapped the behavior is undefined. // // + GASNETI_NBRHD_MAPPED_ADDR_OR_NULL(e_tm,rank,addr) // This query is identical to GASNETI_NBRHD_MAPPED_ADDR except that if the // target segment is not cross-mapped the return value is NULL (as opposed // to undefined behavior). The implementation may be more efficient than // naive composition of the two functions above. // // Queries on cross-mapped aux segments // // + GASNETI_NBRHD_AUXSEG(jobrank) // + GASNETI_NBRHD_AUXSEG_ADDR(jobrank,addr) // + GASNETI_NBRHD_AUXSEG_ADDR_OR_NULL(jobrank,addr) // These are analogous to GASNETI_NBRHD_MAPPED*(), above, but dealing with // the target process's aux segment rather than a bound segment. As with // the "MAPPED_ADDR*" calls, an address of NULL or outside the target // process's aux segment yields undefined behavior. Behavior when given a // jobrank outside the caller's nbrhd follows the behavior of the // corresponding "MAPPED" calls in the presence of bound segments which are // not cross-mapped: False, U.B. and NULL, respectively. // Note: GASNETI_NBRHD_AUXSEG is an alias for // GASNETI_NBRHD_JOBRANK_IS_LOCAL, provided to help clarify the caller's // intent. #if GASNET_PSHM #define _GASNETI_NBRHD_LOCAL(e_tm,rank) gasneti_pshm_in_supernode(e_tm,rank) #define _GASNETI_NBRHD_MAPPED_ADDR(e_tm,rank,addr) gasneti_pshm_addr2local(e_tm,rank,addr) #define _GASNETI_NBRHD_AUXSEG_ADDR(jobrank,addr) gasneti_pshm_aux2local(jobrank,addr) #define _GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank) gasneti_pshm_jobrank_in_supernode(jobrank) #define _GASNETI_NBRHD_JOBRANK_LOCAL_ADDR(jobrank,addr,isaux) gasneti_pshm_jobrank_addr2local(jobrank,addr,isaux) #else #if GASNET_CONDUIT_SMP #define _GASNETI_NBRHD_LOCAL(e_tm,rank) (1) #define _GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank) (1) #else #define _GASNETI_NBRHD_LOCAL(e_tm,rank) (gasneti_e_tm_rank_to_jobrank(e_tm,rank) == gasneti_mynode) #define _GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank) ((jobrank) == gasneti_mynode) #endif #define _GASNETI_NBRHD_MAPPED_ADDR(e_tm,rank,addr) \ (gasneti_assert(gasneti_in_local_clientsegment(gasneti_e_tm_to_i_ep(e_tm),(void*)(addr),1)), (addr)) #define _GASNETI_NBRHD_AUXSEG_ADDR(jobrank,addr) \ (gasneti_assert(gasneti_in_local_auxsegment(/*unused*/NULL,(void*)(addr),1)), (addr)) // TODO: bounds check addr passed to _GASNETI_NBRHD_JOBRANK_LOCAL_ADDR(), possibly in the caller #define _GASNETI_NBRHD_JOBRANK_LOCAL_ADDR(jobrank,addr,isaux) (addr) #endif GASNETI_INLINE(gasneti_nbrhd_mapped_addr_or_null) GASNETI_PURE void *gasneti_nbrhd_mapped_addr_or_null(gex_TM_t _e_tm, gex_Rank_t _rank, void *_addr) { gex_Rank_t _jobrank = gasneti_nbrhd_mapped_helper(_e_tm,_rank); if (_jobrank == GEX_RANK_INVALID) return NULL; // not cross-mapped return _GASNETI_NBRHD_JOBRANK_LOCAL_ADDR(_jobrank,_addr,0); } GASNETI_PUREP(gasneti_nbrhd_mapped_addr_or_null) // NBRHD membership queries #define GASNETI_NBRHD_LOCAL(e_tm,rank) \ (gasneti_check_e_tm_rank((e_tm),(rank)), \ _GASNETI_NBRHD_LOCAL((e_tm),(rank))) #define GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)\ (gasneti_assert((jobrank) < gasneti_nodes), \ _GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) // Client segment mapping queries #define GASNETI_NBRHD_MAPPED(e_tm,rank) \ (gasneti_nbrhd_mapped_helper((e_tm),(rank)) != GEX_RANK_INVALID) #define GASNETI_NBRHD_MAPPED_ADDR(e_tm,rank,addr) \ (gasneti_assert(addr), \ gasneti_assert(GASNETI_NBRHD_MAPPED((e_tm),(rank))), \ _GASNETI_NBRHD_MAPPED_ADDR((e_tm),(rank),addr)) #define GASNETI_NBRHD_MAPPED_ADDR_OR_NULL(e_tm,rank,addr) \ (gasneti_assert(addr), \ gasneti_nbrhd_mapped_addr_or_null((e_tm),(rank),addr)) // AUGSEG mapping queries #define GASNETI_NBRHD_AUXSEG(jobrank) \ GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank) #define GASNETI_NBRHD_AUXSEG_ADDR(jobrank,addr) \ (gasneti_assert(addr), \ gasneti_assert(GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)), \ _GASNETI_NBRHD_AUXSEG_ADDR(jobrank,addr)) #define GASNETI_NBRHD_AUXSEG_ADDR_OR_NULL(jobrank,addr) \ (gasneti_assert(addr), \ (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank) \ ? _GASNETI_NBRHD_AUXSEG_ADDR((jobrank),(addr)) \ : NULL)) // gasnete_mapped_at() is used by put/get fns to decide whether memory in // a given process is "mapped" locally (memory one can memcpy() to/from). // This includes host memory in the calling process, and segments of other // processes which have been cross-mapped via PSHM. // This excludes device memory in any process. // It returns the local address if addressible, and NULL otherwise. // This is based on the jobrank and memory kind. GASNETI_INLINE(gasnete_mapped_at) GASNETI_PURE void *gasnete_mapped_at(gex_TM_t _e_tm, gex_Rank_t _rank, const void *_addr) { gasneti_assume(_addr != NULL); gex_Rank_t _jobrank = gasneti_jobrank_if_mappable(_e_tm, _rank); if (_jobrank == GEX_RANK_INVALID) return NULL; // not mappable #if GASNET_PSHM gasneti_assert(! gasneti_in_auxsegment(_jobrank, _addr, 1)); void *_result = gasneti_pshm_jobrank_addr2local(_jobrank, _addr, 0); #else gasneti_assert_uint(_jobrank ,==, gasneti_mynode); void *_result = (/*no const*/ void*)_addr; // loopback #endif gasneti_assume(_result != NULL); // can improve codegen in caller return _result; } GASNETI_PUREP(gasnete_mapped_at) // The `GEX_FLAG_PEER_NEVER_{SELF,NBRHD}` flags provide a replacement for the // functionality once provided by `GASNETE_PUTGET_ALWAYSREMOTE`, but doing so // on a per-call basis rather then per translation unit. // // Currently the only check we can elide is nbrhd-scope. // However, when PSHM is disabled, GEX_FLAG_PEER_NEVER_SELF is // defined equal to GEX_FLAG_PEER_NEVER_NBRHD. // Helper (producer of _constantp_never_nbrhd) for gex_RMA_*() macros: #define GASNETE_CONSTANTP_NEVER_NBRHD(flags)\ gasneti_constant_p((flags) & GEX_FLAG_PEER_NEVER_NBRHD) // Helper (consumer of _constantp_never_nbrhd) for _gex_RMA_*() inline functions: #define GASNETE_NEVER_MAPPED(flags,constantp_never_nbrhd) \ (constantp_never_nbrhd && ((flags) & GEX_FLAG_PEER_NEVER_NBRHD)) #if GASNET_DEBUG #define GASNETI_CHECK_NEVER_FLAGS(e_tm,rank,flags) do { \ if ((flags & GEX_FLAG_PEER_NEVER_SELF) && \ (gasneti_e_tm_rank_to_jobrank(e_tm,rank) == gasneti_mynode)) { \ gasneti_fatalerror("GEX_FLAG_PEER_NEVER_SELF assertion is untrue"); \ } \ if ((flags & GEX_FLAG_PEER_NEVER_NBRHD) && \ GASNETI_NBRHD_LOCAL(e_tm,rank)) { \ gasneti_fatalerror("GEX_FLAG_PEER_NEVER_NBRHD assertion is untrue"); \ } \ } while (0) #else #define GASNETI_CHECK_NEVER_FLAGS(e_tm, rank, flags) ((void)0) #endif /* ------------------------------------------------------------------------------------ */ #ifdef GASNETE_HAVE_EXTENDED_HELP_EXTRA_H #include #endif #endif gasnet-2025.8.0/extended-ref/gasnet_extended.c0000664000175000017500000001177215142313673021311 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/gasnet_extended.c $ * Description: GASNet Extended API Reference Implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include // for refbarrier.c #include #include /* ------------------------------------------------------------------------------------ */ /* Extended API Common Code ======================== Factored bits of extended API code common to most conduits, overridable when necessary */ #include "gasnet_extended_common.c" /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* called at startup to check configuration sanity */ static void gasnete_check_config(void) { gasneti_check_config_postattach(); gasnete_check_config_amref(); gasneti_static_assert(sizeof(gasnete_eop_t) >= sizeof(void*)); } extern void gasnete_init(void) { static int firstcall = 1; GASNETI_TRACE_PRINTF(C,("gasnete_init()")); gasneti_assert(firstcall); /* make sure we haven't been called before */ firstcall = 0; gasnete_check_config(); /* check for sanity */ gasneti_assert_uint(gasneti_nodes ,>=, 1); gasneti_assert_uint(gasneti_mynode ,<, gasneti_nodes); { gasneti_threaddata_t *threaddata = NULL; #if GASNETI_MAX_THREADS > 1 /* register first thread (optimization) */ threaddata = _gasneti_mythread_slow(); #else /* register only thread (required) */ threaddata = gasnete_new_threaddata(); #endif #if !GASNETI_DISABLE_REFERENCE_EOP /* cause the first pool of eops to be allocated (optimization) */ GASNET_POST_THREADINFO(threaddata); gasnete_eop_t *eop = gasnete_eop_new(threaddata); GASNETE_EOP_MARKDONE(eop); gasnete_eop_free(eop GASNETI_THREAD_PASS); #endif } /* Initialize barrier resources */ gasnete_barrier_init(); /* Initialize team/collectives */ gasnete_coll_init_subsystem(); /* Initialize VIS subsystem */ gasnete_vis_init(); } /* ------------------------------------------------------------------------------------ */ /* Get/Put: ======== */ /* Use some or all of the reference implementation of get/put in terms of AMs * Configuration appears in gasnet_extended_fwd.h */ #include "gasnet_extended_amref.c" /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (explicit event) ========================================================== */ /* ------------------------------------------------------------------------------------ */ /* Conduits not using the gasnete_amref_ versions should implement at least the following: gasnete_get_nb gasnete_put_nb */ /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (implicit event) ========================================================== */ /* ------------------------------------------------------------------------------------ */ /* Conduits not using the gasnete_amref_ versions should implement at least the following: gasnete_get_nbi gasnete_put_nbi */ /* ------------------------------------------------------------------------------------ */ /* Barriers: ========= */ /* use reference implementation of barrier */ #define GASNETI_GASNET_EXTENDED_REFBARRIER_C 1 #include "gasnet_extended_refbarrier.c" #undef GASNETI_GASNET_EXTENDED_REFBARRIER_C /* ------------------------------------------------------------------------------------ */ /* Vector, Indexed & Strided: ========================= */ /* use reference implementation of scatter/gather and strided */ #include "gasnet_refvis.h" /* ------------------------------------------------------------------------------------ */ /* Collectives: ============ */ /* use reference implementation of collectives */ #include "gasnet_refcoll.h" /* ------------------------------------------------------------------------------------ */ /* Remote Atomics: ============== */ /* use reference implementation of remote atomics */ #include "gasnet_refratomic.h" /* ------------------------------------------------------------------------------------ */ /* Handlers: ========= */ static gex_AM_Entry_t const gasnete_handlers[] = { #ifdef GASNETE_REFBARRIER_HANDLERS GASNETE_REFBARRIER_HANDLERS(), #endif #ifdef GASNETE_REFVIS_HANDLERS GASNETE_REFVIS_HANDLERS() #endif #ifdef GASNETE_REFCOLL_HANDLERS GASNETE_REFCOLL_HANDLERS() #endif #ifdef GASNETE_AMREF_HANDLERS GASNETE_AMREF_HANDLERS() #endif #ifdef GASNETE_AMRATOMIC_HANDLERS GASNETE_AMRATOMIC_HANDLERS() #endif /* ptr-width independent handlers */ /* ptr-width dependent handlers */ GASNETI_HANDLER_EOT }; extern gex_AM_Entry_t const *gasnete_get_handlertable(void) { return gasnete_handlers; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/extended-ref/gasnet_extended_fwd.h0000664000175000017500000000677115142313673022161 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/gasnet_extended_fwd.h $ * Description: GASNet Extended API Header (forward decls) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_EXTENDED_FWD_H #define _GASNET_EXTENDED_FWD_H #define GASNET_EXTENDED_VERSION GASNET_RELEASE_VERSION_MAJOR.GASNET_RELEASE_VERSION_MINOR #define GASNET_EXTENDED_VERSION_STR _STRINGIFY(GASNET_EXTENDED_VERSION) #define GASNET_EXTENDED_NAME REFERENCE #define GASNET_EXTENDED_NAME_STR _STRINGIFY(GASNET_EXTENDED_NAME) #define GASNETI_EOP_IS_HANDLE 1 /* if conduit-internal threads may call the Extended API and/or they may run progress functions, then define GASNETE_CONDUIT_THREADS_USING_TD to the maximum COUNT of such threads to allocate space for their threaddata */ #if 0 #define GASNETE_CONDUIT_THREADS_USING_TD ### #endif /* this can be used to add statistical collection values specific to the extended API implementation (see gasnet_help.h) */ #define GASNETE_CONDUIT_STATS(CNT,VAL,TIME) \ GASNETI_VIS_STATS(CNT,VAL,TIME) \ GASNETI_COLL_STATS(CNT,VAL,TIME) \ GASNETI_RATOMIC_STATS(CNT,VAL,TIME) \ CNT(C, DYNAMIC_THREADLOOKUP, cnt) #define GASNETE_AUXSEG_DECLS \ extern gasneti_auxseg_request_t gasnete_barr_auxseg_alloc(gasnet_seginfo_t *auxseg_info); #define GASNETE_AUXSEG_FNS() gasnete_barr_auxseg_alloc, /* * When implementing a conduit-specific implementation of the Extended API, one * can #define the following to 1 to change certain behaviors in gasnet_extended.h. * Alternatively, one can #define GASNETE_HAVE_EXTENDED_HELP_EXTRA_H and defined * these in a conduit-specific gasnet_extended_help_extra.h. * * GASNETI_DIRECT_BLOCKING_GET * unset: gasnete_get() via gasnete_wait(gasnete_get_nb()) * set: conduit provides it own gasnete_get() * * GASNETI_DIRECT_BLOCKING_PUT * unset: gasnete_put() via gasnete_wait(gasnete_put_nb()) * set: conduit provides it own gasnete_put() * * GASNETI_DIRECT_PUT_VAL * unset: gasnete_put_val() via gasnete_put() * set: conduit provides it own gasnete_put_val() * * GASNETI_DIRECT_PUT_NB_VAL * unset: extern gasnete_put_nb_val() in gasnet_extended.c (or a macro) * set: conduit provides own gasnete_put_nb_val() as an inline * * GASNETI_DIRECT_PUT_NBI_VAL * unset: gasnete_put_nbi_val() via gasnete_put_nbi() * set: conduit provides own gasnete_put_nbi_val() * * GASNETI_DIRECT_GET_VAL * unset: extern gasnete_get_val() in gasnet_extended.c (or a macro) * set: conduit provides own gasnete_get_val() as an inline */ /* Configure use of AM-based implementation of get/put */ /* NOTE: Barriers, Collectives, VIS may use GASNETE_USING_REF_* in algorithm selection */ #define GASNETE_USING_REF_EXTENDED_GET 1 #define GASNETE_USING_REF_EXTENDED_PUT 1 /* These are the default tuning parameters for the AM-based get/put. * Conduits cloning this file may want to override these: */ #if 0 #define GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD gex_AM_LUBRequestMedium() #define GASNETE_USE_LONG_GETS 1 #endif /* Implement all "base" operations directly via amref: */ #define gasnete_amref_get_nb gasnete_get_nb #define gasnete_amref_put_nb gasnete_put_nb #define gasnete_amref_get_nbi gasnete_get_nbi #define gasnete_amref_put_nbi gasnete_put_nbi #endif gasnet-2025.8.0/extended-ref/README0000664000175000017500000001320415142313673016654 0ustar alastairalastairGASNet extended-ref documentation Dan Bonachea User Information: ----------------- The extended-ref directory is not intended for direct use by end users. It contains common code used to implement parts of the GASNet Extended API within many conduits. Recognized environment variables: --------------------------------- * All the standard GASNet environment variables (see top-level README) Optional compile-time settings: ------------------------------ * GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD - size threshold where gets/puts stop using medium messages and start using longs (if/when enabled, see below) * GASNETE_USE_LONG_GETS - true if we should try to use Long replies in gets (only possible if dest falls in segment) * GASNETE_USE_LONG_PUTS - true if we should try to use Long requests in puts * GASNETI_THREADINFO_OPT - optimize thread discovery using hidden local variable * GASNETI_LAZY_BEGINFUNCTION - postpone thread discovery to first use Known problems: --------------- * See the GASNet Bugzilla server for details on known bugs: https://gasnet-bugs.lbl.gov/ Future work: ------------ =============================================================================== Design Overview: ---------------- The extended-ref directory provides a reference implementation of the extended API, written solely in terms of the GASNet core API. This provides an easy porting path for new networks - once the core API is implemented, the extended-ref files provide working implementations of everything else in GASNet. Conduits for networks with good hardware support can subsequently customize and optimize selected functions from the extended API using hardware support. gex_Event_t is a pointer to a gasnet_op_t, which can be either an "eop" type (handle for explicit non-blocking op) or an "iop" type (handle for an implicit non-blocking op or access region). eops are allocated from a thread-specific pool to reduce allocation and locking costs, and basically just contain a flag block to track completion state. iops contain initiation and completion counters for puts and gets that are incremented atomically as operations complete. iops are also kept in a free list once freed to avoid reallocation costs (only created/freed for access regions). Each thread has an iop which is active for any new iop operations. Puts and gets are implemented on AM as follows: gasnet_put(_bulk) is translated to a gasnete_put_nb(_bulk) + sync gasnet_get(_bulk) is translated to a gasnete_get_nb(_bulk) + sync gasnete_put_nb(_bulk) translates to if nbytes < GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD AMMedium(payload) else if nbytes < AMMaxLongRequest AMLongRequest(payload) else gasnete_put_nbi(_bulk)(payload) gasnete_get_nb(_bulk) translates to if nbytes < GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD AMSmall request + AMMedium(payload) reply else gasnete_get_nbi(_bulk)() gasnete_put_nbi(_bulk) translates to if nbytes < GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD AMMedium(payload) else if nbytes < AMMaxLongRequest AMLongRequest(payload) else chunks of AMMaxLongRequest with AMLongRequest() AMLongRequestAsync is used instead of AMLongRequest for put_bulk gasnete_get_nbi(_bulk) translates to if nbytes < GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD AMSmall request + AMMedium(payload) reply else chunks of AMMaxMedium with AMSmall request + AMMedium() reply The current implementation uses AMLongs for large puts because the destination is guaranteed to fall within the registered GASNet segment. The spec allows gets to be received anywhere into the virtual memory space, so we can only use AMLong when the destination happens to fall within the segment - GASNETE_USE_LONG_GETS indicates whether or not we should try to do this. (conduits which can support AMLongs to areas outside the segment could improve on this through the use of this conduit-specific information). Barrier: There are two implementations available to choose between at runtime via the GASNET_BARRIER environment variable. The compile-time constant GASNETE_BARRIER_DEFAULT can be used to set the default barrier. "AMCENTRAL" - a silly, centralized barrier implementation: everybody sends notifies to a single node, where we count them up central node eventually notices the barrier is complete (probably when it calls wait) and then it broadcasts the completion to all the nodes The main problem is the need for the master to call wait before the barrier can make progress - we really need a way for the "last thread" to notify all the threads when completion is detected, but AM semantics don't provide a simple way to do this. The centralized nature also makes it non-scalable - we really want to use a tree-based barrier or pairwise exchange algorithm for scalability (but these impose even greater potential delays due to the lack of attentiveness to barrier progress) "AMDISSEM" - an AM-based Dissemination barrier implementation: With N nodes, the barrier takes ceil(lg(N)) steps (lg = log-base-2). At step i (i=0..): node n first sends to node ((n + 2^i) mod N) then node n waits to receive (from node ((n + N - 2^i) mod N)) once we receive for step i, we can move the step i+1 (or finish) The distributed nature makes this barrier more scalable than a centralized barrier, but also more sensitive to any lack of attentiveness to the network. We use a static allocation, limiting us to 2^GASNETE_AMBARRIER_MAXSTEP nodes. Algorithm is described in section 3.3 of John M. Mellor-Crummey and Michael L. Scott. "Algorithms for scalable synchronization on shared-memory multiprocessors." ACM ToCS, 9(1):21 65, 1991. gasnet-2025.8.0/extended-ref/vis/0000775000175000017500000000000015142313673016575 5ustar alastairalastairgasnet-2025.8.0/extended-ref/vis/gasnet_refvis.c0000664000175000017500000003762015142313673021610 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/vis/gasnet_refvis.c $ * Description: Reference implementation of GASNet Vector, Indexed & Strided * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include /*---------------------------------------------------------------------------------*/ /* *** VIS Init *** */ /*---------------------------------------------------------------------------------*/ static int gasnete_vis_isinit = 0; #if GASNETE_USE_AMPIPELINE static int gasnete_vis_use_ampipe; static size_t gasnete_vis_put_maxchunk; static size_t gasnete_vis_get_maxchunk; #endif #if GASNETE_USE_REMOTECONTIG_GATHER_SCATTER static int gasnete_vis_use_remotecontig; #endif extern void gasnete_vis_init(void) { gasneti_assert(!gasnete_vis_isinit); gasnete_vis_isinit = 1; GASNETI_TRACE_PRINTF(C,("gasnete_vis_init()")); #define GASNETE_VIS_ENV_YN(varname, envname, enabler) do { \ if (enabler) { \ varname = gasneti_getenv_yesno_withdefault(#envname, enabler##_DEFAULT); \ } else if (gasneti_getenv(#envname) && gasneti_getenv_yesno_withdefault(#envname, 0)) { \ gasneti_console0_message("WARNING","%s is set in environment, but %s support is compiled out - setting ignored\n", \ #envname, #enabler); \ } \ } while (0) #if !GASNETE_USE_AMPIPELINE int gasnete_vis_use_ampipe = 0; // dummy #endif GASNETE_VIS_ENV_YN(gasnete_vis_use_ampipe,GASNET_VIS_AMPIPE, GASNETE_USE_AMPIPELINE); #if GASNETE_USE_AMPIPELINE if (gasnete_vis_use_ampipe) { #ifndef GASNETE_VIS_MAXCHUNK_DEFAULT #define GASNETE_VIS_MAXCHUNK_DEFAULT MIN(gex_AM_LUBRequestMedium(),gex_AM_LUBReplyMedium())-2*sizeof(void*) #endif #ifndef GASNETE_VIS_PUT_MAXCHUNK_DEFAULT #define GASNETE_VIS_PUT_MAXCHUNK_DEFAULT GASNETE_VIS_MAXCHUNK_DEFAULT #endif #ifndef GASNETE_VIS_GET_MAXCHUNK_DEFAULT #define GASNETE_VIS_GET_MAXCHUNK_DEFAULT GASNETE_VIS_MAXCHUNK_DEFAULT #endif int gasnete_vis_maxchunk_set = !!gasneti_getenv("GASNET_VIS_MAXCHUNK"); size_t gasnete_vis_maxchunk = GASNETE_VIS_MAXCHUNK_DEFAULT; gasnete_vis_maxchunk = gasneti_getenv_int_withdefault("GASNET_VIS_MAXCHUNK", gasnete_vis_maxchunk, 1); gasnete_vis_put_maxchunk = GASNETE_VIS_PUT_MAXCHUNK_DEFAULT; gasnete_vis_put_maxchunk = gasneti_getenv_int_withdefault("GASNET_VIS_PUT_MAXCHUNK", (gasnete_vis_maxchunk_set ? gasnete_vis_maxchunk : gasnete_vis_put_maxchunk), 1); gasnete_vis_get_maxchunk = GASNETE_VIS_GET_MAXCHUNK_DEFAULT; gasnete_vis_get_maxchunk = gasneti_getenv_int_withdefault("GASNET_VIS_GET_MAXCHUNK", (gasnete_vis_maxchunk_set ? gasnete_vis_maxchunk : gasnete_vis_get_maxchunk), 1); } else { // !gasnete_vis_use_ampipe gasnete_vis_put_maxchunk = 0; gasnete_vis_get_maxchunk = 0; } #endif #if !GASNETE_USE_REMOTECONTIG_GATHER_SCATTER int gasnete_vis_use_remotecontig = 0; // dummy #endif GASNETE_VIS_ENV_YN(gasnete_vis_use_remotecontig,GASNET_VIS_REMOTECONTIG, GASNETE_USE_REMOTECONTIG_GATHER_SCATTER); } /*---------------------------------------------------------------------------------*/ // Peer completion support // #include #include "gasnet_event_internal.h" // TODO-EX: REMOVE THIS // VILE HACK: internal op interface lacks the capability to manipulate op ALC that we need // for correct interoperation of peer completion and ALC on the same VIS put typedef struct { gasneti_vis_op_t visop; // must be first gex_TM_t tm; gex_Rank_t rank; gex_Event_t lc; } gasneti_vispc_op_t; extern void gasnete_VIS_SetPeerCompletionHandler(gex_AM_Index_t handler, const void *source_addr, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_PRINTF(A,("VIS_SetPeerCompletionHandler: handler=%i, source_addr="GASNETI_LADDRFMT", nbytes=%"PRIuSZ, (int)handler, GASNETI_LADDRSTR(source_addr),nbytes)); gasnete_vis_threaddata_t * const td = GASNETE_VIS_MYTHREAD; gasnete_vis_pcinfo_t * const pcinfo = &(td->pcinfo); if (!handler) { // disarm pcinfo->_handler = 0; } else { // arm gasneti_assert_uint(nbytes ,<=, GEX_VIS_MAX_PEERCOMPLETION); gasneti_assert(!nbytes || source_addr); pcinfo->_handler = handler; pcinfo->_nbytes = nbytes; pcinfo->_srcaddr = source_addr; } } GASNETI_INLINE(gasnete_VIS_pcwrap) gex_Event_t gasnete_VIS_pcwrap(gasnete_synctype_t const synctype, // manifest constant gex_TM_t tm, gex_Rank_t rank, gex_Flags_t flags, gex_Event_t const evt GASNETI_THREAD_FARG) { gasnete_vis_threaddata_t * const td = GASNETE_VIS_MYTHREAD; gasnete_vis_pcinfo_t * const pcinfo = &(td->pcinfo); gasneti_assert(pcinfo->_handler); GASNETI_TRACE_PRINTF(D,("VIS_PeerCompletionHandler scheduled: handler=%i, source_addr="GASNETI_LADDRFMT", nbytes=%"PRIuSZ, (int)pcinfo->_handler, GASNETI_LADDRSTR(pcinfo->_srcaddr), pcinfo->_nbytes)); if (evt == GEX_EVENT_INVALID || // synchronously complete (synctype == gasnete_synctype_b && (gex_Event_Wait(evt),1))) { // blocking gex_Event_t lc; gex_Event_t *lc_opt; switch (synctype) { case gasnete_synctype_b: lc_opt = GEX_EVENT_NOW; lc = GEX_EVENT_INVALID; break; case gasnete_synctype_nb: lc_opt = &lc; break; case gasnete_synctype_nbi: lc_opt = GEX_EVENT_GROUP; lc = GEX_EVENT_INVALID; break; default: gasneti_unreachable_error(("Invalid synctype=%i",(int)synctype)); } gex_AM_RequestMedium1(tm, rank, _hidx_gasnete_vis_pcthunk_reqh, (void *)(pcinfo->_srcaddr), pcinfo->_nbytes, lc_opt, 0, pcinfo->_handler); pcinfo->_handler = 0; // reset return lc; } else { // schedule deferred initiator-chaining gasneti_vispc_op_t * const vispcop = gasneti_malloc(sizeof(gasneti_vispc_op_t)+GEX_VIS_MAX_PEERCOMPLETION); gasneti_vis_op_t * const visop = &(vispcop->visop); vispcop->tm = tm; vispcop->rank = rank; visop->type = GASNETI_VIS_CAT_PUTPC_CHAIN; visop->count = pcinfo->_handler; pcinfo->_handler = 0; // reset visop->len = pcinfo->_nbytes; visop->event = evt; if (flags & GEX_FLAG_ENABLE_LEAF_LC) { // client also requesting LC #if GASNETE_HAVE_LC vispcop->lc = gex_Event_QueryLeaf(evt, GEX_EC_LC); // TODO-EX: remove this event_internal vileness // set ALC in-flight for the client's op #define VISOP_EXTRA do { \ if (vispcop->lc) { \ if (synctype == gasnete_synctype_nb) GASNETE_EOP_LC_START((gasnete_eop_t *)(visop->eop)); \ else GASNETE_IOP_LC_START((gasnete_iop_t *)visop->iop); \ } \ } while (0) #else #if GASNET_DEBUG vispcop->lc = GEX_EVENT_INVALID; // for assertions only #endif #define VISOP_EXTRA ((void)0) #endif // bounce-buffer the PC payload if the client requested LC // this is REQUIRED for conduits lacking ALC signalling support, to correctly implement synchronous LC // this is an optimization for other conduits, to ensure we can report VIS payload LC to the client when it happens void *pcpayload = vispcop+1; GASNETI_MEMCPY_SAFE_EMPTY(pcpayload, pcinfo->_srcaddr, pcinfo->_nbytes); visop->addr = pcpayload; } else { visop->addr = (void*)pcinfo->_srcaddr; vispcop->lc = GEX_EVENT_INVALID; } GASNETE_PUSH_VISOP_RETURN(td, visop, synctype, 0, VISOP_EXTRA); #undef VISOP_EXTRA } } extern int gasnete_VIS_pcwrapBlocking(_GASNETE_VIS_PCWRAP_ARGS) { return (int)(intptr_t)gasnete_VIS_pcwrap(gasnete_synctype_b, _tm, _rank, _flags, _evt GASNETI_THREAD_PASS); } extern int gasnete_VIS_pcwrapNBI (_GASNETE_VIS_PCWRAP_ARGS) { return (int)(intptr_t)gasnete_VIS_pcwrap(gasnete_synctype_nbi, _tm, _rank, _flags, _evt GASNETI_THREAD_PASS); } extern gex_Event_t gasnete_VIS_pcwrapNB (_GASNETE_VIS_PCWRAP_ARGS) { return gasnete_VIS_pcwrap(gasnete_synctype_nb, _tm, _rank, _flags, _evt GASNETI_THREAD_PASS); } /* ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasnete_vis_run_pchandler) void gasnete_vis_run_pchandler(gex_Token_t token, void *addr, size_t nbytes, gex_AM_Index_t handler_id) { gex_Token_Info_t info; gex_TI_t rc = gex_Token_Info(token, &info, GEX_TI_SRCRANK|GEX_TI_EP); gasneti_assert((rc & GEX_TI_SRCRANK) && (rc & GEX_TI_EP)); gex_AM_Entry_t *entry = gasnetc_get_hentry(info.gex_ep,handler_id); gasneti_amtbl_check(entry, 0, gasneti_Medium, 0); gasnetc_nbrhd_token_t my_token; gex_Token_t thunk_token = gasnetc_nbrhd_token_init(&my_token, info.gex_srcrank, entry, 0); my_token.ti.gex_is_long = 0; gex_AM_Fn_t handler_fn = entry->gex_fnptr; GASNETI_RUN_HANDLER_MEDIUM(0,handler_id,handler_fn,thunk_token,NULL,0,addr,nbytes); } GASNETI_INLINE(gasnete_vis_pcthunk_reqh_inner) void gasnete_vis_pcthunk_reqh_inner(gex_Token_t token, void *addr, size_t nbytes, gex_AM_Arg_t _chandler) { gex_AM_Index_t handler_id = (gex_AM_Index_t)_chandler; gasneti_assert(handler_id == _chandler); gasnete_vis_run_pchandler(token, addr, nbytes, handler_id); } MEDIUM_HANDLER(gasnete_vis_pcthunk_reqh,1,1, (token,addr,nbytes, a0), (token,addr,nbytes, a0)); /*---------------------------------------------------------------------------------*/ #define GASNETI_GASNET_REFVIS_C 1 #include "vis/gasnet_vector.c" #include "vis/gasnet_indexed.c" #define GASNETE_STRIDED_VERSION 2.0 #include "vis/gasnet_strided.c" GASNETI_IDENT(gasneti_IdentString_StridedVersion, "$GASNetStridedVersion: " _STRINGIFY(GASNETE_STRIDED_VERSION)" $"); GASNETI_IDENT(gasneti_IdentString_StridedLoopDims, "$GASNetStridedLoopingDims: "_STRINGIFY(GASNETE_LOOPING_DIMS)" $"); GASNETI_IDENT(gasneti_IdentString_StridedDirDims, "$GASNetStridedDirectDims: " _STRINGIFY(GASNETE_DIRECT_DIMS)" $"); #if GASNETE_USE_AMPIPELINE GASNETI_IDENT(gasneti_IdentString_VISNPAM, "$GASNetVISNPAM: " _STRINGIFY(GASNETE_VIS_NPAM)" $"); #endif GASNETI_IDENT(gasneti_IdentString_VISMinPackBuf, "$GASNetVISMinPackBuffer: " _STRINGIFY(GASNETE_VIS_MIN_PACKBUFFER)" $"); #undef GASNETI_GASNET_REFVIS_C /*---------------------------------------------------------------------------------*/ /* *** Progress Function *** */ /*---------------------------------------------------------------------------------*/ gasnete_vis_epdata_t gasnete_vis_epdata_THUNK; /* signal a visop dummy eop/iop, unlink it and free it */ #define GASNETE_VISOP_SIGNAL_AND_FREE(visop, isget) do { \ GASNETE_VISOP_SIGNAL(visop, isget); \ GASNETI_PROGRESSFNS_DISABLE(gasneti_pf_vis,COUNTED); \ *lastp = visop->next; /* unlink */ \ gasneti_free(visop); \ goto visop_removed; \ } while (0) extern void gasneti_vis_progressfn(void) { #if PLATFORM_COMPILER_SUN_C /* disable warnings triggered by nesting switch-inside-for */ #pragma error_messages(off, E_LOOP_NOT_ENTERED_AT_TOP) #endif GASNET_BEGIN_FUNCTION(); /* TODO: remove this lookup */ gasnete_vis_threaddata_t *td = GASNETE_VIS_MYTHREAD; gasneti_vis_op_t **lastp = &(td->active_ops); if (td->progressfn_active) return; /* prevent recursion */ td->progressfn_active = 1; for (lastp = &(td->active_ops); *lastp; ) { gasneti_vis_op_t * const visop = *lastp; #ifdef GASNETE_VIS_PROGRESSFN_EXTRA GASNETE_VIS_PROGRESSFN_EXTRA(visop, lastp) #endif switch (visop->type) { case GASNETI_VIS_CAT_PUTPC_CHAIN: { gasneti_vispc_op_t * const vispcop = (gasneti_vispc_op_t *)visop; #if GASNETE_HAVE_LC // forward ALC if it exists and the client requested it if (vispcop->lc) { if (gasnete_test(vispcop->lc GASNETI_THREAD_PASS) == GASNET_OK) { vispcop->lc = GEX_EVENT_INVALID; if (visop->eop) GASNETE_EOP_LC_FINISH((gasnete_eop_t *)(visop->eop)); else GASNETE_IOP_LC_FINISH((gasnete_iop_t *)(visop->iop)); } else break; // no ALC yet, so cannot have operation completion } #endif if (gasnete_test(visop->event GASNETI_THREAD_PASS) == GASNET_OK) { // could potentially delay visop free until ALC of this medium payload, // but given the small size it's probably synchronously complete for most conduits anyhow gasneti_assert(!vispcop->lc); gex_AM_RequestMedium1(vispcop->tm, vispcop->rank, _hidx_gasnete_vis_pcthunk_reqh, visop->addr, visop->len, GEX_EVENT_NOW, 0, (uint8_t)visop->count); GASNETE_VISOP_SIGNAL_AND_FREE(visop, 0); } break; } #ifdef GASNETE_PUTV_GATHER_SELECTOR case GASNETI_VIS_CAT_PUTV_GATHER: if (gasnete_test(visop->event GASNETI_THREAD_PASS) == GASNET_OK) { GASNETE_VISOP_SIGNAL_AND_FREE(visop, 0); } break; #endif #ifdef GASNETE_GETV_SCATTER_SELECTOR case GASNETI_VIS_CAT_GETV_SCATTER: if (gasnete_test(visop->event GASNETI_THREAD_PASS) == GASNET_OK) { gex_Memvec_t const * const savedlst = (gex_Memvec_t const *)(visop + 1); void const * const packedbuf = savedlst + visop->count; gasnete_memvec_unpack(visop->count, savedlst, packedbuf, 0, (size_t)-1); GASNETE_VISOP_SIGNAL_AND_FREE(visop, 1); } break; #endif #ifdef GASNETE_PUTI_GATHER_SELECTOR case GASNETI_VIS_CAT_PUTI_GATHER: if (gasnete_test(visop->event GASNETI_THREAD_PASS) == GASNET_OK) { GASNETE_VISOP_SIGNAL_AND_FREE(visop, 0); } break; #endif #ifdef GASNETE_GETI_SCATTER_SELECTOR case GASNETI_VIS_CAT_GETI_SCATTER: if (gasnete_test(visop->event GASNETI_THREAD_PASS) == GASNET_OK) { void * const * const savedlst = (void * const *)(visop + 1); void const * const packedbuf = savedlst + visop->count; gasnete_addrlist_unpack(visop->count, savedlst, visop->len, packedbuf, 0, (size_t)-1); GASNETE_VISOP_SIGNAL_AND_FREE(visop, 1); } break; #endif #ifdef GASNETE_PUTS_GATHER_SELECTOR case GASNETI_VIS_CAT_PUTS_GATHER: if (gasnete_test(visop->event GASNETI_THREAD_PASS) == GASNET_OK) { GASNETE_VISOP_SIGNAL_AND_FREE(visop, 0); } break; #endif #ifdef GASNETE_GETS_SCATTER_SELECTOR case GASNETI_VIS_CAT_GETS_SCATTER: if (gasnete_test(visop->event GASNETI_THREAD_PASS) == GASNET_OK) { size_t stridelevels = visop->len; size_t * const savedstrides = (size_t *)(visop + 1); size_t * const savedcount = savedstrides + stridelevels; void * const packedbuf = (void *)(savedcount + stridelevels + 1); gasnete_strided_unpack_all(visop->addr, savedstrides, savedcount, stridelevels, packedbuf); GASNETE_VISOP_SIGNAL_AND_FREE(visop, 1); } break; #endif default: gasneti_unreachable_error(("unrecognized visop category: 0x%x", (int)visop->type)); } lastp = &(visop->next); /* advance */ visop_removed: ; } td->progressfn_active = 0; #if PLATFORM_COMPILER_SUN_C /* resume default treatment of the message we suppressed */ #pragma error_messages(default, E_LOOP_NOT_ENTERED_AT_TOP) #endif } /*---------------------------------------------------------------------------------*/ gasnet-2025.8.0/extended-ref/vis/gasnet_vis.h0000664000175000017500000012435115142313673021116 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/vis/gasnet_vis.h $ * Description: GASNet Extended API Vector, Indexed & Strided declarations * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_VIS_H #define _GASNET_VIS_H #if defined(_INCLUDED_GASNET_INTERNAL_H) && !defined(_IN_GASNET_INTERNAL_H) #error Internal GASNet code should not directly include gasnet_vis.h, just gasnet_internal.h #endif #include GASNETI_BEGIN_EXTERNC GASNETI_BEGIN_NOWARN /*---------------------------------------------------------------------------------*/ GASNETI_INLINE(gasnete_memveclist_totalsz) uintptr_t gasnete_memveclist_totalsz(size_t _count, gex_Memvec_t const *_list) { uintptr_t _retval = 0; for (size_t _i = 0; _i < _count; _i++) { _retval += _list[_i].gex_len; } return _retval; } GASNETI_INLINE(gasnete_memveclist_stats) gasneti_memveclist_stats_t gasnete_memveclist_stats(size_t _count, gex_Memvec_t const *_list) { gasneti_memveclist_stats_t _retval; size_t _minsz = (size_t)-1, _maxsz = 0; uintptr_t _totalsz = 0; char *_minaddr = (char *)(intptr_t)(uintptr_t)-1; char *_maxaddr = (char *)0; for (size_t _i = 0; _i < _count; _i++) { size_t const _len = _list[_i].gex_len; char * const _addr = (char *)_list[_i].gex_addr; char * const _end = _addr + _len - 1; if (_len > 0) { if (_len < _minsz) _minsz = _len; if (_len > _maxsz) _maxsz = _len; if (_addr < _minaddr) _minaddr = _addr; if (_end > _maxaddr) _maxaddr = _end; _totalsz += _len; } } _retval._minsz = _minsz; _retval._maxsz = _maxsz; _retval._minaddr = _minaddr; _retval._maxaddr = _maxaddr; _retval._totalsz = _totalsz; gasneti_assert_uint(_totalsz ,==, gasnete_memveclist_totalsz(_count, _list)); return _retval; } /*---------------------------------------------------------------------------------*/ GASNETI_INLINE(gasnete_addrlist_stats) gasneti_addrlist_stats_t gasnete_addrlist_stats(size_t _count, void * const *_list, size_t _len) { gasneti_addrlist_stats_t _retval; char *_minaddr = (char *)(intptr_t)(uintptr_t)-1; char *_maxaddr = (char *)0; #if PLATFORM_COMPILER_GNU && PLATFORM_COMPILER_VERSION_EQ(4,5,1) ssize_t _i; /* size_t triggers an ICE exclusive to gcc-4.5.1, but this gets a warning instead */ #else size_t _i; #endif for (_i = 0; _i < _count; _i++) { char * const _addr = (char *)_list[_i]; char * const _end = _addr + _len - 1; if (_addr < _minaddr) _minaddr = _addr; if (_end > _maxaddr) _maxaddr = _end; } _retval._minaddr = _minaddr; _retval._maxaddr = _maxaddr; return _retval; } /*---------------------------------------------------------------------------------*/ #if GASNETE_OLD_STRIDED #error GASNETE_OLD_STRIDED is no longer supported in this release. #endif /* returns non-zero iff the specified strided region is empty */ GASNETI_INLINE(gasnete_strided_empty) int gasnete_strided_empty(size_t _elemsz, size_t const *_count, size_t _stridelevels) { if_pf (!_elemsz) return 1; for (size_t _i = 0; _i < _stridelevels; _i++) { if_pf (_count[_i] == 0) return 1; } return 0; } /* returns the length of the bounding box containing all the data, and optionally the adjusted baseptr */ GASNETI_INLINE(gasnete_strided_bounds) size_t gasnete_strided_bounds(ptrdiff_t const *_strides, size_t _elemsz, size_t const *_count, size_t _stridelevels, const void **_baseptr) { uintptr_t _lo = 0; uintptr_t _hi = 0; for (size_t _d = 0; _d < _stridelevels; _d++) { ptrdiff_t const _stride = _strides[_d]; size_t const _cnt = _count[_d]; if (_stride >= 0) _hi += _stride * (_cnt - 1); else _lo += _stride * (_cnt - 1); } if (_baseptr) *_baseptr = (uint8_t*)*_baseptr + _lo; return _hi - _lo + _elemsz; // adjust for length of last element } /* returns the total bytes of data in the transfer */ GASNETI_INLINE(gasnete_strided_datasize) size_t gasnete_strided_datasize(size_t _elemsz, size_t const *_count, size_t _stridelevels) { size_t _sz = _elemsz; for (size_t _i = 0; _i < _stridelevels; _i++) { size_t const _cnt = _count[_i]; if_pf (_sz == 0) return 0; _sz *= _cnt; } return _sz; } #if GASNET_NDEBUG #define gasnete_boundscheck_memveclist(tm, node, count, list) ((void)0) #define gasnete_memveclist_checksizematch(dstcount, dstlist, srccount, srclist) ((void)0) #define gasnete_boundscheck_addrlist(tm, node, count, list, len) ((void)0) #define gasnete_addrlist_checksizematch(dstcount, dstlen, srccount, srclen) ((void)0) #define gasnete_check_stridesNT(dststrides, srcstrides, count, stridelevels) ((void)0) #else #define gasnete_boundscheck_memveclist(tm, rank, count, list) do { \ gex_TM_t __tm = (tm); \ gex_Rank_t __node = (rank); \ size_t __count = (count); \ gex_Memvec_t const * const __list = (list); \ for (size_t _i=0; _i < __count; _i++) { \ if (__list[_i].gex_len > 0) \ gasneti_boundscheck(__tm, __node, \ __list[_i].gex_addr, __list[_i].gex_len);\ } \ } while (0) #define gasnete_memveclist_checksizematch(dstcount, dstlist, srccount, srclist) do { \ gasneti_memveclist_stats_t _dststats = gasnete_memveclist_stats((dstcount), (dstlist)); \ gasneti_memveclist_stats_t _srcstats = gasnete_memveclist_stats((srccount), (srclist)); \ if_pf (_dststats._totalsz != _srcstats._totalsz) { \ char * _dstlist_str = \ (char *)gasneti_extern_malloc(gasneti_format_memveclist_bufsz(dstcount)); \ char * _srclist_str = \ (char *)gasneti_extern_malloc(gasneti_format_memveclist_bufsz(srccount)); \ gasneti_format_memveclist(_dstlist_str, (dstcount), (dstlist)); \ gasneti_format_memveclist(_srclist_str, (srccount), (srclist)); \ gasneti_fatalerror("Source and destination memvec lists disagree on total size:\n" \ " srclist: %s\n" \ " dstlist: %s\n", \ _dstlist_str, _srclist_str); \ /* gasneti_extern_free(_dstlist_str); -- dead code */ \ /* gasneti_extern_free(_srclist_str); -- dead code */ \ } \ if_pf (_dststats._totalsz != 0 && \ ((uintptr_t)_dststats._minaddr) + _dststats._totalsz - 1 > ((uintptr_t)_dststats._maxaddr)) { \ char * _dstlist_str = \ (char *)gasneti_extern_malloc(gasneti_format_memveclist_bufsz(dstcount)); \ gasneti_format_memveclist(_dstlist_str, (dstcount), (dstlist)); \ gasneti_fatalerror("Destination memvec list has overlapping elements:\n" \ " dstlist: %s\n" \ "(note this test is currently conservative " \ "and may fail to detect some illegal cases)", \ _dstlist_str); \ /* gasneti_extern_free(_dstlist_str); -- dead code */ \ } \ } while (0) #define gasnete_boundscheck_addrlist(tm, rank, count, list, len) do { \ gex_TM_t __tm = (tm); \ gex_Rank_t __node = (rank); \ size_t __count = (count); \ void * const * const __list = (list); \ size_t __len = (len); \ if_pt (__len > 0) { \ for (size_t __i=0; __i < __count; __i++) { \ gasneti_boundscheck(__tm, __node, __list[__i], __len); \ } \ } \ } while (0) #define gasnete_addrlist_checksizematch(dstcount, dstlen, srccount, srclen) do { \ if_pf ((dstcount)*(dstlen) != (srccount)*(srclen)) { \ gasneti_fatalerror("Total data size mismatch:\n" \ "dstcount(%" PRIuSZ ")*dstlen(%" PRIuSZ ") != srccount(%" PRIuSZ ")*srclen(%" PRIuSZ ")", \ dstcount, dstlen, srccount, srclen); \ } \ } while (0) // g2ex check for non-transpositional strides on LEGACY-format metadata #define gasnete_check_stridesNT(dststrides, srcstrides, count, stridelevels) do { \ const size_t * const __dststrides = (dststrides); \ const size_t * const __srcstrides = (srcstrides); \ const size_t * const __count = (count); \ const size_t __stridelevels = (stridelevels); \ gasneti_assert(__count); \ if_pt (!gasnete_strided_empty(__count[0], __count+1, __stridelevels)) { \ gasneti_assert(__dststrides); gasneti_assert(__srcstrides); \ if_pf (__stridelevels > 0 && __dststrides[0] < __count[0]) \ gasneti_fatalerror("dststrides[0](%" PRIuSZ ") < count[0](%" PRIuSZ ")", \ __dststrides[0],__count[0]); \ if_pf (__stridelevels > 0 && __srcstrides[0] < __count[0]) \ gasneti_fatalerror("srcstrides[0](%" PRIuSZ ") < count[0](%" PRIuSZ ")", \ __srcstrides[0],__count[0]); \ for (size_t _i = 1; _i < __stridelevels; _i++) { \ if_pf (__dststrides[_i] < (__count[_i] * __dststrides[_i-1])) \ gasneti_fatalerror("dststrides[%" PRIuSZ "](%" PRIuSZ ") < " \ "(count[%" PRIuSZ "](%" PRIuSZ ") * dststrides[%" PRIuSZ "](%" PRIuSZ "))", \ _i,__dststrides[_i], _i,__count[_i], _i-1,__dststrides[_i-1]); \ if_pf (__srcstrides[_i] < (__count[_i] * __srcstrides[_i-1])) \ gasneti_fatalerror("srcstrides[%" PRIuSZ "](%" PRIuSZ ") < " \ "(count[%" PRIuSZ "](%" PRIuSZ ") * srcstrides[%" PRIuSZ "](%" PRIuSZ "))", \ _i,__srcstrides[_i], _i,__count[_i], _i-1,__srcstrides[_i-1]); \ } \ } \ } while (0) #endif typedef enum _gasnete_synctype_t { gasnete_synctype_b, gasnete_synctype_nb, gasnete_synctype_nbi } gasnete_synctype_t; /*---------------------------------------------------------------------------------*/ // Peer completion support #ifndef GEX_VIS_MAX_PEERCOMPLETION #define GEX_VIS_MAX_PEERCOMPLETION 127 #endif extern void gasnete_VIS_SetPeerCompletionHandler(gex_AM_Index_t _handler, const void *_source_addr, size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG); #define gex_VIS_SetPeerCompletionHandler(handler, source_addr, nbytes, flags) \ gasnete_VIS_SetPeerCompletionHandler(handler, source_addr, nbytes, flags GASNETI_THREAD_GET) // For this release, VIS PC is implemented as a functionally correct proof-of-concept // that uses initiator-chaining in the public header for expedience. // TODO-EX: Replace this prototype with pipelined PC // This is a really gross macro hack, but it's strictly temporary. GASNETI_INLINE(_gasnete_vis_havepc) int _gasnete_vis_havepc(const void * const _ti) { gasneti_assert(_ti); gasnete_vis_pcinfo_t const * const _vis_ti = ((gasnete_vis_pcinfo_t const * const *)_ti)[2]; return _vis_ti && _vis_ti->_handler; } #define GASNETE_VIS_HAVEPC() _gasnete_vis_havepc(GASNETI_MYTHREAD_GET_OR_LOOKUP) #define _GASNETE_VIS_PCWRAP(tm,rank,flags,fnbase,syncmode,opargs) ( \ GASNETE_VIS_HAVEPC() ? \ gasnete_VIS_pcwrap##syncmode(tm,rank,flags,(fnbase##NB opargs) GASNETI_THREAD_GET) \ : fnbase##syncmode opargs \ ) #define _GASNETE_VIS_PCWRAP_ARGS gex_TM_t _tm, gex_Rank_t _rank, gex_Flags_t _flags, gex_Event_t _evt GASNETI_THREAD_FARG extern int gasnete_VIS_pcwrapBlocking(_GASNETE_VIS_PCWRAP_ARGS); extern int gasnete_VIS_pcwrapNBI (_GASNETE_VIS_PCWRAP_ARGS); extern gex_Event_t gasnete_VIS_pcwrapNB (_GASNETE_VIS_PCWRAP_ARGS) GASNETI_WARN_UNUSED_RESULT; /*---------------------------------------------------------------------------------*/ // Degenerate contiguous RMA support // Implement GEX_FLAG_ENABLE_LEAF_LC for calls to contiguous RMA // _lc_dummy is a stack temporary used to request handle-based LC via later QueryLeaf #define _GASNETE_LCOPT_FLAGS_NB ((_flags & GEX_FLAG_ENABLE_LEAF_LC) ? &_lc_dummy : GEX_EVENT_DEFER) #define _GASNETE_LCOPT_FLAGS_NBI ((_flags & GEX_FLAG_ENABLE_LEAF_LC) ? GEX_EVENT_GROUP : GEX_EVENT_DEFER) #define gasnete_vis_degen_PutBlocking(dstaddr, srcaddr, len) \ gex_RMA_PutBlocking(_tm,_dstrank,dstaddr,srcaddr,len,_flags) #define gasnete_vis_degen_PutNB(dstaddr, srcaddr, len) \ gex_RMA_PutNB(_tm,_dstrank,dstaddr,srcaddr,len,_GASNETE_LCOPT_FLAGS_NB,_flags) #define gasnete_vis_degen_PutNBI(dstaddr, srcaddr, len) \ gex_RMA_PutNBI(_tm,_dstrank,dstaddr,srcaddr,len,_GASNETE_LCOPT_FLAGS_NBI,_flags) #define gasnete_vis_degen_GetBlocking(dstaddr, srcaddr, len) \ gex_RMA_GetBlocking(_tm,dstaddr,_srcrank,srcaddr,len,_flags) #define gasnete_vis_degen_GetNB(dstaddr, srcaddr, len) \ gex_RMA_GetNB(_tm,dstaddr,_srcrank,srcaddr,len,_flags) #define gasnete_vis_degen_GetNBI(dstaddr, srcaddr, len) \ gex_RMA_GetNBI(_tm,dstaddr,_srcrank,srcaddr,len,_flags) /*---------------------------------------------------------------------------------*/ /* Vector */ #ifndef gasnete_putv extern gex_Event_t gasnete_putv( gasnete_synctype_t _synctype, gex_TM_t _tm, gex_Rank_t _dstrank, size_t _dstcount, gex_Memvec_t const _dstlist[], size_t _srccount, gex_Memvec_t const _srclist[], gex_Flags_t _flags GASNETI_THREAD_FARG); #endif #ifndef gasnete_getv extern gex_Event_t gasnete_getv( gasnete_synctype_t _synctype, gex_TM_t _tm, size_t _dstcount, gex_Memvec_t const _dstlist[], gex_Rank_t _srcrank, size_t _srccount, gex_Memvec_t const _srclist[], gex_Flags_t _flags GASNETI_THREAD_FARG); #endif #define _GASNETE_VECTOR_COMMON_GET(degencontigop) \ gasneti_assert(!(_flags & GEX_FLAG_ENABLE_LEAF_LC)); \ gasneti_assert(!GASNETE_VIS_HAVEPC()); \ _GASNETI_CHECK_LEGACY("getv",_tm,_flags); \ gasnete_boundscheck_memveclist(_tm, _srcrank, _srccount, _srclist); \ _GASNETE_VECTOR_COMMON(degencontigop, GETV_DEGENERATE) #define _GASNETE_VECTOR_COMMON_PUT(degencontigop) \ gex_Event_t _lc_dummy; \ _GASNETI_CHECK_LEGACY("putv",_tm,_flags); \ gasnete_boundscheck_memveclist(_tm, _dstrank, _dstcount, _dstlist); \ _GASNETE_VECTOR_COMMON(degencontigop, PUTV_DEGENERATE) #define _GASNETE_VECTOR_COMMON(degencontigop,degentoken) \ GASNETI_CHECK_INJECT(); \ gasnete_memveclist_checksizematch(_dstcount, _dstlist, _srccount, _srclist); \ if_pf (_dstcount == 0 || _srccount == 0) { /* no-op */ \ GASNETI_TRACE_EVENT(C, degentoken); \ return 0; \ } \ gasneti_assert(_dstlist); gasneti_assert(_srclist); \ if_pf (_dstcount + _srccount == 2) { \ gasneti_assert(_dstcount == 1 && _srccount == 1); \ GASNETI_TRACE_EVENT(C, degentoken); \ return degencontigop; \ } GASNETI_INLINE(_gex_VIS_VectorPutBlocking) int _gex_VIS_VectorPutBlocking( gex_TM_t _tm, gex_Rank_t _dstrank, size_t _dstcount, gex_Memvec_t const _dstlist[], size_t _srccount, gex_Memvec_t const _srclist[], gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_PUTV(PUTV_BULK,_tm,_dstrank,_dstcount,_dstlist,_srccount,_srclist); gasneti_assert(!(_flags & GEX_FLAG_ENABLE_LEAF_LC)); // forbidden for Blocking put _GASNETE_VECTOR_COMMON_PUT(gasnete_vis_degen_PutBlocking(_dstlist[0].gex_addr,_srclist[0].gex_addr,_dstlist[0].gex_len)); return (int)(intptr_t)gasnete_putv(gasnete_synctype_b,_tm,_dstrank,_dstcount,_dstlist,_srccount,_srclist,_flags GASNETI_THREAD_PASS); } #define gex_VIS_VectorPutBlocking(tm,dstrank,dstcount,dstlist,srccount,srclist,flags) \ _GASNETE_VIS_PCWRAP(tm,dstrank,flags, \ _gex_VIS_VectorPut,Blocking,(tm,dstrank,dstcount,dstlist,srccount,srclist,flags GASNETI_THREAD_GET)) GASNETI_INLINE(_gex_VIS_VectorGetBlocking) int _gex_VIS_VectorGetBlocking( gex_TM_t _tm, size_t _dstcount, gex_Memvec_t const _dstlist[], gex_Rank_t _srcrank, size_t _srccount, gex_Memvec_t const _srclist[], gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_GETV(GETV_BULK,_tm,_srcrank,_dstcount,_dstlist,_srccount,_srclist); _GASNETE_VECTOR_COMMON_GET(gasnete_vis_degen_GetBlocking(_dstlist[0].gex_addr,_srclist[0].gex_addr,_dstlist[0].gex_len)); return (int)(intptr_t)gasnete_getv(gasnete_synctype_b,_tm,_dstcount,_dstlist,_srcrank,_srccount,_srclist,_flags GASNETI_THREAD_PASS); } #define gex_VIS_VectorGetBlocking(tm,dstcount,dstlist,srcrank,srccount,srclist,flags) \ _gex_VIS_VectorGetBlocking(tm,dstcount,dstlist,srcrank,srccount,srclist,flags GASNETI_THREAD_GET) GASNETI_INLINE(_gex_VIS_VectorPutNB) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gex_VIS_VectorPutNB( gex_TM_t _tm, gex_Rank_t _dstrank, size_t _dstcount, gex_Memvec_t const _dstlist[], size_t _srccount, gex_Memvec_t const _srclist[], gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_PUTV(PUTV_NB_BULK,_tm,_dstrank,_dstcount,_dstlist,_srccount,_srclist); _GASNETE_VECTOR_COMMON_PUT(gasnete_vis_degen_PutNB(_dstlist[0].gex_addr,_srclist[0].gex_addr,_dstlist[0].gex_len)); return gasnete_putv(gasnete_synctype_nb,_tm,_dstrank,_dstcount,_dstlist,_srccount,_srclist,_flags GASNETI_THREAD_PASS); } #define gex_VIS_VectorPutNB(tm,dstrank,dstcount,dstlist,srccount,srclist,flags) \ _GASNETE_VIS_PCWRAP(tm,dstrank,flags, \ _gex_VIS_VectorPut,NB,(tm,dstrank,dstcount,dstlist,srccount,srclist,flags GASNETI_THREAD_GET)) GASNETI_INLINE(_gex_VIS_VectorGetNB) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gex_VIS_VectorGetNB( gex_TM_t _tm, size_t _dstcount, gex_Memvec_t const _dstlist[], gex_Rank_t _srcrank, size_t _srccount, gex_Memvec_t const _srclist[], gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_GETV(GETV_NB_BULK,_tm,_srcrank,_dstcount,_dstlist,_srccount,_srclist); _GASNETE_VECTOR_COMMON_GET(gasnete_vis_degen_GetNB(_dstlist[0].gex_addr,_srclist[0].gex_addr,_dstlist[0].gex_len)); return gasnete_getv(gasnete_synctype_nb,_tm,_dstcount,_dstlist,_srcrank,_srccount,_srclist,_flags GASNETI_THREAD_PASS); } #define gex_VIS_VectorGetNB(tm,dstcount,dstlist,srcrank,srccount,srclist,flags) \ _gex_VIS_VectorGetNB(tm,dstcount,dstlist,srcrank,srccount,srclist,flags GASNETI_THREAD_GET) GASNETI_INLINE(_gex_VIS_VectorPutNBI) int _gex_VIS_VectorPutNBI( gex_TM_t _tm, gex_Rank_t _dstrank, size_t _dstcount, gex_Memvec_t const _dstlist[], size_t _srccount, gex_Memvec_t const _srclist[], gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_PUTV(PUTV_NBI_BULK,_tm,_dstrank,_dstcount,_dstlist,_srccount,_srclist); _GASNETE_VECTOR_COMMON_PUT(gasnete_vis_degen_PutNBI(_dstlist[0].gex_addr,_srclist[0].gex_addr,_dstlist[0].gex_len)); return (int)(intptr_t)gasnete_putv(gasnete_synctype_nbi,_tm,_dstrank,_dstcount,_dstlist,_srccount,_srclist,_flags GASNETI_THREAD_PASS); } #define gex_VIS_VectorPutNBI(tm,dstrank,dstcount,dstlist,srccount,srclist,flags) \ _GASNETE_VIS_PCWRAP(tm,dstrank,flags, \ _gex_VIS_VectorPut,NBI,(tm,dstrank,dstcount,dstlist,srccount,srclist,flags GASNETI_THREAD_GET)) GASNETI_INLINE(_gex_VIS_VectorGetNBI) int _gex_VIS_VectorGetNBI( gex_TM_t _tm, size_t _dstcount, gex_Memvec_t const _dstlist[], gex_Rank_t _srcrank, size_t _srccount, gex_Memvec_t const _srclist[], gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_GETV(GETV_NBI_BULK,_tm,_srcrank,_dstcount,_dstlist,_srccount,_srclist); _GASNETE_VECTOR_COMMON_GET(gasnete_vis_degen_GetNBI(_dstlist[0].gex_addr,_srclist[0].gex_addr,_dstlist[0].gex_len)); return (int)(intptr_t)gasnete_getv(gasnete_synctype_nbi,_tm,_dstcount,_dstlist,_srcrank,_srccount,_srclist,_flags GASNETI_THREAD_PASS); } #define gex_VIS_VectorGetNBI(tm,dstcount,dstlist,srcrank,srccount,srclist,flags) \ _gex_VIS_VectorGetNBI(tm,dstcount,dstlist,srcrank,srccount,srclist,flags GASNETI_THREAD_GET) #undef _GASNETE_VECTOR_COMMON #undef _GASNETE_VECTOR_COMMON_PUT #undef _GASNETE_VECTOR_COMMON_GET /*---------------------------------------------------------------------------------*/ /* Indexed */ #ifndef gasnete_puti extern gex_Event_t gasnete_puti( gasnete_synctype_t _synctype, gex_TM_t _tm, gex_Rank_t _dstrank, size_t _dstcount, void * const _dstlist[], size_t _dstlen, size_t _srccount, void * const _srclist[], size_t _srclen, gex_Flags_t _flags GASNETI_THREAD_FARG); #endif #ifndef gasnete_geti extern gex_Event_t gasnete_geti( gasnete_synctype_t _synctype, gex_TM_t _tm, size_t _dstcount, void * const _dstlist[], size_t _dstlen, gex_Rank_t _srcrank, size_t _srccount, void * const _srclist[], size_t _srclen, gex_Flags_t _flags GASNETI_THREAD_FARG); #endif #define _GASNETE_INDEXED_COMMON_GET(degencontigop) \ gasneti_assert(!(_flags & GEX_FLAG_ENABLE_LEAF_LC)); \ gasneti_assert(!GASNETE_VIS_HAVEPC()); \ _GASNETI_CHECK_LEGACY("puti",_tm,_flags); \ gasnete_boundscheck_addrlist(_tm, _srcrank, _srccount, _srclist, _srclen); \ _GASNETE_INDEXED_COMMON(degencontigop, GETI_DEGENERATE) #define _GASNETE_INDEXED_COMMON_PUT(degencontigop) \ gex_Event_t _lc_dummy; \ _GASNETI_CHECK_LEGACY("geti",_tm,_flags); \ gasnete_boundscheck_addrlist(_tm, _dstrank, _dstcount, _dstlist, _dstlen); \ _GASNETE_INDEXED_COMMON(degencontigop, PUTI_DEGENERATE) #define _GASNETE_INDEXED_COMMON(degencontigop,degentoken) \ GASNETI_CHECK_INJECT(); \ gasnete_addrlist_checksizematch(_dstcount, _dstlen, _srccount, _srclen); \ if_pf (_dstcount*_dstlen == 0) { /* no-op */ \ gasneti_assert_uint(_srccount*_srclen ,==, 0); \ GASNETI_TRACE_EVENT(C, degentoken); \ return 0; \ } else gasneti_assert_uint(_srccount*_srclen ,>, 0); \ gasneti_assert(_dstlist); gasneti_assert(_srclist); \ if_pf (_dstcount + _srccount == 2) { \ gasneti_assert(_dstcount == 1 && _srccount == 1); \ GASNETI_TRACE_EVENT(C, degentoken); \ return degencontigop; \ } GASNETI_INLINE(_gex_VIS_IndexedPutBlocking) int _gex_VIS_IndexedPutBlocking( gex_TM_t _tm, gex_Rank_t _dstrank, size_t _dstcount, void * const _dstlist[], size_t _dstlen, size_t _srccount, void * const _srclist[], size_t _srclen, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_PUTI(PUTI_BULK,_tm,_dstrank,_dstcount,_dstlist,_dstlen,_srccount,_srclist,_srclen); gasneti_assert(!(_flags & GEX_FLAG_ENABLE_LEAF_LC)); // forbidden for Blocking put _GASNETE_INDEXED_COMMON_PUT(gasnete_vis_degen_PutBlocking(_dstlist[0],_srclist[0],_dstlen)); return (int)(intptr_t)gasnete_puti(gasnete_synctype_b,_tm,_dstrank,_dstcount,_dstlist,_dstlen,_srccount,_srclist,_srclen,_flags GASNETI_THREAD_PASS); } #define gex_VIS_IndexedPutBlocking(tm,dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) \ _GASNETE_VIS_PCWRAP(tm,dstrank,flags, \ _gex_VIS_IndexedPut,Blocking,(tm,dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_GET)) GASNETI_INLINE(_gex_VIS_IndexedGetBlocking) int _gex_VIS_IndexedGetBlocking( gex_TM_t _tm, size_t _dstcount, void * const _dstlist[], size_t _dstlen, gex_Rank_t _srcrank, size_t _srccount, void * const _srclist[], size_t _srclen, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_GETI(GETI_BULK,_tm,_srcrank,_dstcount,_dstlist,_dstlen,_srccount,_srclist,_srclen); _GASNETE_INDEXED_COMMON_GET(gasnete_vis_degen_GetBlocking(_dstlist[0],_srclist[0],_dstlen)); return (int)(intptr_t)gasnete_geti(gasnete_synctype_b,_tm,_dstcount,_dstlist,_dstlen,_srcrank,_srccount,_srclist,_srclen,_flags GASNETI_THREAD_PASS); } #define gex_VIS_IndexedGetBlocking(tm,dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen,flags) \ _gex_VIS_IndexedGetBlocking(tm,dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen,flags GASNETI_THREAD_GET) GASNETI_INLINE(_gex_VIS_IndexedPutNB) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gex_VIS_IndexedPutNB( gex_TM_t _tm, gex_Rank_t _dstrank, size_t _dstcount, void * const _dstlist[], size_t _dstlen, size_t _srccount, void * const _srclist[], size_t _srclen, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_PUTI(PUTI_NB_BULK,_tm,_dstrank,_dstcount,_dstlist,_dstlen,_srccount,_srclist,_srclen); _GASNETE_INDEXED_COMMON_PUT(gasnete_vis_degen_PutNB(_dstlist[0],_srclist[0],_dstlen)); return gasnete_puti(gasnete_synctype_nb,_tm,_dstrank,_dstcount,_dstlist,_dstlen,_srccount,_srclist,_srclen,_flags GASNETI_THREAD_PASS); } #define gex_VIS_IndexedPutNB(tm,dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) \ _GASNETE_VIS_PCWRAP(tm,dstrank,flags, \ _gex_VIS_IndexedPut,NB,(tm,dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_GET)) GASNETI_INLINE(_gex_VIS_IndexedGetNB) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gex_VIS_IndexedGetNB( gex_TM_t _tm, size_t _dstcount, void * const _dstlist[], size_t _dstlen, gex_Rank_t _srcrank, size_t _srccount, void * const _srclist[], size_t _srclen, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_GETI(GETI_NB_BULK,_tm,_srcrank,_dstcount,_dstlist,_dstlen,_srccount,_srclist,_srclen); _GASNETE_INDEXED_COMMON_GET(gasnete_vis_degen_GetNB(_dstlist[0],_srclist[0],_dstlen)); return gasnete_geti(gasnete_synctype_nb,_tm,_dstcount,_dstlist,_dstlen,_srcrank,_srccount,_srclist,_srclen,_flags GASNETI_THREAD_PASS); } #define gex_VIS_IndexedGetNB(tm,dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen,flags) \ _gex_VIS_IndexedGetNB(tm,dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen,flags GASNETI_THREAD_GET) GASNETI_INLINE(_gex_VIS_IndexedPutNBI) int _gex_VIS_IndexedPutNBI( gex_TM_t _tm, gex_Rank_t _dstrank, size_t _dstcount, void * const _dstlist[], size_t _dstlen, size_t _srccount, void * const _srclist[], size_t _srclen, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_PUTI(PUTI_NBI_BULK,_tm,_dstrank,_dstcount,_dstlist,_dstlen,_srccount,_srclist,_srclen); _GASNETE_INDEXED_COMMON_PUT(gasnete_vis_degen_PutNBI(_dstlist[0],_srclist[0],_dstlen)); return (int)(intptr_t)gasnete_puti(gasnete_synctype_nbi,_tm,_dstrank,_dstcount,_dstlist,_dstlen,_srccount,_srclist,_srclen,_flags GASNETI_THREAD_PASS); } #define gex_VIS_IndexedPutNBI(tm,dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) \ _GASNETE_VIS_PCWRAP(tm,dstrank,flags, \ _gex_VIS_IndexedPut,NBI,(tm,dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_GET)) GASNETI_INLINE(_gex_VIS_IndexedGetNBI) int _gex_VIS_IndexedGetNBI( gex_TM_t _tm, size_t _dstcount, void * const _dstlist[], size_t _dstlen, gex_Rank_t _srcrank, size_t _srccount, void * const _srclist[], size_t _srclen, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_GETI(GETI_NBI_BULK,_tm,_srcrank,_dstcount,_dstlist,_dstlen,_srccount,_srclist,_srclen); _GASNETE_INDEXED_COMMON_GET(gasnete_vis_degen_GetNBI(_dstlist[0],_srclist[0],_dstlen)); return (int)(intptr_t)gasnete_geti(gasnete_synctype_nbi,_tm,_dstcount,_dstlist,_dstlen,_srcrank,_srccount,_srclist,_srclen,_flags GASNETI_THREAD_PASS); } #define gex_VIS_IndexedGetNBI(tm,dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen,flags) \ _gex_VIS_IndexedGetNBI(tm,dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen,flags GASNETI_THREAD_GET) #undef _GASNETE_INDEXED_COMMON #undef _GASNETE_INDEXED_COMMON_PUT #undef _GASNETE_INDEXED_COMMON_GET /*---------------------------------------------------------------------------------*/ /* Strided */ #ifndef gasnete_puts extern gex_Event_t gasnete_puts( gasnete_synctype_t _synctype, gex_TM_t _tm, gex_Rank_t _dstrank, void *_dstaddr, const ptrdiff_t _dststrides[], void *_srcaddr, const ptrdiff_t _srcstrides[], size_t _elemsz, const size_t _count[], size_t _stridelevels, gex_Flags_t _flags GASNETI_THREAD_FARG); #endif #ifndef gasnete_gets extern gex_Event_t gasnete_gets( gasnete_synctype_t _synctype, gex_TM_t _tm, void *_dstaddr, const ptrdiff_t _dststrides[], gex_Rank_t _srcrank, void *_srcaddr, const ptrdiff_t _srcstrides[], size_t _elemsz, const size_t _count[], size_t _stridelevels, gex_Flags_t _flags GASNETI_THREAD_FARG); #endif #define _GASNETE_STRIDED_COMMON_GET(degencontigop) \ gasneti_assert(!(_flags & GEX_FLAG_ENABLE_LEAF_LC)); \ gasneti_assert(!GASNETE_VIS_HAVEPC()); \ _GASNETE_STRIDED_COMMON(degencontigop, GETS_DEGENERATE) #define _GASNETE_STRIDED_COMMON_PUT(degencontigop) \ gex_Event_t _lc_dummy; \ _GASNETE_STRIDED_COMMON(degencontigop, PUTS_DEGENERATE) #define _GASNETE_STRIDED_COMMON(degencontigop,degentoken) \ GASNETI_CHECK_INJECT(); \ if_pf (_elemsz == 0) { \ GASNETI_TRACE_EVENT(C, degentoken); \ return 0; \ } else if_pf (_stridelevels == 0) { \ GASNETI_TRACE_EVENT(C, degentoken); \ return degencontigop; \ } else { /* check array validity */ \ gasneti_assert(_dststrides); \ gasneti_assert(_srcstrides); \ gasneti_assert(_count); \ } GASNETI_INLINE(_gex_VIS_StridedPutBlocking) int _gex_VIS_StridedPutBlocking( gex_TM_t _tm, gex_Rank_t _dstrank, void *_dstaddr, const ptrdiff_t _dststrides[], void *_srcaddr, const ptrdiff_t _srcstrides[], size_t _elemsz, const size_t _count[], size_t _stridelevels, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_PUTS(PUTS_BULK,_tm,_dstrank,_dstaddr,_dststrides,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels); gasneti_assert(!(_flags & GEX_FLAG_ENABLE_LEAF_LC)); // forbidden for Blocking put _GASNETE_STRIDED_COMMON_PUT(gasnete_vis_degen_PutBlocking(_dstaddr,_srcaddr,_elemsz)); return (int)(intptr_t)gasnete_puts(gasnete_synctype_b,_tm,_dstrank,_dstaddr,_dststrides,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels,_flags GASNETI_THREAD_PASS); } #define gex_VIS_StridedPutBlocking(tm,dstrank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels,flags) \ _GASNETE_VIS_PCWRAP(tm,dstrank,flags, \ _gex_VIS_StridedPut,Blocking,(tm,dstrank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels,flags GASNETI_THREAD_GET)) GASNETI_INLINE(_gex_VIS_StridedGetBlocking) int _gex_VIS_StridedGetBlocking( gex_TM_t _tm, void *_dstaddr, const ptrdiff_t _dststrides[], gex_Rank_t _srcrank, void *_srcaddr, const ptrdiff_t _srcstrides[], size_t _elemsz, const size_t _count[], size_t _stridelevels, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_GETS(GETS_BULK,_tm,_srcrank,_dstaddr,_dststrides,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels); _GASNETE_STRIDED_COMMON_GET(gasnete_vis_degen_GetBlocking(_dstaddr,_srcaddr,_elemsz)); return (int)(intptr_t)gasnete_gets(gasnete_synctype_b,_tm,_dstaddr,_dststrides,_srcrank,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels,_flags GASNETI_THREAD_PASS); } #define gex_VIS_StridedGetBlocking(tm,dstaddr,dststrides,srcrank,srcaddr,srcstrides,elemsz,count,stridelevels,flags) \ _gex_VIS_StridedGetBlocking(tm,dstaddr,dststrides,srcrank,srcaddr,srcstrides,elemsz,count,stridelevels,flags GASNETI_THREAD_GET) GASNETI_INLINE(_gex_VIS_StridedPutNB) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gex_VIS_StridedPutNB( gex_TM_t _tm, gex_Rank_t _dstrank, void *_dstaddr, const ptrdiff_t _dststrides[], void *_srcaddr, const ptrdiff_t _srcstrides[], size_t _elemsz, const size_t _count[], size_t _stridelevels, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_PUTS(PUTS_NB_BULK,_tm,_dstrank,_dstaddr,_dststrides,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels); _GASNETE_STRIDED_COMMON_PUT(gasnete_vis_degen_PutNB(_dstaddr,_srcaddr,_elemsz)); return gasnete_puts(gasnete_synctype_nb,_tm,_dstrank,_dstaddr,_dststrides,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels,_flags GASNETI_THREAD_PASS); } #define gex_VIS_StridedPutNB(tm,dstrank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels,flags) \ _GASNETE_VIS_PCWRAP(tm,dstrank,flags, \ _gex_VIS_StridedPut,NB,(tm,dstrank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels,flags GASNETI_THREAD_GET)) GASNETI_INLINE(_gex_VIS_StridedGetNB) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gex_VIS_StridedGetNB( gex_TM_t _tm, void *_dstaddr, const ptrdiff_t _dststrides[], gex_Rank_t _srcrank, void *_srcaddr, const ptrdiff_t _srcstrides[], size_t _elemsz, const size_t _count[], size_t _stridelevels, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_GETS(GETS_NB_BULK,_tm,_srcrank,_dstaddr,_dststrides,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels); _GASNETE_STRIDED_COMMON_GET(gasnete_vis_degen_GetNB(_dstaddr,_srcaddr,_elemsz)); return gasnete_gets(gasnete_synctype_nb,_tm,_dstaddr,_dststrides,_srcrank,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels,_flags GASNETI_THREAD_PASS); } #define gex_VIS_StridedGetNB(tm,dstaddr,dststrides,srcrank,srcaddr,srcstrides,elemsz,count,stridelevels,flags) \ _gex_VIS_StridedGetNB(tm,dstaddr,dststrides,srcrank,srcaddr,srcstrides,elemsz,count,stridelevels,flags GASNETI_THREAD_GET) GASNETI_INLINE(_gex_VIS_StridedPutNBI) int _gex_VIS_StridedPutNBI( gex_TM_t _tm, gex_Rank_t _dstrank, void *_dstaddr, const ptrdiff_t _dststrides[], void *_srcaddr, const ptrdiff_t _srcstrides[], size_t _elemsz, const size_t _count[], size_t _stridelevels, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_PUTS(PUTS_NBI_BULK,_tm,_dstrank,_dstaddr,_dststrides,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels); _GASNETE_STRIDED_COMMON_PUT(gasnete_vis_degen_PutNBI(_dstaddr,_srcaddr,_elemsz)); return (int)(intptr_t)gasnete_puts(gasnete_synctype_nbi,_tm,_dstrank,_dstaddr,_dststrides,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels,_flags GASNETI_THREAD_PASS); } #define gex_VIS_StridedPutNBI(tm,dstrank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels,flags) \ _GASNETE_VIS_PCWRAP(tm,dstrank,flags, \ _gex_VIS_StridedPut,NBI,(tm,dstrank,dstaddr,dststrides,srcaddr,srcstrides,elemsz,count,stridelevels,flags GASNETI_THREAD_GET)) GASNETI_INLINE(_gex_VIS_StridedGetNBI) int _gex_VIS_StridedGetNBI( gex_TM_t _tm, void *_dstaddr, const ptrdiff_t _dststrides[], gex_Rank_t _srcrank, void *_srcaddr, const ptrdiff_t _srcstrides[], size_t _elemsz, const size_t _count[], size_t _stridelevels, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_GETS(GETS_NBI_BULK,_tm,_srcrank,_dstaddr,_dststrides,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels); _GASNETE_STRIDED_COMMON_GET(gasnete_vis_degen_GetNBI(_dstaddr,_srcaddr,_elemsz)); return (int)(intptr_t)gasnete_gets(gasnete_synctype_nbi,_tm,_dstaddr,_dststrides,_srcrank,_srcaddr,_srcstrides,_elemsz,_count,_stridelevels,_flags GASNETI_THREAD_PASS); } #define gex_VIS_StridedGetNBI(tm,dstaddr,dststrides,srcrank,srcaddr,srcstrides,elemsz,count,stridelevels,flags) \ _gex_VIS_StridedGetNBI(tm,dstaddr,dststrides,srcrank,srcaddr,srcstrides,elemsz,count,stridelevels,flags GASNETI_THREAD_GET) #undef _GASNETE_STRIDED_COMMON #undef _GASNETE_STRIDED_COMMON_GET #undef _GASNETE_STRIDED_COMMON_PUT /*---------------------------------------------------------------------------------*/ // g2ex Strided wrappers // These translate the Strided metadata from legacy to EX format #define _GASNETE_G2EX_STRIDED_COMMON(op) \ _GASNETI_CHECK_LEGACY(op,_tm,GASNETI_FLAG_G2EX_DEBUG); \ gasneti_assert_uint(sizeof(size_t) ,==, sizeof(ptrdiff_t)); \ gasnete_check_stridesNT(_dststrides, _srcstrides, _count, _stridelevels) GASNETI_INLINE(_gasnet_puts_bulk) void _gasnet_puts_bulk( gex_TM_t _tm, gex_Rank_t _dstrank, void *_dstaddr, const size_t _dststrides[], void *_srcaddr, const size_t _srcstrides[], const size_t _count[], size_t _stridelevels GASNETI_THREAD_FARG) { _GASNETE_G2EX_STRIDED_COMMON("puts"); _gex_VIS_StridedPutBlocking(_tm,_dstrank,_dstaddr,(ptrdiff_t*)_dststrides,_srcaddr,(ptrdiff_t*)_srcstrides,_count[0],_count+1,_stridelevels,0 GASNETI_THREAD_PASS); } GASNETI_INLINE(_gasnet_gets_bulk) void _gasnet_gets_bulk( gex_TM_t _tm, void *_dstaddr, const size_t _dststrides[], gex_Rank_t _srcrank, void *_srcaddr, const size_t _srcstrides[], const size_t _count[], size_t _stridelevels GASNETI_THREAD_FARG) { _GASNETE_G2EX_STRIDED_COMMON("gets"); _gex_VIS_StridedGetBlocking(_tm,_dstaddr,(ptrdiff_t*)_dststrides,_srcrank,_srcaddr,(ptrdiff_t*)_srcstrides,_count[0],_count+1,_stridelevels,0 GASNETI_THREAD_PASS); } GASNETI_INLINE(_gasnet_puts_nb_bulk) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gasnet_puts_nb_bulk( gex_TM_t _tm, gex_Rank_t _dstrank, void *_dstaddr, const size_t _dststrides[], void *_srcaddr, const size_t _srcstrides[], const size_t _count[], size_t _stridelevels GASNETI_THREAD_FARG) { _GASNETE_G2EX_STRIDED_COMMON("puts"); return _gex_VIS_StridedPutNB(_tm,_dstrank,_dstaddr,(ptrdiff_t*)_dststrides,_srcaddr,(ptrdiff_t*)_srcstrides,_count[0],_count+1,_stridelevels,0 GASNETI_THREAD_PASS); } GASNETI_INLINE(_gasnet_gets_nb_bulk) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gasnet_gets_nb_bulk( gex_TM_t _tm, void *_dstaddr, const size_t _dststrides[], gex_Rank_t _srcrank, void *_srcaddr, const size_t _srcstrides[], const size_t _count[], size_t _stridelevels GASNETI_THREAD_FARG) { _GASNETE_G2EX_STRIDED_COMMON("gets"); return _gex_VIS_StridedGetNB(_tm,_dstaddr,(ptrdiff_t*)_dststrides,_srcrank,_srcaddr,(ptrdiff_t*)_srcstrides,_count[0],_count+1,_stridelevels,0 GASNETI_THREAD_PASS); } GASNETI_INLINE(_gasnet_puts_nbi_bulk) void _gasnet_puts_nbi_bulk( gex_TM_t _tm, gex_Rank_t _dstrank, void *_dstaddr, const size_t _dststrides[], void *_srcaddr, const size_t _srcstrides[], const size_t _count[], size_t _stridelevels GASNETI_THREAD_FARG) { _GASNETE_G2EX_STRIDED_COMMON("puts"); _gex_VIS_StridedPutNBI(_tm,_dstrank,_dstaddr,(ptrdiff_t*)_dststrides,_srcaddr,(ptrdiff_t*)_srcstrides,_count[0],_count+1,_stridelevels,0 GASNETI_THREAD_PASS); } GASNETI_INLINE(_gasnet_gets_nbi_bulk) void _gasnet_gets_nbi_bulk( gex_TM_t _tm, void *_dstaddr, const size_t _dststrides[], gex_Rank_t _srcrank, void *_srcaddr, const size_t _srcstrides[], const size_t _count[], size_t _stridelevels GASNETI_THREAD_FARG) { _GASNETE_G2EX_STRIDED_COMMON("gets"); _gex_VIS_StridedGetNBI(_tm,_dstaddr,(ptrdiff_t*)_dststrides,_srcrank,_srcaddr,(ptrdiff_t*)_srcstrides,_count[0],_count+1,_stridelevels,0 GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ #undef gasnete_vis_degen_PutBlocking #undef gasnete_vis_degen_PutNBI #undef gasnete_vis_degen_GetBlocking #undef gasnete_vis_degen_GetNB #undef gasnete_vis_degen_GetNBI GASNETI_END_NOWARN GASNETI_END_EXTERNC #endif gasnet-2025.8.0/extended-ref/vis/gasnet_indexed.c0000664000175000017500000013033415142313673021726 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/vis/gasnet_indexed.c $ * Description: GASNet Indexed implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef GASNETI_GASNET_REFVIS_C #error This file not meant to be compiled directly - included by gasnet_refvis.c #endif /*---------------------------------------------------------------------------------*/ /* packing/unpacking helpers */ #define _GASNETE_ADDRLIST_PACK(copy) { \ size_t i; \ uint8_t *ploc = (uint8_t *)buf; \ gasneti_assert(count > 0 && list && len > 0 && buf); \ gasneti_assert_uint(first_offset ,<, len); \ if (last_len == (size_t)-1) last_len = len; \ if (count == 1) { \ copy(ploc, ((uint8_t*)list[0])+first_offset, last_len); \ ploc += last_len; \ } else { \ size_t firstlen = len - first_offset; \ copy(ploc, ((uint8_t*)list[0])+first_offset, firstlen); \ ploc += firstlen; \ for (i = 1; i < count-1; i++) { \ copy(ploc, list[i], len); \ ploc += len; \ } \ copy(ploc, list[count-1], last_len); \ ploc += last_len; \ } \ return ploc; \ } /* pack a addrlist list into a contiguous buffer, using the provided byte offset into the first element if last_len is (size_t)-1, then last_len is ignored otherwise, last_len is used in place of len for the last entry (and is never adjusted based on first_offset, even if count == 1) return a pointer into the packed buffer, which points just after the last byte used */ void *gasnete_addrlist_pack(size_t count, void * const list[], size_t len, void *buf, size_t first_offset, size_t last_len) _GASNETE_ADDRLIST_PACK(_GASNETE_PACK_HELPER) void *gasnete_addrlist_unpack(size_t count, void * const list[], size_t len, void const *buf, size_t first_offset, size_t last_len) _GASNETE_ADDRLIST_PACK(_GASNETE_UNPACK_HELPER) /*---------------------------------------------------------------------------------*/ /* Packetizes remotelist into a list of gasnete_packetdesc_t entries based on maxpayload packet size sharedpacket => metadata and corresponding data travel together in unified packets (put) so that for each packet i: datasz_i + metadatasz_i <= maxpayload !sharedpacket => metadata and corresponding data travel in separate packets (get) so that for each packet i: MAX(datasz_i,metadatasz_i) <= maxpayload A local packet table is also computed to match the remote packetization boundaries of the data on a byte-for-byte basis Allocates and populates the plocalpt and premotept arrays with the packetization information Returns the number of packets described by the resulting plocalpt and premotept arrays */ size_t gasnete_packetize_addrlist(size_t remotecount, size_t remotelen, size_t localcount, size_t locallen, gasnete_packetdesc_t **premotept, gasnete_packetdesc_t **plocalpt, size_t maxpayload, int sharedpacket) { size_t ptidx; int done = 0; size_t ridx = 0, roffset = 0, lidx = 0, loffset = 0; size_t const metadatasz = sizeof(void *); size_t const runit = (sharedpacket ? metadatasz + remotelen : MAX(metadatasz,remotelen)); size_t ptsz = (runit <= maxpayload ? /* conservative upper bound on packet count */ remotecount / (maxpayload / runit) + 1 : remotelen*remotecount / (maxpayload - 2*metadatasz) + 1); gasnete_packetdesc_t *remotept = gasneti_malloc(ptsz*sizeof(gasnete_packetdesc_t)); gasnete_packetdesc_t *localpt = gasneti_malloc(ptsz*sizeof(gasnete_packetdesc_t)); gasneti_assert(premotept && plocalpt && remotecount && remotelen && localcount && locallen); gasneti_assert_uint(maxpayload ,>, metadatasz); gasneti_assert_uint(remotecount*remotelen ,==, localcount*locallen); gasneti_assert(remotecount*remotelen > 0); for (ptidx = 0; ; ptidx++) { ssize_t packetremain = maxpayload; ssize_t packetdata = 0; size_t ldatasz; size_t rdatasz = 0; // init to avoid a warning on gcc -O3 -Wall gasneti_assert_uint(ptidx ,<, ptsz); /* begin remote packet */ remotept[ptidx].firstidx = ridx; remotept[ptidx].firstoffset = roffset; /* begin local packet */ if_pf (lidx == localcount) localpt[ptidx].firstidx = lidx-1; else localpt[ptidx].firstidx = lidx; localpt[ptidx].firstoffset = loffset; if (roffset > 0) { /* initial partial entry */ gasneti_assert_uint(roffset ,<, remotelen); rdatasz = remotelen - roffset; /* data left in current entry */ /* try to add the entire entry to packet */ if (sharedpacket) packetremain -= (metadatasz + rdatasz); else packetremain -= MAX(metadatasz, rdatasz); if (packetremain < 0) { /* overflowed - finished a packet, and spill to next */ rdatasz += packetremain; /* compute truncated datasz that fits in this packet */ roffset += rdatasz; /* update offset into current entry */ packetdata += rdatasz; goto rend; } else { packetdata += rdatasz; roffset = 0; /* finished an entry */ ridx++; if (ridx == remotecount) { done = 1; goto rend; } /* done - this is last packet */ } } if (packetremain >= runit) { /* whole entries */ size_t numunits = packetremain / runit; if (ridx + numunits > remotecount) numunits = remotecount - ridx; rdatasz = remotelen; packetremain -= runit*numunits; packetdata += remotelen*numunits; ridx += numunits; gasneti_assert(roffset == 0); if (ridx == remotecount) { done = 1; goto rend; } /* done - this is last packet */ } if (packetremain > metadatasz) { /* trailing partial entry */ gasneti_assert_int(packetremain ,<, runit); if (sharedpacket) rdatasz = packetremain - metadatasz; else rdatasz = packetremain; packetdata += rdatasz; roffset = rdatasz; } rend: /* end remote packet */ if (roffset == 0) remotept[ptidx].lastidx = ridx-1; else remotept[ptidx].lastidx = ridx; remotept[ptidx].lastlen = rdatasz; #if GASNET_DEBUG /* verify packing properties */ gasnete_packetize_verify(remotept, ptidx, done, remotecount, remotelen, 0); { size_t datachk = 0, i; size_t entries = remotept[ptidx].lastidx - remotept[ptidx].firstidx + 1; for (i = remotept[ptidx].firstidx; i <= remotept[ptidx].lastidx; i++) { if (i == remotept[ptidx].lastidx) datachk += remotept[ptidx].lastlen; else if (i == remotept[ptidx].firstidx) datachk += (remotelen - remotept[ptidx].firstoffset); else datachk += remotelen; } gasneti_assert_uint(packetdata ,==, datachk); if (sharedpacket) { gasneti_assert_int((metadatasz*entries + packetdata) ,<=, maxpayload); /* not overfull */ if (!done) gasneti_assert_int((metadatasz*entries + packetdata) ,>=, maxpayload - metadatasz); /* not underfull */ } else { gasneti_assert_int(MAX(metadatasz*entries,packetdata) ,<=, maxpayload); /* not overfull */ if (!done) gasneti_assert_int(MAX(metadatasz*entries,packetdata) ,>=, maxpayload - 2*metadatasz); /* not underfull */ } } #endif ldatasz = 0; if (loffset > 0) { /* initial partial entry */ gasneti_assert_uint(loffset ,<, locallen); ldatasz = locallen - loffset; /* data left in current entry */ packetdata -= ldatasz; if (packetdata < 0) { /* overflowed - this entry spills into next packet */ ldatasz += packetdata; /* compute truncated datasz that fits in this packet */ loffset += ldatasz; /* update offset into current entry */ packetdata = 0; } else { loffset = 0; /* finished an entry */ lidx++; gasneti_assert(lidx < localcount || (lidx == localcount && packetdata == 0)); } } if (packetdata >= locallen) { /* whole entries */ size_t numunits = packetdata / locallen; if (lidx + numunits > localcount) numunits = localcount - lidx; ldatasz = locallen; packetdata -= locallen*numunits; lidx += numunits; gasneti_assert(lidx < localcount || (lidx == localcount && packetdata == 0)); gasneti_assert(loffset == 0); } if (packetdata > 0) { /* trailing partial entry */ gasneti_assert_uint(packetdata ,<, locallen); ldatasz = packetdata; loffset = ldatasz; } /* end local packet */ if (loffset == 0) localpt[ptidx].lastidx = lidx-1; else localpt[ptidx].lastidx = lidx; localpt[ptidx].lastlen = ldatasz; #if GASNET_DEBUG /* verify packing properties */ gasnete_packetize_verify(localpt, ptidx, done, localcount, locallen, 0); #endif if (done) { gasneti_assert(ridx == remotecount && roffset == 0 && lidx == localcount && loffset == 0); *premotept = remotept; *plocalpt = localpt; return ptidx+1; } } } /*---------------------------------------------------------------------------------*/ /* *** Indexed *** */ /*---------------------------------------------------------------------------------*/ /* simple gather put, remotely contiguous */ #ifndef GASNETE_PUTI_GATHER_SELECTOR #if GASNETE_USE_REMOTECONTIG_GATHER_SCATTER gex_Event_t gasnete_puti_gather(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_vis_threaddata_t * const td = GASNETE_VIS_MYTHREAD; size_t const nbytes = dstlen; gasneti_assert(dstcount == 1 && srccount > 1); /* only supports gather put */ gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); // silly to use for local cases gasneti_assert(nbytes > 0); GASNETI_TRACE_EVENT(C, PUTI_GATHER); { gasneti_vis_op_t * const visop = gasnete_visbuf_malloc(sizeof(gasneti_vis_op_t)+nbytes); void * const packedbuf = visop + 1; gasnete_addrlist_pack(srccount, srclist, srclen, packedbuf, 0, (size_t)-1); visop->type = GASNETI_VIS_CAT_PUTI_GATHER; visop->event = gasnete_put_nb(tm, rank, dstlist[0], packedbuf, nbytes, GEX_EVENT_DEFER, 0 GASNETI_THREAD_PASS); gasneti_assert(visop->event != GEX_EVENT_INVALID); GASNETE_PUSH_VISOP_RETURN(td, visop, synctype, 0, (void)0); } } #define GASNETE_PUTI_GATHER_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) \ if (gasnete_vis_use_remotecontig && dstcount == 1 && srccount > 1) \ return gasnete_puti_gather(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_PASS) #else #define GASNETE_PUTI_GATHER_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) ((void)0) #endif #endif /* simple scatter get, remotely contiguous */ #ifndef GASNETE_GETI_SCATTER_SELECTOR #if GASNETE_USE_REMOTECONTIG_GATHER_SCATTER gex_Event_t gasnete_geti_scatter(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_vis_threaddata_t * const td = GASNETE_VIS_MYTHREAD; size_t const nbytes = srclen; gasneti_assert(srccount == 1 && dstcount > 1); /* only supports scatter get */ gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); // silly to use for local cases gasneti_assert(nbytes > 0); GASNETI_TRACE_EVENT(C, GETI_SCATTER); { gasneti_vis_op_t * const visop = gasnete_visbuf_malloc(sizeof(gasneti_vis_op_t)+dstcount*sizeof(void *)+nbytes); void * * const savedlst = (void * *)(visop + 1); void * const packedbuf = (void *)(savedlst + dstcount); GASNETI_MEMCPY(savedlst, dstlist, dstcount*sizeof(void *)); visop->type = GASNETI_VIS_CAT_GETI_SCATTER; visop->count = dstcount; visop->len = dstlen; visop->event = gasnete_get_nb(tm, packedbuf, rank, srclist[0], nbytes, 0 GASNETI_THREAD_PASS); gasneti_assert(visop->event != GEX_EVENT_INVALID); GASNETE_PUSH_VISOP_RETURN(td, visop, synctype, 1, (void)0); } } #define GASNETE_GETI_SCATTER_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) \ if (gasnete_vis_use_remotecontig && srccount == 1 && dstcount > 1) \ return gasnete_geti_scatter(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_PASS) #else #define GASNETE_GETI_SCATTER_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) ((void)0) #endif #endif /*---------------------------------------------------------------------------------*/ /* Pipelined AM gather-scatter put */ #ifndef GASNETE_PUTI_AMPIPELINE_SELECTOR #if GASNETE_USE_AMPIPELINE gex_Event_t gasnete_puti_AMPipeline(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(dstcount > 1); /* supports scatter put */ gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); // silly to use for local cases GASNETI_TRACE_EVENT(C, PUTI_AMPIPELINE); GASNETE_START_NBIREGION(synctype); size_t const maxpacket = gex_AM_MaxRequestMedium(tm,rank, (GASNETE_VIS_NPAM ? NULL : GEX_EVENT_NOW), (GASNETE_VIS_NPAM ? GEX_FLAG_AM_PREPARE_LEAST_ALLOC : 0), HARGS(5,6)); gasnete_packetdesc_t *remotept; gasnete_packetdesc_t *localpt; size_t const packetcnt = gasnete_packetize_addrlist(dstcount, dstlen, srccount, srclen, &remotept, &localpt, maxpacket, 1); gasneti_iop_t *iop = gasneti_iop_register(packetcnt,0 GASNETI_THREAD_PASS); #if GASNETE_VIS_NPAM == 0 void * * const packedbuf = gasnete_visbuf_malloc(maxpacket); #endif for (size_t packetidx = 0; packetidx < packetcnt; packetidx++) { #if GASNETE_VIS_NPAM // NPAM 1 or 2 (currently treated as 1) gex_AM_SrcDesc_t sd = gex_AM_PrepareRequestMedium(tm, rank, NULL, maxpacket, maxpacket, NULL, 0, HARGS(5,6)); gasneti_assert_uint(gex_AM_SrcDescSize(sd) ,>=, maxpacket); void * * const packedbuf = gex_AM_SrcDescAddr(sd); #endif gasnete_packetdesc_t * const rpacket = &remotept[packetidx]; gasnete_packetdesc_t * const lpacket = &localpt[packetidx]; size_t const rnum = rpacket->lastidx - rpacket->firstidx + 1; size_t const lnum = lpacket->lastidx - lpacket->firstidx + 1; /* fill packet with remote metadata */ GASNETI_MEMCPY(packedbuf, &dstlist[rpacket->firstidx], rnum*sizeof(void *)); /* gather data payload from sourcelist into packet */ uint8_t * const end = gasnete_addrlist_pack(lnum, &srclist[lpacket->firstidx], srclen, &packedbuf[rnum], lpacket->firstoffset, lpacket->lastlen); size_t const nbytes = end - (uint8_t *)packedbuf; gasneti_assert_uint(nbytes ,<=, maxpacket); /* send AM(rnum, iop) from packedbuf */ #define ARGS PACK(iop), rnum, dstlen, rpacket->firstoffset, rpacket->lastlen #if GASNETE_VIS_NPAM == 0 gex_AM_RequestMedium(tm, rank, gasneti_handleridx(gasnete_puti_AMPipeline_reqh), packedbuf, nbytes, GEX_EVENT_NOW, 0, ARGS); #else gex_AM_CommitRequestMedium(sd, gasneti_handleridx(gasnete_puti_AMPipeline_reqh), nbytes, ARGS); #endif #undef ARGS } gasneti_free(remotept); gasneti_free(localpt); #if GASNETE_VIS_NPAM == 0 gasneti_free(packedbuf); #endif GASNETE_END_NBIREGION_AND_RETURN(synctype); } #define GASNETE_PUTI_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) \ if (dstcount > 1 && GASNETT_PREDICT_TRUE(dstlen == (uint32_t)(dstlen)) && \ MIN(srclen,dstlen) <= gasnete_vis_put_maxchunk) \ return gasnete_puti_AMPipeline(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_PASS) #else #define GASNETE_PUTI_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) ((void)0) #endif #endif /* ------------------------------------------------------------------------------------ */ #if GASNETE_USE_AMPIPELINE GASNETI_INLINE(gasnete_puti_AMPipeline_reqh_inner) void gasnete_puti_AMPipeline_reqh_inner(gex_Token_t token, void *addr, size_t nbytes, void *iop, gex_AM_Arg_t rnum, gex_AM_Arg_t dstlen, gex_AM_Arg_t firstoffset, gex_AM_Arg_t lastlen) { void * const * const rlist = addr; uint8_t * const data = (uint8_t *)(&rlist[rnum]); uint8_t * const end = gasnete_addrlist_unpack(rnum, rlist, dstlen, data, firstoffset, lastlen); gasneti_assert_uint(end - (uint8_t *)addr ,==, nbytes); /* TODO: coalesce acknowledgements - need a per-rank, per-op seqnum & packetcnt */ gex_AM_ReplyShort(token, gasneti_handleridx(gasnete_putvis_AMPipeline_reph), 0, PACK(iop)); } MEDIUM_HANDLER(gasnete_puti_AMPipeline_reqh,5,6, (token,addr,nbytes, UNPACK(a0), a1,a2,a3,a4), (token,addr,nbytes, UNPACK2(a0, a1), a2,a3,a4,a5)); #endif /* ------------------------------------------------------------------------------------ */ /* Pipelined AM gather-scatter get */ #ifndef GASNETE_GETI_AMPIPELINE_SELECTOR #if GASNETE_USE_AMPIPELINE gex_Event_t gasnete_geti_AMPipeline(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(srccount > 1); /* supports gather get */ gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); // silly to use for local cases GASNETI_TRACE_EVENT(C, GETI_AMPIPELINE); size_t const maxrequest = gex_AM_MaxRequestMedium(tm,rank, (GASNETE_VIS_NPAM ? NULL : GEX_EVENT_NOW), (GASNETE_VIS_NPAM ? GEX_FLAG_AM_PREPARE_LEAST_ALLOC : 0), HARGS(5,6)); size_t const maxreply = gex_AM_MaxReplyMedium (tm,rank, (GASNETE_VIS_NPAM ? NULL : GEX_EVENT_NOW), (GASNETE_VIS_NPAM ? GEX_FLAG_AM_PREPARE_LEAST_ALLOC : 0), HARGS(2,3)); gasneti_vis_op_t * const visop = gasnete_visbuf_malloc(sizeof(gasneti_vis_op_t) + dstcount*sizeof(void *) + (GASNETE_VIS_NPAM ? 0 : maxrequest)); void * * const savedlst = (void * *)(visop + 1); #if GASNETE_VIS_NPAM == 0 void * * const packedbuf = savedlst + dstcount; #endif gasnete_packetdesc_t *remotept; gasnete_packetdesc_t *localpt; size_t const packetcnt = gasnete_packetize_addrlist(srccount, srclen, dstcount, dstlen, &remotept, &localpt, // TODO-EX: Packetization logic should take both into account MIN(maxrequest,maxreply), 0); GASNETE_VISOP_SETUP(visop, synctype, 1); #if GASNET_DEBUG visop->type = GASNETI_VIS_CAT_GETI_AMPIPELINE; visop->count = dstcount; #endif gasneti_assert_uint(packetcnt ,<=, GASNETI_ATOMIC_MAX); gasneti_assert_uint(packetcnt ,==, (gex_AM_Arg_t)packetcnt); visop->len = dstlen; visop->addr = localpt; GASNETI_MEMCPY(savedlst, dstlist, dstcount*sizeof(void *)); gasneti_weakatomic_set(&(visop->packetcnt), packetcnt, GASNETI_ATOMIC_WMB_POST); gasneti_eop_t *eop = visop->eop; /* visop may disappear once the last AM is launched */ for (size_t packetidx = 0; packetidx < packetcnt; packetidx++) { #if GASNETE_VIS_NPAM // NPAM 1 or 2 (currently treated as 1) gex_AM_SrcDesc_t sd = gex_AM_PrepareRequestMedium(tm, rank, NULL, maxrequest, maxrequest, NULL, 0, HARGS(5,6)); gasneti_assert_uint(gex_AM_SrcDescSize(sd) ,>=, maxrequest); void * * const packedbuf = gex_AM_SrcDescAddr(sd); #endif gasnete_packetdesc_t * const rpacket = &remotept[packetidx]; size_t const rnum = rpacket->lastidx - rpacket->firstidx + 1; /* fill packet with remote metadata */ GASNETI_MEMCPY(packedbuf, &srclist[rpacket->firstidx], rnum*sizeof(void *)); /* send AM(visop) from packedbuf */ size_t const nbytes = rnum*sizeof(void *); #define ARGS PACK(visop), packetidx, srclen, rpacket->firstoffset, rpacket->lastlen #if GASNETE_VIS_NPAM == 0 gex_AM_RequestMedium(tm, rank, gasneti_handleridx(gasnete_geti_AMPipeline_reqh), packedbuf, nbytes, GEX_EVENT_NOW, 0, ARGS); #else gex_AM_CommitRequestMedium(sd, gasneti_handleridx(gasnete_geti_AMPipeline_reqh), nbytes, ARGS); #endif #undef ARGS } gasneti_free(remotept); GASNETE_VISOP_RETURN_VOLATILE(eop, synctype); } #define GASNETE_GETI_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) \ if (srccount > 1 && MIN(srclen,dstlen) <= gasnete_vis_get_maxchunk) \ return gasnete_geti_AMPipeline(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_PASS) #else #define GASNETE_GETI_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) ((void)0) #endif #endif /* ------------------------------------------------------------------------------------ */ #if GASNETE_USE_AMPIPELINE GASNETI_INLINE(gasnete_geti_AMPipeline_reqh_inner) void gasnete_geti_AMPipeline_reqh_inner(gex_Token_t token, void *addr, size_t nbytes, void *_visop, gex_AM_Arg_t packetidx, gex_AM_Arg_t dstlen, gex_AM_Arg_t firstoffset, gex_AM_Arg_t lastlen) { void * const * const rlist = addr; size_t const rnum = nbytes / sizeof(void *); gasneti_assert_uint(nbytes ,==, rnum * sizeof(void *)); size_t const maxreply = gex_Token_MaxReplyMedium(token, (GASNETE_VIS_NPAM ? NULL : GEX_EVENT_NOW), (GASNETE_VIS_NPAM ? GEX_FLAG_AM_PREPARE_LEAST_ALLOC : 0), HARGS(2,3)); #if GASNETE_VIS_NPAM == 0 uint8_t * const packedbuf = gasnete_visbuf_malloc(maxreply); #else // NPAM 1 or 2 gex_AM_SrcDesc_t sd = gex_AM_PrepareReplyMedium(token, NULL, maxreply, maxreply, NULL, 0, HARGS(2,3)); gasneti_assert_uint(gex_AM_SrcDescSize(sd) ,>=, maxreply); uint8_t * const packedbuf = gex_AM_SrcDescAddr(sd); #endif /* gather data payload from sourcelist into packet */ uint8_t * const end = gasnete_addrlist_pack(rnum, rlist, dstlen, packedbuf, firstoffset, lastlen); size_t const replysz = end - packedbuf; gasneti_assert_uint(replysz ,<=, maxreply); // send packet #define ARGS PACK(_visop), packetidx #if GASNETE_VIS_NPAM == 0 gex_AM_ReplyMedium(token, gasneti_handleridx(gasnete_geti_AMPipeline_reph), packedbuf, replysz, GEX_EVENT_NOW, 0, ARGS); gasneti_free(packedbuf); #else gex_AM_CommitReplyMedium(sd, gasneti_handleridx(gasnete_geti_AMPipeline_reph), replysz, ARGS); #endif #undef ARGS } MEDIUM_HANDLER(gasnete_geti_AMPipeline_reqh,5,6, (token,addr,nbytes, UNPACK(a0), a1,a2,a3,a4), (token,addr,nbytes, UNPACK2(a0, a1), a2,a3,a4,a5)); /* ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasnete_geti_AMPipeline_reph_inner) void gasnete_geti_AMPipeline_reph_inner(gex_Token_t token, void *addr, size_t nbytes, void *_visop, gex_AM_Arg_t packetidx) { gasneti_vis_op_t * const visop = _visop; void * const * const savedlst = (void * *)(visop + 1); gasnete_packetdesc_t * const lpacket = ((gasnete_packetdesc_t *)visop->addr) + packetidx; size_t const lnum = lpacket->lastidx - lpacket->firstidx + 1; gasneti_assert_uint(visop->type ,==, GASNETI_VIS_CAT_GETI_AMPIPELINE); gasneti_assert_uint(lpacket->lastidx ,<, visop->count); uint8_t * const end = gasnete_addrlist_unpack(lnum, savedlst+lpacket->firstidx, visop->len, addr, lpacket->firstoffset, lpacket->lastlen); gasneti_assert_uint(end - (uint8_t *)addr ,==, nbytes); if (gasneti_weakatomic_decrement_and_test(&(visop->packetcnt), GASNETI_ATOMIC_WMB_PRE|GASNETI_ATOMIC_WEAK_FENCE)) { /* last response packet completes operation and cleans up */ GASNETE_VISOP_SIGNAL(visop, 1); gasneti_free(visop->addr); /* free localpt */ gasneti_free(visop); /* free visop, savedlst and send buffer */ } } MEDIUM_HANDLER(gasnete_geti_AMPipeline_reph,2,3, (token,addr,nbytes, UNPACK(a0), a1), (token,addr,nbytes, UNPACK2(a0, a1), a2)); #endif /*---------------------------------------------------------------------------------*/ // GASNETE_INDEXED_HELPER iterates over 2-sided indexed metadata in order and invokes // the provided macro action(p1,p2,len) on each contiguous matching chunk of the sequences #define GASNETE_INDEXED_HELPER(count1, list1, len1, count2, list2, len2, action) do { \ size_t const _count1 = (count1); void * const * const _list1 = (list1); size_t const _len1 = (len1); \ size_t const _count2 = (count2); void * const * const _list2 = (list2); size_t const _len2 = (len2); \ if (_len1 == _len2) { /* matched sizes (fast case) */ \ gasneti_assert_uint(_count1 ,==, _count2); \ for (size_t _i = 0; _i < _count1; _i++) { \ void * const _p1 = _list1[_i]; void * const _p2 = _list2[_i]; \ action(_p1, _p2, _len1); \ } \ } else if (_count1 == 1) { /* 1 is contiguous buffer */ \ uintptr_t _pp1 = (uintptr_t)_list1[0]; \ for (size_t _i = 0; _i < _count2; _i++) { \ void * const _p1 = (void *)_pp1; \ void * const _p2 = _list2[_i]; \ action(_p1, _p2, _len2); \ _pp1 += _len2; \ } \ gasneti_assert_uint(_pp1 ,==, (uintptr_t)_list1[0]+_len1); \ } else if (_count2 == 1) { /* 2 is contiguous buffer */ \ uintptr_t _pp2 = (uintptr_t)_list2[0]; \ for (size_t _i = 0; _i < _count1; _i++) { \ void * const _p1 = _list1[_i]; \ void * const _p2 = (void *)_pp2; \ action(_p1, _p2, _len1); \ _pp2 += _len1; \ } \ gasneti_assert_uint(_pp2 ,==, (uintptr_t)_list2[0]+_len2); \ } else { /* mismatched sizes (general case) */ \ size_t _idx1 = 0; size_t _idx2 = 0; \ size_t _off1 = 0; size_t _off2 = 0; \ while (_idx1 < _count1) { \ gasneti_assert_uint(_idx2 ,<, _count2); \ size_t const _rem1 = _len1 - _off1; \ size_t const _rem2 = _len2 - _off2; \ gasneti_assert(_rem1 > 0); gasneti_assert(_rem2 > 0); \ void * const _p1 = (uint8_t*)(_list1[_idx1]) + _off1; \ void * const _p2 = (uint8_t*)(_list2[_idx2]) + _off2; \ if (_rem1 < _rem2) { \ action(_p1, _p2, _rem1); \ _idx1++; \ _off1 = 0; \ _off2 += _rem1; \ } else if (_rem2 < _rem1) { \ action(_p1, _p2, _rem2); \ _idx2++; \ _off2 = 0; \ _off1 += _rem2; \ } else { gasneti_assert_uint(_rem1 ,==, _rem2); \ action(_p1, _p2, _rem1); \ _idx1++; _idx2++; \ _off1 = 0; _off2 = 0; \ } \ } \ gasneti_assert_uint(_idx1 ,==, _count1); \ gasneti_assert_uint(_idx2 ,==, _count2); \ gasneti_assert(_off1 == 0 && _off2 == 0); \ } \ } while (0) /*---------------------------------------------------------------------------------*/ GASNETI_INLINE(gasnete_indexed_memcpy) void gasnete_indexed_memcpy(gex_TM_t const tm, gex_Rank_t const rank, int isput, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags) { gasneti_assert(GASNETI_NBRHD_MAPPED(tm,rank)); // TODO-EX: this assumes all addresses in the peer list reside in the same segment // and hoists the address translation. Multi-segment will need to push this down. gasneti_assert(!(flags & (GEX_FLAG_PEER_SEG_SOME|GEX_FLAG_PEER_SEG_UNKNOWN))); if (isput) { uint8_t *refptr = GASNETI_NBRHD_MAPPED_ADDR(tm,rank,dstlist[0]); ptrdiff_t const offset = refptr - (uint8_t*)dstlist[0]; #define ACTION(p1,p2,len) GASNETI_MEMCPY((uint8_t*)p1+offset,p2,len) GASNETE_INDEXED_HELPER(dstcount, dstlist, dstlen, srccount, srclist, srclen, ACTION); #undef ACTION } else { uint8_t *refptr = GASNETI_NBRHD_MAPPED_ADDR(tm,rank,srclist[0]); ptrdiff_t const offset = refptr - (uint8_t*)srclist[0]; #define ACTION(p1,p2,len) GASNETI_MEMCPY(p1,(uint8_t*)p2+offset,len) GASNETE_INDEXED_HELPER(dstcount, dstlist, dstlen, srccount, srclist, srclen, ACTION); #undef ACTION } } /*---------------------------------------------------------------------------------*/ /* reference version that uses individual puts */ gex_Event_t gasnete_puti_ref_indiv(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, PUTI_REF_INDIV); gasneti_assert(srccount > 0); gasneti_assert(dstcount > 0); gasneti_assert(srclen > 0); gasneti_assert(dstlen > 0); gasneti_assert_uint(((uintptr_t)dstcount)*dstlen ,==, ((uintptr_t)srccount)*srclen); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); gex_Event_t * const lc_opt = (flags & GEX_FLAG_ENABLE_LEAF_LC) ? GEX_EVENT_GROUP : GEX_EVENT_DEFER; GASNETE_START_NBIREGION(synctype); #define ACTION(p1,p2,len) GASNETE_PUT_INDIV(tm, rank, p1, p2, len, lc_opt) GASNETE_INDEXED_HELPER(dstcount, dstlist, dstlen, srccount, srclist, srclen, ACTION); #undef ACTION GASNETE_END_NBIREGION_AND_RETURN(synctype); } /* reference version that uses individual gets */ gex_Event_t gasnete_geti_ref_indiv(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, GETI_REF_INDIV); gasneti_assert(srccount > 0); gasneti_assert(dstcount > 0); gasneti_assert(srclen > 0); gasneti_assert(dstlen > 0); gasneti_assert_uint(((uintptr_t)dstcount)*dstlen ,==, ((uintptr_t)srccount)*srclen); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); GASNETE_START_NBIREGION(synctype); #define ACTION(p1,p2,len) GASNETE_GET_INDIV(tm, rank, p1, p2, len) GASNETE_INDEXED_HELPER(dstcount, dstlist, dstlen, srccount, srclist, srclen, ACTION); #undef ACTION GASNETE_END_NBIREGION_AND_RETURN(synctype); } /*---------------------------------------------------------------------------------*/ GASNETI_INLINE(gasnete_convert_indexed_to_memvec) void *gasnete_convert_indexed_to_memvec(gex_Memvec_t **pvec1, gex_Memvec_t **pvec2, size_t count1, void * const list1[], size_t len1, size_t count2, void * const list2[], size_t len2) { void * const mem = gasnete_visbuf_malloc(sizeof(gex_Memvec_t)*(count1 + count2)); gex_Memvec_t * const vec1 = mem; gex_Memvec_t * const vec2 = vec1 + count1; for (size_t i=0; i < count1; i++) { vec1[i].gex_addr = list1[i]; vec1[i].gex_len = len1; } for (size_t i=0; i < count2; i++) { vec2[i].gex_addr = list2[i]; vec2[i].gex_len = len2; } *pvec1 = vec1; *pvec2 = vec2; return mem; } /* reference version that uses vector interface */ gex_Event_t gasnete_puti_ref_vector(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, PUTI_REF_VECTOR); gasneti_assert(GASNETE_PUTV_ALLOWS_VOLATILE_METADATA); gex_Memvec_t *dstvec; gex_Memvec_t *srcvec; void *mem = gasnete_convert_indexed_to_memvec(&dstvec, &srcvec, dstcount, dstlist, dstlen, srccount, srclist, srclen); gex_Event_t retval = gasnete_putv(synctype,tm,rank,dstcount,dstvec,srccount,srcvec,flags GASNETI_THREAD_PASS); gasneti_free(mem); return retval; } /* reference version that uses vector interface */ gex_Event_t gasnete_geti_ref_vector(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, GETI_REF_VECTOR); gasneti_assert(GASNETE_GETV_ALLOWS_VOLATILE_METADATA); gex_Memvec_t *dstvec; gex_Memvec_t *srcvec; void *mem = gasnete_convert_indexed_to_memvec(&dstvec, &srcvec, dstcount, dstlist, dstlen, srccount, srclist, srclen); gex_Event_t retval = gasnete_getv(synctype,tm,dstcount,dstvec,rank,srccount,srcvec,flags GASNETI_THREAD_PASS); gasneti_free(mem); return retval; } /*---------------------------------------------------------------------------------*/ /* top-level gasnet_puti_* entry point */ #ifndef GASNETE_PUTI_OVERRIDE extern gex_Event_t gasnete_puti(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(gasnete_vis_isinit); gasneti_assert(dstcount*dstlen > 0); gasneti_assert(srccount*srclen > 0); gasneti_assert(dstcount > 1 || srccount > 1); gasneti_assert_uint(((uintptr_t)dstcount)*dstlen ,==, ((uintptr_t)srccount)*srclen); gasneti_assert(dstlist); gasneti_assert(srclist); flags &= ~GEX_FLAG_IMMEDIATE; // TODO-EX if (GASNETI_NBRHD_MAPPED(tm,rank)) { // purely local GASNETI_TRACE_EVENT(C, PUTI_NBRHD); gasnete_indexed_memcpy(tm,rank,1, dstcount,dstlist,dstlen,srccount,srclist,srclen, flags); return GEX_EVENT_INVALID; } /* select algorithm */ #ifndef GASNETE_PUTI_SELECTOR #if GASNETE_RANDOM_SELECTOR #define GASNETE_PUTI_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) do { \ switch (rand() % 4) { \ case 0: \ GASNETE_PUTI_GATHER_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags); \ case 1: \ GASNETE_PUTI_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags); \ case 2: \ return gasnete_puti_ref_indiv(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_PASS); \ case 3: \ return gasnete_puti_ref_vector(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_PASS); \ default: gasneti_unreachable(); \ } } while (0) #else #define GASNETE_PUTI_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) \ GASNETE_PUTI_GATHER_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags); \ GASNETE_PUTI_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags); \ return gasnete_puti_ref_indiv(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_PASS) #endif #endif GASNETE_PUTI_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags); gasneti_fatalerror("failure in GASNETE_PUTI_SELECTOR - should never reach here"); return GEX_EVENT_INVALID; /* avoid warning on MIPSPro */ } #endif /* top-level gasnet_geti_* entry point */ #ifndef GASNETE_GETI_OVERRIDE extern gex_Event_t gasnete_geti(gasnete_synctype_t synctype, gex_TM_t const tm, size_t dstcount, void * const dstlist[], size_t dstlen, gex_Rank_t const rank, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(gasnete_vis_isinit); gasneti_assert(dstcount*dstlen > 0); gasneti_assert(srccount*srclen > 0); gasneti_assert(dstcount > 1 || srccount > 1); gasneti_assert_uint(((uintptr_t)dstcount)*dstlen ,==, ((uintptr_t)srccount)*srclen); gasneti_assert(dstlist); gasneti_assert(srclist); flags &= ~GEX_FLAG_IMMEDIATE; // TODO-EX if (GASNETI_NBRHD_MAPPED(tm,rank)) { // purely local GASNETI_TRACE_EVENT(C, GETI_NBRHD); gasnete_indexed_memcpy(tm,rank,0, dstcount,dstlist,dstlen,srccount,srclist,srclen, flags); return GEX_EVENT_INVALID; } /* select algorithm */ #ifndef GASNETE_GETI_SELECTOR #if GASNETE_RANDOM_SELECTOR #define GASNETE_GETI_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) do { \ switch (rand() % 4) { \ case 0: \ GASNETE_GETI_SCATTER_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags); \ case 1: \ GASNETE_GETI_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags); \ case 2: \ return gasnete_geti_ref_indiv(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_PASS); \ case 3: \ return gasnete_geti_ref_vector(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_PASS); \ default: gasneti_unreachable(); \ } } while (0) #else #define GASNETE_GETI_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags) \ GASNETE_GETI_SCATTER_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags); \ GASNETE_GETI_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags); \ return gasnete_geti_ref_indiv(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags GASNETI_THREAD_PASS) #endif #endif GASNETE_GETI_SELECTOR(synctype,tm,rank,dstcount,dstlist,dstlen,srccount,srclist,srclen,flags); gasneti_fatalerror("failure in GASNETE_GETI_SELECTOR - should never reach here"); return GEX_EVENT_INVALID; /* avoid warning on MIPSPro */ } #endif gasnet-2025.8.0/extended-ref/vis/gasnet_vis_fwd.h0000664000175000017500000000612015142313673021747 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/vis/gasnet_vis_fwd.h $ * Description: GASNet Non-contiguous Access Header (forward decls) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_VIS_FWD_H #define _GASNET_VIS_FWD_H extern void gasnete_vis_init(void); extern void gasneti_vis_progressfn(void); #define GASNETI_VIS_PROGRESSFNS(FN) \ FN(gasneti_pf_vis, COUNTED, gasneti_vis_progressfn) /* conduits may replace the following types, but they should at least include all the following fields */ #ifndef GASNETI_MEMVECLIST_STATS_T typedef struct { size_t _minsz; size_t _maxsz; uintptr_t _totalsz; void *_minaddr; void *_maxaddr; } gasneti_memveclist_stats_t; #endif #ifndef GASNETI_ADDRLIST_STATS_T typedef struct { void *_minaddr; void *_maxaddr; } gasneti_addrlist_stats_t; #endif typedef struct { const void * _srcaddr; size_t _nbytes; uint8_t _handler; } gasnete_vis_pcinfo_t; /* stats needed by the VIS reference implementation */ #ifndef GASNETI_VIS_STATS #define GASNETI_VIS_STATS(CNT,VAL,TIME) \ \ CNT(C, PUTV_GATHER, cnt) \ CNT(C, GETV_SCATTER, cnt) \ CNT(C, PUTV_AMPIPELINE, cnt) \ CNT(C, GETV_AMPIPELINE, cnt) \ CNT(C, PUTV_REF_INDIV, cnt) \ CNT(C, GETV_REF_INDIV, cnt) \ CNT(C, PUTV_DEGENERATE, cnt) \ CNT(C, GETV_DEGENERATE, cnt) \ CNT(C, PUTV_NBRHD, cnt) \ CNT(C, GETV_NBRHD, cnt) \ \ CNT(C, PUTI_GATHER, cnt) \ CNT(C, GETI_SCATTER, cnt) \ CNT(C, PUTI_AMPIPELINE, cnt) \ CNT(C, GETI_AMPIPELINE, cnt) \ CNT(C, PUTI_REF_INDIV, cnt) \ CNT(C, GETI_REF_INDIV, cnt) \ CNT(C, PUTI_REF_VECTOR, cnt) \ CNT(C, GETI_REF_VECTOR, cnt) \ CNT(C, PUTI_DEGENERATE, cnt) \ CNT(C, GETI_DEGENERATE, cnt) \ CNT(C, PUTI_NBRHD, cnt) \ CNT(C, GETI_NBRHD, cnt) \ \ CNT(C, PUTS_GATHER, cnt) \ CNT(C, GETS_SCATTER, cnt) \ CNT(C, PUTS_AMPIPELINE, cnt) \ CNT(C, GETS_AMPIPELINE, cnt) \ CNT(C, PUTS_REF_INDIV, cnt) \ CNT(C, GETS_REF_INDIV, cnt) \ CNT(C, PUTS_REF_VECTOR, cnt) \ CNT(C, GETS_REF_VECTOR, cnt) \ CNT(C, PUTS_REF_INDEXED, cnt) \ CNT(C, GETS_REF_INDEXED, cnt) \ CNT(C, PUTS_DEGENERATE, cnt) \ CNT(C, GETS_DEGENERATE, cnt) \ CNT(C, PUTS_NBRHD, cnt) \ CNT(C, GETS_NBRHD, cnt) \ #endif #endif gasnet-2025.8.0/extended-ref/vis/gasnet_refvis.h0000664000175000017500000001522615142313673021613 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/vis/gasnet_refvis.h $ * Description: GASNet Vector, Indexed & Strided conduit header * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_REFVIS_H #define _GASNET_REFVIS_H /*---------------------------------------------------------------------------------*/ /* *** Parameters *** */ /*---------------------------------------------------------------------------------*/ /* following is non-zero iff it's safe to destroy the metadata input arrays immediately after initiating each function */ #ifndef GASNETE_PUTV_ALLOWS_VOLATILE_METADATA #define GASNETE_PUTV_ALLOWS_VOLATILE_METADATA 1 #endif #ifndef GASNETE_GETV_ALLOWS_VOLATILE_METADATA #define GASNETE_GETV_ALLOWS_VOLATILE_METADATA 1 #endif #ifndef GASNETE_PUTI_ALLOWS_VOLATILE_METADATA #define GASNETE_PUTI_ALLOWS_VOLATILE_METADATA 1 #endif #ifndef GASNETE_GETI_ALLOWS_VOLATILE_METADATA #define GASNETE_GETI_ALLOWS_VOLATILE_METADATA 1 #endif #ifndef GASNETE_PUTS_ALLOWS_VOLATILE_METADATA #define GASNETE_PUTS_ALLOWS_VOLATILE_METADATA 1 #endif #ifndef GASNETE_GETS_ALLOWS_VOLATILE_METADATA #define GASNETE_GETS_ALLOWS_VOLATILE_METADATA 1 #endif /* GASNETE_LOOPING_DIMS: first level of strided performance: number of non-trivial striding dimensions to support using an N deep loop nest */ #ifndef GASNETE_LOOPING_DIMS #define GASNETE_LOOPING_DIMS 8 #endif /* GASNETE_DIRECT_DIMS: second level of strided performance: number of non-trivial striding dimensions to support using statically allocated metadata (only affects the operation of requests with non-trivial dimensions > GASNETE_LOOPING_DIMS) */ #ifndef GASNETE_DIRECT_DIMS #define GASNETE_DIRECT_DIMS 15 #endif /* GASNETE_RANDOM_SELECTOR: use random VIS algorithm selection (mostly useful for correctness debugging) */ #ifndef GASNETE_RANDOM_SELECTOR #define GASNETE_RANDOM_SELECTOR 0 #endif #ifndef GASNETE_USE_REMOTECONTIG_GATHER_SCATTER // whether or not to compile in this alg #define GASNETE_USE_REMOTECONTIG_GATHER_SCATTER 1 #endif #ifndef GASNETE_USE_REMOTECONTIG_GATHER_SCATTER_DEFAULT // runtime alg enable default #define GASNETE_USE_REMOTECONTIG_GATHER_SCATTER_DEFAULT 1 #endif #ifndef GASNETE_USE_AMPIPELINE // whether or not to compile in this alg #define GASNETE_USE_AMPIPELINE 1 #endif #ifndef GASNETE_USE_AMPIPELINE_DEFAULT // runtime alg enable default #define GASNETE_USE_AMPIPELINE_DEFAULT 1 #endif /*---------------------------------------------------------------------------------*/ /* *** Handlers *** */ /*---------------------------------------------------------------------------------*/ /* conduits may override this to relocate the ref-vis handlers */ #ifndef GASNETE_VIS_HANDLER_BASE #define GASNETE_VIS_HANDLER_BASE 100 #endif #define _hidx_gasnete_putv_AMPipeline_reqh (GASNETE_VIS_HANDLER_BASE+0) #define _hidx_gasnete_putvis_AMPipeline_reph (GASNETE_VIS_HANDLER_BASE+1) #define _hidx_gasnete_getv_AMPipeline_reqh (GASNETE_VIS_HANDLER_BASE+2) #define _hidx_gasnete_getv_AMPipeline_reph (GASNETE_VIS_HANDLER_BASE+3) #define _hidx_gasnete_puti_AMPipeline_reqh (GASNETE_VIS_HANDLER_BASE+4) #define _hidx_gasnete_geti_AMPipeline_reqh (GASNETE_VIS_HANDLER_BASE+5) #define _hidx_gasnete_geti_AMPipeline_reph (GASNETE_VIS_HANDLER_BASE+6) #define _hidx_gasnete_puts_AMPipeline_reqh (GASNETE_VIS_HANDLER_BASE+7) #define _hidx_gasnete_puts_AMPipeline1_reqh (GASNETE_VIS_HANDLER_BASE+8) #define _hidx_gasnete_puts_AMPipeline1_reph (GASNETE_VIS_HANDLER_BASE+9) #define _hidx_gasnete_gets_AMPipeline_reqh (GASNETE_VIS_HANDLER_BASE+10) #define _hidx_gasnete_gets_AMPipeline_reph (GASNETE_VIS_HANDLER_BASE+11) #define _hidx_gasnete_vis_pcthunk_reqh (GASNETE_VIS_HANDLER_BASE+12) /*---------------------------------------------------------------------------------*/ #if GASNETE_USE_AMPIPELINE MEDIUM_HANDLER_DECL(gasnete_putv_AMPipeline_reqh,1,2); SHORT_HANDLER_DECL(gasnete_putvis_AMPipeline_reph,1,2); MEDIUM_HANDLER_DECL(gasnete_getv_AMPipeline_reqh,3,4); MEDIUM_HANDLER_DECL(gasnete_getv_AMPipeline_reph,3,4); MEDIUM_HANDLER_DECL(gasnete_puti_AMPipeline_reqh,5,6); MEDIUM_HANDLER_DECL(gasnete_geti_AMPipeline_reqh,5,6); MEDIUM_HANDLER_DECL(gasnete_geti_AMPipeline_reph,2,3); #if GASNETE_PUTS_AMPIPELINE || !defined(GASNETE_PUTS_AMPIPELINE) MEDIUM_HANDLER_DECL(gasnete_puts_AMPipeline_reqh,5,7); MEDIUM_HANDLER_DECL(gasnete_puts_AMPipeline1_reqh,4,6); SHORT_HANDLER_DECL(gasnete_puts_AMPipeline1_reph,1,2); #define GASNETE_PUTS_AMPIPELINE_HANDLERS() \ gasneti_handler_tableentry_with_bits(gasnete_puts_AMPipeline_reqh,5,7,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_with_bits(gasnete_puts_AMPipeline1_reqh,4,6,REQUEST,MEDIUM,0),\ gasneti_handler_tableentry_with_bits(gasnete_puts_AMPipeline1_reph,1,2,REPLY,SHORT,0), #else #define GASNETE_PUTS_AMPIPELINE_HANDLERS() #endif #if GASNETE_GETS_AMPIPELINE || !defined(GASNETE_GETS_AMPIPELINE) MEDIUM_HANDLER_DECL(gasnete_gets_AMPipeline_reqh,6,9); MEDIUM_HANDLER_DECL(gasnete_gets_AMPipeline_reph,2,3); #define GASNETE_GETS_AMPIPELINE_HANDLERS() \ gasneti_handler_tableentry_with_bits(gasnete_gets_AMPipeline_reqh,6,9,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_with_bits(gasnete_gets_AMPipeline_reph,2,3,REPLY,MEDIUM,0), #else #define GASNETE_GETS_AMPIPELINE_HANDLERS() #endif #define GASNETE_STRIDED_HANDLERS() \ GASNETE_PUTS_AMPIPELINE_HANDLERS() \ GASNETE_GETS_AMPIPELINE_HANDLERS() #define GASNETE_VIS_AMPIPELINE_HANDLERS() \ gasneti_handler_tableentry_with_bits(gasnete_putv_AMPipeline_reqh,1,2,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_with_bits(gasnete_putvis_AMPipeline_reph,1,2,REPLY,SHORT,0), \ gasneti_handler_tableentry_with_bits(gasnete_getv_AMPipeline_reqh,3,4,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_with_bits(gasnete_getv_AMPipeline_reph,3,4,REPLY,MEDIUM,0), \ gasneti_handler_tableentry_with_bits(gasnete_puti_AMPipeline_reqh,5,6,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_with_bits(gasnete_geti_AMPipeline_reqh,5,6,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_with_bits(gasnete_geti_AMPipeline_reph,2,3,REPLY,MEDIUM,0), \ GASNETE_STRIDED_HANDLERS() #else #define GASNETE_VIS_AMPIPELINE_HANDLERS() #endif MEDIUM_HANDLER_DECL(gasnete_vis_pcthunk_reqh,1,1); #define GASNETE_REFVIS_HANDLERS() \ gasneti_handler_tableentry_with_bits(gasnete_vis_pcthunk_reqh,1,1,REQUEST,MEDIUM,0), \ GASNETE_VIS_AMPIPELINE_HANDLERS() /*---------------------------------------------------------------------------------*/ #endif gasnet-2025.8.0/extended-ref/vis/gasnet_vector.c0000664000175000017500000014566115142313673021621 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/vis/gasnet_vector.c $ * Description: GASNet Vector implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef GASNETI_GASNET_REFVIS_C #error This file not meant to be compiled directly - included by gasnet_refvis.c #endif #include "gasnet_vlide.h" #ifndef GASNETI_VIS_VLIDE #define GASNETI_VIS_VLIDE 1 #endif #if GASNETI_VIS_VLIDE #define GASNETI_VIS_VLIDE_ENCODE GASNETI_VLIDE_ENCODE #define GASNETI_VIS_VLIDE_DECODE GASNETI_VLIDE_DECODE #else #define GASNETI_VIS_VLIDE_ENCODE GASNETI_VLIDE_ENCODE_TRIVIAL #define GASNETI_VIS_VLIDE_DECODE GASNETI_VLIDE_DECODE_TRIVIAL #endif // whether Vector AMPipeline should respect MAXCHUNK and fall-back to RMA of individual chunks // enabled for conduits with native RMA, disabled for amref conduits #ifndef GASNETI_VECTOR_USE_RMA #define GASNETI_VECTOR_USE_RMA (!GASNETE_USING_REF_EXTENDED_GET && !GASNETE_USING_REF_EXTENDED_PUT) #endif typedef uint16_t shortlen_t; #define SHORTLEN_MAX ((shortlen_t)-1) /*---------------------------------------------------------------------------------*/ /* packing/unpacking helpers */ #define _GASNETE_MEMVEC_PACK(copy,noempty) { \ uint8_t *ploc = (uint8_t *)buf; \ gasneti_assert(count > 0 && list && buf); \ if (last_len == (size_t)-1) last_len = list[count-1].gex_len; \ if (count == 1) { \ gasneti_assert(last_len > 0); /* never pack an empty */ \ copy(ploc, ((uint8_t*)list[0].gex_addr)+first_offset, last_len); \ ploc += last_len; \ } else { \ size_t const firstlen = list[0].gex_len - first_offset; \ if_pt (noempty || firstlen) { \ gasneti_assert(firstlen); \ copy(ploc, ((uint8_t*)list[0].gex_addr)+first_offset, firstlen); \ ploc += firstlen; \ } else gasneti_assert(first_offset == 0 && list[0].gex_len == 0); \ for (size_t i = 1; i < count-1; i++) { \ size_t const len = list[i].gex_len; \ if_pt (noempty || len) { \ gasneti_assert(len); \ copy(ploc, list[i].gex_addr, len); \ ploc += len; \ } \ } \ if_pt (noempty || last_len) { \ gasneti_assert(last_len > 0); \ copy(ploc, list[count-1].gex_addr, last_len); \ ploc += last_len; \ } \ } \ return ploc; \ } /* pack a memvec list into a contiguous buffer, using the provided byte offset into the first memvec if last_len is (size_t)-1, then last_len is ignored otherwise, last_len is used in place of the last memvec length (and is never adjusted based on first_offset, even if count == 1) return a pointer into the packed buffer, which points just after the last byte used The aggregate list must specify a non-empty set of data, but indivdual iovecs are permitted to be empty */ void *gasnete_memvec_pack(size_t count, gex_Memvec_t const *list, void *buf, size_t first_offset, size_t last_len) _GASNETE_MEMVEC_PACK(_GASNETE_PACK_HELPER,0) void *gasnete_memvec_unpack(size_t count, gex_Memvec_t const *list, void const *buf, size_t first_offset, size_t last_len) _GASNETE_MEMVEC_PACK(_GASNETE_UNPACK_HELPER,0) // these versions additionally require that all the iovecs be non-empty void *gasnete_memvec_pack_noempty(size_t count, gex_Memvec_t const *list, void *buf, size_t first_offset, size_t last_len) _GASNETE_MEMVEC_PACK(_GASNETE_PACK_HELPER,1) void *gasnete_memvec_unpack_noempty(size_t count, gex_Memvec_t const *list, void const *buf, size_t first_offset, size_t last_len) _GASNETE_MEMVEC_PACK(_GASNETE_UNPACK_HELPER,1) /*---------------------------------------------------------------------------------*/ extern void gasnete_packetize_verify(gasnete_packetdesc_t *pt, size_t ptidx, int lastpacket, size_t count, size_t len, gex_Memvec_t const *list) { size_t firstidx = pt[ptidx].firstidx; size_t firstoffset = pt[ptidx].firstoffset; size_t lastidx = pt[ptidx].lastidx; size_t lastlen = pt[ptidx].lastlen; gasneti_assert_uint(firstidx ,<=, lastidx); gasneti_assert_uint(lastidx ,<, count); if (ptidx == 0) gasneti_assert(firstidx == 0 && firstoffset == 0); /* first packet */ else if (firstidx == lastidx && lastlen == 0) ; /* empty local packet */ else if (firstidx == pt[ptidx-1].lastidx) { /* continued from last packet */ gasneti_assert(firstoffset > 0); gasneti_assert_uint(firstoffset ,<, (list?list[firstidx].gex_len:len)); if (pt[ptidx-1].lastidx == pt[ptidx-1].firstidx) gasneti_assert_uint(firstoffset ,==, pt[ptidx-1].lastlen+pt[ptidx-1].firstoffset); else gasneti_assert(firstoffset == pt[ptidx-1].lastlen); } else { /* packet starts a new entry */ gasneti_assert_uint(firstidx ,==, pt[ptidx-1].lastidx + 1); gasneti_assert(firstoffset == 0); if (pt[ptidx-1].lastidx == pt[ptidx-1].firstidx) gasneti_assert_uint(pt[ptidx-1].lastlen ,==, (list?list[firstidx-1].gex_len:len)-pt[ptidx-1].firstoffset); else gasneti_assert_uint(pt[ptidx-1].lastlen ,==, (list?list[firstidx-1].gex_len:len)); } if (lastpacket) { if (lastidx == firstidx) { if (lastlen == 0) ; /* empty local packet */ else gasneti_assert_uint(lastlen ,==, (list?list[lastidx].gex_len:len)-firstoffset); } else gasneti_assert_uint(lastlen ,==, (list?list[lastidx].gex_len:len)); } } /*---------------------------------------------------------------------------------*/ /* *** Vector *** */ /*---------------------------------------------------------------------------------*/ /* simple gather put, remotely contiguous */ #ifndef GASNETE_PUTV_GATHER_SELECTOR #if GASNETE_USE_REMOTECONTIG_GATHER_SCATTER gex_Event_t gasnete_putv_gather(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, gex_Memvec_t const dstlist[], size_t srccount, gex_Memvec_t const srclist[], gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_vis_threaddata_t * const td = GASNETE_VIS_MYTHREAD; size_t const nbytes = dstlist[0].gex_len; gasneti_assert(dstcount == 1 && srccount > 1); /* only supports gather put */ gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); // silly to use for local cases if_pf (nbytes == 0) return GEX_EVENT_INVALID; /* event empty */ GASNETI_TRACE_EVENT(C, PUTV_GATHER); { gasneti_vis_op_t * const visop = gasnete_visbuf_malloc(sizeof(gasneti_vis_op_t)+nbytes); void * const packedbuf = visop + 1; gasnete_memvec_pack(srccount, srclist, packedbuf, 0, (size_t)-1); visop->type = GASNETI_VIS_CAT_PUTV_GATHER; visop->event = gasnete_put_nb(tm, rank, dstlist[0].gex_addr, packedbuf, nbytes, GEX_EVENT_DEFER, 0 GASNETI_THREAD_PASS); gasneti_assert(visop->event != GEX_EVENT_INVALID); GASNETE_PUSH_VISOP_RETURN(td, visop, synctype, 0, (void)0); } } #define GASNETE_PUTV_GATHER_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags) \ if (gasnete_vis_use_remotecontig && dstcount == 1 && srccount > 1) \ return gasnete_putv_gather(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags GASNETI_THREAD_PASS) #else #define GASNETE_PUTV_GATHER_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags) ((void)0) #endif #endif /* simple scatter get, remotely contiguous */ #ifndef GASNETE_GETV_SCATTER_SELECTOR #if GASNETE_USE_REMOTECONTIG_GATHER_SCATTER gex_Event_t gasnete_getv_scatter(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, gex_Memvec_t const dstlist[], size_t srccount, gex_Memvec_t const srclist[], gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_vis_threaddata_t * const td = GASNETE_VIS_MYTHREAD; size_t const nbytes = srclist[0].gex_len; gasneti_assert(srccount == 1 && dstcount > 1); /* only supports scatter get */ gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); // silly to use for local cases if_pf (nbytes == 0) return GEX_EVENT_INVALID; /* event empty */ GASNETI_TRACE_EVENT(C, GETV_SCATTER); { gasneti_vis_op_t * const visop = gasnete_visbuf_malloc(sizeof(gasneti_vis_op_t)+dstcount*sizeof(gex_Memvec_t)+nbytes); gex_Memvec_t * const savedlst = (gex_Memvec_t *)(visop + 1); void * const packedbuf = savedlst + dstcount; GASNETI_MEMCPY(savedlst, dstlist, dstcount*sizeof(gex_Memvec_t)); visop->type = GASNETI_VIS_CAT_GETV_SCATTER; visop->count = dstcount; visop->event = gasnete_get_nb(tm, packedbuf, rank, srclist[0].gex_addr, nbytes, 0 GASNETI_THREAD_PASS); gasneti_assert(visop->event != GEX_EVENT_INVALID); GASNETE_PUSH_VISOP_RETURN(td, visop, synctype, 1, (void)0); } } #define GASNETE_GETV_SCATTER_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags) \ if (gasnete_vis_use_remotecontig && srccount == 1 && dstcount > 1) \ return gasnete_getv_scatter(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags GASNETI_THREAD_PASS) #else #define GASNETE_GETV_SCATTER_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags) ((void)0) #endif #endif //--------------------------------------------------------------------------------- // *** Incremental AMPipelining Vector Support *** // // The incremental AMpipelining vector algorithm has several design goals: // // 1. Employ a dynamic hybrid of AM packing and RMA-based transfers. // In general a vector transfer may include both small and large contiguous chunks, // so choose the best protocol (as determined by (GASNET_VIS_MAXCHUNK) on a per-chunk basis. // // 2. Perform injection incrementally during a SINGLE linear traversal of the metadata. // This strategy seeks to: // - Improve cache efficiency for cases where the metadata is large // - Start injecting as early as possible, overlapping latency of earlier chunks with // overheads of calculating and marshalling later chunks. // - Avoid making copies of the metadata whenever possible // // 3. Filter metadata to remove empty chunks and merge spatially adjacent chunks that // appear consecutively in the metadata. This potentially increases chunk sizes and // decreases metadata bandwidth overhead, while still preserving the single linear traversal. // // 4. Exploit spatial locality properties of remote addresses by performing incremental // compression of metadata on the wire. This decreases metadata bandwidth overhead. // // Future work: // // 1. Detect large remotely contiguous chunks corresponding to small locally // discontiguous chunks and transfer them via RMA through a temporary local buffer. // // 2. Consider double-buffering FPAM pack_buf for conduits lacking NPAM but providing // asynchronous LC for AM injection. // //--------------------------------------------------------------------------------- #if GASNETE_USE_AMPIPELINE GASNETI_INLINE(gasnete_getv_AMPipeline_visop_signal) void gasnete_getv_AMPipeline_visop_signal(gasneti_vis_op_t * const visop) { if (gasneti_weakatomic_decrement_and_test(&(visop->packetcnt), GASNETI_ATOMIC_WMB_PRE|GASNETI_ATOMIC_WEAK_FENCE)) { /* last response packet completes operation and cleans up */ GASNETE_VISOP_SIGNAL(visop, 1); gasneti_free(visop->addr); /* free localpt */ gasneti_free(visop); /* free visop, savedlst and send buffer */ } } //--------------------------------------------------------------------------------- // Helper function that injects a single Incremental AMPipeline packet, after marshalling by the caller GASNETI_INLINE(gasneti_AMpipeline_packetinject) // inline to allow specialization on isget void gasneti_AMpipeline_packetinject( gex_TM_t const tm, gex_Rank_t const rank, int const isget, gex_AM_SrcDesc_t sd, const void *packet_buf, size_t packet_nbytes, gasneti_vis_op_t *visop, size_t savedlst_idx, size_t savedlst_offset GASNETI_THREAD_FARG) { gasneti_assert(packet_buf); gasneti_assert(packet_nbytes > 0); if (isget) { // Assert that savedlst_idx and savedlst_offset each fit in a 32-bit AM arg // It's theoretically possible these could exceed 32-bit, but not worth doubling arg overhead // Details: // * savedlst_offset could only exceed 32-bit for reference conduits that disable RMA // (GASNETI_VECTOR_USE_RMA==0), with a gex_VIS_VectorGet() metadata input where a // single contiguous local chunk exceeds 2GiB. // * savedlst_index could only exceed 32-bit with a gex_VIS_VectorGet() metadata input // where the decomposed local chunk count (worst case `dstcount + srccount`, // but more commonly `<= dstcount`) exceed 2 billion. // Both limits could be avoided by adding two more AM handler arguments, wasting 16-byte // of wire space for cases that (IMHO) should never arise in practice. // More complicated solutions that avoid adding packet overhead would incur additional // branches (overhead) in the critical-path packing loop. gasneti_assert_uint(savedlst_idx ,==, (gex_AM_Arg_t)savedlst_idx); gasneti_assert_uint(savedlst_offset ,==, (gex_AM_Arg_t)savedlst_offset); gasneti_weakatomic_increment(&(visop->packetcnt), 0 /* no fence needed */); gex_AM_Index_t handler = gasneti_handleridx(gasnete_getv_AMPipeline_reqh); #define ARGS PACK(visop), savedlst_idx, savedlst_offset #if GASNETE_VIS_NPAM == 0 gex_AM_RequestMedium(tm, rank, handler, (void *)packet_buf, packet_nbytes, GEX_EVENT_NOW, 0, ARGS); #else gex_AM_CommitRequestMedium(sd, handler, packet_nbytes, ARGS); #endif #undef ARGS } else { // put // TODO: We'd prefer to batch all the gasneti_iop_register's together to reduce overhead // but naively batching and incrementing at the end risks breaking iop_check's invariant assert(iop.initiated >= iop.completed) // which (assertion aside) is necessary to assure an aop is not prematurely marked complete. // A better approach would be an initial increment of gasneti_iop_register(ATOMIC_MAX/4), // followed by a final decrement of gasneti_iop_markdone(ATOMIC_MAX/4 - packets_injected), gasneti_iop_t *iop = gasneti_iop_register(1, isget GASNETI_THREAD_PASS); gex_AM_Index_t handler = gasneti_handleridx(gasnete_putv_AMPipeline_reqh); #define ARGS PACK(iop) #if GASNETE_VIS_NPAM == 0 gex_AM_RequestMedium(tm, rank, handler, (void *)packet_buf, packet_nbytes, GEX_EVENT_NOW, 0, ARGS); #else gex_AM_CommitRequestMedium(sd, handler, packet_nbytes, ARGS); #endif #undef ARGS } } //--------------------------------------------------------------------------------- // gasneti_AMpipeline_incremental performs the incremental AMPipelined vector injection // requires: // - tm,rank specifies a non-local peer // - the caller has established an appropriate iop/aop to allow NBI injection // (NBI puts use lc_opt == GEX_EVENT_GROUP) // ensures: // - all communication has been initiated (but not completed) and registered on the iop/aop // - lvec and rvec are fully consumed before return GASNETI_INLINE(gasneti_AMpipeline_incremental) // inline to allow specialization on isget void gasneti_AMpipeline_incremental( gex_TM_t const tm, gex_Rank_t const rank, int const isget, size_t rvec_cnt, gex_Memvec_t const *rvec_lst, size_t lvec_cnt, gex_Memvec_t const *lvec_lst GASNETI_THREAD_FARG) { // RVEC tracking: gex_Memvec_t rvec = {0,0}; // current rvec entry being processed, len==0 when none is being processed gex_Memvec_t const * rvec_next; // next non-empty in rvec list, or rvec_end gex_Memvec_t const * const rvec_end = &rvec_lst[rvec_cnt]; for (rvec_next = rvec_lst; GASNETT_PREDICT_FALSE(rvec_next->gex_len == 0) ; ) { if (++rvec_next == rvec_end) return; // empty transfer! } // LVEC tracking: gex_Memvec_t lvec = {0,0}; // current lvec entry being processed, len==0 when none is being processed gex_Memvec_t const * lvec_next; // next non-empty entry in lvec list, or lvec_end gex_Memvec_t const * const lvec_end = &lvec_lst[lvec_cnt]; for (lvec_next = lvec_lst; GASNETT_PREDICT_FALSE(lvec_next->gex_len == 0); ) { lvec_next++; gasneti_assert_ptr(lvec_next ,<, lvec_end); // lvec_lst cannot be empty if rveclst was non-empty } // PACKET FORMAT: (no padding) // Incremental vector put: // RequestMedium: encoded rptr | shortlen_t | data | encoded rptr | shortlen_t | data | ... // Incremental vector get: // RequestMedium: encoded rptr | shortlen_t | encoded rptr | shortlen_t | ... // ReplyMedium: data | data | ... size_t const request_args = (isget ? HARGS(3,4) : HARGS(1,2)); size_t const maxrequest = gex_AM_MaxRequestMedium(tm,rank, (GASNETE_VIS_NPAM ? NULL : GEX_EVENT_NOW), (GASNETE_VIS_NPAM ? GEX_FLAG_AM_PREPARE_LEAST_ALLOC : 0), request_args); // Defer queue: #if GASNETE_VIS_NPAM && GASNETI_VECTOR_USE_RMA gasnete_vis_threaddata_t * const td = GASNETE_VIS_MYTHREAD; gasneti_vector_pair_t *defer_buf = td->defer_buf; size_t defer_sz = td->defer_sz; size_t defer_cnt = 0; #endif // Pack buffer tracking: #if GASNETE_VIS_NPAM == 0 uint8_t * const pack_buf = gasnete_visbuf_malloc(maxrequest); // packing buffer uint8_t * const pack_end = pack_buf + maxrequest; // end of current packing buffer #else // NPAM uint8_t *pack_buf = NULL; uint8_t *pack_end = (uint8_t *)(uintptr_t)-1; #endif uint8_t *pack_p = NULL; // current position in packing buffer (null when there is no buffer) void *pack_rvec = NULL; // location of len for currently filling rvec in the packing buffer, NULL when not yet placed gex_AM_SrcDesc_t sd = GEX_AM_SRCDESC_NO_OP; // VLIDE state void * segbase = NULL; #if !GASNET_SEGMENT_EVERYTHING { size_t segsize = 0; gex_Event_Wait(gex_EP_QueryBoundSegmentNB(tm, rank, &segbase, 0, &segsize, 0)); gasneti_assert(segsize != 0); gasneti_assert(segbase != NULL); } #endif uintptr_t prev_rptr = (uintptr_t)segbase; // previous rvec.addr packed into current packet, or segbase // GET ONLY STATE: size_t const savedlst_max = (rvec_cnt + lvec_cnt); // worst-case breaks gasneti_vis_op_t * const visop = (isget ? gasnete_visbuf_malloc(sizeof(gasneti_vis_op_t) + savedlst_max*sizeof(gex_Memvec_t)) : NULL); gex_Memvec_t * const savedlst = (gex_Memvec_t *)(visop + 1); size_t savedlst_cnt = 0; // current number of entries in savedlst size_t savedlst_idx = 0, savedlst_offset = 0; // base index and offset into savedlst for current packet gex_Memvec_t *savedlst_pos = NULL; // current entry in savedlst corresponding to lvec, or NULL for none yet size_t reply_datasz = 0; // amount of data in reply to current packet size_t maxreply; if (isget) { // init get state maxreply = gex_AM_MaxReplyMedium(tm,rank, (GASNETE_VIS_NPAM ? NULL : GEX_EVENT_NOW), (GASNETE_VIS_NPAM ? GEX_FLAG_AM_PREPARE_LEAST_ALLOC : 0), HARGS(3,4)); #if GASNET_DEBUG visop->type = GASNETI_VIS_CAT_GETV_AMPIPELINE; visop->count = savedlst_max; #endif visop->iop = gasneti_iop_register(1,isget GASNETI_THREAD_PASS); gasneti_weakatomic_set(&(visop->packetcnt), 1, 0/* no fence needed */); // pre-increment visop->addr = NULL; visop->eop = NULL; } do { if (!rvec.gex_len) { // pick-up maximal contiguous rvec pack_rvec = NULL; // break any prior packed rvec gasneti_assert_ptr(rvec_next ,<, rvec_end); rvec = *rvec_next; gasneti_assert(rvec.gex_len); rvec_next++; while (rvec_next < rvec_end) { // advance rvec_next while merging-up if (GASNETT_PREDICT_FALSE(rvec_next->gex_len == 0)) rvec_next++; else if (GASNETT_PREDICT_FALSE(rvec_next->gex_addr == (uint8_t*)rvec.gex_addr + rvec.gex_len)) { rvec.gex_len += rvec_next->gex_len; // merge up rvec_next++; } else break; // end of contiguity } } if (!lvec.gex_len) { // pick-up maximal contiguous lvec if (isget) savedlst_pos = NULL; gasneti_assert_ptr(lvec_next ,<, lvec_end); lvec = *lvec_next; gasneti_assert(lvec.gex_len); lvec_next++; while (lvec_next < lvec_end) { // advance lvec_next while merging-up if (GASNETT_PREDICT_FALSE(lvec_next->gex_len == 0)) lvec_next++; else if (GASNETT_PREDICT_FALSE(lvec_next->gex_addr == (uint8_t*)lvec.gex_addr + lvec.gex_len)) { lvec.gex_len += lvec_next->gex_len; // merge up lvec_next++; } else break; // end of contiguity } } size_t contig_sz = MIN(lvec.gex_len,rvec.gex_len); #if GASNETI_VECTOR_USE_RMA if (contig_sz > (isget?gasnete_vis_get_maxchunk:gasnete_vis_put_maxchunk)) { // use NBI RMA if (!GASNETE_VIS_NPAM || !pack_p) { // safe to inject right now if (isget) GASNETE_GET_INDIV(tm,rank,lvec.gex_addr,rvec.gex_addr,contig_sz); else GASNETE_PUT_INDIV(tm,rank,rvec.gex_addr,lvec.gex_addr,contig_sz,GEX_EVENT_GROUP); } else { // must defer RMA injection to outside NPAM Prepare/Commit interval gasneti_assert(GASNETE_VIS_NPAM); #if GASNETE_VIS_NPAM if_pf (defer_cnt >= defer_sz) { // need to alloc/grow defer queue if_pf (defer_sz == 0) { // first use this thread gasneti_assert(defer_cnt == 0); #ifndef GASNETI_VECTOR_DEFER_INITIAL #define GASNETI_VECTOR_DEFER_INITIAL 8 #endif defer_buf = gasneti_malloc(sizeof(gasneti_vector_pair_t)*GASNETI_VECTOR_DEFER_INITIAL); defer_sz = GASNETI_VECTOR_DEFER_INITIAL; } else { defer_sz <<= 1; defer_buf = gasneti_realloc(defer_buf, sizeof(gasneti_vector_pair_t)*defer_sz); } td->defer_buf = defer_buf; td->defer_sz = defer_sz; } gasneti_assert_uint(defer_cnt ,<, defer_sz); // save deferred RMA gasneti_vector_pair_t * const pdef = &defer_buf[defer_cnt++]; pdef->lptr = lvec.gex_addr; pdef->rptr = rvec.gex_addr; pdef->sz = contig_sz; // DRAIN_DEFERRED performs deferred RMA injection, in reverse order to improve cache locality #define DRAIN_DEFERRED() do { \ while (defer_cnt) { \ gasneti_vector_pair_t * pdef = &defer_buf[--defer_cnt]; \ if (isget) GASNETE_GET_INDIV(tm,rank,pdef->lptr,pdef->rptr,pdef->sz); \ else GASNETE_PUT_INDIV(tm,rank,pdef->rptr,pdef->lptr,pdef->sz,GEX_EVENT_GROUP); \ } \ } while (0) #endif } pack_rvec = NULL; // break any prior packed rvec if (isget && savedlst_pos) { // break any current savedlst entry gasneti_assert_uint(savedlst_pos->gex_len ,>, lvec.gex_len); // benign race here: Theoretically gasnete_getv_AMPipeline_reph_inner could be reading // the entry we are updating here, but under the reasonable assumption this write is atomic, // it doesn't matter whether the handler reads the old or new gex_len value savedlst_pos->gex_len -= lvec.gex_len; savedlst_pos = NULL; } } else #endif // GASNETI_VECTOR_USE_RMA { // pack into AM buffer // check if current buffer is full // TODO conservative: ignoring ptr compression and partial pack entry in pack_rvec if (pack_p + sizeof(void*)+sizeof(shortlen_t)+(!isget) > pack_end || (isget && reply_datasz == maxreply)) { // send a full buffer gasneti_AMpipeline_packetinject(tm, rank, isget, sd, pack_buf, (pack_p-pack_buf), visop, savedlst_idx, savedlst_offset GASNETI_THREAD_PASS); pack_p = NULL; #if GASNETI_VECTOR_USE_RMA && GASNETE_VIS_NPAM DRAIN_DEFERRED(); #endif } if (isget && !savedlst_pos) { // populate get's savedlst with lvec savedlst_pos = &savedlst[savedlst_cnt++]; *savedlst_pos = lvec; } if (!pack_p) { // start a new AM packet buffer #if GASNETE_VIS_NPAM // NPAM 1 or 2 (currently treated as 1) sd = gex_AM_PrepareRequestMedium(tm, rank, NULL, maxrequest, maxrequest, NULL, 0, request_args); gasneti_assert_uint(gex_AM_SrcDescSize(sd) ,>=, maxrequest); pack_buf = gex_AM_SrcDescAddr(sd); pack_end = pack_buf + maxrequest; #endif pack_p = pack_buf; prev_rptr = (uintptr_t)segbase; pack_rvec = NULL; if (isget) { reply_datasz = 0; savedlst_idx = savedlst_cnt-1; savedlst_offset = (uint8_t*)lvec.gex_addr - (uint8_t*)savedlst_pos->gex_addr; } } shortlen_t already_packed; if (pack_rvec) { // resuming an partial pack entry GASNETI_MEMCPY(&already_packed, pack_rvec, sizeof(already_packed)); // read current packed entry sz if_pf (sizeof(shortlen_t) < 4 && already_packed == SHORTLEN_MAX) goto new_pack_entry; } else { // starting a new pack entry new_pack_entry: already_packed = 0; GASNETI_VIS_VLIDE_ENCODE(pack_p, prev_rptr, (uintptr_t)rvec.gex_addr); prev_rptr = (uintptr_t)rvec.gex_addr; pack_rvec = pack_p; pack_p += sizeof(shortlen_t); } // cap contig size to size limits on this packed entry size_t remaining_space = (isget ? maxreply - reply_datasz : pack_end - pack_p); gasneti_assert_uint(remaining_space ,>, 0); contig_sz = MIN(contig_sz, remaining_space); if (sizeof(shortlen_t) < 4) { // avoid shortlen overflow contig_sz = MIN(contig_sz, SHORTLEN_MAX-already_packed); } gasneti_assert_uint(contig_sz ,>, 0); gasneti_assert_uint((size_t)already_packed+contig_sz ,<=, SHORTLEN_MAX); already_packed += contig_sz; GASNETI_MEMCPY(pack_rvec, &already_packed, sizeof(already_packed)); // update packed entry sz if (isget) reply_datasz += contig_sz; else { // write contig data GASNETI_MEMCPY(pack_p, lvec.gex_addr, contig_sz); pack_p += contig_sz; } } // packed contigsz into AM // advance current vecs gasneti_assert_uint(lvec.gex_len ,>=, contig_sz); lvec.gex_len -= contig_sz; lvec.gex_addr = contig_sz + (uint8_t*)lvec.gex_addr; gasneti_assert_uint(rvec.gex_len ,>=, contig_sz); rvec.gex_len -= contig_sz; rvec.gex_addr = contig_sz + (uint8_t*)rvec.gex_addr; // sanity check invariants gasneti_assert_ptr(pack_p ,<=, pack_end); if (pack_rvec) { gasneti_assert_ptr(pack_rvec ,>, pack_buf); gasneti_assert_ptr(pack_rvec ,<, pack_p); } gasneti_assert_ptr(rvec_next ,<=, rvec_end); gasneti_assert_ptr(lvec_next ,<=, lvec_end); if (isget) { gasneti_assert_uint(reply_datasz ,<=, maxreply); gasneti_assert_uint(savedlst_cnt ,<=, savedlst_max); if (savedlst_pos) { gasneti_assert_uint(savedlst_idx ,<, savedlst_cnt); gasneti_assert_ptr(savedlst_pos ,==, &savedlst[savedlst_cnt-1]); } } } while(lvec.gex_len + rvec.gex_len > 0 || rvec_next < rvec_end); gasneti_assert_ptr(rvec_next ,==, rvec_end); gasneti_assert_ptr(lvec_next ,==, lvec_end); if (pack_p) { // send last buffer gasneti_AMpipeline_packetinject(tm, rank, isget, sd, pack_buf, (pack_p-pack_buf), visop, savedlst_idx, savedlst_offset GASNETI_THREAD_PASS); #if GASNETI_VECTOR_USE_RMA && GASNETE_VIS_NPAM DRAIN_DEFERRED(); #endif } if (isget) { // trailing decrement of visop->packetcnt (that might end up freeing the visop!) gasnete_getv_AMPipeline_visop_signal(visop); } #if GASNETE_VIS_NPAM == 0 gasneti_free(pack_buf); #endif } //--------------------------------------------------------------------------------- // return the base of the bound segment associated with the EP that recvd this AM token // and optionally return the EP GASNETI_INLINE(gasnete_token_segbase) void *gasnete_token_segbase(gex_Token_t token, gex_EP_t *ep) { gex_Token_Info_t ti; gex_TI_t r = gex_Token_Info(token, &ti, GEX_TI_EP); gasneti_assert(r & GEX_TI_EP); gasneti_assert(ti.gex_ep != GEX_EP_INVALID); if (ep) *ep = ti.gex_ep; #if GASNET_SEGMENT_EVERYTHING return NULL; #else gex_Segment_t seg = gex_EP_QuerySegment(ti.gex_ep); gasneti_assert(seg != GEX_SEGMENT_INVALID); return gex_Segment_QueryAddr(seg); #endif } //--------------------------------------------------------------------------------- #endif // GASNETE_USE_AMPIPELINE //--------------------------------------------------------------------------------- /* Pipelined AM gather-scatter put */ #ifndef GASNETE_PUTV_AMPIPELINE_SELECTOR #if GASNETE_USE_AMPIPELINE gex_Event_t gasnete_putv_AMPipeline(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, gex_Memvec_t const dstlist[], size_t srccount, gex_Memvec_t const srclist[], gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(srccount >= 1); gasneti_assert(dstcount >= 1); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); // silly to use for local cases GASNETI_TRACE_EVENT(C, PUTV_AMPIPELINE); GASNETE_START_NBIREGION(synctype); gasneti_AMpipeline_incremental(tm, rank, /*isget=*/0, dstcount, dstlist, srccount, srclist GASNETI_THREAD_PASS); GASNETE_END_NBIREGION_AND_RETURN(synctype); } #define GASNETE_PUTV_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags) \ if (gasnete_vis_use_ampipe) \ return gasnete_putv_AMPipeline(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags GASNETI_THREAD_PASS) #else #define GASNETE_PUTV_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags) ((void)0) #endif #endif /* ------------------------------------------------------------------------------------ */ #if GASNETE_USE_AMPIPELINE // Put RequestMedium buffer format: // encoded rptr | shortlen_t | data | encoded rptr | shortlen_t | data | ... GASNETI_INLINE(gasnete_putv_AMPipeline_reqh_inner) void gasnete_putv_AMPipeline_reqh_inner(gex_Token_t token, void *addr, size_t nbytes, void *iop) { gex_EP_t ep; uintptr_t rptr = (uintptr_t)gasnete_token_segbase(token, &ep); #if GASNET_DEBUG gasneti_EP_t i_ep = gasneti_import_ep(ep); #endif uint8_t const * pbuf = addr; uint8_t const * const buf_end = pbuf + nbytes; do { gasneti_assert_ptr(pbuf ,<, buf_end); GASNETI_VIS_VLIDE_DECODE(pbuf, rptr, rptr); shortlen_t len; gasneti_assert_ptr(pbuf+sizeof(len) ,<, buf_end); GASNETI_MEMCPY(&len, pbuf, sizeof(len)); pbuf += sizeof(len); gasneti_assert_ptr(pbuf+len ,<=, buf_end); gasneti_assert(gasneti_in_local_fullsegment(i_ep, (void *)rptr, len)); GASNETI_MEMCPY((void *)rptr, pbuf, len); pbuf += len; } while (pbuf < buf_end); gasneti_assert_ptr(pbuf ,==, buf_end); gex_AM_ReplyShort(token, gasneti_handleridx(gasnete_putvis_AMPipeline_reph), 0, PACK(iop)); } MEDIUM_HANDLER(gasnete_putv_AMPipeline_reqh,1,2, (token,addr,nbytes, UNPACK(a0) ), (token,addr,nbytes, UNPACK2(a0, a1))); /* ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasnete_putvis_AMPipeline_reph_inner) void gasnete_putvis_AMPipeline_reph_inner(gex_Token_t token, void *iop) { gasneti_iop_markdone(iop, 1, 0); } SHORT_HANDLER(gasnete_putvis_AMPipeline_reph,1,2, (token, UNPACK(a0)), (token, UNPACK2(a0, a1))); #endif /* ------------------------------------------------------------------------------------ */ /* Pipelined AM gather-scatter get */ #ifndef GASNETE_GETV_AMPIPELINE_SELECTOR #if GASNETE_USE_AMPIPELINE gex_Event_t gasnete_getv_AMPipeline(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, gex_Memvec_t const dstlist[], size_t srccount, gex_Memvec_t const srclist[], gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(dstcount >= 1); gasneti_assert(srccount >= 1); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); // silly to use for local cases GASNETI_TRACE_EVENT(C, GETV_AMPIPELINE); GASNETE_START_NBIREGION(synctype); gasneti_AMpipeline_incremental(tm, rank, /*isget=*/1, srccount, srclist, dstcount, dstlist GASNETI_THREAD_PASS); GASNETE_END_NBIREGION_AND_RETURN(synctype); } #define GASNETE_GETV_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags) \ if (gasnete_vis_use_ampipe) \ return gasnete_getv_AMPipeline(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags GASNETI_THREAD_PASS) #else #define GASNETE_GETV_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags) ((void)0) #endif #endif /* ------------------------------------------------------------------------------------ */ #if GASNETE_USE_AMPIPELINE // Get RequestMedium buffer format: // encoded rptr | shortlen_t | encoded rptr | shortlen_t | ... GASNETI_INLINE(gasnete_getv_AMPipeline_reqh_inner) void gasnete_getv_AMPipeline_reqh_inner(gex_Token_t token, void *addr, size_t nbytes, void *_visop, gex_AM_Arg_t savedlst_idx, gex_AM_Arg_t savedlst_offset) { size_t const replyargs = HARGS(3,4); // TODO: potentially transmit the actual (possibly lower) reply datasz if that provided some benefit? size_t maxreply = gex_Token_MaxReplyMedium(token, (GASNETE_VIS_NPAM ? NULL : GEX_EVENT_NOW), (GASNETE_VIS_NPAM ? GEX_FLAG_AM_PREPARE_LEAST_ALLOC : 0), replyargs); #if GASNETE_VIS_NPAM gex_AM_SrcDesc_t sd = gex_AM_PrepareReplyMedium(token, NULL, maxreply, maxreply, NULL, 0, replyargs); gasneti_assert_uint(gex_AM_SrcDescSize(sd) ,>=, maxreply); uint8_t * const databuf = gex_AM_SrcDescAddr(sd); #else uint8_t * const databuf = gasnete_visbuf_malloc(maxreply); #endif uint8_t * const data_end = databuf + maxreply; uint8_t * pdata = databuf; uint8_t * pmeta = addr; uint8_t * meta_end = pmeta + nbytes; gex_EP_t ep; uintptr_t rptr = (uintptr_t)gasnete_token_segbase(token, &ep); #if GASNET_DEBUG gasneti_EP_t i_ep = gasneti_import_ep(ep); #endif do { gasneti_assert_ptr(pmeta ,<, meta_end); GASNETI_VIS_VLIDE_DECODE(pmeta, rptr, rptr); shortlen_t len; gasneti_assert_ptr(pmeta+sizeof(len) ,<=, meta_end); GASNETI_MEMCPY(&len, pmeta, sizeof(len)); pmeta += sizeof(len); gasneti_assert_ptr(pdata+len ,<=, data_end); gasneti_assert(gasneti_in_local_fullsegment(i_ep, (void *)rptr, len)); GASNETI_MEMCPY(pdata, (void *)rptr, len); pdata += len; } while (pmeta < meta_end); gasneti_assert_ptr(pmeta ,==, meta_end); size_t const reply_bytes = pdata - databuf; gasneti_assert(reply_bytes > 0); gasneti_assert_uint(reply_bytes ,<=, maxreply); #define ARGS PACK(_visop), savedlst_idx, savedlst_offset #if GASNETE_VIS_NPAM == 0 gex_AM_ReplyMedium(token, gasneti_handleridx(gasnete_getv_AMPipeline_reph), databuf, reply_bytes, GEX_EVENT_NOW, 0, ARGS); #else gex_AM_CommitReplyMedium(sd, gasneti_handleridx(gasnete_getv_AMPipeline_reph), reply_bytes, ARGS); #endif #undef ARGS #if GASNETE_VIS_NPAM == 0 gasneti_free(databuf); #endif } MEDIUM_HANDLER(gasnete_getv_AMPipeline_reqh,3,4, (token,addr,nbytes, UNPACK(a0), a1, a2), (token,addr,nbytes, UNPACK2(a0, a1), a2, a3)); /* ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasnete_getv_AMPipeline_reph_inner) void gasnete_getv_AMPipeline_reph_inner(gex_Token_t token, void *addr, size_t nbytes, void *_visop, gex_AM_Arg_t savedlst_idx, gex_AM_Arg_t savedlst_offset) { gasneti_assert(addr && nbytes > 0); uint8_t const *pbuf = addr; uint8_t const * const buf_end = pbuf + nbytes; gasneti_vis_op_t * const visop = _visop; gasneti_assert_uint(visop->type ,==, GASNETI_VIS_CAT_GETV_AMPIPELINE); gex_Memvec_t const * const savedlst = (gex_Memvec_t *)(visop + 1); gasneti_assert_int(savedlst_idx ,>=, 0); gasneti_assert_int(savedlst_idx ,<, visop->count); gex_Memvec_t const * savedlst_pos = savedlst + savedlst_idx; gex_Memvec_t lvec = *(savedlst_pos++); gasneti_assert_int(savedlst_offset ,>=, 0); gasneti_assert_int(savedlst_offset ,<, lvec.gex_len); lvec.gex_addr = (uint8_t *)lvec.gex_addr + savedlst_offset; lvec.gex_len -= savedlst_offset; do { gasneti_assert(lvec.gex_len > 0); size_t const len = MIN(lvec.gex_len, buf_end - pbuf); GASNETI_MEMCPY(lvec.gex_addr, pbuf, len); pbuf += len; } while ((pbuf < buf_end) && (lvec = *(savedlst_pos++),1)); gasneti_assert_ptr(pbuf ,==, buf_end); gasnete_getv_AMPipeline_visop_signal(visop); } MEDIUM_HANDLER(gasnete_getv_AMPipeline_reph,3,4, (token,addr,nbytes, UNPACK(a0), a1, a2), (token,addr,nbytes, UNPACK2(a0, a1), a2, a3)); #endif /*---------------------------------------------------------------------------------*/ #define _VEC_SKIPEMPTY(idx,count,list) \ while (idx < count && GASNETT_PREDICT_FALSE(list[idx].gex_len == 0)) idx++ // GASNETE_VECTOR_HELPER iterates over 2-sided vector metadata in order and invokes // the provided macro action(p1,p2,len) on each contiguous matching chunk of the sequences #define GASNETE_VECTOR_HELPER(count1, list1, count2, list2, action) do { \ size_t const _count1 = (count1); gex_Memvec_t const * const _list1 = (list1); \ size_t const _count2 = (count2); gex_Memvec_t const * const _list2 = (list2); \ if (_count1 == 1) { /* 1 is contiguous buffer */ \ uintptr_t _pp1 = (uintptr_t)(_list1[0].gex_addr); \ for (size_t _i = 0; _i < _count2; _i++) { \ size_t const _len2 = _list2[_i].gex_len; \ if_pt (_len2 > 0) { \ void * const _p1 = (void *)_pp1; \ void * const _p2 = _list2[_i].gex_addr; \ action(_p1, _p2, _len2); \ _pp1 += _len2; \ } \ } \ gasneti_assert_uint(_pp1 ,==, (uintptr_t)(_list1[0].gex_addr)+_list1[0].gex_len); \ } else if (_count2 == 1) { /* 2 is contiguous buffer */ \ uintptr_t _pp2 = (uintptr_t)(_list2[0].gex_addr); \ for (size_t _i = 0; _i < _count1; _i++) { \ size_t const _len1 = _list1[_i].gex_len; \ if_pt (_len1 > 0) { \ void * const _p1 = _list1[_i].gex_addr; \ void * const _p2 = (void *)_pp2; \ action(_p1, _p2, _len1); \ _pp2 += _len1; \ } \ } \ gasneti_assert_uint(_pp2 ,==, (uintptr_t)(_list2[0].gex_addr)+_list2[0].gex_len); \ } else { /* general case */ \ size_t _idx1 = 0; size_t _idx2 = 0; \ size_t _off1 = 0; size_t _off2 = 0; \ _VEC_SKIPEMPTY(_idx1,_count1,_list1); \ _VEC_SKIPEMPTY(_idx2,_count2,_list2); \ while (_idx1 < _count1) { \ gasneti_assert_uint(_idx2 ,<, _count2); \ size_t const _rem1 = _list1[_idx1].gex_len - _off1; \ size_t const _rem2 = _list2[_idx2].gex_len - _off2; \ gasneti_assert(_rem1 > 0); gasneti_assert(_rem2 > 0); \ void * const _p1 = (void *)(((uintptr_t)_list1[_idx1].gex_addr)+_off1); \ void * const _p2 = (void *)(((uintptr_t)_list2[_idx2].gex_addr)+_off2); \ if (_rem1 < _rem2) { \ action(_p1, _p2, _rem1); \ _idx1++; _VEC_SKIPEMPTY(_idx1,_count1,_list1); \ _off1 = 0; \ _off2 += _rem1; \ } else if (_rem1 > _rem2) { \ action(_p1, _p2, _rem2); \ _idx2++; _VEC_SKIPEMPTY(_idx2,_count2,_list2); \ _off2 = 0; \ _off1 += _rem2; \ } else { gasneti_assert_uint(_rem1 ,==, _rem2); \ action(_p1, _p2, _rem1); \ _idx1++; _VEC_SKIPEMPTY(_idx1,_count1,_list1); \ _idx2++; _VEC_SKIPEMPTY(_idx2,_count2,_list2); \ _off1 = 0; \ _off2 = 0; \ } \ } \ gasneti_assert_uint(_idx1 ,==, _count1); \ gasneti_assert_uint(_idx2 ,==, _count2); \ gasneti_assert(_off1 == 0); gasneti_assert(_off2 == 0); \ } \ } while (0) /*---------------------------------------------------------------------------------*/ GASNETI_INLINE(gasnete_vector_memcpy) void gasnete_vector_memcpy(gex_TM_t const tm, gex_Rank_t const rank, int isput, size_t dstcount, gex_Memvec_t const dstlist[], size_t srccount, gex_Memvec_t const srclist[], gex_Flags_t flags) { gasneti_assert(GASNETI_NBRHD_MAPPED(tm,rank)); // TODO-EX: this assumes all addresses in the peer list reside in the same segment // and hoists the address translation. Multi-segment will need to push this down. gasneti_assert(!(flags & (GEX_FLAG_PEER_SEG_SOME|GEX_FLAG_PEER_SEG_UNKNOWN))); size_t const peercount = (isput ? dstcount : srccount); gex_Memvec_t const * const peerlist = (isput ? dstlist : srclist); size_t base=0; for ( ; ; base++) { // find a non-empty peer memvec if_pf (base == peercount) return; // empty list if_pt (peerlist[base].gex_len) break; } gasneti_assert_uint(base ,<, peercount); gasneti_assert(peerlist[base].gex_len > 0); uint8_t const * const rawptr = peerlist[base].gex_addr; gasneti_assert(rawptr); uint8_t const * const refptr = GASNETI_NBRHD_MAPPED_ADDR(tm,rank,rawptr); ptrdiff_t const offset = refptr - rawptr; if (isput) { #define ACTION(p1,p2,len) GASNETI_MEMCPY((uint8_t*)p1+offset,p2,len) GASNETE_VECTOR_HELPER(dstcount, dstlist, srccount, srclist, ACTION); #undef ACTION } else { #define ACTION(p1,p2,len) GASNETI_MEMCPY(p1,(uint8_t*)p2+offset,len) GASNETE_VECTOR_HELPER(dstcount, dstlist, srccount, srclist, ACTION); #undef ACTION } } /*---------------------------------------------------------------------------------*/ /* reference version that uses individual puts */ gex_Event_t gasnete_putv_ref_indiv(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, gex_Memvec_t const dstlist[], size_t srccount, gex_Memvec_t const srclist[], gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, PUTV_REF_INDIV); gasneti_assert(dstcount > 0); gasneti_assert(srccount > 0); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); gex_Event_t * const lc_opt = (flags & GEX_FLAG_ENABLE_LEAF_LC) ? GEX_EVENT_GROUP : GEX_EVENT_DEFER; GASNETE_START_NBIREGION(synctype); #define ACTION(p1,p2,len) GASNETE_PUT_INDIV(tm, rank, p1, p2, len, lc_opt) GASNETE_VECTOR_HELPER(dstcount, dstlist, srccount, srclist, ACTION); #undef ACTION GASNETE_END_NBIREGION_AND_RETURN(synctype); } /* reference version that uses individual gets */ gex_Event_t gasnete_getv_ref_indiv(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, gex_Memvec_t const dstlist[], size_t srccount, gex_Memvec_t const srclist[], gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, GETV_REF_INDIV); gasneti_assert(dstcount > 0); gasneti_assert(srccount > 0); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); GASNETE_START_NBIREGION(synctype); #define ACTION(p1,p2,len) GASNETE_GET_INDIV(tm, rank, p1, p2, len) GASNETE_VECTOR_HELPER(dstcount, dstlist, srccount, srclist, ACTION); #undef ACTION GASNETE_END_NBIREGION_AND_RETURN(synctype); } /*---------------------------------------------------------------------------------*/ /* top-level gasnet_putv_* entry point */ #ifndef GASNETE_PUTV_OVERRIDE extern gex_Event_t gasnete_putv(gasnete_synctype_t synctype, gex_TM_t const tm, gex_Rank_t const rank, size_t dstcount, gex_Memvec_t const dstlist[], size_t srccount, gex_Memvec_t const srclist[], gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(gasnete_vis_isinit); gasneti_assert(dstcount > 0); gasneti_assert(srccount > 0); gasneti_assert(dstcount > 1 || srccount > 1); gasneti_assert(dstlist); gasneti_assert(srclist); flags &= ~GEX_FLAG_IMMEDIATE; // TODO-EX if (GASNETI_NBRHD_MAPPED(tm,rank)) { // purely local GASNETI_TRACE_EVENT(C, PUTV_NBRHD); gasnete_vector_memcpy(tm,rank,1, dstcount,dstlist,srccount,srclist, flags); return GEX_EVENT_INVALID; } /* select algorithm */ #ifndef GASNETE_PUTV_SELECTOR #define GASNETE_PUTV_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags) \ GASNETE_PUTV_GATHER_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags); \ GASNETE_PUTV_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags); \ return gasnete_putv_ref_indiv(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags GASNETI_THREAD_PASS) #endif GASNETE_PUTV_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags); gasneti_fatalerror("failure in GASNETE_PUTV_SELECTOR - should never reach here"); } #endif /* top-level gasnet_getv_* entry point */ #ifndef GASNETE_GETV_OVERRIDE extern gex_Event_t gasnete_getv(gasnete_synctype_t synctype, gex_TM_t const tm, size_t dstcount, gex_Memvec_t const dstlist[], gex_Rank_t const rank, size_t srccount, gex_Memvec_t const srclist[], gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(gasnete_vis_isinit); gasneti_assert(dstcount > 0); gasneti_assert(srccount > 0); gasneti_assert(dstcount > 1 || srccount > 1); gasneti_assert(dstlist); gasneti_assert(srclist); flags &= ~GEX_FLAG_IMMEDIATE; // TODO-EX if (GASNETI_NBRHD_MAPPED(tm,rank)) { // purely local GASNETI_TRACE_EVENT(C, GETV_NBRHD); gasnete_vector_memcpy(tm,rank,0, dstcount,dstlist,srccount,srclist, flags); return GEX_EVENT_INVALID; } /* select algorithm */ #ifndef GASNETE_GETV_SELECTOR #define GASNETE_GETV_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags) \ GASNETE_GETV_SCATTER_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags); \ GASNETE_GETV_AMPIPELINE_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags); \ return gasnete_getv_ref_indiv(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags GASNETI_THREAD_PASS) #endif GASNETE_GETV_SELECTOR(synctype,tm,rank,dstcount,dstlist,srccount,srclist,flags); gasneti_fatalerror("failure in GASNETE_GETV_SELECTOR - should never reach here"); } #endif /*---------------------------------------------------------------------------------*/ gasnet-2025.8.0/extended-ref/vis/gasnet_strided.c0000664000175000017500000030075715142313673021754 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/vis/gasnet_strided.c $ * Description: GASNet Strided implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef GASNETI_GASNET_REFVIS_C #error This file not meant to be compiled directly - included by gasnet_refvis.c #endif /*---------------------------------------------------------------------------------*/ /* *** GASNet-EX Strided Implementation *** */ /*---------------------------------------------------------------------------------* High-level Design of the GEX Strided Implementation, v2.0: 0. Trace user inputs and assert argument validity (trace/debug only) 1. Handle trivial degeneracy in header a. elemsz == 0 : empty b. stridelevels == 0 : dual linear contiguity (_gex_RMA_Put/Get) -- Library boundary -- 2. Perform stride optimization/normalization: 3/4-pass, sl starts at stridelevels and shrinks PASS 1: Copy/convert user metadata to internal format, remove null dimensions, and perform stride inversion to make peer strides non-negative: O(sl) PASS 2(opt): Sort strides by peer stride: O(1) if already sorted, O(sl^2) otherwise PASS 3: Fold trailing duallcontig dimensions into elemsz: O(sl) PASS 4: Fold together trivial inner dimensions: O(sl) Trace optimized metadata, if it changed (trace only) 3. Perform bounds check (debug only) 4. Handle emergent degeneracy a. count[i] == 0 : empty b. stridelevels == 0 : dual linear contiguity (_gex_RMA_Put/Get) 5. Handle NBRHD locality a. hoisted address translation and memcpy loop 6. Perform stride analysis: 1-pass a. Compute contiguity parameters for each side O(sl) 7. Select non-trivial algorithm (logic allows conduit override) - dual linear contiguity > MAX_CHUNK => indiv put/get (gasnete_{put,get}) - (unimplemented) peer linear contiguity > MAX_CHUNK => remote contig (gasnete_{put,get}) - (off by default) Ref Indexed - (off by default) Ref Vector - if metadata + MIN_CHUNKS*elemsz fits in MaxMedium => AM Pipeline - otherwise, indiv put/get 8. Perform non-trivial algorithm *---------------------------------------------------------------------------------*/ /* Clang can be picky */ #if PLATFORM_COMPILER_CLANG && PLATFORM_COMPILER_VERSION_GE(2,8,0) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wconstant-logical-operand" #endif #if PLATFORM_COMPILER_NVHPC // bug4158: NVHPC misoptimizes gasnete_{puts,gets}_AMPipeline at -O2 or higher without this qualifier, // leading to garbage in the high word of the packed pointer sent as an AM argument #define BUG4158_WORKAROUND volatile #else #define BUG4158_WORKAROUND const #endif /* helper macros */ /* increment the values in init[0..(stridelevels-1)] by incval chunks, using provided count[0..(stridelevels-1)] dimensional extents. incval uses the same units as count[0] (ie elements, not bytes), and carries are propagated in ascending order through the dimensions of init */ #define GASNETE_STRIDED_VECTOR_INC(init, incval, countiter, stridelevels) do { \ size_t const _stridelevels = (stridelevels); \ size_t * const _init = (init); \ _init[0] += (incval); \ for (size_t _dim = 0; _dim < _stridelevels; _dim++) { \ size_t const _thisinit = _init[_dim]; \ size_t const _thismax = countiter(_dim); \ if (_thisinit < _thismax) break; \ else { \ gasneti_assert_uint(_dim ,!=, _stridelevels-1); /* overflow */ \ /* TODO-EX: possibly use ldiv() here? */ \ size_t const _carries = _thisinit / _thismax; \ _init[_dim] = _thisinit % _thismax; \ _init[_dim+1] += _carries; \ } \ } \ } while(0) // return the total size for an SMD holding up to stridelevels smd + scratch space #define SMD_SZ(stridelevels) \ gasneti_offsetof(gasneti_vis_smd_t, dim[stridelevels]) + \ 3*stridelevels*MAX(sizeof(ptrdiff_t),sizeof(size_t)) // TODO-EX: this may need to grow // given an smd(stridelevels), return the pointer to the scratch space // note the position of scratch depends on stridelevels (and thus may be invalidated if that changes) #define SMD_SCRATCH(smd,stridelevels) \ ((void*)&((smd)->dim[stridelevels])) // Striding metadata iterators #define _SITER_ARRAY_HELPER(idx) [(idx)] #define SITER_ARRAY(parray) (parray)_SITER_ARRAY_HELPER #define _SITER_SDIM_COUNT_HELPER(idx) [(idx)].count #define SITER_SDIM_COUNT(pdim) (pdim)_SITER_SDIM_COUNT_HELPER #define _SITER_SDIM_STRIDE_HELPER_SMD_SELF(idx) [(idx)].stride[SMD_SELF] #define _SITER_SDIM_STRIDE_HELPER_SMD_PEER(idx) [(idx)].stride[SMD_PEER] #define SITER_SDIM_STRIDE(pdim, selfpeer) (pdim)_SITER_SDIM_STRIDE_HELPER_##selfpeer #define _SITER_NOOP_HELPER(idx) #define SITER_NOOP() (0)_SITER_NOOP_HELPER /* GASNETE_1STRIDED_HELPER(size_t stridelevels, countiter, void *p1base, stride1iter) GASNETE_2STRIDED_HELPER(size_t stridelevels, countiter, void *p1base, stride1iter, void *p2base, stride2iter) expands to code based on the template below (shown for the case of stridelevels == 3), Iter arguments should be one of the following iterator macros. Arguments may be expressions, eg to offset by contiglevel SITER_ARRAY({size_t,ptrdiff_t} *parray) iterates over parray[0..(stridelevels-1)] SITER_SDIM_COUNT(gasneti_vis_smd_dim_t *pdim) iterates over pdim[0..(stridelevels-1)].count SITER_SDIM_STRIDE(gasneti_vis_smd_dim_t *pdim, SMD_{SELF,PEER}) iterates over pdim[0..(stridelevels-1)].stride[SMD_SELF|SMD_PEER] If stridelevels > GASNETE_LOOPING_DIMS, then we use the generalized striding code shown in the default case of GASNETE_STRIDED_HELPER. Parameters: * if caller scope contains the declaration: GASNETE_STRIDED_HELPER_DECLARE_PARTIAL(size_t numchunks, size_t *init, int addr_already_offset, int update_addr_init); then the traversal will iterate over a total of numchunks contiguous chunks, beginning at chunk coordinate indicated by init[0..(stridelevels-1)] if addr_already_offset is nonzero, the code assumes p1base/p2base already reference the first chunk, otherwise, the pointer values are advanced based on init to reach the first chunk iff update_addr_init is nonzero and there are chunks remaining, then p1base/p2base/init are updated on exit to point to the next unused chunk uint8_t * _p1 = p1base; uint8_t * _p2 = p2base; // only for 2STRIDED, otherwise always NULL size_t _chunkcnt = numchunks; if (HAVE_PARTIAL && !addr_already_offset) { for (size_t _dim = 0; _dim < stridelevels; _dim++) { _p1 += stride1iter(_dim) * (ptrdiff_t)init[_dim]; _p2 += stride2iter(_dim) * (ptrdiff_t)init[_dim]; } } size_t const _count0 = countiter(0); ptrdiff_t const _p1bump0 = stride1iter(0); ptrdiff_t const _p2bump0 = stride2iter(0); size_t _i0 = (HAVE_PARTIAL ? _count0 - init[0] : _count0); size_t const _count1 = countiter(1); ptrdiff_t const _p1bump1 = stride1iter(1) - (ptrdiff_t)_count0 * stride1iter(0); ptrdiff_t const _p2bump1 = stride2iter(1) - (ptrdiff_t)_count0 * stride2iter(0); size_t _i1 = (HAVE_PARTIAL ? _count1 - init[1] : _count1); size_t const _count2 = countiter(2); ptrdiff_t const _p1bump2 = stride1iter(2) - (ptrdiff_t)_count1 * stride1iter(1); ptrdiff_t const _p2bump2 = stride2iter(2) - (ptrdiff_t)_count1 * stride2iter(1); size_t _i2 = (HAVE_PARTIAL ? _count2 - init[2] : _count2); goto body; for (_i2 = _count2; _i2; _i2--) { for (_i1 = _count1; _i1; _i1--) { for (_i0 = _count0; _i0; _i0--) { body: GASNETE_STRIDED_HELPER_LOOPBODY(_p1,_p2); _p1 += _p1bump0; _p2 += _p2bump0; if_pf (HAVE_PARTIAL && --_chunkcnt == 0) goto done; } _p1 += _p1bump1; _p2 += _p2bump1; } _p1 += _p1bump2; _p2 += _p2bump2; } done: ; if (HAVE_PARTIAL && update_addr_init) { if (!_i0) ; // loop nest terminated else if (!--_i0) { _i0 = _count0; _p1 += _p1bump1; _p2 += _p2bump1; if (!--_i1) { _i1 = _count1; _p1 += _p1bump2; _p2 += _p2bump2; if (!--_i2) { _i2 = _count2; } } } p1base = _p1; p2base = _p2; init[0] = _count0 - _i0; init[1] = _count1 - _i1; init[2] = _count2 - _i2; } */ #define _STRIDED_HELPER_DECLARE_NO2 \ static int8_t _strided_helper_no2 = (int8_t)sizeof(_strided_helper_no2) static int32_t _strided_helper_no2 = (int32_t)sizeof(_strided_helper_no2); #define _STRIDED_HELPER_HAVE2 (sizeof(_strided_helper_no2) == 4) #define GASNETE_STRIDED_HELPER_DECLARE_PARTIAL(numchunks, init, addr_already_offset, update_addr_init) \ size_t * const _strided_init = (init); \ size_t _strided_chunkcnt = (numchunks); \ int const _strided_addr_already_offset = (addr_already_offset); \ int const _strided_update_addr_init = (update_addr_init); \ static int8_t _strided_helper_havepartial = (int8_t)sizeof(_strided_helper_havepartial) static int32_t * const _strided_init = (sizeof(_strided_init)?NULL:(void*)&_strided_init); /* NULL:NULL triggers gcc -O1 bug on sysx */ static int32_t _strided_chunkcnt = (int32_t)sizeof(_strided_chunkcnt); static int32_t const _strided_addr_already_offset = (int32_t)sizeof(_strided_addr_already_offset); static int32_t const _strided_update_addr_init = (int32_t)sizeof(_strided_update_addr_init); static int32_t const _strided_helper_havepartial = (int32_t)sizeof(_strided_helper_havepartial); #define _STRIDED_HELPER_HAVEPARTIAL (sizeof(_strided_helper_havepartial) == 1) #define _STRIDED_LABELHLP2(idx,name,line) _STRIDED_LABEL_##name##_##idx##_##line #define _STRIDED_LABELHLP(idx,name,line) _STRIDED_LABELHLP2(idx,name,line) #define _STRIDED_LABEL(idx,name) _STRIDED_LABELHLP(idx,name,__LINE__) #define _STRIDED_HELPER_SETUP_BASE(junk1,junk2,junk3, countiter, stride1iter, stride2iter) \ size_t const _count0 = countiter(0); \ ptrdiff_t const _p1bump0 = stride1iter(0); \ ptrdiff_t const _p2bump0 = (_STRIDED_HELPER_HAVE2 ? stride2iter(0) : 0); \ size_t _i0 = _count0; \ if (_STRIDED_HELPER_HAVEPARTIAL) { \ gasneti_assert_uint(_strided_init[0] ,<, _count0); \ _i0 -= _strided_init[0]; \ } #define _STRIDED_HELPER_SETUP_INT(lower, curr, junk, countiter, stride1iter, stride2iter) \ size_t const _count##curr = countiter(curr); \ ptrdiff_t const _p1bump##curr = stride1iter(curr) - \ ((ptrdiff_t)_count##lower) * stride1iter(lower); \ ptrdiff_t const _p2bump##curr = (_STRIDED_HELPER_HAVE2 ? \ stride2iter(curr) - ((ptrdiff_t)_count##lower) * stride2iter(lower) : 0); \ size_t _i##curr = _count##curr; \ if (_STRIDED_HELPER_HAVEPARTIAL) { \ gasneti_assert_uint(_strided_init[curr] ,<, _count##curr); \ _i##curr -= _strided_init[curr]; \ } #define _STRIDED_HELPER_LOOPHEAD(junk1,curr,junk2) \ for (_i##curr = _count##curr; _i##curr; _i##curr--) { #define _STRIDED_HELPER_LOOPTAIL(junk1,curr,junk2) \ _p1 += _p1bump##curr; \ if (_STRIDED_HELPER_HAVE2) _p2 += _p2bump##curr; \ else gasneti_assert(_p2 == NULL); \ } #define _STRIDED_HELPER_CLEANUPHEAD(junk1,curr,junk2) \ _p1 += _p1bump##curr; \ if (_STRIDED_HELPER_HAVE2) _p2 += _p2bump##curr; \ if (!--_i##curr) { _i##curr = _count##curr; #define _STRIDED_HELPER_CLEANUPTAIL(junk1,curr,junk2) } #define _STRIDED_HELPER_CLEANUPINIT(junk1,curr,junk2) \ _strided_init[curr] = _count##curr - _i##curr; \ gasneti_assert_uint(_strided_init[curr] ,<, _count##curr); #define _STRIDED_HELPER_CASE(curr,junk1,junk2, countiter, stride1iter, stride2iter) \ case curr+1: { \ GASNETI_META3_ASC##curr(_STRIDED_HELPER_SETUP_BASE, \ _STRIDED_HELPER_SETUP_INT, \ countiter, stride1iter, stride2iter) \ goto _STRIDED_LABEL(curr,BODY); \ GASNETI_META_DES##curr(GASNETI_META_EMPTY,_STRIDED_HELPER_LOOPHEAD) \ for (_i0 = _count0; _i0; _i0--) { \ _STRIDED_LABEL(curr,BODY): ; \ GASNETE_STRIDED_HELPER_LOOPBODY(_p1,_p2); \ _p1 += _p1bump0; \ if (_STRIDED_HELPER_HAVE2) _p2 += _p2bump0; \ if_pf (_STRIDED_HELPER_HAVEPARTIAL && \ --_strided_chunkcnt == 0) \ goto _STRIDED_LABEL(curr,DONE); \ } \ GASNETI_META_ASC##curr(GASNETI_META_EMPTY,_STRIDED_HELPER_LOOPTAIL) \ _STRIDED_LABEL(curr,DONE): ; \ if (_STRIDED_HELPER_HAVEPARTIAL && _strided_update_addr_init) { \ if (!_i0) ; /* loop nest terminated */ \ else if (!--_i0) { _i0 = _count0; \ GASNETI_META_ASC##curr(GASNETI_META_EMPTY,_STRIDED_HELPER_CLEANUPHEAD) \ GASNETI_META_ASC##curr(GASNETI_META_EMPTY,_STRIDED_HELPER_CLEANUPTAIL) \ } \ *_pp1base = _p1; \ if (_STRIDED_HELPER_HAVE2) *_pp2base = _p2; \ else gasneti_assert(_p2 == NULL); \ _strided_init[0] = _count0 - _i0; \ GASNETI_META_ASC##curr(GASNETI_META_EMPTY,_STRIDED_HELPER_CLEANUPINIT) \ } \ } break; #if GASNETE_LOOPING_DIMS > GASNETI_META_MAX #error GASNETE_LOOPING_DIMS must be <= GASNETI_META_MAX #endif #define GASNETE_1STRIDED_HELPER(stridelevels, countiter, p1base, stride1iter) do { \ _STRIDED_HELPER_DECLARE_NO2; \ void *_dummy2 = NULL; \ GASNETE_2STRIDED_HELPER(stridelevels, countiter, p1base, stride1iter, \ _dummy2, SITER_NOOP()); \ } while (0) #define GASNETE_SMD_STRIDED_HELPER(smd) do { \ gasneti_vis_smd_t * const _smd = (smd); \ gasneti_vis_smd_dim_t const * const _sdim = _smd->dim; \ GASNETE_2STRIDED_HELPER(_smd->stridelevels, SITER_SDIM_COUNT(_sdim), \ _smd->addr[SMD_SELF], SITER_SDIM_STRIDE(_sdim, SMD_SELF), \ _smd->addr[SMD_PEER], SITER_SDIM_STRIDE(_sdim, SMD_PEER)); \ } while (0) #define GASNETE_2STRIDED_HELPER(stridelevels, countiter, p1base, stride1iter, p2base, stride2iter) do { \ void ** const _pp1base = &(p1base); \ void ** const _pp2base = &(p2base); \ /* general setup code */ \ uint8_t *_p1 = *_pp1base; \ uint8_t *_p2 = *_pp2base; \ size_t const _stridelevels = (stridelevels); \ gasneti_assert(_stridelevels > 0); /* should never use for degen */ \ if (_STRIDED_HELPER_HAVEPARTIAL && !_strided_addr_already_offset) { \ for (size_t _dim = 0; _dim < _stridelevels; _dim++) { \ _p1 += stride1iter(_dim) * (ptrdiff_t)_strided_init[_dim]; \ if (_STRIDED_HELPER_HAVE2) \ _p2 += stride2iter(_dim) * (ptrdiff_t)_strided_init[_dim]; \ } \ } \ switch (_stridelevels) { \ _CONCAT(GASNETI_META3_ASC, GASNETE_LOOPING_DIMS)( \ GASNETI_META3_EMPTY, _STRIDED_HELPER_CASE, \ countiter, stride1iter, stride2iter) \ default: { /* arbitrary dimensions > GASNETE_LOOPING_DIMS */ \ size_t __idx[GASNETE_DIRECT_DIMS]; \ ptrdiff_t __p1bump[GASNETE_DIRECT_DIMS]; \ ptrdiff_t __p2bump[GASNETE_DIRECT_DIMS]; \ size_t * const _idx = \ (_stridelevels <= GASNETE_DIRECT_DIMS ? __idx : \ gasneti_malloc(_stridelevels*sizeof(size_t))); \ ptrdiff_t * const _p1bump = \ (_stridelevels <= GASNETE_DIRECT_DIMS ? __p1bump : \ gasneti_malloc(_stridelevels*sizeof(ptrdiff_t))); \ ptrdiff_t * const _p2bump = ((!_STRIDED_HELPER_HAVE2 || \ _stridelevels <= GASNETE_DIRECT_DIMS) ? __p2bump : \ gasneti_malloc(_stridelevels*sizeof(ptrdiff_t))); \ _idx[0] = countiter(0); \ _p1bump[0] = stride1iter(0); \ _p2bump[0] = (_STRIDED_HELPER_HAVE2 ? stride2iter(0) : 0); \ for (size_t _d = 1; _d < _stridelevels; _d++) { \ _idx[_d] = countiter(_d); \ _p1bump[_d] = stride1iter(_d) - \ ((ptrdiff_t)_idx[_d-1]) * stride1iter(_d-1); \ if (_STRIDED_HELPER_HAVE2) \ _p2bump[_d] = stride2iter(_d) - \ ((ptrdiff_t)_idx[_d-1]) * stride2iter(_d-1); \ } \ if (_STRIDED_HELPER_HAVEPARTIAL) { \ for (size_t _d = 0; _d < _stridelevels; _d++) { \ gasneti_assert_uint(_strided_init[_d] ,<, _idx[_d]); \ _idx[_d] -= _strided_init[_d]; \ } \ } \ uint8_t const *_p1_truebase = *_pp1base; \ uint8_t const *_p2_truebase = *_pp2base; \ if (GASNETI_DEBUG_P && \ _STRIDED_HELPER_HAVEPARTIAL && _strided_addr_already_offset) { \ for (size_t _d = 0; _d < _stridelevels; _d++) { \ _p1_truebase -= (ptrdiff_t)_strided_init[_d] * stride1iter(_d); \ if (_STRIDED_HELPER_HAVE2) \ _p2_truebase -= (ptrdiff_t)_strided_init[_d] * stride2iter(_d); \ } \ } \ while (1) { /* main iteration loop */ \ _STRIDED_LABEL(general,BODY): ; \ GASNETE_CHECK_PTR(_p1, _p1_truebase, stride1iter, countiter, \ _idx, 1, _stridelevels); \ if (_STRIDED_HELPER_HAVE2) \ GASNETE_CHECK_PTR(_p2, _p2_truebase, stride2iter, countiter, \ _idx, 1, _stridelevels); \ else gasneti_assert(_p2 == NULL); \ GASNETE_STRIDED_HELPER_LOOPBODY(_p1,_p2); \ _p1 += _p1bump[0]; \ if (_STRIDED_HELPER_HAVE2) _p2 += _p2bump[0]; \ if_pf (_STRIDED_HELPER_HAVEPARTIAL && \ --_strided_chunkcnt == 0) break; \ if (--_idx[0] == 0) { /* end 0-level body */ \ for (size_t _d=1; _d < _stridelevels; _d++) { \ _p1 += _p1bump[_d]; \ if (_STRIDED_HELPER_HAVE2) _p2 += _p2bump[_d]; \ if (--_idx[_d]) { /* begin _d-level body */ \ for (size_t _e=_d-1; ; _e--) { /* reset lower idx */ \ _idx[_e] = countiter(_e); \ if (!_e) goto _STRIDED_LABEL(general,BODY); \ } gasneti_unreachable(); \ } \ } \ for (size_t _d=0; _d < _stridelevels; _d++) \ gasneti_assert_uint(_idx[_d] ,==, 0); \ break; /* all _idx[] zero, iteration complete */ \ } \ } \ /* loop cleanup code */ \ if (_STRIDED_HELPER_HAVEPARTIAL && _strided_update_addr_init) { \ if (_idx[0]) { /* early termination */ \ for (size_t _d=0; _d < _stridelevels; _d++) { \ if (--_idx[_d] == 0) { _idx[_d] = countiter(_d); \ if (_d+1 < _stridelevels) { \ _p1 += _p1bump[_d+1]; \ if (_STRIDED_HELPER_HAVE2) _p2 += _p2bump[_d+1]; \ } \ } else break; \ } \ *_pp1base = _p1; \ if (_STRIDED_HELPER_HAVE2) *_pp2base = _p2; \ else gasneti_assert(_p2 == NULL); \ for (size_t _d = 0; _d < _stridelevels; _d++) { \ _strided_init[_d] = countiter(_d) - _idx[_d]; \ gasneti_assert_uint(_strided_init[_d] ,<, countiter(_d)); \ } \ } \ } \ if (_stridelevels > GASNETE_DIRECT_DIMS) { \ gasneti_free(_idx); \ gasneti_free(_p1bump); \ if (_STRIDED_HELPER_HAVE2) gasneti_free(_p2bump); \ } \ } /* default */ \ } /* switch */ \ } while (0) #if GASNET_DEBUG /* assert the generalized looping code is functioning properly */ #define GASNETE_CHECK_PTR(ploc, truebase, strideiter, countiter, idx, invertidx, stridelevels) do { \ uint8_t const *_ptest = (truebase); \ for (size_t _d=0; _d < (stridelevels); _d++) { \ size_t _thisidx = (idx)[_d]; \ if (invertidx) _thisidx = countiter(_d) - _thisidx; \ gasneti_assert_uint(_thisidx ,<, countiter(_d)); \ _ptest += _thisidx * strideiter(_d); \ } \ gasneti_assert_ptr(_ptest ,==, (ploc)); \ } while (0) #else #define GASNETE_CHECK_PTR(ploc, truebase, strideiter, countiter, idx, invertidx, stridelevels) ((void)0) #endif /*---------------------------------------------------------------------------------*/ /* reference version that uses individual puts of the dualcontiguity size */ gex_Event_t gasnete_puts_ref_indiv(gasneti_vis_smd_t * const smd, gasnete_synctype_t const synctype, gex_TM_t const tm, gex_Rank_t const rank, gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, PUTS_REF_INDIV); gasneti_assert(smd->elemsz > 0); gasneti_assert(smd->stridelevels > 0); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); gex_Event_t * const lc_opt = (flags & GEX_FLAG_ENABLE_LEAF_LC) ? GEX_EVENT_GROUP : GEX_EVENT_DEFER; GASNETE_START_NBIREGION(synctype); size_t const elemsz = smd->elemsz; #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) \ GASNETE_PUT_INDIV(tm, rank, p2, p1, elemsz, lc_opt) GASNETE_SMD_STRIDED_HELPER(smd); #undef GASNETE_STRIDED_HELPER_LOOPBODY GASNETE_END_NBIREGION_AND_RETURN(synctype); } /* reference version that uses individual gets of the dualcontiguity size */ gex_Event_t gasnete_gets_ref_indiv(gasneti_vis_smd_t * const smd, gasnete_synctype_t const synctype, gex_TM_t const tm, gex_Rank_t const rank, gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, GETS_REF_INDIV); gasneti_assert(smd->elemsz > 0); gasneti_assert(smd->stridelevels > 0); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); GASNETE_START_NBIREGION(synctype); size_t const elemsz = smd->elemsz; #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) \ GASNETE_GET_INDIV(tm, rank, p1, p2, elemsz) GASNETE_SMD_STRIDED_HELPER(smd); #undef GASNETE_STRIDED_HELPER_LOOPBODY GASNETE_END_NBIREGION_AND_RETURN(synctype); } // perform a loopback/PSHM memcpy of a strided area void gasnete_strided_memcpy(void * dstbase, void * srcbase, size_t const stridelevels, size_t const elemsz, gasneti_vis_smd_dim_t const * const sdim, int srcside) { gasneti_assert(elemsz > 0); gasneti_assert(stridelevels > 0); #define SITER_SRC_STRIDE(idx) sdim[idx].stride[srcside] #define SITER_DST_STRIDE(idx) sdim[idx].stride[!srcside] #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) \ GASNETI_MEMCPY(p1, p2, elemsz) GASNETE_2STRIDED_HELPER(stridelevels, SITER_SDIM_COUNT(sdim), dstbase, SITER_DST_STRIDE, srcbase, SITER_SRC_STRIDE); #undef SITER_SRC_STRIDE #undef SITER_DST_STRIDE #undef GASNETE_STRIDED_HELPER_LOOPBODY } #if GASNETE_PARTIALPACK_TEST && GASNET_DEBUG // Test code for partial packing void gasnete_partialpack_memcpy(void * dstbase, void * srcbase, size_t const stridelevels, size_t const elemsz, gasneti_vis_smd_dim_t const * const sdim, int srcside) { gasneti_assert(elemsz > 0); gasneti_assert(stridelevels > 0); #define SITER_SRC_STRIDE(idx) sdim[idx].stride[srcside] #define SITER_DST_STRIDE(idx) sdim[idx].stride[!srcside] #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) \ do { GASNETI_MEMCPY(p1, p2, elemsz); invchunks++; } while (0) size_t total_chunks = 1; for (size_t d = 0; d < stridelevels; d++) total_chunks *= sdim[d].count; size_t *init = gasneti_calloc(stridelevels, sizeof(size_t)); size_t *tmpv = gasneti_calloc(stridelevels, sizeof(size_t)); int iter = 0; void *psrc = srcbase; void *pdst = dstbase; while (total_chunks) { size_t numchunks = (total_chunks + 1)/2; size_t invchunks = 0; int addr_already_offset = iter % 2; if (!addr_already_offset) { psrc = srcbase; pdst = dstbase; } GASNETE_STRIDED_HELPER_DECLARE_PARTIAL(numchunks, init, addr_already_offset, 1); GASNETE_2STRIDED_HELPER(stridelevels, SITER_SDIM_COUNT(sdim), pdst, SITER_DST_STRIDE, psrc, SITER_SRC_STRIDE); gasneti_assert_uint(invchunks ,==, numchunks); if (total_chunks > numchunks) { // partial outputs only valid when there are trailing elements GASNETE_STRIDED_VECTOR_INC(tmpv, numchunks, SITER_SDIM_COUNT(sdim), stridelevels); GASNETE_CHECK_PTR(psrc, srcbase, SITER_SRC_STRIDE, SITER_SDIM_COUNT(sdim), tmpv, 0, stridelevels); GASNETE_CHECK_PTR(pdst, dstbase, SITER_DST_STRIDE, SITER_SDIM_COUNT(sdim), tmpv, 0, stridelevels); for (size_t d = 0; d < stridelevels; d++) gasneti_assert_uint(init[d] ,==, tmpv[d]); } total_chunks -= numchunks; iter++; } gasneti_free(init); gasneti_free(tmpv); #undef SITER_SRC_STRIDE #undef SITER_DST_STRIDE #undef GASNETE_STRIDED_HELPER_LOOPBODY } #define gasnete_strided_memcpy gasnete_partialpack_memcpy #endif #if _DISABLED_STUFF_ /*---------------------------------------------------------------------------------*/ /* strided full packing */ #define _GASNETE_STRIDED_PACKALL() { \ uint8_t *ploc = buf; \ size_t const contiglevel = gasnete_strided_contiguity(strides, count, stridelevels); \ size_t const limit = stridelevels - gasnete_strided_nulldims(count, stridelevels); \ size_t const contigsz = (contiglevel == 0 ? count[0] : \ count[contiglevel]*strides[contiglevel-1]); \ /* macro interface */ \ void * srcaddr = addr; \ size_t const * const srcstrides = strides; \ GASNETE_STRIDED_HELPER_DECLARE_NODST; \ GASNETE_STRIDED_HELPER(limit,contiglevel); \ } #define GASNETE_STRIDED_HELPER_LOOPBODY(psrc,pdst) do { \ GASNETI_MEMCPY(ploc, psrc, contigsz); \ ploc += contigsz; \ } while (0) void gasnete_strided_pack_all(void *addr, const size_t strides[], const size_t count[], size_t stridelevels, void *buf) _GASNETE_STRIDED_PACKALL() #undef GASNETE_STRIDED_HELPER_LOOPBODY #define GASNETE_STRIDED_HELPER_LOOPBODY(psrc,pdst) do { \ GASNETI_MEMCPY(psrc, ploc, contigsz); \ ploc += contigsz; \ } while (0) void gasnete_strided_unpack_all(void *addr, const size_t strides[], const size_t count[], size_t stridelevels, void *buf) _GASNETE_STRIDED_PACKALL() #undef GASNETE_STRIDED_HELPER_LOOPBODY /*---------------------------------------------------------------------------------*/ /* simple gather put, remotely contiguous */ /* NOTE: The remotecontig implementations for strided are outdated and not currently functional */ #ifndef GASNETE_PUTS_GATHER_SELECTOR #if GASNETE_USE_REMOTECONTIG_GATHER_SCATTER gex_Event_t gasnete_puts_gather(gasnete_strided_stats_t const *stats, gasnete_synctype_t synctype, gex_Rank_t dstnode, void *dstaddr, const size_t dststrides[], void *srcaddr, const size_t srcstrides[], const size_t count[], size_t stridelevels GASNETI_THREAD_FARG) { gasnete_vis_threaddata_t * const td = GASNETE_VIS_MYTHREAD; size_t const nbytes = stats->_totalsz; gasneti_assert(stats->_dstcontiguity == stridelevels && stats->_srccontiguity < stridelevels); /* only supports gather put */ gasneti_assert(dstnode != gasneti_mynode); /* silly to use for local cases */ gasneti_assert(nbytes > 0); GASNETI_TRACE_EVENT(C, PUTS_GATHER); { gasneti_vis_op_t * const visop = gasnete_visbuf_malloc(sizeof(gasneti_vis_op_t)+nbytes); void * const packedbuf = visop + 1; gasnete_strided_pack_all(srcaddr, srcstrides, count, stridelevels, packedbuf); visop->type = GASNETI_VIS_CAT_PUTS_GATHER; visop->event = gasnete_put_nb(gasneti_THUNK_TM, dstnode, dstaddr, packedbuf, nbytes, GEX_EVENT_DEFER, 0 GASNETI_THREAD_PASS); gasneti_assert(visop->event != GEX_EVENT_INVALID); GASNETE_PUSH_VISOP_RETURN(td, visop, synctype, 0, (void)0); } } #define GASNETE_PUTS_GATHER_SELECTOR(stats,synctype,dstnode,dstaddr,dststrides,srcaddr,srcstrides,count,stridelevels) \ if (gasnete_vis_use_remotecontig && \ (stats)->_dstcontiguity == stridelevels && (stats)->_srccontiguity < stridelevels) \ return gasnete_puts_gather(stats,synctype,dstnode,dstaddr,dststrides,srcaddr,srcstrides,count,stridelevels GASNETI_THREAD_PASS) #else #define GASNETE_PUTS_GATHER_SELECTOR(stats,synctype,dstnode,dstaddr,dststrides,srcaddr,srcstrides,count,stridelevels) ((void)0) #endif #endif /* simple scatter get, remotely contiguous */ #ifndef GASNETE_GETS_SCATTER_SELECTOR #if GASNETE_USE_REMOTECONTIG_GATHER_SCATTER gex_Event_t gasnete_gets_scatter(gasnete_strided_stats_t const *stats, gasnete_synctype_t synctype, void *dstaddr, const size_t dststrides[], gex_Rank_t srcnode, void *srcaddr, const size_t srcstrides[], const size_t count[], size_t stridelevels GASNETI_THREAD_FARG) { gasnete_vis_threaddata_t * const td = GASNETE_VIS_MYTHREAD; size_t const nbytes = stats->_totalsz; gasneti_assert(stats->_srccontiguity == stridelevels && stats->_dstcontiguity < stridelevels); /* only supports scatter get */ gasneti_assert(srcnode != gasneti_mynode); /* silly to use for local cases */ gasneti_assert(nbytes > 0); GASNETI_TRACE_EVENT(C, GETS_SCATTER); { gasneti_vis_op_t * const visop = gasnete_visbuf_malloc(sizeof(gasneti_vis_op_t)+(2*stridelevels+1)*sizeof(size_t)+nbytes); size_t * const savedstrides = (size_t *)(visop + 1); size_t * const savedcount = savedstrides + stridelevels; void * const packedbuf = (void *)(savedcount + stridelevels + 1); GASNETI_MEMCPY(savedstrides, dststrides, stridelevels*sizeof(size_t)); GASNETI_MEMCPY(savedcount, count, (stridelevels+1)*sizeof(size_t)); visop->type = GASNETI_VIS_CAT_GETS_SCATTER; visop->addr = dstaddr; visop->len = stridelevels; visop->event = gasnete_get_nb(gasneti_THUNK_TM, packedbuf, srcnode, srcaddr, nbytes, 0 GASNETI_THREAD_PASS); gasneti_assert(visop->event != GEX_EVENT_INVALID); GASNETE_PUSH_VISOP_RETURN(td, visop, synctype, 1, (void)0); } } #define GASNETE_GETS_SCATTER_SELECTOR(stats,synctype,dstaddr,dststrides,srcnode,srcaddr,srcstrides,count,stridelevels) \ if (gasnete_vis_use_remotecontig && \ (stats)->_srccontiguity == stridelevels && (stats)->_dstcontiguity < stridelevels) \ return gasnete_gets_scatter(stats,synctype,dstaddr,dststrides,srcnode,srcaddr,srcstrides,count,stridelevels GASNETI_THREAD_PASS) #else #define GASNETE_GETS_SCATTER_SELECTOR(stats,synctype,dstaddr,dststrides,srcnode,srcaddr,srcstrides,count,stridelevels) ((void)0) #endif #endif #endif // DISABLED /*---------------------------------------------------------------------------------*/ /* Pipelined AM gather-scatter put */ #if GASNETE_USE_AMPIPELINE && !defined(GASNETE_PUTS_AMPIPELINE) #define GASNETE_PUTS_AMPIPELINE 1 #define _GASNETE_PUTS_AMPIPELINE_MAXPACKET(tm,rank,stridelevels,args) \ gex_AM_MaxRequestMedium((tm),(rank), \ (GASNETE_VIS_NPAM ? NULL : GEX_EVENT_NOW), \ (GASNETE_VIS_NPAM ? GEX_FLAG_AM_PREPARE_LEAST_ALLOC : 0), \ args) #define GASNETE_PUTS_AMPIPELINE_MAXPACKET(tm,rank,stridelevels) \ _GASNETE_PUTS_AMPIPELINE_MAXPACKET(tm,rank,stridelevels,HARGS(5,7)) #define GASNETE_PUTS_AMPIPELINE1_MAXPACKET(tm,rank,stridelevels) \ _GASNETE_PUTS_AMPIPELINE_MAXPACKET( tm,rank,stridelevels,HARGS(4,6)) #define GASNETE_PUTS_AMPIPELINE_PACKETOVERHEAD(stridelevels) ((stridelevels)*(2*sizeof(size_t)+sizeof(ptrdiff_t))) #define GASNETE_PUTS_AMPIPELINE1_PACKETOVERHEAD(stridelevels) ((stridelevels)*(sizeof(size_t)+sizeof(ptrdiff_t))) #define GASNETE_PUTS_AMPIPELINE_MAXPAYLOAD(tm,rank,stridelevels) \ ((ptrdiff_t)GASNETE_PUTS_AMPIPELINE_MAXPACKET(tm,rank,stridelevels) - (ptrdiff_t)GASNETE_PUTS_AMPIPELINE_PACKETOVERHEAD(stridelevels)) GASNETI_NEVER_INLINE(gasnete_puts_AMPipeline, gex_Event_t gasnete_puts_AMPipeline(gasneti_vis_smd_t * const smd, gasnete_synctype_t const synctype, gex_TM_t const tm, gex_Rank_t const rank, gex_Flags_t flags GASNETI_THREAD_FARG)) { GASNETI_TRACE_EVENT(C, PUTS_AMPIPELINE); gasneti_assert(smd->have_stats); gasneti_assert(smd->elemsz > 0); gasneti_assert(smd->stridelevels > 0); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); // temporary storage: (smd scratch for NPAM, otherwise malloc) // init[stridelevels] | count[stridelevels] | peer_strides[stridelevels] // // packet data: // packet_init[stridelevels] - cloned from local init[] during packing // - omitted for single-packet // count[stridelevels] - copied from smd // peer_strides[stridelevels] - copied from smd // packed data, to fill up to MaxRequestMedium() // packetchunks complete chunks of elemsz granularity // no partial chunks // // AM Request args: (single-packet) // &op_addr, dstaddr, (int)stridelevels, (int)elemsz // AM Request args: (multi-packet) // &access_region_iop, dstaddr, (int)stridelevels, (int)elemsz, (int)packetchunks // // Each request handler unpacks into destination and sends a reply to markdone(1) the iop // // TODO-EX: consider growing chunksize to lcontig_sz[SMD_PEER]: // thus removing lcontig_dims[SMD_PEER] entries from the 2-3 metadata arrays on the wire // and increasing the granularity of the unpack operation at the peer. // The cost is coarser granularity in the chunking decreases the packet occupancy of the payload // Implementation would simply require shrinking all the stridelevels above (and growing elemsz), // except for local_init[], which is deliberately positioned to allow sending the suffix // gasneti_vis_smd_dim_t const * const sdim = smd->dim; const void * BUG4158_WORKAROUND dstaddr = smd->addr[SMD_PEER]; size_t const stridelevels = smd->stridelevels; size_t const chunksz = smd->elemsz; size_t const totalchunks = smd->elemcnt; size_t const totalsz = smd->totalsz; gasneti_assert_uint(chunksz*totalchunks ,==, totalsz); size_t const maxpacket1 = GASNETE_PUTS_AMPIPELINE1_MAXPACKET(tm,rank,stridelevels); size_t const headersz1 = GASNETE_PUTS_AMPIPELINE1_PACKETOVERHEAD(stridelevels); size_t const maxpayload1 = maxpacket1 - headersz1; gasneti_assert_uint(headersz1 + chunksz ,<=, maxpacket1); if (totalsz <= maxpayload1) { // TODO-EX: could squeeze in more by trimming packet_init and packetchunks // *** simplified path: entire payload fits in a single MaxMedium packet size_t const packetsz = headersz1 + totalsz; gex_Event_t handle; void *op; GASNETE_START_ONEOP(op, handle, synctype, 0); #if GASNETE_VIS_NPAM gex_AM_SrcDesc_t sd = gex_AM_PrepareRequestMedium(tm, rank, NULL, packetsz, packetsz, NULL, 0, HARGS(4,6)); void * const packetbase = gex_AM_SrcDescAddr(sd); gasneti_assert_uint(gex_AM_SrcDescSize(sd) ,>=, packetsz); #else void * const packetbase = gasnete_visbuf_malloc(packetsz); #endif size_t * const packetcount = packetbase; ptrdiff_t * const packetstrides = (ptrdiff_t*)(packetcount + stridelevels); void * const packedbuf = packetstrides + stridelevels; gasneti_assume(packedbuf == (uint8_t*)packetbase + headersz1); // setup the packet header for (size_t d = 0; d < stridelevels; d++) { packetcount[d] = sdim[d].count; packetstrides[d] = sdim[d].stride[SMD_PEER]; } void * srcaddr = smd->addr[SMD_SELF]; if (smd->lcontig_dims[SMD_SELF] == stridelevels) { // source is contiguous GASNETI_MEMCPY(packedbuf, srcaddr, totalsz); } else { // gather data payload from source into packet uint8_t *pbuf = packedbuf; #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) do { \ GASNETI_MEMCPY(pbuf, p1, chunksz); pbuf += chunksz; \ } while (0) GASNETE_1STRIDED_HELPER(stridelevels, SITER_SDIM_COUNT(sdim), srcaddr, SITER_SDIM_STRIDE(sdim,SMD_SELF)); #undef GASNETE_STRIDED_HELPER_LOOPBODY gasneti_assert_ptr(pbuf ,==, (uint8_t*)packetbase + packetsz); } // send packet gasneti_assert_uint(stridelevels ,==, (size_t)(uint32_t)(gex_AM_Arg_t)stridelevels); gasneti_assert_uint(chunksz ,==, (size_t)(uint32_t)(gex_AM_Arg_t)chunksz); #define ARGS PACK(op), PACK(dstaddr), stridelevels, chunksz #if GASNETE_VIS_NPAM == 0 gex_AM_RequestMedium(tm, rank, gasneti_handleridx(gasnete_puts_AMPipeline1_reqh), packetbase, packetsz, GEX_EVENT_NOW, 0, ARGS); gasneti_free(packetbase); #else gex_AM_CommitRequestMedium(sd, gasneti_handleridx(gasnete_puts_AMPipeline1_reqh), packetsz, ARGS); #endif #undef ARGS GASNETE_RETURN_ONEOP(handle, synctype); } // *** general multi-packet path GASNETE_START_NBIREGION(synctype); size_t const maxpacket = GASNETE_PUTS_AMPIPELINE_MAXPACKET(tm,rank,stridelevels); size_t const headersz = GASNETE_PUTS_AMPIPELINE_PACKETOVERHEAD(stridelevels); size_t const maxpayload = maxpacket - headersz; gasneti_assert_uint(headersz + chunksz ,<=, maxpacket); #if GASNETE_VIS_NPAM void * const header = SMD_SCRATCH(smd,stridelevels); size_t * const init = header; size_t * const packetinit = init; #else size_t * const init = gasnete_visbuf_malloc(stridelevels*sizeof(size_t) + maxpacket); void * const packetbase = init + stridelevels; size_t * const packetinit = packetbase; void * const packedbuf = (uint8_t*)packetbase + headersz; #endif size_t * const packetcount = packetinit + stridelevels; ptrdiff_t * const packetstrides = (ptrdiff_t*)(packetcount + stridelevels); // setup the packet header memset(init,0,stridelevels*sizeof(size_t)); /* init[] = [0..0] */ for (size_t d = 0; d < stridelevels; d++) { packetcount[d] = sdim[d].count; packetstrides[d] = sdim[d].stride[SMD_PEER]; } #if GASNETE_VIS_NPAM < 2 size_t const chunksperpacket = maxpayload / chunksz; size_t const packetcnt = (totalchunks + chunksperpacket - 1)/chunksperpacket; gasneti_iop_t * const iop = gasneti_iop_register(packetcnt,0 GASNETI_THREAD_PASS); gasneti_assert(chunksperpacket >= 1); #endif // packetization loop void *srcaddr = smd->addr[SMD_SELF]; size_t remaining = totalchunks; do { // obtain NPAM buffer, populate packet header and compute packetchunks #if GASNETE_VIS_NPAM < 2 size_t const packetchunks = MIN(chunksperpacket, remaining); #endif #if GASNETE_VIS_NPAM == 0 GASNETI_MEMCPY(packetinit, init, stridelevels*sizeof(size_t)); #elif GASNETE_VIS_NPAM == 1 #define min_length maxpacket #define max_length maxpacket #elif GASNETE_VIS_NPAM == 2 #define min_length (headersz + chunksz) #define max_length (headersz + remaining*chunksz) #else #error unrecognized GASNETE_VIS_NPAM setting #endif #if GASNETE_VIS_NPAM gex_AM_SrcDesc_t sd = gex_AM_PrepareRequestMedium(tm, rank, NULL, min_length, max_length, NULL, 0, HARGS(5,7)); void * const packetbase = gex_AM_SrcDescAddr(sd); gasneti_assert_uint(gex_AM_SrcDescSize(sd) ,>=, min_length); GASNETI_MEMCPY(packetbase, header, headersz); void * const packedbuf = (uint8_t*)packetbase + headersz; #undef min_length #undef max_length #endif #if GASNETE_VIS_NPAM == 2 size_t const packetchunks = ( gex_AM_SrcDescSize(sd) - headersz ) / chunksz; gasneti_iop_t * const iop = gasneti_iop_register(1,0 GASNETI_THREAD_PASS); #endif remaining -= packetchunks; // fill packet with data size_t packetsz; if (smd->lcontig_dims[SMD_SELF] == stridelevels) { // source is contiguous packetsz = packetchunks*chunksz; GASNETI_MEMCPY(packedbuf, srcaddr, packetsz); srcaddr = ((uint8_t *)srcaddr) + packetsz; packetsz += headersz; if (remaining) GASNETE_STRIDED_VECTOR_INC(init, packetchunks, SITER_SDIM_COUNT(sdim), stridelevels); } else { // gather data payload from source into packet uint8_t *pbuf = packedbuf; #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) do { \ GASNETI_MEMCPY(pbuf, p1, chunksz); pbuf += chunksz; \ } while (0) GASNETE_STRIDED_HELPER_DECLARE_PARTIAL(packetchunks, init, 1, remaining); GASNETE_1STRIDED_HELPER(stridelevels, SITER_SDIM_COUNT(sdim), srcaddr, SITER_SDIM_STRIDE(sdim,SMD_SELF)); #undef GASNETE_STRIDED_HELPER_LOOPBODY packetsz = pbuf - (uint8_t*)packetbase; gasneti_assert_uint(packetsz ,==, headersz + packetchunks * chunksz); } // send packet #if GASNETE_VIS_NPAM < 2 gasneti_assert_uint(packetsz ,<=, maxpacket); #endif gasneti_assert_uint(stridelevels ,==, (size_t)(uint32_t)(gex_AM_Arg_t)stridelevels); gasneti_assert_uint(chunksz ,==, (size_t)(uint32_t)(gex_AM_Arg_t)chunksz); gasneti_assert_uint(packetchunks ,==, (size_t)(uint32_t)(gex_AM_Arg_t)packetchunks); #define ARGS PACK(iop), PACK(dstaddr), stridelevels, chunksz, packetchunks #if GASNETE_VIS_NPAM == 0 gex_AM_RequestMedium(tm, rank, gasneti_handleridx(gasnete_puts_AMPipeline_reqh), packetbase, packetsz, GEX_EVENT_NOW, 0, ARGS); #else gex_AM_CommitRequestMedium(sd, gasneti_handleridx(gasnete_puts_AMPipeline_reqh), packetsz, ARGS); #endif #undef ARGS } while (remaining); // packetization loop #if !GASNETE_VIS_NPAM gasneti_free(init); #endif GASNETE_END_NBIREGION_AND_RETURN(synctype); } /* ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasnete_puts_AMPipeline1_reqh_inner) void gasnete_puts_AMPipeline1_reqh_inner(gex_Token_t token, void *addr, size_t nbytes, void *op, void *dstaddr, gex_AM_Arg_t _stridelevels, gex_AM_Arg_t _chunksz) { // marshall inputs size_t const stridelevels = (uint32_t)_stridelevels; size_t const chunksz = (uint32_t)_chunksz; size_t const * const packetcount = addr; ptrdiff_t const * const packetstrides = (ptrdiff_t*)(packetcount + stridelevels); void const * const packedbuf = packetstrides + stridelevels; // unpack data into destination uint8_t const * psrc = packedbuf; #if GASNET_DEBUG size_t packetchunks=1; for (size_t i=0; i < stridelevels; i++) packetchunks *= packetcount[i]; gasneti_assert(packetchunks > 0); gasneti_assert_uint(psrc - (uint8_t*)addr + packetchunks * chunksz ,==, nbytes); #endif #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) do { \ GASNETI_MEMCPY(p1, psrc, chunksz); psrc += chunksz; \ } while (0) GASNETE_1STRIDED_HELPER(stridelevels, SITER_ARRAY(packetcount), dstaddr, SITER_ARRAY(packetstrides)); gasneti_assert_uint(psrc - (uint8_t *)addr ,==, nbytes); #undef GASNETE_STRIDED_HELPER_LOOPBODY gex_AM_ReplyShort(token, gasneti_handleridx(gasnete_puts_AMPipeline1_reph), 0, PACK(op)); } MEDIUM_HANDLER(gasnete_puts_AMPipeline1_reqh,4,6, (token,addr,nbytes, UNPACK(a0), UNPACK(a1), a2,a3), (token,addr,nbytes, UNPACK2(a0, a1), UNPACK2(a2, a3), a4,a5)); /* ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasnete_puts_AMPipeline1_reph_inner) void gasnete_puts_AMPipeline1_reph_inner(gex_Token_t token, void *_op) { if (gasneti_op_is_eop(_op)) { gasneti_eop_t * eop = _op; gasneti_eop_markdone(eop); } else { gasneti_iop_t * iop = _op; gasneti_iop_markdone(iop, 1, 0); } } SHORT_HANDLER(gasnete_puts_AMPipeline1_reph,1,2, (token, UNPACK(a0)), (token, UNPACK2(a0, a1))); /* ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasnete_puts_AMPipeline_reqh_inner) void gasnete_puts_AMPipeline_reqh_inner(gex_Token_t token, void *addr, size_t nbytes, void *iop, void *dstaddr, gex_AM_Arg_t _stridelevels, gex_AM_Arg_t _chunksz, gex_AM_Arg_t _packetchunks) { // marshall inputs size_t const stridelevels = (uint32_t)_stridelevels; size_t const chunksz = (uint32_t)_chunksz; size_t const packetchunks = (uint32_t)_packetchunks; size_t * const packetinit = addr; size_t const * const packetcount = packetinit + stridelevels; ptrdiff_t const * const packetstrides = (ptrdiff_t*)(packetcount + stridelevels); void const * const packedbuf = packetstrides + stridelevels; // unpack data into destination uint8_t const * psrc = packedbuf; gasneti_assert_uint(psrc - (uint8_t*)addr + packetchunks * chunksz ,==, nbytes); #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) do { \ GASNETI_MEMCPY(p1, psrc, chunksz); psrc += chunksz; \ } while (0) GASNETE_STRIDED_HELPER_DECLARE_PARTIAL(packetchunks, packetinit, 0, 0); GASNETE_1STRIDED_HELPER(stridelevels, SITER_ARRAY(packetcount), dstaddr, SITER_ARRAY(packetstrides)); gasneti_assert_uint(psrc - (uint8_t *)addr ,==, nbytes); #undef GASNETE_STRIDED_HELPER_LOOPBODY /* TODO: coalesce acknowledgements - need a per-srcnode, per-op seqnum & packetcnt */ gex_AM_ReplyShort(token, gasneti_handleridx(gasnete_putvis_AMPipeline_reph), 0, PACK(iop)); } MEDIUM_HANDLER(gasnete_puts_AMPipeline_reqh,5,7, (token,addr,nbytes, UNPACK(a0), UNPACK(a1), a2,a3,a4), (token,addr,nbytes, UNPACK2(a0, a1), UNPACK2(a2, a3), a4,a5,a6)); #endif // GASNETE_PUTS_AMPIPELINE #ifndef GASNETE_PUTS_AMPIPELINE_SELECTOR #if GASNETE_PUTS_AMPIPELINE #define GASNETE_PUTS_AMPIPELINE_SELECTOR(RETURN,smd,synctype,tm,rank,flags) do { \ if ((ptrdiff_t)smd->elemsz <= MIN((ptrdiff_t)gasnete_vis_put_maxchunk, \ GASNETE_PUTS_AMPIPELINE_MAXPAYLOAD(tm,rank,stridelevels)) \ ) { gasneti_assert(gasnete_vis_use_ampipe); \ RETURN(gasnete_puts_AMPipeline(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ } } while (0) #else #define GASNETE_PUTS_AMPIPELINE_SELECTOR(RETURN,smd,synctype,tm,rank,flags) ((void)0) #endif #endif /*---------------------------------------------------------------------------------*/ /* Pipelined AM gather-scatter get */ #if GASNETE_USE_AMPIPELINE && !defined(GASNETE_GETS_AMPIPELINE) #define GASNETE_GETS_AMPIPELINE 1 #define GASNETE_GETS_AMPIPELINE_REQUESTSZ(stridelevels) ((stridelevels)*(sizeof(size_t)+sizeof(ptrdiff_t))) #define GASNETE_GETS_AMPIPELINE_MAXREQUEST(tm,rank) MIN(gex_AM_MaxRequestMedium((tm),(rank),GEX_EVENT_GROUP,0,HARGS(6,9)), \ gex_AM_MaxRequestMedium((tm),(rank),GEX_EVENT_NOW, 0,HARGS(6,9))) #define GASNETE_GETS_AMPIPELINE_MAXREPLY(tm,rank) gex_AM_MaxReplyMedium((tm),(rank), \ (GASNETE_VIS_NPAM ? NULL : GEX_EVENT_NOW), \ (GASNETE_VIS_NPAM ? GEX_FLAG_AM_PREPARE_LEAST_ALLOC : 0) , \ HARGS(2,3)) #define GASNETE_GETS_AMPIPELINE_REPLYOVERHEAD(stridelevels) ((stridelevels)*sizeof(size_t)) #define GASNETE_GETS_AMPIPELINE_MAXPAYLOAD(tm,rank,stridelevels) \ ((ptrdiff_t)GASNETE_GETS_AMPIPELINE_MAXREPLY(tm,rank) - (ptrdiff_t)GASNETE_GETS_AMPIPELINE_REPLYOVERHEAD(stridelevels)) GASNETI_NEVER_INLINE(gasnete_gets_AMPipeline, gex_Event_t gasnete_gets_AMPipeline(gasneti_vis_smd_t * const smd, gasnete_synctype_t const synctype, gex_TM_t const tm, gex_Rank_t const rank, gex_Flags_t flags GASNETI_THREAD_FARG)) { GASNETI_TRACE_EVENT(C, GETS_AMPIPELINE); gasneti_assert(smd->have_stats); gasneti_assert(smd->elemsz > 0); gasneti_assert(smd->stridelevels > 0); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); // visop storage: (malloc) // .count = stridelevels // .len = elemsz // .addr = dstaddr // table self_strides[stridelevels] - copied from smd // table count[stridelevels] - copied from smd // Request packet data // // Request packet data: // count[stridelevels] - copied from smd // peer_strides[stridelevels] - copied from smd // // AM Request args: // &visop, srcaddr, (uintptr_t)initchunk, (int)stridelevels, (int)elemsz, (int)packetchunks // // Packetization partitions data to fit replies into MaxReplyMedium(): // packetchunks complete chunks of elemsz granularity // no partial chunks // // Each request handler calculates packet_init[] from initchunk, // allocs MaxReplyMedium() temporary storage, // packs source data there, sends and then frees. // // AM Reply args: // &visop, (int)packetchunks // Payload is: packet_init[stridelevels] | packed data // // Reply handler retrieves dstaddr, elemsz, count[], self_strides[] from visop // and uses it to unpack data into destination // weakatomic dec-and-test on visop->packetcnt to VISOP_SIGNAL // // TODO-EX: consider growing chunksize to lcontig_sz[SMD_PEER]: // thus removing lcontig_dims[SMD_PEER] entries from the metadata arrays on the wire // and increasing the granularity of the pack operation at the peer. // The cost is coarser granularity in the chunking decreases the packet occupancy of the reply payload // Implementation would require shrinking all the stridelevels on the wire (and growing elemsz), // reply handler would need to copy packet_init[] to a temporary location (where?) size_t const stridelevels = smd->stridelevels; size_t const chunksz = smd->elemsz; size_t const totalchunks = smd->elemcnt; // setup visop, which is used to during AM reply processing size_t const visopsz = sizeof(gasneti_vis_op_t) + stridelevels*sizeof(ptrdiff_t) // table self_strides[] + stridelevels*sizeof(size_t) // table/packet count[] + stridelevels*sizeof(ptrdiff_t); // packet peer_strides[] gasneti_vis_op_t * const visop = gasnete_visbuf_malloc(visopsz); // TODO-EX: ideally use auxseg here to speed injection GASNETE_VISOP_SETUP(visop, synctype, 1); gasneti_eop_t *eop = visop->eop; // visop may disappear once the last AM is launched visop->count = stridelevels; visop->len = chunksz; visop->addr = smd->addr[SMD_SELF]; #if GASNET_DEBUG visop->type = GASNETI_VIS_CAT_GETS_AMPIPELINE; #endif // setup the table and packet header void * const tablebase = visop + 1; ptrdiff_t * const self_strides = tablebase; size_t * const count = (size_t*)(self_strides + stridelevels); ptrdiff_t * const peer_strides = (ptrdiff_t*)(count + stridelevels); void * const header = count; size_t const headersz = (uint8_t*)&peer_strides[stridelevels] - (uint8_t*)header; void * BUG4158_WORKAROUND srcaddr = smd->addr[SMD_PEER]; for (size_t d = 0; d < stridelevels; d++) { count[d] = smd->dim[d].count; peer_strides[d] = smd->dim[d].stride[SMD_PEER]; self_strides[d] = smd->dim[d].stride[SMD_SELF]; } gasneti_assert_uint(chunksz*totalchunks ,==, smd->totalsz); gasneti_assert_uint(headersz ,==, GASNETE_GETS_AMPIPELINE_REQUESTSZ(stridelevels)); gasneti_assert_uint(headersz ,<=, GASNETE_GETS_AMPIPELINE_MAXREQUEST(tm,rank)); ptrdiff_t const maxpayload = GASNETE_GETS_AMPIPELINE_MAXPAYLOAD(tm,rank,stridelevels); gasneti_assert_uint(maxpayload ,>=, chunksz); gasneti_assert_uint(stridelevels ,==, (size_t)(uint32_t)(gex_AM_Arg_t)stridelevels); gasneti_assert_uint(chunksz ,==, (size_t)(uint32_t)(gex_AM_Arg_t)chunksz); if (smd->totalsz <= maxpayload) { // optimized single-packet case gasneti_weakatomic_set(&(visop->packetcnt), 1, GASNETI_ATOMIC_WMB_POST); gex_AM_RequestMedium(tm, rank, gasneti_handleridx(gasnete_gets_AMPipeline_reqh), header, headersz, GEX_EVENT_NOW, 0, PACK(visop), PACK(srcaddr), PACK((uintptr_t)0), stridelevels, chunksz, totalchunks); } else { size_t const chunksperpacket = (size_t)maxpayload / chunksz; size_t const packetcnt = (totalchunks + chunksperpacket - 1)/chunksperpacket; gasneti_assert(chunksperpacket >= 1); gasneti_assert_uint(packetcnt ,<=, GASNETI_ATOMIC_MAX); gasneti_weakatomic_set(&(visop->packetcnt), packetcnt, GASNETI_ATOMIC_WMB_POST); // Use the fire-and-forget AOP to handle AM LC // This is safe because the source buffer resides in the visop which isn't freed // until the last AMReply handler, guaranteeing all the Requests have reached LC gasneti_begin_nbi_ff(GASNETI_THREAD_PASS_ALONE); for (size_t initchunk = 0; initchunk < totalchunks; initchunk += chunksperpacket) { size_t const remaining = totalchunks - initchunk; size_t const packetchunks = MIN(chunksperpacket, remaining); gasneti_assert_uint(packetchunks ,==, (size_t)(uint32_t)(gex_AM_Arg_t)packetchunks); gex_AM_RequestMedium(tm, rank, gasneti_handleridx(gasnete_gets_AMPipeline_reqh), header, headersz, GEX_EVENT_GROUP, 0, PACK(visop), PACK(srcaddr), PACK((uintptr_t)initchunk), stridelevels, chunksz, packetchunks); } gasneti_end_nbi_ff(GASNETI_THREAD_PASS_ALONE); } GASNETE_VISOP_RETURN_VOLATILE(eop, synctype); } /* ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasnete_gets_AMPipeline_reqh_inner) void gasnete_gets_AMPipeline_reqh_inner(gex_Token_t token, void *addr, size_t nbytes, void *_visop, void *srcaddr, void *_initchunk, gex_AM_Arg_t _stridelevels, gex_AM_Arg_t _chunksz, gex_AM_Arg_t _packetchunks) { // marshall inputs size_t const stridelevels = (uint32_t)_stridelevels; size_t const chunksz = (uint32_t)_chunksz; size_t const packetchunks = (uint32_t)_packetchunks; size_t const initchunk = (size_t)(uintptr_t)_initchunk; size_t * const packetcount = addr; ptrdiff_t * const packetstrides = (ptrdiff_t *)(packetcount + stridelevels); gasneti_assert_uint((uint8_t *)(packetstrides+stridelevels) - (uint8_t *)addr ,==, nbytes); // allocate outgoing buffer size_t const replysz = GASNETE_GETS_AMPIPELINE_REPLYOVERHEAD(stridelevels) + packetchunks * chunksz; gasneti_assert(replysz > 0); #if GASNETE_VIS_NPAM == 0 void * const replybase = gasnete_visbuf_malloc(replysz); #else gex_AM_SrcDesc_t sd = gex_AM_PrepareReplyMedium(token, NULL, replysz, replysz, NULL, 0, HARGS(2,3)); void * const replybase = gex_AM_SrcDescAddr(sd); gasneti_assert_uint(gex_AM_SrcDescSize(sd) ,>=, replysz); #endif size_t * const packetinit = replybase; uint8_t * const packedbuf = (uint8_t*)(packetinit + stridelevels); // compute starting position memset(packetinit, 0, stridelevels*sizeof(size_t)); GASNETE_STRIDED_VECTOR_INC(packetinit, initchunk, SITER_ARRAY(packetcount), stridelevels); // gather data payload from source into packet uint8_t *pbuf = packedbuf; #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) do { \ GASNETI_MEMCPY(pbuf, p1, chunksz); pbuf += chunksz; \ } while (0) GASNETE_STRIDED_HELPER_DECLARE_PARTIAL(packetchunks, packetinit, 0, 0); GASNETE_1STRIDED_HELPER(stridelevels, SITER_ARRAY(packetcount), srcaddr, SITER_ARRAY(packetstrides)); #undef GASNETE_STRIDED_HELPER_LOOPBODY gasneti_assert_uint(pbuf - (uint8_t*)replybase ,==, replysz); // send packet #define ARGS PACK(_visop), packetchunks #if GASNETE_VIS_NPAM == 0 gex_AM_ReplyMedium(token, gasneti_handleridx(gasnete_gets_AMPipeline_reph), replybase, replysz, GEX_EVENT_NOW, 0, ARGS); gasneti_free(replybase); #else gex_AM_CommitReplyMedium(sd, gasneti_handleridx(gasnete_gets_AMPipeline_reph), replysz, ARGS); #endif #undef ARGS } MEDIUM_HANDLER(gasnete_gets_AMPipeline_reqh,6,9, (token,addr,nbytes, UNPACK(a0), UNPACK(a1), UNPACK(a2), a3,a4,a5), (token,addr,nbytes, UNPACK2(a0, a1), UNPACK2(a2, a3), UNPACK2(a4,a5), a6,a7,a8)); /* ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasnete_gets_AMPipeline_reph_inner) void gasnete_gets_AMPipeline_reph_inner(gex_Token_t token, void *addr, size_t nbytes, void *_visop, gex_AM_Arg_t _packetchunks) { // marshall inputs gasneti_vis_op_t * const visop = _visop; gasneti_assert_uint(visop->type ,==, GASNETI_VIS_CAT_GETS_AMPIPELINE); size_t const packetchunks = (uint32_t)_packetchunks; void * dstaddr = visop->addr; size_t const stridelevels = visop->count; size_t const chunksz = visop->len; void * const tablebase = visop + 1; ptrdiff_t * const self_strides = tablebase; size_t * const count = (size_t*)(self_strides + stridelevels); size_t * const init = addr; uint8_t * const packedbuf = (uint8_t *)(init + stridelevels); // unpack data into destination uint8_t * psrc = packedbuf; gasneti_assert_uint(psrc - (uint8_t*)addr + packetchunks * chunksz ,==, nbytes); #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) do { \ GASNETI_MEMCPY(p1, psrc, chunksz); psrc += chunksz; \ } while (0) GASNETE_STRIDED_HELPER_DECLARE_PARTIAL(packetchunks, init, 0, 0); GASNETE_1STRIDED_HELPER(stridelevels, SITER_ARRAY(count), dstaddr, SITER_ARRAY(self_strides)); gasneti_assert_uint(psrc - (uint8_t *)addr ,==, nbytes); #undef GASNETE_STRIDED_HELPER_LOOPBODY if (gasneti_weakatomic_decrement_and_test(&(visop->packetcnt), GASNETI_ATOMIC_WMB_PRE|GASNETI_ATOMIC_WEAK_FENCE)) { /* last response packet completes operation and cleans up */ GASNETE_VISOP_SIGNAL(visop, 1); gasneti_free(visop); /* free visop, saved metadata and send buffer */ } } MEDIUM_HANDLER(gasnete_gets_AMPipeline_reph,2,3, (token,addr,nbytes, UNPACK(a0), a1), (token,addr,nbytes, UNPACK2(a0, a1), a2)); #endif // GASNETE_GETS_AMPIPELINE #ifndef GASNETE_GETS_AMPIPELINE_SELECTOR #if GASNETE_GETS_AMPIPELINE #define GASNETE_GETS_AMPIPELINE_SELECTOR(RETURN,smd,synctype,tm,rank,flags) do { \ if ((ptrdiff_t)smd->elemsz <= MIN((ptrdiff_t)gasnete_vis_get_maxchunk, \ GASNETE_GETS_AMPIPELINE_MAXPAYLOAD(tm,rank,stridelevels)) && \ GASNETT_PREDICT_TRUE(GASNETE_GETS_AMPIPELINE_REQUESTSZ(stridelevels) <= GASNETE_GETS_AMPIPELINE_MAXREQUEST(tm,rank)) \ ) { gasneti_assert(gasnete_vis_use_ampipe); \ RETURN(gasnete_gets_AMPipeline(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ } } while (0) #else #define GASNETE_GETS_AMPIPELINE_SELECTOR(RETURN,smd,synctype,tm,rank,flags) ((void)0) #endif #endif /*---------------------------------------------------------------------------------*/ /* convert strided metadata to memvec metadata for the equivalent operation */ static void *gasnete_convert_strided_to_memvec(gasneti_vis_smd_t * const smd, gex_Memvec_t *memvec[2]) { gasneti_assert(smd && smd->have_stats); gasneti_assert(memvec); void *buf = gasnete_visbuf_malloc(sizeof(gex_Memvec_t)*(smd->lcontig_segments[0] + smd->lcontig_segments[1])); memvec[SMD_SELF] = buf; memvec[SMD_PEER] = memvec[SMD_SELF] + smd->lcontig_segments[SMD_SELF]; size_t const selfcontigsz = smd->lcontig_sz[SMD_SELF]; size_t const peercontigsz = smd->lcontig_sz[SMD_PEER]; if (selfcontigsz == peercontigsz) { gex_Memvec_t * selfpos = memvec[SMD_SELF]; gex_Memvec_t * peerpos = memvec[SMD_PEER]; #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) do { \ selfpos->gex_len = selfcontigsz; \ (selfpos++)->gex_addr = p1; \ peerpos->gex_len = peercontigsz; \ (peerpos++)->gex_addr = p2; \ } while(0) GASNETE_SMD_STRIDED_HELPER(smd); #undef GASNETE_STRIDED_HELPER_LOOPBODY gasneti_assert_ptr(selfpos ,==, memvec[SMD_SELF]+smd->lcontig_segments[SMD_SELF]); gasneti_assert_ptr(peerpos ,==, memvec[SMD_PEER]+smd->lcontig_segments[SMD_PEER]); } else { int const smallid = (selfcontigsz < peercontigsz ? SMD_SELF : SMD_PEER); size_t const smlsz = smd->lcontig_sz[smallid]; size_t const bigsz = smd->lcontig_sz[!smallid]; size_t const looplim = bigsz / smlsz; gasneti_assert_uint(looplim*smlsz ,==, bigsz); size_t loopcnt = 1; gex_Memvec_t * smlpos = memvec[smallid]; gex_Memvec_t * bigpos = memvec[!smallid]; #define SITER_SML_STRIDE(idx) smd->dim[idx].stride[smallid] #define SITER_BIG_STRIDE(idx) smd->dim[idx].stride[!smallid] #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) do { \ smlpos->gex_len = smlsz; \ (smlpos++)->gex_addr = p1; \ if (--loopcnt == 0) { \ bigpos->gex_len = bigsz; \ (bigpos++)->gex_addr = p2; \ loopcnt = looplim; \ } \ } while(0) GASNETE_2STRIDED_HELPER(smd->stridelevels, SITER_SDIM_COUNT(smd->dim), smd->addr[smallid], SITER_SML_STRIDE, smd->addr[!smallid], SITER_BIG_STRIDE); #undef GASNETE_STRIDED_HELPER_LOOPBODY #undef SITER_SML_STRIDE #undef SITER_BIG_STRIDE gasneti_assert_ptr(smlpos ,==, memvec[smallid]+smd->lcontig_segments[smallid]); gasneti_assert_ptr(bigpos ,==, memvec[!smallid]+smd->lcontig_segments[!smallid]); } return buf; } /*---------------------------------------------------------------------------------*/ /* reference version that uses vector interface */ gex_Event_t gasnete_puts_ref_vector(gasneti_vis_smd_t * const smd, gasnete_synctype_t const synctype, gex_TM_t const tm, gex_Rank_t const rank, gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, PUTS_REF_VECTOR); gasneti_assert(smd->elemsz > 0); gasneti_assert(smd->stridelevels > 0); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); gasneti_assert(GASNETE_PUTV_ALLOWS_VOLATILE_METADATA); gex_Memvec_t *memvec[2]; void * buf = gasnete_convert_strided_to_memvec(smd, memvec); gex_Event_t retval = gasnete_putv(synctype, tm, rank, smd->lcontig_segments[SMD_PEER], memvec[SMD_PEER], smd->lcontig_segments[SMD_SELF], memvec[SMD_SELF], flags GASNETI_THREAD_PASS); gasneti_free(buf); return retval; } /* reference version that uses vector interface */ gex_Event_t gasnete_gets_ref_vector(gasneti_vis_smd_t * const smd, gasnete_synctype_t const synctype, gex_TM_t const tm, gex_Rank_t const rank, gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, GETS_REF_VECTOR); gasneti_assert(smd->elemsz > 0); gasneti_assert(smd->stridelevels > 0); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); gasneti_assert(GASNETE_GETV_ALLOWS_VOLATILE_METADATA); gex_Memvec_t *memvec[2]; void * buf = gasnete_convert_strided_to_memvec(smd, memvec); gex_Event_t retval = gasnete_getv(synctype, tm, smd->lcontig_segments[SMD_SELF], memvec[SMD_SELF], rank, smd->lcontig_segments[SMD_PEER], memvec[SMD_PEER], flags GASNETI_THREAD_PASS); gasneti_free(buf); return retval; } /*---------------------------------------------------------------------------------*/ /* convert strided metadata to addrlist metadata for the equivalent operation */ static void *gasnete_convert_strided_to_addrlist(gasneti_vis_smd_t * const smd, void **addrlist[2]) { gasneti_assert(smd && smd->have_stats); gasneti_assert(addrlist); void *buf = gasnete_visbuf_malloc(sizeof(void *)*(smd->lcontig_segments[0] + smd->lcontig_segments[1])); addrlist[SMD_SELF] = buf; addrlist[SMD_PEER] = addrlist[SMD_SELF] + smd->lcontig_segments[SMD_SELF]; size_t const selfcontigsz = smd->lcontig_sz[SMD_SELF]; size_t const peercontigsz = smd->lcontig_sz[SMD_PEER]; if (selfcontigsz == peercontigsz) { void * * selfpos = addrlist[SMD_SELF]; void * * peerpos = addrlist[SMD_PEER]; #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) do { \ *(selfpos++) = p1; \ *(peerpos++) = p2; \ } while(0) GASNETE_SMD_STRIDED_HELPER(smd); #undef GASNETE_STRIDED_HELPER_LOOPBODY gasneti_assert_ptr(selfpos ,==, addrlist[SMD_SELF]+smd->lcontig_segments[SMD_SELF]); gasneti_assert_ptr(peerpos ,==, addrlist[SMD_PEER]+smd->lcontig_segments[SMD_PEER]); } else { int const smallid = (selfcontigsz < peercontigsz ? SMD_SELF : SMD_PEER); size_t const looplim = smd->lcontig_sz[!smallid] / smd->lcontig_sz[smallid]; gasneti_assert_uint(looplim*smd->lcontig_sz[smallid] ,==, smd->lcontig_sz[!smallid]); size_t loopcnt = 1; void * * smlpos = addrlist[smallid]; void * * bigpos = addrlist[!smallid]; #define SITER_SML_STRIDE(idx) smd->dim[idx].stride[smallid] #define SITER_BIG_STRIDE(idx) smd->dim[idx].stride[!smallid] #define GASNETE_STRIDED_HELPER_LOOPBODY(p1,p2) do { \ *(smlpos++) = p1; \ if (--loopcnt == 0) { \ *(bigpos++) = p2; \ loopcnt = looplim; \ } \ } while(0) GASNETE_2STRIDED_HELPER(smd->stridelevels, SITER_SDIM_COUNT(smd->dim), smd->addr[smallid], SITER_SML_STRIDE, smd->addr[!smallid], SITER_BIG_STRIDE); #undef GASNETE_STRIDED_HELPER_LOOPBODY #undef SITER_SML_STRIDE #undef SITER_BIG_STRIDE gasneti_assert_ptr(smlpos ,==, addrlist[smallid]+smd->lcontig_segments[smallid]); gasneti_assert_ptr(bigpos ,==, addrlist[!smallid]+smd->lcontig_segments[!smallid]); } return buf; } /*---------------------------------------------------------------------------------*/ /* reference version that uses indexed interface */ gex_Event_t gasnete_puts_ref_indexed(gasneti_vis_smd_t * const smd, gasnete_synctype_t const synctype, gex_TM_t const tm, gex_Rank_t const rank, gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, PUTS_REF_INDEXED); gasneti_assert(smd->elemsz > 0); gasneti_assert(smd->stridelevels > 0); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); gasneti_assert(GASNETE_PUTI_ALLOWS_VOLATILE_METADATA); void **addrlist[2]; void * buf = gasnete_convert_strided_to_addrlist(smd, addrlist); gex_Event_t retval = gasnete_puti(synctype, tm, rank, smd->lcontig_segments[SMD_PEER], addrlist[SMD_PEER], smd->lcontig_sz[SMD_PEER], smd->lcontig_segments[SMD_SELF], addrlist[SMD_SELF], smd->lcontig_sz[SMD_SELF], flags GASNETI_THREAD_PASS); gasneti_free(buf); return retval; } /* reference version that uses indexed interface */ gex_Event_t gasnete_gets_ref_indexed(gasneti_vis_smd_t * const smd, gasnete_synctype_t const synctype, gex_TM_t const tm, gex_Rank_t const rank, gex_Flags_t flags GASNETI_THREAD_FARG) { GASNETI_TRACE_EVENT(C, GETS_REF_INDEXED); gasneti_assert(smd->elemsz > 0); gasneti_assert(smd->stridelevels > 0); gasneti_assert(!GASNETI_NBRHD_MAPPED(tm,rank)); gasneti_assert(GASNETE_GETI_ALLOWS_VOLATILE_METADATA); void **addrlist[2]; void * buf = gasnete_convert_strided_to_addrlist(smd, addrlist); gex_Event_t retval = gasnete_geti(synctype, tm, smd->lcontig_segments[SMD_SELF], addrlist[SMD_SELF], smd->lcontig_sz[SMD_SELF], rank, smd->lcontig_segments[SMD_PEER], addrlist[SMD_PEER], smd->lcontig_sz[SMD_PEER], flags GASNETI_THREAD_PASS); gasneti_free(buf); return retval; } /*---------------------------------------------------------------------------------*/ // returns the size of the bounding box containing all the elements in memory, and optionally the baseptr GASNETI_INLINE(gasnete_smd_querybounds) size_t gasnete_smd_querybounds(gasneti_vis_smd_t const *smd, int rside, const void **baseptr) { uint8_t *lo = (uint8_t*)smd->addr[rside]; // low and high element addresses uint8_t *hi = lo; for (size_t d = 0; d < smd->stridelevels; d++) { ptrdiff_t const stride = smd->dim[d].stride[rside]; size_t const count = smd->dim[d].count; if (stride >= 0) hi += stride * (count - 1); else lo += stride * (count - 1); } if (baseptr) *baseptr = lo; return hi - lo + smd->elemsz; // adjust for length of last element } // Allocate a strided op and perform metadata normalization // returns 0 for degenerate empty operation GASNETI_INLINE(gasnete_build_smd) int gasnete_build_smd( gasneti_vis_smd_t * const smd, int isput, // for tracing void * const selfaddr, const ptrdiff_t selfstrides[], void * const peeraddr, const ptrdiff_t peerstrides[], const size_t elemsz, const size_t count[], const size_t stridelevels ) { gasneti_assert(elemsz > 0); gasneti_assert(stridelevels > 0); gasneti_assert(selfstrides && peerstrides && count); gasneti_assert(selfaddr && peeraddr); smd->elemsz = elemsz; smd->addr[SMD_SELF] = selfaddr; smd->addr[SMD_PEER] = peeraddr; // SMD normalization pass 1: // ------------------------ // populate SMD // handle empty count degeneracy // remove null dimensions // perform stride inversion to normalize peer stride size_t opt_stridelevels = stridelevels; gasneti_vis_smd_dim_t *outdim = &(smd->dim[0]); ptrdiff_t last_peerstride = -1; int is_sorted = 1; for (size_t d = 0; d < stridelevels; d++) { size_t const cnt = count[d]; if_pf (cnt == 0) { // degenerate no-op return 0; } else if_pf (cnt == 1) { // null dimension GASNETI_TRACE_PRINTF(D,("STRIDED_OPT: Null dimension removed")); opt_stridelevels--; // remove it } else { outdim->count = cnt; ptrdiff_t selfstride = selfstrides[d]; ptrdiff_t peerstride = peerstrides[d]; if (peerstride < 0) { // invert stride GASNETI_TRACE_PRINTF(D,("STRIDED_OPT: Stride inversion")); smd->addr[SMD_SELF] = (uint8_t*)smd->addr[SMD_SELF] + selfstride * (cnt-1); smd->addr[SMD_PEER] = (uint8_t*)smd->addr[SMD_PEER] + peerstride * (cnt-1); peerstride = -peerstride; selfstride = -selfstride; } outdim->stride[SMD_SELF] = selfstride; outdim->stride[SMD_PEER] = peerstride; is_sorted &= (peerstride >= last_peerstride); last_peerstride = peerstride; outdim++; } } smd->stridelevels = opt_stridelevels; if_pf (opt_stridelevels == 0) goto out; // degenerate contiguity // SMD normalization pass 2 // ------------------------ // sort dimensions by ascending peer stride // use a simple N^2 in-place selection sort, expected to perform best for small stridelevels // TODO-EX: Replace with an NlogN library sort for larger stridelevels if (!is_sorted) { for (size_t i=0; i < opt_stridelevels-1; i++) { ptrdiff_t minstride = smd->dim[i].stride[SMD_PEER]; size_t mindim = i; for (size_t j=i+1; j < opt_stridelevels; j++) { ptrdiff_t const stride = smd->dim[j].stride[SMD_PEER]; if (stride < minstride) { minstride = stride; mindim = j; } } if (mindim != i) { // swap gasneti_vis_smd_dim_t const tmp = smd->dim[i]; smd->dim[i] = smd->dim[mindim]; smd->dim[mindim] = tmp; } } GASNETI_TRACE_PRINTF(D,("STRIDED_OPT: Stride sort")); } // SMD normalization pass 3 // ------------------------ // Fold trailing dual-contiguous dimensions into elemsz { size_t opt_elemsz = elemsz; gasneti_vis_smd_dim_t *indim = &(smd->dim[0]); gasneti_vis_smd_dim_t *outdim = indim; size_t const in_stridelevels = opt_stridelevels; size_t d; for (d = 0; d < in_stridelevels; d++) { if ( indim->stride[SMD_SELF] == opt_elemsz && indim->stride[SMD_PEER] == opt_elemsz) { GASNETI_TRACE_PRINTF(D,("STRIDED_OPT: Dualcontig dimension folded into elemsz")); opt_elemsz *= indim->count; opt_stridelevels--; indim++; } else break; } if (indim != outdim) { for ( ; d < in_stridelevels; d++) { *outdim++ = *indim++; } gasneti_assert_ptr(outdim ,==, &(smd->dim[opt_stridelevels])); smd->elemsz = opt_elemsz; smd->stridelevels = opt_stridelevels; } else gasneti_assert_uint(opt_stridelevels ,==, in_stridelevels); } if_pf (opt_stridelevels == 0) goto out; // degenerate contiguity // SMD normalization pass 4 // ------------------------ // Perform dimensional folding to combine trivial inner dimensions { gasneti_vis_smd_dim_t *lodim = &(smd->dim[0]); gasneti_vis_smd_dim_t *hidim = lodim + 1; size_t const in_stridelevels = opt_stridelevels; for (size_t d = in_stridelevels-1; d; d--) { size_t const locnt = lodim->count; if ( hidim->stride[SMD_SELF] == lodim->stride[SMD_SELF] * locnt && hidim->stride[SMD_PEER] == lodim->stride[SMD_PEER] * locnt ) { GASNETI_TRACE_PRINTF(D,("STRIDED_OPT: Combined trivial inner dimension")); lodim->count = locnt * hidim->count; opt_stridelevels--; } else { lodim++; if (lodim != hidim) { *lodim = *hidim; } } hidim++; } gasneti_assert_ptr(lodim ,==, &(smd->dim[opt_stridelevels-1])); if (opt_stridelevels != in_stridelevels) smd->stridelevels = opt_stridelevels; } out: #if GASNET_DEBUG || GASNET_TRACE // trace and sanity check the resulting smd { gasneti_assert_uint(opt_stridelevels ,==, smd->stridelevels); size_t const opt_elemsz = smd->elemsz; ptrdiff_t *scratch = (ptrdiff_t *)&smd->dim[stridelevels]; ptrdiff_t * const opt_strides[2] = { scratch, scratch + opt_stridelevels }; size_t * const opt_count = (size_t*)(opt_strides[1] + opt_stridelevels); int change = (opt_elemsz != elemsz) || (opt_stridelevels != stridelevels) || (smd->addr[SMD_SELF] != selfaddr) || (smd->addr[SMD_PEER] != peeraddr); gasneti_vis_smd_dim_t const * dim = &(smd->dim[0]); for (size_t d = 0; d < opt_stridelevels; d++) { opt_strides[SMD_PEER][d] = dim->stride[SMD_PEER]; opt_strides[SMD_SELF][d] = dim->stride[SMD_SELF]; opt_count[d] = dim->count; change |= (opt_strides[SMD_PEER][d] != peerstrides[d]); change |= (opt_strides[SMD_SELF][d] != selfstrides[d]); change |= (opt_count[d] != count[d]); dim++; } #if GASNET_TRACE if (change && GASNETI_TRACE_ENABLED(D)) { // trace the optimized metadata char *str = gasneti_malloc(gasneti_format_putsgets_bufsz(opt_stridelevels)); int srcid = (isput?SMD_SELF:SMD_PEER); gasneti_format_putsgets(str,NULL,NULL,(gex_Rank_t)-1, smd->addr[!srcid],opt_strides[!srcid], smd->addr[srcid],opt_strides[srcid], opt_elemsz,opt_count,opt_stridelevels); GASNETI_TRACE_PRINTF(D,("%s: %s",(isput?"PUTS_OPT":"GETS_OPT"),str)); gasneti_free(str); } #endif #if GASNET_DEBUG { // sanity check our strided metadata optimizations // data size size_t const opt_totalsz = gasnete_strided_datasize(opt_elemsz, opt_count, opt_stridelevels); size_t const totalsz = gasnete_strided_datasize(elemsz, count, stridelevels); gasneti_assert_uint(opt_totalsz ,==, totalsz); // self bounds void const *selfbase = selfaddr; size_t const selflen = gasnete_strided_bounds(selfstrides, elemsz, count, stridelevels, &selfbase); void const *opt_selfbase; size_t const opt_selflen = gasnete_smd_querybounds(smd, SMD_SELF, &opt_selfbase); gasneti_assert_uint(selflen ,==, opt_selflen); gasneti_assert_ptr(selfbase ,==, opt_selfbase); // peer bounds void const *peerbase = peeraddr; size_t const peerlen = gasnete_strided_bounds(peerstrides, elemsz, count, stridelevels, &peerbase); void const *opt_peerbase; size_t const opt_peerlen = gasnete_smd_querybounds(smd, SMD_PEER, &opt_peerbase); gasneti_assert_uint(peerlen ,==, opt_peerlen); gasneti_assert_ptr(peerbase ,==, opt_peerbase); smd->have_stats = 0; } #endif } #endif // DEBUG || TRACE return 1; } /*---------------------------------------------------------------------------------*/ GASNETI_INLINE(gasnete_analyze_smd) void gasnete_analyze_smd(gasneti_vis_smd_t * const smd, int isput) { // for tracing gasneti_assert(!smd->have_stats); gasneti_assert(smd->stridelevels > 0 && smd->elemsz > 0); size_t const stridelevels = smd->stridelevels; size_t const elemsz = smd->elemsz; size_t elemcnt = 1; size_t lcontigsz = elemsz; int brkSMD_SELF = 0, brkSMD_PEER = 0; gasneti_vis_smd_dim_t const * dim = smd->dim; for (size_t d = 0; d < stridelevels; d++) { size_t const cnt = dim->count; #define DIMANAL(side) \ if (brk##side) { \ smd->lcontig_segments[side] *= cnt; \ } else { \ if (dim->stride[side] == (ptrdiff_t)lcontigsz) { \ /* linear contiguous dimension */ \ } else { \ brk##side = 1; \ smd->lcontig_dims[side] = d; \ smd->lcontig_sz[side] = lcontigsz; \ smd->lcontig_segments[side] = cnt; \ } \ } DIMANAL(SMD_SELF); DIMANAL(SMD_PEER); #undef DIMANAL elemcnt *= cnt; lcontigsz *= cnt; dim++; } smd->totalsz = lcontigsz; smd->elemcnt = elemcnt; #define DIMTAIL(side) \ if (!brk##side) { /* fully lcontig */ \ smd->lcontig_dims[side] = stridelevels; \ smd->lcontig_sz[side] = lcontigsz; \ smd->lcontig_segments[side] = 1; \ } DIMTAIL(SMD_SELF); DIMTAIL(SMD_PEER); #undef DIMTAIL #if GASNET_DEBUG smd->have_stats = 1; #endif if (GASNETI_TRACE_ENABLED(D)) { int srcid = (isput ? SMD_SELF : SMD_PEER); GASNETI_TRACE_PRINTF(D,("%s: totalsz=%"PRIuSZ" elemcnt=%"PRIuSZ"\n" "dst: contiguity=%"PRIuSZ" contigsz=%"PRIuSZ" contigsegments=%"PRIuSZ"\n" "src: contiguity=%"PRIuSZ" contigsz=%"PRIuSZ" contigsegments=%"PRIuSZ, (isput?"PUTS_OPT":"GETS_OPT"), smd->totalsz, smd->elemcnt, smd->lcontig_dims[!srcid], smd->lcontig_sz[!srcid], smd->lcontig_segments[!srcid], smd->lcontig_dims[srcid], smd->lcontig_sz[srcid], smd->lcontig_segments[srcid] )); } gasneti_assert_uint(smd->totalsz ,==, smd->elemsz * smd->elemcnt); #define DIMASSERT(side) \ gasneti_assert_uint(smd->lcontig_dims[side] ,<=, stridelevels); \ gasneti_assert_uint(smd->lcontig_segments[side] * smd->lcontig_sz[side] ,==, smd->totalsz); DIMASSERT(SMD_SELF); DIMASSERT(SMD_PEER); #undef DIMASSERT // normalization properties of the stride optimizer: gasneti_assert_uint(elemsz ,==, MIN(smd->lcontig_sz[SMD_SELF],smd->lcontig_sz[SMD_PEER])); gasneti_assert_uint(MIN(smd->lcontig_dims[SMD_SELF],smd->lcontig_dims[SMD_PEER]) ,==, 0); } /*---------------------------------------------------------------------------------*/ /* top-level gasnet_puts_* entry point */ #ifndef GASNETE_PUTS_OVERRIDE extern gex_Event_t gasnete_puts(gasnete_synctype_t synctype, gex_TM_t tm, gex_Rank_t rank, void *dstaddr, const ptrdiff_t dststrides[], void *srcaddr, const ptrdiff_t srcstrides[], size_t elemsz, const size_t count[], size_t stridelevels, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(gasnete_vis_isinit); gasneti_assert(elemsz > 0); // this degenerate case handled in public header gasneti_assert(stridelevels > 0); // this degenerate case handled in public header flags &= ~GEX_FLAG_IMMEDIATE; // TODO-EX union { gasneti_vis_smd_t _smd; char _buf[SMD_SZ(GASNETE_DIRECT_DIMS)]; } _smd_buf; gasneti_vis_smd_t * const smd = (GASNETT_PREDICT_TRUE(stridelevels <= GASNETE_DIRECT_DIMS) ? &_smd_buf._smd : gasneti_malloc(SMD_SZ(stridelevels))); #define RETURN(expr) do { \ gex_Event_t _result = (expr); \ if_pf (stridelevels > GASNETE_DIRECT_DIMS) gasneti_free(smd); \ return _result; \ } while (0) int ret = gasnete_build_smd(smd, 1, srcaddr, srcstrides, dstaddr, dststrides, elemsz, count, stridelevels); if_pf (!ret) { // degenerate count[i] == 0, for some i GASNETI_TRACE_EVENT(C, PUTS_DEGENERATE); RETURN(GEX_EVENT_INVALID); } #if GASNET_DEBUG // Bounds check - currently only handle SEG_BOUND if (!(flags & (GEX_FLAG_PEER_SEG_UNKNOWN|GEX_FLAG_PEER_SEG_SOME))) { const void *base; size_t len = gasnete_smd_querybounds(smd, SMD_PEER, &base); gasneti_boundscheck(tm, rank, base, len); } #endif void *peeraddr; if_pf (smd->stridelevels == 0) { // folded to fully contiguous GASNETI_TRACE_EVENT(C, PUTS_DEGENERATE); gex_Event_t result; GASNETE_PUT_DEGEN(result, synctype, tm, rank, smd->addr[SMD_PEER], smd->addr[SMD_SELF], smd->elemsz, flags); RETURN(result); } else if ((peeraddr = GASNETI_NBRHD_MAPPED_ADDR_OR_NULL(tm, rank, smd->addr[SMD_PEER]))) { // shared memory - use shared-memory bypass GASNETI_TRACE_EVENT(C, PUTS_NBRHD); gasnete_strided_memcpy(peeraddr, smd->addr[SMD_SELF], smd->stridelevels, smd->elemsz, smd->dim, SMD_SELF); RETURN(GEX_EVENT_INVALID); } // select and dispatch a network algorithm #if GASNETE_USE_AMPIPELINE #define GASNETE_PUTS_REF_INDIV_SELECTOR(RETURN,smd,synctype,tm,rank,flags) do { \ if (smd->elemsz > gasnete_vis_put_maxchunk) \ RETURN(gasnete_puts_ref_indiv(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ } while (0) #else #define GASNETE_PUTS_REF_INDIV_SELECTOR(RETURN,smd,synctype,tm,rank,flags) ((void)0) #endif /* select algorithm */ #ifndef GASNETE_PUTS_SELECTOR #if GASNET_DEBUG && GASNETE_RANDOM_SELECTOR // for testing purposes only #define GASNETE_PUTS_SELECTOR(RETURN,smd,synctype,tm,rank,flags) do { \ gasnete_analyze_smd(smd, 1); \ switch (rand() % 5) { \ case 0: \ /*GASNETE_PUTS_GATHER_SELECTOR(RETURN,smd,synctype,tm,rank,flags);*/ \ case 1: \ GASNETE_PUTS_AMPIPELINE_SELECTOR(RETURN,smd,synctype,tm,rank,flags); \ case 2: \ RETURN(gasnete_puts_ref_indiv(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ case 3: \ RETURN(gasnete_puts_ref_vector(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ case 4: \ RETURN(gasnete_puts_ref_indexed(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ default: gasneti_unreachable(); \ } } while (0) #else // normal algorithm selection #define GASNETE_PUTS_SELECTOR(RETURN,smd,synctype,tm,rank,flags) do { \ GASNETE_PUTS_REF_INDIV_SELECTOR(RETURN,smd,synctype,tm,rank,flags); \ gasnete_analyze_smd(smd, 1); /* not needed for ref-indiv */ \ /*GASNETE_PUTS_GATHER_SELECTOR(RETURN,smd,synctype,tm,rank,flags);*/ \ GASNETE_PUTS_AMPIPELINE_SELECTOR(RETURN,smd,synctype,tm,rank,flags); \ RETURN(gasnete_puts_ref_indiv(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ } while (0) #endif #endif GASNETE_PUTS_SELECTOR(RETURN,smd,synctype,tm,rank,flags); gasneti_unreachable(); #undef RETURN } #endif /* top-level gasnet_gets_* entry point */ #ifndef GASNETE_GETS_OVERRIDE extern gex_Event_t gasnete_gets(gasnete_synctype_t synctype, gex_TM_t tm, void *dstaddr, const ptrdiff_t dststrides[], gex_Rank_t rank, void *srcaddr, const ptrdiff_t srcstrides[], size_t elemsz, const size_t count[], size_t stridelevels, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(gasnete_vis_isinit); gasneti_assert(elemsz > 0); // this degenerate case handled in public header gasneti_assert(stridelevels > 0); // this degenerate case handled in public header flags &= ~GEX_FLAG_IMMEDIATE; // TODO-EX union { gasneti_vis_smd_t _smd; char _buf[SMD_SZ(GASNETE_DIRECT_DIMS)]; } _smd_buf; gasneti_vis_smd_t * const smd = (GASNETT_PREDICT_TRUE(stridelevels <= GASNETE_DIRECT_DIMS) ? &_smd_buf._smd : gasneti_malloc(SMD_SZ(stridelevels))); #define RETURN(expr) do { \ gex_Event_t _result = (expr); \ if_pf (stridelevels > GASNETE_DIRECT_DIMS) gasneti_free(smd); \ return _result; \ } while (0) int ret = gasnete_build_smd(smd, 0, dstaddr, dststrides, srcaddr, srcstrides, elemsz, count, stridelevels); if_pf (!ret) { // degenerate count[i] == 0, for some i GASNETI_TRACE_EVENT(C, PUTS_DEGENERATE); RETURN(GEX_EVENT_INVALID); } #if GASNET_DEBUG // Bounds check - currently only handle SEG_BOUND if (!(flags & (GEX_FLAG_PEER_SEG_UNKNOWN|GEX_FLAG_PEER_SEG_SOME))) { const void *base; size_t len = gasnete_smd_querybounds(smd, SMD_PEER, &base); gasneti_boundscheck(tm, rank, base, len); } #endif void *peeraddr; if_pf (smd->stridelevels == 0) { // folded to fully contiguous GASNETI_TRACE_EVENT(C, GETS_DEGENERATE); gex_Event_t result; GASNETE_GET_DEGEN(result, synctype, tm, smd->addr[SMD_SELF], rank, smd->addr[SMD_PEER], smd->elemsz, flags); RETURN(result); } else if ((peeraddr = GASNETI_NBRHD_MAPPED_ADDR_OR_NULL(tm, rank, smd->addr[SMD_PEER]))) { // shared memory - use shared-memory bypass GASNETI_TRACE_EVENT(C, GETS_NBRHD); gasnete_strided_memcpy(smd->addr[SMD_SELF], peeraddr, smd->stridelevels, smd->elemsz, smd->dim, SMD_PEER); RETURN(GEX_EVENT_INVALID); } // select and dispatch a network algorithm #if GASNETE_USE_AMPIPELINE #define GASNETE_GETS_REF_INDIV_SELECTOR(RETURN,smd,synctype,tm,rank,flags) do { \ if (smd->elemsz > gasnete_vis_get_maxchunk) \ RETURN(gasnete_gets_ref_indiv(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ } while (0) #else #define GASNETE_GETS_REF_INDIV_SELECTOR(RETURN,smd,synctype,tm,rank,flags) ((void)0) #endif /* select algorithm */ #ifndef GASNETE_GETS_SELECTOR #if GASNET_DEBUG && GASNETE_RANDOM_SELECTOR // for testing purposes only #define GASNETE_GETS_SELECTOR(RETURN,smd,synctype,tm,rank,flags) do { \ gasnete_analyze_smd(smd, 1); \ switch (rand() % 5) { \ case 0: \ /*GASNETE_GETS_SCATTER_SELECTOR(RETURN,smd,synctype,tm,rank,flags);*/ \ case 1: \ GASNETE_GETS_AMPIPELINE_SELECTOR(RETURN,smd,synctype,tm,rank,flags); \ case 2: \ RETURN(gasnete_gets_ref_indiv(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ case 3: \ RETURN(gasnete_gets_ref_vector(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ case 4: \ RETURN(gasnete_gets_ref_indexed(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ default: gasneti_unreachable(); \ } } while (0) #else // normal algorithm selection #define GASNETE_GETS_SELECTOR(RETURN,smd,synctype,tm,rank,flags) do { \ GASNETE_GETS_REF_INDIV_SELECTOR(RETURN,smd,synctype,tm,rank,flags); \ gasnete_analyze_smd(smd, 1); /* not needed for ref-indiv */ \ /*GASNETE_GETS_SCATTER_SELECTOR(RETURN,smd,synctype,tm,rank,flags);*/ \ GASNETE_GETS_AMPIPELINE_SELECTOR(RETURN,smd,synctype,tm,rank,flags); \ RETURN(gasnete_gets_ref_indiv(smd,synctype,tm,rank,flags GASNETI_THREAD_PASS)); \ } while (0) #endif #endif GASNETE_GETS_SELECTOR(RETURN,smd,synctype,tm,rank,flags); gasneti_unreachable(); #undef RETURN } #endif /*---------------------------------------------------------------------------------*/ #if PLATFORM_COMPILER_CLANG && PLATFORM_COMPILER_VERSION_GE(2,8,0) #pragma clang diagnostic pop #endif gasnet-2025.8.0/extended-ref/vis/gasnet_vlide.h0000664000175000017500000002010415142313673021407 0ustar alastairalastair// Description: VLIDE: Variable-Length Incremental Differential Encoding // Copyright 2023-2024, Dan Bonachea and UC Regents // Terms of use are as specified in license.txt #ifndef _GASNET_VLIDE_H #define _GASNET_VLIDE_H // VLIDE: Variable-Length Incremental Differential Encoding // Used to incrementally compress a series of large but similar values into a smaller, variable-length format. // // Format of each encoded byte: // [1 bit: more bytes?] | [7-bit: value chunk] // value chunks emitted in big endian order // // Differential value encoding properties: // // delta: (curr - prev) encoding compress 2s-c encoding notes // size ratio sz, max // ------------------------- ---------- ------ -------------- -------- // delta == 0 : 1 zero byte 88% // 0 <= |delta| < 64 : 1 byte 88% 1 byte, 128 useful for irregular field update in adjacent structs // 64 <= |delta| < 8KiB : 2 byte 75% 2 byte, 32KiB " // 8KiB <= |delta| < 1MB : 3 byte 75% 3 byte, 8MiB common for irregular updates to single large object // 1MiB <= |delta| < 128MiB : 4 byte 50% 4 byte, 2GiB " // 128MiB <= |delta| < 16GiB : 5 byte 38% 5 byte, 512GiB 40-bit not enough for global max in either rep. // 16GiB <= |delta| < 2TiB : 6 byte 25% 6 byte, 128TiB 48-bit more than enough for global max in each // // Legend: // * encoding size: Space consumed by the VLIDE encoding for the given delta // * compress ratio: Data compression space savings relative to a naive 64-bit 2's complement representation // * 2s-c encoding sz,max: The minimum bytes in 2's complement encoding to encompass the same delta, // and the max value that encoding can encompass. This assumes the 2's encoded // length is conveyed using some other out-of-band mechanism // VLIDE encoding/decoding macros // // arguments: // // uint8_t *datap // cursor into the encoding buffer, advanced by the macro // must be an lvalue of this type, with no side-effects // // intX prev, intX curr // expressions of type 64-bit integer or (u)intptr_t (32- or 64-bit), // where both arguments have the same type // // word result // lvalue of type 64-bit integer or (32- or 64-bit) pointer // type width must match the encoded curr // DECODE writes the result here // #define GASNETI_VLIDE_ENCODE(datap, prev, curr) do { \ gasneti_static_assert(sizeof(*(datap)) == 1); \ gasneti_static_assert(sizeof(prev) == 8 || sizeof(prev) == sizeof(void*)); \ gasneti_static_assert(sizeof(curr) == sizeof(prev)); \ uint64_t _diff = (uint64_t)(curr) - (uint64_t)(prev); \ if (_diff + 64 < 128) { /* single chunk optimization */ \ uint8_t _val = _diff & 0x7F; \ *(datap)++ = _val; \ } else { /* multi-chunk */ \ int _chunks; \ { /* compute necessary 7-bit chunks for the encoding */ \ uint64_t _cdiff = _diff; \ if (_cdiff & (1LLU << 63))/* negative: toggle bits */ \ _cdiff = ~_cdiff; \ _cdiff >>= 6; /* offset to manipulate chunk transition */ \ for (_chunks = 1; _cdiff ; _chunks++) _cdiff >>= 7; \ gasneti_assert_uint(_chunks ,<=, 10); /* theoretical limit */ \ } \ uint8_t * const _next_datap = (datap) + _chunks; \ uint8_t *_p = _next_datap; \ for (int _i = 0; _i < _chunks; _i++) { \ uint8_t const _val = (_diff & 0x7F) /* value */ | \ (_i ? 0x80 : 0) /* more */; \ _diff >>= 7; /* does NOT sign extend */ \ *--_p = _val; \ } \ if (_diff) { /* diff was negative, but all remaining bits are 1 */ \ gasneti_assert_uint(_diff & (_diff + 1),==, 0); \ } \ gasneti_assert_ptr(_p ,==, (datap)); \ (datap) = _next_datap; \ } \ } while (0) #define GASNETI_VLIDE_DECODE(datap, prev, result) do { \ gasneti_static_assert(sizeof(*(datap)) == 1); \ gasneti_static_assert(sizeof(prev) == 8 || sizeof(prev) == sizeof(void*)); \ gasneti_static_assert(sizeof(result) == 8 || sizeof(result) == sizeof(void*)); \ uint8_t _b = *datap; \ uint64_t _diff; \ if ((_b & 0xC0) == 0) { /* single-chunk positive optimization */ \ _diff = _b; \ datap++; \ } else if ((_b & 0x80) == 0) { /* single-chunk negative optimization */ \ _diff = ((uint64_t)-1 << 7) | _b; \ datap++; \ } else { /* multi-chunk */ \ int _more; \ if (_b & 0x40) _diff = (uint64_t)-1; \ else _diff = 0; \ do { \ _diff <<= 7; \ _more = (_b & 0x80); \ _diff |= (_b & 0x7F); \ _b = *++datap; /* assumes we can safely read a trailing byte */ \ } while (_more); \ } \ if (sizeof(result) == 8) { \ *(uint64_t *)&(result) = _diff + (uint64_t)(prev); \ } else { gasneti_assert_uint(sizeof(result) ,==, sizeof(uintptr_t)); \ *(uintptr_t *)&(result) = (uintptr_t)(_diff + (uint64_t)(prev)); \ } \ } while (0) // GASNETI_VLIDE_{EN,DE}CODE_TRIVIAL provide the same API as non-TRIVIAL variants // But use a trivial 64-bit 2's complement encoding, for debugging purposes #define GASNETI_VLIDE_ENCODE_TRIVIAL(datap, prev, curr) do { \ gasneti_static_assert(sizeof(*(datap)) == 1); \ gasneti_static_assert(sizeof(prev) == 8 || sizeof(prev) == sizeof(void*)); \ gasneti_static_assert(sizeof(curr) == sizeof(prev)); \ if (sizeof(curr) == 8) { \ uint64_t _curr = (curr); \ memcpy((datap), &_curr, sizeof(_curr)); \ } else { gasneti_assert_uint(sizeof(curr) ,==, 4); \ uint32_t _curr = (curr); \ memcpy((datap), &_curr, sizeof(_curr)); \ } \ (datap) += sizeof(curr); \ } while (0) #define GASNETI_VLIDE_DECODE_TRIVIAL(datap, prev, result) do { \ gasneti_static_assert(sizeof(*(datap)) == 1); \ gasneti_static_assert(sizeof(prev) == 8 || sizeof(prev) == sizeof(void*)); \ gasneti_static_assert(sizeof(result) == 8 || sizeof(result) == sizeof(void*)); \ memcpy(&(result), (datap), sizeof(result)); \ (datap) += sizeof(result); \ } while (0) #endif // _GASNET_VLIDE_H gasnet-2025.8.0/extended-ref/vis/gasnet_vis_internal.h0000664000175000017500000004405515142313673023014 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/vis/gasnet_vis_internal.h $ * Description: Internal definitions for GASNet Vector, Indexed & Strided implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_VIS_INTERNAL_H #define _GASNET_VIS_INTERNAL_H #define GASNETI_NEED_GASNET_VIS_H 1 #include /*---------------------------------------------------------------------------------*/ /* *** VIS state *** */ /*---------------------------------------------------------------------------------*/ /* represents a VIS operation in flight */ typedef struct gasneti_vis_op_S { struct gasneti_vis_op_S *next; uint8_t type; void *addr; gasneti_eop_t *eop; gasneti_iop_t *iop; gasneti_weakatomic_t packetcnt; size_t count; size_t len; gex_Event_t event; } gasneti_vis_op_t; #define SMD_SELF 0 #define SMD_PEER 1 // gasneti_vis_smd_dim_t represents the meta data parameters for a particular dimension typedef struct { size_t count; // dimensional extent ptrdiff_t stride[2]; // dimensional stride in bytes, [0]=self [1]=peer } gasneti_vis_smd_dim_t; // gasneti_vis_smd_t represents complete information about a strided transfer // in a format convenient for applying transformations typedef struct { // ----------------------------------------------------------------------- // post-analysis stats: #if GASNET_DEBUG int have_stats; // true iff the fields in this section are valid #endif size_t totalsz; // the total bytes of data in the transfer size_t elemcnt; // number of elements in the transfer, aka dual-lcontig_segments // Note that post-optimization the following properties hold: // dual-lcontig_sz == elemsz // dual-lcontig_dims == 0 size_t lcontig_dims[2]; // highest stridelevel with linear contiguity in this region // eg. zero if only the bottom level is linear contiguous, // and stridelevels if the entire region is linear contiguous size_t lcontig_sz[2]; // size of the linear contiguous segments in this region size_t lcontig_segments[2]; // number of linear contiguous segments in this region // ----------------------------------------------------------------------- // normative metadata: size_t stridelevels; // dimensional cardinality size_t elemsz; // dual-lcontig_sz (post-optimization) void *addr[2]; // base addresses [0]=self [1]=peer gasneti_vis_smd_dim_t dim[1]; // per-dimension metadata, // actually [stridelevels] entries (flexible array member) // DO NOT PUT ANYTHING HERE } gasneti_vis_smd_t; // gasneti_strided_op_t "is a" gasneti_vis_op_t that represents a strided operation in flight // the embedded metadata may have been optimized/transformed relative to user's input typedef struct { gasneti_vis_op_t visop; // must be first void *bouncebuf; // separate subobject to free on destruction, otherwise NULL void *scratch; // scratch space at the end of this object gasneti_vis_smd_t smd; // variable-length strided metadata, must be last! // DO NOT PUT ANYTHING HERE } gasneti_strided_op_t; typedef struct { void *lptr; void *rptr; size_t sz; } gasneti_vector_pair_t; /* per-EP state for VIS */ typedef struct { gasneti_mutex_t _poll_lock; gasneti_vis_op_t _active_ops; } gasnete_vis_epdata_t; extern gasnete_vis_epdata_t gasnete_vis_epdata_THUNK; /* per-thread state for VIS */ typedef struct { gasnete_vis_pcinfo_t pcinfo; // must come first for use in public header // visop management // TODO-EX: Rework this gasneti_vis_op_t *active_ops; gasneti_vis_op_t *free_ops; int progressfn_active; // deferment queue for incremental packing gasneti_vector_pair_t *defer_buf; size_t defer_sz; #ifdef GASNETE_VIS_THREADDATA_EXTRA GASNETE_VIS_THREADDATA_EXTRA #endif } gasnete_vis_threaddata_t; static void gasnete_vis_cleanup_threaddata(void *_td) { gasnete_vis_threaddata_t *td = (gasnete_vis_threaddata_t *)_td; gasneti_vis_op_t *op; #ifdef GASNETE_VIS_THREADDATA_EXTRA_CLEANUP GASNETE_VIS_THREADDATA_EXTRA_CLEANUP(td); #endif gasneti_assert(td->active_ops == NULL); while ((op = td->free_ops) != NULL) { td->free_ops = op->next; gasneti_free(op); } gasneti_free(td->defer_buf); gasneti_free(td); } GASNETI_INLINE(gasnete_vis_new_threaddata) GASNETI_MALLOC gasnete_vis_threaddata_t *gasnete_vis_new_threaddata(void) { gasnete_vis_threaddata_t *result = gasneti_calloc(1,sizeof(*result)); #ifdef GASNETE_VIS_THREADDATA_EXTRA_INIT GASNETE_VIS_THREADDATA_EXTRA_INIT(result); #endif gasnete_register_threadcleanup(gasnete_vis_cleanup_threaddata, result); return result; } #define _GASNETE_VIS_MYTHREAD(mythread) \ (GASNETT_PREDICT_TRUE(mythread->gasnete_vis_threaddata) ? \ mythread->gasnete_vis_threaddata : \ (mythread->gasnete_vis_threaddata = gasnete_vis_new_threaddata())) #define GASNETE_VIS_MYTHREAD _GASNETE_VIS_MYTHREAD(GASNETI_MYTHREAD) #define GASNETI_VIS_CAT_PUTV_GATHER 1 #define GASNETI_VIS_CAT_GETV_SCATTER 2 #define GASNETI_VIS_CAT_PUTI_GATHER 3 #define GASNETI_VIS_CAT_GETI_SCATTER 4 #define GASNETI_VIS_CAT_PUTS_GATHER 5 #define GASNETI_VIS_CAT_GETS_SCATTER 6 #define GASNETI_VIS_CAT_PUTV_AMPIPELINE 7 #define GASNETI_VIS_CAT_GETV_AMPIPELINE 8 #define GASNETI_VIS_CAT_PUTI_AMPIPELINE 9 #define GASNETI_VIS_CAT_GETI_AMPIPELINE 10 #define GASNETI_VIS_CAT_PUTS_AMPIPELINE 11 #define GASNETI_VIS_CAT_GETS_AMPIPELINE 12 #define GASNETI_VIS_CAT_PUTPC_CHAIN 13 /*---------------------------------------------------------------------------------*/ /* VISOP manipulation */ /* create a dummy eop/iop based on synctype, save it in visop */ #define GASNETE_VISOP_SETUP(visop, synctype, isget) do { \ if (synctype == gasnete_synctype_nbi) { \ visop->eop = NULL; \ visop->iop = gasneti_iop_register(1,isget GASNETI_THREAD_PASS); \ } else { \ visop->eop = gasneti_eop_create(GASNETI_THREAD_PASS_ALONE); \ visop->iop = NULL; \ } \ } while (0) /* Must not reference visop, which may no longer exist */ #define GASNETE_VISOP_RETURN_VOLATILE(eop, synctype) do { \ switch (synctype) { \ case gasnete_synctype_b: { \ gex_Event_t h = gasneti_eop_to_event(eop); \ gasnete_wait(h GASNETI_THREAD_PASS); \ return GEX_EVENT_INVALID; \ } \ case gasnete_synctype_nb: \ return gasneti_eop_to_event(eop); \ case gasnete_synctype_nbi: \ return GEX_EVENT_INVALID; \ default: gasneti_unreachable_error(("bad synctype: 0x%x",(int)(synctype))); \ return GEX_EVENT_INVALID; /* avoid warning on MIPSPro */ \ } \ } while (0) #define GASNETE_VISOP_RETURN(visop, synctype) \ GASNETE_VISOP_RETURN_VOLATILE(visop->eop, synctype) /* signal a visop dummy eop/iop */ #define GASNETE_VISOP_SIGNAL(visop, isget) do { \ gasneti_assert(visop->eop || visop->iop); \ if (visop->eop) gasneti_eop_markdone(visop->eop); \ else gasneti_iop_markdone(visop->iop, 1, isget); \ } while (0) // ops with a single completion event #define GASNETE_START_ONEOP(op, handle, synctype, isget) do { \ if (synctype == gasnete_synctype_nbi) { \ op = (void *)gasneti_iop_register(1,isget GASNETI_THREAD_PASS); \ handle = GEX_EVENT_INVALID; \ } else { \ op = (void *)gasneti_eop_create(GASNETI_THREAD_PASS_ALONE); \ handle = gasneti_eop_to_event((gasneti_eop_t *)op); \ } \ } while (0) #define GASNETE_RETURN_ONEOP(handle, synctype) do { \ if_pf (synctype == gasnete_synctype_b) { \ gasnete_wait(handle GASNETI_THREAD_PASS); \ return GEX_EVENT_INVALID; \ } else return handle; \ } while (0) /* do GASNETE_VISOP_SETUP, push the visop on the thread-specific list and do GASNETE_VISOP_RETURN */ #define GASNETE_PUSH_VISOP_RETURN(td, visop, synctype, isget, extra) do { \ GASNETE_VISOP_SETUP(visop, synctype, isget); \ GASNETI_PROGRESSFNS_ENABLE(gasneti_pf_vis,COUNTED); \ visop->next = td->active_ops; /* push on thread-specific list */ \ td->active_ops = visop; \ extra; \ GASNETE_VISOP_RETURN(visop, synctype); \ } while (0) /*---------------------------------------------------------------------------------*/ /* *** Individual put/get helpers *** */ /*---------------------------------------------------------------------------------*/ /* helper for vis functions implemented atop other GASNet operations start a recursive NBI access region, if appropriate */ #define GASNETE_START_NBIREGION(synctype) do { \ if (synctype != gasnete_synctype_nbi) \ gasnete_begin_nbi_accessregion(0,1 GASNETI_THREAD_PASS); \ } while(0) /* finish a region started with GASNETE_START_NBIREGION, block if required, and return the appropriate event */ #define GASNETE_END_NBIREGION_AND_RETURN(synctype) do { \ switch (synctype) { \ case gasnete_synctype_nb: \ return gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); \ case gasnete_synctype_b: \ gasnete_wait(gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS) GASNETI_THREAD_PASS); \ return GEX_EVENT_INVALID; \ case gasnete_synctype_nbi: \ return GEX_EVENT_INVALID; \ default: gasneti_unreachable_error(("bad synctype: 0x%x",(int)synctype)); \ return GEX_EVENT_INVALID; /* avoid warning on MIPSPro */ \ } \ } while(0) #define GASNETE_PUT_INDIV(tm, rank, dstaddr, srcaddr, nbytes, lc_opt) do { \ gasneti_assert((nbytes) > 0); \ gasneti_boundscheck((tm), (rank), (dstaddr), (nbytes)); \ gasnete_put_nbi((tm), (rank), (dstaddr), (srcaddr), (nbytes), \ (lc_opt), 0 GASNETI_THREAD_PASS); \ } while (0) #define GASNETE_GET_INDIV(tm, rank, dstaddr, srcaddr, nbytes) do { \ gasneti_assert((nbytes) > 0); \ gasneti_boundscheck((tm), (rank), (srcaddr), (nbytes)); \ gasnete_get_nbi((tm), (dstaddr), (rank), (srcaddr), (nbytes), \ 0 GASNETI_THREAD_PASS); \ } while (0) // Put/get for degenerate case, where this single op represents the entire operation // Casts from int -> gex_Event_t in NBI/Blocking cases are valid because they only // care about zero versus non-zero. // NOTE: cannot use gasnete_* variants here, as they are currently non-functional on smp/nopshm #define GASNETE_PUT_DEGEN(retval, synctype, tm, rank, dstaddr, srcaddr, nbytes, flags) do { \ gasneti_assert((nbytes) > 0); \ gasneti_boundscheck((tm), (rank), (dstaddr), (nbytes)); \ switch (synctype) { \ case gasnete_synctype_nb: { \ gex_Event_t _lc_dummy; \ (retval) = gex_RMA_PutNB ((tm), (rank), (dstaddr), (srcaddr), (nbytes), \ (((flags) & GEX_FLAG_ENABLE_LEAF_LC) ? &_lc_dummy : GEX_EVENT_DEFER), \ (flags)); \ break; } \ case gasnete_synctype_nbi: \ (retval) = (gex_Event_t)(intptr_t) \ gex_RMA_PutNBI((tm), (rank), (dstaddr), (srcaddr), (nbytes), \ (((flags) & GEX_FLAG_ENABLE_LEAF_LC) ? GEX_EVENT_GROUP : GEX_EVENT_DEFER),\ (flags)); \ break; \ case gasnete_synctype_b: \ (retval) = (gex_Event_t)(intptr_t) \ gex_RMA_PutBlocking((tm), (rank), (dstaddr), (srcaddr), (nbytes), \ (flags)); \ break; \ default: gasneti_unreachable_error(("Invalid synctype=%i",(int)(synctype))); \ } \ } while (0) #define GASNETE_GET_DEGEN(retval, synctype, tm, dstaddr, rank, srcaddr, nbytes, flags) do { \ gasneti_assert((nbytes) > 0); \ gasneti_boundscheck((tm), (rank), (srcaddr), (nbytes)); \ switch (synctype) { \ case gasnete_synctype_nb: \ (retval) = gex_RMA_GetNB ((tm), (dstaddr), (rank), (srcaddr), (nbytes), \ (flags)); \ break; \ case gasnete_synctype_nbi: \ (retval) = (gex_Event_t)(intptr_t) \ gex_RMA_GetNBI((tm), (dstaddr), (rank), (srcaddr), (nbytes), \ (flags)); \ break; \ case gasnete_synctype_b: \ (retval) = (gex_Event_t)(intptr_t) \ gex_RMA_GetBlocking((tm), (dstaddr), (rank), (srcaddr), (nbytes), \ (flags)); \ break; \ default: gasneti_unreachable_error(("Invalid synctype=%i",(int)(synctype))); \ } \ } while (0) /*---------------------------------------------------------------------------------*/ /* packing/unpacking helpers */ #define _GASNETE_PACK_HELPER(packed, unpacked, sz) GASNETI_MEMCPY((packed), (unpacked), (sz)) #define _GASNETE_UNPACK_HELPER(packed, unpacked, sz) GASNETI_MEMCPY((unpacked), (packed), (sz)) // GASNETE_VIS_MIN_PACKBUFFER is used to round up packing buffers to a large enough size // so that glibc malloc will hopefully give us memory with better access behavior, noticeably // improving throughput on systems like KNL. #ifndef GASNETE_VIS_MIN_PACKBUFFER #define GASNETE_VIS_MIN_PACKBUFFER 8192 #endif GASNETI_INLINE(gasnete_visbuf_malloc) GASNETI_MALLOC void *gasnete_visbuf_malloc(size_t _sz) { return gasneti_malloc(MAX(_sz,GASNETE_VIS_MIN_PACKBUFFER)); } /*---------------------------------------------------------------------------------*/ /* packetization */ typedef struct { size_t firstidx; size_t firstoffset; size_t lastidx; size_t lastlen; } gasnete_packetdesc_t; extern void gasnete_packetize_verify(gasnete_packetdesc_t *pt, size_t ptidx, int lastpacket, size_t count, size_t len, gex_Memvec_t const *list); /*---------------------------------------------------------------------------------*/ // AM helpers #if PLATFORM_ARCH_32 #define HARGS(c32,c64) c32 #else #define HARGS(c32,c64) c64 #endif // GASNETE_VIS_NPAM: // 0 = Use FP AM // 1 = Use NP AM with a fixed-payload-size algorithm // 2 = Use NP AM with a negotiated-payload size // Default is 1 for conduits with a "real" NP AM implementation, and 0 elsewhere #ifndef GASNETE_VIS_NPAM #if GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM && GASNET_NATIVE_NP_ALLOC_REP_MEDIUM #define GASNETE_VIS_NPAM 1 #else #define GASNETE_VIS_NPAM 0 #endif #endif #if !(GASNETE_VIS_NPAM == 0 || GASNETE_VIS_NPAM == 1 || GASNETE_VIS_NPAM == 2) #error Incorrect GASNETE_VIS_NPAM definition - must be in {0,1,2} #endif /*---------------------------------------------------------------------------------*/ #if PLATFORM_COMPILER_SUN_C /* disable a harmless warning */ #pragma error_messages(off, E_STATEMENT_NOT_REACHED) #endif #endif gasnet-2025.8.0/extended-ref/ratomic/0000775000175000017500000000000015142313673017432 5ustar alastairalastairgasnet-2025.8.0/extended-ref/ratomic/gasnet_ratomic.h0000664000175000017500000013142615142313673022611 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/ratomic/gasnet_ratomic.h $ * Description: GASNet Remote Atomics API Header * Copyright 2017, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _GASNET_RATOMIC_H #define _GASNET_RATOMIC_H #define _IN_GASNET_RATOMIC_H #include GASNETI_BEGIN_EXTERNC GASNETI_BEGIN_NOWARN // gex_AD_t is an opaque scalar handle struct gasneti_ad_t; typedef struct gasneti_ad_t *gex_AD_t; // GEX_AD_INVALID is guaranteed to be zero #define GEX_AD_INVALID ((gex_AD_t)(uintptr_t)0) // Forward decl of (internal) dispatch table type: union gasnete_ratomic_fn_tbl_u; typedef union gasnete_ratomic_fn_tbl_u *gasnete_ratomic_fn_tbl_t; #ifndef _GEX_AD_T // TODO-EX: Current design has a pointer to the dispatch table in each AD. // However, we should investigate the alterative design in which the table // appears directly within the AD. #define GASNETI_AD_COMMON \ GASNETI_OBJECT_HEADER \ gasneti_TM_t _tm, _tm0; \ gex_Rank_t _rank, _rank0; \ gex_DT_t _dt; \ gex_OP_t _ops; \ int _tools_safe; \ unsigned int _index; \ int /*boolean*/ _is_ref; \ gasnete_ratomic_fn_tbl_t _fn_tbl; typedef struct { GASNETI_AD_COMMON } *gasneti_AD_t; #if GASNET_DEBUG extern gasneti_AD_t gasneti_import_ad(gex_AD_t _ad); extern gasneti_AD_t gasneti_import_ad_valid(gex_AD_t _ad); extern gex_AD_t gasneti_export_ad(gasneti_AD_t _real_ad); #else #define gasneti_import_ad(x) ((gasneti_AD_t)(x)) #define gasneti_import_ad_valid gasneti_import_ad #define gasneti_export_ad(x) ((gex_AD_t)(x)) #endif #define gex_AD_SetCData(ad,val) ((void)(gasneti_import_ad_valid(ad)->_cdata = (val))) #define gex_AD_QueryCData(ad) ((void*)gasneti_import_ad_valid(ad)->_cdata) #define gex_AD_QueryTM(ad) gasneti_export_tm(gasneti_import_ad_valid(ad)->_tm) #define gex_AD_QueryOps(ad) ((gex_OP_t)gasneti_import_ad_valid(ad)->_ops) #define gex_AD_QueryDT(ad) ((gex_DT_t)gasneti_import_ad_valid(ad)->_dt) #define gex_AD_QueryFlags(ad) ((gex_Flags_t)gasneti_import_ad_valid(ad)->_flags) #endif // Collective creation of an atomic domain - default implementation #ifndef gex_AD_Create extern void gasneti_AD_Create( gex_AD_t *_ad_p, // Output gex_TM_t _tm, // The team gex_DT_t _dt, // The data type gex_OP_t _ops, // OR of operations to be supported gex_Flags_t _flags // flags ); #define gex_AD_Create gasneti_AD_Create #endif // Collective destruction of an atomic domain - default implementation #ifndef gex_AD_Destroy extern void gasneti_AD_Destroy(gex_AD_t _ad); #define gex_AD_Destroy gasneti_AD_Destroy #endif /*---------------------------------------------------------------------------------*/ // // Common logic for RAtomic implementatons // #ifndef _GEX_AD_T #if GASNET_DEBUG extern void gasnete_ratomic_validate( gex_AD_t _ad, void *_result_p, gex_Rank_t _tgt_rank, void *_tgt_addr, gex_OP_t _opcode, gex_DT_t _datatype, gex_Flags_t _flags); #else #define gasnete_ratomic_validate(ad,result_p,rank,addr,op,dt,flags) ((void)0) #endif #endif // Which types may be accessed in cross-mapped segments using Tools. // TODO-EX: We don't yet have preprocessor defines for precisely the property we // need here, but the following logic *is* accurate for the current tools code. // We should name the propery and assert it in gasnet_atomic_bits.h, not here. #ifndef GASNETE_RATOMIC_PSHMSAFE_32 #if GASNETI_ATOMIC32_NOT_SIGNALSAFE #define GASNETE_RATOMIC_PSHMSAFE_32 0 #else #define GASNETE_RATOMIC_PSHMSAFE_32 1 #endif #endif #ifndef GASNETE_RATOMIC_PSHMSAFE_64 #if GASNETI_ATOMIC64_NOT_SIGNALSAFE #define GASNETE_RATOMIC_PSHMSAFE_64 0 #else #define GASNETE_RATOMIC_PSHMSAFE_64 1 #endif #endif #ifndef GASNETE_RATOMIC_PSHMSAFE_gex_dt_I32 #define GASNETE_RATOMIC_PSHMSAFE_gex_dt_I32 GASNETE_RATOMIC_PSHMSAFE_32 #endif #ifndef GASNETE_RATOMIC_PSHMSAFE_gex_dt_U32 #define GASNETE_RATOMIC_PSHMSAFE_gex_dt_U32 GASNETE_RATOMIC_PSHMSAFE_32 #endif #ifndef GASNETE_RATOMIC_PSHMSAFE_gex_dt_I64 #define GASNETE_RATOMIC_PSHMSAFE_gex_dt_I64 GASNETE_RATOMIC_PSHMSAFE_64 #endif #ifndef GASNETE_RATOMIC_PSHMSAFE_gex_dt_U64 #define GASNETE_RATOMIC_PSHMSAFE_gex_dt_U64 GASNETE_RATOMIC_PSHMSAFE_64 #endif #ifndef GASNETE_RATOMIC_PSHMSAFE_gex_dt_FLT #define GASNETE_RATOMIC_PSHMSAFE_gex_dt_FLT GASNETE_RATOMIC_PSHMSAFE_32 #endif #ifndef GASNETE_RATOMIC_PSHMSAFE_gex_dt_DBL #define GASNETE_RATOMIC_PSHMSAFE_gex_dt_DBL GASNETE_RATOMIC_PSHMSAFE_64 #endif // // Macro for applying a 1-argument macro (FN) to each datatype // // Since the GEX_DT_* tokens are macros, they cannot safely be used as arguments. // Instead a family of _gex_dt_* tokens are used, which can be mapped to // several related tokens via concatenation to generate one of the macros // which immediately follow. #define GASNETE_DT_APPLY(FN) \ FN(_gex_dt_I32) FN(_gex_dt_U32) \ FN(_gex_dt_I64) FN(_gex_dt_U64) \ FN(_gex_dt_FLT) FN(_gex_dt_DBL) // #define _gex_dt_I32_isint 1 #define _gex_dt_U32_isint 1 #define _gex_dt_I64_isint 1 #define _gex_dt_U64_isint 1 #define _gex_dt_FLT_isint 0 #define _gex_dt_DBL_isint 0 // #define _gex_dt_I32_bits 32 #define _gex_dt_U32_bits 32 #define _gex_dt_I64_bits 64 #define _gex_dt_U64_bits 64 #define _gex_dt_FLT_bits 32 #define _gex_dt_DBL_bits 64 // #define _gex_dt_I32_type int32_t #define _gex_dt_U32_type uint32_t #define _gex_dt_I64_type int64_t #define _gex_dt_U64_type uint64_t #define _gex_dt_FLT_type float #define _gex_dt_DBL_type double // #define _gex_dt_I32_dtype GEX_DT_I32 #define _gex_dt_U32_dtype GEX_DT_U32 #define _gex_dt_I64_dtype GEX_DT_I64 #define _gex_dt_U64_dtype GEX_DT_U64 #define _gex_dt_FLT_dtype GEX_DT_FLT #define _gex_dt_DBL_dtype GEX_DT_DBL // #define _gex_dt_I32_fmt "%i" #define _gex_dt_U32_fmt "%u" #define _gex_dt_I64_fmt "%" PRIi64 #define _gex_dt_U64_fmt "%" PRIu64 #define _gex_dt_FLT_fmt "%g" #define _gex_dt_DBL_fmt "%g" // #define _gex_dt_I32_fmt_cast (int) #define _gex_dt_U32_fmt_cast (unsigned int) #define _gex_dt_I64_fmt_cast #define _gex_dt_U64_fmt_cast #define _gex_dt_FLT_fmt_cast #define _gex_dt_DBL_fmt_cast // #define _gex_dt_I32_string "I32" #define _gex_dt_U32_string "U32" #define _gex_dt_I64_string "I64" #define _gex_dt_U64_string "U64" #define _gex_dt_FLT_string "FLT" #define _gex_dt_DBL_string "DBL" // Unions for type-punning #define GASNETI_RATOMIC_UNION(bits) union gasnete_ratomic_##bits##_u GASNETI_RATOMIC_UNION(32) { uint32_t _gex_ui; float _gex_fp; }; GASNETI_RATOMIC_UNION(64) { uint64_t _gex_ui; double _gex_fp; }; // // Macros for building local atomic RMW operations using (strong) atomics // TODO: generalize to weak atomic too? // // GASNETE_RATOMIC_CAS(output, tgt, dtcode, op3, operator, fences) // Use appropriate fixed-width CAS to apply an operator to the given data type // // Ex1: // GASNETE_RATOMIC_CAS(x, tgt, _gex_dt_I32, op1, GASNETE_RATOMIC_CAS_OP_MULT, 0) // Atomically performs { x = *tgt; *tgt = *tgt * op1; } on values of type int32_t // // Ex2: // GASNETE_RATOMIC_CAS(x, tgt, _gex_dt_DBL, op1, GASNETE_RATOMIC_CAS_OP_MAX, 0) // Atomically performs { x = *tgt; *tgt = MAX(*tgt, op1); } on values of type double // // Care is taken to evaluate 'output', 'tgt' and 'op1' exactly once. // All operations are "fetching" (writing to an output variable). // INC (DEC) are available indirectly using ADD (SUB) with an 'op1' of 1. // // The 'fences' argument is 0 or an OR of GASNETI_ATOMIC_* flags. // // Operators: #define GASNETE_RATOMIC_CAS_OP_ADD(a,b) (a + b) #define GASNETE_RATOMIC_CAS_OP_SUB(a,b) (a - b) #define GASNETE_RATOMIC_CAS_OP_MULT(a,b) (a * b) #define GASNETE_RATOMIC_CAS_OP_AND(a,b) (a & b) #define GASNETE_RATOMIC_CAS_OP_OR(a,b) (a | b) #define GASNETE_RATOMIC_CAS_OP_XOR(a,b) (a ^ b) #define GASNETE_RATOMIC_CAS_OP_MIN(a,b) MIN(a, b) #define GASNETE_RATOMIC_CAS_OP_MAX(a,b) MAX(a, b) // #define GASNETE_RATOMIC_CAS(output, tgt, dtcode, op1, operator, fences) \ _GASNETE_RATOMIC_CAS1(output, tgt, dtcode##_type, dtcode##_bits, op1, dtcode##_isint, operator, fences) // This extra pass expands the "bits" and "isint" tokens prior to additional concatenation #define _GASNETE_RATOMIC_CAS1(output, tgt, type, bits, op1, isint, operator, fences) \ _GASNETE_RATOMIC_CAS2(output, tgt, type, bits, op1, isint, operator, fences) #define _GASNETE_RATOMIC_CAS2(output, tgt, type, bits, op1, isint, operator, fences) \ _GASNETE_RATOMIC_CAS3##isint(output, tgt, type, bits, op1, operator, fences) #define _GASNETE_RATOMIC_CAS31(output, tgt, type, bits, op1, operator, fences) do { /* integer DTs */ \ type const _op1 = (op1); \ gasneti_atomic##bits##_t *_tgt = (gasneti_atomic##bits##_t*)(tgt); \ type _newval, _oldval; \ do { \ _oldval = gasneti_atomic##bits##_read(_tgt, 0); \ _newval = operator(_oldval, _op1); \ } while (! gasneti_atomic##bits##_compare_and_swap(_tgt,_oldval,_newval,fences)); \ (output) = _oldval; \ } while (0); #define _GASNETE_RATOMIC_CAS30(output, tgt, type, bits, op1, operator, fences) do { /* FP DTs */ \ type const _op1 = (op1); \ gasneti_atomic##bits##_t *_tgt = (gasneti_atomic##bits##_t*)(tgt); \ GASNETI_RATOMIC_UNION(bits) _newval, _oldval; \ do { \ _oldval._gex_ui = gasneti_atomic##bits##_read(_tgt, 0); \ _newval._gex_fp = operator(_oldval._gex_fp, _op1); \ } while (! gasneti_atomic##bits##_compare_and_swap(_tgt,_oldval._gex_ui,_newval._gex_ui,fences)); \ (output) = _oldval._gex_fp; \ } while (0); // // Define inline functions to perform local atomic operations // Always fetching (w/ only SET having an unspecified value) // // TODO: it may be possible to further factor to reduce duplication between // integer and floating-point ("SW1" and "SW0, respectively). // Attempts so far have either been fragile, unmaintainable or made excessive // use of type-punning and/or temporaries (which could harm optimization). // Issues obstructing further factorization include: // + Desire to use gasneti_atomicNN_{add,sub}() with integer types (not CAS) // + Desire to apply union-based type-punning *only* with floating-point types // #define GASNETE_RATOMIC_FN_DEFN(dtcode) \ _GASNETE_RATOMIC_FN_DEFN1(gasnete_ratomicfn##dtcode, dtcode, \ dtcode##_type, dtcode##_bits, dtcode##_isint) // This extra pass expands the "bits" and "isint" tokens prior to additional concatenation #define _GASNETE_RATOMIC_FN_DEFN1(fname, dtcode, type, bits, isint) \ _GASNETE_RATOMIC_FN_DEFN2(fname, dtcode, type, bits, isint) #define _GASNETE_RATOMIC_FN_DEFN2(fname, dtcode, type, bits, isint) \ GASNETI_INLINE(fname) \ type fname(type *_tgt_addr, type _operand1, type _operand2, gex_OP_t _opcode, int _fences) \ { type _result; \ gasneti_atomic##bits##_t *_ratgt = (gasneti_atomic##bits##_t *)(_tgt_addr); \ switch(_opcode) { \ _GASNETE_RATOMIC_FN_SW##isint(dtcode, type, bits); \ _GASNETE_RATOMIC_FN_CAS_CASE(dtcode, MULT); \ _GASNETE_RATOMIC_FN_CAS_CASE(dtcode, MIN); \ _GASNETE_RATOMIC_FN_CAS_CASE(dtcode, MAX); \ default: gasneti_unreachable(); \ } \ GASNETI_BUG3697(); \ return _result; \ } // Big SWitch cases for integer types (isint == 1) #define _GASNETE_RATOMIC_FN_SW1(dtcode,type,bits) \ case GEX_OP_SET: \ gasneti_atomic##bits##_set(_ratgt, _operand1, _fences); \ _result = 0; /* Sigh. Just to silence warnings */ \ break; \ case GEX_OP_GET: \ _result = gasneti_atomic##bits##_read(_ratgt, _fences); \ break; \ case GEX_OP_SWAP: \ _result = gasneti_atomic##bits##_swap(_ratgt, _operand1, _fences); \ break; \ case GEX_OP_CAS: case GEX_OP_FCAS: { \ type _ratmp = _operand1; \ do { \ if (gasneti_atomic##bits##_compare_and_swap(_ratgt, _ratmp, _operand2, _fences)) { \ break; \ } \ _ratmp = gasneti_atomic##bits##_read(_ratgt, _fences & GEX_FLAG_AD_ACQ); \ } while (_ratmp == _operand1); \ _result = _ratmp; \ break; \ } \ case GEX_OP_INC: case GEX_OP_FINC: \ _operand1 = 1; GASNETI_FALLTHROUGH /* to ADD */ \ case GEX_OP_ADD: case GEX_OP_FADD: \ _result = gasneti_atomic##bits##_add(_ratgt, _operand1, _fences) - _operand1; \ break; \ case GEX_OP_DEC: case GEX_OP_FDEC: \ _operand1 = 1; GASNETI_FALLTHROUGH /* to SUB */ \ case GEX_OP_SUB: case GEX_OP_FSUB: \ _result = gasneti_atomic##bits##_subtract(_ratgt, _operand1, _fences) + _operand1; \ break; \ _GASNETE_RATOMIC_FN_CAS_CASE(dtcode, AND); \ _GASNETE_RATOMIC_FN_CAS_CASE(dtcode, OR); \ _GASNETE_RATOMIC_FN_CAS_CASE(dtcode, XOR); // Big SWitch cases for floating-point types (isint == 0) #define _GASNETE_RATOMIC_FN_SW0(dtcode,type,bits) \ case GEX_OP_SET: { \ GASNETI_RATOMIC_UNION(bits) _ratmp; _ratmp._gex_fp = _operand1; \ gasneti_atomic##bits##_set(_ratgt, _ratmp._gex_ui, _fences); \ _result = 0; /* Sigh. Just to silence warnings */ \ break; \ } \ case GEX_OP_GET: { \ GASNETI_RATOMIC_UNION(bits) _ratmp; \ _ratmp._gex_ui = gasneti_atomic##bits##_read(_ratgt, _fences); \ _result = _ratmp._gex_fp; \ break; \ } \ case GEX_OP_SWAP: { \ GASNETI_RATOMIC_UNION(bits) _ratmp; _ratmp._gex_fp = _operand1; \ _ratmp._gex_ui = gasneti_atomic##bits##_swap(_ratgt, _ratmp._gex_ui, _fences); \ _result = _ratmp._gex_fp; \ break; \ } \ case GEX_OP_CAS: case GEX_OP_FCAS: { \ GASNETI_RATOMIC_UNION(bits) _raold; _raold._gex_fp = _operand1; \ GASNETI_RATOMIC_UNION(bits) _ranew; _ranew._gex_fp = _operand2; \ do { \ if (gasneti_atomic##bits##_compare_and_swap(_ratgt, _raold._gex_ui, _ranew._gex_ui, _fences)) { \ break; \ } \ _raold._gex_ui = gasneti_atomic##bits##_read(_ratgt, _fences & GEX_FLAG_AD_ACQ); \ } while (_raold._gex_fp == _operand1); \ _result = _raold._gex_fp; \ break; \ } \ case GEX_OP_INC: case GEX_OP_FINC: \ _operand1 = 1.; GASNETI_FALLTHROUGH /* to ADD */ \ _GASNETE_RATOMIC_FN_CAS_CASE(dtcode, ADD); \ case GEX_OP_DEC: case GEX_OP_FDEC: \ _operand1 = 1.; GASNETI_FALLTHROUGH /* to SUB */ \ _GASNETE_RATOMIC_FN_CAS_CASE(dtcode, SUB); // Case for a CAS-based operation (both fetching and non-fetching) #define _GASNETE_RATOMIC_FN_CAS_CASE(dtcode, opname) \ case GEX_OP_##opname: case GEX_OP_F##opname: \ GASNETE_RATOMIC_CAS(_result,_ratgt,dtcode,_operand1,GASNETE_RATOMIC_CAS_OP_##opname,_fences); \ break; // Work-around for bug 3697 #if PLATFORM_COMPILER_SUN #define GASNETI_BUG3697() gasneti_compiler_fence() #else #define GASNETI_BUG3697() ((void)0) #endif // GASNETE_DT_APPLY(GASNETE_RATOMIC_FN_DEFN) // // Typedef the function types used in dispatch (10 function types per DT). // // gasnete_ratomic[dtcode]_{NB,NBI}_{N,F}{0,1,2}_fn_t // N Non-fetching operation // F Fetching operation // {0,1,2} Operand count // // Also defines a family of // GASNETE_RATOMIC_ARGS_{N,F}{0,1,2}(type) // and // GASNETE_RATOMIC_PASS_{N,F}{0,1,2} // macros for use in macros which declare or define such functions. // #define GASNETE_RATOMIC_FNTYPES(dtcode) \ typedef gex_Event_t (gasnete_ratomic##dtcode##_NB_N0_fn_t )(GASNETE_RATOMIC_ARGS_N0(dtcode##_type)); \ typedef gex_Event_t (gasnete_ratomic##dtcode##_NB_N1_fn_t )(GASNETE_RATOMIC_ARGS_N1(dtcode##_type)); \ typedef gex_Event_t (gasnete_ratomic##dtcode##_NB_N2_fn_t )(GASNETE_RATOMIC_ARGS_N2(dtcode##_type)); \ typedef gex_Event_t (gasnete_ratomic##dtcode##_NB_F0_fn_t )(GASNETE_RATOMIC_ARGS_F0(dtcode##_type)); \ typedef gex_Event_t (gasnete_ratomic##dtcode##_NB_F1_fn_t )(GASNETE_RATOMIC_ARGS_F1(dtcode##_type)); \ typedef gex_Event_t (gasnete_ratomic##dtcode##_NB_F2_fn_t )(GASNETE_RATOMIC_ARGS_F2(dtcode##_type)); \ typedef int (gasnete_ratomic##dtcode##_NBI_N0_fn_t)(GASNETE_RATOMIC_ARGS_N0(dtcode##_type)); \ typedef int (gasnete_ratomic##dtcode##_NBI_N1_fn_t)(GASNETE_RATOMIC_ARGS_N1(dtcode##_type)); \ typedef int (gasnete_ratomic##dtcode##_NBI_N2_fn_t)(GASNETE_RATOMIC_ARGS_N2(dtcode##_type)); \ typedef int (gasnete_ratomic##dtcode##_NBI_F0_fn_t)(GASNETE_RATOMIC_ARGS_F0(dtcode##_type)); \ typedef int (gasnete_ratomic##dtcode##_NBI_F1_fn_t)(GASNETE_RATOMIC_ARGS_F1(dtcode##_type)); \ typedef int (gasnete_ratomic##dtcode##_NBI_F2_fn_t)(GASNETE_RATOMIC_ARGS_F2(dtcode##_type)); \ // #define GASNETE_RATOMIC_ARGS_N0(type) \ gasneti_AD_t _real_ad, gex_Rank_t _tgt_rank, void* _tgt_addr, \ gex_Flags_t _flags GASNETI_THREAD_FARG #define GASNETE_RATOMIC_ARGS_N1(type) \ gasneti_AD_t _real_ad, gex_Rank_t _tgt_rank, void* _tgt_addr, \ type _operand1, gex_Flags_t _flags GASNETI_THREAD_FARG #define GASNETE_RATOMIC_ARGS_N2(type) \ gasneti_AD_t _real_ad, gex_Rank_t _tgt_rank, void* _tgt_addr, \ type _operand1, type _operand2, gex_Flags_t _flags GASNETI_THREAD_FARG #define GASNETE_RATOMIC_ARGS_F0(type) \ gasneti_AD_t _real_ad, type* _result_p, gex_Rank_t _tgt_rank, void* _tgt_addr, \ gex_Flags_t _flags GASNETI_THREAD_FARG #define GASNETE_RATOMIC_ARGS_F1(type) \ gasneti_AD_t _real_ad, type* _result_p, gex_Rank_t _tgt_rank, void* _tgt_addr, \ type _operand1, gex_Flags_t _flags GASNETI_THREAD_FARG #define GASNETE_RATOMIC_ARGS_F2(type) \ gasneti_AD_t _real_ad, type* _result_p, gex_Rank_t _tgt_rank, void* _tgt_addr, \ type _operand1, type _operand2, gex_Flags_t _flags GASNETI_THREAD_FARG // #define GASNETE_RATOMIC_PASS_N0 \ _real_ad, _tgt_rank, _tgt_addr, _flags GASNETI_THREAD_PASS #define GASNETE_RATOMIC_PASS_N1 \ _real_ad, _tgt_rank, _tgt_addr, _operand1, _flags GASNETI_THREAD_PASS #define GASNETE_RATOMIC_PASS_N2 \ _real_ad, _tgt_rank, _tgt_addr, _operand1, _operand2, _flags GASNETI_THREAD_PASS #define GASNETE_RATOMIC_PASS_F0 \ _real_ad, _result_p, _tgt_rank, _tgt_addr, _flags GASNETI_THREAD_PASS #define GASNETE_RATOMIC_PASS_F1 \ _real_ad, _result_p, _tgt_rank, _tgt_addr, _operand1, _flags GASNETI_THREAD_PASS #define GASNETE_RATOMIC_PASS_F2 \ _real_ad, _result_p, _tgt_rank, _tgt_addr, _operand1, _operand2, _flags GASNETI_THREAD_PASS // GASNETE_DT_APPLY(GASNETE_RATOMIC_FNTYPES) // // Typedef structures full of function pointers used in dispatch (1 struct type per DT) // #define GASNETE_RATOMIC_FN_TBL(dtcode) \ typedef struct { \ _GASNETE_RATOMIC_FN_TBL(gasnete_ratomic##dtcode##_NB) _gex_nb; \ _GASNETE_RATOMIC_FN_TBL(gasnete_ratomic##dtcode##_NBI) _gex_nbi; \ } gasnete_ratomic##dtcode##_fn_tbl_t; // #define _GASNETE_RATOMIC_FN_TBL(prefix) \ struct { \ prefix##_N1_fn_t *_gex_op_AND, *_gex_op_OR, *_gex_op_XOR; \ prefix##_N1_fn_t *_gex_op_ADD, *_gex_op_SUB, *_gex_op_MULT; \ prefix##_N1_fn_t *_gex_op_MIN, *_gex_op_MAX; \ prefix##_N0_fn_t *_gex_op_INC, *_gex_op_DEC; \ prefix##_F1_fn_t *_gex_op_FAND, *_gex_op_FOR, *_gex_op_FXOR; \ prefix##_F1_fn_t *_gex_op_FADD, *_gex_op_FSUB, *_gex_op_FMULT; \ prefix##_F1_fn_t *_gex_op_FMIN, *_gex_op_FMAX; \ prefix##_F0_fn_t *_gex_op_FINC, *_gex_op_FDEC; \ prefix##_N1_fn_t *_gex_op_SET; \ prefix##_F0_fn_t *_gex_op_GET; \ prefix##_F1_fn_t *_gex_op_SWAP; \ prefix##_F2_fn_t *_gex_op_FCAS; \ prefix##_N2_fn_t *_gex_op_CAS; \ } // GASNETE_DT_APPLY(GASNETE_RATOMIC_FN_TBL) // // Single union of all gasnete_ratomic[dtcode]_fn_tbl_t types // #define GASNETE_RATOMIC_FN_UNION(dtcode) gasnete_ratomic##dtcode##_fn_tbl_t dtcode; union gasnete_ratomic_fn_tbl_u { GASNETE_DT_APPLY(GASNETE_RATOMIC_FN_UNION) }; // // Tracing / statistics support // #if GASNETI_STATS_OR_TRACE #define _GASNETE_RATOMIC_EVENT(prefix,dtype,transport) do { \ switch(dtype) { \ case GEX_DT_I32: GASNETI_STAT_EVENT(R,prefix##I32_##transport); break; \ case GEX_DT_U32: GASNETI_STAT_EVENT(R,prefix##U32_##transport); break; \ case GEX_DT_I64: GASNETI_STAT_EVENT(R,prefix##I64_##transport); break; \ case GEX_DT_U64: GASNETI_STAT_EVENT(R,prefix##U64_##transport); break; \ case GEX_DT_FLT: GASNETI_STAT_EVENT(R,prefix##FLT_##transport); break; \ case GEX_DT_DBL: GASNETI_STAT_EVENT(R,prefix##DBL_##transport); break; \ default: gasneti_unreachable(); \ } \ } while (0) #endif #if GASNET_TRACE #define _GASNETE_TRACE_RATOMIC(prefix,ad,dtype,result_p,tgt_rank,tgt_addr,opcode,flags,fmt,cast,op1,op2,tools) do { \ gasneti_AD_t _trat_real_ad = gasneti_import_ad(ad); \ const char *_trat_suffix = ""; \ switch(dtype) { \ case GEX_DT_I32: _trat_suffix="I32"; break; \ case GEX_DT_U32: _trat_suffix="U32"; break; \ case GEX_DT_I64: _trat_suffix="I64"; break; \ case GEX_DT_U64: _trat_suffix="U64"; break; \ case GEX_DT_FLT: _trat_suffix="FLT"; break; \ case GEX_DT_DBL: _trat_suffix="DBL"; break; \ default: gasneti_unreachable(); \ } \ const char *_trat_transport = ""; \ if (tools) { \ _trat_transport="CPU"; \ _GASNETE_RATOMIC_EVENT(prefix,dtype,CPU); \ } else if (_trat_real_ad->_is_ref) { \ _trat_transport="AM"; \ _GASNETE_RATOMIC_EVENT(prefix,dtype,AM); \ } else { \ _trat_transport="NIC"; \ _GASNETE_RATOMIC_EVENT(prefix,dtype,NIC); \ } \ if (GASNETI_TRACE_ENABLED(R)) { \ char *_trat_opstr = (char *)gasneti_extern_malloc(gasneti_format_op(NULL,opcode));\ gasneti_format_op(_trat_opstr,opcode); \ char _trat_resultstr[32] = ""; \ if (gasneti_op_fetch(opcode)) { \ snprintf(_trat_resultstr, sizeof(_trat_resultstr), \ " " GASNETI_LADDRFMT " <-",GASNETI_LADDRSTR(result_p));\ } \ GASNETI_TRACE_PRINTF(R,(#prefix "%s: %s%s " GASNETI_RADDRFMT " AD#%u %s flags=0x%x",\ _trat_suffix,_trat_opstr,_trat_resultstr, \ GASNETI_RADDRSTR(gex_AD_QueryTM(ad),tgt_rank,tgt_addr), \ _trat_real_ad->_index, _trat_transport, \ flags)); \ gasneti_extern_free(_trat_opstr); \ } \ if (gasneti_op_1arg(opcode)) { \ GASNETI_TRACE_PRINTF(D,(#prefix "%s: operand = " fmt, \ _trat_suffix, cast op1)); \ } else if (opcode == GEX_OP_FCAS || opcode == GEX_OP_CAS) { \ GASNETI_TRACE_PRINTF(D,(#prefix "%s: oldval = " fmt \ ", newval = " fmt, \ _trat_suffix, cast op1, cast op2)); \ } else gasneti_assert(gasneti_op_0arg(opcode) || !gasneti_op_valid_atomic(opcode)); \ } while (0) #define GASNETE_TRACE_RATOMIC_gex_nb(ad,dtype,result_p,tgt_rank,tgt_addr,opcode,flags,fmt,cast,op1,op2,tools) \ _GASNETE_TRACE_RATOMIC(RATOMIC_NB_,ad,dtype,result_p,tgt_rank,tgt_addr,opcode,flags,fmt,cast,op1,op2,tools) #define GASNETE_TRACE_RATOMIC_gex_nbi(ad,dtype,result_p,tgt_rank,tgt_addr,opcode,flags,fmt,cast,op1,op2,tools) \ _GASNETE_TRACE_RATOMIC(RATOMIC_NBI_,ad,dtype,result_p,tgt_rank,tgt_addr,opcode,flags,fmt,cast,op1,op2,tools) #elif GASNET_STATS #define _GASNETE_RATOMIC_STATS(prefix,ad,dtype,tools) do { \ gasneti_AD_t _trat_real_ad = gasneti_import_ad(ad); \ if (tools) { \ _GASNETE_RATOMIC_EVENT(prefix,dtype,CPU); \ } else if (_trat_real_ad->_is_ref) { \ _GASNETE_RATOMIC_EVENT(prefix,dtype,AM); \ } else { \ _GASNETE_RATOMIC_EVENT(prefix,dtype,NIC); \ } \ } while (0) #define GASNETE_TRACE_RATOMIC_gex_nb(ad,dtype,result_p,tgt_rank,tgt_addr,opcode,flags,fmt,cast,op1,op2,tools) \ _GASNETE_RATOMIC_STATS(RATOMIC_NB_,ad,dtype,tools) #define GASNETE_TRACE_RATOMIC_gex_nbi(ad,dtype,result_p,tgt_rank,tgt_addr,opcode,flags,fmt,cast,op1,op2,tools) \ _GASNETE_RATOMIC_STATS(RATOMIC_NBI_,ad,dtype,tools) #else #define GASNETE_TRACE_RATOMIC_gex_nb(ad,dtype,result_p,tgt_rank,tgt_addr,opcode,flags,fmt,cast,op1,op2,tools) \ ((void)0) #define GASNETE_TRACE_RATOMIC_gex_nbi(ad,dtype,result_p,tgt_rank,tgt_addr,opcode,flags,fmt,cast,op1,op2,tools) \ ((void)0) #endif // // Helpers for supporting GEX_FLAG_RANK_IS_JOBRANK // GASNETI_INLINE(gasnete_ratomic_i_tm) gasneti_TM_t gasnete_ratomic_i_tm(gasneti_AD_t _ad, gex_Flags_t _flags) { return (_flags & GEX_FLAG_RANK_IS_JOBRANK) ? _ad->_tm0 : _ad->_tm; } GASNETI_INLINE(gasnete_ratomic_e_tm) gex_TM_t gasnete_ratomic_e_tm(gasneti_AD_t _ad, gex_Flags_t _flags) { return gasneti_export_tm(gasnete_ratomic_i_tm(_ad, _flags)); } GASNETI_INLINE(gasnete_ratomic_self) gex_Rank_t gasnete_ratomic_self(gasneti_AD_t _ad, gex_Flags_t _flags) { return (_flags & GEX_FLAG_RANK_IS_JOBRANK) ? _ad->_rank0 : _ad->_rank; } GASNETI_INLINE(gasnete_ratomic_jobrank) gex_Rank_t gasnete_ratomic_jobrank(gasneti_TM_t _i_tm, gex_Rank_t _tgt_rank, gex_Flags_t _flags) { if (_flags & GEX_FLAG_RANK_IS_JOBRANK) { gasneti_assert(GEX_RANK_INVALID != gasneti_i_tm_jobrank_to_rank(_i_tm, _tgt_rank)); return _tgt_rank; } else { return gasneti_i_tm_rank_to_jobrank(_i_tm, _tgt_rank); } } // // Define of a full family of "dispatch" functions that together // constitute the default implementation of remote atomics. // // GASNETE_RATOMIC_DISP(dtcode): // Expands to definitions of two inline functions: // inline gex_Event_t gasnete_ratomic##dtcode##_NB() { ... } // inline int gasnete_ratomic##dtcode##_NBI() { ... } // and extern declarations two functions of identical functionality: // extern gex_Event_t gasnete_ratomic##dtcode##_NB_external(); // extern int gasnete_ratomic##dtcode##_NBI_external(); // Each has the signature of a gex_AD_* op-initiation call for 'type'. #define GASNETE_RATOMIC_DISP(dtcode) \ _GASNETE_RATOMIC_DISP1(gasnete_ratomic##dtcode, dtcode##_isint, dtcode##_type, dtcode) // This extra pass expands the "isint" token prior to additional concatenation #define _GASNETE_RATOMIC_DISP1(prefix, isint, type, dtcode) \ _GASNETE_RATOMIC_DISP2(prefix##_NB, _gex_nb, isint, type, dtcode, gex_Event_t, GEX_EVENT_INVALID) \ _GASNETE_RATOMIC_DISP2(prefix##_NBI, _gex_nbi, isint, type, dtcode, int, 0) #define _GASNETE_RATOMIC_DISP2(fname,nbnbi,isint,type,dtcode,rettype,retdone) \ extern rettype fname##_external(_GASNETE_RATOMIC_DISP_ARGS(type)) \ _GASNETE_RATOMIC_DISP_WARN##nbnbi; \ GASNETI_INLINE(fname) _GASNETE_RATOMIC_DISP_WARN##nbnbi \ rettype fname(_GASNETE_RATOMIC_DISP_ARGS(type)) \ { \ GASNETI_CHECK_INJECT(); \ gasnete_ratomic_validate(_ad,_result_p,_tgt_rank,_tgt_addr, \ _opcode, dtcode##_dtype, _flags); \ gasneti_AD_t _real_ad = gasneti_import_ad(_ad); \ if (GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE##dtcode || \ _real_ad->_tools_safe) { \ _GASNETE_RATOMIC_DISP_TOOLS_SAFE(nbnbi,dtcode,type,retdone); \ } \ GASNETE_TRACE_RATOMIC##nbnbi(_ad, dtcode##_dtype, _result_p, \ _tgt_rank,_tgt_addr,_opcode,_flags, \ dtcode##_fmt,dtcode##_fmt_cast, \ _operand1,_operand2,0); \ switch(_opcode) { \ _GASNETE_RATOMIC_DISP_CASE1(dtcode, nbnbi, SET, N1) \ _GASNETE_RATOMIC_DISP_CASE1(dtcode, nbnbi, GET, F0) \ _GASNETE_RATOMIC_DISP_CASE1(dtcode, nbnbi, SWAP, F1) \ _GASNETE_RATOMIC_DISP_CASE1(dtcode, nbnbi, FCAS, F2) \ _GASNETE_RATOMIC_DISP_CASE1(dtcode, nbnbi, CAS, N2) \ _GASNETE_RATOMIC_DISP_INT##isint(dtcode, nbnbi, AND, 1) \ _GASNETE_RATOMIC_DISP_INT##isint(dtcode, nbnbi, OR, 1) \ _GASNETE_RATOMIC_DISP_INT##isint(dtcode, nbnbi, XOR, 1) \ _GASNETE_RATOMIC_DISP_CASE2(dtcode, nbnbi, ADD, 1) \ _GASNETE_RATOMIC_DISP_CASE2(dtcode, nbnbi, SUB, 1) \ _GASNETE_RATOMIC_DISP_CASE2(dtcode, nbnbi, MULT, 1) \ _GASNETE_RATOMIC_DISP_CASE2(dtcode, nbnbi, MIN, 1) \ _GASNETE_RATOMIC_DISP_CASE2(dtcode, nbnbi, MAX, 1) \ _GASNETE_RATOMIC_DISP_CASE2(dtcode, nbnbi, INC, 0) \ _GASNETE_RATOMIC_DISP_CASE2(dtcode, nbnbi, DEC, 0) \ default: gasneti_unreachable(); \ } \ gasneti_unreachable(); \ return retdone; \ } #define _GASNETE_RATOMIC_DISP_WARN_gex_nb GASNETI_WARN_UNUSED_RESULT #define _GASNETE_RATOMIC_DISP_WARN_gex_nbi /*empty*/ // Note that _GASNETE_RATOMIC_DISP_TOOLS_SAFE has unusually "flow" in that it // EITHER completes the operation synchronously using tools and *returns* // OR it continues through to the next statement. // Also note that the computation of _fences is correct only because // (GEX_FLAG_AD_ACQ == GASNETI_ATOMIC_ACQ) // (GEX_FLAG_AD_REL == GASNETI_ATOMIC_REL) // as checked via gasneti_static_assert() elsewhere. #define _GASNETE_RATOMIC_DISP_TOOLS_SAFE(nbnbi,dtcode,type,retdone) do { \ _GASNETE_RATOMIC_DISP_TOOLS_CHECK(dtcode) \ GASNETE_TRACE_RATOMIC##nbnbi(_ad, dtcode##_dtype, _result_p, \ _tgt_rank,_tgt_addr,_opcode,_flags, \ dtcode##_fmt,dtcode##_fmt_cast, \ _operand1,_operand2,1); \ const int _fences = (_flags) & (GEX_FLAG_AD_ACQ | GEX_FLAG_AD_REL); \ type _result = gasnete_ratomicfn##dtcode((type *)_tgt_addr, \ _operand1, _operand2, \ _opcode, _fences); \ if (gasneti_op_fetch(_opcode)) { \ *_result_p = _result; \ } \ return retdone; \ } while (0) #if GASNET_PSHM // TODO?? use of GASNETI_NBRHD_MAPPED_ADDR{,_OR_NULL}() precludes ratomics in auxseg #if GASNET_CONDUIT_SMP // With smp-conduit there is only a single nbrhd #define _GASNETE_RATOMIC_DISP_MY_NBRHD_FLAG(_flags) 1 #else #define _GASNETE_RATOMIC_DISP_MY_NBRHD_FLAG(_flags) (_flags & GEX_FLAG_AD_MY_NBRHD) #endif #define _GASNETE_RATOMIC_DISP_TOOLS_CHECK(dtcode) \ if (_flags & GEX_FLAG_AD_MY_RANK) { \ gasneti_assert(_tgt_rank == gasnete_ratomic_self(_real_ad,_flags));\ /* Will use tools */ \ } else if (GASNETE_RATOMIC_PSHMSAFE##dtcode) { \ if (_GASNETE_RATOMIC_DISP_MY_NBRHD_FLAG(_flags)) { \ gex_TM_t _tm = gasnete_ratomic_e_tm(_real_ad,_flags); \ _tgt_addr = GASNETI_NBRHD_MAPPED_ADDR(_tm,_tgt_rank,_tgt_addr);\ /* Will use tools */ \ } else { \ gex_TM_t _tm = gasnete_ratomic_e_tm(_real_ad,_flags); \ void *_tmp_addr = GASNETI_NBRHD_MAPPED_ADDR_OR_NULL(_tm,_tgt_rank,_tgt_addr);\ if (!_tmp_addr) break; /* Leave enclosing do/while w/o using tools */ \ _tgt_addr = (dtcode##_type *)_tmp_addr; \ /* Will use tools */ \ } \ } else { \ break; /* Leave enclosing do/while w/o using tools */ \ } #else #if GASNET_CONDUIT_SMP // With smp-conduit (and w/o PSHM) there is only a single process #define _GASNETE_RATOMIC_DISP_MY_RANK_FLAG(_flags) 1 #else // Without PSHM, GEX_FLAG_AD_MY_NBRHD implies GEX_FLAG_AD_MY_RANK #define _GASNETE_RATOMIC_DISP_MY_RANK_FLAG(_flags) \ (_flags & (GEX_FLAG_AD_MY_RANK|GEX_FLAG_AD_MY_NBRHD)) #endif #define _GASNETE_RATOMIC_DISP_TOOLS_CHECK(dtcode) \ if (_GASNETE_RATOMIC_DISP_MY_RANK_FLAG(_flags) || \ (_tgt_rank == gasnete_ratomic_self(_real_ad,_flags))) { \ gasneti_assert(_tgt_rank == gasnete_ratomic_self(_real_ad,_flags));\ /* Will use tools */ \ } else { \ break; /* Leave enclosing do/while w/o using tools */ \ } #endif #define _GASNETE_RATOMIC_DISP_ARGS(type) \ gex_AD_t _ad, type *_result_p, \ gex_Rank_t _tgt_rank, void *_tgt_addr, \ gex_OP_t _opcode, type _operand1, \ type _operand2, gex_Flags_t _flags \ GASNETI_THREAD_FARG #define _GASNETE_RATOMIC_DISP_INT0(dtcode,nbnbi,opstem,nargs) /*empty*/ #define _GASNETE_RATOMIC_DISP_INT1 _GASNETE_RATOMIC_DISP_CASE2 #define _GASNETE_RATOMIC_DISP_CASE2(dtcode,nbnbi,opstem,nargs) \ _GASNETE_RATOMIC_DISP_CASE1(dtcode,nbnbi,opstem,N##nargs) \ _GASNETE_RATOMIC_DISP_CASE1(dtcode,nbnbi,F##opstem,F##nargs) #define _GASNETE_RATOMIC_DISP_CASE1(dtcode,nbnbi,opname,args) \ case GEX_OP_##opname: \ return (_GASNETE_RATOMIC_DISP_TBL(dtcode).nbnbi._gex_op_##opname)(GASNETE_RATOMIC_PASS_##args); #if GASNETE_RATOMIC_AMONLY // AM is the only implementation - ignore _fn_tbl and resolve at link time instead #define _GASNETE_RATOMIC_DISP_TBL(dtcode) gasnete_amratomic##dtcode##_fn_tbl #define GASNETE_AMRATOMIC_TBL_DECL(dtcode) \ extern gasnete_ratomic##dtcode##_fn_tbl_t gasnete_amratomic##dtcode##_fn_tbl; GASNETE_DT_APPLY(GASNETE_AMRATOMIC_TBL_DECL) #undef GASNETE_AMRATOMIC_TBL_DECL #else #define _GASNETE_RATOMIC_DISP_TBL(dtcode) _real_ad->_fn_tbl->dtcode #endif // GASNETE_DT_APPLY(GASNETE_RATOMIC_DISP) /*---------------------------------------------------------------------------------*/ // // Default implementation // Maps client-facing gex_Op{NB,NBI}_*() calls to the default dispatch // functions, unless the conduit has previously defined overrides. // // GASNETE_RATOMIC_NO_EXTERNAL is a compile-time "kill switch" for the use of // gasneti_constant_p() to call an external function for dispatch of gex_AD_Op* // when 'op' is non-constant. // If defined non-zero then the inline functions will always be used. #if GASNETE_RATOMIC_NO_EXTERNAL #define GASNETE_RATOMIC_FN(suffix,ad,result_p,rank,addr,opcode,op1,op2,flags) \ gasnete_ratomic_##suffix(ad,result_p,rank,addr,opcode,op1,op2,flags GASNETI_THREAD_GET) #else #define GASNETE_RATOMIC_FN(suffix,ad,result_p,rank,addr,opcode,op1,op2,flags) \ (gasneti_constant_p(opcode) \ ? gasnete_ratomic_##suffix(ad,result_p,rank,addr,opcode,op1,op2,flags GASNETI_THREAD_GET) \ : gasnete_ratomic_##suffix##_external(ad,result_p,rank,addr,opcode,op1,op2,flags GASNETI_THREAD_GET)) #endif // #if !defined(gex_AD_OpNB_I32) || !defined(gex_AD_OpNBI_I32) #if defined(gex_AD_OpNB_I32) || defined(gex_AD_OpNBI_I32) #error "Conduit must override gex_AD_OpNB_I32 and gex_AD_OpNBI_I32_NBI together" #endif #define gex_AD_OpNB_I32(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_I32_NB,ad,result_p,rank,addr,opcode,op1,op2,flags) #define gex_AD_OpNBI_I32(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_I32_NBI,ad,result_p,rank,addr,opcode,op1,op2,flags) #endif #if !defined(gex_AD_OpNB_U32) || !defined(gex_AD_OpNBI_U32) #if defined(gex_AD_OpNB_U32) || defined(gex_AD_OpNBI_U32) #error "Conduit must override gex_AD_OpNB_U32 and gex_AD_OpNBI_U32_NBI together" #endif #define gex_AD_OpNB_U32(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_U32_NB,ad,result_p,rank,addr,opcode,op1,op2,flags) #define gex_AD_OpNBI_U32(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_U32_NBI,ad,result_p,rank,addr,opcode,op1,op2,flags) #endif #if !defined(gex_AD_OpNB_I64) || !defined(gex_AD_OpNBI_I64) #if defined(gex_AD_OpNB_I64) || defined(gex_AD_OpNBI_I64) #error "Conduit must override gex_AD_OpNB_I64_NB and gex_AD_OpNBI_I64_NBI together" #endif #define gex_AD_OpNB_I64(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_I64_NB,ad,result_p,rank,addr,opcode,op1,op2,flags) #define gex_AD_OpNBI_I64(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_I64_NBI,ad,result_p,rank,addr,opcode,op1,op2,flags) #endif #if !defined(gex_AD_OpNB_U64) || !defined(gex_AD_OpNBI_U64) #if defined(gex_AD_OpNB_U64) || defined(gex_AD_OpNBI_U64) #error "Conduit must override gex_AD_OpNB_U64_NB and gex_AD_OpNBI_U64_NBI together" #endif #define gex_AD_OpNB_U64(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_U64_NB,ad,result_p,rank,addr,opcode,op1,op2,flags) #define gex_AD_OpNBI_U64(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_U64_NBI,ad,result_p,rank,addr,opcode,op1,op2,flags) #endif #if !defined(gex_AD_OpNB_FLT) || !defined(gex_AD_OpNBI_FLT) #if defined(gex_AD_OpNB_FLT) || defined(gex_AD_OpNBI_FLT) #error "Conduit must override gex_AD_OpNB_FLT_NB and gex_AD_OpNBI_FLT_NBI together" #endif #define gex_AD_OpNB_FLT(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_FLT_NB,ad,result_p,rank,addr,opcode,op1,op2,flags) #define gex_AD_OpNBI_FLT(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_FLT_NBI,ad,result_p,rank,addr,opcode,op1,op2,flags) #endif #if !defined(gex_AD_OpNB_DBL) || !defined(gex_AD_OpNBI_DBL) #if defined(gex_AD_OpNB_DBL) || defined(gex_AD_OpNBI_DBL) #error "Conduit must override gex_AD_OpNB_DBL_NB and gex_AD_OpNBI_DBL_NBI together" #endif #define gex_AD_OpNB_DBL(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_DBL_NB,ad,result_p,rank,addr,opcode,op1,op2,flags) #define gex_AD_OpNBI_DBL(ad,result_p,rank,addr,opcode,op1,op2,flags) \ GASNETE_RATOMIC_FN(gex_dt_DBL_NBI,ad,result_p,rank,addr,opcode,op1,op2,flags) #endif /*---------------------------------------------------------------------------------*/ GASNETI_END_NOWARN GASNETI_END_EXTERNC #undef _IN_GASNET_RATOMIC_H #endif gasnet-2025.8.0/extended-ref/ratomic/gasnet_ratomic_fwd.h0000664000175000017500000001177615142313673023456 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/ratomic/gasnet_ratomic_fwd.h $ * Description: GASNet Remote Atomics API Header (forward decls) * Copyright 2017, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_RATOMIC_FWD_H #define _GASNET_RATOMIC_FWD_H // (###) Note to conduit authors: // When providing conduit-specific implementations of Remote Atomics, // one should clone this file to the conduit directory and make the // changes indicated by comments starting with (###). // **** // Section 1: control/configure AM-based reference implementation // // In general, the AM-based atomics may get used even in the presence of a // conduit-specific implementation (for instance, any time an AD has a type // or an operation not supported by the conduit). Some conduit properties // are relevant to the behavior of the AM-based reference implementation. // **** // 1a. GASNETE_RATOMIC_AMONLY // // If using extended-ref/ratomic/gasnet_ratomic_fwd.h file, then there is no // conduit-specific version. This define enables some optimization correct // only in the absence of conduit-specific atomics. // // (###) Conduits cloning the file *must* remove (or comment-out) this define! #if GASNETE_BUILD_AMRATOMIC #define GASNETE_RATOMIC_AMONLY 1 #endif // 1b. GASNETE_AMRATOMIC_USE_RMA_gex_dt_* // // Enable optional use of RMA Put and Get for atomic SET and GET operations // within the AM-based atomics (rather than an AM that performs the SET or GET // using the target CPU). // // If the conduit's RMA Put and Get of naturally aligned 4 and/or 8 byte values // are free of word-tearing and intermediate values, as observed by the target // CPU, then we consider them "atomic" and AM-based Set and Get may use them. // // (###) replace 'if 0' with 'if 1' below if appropriate // #if 0 // (###) change '0' to '1' if 32-bit RMA Put and Get are atomic #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_I32 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_U32 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_FLT 1 #endif #if 0 // (###) change '0' to '1' if 64-bit RMA Put and Get are atomic #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_I64 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_U64 1 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_DBL 1 #endif // 1c. GASNETI_RATOMIC_STATS // // Stats needed by the RAtomic reference implementation // // (###) Conduits should merge this set of STATS counters with their own // to allow the reference implementation to continue compiling along side // the conduit-specific implementation(s). // // TODO-EX: find an alternative location to define the RAtomic reference // STATS so that conduits may *append* to them (rather than replicate) // when cloning this file. #ifndef GASNETI_RATOMIC_STATS #define GASNETI_RATOMIC_STATS(CNT,VAL,TIME) \ /* Currently empty */ #endif // **** // Section 2: control/configure conduit-specific remote atomics // // This section contains settings related to how conduit-specific remote // atomics interact with the rest of the system, such as the interaction // with atomics performed by the local CPU. // **** // 2a. GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_* // // Assert that all atomics implementations possible in the current build // are unconditionally "tools safe" (for each type independently). The // term "tools safe" here means that concurrent access via GASNet-Tools // will produce correct results. // // Each token GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE##dtcode should be 0 or 1: // 0: Honor _real_ad->_tools_safe (testing each instance dynamically) // 1: Ignore _real_ad->_tools_safe, assuming it is 1 (saves 1 branch) // Consumed by the GASNETE_RATOMIC_DISP() macro. // // (###) Conduits cloning this file must update these to be accurate. // For types which are never offloaded, the value '1' may be retained. // For a type which may be offloaded this value '0' should be used // *unless* the implementation is consistent with GASNet-Tools atomics. // HOWEVER, that is almost never a safe determination to make, since // Tools may use mutexes, etc. TL;DR: use 0 for offloadable types. // #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_I32 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_U32 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_I64 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_U64 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_FLT 1 #define GASNETE_RATOMIC_ALWAYS_TOOLS_SAFE_gex_dt_DBL 1 // 3. Hooks for conduit-specific extension to create and destroy // // These hooks are analogous to the following: // GASNETC_CLIENT_EXTRA_DECLS // GASNETC_CLIENT_INIT_HOOK // GASNETC_CLIENT_FINI_HOOK // GASNETC_SIZEOF_CLIENT_T // which are documented in template-conduit/gasnet_core_fwd.h //#define GASNETC_AD_EXTRA_DECLS (###) //#define GASNETC_AD_INIT_HOOK(i_ad) (###) //#define GASNETC_AD_FINI_HOOK(i_ad) (###) //#define GASNETC_SIZEOF_AD_T() (###) #endif // _GASNET_RATOMIC_FWD_H gasnet-2025.8.0/extended-ref/ratomic/gasnet_refratomic.h0000664000175000017500000000201615142313673023276 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/ratomic/gasnet_refratomic.h $ * Description: Reference implemetation of GASNet Remote Atomics, using Active Messages, Header * Copyright 2017, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _GASNET_EXTENDED_REFRATOMIC_H #define _GASNET_EXTENDED_REFRATOMIC_H // // AM Handler Table entries // /* conduits may override this to relocate the ref-ratomic handlers */ #ifndef GASNETE_RATOMIC_HANDLER_BASE #define GASNETE_RATOMIC_HANDLER_BASE 98 #endif #define _hidx_gasnete_amratomic_reqh (GASNETE_RATOMIC_HANDLER_BASE+0) #define _hidx_gasnete_amratomic_reph (GASNETE_RATOMIC_HANDLER_BASE+1) MEDIUM_HANDLER_DECL(gasnete_amratomic_reqh,3,5); MEDIUM_HANDLER_DECL(gasnete_amratomic_reph,1,2); #define GASNETE_AMRATOMIC_HANDLERS() \ gasneti_handler_tableentry_with_bits(gasnete_amratomic_reqh,3,5,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_with_bits(gasnete_amratomic_reph,1,2,REPLY,MEDIUM,0), #endif gasnet-2025.8.0/extended-ref/ratomic/gasnet_refratomic.c0000664000175000017500000012032615142313673023276 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/ratomic/gasnet_refratomic.c $ * Description: Reference implemetation of GASNet Remote Atomics, using Active Messages * Copyright 2017, The Regents of the University of California * Terms of use are as specified in license.txt */ #define GASNETI_NEED_GASNET_COLL_H GASNET_DEBUG // Yes, this works. #define GASNETI_NEED_GASNET_RATOMIC_H 1 #include #include #include #ifndef _GEX_AD_T #ifndef gasneti_import_ad gasneti_AD_t gasneti_import_ad(gex_AD_t _ad) { const gasneti_AD_t _real_ad = GASNETI_IMPORT_POINTER(gasneti_AD_t,_ad); GASNETI_IMPORT_MAGIC(_real_ad, AD); return _real_ad; } gasneti_AD_t gasneti_import_ad_valid(gex_AD_t ad) { gasneti_assert(ad != GEX_AD_INVALID); return gasneti_import_ad(ad); } #endif #ifndef gasneti_export_ad gex_AD_t gasneti_export_ad(gasneti_AD_t _real_ad) { GASNETI_CHECK_MAGIC(_real_ad, GASNETI_AD_MAGIC); return GASNETI_EXPORT_POINTER(gex_AD_t, _real_ad); } #endif #ifdef GASNETC_AD_EXTRA_DECLS GASNETC_AD_EXTRA_DECLS #endif extern gasneti_AD_t gasneti_alloc_ad( gasneti_TM_t tm, gex_DT_t dt, gex_OP_t ops, gex_Flags_t flags) { static unsigned int next_index = 0; gasneti_AD_t ad; #ifdef GASNETC_SIZEOF_AD_T size_t alloc_size = GASNETC_SIZEOF_AD_T(); gasneti_assert_uint(alloc_size ,>=, sizeof(*ad)); #else size_t alloc_size = sizeof(*ad); #endif ad = gasneti_malloc(alloc_size); GASNETI_INIT_MAGIC(ad, GASNETI_AD_MAGIC); ad->_cdata = NULL; ad->_tm = tm; ad->_rank = tm->_rank; // Used often enough to justify caching ad->_tm0 = tm->_ep->_client->_tm0; ad->_rank0 = tm->_ep->_client->_tm0->_rank; ad->_flags = flags; ad->_dt = dt; ad->_ops = ops; ad->_index = next_index++; #if GASNET_DEBUG ad->_tools_safe = -1; ad->_fn_tbl = NULL; #endif #ifndef GASNETC_AD_INIT_HOOK size_t extra = alloc_size - sizeof(*ad); if (extra) memset(ad + 1, 0, extra); #endif return ad; } void gasneti_free_ad(gasneti_AD_t ad) { #ifdef GASNETI_AD_FINI_HOOK GASNETI_AD_FINI_HOOK(ad); #endif GASNETI_INIT_MAGIC(ad, GASNETI_AD_BAD_MAGIC); gasneti_free(ad); } void gasneti_AD_Create( gex_AD_t *ad_p, gex_TM_t tm, gex_DT_t dt, gex_OP_t ops, gex_Flags_t flags) { if (GASNETI_TRACE_ENABLED(O)) { char *dtstr = (char *)gasneti_malloc(gasneti_format_dt(NULL, dt)); char *opstr = (char *)gasneti_malloc(gasneti_format_op(NULL, ops)); gasneti_format_dt(dtstr, dt); gasneti_format_op(opstr, ops); GASNETI_TRACE_PRINTF(O,("gex_AD_Create: tm=" GASNETI_TMFMT " dt=%s ops=%s flags=0x%x", GASNETI_TMSTR(tm), dtstr, opstr, flags)); gasneti_free(dtstr); gasneti_free(opstr); } GASNETI_CHECK_INJECT(); gasneti_TM_t real_tm = gasneti_import_tm_nonpair(tm); // Argument validation is done here, rather than gasneti_alloc_ad(), to // allow conduit-specific extensions (such as additional types or ops). // However, this leaves a significant amount of code to be cloned into // the conduit. #if GASNET_DEBUG // Verify that call is collective and single-valued { struct { gex_DT_t dt; gex_OP_t ops; gex_Flags_t flags; } args; if (!real_tm->_rank) { args.dt = dt; args.ops = ops; args.flags = flags; } gex_Event_Wait(gex_Coll_BroadcastNB(tm, 0, &args, &args, sizeof(args), 0)); gasneti_assert(args.dt == dt); gasneti_assert(args.ops == ops); gasneti_assert(args.flags == flags); } // Does the 'dt' arument name a single valid data type? gasneti_assert(gasneti_dt_valid_atomic(dt)); // Does ops specify a non-empty set with ALL members valid for remote atomics on the data type? gasneti_assert(ops); // Not empty gasneti_assert(gasneti_op_atomic_mask(ops)); gasneti_assert(gasneti_op_fp_mask(ops) || !gasneti_dt_fp(dt)); gasneti_assert(gasneti_op_int_mask(ops) || !gasneti_dt_int(dt)); // Does the 'flags' argument include at most one AD_FAVOR_* bit? gasneti_assert(GASNETI_POWEROFTWO(flags & (GEX_FLAG_AD_FAVOR_MY_RANK | GEX_FLAG_AD_FAVOR_MY_NBRHD | GEX_FLAG_AD_FAVOR_REMOTE))); // Verify we agree on the size of the FP type, if any gasneti_assert((dt != GEX_DT_FLT) || sizeof(float) == 4); gasneti_assert((dt != GEX_DT_DBL) || sizeof(double) == 8); #endif // Lacking a subsystem init call, this is as good a place as any for these checks: gasneti_static_assert(GEX_FLAG_AD_ACQ == GASNETI_ATOMIC_ACQ); gasneti_static_assert(GEX_FLAG_AD_REL == GASNETI_ATOMIC_REL); gasneti_AD_t real_ad = gasneti_alloc_ad(real_tm, dt, ops, flags); // Algorithm selection: #ifdef GASNETC_AD_INIT_HOOK GASNETC_AD_INIT_HOOK(real_ad); #else gasnete_amratomic_init_hook(real_ad); #endif gasneti_assert(real_ad->_tools_safe >= 0); gasneti_assert(real_ad->_fn_tbl != NULL); GASNETI_TRACE_PRINTF(O,("gex_AD_Create(dt=%d, ops=0x%x) -> AD#%u %s", (int)dt, (unsigned int)ops, real_ad->_index, real_ad->_is_ref ? "AM" : "NIC")); *ad_p = gasneti_export_ad(real_ad); return; } void gasneti_AD_Destroy(gex_AD_t ad) { GASNETI_TRACE_PRINTF(O,("gex_AD_Destroy: ad=%p", (void*)ad)); GASNETI_CHECK_INJECT(); gasneti_AD_t real_ad = gasneti_import_ad(ad); #if GASNET_DEBUG // TODO: might try to verify that call is collective? // TODO: can/should we verify that there are no incompete ops? #endif gasneti_free_ad(real_ad); return; } /*---------------------------------------------------------------------------------*/ #if GASNET_DEBUG void gasnete_ratomic_validate( gex_AD_t ad, void *result_p, gex_Rank_t tgt_rank, void *tgt_addr, gex_OP_t opcode, gex_DT_t datatype, gex_Flags_t flags) { gasneti_assert(ad != GEX_AD_INVALID); gasneti_AD_t real_ad = gasneti_import_ad(ad); // Rank must be valid if (flags & GEX_FLAG_RANK_IS_JOBRANK) { if (gasneti_i_tm_jobrank_to_rank(real_ad->_tm, tgt_rank) == GEX_RANK_INVALID) { gasneti_fatalerror("gex_AD_Op*() called with invalid target jobrank"); } } else { if (tgt_rank >= real_ad->_tm->_size) { gasneti_fatalerror("gex_AD_Op*() called with invalid target rank"); } } // Datatype must match AD if (datatype != real_ad->_dt) { char *str1 = gasneti_malloc(gasneti_format_dt(NULL, datatype)); char *str2 = gasneti_malloc(gasneti_format_dt(NULL, real_ad->_dt)); gasneti_format_dt(str1, datatype); gasneti_format_dt(str2, real_ad->_dt); gasneti_fatalerror("gex_AD_Op*() called with data type 0x%x (%s), not matching the AD (%s)", (unsigned int)datatype, str1, str2); } // Opcode must be exactly 1 bit and valid for AD if (! gasneti_op_valid_atomic(opcode)) { char *str1 = gasneti_malloc(gasneti_format_op(NULL, opcode)); gasneti_format_op(str1, opcode); gasneti_fatalerror("gex_AD_Op*() called with an unknown/invalid opcode 0x%x (%s)", (unsigned int)opcode, str1); } if (! (opcode & real_ad->_ops)) { char *str1 = gasneti_malloc(gasneti_format_op(NULL, opcode)); char *str2 = gasneti_malloc(gasneti_format_op(NULL, real_ad->_ops)); gasneti_format_op(str1, opcode); gasneti_format_op(str2, real_ad->_ops); gasneti_fatalerror("gex_AD_Op*() called with an opcode 0x%x (%s) not valid for the AD (%s)", (unsigned int)opcode, str1, str2); } // Fetching ops must have non-NULL result_p if (gasneti_op_fetch(opcode) && !result_p) { char *str1 = gasneti_malloc(gasneti_format_op(NULL, opcode)); gasneti_format_op(str1, opcode); gasneti_fatalerror("gex_AD_Op*() called with fetching opcode %s, but result_p==NULL", str1); } // Flags may provide at most one affinity assertion if (!GASNETI_POWEROFTWO(flags & (GEX_FLAG_AD_MY_RANK | GEX_FLAG_AD_MY_NBRHD))) { gasneti_fatalerror("gex_AD_Op*() called with more than one GEX_FLAG_AD_MY_* flag"); } // Address must be in bound segment // TODO: remove this restriction? gasneti_boundscheck(gasnete_ratomic_e_tm(real_ad, flags), tgt_rank, tgt_addr, gasneti_dt_size(datatype)); } #endif /*---------------------------------------------------------------------------------*/ // // Non-inlined instances of the dispatch functions // #define GASNETE_RATOMIC_EXTERNS(dtcode) \ _GASNETE_RATOMIC_EXTERNS(gasnete_ratomic##dtcode, dtcode##_type) #define _GASNETE_RATOMIC_EXTERNS(prefix, type) \ gex_Event_t prefix##_NB_external( \ gex_AD_t ad, type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_OP_t opcode, type operand1, \ type operand2, gex_Flags_t flags \ GASNETI_THREAD_FARG) \ { \ return prefix##_NB(ad, result_p, tgt_rank, tgt_addr, \ opcode, operand1, operand2, flags \ GASNETI_THREAD_PASS); \ } \ int prefix##_NBI_external( \ gex_AD_t ad, type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_OP_t opcode, type operand1, \ type operand2, gex_Flags_t flags \ GASNETI_THREAD_FARG) \ { \ return prefix##_NBI(ad, result_p, tgt_rank, tgt_addr, \ opcode, operand1, operand2, flags \ GASNETI_THREAD_PASS); \ } GASNETE_DT_APPLY(GASNETE_RATOMIC_EXTERNS) /*---------------------------------------------------------------------------------*/ // // AM-based Implementation // Built unless GASNETE_BUILD_AMRATOMIC is defined to 0 // // Notes on implementation of GEX_FLAG_AD_{REL,ACQ} // // The reference implementation of Remote Atomics has two portions. // // One is used for target ranks meeting "MY_RANK" and "MY_NBRHD" // conditions (with possible datatype constraints). This implementation // performs all atomic operations synchronously using GASNet-Tools, which // provides the necessary support for REL and ACQ fences. // // The second is the AM-based code below. The remainder of this note is an // effort to explain how GEX_FLAG_AD_{REL,ACQ} are implemented. The short // version is that both fences are *unconditionally* present in the // implementation and so the flags are ignored with no loss of correctness. // // RELEASE: // We believe that all current AM implementations include at least one release // fence on the path to AM injection. // // ACQUIRE: // We believe that all current AM implementations include at least one acquire // fence on the path to reception of the AM Reply, which is sufficient in a // single-threaded build. In the case of a multi-threaded build, the // implementation of all GASNet-EX synchronization calls (both on gex_Event_t // and NBI) include an acquire fence if the set of operations synchronized // could potentially include a RMW or GET operation. #if GASNETE_BUILD_AMRATOMIC // // Pool of small structs describing an in-flight remote atomic // TODO: per-thread free lists? // static gasneti_lifo_head_t gasnete_amratomic_op_pool = GASNETI_LIFO_INITIALIZER; typedef struct { void *result_p; gasneti_eop_t *eop; gasneti_iop_t *iop; gex_EC_t iop_type; } *gasnete_amratomic_op_t; GASNETI_INLINE(gasnete_amratomic_op_alloc) GASNETI_MALLOC gasnete_amratomic_op_t gasnete_amratomic_op_alloc(void) { gasnete_amratomic_op_t result = gasneti_lifo_pop(&gasnete_amratomic_op_pool); if_pf (NULL == result) { // TODO: grow pool by large contig. blocks? result = gasneti_malloc(sizeof(*result)); gasneti_leak(result); } return result; } GASNETI_INLINE(gasnete_amratomic_op_free) void gasnete_amratomic_op_free(gasnete_amratomic_op_t rop) { gasneti_lifo_push(&gasnete_amratomic_op_pool, rop); } // // AM Request Handler // TODO: For a SEQ endpoint the updates can be non-atomic! // GASNETI_INLINE(gasnete_amratomic_reqh_inner) void gasnete_amratomic_reqh_inner( gex_Token_t token, void *addr, size_t nbytes, gex_AM_Arg_t ctrl, void *tgt, void *rop) { const gasneti_op_idx_t op_idx = (gasneti_op_idx_t) (ctrl & 0x1F); // Low 5 bits const gex_OP_t opcode = ((gex_OP_t)1 << op_idx); const gex_DT_t dt = ((gex_DT_t)ctrl >> 8); union { int32_t u_gex_dt_I32; uint32_t u_gex_dt_U32; int64_t u_gex_dt_I64; uint64_t u_gex_dt_U64; float u_gex_dt_FLT; double u_gex_dt_DBL; } result; size_t typesz; gasneti_assert(nbytes == (gasneti_dt_size(dt) * (gasneti_op_0arg(opcode)?0:gasneti_op_1arg(opcode)?1:2))); // Load the operands from the Medium payload into 'op1' and 'op2' // and set 'typesz'. This is necessary, instead of direct use of // ops[0] and ops[1], since the code that follows will pass *both* // operands, even if one or both lies beyond the end of the payload. // // Note: all parameter and variable names are hardcoded. // // Compilers have no way to understand which operations use which // operands, and so we are faced with maybe-used-uninitialized warnings // unless we add unneeded initializers. So, we have zero initializers // here under the assumption that, relative to the AM overheads, these // are not "too costly". // TODO: revisit this. #define GASNETE_AMRATOMIC_REQH_OPS(type) \ type op1 = 0; \ type op2 = 0; \ type *ops = (type*) addr; \ switch (nbytes / sizeof(type)) { \ case 2: op2 = ops[1]; \ GASNETI_FALLTHROUGH \ case 1: op1 = ops[0]; \ } \ typesz = sizeof(type) // Case for a single datatype. // Note: all parameter and variable names are hardcoded. #define GASNETE_AMRATOMIC_REQH_CASE(dtcode) \ case dtcode##_dtype: { \ GASNETE_AMRATOMIC_REQH_OPS(dtcode##_type); \ result.u##dtcode = gasnete_ratomicfn##dtcode(tgt,op1,op2,opcode,0);\ break; \ } switch (dt) { GASNETE_DT_APPLY(GASNETE_AMRATOMIC_REQH_CASE) default: gasneti_unreachable(); } gex_AM_ReplyMedium(token, gasneti_handleridx(gasnete_amratomic_reph), &result, gasneti_op_fetch(opcode) ? typesz : 0, GEX_EVENT_NOW, 0, PACK(rop)); #undef GASNETE_AMRATOMIC_REQH_CASE #undef GASNETE_AMRATOMIC_REQH_OPS } MEDIUM_HANDLER(gasnete_amratomic_reqh,3,5, (token,addr,nbytes, a0, UNPACK(a1), UNPACK(a2) ), (token,addr,nbytes, a0, UNPACK2(a1, a2), UNPACK2(a3, a4))); // // AM Reply Handler // GASNETI_INLINE(gasnete_amratomic_reph_inner) void gasnete_amratomic_reph_inner( gex_Token_t token, void *payload, size_t nbytes, gasnete_amratomic_op_t rop) { gasneti_assert(rop); switch (nbytes) { case 4: *(uint32_t*)rop->result_p = *(uint32_t*)payload; gasneti_sync_writes(); break; case 8: *(uint64_t*)rop->result_p = *(uint64_t*)payload; gasneti_sync_writes(); break; default: gasneti_assert(!nbytes && !rop->result_p); } gasneti_assert((!rop->eop) ^ (!rop->iop)); // Exactly one is non-NULL if (rop->eop) { gasneti_eop_markdone(rop->eop); } else if (rop->iop_type == GEX_EC_RMW) { gasneti_iop_markdone_rmw(rop->iop, 1); // TODO-EX: EOP_INTERFACE - to be replaced } else { gasneti_assert((rop->iop_type == GEX_EC_PUT) || (rop->iop_type == GEX_EC_GET)); gasneti_iop_markdone(rop->iop, 1, (rop->iop_type == GEX_EC_GET)); } gasnete_amratomic_op_free(rop); } MEDIUM_HANDLER(gasnete_amratomic_reph,1,2, (token,addr,nbytes, UNPACK(a0) ), (token,addr,nbytes, UNPACK2(a0, a1))); // // Functions to send AM Medium with either NB or NBI completion upon reply. // GASNETI_INLINE(gasnete_amratomic_request_NB) gex_Event_t gasnete_amratomic_request_NB( gasneti_AD_t ad, gex_Rank_t tgt_rank, void *result_p, void *tgt_addr, gasneti_op_idx_t op_idx, gex_DT_t datatype, void *payload, size_t length, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_amratomic_op_t rop = gasnete_amratomic_op_alloc(); rop->result_p = result_p; rop->iop = NULL; rop->eop = gasneti_eop_create(GASNETI_THREAD_PASS_ALONE); gex_Event_t result = gasneti_eop_to_event(rop->eop); gex_TM_t tm = gasnete_ratomic_e_tm(ad, flags); gex_Flags_t am_flags = flags & GEX_FLAG_IMMEDIATE; int imm = gex_AM_RequestMedium(tm, tgt_rank, gasneti_handleridx(gasnete_amratomic_reqh), payload, length, GEX_EVENT_NOW, am_flags, (op_idx | (datatype << 8)), PACK(tgt_addr), PACK(rop)); if (imm) { gasneti_eop_markdone(rop->eop); gasneti_assert_zeroret(gasnete_test(result GASNETI_THREAD_PASS)); gasnete_amratomic_op_free(rop); result = GEX_EVENT_NO_OP; } return result; } GASNETI_INLINE(gasnete_amratomic_request_NBI) int gasnete_amratomic_request_NBI( gasneti_AD_t ad, gex_Rank_t tgt_rank, void *result_p, void *tgt_addr, gasneti_op_idx_t op_idx, gex_DT_t datatype, void *payload, size_t length, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnete_amratomic_op_t rop = gasnete_amratomic_op_alloc(); rop->result_p = result_p; rop->eop = NULL; rop->iop = gasneti_iop_register_rmw(1 GASNETI_THREAD_PASS); // TODO-EX: EOP_INTERFACE - to be replaced rop->iop_type = GEX_EC_RMW; gex_TM_t tm = gasnete_ratomic_e_tm(ad, flags); gex_Flags_t am_flags = flags & GEX_FLAG_IMMEDIATE; int imm = gex_AM_RequestMedium(tm, tgt_rank, gasneti_handleridx(gasnete_amratomic_reqh), payload, length, GEX_EVENT_NOW, am_flags, (op_idx | (datatype << 8)), PACK(tgt_addr), PACK(rop)); if (imm) { gasneti_iop_markdone_rmw(rop->iop, 1); // TODO-EX: EOP_INTERFACE - to be replaced gasnete_amratomic_op_free(rop); } return imm; } // // Inline functions (called by the ratomic functions) that invoke // the gasnete_amratomic_request_{NB,NBI}() functions, above. // #define GASNETE_AMRATOMIC_MID_NB(dtcode) \ _GASNETE_AMRATOMIC_MID_NB(gasnete_amratomic##dtcode, dtcode##_dtype, dtcode##_type) #define _GASNETE_AMRATOMIC_MID_NB(prefix, datatype, type) \ GASNETI_INLINE(prefix##_NB_N0) \ gex_Event_t prefix##_NB_N0( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_0arg(((gex_OP_t)1 << op_idx))); \ return gasnete_amratomic_request_NB( \ ad, tgt_rank, \ NULL, tgt_addr, op_idx, datatype, \ NULL, 0, flags \ GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NB_N1) \ gex_Event_t prefix##_NB_N1( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_1arg(((gex_OP_t)1 << op_idx))); \ return gasnete_amratomic_request_NB( \ ad, tgt_rank, \ NULL, tgt_addr, op_idx, datatype, \ &operand1, sizeof(type), flags \ GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NB_N2) \ gex_Event_t prefix##_NB_N2( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, type operand2, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_2arg(((gex_OP_t)1 << op_idx))); \ type payload[2]; \ payload[0] = operand1; payload[1] = operand2; \ return gasnete_amratomic_request_NB( \ ad, tgt_rank, \ NULL, tgt_addr, op_idx, datatype, \ &payload, 2*sizeof(type), flags \ GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NB_F0) \ gex_Event_t prefix##_NB_F0( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_0arg(((gex_OP_t)1 << op_idx))); \ return gasnete_amratomic_request_NB( \ ad, tgt_rank, \ result_p, tgt_addr, op_idx, datatype, \ NULL, 0, flags \ GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NB_F1) \ gex_Event_t prefix##_NB_F1( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_1arg(((gex_OP_t)1 << op_idx))); \ return gasnete_amratomic_request_NB( \ ad, tgt_rank, \ result_p, tgt_addr, op_idx, datatype, \ &operand1, sizeof(type), flags \ GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NB_F2) \ gex_Event_t prefix##_NB_F2( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, type operand2, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_2arg(((gex_OP_t)1 << op_idx))); \ type payload[2]; \ payload[0] = operand1; payload[1] = operand2; \ return gasnete_amratomic_request_NB( \ ad, tgt_rank, \ result_p, tgt_addr, op_idx, datatype, \ &payload, 2*sizeof(type), flags \ GASNETI_THREAD_PASS); \ } #define GASNETE_AMRATOMIC_MID_NBI(dtcode) \ _GASNETE_AMRATOMIC_MID_NBI(gasnete_amratomic##dtcode, dtcode##_dtype, dtcode##_type) #define _GASNETE_AMRATOMIC_MID_NBI(prefix, datatype, type) \ GASNETI_INLINE(prefix##_NBI_N0) \ int prefix##_NBI_N0( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_0arg(((gex_OP_t)1 << op_idx))); \ return gasnete_amratomic_request_NBI( \ ad, tgt_rank, \ NULL, tgt_addr, op_idx, datatype, \ NULL, 0, flags \ GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_N1) \ int prefix##_NBI_N1( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_1arg(((gex_OP_t)1 << op_idx))); \ return gasnete_amratomic_request_NBI( \ ad, tgt_rank, \ NULL, tgt_addr, op_idx, datatype, \ &operand1, sizeof(type), flags \ GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_N2) \ int prefix##_NBI_N2( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, type operand2, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_2arg(((gex_OP_t)1 << op_idx))); \ type payload[2]; \ payload[0] = operand1; payload[1] = operand2; \ return gasnete_amratomic_request_NBI( \ ad, tgt_rank, \ NULL, tgt_addr, op_idx, datatype, \ &payload, 2*sizeof(type), flags \ GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_F0) \ int prefix##_NBI_F0( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_0arg(((gex_OP_t)1 << op_idx))); \ return gasnete_amratomic_request_NBI( \ ad, tgt_rank, \ result_p, tgt_addr, op_idx, datatype, \ NULL, 0, flags \ GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_F1) \ int prefix##_NBI_F1( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_1arg(((gex_OP_t)1 << op_idx))); \ return gasnete_amratomic_request_NBI( \ ad, tgt_rank, \ result_p, tgt_addr, op_idx, datatype, \ &operand1, sizeof(type), flags \ GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_F2) \ int prefix##_NBI_F2( \ gasneti_op_idx_t op_idx, gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, type operand2, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasneti_assert(gasneti_op_2arg(((gex_OP_t)1 << op_idx))); \ type payload[2]; \ payload[0] = operand1; payload[1] = operand2; \ return gasnete_amratomic_request_NBI( \ ad, tgt_rank, \ result_p, tgt_addr, op_idx, datatype, \ &payload, 2*sizeof(type), flags \ GASNETI_THREAD_PASS); \ } \ GASNETI_INLINE(prefix##_NBI_S1) \ int prefix##_NBI_S1( \ gasneti_AD_t ad, \ gex_Rank_t tgt_rank, void *tgt_addr, \ type operand1, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasnete_amratomic_op_t rop = gasnete_amratomic_op_alloc();\ rop->result_p = NULL; \ rop->eop = NULL; \ rop->iop = gasneti_iop_register(1,0 GASNETI_THREAD_PASS); \ rop->iop_type = GEX_EC_PUT; \ gex_TM_t tm = gasnete_ratomic_e_tm(ad, flags); \ const gasneti_op_idx_t op_idx = gasneti_op_idx_SET; \ gex_Flags_t am_flags = flags & GEX_FLAG_IMMEDIATE; \ int imm = gex_AM_RequestMedium(tm, tgt_rank, gasneti_handleridx(gasnete_amratomic_reqh), \ &operand1, sizeof(type), GEX_EVENT_NOW, am_flags, \ (op_idx | (datatype << 8)), PACK(tgt_addr), PACK(rop)); \ if (imm) { \ gasneti_iop_markdone(rop->iop,1,0); \ gasnete_amratomic_op_free(rop); \ } \ return imm; \ } \ GASNETI_INLINE(prefix##_NBI_G0) \ int prefix##_NBI_G0( \ gasneti_AD_t ad, \ type *result_p, \ gex_Rank_t tgt_rank, void *tgt_addr, \ gex_Flags_t flags GASNETI_THREAD_FARG) \ { \ gasnete_amratomic_op_t rop = gasnete_amratomic_op_alloc();\ rop->result_p = result_p; \ rop->eop = NULL; \ rop->iop = gasneti_iop_register(1,1 GASNETI_THREAD_PASS); \ rop->iop_type = GEX_EC_GET; \ gex_TM_t tm = gasnete_ratomic_e_tm(ad, flags); \ const gasneti_op_idx_t op_idx = gasneti_op_idx_GET; \ gex_Flags_t am_flags = flags & GEX_FLAG_IMMEDIATE; \ int imm = gex_AM_RequestMedium(tm, tgt_rank, gasneti_handleridx(gasnete_amratomic_reqh), \ NULL, 0, GEX_EVENT_NOW, am_flags, \ (op_idx | (datatype << 8)), PACK(tgt_addr), PACK(rop)); \ if (imm) { \ gasneti_iop_markdone(rop->iop,1,1); \ gasnete_amratomic_op_free(rop); \ } \ return imm; \ } // GASNETE_DT_APPLY(GASNETE_AMRATOMIC_MID_NB) GASNETE_DT_APPLY(GASNETE_AMRATOMIC_MID_NBI) // // Ratomic functions (called by top-level dispatch functions) that then // call the functions defined by the GASNETE_AMRATOMIC_MID macro, above. // #define GASNETE_AMRATOMIC_DEFS(dtcode) \ _GASNETE_AMRATOMIC_DEFS1(dtcode, dtcode##_isint) // This extra pass expands the "isint" token prior to additional concatenation #define _GASNETE_AMRATOMIC_DEFS1(dtcode, isint) \ _GASNETE_AMRATOMIC_DEFS2(dtcode, isint) #define _GASNETE_AMRATOMIC_DEFS2(dtcode, isint) \ _GASNETE_AMRATOMIC_DEFN_INT##isint(dtcode,AND,1) \ _GASNETE_AMRATOMIC_DEFN_INT##isint(dtcode,OR,1) \ _GASNETE_AMRATOMIC_DEFN_INT##isint(dtcode,XOR,1) \ _GASNETE_AMRATOMIC_DEFN2(dtcode,ADD,1) \ _GASNETE_AMRATOMIC_DEFN2(dtcode,SUB,1) \ _GASNETE_AMRATOMIC_DEFN2(dtcode,MULT,1) \ _GASNETE_AMRATOMIC_DEFN2(dtcode,MIN,1) \ _GASNETE_AMRATOMIC_DEFN2(dtcode,MAX,1) \ _GASNETE_AMRATOMIC_DEFN2(dtcode,INC,0) \ _GASNETE_AMRATOMIC_DEFN2(dtcode,DEC,0) \ _GASNETE_AMRATOMIC_SETGET(dtcode) \ _GASNETE_AMRATOMIC_DEFN1(dtcode,SWAP,F1) \ _GASNETE_AMRATOMIC_DEFN1(dtcode,FCAS,F2) \ _GASNETE_AMRATOMIC_DEFN1(dtcode,CAS,N2) // #define _GASNETE_AMRATOMIC_DEFN_INT0(dtcode,opname,nargs) /*empty*/ #define _GASNETE_AMRATOMIC_DEFN_INT1 _GASNETE_AMRATOMIC_DEFN2 #define _GASNETE_AMRATOMIC_DEFN2(dtcode,opstem,nargs) \ _GASNETE_AMRATOMIC_DEFN1(dtcode,opstem,N##nargs) \ _GASNETE_AMRATOMIC_DEFN1(dtcode,F##opstem,F##nargs) #define _GASNETE_AMRATOMIC_DEFN1(dtcode,opname,args) \ _GASNETE_AMRATOMIC_DEFN1_NB(dtcode,opname,args) \ _GASNETE_AMRATOMIC_DEFN1_NBI(dtcode,opname,args) #define _GASNETE_AMRATOMIC_DEFN1_NB(dtcode,opname,args) \ static gex_Event_t gasnete_amratomic##dtcode##_NB_##opname(GASNETE_RATOMIC_ARGS_##args(dtcode##_type)) { \ return gasnete_amratomic##dtcode##_NB_##args(gasneti_op_idx_##opname,GASNETE_RATOMIC_PASS_##args); \ } #define _GASNETE_AMRATOMIC_DEFN1_NBI(dtcode,opname,args) \ static int gasnete_amratomic##dtcode##_NBI_##opname(GASNETE_RATOMIC_ARGS_##args(dtcode##_type)) { \ return gasnete_amratomic##dtcode##_NBI_##args(gasneti_op_idx_##opname,GASNETE_RATOMIC_PASS_##args); \ } #define _GASNETE_AMRATOMIC_SETGET(dtcode) \ _GASNETE_AMRATOMIC_SETGET1(dtcode, GASNETE_AMRATOMIC_USE_RMA##dtcode) // This extra pass expands the "use_rma" token prior to additional concatenation #define _GASNETE_AMRATOMIC_SETGET1(dtcode, use_rma) \ _GASNETE_AMRATOMIC_SETGET2(dtcode, use_rma) #define _GASNETE_AMRATOMIC_SETGET2(dtcode, use_rma) \ _GASNETE_AMRATOMIC_SETGET_RMA##use_rma(dtcode) #define _GASNETE_AMRATOMIC_SETGET_RMA0(dtcode) /* Use AM for SET and GET */ \ /* NB are same as other ops, but NBI are specialized for distinct gex_EC_t */ \ _GASNETE_AMRATOMIC_DEFN1_NB(dtcode,SET,N1) \ static int gasnete_amratomic##dtcode##_NBI_SET(GASNETE_RATOMIC_ARGS_N1(dtcode##_type)) { \ return gasnete_amratomic##dtcode##_NBI_S1(GASNETE_RATOMIC_PASS_N1); \ } \ _GASNETE_AMRATOMIC_DEFN1_NB(dtcode,GET,F0) \ static int gasnete_amratomic##dtcode##_NBI_GET(GASNETE_RATOMIC_ARGS_F0(dtcode##_type)) { \ return gasnete_amratomic##dtcode##_NBI_G0(GASNETE_RATOMIC_PASS_F0); \ } #define _GASNETE_AMRATOMIC_SETGET_RMA1(dtcode) /* Use RMA for SET and GET */ \ _GASNETE_AMRATOMIC_SETGET_RMA2(dtcode, dtcode##_type, dtcode##_bits) // This extra pass expands the "bits" token prior to additional concatenation #define _GASNETE_AMRATOMIC_SETGET_RMA2(dtcode, type, bits) \ _GASNETE_AMRATOMIC_SETGET_RMA3(dtcode, type, bits) #define _GASNETE_AMRATOMIC_SETGET_RMA3(dtcode, type, bits) \ static gex_Event_t gasnete_amratomic##dtcode##_NB_SET (GASNETE_RATOMIC_ARGS_N1(type)) { \ union { uint##bits##_t uint; type op1; } u; u.op1 = _operand1; \ gex_TM_t tm = gasnete_ratomic_e_tm(_real_ad, _flags); \ return gex_RMA_PutNBVal(tm, _tgt_rank, _tgt_addr, \ u.uint, sizeof(type), _flags); \ } \ static int gasnete_amratomic##dtcode##_NBI_SET (GASNETE_RATOMIC_ARGS_N1(type)) { \ union { uint##bits##_t uint; type op1; } u; u.op1 = _operand1; \ gex_TM_t tm = gasnete_ratomic_e_tm(_real_ad, _flags); \ return gex_RMA_PutNBIVal(tm, _tgt_rank, _tgt_addr, \ u.uint, sizeof(type), _flags); \ } \ static gex_Event_t gasnete_amratomic##dtcode##_NB_GET (GASNETE_RATOMIC_ARGS_F0(type)) { \ gex_TM_t tm = gasnete_ratomic_e_tm(_real_ad, _flags); \ return gex_RMA_GetNB(tm, _result_p, \ _tgt_rank, _tgt_addr, sizeof(type), _flags); \ } \ static int gasnete_amratomic##dtcode##_NBI_GET (GASNETE_RATOMIC_ARGS_F0(type)) { \ gex_TM_t tm = gasnete_ratomic_e_tm(_real_ad, _flags); \ return gex_RMA_GetNBI(tm, _result_p, \ _tgt_rank, _tgt_addr, sizeof(type), _flags); \ } // GASNETE_DT_APPLY(GASNETE_AMRATOMIC_DEFS) // // Build the dispatch tables // #define GASNETE_AMRATOMIC_TBL(dtcode) \ gasnete_ratomic##dtcode##_fn_tbl_t gasnete_amratomic##dtcode##_fn_tbl = \ GASNETE_RATOMIC_FN_TBL_INIT(gasnete_amratomic##dtcode,dtcode); GASNETE_DT_APPLY(GASNETE_AMRATOMIC_TBL) // // Create-hook to install the dispatch tables // void gasnete_amratomic_init_hook(gasneti_AD_t real_ad) { gex_DT_t dt = real_ad->_dt; gex_OP_t ops = real_ad->_ops; real_ad->_tools_safe = 1; #define GASNETE_AMRATOMIC_TBL_CASE(dtcode) \ case dtcode##_dtype: \ real_ad->_fn_tbl = (gasnete_ratomic_fn_tbl_t) &gasnete_amratomic##dtcode##_fn_tbl; \ break; switch (dt) { GASNETE_DT_APPLY(GASNETE_AMRATOMIC_TBL_CASE) default: gasneti_unreachable(); } #undef GASNETE_AMRATOMIC_TBL_CASE real_ad->_is_ref = 1; } #endif // GASNETE_BUILD_AMRATOMIC /*---------------------------------------------------------------------------------*/ #endif // _GEX_AD_T gasnet-2025.8.0/extended-ref/ratomic/gasnet_ratomic_internal.h0000664000175000017500000001103715142313673024500 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/ratomic/gasnet_ratomic_internal.h $ * Description: GASNet Remote Atomics Internal Header * Copyright 2017, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _GASNET_RATOMIC_INTERNAL_H #define _GASNET_RATOMIC_INTERNAL_H /*---------------------------------------------------------------------------------*/ // // Common logic for RAtomic implementatons // #define GASNETI_AD_MAGIC GASNETI_MAKE_MAGIC('A','D','_','t') #define GASNETI_AD_BAD_MAGIC GASNETI_MAKE_BAD_MAGIC('A','D','_','t') extern gasneti_AD_t gasneti_alloc_ad( gasneti_TM_t tm, gex_DT_t dt, gex_OP_t ops, gex_Flags_t flags); void gasneti_free_ad(gasneti_AD_t ad); // // Initalizer for gasnete_ratomic[dtcode]_fn_tbl_t // #define GASNETE_RATOMIC_FN_TBL_INIT(prefix,dtcode) \ _GASNETE_RATOMIC_FN_TBL_INIT1(prefix,dtcode##_isint) // This extra pass expands the "isint" token prior to additional concatenation #define _GASNETE_RATOMIC_FN_TBL_INIT1(prefix,isint) \ _GASNETE_RATOMIC_FN_TBL_INIT2(prefix,isint) #define _GASNETE_RATOMIC_FN_TBL_INIT2(prefix,isint) \ { _GASNETE_RATOMIC_FN_TBL_INIT_INT##isint(prefix##_NB), \ _GASNETE_RATOMIC_FN_TBL_INIT_INT##isint(prefix##_NBI) } #define _GASNETE_RATOMIC_FN_TBL_INIT_INT0(prefix) \ { NULL, NULL, NULL, \ &prefix##_ADD, &prefix##_SUB, &prefix##_MULT, \ &prefix##_MIN, &prefix##_MAX, \ &prefix##_INC, &prefix##_DEC, \ NULL, NULL, NULL, \ &prefix##_FADD, &prefix##_FSUB, &prefix##_FMULT, \ &prefix##_FMIN, &prefix##_FMAX, \ &prefix##_FINC, &prefix##_FDEC, \ &prefix##_SET, &prefix##_GET, \ &prefix##_SWAP, &prefix##_FCAS, &prefix##_CAS } #define _GASNETE_RATOMIC_FN_TBL_INIT_INT1(prefix) \ { &prefix##_AND, &prefix##_OR, &prefix##_XOR, \ &prefix##_ADD, &prefix##_SUB, &prefix##_MULT, \ &prefix##_MIN, &prefix##_MAX, \ &prefix##_INC, &prefix##_DEC, \ &prefix##_FAND, &prefix##_FOR, &prefix##_FXOR, \ &prefix##_FADD, &prefix##_FSUB, &prefix##_FMULT, \ &prefix##_FMIN, &prefix##_FMAX, \ &prefix##_FINC, &prefix##_FDEC, \ &prefix##_SET, &prefix##_GET, \ &prefix##_SWAP, &prefix##_FCAS, &prefix##_CAS } /*---------------------------------------------------------------------------------*/ // // AM-based implementation // #ifndef GASNETE_BUILD_AMRATOMIC #define GASNETE_BUILD_AMRATOMIC 1 #endif #if GASNETE_BUILD_AMRATOMIC // This is effectively the default GASNETC_AD_INIT_HOOK, which is invoked // implicitly for conduits lacking ratomics, and also explicitly from // GASNETC_AD_INIT_HOOK when a conduit decides to use AM fallback for a // given AD extern void gasnete_amratomic_init_hook(gasneti_AD_t real_ad); // Force use of default "no" if tools are not suited to mixing // with RMA Put and Get. // TODO-EX: SIGNALSAFE is not the precise property we are looking for, // though it is accurate for the current tools implementations. #if GASNETI_ATOMIC32_NOT_SIGNALSAFE #undef GASNETE_AMRATOMIC_USE_RMA_gex_dt_I32 #undef GASNETE_AMRATOMIC_USE_RMA_gex_dt_U32 #undef GASNETE_AMRATOMIC_USE_RMA_gex_dt_FLT #endif #if GASNETI_ATOMIC64_NOT_SIGNALSAFE #undef GASNETE_AMRATOMIC_USE_RMA_gex_dt_I64 #undef GASNETE_AMRATOMIC_USE_RMA_gex_dt_U64 #undef GASNETE_AMRATOMIC_USE_RMA_gex_dt_DBL #endif // Default (subject to conduit override) to SET and GET via AM. // Each token GASNETE_AMRATOMIC_USE_RMA##dtcode should be 0 or 1: // 0: Implement SET and GET atomics via AMs // 1: Implement SET and GET atomics via gex_RMA_{Put,Get}...() #ifndef GASNETE_AMRATOMIC_USE_RMA_gex_dt_I32 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_I32 0 #endif #ifndef GASNETE_AMRATOMIC_USE_RMA_gex_dt_U32 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_U32 0 #endif #ifndef GASNETE_AMRATOMIC_USE_RMA_gex_dt_I64 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_I64 0 #endif #ifndef GASNETE_AMRATOMIC_USE_RMA_gex_dt_U64 #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_U64 0 #endif #ifndef GASNETE_AMRATOMIC_USE_RMA_gex_dt_FLT #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_FLT 0 #endif #ifndef GASNETE_AMRATOMIC_USE_RMA_gex_dt_DBL #define GASNETE_AMRATOMIC_USE_RMA_gex_dt_DBL 0 #endif #endif #endif gasnet-2025.8.0/extended-ref/gasnet_extended_internal.h0000664000175000017500000000331715142313673023206 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/gasnet_extended_internal.h $ * Description: GASNet header for internal definitions in Extended API * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_EXTENDED_INTERNAL_H #define _GASNET_EXTENDED_INTERNAL_H #include // TODO-EX: assumes Extended always needs this /* ------------------------------------------------------------------------------------ */ /* called at startup to check configuration sanity if using any portion of AMRef */ extern void gasnete_check_config_amref(void); /* ------------------------------------------------------------------------------------ */ // Subsystem initialization extern void gasnete_barrier_init(void); extern void gasnete_coll_init_subsystem(void); /* ------------------------------------------------------------------------------------ */ #define _hidx_gasnete_amdbarrier_notify_reqh (GASNETE_HANDLER_BASE+0) #define _hidx_gasnete_amcbarrier_notify_reqh (GASNETE_HANDLER_BASE+1) #define _hidx_gasnete_amcbarrier_done_reqh (GASNETE_HANDLER_BASE+2) #define _hidx_gasnete_amref_get_reqh (GASNETE_HANDLER_BASE+3) #define _hidx_gasnete_amref_get_reph (GASNETE_HANDLER_BASE+4) #define _hidx_gasnete_amref_getlong_reqh (GASNETE_HANDLER_BASE+5) #define _hidx_gasnete_amref_getlong_reph (GASNETE_HANDLER_BASE+6) #define _hidx_gasnete_amref_put_reqh (GASNETE_HANDLER_BASE+7) #define _hidx_gasnete_amref_putlong_reqh (GASNETE_HANDLER_BASE+8) #define _hidx_gasnete_amref_markdone_reph (GASNETE_HANDLER_BASE+9) /* add new extended API handlers here and to the bottom of gasnet_extended.c */ #endif gasnet-2025.8.0/extended-ref/gasnet_extended.h0000664000175000017500000010243115142313673021307 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/gasnet_extended.h $ * Description: GASNet Extended API Header * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_EXTENDED_H #define _GASNET_EXTENDED_H #include #include /* TODO: add debug code to enforce restrictions on SEQ and PARSYNC config */ /* (only one thread calls, HSL's only locked by that thread - how to check without pthread_getspecific()?) */ /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* Initialize the Extended API: must be called by the core API at the end of gasnet_attach() before calls to extended API (this function may make calls to the core functions) */ extern void gasnete_init(void); /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (explicit event) ========================================================== */ #ifndef gasnete_put_nb extern gex_Event_t gasnete_put_nb( gex_TM_t _tm, gex_Rank_t _rank, void *_dest, /*const*/ void *_src, // TODO-EX: un-comment const size_t _nbytes, gex_Event_t *_lc_opt, gex_Flags_t _flags GASNETI_THREAD_FARG) GASNETI_WARN_UNUSED_RESULT; #endif #ifndef gasnete_get_nb extern gex_Event_t gasnete_get_nb( gex_TM_t _tm, void *_dest, gex_Rank_t _rank, void *_src, size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG) GASNETI_WARN_UNUSED_RESULT; #endif GASNETI_INLINE(_gex_RMA_GetNB) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gex_RMA_GetNB( gex_TM_t _tm, void *_dest, gex_Rank_t _rank, void *_src, size_t _nbytes, gex_Flags_t _flags, gex_Flags_t _constantp_never_nbrhd GASNETI_THREAD_FARG) { GASNETI_CHECK_LEGACY_GET(_tm,_flags); GASNETI_CHECK_NEVER_FLAGS(_tm,_rank,_flags); GASNETI_CHECKZEROSZ_GET(NB,_tm,_dest,_rank,_src,_nbytes); gasneti_boundscheck(_tm, _rank, _src, _nbytes); gasneti_boundscheck_local(_tm, _dest, _nbytes); void *_mapped_src = GASNETE_NEVER_MAPPED(_flags, _constantp_never_nbrhd) ? NULL : gasnete_mapped_at(_tm, _rank, _src); if (_mapped_src) { GASNETI_TRACE_GET_LOCAL(NB,_tm,_dest,_rank,_src,_nbytes); GASNETI_CHECK_INJECT(); GASNETI_MEMCPY(_dest, _mapped_src, _nbytes); gasnete_loopbackget_memsync(); return GEX_EVENT_INVALID; } else { GASNETI_TRACE_GET(NB,_tm,_dest,_rank,_src,_nbytes); GASNETI_CHECK_INJECT(); return gasnete_get_nb(_tm, _dest, _rank, _src, _nbytes, _flags GASNETI_THREAD_PASS); } } #define gex_RMA_GetNB(tm,dest,rank,src,nbytes,flags) \ _gex_RMA_GetNB(tm,dest,rank,src,nbytes,flags, \ GASNETE_CONSTANTP_NEVER_NBRHD(flags) \ GASNETI_THREAD_GET) GASNETI_INLINE(_gex_RMA_PutNB) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gex_RMA_PutNB( gex_TM_t _tm, gex_Rank_t _rank, void *_dest, /*const*/ void *_src, // TODO-EX: un-comment const size_t _nbytes, gex_Event_t *_lc_opt, gex_Flags_t _flags, gex_Flags_t _constantp_never_nbrhd GASNETI_THREAD_FARG) { GASNETI_CHECK_LEGACY_PUT(_tm,_flags); GASNETI_CHECK_NEVER_FLAGS(_tm,_rank,_flags); GASNETI_CHECK_PUT_LCOPT(_lc_opt, 0); GASNETI_CHECKZEROSZ_PUT(NB,_tm,_rank,_dest,_src,_nbytes); gasneti_boundscheck(_tm, _rank, _dest, _nbytes); gasneti_boundscheck_local(_tm, _src, _nbytes); void *_mapped_dest = GASNETE_NEVER_MAPPED(_flags, _constantp_never_nbrhd) ? NULL : gasnete_mapped_at(_tm, _rank, _dest); if (_mapped_dest) { GASNETI_TRACE_PUT_LOCAL(NB,_tm,_rank,_dest,_src,_nbytes); GASNETI_CHECK_INJECT(); GASNETI_MEMCPY(_mapped_dest, _src, _nbytes); gasnete_loopbackput_memsync(); gasneti_leaf_finish(_lc_opt); return GEX_EVENT_INVALID; } else { GASNETI_TRACE_PUT(NB,_tm,_rank,_dest,_src,_nbytes); GASNETI_CHECK_INJECT(); return gasnete_put_nb(_tm, _rank, _dest, _src, _nbytes, _lc_opt, _flags GASNETI_THREAD_PASS); } } #define gex_RMA_PutNB(tm,rank,dest,src,nbytes,lc_opt,flags) \ _gex_RMA_PutNB(tm,rank,dest,src,nbytes,lc_opt,flags, \ GASNETE_CONSTANTP_NEVER_NBRHD(flags) \ GASNETI_THREAD_GET) /* ------------------------------------------------------------------------------------ */ /* Synchronization for explicit-event non-blocking operations: =========================================================== */ #ifndef gasnete_test extern int gasnete_test(gex_Event_t _event GASNETI_THREAD_FARG); #endif #ifndef gasnete_test_some extern int gasnete_test_some(gex_Event_t *_pevent, size_t _numevents GASNETI_THREAD_FARG); #endif #ifndef gasnete_test_all extern int gasnete_test_all (gex_Event_t *_pevent, size_t _numevents GASNETI_THREAD_FARG); #endif GASNETI_INLINE(_gex_Event_Test) GASNETI_WARN_UNUSED_RESULT int _gex_Event_Test(gex_Event_t _event GASNETI_THREAD_FARG) { GASNETI_CHECK_INJECT(); int _result = GASNET_OK; if_pt (_event != GEX_EVENT_INVALID) _result = gasnete_test(_event GASNETI_THREAD_PASS); GASNETI_TRACE_TRYSYNC(TEST_SYNCNB,_result); return _result; } #define gex_Event_Test(pevent) \ _gex_Event_Test(pevent GASNETI_THREAD_GET) GASNETI_INLINE(_gex_Event_TestSome) int _gex_Event_TestSome(gex_Event_t *_pevent, size_t _numevents, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_CHECK_INJECT(); int _result = gasnete_test_some(_pevent,_numevents GASNETI_THREAD_PASS); GASNETI_TRACE_TRYSYNC(TEST_SYNCNB_SOME,_result); return _result; } #define gex_Event_TestSome(pevent, numevents, flags) \ _gex_Event_TestSome(pevent, numevents, flags GASNETI_THREAD_GET) GASNETI_INLINE(_gex_Event_TestAll) int _gex_Event_TestAll(gex_Event_t *_pevent, size_t _numevents, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_CHECK_INJECT(); int _result = gasnete_test_all(_pevent,_numevents GASNETI_THREAD_PASS); GASNETI_TRACE_TRYSYNC(TEST_SYNCNB_ALL,_result); return _result; } #define gex_Event_TestAll(pevent, numevents, flags) \ _gex_Event_TestAll(pevent, numevents, flags GASNETI_THREAD_GET) #ifndef gasnete_wait GASNETI_INLINE(gasnete_wait) void gasnete_wait(gex_Event_t _event GASNETI_THREAD_FARG) { if_pt (_event != GEX_EVENT_INVALID) { gasneti_AMPoll(); /* Ensure at least one poll - TODO: remove? */ gasneti_pollwhile(gasnete_test(_event GASNETI_THREAD_PASS) == GASNET_ERR_NOT_READY); } } #endif GASNETI_INLINE(_gex_Event_Wait) void _gex_Event_Wait(gex_Event_t _event GASNETI_THREAD_FARG) { GASNETI_CHECK_INJECT(); GASNETI_TRACE_WAITSYNC_BEGIN(); gasnete_wait(_event GASNETI_THREAD_PASS); GASNETI_TRACE_WAITSYNC_END(WAIT_SYNCNB); } #define gex_Event_Wait(event) \ _gex_Event_Wait(event GASNETI_THREAD_GET) #ifndef gasnete_wait_some // TODO-EX: a non-inline function could allow some optimizations GASNETI_INLINE(gasnete_wait_some) void gasnete_wait_some(gex_Event_t *_pevent, size_t _numevents GASNETI_THREAD_FARG) { gasneti_AMPoll(); /* Ensure at least one poll - TODO: remove? */ gasneti_pollwhile(gasnete_test_some(_pevent, _numevents GASNETI_THREAD_PASS) == GASNET_ERR_NOT_READY); } #endif GASNETI_INLINE(_gex_Event_WaitSome) void _gex_Event_WaitSome(gex_Event_t *_pevent, size_t _numevents, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_CHECK_INJECT(); GASNETI_TRACE_WAITSYNC_BEGIN(); gasnete_wait_some(_pevent, _numevents GASNETI_THREAD_PASS); GASNETI_TRACE_WAITSYNC_END(WAIT_SYNCNB_SOME); } #define gex_Event_WaitSome(pevent, numevents, flags) \ _gex_Event_WaitSome(pevent, numevents, flags GASNETI_THREAD_GET) #ifndef gasnete_wait_all // TODO-EX: a non-inline function could allow some optimizations GASNETI_INLINE(gasnete_wait_all) void gasnete_wait_all(gex_Event_t *_pevent, size_t _numevents GASNETI_THREAD_FARG) { GASNETI_CHECK_INJECT(); gasneti_AMPoll(); /* Ensure at least one poll - TODO: remove? */ gasneti_pollwhile(gasnete_test_all(_pevent, _numevents GASNETI_THREAD_PASS) == GASNET_ERR_NOT_READY); } #endif GASNETI_INLINE(_gex_Event_WaitAll) void _gex_Event_WaitAll(gex_Event_t *_pevent, size_t _numevents, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_CHECK_INJECT(); GASNETI_TRACE_WAITSYNC_BEGIN(); gasnete_wait_all(_pevent, _numevents GASNETI_THREAD_PASS); GASNETI_TRACE_WAITSYNC_END(WAIT_SYNCNB_ALL); } #define gex_Event_WaitAll(pevent, numevents, flags) \ _gex_Event_WaitAll(pevent, numevents, flags GASNETI_THREAD_GET) /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (implicit event) ========================================================== */ #ifndef gasnete_get_nbi extern int gasnete_get_nbi (gex_TM_t _tm, void *_dest, gex_Rank_t _rank, void *_src, size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG); #endif #ifndef gasnete_put_nbi extern int gasnete_put_nbi (gex_TM_t _tm, gex_Rank_t _rank, void *_dest, /*const*/ void *_src, // TODO-EX: un-comment const size_t _nbytes, gex_Event_t *_lc_opt, gex_Flags_t _flags GASNETI_THREAD_FARG); #endif GASNETI_INLINE(_gex_RMA_GetNBI) int _gex_RMA_GetNBI (gex_TM_t _tm, void *_dest, gex_Rank_t _rank, void *_src, size_t _nbytes, gex_Flags_t _flags, gex_Flags_t _constantp_never_nbrhd GASNETI_THREAD_FARG) { GASNETI_CHECK_LEGACY_GET(_tm,_flags); GASNETI_CHECK_NEVER_FLAGS(_tm,_rank,_flags); GASNETI_CHECKZEROSZ_GET(NBI,_tm,_dest,_rank,_src,_nbytes); gasneti_boundscheck(_tm, _rank, _src, _nbytes); gasneti_boundscheck_local(_tm, _dest, _nbytes); void *_mapped_src = GASNETE_NEVER_MAPPED(_flags, _constantp_never_nbrhd) ? NULL : gasnete_mapped_at(_tm, _rank, _src); if (_mapped_src) { GASNETI_TRACE_GET_LOCAL(NBI,_tm,_dest,_rank,_src,_nbytes); GASNETI_CHECK_INJECT(); GASNETI_MEMCPY(_dest, _mapped_src, _nbytes); gasnete_loopbackget_memsync(); return 0; } else { GASNETI_TRACE_GET(NBI,_tm,_dest,_rank,_src,_nbytes); GASNETI_CHECK_INJECT(); return gasnete_get_nbi(_tm, _dest, _rank, _src, _nbytes, _flags GASNETI_THREAD_PASS); } } #define gex_RMA_GetNBI(tm,dest,rank,src,nbytes,flags) \ _gex_RMA_GetNBI(tm,dest,rank,src,nbytes,flags, \ GASNETE_CONSTANTP_NEVER_NBRHD(flags) \ GASNETI_THREAD_GET) GASNETI_INLINE(_gex_RMA_PutNBI) int _gex_RMA_PutNBI (gex_TM_t _tm, gex_Rank_t _rank, void *_dest, /*const*/ void *_src, // TODO-EX: un-comment const size_t _nbytes, gex_Event_t *_lc_opt, gex_Flags_t _flags, gex_Flags_t _constantp_never_nbrhd GASNETI_THREAD_FARG) { GASNETI_CHECK_LEGACY_PUT(_tm,_flags); GASNETI_CHECK_NEVER_FLAGS(_tm,_rank,_flags); GASNETI_CHECK_PUT_LCOPT(_lc_opt, 1); GASNETI_CHECKZEROSZ_PUT(NBI,_tm,_rank,_dest,_src,_nbytes); gasneti_boundscheck(_tm, _rank, _dest, _nbytes); gasneti_boundscheck_local(_tm, _src, _nbytes); void *_mapped_dest = GASNETE_NEVER_MAPPED(_flags, _constantp_never_nbrhd) ? NULL : gasnete_mapped_at(_tm, _rank, _dest); if (_mapped_dest) { GASNETI_TRACE_PUT_LOCAL(NBI,_tm,_rank,_dest,_src,_nbytes); GASNETI_CHECK_INJECT(); GASNETI_MEMCPY(_mapped_dest, _src, _nbytes); gasnete_loopbackput_memsync(); return 0; } else { GASNETI_TRACE_PUT(NBI,_tm,_rank,_dest,_src,_nbytes); GASNETI_CHECK_INJECT(); return gasnete_put_nbi(_tm, _rank, _dest, _src, _nbytes, _lc_opt, _flags GASNETI_THREAD_PASS); } } #define gex_RMA_PutNBI(tm,rank,dest,src,nbytes,lc_opt,flags) \ _gex_RMA_PutNBI(tm,rank,dest,src,nbytes,lc_opt,flags, \ GASNETE_CONSTANTP_NEVER_NBRHD(flags) \ GASNETI_THREAD_GET) /* ------------------------------------------------------------------------------------ */ /* Synchronization for implicit-event non-blocking operations: =========================================================== */ // The internal event categories #define GASNETI_EC_PUT (1U << 0) #define GASNETI_EC_ALC (1U << 1) #define GASNETI_EC_GET (1U << 2) #define GASNETI_EC_RMW (1U << 3) typedef unsigned int gex_EC_t; #ifndef GEX_EC_PUT #define GEX_EC_PUT ((gex_EC_t)(GASNETI_EC_PUT|GASNETI_EC_ALC)) #endif #ifndef GEX_EC_GET #define GEX_EC_GET ((gex_EC_t)GASNETI_EC_GET) #endif #ifndef GEX_EC_AM #define GEX_EC_AM ((gex_EC_t)GASNETI_EC_ALC) #endif #ifndef GEX_EC_LC #define GEX_EC_LC ((gex_EC_t)GASNETI_EC_ALC) #endif #ifndef GEX_EC_RMW #define GEX_EC_RMW ((gex_EC_t)GASNETI_EC_RMW) #endif #ifndef GEX_EC_ALL #define GEX_EC_ALL (~(gex_EC_t)0) #endif #ifndef gasnete_test_syncnbi_mask extern int gasnete_test_syncnbi_mask(gex_EC_t _mask, gex_Flags_t _flags GASNETI_THREAD_FARG); #endif GASNETI_INLINE(_gex_NBI_Test) GASNETI_WARN_UNUSED_RESULT int _gex_NBI_Test(gex_EC_t _mask, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_CHECK_INJECT(); int _retval = gasnete_test_syncnbi_mask(_mask, _flags GASNETI_THREAD_PASS); GASNETI_TRACE_TRYSYNC(TEST_SYNCNBI,_retval); return _retval; } #define gex_NBI_Test(mask, flags) \ _gex_NBI_Test(mask, flags GASNETI_THREAD_GET) #ifndef gasnete_wait_syncnbi_mask #define gasnete_wait_syncnbi_mask(mask, flagsTI) \ gasneti_pollwhile(gasnete_test_syncnbi_mask(mask, flagsTI) == GASNET_ERR_NOT_READY) #endif #define gex_NBI_Wait(mask, flags) do { \ GASNETI_CHECK_INJECT(); \ GASNETI_TRACE_WAITSYNC_BEGIN(); \ gasneti_AMPoll(); /* ensure at least one poll */ \ gasnete_wait_syncnbi_mask(mask, flags GASNETI_THREAD_GET); \ GASNETI_TRACE_WAITSYNC_END(WAIT_SYNCNBI); \ } while (0) /* ------------------------------------------------------------------------------------ */ /* Implicit access region synchronization ====================================== */ #ifndef gasnete_begin_nbi_accessregion extern void gasnete_begin_nbi_accessregion(gex_Flags_t _flags, int _allowrecursion GASNETI_THREAD_FARG); #endif #ifndef gasnete_end_nbi_accessregion extern gex_Event_t gasnete_end_nbi_accessregion(gex_Flags_t _flags GASNETI_THREAD_FARG) GASNETI_WARN_UNUSED_RESULT; #endif #define gex_NBI_BeginAccessRegion(flags) gasnete_begin_nbi_accessregion(flags,0 GASNETI_THREAD_GET) #define gex_NBI_EndAccessRegion(flags) gasnete_end_nbi_accessregion(flags GASNETI_THREAD_GET) /* ------------------------------------------------------------------------------------ */ /* Query to get leaf event from its root ===================================== */ #ifndef gasnete_Event_QueryLeaf extern gex_Event_t gasnete_Event_QueryLeaf(gex_Event_t _root, gex_EC_t _event_id); #endif #define gex_Event_QueryLeaf(root, event_id) gasnete_Event_QueryLeaf(root, event_id) /* ------------------------------------------------------------------------------------ */ /* Blocking memory-to-memory transfers =================================== */ #if GASNETI_DIRECT_BLOCKING_GET extern int gasnete_get (gex_TM_t _tm, void *_dest, gex_Rank_t _rank, void *_src, size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG); #elif !defined(gasnete_get) GASNETI_INLINE(gasnete_get) int gasnete_get (gex_TM_t _tm, void *_dest, gex_Rank_t _rank, void *_src, size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG) { gex_Event_t h = gasnete_get_nb(_tm, _dest, _rank, _src, _nbytes, _flags GASNETI_THREAD_PASS); if (h == GEX_EVENT_NO_OP) return 1; else gasnete_wait(h GASNETI_THREAD_PASS); return 0; } #endif #if GASNETI_DIRECT_BLOCKING_PUT extern int gasnete_put (gex_TM_t _tm, gex_Rank_t _rank, void* _dest, /*const*/ void *_src, // TODO-EX: uncomment const size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG); #elif !defined(gasnete_put) GASNETI_INLINE(gasnete_put) int gasnete_put (gex_TM_t _tm, gex_Rank_t _rank, void* _dest, /*const*/ void *_src, // TODO-EX: uncomment const size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG) { gex_Event_t h = gasnete_put_nb(_tm, _rank, _dest, _src, _nbytes, GEX_EVENT_DEFER, _flags GASNETI_THREAD_PASS); if (h == GEX_EVENT_NO_OP) return 1; else gasnete_wait(h GASNETI_THREAD_PASS); return 0; } #endif GASNETI_INLINE(_gex_RMA_GetBlocking) int _gex_RMA_GetBlocking (gex_TM_t _tm, void *_dest, gex_Rank_t _rank, void *_src, size_t _nbytes, gex_Flags_t _flags, gex_Flags_t _constantp_never_nbrhd GASNETI_THREAD_FARG) { GASNETI_CHECK_LEGACY_GET(_tm,_flags); GASNETI_CHECK_NEVER_FLAGS(_tm,_rank,_flags); GASNETI_CHECKZEROSZ_NAMED(GASNETI_TRACE_GET_NAMED(GET_LOCAL,LOCAL,_tm,_dest,_rank,_src,_nbytes),_nbytes); gasneti_boundscheck(_tm, _rank, _src, _nbytes); gasneti_boundscheck_local(_tm, _dest, _nbytes); void *_mapped_src = GASNETE_NEVER_MAPPED(_flags, _constantp_never_nbrhd) ? NULL : gasnete_mapped_at(_tm, _rank, _src); if (_mapped_src) { GASNETI_TRACE_GET_NAMED(GET_LOCAL,LOCAL,_tm,_dest,_rank,_src,_nbytes); GASNETI_CHECK_INJECT(); GASNETI_MEMCPY(_dest, _mapped_src, _nbytes); gasnete_loopbackget_memsync(); return 0; } else { GASNETI_TRACE_GET_NAMED(GET,NONLOCAL,_tm,_dest,_rank,_src,_nbytes); GASNETI_CHECK_INJECT(); return gasnete_get(_tm, _dest, _rank, _src, _nbytes, _flags GASNETI_THREAD_PASS); } } #define gex_RMA_GetBlocking(tm,dest,rank,src,nbytes,flags) \ _gex_RMA_GetBlocking(tm,dest,rank,src,nbytes,flags, \ GASNETE_CONSTANTP_NEVER_NBRHD(flags) \ GASNETI_THREAD_GET) GASNETI_INLINE(_gex_RMA_PutBlocking) int _gex_RMA_PutBlocking (gex_TM_t _tm, gex_Rank_t _rank, void *_dest, /*const*/ void *_src, // TODO-EX: un-comment const size_t _nbytes, gex_Flags_t _flags, gex_Flags_t _constantp_never_nbrhd GASNETI_THREAD_FARG) { GASNETI_CHECK_LEGACY_PUT(_tm,_flags); GASNETI_CHECK_NEVER_FLAGS(_tm,_rank,_flags); GASNETI_CHECKZEROSZ_NAMED(GASNETI_TRACE_PUT_NAMED(PUT_LOCAL,LOCAL,_tm,_rank,_dest,_src,_nbytes),_nbytes); gasneti_boundscheck(_tm, _rank, _dest, _nbytes); gasneti_boundscheck_local(_tm, _src, _nbytes); void *_mapped_dest = GASNETE_NEVER_MAPPED(_flags, _constantp_never_nbrhd) ? NULL : gasnete_mapped_at(_tm, _rank, _dest); if (_mapped_dest) { GASNETI_TRACE_PUT_NAMED(PUT_LOCAL,LOCAL,_tm,_rank,_dest,_src,_nbytes); GASNETI_CHECK_INJECT(); GASNETI_MEMCPY(_mapped_dest, _src, _nbytes); gasnete_loopbackput_memsync(); return 0; } else { GASNETI_TRACE_PUT_NAMED(PUT,NONLOCAL,_tm,_rank,_dest,_src,_nbytes); GASNETI_CHECK_INJECT(); return gasnete_put(_tm, _rank, _dest, _src, _nbytes, _flags GASNETI_THREAD_PASS); } } #define gex_RMA_PutBlocking(tm,rank,dest,src,nbytes,flags) \ _gex_RMA_PutBlocking(tm,rank,dest,src,nbytes,flags, \ GASNETE_CONSTANTP_NEVER_NBRHD(flags) \ GASNETI_THREAD_GET) /* ------------------------------------------------------------------------------------ */ /* Value Put ========= */ #if GASNETI_DIRECT_PUT_VAL extern int gasnete_put_val( gex_TM_t _tm, gex_Rank_t _rank, void *_dest, gex_RMA_Value_t _value, size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG); #elif !defined(gasnete_put_val) GASNETI_INLINE(gasnete_put_val) int gasnete_put_val( gex_TM_t _tm, gex_Rank_t _rank, void *_dest, gex_RMA_Value_t _value, size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG) { gasneti_assume(_nbytes > 0); gasneti_assume(_nbytes <= sizeof(gex_RMA_Value_t)); gex_RMA_Value_t _src = _value; return gasnete_put(_tm, _rank, _dest, GASNETE_STARTOFBITS(&_src,_nbytes), _nbytes, _flags GASNETI_THREAD_PASS); } #endif GASNETI_INLINE(_gex_RMA_PutVal) int _gex_RMA_PutVal( gex_TM_t _tm, gex_Rank_t _rank, void *_dest, gex_RMA_Value_t _value, size_t _nbytes, gex_Flags_t _flags, gex_Flags_t _constantp_never_nbrhd GASNETI_THREAD_FARG) { GASNETI_CHECK_LEGACY_PUT(_tm,_flags); GASNETI_CHECK_NEVER_FLAGS(_tm,_rank,_flags); gasneti_assume(_nbytes > 0); gasneti_assert_uint(_nbytes ,<=, sizeof(gex_RMA_Value_t)); gasneti_assume(_nbytes <= sizeof(gex_RMA_Value_t)); gasneti_boundscheck(_tm, _rank, _dest, _nbytes); void *_mapped_dest = GASNETE_NEVER_MAPPED(_flags, _constantp_never_nbrhd) ? NULL : gasnete_mapped_at(_tm, _rank, _dest); if (_mapped_dest) { GASNETI_TRACE_PUT_LOCAL(VAL,_tm,_rank,_dest,&_value,_nbytes); GASNETI_CHECK_INJECT(); GASNETE_VALUE_ASSIGN(_mapped_dest, _value, _nbytes); gasnete_loopbackput_memsync(); return 0; } else { GASNETI_TRACE_PUT(VAL,_tm,_rank,_dest,GASNETE_STARTOFBITS(&_value,_nbytes),_nbytes); GASNETI_CHECK_INJECT(); return gasnete_put_val(_tm, _rank, _dest, _value, _nbytes, _flags GASNETI_THREAD_PASS); } } #define gex_RMA_PutBlockingVal(tm,rank,dest,value,nbytes,flags) \ _gex_RMA_PutVal(tm,rank,dest,value,nbytes,flags, \ GASNETE_CONSTANTP_NEVER_NBRHD(flags) \ GASNETI_THREAD_GET) #if GASNETI_DIRECT_PUT_NB_VAL && !defined(gasnete_put_nb_val) extern gex_Event_t gasnete_put_nb_val( gex_TM_t _tm, gex_Rank_t _rank, void *_dest, gex_RMA_Value_t _value, size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG) GASNETI_WARN_UNUSED_RESULT; #endif GASNETI_INLINE(_gex_RMA_PutNBVal) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gex_RMA_PutNBVal ( gex_TM_t _tm, gex_Rank_t _rank, void *_dest, gex_RMA_Value_t _value, size_t _nbytes, gex_Flags_t _flags, gex_Flags_t _constantp_never_nbrhd GASNETI_THREAD_FARG) { GASNETI_CHECK_LEGACY_PUT(_tm,_flags); GASNETI_CHECK_NEVER_FLAGS(_tm,_rank,_flags); gasneti_assume(_nbytes > 0); gasneti_assert_uint(_nbytes ,<=, sizeof(gex_RMA_Value_t)); gasneti_assume(_nbytes <= sizeof(gex_RMA_Value_t)); gasneti_boundscheck(_tm, _rank, _dest, _nbytes); void *_mapped_dest = GASNETE_NEVER_MAPPED(_flags, _constantp_never_nbrhd) ? NULL : gasnete_mapped_at(_tm, _rank, _dest); if (_mapped_dest) { GASNETI_TRACE_PUT_LOCAL(NB_VAL,_tm,_rank,_dest,&_value,_nbytes); GASNETI_CHECK_INJECT(); GASNETE_VALUE_ASSIGN(_mapped_dest, _value, _nbytes); gasnete_loopbackput_memsync(); return GEX_EVENT_INVALID; } else { GASNETI_TRACE_PUT(NB_VAL,_tm,_rank,_dest,GASNETE_STARTOFBITS(&_value,_nbytes),_nbytes); GASNETI_CHECK_INJECT(); #if GASNETI_DIRECT_PUT_NB_VAL || defined(gasnete_put_nb_val) return gasnete_put_nb_val(_tm, _rank, _dest, _value, _nbytes, _flags GASNETI_THREAD_PASS); #else { gex_RMA_Value_t _src = _value; return gasnete_put_nb(_tm, _rank, _dest, GASNETE_STARTOFBITS(&_src,_nbytes), _nbytes, GEX_EVENT_NOW, _flags GASNETI_THREAD_PASS); } #endif } } #define gex_RMA_PutNBVal(tm,rank,dest,value,nbytes,flags) \ _gex_RMA_PutNBVal(tm,rank,dest,value,nbytes,flags, \ GASNETE_CONSTANTP_NEVER_NBRHD(flags) \ GASNETI_THREAD_GET) #if GASNETI_DIRECT_PUT_NBI_VAL extern int gasnete_put_nbi_val( gex_TM_t _tm, gex_Rank_t _rank, void *_dest, gex_RMA_Value_t _value, size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG); #elif !defined(gasnete_put_nbi_val) GASNETI_INLINE(gasnete_put_nbi_val) int gasnete_put_nbi_val( gex_TM_t _tm, gex_Rank_t _rank, void *_dest, gex_RMA_Value_t _value, size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG) { gasneti_assume(_nbytes > 0); gasneti_assume(_nbytes <= sizeof(gex_RMA_Value_t)); gex_RMA_Value_t _src = _value; return gasnete_put_nbi(_tm, _rank, _dest, GASNETE_STARTOFBITS(&_src,_nbytes), _nbytes, GEX_EVENT_NOW, _flags GASNETI_THREAD_PASS); } #endif GASNETI_INLINE(_gex_RMA_PutNBIVal) int _gex_RMA_PutNBIVal( gex_TM_t _tm, gex_Rank_t _rank, void *_dest, gex_RMA_Value_t _value, size_t _nbytes, gex_Flags_t _flags, gex_Flags_t _constantp_never_nbrhd GASNETI_THREAD_FARG) { GASNETI_CHECK_LEGACY_PUT(_tm,_flags); GASNETI_CHECK_NEVER_FLAGS(_tm,_rank,_flags); gasneti_assume(_nbytes > 0); gasneti_assert_uint(_nbytes ,<=, sizeof(gex_RMA_Value_t)); gasneti_assume(_nbytes <= sizeof(gex_RMA_Value_t)); gasneti_boundscheck(_tm, _rank, _dest, _nbytes); void *_mapped_dest = GASNETE_NEVER_MAPPED(_flags, _constantp_never_nbrhd) ? NULL : gasnete_mapped_at(_tm, _rank, _dest); if (_mapped_dest) { GASNETI_TRACE_PUT_LOCAL(NBI_VAL,_tm,_rank,_dest,&_value,_nbytes); GASNETI_CHECK_INJECT(); GASNETE_VALUE_ASSIGN(_mapped_dest, _value, _nbytes); gasnete_loopbackput_memsync(); return 0; } else { GASNETI_TRACE_PUT(NBI_VAL,_tm,_rank,_dest,GASNETE_STARTOFBITS(&_value,_nbytes),_nbytes); GASNETI_CHECK_INJECT(); return gasnete_put_nbi_val(_tm, _rank, _dest, _value, _nbytes, _flags GASNETI_THREAD_PASS); } } #define gex_RMA_PutNBIVal(tm,rank,dest,value,nbytes,flags) \ _gex_RMA_PutNBIVal(tm,rank,dest,value,nbytes,flags, \ GASNETE_CONSTANTP_NEVER_NBRHD(flags) \ GASNETI_THREAD_GET) /* ------------------------------------------------------------------------------------ */ /* Blocking Value Get ================== */ #if PLATFORM_COMPILER_SUN_C #pragma error_messages(off, E_END_OF_LOOP_CODE_NOT_REACHED) #endif #if !defined(gasnete_get_val) && GASNETI_DIRECT_GET_VAL extern gex_RMA_Value_t gasnete_get_val ( gex_TM_t _tm, gex_Rank_t _rank, void *_src, size_t _nbytes, gex_Flags_t _flags GASNETI_THREAD_FARG); #endif GASNETI_INLINE(_gex_RMA_GetBlockingVal) GASNETI_WARN_UNUSED_RESULT gex_RMA_Value_t _gex_RMA_GetBlockingVal ( gex_TM_t _tm, gex_Rank_t _rank, void *_src, size_t _nbytes, gex_Flags_t _flags, gex_Flags_t _constantp_never_nbrhd GASNETI_THREAD_FARG) { GASNETI_CHECK_LEGACY_GET(_tm,_flags); GASNETI_CHECK_NEVER_FLAGS(_tm,_rank,_flags); gasneti_boundscheck(_tm, _rank, _src, _nbytes); void *_mapped_src = GASNETE_NEVER_MAPPED(_flags, _constantp_never_nbrhd) ? NULL : gasnete_mapped_at(_tm, _rank, _src); if (_mapped_src) { GASNETI_TRACE_GET_LOCAL(VAL,_tm,NULL,_rank,_src,_nbytes); GASNETI_CHECK_INJECT(); GASNETE_VALUE_RETURN(_mapped_src, _nbytes); } else { GASNETI_TRACE_GET(VAL,_tm,NULL,_rank,_src,_nbytes); GASNETI_CHECK_INJECT(); #if GASNETI_DIRECT_GET_VAL || defined(gasnete_get_val) return gasnete_get_val(_tm, _rank, _src, _nbytes, _flags GASNETI_THREAD_PASS); #else { gex_RMA_Value_t _val = 0; gasnete_get(_tm, GASNETE_STARTOFBITS(&_val,_nbytes), _rank, _src, _nbytes, _flags GASNETI_THREAD_PASS); return _val; } #endif } } #define gex_RMA_GetBlockingVal(tm,rank,src,nbytes,flags) \ _gex_RMA_GetBlockingVal(tm,rank,src,nbytes,flags, \ GASNETE_CONSTANTP_NEVER_NBRHD(flags) \ GASNETI_THREAD_GET) #if PLATFORM_COMPILER_SUN_C #pragma error_messages(default, E_END_OF_LOOP_CODE_NOT_REACHED) #endif /* ------------------------------------------------------------------------------------ */ /* Barriers: ========= */ #if GASNETI_STATS_OR_TRACE extern gasneti_tick_t gasnete_barrier_notifytime; #endif extern void gasnet_barrier_notify(int _id, int _flags); extern int gasnet_barrier_wait(int _id, int _flags); extern int gasnet_barrier_try(int _id, int _flags); extern int gasnet_barrier(int _id, int _flags); extern int gasnet_barrier_result(int *_id); #ifndef gasnete_tm_barrier extern void gasnete_tm_barrier(gex_TM_t e_tm, gex_Flags_t flags GASNETI_THREAD_FARG); #endif GASNETI_INLINE(_gex_Coll_BarrierBlocking) void _gex_Coll_BarrierBlocking(gex_TM_t _tm, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_TM_BARRIER(COLL_BARRIER,_tm,_flags); GASNETI_CHECK_INJECT(); gasnete_tm_barrier(_tm, _flags GASNETI_THREAD_PASS); } #define gex_Coll_BarrierBlocking(tm,flags) \ _gex_Coll_BarrierBlocking(tm,flags GASNETI_THREAD_GET) #ifndef gasnete_tm_barrier_nb extern gex_Event_t gasnete_tm_barrier_nb(gex_TM_t e_tm, gex_Flags_t flags GASNETI_THREAD_FARG); #endif GASNETI_INLINE(_gex_Coll_BarrierNB) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gex_Coll_BarrierNB(gex_TM_t _tm, gex_Flags_t _flags GASNETI_THREAD_FARG) { GASNETI_TRACE_TM_BARRIER(COLL_BARRIER_NB,_tm,_flags); GASNETI_CHECK_INJECT(); return gasnete_tm_barrier_nb(_tm, _flags GASNETI_THREAD_PASS); } #define gex_Coll_BarrierNB(tm,flags) \ _gex_Coll_BarrierNB(tm,flags GASNETI_THREAD_GET) /* ------------------------------------------------------------------------------------ */ /* Teams: ====== */ extern int gasneti_TM_Destroy( gex_TM_t _tm, gex_Memvec_t *_scratch_p, gex_Flags_t _flags GASNETI_THREAD_FARG); #define gex_TM_Destroy(tm,sp,fl) gasneti_TM_Destroy(tm,sp,fl GASNETI_THREAD_GET) extern size_t gasneti_TM_Split(gex_TM_t *_new_tm_p, gex_TM_t _parent_tm, int _color, int _key, void *_addr, size_t _len, gex_Flags_t _flags GASNETI_THREAD_FARG); #define gex_TM_Split(n,p,c,k,a,l,f) gasneti_TM_Split(n,p,c,k,a,l,f GASNETI_THREAD_GET) extern size_t gasneti_TM_Create( gex_TM_t *_new_tms, size_t _num_new_tms, gex_TM_t _parent_tm, gex_EP_Location_t *_args, size_t _numargs, gex_Addr_t *_scratch_addrs, size_t _scratch_size, gex_Flags_t _flags GASNETI_THREAD_FARG); #define gex_TM_Create(nt,nnt,p,a,n,sa,ss,f) gasneti_TM_Create(nt,nnt,p,a,n,sa,ss,f GASNETI_THREAD_GET) // extern gex_Rank_t gex_TM_TranslateRankToJobrank(gex_TM_t tm, gex_Rank_t rank); #define gex_TM_TranslateRankToJobrank(tm,rank) \ (GASNETI_CHECK_INJECT(), gasneti_e_tm_rank_to_jobrank(tm,rank)) // extern gex_Rank_t gex_TM_TranslateJobrankToRank(gex_TM_t tm, gex_Rank_t jobrank); #define gex_TM_TranslateJobrankToRank(tm,jobrank) \ (GASNETI_CHECK_INJECT(), gasneti_e_tm_jobrank_to_rank(tm,jobrank)) // extern gex_EP_Location_t gex_TM_TranslateRankToEP(gex_TM_t tm, gex_Rank_t rank, gex_Flags_t flags); #define gex_TM_TranslateRankToEP(tm,rank,flags) \ (GASNETI_CHECK_INJECT(), gasneti_e_tm_rank_to_location(tm,rank,flags)) /* ------------------------------------------------------------------------------------ */ // TODO-EX: remove these checks for conduits using legacy internal APIs #if GASNETI_DIRECT_GET #error "out-of-date #define of GASNETI_DIRECT_GET" #endif #if GASNETI_DIRECT_GET_BULK #error "out-of-date #define of GASNETI_DIRECT_GET_BULK" #elif defined(gasnete_get_bulk) #error "out-of-date #define of gasnete_get_bulk" #endif #if GASNETI_DIRECT_PUT #error "out-of-date #define of GASNETI_DIRECT_PUT" #endif #if GASNETI_DIRECT_PUT_BULK #error "out-of-date #define of GASNETI_DIRECT_PUT_BULK" #elif defined(gasnete_put_bulk) #error "out-of-date #define of gasnete_put_bulk" #endif #if GASNETI_DIRECT_GET_NBI #error "out-of-date #define of GASNETI_DIRECT_GET_NBI" #endif #if GASNETI_DIRECT_GET_NB #error "out-of-date #define of GASNETI_DIRECT_GET_NB" #endif #if GASNETI_DIRECT_MEMSET #error "out-of-date #define of GASNETI_DIRECT_MEMSET" #endif #endif gasnet-2025.8.0/extended-ref/gasnet_extended_amref.c0000664000175000017500000006034715142313673022465 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/gasnet_extended_amref.c $ * Description: GASNet Extended API Reference Implementation: AM-based Get/Put * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ /* * Guidance for conduit writers. * (See also "Tuning Parameters", below). * * Conduits are NOT expected to clone this file. * Instead they may #include it or not at their discretion. * A conduit may select which portions of the code are built using * either fine-grained or coarse-grained controls. * * The coarse-grained controls primarily just define the fine-grained ones: * * #define GASNETE_USING_REF_EXTENDED_GET 1 * Is equivalent to * #define GASNETE_BUILD_AMREF_GET_HANDLERS 1 * #define GASNETE_BUILD_AMREF_GET 1 * * #define GASNETE_USING_REF_EXTENDED_PUT 1 * Is equivalent to * #define GASNETE_BUILD_AMREF_PUT_HANDLERS 1 * #define GASNETE_BUILD_AMREF_PUT 1 * * Additionally, GASNETE_USING_REF_EXTENDED_{PUT,GET} is a performance * advisory to subsystems including collectives and VIS that RMA is AM-based * and not using native RDMA. * * The fine-grained controls: * * #define GASNETE_BUILD_AMREF_GET 1 * To build * gasnete_amref_get_nb * gasnete_amref_get_nbi * * #define GASNETE_BUILD_AMREF_PUT 1 * To build * gasnete_amref_put_nb * gasnete_amref_put_nbi * * #define GASNETE_BUILD_AMREF_GET_HANDLERS 1 * To build the corresponding supporting AM handlers * * #define GASNETE_BUILD_AMREF_PUT_HANDLERS 1 * To build the corresponding supporting AM handlers * * If one does not define ANY of those, then this file contains no code. * * A conduit can use these directly by using one or more of the following * in its gasnet_extended_fwd.h name-shift the functions listed above: * #define gasnete_amref_get_nb gasnete_get_nb * #define gasnete_amref_get_nbi gasnete_get_nbi * #define gasnete_amref_put_nb gasnete_put_nb * #define gasnete_amref_put_nbi gasnete_put_nbi * * When not using those defines a conduit can call the functions in this * file from its own gasnete_{get,put}_{nb,nbi}() as needed (for instance * for dealing with out-of-segment arguments which cannot be dealt with * using native RDMA mechanisms). * * NOTE: If tempted to clone this file into your conduit in order to get * finer-grained control over what is build, then instead *please* email * gasnet-devel@lbl.gov to request even finer-grained GASNETE_BUILD_AMREF_*. */ /* ------------------------------------------------------------------------------------ */ /* Implement the coarse-grained build controls: */ #if GASNETE_USING_REF_EXTENDED_GET #define GASNETE_BUILD_AMREF_GET_HANDLERS 1 #define GASNETE_BUILD_AMREF_GET 1 #endif #if GASNETE_USING_REF_EXTENDED_PUT #define GASNETE_BUILD_AMREF_PUT_HANDLERS 1 #define GASNETE_BUILD_AMREF_PUT 1 #endif // TODO-EX: remove these legacy checks #ifdef GASNETE_USING_REF_EXTENDED_GET_BULK #error "out-of-date #define of GASNETE_USING_REF_EXTENDED_GET_BULK" #endif #ifdef GASNETE_BUILD_AMREF_GET_BULK #error "out-of-date #define of GASNETE_BUILD_AMREF_GET_BULK" #endif #ifdef GASNETE_USING_REF_EXTENDED_PUT_BULK #error "out-of-date #define of GASNETE_USING_REF_EXTENDED_PUT_BULK" #endif #ifdef GASNETE_BUILD_AMREF_PUT_BULK #error "out-of-date #define of GASNETE_BUILD_AMREF_PUT_BULK" #endif #ifdef GASNETE_USING_REF_EXTENDED_MEMSET #error "out-of-date #define of GASNETE_USING_REF_EXTENDED_MEMSET" #endif #ifdef GASNETE_BUILD_AMREF_MEMSET_HANDLERS #error "out-of-date #define of GASNETE_BUILD_AMREF_MEMSET_HANDLERS" #endif #ifdef GASNETE_BUILD_AMREF_MEMSET #error "out-of-date #define of GASNETE_BUILD_AMREF_MEMSET" #endif /* ------------------------------------------------------------------------------------ */ /* * Design/Approach for gets/puts in Extended Reference API in terms of Core * ======================================================================== * * The extended API implements gasnet_put and gasnet_put_nbi differently, * all in terms of 'nbytes', the number of bytes to be transferred as * payload. * * The core usually implements AMSmall and AMMedium as host-side copies and * AMLongs are implemented according to the implementation. Some conduits * may optimize AMLongRequest/AMLongRequestAsync/AMLongReply with DMA * operations. * * TODO-EX: update w.r.t. loss of _bulk * gasnet_put(_bulk) is translated to a gasnete_put_nb(_bulk) + sync * gasnet_get(_bulk) is translated to a gasnete_get_nb(_bulk) + sync * * gasnete_put_nb(_bulk) translates to * if nbytes <= GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD * AMMedium(payload) * #if GASNETE_USE_LONG_PUTS * else if nbytes < AMMaxLongRequest * AMLongRequest(payload) * #endif * else * gasnete_put_nbi(_bulk)(payload) * * gasnete_get_nb(_bulk) translates to * if nbytes <= GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD * AMSmall request + AMMedium(payload) reply * else * gasnete_get_nbi(_bulk)() * * gasnete_put_nbi(_bulk) translates to * if nbytes <= GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD * AMMedium(payload) * #if GASNETE_USE_LONG_PUTS * else if nbytes < AMMaxLongRequest * AMLongRequest(payload) * else * chunks of AMMaxLongRequest with AMLongRequest() * AMLongRequestAsync is used instead of AMLongRequest for put_bulk * #else * else * chunks of AMMaxMedium with AMMediumRequest() * #endif * * gasnete_get_nbi(_bulk) translates to * if nbytes <= GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD * AMSmall request + AMMedium(payload) reply * else * chunks of AMMaxMedium with AMSmall request + AMMedium() reply * * The current implementation uses AMLongs for large puts because the * destination is guaranteed to fall within the registered GASNet segment. * This can be disabled by setting GASNETE_USE_LONG_PUTS to zero. * * The spec allows gets to be received anywhere into the virtual memory space, * so we can only use AMLong when the destination happens to fall within the * segment - GASNETE_USE_LONG_GETS indicates whether or not we should try to do this. * (conduits which can support AMLongs to areas outside the segment * could improve on this through the use of this conduit-specific information). * */ /* ------------------------------------------------------------------------------------ */ /* Tuning Parameters ================= Conduits may choose to override the default tuning parameters below by defining them in their gasnet_core_fwd.h. See the Design description above for how to use these. */ /* the size threshold where gets/puts stop using medium messages and start using longs */ #ifndef GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD #define GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD gex_AM_LUBRequestMedium() #endif /* true if we should try to use Long replies in gets (only possible if dest falls in segment) */ #ifndef GASNETE_USE_LONG_GETS #define GASNETE_USE_LONG_GETS 1 #endif /* true if we should try to use Long requests in puts */ #ifndef GASNETE_USE_LONG_PUTS #define GASNETE_USE_LONG_PUTS 1 #endif /* ------------------------------------------------------------------------------------ */ /* AM handlers =========== */ #ifndef PACK_EOP_DONE #define PACK_EOP_DONE(_eop) PACK(_eop) #endif #ifndef PACK_IOP_DONE #define PACK_IOP_DONE(_iop,_getput) PACK(_iop) #endif #ifndef MARK_DONE #define MARK_DONE(_ptr,_isget) do { \ if (_isget) gasneti_sync_writes(); \ gasnete_op_markdone((gasnete_op_t *)(_ptr), (_isget)); \ } while (0) #endif /* ------------------------------------------------------------------------------------ */ /* Forward declarations */ #if GASNETE_BUILD_AMREF_GET int gasnete_amref_get_nbi( gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG); #endif /* ------------------------------------------------------------------------------------ */ #if GASNETE_BUILD_AMREF_GET_HANDLERS GASNETI_INLINE(gasnete_amref_get_reqh_inner) void gasnete_amref_get_reqh_inner(gex_Token_t token, gex_AM_Arg_t nbytes, void *dest, void *src, void *done) { gasneti_assert_uint(nbytes ,<=, gex_AM_LUBReplyMedium()); gex_AM_ReplyMedium(token, gasneti_handleridx(gasnete_amref_get_reph), src, nbytes, GEX_EVENT_NOW, 0, PACK(dest), PACK(done)); } SHORT_HANDLER(gasnete_amref_get_reqh,4,7, (token, a0, UNPACK(a1), UNPACK(a2), UNPACK(a3) ), (token, a0, UNPACK2(a1, a2), UNPACK2(a3, a4), UNPACK2(a5, a6))); GASNETI_INLINE(gasnete_amref_get_reph_inner) void gasnete_amref_get_reph_inner(gex_Token_t token, void *addr, size_t nbytes, void *dest, void *done) { GASNETI_MEMCPY(dest, addr, nbytes); MARK_DONE(done,1); } MEDIUM_HANDLER(gasnete_amref_get_reph,2,4, (token,addr,nbytes, UNPACK(a0), UNPACK(a1) ), (token,addr,nbytes, UNPACK2(a0, a1), UNPACK2(a2, a3))); GASNETI_INLINE(gasnete_amref_getlong_reqh_inner) void gasnete_amref_getlong_reqh_inner(gex_Token_t token, gex_AM_Arg_t nbytes, void *dest, void *src, void *done) { gex_AM_ReplyLong(token, gasneti_handleridx(gasnete_amref_getlong_reph), src, nbytes, dest, GEX_EVENT_NOW, 0, PACK(done)); } SHORT_HANDLER(gasnete_amref_getlong_reqh,4,7, (token, a0, UNPACK(a1), UNPACK(a2), UNPACK(a3) ), (token, a0, UNPACK2(a1, a2), UNPACK2(a3, a4), UNPACK2(a5, a6))); GASNETI_INLINE(gasnete_amref_getlong_reph_inner) void gasnete_amref_getlong_reph_inner(gex_Token_t token, void *addr, size_t nbytes, void *done) { MARK_DONE(done,1); } LONG_HANDLER(gasnete_amref_getlong_reph,1,2, (token,addr,nbytes, UNPACK(a0) ), (token,addr,nbytes, UNPACK2(a0, a1))); #endif /* GASNETE_BUILD_AMREF_GET_HANDLERS */ /* ------------------------------------------------------------------------------------ */ #if GASNETE_BUILD_AMREF_PUT_HANDLERS GASNETI_INLINE(gasnete_amref_put_reqh_inner) void gasnete_amref_put_reqh_inner(gex_Token_t token, void *addr, size_t nbytes, void *dest, void *done) { GASNETI_MEMCPY(dest, addr, nbytes); gasneti_sync_writes(); gex_AM_ReplyShort(token, gasneti_handleridx(gasnete_amref_markdone_reph), 0, PACK(done)); } MEDIUM_HANDLER(gasnete_amref_put_reqh,2,4, (token,addr,nbytes, UNPACK(a0), UNPACK(a1) ), (token,addr,nbytes, UNPACK2(a0, a1), UNPACK2(a2, a3))); GASNETI_INLINE(gasnete_amref_putlong_reqh_inner) void gasnete_amref_putlong_reqh_inner(gex_Token_t token, void *addr, size_t nbytes, void *done) { gasneti_sync_writes(); gex_AM_ReplyShort(token, gasneti_handleridx(gasnete_amref_markdone_reph), 0, PACK(done)); } LONG_HANDLER(gasnete_amref_putlong_reqh,1,2, (token,addr,nbytes, UNPACK(a0) ), (token,addr,nbytes, UNPACK2(a0, a1))); GASNETI_INLINE(gasnete_amref_markdone_reph_inner) void gasnete_amref_markdone_reph_inner(gex_Token_t token, void *done) { MARK_DONE(done,0); } SHORT_HANDLER(gasnete_amref_markdone_reph,1,2, (token, UNPACK(a0) ), (token, UNPACK2(a0, a1))); #endif /* GASNETE_BUILD_AMREF_PUT_HANDLERS */ /* ------------------------------------------------------------------------------------ */ /* Common logic for _nbi, also for use by _nb */ #if GASNETE_BUILD_AMREF_GET GASNETI_INLINE(gasnete_amref_get_nbi_inner) void gasnete_amref_get_nbi_inner(gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t * const op = mythread->current_iop; if (nbytes <= GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD) { op->initiated_get_cnt++; gex_AM_RequestShort(tm, rank, gasneti_handleridx(gasnete_amref_get_reqh), 0, (gex_AM_Arg_t)nbytes, PACK(dest), PACK(src), PACK_IOP_DONE(op,get)); return; } else { size_t chunksz; gex_AM_Index_t reqhandler; uint8_t *psrc = src; uint8_t *pdest = dest; #if GASNETE_USE_LONG_GETS gasneti_assert(tm); gasneti_memcheck(gasneti_seginfo); // TODO-EX: more needed to ensure gasneti_in_segment() is "ready"? gasneti_EP_t i_ep = gasneti_import_ep(gex_TM_QueryEP(tm)); if (gasneti_in_local_segment(i_ep, dest, nbytes)) { chunksz = gex_AM_LUBReplyLong(); reqhandler = gasneti_handleridx(gasnete_amref_getlong_reqh); } else #endif { reqhandler = gasneti_handleridx(gasnete_amref_get_reqh); chunksz = gex_AM_LUBReplyMedium(); // TODO-EX: _lub_ -> _max_ } for (;;) { op->initiated_get_cnt++; if (nbytes > chunksz) { gex_AM_RequestShort(tm, rank, reqhandler, 0, (gex_AM_Arg_t)chunksz, PACK(pdest), PACK(psrc), PACK_IOP_DONE(op,get)); nbytes -= chunksz; psrc += chunksz; pdest += chunksz; } else { gex_AM_RequestShort(tm, rank, reqhandler, 0, (gex_AM_Arg_t)nbytes, PACK(pdest), PACK(psrc), PACK_IOP_DONE(op,get)); break; } } return; } } #endif #if GASNETE_BUILD_AMREF_PUT GASNETI_INLINE(gasnete_amref_put_nbi_inner) int gasnete_amref_put_nbi_inner (gex_TM_t tm, gex_Rank_t rank, void *dest, void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t * const op = mythread->current_iop; // TODO-EX: flags? // Some may pass through to the AMReques call(s). // Others need some special treatment. // The case of IMMEDIATE, in particular, requires attention to avoid // returning from a partially-initiated xfer in the case that we loop. // Currently we are passing flags==0 to all AMRequest calls. // There is no EVENT_DEFER for an AMRequest, but EVENT_GROUP is permitted. // Since (at least in the reference iop) syncnbi_{puts,all}() will // test/wait the LC counters, we convert EVENT_DEFER to EVENT_GROUP here. if (lc_opt == GEX_EVENT_DEFER) lc_opt = GEX_EVENT_GROUP; if (nbytes <= GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD) { op->initiated_put_cnt++; return gex_AM_RequestMedium(tm, rank, gasneti_handleridx(gasnete_amref_put_reqh), src, nbytes, lc_opt, 0, PACK(dest), PACK_IOP_DONE(op,put)); } else #if GASNETE_USE_LONG_PUTS if (nbytes <= gex_AM_LUBRequestLong()) { // TODO-EX: _lub_ -> _max_ op->initiated_put_cnt++; return gex_AM_RequestLong(tm, rank, gasneti_handleridx(gasnete_amref_putlong_reqh), src, nbytes, dest, lc_opt, 0, PACK_IOP_DONE(op,put)); } else { const size_t chunksz = gex_AM_LUBRequestLong(); // TODO-EX: _lub_ -> _max_ uint8_t *psrc = src; uint8_t *pdest = dest; for (;;) { op->initiated_put_cnt++; if (nbytes > chunksz) { gex_AM_RequestLong(tm, rank, gasneti_handleridx(gasnete_amref_putlong_reqh), psrc, chunksz, pdest, lc_opt, 0, PACK_IOP_DONE(op,put)); nbytes -= chunksz; psrc += chunksz; pdest += chunksz; } else { gex_AM_RequestLong(tm, rank, gasneti_handleridx(gasnete_amref_putlong_reqh), psrc, nbytes, pdest, lc_opt, 0, PACK_IOP_DONE(op,put)); break; } } } #else /* ! GASNETE_USE_LONG_PUTS */ { const size_t chunksz = gex_AM_LUBRequestMedium(); // TODO-EX: _lub_ -> _max_ uint8_t *psrc = src; uint8_t *pdest = dest; for (;;) { op->initiated_put_cnt++; if (nbytes > chunksz) { gex_AM_RequestMedium(tm, rank, gasneti_handleridx(gasnete_amref_put_reqh), psrc, chunksz, lc_opt, 0, PACK(pdest), PACK_IOP_DONE(op,put)); nbytes -= chunksz; psrc += chunksz; pdest += chunksz; } else { gex_AM_RequestMedium(tm, rank, gasneti_handleridx(gasnete_amref_put_reqh), psrc, nbytes, lc_opt, 0, PACK(pdest), PACK_IOP_DONE(op,put)); break; } } } #endif /* GASNETE_USE_LONG_PUTS */ return 0; } #endif /* GASNETE_BUILD_AMREF_PUT */ /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (explicit event) ========================================================== */ #if GASNETE_BUILD_AMREF_GET extern gex_Event_t gasnete_amref_get_nb( gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(! gasnete_mapped_at(tm,rank,src)); // else PSHM/loopback if (nbytes <= GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD) { gasnete_eop_t *op = gasnete_eop_new(GASNETI_MYTHREAD); gex_AM_RequestShort(tm, rank, gasneti_handleridx(gasnete_amref_get_reqh), 0, (gex_AM_Arg_t)nbytes, PACK(dest), PACK(src), PACK_EOP_DONE(op)); return (gex_Event_t)op; } else { /* need many messages - use an access region to coalesce them into a single event */ /* (note this relies on the fact that our implementation of access regions allows recursion) */ gasnete_begin_nbi_accessregion(0,1 /* enable recursion */ GASNETI_THREAD_PASS); gasnete_amref_get_nbi(tm, dest, rank, src, nbytes, flags GASNETI_THREAD_PASS); return gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); } } #endif /* GASNETE_BUILD_AMREF_GET */ /* ------------------------------------------------------------------------------------ */ #if GASNETE_BUILD_AMREF_PUT extern gex_Event_t gasnete_amref_put_nb( gex_TM_t tm, gex_Rank_t rank, void *dest, void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(! gasnete_mapped_at(tm,rank,dest)); // else PSHM/loopback // EVENT_DEFER is accomplished using an nbi access region, ended with EVENT_DEFER. // Otherwise this reference implementation has no way to portably link the // LC of an AM Request to a gex_Event_t. if (lc_opt != GEX_EVENT_DEFER) { // Cannot maintain connection between root and leaf // TODO-EX: complete implementation of GASNETI_FLAG_LC_OPT_IN if (gasneti_leaf_is_pointer(lc_opt)) { *lc_opt = GEX_EVENT_INVALID; lc_opt = GEX_EVENT_NOW; } if (nbytes <= GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD) { gasnete_eop_t *op = gasnete_eop_new(GASNETI_MYTHREAD); gex_AM_RequestMedium(tm, rank, gasneti_handleridx(gasnete_amref_put_reqh), src, nbytes, lc_opt, 0, PACK(dest), PACK_EOP_DONE(op)); return (gex_Event_t)op; } #if GASNETE_USE_LONG_PUTS else if (nbytes <= gex_AM_LUBRequestLong()) { // TODO-EX: _lub_ -> _max_ gasnete_eop_t *op = gasnete_eop_new(GASNETI_MYTHREAD); gex_AM_RequestLong(tm, rank, gasneti_handleridx(gasnete_amref_putlong_reqh), src, nbytes, dest, lc_opt, 0, PACK_EOP_DONE(op)); return (gex_Event_t)op; } #endif // Fall through if too large for a single AM } { /* need many messages or EVENT_DEFER - use an access region to coalesce into a single event */ /* (note this relies on the fact that our implementation of access regions allows recursion) */ int nbi_result; gex_Event_t event; gasnete_begin_nbi_accessregion(0,1 /* enable recursion */ GASNETI_THREAD_PASS); nbi_result = gasnete_amref_put_nbi_inner(tm, rank, dest, src, nbytes, GEX_EVENT_GROUP, flags GASNETI_THREAD_PASS); event = gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); if (nbi_result) { // "IMMEDIATE" failure gasnete_wait(event GASNETI_THREAD_PASS); event = GEX_EVENT_NO_OP; } return event; } } #endif /* GASNETE_BUILD_AMREF_PUT */ /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (implicit event) ========================================================== each message sends an ack - we count the number of implicit ops launched and compare with the number acknowledged Another possible design would be to eliminate some of the acks (at least for puts) by piggybacking them on other messages (like get replies) or simply aggregating them the target until the source tries to synchronize */ /* ------------------------------------------------------------------------------------ */ #if GASNETE_BUILD_AMREF_GET extern int gasnete_amref_get_nbi( gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(! gasnete_mapped_at(tm,rank,src)); // else PSHM/loopback gasnete_amref_get_nbi_inner(tm, dest, rank, src, nbytes, flags GASNETI_THREAD_PASS); return 0; } #endif /* GASNETE_BUILD_AMREF_GET */ /* ------------------------------------------------------------------------------------ */ #if GASNETE_BUILD_AMREF_PUT extern int gasnete_amref_put_nbi( gex_TM_t tm, gex_Rank_t rank, void *dest, void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_assert(! gasnete_mapped_at(tm,rank,dest)); // else PSHM/loopback gasnete_amref_put_nbi_inner(tm, rank, dest, src, nbytes, lc_opt, flags GASNETI_THREAD_PASS); return 0; } #endif /* GASNETE_BUILD_AMREF_PUT */ /* ------------------------------------------------------------------------------------ */ void gasnete_check_config_amref(void) { #if GASNETE_BUILD_AMREF_GET || GASNETE_BUILD_AMREF_PUT /* This ensures chunks sent as Medium payloads don't exceed the maximum */ gasneti_assert_always_uint(GASNETE_GETPUT_MEDIUM_LONG_THRESHOLD ,<=, gex_AM_LUBRequestMedium()); #endif #if GASNETE_BUILD_AMREF_GET // TODO-EX: these checks won't actually ensure what they should if/when we mve from _lub_ to _max_ /* These ensure nbytes in AM-based Gets will fit in handler_arg_t (bug 2770) */ gasneti_assert_always_uint(gex_AM_LUBReplyMedium() ,<=, (size_t)0xffffffff); #if GASNETE_USE_LONG_GETS gasneti_assert_always_uint(gex_AM_LUBReplyLong() ,<=, (size_t)0xffffffff); #endif #endif } /* ------------------------------------------------------------------------------------ */ #if GASNETE_BUILD_AMREF_GET_HANDLERS #define GASNETE_AMREF_GET_HANDLERS() \ gasneti_handler_tableentry_with_bits(gasnete_amref_get_reqh,4,7,REQUEST,SHORT,0), \ gasneti_handler_tableentry_with_bits(gasnete_amref_get_reph,2,4,REPLY,MEDIUM,0), \ gasneti_handler_tableentry_with_bits(gasnete_amref_getlong_reqh,4,7,REQUEST,SHORT,0), \ gasneti_handler_tableentry_with_bits(gasnete_amref_getlong_reph,1,2,REPLY,LONG,0), #else #define GASNETE_AMREF_GET_HANDLERS() /*empty*/ #endif #if GASNETE_BUILD_AMREF_PUT_HANDLERS #define GASNETE_AMREF_PUT_HANDLERS() \ gasneti_handler_tableentry_with_bits(gasnete_amref_put_reqh,2,4,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_with_bits(gasnete_amref_putlong_reqh,1,2,REQUEST,LONG,0), \ gasneti_handler_tableentry_with_bits(gasnete_amref_markdone_reph,1,2,REPLY,SHORT,0), #else #define GASNETE_AMREF_PUT_HANDLERS() /*empty*/ #endif #if defined(GASNETE_BUILD_AMREF_GET_HANDLERS) || defined(GASNETE_BUILD_AMREF_PUT_HANDLERS) #define GASNETE_AMREF_HANDLERS() GASNETE_AMREF_GET_HANDLERS() GASNETE_AMREF_PUT_HANDLERS() #endif gasnet-2025.8.0/extended-ref/gasnet_extended_refbarrier.c0000664000175000017500000025757715142313673023533 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/gasnet_extended_refbarrier.c $ * Description: Reference implemetation of GASNet Barrier, using Active Messages * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef GASNETI_GASNET_EXTENDED_REFBARRIER_C #error This file not meant to be compiled directly - included by gasnet_extended.c #endif #include /* ------------------------------------------------------------------------------------ */ /* state shared between barrier implementations */ /* Flags bits that are valid for use by the client */ #define GASNETE_BARRIERFLAGS_CLIENT_ALL \ (GASNET_BARRIERFLAG_MISMATCH | GASNET_BARRIERFLAG_ANONYMOUS | GASNET_BARRIERFLAG_UNNAMED) #define GASNETE_BARRIERFLAGS_CLIENT_COLL GASNETE_BARRIERFLAGS_CLIENT_ALL #ifndef GASNETE_BARRIER_DEFAULT /* conduit plugin for default barrier mechanism */ #define GASNETE_BARRIER_DEFAULT "DISSEM" #endif #if GASNETI_STATS_OR_TRACE gasneti_tick_t gasnete_barrier_notifytime; /* for statistical purposes */ #endif static gasnet_seginfo_t *gasnete_rdmabarrier_auxseg = NULL; /*eventually this has to be changed so that all outstanding barriers are polled*/ /*keep a list of active barriers across all the teams. The poller walks the list and then kicks each one of them*/ /*XXX: for now only team all registers their pollers*/ gasneti_progressfn_t gasnete_barrier_pf = GASNETI_PROGRESSFN_INITIALIZER; GASNETI_INLINE(gasnete_barrier_pf_enable) void gasnete_barrier_pf_enable(gasnete_coll_team_t team) { if (team->barrier_pf) { gasneti_assert(team == GASNET_TEAM_ALL); gasnete_barrier_pf = team->barrier_pf; /* Will need to QUEUE, not assign */ GASNETI_PROGRESSFNS_ENABLE(gasneti_pf_barrier,BOOLEAN); } } GASNETI_INLINE(gasnete_barrier_pf_disable) void gasnete_barrier_pf_disable(gasnete_coll_team_t team) { if (team->barrier_pf) { gasneti_assert(team == GASNET_TEAM_ALL); GASNETI_PROGRESSFNS_DISABLE(gasneti_pf_barrier,BOOLEAN); } } /* ------------------------------------------------------------------------------------ */ /* Code to check for proper nesting of barrier calls - compiles away in NDBUG builds */ #if GASNET_DEBUG #define GASNETE_SPLITSTATE_SET(_team,_state) do { \ (_team)->barrier_splitstate = (_state); \ gasneti_sync_writes(); /* OK if redundant */ \ } while(0) #define GASNETE_SPLITSTATE_CHECK(_team,_state,_msg) do { \ gasneti_sync_reads(); /* OK if redundant */ \ if_pf ((_team)->barrier_splitstate == (_state)) { \ gasneti_fatalerror(_msg); \ } \ } while(0) #else #define GASNETE_SPLITSTATE_SET(_team,_state) ((void)0) #define GASNETE_SPLITSTATE_CHECK(_team,_state,_msg) ((void)0) #endif #define GASNETE_SPLITSTATE_ENTER(_team) \ GASNETE_SPLITSTATE_SET(_team,INSIDE_BARRIER) #define GASNETE_SPLITSTATE_LEAVE(_team) \ GASNETE_SPLITSTATE_SET(_team,OUTSIDE_BARRIER) #define GASNETE_SPLITSTATE_NOTIFY(_team) \ GASNETE_SPLITSTATE_CHECK(team,INSIDE_BARRIER,"gasnet_barrier_notify() called twice in a row") #define GASNETE_SPLITSTATE_WAIT(_team) \ GASNETE_SPLITSTATE_CHECK(team,OUTSIDE_BARRIER,"gasnet_barrier_wait() called without a matching notify") #define GASNETE_SPLITSTATE_TRY(_team) \ GASNETE_SPLITSTATE_CHECK(team,OUTSIDE_BARRIER,"gasnet_barrier_try() called without a matching notify") #define GASNETE_SPLITSTATE_BARRIER(_team) \ GASNETE_SPLITSTATE_CHECK(team,INSIDE_BARRIER,"gasnet_barrier() called between notify and wait/try") #define GASNETE_SPLITSTATE_RESULT(_team) \ GASNETE_SPLITSTATE_CHECK(team,INSIDE_BARRIER,"gasnet_barrier_result() called between notify and wait/try") #define GASNETE_SPLITSTATE_NOTIFY_ENTER(_team) do { \ GASNETE_SPLITSTATE_NOTIFY(_team); \ GASNETE_SPLITSTATE_ENTER(_team); \ } while(0) #define GASNETE_SPLITSTATE_WAIT_LEAVE(_team) do { \ GASNETE_SPLITSTATE_WAIT(_team); \ GASNETE_SPLITSTATE_LEAVE(_team); \ } while(0) /* ------------------------------------------------------------------------------------ */ /* * GASNETI_PSHM_BARRIER: do we build the shared-memory barrier * GASNETI_PSHM_BARRIER_HIER: for use alone (0) or in a heirarchical barrier (1) */ #if !GASNET_PSHM /* No PSHM support: GASNETI_PSHM_BARRIER == GASNETI_PSHM_BARRIER_HIER == 0 */ #if GASNETI_PSHM_BARRIER_HIER #error "GASNETI_PSHM_BARRIER_HIER non-zero but not configured for PSHM support" #endif #undef GASNETI_PSHM_BARRIER_HIER #define GASNETI_PSHM_BARRIER_HIER 0 #define GASNETI_PSHM_BARRIER 0 #elif defined(GASNET_CONDUIT_SMP) /* PSHM+SMP: GASNETI_PSHM_BARRIER == 1, GASNETI_PSHM_BARRIER_HIER == 0 * even if user set GASNETI_PSHM_BARRIER_HIER explicitly */ #undef GASNETI_PSHM_BARRIER_HIER #define GASNETI_PSHM_BARRIER_HIER 0 #define GASNETI_PSHM_BARRIER 1 #else /* PSHM+NET: GASNETI_PSHM_BARRIER_HIER == 1 unless set by user * GASNETI_PSHM_BARRIER always follows GASNETI_PSHM_BARRIER_HIER */ #ifndef GASNETI_PSHM_BARRIER_HIER /* Preserve user's setting, if any */ #define GASNETI_PSHM_BARRIER_HIER 1 #endif #define GASNETI_PSHM_BARRIER GASNETI_PSHM_BARRIER_HIER #endif #if GASNETI_PSHM_BARRIER /* ------------------------------------------------------------------------------------ */ /* the shared memory intra-supernode implementation of barrier */ /* This is a shared-memory barrier. As such the gasneti_pshm_barrier_t must exist * within either the GASNet segments (Aux or Client portions are both possible) or * within the N+1st shared mmap() which contains the AMPSHM data structures. In the * case of TEAM_ALL this memory comes from that N+1st mmap. To get full team support * in this barrier implementation, we'll probably need to carve the memory out of the * team's scratch space. I am not sure if we can hold on to a piece of the scratch * space indefinately (I doubt it) or whether is will need to be recycled back into * to the pool and associate a collective op with each barrier. Another option * would be to allocate some of the space left over at the end of that N+1st mmap. * This question of shared-space allocation is the only thing still blocking team * support (well, other than testing) for the PSHM barrier code. -PHH 2010.03.16 */ #ifdef GASNETE_PSHM_BARR_U64 /* Keep the existing defn */ #elif PLATFORM_ARCH_64 && !GASNETI_ATOMIC64_NOT_SIGNALSAFE && (SIZEOF_INT == 4) && \ (((GASNET_BARRIERFLAG_MISMATCH|GASNET_BARRIERFLAG_ANONYMOUS) & 0xffff) == \ (GASNET_BARRIERFLAG_MISMATCH|GASNET_BARRIERFLAG_ANONYMOUS)) /* We can fit everything in a 64-bit read/write w/o fear of word-tearing. */ #define GASNETE_PSHM_BARR_U64 1 #define GASNETE_PSHM_BARR_PHASE_SHIFT 16 #if PLATFORM_ARCH_LITTLE_ENDIAN #define GASNETE_PSHM_BARR_PACK(_value, _flags, _phase) \ GASNETI_MAKEWORD((_flags | (_phase << GASNETE_PSHM_BARR_PHASE_SHIFT)), _value) #define GASNETE_PSHM_BARR_FLAGS(_u64) GASNETI_HIWORD(_u64) /* and phase too */ #define GASNETE_PSHM_BARR_VALUE(_u64) GASNETI_LOWORD(_u64) #else #define GASNETE_PSHM_BARR_PACK(_value, _flags, _phase) \ GASNETI_MAKEWORD(_value, (_flags | (_phase << GASNETE_PSHM_BARR_PHASE_SHIFT))) #define GASNETE_PSHM_BARR_FLAGS(_u64) GASNETI_LOWORD(_u64) /* and phase too */ #define GASNETE_PSHM_BARR_VALUE(_u64) GASNETI_HIWORD(_u64) #endif #else #define GASNETE_PSHM_BARR_U64 0 #endif typedef struct gasnete_coll_pshmbarrier_s { struct { struct gasneti_pshm_barrier_node *mynode; struct gasnete_pshmbarrier_children { struct gasneti_pshm_barrier_node *node; #if GASNETE_PSHM_BARR_U64 uint64_t u64; #else int phase; #endif } *children; int rank, num_children; int remain, value, flags; /* Partial state between notify and completion */ int volatile two_to_phase; /* Local var alternates between 2^0 and 2^1 */ } private; gasneti_pshm_barrier_t *shared; } gasnete_pshmbarrier_data_t; #define PSHM_BDATA_DECL(_name, _value) \ gasnete_pshmbarrier_data_t * const _name = (_value) /* no semicolon */ /* We encode the done bits and the result into a single word * The hierarhical case needs space for 4 done bits; pure-SMP needs only 2. */ #if GASNETI_PSHM_BARRIER_HIER #define PSHM_BSTATE_DONE_BITS 4 #else #define PSHM_BSTATE_DONE_BITS 2 #endif #define PSHM_BSTATE_TO_RESULT(_state) ((_state) >> PSHM_BSTATE_DONE_BITS) #define PSHM_BSTATE_SIGNAL(_bdata, _result, _two_to_phase) do { \ const int _tmp_result = (_result); \ const gasneti_atomic_sval_t _state = (_tmp_result << PSHM_BSTATE_DONE_BITS) | (_two_to_phase);\ gasneti_assert_int(PSHM_BSTATE_TO_RESULT(_state) ,==, _tmp_result); \ gasneti_atomic_set(&(_bdata)->shared->state, _state, GASNETI_ATOMIC_REL); \ } while(0) GASNETI_INLINE(gasnete_pshmbarrier_arrive) void gasnete_pshmbarrier_arrive(gasnete_pshmbarrier_data_t * const pshm_bdata, int value, int flags, int two_to_phase) { /* Signal my own arrival */ #if GASNETE_PSHM_BARR_U64 gasneti_local_wmb(); pshm_bdata->private.mynode->u.u64 = GASNETE_PSHM_BARR_PACK(value, flags, two_to_phase); #else pshm_bdata->private.mynode->u.wmb.value = value; pshm_bdata->private.mynode->u.wmb.flags = flags; gasneti_local_wmb(); pshm_bdata->private.mynode->u.wmb.phase = two_to_phase; #endif /* Root (rank == 0) must publish the results and signal the barrier w/ phase and result */ if (! pshm_bdata->private.rank) { gasneti_pshm_barrier_t * const shared_data = pshm_bdata->shared; int result; shared_data->value = value; shared_data->flags = flags; result = (flags & GASNET_BARRIERFLAG_MISMATCH) ? GASNET_ERR_BARRIER_MISMATCH : GASNET_OK; PSHM_BSTATE_SIGNAL(pshm_bdata, result, two_to_phase); } } /* TODO: to inline or not? */ static int gasnete_pshmbarrier_kick(gasnete_pshmbarrier_data_t * const pshm_bdata) { /* The algorithm: * * This is basically a tree-based reduction, except that by default we will * devolve to a "flat" tree with node==0 as the parent of all others. * * 1) Each node (carefully) polls for the phase fields of children, if any, * applying the name-matching logic to values as they becomes available. * 2) Each node stores the value/flags resulting from the application of the * matching logic and its own value/flags in its corresponding tree node. * * The "careful" polling is derived from the barrier Dan Bonachea developed * for the Titanium runtime (in which the barrier was neither split-phase * nor named). * * TODO: For CPU overcommit we may want a different algorithm rather than * just use of GASNETI_WAITHOOK() which is dependent on the setting * of the waitmode. Even if we stick with this same algortihm, we * could consider yielding in the overcommit case independent of * the waitmode setting. * * TODO: For large enough core count our prefetch of all the data at once * could potentially lead to conflict misses in cache. Some sort of * segmenting of our fetches could help if we reach that point. * * TODO: Current data layout places the nodes together on a page which is * allocated and first touched by the master (reader). The results * of trials with the data distributed to have affinity of each node * correspond to its writer were mixed. On PPC and SPARC platforms * one sees a 50% (POWER7) to 400% (SPARC T4) slow-down when the * data has affinity to the writter. That is enough to avoid making * any change to writer-affinity at the present time. * However, on AMD and Intel CPUs the results need more study: * + On an SGI UV 1000 platform the use of writer-affinity eliminated * an anomalous performance characteristic seen on runs which use * 3 or 4 blades, but otherwise slows the performance slightly. * + On a dual-socket Intel Sandy Bridge node, writer-affinity gave a * 40% to 50% speed-up when using both sockets - no change otherwise. * + On a dual-socket AMD Magny-Cours node, writer-affinity gave a 10% * to 20% slow-down. * NOTE: These results were taken ONLY with the linear case. * * TODO: Measurements above suggest that for some systems (PPC and SPARC * in particular, but also some x86-64) that there is a benefit to * spinning on memory local to the reader (as opposed to the writer). * This is automatically the case when radix==0, but for the case of * a tree with more than the trivial 2 levels the inititialization * code could (and therefore perhaps should) layout the nodes such * that every parent reads only from memory with local affinity. */ int n = pshm_bdata->private.remain; if (n) { gasneti_pshm_barrier_t * const shared_data = pshm_bdata->shared; struct gasneti_pshm_barrier_node * const nodes = shared_data->node; const int two_to_phase = pshm_bdata->private.two_to_phase; int value = pshm_bdata->private.value; int flags = pshm_bdata->private.flags; #if GASNETE_PSHM_BARR_U64 const uint64_t goal = GASNETE_PSHM_BARR_PACK(0, 0, two_to_phase); #endif struct gasnete_pshmbarrier_children * const children = pshm_bdata->private.children; /* Poll for children's phase fields to indicate arrival, processing in batches */ { int arrivals = 0; int i; /* 1. Fetch any nodes which are still outstanding */ for (i = 0; i < n; ++i) { #if GASNETE_PSHM_BARR_U64 children[i].u64 = children[i].node->u.u64; #else children[i].phase = children[i].node->u.wmb.phase; #endif } /* 2. Scan the phases, collecting completed entries at the end of the list */ for (i = 0; i < n; /*empty*/) { #if GASNETE_PSHM_BARR_U64 const int ready = (goal & children[i].u64) != 0; /* goal is a single bit */ #else const int ready = two_to_phase == children[i].phase; #endif if (ready) { struct gasnete_pshmbarrier_children tmp = children[--n]; children[n] = children[i]; children[i] = tmp; ++arrivals; } else { /* We don't reread until the next kick */ ++i; } } /* 3. Apply name-matching logic to recent arrivals, if any */ if (arrivals) { #if !GASNETE_PSHM_BARR_U64 gasneti_local_rmb(); #endif for (i = 0; i < arrivals; ++i) { #if GASNETE_PSHM_BARR_U64 const uint64_t u64 = children[n+i].u64; const int other_value = GASNETE_PSHM_BARR_VALUE(u64); const int other_flags = GASNETE_PSHM_BARR_FLAGS(u64); /* No need to mask */ #else const struct gasneti_pshm_barrier_node * node = children[n+i].node; const int other_value = node->u.wmb.value; const int other_flags = node->u.wmb.flags; gasneti_assert_int(node->u.wmb.phase ,==, two_to_phase); #endif if ((flags | other_flags) & GASNET_BARRIERFLAG_MISMATCH) { flags = GASNET_BARRIERFLAG_MISMATCH; } else if (flags & GASNET_BARRIERFLAG_ANONYMOUS) { flags = other_flags; value = other_value; } else if (!(other_flags & GASNET_BARRIERFLAG_ANONYMOUS) && (other_value != value)) { flags = GASNET_BARRIERFLAG_MISMATCH; } } } } pshm_bdata->private.remain = n; if (n) { /* Not done - save state and return */ pshm_bdata->private.value = value; pshm_bdata->private.flags = flags; return 0; } /* Can finally signal my own arrival */ gasnete_pshmbarrier_arrive(pshm_bdata, value, flags, two_to_phase); } return 1; } /* Returns non-zero IFF barrier is "locally complete" == does NOT require further kicks to progress */ GASNETI_INLINE(gasnete_pshmbarrier_notify_inner) int gasnete_pshmbarrier_notify_inner(gasnete_pshmbarrier_data_t * const pshm_bdata, int value, int flags) { /* Start a new phase */ int two_to_phase = (pshm_bdata->private.two_to_phase ^= 3); /* alternates between 01 and 10 base-2 */ int num_children = pshm_bdata->private.num_children; if (num_children) { pshm_bdata->private.remain = num_children; pshm_bdata->private.value = value; pshm_bdata->private.flags = flags; return gasnete_pshmbarrier_kick(pshm_bdata); } else { gasnete_pshmbarrier_arrive(pshm_bdata, value, flags, two_to_phase); return 1; } } GASNETI_INLINE(finish_pshm_barrier) int finish_pshm_barrier(const gasnete_pshmbarrier_data_t * const pshm_bdata, int id, int flags, gasneti_atomic_sval_t state) { const struct gasneti_pshm_barrier_node * const mynode = pshm_bdata->private.mynode; const gasneti_pshm_barrier_t * const shared_data = pshm_bdata->shared; int ret = PSHM_BSTATE_TO_RESULT(state); /* default unless args mismatch those from notify */ /* Check args for mismatch */ if_pf(/* try/wait value must match consensus value, if both are present */ !((flags|shared_data->flags) & GASNET_BARRIERFLAG_ANONYMOUS) && (id != shared_data->value)) { ret = GASNET_ERR_BARRIER_MISMATCH; } return ret; } /* Poll waiting for appropriate done bit in "state" * Returns GASNET_{OK,ERR_BARRIER_MISMATCH} */ GASNETI_INLINE(gasnete_pshmbarrier_wait_inner) int gasnete_pshmbarrier_wait_inner(gasnete_pshmbarrier_data_t * const pshm_bdata, int id, int flags, int shift) { const gasneti_atomic_sval_t goal = pshm_bdata->private.two_to_phase << shift; gasneti_atomic_t * const state_p = &pshm_bdata->shared->state; gasneti_atomic_sval_t state; gasneti_polluntil((gasnete_pshmbarrier_kick(pshm_bdata), (goal & (state = gasneti_atomic_read(state_p, 0))))); return finish_pshm_barrier(pshm_bdata, id, flags, state); } /* Test for appropriate done bit in "state" * Returns zero or non-zero (the state in pure-SMP case) */ GASNETI_INLINE(gasnete_pshmbarrier_try_inner) gasneti_atomic_sval_t gasnete_pshmbarrier_try_inner(gasnete_pshmbarrier_data_t * const pshm_bdata, int shift) { const gasneti_atomic_sval_t goal = pshm_bdata->private.two_to_phase << shift; gasneti_atomic_t * const state_p = &pshm_bdata->shared->state; gasneti_atomic_sval_t state; gasnete_pshmbarrier_kick(pshm_bdata); state = gasneti_atomic_read(state_p, GASNETI_ATOMIC_ACQ); #if !GASNETI_PSHM_BARRIER_HIER return (goal & state) ? state : 0; #else return (goal & state); #endif } /* Returns non-NULL on success * NULL return on failure might eventually come from a failed shared memory allocation. */ static gasnete_pshmbarrier_data_t * gasnete_pshmbarrier_init_inner(gasnete_coll_team_t team) { gasnete_pshmbarrier_data_t *pshm_bdata = NULL; gasneti_pshm_barrier_t *shared_data = NULL; const int two_to_phase = 1; /* 2^0 */ int i, radix; if (team == GASNET_TEAM_ALL) { shared_data = gasneti_pshm_barrier; } else { /* TODO: non-TEAM_ALL will need to allocate storage from shared space */ return NULL; } if (shared_data) { const int size = team->supernode.node_count; const int rank = team->supernode.node_rank; pshm_bdata = gasneti_malloc(sizeof(gasnete_pshmbarrier_data_t)); gasneti_leak(pshm_bdata); pshm_bdata->private.two_to_phase = two_to_phase; pshm_bdata->private.rank = rank; pshm_bdata->private.mynode = &shared_data->node[rank]; /* GASNET_PSHM_BARRIER_RADIX * If positive then the given value is the out-degree of the tree. * If zero (default) then radix = size - 1, resulting in a "flat tree" (linear time) * If negative then a tree is build with the processes in groups of size = -radix, * and the first process per group is the parent of the others. The rank==0 * process is the parent of the other group-representatives (in addition to * being the parent of the others in its own group). */ radix = gasneti_getenv_int_withdefault("GASNET_PSHM_BARRIER_RADIX", 0, 0); if (radix == 0) radix = size - 1; pshm_bdata->private.children = NULL; pshm_bdata->private.num_children = 0; pshm_bdata->private.remain = 0; if (size == 1) { /* Nothing to do */ } else if (radix < 0) { /* Break into "cells" of size = -radix (e.g. cores/socket) */ radix = -radix; if (rank == 0) { int last = MIN(size, radix) - 1; int count = last + (size - 1) / radix; int j = 0; pshm_bdata->private.num_children = count; pshm_bdata->private.children = gasneti_malloc(count * sizeof(struct gasnete_pshmbarrier_children)); for (i = 1; i <= last; ++i) { pshm_bdata->private.children[j++].node = &shared_data->node[i]; } for (i = radix; i < size; i += radix) { pshm_bdata->private.children[j++].node = &shared_data->node[i]; } gasneti_assert_int(j ,==, count); } else if ((rank % radix) == 0) { int last = MIN(size, rank + radix) - 1; int count = MAX(0, last - rank); if (count) { pshm_bdata->private.num_children = count; pshm_bdata->private.children = gasneti_malloc(count * sizeof(struct gasnete_pshmbarrier_children)); gasneti_leak(pshm_bdata->private.children); for (i = 0; i < count; ++i) { pshm_bdata->private.children[i].node = &shared_data->node[rank+1+i]; } } } } else { /* Build an N-ary tree */ int first = radix * rank + 1; int last = MIN(size, first + radix) - 1; int count = MAX(0, 1 + last - first); if (count) { pshm_bdata->private.num_children = count; pshm_bdata->private.children = gasneti_malloc(count * sizeof(struct gasnete_pshmbarrier_children)); gasneti_leak(pshm_bdata->private.children); for (i = 0; i < count; ++i) { pshm_bdata->private.children[i].node = &shared_data->node[first + i]; } } } pshm_bdata->shared = shared_data; /* One node initializes shared data, while others wait */ if (!rank) { /* Values used to detect arrivals at Notify */ for (i=0; i < size; i++) { #if GASNETE_PSHM_BARR_U64 shared_data->node[i].u.u64 = GASNETE_PSHM_BARR_PACK(0, 0, two_to_phase); #else shared_data->node[i].u.wmb.phase = two_to_phase; #endif } /* Flags word to poll or spin on until barrier is done */ gasneti_atomic_set(&shared_data->state, 0, 0); shared_data->size = size; /* Indicate completion of this initialization */ gasneti_atomic_set(&shared_data->ready, size, GASNETI_ATOMIC_REL); } if (team == GASNET_TEAM_ALL) { gasneti_pshmnet_bootstrapBarrier(); } else if (rank) { /* XXX: What if this value is present by chance? */ gasneti_waituntil(gasneti_atomic_read(&shared_data->ready, 0) == size); } } return pshm_bdata; } #if GASNETI_PSHM_BARRIER_HIER /* Not yet used for SMP-conduit code */ static void gasnete_pshmbarrier_fini_inner(gasnete_pshmbarrier_data_t *pshm_bdata) { gasneti_assert(pshm_bdata); gasneti_assert(pshm_bdata->shared); if (pshm_bdata->shared == gasneti_pshm_barrier) { /* TEAM_ALL - shared allocation is "static" */ } else { /* TODO: once we to shared memory allocation in _init, can we also free it? */ } gasneti_free(pshm_bdata); } static gasnete_pshmbarrier_data_t * gasnete_pshmbarrier_init_hier(gasnete_coll_team_t team, int *size_p, int *rank_p, gasnete_coll_peer_list_t **peers_p) { gasnete_pshmbarrier_data_t * pshm_bdata; if (! gasneti_getenv_yesno_withdefault("GASNET_PSHM_BARRIER_HIER", 1)) { /* User has disabled at runtime */ return NULL; } pshm_bdata = gasnete_pshmbarrier_init_inner(team); if (pshm_bdata) { *size_p = team->supernode.grp_count; *rank_p = team->supernode.grp_rank; if (peers_p) *peers_p = &team->supernode_peers; } return pshm_bdata; } #endif /* GASNETI_PSHM_BARRIER_HIER */ #if !GASNETI_PSHM_BARRIER_HIER /* Entry points for SMP-conduit */ static void gasnete_pshmbarrier_notify(gasnete_coll_team_t team, int id, int flags) { gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ GASNETE_SPLITSTATE_NOTIFY_ENTER(team); (void)gasnete_pshmbarrier_notify_inner(team->barrier_data, id, flags); #if GASNETE_PSHM_BARR_U64 gasneti_sync_writes(); #else /* No sync_writes() needed due to WMB inside notify_inner */ #endif } static int gasnete_pshmbarrier_wait(gasnete_coll_team_t team, int id, int flags) { gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ GASNETE_SPLITSTATE_WAIT_LEAVE(team); { const int result = gasnete_pshmbarrier_wait_inner(team->barrier_data, id, flags, 0); gasneti_assert(result != GASNET_ERR_NOT_READY); gasneti_sync_writes(); return result; } } static int gasnete_pshmbarrier_try(gasnete_coll_team_t team, int id, int flags) { gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ GASNETE_SPLITSTATE_TRY(team); GASNETI_SAFE(gasneti_AMPoll()); { const gasneti_atomic_sval_t state = gasnete_pshmbarrier_try_inner(team->barrier_data, 0); int result; if (state) { result = finish_pshm_barrier(team->barrier_data, id, flags, state); GASNETE_SPLITSTATE_LEAVE(team); gasneti_sync_writes(); } else { GASNETI_WAITHOOK(); result = GASNET_ERR_NOT_READY; } return result; } } static int gasnete_pshmbarrier_result(gasnete_coll_team_t team, int *id) { gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ GASNETE_SPLITSTATE_RESULT(team); { const gasnete_pshmbarrier_data_t * const pshm_bdata = team->barrier_data; const gasneti_pshm_barrier_t * const shared_data = pshm_bdata->shared; *id = shared_data->value; return (GASNET_BARRIERFLAG_ANONYMOUS & shared_data->flags); } } static void gasnete_pshmbarrier_init(gasnete_coll_team_t team) { team->barrier_data = (void *)gasnete_pshmbarrier_init_inner(team); team->barrier_notify = &gasnete_pshmbarrier_notify; team->barrier_wait = &gasnete_pshmbarrier_wait; team->barrier_try = &gasnete_pshmbarrier_try; team->barrier_result = &gasnete_pshmbarrier_result; /* TODO: progress via kick (once thread safety is ensured) */ } #endif /* !GASNETI_PSHM_BARRIER_HIER */ #endif /* GASNETI_PSHM_BARRIER */ /* ------------------------------------------------------------------------------------ */ /* the AM-based Dissemination implementation of barrier */ /* an AM-based Dissemination barrier implementation: With N nodes, the barrier takes ceil(lg(N)) steps (lg = log-base-2). At step i (i=0..): node n first sends to node ((n + 2^i) mod N) then node n waits to receive (from node ((n + N - 2^i) mod N)) once we receive for step i, we can move the step i+1 (or finish) The distributed nature makes this barrier more scalable than a centralized barrier, but also more sensitive to any lack of attentiveness to the network. We use a static allocation, limiting us to 2^GASNETE_AMBARRIER_MAXSTEP nodes. Algorithm is described in section 3.3 of John M. Mellor-Crummey and Michael L. Scott. "Algorithms for scalable synchronization on shared-memory multiprocessors." ACM ToCS, 9(1):21 65, 1991. */ typedef struct { gex_HSL_t amdbarrier_lock; gex_Rank_t *amdbarrier_peers; /* precomputed list of peers to communicate with */ #if GASNETI_PSHM_BARRIER_HIER gasnete_pshmbarrier_data_t *amdbarrier_pshm; /* non-NULL if using hierarchical code */ int amdbarrier_passive; /* 2 if some other node makes progress for me, 0 otherwise */ #endif int volatile amdbarrier_value; /* (supernode-)local ambarrier value */ int volatile amdbarrier_flags; /* (supernode-)local ambarrier flags */ int volatile amdbarrier_step; /* local ambarrier step */ int volatile amdbarrier_size; /* ceil(lg(nodes)) */ int volatile amdbarrier_phase; /* 2-phase operation to improve pipelining */ int volatile amdbarrier_step_done[2][GASNETE_AMDBARRIER_MAXSTEP]; /* non-zero when a step is complete */ int volatile amdbarrier_recv_value[2]; /* consensus ambarrier value */ int volatile amdbarrier_recv_flags[2]; /* consensus ambarrier flags */ } gasnete_coll_amdbarrier_t; static void gasnete_amdbarrier_notify_reqh(gex_Token_t token, gex_AM_Arg_t teamid, gex_AM_Arg_t phase, gex_AM_Arg_t step, gex_AM_Arg_t value, gex_AM_Arg_t flags) { gasnete_coll_team_t team = gasnete_coll_team_lookup((uint32_t)teamid); gasnete_coll_amdbarrier_t *barrier_data = team->barrier_data; gex_HSL_Lock(&barrier_data->amdbarrier_lock); { /* Note we might not receive the steps in the numbered order. * We record the value received on the first one to actually arrive. * In subsequent steps we check for mismatch of received values. * The local value is compared in the kick function. */ register int recv_flags = barrier_data->amdbarrier_recv_flags[phase]; register int recv_value = barrier_data->amdbarrier_recv_value[phase]; if ((recv_flags | flags) & GASNET_BARRIERFLAG_MISMATCH) { recv_flags = GASNET_BARRIERFLAG_MISMATCH; } else if (recv_flags & GASNET_BARRIERFLAG_ANONYMOUS) { recv_flags = flags; recv_value = value; } else if (!(flags & GASNET_BARRIERFLAG_ANONYMOUS) && (value != recv_value)) { recv_flags = GASNET_BARRIERFLAG_MISMATCH; } barrier_data->amdbarrier_recv_flags[phase] = recv_flags; barrier_data->amdbarrier_recv_value[phase] = recv_value; } gex_HSL_Unlock(&barrier_data->amdbarrier_lock); gasneti_assert(barrier_data->amdbarrier_step_done[phase][step] == 0); barrier_data->amdbarrier_step_done[phase][step] = 1; } GASNETI_INLINE(gasnete_amdbarrier_send) void gasnete_amdbarrier_send(gasnete_coll_team_t team, int phase, int step, int value, int flags) { gasnete_coll_amdbarrier_t *barrier_data = team->barrier_data; gex_AM_RequestShort5(gasneti_THUNK_TM, barrier_data->amdbarrier_peers[step], gasneti_handleridx(gasnete_amdbarrier_notify_reqh), 0, team->team_id, phase, step, value, flags); } #if GASNETI_PSHM_BARRIER_HIER static int gasnete_amdbarrier_kick_pshm(gasnete_coll_team_t team) { gasnete_coll_amdbarrier_t *barrier_data = team->barrier_data; int done = (barrier_data->amdbarrier_step >= 0); if (!done && !gex_HSL_Trylock(&barrier_data->amdbarrier_lock)) { done = (barrier_data->amdbarrier_step >= 0); if (!done) { PSHM_BDATA_DECL(pshm_bdata, barrier_data->amdbarrier_pshm); if (gasnete_pshmbarrier_kick(pshm_bdata)) { const int phase = barrier_data->amdbarrier_phase; const int value = pshm_bdata->shared->value; const int flags = pshm_bdata->shared->flags; barrier_data->amdbarrier_value = value; barrier_data->amdbarrier_flags = flags; if (!barrier_data->amdbarrier_size) { /* singelton */ barrier_data->amdbarrier_recv_value[phase] = value; barrier_data->amdbarrier_recv_flags[phase] = flags; } gasneti_sync_writes(); barrier_data->amdbarrier_step = 0; gex_HSL_Unlock(&barrier_data->amdbarrier_lock); /* Cannot send while holding HSL */ if (barrier_data->amdbarrier_size && !barrier_data->amdbarrier_passive) { gasnete_amdbarrier_send(team, phase, 0, value, flags); } else { gasnete_barrier_pf_disable(team); } return 1; } } gex_HSL_Unlock(&barrier_data->amdbarrier_lock); } return done; } #endif void gasnete_amdbarrier_kick(gasnete_coll_team_t team) { gasnete_coll_amdbarrier_t *barrier_data = team->barrier_data; int phase, step; int cursor, numsteps = 0; gex_AM_Arg_t flags, value; /* early unlocked read: */ step = barrier_data->amdbarrier_step; if (step == barrier_data->amdbarrier_size) return; /* nothing to do */ gasneti_assert(team->total_ranks > 1); /* singleton should have matched step==size, above */ #if GASNETI_PSHM_BARRIER_HIER if (step < 0) { /* Cannot begin to probe until local notify is complete */ gasneti_assert(barrier_data->amdbarrier_pshm); if (!gasnete_amdbarrier_kick_pshm(team)) return; } #endif if (gex_HSL_Trylock(&barrier_data->amdbarrier_lock)) return; /* another thread is currently in kick */ { step = barrier_data->amdbarrier_step; phase = barrier_data->amdbarrier_phase; #if GASNETI_PSHM_BARRIER_HIER if_pf (step < 0) { /* local notify has not completed */ gex_HSL_Unlock(&barrier_data->amdbarrier_lock); return; } else if (barrier_data->amdbarrier_passive) { gasnete_barrier_pf_disable(team); gex_HSL_Unlock(&barrier_data->amdbarrier_lock); return; } gasneti_assert(!barrier_data->amdbarrier_passive); #endif /* count steps we can take while holding the lock - must release before send, so coalesce as many as possible in one acquisition */ for (cursor = step; cursor < barrier_data->amdbarrier_size && barrier_data->amdbarrier_step_done[phase][cursor]; ++cursor) { barrier_data->amdbarrier_step_done[phase][cursor] = 0; numsteps++; } if (numsteps) { /* completed one or more steps */ /* we might send at least one message - so fetch args while lock is held */ flags = barrier_data->amdbarrier_recv_flags[phase]; value = barrier_data->amdbarrier_recv_value[phase]; if (!step) { /* merge local notify */ const int local_flags = barrier_data->amdbarrier_flags; const int local_value = barrier_data->amdbarrier_value; if ((flags | local_flags) & GASNET_BARRIERFLAG_MISMATCH) { flags = GASNET_BARRIERFLAG_MISMATCH; } else if (flags & GASNET_BARRIERFLAG_ANONYMOUS) { flags = local_flags; value = local_value; } else if (!(local_flags & GASNET_BARRIERFLAG_ANONYMOUS) && (local_value != value)) { flags = GASNET_BARRIERFLAG_MISMATCH; } barrier_data->amdbarrier_recv_flags[phase] = flags; barrier_data->amdbarrier_recv_value[phase] = value; } if (cursor == barrier_data->amdbarrier_size) { /* We got the last recv - barrier locally complete */ gasnete_barrier_pf_disable(team); gasneti_sync_writes(); /* flush state before the write to ambarrier_step below */ numsteps -= 1; /* no send at last step */ } /* notify all threads of the step increase - this may allow other local threads to proceed on the barrier and even indicate barrier completion while we overlap outgoing notifications to other nodes */ barrier_data->amdbarrier_step = cursor; } } gex_HSL_Unlock(&barrier_data->amdbarrier_lock); for ( ; numsteps; numsteps--) { gasnete_amdbarrier_send(team, phase, ++step, value, flags); } } static void gasnete_amdbarrier_notify(gasnete_coll_team_t team, int id, int flags) { gasnete_coll_amdbarrier_t *barrier_data = team->barrier_data; int phase; int do_send = 1; int want_pf = 1; int step = 0; gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ GASNETE_SPLITSTATE_NOTIFY_ENTER(team); #if GASNETI_PSHM_BARRIER_HIER if (barrier_data->amdbarrier_pshm) { PSHM_BDATA_DECL(pshm_bdata, barrier_data->amdbarrier_pshm); if (gasnete_pshmbarrier_notify_inner(pshm_bdata, id, flags)) { id = pshm_bdata->shared->value; flags = pshm_bdata->shared->flags; want_pf = do_send = !barrier_data->amdbarrier_passive; } else { do_send = 0; step = -1; } } #endif /* If we are on an ILP64 platform, this cast will ensure we truncate the same * bits locally as we do when passing over the network. */ barrier_data->amdbarrier_value = (gex_AM_Arg_t)id; barrier_data->amdbarrier_flags = flags; barrier_data->amdbarrier_step = step; gasneti_sync_writes(); phase = !barrier_data->amdbarrier_phase; /* enter new phase */ barrier_data->amdbarrier_phase = phase; /* (possibly) send notify msg to peer */ if (do_send) gasnete_amdbarrier_send(team, phase, 0, id, flags); if (want_pf) gasnete_barrier_pf_enable(team); /* update state */ gasneti_sync_writes(); /* ensure all state changes committed before return */ } static void gasnete_amdbarrier_notify_singleton(gasnete_coll_team_t team, int id, int flags) { gasnete_coll_amdbarrier_t *barrier_data = team->barrier_data; int phase; #if GASNETI_PSHM_BARRIER_HIER int step = 0; #endif gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ GASNETE_SPLITSTATE_NOTIFY_ENTER(team); #if GASNETI_PSHM_BARRIER_HIER if (barrier_data->amdbarrier_pshm) { PSHM_BDATA_DECL(pshm_bdata, barrier_data->amdbarrier_pshm); if (gasnete_pshmbarrier_notify_inner(pshm_bdata, id, flags)) { id = pshm_bdata->shared->value; flags = pshm_bdata->shared->flags; } else { step = -1; } } #endif /* If we are on an ILP64 platform, this cast will ensure we truncate the same * bits locally as we do when passing over the network. */ barrier_data->amdbarrier_value = (gex_AM_Arg_t)id; barrier_data->amdbarrier_flags = flags; #if GASNETI_PSHM_BARRIER_HIER barrier_data->amdbarrier_step = step; #endif gasneti_sync_writes(); phase = !barrier_data->amdbarrier_phase; /* enter new phase */ barrier_data->amdbarrier_phase = phase; barrier_data->amdbarrier_recv_value[phase] = id; /* to simplify checking in _wait */ barrier_data->amdbarrier_recv_flags[phase] = flags; #if GASNETI_PSHM_BARRIER_HIER if (0 != step) gasnete_barrier_pf_enable(team); #endif /* update state */ gasneti_sync_writes(); /* ensure all state changes committed before return */ } static int gasnete_amdbarrier_wait(gasnete_coll_team_t team, int id, int flags) { gasnete_coll_amdbarrier_t *barrier_data = team->barrier_data; #if GASNETI_PSHM_BARRIER_HIER PSHM_BDATA_DECL(pshm_bdata, barrier_data->amdbarrier_pshm); #endif int retval = GASNET_OK; int i; int phase; gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ phase = barrier_data->amdbarrier_phase; GASNETE_SPLITSTATE_WAIT_LEAVE(team); #if GASNETI_PSHM_BARRIER_HIER if (pshm_bdata) { const int passive_shift = barrier_data->amdbarrier_passive; gasneti_polluntil(gasnete_amdbarrier_kick_pshm(team)); retval = gasnete_pshmbarrier_wait_inner(pshm_bdata, id, flags, passive_shift); if (passive_shift) { /* Once the active peer signals done, we can return */ barrier_data->amdbarrier_value = pshm_bdata->shared->value; barrier_data->amdbarrier_flags = pshm_bdata->shared->flags; gasneti_sync_writes(); /* ensure all state changes committed before return */ return retval; } } #endif if (barrier_data->amdbarrier_step == barrier_data->amdbarrier_size) { /* completed asynchronously before wait (via progressfns or try) */ GASNETI_TRACE_EVENT_TIME(B,BARRIER_ASYNC_COMPLETION,GASNETI_TICKS_NOW_IFENABLED(B)-gasnete_barrier_notifytime); gasneti_sync_reads(); /* ensure correct amdbarrier_recv_* will be read */ } else { /* wait for response */ gasnete_barrier_pf_disable(team); GASNET_BLOCKUNTIL((gasnete_amdbarrier_kick(team), barrier_data->amdbarrier_step == barrier_data->amdbarrier_size)); } /* determine return value */ if_pf (barrier_data->amdbarrier_recv_flags[phase] & GASNET_BARRIERFLAG_MISMATCH) { retval = GASNET_ERR_BARRIER_MISMATCH; } else if_pf(/* try/wait value must match consensus value, if both are present */ !((flags|barrier_data->amdbarrier_recv_flags[phase]) & GASNET_BARRIERFLAG_ANONYMOUS) && ((gex_AM_Arg_t)id != barrier_data->amdbarrier_recv_value[phase])) { retval = GASNET_ERR_BARRIER_MISMATCH; } /* preserve state for possible _result call */ barrier_data->amdbarrier_value = barrier_data->amdbarrier_recv_value[phase]; barrier_data->amdbarrier_flags = barrier_data->amdbarrier_recv_flags[phase]; /* update state */ barrier_data->amdbarrier_recv_flags[phase] = GASNET_BARRIERFLAG_ANONYMOUS; #if GASNETI_PSHM_BARRIER_HIER if (pshm_bdata) { /* Signal any passive peers w/ the final result */ pshm_bdata->shared->value = barrier_data->amdbarrier_value; pshm_bdata->shared->flags = barrier_data->amdbarrier_flags; PSHM_BSTATE_SIGNAL(pshm_bdata, retval, pshm_bdata->private.two_to_phase << 2); /* includes a WMB */ gasneti_assert(!barrier_data->amdbarrier_passive); } else #endif gasneti_sync_writes(); /* ensure all state changes committed before return */ return retval; } static int gasnete_amdbarrier_try(gasnete_coll_team_t team, int id, int flags) { gasnete_coll_amdbarrier_t *barrier_data = team->barrier_data; gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ GASNETE_SPLITSTATE_TRY(team); GASNETI_SAFE(gasneti_AMPoll()); #if GASNETI_PSHM_BARRIER_HIER if (barrier_data->amdbarrier_pshm) { const int passive_shift = barrier_data->amdbarrier_passive; if (!gasnete_amdbarrier_kick_pshm(team) || !gasnete_pshmbarrier_try_inner(barrier_data->amdbarrier_pshm, passive_shift)) return GASNET_ERR_NOT_READY; if (passive_shift) return gasnete_amdbarrier_wait(team, id, flags); } if (!barrier_data->amdbarrier_passive) #endif gasnete_amdbarrier_kick(team); if (barrier_data->amdbarrier_step == barrier_data->amdbarrier_size) return gasnete_amdbarrier_wait(team, id, flags); else return GASNET_ERR_NOT_READY; } static int gasnete_amdbarrier_result(gasnete_coll_team_t team, int *id) { gasneti_sync_reads(); /* ensure we read only up-to-date values */ GASNETE_SPLITSTATE_RESULT(team); { const gasnete_coll_amdbarrier_t * const barrier_data = team->barrier_data; *id = barrier_data->amdbarrier_value; return (GASNET_BARRIERFLAG_ANONYMOUS & barrier_data->amdbarrier_flags); } } void gasnete_amdbarrier_kick_team_all(void) { gasnete_amdbarrier_kick(GASNET_TEAM_ALL); } static void gasnete_amdbarrier_fini(gasnete_coll_team_t team) { gasnete_coll_amdbarrier_t *data = team->barrier_data;; #if GASNETI_PSHM_BARRIER_HIER if (data->amdbarrier_pshm) gasnete_pshmbarrier_fini_inner(data->amdbarrier_pshm); #endif gasneti_free(data); } static void gasnete_amdbarrier_init(gasnete_coll_team_t team) { gasnete_coll_amdbarrier_t *barrier_data = gasneti_calloc(1,sizeof(gasnete_coll_amdbarrier_t)); int steps; int total_ranks = team->total_ranks; int myrank = team->myrank; gasnete_coll_peer_list_t *peers = &team->peers; #if GASNETI_PSHM_BARRIER_HIER PSHM_BDATA_DECL(pshm_bdata, gasnete_pshmbarrier_init_hier(team, &total_ranks, &myrank, &peers)); if (pshm_bdata) { barrier_data->amdbarrier_passive = (pshm_bdata->private.rank != 0) ? 2 : 0; /* precompute shift */ barrier_data->amdbarrier_pshm = pshm_bdata; } #endif gasneti_leak(barrier_data); team->barrier_data = barrier_data; gex_HSL_Init(&barrier_data->amdbarrier_lock); barrier_data->amdbarrier_recv_flags[0] = GASNET_BARRIERFLAG_ANONYMOUS; barrier_data->amdbarrier_recv_flags[1] = GASNET_BARRIERFLAG_ANONYMOUS; steps = peers->num; barrier_data->amdbarrier_size = steps; gasneti_assert_uint(barrier_data->amdbarrier_size ,<=, GASNETE_AMDBARRIER_MAXSTEP); /* list of log(P) peers we will communicate with */ barrier_data->amdbarrier_peers = peers->fwd; #if GASNETI_PSHM_BARRIER_HIER if (pshm_bdata && (pshm_bdata->shared->size == 1)) { /* With singleton proc on local supernode we can short-cut the PSHM code. */ gasnete_pshmbarrier_fini_inner(pshm_bdata); barrier_data->amdbarrier_pshm = NULL; } #endif team->barrier_notify = steps ? &gasnete_amdbarrier_notify : &gasnete_amdbarrier_notify_singleton; team->barrier_wait = &gasnete_amdbarrier_wait; team->barrier_try = &gasnete_amdbarrier_try; team->barrier_result = &gasnete_amdbarrier_result; team->barrier_fini = &gasnete_amdbarrier_fini; team->barrier_pf = (team == GASNET_TEAM_ALL) ? &gasnete_amdbarrier_kick_team_all : NULL; } #define GASNETE_AMDBARRIER_HANDLERS() \ gasneti_handler_tableentry_no_bits(gasnete_amdbarrier_notify_reqh,5,REQUEST,SHORT,0) /* ------------------------------------------------------------------------------------ */ /* the RDMA-based Dissemination implementation of barrier */ /* An RDMA-based Dissemination barrier implementation. "rmd" Principle is identical to the AM-based variant, above. The main difference is that RDMA-Puts are used to signal the peers instead of using AMs. This results in polling of "inboxes" in memory instead of simply checking for the done bits set by AMs. Consequently work from the AM handler moves to the "kick", but is silghtly simpler since we'll not run the "kick" before the local notify has run. However, we use four phases (not two) to be resistant to "late writes" both due to completing a barrier due to bytes "accidentally" matching the values yet to be written, as well as bytes which are rewritten as described in bug 4427. */ #if !GASNETI_THREADS #define gasnete_rmdbarrier_lock_t %%%error%%% #define gasnete_rmdbarrier_lock_init(_var) ((void)0) #define gasnete_rmdbarrier_trylock(_var) (0/*success*/) #define gasnete_rmdbarrier_unlock(_var) ((void)0) #elif GASNETI_HAVE_SPINLOCK #define gasnete_rmdbarrier_lock_t gasneti_atomic_t #define gasnete_rmdbarrier_lock_init(_var) gasneti_spinlock_init(_var) #define gasnete_rmdbarrier_trylock(_var) gasneti_spinlock_trylock(_var) #define gasnete_rmdbarrier_unlock(_var) gasneti_spinlock_unlock(_var) #else #define gasnete_rmdbarrier_lock_t gasneti_mutex_t #define gasnete_rmdbarrier_lock_init(_var) gasneti_mutex_init(_var) #define gasnete_rmdbarrier_trylock(_var) gasneti_mutex_trylock(_var) #define gasnete_rmdbarrier_unlock(_var) gasneti_mutex_unlock(_var) #endif // Meaningful names for some small integers used // Four "phases" occupy the lowest two bits of a "state" // "step" is the rest #define GASNETE_RMD_PHASES 4U #define GASNETE_RMD_PHASE_MASK (GASNETE_RMD_PHASES - 1) #define GASNETE_RMD_PHASE_BITS 2U #define GASNETE_RMD_ONE_STEP GASNETE_RMD_PHASES typedef struct { // Read/write data (note that struct is allocated cache-aligned) #if GASNETI_THREADS gasnete_rmdbarrier_lock_t barrier_lock; char _pad0[GASNETI_CACHE_PAD(sizeof(gasnete_rmdbarrier_lock_t))]; #endif int volatile barrier_state; /* (step << GASNETE_RMD_PHASE_BITS) | phase, where step is 1-based (0 is pshm notify) */ int volatile barrier_value; /* barrier value (evolves from local value) */ int volatile barrier_flags; /* barrier flags (evolves from local value) */ #if GASNETI_THREADS char _pad1[GASNETI_CACHE_PAD(3 * sizeof(int))]; #endif // Read-only data struct { gex_Rank_t jobrank; uintptr_t addr; } *barrier_peers; /* precomputed list of peers to communicate with */ #if GASNETI_PSHM_BARRIER_HIER gasnete_pshmbarrier_data_t *barrier_pshm; /* non-NULL if using hierarchical code */ int barrier_passive; /* 2 if some other node makes progress for me, 0 otherwise */ #endif int barrier_size; /* ceil(lg(nodes)) */ int barrier_goal; /* (1+ceil(lg(nodes)) << GASNETE_RMD_PHASE_BITS) == final barrier_state for phase=0 */ void *barrier_inbox; /* in-segment memory to recv notifications */ } gasnete_coll_rmdbarrier_t; /* So, what's this inbox structure all about? * We cannot assume RDMA will deliver the payload entirely in order. * So, we need some sort of checksum to tell when it has all arrived. * The "best" checksum is to simply send the data twice, but we go one * step further and invert the second copy to protect against an * imagined implementation that zeros the payload area first (which, * for instance, some memcpy() implementations are known to do). * Additionally, this ordering of fields ensures that for the "normal" * case of in-order delivery the _poll will detect incomplete payloads * in just 2 reads instead of 4. */ typedef struct gasnete_coll_rmdbarrier_inbox_s { int volatile flags; int volatile value; int volatile value2; int volatile flags2; } gasnete_coll_rmdbarrier_inbox_t; // Pad struct to a specific size and interleave #define GASNETE_RDMABARRIER_INBOX_SZ 32 // requires max 4K total space #define GASNETE_RDMABARRIER_INBOX(_bd,_state) \ ((gasnete_coll_rmdbarrier_inbox_t *) \ ((uintptr_t)((_bd)->barrier_inbox) \ + (unsigned)((_state)-GASNETE_RMD_ONE_STEP) * GASNETE_RDMABARRIER_INBOX_SZ)) #define GASNETE_RDMABARRIER_INBOX_REMOTE(_bd,_step,_state) \ ((gasnete_coll_rmdbarrier_inbox_t *) \ ((_bd)->barrier_peers[(unsigned)(_step)].addr \ + (unsigned)((_state)-GASNETE_RMD_ONE_STEP) * GASNETE_RDMABARRIER_INBOX_SZ)) #define GASNETE_RDMABARRIER_INBOX_NEXT(_addr) \ ((gasnete_coll_rmdbarrier_inbox_t *) \ ((uintptr_t)(_addr) + GASNETE_RMD_ONE_STEP * GASNETE_RDMABARRIER_INBOX_SZ)) GASNETI_INLINE(gasnete_rmdbarrier_send) void gasnete_rmdbarrier_send(gasnete_coll_rmdbarrier_t *barrier_data, int numsteps, unsigned int state, gex_AM_Arg_t value, gex_AM_Arg_t flags GASNETI_THREAD_FARG) { unsigned int step = state >> GASNETE_RMD_PHASE_BITS; gex_Event_t event; gasnete_coll_rmdbarrier_inbox_t *payload; int i; /* Use the upper half (padding) an "other phase" inbox as an in-segment temporary. * This has sufficient lifetime for bulk and sufficient alignment for non-bulk. * Use of opposite phase prevents cacheline contention with arrivals. */ const unsigned int stride = GASNETE_RDMABARRIER_INBOX_SZ / sizeof(gasnete_coll_rmdbarrier_inbox_t); payload = (stride/2) + GASNETE_RDMABARRIER_INBOX(barrier_data, (state^1)); payload->value = value; payload->flags = flags; payload->flags2 = ~flags; payload->value2 = ~value; // Here we use NBI puts inside a "fire and forget" region to avoid any // need to sync the operation later, and without bleeding into the client's // current iop. gasneti_begin_nbi_ff(GASNETI_THREAD_PASS_ALONE); for (i = 0; i < numsteps; ++i, state += GASNETE_RMD_ONE_STEP, step += 1) { const gex_Rank_t jobrank = barrier_data->barrier_peers[step].jobrank; void * const addr = GASNETE_RDMABARRIER_INBOX_REMOTE(barrier_data, step, state); gasnete_put_nbi(gasneti_THUNK_TM, jobrank, addr, payload, sizeof(*payload), GEX_EVENT_DEFER, 0 GASNETI_THREAD_PASS); } gasneti_end_nbi_ff(GASNETI_THREAD_PASS_ALONE); } #if GASNETI_PSHM_BARRIER_HIER static int gasnete_rmdbarrier_kick_pshm(gasnete_coll_team_t team) { gasnete_coll_rmdbarrier_t *barrier_data = team->barrier_data; int done = (barrier_data->barrier_state >= GASNETE_RMD_ONE_STEP); if (!done && !gasnete_rmdbarrier_trylock(&barrier_data->barrier_lock)) { const int state = barrier_data->barrier_state; done = (state >= GASNETE_RMD_ONE_STEP); if (!done) { PSHM_BDATA_DECL(pshm_bdata, barrier_data->barrier_pshm); if (gasnete_pshmbarrier_kick(pshm_bdata)) { const int value = pshm_bdata->shared->value; const int flags = pshm_bdata->shared->flags; barrier_data->barrier_value = value; barrier_data->barrier_flags = flags; gasneti_sync_writes(); barrier_data->barrier_state = state + GASNETE_RMD_ONE_STEP; gasnete_rmdbarrier_unlock(&barrier_data->barrier_lock); /* Cannot send while holding HSL */ if (barrier_data->barrier_size && !barrier_data->barrier_passive) { GASNET_BEGIN_FUNCTION(); // XXX: can we remove/avoid this lookup? gasnete_rmdbarrier_send(barrier_data, 1, state+GASNETE_RMD_ONE_STEP, value, flags GASNETI_THREAD_PASS); } else { gasnete_barrier_pf_disable(team); } return 1; } } gasnete_rmdbarrier_unlock(&barrier_data->barrier_lock); } return done; } #endif GASNETI_INLINE(gasnete_rmdbarrier_poll) int gasnete_rmdbarrier_poll(gasnete_coll_rmdbarrier_inbox_t *inbox) { return ((inbox->value == ~inbox->value2) && (inbox->flags == ~inbox->flags2)); } void gasnete_rmdbarrier_kick(gasnete_coll_team_t team) { gasnete_coll_rmdbarrier_t *barrier_data = team->barrier_data; int numsteps = 0; int state, new_state; int flags, value; /* early unlocked read: */ state = barrier_data->barrier_state; if (state >= barrier_data->barrier_goal) return; /* nothing to do */ gasneti_assert(team->total_ranks > 1); /* singleton should have matched (state >= goal), above */ GASNET_BEGIN_FUNCTION(); // XXX: can we remove/avoid this lookup? if_pf (!gasneti_nbi_ff_ok(GASNETI_THREAD_PASS_ALONE)) return; // Unsafe to nest nbi_ff region. See Bug 4592 #if GASNETI_PSHM_BARRIER_HIER if (barrier_data->barrier_pshm) { /* Cannot begin to probe until local notify is complete */ if (!gasnete_rmdbarrier_kick_pshm(team)) return; } #endif if (gasnete_rmdbarrier_trylock(&barrier_data->barrier_lock)) return; /* another thread is currently in kick */ /* reread w/ lock held and/or because kick_pshm may have advanced it */ state = barrier_data->barrier_state; #if GASNETI_PSHM_BARRIER_HIER if_pf (state < GASNETE_RMD_ONE_STEP) { // local notify has not completed gasnete_rmdbarrier_unlock(&barrier_data->barrier_lock); return; } else if (barrier_data->barrier_passive) { gasnete_barrier_pf_disable(team); gasnete_rmdbarrier_unlock(&barrier_data->barrier_lock); return; } gasneti_assert(!barrier_data->barrier_passive); #endif #if GASNETI_THREADS if_pf (state < 2 * GASNETE_RMD_ONE_STEP) { // need to pick up value/flags from notify gasneti_sync_reads(); /* value/flags were written by the non-locked notify */ } #endif value = barrier_data->barrier_value; flags = barrier_data->barrier_flags; /* process all consecutive steps which have arrived since we last ran */ gasnete_coll_rmdbarrier_inbox_t *inbox = GASNETE_RDMABARRIER_INBOX(barrier_data, state); int alt_state = (state & ~GASNETE_RMD_PHASE_MASK) | ((state + 2) & GASNETE_RMD_PHASE_MASK); gasnete_coll_rmdbarrier_inbox_t *alt_box = GASNETE_RDMABARRIER_INBOX(barrier_data, alt_state); for (new_state = state; new_state < barrier_data->barrier_goal && gasnete_rmdbarrier_poll(inbox); new_state += GASNETE_RMD_ONE_STEP) { const int step_value = inbox->value; const int step_flags = inbox->flags; gasneti_assert_uint(inbox->value2 ,==, ~step_value); gasneti_assert_uint(inbox->flags2 ,==, ~step_flags); if ((flags | step_flags) & GASNET_BARRIERFLAG_MISMATCH) { flags = GASNET_BARRIERFLAG_MISMATCH; } else if (flags & GASNET_BARRIERFLAG_ANONYMOUS) { flags = step_flags; value = step_value; } else if (!(step_flags & GASNET_BARRIERFLAG_ANONYMOUS) && (step_value != value)) { flags = GASNET_BARRIERFLAG_MISMATCH; } ++numsteps; inbox = GASNETE_RDMABARRIER_INBOX_NEXT(inbox); // We now "reset" an older phases's inbox, which cannot possibly be the // subject of additional writes. memset(alt_box, 0, sizeof(gasnete_coll_rmdbarrier_inbox_t)); alt_box = GASNETE_RDMABARRIER_INBOX_NEXT(alt_box); } if (numsteps) { /* completed one or more steps */ barrier_data->barrier_flags = flags; barrier_data->barrier_value = value; if (new_state >= barrier_data->barrier_goal) { /* We got the last recv - barrier locally complete */ gasnete_barrier_pf_disable(team); gasneti_sync_writes(); /* flush state before the write to barrier_state below */ numsteps -= 1; /* no send at last step */ } /* notify all threads of the step increase - this may allow other local threads to proceed on the barrier and even indicate barrier completion while we overlap outgoing notifications to other nodes */ barrier_data->barrier_state = new_state; } gasnete_rmdbarrier_unlock(&barrier_data->barrier_lock); if (numsteps) { /* need to issue one or more Puts */ gasnete_rmdbarrier_send(barrier_data, numsteps, state+GASNETE_RMD_ONE_STEP, value, flags GASNETI_THREAD_PASS); } } static void gasnete_rmdbarrier_notify(gasnete_coll_team_t team, int id, int flags) { gasnete_coll_rmdbarrier_t *barrier_data = team->barrier_data; int next_phase = (barrier_data->barrier_state + 1) & GASNETE_RMD_PHASE_MASK; int state = GASNETE_RMD_ONE_STEP + next_phase; // enter new phase int do_send = 1; int want_pf = 1; GASNETE_SPLITSTATE_NOTIFY_ENTER(team); #if GASNETI_PSHM_BARRIER_HIER if (barrier_data->barrier_pshm) { PSHM_BDATA_DECL(pshm_bdata, barrier_data->barrier_pshm); if (gasnete_pshmbarrier_notify_inner(pshm_bdata, id, flags)) { id = pshm_bdata->shared->value; flags = pshm_bdata->shared->flags; want_pf = do_send = !barrier_data->barrier_passive; } else { do_send = 0; state -= GASNETE_RMD_ONE_STEP; } } #endif barrier_data->barrier_value = id; barrier_data->barrier_flags = flags; gasneti_sync_writes(); barrier_data->barrier_state = state; if (do_send) { GASNET_BEGIN_FUNCTION(); // XXX: can we remove/avoid this lookup? gasnete_rmdbarrier_send(barrier_data, 1, state, id, flags GASNETI_THREAD_PASS); } if (want_pf) gasnete_barrier_pf_enable(team); /* update state */ gasneti_sync_writes(); /* ensure all state changes committed before return */ } /* Notify specialized to one (super)node case (reduced branches in BOTH variants) */ static void gasnete_rmdbarrier_notify_singleton(gasnete_coll_team_t team, int id, int flags) { gasnete_coll_rmdbarrier_t *barrier_data = team->barrier_data; #if GASNETI_PSHM_BARRIER_HIER int state = GASNETE_RMD_ONE_STEP; #endif GASNETE_SPLITSTATE_NOTIFY_ENTER(team); #if GASNETI_PSHM_BARRIER_HIER if (barrier_data->barrier_pshm) { PSHM_BDATA_DECL(pshm_bdata, barrier_data->barrier_pshm); if (gasnete_pshmbarrier_notify_inner(pshm_bdata, id, flags)) { id = pshm_bdata->shared->value; flags = pshm_bdata->shared->flags; } else { state = 0; } } #endif barrier_data->barrier_value = id; barrier_data->barrier_flags = flags; #if GASNETI_PSHM_BARRIER_HIER gasneti_sync_writes(); barrier_data->barrier_state = state; if (!state) gasnete_barrier_pf_enable(team); #endif /* update state */ gasneti_sync_writes(); /* ensure all state changes committed before return */ } static int gasnete_rmdbarrier_wait(gasnete_coll_team_t team, int id, int flags) { gasnete_coll_rmdbarrier_t *barrier_data = team->barrier_data; #if GASNETI_PSHM_BARRIER_HIER PSHM_BDATA_DECL(pshm_bdata, barrier_data->barrier_pshm); #endif int retval = GASNET_OK; gasneti_sync_reads(); /* ensure we read only up-to-date values */ GASNETE_SPLITSTATE_WAIT_LEAVE(team); #if GASNETI_PSHM_BARRIER_HIER if (pshm_bdata) { const int passive_shift = barrier_data->barrier_passive; gasneti_polluntil(gasnete_rmdbarrier_kick_pshm(team)); retval = gasnete_pshmbarrier_wait_inner(pshm_bdata, id, flags, passive_shift); if (passive_shift) { /* Once the active peer signals done, we can return */ barrier_data->barrier_value = pshm_bdata->shared->value; barrier_data->barrier_flags = pshm_bdata->shared->flags; gasneti_sync_writes(); /* ensure all state changes committed before return */ return retval; } } #endif if (barrier_data->barrier_state >= barrier_data->barrier_goal) { /* completed asynchronously before wait (via progressfns or try) */ GASNETI_TRACE_EVENT_TIME(B,BARRIER_ASYNC_COMPLETION,GASNETI_TICKS_NOW_IFENABLED(B)-gasnete_barrier_notifytime); } else { /* kick once, and if still necessary, wait for a response */ gasnete_rmdbarrier_kick(team); /* cannot BLOCKUNTIL since progess may occur on non-AM events */ while (barrier_data->barrier_state < barrier_data->barrier_goal) { GASNETI_WAITHOOK(); GASNETI_SAFE(gasneti_AMPoll()); gasnete_rmdbarrier_kick(team); } } gasneti_sync_reads(); /* ensure correct barrier_flags will be read */ /* determine return value */ if_pf (barrier_data->barrier_flags & GASNET_BARRIERFLAG_MISMATCH) { retval = GASNET_ERR_BARRIER_MISMATCH; } else if_pf(/* try/wait value must match consensus value, if both are present */ !((flags|barrier_data->barrier_flags) & GASNET_BARRIERFLAG_ANONYMOUS) && ((gex_AM_Arg_t)id != barrier_data->barrier_value)) { retval = GASNET_ERR_BARRIER_MISMATCH; } /* update state */ #if GASNETI_PSHM_BARRIER_HIER if (pshm_bdata) { /* Signal any passive peers w/ the final result */ pshm_bdata->shared->value = barrier_data->barrier_value; pshm_bdata->shared->flags = barrier_data->barrier_flags; PSHM_BSTATE_SIGNAL(pshm_bdata, retval, pshm_bdata->private.two_to_phase << 2); /* includes a WMB */ gasneti_assert(!barrier_data->barrier_passive); } else #endif gasneti_sync_writes(); /* ensure all state changes committed before return */ return retval; } static int gasnete_rmdbarrier_try(gasnete_coll_team_t team, int id, int flags) { gasnete_coll_rmdbarrier_t *barrier_data = team->barrier_data; gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ GASNETE_SPLITSTATE_TRY(team); GASNETI_SAFE(gasneti_AMPoll()); #if GASNETI_PSHM_BARRIER_HIER if (barrier_data->barrier_pshm) { const int passive_shift = barrier_data->barrier_passive; if (!gasnete_rmdbarrier_kick_pshm(team) || !gasnete_pshmbarrier_try_inner(barrier_data->barrier_pshm, passive_shift)) return GASNET_ERR_NOT_READY; if (passive_shift) return gasnete_rmdbarrier_wait(team, id, flags); } if (!barrier_data->barrier_passive) #endif gasnete_rmdbarrier_kick(team); if (barrier_data->barrier_state >= barrier_data->barrier_goal) return gasnete_rmdbarrier_wait(team, id, flags); else return GASNET_ERR_NOT_READY; } static int gasnete_rmdbarrier_result(gasnete_coll_team_t team, int *id) { gasneti_sync_reads(); /* ensure we read up-to-date values */ GASNETE_SPLITSTATE_RESULT(team); { const gasnete_coll_rmdbarrier_t * const barrier_data = team->barrier_data; *id = barrier_data->barrier_value; return (GASNET_BARRIERFLAG_ANONYMOUS & barrier_data->barrier_flags); } } void gasnete_rmdbarrier_kick_team_all(void) { gasnete_rmdbarrier_kick(GASNET_TEAM_ALL); } static void gasnete_rmdbarrier_fini(gasnete_coll_team_t team) { gasnete_coll_rmdbarrier_t *data = team->barrier_data;; #if GASNETI_PSHM_BARRIER_HIER if (data->barrier_pshm) gasnete_pshmbarrier_fini_inner(data->barrier_pshm); #endif gasneti_free(data->barrier_peers); gasneti_free_aligned(data); } static void gasnete_rmdbarrier_init(gasnete_coll_team_t team) { gasnete_coll_rmdbarrier_t *barrier_data; int steps; int total_ranks = team->total_ranks; int myrank = team->myrank; gasnete_coll_peer_list_t *peers = &team->peers; #if GASNETI_PSHM_BARRIER_HIER PSHM_BDATA_DECL(pshm_bdata, gasnete_pshmbarrier_init_hier(team, &total_ranks, &myrank, &peers)); #endif barrier_data = gasneti_malloc_aligned(GASNETI_CACHE_LINE_BYTES, sizeof(gasnete_coll_rmdbarrier_t)); gasneti_leak_aligned(barrier_data); memset(barrier_data, 0, sizeof(gasnete_coll_rmdbarrier_t)); team->barrier_data = barrier_data; #if GASNETI_PSHM_BARRIER_HIER if (pshm_bdata) { barrier_data->barrier_passive = (pshm_bdata->private.rank != 0) ? 2 : 0; /* precompute shift */ barrier_data->barrier_pshm = pshm_bdata; } #endif gasneti_assert(team == GASNET_TEAM_ALL); /* TODO: deal w/ in-segment allocation */ gasnete_rmdbarrier_lock_init(&barrier_data->barrier_lock); /* determine barrier size (number of steps) */ steps = peers->num; barrier_data->barrier_size = steps; barrier_data->barrier_goal = (1+steps) << GASNETE_RMD_PHASE_BITS; if (steps) { int step; gasneti_assert(gasnete_rdmabarrier_auxseg); // Need (at least) upper half of each inbox to be unused: gasneti_static_assert(2 * sizeof(gasnete_coll_rmdbarrier_inbox_t) <= GASNETE_RDMABARRIER_INBOX_SZ); barrier_data->barrier_inbox = gasnete_rdmabarrier_auxseg[gasneti_mynode].addr; barrier_data->barrier_peers = gasneti_malloc((1+steps) * sizeof(* barrier_data->barrier_peers)); gasneti_leak(barrier_data->barrier_peers); for (step = 0; step < steps; ++step) { gex_Rank_t jobrank = peers->fwd[step]; // is always a job rank barrier_data->barrier_peers[1+step].jobrank = jobrank; barrier_data->barrier_peers[1+step].addr = (uintptr_t)gasnete_rdmabarrier_auxseg[jobrank].addr; } } else { barrier_data->barrier_state = barrier_data->barrier_goal; } gasneti_free(gasnete_rdmabarrier_auxseg); #if GASNETI_PSHM_BARRIER_HIER if (pshm_bdata && (pshm_bdata->shared->size == 1)) { /* With singleton proc on local supernode we can short-cut the PSHM code. * This does not require alteration of the barrier_peers[] contructed above */ gasnete_pshmbarrier_fini_inner(pshm_bdata); barrier_data->barrier_pshm = NULL; } #endif team->barrier_notify = steps ? &gasnete_rmdbarrier_notify : &gasnete_rmdbarrier_notify_singleton; team->barrier_wait = &gasnete_rmdbarrier_wait; team->barrier_try = &gasnete_rmdbarrier_try; team->barrier_result = &gasnete_rmdbarrier_result; team->barrier_fini = &gasnete_rmdbarrier_fini; team->barrier_pf = (team == GASNET_TEAM_ALL) ? &gasnete_rmdbarrier_kick_team_all : NULL; } /* ------------------------------------------------------------------------------------ */ /* AM-based centralized implementation of barrier */ /* a silly, centralized barrier implementation: everybody sends notifies to a single node, where we count them up central node eventually notices the barrier is complete (probably when it calls wait) and then it broadcasts the completion to all the nodes The main problem is the need for the leader to call wait before the barrier can make progress - we really need a way for the "last thread" to notify all the threads when completion is detected, but AM semantics don't provide a simple way to do this. The centralized nature also makes it non-scalable - we really want to use a tree-based barrier or pairwise exchange algorithm for scalability (but these impose even greater potential delays due to the lack of attentiveness to barrier progress) */ typedef struct { int volatile amcbarrier_phase; /* 2-phase operation to improve pipelining */ int volatile amcbarrier_response_done[2]; /* non-zero when ambarrier is complete */ int volatile amcbarrier_response_flags[2]; /* consensus ambarrier flags */ int volatile amcbarrier_response_value[2]; /* consensus ambarrier value */ gex_Rank_t amcbarrier_max; // size of team (saves an indirection) gex_Rank_t amcbarrier_leader; // rank of leader // global state on leader gex_HSL_t amcbarrier_lock; int volatile amcbarrier_consensus_value[2]; /* consensus ambarrier value */ int volatile amcbarrier_consensus_flags[2]; /* consensus ambarrier flags */ int volatile amcbarrier_count[2];/* count of how many remotes have notified (on leader) */ } gasnete_coll_amcbarrier_t; static void gasnete_amcbarrier_notify_reqh(gex_Token_t token, gex_AM_Arg_t teamid, gex_AM_Arg_t phase, gex_AM_Arg_t value, gex_AM_Arg_t flags) { gasnete_coll_team_t team = gasnete_coll_team_lookup((uint32_t)teamid); gasnete_coll_amcbarrier_t *barrier_data = team->barrier_data; gasneti_assert_uint(team->myrank ,==, barrier_data->amcbarrier_leader); gex_HSL_Lock(&barrier_data->amcbarrier_lock); { int count = barrier_data->amcbarrier_count[phase]; const int consensus_flags = barrier_data->amcbarrier_consensus_flags[phase]; const int consensus_value = barrier_data->amcbarrier_consensus_value[phase]; if ((flags|consensus_flags) & GASNET_BARRIERFLAG_MISMATCH) { barrier_data->amcbarrier_consensus_flags[phase] = GASNET_BARRIERFLAG_MISMATCH; } else if (consensus_flags & GASNET_BARRIERFLAG_ANONYMOUS) { barrier_data->amcbarrier_consensus_flags[phase] = flags; barrier_data->amcbarrier_consensus_value[phase] = value; } else if (!(flags & GASNET_BARRIERFLAG_ANONYMOUS) && (value != consensus_value)) { barrier_data->amcbarrier_consensus_flags[phase] = GASNET_BARRIERFLAG_MISMATCH; } count++; if (count == barrier_data->amcbarrier_max) gasneti_sync_writes(); /* about to signal, ensure we flush state */ barrier_data->amcbarrier_count[phase] = count; } gex_HSL_Unlock(&barrier_data->amcbarrier_lock); } static void gasnete_amcbarrier_done_reqh(gex_Token_t token, gex_AM_Arg_t teamid, gex_AM_Arg_t phase, gex_AM_Arg_t flags, gex_AM_Arg_t value) { gasnete_coll_team_t team = gasnete_coll_team_lookup((uint32_t)teamid); gasnete_coll_amcbarrier_t *barrier_data = team->barrier_data; gasneti_assert(phase == barrier_data->amcbarrier_phase); barrier_data->amcbarrier_response_flags[phase] = flags; barrier_data->amcbarrier_response_value[phase] = value; gasneti_sync_writes(); barrier_data->amcbarrier_response_done[phase] = 1; } GASNETI_INLINE(gasnete_amcbarrier_send) void gasnete_amcbarrier_send(gasnete_coll_team_t team, int phase, int value, int flags) { gasnete_coll_amcbarrier_t *barrier_data = team->barrier_data; if (barrier_data->amcbarrier_max == 1) { barrier_data->amcbarrier_response_value[phase] = (gex_AM_Arg_t)value; barrier_data->amcbarrier_response_flags[phase] = flags; barrier_data->amcbarrier_response_done[phase] = 1; } else { // send notify msg to leader gex_AM_RequestShort4(team->e_tm, barrier_data->amcbarrier_leader, gasneti_handleridx(gasnete_amcbarrier_notify_reqh), 0, team->team_id, phase, value, flags); } if (team->myrank == barrier_data->amcbarrier_leader) gasnete_barrier_pf_enable(team); } /* make some progress on the ambarrier */ void gasnete_amcbarrier_kick(gasnete_coll_team_t team) { gasnete_coll_amcbarrier_t *barrier_data = team->barrier_data; int phase = barrier_data->amcbarrier_phase; // the leader does all the real work if (team->myrank != barrier_data->amcbarrier_leader) return; if (barrier_data->amcbarrier_count[phase] == barrier_data->amcbarrier_max) { int gotit = 0; int flags = 0; int value = 0; gex_HSL_Lock(&barrier_data->amcbarrier_lock); if (barrier_data->amcbarrier_count[phase] == barrier_data->amcbarrier_max) { flags = barrier_data->amcbarrier_consensus_flags[phase]; value = barrier_data->amcbarrier_consensus_value[phase]; gotit = 1; /* reset state before sending AMs - unlock is the WMB */ barrier_data->amcbarrier_count[phase] = 0; barrier_data->amcbarrier_consensus_flags[phase] = GASNET_BARRIERFLAG_ANONYMOUS; } gex_HSL_Unlock(&barrier_data->amcbarrier_lock); if (gotit) { /* ambarrier is complete */ gasnete_barrier_pf_disable(team); // inform everyone for (gex_Rank_t rank = 0; rank < barrier_data->amcbarrier_max; rank++) { gex_AM_RequestShort4(team->e_tm, rank, gasneti_handleridx(gasnete_amcbarrier_done_reqh), 0, team->team_id, phase, flags, value); } } } } static void gasnete_amcbarrier_notify(gasnete_coll_team_t team, int id, int flags) { gasnete_coll_amcbarrier_t *barrier_data = team->barrier_data; int do_send = 1; int phase; gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ GASNETE_SPLITSTATE_NOTIFY_ENTER(team); phase = !barrier_data->amcbarrier_phase; /* enter new phase */ barrier_data->amcbarrier_phase = phase; if (do_send) gasnete_amcbarrier_send(team, phase, id, flags); /* update state */ gasneti_sync_writes(); /* ensure all state changes committed before return */ } static int gasnete_amcbarrier_wait(gasnete_coll_team_t team, int id, int flags) { gasnete_coll_amcbarrier_t *barrier_data = team->barrier_data; int retval = GASNET_OK; int phase; gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ phase = barrier_data->amcbarrier_phase; GASNETE_SPLITSTATE_WAIT_LEAVE(team); if (barrier_data->amcbarrier_response_done[phase]) { /* completed asynchronously before wait (via progressfns or try) */ GASNETI_TRACE_EVENT_TIME(B,BARRIER_ASYNC_COMPLETION,GASNETI_TICKS_NOW_IFENABLED(B)-gasnete_barrier_notifytime); gasneti_sync_reads(); /* ensure we read correct amcbarrier_response_*[] */ } else { /* wait for response */ gasnete_barrier_pf_disable(team); GASNET_BLOCKUNTIL((gasnete_amcbarrier_kick(team), barrier_data->amcbarrier_response_done[phase])); /* GASNET_BLOCKUNTIL contains RMB needed for read of amcbarrier_response_*[] */ } /* determine result */ if_pf(barrier_data->amcbarrier_response_flags[phase] & GASNET_BARRIERFLAG_MISMATCH) { retval = GASNET_ERR_BARRIER_MISMATCH; } else if_pf(/* try/wait value must match consensus value, if both are present */ !((flags|barrier_data->amcbarrier_response_flags[phase]) & GASNET_BARRIERFLAG_ANONYMOUS) && (id != barrier_data->amcbarrier_response_value[phase])) { retval = GASNET_ERR_BARRIER_MISMATCH; } /* update state */ barrier_data->amcbarrier_response_done[phase] = 0; gasneti_sync_writes(); /* ensure all state changes committed before return */ return retval; } static int gasnete_amcbarrier_try(gasnete_coll_team_t team, int id, int flags) { gasnete_coll_amcbarrier_t *barrier_data = team->barrier_data; gasneti_sync_reads(); /* ensure we read up-to-date phase, etc */ GASNETE_SPLITSTATE_TRY(team); GASNETI_SAFE(gasneti_AMPoll()); gasnete_amcbarrier_kick(team); if (barrier_data->amcbarrier_response_done[barrier_data->amcbarrier_phase]) return gasnete_amcbarrier_wait(team, id, flags); else return GASNET_ERR_NOT_READY; } static int gasnete_amcbarrier_result(gasnete_coll_team_t team, int *id) { gasneti_sync_reads(); /* ensure we read up-to-date values */ GASNETE_SPLITSTATE_RESULT(team); { const gasnete_coll_amcbarrier_t * const barrier_data = team->barrier_data; const int phase = barrier_data->amcbarrier_phase; *id = barrier_data->amcbarrier_response_value[phase]; return (GASNET_BARRIERFLAG_ANONYMOUS & barrier_data->amcbarrier_response_flags[phase]); } } void gasnete_amcbarrier_kick_team_all(void) { gasnete_amcbarrier_kick(GASNET_TEAM_ALL); } static void gasnete_amcbarrier_fini(gasnete_coll_team_t team) { gasneti_free(team->barrier_data); } static void gasnete_amcbarrier_init(gasnete_coll_team_t team) { gasnete_coll_amcbarrier_t *barrier_data = gasneti_calloc(1,sizeof(gasnete_coll_amcbarrier_t)); int total_ranks = team->total_ranks; #if GASNET_NDEBUG if ((team == GASNET_TEAM_ALL) & !gasneti_mynode) { gasneti_console_message("WARNING", "Using non-scalable AMCENTRAL barrier (intended only for debugging)."); } #endif gasneti_leak(barrier_data); gex_HSL_Init(&barrier_data->amcbarrier_lock); barrier_data->amcbarrier_consensus_flags[0] = GASNET_BARRIERFLAG_ANONYMOUS; barrier_data->amcbarrier_consensus_flags[1] = GASNET_BARRIERFLAG_ANONYMOUS; barrier_data->amcbarrier_max = total_ranks; // Choice of leader is arbitrary (as long as all agree), but 0 is the most natural choice barrier_data->amcbarrier_leader = 0; team->barrier_data = barrier_data; team->barrier_notify = &gasnete_amcbarrier_notify; team->barrier_wait = &gasnete_amcbarrier_wait; team->barrier_try = &gasnete_amcbarrier_try; team->barrier_result = &gasnete_amcbarrier_result; team->barrier_fini = &gasnete_amcbarrier_fini; team->barrier_pf = ((team == GASNET_TEAM_ALL) && (total_ranks > 1)) ? &gasnete_amcbarrier_kick_team_all : NULL; } #define GASNETE_AMCBARRIER_HANDLERS() \ gasneti_handler_tableentry_no_bits(gasnete_amcbarrier_notify_reqh,4,REQUEST,SHORT,0), \ gasneti_handler_tableentry_no_bits(gasnete_amcbarrier_done_reqh,4,REQUEST,SHORT,0) /* ------------------------------------------------------------------------------------ */ /* Generic layer called by both gasnet_coll_ and gasnet_ barrier APIs * These dispatch via function pointer(s) in the team structure */ GASNETI_INLINE(gasnete_barrier_notify_common) void gasnete_barrier_notify_common(gasnete_coll_team_t team, int id, int flags) { gasneti_assert(team->barrier_notify); (*team->barrier_notify)(team, id, flags); } GASNETI_INLINE(gasnete_barrier_try_common) int gasnete_barrier_try_common(gasnete_coll_team_t team, int id, int flags) { gasneti_assert(team->barrier_try); return (*team->barrier_try)(team, id, flags); } GASNETI_INLINE(gasnete_barrier_wait_common) int gasnete_barrier_wait_common(gasnete_coll_team_t team, int id, int flags) { gasneti_assert(team->barrier_wait); return (*team->barrier_wait)(team, id, flags); } GASNETI_INLINE(gasnete_barrier_common) int gasnete_barrier_common(gasnete_coll_team_t team, int id, int flags) { gasneti_assert(team->barrier); return (*team->barrier)(team, id, flags); } GASNETI_INLINE(gasnete_barrier_result_common) int gasnete_barrier_result_common(gasnete_coll_team_t team, int *id) { gasneti_assert(team->barrier_result); gasneti_assert(id); return (*team->barrier_result)(team, id); } /* ------------------------------------------------------------------------------------ */ /* gasnete_coll_barrier* layer which calls the generic layer, above. * These check flags before calling the generic layer. */ void gasnete_coll_barrier_notify(gasnete_coll_team_t team, int id, int flags GASNETI_THREAD_FARG) { gasneti_assert(flags == (flags & GASNETE_BARRIERFLAGS_CLIENT_COLL)); gasnete_barrier_notify_common(team, id, flags); } int gasnete_coll_barrier_try(gasnete_coll_team_t team, int id, int flags GASNETI_THREAD_FARG) { gasneti_assert(flags == (flags & GASNETE_BARRIERFLAGS_CLIENT_COLL)); return gasnete_barrier_try_common(team, id, flags); } int gasnete_coll_barrier_wait(gasnete_coll_team_t team, int id, int flags GASNETI_THREAD_FARG) { gasneti_assert(flags == (flags & GASNETE_BARRIERFLAGS_CLIENT_COLL)); return gasnete_barrier_wait_common(team, id, flags); } int gasnete_coll_barrier(gasnete_coll_team_t team, int id, int flags GASNETI_THREAD_FARG) { gasneti_assert(flags == (flags & GASNETE_BARRIERFLAGS_CLIENT_COLL)); return gasnete_barrier_common(team, id, flags); } int gasnete_coll_barrier_result(gasnete_coll_team_t team, int *id GASNETI_THREAD_FARG) { return gasnete_barrier_result_common(team, id); } /* ------------------------------------------------------------------------------------ */ /* gasnet_barrier* layer which calls the generic layer, above. * Handles passing TEAM_ALL to the generic layer. * Include tracing not (yet?) present in the teams-oriented gasnete_coll_barrier* API */ void gasnet_barrier_notify(int id, int flags) { GASNETI_TRACE_PRINTF(B, ("BARRIER_NOTIFY(team=GASNET_TEAM_ALL,id=%i,flags=%i)", id, flags)); GASNETI_CHECK_INJECT(); #if GASNETI_STATS_OR_TRACE gasnete_barrier_notifytime = GASNETI_TICKS_NOW_IFENABLED(B); #endif gasneti_assert(GASNET_TEAM_ALL->barrier_notify); gasneti_assert(flags == (flags & GASNETE_BARRIERFLAGS_CLIENT_ALL)); gasnete_barrier_notify_common(GASNET_TEAM_ALL, id, flags); } int gasnet_barrier_wait(int id, int flags) { #if GASNETI_STATS_OR_TRACE gasneti_tick_t wait_start = GASNETI_TICKS_NOW_IFENABLED(B); #endif int retval; GASNETI_TRACE_EVENT_TIME(B,BARRIER_NOTIFYWAIT,GASNETI_TICKS_NOW_IFENABLED(B)-gasnete_barrier_notifytime); GASNETI_CHECK_INJECT(); gasneti_assert(GASNET_TEAM_ALL->barrier_wait); gasneti_assert(flags == (flags & GASNETE_BARRIERFLAGS_CLIENT_ALL)); retval = gasnete_barrier_wait_common(GASNET_TEAM_ALL, id, flags); GASNETI_TRACE_EVENT_TIME(B,BARRIER_WAIT,GASNETI_TICKS_NOW_IFENABLED(B)-wait_start); return retval; } int gasnet_barrier_try(int id, int flags) { GASNETI_CHECK_INJECT(); int retval; gasneti_assert(GASNET_TEAM_ALL->barrier_try); gasneti_assert(flags == (flags & GASNETE_BARRIERFLAGS_CLIENT_ALL)); retval = gasnete_barrier_try_common(GASNET_TEAM_ALL, id, flags); GASNETI_TRACE_EVENT_VAL(B,BARRIER_TRY,(retval != GASNET_ERR_NOT_READY)); return retval; } int gasnet_barrier(int id, int flags) { GASNETI_TRACE_PRINTF(B, ("BARRIER(team=GASNET_TEAM_ALL,id=%i,flags=%i)", id, flags)); GASNETI_CHECK_INJECT(); gasneti_assert(GASNET_TEAM_ALL->barrier); gasneti_assert(flags == (flags & GASNETE_BARRIERFLAGS_CLIENT_ALL)); return gasnete_barrier_common(GASNET_TEAM_ALL, id, flags); } int gasnet_barrier_result(int *id) { gasneti_assert(GASNET_TEAM_ALL->barrier_result); return gasnete_barrier_result_common(GASNET_TEAM_ALL, id); } /* ------------------------------------------------------------------------------------ */ /* Helpers for possible reuse as the team->barrier* function pointers */ /* This is for use by conduits that don't have a conforming version */ static int gasnete_barrier_result_default(gasnete_coll_team_t team, int *id) { /* Pretend all barriers are anonymous if no _result is implemented */ return 1; } /* This is for use by conduits that don't have a specialized version */ int gasnete_barrier_default(gasnete_coll_team_t team, int id, int flags) { #if GASNETI_STATS_OR_TRACE gasneti_tick_t barrier_start = GASNETI_TICKS_NOW_IFENABLED(B); #endif int retval; GASNETE_SPLITSTATE_BARRIER(team); gasneti_assert(team->barrier_notify); (*team->barrier_notify)(team, id, flags); gasneti_assert(team->barrier_wait); retval = (*team->barrier_wait)(team, id, flags); GASNETI_TRACE_EVENT_TIME(B,BARRIER,GASNETI_TICKS_NOW_IFENABLED(B)-barrier_start); return retval; } /* ------------------------------------------------------------------------------------ */ /* Initialization and barrier mechanism selection */ static gasnete_coll_barrier_type_t gasnete_coll_default_barrier_type=GASNETE_COLL_BARRIER_ENVDEFAULT; extern void gasnete_coll_barrier_init(gasnete_coll_team_t team, int barrier_type_in) { gasnete_coll_barrier_type_t barrier_type= (gasnete_coll_barrier_type_t) barrier_type_in; static int envdefault_set = 0; if(!envdefault_set) { /* fetch user barrier selection */ const char *selection = gasneti_getenv_withdefault("GASNET_BARRIER",GASNETE_BARRIER_DEFAULT); char options[255]; options[0] = '\0'; #define GASNETE_ISBARRIER(namestr) \ ((options[0]?strcat(options, ", "),(void)0:(void)0),strcat(options, namestr), \ !gasneti_strcasecmp(selection, namestr)) if(GASNETE_ISBARRIER("DISSEM")) gasnete_coll_default_barrier_type = GASNETE_COLL_BARRIER_DISSEM; else if(GASNETE_ISBARRIER("AMDISSEM")) gasnete_coll_default_barrier_type = GASNETE_COLL_BARRIER_AMDISSEM; else if(GASNETE_ISBARRIER("RDMADISSEM")) gasnete_coll_default_barrier_type = GASNETE_COLL_BARRIER_RDMADISSEM; else if(GASNETE_ISBARRIER("AMCENTRAL")) gasnete_coll_default_barrier_type = GASNETE_COLL_BARRIER_AMCENTRAL; #ifdef GASNETE_BARRIER_READENV else { GASNETE_BARRIER_READENV(); } #endif if(gasnete_coll_default_barrier_type==0) { gasneti_fatalerror("GASNET_BARRIER=%s is not a recognized barrier mechanism. " "Available mechanisms are: %s", selection, options); } } if(barrier_type == 0) barrier_type = gasnete_coll_default_barrier_type; #ifndef GASNETE_BARRIER_INIT /* conduit plugin to select a barrier - should use GASNETE_ISBARRIER("whatever") to check if enabled, and then set the barrier function pointers */ #define GASNETE_BARRIER_INIT(team, barrier_type) ((void)0) #endif /*reset the barrier types*/ team->barrier_data = NULL; team->barrier_notify = NULL; team->barrier_wait = NULL; team->barrier_try = NULL; team->barrier = &gasnete_barrier_default; team->barrier_result = NULL; GASNETE_SPLITSTATE_LEAVE(team); GASNETE_BARRIER_INIT(team, barrier_type); if (team->barrier_notify) { /* conduit has identified a barrier mechanism */ /*make sure that wait and try were also defined*/ gasneti_assert(team->barrier_wait && team->barrier_try); return; } else if (barrier_type == GASNETE_COLL_BARRIER_AMCENTRAL) { /*we explicitly specify that we want an AM CENTRAL Barrier*/ gasnete_amcbarrier_init(team); } else if (barrier_type == GASNETE_COLL_BARRIER_AMDISSEM) { /*we explicitly specify that we want an AM DISSEM Barrier*/ gasnete_amdbarrier_init(team); } else if ((barrier_type == GASNETE_COLL_BARRIER_RDMADISSEM) && (team == GASNET_TEAM_ALL)) { /* TODO: Currently only support TEAM_ALL due to static allocation of in-segment space. However SEGMENT_EVERYTHING offers the option to use regular heap memory. Additionally, if TEAM_ALL doesn't require the entire block of space then one could imaging allocating space from it for some number of teams. */ /*we explicitly specify that we want an RDMA DISSEM Barrier*/ gasnete_rmdbarrier_init(team); } else if (barrier_type == GASNETE_COLL_BARRIER_DISSEM) { /*we specify that we want to auto-select either AMDISSEM or RDMADISSEM Barrier*/ #if !GASNETE_USING_REF_EXTENDED_PUT if (team == GASNET_TEAM_ALL) { gasnete_rmdbarrier_init(team); } else #endif { gasnete_amdbarrier_init(team); } } else { /* fallback to AM DISSEM */ gasnete_amdbarrier_init(team); } } void gasnete_barrier_init(void) { gasnete_coll_team_t team; int i; /* Partially initialize GASNET_TEAM_ALL to avoid circular dependency */ team = (gasnete_coll_team_t) gasneti_calloc(1,sizeof(struct gasnete_coll_team_t_)); gasneti_leak(team); team->team_id = 0; team->myrank = gasneti_mynode; team->total_ranks = gasneti_nodes; if (gasneti_nodes > 1) { unsigned int count = 0; for (i=1; ipeers.num = count; team->peers.fwd = gasneti_malloc(sizeof(gex_Rank_t) * count * 2); gasneti_leak(team->peers.fwd); team->peers.bwd = team->peers.fwd + count; for (i=0; ipeers.fwd[i] = (gasneti_mynode + dist) % gasneti_nodes; team->peers.bwd[i] = (gasneti_mynode + gasneti_nodes - dist) % gasneti_nodes; } } #if GASNET_PSHM if (gasneti_nodemap_global_count > 1) { unsigned int count = 0; for (i=1; isupernode_peers.num = count; team->supernode_peers.fwd = gasneti_malloc(sizeof(gex_Rank_t) * count); gasneti_leak(team->supernode_peers.fwd); for (i=0; isupernode_peers.fwd[i] = gasneti_pshm_firsts[peer]; } } team->supernode.node_count = gasneti_mysupernode.node_count; team->supernode.node_rank = gasneti_mysupernode.node_rank; team->supernode.grp_count = gasneti_mysupernode.grp_count; team->supernode.grp_rank = gasneti_mysupernode.grp_rank; #endif GASNET_TEAM_ALL = team; gasnete_coll_barrier_init(team, 0); } /* ------------------------------------------------------------------------------------ */ #define GASNETE_REFBARRIER_HANDLERS() \ GASNETE_AMDBARRIER_HANDLERS(), \ GASNETE_AMCBARRIER_HANDLERS() /* ------------------------------------------------------------------------------------ */ /* AuxSeg setup for RDMA-dissem space */ /* Should modify to allocate for other barriers as required */ /* worst case assumption is lg(2^32 peers) * (4 phases) */ gasneti_auxseg_request_t gasnete_barr_auxseg_alloc(gasnet_seginfo_t *auxseg_info) { const char *barrier = gasneti_getenv_withdefault("GASNET_BARRIER",GASNETE_BARRIER_DEFAULT); const size_t max_steps = 32; size_t rmdbarrier_request = max_steps * GASNETE_RMD_PHASES * GASNETE_RDMABARRIER_INBOX_SZ; gasneti_auxseg_request_t retval; retval.minsz = rmdbarrier_request; retval.optimalsz = rmdbarrier_request; if (!strcmp(barrier, "RDMADISSEM")) { /* Nothing else to do */ } else #if !GASNETE_USING_REF_EXTENDED_PUT if (!strcmp(barrier, "DISSEM")) { /* Nothing else to do */ } else #endif #ifdef GASNETE_CONDUIT_RDMABARRIER if (GASNETE_CONDUIT_RDMABARRIER(barrier, &retval)) { /* Nothing else to do */ } else #endif { retval.minsz = 0; retval.optimalsz = 0; } if (auxseg_info == NULL){ return retval; /* initial query */ } else if (auxseg_info[0].size) { /* auxseg granted */ gasneti_assert(!gasnete_rdmabarrier_auxseg); gasnete_rdmabarrier_auxseg = gasneti_malloc(gasneti_nodes*sizeof(gasnet_seginfo_t)); memcpy(gasnete_rdmabarrier_auxseg, auxseg_info, gasneti_nodes*sizeof(gasnet_seginfo_t)); } return retval; } gasnet-2025.8.0/extended-ref/coll/0000775000175000017500000000000015142313673016725 5ustar alastairalastairgasnet-2025.8.0/extended-ref/coll/gasnet_team.h0000664000175000017500000000743415142313673021375 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_team.h $ * Description: GASNet team data structure * Copyright 2009, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef GASNET_TEAM_H_ #define GASNET_TEAM_H_ #include #include #define TEAM_DIR_SIZE 1021 /* extern gasnete_hashtable_t *team_dir; */ #define TEAM_ROOT(team_id) (((team_id)>>12) & 0xfffff) /* high 20 bits for root node id */ #define TEAM_SEQ(team_id) ((team_id) & 0xfff) /* low 12 bits for team sequence */ void gasnete_coll_team_init(gasnet_team_handle_t team, size_t scratch_size, gex_Addr_t *scratch_addrs, gex_Flags_t flags GASNETI_THREAD_FARG); void gasnete_coll_team_fini(gasnet_team_handle_t team); // "consumes" rank_map gasnet_team_handle_t gasnete_coll_team_create( gasnet_team_handle_t parent, uint32_t total_ranks, gex_Rank_t myrank, gex_Rank_t *rank_map, size_t scratch_size, gex_Addr_t *scratch_addrs, gex_Flags_t flags GASNETI_THREAD_FARG); int gasnete_coll_team_free(gasnet_team_handle_t team, gex_Memvec_t *scratch_p); gasnet_team_handle_t gasnete_coll_team_lookup(uint32_t team_id); gasnet_team_handle_t gasnete_coll_team_split(gasnet_team_handle_t parent, int mycolor, int myrelrank, size_t scratch_size, gex_Addr_t scratch_addr, gex_Flags_t flags GASNETI_THREAD_FARG); void gasnete_print_team(gasnet_team_handle_t team, FILE *fp); // Collectives over a subset of a parent team. // Used in team construction, such as Split void gasnete_subteam_Init( gasnete_coll_team_t parent, gasnete_coll_team_t child GASNETI_THREAD_FARG); void gasnete_subteam_Fini( gasnete_coll_team_t child, int do_sync GASNETI_THREAD_FARG); void gasnete_subteam_Barrier( gasnete_coll_team_t child GASNETI_THREAD_FARG); void gasnete_subteam_Exchange( // a.k.a "AllGather" gasnete_coll_team_t child, void *src, size_t elemsz, void *dst GASNETI_THREAD_FARG); void gasnete_subteam_Broadcast( // root fixed at 0 and "in-place" root (thus single ptr) gasnete_coll_team_t child, void *ptr, size_t elemsz GASNETI_THREAD_FARG); void gasnete_subteam_ID( gasnete_coll_team_t child GASNETI_THREAD_FARG); /* redefine gasnete_coll_team_lookup in gasnet_coll_team.c */ #define GASNETE_COLL_TEAMS_OVERRIDE gasnet_team_handle_t gasnete_coll_team_lookup(uint32_t team_id); #define GASNETE_PRINT_ARRAY(fp, A, size, format)\ do { \ int i; \ for(i=0; i<(size); i++) \ { \ fprintf((fp), "%s[%d]=", #A, i); \ fprintf((fp), format, (A)[i]); \ fprintf((fp), " "); \ } \ fprintf((fp), "\n"); \ } while(0); #endif /* GASNET_TEAM_H_ */ gasnet-2025.8.0/extended-ref/coll/gasnet_trees.h0000664000175000017500000001775215142313673021575 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_trees.h $ * Description: Reference implemetation of GASNet Collectives team * Copyright 2009, Rajesh Nishtala , Paul H. Hargrove , Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_TREES_H #define _GASNET_TREES_H 1 #if 0 #include #include #endif #define GASNETE_COLL_DEFAULT_FANOUT 2 #define GASNETE_COLL_DEFAULT_RADIX 2 /*first four are more "traditional" */ typedef enum {GASNETE_COLL_FLAT_TREE=0, GASNETE_COLL_KNOMIAL_TREE, GASNETE_COLL_NARY_TREE, /*insert PLATFORM INDEPENDANT Tree classes here*/ /*the most generic searcher will go through these classes first*/ GASNETE_COLL_NUM_PLATFORM_INDEP_TREE_CLASSES, /*insert more specialized trees here*/ GASNETE_COLL_RECURSIVE_TREE, GASNETE_COLL_FORK_TREE, GASNETE_COLL_HIERARCHICAL_TREE, GASNETE_COLL_NUM_TREE_CLASSES_TOTAL} gasnete_coll_tree_class_t; #define GASNETE_COLL_NUM_TREE_CLASSES (GASNETE_COLL_NUM_TREE_CLASSES_TOTAL - 1) typedef enum { GASNETE_COLL_TREE_RADIX, GASNETE_COLL_TREE_DIMS } gasnete_coll_tree_tuning_param_type_t; struct gasnete_coll_tree_type_t_ { gasnete_coll_tree_class_t tree_class; int *params; int num_params; struct gasnete_coll_tree_type_t_ *subtree; }; /*returns 1 if they are equal or 0 otherwise*/ int gasnete_coll_compare_tree_types(gasnete_coll_tree_type_t a, gasnete_coll_tree_type_t b); #define GASNETE_COLL_MAX_TREE_TYPE_STRLEN 100 gasnete_coll_tree_type_t gasnete_coll_make_tree_type_str(const char *tree_name_str); gasnete_coll_tree_type_t gasnete_coll_make_tree_type(int tree_type, int *params, int num_params); char* gasnete_coll_tree_type_to_str(char *buffer, gasnete_coll_tree_type_t tree_type); extern gasnete_coll_tree_type_t gasnetc_tm_reduce_tree_type; /*ACCESSOR MACROS (all take a gasnete_coll_local_tree_geom_t)*/ #define GASNETE_COLL_TREE_GEOM_ROOT(GEOM) ((GEOM)->root) #define GASNETE_COLL_TREE_GEOM_PARENT(GEOM) ((GEOM)->parent) #define GASNETE_COLL_TREE_GEOM_CHILD_COUNT(GEOM) ((GEOM)->child_count) #define GASNETE_COLL_TREE_GEOM_CHILDREN(GEOM) ((GEOM)->child_list) #define GASNETE_COLL_TREE_GEOM_SIBLING_ID(GEOM) ((GEOM)->sibling_id) #define GASNETE_COLL_TREE_GEOM_KIND(GEOM) ((GEOM)->kind) #define GASNETE_COLL_TREE_GEOM_FANOUT(GEOM) ((GEOM)->fanout) /* a local view of the tree goemetry */ struct gasnete_coll_local_tree_geom_t_ { int allocated; /** tree geometry**/ gex_Rank_t root; gasnete_coll_tree_type_t tree_type; gex_Rank_t total_size; /*total number of nodes of this geometry*/ gex_Rank_t parent; /*parent of this node*/ gex_Rank_t child_count; /*number of children*/ gex_Rank_t *child_list; /*list of children*/ gex_Rank_t *subtree_sizes; /* the size of the subtrees under each of our children */ gex_Rank_t *child_offset; gex_Rank_t mysubtree_size; uint8_t children_reversed; // non-zero -> visit children in reverse order for in-order DFS gex_Rank_t parent_subtree_size; /* size of the subtree under our parent*/ gex_Rank_t max_radix; // largest out-degree of any node /** sibling information**/ gex_Rank_t num_siblings; gex_Rank_t sibling_id; /*my sibling number*/ /* if the subtree of the parent of this node were to be listed linearly in DFS order, this number indicates the position in the parent's list where this node's subtree starts */ gex_Rank_t sibling_offset; /*in order to reorder the array this indidcates where the data needs to be reordered*/ int *rotation_points; int num_rotations; /*number of children that aren't leaves of the tree*/ gex_Rank_t num_non_leaf_children; /*number of children that are leaves of the tree*/ gex_Rank_t num_leaf_children; gex_Rank_t *dissem_order; int dissem_count; #if 0 /* Not using the reference counts for now */ gasneti_weakatomic_t ref_count; gasnete_coll_tree_geom_t *base_geom; /* pointer to the tree geometry base */ #endif } ; /*for now i will only assume that one gasnet thread will be involved in the tree communication and thus assume no locks are needed since only one given thread in a node will ever access the tree*/ struct gasnete_coll_tree_geom_t_ { /* linked list pointers used in the caching of tree geometries */ gasnete_coll_tree_geom_t *next; gasnete_coll_tree_geom_t *prev; /* gasneti_weakatomic_t ref_count; */ /*an array of local views that represents the global view*/ gasnete_coll_local_tree_geom_t **local_views; int local_views_allocated; /*** tree structure metadata*****/ gasnete_coll_tree_type_t tree_type; /* don't need a root argument here since local_views[i] gives a tree rooted at i*/ gasnete_coll_team_t *team; /*a pointer back to the associated team*/ }; /* build a full tree with the tree type root and fanout the fanout is only applicable for nary trees This routine first checks the cache for the object If the tree type fanout pair exists look in the localviews array and return the appropriate pointer Else if none of the local views are alloc create exactly one geometry at local_views[root] else create them all (implementation note ... we might change this so that we allocate all the local views) (we might need to construct the intermediary views as we run the DFS for some of hte trees so (may as well save the time and do it at one shot) */ gasnete_coll_local_tree_geom_t *gasnete_coll_local_tree_geom_fetch(gasnete_coll_tree_type_t type, gex_Rank_t root, gasnete_coll_team_t team); void gasnete_coll_local_tree_geom_release(gasnete_coll_local_tree_geom_t *geom); void gasnete_coll_local_tree_geom_purge(gasnete_coll_team_t team); gasnete_coll_tree_type_t gasnete_coll_get_tree_type(void); void gasnete_coll_free_tree_type(gasnete_coll_tree_type_t in); char* gasnete_coll_tree_type_to_str(char *outbuf, gasnete_coll_tree_type_t in); /******** Dissemination Ordering **********/ #define GASNETE_COLL_DISSEM_GET_TOTAL_PHASES(DISSEM_INFO) ((DISSEM_INFO)->dissemination_phases) #define GASNETE_COLL_DISSEM_GET_RADIX(DISSEM_INFO) ((DISSEM_INFO)->dissemination_radix) #define GASNETE_COLL_DISSEM_MAX_BLOCKS(DISSEM_INFO) ((DISSEM_INFO)->max_dissem_blocks) #define GASNETE_COLL_DISSEM_NBLOCKS(DISSEM_INFO) ((DISSEM_INFO)->n_blocks) #define GASNETE_COLL_DISSEM_GET_FRONT_PEERS(DISSEM_INFO) ((DISSEM_INFO)->exchange_out_order) #define GASNETE_COLL_DISSEM_GET_BEHIND_PEERS(DISSEM_INFO) ((DISSEM_INFO)->exchange_in_order) #define GASNETE_COLL_DISSEM_GET_PEER_COUNT(DISSEM_INFO) ((DISSEM_INFO)->ptr_vec[(DISSEM_INFO)->dissemination_phases]) #define GASNETE_COLL_DISSEM_GET_FRONT_PEERS_PHASE(DISSEM_INFO, PHASE) ((DISSEM_INFO)->exchange_out_order+(DISSEM_INFO)->ptr_vec[(PHASE)]) #define GASNETE_COLL_DISSEM_GET_BEHIND_PEERS_PHASE(DISSEM_INFO, PHASE) ((DISSEM_INFO)->exchange_in_order+(DISSEM_INFO)->ptr_vec[(PHASE)]) #define GASNETE_COLL_DISSEM_GET_PEER_COUNT_PHASE(DISSEM_INFO, PHASE) ((DISSEM_INFO)->ptr_vec[(PHASE)+1]-(DISSEM_INFO)->ptr_vec[(PHASE)]) struct gasnete_coll_dissem_info_t_ { gasnete_coll_dissem_info_t *prev; gasnete_coll_dissem_info_t *next; gex_Rank_t *exchange_out_order; gex_Rank_t *exchange_in_order; gex_Rank_t *ptr_vec; int dissemination_phases; /*log_radix(THREADS)*/ int dissemination_radix; int max_dissem_blocks; /*an array that holds the number of blocks we send in each phase of the dissemination all to all. Used to capture when nblocks is 1 to avoid copies*/ int *n_blocks; /*whether this dissem obj is designed to run the all_reduce*/ /*only true when power of two proc count AND radix is 2*/ int all_reduce_ok; }; gasnete_coll_dissem_info_t *gasnete_coll_fetch_dissemination(int radix, gasnete_coll_team_t team); void gasnete_coll_release_dissemination(gasnete_coll_dissem_info_t* obj, gasnete_coll_team_t team); void gasnete_coll_purge_dissemination(gasnete_coll_team_t team); /*****************************************/ #endif gasnet-2025.8.0/extended-ref/coll/gasnet_refcoll.h0000664000175000017500000000544315142313673022073 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_refcoll.h $ * Description: GASNet Collectives conduit header * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_EXTENDED_REFCOLL_H #define _GASNET_EXTENDED_REFCOLL_H /*---------------------------------------------------------------------------------*/ /* *** Parameters *** */ /*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/ /* *** Handlers *** */ /*---------------------------------------------------------------------------------*/ #ifndef GASNETE_COLL_P2P_OVERRIDE MEDIUM_HANDLER_DECL(gasnete_coll_p2p_memcpy_reqh,4,5); SHORT_HANDLER_NOBITS_DECL(gasnete_coll_p2p_short_reqh, 5); MEDIUM_HANDLER_NOBITS_DECL(gasnete_coll_p2p_med_reqh,6); MEDIUM_HANDLER_NOBITS_DECL(gasnete_coll_p2p_med_counting_reqh,5); LONG_HANDLER_NOBITS_DECL(gasnete_coll_p2p_long_reqh,5); MEDIUM_HANDLER_NOBITS_DECL(gasnete_coll_p2p_med_tree_reqh,2); SHORT_HANDLER_NOBITS_DECL(gasnete_coll_p2p_advance_reqh,3); LONG_HANDLER_NOBITS_DECL(gasnete_coll_p2p_put_and_advance_reqh,3); MEDIUM_HANDLER_NOBITS_DECL(gasnete_coll_p2p_med_tree_reqh,2); #define GASNETE_COLL_P2P_HANDLERS() \ gasneti_handler_tableentry_with_bits(gasnete_coll_p2p_memcpy_reqh,4,5,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_no_bits(gasnete_coll_p2p_short_reqh,5,REQUEST,SHORT,0), \ gasneti_handler_tableentry_no_bits(gasnete_coll_p2p_med_reqh,6,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_no_bits(gasnete_coll_p2p_long_reqh,5,REQUEST,LONG,0), \ gasneti_handler_tableentry_no_bits(gasnete_coll_p2p_med_tree_reqh,2,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_no_bits(gasnete_coll_p2p_advance_reqh,3,REQUEST,SHORT,0), \ gasneti_handler_tableentry_no_bits(gasnete_coll_p2p_put_and_advance_reqh,3,REQUEST,LONG,0), \ gasneti_handler_tableentry_no_bits(gasnete_coll_p2p_med_counting_reqh,5,REQUEST,MEDIUM,0), #elif !defined(GASNETE_COLL_P2P_HANDLERS) #define GASNETE_COLL_P2P_HANDLERS() #endif #ifndef GASNETE_COLL_SCRATCH_OVERRIDE SHORT_HANDLER_NOBITS_DECL(gasnete_coll_scratch_update_reqh, 2); #define GASNETE_COLL_SCRATCH_HANDLERS() gasneti_handler_tableentry_no_bits(gasnete_coll_scratch_update_reqh,2,REQUEST,SHORT,0), #endif MEDIUM_HANDLER_NOBITS_DECL(gasnete_subteam_op_reqh,4); MEDIUM_HANDLER_NOBITS_DECL(gasnete_rexchgv_reqh,4); #define GASNETE_REFCOLL_HANDLERS() \ GASNETE_COLL_P2P_HANDLERS() GASNETE_COLL_SCRATCH_HANDLERS() \ gasneti_handler_tableentry_no_bits(gasnete_subteam_op_reqh,4,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_no_bits(gasnete_rexchgv_reqh,4,REQUEST,MEDIUM,0), #endif gasnet-2025.8.0/extended-ref/coll/gasnet_coll_internal.h0000664000175000017500000017241615142313673023277 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_coll_internal.h $ * Description: GASNet Collectives conduit header * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_COLL_INTERNAL_H #define _GASNET_COLL_INTERNAL_H #define GASNETI_NEED_GASNET_COLL_H 1 #define GASNETI_NEED_GASNET_VIS_H 1 #include #ifdef GASNETE_COLL_NEEDS_CORE #include #endif #include // Upon implementing GASNETI_MEMCPY() (with assertions), it was discovered // that the collectives have been using GASNETE_FAST_UNALIGNED_MEMCPY() in // at least some places where GASNETI_MEMCPY_SAFE_IDENTICAL() should // have been used instead (to allow for src == dst for in-place collectives). // // TODO: audit/update the individual calls to GASNETE_FAST_UNALIGNED_MEMCPY #undef GASNETE_FAST_UNALIGNED_MEMCPY #define GASNETE_FAST_UNALIGNED_MEMCPY GASNETI_MEMCPY_SAFE_IDENTICAL #define GASNETI_COLL_FN_HEADER(FNNAME) /*---------------------------------------------------------------------------------*/ /* *** Macros and Constants *** */ /*---------------------------------------------------------------------------------*/ #define GASNETE_COLL_SUBORDINATE (1<<30) #define GASNETE_COLL_USE_SCRATCH (1<<28) #define GASNETE_COLL_USE_SCRATCH_TREE (1<<27) #define GASNETE_COLL_USE_SCRATCH_DISSSEM (1<<26) #define GASNETE_COLL_USE_TREE (1<<25) #define GASNETE_COLL_NONROOT_SUBORDINATE (1<<24) #define GASNETE_COLL_SKIP (1<<23) #define GASNETE_COLL_IN_MODE(flags) \ ((flags) & (GASNET_COLL_IN_NOSYNC | GASNET_COLL_IN_MYSYNC | GASNET_COLL_IN_ALLSYNC)) #define GASNETE_COLL_OUT_MODE(flags) \ ((flags) & (GASNET_COLL_OUT_NOSYNC | GASNET_COLL_OUT_MYSYNC | GASNET_COLL_OUT_ALLSYNC)) #define GASNETE_COLL_SYNC_MODE(flags) \ ((flags) & (GASNET_COLL_OUT_NOSYNC | GASNET_COLL_OUT_MYSYNC | GASNET_COLL_OUT_ALLSYNC | \ GASNET_COLL_IN_NOSYNC | GASNET_COLL_IN_MYSYNC | GASNET_COLL_IN_ALLSYNC)) /* Internal flags */ #define GASNETE_COLL_OP_COMPLETE 0x1 #define GASNETE_COLL_OP_INACTIVE 0x2 /*---------------------------------------------------------------------------------*/ /* *** Handler Indices *** */ /*---------------------------------------------------------------------------------*/ /* conduits may override this to relocate the ref-coll handlers */ #ifndef GASNETE_COLL_HANDLER_BASE #define GASNETE_COLL_HANDLER_BASE 117 #endif #define _hidx_gasnete_coll_p2p_memcpy_reqh (GASNETE_COLL_HANDLER_BASE+0) #define _hidx_gasnete_coll_p2p_short_reqh (GASNETE_COLL_HANDLER_BASE+1) #define _hidx_gasnete_coll_p2p_med_reqh (GASNETE_COLL_HANDLER_BASE+2) #define _hidx_gasnete_coll_p2p_long_reqh (GASNETE_COLL_HANDLER_BASE+3) #define _hidx_gasnete_coll_p2p_med_tree_reqh (GASNETE_COLL_HANDLER_BASE+4) #define _hidx_gasnete_coll_p2p_advance_reqh (GASNETE_COLL_HANDLER_BASE+5) #define _hidx_gasnete_coll_p2p_put_and_advance_reqh (GASNETE_COLL_HANDLER_BASE+6) #define _hidx_gasnete_coll_p2p_med_counting_reqh (GASNETE_COLL_HANDLER_BASE+7) #define _hidx_gasnete_coll_scratch_update_reqh (GASNETE_COLL_HANDLER_BASE+8) #define _hidx_gasnete_subteam_op_reqh (GASNETE_COLL_HANDLER_BASE+9) #define _hidx_gasnete_rexchgv_reqh (GASNETE_COLL_HANDLER_BASE+10) /*---------------------------------------------------------------------------------*/ /* Forward type decls and typedefs: */ /*---------------------------------------------------------------------------------*/ struct gasnete_coll_op_t_; typedef struct gasnete_coll_op_t_ gasnete_coll_op_t; struct gasnete_coll_p2p_t_; typedef struct gasnete_coll_p2p_t_ gasnete_coll_p2p_t; union gasnete_coll_p2p_entry_t_; typedef union gasnete_coll_p2p_entry_t_ gasnete_coll_p2p_entry_t; struct gasnete_tm_p2p_send_struct; typedef struct gasnete_tm_p2p_send_struct gasnete_tm_p2p_send_struct_t; struct gasnete_coll_generic_data_t_; typedef struct gasnete_coll_generic_data_t_ gasnete_coll_generic_data_t; struct gasnete_coll_tree_type_t_; typedef struct gasnete_coll_tree_type_t_ *gasnete_coll_tree_type_t; struct gasnete_coll_local_tree_geom_t_; typedef struct gasnete_coll_local_tree_geom_t_ gasnete_coll_local_tree_geom_t; struct gasnete_coll_tree_geom_t_; typedef struct gasnete_coll_tree_geom_t_ gasnete_coll_tree_geom_t; struct gasnete_coll_dissem_vector_t_; typedef struct gasnete_coll_dissem_vector_t_ gasnete_coll_dissem_vector_t; struct gasnete_coll_dissem_info_t_; typedef struct gasnete_coll_dissem_info_t_ gasnete_coll_dissem_info_t; struct gasnete_coll_op_status_t_; typedef struct gasnete_coll_op_status_t_ gasnete_coll_op_status_t; struct gasnete_coll_scratch_status_t_; typedef struct gasnete_coll_scratch_status_t_ gasnete_coll_scratch_status_t; struct gasnete_coll_scratch_req_t_; typedef struct gasnete_coll_scratch_req_t_ gasnete_coll_scratch_req_t; struct gasnete_coll_autotune_info_t_; typedef struct gasnete_coll_autotune_info_t_ gasnete_coll_autotune_info_t; struct gasnete_coll_implementation_t_; typedef struct gasnete_coll_implementation_t_ *gasnete_coll_implementation_t; /*---------------------------------------------------------------------------------*/ extern size_t gasnete_coll_p2p_eager_min; extern size_t gasnete_coll_p2p_eager_scale; #ifndef GASNETE_COLL_IMAGE_OVERRIDE /* gasnet_image_t must be large enough to index all threads that participate * in collectives. A conduit may override this if a smaller type will suffice. * However, types larger than 32-bits won't pass as AM handler args. So, for * a larger type, many default things will require overrides. */ #define gasnete_coll_image_is_local(TEAM, I) ((TEAM)->myrank == (I)) #endif // gasnete_coll_eop_t is either an eop or linked-list thereof #ifndef GASNETE_COLL_HANDLE_OVERRIDE # if GASNET_PAR typedef struct gasnete_coll_eop_t_ { gasneti_eop_t *eop; struct gasnete_coll_eop_t_ *next; } *gasnete_coll_eop_t; # else typedef gasneti_eop_t *gasnete_coll_eop_t; # endif #endif extern gasnete_coll_eop_t gasnete_coll_eop_create(GASNETI_THREAD_FARG_ALONE); extern void gasnete_coll_eop_signal(gasnete_coll_eop_t eop GASNETI_THREAD_FARG); /** Need to insert this here so that trees.h picks up all the forward declaration of the structs*/ /** but also before the internal strucutres use the trees*/ #include /*---------------------------------------------------------------------------------*/ /* Operations of the active list */ extern void gasnete_coll_active_init(void); extern void gasnete_coll_active_fini(void); /*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/ #define GASNETE_COLL_MAX_SCRATCH_SIZE 0xffffffff #ifndef GASNETE_COLL_SCRATCH_SIZE /*set defult to 2 MB*/ #define GASNETE_COLL_SCRATCH_SIZE_DEFAULT (2*(1024*1024)) #endif #ifndef GASNETE_COLL_SCRATCH_SIZE_MIN // Default minimum recommendation #define GASNETE_COLL_SCRATCH_SIZE_MIN MIN(GASNETI_CACHE_LINE_BYTES, 64) #endif #if 0 #define GASNETE_COLL_MIN_LOC_SCRATCH_SIZE 256 #define GASNETE_COLL_MAX_LOC_SCRATCH_SIZE 0xffffffff #ifndef GASNETE_COLL_OPT_LOC_SCRATCH_SIZE /*set defult to 2 MB*/ #define GASNETE_COLL_OPT_LOC_SCRATCH_SIZE GASNETE_COLL_OPT_SCRATCH_SIZE_DEFAULT #endif #endif #define GASNETE_COLL_MAX_NUM_SEGS 2048 /*---------------------------------------------------------------------------------*/ /* Type for global synchronization */ #ifndef GASNETE_COLL_CONSENSUS_OVERRIDE /* Scalar type, could be a pointer to a struct */ typedef uint32_t gasnete_coll_consensus_t; #if 0 struct gasnete_coll_consensus_t_ { struct gasnete_coll_consensus_t_* next; /*linkage for free list*/ uint32_t id; gex_Event_t handle; /*handle for the nonblocking*/ }; typedef struct gasnete_coll_consensus_t_* gasnete_coll_consensus_t; #endif #endif extern gasnete_coll_consensus_t gasnete_coll_consensus_create(gasnete_coll_team_t team); extern void gasnete_coll_consensus_free(gasnete_coll_team_t team, gasnete_coll_consensus_t consensus); extern int gasnete_coll_consensus_try(gasnete_coll_team_t team, gasnete_coll_consensus_t id); extern int gasnete_coll_consensus_barrier(gasnete_coll_team_t team GASNETI_THREAD_FARG); /*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/ /*data structure to contain state for team barrier*/ #ifndef GASNETE_AMDBARRIER_MAXSTEP #define GASNETE_AMDBARRIER_MAXSTEP 32 #endif typedef void (*gasnete_all_barrier_notify)(gasnete_coll_team_t team, int id, int flags); typedef int (*gasnete_all_barrier_wait)(gasnete_coll_team_t team, int id, int flags); typedef int (*gasnete_all_barrier_try)(gasnete_coll_team_t team, int id, int flags); typedef int (*gasnete_all_barrier)(gasnete_coll_team_t team, int id, int flags); typedef int (*gasnete_all_barrier_result)(gasnete_coll_team_t team, int *id); typedef void (*gasnete_all_barrier_fini)(gasnete_coll_team_t team); typedef enum { GASNETE_COLL_BARRIER_ENVDEFAULT=0, GASNETE_COLL_BARRIER_DISSEM, GASNETE_COLL_BARRIER_AMDISSEM, GASNETE_COLL_BARRIER_RDMADISSEM, GASNETE_COLL_BARRIER_AMCENTRAL #ifdef GASNETE_COLL_CONDUIT_BARRIERS , GASNETE_COLL_CONDUIT_BARRIERS #endif } gasnete_coll_barrier_type_t; /* intialize the barriers for a given team */ extern void gasnete_coll_barrier_init(gasnete_coll_team_t _team, int _barrier_type); /* "peers" are sets of nodes at distances +/- powers of two, taken from some parent set */ typedef struct { unsigned int num; /* ceil(log_2(ranks)) */ gex_Rank_t *fwd; /* fwd[i] is global rank of member (myrank + 2^i) */ gex_Rank_t *bwd; /* bwd[i] is global rank of member (myrank - 2^i) */ } gasnete_coll_peer_list_t; /* Type for collective teams: */ struct gasnete_coll_team_t_ { /* read-only fields: */ uint32_t team_id; int global_team; gex_TM_t e_tm; /* tree geometry cache, each team should have its own cache .... */ gasnete_coll_tree_geom_t *tree_geom_cache_head; gasnete_coll_tree_geom_t *tree_geom_cache_tail; gasneti_mutex_t tree_geom_cache_lock; void *tree_construction_scratch; /*dissem geometry cache, each team should have its own ... */ gasnete_coll_dissem_info_t *dissem_cache_head; gasnete_coll_dissem_info_t *dissem_cache_tail; gasneti_mutex_t dissem_cache_lock; /*my relative node id in this team*/ gex_Rank_t myrank; /*total number of members in this team*/ gex_Rank_t total_ranks; /* ranks of the processes in the team */ gex_Rank_t *rel2act_map; /* need to be initialized */ /* nodes in the team at distances +/- powers of two */ gasnete_coll_peer_list_t peers; #if GASNET_PSHM /* Info about the supernode(s) */ struct { gex_Rank_t node_count; gex_Rank_t node_rank; gex_Rank_t grp_count; gex_Rank_t grp_rank; } supernode; /* supernode-reps in the team at distances +/- powers of two in supernode space */ gasnete_coll_peer_list_t supernode_peers; #endif /* scratch segments allocated on team creation*/ gasnet_seginfo_t *scratch_segs; // if non-NULL, storage of scratch as gasnet_seginfo_t void **scratch_addrs; // otherwise, storage of scratch as void* size_t scratch_size; // (symmetric) scratch size, indep of segs-v-addrs size_t symmetric_scratch_offset; // added to scratch_segs[*].addr or scratch_addrs void *myscratch; // local scratch address gex_Flags_t aux_seg_flag; // GASNETI_FLAG_PEER_SEG_AUX or 0 /*scratch space management*/ gasnete_coll_scratch_status_t* scratch_status; gasneti_lifo_head_t scratch_free_list; /*autotuning info*/ gasnete_coll_autotune_info_t* autotune_info; uint32_t sequence; /* arbitrary non-zero starting value */ // Count of collectives on NO_SCRATCH teams int no_scratch_count; #if GASNET_PAR && GASNET_DEBUG gasneti_mutex_t threads_mutex; #endif /*Stuff for sub-team creation*/ gasnete_coll_team_t early_parent; // non-NULL only during init steps struct { gasneti_weakatomic32_t team_id; volatile int phase; uint8_t *data[2]; gasneti_weakatomic32_t step_rcvd[2][32]; gex_HSL_t lock; // protects data[] } child; // TODO_EX: generalize for multi-EP /*Stuff for consensus*/ uint32_t consensus_issued_id; uint32_t consensus_id; /*Stuff for barrier*/ enum { OUTSIDE_BARRIER, INSIDE_BARRIER } barrier_splitstate; void *barrier_data; gasnete_all_barrier_notify barrier_notify; gasnete_all_barrier_try barrier_try; gasnete_all_barrier_wait barrier_wait; gasnete_all_barrier barrier; gasnete_all_barrier_result barrier_result; gasnete_all_barrier_fini barrier_fini; gasneti_progressfn_t barrier_pf; // Stuff for UnorderedExchangeV struct { uint8_t *data[2]; gasneti_weakatomic32_t rcvd[2][32]; gex_HSL_t lock; // protects data pointers int phase; } rexchgv; #if GASNET_DEBUG gasneti_mutex_t barrier_lock; #endif #ifndef GASNETE_COLL_P2P_OVERRIDE /* Default implementation of point-to-point syncs */ #ifndef GASNETE_COLL_P2P_TABLE_SIZE #define GASNETE_COLL_P2P_TABLE_SIZE 16 #endif gex_HSL_t p2p_lock; /* Protects freelist and table */ gasnete_coll_p2p_t *p2p_freelist; gasnete_coll_p2p_t *p2p_table[GASNETE_COLL_P2P_TABLE_SIZE]; // Size of p2p "data" (eager buffer) size_t p2p_eager_buffersz; #endif /* Hook for conduit-specific extensions/overrides */ #ifdef GASNETE_COLL_TEAM_EXTRA GASNETE_COLL_TEAM_EXTRA #endif }; /*---------------------------------------------------------------------------------*/ /* Serialization of polling collective ops: */ extern gasneti_mutex_t gasnete_coll_poll_lock; /* Function pointer type for polling collective ops: */ typedef int (*gasnete_coll_poll_fn)(gasnete_coll_op_t* GASNETI_THREAD_FARG); /* Type for collective ops: */ struct gasnete_coll_op_t_ { /* Linkage used by the thread-specific active ops list. */ #ifndef GASNETE_COLL_LIST_OVERRIDE /* Default implementation of coll_ops active list */ gasnete_coll_op_t *active_next, **active_prev_p; #endif /* a list of the ops for the scratch list management*/ gasnete_coll_op_t *scratch_next, *scratch_prev; /* Read-only fields: */ gasnete_coll_team_t team; gex_TM_t e_tm; uint32_t sequence; int flags; gasnete_coll_eop_t eop; // a container of eops for PAR /* Per-instance fields: */ void *data; gasnete_coll_poll_fn poll_fn; /* positions of the valid scratch space for this operation on the peers*/ uintptr_t *scratchpos; uintptr_t myscratchpos; uint8_t active_scratch_op; /* is this op on the active scratch list?*/ uint8_t waiting_scratch_op; /* is this op on the waiting scratch list?*/ uint8_t waiting_for_reconfig_clear; #if GASNET_DEBUG uint8_t scratch_op_freed; #endif gasnete_coll_scratch_req_t *scratch_req; /* the associated scratch request with this op*/ int num_coll_params; uint32_t param_list[GASNET_COLL_NUM_PARAM_TYPES];/*contains teh parameters*/ /* Hook for conduit-specific extensions/overrides */ #ifdef GASNETE_COLL_OP_EXTRA GASNETE_COLL_OP_EXTRA #endif }; /* Type for point-to-point synchronization */ #ifndef GASNETE_COLL_P2P_EAGER_SCALE_DEFAULT /* Number of bytes per-image to allocate for eager data */ #define GASNETE_COLL_P2P_EAGER_SCALE_DEFAULT 16 #endif #ifndef GASNETE_COLL_P2P_EAGER_MIN_DEFAULT /* Minumum number of bytes to allocate for eager data */ #define GASNETE_COLL_P2P_EAGER_MIN_DEFAULT 16 #endif #ifndef GASNETE_COLL_SEG_SIZE_DEFAULT /* set the Default Segment Size for Pipelining*/ #define GASNETE_COLL_SEG_SIZE_DEFAULT 1024 #endif #ifndef GASNETE_COLL_P2P_OVERRIDE struct gasnete_coll_p2p_t_ { /* Linkage and bookkeeping */ gasnete_coll_p2p_t *p2p_next; gasnete_coll_p2p_t **p2p_prev_p; /* Unique (team_id, sequence) tuple for the associated op */ #if GASNET_DEBUG uint32_t team_id; /* Only needed when debugging */ #endif uint32_t sequence; // Volatile arrays of data and state for the point-to-point synchronization uint8_t *data; volatile uint32_t *state; gasneti_weakatomic_t *counter; // Allocated sizes of the arrays above size_t ndata; size_t nstates; size_t ncounters; int finalized; // indicates that counts above should not change /* Handler-safe lock (if needed) */ gex_HSL_t lock; #ifdef GASNETE_COLL_P2P_EXTRA_FIELDS GASNETE_COLL_P2P_EXTRA_FIELDS #endif }; #endif #if GASNET_DEBUG #define gasnete_coll_p2p_check(p2p) do { \ gasneti_memcheck(p2p); \ if (p2p->nstates) gasneti_memcheck((void*)p2p->state); \ else gasneti_assert(!p2p->state); \ if (p2p->ncounters) gasneti_memcheck((void*)p2p->counter); \ else gasneti_assert(!p2p->counter); \ if (p2p->ndata) gasneti_memcheck(p2p->data); \ else gasneti_assert(!p2p->data); \ } while (0) #else #define gasnete_coll_p2p_check(p2p) ((void)0) #endif extern gasnete_coll_p2p_t *gasnete_coll_p2p_get_inner( gasnete_coll_team_t team, uint32_t sequence, size_t nstates, size_t ncounters, size_t ndata, int finalize); // Lookup/create p2p with the final sizes of fields 'state', 'counter' and 'data' // Further growth is prohibited after this call, and thus the caller may use these // three fields without fear of concurrent realloc() #define gasnete_coll_p2p_get_final(team,sequence,nstates,ncounters,ndata) \ gasnete_coll_p2p_get_inner(team,sequence,nstates,ncounters,ndata,1) // Lookup/create p2p with at least the specified sizes of fields 'state', 'counter' and 'data' // Since these fields are subject to realloc(), this call returns with a lock held #define gasnete_coll_p2p_get_locked(team,sequence,nstates,ncounters,ndata) \ gasnete_coll_p2p_get_inner(team,sequence,nstates,ncounters,ndata,0) // Callers of gasnete_coll_p2p_get_locked() use this call to release the lock // TODO: may want to use fine-grained p2p->lock instead of team->p2p_lock #define gasnete_coll_p2p_unlock(team,p2p) do { \ gasneti_assert((p2p)->team_id == (team)->team_id); \ gasnete_coll_p2p_check(p2p); \ gex_HSL_Unlock(&(team)->p2p_lock); \ } while (0) extern void gasnete_coll_p2p_purge(gasnete_coll_team_t team); extern void gasnete_tm_p2p_counting_put(gasnete_coll_op_t *op, gex_Rank_t dstrank, void *dst, void *src, size_t nbytes, uint32_t idx GASNETI_THREAD_FARG); extern void gasnete_tm_p2p_counting_eager_put(gasnete_coll_op_t *op, gex_Rank_t dstrank, void *src, size_t nbytes, size_t offset_size, uint32_t offset, uint32_t idx GASNETI_THREAD_FARG); extern void gasnete_tm_p2p_counting_putAsync(gasnete_coll_op_t *op, gex_Rank_t dstrank, void *dst, void *src, size_t nbytes, uint32_t idx GASNETI_THREAD_FARG); extern void gasnete_tm_p2p_eager_put_tree(gasnete_coll_op_t *op, gex_Rank_t dstrank, void *src, size_t size GASNETI_THREAD_FARG); extern int gasnete_tm_p2p_send_rtr( gasnete_coll_op_t *op, gasnete_coll_p2p_t *p2p, gex_Rank_t rank, uint32_t offset, void *dst, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG); extern int gasnete_tm_p2p_send_data( gasnete_coll_op_t *op, gasnete_coll_p2p_t *p2p, gex_Rank_t rank, uint32_t offset, const void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG); GASNETI_INLINE(gasnete_tm_p2p_send_done) int gasnete_tm_p2p_send_done(gasnete_coll_p2p_t *p2p) { // NOTE: caller is responsible for ACQ, if any return (0 == gasneti_weakatomic_read(&p2p->counter[0], GASNETI_ATOMIC_NONE)); } struct gasnete_tm_p2p_send_struct { void *addr; size_t sent; }; /* Update one or more states w/o delivering any data */ GASNETI_INLINE(gasnete_tm_p2p_change_states) int gasnete_tm_p2p_change_states( gasnete_coll_op_t *op, gex_Rank_t rank, gex_Flags_t flags, uint32_t count, uint32_t offset, uint32_t state GASNETI_THREAD_FARG) { // TODO-EX: flags |= INTERNAL to prevent tracing int rc = gex_AM_RequestShort5(op->e_tm, rank, gasneti_handleridx(gasnete_coll_p2p_short_reqh), flags, op->team->team_id, op->sequence, count, offset, state); gasneti_assert(!rc || (flags & GEX_FLAG_IMMEDIATE)); return rc; } #define gasnete_tm_p2p_change_state(op,rank,flags,offset,stateTI) \ gasnete_tm_p2p_change_states(op,rank,flags,1,offset,stateTI) /* Advance counter[idx] */ GASNETI_INLINE(gasnete_tm_p2p_advance) int gasnete_tm_p2p_advance( gasnete_coll_op_t *op, gex_Rank_t rank, gex_Flags_t flags, uint32_t idx GASNETI_THREAD_FARG) { // TODO-EX: flags |= INTERNAL to prevent tracing return gex_AM_RequestShort3(op->e_tm, rank, gasneti_handleridx(gasnete_coll_p2p_advance_reqh), flags, op->team->team_id, op->sequence, idx); } /* Put up to gex_AM_LUBRequestLong() bytes, signalling the recipient */ GASNETI_INLINE(gasnete_tm_p2p_signalling_put) int gasnete_tm_p2p_signalling_put( gasnete_coll_op_t *op, gex_Rank_t rank, void *dst, const void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, uint32_t offset, uint32_t state GASNETI_THREAD_FARG) { // TODO-EX: flags |= INTERNAL to prevent tracing flags |= op->team->aux_seg_flag; return gex_AM_RequestLong5(op->e_tm, rank, gasneti_handleridx(gasnete_coll_p2p_long_reqh), (void*)src, nbytes, dst, lc_opt, flags, op->team->team_id, op->sequence, 1, offset, state); } /* Treat the eager buffer space at rank as an array of elements of length 'size'. * Copy 'count' elements to that buffer, starting at element 'offset' at the destination. * Set the corresponding entries of the state array to 'state'. */ extern int gasnete_tm_p2p_eager_putM( gasnete_coll_op_t *op, gex_Rank_t rank, const void *src, uint32_t count, size_t size, gex_Event_t *lc_opt, gex_Flags_t flags, uint32_t offset, uint32_t state GASNETI_THREAD_FARG); // Specialization of gasnete_tm_p2p_eager_putM with count == 1 GASNETI_INLINE(gasnete_tm_p2p_eager_put) int gasnete_tm_p2p_eager_put( gasnete_coll_op_t *op, gex_Rank_t rank, const void *src, size_t size, gex_Event_t *lc_opt, gex_Flags_t flags, uint32_t offset, uint32_t state GASNETI_THREAD_FARG) { // TODO-EX: flags |= INTERNAL to prevent tracing int rc = gex_AM_RequestMedium6(op->e_tm, rank, gasneti_handleridx(gasnete_coll_p2p_med_reqh), (void*)src, size, lc_opt, flags, op->team->team_id, op->sequence, 1, offset, state, size); gasneti_assert(!rc || (flags & GEX_FLAG_IMMEDIATE)); return rc; } /* Treat the eager buffer space at dstrank as an array of (void *)s. * Copy 'count' elements to that buffer, starting at element 'offset' at the destination. * Set the corresponding entries of the state array to 'state'. */ GASNETI_INLINE(gasnete_tm_p2p_eager_addrM) void gasnete_tm_p2p_eager_addrM(gasnete_coll_op_t *op, gex_Rank_t dstrank, void * addrlist[], uint32_t count, uint32_t offset, uint32_t state GASNETI_THREAD_FARG) { gasneti_assert_zeroret( gasnete_tm_p2p_eager_putM(op, dstrank, addrlist, count, sizeof(void *), GEX_EVENT_NOW, 0, offset, state GASNETI_THREAD_PASS)); } /* Shorthand for gasnete_tm_p2p_eager_addrM with count == 1, taking * the address argument by value rather than reference. */ GASNETI_INLINE(gasnete_tm_p2p_eager_addr) void gasnete_tm_p2p_eager_addr(gasnete_coll_op_t *op, gex_Rank_t dstrank, void *addr, uint32_t offset, uint32_t state GASNETI_THREAD_FARG) { gasnete_tm_p2p_eager_addrM(op, dstrank, &addr, 1, offset, state GASNETI_THREAD_PASS); } /* Loop over calls to gasnete_tm_p2p_eager_addr() to send the same * address to all nodes except the local node. */ GASNETI_INLINE(gasnete_tm_p2p_eager_addr_all) void gasnete_tm_p2p_eager_addr_all(gasnete_coll_op_t *op, void *addr, uint32_t offset, uint32_t state, gasnet_team_handle_t team GASNETI_THREAD_FARG) { gex_Rank_t i; /* Send to nodes to the "right" of ourself */ for (i = team->myrank + 1; i < team->total_ranks; ++i) { gasnete_tm_p2p_eager_addr(op, i, addr, offset, state GASNETI_THREAD_PASS); } /* Send to nodes to the "left" of ourself */ for (i = 0; i < team->myrank; ++i) { gasnete_tm_p2p_eager_addr(op, i, addr, offset, state GASNETI_THREAD_PASS); } } /*---------------------------------------------------------------------------------*/ /* Helper for scaling of void pointers */ GASNETI_INLINE(gasnete_coll_scale_ptr) void *gasnete_coll_scale_ptr(const void *ptr, size_t elem_count, size_t elem_size) { return (void *)((uintptr_t)ptr + (elem_count * elem_size)); } /* Helper for scaling of void pointers */ GASNETI_INLINE(gasnete_coll_scale_ptrM) void gasnete_coll_scale_ptrM(void * out_ptr[], void * const in_ptr[], size_t elem_count, size_t elem_size, gasnet_image_t total_images) { int i; for(i=0; i= 0); GASNETI_MEMCPY_SAFE_EMPTY(dst, gasnete_coll_scale_ptr(src, elem_size, rotation_amt), (num_elem-rotation_amt)*elem_size); GASNETI_MEMCPY_SAFE_EMPTY(gasnete_coll_scale_ptr(dst, elem_size, num_elem-rotation_amt), src, (rotation_amt)*elem_size); gasneti_sync_writes(); } GASNETI_INLINE(gasnete_coll_local_rotate_right) void gasnete_coll_local_rotate_right(void *dst, const void *src, size_t elem_size, size_t num_elem, int rotation_amt) { /*make sure we can read the data*/ gasneti_sync_reads(); gasneti_assert(rotation_amt >= 0); GASNETI_MEMCPY_SAFE_EMPTY(gasnete_coll_scale_ptr(dst, elem_size, rotation_amt), src,(num_elem-rotation_amt)*elem_size); GASNETI_MEMCPY_SAFE_EMPTY(dst, gasnete_coll_scale_ptr(src, elem_size, num_elem-rotation_amt), (rotation_amt)*elem_size); gasneti_sync_writes(); } /* Helper to perform in-memory broadcast */ GASNETI_INLINE(gasnete_coll_local_broadcast) void gasnete_coll_local_broadcast(size_t count, void * const dstlist[], const void *src, size_t nbytes) { /* XXX: this could/should be segemented to cache reuse */ while (count>0) { GASNETI_MEMCPY_SAFE_IDENTICAL(*dstlist, src, nbytes); dstlist++; count--; } gasneti_sync_writes(); /* Ensure result is visible on all threads */ } /* Helper to perform in-memory scatter */ GASNETI_INLINE(gasnete_coll_local_scatter) void gasnete_coll_local_scatter(size_t count, void * const dstlist[], const void *src, size_t nbytes) { const uint8_t *src_addr = (const uint8_t *)src; while (count>0) { GASNETI_MEMCPY_SAFE_IDENTICAL(*dstlist, src_addr, nbytes); dstlist++; src_addr += nbytes; count --; } gasneti_sync_writes(); /* Ensure result is visible on all threads */ } /* Helper to perform in-memory gather */ GASNETI_INLINE(gasnete_coll_local_gather) void gasnete_coll_local_gather(size_t count, void * dst, void * const srclist[], size_t nbytes) { uint8_t *dst_addr = (uint8_t *)dst; gasneti_sync_reads(); while (count>0) { GASNETI_MEMCPY_SAFE_IDENTICAL(dst_addr, *srclist, nbytes); dst_addr += nbytes; srclist++; count--; } gasneti_sync_writes(); /* Ensure result is visible on all threads */ } /*---------------------------------------------------------------------------------*/ /* Thread-specific data: */ struct gasnete_coll_threaddata_t_ { gasnete_coll_op_t *op_freelist; gasnete_coll_generic_data_t *generic_data_freelist; /* Linkage used by the thread-specific handle freelist . */ #ifndef GASNETE_COLL_HANDLE_OVERRIDE #if GASNET_PAR /* Default implementation of eop freelist */ gasnete_coll_eop_t eop_freelist; #endif #endif /* Linkage used by the thread-specific active ops list. */ #ifndef GASNETE_COLL_LIST_OVERRIDE /* Default implementation of coll_ops active list */ #endif /* Recursion control */ int in_poll; /* Macro for conduit-specific extension */ #ifdef GASNETE_COLL_THREADDATA_EXTRA GASNETE_COLL_THREADDATA_EXTRA #endif }; extern gasnete_coll_threaddata_t *gasnete_coll_new_threaddata(void); GASNETI_INLINE(_gasnete_coll_get_threaddata) gasnete_coll_threaddata_t * _gasnete_coll_get_threaddata(gasneti_threaddata_t *mythread) { gasnete_coll_threaddata_t *result = mythread->gasnete_coll_threaddata; if_pf (result == NULL) { mythread->gasnete_coll_threaddata = result = gasnete_coll_new_threaddata(); } return result; } /* Used when thread data might not exist yet */ #define GASNETE_COLL_MYTHREAD _gasnete_coll_get_threaddata(GASNETI_MYTHREAD) /* Used when thread data must already exist */ #define GASNETE_COLL_MYTHREAD_NOALLOC \ (gasneti_assert(GASNETI_MYTHREAD->gasnete_coll_threaddata), GASNETI_MYTHREAD->gasnete_coll_threaddata) /*---------------------------------------------------------------------------------*/ extern gasnete_coll_team_t gasnete_coll_team_lookup(uint32_t team_id); extern gasnete_coll_op_t * gasnete_coll_op_create(gasnete_coll_team_t team, uint32_t sequence, int flags GASNETI_THREAD_FARG); extern void gasnete_coll_op_destroy(gasnete_coll_op_t *op GASNETI_THREAD_FARG); /*---------------------------------------------------------------------------------*/ /* Debugging and tracing macros */ #if GASNET_DEBUG /* Argument validation */ extern void gasnete_coll_validate(gasnet_team_handle_t team, gex_Rank_t dstrank, const void *dstaddr, size_t dstlen, gex_Rank_t srcrank, const void *srcaddr, size_t srclen, int flags GASNETI_THREAD_FARG); #define GASNETE_COLL_VALIDATE(T,DI,DA,DL,SI,SA,SL,F) \ gasnete_coll_validate(T,DI,DA,DL,SI,SA,SL,F GASNETI_THREAD_PASS) #else #define GASNETE_COLL_VALIDATE(T,DI,DA,DL,SI,SA,SL,F) #endif #define GASNETE_COLL_VALIDATE_BROADCAST(T,D,R,S,N,F) \ GASNETE_COLL_VALIDATE(T,GEX_RANK_INVALID,D,N,R,S,N,F) #define GASNETE_COLL_VALIDATE_SCATTER(T,D,R,S,N,F) \ GASNETE_COLL_VALIDATE(T,GEX_RANK_INVALID,D,N,R,S,(N)*gasneti_nodes,F) #define GASNETE_COLL_VALIDATE_GATHER(T,R,D,S,N,F) \ GASNETE_COLL_VALIDATE(T,R,D,(N)*gasneti_nodes,GEX_RANK_INVALID,S,N,F) #define GASNETE_COLL_VALIDATE_GATHER_ALL(T,D,S,N,F) \ GASNETE_COLL_VALIDATE(T,GEX_RANK_INVALID,D,(N)*gasneti_nodes,GEX_RANK_INVALID,S,N,F) #define GASNETE_COLL_VALIDATE_EXCHANGE(T,D,S,N,F) \ GASNETE_COLL_VALIDATE(T,GEX_RANK_INVALID,D,(N)*gasneti_nodes,GEX_RANK_INVALID,S,(N)*gasneti_nodes,F) /* XXX: following arg validation unimplemented */ #define GASNETE_COLL_VALIDATE_REDUCE(T,DI,D,S,SB,SO,ES,EC,FN,FA,F) // Diagnostic for non-trivial use of collectives in a NO_SCRATCH team GASNETI_COLD extern void gasnete_count_no_scratch(gasnet_team_handle_t team); #define GASNETE_COLL_CHECK_NO_SCRATCH(team) \ do { \ if_pf (!(team)->scratch_size && \ !(team)->myrank && \ ((team)->total_ranks > 1)) { \ gasnete_count_no_scratch(team); \ } \ } while(0) /*---------------------------------------------------------------------------------*/ /* Forward decls and macros */ #define GASNETE_COLL_FORWARD_FLAGS(flags) \ (((flags) & ~(GASNET_COLL_IN_ALLSYNC|GASNET_COLL_IN_MYSYNC|\ GASNET_COLL_OUT_ALLSYNC|GASNET_COLL_OUT_MYSYNC)) \ | (GASNET_COLL_IN_NOSYNC|GASNET_COLL_OUT_NOSYNC|GASNETE_COLL_SUBORDINATE)) /*---------------------------------------------------------------------------------*/ /* In-segment checks */ /* The flags GASNET_COLL_SRC_IN_SEGMENT and GASNET_COLL_DST_IN_SEGMENT are just * assertions from the caller. If they are NOT set, we will try to determine (when * possible) if the addresses are in-segment to allow a one-sided implementation * to be used. * gasnete_coll_segment_check returns a new set of flags. */ #ifndef gasnete_coll_segment_check GASNETI_INLINE(gasnete_coll_segment_check) int gasnete_coll_segment_check(gasnete_coll_team_t team, int flags, int dstrooted, gasnet_image_t dstimage, const void *dst, size_t dstlen, int srcrooted, gasnet_image_t srcimage, const void *src, size_t srclen) { #if GASNET_SEGMENT_EVERYTHING // Everything is reachable via get/put, regardless of segment return (flags | GASNET_COLL_DST_IN_SEGMENT | GASNET_COLL_SRC_IN_SEGMENT); #else // Only (removed) single-valued addresing would have enough info to upgrade the flags return flags; #endif } #endif /*---------------------------------------------------------------------------------*/ /* Events to test for progress */ extern void gasnete_coll_save_event(gex_Event_t *event_p); extern void gasnete_coll_sync_saved_events(GASNETI_THREAD_FARG_ALONE); /*---------------------------------------------------------------------------------* * Start of generic framework for reference implementations *---------------------------------------------------------------------------------*/ typedef struct { void *dst; gex_Rank_t srcrank; void *src; size_t nbytes; } gasnete_coll_broadcast_args_t; typedef struct { void *dst; gex_Rank_t srcrank; void *src; size_t nbytes; size_t dist; } gasnete_coll_scatter_args_t; typedef struct { gex_Rank_t dstrank; void *dst; void *src; size_t nbytes; size_t dist; } gasnete_coll_gather_args_t; typedef struct { void *dst; void *src; size_t nbytes; } gasnete_coll_gather_all_args_t; typedef struct { void *dst; void *src; size_t nbytes; } gasnete_coll_exchange_args_t; typedef struct { gex_Rank_t root; void * dst; const void * src; gex_DT_t dt; size_t dt_sz; size_t dt_cnt; gex_Coll_ReduceFn_t op_fnptr; void * op_cdata; } gasnete_tm_reduce_args_t; typedef struct { void * dst; const void * src; gex_DT_t dt; size_t dt_sz; size_t dt_cnt; gex_OP_t opcode; gex_Coll_ReduceFn_t op_fnptr; void * op_cdata; } gasnete_tm_reduce_all_args_t; /* Options for gasnete_coll_generic_* */ #define GASNETE_COLL_GENERIC_OPT_INSYNC 0x0001 #define GASNETE_COLL_GENERIC_OPT_OUTSYNC 0x0002 #define GASNETE_COLL_GENERIC_OPT_P2P 0x0004 /* Macros for conditionally setting flags in gasnete_coll_generic_* options */ #define GASNETE_COLL_GENERIC_OPT_INSYNC_IF(COND) ((COND) ? GASNETE_COLL_GENERIC_OPT_INSYNC : 0) #define GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(COND) ((COND) ? GASNETE_COLL_GENERIC_OPT_OUTSYNC : 0) #define GASNETE_COLL_GENERIC_OPT_P2P_IF(COND) ((COND) ? GASNETE_COLL_GENERIC_OPT_P2P : 0) struct gasnete_coll_generic_data_t_ { #if GASNET_DEBUG #define GASNETE_COLL_GENERIC_TAG(T) _CONCAT(GASNETE_COLL_GENERIC_TAG_,T) #define GASNETE_COLL_GENERIC_SET_TAG(D,T) (D)->tag = GASNETE_COLL_GENERIC_TAG(T) enum { /* Single-address (legacy) interfaces: */ GASNETE_COLL_GENERIC_TAG(broadcast), GASNETE_COLL_GENERIC_TAG(scatter), GASNETE_COLL_GENERIC_TAG(gather), GASNETE_COLL_GENERIC_TAG(gather_all), GASNETE_COLL_GENERIC_TAG(exchange), GASNETE_COLL_GENERIC_TAG(reduce), /* GEX (tm-based) interfaces: */ GASNETE_COLL_GENERIC_TAG(tm_reduce), GASNETE_COLL_GENERIC_TAG(tm_reduce_all) /* Hook for conduit-specific extension */ #ifdef GASNETE_COLL_GENERIC_TAG_EXTRA , GASNETE_COLL_GENERIC_TAG_EXTRA #endif } tag; #else #define GASNETE_COLL_GENERIC_SET_TAG(D,T) #endif int state; int options; gasnete_coll_consensus_t in_barrier; gasnete_coll_consensus_t out_barrier; gasnete_coll_p2p_t *p2p; gasnete_coll_local_tree_geom_t *tree_geom; gasnete_coll_dissem_info_t *dissem_info; gex_Event_t handle; gex_Event_t handle2; gex_Event_t coll_handle; void *private_data; /* Hook for conduit-specific extension */ #ifdef GASNETE_COLL_GENERIC_EXTRA GASNETE_COLL_GENERIC_EXTRA #endif union { /* Single-address (legacy) interfaces: */ gasnete_coll_broadcast_args_t broadcast; gasnete_coll_scatter_args_t scatter; gasnete_coll_gather_args_t gather; gasnete_coll_gather_all_args_t gather_all; gasnete_coll_exchange_args_t exchange; /* GEX interfaces: */ gasnete_tm_reduce_args_t tm_reduce; gasnete_tm_reduce_all_args_t tm_reduce_all; /* Hook for conduit-specific extension */ #ifdef GASNETE_COLL_GENERIC_ARGS_EXTRA GASNETE_COLL_GENERIC_ARGS_EXTRA #endif } args; }; #define GASNETE_COLL_GENERIC_DATA(op) ((gasnete_coll_generic_data_t *)((op)->data)) /* Extract pointer to correct member of args union * Also does some consistency checking when debugging is enabled */ #define GASNETE_COLL_GENERIC_ARGS(D,T) \ (gasneti_assert((D) != NULL), \ gasneti_assert((D)->tag == GASNETE_COLL_GENERIC_TAG(T)), \ &((D)->args.T)) extern gasnete_coll_generic_data_t *gasnete_coll_generic_alloc(GASNETI_THREAD_FARG_ALONE); void gasnete_coll_generic_free(gasnete_coll_team_t team, gasnete_coll_generic_data_t *data GASNETI_THREAD_FARG); extern gex_Event_t gasnete_coll_op_generic_init_with_scratch(gasnete_coll_team_t team, int flags, gasnete_coll_generic_data_t *data, gasnete_coll_poll_fn poll_fn, uint32_t sequence, gasnete_coll_scratch_req_t *scratch_req, int num_params, uint32_t *param_list, gasnete_coll_local_tree_geom_t *tree_geom GASNETI_THREAD_FARG); extern int gasnete_coll_generic_syncnb(gasnete_coll_generic_data_t *data); // TODO-EX: to be replaced with multi-EP equivalents: #if GASNET_PAR && GASNET_DEBUG extern void gasnete_coll_threads_lock(gasnete_coll_team_t team, int flags GASNETI_THREAD_FARG); extern void gasnete_coll_threads_unlock(gasnete_coll_team_t team GASNETI_THREAD_FARG); #else #define gasnete_coll_threads_lock(team, flags) do { } while (0) #define gasnete_coll_threads_unlock(thrarg) do { } while (0) #endif // TODO-EX: deprecate and remove: #define gasnete_coll_threads_get_handle(thrarg) (gasneti_unreachable(), GEX_EVENT_INVALID) #define gasnete_coll_generic_all_threads(data) (1) GASNETI_INLINE(gasnete_coll_generic_insync) int gasnete_coll_generic_insync(gasnete_coll_team_t team, gasnete_coll_generic_data_t *data) { gasneti_assert(data != NULL); return (!(data->options & GASNETE_COLL_GENERIC_OPT_INSYNC) || (gasnete_coll_consensus_try(team, data->in_barrier) == GASNET_OK)); } GASNETI_INLINE(gasnete_coll_generic_outsync) int gasnete_coll_generic_outsync(gasnete_coll_team_t team, gasnete_coll_generic_data_t *data) { gasneti_assert(data != NULL); return (!(data->options & GASNETE_COLL_GENERIC_OPT_OUTSYNC) || (gasnete_coll_consensus_try(team, data->out_barrier) == GASNET_OK)); } /* Optional UP half-barrier over the collective tree. * No memory fences. */ GASNETI_INLINE(gasnete_coll_generic_upsync) int gasnete_coll_generic_upsync(gasnete_coll_op_t *op, gex_Rank_t rootrank, const int counter, const int count GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t * const data = op->data; if (gasneti_weakatomic_read(&data->p2p->counter[counter], 0) == count) { if (op->team->myrank != rootrank) { gasnete_tm_p2p_advance(op, GASNETE_COLL_TREE_GEOM_PARENT(data->tree_geom), 0, 0 GASNETI_THREAD_PASS); } return 1; } return 0; } /* Optional UP half-barrier over the collective tree. * Root rank will rmb() and non-root will wmb() to ensure that writes * to root's memory will be read by root. This is appropriate to the * needs of a "push" based broadcast or scatter. */ GASNETI_INLINE(gasnete_coll_generic_upsync_acq) int gasnete_coll_generic_upsync_acq(gasnete_coll_op_t *op, gex_Rank_t rootrank, const int counter, const int count GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t * const data = op->data; if (gasneti_weakatomic_read(&data->p2p->counter[counter], 0) == count) { if (op->team->myrank != rootrank) { gasneti_local_wmb(); gasnete_tm_p2p_advance(op, GASNETE_COLL_TREE_GEOM_PARENT(data->tree_geom), 0, counter GASNETI_THREAD_PASS); } else { gasneti_local_rmb(); } return 1; } return 0; } extern int gasnete_coll_generic_coll_sync(gex_Event_t *p, size_t count GASNETI_THREAD_FARG); // Legacy "generic" layer extern gex_Event_t gasnete_coll_generic_broadcast_nb(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, gasnete_coll_poll_fn poll_fn, int options, gasnete_coll_local_tree_geom_t *geom_info, uint32_t sequence, int num_params, uint32_t *param_list GASNETI_THREAD_FARG); extern gex_Event_t gasnete_coll_generic_scatter_nb(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, size_t dist, int flags, gasnete_coll_poll_fn poll_fn, int options, gasnete_coll_local_tree_geom_t *geom_info, uint32_t sequence, int num_params, uint32_t *param_list GASNETI_THREAD_FARG); extern gex_Event_t gasnete_coll_generic_gather_nb(gasnet_team_handle_t team, gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, size_t dist, int flags, gasnete_coll_poll_fn poll_fn, int options, gasnete_coll_local_tree_geom_t *geom_info, uint32_t sequence, int num_params, uint32_t *param_list GASNETI_THREAD_FARG); extern gex_Event_t gasnete_coll_generic_gather_all_nb(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_poll_fn poll_fn, int options, void *private_data, uint32_t sequence, int num_params, uint32_t *param_list GASNETI_THREAD_FARG); extern gex_Event_t gasnete_coll_generic_exchange_nb(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_poll_fn poll_fn, int options, void *private_data, gasnete_coll_dissem_info_t *dissem, uint32_t sequence, int num_params, uint32_t *param_list GASNETI_THREAD_FARG); // Legacy "nb_default" layer extern gex_Event_t gasnete_coll_broadcast_nb_default(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); extern gex_Event_t gasnete_coll_scatter_nb_default(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); extern gex_Event_t gasnete_coll_gather_nb_default(gasnet_team_handle_t team, gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); extern gex_Event_t gasnete_coll_gather_all_nb_default(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); extern gex_Event_t gasnete_coll_exchange_nb_default(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); // GEX "generic" layer extern gex_Event_t gasnete_tm_generic_reduce_nb(gex_TM_t tm, gex_Rank_t root, void *dst, const void *src, gex_DT_t dt, size_t dt_sz, size_t dt_cnt, gex_OP_t opcode, gex_Coll_ReduceFn_t fnptr, void *cdata, int coll_flags, gasnete_coll_poll_fn poll_fn, int options, gasnete_coll_local_tree_geom_t *geom_info, uint32_t sequence, int num_params, uint32_t *param_list, gasnete_coll_scratch_req_t *scratch_req GASNETI_THREAD_FARG); extern gex_Event_t gasnete_tm_generic_reduce_all_nb( gex_TM_t tm, void *dst, const void *src, gex_DT_t dt, size_t dt_sz, size_t dt_cnt, gex_OP_t opcode, gex_Coll_ReduceFn_t fnptr, void *cdata, int coll_flags, gasnete_coll_poll_fn poll_fn, int options, gasnete_coll_local_tree_geom_t *geom_info, uint32_t sequence, int num_params, uint32_t *param_list, gasnete_coll_scratch_req_t *scratch_req GASNETI_THREAD_FARG); /*---------------------------------------------------------------------------------* * Start of protypes for reference implementations *---------------------------------------------------------------------------------*/ #define GASNETE_COLL_DECLARE_BCAST_ALG(FUNC_EXT)\ extern gex_Event_t \ gasnete_coll_bcast_##FUNC_EXT(gasnet_team_handle_t team,\ void * dst,\ gasnet_image_t srcimage, void *src,\ size_t nbytes, int flags,\ gasnete_coll_implementation_t coll_params,\ uint32_t sequence\ GASNETI_THREAD_FARG) GASNETE_COLL_DECLARE_BCAST_ALG(RVGet); GASNETE_COLL_DECLARE_BCAST_ALG(TreeRVGet); GASNETE_COLL_DECLARE_BCAST_ALG(RVous); GASNETE_COLL_DECLARE_BCAST_ALG(TreePutScratch); GASNETE_COLL_DECLARE_BCAST_ALG(TreePutSeg); GASNETE_COLL_DECLARE_BCAST_ALG(ScatterAllgather); GASNETE_COLL_DECLARE_BCAST_ALG(TreeEager); /*---------------------------------------------------------------------------------*/ #define GASNETE_COLL_DECLARE_SCATTER_ALG(FUNC_EXT)\ extern gex_Event_t \ gasnete_coll_scat_##FUNC_EXT(gasnet_team_handle_t team,\ void *dst,\ gasnet_image_t srcimage, void *src,\ size_t nbytes, size_t dist, int flags,\ gasnete_coll_implementation_t coll_params,\ uint32_t sequence\ GASNETI_THREAD_FARG) GASNETE_COLL_DECLARE_SCATTER_ALG(TreePut); GASNETE_COLL_DECLARE_SCATTER_ALG(TreePutNoCopy); GASNETE_COLL_DECLARE_SCATTER_ALG(TreePutSeg); GASNETE_COLL_DECLARE_SCATTER_ALG(TreeEager); GASNETE_COLL_DECLARE_SCATTER_ALG(Eager); GASNETE_COLL_DECLARE_SCATTER_ALG(RVGet); GASNETE_COLL_DECLARE_SCATTER_ALG(RVous); /*---------------------------------------------------------------------------------*/ #define GASNETE_COLL_DECLARE_GATHER_ALG(FUNC_EXT)\ extern gex_Event_t \ gasnete_coll_gath_##FUNC_EXT(gasnet_team_handle_t team,\ gasnet_image_t dstimage, void *dst,\ void *src,\ size_t nbytes, size_t dist, int flags, \ gasnete_coll_implementation_t coll_params,\ uint32_t sequence\ GASNETI_THREAD_FARG) GASNETE_COLL_DECLARE_GATHER_ALG(TreePut); GASNETE_COLL_DECLARE_GATHER_ALG(TreePutNoCopy); GASNETE_COLL_DECLARE_GATHER_ALG(TreePutSeg); GASNETE_COLL_DECLARE_GATHER_ALG(TreeEager); GASNETE_COLL_DECLARE_GATHER_ALG(Eager); GASNETE_COLL_DECLARE_GATHER_ALG(RVPut); GASNETE_COLL_DECLARE_GATHER_ALG(RVous); /*---------------------------------------------------------------------------------*/ #define GASNETE_COLL_DECLARE_GATHER_ALL_ALG(FUNC_EXT)\ extern gex_Event_t \ gasnete_coll_gall_##FUNC_EXT(gasnet_team_handle_t team, \ void *dst, void *src, \ size_t nbytes, int flags, \ gasnete_coll_implementation_t coll_params, \ uint32_t sequence \ GASNETI_THREAD_FARG) GASNETE_COLL_DECLARE_GATHER_ALL_ALG(GathBcast); GASNETE_COLL_DECLARE_GATHER_ALL_ALG(EagerDissem); GASNETE_COLL_DECLARE_GATHER_ALL_ALG(Dissem); GASNETE_COLL_DECLARE_GATHER_ALL_ALG(FlatEagerPut); /*---------------------------------------------------------------------------------*/ #define GASNETE_COLL_DECLARE_EXCHANGE_ALG(FUNC_EXT)\ extern gex_Event_t \ gasnete_coll_exchg_##FUNC_EXT(gasnet_team_handle_t team,\ void *dst, void *src,\ size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence\ GASNETI_THREAD_FARG) GASNETE_COLL_DECLARE_EXCHANGE_ALG(Dissem2); GASNETE_COLL_DECLARE_EXCHANGE_ALG(Dissem3); GASNETE_COLL_DECLARE_EXCHANGE_ALG(Dissem4); GASNETE_COLL_DECLARE_EXCHANGE_ALG(Dissem8); GASNETE_COLL_DECLARE_EXCHANGE_ALG(FlatScratch); GASNETE_COLL_DECLARE_EXCHANGE_ALG(Gath); GASNETE_COLL_DECLARE_EXCHANGE_ALG(RVPut); /*---------------------------------------------------------------------------------*/ #define GASNETE_TM_REDUCE_ARGS \ gex_TM_t tm, gex_Rank_t root,\ void *dst, const void *src,\ gex_DT_t dt, size_t dt_sz, size_t dt_cnt,\ gex_OP_t op, gex_Coll_ReduceFn_t op_fnptr, void *op_cdata,\ int coll_flags, \ gasnete_coll_implementation_t coll_params,\ uint32_t sequence\ GASNETI_THREAD_FARG #define GASNETE_TM_DECLARE_REDUCE_ALG(FUNC_EXT) \ extern gex_Event_t gasnete_tm_reduce_##FUNC_EXT(GASNETE_TM_REDUCE_ARGS) typedef gex_Event_t (*gasnete_tm_reduce_fn_ptr_t)(GASNETE_TM_REDUCE_ARGS); GASNETE_TM_DECLARE_REDUCE_ALG(BinomialEager); GASNETE_TM_DECLARE_REDUCE_ALG(BinomialEagerSeg); GASNETE_TM_DECLARE_REDUCE_ALG(TreePut); GASNETE_TM_DECLARE_REDUCE_ALG(TreePutSeg); /*---------------------------------------------------------------------------------*/ #define GASNETE_TM_REDUCE_ALL_ARGS \ gex_TM_t tm, void *dst, const void *src,\ gex_DT_t dt, size_t dt_sz, size_t dt_cnt,\ gex_OP_t op, gex_Coll_ReduceFn_t op_fnptr, void *op_cdata,\ int coll_flags, \ gasnete_coll_implementation_t coll_params,\ uint32_t sequence\ GASNETI_THREAD_FARG #define GASNETE_TM_DECLARE_REDUCE_ALL_ALG(FUNC_EXT) \ extern gex_Event_t gasnete_tm_reduce_all_##FUNC_EXT(GASNETE_TM_REDUCE_ALL_ARGS) typedef gex_Event_t (*gasnete_tm_reduce_all_fn_ptr_t)(GASNETE_TM_REDUCE_ALL_ARGS); GASNETE_TM_DECLARE_REDUCE_ALL_ALG(Bcast); /*---------------------------------------------------------------------------------*/ // Reduction operators // TODO-EX: this is not intended to be the final implemenation (or naming) #define GASNETE_TM_REDUCE_FOREACH_DT(FN) \ FN(I32) FN(U32) FN(I64) FN(U64) FN(FLT) FN(DBL) #define GASNETE_SHRINKRAY_DECL(DT) \ extern void gasnete_shrinkray_gex_dt_##DT ( \ const void * arg1, \ void * arg2_and_out, \ size_t count , \ const void * cdata); GASNETE_TM_REDUCE_FOREACH_DT(GASNETE_SHRINKRAY_DECL) /*---------------------------------------------------------------------------------*/ // Bit-twiddling helpers // TODO: some may still be subject to additional optimization // // Count consecutive zero bits from the right (least-significant) end */ // TODO: default (no builtins) version can be improved upon GASNETI_INLINE(gasnete_coll_ctz_u32) GASNETI_CONST unsigned int gasnete_coll_ctz_u32(uint32_t v) { #if GASNETI_HAVE_CC_BUILTIN_CTZ return v ? __builtin_ctz(v) : 32; #elif HAVE_FFS return v ? (ffs(v)-1) : 32; #else unsigned int c = 32; if (v) { for (c=0; !(v&1); ++c) v >>= 1; } return c; #endif } GASNETI_CONSTP(gasnete_coll_ctz_u32) // // Family of functions for (fast) floor(log_2(v)) OR -1 for v=0 // // The compiler-independent (table-lookup) portions of the following // function to find the fast log2 of integers are adapted from: // http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogLookup // (accessed July 10, 2008) static const int8_t LogTable256[] = { -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }; GASNETI_INLINE(gasnete_coll_log2_u32) GASNETI_CONST int gasnete_coll_log2_u32(uint32_t v) { #if GASNETI_HAVE_CC_BUILTIN_CLZ && (SIZEOF_INT == 4) return v ? (31 - __builtin_clz(v)) : -1; #elif GASNETI_HAVE_CC_BUILTIN_CLZL && (SIZEOF_LONG == 4) return v ? (31 - __builtin_clzl(v)) : -1; #elif GASNETI_HAVE_CC_BUILTIN_CLZLL && (SIZEOF_LONG_LONG == 4) return v ? (31 - __builtin_clzll(v)) : -1; #else int r; uint32_t t, tt; if ((tt = v >> 16)) { r = (t = tt >> 8) ? 24 + LogTable256[t] : 16 + LogTable256[tt]; } else { r = (t = v >> 8) ? 8 + LogTable256[t] : LogTable256[v]; } return r; #endif } GASNETI_CONSTP(gasnete_coll_log2_u32) GASNETI_INLINE(gasnete_coll_log2_u64) GASNETI_CONST int gasnete_coll_log2_u64(uint64_t v) { #if GASNETI_HAVE_CC_BUILTIN_CLZ && (SIZEOF_INT == 8) return v ? (63 - __builtin_clz(v)) : -1; #elif GASNETI_HAVE_CC_BUILTIN_CLZL && (SIZEOF_LONG == 8) return v ? (63 - __builtin_clzl(v)) : -1; #elif GASNETI_HAVE_CC_BUILTIN_CLZLL && (SIZEOF_LONG_LONG == 8) return v ? (63 - __builtin_clzll(v)) : -1; #else int r; uint64_t t, tt; if ((tt = v >> 48)) { r = (t = tt >> 8) ? 56 + LogTable256[t] : 48 + LogTable256[tt]; } else if ((tt = v>>32)) { r = (t = tt >> 8) ? 40 + LogTable256[t] : 32 + LogTable256[tt]; } else if ((tt = v >> 16)) { r = (t = tt >> 8) ? 24 + LogTable256[t] : 16 + LogTable256[tt]; } else { r = (t = v >> 8) ? 8 + LogTable256[t] : LogTable256[v]; } return r; #endif } GASNETI_CONSTP(gasnete_coll_log2_u64) // Aliases #define gasnete_coll_log2_rank(v) gasnete_coll_log2_u32(v) #if (SIZEOF_SIZE_T == 4) #define gasnete_coll_log2_sz(v) gasnete_coll_log2_u32(v) #elif (SIZEOF_SIZE_T == 8) #define gasnete_coll_log2_sz(v) gasnete_coll_log2_u64(v) #else #error Unknown SIZEOF_SIZE_T #endif /*---------------------------------------------------------------------------------*/ // Binomial geometry helpers // In these 'rel_rank' is '(self - root) % nranks' // Relative rank in binomial tree rooted at 'root' GASNETI_INLINE(gasnete_tm_binom_rel_root) GASNETI_PURE gex_Rank_t gasnete_tm_binom_rel_root(gex_TM_t const tm, const gex_Rank_t root) { const gex_Rank_t self = gex_TM_QueryRank(tm); const gex_Rank_t size = gex_TM_QuerySize(tm); return (self >= root) ? (self - root) : (self + size - root); } GASNETI_PUREP(gasnete_tm_binom_rel_root) // Size of local binomial subtree, including self // TODO-EX: broken for teams of size 2^31 or larger GASNETI_INLINE(gasnete_tm_binom_subtree_size) GASNETI_PURE gex_Rank_t gasnete_tm_binom_subtree_size(gex_TM_t const tm, const gex_Rank_t rel_rank) { const gex_Rank_t size = gex_TM_QuerySize(tm); gasneti_assert(size < 0x80000000); const gex_Rank_t remain = size - rel_rank; const gex_Rank_t fullsize = (rel_rank & (-rel_rank)); return (!fullsize || (fullsize > remain)) ? remain : fullsize; } GASNETI_PUREP(gasnete_tm_binom_subtree_size) // Count of direct children in binomial subtree GASNETI_INLINE(gasnete_tm_binom_children) GASNETI_PURE gex_Rank_t gasnete_tm_binom_children(gex_TM_t const tm, const gex_Rank_t rel_rank) { return 1 + gasnete_coll_log2_rank(gasnete_tm_binom_subtree_size(tm, rel_rank) - 1); } GASNETI_PUREP(gasnete_tm_binom_children) // Rank (not relative) of parent // TODO-EX: broken for teams of size 2^31 or larger GASNETI_INLINE(gasnete_tm_binom_parent) GASNETI_PURE gex_Rank_t gasnete_tm_binom_parent(gex_TM_t const tm, const gex_Rank_t rel_rank) { const gex_Rank_t self = gex_TM_QueryRank(tm); const gex_Rank_t size = gex_TM_QuerySize(tm); gasneti_assert(size < 0x80000000); const gex_Rank_t fullsize = (rel_rank & (-rel_rank)); return (self >= fullsize) ? (self - fullsize) : (self + size - fullsize); } GASNETI_PUREP(gasnete_tm_binom_parent) // Rank among siblings (e.g. 0 for first child, 1 for second, etc.) GASNETI_INLINE(gasnete_tm_binom_age) GASNETI_PURE gex_Rank_t gasnete_tm_binom_age(gex_TM_t const tm, const gex_Rank_t rel_rank) { return gasnete_coll_ctz_u32(rel_rank); } GASNETI_PUREP(gasnete_tm_binom_age) /*---------------------------------------------------------------------------------*/ /* Conduit specific extension hooks: */ /* These may be unused, but there is no harm in prototyping them. */ extern void gasnete_coll_init_conduit(void); extern void gasnete_coll_team_init_conduit(gasnet_team_handle_t team); extern void gasnete_coll_team_fini_conduit(gasnet_team_handle_t team); /*---------------------------------------------------------------------------------*/ // Helpers for uint32_t sequence numbers (which, by their nature, may wrap-around). // Assert that absolute difference is less than 2^30 (give or take 1) #if GASNET_DEBUG GASNETI_INLINE(gasnete_coll_seq32_safe) void gasnete_coll_seq32_safe(uint32_t _u, uint32_t _v) { if (_u - _v + 0x40000000u >= 0x80000000u) { gasneti_fatalerror("Absolute difference between unsigned 32-bit sequence " "numbers %u and %u (0x%x and 0x%x) is larger than 2^30", (unsigned int)_u, (unsigned int)_v, (unsigned int)_u, (unsigned int)_v); } } #define GASNETE_COLL_SEQ32_SAFE(u,v) gasnete_coll_seq32_safe((u),(v)) #else #define GASNETE_COLL_SEQ32_SAFE(u,v) ((void)0) #endif // GASNETE_COLL_SEQ32_{LT,LE,GT,GE}(u,v) true (non-zero) if "u {<,<=,>,>=} v" // In all cases the comparison takes into consideration the wrap around. // Also asserts that the difference remains less than half-way to the // point at which wrap-around would cause ambiguity. GASNETI_INLINE(gasnete_coll_seq32_ge) int gasnete_coll_seq32_ge(uint32_t _u, uint32_t _v) { GASNETE_COLL_SEQ32_SAFE(_u,_v); return _u - _v < 0x80000000u; } #define GASNETE_COLL_SEQ32_GE(u,v) gasnete_coll_seq32_ge((u),(v)) #define GASNETE_COLL_SEQ32_GT(u,v) gasnete_coll_seq32_ge((u),(uint32_t)(v)+1) #define GASNETE_COLL_SEQ32_LE(u,v) gasnete_coll_seq32_ge((v),(u)) #define GASNETE_COLL_SEQ32_LT(u,v) gasnete_coll_seq32_ge((v),(uint32_t)(u)+1) /*---------------------------------------------------------------------------------*/ #endif gasnet-2025.8.0/extended-ref/coll/gasnet_scratch.h0000664000175000017500000001375215142313673022076 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_scratch.h $ * Description: Reference implemetation of GASNet Collectives team * Copyright 2009, Rajesh Nishtala , Paul H. Hargrove , Dan Bonachea * Terms of use are as specified in license.txt */ /* in all the functions below i assume that the scratch space is no bigger than 4GB*/ #ifndef __GASNET_SCRATCH_H__ #define __GASNET_SCRATCH_H__ 1 #define GASNETE_COLL_SCRATCH_TREE_OP 0 #define GASNETE_COLL_SCRATCH_DISSEM_OP 1 // How many elements (of appropriate types) to inline in order to avoid dynamic allocations #define GASNETE_COLL_NUM_INLINE_OUT_PEERS 8 #define GASNETE_COLL_NUM_INLINE_IN_PEERS 8 struct gasnete_coll_node_scratch_status_t_; typedef struct gasnete_coll_node_scratch_status_t_ gasnete_coll_node_scratch_status_t; /* down tree means we send to relative ranks that are higher than us*/ /* up tree means that we send to relative ranks that are lower than us*/ typedef enum {GASNETE_COLL_UP_TREE=0, GASNETE_COLL_DOWN_TREE} gasnete_coll_tree_dir_t; typedef enum {GASNETE_COLL_DISSEM_OP=0, GASNETE_COLL_TREE_OP} gasnete_coll_op_type_t; struct gasnete_coll_scratch_req_t_ { gasnete_coll_scratch_req_t *next; gasnete_coll_scratch_req_t **prev_p; gasnete_coll_op_t *op; gasnete_coll_tree_type_t tree_type; gex_Rank_t root; gasnete_coll_team_t team; /*notice that we don't need to keep track of the dissemination radix since we don't do anything withit */ /* whether this is a tree op where peers are fixed from phase to phase*/ gasnete_coll_op_type_t op_type; gasnete_coll_tree_dir_t tree_dir; /*this is the sum incoming space of all the peers sending to me*/ /*for now, for non treeops this is the amount of data that everyone is requesting*/ uintptr_t incoming_size; /*information for all the data for which i am the target*/ /*for non tree ops these values not used*/ int num_in_peers; gex_Rank_t *in_peers; /*information for all the data for which i am an initiator*/ /*for non tree ops this information is not used*/ int num_out_peers; gex_Rank_t *out_peers; uintptr_t *out_sizes; // A short array of uintptr_t for out_sizes and scratchpos (thus *2) // TODO: this could be a flexible array member sized according to team size? uintptr_t inline_uintptr[GASNETE_COLL_NUM_INLINE_OUT_PEERS*2]; }; // Allocate and free scratch_requests GASNETI_INLINE(gasnete_coll_scratch_alloc_req) GASNETI_MALLOC gasnete_coll_scratch_req_t *gasnete_coll_scratch_alloc_req(gasnete_coll_team_t team) { gasnete_coll_scratch_req_t *scratch_req = gasneti_lifo_pop(&team->scratch_free_list); if_pf (! scratch_req) { scratch_req = gasneti_calloc(1,sizeof(gasnete_coll_scratch_req_t)); scratch_req->team = team; } else { gasneti_assert(scratch_req->team == team); } return scratch_req; } GASNETI_INLINE(gasnete_coll_scratch_free_req) void gasnete_coll_scratch_free_req(gasnete_coll_scratch_req_t *scratch_req) { gasnete_coll_team_t team = scratch_req->team; gasneti_lifo_push(&team->scratch_free_list, scratch_req); } void gasnete_coll_scratch_req_purge(gasnete_coll_team_t team); // Allocate and free (consecutive) space used for out_sizes and scratchpos // For small sizes we use space within the scratch request itself // The allocation interfaces are such that one could split the two apart GASNETI_INLINE(gasnete_coll_scratch_alloc_out_sizes) void gasnete_coll_scratch_alloc_out_sizes(gasnete_coll_scratch_req_t *req, size_t n) { gasneti_assert(n == (req->op_type == GASNETE_COLL_DISSEM_OP ? 1 : req->num_out_peers)); size_t count = n + req->num_out_peers; if (count > 2 * GASNETE_COLL_NUM_INLINE_OUT_PEERS) { req->out_sizes = gasneti_malloc(count * sizeof(uintptr_t)); } else { req->out_sizes = req->inline_uintptr; } } GASNETI_INLINE(gasnete_coll_scratch_alloc_pos) void gasnete_coll_scratch_alloc_pos(gasnete_coll_scratch_req_t *req) { size_t num_out_sizes = (req->op_type == GASNETE_COLL_DISSEM_OP ? 1 : req->num_out_peers); gasnete_coll_op_t *op = req->op; op->scratchpos = req->out_sizes + num_out_sizes; } GASNETI_INLINE(gasnete_coll_scratch_free_inlines) void gasnete_coll_scratch_free_inlines(gasnete_coll_scratch_req_t *req) { size_t num_out_sizes = (req->op_type == GASNETE_COLL_DISSEM_OP ? 1 : req->num_out_peers); gasneti_assert(req->op->scratchpos == req->out_sizes + num_out_sizes); size_t n = req->num_out_peers + num_out_sizes; if (n > 2 * GASNETE_COLL_NUM_INLINE_OUT_PEERS) { gasneti_assert(req->out_sizes != req->inline_uintptr); gasneti_free(req->out_sizes); } } GASNETI_INLINE(gasnete_coll_scratch_base) uintptr_t gasnete_coll_scratch_base(gasnete_coll_team_t team, gex_Rank_t rank) { void *addr; if (team->scratch_addrs) { addr = team->scratch_addrs[rank]; } else { gex_Rank_t jobrank = team->rel2act_map ? team->rel2act_map[rank] : rank; addr = team->scratch_segs[jobrank].addr; } return (uintptr_t)addr + team->symmetric_scratch_offset; } GASNETI_INLINE(gasnete_coll_scratch_myaddr) void* gasnete_coll_scratch_myaddr(gasnete_coll_op_t *op, uintptr_t byte_offset) { const gasnete_coll_team_t team = op->team; return (void *)(byte_offset + op->myscratchpos + (uintptr_t)team->myscratch); } GASNETI_INLINE(gasnete_coll_scratch_addr) void* gasnete_coll_scratch_addr(gasnete_coll_op_t *op, gex_Rank_t rank, int index, uintptr_t byte_offset) { const gasnete_coll_team_t team = op->team; return (void *)(byte_offset + op->scratchpos[index] + gasnete_coll_scratch_base(team, rank)); } /* try to allocate scratch space*/ /* returns 1 on success or zero on failure*/ int8_t gasnete_coll_scratch_alloc_nb(gasnete_coll_op_t* op GASNETI_THREAD_FARG); /* release the associated scratch space with this op*/ void gasnete_coll_free_scratch(gasnete_coll_op_t *op); /* function calls for coll init*/ void gasnete_coll_alloc_new_scratch_status(gasnete_coll_team_t team); void gasnete_coll_free_scratch_status(gasnete_coll_team_t team); #endif gasnet-2025.8.0/extended-ref/coll/gasnet_team.c0000664000175000017500000011672215142313673021371 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_team.c $ * * Description: GASNet generic team implementation for collectives * Copyright 2009, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include #include #include #include #include #ifdef GASNETE_COLL_TEAM_CONDUIT_DECLS GASNETE_COLL_TEAM_CONDUIT_DECLS #endif static gasnete_hashtable_t *team_dir = NULL; #define GASNETE_COLL_TEAM_ID_BITS 12 #define GASNETE_COLL_TEAM_ID_COUNT (1<> GASNETE_COLL_TEAM_ID_BITS)) return; id &= GASNETE_COLL_TEAM_ID_MASK; unsigned int word = id / 32; unsigned int bit = id % 32; gasneti_weakatomic32_t *p = &team_id.map[word]; uint32_t readval, newval; do { // Atomic clear readval = gasneti_weakatomic32_read(p, 0); gasneti_assert(readval & (1 << bit)); newval = readval ^ (1 << bit); } while (!gasneti_weakatomic32_compare_and_swap(p, readval, newval, 0)); // If allocation hint is word we've written, advance to increase distance to reuse if (team_id.hint == word) team_id.hint = word + 1; // mod done when read } extern size_t gasnete_coll_auxseg_size; extern size_t gasnete_coll_auxseg_offset; /*called by only one thread*/ static void initialize_team_fields( gasnete_coll_team_t team, size_t scratch_size, // Single-valued gex_Addr_t *scratch_addrs, gex_Flags_t flags GASNETI_THREAD_FARG) { team->sequence = 0xfffffff8; // Intentionally near to wrap-around if (team->team_id) { // Detect and optimize for storage in symmetric offset case uintptr_t symmetric_offset = 0; int is_symmetric = 0; if (scratch_size && (team->total_ranks > 1)) { const gasnet_seginfo_t *si = gasneti_seginfo + team->rel2act_map[0]; symmetric_offset = (uintptr_t)scratch_addrs[0] - (uintptr_t)(si->addr); if (symmetric_offset < si->size) { is_symmetric = 1; for (gex_Rank_t r = 1; r < team->total_ranks; ++r) { si = gasneti_seginfo + team->rel2act_map[r]; if (symmetric_offset != (uintptr_t)scratch_addrs[r] - (uintptr_t)(si->addr)) { is_symmetric = 0; break; } } } } team->scratch_size = scratch_size; if (is_symmetric) { team->scratch_segs = gasneti_seginfo; team->symmetric_scratch_offset = symmetric_offset; gasneti_assert(! team->scratch_addrs); gasneti_free(scratch_addrs); GASNETI_TRACE_PRINTF(W,("Team TM%x:%i scratch: size=%"PRIuSZ" symmetric_offset=%"PRIuPTR, team->team_id, team->myrank, scratch_size, symmetric_offset)); } else { team->scratch_addrs = scratch_addrs; gasneti_assert(! team->scratch_segs); gasneti_assert(! team->symmetric_scratch_offset); GASNETI_TRACE_PRINTF(W,("Team TM%x:%i scratch: size=%"PRIuSZ" non-symmetric", team->team_id, team->myrank, scratch_size)); } } else { gasneti_assert(team == GASNET_TEAM_ALL); gasneti_assert(gasnete_coll_auxseg_size); team->scratch_size = gasnete_coll_auxseg_size; gasneti_assert(! team->scratch_addrs); team->scratch_segs = gasneti_seginfo_aux; team->symmetric_scratch_offset = gasnete_coll_auxseg_offset; team->aux_seg_flag = GASNETI_FLAG_PEER_SEG_AUX; gasneti_assert(! team->rel2act_map); GASNETI_TRACE_PRINTF(W,("Team TM0:%i scratch: size=%"PRIuSZ" symmetric_offset=%"PRIuPTR" (auxseg)", gasneti_mynode, scratch_size, gasnete_coll_auxseg_offset)); } team->myscratch = team->scratch_size ? (void *)gasnete_coll_scratch_base(team, team->myrank) : NULL; #if GASNET_PAR && GASNET_DEBUG gasneti_mutex_init(&team->threads_mutex); #endif #if GASNET_DEBUG gasneti_mutex_init(&team->barrier_lock); #endif team->tree_geom_cache_head = NULL; team->tree_geom_cache_tail = NULL; gasneti_mutex_init(&team->tree_geom_cache_lock); team->tree_construction_scratch = NULL; team->dissem_cache_head = NULL; team->dissem_cache_tail = NULL; gasneti_mutex_init(&team->dissem_cache_lock); team->autotune_info = gasnete_coll_autotune_init(team GASNETI_THREAD_PASS); team->consensus_id = team->consensus_issued_id = 0xfffffff8; // Intentionally near to wrap-around gasnete_coll_alloc_new_scratch_status(team); gasneti_lifo_init(&team->scratch_free_list); gex_HSL_Init(&team->child.lock); gex_HSL_Init(&team->rexchgv.lock); #ifndef GASNETE_COLL_P2P_OVERRIDE gex_HSL_Init(&team->p2p_lock); team->p2p_freelist = NULL; for (int i = 0; i < GASNETE_COLL_P2P_TABLE_SIZE; ++i) { team->p2p_table[i] = NULL; } team->p2p_eager_buffersz = MAX(gasnete_coll_p2p_eager_min, team->total_ranks * gasnete_coll_p2p_eager_scale); #endif } /* Helper for gasnete_coll_team_alloc() */ static int gasnete_node_pair_sort_fn(const void *a_p, const void *b_p) { const int a0 = ((const gex_Rank_t *)a_p)[0]; const int b0 = ((const gex_Rank_t *)b_p)[0]; const int d0 = (a0 - b0); /* sort first by supernode */ if (d0) return d0; else { const int a1 = ((const gex_Rank_t *)a_p)[1]; const int b1 = ((const gex_Rank_t *)b_p)[1]; /* break ties by node - must be increasing order because * we use local rank to determine the active node */ return (a1 - b1); } } void gasnete_coll_team_init(gasnet_team_handle_t team, size_t scratch_size, gex_Addr_t *scratch_addrs, gex_Flags_t flags GASNETI_THREAD_FARG) { initialize_team_fields(team, scratch_size, scratch_addrs, flags GASNETI_THREAD_PASS); /* lock the team directory (team_dir) */ /* add the new team to the directory */ if (team_dir == NULL) { team_dir = gasnete_hashtable_create(TEAM_DIR_SIZE); gasneti_assert(team_dir != NULL); } gasnete_hashtable_insert(team_dir, team->team_id, team); #ifdef gasnete_coll_team_init_conduit /* conduit specific initialization for gasnet teams */ gasnete_coll_team_init_conduit(team); #endif /* unlock */ if (team->team_id) { gasnete_coll_barrier_init(team, GASNETE_COLL_BARRIER_ENVDEFAULT); } } void gasnete_coll_team_fini(gasnet_team_handle_t team) { gasneti_assert(team != NULL); team_id_free(team->team_id); /* free data members of the team, such as scratch space and etc. */ gasneti_free(team->rel2act_map); gasneti_free(team->peers.fwd); #if GASNET_PSHM gasneti_free(team->supernode_peers.fwd); #endif gasneti_free(team->scratch_addrs); gasnete_coll_autotune_free(team); gasnete_coll_free_scratch_status(team); gasnete_coll_local_tree_geom_purge(team); gasnete_coll_scratch_req_purge(team); gasnete_coll_p2p_purge(team); if (team->barrier_fini) team->barrier_fini(team); gasneti_assert(team_dir != NULL); gasnete_hashtable_remove(team_dir, team->team_id, NULL); #if !defined(GASNETE_COLL_P2P_OVERRIDE) && GASNET_DEBUG for (int i = 0; i < GASNETE_COLL_P2P_TABLE_SIZE; ++i) { /* Check that table is actually empty */ gasneti_assert(team->p2p_table[i] == NULL); } #endif #ifdef gasnete_coll_team_fini_conduit /* conduit specific initialization for gasnet teams */ gasnete_coll_team_fini_conduit(team); #endif } // Non-collective call to allocate local data and initialize some key fields gasnet_team_handle_t gasnete_coll_team_alloc( gex_Rank_t total_ranks, gex_Rank_t myrank, gex_Rank_t *rank_map) { gasnet_team_handle_t team = gasneti_calloc(1,sizeof(struct gasnete_coll_team_t_)); team->myrank = myrank; team->total_ranks = total_ranks; team->rel2act_map = rank_map; // Build peer lists if (total_ranks > 1) { unsigned int count = 0; for (gex_Rank_t i=1; ipeers.num = count; team->peers.fwd = gasneti_malloc(sizeof(gex_Rank_t) * count * 2); team->peers.bwd = team->peers.fwd + count; for (gex_Rank_t i=0; ipeers.fwd[i] = rank_map[(myrank + dist) % total_ranks]; team->peers.bwd[i] = rank_map[(myrank + total_ranks - dist) % total_ranks]; } } #if GASNET_PSHM // Build supernode stats { gex_Rank_t *node_vector, *supernodes; int count, rank; // A list with a representative for each supernode (for hierarchical comms) supernodes = gasneti_malloc(gasneti_nodemap_global_count * sizeof(gex_Rank_t)); /* Created a sorted vector of (supernode,node) for members of this team * while finding size of and rank in local supernode in the same pass */ count = 0; rank = -1; node_vector = gasneti_malloc(2 * total_ranks * sizeof(gex_Rank_t)); for (gex_Rank_t i = 0; i < total_ranks; ++i) { gex_Rank_t n = rank_map[i]; if (gasneti_pshm_jobrank_in_supernode(n)) { if (n == gasneti_mynode) rank = count; ++count; } node_vector[2*i+0] = gasneti_node2supernode(n); node_vector[2*i+1] = n; } qsort(node_vector, total_ranks, 2*sizeof(gex_Rank_t), &gasnete_node_pair_sort_fn); gasneti_assert((count > 0) && (count <= gasneti_nodemap_local_count)); gasneti_assert((rank >= 0) && (rank < gasneti_nodemap_local_count)); team->supernode.node_count = count; team->supernode.node_rank = rank; /* Count and enumerate unique supernodes and find my supernode's rank */ count = 1; rank = 0; supernodes[0] = node_vector[1]; for (gex_Rank_t i = 1; i < total_ranks; ++i) { if (node_vector[2*i] != node_vector[2*(i-1)]) { if (node_vector[2*i] == gasneti_nodemap_global_rank) rank = count; supernodes[count] = node_vector[2*i+1]; ++count; } } gasneti_free(node_vector); gasneti_assert((count > 0) && (count <= gasneti_nodemap_global_count)); gasneti_assert((rank >= 0) && (rank < gasneti_nodemap_global_count)); team->supernode.grp_count = count; team->supernode.grp_rank = rank; /* Construct a list of log(P) representatives at distance +2^i */ /* NOTE: 'count' and 'rank' are in the supernode space */ { unsigned int len = 0; for (gex_Rank_t i=1; isupernode_peers.num = len; team->supernode_peers.fwd = gasneti_malloc(sizeof(gex_Rank_t) * len); for (gex_Rank_t i=0; isupernode_peers.fwd[i] = supernodes[(rank + dist) % count]; } } gasneti_free(supernodes); } #endif return team; } // collective function that should be called by all ranks in the output team // Consumes the rank_map // Provides synchronization sufficient for use of output team // Requires a parent-scoped entry barrier due to use of "subteam" collectives gasnet_team_handle_t gasnete_coll_team_create( gasnet_team_handle_t parent, gex_Rank_t total_ranks, gex_Rank_t myrank, gex_Rank_t *rank_map, size_t scratch_size, gex_Addr_t *scratch_addrs, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnet_team_handle_t team = gasnete_coll_team_alloc(total_ranks, myrank, rank_map); gasnete_subteam_Init(parent, team GASNETI_THREAD_PASS); // Allocatate/communicate the new team's ID gasnete_subteam_ID(team GASNETI_THREAD_PASS); // Construct global scratch_addrs[] array gex_Addr_t *global_scratch_addrs = NULL; gex_Flags_t scratch_mask = GEX_FLAG_TM_GLOBAL_SCRATCH | GEX_FLAG_TM_LOCAL_SCRATCH | GEX_FLAG_TM_SYMMETRIC_SCRATCH | GEX_FLAG_TM_NO_SCRATCH; switch (flags & scratch_mask) { case GEX_FLAG_TM_GLOBAL_SCRATCH: global_scratch_addrs = gasneti_malloc(total_ranks * sizeof(gex_Addr_t)); memcpy(global_scratch_addrs, scratch_addrs, total_ranks * sizeof(gex_Addr_t)); break; case GEX_FLAG_TM_LOCAL_SCRATCH: global_scratch_addrs = gasneti_malloc(total_ranks * sizeof(gex_Addr_t)); gasnete_subteam_Exchange(team, scratch_addrs, sizeof(gex_Addr_t), global_scratch_addrs GASNETI_THREAD_PASS); break; case GEX_FLAG_TM_SYMMETRIC_SCRATCH: // TODO-EX: when implementing GEX_FLAG_SCRATCH_SEG_OFFSET, do not instatate an array global_scratch_addrs = gasneti_malloc(total_ranks * sizeof(gex_Addr_t)); for (gex_Rank_t r = 0; r < total_ranks; ++r) { global_scratch_addrs[r] = scratch_addrs[0]; } break; case GEX_FLAG_TM_NO_SCRATCH: scratch_size = 0; break; case 0: gasneti_fatalerror("No GEX_FLAG_TM_*_SCRATCH flags provided"); break; default: gasneti_fatalerror("Multiple GEX_FLAG_TM_*_SCRATCH flags provided"); break; } #if GASNET_DEBUG // Verify single-valued scratch_size size_t leader_scratch_size = myrank ? 0xcafef00d : scratch_size; gasnete_subteam_Broadcast(team, &leader_scratch_size, sizeof(leader_scratch_size) GASNETI_THREAD_PASS); gasneti_assert_uint(scratch_size ,==, leader_scratch_size); #endif gasnete_coll_team_init(team, scratch_size, global_scratch_addrs, flags GASNETI_THREAD_PASS); gasnete_subteam_Fini(team, 1 GASNETI_THREAD_PASS); return team; } int gasnete_coll_team_free(gasnet_team_handle_t team, gex_Memvec_t *scratch_p) { int result = 0; gasneti_assert(team != NULL); if (scratch_p && team->scratch_size) { // TODO: distinguish scratch allocated by GASNet result = 1; scratch_p->gex_addr = team->myscratch; scratch_p->gex_len = team->scratch_size; } gasnete_coll_team_fini(team); gasneti_free(team); return result; } typedef struct { int relrank; gex_Rank_t parent_rank; } gasnete_coll_split_sort_t; int gasnete_coll_split_sort_fn(const void *x, const void *y) { const gasnete_coll_split_sort_t *a = x; const gasnete_coll_split_sort_t *b = y; // Note that parent_ranks are distinct (never equal) if (a->relrank == b->relrank) return (a->parent_rank < b->parent_rank) ? -1 : 1; else return (a->relrank < b->relrank) ? -1 : 1; } gasnet_team_handle_t gasnete_coll_team_split(gasnet_team_handle_t parent, int mycolor, int myrelrank, size_t scratch_size, gex_Addr_t scratch_addr, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnet_team_handle_t newteam; gex_Rank_t new_total_ranks; gex_Rank_t new_myrank = GEX_RANK_INVALID; gex_Rank_t i, j; /* collect the arguments */ struct { gex_Rank_t color; gex_Rank_t relrank; } my_args, *all_args; my_args.color = mycolor; my_args.relrank = myrelrank; all_args = gasneti_malloc(sizeof(my_args) * parent->total_ranks); gasnet_coll_gather_all(parent, all_args, &my_args, sizeof(my_args), GASNET_COLL_LOCAL|GASNET_COLL_IN_MYSYNC | GASNET_COLL_OUT_MYSYNC); /* short-circuit if excluded */ if (mycolor == -1) { gasneti_free(all_args); return NULL; } /* pass 1: just count */ new_total_ranks = 0; for (i=0; itotal_ranks; i++) { new_total_ranks += (mycolor == all_args[i].color); } /* pass 2: collect and rank the members */ gasnete_coll_split_sort_t *members = gasneti_malloc(new_total_ranks*sizeof(gasnete_coll_split_sort_t)); for (i=j=0; itotal_ranks; i++) { if (mycolor == all_args[i].color) { members[j].parent_rank = i; members[j].relrank = all_args[i].relrank; j += 1; } } gasneti_assert(j == new_total_ranks); qsort(members, new_total_ranks, sizeof(gasnete_coll_split_sort_t), &gasnete_coll_split_sort_fn); // pass 3: collect jobranks of sorted members gex_Rank_t *rank_map = (gex_Rank_t *)gasneti_malloc(new_total_ranks*sizeof(gex_Rank_t)); for (i=0; i < new_total_ranks; i++) { j = members[i].parent_rank; if (j == parent->myrank) new_myrank = i; rank_map[i] = parent->team_id ? parent->rel2act_map[j] : j; } gasneti_assert(new_myrank != GEX_RANK_INVALID); gasneti_free(members); gasneti_free(all_args); /* It would be better to add some sanity check for team correctness here. */ /* create a team */ newteam = gasnete_coll_team_create(parent, new_total_ranks, new_myrank, rank_map, scratch_size, &scratch_addr, flags GASNETI_THREAD_PASS); return newteam; } gasnet_team_handle_t gasnete_coll_team_lookup(uint32_t team_id) { gasnet_team_handle_t team; if (team_id == 0) { team = GASNET_TEAM_ALL; } else { if (gasnete_hashtable_search(team_dir, team_id, (void **)&team)) { // did not find team_id in the hash table gasneti_fatalerror("Collective operation on invalid (destroyed?) TM%x", (unsigned int)team_id); } } return team; } void gasnete_print_team(gasnet_team_handle_t team, FILE *fp) { int i; fprintf(fp, "team id %x, total ranks %u, my rank %u\n", (unsigned int)team->team_id, (unsigned int)team->total_ranks, (unsigned int)team->myrank); fprintf(fp, "rel2act_map:\n"); for (i=0; itotal_ranks; i++) { fprintf(fp, "%u -> %u\n", i, (unsigned int)team->rel2act_map[i]); } fflush(fp); } /* ------------------------------------------------------------------------------------ */ // AM-based Collective Operations over a SUBSET of an existing "parent" team // Used in team construction // // Use must follow the pattern: // 1. Call gasnete_subteam_Init(parent, child) // Preconditions (satisfied in any order): // A. There must be a barrier synchronization over the parent team since the // previous use of gasnete_subteam_Fini(). In the case of gex_TM_Spilt(), // the GatherAll of (color,rel_rank) is sufficient. // 2. Call zero or more gasnete_subteam_*(child, ...) functions // Use the collectives as needed to construct the team. // 3. Call gasnete_subteam_Fini(child, do_sync) // A non-zero value of 'do_sync' argument requests a barrier synchronization // to prevent use of the constructed child team prior to global completion // of its construction. This may be omitted if such synchronization is // provided by other means. // // All steps above are collective over the members of the child team. // However no such restriction exists over the parent team. // // TODO-EX: multi-EP, especially Create using EPs not in parent // TODO-EX: remove THUNK_TM via gex_TM_Pair() // TODO-EX: revisit use of phase[2] vs sequence numbers (or similar) // TODO-EX: seek to remove requirement for an entry barrier over parent_tm // TODO-EX: determine if one can remove memory fences from start/end of initiators // BEGIN use of subteam collectives over a given parent void gasnete_subteam_Init( gasnete_coll_team_t parent, gasnete_coll_team_t child GASNETI_THREAD_FARG) { gasneti_assert(child->early_parent == NULL); gasneti_assert(parent->child.phase == 0); child->early_parent = parent; } // END use of subteam collectives // May include optional "exit barrier" over the child team void gasnete_subteam_Fini( gasnete_coll_team_t child, int do_sync GASNETI_THREAD_FARG) { gasneti_assert(child->early_parent); if (do_sync) gasnete_subteam_Barrier(child GASNETI_THREAD_PASS); child->early_parent->child.phase = 0; child->early_parent = NULL; } static uint8_t* gasnete_subteam_op_data(gasnete_coll_team_t parent, int phase, size_t size) { uint8_t *data = parent->child.data[phase]; if_pf (! data) { gex_HSL_Lock(&parent->child.lock); data = parent->child.data[phase]; if (! data) { data = gasneti_malloc(size); parent->child.data[phase] = data; } gex_HSL_Unlock(&parent->child.lock); } return data; } enum { gasnete_subteam_op_barrier, gasnete_subteam_op_broadcast, gasnete_subteam_op_exchange, gasnete_subteam_op_team_id, }; #define GASNETE_SUBTEAM_OP_ARG0(op,phase,step,seq) \ (gasnete_subteam_op_##op | ((phase)<<2) | ((step)<<3) | ((seq)<<8)) void gasnete_subteam_op_reqh( gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t parent_id, gex_AM_Arg_t nranks, gex_AM_Arg_t arg0, gex_AM_Arg_t arg1) { const int op = arg0 & 0x3; const int phase = (arg0 >> 2) & 1; const int step = (arg0 >> 3) & 0x1f; // Max 2^5 steps => 2^32 ranks const int seq = (arg0 >> 8); // Max 2^24 fragments * 512 => 8GB (and largest msg is elemsz*nranks/2) const int distance = (1 << step); gasneti_assert_uint(distance ,<, nranks); gasnete_coll_team_t parent = gasnete_coll_team_lookup(parent_id); switch (op) { case gasnete_subteam_op_barrier: // arg1 is unused gasneti_assert_uint(nbytes ,==, 0); gasneti_assert_int((int)gasneti_weakatomic32_read(&parent->child.step_rcvd[phase][step], 0) ,==, 0); gasneti_weakatomic32_set(&parent->child.step_rcvd[phase][step], 1, 0); break; case gasnete_subteam_op_broadcast: { // arg1 is size of one element uint8_t *data = gasnete_subteam_op_data(parent, phase, arg1); if (nbytes) { // not every message carries data. some are synchronization gasneti_assert(nbytes == arg1); GASNETI_MEMCPY(data, buf, nbytes); } gasneti_assert_int((int)gasneti_weakatomic32_read(&parent->child.step_rcvd[phase][step], 0) ,==, 0); gasneti_weakatomic32_set(&parent->child.step_rcvd[phase][step], 1, GASNETI_ATOMIC_REL); break; } case gasnete_subteam_op_exchange: { // arg1 is size of one element uint8_t *data = gasnete_subteam_op_data(parent, phase, nranks*arg1); uint8_t *dest = data + (arg1 * distance) + (seq * gex_AM_LUBRequestMedium()); gasneti_assert_ptr(dest + nbytes ,<=, data + arg1 * nranks); GASNETI_MEMCPY(dest, buf, nbytes); gasneti_weakatomic32_increment(&parent->child.step_rcvd[phase][step], GASNETI_ATOMIC_REL); break; } case gasnete_subteam_op_team_id: { // arg1 is the (non-zero) new team id gasneti_assert_uint(nbytes ,==, 0); gasneti_assert_uint(arg1 ,!=, 0); gasneti_assert_int((int)gasneti_weakatomic32_read(&parent->child.team_id, 0) ,==, 0); gasneti_weakatomic32_set(&parent->child.team_id, arg1, 0); break; } default: gasneti_unreachable_error(("Unknown op: %i",op)); } } void gasnete_subteam_Barrier( gasnete_coll_team_t child GASNETI_THREAD_FARG) { gasnete_coll_team_t parent = child->early_parent; gasneti_assert(parent != NULL); const int phase = parent->child.phase; gex_Rank_t nranks = child->total_ranks; gex_Rank_t myrank = child->myrank; gasneti_sync_reads(); if (nranks == 1) goto out; // Dissemination barrier for (unsigned int step = 0, distance = 1; distance < nranks; ++step, distance *= 2) { gex_Rank_t jobrank = child->peers.fwd[step]; // Send payload using 0-byte AMMedium due to sharing single handler gex_AM_Arg_t arg0 = GASNETE_SUBTEAM_OP_ARG0(barrier, phase, step, 0); gex_AM_RequestMedium(gasneti_THUNK_TM, jobrank, _hidx_gasnete_subteam_op_reqh, NULL, 0, GEX_EVENT_NOW, 0, parent->team_id, nranks, arg0, 0); // Poll until we have received for the current step GASNET_BLOCKUNTIL((int)gasneti_weakatomic32_read(&parent->child.step_rcvd[phase][step], 0) == 1); gasneti_weakatomic32_set(&parent->child.step_rcvd[phase][step], 0, 0); // reset } out: gasneti_sync_writes(); parent->child.phase ^= 1; } // Root is always rank 0 // In-place on root (and thus a single pointer argument) // // This implementation provides a full barrier synchronization required for the // use of phase[], but this does NOT ensure all ranks have received the // broadcast prior to return on any given ranks. void gasnete_subteam_Broadcast( gasnete_coll_team_t child, void *ptr, size_t elemsz GASNETI_THREAD_FARG) { gasneti_assert_uint(elemsz ,<=, gex_AM_LUBRequestMedium()); gasnete_coll_team_t parent = child->early_parent; gasneti_assert(parent != NULL); const int phase = parent->child.phase; gex_Rank_t nranks = child->total_ranks; gex_Rank_t myrank = child->myrank; gasneti_sync_reads(); if (nranks == 1) goto out; uint8_t *data = gasnete_subteam_op_data(parent, phase, elemsz); if (!myrank) { GASNETI_MEMCPY(data, ptr, elemsz); } // Essentially an AllgatherV with len=elemsz on rank 0, and zero on all others gex_Rank_t recv_count = 0; for (unsigned int step = 0, distance = 1; distance < nranks; ++step, distance *= 2) { gex_Rank_t jobrank = child->peers.fwd[step]; // Send payload using AMMedium size_t nbytes = (recv_count >= myrank) ? elemsz : 0; // non-zero if have recv'd data from rank 0 gex_AM_Arg_t arg0 = GASNETE_SUBTEAM_OP_ARG0(broadcast, phase, step, 0); gex_AM_RequestMedium(gasneti_THUNK_TM, jobrank, _hidx_gasnete_subteam_op_reqh, data, nbytes, GEX_EVENT_NOW, 0, parent->team_id, nranks, arg0, (uint32_t)elemsz); // Poll until we have received for the current step GASNET_BLOCKUNTIL((int)gasneti_weakatomic32_read(&parent->child.step_rcvd[phase][step], 0) == 1); gasneti_weakatomic32_set(&parent->child.step_rcvd[phase][step], 0, 0); // reset recv_count += distance; } if (myrank) { GASNETI_MEMCPY(ptr, data, elemsz); } gasneti_free(data); parent->child.data[phase] = NULL; out: gasneti_sync_writes(); parent->child.phase ^= 1; } void gasnete_subteam_Exchange( gasnete_coll_team_t child, void *src, size_t elemsz, void *dst GASNETI_THREAD_FARG) { gasneti_assert(elemsz); gasnete_coll_team_t parent = child->early_parent; gasneti_assert(parent != NULL); const int phase = parent->child.phase; gex_Rank_t nranks = child->total_ranks; gex_Rank_t myrank = child->myrank; gasneti_sync_reads(); if (nranks == 1) { GASNETI_MEMCPY_SAFE_IDENTICAL(dst, src, elemsz); goto out; } uint8_t *data = gasnete_subteam_op_data(parent, phase, nranks*elemsz); // copy in local contribution GASNETI_MEMCPY(data, src, elemsz); // Bruck's concatenation algorithm: for (unsigned int step = 0, distance = 1; distance < nranks; ++step, distance *= 2) { gex_Rank_t jobrank = child->peers.bwd[step]; size_t nbytes = elemsz * MIN(distance, nranks - distance); size_t offset = 0; uint32_t seq = 0; // Send payload using AMMedium(s) do { const gex_AM_Arg_t arg0 = GASNETE_SUBTEAM_OP_ARG0(exchange, phase, step, seq); const size_t to_xfer = MIN(nbytes, gex_AM_LUBRequestMedium()); gex_AM_RequestMedium(gasneti_THUNK_TM, jobrank, _hidx_gasnete_subteam_op_reqh, data + offset, to_xfer, GEX_EVENT_NOW, 0, parent->team_id, nranks, arg0, (uint32_t)elemsz); ++seq; offset += to_xfer; nbytes -= to_xfer; } while (nbytes); // Poll until we have received the same number of messages as we sent GASNET_BLOCKUNTIL((int)gasneti_weakatomic32_read(&parent->child.step_rcvd[phase][step], 0) >= (int)seq); gasneti_assert_int((int)gasneti_weakatomic32_read(&parent->child.step_rcvd[phase][step], 0) ,==, (int)seq); gasneti_weakatomic32_set(&parent->child.step_rcvd[phase][step], 0, 0); // reset } // Copy to final destination while performing the rotation const size_t a = elemsz * (nranks - myrank); const size_t b = elemsz * myrank; GASNETI_MEMCPY_SAFE_EMPTY(dst, data + a, b); GASNETI_MEMCPY_SAFE_EMPTY((uint8_t*)dst + b, data, a); gasneti_assert(!memcmp((uint8_t*)dst + myrank*elemsz, src, elemsz)); gasneti_free(data); parent->child.data[phase] = NULL; out: gasneti_sync_writes(); parent->child.phase ^= 1; } void gasnete_subteam_ID( gasnete_coll_team_t child GASNETI_THREAD_FARG) { gasnete_coll_team_t parent = child->early_parent; gasneti_assert(parent != NULL); gex_Rank_t nranks = child->total_ranks; gex_Rank_t myrank = child->myrank; uint32_t new_team_id; if (!myrank) { // the team leader (rank 0) allocates the new team_id uint32_t low_bits = team_id_alloc(); new_team_id = low_bits | (gasneti_mynode << GASNETE_COLL_TEAM_ID_BITS); } else { // Non-leader polls until we have received the datum gasneti_polluntil (0 != (new_team_id = gasneti_weakatomic32_read(&parent->child.team_id, 0))); gasneti_weakatomic32_set(&parent->child.team_id, 0, 0); } // Send to children in a binomial tree gex_Rank_t subtree = myrank ? (myrank & -myrank) : nranks; if (subtree > 1) { for (int step = gasnete_coll_log2_rank(subtree - 1); step >= 0; --step) { if (myrank + (1 << step) >= nranks) continue; gex_Rank_t jobrank = child->peers.fwd[step]; const gex_AM_Arg_t arg0 = GASNETE_SUBTEAM_OP_ARG0(team_id, 0, 0, 0); gex_AM_RequestMedium(gasneti_THUNK_TM, jobrank, _hidx_gasnete_subteam_op_reqh, NULL, 0, GEX_EVENT_NOW, 0, parent->team_id, nranks, arg0, new_team_id); } } child->team_id = new_team_id; } /* ------------------------------------------------------------------------------------ */ // Blocking Rotated, ExchangeV utility function // // Takes only local data and length, and computes (and returns) the total length. // Returns data address via *dst_p // Returns optional lengths array via *len_p, if non-NULL. // Both arrays are dynamically allocated and the caller is responsible for freeing them. // In the event of an "empty" result (returning 0) both pointers returns are NULL; // // In order to avoid the cost (time and space) of an in-memory rotation, this // implementation does not return its result in the normal [0...nranks) order. // Instead the data starts with the local contribution, followed by the remaining // ranks in order with wrap-around: // myrank, (myrank+1)%nranks, (myrank+2)%nranks, ... // A caller can index the data in "normal" order with some modular arithmetic. // // Boundaries between the variable contributions can be determined by examining // the (optional) array of lengths available via len_p. Note that this array // is in the same rotated order as the data buffer. // // TODO-EX: use relevant gex_Coll_*() facilities, if any, when available // TODO-EX: support for total_len > 2^32 static void * gasnete_rexchgv_data(gasnete_coll_team_t team, int phase, size_t size) { uint8_t *data = team->rexchgv.data[phase]; if_pf (! data) { gex_HSL_Lock(&team->rexchgv.lock); data = team->rexchgv.data[phase]; if (! data) { data = gasneti_malloc(size); team->rexchgv.data[phase] = data; } gex_HSL_Unlock(&team->rexchgv.lock); } return data; } // It is not permissible to omit zero-length transfers from the second // ExchangeV, because their synchronization side-effect is required. However, // adding nbytes==0 to rexchgv.rcvd[phase][step] does not provide any signal of // the arrival. So, we replace zero by an arbitrary non-zero value in the rcvd // accounting. #define gasnete_rexchgv_zero_recvd 42 void gasnete_rexchgv_reqh( gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t team_id, gex_AM_Arg_t arg1, gex_AM_Arg_t total_len, gex_AM_Arg_t offset) { gasnete_coll_team_t team = gasnete_coll_team_lookup(team_id); int phase = arg1 & 1; int step = arg1 >> 1; uint8_t *data = gasnete_rexchgv_data(team, phase, total_len); GASNETI_MEMCPY(data + (uint32_t)offset, buf, nbytes); size_t increment = nbytes ? nbytes : gasnete_rexchgv_zero_recvd; gasneti_weakatomic32_add(&team->rexchgv.rcvd[phase][step], increment, GASNETI_ATOMIC_REL); } size_t gasneti_blockingRotatedExchangeV( gex_TM_t tm, GASNETI_BUG4227_CONST void *src, size_t len, void **dst_p, size_t **len_p) { GASNET_BEGIN_FUNCTION(); // TODO: remove this lookup gasnete_coll_team_t team = gasneti_import_tm_nonpair(tm)->_coll_team; uint32_t team_id = team->team_id; gex_Rank_t self = gex_TM_QueryRank(tm); gex_Rank_t team_sz = gex_TM_QuerySize(tm); int steps = 0; // ceil(log_2(team_sz)); for (gex_Rank_t tmp = team_sz-1; tmp; tmp >>= 1) ++steps; // Without the following hint, some gcc versions warn about massive malloc sizes below gasneti_assume(steps <= 8*sizeof(gex_Rank_t)); int phase = team->rexchgv.phase; gasneti_assert(phase == 0 || phase == 1); gex_Event_t event0 = GEX_EVENT_INVALID; gex_Event_t event1 = GEX_EVENT_INVALID; // // Step 1. Exchange the lengths using Bruck's concatenation algorithm // The final rotation is omitted, saving time and space, as well as greatly // simplifying the index arithmetic in the next step. // size_t len_array_sz = team_sz * sizeof(len); uint8_t *data0 = gasnete_rexchgv_data(team, phase, len_array_sz); GASNETI_MEMCPY(data0, &len, sizeof(len)); gex_NBI_BeginAccessRegion(0); for (unsigned int step = 0, distance = 1; step < steps; ++step, distance *= 2) { // Send data using stream of AMMediums gex_Rank_t dest_rank = (self + team_sz - distance) % team_sz; uint32_t offset = distance * sizeof(len); uint32_t nbytes = MIN(offset, len_array_sz - offset); uint32_t sent = 0; uint32_t arg1 = phase | (step << 1); size_t limit = gex_AM_MaxRequestMedium(tm,dest_rank,GEX_EVENT_GROUP,0,4); do { const uint32_t to_xfer = MIN(nbytes - sent, limit); gex_AM_RequestMedium4(tm, dest_rank, _hidx_gasnete_rexchgv_reqh, data0 + sent, to_xfer, GEX_EVENT_GROUP, 0, team_id, arg1, len_array_sz, offset + sent); sent += to_xfer; } while (sent < nbytes); // Wait to receive this step's data GASNET_BLOCKUNTIL(gasneti_weakatomic32_read(&team->rexchgv.rcvd[phase][step], 0) >= nbytes); gasneti_assert_uint(gasneti_weakatomic32_read(&team->rexchgv.rcvd[phase][step], 0) ,==, nbytes); gasneti_weakatomic32_set(&team->rexchgv.rcvd[phase][step], 0, 0); // reset } event0 = gex_NBI_EndAccessRegion(0); // reset/advance team->rexchgv.data[phase] = NULL; phase ^= 1; // // Step 2. Compute sum and 2*log(P) partial sums // Indexing is nearly trivial due to omitting the rotation of the lengths array // size_t *len_array = (size_t *)data0; // NOTE: final rotation omitted // Total size: size_t total_len = 0; // Local received size and per-step partials: size_t l_sum = 0; size_t *l_sums = gasneti_malloc(sizeof(size_t) * (steps+1)); // Remote received size and per-step partials: size_t r_sum = 0; size_t *r_sums = gasneti_malloc(sizeof(size_t) * steps); // Indexing from both ends: int fwd_idx = 0, bwd_idx = team_sz - 1; for (int i = 0; i < steps; ++i) { int step_sz = 1 << MAX(0,i-1); // 1,1,2,4,8,... for (int j = 0; j < step_sz && bwd_idx; ++j) { total_len += len_array[fwd_idx]; r_sum += len_array[bwd_idx--]; l_sum += len_array[fwd_idx++]; } l_sums[i] = l_sum; r_sums[i] = r_sum; } while (fwd_idx < team_sz) { total_len += len_array[fwd_idx++]; } l_sums[steps] = total_len; // This code is for slinging metadata, not user data. // As such, we've assumed 32-bit (single handler argument) sizes and offsets // are sufficient to this purpose. if_pf ((uint64_t)total_len > UINT32_MAX) { gasneti_fatalerror("blockingRotatedExchangeV size limit of 4GB exceeded: total_len=%"PRIuSZ, total_len); } if (! total_len) { // Empty! *dst_p = NULL; goto out_zero_len; } // // Step 3. Bruck's concatenation algorithm generalized for variable lengths // uint8_t *data1 = gasnete_rexchgv_data(team, phase, total_len); GASNETI_MEMCPY_SAFE_EMPTY(data1, src, len); gex_NBI_BeginAccessRegion(0); for (unsigned int step = 0, distance = 1; step < steps; ++step, distance *= 2) { // Send data using stream of AMMediums gex_Rank_t dest_rank = (self + team_sz - distance) % team_sz; uint32_t offset = r_sums[step]; uint32_t nbytes = MIN(l_sums[step], total_len - offset); uint32_t sent = 0; uint32_t arg1 = phase | (step << 1); size_t limit = gex_AM_MaxRequestMedium(tm,dest_rank,GEX_EVENT_GROUP,0,4); do { // Note: must not skip nbytes==0 case, since message is needed for synchronization const uint32_t to_xfer = MIN(nbytes - sent, limit); gex_AM_RequestMedium4(tm, dest_rank, _hidx_gasnete_rexchgv_reqh, data1 + sent, to_xfer, GEX_EVENT_GROUP, 0, team_id, arg1, total_len, offset + sent); sent += to_xfer; } while (sent < nbytes); // Wait to receive this step's data (if any) uint32_t to_recv = l_sums[step+1] - l_sums[step]; if (!to_recv) to_recv = gasnete_rexchgv_zero_recvd; // a non-zero value used for zero-length recv GASNET_BLOCKUNTIL(gasneti_weakatomic32_read(&team->rexchgv.rcvd[phase][step], 0) >= to_recv); gasneti_assert_uint(gasneti_weakatomic32_read(&team->rexchgv.rcvd[phase][step], 0) ,==, to_recv); gasneti_weakatomic32_set(&team->rexchgv.rcvd[phase][step], 0, 0); // reset } event1 = gex_NBI_EndAccessRegion(0); // reset/advance team->rexchgv.data[phase] = NULL; phase ^= 1; *dst_p = data1; out_zero_len: team->rexchgv.phase = phase; gasneti_free(r_sums); gasneti_free(l_sums); gex_Event_Wait(event0); // Source data in len_array if (total_len && len_p) { *len_p = len_array; } else { // Either len_array is empty, or caller didn't request it if (len_p) *len_p = NULL; gasneti_free(len_array); } gex_Event_Wait(event1); // Source data in data1 return total_len; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/extended-ref/coll/gasnet_scratch.c0000664000175000017500000005114615142313673022070 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_scratch.c $ * Description: Reference implemetation of GASNet Collectives team * Copyright 2009, Rajesh Nishtala , Paul H. Hargrove , Dan Bonachea * Terms of use are as specified in license.txt */ #include #ifndef GASNETE_COLL_SCRATCH_DEBUG_PRINTS #define GASNETE_COLL_SCRATCH_DEBUG_PRINTS 0 #endif struct gasnete_coll_scratch_config_t_; typedef struct gasnete_coll_scratch_config_t_ gasnete_coll_scratch_config_t; struct gasnete_coll_node_scratch_status_t_ { /*head and tail of the circular buffer that represents the active scratch space on a particular node*/ uintptr_t head; /*since the tail is the only one that gets updated by the active message handlers it needs to be the atomic one*/ gasneti_weakatomic_t reset_signal_sent; gasneti_weakatomic_val_t reset_signal_recv; }; struct gasnete_coll_scratch_config_t_ { gasnete_coll_op_type_t op_type; gasnete_coll_tree_type_t tree_type; gex_Rank_t root; gasnete_coll_tree_dir_t tree_dir; gasnete_coll_scratch_req_t *op_list_head; gasnete_coll_scratch_req_t **op_list_tail_p; /* these should be ignored when the config is active*/ gasnete_coll_scratch_config_t *next; gasnete_coll_scratch_config_t **prev_p; /* this should be ignored when the config is waiting*/ /*nodes that will send to me*/ int numpeers, maxpeers; gex_Rank_t *peers; // A short peers array // TODO: this could be a flexible array member sized according to team size? gex_Rank_t inline_peers[GASNETE_COLL_NUM_INLINE_IN_PEERS]; }; struct gasnete_coll_scratch_status_t_ { gasnete_coll_scratch_config_t active_config_and_ops; gasnete_coll_scratch_config_t *waiting_config_and_ops_head; gasnete_coll_scratch_config_t **waiting_config_and_ops_tail_p; gasnete_coll_node_scratch_status_t *node_status; uint8_t scratch_empty; uint8_t clear_signal_sent; gasnete_coll_team_t team; }; void gasnete_coll_alloc_new_scratch_status(gasnete_coll_team_t team) { gasnete_coll_scratch_status_t *stat; int i; stat = (gasnete_coll_scratch_status_t*) gasneti_calloc(1,sizeof(gasnete_coll_scratch_status_t)); stat->node_status = (gasnete_coll_node_scratch_status_t*)gasneti_malloc(sizeof(gasnete_coll_node_scratch_status_t)*team->total_ranks); stat->waiting_config_and_ops_tail_p = & stat->waiting_config_and_ops_head; stat->team = team; stat->scratch_empty = 1; stat->clear_signal_sent = 0; for(i=0; itotal_ranks; i++) { stat->node_status[i].head = 0; gasneti_weakatomic_set(&(stat->node_status[i].reset_signal_sent),0,0); stat->node_status[i].reset_signal_recv = 0; } // Initialize active_config_and_ops stat->active_config_and_ops.root = GEX_RANK_INVALID; stat->active_config_and_ops.op_list_tail_p = &stat->active_config_and_ops.op_list_head; stat->active_config_and_ops.peers = stat->active_config_and_ops.inline_peers; stat->active_config_and_ops.maxpeers = GASNETE_COLL_NUM_INLINE_IN_PEERS; team->scratch_status = stat; } void gasnete_coll_free_scratch_status(gasnete_coll_team_t team) { gasnete_coll_scratch_status_t *stat = team->scratch_status; gasneti_free(stat->node_status); gasneti_free(stat); } void gasnete_coll_scratch_send_updates(gasnete_coll_team_t team, uint32_t seq) { gasnete_coll_scratch_config_t *config = &team->scratch_status->active_config_and_ops; for (int i = 0; i < config->numpeers; i++) { gex_AM_RequestShort(team->e_tm, config->peers[i], gasneti_handleridx(gasnete_coll_scratch_update_reqh), 0, team->team_id, team->myrank); #if GASNETE_COLL_SCRATCH_DEBUG_PRINTS gasneti_console_message("COLL INFO","%u> CLEAR!->%u", seq, config->peers[i]); #endif } } void gasnete_coll_scratch_update_reqh(gex_Token_t token, gex_AM_Arg_t teamid, gex_AM_Arg_t node) { gasnete_coll_team_t team; gasnete_coll_scratch_status_t *stat; team = gasnete_coll_team_lookup(teamid); stat = team->scratch_status; gasneti_assert(stat); gasneti_assert(stat->node_status); gasneti_weakatomic_increment(&(stat->node_status[node].reset_signal_sent),0); } /***************************/ GASNETI_INLINE(gasnete_coll_scratch_compare_config) uint8_t gasnete_coll_scratch_compare_config(gasnete_coll_scratch_config_t *A, gasnete_coll_scratch_req_t *scratch_req) { gasneti_assert(A); if((A->root != scratch_req->root) || !gasnete_coll_compare_tree_types(A->tree_type, scratch_req->tree_type) || A->op_type != scratch_req->op_type || A->tree_dir != scratch_req->tree_dir) return 0; else return 1; } // Init data fields, not linkage GASNETI_INLINE(gasnete_coll_scratch_init_config) void gasnete_coll_scratch_init_config(gasnete_coll_scratch_config_t *config, gasnete_coll_scratch_req_t *scratch_req) { config->root = scratch_req->root; config->tree_type = scratch_req->tree_type; config->op_type = scratch_req->op_type; config->tree_dir = scratch_req->tree_dir; } // Protected by gasnete_coll_poll_lock static gasnete_coll_scratch_config_t *gasnete_coll_scratch_config_free_list = NULL; GASNETI_INLINE(gasnete_coll_scratch_allocate_new_config) gasnete_coll_scratch_config_t * gasnete_coll_scratch_allocate_new_config(void) { gasneti_mutex_assertlocked(&gasnete_coll_poll_lock); gasnete_coll_scratch_config_t *ret; ret = gasnete_coll_scratch_config_free_list; if (ret) { gasnete_coll_scratch_config_free_list = ret->next; } else { ret = gasneti_malloc(sizeof(gasnete_coll_scratch_config_t)); } ret->numpeers = 0; ret->op_list_head = NULL; ret->op_list_tail_p = &ret->op_list_head; return ret; } GASNETI_INLINE(gasnete_coll_scratch_free_config) void gasnete_coll_scratch_free_config(gasnete_coll_scratch_config_t *config) { gasneti_mutex_assertlocked(&gasnete_coll_poll_lock); config->next = gasnete_coll_scratch_config_free_list; gasnete_coll_scratch_config_free_list = config; } /* add the op to the tail of the configuration*/ GASNETI_INLINE(gasnete_coll_scratch_add_op_to_config) void gasnete_coll_scratch_add_op_to_config(gasnete_coll_scratch_config_t *config, gasnete_coll_scratch_req_t* req) { gasneti_assert(config->tree_dir == req->tree_dir); req->next = NULL; *config->op_list_tail_p = req; req->prev_p = config->op_list_tail_p; config->op_list_tail_p = &req->next; } /* remove the first op from the configuration and return it*/ GASNETI_INLINE(gasnete_coll_scratch_remove_first_op_from_config) gasnete_coll_scratch_req_t* gasnete_coll_scratch_remove_first_op_from_config(gasnete_coll_scratch_config_t *config) { gasnete_coll_scratch_req_t *ret; gasneti_assert(config->op_list_head !=NULL); ret = config->op_list_head; *ret->prev_p = ret->next; if (ret->next) { ret->next->prev_p = ret->prev_p; } else { config->op_list_tail_p = ret->prev_p; } ret->prev_p = NULL; ret->next = NULL; return ret; } GASNETI_INLINE(gasnete_coll_scratch_add_to_wait) void gasnete_coll_scratch_add_to_wait(gasnete_coll_scratch_req_t *scratch_req, gasnete_coll_op_t* op) { gasnete_coll_scratch_status_t *stat = scratch_req->team->scratch_status; gasnete_coll_scratch_config_t *temp; gasneti_assert(op->waiting_scratch_op == 0); op->waiting_scratch_op = 1; op->active_scratch_op = 0; temp = stat->waiting_config_and_ops_head ? gasneti_container_of(stat->waiting_config_and_ops_tail_p, gasnete_coll_scratch_config_t, next) : NULL; if (!temp || !gasnete_coll_scratch_compare_config(temp, scratch_req)) { /* attach to the end of the list*/ temp = gasnete_coll_scratch_allocate_new_config(); gasnete_coll_scratch_init_config(temp, scratch_req); *stat->waiting_config_and_ops_tail_p = temp; temp->prev_p = stat->waiting_config_and_ops_tail_p; stat->waiting_config_and_ops_tail_p = &temp->next; temp->next = NULL; } gasnete_coll_scratch_add_op_to_config(temp, scratch_req); } GASNETI_INLINE(gasnete_coll_scratch_remove_first_waiting_op) void gasnete_coll_scratch_remove_first_waiting_op(gasnete_coll_scratch_status_t *stat) { (void) gasnete_coll_scratch_remove_first_op_from_config(stat->waiting_config_and_ops_head); if (! stat->waiting_config_and_ops_head->op_list_head) { gasnete_coll_scratch_config_t *temp = stat->waiting_config_and_ops_head; stat->waiting_config_and_ops_head = temp->next; if (temp->next) { temp->next->prev_p = temp->prev_p; } else { stat->waiting_config_and_ops_tail_p = temp->prev_p; } gasnete_coll_scratch_free_config(temp); } } GASNETI_INLINE(gasnete_coll_scratch_reconfigure) void gasnete_coll_scratch_reconfigure(gasnete_coll_scratch_status_t *stat, gasnete_coll_scratch_req_t *req) { gasnete_coll_scratch_config_t *config = &stat->active_config_and_ops; gasneti_assert(!config->op_list_head); // must be empty of ops if (! gasnete_coll_scratch_compare_config(config, req)) { /* set the new config and the information about who will send to me */ config->op_type = req->op_type; config->tree_type = req->tree_type; config->root = req->root; config->tree_dir = req->tree_dir; size_t n = req->num_in_peers; config->numpeers = n; if (n) { size_t space = n * sizeof(gex_Rank_t); if_pf (n > config->maxpeers) { if (config->peers != config->inline_peers) { gasneti_free(config->peers); } config->peers = gasneti_malloc(space); config->maxpeers = n; } GASNETI_MEMCPY(config->peers, req->in_peers, space); } } } GASNETI_INLINE(gasnete_coll_scratch_check_local_alloc) uint8_t gasnete_coll_scratch_check_local_alloc(gasnete_coll_scratch_req_t *req, gasnete_coll_scratch_status_t *stat) { return (req->incoming_size + stat->node_status[req->team->myrank].head <= req->team->scratch_size); } GASNETI_INLINE(gasnete_coll_scratch_make_local_alloc) uintptr_t gasnete_coll_scratch_make_local_alloc(gasnete_coll_scratch_req_t *req, gasnete_coll_scratch_status_t *stat) { uintptr_t ret; ret = stat->node_status[req->team->myrank].head; stat->node_status[req->team->myrank].head += req->incoming_size; return ret; } GASNETI_INLINE(gasnete_coll_scratch_check_remote_clear) uint8_t gasnete_coll_scratch_check_remote_clear(gasnete_coll_scratch_req_t *req, gasnete_coll_scratch_status_t *stat) { const gex_Rank_t n = req->num_out_peers; for (gex_Rank_t i = 0; i < n; i++) { const gex_Rank_t peer = req->out_peers[i]; if (gasneti_weakatomic_read(&(stat->node_status[peer].reset_signal_sent),0) == stat->node_status[peer].reset_signal_recv) { return 0; } } /* reset all the signals once we get all of them */ for (gex_Rank_t i = 0; i < n; i++) { const gex_Rank_t peer = req->out_peers[i]; stat->node_status[peer].reset_signal_recv += 1; stat->node_status[peer].reset_signal_recv &= GASNETI_ATOMIC_MAX; stat->node_status[peer].head = 0; } return 1; } GASNETI_INLINE(gasnete_coll_scratch_check_remote_alloc) uint8_t gasnete_coll_scratch_check_remote_alloc(gasnete_coll_scratch_req_t *req, gasnete_coll_scratch_status_t *stat) { const gex_Rank_t n = req->num_out_peers; const int is_dissem = (req->op_type == GASNETE_COLL_DISSEM_OP); for (gex_Rank_t i = 0; i < n; i++) { const gex_Rank_t peer = req->out_peers[i]; if (stat->node_status[peer].head + req->out_sizes[is_dissem ? 0 : i] > req->team->scratch_size) { /* remote space is full */ if (gasneti_weakatomic_read(&(stat->node_status[peer].reset_signal_sent),0) == stat->node_status[peer].reset_signal_recv) { return 0; } else { stat->node_status[peer].head = 0; stat->node_status[peer].reset_signal_recv += 1; stat->node_status[peer].reset_signal_recv &= GASNETI_ATOMIC_MAX; } } } return 1; } GASNETI_INLINE(gasnete_coll_scratch_make_remote_alloc) void gasnete_coll_scratch_make_remote_alloc(gasnete_coll_scratch_req_t *req, gasnete_coll_scratch_status_t *stat, uintptr_t *rem_pos) { const int is_dissem = (req->op_type == GASNETE_COLL_DISSEM_OP); for (gex_Rank_t i=0; inum_out_peers; i++) { const gex_Rank_t peer = req->out_peers[i]; rem_pos[i] = stat->node_status[peer].head; stat->node_status[peer].head += req->out_sizes[is_dissem ? 0 : i]; } } int8_t gasnete_coll_scratch_alloc_nb(gasnete_coll_op_t* op GASNETI_THREAD_FARG) { gasnete_coll_scratch_req_t *scratch_req = op->scratch_req; gasnete_coll_scratch_status_t *stat = scratch_req->team->scratch_status; gasneti_assert(scratch_req); gasneti_assert(stat); gasneti_assert(op->waiting_scratch_op == 0 || op->waiting_scratch_op == 1); /*if the incoming size is greater than the total allocated scratch space signal an error*/ if_pf (!op->waiting_scratch_op && scratch_req->incoming_size > scratch_req->team->scratch_size) { gasneti_fatalerror("%d> collective requires temporary storage (%"PRIuPTR" bytes) which is greater than total scratch space (%"PRIuPTR" bytes)\nIncrease size of collective scratch space through GASNET_COLL_SCRATCH_SIZE environment variable to at least %"PRIuPTR" bytes\n", (int)scratch_req->team->myrank, (uintptr_t)scratch_req->incoming_size, (uintptr_t)scratch_req->team->scratch_size, (uintptr_t)scratch_req->incoming_size); } if(op->waiting_scratch_op) { /* this operation is already on the wait queue */ /* check if this op is at the head of the wait queue (do not modify the wait queue until we know the op can be activated)*/ gasneti_assert(stat->waiting_config_and_ops_head); gasneti_assert(stat->waiting_config_and_ops_head->op_list_head); if(stat->waiting_config_and_ops_head->op_list_head->op != op) { /* operation is not at the head of the wait queue so return an allocate fail*/ return 0; } } else if (stat->waiting_config_and_ops_head) { /* i go at the end of the wait queue*/ gasnete_coll_scratch_add_to_wait(scratch_req, op); #if GASNETE_COLL_SCRATCH_DEBUG_PRINTS gasneti_console_message("COLL INFO","%u> op added to wait (wait queue non empty)", op->sequence); #endif return 0; } /* if we get here then op is a new op w/ no ops waiting or it is the first on the wait queue */ /* gasneti_console_message("COLL INFO","%d> polling scratch", op->sequence);*/ if(op->waiting_for_reconfig_clear || (!gasnete_coll_scratch_compare_config(&stat->active_config_and_ops, scratch_req) && !stat->active_config_and_ops.op_list_head)) { /* empty scratch space is misconfigured*/ if(!op->waiting_for_reconfig_clear) { gasnete_coll_scratch_reconfigure(stat, scratch_req); } if(stat->clear_signal_sent==0) { stat->node_status[scratch_req->team->myrank].head = 0; /* send a clear signal to the new peers*/ gasnete_coll_scratch_send_updates(scratch_req->team, op->sequence); stat->clear_signal_sent=1; /* make sure clear signal is sent only once per drain cycle*/ } op->waiting_for_reconfig_clear=1; if(gasnete_coll_scratch_check_remote_clear(scratch_req, stat)) { stat->scratch_empty = 0; stat->clear_signal_sent = 0; op->active_scratch_op = 1; /* move it from the waiting to the active list*/ if(op->waiting_scratch_op) { gasneti_assert(stat->waiting_config_and_ops_head->op_list_head == scratch_req); gasnete_coll_scratch_remove_first_waiting_op(stat); op->waiting_scratch_op = 0; } gasnete_coll_scratch_add_op_to_config(&stat->active_config_and_ops, scratch_req); /* return the appropriate amount of local/remote scratch space*/ #if GASNETE_COLL_SCRATCH_DEBUG_PRINTS gasneti_console_message("COLL INFO","%u> op allocating scratch", op->sequence); #endif op->myscratchpos = gasnete_coll_scratch_make_local_alloc(scratch_req, stat); gasnete_coll_scratch_alloc_pos(scratch_req); gasnete_coll_scratch_make_remote_alloc(scratch_req, stat, op->scratchpos); return 1; } else { /* local or remote allocation failed*/ if(!op->waiting_scratch_op) { gasnete_coll_scratch_add_to_wait(scratch_req, op); #if GASNETE_COLL_SCRATCH_DEBUG_PRINTS gasneti_console_message("COLL INFO","%u> op added to wait (remote alloc fail on reconfig)", op->sequence); #endif } return 0; } } else if(gasnete_coll_scratch_compare_config(&stat->active_config_and_ops, scratch_req)) { /*gasneti_console_message("COLL INFO","%d> polling scratch --> correct config check for space", op->sequence);*/ /* configuration matches the current configuration ... check if we can allocate*/ if(!gasnete_coll_scratch_check_local_alloc(scratch_req, stat)) { if (!stat->active_config_and_ops.op_list_head) { /*can't make local allocation but old ops have cleared out*/ /* send clear signal and reset scratch*/ if(stat->clear_signal_sent==0) { stat->node_status[scratch_req->team->myrank].head = 0; /* send a clear signal to the new peers*/ gasnete_coll_scratch_send_updates(scratch_req->team, op->sequence); stat->clear_signal_sent=1; /* make sure clear signal is sent only once per drain cycle*/ } } else { /* can't make local allocation and old ops have not cleared out*/ if(!op->waiting_scratch_op) { gasnete_coll_scratch_add_to_wait(scratch_req, op); #if GASNETE_COLL_SCRATCH_DEBUG_PRINTS gasneti_console_message("COLL INFO","%u> op added to wait (local full)", op->sequence); #endif } return 0; } } /* local allocation succeeded*/ if(gasnete_coll_scratch_check_remote_alloc(scratch_req, stat)) { op->active_scratch_op = 1; stat->scratch_empty = 0; stat->clear_signal_sent=0; /* remove the operation from the wait queue and add it to the active queue if it was waiting*/ /* allocate op and return*/ if(op->waiting_scratch_op) { gasneti_assert(stat->waiting_config_and_ops_head->op_list_head == scratch_req); gasnete_coll_scratch_remove_first_waiting_op(stat); op->waiting_scratch_op = 0; } gasnete_coll_scratch_add_op_to_config(&stat->active_config_and_ops, scratch_req); /* return the appropriate amount of local/remote scratch space*/ #if GASNETE_COLL_SCRATCH_DEBUG_PRINTS gasneti_console_message("COLL INFO","%u> op allocating scratch", op->sequence); #endif op->myscratchpos = gasnete_coll_scratch_make_local_alloc(scratch_req, stat); gasnete_coll_scratch_alloc_pos(scratch_req); gasnete_coll_scratch_make_remote_alloc(scratch_req, stat, op->scratchpos); return 1; } else { /*remote scratch space is full add it to the wait queue and try again later*/ if(!op->waiting_scratch_op) { gasnete_coll_scratch_add_to_wait(scratch_req, op); /* gasneti_console_message("COLL INFO","%d> op added to wait (remote alloc fail no reconfig)", op->sequence); */ } return 0; } } else { /* configuration mismatch with outstanding active ops... put this op in the wait queues*/ if(!op->waiting_scratch_op) { gasnete_coll_scratch_add_to_wait(scratch_req, op); #if GASNETE_COLL_SCRATCH_DEBUG_PRINTS gasneti_console_message("COLL INFO","%u> op added to wait (config mismatch w/ active ops)", op->sequence); #endif } return 0; } } void gasnete_coll_free_scratch(gasnete_coll_op_t *op) { #if GASNETE_COLL_SCRATCH_DEBUG_PRINTS gasneti_console_message("COLL INFO","%u> finishing op", op->sequence); #endif /* remove op from the active scratch op list */ gasnete_coll_scratch_req_t *scratch_req = op->scratch_req; *scratch_req->prev_p = scratch_req->next; if (scratch_req->next) { scratch_req->next->prev_p = scratch_req->prev_p; } else { scratch_req->team->scratch_status->active_config_and_ops.op_list_tail_p = scratch_req->prev_p; } #if GASNET_DEBUG gasneti_assert(op->scratch_op_freed==0); op->scratch_op_freed = 1; op->scratch_req = NULL; #endif gasnete_coll_scratch_free_inlines(scratch_req); gasnete_coll_scratch_free_req(scratch_req); } void gasnete_coll_scratch_req_purge(gasnete_coll_team_t team) { gasneti_lifo_head_t *freelist_p = &team->scratch_free_list; gasnete_coll_scratch_req_t *req; while ((req = gasneti_lifo_pop(freelist_p))) { gasneti_free(req); } } gasnet-2025.8.0/extended-ref/coll/gasnet_trees.c0000664000175000017500000011660515142313673021565 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_trees.c $ * Description: Reference implemetation of GASNet Collectives team * Copyright 2009, Rajesh Nishtala , Paul H. Hargrove , Dan Bonachea * Terms of use are as specified in license.txt */ #include #ifndef _GASNET_TREES_H #error TREES_H MISSING!! #endif // Global data: gasnete_coll_tree_type_t gasnetc_tm_reduce_tree_type; static gasneti_lifo_head_t gasnete_coll_tree_type_free_list = GASNETI_LIFO_INITIALIZER; gasnete_coll_tree_type_t gasnete_coll_get_tree_type(void) { gasnete_coll_tree_type_t ret; ret = gasneti_lifo_pop(&gasnete_coll_tree_type_free_list); if(!ret) { ret = (gasnete_coll_tree_type_t) gasneti_malloc(sizeof(struct gasnete_coll_tree_type_t_)); } memset(ret, 0, sizeof(struct gasnete_coll_tree_type_t_)); return ret; } void gasnete_coll_free_tree_type(gasnete_coll_tree_type_t in){ gasneti_free(in->params); if(in!=NULL) { gasneti_lifo_push(&gasnete_coll_tree_type_free_list, in); } } static int split_string(char ***split_strs, const char *str, const char *delim) { const int max_params = 8; static gasneti_mutex_t lock= GASNETI_MUTEX_INITIALIZER; size_t strsz = strlen(str)+1; gasneti_mutex_lock(&lock); char *base = gasneti_malloc(sizeof(char*) * max_params + strsz); *split_strs = (char **) base; // since the strtok function is desructive we have to // create a copy of the string first to preserve the original // store the temp str in the high bytes of the same object to prevent leaks char *copy = base + sizeof(char*) * max_params; strcpy(copy, str); char *temp = strtok(copy, delim); int ret=0; while(temp != NULL) { if(ret == max_params) gasneti_fatalerror("more than %i params not yet supported",max_params); (*split_strs)[ret] = temp; ret++; temp=strtok(NULL, delim); } gasneti_mutex_unlock(&lock); return ret; } static gasnete_coll_tree_type_t make_tree_type_str_helper(const char *tree_name) { gasnete_coll_tree_type_t ret = gasnete_coll_get_tree_type(); char **inner_split; int num_splits; int i; char inner_delim[]=","; num_splits = split_string(&inner_split, tree_name,inner_delim); if(strcmp(inner_split[0], "NARY_TREE")==0) { ret->tree_class = GASNETE_COLL_NARY_TREE; } else if(strcmp(inner_split[0], "KNOMIAL_TREE")==0) { ret->tree_class = GASNETE_COLL_KNOMIAL_TREE; } else if(strcmp(inner_split[0], "RECURSIVE_TREE")==0) { ret->tree_class = GASNETE_COLL_RECURSIVE_TREE; } else if(strcmp(inner_split[0], "FORK_TREE")==0) { ret->tree_class = GASNETE_COLL_FORK_TREE; }else if(strcmp(inner_split[0], "FLAT_TREE")==0) { ret->tree_class = GASNETE_COLL_FLAT_TREE; } else { gasneti_fatalerror("Unknown Tree Type: %s\n", tree_name); } ret->params = gasneti_malloc(sizeof(int)*num_splits-1); ret->num_params = num_splits-1; for(i=0; inum_params; i++) { ret->params[i] = atoi(inner_split[i+1]); } gasneti_free(inner_split); return ret; } gasnete_coll_tree_type_t gasnete_coll_make_tree_type_str(const char *tree_name_str) { char outter_delim[]=":"; char inner_delim[]=","; char **outer_split; gasnete_coll_tree_type_t ret; /*first split the tree string on the ":"*/ int num_levels = split_string(&outer_split, tree_name_str, outter_delim); if(num_levels > 1) { char **inner_split; int num_splits, num_params; int i; gasnete_coll_tree_type_t temp; ret = gasnete_coll_get_tree_type(); num_splits = split_string(&inner_split, outer_split[0],inner_delim); num_params = num_splits-1;/*first split is the tree name*/ gasneti_assert(strcmp(inner_split[0], "HIERARCHICAL_TREE")==0); ret->tree_class = GASNETE_COLL_HIERARCHICAL_TREE; if(num_params != num_levels-1){ gasneti_fatalerror("badly formed hierarchical tree expect HIEARCHICAL_TREE,,,,..,:TREE1,PARAMS1:TREE2,PARAMS2:(etc)\n"); } /*NOT DONE*/ ret->params = gasneti_malloc(sizeof(int)*(num_params)); ret->num_params = num_params; for(i=0; iparams[i] = atoi(inner_split[i+1]); } temp = ret; for(i=1; isubtree = make_tree_type_str_helper(outer_split[i]); temp = temp->subtree; } } else { ret = make_tree_type_str_helper(tree_name_str); } gasneti_free(outer_split); return ret; } char* gasnete_coll_tree_type_to_str(char *buffer, gasnete_coll_tree_type_t tree_type) { int i; if(!tree_type) {memset(buffer, 0, 10); return buffer;} switch (tree_type->tree_class) { case GASNETE_COLL_NARY_TREE: strcpy(buffer, "NARY_TREE"); break; case GASNETE_COLL_KNOMIAL_TREE: strcpy(buffer, "KNOMIAL_TREE"); break; case GASNETE_COLL_RECURSIVE_TREE: strcpy(buffer, "RECURSIVE_TREE"); break; case GASNETE_COLL_FORK_TREE: strcpy(buffer, "FORK_TREE"); break; case GASNETE_COLL_FLAT_TREE: strcpy(buffer, "FLAT_TREE"); break; default: gasneti_fatalerror("Unknown tree class: %d", tree_type->tree_class); } for(i=0; inum_params; i++ ) { gasneti_assert(strlen(buffer) < GASNETE_COLL_MAX_TREE_TYPE_STRLEN); sprintf(buffer+strlen(buffer), ",%d", tree_type->params[i]); } return buffer; } gasnete_coll_tree_type_t gasnete_coll_make_tree_type(int tree_class, int *params, int num_params) { gasnete_coll_tree_type_t ret= gasnete_coll_get_tree_type(); #if GASNET_DEBUG if(tree_class >= GASNETE_COLL_NUM_TREE_CLASSES) { gasneti_fatalerror("Unknown Tree Class: %d\n", tree_class); } #endif ret->tree_class = (gasnete_coll_tree_class_t) tree_class; ret->params = (int*) gasneti_malloc(sizeof(int)*num_params); GASNETI_MEMCPY_SAFE_IDENTICAL(ret->params, params, num_params*sizeof(int)); ret->num_params = num_params; return ret; } void gasnete_coll_print_tree(gasnete_coll_local_tree_geom_t *geom, int gasnete_coll_tree_mynode) { int i; for(i=0; ichild_count; i++) { gasneti_console_message("COLL INFO","%d> child %d: %d, subtree for that child: %d (offset: %d)", gasnete_coll_tree_mynode, i, (int)geom->child_list[i], (int)geom->subtree_sizes[i], (int)geom->child_offset[i]); } if(gasnete_coll_tree_mynode != geom->root) { gasneti_console_message("COLL INFO","%d> parent: %d", (int)gasnete_coll_tree_mynode, (int)geom->parent); } gasneti_console_message("COLL INFO","%d> mysubtree size: %d", (int)gasnete_coll_tree_mynode, (int)geom->mysubtree_size); #if 1 gasneti_console_message("COLL INFO","%d> My sibling info: (id: %d, offset %d)", (int)gasnete_coll_tree_mynode, (int)geom->sibling_id, (int)geom->sibling_offset); #endif } void gasnete_coll_set_dissemination_order(gasnete_coll_local_tree_geom_t *geom, int gasnete_coll_tree_mynode, int gasnete_coll_tree_nodes) { int i = gasnete_coll_tree_nodes; int j, k; int factor; int lognp; gex_Rank_t *proc_list; lognp = 0; i = gasnete_coll_tree_nodes; while(i > 1) { lognp ++; i = i/2; } proc_list = (gex_Rank_t*)gasneti_malloc(sizeof(gex_Rank_t)*lognp); k=0; factor = 2; for(i=0; idissem_order = proc_list; geom->dissem_count = lognp; } struct tree_node_t_ { gex_Rank_t id; struct tree_node_t_ *parent; int num_children; uint8_t children_reversed; struct tree_node_t_ **children; }; typedef struct tree_node_t_* tree_node_t; #ifndef MIN #define MIN(A,B) ((A) < (B) ? (A) : (B)) #endif #ifndef MAX #define MAX(A,B) ((A) > (B) ? (A) : (B)) #endif #define MYABS(A) ((A) < 0 ? (-1)*(A) : (A)) #define MYCEIL(A, B) (((A) % (B)) !=0 ? ((A) / (B))+1 : (A)/(B)) #define GET_PARENT_ID(TREE_NODE) ((TREE_NODE)->parent==NULL ? GEX_RANK_INVALID : (TREE_NODE)->parent->id) #define GET_NODE_ID(TREE_NODE) ((TREE_NODE)->id) #define GET_NUM_CHILDREN(TREE_NODE) ((TREE_NODE)->num_children) #define GET_CHILD_IDX(TREE_NODE, IDX) ((TREE_NODE)->children[IDX]) static tree_node_t *allocate_nodes(tree_node_t **curr_nodes, gasnet_team_handle_t team, int rootrank) { gex_Rank_t i; int new_allocation=0; if(!(*curr_nodes)) { *curr_nodes = (tree_node_t*) gasneti_malloc(sizeof(tree_node_t)*team->total_ranks); new_allocation=1; } for(i=0; itotal_ranks; i++) { if(new_allocation) { (*curr_nodes)[i] = (struct tree_node_t_*) gasneti_calloc(1,sizeof(struct tree_node_t_)); } else { gasneti_free((*curr_nodes)[i]->children); (*curr_nodes)[i]->children = NULL; (*curr_nodes)[i]->num_children = 0; (*curr_nodes)[i]->children_reversed = 0; } (*curr_nodes)[i]->id = (i+rootrank)%team->total_ranks; (*curr_nodes)[i]->parent = NULL; } return *curr_nodes; } /*preappend a list of children*/ static tree_node_t preappend_children(tree_node_t main_node, tree_node_t *child_nodes, int num_nodes) { if(num_nodes > 0) { if(main_node->num_children == 0) { main_node->children = gasneti_malloc(num_nodes * sizeof(tree_node_t)); GASNETI_MEMCPY_SAFE_IDENTICAL(main_node->children, child_nodes, sizeof(tree_node_t)*num_nodes); } else { tree_node_t *new_children = gasneti_malloc(sizeof(tree_node_t)* (main_node->num_children+num_nodes)); GASNETI_MEMCPY_SAFE_IDENTICAL(new_children, child_nodes, num_nodes*sizeof(tree_node_t)); GASNETI_MEMCPY_SAFE_IDENTICAL(new_children+num_nodes, main_node->children, main_node->num_children*(sizeof(tree_node_t))); gasneti_free(main_node->children); main_node->children = new_children; } main_node->num_children = main_node->num_children+num_nodes; } return main_node; } static tree_node_t make_chain_tree(tree_node_t *nodes, int num_nodes) { gex_Rank_t i; for(i=0; i 0); gasneti_assert(multarr(dims, ndims)==num_nodes); if(ndims > 1) { temp_nodes = gasneti_malloc(sizeof(tree_node_t)*dims[0]); stride = multarr(dims+1,ndims-1); for(i=dims[0]-1; i>=0; i--) { temp_nodes[i] = make_fork_tree(nodes+stride*i, stride, dims+1, ndims-1); } make_chain_tree(temp_nodes, dims[0]); gasneti_free(temp_nodes); } else { make_chain_tree(nodes, dims[0]); } nodes[0]->children_reversed=1; return nodes[0]; } static tree_node_t make_knomial_tree(tree_node_t *nodes, int num_nodes, int radix) { int i; int num_children=0; gasneti_assert(radix>1); if(num_nodes > 1) { int r; int stride = 1; int num_proc = 1; tree_node_t *children; while(num_proc < num_nodes) { for(r=stride; rchildren_reversed=1; preappend_children(nodes[0], children, num_children); gasneti_free(children); } return nodes[0]; } static tree_node_t make_recursive_tree(tree_node_t *nodes, gex_Rank_t num_nodes, int radix) { gex_Rank_t i,j; int num_children=0; if(num_nodes > 1) { tree_node_t *children; gasneti_assert(radix > 1); for(i=1; ichildren_reversed=1; preappend_children(nodes[0], children, num_children); gasneti_free(children); } return nodes[0]; } static tree_node_t make_nary_tree(tree_node_t *nodes, gex_Rank_t num_nodes, int radix) { gex_Rank_t num_children=0; int i,j; if(num_nodes > 1) { tree_node_t *children; for(j=0; j 0) { children = (tree_node_t*) gasneti_malloc(num_children*sizeof(tree_node_t)); for(j=0, i=num_children-1; jchildren_reversed=1; preappend_children(nodes[0], children, num_children); gasneti_free(children); } } return nodes[0]; } static tree_node_t make_flat_tree(tree_node_t *nodes, int num_nodes) { /*attach all the nodes to one nodes[0]*/ preappend_children(nodes[0], nodes+1, num_nodes-1); return nodes[0]; } static tree_node_t make_hiearchical_tree_helper(gasnete_coll_tree_type_t tree_type, int level, int final_level, tree_node_t *allnodes, int num_nodes, int *node_counts) { tree_node_t rootnode; tree_node_t *temp; gasneti_assert(tree_type !=NULL); if(level == final_level) { switch (tree_type->tree_class) { case GASNETE_COLL_NARY_TREE: rootnode = make_nary_tree(allnodes, num_nodes, tree_type->params[0]); break; case GASNETE_COLL_FLAT_TREE: rootnode = make_flat_tree(allnodes, num_nodes); break; case GASNETE_COLL_KNOMIAL_TREE: rootnode = make_knomial_tree(allnodes, num_nodes, tree_type->params[0]); break; case GASNETE_COLL_RECURSIVE_TREE: rootnode = make_recursive_tree(allnodes, num_nodes, tree_type->params[0]); break; case GASNETE_COLL_FORK_TREE: rootnode = make_fork_tree(allnodes, num_nodes, tree_type->params, tree_type->num_params); break; default: rootnode = NULL; /* warning suppression */ gasneti_fatalerror("unknown tree type"); } } else { int i,j=0,num_processed=0; int level_nodes = MYCEIL(num_nodes, node_counts[0]); temp = gasneti_malloc(sizeof(tree_node_t) * level_nodes); for(i=0; isubtree, level+1, final_level, allnodes+i*node_counts[0], node_counts[0], node_counts+1); j++; num_processed += node_counts[0]; } temp[j]=make_hiearchical_tree_helper(tree_type->subtree, level+1, final_level, allnodes+i*node_counts[0], num_nodes - num_processed, node_counts+1); j++; switch (tree_type->tree_class) { case GASNETE_COLL_NARY_TREE: rootnode = make_nary_tree(temp, j, tree_type->params[0]); break; case GASNETE_COLL_FLAT_TREE: rootnode = make_flat_tree(temp,j); break; case GASNETE_COLL_KNOMIAL_TREE: rootnode = make_knomial_tree(temp, j, tree_type->params[0]); break; case GASNETE_COLL_RECURSIVE_TREE: rootnode = make_recursive_tree(temp, j, tree_type->params[0]); break; case GASNETE_COLL_FORK_TREE: rootnode = make_fork_tree(temp, j, tree_type->params, tree_type->num_params); break; default: rootnode = NULL; /* warning suppression */ gasneti_fatalerror("unknown tree type"); } gasneti_free(temp); } return rootnode; } static tree_node_t make_hiearchical_tree(gasnete_coll_tree_type_t tree_type, tree_node_t *allnodes, int num_nodes) { /*first param tells us how many tree levels there are going to be*/ /*the second contains the number at teh lowest level grouping*/ /*each tree level contains a triple (tree shape, */ /*so a 64 node run with 8 flat trees grouped into a binomial tree w/ 8 ndoes would have 2, 8*/ int num_levels = tree_type->params[0]; gasneti_assert(tree_type->num_params >= 2); return make_hiearchical_tree_helper(tree_type->subtree, 0, num_levels-1, allnodes, num_nodes, tree_type->params+1); } static tree_node_t setparentshelper(tree_node_t main_node, tree_node_t parent) { gex_Rank_t i; main_node->parent = parent; for(i=0; i %d num_children: %d", id, (int)GET_NODE_ID(main_node), GET_NUM_CHILDREN(main_node)); for(i=0; i %d child: %d %d", id, (int)GET_NODE_ID(main_node), i, (int)GET_NODE_ID(GET_CHILD_IDX(main_node,i))); } for(i=0; itree_construction_scratch; tree_node_t rootnode,mynode; gasneti_assert(rootranktotal_ranks && rootrank >=0); gasneti_assert_always(in_type); intype_copy = in_type; geom = (gasnete_coll_local_tree_geom_t*)gasneti_calloc(1,sizeof(gasnete_coll_local_tree_geom_t)); gasneti_assert_always(in_type==intype_copy); switch (in_type->tree_class) { #if 1 case GASNETE_COLL_NARY_TREE: gasneti_assert(in_type->num_params ==1); allnodes = allocate_nodes((tree_node_t**) &team->tree_construction_scratch, team, rootrank); rootnode = make_nary_tree(allnodes, team->total_ranks, in_type->params[0]); geom->rotation_points = (int*) gasneti_malloc(sizeof(int)*1); geom->num_rotations = 1; geom->rotation_points[0] = rootrank; break; case GASNETE_COLL_KNOMIAL_TREE: gasneti_assert(in_type->num_params ==1); allnodes = allocate_nodes((tree_node_t**) &team->tree_construction_scratch, team, rootrank); rootnode = make_knomial_tree(allnodes, team->total_ranks, in_type->params[0]); geom->rotation_points = (int*) gasneti_malloc(sizeof(int)*1); geom->num_rotations = 1; geom->rotation_points[0] = rootrank; break; case GASNETE_COLL_FLAT_TREE: allocate_nodes((tree_node_t**) &team->tree_construction_scratch , team, rootrank); rootnode = make_flat_tree(team->tree_construction_scratch, team->total_ranks); geom->rotation_points = (int*) gasneti_malloc(sizeof(int)*1); geom->num_rotations = 1; geom->rotation_points[0] = rootrank; break; case GASNETE_COLL_RECURSIVE_TREE: gasneti_assert(in_type->num_params ==1); allnodes = allocate_nodes((tree_node_t**) &team->tree_construction_scratch, team, rootrank); rootnode = make_recursive_tree(allnodes, team->total_ranks, in_type->params[0]); geom->rotation_points = (int*) gasneti_malloc(sizeof(int)*1); geom->num_rotations = 1; geom->rotation_points[0] = rootrank; break; case GASNETE_COLL_FORK_TREE: allnodes = allocate_nodes((tree_node_t**) &team->tree_construction_scratch, team, rootrank); rootnode = make_fork_tree(allnodes, team->total_ranks, in_type->params, in_type->num_params); geom->rotation_points = (int*) gasneti_malloc(sizeof(int)*1); geom->num_rotations = 1; geom->rotation_points[0] = rootrank; break; case GASNETE_COLL_HIERARCHICAL_TREE: #if 0 allnodes = team->tree_construction_scratch = allocate_nodes(allnodes, team, 0); rootnode = make_hiearchical_tree(in_type, allnodes, team->total_ranks); /* XXX ADD CODE TO GET ROTATION POINTS*/ break; #else rootnode = NULL; /* warning suppression */ gasneti_fatalerror("HIERARCHICAL_TREE not yet fully supported"); #endif #endif default: rootnode = NULL; /* warning suppression */ gasneti_fatalerror("unknown tree type"); break; } rootnode = setparents(rootnode); mynode = find_node(rootnode, team->myrank); geom->root = rootrank; geom->max_radix = maxradix(rootnode); geom->tree_type = in_type; geom->total_size = team->total_ranks; geom->parent = GET_PARENT_ID(mynode); geom->child_count = GET_NUM_CHILDREN(mynode); geom->mysubtree_size = treesize(mynode); geom->parent_subtree_size = treesize(mynode->parent); geom->children_reversed = mynode->children_reversed; if(rootrank != team->myrank) { geom->num_siblings = GET_NUM_CHILDREN(mynode->parent); geom->sibling_id = -1; geom->sibling_offset = 0; for(i=0; inum_siblings; i++) { int tmp_id; if(mynode->parent->children_reversed==1) { tmp_id = geom->num_siblings-1-i; } else { tmp_id =i; } if(GET_NODE_ID(GET_CHILD_IDX(mynode->parent, tmp_id))==team->myrank) { geom->sibling_id = tmp_id; break; } else { geom->sibling_offset += treesize(GET_CHILD_IDX(mynode->parent, tmp_id)); } } } else { geom->num_siblings = 0; geom->sibling_id = 0; geom->sibling_offset = 0; } geom->child_list = (gex_Rank_t*) gasneti_malloc(sizeof(gex_Rank_t)*geom->child_count); geom->subtree_sizes = (gex_Rank_t*) gasneti_malloc(sizeof(gex_Rank_t)*geom->child_count); geom->child_offset = (gex_Rank_t*) gasneti_malloc(sizeof(gex_Rank_t)*geom->child_count); geom->num_non_leaf_children=0; geom->num_leaf_children=0; for(i=0; ichild_count; i++) { geom->child_list[i] = GET_NODE_ID(GET_CHILD_IDX(mynode,i)); geom->subtree_sizes[i] = treesize(GET_CHILD_IDX(mynode,i)); if(geom->subtree_sizes[i] > 1) { geom->num_non_leaf_children++; } else { geom->num_leaf_children++; } } gasneti_assert((geom->num_leaf_children+geom->num_non_leaf_children) == geom->child_count); if(mynode->children_reversed==1) { size_t temp_offset = 0; for(i=geom->child_count-1; i>=0; i--) { geom->child_offset[i] = temp_offset; temp_offset+=geom->subtree_sizes[i]; } } else { size_t temp_offset = 0; for(i=0; ichild_count; i++) { geom->child_offset[i] = temp_offset; temp_offset+=geom->subtree_sizes[i]; } } #if 0 /* Not using the reference counts for now */ gasneti_weakatomic_set(&(geom->ref_count), 0, 0); geom->base_geom = base_geom; #endif #if 0 gasnete_coll_print_tree(geom, gasneti_mynode); #endif return geom; } void gasnete_coll_tree_geom_free_local(gasnete_coll_local_tree_geom_t *geom) { gasneti_free(geom->rotation_points); gasneti_free(geom->child_list); gasneti_free(geom->subtree_sizes); gasneti_free(geom->child_offset); gasneti_free(geom); } #if 0 void gasnete_coll_tree_type_to_str(char *outbuf, gasnete_coll_tree_type_t in) { gasneti_assert(in->subtree == NULL); gasneti_assert(in->num_params <= 1); switch(in->tree_class) { case GASNETE_COLL_NARY_TREE: sprintf(outbuf, "NARY_TREE,%d", in->params[0]); break; case GASNETE_COLL_FLAT_TREE: strcpy(outbuf, "FLAT_TREE"); break; case GASNETE_COLL_KNOMIAL_TREE: sprintf(outbuf, "KNOMIAL_TREE,%d", in->params[0]); break; case GASNETE_COLL_RECURSIVE_TREE: sprintf(outbuf, "RECURSIVE_TREE,%d", in->params[0]); break; default: gasneti_fatalerror("unknown tree type"); } } #endif /*---------------------------------------------------------------------------------*/ /* Operations to access the tree geometry cache */ /* Just keep track of the number of refs to an object for debug reasons However according to our design we will never free a geometry that is created It will be leaked away once the GASNet program finishes. */ #if 0 void gasnete_coll_tree_geom_release(gasnete_coll_tree_geom_t *geom) { gasneti_weakatomic_decrement(&(geom->ref_count), 0); /* gasneti_console_message("COLL INFO","gasnete_coll_tree_geom_release: geom->ref_count %u\n", gasneti_weakatomic_read(&(geom->ref_count), 0)); */ } void gasnete_coll_tree_geom_print(gasnete_coll_tree_geom_t *geom) { uint32_t ref_count, local_ref_count; gex_Rank_t i; ref_count = gasneti_weakatomic_read(&(geom->ref_count), 0); gasneti_console_message("COLL INFO","tree_geom %p, ref_count %u.\n", geom, ref_count); for (i=0; ilocal_views[i] != NULL) { local_ref_count = gasneti_weakatomic_read(&(geom->local_views[i]->ref_count), 0); gasneti_console_message("COLL INFO","localview[%u] ref_count %u\n", i, local_ref_count); } } } void gasnete_coll_print_all_tree_geom(gasnet_team_handle_t team) { gasnete_coll_tree_geom_t *geom; geom = team->tree_geom_cache_head; while (geom != NULL) { gasnete_coll_tree_geom_print(geom); geom = geom->next; } } #endif /* the helper function goes through the cache and then either returns the appropriate geometry or returns NULL indicating that the tree needs to be appended to the end of the cache */ int gasnete_coll_compare_tree_types(gasnete_coll_tree_type_t a, gasnete_coll_tree_type_t b) { if (a == b) { /*if they are equal (including both null) then they are trivially equal*/ return 1; } else if(a==NULL || b==NULL){ /*if one is null and the other is non-null then we have to reutnr a nonzero*/ return 0; } else if(a->tree_class == b->tree_class) { /*both tree types are non null so check the rest of the tree*/ if(a->num_params == b->num_params) { int i; for(i=0; inum_params; i++) { if(a->params[i]!=b->params[i]) return 0; } return 1; } } return 0; } static gasnete_coll_tree_geom_t *gasnete_coll_tree_geom_fetch_helper(gasnete_coll_tree_type_t in_type, gasnete_coll_team_t team) { gasnete_coll_tree_geom_t *curr_geom = team->tree_geom_cache_head; while(curr_geom != NULL) { if(gasnete_coll_compare_tree_types(in_type, curr_geom->tree_type)){ /* Move the matched geometry to the head */ if (curr_geom != team->tree_geom_cache_head) { if (curr_geom == team->tree_geom_cache_tail) { team->tree_geom_cache_tail = curr_geom->prev; curr_geom->prev->next = NULL; /* new tail */ } else { curr_geom->next->prev = curr_geom->prev; curr_geom->prev->next = curr_geom->next; } curr_geom->next = team->tree_geom_cache_head; curr_geom->prev = NULL; /* new head */ team->tree_geom_cache_head->prev = curr_geom; team->tree_geom_cache_head = curr_geom; } return curr_geom; } else curr_geom = curr_geom->next; } /*we've reached the end of the list without finding a match*/ return NULL; } /* XXX: should per-team */ /* this routine will initially just return a pointer into a localview and create one if needed. it will do the simple thing and not create new views and just keep reusing old views as needed */ gasnete_coll_local_tree_geom_t *gasnete_coll_local_tree_geom_fetch(gasnete_coll_tree_type_t type, gex_Rank_t root, gasnete_coll_team_t team) { gasnete_coll_local_tree_geom_t *ret; gasnete_coll_tree_geom_t *curr_geom; /*lock here so that only one multiple threads don't try to build it*/ gasneti_mutex_lock(&team->tree_geom_cache_lock); curr_geom = gasnete_coll_tree_geom_fetch_helper(type, team); if(curr_geom == NULL) { int i; #if 0 gasneti_console0_message("COLL INFO","new tree: %d type %d fanout\n", type.tree_class, type.prams[0]); #endif /* allocate new geometry */ curr_geom = (gasnete_coll_tree_geom_t *) gasneti_malloc(sizeof(gasnete_coll_tree_geom_t)); curr_geom->local_views = (gasnete_coll_local_tree_geom_t**) gasneti_malloc(sizeof(gasnete_coll_local_tree_geom_t*)*team->total_ranks); for(i=0; itotal_ranks; i++) { curr_geom->local_views[i] = NULL; } curr_geom->tree_type = type; #if 0 /* Not using the ref_count for now */ gasneti_weakatomic_set(&(curr_geom->ref_count), 0, 0); #endif /* curr_geom->root = root; */ /* link it into the cache*/ gasnete_coll_tree_geom_t *geom_cache_head = team->tree_geom_cache_head; if(geom_cache_head == NULL) { /*cache is empty*/ curr_geom->prev = NULL; curr_geom->next = NULL; team->tree_geom_cache_head = curr_geom; team->tree_geom_cache_tail = curr_geom; } else { curr_geom->prev = NULL; /* new head */ curr_geom->next = geom_cache_head; geom_cache_head->prev = curr_geom; team->tree_geom_cache_head = curr_geom; } curr_geom->local_views[root] = gasnete_coll_tree_geom_create_local(type, root, team, curr_geom); ret = curr_geom->local_views[root]; /* create local view for the root that we request */ } else { /* if it is already allocated for root go ahead and return it ... this should be the fast path*/ if(curr_geom->local_views[root] == NULL) { curr_geom->local_views[root] = gasnete_coll_tree_geom_create_local(type, root, team, curr_geom); } ret = curr_geom->local_views[root]; } #ifdef GASNETC_HAVE_AMRDMA /*at the time of this writing no conduits support this yet*/ if(team->myrank != ret->root) { int count = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(ret); gex_Rank_t *tmp = gasneti_calloc(1+count, sizeof(gex_Rank_t)); memcpy(tmp, GASNETE_COLL_TREE_GEOM_CHILDREN(ret), count*sizeof(gex_Rank_t)); tmp[count] = GASNETE_COLL_TREE_GEOM_PARENT(ret); gasnetc_amrdma_init(1+count, tmp); gasneti_free(tmp); } else { gasnetc_amrdma_init(GASNETE_COLL_TREE_GEOM_CHILD_COUNT(ret), GASNETE_COLL_TREE_GEOM_CHILDREN(ret)); } #endif #if 0 /* Not using the reference counts for now */ gasneti_weakatomic_increment(&(curr_geom->ref_count), 0); gasneti_weakatomic_increment(&(ret->ref_count), 0); /* gasneti_console_message("COLL INFO","gasnete_coll_local_tree_geom_fetch: curr_geom->ref_count %u, ret->ref_count %u \n", gasneti_weakatomic_read(&(curr_geom->ref_count), 0), gasneti_weakatomic_read(&(ret->ref_count), 0)); */ #endif gasneti_mutex_unlock(&team->tree_geom_cache_lock); return ret; } #if 0 void gasnete_coll_local_tree_geom_release(gasnete_coll_local_tree_geom_t *geom) { /* for now don't do anything since we will reuse all our geometries*/ gasneti_weakatomic_decrement(&(geom->ref_count), 0); } #endif void gasnete_coll_local_tree_geom_purge(gasnete_coll_team_t team) { gasneti_mutex_lock(&team->tree_geom_cache_lock); gasnete_coll_tree_geom_t *temp = team->tree_geom_cache_head; while (temp) { gasnete_coll_tree_geom_t *next = temp->next; for (gex_Rank_t i = 0; i < team->total_ranks; ++i) { if (temp->local_views[i]) { gasnete_coll_tree_geom_free_local(temp->local_views[i]); } } gasneti_free(temp->local_views); gasneti_free(temp); temp = next; } gasneti_mutex_unlock(&team->tree_geom_cache_lock); tree_node_t *allnodes = (tree_node_t*) team->tree_construction_scratch; if (allnodes) { for (gex_Rank_t i = 0; i < team->total_ranks; ++i) { gasneti_free(allnodes[i]->children); gasneti_free(allnodes[i]); } } gasneti_free(allnodes); } /**** Dissemination Stuff ****/ /*figure out if given number is a power of 2*/ int gasnete_coll_is_power_of_two(int num) { /*keep shifting right until the 0th digit is not zero*/ while((num & 0x1) == 0) num = num >> 1; /* once we hit a stopping point, shift that digit out*/ /*if the remaining number is 0 then it is a power of 2 */ return ((num >> 1)==0); } #if 0 static gasnete_coll_dissem_info_t *gasnete_coll_build_dissemination(int r, gasnete_coll_team_t team) { gasnete_coll_dissem_info_t *ret; int h,w,i,j,distance,x,numpeers,destproc; int num_out_peers, num_in_peers; ret = (gasnete_coll_dissem_info_t*) gasneti_malloc(sizeof(gasnete_coll_dissem_info_t)); w = gasnete_coll_build_tree_mylogn(team->total_ranks, r); ret->dissemination_radix = r; ret->dissemination_phases = w; distance = 1; /* phase 2: communication in log_r(team->total_ranks) steps*/ for(i=0; itotal_ranks/DIST);*/ h = team->total_ranks/distance; if(team->total_ranks % distance != 0) h++; } else { h = r; } ret->exchange_order[i].n = h-1; ret->exchange_order[i].elem_list = (gex_Rank_t*) gasneti_malloc(sizeof(gex_Rank_t)*(h-1)); for(j=1; jbarrier_order[i].elem_list[j-1] = (team->myrank + j*distance) % team->total_ranks; } /*scale the distance by the radix*/ distance *= r; } /*simulate the packing step and figure out what is the maxiumum number of blocks that come in across all the nodes*/ ret->max_dissem_blocks =MAX(1,(team->total_ranks/ret->dissemination_radix)); for(i=0; itotal_ranks; j++) { if( ((j / gasnete_coll_build_tree_mypow(ret->dissemination_radix, i)) % ret->dissemination_radix) == 1) curr_count++; } ret->max_dissem_blocks=MAX(ret->max_dissem_blocks, curr_count); } return ret; } #endif /* external code to force a tree type (for testing purposes only)*/ /* tree building code*/ static int gasnete_coll_build_tree_mypow(gex_Rank_t base, int pow) { int ret = 1; while(pow!=0) { ret *=base; pow--; } return ret; } static int gasnete_coll_build_tree_mylog2(gex_Rank_t num) { unsigned int ret=0; while (num >= 1) { ret++; num = num >> 1; } return MAX(1,ret); } static int gasnete_coll_build_tree_mylogn(gex_Rank_t num, int base) { int ret=1; int mult = base; while (num > mult) { ret++; mult*=base; } return ret; } static gasnete_coll_dissem_info_t *gasnete_coll_build_dissemination(int r, gasnete_coll_team_t team) { gasnete_coll_dissem_info_t *ret; int h,w,i,j,distance,k; ret = (gasnete_coll_dissem_info_t*) gasneti_malloc(sizeof(gasnete_coll_dissem_info_t)); w = gasnete_coll_build_tree_mylogn(team->total_ranks, r); ret->dissemination_radix = r; ret->dissemination_phases = (team->total_ranks>1 ? w : 0); ret->ptr_vec = (gex_Rank_t*) gasneti_malloc(sizeof(gex_Rank_t)*(w+1)); ret->ptr_vec[0] = 0; distance = 1; /* phase 2: communication in log_r(team->total_ranks) steps*/ for(i=0; itotal_ranks/DIST);*/ h = team->total_ranks/distance; if(team->total_ranks % distance != 0) h++; } else { h = r; } ret->ptr_vec[i+1] = ret->ptr_vec[i]+(h-1); /*scale the distance by the radix*/ distance *= r; } ret->exchange_out_order = (gex_Rank_t*) gasneti_malloc(sizeof(gex_Rank_t)*(ret->ptr_vec[w])); ret->exchange_in_order = (gex_Rank_t*) gasneti_malloc(sizeof(gex_Rank_t)*(ret->ptr_vec[w])); distance = 1; /* phase 2: communication in log_r(team->total_ranks) steps*/ for(k=0, i=0; itotal_ranks/DIST);*/ h = team->total_ranks/distance; if(team->total_ranks % distance != 0) h++; } else { h = r; } for(j=1; jexchange_out_order[k] = (team->myrank + j*distance) % team->total_ranks; ret->exchange_in_order[k] = ((team->myrank < j*distance) ? team->total_ranks + (team->myrank - j*distance) : (team->myrank - j*distance)); } /*scale the distance by the radix*/ distance *= r; } /*simulate the packing step and figure out what is the maxiumum number of blocks that come in across all the nodes*/ ret->max_dissem_blocks =MAX(1,(team->total_ranks/ret->dissemination_radix)); for(i=0; itotal_ranks; j++) { if( ((j / gasnete_coll_build_tree_mypow(ret->dissemination_radix, i)) % ret->dissemination_radix) == 1) curr_count++; } ret->max_dissem_blocks=MAX(ret->max_dissem_blocks, curr_count); } return ret; } void gasnete_coll_free_dissemination(gasnete_coll_dissem_info_t *in) { gasneti_free(in->ptr_vec); gasneti_free(in->exchange_out_order); gasneti_free(in->exchange_in_order); gasneti_free(in); } gasnete_coll_dissem_info_t *gasnete_coll_fetch_dissemination(int radix, gasnete_coll_team_t team) { /* look through the existing cache for our dissemination order*/ gasnete_coll_dissem_info_t *temp; if((team->dissem_cache_head == NULL) && (team->dissem_cache_tail == NULL)) { temp = gasnete_coll_build_dissemination(radix, team); team->dissem_cache_head = team->dissem_cache_tail = temp; team->dissem_cache_head->next = NULL; team->dissem_cache_tail->prev = NULL; } else { temp = team->dissem_cache_head; while(temp!=NULL) { if(temp->dissemination_radix == radix) { return temp; } else { temp = temp->next; } } /*we've reached the end without finding it */ temp = gasnete_coll_build_dissemination(radix, team); temp->next = NULL; temp->prev = team->dissem_cache_tail; team->dissem_cache_tail->next = temp; team->dissem_cache_tail = temp; } return temp; } void gasnete_coll_release_dissemination(gasnete_coll_dissem_info_t *obj, gasnete_coll_team_t team) { /* do nothing for now */ } void gasnete_coll_purge_dissemination(gasnete_coll_team_t team) { gasnete_coll_dissem_info_t *temp = team->dissem_cache_head; while (temp) { gasnete_coll_dissem_info_t *next = temp->next; gasnete_coll_free_dissemination(temp); temp = next; } team->dissem_cache_head = team->dissem_cache_tail = NULL; } gasnet-2025.8.0/extended-ref/coll/gasnet_autotune.c0000664000175000017500000030544715142313673022313 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_autotune.c $ * Description: GASNet Autotuner Implementation * Copyright 2009, Rajesh Nishtala , Paul H. Hargrove , Dan Bonachea * Terms of use are as specified in license.txt */ /* This is intended as a stub for the autotuner routines*/ #include typedef struct gasnet_coll_args_t_ { uint8_t **dst; uint8_t **src; gasnet_image_t rootimg; size_t src_blksz; size_t src_offset; size_t elem_size; /*elem count will be nbytes / elem_size*/ size_t nbytes; size_t dist; } gasnet_coll_args_t; #define GASNET_COLL_ARGS_INITIALIZER { NULL, NULL, 0, 0, 0, 0, 0, 0 } /*a small library to write and read XML style sheets for the collective tuner*/ #include #include /*this array is the maximum size of hte log2 array for fanouts*/ #define GASNETE_COLL_PRINT_TIMERS 0 static int gasnete_coll_print_autotuner_timers; static int gasnete_coll_print_coll_alg; struct gasnet_coll_tuning_iterator_t_{ uint32_t num_params; struct gasnet_coll_tuning_parameter_t params[GASNET_COLL_NUM_PARAM_TYPES]; uint32_t param_space_size[GASNET_COLL_NUM_PARAM_TYPES]; uint32_t curr_pos[GASNET_COLL_NUM_PARAM_TYPES]; /*a position into the parameter space for each parameter*/ uint32_t max_idx; uint32_t curr_idx; }; GASNETI_INLINE(gasnete_coll_nextpower2) size_t gasnete_coll_nextpower2(size_t n) { size_t x; if(n==0) return 0; x=1; while(x < n) x<<=1; return x; } /*register the collective algorithm optype is the type of collective op syncflags is an ored list of the valid sync flags for this colelctive requirements is an or'ed list of the required flags (i.e. DST/SRC in segment, etc) max_size is the maximum number of bytes this algorithm is valid for tree_alg indicates whether this is a tree based algorithm so that those tuning parameters can automaitcally be appended num_params is the number of params for the algorithm param_list is the paramter list */ int gasnete_coll_autotune_get_num_tree_types(gasnet_team_handle_t team) { /*for now only search over the FLAT, NARY, KNOMIAL, and RECURSIVE trees power of two fanouts and the FLAT TREE*/ int log2_threads = gasnete_coll_log2_rank(MIN((uint32_t) team->total_ranks,128)); return (team->autotune_info->allow_flat_tree ? 1 : 0) + /*flat_tree*/ log2_threads * (GASNETE_COLL_NUM_PLATFORM_INDEP_TREE_CLASSES-1); /*num powers of two for each of the three tree types*/ } gasnete_coll_tree_type_t gasnete_coll_autotune_get_tree_type_idx(gasnet_team_handle_t team, int idx) { gasnete_coll_tree_type_t ret = gasnete_coll_get_tree_type(); int log2_threads = gasnete_coll_log2_rank(MIN((uint32_t) team->total_ranks,128)); int tree_class; int radix; gasneti_assert(idx < gasnete_coll_autotune_get_num_tree_types(team)); if(team->autotune_info->allow_flat_tree) { if(idx == 0) { ret->tree_class = GASNETE_COLL_FLAT_TREE; return ret; } idx -=1; } tree_class = (idx / log2_threads)+1; radix = 1 << (1+(idx % log2_threads)); return gasnete_coll_make_tree_type(tree_class, &radix, 1); } gasnete_coll_algorithm_t gasnete_coll_autotune_register_algorithm(gasnet_team_handle_t team, gasnet_coll_optype_t optype, uint32_t syncflags, uint32_t requirements, uint32_t n_requirements, size_t max_size, size_t min_size, uint32_t tree_alg, uint32_t num_params, struct gasnet_coll_tuning_parameter_t *param_list, generic_coll_fn_ptr_t coll_fnptr, const char *name_str) { gasnete_coll_algorithm_t ret; int i; ret.tree_alg = tree_alg; ret.optype = optype; ret.syncflags = syncflags; ret.requirements = requirements; ret.n_requirements = n_requirements; ret.num_parameters = num_params+tree_alg; ret.max_num_bytes = max_size; ret.min_num_bytes = min_size; ret.name_str = name_str; /*create a deep copy of the param list*/ gasneti_assert(tree_alg == 1 || tree_alg == 0); if(num_params > 0 || tree_alg) { ret.parameter_list = (struct gasnet_coll_tuning_parameter_t*) gasneti_malloc(sizeof(struct gasnet_coll_tuning_parameter_t)*(num_params+tree_alg)); for(i=0; inum_parameters) gasneti_free(in->parameter_list); } #define GASNETE_COLL_EVERY_IN_SYNC_FLAG GASNET_COLL_IN_NOSYNC | GASNET_COLL_IN_MYSYNC | GASNET_COLL_IN_ALLSYNC #define GASNETE_COLL_EVERY_OUT_SYNC_FLAG GASNET_COLL_OUT_NOSYNC | GASNET_COLL_OUT_MYSYNC | GASNET_COLL_OUT_ALLSYNC #define GASNETE_COLL_EVERY_SYNC_FLAG GASNETE_COLL_EVERY_IN_SYNC_FLAG | GASNETE_COLL_EVERY_OUT_SYNC_FLAG #define GASNETE_COLL_MAX_BYTES ((size_t) -1) void gasnete_coll_register_broadcast_collectives(gasnete_coll_autotune_info_t* info, size_t smallest_scratch) { /*first register all the broadcast algorithms*/ /*all tuning parameters are inclusinve (i.e. iterations go from for(i=start; i<=end; i+=stride (or) i*=stride)*/ info->collective_algorithms[GASNET_COLL_BROADCAST_OP] = gasneti_malloc(sizeof(gasnete_coll_algorithm_t)*GASNETE_COLL_BROADCAST_NUM_ALGS); gasnete_coll_autotune_register_broadcast_algorithm(info, GASNETE_COLL_BROADCAST_TREE_PUT_SCRATCH, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_DST_IN_SEGMENT, 0, MIN(gex_AM_LUBRequestLong(),smallest_scratch), 0, 1, 0,NULL,gasnete_coll_bcast_TreePutScratch, "BROADCAST_TREE_PUT_SCRATCH"); gasnete_coll_autotune_register_broadcast_algorithm(info, GASNETE_COLL_BROADCAST_SCATTERALLGATHER, GASNETE_COLL_EVERY_SYNC_FLAG, 0, /*works for all flags (scatter/allgather will pick their right implementations based on the actual flags)*/ 0, GASNETE_COLL_MAX_BYTES, 0, 0, 0,NULL,gasnete_coll_bcast_ScatterAllgather, "BROADCAST_SCATTERALLGATHER"); { GASNETE_COLL_TUNING_PARAMETER(tuning_params, GASNET_COLL_PIPE_SEG_SIZE, GASNET_COLL_MIN_PIPE_SEG_SIZE, MIN(GASNET_COLL_MAX_PIPE_SEG_SIZE,smallest_scratch), 2, GASNET_COLL_TUNING_STRIDE_MULTIPLY | GASNET_COLL_TUNING_SIZE_PARAM); size_t largest_seg_size = MIN(gex_AM_LUBRequestLong(),MIN(GASNET_COLL_MAX_PIPE_SEG_SIZE,smallest_scratch)); gasnete_coll_autotune_register_broadcast_algorithm(info, GASNETE_COLL_BROADCAST_TREE_PUT_SEG, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_DST_IN_SEGMENT, 0, largest_seg_size*GASNETE_COLL_MAX_NUM_SEGS, GASNET_COLL_MIN_PIPE_SEG_SIZE, 1, 1,tuning_params,gasnete_coll_bcast_TreePutSeg, "BROADCAST_TREE_PUT_SEG"); } gasnete_coll_autotune_register_broadcast_algorithm(info, GASNETE_COLL_BROADCAST_TREE_EAGER, GASNETE_COLL_EVERY_SYNC_FLAG, 0, /*works for all flags as long as size is small enough*/ 0, gasnete_coll_p2p_eager_min,0, 1, 0,NULL,gasnete_coll_bcast_TreeEager, "BROADCAST_TREE_EAGER"); gasnete_coll_autotune_register_broadcast_algorithm(info, GASNETE_COLL_BROADCAST_RVOUS, GASNETE_COLL_EVERY_SYNC_FLAG, 0, /*works for all flags as long as size is small enough*/ 0, GASNETE_COLL_MAX_BYTES, /*works for all sizes*/ 0, 0, 0,NULL,gasnete_coll_bcast_RVous, "BROADCAST_RVOUS"); gasnete_coll_autotune_register_broadcast_algorithm(info, GASNETE_COLL_BROADCAST_RVGET, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_SRC_IN_SEGMENT, 0, GASNETE_COLL_MAX_BYTES, /*works for all sizes*/ 0, 0, 0,NULL,gasnete_coll_bcast_RVGet, "BROADCAST_RVGET"); gasnete_coll_autotune_register_broadcast_algorithm(info, GASNETE_COLL_BROADCAST_TREE_RVGET, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_SRC_IN_SEGMENT | GASNET_COLL_DST_IN_SEGMENT, 0, GASNETE_COLL_MAX_BYTES /*works for all sizes*/, 0, 1, 0,NULL,gasnete_coll_bcast_TreeRVGet, "BROADCAST_TREE_RVGET"); } void gasnete_coll_register_scatter_collectives(gasnete_coll_autotune_info_t* info, size_t smallest_scratch) { info->collective_algorithms[GASNET_COLL_SCATTER_OP] = gasneti_malloc(sizeof(gasnete_coll_algorithm_t)*GASNETE_COLL_SCATTER_NUM_ALGS); gasnete_coll_autotune_register_scatter_algorithm(info, GASNETE_COLL_SCATTER_TREE_PUT, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_DST_IN_SEGMENT, 0, MIN(gex_AM_LUBRequestLong(),smallest_scratch)/(info->team->total_ranks), 0, 1, 0, NULL, gasnete_coll_scat_TreePut, "SCATTER_TREE_PUT"); gasnete_coll_autotune_register_scatter_algorithm(info, GASNETE_COLL_SCATTER_TREE_PUT_NO_COPY, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_DST_IN_SEGMENT, 0, MIN(gex_AM_LUBRequestLong(),smallest_scratch)/(info->team->total_ranks), 0, 1, 0, NULL, gasnete_coll_scat_TreePutNoCopy, "SCATTER_TREE_PUT_NOCOPY"); { size_t smallest_seg_size = MIN(gex_AM_LUBRequestLong(),GASNET_COLL_MIN_PIPE_SEG_SIZE)/(info->team->total_ranks); size_t largest_seg_size = MIN(gex_AM_LUBRequestLong(),MIN(GASNET_COLL_MAX_PIPE_SEG_SIZE,smallest_scratch))/(info->team->total_ranks); GASNETE_COLL_TUNING_PARAMETER(tuning_params, GASNET_COLL_PIPE_SEG_SIZE,smallest_seg_size, largest_seg_size, 2, GASNET_COLL_TUNING_STRIDE_MULTIPLY | GASNET_COLL_TUNING_SIZE_PARAM); gasnete_coll_autotune_register_scatter_algorithm(info, GASNETE_COLL_SCATTER_TREE_PUT_SEG, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_DST_IN_SEGMENT, 0, largest_seg_size*GASNETE_COLL_MAX_NUM_SEGS, smallest_seg_size, 1, 1, tuning_params, gasnete_coll_scat_TreePutSeg, "SCATTER_TREE_PUT_SEG"); } gasnete_coll_autotune_register_scatter_algorithm(info, GASNETE_COLL_SCATTER_EAGER, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, MIN(gasnete_coll_p2p_eager_scale, gex_AM_LUBRequestMedium()), 0, 0, 0,NULL,gasnete_coll_scat_Eager, "SCATTER_EAGER"); gasnete_coll_autotune_register_scatter_algorithm(info, GASNETE_COLL_SCATTER_TREE_EAGER, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, MIN(gasnete_coll_p2p_eager_scale, gex_AM_LUBRequestMedium()/info->team->total_ranks), 0, 1, 0,NULL,gasnete_coll_scat_TreeEager, "SCATTER_TREE_EAGER"); gasnete_coll_autotune_register_scatter_algorithm(info, GASNETE_COLL_SCATTER_RVGET, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_SRC_IN_SEGMENT, 0, GASNETE_COLL_MAX_BYTES, 0, 0, 0,NULL,gasnete_coll_scat_RVGet, "SCATTER_RVGET"); gasnete_coll_autotune_register_scatter_algorithm(info, GASNETE_COLL_SCATTER_RVOUS, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, GASNETE_COLL_MAX_BYTES, 0, 0, 0,NULL,gasnete_coll_scat_RVous, "SCATTER_RVOUS"); } void gasnete_coll_register_gather_collectives(gasnete_coll_autotune_info_t* info, size_t smallest_scratch) { info->collective_algorithms[GASNET_COLL_GATHER_OP] = gasneti_malloc(sizeof(gasnete_coll_algorithm_t)*GASNETE_COLL_GATHER_NUM_ALGS); gasnete_coll_autotune_register_gather_algorithm(info, GASNETE_COLL_GATHER_TREE_PUT, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_DST_IN_SEGMENT, 0, MIN(gex_AM_LUBRequestLong(),smallest_scratch)/info->team->total_ranks, 0, 1, 0, NULL, gasnete_coll_gath_TreePut, "GATHER_TREE_PUT"); gasnete_coll_autotune_register_gather_algorithm(info, GASNETE_COLL_GATHER_TREE_PUT_NO_COPY, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_DST_IN_SEGMENT, 0, MIN(gex_AM_LUBRequestLong(),smallest_scratch)/info->team->total_ranks, 0, 1, 0, NULL, gasnete_coll_gath_TreePutNoCopy, "GATHER_TREE_PUT_NO_COPY"); { size_t smallest_seg_size = MIN(gex_AM_LUBRequestLong(),GASNET_COLL_MIN_PIPE_SEG_SIZE)/info->team->total_ranks; size_t largest_seg_size = MIN(gex_AM_LUBRequestLong(),MIN(GASNET_COLL_MAX_PIPE_SEG_SIZE,smallest_scratch))/info->team->total_ranks; GASNETE_COLL_TUNING_PARAMETER(tuning_params, GASNET_COLL_PIPE_SEG_SIZE,smallest_seg_size, largest_seg_size, 2, GASNET_COLL_TUNING_STRIDE_MULTIPLY | GASNET_COLL_TUNING_SIZE_PARAM); gasnete_coll_autotune_register_gather_algorithm(info, GASNETE_COLL_GATHER_TREE_PUT_SEG, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_DST_IN_SEGMENT, 0, largest_seg_size*GASNETE_COLL_MAX_NUM_SEGS, smallest_seg_size, 1, 1, tuning_params, gasnete_coll_gath_TreePutSeg, "GATHER_TREE_PUT_SEG"); } gasnete_coll_autotune_register_gather_algorithm(info, GASNETE_COLL_GATHER_TREE_EAGER, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, MIN(gasnete_coll_p2p_eager_scale, gex_AM_LUBRequestMedium()/info->team->total_ranks), 0, 1, 0,NULL,gasnete_coll_gath_TreeEager, "GATHER_TREE_EAGER"); gasnete_coll_autotune_register_gather_algorithm(info, GASNETE_COLL_GATHER_EAGER, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, MIN(gasnete_coll_p2p_eager_scale, gex_AM_LUBRequestMedium()), 0, 0, 0,NULL,gasnete_coll_gath_Eager, "GATHER_EAGER"); gasnete_coll_autotune_register_gather_algorithm(info, GASNETE_COLL_GATHER_RVPUT, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_DST_IN_SEGMENT, 0, GASNETE_COLL_MAX_BYTES, 0, 0, 0,NULL,gasnete_coll_gath_RVPut, "GATHER_RVPUT"); gasnete_coll_autotune_register_gather_algorithm(info, GASNETE_COLL_GATHER_RVOUS, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, GASNETE_COLL_MAX_BYTES, 0, 0, 0,NULL,gasnete_coll_gath_RVous, "GATHER_RVOUS"); } void gasnete_coll_register_gather_all_collectives(gasnete_coll_autotune_info_t* info, size_t smallest_scratch) { info->collective_algorithms[GASNET_COLL_GATHER_ALL_OP] = gasneti_malloc(sizeof(gasnete_coll_algorithm_t)*GASNETE_COLL_GATHER_ALL_NUM_ALGS); gasnete_coll_autotune_register_gather_all_algorithm(info, GASNETE_COLL_GATHER_ALL_GATHBCAST, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, /*works for every flag (gather will take care of figuiring out right algorithm)*/ GASNETE_COLL_MAX_BYTES, 0, 0, 0, NULL, gasnete_coll_gall_GathBcast, "GATHER_ALL_GATHBCAST"); gasnete_coll_autotune_register_gather_all_algorithm(info, GASNETE_COLL_GATHER_ALL_DISSEM_EAGER, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, MIN(gasnete_coll_p2p_eager_scale,gex_AM_LUBRequestMedium()/info->team->total_ranks), 0, 0, 0, NULL, gasnete_coll_gall_EagerDissem, "GATHER_ALL_EAGER_DISSEM"); gasnete_coll_autotune_register_gather_all_algorithm(info, GASNETE_COLL_GATHER_ALL_DISSEM, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, MIN(gex_AM_LUBRequestLong(),smallest_scratch)/info->team->total_ranks, 0, 0, 0, NULL, gasnete_coll_gall_Dissem, "GATHER_ALL_DISSEM"); gasnete_coll_autotune_register_gather_all_algorithm(info, GASNETE_COLL_GATHER_ALL_FLAT_PUT_EAGER, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, gasnete_coll_p2p_eager_scale, 0, 0, 0, NULL, gasnete_coll_gall_FlatEagerPut, "GATHER_ALL_FLAT_PUT_EAGER"); } void gasnete_coll_register_exchange_collectives(gasnete_coll_autotune_info_t* info, size_t smallest_scratch) { gasnete_coll_dissem_info_t *dissem; info->collective_algorithms[GASNET_COLL_EXCHANGE_OP] = gasneti_malloc(sizeof(gasnete_coll_algorithm_t)*GASNETE_COLL_EXCHANGE_NUM_ALGS); { int radix = 2; size_t max_size; const gasnet_image_t tpn = 1; gex_Rank_t nodes = info->team->total_ranks; dissem = gasnete_coll_fetch_dissemination(radix ,info->team); /*max size formula is limit/(tpn*tpn*nodes + 2*tpn*tpn*max_dissem_blocks*(radix-1))*/ max_size = MIN(gex_AM_LUBRequestLong(),smallest_scratch)/ (tpn*tpn*nodes + 2*tpn*tpn*(dissem->max_dissem_blocks)*(radix-1)); gasnete_coll_autotune_register_exchange_algorithm(info, GASNETE_COLL_EXCHANGE_DISSEM2, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, max_size, 0, 0, 0, NULL, gasnete_coll_exchg_Dissem2, "EXCHANGE_DISSEM2"); } { int radix = 3; size_t max_size; const gasnet_image_t tpn = 1; gex_Rank_t nodes = info->team->total_ranks; dissem = gasnete_coll_fetch_dissemination(radix ,info->team); /*max size formula is limit/(tpn*tpn*nodes + 2*tpn*tpn*max_dissem_blocks*(radix-1))*/ max_size = MIN(gex_AM_LUBRequestLong(),smallest_scratch)/ (tpn*tpn*nodes + 2*tpn*tpn*(dissem->max_dissem_blocks)*(radix-1)); gasnete_coll_autotune_register_exchange_algorithm(info, GASNETE_COLL_EXCHANGE_DISSEM3, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, max_size, 0, 0, 0, NULL, gasnete_coll_exchg_Dissem3, "EXCHANGE_DISSEM3"); } { int radix = 4; size_t max_size; const gasnet_image_t tpn = 1; gex_Rank_t nodes = info->team->total_ranks; dissem = gasnete_coll_fetch_dissemination(radix ,info->team); /*max size formula is limit/(tpn*tpn*nodes + 2*tpn*tpn*max_dissem_blocks*(radix-1))*/ max_size = MIN(gex_AM_LUBRequestLong(),smallest_scratch)/ (tpn*tpn*nodes + 2*tpn*tpn*(dissem->max_dissem_blocks)*(radix-1)); gasnete_coll_autotune_register_exchange_algorithm(info, GASNETE_COLL_EXCHANGE_DISSEM4, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, max_size, 0, 0, 0, NULL, gasnete_coll_exchg_Dissem4, "EXCHANGE_DISSEM4"); } { int radix = 8; size_t max_size; const gasnet_image_t tpn = 1; gex_Rank_t nodes = info->team->total_ranks; dissem = gasnete_coll_fetch_dissemination(radix ,info->team); /*max size formula is limit/(tpn*tpn*nodes + 2*tpn*tpn*max_dissem_blocks*(radix-1))*/ max_size = MIN(gex_AM_LUBRequestLong(),smallest_scratch)/ (tpn*tpn*nodes + 2*tpn*tpn*(dissem->max_dissem_blocks)*(radix-1)); gasnete_coll_autotune_register_exchange_algorithm(info, GASNETE_COLL_EXCHANGE_DISSEM8, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, max_size, 0, 0, 0, NULL, gasnete_coll_exchg_Dissem8, "EXCHANGE_DISSEM8"); } { int radix = info->team->total_ranks; size_t max_size; const gasnet_image_t tpn = 1; gex_Rank_t nodes = info->team->total_ranks; dissem = gasnete_coll_fetch_dissemination(radix ,info->team); /*max size formula is limit/(tpn*tpn*nodes + 2*tpn*tpn*max_dissem_blocks*(radix-1))*/ max_size = MIN(gex_AM_LUBRequestLong(),smallest_scratch)/ (tpn*tpn*nodes + 2*tpn*tpn*(dissem->max_dissem_blocks)*(radix-1)); gasnete_coll_autotune_register_exchange_algorithm(info, GASNETE_COLL_EXCHANGE_FLAT_SCRATCH, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, max_size, 0, 0, 0, NULL, gasnete_coll_exchg_FlatScratch, "EXCHANGE_FLAT_SCRATCH"); } { gasnete_coll_autotune_register_exchange_algorithm(info, GASNETE_COLL_EXCHANGE_RVPUT, GASNETE_COLL_EVERY_SYNC_FLAG, GASNET_COLL_DST_IN_SEGMENT, 0, GASNETE_COLL_MAX_BYTES, 0, 0, 0, NULL, gasnete_coll_exchg_RVPut, "EXCHANGE_RVPUT"); } { gasnete_coll_autotune_register_exchange_algorithm(info, GASNETE_COLL_EXCHANGE_GATH, GASNETE_COLL_EVERY_SYNC_FLAG, 0, 0, GASNETE_COLL_MAX_BYTES, 0, 0, 0, NULL, gasnete_coll_exchg_Gath, "EXCHANGE_GATH"); } } void gasnete_coll_register_collectives(gasnete_coll_autotune_info_t* info, size_t smallest_scratch) { gasnete_coll_register_broadcast_collectives(info, smallest_scratch); gasnete_coll_register_scatter_collectives(info, smallest_scratch); gasnete_coll_register_gather_collectives(info, smallest_scratch); gasnete_coll_register_gather_all_collectives(info, smallest_scratch); gasnete_coll_register_exchange_collectives(info, smallest_scratch); } static void gasnete_coll_deregister_collectives(gasnete_coll_autotune_info_t* info) { for (int i = 0; i < GASNETE_COLL_BROADCAST_NUM_ALGS; ++i) { gasnete_coll_autotune_deregister_algorithm(info->collective_algorithms[GASNET_COLL_BROADCAST_OP] + i); } gasneti_free(info->collective_algorithms[GASNET_COLL_BROADCAST_OP]); for (int i = 0; i < GASNETE_COLL_SCATTER_NUM_ALGS; ++i) { gasnete_coll_autotune_deregister_algorithm(info->collective_algorithms[GASNET_COLL_SCATTER_OP] + i); } gasneti_free(info->collective_algorithms[GASNET_COLL_SCATTER_OP]); for (int i = 0; i < GASNETE_COLL_GATHER_NUM_ALGS; ++i) { gasnete_coll_autotune_deregister_algorithm(info->collective_algorithms[GASNET_COLL_GATHER_OP] + i); } gasneti_free(info->collective_algorithms[GASNET_COLL_GATHER_OP]); for (int i = 0; i < GASNETE_COLL_GATHER_ALL_NUM_ALGS; ++i) { gasnete_coll_autotune_deregister_algorithm(info->collective_algorithms[GASNET_COLL_GATHER_ALL_OP] + i); } gasneti_free(info->collective_algorithms[GASNET_COLL_GATHER_ALL_OP]); for (int i = 0; i < GASNETE_COLL_EXCHANGE_NUM_ALGS; ++i) { gasnete_coll_autotune_deregister_algorithm(info->collective_algorithms[GASNET_COLL_EXCHANGE_OP] + i); } gasneti_free(info->collective_algorithms[GASNET_COLL_EXCHANGE_OP]); } #define GASNETE_COLL_AUTOTUNE_WARM_ITERS_DEFAULT 5 #define GASNETE_COLL_AUTOTUNE_PERF_ITERS_DEFAULT 10 #define GASNETE_COLL_FLAT_TREE_LIMIT 64 static gasneti_lifo_head_t gasnete_coll_autotune_tree_node_free_list = GASNETI_LIFO_INITIALIZER; gasnete_coll_autotune_tree_node_t *gasnete_coll_get_autotune_tree_node(void) { gasnete_coll_autotune_tree_node_t *ret; ret = gasneti_lifo_pop(&gasnete_coll_autotune_tree_node_free_list); if(!ret) { ret = (gasnete_coll_autotune_tree_node_t*) gasneti_malloc(sizeof(gasnete_coll_autotune_tree_node_t)); } memset(ret, 0, sizeof(gasnete_coll_autotune_tree_node_t)); return ret; } void gasnete_coll_free_autotune_tree_node(gasnete_coll_autotune_tree_node_t *in) { if(in) { gasneti_lifo_push(&gasnete_coll_autotune_tree_node_free_list, in); } } #if GASNETE_COLL_CONDUIT_COLLECTIVES static int allow_conduit_collectives=1; #endif static char* gasnete_coll_team_all_tuning_file; gasnete_coll_autotune_info_t* gasnete_coll_autotune_init(gasnet_team_handle_t team GASNETI_THREAD_FARG) { const size_t min_scratch_size = team->scratch_size; const gex_Rank_t mynode = team->myrank; const gasnet_image_t total_images = team->total_ranks; const gasnet_image_t my_images = 1; /* read all the environment variables and setup the defaults*/ gasnete_coll_autotune_info_t* ret; char *default_tree_type; size_t dissem_limit; size_t temp_size; size_t dissem_limit_per_thread; int i; ret = gasneti_calloc(1,sizeof(gasnete_coll_autotune_info_t)); team->autotune_info = ret; ret->team = team; /* first read the environment variables for tree types*/ default_tree_type = gasneti_getenv_withdefault("GASNET_COLL_ROOTED_GEOM", GASNETE_COLL_DEFAULT_TREE_TYPE_STR); /* now over-ride the defaults w/ the collective specific tree types in the environment*/ ret->bcast_tree_type = gasnete_coll_make_tree_type_str(gasneti_getenv_withdefault("GASNET_COLL_BROADCAST_GEOM", default_tree_type)); ret->scatter_tree_type = gasnete_coll_make_tree_type_str(gasneti_getenv_withdefault("GASNET_COLL_SCATTER_GEOM", default_tree_type)); ret->gather_tree_type = gasnete_coll_make_tree_type_str(gasneti_getenv_withdefault("GASNET_COLL_GATHER_GEOM", default_tree_type)); dissem_limit_per_thread = gasneti_getenv_int_withdefault("GASNET_COLL_GATHER_ALL_DISSEM_LIMIT_PER_THREAD", GASNETE_COLL_DEFAULT_DISSEM_LIMIT_PER_THREAD, 1); temp_size = gasnete_coll_nextpower2(dissem_limit_per_thread*my_images); dissem_limit = gasneti_getenv_int_withdefault("GASNET_COLL_GATHER_ALL_DISSEM_LIMIT", temp_size, 1); if(temp_size != dissem_limit) { gasneti_console0_message("WARNING","Conflicting environment values for GASNET_COLL_GATHER_ALL_DISSEM_LIMIT (%"PRIuPTR") and GASNET_COLL_GATHER_ALL_DISSEM_LIMIT_PER_THREAD (%"PRIuPTR")", (uintptr_t) dissem_limit, (uintptr_t) dissem_limit_per_thread); gasneti_console0_message("WARNING","Using: %"PRIuPTR, (uintptr_t) MIN(dissem_limit, temp_size)); } ret->gather_all_dissem_limit = MIN(dissem_limit, temp_size); dissem_limit_per_thread = gasneti_getenv_int_withdefault("GASNET_COLL_EXCHANGE_DISSEM_LIMIT_PER_THREAD", GASNETE_COLL_DEFAULT_DISSEM_LIMIT_PER_THREAD, 1); temp_size = gasnete_coll_nextpower2(dissem_limit_per_thread*my_images*my_images); dissem_limit = gasneti_getenv_int_withdefault("GASNET_COLL_EXCHANGE_DISSEM_LIMIT", temp_size, 1); if(temp_size != dissem_limit) { gasneti_console0_message("WARNING","Conflicting environment values for GASNET_COLL_EXCHANGE_DISSEM_LIMIT (%"PRIuPTR") and GASNET_COLL_EXCHANGE_DISSEM_LIMIT_PER_THREAD (%"PRIuPTR")", (uintptr_t) dissem_limit, (uintptr_t) temp_size); gasneti_console0_message("WARNING","Using: %"PRIuPTR, (uintptr_t) MIN(dissem_limit, temp_size)); } ret->exchange_dissem_limit = MIN(dissem_limit, temp_size); ret->exchange_dissem_radix = MIN(gasneti_getenv_int_withdefault("GASNET_COLL_EXCHANGE_DISSEM_RADIX", 2, 0),total_images); ret->pipe_seg_size = gasneti_getenv_int_withdefault("GASNET_COLL_PIPE_SEG_SIZE", MIN(min_scratch_size, gex_AM_LUBRequestLong())/total_images, 1); /* if(ret->pipe_seg_size == 0) { ret->pipe_seg_size = MIN(min_scratch_size, gex_AM_LUBRequestLong())/total_images; } */ if(ret->pipe_seg_size*total_images > min_scratch_size) { gasneti_console0_message("WARNING","Conflicting evnironment values for scratch space allocated (%d bytes) and GASNET_COLL_PIPE_SEG_SIZE (%d bytes)", (int) min_scratch_size, (int)ret->pipe_seg_size); gasneti_console0_message("WARNING","Using %d bytes for GASNET_COLL_PIPE_SEG_SIZE", (int)(min_scratch_size/total_images)); ret->pipe_seg_size = min_scratch_size/(total_images); } if(ret->pipe_seg_size*total_images > gex_AM_LUBRequestLong()) { gasneti_console0_message("WARNING","GASNET_COLL_PIPE_SEG_SIZE (%d bytes) * total images (%d) has to be less than max size for an AMLong for this conduit (%"PRIuPTR")", (int)ret->pipe_seg_size, (int)total_images, (uintptr_t) gex_AM_LUBRequestLong()); gasneti_console0_message("WARNING","Using %"PRIuPTR" bytes for GASNET_COLL_PIPE_SEG_SIZE instead", (uintptr_t) gex_AM_LUBRequestLong()/total_images); ret->pipe_seg_size = gex_AM_LUBRequestLong()/total_images; } /*initialize the autotune size array to 2 so we always get a binary tree*/ for(i=0; ibcast_tree_radix_limits[i] = 3; } ret->warm_iters = gasneti_getenv_int_withdefault("GASNET_COLL_AUTOTUNE_WARM_ITERS", GASNETE_COLL_AUTOTUNE_WARM_ITERS_DEFAULT, 0); ret->perf_iters = gasneti_getenv_int_withdefault("GASNET_COLL_AUTOTUNE_PERF_ITERS", GASNETE_COLL_AUTOTUNE_PERF_ITERS_DEFAULT, 0); ret->allow_flat_tree = gasneti_getenv_int_withdefault("GASNET_COLL_AUTOTUNE_ALLOW_FLAT_TREE", (team->total_ranks <= GASNETE_COLL_FLAT_TREE_LIMIT ? 1 : 0), 0); gasnete_coll_register_collectives(ret, min_scratch_size); #if GASNETE_COLL_CONDUIT_COLLECTIVES allow_conduit_collectives = gasneti_getenv_yesno_withdefault("GASNET_COLL_ALLOW_CONDUIT_COLLECTIVES", allow_conduit_collectives); if(allow_conduit_collectives) { gasnete_coll_register_conduit_collectives(ret); } #endif if(team == GASNET_TEAM_ALL){ gasnete_coll_team_all_tuning_file = gasneti_getenv_withdefault("GASNET_COLL_TUNING_FILE",NULL); gasnete_coll_print_autotuner_timers = gasneti_getenv_yesno_withdefault("GASNET_COLL_PRINT_AUTOTUNE_TIMER", GASNETE_COLL_PRINT_TIMERS); gasnete_coll_print_coll_alg = gasneti_getenv_yesno_withdefault("GASNET_COLL_PRINT_COLL_ALG", 0); } ret->autotuner_defaults = NULL; ret->search_enabled = gasneti_getenv_yesno_withdefault("GASNET_COLL_ENABLE_SEARCH", 0); ret->profile_enabled = gasneti_getenv_yesno_withdefault("GASNET_COLL_ENABLE_PROFILE", 0); return ret; } void gasnete_coll_autotune_free(gasnete_coll_team_t team) { gasnete_coll_autotune_info_t *info = team->autotune_info; gasnete_coll_free_tree_type(info->bcast_tree_type); gasnete_coll_free_tree_type(info->scatter_tree_type); gasnete_coll_free_tree_type(info->gather_tree_type); gasnete_coll_deregister_collectives(info); gasneti_free(info); gasnete_coll_purge_dissemination(team); } gasnete_coll_tree_type_t gasnete_coll_autotune_get_bcast_tree_type(gasnete_coll_autotune_info_t* autotune_info, gasnet_coll_optype_t op_type, gex_Rank_t root, size_t nbytes, int flags) { gasnete_coll_tree_type_t ret = NULL; /*first check if we've seen this size*/ /*find the log of the transfer size we are interested in*/ uint32_t log2_nbytes; log2_nbytes = gasnete_coll_log2_sz(nbytes); if(autotune_info->bcast_tree_radix_limits[log2_nbytes] == -1) { /*perform search across fanouts*/ /* do a barrier to ensure all threads have arrived*/ gasnet_coll_barrier(autotune_info->team, 0, GASNET_BARRIERFLAG_UNNAMED); } else { /*for larger arrays just use the maximum setting that we've already found*/ ret = gasnete_coll_make_tree_type_str((char*) "KNOMIAL_TREE,2"); } return ret; } gasnete_coll_tree_type_t gasnete_coll_autotune_get_tree_type(gasnete_coll_autotune_info_t* autotune_info, gasnet_coll_optype_t op_type, gex_Rank_t root, size_t nbytes, int flags) { switch(op_type) { case GASNET_COLL_BROADCAST_OP: return autotune_info->bcast_tree_type; case GASNET_COLL_SCATTER_OP: return autotune_info->scatter_tree_type; case GASNET_COLL_GATHER_OP: return autotune_info->gather_tree_type; default: gasneti_fatalerror("unknown tree based collective op type"); return 0; } } size_t gasnete_coll_get_dissem_limit(gasnete_coll_autotune_info_t* autotune_info, gasnet_coll_optype_t op_type, int flags) { switch(op_type) { case GASNET_COLL_GATHER_ALL_OP: return autotune_info->gather_all_dissem_limit; case GASNET_COLL_EXCHANGE_OP: return autotune_info->exchange_dissem_limit; default: gasneti_fatalerror("unknown dissem based collective op type"); return 0; } } int gasnete_coll_get_dissem_radix(gasnete_coll_autotune_info_t* autotune_info, gasnet_coll_optype_t op_type, int flags) { switch(op_type) { case GASNET_COLL_EXCHANGE_OP: return autotune_info->exchange_dissem_radix; default: gasneti_fatalerror("op doesn't specify dissem radix"); return 0; } } size_t gasnete_coll_get_pipe_seg_size(gasnete_coll_autotune_info_t* autotune_info, gasnet_coll_optype_t op_type, int flags){ return autotune_info->pipe_seg_size; } int gasnet_coll_get_num_tree_classes(gasnete_coll_team_t team, gasnet_coll_optype_t optype) { return (int) GASNETE_COLL_NUM_TREE_CLASSES; } void gasnet_coll_set_tree_kind(gasnete_coll_team_t team, int tree_class, int fanout, gasnet_coll_optype_t optype) { switch(optype) { case GASNET_COLL_BROADCAST_OP: gasnete_coll_free_tree_type(team->autotune_info->bcast_tree_type); team->autotune_info->bcast_tree_type = gasnete_coll_make_tree_type(tree_class, &fanout,1); break; case GASNET_COLL_SCATTER_OP: gasnete_coll_free_tree_type(team->autotune_info->scatter_tree_type); team->autotune_info->scatter_tree_type = gasnete_coll_make_tree_type(tree_class, &fanout,1); break; case GASNET_COLL_GATHER_OP: gasnete_coll_free_tree_type(team->autotune_info->gather_tree_type); team->autotune_info->gather_tree_type = gasnete_coll_make_tree_type(tree_class, &fanout,1); break; default: gasneti_fatalerror("unknown tree based collective op"); } return; } void gasnet_coll_set_dissem_limit(gasnete_coll_team_t team, size_t dissemlimit, gasnet_coll_optype_t optype) { switch(optype) { case GASNET_COLL_GATHER_ALL_OP: team->autotune_info->gather_all_dissem_limit = dissemlimit; break; case GASNET_COLL_EXCHANGE_OP: team->autotune_info->exchange_dissem_limit = dissemlimit; break; default: gasneti_fatalerror("unknown dissem based collective op type"); break; } return; } int gasnet_coll_get_num_params(gasnet_team_handle_t team, gasnet_coll_optype_t op, uint32_t algorithm_num) { return team->autotune_info->collective_algorithms[op][algorithm_num].num_parameters; } struct gasnet_coll_tuning_parameter_t gasnet_coll_get_param(gasnet_team_handle_t team, gasnet_coll_optype_t op, uint32_t algorithm_num, uint32_t param_idx){ gasneti_assert(param_idx < team->autotune_info->collective_algorithms[op][algorithm_num].num_parameters); return team->autotune_info->collective_algorithms[op][algorithm_num].parameter_list[param_idx]; } static gasneti_lifo_head_t gasnete_coll_impl_free_list = GASNETI_LIFO_INITIALIZER; gasnete_coll_implementation_t gasnete_coll_get_implementation(void) { gasnete_coll_implementation_t ret; ret = gasneti_lifo_pop(&gasnete_coll_impl_free_list); if(!ret) { ret = (gasnete_coll_implementation_t) gasneti_malloc(sizeof(struct gasnete_coll_implementation_t_)); } memset(ret, 0, sizeof(struct gasnete_coll_implementation_t_)); return ret; } void gasnete_coll_free_implementation(gasnete_coll_implementation_t in){ if(in!=NULL) { gasneti_lifo_push(&gasnete_coll_impl_free_list, in); } } static char* print_op_str(char *buf, gasnet_coll_optype_t op, int flags) { switch(op) { case GASNET_COLL_BROADCAST_OP: strcpy(buf, "broadcast SINGLE/"); break; case GASNET_COLL_SCATTER_OP: strcpy(buf, "scatter SINGLE/"); break; case GASNET_COLL_GATHER_OP: strcpy(buf, "gather SINGLE/"); break; case GASNET_COLL_GATHER_ALL_OP: strcpy(buf, "gather_all SINGLE/"); break; case GASNET_COLL_EXCHANGE_OP: strcpy(buf, "exchange SINGLE/"); break; default: strcpy(buf, "FILLIN"); } strncat(buf, "LOCAL", 100); return buf; } static char* print_flag_str(char *outstr, int flags) { if(flags & GASNET_COLL_IN_NOSYNC && flags & GASNET_COLL_OUT_NOSYNC) { strcpy(outstr, "no/no"); } else if(flags & GASNET_COLL_IN_NOSYNC && flags & GASNET_COLL_OUT_MYSYNC) { strcpy(outstr, "no/my"); } else if(flags & GASNET_COLL_IN_NOSYNC && flags & GASNET_COLL_OUT_ALLSYNC) { strcpy(outstr, "no/all"); } else if(flags & GASNET_COLL_IN_MYSYNC && flags & GASNET_COLL_OUT_NOSYNC) { strcpy(outstr, "my/no"); } else if(flags & GASNET_COLL_IN_MYSYNC && flags & GASNET_COLL_OUT_MYSYNC) { strcpy(outstr, "my/my"); } else if(flags & GASNET_COLL_IN_MYSYNC && flags & GASNET_COLL_OUT_ALLSYNC) { strcpy(outstr, "my/all"); } else if(flags & GASNET_COLL_IN_ALLSYNC && flags & GASNET_COLL_OUT_NOSYNC) { strcpy(outstr, "all/no"); } else if(flags & GASNET_COLL_IN_ALLSYNC && flags & GASNET_COLL_OUT_MYSYNC) { strcpy(outstr, "all/my"); } else if(flags & GASNET_COLL_IN_ALLSYNC && flags & GASNET_COLL_OUT_ALLSYNC) { strcpy(outstr, "all/all"); } return outstr; } #define STRINGS_MATCH(STR_A, STR_B) (strcmp(STR_A, STR_B)==0) GASNETI_INLINE(get_syncmode_from_flags) gasnete_coll_syncmode_t get_syncmode_from_flags(int flags) { if(flags & GASNET_COLL_IN_NOSYNC && flags & GASNET_COLL_OUT_NOSYNC) { return GASNETE_COLL_NONO; } else if(flags & GASNET_COLL_IN_NOSYNC && flags & GASNET_COLL_OUT_MYSYNC) { return GASNETE_COLL_NOMY; } else if(flags & GASNET_COLL_IN_NOSYNC && flags & GASNET_COLL_OUT_ALLSYNC) { return GASNETE_COLL_NOALL; } else if(flags & GASNET_COLL_IN_MYSYNC && flags & GASNET_COLL_OUT_NOSYNC) { return GASNETE_COLL_MYNO; } else if(flags & GASNET_COLL_IN_MYSYNC && flags & GASNET_COLL_OUT_MYSYNC) { return GASNETE_COLL_MYMY; } else if(flags & GASNET_COLL_IN_MYSYNC && flags & GASNET_COLL_OUT_ALLSYNC) { return GASNETE_COLL_MYALL; } else if(flags & GASNET_COLL_IN_ALLSYNC && flags & GASNET_COLL_OUT_NOSYNC) { return GASNETE_COLL_ALLNO; } else if(flags & GASNET_COLL_IN_ALLSYNC && flags & GASNET_COLL_OUT_MYSYNC) { return GASNETE_COLL_ALLMY; } else if(flags & GASNET_COLL_IN_ALLSYNC && flags & GASNET_COLL_OUT_ALLSYNC) { return GASNETE_COLL_ALLALL; } return (gasnete_coll_syncmode_t)(-1); /* NOT REACHED */ } static gasnete_coll_syncmode_t get_syncmode_from_str(char *str) { if(STRINGS_MATCH(str, "no/no")) return GASNETE_COLL_NONO; else if(STRINGS_MATCH(str, "no/my")) return GASNETE_COLL_NOMY; else if(STRINGS_MATCH(str, "no/all")) return GASNETE_COLL_NOALL; else if(STRINGS_MATCH(str, "my/no")) return GASNETE_COLL_MYNO; else if(STRINGS_MATCH(str, "my/my")) return GASNETE_COLL_MYMY; else if(STRINGS_MATCH(str, "my/all")) return GASNETE_COLL_MYALL; else if(STRINGS_MATCH(str, "all/no")) return GASNETE_COLL_ALLNO; else if(STRINGS_MATCH(str, "all/my")) return GASNETE_COLL_ALLMY; else if(STRINGS_MATCH(str, "all/all")) return GASNETE_COLL_ALLALL; gasneti_fatalerror("unknown syncmode from str %s", str); return (gasnete_coll_syncmode_t)(-1); /* NOT REACHED */ } static char* syncmode_to_str(char *buffer, int mode) { switch ((gasnete_coll_syncmode_t)mode) { case GASNETE_COLL_NONO: strcpy(buffer, "no/no"); break; case GASNETE_COLL_NOMY: strcpy(buffer, "no/my"); break; case GASNETE_COLL_NOALL: strcpy(buffer, "no/all"); break; case GASNETE_COLL_MYNO: strcpy(buffer, "my/no"); break; case GASNETE_COLL_MYMY: strcpy(buffer, "my/my"); break; case GASNETE_COLL_MYALL: strcpy(buffer, "my/all"); break; case GASNETE_COLL_ALLNO: strcpy(buffer, "all/no"); break; case GASNETE_COLL_ALLMY: strcpy(buffer, "all/my"); break; case GASNETE_COLL_ALLALL: strcpy(buffer, "all/all"); break; default: gasneti_fatalerror("unknown syncmode"); break; } return buffer; } static gasnete_coll_addr_mode_t get_addrmode_from_str(char *str) { if(STRINGS_MATCH(str, "local")) return GASNETE_COLL_LOCAL_MODE; return (gasnete_coll_addr_mode_t)(-1); /* NOT REACHED */ } static char * addrmode_to_str(char *buffer, int mode) { switch((gasnete_coll_addr_mode_t)mode){ case GASNETE_COLL_LOCAL_MODE: strcpy(buffer, "local"); break; default: gasneti_fatalerror("unknown address mode"); } return buffer; } GASNETI_INLINE(get_addrmode_from_flags) gasnete_coll_addr_mode_t get_addrmode_from_flags(int flags) { return GASNETE_COLL_LOCAL_MODE; } static gasnet_coll_optype_t get_optype_from_str(char *str) { if(STRINGS_MATCH(str, "broadcast")) return GASNET_COLL_BROADCAST_OP; else if(STRINGS_MATCH(str, "scatter")) return GASNET_COLL_SCATTER_OP; else if(STRINGS_MATCH(str, "gather")) return GASNET_COLL_GATHER_OP; else if(STRINGS_MATCH(str, "gather_all")) return GASNET_COLL_GATHER_ALL_OP; else if(STRINGS_MATCH(str, "exchange")) return GASNET_COLL_EXCHANGE_OP; else gasneti_fatalerror("op %s not yet supported\n", str); return (gasnet_coll_optype_t)(-1); /* NOT REACHED */ } static char * optype_to_str(char *buffer, int op) { switch ((gasnet_coll_optype_t)op) { case GASNET_COLL_BROADCAST_OP: strcpy(buffer, "broadcast"); break; case GASNET_COLL_SCATTER_OP: strcpy(buffer, "scatter"); break; case GASNET_COLL_GATHER_OP: strcpy(buffer, "gather"); break; case GASNET_COLL_GATHER_ALL_OP: strcpy(buffer, "gather_all"); break; case GASNET_COLL_EXCHANGE_OP: strcpy(buffer, "gather_all"); break; default: gasneti_fatalerror("unknown op type"); } return buffer; } /************************/ /***LOAD THE TUNING FILE*/ /************************/ static gasnete_coll_autotune_index_entry_t *load_autotuner_defaults_helper(gasnete_coll_autotune_info_t *info, myxml_node_t *parent, const char **tag_strings, int level, int max_levels, gasnet_coll_optype_t optype) { int i; gasnete_coll_autotune_index_entry_t *array = gasneti_calloc(sizeof(struct gasnete_coll_autotune_index_entry_t_),MYXML_NUM_CHILDREN(parent)); gasnete_coll_autotune_index_entry_t *temp = array; gasneti_assert(STRINGS_MATCH(MYXML_TAG(MYXML_CHILDREN(parent)[0]),tag_strings[level])); for(i=0; inode_type = tag_strings[level]; if(STRINGS_MATCH(tag_strings[level], "sync_mode")) { temp->start = get_syncmode_from_str(MYXML_ATTRIBUTES(child_node)[0].attribute_value); } else if(STRINGS_MATCH(tag_strings[level], "address_mode")) { temp->start = get_addrmode_from_str(MYXML_ATTRIBUTES(child_node)[0].attribute_value); } else if(STRINGS_MATCH(tag_strings[level], "collective")) { temp->start = optype = get_optype_from_str(MYXML_ATTRIBUTES(child_node)[0].attribute_value); } else if(STRINGS_MATCH(tag_strings[level], "size")) { temp->start = atoi(MYXML_ATTRIBUTES(child_node)[0].attribute_value); } else if(STRINGS_MATCH(tag_strings[level], "threads_per_node")) { temp->start = atoi(MYXML_ATTRIBUTES(child_node)[0].attribute_value); } else if(STRINGS_MATCH(tag_strings[level], "num_nodes")) { temp->start = atoi(MYXML_ATTRIBUTES(child_node)[0].attribute_value); } else if(STRINGS_MATCH(tag_strings[level], "root")) { temp->start = atoi(MYXML_ATTRIBUTES(child_node)[0].attribute_value); } else { gasneti_fatalerror("unknown tag string\n"); } if(level == max_levels-1) { int j; gasneti_assert(STRINGS_MATCH(MYXML_TAG(MYXML_CHILDREN(child_node)[0]), "Best_Alg")); gasneti_assert(STRINGS_MATCH(MYXML_TAG(MYXML_CHILDREN(child_node)[1]), "Best_Tree")); gasneti_assert(STRINGS_MATCH(MYXML_TAG(MYXML_CHILDREN(child_node)[2]), "Num_Params")); temp->end = atoi(MYXML_VALUE(MYXML_CHILDREN(child_node)[0])); temp->impl = gasnete_coll_get_implementation(); temp->impl->fn_ptr.untyped_fn = info->collective_algorithms[optype][atoi(MYXML_VALUE(MYXML_CHILDREN(child_node)[0]))].fn_ptr.untyped_fn; temp->impl->fn_idx = atoi(MYXML_VALUE(MYXML_CHILDREN(child_node)[0])); if(strlen(MYXML_VALUE(MYXML_CHILDREN(child_node)[1])) > 0) { temp->impl->tree_type = gasnete_coll_make_tree_type_str(MYXML_VALUE(MYXML_CHILDREN(child_node)[1])); } temp->impl->num_params = atoi(MYXML_VALUE(MYXML_CHILDREN(child_node)[2])); if(temp->impl->num_params > 0) { for(j=0; jimpl->num_params; j++) { temp->impl->param_list[j] = atoi(MYXML_VALUE(MYXML_CHILDREN(child_node)[j+3])); } } /*read and allocate implementations*/ } else { temp->subtree = load_autotuner_defaults_helper(info, MYXML_CHILDREN(parent)[i], tag_strings, level+1, max_levels, optype); } if(i==MYXML_NUM_CHILDREN(parent)-1) { temp->next_interval = NULL; } else { temp->next_interval = &array[i+1]; temp = &array[i+1]; } } return array; } gasnete_coll_autotune_index_entry_t *gasnete_coll_load_autotuner_defaults(gasnete_coll_autotune_info_t* autotune_info, myxml_node_t *tuning_data) { gasnete_coll_autotune_index_entry_t *root; const char *tree_levels[8] = {"machine", "num_nodes", "threads_per_node", "sync_mode", "address_mode", "collective", "root", "size"}; /*the root of the tree contains the GASNET config string*/ /*throw a warning if the tree does not match the current tree*/ if(STRINGS_MATCH(MYXML_TAG(tuning_data), "machine")) { if(!STRINGS_MATCH(MYXML_ATTRIBUTES(tuning_data)[0].attribute_value, GASNET_CONFIG_STRING)) { gasneti_console_message("WARNING","collective tuning data's config string: %s does not match current gasnet config string: %s\n", MYXML_ATTRIBUTES(tuning_data)[0].attribute_value, GASNET_CONFIG_STRING); } root= load_autotuner_defaults_helper(autotune_info, tuning_data, tree_levels, 1, 8, (gasnet_coll_optype_t)(-1)); } else { root = NULL; /* warning suppression */ gasneti_fatalerror("exepected machine as the root of the tree"); } return root; } /****************************/ /****** RUN THE AUTOTUNER ***/ /****************************/ /*run the given op on the given arguments*/ /*and return the best one*/ int gasnete_coll_autotune_barrier(gasnete_coll_team_t team) { int ret = gasnet_coll_barrier(team, 0, GASNET_BARRIERFLAG_UNNAMED); gasneti_assert_always(ret == GASNET_OK); return ret; } #define PTHREAD_BARRIER(team, local_pthread_count) \ gasnete_coll_autotune_barrier(team) static gasnett_tick_t run_collective_bench(gasnet_team_handle_t team, gasnet_coll_optype_t op, gasnet_coll_args_t coll_args, int flags, gasnete_coll_implementation_t impl, gasnet_coll_overlap_sample_work_t fnptr, void *sample_work_arg GASNETI_THREAD_FARG) { int iter, niters; gasnett_tick_t start, total; gex_Event_t handle; niters = team->autotune_info->perf_iters; if (coll_args.nbytes <= 1024) niters *= 4; else if (coll_args.nbytes <= 16384) niters *= 2; gasneti_assert(coll_args.rootimg < team->total_ranks); PTHREAD_BARRIER(team, 1); for(iter=0; iterautotune_info->warm_iters; iter++) { switch(op){ case GASNET_COLL_BROADCAST_OP: handle = impl->fn_ptr.bcast_fn(team, coll_args.dst[0], coll_args.rootimg, coll_args.src[0], coll_args.nbytes, flags, impl, 0 GASNETI_THREAD_PASS); if(fnptr) (*fnptr)(sample_work_arg); gasnete_wait(handle GASNETI_THREAD_PASS); break; case GASNET_COLL_SCATTER_OP: handle = impl->fn_ptr.scatter_fn(team, coll_args.dst[0], coll_args.rootimg, coll_args.src[0], coll_args.nbytes, coll_args.dist, flags, impl, 0 GASNETI_THREAD_PASS); if(fnptr) (*fnptr)(sample_work_arg); gasnete_wait(handle GASNETI_THREAD_PASS); break; case GASNET_COLL_GATHER_OP: handle = impl->fn_ptr.gather_fn(team, coll_args.rootimg, coll_args.dst[0], coll_args.src[0], coll_args.nbytes, coll_args.dist, flags, impl, 0 GASNETI_THREAD_PASS); if(fnptr) (*fnptr)(sample_work_arg); gasnete_wait(handle GASNETI_THREAD_PASS); break; case GASNET_COLL_GATHER_ALL_OP: handle = impl->fn_ptr.gather_all_fn(team, coll_args.dst[0], coll_args.src[0], coll_args.nbytes, flags, impl, 0 GASNETI_THREAD_PASS); if(fnptr) (*fnptr)(sample_work_arg); gasnete_wait(handle GASNETI_THREAD_PASS); break; case GASNET_COLL_EXCHANGE_OP: handle = impl->fn_ptr.exchange_fn(team, coll_args.dst[0], coll_args.src[0], coll_args.nbytes, flags, impl, 0 GASNETI_THREAD_PASS); if(fnptr) (*fnptr)(sample_work_arg); gasnete_wait(handle GASNETI_THREAD_PASS); break; default: gasneti_fatalerror("collective not yet implemented"); } } PTHREAD_BARRIER(team, 1); start = gasnett_ticks_now(); for(iter=0; iterfn_ptr.bcast_fn(team, coll_args.dst[0], coll_args.rootimg, coll_args.src[0], coll_args.nbytes, flags, impl, 0 GASNETI_THREAD_PASS); if(fnptr) (*fnptr)(sample_work_arg); gasnete_wait(handle GASNETI_THREAD_PASS); break; case GASNET_COLL_SCATTER_OP: handle = impl->fn_ptr.scatter_fn(team, coll_args.dst[0], coll_args.rootimg, coll_args.src[0], coll_args.nbytes, coll_args.dist, flags, impl, 0 GASNETI_THREAD_PASS); if(fnptr) (*fnptr)(sample_work_arg); gasnete_wait(handle GASNETI_THREAD_PASS); break; case GASNET_COLL_GATHER_OP: handle = impl->fn_ptr.gather_fn(team, coll_args.rootimg, coll_args.dst[0], coll_args.src[0], coll_args.nbytes, coll_args.dist, flags, impl, 0 GASNETI_THREAD_PASS); if(fnptr) (*fnptr)(sample_work_arg); gasnete_wait(handle GASNETI_THREAD_PASS); break; case GASNET_COLL_GATHER_ALL_OP: handle = impl->fn_ptr.gather_all_fn(team, coll_args.dst[0], coll_args.src[0], coll_args.nbytes, flags, impl, 0 GASNETI_THREAD_PASS); if(fnptr) (*fnptr)(sample_work_arg); gasnete_wait(handle GASNETI_THREAD_PASS); break; case GASNET_COLL_EXCHANGE_OP: handle = impl->fn_ptr.exchange_fn(team, coll_args.dst[0], coll_args.src[0], coll_args.nbytes, flags, impl, 0 GASNETI_THREAD_PASS); if(fnptr) (*fnptr)(sample_work_arg); gasnete_wait(handle GASNETI_THREAD_PASS); break; default: gasneti_fatalerror("collective not yet implemented"); } } PTHREAD_BARRIER(team, 1); total = gasnett_ticks_now()-start; /* gasnete_coll_barrier(team, 0, GASNET_BARRIERFLAG_UNNAMED GASNETI_THREAD_PASS); */ return total; } static void do_tuning_loop(gasnet_team_handle_t team, gasnet_coll_optype_t op, gasnet_coll_args_t coll_args, int flags, gasnet_coll_overlap_sample_work_t fnptr, void *sample_work_arg, int alg_idx, gasnett_tick_t *best_time, uint32_t *best_param_list, char *best_tree, int current_param_number, uint32_t *curr_idx_in GASNETI_THREAD_FARG) { int idx; /*no tuning parameters*/ if(gasnet_coll_get_num_params(team, op, alg_idx)==0) { gasnete_coll_implementation_t impl = gasnete_coll_get_implementation(); impl->team = team; impl->optype = op; impl->flags = flags; impl->fn_ptr.untyped_fn = team->autotune_info->collective_algorithms[op][alg_idx].fn_ptr.untyped_fn; impl->fn_idx = alg_idx; *best_time = run_collective_bench(team, op, coll_args, flags, impl, fnptr, sample_work_arg GASNETI_THREAD_PASS); if(team->myrank==0 && gasnete_coll_print_autotuner_timers) { int i; char buf1[100]; char buf2[100]; printf("%d> %s alg: %s (%d) syncflags: %s nbytes: %d params:<", (int)team->myrank, print_op_str(buf1, op, flags), team->autotune_info->collective_algorithms[op][alg_idx].name_str, alg_idx, print_flag_str(buf2, flags), (int) coll_args.nbytes); for(i=0; inum_params; i++) { printf(" %d", (int)impl->param_list[i]); } printf(" > time: %g\n", (double)gasnett_ticks_to_us(*best_time)/team->autotune_info->perf_iters); } gasnete_coll_free_implementation(impl); return; } else { /*algorithm has parameters*/ struct gasnet_coll_tuning_parameter_t param = gasnet_coll_get_param(team, op, alg_idx, current_param_number); uint32_t *curr_idx= curr_idx_in; int needtofree_idx=0; if(curr_idx==NULL) { gasneti_assert(current_param_number == 0); needtofree_idx = 1; curr_idx=gasneti_malloc(sizeof(uint32_t)*gasnet_coll_get_num_params(team, op, alg_idx)); } idx = param.start; gasneti_assert(idx<=param.end); while (1) { /*if the tuning paramter is a size parameter and it already exceeds the value for our collective then skip this iteration*/ if(!(team->autotune_info->collective_algorithms[op][alg_idx].parameter_list[current_param_number].flags & GASNET_COLL_TUNING_SIZE_PARAM && idx > coll_args.nbytes)) { if(current_param_number == team->autotune_info->collective_algorithms[op][alg_idx].num_parameters-1) { /*this is the last one so run the collective*/ gasnett_tick_t curr_run; /*setup the collective information*/ gasnete_coll_implementation_t impl = gasnete_coll_get_implementation(); curr_idx[current_param_number]=idx; impl->team = team; impl->optype = op; impl->flags = flags; impl->fn_ptr.untyped_fn = team->autotune_info->collective_algorithms[op][alg_idx].fn_ptr.untyped_fn; impl->fn_idx = alg_idx; impl->num_params = team->autotune_info->collective_algorithms[op][alg_idx].num_parameters; GASNETE_FAST_UNALIGNED_MEMCPY(impl->param_list, curr_idx, impl->num_params*sizeof(uint32_t)); if(team->autotune_info->collective_algorithms[op][alg_idx].parameter_list[current_param_number].flags & GASNET_COLL_TUNING_TREE_SHAPE) impl->tree_type = gasnete_coll_autotune_get_tree_type_idx(team, idx); /*run the measurement iterations*/ curr_run = run_collective_bench(team, op,coll_args, flags, impl, fnptr, sample_work_arg GASNETI_THREAD_PASS); if(team->myrank==0 && gasnete_coll_print_autotuner_timers) { char buf1[100]; char buf2[100]; int i; printf("%d> %s alg: %s (%d) syncflags: %s nbytes: %d params:<", (int)team->myrank, print_op_str(buf1, op, flags), team->autotune_info->collective_algorithms[op][alg_idx].name_str, alg_idx, print_flag_str(buf2, flags), (int) coll_args.nbytes); for(i=0; inum_params; i++) { if(team->autotune_info->collective_algorithms[op][alg_idx].parameter_list[i].flags & GASNET_COLL_TUNING_TREE_SHAPE){ gasnete_coll_tree_type_to_str((char *) buf1, impl->tree_type); printf(" %s", buf1); }else { printf(" %d", (int)impl->param_list[i]); } } printf(" > time: %g\n", (double)gasnett_ticks_to_us(curr_run)/team->autotune_info->perf_iters); } /*if the time is less than the best set this one as the new best*/ if(curr_run < *best_time) { *best_time = curr_run; GASNETE_FAST_UNALIGNED_MEMCPY(best_param_list, curr_idx, impl->num_params*sizeof(uint32_t)); strcpy(best_tree, ""); if(team->autotune_info->collective_algorithms[op][alg_idx].parameter_list[current_param_number].flags & GASNET_COLL_TUNING_TREE_SHAPE){ gasnete_coll_tree_type_to_str(best_tree, impl->tree_type); } } gasnete_coll_free_implementation(impl); } else { /*there are still more iterations to set so continue down the loop nest*/ curr_idx[current_param_number]=idx; do_tuning_loop(team, op, coll_args, flags, fnptr, sample_work_arg, alg_idx, best_time, best_param_list, best_tree, current_param_number+1, curr_idx GASNETI_THREAD_PASS); } } if(param.flags & GASNET_COLL_TUNING_STRIDE_ADD) { idx+=param.stride; } else if(param.flags & GASNET_COLL_TUNING_STRIDE_MULTIPLY) { idx*=param.stride; } if(idx > param.end) break; } if(needtofree_idx) { gasneti_assert(current_param_number == 0); gasneti_free(curr_idx); } } } void gasnete_coll_tune_generic_op(gasnet_team_handle_t team, gasnet_coll_optype_t op, gasnet_coll_args_t coll_args, int flags, gasnet_coll_overlap_sample_work_t fnptr, void *sample_work_arg, /*returned by the function*/ uint32_t *best_algidx, uint32_t *num_params, uint32_t **best_param, char **best_tree GASNETI_THREAD_FARG) { int algidx = 0; int num_algs; gasnett_tick_t curr_best_time=GASNETT_TICK_MAX, alg_best_time=GASNETT_TICK_MAX; uint32_t loc_best_param_list[GASNET_COLL_NUM_PARAM_TYPES]; uint32_t sync_flags = (flags & GASNET_COLL_SYNC_FLAG_MASK); /*strip the sync flags off the flags*/ uint32_t req_flags = (flags & (~GASNET_COLL_SYNC_FLAG_MASK)); char *loc_best_tree; loc_best_tree = gasneti_calloc(1,sizeof(char)*100); switch (op) { case GASNET_COLL_BROADCAST_OP: num_algs = GASNETE_COLL_BROADCAST_NUM_ALGS; break; case GASNET_COLL_SCATTER_OP: num_algs = GASNETE_COLL_SCATTER_NUM_ALGS; break; case GASNET_COLL_GATHER_OP: num_algs = GASNETE_COLL_GATHER_NUM_ALGS; break; case GASNET_COLL_GATHER_ALL_OP: num_algs = GASNETE_COLL_GATHER_ALL_NUM_ALGS; break; case GASNET_COLL_EXCHANGE_OP: num_algs = GASNETE_COLL_EXCHANGE_NUM_ALGS; break; default: num_algs = 0; /* warning suppression */ gasneti_fatalerror("not yet supported"); break; } *best_algidx = -1; PTHREAD_BARRIER(team, 1); for (algidx=0; algidxautotune_info->collective_algorithms[op][algidx].max_num_bytes && coll_args.nbytes >= team->autotune_info->collective_algorithms[op][algidx].min_num_bytes); /*ensure that all the flags required by the algorithm are passed in through the flags*/ int req_flags_ok = ((req_flags & team->autotune_info->collective_algorithms[op][algidx].requirements) == team->autotune_info->collective_algorithms[op][algidx].requirements); /*ensure that the synchronization flags exist in the list of possible synch flags for this algorithm*/ int sync_flags_ok = ((sync_flags & team->autotune_info->collective_algorithms[op][algidx].syncflags) == sync_flags); int nreq_flags_ok = (!(req_flags & team->autotune_info->collective_algorithms[op][algidx].n_requirements)); #if GASNET_DEBUG if(!size_ok){if(team->myrank==0 && gasnete_coll_print_autotuner_timers) gasneti_console_message("COLL INFO","skipping alg: %d (reason: size too large)", algidx);continue;} if(!req_flags_ok){if(team->myrank==0 && gasnete_coll_print_autotuner_timers) gasneti_console_message("COLL INFO","skipping alg: %d (reason: all req flags are not present)", algidx);continue;} if(!nreq_flags_ok){if(team->myrank==0 && gasnete_coll_print_autotuner_timers) gasneti_console_message("COLL INFO","skipping alg: %d (reason: one of the nreq flags is present)", algidx);continue;} if(!sync_flags_ok){if(team->myrank==0 && gasnete_coll_print_autotuner_timers) gasneti_console_message("COLL INFO","skipping alg: %d (reason: not valid for this syncflag)", algidx);continue;} #else if(!(size_ok && req_flags_ok && sync_flags_ok && nreq_flags_ok/*match!*/)) { continue; } #endif PTHREAD_BARRIER(team, 1); if(op == GASNET_COLL_BROADCAST_OP && algidx == GASNETE_COLL_BROADCAST_SCATTERALLGATHER) { if (*best_algidx == -1) { // no alg has been timed yet // assume this one is "best" in case there are no other valid ones (bug 3731) *best_algidx = algidx; } continue; // TODO: unclear to PHH why these algorithms are never timed } alg_best_time = curr_best_time; do_tuning_loop(team, op, coll_args, flags, fnptr, sample_work_arg, algidx, &alg_best_time, loc_best_param_list, loc_best_tree, 0, NULL GASNETI_THREAD_PASS); /*if this tuning iteration pass has beaten the best we've seen so far set it to be the new best*/ if(alg_best_time < curr_best_time) { *best_algidx = algidx; curr_best_time = alg_best_time; if(!team->autotune_info->collective_algorithms[op][algidx].tree_alg) { memset(loc_best_tree, 0, sizeof(char)*100); } else { gasneti_assert(strlen(loc_best_tree)>0); } } } gasneti_assert(*best_algidx != -1); /*take the best time that we've seen so far and then copy out the number of parameters to it*/ /*the tuning loop will set the loc_best_param_list with the appropriate parameters so we just have to copy it out and return it*/ *num_params = gasnet_coll_get_num_params(team, op, *best_algidx); *best_param = gasneti_malloc(sizeof(uint32_t)*gasnet_coll_get_num_params(team, op, *best_algidx)); GASNETI_MEMCPY_SAFE_EMPTY(*best_param, loc_best_param_list, sizeof(uint32_t)*(*num_params)); *best_tree = gasneti_calloc(strlen(loc_best_tree)+1,sizeof(char)); strcpy(*best_tree, loc_best_tree); gasneti_free(loc_best_tree); } /*************************/ /***LOAD THE OPERATIONS***/ /*************************/ GASNETI_INLINE(search_intervals) gasnete_coll_autotune_index_entry_t *search_intervals(gasnete_coll_autotune_index_entry_t *idx, int search_value, int exact_match) { gasnete_coll_autotune_index_entry_t *temp = idx; gasnete_coll_autotune_index_entry_t *ret = temp; if(!exact_match) { if(search_value < temp->start) { return ret; } while(temp!=NULL) { if(search_value >= temp->start) { ret = temp; temp = temp->next_interval; if(temp) continue; else return ret; } else { /*the pervious interval had the answer*/ return ret; } } } else { while(temp!=NULL) { if(search_value == temp->start) { return temp; } else { temp = temp->next_interval; } } } return NULL; } static gasnete_coll_implementation_t search_index(gasnet_coll_optype_t op, gasnete_coll_team_t team, uint32_t flags, size_t nbytes, gasnet_image_t rootimg, int exact_match) { gasnete_coll_autotune_index_entry_t *temp = team->autotune_info->autotuner_defaults; if(!temp) return NULL; /*first go through and pick out the right subtree for the threads per node*/ temp = search_intervals(temp, team->total_ranks, exact_match); if(!temp) return NULL; temp = search_intervals(temp->subtree, 1,exact_match); if(!temp) return NULL; /*next get the sync mode (need to find an exact match)*/ temp = search_intervals(temp->subtree, get_syncmode_from_flags(flags),1); if(!temp) return NULL; /*lookup the address mode (need to find an exact match)*/ temp = search_intervals(temp->subtree, get_addrmode_from_flags(flags),1); if(!temp) return NULL; /*loookup the op (need to find an exact match)*/ temp = search_intervals(temp->subtree, op,1); if(!temp) return NULL; /*loookup the root*/ temp = search_intervals(temp->subtree, rootimg,exact_match); if(!temp) return NULL; /*approximate match for size is ok*/ temp = search_intervals(temp->subtree, nbytes,exact_match); if(!temp) return NULL; return temp->impl; } static gasnete_coll_autotune_index_entry_t* add_interval(gasnete_coll_autotune_index_entry_t *list, uint32_t value, const char *node_type) { gasnete_coll_autotune_index_entry_t *current_head = list; gasnete_coll_autotune_index_entry_t *temp = list; if(!list) { current_head = gasneti_calloc(1, sizeof(gasnete_coll_autotune_index_entry_t)); current_head->start = value; current_head->node_type = node_type; return current_head; } else { /*value is less than the current head so preappend*/ if(current_head->start > value) { temp = gasneti_calloc(1, sizeof(gasnete_coll_autotune_index_entry_t)); temp->start = value; temp->node_type = node_type; temp->next_interval = current_head; return temp; } while(current_head) { if(current_head->start == value) { /*nothing todo*/ return list; } else if(current_head->next_interval) { /*check if the search value is between this and the next value*/ /*if it is append and return it*/ if(current_head->next_interval->start > value && current_head->start < value) { temp = gasneti_calloc(1, sizeof(gasnete_coll_autotune_index_entry_t)); temp->start = value; temp->node_type = node_type; temp->next_interval = current_head->next_interval; current_head->next_interval = temp; return list; } else { current_head = current_head->next_interval; } } else { /*end of list and no where to be found*/ temp = gasneti_calloc(1, sizeof(gasnete_coll_autotune_index_entry_t)); temp->start = value; temp->node_type = node_type; current_head->next_interval = temp; return list; } } } return NULL; } static gasnete_coll_autotune_index_entry_t *add_to_index(gasnet_coll_optype_t op, gasnete_coll_team_t team, uint32_t flags, size_t nbytes, gasnet_image_t rootimg, int profile_mode) { gasnete_coll_autotune_index_entry_t *idx; gasnete_coll_autotune_index_entry_t *temp; if(profile_mode) { idx = team->autotune_info->collective_profile; team->autotune_info->collective_profile = idx = add_interval(idx, team->total_ranks, "num_nodes"); temp = search_intervals(idx, team->total_ranks, 1); gasneti_assert(temp); } else { idx = team->autotune_info->autotuner_defaults; team->autotune_info->autotuner_defaults = idx = add_interval(idx, team->total_ranks, "num_nodes"); temp = search_intervals(idx, team->total_ranks, 1); gasneti_assert(temp); } temp->subtree = add_interval(temp->subtree, 1, "threads_per_node"); temp = search_intervals(temp->subtree, 1, 1); gasneti_assert(temp); temp->subtree = add_interval(temp->subtree, get_syncmode_from_flags(flags), "sync_mode"); temp = search_intervals(temp->subtree, get_syncmode_from_flags(flags), 1); gasneti_assert(temp); temp->subtree = add_interval(temp->subtree, get_addrmode_from_flags(flags), "address_mode"); temp = search_intervals(temp->subtree, get_addrmode_from_flags(flags), 1); gasneti_assert(temp); temp->subtree = add_interval(temp->subtree, op, "collective"); temp = search_intervals(temp->subtree, op, 1); gasneti_assert(temp); temp->subtree = add_interval(temp->subtree, rootimg, "root"); temp = search_intervals(temp->subtree, rootimg, 1); gasneti_assert(temp); temp->subtree = add_interval(temp->subtree, nbytes, "size"); temp = search_intervals(temp->subtree, nbytes, 1); gasneti_assert(temp); return temp; } void gasnete_coll_safe_broadcast(gasnete_coll_team_t team, void *dst, void *src, gasnet_image_t root, size_t nbytes, int nodes_only GASNETI_THREAD_FARG) { int flags = GASNET_COLL_IN_ALLSYNC | GASNET_COLL_OUT_ALLSYNC | GASNET_COLL_LOCAL | GASNET_COLL_DISABLE_AUTOTUNE; if(nodes_only) flags = flags | GASNET_COLL_NO_IMAGES; /* turn off algorithm tracing for the following broadcast because it's internal */ int tmp = gasnete_coll_print_coll_alg; gasnete_coll_print_coll_alg = 0; gasnet_coll_broadcast(team, dst, root, src, nbytes, flags); gasnete_coll_print_coll_alg = tmp; } static int verify_algorithm(gasnete_coll_team_t team, gasnet_coll_optype_t op, uint32_t flags, size_t nbytes, gasnete_coll_implementation_t impl) { uint32_t sync_flags = (flags & GASNET_COLL_SYNC_FLAG_MASK); /*strip the sync flags off the flags*/ uint32_t req_flags = (flags & (~GASNET_COLL_SYNC_FLAG_MASK)); int size_ok, req_flags_ok, sync_flags_ok; if(!impl) return 0; size_ok = (team->autotune_info->collective_algorithms[op][impl->fn_idx].max_num_bytes==0 || nbytes <= team->autotune_info->collective_algorithms[op][impl->fn_idx].max_num_bytes); /*ensure that all the flags required by the algorithm are passed in through the flags*/ req_flags_ok = ((req_flags & team->autotune_info->collective_algorithms[op][impl->fn_idx].requirements) == team->autotune_info->collective_algorithms[op][impl->fn_idx].requirements); /*ensure that the synchronization flags exist in the list of possible synch flags for this algorithm*/ sync_flags_ok = ((sync_flags & team->autotune_info->collective_algorithms[op][impl->fn_idx].syncflags) == sync_flags); return (size_ok && req_flags_ok && sync_flags_ok); } static gasnete_coll_implementation_t autotune_op(gasnet_team_handle_t team, gasnet_coll_optype_t op, gasnet_coll_args_t args, int flags GASNETI_THREAD_FARG) { gasnete_coll_implementation_t ret; /* explicit request to not tune */ if(flags & GASNET_COLL_DISABLE_AUTOTUNE) return NULL; if (gasnete_coll_print_coll_alg && team->myrank == 0) { char buf1[256], buf2[256]; print_op_str(buf1, op, flags); print_flag_str(buf2, flags); gasneti_console_message("COLL INFO","Autotuning %s: flags %s, nbytes %"PRIuPTR", root %u", buf1, buf2, (uintptr_t)args.nbytes, (unsigned int)args.rootimg); } /*if a tuning file has been specified for TEAM ALL and hasn't been yet loaded load it now*/ if(team == GASNET_TEAM_ALL && gasnete_coll_team_all_tuning_file && !team->autotune_info->autotuner_defaults) { gasnete_coll_loadTuningState(gasnete_coll_team_all_tuning_file, team GASNETI_THREAD_PASS); } if(team->autotune_info->profile_enabled) { gasnete_coll_autotune_index_entry_t *idx; idx = add_to_index(op, team, flags, args.nbytes, args.rootimg, 1); idx->num_calls++; } if(team->autotune_info->autotuner_defaults || team->autotune_info->search_enabled) { ret = search_index(op, team, flags, args.nbytes, args.rootimg, team->autotune_info->search_enabled); /*make sure the returned algortithm can handle the cases*/ if(verify_algorithm(team, op, flags, args.nbytes, ret)) { if (ret->team == NULL) { ret->team = team; ret->optype = op; ret->flags = flags; } if (gasnete_coll_print_coll_alg && team->myrank == 0) { /* print a search hit here */ gasneti_console_message("COLL INFO","The algorithm for the collective is in the existing autotuning database."); gasnete_coll_implementation_print(ret, stderr); } return ret; } } /*we searched the index w/ no luck so need to run a tuning run (if enabled)*/ if(team->autotune_info->search_enabled && team==GASNET_TEAM_ALL) { gasnete_coll_implementation_t temp = gasnete_coll_get_implementation(); gasnete_coll_autotune_index_entry_t *idx; gasnet_image_t myrank; uint32_t best_algidx; uint32_t num_params; uint32_t *param_list; #if 0 char flagstr[15]; #endif char best_tree[GASNETE_COLL_MAX_TREE_TYPE_STRLEN]; char all_best_tree[GASNETE_COLL_MAX_TREE_TYPE_STRLEN]; char *temp_tree_str; ret = gasnete_coll_get_implementation(); myrank = team->myrank; #if 0 if(myrank == srcimage) { gasneti_console_message("COLL INFO","starting autotune for %s %d byte broadcast\n", print_flag_str(flagstr, flags), (int)nbytes); } #endif gasnete_coll_tune_generic_op(team, op, args, flags, NULL, NULL, /*returned by the algorithm*/ &best_algidx, &num_params, ¶m_list, &temp_tree_str GASNETI_THREAD_PASS); /*until we have a solution for teams with srcimages*/ if(myrank == args.rootimg) { #if 0 gasneti_console_message("COLL INFO","finishing autotune for %s %d byte broadcast\n", print_flag_str(flagstr, flags), (int)nbytes); #endif temp->optype = op; temp->flags = flags; temp->fn_idx = best_algidx; temp->num_params = num_params; GASNETI_MEMCPY_SAFE_EMPTY(temp->param_list, param_list, sizeof(uint32_t)*num_params); if(strlen(temp_tree_str) > 0) { gasneti_assert(strlen(temp_tree_str)<(GASNETE_COLL_MAX_TREE_TYPE_STRLEN-1)); strcpy(best_tree, temp_tree_str); gasneti_free(temp_tree_str); } else { memset(best_tree, 0, sizeof(char)*GASNETE_COLL_MAX_TREE_TYPE_STRLEN); } } /*have the root tell all other nodes in this team what the correct implementation is*/ gasnete_coll_safe_broadcast(team, ret, temp, args.rootimg, sizeof(struct gasnete_coll_implementation_t_), 0 GASNETI_THREAD_PASS); memset(all_best_tree, 0, sizeof(char)*GASNETE_COLL_MAX_TREE_TYPE_STRLEN); gasnete_coll_safe_broadcast(team, all_best_tree, best_tree, args.rootimg, GASNETE_COLL_MAX_TREE_TYPE_STRLEN*sizeof(char), 0 GASNETI_THREAD_PASS); ret->fn_ptr.untyped_fn = team->autotune_info->collective_algorithms[op][ret->fn_idx].fn_ptr.untyped_fn; ret->team = team; if(strlen(all_best_tree) > 0) { ret->tree_type = gasnete_coll_make_tree_type_str(all_best_tree); } gasnete_coll_free_implementation(temp); gasneti_assert(ret->team == team); /*insert ret into the search index*/ PTHREAD_BARRIER(team, 1); { idx = add_to_index(op, team, flags, args.nbytes, args.rootimg, 0); idx->impl = ret; } PTHREAD_BARRIER(team, 1); if (gasnete_coll_print_coll_alg && team->myrank == 0) { gasneti_console_message("COLL INFO","Finish autotuning. The best algorithm searched is:"); gasnete_coll_implementation_print(ret, stderr); } return ret; } else { if (gasnete_coll_print_coll_alg && team->myrank == 0) { gasneti_console_message("COLL INFO","Search is disabled or the team is not GASNET_TEAM_ALL."); } return NULL; } } gasnete_coll_implementation_t gasnete_coll_autotune_get_bcast_algorithm(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, uint32_t flags GASNETI_THREAD_FARG) { const size_t eager_limit = MIN(gasnete_coll_p2p_eager_min, gex_AM_LUBRequestMedium()); gasnete_coll_implementation_t ret; /*first try to search our gasnet autotuner index to see if we have anything for it*/ /*if not then fall back to our orignal implementation*/ { gasnet_coll_args_t args = GASNET_COLL_ARGS_INITIALIZER; args.dst = (uint8_t**)&dst; args.src = (uint8_t**)&src; args.rootimg = srcimage; args.nbytes = nbytes; ret = autotune_op(team, GASNET_COLL_BROADCAST_OP, args, flags GASNETI_THREAD_PASS); if(ret) return ret; } /*autotuning is turned off or we need to fall back to the default*/ ret = gasnete_coll_get_implementation(); ret->need_to_free = 1; ret->team = team; ret->flags = flags; ret->optype = GASNET_COLL_BROADCAST_OP; ret->tree_type = gasnete_coll_autotune_get_tree_type(team->autotune_info, GASNET_COLL_BROADCAST_OP, -1,nbytes, flags); /*for now encode the original decision tree*/ if (nbytes <= eager_limit) { /* Small enough for Eager, which will eliminate any barriers for *_MYSYNC and * the need for passing addresses for _LOCAL * Eager is totally AM-based and thus safe regardless of *_IN_SEGMENT */ ret->fn_idx = GASNETE_COLL_BROADCAST_TREE_EAGER; } else if (flags & GASNET_COLL_DST_IN_SEGMENT ) { /* run the segmented broadcast code function internally checks synch flags and SINGLE/LOCAL flags */ /*this should also be part of the space*/ if((nbytes > team->total_ranks) && !(flags & GASNETE_COLL_SUBORDINATE) && 0) { ret->fn_idx = GASNETE_COLL_BROADCAST_SCATTERALLGATHER; } else if(nbytes <= gasnete_coll_get_pipe_seg_size(team->autotune_info, GASNET_COLL_BROADCAST_OP, flags)) { ret->fn_idx = GASNETE_COLL_BROADCAST_TREE_PUT_SCRATCH; } else if(nbytes<=team->autotune_info->collective_algorithms[GASNET_COLL_BROADCAST_OP][GASNETE_COLL_BROADCAST_TREE_PUT_SEG].max_num_bytes) { ret->num_params = 1; ret->param_list[0] = gasnete_coll_get_pipe_seg_size(team->autotune_info, GASNET_COLL_BROADCAST_OP, flags); ret->fn_idx = GASNETE_COLL_BROADCAST_TREE_PUT_SEG; } else if(flags & GASNET_COLL_SRC_IN_SEGMENT) { ret->num_params = 0; ret->fn_idx = GASNETE_COLL_BROADCAST_TREE_RVGET; } else { ret->num_params = 0; ret->fn_idx = GASNETE_COLL_BROADCAST_RVOUS; } } else if (flags & GASNET_COLL_SRC_IN_SEGMENT) { /* We can use Rendezvous+Get to eliminate any barriers for *_MYSYNC. * The Rendezvous is needed for _LOCAL. */ ret->num_params = 0; ret->fn_idx = GASNETE_COLL_BROADCAST_RVGET; } else { /* If we reach here then neither src nor dst is in-segment */ ret->num_params = 0; ret->fn_idx = GASNETE_COLL_BROADCAST_RVOUS; } ret->fn_ptr.bcast_fn = team->autotune_info->collective_algorithms[GASNET_COLL_BROADCAST_OP][ret->fn_idx].fn_ptr.bcast_fn; if (gasnete_coll_print_coll_alg && team->myrank == 0) { gasneti_console_message("COLL INFO","The algorithm for broadcast is selected by the default logic."); gasnete_coll_implementation_print(ret, stderr); } if ((nbytes > eager_limit) && !(flags & GASNETE_COLL_SUBORDINATE)) { GASNETE_COLL_CHECK_NO_SCRATCH(team); } return ret; } gasnete_coll_implementation_t gasnete_coll_autotune_get_scatter_algorithm(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, size_t dist, uint32_t flags GASNETI_THREAD_FARG) { const size_t eager_limit = MIN(gasnete_coll_p2p_eager_scale, gex_AM_LUBRequestMedium()/team->total_ranks); gasnete_coll_implementation_t ret; { gasnet_coll_args_t args = GASNET_COLL_ARGS_INITIALIZER; args.dst = (uint8_t**)&dst; args.src = (uint8_t**)&src; args.rootimg = srcimage; args.nbytes = nbytes; args.dist = dist; ret = autotune_op(team, GASNET_COLL_SCATTER_OP, args, flags GASNETI_THREAD_PASS); if(ret) return ret; } ret = gasnete_coll_get_implementation(); /* "Discover" in-segment flags if needed/possible */ flags = gasnete_coll_segment_check(team, flags, 0, 0, dst, nbytes, 1, srcimage, src, nbytes*gasneti_nodes); ret->team = team; ret->optype = GASNET_COLL_SCATTER_OP; ret->flags = flags; ret->need_to_free = 1; ret->tree_type = gasnete_coll_autotune_get_tree_type(team->autotune_info, GASNET_COLL_SCATTER_OP, srcimage, nbytes, flags); /* Choose algorithm based on arguments */ if ((flags & GASNET_COLL_DST_IN_SEGMENT) && (flags & GASNET_COLL_SRC_IN_SEGMENT)) { /* Both ends are in-segment */ if (nbytes <= eager_limit) { /* Small enough for Eager, which works for out-of-segment src and/or dst */ ret->fn_idx = GASNETE_COLL_SCATTER_TREE_EAGER; } else if(nbytes <= gasnete_coll_get_pipe_seg_size(team->autotune_info, GASNET_COLL_SCATTER_OP, flags)) { ret->fn_idx = GASNETE_COLL_SCATTER_TREE_PUT_NO_COPY; } else if(nbytes <= team->autotune_info->collective_algorithms[GASNET_COLL_SCATTER_OP][GASNETE_COLL_SCATTER_TREE_PUT_SEG].max_num_bytes) { ret->num_params = 1; ret->param_list[0] = gasnete_coll_get_pipe_seg_size(team->autotune_info, GASNET_COLL_SCATTER_OP, flags); ret->fn_idx = GASNETE_COLL_SCATTER_TREE_PUT_SEG; } else { ret->fn_idx = GASNETE_COLL_SCATTER_RVOUS; } } else if (nbytes <= eager_limit) { /* Small enough for Eager, which works for out-of-segment src and/or dst */ ret->fn_idx = GASNETE_COLL_SCATTER_EAGER; } else if (flags & GASNET_COLL_SRC_IN_SEGMENT) { /* Only the source is in-segment (and too big for Eager) */ ret->fn_idx = GASNETE_COLL_SCATTER_RVGET; } else if (flags & GASNET_COLL_DST_IN_SEGMENT) { /* Only the destination is in-segment (and too big for Eager) */ /* XXX: could do better since DST is in-segment */ ret->fn_idx = GASNETE_COLL_SCATTER_RVOUS; } else { ret->fn_idx = GASNETE_COLL_SCATTER_RVOUS; } ret->fn_ptr.scatter_fn = team->autotune_info->collective_algorithms[GASNET_COLL_SCATTER_OP][ret->fn_idx].fn_ptr.scatter_fn; if (gasnete_coll_print_coll_alg && team->myrank == 0) { gasneti_console_message("COLL INFO","The algorithm for scatter is selected by the default logic."); gasnete_coll_implementation_print(ret, stderr); } if ((nbytes > eager_limit) && !(flags & GASNETE_COLL_SUBORDINATE)) { GASNETE_COLL_CHECK_NO_SCRATCH(team); } return ret; } gasnete_coll_implementation_t gasnete_coll_autotune_get_gather_algorithm(gasnet_team_handle_t team,gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, size_t dist, uint32_t flags GASNETI_THREAD_FARG) { const size_t eager_limit = MIN(gasnete_coll_p2p_eager_scale, gex_AM_LUBRequestMedium()/team->total_ranks); gasnete_coll_implementation_t ret; { gasnet_coll_args_t args = GASNET_COLL_ARGS_INITIALIZER; args.dst = (uint8_t**)&dst; args.src = (uint8_t**)&src; args.rootimg = dstimage; args.nbytes = nbytes; args.dist = dist; /*first try to search our gasnet autotuner index to see if we have anything for it*/ ret = autotune_op(team, GASNET_COLL_GATHER_OP, args, flags GASNETI_THREAD_PASS); if(ret) return ret; } ret = gasnete_coll_get_implementation(); ret->need_to_free =1; ret->team = team; ret->flags = flags; ret->optype = GASNET_COLL_GATHER_OP; ret->tree_type = gasnete_coll_autotune_get_tree_type(team->autotune_info, GASNET_COLL_GATHER_OP, dstimage, nbytes, flags); if ((flags & GASNET_COLL_DST_IN_SEGMENT) && (flags & GASNET_COLL_SRC_IN_SEGMENT)) { if (nbytes <= eager_limit) { ret->fn_idx = GASNETE_COLL_GATHER_TREE_EAGER; } else if(!(flags & GASNETE_COLL_NONROOT_SUBORDINATE)) { if(nbytes <= gasnete_coll_get_pipe_seg_size(team->autotune_info, GASNET_COLL_GATHER_OP, flags)) { ret->fn_idx = GASNETE_COLL_GATHER_TREE_PUT_NO_COPY; } else if(nbytes <= team->autotune_info->collective_algorithms[GASNET_COLL_GATHER_OP][GASNETE_COLL_GATHER_TREE_PUT_SEG].max_num_bytes) { ret->num_params = 1; ret->param_list[0] = gasnete_coll_get_pipe_seg_size(team->autotune_info, GASNET_COLL_GATHER_OP, flags); ret->fn_idx = GASNETE_COLL_GATHER_TREE_PUT_SEG; } else { ret->fn_idx = GASNETE_COLL_GATHER_RVOUS; } } else { if (nbytes <= eager_limit) { ret->fn_idx = GASNETE_COLL_GATHER_TREE_EAGER; } else { ret->fn_idx = GASNETE_COLL_GATHER_RVPUT; } } } else if (nbytes <=eager_limit) { /* Small enough for Eager, which works for out-of-segment src and/or dst */ ret->fn_idx = GASNETE_COLL_GATHER_TREE_EAGER; } else if (flags & GASNET_COLL_DST_IN_SEGMENT) { /* Only the destination is in-segment (and too big for Eager) */ ret->fn_idx = GASNETE_COLL_GATHER_RVPUT; } else if (flags & GASNET_COLL_SRC_IN_SEGMENT) { /* Only the source is in-segment (and too big for Eager) */ /* XXX: could do better since src is in-segment */ ret->fn_idx = GASNETE_COLL_GATHER_RVOUS; } else { ret->fn_idx = GASNETE_COLL_GATHER_RVOUS; } ret->fn_ptr.gather_fn = team->autotune_info->collective_algorithms[GASNET_COLL_GATHER_OP][ret->fn_idx].fn_ptr.gather_fn; if (gasnete_coll_print_coll_alg && team->myrank == 0) { gasneti_console_message("COLL INFO","The algorithm for gather is selected by the default logic."); gasnete_coll_implementation_print(ret, stderr); } if ((nbytes > eager_limit) && !(flags & GASNETE_COLL_SUBORDINATE)) { GASNETE_COLL_CHECK_NO_SCRATCH(team); } return ret; } gasnete_coll_implementation_t gasnete_coll_autotune_get_gather_all_algorithm(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, uint32_t flags GASNETI_THREAD_FARG) { size_t max_dissem_msg_size = team->total_ranks*nbytes; gasnete_coll_implementation_t ret; { gasnet_coll_args_t args = GASNET_COLL_ARGS_INITIALIZER; args.dst = (uint8_t**)&dst; args.src = (uint8_t**)&src; args.rootimg = 0; args.nbytes = nbytes; /*first try to search our gasnet autotuner index to see if we have anything for it*/ ret = autotune_op(team, GASNET_COLL_GATHER_ALL_OP, args, flags GASNETI_THREAD_PASS); if(ret) return ret; } ret = gasnete_coll_get_implementation(); ret->need_to_free =1; ret->team = team; ret->flags = flags; ret->optype = GASNET_COLL_GATHER_ALL_OP; if(nbytes <= gasnete_coll_get_dissem_limit(team->autotune_info, GASNET_COLL_GATHER_ALL_OP, flags) && max_dissem_msg_size <= MIN(team->scratch_size, gex_AM_LUBRequestLong())) { ret->fn_idx = GASNETE_COLL_GATHER_ALL_DISSEM; } else { ret->fn_idx = GASNETE_COLL_GATHER_ALL_GATHBCAST; } ret->fn_ptr.gather_all_fn = team->autotune_info->collective_algorithms[GASNET_COLL_GATHER_ALL_OP][ret->fn_idx].fn_ptr.gather_all_fn; if (gasnete_coll_print_coll_alg && team->myrank == 0) { gasneti_console_message("COLL INFO","The algorithm for gather_all is selected by the default logic."); gasnete_coll_implementation_print(ret, stderr); } GASNETE_COLL_CHECK_NO_SCRATCH(team); // All Gather_all calls "count" return ret; } gasnete_coll_implementation_t gasnete_coll_autotune_get_exchange_algorithm(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, uint32_t flags GASNETI_THREAD_FARG) { gasnete_coll_implementation_t ret; size_t max_dissem_msg_size = nbytes*(team->total_ranks/2+(team->total_ranks%2)); { gasnet_coll_args_t args = GASNET_COLL_ARGS_INITIALIZER; args.dst = (uint8_t**)&dst; args.src = (uint8_t**)&src; args.rootimg = 0; args.nbytes = nbytes; /*first try to search our gasnet autotuner index to see if we have anything for it*/ ret = autotune_op(team, GASNET_COLL_EXCHANGE_OP, args, flags GASNETI_THREAD_PASS); if(ret) return ret; } ret = gasnete_coll_get_implementation(); ret->need_to_free =1; ret->team = team; ret->flags = flags; ret->optype = GASNET_COLL_EXCHANGE_OP; if (nbytes <= gasnete_coll_get_dissem_limit(team->autotune_info, GASNET_COLL_EXCHANGE_OP, flags) && nbytes*team->total_ranks+(max_dissem_msg_size*2)<= team->scratch_size && max_dissem_msg_size <= gex_AM_LUBRequestLong()) { ret->fn_idx = GASNETE_COLL_EXCHANGE_DISSEM2; } else if(flags & GASNET_COLL_DST_IN_SEGMENT){ ret->fn_idx = GASNETE_COLL_EXCHANGE_RVPUT; } else { ret->fn_idx = GASNETE_COLL_EXCHANGE_GATH; } ret->fn_ptr.exchange_fn = team->autotune_info->collective_algorithms[GASNET_COLL_EXCHANGE_OP][ret->fn_idx].fn_ptr.exchange_fn; if (gasnete_coll_print_coll_alg && team->myrank == 0) { gasneti_console_message("COLL INFO","The algorithm for exchange is selected by the default logic."); gasnete_coll_implementation_print(ret, stderr); } GASNETE_COLL_CHECK_NO_SCRATCH(team); // All Exchange calls "count" return ret; } static void dump_tuning_state_helper(myxml_node_t *parent, gasnete_coll_autotune_index_entry_t *tuning_root) { gasnete_coll_autotune_index_entry_t *temp=tuning_root; while(temp!=NULL) { char buffer[50]; myxml_node_t *temp_xml; if(STRINGS_MATCH(temp->node_type, "sync_mode")) { syncmode_to_str(buffer, temp->start); temp_xml =myxml_createNode(parent, temp->node_type, (char*)"val", buffer, NULL); } else if(STRINGS_MATCH(temp->node_type, "address_mode")) { addrmode_to_str(buffer, temp->start); temp_xml =myxml_createNode(parent, temp->node_type, (char*)"val", buffer, NULL); } else if(STRINGS_MATCH(temp->node_type, "collective")) { optype_to_str(buffer, temp->start); temp_xml =myxml_createNode(parent, temp->node_type, (char*)"val", buffer, NULL); } else { temp_xml = myxml_createNodeInt(parent, temp->node_type, (char*)"val", temp->start, NULL); } if(temp->subtree) { dump_tuning_state_helper(temp_xml, temp->subtree); } else { char buffer[GASNETE_COLL_MAX_TREE_TYPE_STRLEN]; char tempbuffer[512]; int c; gasnete_coll_implementation_t impl = temp->impl; gasneti_assert(impl); gasnete_coll_tree_type_to_str(buffer, impl->tree_type); /* fn_idx number goes first so that a later atoi() when reading the xml file would work. */ sprintf(tempbuffer, "%d (%s)", impl->fn_idx, impl->team->autotune_info->collective_algorithms[impl->optype][impl->fn_idx].name_str); /* sprintf(tempbuffer, "%d", impl->fn_idx); */ myxml_createNode(temp_xml, (char*) "Best_Alg", NULL, NULL,tempbuffer); myxml_createNode(temp_xml, (char*) "Best_Tree", NULL, NULL, buffer); sprintf(tempbuffer, "%d", impl->num_params); myxml_createNode(temp_xml, (char*) "Num_Params", NULL, NULL, tempbuffer); for(c=0; cnum_params; c++) { char buff_idx[128]; sprintf(tempbuffer, "%d", impl->fn_idx); sprintf(buff_idx, "param_%d", c); sprintf(buffer, "%d", (int)impl->param_list[c]); myxml_createNode(temp_xml, buff_idx, NULL, NULL, buffer); } } temp = temp->next_interval; } } void gasnete_coll_dumpTuningState(char *filename, gasnete_coll_team_t team GASNETI_THREAD_FARG) { myxml_node_t *node; gasnet_image_t myrank = team->myrank; if(myrank==0 && team->autotune_info->search_enabled) { FILE *outstream; node = myxml_createNode(NULL, (char*) "machine", (char*)"CONFIG", (char*) GASNET_CONFIG_STRING, NULL); if(!filename) { if(team!=GASNET_TEAM_ALL) {gasneti_console_message("WARNING","printing tuning output to default filename is not recommended for non-TEAM-ALL teams");} outstream = fopen("gasnet_coll_tuning_defaults.bin", "w"); } else { outstream = fopen(filename, "w"); } if (outstream == NULL) { gasneti_fatalerror("gasnete_coll_dumpTuningState failed to open output file %s!\n", filename ? filename : "gasnet_coll_tuning_defaults.bin"); } dump_tuning_state_helper(node, team->autotune_info->autotuner_defaults); myxml_printTreeBIN(outstream, node); fclose(outstream); } } static void dump_profile_helper(myxml_node_t *parent, gasnete_coll_autotune_index_entry_t *tuning_root) { gasnete_coll_autotune_index_entry_t *temp=tuning_root; while(temp!=NULL) { char buffer[50]; myxml_node_t *temp_xml; if(STRINGS_MATCH(temp->node_type, "sync_mode")) { syncmode_to_str(buffer, temp->start); temp_xml =myxml_createNode(parent, temp->node_type, (char*)"val", buffer, NULL); } else if(STRINGS_MATCH(temp->node_type, "address_mode")) { addrmode_to_str(buffer, temp->start); temp_xml =myxml_createNode(parent, temp->node_type, (char*)"val", buffer, NULL); } else if(STRINGS_MATCH(temp->node_type, "collective")) { optype_to_str(buffer, temp->start); temp_xml =myxml_createNode(parent, temp->node_type, (char*)"val", buffer, NULL); } else { temp_xml = myxml_createNodeInt(parent, temp->node_type, (char*)"val", temp->start, NULL); } if(temp->subtree) { dump_profile_helper(temp_xml, temp->subtree); } else { char tempbuffer[10]; sprintf(tempbuffer, "%d", temp->num_calls); myxml_createNode(temp_xml, (char*) "Num_Calls", NULL, NULL, tempbuffer); } temp = temp->next_interval; } } void gasnete_coll_dumpProfile(char *filename, gasnete_coll_team_t team GASNETI_THREAD_FARG) { myxml_node_t *node; gasnet_image_t myrank = team->myrank; if(myrank==0 && team->autotune_info->profile_enabled) { FILE *outstream; node = myxml_createNode(NULL, (char*) "machine", (char*)"CONFIG", (char*) GASNET_CONFIG_STRING, NULL); if(!filename) { if(team!=GASNET_TEAM_ALL) {gasneti_console_message("WARNING","printing tuning output to default filename is not recommended for non-TEAM-ALL teams");} outstream = fopen("gasnet_coll_profile.bin", "w"); } else { outstream = fopen(filename, "w"); } dump_profile_helper(node, team->autotune_info->collective_profile); myxml_printTreeBIN(outstream, node); fclose(outstream); } } void gasnete_coll_loadTuningState(char *filename, gasnete_coll_team_t team GASNETI_THREAD_FARG) { myxml_node_t *nodes; gasnet_image_t myrank = team->myrank; PTHREAD_BARRIER(team, 1); { if(myrank == 0) { FILE *instream; myxml_bytestream_t file_content; if(!filename) { if(team!=GASNET_TEAM_ALL) {gasneti_console_message("WARNING","loading tuning output to default filename is not recommended for non-TEAM-ALL teams");} instream = fopen("gasnet_coll_tuning_defaults.bin", "r"); } else { instream = fopen(filename, "r"); } /*load the tuning file into a bytestream*/ if(instream == NULL) { gasneti_fatalerror("gasnete_coll_loadTuningState() failed to open the tuning file %s!\n", filename ? filename : "gasnet_coll_tuning_defaults.bin"); } file_content = myxml_loadFile_into_bytestream(instream); /*initiate a broadcast to all the other nodes*/ gasnete_coll_safe_broadcast(team, &file_content.size, &file_content.size, 0, sizeof(size_t), 1 GASNETI_THREAD_PASS); gasnete_coll_safe_broadcast(team, file_content.bytes, file_content.bytes, 0, file_content.size, 1 GASNETI_THREAD_PASS); nodes = myxml_loadTreeBYTESTREAM(file_content.bytes, file_content.size); team->autotune_info->autotuner_defaults = gasnete_coll_load_autotuner_defaults(team->autotune_info, nodes); } else { size_t nbytes; char *buffer; /*receive the file size*/ gasnete_coll_safe_broadcast(team, &nbytes, NULL, 0, sizeof(size_t), 1 GASNETI_THREAD_PASS); buffer = gasneti_malloc(sizeof(char)*nbytes); /*receive the file contents*/ gasnete_coll_safe_broadcast(team, buffer, NULL, 0, sizeof(char)*nbytes, 1 GASNETI_THREAD_PASS); nodes = myxml_loadTreeBYTESTREAM(buffer, nbytes); team->autotune_info->autotuner_defaults = gasnete_coll_load_autotuner_defaults(team->autotune_info, nodes); } } PTHREAD_BARRIER(team, 1); } void gasnete_coll_implementation_print(gasnete_coll_implementation_t impl, FILE *fp) { int i; char str_buf[256]; fprintf(fp, "gasnete_coll_implementation_t %p:\n", (void *)impl); gasneti_assert(impl != NULL); gasneti_assert(impl->optype < GASNET_COLL_NUM_COLL_OPTYPES); gasneti_assert(impl->team != NULL); gasneti_assert(impl->team->autotune_info != NULL); gasneti_assert(impl->team->autotune_info->collective_algorithms[impl->optype][impl->fn_idx].name_str != NULL); print_op_str(str_buf, impl->optype, impl->flags); fprintf(fp, "Collective Op type: %s (%d), Algorithm: %d (%s).\n", str_buf, impl->optype, impl->fn_idx, impl->team->autotune_info->collective_algorithms[impl->optype][impl->fn_idx].name_str); print_flag_str(str_buf, impl->flags); fprintf(fp, "flag: %s\n", str_buf); gasnete_coll_tree_type_to_str(str_buf, impl->tree_type); fprintf(fp, "tree_type: %s\n", str_buf); fprintf(fp, "Num of params: %d; ", impl->num_params); for (i=0; inum_params; i++) { fprintf(fp, "params[%d]=%u ", i, (unsigned int)impl->param_list[i]); } fprintf(fp, "\n\n"); fflush(fp); } gasnet-2025.8.0/extended-ref/coll/gasnet_hashtable.c0000664000175000017500000001262715142313673022375 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_hashtable.c $ * Description: Reference implemetation of GASNet Collectives team * Copyright 2009, The Regents of the University of California * Terms of use are as specified in license.txt */ /** * Implement hash table data structure using vectors (chaining) to * solve collisions * * For information about the data structures and algorithms used in the * implementation, please see Ch. 12 of Introduction to Algorithms * by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest. * * Lawrence Berkeley National Laboratory * 2009 */ #include #include #include #include /* Part I: table */ gasnete_table_t * gasnete_table_create(uint32_t size) { gasnete_table_t * table; gasneti_assert(size > 0); table = (gasnete_table_t *)gasneti_malloc(sizeof(gasnete_table_t)); table->slots = (gasnete_table_item_t *)gasneti_malloc(sizeof(gasnete_table_item_t)*size); table->size = size; table->num = 0; return table; } gasnete_table_item_t * gasnete_table_search(const gasnete_table_t * const table, uint32_t key) { uint32_t i; gasnete_table_item_t * slots; gasneti_assert(table != NULL); slots = table->slots; for (i=0; inum; i++) if (key == slots[i].key) return &slots[i]; return NULL; /* item with key is not found in the table */ } uint32_t gasnete_table_insert(gasnete_table_t * const table, gasnete_table_item_t item) { if (table->num >= table->size) return 1; /* insertion failed because the table is full */ /* added the item to the end of the table */ table->slots[table->num] = item; table->num++; return 0; /* success */ } uint32_t gasnete_table_remove(gasnete_table_t * const table, uint32_t key, gasnete_table_item_t * deleted) { gasnete_table_item_t item; uint32_t i; gasnete_table_item_t * slots; gasneti_assert(table != NULL); slots = table->slots; for (i=0; inum; i++) if (key == slots[i].key) { item = table->slots[i]; if (deleted != NULL) { deleted->key = item.key; deleted->data = item.data; } if (i < table->num-1) table->slots[i] = table->slots[table->num-1]; table->num--; return 0; } #ifdef DEBUG gasneti_console_message("WARNING","gasnete_table_remove() trying to remove an item not in the table!"); #endif return 1; /* item not in the table */ } void gasnete_table_copy(const gasnete_table_t * const src, gasnete_table_t * const dst) { uint32_t i; gasnete_table_item_t * src_slots, * dst_slots; gasneti_assert(dst->size >= src->num); src_slots = src->slots; dst_slots = dst->slots; for (i=0; inum; i++) dst_slots[i] = src_slots[i]; dst->num = src->num; } void gasnete_table_free(gasnete_table_t * const table) { gasneti_assert(table != NULL); gasneti_free(table->slots); gasneti_free(table); } /* Part II: hashtable build over table */ #define TABLE_INIT_SIZE 10 gasnete_hashtable_t * gasnete_hashtable_create(uint32_t size) { gasnete_hashtable_t * ht; uint32_t i; gasneti_assert(size > 0); ht = (gasnete_hashtable_t *)gasneti_malloc(sizeof(gasnete_hashtable_t)); ht->buckets = (gasnete_table_t **)gasneti_malloc(sizeof(gasnete_table_t *)*size); ht->size = size; ht->num = 0; for (i=0; ibuckets[i] = gasnete_table_create(TABLE_INIT_SIZE); gasneti_assert(ht->buckets[i] != NULL); } return ht; } void gasnete_hashtable_free(gasnete_hashtable_t * ht) { uint32_t i; gasneti_assert(ht != NULL); gasneti_assert(ht->buckets != NULL); for (i=0; isize; i++) { gasneti_assert(ht->buckets[i] != NULL); gasnete_table_free(ht->buckets[i]); } gasneti_free(ht->buckets); gasneti_free(ht); } uint32_t gasnete_hashtable_search(gasnete_hashtable_t * ht, uint32_t key, void ** data) { gasnete_table_t * table; gasnete_table_item_t * item; gasneti_assert(ht != NULL); table = ht->buckets[gasnete_hashtable_hash(ht, key)]; gasneti_assert (table != NULL); item = gasnete_table_search(table, key); if (item == NULL) return 1; /* cannot find the item with key */ if (data != NULL) *data = item->data; return 0; /* success */ } uint32_t gasnete_hashtable_insert(gasnete_hashtable_t * ht, uint32_t key, void * data) { gasnete_table_t * table; gasnete_table_item_t item; uint32_t i; gasneti_assert(ht != NULL); item.key = key; item.data = data; i = gasnete_hashtable_hash(ht, key); table = ht->buckets[i]; gasneti_assert (table != NULL); /* double the size of the table if the table is full */ if (table->num == table->size) { gasnete_table_t * new_table; new_table = gasnete_table_create(table->size*2); gasneti_assert(new_table != NULL); gasnete_table_copy(table, new_table); ht->buckets[i] = new_table; gasnete_table_free(table); table = new_table; } ht->num++; return gasnete_table_insert(table, item); } uint32_t gasnete_hashtable_remove(gasnete_hashtable_t * ht, uint32_t key, void ** data) { gasnete_table_t * table; gasnete_table_item_t item; uint32_t i, rv; gasneti_assert(ht != NULL); i = gasnete_hashtable_hash(ht, key); table = ht->buckets[i]; gasneti_assert (table != NULL); if (table == NULL) return 1; rv = gasnete_table_remove(table, key, &item); if (rv == 0 && data != NULL) *data = item.data; ht->num--; return rv; } gasnet-2025.8.0/extended-ref/coll/gasnet_bootstrap.c0000664000175000017500000005332415142313673022456 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_bootstrap.c $ * Description: Conduit-independent AM-based bootstrap collectives * Copyright 2022, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include // for handler indices /* ------------------------------------------------------------------------------------ */ // Return a vector of peers for dissemination barrier or Bruck's GatherAll // returns length, writes pointer to *out_p // when length is 0, *out_p will be NULL // // Note that the result returned in *out_p remains owned by this function. // Callers must not free or write to it. // // Note that the only thread-safety provisions are guards against concurrent // handler execution if GASNETI_CONDUIT_THREADS is asserted. This is under // the assumption that the only callers are serial initialization code and // AM handlers such as those in this file. gex_Rank_t gasneti_get_dissem_peers(const gex_Rank_t **out_p) { static gex_Rank_t result_len = 0; static gex_Rank_t *result_vec = NULL; static int is_init = 0; #if GASNETI_CONDUIT_THREADS static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); #endif if (!is_init) { is_init = 1; gex_Rank_t size = gasneti_nodes; gex_Rank_t rank = gasneti_mynode; if (size > 1) { gasneti_assert_uint(result_len ,==, 0); for (gex_Rank_t i = 1; i < size; i *= 2) result_len += 1; result_vec = gasneti_malloc(result_len * sizeof(gex_Rank_t)); gasneti_leak(result_vec); for (gex_Rank_t i = 0; i < result_len; ++i) { gex_Rank_t distance = 1 << i; result_vec[i] = (distance <= rank) ? (rank - distance) : (rank + (size - distance)); } } } #if GASNETI_CONDUIT_THREADS gasneti_mutex_unlock(&lock); #endif *out_p = result_vec; return result_len; } #if GASNET_PSHM // As above but consisting of just one "leader" per nbrhd gex_Rank_t gasneti_get_dissem_peers_pshm(const gex_Rank_t **out_p) { static gex_Rank_t result_len = 0; static gex_Rank_t *result_vec = NULL; static int is_init = 0; #if GASNETI_CONDUIT_THREADS static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); #endif if (!is_init) { is_init = 1; gex_Rank_t size = gasneti_nodemap_global_count; gex_Rank_t rank = gasneti_nodemap_global_rank; if (size > 1) { gasneti_assert_uint(result_len ,==, 0); for (gex_Rank_t i = 1; i < size; i *= 2) result_len += 1; result_vec = gasneti_malloc(result_len * sizeof(gex_Rank_t)); gasneti_leak(result_vec); for (gex_Rank_t i = 0; i < result_len; ++i) { gex_Rank_t distance = 1 << i; gex_Rank_t peer = (distance <= rank) ? (rank - distance) : (rank + (size - distance)); result_vec[i] = gasneti_pshm_firsts[peer]; } } } #if GASNETI_CONDUIT_THREADS gasneti_mutex_unlock(&lock); #endif *out_p = result_vec; return result_len; } #endif /* ------------------------------------------------------------------------------------ */ // Host-scoped (potentially superset of supernode) barrier // // Note a lack explicit thread-safety provisions, under the assumption that the // only callers are serial initialization. The use of atomics in the handler // are sufficient to guard against concurrent hander execution by a conduit thread. static gasneti_weakatomic32_t gasneti_hbarr_rcvd[2][32]; // Implicitly zero-initialized extern void gasnetc_hbarr_reqh(gex_Token_t token, gex_AM_Arg_t arg0) { const int phase = arg0 & 1; const int step = (arg0 >> 1) & 0x1f; // Max 2^5 steps => 2^32 proc/host! const int distance = (1 << step); gasneti_assert_uint(distance ,<, gasneti_myhost.node_count); gasneti_weakatomic32_increment(&gasneti_hbarr_rcvd[phase][step], GASNETI_ATOMIC_REL); } void gasneti_host_barrier(void) { // Simple dissemination barrier with two phase static int phase = 0; const gex_Rank_t rank = gasneti_myhost.node_rank; const gex_Rank_t size = gasneti_myhost.node_count; for (unsigned int step = 0, distance = 1; distance < size; ++step, distance *= 2) { gex_Rank_t peer = (distance <= rank) ? rank - distance : rank + (size - distance); gex_AM_Arg_t arg0 = phase | (step << 1); gex_AM_RequestShort(gasneti_THUNK_TM, gasneti_myhost.nodes[peer], gasneti_handleridx(gasnetc_hbarr_reqh), 0, arg0); // Poll until we have received the same phase we've just sent GASNET_BLOCKUNTIL((int)gasneti_weakatomic32_read(&gasneti_hbarr_rcvd[phase][step], 0)); gasneti_assert_int((int)gasneti_weakatomic32_read(&gasneti_hbarr_rcvd[phase][step], 0) ,==, 1); gasneti_weakatomic32_set(&gasneti_hbarr_rcvd[phase][step], 0, 0); } #if GASNET_PSHM // Cannot use AMPSHM and pshm bootstrap collectives in same pshmnet barrier phase gasneti_pshmnet_bootstrapBarrierPoll(); #endif phase ^= 1; } /* ------------------------------------------------------------------------------------ */ // Host-scoped (potentially superset of supernode) reduce-to-all(SUM, uint64_t) // // Note a lack explicit thread-safety provisions, under the assumption that the // only callers are serial initialization. The use of atomics in the handler // are sufficient to guard against concurrent hander execution by a conduit thread. // Following are both implicitly zero-initialized: static gasneti_weakatomic32_t gasneti_hsumu64_rcvd; static gasneti_weakatomic64_t gasneti_hsumu64_sum; extern void gasnetc_hsumu64_reqh(gex_Token_t token, gex_AM_Arg_t arg0, gex_AM_Arg_t arg1) { uint64_t operand = GASNETI_MAKEWORD(arg0, arg1); gasneti_weakatomic64_add(&gasneti_hsumu64_sum, operand, 0); gasneti_weakatomic32_increment(&gasneti_hsumu64_rcvd, GASNETI_ATOMIC_REL); } uint64_t gasneti_host_sumu64(uint64_t operand) { // Sum on the way up a binimial tree, and then broadcast down the same tree const gex_Rank_t rank = gasneti_myhost.node_rank; const gex_Rank_t size = gasneti_myhost.node_count; gasneti_assert_uint(size ,<, 0x80000000); // otherwise some of the math below goes wrong const gex_Rank_t remain = size - rank; const gex_Rank_t fullsize = (rank & (-rank)); const gex_Rank_t subsize = (!fullsize || (fullsize > remain)) ? remain : fullsize; const gex_Rank_t children = 1 + gasnete_coll_log2_rank(subsize - 1); const gex_Rank_t parent = rank - fullsize; gasneti_weakatomic32_t *rcvd_counter = &gasneti_hsumu64_rcvd; gasneti_weakatomic64_t *sum = &gasneti_hsumu64_sum; uint64_t result = operand; if (children) { // 1. wait for contributions from children GASNET_BLOCKUNTIL((gex_Rank_t)gasneti_weakatomic32_read(rcvd_counter,0) == children); result += gasneti_weakatomic64_read(sum,0); gasneti_weakatomic64_set(sum,0,0); } if (rank) { // 2. send partial result to parent gex_AM_RequestShort(gasneti_THUNK_TM, gasneti_myhost.nodes[parent], gasneti_handleridx(gasnetc_hsumu64_reqh), 0, GASNETI_HIWORD(result), GASNETI_LOWORD(result)); // 3. wait for final result from parent GASNET_BLOCKUNTIL((gex_Rank_t)gasneti_weakatomic32_read(rcvd_counter,0) == children + 1); result = gasneti_weakatomic64_read(sum,0); gasneti_weakatomic64_set(sum,0,0); } // 4. reset state for next time gasneti_weakatomic32_set(rcvd_counter,0,0); if (children) { // 5. forward result to children uint32_t arg0 = GASNETI_HIWORD(result); uint32_t arg1 = GASNETI_LOWORD(result); for (int idx = children - 1; idx >= 0; --idx) { // Reverse order for deepest subtree first gex_Rank_t peer = gasneti_myhost.nodes[rank + (1 << idx)]; gex_AM_RequestShort(gasneti_THUNK_TM, peer, gasneti_handleridx(gasnetc_hsumu64_reqh), 0, arg0, arg1); } } return result; } /* ------------------------------------------------------------------------------------ */ // Bootstrap collectives using AM Requests // These require Short and/or Medium Requests, plus GASNET_BLOCKUNTIL. // No use is currently made of Reply or Long. // // Currently Barrier and Exchange are provided. // TODO: more operations as needed // // Note that the only thread-safety provisions are those needed to allow for // concurrent handler execution, and only if GASNETI_CONDUIT_THREADS is // asserted. This is under the assumption that the only callers are serial // initialization code. // // BARRIER // static int gasneti_am_barrier_phase = 0; static uint32_t gasneti_am_barrier_rcvd[2] = {0, 0}; #if GASNETI_CONDUIT_THREADS // MUTEX static gasneti_mutex_t gasneti_am_barrier_lock = GASNETI_MUTEX_INITIALIZER; static void gasneti_am_barrier_arrival(int phase, uint32_t bit) { gasneti_mutex_lock(&gasneti_am_barrier_lock); gasneti_am_barrier_rcvd[phase] |= bit; gasneti_mutex_unlock(&gasneti_am_barrier_lock); } static uint32_t gasneti_am_barrier_read(int phase) { gasneti_mutex_lock(&gasneti_am_barrier_lock); uint32_t result = gasneti_am_barrier_rcvd[phase]; gasneti_mutex_unlock(&gasneti_am_barrier_lock); return result; } static void gasneti_am_barrier_reset(int phase) { gasneti_mutex_lock(&gasneti_am_barrier_lock); gasneti_am_barrier_rcvd[phase] = 0; gasneti_mutex_unlock(&gasneti_am_barrier_lock); } #else // SERIAL #define gasneti_am_barrier_arrival(phase,bit) \ ((void)(gasneti_am_barrier_rcvd[phase] |= (bit))) #define gasneti_am_barrier_read(phase) \ (gasneti_am_barrier_rcvd[phase]) #define gasneti_am_barrier_reset(phase) \ ((void)(gasneti_am_barrier_rcvd[phase] = 0)) #endif extern void gasnetc_am_barrier_reqh(gex_Token_t token, gex_AM_Arg_t arg) { uint32_t phase = arg & 1; uint32_t bit = arg ^ phase; gasneti_assert(GASNETI_POWEROFTWO(bit)); gasneti_am_barrier_arrival(phase,bit); } extern void gasneti_bootstrapBarrier_am(void) { const gex_Rank_t *peer; #if GASNET_PSHM gasneti_pshmnet_bootstrapBarrier(); gex_Rank_t size = gasneti_nodemap_local_rank ? 0 // not leader -> no network comms : gasneti_get_dissem_peers_pshm(&peer); #else gex_Rank_t size = gasneti_get_dissem_peers(&peer); #endif int phase = gasneti_am_barrier_phase; for (gex_Rank_t i = 0; i < size; ++i) { // empty for PSHM/non-leader const uint32_t bit = 2 << i; // (distance << 1), since phase is low bit (void) gex_AM_RequestShort1(gasneti_THUNK_TM, peer[i], gasneti_handleridx(gasnetc_am_barrier_reqh), 0, phase | bit); // wait for completion of the proper receive, which might arrive out of order GASNET_BLOCKUNTIL(gasneti_am_barrier_read(phase) & bit); } #if GASNET_PSHM gasneti_pshmnet_bootstrapBarrier(); #endif // reset for next barrier gasneti_am_barrier_reset(phase); gasneti_am_barrier_phase = !phase; } // // EXCHANGE // static int gasneti_am_exchange_phase = 0; static gex_Rank_t *gasneti_am_exchange_rcvd = NULL; static gex_Rank_t *gasneti_am_exchange_send = NULL; #if GASNET_PSHM static gex_Rank_t *gasneti_am_exchange_permute = NULL; #endif static uint8_t *gasneti_am_exchange_buf[2] = { NULL, NULL }; #if GASNETI_CONDUIT_THREADS static gasneti_atomic_t gasneti_am_exchange_cntr[2][32] = { { gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0) }, { gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0), gasneti_atomic_init(0) } }; #define gasneti_am_exchange_inc(_phase, _step) \ gasneti_atomic_increment(&gasneti_am_exchange_cntr[_phase][_step], GASNETI_ATOMIC_REL) #define gasneti_am_exchange_read(_phase, _step) \ gasneti_atomic_read(&gasneti_am_exchange_cntr[_phase][_step], GASNETI_ATOMIC_NONE) #define gasneti_am_exchange_reset(_phase, _step) \ gasneti_atomic_set(&gasneti_am_exchange_cntr[_phase][_step], 0, GASNETI_ATOMIC_ACQ) #else static gasneti_atomic_val_t gasneti_am_exchange_cntr[2][32] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; #define gasneti_am_exchange_inc(_phase, _step) \ ((void)(++gasneti_am_exchange_cntr[_phase][_step])) #define gasneti_am_exchange_read(_phase, _step) \ (gasneti_am_exchange_cntr[_phase][_step]) #define gasneti_am_exchange_reset(_phase, _step) \ ((void)(gasneti_am_exchange_cntr[_phase][_step] = 0)) #endif GASNETI_NEVER_INLINE(gasneti_am_exchange_init, static void gasneti_am_exchange_init(void)) { #if GASNETI_CONDUIT_THREADS static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); #endif static int is_init = 0; if (is_init) goto done; is_init = 1; #if GASNET_PSHM const gex_Rank_t size = gasneti_nodemap_global_count; const gex_Rank_t rank = gasneti_nodemap_global_rank; if (gasneti_nodemap_local_rank || size == 1) goto done; // No network comms #else const gex_Rank_t size = gasneti_nodes; const gex_Rank_t rank = gasneti_mynode; if (size == 1) goto done; // No network comms #endif // Fetch vector of the dissemination peers (only need length) const gex_Rank_t *peers; gex_Rank_t num_peers; #if GASNET_PSHM num_peers = gasneti_get_dissem_peers_pshm(&peers); #else num_peers = gasneti_get_dissem_peers(&peers); #endif // Without the following hint, some gcc versions warn about massive malloc sizes below gasneti_assume(num_peers <= 8*sizeof(gex_Rank_t)); // Compute the recv offset and send count for each step of exchange gasneti_am_exchange_rcvd = gasneti_malloc((num_peers+1) * sizeof(gex_Rank_t)); gasneti_am_exchange_send = gasneti_malloc(num_peers * sizeof(gex_Rank_t)); { gex_Rank_t i, step; #if GASNET_PSHM gex_Rank_t *width; gex_Rank_t sum1 = 0; gex_Rank_t sum2 = 0; gex_Rank_t distance, last; distance = 1 << (num_peers-1); last = (distance <= rank) ? (rank - distance) : (rank + (size - distance)); // Step 1: determine the "width" of each nbrhd width = gasneti_calloc(size, sizeof(gex_Rank_t)); for (i = 0; i < gasneti_nodes; ++i) { width[gasneti_nodeinfo[i].supernode] += 1; } // Step 2: form the necessary partial sums for (step = i = 0; step < num_peers; ++step) { distance = 1 << step; for (/*empty*/; i < distance; ++i) { sum1 += width[ (rank + i) % size ]; sum2 += width[ (last + i) % size ]; } gasneti_am_exchange_rcvd[step] = gasneti_am_exchange_send[step] = sum1; } gasneti_am_exchange_send[step-1] = gasneti_nodes - sum2; gasneti_am_exchange_rcvd[step] = gasneti_nodes; // Step 3: construct the permutation vector, if necessary { // Step 3a. determine if we even need a permutation vector int sorted = 1; gasneti_assert(0 == gasneti_nodeinfo[0].supernode); gex_Rank_t n = 0; for (i = 1; i < gasneti_nodes; ++i) { if (n > gasneti_nodeinfo[i].supernode) { sorted = 0; break; } n = gasneti_nodeinfo[i].supernode; } // Step 3b. contstruct the vector if needed if (!sorted) { gex_Rank_t *offset = gasneti_malloc(size * sizeof(gex_Rank_t)); // Form a sort of shifted prefix-reduction on width sum1 = 0; n = rank; for (i = 0; i < size; ++i) { offset[n] = sum1; sum1 += width[n]; n = (n == size-1) ? 0 : (n+1); } gasneti_assert(sum1 == gasneti_nodes); // Scan nodeinfo to collect all the nodes in each nbrhd (in their order) gasneti_am_exchange_permute = gasneti_malloc(gasneti_nodes * sizeof(gex_Rank_t)); for (i = 0; i < gasneti_nodes; ++i) { int index = offset[ gasneti_nodeinfo[i].supernode ]++; gasneti_am_exchange_permute[index] = i; } gasneti_free(offset); } } gasneti_free(width); #else for (step = 0; step < num_peers; ++step) { gasneti_am_exchange_rcvd[step] = gasneti_am_exchange_send[step] = 1 << step; } gasneti_am_exchange_send[step-1] = gasneti_nodes - gasneti_am_exchange_send[step-1]; gasneti_am_exchange_rcvd[step] = gasneti_nodes; #endif } done: #if GASNETI_CONDUIT_THREADS gasneti_mutex_unlock(&lock); #else return; // avoids warnings about label not followed by a statement #endif } static uint8_t *gasneti_am_exchange_addr(int phase, size_t elemsz) { #if GASNETI_CONDUIT_THREADS static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); #endif if (gasneti_am_exchange_buf[phase] == NULL) { gasneti_am_exchange_buf[phase] = gasneti_malloc(elemsz * gasneti_nodes); } #if GASNETI_CONDUIT_THREADS gasneti_mutex_unlock(&lock); #endif return gasneti_am_exchange_buf[phase]; } #ifndef GASNETI_AM_EXCHANGE_CHUNK #define GASNETI_AM_EXCHANGE_CHUNK \ gex_AM_MaxRequestMedium(gasneti_THUNK_TM,GEX_RANK_INVALID,GEX_EVENT_NOW,0,2) #endif extern void gasnetc_am_exchange_reqh(gex_Token_t token, void *buf, size_t nbytes, uint32_t arg0, uint32_t elemsz) { gasneti_am_exchange_init(); const int phase = arg0 & 1; const int step = (arg0 >> 1) & 0x0f; const int seq = (arg0 >> 5); const size_t offset = elemsz * gasneti_am_exchange_rcvd[step]; uint8_t *dest = gasneti_am_exchange_addr(phase, elemsz) + offset + (seq * GASNETI_AM_EXCHANGE_CHUNK); GASNETI_MEMCPY(dest, buf, nbytes); gasneti_am_exchange_inc(phase, step); } extern void gasneti_bootstrapExchange_am(void *src, size_t len, void *dest) { gasneti_am_exchange_init(); int phase = gasneti_am_exchange_phase; uint8_t *temp = gasneti_am_exchange_addr(phase, len); const gex_Rank_t *peer; #if GASNET_PSHM // Construct nbrhd-local contribution gasneti_pshmnet_bootstrapGather(gasneti_request_pshmnet, src, len, temp, 0); if (gasneti_nodemap_local_rank) goto end_network_comms; // nbrhd non-leader case gex_Rank_t size = gasneti_get_dissem_peers_pshm(&peer); #else // Copy in local contribution GASNETI_MEMCPY(temp, src, len); gex_Rank_t size = gasneti_get_dissem_peers(&peer); #endif // Bruck's concatenation algorithm: gasneti_assert_uint(size ,<=, 32); size_t chunk_size = GASNETI_AM_EXCHANGE_CHUNK; for (gex_Rank_t step = 0; step < size; ++step) { size_t nbytes = len * gasneti_am_exchange_send[step]; size_t offset = 0; uint32_t seq = 0; // Send payload using AMMedium(s) do { const size_t to_xfer = MIN(nbytes, chunk_size); (void) gex_AM_RequestMedium2(gasneti_THUNK_TM, peer[step], gasneti_handleridx(gasnetc_am_exchange_reqh), temp + offset, to_xfer, GEX_EVENT_NOW, 0, phase | (step << 1) | (seq << 5), len); ++seq; offset += to_xfer; nbytes -= to_xfer; gasneti_assert(seq < (1<<(32-5))); } while (nbytes); // poll until correct number of messages have been received nbytes = len * (gasneti_am_exchange_rcvd[step+1] - gasneti_am_exchange_rcvd[step]); seq = (nbytes + chunk_size - 1) / chunk_size; GASNET_BLOCKUNTIL(gasneti_am_exchange_read(phase, step) == seq); gasneti_am_exchange_reset(phase, step); // Includes the RMB, if any, for the data } // Copy to destination while performing the rotation or permutation #if GASNET_PSHM if (gasneti_am_exchange_permute) { for (gex_Rank_t n = 0; n < gasneti_nodes; ++n) { const gex_Rank_t peer = gasneti_am_exchange_permute[n]; GASNETI_MEMCPY((uint8_t*) dest + len * peer, temp + len * n, len); } } else #endif { GASNETI_MEMCPY_SAFE_EMPTY(dest, temp + len * (gasneti_nodes - gasneti_mynode), len * gasneti_mynode); GASNETI_MEMCPY((uint8_t*)dest + len * gasneti_mynode, temp, len * (gasneti_nodes - gasneti_mynode)); } #if GASNET_PSHM end_network_comms: gasneti_pshmnet_bootstrapBroadcast(gasneti_request_pshmnet, dest, len*gasneti_nodes, dest, 0); #endif // Prepare for next */ gasneti_free(temp); gasneti_am_exchange_buf[phase] = NULL; gasneti_sync_writes(); gasneti_am_exchange_phase = !phase; #if GASNET_DEBUG // verify own data as a sanity check */ if (memcmp(src, (void *) ((uintptr_t ) dest + (gasneti_mynode * len)), len) != 0) { gasneti_fatalerror("exchange failed: self data on node %d is incorrect", gasneti_mynode); } #endif } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/extended-ref/coll/gasnet_eager.c0000664000175000017500000005742515142313673021532 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_eager.c $ * Description: Reference implemetation of GASNet Collectives team * Copyright 2009, Rajesh Nishtala , Paul H. Hargrove , Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include #include #define FOLD_OUT_BARRIER 1 /*---------------------------------------------------------------------------------*/ /* gasnete_coll_broadcast_nb() */ // bcast TreeEager // Uses GASNETE_COLL_GENERIC_OPT_P2P // Naturally IN_MYSYNC, OUT_MYSYNC // Max size is the eager limit static int gasnete_coll_pf_bcast_TreeEager(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; gasnete_coll_local_tree_geom_t *geom = data->tree_geom; const gasnete_coll_broadcast_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, broadcast); gex_Rank_t * const children = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); const int child_count = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); int result = 0; int child; switch (data->state) { case 0: // Thread barrier if (!gasnete_coll_generic_all_threads(data)) { break; } // Allocation of p2p structure { size_t nstates = 1; size_t ncounters = (op->flags & GASNET_COLL_IN_ALLSYNC) ? 1 :0; // used for "upsync" size_t ndata = args->nbytes; data->p2p = gasnete_coll_p2p_get_final(op->team, op->sequence, nstates, ncounters, ndata); data->options |= GASNETE_COLL_GENERIC_OPT_P2P; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Optional IN barrier over the SAME tree */ if ((op->flags & GASNET_COLL_IN_ALLSYNC) && !gasnete_coll_generic_upsync_acq(op, args->srcrank, 0, child_count GASNETI_THREAD_PASS)) { break; } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Data movement */ if (op->team->myrank == args->srcrank) { for (child=0;childsrc, args->nbytes GASNETI_THREAD_PASS); } GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, args->src, args->nbytes); } else if (data->p2p->state[0]) { gasneti_sync_reads(); GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, data->p2p->data, args->nbytes); for (child=0;childdst, args->nbytes GASNETI_THREAD_PASS); } } else { break; /* Stalled until data arrives */ } data->state = 3; GASNETI_FALLTHROUGH case 3: // Optional out barrier if (!gasnete_coll_generic_outsync(op->team, data)) { break; } data->state = 4; GASNETI_FALLTHROUGH case 4: /*done*/ gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } GASNETE_COLL_DECLARE_BCAST_ALG(TreeEager) { int options = GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(flags & GASNET_COLL_OUT_ALLSYNC); gasneti_assert(nbytes <= gasnete_coll_p2p_eager_min); return gasnete_coll_generic_broadcast_nb(team, dst, srcimage, src, nbytes, flags, &gasnete_coll_pf_bcast_TreeEager, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, srcimage, team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_scatter_nb() */ /* scat Eager: root node performs carefully ordered eager puts */ /* Valid for SINGLE and LOCAL, size <= available eager buffer space */ /* Requires GASNETE_COLL_GENERIC_OPT_P2P on non-root nodes */ static int gasnete_coll_pf_scat_Eager(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_scatter_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, scatter); int result = 0; switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Data movement */ if (op->team->myrank == args->srcrank) { int i; uintptr_t src_addr; /* Send to nodes to the "right" of ourself */ src_addr = (uintptr_t)args->src + args->nbytes * ((op->team->myrank) + 1); for (i = op->team->myrank + 1; i < op->team->total_ranks; ++i, src_addr += args->nbytes) { gasnete_tm_p2p_eager_put(op, i, (void *)src_addr, args->nbytes, GEX_EVENT_NOW, 0, 0, 1 GASNETI_THREAD_PASS); } /* Send to nodes to the "left" of ourself */ src_addr = (uintptr_t)args->src; for (i = 0; i < op->team->myrank; ++i, src_addr += args->nbytes) { gasnete_tm_p2p_eager_put(op, i, (void *)src_addr, args->nbytes, GEX_EVENT_NOW, 0, 0, 1 GASNETI_THREAD_PASS); } GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, gasnete_coll_scale_ptr(args->src, op->team->myrank, args->nbytes), args->nbytes); } else if (data->p2p->state[0]) { gasneti_sync_reads(); GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, data->p2p->data, args->nbytes); } else { break; /* Stalled until data arrives */ } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } GASNETE_COLL_DECLARE_SCATTER_ALG(Eager) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF (flags & GASNET_COLL_IN_ALLSYNC) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(flags & GASNET_COLL_OUT_ALLSYNC) | GASNETE_COLL_GENERIC_OPT_P2P_IF(!gasnete_coll_image_is_local(team, srcimage)); return gasnete_coll_generic_scatter_nb(team, dst, srcimage, src, nbytes, dist, flags, &gasnete_coll_pf_scat_Eager, options, NULL, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } static int gasnete_coll_pf_scat_TreeEager(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; gasnete_coll_local_tree_geom_t *geom = data->tree_geom; const gasnete_coll_scatter_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, scatter); gex_Rank_t * const children = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); const int child_count = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); int result = 0; int child; switch (data->state) { case 0: /* Thread barrier */ if (!gasnete_coll_generic_all_threads(data)) { break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Optional IN barrier over the SAME tree */ if ((op->flags & GASNET_COLL_IN_ALLSYNC) && !gasnete_coll_generic_upsync_acq(op, args->srcrank, 0, child_count GASNETI_THREAD_PASS)) { break; } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Data movement */ if (op->team->myrank == args->srcrank) { uint8_t *src; if(op->team->myrank !=0) { gasnete_coll_local_rotate_left(data->p2p->data, args->src, args->nbytes, op->team->total_ranks, geom->rotation_points[0]); src = (uint8_t*) data->p2p->data; } else { src = (uint8_t*) args->src; } for (child=0;childchild_offset[child]+1),args->nbytes); gasnete_tm_p2p_eager_put_tree(op, children[child], send_arr, args->nbytes*geom->subtree_sizes[child] GASNETI_THREAD_PASS); } GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, src, args->nbytes); } else if (data->p2p->state[0]) { uint8_t *src; gasneti_sync_reads(); for (child=0;childp2p->data,(geom->child_offset[child]+1), args->nbytes); gasnete_tm_p2p_eager_put_tree(op, children[child], src, args->nbytes*geom->subtree_sizes[child] GASNETI_THREAD_PASS); } GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, data->p2p->data, args->nbytes); } else { break; /* Stalled until data arrives */ } data->state = 3; GASNETI_FALLTHROUGH case 3: /*optional out barrier over the same tree*/ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } data->state = 4; GASNETI_FALLTHROUGH case 4: /*done*/ gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } GASNETE_COLL_DECLARE_SCATTER_ALG(TreeEager) { int options = GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(flags & GASNET_COLL_OUT_ALLSYNC) | GASNETE_COLL_GENERIC_OPT_P2P; gasneti_assert(gasnete_coll_p2p_eager_scale>= nbytes); gasneti_assert(dist == nbytes); return gasnete_coll_generic_scatter_nb(team, dst, srcimage, src, nbytes, dist, flags, &gasnete_coll_pf_scat_TreeEager, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, srcimage, team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_gather_nb() */ /* gath Eager: all nodes perform uncoordinated eager puts */ /* Valid for SINGLE and LOCAL, size <= available eager buffer space */ /* Requires GASNETE_COLL_GENERIC_OPT_P2P on root node */ static int gasnete_coll_pf_gath_Eager(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_gather_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, gather); int result = 0; switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } /* Initiate data movement */ if (op->team->myrank != args->dstrank) { gasnete_tm_p2p_eager_put(op, args->dstrank, args->src, args->nbytes, GEX_EVENT_NOW, 0, op->team->myrank, 1 GASNETI_THREAD_PASS); } else { GASNETI_MEMCPY_SAFE_IDENTICAL(gasnete_coll_scale_ptr(args->dst, op->team->myrank, args->nbytes), args->src, args->nbytes); data->p2p->state[op->team->myrank] = 2; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Complete data movement */ if (op->team->myrank == args->dstrank) { gasnete_coll_p2p_t *p2p = data->p2p; volatile uint32_t *state; uintptr_t dst_addr, src_addr; size_t nbytes = args->nbytes; int i, done; gasneti_assert(p2p != NULL); gasneti_assert(p2p->state != NULL); state = data->p2p->state; gasneti_assert(p2p->data != NULL); done = 1; dst_addr = (uintptr_t)(args->dst); src_addr = (uintptr_t)(p2p->data); for (i = 0; i < op->team->total_ranks; ++i, dst_addr += nbytes, src_addr += nbytes) { uint32_t s = state[i]; if (s == 0) { /* Nothing received yet */ done = 0; } else if (s == 1) { /* Received but not yet copied into place */ gasneti_sync_reads(); GASNETE_FAST_UNALIGNED_MEMCPY((void *)dst_addr, (void *)src_addr, nbytes); state[i] = 2; } } if (!done) { break; } } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } GASNETE_COLL_DECLARE_GATHER_ALG(Eager) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF (flags & GASNET_COLL_IN_ALLSYNC) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(flags & GASNET_COLL_OUT_ALLSYNC)| GASNETE_COLL_GENERIC_OPT_P2P_IF(gasnete_coll_image_is_local(team, dstimage)); return gasnete_coll_generic_gather_nb(team, dstimage, dst, src, nbytes, dist, flags, &gasnete_coll_pf_gath_Eager, options, NULL, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } static int gasnete_coll_pf_gath_TreeEager(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_gather_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, gather); int result = 0; gasnete_coll_local_tree_geom_t *geom = data->tree_geom; gex_Rank_t * const children = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); const int child_count = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); gex_Rank_t parent = GASNETE_COLL_TREE_GEOM_PARENT(geom); switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } if (child_count > 0) { GASNETI_MEMCPY_SAFE_IDENTICAL(data->p2p->data, args->src, args->nbytes); } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Complete data movement */ if(child_count > 0) { if (gasneti_weakatomic_read(&data->p2p->counter[0], 0) != child_count) { break; } if(op->team->myrank != args->dstrank) { gasnete_tm_p2p_counting_eager_put(op, parent, data->p2p->data, args->nbytes*geom->mysubtree_size, args->nbytes, (geom->sibling_offset+1), 0 GASNETI_THREAD_PASS); } else { gasneti_assert(geom->num_rotations==1); gasnete_coll_local_rotate_right(args->dst,data->p2p->data, args->nbytes, op->team->total_ranks, geom->rotation_points[0]); } } else if(op->team->myrank !=args->dstrank){ gasnete_tm_p2p_counting_eager_put(op, parent, args->src, args->nbytes, args->nbytes, (geom->sibling_offset+1), 0 GASNETI_THREAD_PASS); } else { GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, args->src, args->nbytes); } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Optional OUT barrier */ #if FOLD_OUT_BARRIER if(op->flags & GASNET_COLL_OUT_ALLSYNC) { int i; if(args->dstrank != op->team->myrank) { /*wait for parent to signal*/ if(gasneti_weakatomic_read(&(data->p2p->counter[1]), 0) == 0) { break; } } /*parent has signaled*/ /*signal all children*/ for(i=0; iteam, data)) { break; } #endif gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } GASNETE_COLL_DECLARE_GATHER_ALG(TreeEager) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF (flags & GASNET_COLL_IN_ALLSYNC) | #if !FOLD_OUT_BARRIER GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(flags & GASNET_COLL_OUT_ALLSYNC)| #endif GASNETE_COLL_GENERIC_OPT_P2P; return gasnete_coll_generic_gather_nb(team, dstimage, dst, src, nbytes, dist, flags, &gasnete_coll_pf_gath_TreeEager, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, dstimage, team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_gather_all_nb() */ static int gasnete_coll_pf_gall_FlatEagerPut(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_gather_all_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, gather_all); int result = 0; /* State 0: In barrier (if needed)*/ if(data->state == 0) { if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { return 0; } data->state++; } if(data->state == 1) { gex_Rank_t dst; if_pt(op->team->total_ranks > 1) { { for(dst=op->team->myrank+1; dstteam->total_ranks; dst++) { /* send to threads above me*/ gasnete_tm_p2p_counting_eager_put(op, dst, args->src, args->nbytes, args->nbytes, op->team->myrank, 0 GASNETI_THREAD_PASS); } for(dst=0; dstteam->myrank; dst++) { /*send to threads below me*/ gasnete_tm_p2p_counting_eager_put(op, dst, args->src, args->nbytes, args->nbytes, op->team->myrank, 0 GASNETI_THREAD_PASS); } } } GASNETI_MEMCPY_SAFE_IDENTICAL((int8_t*) data->p2p->data + op->team->myrank*args->nbytes, args->src, args->nbytes); data->state++; } if(data->state == 2) { /* sync all the handles for the puts*/ if (op->team->total_ranks > 1 && (gasneti_weakatomic_read(&data->p2p->counter[0], 0) != (op->team->total_ranks-1))) { return 0; } GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, data->p2p->data, args->nbytes*op->team->total_ranks); data->state++; } if(data->state == 3) { /* out barrier and cleanup*/ if (!gasnete_coll_generic_outsync(op->team, data)) { return 0; } gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } GASNETE_COLL_DECLARE_GATHER_ALL_ALG(FlatEagerPut) { /*Since the algorithm is naturally in_no / out_no use in-barrier if anything besides IN NOSYNC. Use out barrier only if out_ALLSYNC since algorithm does not need a full barrier for OUT_MYSYNC*/ int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF (!(flags & GASNET_COLL_IN_NOSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNET_COLL_OUT_NOSYNC)) | GASNETE_COLL_GENERIC_OPT_P2P; gasneti_assert(nbytes <= gasnete_coll_p2p_eager_scale); return gasnete_coll_generic_gather_all_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_gall_FlatEagerPut, options, NULL, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } static int gasnete_coll_pf_gall_EagerDissem(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; gasnete_coll_dissem_info_t *dissem = data->dissem_info; const gasnete_coll_gather_all_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, gather_all); int result = 0; /* State 0: In barrier (if needed)*/ if(data->state == 0) { gasneti_assert(dissem->dissemination_radix==2); /* this function only works for radix 2*/ data->state++; } if(data->state == 1) { if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { return 0; } if(op->team->total_ranks == 1) { GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, args->src, args->nbytes); data->state = dissem->dissemination_phases*2+2; } else { /*memcpy the data into the start of the scratch space*/ GASNETE_FAST_UNALIGNED_MEMCPY((int8_t*)data->p2p->data, args->src, args->nbytes); data->state++; } } if(data->state >= 2 && data->state <= (dissem->dissemination_phases-1)*2+1) { uint32_t phase = (data->state-2)/2; size_t curr_len = args->nbytes*(1<state % 2 == 0) { /* send in this phase */ gasnete_tm_p2p_counting_eager_put(op, dstrank, data->p2p->data, curr_len, 1, curr_len, phase GASNETI_THREAD_PASS); data->state++; } if(data->state % 2 == 1){ if(gasneti_weakatomic_read(&data->p2p->counter[phase], 0) == 1) { data->state++; } else { return 0; } } } if(data->state == (dissem->dissemination_phases)*2) { uint32_t phase = (data->state-2)/2; size_t nblk = op->team->total_ranks - (1<nbytes*(nblk); gex_Rank_t dstrank = (GASNETE_COLL_DISSEM_GET_BEHIND_PEERS_PHASE(dissem, phase))[0]; gasnete_tm_p2p_counting_eager_put(op, dstrank, data->p2p->data, curr_len, args->nbytes, (1<state++; } if(data->state == (dissem->dissemination_phases)*2+1) { uint32_t phase = (data->state-2)/2; if(gasneti_weakatomic_read(&data->p2p->counter[phase], 0) !=1) return 0; /*wait for the last transfer to finish*/ /*rotate the data right to fix up the indices*/ gasnete_coll_local_rotate_right(args->dst, data->p2p->data, args->nbytes, op->team->total_ranks, op->team->myrank); data->state++; } if(data->state == (dissem->dissemination_phases)*2+2) { if (!gasnete_coll_generic_outsync(op->team, data)) { return 0; } gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } GASNETE_COLL_DECLARE_GATHER_ALL_ALG(EagerDissem) { /*Since the algorithm is naturally in_no / out_no use in-barrier if anything besides IN NOSYNC. Use out barrier only if out_ALLSYNC since algorithm does not need a full barrier for OUT_MYSYNC*/ int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF ((flags & GASNET_COLL_IN_ALLSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF((flags & GASNET_COLL_OUT_ALLSYNC)) | GASNETE_COLL_GENERIC_OPT_P2P; gasneti_assert(nbytes <= gasnete_coll_p2p_eager_scale); return gasnete_coll_generic_gather_all_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_gall_EagerDissem, options, NULL, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_exchange_nb() */ /*---------------------------------------------------------------------------------*/ gasnet-2025.8.0/extended-ref/coll/gasnet_refcoll.c0000664000175000017500000032612715142313673022073 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_refcoll.c $ * Description: Reference implemetation of GASNet Collectives team * Copyright 2009, Rajesh Nishtala , Paul H. Hargrove , Dan Bonachea * Terms of use are as specified in license.txt */ #define GASNET_COLL_TREE_DEBUG 0 #include #include #include #include #include #include /*TEMPORARY (Need to eventually change it such that the files are compiled under their own .o files)*/ #include /* gasnet_coll_autotune.c and gasnet_coll_scratch.c have to be included after gasnet_coll_trees.c */ #include #include size_t gasnete_coll_p2p_eager_min = 0; size_t gasnete_coll_p2p_eager_scale = 0; /*set a std segment size of 1024 bytes*/ /*---------------------------------------------------------------------------------*/ /*declarations for gasnet team all*/ gasnet_team_handle_t gasnete_coll_team_all; /*---------------------------------------------------------------------------------*/ static gasneti_mutex_t gasnete_coll_active_lock = GASNETI_MUTEX_INITIALIZER; static gasnete_coll_op_t *gasnete_coll_active_first(void); static gasnete_coll_op_t *gasnete_coll_active_next(gasnete_coll_op_t *op); static void gasnete_coll_active_new(gasnete_coll_op_t *op); static void gasnete_coll_active_ins(gasnete_coll_op_t *op); static void gasnete_coll_active_del(gasnete_coll_op_t *op); /*---------------------------------------------------------------------------------*/ void gasnete_coll_validate(gasnet_team_handle_t team, gex_Rank_t dstrank, const void *dst, size_t dstlen, gex_Rank_t srcrank, const void *src, size_t srclen, int flags GASNETI_THREAD_FARG) { if (dstrank == GEX_RANK_INVALID) { dstrank = team->myrank; } if (srcrank == GEX_RANK_INVALID) { srcrank = team->myrank; } /* Some flags should never come the user */ gasneti_assert(!(flags & GASNETE_COLL_SUBORDINATE)); #if GASNET_DEBUG /* Validate IN sync mode */ switch (GASNETE_COLL_IN_MODE(flags)) { case 0: gasneti_fatalerror("No GASNET_COLL_IN_*SYNC flag given"); break; case GASNET_COLL_IN_NOSYNC: case GASNET_COLL_IN_MYSYNC: case GASNET_COLL_IN_ALLSYNC: break; /* OK */ default: gasneti_fatalerror("Multiple GASNET_COLL_IN_*SYNC flags given"); break; } /* Validate OUT sync mode */ switch (GASNETE_COLL_OUT_MODE(flags)) { case 0: gasneti_fatalerror("No GASNET_COLL_OUT_*SYNC flag given"); break; case GASNET_COLL_OUT_NOSYNC: case GASNET_COLL_OUT_MYSYNC: case GASNET_COLL_OUT_ALLSYNC: break; /* OK */ default: gasneti_fatalerror("Multiple GASNET_COLL_OUT_*SYNC flags given"); break; } #endif // Only COLL_LOCAL supported gasneti_assert(flags & GASNET_COLL_LOCAL); /* Bounds check any local portion of dst which user claims is in-segment */ gasneti_assert(dstlen > 0); if ((dstrank == team->myrank) && (flags & GASNET_COLL_DST_IN_SEGMENT)) { gasneti_boundscheck(team->e_tm, dstrank, dst, dstlen); } /* Bounds check any local portion of src which user claims is in-segment */ gasneti_assert(srclen > 0); if ((srcrank == team->myrank) && (flags & GASNET_COLL_SRC_IN_SEGMENT)) { gasneti_boundscheck(team->e_tm, srcrank, src, srclen); } /* XXX: TO DO * + check that team handle is valid (requires a teams interface) * + check that mynode is a member of the team (requires a teams interface) */ } /*---------------------------------------------------------------------------------*/ /* Handles */ #ifndef GASNETE_COLL_HANDLE_OVERRIDE #if GASNET_PAR #define GASNETE_COLL_REAL_EOP(e) ((e)->eop) #define GASNETE_COLL_EOP_TO_EVENT(e) ((e) ? gasneti_eop_to_event((e)->eop) : GEX_EVENT_INVALID) #else #define GASNETE_COLL_REAL_EOP(e) (e) #define GASNETE_COLL_EOP_TO_EVENT(e) gasneti_eop_to_event(e) #endif extern gasnete_coll_eop_t gasnete_coll_eop_create(GASNETI_THREAD_FARG_ALONE) { gasnete_coll_threaddata_t *td = GASNETE_COLL_MYTHREAD; gasnete_coll_eop_t result; #if GASNET_PAR result = td->eop_freelist; if_pt (result) { td->eop_freelist = result->next; } else { /* XXX: allocate in large chunks and scatter across cache lines (and update gasnete_coll_cleanup_threaddata) */ result = (gasnete_coll_eop_t)gasneti_malloc(sizeof(*result)); GASNETI_STAT_EVENT_VAL(W, COLL_EOP_ALLOC, sizeof(*result)); } result->next = NULL; #endif GASNETE_COLL_REAL_EOP(result) = gasneti_eop_create(GASNETI_THREAD_PASS_ALONE); return result; } extern void gasnete_coll_eop_signal(gasnete_coll_eop_t eop GASNETI_THREAD_FARG) { gasneti_assert(eop != NULL); gasneti_mutex_assertlocked(&gasnete_coll_active_lock); #if GASNET_PAR gasneti_sync_writes(); for (gasnete_coll_eop_t curr = eop; ; curr = curr->next) { gasneti_eop_markdone(GASNETE_COLL_REAL_EOP(curr)); if (! curr->next) { gasnete_coll_threaddata_t *td = GASNETE_COLL_MYTHREAD_NOALLOC; curr->next = td->eop_freelist; td->eop_freelist = eop; break; } } #else gasneti_eop_markdone(eop); #endif } #endif /*---------------------------------------------------------------------------------*/ /* Code for list of events to test in progress */ gasneti_mutex_t gasnete_coll_poll_lock = GASNETI_MUTEX_INITIALIZER; static struct { gex_Event_t **addrs; gex_Event_t *events; size_t allocated, used; } gasnete_coll_event_list = {NULL, NULL, 0, 0}; void gasnete_coll_save_event(gex_Event_t *event_p) { gasneti_mutex_assertlocked(&gasnete_coll_poll_lock); if (*event_p != GEX_EVENT_INVALID) { int allocated = gasnete_coll_event_list.allocated; int used = gasnete_coll_event_list.used; if_pf (allocated == used) { gasnete_coll_event_list.allocated = (allocated += 8); gasnete_coll_event_list.addrs = gasneti_realloc(gasnete_coll_event_list.addrs, allocated * sizeof(gex_Event_t*)); gasnete_coll_event_list.events = gasneti_realloc(gasnete_coll_event_list.events, allocated * sizeof(gex_Event_t)); } gasnete_coll_event_list.used += 1; gasnete_coll_event_list.addrs[used] = event_p; gasnete_coll_event_list.events[used] = *event_p; } } /* Assumes caller calls AMPoll */ void gasnete_coll_sync_saved_events(GASNETI_THREAD_FARG_ALONE) { int used = gasnete_coll_event_list.used; gasneti_mutex_assertlocked(&gasnete_coll_poll_lock); if (used) { gex_Event_t *events = gasnete_coll_event_list.events; if (! gasnete_test_some(events, used GASNETI_THREAD_PASS)) { gasneti_sync_writes(); // TODO-EX: is this really needed given the use of mutexes gex_Event_t **addrs = gasnete_coll_event_list.addrs; for (int i = 0; i < used; ) { if (events[i] == GEX_EVENT_INVALID) { *(addrs[i]) = GEX_EVENT_INVALID; used -= 1; addrs[i] = addrs[used]; events[i] = events[used]; } else { ++i; } } gasneti_assert(gasnete_coll_event_list.used != used); gasnete_coll_event_list.used = used; } } } /*---------------------------------------------------------------------------------*/ /* Synchronization for threads in PAR builds */ /* Current state: * In a SEQ or PARSYNC build this code compiles away. * In a PAR build we are in the process of removal! * * TODO-EX: * The following are currently no-ops, but will need multi-EP equivalents. * So, we retain a mutex in (only) DEBUG buils to avoid bit-rot in callers. */ #if GASNET_PAR && GASNET_DEBUG void gasnete_coll_threads_lock(gasnete_coll_team_t team, int flags GASNETI_THREAD_FARG) { gasneti_mutex_lock(&team->threads_mutex); } void gasnete_coll_threads_unlock(gasnete_coll_team_t team GASNETI_THREAD_FARG) { gasneti_mutex_unlock(&team->threads_mutex); } #endif /*---------------------------------------------------------------------------------*/ /* The list of active collective ops (coll ops) */ /* There exists a "active list". * Ops in the active table will be polled to make progress. * * Operations of the active list * void gasnete_coll_active_init() * void gasnete_coll_active_fini() * gasnete_coll_op_t *gasnete_coll_active_first() * Return the first coll op in the active list. * gasnete_coll_op_t *gasnete_coll_active_last() * Return the last coll op in the active list. * gasnete_coll_op_t *gasnete_coll_active_next(op) * Iterate over the coll ops in the active list. * void gasnete_coll_active_new(op) * Init active list fields of a coll op. * void gasnete_coll_active_ins(op) * Add a coll op to the active list. * void gasnete_coll_active_del(op) * Delete a coll op from the active list. * */ #ifndef GASNETE_COLL_LIST_OVERRIDE /* Default implementation of coll_ops active list: * * Iteration over the active list is based on a linked list (queue). * Iteration starts from the head and new ops are added at the tail. * * Callers to ins and del must always hold the active lock. * Traversal and ins may run concurrently. * See comment in gasneti_coll_progressfn() for more info. * * XXX: use list macros? */ static gasnete_coll_op_t *gasnete_coll_active_head; static gasnete_coll_op_t **gasnete_coll_active_tail_p; static gasnete_coll_op_t *gasnete_coll_active_first(void) { return gasnete_coll_active_head; } static gasnete_coll_op_t *gasnete_coll_active_last(void) { return gasneti_container_of(gasnete_coll_active_tail_p, gasnete_coll_op_t, active_next); } static gasnete_coll_op_t *gasnete_coll_active_next(gasnete_coll_op_t *op) { return op->active_next; } /* No lock needed */ static void gasnete_coll_active_new(gasnete_coll_op_t *op) { op->active_next = NULL; op->active_prev_p = &(op->active_next); } static void gasnete_coll_active_ins(gasnete_coll_op_t *op) { gasneti_mutex_assertlocked(&gasnete_coll_active_lock); if (! gasnete_coll_active_head) GASNETI_PROGRESSFNS_ENABLE(gasneti_pf_coll,BOOLEAN); gasneti_assert(op->active_next == NULL); *(gasnete_coll_active_tail_p) = op; op->active_prev_p = gasnete_coll_active_tail_p; gasnete_coll_active_tail_p = &(op->active_next); } static void gasnete_coll_active_del(gasnete_coll_op_t *op) { gasneti_mutex_assertlocked(&gasnete_coll_active_lock); gasnete_coll_op_t *next = op->active_next; *(op->active_prev_p) = next; if (next) { next->active_prev_p = op->active_prev_p; } else { gasnete_coll_active_tail_p = op->active_prev_p; } if (! gasnete_coll_active_head) GASNETI_PROGRESSFNS_DISABLE(gasneti_pf_coll,BOOLEAN); } void gasnete_coll_active_init(void) { gasnete_coll_active_head = NULL; gasnete_coll_active_tail_p = &(gasnete_coll_active_head); } void gasnete_coll_active_fini(void) { gasneti_assert(gasnete_coll_active_head == NULL); } #endif /*---------------------------------------------------------------------------------*/ static int gasnete_coll_cleanup_freelist(void **head) { void **next; int count = 0; while ((next = (void **)*head) != NULL) { *head = *next; gasneti_free(next); count++; } return count; } static void gasnete_coll_cleanup_threaddata(void *_td) { int count; gasnete_coll_threaddata_t *td = (gasnete_coll_threaddata_t *)_td; /* these free lists are all linked by initial pointer */ count = gasnete_coll_cleanup_freelist((void **)&(td->op_freelist)); GASNETI_STAT_EVENT_VAL(W, COLL_OP_FREE, count * sizeof(gasnete_coll_op_t)); count = gasnete_coll_cleanup_freelist((void **)&(td->generic_data_freelist)); GASNETI_STAT_EVENT_VAL(W, COLL_GDATA_FREE, count * sizeof(gasnete_coll_generic_data_t)); #ifndef GASNETE_COLL_HANDLE_OVERRIDE #if GASNET_PAR count = 0; while (td->eop_freelist) { gasnete_coll_eop_t next = td->eop_freelist->next; gasneti_free((void *)td->eop_freelist); td->eop_freelist = next; count++; } GASNETI_STAT_EVENT_VAL(W, COLL_EOP_FREE, count * sizeof(gasnete_coll_eop_t)); #endif #endif #ifdef GASNETE_COLL_THREADDATA_EXTRA_CLEANUP GASNETE_COLL_THREADDATA_EXTRA_CLEANUP(td); #endif gasneti_free(td); } GASNETI_NEVER_INLINE(gasnete_coll_new_threaddata, extern gasnete_coll_threaddata_t *gasnete_coll_new_threaddata(void)) { gasnete_coll_threaddata_t *result = gasneti_calloc(1,sizeof(*result)); gasnete_register_threadcleanup(gasnete_coll_cleanup_threaddata, result); return result; } /*---------------------------------------------------------------------------------*/ /* Active list management */ GASNETI_INLINE(gasnete_coll_op_submit) void gasnete_coll_op_submit(gasnete_coll_op_t *op, gasnete_coll_eop_t eop GASNETI_THREAD_FARG) { op->eop = eop; gasneti_mutex_lock(&gasnete_coll_active_lock); gasnete_coll_active_ins(op); gasneti_mutex_unlock(&gasnete_coll_active_lock); } GASNETI_INLINE(gasnete_coll_op_complete) void gasnete_coll_op_complete(gasnete_coll_op_t *op, int poll_result GASNETI_THREAD_FARG) { gasneti_mutex_assertlocked(&gasnete_coll_active_lock); if (poll_result & GASNETE_COLL_OP_COMPLETE) { if_pt (op->eop != NULL) { /* Normal case, just signal the eop */ gasnete_coll_eop_signal(op->eop GASNETI_THREAD_PASS); op->eop = NULL; } } if (poll_result & GASNETE_COLL_OP_INACTIVE) { /* delete from the active list and destoy */ gasnete_coll_active_del(op); gasnete_coll_op_destroy(op GASNETI_THREAD_PASS); } } /*---------------------------------------------------------------------------------*/ gasnete_coll_op_t * gasnete_coll_op_create(gasnete_coll_team_t team, uint32_t sequence, int flags GASNETI_THREAD_FARG) { gasnete_coll_threaddata_t *td = GASNETE_COLL_MYTHREAD; gasnete_coll_op_t *op; op = td->op_freelist; if_pt (op != NULL) { td->op_freelist = *((gasnete_coll_op_t **)op); } else { /* XXX: allocate in chunks and scatter across cache lines */ /* XXX: destroy freelist at exit */ op = (gasnete_coll_op_t *)gasneti_malloc(sizeof(gasnete_coll_op_t)); GASNETI_STAT_EVENT_VAL(W, COLL_OP_ALLOC, sizeof(gasnete_coll_op_t)); } gasnete_coll_active_new(op); op->team = team; op->e_tm = team->e_tm; op->sequence = sequence; op->flags = flags; op->eop = NULL; op->poll_fn = (gasnete_coll_poll_fn)NULL; op->scratchpos = NULL; /* The 'data' field is setup elsewhere */ return op; } void gasnete_coll_op_destroy(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_threaddata_t *td = GASNETE_COLL_MYTHREAD_NOALLOC; *((gasnete_coll_op_t **)op) = td->op_freelist; td->op_freelist = op; } #ifndef gasneti_coll_progressfn extern void gasneti_coll_progressfn(void) { GASNET_BEGIN_FUNCTION(); /* TODO: remove this lookup */ gasnete_coll_threaddata_t *td = GASNETE_COLL_MYTHREAD; if (td->in_poll) return; /* prevent recursion */ td->in_poll = 1; if (gasneti_mutex_trylock(&gasnete_coll_poll_lock) == 0) { /* First try to make progress on any pending events */ gasnete_coll_sync_saved_events(GASNETI_THREAD_PASS_ALONE); /* NOTE regarding thread safety of active list: * We traverse the active list here, possibly deleting elements. * However, this basic block is the *only* place that deletions can * occur AND execution of this block is serialized by 'poll_lock'. * Meanwhile, the only other modification that can be made is the * insertion (at the list tail) of new entries. Therefore, we can * safely call gasnete_coll_active_next() without the lock held. * However, we must hold it for deletions. */ gasneti_mutex_lock(&gasnete_coll_active_lock); gasnete_coll_op_t *next = gasnete_coll_active_first(); gasnete_coll_op_t *last = gasnete_coll_active_last(); gasneti_mutex_unlock(&gasnete_coll_active_lock); gasnete_coll_op_t *op; if (next) { do { gasneti_assert(next); op = next; next = gasnete_coll_active_next(op); // Poll/kick the op gasneti_assert(op->poll_fn); int poll_result = (*op->poll_fn)(op GASNETI_THREAD_PASS); if (poll_result != 0) { // signal and/or destroy the op gasneti_mutex_lock(&gasnete_coll_active_lock); gasnete_coll_op_complete(op, poll_result GASNETI_THREAD_PASS); gasneti_mutex_unlock(&gasnete_coll_active_lock); } } while (op != last); // Stop at original end, not at NULL, due to lack of fences } gasneti_mutex_unlock(&gasnete_coll_poll_lock); } td->in_poll = 0; } #endif size_t gasnete_coll_auxseg_size = 0; size_t gasnete_coll_auxseg_offset = 0; /* AuxSeg setup for distributed scratch space*/ gasneti_auxseg_request_t gasnete_coll_auxseg_alloc(gasnet_seginfo_t *auxseg_info) { gasneti_auxseg_request_t retval; uintptr_t envval = gasneti_getenv_int_withdefault("GASNET_COLL_SCRATCH_SIZE", GASNETE_COLL_SCRATCH_SIZE_DEFAULT,1); // Silently raise to implementation-defined minimum retval.minsz = retval.optimalsz = MAX(envval, GASNETE_COLL_SCRATCH_SIZE_MIN); if (auxseg_info == NULL){ return retval; /* initial query */ } else { /* auxseg granted */ gasneti_assert(!gasnete_coll_auxseg_size); gasnete_coll_auxseg_size = auxseg_info[0].size; gasnete_coll_auxseg_offset = (uintptr_t)auxseg_info[0].addr - (uintptr_t)gasneti_seginfo_aux[0].addr; } return retval; } // Diagnostic for non-trivial use of collectives in a NO_SCRATCH team static int no_scratch_warn_threshold = 0; extern void gasnete_count_no_scratch(gasnet_team_handle_t team) { if (! no_scratch_warn_threshold) return; // disabled int count = (team->no_scratch_count += 1); if (count == no_scratch_warn_threshold) { gasneti_console_message("WARNING", "TM%x has reached the threshold of %d non-trivial collectives on teams " "created with GEX_FLAG_TM_NO_SCRATCH. This flag is intended for use with " "teams which do not perform any significant collectives, and its use in this" "instance is most likely degrading performance. One should consider " "allocating scratch space for this team. Alternatively, one may set the " "environment variable GASNET_NO_SCRATCH_WARN_THRESHOLD to a higher threshold," "or to zero to disable this warning entirely.", team->team_id, count); } } // Initialize legacy coll_team subsystem for use by gex_TM/gex_Coll // TODO-EX: remove any portions displaced by gex-ification extern void gasnete_coll_init_subsystem(void) { GASNET_BEGIN_FUNCTION(); gasnete_coll_p2p_eager_min = gasneti_getenv_int_withdefault("GASNET_COLL_P2P_EAGER_MIN", GASNETE_COLL_P2P_EAGER_MIN_DEFAULT, 0); gasnete_coll_p2p_eager_scale = gasneti_getenv_int_withdefault("GASNET_COLL_P2P_EAGER_SCALE", GASNETE_COLL_P2P_EAGER_SCALE_DEFAULT, 0); gasnete_coll_active_init(); #ifdef gasnete_coll_init_conduit /* initialization of conduit specific collectives */ gasnete_coll_init_conduit(); #endif /* setup information for TM0 */ gasnete_coll_team_init(GASNET_TEAM_ALL, 0, NULL, 0 GASNETI_THREAD_PASS); gasneti_import_tm(gasneti_THUNK_TM)->_coll_team = GASNET_TEAM_ALL; GASNET_TEAM_ALL->e_tm = gasneti_THUNK_TM; // TODO-EX: Move other per-OPs default tree types out of autotune infrastructure? const char *default_tree_type = gasneti_getenv_withdefault("GASNET_COLL_ROOTED_GEOM", GASNETE_COLL_DEFAULT_TREE_TYPE_STR); const char *reduce_tree_type = gasneti_getenv_withdefault("GASNET_COLL_REDUCE_GEOM", default_tree_type); gasnetc_tm_reduce_tree_type = gasnete_coll_make_tree_type_str(reduce_tree_type); gasnete_coll_threaddata_t *td = GASNETE_COLL_MYTHREAD; // Force allocation no_scratch_warn_threshold = gasneti_getenv_int_withdefault("GASNET_NO_SCRATCH_WARN_THRESHOLD", 8, 0); } /*---------------------------------------------------------------------------------*/ /* Synchronization primitives */ #ifndef GASNETE_COLL_CONSENSUS_OVERRIDE /* team->consensus_issued_id counts barrier sequence numbers as they are allocated * to collective operations. They are always even (see below). */ /* team->consensus_id holds the current barrier state and sequence. * The upper 31 bits are the sequence, and the least significant bit * is the notify-vs-wait phase of the current barrier. This imposes a * limit of around 1 billion simultaneous outstanding barriers before * counter overflow could introduce ambiguity. Otherwise, careful use * of unsigned arithmetic eliminates problems due to wrap. * The least significant bit of team->consensus_id is 0 if the next * operation is to be a notify, or a 1 if the next is a try. * Any caller may issue a try (when the phase indicates a try) and must * advance gasnete_coll_issued_id by 1 if the try returns success. * Only the matching caller may issue a notify and must unconditionally * advance gasnete_coll_issued_id by 1. * In a debug build the gasnete_coll_issued_id is also used as the barrier * name to help detect bugs, but anonymous barriers are used in non-debug * builds for speed. */ // Means for partial replacement by conduits: #if defined(GASNETE_COLL_CONSENSUS_TRY) && \ defined(GASNETE_COLL_CONSENSUS_NOTIFY) // Use conduit-provided versions #ifdef GASNETE_COLL_CONSENSUS_DEFNS // Expand any conduit-provided deferred definitions // This hook is provided because the 'team' argument to the macros // GASNETE_COLL_CONSENSUS_{NOTIFY,TRY}() has a private type. GASNETE_COLL_CONSENSUS_DEFNS #endif #elif defined(GASNETE_COLL_CONSENSUS_TRY) || \ defined(GASNETE_COLL_CONSENSUS_NOTIFY) #error Conduit must define both or neither of GASNETE_COLL_CONSENSUS_{NOTIFY,TRY} #else // Use defaults, below #define GASNETE_COLL_CONSENSUS_NOTIFY(team) \ GASNETE_COLL_CONSENSUS_DEFAULT_NOTIFY(team) #define GASNETE_COLL_CONSENSUS_TRY(team) \ GASNETE_COLL_CONSENSUS_DEFAULT_TRY(team) #endif // Default versions (also available for use by conduit-provided ones) #if GASNET_DEBUG // Use full name-matching facility for error checking #define GASNETE_COLL_CONSENSUS_DEFAULT_NOTIFY(team) \ gasnet_coll_barrier_notify(team, team->consensus_id, 0) #define GASNETE_COLL_CONSENSUS_DEFAULT_TRY(team) \ gasnet_coll_barrier_try(team, team->consensus_id, 0) #else // Use "unnamed" barrier for performance #define GASNETE_COLL_CONSENSUS_DEFAULT_NOTIFY(team) \ gasnet_coll_barrier_notify(team, 0, GASNET_BARRIERFLAG_UNNAMED) #define GASNETE_COLL_CONSENSUS_DEFAULT_TRY(team) \ gasnet_coll_barrier_try(team, 0, GASNET_BARRIERFLAG_UNNAMED) #endif extern gasnete_coll_consensus_t gasnete_coll_consensus_create(gasnete_coll_team_t team) { gasnete_coll_consensus_t result = team->consensus_issued_id; team->consensus_issued_id = result + 2; GASNETE_COLL_SEQ32_SAFE(result, team->consensus_id); return result; } void gasnete_coll_consensus_free(gasnete_coll_team_t team, gasnete_coll_consensus_t consensus) { // Nothing to do } GASNETI_INLINE(gasnete_coll_consensus_do_try) int gasnete_coll_consensus_do_try(gasnete_coll_team_t team) { int rc = GASNETE_COLL_CONSENSUS_TRY(team); if_pt (rc == GASNET_OK) { /* A barrier is complete, advance */ ++team->consensus_id; return 1; } #if GASNET_DEBUG else if (rc == GASNET_ERR_BARRIER_MISMATCH) { gasneti_fatalerror("Named barrier mismatch detected in collectives"); } else { gasneti_assert(rc == GASNET_ERR_NOT_READY); } #endif return 0; } GASNETI_INLINE(gasnete_coll_consensus_do_notify) void gasnete_coll_consensus_do_notify(gasnete_coll_team_t team) { ++team->consensus_id; GASNETE_COLL_CONSENSUS_NOTIFY(team); } extern int gasnete_coll_consensus_try(gasnete_coll_team_t team, gasnete_coll_consensus_t id) { #if GASNET_DEBUG // With respect to any given team, this function is neither thread-safe nor recursion-safe gasneti_assert_always_int(gasneti_mutex_trylock(&team->barrier_lock) ,==, GASNET_OK); #endif gasneti_assert(! (id & 1)); // always even /* We can only notify when our own turn comes up. * Thus, the most progress we could make in one call * would be to sucessfully 'try' for our predecessor, * 'notify' our our barrier, and then 'try' our own. */ switch (id - team->consensus_id) { case 1: /* Try for our predecessor, hoping we can then notify */ if (!gasnete_coll_consensus_do_try(team)) { gasneti_assert_uint((id - team->consensus_id) ,==, 1); /* Sucessor is not yet done */ break; } gasneti_assert_uint(id ,==, team->consensus_id); /* ready to advance, so fall through... */ GASNETI_FALLTHROUGH case 0: /* Our own turn has come - notify and try */ gasnete_coll_consensus_do_notify(team); gasneti_assert_uint((team->consensus_id - id) ,==,1); gasnete_coll_consensus_do_try(team); gasneti_assert(((team->consensus_id - id) == 1) || ((team->consensus_id - id) == 2)); break; default: /* not our turn, but we can 'try' if the phase is right */ if (team->consensus_id & 1) { gasnete_coll_consensus_do_try(team); } } // Use of macro takes care with respect to wrap-around int done = GASNETE_COLL_SEQ32_GE(team->consensus_id, id + 2); #if GASNET_DEBUG gasneti_mutex_unlock(&team->barrier_lock); #endif return done ? GASNET_OK : GASNET_ERR_NOT_READY; } // Helper for gasnete_coll_consensus_barrier() // Bug 3854 identified an undesired recursion when calling // gasnete_coll_consensus_try() from gasnete_coll_consensus_barrier() since the // "try" operation could lead to an AMPoll which runs the collectives progress // function (and thus a nested gasnete_coll_consensus_try). // So, here we masquerade as an instance of the progress function to prevent // that recursion. GASNETI_INLINE(gasnete_coll_consensus_try_as_poller) int gasnete_coll_consensus_try_as_poller(gasnete_coll_threaddata_t *td, gasnete_coll_team_t team, gasnete_coll_consensus_t id) { gasneti_assert(! td->in_poll); td->in_poll = 1; int rc = gasnete_coll_consensus_try(team, id); td->in_poll = 0; return rc; } // gasnete_coll_consensus_barrier(): // Allocate a new barrier and wait for all earlier barriers to finish. // This omits the overheads of allocating a collective op, but the cost is // that we must interlock with the collectives progress function. // NOTE: therefore illegal to call from a collective poll fn extern int gasnete_coll_consensus_barrier(gasnete_coll_team_t team GASNETI_THREAD_FARG) { gasnete_coll_threaddata_t *td = GASNETE_COLL_MYTHREAD; gasnete_coll_consensus_t mybarr = gasnete_coll_consensus_create(team); while (gasnete_coll_consensus_try_as_poller(td, team, mybarr) == GASNET_ERR_NOT_READY) { gasneti_AMPoll(); } return GASNET_OK; } #endif #ifndef GASNETE_COLL_P2P_OVERRIDE #define GASNETE_COLL_P2P_TABLE_SLOT(S) \ (gasneti_assert(GASNETI_POWEROFTWO(GASNETE_COLL_P2P_TABLE_SIZE)), \ ((uint32_t)(S) & (GASNETE_COLL_P2P_TABLE_SIZE-1))) // If finalize is zero, returns with the lock held // If finalize is non-zero, returns without the lock held and additionally // in GASNET_DEBUG build will ensure future attempts at growth are fatal gasnete_coll_p2p_t *gasnete_coll_p2p_get_inner( gasnete_coll_team_t team, uint32_t sequence, size_t nstates, size_t ncounters, size_t ndata, int finalize) { unsigned int slot_nr = GASNETE_COLL_P2P_TABLE_SLOT(sequence); gasnete_coll_p2p_t *p2p, **prev_p; gex_HSL_Lock(&team->p2p_lock); /* Search table, which is sorted by sequence */ prev_p = &(team->p2p_table[slot_nr]); p2p = team->p2p_table[slot_nr]; while (p2p && GASNETE_COLL_SEQ32_LT(p2p->sequence, sequence)) { prev_p = &p2p->p2p_next; p2p = p2p->p2p_next; } // If not found, create it if_pf ((p2p == NULL) || (p2p->sequence != sequence)) { gasnete_coll_p2p_t *next = p2p; p2p = team->p2p_freelist; if_pf (p2p == NULL) { p2p = gasneti_calloc(1, sizeof(gasnete_coll_p2p_t)); gasneti_leak(p2p); GASNETI_STAT_EVENT(W, COLL_P2P_ALLOC); } else { team->p2p_freelist = p2p->p2p_next; } #if GASNET_DEBUG p2p->team_id = team->team_id; #endif p2p->sequence = sequence; gex_HSL_Init(&p2p->lock); // Insert in order before the last location searched gasneti_assert(prev_p != NULL); gasneti_assert(!next || (next->p2p_prev_p == prev_p)); *prev_p = p2p; p2p->p2p_prev_p = prev_p; p2p->p2p_next = next; if (next) { next->p2p_prev_p = &p2p->p2p_next; } #ifdef GASNETE_P2P_EXTRA_INIT GASNETE_P2P_EXTRA_INIT(p2p) #endif } // TODO: it may make sense to drop team->p2p_lock here in favor of p2p->lock if (p2p->finalized) { gasneti_assert(!finalize); // may only finalize once gasneti_assert_uint(p2p->nstates ,>=, nstates); gasneti_assert_uint(p2p->ncounters ,>=, ncounters); gasneti_assert_uint(p2p->ndata ,>=, ndata); } else { // Grow by at least double, subject to a limit #define GASNETE_P2P_NEW_SZ(have,want,limit) \ (gasneti_assert((want) <= (limit)), MIN(limit, MAX(want, 2*(have)))) // Allocate or grow fields as needed if (p2p->nstates < nstates) { nstates = GASNETE_P2P_NEW_SZ(p2p->nstates, nstates, 2 * team->total_ranks); uint32_t *tmp; size_t allocsz = nstates * sizeof(*tmp); tmp = gasneti_realloc((void*)p2p->state, allocsz); // cast discards `volatile` w/o a warning size_t zerosz = (nstates - p2p->nstates) * sizeof(*tmp); memset(tmp + p2p->nstates, 0, zerosz); p2p->state = tmp; p2p->nstates = nstates; } if (p2p->ncounters < ncounters) { ncounters = GASNETE_P2P_NEW_SZ(p2p->ncounters, ncounters, 2 * team->total_ranks); gasneti_weakatomic_t *tmp; size_t allocsz = ncounters * sizeof(*tmp); tmp = gasneti_realloc((void*)p2p->counter, allocsz); // cast discards `volatile` w/o a warning for (int i = p2p->ncounters; i < ncounters; i++) { gasneti_weakatomic_set(tmp + i, 0, 0); } p2p->counter = tmp; p2p->ncounters = ncounters; } if (p2p->ndata < ndata) { ndata = GASNETE_P2P_NEW_SZ(p2p->ndata, ndata, team->p2p_eager_buffersz); uint8_t *tmp = gasneti_realloc(p2p->data, ndata); memset(tmp + p2p->ndata, 0, ndata - p2p->ndata); p2p->data = tmp; p2p->ndata = ndata; } #undef GASNETE_P2P_NEW_SZ } gasnete_coll_p2p_check(p2p); if (finalize) { gasneti_assert(!p2p->finalized); p2p->finalized = 1; gex_HSL_Unlock(&team->p2p_lock); } gasneti_assert(p2p != NULL); gasneti_assert(p2p->team_id == team->team_id); return p2p; } void gasnete_coll_p2p_free(gasnete_coll_team_t team, gasnete_coll_p2p_t *p2p) { gasneti_assert(p2p != NULL); gasneti_assert(p2p->team_id == team->team_id); // Even though we've reached the end of the collective operation, it is // possible that an AM handler is still between its "real work" and its // release of the p2p_lock. So it is NOT safe to operate lock-free on p2p. gex_HSL_Lock(&team->p2p_lock); gasnete_coll_p2p_check(p2p); gasneti_free(p2p->data); p2p->data = NULL; p2p->ndata = 0; gasneti_free((void*)p2p->state); // cast discards `volatile` w/o a warning p2p->state = NULL; p2p->nstates = 0; gasneti_free((void*)p2p->counter); // cast discards `volatile` w/o a warning p2p->counter = NULL; p2p->ncounters = 0; p2p->finalized = 0; #ifdef GASNETE_P2P_EXTRA_FREE GASNETE_P2P_EXTRA_FREE(p2p) #endif *(p2p->p2p_prev_p) = p2p->p2p_next; if (p2p->p2p_next) { p2p->p2p_next->p2p_prev_p = p2p->p2p_prev_p; } p2p->p2p_next = team->p2p_freelist; team->p2p_freelist = p2p; #if GASNET_DEBUG /* Detect double free using otherwise unused prev pointer */ gasneti_assert(p2p->p2p_prev_p != &p2p->p2p_next); p2p->p2p_prev_p = &p2p->p2p_next; #endif gex_HSL_Unlock(&team->p2p_lock); } void gasnete_coll_p2p_purge(gasnete_coll_team_t team) { gex_HSL_Lock(&team->p2p_lock); gasnete_coll_p2p_t *p2p = team->p2p_freelist; team->p2p_freelist = NULL; while (p2p) { gasnete_coll_p2p_t *next = p2p->p2p_next; gasneti_free(p2p); GASNETI_STAT_EVENT(W, COLL_P2P_FREE); p2p = next; } gex_HSL_Unlock(&team->p2p_lock); } /* Delivers a long payload and updates 1 or more states count: number of states to update offset: index of first state to update state: value to assign to states [offset, offset+count) */ extern void gasnete_coll_p2p_long_reqh(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t team_id, gex_AM_Arg_t sequence, gex_AM_Arg_t count, gex_AM_Arg_t offset, gex_AM_Arg_t state) { size_t nstates = count ? offset + count : 0; gasnete_coll_team_t team = gasnete_coll_team_lookup(team_id); gasnete_coll_p2p_t *p2p = gasnete_coll_p2p_get_locked(team, sequence, nstates, 0, 0); if (nbytes) { gasneti_sync_writes(); } for (int i = 0; i < count; ++i, ++offset) { p2p->state[offset] = state; } gasnete_coll_p2p_unlock(team, p2p); } /* Delivers a medium payload to the eager buffer space and updates 1 or more states count: number of states to update offset: index of first state to update state: value to assign to states [offset, offset+count) size: eager element size; payload is copied to (p2p->data + offset*size) */ extern void gasnete_coll_p2p_med_reqh(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t team_id, gex_AM_Arg_t sequence, gex_AM_Arg_t count, gex_AM_Arg_t offset, gex_AM_Arg_t state, gex_AM_Arg_t size) { size_t nstates = count ? offset + count : 0; size_t ndata = nbytes ? offset * size + nbytes : 0; gasnete_coll_team_t team = gasnete_coll_team_lookup(team_id); gasnete_coll_p2p_t *p2p = gasnete_coll_p2p_get_locked(team, sequence, nstates, 0, ndata); if (nbytes) { GASNETE_FAST_UNALIGNED_MEMCPY(p2p->data + offset*size, buf, nbytes); gasneti_sync_writes(); } for (int i = 0; i < count; ++i, ++offset) { p2p->state[offset] = state; } gasnete_coll_p2p_unlock(team, p2p); } extern void gasnete_coll_p2p_med_counting_reqh(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t team_id, gex_AM_Arg_t sequence, gex_AM_Arg_t offset, gex_AM_Arg_t idx, gex_AM_Arg_t size) { size_t ndata = nbytes ? offset * size + nbytes : 0; gasnete_coll_team_t team = gasnete_coll_team_lookup(team_id); gasnete_coll_p2p_t *p2p = gasnete_coll_p2p_get_locked(team, sequence, 0, idx+1, ndata); if (nbytes) { GASNETE_FAST_UNALIGNED_MEMCPY(p2p->data + offset*size, buf, nbytes); gasneti_sync_writes(); } gasneti_weakatomic_increment(&p2p->counter[idx], 0); gasnete_coll_p2p_unlock(team, p2p); } /* Delivers a medium payload to the eager buffer space and updates 1 state size: eager element size; payload is copied to (p2p->data) */ extern void gasnete_coll_p2p_med_tree_reqh(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t team_id, gex_AM_Arg_t sequence) { gasnete_coll_team_t team = gasnete_coll_team_lookup(team_id); gasnete_coll_p2p_t *p2p = gasnete_coll_p2p_get_locked(team, sequence, 1, 0, nbytes); GASNETE_FAST_UNALIGNED_MEMCPY(p2p->data, buf, nbytes); gasneti_sync_writes(); p2p->state[0] = 1; gasnete_coll_p2p_unlock(team, p2p); } /* No payload to deliver, just updates 1 or more states count: number of states to update offset: index of first state to update state: value to assign to states [offset, offset+count) */ extern void gasnete_coll_p2p_short_reqh(gex_Token_t token, gex_AM_Arg_t team_id, gex_AM_Arg_t sequence, gex_AM_Arg_t count, gex_AM_Arg_t offset, gex_AM_Arg_t state) { size_t nstates = count ? offset + count : 0; gasnete_coll_team_t team = gasnete_coll_team_lookup(team_id); gasnete_coll_p2p_t *p2p = gasnete_coll_p2p_get_locked(team, sequence, nstates, 0, 0); for (int i = 0; i < count; ++i, ++offset) { p2p->state[offset] = state; } gasnete_coll_p2p_unlock(team, p2p); } /* Increment atomic counter */ extern void gasnete_coll_p2p_advance_reqh(gex_Token_t token, gex_AM_Arg_t team_id, gex_AM_Arg_t sequence, gex_AM_Arg_t idx) { gasnete_coll_team_t team = gasnete_coll_team_lookup(team_id); gasnete_coll_p2p_t *p2p = gasnete_coll_p2p_get_locked(team, sequence, 0, idx+1, 0); gasneti_weakatomic_increment(&p2p->counter[idx], 0); gasnete_coll_p2p_unlock(team, p2p); } /* Send the data and increment atomic counter */ extern void gasnete_coll_p2p_put_and_advance_reqh(gex_Token_t token, void *buf, size_t nbytes, gex_AM_Arg_t team_id, gex_AM_Arg_t sequence, gex_AM_Arg_t idx) { if (nbytes) { gasneti_sync_writes(); } gasnete_coll_team_t team = gasnete_coll_team_lookup(team_id); gasnete_coll_p2p_t *p2p = gasnete_coll_p2p_get_locked(team, sequence, 0, idx+1, 0); gasneti_weakatomic_increment(&p2p->counter[idx], 0); gasnete_coll_p2p_unlock(team, p2p); } /* Memcopy payload and then decrement atomic counter if requested */ GASNETI_INLINE(gasnete_coll_p2p_memcpy_reqh_inner) void gasnete_coll_p2p_memcpy_reqh_inner(gex_Token_t token, void *buf, size_t nbytes, void *dest, gex_AM_Arg_t team_id, gex_AM_Arg_t sequence, gex_AM_Arg_t decrement) { gasnete_coll_team_t team = gasnete_coll_team_lookup(team_id); gasnete_coll_p2p_t *p2p = gasnete_coll_p2p_get_locked(team, sequence, 0, !!decrement, 0); GASNETE_FAST_UNALIGNED_MEMCPY(dest, buf, nbytes); if (decrement) { gasneti_weakatomic_decrement(&p2p->counter[0], GASNETI_ATOMIC_REL); } gasnete_coll_p2p_unlock(team, p2p); } MEDIUM_HANDLER(gasnete_coll_p2p_memcpy_reqh,4,5, (token,addr,nbytes, UNPACK(a0), a1, a2, a3), (token,addr,nbytes, UNPACK2(a0, a1), a2, a3, a4)); /* Put up to gex_AM_LUBRequestLong() bytes, signalling the recipient */ /* Returns as soon as local buffer is reusable */ void gasnete_tm_p2p_counting_put(gasnete_coll_op_t *op, gex_Rank_t dstrank, void *dst, void *src, size_t nbytes, uint32_t idx GASNETI_THREAD_FARG) { uint32_t seq_num = op->sequence; const uint32_t team_id = op->team->team_id; const gex_Flags_t flags = op->team->aux_seg_flag; gasneti_assert(nbytes <= gex_AM_LUBRequestLong()); gex_AM_RequestLong(op->e_tm, dstrank, gasneti_handleridx(gasnete_coll_p2p_put_and_advance_reqh), src, nbytes, dst, GEX_EVENT_NOW, flags, team_id, seq_num, idx); } /* Put up to gex_AM_LUBRequestLong() bytes, signalling the recipient */ /* Returns immediately even if the local buffer is not yet reusable */ void gasnete_tm_p2p_counting_putAsync(gasnete_coll_op_t *op, gex_Rank_t dstrank, void *dst, void *src, size_t nbytes, uint32_t idx GASNETI_THREAD_FARG) { uint32_t seq_num = op->sequence; const uint32_t team_id = op->team->team_id; const gex_Flags_t flags = op->team->aux_seg_flag; gasneti_assert(nbytes <= gex_AM_LUBRequestLong()); // TODO-EX: restore "Async" gex_AM_RequestLong(op->e_tm, dstrank, gasneti_handleridx(gasnete_coll_p2p_put_and_advance_reqh), src, nbytes, dst, GEX_EVENT_NOW, flags, team_id, seq_num, idx); } /* Send data to be buffered by the recipient */ int gasnete_tm_p2p_eager_putM( gasnete_coll_op_t *op, gex_Rank_t rank, const void *src, uint32_t count, size_t size, gex_Event_t *lc_opt, gex_Flags_t flags, uint32_t offset, uint32_t state GASNETI_THREAD_FARG) { // TODO-EX: flags |= INTERNAL to prevent tracing const uint32_t team_id = op->team->team_id; const uint32_t sequence = op->sequence; if_pf (count * size > gex_AM_LUBRequestMedium()) { const size_t chunk = gex_AM_LUBRequestMedium() / size; size_t nbytes = chunk * size; flags &= ~GEX_FLAG_IMMEDIATE; // TODO-EX: support maybe IMMEDIATE for multi-AM case? do { gasneti_assert_zeroret( gex_AM_RequestMedium6(op->e_tm, rank, gasneti_handleridx(gasnete_coll_p2p_med_reqh), (void*)src, nbytes, GEX_EVENT_NOW, flags, team_id, sequence, chunk, offset, state, size)); offset += chunk; src = (void *)((uintptr_t)src + nbytes); count -= chunk; } while (count > chunk); } return gex_AM_RequestMedium6(op->e_tm, rank, gasneti_handleridx(gasnete_coll_p2p_med_reqh), (void*)src, count * size, lc_opt, flags, team_id, sequence, count, offset, state, size); } /* a simplification for eager putM so that we send less bits on the wire*/ /* we hardcode the assumption that we want to send to state 0 and set a value of 1*/ /* for cases in which we are just sending down the tree (such as a broadcast) this is sufficient*/ void gasnete_tm_p2p_eager_put_tree(gasnete_coll_op_t *op, gex_Rank_t dstrank, void *src, size_t size GASNETI_THREAD_FARG) { uint32_t seq_num = op->sequence; const uint32_t team_id = op->team->team_id; gasneti_assert(size <= gex_AM_LUBRequestMedium()); gex_AM_RequestMedium(op->e_tm, dstrank, gasneti_handleridx(gasnete_coll_p2p_med_tree_reqh), src, size, GEX_EVENT_NOW, 0, team_id, seq_num); } /* Memcpy up to gex_AM_LUBRequestMedium() bytes, signalling the recipient */ int gasnete_tm_p2p_memcpy(gasnete_coll_op_t *op, gex_Rank_t rank, void *dst, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { const uint32_t seq_num = op->sequence; const uint32_t team_id = op->team->team_id; gasneti_assert(nbytes <= gex_AM_LUBRequestMedium()); return gex_AM_RequestMedium(op->e_tm, rank, gasneti_handleridx(gasnete_coll_p2p_memcpy_reqh), src, nbytes, GEX_EVENT_NOW, flags, PACK(dst), team_id, seq_num, 1); } extern void gasnete_tm_p2p_counting_eager_put(gasnete_coll_op_t *op, gex_Rank_t dstrank, void *src, size_t nbytes, size_t offset_size, uint32_t offset, uint32_t idx GASNETI_THREAD_FARG) { const uint32_t team_id = op->team->team_id; gex_AM_RequestMedium(op->e_tm, dstrank, gasneti_handleridx(gasnete_coll_p2p_med_counting_reqh), src, nbytes, GEX_EVENT_NOW, 0, team_id, op->sequence, offset, idx, offset_size); } /* Indicate ready for a gasnete_tm_p2p_memcpy, placing request in slot "offset" */ int gasnete_tm_p2p_send_rtr( gasnete_coll_op_t *op, gasnete_coll_p2p_t *p2p, gex_Rank_t rank, uint32_t offset, void *dst, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { struct gasnete_tm_p2p_send_struct tmp; tmp.addr = dst; tmp.sent = 0; /* TODO: we send addr+"0", when only the addr is needed (need custom AM instead of eager_put). */ int retval = gasnete_tm_p2p_eager_put(op, rank, &tmp, sizeof(tmp), GEX_EVENT_NOW, flags, offset, 1 GASNETI_THREAD_PASS); if (retval) { // back pressure gasneti_assert(flags & GEX_FLAG_IMMEDIATE); } else { /* Compute the number of Mediums we know we'll receive. */ const gasneti_weakatomic_val_t msg_count = ((nbytes + gex_AM_LUBRequestMedium() - 1) / gex_AM_LUBRequestMedium()); // check for overflow of msg_count: gasneti_assert_uint(nbytes ,<=, (msg_count * gex_AM_LUBRequestMedium())); gasneti_assert_uint(msg_count ,<=, GASNETI_ATOMIC_MAX); gasneti_weakatomic_add(&p2p->counter[0], msg_count, GASNETI_ATOMIC_NONE); } return retval; } /* Respond to a gasnete_tm_p2p_send_rtr */ // Return: // 0: no data remains to be sent (done) // 1: unsent data remains OR xfer has not even started // 2: unsent data remains, but was not sent due to IMMEDIATE back-pressure // p2p usage: // p2p->data holds an array of struct gasnete_tm_p2p_send_struct (void*,size_t) // p2p->state[offset] holds state in [0..2] int gasnete_tm_p2p_send_data(gasnete_coll_op_t *op, gasnete_coll_p2p_t *p2p, gex_Rank_t rank, uint32_t offset, const void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { struct gasnete_tm_p2p_send_struct *status = (struct gasnete_tm_p2p_send_struct *)p2p->data; if (p2p->state[offset] == 1) { gasneti_sync_reads(); size_t sent = status[offset].sent; gasneti_assert_uint(nbytes ,>=, sent); size_t count = nbytes - sent; if_pt (count) { void *tmp = (void *)((uintptr_t)src + sent); void *addr = status[offset].addr; gasneti_assert(addr != NULL); const size_t limit = gex_AM_LUBRequestMedium(); const int more = (count > limit); if (more) count = limit; if (gasnete_tm_p2p_memcpy(op, rank, addr, tmp, count, flags GASNETI_THREAD_PASS)) { return 2; // back pressure } status[offset].addr = (void *)((uintptr_t)addr + count); status[offset].sent += count; return more; } else { p2p->state[offset] = 2; return 0; } } return (p2p->state[offset] != 2); } #endif /*---------------------------------------------------------------------------------*/ /* functions for generic ops */ extern gasnete_coll_generic_data_t *gasnete_coll_generic_alloc(GASNETI_THREAD_FARG_ALONE) { gasnete_coll_threaddata_t *td = GASNETE_COLL_MYTHREAD; gasnete_coll_generic_data_t *result; gasneti_assert(td != NULL); result = td->generic_data_freelist; if_pt (result != NULL) { td->generic_data_freelist = *((gasnete_coll_generic_data_t **)result); } else { /* XXX: allocate in chunks and scatter across cache lines */ /* XXX: destroy freelist at exit */ result = (gasnete_coll_generic_data_t *)gasneti_calloc(1, sizeof(gasnete_coll_generic_data_t)); GASNETI_STAT_EVENT_VAL(W, COLL_GDATA_ALLOC, sizeof(gasnete_coll_generic_data_t)); } memset(result, 0, sizeof(*result)); gasneti_sync_writes(); return result; } extern void gasnete_coll_generic_free(gasnete_coll_team_t team, gasnete_coll_generic_data_t *data GASNETI_THREAD_FARG) { gasnete_coll_threaddata_t *td = GASNETE_COLL_MYTHREAD_NOALLOC; gasneti_assert(data != NULL); if (data->options & GASNETE_COLL_GENERIC_OPT_P2P) { gasnete_coll_p2p_free(team, data->p2p); } if(data->options & GASNETE_COLL_GENERIC_OPT_INSYNC) { gasnete_coll_consensus_free(team, data->in_barrier); } if(data->options & GASNETE_COLL_GENERIC_OPT_OUTSYNC) { gasnete_coll_consensus_free(team, data->out_barrier); } *((gasnete_coll_generic_data_t **)data) = td->generic_data_freelist; td->generic_data_freelist = data; } /* Generic routine to create an op and enter it in the active list, etc.. * Caller provides 'data' and 'poll_fn' specific to the operation. * Event is allocated automatically. * * 'sequence' can have two meanings: * w/ GASNETE_COLL_SUBORDINATE it is the pre-allocated sequence number to assign * w/o GASNETE_COLL_SUBORDINATE is is the number of slots to pre-allocate * * Just returns the handle. */ extern gex_Event_t gasnete_coll_op_generic_init_with_scratch(gasnete_coll_team_t team, int flags, gasnete_coll_generic_data_t *data, gasnete_coll_poll_fn poll_fn, uint32_t sequence, gasnete_coll_scratch_req_t *scratch_req, int num_params, uint32_t *param_list, gasnete_coll_local_tree_geom_t *geom_info GASNETI_THREAD_FARG) { gasnete_coll_eop_t result = NULL; gasnete_coll_op_t *op; gasneti_assert(data != NULL); if_pf (!(flags & GASNETE_COLL_SUBORDINATE)) { uint32_t tmp = team->sequence; team->sequence += (1 + sequence); sequence = tmp; #if GASNET_DEBUG // Check largest allocated sequence number lies is within safe range of oldest "live" // Depends on order of the active list (oldest first) uint32_t last = team->sequence - 1; gasneti_mutex_lock(&gasnete_coll_active_lock); gasnete_coll_op_t *op = gasnete_coll_active_first(); while (op && op->team != team) { op = gasnete_coll_active_next(op); } gasneti_mutex_unlock(&gasnete_coll_active_lock); if (op) { GASNETE_COLL_SEQ32_SAFE(last, op->sequence); } #endif } /* Conditionally allocate data for point-to-point syncs */ if (data->options & GASNETE_COLL_GENERIC_OPT_P2P) { // Historical (worst-case) array sizes // TODO: eliminate use of this code path -- *no* algorithm uses all three worst case sizes size_t nstates = 2 * team->total_ranks; size_t ncounters = 2 * team->total_ranks; size_t ndata = team->p2p_eager_buffersz; data->p2p = gasnete_coll_p2p_get_final(team, sequence, nstates, ncounters, ndata); } /* Unconditionally allocate an eop */ result = gasnete_coll_eop_create(GASNETI_THREAD_PASS_ALONE); /* Create the op */ op = gasnete_coll_op_create(team, sequence, flags GASNETI_THREAD_PASS); op->data = data; op->poll_fn = poll_fn; op->flags = flags; /*set up scratch space here as needed modify coll op to take an extra struct argument if it is NULL it indicates that no scratch is required (default case) if it isn't NULL then it means that we want to call it with scratch MAKE SURE TO SETUP SCRATCH BEFORE THE OP IS SET TO BE ACTIVE */ op->scratch_req = scratch_req; if (scratch_req) scratch_req->op = op; /* Allocate the barriers AFTER SCRATCH SPACE*/ /* This will allow the scratch space to use its own consensus barriers*/ if_pf (flags & GASNETE_COLL_SUBORDINATE) { /* Subordinates can't allocate sequence numbers or barriers, due to non-collective calling */ gasneti_assert(!(data->options & (GASNETE_COLL_GENERIC_OPT_INSYNC | GASNETE_COLL_GENERIC_OPT_OUTSYNC))); } else { /* Conditionally allocate barriers */ if (data->options & GASNETE_COLL_GENERIC_OPT_INSYNC) { data->in_barrier = gasnete_coll_consensus_create(team); } if (data->options & GASNETE_COLL_GENERIC_OPT_OUTSYNC) { data->out_barrier = gasnete_coll_consensus_create(team); } } op->waiting_scratch_op = 0; op->active_scratch_op = 0; op->waiting_for_reconfig_clear=0; #if GASNET_DEBUG op->scratch_op_freed = 0; #endif op->num_coll_params = num_params; GASNETI_MEMCPY_SAFE_EMPTY(op->param_list, param_list, sizeof(uint32_t)*num_params); gasnete_coll_op_submit(op, result GASNETI_THREAD_PASS); return GASNETE_COLL_EOP_TO_EVENT(result); } /* NOTE: caller is responsible for a gasneti_sync_reads() if they read any transferred data. */ extern int gasnete_coll_generic_coll_sync(gex_Event_t *p, size_t count GASNETI_THREAD_FARG) { int result = 1; int i; for (i = 0; i < count; ++i) { if (p[i] != GEX_EVENT_INVALID) { result = 0; break; } } return result; } /*********** BROADCAST *******/ #ifndef gasnete_coll_broadcast_nb #define gasnete_coll_broadcast_nb gasnete_coll_broadcast_nb_default #else extern gex_Event_t gasnete_coll_broadcast_nb_default(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); #endif extern gex_Event_t gasnete_coll_broadcast_nb(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); GASNETI_COLL_FN_HEADER(_gasnet_coll_broadcast_nb) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gasnet_coll_broadcast_nb(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { gex_Event_t handle; GASNETI_TRACE_COLL_BROADCAST(COLL_BROADCAST_NB,team,dst,srcimage,src,nbytes,flags); GASNETI_CHECK_INJECT(); GASNETE_COLL_VALIDATE_BROADCAST(team,dst,srcimage,src,nbytes,flags); handle = gasnete_coll_broadcast_nb(team,dst,srcimage,src,nbytes,flags,0 GASNETI_THREAD_PASS); gasneti_AMPoll(); // No progress made until now return handle; } #ifdef gasnete_coll_broadcast extern void gasnete_coll_broadcast(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG); #else GASNETI_COLL_FN_HEADER(gasnete_coll_broadcast) void gasnete_coll_broadcast(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { gex_Event_t handle; handle = gasnete_coll_broadcast_nb(team,dst,srcimage,src,nbytes,flags,0 GASNETI_THREAD_PASS); gasnete_wait(handle GASNETI_THREAD_PASS); } #endif GASNETI_COLL_FN_HEADER(_gasnet_coll_broadcast) void _gasnet_coll_broadcast(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { GASNETI_TRACE_COLL_BROADCAST(COLL_BROADCAST,team,dst,srcimage,src,nbytes,flags); GASNETI_CHECK_INJECT(); GASNETE_COLL_VALIDATE_BROADCAST(team,dst,srcimage,src,nbytes,flags); gasnete_coll_broadcast(team,dst,srcimage,src,nbytes,flags GASNETI_THREAD_PASS); } /********* SCATTER *****************/ #ifndef gasnete_coll_scatter_nb #define gasnete_coll_scatter_nb gasnete_coll_scatter_nb_default #else extern gex_Event_t gasnete_coll_scatter_nb_default(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); #endif extern gex_Event_t gasnete_coll_scatter_nb(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); GASNETI_COLL_FN_HEADER(_gasnet_coll_scatter_nb) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gasnet_coll_scatter_nb(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { gex_Event_t handle; GASNETI_TRACE_COLL_SCATTER(COLL_SCATTER_NB,team,dst,srcimage,src,nbytes,flags); GASNETI_CHECK_INJECT(); GASNETE_COLL_VALIDATE_SCATTER(team,dst,srcimage,src,nbytes,flags); handle = gasnete_coll_scatter_nb(team,dst,srcimage,src,nbytes,flags,0 GASNETI_THREAD_PASS); gasneti_AMPoll(); // No progress made until now return handle; } #ifdef gasnete_coll_scatter extern void gasnete_coll_scatter(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG); #else GASNETI_COLL_FN_HEADER(gasnete_coll_scatter) void gasnete_coll_scatter(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { gex_Event_t handle; handle = gasnete_coll_scatter_nb(team,dst,srcimage,src,nbytes,flags,0 GASNETI_THREAD_PASS); gasnete_wait(handle GASNETI_THREAD_PASS); } #endif GASNETI_COLL_FN_HEADER(_gasnet_coll_scatter) void _gasnet_coll_scatter(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { GASNETI_TRACE_COLL_SCATTER(COLL_SCATTER,team,dst,srcimage,src,nbytes,flags); GASNETI_CHECK_INJECT(); GASNETE_COLL_VALIDATE_SCATTER(team,dst,srcimage,src,nbytes,flags); gasnete_coll_scatter(team,dst,srcimage,src,nbytes,flags GASNETI_THREAD_PASS); } /*********GATHER *************/ #ifndef gasnete_coll_gather_nb #define gasnete_coll_gather_nb gasnete_coll_gather_nb_default #else extern gex_Event_t gasnete_coll_gather_nb_default(gasnet_team_handle_t team, gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); #endif extern gex_Event_t gasnete_coll_gather_nb(gasnet_team_handle_t team, gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); GASNETI_COLL_FN_HEADER(_gasnet_coll_gather_nb) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gasnet_coll_gather_nb(gasnet_team_handle_t team, gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { gex_Event_t handle; GASNETI_TRACE_COLL_GATHER(COLL_GATHER_NB,team,dstimage,dst,src,nbytes,flags); GASNETI_CHECK_INJECT(); GASNETE_COLL_VALIDATE_GATHER(team,dstimage,dst,src,nbytes,flags); handle = gasnete_coll_gather_nb(team,dstimage,dst,src,nbytes,flags,0 GASNETI_THREAD_PASS); gasneti_AMPoll(); // No progress made until now return handle; } #ifdef gasnete_coll_gather extern void gasnete_coll_gather(gasnet_team_handle_t team, gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG); #else GASNETI_COLL_FN_HEADER(gasnete_coll_gather) void gasnete_coll_gather(gasnet_team_handle_t team, gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { gex_Event_t handle; handle = gasnete_coll_gather_nb(team,dstimage,dst,src,nbytes,flags,0 GASNETI_THREAD_PASS); gasnete_wait(handle GASNETI_THREAD_PASS); } #endif GASNETI_COLL_FN_HEADER(_gasnet_coll_gather) void _gasnet_coll_gather(gasnet_team_handle_t team, gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { GASNETI_TRACE_COLL_GATHER(COLL_GATHER,team,dstimage,dst,src,nbytes,flags); GASNETI_CHECK_INJECT(); GASNETE_COLL_VALIDATE_GATHER(team,dstimage,dst,src,nbytes,flags); gasnete_coll_gather(team,dstimage,dst,src,nbytes,flags GASNETI_THREAD_PASS); } /**** Gather ALL ***/ #ifndef gasnete_coll_gather_all_nb #define gasnete_coll_gather_all_nb gasnete_coll_gather_all_nb_default #else extern gex_Event_t gasnete_coll_gather_all_nb_default(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); #endif extern gex_Event_t gasnete_coll_gather_all_nb(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); GASNETI_COLL_FN_HEADER(_gasnet_coll_gather_all_nb) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gasnet_coll_gather_all_nb(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { gex_Event_t handle; GASNETI_TRACE_COLL_GATHER_ALL(COLL_GATHER_ALL_NB,team,dst,src,nbytes,flags); GASNETI_CHECK_INJECT(); GASNETE_COLL_VALIDATE_GATHER_ALL(team,dst,src,nbytes,flags); handle = gasnete_coll_gather_all_nb(team,dst,src,nbytes,flags,0 GASNETI_THREAD_PASS); gasneti_AMPoll(); // No progress made until now return handle; } #ifdef gasnete_coll_gather_all extern void gasnete_coll_gather_all(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG); #else GASNETI_COLL_FN_HEADER(gasnete_coll_gather_all) void gasnete_coll_gather_all(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { gex_Event_t handle; handle = gasnete_coll_gather_all_nb(team,dst,src,nbytes,flags,0 GASNETI_THREAD_PASS); gasnete_wait(handle GASNETI_THREAD_PASS); } #endif GASNETI_COLL_FN_HEADER(_gasnet_coll_gather_all) void _gasnet_coll_gather_all(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { GASNETI_TRACE_COLL_GATHER_ALL(COLL_GATHER_ALL,team,dst,src,nbytes,flags); GASNETI_CHECK_INJECT(); GASNETE_COLL_VALIDATE_GATHER_ALL(team,dst,src,nbytes,flags); gasnete_coll_gather_all(team,dst,src,nbytes,flags GASNETI_THREAD_PASS); } /****** Exchange *********/ #ifndef gasnete_coll_exchange_nb #define gasnete_coll_exchange_nb gasnete_coll_exchange_nb_default #else extern gex_Event_t gasnete_coll_exchange_nb_default(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); #endif extern gex_Event_t gasnete_coll_exchange_nb(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG); GASNETI_COLL_FN_HEADER(_gasnet_coll_exchange_nb) GASNETI_WARN_UNUSED_RESULT gex_Event_t _gasnet_coll_exchange_nb(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { gex_Event_t handle; GASNETI_TRACE_COLL_EXCHANGE(COLL_EXCHANGE_NB,team,dst,src,nbytes,flags); GASNETI_CHECK_INJECT(); GASNETE_COLL_VALIDATE_EXCHANGE(team,dst,src,nbytes,flags); handle = gasnete_coll_exchange_nb(team,dst,src,nbytes,flags,0 GASNETI_THREAD_PASS); gasneti_AMPoll(); // No progress made until now return handle; } #ifdef gasnete_coll_exchange extern void gasnete_coll_exchange(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG); #else GASNETI_COLL_FN_HEADER(gasnete_coll_exchange) void gasnete_coll_exchange(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { gex_Event_t handle; handle = gasnete_coll_exchange_nb(team,dst,src,nbytes,flags,0 GASNETI_THREAD_PASS); gasnete_wait(handle GASNETI_THREAD_PASS); } #endif GASNETI_COLL_FN_HEADER(_gasnet_coll_exchange) void _gasnet_coll_exchange(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags GASNETI_THREAD_FARG) { GASNETI_TRACE_COLL_EXCHANGE(COLL_EXCHANGE,team,dst,src,nbytes,flags); GASNETI_CHECK_INJECT(); GASNETE_COLL_VALIDATE_EXCHANGE(team,dst,src,nbytes,flags); gasnete_coll_exchange(team,dst,src,nbytes,flags GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_broadcast_nb() */ extern gex_Event_t gasnete_coll_generic_broadcast_nb(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, gasnete_coll_poll_fn poll_fn, int options, gasnete_coll_local_tree_geom_t *geom_info, uint32_t sequence, int num_params, uint32_t *param_list GASNETI_THREAD_FARG) { gex_Event_t result; gasnete_coll_scratch_req_t *scratch_req=NULL; /*fill out a scratch request "form" if you need scratch space with this operation*/ if(options & (GASNETE_COLL_USE_SCRATCH)) { scratch_req = gasnete_coll_scratch_alloc_req(team); /*fill out the tree information*/ scratch_req->tree_type = geom_info->tree_type; scratch_req->root = geom_info->root; scratch_req->tree_dir = GASNETE_COLL_DOWN_TREE; scratch_req->op_type = GASNETE_COLL_TREE_OP; /*fill out the peer information*/ scratch_req->incoming_size = nbytes; if(team->myrank == geom_info->root) { scratch_req->num_in_peers = 0; scratch_req->in_peers = NULL; } else { scratch_req->num_in_peers = 1; scratch_req->in_peers = &(GASNETE_COLL_TREE_GEOM_PARENT(geom_info)); } scratch_req->num_out_peers = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom_info); gasnete_coll_scratch_alloc_out_sizes(scratch_req, scratch_req->num_out_peers); for (int i = 0; i < scratch_req->num_out_peers; i++) { scratch_req->out_sizes[i] = nbytes; } scratch_req->out_peers = GASNETE_COLL_TREE_GEOM_CHILDREN(geom_info); } gasnete_coll_threads_lock(team, flags GASNETI_THREAD_PASS); const int first_thread = 1; // TODO-EX: multi-EP may need "first arrival" logic here if_pt (first_thread) { gasnete_coll_generic_data_t *data = gasnete_coll_generic_alloc(GASNETI_THREAD_PASS_ALONE); GASNETE_COLL_GENERIC_SET_TAG(data, broadcast); data->args.broadcast.dst = dst; data->args.broadcast.srcrank = srcimage; data->args.broadcast.src = src; data->args.broadcast.nbytes = nbytes; data->options = options; data->tree_geom = geom_info; result = gasnete_coll_op_generic_init_with_scratch(team, flags, data, poll_fn, sequence, scratch_req, num_params, param_list, geom_info GASNETI_THREAD_PASS); } else { result = gasnete_coll_threads_get_handle(team GASNETI_THREAD_PASS); } gasnete_coll_threads_unlock(team GASNETI_THREAD_PASS); return result; } extern gex_Event_t gasnete_coll_broadcast_nb_default(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG) { gasnete_coll_implementation_t impl; gex_Event_t ret; /* "Discover" in-segment flags if needed/possible */ flags = gasnete_coll_segment_check(team, flags, 0, 0, dst, nbytes, 1, srcimage, src, nbytes); impl = gasnete_coll_autotune_get_bcast_algorithm(team, dst, srcimage, src, nbytes, flags GASNETI_THREAD_PASS); ret = impl->fn_ptr.bcast_fn(team, dst, srcimage, src, nbytes, flags, impl, sequence GASNETI_THREAD_PASS); if(impl->need_to_free) gasnete_coll_free_implementation(impl); return ret; } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_scatter_nb() */ extern gex_Event_t gasnete_coll_generic_scatter_nb(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, size_t dist, int flags, gasnete_coll_poll_fn poll_fn, int options, gasnete_coll_local_tree_geom_t *geom_info, uint32_t sequence, int num_params, uint32_t *param_list GASNETI_THREAD_FARG) { gex_Event_t result; gasnete_coll_scratch_req_t *scratch_req=NULL; if(options & (GASNETE_COLL_USE_SCRATCH)) { scratch_req = gasnete_coll_scratch_alloc_req(team); /*fill out the tree information*/ scratch_req->tree_type = geom_info->tree_type; scratch_req->root = geom_info->root; scratch_req->tree_dir = GASNETE_COLL_DOWN_TREE; scratch_req->op_type = GASNETE_COLL_TREE_OP; /*fill out the peer information*/ scratch_req->incoming_size = nbytes*geom_info->mysubtree_size; if(team->myrank == geom_info->root) { scratch_req->num_in_peers = 0; scratch_req->in_peers = NULL; } else { scratch_req->num_in_peers = 1; scratch_req->in_peers = &(GASNETE_COLL_TREE_GEOM_PARENT(geom_info)); } scratch_req->num_out_peers = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom_info); gasnete_coll_scratch_alloc_out_sizes(scratch_req, scratch_req->num_out_peers); for (int i =0 ; i< scratch_req->num_out_peers; i++) { scratch_req->out_sizes[i] = nbytes*geom_info->subtree_sizes[i]; } scratch_req->out_peers = GASNETE_COLL_TREE_GEOM_CHILDREN(geom_info); } gasnete_coll_threads_lock(team, flags GASNETI_THREAD_PASS); const int first_thread = 1; // TODO-EX: multi-EP may need "first arrival" logic here if_pt (first_thread) { gasnete_coll_generic_data_t *data = gasnete_coll_generic_alloc(GASNETI_THREAD_PASS_ALONE); GASNETE_COLL_GENERIC_SET_TAG(data, scatter); data->args.scatter.dst = dst; data->args.scatter.srcrank = srcimage; data->args.scatter.src = src; data->args.scatter.nbytes = nbytes; data->args.scatter.dist = dist; data->options = options; data->tree_geom = geom_info; result = gasnete_coll_op_generic_init_with_scratch(team, flags, data, poll_fn, sequence, scratch_req, num_params, param_list, geom_info GASNETI_THREAD_PASS); } else { result = gasnete_coll_threads_get_handle(team GASNETI_THREAD_PASS); } gasnete_coll_threads_unlock(team GASNETI_THREAD_PASS); return result; } extern gex_Event_t gasnete_coll_scatter_nb_default(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG) { gasnete_coll_implementation_t impl; gex_Event_t ret; flags = gasnete_coll_segment_check(team, flags, 0, 0, dst, nbytes, 1, srcimage, src, nbytes*team->total_ranks); impl = gasnete_coll_autotune_get_scatter_algorithm(team, dst, srcimage, src, nbytes, nbytes, flags GASNETI_THREAD_PASS); ret = impl->fn_ptr.scatter_fn(team, dst, srcimage, src, nbytes, nbytes, flags, impl, sequence GASNETI_THREAD_PASS); if(impl->need_to_free) gasnete_coll_free_implementation(impl); return ret; } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_gather_nb() */ extern gex_Event_t gasnete_coll_generic_gather_nb(gasnet_team_handle_t team, gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, size_t dist, int flags, gasnete_coll_poll_fn poll_fn, int options, gasnete_coll_local_tree_geom_t *geom_info, uint32_t sequence, int num_params, uint32_t *param_list GASNETI_THREAD_FARG) { gex_Event_t result; gasnete_coll_scratch_req_t *scratch_req=NULL; if(options & (GASNETE_COLL_USE_SCRATCH)) { scratch_req = gasnete_coll_scratch_alloc_req(team); /*fill out the tree information*/ scratch_req->tree_type = geom_info->tree_type; scratch_req->tree_dir = GASNETE_COLL_UP_TREE; scratch_req->root = geom_info->root; scratch_req->op_type = GASNETE_COLL_TREE_OP; /*fill out the peer information*/ scratch_req->incoming_size = nbytes*geom_info->mysubtree_size; scratch_req->num_in_peers = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom_info); if(scratch_req->num_in_peers > 0) { scratch_req->in_peers = GASNETE_COLL_TREE_GEOM_CHILDREN(geom_info); } else { scratch_req->in_peers = NULL; } if(team->myrank == dstimage) { scratch_req->num_out_peers = 0; scratch_req->out_peers = NULL; scratch_req->out_sizes = NULL; } else { scratch_req->num_out_peers = 1; gasnete_coll_scratch_alloc_out_sizes(scratch_req, 1); scratch_req->out_sizes[0] = nbytes*geom_info->parent_subtree_size; scratch_req->out_peers = &(GASNETE_COLL_TREE_GEOM_PARENT(geom_info)); } } gasnete_coll_threads_lock(team, flags GASNETI_THREAD_PASS); const int first_thread = 1; // TODO-EX: multi-EP may need "first arrival" logic here if_pt (first_thread) { gasnete_coll_generic_data_t *data = gasnete_coll_generic_alloc(GASNETI_THREAD_PASS_ALONE); GASNETE_COLL_GENERIC_SET_TAG(data, gather); data->args.gather.dstrank = dstimage; data->args.gather.dst = dst; data->args.gather.src = src; data->args.gather.nbytes = nbytes; data->args.gather.dist = dist; data->options = options; data->private_data = NULL; data->tree_geom = geom_info; result = gasnete_coll_op_generic_init_with_scratch(team, flags, data, poll_fn, sequence, scratch_req, num_params, param_list, geom_info GASNETI_THREAD_PASS); } else { result = gasnete_coll_threads_get_handle(team GASNETI_THREAD_PASS); } gasnete_coll_threads_unlock(team GASNETI_THREAD_PASS); return result; } extern gex_Event_t gasnete_coll_gather_nb_default(gasnet_team_handle_t team, gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG) { gasnete_coll_implementation_t impl; gex_Event_t ret; /* "Discover" in-segment flags if needed/possible */ flags = gasnete_coll_segment_check(team, flags, 1, dstimage, dst, nbytes*team->total_ranks, 0, 0, src, nbytes); impl = gasnete_coll_autotune_get_gather_algorithm(team,dstimage, dst, src, nbytes, nbytes, flags GASNETI_THREAD_PASS); ret = impl->fn_ptr.gather_fn(team, dstimage, dst, src, nbytes, nbytes, flags, impl, sequence GASNETI_THREAD_PASS); if(impl->need_to_free) gasnete_coll_free_implementation(impl); return ret; } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_gather_all_nb() */ // gall GathBcast: Implement gather_all in terms of gather + broadcast // Naturally OUT_MYSYNC due to tree-based broadcast // Valid for all flags, segment dispositions and sizes static int gasnete_coll_pf_gall_GathBcast(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_gather_all_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, gather_all); int result = 0; gasnete_coll_p2p_t *p2p = data->p2p; gasneti_assert(p2p != NULL); gasneti_assert(p2p->state != NULL); gasneti_assert(p2p->data != NULL); struct pdata { size_t offset; size_t remain; size_t chunk_len; gex_Rank_t width; gex_Rank_t self; gex_Rank_t child_cnt; gex_Rank_t parent; gex_Rank_t age; int phase; int last; } *pdata = data->private_data; switch (data->state) { case 0: { // Allocate and initialize pdata used by the broadcast gex_TM_t const tm = op->e_tm; pdata = gasneti_calloc(1, sizeof(struct pdata)); pdata->remain = args->nbytes * gex_TM_QuerySize(tm); pdata->chunk_len = MIN(op->team->p2p_eager_buffersz, gex_AM_LUBRequestMedium()); pdata->self = gex_TM_QueryRank(tm); pdata->child_cnt = gasnete_tm_binom_children(tm, pdata->self); pdata->parent = gasnete_tm_binom_parent(tm, pdata->self); pdata->age = gasnete_tm_binom_age(tm, pdata->self); pdata->width = 1 + gasnete_coll_log2_rank(gex_TM_QuerySize(tm) - 1); pdata->phase = 1; gasneti_assert(!data->private_data); data->private_data = pdata; data->state = 1; GASNETI_FALLTHROUGH } case 1: // Optional IN barrier if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 2; GASNETI_FALLTHROUGH case 2: { // Initiate data #1: gather to rank 0 int flags = GASNETE_COLL_FORWARD_FLAGS(op->flags)|GASNETE_COLL_NONROOT_SUBORDINATE|GASNET_COLL_DISABLE_AUTOTUNE; data->handle = gasnete_coll_gather_nb(op->team, 0, args->dst, args->src, args->nbytes, flags, op->sequence+1 GASNETI_THREAD_PASS); gasnete_coll_save_event(&data->handle); data->state = 3; GASNETI_FALLTHROUGH } case 3: // Sync gather if (data->handle != GEX_EVENT_INVALID) { break; } data->state = 4; GASNETI_FALLTHROUGH case 4: { // Initiate one round of binomial broadcast // TODO: use of IMM and maybe lc_opt gex_TM_t const tm = op->e_tm; void *dst = (void *)(pdata->offset + (uintptr_t)args->dst); const int ready = pdata->phase; pdata->last = (pdata->remain <= pdata->chunk_len); if (pdata->last) { pdata->chunk_len = pdata->remain; } if (pdata->self) { // Wait for arrival of data from parent (if any) if (p2p->state[pdata->width] != ready) break; gasneti_sync_reads(); GASNETI_MEMCPY(dst, p2p->data, pdata->chunk_len); // Acknowledge parent (CTS) if there is a next round if (! pdata->last) { gasnete_tm_p2p_change_state(op, pdata->parent, /*flags*/0, pdata->age, ready GASNETI_THREAD_PASS); } } if (pdata->child_cnt) { // Send to children (if any) const gex_Rank_t size = gex_TM_QuerySize(tm); const gex_Rank_t child_cnt = pdata->child_cnt; const gex_Rank_t self = pdata->self; for (int idx = child_cnt - 1; idx >= 0; --idx) { // Reverse order for deepest subtree first gex_Rank_t distance = 1 << idx; gex_Rank_t peer = (distance >= size - self) ? self - (size - distance) : self + distance; // Deliver to p2p->data space W/O an offset, but set a state[i] for non-zero i: // count=1, offset=i, elem_size=0 gasneti_assert_zeroret( gex_AM_RequestMedium6(tm, peer, gasneti_handleridx(gasnete_coll_p2p_med_reqh), dst, pdata->chunk_len, GEX_EVENT_NOW, /*flags*/0, op->team->team_id, op->sequence, /*count*/1, /*offset*/pdata->width, /*state*/ready, /*elem_size*/0)); } } if (pdata->last) goto bcast_done; data->state = 5; GASNETI_FALLTHROUGH } case 5: if (pdata->child_cnt) { // Stall for CTS const int ready = pdata->phase; for (gex_Rank_t r = 0; r < pdata->child_cnt; ++r) { if (p2p->state[r] != ready) return 0; // At least one child has not acknowledged } } // Advance phase, offset and remain for next iter pdata->phase ^= 1; pdata->offset += pdata->chunk_len; pdata->remain -= pdata->chunk_len; gasneti_assert(pdata->remain); // Yield. Control will resume at next iteration. gasneti_assert(! result); data->state = 4; break; bcast_done: data->state = 6; GASNETI_FALLTHROUGH case 6: // Optional OUT barrier if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasneti_free(pdata); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_gall_GathBcast( gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF (!(flags & GASNET_COLL_IN_NOSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(flags & GASNET_COLL_OUT_ALLSYNC) | GASNETE_COLL_GENERIC_OPT_P2P; if(flags & GASNETE_COLL_SUBORDINATE) return gasnete_coll_generic_gather_all_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_gall_GathBcast, options, NULL, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); else { return gasnete_coll_generic_gather_all_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_gall_GathBcast, options, NULL, 1, // single non-root subordinate gather coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } } extern gex_Event_t gasnete_coll_generic_gather_all_nb(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_poll_fn poll_fn, int options, void *private_data,uint32_t sequence, int num_params, uint32_t *param_list GASNETI_THREAD_FARG) { gex_Event_t result; gasnete_coll_scratch_req_t *scratch_req=NULL; gasnete_coll_dissem_info_t *dissem = gasnete_coll_fetch_dissemination(2,team); if(options & (GASNETE_COLL_USE_SCRATCH)) { /*fill out a scratch request form*/ scratch_req = gasnete_coll_scratch_alloc_req(team); scratch_req->op_type = GASNETE_COLL_DISSEM_OP; scratch_req->tree_dir = GASNETE_COLL_UP_TREE; scratch_req->tree_type = NULL; scratch_req->incoming_size = nbytes*team->total_ranks; scratch_req->num_out_peers = scratch_req->num_in_peers = GASNETE_COLL_DISSEM_GET_PEER_COUNT(dissem); gasnete_coll_scratch_alloc_out_sizes(scratch_req, 1); scratch_req->out_sizes[0] = scratch_req->incoming_size; scratch_req->out_peers = GASNETE_COLL_DISSEM_GET_BEHIND_PEERS(dissem); scratch_req->in_peers = GASNETE_COLL_DISSEM_GET_FRONT_PEERS(dissem); } gasnete_coll_threads_lock(team, flags GASNETI_THREAD_PASS); const int first_thread = 1; // TODO-EX: multi-EP may need "first arrival" logic here if_pt (first_thread) { gasnete_coll_generic_data_t *data = gasnete_coll_generic_alloc(GASNETI_THREAD_PASS_ALONE); GASNETE_COLL_GENERIC_SET_TAG(data, gather_all); data->args.gather_all.dst = dst; data->args.gather_all.src = src; data->args.gather_all.nbytes = nbytes; data->options = options; data->private_data = private_data; data->tree_geom = NULL; data->dissem_info = dissem; result = gasnete_coll_op_generic_init_with_scratch(team, flags, data, poll_fn, sequence, scratch_req, num_params, param_list, NULL GASNETI_THREAD_PASS); } else { result = gasnete_coll_threads_get_handle(team GASNETI_THREAD_PASS); } gasnete_coll_threads_unlock(team GASNETI_THREAD_PASS); return result; } extern gex_Event_t gasnete_coll_gather_all_nb_default(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG) { gasnete_coll_implementation_t impl; gex_Event_t ret; flags = gasnete_coll_segment_check(team, flags, 0, 0, dst, nbytes*team->total_ranks, 0, 0, src, nbytes); impl = gasnete_coll_autotune_get_gather_all_algorithm(team, dst, src, nbytes, flags GASNETI_THREAD_PASS); ret = impl->fn_ptr.gather_all_fn(team, dst, src, nbytes, flags, impl, sequence GASNETI_THREAD_PASS); if(impl->need_to_free) gasnete_coll_free_implementation(impl); return ret; } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_exchange_nb() */ /* exchg Gath: Implement exchange in terms of simultaneous gathers */ /* This is meant mostly as an example and a short-term solution */ /* Valid wherever the underlying gather is valid */ static int gasnete_coll_pf_exchg_Gath(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_exchange_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, exchange); int result = 0; switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Initiate data movement */ { gex_Event_t *h; int flags = GASNETE_COLL_FORWARD_FLAGS(op->flags); gasnet_team_handle_t team = op->team; void *dst = args->dst; uintptr_t src_addr = (uintptr_t)args->src; size_t nbytes = args->nbytes; gasnet_image_t i; /* XXX: freelist ? */ h = gasneti_malloc(team->total_ranks * sizeof(gex_Event_t)); data->private_data = h; for (i = 0; i < team->total_ranks; ++i, ++h, src_addr += nbytes) { *h = gasnete_coll_gather_nb(team, i, dst, (void *)src_addr, nbytes, flags|GASNETE_COLL_NONROOT_SUBORDINATE|GASNET_COLL_DISABLE_AUTOTUNE, op->sequence+i+1 GASNETI_THREAD_PASS); gasnete_coll_save_event(h); } } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Sync data movement */ if (!gasnete_coll_generic_coll_sync(data->private_data, op->team->total_ranks GASNETI_THREAD_PASS)) { break; } data->state = 3; GASNETI_FALLTHROUGH case 3: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasneti_free(data->private_data); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_exchg_Gath(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF (!(flags & GASNET_COLL_IN_NOSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNET_COLL_OUT_NOSYNC)); gasneti_assert(!(flags & GASNETE_COLL_SUBORDINATE)); return gasnete_coll_generic_exchange_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_exchg_Gath, options, NULL, NULL, team->total_ranks, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } extern gex_Event_t gasnete_coll_generic_exchange_nb(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_poll_fn poll_fn, int options, void *private_data, gasnete_coll_dissem_info_t* dissem, uint32_t sequence, int num_params, uint32_t *param_list GASNETI_THREAD_FARG) { gex_Event_t result; gasnete_coll_scratch_req_t *scratch_req=NULL; if(options & GASNETE_COLL_USE_SCRATCH) { /*fill out a scratch request form*/ scratch_req = gasnete_coll_scratch_alloc_req(team); scratch_req->op_type = GASNETE_COLL_DISSEM_OP; scratch_req->tree_dir = GASNETE_COLL_DOWN_TREE; scratch_req->tree_type = NULL; scratch_req->incoming_size = nbytes*team->total_ranks+ (nbytes*dissem->max_dissem_blocks*2*(dissem->dissemination_radix-1)); scratch_req->num_out_peers = scratch_req->num_in_peers = GASNETE_COLL_DISSEM_GET_PEER_COUNT(dissem); gasnete_coll_scratch_alloc_out_sizes(scratch_req, 1); scratch_req->out_sizes[0] = scratch_req->incoming_size; scratch_req->out_peers = GASNETE_COLL_DISSEM_GET_FRONT_PEERS(dissem); scratch_req->in_peers = GASNETE_COLL_DISSEM_GET_BEHIND_PEERS(dissem); } gasnete_coll_threads_lock(team, flags GASNETI_THREAD_PASS); const int first_thread = 1; // TODO-EX: multi-EP may need "first arrival" logic here if_pt (first_thread) { gasnete_coll_generic_data_t *data = gasnete_coll_generic_alloc(GASNETI_THREAD_PASS_ALONE); GASNETE_COLL_GENERIC_SET_TAG(data, exchange); data->args.exchange.dst = dst; data->args.exchange.src = src; data->args.exchange.nbytes = nbytes; data->options = options; data->private_data = private_data; data->tree_geom = NULL; data->dissem_info = dissem; result = gasnete_coll_op_generic_init_with_scratch(team, flags, data, poll_fn, sequence, scratch_req, num_params, param_list, NULL GASNETI_THREAD_PASS); } else { result = gasnete_coll_threads_get_handle(team GASNETI_THREAD_PASS); } gasnete_coll_threads_unlock(team GASNETI_THREAD_PASS); return result; } extern gex_Event_t gasnete_coll_exchange_nb_default(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, uint32_t sequence GASNETI_THREAD_FARG) { gasnete_coll_implementation_t impl; gex_Event_t ret; /* "Discover" in-segment flags if needed/possible */ flags = gasnete_coll_segment_check(team, flags, 0, 0, dst, nbytes*team->total_ranks, 0, 0, src, nbytes*team->total_ranks); impl = gasnete_coll_autotune_get_exchange_algorithm(team, dst, src, nbytes, flags GASNETI_THREAD_PASS); ret = impl->fn_ptr.exchange_fn(team, dst, src, nbytes, flags, impl, sequence GASNETI_THREAD_PASS); if(impl->need_to_free) gasnete_coll_free_implementation(impl); return ret; } /*---------------------------------------------------------------------------------*/ // Barrier #ifndef gasnete_tm_barrier_nb // In absence of conduit override we drop the _default suffix #define gasnete_tm_barrier_nb_default gasnete_tm_barrier_nb #endif static int gasnete_coll_pf_barrier(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnet_team_handle_t team = op->team; gasnete_coll_consensus_t id = (gasnete_coll_consensus_t)(uintptr_t)op->data; int done = gasnete_coll_consensus_try(team, id) == GASNET_OK; return done ? (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE) : 0; } extern gex_Event_t gasnete_tm_barrier_nb_default(gex_TM_t e_tm, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnet_team_handle_t team = gasneti_import_tm_nonpair(e_tm)->_coll_team; const int coll_flags = 0; gex_Event_t result; gasnete_coll_threads_lock(team, coll_flags GASNETI_THREAD_PASS); gasnete_coll_op_t *op = gasnete_coll_op_create(team, 0, coll_flags GASNETI_THREAD_PASS); op->poll_fn = &gasnete_coll_pf_barrier; op->flags = coll_flags; gasnete_coll_consensus_t id = gasnete_coll_consensus_create(team); gasneti_assert(sizeof(id) <= sizeof(op->data)); op->data = (void *)(uintptr_t)id; gasnete_coll_eop_t eop = gasnete_coll_eop_create(GASNETI_THREAD_PASS_ALONE); gasnete_coll_op_submit(op, eop GASNETI_THREAD_PASS); result = GASNETE_COLL_EOP_TO_EVENT(eop); gasnete_coll_threads_unlock(team GASNETI_THREAD_PASS); gasneti_AMPoll(); // No progress made until now return result; } /*---------------------------------------------------------------------------------*/ // Barrier (undocumented Blocking variant) #ifndef gasnete_tm_barrier // In absence of conduit override we drop the _default suffix #define gasnete_tm_barrier_default gasnete_tm_barrier #endif extern void gasnete_tm_barrier_default(gex_TM_t e_tm, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnet_team_handle_t team = gasneti_import_tm_nonpair(e_tm)->_coll_team; gasnete_coll_consensus_barrier(team GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ // GEX Broadcast // // TODO-EX: replace this THUNK w/ something implementing only the GEX // semantics (e.g. no sync flags or single-valued addr) and using GEX-ified // poll_fn (e.g. use of IMMEDIATE and NP-AM). #ifndef gasnete_tm_broadcast_nb // In absence of conduit override we drop the _default suffix #define gasnete_tm_broadcast_nb_default gasnete_tm_broadcast_nb #endif gex_Event_t gasnete_tm_broadcast_nb_default(gex_TM_t e_tm, gex_Rank_t root, void *dst, const void *src, size_t nbytes, gex_Flags_t flags, uint32_t sequence GASNETI_THREAD_FARG) { GASNETI_TRACE_TM_BROADCAST(COLL_BROADCAST_NB,e_tm,root,dst,src,nbytes,flags); gasnet_team_handle_t team = gasneti_import_tm_nonpair(e_tm)->_coll_team; int coll_flags = GASNET_COLL_LOCAL | GASNET_COLL_IN_MYSYNC | GASNET_COLL_OUT_MYSYNC; coll_flags |= (flags & GASNETI_FLAG_COLL_SUBORDINATE) ? GASNETE_COLL_SUBORDINATE : 0; return gasnete_coll_broadcast_nb(team, dst, root, (/*non-const*/ void*)src, nbytes, coll_flags, sequence GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ // GEX Reduce gex_Event_t gasnete_tm_generic_reduce_nb(gex_TM_t tm, gex_Rank_t root, void *dst, const void *src, gex_DT_t dt, size_t dt_sz, size_t dt_cnt, gex_OP_t opcode, gex_Coll_ReduceFn_t fnptr, void *cdata, int coll_flags, gasnete_coll_poll_fn poll_fn, int options, gasnete_coll_local_tree_geom_t *geom_info, uint32_t sequence, int num_params, uint32_t *param_list, gasnete_coll_scratch_req_t *scratch_req GASNETI_THREAD_FARG) { gasnet_team_handle_t team = gasneti_import_tm_nonpair(tm)->_coll_team; gex_Event_t result; gasnete_coll_threads_lock(team, coll_flags GASNETI_THREAD_PASS); gasnete_coll_generic_data_t *data = gasnete_coll_generic_alloc(GASNETI_THREAD_PASS_ALONE); GASNETE_COLL_GENERIC_SET_TAG(data, tm_reduce); data->args.tm_reduce.root = root; data->args.tm_reduce.dst = dst; data->args.tm_reduce.src = src; data->args.tm_reduce.dt = dt; data->args.tm_reduce.dt_sz = dt_sz; data->args.tm_reduce.dt_cnt = dt_cnt; switch (opcode) { case GEX_OP_USER_NC: gasneti_fatalerror("Support for GEX_OP_USER_NC reductions is UNIMPLEMENTED"); break; case GEX_OP_USER: data->args.tm_reduce.op_fnptr = fnptr; data->args.tm_reduce.op_cdata = cdata; break; // Otherwise convert DT/OP pair to an *internal* fnptr and cdata // TODO-EX: this just selects on DT and smuggles the opcode in the // cdata, which then leaves a switch(opcode) in the critical path. default: data->args.tm_reduce.op_cdata = (void*)(uintptr_t)opcode; switch (dt) { #define REDUCE_OP_CASE(DT) \ case GEX_DT_##DT: \ data->args.tm_reduce.op_fnptr = gasnete_shrinkray_gex_dt_##DT; \ break; GASNETE_TM_REDUCE_FOREACH_DT(REDUCE_OP_CASE) #undef REDUCE_OP_CASE default: gasneti_unreachable(); } break; } data->options = options; data->private_data = NULL; data->tree_geom = geom_info; result = gasnete_coll_op_generic_init_with_scratch(team, coll_flags, data, poll_fn, sequence, scratch_req, num_params, param_list, geom_info GASNETI_THREAD_PASS); gasnete_coll_threads_unlock(team GASNETI_THREAD_PASS); return result; } #ifndef gasnete_tm_reduce_nb // In absence of conduit override we drop the _default suffix #define gasnete_tm_reduce_nb_default gasnete_tm_reduce_nb #endif gex_Event_t gasnete_tm_reduce_nb_default( gex_TM_t e_tm, gex_Rank_t root, void *dst, const void *src, gex_DT_t dt, size_t dt_sz, size_t dt_cnt, gex_OP_t opcode, gex_Coll_ReduceFn_t user_fnptr, void *user_cdata, gex_Flags_t flags, uint32_t sequence GASNETI_THREAD_FARG) { gasneti_TM_t i_tm = gasneti_import_tm_nonpair(e_tm); GASNETI_TRACE_TM_REDUCE(COLL_REDUCE_NB,e_tm,root,dst,src,dt,dt_sz,dt_cnt,opcode,user_fnptr,user_cdata,flags); GASNETI_CHECK_INJECT(); // Argument validation // TODO-EX: factor to avoid cloning this logic to conduit collectives // TODO-EX: informative fatalerror() in place of assertion failure gasneti_assert(root < i_tm->_size); gasneti_assert((root != i_tm->_rank) || dst); gasneti_assert(src); gasneti_assert(dt_sz != 0); gasneti_assert(dt_cnt != 0); gasneti_assert((dt == GEX_DT_USER) || (dt_sz == gasneti_dt_size(dt))); gasneti_assert(gasneti_dt_valid_reduce(dt)); gasneti_assert(gasneti_op_valid_reduce(opcode)); gasneti_assert((dt == GEX_DT_USER) || (gasneti_dt_int(dt) && gasneti_op_int(opcode)) || (gasneti_dt_fp(dt) && gasneti_op_fp(opcode))); // Short-circuit singleton // TODO-EX: hoist to gasnet_coll.h? if (i_tm->_size == 1) { GASNETI_MEMCPY_SAFE_IDENTICAL(dst, src, dt_sz * dt_cnt); return GEX_EVENT_INVALID; } // TODO-EX: LUB can be relaxed (potentially significantly) for pshm-only teams gasnete_coll_team_t team = i_tm->_coll_team; const size_t nbytes = dt_sz * dt_cnt; gasnete_coll_local_tree_geom_t *geom = NULL; gasnete_tm_reduce_fn_ptr_t alg; const int binomial_root_radix = 1 + gasnete_coll_log2_rank(i_tm->_size - 1); if ((nbytes * binomial_root_radix <= team->p2p_eager_buffersz) && (nbytes <= gex_AM_LUBRequestMedium())) { alg = &gasnete_tm_reduce_BinomialEager; } else { const size_t smallest_scratch = team->scratch_size; geom = gasnete_coll_local_tree_geom_fetch(gasnetc_tm_reduce_tree_type, root, team); const gex_Rank_t max_radix = geom->max_radix; if ((nbytes * max_radix <= smallest_scratch) && (nbytes <= gex_AM_LUBRequestLong())) { alg = &gasnete_tm_reduce_TreePut; } else if ((dt_sz * (max_radix + 1) <= smallest_scratch) && (dt_sz <= gex_AM_LUBRequestLong())) { alg = &gasnete_tm_reduce_TreePutSeg; } else if ((dt_sz * binomial_root_radix <= team->p2p_eager_buffersz) && (dt_sz <= gex_AM_LUBRequestMedium())) { alg = &gasnete_tm_reduce_BinomialEagerSeg; } else { gasneti_assert(dt == GEX_DT_USER); gasneti_fatalerror("gex_Coll_ReduceToOneNB: (dt_sz == %"PRIuSZ") is TOO LARGE for this implementation", dt_sz); } } // TODO-EX: stop abusing implementation_t argument to pass the geom gex_Event_t result = (*alg)(e_tm, root, dst, src, dt, dt_sz, dt_cnt, opcode, user_fnptr, user_cdata, /*flags*/0, (void*)geom, sequence GASNETI_THREAD_PASS); gasneti_AMPoll(); // No progress made until now return result; } /*---------------------------------------------------------------------------------*/ // GEX Reduce to All gex_Event_t gasnete_tm_generic_reduce_all_nb( gex_TM_t tm, void *dst, const void *src, gex_DT_t dt, size_t dt_sz, size_t dt_cnt, gex_OP_t opcode, gex_Coll_ReduceFn_t fnptr, void *cdata, int coll_flags, gasnete_coll_poll_fn poll_fn, int options, gasnete_coll_local_tree_geom_t *geom_info, uint32_t sequence, int num_params, uint32_t *param_list, gasnete_coll_scratch_req_t *scratch_req GASNETI_THREAD_FARG) { gasnet_team_handle_t team = gasneti_import_tm_nonpair(tm)->_coll_team; gex_Event_t result; gasnete_coll_threads_lock(team, coll_flags GASNETI_THREAD_PASS); gasnete_coll_generic_data_t *data = gasnete_coll_generic_alloc(GASNETI_THREAD_PASS_ALONE); GASNETE_COLL_GENERIC_SET_TAG(data, tm_reduce_all); data->args.tm_reduce_all.dst = dst; data->args.tm_reduce_all.src = src; data->args.tm_reduce_all.dt = dt; data->args.tm_reduce_all.dt_sz = dt_sz; data->args.tm_reduce_all.dt_cnt = dt_cnt; data->args.tm_reduce_all.opcode = opcode; switch (opcode) { case GEX_OP_USER_NC: gasneti_fatalerror("Support for GEX_OP_USER_NC reductions is UNIMPLEMENTED"); break; case GEX_OP_USER: data->args.tm_reduce_all.op_fnptr = fnptr; data->args.tm_reduce_all.op_cdata = cdata; break; // Otherwise convert DT/OP pair to an *internal* fnptr and cdata // TODO-EX: this just selects on DT and smuggles the opcode in the // cdata, which then leaves a switch(opcode) in the critical path. default: data->args.tm_reduce_all.op_cdata = (void*)(uintptr_t)opcode; switch (dt) { #define REDUCE_OP_CASE(DT) \ case GEX_DT_##DT: \ data->args.tm_reduce_all.op_fnptr = gasnete_shrinkray_gex_dt_##DT; \ break; GASNETE_TM_REDUCE_FOREACH_DT(REDUCE_OP_CASE) #undef REDUCE_OP_CASE default: gasneti_unreachable(); } break; } data->options = options; data->private_data = NULL; data->tree_geom = geom_info; result = gasnete_coll_op_generic_init_with_scratch(team, coll_flags, data, poll_fn, sequence, scratch_req, num_params, param_list, geom_info GASNETI_THREAD_PASS); gasnete_coll_threads_unlock(team GASNETI_THREAD_PASS); return result; } #ifndef gasnete_tm_reduce_all_nb // In absence of conduit override we drop the _default suffix #define gasnete_tm_reduce_all_nb_default gasnete_tm_reduce_all_nb #endif gex_Event_t gasnete_tm_reduce_all_nb_default( gex_TM_t e_tm, void *dst, const void *src, gex_DT_t dt, size_t dt_sz, size_t dt_cnt, gex_OP_t opcode, gex_Coll_ReduceFn_t user_fnptr, void *user_cdata, gex_Flags_t flags, uint32_t sequence GASNETI_THREAD_FARG) { gasneti_TM_t i_tm = gasneti_import_tm_nonpair(e_tm); GASNETI_TRACE_TM_REDUCE_ALL(COLL_REDUCE_ALL_NB,e_tm,dst,src,dt,dt_sz,dt_cnt,opcode,user_fnptr,user_cdata,flags); GASNETI_CHECK_INJECT(); // Argument validation // TODO-EX: factor to avoid cloning this logic to conduit collectives // TODO-EX: informative fatalerror() in place of assertion failure gasneti_assert(src); gasneti_assert(dst); // Note GASNETI_MEMCPY_SAFE_IDENTICAL will check src/dst overlap gasneti_assert(dt_sz != 0); gasneti_assert(dt_cnt != 0); gasneti_assert((dt == GEX_DT_USER) || (dt_sz == gasneti_dt_size(dt))); gasneti_assert(gasneti_dt_valid_reduce(dt)); gasneti_assert(gasneti_op_valid_reduce(opcode)); gasneti_assert((dt == GEX_DT_USER) || (gasneti_dt_int(dt) && gasneti_op_int(opcode)) || (gasneti_dt_fp(dt) && gasneti_op_fp(opcode))); // Short-circuit singleton // TODO-EX: hoist to gasnet_coll.h? if (i_tm->_size == 1) { GASNETI_MEMCPY_SAFE_IDENTICAL(dst, src, dt_sz * dt_cnt); return GEX_EVENT_INVALID; } // Some ReduceToOne algorithms will implement ReduceToAll if passed // (root == GEX_RANK_INVALID). However, that has a different signature // from implementations which implement only ReduceToAll. So, the // algorithm selection will set exactly one of the following. gasnete_tm_reduce_fn_ptr_t to_one_alg = NULL; gasnete_tm_reduce_all_fn_ptr_t to_all_alg = NULL; // TODO-EX: LUB can be relaxed (potentially significantly) for pshm-only teams // TODO-EX: smarter implementations, such as dissemination for idempotent ops gasnete_coll_team_t team = i_tm->_coll_team; const size_t nbytes = dt_sz * dt_cnt; const int binomial_root_radix = 1 + gasnete_coll_log2_rank(i_tm->_size - 1); gasnete_coll_local_tree_geom_t *geom = NULL; if ((nbytes * binomial_root_radix <= team->p2p_eager_buffersz) && (nbytes <= gex_AM_LUBRequestMedium())) { to_one_alg = &gasnete_tm_reduce_BinomialEager; } else if ((dt_sz * binomial_root_radix <= team->p2p_eager_buffersz) && (dt_sz <= gex_AM_LUBRequestMedium())) { to_one_alg = &gasnete_tm_reduce_BinomialEagerSeg; } else { const size_t smallest_scratch = team->scratch_size; gex_Rank_t root = 0; // TODO: could rotate roots to balance load geom = gasnete_coll_local_tree_geom_fetch(gasnetc_tm_reduce_tree_type, root, team); const gex_Rank_t max_radix = geom->max_radix; if ((dt_sz * (max_radix + 1) <= smallest_scratch) && (dt_sz <= gex_AM_LUBRequestLong())) { to_one_alg = &gasnete_tm_reduce_TreePutSeg; } else { gasneti_assert(dt == GEX_DT_USER); gasneti_fatalerror("gex_Coll_ReduceToAll: (dt_sz == %"PRIuSZ") is TOO LARGE for this implementation", dt_sz); } } gasneti_assert(!!to_one_alg ^ !!to_all_alg); // exactly one must be non-NULL gex_Event_t result; if (to_one_alg) { // TODO-EX: stop abusing implementation_t argument to pass the geom result = (*to_one_alg)(e_tm, GEX_RANK_INVALID, dst, src, dt, dt_sz, dt_cnt, opcode, user_fnptr, user_cdata, /*flags*/0, (void*)geom, sequence GASNETI_THREAD_PASS); } else { result = (*to_all_alg)(e_tm, dst, src, dt, dt_sz, dt_cnt, opcode, user_fnptr, user_cdata, /*flags*/0, NULL, sequence GASNETI_THREAD_PASS); } gasneti_AMPoll(); // No progress made until now return result; } /*---------------------------------------------------------------------------------*/ #if GASNET_DEBUG extern void gasnete_coll_stat(void) { GASNET_BEGIN_FUNCTION(); gasnete_coll_threaddata_t *td = GASNETE_COLL_MYTHREAD_NOALLOC; int used = gasnete_coll_event_list.used; gasnete_coll_op_t *op; gasneti_console_message("COLL INFO","%d events used\n", used); if (used) { for (int i = 0; i < used; ++i) { gasneti_console_message("COLL INFO","EVENT %p\n", (void *)gasnete_coll_event_list.events[i]); } } /* gasneti_mutex_lock(&gasnete_coll_active_lock); */ op = gasnete_coll_active_first(); while (op) { gasnete_coll_generic_data_t *data = op->data; gasneti_console_message("COLL INFO","OP: %p in state %d\n", (void *)op, data->state); op = gasnete_coll_active_next(op); } /* gasneti_mutex_unlock(&gasnete_coll_active_lock); */ } #endif /*---------------------------------------------------------------------------------*/ gasnet-2025.8.0/extended-ref/coll/gasnet_hashtable.h0000664000175000017500000000466615142313673022406 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_hashtable.h $ * Description: Reference implemetation of GASNet Collectives team * Copyright 2009, The Regents of the University of California * Terms of use are as specified in license.txt */ /** * Implement hash table data structure using vectors (chaining) to * solve collisions * * For information about the data structures and algorithms used in the * implementation, please see Ch. 12 of Introduction to Algorithms * by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest. * * Lawrence Berkeley National Laboratory * 2009 */ #ifndef GASNET_HASHTABLE_H_ #define GASNET_HASHTABLE_H_ /* Part I: Table */ typedef struct gasnete_table_item { uint32_t key; void * data; } gasnete_table_item_t; typedef struct gasnete_table { gasnete_table_item_t *slots; uint32_t size; uint32_t num; } gasnete_table_t; #define TABLE_SIZE(tab) (tab->size) /**< return the maximum size of the queue */ #define TABLE_NUM(tab) (tab->num) /**< return the current number of items in the table */ gasnete_table_t * gasnete_table_create(uint32_t size); gasnete_table_item_t * gasnete_table_search(const gasnete_table_t * const table, uint32_t key); uint32_t gasnete_table_insert(gasnete_table_t * const table, gasnete_table_item_t item); uint32_t gasnete_table_remove(gasnete_table_t * const table, uint32_t key, gasnete_table_item_t * deleted); void gasnete_table_copy(const gasnete_table_t * const src, gasnete_table_t * const dst); void gasnete_table_free(gasnete_table_t * const table); /* Part II: Hashtable */ typedef struct gasnete_hashtable { gasnete_table_t ** buckets; uint32_t size; /**< hash table size (# of buckets) */ uint32_t num; /**< number of elements in the hash table */ } gasnete_hashtable_t; /** * Hash function that determines the bucket for the element with a key */ GASNETI_INLINE(gasnete_hashtable_hash) uint32_t gasnete_hashtable_hash(gasnete_hashtable_t * ht, uint32_t key) { return (key % ht->size); } /** * Create a hash table */ gasnete_hashtable_t * gasnete_hashtable_create(uint32_t size); uint32_t gasnete_hashtable_search(gasnete_hashtable_t * ht, uint32_t key, void ** data); uint32_t gasnete_hashtable_insert(gasnete_hashtable_t * ht, uint32_t key, void * data); uint32_t gasnete_hashtable_remove(gasnete_hashtable_t * ht, uint32_t key, void ** data); void gasnete_hashtable_free(gasnete_hashtable_t * ht); #endif /* GASNET_HASHTABLE_H_ */ gasnet-2025.8.0/extended-ref/coll/gasnet_rvous.c0000664000175000017500000007216415142313673021622 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_rvous.c $ * Description: Reference implemetation of GASNet Collectives team * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include #include //--------------------------------------------------------------------------------- // PSHM-aware wrappers static void gasnete_coll_put_nb(gasnete_coll_generic_data_t *data, gex_TM_t tm, gex_Rank_t rank, void *dst, const void *src, size_t nbytes GASNETI_THREAD_FARG) { void *local_dst = GASNETI_NBRHD_MAPPED_ADDR_OR_NULL(tm, rank, dst); if (local_dst) { gasneti_assert(data->handle == GEX_EVENT_INVALID); GASNETI_MEMCPY(local_dst, src, nbytes); } else { data->handle = gasnete_put_nb(tm, rank, dst, (void*)src, nbytes, GEX_EVENT_DEFER, 0 GASNETI_THREAD_PASS); gasnete_coll_save_event(&data->handle); } } static void gasnete_coll_put_nbi(gex_TM_t tm, gex_Rank_t rank, void *dst, const void *src, size_t nbytes GASNETI_THREAD_FARG) { void *local_dst = GASNETI_NBRHD_MAPPED_ADDR_OR_NULL(tm, rank, dst); if (local_dst) { GASNETI_MEMCPY(local_dst, src, nbytes); } else { gasnete_put_nbi(tm, rank, dst, (void*)src, nbytes, GEX_EVENT_DEFER, 0 GASNETI_THREAD_PASS); } } static void gasnete_coll_get_nb(gasnete_coll_generic_data_t *data, gex_TM_t tm, void *dst, gex_Rank_t rank, void *src, size_t nbytes GASNETI_THREAD_FARG) { void *local_src = GASNETI_NBRHD_MAPPED_ADDR_OR_NULL(tm, rank, src); if (local_src) { gasneti_assert(data->handle == GEX_EVENT_INVALID); GASNETI_MEMCPY(dst, local_src, nbytes); } else { data->handle = gasnete_get_nb(tm, dst, rank, src, nbytes, 0 GASNETI_THREAD_PASS); gasnete_coll_save_event(&data->handle); } } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_broadcast_nb() */ // bcast RVGet: root node broadcasts (flat tree) address, others get from that address // // Uses GASNETE_COLL_GENERIC_OPT_P2P on non-root nodes to receive source address static int gasnete_coll_pf_bcast_RVGet(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_broadcast_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, broadcast); int result = 0; switch (data->state) { case 0: // Thread rendezvous and optional IN barrier if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } // Allocation of p2p structure if (op->team->myrank != args->srcrank) { size_t nstates = 1; size_t ndata = sizeof(void*); data->p2p = gasnete_coll_p2p_get_final(op->team, op->sequence, nstates, 0, ndata); data->options |= GASNETE_COLL_GENERIC_OPT_P2P; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Data movement */ if (op->team->myrank == args->srcrank) { gasnete_tm_p2p_eager_addr_all(op, args->src, 0, 1, op->team GASNETI_THREAD_PASS); /* broadcast src address */ GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, args->src, args->nbytes); } else if (data->p2p->state[0]) { gasneti_sync_reads(); gasnete_coll_get_nb(data, op->e_tm, args->dst, args->srcrank, *(void **)data->p2p->data, args->nbytes GASNETI_THREAD_PASS); } else { break; } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Sync data movement */ if (data->handle != GEX_EVENT_INVALID) { break; } data->state = 3; GASNETI_FALLTHROUGH case 3: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_bcast_RVGet(gasnet_team_handle_t team, void * dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF (flags & GASNET_COLL_IN_ALLSYNC) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNET_COLL_OUT_NOSYNC)); gasneti_assert(flags & GASNET_COLL_SRC_IN_SEGMENT); return gasnete_coll_generic_broadcast_nb(team, dst, srcimage, src, nbytes, flags, &gasnete_coll_pf_bcast_RVGet, options, 0, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /* parent sends addresses to children who then perform a get to grab the data the collective is naturally IN_MYSYNC OUT_NOSYNC since a rendezvous is performed with the parent before the data is read however the parent has no idea when the data has been read to allow for an OUT_MYSYNC collective w/o a barrier we introduce a counter at the parent which is advanced for each child that has finished the gets THIS collective requires the source and destination to be in the segment since they will be both used as sources for a get will work for either SINGLE or LOCAL works as written for all synch flags */ static int gasnete_coll_pf_bcast_TreeRVGet(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_broadcast_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, broadcast); gasnete_coll_local_tree_geom_t *geom = data->tree_geom; gex_Rank_t * const children = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); const int child_count = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); int child; int result = 0; switch (data->state) { case 0: // thread barrier if (!gasnete_coll_generic_all_threads(data)) { break; } // Allocation of p2p structure { size_t nstates = (op->team->myrank == args->srcrank) ? 0 : 1; size_t ncounters = 2; size_t ndata = sizeof(void*); data->p2p = gasnete_coll_p2p_get_final(op->team, op->sequence, nstates, ncounters, ndata); data->options |= GASNETE_COLL_GENERIC_OPT_P2P; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Optional IN barrier over the SAME tree */ if ((op->flags & GASNET_COLL_IN_ALLSYNC) && !gasnete_coll_generic_upsync(op, args->srcrank, 0, child_count GASNETI_THREAD_PASS)) { break; } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Data movement */ if (op->team->myrank == args->srcrank) { for(child=0; childsrc, 0, 1 GASNETI_THREAD_PASS); /* broadcast src address to all the children*/ } GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, args->src, args->nbytes); } else if (data->p2p->state[0]) { gasneti_sync_reads(); gasnete_coll_get_nb(data, op->e_tm, args->dst, GASNETE_COLL_TREE_GEOM_PARENT(geom), *(void **)data->p2p->data, args->nbytes GASNETI_THREAD_PASS); } else { break; } data->state = 3; GASNETI_FALLTHROUGH case 3: /* Sync data movement */ if (data->handle != GEX_EVENT_INVALID) { break; } /*the get has finished now send a signal down the tree signalling the ok to get*/ if(op->team->myrank != args->srcrank) { /*if the collective is an out mysync collective then the parent needs to know taht the data transfers have finished send a signal to our parent indicating that the get has finished by advancing counter 1 in the case of out all sync the out barrier takes care of the synchronization */ if(op->flags & GASNET_COLL_OUT_MYSYNC) { gasnete_tm_p2p_advance(op, GASNETE_COLL_TREE_GEOM_PARENT(geom), 0, 1 GASNETI_THREAD_PASS); } for(child=0; childdst, 0, 1 GASNETI_THREAD_PASS); /* broadcast src address to all the children*/ } } data->state = 4; GASNETI_FALLTHROUGH case 4: /*wait for all the children to respond*/ if(op->flags & GASNET_COLL_OUT_MYSYNC) { if (gasneti_weakatomic_read(&(data->p2p->counter[1]), 0) != child_count) { break; } } data->state = 5; GASNETI_FALLTHROUGH case 5: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_bcast_TreeRVGet(gasnet_team_handle_t team, void * dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(flags & GASNET_COLL_OUT_ALLSYNC); gasneti_assert(flags & GASNET_COLL_SRC_IN_SEGMENT); gasneti_assert(flags & GASNET_COLL_DST_IN_SEGMENT); return gasnete_coll_generic_broadcast_nb(team, dst, srcimage, src, nbytes, flags, &gasnete_coll_pf_bcast_TreeRVGet, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, srcimage, team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } // bcast RVous: use AM Mediums to send to addrs provided by each node of a binimial tree */ // Uses GASNETE_COLL_GENERIC_OPT_P2P on all nodes static int gasnete_coll_pf_bcast_RVous(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gex_TM_t const tm = op->e_tm; gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_broadcast_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, broadcast); int result = 0; gex_Flags_t imm_flag = 0; // TODO-EX: pre-compute quantities such as these at injection, // rather than repeatedly upon every poll. gex_Rank_t rel_rank = gasnete_tm_binom_rel_root(tm, args->srcrank); switch (data->state) { case 0: // Thread rendezvous and optional IN barrier if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } // Allocation of p2p structure { gex_Rank_t child_cnt = gasnete_tm_binom_children(tm, rel_rank); size_t nstates = child_cnt; size_t ncounters = 1; size_t ndata = child_cnt * sizeof(struct gasnete_tm_p2p_send_struct); data->p2p = gasnete_coll_p2p_get_final(op->team, op->sequence, nstates, ncounters, ndata); data->options |= GASNETE_COLL_GENERIC_OPT_P2P; } // execute next step w/ IMM flag only on first attempt imm_flag = GEX_FLAG_IMMEDIATE; data->state = 1; GASNETI_FALLTHROUGH case 1: /* Rendevous w/ parent to pass addr */ if (! rel_rank) { GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, args->src, args->nbytes); } else { /* Send our addr to parent */ gex_Rank_t parent = gasnete_tm_binom_parent(tm, rel_rank); gex_Rank_t offset = gasnete_tm_binom_age(tm, rel_rank); if (gasnete_tm_p2p_send_rtr(op, data->p2p, parent, offset, args->dst, args->nbytes, imm_flag GASNETI_THREAD_PASS)) { break; // back pressure } } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Wait for data to arrive, unless root */ if (! rel_rank) { // Nothing to do } else if (gasnete_tm_p2p_send_done(data->p2p)) { gasneti_sync_reads(); } else { /* Not all data has arrived yet */ break; } data->state = 3; GASNETI_FALLTHROUGH case 3: { /* Send data */ // We execute this step w/ IMM flag when the private_data field is NULL. // TODO: we are using an otherwise unused pointer field as a Boolean, // to avoid dynamic allocation, but could/should do something less obscure. imm_flag = data->private_data ? 0 : GEX_FLAG_IMMEDIATE; gex_Rank_t child_cnt = gasnete_tm_binom_children(tm, rel_rank); if (child_cnt) { /* Internal nodes send at most one AM per peer for each poll */ const gex_Rank_t self = gex_TM_QueryRank(tm); const gex_Rank_t size = gex_TM_QuerySize(tm); int idx = child_cnt; int work_remains = 0; int sent = 0; while (idx--) { // Note reverse order for deepest subtree first gex_Rank_t distance = 1 << idx; gex_Rank_t peer = (distance >= size - self) ? self - (size - distance) : self + distance; int status = gasnete_tm_p2p_send_data(op, data->p2p, peer, idx, args->dst, args->nbytes, imm_flag GASNETI_THREAD_PASS); work_remains |= status; sent |= (status == 1); } if (work_remains) { // At least one send_data call indicated some data is still unsent. // If nothing was sent this poll, turn off IMM flag for next poll. // Otherwise, enable IMM flag (even if already enabled). data->private_data = (void*)(uintptr_t)(! sent); break; } } data->state = 4; GASNETI_FALLTHROUGH } case 4: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_bcast_RVous(gasnet_team_handle_t team, void * dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF ((flags & GASNET_COLL_IN_ALLSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF((flags & GASNET_COLL_OUT_ALLSYNC)); return gasnete_coll_generic_broadcast_nb(team, dst, srcimage, src, nbytes, flags, &gasnete_coll_pf_bcast_RVous, options, NULL, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_scatter_nb() */ /* scat RVGet: root node broadcasts address, others get from offsets from that address */ /* Valid for SINGLE and LOCAL, any size */ /* Requires GASNETE_COLL_GENERIC_OPT_P2P on non-root nodes */ static int gasnete_coll_pf_scat_RVGet(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_scatter_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, scatter); int result = 0; switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Initiate data movement */ if (op->team->myrank == args->srcrank) { gasnete_tm_p2p_eager_addr_all(op, args->src, 0, 1, op->team GASNETI_THREAD_PASS); /* broadcast src address */ GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, gasnete_coll_scale_ptr(args->src, op->team->myrank, args->nbytes), args->nbytes); } else if (data->p2p->state[0]) { gasneti_sync_reads(); gasnete_coll_get_nb(data, op->e_tm, args->dst, args->srcrank, gasnete_coll_scale_ptr(*(void **)data->p2p->data, op->team->myrank, args->nbytes), args->nbytes GASNETI_THREAD_PASS); } else { break; } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Sync data movement */ if (data->handle != GEX_EVENT_INVALID) { break; } data->state = 3; GASNETI_FALLTHROUGH case 3: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_scat_RVGet(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, size_t dist, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF (flags & GASNET_COLL_IN_ALLSYNC) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNET_COLL_OUT_NOSYNC)) | GASNETE_COLL_GENERIC_OPT_P2P_IF(!gasnete_coll_image_is_local(team, srcimage)); return gasnete_coll_generic_scatter_nb(team, dst, srcimage, src, nbytes, dist, flags, &gasnete_coll_pf_scat_RVGet, options, NULL, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /* scat RVous: root node uses AM Mediums to send to addrs provided by each node */ /* Requires GASNETE_COLL_GENERIC_OPT_P2P on all nodes */ static int gasnete_coll_pf_scat_RVous(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_scatter_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, scatter); int result = 0; gex_Flags_t imm_flag = 0; switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } imm_flag = GEX_FLAG_IMMEDIATE; // execute next step w/ IMM flag only on first attempt data->state = 1; GASNETI_FALLTHROUGH case 1: /* Rendevous w/ root to pass addr */ if (op->team->myrank == args->srcrank) { GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, gasnete_coll_scale_ptr(args->src, op->team->myrank, args->nbytes), args->nbytes); } else { /* Send our addr to root */ if (gasnete_tm_p2p_send_rtr(op, data->p2p, args->srcrank, op->team->myrank, args->dst, args->nbytes, imm_flag GASNETI_THREAD_PASS)) { break; // back pressure } } imm_flag = GEX_FLAG_IMMEDIATE; // execute next step w/ IMM flag only on first attempt data->state = 2; GASNETI_FALLTHROUGH case 2: if (op->team->myrank == args->srcrank) { /* Root sends at most one AM per peer for each poll */ int work_remains = 0; for (gex_Rank_t i=0; iteam->total_ranks; ++i) { if (i == op->team->myrank) continue; int status = gasnete_tm_p2p_send_data(op, data->p2p, i, i, gasnete_coll_scale_ptr(args->src, i, args->nbytes), args->nbytes, imm_flag GASNETI_THREAD_PASS); work_remains |= status; } if (work_remains) {break;} } else if (gasnete_tm_p2p_send_done(data->p2p)) { gasneti_sync_reads(); } else { /* Not all data has arrived yet */ break; } data->state = 3; GASNETI_FALLTHROUGH case 3: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_scat_RVous(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, size_t dist, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF ((flags & GASNET_COLL_IN_ALLSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF((flags & GASNET_COLL_OUT_ALLSYNC)) | GASNETE_COLL_GENERIC_OPT_P2P; return gasnete_coll_generic_scatter_nb(team, dst, srcimage, src, nbytes, dist, flags, &gasnete_coll_pf_scat_RVous, options, NULL, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_gather_nb() */ /* gath RVPut: root node broadcasts addresses, others put to that address (plus offset) */ /* Valid for SINGLE and LOCAL, any size */ /* Requires GASNETE_COLL_GENERIC_OPT_P2P on non-root nodes */ static int gasnete_coll_pf_gath_RVPut(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_gather_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, gather); int result = 0; switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Initiate data movement */ if (op->team->myrank == args->dstrank) { gasnete_tm_p2p_eager_addr_all(op, args->dst, 0, 1, op->team GASNETI_THREAD_PASS); /* broadcast dst address */ GASNETI_MEMCPY_SAFE_IDENTICAL(gasnete_coll_scale_ptr(args->dst, op->team->myrank, args->nbytes), args->src, args->nbytes); } else if (data->p2p->state[0]) { gasneti_sync_reads(); gasnete_coll_put_nb(data, op->e_tm, args->dstrank, gasnete_coll_scale_ptr(*(void **)data->p2p->data, op->team->myrank, args->nbytes), args->src, args->nbytes GASNETI_THREAD_PASS); } else { break; } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Sync data movement */ if (data->handle != GEX_EVENT_INVALID) { break; } data->state = 3; GASNETI_FALLTHROUGH case 3: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } GASNETE_COLL_DECLARE_GATHER_ALG(RVPut) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF (flags & GASNET_COLL_IN_ALLSYNC) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNET_COLL_OUT_NOSYNC)) | GASNETE_COLL_GENERIC_OPT_P2P_IF(!gasnete_coll_image_is_local(team, dstimage)); return gasnete_coll_generic_gather_nb(team, dstimage, dst, src, nbytes, nbytes, flags, &gasnete_coll_pf_gath_RVPut, options, NULL, sequence,coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /* gath RVous: non-root nodes use AM Mediums to send to addrs provided by root */ /* Requires GASNETE_COLL_GENERIC_OPT_P2P on all nodes */ static int gasnete_coll_pf_gath_RVous(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_gather_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, gather); int result = 0; gex_Flags_t imm_flag = 0; switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } imm_flag = GEX_FLAG_IMMEDIATE; // execute next step w/ IMM flag only on first attempt data->state = 1; GASNETI_FALLTHROUGH case 1: /* Root send addrs */ if (op->team->myrank == args->dstrank) { int done = 1; for (gex_Rank_t i = 0; i < op->team->total_ranks; ++i) { if (i == op->team->myrank) continue; if (data->p2p->state[i]) continue; if (gasnete_tm_p2p_send_rtr(op, data->p2p, i, 0, gasnete_coll_scale_ptr(args->dst, i, args->nbytes), args->nbytes, imm_flag GASNETI_THREAD_PASS)) { done = 0; } else { data->p2p->state[i] = 1; } } if (!done) break; // back pressure from at least one child GASNETI_MEMCPY_SAFE_IDENTICAL(gasnete_coll_scale_ptr(args->dst, op->team->myrank, args->nbytes), args->src, args->nbytes); } imm_flag = GEX_FLAG_IMMEDIATE; // execute next step w/ IMM flag only on first attempt data->state = 2; GASNETI_FALLTHROUGH case 2: if (op->team->myrank != args->dstrank) { /* non-root nodes send at most one AM per poll */ int work_remains = gasnete_tm_p2p_send_data(op, data->p2p, args->dstrank, 0, args->src, args->nbytes, imm_flag GASNETI_THREAD_PASS); if (work_remains) break; } else if (gasnete_tm_p2p_send_done(data->p2p)) { gasneti_sync_reads(); } else { /* Not all data has arrived yet */ break; } data->state = 3; GASNETI_FALLTHROUGH case 3: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } GASNETE_COLL_DECLARE_GATHER_ALG(RVous) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF ((flags & GASNET_COLL_IN_ALLSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF((flags & GASNET_COLL_OUT_ALLSYNC)) | GASNETE_COLL_GENERIC_OPT_P2P; return gasnete_coll_generic_gather_nb(team, dstimage, dst, src, nbytes, dist, flags, &gasnete_coll_pf_gath_RVous, options, NULL, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_gather_all_nb() */ /*---------------------------------------------------------------------------------*/ /* gasnete_coll_exchange_nb() */ static int gasnete_coll_pf_exchg_RVPut(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_exchange_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, exchange); int result = 0; int i; switch(data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* send out all the destination addresses addresses*/ gasnete_tm_p2p_eager_addr_all(op, args->dst, op->team->myrank, 1, op->team GASNETI_THREAD_PASS); data->state = 2; GASNETI_FALLTHROUGH case 2: /*wait for all addresses to arrive*/ for(i=0; iteam->total_ranks; i++) { if(i==op->team->myrank) continue; if(!data->p2p->state[i]) return 0; } data->state = 3; GASNETI_FALLTHROUGH /*if we go to here that means all addresses are ready*/ case 3: /* fire off all the nonblocking puts*/ gasnete_begin_nbi_accessregion(0,1 GASNETI_THREAD_PASS); /*put to the left of me*/ for(i=op->team->myrank+1; iteam->total_ranks; i++) { gasnete_coll_put_nbi(op->e_tm, i, (int8_t*) ((void**)data->p2p->data)[i] + op->team->myrank*args->nbytes, (int8_t*) args->src+i*args->nbytes, args->nbytes GASNETI_THREAD_PASS); } /*put to the right of me*/ for(i=0; iteam->myrank; i++) { gasnete_coll_put_nbi(op->e_tm, i, (int8_t*) ((void**)data->p2p->data)[i] + op->team->myrank*args->nbytes, (int8_t*) args->src+i*args->nbytes, args->nbytes GASNETI_THREAD_PASS); } data->handle = gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); gasnete_coll_save_event(&data->handle); GASNETI_MEMCPY_SAFE_IDENTICAL((int8_t*) args->dst + op->team->myrank*args->nbytes, (int8_t*) args->src+op->team->myrank*args->nbytes, args->nbytes); data->state = 4; GASNETI_FALLTHROUGH case 4: /* sync all the handles for the puts*/ if (op->team->total_ranks > 1 && data->handle != GEX_EVENT_INVALID) { return 0; } data->state = 5; GASNETI_FALLTHROUGH case 5: /*final out barrier*/ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } data->state = 6; GASNETI_FALLTHROUGH case 6: /*done*/ gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_exchg_RVPut(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_P2P | GASNETE_COLL_GENERIC_OPT_INSYNC_IF ((flags & GASNET_COLL_IN_ALLSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNET_COLL_OUT_NOSYNC)); return gasnete_coll_generic_exchange_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_exchg_RVPut, options, NULL, NULL, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ gasnet-2025.8.0/extended-ref/coll/gasnet_autotune_internal.h0000664000175000017500000004055215142313673024205 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_autotune_internal.h $ * Description: GASNet Autotuner Implementation * Copyright 2009, Rajesh Nishtala , Paul H. Hargrove , Dan Bonachea * Terms of use are as specified in license.txt */ /*During the collective initialization process all the algorithms are registered (including those defined by the conduit) with the auto-tuner given the capability requirements of the algorithms (i.e. synch modes, teh size, and whether or not the source and dest are inthe segment) the autotuner can returns a triple of (number of valid algorithms, number of tuning parameters, and the range of each tunign parameter) thus the query functions will return the number */ #ifndef __GASNET_AUTOTUNE_INTERNAL_H__ #define __GASNET_AUTOTUNE_INTERNAL_H__ 1 #define GASNETE_COLL_DEFAULT_TREE_TYPE_STR "KNOMIAL_TREE,2" #define GASNETE_COLL_DEFAULT_DISSEM_LIMIT_PER_THREAD 1024 #include #include typedef gex_Event_t (*gasnete_coll_bcast_fn_ptr_t)(gasnet_team_handle_t team, void * dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG); typedef gex_Event_t (*gasnete_coll_scatter_fn_ptr_t)(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, size_t dist, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG); typedef gex_Event_t (*gasnete_coll_gather_fn_ptr_t)(gasnet_team_handle_t team, gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, size_t dist, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG); typedef gex_Event_t (*gasnete_coll_gather_all_fn_ptr_t)(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG); typedef gex_Event_t (*gasnete_coll_exchange_fn_ptr_t)(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG); typedef gex_Event_t (*untyped_coll_fn_ptr_t)(); typedef union { gasnete_coll_bcast_fn_ptr_t bcast_fn; gasnete_coll_scatter_fn_ptr_t scatter_fn; gasnete_coll_gather_fn_ptr_t gather_fn; gasnete_coll_gather_all_fn_ptr_t gather_all_fn; gasnete_coll_exchange_fn_ptr_t exchange_fn; untyped_coll_fn_ptr_t untyped_fn; } generic_coll_fn_ptr_t; /*returns the implementation of the collectives including all the parameters to the algorithm*/ struct gasnete_coll_implementation_t_{ struct gasnete_coll_implementation_t_ *next; generic_coll_fn_ptr_t fn_ptr; int fn_idx; gasnet_team_handle_t team; gasnet_coll_optype_t optype; uint32_t flags; int num_params; int need_to_free; gasnete_coll_tree_type_t tree_type; uint32_t param_list[GASNET_COLL_NUM_PARAM_TYPES]; /*declare an array that can take all the possible param types*/ }; typedef struct gasnete_coll_autotune_tree_node_t_ { struct gasnete_coll_autotune_tree_node_t_* parent; struct gasnete_coll_autotune_tree_node_t_** children; int num_children; char *field_name; unsigned int field_start; unsigned int field_end; gasnete_coll_implementation_t impl; } gasnete_coll_autotune_tree_node_t; typedef enum {GASNETE_COLL_NONO=0, GASNETE_COLL_NOMY, GASNETE_COLL_NOALL, GASNETE_COLL_MYNO, GASNETE_COLL_MYMY, GASNETE_COLL_MYALL, GASNETE_COLL_ALLNO, GASNETE_COLL_ALLMY, GASNETE_COLL_ALLALL, GASNETE_COLL_NUM_SYNCMODES} gasnete_coll_syncmode_t; typedef enum {GASNETE_COLL_LOCAL_MODE, GASNETE_COLL_NUM_ADDRMODES} gasnete_coll_addr_mode_t; typedef enum { GASNETE_COLL_BROADCAST_TREE_PUT_SCRATCH, GASNETE_COLL_BROADCAST_TREE_PUT_SEG, GASNETE_COLL_BROADCAST_SCATTERALLGATHER, GASNETE_COLL_BROADCAST_TREE_EAGER, GASNETE_COLL_BROADCAST_RVOUS, GASNETE_COLL_BROADCAST_RVGET, GASNETE_COLL_BROADCAST_TREE_RVGET, #ifdef GASNETE_COLL_CONDUIT_BROADCAST_OPS /*check to see if the conduits have defined any new ops*/ GASNETE_COLL_CONDUIT_BROADCAST_OPS , #endif GASNETE_COLL_BROADCAST_NUM_ALGS} gasnete_coll_broadcast_alg_types_t; typedef enum { GASNETE_COLL_SCATTER_TREE_PUT, GASNETE_COLL_SCATTER_TREE_PUT_NO_COPY, GASNETE_COLL_SCATTER_TREE_PUT_SEG, GASNETE_COLL_SCATTER_TREE_EAGER, GASNETE_COLL_SCATTER_EAGER, GASNETE_COLL_SCATTER_RVGET, GASNETE_COLL_SCATTER_RVOUS, #ifdef GASNETE_COLL_CONDUIT_SCATTER_OPS /*check to see if the conduits have defined any new ops*/ GASNETE_COLL_CONDUIT_SCATTER_OPS , #endif GASNETE_COLL_SCATTER_NUM_ALGS} gasnete_coll_scatter_alg_types_t; typedef enum { GASNETE_COLL_GATHER_TREE_PUT, GASNETE_COLL_GATHER_TREE_PUT_NO_COPY, GASNETE_COLL_GATHER_TREE_PUT_SEG, GASNETE_COLL_GATHER_TREE_EAGER, GASNETE_COLL_GATHER_EAGER, GASNETE_COLL_GATHER_RVPUT, GASNETE_COLL_GATHER_RVOUS, #ifdef GASNETE_COLL_CONDUIT_GATHER_OPS GASNETE_COLL_CONDUIT_GATHER_OPS , #endif GASNETE_COLL_GATHER_NUM_ALGS} gasnete_coll_gather_alg_types_t; typedef enum { GASNETE_COLL_GATHER_ALL_DISSEM_EAGER=0, GASNETE_COLL_GATHER_ALL_DISSEM, GASNETE_COLL_GATHER_ALL_FLAT_PUT_EAGER, GASNETE_COLL_GATHER_ALL_GATHBCAST, #ifdef GASNETE_COLL_CONDUIT_GATHER_ALL_OPS GASNETE_COLL_CONDUIT_GATHER_ALL_OPS , #endif GASNETE_COLL_GATHER_ALL_NUM_ALGS} gasnete_coll_gather_all_alg_types_t; typedef enum { GASNETE_COLL_EXCHANGE_DISSEM2=0, GASNETE_COLL_EXCHANGE_DISSEM3, GASNETE_COLL_EXCHANGE_DISSEM4, GASNETE_COLL_EXCHANGE_DISSEM8, GASNETE_COLL_EXCHANGE_FLAT_SCRATCH, GASNETE_COLL_EXCHANGE_RVPUT, GASNETE_COLL_EXCHANGE_GATH, #ifdef GASNETE_COLL_CONDUIT_EXCHANGE_OPS GASNETE_COLL_CONDUIT_EXCHANGE_OPS , #endif GASNETE_COLL_EXCHANGE_NUM_ALGS} gasnete_coll_exchange_alg_types_t; #ifndef GASNET_COLL_MIN_PIPE_SEG_SIZE #define GASNET_COLL_MIN_PIPE_SEG_SIZE 8192 #endif #ifndef GASNET_COLL_MAX_PIPE_SEG_SIZE #define GASNET_COLL_MAX_PIPE_SEG_SIZE gex_AM_LUBRequestLong() #endif /*flags to control how the search space looks like*/ #define GASNET_COLL_TUNING_STRIDE_ADD (1<<0) #define GASNET_COLL_TUNING_STRIDE_MULTIPLY (1<<1) #define GASNET_COLL_TUNING_SIZE_PARAM (1<<2) #define GASNET_COLL_TUNING_TREE_SHAPE (1<<3) struct gasnet_coll_tuning_parameter_t { gasnet_coll_tuning_param_type_t tuning_param; uint32_t start; uint32_t end; uint32_t stride; int flags; }; /* Macro to initialize a 1-element array of gasnet_coll_tuning_parameter_t. * GASNet coding standards prohibit the use of non-const struct initializers (which we may need for start and end members). */ #define GASNETE_COLL_TUNING_PARAMETER(_name,_param,_start,_end,_stride,_flags) \ struct gasnet_coll_tuning_parameter_t _name[1] = \ { { _param,0,0,_stride,_flags } };\ _name[0].start = _start; \ _name[0].end = _end /* no semicolon */ /*contains an entry in the function table*/ typedef struct gasnete_coll_allgorithm_t_ { struct gasnete_coll_allgorithm_t_ *next; /*what kind of op is this*/ gasnet_coll_optype_t optype; /*for what synch flags does this algorithm work*/ uint32_t syncflags; /*what other input flags are required for this algorithm to work*/ /*thus if the input flags and the requirements are anded together and the result is equal to requirements then the collective will work for those flags*/ uint32_t requirements; /*A list of flags (if present) the algorithm will not work for */ uint32_t n_requirements; /*the maximum number of bytes as an argument that this algorithm can handle*/ /*probably will be based on maximum AM lengths or lenghts of largest transfers*/ /* a size of 0 indicates that it will work for all sizes*/ size_t max_num_bytes; /*some algorithms only work above a certain threshold*/ size_t min_num_bytes; /*what are the parameters to the algorithm*/ uint32_t num_parameters; /*set if this is a tree-based algorithm*/ uint32_t tree_alg; struct gasnet_coll_tuning_parameter_t *parameter_list; generic_coll_fn_ptr_t fn_ptr; const char *name_str; } gasnete_coll_algorithm_t; #define GASNETE_COLL_AUTOTUNE_RADIX_ARR_LEN 20 #define GASNETE_COLL_LOG2_AUTOTUNE_MAX_SIZE 20 #define GASNETE_COLL_ALG_INDEX_SIZE (GASNET_COLL_NUM_COLL_OPTYPES*GASNETE_COLL_NUM_SYNCMODES*GASNETE_COLL_NUM_ADDRTYPES*GASNETE_COLL_LOG2_AUTOTUNE_MAX_SIZE) struct gasnete_coll_autotune_index_entry_t_ { struct gasnete_coll_autotune_index_entry_t_ *subtree; struct gasnete_coll_autotune_index_entry_t_ *next_interval; const char* node_type; int start; int end; /*when added to the profiling information the num_calls field will be updated*/ int num_calls; /*when added to the actual index the impl is the relavent field*/ gasnete_coll_implementation_t impl; }; typedef struct gasnete_coll_autotune_index_entry_t_ gasnete_coll_autotune_index_entry_t; struct gasnete_coll_autotune_info_t_ { gasnete_coll_tree_type_t bcast_tree_type; gasnete_coll_tree_type_t scatter_tree_type; gasnete_coll_tree_type_t gather_tree_type; size_t gather_all_dissem_limit; size_t exchange_dissem_limit; int exchange_dissem_radix; size_t pipe_seg_size; int warm_iters; int perf_iters; int allow_flat_tree; /*array index i tells you what the tree fanout should be for 2^(i-1) < nbytes <= 2^(i) bytes*/ int bcast_tree_radix_limits[GASNETE_COLL_AUTOTUNE_RADIX_ARR_LEN]; gasnete_coll_algorithm_t *collective_algorithms[GASNET_COLL_NUM_COLL_OPTYPES]; gasnete_coll_autotune_index_entry_t *autotuner_defaults; gasnete_coll_autotune_index_entry_t *collective_profile; gasnete_coll_team_t team; int search_enabled; int profile_enabled; }; gasnete_coll_autotune_info_t* gasnete_coll_autotune_init(gasnet_team_handle_t team GASNETI_THREAD_FARG); void gasnete_coll_autotune_free(gasnet_team_handle_t team); /*testing functions*/ gasnete_coll_tree_type_t gasnete_coll_autotune_get_tree_type(gasnete_coll_autotune_info_t* autotune_info, gasnet_coll_optype_t op_type, gex_Rank_t root, size_t nbytes, int flags); #ifdef GASNETE_COLL_CONDUIT_COLLECTIVES void gasnete_coll_register_conduit_collectives(gasnete_coll_autotune_info_t* info); #endif gasnete_coll_algorithm_t gasnete_coll_autotune_register_algorithm(gasnet_team_handle_t team, gasnet_coll_optype_t optype, uint32_t syncflags, uint32_t requirements, uint32_t n_requirements, size_t max_size, size_t min_size, uint32_t tree_alg, uint32_t num_params, struct gasnet_coll_tuning_parameter_t *param_list, generic_coll_fn_ptr_t coll_fnptr, const char *name_str); // The following family of macros avoids casts among function pointer types. // See bug 4787 for motivation. #define gasnete_coll_autotune_register_generic_algorithm(optype_upper, optype_lower, \ info, index, syncflags, requirements, \ n_requirements, max_size, min_size, \ tree_alg, num_params, param_list, \ coll_fnptr, name_str) \ do { \ gasneti_assert((unsigned int)index < GASNETE_COLL_##optype_upper##_NUM_ALGS); \ generic_coll_fn_ptr_t generic_coll_fn_ptr; \ generic_coll_fn_ptr.optype_lower##_fn = coll_fnptr; \ info->collective_algorithms[GASNET_COLL_##optype_upper##_OP][index] = \ gasnete_coll_autotune_register_algorithm(info->team, GASNET_COLL_##optype_upper##_OP, \ syncflags, requirements, \ n_requirements, max_size, min_size, \ tree_alg, num_params, param_list, \ generic_coll_fn_ptr, name_str); \ } while (0) #define gasnete_coll_autotune_register_broadcast_algorithm(...) \ gasnete_coll_autotune_register_generic_algorithm(BROADCAST, bcast, __VA_ARGS__) #define gasnete_coll_autotune_register_scatter_algorithm(...) \ gasnete_coll_autotune_register_generic_algorithm(SCATTER, scatter, __VA_ARGS__) #define gasnete_coll_autotune_register_gather_algorithm(...) \ gasnete_coll_autotune_register_generic_algorithm(GATHER, gather, __VA_ARGS__) #define gasnete_coll_autotune_register_gather_all_algorithm(...) \ gasnete_coll_autotune_register_generic_algorithm(GATHER_ALL, gather_all, __VA_ARGS__) #define gasnete_coll_autotune_register_exchange_algorithm(...) \ gasnete_coll_autotune_register_generic_algorithm(EXCHANGE, exchange, __VA_ARGS__) size_t gasnete_coll_get_dissem_limit(gasnete_coll_autotune_info_t* autotune_info, gasnet_coll_optype_t op_type, int flags); size_t gasnete_coll_get_pipe_seg_size(gasnete_coll_autotune_info_t* autotune_info, gasnet_coll_optype_t op_type, int flags); int gasnete_coll_get_dissem_radix(gasnete_coll_autotune_info_t* autotune_info, gasnet_coll_optype_t op_type, int flags); gasnete_coll_implementation_t gasnete_coll_autotune_get_bcast_algorithm(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, uint32_t flags GASNETI_THREAD_FARG); gasnete_coll_implementation_t gasnete_coll_autotune_get_scatter_algorithm(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, size_t dist, uint32_t flags GASNETI_THREAD_FARG); gasnete_coll_implementation_t gasnete_coll_autotune_get_gather_algorithm(gasnet_team_handle_t team,gasnet_image_t dstimage, void *dst, void *src, size_t nbytes, size_t dist, uint32_t flags GASNETI_THREAD_FARG); gasnete_coll_implementation_t gasnete_coll_autotune_get_gather_all_algorithm(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, uint32_t flags GASNETI_THREAD_FARG); gasnete_coll_implementation_t gasnete_coll_autotune_get_exchange_algorithm(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, uint32_t flags GASNETI_THREAD_FARG); gasnete_coll_implementation_t gasnete_coll_lookup_implementation(gasnete_coll_autotune_info_t* autotune_info, gasnet_coll_optype_t optype, gasnete_coll_syncmode_t syncmode, gasnete_coll_addr_mode_t, size_t nbytes); gasnete_coll_autotune_index_entry_t *gasnete_coll_load_autotuner_defaults(gasnete_coll_autotune_info_t* autotune_info, myxml_node_t *tuning_data); gasnete_coll_implementation_t gasnete_coll_get_implementation(void); void gasnete_coll_free_implementation(gasnete_coll_implementation_t in); void gasnete_coll_implementation_print(gasnete_coll_implementation_t impl, FILE *fp); #endif gasnet-2025.8.0/extended-ref/coll/gasnet_reduce.c0000664000175000017500000013350015142313673021703 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_reduce.c $ * Description: Reference implemetation of GASNet-EX Reductions * Copyright (c) 2018 The Regents of the University of California. * Terms of use are as specified in license.txt */ #include #include #include #include /*---------------------------------------------------------------------------------*/ // TODO-EX: factor the following, which is common to Reduce and Atomics // // Macro for applying a 1-argument macro (FN) to each datatype // // Since the GEX_DT_* tokens are macros, they cannot safely be used as arguments. // Instead a family of _gex_dt_* tokens are used, which can be mapped to // several related tokens via concatenation to generate one of the macros // which immediately follow. #define GASNETE_DT_APPLY(FN) \ FN(_gex_dt_I32) FN(_gex_dt_U32) \ FN(_gex_dt_I64) FN(_gex_dt_U64) \ FN(_gex_dt_FLT) FN(_gex_dt_DBL) // #define _gex_dt_I32_isint 1 #define _gex_dt_U32_isint 1 #define _gex_dt_I64_isint 1 #define _gex_dt_U64_isint 1 #define _gex_dt_FLT_isint 0 #define _gex_dt_DBL_isint 0 // #define _gex_dt_I32_type int32_t #define _gex_dt_U32_type uint32_t #define _gex_dt_I64_type int64_t #define _gex_dt_U64_type uint64_t #define _gex_dt_FLT_type float #define _gex_dt_DBL_type double // #define _gex_dt_I32_dtype GEX_DT_I32 #define _gex_dt_U32_dtype GEX_DT_U32 #define _gex_dt_I64_dtype GEX_DT_I64 #define _gex_dt_U64_dtype GEX_DT_U64 #define _gex_dt_FLT_dtype GEX_DT_FLT #define _gex_dt_DBL_dtype GEX_DT_DBL /*---------------------------------------------------------------------------------*/ // Macros for built-in opcodes: #define GASNETE_REDUCE_OP_ADD(a,b) (a + b) #define GASNETE_REDUCE_OP_MULT(a,b) (a * b) #define GASNETE_REDUCE_OP_AND(a,b) (a & b) #define GASNETE_REDUCE_OP_OR(a,b) (a | b) #define GASNETE_REDUCE_OP_XOR(a,b) (a ^ b) #define GASNETE_REDUCE_OP_MIN(a,b) MIN(a, b) #define GASNETE_REDUCE_OP_MAX(a,b) MAX(a, b) // GASNETE_REDUCE_OP_APPLY(dtcode,FN) // // This macro expands to // FN(dtcode,opname) // repeated for all reduce op valid for dtcode. // opname is the portion following 'GEX_OP_'. #define GASNETE_REDUCE_OP_APPLY(dtcode,FN) \ _GASNETE_REDUCE_OP_APPLY1(dtcode,dtcode##_isint,FN) // This extra pass expands the "isint" token prior to additional concatenation #define _GASNETE_REDUCE_OP_APPLY1(dtcode,isint,FN) \ _GASNETE_REDUCE_OP_APPLY2(dtcode,isint,FN) #define _GASNETE_REDUCE_OP_APPLY2(dtcode,isint,FN) \ FN(dtcode,ADD) FN(dtcode,MULT) FN(dtcode,MIN) FN(dtcode,MAX) \ GASNETE_REDUCE_OP_APPLY_INT##isint(dtcode,FN) #define GASNETE_REDUCE_OP_APPLY_INT0(dtcode,FN) /*empty*/ #define GASNETE_REDUCE_OP_APPLY_INT1(dtcode,FN) \ FN(dtcode,AND) FN(dtcode,OR) FN(dtcode,XOR) /*---------------------------------------------------------------------------------*/ // "Shrink ray" - reduces its targets // // TODO-EX: replace this switch-intensive implementation. // The cringe-worthy name is intended to encourage a short lifetime. #define GASNETE_SHRINKRAY_CASE(dtcode,opname) \ case GEX_OP_##opname: \ for (size_t i = 0; i < count; ++i) { \ y[i] = GASNETE_REDUCE_OP_##opname(x[i], y[i]); \ } \ break; #define GASNETE_SHRINKRAY_DEFN(dtcode) \ void gasnete_shrinkray##dtcode ( \ const void * op1, \ void * op2_and_out, \ size_t count, \ const void * cdata) \ { \ const gex_OP_t opcode = (gex_OP_t)(uintptr_t)cdata; \ const dtcode##_type * GASNETI_RESTRICT x = op1; \ dtcode##_type * GASNETI_RESTRICT y = op2_and_out; \ switch (opcode) { \ GASNETE_REDUCE_OP_APPLY(dtcode, GASNETE_SHRINKRAY_CASE) \ default: gasneti_unreachable(); \ } \ } GASNETE_DT_APPLY(GASNETE_SHRINKRAY_DEFN) #undef GASNETE_SHRINKRAY_CASE #undef GASNETE_SHRINKRAY_DEFN /*---------------------------------------------------------------------------------*/ // TODO-EX: can perform fewer (log(child_cnt)) calls w/ longer counts GASNETI_INLINE(local_reduce_helper) void *local_reduce_helper( const gasnete_tm_reduce_args_t *args, size_t dt_cnt, size_t stride, gex_Rank_t child_cnt, const void *src, void *buffer) { gex_Coll_ReduceFn_t const op_fnptr = args->op_fnptr; void * const op_cdata = args->op_cdata; const void *prev = src; void *curr = buffer; for (gex_Rank_t r = 0; r < child_cnt; ++r) { (*op_fnptr)(prev, curr, dt_cnt, op_cdata); prev = curr; curr = (void*)(stride + (uintptr_t)curr); } gasneti_assert(!child_cnt || prev == gasnete_coll_scale_ptr(buffer, child_cnt-1, stride)); return (/*non const*/ void*)prev; } /*---------------------------------------------------------------------------------*/ // GEX Reduce-to-one via Eager messages on a binomial tree // Performs Reduce-to-all when (root == GEX_RANK_INVALID) static int gasnete_coll_pf_tm_reduce_BinomialEager(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gex_TM_t const tm = op->e_tm; gasnete_coll_generic_data_t *data = op->data; const gasnete_tm_reduce_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, tm_reduce); gasnete_coll_p2p_t *p2p = data->p2p; gex_Flags_t flags = 0; void *payload; int result = 0; // TODO-EX: pre-compute quantities such as these and (dt_sz*dt_cnt) once // at injection, rather than repeatedly upon every poll. // TODO_EX: for ReduceToAll case tree_root could vary to spread load gex_Rank_t tree_root = (args->root == GEX_RANK_INVALID) ? 0 : args->root; gex_Rank_t rel_rank = gasnete_tm_binom_rel_root(tm, tree_root); gex_Rank_t child_cnt = gasnete_tm_binom_children(tm, rel_rank); switch (data->state) { case 0: { // Local/explicit allocation of p2p fields deferred to just prior to first use. // for reduce-to-all case, leaves need 1 state and space to receive the bcast (but otherwise nothing) size_t effective_child_cnt = child_cnt ? child_cnt : (args->root == GEX_RANK_INVALID); size_t nstates = effective_child_cnt; size_t ndata = args->dt_sz * args->dt_cnt * effective_child_cnt; data->p2p = gasnete_coll_p2p_get_final(op->team, op->sequence, nstates, 0, ndata); data->options |= GASNETE_COLL_GENERIC_OPT_P2P; p2p = data->p2p; data->state = 1; GASNETI_FALLTHROUGH } case 1: { // Wait for arrival of data from children, if any volatile uint32_t *state = p2p->state; for (gex_Rank_t r = 0; r < child_cnt; ++r) { if (! state[r]) return 0; // At least one child has not contributed their value } gasneti_sync_reads(); data->state = 2; GASNETI_FALLTHROUGH } case 2: { const size_t nbytes = args->dt_sz * args->dt_cnt; // TODO-EX: compute *once* // Compute reduction (if any) if (child_cnt) { payload = local_reduce_helper(args, args->dt_cnt, nbytes, child_cnt, args->src, p2p->data); } else { payload = (/*non-const*/ void*) args->src; } // Data movement, either local or first try to parent if (! rel_rank) { // I am root GASNETI_MEMCPY(args->dst, payload, nbytes); data->state = 3; goto reduce_done; } flags = GEX_FLAG_IMMEDIATE; data->private_data = payload; data->state = 3; GASNETI_FALLTHROUGH } case 3: { // Data movement to parent (IMM on first try only) const size_t nbytes = args->dt_sz * args->dt_cnt; gex_Rank_t parent = gasnete_tm_binom_parent(tm, rel_rank); gex_Rank_t offset = gasnete_tm_binom_age(tm, rel_rank); payload = data->private_data; // TODO-EX: use lc_opt for async injection if (gasnete_tm_p2p_eager_put(op, parent, payload, nbytes, GEX_EVENT_NOW, flags, offset, 1 GASNETI_THREAD_PASS)) { break; // back pressure } } reduce_done: // ReduceToOne case is done. // ReduceToAll proceeds to broadcast if (args->root != GEX_RANK_INVALID) goto done; data->state = 4; GASNETI_FALLTHROUGH case 4: { // For ReduceToAll case, broadcast down same binomial tree const size_t nbytes = args->dt_sz * args->dt_cnt; if (rel_rank) { // Wait for arrival of data from parent (if any) if (p2p->state[0] != 2) return 0; gasneti_sync_reads(); GASNETI_MEMCPY(args->dst, p2p->data, nbytes); } if (child_cnt) { // Send to children (if any) const gex_Rank_t size = gex_TM_QuerySize(tm); for (int idx = child_cnt - 1; idx >= 0; --idx) { // Reverse order for deepest subtree first gex_Rank_t distance = 1 << idx; gex_Rank_t peer = (distance >= size - rel_rank) ? rel_rank - (size - distance) : rel_rank + distance; // TODO-EX: IMM injection // TODO-EX: use lc_opt for async injection gasnete_tm_p2p_eager_put(op, peer, args->dst, nbytes, GEX_EVENT_NOW, /*flags*/0, /*offset*/0, /*state*/2 GASNETI_THREAD_PASS); } } } done: // Done gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); break; default: gasneti_unreachable(); } // end switch return result; } GASNETE_TM_DECLARE_REDUCE_ALG(BinomialEager) { #if GASNET_DEBUG // make sure this is a valid choice of algorithm gex_Rank_t tree_root = (root == GEX_RANK_INVALID) ? 0 : root; gex_Rank_t rel_rank = gasnete_tm_binom_rel_root(tm, tree_root); gex_Rank_t child_cnt = gasnete_tm_binom_children(tm, rel_rank); gasnet_team_handle_t team = gasneti_import_tm_nonpair(tm)->_coll_team; gasneti_assert(team->p2p_eager_buffersz >= dt_sz * dt_cnt * child_cnt); gasneti_assert(gex_AM_LUBRequestMedium() >= dt_sz * dt_cnt ); #endif return gasnete_tm_generic_reduce_nb(tm, root, dst, src, dt, dt_sz, dt_cnt, op, op_fnptr, op_cdata, coll_flags, &gasnete_coll_pf_tm_reduce_BinomialEager, 0, NULL, sequence, 0, NULL, NULL GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ // GEX Reduce-to-one via Eager messages on a binomial tree - SEGMENTED // Multiple rounds, each processing as many elements as possible // Performs Reduce-to-all when (root == GEX_RANK_INVALID) static int gasnete_coll_pf_tm_reduce_BinomialEagerSeg(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gex_TM_t const tm = op->e_tm; gasnete_coll_generic_data_t *data = op->data; const gasnete_tm_reduce_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, tm_reduce); gasnete_coll_p2p_t *p2p = data->p2p; gex_Flags_t flags = 0; int result = 0; struct pdata { void * payload; size_t chunk_cnt; // elems size_t chunk_len; // bytes size_t curr_cnt; // elems size_t curr_len; // bytes size_t offset; // bytes size_t remain; // elems in reduction, bytes in broadcast (if any) gex_Rank_t width; gex_Rank_t rel_rank; gex_Rank_t child_cnt; gex_Rank_t parent; gex_Rank_t age; int phase; int last; } *pdata; if (data->state) { pdata = data->private_data; } else { // Allocate and initialize pdata gasneti_assert(!data->private_data); pdata = gasneti_calloc(1, sizeof(struct pdata)); data->private_data = pdata; // TODO_EX: for ReduceToAll case tree_root could vary to spread load gex_Rank_t tree_root = (args->root == GEX_RANK_INVALID) ? 0 : args->root; pdata->rel_rank = gasnete_tm_binom_rel_root(tm, tree_root); pdata->child_cnt = gasnete_tm_binom_children(tm, pdata->rel_rank); pdata->parent = gasnete_tm_binom_parent(tm, pdata->rel_rank); pdata->age = gasnete_tm_binom_age(tm, pdata->rel_rank); pdata->width = 1 + gasnete_coll_log2_rank(gasneti_import_tm_nonpair(tm)->_size - 1); pdata->chunk_cnt = MIN(op->team->p2p_eager_buffersz / pdata->width, gex_AM_LUBRequestMedium()) / args->dt_sz; pdata->chunk_len = pdata->chunk_cnt * args->dt_sz; pdata->curr_cnt = pdata->chunk_cnt; pdata->curr_len = pdata->chunk_len; pdata->remain = args->dt_cnt; pdata->phase = 1; if (!pdata->rel_rank) { // check if we should be using non-segmented version gasneti_assert_uint(pdata->chunk_cnt ,<, args->dt_cnt); } gasneti_assert(pdata->chunk_cnt != 0); gasneti_assert(pdata->offset == 0); gasneti_assert(pdata->last == 0); // Local/explicit allocation of p2p fields deferred to first run of PF. gasneti_assert_uint(pdata->width ,>=, pdata->child_cnt); size_t nstates = pdata->width + 1; size_t ndata = pdata->chunk_len * pdata->child_cnt; if (args->root == GEX_RANK_INVALID) { // final bcast payload may be larger than that of the reduction size_t bcast_chunk_len = MIN(op->team->p2p_eager_buffersz, gex_AM_LUBRequestMedium()); bcast_chunk_len = MIN(bcast_chunk_len, args->dt_sz * args->dt_cnt); ndata = MAX(ndata, bcast_chunk_len); } data->p2p = gasnete_coll_p2p_get_final(op->team, op->sequence, nstates, 0, ndata); data->options |= GASNETE_COLL_GENERIC_OPT_P2P; p2p = data->p2p; p2p->state[pdata->width] = 1; // Initial CTS data->state = 1; } gasneti_assert(p2p != NULL); gasneti_assert(p2p->state != NULL); gasneti_assert(p2p->data != NULL || (!pdata->child_cnt && (args->root != GEX_RANK_INVALID))); switch (data->state) { // case 0: pdata allocation/initialization, above case 1: { // Wait for arrival of data from children, if any const int ready = pdata->phase; volatile uint32_t *state = p2p->state; for (gex_Rank_t r = 0; r < pdata->child_cnt; ++r) { if (state[r] != ready) return 0; // At least one child has not contributed their value } gasneti_sync_reads(); pdata->last = (pdata->remain <= pdata->chunk_cnt); if (pdata->last) { pdata->curr_cnt = pdata->remain; pdata->curr_len = pdata->remain * args->dt_sz; } data->state = 2; GASNETI_FALLTHROUGH } case 2: { // Compute reduction (if any) const void *src = (const void *)(pdata->offset + (uintptr_t)args->src); if (pdata->child_cnt) { pdata->payload = local_reduce_helper(args, pdata->curr_cnt, pdata->curr_len, pdata->child_cnt, src, p2p->data); } else { pdata->payload = (/*non-const*/ void*) src; } data->state = 3; GASNETI_FALLTHROUGH } case 3: if (! pdata->rel_rank) { // I am root void *dst = (void *)(pdata->offset + (uintptr_t)args->dst); GASNETI_MEMCPY(dst, pdata->payload, pdata->curr_len); } else { // Stall for parent's clear-to-send if (p2p->state[pdata->width] != pdata->phase) break; } flags |= GEX_FLAG_IMMEDIATE; // We fall through to the first attempt at comms data->state = 4; GASNETI_FALLTHROUGH case 4: { // Send partial result to parent (if any) if (pdata->rel_rank) { // NOT root if (gasnete_tm_p2p_eager_put(op, pdata->parent, pdata->payload, pdata->curr_len, GEX_EVENT_NOW, flags, pdata->age, pdata->phase GASNETI_THREAD_PASS)) { break; // back pressure } } int comms_done = 1; // Send CTS message to children (if any) unless at end if (pdata->child_cnt && !pdata->last) { volatile uint32_t *state = p2p->state; const gex_Rank_t self = gex_TM_QueryRank(tm); const gex_Rank_t size = gex_TM_QuerySize(tm); int next_phase = pdata->phase ^ 1; for (int idx = pdata->child_cnt - 1; idx >= 0; --idx) { // Reverse order for deepest subtree first gex_Rank_t distance = 1 << idx; gex_Rank_t peer = (distance >= size - self) ? self - (size - distance) : self + distance; if (gasnete_tm_p2p_change_state(op, peer, flags, pdata->width, next_phase GASNETI_THREAD_PASS)) { state[idx] = 2; // mark for retry comms_done = 0; } } } if (comms_done) goto comms_done; // Skip non-IMM comms // Yield. Control will resume at non-IMMEDIATE comms gasneti_assert(! result); data->state = 5; break; } case 5: // Second try (NON immediate) to send CTS to any children gasneti_assert(! (flags & GEX_FLAG_IMMEDIATE)); if (pdata->child_cnt && !pdata->last) { volatile uint32_t *state = p2p->state; const gex_Rank_t self = gex_TM_QueryRank(tm); const gex_Rank_t size = gex_TM_QuerySize(tm); int next_phase = pdata->phase ^ 1; for (int idx = pdata->child_cnt - 1; idx >= 0; --idx) { // Reverse order for deepest subtree first gex_Rank_t distance = 1 << idx; gex_Rank_t peer = (distance >= size - self) ? self - (size - distance) : self + distance; if (state[idx] == 2) { gasnete_tm_p2p_change_state(op, peer, flags, pdata->width, next_phase GASNETI_THREAD_PASS); } } } comms_done: // Comms are done, reduction might be too if (pdata->last) { // ReduceToOne case is done. if (args->root != GEX_RANK_INVALID) goto done; // ReduceToAll proceeds to broadcast goto reduce_done; } // Advance phase, offset and remain for next iter pdata->phase ^= 1; pdata->offset += pdata->curr_len; pdata->remain -= pdata->curr_cnt; gasneti_assert(pdata->remain); // Yield. Control will resume at next iteration. gasneti_assert(! result); data->state = 1; break; reduce_done: // For ReduceToAll case, setup a segmented broadcast down the same // binomial tree, but using a distinct (normally larger) chunk size. // TODO-EX: use IMM in this broadcast, and maybe lc_opt? pdata->phase = 4; // now alternate between 4 and 5 (0,1,2 used previously) pdata->offset = 0; pdata->remain = args->dt_sz * args->dt_cnt; pdata->chunk_len = MIN(op->team->p2p_eager_buffersz, gex_AM_LUBRequestMedium()); data->state = 6; GASNETI_FALLTHROUGH case 6: { void *dst = (void *)(pdata->offset + (uintptr_t)args->dst); const int ready = pdata->phase; pdata->last = (pdata->remain <= pdata->chunk_len); if (pdata->last) { pdata->chunk_len = pdata->remain; } if (pdata->rel_rank) { // Wait for arrival of data from parent (if any) if (p2p->state[pdata->width] != ready) return 0; gasneti_sync_reads(); GASNETI_MEMCPY(dst, p2p->data, pdata->chunk_len); // Acknowledge parent (CTS) if there is a next round if (! pdata->last) { gasnete_tm_p2p_change_state(op, pdata->parent, /*flags*/0, gasnete_tm_binom_age(tm, pdata->rel_rank), ready GASNETI_THREAD_PASS); } } if (pdata->child_cnt) { // Send to children (if any) const gex_Rank_t size = gex_TM_QuerySize(tm); const gex_Rank_t child_cnt = pdata->child_cnt; const gex_Rank_t rel_rank = pdata->rel_rank; for (int idx = child_cnt - 1; idx >= 0; --idx) { // Reverse order for deepest subtree first gex_Rank_t distance = 1 << idx; gex_Rank_t peer = (distance >= size - rel_rank) ? rel_rank - (size - distance) : rel_rank + distance; // Deliver to p2p->data space W/O an offset, but set a state[i] for non-zero i: // count=1, offset=i, elem_size=0 gasneti_assert_zeroret( gex_AM_RequestMedium6(tm, peer, gasneti_handleridx(gasnete_coll_p2p_med_reqh), dst, pdata->chunk_len, GEX_EVENT_NOW, /*flags*/0, op->team->team_id, op->sequence, /*count*/1, /*offset*/pdata->width, /*state*/ready, /*elem_size*/0)); } } if (pdata->last) { goto done; } data->state = 7; GASNETI_FALLTHROUGH } case 7: if (pdata->child_cnt) { // Stall for CTS const int ready = pdata->phase; for (gex_Rank_t r = 0; r < pdata->child_cnt; ++r) { if (p2p->state[r] != ready) return 0; // At least one child has not acknowledged } } // Advance phase, offset and remain for next iter pdata->phase ^= 1; pdata->offset += pdata->chunk_len; pdata->remain -= pdata->chunk_len; gasneti_assert(pdata->remain); // Yield. Control will resume at next iteration. gasneti_assert(! result); data->state = 6; break; done: // Done gasneti_free(pdata); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); break; default: gasneti_unreachable_error(("Unknown state: %i",(int)data->state)); } // end switch return result; } GASNETE_TM_DECLARE_REDUCE_ALG(BinomialEagerSeg) { #if GASNET_DEBUG // make sure this is a valid choice of algorithm gex_Rank_t tree_root = (root == GEX_RANK_INVALID) ? 0 : root; gex_Rank_t rel_rank = gasnete_tm_binom_rel_root(tm, tree_root); gex_Rank_t child_cnt = gasnete_tm_binom_children(tm, rel_rank); gasnet_team_handle_t team = gasneti_import_tm_nonpair(tm)->_coll_team; gasneti_assert(team->p2p_eager_buffersz >= dt_sz * child_cnt); gasneti_assert(gex_AM_LUBRequestMedium() >= dt_sz); #endif return gasnete_tm_generic_reduce_nb(tm, root, dst, src, dt, dt_sz, dt_cnt, op, op_fnptr, op_cdata, coll_flags, &gasnete_coll_pf_tm_reduce_BinomialEagerSeg, 0, NULL, sequence, 0, NULL, NULL GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ // GEX Reduce-to-one via Long AMs into scratch space on a tree // Does NOT implement Reduce-to-all when (root == GEX_RANK_INVALID) static int gasnete_coll_pf_tm_reduce_TreePut(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gex_TM_t const tm = op->e_tm; gasnete_coll_generic_data_t *data = op->data; const gasnete_tm_reduce_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, tm_reduce); gasnete_coll_p2p_t *p2p = data->p2p; gex_Flags_t flags = 0; // TODO-EX: GEX_FLAG_SELF_SEG_SOME (scratch resides in client or aux seg) void *payload; int result = 0; gasnete_coll_team_t team = op->team; gasnete_coll_local_tree_geom_t *geom = data->tree_geom; const gex_Rank_t child_cnt = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); const gex_Rank_t myrank = gex_TM_QueryRank(tm); switch (data->state) { case 0: // Wait for scratch allocation if (!gasnete_coll_scratch_alloc_nb(op GASNETI_THREAD_PASS)) { break; } // Local/explicit allocation of p2p fields deferred to just prior to first use. data->p2p = gasnete_coll_p2p_get_final(op->team, op->sequence, child_cnt, 0, 0); data->options |= GASNETE_COLL_GENERIC_OPT_P2P; p2p = data->p2p; data->state = 1; GASNETI_FALLTHROUGH case 1: { // Wait for arrival of data from children, if any volatile uint32_t *state = p2p->state; for (gex_Rank_t r = 0; r < child_cnt; ++r) { if (! state[r]) return 0; // At least one child has not contributed their value } gasneti_sync_reads(); data->state = 2; GASNETI_FALLTHROUGH } case 2: { const size_t nbytes = args->dt_sz * args->dt_cnt; // TODO-EX: compute *once* // Compute reduction (if any) if (child_cnt) { void *myscratch = gasnete_coll_scratch_myaddr(op, 0); payload = local_reduce_helper(args, args->dt_cnt, nbytes, child_cnt, args->src, myscratch); } else { payload = (/*non-const*/ void*) args->src; } // Data movement, either local or first try to parent if (myrank == args->root) { GASNETI_MEMCPY(args->dst, payload, nbytes); goto done; } flags |= GEX_FLAG_IMMEDIATE; data->private_data = payload; data->state = 3; GASNETI_FALLTHROUGH } case 3: { // Data movement to parent (IMM on first try only) const size_t nbytes = args->dt_sz * args->dt_cnt; // TODO: compute *once* const gex_Rank_t parent = GASNETE_COLL_TREE_GEOM_PARENT(geom); const gex_Rank_t offset = GASNETE_COLL_TREE_GEOM_SIBLING_ID(geom); void* parent_scratch = gasnete_coll_scratch_addr(op, parent, 0, 0); void* destaddr = gasnete_coll_scale_ptr(parent_scratch, offset, nbytes); payload = data->private_data; // TODO-EX: use lc_opt for async injection if (gasnete_tm_p2p_signalling_put(op, parent, destaddr, payload, nbytes, GEX_EVENT_NOW, flags, offset, 1 GASNETI_THREAD_PASS)) { break; // back pressure } } done: // Done gasnete_coll_free_scratch(op); gasnete_coll_generic_free(team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); break; default: gasneti_unreachable(); } // end switch return result; } GASNETE_TM_DECLARE_REDUCE_ALG(TreePut) { const size_t nbytes = dt_sz * dt_cnt; // TODO-EX: compute this only *once* gasnet_team_handle_t team = gasneti_import_tm_nonpair(tm)->_coll_team; gasneti_assert(coll_params); gasnete_coll_local_tree_geom_t *geom = (gasnete_coll_local_tree_geom_t *)coll_params; // make sure this is a valid choice of algorithm gasneti_assert(root != GEX_RANK_INVALID); gasneti_assert(team->scratch_size >= nbytes * geom->max_radix); gasneti_assert(gex_AM_LUBRequestLong() >= nbytes); // Scratch space gasnete_coll_scratch_req_t *scratch_req = gasnete_coll_scratch_alloc_req(team); // fill out the tree information scratch_req->tree_type = geom->tree_type; scratch_req->tree_dir = GASNETE_COLL_UP_TREE; scratch_req->root = root; scratch_req->op_type = GASNETE_COLL_TREE_OP; // fill out the peer information // in: recv 'nbytes' from each child // out: self and siblings each send 'nbytes' to parent scratch_req->incoming_size = nbytes * GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); scratch_req->num_in_peers = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); scratch_req->in_peers = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); if (team->myrank == root) { scratch_req->num_out_peers = 0; scratch_req->out_peers = NULL; scratch_req->out_sizes = NULL; } else { scratch_req->num_out_peers = 1; gasnete_coll_scratch_alloc_out_sizes(scratch_req, 1); scratch_req->out_sizes[0] = nbytes * geom->num_siblings; scratch_req->out_peers = &(GASNETE_COLL_TREE_GEOM_PARENT(geom)); } const int options = GASNETE_COLL_USE_SCRATCH; return gasnete_tm_generic_reduce_nb(tm, root, dst, src, dt, dt_sz, dt_cnt, op, op_fnptr, op_cdata, coll_flags, &gasnete_coll_pf_tm_reduce_TreePut, options, geom, sequence, 0, NULL, scratch_req GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ // GEX Reduce-to-one via Long AMs into scratch space on a tree - SEGMENTED // Multiple rounds, each processing as many elements as possible // Performs Reduce-to-all when (root == GEX_RANK_INVALID) // // Sketch of algorithm: // Each iteration reduces chunk_cnt elements, with data transmitted up a tree // to buffers in the scratch space using Longs to signal arrivals. To help // avoid stalling the pipeline, the send of data up the tree is done with // lc_opt = &ev. However, to avoid making a copy, this asynchrony ties up a // buffer that would otherwise be the target of incoming data from the last // child (where the local reduce "lands"). Therefore, we have allocated // scratch space for one more buffer than we have children, and use it to // "double buffer" the contribution of the last child (alternating between use // of the last two buffers). This wrinkle is hidden somewhat in the // flow-control, which sends a clear-to-send message from the parent to child // which names the slot the next Long should target. // // state[] used for flow-control: // state[0] holds clear-to-send from our parent, if any // GEX_RANK_INVALID marks the not-ready state // otherwise holds the offset (in units of chunk_len) to Put to // state[i] for (i > 0) is arrival indication from child i-1 // value (phase^1) indicates ready state // value 2 used to mark children which have not been sent CTS // // All comms are attempted once with GEX_FLAG_IMMEDIATE. static int gasnete_coll_pf_tm_reduce_TreePutSeg(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_tm_reduce_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, tm_reduce); gasnete_coll_p2p_t *p2p = data->p2p; gex_Flags_t flags = 0; // TODO-EX: GEX_FLAG_SELF_SEG_SOME (scratch resides in client or aux seg) int result = 0; gasneti_assert(op->scratch_req); gasnete_coll_local_tree_geom_t *geom = data->tree_geom; const gex_Rank_t child_cnt = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); const gex_Rank_t parent = GASNETE_COLL_TREE_GEOM_PARENT(geom); struct pdata { const void *put_src; void *put_dst; void *myscratch; void *upscratch; gex_Event_t ev; size_t chunk_cnt; // elems size_t chunk_len; // bytes size_t curr_cnt; // elems size_t curr_len; // bytes size_t offset; // bytes size_t remain; // elems int last; int phase; // Used only for ReduceToAll broadcast gex_Rank_t tree_root; gex_Rank_t rel_rank; gex_Rank_t parent; gex_Rank_t child_cnt; gex_Rank_t width; } *pdata; if (data->state) { pdata = data->private_data; } else { // Allocate and initialize pdata pdata = gasneti_calloc(1, sizeof(struct pdata)); gasneti_assert(!data->private_data); data->private_data = pdata; pdata->curr_cnt = pdata->chunk_cnt = op->param_list[0]; pdata->curr_len = pdata->chunk_len = pdata->curr_cnt * args->dt_sz; pdata->remain = args->dt_cnt; gasneti_assert(pdata->ev == GEX_EVENT_INVALID); gasneti_assert(pdata->offset == 0); gasneti_assert(pdata->phase == 0); // Used for ReduceToAll case if (args->root == GEX_RANK_INVALID) { gex_TM_t const tm = op->e_tm; pdata->tree_root = GASNETE_COLL_TREE_GEOM_ROOT(geom); pdata->rel_rank = gasnete_tm_binom_rel_root(tm, pdata->tree_root); pdata->parent = gasnete_tm_binom_parent(tm, pdata->rel_rank); pdata->child_cnt = gasnete_tm_binom_children(tm, pdata->rel_rank); pdata->width = 1 + gasnete_coll_log2_rank(gasneti_import_tm_nonpair(tm)->_size - 1); } // Local/explicit allocation of p2p fields deferred to first run of PF gasneti_assert_uint(pdata->width ,>=, pdata->child_cnt); size_t nstates = 1 + MAX(child_cnt, pdata->width); size_t ndata; if (args->root == GEX_RANK_INVALID) { size_t bcast_chunk_len = MIN(op->team->p2p_eager_buffersz, gex_AM_LUBRequestMedium()); bcast_chunk_len = MIN(bcast_chunk_len, args->dt_sz * args->dt_cnt); ndata = bcast_chunk_len; } else { ndata = 0; } data->p2p = gasnete_coll_p2p_get_final(op->team, op->sequence, nstates, 0, ndata); data->options |= GASNETE_COLL_GENERIC_OPT_P2P; p2p = data->p2p; p2p->state[0] = GASNETE_COLL_TREE_GEOM_SIBLING_ID(geom); // initial CTS data->state = 1; } switch (data->state) { // case 0: pdata allocation/initialization, above case 1: { // Wait for scratch allocation if (!gasnete_coll_scratch_alloc_nb(op GASNETI_THREAD_PASS)) { break; } pdata->myscratch = gasnete_coll_scratch_myaddr(op, 0); if (parent != GEX_RANK_INVALID) { pdata->upscratch = gasnete_coll_scratch_addr(op, parent, 0, 0); } data->state = 2; GASNETI_FALLTHROUGH } case 2: { // Wait for arrival of data from children, if any volatile uint32_t *state = p2p->state; const int ready = pdata->phase ^ 1; for (gex_Rank_t r = 1; r <= child_cnt; ++r) { // NOTE: 1-based if (state[r] != ready) return 0; // At least one child has not contributed their value } gasneti_sync_reads(); pdata->last = (pdata->remain <= pdata->chunk_cnt); if (pdata->last) { pdata->curr_cnt = pdata->remain; pdata->curr_len = pdata->remain * args->dt_sz; } data->state = 3; GASNETI_FALLTHROUGH } case 3: { // Compute reduction (if any) const void *src = (const void *)(pdata->offset + (uintptr_t)args->src); if (child_cnt) { const size_t elem_cnt = pdata->curr_cnt; const size_t stride = pdata->chunk_len; const int phase = pdata->phase; void * data = pdata->myscratch; // In even phases: contributions from all children are contiguous // In odd phases: contributions from last child is non-contiguous (dbl buffered) // Step 3a: local reduction over (child_cnt - phase) children void *tmp = local_reduce_helper(args, elem_cnt, stride, child_cnt - phase, src, data); if (phase) { // Step 3b: reduce the non-contiguous contribution from the final child // 'tmp' now points to intermediate result, which excludes last child gasneti_assert(tmp == ((child_cnt < 2) ? src : gasnete_coll_scale_ptr(data, child_cnt-2, stride))); data = gasnete_coll_scale_ptr(data, child_cnt, stride); tmp = local_reduce_helper(args, elem_cnt, stride, 1, tmp, data); } pdata->put_src = tmp; } else { pdata->put_src = src; } data->state = 4; GASNETI_FALLTHROUGH } case 4: if (parent == GEX_RANK_INVALID) { void *dst = (void *)(pdata->offset + (uintptr_t)args->dst); GASNETI_MEMCPY(dst, pdata->put_src, pdata->curr_len); } else { // Wait for parent's clear-to-send and sync of previous parent send gex_Rank_t dest_slot = p2p->state[0]; gasneti_assert(pdata->ev != GEX_EVENT_NO_OP); if ((dest_slot == GEX_RANK_INVALID) || pdata->ev) break; // Compute addr of send to parent from dest_slot pdata->put_dst = gasnete_coll_scale_ptr(pdata->upscratch, dest_slot, pdata->chunk_len); // Reset state[0] prior to sending, to avoid race p2p->state[0] = GEX_RANK_INVALID; } data->state = 5; GASNETI_FALLTHROUGH case 5: { // First attempt at comms using IMMEDIATE flags |= GEX_FLAG_IMMEDIATE; // We fall through to the first attempt at comms const int next_phase = pdata->phase ^ 1; int comms_done = 1; // Send partial result to parent (if any) if (parent != GEX_RANK_INVALID) { gex_Rank_t index = 1 + GASNETE_COLL_TREE_GEOM_SIBLING_ID(geom); if (gasnete_tm_p2p_signalling_put(op, parent, pdata->put_dst, pdata->put_src, pdata->curr_len, &pdata->ev, flags, index, next_phase GASNETI_THREAD_PASS)) { pdata->ev = GEX_EVENT_NO_OP; // mark for retry comms_done = 0; } else if (pdata->ev != GEX_EVENT_INVALID) { gasneti_assert(pdata->ev != GEX_EVENT_NO_OP); gasnete_coll_save_event(&pdata->ev); // add to polling set } } // Send CTS message to children (if any) unless at end if (child_cnt && !pdata->last) { gex_Rank_t * const children = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); volatile uint32_t *state_plus1 = p2p->state + 1; gex_Rank_t r; for (r = 0; r < (child_cnt - 1); ++r) { if (gasnete_tm_p2p_change_state(op, children[r], flags, 0, r GASNETI_THREAD_PASS)) { state_plus1[r] = 2; // mark for retry comms_done = 0; } } // Need to alternate location of last child's contribution with phase gasneti_assert(r == child_cnt - 1); if (gasnete_tm_p2p_change_state(op, children[r], flags, 0, (r + next_phase) GASNETI_THREAD_PASS)) { state_plus1[r] = 2; // mark for retry comms_done = 0; } } if (comms_done) goto comms_done; // Skip non-IMM comms // Yield. Control will resume at non-IMMEDIATE comms gasneti_assert(! result); data->state = 6; break; } case 6: { // Second attempt at comms *not* using IMMEDIATE gasneti_assert(! (flags & GEX_FLAG_IMMEDIATE)); const int next_phase = pdata->phase ^ 1; // Send partial result to parent (if any) if (pdata->ev == GEX_EVENT_NO_OP) { gasneti_assert(parent != GEX_RANK_INVALID); gex_Rank_t index = 1 + GASNETE_COLL_TREE_GEOM_SIBLING_ID(geom); gasnete_tm_p2p_signalling_put(op, parent, pdata->put_dst, pdata->put_src, pdata->curr_len, &pdata->ev, flags, index, next_phase GASNETI_THREAD_PASS); if (pdata->ev != GEX_EVENT_INVALID) { gasnete_coll_save_event(&pdata->ev); // add to polling set } } // Send CTS message to children (if any) unless at end if (child_cnt && !pdata->last) { gex_Rank_t * const children = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); volatile uint32_t *state_plus1 = p2p->state + 1; gex_Rank_t r; for (r = 0; r < (child_cnt - 1); ++r) { if (state_plus1[r] == 2) { gasnete_tm_p2p_change_state(op, children[r], flags, 0, r GASNETI_THREAD_PASS); } } // Need to alternate location of last child's contribution with phase gasneti_assert(r == child_cnt - 1); if (state_plus1[r] == 2) { gasnete_tm_p2p_change_state(op, children[r], flags, 0, (r + next_phase) GASNETI_THREAD_PASS); } } } comms_done: // Comms are done, reduction might be too if (pdata->last) { if (args->root == GEX_RANK_INVALID) { // Need to broadcast goto broadcast; } else if (pdata->ev) { // OP and scratch must remain active until async Put to parent is complete gasneti_assert(pdata->ev != GEX_EVENT_NO_OP); result = GASNETE_COLL_OP_COMPLETE; data->state = 7; break; } else { // Completely done result = GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE; goto done; } } // Advance phase, offset and remain for next iter pdata->phase ^= 1; pdata->offset += pdata->curr_len; pdata->remain -= pdata->curr_cnt; gasneti_assert(pdata->remain); // Yield. Control will resume at next iteration. gasneti_assert(! result); data->state = 2; break; case 7: // Stall for async Put to parent to complete if (pdata->ev) break; result = GASNETE_COLL_OP_INACTIVE; goto done; broadcast: // For ReduceToAll case, setup a segmented eager broadcast down a binomial tree // TODO-EX: use IMM in this broadcast, and maybe lc_opt? pdata->phase = 4; // alternate between 4 and 5 pdata->offset = 0; pdata->remain = args->dt_sz * args->dt_cnt; pdata->chunk_len = MIN(op->team->p2p_eager_buffersz, gex_AM_LUBRequestMedium()); data->state = 8; GASNETI_FALLTHROUGH case 8: // Possible stall for async Put to parent to complete if (pdata->ev) break; data->state = 9; GASNETI_FALLTHROUGH case 9: { gex_TM_t const tm = op->e_tm; void *dst = (void *)(pdata->offset + (uintptr_t)args->dst); const int ready = pdata->phase; pdata->last = (pdata->remain <= pdata->chunk_len); if (pdata->last) { pdata->chunk_len = pdata->remain; } if (pdata->rel_rank) { // Wait for arrival of data from parent (if any) if (p2p->state[pdata->width] != ready) return 0; gasneti_sync_reads(); GASNETI_MEMCPY(dst, p2p->data, pdata->chunk_len); // Acknowledge parent (CTS) if there is a next round if (! pdata->last) { gasnete_tm_p2p_change_state(op, pdata->parent, /*flags*/0, gasnete_tm_binom_age(tm, pdata->rel_rank), ready GASNETI_THREAD_PASS); } } if (pdata->child_cnt) { // Send to children (if any) const gex_Rank_t size = gex_TM_QuerySize(tm); const gex_Rank_t child_cnt = pdata->child_cnt; const gex_Rank_t rel_rank = pdata->rel_rank; for (int idx = child_cnt - 1; idx >= 0; --idx) { // Reverse order for deepest subtree first gex_Rank_t distance = 1 << idx; gex_Rank_t peer = (distance >= size - rel_rank) ? rel_rank - (size - distance) : rel_rank + distance; // Deliver to p2p->data space W/O an offset, but set a state[i] for non-zero i: // count=1, offset=i, elem_size=0 gasneti_assert_zeroret( gex_AM_RequestMedium6(tm, peer, gasneti_handleridx(gasnete_coll_p2p_med_reqh), dst, pdata->chunk_len, GEX_EVENT_NOW, /*flags*/0, op->team->team_id, op->sequence, /*count*/1, /*offset*/pdata->width, /*state*/ready, /*elem_size*/0)); } } if (pdata->last) { result = GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE; goto done; } data->state = 10; GASNETI_FALLTHROUGH } case 10: if (pdata->child_cnt) { // Stall for CTS const int ready = pdata->phase; for (gex_Rank_t r = 0; r < pdata->child_cnt; ++r) { if (p2p->state[r] != ready) return 0; // At least one child has not acknowledged } } // Advance phase, offset and remain for next iter pdata->phase ^= 1; pdata->offset += pdata->chunk_len; pdata->remain -= pdata->chunk_len; gasneti_assert(pdata->remain); // Yield. Control will resume at next iteration. gasneti_assert(! result); data->state = 9; break; done: gasneti_assert(result); gasneti_free(pdata); gasnete_coll_free_scratch(op); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); break; default: gasneti_unreachable(); } // end switch return result; } GASNETE_TM_DECLARE_REDUCE_ALG(TreePutSeg) { gasnet_team_handle_t team = gasneti_import_tm_nonpair(tm)->_coll_team; gasneti_assert(coll_params); gasnete_coll_local_tree_geom_t *geom = (gasnete_coll_local_tree_geom_t *)coll_params; // Determine what can fit in scratch space or Long const size_t slot_sz = team->scratch_size / (1 + geom->max_radix); const size_t limit = MIN(slot_sz, gex_AM_LUBRequestLong()); size_t chunk_cnt; #if 1 // Branches are cheaper than integer division if (gasneti_dt_8byte(dt)) { chunk_cnt = limit >> 3; } else if (gasneti_dt_4byte(dt)) { chunk_cnt = limit >> 2; } else #endif chunk_cnt = limit / dt_sz; // We pass as "param" to avoid recomputing in the pf, but that requires 32-bit type uint32_t pipe_seg_sz = MIN(MIN(dt_cnt, chunk_cnt), 0xFFFFFFFFu); // make sure this is a valid choice of algorithm gasneti_assert(pipe_seg_sz > 0); // Scratch space const size_t chunk_len = pipe_seg_sz * dt_sz; gasnete_coll_scratch_req_t *scratch_req = gasnete_coll_scratch_alloc_req(team); // fill out the tree information scratch_req->tree_type = geom->tree_type; scratch_req->tree_dir = GASNETE_COLL_UP_TREE; scratch_req->root = GASNETE_COLL_TREE_GEOM_ROOT(geom); // correct even for ToAll case scratch_req->op_type = GASNETE_COLL_TREE_OP; // fill out the peer information // in: recv 'chunk_len' from each child, PLUS a spare for send to parent (if any) // out: self and siblings each send 'chunk_len' to parent scratch_req->incoming_size = chunk_len * (1 + GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom)); scratch_req->num_in_peers = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); scratch_req->in_peers = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); if (team->myrank == scratch_req->root) { scratch_req->num_out_peers = 0; scratch_req->out_peers = NULL; scratch_req->out_sizes = NULL; } else { scratch_req->num_out_peers = 1; gasnete_coll_scratch_alloc_out_sizes(scratch_req, 1); scratch_req->out_sizes[0] = chunk_len * (1 + geom->num_siblings); scratch_req->out_peers = &(GASNETE_COLL_TREE_GEOM_PARENT(geom)); } const int options = GASNETE_COLL_USE_SCRATCH; return gasnete_tm_generic_reduce_nb(tm, root, dst, src, dt, dt_sz, dt_cnt, op, op_fnptr, op_cdata, coll_flags, &gasnete_coll_pf_tm_reduce_TreePutSeg, options, geom, sequence, 1, &pipe_seg_sz, scratch_req GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ gasnet-2025.8.0/extended-ref/coll/gasnet_coll.h0000664000175000017500000006166315142313673021404 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_coll.h $ * Description: GASNet Extended API Collective declarations * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_COLL_H #define _GASNET_COLL_H #if defined(_INCLUDED_GASNET_INTERNAL_H) && !defined(_IN_GASNET_INTERNAL_H) #error Internal GASNet code should not directly include gasnet_coll.h, just gasnet_internal.h #endif #include GASNETI_BEGIN_EXTERNC GASNETI_BEGIN_NOWARN #define GASNETI_COLL_FN_HEADER(FNNAME) extern /*---------------------------------------------------------------------------------*/ /* Flag values: */ /* Sync flags - NO DEFAULT */ #define GASNET_COLL_IN_NOSYNC (1<<0) #define GASNET_COLL_IN_MYSYNC (1<<1) #define GASNET_COLL_IN_ALLSYNC (1<<2) #define GASNET_COLL_OUT_NOSYNC (1<<3) #define GASNET_COLL_OUT_MYSYNC (1<<4) #define GASNET_COLL_OUT_ALLSYNC (1<<5) #define GASNET_COLL_SYNC_FLAG_MASK (0x3F) #define GASNET_COLL_SINGLE %%%ERROR-GASNET_COLL_SINGLE-HAS-BEEN-REMOVED%%% #define GASNET_COLL_LOCAL (1<<7) #define GASNET_COLL_FIXED_THREADS_PER_NODE (1<<9) #define GASNET_COLL_DST_IN_SEGMENT (1<<10) #define GASNET_COLL_SRC_IN_SEGMENT (1<<11) #define GASNET_COLL_DISABLE_AUTOTUNE (1<<18) #define GASNET_COLL_NO_IMAGES (1<<19) /* (prefix-)reduction function flags */ #define GASNET_COLL_AMSAFE (1<<0) #define GASNET_COLL_NONCOMM (1<<1) #ifndef GASNETE_COLL_IMAGE_OVERRIDE /* gasnet_image_t must be large enough to index all threads that participate * in collectives. A conduit may override this if a smaller type will suffice. * However, types larger than 32-bits won't pass as AM handler args. So, for * a larger type, many default things will require overrides. */ typedef uint32_t gasnet_image_t; #endif /*---------------------------------------------------------------------------------*/ #ifndef GASNETE_COLL_HANDLE_OVERRIDE /* Handle type for collective ops: */ // TODO-EX: these legacy aliases should be removed as soon as we no // longer need to support clients using the GASNet-1 collective APIs. typedef gex_Event_t gasnet_coll_handle_t; #define GASNET_COLL_INVALID_HANDLE GEX_EVENT_INVALID #endif /* Functions, types, etc for computational collectives */ // Callback function for GEX Reduce/Scan: typedef void (*gex_Coll_ReduceFn_t)( const void * _arg1, void * _arg2_and_out, size_t _count, const void * _cdata); /* Handle type for collective teams: */ #ifndef GASNETE_COLL_TEAMS_OVERRIDE struct gasnete_coll_team_t_; typedef struct gasnete_coll_team_t_ *gasnete_coll_team_t; typedef gasnete_coll_team_t gasnet_team_handle_t; /*change this so even the TEAM_ALL has a default team allocated rather than NULL*/ #endif #ifndef GASNET_TEAM_ALL extern gasnet_team_handle_t gasnete_coll_team_all; #define GASNET_TEAM_ALL gasnete_coll_team_all #endif /*---------------------------------------------------------------------------------*/ /* STUFF FOR COLLECTIVE AUTOTUNING*/ /*---------------------------------------------------------------------------------* * Prototypes for external interface to try different collective trees (only works for GASNet Team All) * Note that the preffered way for changing these values is in the environment rather than these functions themselves *---------------------------------------------------------------------------------*/ typedef enum {GASNET_COLL_BROADCAST_OP=0, GASNET_COLL_SCATTER_OP, GASNET_COLL_GATHER_OP, GASNET_COLL_GATHER_ALL_OP, GASNET_COLL_EXCHANGE_OP, GASNET_COLL_NUM_COLL_OPTYPES } gasnet_coll_optype_t; typedef enum {GASNET_COLL_PIPE_SEG_SIZE, GASNET_COLL_DISSEM_RADIX, GASNET_COLL_TREE_TYPE, /*check to see if hte conduit has added any new tuning parameters to this list*/ #ifdef GASNETE_COLL_CONDUIT_TUNING_PARAMETERS GASNETE_COLL_CONDUIT_TUNING_PARAMETERS , #endif GASNET_COLL_NUM_PARAM_TYPES} gasnet_coll_tuning_param_type_t ; typedef void (*gasnet_coll_overlap_sample_work_t)(void *_arg); void gasnete_coll_loadTuningState(char *_filename, gasnete_coll_team_t _team GASNETI_THREAD_FARG); #define gasnet_coll_loadTuningState(FILENAME, TEAM) gasnete_coll_loadTuningState(FILENAME, TEAM GASNETI_THREAD_GET) void gasnete_coll_dumpTuningState(char *_filename, gasnete_coll_team_t _team GASNETI_THREAD_FARG); #define gasnet_coll_dumpTuningState(FILENAME, TEAM) gasnete_coll_dumpTuningState(FILENAME, TEAM GASNETI_THREAD_GET) void gasnete_coll_dumpProfile(char *_filename, gasnete_coll_team_t _team GASNETI_THREAD_FARG); #define gasnet_coll_dumpProfile(FILENAME, TEAM) gasnete_coll_dumpProfile(FILENAME, TEAM GASNETI_THREAD_GET) extern int gasnet_coll_get_num_tree_classes(gasnet_team_handle_t _team, gasnet_coll_optype_t _optype); extern void gasnet_coll_set_tree_kind(gasnet_team_handle_t _team, int _tree_type, int _fanout, gasnet_coll_optype_t _optype); extern void gasnet_coll_set_dissem_limit(gasnet_team_handle_t _team, size_t _dissemlimit, gasnet_coll_optype_t _optype); /*---------------------------------------------------------------------------------*/ /* Collectives tracing */ #if GASNETI_STATS_OR_TRACE /* In what follows, "????"")" protects us from evil trigraphs */ #if 0 /* XXX Not yet implemented */ extern char * gasnete_coll_format_addrlist(const void *addrlist[], int flags); #else #define gasnete_coll_format_addrlist(list,flags) gasneti_extern_strdup("[LIST]") #endif #define GASNETI_RADDRSTR_COLL(root,ptr) GASNETI_RADDRSTR(team->e_tm,root,ptr) // Legacy Collective OPs #define GASNETI_TRACE_COLL_BROADCAST(name,team,dst,root,src,nbytes,flags) do { \ GASNETI_TRACE_EVENT_VAL(W,name,nbytes); \ if (GASNETI_TRACE_ENABLED(D)) { \ if (root == gasneti_mynode) { \ GASNETI_TRACE_PRINTF(D,(#name ": " GASNETI_LADDRFMT " <- " GASNETI_RADDRFMT \ " (nbytes=%" PRIuSZ " team=%p flags=0x%x)\n", \ GASNETI_LADDRSTR(dst), GASNETI_RADDRSTR_COLL(root,src), \ (size_t)nbytes, (void *)team, flags)); \ } else { \ GASNETI_TRACE_PRINTF(D,(#name ": " GASNETI_LADDRFMT " <- (%i,????"")" \ " (nbytes=%" PRIuSZ " team=%p flags=0x%x)\n", \ GASNETI_LADDRSTR(dst), (int)(root), \ (size_t)nbytes, (void *)team, flags)); \ } \ } \ } while (0) #define GASNETI_TRACE_COLL_SCATTER(name,team,dst,root,src,nbytes,flags) \ GASNETI_TRACE_COLL_BROADCAST(name,team,dst,root,src,nbytes,flags) #define GASNETI_TRACE_COLL_GATHER(name,team,root,dst,src,nbytes,flags) do { \ GASNETI_TRACE_EVENT_VAL(W,name,nbytes); \ if (GASNETI_TRACE_ENABLED(D)) { \ if (root == gasneti_mynode) { \ GASNETI_TRACE_PRINTF(D,(#name ": " GASNETI_RADDRFMT " <- " GASNETI_LADDRFMT \ " (nbytes=%" PRIuSZ " team=%p flags=0x%x)\n", \ GASNETI_RADDRSTR_COLL(root,dst), GASNETI_LADDRSTR(src), \ (size_t)nbytes, (void *)team, flags)); \ } else { \ GASNETI_TRACE_PRINTF(D,(#name ": (%i,????"") <- " GASNETI_LADDRFMT \ " (nbytes=%" PRIuSZ " team=%p flags=0x%x)\n", \ (int)(root), GASNETI_LADDRSTR(src), \ (size_t)nbytes, (void *)team, flags)); \ } \ } \ } while (0) #define GASNETI_TRACE_COLL_GATHER_ALL(name,team,dst,src,nbytes,flags) do { \ GASNETI_TRACE_EVENT_VAL(W,name,nbytes); \ if (GASNETI_TRACE_ENABLED(D)) { \ GASNETI_TRACE_PRINTF(D,(#name ": " GASNETI_LADDRFMT " <- " GASNETI_LADDRFMT \ " (nbytes=%" PRIuSZ " team=%p flags=0x%x)\n", \ GASNETI_LADDRSTR(dst), GASNETI_LADDRSTR(src), \ (size_t)nbytes, (void *)team, flags)); \ } \ } while (0) #define GASNETI_TRACE_COLL_EXCHANGE(name,team,dst,src,nbytes,flags) \ GASNETI_TRACE_COLL_GATHER_ALL(name,team,dst,src,nbytes,flags) // GEX Collective Ops #define GASNETI_TRACE_TM_BROADCAST(name,tm,root,dst,src,nbytes,flags) do { \ GASNETI_TRACE_EVENT_VAL(W,name,nbytes); \ if (GASNETI_TRACE_ENABLED(D)) { \ GASNETI_TRACE_PRINTF(D, (#name ": root = " GASNETI_TMRANKFMT ", nbytes = %" PRIuSZ, \ GASNETI_TMRANKSTR((tm),(root)), (size_t)nbytes)); \ if ((root) == gex_TM_QueryRank(tm)) { \ GASNETI_TRACE_PRINTF(D, (#name ": dst = " GASNETI_LADDRFMT ", src = " GASNETI_LADDRFMT, \ GASNETI_LADDRSTR(dst), GASNETI_LADDRSTR(src))); \ } else { \ GASNETI_TRACE_PRINTF(D, (#name ": dst = " GASNETI_LADDRFMT, GASNETI_LADDRSTR(dst))); \ } \ } \ } while (0) #define GASNETI_TRACE_TM_REDUCE(name,tm,root,dst,src,dt,dt_sz,dt_cnt,op,op_fnptr,op_cdata,flags) do { \ GASNETI_TRACE_EVENT_VAL(W,name,dt_cnt*dt_sz); \ if (GASNETI_TRACE_ENABLED(D)) { \ char *_tr_dtstr = (char *)gasneti_extern_malloc(gasneti_format_dt(NULL,(dt))); \ gasneti_format_dt(_tr_dtstr,(dt)); \ const char *_tr_dtsz = (dt == GEX_DT_USER) \ ? gasneti_dynsprintf(" (dt_sz = %" PRIuSZ ")", dt_sz) : ""; \ char *_tr_opstr = (char *)gasneti_extern_malloc(gasneti_format_op(NULL,(op))); \ gasneti_format_op(_tr_opstr,(op)); \ GASNETI_TRACE_PRINTF(D, (#name ": root = " GASNETI_TMRANKFMT ", dt = %" PRIuSZ "*%s%s, op = %s", \ GASNETI_TMRANKSTR((tm),(root)), \ (size_t)(dt_cnt), 7+_tr_dtstr, _tr_dtsz, 7+_tr_opstr)); \ if ((root) == gex_TM_QueryRank(tm)) { \ GASNETI_TRACE_PRINTF(D, (#name ": src = " GASNETI_LADDRFMT ", dst = " GASNETI_LADDRFMT, \ GASNETI_LADDRSTR(src), GASNETI_LADDRSTR(dst))); \ } else { \ GASNETI_TRACE_PRINTF(D, (#name ": src = " GASNETI_LADDRFMT, GASNETI_LADDRSTR(src))); \ } \ if (op == GEX_OP_USER || op == GEX_OP_USER_NC) { \ const void * const * _tr_p_fnptr = (const void * const *)&(op_fnptr); \ GASNETI_TRACE_PRINTF(D, (#name ": User-defined (fnptr, cdata) = (%p, %p)", \ *_tr_p_fnptr, (op_cdata))); \ } \ gasneti_extern_free(_tr_dtstr); \ gasneti_extern_free(_tr_opstr); \ } \ } while (0) #define GASNETI_TRACE_TM_REDUCE_ALL(name,tm,dst,src,dt,dt_sz,dt_cnt,op,op_fnptr,op_cdata,flags) do { \ GASNETI_TRACE_EVENT_VAL(W,name,dt_cnt*dt_sz); \ if (GASNETI_TRACE_ENABLED(D)) { \ char *_tr_dtstr = (char *)gasneti_extern_malloc(gasneti_format_dt(NULL,(dt))); \ gasneti_format_dt(_tr_dtstr,(dt)); \ const char *_tr_dtsz = (dt == GEX_DT_USER) \ ? gasneti_dynsprintf(" (dt_sz = %" PRIuSZ ")", dt_sz) : ""; \ char *_tr_opstr = (char *)gasneti_extern_malloc(gasneti_format_op(NULL,(op))); \ gasneti_format_op(_tr_opstr,(op)); \ GASNETI_TRACE_PRINTF(D, (#name ": team = " GASNETI_TMFMT ", dt = %" PRIuSZ "*%s%s, op = %s", \ GASNETI_TMSTR(tm), \ (size_t)(dt_cnt), 7+_tr_dtstr, _tr_dtsz, 7+_tr_opstr)); \ GASNETI_TRACE_PRINTF(D, (#name ": src = " GASNETI_LADDRFMT ", dst = " GASNETI_LADDRFMT, \ GASNETI_LADDRSTR(src), GASNETI_LADDRSTR(dst))); \ if (op == GEX_OP_USER || op == GEX_OP_USER_NC) { \ const void * const * _tr_p_fnptr = (const void * const *)&(op_fnptr); \ GASNETI_TRACE_PRINTF(D, (#name ": User-defined (fnptr, cdata) = (%p, %p)", \ *_tr_p_fnptr, (op_cdata))); \ } \ gasneti_extern_free(_tr_dtstr); \ gasneti_extern_free(_tr_opstr); \ } \ } while (0) #else #define GASNETI_TRACE_COLL_BROADCAST(name,team,dst,root,src,nbytes,flags) #define GASNETI_TRACE_COLL_SCATTER(name,team,dst,root,src,nbytes,flags) #define GASNETI_TRACE_COLL_GATHER(name,team,root,dst,src,nbytes,flags) #define GASNETI_TRACE_COLL_GATHER_ALL(name,team,dst,src,nbytes,flags) #define GASNETI_TRACE_COLL_EXCHANGE(name,team,dst,src,nbytes,flags) #define GASNETI_TRACE_TM_BROADCAST(name,tm,root,dst,src,nbytes,flags) #define GASNETI_TRACE_TM_REDUCE(name,tm,root,dst,src,dt,dt_sz,dt_cnt,op,op_fnptr,op_cdata,flags) #define GASNETI_TRACE_TM_REDUCE_ALL(name,tm,dst,src,dt,dt_sz,dt_cnt,op,op_fnptr,op_cdata,flags) #endif /*---------------------------------------------------------------------------------*/ // // Legacy GASNet-1 APIs for try and wait // These are simply redirects // #define gasnet_coll_try_sync(event) gex_Event_Test(event) #define gasnet_coll_try_sync_some(pevent,numevents) gex_Event_TestSome(pevent,numevents,0) #define gasnet_coll_try_sync_all(pevent,numevents) gex_Event_TestAll(pevent,numevents,0) #define gasnet_coll_wait_sync(event) gex_Event_Wait(event) #define gasnet_coll_wait_sync_some(pevent,numevents) gex_Event_WaitSome(pevent,numevents,0) #define gasnet_coll_wait_sync_all(pevent,numevents) gex_Event_WaitAll(pevent,numevents,0) /*---------------------------------------------------------------------------------*/ /* Team barrier functions */ extern void gasnete_coll_barrier_notify(gasnete_coll_team_t _team, int _id, int _flags GASNETI_THREAD_FARG); extern int gasnete_coll_barrier_try(gasnete_coll_team_t _team, int _id, int _flags GASNETI_THREAD_FARG); extern int gasnete_coll_barrier_wait(gasnete_coll_team_t _team, int _id, int _flags GASNETI_THREAD_FARG); extern int gasnete_coll_barrier(gasnete_coll_team_t _team, int _id, int _flags GASNETI_THREAD_FARG); extern int gasnete_coll_barrier_result(gasnete_coll_team_t _team, int *_id GASNETI_THREAD_FARG); #define gasnet_coll_barrier_notify(team, id, flags) gasnete_coll_barrier_notify(team, id, flags GASNETI_THREAD_GET) #define gasnet_coll_barrier_try(team, id, flags) gasnete_coll_barrier_try(team, id, flags GASNETI_THREAD_GET) #define gasnet_coll_barrier_wait(team, id, flags) gasnete_coll_barrier_wait(team, id, flags GASNETI_THREAD_GET) #define gasnet_coll_barrier(team, id, flags) gasnete_coll_barrier(team, id, flags GASNETI_THREAD_GET) #define gasnet_coll_barrier_result(team, id) gasnete_coll_barrier_result(team, id GASNETI_THREAD_GET) /*---------------------------------------------------------------------------------*/ /* no point trying to inline the collectives since they will involve non trivial communication costs*/ GASNETI_COLL_FN_HEADER(_gasnet_coll_broadcast_nb) gex_Event_t _gasnet_coll_broadcast_nb(gasnet_team_handle_t _team, void *_dst, gasnet_image_t _srcimage, void *_src, size_t _nbytes, int _flags GASNETI_THREAD_FARG); #define gasnet_coll_broadcast_nb(team,dst,srcimage,src,nbytes,flags) \ _gasnet_coll_broadcast_nb(team,dst,srcimage,src,nbytes,flags GASNETI_THREAD_GET) GASNETI_COLL_FN_HEADER(_gasnet_coll_broadcast) void _gasnet_coll_broadcast(gasnet_team_handle_t _team, void *_dst, gasnet_image_t _srcimage, void *_src, size_t _nbytes, int _flags GASNETI_THREAD_FARG); #define gasnet_coll_broadcast(team,dst,srcimage,src,nbytes,flags) \ _gasnet_coll_broadcast(team,dst,srcimage,src,nbytes,flags GASNETI_THREAD_GET) /*---------------------------------------------------------------------------------*/ GASNETI_COLL_FN_HEADER(_gasnet_coll_scatter_nb) gex_Event_t _gasnet_coll_scatter_nb(gasnet_team_handle_t _team, void *_dst, gasnet_image_t _srcimage, void *_src, size_t _nbytes, int _flags GASNETI_THREAD_FARG); #define gasnet_coll_scatter_nb(team,dst,srcimage,src,nbytes,flags) \ _gasnet_coll_scatter_nb(team,dst,srcimage,src,nbytes,flags GASNETI_THREAD_GET) GASNETI_COLL_FN_HEADER(_gasnet_coll_scatter) void _gasnet_coll_scatter(gasnet_team_handle_t _team, void *_dst, gasnet_image_t _srcimage, void *_src, size_t _nbytes, int _flags GASNETI_THREAD_FARG); #define gasnet_coll_scatter(team,dst,srcimage,src,nbytes,flags) \ _gasnet_coll_scatter(team,dst,srcimage,src,nbytes,flags GASNETI_THREAD_GET) /*---------------------------------------------------------------------------------*/ GASNETI_COLL_FN_HEADER(_gasnet_coll_gather_nb) gex_Event_t _gasnet_coll_gather_nb(gasnet_team_handle_t _team, gasnet_image_t _dstimage, void *_dst, void *_src, size_t _nbytes, int _flags GASNETI_THREAD_FARG); #define gasnet_coll_gather_nb(team,dstimage,dst,src,nbytes,flags) \ _gasnet_coll_gather_nb(team,dstimage,dst,src,nbytes,flags GASNETI_THREAD_GET) GASNETI_COLL_FN_HEADER(_gasnet_coll_gather) void _gasnet_coll_gather(gasnet_team_handle_t _team, gasnet_image_t _dstimage, void *_dst, void *_src, size_t _nbytes, int _flags GASNETI_THREAD_FARG); #define gasnet_coll_gather(team,dstimage,dst,src,nbytes,flags) \ _gasnet_coll_gather(team,dstimage,dst,src,nbytes,flags GASNETI_THREAD_GET) /*---------------------------------------------------------------------------------*/ GASNETI_COLL_FN_HEADER(_gasnet_coll_gather_all_nb) gex_Event_t _gasnet_coll_gather_all_nb(gasnet_team_handle_t _team, void *_dst, void *_src, size_t _nbytes, int _flags GASNETI_THREAD_FARG) ; #define gasnet_coll_gather_all_nb(team,dst,src,nbytes,flags) \ _gasnet_coll_gather_all_nb(team,dst,src,nbytes,flags GASNETI_THREAD_GET) GASNETI_COLL_FN_HEADER(_gasnet_coll_gather_all) void _gasnet_coll_gather_all(gasnet_team_handle_t _team, void *_dst, void *_src, size_t _nbytes, int _flags GASNETI_THREAD_FARG); #define gasnet_coll_gather_all(team,dst,src,nbytes,flags) \ _gasnet_coll_gather_all(team,dst,src,nbytes,flags GASNETI_THREAD_GET) /*---------------------------------------------------------------------------------*/ GASNETI_COLL_FN_HEADER(_gasnet_coll_exchange_nb) gex_Event_t _gasnet_coll_exchange_nb(gasnet_team_handle_t _team, void *_dst, void *_src, size_t _nbytes, int _flags GASNETI_THREAD_FARG) ; #define gasnet_coll_exchange_nb(team,dst,src,nbytes,flags) \ _gasnet_coll_exchange_nb(team,dst,src,nbytes,flags GASNETI_THREAD_GET) GASNETI_COLL_FN_HEADER(_gasnet_coll_exchange) void _gasnet_coll_exchange(gasnet_team_handle_t _team, void *_dst, void *_src, size_t _nbytes, int _flags GASNETI_THREAD_FARG); #define gasnet_coll_exchange(team,dst,src,nbytes,flags) \ _gasnet_coll_exchange(team,dst,src,nbytes,flags GASNETI_THREAD_GET) /*---------------------------------------------------------------------------------*/ #ifndef gasnete_tm_broadcast_nb extern gex_Event_t gasnete_tm_broadcast_nb(gex_TM_t _tm, gex_Rank_t _root, void *_dst, const void *_src, size_t _nbytes, gex_Flags_t _flags, uint32_t _sequence GASNETI_THREAD_FARG) GASNETI_WARN_UNUSED_RESULT; #endif #define gex_Coll_BroadcastNB(tm,root,dst,src,nbytes,flags) \ gasnete_tm_broadcast_nb(tm,root,dst,src,nbytes,flags,0 GASNETI_THREAD_GET) /*---------------------------------------------------------------------------------*/ #ifndef gasnete_tm_reduce_nb extern gex_Event_t gasnete_tm_reduce_nb(gex_TM_t _tm, gex_Rank_t _root, void *_dst, const void *_src, gex_DT_t _dt, size_t _dt_sz, size_t _dt_cnt, gex_OP_t _op, gex_Coll_ReduceFn_t _user_op, void * _user_cdata, gex_Flags_t _flags, uint32_t _sequence GASNETI_THREAD_FARG) GASNETI_WARN_UNUSED_RESULT; #endif #define gex_Coll_ReduceToOneNB(tm,root,dst,src,dt,dts,dtc,op,fn,cdata,flags) \ gasnete_tm_reduce_nb(tm,root,dst,src,dt,dts,dtc,op,fn,cdata,flags,0 GASNETI_THREAD_GET) /*---------------------------------------------------------------------------------*/ #ifndef gasnete_tm_reduce_all_nb extern gex_Event_t gasnete_tm_reduce_all_nb( gex_TM_t _tm, void *_dst, const void *_src, gex_DT_t _dt, size_t _dt_sz, size_t _dt_cnt, gex_OP_t _op, gex_Coll_ReduceFn_t _user_op, void * _user_cdata, gex_Flags_t _flags, uint32_t _sequence GASNETI_THREAD_FARG) GASNETI_WARN_UNUSED_RESULT; #endif #define gex_Coll_ReduceToAllNB(tm,dst,src,dt,dts,dtc,op,fn,cdata,flags) \ gasnete_tm_reduce_all_nb(tm,dst,src,dt,dts,dtc,op,fn,cdata,flags,0 GASNETI_THREAD_GET) /*---------------------------------------------------------------------------------*/ #undef GASNETI_COLL_FN_HEADER GASNETI_END_NOWARN GASNETI_END_EXTERNC #endif gasnet-2025.8.0/extended-ref/coll/gasnet_coll_fwd.h0000664000175000017500000000425615142313673022237 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_coll_fwd.h $ * Description: GASNet Collectives Header (forward decls) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_COLL_FWD_H #define _GASNET_COLL_FWD_H #ifndef GASNETI_COLL_PROGRESSFNS extern void gasneti_coll_progressfn(void); #define GASNETI_COLL_PROGRESSFNS(FN) \ FN(gasneti_pf_coll, BOOLEAN, gasneti_coll_progressfn) #endif /* stats needed by the COLL reference implementation */ #ifndef GASNETI_COLL_STATS #define GASNETI_COLL_STATS(CNT,VAL,TIME) \ CNT(W, TEAM_NEW_SPLIT, cnt) \ CNT(W, TEAM_NEW_CREATE, cnt) \ CNT(W, TEAM_DESTROY, cnt) \ VAL(W, COLL_BROADCAST, sz) \ VAL(W, COLL_BROADCAST_NB, sz) \ VAL(W, COLL_SCATTER, sz) \ VAL(W, COLL_SCATTER_NB, sz) \ VAL(W, COLL_GATHER, sz) \ VAL(W, COLL_GATHER_NB, sz) \ VAL(W, COLL_GATHER_ALL, sz) \ VAL(W, COLL_GATHER_ALL_NB, sz) \ VAL(W, COLL_EXCHANGE, sz) \ VAL(W, COLL_EXCHANGE_NB, sz) \ VAL(W, COLL_REDUCE_NB, bytes) \ VAL(W, COLL_REDUCE_ALL_NB, bytes) \ CNT(W, COLL_P2P_ALLOC, cnt) \ CNT(W, COLL_P2P_FREE, cnt) \ VAL(W, COLL_OP_ALLOC, bytes) \ VAL(W, COLL_OP_FREE, bytes) \ VAL(W, COLL_GDATA_ALLOC, bytes) \ VAL(W, COLL_GDATA_FREE, bytes) \ VAL(W, COLL_EOP_ALLOC, bytes) \ VAL(W, COLL_EOP_FREE, bytes) \ /*END*/ #endif #define GASNETE_COLL_AUXSEG_DECLS \ extern gasneti_auxseg_request_t gasnete_coll_auxseg_alloc(gasnet_seginfo_t *auxseg_info); #define GASNETE_COLL_AUXSEG_FNS() gasnete_coll_auxseg_alloc, // For use in gasneti_threaddata_t struct gasnete_coll_threaddata_t_; typedef struct gasnete_coll_threaddata_t_ gasnete_coll_threaddata_t; #endif gasnet-2025.8.0/extended-ref/coll/gasnet_putget.c0000664000175000017500000021535115142313673021751 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/coll/gasnet_putget.c $ * Description: Reference implemetation of GASNet Collectives team * Copyright 2009, Rajesh Nishtala , Paul H. Hargrove , Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include #include #define USE_CONSENSUS_BARRIER 1 typedef struct {int num_handles; gex_Event_t *handles;} gasnete_coll_handle_vec_t; /*for the segmented algorithms limit the maximum number of subcollectives to 2048*/ /*---------------------------------------------------------------------------------*/ /* gasnete_coll_broadcast_nb() */ /* bcast TreePutScratch */ /* Requires GASNETE_COLL_GENERIC_OPT_P2P on non-root nodes */ /* Naturally IN_MYSYNC, OUT_MYSYNC and should only be used when IN_MYSYNC is needed*/ /* Goes through the scratch space */ /* max size is MaxLongRequest */ static int gasnete_coll_pf_bcast_TreePutScratch(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; gasnete_coll_local_tree_geom_t *geom = data->tree_geom; const gasnete_coll_broadcast_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, broadcast); gex_Rank_t * const children = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); const int child_count = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); int result = 0; int child; switch (data->state) { case 0: /*scratch alloc*/ if(op->scratch_req) { if(!gasnete_coll_scratch_alloc_nb(op GASNETI_THREAD_PASS)) break; } data->state = 1; GASNETI_FALLTHROUGH case 1: // thread barrier if (!gasnete_coll_generic_all_threads(data)) { break; } // Allocation of p2p structure { size_t nstates = 1; size_t ncounters = (op->flags & GASNET_COLL_IN_ALLSYNC) ? 1 :0; // used for "upsync" data->p2p = gasnete_coll_p2p_get_final(op->team, op->sequence, nstates, ncounters, 0); data->options |= GASNETE_COLL_GENERIC_OPT_P2P; } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Optional IN barrier over the SAME tree */ if ((op->flags & GASNET_COLL_IN_ALLSYNC) && !gasnete_coll_generic_upsync_acq(op, args->srcrank, 0, child_count GASNETI_THREAD_PASS)) { break; } data->state = 3; GASNETI_FALLTHROUGH case 3: if (op->team->myrank == args->srcrank) { for (child = 0; child < child_count; child++) { gasnete_tm_p2p_signalling_put(op, children[child], gasnete_coll_scratch_addr(op, children[child], child, 0), args->src, args->nbytes, GEX_EVENT_NOW, 0, 0, 1 GASNETI_THREAD_PASS); } GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, args->src, args->nbytes); } else if (data->p2p->state[0]) { gasneti_sync_reads(); void *myscratch = gasnete_coll_scratch_myaddr(op, 0); for (child = 0; child < child_count; child++) { gasnete_tm_p2p_signalling_put/*Async*/(op, children[child], gasnete_coll_scratch_addr(op, children[child], child, 0), myscratch, args->nbytes, GEX_EVENT_NOW, 0, 0, 1 GASNETI_THREAD_PASS); } GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, myscratch, args->nbytes); } else { break; /* Waiting for parent to push data and signal */ } data->state = 4; GASNETI_FALLTHROUGH case 4: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } /*free up the scratch space used by this op*/ gasnete_coll_free_scratch(op); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_bcast_TreePutScratch(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { /*never allocated an insync barrier since it is folded in with the collective*/ int options = GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF (flags & GASNET_COLL_OUT_ALLSYNC) | GASNETE_COLL_USE_SCRATCH; gasneti_assert(nbytes <= gex_AM_LUBRequestLong()); return gasnete_coll_generic_broadcast_nb(team, dst, srcimage, src, nbytes, flags, &gasnete_coll_pf_bcast_TreePutScratch, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, srcimage, team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } static int gasnete_coll_pf_bcast_TreePutSeg(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_broadcast_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, broadcast); int result =0; switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Initiate data movement */ { gasnete_coll_handle_vec_t *handle_vec; size_t seg_size; int num_segs; int flags = GASNETE_COLL_FORWARD_FLAGS(op->flags); gasnete_coll_implementation_t impl = gasnete_coll_get_implementation(); gex_Rank_t srcproc = args->srcrank; size_t sent_bytes=0; int i; impl->fn_ptr.untyped_fn = NULL; /*strip the last argument off which contains the pipeline segment size*/ impl->num_params = op->num_coll_params; GASNETI_MEMCPY_SAFE_IDENTICAL(impl->param_list, op->param_list, sizeof(uint32_t)*op->num_coll_params); impl->tree_type = data->tree_geom->tree_type; seg_size = (size_t) op->param_list[0]; num_segs = ((args->nbytes % seg_size) == 0 ? args->nbytes/seg_size : (args->nbytes/seg_size)+1); data->private_data = gasneti_malloc(sizeof(gasnete_coll_handle_vec_t)); handle_vec = data->private_data; handle_vec->num_handles = num_segs; handle_vec->handles = gasneti_malloc(sizeof(gex_Event_t)*num_segs); { for(i=0; ihandles[i] = gasnete_coll_bcast_TreePutScratch(op->team, gasnete_coll_scale_ptr(args->dst, sent_bytes, 1), srcproc, gasnete_coll_scale_ptr(args->src, sent_bytes, 1), seg_size, flags, impl, op->sequence+i+1 GASNETI_THREAD_PASS); gasnete_coll_save_event(&handle_vec->handles[i]); sent_bytes+=seg_size; } handle_vec->handles[i] = gasnete_coll_bcast_TreePutScratch(op->team, gasnete_coll_scale_ptr(args->dst, sent_bytes, 1), srcproc, gasnete_coll_scale_ptr(args->src, sent_bytes, 1), args->nbytes-sent_bytes, flags, impl, op->sequence+i+1 GASNETI_THREAD_PASS); gasnete_coll_save_event(&handle_vec->handles[i]); } gasnete_coll_free_implementation(impl); } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Sync data movement */ { gasnete_coll_handle_vec_t *handle_vec = (gasnete_coll_handle_vec_t*) data->private_data; if (!gasnete_coll_generic_coll_sync(handle_vec->handles, handle_vec->num_handles GASNETI_THREAD_PASS)) { break; } gasneti_free(handle_vec->handles); } data->state = 3; GASNETI_FALLTHROUGH case 3: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasneti_free(data->private_data); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_bcast_TreePutSeg(gasnet_team_handle_t team, void * dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF(!(flags & GASNETE_COLL_SUBORDINATE)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNETE_COLL_SUBORDINATE)); size_t seg_size; uint32_t num_segs; gasneti_assert(coll_params->num_params >= 1); seg_size = (size_t)coll_params->param_list[0]; gasneti_assert(seg_size); num_segs = ((nbytes % seg_size) == 0 ? nbytes/seg_size : (nbytes/seg_size)+1); gasneti_assert_int(num_segs ,<=, GASNETE_COLL_MAX_NUM_SEGS); return gasnete_coll_generic_broadcast_nb(team, dst, srcimage, src, nbytes, flags, &gasnete_coll_pf_bcast_TreePutSeg, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, srcimage, team), (flags & GASNETE_COLL_SUBORDINATE ? sequence : num_segs), coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } static int gasnete_coll_pf_bcast_ScatterAllgather(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_broadcast_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, broadcast); int result =0; switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Initiate Scatter */ { gex_Event_t *handle; uint8_t *tempspace; size_t seg_size = (args->nbytes)/op->team->total_ranks; size_t remainder = (args->nbytes) % op->team->total_ranks; int flags = GASNETE_COLL_FORWARD_FLAGS(op->flags); gex_Rank_t srcproc = args->srcrank; data->private_data = gasneti_malloc(sizeof(gex_Event_t)*2+seg_size); handle = (gex_Event_t*) data->private_data; tempspace = ((uint8_t*) data->private_data) + sizeof(gex_Event_t)*2; handle[0] = gasnete_coll_scatter_nb_default(op->team, tempspace, srcproc, args->src, seg_size, flags, op->sequence+1 GASNETI_THREAD_PASS); gasnete_coll_save_event(&handle[0]); if(remainder > 0) { handle[1] = gasnete_coll_broadcast_nb_default(op->team, gasnete_coll_scale_ptr(args->dst,op->team->total_ranks,seg_size), srcproc, gasnete_coll_scale_ptr(args->src,op->team->total_ranks,seg_size), remainder, flags, op->sequence+2 GASNETI_THREAD_PASS); } else { handle[1] = GEX_EVENT_INVALID; } gasnete_coll_save_event(&handle[1]); } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Initiate all gather*/ /*we only need the scatter to be done before we initiate the allgather*/ if (!gasnete_coll_generic_coll_sync((gex_Event_t*) data->private_data, 1 GASNETI_THREAD_PASS)) { break; } else { gex_Event_t *handle; uint8_t *tempspace; size_t seg_size = (args->nbytes)/op->team->total_ranks; int flags = GASNETE_COLL_FORWARD_FLAGS(op->flags); handle = (gex_Event_t*) data->private_data; tempspace = ((uint8_t*) data->private_data) + sizeof(gex_Event_t)*2; if(seg_size) { handle[0] = gasnete_coll_gather_all_nb_default(op->team, args->dst, tempspace, seg_size, flags, op->sequence+3 GASNETI_THREAD_PASS); } else { handle[0] = GEX_EVENT_INVALID; } gasnete_coll_save_event(&handle[0]); } data->state = 3; GASNETI_FALLTHROUGH case 3: /*sync both the allgather and broadcast*/ if (!gasnete_coll_generic_coll_sync((gex_Event_t*) data->private_data, 2 GASNETI_THREAD_PASS)) { break; } data->state = 4; GASNETI_FALLTHROUGH case 4: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasneti_free(data->private_data); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_bcast_ScatterAllgather(gasnet_team_handle_t team, void * dst, gasnet_image_t srcimage, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC | GASNETE_COLL_GENERIC_OPT_OUTSYNC; gasneti_assert(!(flags & GASNETE_COLL_SUBORDINATE)); return gasnete_coll_generic_broadcast_nb(team, dst, srcimage, src, nbytes, flags, &gasnete_coll_pf_bcast_ScatterAllgather, options, NULL, 3 + 2*GASNETE_COLL_MAX_NUM_SEGS +team->total_ranks, /*scatter and broadcast can initiate upto GASNETE_COLL_MAX_NUM_SEGS sub scatters, broadcasts and all gather can initiate upto total ranks sub collectives*/ coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_scatter_nb() */ /* scat Put: root node performs carefully ordered puts */ /* Valid for SINGLE and LOCAL, any size < scratch size ... since we write into the scratch space we need not worry about whether the sender knows the dest address */ static int gasnete_coll_pf_scat_TreePut(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; gasnete_coll_local_tree_geom_t *geom = data->tree_geom; const gasnete_coll_scatter_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, scatter); gex_Rank_t * const children = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); const gex_Rank_t child_count = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); int result = 0,p=1,i,j; size_t sent_bytes=0; switch (data->state) { case 0: /*scratch alloc*/ if(op->scratch_req) { if(!gasnete_coll_scratch_alloc_nb(op GASNETI_THREAD_PASS)) break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data)){ break; } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Optional IN barrier over the SAME tree */ if ((op->flags & GASNET_COLL_IN_ALLSYNC) && !gasnete_coll_generic_upsync_acq(op, args->srcrank, 0, child_count GASNETI_THREAD_PASS)) { break; } data->state = 3; GASNETI_FALLTHROUGH case 3: if (op->team->myrank == args->srcrank) { if(args->dist!=args->nbytes) { int8_t *myscratchpos = gasnete_coll_scratch_myaddr(op, 0); int8_t *send_arr; gasnete_begin_nbi_accessregion(0,1 GASNETI_THREAD_PASS); /*compress the data and send it*/ for(i=0,p=0; inbytes; for(j=0; jsubtree_sizes[i]; j++,p++) { size_t src_pos = geom->child_offset[i]+j+1; src_pos=(src_pos+args->srcrank)%op->team->total_ranks; GASNETE_FAST_UNALIGNED_MEMCPY(myscratchpos+p*args->nbytes, gasnete_coll_scale_ptr(args->src, args->dist, src_pos), args->nbytes); } if(op->flags & GASNET_COLL_OUT_MYSYNC) { /* use AMLong*/ gasnete_tm_p2p_signalling_put(op, children[i], gasnete_coll_scratch_addr(op, child, i, 0), send_arr, args->nbytes*geom->subtree_sizes[i], GEX_EVENT_NOW, 0, 0, 1 GASNETI_THREAD_PASS); } else { { /* else if i am sending to internal node AM long into scratch space*/ gasnete_tm_p2p_signalling_put(op, children[i], gasnete_coll_scratch_addr(op, child, i, 0), send_arr, args->nbytes*geom->subtree_sizes[i], GEX_EVENT_NOW, 0, 0, 1 GASNETI_THREAD_PASS); } } } GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, gasnete_coll_scale_ptr(args->src,args->dist,(op->team->myrank)), args->nbytes); data->handle = gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); gasnete_coll_save_event(&data->handle); } else { int8_t* src_arr; int8_t* scratch_space = gasnete_coll_scratch_myaddr(op, 0); gasnete_begin_nbi_accessregion(0,1 GASNETI_THREAD_PASS); sent_bytes+=args->nbytes; if(args->srcrank == 0) { /*if 0 is the source node then there's no need to shift the array around we can do it direclty from the source*/ src_arr = args->src; } else { /*perform the rotations*/ src_arr = scratch_space; gasneti_assert(geom->num_rotations==1); /*for now only works w/ one level trees*/ gasnete_coll_local_rotate_left(scratch_space, args->src, args->nbytes, op->team->total_ranks, geom->rotation_points[0]); } for(i=0; ichild_offset[i]+1),args->nbytes); if(op->flags & GASNET_COLL_OUT_MYSYNC) { /* use AMLong*/ gasnete_tm_p2p_signalling_put(op, children[i], gasnete_coll_scratch_addr(op, child, i, 0), send_arr, args->nbytes*geom->subtree_sizes[i], GEX_EVENT_NOW, 0, 0, 1 GASNETI_THREAD_PASS); } else { { /* else if i am sending to internal node AM long into scratch space*/ gasnete_tm_p2p_signalling_put(op, children[i], gasnete_coll_scratch_addr(op, child, i, 0), send_arr, args->nbytes*geom->subtree_sizes[i], GEX_EVENT_NOW, 0, 0, 1 GASNETI_THREAD_PASS); } } } GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, src_arr, args->nbytes); data->handle = gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); gasnete_coll_save_event(&data->handle); } } else if(data->p2p->state[0]){ int8_t *scratchspace = gasnete_coll_scratch_myaddr(op, 0); /*read memory barrier to ensure that the reading of the data doesn't preceed the flag*/ gasneti_sync_reads(); gasnete_begin_nbi_accessregion(0,1 GASNETI_THREAD_PASS); /*skip the first slot of the input array since it is destined for me*/ for(i=0; ichild_offset[i]+1),args->nbytes), args->nbytes*geom->subtree_sizes[i], GEX_EVENT_NOW, 0, 0, 1 GASNETI_THREAD_PASS); } sent_bytes+=geom->subtree_sizes[i]*args->nbytes; } data->handle = gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); gasnete_coll_save_event(&data->handle); /* In the case of Mysync the data is always sent to the scratch space so copy it out*/ GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, scratchspace, args->nbytes); } else { break; /* data not yet arrived*/ } data->state = 4; GASNETI_FALLTHROUGH case 4: /* wait for all puts to finish*/ if (data->handle != GEX_EVENT_INVALID) { break; } data->state = 5; GASNETI_FALLTHROUGH case 5: /* Final Out Barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } data->state = 6; GASNETI_FALLTHROUGH case 6: /*done*/ gasnete_coll_free_scratch(op); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_scat_TreePut(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, size_t dist, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF((flags & GASNET_COLL_OUT_ALLSYNC)) | GASNETE_COLL_USE_SCRATCH | GASNETE_COLL_GENERIC_OPT_P2P_IF(1); return gasnete_coll_generic_scatter_nb(team, dst, srcimage, src, nbytes, dist, flags, &gasnete_coll_pf_scat_TreePut, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, srcimage, team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*like the scatter treePut but data is not resuffled, instead it is sent from directly where it is*/ static int gasnete_coll_pf_scat_TreePutNoCopy(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; gasnete_coll_local_tree_geom_t *geom = data->tree_geom; const gasnete_coll_scatter_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, scatter); gex_Rank_t * const children = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); const gex_Rank_t child_count = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); int result = 0,i; size_t sent_bytes=0; switch (data->state) { case 0: /*scratch alloc*/ if(op->scratch_req) { if(!gasnete_coll_scratch_alloc_nb(op GASNETI_THREAD_PASS)) break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data)){ break; } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Optional IN barrier over the SAME tree */ if ((op->flags & GASNET_COLL_IN_ALLSYNC) && !gasnete_coll_generic_upsync_acq(op, args->srcrank, 0, child_count GASNETI_THREAD_PASS)) { break; } data->state = 3; GASNETI_FALLTHROUGH case 3: if (op->team->myrank == args->srcrank) { if(args->dist!=args->nbytes) { gasneti_fatalerror("not yet supported!"); } else { gasneti_assert(geom->num_rotations == 1); gasnete_begin_nbi_accessregion(0,1 GASNETI_THREAD_PASS); for(i=0; isubtree_sizes[i] <= op->team->total_ranks) { /*can do one put since data is already contiguous*/ int8_t *send_arr = gasnete_coll_scale_ptr(args->src,(geom->child_offset[i]+1+op->team->myrank)%op->team->total_ranks,args->nbytes); { gasnete_tm_p2p_signalling_put(op, children[i], gasnete_coll_scratch_addr(op, child, i, 0), send_arr, args->nbytes*geom->subtree_sizes[i], GEX_EVENT_NOW, 0, 0, 1 GASNETI_THREAD_PASS); } } else { int8_t *send_arr = gasnete_coll_scale_ptr(args->src,(geom->child_offset[i]+1+op->team->myrank),args->nbytes); int8_t *send_arr2 = args->src; size_t first_part = op->team->total_ranks - children[i]; size_t second_part = geom->subtree_sizes[i]-first_part; /*we dont' need the case for a direct put here because if there is exactly one node in the subtree then the top condition will always be true*/ /*need to do two puts w/ the wrap*/ gasnete_tm_p2p_counting_put(op, children[i], gasnete_coll_scratch_addr(op, child, i, 0), send_arr, args->nbytes*first_part,0 GASNETI_THREAD_PASS); gasnete_tm_p2p_counting_put(op, children[i], gasnete_coll_scratch_addr(op, child, i, first_part*args->nbytes), send_arr2, args->nbytes*second_part,0 GASNETI_THREAD_PASS); } } data->handle = gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); gasnete_coll_save_event(&data->handle); } GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, gasnete_coll_scale_ptr(args->src,args->dist,(op->team->myrank)), args->nbytes); } else if (data->p2p->state[0] || (op->team->myrank+geom->mysubtree_size > op->team->total_ranks && gasneti_weakatomic_read(&(data->p2p->counter[0]),0)==(op->flags& GASNET_COLL_IN_ALLSYNC ? child_count:0)+2)){ int8_t *scratchspace = gasnete_coll_scratch_myaddr(op, 0); /*read memory barrier to ensure that the reading of the data doesn't preceed the flag*/ gasneti_sync_reads(); gasnete_begin_nbi_accessregion(0,1 GASNETI_THREAD_PASS); /*skip the first slot of the input array since it is destined for me*/ for(i=0; ichild_offset[i]+1),args->nbytes), args->nbytes*geom->subtree_sizes[i], GEX_EVENT_NOW, 0, 0, 1 GASNETI_THREAD_PASS); } sent_bytes+=geom->subtree_sizes[i]*args->nbytes; } data->handle = gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); gasnete_coll_save_event(&data->handle); /* In the case of Mysync or being an intermediate node the data is always sent to the scratch space so copy it out*/ GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, scratchspace, args->nbytes); } else { break; /* data not yet arrived*/ } data->state = 4; GASNETI_FALLTHROUGH case 4: /* wait for all puts to finish*/ if (data->handle != GEX_EVENT_INVALID) { break; } data->state = 5; GASNETI_FALLTHROUGH case 5: /* Final Out Barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } data->state = 6; GASNETI_FALLTHROUGH case 6: /*done*/ gasnete_coll_free_scratch(op); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_scat_TreePutNoCopy(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, size_t dist, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { if(srcimage!=0) { return gasnete_coll_scat_TreePut(team, dst, srcimage, src, nbytes, dist, flags, coll_params, sequence GASNETI_THREAD_PASS); } else { int options = GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF((flags & GASNET_COLL_OUT_ALLSYNC)) | GASNETE_COLL_USE_SCRATCH | GASNETE_COLL_GENERIC_OPT_P2P_IF(1); return gasnete_coll_generic_scatter_nb(team, dst, srcimage, src, nbytes, dist, flags, &gasnete_coll_pf_scat_TreePutNoCopy, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, srcimage, team), sequence,coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } } static int gasnete_coll_pf_scat_TreePutSeg(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_scatter_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, scatter); int result =0; switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Initiate data movement */ { gasnete_coll_handle_vec_t *handle_vec; size_t seg_size = gasnete_coll_get_pipe_seg_size(op->team->autotune_info, GASNET_COLL_SCATTER_OP, op->flags); int num_segs = ((args->nbytes % seg_size) == 0 ? args->nbytes/seg_size : (args->nbytes/seg_size)+1); int flags = GASNETE_COLL_FORWARD_FLAGS(op->flags); gasnete_coll_implementation_t impl; gex_Rank_t srcproc = args->srcrank; size_t sent_bytes=0; int i; impl = gasnete_coll_get_implementation(); data->private_data = gasneti_malloc(sizeof(gasnete_coll_handle_vec_t)); handle_vec = data->private_data; handle_vec->num_handles = num_segs; handle_vec->handles = gasneti_malloc(sizeof(gex_Event_t)*num_segs); impl->fn_ptr.untyped_fn = NULL; /*strip the last argument off which contains the pipeline segment size*/ impl->num_params = op->num_coll_params; GASNETI_MEMCPY_SAFE_IDENTICAL(impl->param_list, op->param_list, sizeof(uint32_t)*op->num_coll_params); impl->tree_type = data->tree_geom->tree_type; for(i=0; ihandles[i] = gasnete_coll_scat_TreePut(op->team, gasnete_coll_scale_ptr(args->dst,1,sent_bytes) , srcproc, gasnete_coll_scale_ptr(args->src,1,sent_bytes), seg_size, args->nbytes, flags, impl, op->sequence+i+1 GASNETI_THREAD_PASS); gasnete_coll_save_event(&handle_vec->handles[i]); sent_bytes += seg_size; } handle_vec->handles[i] = gasnete_coll_scat_TreePut(op->team, gasnete_coll_scale_ptr(args->dst,1,sent_bytes) , srcproc, gasnete_coll_scale_ptr(args->src,1,sent_bytes), args->nbytes-sent_bytes, args->nbytes, flags, impl, op->sequence+i+1 GASNETI_THREAD_PASS); gasnete_coll_save_event(&handle_vec->handles[i]); gasnete_coll_free_implementation(impl); } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Sync data movement */ { gasnete_coll_handle_vec_t *handle_vec = (gasnete_coll_handle_vec_t*) data->private_data; if (!gasnete_coll_generic_coll_sync(handle_vec->handles, handle_vec->num_handles GASNETI_THREAD_PASS)) { break; } gasneti_free(handle_vec->handles); } data->state = 3; GASNETI_FALLTHROUGH case 3: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasneti_free(data->private_data); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_scat_TreePutSeg(gasnet_team_handle_t team, void *dst, gasnet_image_t srcimage, void *src, size_t nbytes, size_t dist, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF(!(flags & GASNETE_COLL_SUBORDINATE)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNETE_COLL_SUBORDINATE)); int num_segs; size_t seg_size; gasneti_assert(coll_params->num_params >= 1); seg_size = coll_params->param_list[0]; gasneti_assert(seg_size); num_segs = ((nbytes % seg_size) == 0 ? nbytes/seg_size : (nbytes/seg_size)+1); gasneti_assert_int(num_segs ,<=, GASNETE_COLL_MAX_NUM_SEGS); return gasnete_coll_generic_scatter_nb(team, dst, srcimage, src, nbytes, dist, flags, &gasnete_coll_pf_scat_TreePutSeg, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, srcimage, team), (flags & GASNETE_COLL_SUBORDINATE ? sequence : num_segs), coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_gather_nb() */ /* gath Put: all nodes perform uncoordinated puts */ /* Valid for SINGLE and LOCAL, any size < scratch size ... remote threads will not touch user buffers*/ /* XXX Note that an optimization can be made here where the data can be put into the user buffer at the root*/ /* XXX However this will make this implementation only valid for SINGLE and not LOCAL*/ static int gasnete_coll_pf_gath_TreePut(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; gasnete_coll_local_tree_geom_t *geom = data->tree_geom; const gasnete_coll_gather_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, gather); gex_Rank_t * const children = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); gex_Rank_t parent = GASNETE_COLL_TREE_GEOM_PARENT(geom); const gex_Rank_t child_count = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); gex_Rank_t expected_count; gex_Rank_t child; int result = 0; int i=0; switch (data->state) { case 0: if(!gasnete_coll_scratch_alloc_nb(op GASNETI_THREAD_PASS)) break; data->state = 1; GASNETI_FALLTHROUGH case 1: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data)|| !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Local Data Movement */ /* go up the tree with the data */ /* copy my data into the start of the scratch space */ if(child_count > 0) { { GASNETE_FAST_UNALIGNED_MEMCPY(gasnete_coll_scratch_myaddr(op, 0), (int8_t*)args->src, args->nbytes); } } else if_pf(op->team->total_ranks == 1) { GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, args->src, args->nbytes); data->state = 4; break; } data->state = 3; GASNETI_FALLTHROUGH case 3: if(op->team->myrank == args->dstrank) { { int8_t* scratchspace = gasnete_coll_scratch_myaddr(op, 0); if(gasneti_weakatomic_read(&(data->p2p->counter[0]),0) < child_count) { /* all children have not yet reported*/ break; } gasneti_sync_reads(); /*all children have reported so now need to reshuffle the data into the correct place*/ if(args->nbytes == args->dist) { gasneti_assert(geom->num_rotations==1); gasnete_coll_local_rotate_right(args->dst,scratchspace, args->nbytes, op->team->total_ranks, geom->rotation_points[0]); } else { for(i=0; iteam->total_ranks; i++) { GASNETE_FAST_UNALIGNED_MEMCPY(gasnete_coll_scale_ptr(args->dst, (i+geom->rotation_points[0])%op->team->total_ranks, args->dist), gasnete_coll_scale_ptr(scratchspace, i,args->nbytes), args->nbytes); } } } } else { int8_t* src_addr; if(child_count > 0) { if(gasneti_weakatomic_read(&(data->p2p->counter[0]),0) < child_count) { /* all children have not yet reported*/ break; } src_addr = gasnete_coll_scratch_myaddr(op, 0); } else { src_addr = (int8_t*) args->src; } /*all children have reported*/ gasneti_sync_reads(); { /*data is going into the scratch space*/ if(op->flags & GASNET_COLL_OUT_ALLSYNC) { /*since the parent will signal us anyway with a barrier when the data is complete we can safely send w/o local completion*/ gasnete_tm_p2p_counting_putAsync(op, parent, gasnete_coll_scratch_addr(op, parent, 0, (geom->sibling_offset+1)*args->nbytes), src_addr, args->nbytes*geom->mysubtree_size,0 GASNETI_THREAD_PASS); } else { /*in the case of an out NOSYNC the parent will not be waiting to signal so the first level of children will be the last in the tree to leave*/ /*in the case of an out mysync there will be no signal when the scratch space nor the src data is safe to reuse so we must wait*/ /*in either case we need local completion semantics*/ gasnete_tm_p2p_counting_put/*Async*/(op, parent, gasnete_coll_scratch_addr(op, parent, 0, (geom->sibling_offset+1)*args->nbytes), src_addr, args->nbytes*geom->mysubtree_size,0 GASNETI_THREAD_PASS); } } } data->state = 4; GASNETI_FALLTHROUGH case 4: /*sync data movement*/ if(data->handle !=GEX_EVENT_INVALID) { break; } data->state = 5; GASNETI_FALLTHROUGH case 5: /*node level barrier*/ /* go down the tree with the barrier again*/ if(op->flags & GASNET_COLL_OUT_ALLSYNC) { if(op->team->myrank!=args->dstrank) { /*wait for clear signal from parent*/ expected_count = child_count + 1; if (gasneti_weakatomic_read(&(data->p2p->counter[0]), 0) < expected_count) { break; } } /*send clear signal to all the other nodes*/ for(child=0; childstate = 6; GASNETI_FALLTHROUGH case 6: /* done*/ gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); gasnete_coll_free_scratch(op); } return result; } GASNETE_COLL_DECLARE_GATHER_ALG(TreePut) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF ((flags & GASNET_COLL_IN_ALLSYNC)) | GASNETE_COLL_USE_SCRATCH | GASNETE_COLL_GENERIC_OPT_P2P_IF(1); return gasnete_coll_generic_gather_nb(team, dstimage, dst, src, nbytes, dist, flags, &gasnete_coll_pf_gath_TreePut, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, dstimage, team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } static int gasnete_coll_pf_gath_TreePutNoCopy(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; gasnete_coll_local_tree_geom_t *geom = data->tree_geom; const gasnete_coll_gather_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, gather); gex_Rank_t * const children = GASNETE_COLL_TREE_GEOM_CHILDREN(geom); gex_Rank_t parent = GASNETE_COLL_TREE_GEOM_PARENT(geom); const gex_Rank_t child_count = GASNETE_COLL_TREE_GEOM_CHILD_COUNT(geom); gex_Rank_t child; int result = 0; switch (data->state) { case 0: if(!gasnete_coll_scratch_alloc_nb(op GASNETI_THREAD_PASS)) break; data->state = 1; GASNETI_FALLTHROUGH case 1: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data)|| !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 2; GASNETI_FALLTHROUGH case 2: /* no need for local datamovement since all data movement is done through the network*/ /*since i am here, my data is ready to be shipped up the tree*/ if(op->team->myrank!=args->dstrank) { { /*data is going into the scratch space*/ if(op->flags & GASNET_COLL_OUT_ALLSYNC) { /*since the parent will signal us anyway with a barrier when the data is complete we can safely send w/o local completion*/ gasnete_tm_p2p_counting_putAsync(op, parent, gasnete_coll_scratch_addr(op, parent, 0, (geom->sibling_offset)*args->nbytes), args->src, args->nbytes,0 GASNETI_THREAD_PASS); } else { /*in the case of an out NOSYNC the parent will not be waiting to signal so the first level of children will be the last in the tree to leave*/ /*in the case of an out mysync there will be no signal when the scratch space nor the src data is safe to reuse so we must wait*/ /*in either case we need local completion semantics*/ gasnete_tm_p2p_counting_put/*Async*/(op, parent, gasnete_coll_scratch_addr(op, parent, 0, (geom->sibling_offset)*args->nbytes), args->src, args->nbytes,0 GASNETI_THREAD_PASS); } } } else { GASNETE_FAST_UNALIGNED_MEMCPY(gasnete_coll_scale_ptr(args->dst,op->team->myrank,args->nbytes), (int8_t*)args->src, args->nbytes); } data->state = 3; GASNETI_FALLTHROUGH case 3: if(op->team->myrank == args->dstrank) { gasneti_assert(geom->num_rotations==1); { int8_t* scratchspace = gasnete_coll_scratch_myaddr(op, 0); /*leaf children will singal once while non-leaf children will signal twice times*/ if(gasneti_weakatomic_read(&(data->p2p->counter[0]),0) < (geom->num_leaf_children + geom->num_non_leaf_children*2)) { /* all children have not yet reported*/ break; } gasneti_sync_reads(); /*all children have reported so now need to reshuffle the data into the correct place*/ #if 0 if(args->nbytes == args->dist) { gasneti_assert(geom->num_rotations==1); gasnete_coll_local_rotate_right(args->dst,scratchspace, args->nbytes, op->team->total_ranks, geom->rotation_points[0]); } else { int i; for(i=0; iteam->total_ranks; i++) { GASNETE_FAST_UNALIGNED_MEMCPY(gasnete_coll_scale_ptr(args->dst, (i+geom->rotation_points[0])%op->team->total_ranks, args->dist), gasnete_coll_scale_ptr(scratchspace, i,args->nbytes), args->nbytes); } } #else GASNETI_MEMCPY_SAFE_EMPTY( gasnete_coll_scale_ptr(args->dst,1,args->nbytes), scratchspace, args->nbytes*(op->team->total_ranks-1)); #endif } } else if(child_count>0){ int8_t* src_addr; if(gasneti_weakatomic_read(&(data->p2p->counter[0]),0) < (geom->num_leaf_children+geom->num_non_leaf_children*2)) { /* all children have not yet reported*/ break; } gasneti_sync_reads(); src_addr = gasnete_coll_scratch_myaddr(op, 0); /*all children have reported*/ { /*data is going into the scratch space*/ if(op->flags & GASNET_COLL_OUT_ALLSYNC) { /*since the parent will signal us anyway with a barrier when the data is complete we can safely send w/o local completion*/ gasnete_tm_p2p_counting_putAsync(op, parent, gasnete_coll_scratch_addr(op, parent, 0, (1+geom->sibling_offset)*args->nbytes), src_addr, args->nbytes*(geom->mysubtree_size-1),0 GASNETI_THREAD_PASS); } else { /*in the case of an out NOSYNC the parent will not be waiting to signal so the first level of children will be the last in the tree to leave*/ /*in the case of an out mysync there will be no signal when the scratch space nor the src data is safe to reuse so we must wait*/ /*in either case we need local completion semantics*/ gasnete_tm_p2p_counting_put/*Async*/(op, parent, gasnete_coll_scratch_addr(op, parent, 0, (1+geom->sibling_offset)*args->nbytes), src_addr, args->nbytes*(geom->mysubtree_size-1),0 GASNETI_THREAD_PASS); } } } else { /*no children data movement already hadled in state 2*/ } data->state = 4; GASNETI_FALLTHROUGH case 4: /*sync data movement*/ /*since we have initiated possibly more than one put we need to sync all of them*/ if(data->handle !=GEX_EVENT_INVALID || data->handle2 !=GEX_EVENT_INVALID) { break; } data->state = 5; GASNETI_FALLTHROUGH case 5: /*node level barrier*/ /* go down the tree with the barrier again*/ if(op->flags & GASNET_COLL_OUT_ALLSYNC) { if(op->team->myrank!=args->dstrank) { /*wait for clear signal from parent*/ if (gasneti_weakatomic_read(&(data->p2p->counter[1]), 0) == 0) { break; } } /*send clear signal to all the other nodes*/ for(child=0; childstate = 6; GASNETI_FALLTHROUGH case 6: /* done*/ gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); gasnete_coll_free_scratch(op); } return result; } GASNETE_COLL_DECLARE_GATHER_ALG(TreePutNoCopy) { if(dstimage != 0) { /*tree put copy as written doesn't work when the root is not 0*/ return gasnete_coll_gath_TreePut(team, dstimage, dst, src, nbytes, dist, flags, coll_params, sequence GASNETI_THREAD_PASS); } else { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF ((flags & GASNET_COLL_IN_ALLSYNC)) | GASNETE_COLL_USE_SCRATCH | GASNETE_COLL_GENERIC_OPT_P2P_IF(1); return gasnete_coll_generic_gather_nb(team, dstimage, dst, src, nbytes, dist, flags, &gasnete_coll_pf_gath_TreePutNoCopy, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, dstimage, team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } } static int gasnete_coll_pf_gath_TreePutSeg(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; const gasnete_coll_gather_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, gather); int result =0; switch (data->state) { case 0: /* Optional IN barrier */ if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { break; } data->state = 1; GASNETI_FALLTHROUGH case 1: /* Initiate data movement */ { gasnete_coll_handle_vec_t *handle_vec; size_t seg_size = gasnete_coll_get_pipe_seg_size(op->team->autotune_info, GASNET_COLL_GATHER_OP, op->flags); int num_segs = ((args->nbytes % seg_size) == 0 ? args->nbytes/seg_size : (args->nbytes/seg_size)+1); int flags = GASNETE_COLL_FORWARD_FLAGS(op->flags); gex_Rank_t dstproc = args->dstrank; size_t sent_bytes=0; int i; gasnete_coll_implementation_t impl = gasnete_coll_get_implementation(); impl->fn_ptr.untyped_fn = NULL; /*strip the last argument off which contains the pipeline segment size*/ impl->num_params = op->num_coll_params; GASNETI_MEMCPY_SAFE_IDENTICAL(impl->param_list, op->param_list, sizeof(uint32_t)*op->num_coll_params); impl->tree_type = data->tree_geom->tree_type; data->private_data = gasneti_malloc(sizeof(gasnete_coll_handle_vec_t)); handle_vec = data->private_data; handle_vec->num_handles = num_segs; handle_vec->handles = gasneti_malloc(sizeof(gex_Event_t)*num_segs); for(i=0; ihandles[i] = gasnete_coll_gath_TreePut(op->team, dstproc, gasnete_coll_scale_ptr(args->dst,1,sent_bytes), gasnete_coll_scale_ptr(args->src,1,sent_bytes), seg_size, args->nbytes, flags, impl, op->sequence+i+1 GASNETI_THREAD_PASS); gasnete_coll_save_event(&handle_vec->handles[i]); sent_bytes += seg_size; } handle_vec->handles[i] = gasnete_coll_gath_TreePut(op->team, dstproc, gasnete_coll_scale_ptr(args->dst,1,sent_bytes), gasnete_coll_scale_ptr(args->src,1,sent_bytes), args->nbytes-sent_bytes, args->nbytes, flags, impl, op->sequence+i+1 GASNETI_THREAD_PASS); gasnete_coll_save_event(&handle_vec->handles[i]); gasnete_coll_free_implementation(impl); } data->state = 2; GASNETI_FALLTHROUGH case 2: /* Sync data movement */ { gasnete_coll_handle_vec_t *handle_vec = (gasnete_coll_handle_vec_t*) data->private_data; if (!gasnete_coll_generic_coll_sync(handle_vec->handles, handle_vec->num_handles GASNETI_THREAD_PASS)) { break; } gasneti_free(handle_vec->handles); } data->state = 3; GASNETI_FALLTHROUGH case 3: /* Optional OUT barrier */ if (!gasnete_coll_generic_outsync(op->team, data)) { break; } gasneti_free(data->private_data); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } GASNETE_COLL_DECLARE_GATHER_ALG(TreePutSeg) { int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF(!(flags & GASNETE_COLL_SUBORDINATE)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNETE_COLL_SUBORDINATE)); size_t seg_size; int num_segs; gasneti_assert(coll_params->num_params >= 1); seg_size = (size_t)coll_params->param_list[0]; gasneti_assert(seg_size); num_segs = (nbytes + seg_size - 1)/seg_size; gasneti_assert_int(num_segs ,<=, GASNETE_COLL_MAX_NUM_SEGS); return gasnete_coll_generic_gather_nb(team, dstimage, dst, src, nbytes, nbytes, flags, &gasnete_coll_pf_gath_TreePutSeg, options, gasnete_coll_local_tree_geom_fetch(coll_params->tree_type, dstimage, team), (flags & GASNETE_COLL_SUBORDINATE ? sequence : num_segs), coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_gather_all_nb() */ static int gasnete_coll_pf_gall_Dissem(gasnete_coll_op_t *op GASNETI_THREAD_FARG) { gasnete_coll_generic_data_t *data = op->data; gasnete_coll_dissem_info_t *dissem = data->dissem_info; const gasnete_coll_gather_all_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, gather_all); int result = 0; /* State 0: In barrier (if needed)*/ if(data->state == 0) { if(op->scratch_req) if(!gasnete_coll_scratch_alloc_nb(op GASNETI_THREAD_PASS)) return 0; gasneti_assert(dissem->dissemination_radix==2); /* this function only works for radix 2*/ data->state++; } if(data->state == 1) { if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { return 0; } if(op->team->total_ranks == 1) { GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, args->src, args->nbytes); data->state = dissem->dissemination_phases*2+2; } else { /*memcpy the data into the start of the scratch space*/ GASNETE_FAST_UNALIGNED_MEMCPY(gasnete_coll_scratch_myaddr(op, 0), args->src, args->nbytes); data->state++; } } if(data->state >= 2 && data->state <= (dissem->dissemination_phases-1)*2+1) { uint32_t phase = (data->state-2)/2; size_t curr_len = args->nbytes*(1<state % 2 == 0) { /* send in this phase */ gasnete_tm_p2p_signalling_put(op, dstrank, gasnete_coll_scratch_addr(op, dstrank, 0, curr_len), gasnete_coll_scratch_myaddr(op, 0), curr_len, GEX_EVENT_NOW, 0, phase, 1 GASNETI_THREAD_PASS); data->state++; } if(data->state % 2 == 1){ if(data->p2p->state[phase] == 1) { data->state++; } else { return 0; } } } if(data->state == (dissem->dissemination_phases)*2) { uint32_t phase = (data->state-2)/2; size_t nblk = op->team->total_ranks - (1<nbytes*(nblk); gex_Rank_t dstrank = (GASNETE_COLL_DISSEM_GET_BEHIND_PEERS_PHASE(dissem, phase))[0]; gasnete_tm_p2p_signalling_put(op, dstrank, gasnete_coll_scratch_addr(op, dstrank, 0, (1<nbytes), gasnete_coll_scratch_myaddr(op, 0), curr_len, GEX_EVENT_NOW, 0, phase, 1 GASNETI_THREAD_PASS); data->state++; } if(data->state == (dissem->dissemination_phases)*2+1) { uint32_t phase = (data->state-2)/2; if(data->p2p->state[phase] !=1) return 0; /*wait for the last transfer to finish*/ gasneti_sync_reads(); /*rotate the data around*/ GASNETI_MEMCPY_SAFE_IDENTICAL((int8_t*)args->dst+args->nbytes*op->team->myrank, gasnete_coll_scratch_myaddr(op, 0), args->nbytes*(op->team->total_ranks-op->team->myrank)); GASNETI_MEMCPY_SAFE_IDENTICAL(args->dst, gasnete_coll_scratch_myaddr(op, args->nbytes*(op->team->total_ranks-op->team->myrank)), args->nbytes*op->team->myrank); data->state++; } if(data->state == (dissem->dissemination_phases)*2+2) { if (!gasnete_coll_generic_outsync(op->team, data)) { return 0; } /*free up the scratch space used by this op*/ if(op->scratch_req) gasnete_coll_free_scratch(op); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_gall_Dissem(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { /*Since the algorithm is naturally in_no / out_no use in-barrier if anything besides IN NOSYNC. Use out barrier only if out_ALLSYNC since algorithm does not need a full barrier for OUT_MYSYNC*/ int options = GASNETE_COLL_GENERIC_OPT_INSYNC_IF ((flags & GASNET_COLL_IN_ALLSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF((flags & GASNET_COLL_OUT_ALLSYNC)) | GASNETE_COLL_GENERIC_OPT_P2P | ((team->total_ranks > 1) ? GASNETE_COLL_USE_SCRATCH : 0); return gasnete_coll_generic_gather_all_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_gall_Dissem, options, NULL, sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ /* gasnete_coll_exchange_nb() */ /* exchg Brucks: Implemented using Dissemination based exchange algorithm */ /* Based on Bruck et al. algorithm (from IEEE Transactions on Parallel and Distributed Computiing Vol. 8 No. 11 Nov. 1997) */ GASNETI_INLINE(gasnete_coll_mypow) int gasnete_coll_mypow(int base, int pow) { int ret = 1; while(pow!=0) { ret *=base; pow--; } return ret; } GASNETI_INLINE(gasnete_coll_pack_all_to_all_msg) int gasnete_coll_pack_all_to_all_msg(void *src, void *dest, size_t nbytes, int digit, int radix, int j, int total_ranks) { int i_idx; int ret=0; /*pack if the digit_th digit of the radix-r representation of block_id is j*/ for(i_idx=0; i_idxdata; gasnete_coll_dissem_info_t *dissem = data->dissem_info; const gasnete_coll_exchange_args_t *args = GASNETE_COLL_GENERIC_ARGS(data, exchange); int result = 0; size_t offset; void *scratch2; void *scratch1; /*this will be a slightly different poll function than the other ones*/ /*the state will be used to describe the dissemination phase*/ /*reserving state 0 and dissem_phase*2+2+1 for the in/out barrier stages*/ /*state 1 will be used for local memory copies*/ /*state dissem_phases*2+2 will represent memory copies on the output side*/ /*states 2 through dissem_phases*2+1 represent intermediary steps*/ /*each dissem phase will get two steps, one for sending and one for recieiving*/ if(data->state == 0) { if_pt(op->scratch_req) if(!gasnete_coll_scratch_alloc_nb(op GASNETI_THREAD_PASS)) return 0; data->state = 1; } scratch1 = gasnete_coll_scratch_myaddr(op, 0); scratch2 = (int8_t*)scratch1 + ((args->nbytes)*dissem->max_dissem_blocks)*((2)*(dissem->dissemination_radix-1)); if(data->state == 1) { if (!gasnete_coll_generic_all_threads(data) || !gasnete_coll_generic_insync(op->team, data)) { return result; } if(op->team->total_ranks == 1) { GASNETE_FAST_UNALIGNED_MEMCPY(args->dst, args->src, args->nbytes); data->state = dissem->dissemination_phases*3+3; return 0; } /* perform local rotation right by total_ranks - myrank elements*/ gasnete_coll_local_rotate_right((int8_t*) scratch2, args->src, args->nbytes, op->team->total_ranks, op->team->total_ranks - op->team->myrank); data->state = 2; } if(data->state>=2 && data->state<=dissem->dissemination_phases*3+1) { /*data transfer stages*/ /*global phase id */ int destnode,nblocks; gex_Rank_t* out_nodes, *in_nodes; int phase = (data->state - 2)/3; int h,j; offset = GASNETE_COLL_DISSEM_MAX_BLOCKS(dissem)*args->nbytes; h = GASNETE_COLL_DISSEM_GET_PEER_COUNT_PHASE(dissem, phase); out_nodes = GASNETE_COLL_DISSEM_GET_FRONT_PEERS_PHASE(dissem, phase); in_nodes =GASNETE_COLL_DISSEM_GET_BEHIND_PEERS_PHASE(dissem, phase); #define IDX_EXPR (((phase%2)*(dissem->dissemination_radix-1) + (j))*offset) #define IDXP1_EXPR ((((phase+1)%2)*(dissem->dissemination_radix-1) + (j))*offset) if((data->state-2) % 3 == 0) { /*send the ok to send signal*/ gasneti_sync_writes(); for(j=0; jstate++; } if((data->state-2) % 3 == 1) { /*XXX: Need atomic counter read for higher radices*/ /* if(data->p2p->state[phase*2] != h) return 0;*/ if_pf(gasneti_weakatomic_read(&(data->p2p->counter[phase*2]),0)!=h) return 0; gasneti_sync_reads(); for(j=0; jnbytes, phase, dissem->dissemination_radix, j+1, op->team->total_ranks); gasnete_tm_p2p_counting_put(op, destnode, gasnete_coll_scratch_addr(op, destnode, 0, IDXP1_EXPR), (int8_t*)scratch1+IDX_EXPR, nblocks*args->nbytes, phase*2+1 GASNETI_THREAD_PASS); } /*once all the change the state and return 0*/ /*let the poll function bring us back here*/ data->state++; return 0; } if((data->state-2) % 3 == 2) { /*receive in odd sub phases*/ /*wait for all the states to trip*/ /*need to change this to an atomic state increment to do this properly for radix>2*/ if(gasneti_weakatomic_read(&(data->p2p->counter[phase*2+1]),0) == h) { gasneti_sync_reads(); for(j=0; jnbytes, phase, dissem->dissemination_radix, j+1, op->team->total_ranks); } data->state++; return 0; } else { return 0; } } #undef IDX_EXPR #undef IDXP1_EXPR } if(data->state == dissem->dissemination_phases*3+2) { int i; int srcrank; for(i=0; iteam->total_ranks; i++) { srcrank = (op->team->myrank - i); if(srcrank < 0) { srcrank = op->team->total_ranks+srcrank; } GASNETE_FAST_UNALIGNED_MEMCPY((int8_t*)args->dst+i*args->nbytes, (int8_t*)scratch2+srcrank*args->nbytes, args->nbytes); } data->state ++; } if(data->state == dissem->dissemination_phases*3+3) { if (!gasnete_coll_generic_outsync(op->team, data)) { return 0; } /*free up the scratch space used by this op*/ if(op->scratch_req) gasnete_coll_free_scratch(op); gasnete_coll_generic_free(op->team, data GASNETI_THREAD_PASS); result = (GASNETE_COLL_OP_COMPLETE | GASNETE_COLL_OP_INACTIVE); } return result; } extern gex_Event_t gasnete_coll_exchg_Dissem2(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_GENERIC_OPT_P2P | GASNETE_COLL_GENERIC_OPT_INSYNC_IF (!(flags & GASNET_COLL_IN_NOSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNET_COLL_OUT_NOSYNC)) | ((team->total_ranks > 1) ? GASNETE_COLL_USE_SCRATCH : 0); int radix; radix = 2; return gasnete_coll_generic_exchange_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_exchg_Dissem, options, NULL, gasnete_coll_fetch_dissemination(radix ,team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } extern gex_Event_t gasnete_coll_exchg_Dissem3(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_USE_SCRATCH | GASNETE_COLL_GENERIC_OPT_P2P | GASNETE_COLL_GENERIC_OPT_INSYNC_IF (!(flags & GASNET_COLL_IN_NOSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNET_COLL_OUT_NOSYNC)); int radix; radix = 3; return gasnete_coll_generic_exchange_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_exchg_Dissem, options, NULL, gasnete_coll_fetch_dissemination(radix ,team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } extern gex_Event_t gasnete_coll_exchg_Dissem4(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_USE_SCRATCH | GASNETE_COLL_GENERIC_OPT_P2P | GASNETE_COLL_GENERIC_OPT_INSYNC_IF (!(flags & GASNET_COLL_IN_NOSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNET_COLL_OUT_NOSYNC)); int radix; radix = 4; return gasnete_coll_generic_exchange_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_exchg_Dissem, options, NULL, gasnete_coll_fetch_dissemination(radix ,team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } extern gex_Event_t gasnete_coll_exchg_Dissem8(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_USE_SCRATCH | GASNETE_COLL_GENERIC_OPT_P2P | GASNETE_COLL_GENERIC_OPT_INSYNC_IF (!(flags & GASNET_COLL_IN_NOSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNET_COLL_OUT_NOSYNC)); int radix; radix = 8; return gasnete_coll_generic_exchange_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_exchg_Dissem, options, NULL, gasnete_coll_fetch_dissemination(radix ,team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } extern gex_Event_t gasnete_coll_exchg_FlatScratch(gasnet_team_handle_t team, void *dst, void *src, size_t nbytes, int flags, gasnete_coll_implementation_t coll_params, uint32_t sequence GASNETI_THREAD_FARG) { int options = GASNETE_COLL_USE_SCRATCH | GASNETE_COLL_GENERIC_OPT_P2P | GASNETE_COLL_GENERIC_OPT_INSYNC_IF (!(flags & GASNET_COLL_IN_NOSYNC)) | GASNETE_COLL_GENERIC_OPT_OUTSYNC_IF(!(flags & GASNET_COLL_OUT_NOSYNC)); int radix; radix = team->total_ranks; return gasnete_coll_generic_exchange_nb(team, dst, src, nbytes, flags, &gasnete_coll_pf_exchg_Dissem, options, NULL, gasnete_coll_fetch_dissemination(radix ,team), sequence, coll_params->num_params, coll_params->param_list GASNETI_THREAD_PASS); } /*---------------------------------------------------------------------------------*/ gasnet-2025.8.0/gasnet_internal.h0000664000175000017500000014673615142313673016771 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_internal.h $ * Description: GASNet header for internal definitions used in GASNet implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_INTERNAL_H #define _GASNET_INTERNAL_H #define _IN_GASNET_INTERNAL_H #define _INCLUDED_GASNET_INTERNAL_H #ifdef _INCLUDED_GASNETEX_H #error Internal GASNet code should not directly include gasnetex.h, just gasnet_internal.h #endif #include /* MUST come first to ensure correct inttypes behavior */ #include #if GASNETI_NEED_GASNET_VIS_H #include #endif #if GASNETI_NEED_GASNET_COLL_H #include #endif #if GASNETI_NEED_GASNET_RATOMIC_H #include #endif #if GASNETI_NEED_GASNET_MK_H #include #endif #if GASNETI_COMPILER_IS_UNKNOWN #error "Invalid attempt to build GASNet with a compiler other than the one probed at configure time" #endif GASNETI_BEGIN_EXTERNC GASNETI_BEGIN_NOWARN #include #include #include #include #include #include #include #if defined(HAVE_MALLOC_H) && !PLATFORM_OS_OPENBSD /* OpenBSD warns that malloc.h is obsolete */ #include /* prevent problems with redefinition of malloc on solaris */ #endif #if PLATFORM_COMPILER_SUN_C /* disable warnings triggerred by some macro idioms we use */ #pragma error_messages(off, E_END_OF_LOOP_CODE_NOT_REACHED) #pragma error_messages(off, E_STATEMENT_NOT_REACHED) #endif extern int gasneti_init_done; /* true after init */ extern int gasneti_attach_done; /* true after attach */ /* conduit-independent sanity checks */ extern void gasneti_check_config_preinit(void); extern void gasneti_check_config_postattach(void); extern int gasneti_malloc_munmap_disabled; /* decode the command-line arguments */ extern void gasneti_decode_args(int *argc, char ***argv); /* extract exit coordination timeout from environment vars (with defaults) */ extern double gasneti_get_exittimeout(double dflt_max, double dflt_min, double dflt_factor, double lower_bound); // Used in some conduits to coordinate user-provided exit code across layers extern gasneti_atomic_t gasneti_exit_code; /* Safe memory allocation/deallocation Beware - in debug mode, gasneti_malloc/gasneti_calloc/gasneti_free are NOT compatible with malloc/calloc/free (freeing memory allocated from one using the other is likely to crash) */ #define gasneti_malloc(sz) _gasneti_malloc((sz) GASNETI_CURLOCAARG) #define gasneti_malloc_allowfail(sz) _gasneti_malloc_allowfail((sz) GASNETI_CURLOCAARG) #define gasneti_calloc(N,S) _gasneti_calloc(N,S GASNETI_CURLOCAARG) #define gasneti_realloc(ptr,sz) _gasneti_realloc((ptr),(sz) GASNETI_CURLOCAARG) #define gasneti_free(ptr) _gasneti_free((ptr) GASNETI_CURLOCAARG) #define gasneti_leak(ptr) _gasneti_leak((ptr) GASNETI_CURLOCAARG) #define gasneti_strdup(ptr) _gasneti_strdup((ptr) GASNETI_CURLOCAARG) #define gasneti_strndup(ptr,sz) _gasneti_strndup((ptr),(sz) GASNETI_CURLOCAARG) /* corresponding gasneti_memcheck fns are in gasnet_help.h */ // String append with safe-memory dynamic allocation GASNETI_FORMAT_PRINTF(gasneti_sappendf,2,3, extern char *gasneti_sappendf(char *s, const char *fmt, ...)); // Version of str[n]casecmp() available even w/o POSIX.1-2001 extern int gasneti_strcasecmp(const char *s1, const char *s2); extern int gasneti_strncasecmp(const char *s1, const char *s2, size_t n); #if GASNET_DEBUGMALLOC extern void *_gasneti_malloc(size_t nbytes, const char *curloc) GASNETI_MALLOC; extern void *_gasneti_malloc_allowfail(size_t nbytes, const char *curloc) GASNETI_MALLOC; extern void _gasneti_free(void *ptr, const char *curloc); extern void _gasneti_leak(void *ptr, const char *curloc); extern void *_gasneti_realloc(void *ptr, size_t sz, const char *curloc); extern void *_gasneti_calloc(size_t N, size_t S, const char *curloc) GASNETI_MALLOC; extern size_t _gasneti_memcheck(void *ptr, const char *curloc, int checktype); extern void gasneti_malloc_dump_liveobjects(FILE *fp); #else GASNETI_INLINE(_gasneti_malloc) GASNETI_MALLOC void *_gasneti_malloc(size_t nbytes) { void *ret = NULL; GASNETI_STAT_EVENT_VAL(I, GASNET_MALLOC, nbytes); ret = malloc(nbytes); if_pf (ret == NULL && nbytes > 0) gasneti_fatalerror("gasneti_malloc(%" PRIuSZ ") failed", nbytes); return ret; } GASNETI_INLINE(_gasneti_malloc_allowfail) GASNETI_MALLOC void *_gasneti_malloc_allowfail(size_t nbytes) { void *ret = NULL; GASNETI_STAT_EVENT_VAL(I, GASNET_MALLOC, nbytes); ret = malloc(nbytes); if_pf (ret == NULL && nbytes > 0) { /* allow a NULL return for out-of-memory */ GASNETI_TRACE_PRINTF(I,("Warning: returning NULL for a failed gasneti_malloc(%" PRIuSZ ")",nbytes)); } return ret; } GASNETI_INLINE(_gasneti_calloc) GASNETI_MALLOC void *_gasneti_calloc(size_t N, size_t S) { void *ret = NULL; GASNETI_STAT_EVENT_VAL(I, GASNET_MALLOC, (N*S)); ret = calloc(N,S); if_pf (ret == NULL && N*S > 0) gasneti_fatalerror("gasneti_calloc(%" PRIuSZ ",%" PRIuSZ ") failed", N, S); return ret; } GASNETI_INLINE(_gasneti_realloc) void *_gasneti_realloc(void *ptr, size_t nbytes) { void *ret = NULL; GASNETI_STAT_EVENT_VAL(I, GASNET_MALLOC, nbytes); ret = realloc(ptr, nbytes); if_pf (ret == NULL && nbytes > 0) gasneti_fatalerror("gasneti_realloc(%" PRIuSZ ") failed", nbytes); return ret; } GASNETI_INLINE(_gasneti_free) void _gasneti_free(void *ptr) { GASNETI_STAT_EVENT_VAL(I, GASNET_FREE, 0); /* don't track free size in ndebug mode */ if_pf (ptr == NULL) return; free(ptr); } /* the following allows "gasneti_leak(p = gasneti_malloc(sz));" */ #define _gasneti_leak(_expr) ((void)(_expr)) #endif GASNETI_MALLOCP(_gasneti_malloc) GASNETI_MALLOCP(_gasneti_malloc_allowfail) GASNETI_MALLOCP(_gasneti_calloc) /* ------------------------------------------------------------------------------------ */ /* Enforce some of the GASNet conduit coding practices - see README */ #ifdef malloc #undef malloc #endif #define gasneti_malloc_error ERROR__GASNet_conduit_code_must_use_gasneti_malloc #define malloc(n) gasneti_malloc_error #ifdef calloc #undef calloc #endif #define gasneti_calloc_error ERROR__GASNet_conduit_code_must_use_gasneti_calloc #define calloc(n,s) gasneti_calloc_error #ifdef realloc #undef realloc #endif #define gasneti_realloc_error ERROR__GASNet_conduit_code_must_use_gasneti_realloc #define realloc(p,n) gasneti_realloc_error #ifdef strdup #undef strdup #endif #define gasneti_strdup_error ERROR__GASNet_conduit_code_must_use_gasneti_strdup #define strdup(p) gasneti_strdup_error #ifdef strndup #undef strndup #endif #define gasneti_strndup_error ERROR__GASNet_conduit_code_must_use_gasneti_strndup #define strndup(p,n) gasneti_strndup_error #ifdef free #undef free #endif #define gasneti_free_error ERROR__GASNet_conduit_code_must_use_gasneti_free #define free(p) gasneti_free_error #ifdef strcasecmp #undef strcasecmp #endif #define gasneti_strcasecmp_error ERROR__GASNet_conduit_code_must_use_gasneti_strcasecmp #define strcasecmp(s1,s2) gasneti_strcasecmp_error #ifdef strncasecmp #undef strncasecmp #endif #define gasneti_strncasecmp_error ERROR__GASNet_conduit_code_must_use_gasneti_strncasecmp #define strncasecmp(s1,s2,n) gasneti_strncasecmp_error #include #undef assert #define gasneti_assert_error ERROR__GASNet_conduit_code_should_use_gasneti_assert #define assert(x) gasneti_assert_error #if GASNETI_NO_FORK #ifdef fork #undef fork #endif #define gasneti_fork_error ERROR__GASNet_conduit_code_calling_fork_while_GASNETI_NO_FORK #define fork() gasneti_fork_error #ifdef vfork #undef vfork #endif #define gasneti_vfork_error ERROR__GASNet_conduit_code_calling_vfork_while_GASNETI_NO_FORK #define vfork() gasneti_vfork_error #ifdef popen #undef popen #endif #define gasneti_popen_error ERROR__GASNet_conduit_code_calling_popen_while_GASNETI_NO_FORK #define popen(c,t) gasneti_popen_error #ifdef system #undef system #endif #define gasneti_system_error ERROR__GASNet_conduit_code_calling_system_while_GASNETI_NO_FORK #define system(s) gasneti_system_error #endif #define gasneti_thunk_error ERROR__GASNet_conduit_code_must_not_use_gasneti_thunk_variables #ifdef gasneti_thunk_client #undef gasneti_thunk_client #endif #define gasneti_thunk_client gasneti_thunk_error #ifdef gasneti_thunk_endpoint #undef gasneti_thunk_endpoint #endif #define gasneti_thunk_endpoint gasneti_thunk_error #ifdef gasneti_thunk_tm #undef gasneti_thunk_tm #endif #define gasneti_thunk_tm gasneti_thunk_error #ifdef gasneti_thunk_segment #undef gasneti_thunk_segment #endif #define gasneti_thunk_segment gasneti_thunk_error /* ------------------------------------------------------------------------------------ */ /* Version of strdup() which is compatible w/ gasneti_free(), instead of plain free() */ GASNETI_INLINE(_gasneti_strdup) GASNETI_MALLOC char *_gasneti_strdup(const char *s GASNETI_CURLOCFARG) { char *retval; if_pf (s == NULL) { /* special case to avoid strlen(NULL) */ retval = (char *)_gasneti_malloc(1 GASNETI_CURLOCPARG); retval[0] = '\0'; } else { size_t sz = strlen(s) + 1; retval = (char *)memcpy((char *)_gasneti_malloc(sz GASNETI_CURLOCPARG), s, sz); } return retval; } GASNETI_MALLOCP(_gasneti_strdup) /* Like gasneti_strdup, but copy is limited to at most n characters. * Note allocation is upto n+1 bytes, due to the '\0' termination. */ GASNETI_INLINE(_gasneti_strndup) GASNETI_MALLOC char *_gasneti_strndup(const char *s, size_t n GASNETI_CURLOCFARG) { char *retval; if_pf (s == NULL) { retval = (char *)_gasneti_malloc(1 GASNETI_CURLOCPARG); retval[0] = '\0'; } else { size_t len; for (len = 0; len < n && s[len]; len++) ; retval = _gasneti_malloc(len + 1 GASNETI_CURLOCPARG); memcpy(retval, s, len); retval[len] = '\0'; } return retval; } GASNETI_MALLOCP(_gasneti_strndup) /* Version of glibc's getline compatible w/ gasneti_free() */ #if defined(__GLIBC__) && !defined(GASNET_DEBUGMALLOC) #define gasneti_getline getline #else extern ssize_t gasneti_getline(char **buf_p, size_t *n_p, FILE *fp); #endif /* ------------------------------------------------------------------------------------ */ extern void gasneti_freezeForDebugger(void); #if PLATFORM_OS_LINUX // dynamic check for Linux flavor, to detect binary porting // return non-zero iff this Linux system is actually Microsoft Windows Subsystem for Linux extern int gasneti_platform_isWSL(void); #endif /* GASNET_DEBUG_VERBOSE is set by configure to request job startup and general status messages on stderr */ #ifndef GASNET_DEBUG_VERBOSE #define GASNET_DEBUG_VERBOSE 0 #endif /* ------------------------------------------------------------------------------------ */ /* Apply a reversible xform to obfuscate pointers exposed to clients in DEBUG builds * * NDEBUG: * EXPORT: cast to the public type * IMPORT: cast to the internal type * DEBUG: * EXPORT: apply obfuscation to an internal pointer and cast * IMPORT: remove obfuscation to reproduce the internal pointer and cast */ #if defined(GASNETI_EXPORT_POINTER) && defined(GASNETI_IMPORT_POINTER) /* Preserve existing definitions */ /* When overriding: * Keep in mind that code is permitted call these macros in a GASNET_NDEBUG build. */ #elif !defined(GASNETI_EXPORT_POINTER) && !defined(GASNETI_IMPORT_POINTER) #if GASNETI_VALGRIND && !defined(GASNETI_SWIZZLE) #define GASNETI_SWIZZLE 0 // swizzling leads to "possible leaks" in valgrind #endif #if GASNETI_SWIZZLE || (GASNET_DEBUG && !defined(GASNETI_SWIZZLE)) #undef GASNETI_SWIZZLE #define GASNETI_SWIZZLE 1 /* Default xform is to invert all bits, except that NULL is preserved */ GASNETI_INLINE(_gasneti_swizzle_pointer) uintptr_t _gasneti_swizzle_pointer(uintptr_t _p) { return _p ? ~_p : _p; } #define GASNETI_EXPORT_POINTER(type,ptr) ((type)_gasneti_swizzle_pointer((uintptr_t)(ptr))) #define GASNETI_IMPORT_POINTER(type,ptr) ((type)_gasneti_swizzle_pointer((uintptr_t)(ptr))) #else #undef GASNETI_SWIZZLE #define GASNETI_EXPORT_POINTER(type,ptr) ((type)(ptr)) #define GASNETI_IMPORT_POINTER(type,ptr) ((type)(ptr)) #endif #elif defined(GASNETI_EXPORT_POINTER) || defined(GASNETI_IMPORT_POINTER) #error Must define both or neither of GASNETI_EXPORT_POINTER and GASNETI_IMPORT_POINTER #endif /* ------------------------------------------------------------------------------------ */ // Common handing of the basic object types #define GASNETI_CLIENT_MAGIC GASNETI_MAKE_MAGIC('C','L','I','t') #define GASNETI_CLIENT_BAD_MAGIC GASNETI_MAKE_BAD_MAGIC('C','L','I','t') extern gasneti_Client_t gasneti_alloc_client( const char *name, gex_Flags_t flags); void gasneti_free_client(gasneti_Client_t client); #define GASNETI_SEGMENT_MAGIC GASNETI_MAKE_MAGIC('S','E','G','t') #define GASNETI_SEGMENT_BAD_MAGIC GASNETI_MAKE_BAD_MAGIC('S','E','G','t') extern gasneti_Segment_t gasneti_alloc_segment( gasneti_Client_t client, void *addr, uintptr_t len, gex_MK_t kind, int client_allocated, gex_Flags_t flags); void gasneti_free_segment(gasneti_Segment_t segment); #define GASNETI_EP_MAGIC GASNETI_MAKE_MAGIC('E','P','_','t') #define GASNETI_EP_BAD_MAGIC GASNETI_MAKE_BAD_MAGIC('E','P','_','t') #define GASNETI_TM_MAGIC GASNETI_MAKE_MAGIC('T','M','_','t') #define GASNETI_TM_BAD_MAGIC GASNETI_MAKE_BAD_MAGIC('T','M','_','t') extern gasneti_TM_t gasneti_alloc_tm( gasneti_EP_t ep, gex_Rank_t rank, gex_Rank_t size, gex_Flags_t flags); void gasneti_free_tm(gasneti_TM_t tm); /* ------------------------------------------------------------------------------------ */ /* Return a pointer to a handler table containing the handlers of the core (gasnetc_) or extended (gasnete_) API, which will be automatically registered upon endpoint creation. Tables are terminated with an entry where fnptr == NULL. Core API handlers are restricted to indices in the range [GASNETC_HANDLER_BASE, GASNETE_HANDLER_BASE) Extended API handlers are restricted to indices in the range [GASNETE_HANDLER_BASE, GASNETI_CLIENT_HANDLER_BASE) */ extern gex_AM_Entry_t const *gasnetc_get_handlertable(void); extern gex_AM_Entry_t const *gasnete_get_handlertable(void); /* ------------------------------------------------------------------------------------ */ // TODO-EX: Please remove this! // // These macros are a "necessary evil" until all internal interfaces have been // updated to propogate Client, TM, EP and Segment arguments. // For the time being there is at most one of each of those objects. // // Results are undefined prior to return from gex_Client_Init() or gasnet_init(). // extern gasneti_TM_t gasneti_thing_that_goes_thunk_in_the_dark; #define gasneti_THUNK_TM gasneti_export_tm(gasneti_thing_that_goes_thunk_in_the_dark) #define gasneti_THUNK_EP gasneti_export_ep(gasneti_thing_that_goes_thunk_in_the_dark->_ep) #define gasneti_THUNK_CLIENT gasneti_export_client(gasneti_thing_that_goes_thunk_in_the_dark->_ep->_client) #define gasneti_THUNK_SEGMENT gasneti_export_segment(gasneti_thing_that_goes_thunk_in_the_dark->_ep->_segment) /* ------------------------------------------------------------------------------------ */ // EP management GASNETI_INLINE(gasneti_i_tm_to_i_ep) gasneti_EP_t gasneti_i_tm_to_i_ep(gasneti_TM_t i_tm) { gasneti_assert(i_tm); if (gasneti_i_tm_is_pair(i_tm)) { // Lookup EP in per-client table gex_EP_Index_t ep_idx = gasneti_tm_pair_loc_idx(gasneti_i_tm_to_pair(i_tm)); gasneti_Client_t i_client = gasneti_import_client(gasneti_THUNK_CLIENT); // TODO: multi-client gasneti_assert_int(ep_idx ,<, GASNET_MAXEPS); gasneti_assert_int(ep_idx ,<, gasneti_weakatomic32_read(&i_client->_next_ep_index, 0)); gasneti_EP_t i_ep = i_client->_ep_tbl[ep_idx]; gasneti_assert(i_ep); return i_ep; } else { return i_tm->_ep; } } #define gasneti_e_tm_to_i_ep(e_tm) gasneti_i_tm_to_i_ep(gasneti_import_tm(e_tm)) /* ------------------------------------------------------------------------------------ */ // Internal conduit interface to spawner // // NOTE: Though NbrhdBroadcast and HostBroadcast have semantics which require only // local data movement, implementations are peritted to use global communication // (such as via AM{MPI,UDP}_SPMDBroadcast()). Consequently, calls must be // collective across *all* ranks, not just across ranks in the same neighborhood // or host. The `len` argument must be single-valued across every rank in the // job. The `root` arguent need only be single-valued within the {nbrhd, host} // scope of the broadcast, but must identify a root process in the caller's // {nbrhd, host}. typedef void (*gasneti_bootstrapExchangefn_t)(void *src, size_t len, void *dest); typedef void (*gasneti_bootstrapBroadcastfn_t)(void *src, size_t len, void *dest, int rootnode); typedef void (*gasneti_bootstrapBarrierfn_t)(void); typedef struct { gasneti_bootstrapBarrierfn_t Barrier; gasneti_bootstrapExchangefn_t Exchange; gasneti_bootstrapBroadcastfn_t Broadcast; gasneti_bootstrapBroadcastfn_t NbrhdBroadcast; gasneti_bootstrapBroadcastfn_t HostBroadcast; void (*Alltoall)(void *src, size_t len, void *dest); void (*Abort)(int exitcode); void (*Cleanup)(void); void (*Fini)(void); } gasneti_spawnerfn_t; extern gasneti_spawnerfn_t const *gasneti_spawnerInit(int *argc_p, char ***argv_p, const char *force_spawner, gex_Rank_t *nodes_p, gex_Rank_t *mynode_p); extern int gasneti_spawn_verbose; /* ------------------------------------------------------------------------------------ */ /* memory segment registration and management */ GASNETI_COLD extern void gasneti_defaultSignalHandler(int sig); /* gasneti_max_segsize() is the user-selected limit for the max mmap size, as gleaned from several sources */ uintptr_t gasneti_max_segsize(void); #if defined(HAVE_MMAP) || GASNET_PSHM #define GASNETI_MMAP_OR_PSHM 1 extern gasnet_seginfo_t gasneti_mmap_segment_search(uintptr_t maxsz); #if defined(HAVE_MMAP) extern void *gasneti_mmap_fixed(void *segbase, uintptr_t segsize, int mayfail); extern void *gasneti_mmap(uintptr_t segsize); extern void gasneti_munmap(void *segbase, uintptr_t segsize); #endif #if defined(GASNETI_USE_HUGETLBFS) extern size_t gasneti_hugepagesize(void); extern void *gasneti_huge_mmap(void *addr, uintptr_t size); extern void gasneti_huge_munmap(void *addr, uintptr_t size); #endif #define GASNETI_MMAP_LIMIT gasneti_max_segsize() #ifndef GASNETI_MMAP_GRANULARITY /* GASNETI_MMAP_GRANULARITY is the minimum increment used by the mmap binary search */ #define GASNETI_MMAP_GRANULARITY (((size_t)2)<<21) /* 4 MB */ #endif #endif #if GASNET_PSHM extern int gasneti_use_shared_allocator; #endif // Allocate/map memory intended for use as segment. // May be called non-collectively, as from gex_Segment_Create(). // Also called collectively, as from gex_Segment_Attach() and aux seg creation. // Boolean 'pshm_compat' requests allocation of memory which is compatible with // cross-mapping by PSHM (only fully implemented for the collective cases of // gex_Segment_Attach() and aux seg creation). int gasneti_segment_map(gasnet_seginfo_t *segment_p, uintptr_t segsize, int pshm_compat, gex_Flags_t flags); // Undo gasneti_segment_map() int gasneti_segment_unmap( gasnet_seginfo_t *segment_p, int pshm_compat); #ifndef GASNETI_USE_HIGHSEGMENT #define GASNETI_USE_HIGHSEGMENT 1 /* use the high end of mmap segments */ #endif uint64_t gasneti_sharedLimit(void); #ifdef GASNETI_MMAP_OR_PSHM uintptr_t gasneti_segmentLimit(uintptr_t localLimit, uint64_t sharedLimit, gasneti_bootstrapExchangefn_t exchangefn, gasneti_bootstrapBarrierfn_t barrierfn); #endif /* GASNETI_MMAP_OR_PSHM */ void gasneti_segmentInit(uintptr_t localSegmentLimit, gasneti_bootstrapExchangefn_t exchangefn, gex_Flags_t flags); int gasneti_segmentAttach( gex_Segment_t *segment_p, gex_TM_t tm, uintptr_t segsize, gex_Flags_t flags); int gasneti_segmentCreate( gex_Segment_t *segment_t, gasneti_Client_t client, gex_Addr_t address, uintptr_t length, gex_MK_t kind, gex_Flags_t flags); int gasneti_segmentDestroy( gasneti_Segment_t i_segment, int create_hook_succeeded); int gasneti_EP_PublishBoundSegment( gex_TM_t tm, gex_EP_t *eps, size_t num_eps, gex_Flags_t flags); extern void gasneti_legacy_segment_attach_hook(gasneti_EP_t ep); extern void gasneti_legacy_alloc_tm_hook(gasneti_TM_t _tm); void gasneti_setupGlobalEnvironment(gex_Rank_t numnodes, gex_Rank_t mynode, gasneti_bootstrapExchangefn_t exchangefn, gasneti_bootstrapBroadcastfn_t broadcastfn); #define GASNETI_PROPAGATE_ENV_NAME 0 #define GASNETI_PROPAGATE_ENV_PREFIX 1 extern void (*gasneti_propagate_env_hook)(const char *, int); // spawner- or conduit-specific hook extern void gasneti_propagate_env_helper(const char *environ, const char * keyname, int flags); extern void gasneti_propagate_env(const char *keyname, int flags); /* signature for internally-registered functions that need auxseg space - space in the gasnet-registered heap which is hidden from the client. The callback is registered by adding the function pointer to GASNET*_AUXSEG_FNS() Each registered function is called twice by the GASNet framework at startup: * first callback is a "how much space do you want" query it occurs between init/attach with auxseg_info == NULL, function should return the absolute minimum and desired auxseg space currently, all nodes MUST return the same value (may be relaxed in the future) * second callback is "ok, here's what you got" it happens after attach and before gasnete_init, with auxseg_info set to the array (gasneti_nodes elements) of auxseg components on each node indicating the space assigned to this auxseg consumer. callee must copy the array of metadata if it wants to keep it (the seg space it references is permanent) */ typedef struct { uintptr_t minsz; uintptr_t optimalsz; } gasneti_auxseg_request_t; typedef gasneti_auxseg_request_t (*gasneti_auxsegregfn_t)(gasnet_seginfo_t *auxseg_info); // collect and return optimal auxseg size sum, padded to page size // may be called multiple times, subsequent calls return cached value uintptr_t gasneti_auxseg_preinit(void); /* provide auxseg to GASNet components and init secondary segment arrays requires input auxseg_info has been initialized to the correct values */ void gasneti_auxseg_attach(gasnet_seginfo_t *auxseg_info); /* common case use of gasneti_auxseg_{preinit,attach} for conduits using gasneti_segmentAttach() */ gasnet_seginfo_t gasneti_auxsegAttach(uint64_t maxsize, gasneti_bootstrapExchangefn_t exchangefn); /* ------------------------------------------------------------------------------------ */ // Hooks to invoke conduit-specific functionality from common conduit-independent code. // Conduits requiring use of one or more of these should define the // corresponding preprocessor identifier in their gasnet_core_fwd.h. #if GASNETC_SEGMENT_CREATE_HOOK // Called after all conduit-independent segment creation steps in // gex_Segment_Create(). Typical use of this hook includes (purely local) // memory registration. // // All relevant options to the Create call (such as addr, len, and flags) are // accessible as fields of the sole argument (of type gex_Segment_t). // // On success, returns GASNET_OK and the infrastructure will call the // matching destroy hook (if any), when the segment is destroyed. // On failure, returns any other value and the infrastructure will NOT call // any matching destroy hook, leaving this hook responsible for cleanup of // any conduit-specific state prior to such an error return. extern int gasnetc_segment_create_hook(gex_Segment_t e_segment); #endif #if GASNETC_SEGMENT_DESTROY_HOOK // Called prior to any conduit-independent segment destruction steps, for // instance in gex_Segment_Destroy(). Typical use of this hook includes // (purely local) memory deregistration. // // The hook may assume that a prior gasnetc_segment_create_hook() (if any) // has returned GASNET_OK. extern void gasnetc_segment_destroy_hook(gasneti_Segment_t i_segment); #endif #if GASNETC_EP_BINDSEGMENT_HOOK // Called by gex_EP_BindSegment() after argument checking, but before any // conduit-independent segment binding steps. // Use of this hook may include per-EP memory registration. // // Arguments provided to gex_EP_BindSegment() are also provided to this // hook, but with their internal types. extern int gasnetc_ep_bindsegment_hook( gasneti_EP_t i_ep, gasneti_Segment_t i_segment, gex_Flags_t flags); #endif #if GASNETC_EP_PUBLISHBOUNDSEGMENT_HOOK // Called after all conduit-independent segment creation steps in // gex_EP_PublishBoundSegment(). Typical use of this hook includes // communication of memory registration keys. // // All arguments provided to gex_EP_PublishBoundSegment() are also // provided to this hook. // Calls to this hook are collective over the given team. // // NOTE: subject to replacement by a pack/unpack pair of hooks when // gex_EP_PublishBoundSegment() is enhanced to merge conduit-specific // and conduit-independent communications. extern int gasnetc_ep_publishboundsegment_hook( gex_TM_t tm, gex_EP_t *eps, size_t num_eps, gex_Flags_t flags); #endif #if GASNETC_SEGMENT_ATTACH_HOOK // Called after all conduit-independent segment attach steps in // gex_Segment_Attach() and gasnet_attach(). Typical use of this hook // includes memory registration and propagation of the registration keys. // // Arguments are the segment and the (currently always primordial) team. // Other relevant options (addr, len, flags) are accessible as fields // in the argument of type gex_Segment_t. // Calls to this hook are collective over the given team. // // NOTE: subject to removal if/when the "attach" calls are reimplemented // in terms of gex_Segment_Create() and gex_EP_PublishBoundSegment(). extern int gasnetc_segment_attach_hook(gex_Segment_t e_segment, gex_TM_t e_tm); #endif // Conduit-specific "primary attach" logic for use in the conduit-independent // implementation of `gasnet_attach()`. extern int gasnetc_attach_primary(gex_Flags_t); /* ------------------------------------------------------------------------------------ */ /* GASNET-Internal OP Interface - provides a mechanism for conduit-independent services (like VIS) to expose non-blocking operations that utilize the regular GASNet op sync mechanisms Conduits provide three opaque scalar types: gasneti_eop_t, gasneti_iop_t and gasneti_aop_t and the following manipulator functions */ // TODO-EX: EOP_INTERFACE // Must generalize these interfaces beyond just put/get // At a minimum: // IOP interfaces must support all the counters // EOP interfaces must support LC // However, EOP will likely need to support more subevents in the future #ifndef _GASNETI_EOP_T #define _GASNETI_EOP_T struct _gasneti_eop_S; typedef const struct _gasneti_eop_S gasneti_eop_t; #endif #ifndef _GASNETI_IOP_T #define _GASNETI_IOP_T struct _gasneti_iop_S; typedef const struct _gasneti_iop_S gasneti_iop_t; #endif #ifndef _GASNETI_AOP_T #define _GASNETI_AOP_T struct _gasneti_aop_S; typedef const struct _gasneti_aop_S gasneti_aop_t; #endif /* create a new explicit-event NB operation represented with abstract type gasneti_eop_t and mark it in-flight */ gasneti_eop_t *gasneti_eop_create(GASNETI_THREAD_FARG_ALONE); /* convert an gasneti_eop_t* created by an earlier call from this thread to gasneti_new_eop(), into a gex_Event_t suitable for this thread to later pass to gex_Event_Wait & friends */ #if GASNETI_EOP_IS_HANDLE #define gasneti_eop_to_event(eop) ((gex_Event_t)(eop)) #else gex_Event_t gasneti_eop_to_event(gasneti_eop_t *eop); #endif /* register noperations in-flight operations on the currently selected implicit-event (NBI) context represented with abstract type gasneti_iop_t, and return a pointer to that context if isput is non-zero, the registered operations are puts, otherwise they are gets */ gasneti_iop_t *gasneti_iop_register(unsigned int noperations, int isget GASNETI_THREAD_FARG); /* given a valid (gasneti_eop_t*) or (gasneti_iop_t*) returned by an earlier call from any thread * to gasneti_new_eop() or gasneti_iop_register(), return non-zero iff it is the former (an eop) AMSAFE: must be safe to call in AM context */ int gasneti_op_is_eop(void *op); /* given an gasneti_eop_t* returned by an earlier call from any thread to gasneti_new_eop(), mark that explicit-event NB operation complete such that a subsequent sync call on the relevant operation by the initiating thread may return success Caller is responsible for calling gasneti_sync_writes before calling this fn, if necessary AMSAFE: must be safe to call in AM context */ void gasneti_eop_markdone(gasneti_eop_t *eop); /* given an gasneti_iop_t* returned by an earlier call from any thread to gasneti_iop_register(), increment that implicit-event (NBI) context to indicate that noperations have completed. if isput is non-zero, the operations are puts, otherwise they are gets noperations must not exceed the number of isput-type operations initiated on the given gasneti_iop_t by earlier calls to gasneti_iop_register Caller is responsible for calling gasneti_sync_writes before calling this fn, if necessary AMSAFE: must be safe to call in AM context */ void gasneti_iop_markdone(gasneti_iop_t *iop, unsigned int noperations, int isget); // "aop" interfaces for manipulating implicit-event (NBI) contexts // // The abstract type gasneti_aop_t allows replacement of the currently selected // implicit-event (NBI) context. // // An aop is thread-specific, and thus can only be operated on by the creating // thread. This may be relaxed in the future. // // Use of push and pop must be properly nested. To help detect violations, it is // recommended to assert that the value returned by pop is the one your code // pushed. // // The lifetime of an internal-use aop begins with a call to // gasneti_aop_create() and ends with conversion to an event by a call to // gasneti_aop_to_event(). It is invalid to pass an aop to any gasneti_aop_* // functions after its conversion to an event. // Create an aop. // This call returns an gasneti_aop_t* which can be made current for this // thread by calling gasneti_aop_push(). gasneti_aop_t *gasneti_aop_create(GASNETI_THREAD_FARG_ALONE); // Convert an aop to an event. // This call converts an aop allocated using gasneti_aop_create() to an // gex_Event_t suitable to later pass to gex_Event_Wait and friends. // The aop will be reaped when the event is synced in the normal manner. // It is invalid to use an aop after conversion to an event. // The aop must not be on the thread's stack of implicit-event (NBI) contexts. gex_Event_t gasneti_aop_to_event(gasneti_aop_t *aop); // Push an aop. // The aop argument becomes the calling thread's active implicit-event (NBI) // context, pushing it on a stack of such contexts to be subsequently removed // from the top of that stack using gasneti_aop_pop(). void gasneti_aop_push(gasneti_aop_t *aop GASNETI_THREAD_FARG); // Pop the current aop. // The calling thread's active implicit-event (NBI) context is removed from its // stack of such contexts and returned. This context must have been created via // gasneti_aop_create(). // It is erroneous to pop the implicit iop, or one created by the client's // calls to gex_NBI_BeginAccessRegion(). // The only valid operations on a popped (paused) aop are to call // gasneti_aop_push() or gasneti_aop_to_event(). gasneti_aop_t *gasneti_aop_pop(GASNETI_THREAD_FARG_ALONE); // TODO-EX: EOP_INTERFACE // These next two are a stop-gap measure pending proper generalization. /* registers in-flight remote atomic operation(s) ... */ gasneti_iop_t *gasneti_iop_register_rmw(unsigned int noperations GASNETI_THREAD_FARG); /* marks in-flight remote atomic operation(s) as complete ... */ void gasneti_iop_markdone_rmw(gasneti_iop_t *iop, unsigned int noperations); /* ------------------------------------------------------------------------------------ */ // memory kinds hooks int gasneti_MK_Segment_Create( gasneti_Segment_t *i_segment_p, gasneti_Client_t i_client, void *address, uintptr_t length, gex_MK_t e_kind, gex_Flags_t flags); void gasneti_MK_Segment_Destroy( gasneti_Segment_t i_segment); /* ------------------------------------------------------------------------------------ */ /* macros for returning errors that allow verbose error tracking */ extern int gasneti_VerboseErrors; #define GASNETI_RETURN_ERR(type) do { \ if (gasneti_VerboseErrors) { \ gasneti_console_message("WARNING", \ "GASNet %s returning an error code: GASNET_ERR_%s (%s)\n" \ " at %s:%i\n" \ ,GASNETI_CURRENT_FUNCTION \ , #type, gasnet_ErrorDesc(GASNET_ERR_##type), __FILE__, __LINE__); \ } \ gasnett_freezeForDebuggerErr(); /* allow freeze */ \ return GASNET_ERR_ ## type; \ } while (0) #define GASNETI_RETURN_ERRF(type, fromfn) do { \ if (gasneti_VerboseErrors) { \ gasneti_console_message("WARNING", \ "GASNet %s returning an error code: GASNET_ERR_%s (%s)\n" \ " from function %s\n" \ " at %s:%i\n" \ ,GASNETI_CURRENT_FUNCTION \ , #type, gasnet_ErrorDesc(GASNET_ERR_##type), #fromfn, __FILE__, __LINE__); \ } \ gasnett_freezeForDebuggerErr(); /* allow freeze */ \ return GASNET_ERR_ ## type; \ } while (0) #define GASNETI_RETURN_ERRR(type, reason) do { \ if (gasneti_VerboseErrors) { \ gasneti_console_message("WARNING", \ "GASNet %s returning an error code: GASNET_ERR_%s (%s)\n" \ " at %s:%i\n" \ " reason: %s\n" \ ,GASNETI_CURRENT_FUNCTION \ , #type, gasnet_ErrorDesc(GASNET_ERR_##type), __FILE__, __LINE__, reason); \ } \ gasnett_freezeForDebuggerErr(); /* allow freeze */ \ return GASNET_ERR_ ## type; \ } while (0) #define GASNETI_RETURN_ERRFR(type, fromfn, reason) do { \ if (gasneti_VerboseErrors) { \ gasneti_console_message("WARNING", \ "GASNet %s returning an error code: GASNET_ERR_%s (%s)\n" \ " from function %s\n" \ " at %s:%i\n" \ " reason: %s\n" \ ,GASNETI_CURRENT_FUNCTION \ , #type, gasnet_ErrorDesc(GASNET_ERR_##type), #fromfn, __FILE__, __LINE__, reason); \ } \ gasnett_freezeForDebuggerErr(); /* allow freeze */ \ return GASNET_ERR_ ## type; \ } while (0) #ifndef GASNETI_ENABLE_ERRCHECKS #define GASNETI_ENABLE_ERRCHECKS 0 #endif #if GASNET_DEBUG || GASNETI_ENABLE_ERRCHECKS #define GASNETI_CHECK_ERR(errcond, type) \ if_pf (errcond) GASNETI_RETURN_ERR(type) #define GASNETI_CHECK_ERRF(errcond, type, fromfn) \ if_pf (errcond) GASNETI_RETURN_ERRF(type, fromfn) #define GASNETI_CHECK_ERRR(errcond, type, reason) \ if_pf (errcond) GASNETI_RETURN_ERRR(type, reason) #define GASNETI_CHECK_ERRFR(errcond, type, fromfn, reason) \ if_pf (errcond) GASNETI_RETURN_ERRFR(type, fromfn, reason) #else #define GASNETI_CHECK_ERR(errcond, type) ((void)0) #define GASNETI_CHECK_ERRF(errcond, type, fromfn) ((void)0) #define GASNETI_CHECK_ERRR(errcond, type, reason) ((void)0) #define GASNETI_CHECK_ERRFR(errcond, type, fromfn, reason) ((void)0) #endif /* return a possible error */ #define GASNETI_RETURN(expr) do { \ int _val = (expr); \ if_pf (_val != GASNET_OK && gasneti_VerboseErrors) { \ gasneti_console_message("WARNING", \ "GASNet %s returning an error code: %s (%s)\n" \ " at %s:%i\n" \ ,GASNETI_CURRENT_FUNCTION \ , gasnet_ErrorName(_val), gasnet_ErrorDesc(_val), __FILE__, __LINE__); \ } \ return _val; \ } while (0) /* make a GASNet call - if it fails, print error message and return error */ #define GASNETI_SAFE_PROPAGATE(fncall) do { \ int retcode = (fncall); \ if_pf (retcode != GASNET_OK) { \ char msg[80] = { 0 }; \ if (gasneti_VerboseErrors) { \ snprintf(msg, sizeof(msg), \ "GASNet encountered an error: %s(%i)", \ gasnet_ErrorName(retcode), retcode); \ msg[sizeof(msg)-1] = '\0'; \ } \ GASNETI_RETURN_ERRFR(RESOURCE, fncall, msg); \ } \ } while (0) /* ------------------------------------------------------------------------------------ */ /* Trivial handling of defered-start progress threads */ extern int gasneti_query_progress_threads( gex_Client_t e_client, unsigned int *count_p, const gex_ProgressThreadInfo_t **info_p, gex_Flags_t flags); /* ------------------------------------------------------------------------------------ */ /* nodemap data and functions */ extern const char *gasneti_format_host_detect(void); extern uint64_t gasneti_hosthash(void); extern uint32_t gasneti_gethostid(void); extern gex_Rank_t *gasneti_nodemap; typedef struct gasneti_nodegrp_s { /* List of member nodes in ascending order */ gex_Rank_t *nodes; /* Number of nodes in group and my rank within them */ gex_Rank_t node_count; gex_Rank_t node_rank; /* Number of peers (groups of same class) and this group's rank */ gex_Rank_t grp_count; gex_Rank_t grp_rank; } gasneti_nodegrp_t; extern gasneti_nodegrp_t gasneti_myhost; extern gasneti_nodegrp_t gasneti_mysupernode; #define gasneti_nodemap_local gasneti_mysupernode.nodes #define gasneti_nodemap_local_count gasneti_mysupernode.node_count #define gasneti_nodemap_local_rank gasneti_mysupernode.node_rank #define gasneti_nodemap_global_count gasneti_mysupernode.grp_count #define gasneti_nodemap_global_rank gasneti_mysupernode.grp_rank extern void gasneti_nodemapInit(gasneti_bootstrapExchangefn_t exchangefn, const void *ids, size_t sz, size_t stride); extern void gasneti_nodemapParse(void); extern void gasneti_nodemapFini(void); #if GASNET_CONDUIT_SMP #define gasneti_node2supernode(n) 0 #else #define gasneti_node2supernode(n) \ (gasneti_assert(gasneti_nodeinfo), gasneti_nodeinfo[(n)].supernode) #endif /* ------------------------------------------------------------------------------------ */ // Collective comms helpers // Convience wrapper for a blocking gather-to-all of elements of size 'len' bytes. // In-place (src == (uint8_t*)dst + len*myrank) is permitted. // Currently wraps legacy gasnet_coll_* but should use gex_Coll_* eventually. void gasneti_blockingExchange(gex_TM_t tm, void *src, size_t len, void *dst); // Blocking "Rotated" ExchangeV utility function // Takes only local data and length, and then discovers (and returns) the total length. // Writes malloc()ed data pointer to *dst_p. // Writes optional malloc()ed lengths-array pointer to *len_p, if non-NULL. // // "Rotated" because it does NOT generate the data in normal rank order. // See comments in extended-ref/coll/gasnet_team.c for details. #if PLATFORM_COMPILER_GNU && PLATFORM_COMPILER_VERSION_GE(11,0,0) #define GASNETI_BUG4227_CONST /*const*/ #else #define GASNETI_BUG4227_CONST const #endif size_t gasneti_blockingRotatedExchangeV(gex_TM_t tm, GASNETI_BUG4227_CONST void *src, size_t len, void **dst_p, size_t **len_p); // An AM-based host-scoped barrier extern void gasneti_host_barrier(void); extern void gasnetc_hbarr_reqh(gex_Token_t token, gex_AM_Arg_t arg0); // An AM-based host-scoped sum of uint64_t extern uint64_t gasneti_host_sumu64(uint64_t); extern void gasnetc_hsumu64_reqh(gex_Token_t token, gex_AM_Arg_t arg0, gex_AM_Arg_t arg1); // AM-based bootstrap (job-scoped) collectives extern void gasneti_bootstrapBarrier_am(void); extern void gasnetc_am_barrier_reqh(gex_Token_t token, gex_AM_Arg_t arg0); extern void gasneti_bootstrapExchange_am(void *src, size_t len, void *dest); extern void gasnetc_am_exchange_reqh(gex_Token_t token, void *buf, size_t nbytes, uint32_t arg0, uint32_t arg1); #define GASNETC_COMMON_HANDLERS() \ gasneti_handler_tableentry_no_bits(gasnetc_am_exchange_reqh,2,REQUEST,MEDIUM,0), \ gasneti_handler_tableentry_no_bits(gasnetc_am_barrier_reqh,1,REQUEST,SHORT,0), \ gasneti_handler_tableentry_no_bits(gasnetc_hbarr_reqh,1,REQUEST,SHORT,0), \ gasneti_handler_tableentry_no_bits(gasnetc_hsumu64_reqh,2,REQUEST,SHORT,0) #define _hidx_gasnetc_hbarr_reqh (GASNETE_HANDLER_BASE-1) #define _hidx_gasnetc_hsumu64_reqh (GASNETE_HANDLER_BASE-2) #define _hidx_gasnetc_am_barrier_reqh (GASNETE_HANDLER_BASE-3) #define _hidx_gasnetc_am_exchange_reqh (GASNETE_HANDLER_BASE-4) extern gex_Rank_t gasneti_get_dissem_peers(const gex_Rank_t **out_p); #if GASNET_PSHM extern gex_Rank_t gasneti_get_dissem_peers_pshm(const gex_Rank_t **out_p); #endif /* ------------------------------------------------------------------------------------ */ // Helpers for debug checks #if GASNET_DEBUG void gasneti_checknpam(int for_reply GASNETI_THREAD_FARG); void gasneti_checknpam_disarm(void); #endif /* ------------------------------------------------------------------------------------ */ #include #if GASNET_PSHM #include #endif /* ------------------------------------------------------------------------------------ */ // Thread-local data // Subsystems and conduits should use gasnet_*_fwd.h files to provide type definitions. // However, some don't have any better home: typedef struct _gasnete_eop_t gasnete_eop_t; typedef struct _gasnete_iop_t gasnete_iop_t; typedef struct _gasneti_threaddata_t { // // Fixed fields that should appear first in the threaddata struct for all conduits // NOTE: it is critical that these not change postition or order // TODO: eventually these might be replaced with inlined fields // void *gasnetc_threaddata; /* ptr reserved for use by the core */ gasnete_coll_threaddata_t *gasnete_coll_threaddata;// Owned by gasnet_coll_{fwd,internal}.h void *gasnete_vis_threaddata; /* ptr reserved for use by the VIS */ // // Thread mangement fields // Owned by gasnet_extended_help.h // gasnete_threadidx_t threadidx; gasnete_thread_cleanup_t *thread_cleanup; /* thread cleanup function LIFO */ int thread_cleanup_delay; int is_undead; // marks leaked threaddata for a thread which has exited // // Active Message fields // Owned by gasnet_am.[ch] // #if GASNET_DEBUG || GASNETI_THREADINFO_OPT #define GASNETI_NEED_INIT_SRCDESC 1 int sd_is_init; #endif #if GASNET_DEBUG int request_handler_active, reply_handler_active; #endif struct gasneti_AM_SrcDesc request_sd, reply_sd; // Buffers, sized to max-medium, used by loopback AM and reference NPAM void *requestBuf, *replyBuf; #if GASNET_DEBUG int requestBuf_live, replyBuf_live; #endif // // Event data // Owned by gasnet_event_internal.h // void *eop_bufs; /* linked list of eop chunk buffers */ int eop_num_bufs; /* number of valid buffer entries */ gasnete_eop_t *eop_free; /* free list of eops */ /* stack of iops - head is active iop servicing new implicit ops */ gasnete_iop_t *current_iop; int iop_num; /* number of allocated iops */ gasnete_iop_t *iop_free; /* free list of iops */ /* lists of eops and iops freed by other threads */ // TODO-EX: lock-free queues gasneti_mutex_t foreign_lock; gasnete_eop_t *foreign_eops; gasnete_iop_t *foreign_iops; // For use by conduit-independent logic desiring fire-and-forget implict ops. // This includes, at least, the RDMADISSEM barrier. gasneti_aop_t *nbi_ff_aop; unsigned int nbi_ff_depth; // // Conduit-specific data // Owned by [CONDUIT]-conduie/gasnet_extended_fwd.h // #ifdef GASNETE_CONDUIT_THREADDATA_FIELDS GASNETE_CONDUIT_THREADDATA_FIELDS #endif } gasneti_threaddata_t; /* ------------------------------------------------------------------------------------ */ // A "NBI fire-and-forget" facility using aops is provided for convenience of // conduit-independent logic with no need to test or wait for completions. // As long as this aop remains the current iop, nesting of gasneti_begin_nbi_ff() is // supported. One can use gasneti_nbi_ff_ok() to determine if a subsequent call // to gasneti_begin_nbi_ff() is permitted. GASNETI_INLINE(gasneti_begin_nbi_ff) void gasneti_begin_nbi_ff(GASNETI_THREAD_FARG_ALONE) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; if (mythread->nbi_ff_depth++) { // already active gasneti_assert(mythread->current_iop == (gasnete_iop_t*)mythread->nbi_ff_aop); return; } gasneti_aop_t *aop = mythread->nbi_ff_aop; if_pf (aop == NULL) { aop = gasneti_aop_create(GASNETI_THREAD_PASS_ALONE); mythread->nbi_ff_aop = aop; } gasneti_aop_push(aop GASNETI_THREAD_PASS); } GASNETI_INLINE(gasneti_end_nbi_ff) void gasneti_end_nbi_ff(GASNETI_THREAD_FARG_ALONE) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasneti_assert(mythread->nbi_ff_depth > 0); if (--mythread->nbi_ff_depth) { // still active gasneti_assert(mythread->current_iop == (gasnete_iop_t*)mythread->nbi_ff_aop); return; } gasneti_aop_t *aop = gasneti_aop_pop(GASNETI_THREAD_PASS_ALONE); gasneti_assert(aop == mythread->nbi_ff_aop); } // Non-zero if the nbi_ff aop is either // + not on iop stack (thus safe to push) // + or is at the top of the iop stack (thus safe to increment its depth) GASNETI_INLINE(gasneti_nbi_ff_ok) int gasneti_nbi_ff_ok(GASNETI_THREAD_FARG_ALONE) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; return !mythread->nbi_ff_depth || (mythread->current_iop == (gasnete_iop_t*)mythread->nbi_ff_aop); } // Sets the nbi_ff_aop of all threads to NULL and returns (via reference // arguments) an array of events and its length. This array, contains all of // the aops which were found to be non-NULL. The array and count are suitable // for calls to gex_Event_{Try,Wait}{All,Some}(). // // The caller is responsible for freeing the array, which may be non-NULL // even when the count is zero. // // NOTE: this does NOT adjust `iop_num` in other threads when stealing their // nbi_ff_aop. This may force the threaddata to leak. However, this should // not be a real issue at process exit (the main intended use of this call). extern void gasneti_finalize_all_nbi_ff(gex_Event_t **events_p, size_t *count_p GASNETI_THREAD_FARG); // DO NOT USE THIS! // This exists only to permit "safe" testing in gasnet_diagnostic.c. extern void gasneti_nbi_ff_drain_(GASNETI_THREAD_FARG_ALONE); /* ------------------------------------------------------------------------------------ */ /* Simple container of segments */ // Hidden state extern gasneti_mutex_t _gasneti_segtbl_lock; extern gasneti_Segment_t *_gasneti_segtbl; extern int _gasneti_segtbl_count; // Public access to the lock #define GASNETI_SEGTBL_LOCK() gasneti_mutex_lock(&_gasneti_segtbl_lock) #define GASNETI_SEGTBL_UNLOCK() gasneti_mutex_unlock(&_gasneti_segtbl_lock) // Simple iterator. // Caller must hold lock and must not call add or del (which acquire the lock). // This macro provides a loop header and the caller provides the iteration // variable and the loop body: // gasneti_Segment_t p; // GASNETI_SEGTBL_FOR_EACH(p) { visit(p); } #define GASNETI_SEGTBL_FOR_EACH(segvar) \ for (int _gasneti_segtbl_iter = 0; \ (gasneti_mutex_assertlocked(&_gasneti_segtbl_lock), \ (_gasneti_segtbl_iter < _gasneti_segtbl_count) && \ (segvar = _gasneti_segtbl[_gasneti_segtbl_iter])); \ ++_gasneti_segtbl_iter) // Add and Del extern void gasneti_segtbl_add(gasneti_Segment_t seg); extern void gasneti_segtbl_del(gasneti_Segment_t seg); /* ------------------------------------------------------------------------------------ */ GASNETI_END_NOWARN GASNETI_END_EXTERNC #undef _IN_GASNET_INTERNAL_H #endif gasnet-2025.8.0/version.git0000664000175000017500000000003215142313673015607 0ustar alastairalastairgex-2025.8.0-0-ge3628f258 gasnet-2025.8.0/gasnet_tm.c0000664000175000017500000003260115142313673015551 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_team.c $ * Description: GASNet implementation of teams * Copyright 2018, The Regents of the University of California * Terms of use are as specified in license.txt */ #include // TODO-EX: // // Currently we implement a "team" (the abstract distributed collection, of // which a "tm" is a representative) in terms of the legacy GASNet-1 collective // team. We should eventually using something smarter, including scalable // storage. // Given (tm,rank) return the jobrank gex_Rank_t gasneti_tm_fwd_rank(gasneti_TM_t tm, gex_Rank_t rank) { gasnete_coll_team_t team = tm->_coll_team; gasneti_assert(team != GASNET_TEAM_ALL); // TM0 should not reach here gasneti_assert(!tm->_rank_map); // Teams with dense rank map should not reach here gasneti_unreachable_error(("Unimplemented gasneti_tm_fwd_rank() call")); return GEX_RANK_INVALID; } // Given (tm,rank) return the ep_location gex_EP_Location_t gasneti_tm_fwd_location(gasneti_TM_t tm, gex_Rank_t rank, gex_Flags_t flags) { gasnete_coll_team_t team = tm->_coll_team; gasneti_assert(team != GASNET_TEAM_ALL); // TM0 should not reach here gasneti_assert(!tm->_rank_map); // Teams with dense rank map should not reach here gasneti_unreachable_error(("Unimplemented gasneti_tm_fwd_location() call")); gex_EP_Location_t result = {GEX_RANK_INVALID, 0}; return result; } // Given (tm,jobrank) return the rank or GEX_RANK_INVALID // TODO-EX: THIS IS A HORRIBLE O(size(tm)) SCAN! gex_Rank_t gasneti_tm_rev_rank(gasneti_TM_t tm, gex_Rank_t jobrank) { gasnete_coll_team_t team = tm->_coll_team; gasneti_assert(team != GASNET_TEAM_ALL); // TM0 should not reach here gex_Rank_t size = tm->_size; gasneti_assert_uint(size ,==, team->total_ranks); for (gex_Rank_t rank = 0; rank < size; ++rank) { if (team->rel2act_map[rank] == jobrank) return rank; } return GEX_RANK_INVALID; } static size_t get_scratch_size(gex_Rank_t new_tm_size, gex_Flags_t flags) { // Specially defined cases if (0 == new_tm_size) return 0; if (1 == new_tm_size) return GASNETE_COLL_SCRATCH_SIZE_MIN; static size_t recommended; static int is_init = 0; if_pf (!is_init) { static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); if (!is_init) { recommended = gasneti_getenv_int_withdefault("GASNET_COLL_SCRATCH_SIZE", GASNETE_COLL_SCRATCH_SIZE_DEFAULT,1); // Silently raise to implementation-defined minimum recommended = MAX(recommended, GASNETE_COLL_SCRATCH_SIZE_MIN); gasneti_sync_writes(); is_init = 1; } gasneti_mutex_unlock(&lock); } else { gasneti_sync_reads(); } return recommended; } size_t gasneti_TM_Split(gex_TM_t *new_tm_p, gex_TM_t e_parent, int color, int key, void *addr, size_t len, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_TM_t i_parent = gasneti_import_tm_nonpair(e_parent); gasneti_EP_t ep = i_parent->_ep; GASNETI_TRACE_PRINTF(O,("gex_TM_Split: parent="GASNETI_TMSELFFMT" color=%d key=%d flags=%d", GASNETI_TMSELFSTR(e_parent), color, key, flags)); GASNETI_CHECK_INJECT(); static int did_warn = 0; if ((flags & GEX_FLAG_TM_SCRATCH_SIZE_MIN) && !did_warn) { if (! i_parent->_rank) { gasneti_console_message("WARNING", "gex_TM_Split() called using GEX_FLAG_TM_SCRATCH_SIZE_MIN, " "deprecated since specification 0.11."); } did_warn = 1; // Some process did, even if it was not us. } #if GASNET_DEBUG if ((flags & GEX_FLAG_TM_SCRATCH_SIZE_MIN) && (flags & GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED)) { gasneti_fatalerror("Call to gex_TM_Split() with mutually-exclusive " "GEX_FLAG_TM_SCRATCH_SIZE_MIN and " "GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED both set in flags argument"); } #endif if (flags & (GEX_FLAG_TM_SCRATCH_SIZE_MIN | GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED)) { // Don't know true size w/o comms, but singleton parent can only produce singleton children size_t result = new_tm_p ? get_scratch_size(i_parent->_size, flags) : 0; GASNETI_TRACE_PRINTF(O,("gex_TM_Split: scratch size query result=%"PRIuSZ, result)); return result; } // Split's scratch address is GEX_FLAG_TM_LOCAL_SCRATCH by default, // but GEX_FLAG_TM_NO_SCRATCH is also accepted. // TODO: support GEX_FLAG_TM_SYMMETRIC_SCRATCH too if (flags & GEX_FLAG_TM_GLOBAL_SCRATCH) { gasneti_fatalerror("Invalid call to gex_TM_Split with GEX_FLAG_TM_GLOBAL_SCRATCH"); } else if (flags & GEX_FLAG_TM_SYMMETRIC_SCRATCH) { gasneti_fatalerror("Invalid call to gex_TM_Split with GEX_FLAG_TM_SYMMETRIC_SCRATCH"); } else if (! (flags & GEX_FLAG_TM_NO_SCRATCH)) { flags |= GEX_FLAG_TM_LOCAL_SCRATCH; } if (!new_tm_p) { color = -1; // tell gasnete_coll_team_split() not to create a team for this caller } else { gasneti_assert_int(color ,>=, 0); if (! (flags & GEX_FLAG_TM_NO_SCRATCH)) { #if !GASNET_SEGMENT_EVERYTHING gasneti_assert(ep->_segment); gasneti_assert_ptr(addr ,>=, ep->_segment->_addr); gasneti_assert_ptr((uint8_t*)addr+len ,<=, ep->_segment->_ub); #endif if (!len) { gasneti_fatalerror("Invalid call to gex_TM_Split with scratch_size = 0"); } } } gasnete_coll_team_t team = gasnete_coll_team_split(i_parent->_coll_team, color, key, len, addr, flags GASNETI_THREAD_PASS); if (team == NULL) { gasneti_assert(!new_tm_p); GASNETI_TRACE_PRINTF(O,("gex_TM_Split: parent="GASNETI_TMSELFFMT" [No team created]", GASNETI_TMSELFSTR(e_parent))); return 0; } gasneti_TM_t i_tm = gasneti_alloc_tm(ep, team->myrank, team->total_ranks, flags); i_tm->_coll_team = team; gex_TM_t e_tm = gasneti_export_tm(i_tm); team->e_tm = e_tm; *new_tm_p = e_tm; i_tm->_rank_map = team->rel2act_map; i_tm->_index_map = NULL; // TODO-EX: provide this for teams w/ non-primordial EPs GASNETI_TRACE_PRINTF(O,("gex_TM_Split: parent="GASNETI_TMSELFFMT" result="GASNETI_TMSELFFMT, GASNETI_TMSELFSTR(e_parent), GASNETI_TMSELFSTR(e_tm))); GASNETI_STAT_EVENT(O, TEAM_NEW_SPLIT); return 1; // return is documented as undefined } // TODO-EX: implement full generality given in specification // MISSING support for: // + non-primordial EPs // - (num_new_tms > 1) // - non-zero gex_ep_index // - caller's EP not in members[] // + GEX_FLAG_SCRATCH_SEG_OFFSET size_t gasneti_TM_Create( gex_TM_t *new_tms, size_t num_new_tms, gex_TM_t e_parent, gex_EP_Location_t *members, size_t nmembers, gex_Addr_t *scratch_addrs, size_t scratch_size, gex_Flags_t flags GASNETI_THREAD_FARG) { size_t result = 0; gasneti_TM_t i_parent = gasneti_import_tm_nonpair(e_parent); // NOTE: we can simplify things by observing that ranks in TM0 are always jobranks flags |= gasneti_is_tm0(i_parent) ? GEX_FLAG_RANK_IS_JOBRANK : 0; gasneti_EP_t ep = i_parent->_ep; int is_jobrank = (flags & GEX_FLAG_RANK_IS_JOBRANK); GASNETI_TRACE_PRINTF(O,("gex_TM_Create: parent="GASNETI_TMSELFFMT" num_new_tms=%"PRIuSZ" nmembers=%"PRIuSZ" scratch_size=%"PRIuSZ" flags=%d", GASNETI_TMSELFSTR(e_parent), num_new_tms, nmembers, scratch_size, flags)); GASNETI_CHECK_INJECT(); static int did_warn = 0; if ((flags & GEX_FLAG_TM_SCRATCH_SIZE_MIN) && !did_warn) { if (! i_parent->_rank) { gasneti_console_message("WARNING", "gex_TM_Create() called using GEX_FLAG_TM_SCRATCH_SIZE_MIN, " "deprecated since specification 0.11."); } did_warn = 1; // Some process did, even if it was not us. } #if GASNET_DEBUG if ((flags & GEX_FLAG_TM_SCRATCH_SIZE_MIN) && (flags & GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED)) { gasneti_fatalerror("Call to gex_TM_Create() with mutually-exclusive " "GEX_FLAG_TM_SCRATCH_SIZE_MIN and " "GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED both set in flags argument"); } #endif // For now 0 or 1 are the only valid numbers of outputs. gasneti_assert(!nmembers || num_new_tms == 1); if (flags & (GEX_FLAG_TM_SCRATCH_SIZE_MIN | GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED)) { size_t result = nmembers ? get_scratch_size(nmembers, flags) : 0; GASNETI_TRACE_PRINTF(O,("gex_TM_Create: scratch size query result=%"PRIuSZ, result)); return result; } if (num_new_tms && nmembers) { if (!scratch_size && !(flags & GEX_FLAG_TM_NO_SCRATCH)) { gasneti_fatalerror("Invalid call to gex_TM_Create with scratch_size = 0"); } GASNETI_TRACE_PRINTF(D,("gex_TM_Create: members[ %s ]", gasneti_format_eploc(members, nmembers))); } // TODO-EX: remove when subteam collectives no longer require a parent-scope entry barrier gasnete_coll_consensus_barrier(i_parent->_coll_team GASNETI_THREAD_PASS); if (! nmembers) { GASNETI_TRACE_PRINTF(O,("gex_TM_Create: parent="GASNETI_TMSELFFMT" [No team created]", GASNETI_TMSELFSTR(e_parent))); goto done; } // TODO: missing sanity checks on args, especially single-valued assertions // Find self in members[] gex_Rank_t my_member_rank = is_jobrank ? gasneti_i_tm_rank_to_jobrank(i_parent, i_parent->_rank) : i_parent->_rank; gex_Rank_t my_new_rank = GEX_RANK_INVALID; for (gex_Rank_t r = 0; r < nmembers; ++r) { if (members[r].gex_rank == my_member_rank && members[r].gex_ep_index == ep->_index) { my_new_rank = r; break; } } if (my_new_rank == GEX_RANK_INVALID) { // TODO-EX: not the right test or message in multi-EP case gasneti_fatalerror("Call to gex_TM_Create with nmembers=%"PRIuSZ" but 0 local members found in in members[]", nmembers); } // Generate rank_map[], which the new team will own gex_Rank_t *rank_map = gasneti_malloc(nmembers * sizeof(gex_Rank_t)); for (gex_Rank_t r = 0; r < nmembers; ++r) { gasneti_assert_always_uint(members[r].gex_ep_index ,==, 0); gex_Rank_t tmp = members[r].gex_rank; rank_map[r] = is_jobrank ? tmp : gasneti_i_tm_rank_to_jobrank(i_parent, tmp); } gasnete_coll_team_t team = gasnete_coll_team_create( i_parent->_coll_team, nmembers, my_new_rank, rank_map, scratch_size, scratch_addrs, flags GASNETI_THREAD_PASS); gasneti_TM_t i_tm = gasneti_alloc_tm(ep, my_new_rank, nmembers, flags); i_tm->_coll_team = team; gex_TM_t e_tm = gasneti_export_tm(i_tm); team->e_tm = e_tm; new_tms[0] = e_tm; i_tm->_rank_map = team->rel2act_map; i_tm->_index_map = NULL; // TODO-EX: provide this for teams w/ non-primordial EPs // TODO-EX: outut only correct for num_new_tms==1 GASNETI_TRACE_PRINTF(O,("gex_TM_Create: parent="GASNETI_TMSELFFMT" rank=%d size=%d result="GASNETI_TMSELFFMT, GASNETI_TMSELFSTR(e_parent), my_new_rank, (int)nmembers, GASNETI_TMSELFSTR(e_tm))); GASNETI_STAT_EVENT(O, TEAM_NEW_CREATE); result = 1; // return is documented as undefined done: return result; } int gasneti_TM_Destroy( gex_TM_t e_tm, gex_Memvec_t *scratch_p, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_TM_t i_tm = gasneti_import_tm_nonpair(e_tm); gasnete_coll_team_t team = i_tm->_coll_team; GASNETI_TRACE_PRINTF(O,("gex_TM_Destroy: team="GASNETI_TMSELFFMT" flags=%d", GASNETI_TMSELFSTR(e_tm), flags)); if (1) { // TODO: w/ multi-EP exactly one tm per proc should log this event GASNETI_STAT_EVENT(O, TEAM_DESTROY); } GASNETI_CHECK_INJECT(); if (gasneti_is_tm0(i_tm)) { gasneti_fatalerror("Invalid gasneti_TM_Destroy() of the primordial team"); } if (! (flags & GEX_FLAG_GLOBALLY_QUIESCED)) { gasnete_coll_consensus_barrier(team GASNETI_THREAD_PASS); } gasneti_free_tm(i_tm); return gasnete_coll_team_free(team, scratch_p); } /* ------------------------------------------------------------------------------------ */ // Simple blocking Exchange utility function extern void gasneti_blockingExchange(gex_TM_t tm, void *src, size_t len, void *dst) { // TODO-EX: use gex_Coll_Exchange() once available const int coll_flags = GASNET_COLL_LOCAL | GASNET_COLL_IN_MYSYNC | GASNET_COLL_OUT_MYSYNC; gasnet_coll_gather_all(gasneti_import_tm_nonpair(tm)->_coll_team, dst, src, len, coll_flags); } /* ------------------------------------------------------------------------------------ */ /* TM trace formatting - legal even without STATS/TRACE */ // Format a gex_TM_t as a GUID extern const char *gasneti_formattm(gex_TM_t e_tm) { if (e_tm == NULL) return "JOB"; // JobRank, as with token and legacy collectives if (gasneti_e_tm_is_pair(e_tm)) { gasneti_TM_Pair_t pair = gasneti_import_tm_pair(e_tm); gex_EP_Index_t loc_idx = gasneti_tm_pair_loc_idx(pair); gex_EP_Index_t rem_idx = gasneti_tm_pair_rem_idx(pair); return gasneti_dynsprintf("TM_PAIR(%x,%x)", loc_idx, rem_idx); } else { gasnete_coll_team_t team = gasneti_import_tm(e_tm)->_coll_team; if (team == NULL) return "TM0"; // Team0 before end of Client_Init return gasneti_dynsprintf("TM%x", (unsigned int)team->team_id); } } gasnet-2025.8.0/gasnet_atomicops.h0000664000175000017500000021544215142313673017142 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_atomicops.h $ * Description: GASNet header for portable atomic memory operations * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #if !defined(_IN_GASNET_TOOLS_H) && !defined(_IN_GASNETEX_H) #error This file is not meant to be included directly- clients should include gasnetex.h or gasnet_tools.h #endif #ifndef _GASNET_ATOMICOPS_H #define _GASNET_ATOMICOPS_H /* ------------------------------------------------------------------------------------ */ /* Portable atomic operations -------------------------- see README-tools for general usage information Signal safety of atomic operations ---------------------------------- On most, but not all, platforms, operations on gasneti_atomic_t are signal safe. On the few platforms where this is not the case GASNETI_ATOMICOPS_NOT_SIGNALSAFE will be defined to 1. Similarly, GASNETI_ATOMIC32_NOT_SIGNALSAFE and GASNETI_ATOMIC64_NOT_SIGNALSAFE are defined to 1 IFF the implementation of the fixed-width atomics is not signal-safe. Note that these two are set independently. Mutexes ------- If GASNETI_USE_GENERIC_ATOMICOPS is defined, then the gasnet atomics are implemented using mutexes. Therefore, one may wish to consider using other algorithms when this symbol is defined. Similarly, GASNETI_USE_GENERIC_ATOMIC32 and GASNETI_USE_GENERIC_ATOMIC64 are defined to 1 IFF the implementation of the fixed-width atomics uses mutexes. Note that these two are set independently. */ /* ------------------------------------------------------------------------------------ */ /* Flags for memory fences */ #define GASNETI_ATOMIC_NONE 0x00 #define GASNETI_ATOMIC_RMB_PRE 0x01 #define GASNETI_ATOMIC_WMB_PRE 0x02 // MUST equal GEX_FLAG_AD_REL #define GASNETI_ATOMIC_RMB_POST 0x04 // MUST equal GEX_FLAG_AD_ACQ #define GASNETI_ATOMIC_WMB_POST 0x08 #define GASNETI_ATOMIC_RMB_POST_IF_TRUE 0x10 #define GASNETI_ATOMIC_RMB_POST_IF_FALSE 0x20 /* OR into flags to make the weak atomics omit fences in a non-threaded build. */ #define GASNETI_ATOMIC_WEAK_FENCE 0x80000000 #define GASNETI_ATOMIC_MB_PRE (GASNETI_ATOMIC_WMB_PRE | GASNETI_ATOMIC_RMB_PRE) #define GASNETI_ATOMIC_MB_POST (GASNETI_ATOMIC_WMB_POST | GASNETI_ATOMIC_RMB_POST) #define GASNETI_ATOMIC_REL GASNETI_ATOMIC_WMB_PRE #define GASNETI_ATOMIC_ACQ GASNETI_ATOMIC_RMB_POST #define GASNETI_ATOMIC_ACQ_IF_TRUE GASNETI_ATOMIC_RMB_POST_IF_TRUE #define GASNETI_ATOMIC_ACQ_IF_FALSE GASNETI_ATOMIC_RMB_POST_IF_FALSE /* ------------------------------------------------------------------------------------ */ /* Uniform memory fences for GASNet atomics. */ #define GASNETI_ATOMIC_MASK_PRE (GASNETI_ATOMIC_WMB_PRE | GASNETI_ATOMIC_RMB_PRE) #define GASNETI_ATOMIC_MASK_POST (GASNETI_ATOMIC_WMB_POST | GASNETI_ATOMIC_RMB_POST) #define GASNETI_ATOMIC_MASK_BOOL (GASNETI_ATOMIC_MASK_POST | \ GASNETI_ATOMIC_RMB_POST_IF_TRUE | \ GASNETI_ATOMIC_RMB_POST_IF_FALSE) #define _gasneti_atomic_cf_before(f) if (f & GASNETI_ATOMIC_MASK_PRE) gasneti_compiler_fence(); #define _gasneti_atomic_cf_after(f) if (f & GASNETI_ATOMIC_MASK_POST) gasneti_compiler_fence(); #define _gasneti_atomic_cf_bool(f) if (f & GASNETI_ATOMIC_MASK_BOOL) gasneti_compiler_fence(); /* Fencing Part 1. Removal of fences which are redundant on a given platform * _gasneti_atomic_fence_{before,after}(flags) * _gasneti_atomic_fence_bool(flags, value) * * This level of macros serves to remove at, preprocess-time, any tests * which are redundant due to the relationships among fences. For example, * on a platform with a single fence instruction that is mb(), rmb() and * wmb() these macros will reduce three conditionals to just one. */ #if GASNETI_RMB_IS_MB && GASNETI_WMB_IS_MB /* Since mb() == rmb() == wmb() (including case that all are empty), only * a single check is needed for all three. */ #define _gasneti_atomic_fence_before(f) if (f & GASNETI_ATOMIC_MASK_PRE) gasneti_local_mb(); #define _gasneti_atomic_fence_after(f) if (f & GASNETI_ATOMIC_MASK_POST) gasneti_local_mb(); #elif GASNETI_MB_IS_SUM /* Since mb() == rmb()+wmb(), distinct rmb() and wmb() checks are * sufficient to implement a request for mb(), rmb() or wmb(). * This includes the case where either is just a compiler fence. */ #define _gasneti_atomic_fence_before(f) if (f & GASNETI_ATOMIC_RMB_PRE) gasneti_local_rmb(); \ if (f & GASNETI_ATOMIC_WMB_PRE) gasneti_local_wmb(); #define _gasneti_atomic_fence_after(f) if (f & GASNETI_ATOMIC_RMB_POST) gasneti_local_rmb(); \ if (f & GASNETI_ATOMIC_WMB_POST) gasneti_local_wmb(); #elif GASNETI_RMB_IS_MB /* Case with mb() == rmb() and a distinct wmb(). */ #define _gasneti_atomic_fence_before(f) if (f & GASNETI_ATOMIC_RMB_PRE) gasneti_local_rmb(); \ else if (f & GASNETI_ATOMIC_WMB_PRE) gasneti_local_wmb(); #define _gasneti_atomic_fence_after(f) if (f & GASNETI_ATOMIC_RMB_POST) gasneti_local_rmb(); \ else if (f & GASNETI_ATOMIC_WMB_POST) gasneti_local_wmb(); #elif GASNETI_WMB_IS_MB /* Case with mb() == wmb() and a distinct rmb(). */ #define _gasneti_atomic_fence_before(f) if (f & GASNETI_ATOMIC_WMB_PRE) gasneti_local_wmb(); \ else if (f & GASNETI_ATOMIC_RMB_PRE) gasneti_local_rmb(); #define _gasneti_atomic_fence_after(f) if (f & GASNETI_ATOMIC_WMB_POST) gasneti_local_wmb(); \ else if (f & GASNETI_ATOMIC_RMB_POST) gasneti_local_rmb(); #else /* With distinct mb(), rmb() and wmb(), we make the most general 3 checks (like a "switch"). */ #define _gasneti_atomic_fence_before(f) if ((f & GASNETI_ATOMIC_MASK_PRE) == GASNETI_ATOMIC_MB_PRE) gasneti_local_mb(); \ else if (f & GASNETI_ATOMIC_RMB_PRE) gasneti_local_rmb(); \ else if (f & GASNETI_ATOMIC_WMB_PRE) gasneti_local_wmb(); #define _gasneti_atomic_fence_after(f) if ((f & GASNETI_ATOMIC_MASK_POST) == GASNETI_ATOMIC_MB_POST) gasneti_local_mb(); \ else if (f & GASNETI_ATOMIC_RMB_POST) gasneti_local_rmb(); \ else if (f & GASNETI_ATOMIC_WMB_POST) gasneti_local_wmb(); #endif #if 1 /* * Several optimizations are possible when a conditional rmb() is combined * with an unconditional POST fence. Such optimizations would prevent * imposing a "double" rmb() in such cases. However: * 1) There are no current callers that mix *MB_POST with a * conditional RMB_POST_IF*, and no likely reason to. * 2) Though they all reduce a great deal at compile-time, * such "optimizations" look very large to the inliner * before any dead code can be eliminated. * Therefore, they are not currently implemented. */ #define _gasneti_atomic_fence_bool(f, v) \ if (((f & GASNETI_ATOMIC_RMB_POST_IF_TRUE ) && v) || \ ((f & GASNETI_ATOMIC_RMB_POST_IF_FALSE) && !v)) gasneti_local_rmb(); #endif /* ------------------------------------------------------------------------------------ */ /* Misc non-public definitions needed in the platform-specific parts */ #define _GASNETI_ATOMIC_CHECKALIGN(_a,_p) \ gasneti_assert(!(_a) || !(((uintptr_t)(_p))&((_a)-1))) /* ------------------------------------------------------------------------------------ */ /* All the platform-specific parts */ #include /* ------------------------------------------------------------------------------------ */ /* Fencing Part 2. Fences for the platform-specific atomics, based on macros in Part 1. * _gasneti_atomic{,32,64}_prologue_{set,read,rmw}(p, flags) * _gasneti_atomic{,32,64}_fence_{before,after}_{set,read,rmw}(p, flags) * _gasneti_atomic{,32,64}_fence_after_bool(p, flags, value) * * These can/should be predefined by the platform-specific code if there are * any fencing side-effects in the unfenced ("_" prefixed) implementaions. * Such overrides must be applied to entire groups, as can be seen below. * * The "atomic_" are used if the platform defines GASNETI_HAVE_PRIVATE_ATOMIC_T. * The "atomic32_" are used unless the platform defines GASNETI_USE_GENERIC_ATOMIC32 * The "atomic64_" are used unless the platform defines GASNETI_USE_GENERIC_ATOMIC64 */ #ifndef _gasneti_atomic_prologue_set #define _gasneti_atomic_prologue_set(p,f) /*empty*/ #define _gasneti_atomic_fence_before_set(p,f) _gasneti_atomic_fence_before(f) #define _gasneti_atomic_fence_after_set(p,f) _gasneti_atomic_fence_after(f) #endif #ifndef _gasneti_atomic32_prologue_set #define _gasneti_atomic32_prologue_set(p,f) /*empty*/ #define _gasneti_atomic32_fence_before_set(p,f) _gasneti_atomic_fence_before(f) #define _gasneti_atomic32_fence_after_set(p,f) _gasneti_atomic_fence_after(f) #endif #ifndef _gasneti_atomic64_prologue_set #define _gasneti_atomic64_prologue_set(p,f) /*empty*/ #define _gasneti_atomic64_fence_before_set(p,f) _gasneti_atomic_fence_before(f) #define _gasneti_atomic64_fence_after_set(p,f) _gasneti_atomic_fence_after(f) #endif #ifndef _gasneti_atomic_prologue_read #define _gasneti_atomic_prologue_read(p,f) /*empty*/ #define _gasneti_atomic_fence_before_read(p,f) _gasneti_atomic_fence_before(f) #define _gasneti_atomic_fence_after_read(p,f) _gasneti_atomic_fence_after(f) #endif #ifndef _gasneti_atomic32_prologue_read #define _gasneti_atomic32_prologue_read(p,f) /*empty*/ #define _gasneti_atomic32_fence_before_read(p,f) _gasneti_atomic_fence_before(f) #define _gasneti_atomic32_fence_after_read(p,f) _gasneti_atomic_fence_after(f) #endif #ifndef _gasneti_atomic64_prologue_read #define _gasneti_atomic64_prologue_read(p,f) /*empty*/ #define _gasneti_atomic64_fence_before_read(p,f) _gasneti_atomic_fence_before(f) #define _gasneti_atomic64_fence_after_read(p,f) _gasneti_atomic_fence_after(f) #endif #ifndef _gasneti_atomic_prologue_rmw #define _gasneti_atomic_prologue_rmw(p,f) /*empty*/ #define _gasneti_atomic_fence_before_rmw(p,f) _gasneti_atomic_fence_before(f) #define _gasneti_atomic_fence_after_rmw(p,f) _gasneti_atomic_fence_after(f) #define _gasneti_atomic_fence_after_bool(p,f,v) _gasneti_atomic_fence_after(f) \ _gasneti_atomic_fence_bool(f,v) #endif #ifndef _gasneti_atomic32_prologue_rmw #define _gasneti_atomic32_prologue_rmw(p,f) /*empty*/ #define _gasneti_atomic32_fence_before_rmw(p,f) _gasneti_atomic_fence_before(f) #define _gasneti_atomic32_fence_after_rmw(p,f) _gasneti_atomic_fence_after(f) #define _gasneti_atomic32_fence_after_bool(p,f,v) _gasneti_atomic_fence_after(f) \ _gasneti_atomic_fence_bool(f,v) #endif #ifndef _gasneti_atomic64_prologue_rmw #define _gasneti_atomic64_prologue_rmw(p,f) /*empty*/ #define _gasneti_atomic64_fence_before_rmw(p,f) _gasneti_atomic_fence_before(f) #define _gasneti_atomic64_fence_after_rmw(p,f) _gasneti_atomic_fence_after(f) #define _gasneti_atomic64_fence_after_bool(p,f,v) _gasneti_atomic_fence_after(f) \ _gasneti_atomic_fence_bool(f,v) #endif /* ------------------------------------------------------------------------------------ */ /* Fenced atomic templates, using the per-group fencing macros. */ #define GASNETI_ATOMIC_CHECKALIGN(stem,p) _GASNETI_ATOMIC_CHECKALIGN(stem##align,p) #define GASNETI_ATOMIC_FENCED_SET(group,_func,stem,p,v,f) \ do { \ stem##t * const __p = (p); \ const int __flags = (f); \ _gasneti_##group##_prologue_set(__p,__flags) \ GASNETI_ATOMIC_CHECKALIGN(stem,__p); \ _gasneti_##group##_fence_before_set(__p,__flags) \ _func(__p,(v)); \ _gasneti_##group##_fence_after_set(__p,__flags) \ } while (0) #define GASNETI_ATOMIC_FENCED_INCDEC(group,_func,stem,p,f) \ do { \ stem##t * const __p = (p); \ const int __flags = (f); \ _gasneti_##group##_prologue_rmw(__p,__flags) \ GASNETI_ATOMIC_CHECKALIGN(stem,__p); \ _gasneti_##group##_fence_before_rmw(__p,__flags) \ _func(__p); \ _gasneti_##group##_fence_after_rmw(__p,__flags) \ } while (0) #define GASNETI_ATOMIC_FENCED_SET_DEFN_NOT_INLINE(group,func,_func,stem) \ void func(stem##t *_p, stem##val_t _v, const int _flags) { \ GASNETI_ATOMIC_FENCED_SET(group,_func,stem,_p,_v,_flags); \ } #define GASNETI_ATOMIC_FENCED_INCDEC_DEFN_NOT_INLINE(group,func,_func,stem) \ void func(stem##t *_p, const int _flags) { \ GASNETI_ATOMIC_FENCED_INCDEC(group,_func,stem,_p,_flags); \ } #define GASNETI_ATOMIC_FENCED_READ_DEFN_NOT_INLINE(group,func,_func,stem) \ stem##val_t func(stem##t *_p, const int _flags) { \ _gasneti_##group##_prologue_read(_p,_flags) \ GASNETI_ATOMIC_CHECKALIGN(stem,_p); \ _gasneti_##group##_fence_before_read(_p,_flags) \ { const stem##val_t _retval = _func(_p); \ _gasneti_##group##_fence_after_read(_p,_flags) \ return _retval; \ } \ } #define GASNETI_ATOMIC_FENCED_DECTEST_DEFN_NOT_INLINE(group,func,_func,stem) \ int func(stem##t *_p, const int _flags) { \ _gasneti_##group##_prologue_rmw(_p,_flags) \ GASNETI_ATOMIC_CHECKALIGN(stem,_p); \ _gasneti_##group##_fence_before_rmw(_p,_flags) \ { const int _retval = _func(_p); \ _gasneti_##group##_fence_after_bool(_p,_flags, _retval) \ return _retval; \ } \ } #define GASNETI_ATOMIC_FENCED_CAS_DEFN_NOT_INLINE(group,func,_func,stem) \ int func(stem##t *_p, stem##val_t _oldval, \ stem##val_t _newval, const int _flags) { \ _gasneti_##group##_prologue_rmw(_p,_flags) \ GASNETI_ATOMIC_CHECKALIGN(stem,_p); \ _gasneti_##group##_fence_before_rmw(_p,_flags) \ { const int _retval = _func(_p,_oldval,_newval); \ _gasneti_##group##_fence_after_bool(_p,_flags, _retval) \ return _retval; \ } \ } #define GASNETI_ATOMIC_FENCED_SWAP_DEFN_NOT_INLINE(group,func,_func,stem) \ stem##val_t func(stem##t *_p, stem##val_t _val, const int _flags) { \ _gasneti_##group##_prologue_rmw(_p,_flags) \ GASNETI_ATOMIC_CHECKALIGN(stem,_p); \ _gasneti_##group##_fence_before_rmw(_p,_flags) \ { const stem##val_t _retval = _func(_p, _val); \ _gasneti_##group##_fence_after_rmw(_p,_flags) \ return _retval; \ } \ } #define GASNETI_ATOMIC_FENCED_ADDSUB_DEFN_NOT_INLINE(group,func,_func,stem) \ stem##val_t func(stem##t *_p, stem##val_t _op, const int _flags) { \ _gasneti_##group##_prologue_rmw(_p,_flags) \ GASNETI_ATOMIC_CHECKALIGN(stem,_p); \ _gasneti_##group##_fence_before_rmw(_p,_flags) \ { const stem##val_t _retval = _func(_p, _op); \ _gasneti_##group##_fence_after_rmw(_p,_flags) \ return _retval; \ } \ } #define GASNETI_ATOMIC_FENCED_ADDFETCH_DEFN_NOT_INLINE(group,func,_func,stem) \ stem##val_t func(stem##t *_p, stem##val_t _op, const int _flags) {\ _gasneti_##group##_prologue_rmw(_p,_flags) \ GASNETI_ATOMIC_CHECKALIGN(stem,_p); \ _gasneti_##group##_fence_before_rmw(_p,_flags) \ { const stem##val_t _retval = _func(_p, _op); \ _gasneti_##group##_fence_after_rmw(_p,_flags) \ return _retval; \ } \ } #define GASNETI_ATOMIC_FENCED_SET_DEFN(group,func,_func,stem) \ GASNETI_INLINE(func) \ GASNETI_ATOMIC_FENCED_SET_DEFN_NOT_INLINE(group,func,_func,stem) #define GASNETI_ATOMIC_FENCED_INCDEC_DEFN(group,func,_func,stem) \ GASNETI_INLINE(func) \ GASNETI_ATOMIC_FENCED_INCDEC_DEFN_NOT_INLINE(group,func,_func,stem) #define GASNETI_ATOMIC_FENCED_READ_DEFN(group,func,_func,stem) \ GASNETI_INLINE(func) \ GASNETI_ATOMIC_FENCED_READ_DEFN_NOT_INLINE(group,func,_func,stem) #define GASNETI_ATOMIC_FENCED_DECTEST_DEFN(group,func,_func,stem) \ GASNETI_INLINE(func) \ GASNETI_ATOMIC_FENCED_DECTEST_DEFN_NOT_INLINE(group,func,_func,stem) #define GASNETI_ATOMIC_FENCED_CAS_DEFN(group,func,_func,stem) \ GASNETI_INLINE(func) \ GASNETI_ATOMIC_FENCED_CAS_DEFN_NOT_INLINE(group,func,_func,stem) #define GASNETI_ATOMIC_FENCED_SWAP_DEFN(group,func,_func,stem) \ GASNETI_INLINE(func) \ GASNETI_ATOMIC_FENCED_SWAP_DEFN_NOT_INLINE(group,func,_func,stem) #define GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(group,func,_func,stem) \ GASNETI_INLINE(func) \ GASNETI_ATOMIC_FENCED_ADDSUB_DEFN_NOT_INLINE(group,func,_func,stem) #define GASNETI_ATOMIC_FENCED_ADDFETCH_DEFN(group,func,_func,stem) \ GASNETI_INLINE(func) \ GASNETI_ATOMIC_FENCED_ADDFETCH_DEFN_NOT_INLINE(group,func,_func,stem) /* ------------------------------------------------------------------------------------ */ /* Typeless unfenced operations on a pointer to a (volatile) scalar */ #define _gasneti_scalar_atomic_init(v) (v) #define _gasneti_scalar_atomic_set(p,v) (*(p) = (v)) #define _gasneti_scalar_atomic_read(p) (*(p)) /* NOTE: _gasneti_scalar_atomic_compare_and_swap evaluates `p` either once * or twice, depending on the initial value. * However, it is used only in the body of inline functions in which `p` is * a function argument (and thus free of side-effects). */ #define _gasneti_scalar_atomic_compare_and_swap(p,oval,nval) \ (*(p) == (oval) ? (*(p) = (nval), 1) : 0) #if __cplusplus > 201703L // Bug 4060: C++20 deprecates certain "rmw" operations on volatile types #define _gasneti_scalar_atomic_increment(p) \ (([=](auto _p) { auto _tmp = *_p; _tmp++; *_p = _tmp; } )(p)) #define _gasneti_scalar_atomic_decrement(p) \ (([=](auto _p) { auto _tmp = *_p; _tmp--; *_p = _tmp; } )(p)) #define _gasneti_scalar_atomic_add(p,op) \ (([=](auto _p, auto _op) { auto _tmp = *_p; _tmp += _op; *_p = _tmp; return _tmp;} )(p,op)) #define _gasneti_scalar_atomic_subtract(p,op) \ (([=](auto _p, auto _op) { auto _tmp = *_p; _tmp -= _op; *_p = _tmp; return _tmp;} )(p,op)) #define _gasneti_scalar_atomic_decrement_and_test(p) \ (_gasneti_scalar_atomic_subtract(p,1) == 0) #else // C or C++ prior to 20 #define _gasneti_scalar_atomic_increment(p) ((*(p))++) #define _gasneti_scalar_atomic_decrement(p) ((*(p))--) #define _gasneti_scalar_atomic_decrement_and_test(p) ((--(*(p))) == 0) #define _gasneti_scalar_atomic_add(p,op) (*(p) += (op)) #define _gasneti_scalar_atomic_subtract(p,op) (*(p) -= (op)) #endif #define _gasneti_scalar_atomic_addfetch(p,op) \ _gasneti_scalar_atomic_add(p,op) /* Swap, as above, but not typeless due to need for a temporary */ #define GASNETI_SCALAR_ATOMIC_SWAP_DEFN(func,stem) \ GASNETI_INLINE(func) stem##val_t func(stem##t *_p, stem##val_t _val) {\ const stem##val_t _retval = *_p; *_p = _val; return _retval; \ } /* ------------------------------------------------------------------------------------ */ /* Fenced generic atomics, if needed, using per-platform defns and the macros above. */ #if defined(GASNETI_BUILD_GENERIC_ATOMIC32) || defined(GASNETI_BUILD_GENERIC_ATOMIC64) /* Fences for the generics */ #if !GASNETI_GENATOMIC_LOCKS /* Not locking, so use full fences */ #define _gasneti_genatomic_prologue_set(p,f) /*empty*/ #define _gasneti_genatomic_prologue_read(p,f) /*empty*/ #define _gasneti_genatomic_prologue_rmw(p,f) /*empty*/ #define _gasneti_genatomic_fence_before_rmw(p,f) _gasneti_atomic_fence_before(f) #define _gasneti_genatomic_fence_after_rmw(p,f) _gasneti_atomic_fence_after(f) #define _gasneti_genatomic_fence_after_bool(p,f,v) _gasneti_atomic_fence_bool(f,v) #define _GASNETI_GENATOMIC_DECL_AND_DEFN(_sz) \ typedef volatile uint##_sz##_t gasneti_genatomic##_sz##_t; \ typedef uint##_sz##_t gasneti_genatomic##_sz##_val_t; \ typedef int##_sz##_t gasneti_genatomic##_sz##_sval_t; \ GASNETI_ATOMIC_FENCED_SET_DEFN(genatomic, \ gasneti_genatomic##_sz##_set, \ _gasneti_scalar_atomic_set, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_INCDEC_DEFN(genatomic, \ gasneti_genatomic##_sz##_increment, \ _gasneti_scalar_atomic_increment, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_INCDEC_DEFN(genatomic, \ gasneti_genatomic##_sz##_decrement, \ _gasneti_scalar_atomic_decrement, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_DECTEST_DEFN(genatomic, \ gasneti_genatomic##_sz##_decrement_and_test, \ _gasneti_scalar_atomic_decrement_and_test, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_CAS_DEFN(genatomic, \ gasneti_genatomic##_sz##_compare_and_swap, \ _gasneti_scalar_atomic_compare_and_swap, \ gasneti_genatomic##_sz##_) \ GASNETI_SCALAR_ATOMIC_SWAP_DEFN(_gasneti_genatomic##_sz##_swap, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_SWAP_DEFN(genatomic, \ gasneti_genatomic##_sz##_swap, \ _gasneti_genatomic##_sz##_swap, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_ADDFETCH_DEFN(genatomic, \ gasneti_genatomic##_sz##_addfetch, \ _gasneti_scalar_atomic_addfetch, \ gasneti_genatomic##_sz##_) #else /* Mutex-based versions */ #define GASNETI_GENATOMIC_LOCK_PREP(ptr) \ gasnett_mutex_t * const _genatomic_lock = gasneti_mutex_atomic_hash_lookup((uintptr_t)ptr) #define GASNETI_GENATOMIC_LOCK() gasnett_mutex_lock(_genatomic_lock) #define GASNETI_GENATOMIC_UNLOCK() gasnett_mutex_unlock(_genatomic_lock) /* The lock acquire includes RMB and release includes WMB */ #define _gasneti_genatomic_prologue_set(p,f) GASNETI_GENATOMIC_LOCK_PREP(p); #define _gasneti_genatomic_prologue_read(p,f) /*empty*/ #define _gasneti_genatomic_prologue_rmw(p,f) GASNETI_GENATOMIC_LOCK_PREP(p); #define _gasneti_genatomic_fence_before_rmw(p,f) _gasneti_atomic_fence_before((f&~GASNETI_ATOMIC_RMB_PRE)) \ GASNETI_GENATOMIC_LOCK(); #define _gasneti_genatomic_fence_after_rmw(p,f) GASNETI_GENATOMIC_UNLOCK(); \ _gasneti_atomic_fence_after((f&~GASNETI_ATOMIC_WMB_POST)) #define _gasneti_genatomic_fence_after_bool(p,f,v) GASNETI_GENATOMIC_UNLOCK(); \ _gasneti_atomic_fence_after((f&~GASNETI_ATOMIC_WMB_POST))\ _gasneti_atomic_fence_bool(f,v) /* Because mutexes are not yet available (bug 693: avoid header dependency cycle), * we don't define the lock-acquiring operations as inlines. * Therefore, we declared them here but define them in gasnet_tools.c */ #define _GASNETI_GENATOMIC_DECL_AND_DEFN(_sz) \ typedef volatile uint##_sz##_t gasneti_genatomic##_sz##_t; \ typedef uint##_sz##_t gasneti_genatomic##_sz##_val_t; \ typedef int##_sz##_t gasneti_genatomic##_sz##_sval_t; \ extern void gasneti_genatomic##_sz##_set(gasneti_genatomic##_sz##_t *_p, \ gasneti_genatomic##_sz##_val_t _v, \ const int _flags); \ extern void gasneti_genatomic##_sz##_increment(gasneti_genatomic##_sz##_t *_p, \ const int _flags); \ extern void gasneti_genatomic##_sz##_decrement(gasneti_genatomic##_sz##_t *_p, \ const int _flags); \ extern int gasneti_genatomic##_sz##_decrement_and_test(gasneti_genatomic##_sz##_t *_p, \ const int _flags); \ extern int gasneti_genatomic##_sz##_compare_and_swap(gasneti_genatomic##_sz##_t *_p, \ uint##_sz##_t _oldval, \ uint##_sz##_t _newval, \ const int _flags); \ extern uint##_sz##_t gasneti_genatomic##_sz##_swap(gasneti_genatomic##_sz##_t *_p, \ uint##_sz##_t _val, \ const int _flags); \ extern uint##_sz##_t gasneti_genatomic##_sz##_addfetch(gasneti_genatomic##_sz##_t *_p, \ uint##_sz##_t _op, \ const int _flags); #define _GASNETI_GENATOMIC_DEFN(_sz) \ GASNETI_ATOMIC_FENCED_SET_DEFN_NOT_INLINE(genatomic, \ gasneti_genatomic##_sz##_set, \ _gasneti_scalar_atomic_set, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_INCDEC_DEFN_NOT_INLINE(genatomic, \ gasneti_genatomic##_sz##_increment, \ _gasneti_scalar_atomic_increment, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_INCDEC_DEFN_NOT_INLINE(genatomic, \ gasneti_genatomic##_sz##_decrement, \ _gasneti_scalar_atomic_decrement, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_DECTEST_DEFN_NOT_INLINE(genatomic, \ gasneti_genatomic##_sz##_decrement_and_test, \ _gasneti_scalar_atomic_decrement_and_test, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_CAS_DEFN_NOT_INLINE(genatomic, \ gasneti_genatomic##_sz##_compare_and_swap, \ _gasneti_scalar_atomic_compare_and_swap, \ gasneti_genatomic##_sz##_) \ GASNETI_SCALAR_ATOMIC_SWAP_DEFN(_gasneti_genatomic##_sz##_swap, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_SWAP_DEFN_NOT_INLINE(genatomic, \ gasneti_genatomic##_sz##_swap, \ _gasneti_genatomic##_sz##_swap, \ gasneti_genatomic##_sz##_) \ GASNETI_ATOMIC_FENCED_ADDFETCH_DEFN_NOT_INLINE(genatomic, \ gasneti_genatomic##_sz##_addfetch, \ _gasneti_scalar_atomic_addfetch, \ gasneti_genatomic##_sz##_) #endif #define _gasneti_genatomic_fence_before_set _gasneti_genatomic_fence_before_rmw #define _gasneti_genatomic_fence_after_set _gasneti_genatomic_fence_after_rmw /* READ is almost always performed without the lock (if any) held */ #define _gasneti_genatomic_fence_before_read(p,f) _gasneti_atomic_fence_before(f) #define _gasneti_genatomic_fence_after_read(p,f) _gasneti_atomic_fence_after(f) /* Build the 32-bit generics if needed */ #ifdef GASNETI_BUILD_GENERIC_ATOMIC32 _GASNETI_GENATOMIC_DECL_AND_DEFN(32) #define gasneti_genatomic32_init _gasneti_scalar_atomic_init GASNETI_ATOMIC_FENCED_READ_DEFN(genatomic,gasneti_genatomic32_read, _gasneti_scalar_atomic_read,gasneti_genatomic32_) #ifdef _GASNETI_GENATOMIC_DEFN #define GASNETI_GENATOMIC32_DEFN _GASNETI_GENATOMIC_DEFN(32) #endif #endif /* Build the 64-bit generics if needed */ #ifdef GASNETI_BUILD_GENERIC_ATOMIC64 _GASNETI_GENATOMIC_DECL_AND_DEFN(64) #define gasneti_genatomic64_init _gasneti_scalar_atomic_init #if _gasneti_need_genatomic64_read /* ILP32 or HYBRID for under-aligned ABIs */ /* Mutex is needed in read to avoid word tearing. * Can't use the normal template w/o also forcing a mutex into the 32-bit generics. * Note that we use the "rmw" fencing macros here, since the "read" fencing macros * assume no lock is taken and thus would potentially double fence. */ extern uint64_t gasneti_genatomic64_read(gasneti_genatomic64_t *_p, const int _flags); #define _GASNETI_GENATOMIC64_DEFN_EXTRA \ uint64_t gasneti_genatomic64_read(gasneti_genatomic64_t *_p, const int _flags) { \ _gasneti_genatomic_prologue_rmw(_p,_flags) /* rmw is NOT a typo here */ \ GASNETI_ATOMIC_CHECKALIGN(gasneti_genatomic64_,_p); \ _gasneti_genatomic_fence_before_rmw(_p,_flags) /* rmw is NOT a typo here */ \ { const uint64_t _retval = _gasneti_scalar_atomic_read(_p); \ _gasneti_genatomic_fence_after_rmw(_p,_flags) /* rmw is NOT a typo here */ \ return _retval; \ } \ } #else /* Read is assumed naturally atomic due to word size, or it doesn't matter in a serial build. */ GASNETI_ATOMIC_FENCED_READ_DEFN(genatomic,gasneti_genatomic64_read, _gasneti_scalar_atomic_read,gasneti_genatomic64_) #define _GASNETI_GENATOMIC64_DEFN_EXTRA /* Empty */ #endif #ifndef _GASNETI_GENATOMIC_DEFN #define _GASNETI_GENATOMIC_DEFN(_sz) /* Empty */ #endif #define GASNETI_GENATOMIC64_DEFN _GASNETI_GENATOMIC_DEFN(64) \ _GASNETI_GENATOMIC64_DEFN_EXTRA #endif #endif /* ------------------------------------------------------------------------------------ */ /* Define the fully-fenced fixed-width atomics */ typedef uint32_t gasneti_atomic32_val_t; /* For consistency in fencing macros */ typedef int32_t gasneti_atomic32_sval_t; /* For consistency in fencing macros */ #if defined(GASNETI_USE_GENERIC_ATOMIC32) /* Define 32-bit fixed-width atomics in terms of full-fenced generics */ #define gasneti_atomic32_t gasneti_genatomic32_t #define gasneti_atomic32_init gasneti_genatomic32_init #define gasneti_genatomic32_add(p,op,f) ((uint32_t)gasneti_genatomic32_addfetch((p),(op),(f))) #define gasneti_genatomic32_subtract(p,op,f) ((uint32_t)gasneti_genatomic32_addfetch((p),(uint32_t)-(op),(f))) #define _gasneti_atomic32_cons(_id) gasneti_genatomic32_##_id #elif defined(GASNETI_USING_SLOW_ATOMIC32) typedef struct { volatile uint32_t gasneti_ctr; } gasneti_atomic32_t; #define gasneti_atomic32_init(v) { (v) } #define gasneti_slow_atomic32_t gasneti_atomic32_t #define gasneti_slow_atomic32_init gasneti_atomic32_init #define gasneti_slow_atomic32_align gasneti_atomic32_align extern uint32_t gasneti_slow_atomic32_read(gasneti_atomic32_t *_p, const int _flags); extern void gasneti_slow_atomic32_set(gasneti_atomic32_t *_p, uint32_t _v, const int _flags); extern void gasneti_slow_atomic32_increment(gasneti_atomic32_t *_p, const int _flags); extern void gasneti_slow_atomic32_decrement(gasneti_atomic32_t *_p, const int _flags); extern int gasneti_slow_atomic32_decrement_and_test(gasneti_atomic32_t *_p, const int _flags); extern int gasneti_slow_atomic32_compare_and_swap(gasneti_atomic32_t *_p, uint32_t _oldval, uint32_t _newval, const int _flags); extern uint32_t gasneti_slow_atomic32_swap(gasneti_atomic32_t *_p, uint32_t _val, const int _flags); extern uint32_t gasneti_slow_atomic32_add(gasneti_atomic32_t *_p, uint32_t _op, const int _flags); extern uint32_t gasneti_slow_atomic32_subtract(gasneti_atomic32_t *_p, uint32_t _op, const int _flags); #define _gasneti_atomic32_cons(_id) gasneti_slow_atomic32_##_id #else /* Define 32-bit fixed-width atomics in terms of un-fenced native atomics */ /* First define a fully-fenced addfetch if it appears to be needed */ #if defined(_gasneti_atomic32_addfetch) || defined(_gasneti_atomic32_fetchadd) #ifndef _gasneti_atomic32_addfetch #define _gasneti_atomic32_addfetch(p,op) ((op) + _gasneti_atomic32_fetchadd((p),(op))) #endif GASNETI_ATOMIC_FENCED_ADDFETCH_DEFN(atomic32, \ gasneti_atomic32_addfetch, \ _gasneti_atomic32_addfetch, \ gasneti_atomic32_) #elif defined(gasneti_atomic32_fetchadd) GASNETI_INLINE(gasneti_atomic32_addfetch) uint32_t gasneti_atomic32_addfetch(gasneti_atomic32_t *_p, uint32_t _op, int _f) { return (uint32_t)(gasneti_atomic32_fetchadd(_p,_op,_f) + _op); } #endif #ifdef _gasneti_atomic32_set #define gasneti_atomic32_set(p,v,f) GASNETI_ATOMIC_FENCED_SET(atomic32,_gasneti_atomic32_set,gasneti_atomic32_,p,v,f) #endif #ifdef _gasneti_atomic32_read GASNETI_ATOMIC_FENCED_READ_DEFN(atomic32,gasneti_atomic32_read,_gasneti_atomic32_read,gasneti_atomic32_) #endif #ifdef _gasneti_atomic32_increment #define gasneti_atomic32_increment(p,f) GASNETI_ATOMIC_FENCED_INCDEC(atomic32,_gasneti_atomic32_increment,gasneti_atomic32_,p,f) #elif !defined(gasneti_atomic32_increment) #define gasneti_atomic32_increment(p,f) ((void)gasneti_atomic32_addfetch((p),1,(f))) #endif #ifdef _gasneti_atomic32_decrement #define gasneti_atomic32_decrement(p,f) GASNETI_ATOMIC_FENCED_INCDEC(atomic32,_gasneti_atomic32_decrement,gasneti_atomic32_,p,f) #elif !defined(gasneti_atomic32_decrement) #define gasneti_atomic32_decrement(p,f) ((void)gasneti_atomic32_addfetch((p),(uint32_t)-1,(f))) #endif #ifndef gasneti_atomic32_decrement_and_test #ifndef _gasneti_atomic32_decrement_and_test #define _gasneti_atomic32_decrement_and_test(p) (0==_gasneti_atomic32_addfetch((p),(uint32_t)-1)) #endif GASNETI_ATOMIC_FENCED_DECTEST_DEFN(atomic32,gasneti_atomic32_decrement_and_test,_gasneti_atomic32_decrement_and_test,gasneti_atomic32_) #endif #ifdef _gasneti_atomic32_compare_and_swap GASNETI_ATOMIC_FENCED_CAS_DEFN(atomic32,gasneti_atomic32_compare_and_swap,_gasneti_atomic32_compare_and_swap,gasneti_atomic32_) #endif #ifdef _gasneti_atomic32_swap GASNETI_ATOMIC_FENCED_SWAP_DEFN(atomic32,gasneti_atomic32_swap,_gasneti_atomic32_swap,gasneti_atomic32_) #endif #ifdef _gasneti_atomic32_add GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(atomic32,gasneti_atomic32_add,_gasneti_atomic32_add,gasneti_atomic32_) #elif !defined(gasneti_atomic32_add) #define gasneti_atomic32_add(p,op,f) ((uint32_t)gasneti_atomic32_addfetch((p),(uint32_t)(op),(f))) #endif #ifdef _gasneti_atomic32_subtract GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(atomic32,gasneti_atomic32_subtract,_gasneti_atomic32_subtract,gasneti_atomic32_) #elif !defined(gasneti_atomic32_subtract) #define gasneti_atomic32_subtract(p,op,f) ((uint32_t)gasneti_atomic32_addfetch((p),(uint32_t)-(op),(f))) #endif #endif #ifdef _gasneti_atomic32_cons #define gasneti_atomic32_read _gasneti_atomic32_cons(read) #define gasneti_atomic32_set _gasneti_atomic32_cons(set) #define gasneti_atomic32_increment _gasneti_atomic32_cons(increment) #define gasneti_atomic32_decrement _gasneti_atomic32_cons(decrement) #define gasneti_atomic32_decrement_and_test _gasneti_atomic32_cons(decrement_and_test) #define gasneti_atomic32_compare_and_swap _gasneti_atomic32_cons(compare_and_swap) #define gasneti_atomic32_swap _gasneti_atomic32_cons(swap) #define gasneti_atomic32_add _gasneti_atomic32_cons(add) #define gasneti_atomic32_subtract _gasneti_atomic32_cons(subtract) #endif typedef uint64_t gasneti_atomic64_val_t; /* For consistency in fencing macros */ typedef int64_t gasneti_atomic64_sval_t; /* For consistency in fencing macros */ #if defined(GASNETI_USE_GENERIC_ATOMIC64) /* Define 64-bit fixed-width atomics in terms of full-fenced generics */ #define gasneti_atomic64_t gasneti_genatomic64_t #define gasneti_atomic64_init gasneti_genatomic64_init #define gasneti_genatomic64_add(p,op,f) ((uint64_t)gasneti_genatomic64_addfetch((p),(uint64_t)(op),(f))) #define gasneti_genatomic64_subtract(p,op,f) ((uint64_t)gasneti_genatomic64_addfetch((p),(uint64_t)-(op),(f))) #define _gasneti_atomic64_cons(_id) gasneti_genatomic64_##_id #elif defined(GASNETI_USING_SLOW_ATOMIC64) typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(v) { (v) } #define gasneti_slow_atomic64_t gasneti_atomic64_t #define gasneti_slow_atomic64_init gasneti_atomic64_init #define gasneti_slow_atomic64_align gasneti_atomic64_align extern uint64_t gasneti_slow_atomic64_read(gasneti_atomic64_t *_p, const int _flags); extern void gasneti_slow_atomic64_set(gasneti_atomic64_t *_p, uint64_t _v, const int _flags); extern void gasneti_slow_atomic64_increment(gasneti_atomic64_t *_p, const int _flags); extern void gasneti_slow_atomic64_decrement(gasneti_atomic64_t *_p, const int _flags); extern int gasneti_slow_atomic64_decrement_and_test(gasneti_atomic64_t *_p, const int _flags); extern int gasneti_slow_atomic64_compare_and_swap(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval, const int _flags); extern uint64_t gasneti_slow_atomic64_swap(gasneti_atomic64_t *_p, uint64_t _val, const int _flags); extern uint64_t gasneti_slow_atomic64_add(gasneti_atomic64_t *_p, uint64_t _op, const int _flags); extern uint64_t gasneti_slow_atomic64_subtract(gasneti_atomic64_t *_p, uint64_t _op, const int _flags); #define _gasneti_atomic64_cons(_id) gasneti_slow_atomic64_##_id #elif defined(GASNETI_HYBRID_ATOMIC64) /* Hybrid: need to runtime select between native and generic, based on alignment. * * Note that this code is currently only used for ILP32 on PPC64 h/w on Darwin. * Consequently, it is less general in its assumptions about what thas been * implemented in the platform-specific code. In particular we require the * following in the current revision of "hybid" atomics support: * _gasneti_atomic64_{set,read,compare_and_swap,swap,fetchadd} */ #define __gasneti_atomic64_set(p,v,f) GASNETI_ATOMIC_FENCED_SET(atomic64,_gasneti_atomic64_set,gasneti_atomic64_,p,v,f) #define gasneti_atomic64_set(p,v,f) do { \ const int _f = (f); \ const uint64_t _v = (v); \ gasneti_atomic64_t * const _p = (p); \ if_pt (!((uintptr_t)_p & 0x7)) { \ __gasneti_atomic64_set(_p,_v,_f); \ } else { \ gasneti_genatomic64_set((gasneti_genatomic64_t *)_p,_v,_f); \ } \ } while (0) GASNETI_ATOMIC_FENCED_READ_DEFN(atomic64,__gasneti_atomic64_read,_gasneti_atomic64_read,gasneti_atomic64_) GASNETI_INLINE(gasneti_atomic64_read) uint64_t gasneti_atomic64_read(gasneti_atomic64_t *_p, const int _flags) { if_pt (!((uintptr_t)_p & 0x7)) { return __gasneti_atomic64_read(_p, _flags); } else { return gasneti_genatomic64_read((gasneti_genatomic64_t *)_p, _flags); } } GASNETI_ATOMIC_FENCED_CAS_DEFN(atomic64,__gasneti_atomic64_compare_and_swap,_gasneti_atomic64_compare_and_swap,gasneti_atomic64_) GASNETI_INLINE(gasneti_atomic64_compare_and_swap) int gasneti_atomic64_compare_and_swap(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval, const int _flags) { if_pt (!((uintptr_t)_p & 0x7)) { return __gasneti_atomic64_compare_and_swap(_p,_oldval,_newval,_flags); } else { return gasneti_genatomic64_compare_and_swap((gasneti_genatomic64_t *)_p,_oldval,_newval,_flags); } } GASNETI_ATOMIC_FENCED_SWAP_DEFN(atomic64,__gasneti_atomic64_swap,_gasneti_atomic64_swap,gasneti_atomic64_) GASNETI_INLINE(gasneti_atomic64_swap) uint64_t gasneti_atomic64_swap(gasneti_atomic64_t *_p, uint64_t _op, const int _flags) { if_pt (!((uintptr_t)_p & 0x7)) { return __gasneti_atomic64_swap(_p,_op,_flags); } else { return gasneti_genatomic64_swap((gasneti_genatomic64_t *)_p,_op,_flags); } } GASNETI_ATOMIC_FENCED_ADDFETCH_DEFN(atomic64,__gasneti_atomic64_fetchadd,_gasneti_atomic64_fetchadd,gasneti_atomic64_) GASNETI_INLINE(gasneti_atomic64_addfetch) uint64_t gasneti_atomic64_addfetch(gasneti_atomic64_t *_p, uint64_t _op, const int _flags) { if_pt (!((uintptr_t)_p & 0x7)) { return _op + __gasneti_atomic64_fetchadd(_p,_op,_flags); } else { return gasneti_genatomic64_addfetch((gasneti_genatomic64_t *)_p,_op,_flags); } } GASNETI_INLINE(gasneti_atomic64_decrement_and_test) int gasneti_atomic64_decrement_and_test(gasneti_atomic64_t *_p, const int _flags) { const int _mask = (GASNETI_ATOMIC_RMB_POST_IF_TRUE|GASNETI_ATOMIC_RMB_POST_IF_FALSE); if_pt (!((uintptr_t)_p & 0x7)) { const int _result = (1 == __gasneti_atomic64_fetchadd(_p,(uint64_t)-1,_flags)); _gasneti_atomic64_fence_after_bool(_p,(_flags&_mask),_result); return _result; } else { const int _result = (0 == gasneti_genatomic64_addfetch((gasneti_genatomic64_t *)_p,(uint64_t)-1,_flags)); _gasneti_atomic_fence_after_bool(_p,(_flags&_mask),_result); return _result; } } #define gasneti_atomic64_increment(p,f) ((void)gasneti_atomic64_addfetch((p),1,(f))) #define gasneti_atomic64_decrement(p,f) ((void)gasneti_atomic64_addfetch((p),(uint64_t)-1,(f))) #define gasneti_atomic64_add(p,op,f) ((uint64_t)gasneti_atomic64_addfetch((p),(uint64_t)(op),(f))) #define gasneti_atomic64_subtract(p,op,f) ((uint64_t)gasneti_atomic64_addfetch((p),(uint64_t)-(op),(f))) #else /* Define 64-bit fixed-width atomics in terms of un-fenced native atomics */ /* First define a fully-fenced addfetch if it appears to be needed */ #if defined(_gasneti_atomic64_addfetch) || defined(_gasneti_atomic64_fetchadd) #ifndef _gasneti_atomic64_addfetch #define _gasneti_atomic64_addfetch(p,op) ((op) + _gasneti_atomic64_fetchadd((p),(op))) #endif GASNETI_ATOMIC_FENCED_ADDFETCH_DEFN(atomic64, \ gasneti_atomic64_addfetch, \ _gasneti_atomic64_addfetch, \ gasneti_atomic64_) #elif defined(gasneti_atomic64_fetchadd) GASNETI_INLINE(gasneti_atomic64_addfetch) uint64_t gasneti_atomic64_addfetch(gasneti_atomic64_t *_p, uint64_t _op, int _f) { return (uint64_t)(gasneti_atomic64_fetchadd(_p,_op,_f) + _op); } #endif #ifdef _gasneti_atomic64_set #define gasneti_atomic64_set(p,v,f) GASNETI_ATOMIC_FENCED_SET(atomic64,_gasneti_atomic64_set,gasneti_atomic64_,p,v,f) #endif #ifdef _gasneti_atomic64_read GASNETI_ATOMIC_FENCED_READ_DEFN(atomic64,gasneti_atomic64_read,_gasneti_atomic64_read,gasneti_atomic64_) #endif #ifdef _gasneti_atomic64_increment #define gasneti_atomic64_increment(p,f) GASNETI_ATOMIC_FENCED_INCDEC(atomic64,_gasneti_atomic64_increment,gasneti_atomic64_,p,f) #elif !defined(gasneti_atomic64_increment) #define gasneti_atomic64_increment(p,f) ((void)gasneti_atomic64_addfetch((p),1,(f))) #endif #ifdef _gasneti_atomic64_decrement #define gasneti_atomic64_decrement(p,f) GASNETI_ATOMIC_FENCED_INCDEC(atomic64,_gasneti_atomic64_decrement,gasneti_atomic64_,p,f) #elif !defined(gasneti_atomic64_decrement) #define gasneti_atomic64_decrement(p,f) ((void)gasneti_atomic64_addfetch((p),(uint64_t)-1,(f))) #endif #ifndef gasneti_atomic64_decrement_and_test #ifndef _gasneti_atomic64_decrement_and_test #define _gasneti_atomic64_decrement_and_test(p) (0==_gasneti_atomic64_addfetch((p),(uint64_t)-1)) #endif GASNETI_ATOMIC_FENCED_DECTEST_DEFN(atomic64,gasneti_atomic64_decrement_and_test,_gasneti_atomic64_decrement_and_test,gasneti_atomic64_) #endif #ifdef _gasneti_atomic64_compare_and_swap GASNETI_ATOMIC_FENCED_CAS_DEFN(atomic64,gasneti_atomic64_compare_and_swap,_gasneti_atomic64_compare_and_swap,gasneti_atomic64_) #endif #ifdef _gasneti_atomic64_swap GASNETI_ATOMIC_FENCED_SWAP_DEFN(atomic64,gasneti_atomic64_swap,_gasneti_atomic64_swap,gasneti_atomic64_) #endif #ifdef _gasneti_atomic64_add GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(atomic64,gasneti_atomic64_add,_gasneti_atomic64_add,gasneti_atomic64_) #elif !defined(gasneti_atomic64_add) #define gasneti_atomic64_add(p,op,f) ((uint64_t)gasneti_atomic64_addfetch((p),(uint64_t)(op),(f))) #endif #ifdef _gasneti_atomic64_subtract GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(atomic64,gasneti_atomic64_subtract,_gasneti_atomic64_subtract,gasneti_atomic64_) #elif !defined(gasneti_atomic64_subtract) #define gasneti_atomic64_subtract(p,op,f) ((uint64_t)gasneti_atomic64_addfetch((p),(uint64_t)-(op),(f))) #endif #endif #ifdef _gasneti_atomic64_cons #define gasneti_atomic64_read _gasneti_atomic64_cons(read) #define gasneti_atomic64_set _gasneti_atomic64_cons(set) #define gasneti_atomic64_increment _gasneti_atomic64_cons(increment) #define gasneti_atomic64_decrement _gasneti_atomic64_cons(decrement) #define gasneti_atomic64_decrement_and_test _gasneti_atomic64_cons(decrement_and_test) #define gasneti_atomic64_compare_and_swap _gasneti_atomic64_cons(compare_and_swap) #define gasneti_atomic64_swap _gasneti_atomic64_cons(swap) #define gasneti_atomic64_add _gasneti_atomic64_cons(add) #define gasneti_atomic64_subtract _gasneti_atomic64_cons(subtract) #endif /* ------------------------------------------------------------------------------------ */ /* Define the "normal" atomics, which might be a private type, or either the 32-bit or 64- * bit fixed-width types (which in turn may have been derived from the generics, above.) */ #if defined(GASNETI_HAVE_PRIVATE_ATOMIC_T) /* "Private" atomics, using per-platform defns and the fencing macros. * These definitions add fencing around non-fenced implementations, but defer to any * platform-specific fully-fenced definitions which may exisit. */ #ifndef gasneti_atomic_set #define gasneti_atomic_set(p,v,f) GASNETI_ATOMIC_FENCED_SET(atomic,_gasneti_atomic_set,gasneti_atomic_,p,v,f) #endif #ifndef gasneti_atomic_increment #define gasneti_atomic_increment(p,f) GASNETI_ATOMIC_FENCED_INCDEC(atomic,_gasneti_atomic_increment,gasneti_atomic_,p,f) #endif #ifndef gasneti_atomic_decrement #define gasneti_atomic_decrement(p,f) GASNETI_ATOMIC_FENCED_INCDEC(atomic,_gasneti_atomic_decrement,gasneti_atomic_,p,f) #endif #ifndef gasneti_atomic_read GASNETI_ATOMIC_FENCED_READ_DEFN(atomic,gasneti_atomic_read,_gasneti_atomic_read,gasneti_atomic_) #endif #ifndef gasneti_atomic_decrement_and_test GASNETI_ATOMIC_FENCED_DECTEST_DEFN(atomic,gasneti_atomic_decrement_and_test,_gasneti_atomic_decrement_and_test,gasneti_atomic_) #endif #if defined(GASNETI_HAVE_ATOMIC_CAS) && !defined(gasneti_atomic_compare_and_swap) GASNETI_ATOMIC_FENCED_CAS_DEFN(atomic,gasneti_atomic_compare_and_swap,_gasneti_atomic_compare_and_swap,gasneti_atomic_) #endif #if defined(GASNETI_HAVE_ATOMIC_CAS) && !defined(gasneti_atomic_swap) GASNETI_ATOMIC_FENCED_SWAP_DEFN(atomic,gasneti_atomic_swap,_gasneti_atomic_swap,gasneti_atomic_) #endif #if defined(GASNETI_HAVE_ATOMIC_ADD_SUB) && !defined(gasneti_atomic_add) GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(atomic,gasneti_atomic_add,_gasneti_atomic_add,gasneti_atomic_) #endif #if defined(GASNETI_HAVE_ATOMIC_ADD_SUB) && !defined(gasneti_atomic_subtract) GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(atomic,gasneti_atomic_subtract,_gasneti_atomic_subtract,gasneti_atomic_) #endif #elif !defined(GASNETI_FORCE_64BIT_ATOMICOPS) && /* Not forcing 64-bits */ \ (!defined(GASNETI_USE_GENERIC_ATOMIC32) || defined(GASNETI_USE_GENERIC_ATOMIC64)) /* No worse than 64 bit */ #define GASNETI_USE_32BIT_ATOMICS #else #define GASNETI_USE_64BIT_ATOMICS #endif #if defined(GASNETI_USE_32BIT_ATOMICS) typedef uint32_t gasneti_atomic_val_t; typedef int32_t gasneti_atomic_sval_t; #define GASNETI_ATOMIC_MAX ((gasneti_atomic_val_t)0xFFFFFFFFU) #define GASNETI_ATOMIC_SIGNED_MIN ((gasneti_atomic_sval_t)0x80000000) #define GASNETI_ATOMIC_SIGNED_MAX ((gasneti_atomic_sval_t)0x7FFFFFFF) #if defined(GASNETI_USE_GENERIC_ATOMIC32) #ifndef GASNETI_USE_GENERIC_ATOMICOPS #define GASNETI_USE_GENERIC_ATOMICOPS 1 #endif #endif #ifdef GASNETI_ATOMIC32_NOT_SIGNALSAFE #define GASNETI_ATOMICOPS_NOT_SIGNALSAFE 1 #endif #define GASNETI_HAVE_ATOMIC_CAS 1 #define GASNETI_HAVE_ATOMIC_ADD_SUB 1 #if defined(GASNETI_USING_SLOW_ATOMIC32) #define _gasneti_atomic_cons(_id) gasneti_slow_atomic32_##_id #else #define _gasneti_atomic_cons(_id) gasneti_atomic32_##_id #endif #elif defined(GASNETI_USE_64BIT_ATOMICS) typedef uint64_t gasneti_atomic_val_t; typedef int64_t gasneti_atomic_sval_t; #define GASNETI_ATOMIC_MAX ((gasneti_atomic_val_t)0xFFFFFFFFFFFFFFFFLLU) #define GASNETI_ATOMIC_SIGNED_MIN ((gasneti_atomic_sval_t)0x8000000000000000LL) #define GASNETI_ATOMIC_SIGNED_MAX ((gasneti_atomic_sval_t)0x7FFFFFFFFFFFFFFFLL) #if defined(GASNETI_USE_GENERIC_ATOMIC64) #ifndef GASNETI_USE_GENERIC_ATOMICOPS #define GASNETI_USE_GENERIC_ATOMICOPS 1 #endif #endif #ifdef GASNETI_ATOMIC64_NOT_SIGNALSAFE #define GASNETI_ATOMICOPS_NOT_SIGNALSAFE 1 #endif #define GASNETI_HAVE_ATOMIC_CAS 1 #define GASNETI_HAVE_ATOMIC_ADD_SUB 1 #if defined(GASNETI_USING_SLOW_ATOMIC64) #define _gasneti_atomic_cons(_id) gasneti_slow_atomic64_##_id #else #define _gasneti_atomic_cons(_id) gasneti_atomic64_##_id #endif #elif defined(GASNETI_USING_SLOW_ATOMICOPS) // GASNETI_HAVE_PRIVATE_ATOMIC_T case extern gasneti_atomic_val_t gasneti_slow_atomic_read(gasneti_atomic_t *_p, const int _flags); extern void gasneti_slow_atomic_set(gasneti_atomic_t *_p, gasneti_atomic_val_t _v, const int _flags); extern void gasneti_slow_atomic_increment(gasneti_atomic_t *_p, const int _flags); extern void gasneti_slow_atomic_decrement(gasneti_atomic_t *_p, const int _flags); extern int gasneti_slow_atomic_decrement_and_test(gasneti_atomic_t *_p, const int _flags); #if defined(GASNETI_HAVE_ATOMIC_CAS) extern int gasneti_slow_atomic_compare_and_swap(gasneti_atomic_t *_p, gasneti_atomic_val_t _oldval, gasneti_atomic_val_t _newval, const int _flags); extern gasneti_atomic_val_t gasneti_slow_atomic_swap(gasneti_atomic_t *_p, gasneti_atomic_val_t _val, const int _flags); #endif #if defined(GASNETI_HAVE_ATOMIC_ADD_SUB) extern gasneti_atomic_val_t gasneti_slow_atomic_add(gasneti_atomic_t *_p, gasneti_atomic_val_t _op, const int _flags); extern gasneti_atomic_val_t gasneti_slow_atomic_subtract(gasneti_atomic_t *_p, gasneti_atomic_val_t _op, const int _flags); #endif #define _gasneti_atomic_cons(_id) gasneti_slow_atomic_##_id #endif #ifndef gasneti_atomic_signed #define gasneti_atomic_signed(val) ((gasneti_atomic_sval_t)(val)) #endif #ifdef _gasneti_atomic_cons #define gasneti_atomic_t _gasneti_atomic_cons(t) #define gasneti_atomic_align _gasneti_atomic_cons(align) #define gasneti_atomic_init _gasneti_atomic_cons(init) #define gasneti_atomic_set _gasneti_atomic_cons(set) #define gasneti_atomic_read _gasneti_atomic_cons(read) #define gasneti_atomic_increment _gasneti_atomic_cons(increment) #define gasneti_atomic_decrement _gasneti_atomic_cons(decrement) #define gasneti_atomic_decrement_and_test _gasneti_atomic_cons(decrement_and_test) #if defined(GASNETI_HAVE_ATOMIC_CAS) #define gasneti_atomic_compare_and_swap _gasneti_atomic_cons(compare_and_swap) #define gasneti_atomic_swap _gasneti_atomic_cons(swap) #endif #if defined(GASNETI_HAVE_ATOMIC_ADD_SUB) #define gasneti_atomic_add _gasneti_atomic_cons(add) #define gasneti_atomic_subtract _gasneti_atomic_cons(subtract) #endif #endif /* ------------------------------------------------------------------------------------ */ /* GASNet "non-atomics" - these implement the same operations as the interfaces without * "non" in the names, only in a non-threadsafe manner. * * On SEQ build the weak atomics will reduce to this implementation, but it is made * available unconditionally to allow use by conduits under appropriate circumstances. * * Do not need any exclusion mechanism, but we still want to include any fences that * the caller has requested, since any memory in the gasnet segment "protected" by a * fenced atomic may be written by a network adapter. */ #define _GASNETI_NONATOMIC_DEFN(_type,_sz) \ typedef volatile uint##_sz##_t gasneti_##_type##_t; \ typedef uint##_sz##_t gasneti_##_type##_val_t; \ typedef int##_sz##_t gasneti_##_type##_sval_t; /* Fencing macros for nonatomics * _gasneti_nonatomic_prologue_{set,read,rmw}(p, flags) * _gasneti_nonatomic_fence_{before,after}_{set,read,rmw}(p, flags) * _gasneti_nonatomic_fence_after_bool(p, flags, value) * * These are defined defined unconditionally because presently there are no * fencing side-effects for the non-atomic code, and thus no reason to override. */ #if GASNETI_THREADS || defined(GASNETI_FORCE_TRUE_WEAKATOMICS) /* Always apply the fences */ #define _gasneti_weak_fence_check(f) 0 #else /* Apply fences unless "GASNETI_ATOMIC_WEAK_FENCE" is present */ #define _gasneti_weak_fence_check(f) (f & GASNETI_ATOMIC_WEAK_FENCE) #endif #define _gasneti_nonatomic_fence_before(p,f) \ if (!_gasneti_weak_fence_check(f)) { _gasneti_atomic_fence_before(f); } #define _gasneti_nonatomic_fence_after(p,f) \ if (!_gasneti_weak_fence_check(f)) { _gasneti_atomic_fence_after(f); } #define _gasneti_nonatomic_fence_after_bool(p,f,v) \ if (!_gasneti_weak_fence_check(f)) { _gasneti_atomic_fence_after(f) \ _gasneti_atomic_fence_bool(f,v) } #define _gasneti_nonatomic_prologue_set(p,f) /*empty*/ #define _gasneti_nonatomic_fence_before_set _gasneti_nonatomic_fence_before #define _gasneti_nonatomic_fence_after_set _gasneti_nonatomic_fence_after #define _gasneti_nonatomic_prologue_read(p,f) /*empty*/ #define _gasneti_nonatomic_fence_before_read _gasneti_nonatomic_fence_before #define _gasneti_nonatomic_fence_after_read _gasneti_nonatomic_fence_after #define _gasneti_nonatomic_prologue_rmw(p,f) /*empty*/ #define _gasneti_nonatomic_fence_before_rmw _gasneti_nonatomic_fence_before #define _gasneti_nonatomic_fence_after_rmw _gasneti_nonatomic_fence_after /* Build gasneti_nonatomic_t to match width of "normal" atomic (unless custom) */ #if defined(GASNETI_USE_64BIT_ATOMICS) _GASNETI_NONATOMIC_DEFN(nonatomic,64) #define GASNETI_NONATOMIC_MAX ((gasneti_nonatomic_val_t)0xFFFFFFFFFFFFFFFFLLU) #define GASNETI_NONATOMIC_SIGNED_MIN ((gasneti_nonatomic_sval_t)0x8000000000000000LL) #define GASNETI_NONATOMIC_SIGNED_MAX ((gasneti_nonatomic_sval_t)0x7FFFFFFFFFFFFFFFLL) #else _GASNETI_NONATOMIC_DEFN(nonatomic,32) #define GASNETI_NONATOMIC_MAX ((gasneti_nonatomic_val_t)0xFFFFFFFFU) #define GASNETI_NONATOMIC_SIGNED_MIN ((gasneti_nonatomic_sval_t)0x80000000) #define GASNETI_NONATOMIC_SIGNED_MAX ((gasneti_nonatomic_sval_t)0x7FFFFFFF) #endif #ifndef gasneti_nonatomic_align #define gasneti_nonatomic_align gasneti_atomic_align #endif #ifndef gasneti_nonatomic32_align #define gasneti_nonatomic32_align gasneti_atomic32_align #endif #ifndef gasneti_nonatomic64_align #define gasneti_nonatomic64_align gasneti_atomic64_align #endif #define gasneti_nonatomic_init _gasneti_scalar_atomic_init #define gasneti_nonatomic_signed(v) ((gasneti_nonatomic_sval_t)(val)) #define gasneti_nonatomic_set(p,v,f) GASNETI_ATOMIC_FENCED_SET(nonatomic,_gasneti_scalar_atomic_set,gasneti_nonatomic_,p,v,f) #define gasneti_nonatomic_increment(p,f) GASNETI_ATOMIC_FENCED_INCDEC(nonatomic,_gasneti_scalar_atomic_increment,gasneti_nonatomic_,p,f) #define gasneti_nonatomic_decrement(p,f) GASNETI_ATOMIC_FENCED_INCDEC(nonatomic,_gasneti_scalar_atomic_decrement,gasneti_nonatomic_,p,f) GASNETI_ATOMIC_FENCED_READ_DEFN(nonatomic,gasneti_nonatomic_read,_gasneti_scalar_atomic_read,gasneti_nonatomic_) GASNETI_ATOMIC_FENCED_DECTEST_DEFN(nonatomic,gasneti_nonatomic_decrement_and_test,_gasneti_scalar_atomic_decrement_and_test,gasneti_nonatomic_) GASNETI_ATOMIC_FENCED_CAS_DEFN(nonatomic,gasneti_nonatomic_compare_and_swap,_gasneti_scalar_atomic_compare_and_swap,gasneti_nonatomic_) GASNETI_SCALAR_ATOMIC_SWAP_DEFN(_gasneti_scalar_atomic_swap, gasneti_nonatomic_) GASNETI_ATOMIC_FENCED_SWAP_DEFN(nonatomic,gasneti_nonatomic_swap,_gasneti_scalar_atomic_swap,gasneti_nonatomic_) GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(nonatomic,gasneti_nonatomic_add,_gasneti_scalar_atomic_add,gasneti_nonatomic_) GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(nonatomic,gasneti_nonatomic_subtract,_gasneti_scalar_atomic_subtract,gasneti_nonatomic_) #define GASNETI_HAVE_NONATOMIC_CAS 1 #define GASNETI_HAVE_NONATOMIC_ADD_SUB 1 /* Build gasneti_nonatomic32_t */ _GASNETI_NONATOMIC_DEFN(nonatomic32,32) #define gasneti_nonatomic32_init _gasneti_scalar_atomic_init #define gasneti_nonatomic32_set(p,v,f) GASNETI_ATOMIC_FENCED_SET(nonatomic,_gasneti_scalar_atomic_set,gasneti_nonatomic32_,p,v,f) #define gasneti_nonatomic32_increment(p,f) GASNETI_ATOMIC_FENCED_INCDEC(nonatomic,_gasneti_scalar_atomic_increment,gasneti_nonatomic32_,p,f) #define gasneti_nonatomic32_decrement(p,f) GASNETI_ATOMIC_FENCED_INCDEC(nonatomic,_gasneti_scalar_atomic_decrement,gasneti_nonatomic32_,p,f) GASNETI_ATOMIC_FENCED_READ_DEFN(nonatomic,gasneti_nonatomic32_read,_gasneti_scalar_atomic_read,gasneti_nonatomic32_) GASNETI_ATOMIC_FENCED_DECTEST_DEFN(nonatomic,gasneti_nonatomic32_decrement_and_test,_gasneti_scalar_atomic_decrement_and_test,gasneti_nonatomic32_) GASNETI_ATOMIC_FENCED_CAS_DEFN(nonatomic,gasneti_nonatomic32_compare_and_swap,_gasneti_scalar_atomic_compare_and_swap,gasneti_nonatomic32_) GASNETI_SCALAR_ATOMIC_SWAP_DEFN(_gasneti_scalar_atomic32_swap, gasneti_nonatomic32_) GASNETI_ATOMIC_FENCED_SWAP_DEFN(nonatomic,gasneti_nonatomic32_swap,_gasneti_scalar_atomic32_swap,gasneti_nonatomic32_) GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(nonatomic,gasneti_nonatomic32_add,_gasneti_scalar_atomic_add,gasneti_nonatomic32_) GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(nonatomic,gasneti_nonatomic32_subtract,_gasneti_scalar_atomic_subtract,gasneti_nonatomic32_) /* Build gasneti_nonatomic64_t */ _GASNETI_NONATOMIC_DEFN(nonatomic64,64) #define gasneti_nonatomic64_init _gasneti_scalar_atomic_init #define gasneti_nonatomic64_set(p,v,f) GASNETI_ATOMIC_FENCED_SET(nonatomic,_gasneti_scalar_atomic_set,gasneti_nonatomic64_,p,v,f) #define gasneti_nonatomic64_increment(p,f) GASNETI_ATOMIC_FENCED_INCDEC(nonatomic,_gasneti_scalar_atomic_increment,gasneti_nonatomic64_,p,f) #define gasneti_nonatomic64_decrement(p,f) GASNETI_ATOMIC_FENCED_INCDEC(nonatomic,_gasneti_scalar_atomic_decrement,gasneti_nonatomic64_,p,f) GASNETI_ATOMIC_FENCED_READ_DEFN(nonatomic,gasneti_nonatomic64_read,_gasneti_scalar_atomic_read,gasneti_nonatomic64_) GASNETI_ATOMIC_FENCED_DECTEST_DEFN(nonatomic,gasneti_nonatomic64_decrement_and_test,_gasneti_scalar_atomic_decrement_and_test,gasneti_nonatomic64_) GASNETI_ATOMIC_FENCED_CAS_DEFN(nonatomic,gasneti_nonatomic64_compare_and_swap,_gasneti_scalar_atomic_compare_and_swap,gasneti_nonatomic64_) GASNETI_SCALAR_ATOMIC_SWAP_DEFN(_gasneti_scalar_atomic64_swap, gasneti_nonatomic64_) GASNETI_ATOMIC_FENCED_SWAP_DEFN(nonatomic,gasneti_nonatomic64_swap,_gasneti_scalar_atomic64_swap,gasneti_nonatomic64_) GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(nonatomic,gasneti_nonatomic64_add,_gasneti_scalar_atomic_add,gasneti_nonatomic64_) GASNETI_ATOMIC_FENCED_ADDSUB_DEFN(nonatomic,gasneti_nonatomic64_subtract,_gasneti_scalar_atomic_subtract,gasneti_nonatomic64_) /* ------------------------------------------------------------------------------------ */ /* GASNet weak atomics - these operations are guaranteed to be atomic if and only if the sole updates are from the host processor(s), with no signals involved. if !GASNETI_THREADS, they compile away to the non-atomic implementation thereby saving the overhead of unnecessary atomic-memory CPU instructions. Otherwise, they expand to regular gasneti_atomic_t's */ #if GASNETI_THREADS || defined(GASNETI_FORCE_TRUE_WEAKATOMICS) #define _GASNETI_WEAKATOMIC_ID(_id) _CONCAT(GASNETI_ATOMIC,_id) #define _gasneti_weakatomic_id(_id) _CONCAT(gasneti_atomic,_id) #ifdef GASNETI_HAVE_ATOMIC_CAS #define GASNETI_HAVE_WEAKATOMIC_CAS 1 #endif #ifdef GASNETI_HAVE_ATOMIC_ADD_SUB #define GASNETI_HAVE_WEAKATOMIC_ADD_SUB 1 #endif #else #define _GASNETI_WEAKATOMIC_ID(_id) _CONCAT(GASNETI_NONATOMIC,_id) #define _gasneti_weakatomic_id(_id) _CONCAT(gasneti_nonatomic,_id) #define GASNETI_HAVE_WEAKATOMIC_CAS 1 #define GASNETI_HAVE_WEAKATOMIC_ADD_SUB 1 #endif typedef _gasneti_weakatomic_id(_t) gasneti_weakatomic_t; typedef _gasneti_weakatomic_id(_val_t) gasneti_weakatomic_val_t; typedef _gasneti_weakatomic_id(_sval_t) gasneti_weakatomic_sval_t; #define gasneti_weakatomic_init _gasneti_weakatomic_id(_init) #define gasneti_weakatomic_signed _gasneti_weakatomic_id(_signed) #define gasneti_weakatomic_set _gasneti_weakatomic_id(_set) #define gasneti_weakatomic_read _gasneti_weakatomic_id(_read) #define gasneti_weakatomic_increment _gasneti_weakatomic_id(_increment) #define gasneti_weakatomic_decrement _gasneti_weakatomic_id(_decrement) #define gasneti_weakatomic_decrement_and_test _gasneti_weakatomic_id(_decrement_and_test) #ifdef GASNETI_HAVE_WEAKATOMIC_CAS #define gasneti_weakatomic_compare_and_swap _gasneti_weakatomic_id(_compare_and_swap) #define gasneti_weakatomic_swap _gasneti_weakatomic_id(_swap) #endif #ifdef GASNETI_HAVE_WEAKATOMIC_ADD_SUB #define gasneti_weakatomic_add _gasneti_weakatomic_id(_add) #define gasneti_weakatomic_subtract _gasneti_weakatomic_id(_subtract) #endif typedef _gasneti_weakatomic_id(32_t) gasneti_weakatomic32_t; #define gasneti_weakatomic32_init _gasneti_weakatomic_id(32_init) #define gasneti_weakatomic32_set _gasneti_weakatomic_id(32_set) #define gasneti_weakatomic32_read _gasneti_weakatomic_id(32_read) #define gasneti_weakatomic32_increment _gasneti_weakatomic_id(32_increment) #define gasneti_weakatomic32_decrement _gasneti_weakatomic_id(32_decrement) #define gasneti_weakatomic32_decrement_and_test _gasneti_weakatomic_id(32_decrement_and_test) #define gasneti_weakatomic32_compare_and_swap _gasneti_weakatomic_id(32_compare_and_swap) #define gasneti_weakatomic32_swap _gasneti_weakatomic_id(32_swap) #define gasneti_weakatomic32_add _gasneti_weakatomic_id(32_add) #define gasneti_weakatomic32_subtract _gasneti_weakatomic_id(32_subtract) typedef _gasneti_weakatomic_id(64_t) gasneti_weakatomic64_t; #define gasneti_weakatomic64_init _gasneti_weakatomic_id(64_init) #define gasneti_weakatomic64_set _gasneti_weakatomic_id(64_set) #define gasneti_weakatomic64_read _gasneti_weakatomic_id(64_read) #define gasneti_weakatomic64_increment _gasneti_weakatomic_id(64_increment) #define gasneti_weakatomic64_decrement _gasneti_weakatomic_id(64_decrement) #define gasneti_weakatomic64_decrement_and_test _gasneti_weakatomic_id(64_decrement_and_test) #define gasneti_weakatomic64_compare_and_swap _gasneti_weakatomic_id(64_compare_and_swap) #define gasneti_weakatomic64_swap _gasneti_weakatomic_id(64_swap) #define gasneti_weakatomic64_add _gasneti_weakatomic_id(64_add) #define gasneti_weakatomic64_subtract _gasneti_weakatomic_id(64_subtract) /* ------------------------------------------------------------------------------------ */ /* Configuration strings */ #if defined(GASNETI_FORCE_GENERIC_ATOMICOPS) #define GASNETI_ATOMIC_CONFIG atomics_forced_mutex #elif defined(GASNETI_FORCE_OS_ATOMICOPS) #define GASNETI_ATOMIC_CONFIG atomics_forced_os #elif defined(GASNETI_FORCE_COMPILER_ATOMICOPS) #define GASNETI_ATOMIC_CONFIG atomics_forced_compiler #elif (GASNETI_ATOMIC_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_GENERIC) #define GASNETI_ATOMIC_CONFIG atomics_mutex #elif (GASNETI_ATOMIC_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_COMPILER) #define GASNETI_ATOMIC_CONFIG atomics_compiler #elif (GASNETI_ATOMIC_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_OS) #define GASNETI_ATOMIC_CONFIG atomics_os #else #define GASNETI_ATOMIC_CONFIG atomics_native #endif #if defined(GASNETI_FORCE_GENERIC_ATOMICOPS) #define GASNETI_ATOMIC32_CONFIG atomic32_forced_mutex #elif defined(GASNETI_FORCE_OS_ATOMICOPS) #define GASNETI_ATOMIC32_CONFIG atomic32_forced_os #elif defined(GASNETI_FORCE_COMPILER_ATOMICOPS) #define GASNETI_ATOMIC32_CONFIG atomic32_forced_compiler #elif (GASNETI_ATOMIC32_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_GENERIC) #define GASNETI_ATOMIC32_CONFIG atomic32_mutex #elif (GASNETI_ATOMIC32_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_COMPILER) #define GASNETI_ATOMIC32_CONFIG atomic32_compiler #elif (GASNETI_ATOMIC32_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_OS) #define GASNETI_ATOMIC32_CONFIG atomic32_os #else #define GASNETI_ATOMIC32_CONFIG atomic32_native #endif #if defined(GASNETI_FORCE_GENERIC_ATOMICOPS) #define GASNETI_ATOMIC64_CONFIG atomic64_forced_mutex #elif defined(GASNETI_FORCE_OS_ATOMICOPS) #define GASNETI_ATOMIC64_CONFIG atomic64_forced_os #elif defined(GASNETI_FORCE_COMPILER_ATOMICOPS) && PLATFORM_ARCH_64 #define GASNETI_ATOMIC64_CONFIG atomic64_forced_compiler #elif (GASNETI_ATOMIC64_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_GENERIC) #define GASNETI_ATOMIC64_CONFIG atomic64_mutex #elif (GASNETI_ATOMIC64_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_COMPILER) #define GASNETI_ATOMIC64_CONFIG atomic64_compiler #elif (GASNETI_ATOMIC64_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_HYBRID) #define GASNETI_ATOMIC64_CONFIG atomic64_hybrid #elif (GASNETI_ATOMIC64_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_OS) #define GASNETI_ATOMIC64_CONFIG atomic64_os #else #define GASNETI_ATOMIC64_CONFIG atomic64_native #endif /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/license.txt0000664000175000017500000001360615142313673015613 0ustar alastairalastair***************************** *** GASNet-EX license.txt *** ***************************** All files in this directory and all sub-directories (except where otherwise noted) are subject to the following copyright and licensing terms. Please see the license.txt file, if any, within each subdirectory for additional licensing terms governing those contributed components. *** Copyright Notice *** Global-Address Space Networking for Exascale (GASNet-EX) Copyright (c) 2000-2025, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at: IPO@lbl.gov. NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit other to do so. *** License Agreement *** Global-Address Space Networking for Exascale (GASNet-EX) Copyright (c) 2000-2025, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory, U.S. Dept. of Energy, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to Lawrence Berkeley National Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such enhancements or derivative works thereof, in binary and source code form. *** Contributions *** For more information about GASNet-EX, visit our home page at: https://gasnet.lbl.gov/ or send email to: Source code contributions (fixes, patches, extensions etc.) should be sent to to be reviewed for acceptance into the primary distribution. Contributions are most likely to be accepted if they are provided as public domain, or under a BSD-style license such as the one above. *** Acknowledgements *** The primary authors/maintainers of GASNet-EX: * Dan Bonachea - https://go.lbl.gov/dan.bonachea - ORCID: 0000-0002-0724-9349 * Paul H. Hargrove - https://go.lbl.gov/paul-hargrove - ORCID: 0000-0001-6691-5287 Contributors to GASNet-EX include: * Boris I. Karasev * Artem Y. Polyakov * Sean Treichler * Ralph Castain * Elliot Ronaghan * Farzad Fatollahi-Fard The authors/contributors of GASNet-1 (upon which GASNet-EX is based) include: * Dan Bonachea : - General infrastructure & documentation - smp-conduit, udp-conduit, mpi-conduit, elan-conduit - extended-ref, template-conduit, VIS * Paul H. Hargrove : - vapi-conduit, ibv-conduit, pami-conduit, aries-conduit - atomics, collectives * Christian Bell: gm-conduit, shmem-conduit * Mike Welcome: lapi-conduit, portals-conduit * Rajesh Nishtala: collectives, dcmf-conduit * Parry Husbands: lapi-conduit * Filip Blagojevic: shared-memory support * Yili Zheng: team collectives, DCMF native collectives * Larry Stewart : aries-conduit (formerly gemini-conduit) * Yevgeny Kliteynik : FCA and mxm-conduit * Valentin Petrov : FCA and mxm-conduit * Brian Barrett: portals4-conduit * Eric Hoffman: gemini/aries conduit * Andrew Friedley : psm-conduit * Matias Cabral : psm-conduit * Miao Luo: ofi-conduit * Erik Paulson : ofi-conduit * Sayantan Sur : ofi-conduit gasnet-2025.8.0/gasnet_toolhelp.h0000664000175000017500000017222315142313673016771 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_toolhelp.h $ * Description: misc declarations needed by both gasnet_tools and libgasnet * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #if !defined(_IN_GASNETEX_H) && !defined(_IN_GASNET_TOOLS_H) #error This file is not meant to be included directly- clients should include gasnetex.h or gasnet_tools.h #endif #ifndef _GASNET_TOOLHELP_H #define _GASNET_TOOLHELP_H #include #include #include #include #include #if GASNETI_THREADS #if PLATFORM_OS_LINUX || PLATFORM_OS_UCLINUX struct timespec; /* avoid an annoying warning on Linux */ #endif #include #endif #include #ifndef PATH_MAX #define PATH_MAX 1024 #endif #ifndef STDIN_FILENO #define STDIN_FILENO 0 #endif #ifndef STDOUT_FILENO #define STDOUT_FILENO 1 #endif #ifndef STDERR_FILENO #define STDERR_FILENO 2 #endif #if defined(HAVE_SCHED_YIELD) #include #define _gasneti_sched_yield() sched_yield() #else #define _gasneti_sched_yield() (sleep(0),0) #endif #define gasneti_sched_yield() gasneti_assert_zeroret(_gasneti_sched_yield()) extern void gasneti_filesystem_sync(void); #if PLATFORM_COMPILER_GNU_CXX /* bug 1681 */ #define GASNETI_CURRENT_FUNCTION __PRETTY_FUNCTION__ #elif (defined(HAVE_FUNC) && GASNETI_COMPILER_IS_CC) || __STDC_VERSION__ >= 199901 || __cplusplus >= 201103L /* __func__ should also work for ISO C99 or C++11 compilers */ #define GASNETI_CURRENT_FUNCTION __func__ #elif PLATFORM_COMPILER_GNU /* fallback on gcc, last resort because it generates warnings w/-pedantic */ #define GASNETI_CURRENT_FUNCTION __FUNCTION__ #else #define GASNETI_CURRENT_FUNCTION "" #endif GASNETI_COLD extern char *gasneti_build_loc_str(const char *_funcname, const char *_filename, int _linenum); // NOTE: this returns a malloced buffer! #define gasneti_current_loc gasneti_build_loc_str(GASNETI_CURRENT_FUNCTION,__FILE__,__LINE__) GASNETI_COLD GASNETI_FORMAT_PRINTF(_gasneti_assert_fail,4,5, extern void _gasneti_assert_fail(const char *_funcname, const char *_filename, int _linenum, const char *_fmt, ...) GASNETI_NORETURN); GASNETI_NORETURNP(_gasneti_assert_fail) /* gasneti_assert_always(expr): * an assertion that never compiles away - for sanity checks in non-critical paths * gasneti_assert_reason_always(expr, reason): * same, but with a string reason to explain the failure (defaults to preprocessed expression) */ #define gasneti_assert_reason_always(expr, reason) \ (GASNETT_PREDICT_TRUE(expr) ? (void)0 : \ _gasneti_assert_fail(GASNETI_CURRENT_FUNCTION,__FILE__,__LINE__,"%s",reason)) #define gasneti_assert_always(expr) gasneti_assert_reason_always(expr,#expr) /* gasneti_assert(expr): * an assertion that compiles away in non-debug mode - for sanity checks in critical paths * gasneti_assert_reason(expr, reason): * same, but with a string reason to explain the failure (defaults to preprocessed expression) */ #if GASNET_NDEBUG #define gasneti_assert(expr) ((void)0) #define gasneti_assert_reason(expr,reason) ((void)0) #else #define gasneti_assert(expr) gasneti_assert_always(expr) #define gasneti_assert_reason(expr,reason) gasneti_assert_reason_always(expr,reason) #endif // gasneti_assert(_always)_{(u)int,ptr,dbl}(op1, operator, op2); // A statement that is mostly equivalent to gasneti_assert(_always)(op1 operator op2); // but assumes op1/op2 have (unsigned)integer/pointer/floating type and outputs operand values on failure. // E.g.: gasneti_assert_int(idx, >=, 4); // C++ NOTE: gasneti_assert_ptr() operates on raw pointer values, and does not perform // C++'s normal implicit pointer conversions for comparisons on pointers to polymorphic object types. #define gasneti_assert_always_int(op1, operator, op2) do { \ int64_t const _gaa_op1 = (op1); \ int64_t const _gaa_op2 = (op2); \ if (!GASNETT_PREDICT_TRUE(_gaa_op1 operator _gaa_op2)) { \ int const _gaa_bigval = ((int32_t)_gaa_op1 != _gaa_op1) || \ ((int32_t)_gaa_op2 != _gaa_op2); \ int const _gaa_negval = (_gaa_op1 < 0) || (_gaa_op2 < 0); \ int const _gaa_decwid = (_gaa_bigval ? 20 : 11); \ int const _gaa_hexwid = (_gaa_bigval || _gaa_negval ? 16 : 8);\ _gasneti_assert_fail(GASNETI_CURRENT_FUNCTION,__FILE__,__LINE__,\ "%s %s %s\n" \ " op1 : %*" PRId64 " (0x%0*" PRIx64 ") == %s\n" \ " op2 : %*" PRId64 " (0x%0*" PRIx64 ") == %s\n" \ , #op1, #operator, #op2 \ , _gaa_decwid, _gaa_op1, _gaa_hexwid, _gaa_op1, #op1 \ , _gaa_decwid, _gaa_op2, _gaa_hexwid, _gaa_op2, #op2 \ ); \ } \ } while (0) #define gasneti_assert_always_uint(op1, operator, op2) do { \ uint64_t const _gaa_op1 = (op1); \ uint64_t const _gaa_op2 = (op2); \ if (!GASNETT_PREDICT_TRUE(_gaa_op1 operator _gaa_op2)) { \ int const _gaa_bigval = ((uint32_t)_gaa_op1 != _gaa_op1) || \ ((uint32_t)_gaa_op2 != _gaa_op2); \ int const _gaa_decwid = (_gaa_bigval ? 20 : 11); \ int const _gaa_hexwid = (_gaa_bigval ? 16 : 8); \ _gasneti_assert_fail(GASNETI_CURRENT_FUNCTION,__FILE__,__LINE__,\ "%s %s %s\n" \ " op1 : %*" PRIu64 " (0x%0*" PRIx64 ") == %s\n" \ " op2 : %*" PRIu64 " (0x%0*" PRIx64 ") == %s\n" \ , #op1, #operator, #op2 \ , _gaa_decwid, _gaa_op1, _gaa_hexwid, _gaa_op1, #op1 \ , _gaa_decwid, _gaa_op2, _gaa_hexwid, _gaa_op2, #op2 \ ); \ } \ } while (0) #ifdef __cplusplus #define _gasneti_voidp_cvt(p) (reinterpret_cast(p)) #else #define _gasneti_voidp_cvt(p) (p) // rely on default conversion #endif #define gasneti_assert_always_ptr(op1, operator, op2) do { \ const void * const _gaa_op1 = _gasneti_voidp_cvt(op1); \ const void * const _gaa_op2 = _gasneti_voidp_cvt(op2); \ if (!GASNETT_PREDICT_TRUE(_gaa_op1 operator _gaa_op2)) { \ int const _gaa_hexwid = 2*sizeof(void *); \ _gasneti_assert_fail(GASNETI_CURRENT_FUNCTION,__FILE__,__LINE__,\ "%s %s %s\n" \ " op1 : 0x%0*" PRIxPTR " == %s\n" \ " op2 : 0x%0*" PRIxPTR " == %s\n" \ , #op1, #operator, #op2 \ , _gaa_hexwid, (uintptr_t)_gaa_op1, #op1 \ , _gaa_hexwid, (uintptr_t)_gaa_op2, #op2 \ ); \ } \ } while (0) #define gasneti_assert_always_dbl(op1, operator, op2) do { \ double const _gaa_op1 = (op1); \ double const _gaa_op2 = (op2); \ if (!GASNETT_PREDICT_TRUE(_gaa_op1 operator _gaa_op2)) { \ _gasneti_assert_fail(GASNETI_CURRENT_FUNCTION,__FILE__,__LINE__,\ "%s %s %s\n" \ " op1 : %#13.6g (0x%016" PRIx64 ") == %s\n" \ " op2 : %#13.6g (0x%016" PRIx64 ") == %s\n" \ , #op1, #operator, #op2 \ , _gaa_op1, *(uint64_t*)&_gaa_op1, #op1 \ , _gaa_op2, *(uint64_t*)&_gaa_op2, #op2 \ ); \ } \ } while (0) #if GASNET_NDEBUG #define gasneti_assert_int(op1, operator, op2) do{}while(0) #define gasneti_assert_uint(op1, operator, op2) do{}while(0) #define gasneti_assert_ptr(op1, operator, op2) do{}while(0) #define gasneti_assert_dbl(op1, operator, op2) do{}while(0) #else #define gasneti_assert_int gasneti_assert_always_int #define gasneti_assert_uint gasneti_assert_always_uint #define gasneti_assert_ptr gasneti_assert_always_ptr #define gasneti_assert_dbl gasneti_assert_always_dbl #endif // gasneti_static_assert(cond) // statically assert `cond`, which must be a compile-time integer constant expression // Invocation is an expression must appear in expression or statement context. // The assertion is active for both DEBUG/NDEBUG and upon success compiles away to nothing. // Upon failure, causes a compile-time error at the invocation line. #if __cplusplus >= 201103L // C++11 gives us mostly what we want // wrapper makes it usable in expression context #define gasneti_static_assert(cond) \ ((void)([](){ static_assert(cond, "gasneti_static_assert(" #cond ")"); })) #elif __cplusplus // C++98 lacks static assert and forbids type declarations in casts // use a negative array size #define gasneti_static_assert(cond) \ ((void)(void (*)(int _gasneti_static_assert[(cond)?1:-1]))0) #else // C // use a bit field width, which enforces both integer constant expression and rejects negatives #define gasneti_static_assert(cond) \ ((void)(struct{int _gasneti_static_assert:((cond)?8:-1);}*)0) #endif /* gasneti_unreachable(): annotation to mark the current code location as unreachable, to assist optimization * deliberately compiles away in NDEBUG to hopefully avoid inserting dead instructions */ #if GASNETT_USE_BUILTIN_UNREACHABLE #define gasneti_builtin_unreachable() __builtin_unreachable() #else #define gasneti_builtin_unreachable() ((void)0) #endif #define gasneti_unreachable() (gasneti_builtin_unreachable(),gasneti_assert(!"gasneti_unreachable")) // gasneti_unreachable_error((fmt, args...)) // a version of gasneti_unreachable that in DEBUG mode (only) executes gasneti_fatalerror(fmt, ...args) // otherwise expands to gasneti_unreachable() (and args are not evaluated) #if GASNET_DEBUG #define gasneti_unreachable_error(args) gasneti_fatalerror args #else #define gasneti_unreachable_error(args) gasneti_unreachable() #endif /* gasneti_assume(cond): assert a simple condition is always true, as a directive to help compiler analysis * Becomes an assertion in DEBUG mode and an analysis directive (when available) in NDEBUG mode. * This notably differs from gasneti_assert() in that the expression must remain valid in NDEBUG mode * (because it is not preprocessed away), and furthermore may or may not be evaluated at runtime. * To ensure portability and performance, cond should NOT contain any function calls or side-effects. */ #if GASNET_DEBUG #define gasneti_assume(cond) gasneti_assert_always(cond) #elif GASNETT_USE_BUILTIN_ASSUME #if PLATFORM_COMPILER_INTEL // workaround Intel's defective implementation of __builtin_assume #define gasneti_assume(cond) ((void)__builtin_assume((cond) != 0)) #else #define gasneti_assume(cond) ((void)__builtin_assume(cond)) #endif #elif GASNETT_USE_ASSUME #define gasneti_assume(cond) ((void)__assume((cond) != 0)) #else #define gasneti_assume(cond) (GASNETT_PREDICT_TRUE(cond) ? (void)0 : gasneti_unreachable()) #endif /* gasneti_assert_zeroret(), gasneti_assert_nzeroret(): * evaluate an expression (always), and in debug mode additionally * assert that it returns zero or non-zero * useful for making system calls and checking the result */ #if GASNET_DEBUG #define gasneti_assert_zeroret(op) do { \ int _retval = (op); \ if_pf(_retval) { \ /* can't use strdup() or gasneti_strdup() here. */ \ char _tmp[128]; \ strncpy(_tmp, strerror(_retval), sizeof(_tmp)); \ _tmp[sizeof(_tmp)-1] = '\0'; \ _gasneti_assert_fail(GASNETI_CURRENT_FUNCTION,__FILE__,__LINE__,\ "%s yielded %s(%i), errno=%s(%i)", \ #op, _tmp, _retval, strerror(errno), errno); \ } \ } while (0) #define gasneti_assert_nzeroret(op) do { \ int _retval = (op); \ if_pf(!_retval) { \ /* can't use strdup() or gasneti_strdup() here. */ \ char _tmp[128]; \ strncpy(_tmp, strerror(_retval), sizeof(_tmp)); \ _tmp[sizeof(_tmp)-1] = '\0'; \ _gasneti_assert_fail(GASNETI_CURRENT_FUNCTION,__FILE__,__LINE__,\ "%s yielded %s(%i), errno=%s(%i)", \ #op, _tmp, _retval, strerror(errno), errno); \ } \ } while (0) #else #define gasneti_assert_zeroret(op) do { op; } while(0) #define gasneti_assert_nzeroret(op) do { op; } while(0) #endif // gasneti_unused_result(expr): // Evaluates an expression while including whatever is necessary to // prevent the compiler from issuing warnings about discarding the // result, such as due to `__attribute__ ((__warn_unused_result__))`. // Intended for use in exit handing and/or signal context where there // should be no reasonable expectation of handling error returns. // NOT intended to substitute for error handing in "normal" contexts. extern int _gasneti_unused_result; #define gasneti_unused_result(expr) ((void)(_gasneti_unused_result = (int)(uintptr_t)(expr))) /* return physical memory of machine on failure, failureIsFatal nonzero => fatal error, failureIsFatal zero => return 0 */ extern uint64_t gasneti_getPhysMemSz(int _failureIsFatal); extern const char *gasneti_procid_str; // process identifier for error messages // gasneti_console_message(): output a formatted message with a prefix string GASNETI_COLD GASNETI_FORMAT_PRINTF(gasneti_console_message,2,3, extern void gasneti_console_message(const char *_prefix, const char *_msg, ...)); // gasneti_console0_message(): Like gasneti_console_message(), except ONLY proc 0 writes to console, // and the procid is omitted from the message. All procs still write to tracefile (if any). // This should ONLY be used in contexts where proc 0 is guaranteed to call with all relevant info GASNETI_COLD GASNETI_FORMAT_PRINTF(gasneti_console0_message,2,3, extern void gasneti_console0_message(const char *_prefix, const char *_msg, ...)); GASNETI_COLD GASNETI_FORMAT_PRINTF(gasneti_console_messageVA,5,0, extern void gasneti_console_messageVA(const char *_funcname, const char *_filename, int _linenum, int _console_procid, // -1 == wildcard const char *_prefix, const char *_msg, va_list _argptr)); // gasneti_fatalerror(format, ...) - print a fatal error with func/file/line info, then abort GASNETI_COLD GASNETI_FORMAT_PRINTF(_gasneti_fatalerror,1,2, extern void _gasneti_fatalerror(const char *_msg, ...) GASNETI_NORETURN); GASNETI_NORETURNP(_gasneti_fatalerror) extern const char *_gasneti_fatalerror_funcname; extern const char *_gasneti_fatalerror_filename; extern int _gasneti_fatalerror_linenum; #define gasneti_fatalerror ( \ _gasneti_fatalerror_funcname = GASNETI_CURRENT_FUNCTION, \ _gasneti_fatalerror_filename = __FILE__, \ _gasneti_fatalerror_linenum = __LINE__, \ _gasneti_fatalerror) // gasneti_fatalerror_nopos(format, ...) - a variant that omits func/file/line info GASNETI_COLD GASNETI_FORMAT_PRINTF(gasneti_fatalerror_nopos,1,2, extern void gasneti_fatalerror_nopos(const char *_msg, ...) GASNETI_NORETURN); GASNETI_NORETURNP(gasneti_fatalerror_nopos) GASNETI_COLD extern void gasneti_error_abort(void) GASNETI_NORETURN; // perform pre-abort actions then abort GASNETI_NORETURNP(gasneti_error_abort) GASNETI_COLD extern void gasneti_killmyprocess(int _exitcode) GASNETI_NORETURN; GASNETI_NORETURNP(gasneti_killmyprocess) extern void gasneti_freezeForDebuggerErr(void); /* freeze iff user enabled error freezing */ GASNETI_COLD extern void gasneti_freezeForDebuggerNow(volatile int *_flag, const char *_flagsymname); extern volatile int gasnet_frozen; /* export to simplify debugger restart */ extern void gasneti_qualify_path(char *_path_out, const char *_path_in); extern void gasneti_backtrace_init(const char *_exename); extern int (*gasneti_print_backtrace_ifenabled)(int _fd); extern int gasneti_print_backtrace(int _fd); extern void gasneti_ondemand_init(void); extern int gasneti_check_node_list(const char *_listvar); GASNETI_COLD extern void gasneti_flush_streams(void); /* flush all open streams */ GASNETI_COLD extern void gasneti_close_streams(void); /* close standard streams (for shutdown) */ extern int gasneti_cpu_count(void); extern int gasneti_set_affinity(int _rank); #if HAVE_PLPA || PLATFORM_OS_SOLARIS #define GASNETT_SET_AFFINITY_SUPPORT 1 #endif const char *gasneti_gethostname(void); /* returns the current host name - dies with an error on failure */ extern void gasneti_argv_from_system(int **pargc, char ****pargv); extern const char *gasneti_exe_name(void); extern int gasneti_isLittleEndian(void); typedef void (*gasneti_sighandlerfn_t)(int); gasneti_sighandlerfn_t gasneti_reghandler(int _sigtocatch, gasneti_sighandlerfn_t _fp); void gasneti_registerSignalHandlers(gasneti_sighandlerfn_t _handler); const char *gasnett_signame_fromval(int _sigval); // register a function to be called at libc exit time // passing NULL disables the exit handler extern void gasneti_registerExitHandler(void (*_exitfn)(int)); GASNETI_COLD extern int gasneti_raise(int _sig); // portability wrapper around POSIX raise(3) extern int gasneti_blocksig(int _sig); extern int gasneti_unblocksig(int _sig); /* return a fast but simple/insecure 64-bit checksum of arbitrary data */ extern uint64_t gasneti_checksum(const void *_p, int _numbytes); extern int gasneti_nsleep(uint64_t _ns_delay); GASNETI_INLINE(gasneti_strnlen) size_t gasneti_strnlen(const char *_s, size_t _maxlen) { size_t _len = 0; while ((_len < _maxlen) && _s[_len]) ++_len; return _len; } extern size_t gasneti_utoa(uint64_t _val, char *_buffer, size_t _buflen, unsigned int _base); /* ------------------------------------------------------------------------------------ */ /* Count zero bytes in a region w/ or w/o a memcpy(), or in a "register" */ extern size_t gasneti_count0s_copy(void * GASNETI_RESTRICT _dst, const void * GASNETI_RESTRICT _src, size_t _len); extern size_t gasneti_count0s(const void * _src, size_t _len); GASNETI_INLINE(gasneti_count0s_uint32_t) GASNETI_CONST int gasneti_count0s_uint32_t(uint32_t _x) { #if 0 _x |= (_x >> 4); _x |= (_x >> 2); _x |= (_x >> 1); _x &= 0x01010101UL; _x += (_x >> 16); _x += (_x >> 8); return sizeof(_x) - (_x & 0xf); #else const uint32_t _mask = 0x7f7f7f7fUL; uint32_t _tmp; _tmp = _x & _mask; _tmp += _mask; _tmp |= _x; _tmp &= ~_mask; _tmp >>= 7; _tmp += (_tmp >> 16); _tmp += (_tmp >> 8); return sizeof(_x) - (_tmp & 0xf); #endif } #if PLATFORM_ARCH_32 GASNETI_INLINE(gasneti_count0s_uint64_t) GASNETI_CONST int gasneti_count0s_uint64_t(uint64_t _x) { return gasneti_count0s_uint32_t(GASNETI_LOWORD(_x)) + gasneti_count0s_uint32_t(GASNETI_HIWORD(_x)); } #define gasneti_count0s_uintptr_t(x) gasneti_count0s_uint32_t(x) #elif PLATFORM_ARCH_64 GASNETI_INLINE(gasneti_count0s_uint64_t) GASNETI_CONST int gasneti_count0s_uint64_t(uint64_t _x) { #if 0 _x |= (_x >> 4); _x |= (_x >> 2); _x |= (_x >> 1); _x &= 0x0101010101010101ULL; _x += (_x >> 32); _x += (_x >> 16); _x += (_x >> 8); return sizeof(_x) - (_x & 0xf); #else const uint64_t _mask = 0x7f7f7f7f7f7f7f7fULL; uint64_t _tmp; _tmp = _x & _mask; _tmp += _mask; _tmp |= _x; _tmp &= ~_mask; _tmp >>= 7; _tmp += (_tmp >> 32); _tmp += (_tmp >> 16); _tmp += (_tmp >> 8); return sizeof(_x) - (_tmp & 0xf); #endif } #define gasneti_count0s_uintptr_t(x) gasneti_count0s_uint64_t(x) #else #error "Unknown word size" #endif /* ------------------------------------------------------------------------------------ */ /* Error checking system mutexes - wrapper around pthread mutexes that provides extra support for error checking when GASNET_DEBUG is defined See README-tools for important usage information. -DGASNETI_USE_TRUE_MUTEXES=1 will force gasneti_mutex_t to always use true locking (even under GASNET_SEQ or GASNET_PARSYNC config) */ #if GASNET_PAR || GASNETI_CONDUIT_THREADS || GASNETT_THREAD_SAFE /* need to use true locking if we have concurrent calls from multiple client threads or if conduit has private threads that can run handlers */ #define GASNETI_USE_TRUE_MUTEXES 1 #elif defined(GASNETT_USE_TRUE_MUTEXES) #undef GASNETI_USE_TRUE_MUTEXES #define GASNETI_USE_TRUE_MUTEXES GASNETT_USE_TRUE_MUTEXES #elif !defined(GASNETI_USE_TRUE_MUTEXES) #define GASNETI_USE_TRUE_MUTEXES 0 #endif #if PLATFORM_OS_CYGWIN || defined(GASNETI_FORCE_MUTEX_INITCLEAR) /* we're sometimes unable to call pthread_mutex_destroy when freeing a mutex some pthread implementations will fail to re-init a mutex (eg after a free and realloc of the associated mem) unless the contents are first cleared to zero */ #define GASNETI_MUTEX_INITCLEAR(pm) memset(pm,0,sizeof(*(pm))) #else #define GASNETI_MUTEX_INITCLEAR(pm) ((void)0) #endif #if !defined(GASNETI_BUG2231_WORKAROUND) && \ (PLATFORM_OS_DARWIN && PLATFORM_ARCH_64 && \ PLATFORM_COMPILER_PGI && PLATFORM_COMPILER_VERSION_LT(7,1,4)) #define GASNETI_BUG2231_WORKAROUND 1 #endif #if GASNETI_BUG2231_WORKAROUND #define GASNETI_BUG2231_WORKAROUND_PAD char _bug2231_pad[64]; #else #define GASNETI_BUG2231_WORKAROUND_PAD #endif #if GASNETI_USE_TRUE_MUTEXES && PLATFORM_OS_CYGWIN #include /* bug1847: Until Cygwin 1.7-3, mutexes initialized using PTHREAD_MUTEX_INITIALIZER were unsafe upon first acquire */ #if CYGWIN_VERSION_DLL_MAJOR < 1007 || (CYGWIN_VERSION_DLL_MAJOR == 1007 && CYGWIN_VERSION_DLL_MINOR < 3) #define GASNETI_MUTEX_CAUTIOUS_INIT 1 #endif #endif #if GASNETI_MUTEX_CAUTIOUS_INIT /* implemented using fixed-width atomics to avoid a header dependency cycle */ #define _GASNETI_MUTEX_CAUTIOUS_INIT_FIELD volatile int32_t _initstep; #define _GASNETI_MUTEX_CAUTIOUS_INIT_INITIALIZER , 0 #define _GASNETI_MUTEX_CAUTIOUS_INIT_CHECK(pl) gasneti_mutex_cautious_init(pl) #define _GASNETI_MUTEX_CAUTIOUS_INIT_INIT(pl) ( (pl)->_initstep = 0, \ gasneti_mutex_cautious_init(pl) ) extern void gasneti_mutex_cautious_init(/*gasneti_mutex_t*/void *pl); #else #define _GASNETI_MUTEX_CAUTIOUS_INIT_FIELD #define _GASNETI_MUTEX_CAUTIOUS_INIT_INITIALIZER #define _GASNETI_MUTEX_CAUTIOUS_INIT_CHECK(pl) ((void)0) #define _GASNETI_MUTEX_CAUTIOUS_INIT_INIT(pl) ((void)0) #endif #if GASNET_DEBUG || GASNETI_BUG2231_WORKAROUND || GASNETI_MUTEX_CAUTIOUS_INIT /* Here we deliberately avoid assuming pthread_t is an arithmetic type, * because the POSIX standard allows it to be a struct. * We assume only that the bit pattern below (deliberately chosen to be an * unlikely value for an index or aligned pointer) will not correspond to the * pthread_t identifier of any valid thread. * If this assumption is ever wrong, then the most expedient solution is to * redefine this constant appropriately, otherwise disable the debug checking entirely. */ #ifndef GASNETI_OWNERID_NONE #define _GASNETI_OWNERID_WORD (0x50055005u) #define GASNETI_OWNERID_NONE GASNETI_MAKEWORD(_GASNETI_OWNERID_WORD,_GASNETI_OWNERID_WORD) #endif #define _GASNETI_MUTEXOWNER_INIT { GASNETI_OWNERID_NONE } // boolean ownership queries, only available in debug mode: // _gasneti_mutex_heldbysomeone(pl) and _gasneti_mutex_heldbyme(pl) #define _gasneti_mutex_heldbysomeone(pl) ((pl)->_owner._id64 != GASNETI_OWNERID_NONE) #if GASNETI_USE_TRUE_MUTEXES #include typedef union { volatile uint64_t _id64; volatile pthread_t _id; } _gasneti_mutexowner_t; typedef struct { _gasneti_mutexowner_t _owner; pthread_mutex_t _lock; _GASNETI_MUTEX_CAUTIOUS_INIT_FIELD GASNETI_BUG2231_WORKAROUND_PAD } gasneti_mutex_t; GASNETI_INLINE(_gasneti_mutex_heldbyme) int _gasneti_mutex_heldbyme(gasneti_mutex_t *_pl) { // NOTE: this is written cautiously to ensure we never pass GASNETI_OWNERID_NONE // to pthread_equal() (which has undefined behavior and leads to crashes on at least NetBSD) // EVEN when another thread is concurrently modifying the owner_id field _gasneti_mutexowner_t _owner = _pl->_owner; // take a snapshot of owner return _owner._id64 != GASNETI_OWNERID_NONE && // held by someone pthread_equal(pthread_self(), _owner._id); // it's me! } #else typedef struct { volatile uint64_t _id64; } _gasneti_mutexowner_t; #define _gasneti_ownerid_me_word (0x11111111u) #define _gasneti_ownerid64_me GASNETI_MAKEWORD(_gasneti_ownerid_me_word,_gasneti_ownerid_me_word) #define _gasneti_mutex_heldbyme(pl) ((pl)->_owner._id64 == _gasneti_ownerid64_me) #endif #if GASNETI_USE_TRUE_MUTEXES #if defined(PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP) /* These are faster, though less "featureful" than the default * mutexes on linuxthreads implementations which offer them. */ #define _GASNETI_PTHREAD_MUTEX_INITIALIZER PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP #else #define _GASNETI_PTHREAD_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER #endif #define GASNETI_MUTEX_INITIALIZER { _GASNETI_MUTEXOWNER_INIT, \ _GASNETI_PTHREAD_MUTEX_INITIALIZER \ _GASNETI_MUTEX_CAUTIOUS_INIT_INITIALIZER \ } #define gasneti_mutex_lock(pl) do { \ gasneti_mutex_t * const _pl = (pl); \ _GASNETI_MUTEX_CAUTIOUS_INIT_CHECK(_pl); \ gasneti_assert_reason(!_gasneti_mutex_heldbyme(_pl), \ "Invalid recursive mutex acquire in gasneti_mutex_lock");\ gasneti_assert_zeroret(pthread_mutex_lock(&(_pl->_lock))); /* LOCK */ \ gasneti_assert(!_gasneti_mutex_heldbysomeone(_pl)); /* lock sanity */ \ _pl->_owner._id = pthread_self(); /* record ownership */ \ gasneti_assert(_gasneti_mutex_heldbysomeone(_pl)); /* sanity check NONE val */ \ } while (0) GASNETI_INLINE(gasneti_mutex_trylock) GASNETI_WARN_UNUSED_RESULT int gasneti_mutex_trylock(gasneti_mutex_t *_pl) { int _retval; _GASNETI_MUTEX_CAUTIOUS_INIT_CHECK(_pl); gasneti_assert_reason(!_gasneti_mutex_heldbyme(_pl), "Invalid recursive mutex acquire in gasneti_mutex_trylock"); _retval = pthread_mutex_trylock(&(_pl->_lock)); // LOCK if (_retval == EBUSY) return EBUSY; if (_retval) gasneti_fatalerror("pthread_mutex_trylock()=%s",strerror(_retval)); gasneti_assert(!_gasneti_mutex_heldbysomeone(_pl)); // lock sanity _pl->_owner._id = pthread_self(); // record ownership gasneti_assert(_gasneti_mutex_heldbysomeone(_pl)); // sanity check NONE val return 0; } #define gasneti_mutex_unlock(pl) do { \ gasneti_mutex_t * const _pl = (pl); \ gasneti_assert_reason(_gasneti_mutex_heldbyme(_pl), \ "Invalid release of an unheld mutex in gasneti_mutex_unlock"); \ _pl->_owner._id64 = GASNETI_OWNERID_NONE; /* release ownership */ \ gasneti_assert_zeroret(pthread_mutex_unlock(&(_pl->_lock))); \ } while (0) #define gasneti_mutex_init(pl) do { \ gasneti_mutex_t * const _pl = (pl); \ GASNETI_MUTEX_INITCLEAR(&(_pl->_lock)); \ gasneti_assert_zeroret(pthread_mutex_init(&(_pl->_lock),NULL)); \ _pl->_owner._id64 = GASNETI_OWNERID_NONE; /* clear ownership */ \ _GASNETI_MUTEX_CAUTIOUS_INIT_INIT(_pl); \ } while (0) #if PLATFORM_OS_NETBSD /* bug 1476: destroying a locked mutex has undefined effects by POSIX, and some * systems whine about it. So instead use the following sequence which * accomplishes the same effect, but leaks the mutex if it's held by another * thread (unlocking another thread's held lock also has undefined effects). */ GASNETI_INLINE(gasneti_mutex_destroy_ignoreerr) int gasneti_mutex_destroy_ignoreerr(gasneti_mutex_t *_gmdi_pl) { if (_gasneti_mutex_heldbyme(_gmdi_pl) || !gasneti_mutex_trylock(_gmdi_pl)) { /* held by us */ gasneti_mutex_unlock(_gmdi_pl); return pthread_mutex_destroy(&(_gmdi_pl->_lock)); } else { /* held by someone else */ memset(_gmdi_pl,0,sizeof(*_gmdi_pl)); /* clobber */ return 0; } } #else #define gasneti_mutex_destroy_ignoreerr(pl) \ pthread_mutex_destroy(&((pl)->_lock)) #endif #define gasneti_mutex_destroy(pl) \ gasneti_assert_zeroret(gasneti_mutex_destroy_ignoreerr(pl)) #else /* GASNET_DEBUG non-pthread (error-check-only) mutexes */ typedef struct { _gasneti_mutexowner_t _owner; } gasneti_mutex_t; #define GASNETI_MUTEX_INITIALIZER { _GASNETI_MUTEXOWNER_INIT } #define gasneti_mutex_lock(pl) do { \ gasneti_mutex_t * const _pl = (pl); \ gasneti_assert_reason(!_gasneti_mutex_heldbyme(_pl), \ "Invalid recursive mutex acquire in gasneti_mutex_lock"); \ gasneti_assert_reason(!_gasneti_mutex_heldbysomeone(_pl), \ "gasneti_mutex_lock detected mutex corruption"); \ _pl->_owner._id64 = _gasneti_ownerid64_me; \ } while (0) GASNETI_INLINE(gasneti_mutex_trylock) GASNETI_WARN_UNUSED_RESULT int gasneti_mutex_trylock(gasneti_mutex_t *_pl) { gasneti_static_assert(_gasneti_ownerid64_me != GASNETI_OWNERID_NONE); gasneti_assert_reason(!_gasneti_mutex_heldbyme(_pl), "Invalid recursive mutex acquire in gasneti_mutex_trylock"); gasneti_assert_reason(!_gasneti_mutex_heldbysomeone(_pl), "gasneti_mutex_trylock detected mutex corruption"); _pl->_owner._id64 = _gasneti_ownerid64_me; return 0; } #define gasneti_mutex_unlock(pl) do { \ gasneti_mutex_t * const _pl = (pl); \ gasneti_assert_reason(_gasneti_mutex_heldbyme(_pl), \ "Invalid release of an unheld mutex in gasneti_mutex_unlock"); \ _pl->_owner._id64 = GASNETI_OWNERID_NONE; \ } while (0) #define gasneti_mutex_init(pl) do { \ gasneti_mutex_t * const _pl = (pl); \ _pl->_owner._id64 = GASNETI_OWNERID_NONE; \ } while (0) #define gasneti_mutex_destroy_ignoreerr(pl) 0 #define gasneti_mutex_destroy(pl) ((void)0) #endif #define gasneti_mutex_assertlocked(pl) \ gasneti_assert_reason( _gasneti_mutex_heldbyme(pl), "gasneti_mutex_assertlocked(" #pl ")") #define gasneti_mutex_assertunlocked(pl) \ gasneti_assert_reason(!_gasneti_mutex_heldbyme(pl), "gasneti_mutex_assertunlocked(" #pl ")") #else /* non-debug mutexes */ #if GASNETI_USE_TRUE_MUTEXES #include typedef pthread_mutex_t gasneti_mutex_t; #if defined(PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP) /* These are faster, though less "featureful" than the default * mutexes on linuxthreads implementations which offer them. */ #define GASNETI_MUTEX_INITIALIZER PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP #else #define GASNETI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER #endif #define gasneti_mutex_lock(pl) pthread_mutex_lock(pl) #define gasneti_mutex_trylock(pl) pthread_mutex_trylock(pl) #define gasneti_mutex_unlock(pl) pthread_mutex_unlock(pl) #define gasneti_mutex_init(pl) (GASNETI_MUTEX_INITCLEAR(pl), \ pthread_mutex_init((pl),NULL)) #if PLATFORM_OS_NETBSD /* bug 1476: destroying a locked mutex has undefined effects by POSIX, and some * systems whine about it. So instead use the following sequence which * accomplishes the same effect, but leaks the mutex if it's held by another * thread (unlocking another thread's held lock also has undefined effects), * or if held by the caller and gasneti_mutex_trylock() is non-recursive. */ GASNETI_INLINE(gasneti_mutex_destroy_ignoreerr) int gasneti_mutex_destroy_ignoreerr(gasneti_mutex_t *_pl) { if (!gasneti_mutex_trylock(_pl)) { /* held by us */ gasneti_mutex_unlock(_pl); return pthread_mutex_destroy(_pl); } else { /* held by someone, possibly us */ memset(_pl,0,sizeof(*_pl)); /* clobber */ return 0; } } #else #define gasneti_mutex_destroy_ignoreerr(pl) pthread_mutex_destroy(pl) #endif #define gasneti_mutex_destroy(pl) gasneti_mutex_destroy_ignoreerr(pl) #else typedef char gasneti_mutex_t; #define GASNETI_MUTEX_INITIALIZER '\0' #define gasneti_mutex_lock(pl) ((void)0) #define gasneti_mutex_trylock(pl) 0 #define gasneti_mutex_unlock(pl) ((void)0) #define gasneti_mutex_init(pl) ((void)0) #define gasneti_mutex_destroy_ignoreerr(pl) 0 #define gasneti_mutex_destroy(pl) ((void)0) #endif #define gasneti_mutex_assertlocked(pl) ((void)0) #define gasneti_mutex_assertunlocked(pl) ((void)0) #endif /* ------------------------------------------------------------------------------------ */ /* gasneti_cond_t Condition variables - Provides pthread_cond-like functionality, with error checking See README-tools for important usage information. */ #if GASNETI_USE_TRUE_MUTEXES typedef struct { pthread_cond_t _cond; GASNETI_BUG2231_WORKAROUND_PAD } gasneti_cond_t; #define GASNETI_COND_INITIALIZER { PTHREAD_COND_INITIALIZER } #define gasneti_cond_init(pc) do { \ gasneti_cond_t * const _pc = (pc); \ GASNETI_MUTEX_INITCLEAR(&(_pc->_cond)); \ gasneti_assert_zeroret(pthread_cond_init(&(_pc->_cond), NULL)); \ } while (0) #define gasneti_cond_destroy(pc) gasneti_assert_zeroret(pthread_cond_destroy(&((pc)->_cond))) #define gasneti_cond_signal(pc) do { \ gasneti_cond_t * const _pc = (pc); \ gasneti_assert_zeroret(pthread_cond_signal(&(_pc->_cond))); \ } while (0) #define gasneti_cond_broadcast(pc) do { \ gasneti_cond_t * const _pc = (pc); \ gasneti_assert_zeroret(pthread_cond_broadcast(&(_pc->_cond))); \ } while (0) #if GASNET_DEBUG || GASNETI_BUG2231_WORKAROUND || GASNETI_MUTEX_CAUTIOUS_INIT #define gasneti_cond_wait(pc,pl) do { \ gasneti_cond_t * const _pc = (pc); \ gasneti_mutex_t * const _pl = (pl); \ gasneti_mutex_assertlocked(_pl); \ _gasneti_mutexowner_t _ownersave = _pl->_owner; \ _pl->_owner._id64 = GASNETI_OWNERID_NONE; \ _GASNETI_MUTEX_CAUTIOUS_INIT_CHECK(_pl); \ gasneti_assert_zeroret(pthread_cond_wait(&(_pc->_cond), &(_pl->_lock))); \ gasneti_assert(!_gasneti_mutex_heldbysomeone(_pl)); \ _pl->_owner = _ownersave; \ } while (0) #else #define gasneti_cond_wait(pc,pl) do { \ gasneti_assert_zeroret(pthread_cond_wait(&((pc)->_cond), (pl))); \ } while (0) #endif #else typedef char gasneti_cond_t; #define GASNETI_COND_INITIALIZER '\0' #define gasneti_cond_init(pc) ((void)0) #define gasneti_cond_destroy(pc) ((void)0) #define gasneti_cond_signal(pc) ((void)0) #define gasneti_cond_broadcast(pc) ((void)0) #define gasneti_cond_wait(pc,pl) \ gasneti_fatalerror("There's only one thread: waiting on condition variable => deadlock") #endif /* ------------------------------------------------------------------------------------ */ /* Reader-writer lock support */ typedef enum { _GASNETI_RWLOCK_UNLOCKED=0, _GASNETI_RWLOCK_RDLOCKED, _GASNETI_RWLOCK_WRLOCKED } _gasneti_rwlock_state; /* must always be defined for gasnet_tools-par */ #if !GASNETI_USE_TRUE_MUTEXES || /* mutexes compile away to nothing */ \ !GASNETI_HAVE_PTHREAD_RWLOCK || /* OS rwlocks missing, use standard mutex (no read concurrency) */ \ GASNETI_MUTEX_CAUTIOUS_INIT /* assume pthread_rwlocks are also broken */ #define gasneti_rwlock_t gasneti_mutex_t #define gasneti_rwlock_init gasneti_mutex_init #define gasneti_rwlock_destroy gasneti_mutex_destroy #define gasneti_rwlock_rdlock gasneti_mutex_lock #define gasneti_rwlock_wrlock gasneti_mutex_lock #define gasneti_rwlock_tryrdlock gasneti_mutex_trylock #define gasneti_rwlock_trywrlock gasneti_mutex_trylock #define gasneti_rwlock_unlock gasneti_mutex_unlock #define GASNETI_RWLOCK_INITIALIZER GASNETI_MUTEX_INITIALIZER #define gasneti_rwlock_assertlocked gasneti_mutex_assertlocked #define gasneti_rwlock_assertrdlocked gasneti_mutex_assertlocked #define gasneti_rwlock_assertwrlocked gasneti_mutex_assertlocked #define gasneti_rwlock_assertunlocked gasneti_mutex_assertunlocked #elif GASNET_DEBUG /* debug checking rwlocks */ #define gasneti_rwlock_t pthread_rwlock_t #define GASNETI_RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER extern _gasneti_rwlock_state _gasneti_rwlock_query(gasneti_rwlock_t const *_l); extern void _gasneti_rwlock_insert(gasneti_rwlock_t const *_l, _gasneti_rwlock_state _state); extern void _gasneti_rwlock_remove(gasneti_rwlock_t const *_l); #define gasneti_rwlock_assertlocked(pl) \ gasneti_assert(_gasneti_rwlock_query(pl)) #define gasneti_rwlock_assertrdlocked(pl) \ gasneti_assert_uint(_gasneti_rwlock_query(pl) ,==, _GASNETI_RWLOCK_RDLOCKED) #define gasneti_rwlock_assertwrlocked(pl) \ gasneti_assert_uint(_gasneti_rwlock_query(pl) ,==, _GASNETI_RWLOCK_WRLOCKED) #define gasneti_rwlock_assertunlocked(pl) \ gasneti_assert_uint(_gasneti_rwlock_query(pl) ,==, _GASNETI_RWLOCK_UNLOCKED) #define gasneti_rwlock_init(pl) \ gasneti_assert_zeroret(pthread_rwlock_init(pl,NULL)) #define gasneti_rwlock_destroy(pl) do { \ gasneti_rwlock_t * const _pl = (pl); \ gasneti_rwlock_assertunlocked(_pl); \ gasneti_assert_zeroret(pthread_rwlock_destroy(_pl)); \ } while (0) #define gasneti_rwlock_rdlock(pl) do { \ gasneti_rwlock_t * const _pl = (pl); \ int _ret; \ gasneti_rwlock_assertunlocked(_pl); \ while ((_ret = pthread_rwlock_rdlock(_pl)) == EAGAIN) \ gasneti_sched_yield(); /* too many readers */ \ if (_ret) gasneti_fatalerror("pthread_rwlock_rdlock()=%s",strerror(_ret)); \ _gasneti_rwlock_insert(_pl, _GASNETI_RWLOCK_RDLOCKED); \ } while (0) #define gasneti_rwlock_wrlock(pl) do { \ gasneti_rwlock_t * const _pl = (pl); \ gasneti_rwlock_assertunlocked(_pl); \ gasneti_assert_zeroret(pthread_rwlock_wrlock(_pl)); \ _gasneti_rwlock_insert(_pl, _GASNETI_RWLOCK_WRLOCKED); \ } while (0) #define gasneti_rwlock_unlock(pl) do { \ gasneti_rwlock_t * const _pl = (pl); \ gasneti_rwlock_assertlocked(_pl); \ gasneti_assert_zeroret(pthread_rwlock_unlock(_pl)); \ _gasneti_rwlock_remove(_pl); \ } while (0) GASNETI_INLINE(_gasneti_rwlock_trylock) int _gasneti_rwlock_trylock(gasneti_rwlock_t *_pl, int _writer) { int _ret; gasneti_rwlock_assertunlocked(_pl); if (_writer) _ret = pthread_rwlock_trywrlock(_pl); else _ret = pthread_rwlock_tryrdlock(_pl); if (_ret == EBUSY) return EBUSY; if (_ret) gasneti_fatalerror("pthread_rwlock_trylock()=%s",strerror(_ret)); _gasneti_rwlock_insert(_pl, (_writer ? _GASNETI_RWLOCK_WRLOCKED : _GASNETI_RWLOCK_RDLOCKED)); return 0; } #define gasneti_rwlock_tryrdlock(pl) _gasneti_rwlock_trylock(pl,0) #define gasneti_rwlock_trywrlock(pl) _gasneti_rwlock_trylock(pl,1) #else /* using real, OS-provided rwlocks */ #define gasneti_rwlock_t pthread_rwlock_t #define gasneti_rwlock_init(pl) pthread_rwlock_init(pl,NULL) #define gasneti_rwlock_destroy pthread_rwlock_destroy #define gasneti_rwlock_rdlock(pl) /* mask too-many-readers failure */ \ while (GASNETT_PREDICT_FALSE(pthread_rwlock_rdlock(pl) == EAGAIN)) gasneti_sched_yield() #define gasneti_rwlock_wrlock pthread_rwlock_wrlock #define gasneti_rwlock_tryrdlock pthread_rwlock_tryrdlock #define gasneti_rwlock_trywrlock pthread_rwlock_trywrlock #define gasneti_rwlock_unlock pthread_rwlock_unlock #define GASNETI_RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER #define gasneti_rwlock_assertlocked(pl) ((void)0) #define gasneti_rwlock_assertrdlocked(pl) ((void)0) #define gasneti_rwlock_assertwrlocked(pl) ((void)0) #define gasneti_rwlock_assertunlocked(pl) ((void)0) #endif /* ------------------------------------------------------------------------------------ */ /* Wrappers for thread-local data storage See README-tools for usage information. */ #define _GASNETI_THREADKEY_MAGIC ((uint64_t)0xFF00ABCDEF573921ULL) #if GASNETI_THREADS #if GASNETI_HAVE_TLS_SUPPORT /* use __thread, if available */ #define _GASNETI_THREADKEY_USES_TLS 1 #else #define _GASNETI_THREADKEY_USES_PTHREAD_GETSPECIFIC 1 #endif #else /* no threads */ #define _GASNETI_THREADKEY_USES_NOOP 1 #endif #if _GASNETI_THREADKEY_USES_PTHREAD_GETSPECIFIC typedef struct { #if GASNET_DEBUG uint64_t _magic; #define _GASNETI_THREADKEY_MAGIC_INIT _GASNETI_THREADKEY_MAGIC, #else #define _GASNETI_THREADKEY_MAGIC_INIT #endif gasneti_mutex_t _initmutex; volatile int _isinit; pthread_key_t _value; } _gasneti_threadkey_t; #define _GASNETI_THREADKEY_INITIALIZER \ { _GASNETI_THREADKEY_MAGIC_INIT \ GASNETI_MUTEX_INITIALIZER, \ 0 /* value field left NULL */ } #else typedef void *_gasneti_threadkey_t; #define _GASNETI_THREADKEY_INITIALIZER NULL #endif #if GASNETI_THREADS GASNETI_NEVER_INLINE(_gasneti_threadkey_init, /* avoid inserting overhead for an uncommon path */ static void _gasneti_threadkey_init(pthread_key_t *_value, gasneti_mutex_t *_initmutex, volatile int *_isinit)) { gasneti_mutex_lock(_initmutex); if (*_isinit == 0) { gasneti_assert_zeroret(pthread_key_create(_value,NULL)); { /* need a wmb, but have to avoid a header dependency cycle */ gasneti_mutex_t _dummymutex = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&_dummymutex);gasneti_mutex_unlock(&_dummymutex); } *_isinit = 1; } gasneti_mutex_unlock(_initmutex); } #endif #if _GASNETI_THREADKEY_USES_PTHREAD_GETSPECIFIC #define GASNETI_THREADKEY_DECLARE(key) \ extern _gasneti_threadkey_t key #define GASNETI_THREADKEY_DEFINE(key) \ _gasneti_threadkey_t key = _GASNETI_THREADKEY_INITIALIZER #elif _GASNETI_THREADKEY_USES_TLS #if !GASNETI_COMPILER_IS_CC /* mismatched compilers can access TLS threadkeys defined in objects built by supported compiler via extern function call */ #define GASNETI_THREADKEY_DECLARE(key) \ extern void *_gasneti_threadkey_get_##key(void); \ extern void _gasneti_threadkey_set_##key(void *_val) /* bug 1947 - following only expanded when a configure-mismatched compiler is DEFINING a threadkey - use pthread_getspecific in that case for safety */ #define GASNETI_THREADKEY_DEFINE(key) \ static pthread_key_t _gasneti_threadkey_##key##_value; \ static gasneti_mutex_t _gasneti_threadkey_##key##_initmutex = GASNETI_MUTEX_INITIALIZER; \ static volatile int _gasneti_threadkey_##key##_isinit = 0; \ extern void *_gasneti_threadkey_get_##key(void) { \ if (!_gasneti_threadkey_##key##_isinit) \ _gasneti_threadkey_init(&_gasneti_threadkey_##key##_value, \ &_gasneti_threadkey_##key##_initmutex, \ &_gasneti_threadkey_##key##_isinit); \ return pthread_getspecific(_gasneti_threadkey_##key##_value); \ } \ extern void _gasneti_threadkey_set_##key(void *_val) { \ if (!_gasneti_threadkey_##key##_isinit) \ _gasneti_threadkey_init(&_gasneti_threadkey_##key##_value, \ &_gasneti_threadkey_##key##_initmutex, \ &_gasneti_threadkey_##key##_isinit); \ gasneti_assert_zeroret(pthread_setspecific(_gasneti_threadkey_##key##_value, _val)); \ } \ GASNETI_THREADKEY_DECLARE(key) #else /* no mismatch */ #define GASNETI_THREADKEY_DECLARE(key) \ extern __thread _gasneti_threadkey_t _gasneti_threadkey_val_##key #define GASNETI_THREADKEY_DEFINE(key) \ GASNETI_THREADKEY_DECLARE(key); \ extern void *_gasneti_threadkey_get_##key(void) { \ return gasneti_threadkey_get(key); \ } \ extern void _gasneti_threadkey_set_##key(void *_val) { \ gasneti_threadkey_set(key, _val); \ } \ __thread _gasneti_threadkey_t _gasneti_threadkey_val_##key = _GASNETI_THREADKEY_INITIALIZER #endif #else /* _GASNETI_THREADKEY_USES_NOOP */ #define GASNETI_THREADKEY_DECLARE(key) \ extern _gasneti_threadkey_t _gasneti_threadkey_val_##key #define GASNETI_THREADKEY_DEFINE(key) \ _gasneti_threadkey_t _gasneti_threadkey_val_##key = _GASNETI_THREADKEY_INITIALIZER #endif #if _GASNETI_THREADKEY_USES_PTHREAD_GETSPECIFIC /* struct prevents accidental direct access, magic provides extra safety checks */ #if GASNET_DEBUG #define _gasneti_threadkey_check(key, requireinit) \ ( gasneti_assert((key)._magic == _GASNETI_THREADKEY_MAGIC), \ (requireinit ? gasneti_assert((key)._isinit) : ((void)0))) #else /* Special case needed to suppress -Wunused-value warnings. * You would think the DEBUG version would be fine, but it's not * regardnless of how many (void) casts one inserts (gcc bug?). */ #define _gasneti_threadkey_check(key, requireinit) ((void)0) #endif #define gasneti_threadkey_get_noinit(key) \ ( _gasneti_threadkey_check((key), 1), \ pthread_getspecific((key)._value) ) #define gasneti_threadkey_set_noinit(key, newvalue) do { \ _gasneti_threadkey_check((key), 1); \ gasneti_assert_zeroret(pthread_setspecific((key)._value, (newvalue))); \ } while (0) #define gasneti_threadkey_init(key) (_gasneti_threadkey_check((key), 0), \ _gasneti_threadkey_init(&((key)._value), \ &((key)._initmutex), \ &((key)._isinit)), \ _gasneti_threadkey_check((key), 1)) #define gasneti_threadkey_get(key) \ ( _gasneti_threadkey_check(key, 0), \ ( GASNETT_PREDICT_FALSE((key)._isinit == 0) ? \ gasneti_threadkey_init(key) : \ ((void)0) ), \ gasneti_threadkey_get_noinit(key) ) #define gasneti_threadkey_set(key,newvalue) do { \ _gasneti_threadkey_check(key, 0); \ if_pf((key)._isinit == 0) \ gasneti_threadkey_init(key); \ gasneti_threadkey_set_noinit(key, newvalue); \ } while (0) #else /* _GASNETI_THREADKEY_USES_TLS, _GASNETI_THREADKEY_USES_NOOP */ /* name shift to _gasneti_threadkey_val_##key prevents accidental direct access */ #define gasneti_threadkey_init(key) ((void)0) #if _GASNETI_THREADKEY_USES_TLS && !GASNETI_COMPILER_IS_CC /* defined as __thread data storage, but current compiler doesn't support TLS use an extern function call as conservative fall-back position */ #define gasneti_threadkey_get_noinit(key) \ (_gasneti_threadkey_get_##key()) #define gasneti_threadkey_set_noinit(key, newvalue) \ (_gasneti_threadkey_set_##key(newvalue)) #else #define gasneti_threadkey_get_noinit(key) \ (_gasneti_threadkey_val_##key) #define gasneti_threadkey_set_noinit(key, newvalue) \ ((_gasneti_threadkey_val_##key) = (newvalue)) #endif #define gasneti_threadkey_get gasneti_threadkey_get_noinit #define gasneti_threadkey_set gasneti_threadkey_set_noinit #endif /* ------------------------------------------------------------------------------------ */ #if !defined(GASNETI_BUG3430_WORKAROUND) && PLATFORM_OS_CYGWIN #define GASNETI_BUG3430_WORKAROUND 1 #endif #if GASNETI_USE_TRUE_MUTEXES && GASNETI_BUG3430_WORKAROUND // a workaround for the Cygwin pthread_create vs. sched_yield performance bug extern gasneti_mutex_t gasneti_bug3430_lock; extern gasneti_cond_t gasneti_bug3430_cond; extern volatile int gasneti_bug3430_creating; static int gasneti_bug3430_sched_yield(void) { if (gasneti_bug3430_creating) { // deliberately unsynchronized "optimistic" read gasneti_mutex_lock(&gasneti_bug3430_lock); while (gasneti_bug3430_creating) { // sleep thru pthread_create gasneti_cond_wait(&gasneti_bug3430_cond, &gasneti_bug3430_lock); } gasneti_mutex_unlock(&gasneti_bug3430_lock); } return _gasneti_sched_yield(); } static int gasneti_bug3430_pthread_create(pthread_t * GASNETI_RESTRICT _thread, const pthread_attr_t * GASNETI_RESTRICT _attr, void *(*_start_routine)(void*), void * GASNETI_RESTRICT _arg) { gasneti_mutex_lock(&gasneti_bug3430_lock); gasneti_bug3430_creating++; int _ret = pthread_create(_thread, _attr, _start_routine, _arg); gasneti_bug3430_creating--; gasneti_cond_broadcast(&gasneti_bug3430_cond); gasneti_mutex_unlock(&gasneti_bug3430_lock); return _ret; } // install hooks via macro #undef sched_yield #define sched_yield gasneti_bug3430_sched_yield #undef _gasneti_sched_yield #define _gasneti_sched_yield() gasneti_bug3430_sched_yield() #undef pthread_create #define pthread_create gasneti_bug3430_pthread_create #endif /* ------------------------------------------------------------------------------------ */ /* environment support see README-tools for usage information */ extern char *gasneti_format_number(int64_t _val, char *_buf, size_t _bufsz, int _is_mem_size); extern int64_t gasneti_parse_int(const char *_str, uint64_t _mem_size_multiplier); extern int gasneti_parse_dbl(const char *_str, double *_result_ptr); extern int gasneti_parse_yesno(const char *_str); extern void gasneti_setenv(const char *_key, const char *_value); extern void gasneti_unsetenv(const char *_key); // Environment variable queries should use gasneti_getenv_*_withdefault() whereever // practical, to ensure proper verboseenv console reporting of settings/units/defaults. // Any calls to bare gasneti_getenv() should be followed by a call to the // appropriate gasneti_env*_display() function to ensure proper reporting. extern char *gasneti_getenv(const char *_keyname); extern char *gasneti_getenv_withdefault(const char *_keyname, const char *_defaultval); extern int gasneti_getenv_yesno_withdefault(const char *_keyname, int _defaultval); extern int64_t gasneti_getenv_int_withdefault(const char *_keyname, int64_t _defaultval, uint64_t _mem_size_multiplier); extern double gasneti_getenv_dbl_withdefault(const char *_keyname, double _defaultval); extern uint64_t gasneti_getenv_memsize_withdefault(const char *_key, const char *_dflt, uint64_t _minimum, uint64_t _maximum, uint64_t _fraction_of, uint64_t _pph, uint64_t _overhead_per_p); extern int gasneti_verboseenv(void); extern void gasneti_envint_display(const char *_key, int64_t _val, int _is_dflt, int _is_mem_size); extern void gasneti_envstr_display(const char *_key, const char *_val, int _is_dflt); extern void gasneti_envdbl_display(const char *_key, double _val, int _is_dflt); // Search environment(s) for existance of any variable with the given prefix // Returns an arbitary "VAR=VAL" string if any matches found, or NULL otherwise. extern const char* gasneti_check_env_prefix(const char *_prefix); extern const char *gasneti_tmpdir(void); /* Custom (spawner- or conduit-specific) supplement to gasneti_getenv * If set to non-NULL this has precedence over gasneti_globalEnv. */ typedef char *(gasneti_getenv_fn_t)(const char *_keyname); extern gasneti_getenv_fn_t *gasneti_getenv_hook; // Custom (spawner- or conduit-specific) supplement to gasneti_check_env_prefix // If set to non-NULL this has precedence over gasneti_globalEnv. typedef const char *(gasneti_check_env_prefix_fn_t)(const char *_prefix); extern gasneti_check_env_prefix_fn_t *gasneti_check_env_prefix_hook; // Helper for implementing a gasneti_check_env_prefix_hook extern const char* gasneti_check_env_prefix_helper(const char *_environ, const char *_prefix); /* ------------------------------------------------------------------------------------ */ /* Attempt to maximize allowable cpu and memory resource limits for this * process, silently ignoring any errors * return non-zero on success */ int gasnett_maximize_rlimits(void); /* maximize a particular rlimit, and return non-zero on success. For portability, this should be called within an ifdef to ensure the specified RLIMIT_ constant exists */ int gasnett_maximize_rlimit(int _res, const char *_lim_desc); /* ------------------------------------------------------------------------------------ */ /* Older AIX's stdio.h won't provide prototypes for snprintf() and vsnprintf() * by default since they are in C99 but not C89. */ #if !HAVE_SNPRINTF_DECL GASNETI_FORMAT_PRINTF(snprintf,3,4, extern int snprintf(char *, size_t, const char *, ...)); #endif #if !HAVE_VSNPRINTF_DECL #include GASNETI_FORMAT_PRINTF(vsnprintf,3,0, extern int vsnprintf(char *, size_t, const char *, va_list)); #endif /* ------------------------------------------------------------------------------------ */ /* By default GASNet(tools) enforces a spec-compliant ctype interface, even when the OS version is buggy / warning-prone. Clients who want the buggy OS version can -DGASNETT_USE_CTYPE_WRAPPERS=0 */ #ifndef GASNETT_USE_CTYPE_WRAPPERS #if GASNETI_NEED_CTYPE_WRAPPERS && !__cplusplus // bug 3834 #define GASNETT_USE_CTYPE_WRAPPERS 1 #else #define GASNETT_USE_CTYPE_WRAPPERS 0 #endif #endif #include #if GASNETT_USE_CTYPE_WRAPPERS GASNETI_INLINE(gasnett_toupper) GASNETI_CONST int gasnett_toupper(int _c) { return toupper(_c); } #undef toupper #define toupper gasnett_toupper GASNETI_INLINE(gasnett_tolower) GASNETI_CONST int gasnett_tolower(int _c) { return tolower(_c); } #undef tolower #define tolower gasnett_tolower GASNETI_INLINE(gasnett_isalnum) GASNETI_CONST int gasnett_isalnum(int _c) { return isalnum(_c); } #undef isalnum #define isalnum gasnett_isalnum GASNETI_INLINE(gasnett_isalpha) GASNETI_CONST int gasnett_isalpha(int _c) { return isalpha(_c); } #undef isalpha #define isalpha gasnett_isalpha GASNETI_INLINE(gasnett_iscntrl) GASNETI_CONST int gasnett_iscntrl(int _c) { return iscntrl(_c); } #undef iscntrl #define iscntrl gasnett_iscntrl GASNETI_INLINE(gasnett_isdigit) GASNETI_CONST int gasnett_isdigit(int _c) { return isdigit(_c); } #undef isdigit #define isdigit gasnett_isdigit GASNETI_INLINE(gasnett_isgraph) GASNETI_CONST int gasnett_isgraph(int _c) { return isgraph(_c); } #undef isgraph #define isgraph gasnett_isgraph GASNETI_INLINE(gasnett_islower) GASNETI_CONST int gasnett_islower(int _c) { return islower(_c); } #undef islower #define islower gasnett_islower GASNETI_INLINE(gasnett_isprint) GASNETI_CONST int gasnett_isprint(int _c) { return isprint(_c); } #undef isprint #define isprint gasnett_isprint GASNETI_INLINE(gasnett_ispunct) GASNETI_CONST int gasnett_ispunct(int _c) { return ispunct(_c); } #undef ispunct #define ispunct gasnett_ispunct GASNETI_INLINE(gasnett_isspace) GASNETI_CONST int gasnett_isspace(int _c) { return isspace(_c); } #undef isspace #define isspace gasnett_isspace GASNETI_INLINE(gasnett_isupper) GASNETI_CONST int gasnett_isupper(int _c) { return isupper(_c); } #undef isupper #define isupper gasnett_isupper GASNETI_INLINE(gasnett_isxdigit) GASNETI_CONST int gasnett_isxdigit(int _c) { return isxdigit(_c); } #undef isxdigit #define isxdigit gasnett_isxdigit #if HAVE_ISBLANK /* Added in ISO C99 */ #if !(HAVE_ISBLANK_DECL || defined(isblank)) extern int isblank(int); #endif GASNETI_INLINE(gasnett_isblank) GASNETI_CONST int gasnett_isblank(int _c) { return isblank(_c); } #undef isblank #define isblank gasnett_isblank #endif #if HAVE_ISASCII /* X/OPEN */ #if !(HAVE_ISASCII_DECL || defined(isascii)) extern int isascii(int); #endif GASNETI_INLINE(gasnett_isascii) GASNETI_CONST int gasnett_isascii(int _c) { return isascii(_c); } #undef isascii #define isascii gasnett_isascii #endif #if HAVE_TOASCII /* X/OPEN */ #if !(HAVE_TOASCII_DECL || defined(toascii)) extern int toascii(int); #endif GASNETI_INLINE(gasnett_toascii) GASNETI_CONST int gasnett_toascii(int _c) { return toascii(_c); } #undef toascii #define toascii gasnett_toascii #endif #endif /* If a platform lacks isblank() we supply it, assuming the C/POSIX locale. */ #if !HAVE_ISBLANK GASNETI_INLINE(gasnett_isblank) GASNETI_CONST int gasnett_isblank(int _c) { return (_c == ' ') || (_c == '\t'); } #undef isblank /* Paranoia */ #define isblank gasnett_isblank #endif /* If a platform lacks isascii() we supply it. */ #if !HAVE_ISASCII GASNETI_INLINE(gasnett_isascii) GASNETI_CONST int gasnett_isascii(int _c) { return !(_c & ~0x7f); } #undef isascii /* Paranoia */ #define isascii gasnett_isascii #endif /* If a platform lacks toascii() we supply it. */ #if !HAVE_TOASCII GASNETI_INLINE(gasnett_toascii) GASNETI_CONST int gasnett_toascii(int _c) { return (_c & 0x7f); } #undef toascii /* Paranoia */ #define toascii gasnett_toascii #endif /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/gasnet_legacy.c0000664000175000017500000002272515142313673016403 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_legacy.c $ * Description: GASNet-1 legacy API support layer * Copyright 2018, The Regents of the University of California. * Terms of use are as specified in license.txt */ #include #include // remove safety checks that protect the g2ex data elsewhere #undef gasneti_thunk_client #undef gasneti_thunk_endpoint #undef gasneti_thunk_tm #undef gasneti_thunk_segment gex_Client_t gasneti_thunk_client = NULL; gex_EP_t gasneti_thunk_endpoint = NULL; gex_TM_t gasneti_thunk_tm = NULL; gex_Segment_t gasneti_thunk_segment = NULL; // conduits may override this to relocate the legacy handlers // Note that legacy handlers are registered conditionally on the use of gasnet_attach or GEX_FLAG_USES_GASNET1 #ifndef GASNETI_LEGACY_HANDLER_BASE #define GASNETI_LEGACY_HANDLER_BASE 95 #endif #define _hidx_gasneti_legacy_memset_reqreph (GASNETI_LEGACY_HANDLER_BASE+0) static gex_AM_Entry_t *gasneti_legacy_handlers; static int gasneti_legacy_handlers_registered = 0; /* ------------------------------------------------------------------------------------ */ extern void gasneti_legacy_alloc_tm_hook(gasneti_TM_t _tm) { if (_tm->_flags & GEX_FLAG_USES_GASNET1) { gex_TM_t tm = gasneti_export_tm(_tm); gex_Client_t client = gex_TM_QueryClient(tm); if (gasneti_thunk_client && gasneti_thunk_client != client) { const char *name = gex_Client_QueryName(gasneti_thunk_client); if (gex_Client_QueryFlags(gasneti_thunk_client) & GASNETI_FLAG_INIT_LEGACY) name = "Legacy gasnet_init() call"; gasneti_fatalerror("%s: Only one client per process may use GASNet-1 APIs, and this was already claimed by <%s>", gex_Client_QueryName(client), name); } // save the GEX objects for use by g2ex, and mark them as used by g2ex gasneti_thunk_tm = tm; gasneti_thunk_client = client; gasneti_import_client(client)->_flags |= GEX_FLAG_USES_GASNET1; gasneti_thunk_endpoint = gex_TM_QueryEP(tm); gasneti_import_ep(gasneti_thunk_endpoint)->_flags |= GEX_FLAG_USES_GASNET1; if (!gasneti_legacy_handlers_registered) { int len = 0; int numreg = 0; while (gasneti_legacy_handlers[len].gex_fnptr) len++; /* calc len */ if (gasneti_amregister(gasneti_import_ep(gasneti_thunk_endpoint), gasneti_legacy_handlers, len, GASNETI_LEGACY_HANDLER_BASE, GASNETI_CLIENT_HANDLER_BASE, 0, &numreg) != GASNET_OK) gasneti_fatalerror("Error registering g2ex legacy AM handlers"); gasneti_assert(numreg == len); gasneti_legacy_handlers_registered = 1; } } } extern void gasneti_legacy_attach_checks(int checksegment) { gasneti_assert(gasneti_thunk_tm); gasneti_assert(gasneti_thunk_endpoint); gasneti_assert(gasneti_thunk_client); if (checksegment) { gasneti_assert(gasneti_thunk_segment); gasneti_assert(gex_Segment_QueryFlags(gasneti_thunk_segment) & GEX_FLAG_USES_GASNET1); gasneti_assert(gex_Segment_QueryClient(gasneti_thunk_segment) == gasneti_thunk_client); } gasneti_assert(gex_TM_QueryFlags(gasneti_thunk_tm) & GEX_FLAG_USES_GASNET1); gasneti_assert(gex_TM_QueryEP(gasneti_thunk_tm) == gasneti_thunk_endpoint); gasneti_assert(gex_EP_QueryFlags(gasneti_thunk_endpoint) & GEX_FLAG_USES_GASNET1); gasneti_assert(gex_EP_QueryClient(gasneti_thunk_endpoint) == gasneti_thunk_client); gasneti_assert(gex_Client_QueryFlags(gasneti_thunk_client) & GEX_FLAG_USES_GASNET1); } extern void gasneti_legacy_segment_attach_hook(gasneti_EP_t ep) { if (ep == gasneti_import_ep(gasneti_thunk_endpoint)) { // We just attached a segment to the g2ex EP, set the g2ex thunk segment gasneti_assert(ep->_flags & GEX_FLAG_USES_GASNET1); ep->_segment->_flags |= GEX_FLAG_USES_GASNET1; gasneti_thunk_segment = gasneti_export_segment(ep->_segment); } } /* ------------------------------------------------------------------------------------ */ // Legacy gasnet_attach() extern int gasneti_attach( gex_TM_t _tm, gasnet_handlerentry_t *table, int numentries, uintptr_t segsize) { GASNETI_TRACE_PRINTF(O,("gasnet_attach(table (%i entries), segsize=%"PRIuPTR")", numentries, segsize)); gasneti_TM_t tm = gasneti_import_tm_nonpair(_tm); gasneti_EP_t ep = tm->_ep; if (!gasneti_init_done) GASNETI_RETURN_ERRR(NOT_INIT, "GASNet attach called before init"); if (gasneti_attach_done) GASNETI_RETURN_ERRR(NOT_INIT, "GASNet already attached"); /* check argument sanity */ #if GASNET_SEGMENT_FAST || GASNET_SEGMENT_LARGE if ((segsize % GASNET_PAGESIZE) != 0) GASNETI_RETURN_ERRR(BAD_ARG, "segsize not page-aligned"); if (segsize > gasneti_MaxLocalSegmentSize) GASNETI_RETURN_ERRR(BAD_ARG, "segsize too large"); #else segsize = 0; #endif /* primary attach */ if (GASNET_OK != gasnetc_attach_primary(0)) GASNETI_RETURN_ERRR(RESOURCE,"Error in primary attach"); #if GASNET_SEGMENT_FAST || GASNET_SEGMENT_LARGE /* register client segment */ gex_Segment_t seg; // g2ex segment is automatically saved by a hook if (GASNET_OK != gasneti_segmentAttach(&seg, _tm, segsize, GASNETI_FLAG_INIT_LEGACY)) GASNETI_RETURN_ERRR(RESOURCE,"Error attaching segment"); #elif GASNETC_SEGMENT_ATTACH_HOOK gex_Segment_t seg = GEX_SEGMENT_INVALID; // Everything + hook #endif #if GASNETC_SEGMENT_ATTACH_HOOK if (GASNET_OK != gasnetc_segment_attach_hook(seg, _tm)) GASNETI_RETURN_ERRR(RESOURCE,"Error attaching segment (conduit hook)"); #endif /* register client handlers */ if (table && gasneti_amregister_legacy(ep, table, numentries) != GASNET_OK) GASNETI_RETURN_ERRR(RESOURCE,"Error registering handlers"); /* ensure everything is initialized across all nodes */ gasnet_barrier(0, GASNET_BARRIERFLAG_UNNAMED); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ // Legacy memset support GASNETI_INLINE(gasneti_legacy_memset_reqreph_inner) void gasneti_legacy_memset_reqreph_inner(gex_Token_t token, gex_AM_Arg_t val, void *nbytes_arg, void *dest, void *op) { size_t nbytes = (uintptr_t)nbytes_arg; if (dest && nbytes) { // Request: memset memset(dest, (int)(uint32_t)val, nbytes); gasneti_sync_writes(); gex_AM_ReplyShort(token, gasneti_handleridx(gasneti_legacy_memset_reqreph), 0, 0, PACK(0), PACK(0), PACK(op)); } else { // Reply: completion gasneti_assert(!val && !nbytes && !dest); gasneti_assert(op); if (gasneti_op_is_eop(op)) { gasneti_eop_t * eop = op; gasneti_eop_markdone(eop); } else { gasneti_iop_t * iop = op; gasneti_iop_markdone(iop, 1, 0); } } } SHORT_HANDLER(gasneti_legacy_memset_reqreph,4,7, (token, a0, UNPACK(a1), UNPACK(a2), UNPACK(a3) ), (token, a0, UNPACK2(a1, a2), UNPACK2(a3, a4), UNPACK2(a5, a6))); #define GASNETI_TRACE_MEMSET(node,dest,val,nbytes) do { \ GASNETI_TRACE_PRINTF(D,("GASNET_MEMSET: " GASNETI_RADDRFMT" val=%02x nbytes=%" PRIuPTR,\ GASNETI_RADDRSTR(gasneti_thunk_tm,(node),(dest)), (val), \ (uintptr_t)(nbytes))); \ } while(0) #define GASNETI_CHECKLOCAL_MEMSET(tm,node,dest,val,nbytes) do { \ void *mapped_dest = gasnete_mapped_at(tm,node,dest); \ if (mapped_dest) { \ memset(mapped_dest,val,nbytes); \ gasnete_loopbackput_memsync(); \ return 0; \ }} while(0) extern gex_Event_t gasneti_legacy_memset_nb(gex_Rank_t node, void *dest, int val, size_t nbytes GASNETI_THREAD_FARG) { GASNETI_TRACE_MEMSET(node,dest,val,nbytes); gasneti_assert_reason(gasneti_legacy_handlers_registered, "gasnet_memset*() calls require gasnet_attach() or gex_Client_Init(..., GEX_FLAG_USES_GASNET1)"); if_pf (!nbytes) return 0; gasneti_boundscheck(gasneti_thunk_tm,node,dest,nbytes); GASNETI_CHECKLOCAL_MEMSET(gasneti_thunk_tm,node,dest,val,nbytes); gasneti_eop_t *eop = gasneti_eop_create(GASNETI_THREAD_PASS_ALONE); gex_AM_RequestShort(gasneti_thunk_tm, node, gasneti_handleridx(gasneti_legacy_memset_reqreph), 0, (gex_AM_Arg_t)val, PACK(nbytes), PACK(dest), PACK(eop)); return gasneti_eop_to_event(eop); } extern int gasneti_legacy_memset_nbi(gex_Rank_t node, void *dest, int val, size_t nbytes GASNETI_THREAD_FARG) { GASNETI_TRACE_MEMSET(node,dest,val,nbytes); gasneti_assert_reason(gasneti_legacy_handlers_registered, "gasnet_memset*() calls require gasnet_attach() or gex_Client_Init(..., GEX_FLAG_USES_GASNET1)"); if_pf (!nbytes) return 0; gasneti_boundscheck(gasneti_thunk_tm,node,dest,nbytes); GASNETI_CHECKLOCAL_MEMSET(gasneti_thunk_tm,node,dest,val,nbytes); gasneti_iop_t *iop = gasneti_iop_register(1, 0 GASNETI_THREAD_PASS); gex_AM_RequestShort(gasneti_thunk_tm, node, gasneti_handleridx(gasneti_legacy_memset_reqreph), 0, (gex_AM_Arg_t)val, PACK(nbytes), PACK(dest), PACK(iop)); return 0; } static gex_AM_Entry_t _gasneti_legacy_handlers[] = { gasneti_handler_tableentry_with_bits(gasneti_legacy_memset_reqreph,4,7,REQREP,SHORT,0), GASNETI_HANDLER_EOT }; static gex_AM_Entry_t *gasneti_legacy_handlers = _gasneti_legacy_handlers; gasnet-2025.8.0/mpi-conduit/0000775000175000017500000000000015142313673015652 5ustar alastairalastairgasnet-2025.8.0/mpi-conduit/conduit.mak.in0000664000175000017500000000234115142313673020416 0ustar alastairalastair#INSTRUCTIONS# Conduit-specific Makefile fragment settings #INSTRUCTIONS# #INSTRUCTIONS# The contents of this file are embedded into the #INSTRUCTIONS# *-(seq,par,parsync).mak Makefile fragments at conduit build time #INSTRUCTIONS# The settings in those fragments are used to build GASNet clients #INSTRUCTIONS# (including the GASNet tests). #INSTRUCTIONS# See the conduit-writer instructions in the generated fragments #INSTRUCTIONS# or $(top_srcdir)/other/fragment-head.mak.in for usage info. # AMMPI is MPI-based, which requires us to link using the system MPI compiler GASNET_LD_OVERRIDE = @MPI_CC@ GASNET_LDFLAGS_OVERRIDE = @MPI_CFLAGS@ @LDFLAGS@ # Linker feature requirements embedded in GASNET_LD(FLAGS) which are not satisfied solely by GASNET_LIBS # (eg possible dependence on implicit MPI or C++ libraries added by a linker wrapper in GASNET_LD): GASNET_LD_REQUIRES_MPI = 1 # hooks for using AMMPI library from within build tree ###NOINSTALL### # (nothing additional required for installed copy) ###NOINSTALL### CONDUIT_INCLUDES = -I@TOP_SRCDIR@/other/ammpi -I@TOP_BUILDDIR@/other/ammpi ###NOINSTALL### CONDUIT_LIBDIRS = -L@TOP_BUILDDIR@/other/ammpi ###NOINSTALL### CONDUIT_LIBS = $(CONDUIT_LIBDIRS) -lammpi @MPI_LIBS@ gasnet-2025.8.0/mpi-conduit/gasnet_core_fwd.h0000664000175000017500000002243515142313673021162 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/mpi-conduit/gasnet_core_fwd.h $ * Description: GASNet header for MPI conduit core (forward definitions) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_FWD_H #define _GASNET_CORE_FWD_H #define GASNET_CORE_VERSION AMMPI_LIBRARY_VERSION #define GASNET_CORE_VERSION_STR _STRINGIFY(GASNET_CORE_VERSION) #define GASNET_CORE_NAME MPI #define GASNET_CORE_NAME_STR _STRINGIFY(GASNET_CORE_NAME) #define GASNET_CONDUIT_NAME GASNET_CORE_NAME #define GASNET_CONDUIT_NAME_STR _STRINGIFY(GASNET_CONDUIT_NAME) #define GASNET_CONDUIT_MPI 1 //#define GASNETC_DEFAULT_SPAWNER ### /* GASNET_PSHM defined 1 if this conduit supports PSHM. leave undefined otherwise. */ #if GASNETI_PSHM_ENABLED #define GASNET_PSHM 1 #endif /* defined to be 1 if gasnet_init guarantees that the remote-access memory segment will be aligned */ /* at the same virtual address on all nodes. defined to 0 otherwise */ #if GASNETI_DISABLE_ALIGNED_SEGMENTS || GASNET_PSHM #define GASNET_ALIGNED_SEGMENTS 0 /* user or PSHM disabled segment alignment */ #else /* mpi-conduit supports both aligned and un-aligned */ #if defined(HAVE_MMAP) && !PLATFORM_ARCH_CRAYX1 #define GASNET_ALIGNED_SEGMENTS 1 #else #define GASNET_ALIGNED_SEGMENTS 0 #endif #endif // If this conduit is considered a "portable conduit" only *conditionally*, // uncomment to enable calls to gasnetc_check_portable_conduit(void) as // described in gasnet_internal.c. //#define GASNETC_CHECK_PORTABLE_CONDUIT_HOOK 1 // uncomment for each MK_CLASS which the conduit supports. leave commented otherwise //#define GASNET_HAVE_MK_CLASS_CUDA_UVA GASNETI_MK_CLASS_CUDA_UVA_ENABLED //#define GASNET_HAVE_MK_CLASS_HIP GASNETI_MK_CLASS_HIP_ENABLED //#define GASNET_HAVE_MK_CLASS_ZE GASNETI_MK_CLASS_ZE_ENABLED // define to 1 if your conduit has "private" thread(s) which can run AM handlers //#define GASNET_RCV_THREAD 1 // define to 1 if your conduit has "private" thread(s) which progress sends of RMA and/or AM //#define GASNET_SND_THREAD 1 /* uncomment if your conduit has "private" threads which might run conduit code and/or the client's AM handlers, even under GASNET_SEQ. this ensures locking is still done correctly, etc */ //#define GASNETI_CONDUIT_THREADS 1 /* define these to 1 if your conduit needs to augment the implementation of gasneti_reghandler() (in gasnet_internal.c) */ #define GASNETC_AMREGISTER 1 /* define this to 1 if your conduit supports PSHM, but cannot use the default interfaces. (see template-conduit/gasnet_core.c and gasnet_pshm.h) */ /* #define GASNETC_GET_HANDLER 1 */ /* uncomment each line for which your conduit supports the corresponding token info query. */ #define GASNET_SUPPORTS_TI_SRCRANK 1 #define GASNET_SUPPORTS_TI_EP 1 #define GASNET_SUPPORTS_TI_ENTRY 1 #define GASNET_SUPPORTS_TI_IS_REQ 1 #define GASNET_SUPPORTS_TI_IS_LONG 1 /* uncomment for each {Request,Reply} X {Medium,Long} pair for which your conduit implements the corresponding gasnetc_AM_{Prepare,Commit}*() in a "native" manner which "can avoid one or more payload copies relative to the corresponding fixed-payload AM call under the right conditions". See also "GASNETC_BUILD_NP_*", immediately below. */ /* #define GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM 1 */ /* #define GASNET_NATIVE_NP_ALLOC_REP_MEDIUM 1 */ /* #define GASNET_NATIVE_NP_ALLOC_REQ_LONG 1 */ /* #define GASNET_NATIVE_NP_ALLOC_REP_LONG 1 */ /* conduits may define to '1' (or '0') for {Request,Reply} X {Medium,Long} pairs to force (or prevent) compilation of the corresponding pieces of the conduit-independent reference implementation. If unset, the default is equivalent to '!GASNET_NATIVE_NP_ALLOC_[foo]'. In other words: by default each reference implementation is built if and only if the conduit is not claiming a "native" implementation. This default is correct for most conduits. The conduit-independent implementation works in terms of the internal functions gasnetc_AM{Request,Reply}{Medium,Long}V(). Therefore, your conduit must provide the V-suffixed functions for any case with the corresponding GASNETC_BUILD_NP_* equal to '1' (explicitly or by default). */ /* #define GASNETC_BUILD_NP_REQ_MEDIUM (###) */ /* #define GASNETC_BUILD_NP_REP_MEDIUM (###) */ /* #define GASNETC_BUILD_NP_REQ_LONG (###) */ /* #define GASNETC_BUILD_NP_REP_LONG (###) */ /* uncomment for each conduit-provided Commit{Req,Rep}{Medium,Long}() which has the numargs argument even in an NDEBUG build (it is always passed in DEBUG builds). */ //#define GASNETC_AM_COMMIT_REQ_MEDIUM_NARGS 1 //#define GASNETC_AM_COMMIT_REP_MEDIUM_NARGS 1 //#define GASNETC_AM_COMMIT_REQ_LONG_NARGS 1 //#define GASNETC_AM_COMMIT_REP_LONG_NARGS 1 /* uncomment if your conduit's gasnetc_AMRequest{Short,Medium,Long}V() include a call to gasneti_AMPoll (or equivalent) for progress. The preferred implementation is to Poll only in the M-suffixed calls and not the V-suffixed calls (and GASNETC_REQUESTV_POLLS undefined). Used only by reference implementations (if any) of Prepare/Commit. */ #define GASNETC_REQUESTV_POLLS 1 /* If your conduit uses conduit-specific extensions to the basic object types, then define the corresponding SIZEOF macros below to return the total length of the conduit-specific object, including the prefix portion which must be the matching GASNETI_[OBJECT]_COMMON fields. Similarly, *_HOOK macros should be defined as callbacks to perform conduit-specific initialization and finalization tasks, if any. If a given SIZEOF macro is defined, but the corresponding INIT_HOOK is not, then space beyond the COMMON fields will be zero-initialized. In all cases, GASNETC_[OBJECT]_EXTRA_DECLS provides the place to provide necessary declarations (since this file is included very early). */ //#define GASNETC_CLIENT_EXTRA_DECLS (###) //#define GASNETC_CLIENT_INIT_HOOK(i_client) (###) //#define GASNETC_CLIENT_FINI_HOOK(i_client) (###) //#define GASNETC_SIZEOF_CLIENT_T() (###) //#define GASNETC_SEGMENT_EXTRA_DECLS (###) //#define GASNETC_SEGMENT_INIT_HOOK(i_segment) (###) //#define GASNETC_SEGMENT_FINI_HOOK(i_segment) (###) //#define GASNETC_SIZEOF_SEGMENT_T() (###) //#define GASNETC_TM_EXTRA_DECLS (###) //#define GASNETC_TM_INIT_HOOK(i_tm) (###) //#define GASNETC_TM_FINI_HOOK(i_tm) (###) //#define GASNETC_SIZEOF_TM_T() (###) //#define GASNETC_EP_EXTRA_DECLS (###) //#define GASNETC_EP_INIT_HOOK(i_ep) (###) //#define GASNETC_EP_FINI_HOOK(i_ep) (###) //#define GASNETC_SIZEOF_EP_T() (###) // Uncomment the following defines if conduit provides the corresponding hook. // See gasnet_internal.h for prototypes and brief descriptions. //#define GASNETC_SEGMENT_ATTACH_HOOK 1 //#define GASNETC_SEGMENT_CREATE_HOOK 1 //#define GASNETC_SEGMENT_DESTROY_HOOK 1 //#define GASNETC_EP_BINDSEGMENT_HOOK 1 //#define GASNETC_EP_PUBLISHBOUNDSEGMENT_HOOK 1 // Uncomment the following defines if conduit provides the corresponding hook. // See other/kinds/gasnet_kinds_internal.h for prototypes and brief descriptions. //#define GASNETC_MK_CREATE_HOOK 1 //#define GASNETC_MK_DESTROY_HOOK 1 /* mpi-conduit supports top-level poll throttling */ #define GASNETC_USING_SUSPEND_RESUME 1 /* enable usage correctness checking on HSL's and no-interrupt sections */ #ifndef GASNETC_HSL_ERRCHECK #define GASNETC_HSL_ERRCHECK GASNETI_DEBUG_P #endif /* override default error values to use those defined by AMMPI */ #define _GASNET_ERRORS #define _GASNET_ERR_BASE 10000 #define GASNET_ERR_NOT_INIT 1 #define GASNET_ERR_RESOURCE 3 #define GASNET_ERR_BAD_ARG 2 #define GASNET_ERR_NOT_READY (_GASNET_ERR_BASE+4) #define GASNET_ERR_BARRIER_MISMATCH (_GASNET_ERR_BASE+5) // If conduit supports GASNET_MAXEPS!=1, set default and (optional) max values here. // Leaving GASNETC_MAXEPS_DFLT unset will result in GASNET_MAXEPS=1, independent // of all other settings (appropriate for conduits without multi-ep support). // If set, GASNETC_MAXEPS_MAX it is used to limit a user's --with-maxeps (and a // global default limit is used otherwise). //#define GASNETC_MAXEPS_DFLT ### // default num endpoints this conduit supports, undef means no multi-ep support //#define GASNETC_MAXEPS_MAX ### // leave unset for default /* this can be used to add conduit-specific statistical collection values (see gasnet_trace.h) */ #define GASNETC_CONDUIT_STATS(CNT,VAL,TIME) #define GASNETC_FATALSIGNAL_CALLBACK(sig) gasnetc_fatalsignal_callback(sig) extern void gasnetc_fatalsignal_callback(int _sig); /* hook getSegmentInfo for NIS check */ #define _GASNET_GETSEGMENTINFO struct gasneti_seginfo_s; extern int gasnetc_getSegmentInfo(struct gasneti_seginfo_s *_seginfo_table, int _numentries); #define gasnet_getSegmentInfo(seginfo_table, numentries) \ gasnetc_getSegmentInfo(seginfo_table, numentries) // No validated support for hugetlbfs w/ or w/o PSHM at this time and risk of // issues if auto-enabled on an HPE Cray EX system (e.g. bug 4473). #if GASNETI_ARCH_CRAYEX #undef GASNETI_USE_HUGETLBFS #endif #endif gasnet-2025.8.0/mpi-conduit/gasnet_core.h0000664000175000017500000001467115142313673020325 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/mpi-conduit/gasnet_core.h $ * Description: GASNet header for MPI conduit core * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_H #define _GASNET_CORE_H #include #include /* TODO enhance AMMPI to support thread-safe MPI libraries */ /* TODO add MPI bypass to loopback messages */ /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ extern void gasnetc_exit(int _exitcode) GASNETI_NORETURN; GASNETI_NORETURNP(gasnetc_exit) #define gasnet_exit gasnetc_exit /* Some conduits permit gasnet_init(NULL,NULL). Define to 1 if this conduit supports this extension, or to 0 otherwise. */ #if (GASNETI_MPI_VERSION >= 2) #define GASNET_NULL_ARGV_OK 1 #else #define GASNET_NULL_ARGV_OK 0 #endif /* ------------------------------------------------------------------------------------ */ extern int gasnetc_Client_Init( gex_Client_t *_client_p, gex_EP_t *_ep_p, gex_TM_t *_tm_p, const char *_clientName, int *_argc, char ***_argv, gex_Flags_t _flags); // gasnetex.h handles name-shifting of gex_Client_Init() /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ #if GASNETC_HSL_ERRCHECK /* "magic" tag bit patterns that let us probabilistically detect the attempted use of uninitialized locks, or re-initialization of locks */ #define GASNETC_HSL_ERRCHECK_TAGINIT ((uint64_t)0x5C9B5F7E9272EBA5ULL) #define GASNETC_HSL_ERRCHECK_TAGDYN ((uint64_t)0xB82F6C0DE19C8F3DULL) #endif typedef struct gasneti_hsl_s { gasneti_mutex_t lock; #if GASNETI_STATS_OR_TRACE gasneti_tick_t acquiretime; #endif #if GASNETC_HSL_ERRCHECK uint64_t tag; int islocked; gasneti_tick_t timestamp; struct gasneti_hsl_s *next; #endif } gex_HSL_t; #if GASNETI_STATS_OR_TRACE #define GASNETC_LOCK_STAT_INIT ,0 #else #define GASNETC_LOCK_STAT_INIT #endif #if GASNETC_HSL_ERRCHECK #define GASNETC_LOCK_ERRCHECK_INIT , GASNETC_HSL_ERRCHECK_TAGINIT, 0, 0, NULL #else #define GASNETC_LOCK_ERRCHECK_INIT #endif #define GEX_HSL_INITIALIZER { \ GASNETI_MUTEX_INITIALIZER \ GASNETC_LOCK_STAT_INIT \ GASNETC_LOCK_ERRCHECK_INIT \ } /* decide whether we have "real" HSL's */ #if GASNETI_THREADS || /* need for safety */ \ GASNET_DEBUG || GASNETI_STATS_OR_TRACE /* or debug/tracing */ #ifdef GASNETC_NULL_HSL #error bad defn of GASNETC_NULL_HSL #endif #else #define GASNETC_NULL_HSL 1 #endif #if GASNETC_NULL_HSL /* HSL's unnecessary - compile away to nothing */ #define gex_HSL_Init(hsl) #define gex_HSL_Destroy(hsl) #define gex_HSL_Lock(hsl) #define gex_HSL_Unlock(hsl) #define gex_HSL_Trylock(hsl) GASNET_OK #else extern void gasnetc_hsl_init (gex_HSL_t *_hsl); extern void gasnetc_hsl_destroy(gex_HSL_t *_hsl); extern void gasnetc_hsl_lock (gex_HSL_t *_hsl); extern void gasnetc_hsl_unlock (gex_HSL_t *_hsl); extern int gasnetc_hsl_trylock(gex_HSL_t *_hsl) GASNETI_WARN_UNUSED_RESULT; #define gex_HSL_Init gasnetc_hsl_init #define gex_HSL_Destroy gasnetc_hsl_destroy #define gex_HSL_Lock gasnetc_hsl_lock #define gex_HSL_Unlock gasnetc_hsl_unlock #define gex_HSL_Trylock gasnetc_hsl_trylock #endif #if GASNET_PSHM && GASNETC_HSL_ERRCHECK && !GASNETC_NULL_HSL extern void gasnetc_enteringHandler_hook_hsl(int _cat, int _isReq, int _handlerId, gex_Token_t _token, void *_buf, size_t _nbytes, int _numargs, gex_AM_Arg_t *_args); extern void gasnetc_leavingHandler_hook_hsl(int _cat, int _isReq); #define GASNETC_ENTERING_HANDLER_HOOK gasnetc_enteringHandler_hook_hsl #define GASNETC_LEAVING_HANDLER_HOOK gasnetc_leavingHandler_hook_hsl #endif /* ------------------------------------------------------------------------------------ */ /* Active Message Size Limits ========================== */ #define gex_AM_MaxArgs() ((unsigned int)AM_MaxShort()) #define gex_AM_LUBRequestMedium() ((size_t)MIN(AM_MaxMedium(), GASNETC_MAX_MEDIUM_NBRHD_DFLT)) #define gex_AM_LUBReplyMedium() ((size_t)MIN(AM_MaxMedium(), GASNETC_MAX_MEDIUM_NBRHD_DFLT)) #define gex_AM_LUBRequestLong() ((size_t)AM_MaxLong()) #define gex_AM_LUBReplyLong() ((size_t)AM_MaxLong()) // TODO-EX: Can these be improved upon, at least for PSHM case #define gasnetc_AM_MaxRequestMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS5(tm,rank,lc_opt,flags,nargs),gex_AM_LUBRequestMedium()) #define gasnetc_AM_MaxReplyMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS5(tm,rank,lc_opt,flags,nargs),gex_AM_LUBReplyMedium()) #define gasnetc_Token_MaxReplyMedium(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(token,lc_opt,flags,nargs),gex_AM_LUBReplyMedium()) #define gasnetc_AM_MaxRequestLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBRequestLong())) #define gasnetc_AM_MaxReplyLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBReplyLong())) #define gasnetc_Token_MaxReplyLong(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS3(token,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBReplyLong())) /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #define GASNET_BLOCKUNTIL(cond) gasneti_polluntil(cond) /* ------------------------------------------------------------------------------------ */ #endif #include gasnet-2025.8.0/mpi-conduit/gasnet_core.c0000664000175000017500000013457715142313673020330 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/mpi-conduit/gasnet_core.c $ * Description: GASNet MPI conduit Implementation * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include #include #include #include #include #include #include #include GASNETI_IDENT(gasnetc_IdentString_Version, "$GASNetCoreLibraryVersion: " GASNET_CORE_VERSION_STR " $"); GASNETI_IDENT(gasnetc_IdentString_Name, "$GASNetCoreLibraryName: " GASNET_CORE_NAME_STR " $"); gex_AM_Entry_t *gasnetc_handler; // TODO-EX: will be replaced with per-EP tables static void gasnetc_traceoutput(int); eb_t gasnetc_bundle; ep_t gasnetc_endpoint; gasneti_mutex_t gasnetc_AMlock = GASNETI_MUTEX_INITIALIZER; /* protect access to AMMPI */ #if GASNETC_HSL_ERRCHECK || GASNET_TRACE || GASNET_DEBUG extern void gasnetc_enteringHandler_hook(ammpi_category_t cat, int isReq, int handlerId, void *token, void *buf, size_t nbytes, int numargs, uint32_t *args); extern void gasnetc_leavingHandler_hook(ammpi_category_t cat, int isReq); #endif #if GASNETC_HSL_ERRCHECK /* check a call is legally outside Handler Context or HSL */ void gasnetc_checkcallHC(void); void gasnetc_checkcallHSL(void); void gasnetc_hsl_attach(void); #define CHECKCALLHC() gasnetc_checkcallHC() #define CHECKCALLHSL() gasnetc_checkcallHSL() #else #define CHECKCALLHC() #define CHECKCALLHSL() #endif /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* called at startup to check configuration sanity */ static void gasnetc_check_config(void) { gasneti_check_config_preinit(); gasneti_static_assert(GASNET_MAXNODES <= AMMPI_MAX_SPMDPROCS); gasneti_static_assert(AMMPI_MAX_NUMHANDLERS >= 256); gasneti_static_assert(AMMPI_MAX_SEGLENGTH == (uintptr_t)-1); gasneti_static_assert(GASNET_ERR_NOT_INIT == AM_ERR_NOT_INIT); gasneti_static_assert(GASNET_ERR_RESOURCE == AM_ERR_RESOURCE); gasneti_static_assert(GASNET_ERR_BAD_ARG == AM_ERR_BAD_ARG); #if GASNET_PSHM gasneti_static_assert(gasneti_Short == (gasneti_category_t) ammpi_Short); gasneti_static_assert(gasneti_Medium == (gasneti_category_t) ammpi_Medium); gasneti_static_assert(gasneti_Long == (gasneti_category_t) ammpi_Long); #endif } void gasnetc_bootstrapBarrier(void) { int retval; AM_ASSERT_LOCKED(); /* need this because SPMDBarrier may poll */ GASNETI_AM_SAFE_NORETURN(retval,AMMPI_SPMDBarrier()); if_pf (retval) gasneti_fatalerror("failure in gasnetc_bootstrapBarrier()"); } void gasnetc_bootstrapExchange(void *src, size_t len, void *dest) { int retval; GASNETI_AM_SAFE_NORETURN(retval,AMMPI_SPMDAllGather(src, dest, len)); if_pf (retval) gasneti_fatalerror("failure in gasnetc_bootstrapExchange()"); } void gasnetc_bootstrapBroadcast(void *src, size_t len, void *dest, int rootnode) { int retval; gasneti_assert(gasneti_nodes > 0); gasneti_assert_uint(gasneti_mynode ,<, gasneti_nodes); if (gasneti_mynode == rootnode) GASNETI_MEMCPY_SAFE_IDENTICAL(dest, src, len); GASNETI_AM_SAFE_NORETURN(retval,AMMPI_SPMDBroadcast(dest, len, rootnode)); if_pf (retval) gasneti_fatalerror("failure in gasnetc_bootstrapBroadcast()"); } #if GASNET_PSHM // Currently used only in call to gasneti_pshm_init() // Naive (poorly scaling) "reference" SubsetBroadcast via AMMPI_SPMDAllGather() // Since every caller extracts the desired rootnode's contribution from an // AllGather, the NbrhdBroadcast and HostBroadcast are identical. static void gasnetc_bootstrapSubsetBroadcast(void *src, size_t len, void *dest, int rootnode) { void *tmp = gasneti_malloc(len * gasneti_nodes); void *self = src ? src : gasneti_malloc(len); /* Ensure never NULL */ if (gasneti_mynode != rootnode) { // silence a harmless valgrind error caused by sending potentially uninitialized bytes memset(self, 0, len); } gasnetc_bootstrapExchange(self, len, tmp); GASNETI_MEMCPY(dest, (void*)((uintptr_t)tmp + (len * rootnode)), len); if (self != src) gasneti_free(self); gasneti_free(tmp); } #define gasnetc_bootstrapNbrhdBroadcast gasnetc_bootstrapSubsetBroadcast #define gasnetc_bootstrapHostBroadcast gasnetc_bootstrapSubsetBroadcast #endif #define INITERR(type, reason) do { \ if (gasneti_VerboseErrors) { \ gasneti_console_message("ERROR","GASNet initialization encountered an error: %s\n" \ " in %s at %s:%i", \ #reason, GASNETI_CURRENT_FUNCTION, __FILE__, __LINE__); \ } \ retval = GASNET_ERR_ ## type; \ goto done; \ } while (0) static int gasnetc_init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { int retval = GASNET_OK; int networkdepth = 0; const char *pstr = NULL; const char *tmsgstr = NULL; AMLOCK(); if (gasneti_init_done) INITERR(NOT_INIT, "GASNet already initialized"); gasneti_init_done = 1; /* enable early to allow tracing */ /* check system sanity */ gasnetc_check_config(); gasneti_freezeForDebugger(); #if GASNET_DEBUG_VERBOSE gasneti_console_message("gasnetc_init","about to spawn..."); #endif /* choose network depth */ networkdepth = gasnett_getenv_int_withdefault("GASNET_NETWORKDEPTH", GASNETC_DEFAULT_NETWORKDEPTH, 0); if (networkdepth <= 1) networkdepth = GASNETC_DEFAULT_NETWORKDEPTH; AMX_VerboseErrors = gasneti_VerboseErrors; AMMPI_SPMDkillmyprocess = gasneti_killmyprocess; #if !GASNETI_DISABLE_MPI_INIT_THREAD { // this scope silences a warning on Cray C about INITERR bypassing this initialization: #if GASNETI_THREADS int usingthreads = 1; #define GASNETI_THREADMODE_MSG \ "*** WARNING: The thread-safe version of mpi-conduit recommends an MPI implementation\n" \ "*** WARNING: which supports at least MPI_THREAD_SERIALIZED to ensure correct operation.\n" #else int usingthreads = 0; #define GASNETI_THREADMODE_MSG #endif // for verbose documentation only: gasnett_getenv_withdefault("GASNET_MPI_THREAD", (usingthreads?"MPI_THREAD_SERIALIZED":"MPI_THREAD_SINGLE")); if (!AMMPI_SPMDSetThreadMode(usingthreads, &pstr, argc, argv)) { // Some versions of MPI lie and report THREAD_SINGLE, when in actuality MPI_THREAD_SERIALIZED seems to work just fine. // User can ignore this warning or hide it by setting GASNET_MPI_THREAD or GASNET_QUIET if they want to "live dangerously". static char tmsg[1024]; snprintf(tmsg, sizeof(tmsg), "This MPI implementation reports it can only support %s.\n" GASNETI_THREADMODE_MSG "*** WARNING: You can override the requested thread mode by setting GASNET_MPI_THREAD." , pstr); tmsgstr = tmsg; } } #endif /* perform job spawn */ retval = AMMPI_SPMDStartup(argc, argv, networkdepth, NULL, &gasnetc_bundle, &gasnetc_endpoint); if (retval != AM_OK) INITERR(RESOURCE, "AMMPI_SPMDStartup() failed"); gasneti_mynode = AMMPI_SPMDMyProc(); gasneti_nodes = AMMPI_SPMDNumProcs(); /* a number of MPI job spawners fail to propagate the environment to all compute nodes */ /* do this before trace_init to make sure it gets right environment */ gasneti_setupGlobalEnvironment(gasneti_nodes, gasneti_mynode, gasnetc_bootstrapExchange, gasnetc_bootstrapBroadcast); /* Must init timers after global env, and preferably before tracing */ GASNETI_TICKS_INIT(); /* enable tracing */ gasneti_trace_init(argc, argv); GASNETI_AM_SAFE(AMMPI_SPMDSetExitCallback(gasnetc_traceoutput)); if (pstr) GASNETI_TRACE_PRINTF(C,("AMMPI_SPMDSetThreadMode/MPI_Init_thread()=>%s",pstr)); if (tmsgstr) { if (gasneti_getenv_yesno_withdefault("GASNET_QUIET",0)) GASNETI_TRACE_PRINTF(I,("*** WARNING: %s",tmsgstr)); else gasneti_console0_message("WARNING","%s",tmsgstr); } gasneti_spawn_verbose = gasneti_getenv_yesno_withdefault("GASNET_SPAWN_VERBOSE",0); if (gasneti_spawn_verbose) { gasneti_console_message("gasnetc_init","spawn successful - proc %i/%i starting...", gasneti_mynode, gasneti_nodes); } gasneti_nodemapInit(&gasnetc_bootstrapExchange, NULL, 0, 0); #if GASNET_PSHM gasneti_pshm_init(&gasnetc_bootstrapNbrhdBroadcast, 0); #endif // Create first Client, EP and TM *here*, for use in subsequent bootstrap communication { // allocate the client object gasneti_Client_t client = gasneti_alloc_client(clientName, flags); *client_p = gasneti_export_client(client); // create the initial endpoint with internal handlers if (gex_EP_Create(ep_p, *client_p, GEX_EP_CAPABILITY_ALL, flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error creating initial endpoint"); gasneti_EP_t ep = gasneti_import_ep(*ep_p); gasnetc_handler = ep->_amtbl; // TODO-EX: this global variable to be removed // create the tm gasneti_TM_t tm = gasneti_alloc_tm(ep, gasneti_mynode, gasneti_nodes, flags); *tm_p = gasneti_export_tm(tm); } gasnetc_bootstrapBarrier(); gasneti_attach_done = 1; // Ready to use AM Short and Medium for bootstrap comms uintptr_t mmap_limit; #if HAVE_MMAP { AMUNLOCK(); // Bound per-host (sharedLimit) argument to gasneti_segmentLimit() // while properly reserving space for aux segments. uint64_t sharedLimit = gasneti_sharedLimit(); uint64_t hostAuxSegs = gasneti_myhost.node_count * gasneti_auxseg_preinit(); if (sharedLimit <= hostAuxSegs) { gasneti_fatalerror("per-host segment limit %"PRIu64" is too small to accommodate %i aux segments, " "total size %"PRIu64". You may need to adjust OS shared memory limits.", sharedLimit, gasneti_myhost.node_count, hostAuxSegs); } sharedLimit -= hostAuxSegs; mmap_limit = gasneti_segmentLimit((uintptr_t)-1, sharedLimit, NULL, NULL); AMLOCK(); } #else // TODO-EX: we can at least look at rlimits but such logic belongs in conduit-indep code mmap_limit = (intptr_t)-1; #endif /* allocate and attach an aux segment */ (void) gasneti_auxsegAttach((uintptr_t)-1, &gasnetc_bootstrapExchange); /* determine Max{Local,GLobal}SegmentSize */ gasneti_segmentInit(mmap_limit, &gasnetc_bootstrapExchange, flags); AMUNLOCK(); gasneti_assert(retval == GASNET_OK); return retval; done: /* error return while locked */ AMUNLOCK(); GASNETI_RETURN(retval); } /* ------------------------------------------------------------------------------------ */ extern int gasnetc_amregister(gex_AM_Index_t index, gex_AM_Entry_t *entry) { // NOTE: we do not currently attempt to hold the AMLOCK if (AM_SetHandler(gasnetc_endpoint, (handler_t)index, entry->gex_fnptr) != AM_OK) GASNETI_RETURN_ERRR(RESOURCE, "AM_SetHandler() failed while registering handlers"); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ extern int gasnetc_attach_primary(gex_Flags_t flags) { int retval = GASNET_OK; AMLOCK(); /* pause to make sure all nodes have called attach if a node calls gasnet_exit() between init/attach, then this allows us to process the AMMPI_SPMD control messages required for job shutdown */ gasnetc_bootstrapBarrier(); /* ------------------------------------------------------------------------------------ */ /* register fatal signal handlers */ /* catch fatal signals and convert to SIGQUIT */ gasneti_registerSignalHandlers(gasneti_defaultSignalHandler); // register process exit-time hook gasneti_registerExitHandler(gasnetc_exit); // register all of memory as the AMX-level segment // this is needed for multi-segment support (aux + client at a minimum) retval = AM_SetSeg(gasnetc_endpoint, NULL, (uintptr_t)-1); if (retval != AM_OK) INITERR(RESOURCE, "AM_SetSeg() failed"); #if GASNETC_HSL_ERRCHECK || GASNET_TRACE || GASNET_DEBUG #if !(GASNETC_HSL_ERRCHECK || GASNET_DEBUG) if (GASNETI_TRACE_ENABLED(A)) #endif GASNETI_AM_SAFE(AMMPI_SetHandlerCallbacks(gasnetc_endpoint, gasnetc_enteringHandler_hook, gasnetc_leavingHandler_hook)); #endif #if GASNETC_HSL_ERRCHECK // Historically needed to precede attach_done to avoid inf recursion on // malloc/hold_interrupts. That is *probably* no longer the case, but this // is still a reasonable place to initialize. gasnetc_hsl_attach(); #endif /* ------------------------------------------------------------------------------------ */ /* primary attach complete */ gasneti_attach_done = 1; gasnetc_bootstrapBarrier(); AMUNLOCK(); GASNETI_TRACE_PRINTF(C,("gasnetc_attach_primary(): primary attach complete\n")); gasnete_init(); /* init the extended API */ gasneti_nodemapFini(); /* ensure extended API is initialized across nodes */ AMLOCK(); gasnetc_bootstrapBarrier(); AMUNLOCK(); gasneti_assert(retval == GASNET_OK); return retval; done: /* error return while locked */ AMUNLOCK(); GASNETI_RETURN(retval); } /* ------------------------------------------------------------------------------------ */ // TODO-EX: this is a candidate for factorization (once we understand the per-conduit variations) extern int gasnetc_Client_Init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { gasneti_assert(client_p); gasneti_assert(ep_p); gasneti_assert(tm_p); gasneti_assert(clientName); #if !GASNET_NULL_ARGV_OK gasneti_assert(argc); gasneti_assert(argv); #endif // main init // TODO-EX: must split off per-client and per-endpoint portions if (!gasneti_init_done) { // First client // NOTE: gasnetc_init() creates the first Client, EP and TM for use in bootstrap comms int retval = gasnetc_init(client_p, ep_p, tm_p, clientName, argc, argv, flags); if (retval != GASNET_OK) GASNETI_RETURN(retval); #if 0 /* called within gasnetc_init to allow init tracing */ gasneti_trace_init(argc, argv); #endif } else { gasneti_fatalerror("No multi-client support"); } // Do NOT move this prior to the gasneti_trace_init() call GASNETI_TRACE_PRINTF(O,("gex_Client_Init: name='%s' argc_p=%p argv_p=%p flags=%d", clientName, (void *)argc, (void *)argv, flags)); if (0 == (flags & GASNETI_FLAG_INIT_LEGACY)) { /* primary attach */ if (GASNET_OK != gasnetc_attach_primary(flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error in primary attach"); /* ensure everything is initialized across all nodes */ gasnet_barrier(0, GASNET_BARRIERFLAG_UNNAMED); } else { gasneti_attach_done = 0; // Pending client call to gasnet_attach() } return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ static int gasnetc_exitcalled = 0; static void gasnetc_traceoutput(int exitcode) { if (!gasnetc_exitcalled) { gasneti_flush_streams(); gasneti_trace_finish(); } } extern void gasnetc_fatalsignal_callback(int sig) { if (gasnetc_exitcalled) { /* if we get a fatal signal during exit, it's almost certainly a signal-safety or network shutdown issue and not a client bug, so don't bother reporting it verbosely, just die silently */ #if 0 gasneti_fatalerror("gasnetc_fatalsignal_callback aborting..."); #endif gasneti_killmyprocess(1); } } extern void gasnetc_exit(int exitcode) { /* once we start a shutdown, ignore all future SIGQUIT signals or we risk reentrancy */ gasneti_reghandler(SIGQUIT, SIG_IGN); gasnetc_exitcalled = 1; { /* ensure only one thread ever continues past this point */ static gasneti_mutex_t exit_lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&exit_lock); } if (gasneti_spawn_verbose) gasneti_console_message("EXIT STATE","gasnet_exit(%i)",exitcode); else GASNETI_TRACE_PRINTF(C,("gasnet_exit(%i)\n", exitcode)); #ifdef GASNETE_EXIT_CALLBACK /* callback for native conduits using an mpi-conduit core this should cleanup extended API resources (only) and then return so that MPI can be shutdown properly */ GASNETE_EXIT_CALLBACK(exitcode); #endif gasneti_flush_streams(); gasneti_trace_finish(); gasneti_sched_yield(); { int i; /* try to prevent races where we exit while other local pthreads are in MPI can't use a blocking lock here, because may be in a signal context */ for (i=0; i < 5; i++) { #if GASNET_DEBUG /* ignore recursive lock attempts */ if (_gasneti_mutex_heldbyme(&gasnetc_AMlock)) break; #endif if (!gasneti_mutex_trylock(&gasnetc_AMlock)) break; else gasneti_sched_yield(); } } AMMPI_SPMDExit(exitcode); gasneti_fatalerror("AMMPI_SPMDExit failed"); } /* ------------------------------------------------------------------------------------ */ /* Job Environment Queries ======================= */ extern int gasneti_getSegmentInfo(gasnet_seginfo_t *seginfo_table, int numentries); extern int gasnetc_getSegmentInfo(gasnet_seginfo_t *seginfo_table, int numentries) { CHECKCALLHC(); return gasneti_getSegmentInfo(seginfo_table, numentries); } /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #if GASNET_PSHM /* (###) GASNETC_GET_HANDLER * If your conduit will support PSHM, then there needs to be a way * for PSHM to see your handler table. If you use the recommended * implementation then you don't need to do anything special. * Othwerwise, #define GASNETC_GET_HANDLER in gasnet_core_fwd.h and * implement gasnetc_get_handler() as a macro in * gasnet_core_internal.h */ #endif GASNETI_INLINE(gasnetc_msgsource) gex_Rank_t gasnetc_msgsource(gex_Token_t token) { gasneti_assert(! gasnetc_token_in_nbrhd(token)); gasneti_assert(token); int tmp; /* AMMPI wants an int, but gex_Rank_t is uint32_t */ gasneti_assert_zeroret(AMMPI_GetSourceId(token, &tmp)); gasneti_assert(tmp >= 0); gex_Rank_t sourceid = tmp; gasneti_assert_uint(sourceid ,<, gasneti_nodes); return sourceid; } extern gex_TI_t gasnetc_Token_Info( gex_Token_t token, gex_Token_Info_t *info, gex_TI_t mask) { gasneti_assert(token); gasneti_assert(info); if (gasnetc_token_in_nbrhd(token)) { return gasnetc_nbrhd_Token_Info(token, info, mask); } gex_TI_t result = 0; info->gex_srcrank = gasnetc_msgsource(token); result |= GEX_TI_SRCRANK; info->gex_ep = gasneti_THUNK_EP; result |= GEX_TI_EP; if (mask & (GEX_TI_ENTRY|GEX_TI_IS_REQ|GEX_TI_IS_LONG)) { handler_t index; ammpi_category_t category; int is_req; gasneti_assert_zeroret(AMMPI_GetTokenInfo(token,&index,&category,&is_req)); info->gex_entry = gasneti_import_ep(gasneti_THUNK_EP)->_amtbl + index; result |= GEX_TI_ENTRY; info->gex_is_req = is_req; result |= GEX_TI_IS_REQ; info->gex_is_long = (category == ammpi_Long); result |= GEX_TI_IS_LONG; } return GASNETI_TOKEN_INFO_RETURN(result, info, mask); } extern int gasnetc_AMPoll(GASNETI_THREAD_FARG_ALONE) { GASNETI_CHECKATTACH(); CHECKCALLHC(); #if GASNET_PSHM gasneti_AMPSHMPoll(0 GASNETI_THREAD_PASS); #endif static unsigned int cntr; // In single-nbrhd case never need to poll the network for client AMs. // However, we'll still AM_Poll() every 256th call for orderly exit handling. // Thread race updating cntr is harmless (this is a heuristic) if ((gasneti_mysupernode.grp_count > 1) || !(0xff & cntr++)) { int retval; AMLOCK(); GASNETI_AM_SAFE_NORETURN(retval, AM_Poll(gasnetc_bundle)); AMUNLOCK(); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ /* Active Message Request Functions ================================ TODO-EX: "nbrhd" support means we could remove the unreachable loopback paths in AMMPI. */ GASNETI_INLINE(gasnetc_AMRequestShort) int gasnetc_AMRequestShort( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { CHECKCALLHC(); int retval; gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* poll at least once, to assure forward progress */ retval = gasnetc_nbrhd_RequestGeneric( gasneti_Short, jobrank, handler, 0, 0, 0, flags, numargs, argptr GASNETI_THREAD_PASS); } else { AMLOCK_TOSEND(); GASNETI_AM_SAFE_NORETURN(retval, AMMPI_RequestVA(gasnetc_endpoint, jobrank, handler, numargs, argptr)); AMUNLOCK(); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMRequestShortM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { CHECKCALLHC(); GASNETI_COMMON_AMREQUESTSHORT(tm,rank,handler,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestShort(tm,rank,handler,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMRequestMedium) int gasnetc_AMRequestMedium(gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { CHECKCALLHC(); int retval; gasneti_leaf_finish(lc_opt); // always locally completed gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* poll at least once, to assure forward progress */ retval = gasnetc_nbrhd_RequestGeneric( gasneti_Medium, jobrank, handler, source_addr, nbytes, 0, flags, numargs, argptr GASNETI_THREAD_PASS); } else { AMLOCK_TOSEND(); GASNETI_AM_SAFE_NORETURN(retval, AMMPI_RequestIVA(gasnetc_endpoint, jobrank, handler, source_addr, nbytes, numargs, argptr)); AMUNLOCK(); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMRequestMediumV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { return gasnetc_AMRequestMedium(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); } extern int gasnetc_AMRequestMediumM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTMEDIUM(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestMedium(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMRequestLong) int gasnetc_AMRequestLong( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { CHECKCALLHC(); int retval; gasneti_leaf_finish(lc_opt); // always locally completed gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* poll at least once, to assure forward progress */ retval = gasnetc_nbrhd_RequestGeneric( gasneti_Long, jobrank, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr GASNETI_THREAD_PASS); } else { uintptr_t dest_offset = (uintptr_t)dest_addr; AMLOCK_TOSEND(); GASNETI_AM_SAFE_NORETURN(retval, AMMPI_RequestXferVA(gasnetc_endpoint, jobrank, handler, source_addr, nbytes, dest_offset, 0, numargs, argptr)); AMUNLOCK(); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMRequestLongV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { return gasnetc_AMRequestLong(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); } extern int gasnetc_AMRequestLongM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTLONG(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestLong(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMReplyShort) int gasnetc_AMReplyShort( gex_Token_t token, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr) { int retval; if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Short, token, handler, 0, 0, 0, flags, numargs, argptr); } else { AM_ASSERT_LOCKED(); GASNETI_AM_SAFE_NORETURN(retval, AMMPI_ReplyVA(token, handler, numargs, argptr)); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMReplyShortM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags, int numargs, ...) { CHECKCALLHSL(); GASNETI_COMMON_AMREPLYSHORT(token,handler,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyShort(token,handler,flags,numargs,argptr); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMReplyMedium) int gasnetc_AMReplyMedium( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { int retval; gasneti_leaf_finish(lc_opt); // always locally completed if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Medium, token, handler, source_addr, nbytes, 0, flags, numargs, argptr); } else { AM_ASSERT_LOCKED(); GASNETI_AM_SAFE_NORETURN(retval, AMMPI_ReplyIVA(token, handler, source_addr, nbytes, numargs, argptr)); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMReplyMediumV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { return gasnetc_AMReplyMedium(token,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr); } extern int gasnetc_AMReplyMediumM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { CHECKCALLHSL(); GASNETI_COMMON_AMREPLYMEDIUM(token,handler,source_addr,nbytes,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyMedium(token,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMReplyLong) int gasnetc_AMReplyLong( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { int retval; gasneti_leaf_finish(lc_opt); // always locally completed if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Long, token, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr); } else { uintptr_t dest_offset = (uintptr_t)dest_addr; AM_ASSERT_LOCKED(); GASNETI_AM_SAFE_NORETURN(retval, AMMPI_ReplyXferVA(token, handler, source_addr, nbytes, dest_offset, numargs, argptr)); if_pf (retval) GASNETI_RETURN_ERR(RESOURCE); } return retval; } extern int gasnetc_AMReplyLongV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { return gasnetc_AMReplyLong(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr); } extern int gasnetc_AMReplyLongM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { CHECKCALLHSL(); GASNETI_COMMON_AMREPLYLONG(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyLong(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ /* AMMPI provides an optional error-checking implementation of handler-safe locks to assist in debugging client code */ #if GASNETC_HSL_ERRCHECK typedef struct { /* per-thread HSL err-checking info */ gex_HSL_t *locksheld; unsigned int inhandler; int inuse; } gasnetc_hsl_errcheckinfo_t; static gasnetc_hsl_errcheckinfo_t _info_init = { NULL, 0, 0 }; static gasnetc_hsl_errcheckinfo_t _info_free = { NULL, 0, 0 }; #if GASNETI_CLIENT_THREADS /* pthread thread-specific ptr to our info (or NULL for a thread never-seen before) */ GASNETI_THREADKEY_DEFINE(gasnetc_hsl_errcheckinfo); static void gasnetc_hsl_cleanup_threaddata(void *_td) { gasnetc_hsl_errcheckinfo_t *info = (gasnetc_hsl_errcheckinfo_t *)_td; gasneti_assert(info->inuse); if (info->inhandler) gasneti_fatalerror("HSL USAGE VIOLATION: thread exit within AM handler"); if (info->locksheld) GASNETI_TRACE_PRINTF(I,("Thread exiting while holding HSL locks")); info->inuse = 0; gasneti_threadkey_set(gasnetc_hsl_errcheckinfo, &_info_free); } static gasnetc_hsl_errcheckinfo_t *gasnetc_get_errcheckinfo(void) { gasnetc_hsl_errcheckinfo_t *info = gasneti_threadkey_get(gasnetc_hsl_errcheckinfo); if_pt (info) return info; /* first time we've seen this thread - need to set it up */ { /* It is (was?) unsafe to call malloc or gasneti_malloc here after attach, because we may have been within a hold_interrupts call, so table is single-level and initialized during gasnetc_attach_primary(). While that problem has probably been eliminated with the removal of NIS, this pre-initialization remains. TODO: cleanup/simplify based on removal of NIS? */ static gasnetc_hsl_errcheckinfo_t *hsl_errcheck_table = NULL; static gasneti_mutex_t hsl_errcheck_tablelock = GASNETI_MUTEX_INITIALIZER; int maxthreads = gasneti_max_threads(); int idx; gasneti_mutex_lock(&hsl_errcheck_tablelock); if (!hsl_errcheck_table) { hsl_errcheck_table = gasneti_calloc(maxthreads,sizeof(gasnetc_hsl_errcheckinfo_t)); gasneti_leak(hsl_errcheck_table); } for (idx = 0; idx < maxthreads; idx++) { if (!hsl_errcheck_table[idx].inuse) break; } if (idx == maxthreads) gasneti_fatal_threadoverflow("HSL errorcheck"); gasneti_assert(idx < maxthreads); info = &(hsl_errcheck_table[idx]); gasneti_assert(!info->inuse); GASNETI_MEMCPY(info, &_info_init, sizeof(gasnetc_hsl_errcheckinfo_t)); info->inuse = 1; gasneti_mutex_unlock(&hsl_errcheck_tablelock); gasneti_threadkey_set(gasnetc_hsl_errcheckinfo, info); gasnete_register_threadcleanup(gasnetc_hsl_cleanup_threaddata, info); return info; } } #else static gasnetc_hsl_errcheckinfo_t *gasnetc_get_errcheckinfo(void) { return &_info_init; } #endif extern void gasnetc_hsl_attach(void) { gasnetc_get_errcheckinfo(); } void gasnetc_checkcallHC(void) { gasnetc_hsl_errcheckinfo_t *info = gasnetc_get_errcheckinfo(); if (info->inhandler) gasneti_fatalerror("Illegal call to GASNet within by handler context"); gasnetc_checkcallHSL(); } void gasnetc_checkcallHSL(void) { gasnetc_hsl_errcheckinfo_t *info = gasnetc_get_errcheckinfo(); if (info->locksheld) gasneti_fatalerror("Illegal call to GASNet while holding a Handler-Safe Lock"); } #endif /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ #if !GASNETC_NULL_HSL extern void gasnetc_hsl_init (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); #if GASNETC_HSL_ERRCHECK { #if !GASNETI_VALGRIND // this test causes valgrind uninit read warnings for newly allocated space if (hsl->tag == GASNETC_HSL_ERRCHECK_TAGINIT) gasneti_fatalerror("HSL USAGE VIOLATION: tried to gex_HSL_Init() a statically-initialized HSL"); #endif #if 0 /* this causes false errors in Titanium, because object destructors aren't implemented */ if (hsl->tag == GASNETC_HSL_ERRCHECK_TAGDYN) gasneti_fatalerror("HSL USAGE VIOLATION: tried to gex_HSL_Init() a previously-initialized HSL (or one you forgot to destroy)"); #endif hsl->tag = GASNETC_HSL_ERRCHECK_TAGDYN; hsl->next = NULL; hsl->islocked = 0; } #endif gasneti_mutex_init(&(hsl->lock)); } extern void gasnetc_hsl_destroy(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); #if GASNETC_HSL_ERRCHECK { if (hsl->tag != GASNETC_HSL_ERRCHECK_TAGINIT && hsl->tag != GASNETC_HSL_ERRCHECK_TAGDYN) gasneti_fatalerror("HSL USAGE VIOLATION: tried to gex_HSL_Destroy() an uninitialized HSL"); if (hsl->islocked) gasneti_fatalerror("HSL USAGE VIOLATION: tried to gex_HSL_Destroy() a locked HSL"); hsl->tag = 0; gasneti_assert(!hsl->next); } #endif gasneti_mutex_destroy(&(hsl->lock)); } extern void gasnetc_hsl_lock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); #if GASNETC_HSL_ERRCHECK { gasnetc_hsl_errcheckinfo_t *info = gasnetc_get_errcheckinfo(); gex_HSL_t *heldhsl = info->locksheld; if (hsl->tag != GASNETC_HSL_ERRCHECK_TAGINIT && hsl->tag != GASNETC_HSL_ERRCHECK_TAGDYN) gasneti_fatalerror("HSL USAGE VIOLATION: tried to gex_HSL_Lock() an uninitialized HSL"); while (heldhsl) { if (heldhsl == hsl) gasneti_fatalerror("HSL USAGE VIOLATION: tried to recursively gex_HSL_Lock() an HSL"); heldhsl = heldhsl->next; } } #endif { #if GASNETI_STATS_OR_TRACE gasneti_tick_t startlock = GASNETI_TICKS_NOW_IFENABLED(L); #endif #if GASNETC_HSL_SPINLOCK if_pf (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { if (gasneti_wait_mode == GASNET_WAIT_SPIN) { while (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { gasneti_spinloop_hint(); } } else { gasneti_mutex_lock(&(hsl->lock)); } } #else gasneti_mutex_lock(&(hsl->lock)); #endif #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); GASNETI_TRACE_EVENT_TIME(L, HSL_LOCK, hsl->acquiretime-startlock); #endif } #if GASNETC_HSL_ERRCHECK { gasnetc_hsl_errcheckinfo_t *info = gasnetc_get_errcheckinfo(); hsl->islocked = 1; hsl->next = info->locksheld; info->locksheld = hsl; hsl->timestamp = gasneti_ticks_now(); } #endif } extern void gasnetc_hsl_unlock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); #if GASNETC_HSL_ERRCHECK { gasnetc_hsl_errcheckinfo_t *info = gasnetc_get_errcheckinfo(); gex_HSL_t *heldhsl = info->locksheld; if (hsl->tag != GASNETC_HSL_ERRCHECK_TAGINIT && hsl->tag != GASNETC_HSL_ERRCHECK_TAGDYN) gasneti_fatalerror("HSL USAGE VIOLATION: tried to gex_HSL_Unlock() an uninitialized HSL"); while (heldhsl) { if (heldhsl == hsl) break; heldhsl = heldhsl->next; } if (!heldhsl) gasneti_fatalerror("HSL USAGE VIOLATION: tried to gex_HSL_Unlock() an HSL I didn't own"); if (info->locksheld != hsl) gasneti_fatalerror("HSL USAGE VIOLATION: tried to gex_HSL_Unlock() an HSL out of order"); { float NIStime = gasneti_ticks_to_ns(gasneti_ticks_now() - hsl->timestamp)/1000.0; if (NIStime > GASNETC_NISTIMEOUT_WARNING_THRESHOLD) { gasneti_console_message("HSL USAGE WARNING","held an HSL for a long interval (%8.3f sec)", NIStime/1000000.0); } } hsl->islocked = 0; info->locksheld = hsl->next; } #endif GASNETI_TRACE_EVENT_TIME(L, HSL_UNLOCK, GASNETI_TICKS_NOW_IFENABLED(L)-hsl->acquiretime); gasneti_mutex_unlock(&(hsl->lock)); } extern int gasnetc_hsl_trylock(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); #if GASNETC_HSL_ERRCHECK { gasnetc_hsl_errcheckinfo_t *info = gasnetc_get_errcheckinfo(); gex_HSL_t *heldhsl = info->locksheld; if (hsl->tag != GASNETC_HSL_ERRCHECK_TAGINIT && hsl->tag != GASNETC_HSL_ERRCHECK_TAGDYN) gasneti_fatalerror("HSL USAGE VIOLATION: tried to gex_HSL_Trylock() an uninitialized HSL"); while (heldhsl) { if (heldhsl == hsl) gasneti_fatalerror("HSL USAGE VIOLATION: tried to recursively gex_HSL_Trylock() an HSL"); heldhsl = heldhsl->next; } } #endif { int locked = (gasneti_mutex_trylock(&(hsl->lock)) == 0); GASNETI_TRACE_EVENT_VAL(L, HSL_TRYLOCK, locked); if (locked) { #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); #endif #if GASNETC_HSL_ERRCHECK { gasnetc_hsl_errcheckinfo_t *info = gasnetc_get_errcheckinfo(); hsl->islocked = 1; hsl->next = info->locksheld; info->locksheld = hsl; hsl->timestamp = gasneti_ticks_now(); } #endif } return locked ? GASNET_OK : GASNET_ERR_NOT_READY; } } #endif #if GASNETC_HSL_ERRCHECK && !GASNETC_NULL_HSL extern void gasnetc_enteringHandler_hook_hsl(int cat, int isReq, int handlerId, gex_Token_t token, void *buf, size_t nbytes, int numargs, gex_AM_Arg_t *args) { gasnetc_hsl_errcheckinfo_t *info = gasnetc_get_errcheckinfo(); if (info->locksheld) gasneti_fatalerror("HSL USAGE VIOLATION: tried to make a GASNet network call while holding an HSL"); info->inhandler++; } extern void gasnetc_leavingHandler_hook_hsl(int cat, int isReq) { gasnetc_hsl_errcheckinfo_t *info = gasnetc_get_errcheckinfo(); gasneti_assert(info->inhandler > 0); if (info->locksheld) gasneti_fatalerror("HSL USAGE VIOLATION: tried to exit a handler while holding an HSL"); info->inhandler--; } #endif /* GASNETC_HSL_ERRCHECK && !GASNETC_NULL_HSL */ #if (!GASNETC_NULL_HSL && GASNETC_HSL_ERRCHECK) || GASNET_TRACE || GASNET_DEBUG /* called when entering/leaving handler - also called when entering/leaving AM_Reply call */ extern void gasnetc_enteringHandler_hook(ammpi_category_t cat, int isReq, int handlerId, void *token, void *buf, size_t nbytes, int numargs, uint32_t *args) { #if GASNET_DEBUG // TODO-EX: per-EP table const gex_AM_Entry_t * const handler_entry = &gasnetc_handler[handlerId]; gasneti_amtbl_check(handler_entry, numargs, (gasneti_category_t)cat, isReq); #endif switch (cat) { case ammpi_Short: if (isReq) GASNETI_TRACE_AMSHORT_REQHANDLER(handlerId, token, numargs, args); else GASNETI_TRACE_AMSHORT_REPHANDLER(handlerId, token, numargs, args); break; case ammpi_Medium: if (isReq) GASNETI_TRACE_AMMEDIUM_REQHANDLER(handlerId, token, buf, nbytes, numargs, args); else GASNETI_TRACE_AMMEDIUM_REPHANDLER(handlerId, token, buf, nbytes, numargs, args); break; case ammpi_Long: if (isReq) GASNETI_TRACE_AMLONG_REQHANDLER(handlerId, token, buf, nbytes, numargs, args); else GASNETI_TRACE_AMLONG_REPHANDLER(handlerId, token, buf, nbytes, numargs, args); break; default: gasneti_unreachable_error(("Unknown handler type in gasnetc_enteringHandler_hook(): 0x%x",(int)cat)); } GASNETI_HANDLER_ENTER(isReq); // TODO: absorb HSL check, below #if (!GASNETC_NULL_HSL && GASNETC_HSL_ERRCHECK) gasnetc_enteringHandler_hook_hsl(cat, isReq, handlerId, token, buf, nbytes, numargs, (gex_AM_Arg_t *)args); #endif } extern void gasnetc_leavingHandler_hook(ammpi_category_t cat, int isReq) { switch (cat) { case ammpi_Short: GASNETI_TRACE_PRINTF(A,("AM%s_SHORT_HANDLER: handler execution complete", (isReq?"REQUEST":"REPLY"))); \ break; case ammpi_Medium: GASNETI_TRACE_PRINTF(A,("AM%s_MEDIUM_HANDLER: handler execution complete", (isReq?"REQUEST":"REPLY"))); \ break; case ammpi_Long: GASNETI_TRACE_PRINTF(A,("AM%s_LONG_HANDLER: handler execution complete", (isReq?"REQUEST":"REPLY"))); \ break; default: gasneti_unreachable_error(("Unknown handler type in gasnetc_leavingHandler_hook(): 0x%x",(int)cat)); } GASNETI_HANDLER_LEAVE(isReq); // TODO: absorb HSL check, below #if (!GASNETC_NULL_HSL && GASNETC_HSL_ERRCHECK) gasnetc_leavingHandler_hook_hsl(cat, isReq); #endif } #endif /* ------------------------------------------------------------------------------------ */ /* Private Handlers: ================ */ static gex_AM_Entry_t const gasnetc_handlers[] = { GASNETC_COMMON_HANDLERS(), /* ptr-width independent handlers */ /* ptr-width dependent handlers */ GASNETI_HANDLER_EOT }; gex_AM_Entry_t const *gasnetc_get_handlertable(void) { return gasnetc_handlers; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/mpi-conduit/contrib/0000775000175000017500000000000015142313673017312 5ustar alastairalastairgasnet-2025.8.0/mpi-conduit/contrib/gasnetrun_mpi.in0000664000175000017500000000022315142313673022512 0ustar alastairalastair#!@BOURNE_SHELL@ GASNET_MPI_SPAWNER=mpi export GASNET_MPI_SPAWNER GASNET_SPAWN_CONDUIT=MPI export GASNET_SPAWN_CONDUIT @MPIRUN_COMMON@ @PERLSTART@ gasnet-2025.8.0/mpi-conduit/contrib/Makefile.am0000664000175000017500000000244315142313673021351 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/mpi-conduit/contrib/Makefile.am $ # Description: Makefile for GASNet MPI spawner # Copyright (c) 2015 Intel Corporation. All rights reserved. # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 target = gasnetrun_mpi target_pl = $(target).pl # Need a bin_DATA rule, but automake disallows that. So, fake it. dotpldir = $(bindir) # Make sure the perl script and shell wrapper are always current locally. # This ensures we can run from the build directory if needed. $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart $(top_builddir)/other/mpirun_common: $(top_srcdir)/other/mpirun_common.in @cd $(top_builddir)/other && $(MAKE) mpirun_common $(target): $(top_builddir)/other/perlstart $(top_builddir)/other/mpirun_common if USE_MPI all_targets = $(target_pl) $(target) endif all-local: $(all_targets) $(target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl cp -f "$<" $@ DISTCLEANFILES = $(target_pl) # Conditionally install the .pl and its wrapper if USE_MPI_CONDUIT scripts = $(target) data = $(target_pl) else scripts = data = endif bin_SCRIPTS = $(scripts) dotpl_DATA = $(data) gasnet-2025.8.0/mpi-conduit/contrib/Makefile.in0000664000175000017500000005262315142313673021367 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/mpi-conduit/contrib/Makefile.am $ # Description: Makefile for GASNet MPI spawner # Copyright (c) 2015 Intel Corporation. All rights reserved. # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = mpi-conduit/contrib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = gasnetrun_mpi CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dotpl_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gasnetrun_mpi.in \ $(top_srcdir)/config-aux/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = gasnetrun_mpi target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 target_pl = $(target).pl # Need a bin_DATA rule, but automake disallows that. So, fake it. dotpldir = $(bindir) @USE_MPI_TRUE@all_targets = $(target_pl) $(target) DISTCLEANFILES = $(target_pl) @USE_MPI_CONDUIT_FALSE@scripts = # Conditionally install the .pl and its wrapper @USE_MPI_CONDUIT_TRUE@scripts = $(target) @USE_MPI_CONDUIT_FALSE@data = @USE_MPI_CONDUIT_TRUE@data = $(target_pl) bin_SCRIPTS = $(scripts) dotpl_DATA = $(data) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mpi-conduit/contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign mpi-conduit/contrib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gasnetrun_mpi: $(top_builddir)/config.status $(srcdir)/gasnetrun_mpi.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) install-dotplDATA: $(dotpl_DATA) @$(NORMAL_INSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dotpldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dotpldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dotpldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dotpldir)" || exit $$?; \ done uninstall-dotplDATA: @$(NORMAL_UNINSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(dotpldir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) all-local installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dotplDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-dotplDATA .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ cscopelist-am ctags-am distclean distclean-generic distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am \ install-dotplDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-dotplDATA .PRECIOUS: Makefile # Make sure the perl script and shell wrapper are always current locally. # This ensures we can run from the build directory if needed. $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart $(top_builddir)/other/mpirun_common: $(top_srcdir)/other/mpirun_common.in @cd $(top_builddir)/other && $(MAKE) mpirun_common $(target): $(top_builddir)/other/perlstart $(top_builddir)/other/mpirun_common all-local: $(all_targets) $(target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl cp -f "$<" $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/mpi-conduit/README0000664000175000017500000001741015142313673016535 0ustar alastairalastairGASNet mpi-conduit documentation Dan Bonachea User Information: ----------------- mpi-conduit is a portable implementation of GASNet over MPI, the Message Passing Interface (http://mpi-forum.org/), which is implemented on most HPC systems. Where this conduit runs: ----------------------- mpi-conduit is fully portable and should work correctly on any POSIX-like system with a working MPI implementation (compliant with specification MPI 1.1 or later) and a functional C99 compiler. mpi-conduit does not exploit the MPI RMA interfaces introduced in MPI 2.0/3.0. mpi-conduit is primarily intended as a migration tool for systems where a native GASNet implementation is not yet available. It is not intended for production use on networks that expose a high-performance network API, where an appropriate GASNet native conduit implementation should be preferred. It is not intended for use on Ethernet hardware, where udp-conduit should usually be preferred. Configuration-time variables: --------------------------------- In order to compile mpi-conduit, and subsequently use it, GASNet must know how to invoke your mpicc and mpirun (or equivalents). GASNet's configure script uses some sensible defaults, but these may not work on all platforms. In particular, if you have set CC to a non-default C compiler, you will likely need to set mpicc as well. Here are the relevant variables: MPI_CC the program to use as the compiler and linker MPI_CFLAGS options passed to MPI_CC when used as a compiler MPI_LIBS options passed to MPI_CC when used as a linker MPIRUN_CMD template for invoking mpirun, or equivalent GASNet's configure script will test the MPI_CC, MPI_CFLAGS and MPI_LIBS variable by trying approximately the following: $MPI_CC $MPI_CFLAGS -c foo.c $CC -c bar.c $MPI_CC $MPI_LIBS -o foo foo.o bar.o Note this test (and mpi-conduit) require that $CC and $MPI_CC are ABI- and link-compatible. They need not be the same underlying compiler, but that is also recommended when possible, to minimize compatibility issues. GASNet's configure script does not attempt to run MPIRUN_CMD. MPIRUN_CMD is a template which tells the gasnetrun_mpi script how to invoke your mpirun. The template may include the following strings for variable substitution at run time: "%N" The number of MPI processes requested "%P" The GASNet program to run "%A" The arguments to the GASNet program "%C" Alias for "%P %A" "%H" Expands to the value of environment variable GASNET_NODEFILE. This file should be one hostname per line. The default is "mpirun -np %N %C". You may need a full path to mpirun if the correct version is not in your PATH. This template is also the mechanism to add extra arguments - for instance: MPIRUN_CMD='mpirun -np %N -hostfile my_hosts_file %C' or MPIRUN_CMD='mpirun -np %N -hostfile %H %C' Optional compile-time settings: ------------------------------ * All the compile-time settings from extended-ref (see the extended-ref README) Job Spawning ------------ If using UPC, Titanium, etc. the language-specific commands should be used to launch applications. Otherwise, mpi-conduit applications can be launched like any other MPI program (eg using mpirun directly) or via the gasnetrun_mpi utility: + usage summary: gasnetrun_mpi -n [options] [--] prog [program args] options: -n number of processes to run -N number of nodes to run on (not supported on all mpiruns) -c number of cpus per process (not supported on all mpiruns) -E list of environment vars to propagate -v be verbose about what is happening -t test only, don't execute anything (implies -v) -k keep any temporary files created (implies -v) -(no)encode[-args,-env] use encoding of args, env or both to help with buggy spawners Recognized environment variables: --------------------------------- * All the standard GASNet environment variables (see top-level README) * GASNET_NETWORKDEPTH - depth of network buffers to allocate (defaults to 4) can also be set as AMMPI_NETWORKDEPTH (GASNET_NETWORKDEPTH takes precedence) mpi-conduit's max MPI buffer usage at any time is bounded by: 4 * depth * 65 KB preposted non-blocking recvs 2 * depth * 65 KB non-blocking sends (AMMedium/AMLong) 2 * depth * 78 byte non-blocking sends (AMShort) * AMMPI_CREDITS_PP - number of send credits each node has for each remote target node in the token-based flow-control. Setting this value too high can increase the incidence of unexpected messages at the target, reducing effective bandwidth. Setting the value too low can induce premature backpressure at the initiator, reducing communication overlap and effective bandwidth. Defaults to depth*2. * AMMPI_CREDITS_SLACK - number of send credits that may be coalesced at the target during a purely one-way AM messaging stream before forcing a reply to be generated for refunding credits. Defaults to AMMPI_CREDITS_PP*0.75. * AMMPI_SYNCSEND_THRESH - size threshold above which to use synchronous non-blocking MPI sends, a workaround for buggy MPI implementations on a few platforms. 0 means always use synchronous sends, -1 means never use them (the default on most platforms). * GASNET_MPI_THREAD - can be set to one of the values: "SINGLE", "FUNNELED", "SERIALIZED" or "MULTIPLE" to request the MPI library be initialized with a specific threading support level. The default value depends on the GASNet threading mode. + SINGLE - sufficient for mpi-conduit in GASNET_SEQ mode. This MPI thread mode is only guaranteed to work correctly in a strictly single-threaded process (ie no threads anywhere in the system). + FUNNELED - Other threads exist in the process, but never call MPI or GASNet. + SERIALIZED - The default in GASNET_PAR or GASNET_PARSYNC mode, where multiple client threads may call GASNet, resulting in MPI calls serialized by mpi-conduit. + MULTIPLE - Multi-threaded GASNet+MPI process that makes direct calls to MPI. See MPI documentation for detailed explanation of the threading levels. Known problems: --------------- * Proper operation of GASNet and its client often depends on environment variables passed to all the processes. Unfortunately, there is no uniform way to achieve this across different implementations of mpirun. The gasnetrun_mpi script tries many different things and is known to work correctly for Open MPI and for MPICH and most of its derivatives (including MPICH-NT, MVICH and MVAPICH). For assistance with any particular MPI implementation, search the GASNet Bugzilla server (URL below) and open a new bug (registration required) if you cannot find information on your MPI. * See the GASNet Bugzilla server for details on other known bugs: https://gasnet-bugs.lbl.gov/ Future work: ------------ ============================================================================== Design Overview: ---------------- The core API implementation is a very thin wrapper around the AMMPI implementation by Dan Bonachea. See documentation in the other/ammpi directory or the AMMPI webpage (https://gasnet.lbl.gov/ammpi) for details. AMMPI requires an MPI 1.1 or newer compliant MPI implementation, and performance varies widely across MPI implementations (based primarily on their performance for non-blocking sends and recvs - MPI_ISend/MPI_IRecv). AMMPI performs all its MPI calls on a separate, private MPI communicator, which is strongly guaranteed by the MPI spec to isolate it from any other MPI communication in the application, so there's never a possibility of deadlock or hard-limit resource contention between the two. The mpi-conduit directly uses the extended-ref implementation for the extended API - see the extended-ref directory for details. gasnet-2025.8.0/mpi-conduit/gasnet_core_help.h0000664000175000017500000000076315142313673021332 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/mpi-conduit/gasnet_core_help.h $ * Description: GASNet MPI conduit core Header Helpers (Internal code, not for client use) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_HELP_H #define _GASNET_CORE_HELP_H #include #endif gasnet-2025.8.0/mpi-conduit/Makefile.am0000664000175000017500000000727615142313673017722 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/mpi-conduit/Makefile.am $ # Description: Makefile for GASNet mpi conduit # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME=mpi # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = contrib # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ gasnet_core.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiler command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(top_srcdir)/extended-ref/gasnet_extended.c # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = -I$(top_srcdir)/other/ammpi -I$(top_builddir)/other/ammpi # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = \ $(top_srcdir)/other/ammpi/ammpi.h \ $(top_builddir)/other/ammpi/amx_portable_platform.h # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = $(top_builddir)/other/ammpi/libammpi.a $(top_srcdir)/other/ammpi/*.h $(top_builddir)/other/ammpi/libammpi.a: force cd $(top_builddir)/other/ammpi && $(MAKE) libammpi.a $(top_builddir)/other/ammpi/amx_portable_platform.h: $(top_builddir)/other/ammpi/libammpi.a # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time CONDUIT_KINDS = # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) CONDUIT_RUNCMD = @TOP_BUILDDIR@/mpi-conduit/contrib/gasnetrun_mpi -np %N %P %A # conduit-specific tests in ../tests directory CONDUIT_TESTS = # -------- Do not modify anything below this line -------- if BUILD_SEQ_LIBS libgasnet_mpi_seq_a_SOURCES = libraries_seq = libgasnet-mpi-seq.a endif if BUILD_PAR_LIBS libgasnet_mpi_par_a_SOURCES = libraries_par = libgasnet-mpi-par.a endif if BUILD_PARSYNC_LIBS libgasnet_mpi_parsync_a_SOURCES = libraries_parsync = libgasnet-mpi-parsync.a endif libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) include $(top_builddir)/other/Makefile-conduit.mak libgasnet-mpi-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-mpi-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-mpi-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync if USE_MPI_CONDUIT lib_LIBRARIES = $(libraries) all-local: $(lib_LIBRARIES) $(pkgconfig_files) clean-local: do-clean-local install-data-local: do-install-data-local uninstall-local: do-uninstall-local else $(top_srcdir)/gasnetex.h: do-error endif gasnet-2025.8.0/mpi-conduit/gasnet_core_internal.h0000664000175000017500000001066415142313673022217 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/mpi-conduit/gasnet_core_internal.h $ * Description: GASNet MPI conduit header for internal definitions in Core API * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_CORE_INTERNAL_H #define _GASNET_CORE_INTERNAL_H #include /* whether or not to use spin-locking for HSL's */ #define GASNETC_HSL_SPINLOCK 1 #define GASNETC_NISTIMEOUT_WARNING_THRESHOLD 1000000 /* us for timeout warning under HSL_ERRCHECK */ #define GASNETC_DEFAULT_NETWORKDEPTH 4 extern ep_t gasnetc_endpoint; extern gasneti_mutex_t gasnetc_AMlock; /* protect access to AMMPI */ #define AMLOCK() gasneti_mutex_lock(&gasnetc_AMlock) #define AMLOCK_TOSEND() do { \ gasneti_suspend_spinpollers(); \ gasneti_mutex_lock(&gasnetc_AMlock); \ gasneti_resume_spinpollers(); \ } while (0) #define AMUNLOCK() gasneti_mutex_unlock(&gasnetc_AMlock) #define AM_ASSERT_LOCKED() gasneti_mutex_assertlocked(&gasnetc_AMlock) #define AM_ASSERT_UNLOCKED() gasneti_mutex_assertunlocked(&gasnetc_AMlock) /* ------------------------------------------------------------------------------------ * AM Error Handling * ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasneti_AMErrorName) const char *gasneti_AMErrorName(int errval) { switch (errval) { case AM_OK: return "AM_OK"; case AM_ERR_NOT_INIT: return "AM_ERR_NOT_INIT"; case AM_ERR_BAD_ARG: return "AM_ERR_BAD_ARG"; case AM_ERR_RESOURCE: return "AM_ERR_RESOURCE"; case AM_ERR_NOT_SENT: return "AM_ERR_NOT_SENT"; case AM_ERR_IN_USE: return "AM_ERR_IN_USE"; default: return "*unknown*"; } } /* ------------------------------------------------------------------------------------ */ /* make an AM call - if it fails, print error message and return */ #define GASNETI_AM_SAFE(fncall) do { \ int const _retcode = (fncall); \ if_pf (_retcode != AM_OK) { \ char msg[128]; \ snprintf(msg, sizeof(msg), \ "\nGASNet encountered an AM Error: %s(%i)\n", \ gasneti_AMErrorName(_retcode), _retcode); \ GASNETI_RETURN_ERRFR(RESOURCE, fncall, msg); \ } \ } while (0) /* ------------------------------------------------------------------------------------ */ /* make an AM call - if it fails, print error message and set retval to non-zero errcode * else, set retval to zero */ #define GASNETI_AM_SAFE_NORETURN(retval,fncall) do { \ gasneti_static_assert(AM_OK == 0); \ retval = (fncall); \ if_pf (retval) { \ if (gasneti_VerboseErrors) { \ gasneti_console_message("ERROR","GASNet %s encountered an AM Error: %s(%i)\n" \ " at %s:%i", \ GASNETI_CURRENT_FUNCTION, \ gasneti_AMErrorName(retval), \ retval, __FILE__, __LINE__); \ } \ } \ } while (0) /* ------------------------------------------------------------------------------------ */ /* add new core API handlers here and to the bottom of gasnet_core.c */ /* ------------------------------------------------------------------------------------ */ /* handler table (temporary global impl) */ extern gex_AM_Entry_t *gasnetc_handler; /* ------------------------------------------------------------------------------------ */ /* Configure gasnet_event_internal.h and gasnet_event.c */ // TODO-EX: prefix needs to move from "extended" to "core" // (###) Define as needed if iop counters should use something other than weakatomics: /* #define gasnete_op_atomic_(_id) gasnetc_atomic_##_id */ // (###) Define if conduit performs local-completion detection: /* #define GASNETE_HAVE_LC */ #endif gasnet-2025.8.0/mpi-conduit/Makefile.in0000664000175000017500000007431115142313673017725 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/mpi-conduit/Makefile.am $ # Description: Makefile for GASNet mpi conduit # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = mpi-conduit ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = conduit.mak CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libgasnet_mpi_par_a_AR = $(AR) $(ARFLAGS) libgasnet_mpi_par_a_LIBADD = am_libgasnet_mpi_par_a_OBJECTS = libgasnet_mpi_par_a_OBJECTS = $(am_libgasnet_mpi_par_a_OBJECTS) libgasnet_mpi_parsync_a_AR = $(AR) $(ARFLAGS) libgasnet_mpi_parsync_a_LIBADD = am_libgasnet_mpi_parsync_a_OBJECTS = libgasnet_mpi_parsync_a_OBJECTS = \ $(am_libgasnet_mpi_parsync_a_OBJECTS) libgasnet_mpi_seq_a_AR = $(AR) $(ARFLAGS) libgasnet_mpi_seq_a_LIBADD = am_libgasnet_mpi_seq_a_OBJECTS = libgasnet_mpi_seq_a_OBJECTS = $(am_libgasnet_mpi_seq_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgasnet_mpi_par_a_SOURCES) \ $(libgasnet_mpi_parsync_a_SOURCES) \ $(libgasnet_mpi_seq_a_SOURCES) DIST_SOURCES = $(libgasnet_mpi_par_a_SOURCES) \ $(libgasnet_mpi_parsync_a_SOURCES) \ $(libgasnet_mpi_seq_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/conduit.mak.in \ $(top_srcdir)/config-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME = mpi # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = contrib # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ gasnet_core.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiler command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(top_srcdir)/extended-ref/gasnet_extended.c # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = -I$(top_srcdir)/other/ammpi -I$(top_builddir)/other/ammpi # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = \ $(top_srcdir)/other/ammpi/ammpi.h \ $(top_builddir)/other/ammpi/amx_portable_platform.h # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = $(top_builddir)/other/ammpi/libammpi.a $(top_srcdir)/other/ammpi/*.h # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time CONDUIT_KINDS = # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) CONDUIT_RUNCMD = @TOP_BUILDDIR@/mpi-conduit/contrib/gasnetrun_mpi -np %N %P %A # conduit-specific tests in ../tests directory CONDUIT_TESTS = # -------- Do not modify anything below this line -------- @BUILD_SEQ_LIBS_TRUE@libgasnet_mpi_seq_a_SOURCES = @BUILD_SEQ_LIBS_TRUE@libraries_seq = libgasnet-mpi-seq.a @BUILD_PAR_LIBS_TRUE@libgasnet_mpi_par_a_SOURCES = @BUILD_PAR_LIBS_TRUE@libraries_par = libgasnet-mpi-par.a @BUILD_PARSYNC_LIBS_TRUE@libgasnet_mpi_parsync_a_SOURCES = @BUILD_PARSYNC_LIBS_TRUE@libraries_parsync = libgasnet-mpi-parsync.a libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) @USE_MPI_CONDUIT_TRUE@lib_LIBRARIES = $(libraries) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mpi-conduit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign mpi-conduit/Makefile $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): conduit.mak: $(top_builddir)/config.status $(srcdir)/conduit.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ if test -f $$p; then \ $(am__strip_dir) \ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive @USE_MPI_CONDUIT_FALSE@all-local: all-am: Makefile $(LIBRARIES) all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @USE_MPI_CONDUIT_FALSE@install-data-local: @USE_MPI_CONDUIT_FALSE@clean-local: @USE_MPI_CONDUIT_FALSE@uninstall-local: clean: clean-recursive clean-am: clean-generic clean-libLIBRARIES clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLIBRARIES uninstall-local .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am clean clean-generic clean-libLIBRARIES \ clean-local cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLIBRARIES uninstall-local .PRECIOUS: Makefile $(top_builddir)/other/ammpi/libammpi.a: force cd $(top_builddir)/other/ammpi && $(MAKE) libammpi.a $(top_builddir)/other/ammpi/amx_portable_platform.h: $(top_builddir)/other/ammpi/libammpi.a include $(top_builddir)/other/Makefile-conduit.mak libgasnet-mpi-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-mpi-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-mpi-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync @USE_MPI_CONDUIT_TRUE@all-local: $(lib_LIBRARIES) $(pkgconfig_files) @USE_MPI_CONDUIT_TRUE@clean-local: do-clean-local @USE_MPI_CONDUIT_TRUE@install-data-local: do-install-data-local @USE_MPI_CONDUIT_TRUE@uninstall-local: do-uninstall-local @USE_MPI_CONDUIT_FALSE@$(top_srcdir)/gasnetex.h: do-error # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/gasnet.h0000664000175000017500000015464315142313673015071 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet.h $ * Description: GASNet -> GASNet-EX transitional header * Copyright 2016, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _GASNET_H #define _GASNET_H #define _INCLUDED_GASNET_H #include #include GASNETT_BEGIN_EXTERNC GASNETI_BEGIN_NOWARN /* ------------------------------------------------------------------------------------ */ /* Globals ===================== */ extern gex_Client_t gasneti_thunk_client; extern gex_EP_t gasneti_thunk_endpoint; extern gex_TM_t gasneti_thunk_tm; extern gex_Segment_t gasneti_thunk_segment; /* ------------------------------------------------------------------------------------ */ /* Compile-time constants ===================== */ #define SIZEOF_GASNET_REGISTER_VALUE_T SIZEOF_GEX_RMA_VALUE_T /* public spec version numbers */ #define GASNET_SPEC_VERSION_MAJOR GASNETI_SPEC_VERSION_MAJOR #define GASNET_SPEC_VERSION_MINOR GASNETI_SPEC_VERSION_MINOR /* legacy name for major spec version number */ #define GASNET_VERSION GASNET_SPEC_VERSION_MAJOR /* ------------------------------------------------------------------------------------ */ /* Base types ========== */ typedef gex_Rank_t gasnet_node_t; typedef gex_Token_t gasnet_token_t; typedef gex_AM_Index_t gasnet_handler_t; typedef gex_AM_Arg_t gasnet_handlerarg_t; typedef gex_RMA_Value_t gasnet_register_value_t; typedef gex_Event_t gasnet_handle_t; #define GASNET_INVALID_HANDLE GEX_EVENT_INVALID typedef struct { void *addr; size_t len; } gasnet_memvec_t; /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ GASNETT_INLINE(gasnet_init) int gasnet_init(int *_argc, char ***_argv) { gex_Client_t _g2ex_client; gex_EP_t _g2ex_ep; gex_TM_t _g2ex_tm; return gex_Client_Init (&_g2ex_client, &_g2ex_ep, &_g2ex_tm, "LEGACY", _argc, _argv, GASNETI_FLAG_INIT_LEGACY | GEX_FLAG_USES_GASNET1); } extern int gasneti_attach( gex_TM_t _tm, gasnet_handlerentry_t *_table, int _numentries, uintptr_t _segsize); extern void gasneti_legacy_attach_checks(int _checksegment); GASNETT_INLINE(gasnet_attach) int gasnet_attach( gasnet_handlerentry_t *_table, int _numentries, uintptr_t _segsize, uintptr_t _minheapoffset ) { gasneti_legacy_attach_checks(0); if (! _segsize) _segsize = GASNET_PAGESIZE; int _result = gasneti_attach( gasneti_thunk_tm, _table, _numentries, _segsize); #if GASNET_SEGMENT_EVERYTHING gasneti_legacy_attach_checks(0); #else gasneti_legacy_attach_checks(1); #endif return _result; } GASNETT_INLINE(gasnet_QueryGexObjects) void gasnet_QueryGexObjects( gex_Client_t *_client_p, gex_EP_t *_endpoint_p, gex_TM_t *_tm_p, gex_Segment_t *_segment_p) { GASNETI_CHECKATTACH(); if (_client_p) *_client_p = gasneti_thunk_client; if (_endpoint_p) *_endpoint_p = gasneti_thunk_endpoint; if (_tm_p) *_tm_p = gasneti_thunk_tm; if (_segment_p) *_segment_p = gasneti_thunk_segment; } #define gasnet_mynode() (GASNETI_CHECKINIT(), gex_System_QueryJobRank()) #define gasnet_nodes() (GASNETI_CHECKINIT(), gex_System_QueryJobSize()) /* ------------------------------------------------------------------------------------ */ /* Active Message Query Functions ============================== */ #define gasnet_AMMaxMedium() MIN(gex_AM_LUBRequestMedium(),\ gex_AM_LUBReplyMedium()) #define gasnet_AMMaxLongRequest() gex_AM_LUBRequestLong() #define gasnet_AMMaxLongReply() gex_AM_LUBReplyLong() #define gasnet_AMMaxArgs() ((size_t)gex_AM_MaxArgs()) GASNETT_INLINE(gasnet_AMGetMsgSource) int gasnet_AMGetMsgSource(gasnet_token_t _token, gasnet_node_t *_srcrank) { gex_Token_Info_t _info; gex_TI_t _rc = gex_Token_Info(_token, &_info, GEX_TI_SRCRANK); gasneti_assert(_rc & GEX_TI_SRCRANK); *_srcrank = _info.gex_srcrank; return 0; } /* ------------------------------------------------------------------------------------ */ /* Active Message Request/Reply Functions ====================================== These all return 0 in EX for non-immediate, which matches the GASNET_OK success return code in GASNet-1 */ #define gasnet_AMRequestShort0(dest, handler) \ gex_AM_RequestShort0(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG) #define gasnet_AMRequestShort1(dest, handler, a0) \ gex_AM_RequestShort1(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0) #define gasnet_AMRequestShort2(dest, handler, a0, a1) \ gex_AM_RequestShort2(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1) #define gasnet_AMRequestShort3(dest, handler, a0, a1, a2) \ gex_AM_RequestShort3(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2) #define gasnet_AMRequestShort4(dest, handler, a0, a1, a2, a3) \ gex_AM_RequestShort4(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3) #define gasnet_AMRequestShort5(dest, handler, a0, a1, a2, a3, a4) \ gex_AM_RequestShort5(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4) #define gasnet_AMRequestShort6(dest, handler, a0, a1, a2, a3, a4, a5) \ gex_AM_RequestShort6(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5) #define gasnet_AMRequestShort7(dest, handler, a0, a1, a2, a3, a4, a5, a6) \ gex_AM_RequestShort7(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6) #define gasnet_AMRequestShort8(dest, handler, a0, a1, a2, a3, a4, a5, a6, a7) \ gex_AM_RequestShort8(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7) #define gasnet_AMRequestShort9( dest, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gex_AM_RequestShort9(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8) #define gasnet_AMRequestShort10(dest, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gex_AM_RequestShort10(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9) #define gasnet_AMRequestShort11(dest, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gex_AM_RequestShort11(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10) #define gasnet_AMRequestShort12(dest, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gex_AM_RequestShort12(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11) #define gasnet_AMRequestShort13(dest, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gex_AM_RequestShort13(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12) #define gasnet_AMRequestShort14(dest, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gex_AM_RequestShort14(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13) #define gasnet_AMRequestShort15(dest, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gex_AM_RequestShort15(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14) #define gasnet_AMRequestShort16(dest, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gex_AM_RequestShort16(gasneti_thunk_tm, dest, handler, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14, (gex_AM_Arg_t)a15) /* ------------------------------------------------------------------------------------ */ #define gasnet_AMRequestMedium0(dest, handler, source_addr, nbytes) \ gex_AM_RequestMedium0(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG) #define gasnet_AMRequestMedium1(dest, handler, source_addr, nbytes, a0) \ gex_AM_RequestMedium1(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0) #define gasnet_AMRequestMedium2(dest, handler, source_addr, nbytes, a0, a1) \ gex_AM_RequestMedium2(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1) #define gasnet_AMRequestMedium3(dest, handler, source_addr, nbytes, a0, a1, a2) \ gex_AM_RequestMedium3(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2) #define gasnet_AMRequestMedium4(dest, handler, source_addr, nbytes, a0, a1, a2, a3) \ gex_AM_RequestMedium4(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3) #define gasnet_AMRequestMedium5(dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4) \ gex_AM_RequestMedium5(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4) #define gasnet_AMRequestMedium6(dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5) \ gex_AM_RequestMedium6(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5) #define gasnet_AMRequestMedium7(dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6) \ gex_AM_RequestMedium7(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6) #define gasnet_AMRequestMedium8(dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7) \ gex_AM_RequestMedium8(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7) #define gasnet_AMRequestMedium9( dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gex_AM_RequestMedium9(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8) #define gasnet_AMRequestMedium10(dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gex_AM_RequestMedium10(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9) #define gasnet_AMRequestMedium11(dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gex_AM_RequestMedium11(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10) #define gasnet_AMRequestMedium12(dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gex_AM_RequestMedium12(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11) #define gasnet_AMRequestMedium13(dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gex_AM_RequestMedium13(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12) #define gasnet_AMRequestMedium14(dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gex_AM_RequestMedium14(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13) #define gasnet_AMRequestMedium15(dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gex_AM_RequestMedium15(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14) #define gasnet_AMRequestMedium16(dest, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gex_AM_RequestMedium16(gasneti_thunk_tm, dest, handler, source_addr, nbytes, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14, (gex_AM_Arg_t)a15) /* ------------------------------------------------------------------------------------ */ #define gasnet_AMRequestLong0(dest, handler, source_addr, nbytes, dest_addr) \ gex_AM_RequestLong0(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG) #define gasnet_AMRequestLong1(dest, handler, source_addr, nbytes, dest_addr, a0) \ gex_AM_RequestLong1(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0) #define gasnet_AMRequestLong2(dest, handler, source_addr, nbytes, dest_addr, a0, a1) \ gex_AM_RequestLong2(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1) #define gasnet_AMRequestLong3(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2) \ gex_AM_RequestLong3(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2) #define gasnet_AMRequestLong4(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3) \ gex_AM_RequestLong4(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3) #define gasnet_AMRequestLong5(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4) \ gex_AM_RequestLong5(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4) #define gasnet_AMRequestLong6(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5) \ gex_AM_RequestLong6(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5) #define gasnet_AMRequestLong7(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6) \ gex_AM_RequestLong7(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6) #define gasnet_AMRequestLong8(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7) \ gex_AM_RequestLong8(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7) #define gasnet_AMRequestLong9( dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gex_AM_RequestLong9(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8) #define gasnet_AMRequestLong10(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gex_AM_RequestLong10(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9) #define gasnet_AMRequestLong11(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gex_AM_RequestLong11(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10) #define gasnet_AMRequestLong12(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gex_AM_RequestLong12(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11) #define gasnet_AMRequestLong13(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gex_AM_RequestLong13(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12) #define gasnet_AMRequestLong14(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gex_AM_RequestLong14(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13) #define gasnet_AMRequestLong15(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gex_AM_RequestLong15(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14) #define gasnet_AMRequestLong16(dest, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gex_AM_RequestLong16(gasneti_thunk_tm, dest, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, GASNETI_FLAG_G2EX_DEBUG, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14, (gex_AM_Arg_t)a15) /* ------------------------------------------------------------------------------------ */ #define gasnet_AMRequestLongAsync0 gasnet_AMRequestLong0 #define gasnet_AMRequestLongAsync1 gasnet_AMRequestLong1 #define gasnet_AMRequestLongAsync2 gasnet_AMRequestLong2 #define gasnet_AMRequestLongAsync3 gasnet_AMRequestLong3 #define gasnet_AMRequestLongAsync4 gasnet_AMRequestLong4 #define gasnet_AMRequestLongAsync5 gasnet_AMRequestLong5 #define gasnet_AMRequestLongAsync6 gasnet_AMRequestLong6 #define gasnet_AMRequestLongAsync7 gasnet_AMRequestLong7 #define gasnet_AMRequestLongAsync8 gasnet_AMRequestLong8 #define gasnet_AMRequestLongAsync9 gasnet_AMRequestLong9 #define gasnet_AMRequestLongAsync10 gasnet_AMRequestLong10 #define gasnet_AMRequestLongAsync11 gasnet_AMRequestLong11 #define gasnet_AMRequestLongAsync12 gasnet_AMRequestLong12 #define gasnet_AMRequestLongAsync13 gasnet_AMRequestLong13 #define gasnet_AMRequestLongAsync14 gasnet_AMRequestLong14 #define gasnet_AMRequestLongAsync15 gasnet_AMRequestLong15 #define gasnet_AMRequestLongAsync16 gasnet_AMRequestLong16 /* ------------------------------------------------------------------------------------ */ #define gasnet_AMReplyShort0(token, handler) \ gex_AM_ReplyShort0(token, handler, 0) #define gasnet_AMReplyShort1(token, handler, a0) \ gex_AM_ReplyShort1(token, handler, 0, (gex_AM_Arg_t)a0) #define gasnet_AMReplyShort2(token, handler, a0, a1) \ gex_AM_ReplyShort2(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1) #define gasnet_AMReplyShort3(token, handler, a0, a1, a2) \ gex_AM_ReplyShort3(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2) #define gasnet_AMReplyShort4(token, handler, a0, a1, a2, a3) \ gex_AM_ReplyShort4(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3) #define gasnet_AMReplyShort5(token, handler, a0, a1, a2, a3, a4) \ gex_AM_ReplyShort5(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4) #define gasnet_AMReplyShort6(token, handler, a0, a1, a2, a3, a4, a5) \ gex_AM_ReplyShort6(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5) #define gasnet_AMReplyShort7(token, handler, a0, a1, a2, a3, a4, a5, a6) \ gex_AM_ReplyShort7(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6) #define gasnet_AMReplyShort8(token, handler, a0, a1, a2, a3, a4, a5, a6, a7) \ gex_AM_ReplyShort8(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7) #define gasnet_AMReplyShort9( token, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gex_AM_ReplyShort9(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8) #define gasnet_AMReplyShort10(token, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gex_AM_ReplyShort10(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9) #define gasnet_AMReplyShort11(token, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gex_AM_ReplyShort11(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10) #define gasnet_AMReplyShort12(token, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gex_AM_ReplyShort12(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11) #define gasnet_AMReplyShort13(token, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gex_AM_ReplyShort13(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12) #define gasnet_AMReplyShort14(token, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gex_AM_ReplyShort14(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13) #define gasnet_AMReplyShort15(token, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gex_AM_ReplyShort15(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14) #define gasnet_AMReplyShort16(token, handler, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gex_AM_ReplyShort16(token, handler, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14, (gex_AM_Arg_t)a15) /* ------------------------------------------------------------------------------------ */ #define gasnet_AMReplyMedium0(token, handler, source_addr, nbytes) \ gex_AM_ReplyMedium0(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0) #define gasnet_AMReplyMedium1(token, handler, source_addr, nbytes, a0) \ gex_AM_ReplyMedium1(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0) #define gasnet_AMReplyMedium2(token, handler, source_addr, nbytes, a0, a1) \ gex_AM_ReplyMedium2(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1) #define gasnet_AMReplyMedium3(token, handler, source_addr, nbytes, a0, a1, a2) \ gex_AM_ReplyMedium3(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2) #define gasnet_AMReplyMedium4(token, handler, source_addr, nbytes, a0, a1, a2, a3) \ gex_AM_ReplyMedium4(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3) #define gasnet_AMReplyMedium5(token, handler, source_addr, nbytes, a0, a1, a2, a3, a4) \ gex_AM_ReplyMedium5(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4) #define gasnet_AMReplyMedium6(token, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5) \ gex_AM_ReplyMedium6(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5) #define gasnet_AMReplyMedium7(token, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6) \ gex_AM_ReplyMedium7(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6) #define gasnet_AMReplyMedium8(token, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7) \ gex_AM_ReplyMedium8(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7) #define gasnet_AMReplyMedium9( token, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gex_AM_ReplyMedium9(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8) #define gasnet_AMReplyMedium10(token, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gex_AM_ReplyMedium10(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9) #define gasnet_AMReplyMedium11(token, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gex_AM_ReplyMedium11(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10) #define gasnet_AMReplyMedium12(token, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gex_AM_ReplyMedium12(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11) #define gasnet_AMReplyMedium13(token, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gex_AM_ReplyMedium13(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12) #define gasnet_AMReplyMedium14(token, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gex_AM_ReplyMedium14(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13) #define gasnet_AMReplyMedium15(token, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gex_AM_ReplyMedium15(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14) #define gasnet_AMReplyMedium16(token, handler, source_addr, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gex_AM_ReplyMedium16(token, handler, source_addr, nbytes, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14, (gex_AM_Arg_t)a15) /* ------------------------------------------------------------------------------------ */ #define gasnet_AMReplyLong0(token, handler, source_addr, nbytes, dest_addr) \ gex_AM_ReplyLong0(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0) #define gasnet_AMReplyLong1(token, handler, source_addr, nbytes, dest_addr, a0) \ gex_AM_ReplyLong1(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0) #define gasnet_AMReplyLong2(token, handler, source_addr, nbytes, dest_addr, a0, a1) \ gex_AM_ReplyLong2(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1) #define gasnet_AMReplyLong3(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2) \ gex_AM_ReplyLong3(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2) #define gasnet_AMReplyLong4(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3) \ gex_AM_ReplyLong4(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3) #define gasnet_AMReplyLong5(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4) \ gex_AM_ReplyLong5(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4) #define gasnet_AMReplyLong6(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5) \ gex_AM_ReplyLong6(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5) #define gasnet_AMReplyLong7(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6) \ gex_AM_ReplyLong7(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6) #define gasnet_AMReplyLong8(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7) \ gex_AM_ReplyLong8(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7) #define gasnet_AMReplyLong9( token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gex_AM_ReplyLong9(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8) #define gasnet_AMReplyLong10(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gex_AM_ReplyLong10(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9) #define gasnet_AMReplyLong11(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gex_AM_ReplyLong11(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10) #define gasnet_AMReplyLong12(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gex_AM_ReplyLong12(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11) #define gasnet_AMReplyLong13(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gex_AM_ReplyLong13(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12) #define gasnet_AMReplyLong14(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gex_AM_ReplyLong14(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13) #define gasnet_AMReplyLong15(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gex_AM_ReplyLong15(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14) #define gasnet_AMReplyLong16(token, handler, source_addr, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gex_AM_ReplyLong16(token, handler, source_addr, nbytes, dest_addr, GEX_EVENT_NOW, 0, (gex_AM_Arg_t)a0, (gex_AM_Arg_t)a1, (gex_AM_Arg_t)a2, (gex_AM_Arg_t)a3, (gex_AM_Arg_t)a4, (gex_AM_Arg_t)a5, (gex_AM_Arg_t)a6, (gex_AM_Arg_t)a7, (gex_AM_Arg_t)a8, (gex_AM_Arg_t)a9, (gex_AM_Arg_t)a10, (gex_AM_Arg_t)a11, (gex_AM_Arg_t)a12, (gex_AM_Arg_t)a13, (gex_AM_Arg_t)a14, (gex_AM_Arg_t)a15) /* ------------------------------------------------------------------------------------ */ /* Variable-Argument Active Message Request/Reply Functions ======================================================== These were never a normative feature of GASNet-1, but are provided as best-effort for backwards compatibility of clients who may rely upon them. They will only be available for compilers supporting C99-style vararg macros - this is guaranteed by std C99 and C++11, but can otherwise be forced with -DGASNETI_FORCE_VA_ARG Note these differed in signature from the similar feature in EX in that they require the client to explicitly pass the argument count before the argument list */ #if GASNETI_USING_VA_ARG #define _GASNETI_ARGCOUNT_VAL(_stem, ...) _stem #define GASNETI_ARGCOUNT_VAL(...) _GASNETI_ARGCOUNT_VAL(__VA_ARGS__,gasneti_dummy) // First element of VA_ARGS below is the (possibly computed) argument count, // which is checked against the actual argument count and then discarded by folding into the flags arg #define gasnet_AMRequestShort(node,hidx,...) ( \ gasneti_assert_reason_always(GASNETI_ARGCOUNT_VAL(__VA_ARGS__) == GASNETI_AMNUMARGS(__VA_ARGS__), \ "Argument count mismatch to gasnet_AMRequestShort()"), \ GASNETI_AMVA(RequestShort,,__VA_ARGS__)(gasneti_thunk_tm,node,hidx,GASNETI_FLAG_G2EX_DEBUG&&__VA_ARGS__) ) #define gasnet_AMRequestMedium(node,hidx,src_addr,nbytes,...) ( \ gasneti_assert_reason_always(GASNETI_ARGCOUNT_VAL(__VA_ARGS__) == GASNETI_AMNUMARGS(__VA_ARGS__), \ "Argument count mismatch to gasnet_AMRequestMedium()"), \ GASNETI_AMVA(RequestMedium,,__VA_ARGS__)(gasneti_thunk_tm,node,hidx,src_addr,nbytes,GEX_EVENT_NOW,GASNETI_FLAG_G2EX_DEBUG&&__VA_ARGS__) ) #define gasnet_AMRequestLong(node,hidx,src_addr,nbytes,dst_addr,...) ( \ gasneti_assert_reason_always(GASNETI_ARGCOUNT_VAL(__VA_ARGS__) == GASNETI_AMNUMARGS(__VA_ARGS__), \ "Argument count mismatch to gasnet_AMRequestLong()"), \ GASNETI_AMVA(RequestLong,,__VA_ARGS__)(gasneti_thunk_tm,node,hidx,src_addr,nbytes,dst_addr,GEX_EVENT_NOW,GASNETI_FLAG_G2EX_DEBUG&&__VA_ARGS__) ) #define gasnet_AMRequestLongAsync(node,hidx,src_addr,nbytes,dst_addr,...) ( \ gasneti_assert_reason_always(GASNETI_ARGCOUNT_VAL(__VA_ARGS__) == GASNETI_AMNUMARGS(__VA_ARGS__), \ "Argument count mismatch to gasnet_AMRequestLongAsync()"), \ GASNETI_AMVA(RequestLong,,__VA_ARGS__)(gasneti_thunk_tm,node,hidx,src_addr,nbytes,dst_addr,GEX_EVENT_NOW,GASNETI_FLAG_G2EX_DEBUG&&__VA_ARGS__) ) #define gasnet_AMReplyShort(token,hidx,...) ( \ gasneti_assert_reason_always(GASNETI_ARGCOUNT_VAL(__VA_ARGS__) == GASNETI_AMNUMARGS(__VA_ARGS__), \ "Argument count mismatch to gasnet_AMReplyShort()"), \ GASNETI_AMVA(ReplyShort,,__VA_ARGS__)(token,hidx,0&&__VA_ARGS__) ) #define gasnet_AMReplyMedium(token,hidx,src_addr,nbytes,...) ( \ gasneti_assert_reason_always(GASNETI_ARGCOUNT_VAL(__VA_ARGS__) == GASNETI_AMNUMARGS(__VA_ARGS__), \ "Argument count mismatch to gasnet_AMReplyMedium()"), \ GASNETI_AMVA(ReplyMedium,,__VA_ARGS__)(token,hidx,src_addr,nbytes,GEX_EVENT_NOW,0&&__VA_ARGS__) ) #define gasnet_AMReplyLong(token,hidx,src_addr,nbytes,dst_addr,...) ( \ gasneti_assert_reason_always(GASNETI_ARGCOUNT_VAL(__VA_ARGS__) == GASNETI_AMNUMARGS(__VA_ARGS__), \ "Argument count mismatch to gasnet_AMReplyLong()"), \ GASNETI_AMVA(ReplyLong,,__VA_ARGS__)(token,hidx,src_addr,nbytes,dst_addr,GEX_EVENT_NOW,0&&__VA_ARGS__) ) #endif /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks */ #define gasnet_hsl_t gex_HSL_t #define gasnet_hsl_init gex_HSL_Init #define gasnet_hsl_destroy gex_HSL_Destroy #define gasnet_hsl_lock gex_HSL_Lock #define gasnet_hsl_unlock gex_HSL_Unlock #define gasnet_hsl_trylock gex_HSL_Trylock #define GASNET_HSL_INITIALIZER GEX_HSL_INITIALIZER /* ------------------------------------------------------------------------------------ */ /* Blocking Put and Get */ #define gasnet_put(node,dest,src,nbytes) \ ((void)gex_RMA_PutBlocking(gasneti_thunk_tm,node,dest,src,nbytes,GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_get(dest,node,src,nbytes) \ ((void)gex_RMA_GetBlocking(gasneti_thunk_tm,dest,node,src,nbytes,GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_put_bulk gasnet_put #define gasnet_get_bulk gasnet_get /* ------------------------------------------------------------------------------------ */ /* Implicit-handle non-blocking Put and Get */ #define gasnet_put_nbi(node,dest,src,nbytes) \ ((void)gex_RMA_PutNBI(gasneti_thunk_tm,node,dest,src,nbytes,GEX_EVENT_NOW,GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_put_nbi_bulk(node,dest,src,nbytes) \ ((void)gex_RMA_PutNBI(gasneti_thunk_tm,node,dest,src,nbytes,GEX_EVENT_DEFER,GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_get_nbi(dest,node,src,nbytes) \ ((void)gex_RMA_GetNBI(gasneti_thunk_tm,dest,node,src,nbytes,GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_get_nbi_bulk gasnet_get_nbi /* ------------------------------------------------------------------------------------ */ /* Explicit-handle non-blocking Put and Get */ #define gasnet_put_nb(node,dest,src,nbytes) \ gex_RMA_PutNB(gasneti_thunk_tm,node,dest,src,nbytes,GEX_EVENT_NOW,GASNETI_FLAG_G2EX_DEBUG) #define gasnet_put_nb_bulk(node,dest,src,nbytes) \ gex_RMA_PutNB(gasneti_thunk_tm,node,dest,src,nbytes,GEX_EVENT_DEFER,GASNETI_FLAG_G2EX_DEBUG) #define gasnet_get_nb(dest,node,src,nbytes) \ gex_RMA_GetNB(gasneti_thunk_tm,dest,node,src,nbytes,GASNETI_FLAG_G2EX_DEBUG) #define gasnet_get_nb_bulk gasnet_get_nb /* ------------------------------------------------------------------------------------ */ /* Value Gets - blocking and explicit-handle non-blocking */ #define gasnet_get_val(node,src,nbytes) \ gex_RMA_GetBlockingVal(gasneti_thunk_tm,node,src,nbytes,GASNETI_FLAG_G2EX_DEBUG) typedef struct { gex_RMA_Value_t gasneti_valget_value; gex_Event_t gasneti_valget_event; } *gasnet_valget_handle_t; GASNETT_INLINE(gasnet_get_nb_val) gasnet_valget_handle_t gasnet_get_nb_val(gasnet_node_t _node, void *_src, size_t _nbytes) { gasnet_valget_handle_t _result = (gasnet_valget_handle_t)gasneti_extern_malloc(sizeof(*_result)); #ifdef PLATFORM_ARCH_BIG_ENDIAN void *_dest = (void*)((uintptr_t)&(_result->gasneti_valget_value) + sizeof(gex_RMA_Value_t) - _nbytes); #else /* little-endian */ void *_dest = &_result->gasneti_valget_value; #endif _result->gasneti_valget_value = 0; //assert(_nbytes > 0 && _nbytes <= sizeof(gex_RMA_Value_t)); _result->gasneti_valget_event = gex_RMA_GetNB(gasneti_thunk_tm, _dest, _node, _src, _nbytes, GASNETI_FLAG_G2EX_DEBUG); return _result; } GASNETT_INLINE(gasnet_wait_syncnb_valget) gasnet_register_value_t gasnet_wait_syncnb_valget(gasnet_valget_handle_t _handle) { gex_RMA_Value_t _result; gex_Event_Wait(_handle->gasneti_valget_event); _result = _handle->gasneti_valget_value; gasneti_extern_free(_handle); return _result; } /* ------------------------------------------------------------------------------------ */ /* Value Puts - blocking, and explicit- and implicit-handle non-blocking */ #define gasnet_put_val(node,dest,value,nbytes) \ ((void)gex_RMA_PutBlockingVal(gasneti_thunk_tm,node,dest,value,nbytes,GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_put_nb_val(node,dest,value,nbytes) \ gex_RMA_PutNBVal(gasneti_thunk_tm,node,dest,value,nbytes,GASNETI_FLAG_G2EX_DEBUG) #define gasnet_put_nbi_val(node,dest,value,nbytes) \ ((void)gex_RMA_PutNBIVal(gasneti_thunk_tm,node,dest,value,nbytes,GASNETI_FLAG_G2EX_DEBUG)) /* ------------------------------------------------------------------------------------ */ /* Memset */ extern gex_Event_t gasneti_legacy_memset_nb (gex_Rank_t _node, void *_dest, int _val, size_t _nbytes GASNETI_THREAD_FARG) GASNETI_WARN_UNUSED_RESULT; extern int gasneti_legacy_memset_nbi(gex_Rank_t _node, void *_dest, int _val, size_t _nbytes GASNETI_THREAD_FARG); #define gasnet_memset(node,dest,val,nbytes) gasnet_wait_syncnb(gasneti_legacy_memset_nb(node,dest,val,nbytes GASNETI_THREAD_GET)) #define gasnet_memset_nb(node,dest,val,nbytes) gasneti_legacy_memset_nb(node,dest,val,nbytes GASNETI_THREAD_GET) #define gasnet_memset_nbi(node,dest,val,nbytes) ((void)gasneti_legacy_memset_nbi(node,dest,val,nbytes GASNETI_THREAD_GET)) /* ------------------------------------------------------------------------------------ */ /* Explicit-handle sync operations */ #define gasnet_try_syncnb_nopoll(h) gex_Event_Test(h) #define gasnet_try_syncnb_some_nopoll(ph,sz) gex_Event_TestSome(ph,sz,0) #define gasnet_try_syncnb_all_nopoll(ph,sz) gex_Event_TestAll(ph,sz,0) #define gasnet_try_syncnb(h) (gasnet_AMPoll(),gex_Event_Test(h)) #define gasnet_try_syncnb_some(ph,sz) (gasnet_AMPoll(),gex_Event_TestSome(ph,sz,0)) #define gasnet_try_syncnb_all(ph,sz) (gasnet_AMPoll(),gex_Event_TestAll(ph,sz,0)) #define gasnet_wait_syncnb(h) gex_Event_Wait(h) #define gasnet_wait_syncnb_some(ph,sz) gex_Event_WaitSome(ph,sz,0) #define gasnet_wait_syncnb_all(ph,sz) gex_Event_WaitAll(ph,sz,0) /* ------------------------------------------------------------------------------------ */ /* Implicit-handle sync operations */ #define gasnet_try_syncnbi_gets() (gasnet_AMPoll(),gex_NBI_Test(GEX_EC_GET,0)) #define gasnet_try_syncnbi_puts() (gasnet_AMPoll(),gex_NBI_Test(GEX_EC_PUT,0)) #define gasnet_try_syncnbi_all() (gasnet_AMPoll(),gex_NBI_Test(GEX_EC_ALL,0)) #define gasnet_wait_syncnbi_gets() gex_NBI_Wait(GEX_EC_GET,0) #define gasnet_wait_syncnbi_puts() gex_NBI_Wait(GEX_EC_PUT,0) #define gasnet_wait_syncnbi_all() gex_NBI_Wait(GEX_EC_ALL,0) /* ------------------------------------------------------------------------------------ */ /* Implicit-handle access regions */ #define gasnet_begin_nbi_accessregion() gex_NBI_BeginAccessRegion(0) #define gasnet_end_nbi_accessregion() gex_NBI_EndAccessRegion(0) /* ------------------------------------------------------------------------------------ */ /* No-interrupt sections - GASNet-1 compliant empty implementation */ #define gasnet_hold_interrupts() ((void)0) #define gasnet_resume_interrupts() ((void)0) /* ------------------------------------------------------------------------------------ */ /* VIS */ #define gasnet_putv_bulk(dstrank,dstcount,dstlist,srccount,srclist) \ ((void)gex_VIS_VectorPutBlocking(gasneti_thunk_tm,dstrank,dstcount,(gex_Memvec_t*)(dstlist),srccount,(gex_Memvec_t*)(srclist),GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_getv_bulk(dstcount,dstlist,srcrank,srccount,srclist) \ ((void)gex_VIS_VectorGetBlocking(gasneti_thunk_tm,dstcount,(gex_Memvec_t*)(dstlist),srcrank,srccount,(gex_Memvec_t*)(srclist),GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_putv_nb_bulk(dstrank,dstcount,dstlist,srccount,srclist) \ gex_VIS_VectorPutNB(gasneti_thunk_tm,dstrank,dstcount,(gex_Memvec_t*)(dstlist),srccount,(gex_Memvec_t*)(srclist),GASNETI_FLAG_G2EX_DEBUG) #define gasnet_getv_nb_bulk(dstcount,dstlist,srcrank,srccount,srclist) \ gex_VIS_VectorGetNB(gasneti_thunk_tm,dstcount,(gex_Memvec_t*)(dstlist),srcrank,srccount,(gex_Memvec_t*)(srclist),GASNETI_FLAG_G2EX_DEBUG) #define gasnet_putv_nbi_bulk(dstrank,dstcount,dstlist,srccount,srclist) \ ((void)gex_VIS_VectorPutNBI(gasneti_thunk_tm,dstrank,dstcount,(gex_Memvec_t*)(dstlist),srccount,(gex_Memvec_t*)(srclist),GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_getv_nbi_bulk(dstcount,dstlist,srcrank,srccount,srclist) \ ((void)gex_VIS_VectorGetNBI(gasneti_thunk_tm,dstcount,(gex_Memvec_t*)(dstlist),srcrank,srccount,(gex_Memvec_t*)(srclist),GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_puti_bulk(dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen) \ ((void)gex_VIS_IndexedPutBlocking(gasneti_thunk_tm,dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen,GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_geti_bulk(dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen) \ ((void)gex_VIS_IndexedGetBlocking(gasneti_thunk_tm,dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen,GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_puti_nb_bulk(dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen) \ gex_VIS_IndexedPutNB(gasneti_thunk_tm,dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen,GASNETI_FLAG_G2EX_DEBUG) #define gasnet_geti_nb_bulk(dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen) \ gex_VIS_IndexedGetNB(gasneti_thunk_tm,dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen,GASNETI_FLAG_G2EX_DEBUG) #define gasnet_puti_nbi_bulk(dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen) \ ((void)gex_VIS_IndexedPutNBI(gasneti_thunk_tm,dstrank,dstcount,dstlist,dstlen,srccount,srclist,srclen,GASNETI_FLAG_G2EX_DEBUG)) #define gasnet_geti_nbi_bulk(dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen) \ ((void)gex_VIS_IndexedGetNBI(gasneti_thunk_tm,dstcount,dstlist,dstlen,srcrank,srccount,srclist,srclen,GASNETI_FLAG_G2EX_DEBUG)) // dedicated g2ex wrappers translate the Strided metadata from legacy to EX format #define gasnet_puts_bulk(dstrank,dstaddr,dststrides,srcaddr,srcstrides,count,stridelevels) \ _gasnet_puts_bulk(gasneti_thunk_tm,dstrank,dstaddr,dststrides,srcaddr,srcstrides,count,stridelevels GASNETI_THREAD_GET) #define gasnet_gets_bulk(dstaddr,dststrides,srcrank,srcaddr,srcstrides,count,stridelevels) \ _gasnet_gets_bulk(gasneti_thunk_tm,dstaddr,dststrides,srcrank,srcaddr,srcstrides,count,stridelevels GASNETI_THREAD_GET) #define gasnet_puts_nb_bulk(dstrank,dstaddr,dststrides,srcaddr,srcstrides,count,stridelevels) \ _gasnet_puts_nb_bulk(gasneti_thunk_tm,dstrank,dstaddr,dststrides,srcaddr,srcstrides,count,stridelevels GASNETI_THREAD_GET) #define gasnet_gets_nb_bulk(dstaddr,dststrides,srcrank,srcaddr,srcstrides,count,stridelevels) \ _gasnet_gets_nb_bulk(gasneti_thunk_tm,dstaddr,dststrides,srcrank,srcaddr,srcstrides,count,stridelevels GASNETI_THREAD_GET) #define gasnet_puts_nbi_bulk(dstrank,dstaddr,dststrides,srcaddr,srcstrides,count,stridelevels) \ _gasnet_puts_nbi_bulk(gasneti_thunk_tm,dstrank,dstaddr,dststrides,srcaddr,srcstrides,count,stridelevels GASNETI_THREAD_GET) #define gasnet_gets_nbi_bulk(dstaddr,dststrides,srcrank,srcaddr,srcstrides,count,stridelevels) \ _gasnet_gets_nbi_bulk(gasneti_thunk_tm,dstaddr,dststrides,srcrank,srcaddr,srcstrides,count,stridelevels GASNETI_THREAD_GET) /* ------------------------------------------------------------------------------------ */ GASNETI_END_NOWARN GASNETT_END_EXTERNC #endif gasnet-2025.8.0/gasnet_membar.h0000664000175000017500000004255215142313673016407 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_membar.h $ * Description: GASNet header for portable memory barrier operations * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #if !defined(_IN_GASNET_TOOLS_H) && !defined(_IN_GASNETEX_H) #error This file is not meant to be included directly- clients should include gasnetex.h or gasnet_tools.h #endif #ifndef _GASNET_MEMBAR_H #define _GASNET_MEMBAR_H /* ------------------------------------------------------------------------------------ */ /* portable memory barrier support see README-tools for usage information To reduce duplicated assembly code and needless empty macros the following are the default behaviors unless a given arch/compiler defines something else. + gasnett_compiler_fence() defaults to an empty "volatile" asm section + gasnett_local_wmb() is implemented on all architectures + gasnett_local_rmb() defaults to just a compiler fence, as only a few architectures need more than this + gasnett_local_mb() defaults to { gasnett_local_wmb(); gasnett_local_rmb(); }. Only a few architectures (notable Alpha) can do this less expensively. */ #include #if PLATFORM_ARCH_SPARC #if defined(__sparcv9) || defined(__sparcv9cpu) || \ defined(__sparc_v9__) || defined(GASNETI_ARCH_ULTRASPARC) /* SPARC v9 ISA */ #if GASNETI_ASM_AVAILABLE GASNETI_INLINE(gasneti_local_wmb) void gasneti_local_wmb(void) { /* For TSO SPARCs this is technically oversynced, but costs us nothing extra. */ GASNETI_ASM("membar #StoreLoad | #StoreStore"); } GASNETI_INLINE(_gasneti_local_mb) void _gasneti_local_mb(void) { /* For TSO SPARCs this is technically oversynced, but costs us nothing extra. */ GASNETI_ASM("membar #LoadStore | #LoadLoad | #StoreLoad | #StoreStore"); } #define gasneti_local_mb() _gasneti_local_mb() #if defined(GASNETI_ARCH_SPARC_RMO) || PLATFORM_OS_LINUX /* Provide an option for SPARC RMO mode, used by Linux on 64-bit SPARC */ GASNETI_INLINE(_gasneti_local_rmb) void _gasneti_local_rmb(void) { GASNETI_ASM("membar #LoadStore | #LoadLoad"); } #define gasneti_local_rmb() _gasneti_local_rmb() #define GASNETI_MB_IS_SUM /* close enough, since the alternative involves an extra branch */ #else /* In the default TSO mode, RMB is a no-op */ #define GASNETI_WMB_IS_MB #endif #else #define GASNETI_USING_SLOW_MEMBARS 1 #endif #else /* SPARC v7/8 */ #error "GASNet no longer supports SPARC prior to the v8+/v9 ABIs" #endif /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_MIPS #if GASNETI_HAVE_GCC_ASM GASNETI_INLINE(_gasneti_local_mb) void _gasneti_local_mb(void) { GASNETI_ASM(".set mips2 \n\t" "sync \n\t" /* MIPS II+ memory barrier */ ".set mips0"); } #define gasneti_local_mb() _gasneti_local_mb() #define gasneti_local_wmb() _gasneti_local_mb() #define gasneti_local_rmb() _gasneti_local_mb() #define GASNETI_WMB_IS_MB #define GASNETI_RMB_IS_MB #else #define GASNETI_USING_SLOW_MEMBARS 1 #endif /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_X86 /* The instruction here can be any locked read-modify-write operation. * This one is chosen because it does not change any registers and is * available on all the Intel and clone CPUs. Also, since it touches * only the stack, it is highly unlikely to result in extra coherence * traffic. * Unfortunately, all read-modify-write operations also set condition * codes. So, we have an extra messy case for gcc, icc, etc. */ #if PLATFORM_COMPILER_SUN && GASNETI_ASM_AVAILABLE GASNETI_INLINE(gasneti_local_wmb) void gasneti_local_wmb(void) { GASNETI_ASM("lock; addl $0,0(%esp)"); } #elif GASNETI_HAVE_GCC_ASM GASNETI_INLINE(gasneti_local_wmb) void gasneti_local_wmb(void) { __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory", "cc"); } #else #define GASNETI_USING_SLOW_MEMBARS 1 #endif /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_X86_64 /* Athlon/Opteron */ #if PLATFORM_COMPILER_CRAY #define gasneti_compiler_fence() do { _Pragma("_CRI suppress") } while (0) #define gasneti_local_wmb() do { _Pragma("_CRI suppress") \ __builtin_ia32_sfence(); } while (0) #define gasneti_local_rmb() __builtin_ia32_lfence() #define gasneti_local_mb() do { _Pragma("_CRI suppress") \ __builtin_ia32_mfence(); } while (0) #if PLATFORM_COMPILER_VERSION_GE(8,6,0) && (GASNET_DEBUG || GASNETT_USING_CRAYC_HIPA0) /* Strengthen wmb to full mb to avoid warning 3140 (bug #3590) */ #undef gasneti_local_wmb() #define gasneti_local_wmb() gasneti_local_mb() #define GASNETI_WMB_IS_MB #endif #elif GASNETI_ASM_AVAILABLE GASNETI_INLINE(gasneti_local_wmb) void gasneti_local_wmb(void) { GASNETI_ASM("sfence"); } GASNETI_INLINE(_gasneti_local_rmb) void _gasneti_local_rmb(void) { GASNETI_ASM("lfence"); } #define gasneti_local_rmb() _gasneti_local_rmb() GASNETI_INLINE(_gasneti_local_mb) void _gasneti_local_mb(void) { GASNETI_ASM("mfence"); } #define gasneti_local_mb() _gasneti_local_mb() #else #define GASNETI_USING_SLOW_MEMBARS 1 #endif /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_MIC /* MIC a.k.a. Xeon Phi */ /* in-order - only need a compiler fence */ #define gasneti_local_wmb() gasneti_compiler_fence() #define gasneti_local_rmb() gasneti_compiler_fence() #define gasneti_local_mb() gasneti_compiler_fence() #define GASNETI_RMB_IS_MB #define GASNETI_WMB_IS_MB /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_POWERPC #if GASNETI_HAVE_GCC_ASM /* "lwsync" = "sync 1", executed as "sync" on older CPUs */ /* XXX: Can't count on older assemblers to recognize "lwsync" mnemonic */ #define GASNETI_PPC_WMB_ASM ".long 0x7c2004ac" #define gasneti_local_wmb() GASNETI_ASM(GASNETI_PPC_WMB_ASM) #else #define GASNETI_USING_SLOW_MEMBARS 1 #endif #define GASNETI_PPC_RMB_ASM GASNETI_PPC_WMB_ASM #define gasneti_local_rmb() gasneti_local_wmb() #define GASNETI_RMB_IS_MB /* TODO: 'lwsync' is LL+SS but not LS or SL barrier. Is that enough? */ #define gasneti_local_mb() gasneti_local_wmb() #define GASNETI_WMB_IS_MB /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_MICROBLAZE /* no SMP support */ #define gasneti_local_wmb() gasneti_compiler_fence() #define gasneti_local_rmb() gasneti_compiler_fence() #define gasneti_local_mb() gasneti_compiler_fence() #define GASNETI_RMB_IS_MB #define GASNETI_WMB_IS_MB /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_ARM && PLATFORM_OS_LINUX #if defined(GASNETI_UNI_BUILD) /* On a uniprocessor build avoid performing what reduces to an expensive no-op */ #define gasneti_local_mb() gasneti_compiler_fence() #elif !GASNETI_HAVE_ARM_MEMBAR #error "Configure found no memory barrier support (required for SMPs). Reconfigure with --disable-smp-safe to continue." #elif GASNETI_HAVE_GCC_ASM GASNETI_INLINE(gasneti_local_mb) void gasneti_local_mb(void) { __asm__ __volatile__ ( GASNETI_ARM_ASMCALL(r0, 0x5f) : : : "r0", "lr", "cc", "memory" ); } #define gasneti_local_mb() gasneti_local_mb() #else #define GASNETI_USING_SLOW_MEMBARS 1 #endif /* Common: */ #define gasneti_local_wmb() gasneti_local_mb() #define gasneti_local_rmb() gasneti_local_mb() #define GASNETI_RMB_IS_MB #define GASNETI_WMB_IS_MB /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_AARCH64 #if GASNETI_HAVE_GCC_ASM #define gasneti_local_wmb() GASNETI_ASM("dmb ishst") #define gasneti_local_rmb() GASNETI_ASM("dmb ishld") #define gasneti_local_mb() GASNETI_ASM("dmb ish") #else #define GASNETI_USING_SLOW_MEMBARS 1 #endif /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_TILE #if PLATFORM_COMPILER_GNU #define gasneti_local_mb() __sync_synchronize() #define gasneti_local_wmb() gasneti_local_mb() #define gasneti_local_rmb() gasneti_local_mb() #else #define GASNETI_USING_SLOW_MEMBARS 1 #endif #define GASNETI_RMB_IS_MB #define GASNETI_WMB_IS_MB #elif PLATFORM_ARCH_S390 #if PLATFORM_COMPILER_GNU #define gasneti_local_mb() __sync_synchronize() #define gasneti_local_wmb() gasneti_local_mb() #define gasneti_local_rmb() gasneti_local_mb() #else #define GASNETI_USING_SLOW_MEMBARS 1 #endif #define GASNETI_RMB_IS_MB #define GASNETI_WMB_IS_MB #elif PLATFORM_ARCH_RISCV #if PLATFORM_COMPILER_GNU #define gasneti_local_mb() __sync_synchronize() #define gasneti_local_wmb() gasneti_local_mb() #define gasneti_local_rmb() gasneti_local_mb() #else #define GASNETI_USING_SLOW_MEMBARS 1 #endif #define GASNETI_RMB_IS_MB #define GASNETI_WMB_IS_MB #else #error unknown CPU - dont know how to do a local memory barrier for your CPU/OS #endif /* ------------------------------------------------------------------------------------ */ /* Default gasneti_compiler_fence() */ #ifndef gasneti_compiler_fence #define gasneti_compiler_fence() GASNETI_ASM("") #endif /* Default gasneti_local_rmb() */ #ifndef gasneti_local_rmb #define gasneti_local_rmb() gasneti_compiler_fence() #define GASNETI_RMB_IS_DEFAULT 1 #endif /* NO Default for gasneti_local_wmb() to avoid mistakes - it must be explicitly provided */ /* Default gasneti_local_mb() */ #ifndef gasneti_local_mb #define gasneti_local_mb() do { gasneti_local_wmb(); gasneti_local_rmb(); } while (0) #define GASNETI_MB_IS_DEFAULT 1 #endif /* ------------------------------------------------------------------------------------ */ /* Special membar wrappers */ #if defined(GASNETI_FORCE_YIELD_MEMBARS) || defined(GASNETI_FORCE_SLOW_MEMBARS) /* Step 1: capture existing definitions: */ GASNETI_INLINE(_gasneti_inline_compiler_fence) void _gasneti_inline_compiler_fence(void) { gasneti_compiler_fence(); } GASNETI_INLINE(_gasneti_inline_local_wmb) void _gasneti_inline_local_wmb(void) { gasneti_local_wmb(); } GASNETI_INLINE(_gasneti_inline_local_rmb) void _gasneti_inline_local_rmb(void) { gasneti_local_rmb(); } GASNETI_INLINE(_gasneti_inline_local_mb) void _gasneti_inline_local_mb(void) { gasneti_local_mb(); } /* Step 2: remove any macro definitions */ #undef gasneti_compiler_fence #undef gasneti_local_wmb #undef gasneti_local_rmb #undef gasneti_local_mb /* Step 3: define wrapers */ #if defined(GASNETI_FORCE_YIELD_MEMBARS) /* 3a: These defines force a gasneti_sched_yield() ahead of the actual call: */ #define gasneti_compiler_fence() do {gasneti_sched_yield(); _gasneti_inline_compiler_fence(); } while(0) #define gasneti_local_wmb() do {gasneti_sched_yield(); _gasneti_inline_local_wmb(); } while(0) #define gasneti_local_rmb() do {gasneti_sched_yield(); _gasneti_inline_local_rmb(); } while(0) #define gasneti_local_mb() do {gasneti_sched_yield(); _gasneti_inline_local_mb(); } while(0) #elif defined(GASNETI_FORCE_SLOW_MEMBARS) /* 3b: These defines trigger the "slow membars" code below */ #define GASNETI_COMPILER_FENCE_BODY _gasneti_inline_compiler_fence() #define GASNETI_LOCAL_WMB_BODY _gasneti_inline_local_wmb() #define GASNETI_LOCAL_RMB_BODY _gasneti_inline_local_rmb() #define GASNETI_LOCAL_MB_BODY _gasneti_inline_local_mb() #else #error "Unreachable" #endif #endif /* ------------------------------------------------------------------------------------ */ /* Slow membars for compilers w/o inline assembly supprt * or any compiler without an effective inline compiler fence. * Could be CXX, MPI_CC or unknown */ #if GASNETI_USING_SLOW_MEMBARS && GASNETI_COMPILER_IS_CC #error unknown compiler - do not know how to generate local memory barriers #endif #if GASNETI_USING_SLOW_MEMBARS || defined(GASNETI_LOCAL_WMB_BODY) extern void gasneti_slow_local_wmb(); #undef gasneti_local_wmb #define gasneti_local_wmb() gasneti_slow_local_wmb() #endif #if GASNETI_USING_SLOW_MEMBARS || defined(GASNETI_LOCAL_RMB_BODY) extern void gasneti_slow_local_rmb(); #undef gasneti_local_rmb #define gasneti_local_rmb() gasneti_slow_local_rmb() #endif #if GASNETI_USING_SLOW_MEMBARS || defined(GASNETI_LOCAL_MB_BODY) extern void gasneti_slow_local_mb(); #undef gasneti_local_mb #define gasneti_local_mb() gasneti_slow_local_mb() #endif #if GASNETI_USING_SLOW_MEMBARS || defined(GASNETI_COMPILER_FENCE_BODY) extern void gasneti_slow_compiler_fence(); #undef gasneti_compiler_fence #define gasneti_compiler_fence() gasneti_slow_compiler_fence() #endif /* ------------------------------------------------------------------------------------ */ /* Properties of the memory barriers (as boolean preprocessor tokens) GASNETI_RMB_IS_MB rmb() is sufficient for mb() GASNETI_WMB_IS_MB wmb() is sufficient for mb() GASNETI_MB_IS_SUM wmb()+rmb() is mb(), as opposed to a double mb() These tokens are used by the fenced atomics to produce minimal code. What follows "normalizes" these tokens to 0 or 1 and applies defaults. The defaults are always safe, but perhaps sub-optimal. The defns of the membars should define non-defaults appropriately. THESE ARE *NOT* INTENDED FOR GENERAL USE IN CONDUIT CODE. */ #ifndef GASNETI_RMB_IS_MB /* Default: assume rmb() is not a full mb(). */ #define GASNETI_RMB_IS_MB 0 #else #undef GASNETI_RMB_IS_MB #define GASNETI_RMB_IS_MB 1 #endif #ifndef GASNETI_WMB_IS_MB /* Default: assume wmb() is a full mb() if using default impls. */ #if defined(GASNETI_MB_IS_DEFAULT) && defined(GASNETI_RMB_IS_DEFAULT) #define GASNETI_WMB_IS_MB 1 #else #define GASNETI_WMB_IS_MB 0 #endif #else #undef GASNETI_WMB_IS_MB #define GASNETI_WMB_IS_MB 1 #endif #ifndef GASNETI_MB_IS_SUM /* Default: assume mb() = rmb() + wmb() if using the default impl. */ #if defined(GASNETI_MB_IS_DEFAULT) #define GASNETI_MB_IS_SUM 1 #else #define GASNETI_MB_IS_SUM 0 #endif #else #undef GASNETI_MB_IS_SUM #define GASNETI_MB_IS_SUM 1 #endif #undef GASNETI_MB_IS_DEFAULT #undef GASNETI_RMB_IS_DEFAULT /* ------------------------------------------------------------------------------------ */ /* Conditionally compiled memory barriers - gasneti_sync_{reads,writes,mem} are like gasneti_local_{rmb,wmb,mb} except that when not using threads we want them to compile away to nothing, and when compiling for threads on a uniprocessor we want only a compiler optimization barrier Note these should *only* be used when synchronizing node-private memory between local pthreads - they are not guaranteed to provide synchonization with respect to put/gets by remote nodes (in the presence of RDMA), and therefore are generally unsuitable for synchronizing memory locations in the gasnet segment */ #ifndef gasneti_sync_writes #if GASNET_SEQ && !GASNETI_THREADS #define gasneti_sync_writes() ((void)0) #elif GASNETI_UNI_BUILD #define gasneti_sync_writes() gasneti_compiler_fence() #else #define gasneti_sync_writes() gasneti_local_wmb() #endif #endif #ifndef gasneti_sync_reads #if GASNET_SEQ && !GASNETI_THREADS #define gasneti_sync_reads() ((void)0) #elif GASNETI_UNI_BUILD #define gasneti_sync_reads() gasneti_compiler_fence() #else #define gasneti_sync_reads() gasneti_local_rmb() #endif #endif #ifndef gasneti_sync_mem #if GASNET_SEQ && !GASNETI_THREADS #define gasneti_sync_mem() ((void)0) #elif GASNETI_UNI_BUILD #define gasneti_sync_mem() gasneti_compiler_fence() #else #define gasneti_sync_mem() gasneti_local_mb() #endif #endif /* ------------------------------------------------------------------------------------ */ #ifndef gasneti_spinloop_hint #if defined(GASNETI_PAUSE_INSTRUCTION) && GASNETI_ASM_AVAILABLE // Modern Intel architectures get measurably better performance when a // "pause" instruction is inserted in spin-loops. This instruction is // documented as a "spin-loop hint" which avoids a memory hazard stall on // spin loop exit and reduces power consumption. However, it also adds // a non-trivial delay and disables speculation. Proper usage is to place // this hint immediately following the branch which exits the spin loop. // For example usage, see comments for GASNETI_WAITHOOK() in gasnet_help.h. // Ancient Intel CPU's treat this instruction as a no-op. #define gasneti_spinloop_hint() GASNETI_ASM(GASNETI_PAUSE_INSTRUCTION) #else #define gasneti_spinloop_hint() gasneti_compiler_fence() #endif #endif /* ------------------------------------------------------------------------------------ */ #if defined(GASNETI_FORCE_YIELD_MEMBARS) #define GASNETI_MEMBAR_CONFIG membars_forced_yield #elif defined(GASNETI_FORCE_SLOW_MEMBARS) #define GASNETI_MEMBAR_CONFIG membars_forced_slow #else #define GASNETI_MEMBAR_CONFIG membars_native #endif /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/gasnet_syncops.h0000664000175000017500000012425615142313673016644 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_syncops.h $ * Description: GASNet header for synchronization operations used in GASNet implementation * Copyright 2006, Dan Bonachea * Terms of use are as specified in license.txt */ #if !defined(_IN_GASNET_INTERNAL_H) #error This file is not meant to be included directly- internal code should include gasnet_internal.h #endif #ifndef _GASNET_SYNCOPS_H #define _GASNET_SYNCOPS_H /* ------------------------------------------------------------------------------------ */ /* * The gasnet mutex code is in gasnet_toolhelp.h * The gasnet spinlock code is in gasnet_help.h */ /* ------------------------------------------------------------------------------------ */ /* * gasneti_semaphore_t * * This is a simple busy-waiting semaphore used, for instance, to control access to * some resource of known multiplicity. * * Unless GASNETI_SEMAPHORES_NOT_SIGNALSAFE is defined, the operations "up" and "up_n" * are safe from signal context and the "trydown", "trydown_n" and "trydown_partial" * are non-blocking from signal context. However, calls to the trydown* functions from * signal context might never succeed if the thead interrupted by the signal was to * execute a matching "up". * * When debugging a non-zero 'limit' (given in the static or dynamic initializer) will * be checked to detect usage errors. A 'limit' of zero disables this checking. * * GASNETI_SEMAPHORE_MAX * Maximum value supported by the implementation. * GASNETI_SEMAPHORE_INITIALIZER(value, limit) * Static initializer macro. * gasneti_semaphore_init(&sema, value, limit) * Dynamic initializer * gasneti_semaphore_destroy(&sema) * Destructor for dynamicaly initialized semaphores. * gasneti_semaphore_read(&sema) * Returns current value - mainly useful for debugging. * gasneti_semaphore_up(&sema) * Increments value atomically. * gasneti_semaphore_up_n(&sema, n) * Adds 'n' to value atomically. * gasneti_semaphore_trydown(&sema) * Atomically reduce value by 1 if new value would be non-negative. * Returns 1 if value was reduced, or 0 otherwise. * gasneti_semaphore_trydown_n(&sema, n) * Atomically reduce value by 'n' if new value would be non-negative. * Returns 'n' if value was reduced, or 0 otherwise. * gasneti_semaphore_trydown_partial(&sema, n) * Atomically reduce value by up to 'n', such that value is non-negative. * Returns value in range 0 to 'n', indicating amount value was reduced. */ #if defined(GASNETI_FORCE_GENERIC_SEMAPHORES) || /* for debugging */ \ defined(GASNETI_USE_GENERIC_ATOMICOPS) || /* avoids double locking */ \ !GASNETI_THREADS || /* avoids complexity of atomic algorithms */ \ !(defined(GASNETI_HAVE_ATOMIC_CAS) || defined(GASNETI_HAVE_ATOMIC_ADD_SUB)) /* lack needed ops */ #define GASNETI_USE_GENERIC_SEMAPHORES 1 #endif #if defined(GASNETI_USE_GENERIC_SEMAPHORES) /* Generic mutex-based implementation */ typedef struct { gasneti_mutex_t lock; gasneti_atomic_val_t count; /* keeps size consistent beween SEQ and PAR builds */ } _gasneti_semaphore_t; #define _GASNETI_SEMAPHORE_INITIALIZER(N) {GASNETI_MUTEX_INITIALIZER, (N)} #define GASNETI_SEMAPHORE_MAX GASNETI_ATOMIC_MAX GASNETI_INLINE(_gasneti_semaphore_init) void _gasneti_semaphore_init(_gasneti_semaphore_t *s, int n) { gasneti_mutex_init(&(s->lock)); s->count = n; } GASNETI_INLINE(_gasneti_semaphore_destroy) void _gasneti_semaphore_destroy(_gasneti_semaphore_t *s) { gasneti_mutex_destroy(&(s->lock)); } GASNETI_INLINE(_gasneti_semaphore_read) gasneti_atomic_val_t _gasneti_semaphore_read(_gasneti_semaphore_t *s) { return s->count; /* no lock required */ } GASNETI_INLINE(_gasneti_semaphore_up) void _gasneti_semaphore_up(_gasneti_semaphore_t *s) { gasneti_mutex_lock(&(s->lock)); s->count += 1; gasneti_mutex_unlock(&(s->lock)); } GASNETI_INLINE(_gasneti_semaphore_trydown) int _gasneti_semaphore_trydown(_gasneti_semaphore_t *s) { int retval; gasneti_mutex_lock(&(s->lock)); retval = s->count; if_pt (retval != 0) s->count -= 1; gasneti_mutex_unlock(&(s->lock)); return retval; } GASNETI_INLINE(_gasneti_semaphore_up_n) void _gasneti_semaphore_up_n(_gasneti_semaphore_t *s, gasneti_atomic_val_t n) { gasneti_mutex_lock(&(s->lock)); s->count += n; gasneti_mutex_unlock(&(s->lock)); } GASNETI_INLINE(_gasneti_semaphore_trydown_partial) gasneti_atomic_val_t _gasneti_semaphore_trydown_partial(_gasneti_semaphore_t *s, gasneti_atomic_val_t n) { gasneti_atomic_val_t retval, old; gasneti_mutex_lock(&(s->lock)); old = s->count; retval = MIN(old, n); s->count -= retval; gasneti_mutex_unlock(&(s->lock)); return retval; } GASNETI_INLINE(_gasneti_semaphore_trydown_n) gasneti_atomic_val_t _gasneti_semaphore_trydown_n(_gasneti_semaphore_t *s, gasneti_atomic_val_t n) { gasneti_mutex_lock(&(s->lock)); if_pt (s->count >= n) s->count -= n; else n = 0; gasneti_mutex_unlock(&(s->lock)); return n; } #elif defined(GASNETI_HAVE_ATOMIC_CAS) /* Semi-generic implementation for CAS-capable systems */ typedef gasneti_weakatomic_t _gasneti_semaphore_t; #define _GASNETI_SEMAPHORE_INITIALIZER gasneti_weakatomic_init #define GASNETI_SEMAPHORE_MAX GASNETI_ATOMIC_MAX GASNETI_INLINE(_gasneti_semaphore_init) void _gasneti_semaphore_init(_gasneti_semaphore_t *s, int n) { gasneti_weakatomic_set(s, n, GASNETI_ATOMIC_REL); } GASNETI_INLINE(_gasneti_semaphore_destroy) void _gasneti_semaphore_destroy(_gasneti_semaphore_t *s) { /* Nothing */ } GASNETI_INLINE(_gasneti_semaphore_read) gasneti_atomic_val_t _gasneti_semaphore_read(_gasneti_semaphore_t *s) { return gasneti_weakatomic_read(s, 0); } GASNETI_INLINE(_gasneti_semaphore_up) void _gasneti_semaphore_up(_gasneti_semaphore_t *s) { gasneti_weakatomic_increment(s, GASNETI_ATOMIC_REL); } GASNETI_INLINE(_gasneti_semaphore_trydown) int _gasneti_semaphore_trydown(_gasneti_semaphore_t *s) { int retval = 0; do { const gasneti_atomic_val_t old = gasneti_weakatomic_read(s, 0); if_pf (old == 0) { return 0; /* Note: "break" here generates infinite loop w/ pathcc 2.4 (bug 1620) */ } retval = gasneti_weakatomic_compare_and_swap(s, old, old - 1, GASNETI_ATOMIC_ACQ_IF_TRUE); } while (GASNETT_PREDICT_FALSE(!retval)); return retval; } GASNETI_INLINE(_gasneti_semaphore_up_n) void _gasneti_semaphore_up_n(_gasneti_semaphore_t *s, gasneti_atomic_val_t n) { #if GASNETI_HAVE_ATOMIC_ADD_SUB (void)gasneti_weakatomic_add(s, n, GASNETI_ATOMIC_REL); #else int swap; do { const gasneti_atomic_val_t old = gasneti_weakatomic_read(s, 0); swap = gasneti_weakatomic_compare_and_swap(s, old, old + n, GASNETI_ATOMIC_REL); } while (GASNETT_PREDICT_FALSE(!swap)); #endif } GASNETI_INLINE(_gasneti_semaphore_trydown_partial) gasneti_atomic_val_t _gasneti_semaphore_trydown_partial(_gasneti_semaphore_t *s, gasneti_atomic_val_t n) { gasneti_atomic_val_t retval = 0; int swap; do { const gasneti_atomic_val_t old = gasneti_weakatomic_read(s, 0); if_pf (old == 0) break; retval = MIN(old, n); swap = gasneti_weakatomic_compare_and_swap(s, old, old - retval, GASNETI_ATOMIC_ACQ_IF_TRUE); } while (GASNETT_PREDICT_FALSE(!swap)); return retval; } GASNETI_INLINE(_gasneti_semaphore_trydown_n) gasneti_atomic_val_t _gasneti_semaphore_trydown_n(_gasneti_semaphore_t *s, gasneti_atomic_val_t n) { int swap; do { const gasneti_atomic_val_t old = gasneti_weakatomic_read(s, 0); if_pf (old < n) { n = 0; break; } swap = gasneti_weakatomic_compare_and_swap(s, old, old - n, GASNETI_ATOMIC_ACQ_IF_TRUE); } while (GASNETT_PREDICT_FALSE(!swap)); return n; } #elif defined(GASNETI_HAVE_ATOMIC_ADD_SUB) /* Semi-generic implementation for add-and-fetch capable systems */ typedef gasneti_weakatomic_t _gasneti_semaphore_t; #define _GASNETI_SEMAPHORE_INITIALIZER gasneti_weakatomic_init #define GASNETI_SEMAPHORE_MAX GASNETI_ATOMIC_SIGNED_MAX GASNETI_INLINE(_gasneti_semaphore_init) void _gasneti_semaphore_init(_gasneti_semaphore_t *s, int n) { gasneti_weakatomic_set(s, n, GASNETI_ATOMIC_REL); } GASNETI_INLINE(_gasneti_semaphore_destroy) void _gasneti_semaphore_destroy(_gasneti_semaphore_t *s) { /* Nothing */ } GASNETI_INLINE(_gasneti_semaphore_read) gasneti_atomic_val_t _gasneti_semaphore_read(_gasneti_semaphore_t *s) { const gasneti_atomic_sval_t tmp = gasneti_atomic_signed(gasneti_weakatomic_read(s, 0)); return (tmp >= 0) ? tmp : 0; } GASNETI_INLINE(_gasneti_semaphore_up) void _gasneti_semaphore_up(_gasneti_semaphore_t *s) { gasneti_weakatomic_increment(s, GASNETI_ATOMIC_REL); } GASNETI_INLINE(_gasneti_semaphore_trydown) int _gasneti_semaphore_trydown(_gasneti_semaphore_t *s) { int retval = 0; if_pt (gasneti_atomic_signed(gasneti_weakatomic_read(s, 0)) > 0) { if_pt (gasneti_atomic_signed(gasneti_weakatomic_subtract(s, 1, 0)) >= 0) { gasneti_local_rmb(); /* Acquire */ retval = 1; } else { gasneti_weakatomic_increment(s, 0); } } return retval; } GASNETI_INLINE(_gasneti_semaphore_up_n) void _gasneti_semaphore_up_n(_gasneti_semaphore_t *s, gasneti_atomic_val_t n) { (void)gasneti_weakatomic_add(s, n, GASNETI_ATOMIC_REL); } GASNETI_INLINE(_gasneti_semaphore_trydown_partial) gasneti_atomic_val_t _gasneti_semaphore_trydown_partial(_gasneti_semaphore_t *s, gasneti_atomic_val_t n) { int retval = 0; if_pt (gasneti_atomic_signed(gasneti_weakatomic_read(s, 0)) > 0) { gasneti_atomic_sval_t tmp = gasneti_atomic_signed(gasneti_weakatomic_subtract(s, n, 0)); if_pt (tmp >= 0) { gasneti_local_rmb(); /* Acquire */ retval = n; } else if (tmp >= -((gasneti_atomic_sval_t)n)) { retval = n + tmp; (void)gasneti_weakatomic_add(s, -tmp, 0); } else { /* retval = 0 already */ } } return retval; } GASNETI_INLINE(_gasneti_semaphore_trydown_n) gasneti_atomic_val_t _gasneti_semaphore_trydown_n(_gasneti_semaphore_t *s, gasneti_atomic_val_t n) { int retval = 0; if_pt (gasneti_atomic_signed(gasneti_weakatomic_read(s, 0)) >= n) { if_pt (gasneti_atomic_signed(gasneti_weakatomic_subtract(s, n, 0)) >= 0) { gasneti_local_rmb(); /* Acquire */ retval = n; } else { (void)gasneti_weakatomic_add(s, n, 0); } } return retval; } #endif #if defined(GASNETI_USE_GENERIC_SEMAPHORES) || defined(GASNETI_ATOMICOPS_NOT_SIGNALSAFE) #define GASNETI_SEMAPHORES_NOT_SIGNALSAFE 1 #endif typedef struct { #if GASNET_DEBUG _gasneti_semaphore_t S; gasneti_atomic_val_t limit; char _pad[GASNETI_CACHE_PAD(sizeof(gasneti_atomic_val_t)+sizeof(_gasneti_semaphore_t))]; #else _gasneti_semaphore_t S; char _pad[GASNETI_CACHE_PAD(sizeof(_gasneti_semaphore_t))]; #endif } gasneti_semaphore_t_PAR; #if GASNET_DEBUG #define GASNETI_SEMAPHORE_INITIALIZER_PAR(N,L) {_GASNETI_SEMAPHORE_INITIALIZER(N), (L),} #define GASNETI_SEMA_CHECK(_s) do { \ gasneti_atomic_val_t _tmp = _gasneti_semaphore_read(&(_s)->S); \ gasneti_assert_uint(_tmp ,<=, GASNETI_SEMAPHORE_MAX); \ gasneti_assert((_tmp <= (_s)->limit) || !(_s)->limit); \ } while (0) #else #define GASNETI_SEMAPHORE_INITIALIZER_PAR(N,L) {_GASNETI_SEMAPHORE_INITIALIZER(N),} #define GASNETI_SEMA_CHECK(_s) do {} while(0) #endif /* gasneti_semaphore_init */ GASNETI_INLINE(gasneti_semaphore_init_PAR) void gasneti_semaphore_init_PAR(gasneti_semaphore_t_PAR *s, int n, gasneti_atomic_val_t limit) { gasneti_assert_uint(limit ,<=, GASNETI_SEMAPHORE_MAX); _gasneti_semaphore_init(&(s->S), n); #if GASNET_DEBUG s->limit = limit; #endif GASNETI_SEMA_CHECK(s); } /* gasneti_semaphore_destroy */ GASNETI_INLINE(gasneti_semaphore_destroy_PAR) void gasneti_semaphore_destroy_PAR(gasneti_semaphore_t_PAR *s) { GASNETI_SEMA_CHECK(s); _gasneti_semaphore_destroy(&(s->S)); } /* gasneti_semaphore_read * * Returns current value of the semaphore */ GASNETI_INLINE(gasneti_semaphore_read_PAR) gasneti_atomic_val_t gasneti_semaphore_read_PAR(gasneti_semaphore_t_PAR *s) { GASNETI_SEMA_CHECK(s); return _gasneti_semaphore_read(&(s->S)); } /* gasneti_semaphore_up * * Atomically increments the value of the semaphore. * Since this just a busy-waiting semaphore, no waking operations are required. */ GASNETI_INLINE(gasneti_semaphore_up_PAR) void gasneti_semaphore_up_PAR(gasneti_semaphore_t_PAR *s) { GASNETI_SEMA_CHECK(s); _gasneti_semaphore_up(&(s->S)); GASNETI_SEMA_CHECK(s); } /* gasneti_semaphore_trydown * * If the value of the semaphore is non-zero, decrements it and returns non-zero. * If the value is zero, returns zero. Otherwise returns 1; */ GASNETI_INLINE(gasneti_semaphore_trydown_PAR) GASNETI_WARN_UNUSED_RESULT int gasneti_semaphore_trydown_PAR(gasneti_semaphore_t_PAR *s) { int retval; GASNETI_SEMA_CHECK(s); retval = _gasneti_semaphore_trydown(&(s->S)); GASNETI_SEMA_CHECK(s); return retval; } /* gasneti_semaphore_up_n * * Increases the value of the semaphore by the indicated count. * Since this just a busy-waiting semaphore, no waking operations are required. */ GASNETI_INLINE(gasneti_semaphore_up_n_PAR) void gasneti_semaphore_up_n_PAR(gasneti_semaphore_t_PAR *s, gasneti_atomic_val_t n) { GASNETI_SEMA_CHECK(s); _gasneti_semaphore_up_n(&(s->S), n); GASNETI_SEMA_CHECK(s); } /* gasneti_semaphore_trydown_n * * Decrements the semaphore by 'n' or fails. * If the "old" value is zero, returns zero. */ GASNETI_INLINE(gasneti_semaphore_trydown_n_PAR) GASNETI_WARN_UNUSED_RESULT gasneti_atomic_val_t gasneti_semaphore_trydown_n_PAR(gasneti_semaphore_t_PAR *s, gasneti_atomic_val_t n) { gasneti_atomic_val_t retval; GASNETI_SEMA_CHECK(s); retval = _gasneti_semaphore_trydown_n(&(s->S), n); GASNETI_SEMA_CHECK(s); return retval; } /* gasneti_semaphore_trydown_partial * * Decrements the semaphore by as much as 'n' and returns the number of "counts" thus * obtained. The decrement is the smaller of 'n' and the "old" value of the semaphore, * and this value is returned. * If the "old" value is zero, returns zero. */ GASNETI_INLINE(gasneti_semaphore_trydown_partial_PAR) GASNETI_WARN_UNUSED_RESULT gasneti_atomic_val_t gasneti_semaphore_trydown_partial_PAR(gasneti_semaphore_t_PAR *s, gasneti_atomic_val_t n) { gasneti_atomic_val_t retval; GASNETI_SEMA_CHECK(s); retval = _gasneti_semaphore_trydown_partial(&(s->S), n); GASNETI_SEMA_CHECK(s); return retval; } /* _SEQ implementation of semaphores */ #define GASNETI_SEMAPHORE_MAX_SEQ GASNETI_ATOMIC_MAX #if GASNET_DEBUG typedef struct { gasneti_atomic_val_t count; gasneti_atomic_val_t limit; } gasneti_semaphore_t_SEQ; #define GASNETI_SEMAPHORE_INITIALIZER_SEQ(count,limit) { (count), (limit) } #define GASNETI_SEMA_CHECK_SEQ(_s) do { \ gasneti_assert_uint((_s)->count ,<=, GASNETI_SEMAPHORE_MAX_SEQ); \ gasneti_assert(((_s)->count <= (_s)->limit) || !(_s)->limit); \ } while (0) #else typedef struct { gasneti_atomic_val_t count; } gasneti_semaphore_t_SEQ; #define GASNETI_SEMAPHORE_INITIALIZER_SEQ(count,limit) { (count) } #define GASNETI_SEMA_CHECK_SEQ(_s) do { } while (0) #endif GASNETI_INLINE(gasneti_semaphore_init_SEQ) void gasneti_semaphore_init_SEQ(gasneti_semaphore_t_SEQ *s, gasneti_atomic_val_t value, gasneti_atomic_val_t limit) { s->count = value; #if GASNET_DEBUG s->limit = limit; #endif GASNETI_SEMA_CHECK_SEQ(s); } GASNETI_INLINE(gasneti_semaphore_destroy_SEQ) void gasneti_semaphore_destroy_SEQ(gasneti_semaphore_t_SEQ *s) { GASNETI_SEMA_CHECK_SEQ(s); /* Nothing */ } GASNETI_INLINE(gasneti_semaphore_read_SEQ) gasneti_atomic_val_t gasneti_semaphore_read_SEQ(gasneti_semaphore_t_SEQ *s) { GASNETI_SEMA_CHECK_SEQ(s); return s->count; } GASNETI_INLINE(gasneti_semaphore_up_SEQ) void gasneti_semaphore_up_SEQ(gasneti_semaphore_t_SEQ *s) { GASNETI_SEMA_CHECK_SEQ(s); s->count += 1; GASNETI_SEMA_CHECK_SEQ(s); } GASNETI_INLINE(gasneti_semaphore_trydown_SEQ) GASNETI_WARN_UNUSED_RESULT int gasneti_semaphore_trydown_SEQ(gasneti_semaphore_t_SEQ *s) { int retval; GASNETI_SEMA_CHECK_SEQ(s); retval = s->count; if_pt (retval != 0) s->count -= 1; GASNETI_SEMA_CHECK_SEQ(s); return retval; } GASNETI_INLINE(gasneti_semaphore_up_n_SEQ) void gasneti_semaphore_up_n_SEQ(gasneti_semaphore_t_SEQ *s, gasneti_atomic_val_t n) { GASNETI_SEMA_CHECK_SEQ(s); s->count += n; GASNETI_SEMA_CHECK_SEQ(s); } GASNETI_INLINE(gasneti_semaphore_trydown_n_SEQ) GASNETI_WARN_UNUSED_RESULT gasneti_atomic_val_t gasneti_semaphore_trydown_n_SEQ(gasneti_semaphore_t_SEQ *s, gasneti_atomic_val_t n) { GASNETI_SEMA_CHECK_SEQ(s); if_pt (s->count >= n) { s->count -= n; } else { n = 0; } GASNETI_SEMA_CHECK_SEQ(s); return n; } GASNETI_INLINE(gasneti_semaphore_trydown_partial_SEQ) GASNETI_WARN_UNUSED_RESULT gasneti_atomic_val_t gasneti_semaphore_trydown_partial_SEQ(gasneti_semaphore_t_SEQ *s, gasneti_atomic_val_t n) { GASNETI_SEMA_CHECK_SEQ(s); n = MIN(s->count, n); s->count -= n; GASNETI_SEMA_CHECK_SEQ(s); return n; } /* Finally define gasneti_semaphore in terms of either the _PAR or _SEQ variant */ #define GASNETI_CONS_SEMA(_suff,_id) _CONCAT(GASNETI_SEMAPHORE_,_CONCAT(_id,_suff)) #define gasneti_cons_sema(_suff,_id) _CONCAT(gasneti_semaphore_,_CONCAT(_id,_suff)) #define GASNETI_SEMAPHORE_INITIALIZER GASNETI_CONS_SEMA(_GASNETI_PARSEQ,INITIALIZER) #define gasneti_semaphore_t gasneti_cons_sema(_GASNETI_PARSEQ,t) #define gasneti_semaphore_init gasneti_cons_sema(_GASNETI_PARSEQ,init) #define gasneti_semaphore_destroy gasneti_cons_sema(_GASNETI_PARSEQ,destroy) #define gasneti_semaphore_read gasneti_cons_sema(_GASNETI_PARSEQ,read) #define gasneti_semaphore_up gasneti_cons_sema(_GASNETI_PARSEQ,up) #define gasneti_semaphore_trydown gasneti_cons_sema(_GASNETI_PARSEQ,trydown) #define gasneti_semaphore_up_n gasneti_cons_sema(_GASNETI_PARSEQ,up_n) #define gasneti_semaphore_trydown_n gasneti_cons_sema(_GASNETI_PARSEQ,trydown_n) #define gasneti_semaphore_trydown_partial gasneti_cons_sema(_GASNETI_PARSEQ,trydown_partial) /* ------------------------------------------------------------------------------------ */ /* Optional atomic operations for pointer-sized data. * FOR USE IN THIS FILE ONLY, UNTIL THIS IS MORE STABLE/COMPLETE. * * If GASNETI_HAVE_ATOMIC_PTR_CAS is defined: * gasneti_atomic_ptr_t * gasneti_atomic_ptr_init(val) * gasneti_atomic_ptr_set(ptr, val) * gasneti_atomic_ptr_read(ptr) * gasneti_atomic_ptr_cas(ptr, oldval, newval, flags) * * If GASNETI_HAVE_ATOMIC_DBLPTR_CAS is defined: * gasneti_atomic_dblptr_t * gasneti_atomic_dblptr_init(hi, lo) * gasneti_atomic_dblptr_set(ptr, hi, lo) // NON atomic * gasneti_atomic_dblptr_set_hi(ptr, hi) * gasneti_atomic_dblptr_set_lo(ptr, lo) * gasneti_atomic_dblptr_read_lo(ptr) * gasneti_atomic_dblptr_read_hi(ptr) * gasneti_atomic_dblptr_cas2(ptr, oldhi, oldlo, newhi, newlo, flags) * gasneti_atomic_dblptr_cas_lo(ptr, oldhi, oldlo, flags) * gasneti_atomic_dblptr_cas_hi(ptr, newhi, newlo, flags) * * All values are uintptr_t, not (void*). * * NOTE: The set/read operations all currently lack a "flags" argument. * It can be added later if ever really needed. * * NOTE: These are for internal use only. So, there are no "slow atomic" versions * for use with C++ compilers that lack the asm support present in the corresponding * C compiler. However, it is possible to implement "special atomic" versions for * compilers with limited asm support (PGI < 6.1 and SunPro) */ /* Default implementations: */ #if defined(GASNETI_HAVE_ATOMIC_PTR_CAS) /* Use platform-specific version */ #elif PLATFORM_ARCH_32 && !defined(GASNETI_USE_GENERIC_ATOMIC32) #define GASNETI_HAVE_ATOMIC_PTR_CAS 1 typedef gasneti_atomic32_t gasneti_atomic_ptr_t; #define gasneti_atomic_ptr_init(_v) gasneti_atomic32_init((uintptr_t)(_v)) #define gasneti_atomic_ptr_set(_p,_v) gasneti_atomic32_set(_p,(uintptr_t)(_v),0) #define gasneti_atomic_ptr_read(_p) ((uintptr_t)gasneti_atomic32_read(_p,0)) #define gasneti_atomic_ptr_cas(_p,_o,_n,_f) gasneti_atomic32_compare_and_swap(_p,(uintptr_t)(_o),(uintptr_t)(_n),_f) #elif PLATFORM_ARCH_64 && !defined(GASNETI_USE_GENERIC_ATOMIC64) #define GASNETI_HAVE_ATOMIC_PTR_CAS 1 typedef gasneti_atomic64_t gasneti_atomic_ptr_t; #define gasneti_atomic_ptr_init(_v) gasneti_atomic64_init((uintptr_t)(_v)) #define gasneti_atomic_ptr_set(_p,_v) gasneti_atomic64_set(_p,(uintptr_t)(_v),0) #define gasneti_atomic_ptr_read(_p) ((uintptr_t)gasneti_atomic64_read(_p,0)) #define gasneti_atomic_ptr_cas(_p,_o,_n,_f) gasneti_atomic64_compare_and_swap(_p,(uintptr_t)(_o),(uintptr_t)(_n),_f) #endif #if defined(GASNETI_HAVE_ATOMIC_DBLPTR_CAS) /* Use platform-specific version */ #elif PLATFORM_ARCH_32 && defined(GASNETI_HAVE_ATOMIC_PTR_CAS) && !defined(GASNETI_USE_GENERIC_ATOMIC64) #if PLATFORM_ARCH_BIG_ENDIAN typedef union { struct { gasneti_atomic_ptr_t hi_ptr, lo_ptr; } ptrs; /* must be first for initializer */ gasneti_atomic64_t a64; } gasneti_atomic_dblptr_t; #else typedef union { struct { gasneti_atomic_ptr_t lo_ptr, hi_ptr; } ptrs; /* must be first for initializer */ gasneti_atomic64_t a64; } gasneti_atomic_dblptr_t; #endif GASNETI_INLINE(gasneti_atomic_dblptr_cas2) int gasneti_atomic_dblptr_cas2(gasneti_atomic_dblptr_t *v, uintptr_t oldhi, uintptr_t oldlo, uintptr_t newhi, uintptr_t newlo, int flags) { uint64_t oldval = GASNETI_MAKEWORD(oldhi, oldlo); uint64_t newval = GASNETI_MAKEWORD(newhi, newlo); return gasneti_atomic64_compare_and_swap(&(v->a64), oldval, newval, flags); } #define GASNETI_GEN_ATOMIC_DBLPTR_CAS 1 /* Causes default version to be constructed below */ #elif PLATFORM_ARCH_64 && defined(GASNETI_HAVE_ATOMIC_PTR_CAS) && \ defined(GASNETI_HAVE_ATOMIC128_T) && (GASNETI_HAVE_ATOMIC128_T <= 8 /*alignment*/) #if PLATFORM_ARCH_BIG_ENDIAN typedef union { struct { gasneti_atomic_ptr_t hi_ptr, lo_ptr; } ptrs; /* must be first for initializer */ gasneti_atomic128_t a128; } gasneti_atomic_dblptr_t; #else typedef union { struct { gasneti_atomic_ptr_t lo_ptr, hi_ptr; } ptrs; /* must be first for initializer */ gasneti_atomic128_t a128; } gasneti_atomic_dblptr_t; #endif GASNETI_INLINE(gasneti_atomic_dblptr_cas2) int gasneti_atomic_dblptr_cas2(gasneti_atomic_dblptr_t *v, uintptr_t oldhi, uintptr_t oldlo, uintptr_t newhi, uintptr_t newlo, int flags) { return gasneti_atomic128_compare_and_swap(&(v->a128), oldhi, oldlo, newhi, newlo, flags); } #define GASNETI_GEN_ATOMIC_DBLPTR_CAS 1 /* Causes default version to be constructed below */ #endif #ifdef GASNETI_GEN_ATOMIC_DBLPTR_CAS #define GASNETI_HAVE_ATOMIC_DBLPTR_CAS 1 /* Defaults in terms of the hi and lo halves */ #if PLATFORM_ARCH_BIG_ENDIAN #ifndef gasneti_atomic_dblptr_init #define gasneti_atomic_dblptr_init(hi,lo) { { gasneti_atomic_ptr_init((uintptr_t)(hi)), \ gasneti_atomic_ptr_init((uintptr_t)(lo)) } } #endif #ifndef gasneti_atomic_dblptr_set #define gasneti_atomic_dblptr_set(p,hi,lo) do { \ gasneti_atomic_ptr_set(&(p)->ptrs.hi_ptr, \ (uintptr_t)(hi)); \ gasneti_atomic_ptr_set(&(p)->ptrs.lo_ptr, \ (uintptr_t)(lo)); \ } while (0) #endif #else #ifndef gasneti_atomic_dblptr_init #define gasneti_atomic_dblptr_init(hi,lo) { { gasneti_atomic_ptr_init((uintptr_t)(lo)), \ gasneti_atomic_ptr_init((uintptr_t)(hi)) } } #endif #ifndef gasneti_atomic_dblptr_set #define gasneti_atomic_dblptr_set(p,hi,lo) do { \ gasneti_atomic_ptr_set(&(p)->ptrs.lo_ptr, \ (uintptr_t)(lo)); \ gasneti_atomic_ptr_set(&(p)->ptrs.hi_ptr, \ (uintptr_t)(hi)); \ } while (0) #endif #endif #ifndef gasneti_atomic_dblptr_set_lo #define gasneti_atomic_dblptr_set_lo(p,lo) do { \ gasneti_atomic_ptr_set(&(p)->ptrs.lo_ptr, \ (uintptr_t)(lo)); \ } while (0) #endif #ifndef gasneti_atomic_dblptr_set_hi #define gasneti_atomic_dblptr_set_hi(p,hi) do { \ gasneti_atomic_ptr_set(&(p)->ptrs.hi_ptr, \ (uintptr_t)(hi)); \ } while (0) #endif #ifndef gasneti_atomic_dblptr_read_lo #define gasneti_atomic_dblptr_read_lo(p) gasneti_atomic_ptr_read(&(p)->ptrs.lo_ptr) #endif #ifndef gasneti_atomic_dblptr_read_hi #define gasneti_atomic_dblptr_read_hi(p) gasneti_atomic_ptr_read(&(p)->ptrs.hi_ptr) #endif #ifndef gasneti_atomic_dblptr_cas_lo #define gasneti_atomic_dblptr_cas_lo(v,oldlo,newlo,flags) \ gasneti_atomic_ptr_cas(&(v)->ptrs.lo_ptr,oldlo,newlo,flags) #endif #ifndef gasneti_atomic_dblptr_cas_hi #define gasneti_atomic_dblptr_cas_hi(v,oldhi,newhi,flags) \ gasneti_atomic_ptr_cas(&(v)->ptrs.hi_ptr,oldhi,newhi,flags) #endif #endif /* ------------------------------------------------------------------------------------ */ /* Gasnet internal LIFO (stack) container. * * This data type provides a last in first out linked list implementation which * is suitable for use as a multiple-producer, multiple-consumer free list. * On architectires where possible, the synchronization is performed with * lock-free/wait-free algorithms. Elsewhere, gasneti_mutex's are used. * * This container type is independent of the type to be stored. The only requirement * is that the first sizeof(void *) bytes of the object are used for the list linkage. * * * GASNETI_LIFO_INITIALIZER * Static initializer for empty LIFO * void gasneti_lifo_init(gasneti_lifo_head_t *lifo); * Initializer for dynamically allocated LIFO * void gasneti_lifo_destroy(gasneti_lifo_head_t *lifo); * Destructor for dynamically allocated LIFO * void *gasneti_lifo_pop(gasneti_lifo_head_t *lifo); * Pop "top" element from the LIFO or NULL if it is empty * void gasneti_lifo_push(gasneti_lifo_head_t *lifo, void *elem); * Push one element on the LIFO * void gasneti_lifo_push_many(gasneti_lifo_head_t *lifo, void *head, void *tail); * Push a chain of linked elements on the LIFO * void gasneti_lifo_link(void *p, void *q); * Build a chain (q follows p) for use with _lifo_push_many() * void *gasneti_lifo_next(void *elem); * Get next element in a chain built with _lifo_link * * Unless GASNETI_LIFOS_NOT_SIGNALSAFE is defined, the operations "pop", "push", and * "push_many" are signal safe. The operations "link" and "next" are always signal * safe since they don't involve access to any shared data structures. * * NOTE: Because a pop operation must derefence a potentially out-of-date "next" * pointer, we prohibit any use of the LIFO in which a former element becomes unmapped * unless one can ensure that no partially-completed POP could be referencing the * object. * * NOTE: Because of the specifics of the representation, it is not permitted to copy * a gasneti_lifo_head_t by value. */ /* Optional arch-specific code */ #if !GASNETI_THREADS /* No threads, so we use the mutex code that compiles away. */ #elif defined(GASNETI_USE_GENERIC_ATOMICOPS) /* If using mutexes, then just use the mutex code */ #elif PLATFORM_ARCH_POWERPC && GASNETI_HAVE_ATOMIC_PTR_CAS && \ GASNETI_HAVE_GCC_ASM /* Among the platforms we currently support, PPC is unique in having an LL/SC * construct which allows a load between the LL and the SC. */ #if GASNETI_HAVE_GCC_ASM typedef struct { /* Ensure list head pointer is the only item on its cache line. * This prevents a live-lock which would result if a list element fell * on the same cache line. */ char _pad0[GASNETI_CACHE_LINE_BYTES]; gasneti_atomic_ptr_t head; char _pad1[GASNETI_CACHE_LINE_BYTES]; } gasneti_lifo_head_t_PAR; GASNETI_INLINE(_gasneti_lifo_push) void _gasneti_lifo_push(gasneti_lifo_head_t_PAR *p, void **head, void **tail) { /* RELEASE semantics */ uintptr_t oldhead; do { oldhead = gasneti_atomic_ptr_read(&p->head); *tail = (void *)oldhead; } while (!gasneti_atomic_ptr_cas(&p->head, oldhead, (uintptr_t)head, GASNETI_ATOMIC_REL)); } GASNETI_INLINE(_gasneti_lifo_pop) void *_gasneti_lifo_pop(gasneti_lifo_head_t_PAR *p) { /* ACQUIRE semantics: 'isync' between read of head and head->next */ register uintptr_t addr = (uintptr_t)(&p->head); register uintptr_t head, next; if_pf (gasneti_atomic_ptr_read(&p->head) == 0) { /* One expects the empty list case to be the most prone to contention because * many threads may be continuously polling for it become non-empty. The l[wd]arx * involves obtaining the cache line in an Exclusive state, while this normal * load does not. Thus this redundant check is IBM's recommended practice. */ return NULL; } #if PLATFORM_ARCH_32 __asm__ __volatile__ ("1: \n\t" "lwarx %1,0,%0 \n\t" /* head = p->head */ "cmpwi 0,%1,0 \n\t" /* head == NULL? */ "beq- 2f \n\t" /* end on NULL */ GASNETI_PPC_RMB_ASM "\n\t" /* rmb */ "lwz %2,0(%1) \n\t" /* next = head->next */ "stwcx. %2,0,%0 \n\t" /* p->head = next */ "bne- 1b \n" /* retry on conflict */ "2: " : "=b" (addr), "=b" (head), "=r" (next) : "0" (addr) : "memory", "cc"); #elif PLATFORM_ARCH_64 __asm__ __volatile__ ("1: \n\t" "ldarx %1,0,%0 \n\t" /* head = p->head */ "cmpdi 0,%1,0 \n\t" /* head == NULL? */ "beq- 2f \n\t" /* end on NULL */ GASNETI_PPC_RMB_ASM "\n\t" /* rmb */ "ld %2,0(%1) \n\t" /* next = head->next */ "stdcx. %2,0,%0 \n\t" /* p->head = next */ "bne- 1b \n" /* retry on conflict */ "2: " : "=b" (addr), "=b" (head), "=r" (next) : "0" (addr) : "memory", "cc"); #else #error "PPC w/ unknown word size" #endif return (void *)head; } GASNETI_INLINE(_gasneti_lifo_init) void _gasneti_lifo_init(gasneti_lifo_head_t_PAR *p) { gasneti_atomic_ptr_set(&p->head, 0); } GASNETI_INLINE(_gasneti_lifo_destroy) void _gasneti_lifo_destroy(gasneti_lifo_head_t_PAR *p) { /* NOTHING */ } #define GASNETI_LIFO_INITIALIZER_PAR {{0,}, gasneti_atomic_ptr_init(0), {0,}} #define GASNETI_HAVE_ARCH_LIFO 1 #endif #elif defined(GASNETI_HAVE_ATOMIC_DBLPTR_CAS) /* Algorithm if we have a compare-and-swap for a type as wide as two pointers. * The lower half holds the head pointer, which the upper half hold a "tag" * which is advanced by one on each operation to avoid the "classic ABA problem". */ typedef struct { char _pad0[GASNETI_CACHE_LINE_BYTES]; gasneti_atomic_dblptr_t head_and_tag; char _pad1[GASNETI_CACHE_LINE_BYTES]; } gasneti_lifo_head_t_PAR; GASNETI_INLINE(_gasneti_lifo_push) void _gasneti_lifo_push(gasneti_lifo_head_t_PAR *p, void **newhead, void **tail) { uintptr_t tag, oldhead; do { oldhead = gasneti_atomic_dblptr_read_lo(&p->head_and_tag); tag = gasneti_atomic_dblptr_read_hi(&p->head_and_tag); *tail = (void *)oldhead; } while (!gasneti_atomic_dblptr_cas2(&p->head_and_tag, tag, oldhead, tag+1, (uintptr_t)newhead, GASNETI_ATOMIC_REL)); } GASNETI_INLINE(_gasneti_lifo_pop) void *_gasneti_lifo_pop(gasneti_lifo_head_t_PAR *p) { uintptr_t tag, oldhead, newhead; do { oldhead = gasneti_atomic_dblptr_read_lo(&p->head_and_tag); tag = gasneti_atomic_dblptr_read_hi(&p->head_and_tag); if_pf (!oldhead) break; newhead = (uintptr_t)(*(void **)oldhead); } while (!gasneti_atomic_dblptr_cas2(&p->head_and_tag, tag, oldhead, tag+1, newhead, GASNETI_ATOMIC_ACQ_IF_TRUE)); return (void *)oldhead; } GASNETI_INLINE(_gasneti_lifo_init) void _gasneti_lifo_init(gasneti_lifo_head_t_PAR *p) { gasneti_atomic_dblptr_set(&p->head_and_tag, 0, 0); } GASNETI_INLINE(_gasneti_lifo_destroy) void _gasneti_lifo_destroy(gasneti_lifo_head_t_PAR *p) { /* NOTHING */ } #define GASNETI_LIFO_INITIALIZER_PAR {{0,}, gasneti_atomic_dblptr_init(0,0), {0,}} #define GASNETI_HAVE_ARCH_LIFO 1 #elif PLATFORM_ARCH_64 && defined(GASNETI_HAVE_ATOMIC128_T) /* Same algorithm as dblptr_cas, above, but with alignment worries added in */ typedef struct { char _pad0[GASNETI_CACHE_LINE_BYTES + GASNETI_HAVE_ATOMIC128_T]; gasneti_atomic128_t head_and_tag; /* Actually might be lower addr, in _pad0 */ char _pad1[GASNETI_CACHE_LINE_BYTES]; } gasneti_lifo_head_t_PAR; #define _GASNETI_LIFO_ALIGN(p) ((uintptr_t)(&(p)->head_and_tag) & ~(GASNETI_HAVE_ATOMIC128_T - 1)) GASNETI_INLINE(_gasneti_lifo_push) void _gasneti_lifo_push(gasneti_lifo_head_t_PAR *p, void **newhead, void **tail) { #if PLATFORM_COMPILER_PGI && PLATFORM_COMPILER_VERSION_GE(16,4,0) && PLATFORM_COMPILER_VERSION_LT(17,1,0) volatile uintptr_t tag; /* See GASNet bug #3324 */ #else uintptr_t tag; #endif uintptr_t oldhead; gasneti_atomic64_t *head = (gasneti_atomic64_t *)_GASNETI_LIFO_ALIGN(p); gasneti_atomic128_t *head_and_tag = (gasneti_atomic128_t *)head; do { oldhead = gasneti_atomic64_read(head, 0); tag = gasneti_atomic64_read(head+1, 0); *tail = (void *)oldhead; } while #if PLATFORM_ARCH_BIG_ENDIAN (!gasneti_atomic128_compare_and_swap(head_and_tag, oldhead, tag, (uintptr_t)newhead, tag+1, GASNETI_ATOMIC_REL)); #else (!gasneti_atomic128_compare_and_swap(head_and_tag, tag, oldhead, tag+1, (uintptr_t)newhead, GASNETI_ATOMIC_REL)); #endif } GASNETI_INLINE(_gasneti_lifo_pop) void *_gasneti_lifo_pop(gasneti_lifo_head_t_PAR *p) { uintptr_t tag, oldhead, newhead; gasneti_atomic64_t *head = (gasneti_atomic64_t *)_GASNETI_LIFO_ALIGN(p); gasneti_atomic128_t *head_and_tag = (gasneti_atomic128_t *)head; do { oldhead = gasneti_atomic64_read(head, 0); tag = gasneti_atomic64_read(head+1, 0); if_pf (!oldhead) break; newhead = (uintptr_t)(*(void **)oldhead); } while #if PLATFORM_ARCH_BIG_ENDIAN (!gasneti_atomic128_compare_and_swap(head_and_tag, oldhead, tag, newhead, tag+1, GASNETI_ATOMIC_ACQ_IF_TRUE)); #else (!gasneti_atomic128_compare_and_swap(head_and_tag, tag, oldhead, tag+1, newhead, GASNETI_ATOMIC_ACQ_IF_TRUE)); #endif return (void *)oldhead; } GASNETI_INLINE(_gasneti_lifo_init) void _gasneti_lifo_init(gasneti_lifo_head_t_PAR *p) { gasneti_atomic128_t *head_and_tag = (gasneti_atomic128_t *)_GASNETI_LIFO_ALIGN(p); gasneti_atomic128_set(head_and_tag, 0, 0, 0); } GASNETI_INLINE(_gasneti_lifo_destroy) void _gasneti_lifo_destroy(gasneti_lifo_head_t_PAR *p) { /* NOTHING */ } #define GASNETI_LIFO_INITIALIZER_PAR {{0,}, gasneti_atomic128_init(0,0), {0,}} #define GASNETI_HAVE_ARCH_LIFO 1 #else /* The LL/SC algorithm used on the PPC will not work on the Alpha or MIPS, which don't * allow for the load we perform between the ll and the sc. More complex algorithms are * probably possible. I'll continue to look into this. -PHH 2006.04.19 * * We do support x86-64 CPUs which implement their optional CAS2 (cmpxchg16b) instruction. * * One possible solution for all remaining platforms is "software ll/sc". Using just pointer * CAS, one can implement an ideal LL/SC which allows for arbitrary loads and stores between * the LL and the SC. This would require a compare-and-swap-pointer atomic operation. * In the contention-free case such an algorithm needs a thread-local data lookup, an rmb() * and two CAS operations, which may or may not make it competative with mutexes. Because * such an algorithm is "wait free", it is expected to perform better under contention than * mutexes. */ #endif /* Generic mutex-based default implementation */ #ifndef GASNETI_HAVE_ARCH_LIFO typedef struct { gasneti_mutex_t lock; void **head; char _pad[GASNETI_CACHE_PAD(sizeof(gasneti_mutex_t)+sizeof(void **))]; } gasneti_lifo_head_t_PAR; GASNETI_INLINE(_gasneti_lifo_push) void _gasneti_lifo_push(gasneti_lifo_head_t_PAR *p, void **head, void **tail) { gasneti_mutex_lock(&(p->lock)); *tail = p->head; p->head = head; gasneti_mutex_unlock(&(p->lock)); } GASNETI_INLINE(_gasneti_lifo_pop) void *_gasneti_lifo_pop(gasneti_lifo_head_t_PAR *p) { void **elem; gasneti_mutex_lock(&(p->lock)); elem = p->head; if_pt (elem != NULL) { p->head = *elem; } gasneti_mutex_unlock(&(p->lock)); return (void *)elem; } GASNETI_INLINE(_gasneti_lifo_init) void _gasneti_lifo_init(gasneti_lifo_head_t_PAR *p) { gasneti_mutex_init(&(p->lock)); p->head = NULL; } GASNETI_INLINE(_gasneti_lifo_destroy) void _gasneti_lifo_destroy(gasneti_lifo_head_t_PAR *p) { gasneti_mutex_destroy(&(p->lock)); } #define GASNETI_LIFO_INITIALIZER_PAR { GASNETI_MUTEX_INITIALIZER, NULL, {0,} } #define GASNETI_HAVE_ARCH_LIFO 0 #define GASNETI_LIFOS_NOT_SIGNALSAFE 1 #endif /* _SEQ variant of gasneti_lifo_head_t */ typedef struct { void **head; } gasneti_lifo_head_t_SEQ; #define GASNETI_LIFO_INITIALIZER_SEQ { NULL } /* Initializer for dynamically allocated lifo heads */ GASNETI_INLINE(gasneti_lifo_init_PAR) void gasneti_lifo_init_PAR(gasneti_lifo_head_t_PAR *lifo) { gasneti_assert(lifo != NULL); _gasneti_lifo_init(lifo); } GASNETI_INLINE(gasneti_lifo_init_SEQ) void gasneti_lifo_init_SEQ(gasneti_lifo_head_t_SEQ *lifo) { gasneti_assert(lifo != NULL); lifo->head = NULL; } /* Destructor for dynamically allocated lifo heads */ GASNETI_INLINE(gasneti_lifo_destroy_PAR) void gasneti_lifo_destroy_PAR(gasneti_lifo_head_t_PAR *lifo) { gasneti_assert(lifo != NULL); _gasneti_lifo_destroy(lifo); } GASNETI_INLINE(gasneti_lifo_destroy_SEQ) void gasneti_lifo_destroy_SEQ(gasneti_lifo_head_t_SEQ *lifo) { gasneti_assert(lifo != NULL); /* Nothing */ } /* Get one element from the LIFO or NULL if it is empty */ GASNETI_INLINE(gasneti_lifo_pop_PAR) GASNETI_MALLOC void *gasneti_lifo_pop_PAR(gasneti_lifo_head_t_PAR *lifo) { gasneti_assert(lifo != NULL); return _gasneti_lifo_pop(lifo); } GASNETI_INLINE(gasneti_lifo_pop_SEQ) GASNETI_MALLOC void *gasneti_lifo_pop_SEQ(gasneti_lifo_head_t_SEQ *lifo) { void **elem; gasneti_assert(lifo != NULL); elem = lifo->head; if_pt (elem != NULL) { lifo->head = *elem; } return (void *)elem; } /* Push element on the LIFO */ GASNETI_INLINE(gasneti_lifo_push_PAR) void gasneti_lifo_push_PAR(gasneti_lifo_head_t_PAR *lifo, void *elem) { gasneti_assert(lifo != NULL); gasneti_assert(elem != NULL); _gasneti_lifo_push(lifo, elem, elem); } GASNETI_INLINE(gasneti_lifo_push_SEQ) void gasneti_lifo_push_SEQ(gasneti_lifo_head_t_SEQ *lifo, void *elem) { gasneti_assert(lifo != NULL); gasneti_assert(elem != NULL); *(void**)elem = lifo->head; lifo->head = (void**)elem; } /* Push a chain of linked elements on the LIFO */ GASNETI_INLINE(gasneti_lifo_push_many_PAR) void gasneti_lifo_push_many_PAR(gasneti_lifo_head_t_PAR *lifo, void *head, void *tail) { gasneti_assert(lifo != NULL); gasneti_assert(head != NULL); gasneti_assert(tail != NULL); _gasneti_lifo_push(lifo, head, tail); } GASNETI_INLINE(gasneti_lifo_push_many_SEQ) void gasneti_lifo_push_many_SEQ(gasneti_lifo_head_t_SEQ *lifo, void *head, void *tail) { gasneti_assert(lifo != NULL); gasneti_assert(head != NULL); gasneti_assert(tail != NULL); *(void**)tail = lifo->head; lifo->head = (void**)head; } /* Build a chain (q follows p) for use with _lifo_push_many() (no PAR-vs-SEQ differences) */ GASNETI_INLINE(gasneti_lifo_link) void gasneti_lifo_link(void *p, void *q) { gasneti_assert(p != NULL); gasneti_assert(q != NULL); *((void **)p) = q; } /* Get next element in a chain built with _lifo_link (no PAR-vs-SEQ differences) */ GASNETI_INLINE(gasneti_lifo_next) void *gasneti_lifo_next(void *elem) { gasneti_assert(elem != NULL); return *((void **)elem); } /* Finally define gasneti_lifo_head in terms of either the _PAR or _SEQ variant */ #define GASNETI_CONS_LIFO(_suff,_id) _CONCAT(GASNETI_LIFO_,_CONCAT(_id,_suff)) #define gasneti_cons_lifo(_suff,_id) _CONCAT(gasneti_lifo_,_CONCAT(_id,_suff)) #define GASNETI_LIFO_INITIALIZER GASNETI_CONS_LIFO(_GASNETI_PARSEQ,INITIALIZER) #define gasneti_lifo_head_t gasneti_cons_lifo(_GASNETI_PARSEQ,head_t) #define gasneti_lifo_init gasneti_cons_lifo(_GASNETI_PARSEQ,init) #define gasneti_lifo_destroy gasneti_cons_lifo(_GASNETI_PARSEQ,destroy) #define gasneti_lifo_pop gasneti_cons_lifo(_GASNETI_PARSEQ,pop) #define gasneti_lifo_push gasneti_cons_lifo(_GASNETI_PARSEQ,push) #define gasneti_lifo_push_many gasneti_cons_lifo(_GASNETI_PARSEQ,push_many) /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/ChangeLog0000664000175000017500000044213015142313673015200 0ustar alastairalastairGASNet-EX ChangeLog ------------------- GASNet-EX is a work-in-progress. Many features remain to be specified, implemented, and/or tuned. Feedback or questions on any matters related to the EX project are welcomed at: gasnet-devel@lbl.gov GASNet-EX currently implements the following conduits: - InfiniBand Verbs (ibv-conduit) - Libfabric (ofi-conduit) - Shared-memory (smp-conduit) - Portable UDP (udp-conduit) - Portable MPI (mpi-conduit) - Unified Communication X (ucx-conduit) [EXPERIMENTAL] ---------------------------------------------------------------------- 2025-08-28: GASNet-EX 2025.8.0 * Memory Kinds (support for non-host memory) - Fixed support for device memory allocated via cuMemMap (bug 4767) * Cray XC uGNI (aries-conduit) - This conduit, deprecated since 2023.9.0, has been removed. - Users of Cray XC systems are advised to use the renamed cross-configure scripts `cross-configure-cray-xc-slurm` and `cross-configure-cray-xc-alps`, which enable ofi-conduit with libfabric's "gni" provider. * Libfabric (details in ofi-conduit README) - Updates for compatibility of ofi-conduit CUDA UVA memory kinds with HPE's Slingshot Host Software (SHS) 12.0.1. * InfiniBand Verbs (details in ibv-conduit README) - Setting `GASNET_IBV_PORTS_TYPE=auto` can now be used to automate topology-aware assignment of HCAs to processes on a multi-rail system. See the description of the `GASNET_IBV_PORTS_*` family of environment variables in the conduit `README` for more details. - Support for `GEX_FLAG_IMMEDIATE` with AM injection (both FPAM and NPAM) has been improved to detect full send queues and completion queues, conditions which previously could have resulted in stalls rather than immediate return. - NEW: Support for network offload of atomic operations. See the ibv-conduit README for more information, such as supported op/type pairs. * Unified Communication X framework (details in ucx-conduit README) [EXPERIMENTAL] - Reduced on-the-wire overheads of Active Messages - Improved AM Medium bandwidth (bug 4165) - Increased default GASNET_UCX_MAX_MEDIUM to 65456 * Shared-memory without a network (details in smp-conduit README) - New `gasnetrun_smp` script provides consistency with most other conduits. This enables launch of (single-node) smp-conduit jobs using the ssh-, mpi- and pmi-spawners, in addition to legacy fork-based job launch. * Intra-node Shared Memory (PSHM) - Existing support for libhugetlbfs can now use an installation outside of the default header and library search paths via a the configure option `--with-hugetlbfs-home=`, or via the environment variable `HUGETLBFS_HOME` set at configure time. - The configure option `--enable-hugetlbfs-whole-archive` has been deprecated, having been supersede by the more general `--with-hugetlbfs-libs` option. - The implementation of PSHM now defaults to avoiding allocation of shared memory when there can be no sharing (i.e. in a single-process neighborhood), instead using `mmap(MAP_ANONYNOUS)` or similar. See the description of the environment variable `GASNET_USE_PSHM_SINGLETON` in `README` for more details, including use of this variable to restore the old behavior. * GASNet-EX Spec v0.19: (details in docs/GASNet-EX.txt) - Experimental new `gex_AM_Cancel{Request,Reply}{Medium,Long}()` APIs enable a client to abandon a Prepare (called instead of the matching Commit). - Experimental new `gex_AM_Commit*_v2()` APIs extend the `Commit` API family with a `commit_flags` argument and an `int` return type. This enables use of `GEX_FLAG_IMMEDIATE` at commit time. * General and Misc. - Support for hwloc, used conditionally by ibv- and ofi-conduits, now defaults to thread-scope (not process-scope) for the cpuset query. See GASNET_HWLOC_QUERY in the top-level GASNet README for details. - Improved tracing and statistics support for the `gex_AD_*()` APIs - Improved pseudo-random number generation used in many tests. - Support for compilation of GASNet-EX with GCC-15 * Notable bugs fixed in this release: (details at https://gasnet-bugs.lbl.gov) - bug4165 - ucx: AMMediumRequest bandwidth problems - bug4280 - ucx: investigate use of is_sync in AM injection - bug4335 - ucx: inefficient AM header layout - bug4718 - Diagnose invalid segment binding to primordial endpoint - bug4723 - (partial fix) Chapel over ssh-spawner w/ environment modules chokes tcsh - bug4726 - RFE: smp-conduit support for conduit-independent spawner - bug4732 - configure not respecting disable-auto-conduit-detect for ofi-conduit on Cray EX - bug4733 - Intermittent exitcode=9 from ssh-spawner - bug4734 - incorrect hwloc-based NIC selection with cxi provider - bug4743 - prohibit space characters in $(prefix) and $(DESTDIR) for `make install` - bug4744 - uninitialized use of PRNG in some tests - bug4746 - support pedantic compiler options in gasnet_portable_platform.h - bug4749 - ofi-conduit NPAM support broken on ILP32 - bug4751 - incorrect segment limit computation on ILP32 - bug4752 - Incomplete work-around for bug 4376 (FI_EAGAIN when reposting multi-recv buffer) - bug4753 - ofi: race condition in multi-receive message accounting - bug4754 - intermittent testratomic validation failures on Apple M1 h/w - bug4757 - Undefined behavior in ibv-conduit legacy initialization - bug4760 - ibv: assertion failure with single-process and GASNET_NUM_QPS>1 - bug4764 - ibv: progress functions may send AMs in an NPAM prepare/commit interval - bug4765 - ucx-conduit flaw in gex_AD_OpNBI for GEX_OP_SET and _GET - bug4766 - Executing a NULL pointer via gasnete_barrier_pf - bug4767 - CUDA framebuffer memory allocated by cuMemMap failed when registering with GASNet-EX - bug4768 - memcpy with NULL destination in collectives - bug4772 - regression in low-memory error handling with single-process runs - bug4773 - (partial fix) improved error handling in segment allocation - bug4774 - Add argument-checking to GASNet object query accessors - bug4787 - GCC-15 errors and warnings regarding incompatible pointers-to-function - bug4788 - amx/testam.c not C23-compatible - bug4797 - Intermittent init-time crash inside gasneti_bootstrapBarrier_am() - bug???? - gex_EP_BindSegment failures with CUDA device memory and SHS 12.0.1 ---------------------------------------------------------------------- 2024-05-23: GASNet-EX 2024.5.0 * Memory Kinds (support for non-host memory) - Memory Kinds support for AMD GPUs extended to ROCm-6 (bug 4686) - Use of new option `--enable-memory-kinds=force` makes it an error if `configure` cannot detect at least one supported memory kind. See docs/memory_kinds_implementation.md for more info on the status of Memory Kinds. * Libfabric (details in ofi-conduit README) - Negotiated-Payload Active Message (NPAM) Mediums are implemented natively for ofi-conduit, replacing use of a portable reference implementation. This was measured to improve bandwidth on the HPE Slingshot network when using NPAM interfaces with a GASNet-allocated buffer. - Output generated by setting `GASNET_OFI_LIST_DEVICES` now includes information ranking the distance of a device from the generating process, when hwloc 2.0 libraries (or newer) are located by `configure`. * InfiniBand Verbs (details in ibv-conduit README) - A new send progress thread can be enabled to process completion events related to communication injection, potentially reducing the cost of `gasnet_AMPoll()` calls by application threads. See the ibv-conduit README for information on the `GASNET_SND_THREAD*` family of environment variables. - The receive and send progress threads can now be kept active for some period of time while their completion queues test as empty. See the ibv-conduit README for information on the `GASNET_RCV_THREAD_IDLE` and `GASNET_SND_THREAD_IDLE` environment variables. - Previously, setting environment variable `GASNET_RCV_THREAD` to a true value with a library build configured using `--disable-ibv-rcv-thread` was a fatal error. It now produces a suppressible warning. - Output generated by setting `GASNET_IBV_LIST_PORTS` now includes information ranking the distance of a device from the generating process, when hwloc 2.0 libraries (or newer) are located by `configure`. * Portable UDP support (details in udp-conduit README) - Correct the behavior of the `dest_addr` of Long AMs when `nbytes==0` * Portable MPI support (details in mpi-conduit README) - Correct the behavior of the `dest_addr` of Long AMs when `nbytes==0` * GASNet-EX Spec v0.18: (details in docs/GASNet-EX.txt) - Specification for AM Longs has been clarified to explicitly permit `nbytes==0` even when the destination EP lacks a bound segment. - Preprocessor identifiers `GASNET_RCV_THREAD` and `GASNET_SND_THREAD` are now available to indicate library builds with the respective capabilities. - New `GEX_FLAG_DEFER_THREADS` and `gex_System_QueryProgressThreads()` provide a mechanism for a client to control launch of a conduit's progress thread(s), enabling client control over CPU affinity, among other properties. - The 'VIS Put Peer Completion' feature is now DEPRECATED and may be removed in a future release. - The following functions, constants and type are no longer considered EXPERIMENTAL: + gex_System_QueryNbrhdInfo() + gex_System_QueryHostInfo() + gex_System_QueryMyPosition() + GEX_FLAG_AM_PREPARE_LEAST_CLIENT + GEX_FLAG_AM_PREPARE_LEAST_ALLOC + gex_Addr_t * General and Misc. - Off-node algorithms for non-contiguous vector RMA (i.e. `gex_VIS_Vector{Put,Get}*()` AKA `gasnet_{putv,getv}_*()`) have been re-designed to leverage piecewise RMA (now respecting GASNET_VIS_MAXCHUNK) and streamline transfer throughput. - Disable "threadinfo-opt" by default on aarch64 (Linux and macOS) - Install a script implementation of the `ident` utility in $prefix/bin - Avoid an assertion regarding an unpublished segment when it would mask a more informative bounds-checking failure. - Reorganization of GASNet-EX and implementation documentation (docs directory): + Added new file `memory_kinds.pdf` Provides the memory kinds API documentation which was previously available only upon request + Added new file `implementation_defined.md` Describes behaviors of this implemention which are outside the specification + Renamed `memory_kinds.md` to `memory_kinds_implementation.md` Describes the implemention status of the memory kinds (and related) APIs + Updates to `GASNet-EX.txt` provide references to the documents above, and remove a section which provided a summary of `memory_kinds.pdf`. + Moved list of public header files from `README` to `GASNet-EX.txt`. * Notable bugs fixed in this release: (details at https://gasnet-bugs.lbl.gov) - bug3421: putv/getv should respect GASNET_VIS_MAXCHUNK - bug3559: Fix GASNET_PSHM feature definition (predicate #defines) - bug4617: SEGV in remote firehose, NDEBUG and clang-16.0.0+ - bug4682: ibv: rare failure of bogus assertion - bug4683: GASNET_FREEZE ignored by udp-conduit with ssh spawn - bug4686: Configure failure with ROCm 6 - bug4688: Incorrect CPU mask computation on 64-bit systems - bug4689: GASNET_GET_THREADINFO() assumed non-NULL in `test{gasnet,legacy}.c` - bug4690: no actual multi-threaded coverage in PAR builds of `test{gasnet,legacy}.c` - bug4709: Incorrect behavior with zero-byte Longs (udp and mpi conduits) - bug4712: gasneti_mutex operations crash in pthread_equal() on NetBSD + PAR/DEBUG - bug4716: Poor error behavior when hugetlbfs is requested, but unavailable ---------------------------------------------------------------------- 2023-12-15: GASNet-EX 2023.9.0 * Memory Kinds (support for non-host memory) - This release adds *experimental* memory kinds support for the oneAPI Level Zero API of Intel GPUs to ofi-conduit with the cxi libfabric provider (for the Slingshot-11 network on HPE Cray EX systems). See docs/memory_kinds_implementation.md for more info on the status of Memory Kinds. * Libfabric (details in ofi-conduit README) - Add initial/experimental support for the AWS Elastic Fabric Adapter via "efa" provider. Operation with this provider remains untuned and is not yet officially supported. - Add `GASNET_OFI_SET_UNIVERSE_SIZE` environment variable to opt-in to automatic setting of `FI_UNIVERSE_SIZE` to the job size. This partially addresses Bug 4413. - The recommendations regarding running MPI hybrid applications on the HPE Slingshot-11 network have changed. Please see the conduit README for details. - ofi-conduit now defaults to setting envvars FI_MR_CACHE_MAX_COUNT and FI_MR_CACHE_MAX_SIZE for cxi and verbs providers, partially addressing bug 4676. - Active message injections now use tx_addr flag FI_INJECT_COMPLETE - Transmit CQs now use cq_attr FI_CQ_FORMAT_CONTEXT instead of FI_CQ_FORMAT_DATA * InfiniBand Verbs (details in ibv-conduit README) - Calls to `gex_MK_Create()` for CUDA UVA or HIP memory kinds will no longer fail if the necessary kernel support cannot be positively identified, and a subsequent `gex_Segment_Create()` will fail instead if the driver support is absent. - Will now attempt to maximize the `RLIMIT_MEMLOCK` limit of processes by default. Set `GASNET_MAXIMIZE_MEMLOCK=0` to disable the new behavior. * Unified Communication X framework (details in ucx-conduit README) [EXPERIMENTAL] - `GEX_FLAG_AD_FAVOR_*` flags passed to `gex_AD_Create()` now guide algorithmic selection of atomic operations. - Support for optional `GEX_TI_{ENTRY,IS_REQ,IS_LONG}` in `gex_Token_Info()` - Use of `GASNET_UCX_` or `UCX_GASNET_` to prefix UCX (non-GASNet) environment variables has been removed. It had never functioned as documented. - Fix a packaging error that omitted the conduit license file in previous releases. * Portable UDP support (details in udp-conduit README) - Support for optional `GEX_TI_{ENTRY,IS_REQ,IS_LONG}` in `gex_Token_Info()` - Improve warning messages about environment variables to more uniformly reference the GASNET_-prefixed variable name. * Portable MPI support (details in mpi-conduit README) - Support for optional `GEX_TI_{ENTRY,IS_REQ,IS_LONG}` in `gex_Token_Info()` - Finalize MPI more cautiously at exit, in case the client has already done so. * Cray XC uGNI (details in aries-conduit README) - This conduit is now DEPRECATED and will be removed in a future release (see aries-conduit/README). * Platform support/portability - configure no longer requires the `cray-pmi` module to be loaded on HPE Cray EX systems, although the underlying dependency on Cray PMI remains. - Configure will no longer add `-multiply_defined,suppress` to `LDFLAGS` on macOS Ventura and newer (bug 4677). Users may reintroduce it via `--with-ldflags=`, if necessary. - mpi-spawner: Finalize MPI more cautiously at exit, in case the client has already done so. * GASNet-EX Spec v0.17: (details in docs/GASNet-EX.txt) - Add new `GASNET_SUPPORTS_TI_*` feature macros - Add constants and data type for experimental oneAPI Level Zero "ZE" memory kind. * General and Misc. - New options to `testlarge` and `testsmall` enable testing a wider range of conditions. * Notable bugs fixed in this release: (details at https://gasnet-bugs.lbl.gov) - bug4172: crash in ucx-conduit atexit handlers when mpi interop is enabled - bug4363: ibv-conduit assertion failures regarding incorrect opcode - bug4413: (partial fix) set FI_UNIVERSE_SIZE (conflicting provider requirements) - bug4594: UCX should not enable native atomics unconditionally - bug4598: ucx-conduit + ssh-spawner GASNET_FREEZE support is unusable - bug4654: RFE: feature macros for optional GET_TI_* queries - bug4655: ucx: bad exits on Summit - bug4663: failure compiling pmi-spawner with PMIx 4.2.0 and higher - bug4665: Cray PMI configure detection logic should be smarter - bug4669: Some GASNET_OFI_DEVICE_* and GASNET_IBV_PORTS_* settings ignored - bug4670: UCX environment personalized prefix not working as we document - bug4676: (partial fix) ofi-conduit RMA performance issues (cxi & verbs providers) - bug4677: Linker warnings from Xcode 15 ---------------------------------------------------------------------- 2023-03-31: GASNet-EX 2023.3.0 * Libfabric (details in ofi-conduit README) - Now requires libfabric 1.5 or newer - Now enforces documented minimum libfabric versions for certain providers - The --{en,dis}able-ofi-mr-scalable configure options have been deprecated in favor of newer alternatives which provide finer-grained control. - Restore default use of the "RDMADISSEM" barrier, which had been previously disabled in favor of a slower barrier implementation due to bug 4427. - New envvars GASNET_OFI_LIST_DEVICES{,_NODES} to request a list of the available network devices. - New opt-in work-around for bug 4461 (failure of the Slingshot-11 cxi provider under certain AM traffic patterns) replaces a less effective workaround introduced in GASNet-EX 2022.9.0. * InfiniBand Verbs (details in ibv-conduit README) - The conduit-specific "IBDISSEM" barrier implementation has been removed. The default barrier is now "RDMADISSEM", and "IBDISSEM" is accepted as an alias for it. * GASNet tools (spec v1.20): (details in README-tools) - Support specifying the complement of a desired trace or stats mask (via the environment variables and library interfaces) by prefixing "^" to the string * Notable bugs fixed in this release: (details at https://gasnet-bugs.lbl.gov) - bug4157: ibv XRC deadlock under certain loads - bug4170: RFE: mod and div operations in gasneti_getenv_hwloc_withdefault() - bug4171: RFE: support local ranks in gasneti_getenv_hwloc_withdefault() - bug4179: ofi: failures specific to verbs provider - bug4427: ofi-conduit failures with RDMADISSEM barrier - bug4468: RFE: negative form of GASNET_TRACEMASK - bug4507: ofi "message too long" errors on enormous RMA - bug4517: ofi/verbs 'no associated AM handler function' errors with libfabric 1.11 or older - bug4527: Erroneous/confusing startup warning with psm2 provider - bug4538: gasnet_client_attach_hook called after registering memory in ofi conduit - bug4542: ibv-conduit failures with IBDISSEM and RDMADISSEM barriers - bug4561: cxi provider performance regression - bug4567: broken support for psm2 provider in libfabric < 1.10 - bug4568: RFE: support for FI_AV_MAP - bug4569: RFE: per-provider version - bug4574: RFE: support per-endpoint AVs - bug4579: Document tcp provider floor - bug4587: Undefined behavior in testinternal - bug4591: Fix confusing documentation regarding True Scale IB hardware - bug4596: smp-conduit lacks multi-process GASNET_FREEZE support - bug4597: ofi-conduit + ssh-spawner GASNET_FREEZE support is unusable - bug4606: current aprun not recognized by gasnetrun ---------------------------------------------------------------------- 2023-01-13: GASNet-EX 2022.9.2 Release (bug fix release) This bug fix release addresses issues on HPE Cray EX platforms discovered since the 2022.9.0 release. * Libfabric (details in ofi-conduit README) - Add support for providers (including cxi in HPE's libfabric 1.15.2.0) in which the FI_MR_PROV_KEY and FI_MR_VIRT_ADDR bits of mr_mode differ. * General and Misc. - Add a new GASNET_USE_HUGEPAGES environment variable to control run-time use of hugepages (assuming configure-time support). * Notable bugs fixed in this release: (details at https://gasnet-bugs.lbl.gov) - bug4533: RFE: run-time disable for hugepage support - bug4553: cxi provider assertion failure with libfabric/1.15.2.0 ---------------------------------------------------------------------- 2022-09-30: GASNet-EX 2022.9.0, 20th Anniversary Release The GASNet team is proudly celebrating **20 years** of providing high-quality/high-performance middleware for alternative HPC programming models; the GASNet specification was first published in October, 2002 (https://doi.org/10.25344/S4MW28). Such a long lifetime for a software project is only possible with a supportive community of users and contributors. Most of you reading this are a part of that community and have our sincere thanks for making this milestone possible. * General and Misc. - Add a new GASNET_SPAWN_VERBOSE mode that provides more debugging information about job creation and teardown operations. - gasnetrun*/amudprun now accept `-v` multiple times to increase verbosity - envvar `GASNET_VERBOSEENV` now recognizes 'N|n|NO|no|0' to mean false - Scaling improvements to startup costs (memory and time) in all conduits - New options (and changed defaults) for `testalltoall` - More detailed reporting for certain job spawning failure scenarios * Memory Kinds (support for non-host memory) - This release adds Memory Kinds support to ofi-conduit with certain libfabric providers, for both Nvidia and AMD GPUs. Support includes the Slingshot-10 and Slingshot-11 networks on HPE Cray EX systems. See docs/memory_kinds_implementation.md for more info on the status of Memory Kinds. * Libfabric (details in ofi-conduit README) - The ofi-conduit is no longer "experimental", with caveats: + Its use is only recommended on HPE Cray EX (Shasta) systems and Linux clusters with Intel Omni-Path (with the psm2 provider) + Performance has not been tuned and further enhancements are planned Please see the conduit README for more details - New support for memory kinds `GEX_MK_CLASS_CUDA_UVA` and `GEX_MK_CLASS_HIP` - On HPE Cray EX (aka Shasta) systems, huge pages are now used for GASNet-allocated host memory segments by default (where supported) for both PSHM and non-PSHM configurations. - A new environment variable `GASNET_OFI_MAX_MEDIUM` enables setting the size of AM Medium buffers at job launch, and the preexisting configure option `--with-ofi-max-medium` is now used to set the default value. In the absence of these settings, the default buffer size remains unchanged. - Improvements to `--with-ofi-provider` argument handling, as documented in the conduit README. - --with-ofi-provider=default has been renamed to --with-ofi-provider=generic - Opt-in work-around for bugs 4179 (verbs provider) and 4461 (cxi provider) in which certain AM traffic patterns may lead to various failures. See "Bug 4179" and "Bug 4461" in the conduit README. - New support for immediate operations (GEX_FLAG_IMMEDIATE) for most AM and RMA operations - New support for asynchronous local completion for RMA puts - Support for optional `GEX_TI_{ENTRY,IS_REQ,IS_LONG}` in `gex_Token_Info()` - Numerous maintainability improvements - Support for multiple endpoints * Platform support/portability - System-specific defaults for many configure options have been adjusted to align with recommended values when run on an HPE Cray EX platform. - `PLATFORM_OS_CNL` and `PLATFORM_OS_WSL` macros have been renamed to `PLATFORM_OS_SUBFAMILY_CNL` and `PLATFORM_OS_SUBFAMILY_WSL`. These platforms now ALSO define `PLATFORM_OS_LINUX`. - Additional variables from *.mak fragments now appear in pkg-config *.pc files - Timer calibration output is now controlled by envvar `GASNET_TSC_VERBOSE` - Improvements to the startup logic for network hardware detection, resulting in more accurate warnings about inadvisable configurations. - Added initial/experimental support for RISC-V architecture * GASNet-EX Spec v0.16: (details in docs/GASNet-EX.txt) - The return type of `gex_EP_BindSegment()` has changed from `void` to `int` and this function is now permitted to return non-zero on failure. * Notable bugs fixed in this release: (details at https://gasnet-bugs.lbl.gov) - bug4083: incorrect GatherAll algorithm selection at large scale - bug4305: Remove GASNETI_SUPPORTS_OUTOFSEGMENT_PUTGET - bug4379: HIP support using deprecated context functionality - bug4392: Warn when running with --disable-pshm and multiple PPN - bug4434: RFE: runtime adjustment of ofi-conduit MaxMedium - bug4432: OFI provider selection issues - bug4447: GASNET_VERBOSEENV doesn't have an explicit false setting - bug4448: smp-conduit incorrectly duplicates GASNET_VERBOSEENV output - bug4453: gex_Coll_* should trace more information - bug4454: Scaling issues in gasneti_segmentLimit() - bug4462: testcoll_p-par validation failures on Summit - bug4475: configure --disable-full-path-expansion breaks default MPI_CC - bug4483: gethostid() on Perlmutter rarely returns 0, breaking PSHM detection - bug4490: startup hang for large GASNET_MAX_SEGSIZE and huge pages > 4MB - bug4496: SEGV in gasnete_coll_pf_tm_reduce_TreePutSeg for reduce-to-all - bug4509: Non-scalable reduction temporaries ---------------------------------------------------------------------- 2022-03-31: GASNet-EX 2022.3.0 Release * General and Misc. - Add docs/gasnet1_differences.md guide for legacy GASNet-1 clients - Reduce locking overheads inside AMPoll for single-node runs of {udp,mpi}-conduit in PAR mode. - A new environment variable `GASNET_HOST_DETECT` controls the algorithm used for detecting compute node boundaries in a job. * InfiniBand Verbs (details in ibv-conduit README) - Improved reporting of fatal errors reported via IBV completion queues * Unified Communication X framework (details in ucx-conduit README) [EXPERIMENTAL] - A new environment variable `GASNET_UCX_MAX_MEDIUM` enables setting the size of AM Medium buffers at job launch, and a new configure option `--with-ucx-max-medium` can be used to set the default value. In the absence of these settings, default buffer size remains unchanged. - `GASNET_DISABLE_MUNMAP=1` is now the default for ucx-conduit. * Libfabric [EXPERIMENTAL] (details in ofi-conduit README) - Initial support for the "cxi" provider for the HPE Slingshot-11 network. + Added support for providers which set the `FI_MR_ENDPOINT` memory mode bit + Added support for providers which do not support multiple endpoints reporting TX completions to a single completion queue - ofi-conduit is now the recommended conduit for HPE Slingshot (such as present in HPE Cray EX systems) and Intel Omni-Path (OPA) networks - A new family of `GASNET_OFI_DEVICE*` environment variables provide control over which device is used by a given process. When configure can find (optional) hwloc, this can be based on a process's location in the node architecture (e.g. by socket or numa node). - The implementation now includes a native implementation of the Extended API (Put and Get) in terms of `fi_write()` and `fi_read()`. * GASNet-EX Spec v0.15: (details in docs/GASNet-EX.txt) - Clarify that src/dst overlap within one operation yields undefined behavior - Initial implementation of gex_Segment_Destroy() * GASNet tools (spec v1.19): (details in README-tools) - Add gasnett_exe_name() for exposing the current executable name - gasnett_gethostname() now normalizes hostnames to lowercase * Notable bugs fixed in this release: (details at https://gasnet-bugs.lbl.gov) - bug4211: intermittent udp-conduit exit-time hangs on macOS - bug4227: Bogus maybe-uninit warning building libgasnet with GCC-11.1+ - bug4297: incorrect nbrhd construction for some multi-homed hosts - bug4321: Intermittent "EBADENDPOINT" failures in single-node udp-conduit - bug4339: ucx: many-to-one deadlock - bug4345: Multiply defined symbols in aries-conduit w/ recent compilers - bug4355: Erroneous memory access when deleting a segment - bug4356: Missing bounds checks for Long payloads - bug4360: Insufficient fixed exit timeouts (ucx, ibv, ofi) - bug4361: (partial fix) reductions on DT_USER of unbounded length - bug4366: intermittent exit-time assertion failures from debug memcheck - bug4373: ofi: FI_MR_ENDPOINT support - bug4374: Update mr_mode handling to OFI 1.5 API spec (or newer?) - bug4375: ofi: support multiple tx CQs - bug4376: ofi: infrequent FI_EAGAIN when reposting multi-recv buffer - bug4399: (partial fix) stronger local address range checks when using kinds ---------------------------------------------------------------------- 2021-09-30: GASNet-EX 2021.9.0 Release * General and Misc. - Improved latency for shared-memory RMA operations in all conduits. - Improved performance of the conduit-independent RDMA-based barrier, used by default by ucx-conduit. - NEW: configure options `--enable-rpath` and `--enable-[pkg]-rpath` can request addition of directories containing required libraries to the runtime library search path (a.k.a. "rpath") via `$(GASNET_LDFLAGS)`. - Environment variable GASNET_BACKTRACE_MT is now available to force multi-threaded or single-threaded backtraces (where supported). - Improved code factorization to ease addition of new network conduits. * Memory Kinds (support for non-host memory) - This release adds Memory Kinds support for AMD GPUs via the HIP API. - This release adds ucx-conduit support for `GEX_MK_CLASS_CUDA_UVA` and `GEX_MK_CLASS_HIP` on supported hardware and software. - Fixed bugs 4148 and 4150, which had significant impact on the usability of RMA Put operations involving device memory. See docs/memory_kinds_implementation.md for more info on the status of Memory Kinds. * InfiniBand Verbs (details in ibv-conduit README) - Performance improvement for RMA Put and AM Long utilizing asynchronous local completion and payloads in (roughly) the 4KiB to 64KiB range. - Improved memory utilization at large scale. - SEQ and PARSYNC builds now set MLX{4,5}_SINGLE_THREADED under appropriate conditions to elide locking overheads in libibverbs. - Improved scaling with large thread counts by serializing CQ polling. - NEW: configure option --with-ibv-fenced-puts=... can be used to set the default value for the GASNET_USE_FENCED_PUTS environment variable. - Added feature macros to advertise multi-rail configuration to clients. * Cray XC uGNI (details in aries-conduit README) - Fix leak of gex_Event_t for explicit-event local completion of AM Long (bug 4292) * Unified Communication X framework (details in ucx-conduit README) [EXPERIMENTAL] - New support for Memory kinds: `GEX_MK_CLASS_CUDA_UVA` and `GEX_MK_CLASS_HIP` - Improvements to AM Long payload handling + Fix corruption when using UCX-level shared memory communication (bug 4155) + Fix crashes when using synchronous local completion (bug 4277) + Fix leak of gex_Event_t for explicit-event local completion (bug 4292) - Improved handling of non-collective exits - Support for multiple endpoints * Shared-memory without a network (details in smp-conduit README) - Performance improvements to remote (inter-process) atomics * Platform support/portability - Made Cray PMI support conduit-independent, allowing it to function on non-aries Cray systems like the new "HPE Cray EX" (aka Shasta). - This release adds Intel oneAPI as a supported compiler family. - This release adds NVHPC (NVIDIA HPC SDK) as a supported compiler family on x86-64 and ppc64le, starting at version 20.9. - Improved support for GCC 11 by suppressing spurious warnings. * GASNet-EX Spec v0.14: (details in docs/GASNet-EX.txt) - Allow mixing of root and leaf events in array-based NB event APIs. - Add GEX_FLAG_PEER_NEVER_{SELF,NBRHD} - Add gex_System_QueryHiddenAMConcurrencyLevel() - Add constants and data type for "HIP" memory kind * GASNet tools (spec v1.18): (details in README-tools) - Add gasnett_assume, for exposing annotations to guide optimization - gasnett_spinloop_hint() now includes a compiler fence on all CPU architectures, not just those with a "pause" instruction (or similar). * Notable bugs fixed in this release: (details at https://gasnet-bugs.lbl.gov) - bug3420: use -rpath when linking - bug3535: additional restrictions for coding standards - bug3936: Problems with multi-rail and GASNET_{AM_CREDITS,NETWORKDEPTH}_PP - bug4053: ibv: Default to setting MLX5_SINGLE_THREADED=1 for SEQ builds - bug4148: ibv/GDR completion issues with multiple communication paths - bug4150: ibv/GDR premature local completion of Puts from device memory - bug4155: ucx: AM Long test failures when PSHM is disabled - bug4162: incorrect return value from gasnet_get_nbi on ucx-conduit - bug4178: ofi: testsegment crash with MR_BASIC - bug4209: ibv: improve ALC with respect to bounce buffer use - bug4212: build failure for ibv conduit with "--with-ibv-max-hcas=1" - bug4213: trace AM handler registration - bug4215: testslice enhancements to test cross-nbrhd RMA - bug4218: Support root/leaf mixing in array-based NB event APIs - bug4223: Problems in VIS PSHM handling with non-primordial segments - bug4228: Bogus stringop-overflow warnings from GCC-11.1 LTO - bug4230: ssh-spawer de-duplication logic is flawed - bug4232: Bogus array-bounds warning from GCC 11.1 on ILP32/NDEBUG - bug4237: Option for backtrace to provide the stack on all threads even in threadmode=seq - bug4240: ibv: optimize layout of gasnetc_cep_t - bug4246: ibv: better behavior of single-rail build on multi-rail system - bug4255: Intel 2021.2.0+ erroneous __has_{,cpp_}attribute(__fallthrough__) - bug4259/4260/4261/4262: update spinloop constructs in native conduits - bug4263: remove "AD_MY_NBRHD" check on smp-conduit - bug4264: simplify implementation of GEX_FLAG_AD_{ACQ,REL} - bug4265: Collective scratch management is not thread safe - bug4266: gex_Coll_ReduceToAllNB is not thread safe - bug4277: ucx testam hang with Cray and AMD compilers - bug4278: improvements to RDMADISSEM barrier - bug4281: Display glitch in VERBOSEENV console reporting - bug4291: Configure barfs on balanced double-quotes in arguments - bug4292: ucx and aries can leak events from AM Long - bug4298: ucx persona_example hang w/o PSHM - bug4299: Non-fatal error on BAR1 resource exhaustion in gex_Segment_Create - bug4303: Inaccurate expectations regarding GASNET_IBV_PORTS - bug4310: use of deprecated Intel compiler options - bug4328: ucx: erroneous loop in gasnetc_poll_sndrcv() - bug4330: ibv conduit incorrectly implements HIDDEN_AM_CONCURRENCY_LEVEL ---------------------------------------------------------------------- 2021-03-31: GASNet-EX 2021.3.0 Release * General and Misc. - Performance improvement for Negotiated-Payload Active Message (NPAM) Long with GASNet-allocated buffer over shared-memory (PSHM) and the reference implementation of NPAM (Medium and Long) used by ucx, udp and mpi conduits. - Calls to gex_EP_Create() which would exceed GASNET_MAXEPS now return GASNET_ERR_RESOURCE rather than aborting. - NEW: configure option `--with-maxeps=N` permits setting GASNET_MAXEPS, subject to per-conduit limits. - Additional debug checks for use of calls which are prohibited in an AM handler context, and in the NPAM Prepare/Commit interval. - The `GASNetGitHash` ident string is now available in most development builds, and `pkg-config --modversion` installed from a development build should include the GASNet git hash. * Memory Kinds (support for non-host memory) - This is the first production release to include "Memory Kinds", the GASNet feature supporting communication using non-host memory (such as GPU memory). See docs/memory_kinds_implementation.md for more information. - Users of the "GASNet-2020.11.0-memory_kinds_prototype" release should be aware that the behavior of configure in this release differs in that one must enable memory kinds explicitly using `--enable-memory-kinds` or an `--enable-kind-[...]` option for a specific kind. - New preprocessor identifier 'GASNET_HAVE_MK_CLASS_MULTIPLE' (undefined or defined to '1') indicates whether kinds support for anything other than host memory has been compiled-in. * InfiniBand Verbs (details in ibv-conduit README) - NPAM Long is implemented natively for ibv-conduit in the default FAST segment mode, replacing use of the portable reference implementation. - Add support for ODP APIs from the Linux "RDMA Core" distribution, where previously only the Mellanox variant was supported (bug 4122). - Improved startup times on jobs larger than a few tens of nodes with multiple processes per-node (bug 4194). - A new family of `GASNET_IBV_PORTS_*` environment variables provides more control over which InfiniBand ports are used by which processes. Support is conditional on configure finding hwloc lib, which is optional. - NEW: configure option --with-ibv-ports=... can be used to set a default value for the GASNET_IBV_PORTS environment variable. - GASNET_DISABLE_MUNMAP=1 is now the ibv-conduit default on 64-bit platforms, regardless of whether ODP is enabled or not. Previously, enabling ODP would change the default to 0. - Improved handling of non-default parameter settings for the firehose dynamic memory registration library. Corner cases with default settings are also handled better. See GASNET_FIREHOSE_* in ibv-conduit README. - Significantly increase the default firehose resources on modern InfiniBand HCAs, leading to improved performance in various circumstances. - A new GASNET_PINNED_REGIONS_MAX environment variable allows control over the host-wide number of pinned regions (a bounded HCA resource) which may be used by ibv-conduit. * Cray XC uGNI (details in aries-conduit README) - A new environment variable GASNET_GNI_MAX_MEDIUM enables selecting the size of AM Medium buffers at job launch, and the existing configure option `--with-aries-max-medium` now sets the default value. * Libfabric [EXPERIMENTAL] (details in ofi-conduit README) - NEW ofi-conduit, previously available only in GASNet-1, has been partially ported to GASNet-EX where it now holds "experimental" status. - The work completed to date is believed to be functionally complete and correct when run with OFI's sockets provider and default settings. * Portable UDP support (details in udp-conduit README) - udp-conduit now defaults to grouping co-located processes into contiguous rank ids. - Interfaces have been added for explicit control over rank assignment * Platform support/portability - This release adds support for macOS on AARCH64 (aka ARM64, "Apple M1" and "Apple Silicon"). * GASNet-EX Spec v0.13: (details in docs/GASNet-EX.txt) - Add GASNET_NATIVE_NP_ALLOC_{REQ,REP}_{MEDIUM,LONG} defines - Add gex_System_{Get,Set}VerboseErrors() - Add gex_System_QueryMaxThreads() - Add gex_EP_QueryBoundSegmentNB() * GASNet tools (spec v1.17): (details in README-tools) - Add GASNETT_UNUSED_ARGS*() family of macros - Added documentation for an interface providing programmatic control of stats/trace features in conduit-mode libraries. - Add GASNETT_STATS_DUMP() to allow dumping and optionally resetting stats counters at runtime. - Add GASNETT_STATS_PRINTF(_FORCE)() to generate stats output. * GASNet-1 legacy API - Calls to the legacy gasnet_attach() requesting a zero-length segment are now silently rounded up to one page. * Notable bugs fixed in this release: (details at https://gasnet-bugs.lbl.gov) - bug2036: Teach AMUDP to respect externally-imposed node ids - bug4122: ODP support broken with recent libibverbs releases - bug4126: ibv: debug-only exit timeout for large multi-rail jobs on Summit - bug4141: SRQ-specific test failures - bug4145: Vector/Indexed incorrect with non-primordial teams and loopback/PSHM - bug4159: AM max-payload queries do not evaluate arguments - bug4166: ibv: debug-only crash at exit from an MPI hybrid application - bug4173: ibv: race in firehose on powerpc - bug4175: thread-safety of gex_EP_RegisterHandlers() - bug4193: Firehose env var "misbehavior" - bug4194: ibv: unnecessarily slow startup - bug4195: ibv dynamic connection support broken - bug4203: Improve error message when passwordless ssh isn't set up - bug4208: unfortunate multi-rail interactions with PSHM and XRC * Removal of unmaintained platform support - This release no longer supports the following platforms: + IA-64 (aka Itanium) ---------------------------------------------------------------------- 2020-10-30: GASNet-EX 2020.11.0 "Memory Kinds" Prototype Release * General and Misc. - Initial implementation of "Memory Kinds": support for GASNet-EX remote segments comprised of non-host memory. This initial version supports only UVA-based CUDA device memory and the GASNet-EX RMA APIs. The file docs/memory_kinds_implementation.md provides an up-to-date summary of the status of the memory kinds implementation. - New GASNet trace/stats tracemask categories: + O - Object creation, modification and destruction + X - AMPoll * GASNet-EX Spec v0.11: - Deprecate GEX_FLAG_TM_SCRATCH_SIZE_MIN flag and remove the corresponding GASNET_COLL_MIN_SCRATCH_SIZE environment variable. - Add GEX_FLAG_TM_NO_SCRATCH support in gex_TM_{Split,Create}(), eliminating the requirement that a client always provide a collectives scratch space. * GASNet-EX Spec v0.12: - Add the following APIs, types and constants as documented in "GASNet-EX API Proposal: Memory Kinds, Revision 2020.11.0" (available on request): + gex_TM_Pair() + gex_Segment_Create() + gex_EP_Create() + gex_EP_BindSegment() + gex_EP_PublishBoundSegment() + gex_MK_t + gex_MK_Class_t + gex_MK_Create_args_t + gex_MK_Create() + gex_MK_Destroy() + GEX_MK_HOST - Add the following constants (zero values of the appropriate types) + GEX_CLIENT_INVALID + GEX_EP_INVALID + GEX_MK_INVALID - Add constants and data type for "CUDA UVA" memory kind ---------------------------------------------------------------------- 2020-10-30: GASNet-EX 2020.10.0 Release * General and Misc. - NEW: Improved compatibility with heap analysis tools like Valgrind using new configure option --enable-valgrind. GASNet's valgrind suppression file now lives in other/valgrind/gasnet.supp. - GASNet trace/stats now categorize AMPoll calls in tracemask category 'X' - BLCR integration, deprecated since 1.32.0 (July 2018), has been removed. - Improved memory and communication requirements in gex_TM_Split(). - Improved memory scaling in management of collectives scratch spaces. - Initial implementation of gex_TM_Create() sufficient for implementation of (at least) efficient Split-like operations with computable membership, using less communication than gex_TM_Split. * Cray XC uGNI (aries-conduit) - The parameter GASNET_NETWORKDEPTH is now honored for both the Eager and RVous AM algorithms, resulting in GASNET_NETWORKDEPTH_SPACE now being rounded down to a multiple of GASNET_NETWORKDEPTH and a power-of-two. Connected to this change, the default GASNET_NETWORKDEPTH_SPACE has increased from 12K to 16K, resulting in an increased default per-peer memory consumption for the Eager AM algorithm (not used at large scale). - The parameter GASNET_GNI_ROUTING_MODE is now available to set the Aries routing mode, accepting the same values as the parameter MPICH_GNI_ROUTING_MODE used by Cray MPICH (see the intro_mpi manpage). * Portable UDP support (udp-conduit) - The amudprun spawning protocol has changed slightly, breaking backwards compatibility for amudprun binaries built against earlier versions. * Unified Communication X framework (ucx-conduit) [EXPERIMENTAL] - Tune the Active Message buffer handling, resulting in improved performance - Fix an unreported defect in AM injection with asynchronous LC - For details, see ucx-conduit/README * Platform support/portability - Installs on Cray XC systems now default to using linker options for low-level libraries that are more resilient to minor system upgrades. - PMI-based spawner cleanups to reduce memory use and improve robustness * SSH-based job-launch (ssh-spawner) - The default scheme for process layout has changed to ignore duplicates in a host list (such as GASNET_SSH_SERVERS). Setting the environment variable GASNET_SSH_KEEPDUP=1 restores the previous behavior. See other/ssh-spawner/README for details. - Job exit no longer runs atexit handlers and static destructors on the "hidden" processes used to implement ssh-spawner. * GASNet-EX Spec v0.9: - Restrict scratch sizes (query outputs and split inputs) for gex_TM_Split() to be single-valued over members of each output team. - Add gex_TM_Create() and an associated family of flags GEX_FLAG_TM_{GLOBAL,LOCAL,SYMMETRIC}_SCRATCH. * GASNet-EX Spec v0.10: - Add gex_TM_Destroy() and associated GEX_FLAG_GLOBALLY_QUIESCED flag. * GASNet tools (spec v1.16) - Add gasnett_fatalerror_nopos - In some cases, code including gasnet_tools.h (but not gasnetex.h or gasnet.h) must now be explicitly compiled with `-DGASNETT_THREAD_SINGLE` if it is to be linked with a PARSYNC conduit library, due to changes in how PARSYNC libraries are built. * Notable bugs fixed in this release: - bug3806: workaround xpmem startup failures while profiling (eg CrayPat) - bug4060: tools atomics using constructs deprecated in C++20 - bug4061: aries-conduit startup time regression - bug4074: cross-configure scripts for KNL now default to --enable-large-pshm - bug4075: gex_TM_Split is not thread-safe - bug4076: valgrind 'invalid read' errors on GASNet/UPC++ startup - bug4079: udp-conduit localhost spawn fails to search PATH for wrappers - bug4081: Oversubscription warnings from jsrun - bug4086: AM performance bug for --enable-{debug,trace} - bug4089: gex_Coll_ReduceToOne failures under some conditions - bug4093: partial fix to scale "p2p" data with team size, not job size - bug4095: Incorrect algorithms for small scratch and/or large data - bug4103: Configure failures with -ffat-lto-objects in CFLAGS - bug4127: Overflow for >2G pre-pinned memory (ibv-conduit) - bug4135: Aries CE use with multi-domain support hangs - bug4138: gasneti_argv_from_sysctl() failure for UPC++ codes on macOS 11 - bug4143: ibv-conduit GASNET_USE_FIREHOSE=0 support broken - bug3630/3828/3842: Various failures on testvis, testratomic, testslice ---------------------------------------------------------------------- 2020-03-12: GASNet-EX 2020.3.0 Release * InfiniBand Verbs (ibv-conduit) - Negotiated-Payload Active Messages are implemented natively for ibv-conduit, replacing use of a portable reference implementation. - New environment variable GASNET_AM_GATHER_MIN controls use of gather-on-send for AM Medium (and small Long) payloads. See details in the conduit README. - The gather-on-send optimization for AM Medium (and small Long) payloads is now applied to out-of-segment sources when using ODP. - A new `configure --with-ibv-max-medium` can set the size of AM Medium buffers. See details, including supported values, in the conduit README. - The default AM Max Medium is now 64KB minus space for headers (up from 4KB). - Code paths for AM Long and RDMA Put have been separated, leading to simpler (faster and more maintainable) logic for each. - Code paths for AM and RMA have been revised to eliminate certain global state in favor of per-endpoint state. This is work toward multi-endpoint and multi-segment support to appear in a later release. - AM-over-RDMA (not compiled by default since 2019.6.0) has been removed. - The environment variable GASNET_PIN_MAXSZ has been removed. This variable was introduced to help work-around a misbehavior not seen in modern HCAs, and its support added significant complexity to the critical code paths for RMA. * Cray XC uGNI (aries-conduit) - AM Long request injection using GEX_EVENT_NOW may now service incoming AMs while stalling for local completion of the outgoing payload. * Unified Communication X framework (ucx-conduit) [EXPERIMENTAL] - This NEW conduit is now available for experimental use on Mellanox InfiniBand devices including ConnectX-5 or newer. The ucx-conduit code was contributed by Mellanox Technologies Ltd. - For details, see ucx-conduit/README * IBM PAMI (pami-conduit) - This conduit, deprecated since 2019.9.0, has been removed. * Portable UDP support (udp-conduit) - Provide more robust default detection of shared-memory peers (see GASNET_USE_GETHOSTID in udp-conduit/README for details). - Improved startup error checking and reporting for DNS problems * GASNet tools (spec v1.15) - Add runtime version queries gasnett_release_version*() * Platform support/portability - PMI-based spawning now supports PMIx - Improve portable_inttypes to be more trusting of C99/C++11 compilers - Improved warning behavior with recent versions of PGI - Support for IBM BlueGene/Q has been removed. - Support for native atomics on IBM XL compilers for big-endian PPC has been removed. These platforms now default to compiler-provided atomics. Little-endian PPC platforms remain unchanged. * General and Misc. - New make targets (run-)tests-installed-{seq,par,parsync} have been added for use in post-install validation of the library. - Now document and enforce use of GNU make version 3.79 or newer. * Notable bugs fixed in this release: - bug4022: rare resource leak in aries-conduit AM Long protocol - bug4024: erroneous behavior from `testam -async-req -np-cb` - bug4025: erroneous assertion failure from loopback NPAM - bug4035: link failures with GCC 10 or -fno-common - bug4042: errors when configured using --with-aries-max-medium=65472 ---------------------------------------------------------------------- 2019-09-14: GASNet-EX 2019.9.0 Release * Cray XE/XK uGNI gemini-conduit - This conduit, deprecated since 2019.6.0, has been removed. - The aries-conduit remains supported and under active development. * Cray XC uGNI aries-conduit - The performance of AMLong with payload of 4KB or larger has been significantly improved. The overhead of injection with synchronous local completion is reduced. The cases of asynchronous local completion (both explicit and implicit event) are properly implemented where previously they were strengthened to synchronous. - New environment variables GASNET_GNI_PACKEDLONG_CUTOVER, GASNET_LONG_DEPTH and GASNET_GNI_AMPOLL_BURST provide finer-grained control over the AM protocol. See details in the conduit README. * InfiniBand Verbs (ibv-conduit) - New envvars GASNET_IBV_LIST_PORTS{,_NODES} to request a list of available InfiniBand HCAs, ports, and their respective status. - Internal streamlining of AM paths to reduce code bloat (bug1879) * IBM PAMI (pami-conduit) - This conduit is now DEPRECATED and will be removed in a future release (see pami-conduit/README). * GASNet tools (spec v1.14) - Add GASNETT_FALLTHROUGH * MPI-based job-launch (mpi-spawner) - Improved logic for IBM's jsrun * Notable bugs fixed in this release: - bug3338: ibv_reg_mr failure (EFAULT/Bad address) on read-only data - bug3957: GASNET_DISABLE_MUNMAP_DEFAULT=0 when using ODP - bug3994: backtrace hangs for forthcoming macOS 10.15 - bug3995: configure fails sizeof(ptrdiff_t) on Catalina/gcc - bug4002: ibv-conduit: XRC and ODP are mutually exclusive ---------------------------------------------------------------------- 2019-06-14: GASNet-EX 2019.6.0 Release * InfiniBand Verbs (ibv-conduit) - NEW: Improved support for correct operation on multi-rail InfiniBand systems - New envvar GASNET_USE_FENCED_PUTS controls the strictness of ordering guarantees for put RMA completion on multi-rail hardware, addressing bug 3447. - Compilation of AM-over-RDMA support is now disabled by default - Improve error messages for some cases. * Cray XC uGNI aries-conduit - The Aries Collective Engine, if available, is now used to accelerate gex_Coll_BarrierNB(). * Cray XE/XK uGNI gemini-conduit - This conduit is now DEPRECATED and will be removed in a future release. - The aries-conduit remains supported and under active development. * GASNet-EX Spec v0.8: - Add GASNET_HIDDEN_AM_CONCURRENCY_LEVEL - The EX spec file has been renamed to docs/GASNet-EX.txt * Notable bugs fixed in this release: - bug3880: XLC 16.1.x ICE compiling ibv-conduit for Power9 - bug3943: infrequent startup hang with PSHM and over 62 PPN - bug3946: Improve gasnetrun support for CPU binding esp with Open MPI ---------------------------------------------------------------------- 2019-05-27: GASNet-EX 2019.3.2 Release (bug fix release) * Notable bugs fixed in this release: - bug3943: infrequent startup hang with PSHM and over 62 PPN ---------------------------------------------------------------------- 2019-03-15: GASNet-EX 2019.3.0 Release * Legacy backward-compatibility layer: - gasnet.h now implements gasnet_memset{,_nb,_nbi} - gasnet.h now conditionally implements the unofficial var-arg gasnet_AM* fns * InfiniBand Verbs (ibv-conduit) - Add support for non-default IB Partition Keys - see docs for GASNET_IBV_PKEY - Fix compilation problem with alloca.h on FreeBSD 12.0 - Legacy support for Mellanox FCA has been removed * General and Misc. - Removed outdated subdir license.txt files, where top-level license applies - Reduce sub-line interleaving of diagnostic output, especially on smp-conduit * GASNet tools (spec v1.13) - New define GASNETT_SET_AFFINITY_SUPPORT - gasnett_set_affinity() now returns zero on success or non-zero otherwise. * Configure and Build - Updated handling for cache line size, see --with-cache-line-bytes * MPI-based job-launch (mpi-spawner) - update logic for IBM's jsrun * Notable bugs fixed in this release: - bug3693: Reduce segment registration failures due to insufficient /dev/shm - bug3829: Co-located segment probe failures - bug3805: Fix issues with 64-bit SPARC assembly - bug3834: GASNet ctype wrappers break for C++ clients - bug3853: ibv-conduit AM hang under heavy load - bug3854: Fix assertion failure in gex_TM_Split - bug3856: Improved crash behavior on Cygwin with multi-threading - bug3858: Fix assertion failure in pmi-spawner - bug3866: Fix potential x86 timer calibration issue - bug3873: gasnetrun w/mpi-spawner losing exit code in some configs ---------------------------------------------------------------------- 2018-12-17: GASNet-EX 2018.12.0 Beta release * InfiniBand Verbs (ibv-conduit) - Mellanox On-Demand Pinning (ODP) feature now replaces explicit out-of-segment memory registration on systems with appropriate hardware/driver support. This resolves bug 495 for clients using SEGMENT_FAST with ODP support. Note that ODP support may interact badly with improper job shutdown (see "GASNet exit" section of README for more information). - Add startup checks for required HCA homogeneity properties * GASNet-EX Spec v0.7: - Barriers initiated using gex_Coll_BarrierNB() are now permitted to overlap with collectives on the same team (including other barriers). * Collective Operations - Improve serial overheads for out-of-segment collectives - Improve congestion tolerance for some cases - Improve scalability of large or out-of-segment broadcasts * Cray uGNI (gemini- and aries-conduits) - Now tolerate unequal GASNET_DOMAIN_COUNT in multi-domain mode * General and Misc. - New GASNET_CATCH_EXIT envvar improves interop with tools like CrayPat - Most fatal errors now include the process rank - Other minor improvements to fatal error paths * GASNet tools - New define GASNETT_THREAD_SINGLE selects single-threaded build * Configure and Build - cross-configure scripts can now optionally be run without copying them to the source directory, by setting $SRCDIR to indicate the source directory. * SSH-based job-launch (ssh-spawner) - Improve error checking and reporting * Platform support/portability - Cray X{C,E,K}: Correct default cache line padding size * Notable bugs fixed in this release: - bug3815: XPMEM incompatibility with gprof - bug3812: Intermittent mmap failures at startup: cannot allocate memory - bug3803: gasnetrun_* -N command-line support for Open MPI 3.X - bug3797: invalid asm on Solaris/SPARC - bug3796: Fix LDFLAGS/LIBS processing for library names - bug3790: ibv-conduit AM flow-control hangs with multiple HCAs ---------------------------------------------------------------------- 2018-09-26: GASNet-EX 2018.9.0 Release * GASNet-EX copyright notice and license agreement updated (see license.txt) * GASNet-EX Spec v0.6: - Add gex_Coll_ReduceToAllNB() - Add GEX_FLAG_RANK_IS_JOBRANK flag to accelerate gex_AD_Op*() on sub-teams * Cray uGNI (gemini- and aries-conduits) - A new Active Message protocol with more scalable memory utilization is now available, and automatically enabled for large-scale jobs. See details in the conduit README section for GASNET_GNI_AM_RVOUS_CUTOVER - Improved reporting for AM buffer utilization, especially on spawn failure - Adjust the default GASNET_GNI_{PUT,GET}_FMA_RDMA_CUTOVER thresholds that control the GNI-level protocol selection on aries for GASNet RMA * InfiniBand Verbs (ibv-conduit) - Multi-rail support is disabled by default, due to bug 3447 * General and Misc. - Performance tests now default to in-segment memory (see --help) - Average values in STATS now output as floating-point, instead of rounding - Silence harmless library compile warnings from gcc 8.* * Configure and Build - Improve configure-time handling of non-EX conduits * Platform support/portability - Improvements to internal logic for handling thread data on platforms lacking native register-level support for thread data - Internal AM handler dispatch code is now strictly C spec compliant * Collective Operations - Add initial reference implementation of ReduceToAll - ReduceToOne now supports user-defined types up to at least 32KB in size, and has no limit on vector length for reductions on built-in types. * Notable bugs fixed in this release: - bug3742: Atomic CAS failures on PPCle+{pgi,clang} - bug3783: broken DEBUG check in gex_AD_Create for sub-teams - bug3788: aries-conduit offloaded atomics defect with sub-teams ---------------------------------------------------------------------- 2018-06-28: GASNet-EX 2018.6.0 Beta release * GASNet-EX Spec v0.5: - Specified Teams and Collectives APIs [EXPERIMENTAL] - Add user-defined data types and operators for Reductions - Add GEX_OP_TO_(NON)FETCHING() - Specified VIS Peer Completion API [EXPERIMENTAL] - Added a flag to enable VIS Local Completion - Add gex_System_QueryHostInfo() and gex_System_QueryMyPosition() - Rename gex_NbrhdInfo_t to gex_RankInfo_t - New GEX_FLAG_USES_GASNET1 flag enables gex_Client_Init() for legacy GASNet-1 calls - Minor clarifications throughout - Consult docs/GASNet-EX.txt for the detailed status of the evolving specification * Major new features implemented in this release: - Teams: + Full multi-team support across the entire specification, including construction of subset teams and rank reordering via gex_TM_Split() + Can translate in either direction between team-relative and job ranks + All APIs taking (tm,rank) pairs interpret 'rank' relative to 'tm' - Collectives: + Non-blocking Barrier, Broadcast, and ReduceToOne Additional collective operations will be added in future releases - Non-contiguous RMA: Vector, Indexed, Strided (VIS) + VIS Puts now support notifying (potentially remote) peers of completion. For details, see docs/GASNet-EX.txt for gex_VIS_SetPeerCompletionHandler + VIS Puts now offer local completion support. For details, see docs/GASNet-EX.txt for GEX_FLAG_ENABLE_LEAF_LC - gasnet_fwd.h now provides a dependency-free useful subset of the API declarations, suitable for inclusion into application-level code. * Feature implementation status in this release: - VIS Peer Completion is well-implemented for shared memory. The distributed-memory implementation is functionally complete and will be tuned in an upcoming release. - Collective operations use "reliable performance" algorithms based on Binomial Trees. They have not yet been tuned for shared memory or offload. - ReduceToOne supports all operations on built-in types, including user-defined commutative operations, but currently limits the local size of the operands. - Teams currently use a dense representation, a scalable implementation is forthcoming. * Notable bugs fixed in this release: - Bug3749: assertion failure in PSHM's NP-AM - See fixes listed in the GASNet-1 1.32.0 ChangeLog below ---------------------------------------------------------------------- 2018-03-28: GASNet-EX 2018.3.0 Release * GASNet-EX Spec v0.4: - Renamed gex_System_QueryNeighborhoodInfo() and associated types and constants to gex_System_QueryNbrhdInfo() and similar. - Adjusted payload limit queries to accommodate Negotiated-Payload AM. - Remote Atomics: added flags for asserting locality properties - Remote Atomics: added flags for requesting memory fencing behavior - Strided: now supports transpose/reflection operations - Added gex_ep (destination endpoint) to gex_Token_Info_t - AM Request/Reply/Commit functions may now optionally omit the arg count suffix on the function name when using compilers with __VA_ARG__ support (added in C99/C++11, may also be available in older compilers). - Minor clarifications throughout. * Major new features implemented in this release: - Remote Atomics and Negotiated-Payload Active Messages have been further specialized to improve performance on aries-conduit. - Remote Atomics performance improvements for shared-memory bypass. - Strided has been completely re-implemented and now supports N-d transpose/reflection operations. Notable performance improvements throughout. - VIS performance improvements, most notably for shared-memory bypass and aries-conduit (where some in-memory copies have been removed) - The 64k per-thread limit on in-flight explicit handle ops has been removed. The number of in-flight ops is now limited only by available heap memory. * Notable bugs fixed in this release: - Bug3704: allow gasnet.h and gasnetex.h to be included in either order - Improved assertion checks and error messages in various places. * Feature implementation status in this release: - Negotiated-Payload Active Messages are well-implemented for shared memory (PSHM and smp-conduit), gemini- and aries-conduits. All other conduit are currently using a portable reference implementation which may result in performance less than will eventually be delivered. - Remote Atomics are well-implemented for shared memory (PSHM on most systems, and smp-conduit) and aries-conduit. Other conduits with APIs for offloaded atomics do not yet utilize them. ---------------------------------------------------------------------- 2017-12-20: GASNet-EX 2017.12.0 Beta release * GASNet-EX Spec v0.3: - Specified Remote Atomics API, and corresponding types [EXPERIMENTAL] - Specified Vector, Indexed, Strided API [EXPERIMENTAL] - Specified gasnet_QueryGexObjects() - Specified gex_System_QueryNeighborhoodInfo() [EXPERIMENTAL] - Significant alteration to Segment Disposition flags [UNIMPLEMENTED] - Minor clarifications throughout - Consult docs/GASNet-EX.txt for the detailed status of the evolving specification * Major new features implemented in this release: - Remote Atomic operations: untuned, network-independent implementation + See docs/GASNet-EX.txt for details - Vector, Indexed, Strided extensions: untuned, network-independent implementation + See docs/GASNet-EX.txt for details - Cray Aries implementation specializations for the following features: + New AM Interfaces, Immediate Operations, Local Completion and Remote Atomics. * Notable bugs fixed in this release: - See fixes listed in the GASNet-1 1.32.0 ChangeLog below ---------------------------------------------------------------------- 2017-09-28: GASNet-EX 2017.9.0 Release * GASNet-EX Spec v0.2: - Specified gex_System_QueryJob{Rank,Size}() [EXPERIMENTAL] - Specified gex_Segment_QueryBound() [EXPERIMENTAL] - Significant changes to Negotiated-Payload AM semantics - Consult docs/GASNet-EX.txt for the detailed status of the evolving specification * Major new features implemented in this release: - gex_Event_t is no longer thread-specific: one can safely pass a gex_Event_t generated in one thread to a Test or Wait call in another thread. - New gex_Segment_QueryBound() [EXPERIMENTAL] - New gex_System_QueryJob{Rank,Size}() [EXPERIMENTAL] - New IS_REQ and IS_LONG queries in gex_Token_Info() - Interface changes for negotiated-payload AM calls * Notable bugs fixed in this release: - ibv: assertion failures at shutdown - pshm: assertion failure in gasneti_AMPSHM_service_incoming_msg() - pshm: SEGV at initialization when using System V shared memory - pshm: work-around an assertion failure due to a PGI compiler bug - aries/gemini: SEGV at startup with multi-domain enabled * Other Known Limitations: - This release supports Microsoft Windows Subsystem for Linux, but is affected by an OS bug which was fixed starting in build 16278. Details: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=3588 ---------------------------------------------------------------------- 2017-06-30: GASNet-EX 2017.6.0 Beta release * Major new features implemented this release: (mostly reference implementation) - Explicit Local Completion capability for Active Message and RMA Put APIs - Immediate Operations capability for Active Message and RMA APIs - New Active Message interfaces - including: + Incremental AM handler registration + Expanded AM handler registration properties + Finer-grained AM payload limit queries + Negotiated-payload AM injection interfaces + New AM token query interface - Job initialization interface rewritten to use EX objects * GASNet-EX Spec v0.1: - Consult docs/GASNet-EX.txt for the detailed status of the evolving specification - gasnetex.h is the new public header - Major new EX object types have been defined, including: + Client - an instance of the client interface to the GASNet library + Segment - a client-declared memory segment for use in communication + Endpoint - local representative of an isolated communication context + Team Member - a collective communication context, used for endpoint naming All these objects are restricted to a single instance per process in this version. - Interfaces added for Local Completion, Immediates and new AM interfaces (see above) - GASNet-1 handles generalized to EX events - Most gasnet_ identifiers have new versions in the gex_ namespace - Most interfaces now accept flags for extensible fine-tuning of behavior * Legacy backward-compatibility layer: - gasnet.h now contains an implementation of GASNet-1 spec v1.8 in terms of the new EX interfaces. - Both layers interoperate freely so that legacy client code can be incrementally migrated to use of the new EX interfaces and features. ---------------------------------------------------------------------- The remainder of this file contains the unmodified ChangeLog from the GASNet-1 code base, from which the EX code was branched. Note some entries below do not apply to the EX branch. ---------------------------------------------------------------------- GASNet-1 ChangeLog ------------------ ---------------------------------------------------------------------- 07-20-2018: Release 1.32.0 * Cray uGNI (gemini- and aries-conduits) - Improved performance of non-bulk puts beyond the bounce-buffer size - Fix bug 3632: aries-conduit SEGV at startup with multi-domain - Fix bug 3647: aries-conduit should honor non-default process layouts - Fix bug 3695: AMReply injection might corrupt the payload of the running AM Medium Request handler. - Tweak the interface and documentation of GASNET_GNI_MEM_CONSISTENCY envvar. * Libfabric (ofi-conduit) - Fix bug 3682: incorrect behavior for non-bulk puts larger than a page - Compatibility fixes for libfabric version 1.6 * InfiniBand Verbs (ibv-conduit) - GASNET_DISABLE_MUNMAP now defaults to enabled for ibv-conduit. - Now use HCA's maximum supported MTU by default, resulting in nearly a 2x increase in peak Get bandwidth on modern HCAs. - Fix bug 3339: allow ibv-conduit to operate on Omni-Path hardware. ofi-conduit and psm-conduit remain the recommended conduits for Omni-Path. * Mellanox ConnectX series HCAs (mxm-conduit) - This conduit is now DEPRECATED. - Use of ibv-conduit is recommended for users with InfiniBand hardware. - Adjust envvar GASNET_PHYSMEM_{MAX,PROBE} handling to match other conduits * Portable UDP (udp-conduit) - Reduce polling cost on single-supernode runs. smp-conduit remains the recommended conduit for use on single-supernode shared-memory systems. * Portable MPI (mpi-conduit) - Reduce polling cost on single-supernode runs. smp-conduit remains the recommended conduit for use on single-supernode shared-memory systems. * GASNet tools (spec v1.12) - Numerous improvements to backtrace support, including fixing the following bugs: + Bug 3624: Improve backtrace fail-over behavior + Bug 3625: call prctl(PR_SET_PTRACER,...) before backtrace on Linux + Bug 3626: prioritize lldb on Mac OS X + Bug 3627: unblock the unfreeze signal prior to backtrace + Bug 3637: Fix EXECINFO backtrace for *BSD + Enable GDB backtrace on Cray systems, when available - Bug 3664: GASNETT_PREDICT_{TRUE,FALSE} result value semantics change slightly - Add gasnett_unreachable() - GASNETT_PLEASE_INLINE has been removed. Recommended replacement is `inline` - Improve behavior when installed public headers are passed to a compiler that was not probed at configure time. * General and Misc. - GASNET_MAX_SEGSIZE syntax has been expanded and now defaults to 85% of physical memory, split evenly between co-located processes on a host. Configure option to control this default renamed to --with-max-segsize= - GASNET_VIS_{AMPIPE,REMOTECONTIG} is now enabled by default on most conduits - GASNET_VIS_MAXCHUNK default value adjusted on many conduits to improve perf - New knobs GASNET_VIS_{PUT,GET}_MAXCHUNK for tuning put/get VIS chunk size - Fix GASNET_NULL_ARGV_OK for mpi-conduit and mpi-spawner - Additional debug checks now detect prohibited overlap in loopback RMA and AMLong. - The extended-ref source directory has been re-arranged - Clients using gasnet_coll_* must now explicitly #include - Events leading up to a crash are now more reliably reported in the trace file. * Platform support/portability - Support for Microsoft Windows 10 Subsystem for Linux (WSL) has graduated out of BETA status - Update MALLOC_OPTIONS setting for OpenBSD 6.x - Add gasnetrun support for IBM Job Step Manager (jsrun) - Add PLATFORM_COMPILER_C(XX)_LANGLVL to portable_platform (v5) - Fix bug 3741: misidentification of IBM XL Compilers 13.1.6 and newer (v6) - Fix bug 3743: verify correct KNL processor tuning on CNL - Fix bug 3679: AMUDP incompatibility with PGI C++ 17+ - Public headers are less susceptible to malfunctions when compiled with un-prefixed tokens redefined by the preprocessor. C/C++ keywords remain reserved, as do tokens prepended by one or more underscores or one of the reserved gasnet prefixes (see 'GASNet coding standards' in README-devel) * Configure and Build - Option --enable-strict-prototypes has been removed, see bug 3608. - Fix bug 3613: warning on #pragma GCC diagnostic for gcc < 4.6 - Fix bug 3629: avoid a parallel make bug - Add a git hash "watermark" to libraries - Warning enable flags are removed from GASNET_C(XX)FLAGS and friends. The flags remain available in GASNET_DEVWARN_C(XX)FLAGS for opt-in. - configure --disable-smp-safe is now deprecated. The default is enable-smp-safe. * Removal of unmaintained platform support - This release no longer supports the following platforms: + Cray/Tera MTA + SGI Altix - This release no longer supports the shmem-conduit, which was specific to the obsolete Cray X1 and SGI Altix NUMAlink networks. - This release removes support for the following compilers: + Kuck and Associates (KAI) C++ Compiler + PGI compilers older than the 7.2-5 release + Pathscale compilers older than 3.0 - This release removes support for the following compilers which had ceased to work with GASNet 1.28.0 due to insufficient support for C99: + GCC 2.x + LCC (a.k.a. "Local C Compiler" or "Little C Compiler") - BLCR integration support is officially deprecated ---------------------------------------------------------------------- 08-31-2017 : Release 1.30.0 * Cray uGNI (gemini- and aries-conduits) - Work-around bug 3480. For more details see gemini-conduit/README (source), or share/doc/gasnet/README-{aries,gemini} (installed). - Improve the handling of GASNET_PHYSMEM_* env vars to be more user-friendly - Improve robustness of exit code - The following configure options have been renamed, replacing "gni" by "aries" or "gemini" as appropriate: --with-gni-max-medium= --{en,dis}able-gni-multi-domain --{en,dis}able-gni-udreg - NOTE to users of PrgEnv-cray: there is a known bug in CCE-8.6 that leads to errors when linking libgasnet. See bug 3589 at https://gasnet-bugs.lbl.gov for the most complete and up-to-date details. * InfiniBand Verbs (ibv-conduit) - Improve the handling of GASNET_PHYSMEM_* env vars + Make variable names and interpretations more user-friendly + Allow configure-time setting of default values + Warn user if a slow probe is required for GASNET_PHYSMEM_MAX + Improve the corresponding documentation * Libfabric (ofi-conduit) - Fix bug 3426: Unbounded recursion within gasnetc_ofi_poll() - Significant improvements to AM buffer management and wire header overheads - Finer-grained control over AM buffering, see ofi-conduit/README - Initialization cleanups for stricter compliance with the OFI specification - Support for the Intel(R) True Scale Fabric provider, psm, has been removed. The Intel(R) Omni-Path Fabric is still supported through the psm2 provider. - We now recommend ofi-conduit for the Intel Omni-Path fabric. - The conduit has been validated on libfabric version 1.5.0. See ofi-conduit README for known issues regarding specific providers. * Intel Omni-Path PSM2 (psm-conduit) - This conduit is now DEPRECATED. - Use of ofi-conduit with libfabric's psm2 provider is recommended for users of the Intel Omni-Path fabric. * IBM PAMI (pami-conduit) - Improve latency for AM Medium/Long under 128 bytes, via PAMI_Send_immediate() - gasnet.h no longer includes PAMI headers into client code * GASNet tools (spec v1.10) - Fix bug 3448: x86*/Linux timers once again default to use of the TSC due to addition of new logic for correct calibration on newer Intel CPUs. - Add gasnett_nsleep() * Configure and Build - ${C,CXX,CPP,LD}FLAGS are now respected by configure in the traditional manner. Note these do NOT affect MPI_CC or HOST_{CC,CXX}, which have their own dedicated FLAGS variables that must be used for those purposes. - Environment variable inputs to configure (and their corresponding --with* option variants) are now case-insensitive and dash/underscore-insensitive. - --with-pmi has been split into --(en|dis)able-pmi and --with-pmi-home=/path - All --with-*-libdir options are renamed --with-*-ldflags - Most --with-*-includes options are renamed --with-*-cflags - --with-{blcr,fca}=/path are renamed to --with-{blcr,fca}-home=/path - BLCR support now disabled by default, use --enable-blcr to activate - {strict,missing}-prototype warnings are now automatically suppressed in GASNet public headers for clang and gcc 4.6+. - --enable-strict-prototypes is now deprecated, see bug 3608. - --disable-aligned-segments is now the default behavior, and GASNet will no longer default to adding -nopie linker flags on Darwin/OpenBSD. - Retire several obsolete or subsumed configure options - Numerous cosmetic improvements to configure --{help,version} output - GASNET_{LIBS,LDFLAGS} exported from .mak fragments more robustly contain the documented subset of linker arguments. - Improve system tuple handling for cross-configure - Fix a few non-portable constructs in shell commands * General and Misc. - GASNet spec v1.8.1 is a new edition of the 1.8 spec document: + bug 3575: clarify that loopback contiguous RMA operations with overlapping source and destination regions give indeterminate results. + Clarify the AMLong source/dest overlap prohibition + Correct the specified return type of gasnet_Error{Name,Desc} + Significant cosmetic formatting improvements + Updated contact information and URLs + Correct minor spelling errors and phrasing issues - Remove 'register' keyword from public headers for strict C++11/14 compliance - Fix some cosmetic overflows in trace/debug output of large numbers on ILP32 - Fix bug 3600: SEGV on long command line w/ STATS/TRACE/DEBUG * Platform support/portability - Add beta support for Microsoft Windows Subsystem for Linux (WSL) - Add lldb backtrace support for Mac OS X ---------------------------------------------------------------------- 03-17-2017 : Release 1.28.2 * Intra-node Shared Memory (PSHM) - PSHM is now enabled by default on nearly all platforms. The only exceptions are old Cygwin (1.x) and cross-compiled platforms, although most cross-compile scripts enable PSHM explicitly as appropriate. - Improved PSHM support on Mac OS X: + Now support (and use by default) PSHM-over-POSIX which works well without requiring any system configuration changes. - Improved PSHM support on Cygwin 2.0+: + Now support (and use by default) PSHM-over-POSIX which works without requiring the CYGSERVER (and is more reliable than the alternatives). * InfiniBand Verbs (ibv-conduit) - Work-around bug 3428: AMRDMA malfunctions on Pathscale optimizer - Fix bug 3435: long exit times and exit warnings for certain patterns - Fix bug 3441: AMRDMA disable controls * Intel Omni-Path PSM2 (psm-conduit) - Fix bug 3340: Performance loss for puts larger than 16KB The PSM2 MQ path is re-enabled for puts and is now semantically correct * Libfabric (ofi-conduit) - Add experimental support for the GNI provider on Cray hardware - Raise the default MaxMedium from 4k to 8k, and provide a new configure --with-ofi-max-medium=SZ flag to set the value - Fix non-blocking non-bulk puts to correctly enforce local completion - Improved concurrency of conduit code in threaded configurations - General performance improvements * Cray uGNI (gemini- and aries-conduits) - Add support for FMA and MDD sharing. See conduit README for details. - Fix bug 3358: Aries performance anomaly for 128-byte Gets * Platform support/portability - Fix several compatibility issues with recent PGI compiler versions * General performance improvements: - Streamline vector put/get handling of empty iovecs with AM pipelining - Fix performance degradation from --enable-throttle-poll on conduits that do not implement that feature (ibv, mxm, ofi, psm, pami, portals4) * Configure and Build - The cross-configure-cray* scripts have been renamed for clarity - configure works harder to find {ofi,psm,mxm} installations - configure works harder to resolve opt/debug conflicts in CC/CXX - configure --{en,dis}able-dev-warnings now allows toggling the addition of compiler warnings, independent of --enable-debug setting. Default unchanged. - configure works harder to select flags to suppress spurious warnings - Now provide pkg-config .pc files corresponding to each GASNet library - GASNet headers now use scoped warning suppression on clang and gcc 6.0+, allowing client code to compile with -Wunused without spurious warnings. - Fix bug 3351: move -D_GNU_SOURCE: MISC_CPPFLAGS to GASNET_DEFINES - Fix bug 3389: Avoid redundant config.status invocations * GASNet tools - portable_platform.h has been renamed gasnet_portable_platform.h - Fix bug 3322: portable_platform.h more robust to namespace interference - Workaround bug 3448: x86*/Linux timers now default to posix-realtime, to avoid a problem with native timers on newer Intel CPUs. * General and Misc. - Top-level documentation has been re-arranged: + PSHM usage information now lives in top-level GASNet README + GASNet developer documentation is no longer distributed/installed, but remains available online in the public git repository - MPI-based spawning now supports direct mpirun invocation. See other/mpi-spawner/README for details. - PMI-based spawning is now supported by gasnetrun_{ibv,ofi,mxm,psm} See other/pmi-spawner/README for details. - New GASNet email lists are now available! See the web page for details ---------------------------------------------------------------------- 10-21-2016 : Release 1.28.0 * Cray uGNI (gemini- and aries-conduits) - Updated instructions for configuring with SLURM's srun - Modified linker flags for compatibility with dynamic libraries * Intel Omni-Path PSM2 (psm-conduit) - Improved handling of multi-threaded and abnormal exits - Support for PSHM supernode size less than procs/node - Fix bug 3340 - Assertion failure at gasnete_op_markdone() - Work-around bugs 3333 and 3342 Note that the work-around for bug 3342 has resulted in a loss of performance for Puts larger than 16KB, relative to previous releases. We are actively working to restore the prior level of performance in a future patch release. Please see psm-conduit/README for more detailed information. * Mellanox ConnectX series HCAs (mxm-conduit) - Enable zero copy in bulk put operations - Fix bug 3344 - mxm-seq link failures * InfiniBand Verbs (ibv-conduit) - Fixed error in default barrier exposed by libverbs on Omni-Path HCAs * Libfabric (ofi-conduit) - Improved handling of abnormal exits - Corrected default libfabric installation location to be /usr * Portable UDP (udp-conduit) - Restructure network buffer management to provide scalable buffer memory utilization to thousands of nodes and beyond. - Adjust the set of available environment tuning knobs for better control of transfer performance at scale. See udp-conduit/README - Adjust default transfer parameters for better performance on 1GbE - Numerous misc changes to improve performance - Improve stdout/stderr routing to be more robust and use fewer descriptors - Restructure AMUDP headers to reduce namespace clutter - Fix a compatibility issue with Cray CNL - Fix a use-after-free bug in argument processing * SGI Altix / Cray X1 Shmem (shmem-conduit) - This conduit is now DEPRECATED. It relies on system-specific extensions to SHMEM implemented in DSM hardware that has now been retired. * Platform support/portability - Cygwin-2.x + Improved performance of mutexes + Improved backtrace support + Fix for compilation issues with Clang - Cray Compilers + Suppress benign (or incorrect) warnings from recent CCE compilers - PGI Compilers + Fix bug 3324 by working around a bug in pgcc-16.4 and newer. - Pathscale/Ekopath Compilers + Fix bug 3343 by working around a bug in version 5.x compilers - GNU Autotools + Fix bug 3285 - issues with recent automake versions - Intel Second Generation Xeon Phi (aka Knights Landing) + Now provide an initial cross-configure-intel-knl script - Configure script + Options --disable-psm, --disable-gemini and --disable-aries now FULLY disable the corresponding configure probes * GASNet tools (spec v1.9) - Add a tools wrapper for POSIX reader-writer locks (gasnett_rwlock_t) * General and Misc. - GASNet now requires that the backend C compilers provided to configure ($CC and $MPI_CC, if provided) must support a few widely-implemented C99 features. See bug 3307 for details. - GASNet release version compatibility between client objects and library is now enforced at link time, to ensure correct operation. - Apply optional MANUAL_* make flags more consistently (see README) - Cleanup extern "C" in public headers for more robust C++ client support - Add GASNET_LD_REQUIRES_{CXX,MPI} exports from .mak fragments - Numerous minor fixes to silence harmless warnings on various systems ---------------------------------------------------------------------- 08-01-2016 : Release 1.26.4 * This bug fix release addresses issues in several conduits that were discovered since the 1.26.3 release. * InfiniBand Verbs (ibv-conduit) - Clients written in C++ would fail to link with undefined references to gasnetc_amrdma_balance. - A build of ibv-conduit configured using --disable-ibv-rcv-thread would produce numerous warnings due to a type mismatch. Some C compilers may have treated the type mismatch as an error. * Libfabric (ofi-conduit) - Add locking to enable thread-safety in PAR builds - Add diagnostics to OFI provider selection and warn about providers that are expected to deliver suboptimal performance. - Remove mr to ep binding for compliance with current OFI spec - Fix a compilation error on some platforms * Mellanox ConnectX series HCAs (mxm-conduit) - Fix a compilation error on some platforms * Intel Omni-Path PSM2 (psm-conduit) - Fix a compilation error on some platforms * Portable UDP (udp-conduit) - Fix a data corruption issue on 64-bit OSX on PowerPC * Portable MPI (mpi-conduit) - Add a GASNET_MPI_THREAD variable to control MPI-2 threading mode requested by AMMPI startup, for use in mixed-mode GASNet/MPI apps. * General and Misc. - Tweak the default ordering of conduits in CONDUITS configure output, to reflect intended defaulting priority. - Downgrade ofi and portals4 conduits to "portable" conduits in startup code that checks and warns about the availability of native conduits. - Many improvements to conduit documentation ---------------------------------------------------------------------- 05-23-2016 : Release 1.26.3 * This release fixes three significant bugs affecting udp-conduit: - Out-of-order delivery of UDP messages (which can occur on networks with multiple paths) was going undetected and could lead to silent loss and/or erroneous redelivery of AMs in the presence of retransmissions (caused by packet loss or high network load). - On Cygwin 2.5 (2016-04-11 and later), ioctl(FIONREAD) always returns failure, rendering udp-conduit entirely unusable on that platform. - On FreeBSD, ioctl(FIONREAD) may truncate long datagrams to around 600 bytes, rendering udp-conduit unusable on that platform. ---------------------------------------------------------------------- 05-12-2016 : Release 1.26.2 * Cray uGNI (gemini- and aries-conduits) - Allow configure and build without use of the Cray wrapper compilers - Use Cray's UDREG library to ammortize cost of dynamic registration - Maximum supported process count doubled to 2^24 (16 million) - Maximum AM Medium payload increased from 960 to 4032 bytes without a corresponding increase in the buffer allocation footprint - Maximum AM Long payload raised to 8MB on Aries (still 1MB on Gemini) - Multiple changes to reduce startup overheads - Fixes for C99 code compilance * InfiniBand Verbs (ibv-conduit) - Fix a (rare) leak in the firehose dynamic memory registration library which could have lead to resource exhaustion in applications with large memory usage. - Fix link failures with "--enable-ibv-conn-thread --disable-ibv-rcv-thread" - Move some internal data to shared memory (keeping one copy per node) * Libfabric (ofi-conduit) - Fixes to enable use of the "psm" provider - Fixes for C99 code compilance * Portable UDP (udp-conduit) - Support '%P' expansion (for arg[0]) in CSPAWN_CMD * Intra-node Shared Memory (PSHM) - Delay cross-mapping of segments until gasnet_attach() to avoid a temporary over-commit of resources (fixes bug 3277 and possibly others). * Platform support/portability - Improved support for Cygwin-2.5 * Berkeley Lab Checkpoint/Restart (BLCR) This release is the first to include (experimental) support for system-level checkpoint and restart using BLCR - Support is currently only available in ibv- and udp-conduits - See other/blcr/README-blcr for more information * General and Misc. - Multiple changes to reduce startup overheads - Fix gasnetrun_* scripts for perl's deprecation of POSIX::tmpnam() - Fix code in test.h for --enable-segment-everything with large node count - The cross-configure-intel-mic script has ben renamed to ...-knc to more accurately identify the target and to avoid confusion with knl ---------------------------------------------------------------------- 10-27-2015 : Release 1.26.0 * New conduits (network APIs) added: This is the first public release of two new conduits: OFI and PSM. Both are believed to be complete and correct, but have not yet been subjected to as thorough testing and tuning as other conduits. - ofi-conduit OpenFabrics Interfaces (OFI) is not a vendor or hardware-specific API. It is a framework focused on exporting fabric communication services to applications. OFI is best described as a collection of libraries and applications used to export fabric services. The ofi-conduit code was contributed by Intel Corporation. See ofi-conduit/README for additional details. - psm-conduit This conduit runs over the PSM 2.0 API supported by Intel's Omni-Path fabric. There is no support for the PSM 1.x API. The psm-conduit code was contributed by Intel Corporation. See psm-conduit/README for additional details. * InfiniBand Verbs (ibv-conduit) - Updates for Solaris-11.2 * IBM PAMI (pami-conduit) - Eliminate start-up failures when PSHM is enabled but only one process is running per compute node * Cray uGNI (gemini- and aries-conduits) - Eliminate a rare deadlock - Reduce thread contention when polling in PAR builds - Reduce resource usage when configured with --enable-gni-multi-domain - Aries only: GASNET_GNI_MEMREG is now zero by default (unbounded) * Portals-4 (portals4-conduit) - Fix broken support for --enable-segment-everything * Portable UDP (udp-conduit) - Remove long-deprecated support for job spawning via Berkeley Millennium "rexec" and Berkeley NOW "gexec" (GASNET_SPAWNFN values "R" and "G") - Reduce start-up and shutdown times (significantly on some systems) - Fix issues with quoting by spawner of arguments and working directory - Fix unclean exits when client passes non-zero to gasnet_exit() * Portable MPI (mpi-conduit) - Reduce start-up and shutdown times (significantly on some systems) - Eliminate use of deprecated MPI_Errhandler_set() with MPI-2 or higher * PMI-based job-launch (pmi-spawner) - Improve configure script to auto-detect more PMI implementations * SSH-based job-launch (ssh-spawner) - Correct a misspelled environment variable name in the documentation - Eliminate orphaned processes under certain abnormal exit conditions * Intra-node Shared Memory (PSHM) - Eliminate blocking in gasnet_barrier_notify() by shared memory barrier (a behavior which is prohibited by the GASNet specification) - Add environment variable GASNET_PSHM_BARRIER_HIER which can be used to disable the hierarchical shared memory barrier at runtime - Fix bug that prevented use of hugetlbfs without PSHM - Enhance BlueGene/Q PSHM support to no longer crash if BG_MAPCOMMONHEAP has not been set to 1 (instead GASNet will warn and continue w/o PSHM) * Platform support/portability - Power/PowerPC + Add initial (experimental) support for ppc64el (little-endian POWER) + Add support for XLC for little-endian POWER (uses clang front-end) - SPARC64 + Fix for Linux/SPARC64 support, which had ceased to work some time ago - Intel Xeon Phi (a.k.a. MIC) + Add contributed "gasnetrun_mic" for use of Phi without an mpirun - ARM and AARCH64 + Enable support (inline asm, etc.) for clang C and C++ compilers - OpenBSD + Update to pthreads support for more-recent clang versions + Update tests to work with OpenBSD's rand() implementation - Cray Compilers + Add work-arounds for certain known bugs in CCE 8.3 and 8.4 compilers * General and Misc. - Support calling gasnet_init(NULL,NULL) for clients without access to argv - Improve support for C++ clients in Makefile fragments - Use relative paths in Makefile fragments to support relocatable clients - Disable "threadinfo-opt" on many platforms with good native TLS support - Add '-peer' option to gasnet_trace script to bin output by remote node * GASNet Tools - Implement GASNETT_{HOT,COLD} function decorations - Add support for obtaining backtraces via the "pstack" utility ---------------------------------------------------------------------- 04-27-2015 : Release 1.24.2 * Cray XE, XK and XC series (gemini- and aries-conduits) - Implemented PSHM-over-hugetlbfs as alternative to XPMEM, when configured with "--disable-pshm-xpmem --enable-pshm-hugetlbfs". * InfiniBand (ibv-conduit for OpenFabrics Verbs) - Updated ibv-conduit code for the new OFED XRC interfaces. - Added enumeration of supported spawners to Makefile fragments. * Mellanox ConnectX series HCAs (mxm-conduit) - Fixed a race in gasnet_exit(). - Added enumeration of supported spawners to Makefile fragments. * IBM BG/Q (pami-conduit) - Now fully support building with "bgclang". * Shared-memory (smp-conduit) - Extended API implementation is now fully inlinable. * PSHM (intra-node shared memory) - Updated PSHM-over-XPMEM for SGI's "xpmem_2" APIs. - Added new optional PSHM implementation based on hugetlbfs. - Made corrections to behavior when PSHM is not enabled: + Coordinate mmapLimit probe per-host (not per-supernode). + Correctly initialize gasnet_nodeinfo_t.supernode (all singletons). * Platform support/portability - Updated to far more recent config.guess and config.sub. - Fixed support for gcc-5 on Mac OSX / Darwin. - Eliminated many warnings from recent clang compilers. - Made several fixes for improved Xeon Phi support. - Support for ARMv5, v6 and v7 is no longer "experimental" - Added initial (experimental) support for ARMv8 (aka AARCH64 or ARM64). - Improved support for compiler wrappers like distcc and ccache. * GASNet Tools - Implemented GASNET_MAXIMIZE_RLIMIT_* environment variables. - Implemented GASNETT_DEPRECATED function decoration. * General - Fixed bug3153: problems with lib vs lib64 on SUSE Linux distributions. ---------------------------------------------------------------------- 10-28-2014 : Release 1.24.0 * Cray XE, XK and XC series (gemini- and aries-conduits) - Fix to allow fork()/system() on Gemini and Aries conduits - Support new configuration option --disable-hugetlbfs to disable use of hugepages, for instance to allow use of valgrind. * InfiniBand (ibv-conduit for OpenFabrics Verbs) - Reduce startup time spent probing max pinnable memory * Mellanox ConnectX series HCAs (mxm-conduit) - Fix compile failures under FAST and EVERYTHING segment modes - Changes to exit flow to avoid hangs with mxm-2.0+ - Environment variable GASNET_PHYSMEM_NOPROBE now defaults to YES - Reduce startup time (if any) spent probing max pinnable memory - Support configuration namespaces in mxm-2.1+ * Mellanox Fabric Collective Accelerator (FCA) - Support running on the "hpcx" Linux distribution * Portable UDP support (udp-conduit) - Remove arbitrary limit on command line length in udp-conduit when using ssh-based spawning (GASNET_SPAWNFN=S). * Platform support/portability - Fix bug 3248 - must disable PIE by default on recent OpenBSD. * General - Better support for clients written in C++ + Probe CXX characteristics even when udp-conduit is disabled + Add CXX-related settings to generated .mak files - PMI-based spawning now supports PMI2 (ibv, mxm and portals4) ---------------------------------------------------------------------- 05-22-2014 : Release 1.22.5 (minor bug fix release) * Cray XE, XK and XC series (gemini- and aries-conduits) - Fix munmap failures when configured without PSHM support ---------------------------------------------------------------------- 05-05-2014 : Release 1.22.4 * Cray XE, XK and XC series (gemini- and aries-conduits) - Fix Bug 3200 - startup failures on Cray systems with craype-2.x - Correct two issues with Cray's CCE-8.2.x (bugs 3189 and 3190) * IBM BG/Q (pami-conduit) - Provide PSHM (shared memory) support on BlueGene/Q (ON by default) * Mellanox ConnectX series HCAs (mxm-conduit) - Several bug fixes and performance improvements * Platform support/portability - Add whitespace after string constants to support C++11 clients * PSHM (intra-node shared memory) - Implement PSHM via "global heap", used on BlueGene/Q but applicable in theory to other systems with a native global address space. * GASNet Tools - Add SWAP (fetch-and-set) operation to the atomics - Extend fixed-width atomics to include all defined operations * General - Several fixes for missing or incorrect PowerPC memory fences - GASNet development now takes place in a public repository. See https://bitbucket.org/berkeleylab/gasnet - Numerous small changes for the switch from CVS to Git * Removal of unmaintained platform support - This release no longer supports the following platforms: + Cray X1 and T3E + IBM BlueGene/L and BlueGene/P + NEC SX Series + Sicortex + DEC Alpha CPU + HP PA-RISC CPU + ABIs prior to V8+ on SPARC CPUs + LP32 ABI on IA64 - This release no longer supports the following operating systems: + Unicos, Catamount, HP/UX, SuperUX, Tru64 (OSF/1), AIX, IRIX - This release no longer supports the following compiler families: + Compaq, NEC, SGI, HP on IA64 and PA-RISC, PathScale on MIPS ---------------------------------------------------------------------- 10-21-2013 : Release 1.22.0 * Cray XE, XK and XC series (gemini- and aries-conduits) - With this release support for the Aries interconnect of the Cray XC-30 system has graduated out of BETA status. - This release includes a new implementation of Active Messages + Memory use scales better (18% less per peer by default) + Larger default MaxMedium yields higher peak AM Medium bandwidth + MaxMedium may now be changed at configure time - This release features a new default barrier: GNIDISSEM - Contention among pthreads in a PAR build has been greatly reduced. - Optional (experimental) "multi-domain" support to almost entirely eliminate contention among pthreads in PAR builds (see the conduit README for details and instructions to enable and use this feature). - Fix bug 3078 in which use of addresses in PSHM-imported GASNet segments as local address in Extended API calls would crash. * IBM BG/Q (pami-conduit) - Support for intra-node shared memory communication (PSHM) is now available on BlueGene/Q. Please see README for details of the configuration and environment setup required. - Updates to support changes made in the V1R2M1 driver. * InfiniBand (ibv-conduit for OpenFabrics Verbs) - Now support direct PMI-based launch (e.g. srun or hydra) - Significantly simpler code in the critical paths for Puts and Gets - This release conduit features a new default barrier: IBDISSEM - Properly support systems with pagesize larger than 4KB. * Mellanox ConnectX series HCAs (mxm-conduit) - Now support direct PMI-based launch (e.g. srun or hydra) - This release adds support for v2.x of the MXM API. * Mellanox Fabric Collective Accelerator (FCA) - While FCA acceleration of collectives is still only available in a SEQ (non-pthreaded) build of GASNet, it can now be enabled at configure time without disabling compilation of PAR and PARSYNC libraries. * Portals 4.x API (portals4-conduit) - The implementation now includes a native implementation of the Extended API (Put and Get) in terms of the Portals4 API. * Portable UDP support (udp-conduit) - Support MASTERIP and WORKERIP settings to deal with a much wider range of network configurations. See the counduit README. * Platform support/portability - Initial support for building GASNet with NVIDIA's nvcc compiler - Initial support for running GASNet on Intel MIC (a.k.a. Xeon Phi); This release only supports running GASNet on MIC in native mode. - Fix Bug 3167 - incorrect memory fences with Cray C compiler . * PSHM (intra-node shared memory) - Fix bug 3181 in which unequal segment requests could lead to either failure at attach time, or incomplete sharing of memory. * General - New GASNET_NO_CATCH_SIGNAL environment variable to suppress the default signal handling behavior when debugging. - Initial prototype implementations of several features slated for standardization in a future GASNet specification: + Variable argument AM Request and Reply functions gasnet_AMRequest{Short,Medium,Long,LongAsync}() gasnet_AMReply{Short,Medium,Long}() Work just like the fixed-argument versions, but take a "numargs" integer argument before the first handler argment (or as the last argument when numargs == 0). + Unnamed split-phase barrier which can leverage hardware support not possible when implementing full (UPC-centric) name matching. GASNET_BARRIERFLAG_UNNAMED as flags argument + Single-phase barrier (both with and w/o name matching) also able to leverage additional hardware support. gasnet_barrier(id, flags) + Barrier matching results query (for building of hierarchical implementation which require UPC-style name matching) int is_anonymous = gasnet_barrier_result(&value_if_not_anon); + The number of implicit-handle (nbi-suffixed) operations outstanding is now unbounded, including when using an nbi access region. * Removal of unmaintained network conduits - This release no longer supports the following networks: + elan (Quadrics elan3/elan4) + gm (Myrinet GM) + vapi (legacy Mellanox-specific InfiniBand) + lapi (IBM LAPI) + portals (Cray Portals for XT series) + sci (Dolphin SCI) If you require GASNet on one these networks, and can provide access to resources for maintenance of the code, please contact us. ---------------------------------------------------------------------- 04-30-2013 : Release 1.20.2 * Cray XC30 (aries-conduit) - This release includes Beta support for the Aries interconnect of the Cray XC30 (aka Cascade) system. This initial implementation is believed to be fully correct, but has yet to be fully tuned. * Cray XE & XK series (gemini-conduit) - With this release support for the Gemini interconnect of the Cray XE and XK series systems has graduated out of BETA status. - Significantly improved performance via uGNI's "RELAXED_PI_ORDERING", increased overlap in non-blocking operations, and a lower latency mechanism for small Puts. * IBM PAMI (pami-conduit) - Updated to support BlueGene/Q driver V1R2M0 - BlueGene/Q users are advised to use V1R2M0 + efix 23 (or newer) if using GASNET_PAR mode. Prior to efix 23, memset() in the BG/Q C runtime was not thread safe, and this was responsible for the "unexplained failures" noted in GASNet's 1.18.2 release notes. * NEW Beta support for Portals 4.x API (portals4-conduit) - This release includes BETA support for the Portals 4.x API as implemented at https://code.google.com/p/portals4/ - This initial implementation does not yet include "native" Put or Get support, using the AM-based reference implementation instead. * InfiniBand (ibv- and vapi-conduits) - Can control the IB MTU size via environment variable GASNET_MAX_MTU. - Automatically ignore unsupported iWARP adapters. * PSHM (intra-node shared memory) - Add the GASNET_SUPERNODE_MAXSIZE environment variable to control the grouping of cores on a compute node into multiple GASNet "supernodes". * Platform support/portability - Added support for THUMB2 mode of recent ARM processors - Work around a bug in Clang++ building udp-conduit (GASNet bug 3129) ---------------------------------------------------------------------- 10-30-2012 : Release 1.20.0 * IBM PAMI (pami-conduit) - With this release PAMI conduit has graduated out of BETA status. - This release now implements GASNet's collectives via the PAMI collectives, yielding much-improved performance in many cases. - A faster default barrier implementation (PAMIDISSEM). * Cray XE & XK series (gemini-conduit) - Improved performance for 129 to 4096 byte transfers. - This release includes *experimental* support (OFF by default) for improved performance via uGNI's "RELAXED_PI_ORDERING", which can be enabled using an environment variable. See the conduit README for more information. * Mellanox ConnectX series HCAs (mxm-conduit) - This is the first official release of GASNet support for the "MXM" API for recent Mellanox's InfiniBand HCAs. This is based on the code which Mellanox has been distributing for about one year. * Mellanox Fabric Collective Accelerator (FCA) - Optional collectives acceleration using Mellanox's FCA which works with both ibv-conduit and mxm-conduit on recent Mellanox HCAs. - See other/fca/README-fca.txt for details * PSHM (intra-node shared memory) - Active Messages over shared-memory have been reimplemented using Nemesis lock-free queues, yielding improved performance and lowering the memory required from quadratic to linear in cores-per-node. - Intra-node barrier has been reimplemented for higher performance. - Support for up to about 45K processes/node (vs. default of 255) is now available as a configure option: --enable-large-pshm. This has been tested to 4096 proc/node. However, memory and other resources, such as file descriptors, will typically impose a much lower limit. * General - A new barrier implementation (an RDMA-based dissemination algorithm) replaces the previous default (AM-based dissemination) for most network conduits. - Barrier matching rules in "corner-cases" have been revised to match the semantics expected to appear in the UPC 1.3 specification. The changes legalize some calling cases which were previously erroneous. No cases which were legal before have become illegal. - SLURM integration in ssh-spawner. ---------------------------------------------------------------------- 05-14-2012 : Release 1.18.2 * IBM PAMI (pami-conduit) - This release includes a BETA of native support for the IBM PAMI (Parallel Active Message Interface) network API, found on the IBM BG/Q and on systems running IBM's Parallel Environment (IBM PE) software for Linux (both x86-64 and PowerPC architectures). - Testing on an IBM Power 775 system (a.k.a. PERCS or Blue Waters) with its HFI network passed all GASNet and Berkeley UPC tests. - Testing on an IBM BlueGene/Q shows there are still some unexplained failures at the time of this release. - This code has not yet been tested on IBM PE clusters running PAMI over InfiniBand or Ethernet. Reports of such testing would be appreciated. Access to such systems for testing would be GREATLY appreciated. - The performance of pami-conduit has not been fully tuned, however we believe that the implementation is correct (with only minor bugs remaining on BlueGene/Q). - This is still only a BETA-quality implementation, and performance improvements are anticipated in future releases. * Cray XE & XK series (gemini-conduit) - Added Cray XK series as a supported/tested platform. - Reduced by more than 60% the memory used for receiving AMs (bug 3067). - Made several code cleanups on the road to production-quality. - This conduit is still "BETA" due to known room for improvements. * InfiniBand (ibv- and vapi-conduits) - Improved scalability (time and memory) of startup/shutdown code + Switch to native InfiniBand communication earlier in startup. + Use more scalable communication pattern for exit coordination. + Made communications performance improvements to sockets code in the ssh-spawner used for startup when spawning via MPI is unavailable or has been disabled. - Made improvements to dynamic connection support + The dynamic connection code has been more robust in the face of lost packets through use of TCP-inspired adaptive timeouts. + The dynamic connection code has been made insensitive to the problem of inattentive peers (ones not making frequent enough calls to GASNet) through the use of an internal thread which wakes up only on arrival of network traffic related to dynamic connection setup. - Made improvements in the Active Message progress thread + The AM progress thread is finally available in ibv-conduit. + The maximum wake-up rate of the progress thread can now be limited. + See the conduit README file for documentation on GASNET_RCV_THREAD and GASNET_RCV_THREAD_RATE environment variables for more info. * PSHM (intra-node shared memory) - Extended PSHM-via-XPMEM support to SGI Altix series, where it is available at configure time, but not currently used by default. - Support for PSHM over SystemV shared memory no longer requires a working implementation of mmap() (bug 3066). + This is the first PSHM support for Cygwin. - Expanded PSHM docs, including notes for configuration on Cygwin. See the top-level GASNet README for details. * Platform support/portability - Ported network-independent code to the IBM BlueGene/Q. This provides fully-functioning GASNet-Tools and smp- and mpi-conduits. - Implemented native 64-bit atomics for ILP32 builds with Apple XCode-4.x, resolving bug 3071 which required disabling them in the 1.18.0 release. - Force PGI compilers on MacOS to honor the documented ABI (bug 2150). - Made several changes to ssh-spawner sockets code for better portability. - Disabled ASLR (address-space layout randomization) in MacOS Lion (and newer) via the GASNET_LDFLAGS. - No longer trust Cygwin's gethostid(), which has known problem. - Added initial support for Clang (bug 3075). + Not yet listed in README as officially supported for any target + x86 and x86-64 targets have been well tested on Linux and *BSD + x86 and x86-64 targets have been lightly tested on MacOS Lion + ppc64 target has been lightly tested on BG/Q platforms - Made fixes for __attribute__ configure probes + The __always_inline__ probe failed incorrectly with gcc-4.7.x. + The __format__ probe failed incorrectly with PGI compilers. - Improved support for "old" C compilers by removing or reducing unnecessary C99 dependencies. * General - Fixed an error in README's instructions for use of the Makefile fragments, which was missing "$(GASNET_CPPFLAGS)" in the ".c.o" rule. - Continued improvement to signal handling for smp-conduit for fewer "orphans" when an application is terminated by a signal or abort(). - Implemented/documented GASNET_THREAD_STACK_{MIN,PAD} environment vars. - Annotated many (but not yet all) known-benign memory leaks in the report generated when GASNET_MALLOCFILE is set (for bug 3088). - Improved documentation (in code comments) for conduit implementers. * Build and configure - Most instances of "debug vs. optimize compilation conflict" in the MPI compiler are now resolved without user intervention. - Support for GASNet's error-checking implementation of malloc and its associates can now be controlled independent of the --enable-debug configure option (but is still enabled by default when configured with --enable-debug). This resolves bug 3089. + "--enable-debug-malloc" enables error-checking malloc while not enabling other runtime assertions associated with "--enable-debug". + "--enable-debug --disable-debug-malloc" yields a debug build without GASNet's error-checking wrappers for malloc and related calls. This is useful when an external debugging malloc library is to be used. ---------------------------------------------------------------------- 10-30-2011 : Release 1.18.0 * Cray-XE series (gemini-conduit): - This release includes a BETA of native support for the Cray XE network. - The performance of gemini-conduit has not been tuned, however we believe that the implementation is correct (with only minor bugs remaining). - This is still only a BETA-quality implementation, and significant performance improvements are anticipated in future releases. * General - Implemented faster atomics for x86, x86-64 and PPC64. - Improved signal handling for smp-conduit for fewer "orphans" when an application is terminated by a signal. - Fix output corruption sometimes seen when redirecting stdout/stderr. - GASNET_TMPDIR env var to control placement of most temporary files. - Better support for systems where gethostid() returns 127.0.0.1. - Fixed PSHM-over-SYSV bug with non-contiguous process distributions. - Field remote_addr in gasnet_seginfo_t has been removed and the signature of gasnet_getNodeInfo() has changed. If your GASNet client was using these undocumented interfaces, then it will need to be updated. * Platform support/portability - Enabled partial backtrace support for Cray-XT and XE series systems. - Make allowances for odd sbrk() implementation on Darwin. - Probe for /dev/mmtimer on x86-64-based Altix platforms (bug 2880). - Improved support for systems lacking an atomic C-A-S (bug 3043). - Added work-arounds for Open64 and PathScale compiler bugs. - Fixed various warnings seen with recent gcc and icc versions. - Made corrections to MIPS support for "o32" ABI. - Extended ARM support to a wider range of ISA revisions. * InfiniBand (ibv- and vapi-conduits): - Cleanup/simplify AM code for InfiniBand. - Ignore Mellanox HCA ports configured for Ethernet. * Firehose dynamic-memory registration library (several conduits): - Fixed bug 2768: errors with firehose at node counts over 4096. - Reduced memory usage in firehose library * Build and configure: - Provide Makefile fragments for GASNet-Tools clients (bugs 2565 and 2940). - Fixed problems with autoconf 2.64 and newer (bugs 2648 and 2748). - Now ship with updated config.guess and friends. ---------------------------------------------------------------------- 10-17-2011 : Release 1.17.6 * A "stable snapshot" - first release candidate for 1.18.0 ---------------------------------------------------------------------- 09-23-2011 : Release 1.17.4 (gemini-conduit only beta release) - This is a Beta release featuring an initial native implementation for the Gemini interconnect of the Cray XE. - The performance of gemini-conduit has not been tuned, but we believe that the implementation is correct. - Relative to the previous stable release, 1.16.2, this Beta includes several miscellaneous changes not described here. Most are fixes for bugs or improvements to performance, and none are suspected to make this release any less stable than 1.16.2. - This Beta has been mostly tested on Cray XE6 systems, but is not known or suspected to be less stable on any other specific platforms. ---------------------------------------------------------------------- 05-18-2011 : Release 1.16.2 (feature and bug fix release) * General: - Fixed bug 2951: exitcode=1 from smp-conduit under unusual conditions - Fixed an infrequent race in PHSM debugging code that caused rare crashes - Fixed minor bugs in the non-default AMCENTRAL barrier - Fixed many additional minor bug fixes and performance improvements * InfiniBand (ibv- and vapi-conduits): - Fixed bug 2950: ibv-conduit page alignment problem on ia64 - Improved InfiniBand scalability + This release adds support for the XRC extension to the InfiniBand specification which can greatly reduce the memory and HCA resource requirements for large node counts, when used together with SRQ. For more details on SRQ and XRC see vapi-conduit/README (source) or share/doc/gasnet/README-ibv (installed). + This release adds support for operating ibv- and vapi-conduits without connecting all pairs of nodes at startup (avoiding the associated costs in time, memory and HCA resources). For more information see vapi-conduit/README (source) or share/doc/gasnet/README-{ibv,vapi} (installed) for documentation on the GASNET_CONNECT_* family of environment variables. + Several additional reductions in memory use * IBM SP (lapi-conduit): - Enable partial PSHM support when not using lapi-rdma - Link w/ "big TOC" by default * Build and configure: - Improved configure support for AIX 6.x ---------------------------------------------------------------------- 12-08-2010 : Release 1.16.1 (minor bug fix release) * General: - Eliminated an infrequent race in an assertion that caused rare crashes. - Fixed a configure problem that would reject OSS12.2's sunCC. - Fixed bug 2927: PSHM breaks with greater than 255 processes. - Eliminated infinite recursion on some error exits in smp-conduit. - Additional small fixes in the collectives and PSHM * Cray-XT series (portals-conduit): - Improved speed of job startup on large-memory nodes. ---------------------------------------------------------------------- 11-01-2010 : Release 1.16.0 * General: - Environment vars to limit which nodes generate various outputs: + GASNET_BACKTRACE_NODES - limits GASNET_BACKTRACE output + GASNET_TRACENODES - limits GASNET_TRACEFILE output + GASNET_STATSNODES - limits GASNET_STATSFILE output + GASNET_MALLOCNODES - limits GASNET_MALLOCFILE output * InfiniBand (ibv-conduit): - This release features a (re)implementation of Active Messages for ibv-conduit via SRQ (Shared Receive Queue) which greatly reduces the memory requirements for large node counts. - Implementation now supports (in theory) as many as 65535 GASNet nodes (processes), up from 16384. * Cray-XT and Cray-XE series: - Added support for PSHM (requires optional PSHM-over-SystemV) - Fixed bug 2435: portals-conduit assertion failures if signalled - gasnett_set_affinity() now implemented under CNL/CLE - Initial testing on XE series (w/ mpi-conduit, no native support) * Process-Shared Memory (PSHM) Support - Now enabled by default on Linux - Enabling PSHM no longer disables conduits lacking PSHM support - Optional implementation via SystemV shared memory - Optional implementation via mmap()ed files - AMPoll operation now O(1), rather than O(procs_per_node) - Fix bug 2826: testhsl failures with PSHM + mpi-conduit * Misc Platform support: - Fix bug 2530: bad addressing for 128-bit atomics on x86-64 - Added gasnett_set_affinity() implementation for Solaris - Improved support for SGI Altix models w/ x86-64 CPUs including the ICE and UV family platforms. - Improved debugger support for MacOSX * Build and configure: - Fix bug 2688: installing extraneous internal headers ---------------------------------------------------------------------- 10-24-2010 : Release 1.15.8 * A "stable snapshot" - second release candidate for 1.16.0 ---------------------------------------------------------------------- 10-17-2010 : Release 1.15.6 * A "stable snapshot" - first release candidate for 1.16.0 ---------------------------------------------------------------------- 06-28-2010 : Release 1.15.4 (ibv-conduit only beta release) - This is a Beta release featuring an initial (re)implementation of Active Messages for ibv-conduit via SRQ (Shared Receive Queue). - SRQ is an InfiniBand API mechanism for more scalable memory usage as the number of connected peers increases. - In previous releases of ibv-conduit each additional peer required an additional GASNET_AM_CREDITS_PP buffers (32 by default) be allocated for receiving AM traffic. At 4KB per buffer plus additional metadata for management, this would amount to about 133KB per peer. - The introduction of SRQ allows ibv-conduit to operate with no more than 1024 AM receive buffers (4MB + management overheads) independent of the number of peers, with little or no performance impact on well- behaved applications. - This initial implementation is known to deadlock under very rare AM- intensive workloads, or when certain settings are reduced to values much lower than their defaults. This will be resolved in the next Beta, prior to the 1.16.0 release. - There is no SRQ implementation for vapi-conduit. - Relative to the previous stable release, 1.14.2, this Beta includes several miscellaneous changes not described here. Most are fixes for bugs or improvements to performance, and none are suspected to make this release any less stable than 1.14.2. - This Beta has been mostly tested on ibv-conduit systems, but is not known or suspected to be less stable on any other specific platforms. ---------------------------------------------------------------------- 05-20-2010 : Release 1.14.2 * General: - Much improved support for heterogeneous compilers (CC, CXX and MPI_CC) - Work-around for broken MALLOC_CHECK_ support on some glibc versions - Use MALLOC_OPTIONS variable on *BSD as we use MALLOC_CHECK_ on glibc - Fix parsing of GASNET_{FREEZE,BACKTRACE}_SIGNAL env vars * InfiniBand (vapi- and ibv-conduits): - Fix bug 2079: stack overflow errors when vapi/ibv compiled with pgcc * Cray-XT series (portals-conduit): - Improved reliability and scalability of job startup and termination code. - Fixed a corner-case bug in AM Medium code - Preliminary work to support PrgEnv-cray (requires CCE 7.2 or newer) * IBM BlueGene/P (dcmf-conduit): - Fix bug 2756: PAR mode crashes with V1R4M0 drivers - Fix bug 2766: performance problem with loopback AM LongAsnyc - Fix bug 2781 and 2791: deadlocks with some uses of DCMF collectives - Conduit-level support for PSHM (some limitations due to BG/P platform) * Experimental Process-Shared Memory (PSHM) Support - Shared-memory awarness added to default barrier implementations - Shared-memory awarness added to Extended API and Collectives * Misc Platform support: - Fix bug 2685: timers broken on variable-frequency x86_64 CPUs - Resolve pthread link problems between Apple's and FSF's compilers - Preliminary work to support build with Open64 compilers from AMD - Preliminary work to support build with GCCFSS compilers from Sun * Build and configure: - Allow client to control behavior on compiler-mismatch (eg for UPCR+GCCUPC) ---------------------------------------------------------------------- 11-02-2009 : Release 1.14 * IBM BlueGene/P (dcmf-conduit): - Extend support to V1R4M0 driver release - Use native DCMF level collectives for several GASNet collectives - Implement more useful gasnett_gethostname() (previously gave I/O node name) - Minor fix for SEGMENT_EVERYTHING support * Cray-XT series (portals-conduit): - Extended support to PE 2.1.42 and newer - Extended support to include PrgEnv-Intel - Implement more useful gasnett_gethostname() under Catamount - Spawner defaults to node count given in batch submission when no -N passed - Spawner improvements to deal intelligently with thread/process pinning - Misc. performance and scalability improvements - Several bugs fixed * IBM SP (lapi-conduit): - Cleanup tentative definitions to eliminate excessive AIX linker warnings - Implement AIX-specific code for gasnett_set_affinity() - Several bugs fixed * InfiniBand (vapi- and ibv-conduits): - Correct non-compliant use of offsetof() that broke compilation w/ XLC - Fixes for anomalous performance on ConnectX HCAs (Mellanox MT25418) - Improved performance (and correctness) with segments 2GB and larger - Documented settings to work-around failures seen w/ InfiniPath HCAs see vapi-conduit/README (source) or share/doc/gasnet/README-ibv (installed) - Multiple bugs fixed * Misc Platform support: - Fix mis-aligned use of x86-64 cmpxchg16b instruction - Atomics work-around for SiCortex ICE9A processor errata - Fixes for aggressive alias analysis in gcc-4.4.x - Improved support for XLC on all platforms - Improved debug info and warning messages with PathScale compilers - Improved gcc TLS support on IA64 * General: - Experimental shared memory support (see README) - Experimental collective autotuner (see README and autotune.txt) - Additional collective algorithms implemented - Fixes to some tests for large message sizes or large iteration counts - Work around sometimes broken UTF-8 support in perl - Improved support for clients with dynamic thread creation - Several minor bug fixes in conduit-independent code * Build and configure: - Clean up public headers to enable use of -Wstrict-prototypes by clients - More accurate conduit auto-detection (eliminating false-positives) - Allow disabling of conduit auto-detection - Updates to configure for more recent GNU autotools - Better default mpi-conduit configuration on SGI Altix and IRIX - Correction to mechanism for detecting an SMP host under FreeBSD ---------------------------------------------------------------------- 11-03-2008 : Release 1.12 * New conduits added: - dcmf-conduit: High-performance conduit for the IBM BlueGene/P using the DCMF communication interface. * IBM SP/LAPI: - Fix a bug that prevented the use of unequal segment sizes across nodes in LAPI-RDMA mode - Fix several exit-time crashes - Remove deprecated support for Federation LAPI version < 2.3.2.0 - Lots of misc cleanups and tuning * Myrinet/GM: - Fix some AM performance and correctness problems, esp with AMLong * CrayXT/Portals: - Upgrade to cache local memory registration using firehose library - Add GASNET_PORTAL_PUTGET_BOUNCE_LIMIT setting * InfiniBand/{VAPI,IBV}: - Extend "ibv" (InfiniBand) support to Qlogic's InfiniPath adapters * Platform support: - Add support for the BlueGene/P architecture (mpi and dcmf) - Add experimental support for ARM processors - Add support for PGI compiler on Mac OSX - Misc improvements and/or fixes for MIPS, Alpha, PPC and SPARC processors - Add Pathscale compilers to supported list for Cray XT machines - Improved support for XLC compilers on Linux - Add/improve support for MIPSEL/Linux platforms, including SiCortex - Add support for the default libpthread on Cray XT CNL 2.1 - Add support for Playstation 3 PowerPC * Configure features: - Add --disable-mmap support to force the use of malloc for the GASNet segment - Add configure option --with-max-pthreads-per-node=N to override the GASNet default limit of 256 pthreads per node - Add support for autoconf 2.62 and newer - Workaround stability problems in cygwin pthread mutexes (bug 1847) * GASNet tools: - Upgrades to error reporting in the GASNet debug mallocator - Add GASNET_MALLOCFILE option and corresponding gasnet_trace support to assist in leak detection for libgasnet and apps using debug mallocator - Add "strong" atomics to the GASNet-tools interface - New gasnett_performance_warning_str() returns a string reporting performance-relevant attributes of the current GASNet build * Misc changes: - Workaround for a gcc 4.x (x<3) optimizer bug has changed We now encourage updating to gcc >= 4.3.0, though our previously documented workarounds remain valid - Minor improvements to the collectives environmental interface - Fix cross-configure detection of stack growth direction - Avoid "capturing" __attribute__ when compiler mismatch is detected ---------------------------------------------------------------------- 10-30-2007 : Release 1.10 * IBM SP/LAPI: - Upgraded lapi-conduit to use RDMA support on LAPI/Federation systems, when available. This provides improved communication performance. * Myrinet/GM: - Fix a race that could result in lost payload data for heavy AM Long communication in the presence of multiple client threads. * CrayXT/Portals: - workaround a thread-safety bug in CNL Portals that could result in crashes for AM-heavy workloads * InfiniBand/{VAPI,IBV}: - Expose env vars to manipulate hardware-level retransmission parameters. * Collectives: - Added an initial high-performance implementation of the GASNet collectives. This provides scalable implementations of all the data movement collectives, implemented over Active Messages. * Misc changes: - Improved checking for randomized Linux VM spaces, which inhibit the ability to provide GASNET_ALIGNED_SEGMENTS - Numerous bug fixes, see https://gasnet-bugs.lbl.gov for details ---------------------------------------------------------------------- 09-13-2007 : Release 1.9.6 (Cray XT only beta release) * CrayXT/Portals: - portals-conduit is now a fully-native implementation, no longer relies on any MPI calls - support has been added for pthreads on compute-node Linux - fixes to automatically workaround known problems in various PE versions - removed the 100 MB limit for SEGMENT_FAST on CNL * Ethernet/UDP: - now supports up to 16K nodes (although buffer utilization remains non-scalable) - fix an exit race that could cause some trailing output to be lost * InfiniBand/{VAPI,IBV}: - AM-over-RDMA optimization for small AMs now enabled by default * Misc changes: - Add node placement support for various job spawners - Fix a crash in gasnett_threadkey for C++ clients ---------------------------------------------------------------------- 02-01-2007 : Release 1.9.2 (Cray XT3 only beta release) * New conduits added: - ibv-conduit: High-performance conduit using the OpenIB communication interface on InfiniBand hardware. * New platform support: - New ports: CrayXT/Linux, K42/PPC64, OpenBSD/x86, SunC/Linux * Misc changes: - Add backtrace extensibility to GASNet tools - Add new features GASNET_FREEZE_SIGNAL and GASNET_BACKTRACE_SIGNAL which allow a user to asynchronously freeze a process or print a backtrace - Many, many bug fixes, for both specific conduits and general platform portability. See https://gasnet-bugs.lbl.gov for complete details. * InfiniBand/VAPI: - New AM-over-RDMA optimization significantly improves performance of small AMs * CrayXT/Portals: - portals-conduit now works with PrgEnv-PGI, starting with Cray PE 1.5 - support has been added for compute-node Linux ---------------------------------------------------------------------- 11-02-2006 : Release 1.8 * New conduits added: - portals-conduit: High-performance conduit using the Portals communication interface on the Cray XT-3. Initial implementation uses MPI-based active messages and a Portals-based extended API. * New platform support: - New ports: MacOSX/x86, MacOSX/PPC64, Cray XD1 and ucLinux/MicroBlaze * Misc changes: - Add --help option to all GASNet tests - Add internal diagnostic tests - Add progress functions - Add --disable-aligned-segments configure flag for clusters with disaligned VM - Fix ansi-aliasing violations on small local put/get copies - Default to allocate-first-touch for segment mmap on Linux and Solaris - Many performance and functionality improvements to the GASNet collectives - Move most config-related defines off compile line into gasnet_config.h - Reorganize source files for faster and more robust builds - Barrier algorithm can now be selected at runtime using GASNET_BARRIER - Standardize and simplify our preprocessor platform detection logic system-wide - Many, many bug fixes, for both specific conduits and general platform portability. See https://gasnet-bugs.lbl.gov for complete details. * GASNet tools support: - Add a conduit-independent library implementing the GASNet portability tools - which include portable high-performance timers, atomic operations, memory barriers, C compiler annotations, uniform platform identification macros, reliable fixed-width integer types, thread-specific data, and other misc tools. - Add Portable Linux Processor Affinity (PLPA) library for gasnett_set_affinity - Implement automatic backtrace generation on crash for several popular debuggers - Change default timer granularity to nanoseconds, adding _ticks_to_ns() - Add __thread (TLS) implementations of gasnett_threadkey * Expanded local atomic operations support: - Add native support for additional compilers, notably including many C++ compilers - Add fetch-and-add and fetch-and-subtract operations - Add 32-bit and 64-bit fixed-width atomic types - Add explicit control of memory fence behavior - Add constants defining the range of the atomic type - Add uniform support for use of the atomic type for signed values * General performance improvements: - split-phase barriers on most conduits now make progress during any GASNet call - initial packing implementations of the GASNet non-contiguous (vector, indexed, and strided) put/get functions (currently off by default) * InfiniBand/VAPI: - Implement multi-port and multi-rail striping support - Improvements to firehose region management heuristics - VAPI recv thread is now disabled by default (but still available via env setting) * MPI: - Significant performance and stability improvements on mpi-conduit, especially on systems where the MPI-level flow control is lacking or unreliable (eg XT-3, BGL). - Split request/reply traffic onto separate MPI communicators to ensure bounded AMMPI-level buffer space utilization, even for degenerate cases - Added an AMMPI-level token-based flow control solution to prevent the crashes observed under heavy MPI unexpected message loads on various systems (XT3, Altix) - Add workaround for an IBM MPI ordering bug that could cause deadlock under heavy communication patterns. - Other misc tuning along the primary control paths and new tuning knobs * Ethernet/UDP: - Add cross-platform spawn support for cross-compiled targets * GASNet spec 1.8: - expose the GASNet release version as public macros: GASNET_RELEASE_VERSION_MAJOR/GASNET_RELEASE_VERSION_MINOR/GASNET_RELEASE_VERSION_PATCH - deprecate GASNET_VERSION in favor of GASNET_SPEC_VERSION_MAJOR/GASNET_SPEC_VERSION_MINOR - minor wording clarifications ---------------------------------------------------------------------- 08-20-2005 : Release 1.6 * New conduits added: - shmem-conduit: High-performance conduit using the shmem communication interface on Cray X1 and SGI Altix. May support targeting other shmem implementations in the future. * New platform support: - Add cross-compilation support, specifically including the Cray X-1 - Experimental support for the Cray XT3 and IBM Blue Gene/L (contact us for details) - Other new ports: Linux/PowerPC, Cray MTA, NetBSD/x86, Linux/Alpha, FreeBSD/Alpha, HPUX/Itanium, PathScale & Portland Group compilers - Linux 2.6 kernel support for gm, vapi, shmem * General performance improvements: - Replace default barrier implementation on gm, vapi, sci, mpi, udp with a more scalable barrier implementation. - System-wide performance improvements to AM's - Improve the performance and functionality of gasnet_trace * Misc changes: - Output improvements to gasnet tests - Added MPI performance tests to the GASNet tests for ease of comparison - Many robustness improvements to job spawning on various conduits and systems - New environment variable GASNET_VERBOSEENV turns on global reporting of all environment variables in use - Improve the robustness and quality of GASNet's automatic heap corruption detection - Many, many bug fixes, for both specific conduits and general platform portability. See https://gasnet-bugs.lbl.gov for complete details. * Myrinet/GM: - gm-conduit now provides interoperability with MPI. - add support for spawning with mpiexec - several robustness and stability improvements * InfiniBand/VAPI: - Use firehose to manage local pinning in SEG_FAST, for performance - Add a stand-alone ssh-based spawner, and MPI is no longer required to build vapi-conduit. - Numerous performance improvements, especially for AM's, non-bulk puts and large put/gets (>128KB) - Improve firehose region efficiency, improving performance on LARGE/EVERYTHING - Add support for striping and multiplexing communication over multiple queue pairs - Add options for controlling the vapi progress thread * IBM SP/LAPI: - Change the default GASNET_LAPI_MODE to POLLING, which vastly outperforms INTERRUPT on Power4/Federation - Significant performance improvements to barrier * Quadrics/ELAN: - Elan4 functionality and tuning work - add support for SLURM spawner - Improve queue depth, allowing more non-blocking put/gets to be posted without stalling * CrayX1 & SGI Altix/SHMEM: - Significant performance improvements to AM's - Many correctness fixes to put/gets and AM's * Ethernet/UDP: - Improve the performance of loopback AM's ---------------------------------------------------------------------- 08-27-2004 : Release 1.4 * New conduits added: - udp-conduit: a portable conduit that implements GASNet over any standard TCP/IP stack. This is the now the recommended conduit for clusters with only ethernet networking hardware (faster than mpi-conduit over TCP-based MPI). See udp-conduit/README for important info on job spawning. Note that udp-conduit requires a working C++ compiler (but when none is available, it can be disabled with --disable-udp). - sci-conduit: an experimental conduit over Dolphin-SCI. Current implementation is core-only, performance improvements are on the way in the next version. * GASNet2 extended API interface extensions: - Implement reference version of GASNet collective operations - Implement reference version of GASNet vector/indexed/strided put/get operations - updated GASNet 2.0 spec to be released soon * GASNet Spec v1.6: - Add gasnet_hsl_trylock() - Specify calls to gasnet_hold_interrupts() and gasnet_resume_interrupts() are ignored while holding an HSL. - Clarify the upper limit of in-flight non-blocking operations is 2^16-1 - Clarify gasnet_handle_t is a scalar type - Small clarifications and minor editorial corrections * gm-conduit: - fix thread-safety problems in firehose library that caused stability problems in GASNET_PAR mode - detect versions of GM driver with broken RDMA get support and don't use it there - remove dependency on gethostbyname to improve reliability of static linking on Linux - improvements to gasnetrun-gm * vapi-conduit: - add SEGMENT_LARGE and SEGMENT_EVERYTHING support - many performance improvements * lapi-conduit: - add workaround for a recent LAPI performance bug on Federation hardware - gasnet_exit stability improvements * elan-conduit: - upgrades for recent libelan versions * Configure changes: - add autodetection of all conduits, whenever possible. On some systems one may still need to set some environment variables before running configure to indicate the install location of network drivers. - detect and reject the buggy gcc 3.2.0-2 compilers - handle systems lacking pthreads - improved sanity checks for MPI_CFLAGS * Makefile changes - Add a set of manual-overrides for compilation of the GASNet libraries and tests, ie "make MANUAL_LIBCFLAGS=..." - see README - Fix "gmake prefix=/new/path install" to work correctly, even when it differs from configure-time prefix - Add limited support for parallel make (not recommended for general use) * GASNet infrastructure ported to Cray X1, AMD Athlon/Opteron, Sun Pro C, HP C * Add gasnet_trace contributed tool, which automatically parses and summarizes GASNet trace files * Add an experimental spin-poll throttling feature to reduce lock contention for GASNET_PAR mode, configure --enable-throttle-poll * Restructure use of local memory barriers to accommodate architectures requiring read memory barriers * Fix GASNet headers to be C++ friendly * Many miscellaneous performance, stability and functionality improvements ---------------------------------------------------------------------- 11-10-2003 : Release 1.3 * Added InfiniBand support in vapi-conduit - currently only SEGMENT_FAST is supported * elan-conduit: - updated for the most recent version of libelan - fix a few race conditions * gm-conduit: - updated for GM 2.0, including RDMA get support - Added 64-bit support - Reworked the spawner to work with mpiexec, gexec, MPICH mpirun and a custom spawner * lapi-conduit: - Fix bugs related to varying LAPI uhdr payload size across systems - this is now queried automatically at runtime * GASNet spec: - gasnet_hold_interrupts() and gasnet_resume_interrupts() calls are now required to be ignored by the implementation within an AM handler context. - Added gasnet_set_waitmode() function * Add a logGP test program for GASNet conduits * Add a threaded tester for gasnet threaded clients * Added a GASNet/MPI test that tests the compatibility of a GASNet conduit with MPI calls made by the GASNet client. * All GASNet conduits other than gm are now fully compatible with limited MPI calls from the GASNet client code. In order to prevent deadlock and ensure safety, GASNet and MPI communication should be separated by barriers. * Factor the firehose page registration system into a new, separate firehose library with a public interface, for use by gm-conduit and vapi-conduit * Use "adaptive" pthreads mutexes on Linux (when available), for better SMP performance * Added support for new platforms: Solaris-SPARC 64-bit and new compilers: Portland Group C, SunPro C and Intel C * Add SIGCONT as an additional option for unfreezing a GASNet application This is a useful option for debugging GASNet apps which lack debugging symbols (but may still have enough info to give you a stack trace, etc) A GASNet app frozen by GASNET_FREEZE can now be unfrozen by sending: "kill -CONT pid" to each process, or on some systems by typing control-Z on the console to suspend the process and then fg to resume it (sends a SIGCONT for you). * HSL calls now compile away to nothing when HSL's are unnecessary * Merged AMMPI v0.8, includes fixes to rare buffer overflows and small memory leaks * fixed pthread barrier errors caused by a race condition * Minor semantic change to no-interrupt sections - gasnet_{hold,resume}_interrupts() are now officially ignored within a GASNet handler context (where interrupts are already suspended anyhow). * add new function gasnet_set_waitmode() to control waiting behavior * Use an atexit handler to make sure we finalize the trace/stats file, even if the client exits without calling gasnet_exit * Fixes to gasneti_local_membar(), especially for SMP/UNI Linux kernels and PowerPC * New significant GASNet conduit programming practices: gasneti_{malloc,calloc,free}, gasneti_assert, GASNETI_CLIENT_THREADS, GASNETI_CONDUIT_THREADS, (N)DEBUG -> GASNET_(N)DEBUG, STATS,TRACE -> GASNET_{STATS,TRACE} * Many minor fixes ---------------------------------------------------------------------- 06-28-2003 : Release 1.2 * Greatly increased the number of platforms supported - notably, this release adds support for FreeBSD, IRIX, HPUX, Solaris, MSWindows-Cygwin and Mac OSX, as well as the SunPro, MIPSPro, Portland Group and Intel C compilers. See the top-level README for the complete list of supported platforms. * Added the smp-conduit, which implements pure loopback to support GASNet clients on platforms lacking a network. * Remove 256-node scalability limit - mpi, elan and lapi conduits now theoretically scale to 2^31 nodes. gm conduit scales to 2^16 nodes. * Merge v0.7 of AMMPI - improved latency performance, better scalability, and fixes for LAM/MPI * Fix bug 120 - gasnet_exit now reliably kills the entire job on all conduits in various collective and non-collective invocation situations. * New switches GASNETE_PUTGET_ALWAYSLOCAL and GASNETE_PUTGET_ALWAYSREMOTE which optimize away the locality check for put/gets implemented by gasnete_islocal() * Updates to the tracing system - separate statistics from tracing to allow finer user control controlled by new environment variables - GASNET_STATSMASK and GASNET_STATSFILE * Major cleanup to the gm-conduit bootstrap code * Internal structural changes to gasnet_extended.h to provide more flexibility for conduit overrides * Minor wording clarifications to the GASNet spec * Many minor bug fixes ---------------------------------------------------------------------- 04-17-2003 : Release 1.1 * Added lots of conduit user and design documentation * Fix bugs with gasnet_register_value_t functionality, in some cases garbage was returned by gasnet_get_val() in the upper bytes * Fix bug 51 - endianness bugs on gasnet_*_val() * Tweak the gcc optimizer settings to ensure that we get full inlining * Ensure gasnet_exit() or fatal signals always correctly shut down the global job (mpi and elan conduits - gm and lapi still have known problems) * Add strong configure warnings about using gcc 2.96 - users are highly recommended to avoid this broken compiler * Ensure configure caching is always on * Basic infrastructure cleanups to the conduit Makefile fragments * Fix a shutdown-time crash when tracing * Add GASNET_CONFIG_STRING to spec & implementation and embed it in library * Add a number of minor clarifications to the GASNet spec * Clean up licensing issues * elan-conduit: - fixups for better handling of elan memory exhaustion - preallocate AMLong bounce buffers * gm-conduit: - various stability fixes - add spawning scripts for gexec and pbs * mpi-conduit: - add global environment variable exchange to ensure consistent gasnet_getenv() results across nodes - merge AMMPI release 0.6 ---------------------------------------------------------------------- 01-29-2003 : Initial Release (1.0) gasnet-2025.8.0/gasnet_config.h.in0000664000175000017500000005773615142313673017030 0ustar alastairalastair/* gasnet_config.h.in. Generated from configure.in by autoheader. */ /* $Source: bitbucket.org:berkeleylab/gasnet.git/acconfig.h $ */ /* Description: GASNet acconfig.h (or config.h) */ /* Copyright 2002, Dan Bonachea */ /* Terms of use are as specified in license.txt */ #ifndef _INCLUDE_GASNET_CONFIG_H_ #define _INCLUDE_GASNET_CONFIG_H_ #if !defined(_IN_GASNETEX_H) && !defined(_IN_GASNET_TOOLS_H) #error This file is not meant to be included directly- clients should include gasnetex.h or gasnet_tools.h #endif #undef GASNETI_BUILD_ID #undef GASNETI_CONFIGURE_ARGS #undef GASNETI_SYSTEM_TUPLE #undef GASNETI_SYSTEM_NAME #undef GASNETI_CROSS_COMPILING /* version identifiers */ #undef GASNET_RELEASE_VERSION_MAJOR #undef GASNET_RELEASE_VERSION_MINOR #undef GASNET_RELEASE_VERSION_PATCH #undef GASNETI_RELEASE_VERSION #undef GASNETI_SPEC_VERSION_MAJOR #undef GASNETI_SPEC_VERSION_MINOR #undef GASNETI_TOOLS_SPEC_VERSION_MAJOR #undef GASNETI_TOOLS_SPEC_VERSION_MINOR #undef GASNETI_EX_SPEC_VERSION_MAJOR #undef GASNETI_EX_SPEC_VERSION_MINOR /* configure-detected conduits */ #undef GASNETI_CONDUITS /* CC attributes support */ #undef GASNETI_HAVE_CC_ATTRIBUTE #undef GASNETI_HAVE_CC_ATTRIBUTE_ALWAYSINLINE #undef GASNETI_HAVE_CC_ATTRIBUTE_NOINLINE #undef GASNETI_HAVE_CC_ATTRIBUTE_MALLOC #undef GASNETI_HAVE_CC_ATTRIBUTE_WARNUNUSEDRESULT #undef GASNETI_HAVE_CC_ATTRIBUTE_USED #undef GASNETI_HAVE_CC_ATTRIBUTE_MAYALIAS #undef GASNETI_HAVE_CC_ATTRIBUTE_NORETURN #undef GASNETI_HAVE_CC_ATTRIBUTE_PURE #undef GASNETI_HAVE_CC_ATTRIBUTE_CONST #undef GASNETI_HAVE_CC_ATTRIBUTE_HOT #undef GASNETI_HAVE_CC_ATTRIBUTE_COLD #undef GASNETI_HAVE_CC_ATTRIBUTE_DEPRECATED #undef GASNETI_HAVE_CC_ATTRIBUTE_COMMON #undef GASNETI_HAVE_CC_ATTRIBUTE_FALLTHROUGH #undef GASNETI_HAVE_CC_ATTRIBUTE_FORMAT #undef GASNETI_HAVE_CC_ATTRIBUTE_FORMAT_FUNCPTR #undef GASNETI_HAVE_CC_ATTRIBUTE_FORMAT_FUNCPTR_ARG #undef GASNETI_HAVE_CC_PRAGMA_GCC_DIAGNOSTIC /* CXX attributes support */ #undef GASNETI_HAVE_CXX_ATTRIBUTE #undef GASNETI_HAVE_CXX_ATTRIBUTE_ALWAYSINLINE #undef GASNETI_HAVE_CXX_ATTRIBUTE_NOINLINE #undef GASNETI_HAVE_CXX_ATTRIBUTE_MALLOC #undef GASNETI_HAVE_CXX_ATTRIBUTE_WARNUNUSEDRESULT #undef GASNETI_HAVE_CXX_ATTRIBUTE_USED #undef GASNETI_HAVE_CXX_ATTRIBUTE_MAYALIAS #undef GASNETI_HAVE_CXX_ATTRIBUTE_NORETURN #undef GASNETI_HAVE_CXX_ATTRIBUTE_PURE #undef GASNETI_HAVE_CXX_ATTRIBUTE_CONST #undef GASNETI_HAVE_CXX_ATTRIBUTE_HOT #undef GASNETI_HAVE_CXX_ATTRIBUTE_COLD #undef GASNETI_HAVE_CXX_ATTRIBUTE_DEPRECATED #undef GASNETI_HAVE_CXX_ATTRIBUTE_COMMON #undef GASNETI_HAVE_CXX_ATTRIBUTE_FALLTHROUGH #undef GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT #undef GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT_FUNCPTR #undef GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT_FUNCPTR_ARG #undef GASNETI_HAVE_CXX_PRAGMA_GCC_DIAGNOSTIC /* C++11 attribute support */ #undef GASNETI_HAVE_CXX_CXX11_ATTRIBUTE #undef GASNETI_HAVE_CXX_CXX11_ATTRIBUTE_FALLTHROUGH #undef GASNETI_HAVE_CXX_CXX11_ATTRIBUTE_CLANG__FALLTHROUGH /* MPI_CC attributes support */ #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_ALWAYSINLINE #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_NOINLINE #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_MALLOC #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_WARNUNUSEDRESULT #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_USED #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_MAYALIAS #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_NORETURN #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_PURE #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_CONST #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_HOT #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_COLD #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_DEPRECATED #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_COMMON #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_FALLTHROUGH #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT_FUNCPTR #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT_FUNCPTR_ARG #undef GASNETI_HAVE_MPI_CC_PRAGMA_GCC_DIAGNOSTIC /* identification of the C compiler used at configure time */ #undef GASNETI_PLATFORM_COMPILER_IDSTR #undef GASNETI_PLATFORM_COMPILER_FAMILYID #undef GASNETI_PLATFORM_COMPILER_ID #undef GASNETI_PLATFORM_COMPILER_VERSION #undef GASNETI_PLATFORM_COMPILER_C_LANGLVL /* identification of the C++ compiler used at configure time */ #undef GASNETI_PLATFORM_CXX_IDSTR #undef GASNETI_PLATFORM_CXX_FAMILYID #undef GASNETI_PLATFORM_CXX_ID #undef GASNETI_PLATFORM_CXX_VERSION #undef GASNETI_PLATFORM_CXX_CXX_LANGLVL /* identification of the MPI C compiler used at configure time */ #undef GASNETI_PLATFORM_MPI_CC_IDSTR #undef GASNETI_PLATFORM_MPI_CC_FAMILYID #undef GASNETI_PLATFORM_MPI_CC_ID #undef GASNETI_PLATFORM_MPI_CC_VERSION #undef GASNETI_PLATFORM_MPI_CC_C_LANGLVL #undef GASNETI_MPI_VERSION #undef HAVE_MPI_INIT_THREAD #undef HAVE_MPI_QUERY_THREAD /* Defined to be the inline function modifier supported by the C compilers (if supported), prefixed by 'static' (if permitted) */ #undef GASNETI_CC_INLINE_MODIFIER #undef GASNETI_MPI_CC_INLINE_MODIFIER /* C, C++ and MPI_CC compilers 'restrict' keywords (or empty) */ #undef GASNETI_CC_RESTRICT #undef GASNETI_CXX_RESTRICT #undef GASNETI_MPI_CC_RESTRICT /* C, C++ and MPI_CC compilers misc builtins */ /* has __assume */ #undef GASNETI_HAVE_CC_ASSUME #undef GASNETI_HAVE_CXX_ASSUME #undef GASNETI_HAVE_MPI_CC_ASSUME /* has __builtin_assume */ #undef GASNETI_HAVE_CC_BUILTIN_ASSUME #undef GASNETI_HAVE_CXX_BUILTIN_ASSUME #undef GASNETI_HAVE_MPI_CC_BUILTIN_ASSUME /* has __builtin_unreachable */ #undef GASNETI_HAVE_CC_BUILTIN_UNREACHABLE #undef GASNETI_HAVE_CXX_BUILTIN_UNREACHABLE #undef GASNETI_HAVE_MPI_CC_BUILTIN_UNREACHABLE /* has __builtin_expect */ #undef GASNETI_HAVE_CC_BUILTIN_EXPECT #undef GASNETI_HAVE_CXX_BUILTIN_EXPECT #undef GASNETI_HAVE_MPI_CC_BUILTIN_EXPECT /* has __builtin_constant_p */ #undef GASNETI_HAVE_CC_BUILTIN_CONSTANT_P #undef GASNETI_HAVE_CXX_BUILTIN_CONSTANT_P #undef GASNETI_HAVE_MPI_CC_BUILTIN_CONSTANT_P /* has __builtin_prefetch */ #undef GASNETI_HAVE_CC_BUILTIN_PREFETCH #undef GASNETI_HAVE_CXX_BUILTIN_PREFETCH #undef GASNETI_HAVE_MPI_CC_BUILTIN_PREFETCH /* Which inline asm style(s) are supported - these are defined only where we use configure to determine what a compiler supports */ #undef GASNETI_HAVE_CC_GCC_ASM #undef GASNETI_HAVE_CXX_GCC_ASM #undef GASNETI_HAVE_MPI_CC_GCC_ASM #undef GASNETI_HAVE_CC_SIMPLE_ASM #undef GASNETI_HAVE_CXX_SIMPLE_ASM #undef GASNETI_HAVE_MPI_CC_SIMPLE_ASM /* Which non-native atomics are available */ #undef GASNETI_HAVE_CC_SYNC_ATOMICS_32 #undef GASNETI_HAVE_CXX_SYNC_ATOMICS_32 #undef GASNETI_HAVE_MPI_CC_SYNC_ATOMICS_32 #undef GASNETI_HAVE_CC_SYNC_ATOMICS_64 #undef GASNETI_HAVE_CXX_SYNC_ATOMICS_64 #undef GASNETI_HAVE_MPI_CC_SYNC_ATOMICS_64 /* Which atomics implementations are built in tools library */ #undef GASNETI_ATOMIC_IMPL_CONFIGURE #undef GASNETI_ATOMIC32_IMPL_CONFIGURE #undef GASNETI_ATOMIC64_IMPL_CONFIGURE /* Decoration, if any, needed for in-library tentative definitions */ #undef GASNETI_COMMON /* Does CXX support C99 __VA_ARGS__ */ #undef GASNETI_CXX_HAS_VA_ARGS /* Defined if __PIC__ defined at configure time */ #undef GASNETI_CONFIGURED_PIC /* true iff GASNETI_RESTRICT may be applied to types which are not pointer types until after typedef expansion */ #undef GASNETI_CC_RESTRICT_MAY_QUALIFY_TYPEDEFS #undef GASNETI_CXX_RESTRICT_MAY_QUALIFY_TYPEDEFS #undef GASNETI_MPI_CC_RESTRICT_MAY_QUALIFY_TYPEDEFS /* have mmap() */ #undef HAVE_MMAP /* mmap supporting flags */ #undef HAVE_MAP_NORESERVE #undef HAVE_MAP_ANON #undef HAVE_MAP_ANONYMOUS /* avoid mmap()-after-munmap() failures */ #undef GASNETI_BUG3480_WORKAROUND /* --with-max-segsize value (possibly defaulted) */ #undef GASNETI_MAX_SEGSIZE_CONFIGURE /* --with-max-threads value (if given) */ #undef GASNETI_MAX_THREADS_CONFIGURE /* --with-maxeps value (if given) */ #undef GASNETI_MAXEPS_CONFIGURE /* memory kinds support */ #undef GASNETI_MK_CLASS_CUDA_UVA_ENABLED #undef GASNETI_MK_CLASS_HIP_ENABLED #undef GASNETI_MK_CLASS_ZE_ENABLED /* HIP platform */ #undef GASNETI_HIP_PLATFORM_AMD #undef GASNETI_HIP_PLATFORM_NVIDIA /* has clock_gettime() */ #undef HAVE_CLOCK_GETTIME /* has usleep() */ #undef HAVE_USLEEP /* has nanosleep() */ #undef HAVE_NANOSLEEP /* has clock_nanosleep() */ #undef HAVE_CLOCK_NANOSLEEP /* has nsleep() */ #undef HAVE_NSLEEP /* has sched_yield() */ #undef HAVE_SCHED_YIELD /* has sigaction() and a definition of the SA_RESTART flag */ #undef GASNETI_HAVE_SA_RESTART /* have sysctl machdep.tsc_freq */ #undef GASNETI_HAVE_SYSCTL_MACHDEP_TSC_FREQ /* has Portable Linux Processor Affinity */ #undef HAVE_PLPA /* Portable Hardware Locality (hwloc) library and command-line utils */ #undef GASNETI_HAVE_HWLOC_LIB #undef GASNETI_HAVE_HWLOC_UTILS #undef GASNETI_HWLOC_BIND_PATH #undef GASNETI_HWLOC_CALC_PATH /* have ptmalloc's mallopt() options */ #undef HAVE_PTMALLOC /* has posix_memalign() */ #undef HAVE_POSIX_MEMALIGN /* have declarations/definitions */ #undef HAVE_SETENV_DECL #undef HAVE_UNSETENV_DECL #undef HAVE_SNPRINTF_DECL #undef HAVE_VSNPRINTF_DECL #undef HAVE_ISBLANK_DECL #undef HAVE_ISASCII_DECL #undef HAVE_TOASCII_DECL /* Have C99 %z and %t printf format specifiers */ /* allow command-line override for theoretical system that links more than one printf impl */ #ifndef HAVE_C99_FORMAT_SPECIFIERS #undef HAVE_C99_FORMAT_SPECIFIERS #endif /* ctype.h needs wrappers */ #undef GASNETI_NEED_CTYPE_WRAPPERS /* Forbidden to use fork(), popen() and system()? */ #undef GASNETI_NO_FORK /* building Process SHared Memory support? For which API? */ #undef GASNETI_PSHM_ENABLED #undef GASNETI_PSHM_POSIX #undef GASNETI_PSHM_SYSV #undef GASNETI_PSHM_FILE #undef GASNETI_PSHM_XPMEM /* Set default for GASNET_HOST_DETECT env var */ #undef GASNETI_HOST_DETECT_CONFIGURE /* How many cores/node must we support (255 is default) */ #undef GASNETI_CONFIG_PSHM_MAX_NODES /* hugetlbfs support available */ #undef HAVE_HUGETLBFS /* hugetlbfs support enabled */ #undef GASNETI_USE_HUGETLBFS /* support for backtracing */ #undef HAVE_EXECINFO_H #undef HAVE_BACKTRACE #undef HAVE_BACKTRACE_SYMBOLS #undef HAVE_PRINTSTACK #undef ADDR2LINE_PATH #undef GDB_PATH #undef GSTACK_PATH #undef PSTACK_PATH #undef PGDBG_PATH #undef IDB_PATH #undef DBX_PATH #undef LLDB_PATH /* have pthread_setconcurrency */ #undef HAVE_PTHREAD_SETCONCURRENCY /* has pthread_kill() */ #undef HAVE_PTHREAD_KILL /* has pthread_kill_other_threads_np() */ #undef HAVE_PTHREAD_KILL_OTHER_THREADS_NP /* have pthread_setconcurrency */ #undef HAVE_PTHREAD_SIGMASK /* has pthread rwlock support */ #undef GASNETI_HAVE_PTHREAD_RWLOCK /* has __thread thread-local-storage support */ #undef GASNETI_HAVE_TLS_SUPPORT /* force threadinfo optimization ON or OFF */ #undef GASNETI_THREADINFO_OPT_CONFIGURE /* pause instruction, if any */ #undef GASNETI_PAUSE_INSTRUCTION /* How to name MIPS assembler temporary register in inline asm, if at all */ #undef GASNETI_HAVE_MIPS_REG_1 #undef GASNETI_HAVE_MIPS_REG_AT /* has ARM kernel-level support for cmpxchg */ #undef GASNETI_HAVE_ARM_CMPXCHG /* has ARM kernel-level support for membar */ #undef GASNETI_HAVE_ARM_MEMBAR /* has usable AARCH64 (ARMV8) system counter support */ #undef GASNETI_HAVE_AARCH64_CNTVCT_EL0 /* has x86 EBX register (not reserved for GOT) */ #undef GASNETI_HAVE_X86_EBX /* has support (toolchain and cpu) for x86_64 cmpxchg16b instruction */ #undef GASNETI_HAVE_X86_CMPXCHG16B /* gcc support for "U" and "h" register classes on SPARC32 */ #undef GASNETI_HAVE_SPARC32_64BIT_ASM /* has _builtin_bswap{32,64} */ #undef GASNETI_HAVE_CC_BUILTIN_BSWAP32 #undef GASNETI_HAVE_CC_BUILTIN_BSWAP64 /* has _builtin_c[lt]z */ #undef GASNETI_HAVE_CC_BUILTIN_CLZ #undef GASNETI_HAVE_CC_BUILTIN_CLZL #undef GASNETI_HAVE_CC_BUILTIN_CLZLL #undef GASNETI_HAVE_CC_BUILTIN_CTZ #undef GASNETI_HAVE_CC_BUILTIN_CTZL #undef GASNETI_HAVE_CC_BUILTIN_CTZLL /* has __func__ function name defined */ #undef HAVE_FUNC /* portable inttypes support */ #undef HAVE_INTTYPES_H #undef HAVE_STDINT_H #undef HAVE_SYS_TYPES_H #undef COMPLETE_INTTYPES_H #undef COMPLETE_STDINT_H #undef COMPLETE_SYS_TYPES_H /* Linux prctl() support */ #undef HAVE_PR_SET_PDEATHSIG #undef HAVE_PR_SET_PTRACER /* forcing use of "non-native" implementations: */ #undef GASNETI_FORCE_GENERIC_ATOMICOPS #undef GASNETI_FORCE_OS_ATOMICOPS #undef GASNETI_FORCE_COMPILER_ATOMICOPS #undef GASNETI_FORCE_TRUE_WEAKATOMICS #undef GASNETI_FORCE_GENERIC_SEMAPHORES #undef GASNETI_FORCE_YIELD_MEMBARS #undef GASNETI_FORCE_SLOW_MEMBARS #undef GASNETI_FORCE_GETTIMEOFDAY #undef GASNETI_FORCE_POSIX_REALTIME /* forcing UP build, even if build platform is a multi-processor */ #undef GASNETI_UNI_BUILD /* force memory barriers on GASNet local (loopback) puts and gets */ #undef GASNETI_MEMSYNC_ON_LOOPBACK /* throttle polling threads in multi-threaded configurations to reduce contention */ #undef GASNETI_THROTTLE_FEATURE_ENABLED /* auto-detected mmap data page size */ #undef GASNETI_PAGESIZE #undef GASNETI_PAGESHIFT /* auto-detected shared data cache line size */ #undef GASNETI_CACHE_LINE_BYTES #undef GASNETI_CACHE_LINE_SHIFT /* minimum alignment of "tm0" */ #undef GASNETI_TM0_ALIGN /* udp-conduit default custom spawn command */ #undef GASNET_CSPAWN_CMD /* compiler is Sun's "gccfss" variant of GCC */ #undef GASNETI_GCC_GCCFSS /* compiler is Apple's variant of GCC */ #undef GASNETI_GCC_APPLE /* platform is a Linux cluster running IBM PE software */ #undef GASNETI_ARCH_IBMPE /* platform is Microsoft Windows Subsystem for Linux */ #undef GASNETI_ARCH_WSL /* platform is an HPE Cray EX */ #undef GASNETI_ARCH_CRAYEX /* have (potentially buggy) MIPS R10000 multiprocessor */ #undef GASNETI_ARCH_SGI_IP27 /* have working UltraSPARC ISA (lacks an associated builtin preprocessor macro) */ #undef GASNETI_ARCH_ULTRASPARC /* Have working PPC64 ISA (lacks an associated builtin preprocessor macro) */ #undef GASNETI_ARCH_PPC64 /* Type to use as socklen_t */ #undef GASNET_SOCKLEN_T /* GASNet build configuration */ #undef GASNET_DEBUG #undef GASNET_NDEBUG #undef GASNET_TRACE #undef GASNET_STATS #undef GASNET_DEBUGMALLOC #undef GASNET_SRCLINES #undef GASNET_DEBUG_VERBOSE #undef GASNETI_VALGRIND /* GASNet segment definition */ #undef GASNET_SEGMENT_FAST #undef GASNET_SEGMENT_LARGE #undef GASNET_SEGMENT_EVERYTHING /* Override to disable default segment alignment */ #undef GASNETI_DISABLE_ALIGNED_SEGMENTS /* GASNet smp-conduit */ #undef GASNETC_SMP_SPAWNER_CONF #undef GASNETC_HAVE_O_ASYNC #undef GASNETC_USE_SOCKETPAIR /* GASNet ofi-conduit settings */ #undef GASNETC_OFI_SPAWNER_CONF #undef GASNETC_OFI_REFERENCE_EXTENDED #undef GASNETC_OFI_MAX_MEDIUM_DFLT #undef GASNETC_OFI_NUM_COMPLETIONS #undef GASNETC_OFI_HAS_MR_VIRT_ADDR_CONFIGURE #undef GASNETC_OFI_HAS_MR_PROV_KEY_CONFIGURE #undef GASNETC_OFI_USE_AV_MAP_CONFIGURE #undef GASNETC_OFI_USE_THREAD_DOMAIN #undef GASNETC_OFI_USE_MULTI_CQ #undef GASNETC_OFI_RETRY_RECVMSG #undef GASNETC_OFI_PROVIDER_LIST #undef GASNETC_OFI_PROVIDER_IDENT #undef GASNETC_HAVE_FI_MR_REG_ATTR #undef GASNETC_HAVE_FI_HMEM_CUDA #undef GASNETC_HAVE_FI_HMEM_ROCR #undef GASNETC_HAVE_FI_HMEM_ZE /* GASNet ucx-conduit settings */ #undef GASNETC_UCX_SPAWNER_CONF #undef GASNETC_UCX_MAX_MEDIUM_DFLT /* GASNet ibv-conduit features and bug work-arounds */ #undef GASNETC_IBV_SPAWNER_CONF #undef HAVE_IBV_SRQ #undef HAVE_IBV_TRANSPORT_TYPE #undef HAVE_IBV_CREATE_QP_EX #undef GASNETC_IBV_MAX_MEDIUM #undef GASNETC_IBV_ODP #undef GASNETC_IBV_ODP_MLNX #undef GASNETC_IBV_ODP_CORE #undef GASNETC_IBV_ODP_DISABLED #undef GASNETC_IBV_RCV_THREAD #undef GASNETC_IBV_SND_THREAD #undef GASNETC_IBV_CONN_THREAD #undef GASNETC_IBV_ATOMICS_CONFIGURE #undef GASNETC_IBV_MAX_HCAS_CONFIGURE #undef GASNETC_IBV_PHYSMEM_MAX_CONFIGURE #undef GASNETC_IBV_PHYSMEM_PROBE_CONFIGURE #undef GASNETC_IBV_PORTS_CONFIGURE #undef GASNETC_IBV_FENCED_PUTS_CONFIGURE #undef GASNETC_IBV_SERIALIZE_POLL_CQ_CONFIGURE /* GASNet bug1389 detection/work-around */ #undef GASNETI_BUG1389_WORKAROUND /* Defaults for GASNET_SSH_* env vars */ #undef GASNETI_DEFAULT_SSH_CMD #undef GASNETI_DEFAULT_SSH_OPTIONS #undef GASNETI_DEFAULT_SSH_NODEFILE #undef GASNETI_DEFAULT_SSH_OUT_DEGREE /* Support for pmi-spawner */ #undef HAVE_PMI_H #undef HAVE_PMI2_H #undef GASNETI_PMIX_HACK #undef GASNETI_PMI2_FENCE_IS_BARRIER #undef HAVE_PMIX_H #undef HAVE_PMI_CRAY_H /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* define to 1 if PMI2_KVS_fence() provides barrier functionality */ #undef GASNETI_PMI2_FENCE_IS_BARRIER /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the `backtrace' function. */ #undef HAVE_BACKTRACE /* Define to 1 if you have the `backtrace_symbols' function. */ #undef HAVE_BACKTRACE_SYMBOLS /* Define to 1 if you have the header file. */ #undef HAVE_EXECINFO_H /* Define to 1 if you have the header file. */ #undef HAVE_FEATURES_H /* Define to 1 if you have the `ffs' function. */ #undef HAVE_FFS /* Define to 1 if you have the `fopen64' function. */ #undef HAVE_FOPEN64 /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `fstatvfs' function. */ #undef HAVE_FSTATVFS /* Define to 1 if you have the `gethostid' function. */ #undef HAVE_GETHOSTID /* Define to 1 if you have the `getifaddrs' function. */ #undef HAVE_GETIFADDRS /* Define to 1 if you have the `getrlimit' function. */ #undef HAVE_GETRLIMIT /* Define to 1 if you have the `getrlimit64' function. */ #undef HAVE_GETRLIMIT64 /* Define to 1 if you have the `ibv_cmd_open_xrcd' function. */ #undef HAVE_IBV_CMD_OPEN_XRCD /* Define to 1 if you have the `ibv_open_xrc_domain' function. */ #undef HAVE_IBV_OPEN_XRC_DOMAIN /* Define to 1 if you have the `ibv_wc_status_str' function. */ #undef HAVE_IBV_WC_STATUS_STR /* Define to 1 if you have the header file. */ #undef HAVE_IFADDRS_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `isascii' function. */ #undef HAVE_ISASCII /* Define to 1 if you have the `isblank' function. */ #undef HAVE_ISBLANK /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_TCP_H /* Define to 1 if you have the `on_exit' function. */ #undef HAVE_ON_EXIT /* Define to 1 if you have the `PMI_Allgather' function. */ #undef HAVE_PMI_ALLGATHER /* Define to 1 if you have the `PMI_Allgather_on_smp' function. */ #undef HAVE_PMI_ALLGATHER_ON_SMP /* Define to 1 if you have the `PMI_Bcast' function. */ #undef HAVE_PMI_BCAST /* Define to 1 if you have the `PMI_Get_numpes_on_smp' function. */ #undef HAVE_PMI_GET_NUMPES_ON_SMP /* Define to 1 if you have the `popen' function. */ #undef HAVE_POPEN /* Define to 1 if you have the `posix_memalign' function. */ #undef HAVE_POSIX_MEMALIGN /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setpgid' function. */ #undef HAVE_SETPGID /* Define to 1 if you have the `setpgrp' function. */ #undef HAVE_SETPGRP /* Define to 1 if you have the `setrlimit' function. */ #undef HAVE_SETRLIMIT /* Define to 1 if you have the `setrlimit64' function. */ #undef HAVE_SETRLIMIT64 /* Define to 1 if you have the header file. */ #undef HAVE_SGIDEFS_H /* Define to 1 if you have the `sigprocmask' function. */ #undef HAVE_SIGPROCMASK /* Define to 1 if you have the header file. */ #undef HAVE_SN_XPMEM_H /* Define to 1 if you have the `srand_deterministic' function. */ #undef HAVE_SRAND_DETERMINISTIC /* Define to 1 if you have the header file. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `system' function. */ #undef HAVE_SYSTEM /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKIO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TABLE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UIO_H /* Define to 1 if you have the `toascii' function. */ #undef HAVE_TOASCII /* Define to 1 if you have the header file. */ #undef HAVE_UCONTEXT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV /* Define to 1 if you have the header file. */ #undef HAVE_XPMEM_H /* Define to 1 if you have the `xpmem_make_2' function. */ #undef HAVE_XPMEM_MAKE_2 /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The PLPA symbol prefix */ #undef PLPA_SYM_PREFIX /* Define to 1 if the `setpgrp' function takes no argument. */ #undef SETPGRP_VOID /* The size of `char', as computed by sizeof. */ #undef SIZEOF_CHAR /* The size of `double', as computed by sizeof. */ #undef SIZEOF_DOUBLE /* The size of `float', as computed by sizeof. */ #undef SIZEOF_FLOAT /* The size of `float _Complex', as computed by sizeof. */ #undef SIZEOF_FLOAT__COMPLEX /* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of `long double', as computed by sizeof. */ #undef SIZEOF_LONG_DOUBLE /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG /* The size of `ptrdiff_t', as computed by sizeof. */ #undef SIZEOF_PTRDIFF_T /* The size of `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T /* The size of `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P /* The size of `_Bool', as computed by sizeof. */ #undef SIZEOF__BOOL /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* whether byteorder is bigendian */ #undef WORDS_BIGENDIAN /* Define to `unsigned int' if does not define. */ #undef size_t /* these get us 64-bit file declarations under several Unixen */ /* they must come before the first include of features.h (included by many system headers) */ /* define them even on platforms lacking features.h */ #define _LARGEFILE64_SOURCE 1 #define _LARGEFILE_SOURCE 1 #ifdef HAVE_FEATURES_H #if _FORTIFY_SOURCE > 0 && __OPTIMIZE__ <= 0 /* silence an annoying MPICH/Linux warning */ #trueundef _FORTIFY_SOURCE #endif # include #endif #endif gasnet-2025.8.0/gasnet_event_internal.h0000664000175000017500000005253215142313673020160 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_event_internal.h $ * Description: GASNet header for internal definitions for event management * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_EVENT_INTERNAL_H #define _GASNET_EVENT_INTERNAL_H #include /* ------------------------------------------------------------------------------------ */ #ifdef GASNETE_HAVE_LC # undef GASNETE_HAVE_LC # define GASNETE_HAVE_LC 1 #else // Default is NO local completion # define GASNETE_IOP_LC_DONE(op) 1 # define GASNETE_IOP_LC_CNTDONE(op) 1 # define GASNETE_EOP_LC_DONE(op) 1 # define GASNETE_IOP_LC_START(op) ERROR # define GASNETE_IOP_LC_FINISH(op) ERROR # define GASNETE_EOP_LC_START(op) ERROR # define GASNETE_EOP_LC_FINISH(op) ERROR # define GASNETE_HAVE_LC 0 #endif /* ------------------------------------------------------------------------------------ */ /* Conduit may optionally choose the atomic type for counters */ #ifndef gasnete_op_atomic_ #define gasnete_op_atomic_(_id) gasneti_weakatomic_##_id #endif #define gasnete_op_atomic_t gasnete_op_atomic_(t) #define gasnete_op_atomic_val_t gasnete_op_atomic_(val_t) #define gasnete_op_atomic_read gasnete_op_atomic_(read) #define gasnete_op_atomic_set gasnete_op_atomic_(set) #define gasnete_op_atomic_increment gasnete_op_atomic_(increment) #define gasnete_op_atomic_add gasnete_op_atomic_(add) /* ------------------------------------------------------------------------------------ */ /* gex_Event_t is a void* pointer to a gasnete_op_t, which is either a gasnete_eop_t or an gasnete_iop_t */ #define GASNETE_OP_EVENTS 6 typedef struct _gasnete_op_t { uint8_t event[GASNETE_OP_EVENTS]; gasnete_threadidx_t threadidx; /* thread that owns me (16-bit by default) */ } gasnete_op_t; struct _gasnete_eop_t { uint8_t event[GASNETE_OP_EVENTS]; gasnete_threadidx_t threadidx; /* thread that owns me */ //---------------------------------- struct _gasnete_eop_t *next; #ifdef GASNETE_CONDUIT_EOP_FIELDS GASNETE_CONDUIT_EOP_FIELDS #endif }; struct _gasnete_iop_t { uint8_t event[GASNETE_OP_EVENTS]; gasnete_threadidx_t threadidx; /* thread that owns me */ //---------------------------------- #if GASNETE_HAVE_LC gasnete_op_atomic_val_t initiated_alc_cnt; /* count of ops initiated with async local completion */ #endif gasnete_op_atomic_val_t initiated_rmw_cnt; /* count of ratomic rmw ops initiated */ gasnete_op_atomic_val_t initiated_get_cnt; /* count of get ops initiated */ gasnete_op_atomic_val_t initiated_put_cnt; /* count of put ops initiated */ struct _gasnete_iop_t *next; /* next cell while in free list, deferred iop while being filled */ /* make sure the corresponding initiated/completed counters live on different cache lines for SMP's */ #if GASNETE_HAVE_LC uint8_t pad[GASNETI_CACHE_PAD(sizeof(void*) + 4*sizeof(gasnete_op_atomic_val_t))]; #else uint8_t pad[GASNETI_CACHE_PAD(sizeof(void*) + 3*sizeof(gasnete_op_atomic_val_t))]; #endif #if GASNETE_HAVE_LC gasnete_op_atomic_t completed_alc_cnt; /* count of async-lc ops completed */ #endif gasnete_op_atomic_t completed_rmw_cnt; /* count of ratomic rmw ops completed */ gasnete_op_atomic_t completed_get_cnt; /* count of get ops completed */ gasnete_op_atomic_t completed_put_cnt; /* count of put ops completed */ #ifdef GASNETE_CONDUIT_IOP_FIELDS GASNETE_CONDUIT_IOP_FIELDS #endif }; /* ------------------------------------------------------------------------------------ */ // Each 1-byte event field in an OP has 4 bits for "type" // The most-significant bit is used to indicate liveness #define EVENT_TYPE_MASK 0x0F #define EVENT_LIVE_MASK 0x80 #if PLATFORM_ARCH_BIG_ENDIAN #define EVENT_ANY_LIVE_MASK (((uint64_t)0x8080808080808080ULL) << (8*(8-GASNETE_OP_EVENTS))) #else #define EVENT_ANY_LIVE_MASK (((uint64_t)0x8080808080808080ULL) >> (8*(8-GASNETE_OP_EVENTS))) #endif // gasnete_event_type_* values enum { #if GASNET_DEBUG // used only for correctness checking of recycle paths gasnete_event_type_free_eop = 0, gasnete_event_type_free_iop, gasnete_event_type_pendingfree_eop, gasnete_event_type_pendingfree_iop, #endif gasnete_event_type_eop, // root event only (event[0]) gasnete_event_type_iop, // root event only (event[0]) gasnete_event_type_lc, // local completion gasnete_event_type_lc_now, // local completion w/ EVENT_NOW #ifdef GASNETE_CONDUIT_EVENT_TYPES GASNETE_CONDUIT_EVENT_TYPES // A conduit may add additional types as needed to distinguish its unique cases #endif }; /* ------------------------------------------------------------------------------------ */ // Legacy: #define OPTYPE_EXPLICIT gasnete_event_type_eop #define OPTYPE_IMPLICIT gasnete_event_type_iop #define OPTYPE(op) EVENT_TYPE(op,0) // SET_EVENT_TYPE: given a gasnete_op_t and event idx, return the gasneti_event_type_* #define EVENT_TYPE(op,idx) ((op)->event[idx] & EVENT_TYPE_MASK) // SET_EVENT_TYPE: given a gasnete_op_t, event idx and gasneti_event_type_*, // set that event to the provided type and mark it live #define SET_EVENT_TYPE(op,idx,type) _SET_EVENT_TYPE((gasnete_op_t*)(op),idx,type) GASNETI_INLINE(_SET_EVENT_TYPE) void _SET_EVENT_TYPE(gasnete_op_t *op, unsigned int idx, uint8_t type) { gasneti_assert_uint(idx ,<, GASNETE_OP_EVENTS); gasneti_assert((EVENT_TYPE(op, idx) == 0) || (EVENT_TYPE(op, idx) == type)); gasneti_assert_uint(type ,==, (type & EVENT_TYPE_MASK)); op->event[idx] = EVENT_LIVE_MASK | type; } // EVENT_DONE: given a gasnete_op_t and child idx, return whether that event is live #define EVENT_DONE(op,idx) (!((op)->event[idx] & EVENT_LIVE_MASK)) // SET_EVENT_DONE: given a gasnete_op_t and live child idx, mark that event done // note the event type is not cleared #define SET_EVENT_DONE(op,idx) _SET_EVENT_DONE((gasnete_op_t*)(op),idx) GASNETI_INLINE(_SET_EVENT_DONE) void _SET_EVENT_DONE(gasnete_op_t *op, unsigned int idx) { gasneti_assert_uint(idx ,<, GASNETE_OP_EVENTS); gasneti_assert(! EVENT_DONE(op, idx)); // TODO-EX: OPT build could potentially replace "&= ..." with just "= 0". // This would be only for idx!=0, and may not work if there is a need // to preserve any other bits in the event bytes (still TBD). op->event[idx] &= ~EVENT_LIVE_MASK; } // Test all event bits in an eop or iop // EVENT_ANY_LIVE: true iff ANY event in the gasnete_op_t is live // EVENT_ALL_DONE: true iff NO event in the gasnete_op_t is live #define EVENT_ANY_LIVE(op) \ (gasneti_assert(!gasneti_event_idx(op)),\ (*(volatile uint64_t *)(op) & EVENT_ANY_LIVE_MASK)) #define EVENT_ALL_DONE(op) (!EVENT_ANY_LIVE(op)) #if GASNET_DEBUG /* check an in-flight/complete eop */ #define gasnete_eop_check(eop) do { \ gasnete_eop_t *_eop = (eop); \ gasneti_assert_uint(OPTYPE(_eop) ,==, OPTYPE_EXPLICIT); \ gasnete_assert_valid_threadid(_eop->threadidx); \ } while (0) #define gasnete_iop_check_cnt_(iop,counter) do { \ gasnete_op_atomic_val_t _temp = gasnete_op_atomic_read(&((iop)->completed_##counter##_cnt), GASNETI_ATOMIC_RMB_POST); \ gasneti_assert_uint((((iop)->initiated_##counter##_cnt - _temp) & GASNETI_ATOMIC_MAX) ,<, (GASNETI_ATOMIC_MAX/2)); \ } while (0) #if GASNETE_HAVE_LC #define gasnete_iop_check_cnt_alc_(iop) gasnete_iop_check_cnt_(iop,alc) #else #define gasnete_iop_check_cnt_alc_(iop) ((void)0) #endif // TODO-EX: type_free_iop occurs only when called via gasnete_free_threaddata() #define gasnete_iop_check(iop) do { \ gasnete_iop_t *_iop = (iop); \ gasnete_iop_t *_tmp_next; \ gasneti_memcheck(_iop); \ _tmp_next = (_iop)->next; \ if (_tmp_next != NULL && _tmp_next != _iop) \ _gasnete_iop_check(_tmp_next); \ gasneti_assert(OPTYPE(_iop) == gasnete_event_type_iop || \ OPTYPE(_iop) == gasnete_event_type_free_iop);\ gasnete_assert_valid_threadid(_iop->threadidx); \ gasnete_iop_check_cnt_(_iop,put); \ gasnete_iop_check_cnt_(_iop,get); \ gasnete_iop_check_cnt_(_iop,rmw); \ gasnete_iop_check_cnt_alc_(_iop); \ } while (0) extern void _gasnete_iop_check(gasnete_iop_t *iop); #define gasnete_event_check(_h) do { \ gasneti_assert(_h != GEX_EVENT_INVALID); \ gasneti_assert(_h != GEX_EVENT_NO_OP); \ unsigned int _event_idx = gasneti_event_idx(_h); \ gasneti_assert_uint(_event_idx ,<, GASNETE_OP_EVENTS); \ gasnete_op_t *_op = gasneti_event_op(_h); \ switch (EVENT_TYPE(_op,0)) { \ case gasnete_event_type_eop: \ gasnete_eop_check((gasnete_eop_t*)_op); \ break; \ case gasnete_event_type_iop: \ gasnete_iop_check((gasnete_iop_t*)_op); \ break; \ case gasnete_event_type_free_eop: \ gasneti_fatalerror("Invalid use of free eop"); \ break; \ case gasnete_event_type_pendingfree_eop: \ if (!_event_idx) /* leaf use OK while root pending */ \ gasneti_fatalerror("Invalid use of pendingfree eop");\ break; \ case gasnete_event_type_free_iop: \ gasneti_fatalerror("Invalid use of free iop"); \ break; \ case gasnete_event_type_pendingfree_iop: \ if (!_event_idx) /* leaf use OK while root pending */ \ gasneti_fatalerror("Invalid use of pendingfree iop");\ break; \ default: \ gasneti_fatalerror("Event has invalid type %d", \ EVENT_TYPE(_op,0)); \ } \ } while (0) #else #define gasnete_eop_check(eop) ((void)0) #define gasnete_iop_check(iop) ((void)0) #define gasnete_event_check(h) ((void)0) #endif // TODO-EX: EOP_INTERFACE // To efficiently generalize beyond put/get, this enum will // probably need to reflect the order of the counters in the iop // (to compute addresses instead of dispatch via 'if' or 'switch'). #if 1 // TODO-EX: do we want/need a mechanism for overriding these assignments? // gasnete_iop_event_* the event indexes for the named event in an iop enum { gasnete_iop_event_put = 0, gasnete_iop_event_alc = 1, gasnete_iop_event_get = 2, gasnete_iop_event_rmw = 3, }; #endif // gasnete_eop_event_* the child event indexes for the named event in an eop #define gasnete_eop_event_alc gasnete_iop_event_alc // Start == advance an initiated counter for named event in ANY iop by nop // note this relies upon gasnete_begin_nbi_accessregion setting live bits for aop #ifndef GASNETE_IOP_CNT_START #define GASNETE_IOP_CNT_START(_iop, _name, _nop) do { \ (_iop)->initiated_##_name##_cnt += (_nop); \ } while (0) #endif // // "Finish" an iop in an nbi access region // NOTE: caller must pass REL flag when required for Gets // // TODO-EX: this or the callers will probably need to call a // non-inline function in case of dependent ops. // #ifndef GASNETE_IOP_CNT_FINISH_REG #define GASNETE_IOP_CNT_FINISH_REG(_iop, _name, _nop, _flags) do { \ gasneti_assert((_iop)->next); \ gasnete_op_atomic_val_t _completed = \ gasnete_op_atomic_add(&(_iop)->completed_##_name##_cnt, \ (_nop), (_flags)|GASNETI_ATOMIC_ACQ); \ gasnete_op_atomic_val_t _initiated = (_iop)->initiated_##_name##_cnt; \ if (_completed == (_initiated & GASNETI_ATOMIC_MAX)) { \ SET_EVENT_DONE((_iop),gasnete_iop_event_##_name); \ } \ } while (0) #endif // // "Finish" the internal iop, NOT in an nbi access region // NOTE: caller must pass REL flag when required for Gets // #ifndef GASNETE_IOP_CNT_FINISH_INT #define GASNETE_IOP_CNT_FINISH_INT(_iop, _name, _nop, _flags) do { \ gasneti_assert(! (_iop)->next); \ if (gasneti_constant_p(_nop) && ((_nop) == 1)) \ gasnete_op_atomic_increment(&(_iop)->completed_##_name##_cnt, _flags); \ else \ gasnete_op_atomic_add(&(_iop)->completed_##_name##_cnt, _nop, _flags); \ } while (0) #endif // Finish == advance a completed counter for named event in ANY iop by nop, with flags fencing #ifndef GASNETE_IOP_CNT_FINISH #define GASNETE_IOP_CNT_FINISH(_iop, _name, _nop, _flags) do { \ if ((_iop)->next) /* access region iop */ \ GASNETE_IOP_CNT_FINISH_REG((_iop), _name, (_nop), (_flags)); \ else /* implicit iop */ \ GASNETE_IOP_CNT_FINISH_INT((_iop), _name, (_nop), (_flags)); \ } while (0) #endif #ifndef GASNETE_IOP_CNTDONE // Test iop for counter balance of named event #define GASNETE_IOP_CNTDONE(_iop, _name) \ (gasnete_op_atomic_read(&(_iop)->completed_##_name##_cnt, 0) \ == ((_iop)->initiated_##_name##_cnt & GASNETI_ATOMIC_MAX)) #endif #ifndef GASNETE_IOP_DONE // Query named event bit from accessregion iop for liveness #define GASNETE_IOP_DONE(_iop, _name) \ (gasneti_assert((_iop)->next), EVENT_DONE((_iop),gasnete_iop_event_##_name)) #endif #ifndef GASNETE_EOP_DONE // Query Root event of eop for completion #define GASNETE_EOP_DONE(_eop) EVENT_DONE(_eop,0) #endif #ifndef GASNETE_EOP_MARKDONE // Set Root event of eop to done #define GASNETE_EOP_MARKDONE(_eop) SET_EVENT_DONE(_eop,0) #endif // local completion management for aop/iop #ifndef GASNETE_IOP_LC_START #define GASNETE_IOP_LC_START(iop) GASNETE_IOP_CNT_START(iop, alc, 1) #endif #ifndef GASNETE_IOP_LC_FINISH #define GASNETE_IOP_LC_FINISH(iop) GASNETE_IOP_CNT_FINISH(iop, alc, 1, 0) #endif // event:lc - for local-completion of Put/Med/Long with lc_opt = pointer #ifndef GASNETE_EOP_LC_START #define GASNETE_EOP_LC_START(op) SET_EVENT_TYPE(op, gasnete_eop_event_alc, gasnete_event_type_lc) #endif #ifndef GASNETE_EOP_LC_FINISH #define GASNETE_EOP_LC_FINISH(_eop) SET_EVENT_DONE((_eop),gasnete_eop_event_alc) #endif // event:lc - DONE queries on IOP and EOP #ifndef GASNETE_IOP_LC_DONE // access region iops only #define GASNETE_IOP_LC_DONE(_iop) GASNETE_IOP_DONE((_iop),alc) #endif #ifndef GASNETE_IOP_LC_CNTDONE #define GASNETE_IOP_LC_CNTDONE(_iop) GASNETE_IOP_CNTDONE((_iop),alc) #endif #ifndef GASNETE_EOP_LC_DONE #define GASNETE_EOP_LC_DONE(_eop) EVENT_DONE((_eop),gasnete_eop_event_alc) #endif // event:lc_now - for local-completion of Put/Med/Long with lc_opt = EVENT_NOW. // This can be applied to *either* EOP or IOP, since the call with EVENT_NOW // must block until the event has been signaled. Additionally, this can co-exist // with event:lc (both using same event[]) since they are per-operation mutually // exclusive. #define GASNETE_LC_NOW_START(op) SET_EVENT_TYPE(op, gasnete_eop_event_alc, gasnete_event_type_lc_now) #define GASNETE_LC_NOW_FINISH(op) SET_EVENT_DONE(op, gasnete_eop_event_alc) #define GASNETE_LC_NOW_DONE(op) EVENT_DONE(op, gasnete_eop_event_alc) // Extract root (op) and index from any event #define gasneti_event_op(_h) ((gasnete_op_t*)((uintptr_t)(_h) & ~7)) #define gasneti_event_idx(_h) ((uintptr_t)(_h) & 7) // Convert root (op) to any leaf (event) #define gasneti_op_event(_op,_idx) ((gex_Event_t)&((_op)->event[_idx])) /* ------------------------------------------------------------------------------------ */ /* Reference implementation of eop and iop */ #if !GASNETI_DISABLE_REFERENCE_EOP #ifndef GASNETE_EOP_CHUNKCNT #define GASNETE_EOP_CHUNKCNT 256 // the number of eops to allocate together as a block #endif extern void gasnete_eop_alloc(gasneti_threaddata_t * const thread); extern gasnete_iop_t *gasnete_iop_new(gasneti_threaddata_t * const thread); /* get a new op */ GASNETI_INLINE(_gasnete_eop_new) gasnete_eop_t *_gasnete_eop_new(gasneti_threaddata_t * const thread) { gasnete_eop_t *eop = thread->eop_free; if_pf (!eop) { gasneti_mutex_lock(&thread->foreign_lock); { // no branch needed - an empty list remains empty eop = thread->foreign_eops; thread->foreign_eops = NULL; } gasneti_mutex_unlock(&thread->foreign_lock); if (!eop) { gasnete_eop_alloc(thread); eop = thread->eop_free; } } { thread->eop_free = eop->next; #if GASNET_DEBUG gasneti_assert_uint(eop->threadidx ,==, thread->threadidx); gasneti_assert_uint(eop->event[0] ,==, gasnete_event_type_free_eop); eop->event[0] = gasnete_event_type_eop; #endif #ifdef _GASNETE_EOP_NEW_EXTRA // Hook for conduit-specific initializations and assertions _GASNETE_EOP_NEW_EXTRA(eop); #endif gasneti_assert(GASNETE_EOP_DONE(eop)); gasneti_assert(GASNETE_EOP_LC_DONE(eop)); return eop; } } /* get a new op AND mark it in flight */ GASNETI_INLINE(gasnete_eop_new) gasnete_eop_t *gasnete_eop_new(gasneti_threaddata_t * const thread) { gasnete_eop_t *eop = _gasnete_eop_new(thread); SET_EVENT_TYPE(eop, 0, gasnete_event_type_eop); #ifdef GASNETE_EOP_NEW_EXTRA // Hook for conduit-specific initializations and assertions GASNETE_EOP_NEW_EXTRA(eop); #endif gasneti_assert(! GASNETE_EOP_DONE(eop)); return eop; } #if GASNETE_HAVE_LC // get a new op AND "start" local completion GASNETI_INLINE(gasnete_eop_new_alc) gasnete_eop_t *gasnete_eop_new_alc(gasneti_threaddata_t * const thread) { gasnete_eop_t *eop = _gasnete_eop_new(thread); GASNETE_EOP_LC_START(eop); #ifdef GASNETE_EOP_NEW_ALC_EXTRA // Hook for conduit-specific initializations and assertions GASNETE_EOP_NEW_ALC_EXTRA(eop); #endif gasneti_assert(! GASNETE_EOP_LC_DONE(eop)); return eop; } #endif // GASNETE_HAVE_LC /* query an iop for completeness - * this means all catagories (puts, gets, LC, etc.) * Only used (via GASNETE_IOP_ISDONE) to check state in gasnete_free_threaddata(). */ static int gasnete_iop_isdone(gasnete_iop_t *iop) { int result; gasnete_iop_check(iop); if (iop->next) { // access region, uses op bits result = EVENT_ALL_DONE(iop); } else { // implicit iop, uses counters result = (GASNETE_IOP_CNTDONE(iop,get) && GASNETE_IOP_CNTDONE(iop,put) && GASNETE_IOP_CNTDONE(iop,rmw) && GASNETE_IOP_LC_CNTDONE(iop)); } return result; } /* mark an op done - isget ignored for explicit ops */ // TODO-EX: DEPRECATED // Must replace the only remaining call (in gasnet_extended_amref.c) // with something supporting all event categories. static void gasnete_op_markdone(gasnete_op_t *op, int isget) { if (OPTYPE(op) == OPTYPE_EXPLICIT) { gasnete_eop_t *eop = (gasnete_eop_t *)op; gasnete_eop_check(eop); GASNETE_EOP_MARKDONE(eop); } else { gasnete_iop_t *iop = (gasnete_iop_t *)op; gasnete_iop_check(iop); if (isget) GASNETE_IOP_CNT_FINISH(iop, get, 1, 0); else GASNETE_IOP_CNT_FINISH(iop, put, 1, 0); } } /* prepare to free an eop, but do not destroy anything that would * be necessary to test/wait on the eop. */ GASNETI_INLINE(gasnete_eop_prep_free) void gasnete_eop_prep_free(gasnete_eop_t *eop) { gasnete_eop_check(eop); gasneti_assert(EVENT_ALL_DONE(eop)); gasneti_assert(GASNETE_EOP_DONE(eop)); gasneti_assert(GASNETE_EOP_LC_DONE(eop)); #ifdef GASNETE_EOP_PREP_FREE_EXTRA // Hook for conduit-specific cleanups and assertions GASNETE_EOP_PREP_FREE_EXTRA(eop); #endif #if GASNET_DEBUG gasneti_assert_uint(eop->event[0] ,==, gasnete_event_type_eop); eop->event[0] = gasnete_event_type_pendingfree_eop; #endif } /* free an eop */ static void gasnete_eop_free(gasnete_eop_t *eop GASNETI_THREAD_FARG) { gasnete_eop_prep_free(eop); #ifdef GASNETE_EOP_FREE_EXTRA // Hook for conduit-specific cleanups // NOTE: Defining this adds an extra pass in {test,wait}_{some,all} and // therefore should only be used if there are steps that cannot safely be // performed in GASNETE_EOP_PREP_FREE_EXTRA. GASNETE_EOP_FREE_EXTRA(eop); #endif #if GASNET_DEBUG gasneti_assert_uint(eop->event[0] ,==, gasnete_event_type_pendingfree_eop); eop->event[0] = gasnete_event_type_free_eop; #endif gasneti_threaddata_t * const thread = gasnete_threadtable[eop->threadidx]; if_pt (thread == GASNETI_MYTHREAD) { eop->next = thread->eop_free; thread->eop_free = eop; } else { gasneti_mutex_lock(&thread->foreign_lock); eop->next = thread->foreign_eops; thread->foreign_eops = eop; gasneti_mutex_unlock(&thread->foreign_lock); } } #endif // GASNETI_DISABLE_REFERENCE_EOP /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/gasnet_ammacros.h0000664000175000017500000030210315142313673016735 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_ammacros.h $ * Description: GASNet ammacros header * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_AMMACROS_H #define _GASNET_AMMACROS_H /* ------------------------------------------------------------------------------------ */ /* Active Message Request/Reply Functions ====================================== */ /* This header uses macros to coalesce all the possible AM request/reply functions into the following short list of variable-argument functions. This is not the only implementation option, but seems to work rather cleanly. */ // TODO-EX: introduce 'const' - has cascading effects!!! // Long extern int gasnetc_AMRequestLongM( gex_TM_t _tm, // Names a local context ("return address") gex_Rank_t _rank, // Together with 'tm', names a remote context gex_AM_Index_t _handler, // Index into handler table of remote context /*const*/ void *_source_addr, // Payload address (or OFFSET) size_t _nbytes, // Payload length void *_dest_addr, // Payload destination address (or OFFSET) gex_Event_t *_lc_opt, // Local completion control (see above) gex_Flags_t _flags // Flags to control this operation GASNETI_THREAD_FARG, // Hidden thread-specific info argument int _numargs, ...); // Argument list (0..AMMaxArgs) as varargs extern int gasnetc_AMReplyLongM( gex_Token_t _token, // Names local and remote contexts gex_AM_Index_t _handler, /*const*/ void *_source_addr, size_t _nbytes, void *_dest_addr, gex_Event_t *_lc_opt, gex_Flags_t _flags, int _numargs, ...); // Medium extern int gasnetc_AMRequestMediumM( gex_TM_t _tm, gex_Rank_t _rank, gex_AM_Index_t _handler, /*const*/ void *_source_addr, size_t _nbytes, gex_Event_t *_lc_opt, gex_Flags_t _flags GASNETI_THREAD_FARG, int _numargs, ...); extern int gasnetc_AMReplyMediumM( gex_Token_t _token, gex_AM_Index_t _handler, /*const*/ void *_source_addr, size_t _nbytes, gex_Event_t *_lc_opt, gex_Flags_t _flags, int _numargs, ...); // Short extern int gasnetc_AMRequestShortM( gex_TM_t _tm, gex_Rank_t _rank, gex_AM_Index_t _handler, gex_Flags_t _flags GASNETI_THREAD_FARG, int _numargs, ...); extern int gasnetc_AMReplyShortM( gex_Token_t _token, gex_AM_Index_t _handler, gex_Flags_t _flags, int _numargs, ...); /* ------------------------------------------------------------------------------------ */ /* Active Message Macros ===================== */ /* yes, this is ugly, but it works... */ /* ------------------------------------------------------------------------------------ */ #define gex_AM_RequestShort0(tm, rank, handler, flags) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 0) #define gex_AM_RequestShort1(tm, rank, handler, flags, a0) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 1, (gex_AM_Arg_t)(a0)) #define gex_AM_RequestShort2(tm, rank, handler, flags, a0, a1) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 2, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1)) #define gex_AM_RequestShort3(tm, rank, handler, flags, a0, a1, a2) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 3, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2)) #define gex_AM_RequestShort4(tm, rank, handler, flags, a0, a1, a2, a3) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 4, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3)) #define gex_AM_RequestShort5(tm, rank, handler, flags, a0, a1, a2, a3, a4) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 5, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4)) #define gex_AM_RequestShort6(tm, rank, handler, flags, a0, a1, a2, a3, a4, a5) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 6, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5)) #define gex_AM_RequestShort7(tm, rank, handler, flags, a0, a1, a2, a3, a4, a5, a6) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 7, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6)) #define gex_AM_RequestShort8(tm, rank, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 8, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7)) #define gex_AM_RequestShort9(tm, rank, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 9, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8)) #define gex_AM_RequestShort10(tm, rank, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 10, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9)) #define gex_AM_RequestShort11(tm, rank, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 11, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10)) #define gex_AM_RequestShort12(tm, rank, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 12, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11)) #define gex_AM_RequestShort13(tm, rank, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 13, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12)) #define gex_AM_RequestShort14(tm, rank, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 14, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13)) #define gex_AM_RequestShort15(tm, rank, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 15, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14)) #define gex_AM_RequestShort16(tm, rank, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gasnetc_AMRequestShortM(tm, rank, handler, flags GASNETI_THREAD_GET, 16, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15)) /* ------------------------------------------------------------------------------------ */ #define gex_AM_RequestMedium0(tm, rank, handler, source_addr, nbytes, lc_opt, flags) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 0) #define gex_AM_RequestMedium1(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 1, (gex_AM_Arg_t)(a0)) #define gex_AM_RequestMedium2(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 2, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1)) #define gex_AM_RequestMedium3(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 3, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2)) #define gex_AM_RequestMedium4(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 4, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3)) #define gex_AM_RequestMedium5(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 5, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4)) #define gex_AM_RequestMedium6(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 6, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5)) #define gex_AM_RequestMedium7(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 7, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6)) #define gex_AM_RequestMedium8(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 8, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7)) #define gex_AM_RequestMedium9(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 9, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8)) #define gex_AM_RequestMedium10(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 10, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9)) #define gex_AM_RequestMedium11(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 11, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10)) #define gex_AM_RequestMedium12(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 12, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11)) #define gex_AM_RequestMedium13(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 13, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12)) #define gex_AM_RequestMedium14(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 14, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13)) #define gex_AM_RequestMedium15(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 15, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14)) #define gex_AM_RequestMedium16(tm, rank, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gasnetc_AMRequestMediumM(tm, rank, handler, source_addr, nbytes, lc_opt, flags GASNETI_THREAD_GET, 16, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15)) /* ------------------------------------------------------------------------------------ */ #define gex_AM_RequestLong0(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 0) #define gex_AM_RequestLong1(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 1, (gex_AM_Arg_t)(a0)) #define gex_AM_RequestLong2(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 2, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1)) #define gex_AM_RequestLong3(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 3, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2)) #define gex_AM_RequestLong4(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 4, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3)) #define gex_AM_RequestLong5(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 5, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4)) #define gex_AM_RequestLong6(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 6, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5)) #define gex_AM_RequestLong7(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 7, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6)) #define gex_AM_RequestLong8(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 8, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7)) #define gex_AM_RequestLong9(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 9, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8)) #define gex_AM_RequestLong10(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 10, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9)) #define gex_AM_RequestLong11(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 11, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10)) #define gex_AM_RequestLong12(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 12, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11)) #define gex_AM_RequestLong13(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 13, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12)) #define gex_AM_RequestLong14(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 14, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13)) #define gex_AM_RequestLong15(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 15, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14)) #define gex_AM_RequestLong16(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gasnetc_AMRequestLongM(tm, rank, handler, source_addr, nbytes, dest_addr, lc_opt, flags GASNETI_THREAD_GET, 16, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15)) /* ------------------------------------------------------------------------------------ */ #define gex_AM_ReplyShort0(token, handler, flags) \ gasnetc_AMReplyShortM(token, handler, flags, 0) #define gex_AM_ReplyShort1(token, handler, flags, a0) \ gasnetc_AMReplyShortM(token, handler, flags, 1, (gex_AM_Arg_t)(a0)) #define gex_AM_ReplyShort2(token, handler, flags, a0, a1) \ gasnetc_AMReplyShortM(token, handler, flags, 2, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1)) #define gex_AM_ReplyShort3(token, handler, flags, a0, a1, a2) \ gasnetc_AMReplyShortM(token, handler, flags, 3, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2)) #define gex_AM_ReplyShort4(token, handler, flags, a0, a1, a2, a3) \ gasnetc_AMReplyShortM(token, handler, flags, 4, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3)) #define gex_AM_ReplyShort5(token, handler, flags, a0, a1, a2, a3, a4) \ gasnetc_AMReplyShortM(token, handler, flags, 5, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4)) #define gex_AM_ReplyShort6(token, handler, flags, a0, a1, a2, a3, a4, a5) \ gasnetc_AMReplyShortM(token, handler, flags, 6, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5)) #define gex_AM_ReplyShort7(token, handler, flags, a0, a1, a2, a3, a4, a5, a6) \ gasnetc_AMReplyShortM(token, handler, flags, 7, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6)) #define gex_AM_ReplyShort8(token, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7) \ gasnetc_AMReplyShortM(token, handler, flags, 8, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7)) #define gex_AM_ReplyShort9(token, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gasnetc_AMReplyShortM(token, handler, flags, 9, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8)) #define gex_AM_ReplyShort10(token, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gasnetc_AMReplyShortM(token, handler, flags, 10, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9)) #define gex_AM_ReplyShort11(token, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gasnetc_AMReplyShortM(token, handler, flags, 11, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10)) #define gex_AM_ReplyShort12(token, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gasnetc_AMReplyShortM(token, handler, flags, 12, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11)) #define gex_AM_ReplyShort13(token, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gasnetc_AMReplyShortM(token, handler, flags, 13, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12)) #define gex_AM_ReplyShort14(token, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gasnetc_AMReplyShortM(token, handler, flags, 14, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13)) #define gex_AM_ReplyShort15(token, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gasnetc_AMReplyShortM(token, handler, flags, 15, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14)) #define gex_AM_ReplyShort16(token, handler, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gasnetc_AMReplyShortM(token, handler, flags, 16, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15)) /* ------------------------------------------------------------------------------------ */ #define gex_AM_ReplyMedium0(token, handler, source_addr, nbytes, lc_opt, flags) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 0) #define gex_AM_ReplyMedium1(token, handler, source_addr, nbytes, lc_opt, flags, a0) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 1, (gex_AM_Arg_t)(a0)) #define gex_AM_ReplyMedium2(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 2, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1)) #define gex_AM_ReplyMedium3(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 3, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2)) #define gex_AM_ReplyMedium4(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 4, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3)) #define gex_AM_ReplyMedium5(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 5, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4)) #define gex_AM_ReplyMedium6(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 6, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5)) #define gex_AM_ReplyMedium7(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 7, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6)) #define gex_AM_ReplyMedium8(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 8, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7)) #define gex_AM_ReplyMedium9(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 9, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8)) #define gex_AM_ReplyMedium10(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 10, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9)) #define gex_AM_ReplyMedium11(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 11, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10)) #define gex_AM_ReplyMedium12(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 12, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11)) #define gex_AM_ReplyMedium13(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 13, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12)) #define gex_AM_ReplyMedium14(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 14, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13)) #define gex_AM_ReplyMedium15(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 15, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14)) #define gex_AM_ReplyMedium16(token, handler, source_addr, nbytes, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gasnetc_AMReplyMediumM(token, handler, source_addr, nbytes, lc_opt, flags, 16, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15)) /* ------------------------------------------------------------------------------------ */ #define gex_AM_ReplyLong0(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 0) #define gex_AM_ReplyLong1(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 1, (gex_AM_Arg_t)(a0)) #define gex_AM_ReplyLong2(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 2, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1)) #define gex_AM_ReplyLong3(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 3, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2)) #define gex_AM_ReplyLong4(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 4, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3)) #define gex_AM_ReplyLong5(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 5, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4)) #define gex_AM_ReplyLong6(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 6, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5)) #define gex_AM_ReplyLong7(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 7, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6)) #define gex_AM_ReplyLong8(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 8, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7)) #define gex_AM_ReplyLong9(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 9, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8)) #define gex_AM_ReplyLong10(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 10, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9)) #define gex_AM_ReplyLong11(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 11, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10)) #define gex_AM_ReplyLong12(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 12, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11)) #define gex_AM_ReplyLong13(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 13, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12)) #define gex_AM_ReplyLong14(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 14, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13)) #define gex_AM_ReplyLong15(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 15, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14)) #define gex_AM_ReplyLong16(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gasnetc_AMReplyLongM(token, handler, source_addr, nbytes, dest_addr, lc_opt, flags, 16, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15)) /* ------------------------------------------------------------------------------------ */ /* Active Message Prepare/Commit Functions ======================================= */ #if GASNET_DEBUG #undef GASNETC_AM_COMMIT_REQ_MEDIUM_NARGS #define GASNETC_AM_COMMIT_REQ_MEDIUM_NARGS 1 #undef GASNETC_AM_COMMIT_REP_MEDIUM_NARGS #define GASNETC_AM_COMMIT_REP_MEDIUM_NARGS 1 #undef GASNETC_AM_COMMIT_REQ_LONG_NARGS #define GASNETC_AM_COMMIT_REQ_LONG_NARGS 1 #undef GASNETC_AM_COMMIT_REP_LONG_NARGS #define GASNETC_AM_COMMIT_REP_LONG_NARGS 1 #endif // Note that gasnetc_AM_Commit*() is used to implement both the original // gex_AM_Commit*() and gex_AM_Commit*_v2() families. Consequently, the // gasnetc_AM_Commit*() family has `int` return type and a 'commit_flags' // argument, despite the lack of "_v2" in the names. // Medium split-phase extern gex_AM_SrcDesc_t gasnetc_AM_PrepareRequestMedium( gex_TM_t _tm, gex_Rank_t _rank, const void *_client_buf, size_t _min_length, size_t _max_length, gex_Event_t *_lc_opt, gex_Flags_t _flags GASNETI_THREAD_FARG, unsigned int _numargs); extern int gasnetc_AM_CommitRequestMediumM( gex_AM_Index_t _handler, size_t _nbytes, gex_Flags_t _commit_flags GASNETI_THREAD_FARG, #if GASNETC_AM_COMMIT_REQ_MEDIUM_NARGS unsigned int _numargs, #endif gex_AM_SrcDesc_t _sd, ...); extern gex_AM_SrcDesc_t gasnetc_AM_PrepareReplyMedium( gex_Token_t _token, const void *_client_buf, size_t _min_length, size_t _max_length, gex_Event_t *_lc_opt, gex_Flags_t _flags, unsigned int _numargs); extern int gasnetc_AM_CommitReplyMediumM( gex_AM_Index_t _handler, size_t _nbytes, gex_Flags_t _commit_flags, #if GASNETC_AM_COMMIT_REP_MEDIUM_NARGS unsigned int _numargs, #endif gex_AM_SrcDesc_t _sd, ...); // Long split-phase extern gex_AM_SrcDesc_t gasnetc_AM_PrepareRequestLong( gex_TM_t _tm, gex_Rank_t _rank, const void *_client_buf, size_t _min_length, size_t _max_length, void *_dest_addr, gex_Event_t *_lc_opt, gex_Flags_t _flags GASNETI_THREAD_FARG, unsigned int _numargs); extern int gasnetc_AM_CommitRequestLongM( gex_AM_Index_t _handler, size_t _nbytes, void *_dest_addr, gex_Flags_t _commit_flags GASNETI_THREAD_FARG, #if GASNETC_AM_COMMIT_REQ_LONG_NARGS unsigned int _numargs, #endif gex_AM_SrcDesc_t _sd, ...); extern gex_AM_SrcDesc_t gasnetc_AM_PrepareReplyLong( gex_Token_t _token, const void *_client_buf, size_t _min_length, size_t _max_length, void *_dest_addr, gex_Event_t *_lc_opt, gex_Flags_t _flags, unsigned int _numargs); extern int gasnetc_AM_CommitReplyLongM( gex_AM_Index_t _handler, size_t _nbytes, void *_dest_addr, gex_Flags_t _commit_flags, #if GASNETC_AM_COMMIT_REP_LONG_NARGS unsigned int _numargs, #endif gex_AM_SrcDesc_t _sd, ...); #define gex_AM_PrepareRequestMedium(tm, rank, cbuf, minlen, maxlen, lc_opt, flags, nargs) \ gasnetc_AM_PrepareRequestMedium(tm, rank, cbuf, minlen, maxlen, lc_opt, flags GASNETI_THREAD_GET, nargs) #define gex_AM_PrepareReplyMedium(token, cbuf, minlen, maxlen, lc_opt, flags, nargs) \ gasnetc_AM_PrepareReplyMedium(token, cbuf, minlen, maxlen, lc_opt, flags, nargs) #define gex_AM_PrepareRequestLong(tm, rank, cbuf, minlen, maxlen, dest_addr, lc_opt, flags, nargs) \ gasnetc_AM_PrepareRequestLong(tm, rank, cbuf, minlen, maxlen, dest_addr, lc_opt, flags GASNETI_THREAD_GET, nargs) #define gex_AM_PrepareReplyLong(token, cbuf, minlen, maxlen, dest_addr, lc_opt, flags, nargs) \ gasnetc_AM_PrepareReplyLong(token, cbuf, minlen, maxlen, dest_addr, lc_opt, flags, nargs) #if GASNETC_AM_COMMIT_REQ_MEDIUM_NARGS #define GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(x) , x #else #define GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(x) #endif #if GASNETC_AM_COMMIT_REP_MEDIUM_NARGS #define GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(x) , x #else #define GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(x) #endif #if GASNETC_AM_COMMIT_REQ_LONG_NARGS #define GASNETI_AM_COMMIT_REQ_LONG_NARGS(x) , x #else #define GASNETI_AM_COMMIT_REQ_LONG_NARGS(x) #endif #if GASNETC_AM_COMMIT_REP_LONG_NARGS #define GASNETI_AM_COMMIT_REP_LONG_NARGS(x) , x #else #define GASNETI_AM_COMMIT_REP_LONG_NARGS(x) #endif #define gex_AM_CommitRequestMedium0(sd, handler, nbytes) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(0), sd)) #define gex_AM_CommitRequestMedium1(sd, handler, nbytes, a0) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(1), sd, (gex_AM_Arg_t)(a0))) #define gex_AM_CommitRequestMedium2(sd, handler, nbytes, a0, a1) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(2), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1))) #define gex_AM_CommitRequestMedium3(sd, handler, nbytes, a0, a1, a2) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(3), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2))) #define gex_AM_CommitRequestMedium4(sd, handler, nbytes, a0, a1, a2, a3) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(4), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3))) #define gex_AM_CommitRequestMedium5(sd, handler, nbytes, a0, a1, a2, a3, a4) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(5), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4))) #define gex_AM_CommitRequestMedium6(sd, handler, nbytes, a0, a1, a2, a3, a4, a5) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(6), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5))) #define gex_AM_CommitRequestMedium7(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(7), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6))) #define gex_AM_CommitRequestMedium8(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(8), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7))) #define gex_AM_CommitRequestMedium9(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(9), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8))) #define gex_AM_CommitRequestMedium10(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(10), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9))) #define gex_AM_CommitRequestMedium11(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(11), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10))) #define gex_AM_CommitRequestMedium12(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(12), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11))) #define gex_AM_CommitRequestMedium13(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(13), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12))) #define gex_AM_CommitRequestMedium14(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(14), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13))) #define gex_AM_CommitRequestMedium15(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(15), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14))) #define gex_AM_CommitRequestMedium16(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ ((void)gasnetc_AM_CommitRequestMediumM(handler, nbytes, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(16), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15))) #define gex_AM_CommitReplyMedium0(sd, handler, nbytes) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(0), sd)) #define gex_AM_CommitReplyMedium1(sd, handler, nbytes, a0) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(1), sd, (gex_AM_Arg_t)(a0))) #define gex_AM_CommitReplyMedium2(sd, handler, nbytes, a0, a1) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(2), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1))) #define gex_AM_CommitReplyMedium3(sd, handler, nbytes, a0, a1, a2) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(3), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2))) #define gex_AM_CommitReplyMedium4(sd, handler, nbytes, a0, a1, a2, a3) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(4), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3))) #define gex_AM_CommitReplyMedium5(sd, handler, nbytes, a0, a1, a2, a3, a4) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(5), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4))) #define gex_AM_CommitReplyMedium6(sd, handler, nbytes, a0, a1, a2, a3, a4, a5) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(6), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5)) #define gex_AM_CommitReplyMedium7(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(7), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6))) #define gex_AM_CommitReplyMedium8(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(8), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7))) #define gex_AM_CommitReplyMedium9(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(9), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8))) #define gex_AM_CommitReplyMedium10(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(10), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9))) #define gex_AM_CommitReplyMedium11(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(11), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10))) #define gex_AM_CommitReplyMedium12(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(12), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11))) #define gex_AM_CommitReplyMedium13(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(13), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12)) #define gex_AM_CommitReplyMedium14(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(14), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13))) #define gex_AM_CommitReplyMedium15(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(15), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14))) #define gex_AM_CommitReplyMedium16(sd, handler, nbytes, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ ((void)gasnetc_AM_CommitReplyMediumM(handler, nbytes, 0 GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(16), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15))) /* ------------------------------------------------------------------------------------ */ #define gex_AM_CommitRequestMedium0_v2(sd, handler, nbytes, commit_flags) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(0), sd) #define gex_AM_CommitRequestMedium1_v2(sd, handler, nbytes, commit_flags, a0) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(1), sd, (gex_AM_Arg_t)(a0)) #define gex_AM_CommitRequestMedium2_v2(sd, handler, nbytes, commit_flags, a0, a1) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(2), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1)) #define gex_AM_CommitRequestMedium3_v2(sd, handler, nbytes, commit_flags, a0, a1, a2) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(3), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2)) #define gex_AM_CommitRequestMedium4_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(4), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3)) #define gex_AM_CommitRequestMedium5_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(5), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4)) #define gex_AM_CommitRequestMedium6_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(6), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5)) #define gex_AM_CommitRequestMedium7_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(7), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6)) #define gex_AM_CommitRequestMedium8_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(8), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7)) #define gex_AM_CommitRequestMedium9_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(9), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8)) #define gex_AM_CommitRequestMedium10_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(10), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9)) #define gex_AM_CommitRequestMedium11_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(11), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10)) #define gex_AM_CommitRequestMedium12_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(12), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11)) #define gex_AM_CommitRequestMedium13_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(13), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12)) #define gex_AM_CommitRequestMedium14_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(14), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13)) #define gex_AM_CommitRequestMedium15_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(15), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14)) #define gex_AM_CommitRequestMedium16_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gasnetc_AM_CommitRequestMediumM(handler, nbytes, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_MEDIUM_NARGS(16), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15)) #define gex_AM_CommitReplyMedium0_v2(sd, handler, nbytes, commit_flags) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(0), sd) #define gex_AM_CommitReplyMedium1_v2(sd, handler, nbytes, commit_flags, a0) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(1), sd, (gex_AM_Arg_t)(a0)) #define gex_AM_CommitReplyMedium2_v2(sd, handler, nbytes, commit_flags, a0, a1) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(2), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1)) #define gex_AM_CommitReplyMedium3_v2(sd, handler, nbytes, commit_flags, a0, a1, a2) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(3), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2)) #define gex_AM_CommitReplyMedium4_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(4), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3)) #define gex_AM_CommitReplyMedium5_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(5), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4)) #define gex_AM_CommitReplyMedium6_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(6), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5)) #define gex_AM_CommitReplyMedium7_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(7), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6)) #define gex_AM_CommitReplyMedium8_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(8), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7)) #define gex_AM_CommitReplyMedium9_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(9), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8)) #define gex_AM_CommitReplyMedium10_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(10), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9)) #define gex_AM_CommitReplyMedium11_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(11), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10)) #define gex_AM_CommitReplyMedium12_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(12), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11)) #define gex_AM_CommitReplyMedium13_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(13), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12)) #define gex_AM_CommitReplyMedium14_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(14), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13)) #define gex_AM_CommitReplyMedium15_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(15), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14)) #define gex_AM_CommitReplyMedium16_v2(sd, handler, nbytes, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gasnetc_AM_CommitReplyMediumM(handler, nbytes, commit_flags GASNETI_AM_COMMIT_REP_MEDIUM_NARGS(16), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15)) /* ------------------------------------------------------------------------------------ */ #define gex_AM_CommitRequestLong0(sd, handler, nbytes, dest_addr) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(0), sd)) #define gex_AM_CommitRequestLong1(sd, handler, nbytes, dest_addr, a0) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(1), sd, (gex_AM_Arg_t)(a0))) #define gex_AM_CommitRequestLong2(sd, handler, nbytes, dest_addr, a0, a1) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(2), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1))) #define gex_AM_CommitRequestLong3(sd, handler, nbytes, dest_addr, a0, a1, a2) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(3), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2))) #define gex_AM_CommitRequestLong4(sd, handler, nbytes, dest_addr, a0, a1, a2, a3) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(4), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3))) #define gex_AM_CommitRequestLong5(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(5), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4))) #define gex_AM_CommitRequestLong6(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(6), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5))) #define gex_AM_CommitRequestLong7(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(7), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6))) #define gex_AM_CommitRequestLong8(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(8), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7))) #define gex_AM_CommitRequestLong9(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(9), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8))) #define gex_AM_CommitRequestLong10(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(10), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9))) #define gex_AM_CommitRequestLong11(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(11), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10))) #define gex_AM_CommitRequestLong12(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(12), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11))) #define gex_AM_CommitRequestLong13(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(13), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12))) #define gex_AM_CommitRequestLong14(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(14), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13))) #define gex_AM_CommitRequestLong15(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(15), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14))) #define gex_AM_CommitRequestLong16(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ ((void)gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, 0 GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(16), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15))) #define gex_AM_CommitReplyLong0(sd, handler, nbytes, dest_addr) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(0), sd)) #define gex_AM_CommitReplyLong1(sd, handler, nbytes, dest_addr, a0) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(1), sd, (gex_AM_Arg_t)(a0))) #define gex_AM_CommitReplyLong2(sd, handler, nbytes, dest_addr, a0, a1) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(2), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1))) #define gex_AM_CommitReplyLong3(sd, handler, nbytes, dest_addr, a0, a1, a2) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(3), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2))) #define gex_AM_CommitReplyLong4(sd, handler, nbytes, dest_addr, a0, a1, a2, a3) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(4), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3))) #define gex_AM_CommitReplyLong5(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(5), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4))) #define gex_AM_CommitReplyLong6(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(6), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5))) #define gex_AM_CommitReplyLong7(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(7), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6))) #define gex_AM_CommitReplyLong8(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(8), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7))) #define gex_AM_CommitReplyLong9(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(9), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8))) #define gex_AM_CommitReplyLong10(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(10), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9))) #define gex_AM_CommitReplyLong11(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(11), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10))) #define gex_AM_CommitReplyLong12(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(12), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11))) #define gex_AM_CommitReplyLong13(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(13), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12))) #define gex_AM_CommitReplyLong14(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(14), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13))) #define gex_AM_CommitReplyLong15(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(15), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14))) #define gex_AM_CommitReplyLong16(sd, handler, nbytes, dest_addr, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ ((void)gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, 0 GASNETI_AM_COMMIT_REP_LONG_NARGS(16), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15))) /* ------------------------------------------------------------------------------------ */ #define gex_AM_CommitRequestLong0_v2(sd, handler, nbytes, dest_addr, commit_flags) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(0), sd) #define gex_AM_CommitRequestLong1_v2(sd, handler, nbytes, dest_addr, commit_flags, a0) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(1), sd, (gex_AM_Arg_t)(a0)) #define gex_AM_CommitRequestLong2_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(2), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1)) #define gex_AM_CommitRequestLong3_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(3), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2)) #define gex_AM_CommitRequestLong4_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(4), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3)) #define gex_AM_CommitRequestLong5_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(5), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4)) #define gex_AM_CommitRequestLong6_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(6), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5)) #define gex_AM_CommitRequestLong7_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(7), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6)) #define gex_AM_CommitRequestLong8_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(8), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7)) #define gex_AM_CommitRequestLong9_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(9), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8)) #define gex_AM_CommitRequestLong10_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(10), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9)) #define gex_AM_CommitRequestLong11_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(11), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10)) #define gex_AM_CommitRequestLong12_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(12), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11)) #define gex_AM_CommitRequestLong13_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(13), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12)) #define gex_AM_CommitRequestLong14_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(14), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13)) #define gex_AM_CommitRequestLong15_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(15), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14)) #define gex_AM_CommitRequestLong16_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gasnetc_AM_CommitRequestLongM(handler, nbytes, dest_addr, commit_flags GASNETI_THREAD_GET GASNETI_AM_COMMIT_REQ_LONG_NARGS(16), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15)) #define gex_AM_CommitReplyLong0_v2(sd, handler, nbytes, dest_addr) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(0), sd) #define gex_AM_CommitReplyLong1_v2(sd, handler, nbytes, dest_addr, commit_flags, a0) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(1), sd, (gex_AM_Arg_t)(a0)) #define gex_AM_CommitReplyLong2_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(2), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1)) #define gex_AM_CommitReplyLong3_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(3), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2)) #define gex_AM_CommitReplyLong4_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(4), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3)) #define gex_AM_CommitReplyLong5_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(5), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4)) #define gex_AM_CommitReplyLong6_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(6), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5)) #define gex_AM_CommitReplyLong7_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(7), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6)) #define gex_AM_CommitReplyLong8_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(8), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7)) #define gex_AM_CommitReplyLong9_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8 ) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(9), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8)) #define gex_AM_CommitReplyLong10_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(10), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9)) #define gex_AM_CommitReplyLong11_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(11), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10)) #define gex_AM_CommitReplyLong12_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(12), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11)) #define gex_AM_CommitReplyLong13_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(13), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12)) #define gex_AM_CommitReplyLong14_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(14), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13)) #define gex_AM_CommitReplyLong15_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(15), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14)) #define gex_AM_CommitReplyLong16_v2(sd, handler, nbytes, dest_addr, commit_flags, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ gasnetc_AM_CommitReplyLongM(handler, nbytes, dest_addr, commit_flags GASNETI_AM_COMMIT_REP_LONG_NARGS(16), sd, (gex_AM_Arg_t)(a0), (gex_AM_Arg_t)(a1), (gex_AM_Arg_t)(a2), (gex_AM_Arg_t)(a3), (gex_AM_Arg_t)(a4), (gex_AM_Arg_t)(a5), (gex_AM_Arg_t)(a6), (gex_AM_Arg_t)(a7), (gex_AM_Arg_t)(a8), (gex_AM_Arg_t)(a9), (gex_AM_Arg_t)(a10), (gex_AM_Arg_t)(a11), (gex_AM_Arg_t)(a12), (gex_AM_Arg_t)(a13), (gex_AM_Arg_t)(a14), (gex_AM_Arg_t)(a15)) /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/configure0000775000175000017500003406163415142313673015352 0ustar alastairalastair#! /bin/sh # From acinclude.m4 # GASNet configure argument processing # start by capturing raw args, hopefully before autoconf clobbers positional parameters _gasneti_raw_args= for arg in "$@" ; do if test -z "$_gasneti_raw_args" ; then _gasneti_raw_args="'$arg'" else _gasneti_raw_args="$_gasneti_raw_args '$arg'" fi done # also capture the enclosing environment, before autoconf changes it _gasneti_envcmd=env for envcmd in $ENVCMD /usr/bin/env /bin/env ; do if test -x $envcmd ; then _gasneti_envcmd=$envcmd break fi done rm -f config.env trap 'rm -f config.env' 0 > /dev/null 2>&1 # prevent a leak on --help/--version $_gasneti_envcmd > config.env echo > /dev/null \ . # From configure.in gex-2025.8.0-0-ge3628f258. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: https://gasnet-bugs.lbl.gov about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GASNet' PACKAGE_TARNAME= PACKAGE_VERSION='2025.8.0' PACKAGE_STRING= PACKAGE_BUGREPORT='https://gasnet-bugs.lbl.gov' PACKAGE_URL='https://gasnet.lbl.gov' ac_unique_file="gasnet_tools.h" enable_option_checking=no ac_default_prefix=/usr/local/gasnet # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS TOOL_PREFIX GASNET_INSTALL_CMD NOASLR_LDFLAGS BOURNE_SHELL TIMECMD READLINK DIRNAME BASENAME RANLIB AR GNU_NM_FALSE GNU_NM_TRUE NM DEBUGMALLOC_VAL DEBUGMALLOC_VAR DEBUGMALLOC DEBUGMALLOC_FALSE DEBUGMALLOC_TRUE GASNETI_HWLOC_CALC_PATH GASNETI_HWLOC_BIND_PATH HWLOC_LIBS HWLOC_LDFLAGS HWLOC_CFLAGS HWLOC_guess_prog USE_PLPA_FALSE USE_PLPA_TRUE HAVE_MK_CLASS_ZE_FALSE HAVE_MK_CLASS_ZE_TRUE ZE_LIBS ZE_LDFLAGS ZE_CFLAGS ZE_guess_prog HAVE_MK_CLASS_HIP_FALSE HAVE_MK_CLASS_HIP_TRUE HIP_LIBS HIP_LDFLAGS HIP_CFLAGS HIP_guess_prog HAVE_MK_CLASS_CUDA_UVA_FALSE HAVE_MK_CLASS_CUDA_UVA_TRUE CUDA_UVA_LIBS CUDA_UVA_LDFLAGS CUDA_UVA_CFLAGS CUDA_guess_prog LLDB_PATH DBX_PATH IDB_PATH PGDBG_PATH PSTACK_PATH GSTACK_PATH GDB_PATH ADDR2LINE_PATH ALLOCA HAVE_BOOTSTRAP_PMI_FALSE HAVE_BOOTSTRAP_PMI_TRUE PMIRUN_CMD PMI_SPAWNER_CFLAGS PMI_SPAWNER_LDFLAGS PMI_SPAWNER_LIBS gasnet_cv__gfp_fullprogname_PMIRUN_CMD APRUN_PATH SRUN_PATH HAVE_BOOTSTRAP_SSH_FALSE HAVE_BOOTSTRAP_SSH_TRUE SSH_SPAWNER_LIBS HAVE_BOOTSTRAP_MPI_FALSE HAVE_BOOTSTRAP_MPI_TRUE CONDUITS HAVE_FI_HMEM_ZE_FALSE HAVE_FI_HMEM_ZE_TRUE HAVE_FI_HMEM_ROCR_FALSE HAVE_FI_HMEM_ROCR_TRUE HAVE_FI_HMEM_CUDA_FALSE HAVE_FI_HMEM_CUDA_TRUE USE_OFI_CONDUIT_FALSE USE_OFI_CONDUIT_TRUE OFI_LIBS OFI_LDFLAGS OFI_CFLAGS GASNET_OFI_SPAWNER_CONF OFI_guess_prog USE_IBV_CONDUIT_FALSE USE_IBV_CONDUIT_TRUE IBV_SEQ_THREADS_FALSE IBV_SEQ_THREADS_TRUE IBV_LIBS IBV_LDFLAGS IBV_CFLAGS GASNET_IBV_SPAWNER_CONF FH_CFLAGS IBV_guess_prog USE_UCX_CONDUIT_FALSE USE_UCX_CONDUIT_TRUE UCX_LIBS UCX_LDFLAGS UCX_CFLAGS GASNET_UCX_SPAWNER_CONF UCX_guess_prog USE_SMP_CONDUIT_FALSE USE_SMP_CONDUIT_TRUE SMP_LIBS GASNET_SMP_SPAWNER_CONF USE_MPI_FALSE USE_MPI_TRUE USE_MPI_COMPAT_FALSE USE_MPI_COMPAT_TRUE USE_AMMPI_FALSE USE_AMMPI_TRUE USE_MPI_CONDUIT_FALSE USE_MPI_CONDUIT_TRUE MPIRUN_CMD MPI_LIBS MPI_CFLAGS MPI_CC gasnet_cv__gfp_fullprogname_MPIRUN_CMD DEVWARN_MPI_CFLAGS MPI_CC_SUBFAMILY MPI_CC_FAMILY gasnet_cv__gfp_fullprogname_MPI_CC USE_UDP_CONDUIT_FALSE USE_UDP_CONDUIT_TRUE GASNET_UDP_LIBS HAVE_CXX_FALSE HAVE_CXX_TRUE MISC_CXXFLAGS cxxLDFLAGS cxxLIBS DEVWARN_CXXFLAGS GASNET_OPT_CXXFLAGS CXX_SUBFAMILY CXX_FAMILY gasnet_cv__gfp_fullprogname_CXX gasnet_cv__gfp_fullprogname_CXXCPP CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CONDUIT_MODE_FALSE CONDUIT_MODE_TRUE TOOLSONLY_MODE_FALSE TOOLSONLY_MODE_TRUE USE_PSHM_FALSE USE_PSHM_TRUE GASNET_PSHM_LIBS GASNET_PSHM_LDFLAGS GASNET_PSHM_CFLAGS GASNET_PSHM_ENABLED HUGETLBFS_guess_prog PTHREADS HAVE_PTHREAD_FALSE HAVE_PTHREAD_TRUE BUILD_PARSYNC_LIBS_FALSE BUILD_PARSYNC_LIBS_TRUE BUILD_PAR_LIBS_FALSE BUILD_PAR_LIBS_TRUE BUILD_SEQ_LIBS_FALSE BUILD_SEQ_LIBS_TRUE HAVE_EXESUFFIX_FALSE HAVE_EXESUFFIX_TRUE EXESUFFIX GASNET_PLATFORM GASNET_THREAD_LIBS GASNET_THREAD_DEFINES LIBM SIZEOF_FLOAT__COMPLEX SIZEOF_LONG_DOUBLE SIZEOF__BOOL SIZEOF_DOUBLE SIZEOF_FLOAT INTTYPES_DEFINES COMPLETE_SYS_TYPES_H HAVE_SYS_TYPES_H COMPLETE_INTTYPES_H HAVE_INTTYPES_H COMPLETE_STDINT_H HAVE_STDINT_H PLATFORM_ILP64_FALSE PLATFORM_ILP64_TRUE PLATFORM_LP64_FALSE PLATFORM_LP64_TRUE PLATFORM_ILP32_FALSE PLATFORM_ILP32_TRUE SIZEOF_PTRDIFF_T SIZEOF_SIZE_T SIZEOF_LONG_LONG SIZEOF_LONG SIZEOF_INT SIZEOF_SHORT SIZEOF_CHAR LIBGCC GASNET_SEGMENT_EVERYTHING_FALSE GASNET_SEGMENT_EVERYTHING_TRUE GASNET_SEGMENT_LARGE_FALSE GASNET_SEGMENT_LARGE_TRUE GASNET_SEGMENT_FAST_FALSE GASNET_SEGMENT_FAST_TRUE KEEPTMP_CFLAGS BUILDCONFIG_DEBUGMALLOC_FALSE BUILDCONFIG_DEBUGMALLOC_TRUE BUILDCONFIG_SRCLINES_FALSE BUILDCONFIG_SRCLINES_TRUE BUILDCONFIG_STATS_FALSE BUILDCONFIG_STATS_TRUE BUILDCONFIG_TRACE_FALSE BUILDCONFIG_TRACE_TRUE BUILDCONFIG_DEBUG_VERBOSE_FALSE BUILDCONFIG_DEBUG_VERBOSE_TRUE GASNET_OPT_CFLAGS MISC_CPPFLAGS MISC_CFLAGS GASNET_EXTRA_DEFINES DEVWARN_CFLAGS VALGRIND_FALSE VALGRIND_TRUE BUILDCONFIG_DEBUG_FALSE BUILDCONFIG_DEBUG_TRUE SEPARATE_CC GASNETI_PTR_BITS SIZEOF_VOID_P EGREP GREP CC_SUBFAMILY CC_FAMILY have_mpcc_r LN_S CROSS_COMPILING CROSS_COMPILING_FALSE CROSS_COMPILING_TRUE gasnet_cv__gfp_fullprogname_CC gasnet_cv__gfp_fullprogname_CPP ENVCMD CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC GMAKE GASNET_PERL_LANG GASNET_PERL_BYTESFLAG PERL NEED_DOCDIR_FALSE NEED_DOCDIR_TRUE ALWAYS_FALSECOND_FALSE ALWAYS_FALSECOND_TRUE ALWAYS_TRUECOND_FALSE ALWAYS_TRUECOND_TRUE BUILD_ID SYSTEM_TUPLE SYSTEM_NAME BUILD_IS_SRC BUILD_IS_SRC_FALSE BUILD_IS_SRC_TRUE TOP_BUILDDIR TOP_SRCDIR PWD_PROG CONFIGURE_ARGS AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='PERLSTART MPIRUN_COMMON' ac_user_opts=' enable_option_checking enable_cross_compile with_cc with_cflags with_cpp with_cppflags with_ldflags with_libs with_perl with_cxx with_cxxcpp with_cxxflags enable_pthreads enable_conservative_local_copy enable_full_path_expansion enable_allow_libcpp enable_allow_gcc32 enable_allow_gcc4 enable_ultrasparc_probe enable_ppc64_probe enable_debug enable_valgrind enable_dev_warnings enable_gasnet_verbose enable_trace enable_stats enable_srclines enable_debug_malloc enable_rpath enable_segment_fast enable_segment_large enable_segment_everything enable_seq enable_par enable_parsync with_max_pthreads_per_node enable_rwlock enable_tls enable_threadinfo_opt with_cache_line_bytes enable_hugetlbfs with_hugetlbfs_home with_hugetlbfs_cflags with_hugetlbfs_libs with_hugetlbfs_ldflags enable_hugetlbfs_rpath enable_pshm enable_pshm_posix enable_pshm_sysv enable_pshm_xpmem enable_pshm_hugetlbfs enable_pshm_file enable_large_pshm enable_aligned_segments enable_arch_sgi_ip27 enable_pdeathsig enable_fork enable_loopback_memsync enable_throttle_poll with_maxeps enable_force_generic_atomicops enable_force_os_atomicops enable_force_compiler_atomicops enable_force_native_timers enable_force_gettimeofday enable_force_posix_realtime enable_force_yield_membars enable_force_slow_membars enable_force_true_weakatomics enable_force_generic_semaphores enable_auto_conduit_detect with_cxxlibs with_cxxldflags enable_udp with_gasnet_cspawn_cmd enable_mpi_compat enable_mpi with_mpi_cc with_mpi_cflags with_mpi_libs with_mpirun_cmd enable_smp with_smp_spawner enable_ucx with_ucx_home with_ucx_cflags with_ucx_libs with_ucx_ldflags enable_ucx_rpath with_ucx_max_medium with_ucx_spawner enable_ibv with_ibv_home with_ibv_cflags with_ibv_libs with_ibv_ldflags enable_ibv_rpath with_fh_cflags enable_ibv_atomics enable_ibv_rcv_thread enable_ibv_snd_thread enable_ibv_conn_thread with_ibv_spawner with_ibv_max_hcas enable_ibv_multirail with_ibv_fenced_puts with_ibv_ports with_ibv_physmem_max enable_ibv_physmem_probe enable_ibv_srq enable_ibv_xrc enable_ibv_odp enable_ibv_serialize_poll_cq with_ibv_max_medium enable_ofi with_ofi_home with_ofi_cflags with_ofi_libs with_ofi_ldflags enable_ofi_rpath with_ofi_spawner with_ofi_provider enable_ofi_thread_domain enable_ofi_multi_cq enable_ofi_retry_recvmsg enable_ofi_mr_virt_addr enable_ofi_mr_prov_key enable_ofi_mr_scalable enable_ofi_av_map with_ofi_num_completions with_ofi_max_medium with_ssh_cmd with_ssh_options with_ssh_nodefile with_ssh_out_degree enable_pmi with_pmi_version with_pmi_home with_pmi_ldflags enable_pmi_rpath with_pmi_libs enable_pmi2_fast_barrier with_pmirun_cmd enable_backtrace enable_backtrace_execinfo enable_backtrace_gdb enable_backtrace_gstack enable_backtrace_pstack enable_backtrace_pgdbg enable_backtrace_idb enable_backtrace_dbx enable_backtrace_lldb enable_backtrace_printstack enable_memory_kinds enable_kind_cuda_uva with_cuda_home with_cuda_cflags with_cuda_libs with_cuda_ldflags enable_cuda_rpath enable_kind_hip with_hip_home with_hip_cflags with_hip_libs with_hip_ldflags enable_hip_rpath enable_kind_ze with_ze_home with_ze_cflags with_ze_libs with_ze_ldflags enable_ze_rpath enable_plpa enable_hwloc with_hwloc_home with_hwloc_cflags with_hwloc_libs with_hwloc_ldflags enable_hwloc_rpath enable_hwloc_utils with_hwloc_utils_home enable_mmap enable_bug3480_workaround with_host_detect with_max_segsize enable_system_debug_malloc with_tool_prefix ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=./config.cache exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features and Packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --enable-cross-compile Enable cross-compilation --with-cc= CC setting --with-cflags= CFLAGS setting --with-cpp= CPP setting --with-cppflags= CPPFLAGS setting --with-ldflags= LDFLAGS setting --with-libs= LIBS setting --with-perl= PERL setting --with-cxx= CXX setting --with-cxxcpp= CXXCPP setting --with-cxxflags= CXXFLAGS setting --(en|dis)able-pthreads enable use of pthreads (required to support pthreaded GASNet clients) --enable-conservative-local-copy enable use of conservative (slower) mechanism for local data movement (default is no) --disable-full-path-expansion Disable expansion of program names to full pathnames --enable-allow-libcpp Allow the use of /lib/cpp for preprocessing --enable-allow-gcc32 Allow the use of the known broken gcc/g++ 3.2.0-2 compiler --enable-allow-gcc4 Allow the use of a broken gcc/g++ 4.0-4.2 compiler --disable-ultrasparc-probe Disable probe for UltraSPARC compiler options --disable-ppc64-probe Disable probe for PPC64 compiler options --enable-debug Build GASNet in a debugging mode --enable-valgrind Build a valgrind-friendly library, disabling some optimizations. Implies --disable-debug-malloc --(en|dis)able-dev-warnings Build GASNet with developer compiler warnings for the library and tests (default: yes) --enable-gasnet-verbose Build GASNet lib with debugging status messages --(en|dis)able-trace Build GASNet with tracing enabled (enabled by default with --enable-debug) --(en|dis)able-stats Build GASNet with statistical collection enabled (enabled by default with --enable-debug) --enable-srclines Build GASNet with srclines support (enabled by default with --enable-trace) --(en|dis)able-debug-malloc Build GASNet with debugging malloc implementation enabled (enabled by default with --enable-debug) --enable-rpath Build GASNet libraries using RPATH for dependent libraries (disabled by default) --enable-segment-fast Build GASNet in the FAST shared segment configuration --enable-segment-large Build GASNet in the LARGE shared segment configuration --enable-segment-everything Build GASNet in the EVERYTHING shared segment configuration --(en|dis)able-seq support SEQ-mode single-threaded GASNet clients --(en|dis)able-par support PAR-mode pthreaded GASNet clients --(en|dis)able-parsync support PARSYNC-mode pthreaded GASNet clients --with-max-pthreads-per-node= Set max pthreads supported per GASNet node --(en|dis)able-rwlock Enable/disable use of pthread_rwlock_t (auto-detected) --(en|dis)able-tls Enable/disable use of thread-local storage extensions (ie __thread) (auto-detected) --(en|dis)able-threadinfo-opt Enable/disable threadinfo passing optimization (default is system dependent) --with-cache-line-bytes= CACHE_LINE_BYTES setting: shared data cache line width --(en|dis)able-hugetlbfs Enable/disable huegtlbfs support (default is system dependent) --with-hugetlbfs-home= HUGETLBFS_HOME setting: Install prefix of hugetlbfs (auto-detected from PATH) --with-hugetlbfs-cflags= HUGETLBFS_CFLAGS setting --with-hugetlbfs-libs= HUGETLBFS_LIBS setting --with-hugetlbfs-ldflags= HUGETLBFS_LDFLAGS setting --(en|dis)able-hugetlbfs-rpath Use RPATH in default HUGETLBFS_LDFLAGS if appropriate (enabled by default with --enable-rpath) --(en|dis)able-pshm Enable/disable inter-process shared memory support (default is system dependent) --(en|dis)able-pshm-posix Enable/disable use of POSIX shm_open() for inter-process shared memory support (default is system dependent) --(en|dis)able-pshm-sysv Enable use of SysV shmat() for inter-process shared memory support (default is system dependent) --enable-pshm-xpmem Enable use of XPMEM for inter-process shared memory support (default disabled) --(en|dis)able-pshm-hugetlbfs Enable use of hugetlbfs for inter-process shared memory support (default is system dependent) --enable-pshm-file Enable use of mmap()ed temporary files for inter-process shared memory support (default disabled) --enable-large-pshm Enable PSHM support for upto 45k cores per node (default is 255 cores) --enable-aligned-segments Force alignment for GASNet-allocated segment base address. Incompatible with PSHM, heterogeneous clusters and OS address randomization --(en|dis)able-arch-sgi-ip27 Enable/disable work-around for buggy SGI IP27 platforms (Onyx2, Origin200 and Origin2000) (disabled) --disable-pdeathsig Support use of Linux-specific prctl(PR_SET_PDEATHSIG) (default is to probe) --(en|dis)able-fork Allow internal use of fork() and related calls (default is to probe at configure time) --enable-loopback-memsync Force memory barriers for GASNet local (loopback) puts and gets --enable-throttle-poll throttle polling threads in multi-threaded configurations to reduce contention (experimental, only implemented in some conduits) --with-maxeps= Maximum number of endpoints per-process, subject to per-conduit limits (default is conduit-dependent) --enable-force-generic-atomicops Force mutex-based atomic ops (default is platform specific) --enable-force-os-atomicops Force os-provided atomic ops (default is platform specific) --enable-force-compiler-atomicops Force compiler-provided atomic ops (default is platform specific) --enable-force-native-timers Force use of "native" timers (default is platform-specific) --enable-force-gettimeofday Force use of gettimeofday() for timers (default is platform-specific) --enable-force-posix-realtime Force use of clock_gettime() for timers (default is platform-specific) --enable-force-yield-membars Force a sched_yield() call in memory barriers (disabled by default) --enable-force-slow-membars Force function call based (non-inline) memory barriers (disabled by default) --enable-force-true-weakatomics Force use of real atomic operations in sequential code (disabled by default) --enable-force-generic-semaphores Force mutex-based semaphores (default is platform specific) --disable-auto-conduit-detect Enable/disable automatic detection of supported network conduits (enabled by default) --with-cxxlibs= cxxLIBS setting: Libraries to add when linking C++ code --with-cxxldflags= cxxLDFLAGS setting: Linker flags to add when linking C++ code udp-conduit options: (Portable UDP/IP conduit (udp)) --(en|dis)able-udp Enable/disable the Portable UDP/IP conduit (udp) (auto-detected) --with-gasnet-cspawn-cmd= GASNET_CSPAWN_CMD setting: See udp-conduit/README MPI compatibility options: --(en|dis)able-mpi-compat Enable/disable MPI compatibility in all conduits (auto-detected) mpi-conduit options: (Portable MPI conduit (mpi)) --(en|dis)able-mpi Enable/disable the Portable MPI conduit (mpi) (auto-detected) --with-mpi-cc= MPI_CC setting: The MPI C compiler wrapper --with-mpi-cflags= MPI_CFLAGS setting: Flags to add when compiling MPI C code (overrides auto-detected default) --with-mpi-libs= MPI_LIBS setting: Libraries to add to the MPI link line --with-mpirun-cmd= MPIRUN_CMD setting: Command template for running MPI programs, see mpi-conduit/README for syntax smp-conduit options: (Portable SMP-loopback conduit (smp)) --(en|dis)able-smp Enable/disable the Portable SMP-loopback conduit (smp) (auto-detected) --with-smp-spawner= smp job spawner ("fork", "ssh", "mpi" or "pmi", default is fork) ucx-conduit options: (Unified Communication X conduit (ucx)) **EXPERIMENTAL** --(en|dis)able-ucx Enable/disable the Unified Communication X conduit (ucx) --with-ucx-home= UCX_HOME setting: Install prefix of UCX library (auto-detected from PATH) --with-ucx-cflags= UCX_CFLAGS setting --with-ucx-libs= UCX_LIBS setting --with-ucx-ldflags= UCX_LDFLAGS setting --(en|dis)able-ucx-rpath Use RPATH in default UCX_LDFLAGS if appropriate (enabled by default with --enable-rpath) --with-ucx-max-medium= Specify gex_LUB*Medium() for ucx-conduit (default $ucx_max_med_dflt) --with-ucx-spawner= ucx job spawner ("ssh", "mpi" or "pmi", default is mpi when available) ibv-conduit options: (InfiniBand IB Verbs conduit (ibv)) --(en|dis)able-ibv Enable/disable the InfiniBand IB Verbs conduit (ibv) (auto-detected) --with-ibv-home= IBV_HOME setting: Install prefix of IB Verbs library (auto-detected from PATH) --with-ibv-cflags= IBV_CFLAGS setting --with-ibv-libs= IBV_LIBS setting --with-ibv-ldflags= IBV_LDFLAGS setting --(en|dis)able-ibv-rpath Use RPATH in default IBV_LDFLAGS if appropriate (enabled by default with --enable-rpath) --with-fh-cflags= FH_CFLAGS setting: C flags for building the Firehose memory registration library --disable-ibv-atomics Disable atomics offload support in ibv-conduit (enabled by default in FAST segment mode) --(en|dis)able-ibv-rcv-thread See ibv-conduit/README (enabled by default if pthreads available) --(en|dis)able-ibv-snd-thread See ibv-conduit/README (enabled by default if pthreads available) --(en|dis)able-ibv-conn-thread See ibv-conduit/README (enabled by default if pthreads available) --with-ibv-spawner= ibv job spawner ("ssh", "mpi" or "pmi", default is mpi when available) --with-ibv-max-hcas= Maximum number of IBV HCAs to open (default is 1) --(en|dis)able-ibv-multirail Enable IBV over multiple HCAs. Use of --with-ibv-max-hcas=N is prefered (see ibv-conduit/README for more info). --with-ibv-fenced-puts= Default value of GASNET_USE_FENCED_PUTS environment variable for ibv-conduit (default is 0) --with-ibv-ports= Default value of GASNET_IBV_PORTS environment variable (default is empty) --with-ibv-physmem-max= Maximum physical memory IBV may pin: less than 1.0 is fraction of apparent physical memory, larger than 1 is absolute size with optional M, G and T suffix (default is "2/3") --(en|dis)able-ibv-physmem-probe Force default enable/disable of GASNET_PHYSMEM_PROBE in ibv-conduit --disable-ibv-srq Disable Shared Receive Queue (SRQ) support in ibv-conduit (enabled by default) --(en|dis)able-ibv-xrc Enable/disable eXtended Reliable Connection (XRC) support in ibv-conduit (default is to probe) --(en|dis)able-ibv-odp Enable/disable On Demand Paging (ODP) support in ibv-conduit (default is to probe) --disable-ibv-serialize-poll-cq Disable serialization of CQ polling in ibv-conduit (enabled by default) --with-ibv-max-medium= Specify gasnet_AMMaxMedium() for ibv-conduit (default 65536) ofi-conduit options: (OpenFabrics Interfaces conduit (ofi)) --(en|dis)able-ofi Enable/disable the OpenFabrics Interfaces conduit (ofi) (auto-detected) --with-ofi-home= OFI_HOME setting: Install prefix of OFI libfabric (auto-detected from PATH) --with-ofi-cflags= OFI_CFLAGS setting --with-ofi-libs= OFI_LIBS setting --with-ofi-ldflags= OFI_LDFLAGS setting --(en|dis)able-ofi-rpath Use RPATH in default OFI_LDFLAGS if appropriate (enabled by default with --enable-rpath) --with-ofi-spawner= ofi job spawner ("ssh", "mpi" or "pmi", default is mpi when available) --with-ofi-provider= Statically configure ofi-conduit for the given provider --(en|dis)able-ofi-thread-domain Indicates if the conduit should use the FI_THREAD_DOMAIN threading model(advanced users only) --(en|dis)able-ofi-multi-cq Indicates if the conduit should use multiple CQs (advanced users only) --(en|dis)able-ofi-retry-recvmsg Indicates if the conduit should allow for retry of fi_recvmsg calls (advanced users only) --(en|dis)able-ofi-mr-virt-addr Indicates if the conduit should statically compile FI_MR_VIRT_ADDR support into ofi-conduit (advanced users only) --(en|dis)able-ofi-mr-prov-key Indicates if the conduit should statically compile FI_MR_PROV_KEY support into ofi-conduit (advanced users only) --(en|dis)able-ofi-mr-scalable DEPRECATED --enable-ofi-av-map Include conduit support for FI_AV_MAP, excluding FI_AV_TABLE (advanced users only) --disable-ofi-av-map Include conduit support for FI_AV_TABLE, excluding FI_AV_MAP (advanced users only) --with-ofi-num-completions= Max number of completions for ofi-conduit to read from a CQ at one time (default 64) --with-ofi-max-medium= gasnet_AMMaxMedium() for the ofi-conduit (default 8192) Job spawner options: --with-ssh-cmd= default value for GASNET_SSH_CMD environment variable (default "ssh") --with-ssh-options= default value for GASNET_SSH_OPTIONS environment variable (defaults to empty) --with-ssh-nodefile= default value for GASNET_SSH_NODEFILE environment variable (defaults to empty - no fixed filename) --with-ssh-out-degree= default value for GASNET_SSH_OUT_DEGREE environment variable (defaults to 32) --(en|dis)able-pmi Enable/disable PMI support for job spawning --with-pmi-version= PMI version (x, 1, 2 or cray) --with-pmi-home= PMI_HOME setting: Install prefix of PMI library --with-pmi-ldflags= PMI_LDFLAGS setting --(en|dis)able-pmi-rpath Use RPATH in default PMI_LDFLAGS if appropriate (enabled by default with --enable-rpath) --with-pmi-libs= PMI_LIBS setting --enable-pmi2-fast-barrier Use PMI2_KVS_fence as barrier. This may not work with all PMI2 implementations --with-pmirun-cmd= PMIRUN_CMD setting: Command template for running PMI programs, see other/pmi-spawner/README Backtrace options: --(en|dis)able-backtrace support backtrace, via any mechanism (auto-detected) --(en|dis)able-backtrace-execinfo support backtrace via execinfo.h (auto-detected) --(en|dis)able-backtrace-gdb support backtrace via gdb (auto-detected) --(en|dis)able-backtrace-gstack support backtrace via gstack (auto-detected) --(en|dis)able-backtrace-pstack support backtrace via pstack (auto-detected) --(en|dis)able-backtrace-pgdbg support backtrace via pgdbg (auto-detected) --(en|dis)able-backtrace-idb support backtrace via idb (auto-detected) --(en|dis)able-backtrace-dbx support backtrace via dbx (auto-detected) --(en|dis)able-backtrace-lldb support backtrace via lldb (auto-detected) --(en|dis)able-backtrace-printstack support backtrace via printstack (auto-detected) Memory-kinds options: --enable-memory-kinds Support for memory kinds (transfers to/from device memory). Enables default auto-detection of all device type applicable to the target platform. However, the individual --enable-kind-* options have precedence. Use of --enable-memory-kinds=force makes failure to detect at least one supported kind fatal. --(en|dis)able-kind-cuda-uva Support for memory kinds on UVA-capable CUDA devices (auto-detected with --enable-memory-kinds, otherwise disabled) --with-cuda-home= CUDA_HOME setting: Install prefix of CUDA toolkit (auto-detected from PATH) --with-cuda-cflags= CUDA_CFLAGS setting --with-cuda-libs= CUDA_LIBS setting --with-cuda-ldflags= CUDA_LDFLAGS setting --(en|dis)able-cuda-rpath Use RPATH in default CUDA_LDFLAGS if appropriate (enabled by default with --enable-rpath) --(en|dis)able-kind-hip support for memory kinds on HIP-compatible devices (auto-detected with --enable-memory-kinds, otherwise disabled) --with-hip-home= HIP_HOME setting: Install prefix of HIP developer tools (auto-detected from PATH) --with-hip-cflags= HIP_CFLAGS setting --with-hip-libs= HIP_LIBS setting --with-hip-ldflags= HIP_LDFLAGS setting --(en|dis)able-hip-rpath Use RPATH in default HIP_LDFLAGS if appropriate (enabled by default with --enable-rpath) --(en|dis)able-kind-ze Support for memory kinds on devices via oneAPI Level Zero (auto-detected with --enable-memory-kinds, otherwise disabled) --with-ze-home= ZE_HOME setting: Install prefix of oneAPI Level Zero (auto-detected from PATH) --with-ze-cflags= ZE_CFLAGS setting --with-ze-libs= ZE_LIBS setting --with-ze-ldflags= ZE_LDFLAGS setting --(en|dis)able-ze-rpath Use RPATH in default ZE_LDFLAGS if appropriate (enabled by default with --enable-rpath) Misc options: --(en|dis)able-plpa use PLPA for CPU binding (default is to probe) --(en|dis)able-hwloc hwloc library (auto-detected) --with-hwloc-home= HWLOC_HOME setting: Install prefix of hwloc (auto-detected from PATH) --with-hwloc-cflags= HWLOC_CFLAGS setting --with-hwloc-libs= HWLOC_LIBS setting --with-hwloc-ldflags= HWLOC_LDFLAGS setting --(en|dis)able-hwloc-rpath Use RPATH in default HWLOC_LDFLAGS if appropriate (enabled by default with --enable-rpath) --(en|dis)able-hwloc-utils hwloc utilities (auto-detected) --with-hwloc-utils-home= HWLOC_UTILS_HOME setting: Install prefix of hwloc command-line utilities (auto-detected from PATH) --(en|dis)able-mmap force the use or non-use of mmap (default to probe) --enable-bug3480-workaround See smp-conduit README --with-host-detect= Default value for GASNET_HOST_DETECT (default is system and network dependent) --with-max-segsize= Upper bound for GASNet segment utilization. Can be absolute size or fraction of physmem. Suffix denotes per-process or per-host limit (ex: "2GB/P", "0.85/H") --(en|dis)able-system-debug-malloc enable use of system-specific debugging malloc if available (default is system dependent) --with-tool-prefix= Naming prefix to use for contributed tools Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . GASNet home page: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF GASNet configure 2025.8.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------------ ## ## Report this to https://gasnet-bugs.lbl.gov ## ## ------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GASNet $as_me 2025.8.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # vvvvvvvvvvvvvvvvvvvvvv GASNET_FIX_SHELL vvvvvvvvvvvvvvvvvvvvvv (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good shell" >&5 $as_echo_n "checking for good shell... " >&6; } if test "$BASH" = '' && test `uname` = HP-UX; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, switching to bash" >&5 $as_echo "no, switching to bash" >&6; } case $# in 0) exec bash - "$0" ;; *) exec bash - "$0" "$@" ;; esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FIX_SHELL ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ac_aux_dir= for ac_dir in config-aux "$srcdir"/config-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config-aux \"$srcdir\"/config-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null enable_silent_rules=no; case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=GASNet VERSION=2025.8.0 # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers gasnet_config.h" # vvvvvvvvvvvvvvvvvvvvvv GASNET_DISPLAY_VERSION() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for package version" >&5 $as_echo_n "checking for package version... " >&6; } display_version_info="" display_version_info="$display_version_info GASNet" display_version_info="$display_version_info 2025.8.0" if test -d "$srcdir/.git" ; then if test -f "$srcdir/.gasnet_toolsonly_mode"; then git_describe=`( cd "$srcdir" && ${GIT=git} describe --long --always ) 2> /dev/null` else git_describe=`( cd "$srcdir" && ${GIT=git} describe --long --dirty --always ) 2> /dev/null` fi if test -n "$git_describe"; then display_version_info="$display_version_info ($git_describe)" fi fi display_version_info="$display_version_info https://gasnet.lbl.gov" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $display_version_info" >&5 $as_echo "$display_version_info" >&6; } # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_DISPLAY_VERSION() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for configure arguments" >&5 $as_echo_n "checking for configure arguments... " >&6; } if ${gasnet_cv_configure_args+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_configure_args="$_gasneti_raw_args" fi CONFIGURE_ARGS="$gasnet_cv_configure_args" { $as_echo "$as_me:${as_lineno-$LINENO}: result: configure args: $CONFIGURE_ARGS" >&5 $as_echo " configure args: $CONFIGURE_ARGS" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_CROSS_COMPILE vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if user enabled cross-compile" >&5 $as_echo_n "checking if user enabled cross-compile... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(cross-compile,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-cross-compile was given. if test "${enable_cross_compile+set}" = set; then : enableval=$enable_cross_compile; fi case "$enable_cross_compile" in '' | no) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CROSS_COMPILING=0 ;; *) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CROSS_COMPILING=1 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(cross-compile,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_CROSS_COMPILE ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SET_CROSS_COMPILE vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$CROSS_COMPILING" = 0; then cross_compiling=no ac_cv_prog_cc_cross=no ac_cv_prog_cxx_cross=no else cross_compiling=yes ac_cv_prog_cc_cross=yes ac_cv_prog_cxx_cross=yes fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SET_CROSS_COMPILE ^^^^^^^^^^^^^^^^^^^^^^ (L:2) gasnet_fn_env_helper() { gasnet_envh_upper=$1 shift gasnet_envh_norm=$1 shift for ac_opt in "$@"; do case "$ac_opt" in with:${gasnet_envh_norm}=* | ${gasnet_envh_norm}=*) ac_optarg=`expr "$ac_opt" : '[^=]*=\(.*\)'` eval gasnet_cv_envvar_${gasnet_envh_upper}=\$ac_optarg eval envval_src_${gasnet_envh_upper}=given ;; with:${gasnet_envh_norm}) eval gasnet_cv_envvar_${gasnet_envh_upper}=\$envval_default_${gasnet_envh_upper} eval envval_src_${gasnet_envh_upper}=default ;; without:${gasnet_envh_norm}) eval gasnet_cv_envvar_${gasnet_envh_upper}="" eval envval_src_${gasnet_envh_upper}=disabled ;; esac done } # normalize configure arguments gasnet_fn_env_argnorm() { gasnet_cv_configure_args_norm= for ac_opt in "$@"; do # For command-line args VAR is case-insensitive and dash/underscore insensitive ac_norm=`echo "$ac_opt" | $AWK '{gsub("^--?with-","with:");gsub("^--?without-","without:");gsub("^--?",":");gsub("[-_]",""); print tolower($0)}'` case "$ac_norm" in :*) : ;; # discard irrelevant arguments *=*) # opts with argument ac_norm=`expr "X$ac_norm" : 'X\([^=]*\)='` ac_optarg=`expr "X$ac_opt" : '[^=]*=\(.*\)$'` gasnet_cv_configure_args_norm="$gasnet_cv_configure_args_norm '$ac_norm=$ac_optarg'" ;; *) # bare opts, no argument gasnet_cv_configure_args_norm="$gasnet_cv_configure_args_norm '$ac_norm'" ;; esac done # echo $cv_prefix[]configure_args_norm } if test "${gasnet_cv_configure_args_norm+set}" = ""; then eval gasnet_fn_env_argnorm $gasnet_cv_configure_args fi # normalize environment varnames and convert to a form we can read back in # currently we assume values do not contain newlines and truncate there cat config.env | $AWK '{ line=$0; if (match(line,"^[A-Za-z0-9_]+=")) { var=substr(line,1,RLENGTH-1); var=tolower(var); gsub("[-_]","",var); val=substr(line,RLENGTH+1); gsub("\047","\047\042\047\042\047",val); if (env[var] && env[var] != val) conf[var]=1; env[var]=val; } } END { for (var in env) { if (conf[var]) printf("_gasneti_cenv_%s=\047%s\047\n",var,env[var]); else printf("_gasneti_nenv_%s=\047%s\047\n",var,env[var]); } }' > config.env2 . ./config.env2 rm -f config.env config.env2 # vvvvvvvvvvvvvvvvvvvvvv GASNET_START_CONFIGURE(,CXX CXXCPP CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_RESTORE_AUTOCONF_ENV(CC CXX CFLAGS CXXFLAGS CPPFLAGS LIBS MAKE GMAKE AR AS RANLIB PERL SUM LEX YACC ) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$gasnet_acenv_list" != ""; then echo echo "configure error: _GASNET_RESTORE_AUTOCONF_ENV called more than once with prefix = \"gasnet_cv_\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi gasnet_acenv_list="CC CXX CFLAGS CXXFLAGS CPPFLAGS LIBS MAKE GMAKE AR AS RANLIB PERL SUM LEX YACC " { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cached autoconf environment settings" >&5 $as_echo_n "checking for cached autoconf environment settings... " >&6; } _gasnet_restoreenv_tmp= for varname in CC CXX CFLAGS CXXFLAGS CPPFLAGS LIBS MAKE GMAKE AR AS RANLIB PERL SUM LEX YACC ; do val=`eval echo '$'"gasnet_cv_acenv_$varname"` if test "$val" != ""; then eval $varname=\"$val\" _gasnet_restoreenv_tmp="$_gasnet_restoreenv_tmp $varname=\"$val\"" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_gasnet_restoreenv_tmp" >&5 $as_echo "$_gasnet_restoreenv_tmp" >&6; } # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_RESTORE_AUTOCONF_ENV(CC CXX CFLAGS CXXFLAGS CPPFLAGS LIBS MAKE GMAKE AR AS RANLIB PERL SUM LEX YACC ) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPULATE_AUTOCONF_ENV([CC CFLAGS CPP CPPFLAGS LDFLAGS LIBS PERL CXX CXXCPP CXXFLAGS]) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CC]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-cc was given. if test "${with_cc+set}" = set; then : withval=$with_cc; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CC setting" >&5 $as_echo_n "checking for CC setting... " >&6; } envval_src_CC="cached" if ${gasnet_cv_envvar_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test "1" = "1" ; then # no default means unset envval_default_CC="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CC="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cc+set}" = "set" ; then gasnet_cv_envvar_CC="${_gasneti_nenv_cc}" envval_src_CC=given elif test "${_gasneti_cenv_cc+set}" = "set" ; then gasnet_cv_envvar_CC="${_gasneti_cenv_cc}" envval_src_CC=conf else gasnet_cv_envvar_CC=$envval_default_CC envval_src_CC=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CC cc $gasnet_cv_configure_args_norm fi CC="$gasnet_cv_envvar_CC" if test "$CC" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CC if test "$envval_src_CC" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CC" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CC\"" >&5 $as_echo " \"$CC\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CC\"" >&5 $as_echo " (default) \"$CC\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CC\"" >&5 $as_echo " (disabled) \"$CC\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CC\"" >&5 $as_echo " (provided) \"$CC\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CC\"" >&5 $as_echo " (provided) \"$CC\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CC. Please configure --with-CC=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CC]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CFLAGS]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-cflags was given. if test "${with_cflags+set}" = set; then : withval=$with_cflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS setting" >&5 $as_echo_n "checking for CFLAGS setting... " >&6; } envval_src_CFLAGS="cached" if ${gasnet_cv_envvar_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "1" = "1" ; then # no default means unset envval_default_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CFLAGS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cflags+set}" = "set" ; then gasnet_cv_envvar_CFLAGS="${_gasneti_nenv_cflags}" envval_src_CFLAGS=given elif test "${_gasneti_cenv_cflags+set}" = "set" ; then gasnet_cv_envvar_CFLAGS="${_gasneti_cenv_cflags}" envval_src_CFLAGS=conf else gasnet_cv_envvar_CFLAGS=$envval_default_CFLAGS envval_src_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CFLAGS cflags $gasnet_cv_configure_args_norm fi CFLAGS="$gasnet_cv_envvar_CFLAGS" if test "$CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CFLAGS if test "$envval_src_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CFLAGS\"" >&5 $as_echo " \"$CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CFLAGS\"" >&5 $as_echo " (default) \"$CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CFLAGS\"" >&5 $as_echo " (disabled) \"$CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CFLAGS\"" >&5 $as_echo " (provided) \"$CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CFLAGS\"" >&5 $as_echo " (provided) \"$CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CFLAGS. Please configure --with-CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CFLAGS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CPP]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-cpp was given. if test "${with_cpp+set}" = set; then : withval=$with_cpp; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPP setting" >&5 $as_echo_n "checking for CPP setting... " >&6; } envval_src_CPP="cached" if ${gasnet_cv_envvar_CPP+:} false; then : $as_echo_n "(cached) " >&6 else if test "1" = "1" ; then # no default means unset envval_default_CPP="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CPP="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cpp+set}" = "set" ; then gasnet_cv_envvar_CPP="${_gasneti_nenv_cpp}" envval_src_CPP=given elif test "${_gasneti_cenv_cpp+set}" = "set" ; then gasnet_cv_envvar_CPP="${_gasneti_cenv_cpp}" envval_src_CPP=conf else gasnet_cv_envvar_CPP=$envval_default_CPP envval_src_CPP=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CPP cpp $gasnet_cv_configure_args_norm fi CPP="$gasnet_cv_envvar_CPP" if test "$CPP" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CPP if test "$envval_src_CPP" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CPP" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CPP\"" >&5 $as_echo " \"$CPP\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CPP\"" >&5 $as_echo " (default) \"$CPP\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CPP\"" >&5 $as_echo " (disabled) \"$CPP\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CPP\"" >&5 $as_echo " (provided) \"$CPP\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CPP\"" >&5 $as_echo " (provided) \"$CPP\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CPP. Please configure --with-CPP=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CPP]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CPPFLAGS]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-cppflags was given. if test "${with_cppflags+set}" = set; then : withval=$with_cppflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPPFLAGS setting" >&5 $as_echo_n "checking for CPPFLAGS setting... " >&6; } envval_src_CPPFLAGS="cached" if ${gasnet_cv_envvar_CPPFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "1" = "1" ; then # no default means unset envval_default_CPPFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CPPFLAGS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cppflags+set}" = "set" ; then gasnet_cv_envvar_CPPFLAGS="${_gasneti_nenv_cppflags}" envval_src_CPPFLAGS=given elif test "${_gasneti_cenv_cppflags+set}" = "set" ; then gasnet_cv_envvar_CPPFLAGS="${_gasneti_cenv_cppflags}" envval_src_CPPFLAGS=conf else gasnet_cv_envvar_CPPFLAGS=$envval_default_CPPFLAGS envval_src_CPPFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CPPFLAGS cppflags $gasnet_cv_configure_args_norm fi CPPFLAGS="$gasnet_cv_envvar_CPPFLAGS" if test "$CPPFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CPPFLAGS if test "$envval_src_CPPFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CPPFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CPPFLAGS\"" >&5 $as_echo " \"$CPPFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CPPFLAGS\"" >&5 $as_echo " (default) \"$CPPFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CPPFLAGS\"" >&5 $as_echo " (disabled) \"$CPPFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CPPFLAGS\"" >&5 $as_echo " (provided) \"$CPPFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CPPFLAGS\"" >&5 $as_echo " (provided) \"$CPPFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CPPFLAGS. Please configure --with-CPPFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CPPFLAGS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([LDFLAGS]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-ldflags was given. if test "${with_ldflags+set}" = set; then : withval=$with_ldflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDFLAGS setting" >&5 $as_echo_n "checking for LDFLAGS setting... " >&6; } envval_src_LDFLAGS="cached" if ${gasnet_cv_envvar_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "1" = "1" ; then # no default means unset envval_default_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_LDFLAGS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ldflags+set}" = "set" ; then gasnet_cv_envvar_LDFLAGS="${_gasneti_nenv_ldflags}" envval_src_LDFLAGS=given elif test "${_gasneti_cenv_ldflags+set}" = "set" ; then gasnet_cv_envvar_LDFLAGS="${_gasneti_cenv_ldflags}" envval_src_LDFLAGS=conf else gasnet_cv_envvar_LDFLAGS=$envval_default_LDFLAGS envval_src_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper LDFLAGS ldflags $gasnet_cv_configure_args_norm fi LDFLAGS="$gasnet_cv_envvar_LDFLAGS" if test "$LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset LDFLAGS if test "$envval_src_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$LDFLAGS\"" >&5 $as_echo " \"$LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$LDFLAGS\"" >&5 $as_echo " (default) \"$LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$LDFLAGS\"" >&5 $as_echo " (disabled) \"$LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$LDFLAGS\"" >&5 $as_echo " (provided) \"$LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$LDFLAGS\"" >&5 $as_echo " (provided) \"$LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$LDFLAGS. Please configure --with-LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([LDFLAGS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-libs was given. if test "${with_libs+set}" = set; then : withval=$with_libs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBS setting" >&5 $as_echo_n "checking for LIBS setting... " >&6; } envval_src_LIBS="cached" if ${gasnet_cv_envvar_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "1" = "1" ; then # no default means unset envval_default_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_LIBS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_libs+set}" = "set" ; then gasnet_cv_envvar_LIBS="${_gasneti_nenv_libs}" envval_src_LIBS=given elif test "${_gasneti_cenv_libs+set}" = "set" ; then gasnet_cv_envvar_LIBS="${_gasneti_cenv_libs}" envval_src_LIBS=conf else gasnet_cv_envvar_LIBS=$envval_default_LIBS envval_src_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper LIBS libs $gasnet_cv_configure_args_norm fi LIBS="$gasnet_cv_envvar_LIBS" if test "$LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset LIBS if test "$envval_src_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$LIBS\"" >&5 $as_echo " \"$LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$LIBS\"" >&5 $as_echo " (default) \"$LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$LIBS\"" >&5 $as_echo " (disabled) \"$LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$LIBS\"" >&5 $as_echo " (provided) \"$LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$LIBS\"" >&5 $as_echo " (provided) \"$LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$LIBS. Please configure --with-LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([PERL]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-perl was given. if test "${with_perl+set}" = set; then : withval=$with_perl; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL setting" >&5 $as_echo_n "checking for PERL setting... " >&6; } envval_src_PERL="cached" if ${gasnet_cv_envvar_PERL+:} false; then : $as_echo_n "(cached) " >&6 else if test "1" = "1" ; then # no default means unset envval_default_PERL="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_PERL="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_perl+set}" = "set" ; then gasnet_cv_envvar_PERL="${_gasneti_nenv_perl}" envval_src_PERL=given elif test "${_gasneti_cenv_perl+set}" = "set" ; then gasnet_cv_envvar_PERL="${_gasneti_cenv_perl}" envval_src_PERL=conf else gasnet_cv_envvar_PERL=$envval_default_PERL envval_src_PERL=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper PERL perl $gasnet_cv_configure_args_norm fi PERL="$gasnet_cv_envvar_PERL" if test "$PERL" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset PERL if test "$envval_src_PERL" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_PERL" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PERL\"" >&5 $as_echo " \"$PERL\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$PERL\"" >&5 $as_echo " (default) \"$PERL\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$PERL\"" >&5 $as_echo " (disabled) \"$PERL\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$PERL\"" >&5 $as_echo " (provided) \"$PERL\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$PERL\"" >&5 $as_echo " (provided) \"$PERL\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$PERL. Please configure --with-PERL=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([PERL]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CXX]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-cxx was given. if test "${with_cxx+set}" = set; then : withval=$with_cxx; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CXX setting" >&5 $as_echo_n "checking for CXX setting... " >&6; } envval_src_CXX="cached" if ${gasnet_cv_envvar_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test "1" = "1" ; then # no default means unset envval_default_CXX="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CXX="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cxx+set}" = "set" ; then gasnet_cv_envvar_CXX="${_gasneti_nenv_cxx}" envval_src_CXX=given elif test "${_gasneti_cenv_cxx+set}" = "set" ; then gasnet_cv_envvar_CXX="${_gasneti_cenv_cxx}" envval_src_CXX=conf else gasnet_cv_envvar_CXX=$envval_default_CXX envval_src_CXX=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CXX cxx $gasnet_cv_configure_args_norm fi CXX="$gasnet_cv_envvar_CXX" if test "$CXX" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CXX if test "$envval_src_CXX" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CXX" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CXX\"" >&5 $as_echo " \"$CXX\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CXX\"" >&5 $as_echo " (default) \"$CXX\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CXX\"" >&5 $as_echo " (disabled) \"$CXX\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CXX\"" >&5 $as_echo " (provided) \"$CXX\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CXX\"" >&5 $as_echo " (provided) \"$CXX\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CXX. Please configure --with-CXX=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CXX]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CXXCPP]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-cxxcpp was given. if test "${with_cxxcpp+set}" = set; then : withval=$with_cxxcpp; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CXXCPP setting" >&5 $as_echo_n "checking for CXXCPP setting... " >&6; } envval_src_CXXCPP="cached" if ${gasnet_cv_envvar_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else if test "1" = "1" ; then # no default means unset envval_default_CXXCPP="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CXXCPP="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cxxcpp+set}" = "set" ; then gasnet_cv_envvar_CXXCPP="${_gasneti_nenv_cxxcpp}" envval_src_CXXCPP=given elif test "${_gasneti_cenv_cxxcpp+set}" = "set" ; then gasnet_cv_envvar_CXXCPP="${_gasneti_cenv_cxxcpp}" envval_src_CXXCPP=conf else gasnet_cv_envvar_CXXCPP=$envval_default_CXXCPP envval_src_CXXCPP=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CXXCPP cxxcpp $gasnet_cv_configure_args_norm fi CXXCPP="$gasnet_cv_envvar_CXXCPP" if test "$CXXCPP" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CXXCPP if test "$envval_src_CXXCPP" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CXXCPP" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CXXCPP\"" >&5 $as_echo " \"$CXXCPP\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CXXCPP\"" >&5 $as_echo " (default) \"$CXXCPP\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CXXCPP\"" >&5 $as_echo " (disabled) \"$CXXCPP\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CXXCPP\"" >&5 $as_echo " (provided) \"$CXXCPP\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CXXCPP\"" >&5 $as_echo " (provided) \"$CXXCPP\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CXXCPP. Please configure --with-CXXCPP=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CXXCPP]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CXXFLAGS]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-cxxflags was given. if test "${with_cxxflags+set}" = set; then : withval=$with_cxxflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CXXFLAGS setting" >&5 $as_echo_n "checking for CXXFLAGS setting... " >&6; } envval_src_CXXFLAGS="cached" if ${gasnet_cv_envvar_CXXFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "1" = "1" ; then # no default means unset envval_default_CXXFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CXXFLAGS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cxxflags+set}" = "set" ; then gasnet_cv_envvar_CXXFLAGS="${_gasneti_nenv_cxxflags}" envval_src_CXXFLAGS=given elif test "${_gasneti_cenv_cxxflags+set}" = "set" ; then gasnet_cv_envvar_CXXFLAGS="${_gasneti_cenv_cxxflags}" envval_src_CXXFLAGS=conf else gasnet_cv_envvar_CXXFLAGS=$envval_default_CXXFLAGS envval_src_CXXFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CXXFLAGS cxxflags $gasnet_cv_configure_args_norm fi CXXFLAGS="$gasnet_cv_envvar_CXXFLAGS" if test "$CXXFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CXXFLAGS if test "$envval_src_CXXFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CXXFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CXXFLAGS\"" >&5 $as_echo " \"$CXXFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CXXFLAGS\"" >&5 $as_echo " (default) \"$CXXFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CXXFLAGS\"" >&5 $as_echo " (disabled) \"$CXXFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CXXFLAGS\"" >&5 $as_echo " (provided) \"$CXXFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CXXFLAGS\"" >&5 $as_echo " (provided) \"$CXXFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CXXFLAGS. Please configure --with-CXXFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CXXFLAGS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPULATE_AUTOCONF_ENV([CC CFLAGS CPP CPPFLAGS LDFLAGS LIBS PERL CXX CXXCPP CXXFLAGS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "${CFLAGS+set}" != "set" ; then # default CFLAGS to empty, overriding autoconf's default of "-g -O2" CFLAGS="" fi if test "${CXXFLAGS+set}" != "set" ; then # same for CXXFLAGS CXXFLAGS="" fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PATH_PROGS(PWD_PROG,pwd,pwd) vvvvvvvvvvvvvvvvvvvvvv (L:2) case "$PWD_PROG" in '') for ac_prog in pwd do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PWD_PROG+:} false; then : $as_echo_n "(cached) " >&6 else case $PWD_PROG in [\\/]* | ?:[\\/]*) ac_cv_path_PWD_PROG="$PWD_PROG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PWD_PROG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PWD_PROG=$ac_cv_path_PWD_PROG if test -n "$PWD_PROG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PWD_PROG" >&5 $as_echo "$PWD_PROG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PWD_PROG" && break done ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pwd" >&5 $as_echo_n "checking for pwd... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PWD_PROG" >&5 $as_echo "$PWD_PROG" >&6; } ;; esac case "$PWD_PROG" in '') as_fn_error $? "cannot find pwd" "$LINENO" 5 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PATH_PROGS(PWD_PROG,pwd,pwd) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test -z "$GASNET_CONFIGURE_WARNING_GLOBAL" ; then GASNET_CONFIGURE_WARNING_GLOBAL="`$PWD_PROG`/.gasnet_cv_configure_warnings.tmp" export GASNET_CONFIGURE_WARNING_GLOBAL fi rm -f ".gasnet_cv_configure_warnings.tmp" # vvvvvvvvvvvvvvvvvvvvvv GASNET_GET_AUTOCONF_VERSION vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking autoconf version" >&5 $as_echo_n "checking autoconf version... " >&6; } AUTOCONF_VERSION_STR='2.69' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOCONF_VERSION_STR" >&5 $as_echo "$AUTOCONF_VERSION_STR" >&6; } # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_GET_AUTOCONF_VERSION ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$cache_file" = "/dev/null" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure cache_file setting got lost - you may need to run a fresh ./Bootstrap" >&5 $as_echo "$as_me: WARNING: configure cache_file setting got lost - you may need to run a fresh ./Bootstrap" >&2;} echo "configure cache_file setting got lost - you may need to run a fresh ./Bootstrap" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cache_file=config.cache fi ac_configure_args="$ac_configure_args --cache-file=$cache_file" TOP_SRCDIR=`cd ${srcdir} && ${PWD_PROG}` { $as_echo "$as_me:${as_lineno-$LINENO}: result: TOP_SRCDIR: $TOP_SRCDIR" >&5 $as_echo "TOP_SRCDIR: $TOP_SRCDIR" >&6; } TOP_BUILDDIR=`${PWD_PROG}` { $as_echo "$as_me:${as_lineno-$LINENO}: result: TOP_BUILDDIR: $TOP_BUILDDIR" >&5 $as_echo "TOP_BUILDDIR: $TOP_BUILDDIR" >&6; } if `echo $TOP_SRCDIR | grep ' ' >/dev/null 2>/dev/null`; then as_fn_error $? "TOP_SRCDIR contains space characters - please unpack the source in a different directory." "$LINENO" 5 fi if `echo $TOP_BUILDDIR | grep ' ' >/dev/null 2>/dev/null`; then as_fn_error $? "TOP_BUILDDIR contains space characters - please build in a different directory." "$LINENO" 5 fi if test "$TOP_BUILDDIR" = "$TOP_SRCDIR"; then BUILD_IS_SRC_TRUE= BUILD_IS_SRC_FALSE='#' else BUILD_IS_SRC_TRUE='#' BUILD_IS_SRC_FALSE= fi if test "$TOP_BUILDDIR" = "$TOP_SRCDIR"; then BUILD_IS_SRC=yes else BUILD_IS_SRC=no fi # Handle prefix defaulting with subconfigures # When users pass --prefix on the command-line, this is automatically passed to subconfigures # and everything lives happily in the same tree # Without --prefix, different packages may default to different directories # (due to AC_PREFIX_DEFAULT), so ensure that all subconfigures # default to the same location (as determined by the outermost configure) if test "$prefix" = "NONE" -a -n "$ac_default_prefix" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_SUBCONFIGURE_ARG(--prefix="$ac_default_prefix") vvvvvvvvvvvvvvvvvvvvvv (L:2) ac_configure_args="$ac_configure_args --prefix="$ac_default_prefix"" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SUBCONFIGURE_ARG(--prefix="$ac_default_prefix") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi SYSTEM_NAME="`hostname`" case "$target" in # Apple gcc has -arch options for cross-compilation, but target binaries may still work due to Rosetta (making our cross-compilation support unnecessary) # ensure we report the correct target tuple *-apple-darwin*) _GASNET_GCCVER=`${CC:-gcc} -v 2>&1` _GASNET_GCCISAPPLE=`echo "$_GASNET_GCCVER" | grep 'gcc version' | grep 'Apple '` _GASNET_GCCTARGET=`echo "$_GASNET_GCCVER" | /usr/bin/perl -ne 'print \$1 if (m/--target=(\S+)/);'` _GASNET_GCCCPU=`echo "$_GASNET_GCCVER" | /usr/bin/perl -ne 'print \$1 if (m/--target=([^-]+)/);'` if test "$_GASNET_GCCISAPPLE" -a "$_GASNET_GCCTARGET" -a "$_GASNET_GCCCPU" ; then case "$target" in $_GASNET_GCCCPU-*) ;; *) # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Apple gcc is cross-compiling for $_GASNET_GCCTARGET, readjusting configure target" >&5 $as_echo "$as_me: WARNING: Apple gcc is cross-compiling for $_GASNET_GCCTARGET, readjusting configure target" >&2;} echo "Apple gcc is cross-compiling for $_GASNET_GCCTARGET, readjusting configure target" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) target="$_GASNET_GCCTARGET" target_alias="$target" ac_cv_target="$target" ac_cv_target_alias="$target" target_cpu="$_GASNET_GCCCPU" esac fi ;; esac SYSTEM_TUPLE="$target" { $as_echo "$as_me:${as_lineno-$LINENO}: result: system info: $SYSTEM_NAME $SYSTEM_TUPLE" >&5 $as_echo "system info: $SYSTEM_NAME $SYSTEM_TUPLE" >&6; } BUILD_USER=`whoami 2> /dev/null` if test $? -ne 0 || test -z "$BUILD_USER"; then BUILD_USER=`id -un 2> /dev/null` if test $? -ne 0 || test -z "$BUILD_USER"; then BUILD_USER="$USER" fi fi BUILD_ID="`date` $BUILD_USER" { $as_echo "$as_me:${as_lineno-$LINENO}: result: build id: $BUILD_ID" >&5 $as_echo "build id: $BUILD_ID" >&6; } # ensure exec_list doesn't grow continuously each time we reconfigure unset gasnet_cv_exec_list # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_START_CONFIGURE(,CXX CXXCPP CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_DEFINE_CONFIGURE_VARS vvvvvvvvvvvvvvvvvvvvvv (L:1) # backslash any double-quotes embedded in CONFIGURE_ARGS: scrub_CONFIGURE_ARGS=`echo $CONFIGURE_ARGS | sed -e 's/"/\\\\"/g;'` cat >>confdefs.h <<_ACEOF #define GASNETI_CONFIGURE_ARGS "$scrub_CONFIGURE_ARGS" _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETI_SYSTEM_NAME "$SYSTEM_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETI_SYSTEM_TUPLE "$SYSTEM_TUPLE" _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETI_BUILD_ID "$BUILD_ID" _ACEOF # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_DEFINE_CONFIGURE_VARS ^^^^^^^^^^^^^^^^^^^^^^ (L:1) gasnet_fn_split_linker_opts() { gasnet_lo_ldflags=$1 shift gasnet_lo_libs=$1 shift eval $gasnet_lo_ldflags= eval $gasnet_lo_libs= for ac_opt in "$@"; do case "$ac_opt" in -l* | -L*) gasnet_lo_append=$gasnet_lo_libs ;; *.so | *.a) gasnet_lo_append=$gasnet_lo_libs ;; *) gasnet_lo_append=$gasnet_lo_ldflags ;; esac case "$ac_opt" in *' '* | *'$'* | *'`'*) # quote args containing selected dangerous characters ac_opt_quot="'$ac_opt'" ;; *) ac_opt_quot="$ac_opt" ;; esac if eval test -z \"\$$gasnet_lo_append\" ; then # avoid extraneous spaces eval $gasnet_lo_append=\"\$ac_opt_quot\" else eval $gasnet_lo_append=\"\$$gasnet_lo_append \$ac_opt_quot\" fi done } # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([LDFLAGS],[LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:1) eval gasnet_fn_split_linker_opts LDFLAGS LIBS $LDFLAGS $LIBS #echo "LDFLAGS=[$]LDFLAGS" #echo "LIBS=[$]LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([LDFLAGS],[LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test -z ""; then ALWAYS_TRUECOND_TRUE= ALWAYS_TRUECOND_FALSE='#' else ALWAYS_TRUECOND_TRUE='#' ALWAYS_TRUECOND_FALSE= fi if test -n ""; then ALWAYS_FALSECOND_TRUE= ALWAYS_FALSECOND_FALSE='#' else ALWAYS_FALSECOND_TRUE='#' ALWAYS_FALSECOND_FALSE= fi # Wish to define docdir in Makefiles if-and-only-if autoconf does not. # If/when we raise the mimumin required version of autoconf to 2.60, # then we can remove this and all uses of NEED_DOCDIR. if test -z "$docdir"; then NEED_DOCDIR_TRUE= NEED_DOCDIR_FALSE='#' else NEED_DOCDIR_TRUE='#' NEED_DOCDIR_FALSE= fi # Set gasnet_toolsonly_mode based on how we Bootstrapped gasnet_toolsonly_mode=no cat >>confdefs.h <<_ACEOF #define GASNET_RELEASE_VERSION_MAJOR 2025 _ACEOF cat >>confdefs.h <<_ACEOF #define GASNET_RELEASE_VERSION_MINOR 8 _ACEOF cat >>confdefs.h <<_ACEOF #define GASNET_RELEASE_VERSION_PATCH 0 _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETI_EX_SPEC_VERSION_MAJOR 0 _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETI_EX_SPEC_VERSION_MINOR 19 _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETI_SPEC_VERSION_MAJOR 1 _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETI_SPEC_VERSION_MINOR 8 _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETI_TOOLS_SPEC_VERSION_MAJOR 1 _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETI_TOOLS_SPEC_VERSION_MINOR 20 _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETI_RELEASE_VERSION 2025.8.0 _ACEOF for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done ######################################################################## ## ## Misc configure option processing ## # default: support pthreads if library found # --enable-pthreads: fail if pthreads lib not found # --disable-pthreads: don't even look for pthreads library # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(pthreads,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-pthreads was given. if test "${enable_pthreads+set}" = set; then : enableval=$enable_pthreads; fi case "$enable_pthreads" in no) : use_pthreads="no" ;; yes) : use_pthreads="yes" ;; *) : use_pthreads="try" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(pthreads,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_FORBID_PROGRAM_TRANSFORM vvvvvvvvvvvvvvvvvvvvvv (L:1) #echo cross_compiling=$cross_compiling target_alias=$target_alias program_prefix=$program_prefix program_suffix=$program_suffix program_transform_name=$program_transform_name # undo prefix autoconf automatically adds during cross-compilation # don't test for cross_compile here as it might not yet be set correctly if test "$program_prefix" = "${target_alias}-" ; then program_prefix=NONE fi # normalize empty prefix/suffix if test -z "$program_prefix" ; then program_prefix=NONE fi if test -z "$program_suffix" ; then program_suffix=NONE fi # canonicalize transforms caused by empty prefix/suffix program_transform_name=`echo "$program_transform_name" | sed -e 's/; *$//;' | sed -e "s/${target_alias}-//"` if expr "$program_transform_name" : 's.^..$' >/dev/null || \ expr "$program_transform_name" : 's.$$..$' >/dev/null || \ expr "$program_transform_name" : 's.$$..;s.^..$' >/dev/null ; then program_transform_name="s,x,x," fi if test "$program_prefix$program_suffix$program_transform_name" != "NONENONEs,x,x," ; then echo echo "configure error: This configure script does not support --program-prefix, --program-suffix or --program-transform-name. Users are recommended to instead use --prefix with a unique directory and make symbolic links as desired for renaming." if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FORBID_PROGRAM_TRANSFORM ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # This is to support a very conservative implementation of # GASNETE_FAST_ALIGNED_MEMCPY and other type-punning operations. # It is to be enabled only to test if a given problem is related # to our type-punning issues (see bug 1389) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(conservative-local-copy,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-conservative-local-copy was given. if test "${enable_conservative_local_copy+set}" = set; then : enableval=$enable_conservative_local_copy; fi case "$enable_conservative_local_copy" in '' | no) : ;; *) : $as_echo "#define GASNETI_BUG1389_WORKAROUND 1" >>confdefs.h # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You passed --enable-conservative-local-copy This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >&5 $as_echo "$as_me: WARNING: ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You passed --enable-conservative-local-copy This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >&2;} echo " ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You passed --enable-conservative-local-copy This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(conservative-local-copy,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ######################################################################## ## ## Perl ## ## We do this early so we can use "$PERL -e" for complex configure tests. # vvvvvvvvvvvvvvvvvvvvvv GASNET_PROG_PERL vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PATH_PROGS(PERL,perl5 perl,perl) vvvvvvvvvvvvvvvvvvvvvv (L:2) case "$PERL" in '') for ac_prog in perl5 perl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PERL" && break done ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl" >&5 $as_echo_n "checking for perl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } ;; esac case "$PERL" in '') as_fn_error $? "cannot find perl" "$LINENO" 5 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PATH_PROGS(PERL,perl5 perl,perl) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) MIN_PERL_VERSION="5.005" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl version $MIN_PERL_VERSION or later" >&5 $as_echo_n "checking for perl version $MIN_PERL_VERSION or later... " >&6; } if $PERL -e "require $MIN_PERL_VERSION;" 2>/dev/null; then PERL_VERSION=`$PERL -e 'my $x="["; print (defined $^V ? $^V : $])'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: $PERL_VERSION" >&5 $as_echo "yes: $PERL_VERSION" >&6; } else as_fn_error $? "cannot find perl $MIN_PERL_VERSION or later" "$LINENO" 5 fi if $PERL -Mbytes -e "exit 0" 2>/dev/null; then GASNET_PERL_BYTESFLAG="-Mbytes" else GASNET_PERL_BYTESFLAG= fi if test -n "`env LC_ALL=en_US LANG=en_US $PERL -e 'exit 0' 2>&1 | grep locale`"; then GASNET_PERL_LANG=C else GASNET_PERL_LANG=en_US fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PROG_PERL ^^^^^^^^^^^^^^^^^^^^^^ (L:1) PERLSTART=$TOP_BUILDDIR/other/perlstart ######################################################################## ## ## Supporting Command-Line Tools ## # vvvvvvvvvvvvvvvvvvvvvv GASNET_PATH_PROGS(GMAKE,gmake make $MAKE,GNU make) vvvvvvvvvvvvvvvvvvvvvv (L:1) case "$GMAKE" in '') for ac_prog in gmake make $MAKE do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMAKE+:} false; then : $as_echo_n "(cached) " >&6 else case $GMAKE in [\\/]* | ?:[\\/]*) ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMAKE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GMAKE=$ac_cv_path_GMAKE if test -n "$GMAKE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5 $as_echo "$GMAKE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GMAKE" && break done ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 $as_echo_n "checking for GNU make... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5 $as_echo "$GMAKE" >&6; } ;; esac case "$GMAKE" in '') as_fn_error $? "cannot find GNU make" "$LINENO" 5 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PATH_PROGS(GMAKE,gmake make $MAKE,GNU make) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 $as_echo_n "checking for GNU make... " >&6; } GMAKE_VERSTR=`$GMAKE --version | grep GNU 2> /dev/null` if test "$GMAKE_VERSTR" = "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "cannot find a version of GNU make - please install GNU make and/or set \$GMAKE to indicate where it's located" "$LINENO" 5 else GMAKE_VER=`echo "$GMAKE_VERSTR" | $PERL -n -e 'if (/([0-9]+)\.([0-9]+)(\.[0-9]+)?/) { $maj=$1; $min=$2; $pat=$3; printf "%i%03i%03i",($maj,$min,($pat?$pat=~s/\.//:0)) }'` # Currently require 3.79 or newer if test $GMAKE_VER -lt 3079000 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "This software requires GNU make version 3.79 or newer, and you appear to be running: \"$GMAKE_VERSTR\" - please install GNU make and/or set \$GMAKE to indicate where it's located" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE_VERSTR" >&5 $as_echo "$GMAKE_VERSTR" >&6; } fi fi ######################################################################## ## ## C/C++ Compilers ## DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 $as_echo "${_am_result}" >&6; } enable_dependency_tracking=no; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_DISABLED(full-path-expansion,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-full-path-expansion was given. if test "${enable_full_path_expansion+set}" = set; then : enableval=$enable_full_path_expansion; fi case "$enable_full_path_expansion" in '' | yes) : ;; *) : gasnet_cv__gfp_disable=1 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_DISABLED(full-path-expansion,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PROG_CC vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PROG_CPP vvvvvvvvvvvvvvvvvvvvvv (L:2) ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # vvvvvvvvvvvvvvvvvvvvvv GASNET_GETFULLPATH(CPP) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$gasnet_cv__gfp_disable" = ""; then if echo "$CPP" | $AWK -F' ' '{if ($1 ~ /^(.*\/)?env$/) exit 0; else exit 1;}' >/dev/null; then for ac_prog in $ENVCMD env do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ENVCMD+:} false; then : $as_echo_n "(cached) " >&6 else case $ENVCMD in [\\/]* | ?:[\\/]*) ac_cv_path_ENVCMD="$ENVCMD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ENVCMD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ENVCMD=$ac_cv_path_ENVCMD if test -n "$ENVCMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENVCMD" >&5 $as_echo "$ENVCMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ENVCMD" && break done # assemble "ENVCMD key=val key=val " with a trailing space gasnet_gfp_progenv="$ENVCMD "`echo "$CPP" | $AWK -F' ' 'BEGIN { ORS=" "; } { for (i=2;i<=NF;i++) { if ($i ~ /=/) { print $i; } else break; } }'` # just the program name gasnet_gfp_progname=`echo "$CPP" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i<=NF;i++) { if ($i !~ /=/) { print $i; break; } } }'` # list of program arguments with no trailing space gasnet_gfp_progargs=`echo "$CPP" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_gasnet_cv__gfp_fullprogname_CPP+:} false; then : $as_echo_n "(cached) " >&6 else case $gasnet_cv__gfp_fullprogname_CPP in [\\/]* | ?:[\\/]*) ac_cv_path_gasnet_cv__gfp_fullprogname_CPP="$gasnet_cv__gfp_fullprogname_CPP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_gasnet_cv__gfp_fullprogname_CPP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi gasnet_cv__gfp_fullprogname_CPP=$ac_cv_path_gasnet_cv__gfp_fullprogname_CPP if test -n "$gasnet_cv__gfp_fullprogname_CPP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv__gfp_fullprogname_CPP" >&5 $as_echo "$gasnet_cv__gfp_fullprogname_CPP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$gasnet_cv__gfp_fullprogname_CPP" != "" ; then gasnet_gfp_progname="$gasnet_cv__gfp_fullprogname_CPP" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for full path expansion of CPP" >&5 $as_echo_n "checking for full path expansion of CPP... " >&6; } if test -n "$gasnet_gfp_progargs" ; then CPP="$gasnet_gfp_progenv$gasnet_gfp_progname $gasnet_gfp_progargs" else CPP="$gasnet_gfp_progenv$gasnet_gfp_progname" fi #echo "gasnet_gfp_progenv='$gasnet_gfp_progenv'" #echo "gasnet_gfp_progname='$gasnet_gfp_progname'" #echo "gasnet_gfp_progargs='$gasnet_gfp_progargs'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_GETFULLPATH(CPP) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C preprocessor" >&5 $as_echo_n "checking for working C preprocessor... " >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu gasnet_progcpp_extrainfo= if test -n "`$CPP -version 2>&1 < /dev/null | grep MIPSpro`" ; then gasnet_progcpp_extrainfo=" (added -diag_error 1035 to deal with broken MIPSPro preprocessor)" CFLAGS="$CFLAGS -diag_error 1035" CPPFLAGS="$CPPFLAGS -diag_error 1035" fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : echo echo "configure error: Your C preprocessor is broken - reported success when it should have failed" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi rm -f conftest.err conftest.i conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else echo echo "configure error: Your C preprocessor is broken - reported failure when it should have succeeded" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi rm -f conftest.err conftest.i conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus #error __cplusplus should not be defined in a C preprocessor! #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else echo echo "configure error: Your C preprocessor is broken, it erroneously defines __cplusplus. This software requires a true, working ANSI C compiler - a C++ compiler is not an acceptable replacement." if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes$gasnet_progcpp_extrainfo" >&5 $as_echo "yes$gasnet_progcpp_extrainfo" >&6; } if test "$CPP" = "/lib/cpp" ; then badlibcppmsg="Autoconf detected your preprocessor to be '/lib/cpp' instead of '$CC -E'. This is almost always a mistake, resulting from either a broken C compiler or an outdated version of autoconf. Proceeding is very likely to result in incorrect configure decisions." # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(allow-libcpp,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --enable-allow-libcpp was given. if test "${enable_allow_libcpp+set}" = set; then : enableval=$enable_allow_libcpp; fi case "$enable_allow_libcpp" in '' | no) : as_fn_error $? "$badlibcppmsg \ You may enable use of this preprocessor at your own risk by passing the --enable-allow-libcpp flag." "$LINENO" 5 ;; *) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $badlibcppmsg" >&5 $as_echo "$as_me: WARNING: $badlibcppmsg" >&2;} echo "$badlibcppmsg" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(allow-libcpp,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PROG_CPP ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_GETFULLPATH(CC) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$gasnet_cv__gfp_disable" = ""; then if echo "$CC" | $AWK -F' ' '{if ($1 ~ /^(.*\/)?env$/) exit 0; else exit 1;}' >/dev/null; then for ac_prog in $ENVCMD env do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ENVCMD+:} false; then : $as_echo_n "(cached) " >&6 else case $ENVCMD in [\\/]* | ?:[\\/]*) ac_cv_path_ENVCMD="$ENVCMD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ENVCMD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ENVCMD=$ac_cv_path_ENVCMD if test -n "$ENVCMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENVCMD" >&5 $as_echo "$ENVCMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ENVCMD" && break done # assemble "ENVCMD key=val key=val " with a trailing space gasnet_gfp_progenv="$ENVCMD "`echo "$CC" | $AWK -F' ' 'BEGIN { ORS=" "; } { for (i=2;i<=NF;i++) { if ($i ~ /=/) { print $i; } else break; } }'` # just the program name gasnet_gfp_progname=`echo "$CC" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i<=NF;i++) { if ($i !~ /=/) { print $i; break; } } }'` # list of program arguments with no trailing space gasnet_gfp_progargs=`echo "$CC" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_gasnet_cv__gfp_fullprogname_CC+:} false; then : $as_echo_n "(cached) " >&6 else case $gasnet_cv__gfp_fullprogname_CC in [\\/]* | ?:[\\/]*) ac_cv_path_gasnet_cv__gfp_fullprogname_CC="$gasnet_cv__gfp_fullprogname_CC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_gasnet_cv__gfp_fullprogname_CC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi gasnet_cv__gfp_fullprogname_CC=$ac_cv_path_gasnet_cv__gfp_fullprogname_CC if test -n "$gasnet_cv__gfp_fullprogname_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv__gfp_fullprogname_CC" >&5 $as_echo "$gasnet_cv__gfp_fullprogname_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$gasnet_cv__gfp_fullprogname_CC" != "" ; then gasnet_gfp_progname="$gasnet_cv__gfp_fullprogname_CC" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for full path expansion of CC" >&5 $as_echo_n "checking for full path expansion of CC... " >&6; } if test -n "$gasnet_gfp_progargs" ; then CC="$gasnet_gfp_progenv$gasnet_gfp_progname $gasnet_gfp_progargs" else CC="$gasnet_gfp_progenv$gasnet_gfp_progname" fi #echo "gasnet_gfp_progenv='$gasnet_gfp_progenv'" #echo "gasnet_gfp_progname='$gasnet_gfp_progname'" #echo "gasnet_gfp_progargs='$gasnet_gfp_progargs'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_GETFULLPATH(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C compiler" >&5 $as_echo_n "checking for working C compiler... " >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { fail for me ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo echo "configure error: Your C compiler is broken - reported success when it should have failed" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { printf("hi\n"); exit(0); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else echo echo "configure error: Your C compiler is broken - reported failure when it should have succeeded" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ double *p; void *foo(double *d) { return d; } int main () { double d; /* (void *) is compatible with any pointer type in a C program */ p = foo((void *)&d); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else echo echo "configure error: Your C compiler is broken, it fails to compile a simple C program using implicit void* conversion. This software requires a true, working ANSI C compiler - note that a C++ compiler is not an acceptable replacement." if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int some_bogus_nonexistent_symbol(); int main () { int x = some_bogus_nonexistent_symbol(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo echo "configure error: Your C linker is broken - reported success when it should have failed" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { printf("hi\n"); exit(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else echo echo "configure error: Your C link is broken - reported failure when it should have succeeded" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_SET_CROSS_COMPILE vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$CROSS_COMPILING" = 0; then cross_compiling=no ac_cv_prog_cc_cross=no ac_cv_prog_cxx_cross=no else cross_compiling=yes ac_cv_prog_cc_cross=yes ac_cv_prog_cxx_cross=yes fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SET_CROSS_COMPILE ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$cross_compiling" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking working C compiler executables" >&5 $as_echo_n "checking working C compiler executables... " >&6; } if test "$cross_compiling" = yes; then : echo echo "configure error: Internal configure error - please report" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void) { return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo echo "configure error: Cannot run executables created with C compiler. If you're attempting to cross-compile, use --enable-cross-compile" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi if test "$cross_compiling" = "yes"; then CROSS_COMPILING_TRUE= CROSS_COMPILING_FALSE='#' else CROSS_COMPILING_TRUE='#' CROSS_COMPILING_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PROG_CC ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test -n "$CFLAGS"; then # embed user-provided CFLAGS into CC for safe-keeping CC="$CC $CFLAGS" CFLAGS="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_BIGENDIAN() vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$cross_compiling" = "no" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_EXPR(whether byte ordering is bigendian ,c_bigendian,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian " >&5 $as_echo_n "checking whether byte ordering is bigendian ... " >&6; } if ${gasnet_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "confdefs.h" #include #include int main(void) { FILE *f=fopen("conftestval", "w"); int val = 0; if (!f) exit(1); { { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[sizeof (long)]; } u; u.l = 1; val = (u.c[sizeof (long) - 1] == 1); }; } fprintf(f, "%d\n", (int)(val)); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_c_bigendian=`cat conftestval` else gasnet_cv_c_bigendian=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_c_bigendian" >&5 $as_echo "$gasnet_cv_c_bigendian" >&6; } if test "$gasnet_cv_c_bigendian" != no; then : WORDS_BIGENDIAN=$gasnet_cv_c_bigendian fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_EXPR(whether byte ordering is bigendian ,c_bigendian,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian (binary probe) " >&5 $as_echo_n "checking whether byte ordering is bigendian (binary probe) ... " >&6; } WORDS_BIGENDIAN="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) cat >conftest.$ac_ext <>conftest.$ac_ext <<"EOF" int main(void) { foo(); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN # use perl here, because some greps barf on binary files (eg Solaris) if test `$PERL -ne 'if (m/BIGenDianSyS/) { print "yes\n"; }' $GASNET_EXAMINE_BIN` ; then WORDS_BIGENDIAN=1 fi if test `$PERL -ne 'if (m/LiTTleEnDian/) { print "yes\n"; }' $GASNET_EXAMINE_BIN` ; then if test -z "$WORDS_BIGENDIAN" ; then WORDS_BIGENDIAN=0 else WORDS_BIGENDIAN="" fi fi rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: error building endian probe" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test -z "$WORDS_BIGENDIAN" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) cat >conftest.$ac_ext <>conftest.$ac_ext <<"EOF" int main(void) { foo(); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) mv conftest$ac_exeext $GASNET_EXAMINE_BIN # use perl here, because some greps barf on binary files (eg Solaris) if test `$PERL -ne 'if (m/BIGenDianSyS/) { print "yes\n"; }' $GASNET_EXAMINE_BIN` ; then WORDS_BIGENDIAN=1 fi if test `$PERL -ne 'if (m/LiTTleEnDian/) { print "yes\n"; }' $GASNET_EXAMINE_BIN` ; then if test -z "$WORDS_BIGENDIAN" ; then WORDS_BIGENDIAN=0 else WORDS_BIGENDIAN="" fi fi rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: error building endian probe" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WORDS_BIGENDIAN" >&5 $as_echo "$WORDS_BIGENDIAN" >&6; } fi if test "$WORDS_BIGENDIAN" = "1"; then $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h elif test "$WORDS_BIGENDIAN" = ""; then echo echo "configure error: Inconsistent results from endian probe" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_BIGENDIAN() ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # Extract the first word of "mpcc_r", so it can be a program name with args. set dummy mpcc_r; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_have_mpcc_r+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$have_mpcc_r"; then ac_cv_prog_have_mpcc_r="$have_mpcc_r" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_have_mpcc_r="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_have_mpcc_r" && ac_cv_prog_have_mpcc_r="no" fi fi have_mpcc_r=$ac_cv_prog_have_mpcc_r if test -n "$have_mpcc_r"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mpcc_r" >&5 $as_echo "$have_mpcc_r" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ## specific compiler families # vvvvvvvvvvvvvvvvvvvvvv GASNET_FAMILY_CACHE_CHECK(C,CC,gasnet_cv_cc_family) vvvvvvvvvvvvvvvvvvvvvv (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler family" >&5 $as_echo_n "checking for C compiler family... " >&6; } if ${gasnet_cv_cc_family+:} false; then : $as_echo_n "(cached) " >&6 else if test "CC" != "CXX" ; then _GASNET_FAMILY_CACHE_CHECK_PREPROC="$CPP" else _GASNET_FAMILY_CACHE_CHECK_PREPROC="$CXXCPP" fi if test "`echo '$_GASNET_FAMILY_CACHE_CHECK_PREPROC' | grep '$C'`" = "" ; then # preprocessor may differ from true compiler, so force full compilation testing _force_compile=1 else _force_compile= fi gasnet_cv_cc_family=unknown if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__xlC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __xlC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=XLC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __xlC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=XLC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__xlC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__ibmxl__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __ibmxl__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=XLC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __ibmxl__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=XLC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__ibmxl__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(_CRAYC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _CRAYC # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=Cray fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _CRAYC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=Cray fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(_CRAYC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__GNUC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __GNUC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=GNU fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __GNUC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=GNU fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__GNUC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__clang__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __clang__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=Clang fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __clang__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=Clang fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__clang__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__PGI,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PGI # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=PGI fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PGI # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=PGI fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__PGI,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__NVCOMPILER,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCOMPILER # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=NVHPC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCOMPILER # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=NVHPC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__NVCOMPILER,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__INTEL_COMPILER,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __INTEL_COMPILER # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=Intel fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __INTEL_COMPILER # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=Intel fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__INTEL_COMPILER,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__OPENCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __OPENCC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=Open64 fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __OPENCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=Open64 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__OPENCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__PCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PCC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=PCC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=PCC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__PCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__PATHCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PATHCC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=Pathscale fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PATHCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=Pathscale fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__PATHCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__DECC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECC # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=Compaq fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=Compaq fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__DECC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # Compaq C # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__DECCXX,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECCXX # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=Compaq fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECCXX # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=Compaq fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__DECCXX,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # Compaq C++ fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__SUNPRO_C,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_C # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=Sun fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_C # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=Sun fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__SUNPRO_C,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # Sun C # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__SUNPRO_CC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_CC # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=Sun fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_CC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=Sun fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__SUNPRO_CC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # Sun C++ fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__HP_cc,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_cc # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=HP fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_cc # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=HP fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__HP_cc,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # HP C # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__HP_aCC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_aCC # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=HP fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_aCC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=HP fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__HP_aCC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # HP aCC (C++) fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(_SGI_COMPILER_VERSION,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SGI_COMPILER_VERSION # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=MIPS fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SGI_COMPILER_VERSION # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=MIPS fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(_SGI_COMPILER_VERSION,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__MTA__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __MTA__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=MTA fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __MTA__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=MTA fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__MTA__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__KCC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __KCC # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=KAI fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __KCC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=KAI fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__KCC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__TINYC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __TINYC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=TINY fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __TINYC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=TINY fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__TINYC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__LCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __LCC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=LCC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __LCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=LCC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__LCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$gasnet_cv_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(_SX,...,) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SX # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=NEC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SX # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=NEC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(_SX,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__sgi,...,) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __sgi # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_cc_family=MIPS fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __sgi # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_family=MIPS fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__sgi,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # MIPSPro 7.3.0 and earlier fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_family" >&5 $as_echo "$gasnet_cv_cc_family" >&6; } if test "$gasnet_cv_cc_family" != "GNU" ; then case CC in CC) ac_cv_c_compiler_gnu=no GCC="" ;; CXX) ac_cv_cxx_compiler_gnu=no GXX="" ;; esac fi case "$gasnet_cv_cc_family" in GNU) CC_SUBFAMILY='GNU' # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_STR(for gcc version string,CC_gcc_version_string,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc version string" >&5 $as_echo_n "checking for gcc version string... " >&6; } if ${gasnet_cv_CC_gcc_version_string+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_CC_gcc_version_string="" _extractstrembed='"$gasnetextractstr: (-(|" __VERSION__ "|)-) $"' # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_CC_gcc_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_CC_gcc_version_string" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_CC_gcc_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_CC_gcc_version_string" >&5 $as_echo "$gasnet_cv_CC_gcc_version_string" >&6; } if test -n "$gasnet_cv_CC_gcc_version_string" ; then _gasnet_CC_gcc_version_string=$gasnet_cv_CC_gcc_version_string fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_STR(for gcc version string,CC_gcc_version_string,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) case "$_gasnet_CC_gcc_version_string" in *gccfss*) CC_SUBFAMILY='GCCFSS';; *Advance-Toolchain*) CC_SUBFAMILY='IBM';; *) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__APPLE_CC__,...,) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : CC_SUBFAMILY='APPLE' fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : CC_SUBFAMILY='APPLE' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__APPLE_CC__,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__NVCC__,...,) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : CC_SUBFAMILY='NVIDIA' fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : CC_SUBFAMILY='NVIDIA' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__NVCC__,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; esac ;; Clang) CC_SUBFAMILY='LLVM' # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_STR(for clang version string,CC_clang_version_string,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang version string" >&5 $as_echo_n "checking for clang version string... " >&6; } if ${gasnet_cv_CC_clang_version_string+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_CC_clang_version_string="" _extractstrembed='"$gasnetextractstr: (-(|" __VERSION__ "|)-) $"' # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_CC_clang_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_CC_clang_version_string" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_CC_clang_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_CC_clang_version_string" >&5 $as_echo "$gasnet_cv_CC_clang_version_string" >&6; } if test -n "$gasnet_cv_CC_clang_version_string" ; then _gasnet_CC_clang_version_string=$gasnet_cv_CC_clang_version_string fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_STR(for clang version string,CC_clang_version_string,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) case "$_gasnet_CC_clang_version_string" in *Apple*) CC_SUBFAMILY='APPLE';; *Cray*) CC_SUBFAMILY='CRAY';; *AMD*) CC_SUBFAMILY='AMD';; *Arm*) CC_SUBFAMILY='ARM';; *Intel*) CC_SUBFAMILY='INTEL';; esac ;; *) CC_SUBFAMILY='none' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler sub-family" >&5 $as_echo_n "checking for C compiler sub-family... " >&6; } # real "checking" was done above { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_SUBFAMILY" >&5 $as_echo "$CC_SUBFAMILY" >&6; } CC_FAMILY=$gasnet_cv_cc_family # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FAMILY_CACHE_CHECK(C,CC,gasnet_cv_cc_family) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ## compiler family early initialization gcc_flag_prefix='' case "$CC_FAMILY" in GNU) # vvvvvvvvvvvvvvvvvvvvvv GASNET_GCC_VERSION_CHECK(CC) vvvvvvvvvvvvvvvvvvvvvv (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for known buggy compilers" >&5 $as_echo_n "checking for known buggy compilers... " >&6; } badgccmsg="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if __GNUC__ == 3 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ <= 2 # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: CC is gcc 3.2.0-2" >&5 $as_echo "CC is gcc 3.2.0-2" >&6; } badgccmsg="Use of gcc/g++ 3.2.0-2 for compiling this software is strongly discouraged. \ This version has a serious known bug in the optimizer regarding structure copying, \ which may lead to bad code and incorrect runtime behavior when optimization is enabled. \ Consider using \$CC to select a different compiler." # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(allow-gcc32,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-allow-gcc32 was given. if test "${enable_allow_gcc32+set}" = set; then : enableval=$enable_allow_gcc32; fi case "$enable_allow_gcc32" in '' | no) : as_fn_error $? "$badgccmsg \ You may enable use of this broken compiler at your own risk by passing the --enable-allow-gcc32 flag." "$LINENO" 5 ;; *) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $badgccmsg" >&5 $as_echo "$as_me: WARNING: $badgccmsg" >&2;} echo "$badgccmsg" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(allow-gcc32,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if __GNUC__ == 4 && __GNUC_MINOR__ < 3 # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: CC is gcc 4.x, for x < 3" >&5 $as_echo "CC is gcc 4.x, for x < 3" >&6; } badgccmsg="Use of gcc/g++ 4.0, 4.1 or 4.2 for compiling this software is strongly discouraged. \ These versions have a known bug in the optimizer regarding aliasing analysis which may lead \ to bad code and incorrect runtime behavior when optimization is enabled. \ Consider using \$CC to select a different compiler." # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(allow-gcc4,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-allow-gcc4 was given. if test "${enable_allow_gcc4+set}" = set; then : enableval=$enable_allow_gcc4; fi case "$enable_allow_gcc4" in '' | no) : as_fn_error $? "$badgccmsg \ You may enable use of this broken compiler at your own risk by passing the --enable-allow-gcc4 flag.\ If you do so, please see the documentation on --enable-conservative-local-copy for a possible \ work around for the gcc-4.x bug." "$LINENO" 5 ;; *) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $badgccmsg" >&5 $as_echo "$as_me: WARNING: $badgccmsg" >&2;} echo "$badgccmsg" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(allow-gcc4,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test -z "$badgccmsg"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_GCC_VERSION_CHECK(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) gcc_flag_delim=' ' case "$CC_SUBFAMILY" in GCCFSS) $as_echo "#define GASNETI_GCC_GCCFSS 1" >>confdefs.h ;; APPLE) $as_echo "#define GASNETI_GCC_APPLE 1" >>confdefs.h ;; NVIDIA) gcc_flag_prefix='-Xcompiler ' gcc_flag_delim=',' ;; esac ;; PGI) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PGI_VERSION_CHECK(CC) vvvvvvvvvvvvvvvvvvvvvv (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for known buggy compilers" >&5 $as_echo_n "checking for known buggy compilers... " >&6; } badpgimsg="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if ((10000 * __PGIC__) + (100 * __PGIC_MINOR__) + __PGIC_PATCHLEVEL__) < 70205 # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: CC is PGI prior to 7.2-5" >&5 $as_echo "CC is PGI prior to 7.2-5" >&6; } badpgimsg="Use of PGI compilers older than 7.2-5 is not supported. Consider using \$CC to select a different compiler." fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test -n "$badpgimsg"; then as_fn_error $? "$badpgimsg" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PGI_VERSION_CHECK(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; Pathscale) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PATHSCALE_VERSION_CHECK(CC) vvvvvvvvvvvvvvvvvvvvvv (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for known buggy compilers" >&5 $as_echo_n "checking for known buggy compilers... " >&6; } badpathscalemsg="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if (__PATHCC__ < 3) # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: CC is PathScale prior to 3.0" >&5 $as_echo "CC is PathScale prior to 3.0" >&6; } badpathscalemsg="Use of PathScale compilers older than 3.0 is not supported. Consider using \$CC to select a different compiler." fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test -n "$badpathscalemsg"; then as_fn_error $? "$badpathscalemsg" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PATHSCALE_VERSION_CHECK(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; esac if test "$cross_compiling" = "yes" ; then $as_echo "#define GASNETI_CROSS_COMPILING 1" >>confdefs.h fi ## discover bit width { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(void *,) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$cross_compiling" = "yes" ; then SIZEOF_VOID_P= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(void *) (binary probe),SIZEOF_VOID_P,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(void *) (binary probe)" >&5 $as_echo_n "checking sizeof(void *) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_VOID_P+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_VOID_P="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(void *))>0?(sizeof(void *)):-(sizeof(void *))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(void *))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_VOID_P=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(void *)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_SIZEOF_VOID_P" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(void *))>0?(sizeof(void *)):-(sizeof(void *))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(void *))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_VOID_P=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(void *)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_VOID_P" >&5 $as_echo "$gasnet_cv_SIZEOF_VOID_P" >&6; } if test -n "$gasnet_cv_SIZEOF_VOID_P" ; then SIZEOF_VOID_P=$gasnet_cv_SIZEOF_VOID_P fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(void *) (binary probe),SIZEOF_VOID_P,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test -z "$SIZEOF_VOID_P" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_VOID_P,SIZEOF_VOID_P,) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_VOID_P],[]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_VOID_P setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_VOID_P setting... " >&6; } envval_src_CROSS_SIZEOF_VOID_P="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_VOID_P+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_VOID_P="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_VOID_P="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeofvoidp+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_VOID_P="${_gasneti_nenv_crosssizeofvoidp}" envval_src_CROSS_SIZEOF_VOID_P=given elif test "${_gasneti_cenv_crosssizeofvoidp+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_VOID_P="${_gasneti_cenv_crosssizeofvoidp}" envval_src_CROSS_SIZEOF_VOID_P=conf else gasnet_cv_envvar_CROSS_SIZEOF_VOID_P=$envval_default_CROSS_SIZEOF_VOID_P envval_src_CROSS_SIZEOF_VOID_P=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_VOID_P crosssizeofvoidp $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_VOID_P="$gasnet_cv_envvar_CROSS_SIZEOF_VOID_P" if test "$CROSS_SIZEOF_VOID_P" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_VOID_P if test "$envval_src_CROSS_SIZEOF_VOID_P" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_VOID_P" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_VOID_P\"" >&5 $as_echo " \"$CROSS_SIZEOF_VOID_P\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_VOID_P\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_VOID_P\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_VOID_P\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_VOID_P\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_VOID_P\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_VOID_P\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_VOID_P\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_VOID_P\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_VOID_P. Please configure --with-CROSS_SIZEOF_VOID_P=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_VOID_P],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$CROSS_SIZEOF_VOID_P" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_VOID_P be set for cross-compilation" "$LINENO" 5 else SIZEOF_VOID_P="$CROSS_SIZEOF_VOID_P" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_VOID_P,SIZEOF_VOID_P,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi ac_cv_sizeof_void_p=$SIZEOF_VOID_P fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_void_p,"$ac_cv_sizeof_void_p") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_ac_cv_sizeof_void_p" = "" ; then _pushcnt_ac_cv_sizeof_void_p=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_void_p+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_void_p_$_pushcnt_ac_cv_sizeof_void_p=\$ac_cv_sizeof_void_p eval _pushedvarset_ac_cv_sizeof_void_p_$_pushcnt_ac_cv_sizeof_void_p=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_void_p=`expr $_pushcnt_ac_cv_sizeof_void_p + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_void_p="$ac_cv_sizeof_void_p" echo "pushed new ac_cv_sizeof_void_p value: $ac_cv_sizeof_void_p" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_void_p,"$ac_cv_sizeof_void_p") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$ac_cv_sizeof_void_p" = "" ; then unset ac_cv_sizeof_void_p unset ac_cv_type_void_p fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } if ${ac_cv_sizeof_void_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : else if test "$ac_cv_type_void_p" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 $as_echo "$ac_cv_sizeof_void_p" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF gasnet_checksizeoftmp_sizeof_void_p="$ac_cv_sizeof_void_p" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_void_p) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_ac_cv_sizeof_void_p" -ge "1"; then _pushcnt_ac_cv_sizeof_void_p=`expr $_pushcnt_ac_cv_sizeof_void_p - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_void_p_$_pushcnt_ac_cv_sizeof_void_p if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_void_p=\$_pushedvar_ac_cv_sizeof_void_p_$_pushcnt_ac_cv_sizeof_void_p echo "popping ac_cv_sizeof_void_p back to: $ac_cv_sizeof_void_p" >&5 else unset ac_cv_sizeof_void_p echo "popping ac_cv_sizeof_void_p back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_void_p" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_void_p) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ac_cv_sizeof_void_p=$gasnet_checksizeoftmp_sizeof_void_p SIZEOF_VOID_P=$gasnet_checksizeoftmp_sizeof_void_p if test "$SIZEOF_VOID_P" = "0" -o "$SIZEOF_VOID_P" = "" -o "$ac_cv_sizeof_void_p" != "$SIZEOF_VOID_P"; then echo echo "configure error: failed to find sizeof(void *)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_VOID_P_indirect=SIZEOF_VOID_P cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_VOID_P_indirect $SIZEOF_VOID_P _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(void *,) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) GASNETI_PTR_BITS=`expr $SIZEOF_VOID_P \* 8` ### # Allow user forced ARCH and/or ISA settings w/o the corresponding probes # XXX: Incomplete... case "$enable_force_arch" in '' | no) : ;; *) : case "$enable_force_arch" in generic|ibmpe|wsl|crayex) : # OK ;; yes|'') as_fn_error $? "Missing required argument to --enable-force-arch" "$LINENO" 5 ;; *) as_fn_error $? "Unknown --enable-force-arch argument '$enable_force_arch'" "$LINENO" 5 ;; esac ;; esac ## # Look for a Cray-provided header allowing for the possibility we are not using Cray's wrapper compiler # There are two distinct "success" cases: # 1) The header is found w/o any extra CPPFLAGS # 2) The system is a Cray and the header is found only when the env var named by the 2nd arg is appended to CPPFLAGS # The includes_var passed is intended for use with CRAY_* variables defined only by Cray-provided standard modules, # and hence does NOT use GASNET_ENV_DEFAULT or generate --help output : these variables should NEVER be manually set # by an end-user, although they might be implicitly changed by switching loaded modules. # GASNET_CHECK_CRAY_HEADER(header, includes_var [, action-on-success-1] [, action-on-success-2] [, action-on-failure]) ### # # choose the default CC flags # NOTE: we intentionally *overwrite* CFLAGS with reasonable, well-tested values, # to avoid picking up bad default flags from AC_PROG_CC or the default user environment # Users who want to insert a specific compiler flag for all builds should append it to $CC DEVWARN_CFLAGS_OPT= case "$CC_FAMILY" in GNU) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"-O3") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="-O3" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"-O3") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # prefer the --param inliner option(s), which give us finer control # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns-single=35000) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns-single=35000") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns-single=35000" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns-single=35000") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns-single=35000" >&5 $as_echo_n "checking for C compiler flag ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns-single=35000... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns-single=35000" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000" >&5 $as_echo_n "checking for C compiler flag ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${gcc_flag_prefix}-finline-limit=10000) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}-finline-limit=10000") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${gcc_flag_prefix}-finline-limit=10000" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}-finline-limit=10000") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${gcc_flag_prefix}-finline-limit=10000" >&5 $as_echo_n "checking for C compiler flag ${gcc_flag_prefix}-finline-limit=10000... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${gcc_flag_prefix}-finline-limit=10000" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${gcc_flag_prefix}-finline-limit=10000" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${gcc_flag_prefix}-finline-limit=10000) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns-single=35000" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000" >&5 $as_echo_n "checking for C compiler flag ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${gcc_flag_prefix}-finline-limit=10000) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}-finline-limit=10000") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${gcc_flag_prefix}-finline-limit=10000" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}-finline-limit=10000") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${gcc_flag_prefix}-finline-limit=10000" >&5 $as_echo_n "checking for C compiler flag ${gcc_flag_prefix}-finline-limit=10000... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${gcc_flag_prefix}-finline-limit=10000" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${gcc_flag_prefix}-finline-limit=10000" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${gcc_flag_prefix}-finline-limit=10000) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${gcc_flag_prefix}-finline-limit=10000) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}-finline-limit=10000") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${gcc_flag_prefix}-finline-limit=10000" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}-finline-limit=10000") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${gcc_flag_prefix}-finline-limit=10000" >&5 $as_echo_n "checking for C compiler flag ${gcc_flag_prefix}-finline-limit=10000... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${gcc_flag_prefix}-finline-limit=10000" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${gcc_flag_prefix}-finline-limit=10000" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${gcc_flag_prefix}-finline-limit=10000) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns-single=35000) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # gcc 3.4+ require new flags to enable full inlining # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${gcc_flag_prefix}--param${gcc_flag_delim}inline-unit-growth=10000) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}inline-unit-growth=10000") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}inline-unit-growth=10000" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}inline-unit-growth=10000") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${gcc_flag_prefix}--param${gcc_flag_delim}inline-unit-growth=10000" >&5 $as_echo_n "checking for C compiler flag ${gcc_flag_prefix}--param${gcc_flag_delim}inline-unit-growth=10000... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}inline-unit-growth=10000" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}inline-unit-growth=10000" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${gcc_flag_prefix}--param${gcc_flag_delim}inline-unit-growth=10000) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${gcc_flag_prefix}--param${gcc_flag_delim}large-function-growth=200000) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}large-function-growth=200000") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}large-function-growth=200000" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}large-function-growth=200000") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${gcc_flag_prefix}--param${gcc_flag_delim}large-function-growth=200000" >&5 $as_echo_n "checking for C compiler flag ${gcc_flag_prefix}--param${gcc_flag_delim}large-function-growth=200000... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}large-function-growth=200000" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}large-function-growth=200000" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${gcc_flag_prefix}--param${gcc_flag_delim}large-function-growth=200000) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # We'd like to use -Winline to detect call sites where the optimizer # ignores our inline function modifier (usually due to technical limitations) # However, some versions of gcc issue spurious warnings with -Winline # for inlining operations which the user did not request. # Detect that gcc bug and avoid -Winline for those versions # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${gcc_flag_prefix}-Winline) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}-Winline") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${gcc_flag_prefix}-Winline" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}-Winline") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${gcc_flag_prefix}-Winline" >&5 $as_echo_n "checking for C compiler flag ${gcc_flag_prefix}-Winline... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) DEVWARN_CFLAGS_OPT="${gcc_flag_prefix}-Winline" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy -Winline" >&5 $as_echo_n "checking for buggy -Winline... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $DEVWARN_CFLAGS_OPT") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $DEVWARN_CFLAGS_OPT" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $DEVWARN_CFLAGS_OPT") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } # keep -Winline else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5 $as_echo "buggy" >&6; } DEVWARN_CFLAGS_OPT="" # remove -Winline else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } # keep -Winline else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5 $as_echo "buggy" >&6; } DEVWARN_CFLAGS_OPT="" # remove -Winline fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: failure when detecting buggy -Winline" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS_OPT="${gcc_flag_prefix}-Winline" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy -Winline" >&5 $as_echo_n "checking for buggy -Winline... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $DEVWARN_CFLAGS_OPT") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $DEVWARN_CFLAGS_OPT" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $DEVWARN_CFLAGS_OPT") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } # keep -Winline else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5 $as_echo "buggy" >&6; } DEVWARN_CFLAGS_OPT="" # remove -Winline else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } # keep -Winline else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5 $as_echo "buggy" >&6; } DEVWARN_CFLAGS_OPT="" # remove -Winline fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: failure when detecting buggy -Winline" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${gcc_flag_prefix}-Winline) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) CCOPTFLAGS="$CFLAGS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; Pathscale) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"-O3") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="-O3" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"-O3") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # We'd like to use -Winline (for the same reasons as with gcc). # However, some installations have been observed to complain # on every inline keyword, due to -fno-inline being inserted # by the compiler driver. Avoid using -Winline in such a case. # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-Winline) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Winline") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Winline" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Winline") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Winline" >&5 $as_echo_n "checking for C compiler flag -Winline... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) DEVWARN_CFLAGS_OPT="-Winline" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Winline flags conflict" >&5 $as_echo_n "checking for -Winline flags conflict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $DEVWARN_CFLAGS_OPT") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $DEVWARN_CFLAGS_OPT" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $DEVWARN_CFLAGS_OPT") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } # keep -Winline else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: conflict" >&5 $as_echo "conflict" >&6; } DEVWARN_CFLAGS_OPT="" # remove -Winline else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } # keep -Winline else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: conflict" >&5 $as_echo "conflict" >&6; } DEVWARN_CFLAGS_OPT="" # remove -Winline fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: failure when detecting -Winline conflict" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS_OPT="-Winline" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Winline flags conflict" >&5 $as_echo_n "checking for -Winline flags conflict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $DEVWARN_CFLAGS_OPT") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $DEVWARN_CFLAGS_OPT" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $DEVWARN_CFLAGS_OPT") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } # keep -Winline else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: conflict" >&5 $as_echo "conflict" >&6; } DEVWARN_CFLAGS_OPT="" # remove -Winline else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } # keep -Winline else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: conflict" >&5 $as_echo "conflict" >&6; } DEVWARN_CFLAGS_OPT="" # remove -Winline fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: failure when detecting -Winline conflict" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-Winline) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) CCOPTFLAGS="$CFLAGS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; Sun) if test "$GASNETI_PTR_BITS" = 64; then # -fast => -xarch=v8 which clobbers user's 64-bit choice SUN_ARCH_FLAG=`echo "$CC $CFLAGS" | $PERL -ne 'foreach(split(/ /,$_)) { print "$_" if (m/^-xarch/);}'` else SUN_ARCH_FLAG= fi CCOPTFLAGS="-fast $SUN_ARCH_FLAG -xO5" # bug 3662: try to workaround warnings generated by -fast when the target system cannot be autodetected # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($CCOPTFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CCOPTFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $CCOPTFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CCOPTFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $CCOPTFLAGS" >&5 $as_echo_n "checking for C compiler flag $CCOPTFLAGS... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } SUN_FALLBACK_FLAG=`echo "$_GASNET_TRY_CFLAG_TMP" | $PERL -ne 'print " $1" if (m/falling back to (.*)$/);'` # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($CCOPTFLAGS$SUN_FALLBACK_FLAG) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CCOPTFLAGS$SUN_FALLBACK_FLAG") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $CCOPTFLAGS$SUN_FALLBACK_FLAG" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CCOPTFLAGS$SUN_FALLBACK_FLAG") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $CCOPTFLAGS$SUN_FALLBACK_FLAG" >&5 $as_echo_n "checking for C compiler flag $CCOPTFLAGS$SUN_FALLBACK_FLAG... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CCOPTFLAGS="$CCOPTFLAGS$SUN_FALLBACK_FLAG" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CCOPTFLAGS="$CCOPTFLAGS$SUN_FALLBACK_FLAG" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($CCOPTFLAGS$SUN_FALLBACK_FLAG) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } SUN_FALLBACK_FLAG=`echo "$_GASNET_TRY_CFLAG_TMP" | $PERL -ne 'print " $1" if (m/falling back to (.*)$/);'` # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($CCOPTFLAGS$SUN_FALLBACK_FLAG) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CCOPTFLAGS$SUN_FALLBACK_FLAG") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $CCOPTFLAGS$SUN_FALLBACK_FLAG" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CCOPTFLAGS$SUN_FALLBACK_FLAG") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $CCOPTFLAGS$SUN_FALLBACK_FLAG" >&5 $as_echo_n "checking for C compiler flag $CCOPTFLAGS$SUN_FALLBACK_FLAG... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CCOPTFLAGS="$CCOPTFLAGS$SUN_FALLBACK_FLAG" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CCOPTFLAGS="$CCOPTFLAGS$SUN_FALLBACK_FLAG" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($CCOPTFLAGS$SUN_FALLBACK_FLAG) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) SUN_FALLBACK_FLAG=`echo "$_GASNET_TRY_CFLAG_TMP" | $PERL -ne 'print " $1" if (m/falling back to (.*)$/);'` # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($CCOPTFLAGS$SUN_FALLBACK_FLAG) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CCOPTFLAGS$SUN_FALLBACK_FLAG") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $CCOPTFLAGS$SUN_FALLBACK_FLAG" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CCOPTFLAGS$SUN_FALLBACK_FLAG") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $CCOPTFLAGS$SUN_FALLBACK_FLAG" >&5 $as_echo_n "checking for C compiler flag $CCOPTFLAGS$SUN_FALLBACK_FLAG... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CCOPTFLAGS="$CCOPTFLAGS$SUN_FALLBACK_FLAG" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CCOPTFLAGS="$CCOPTFLAGS$SUN_FALLBACK_FLAG" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($CCOPTFLAGS$SUN_FALLBACK_FLAG) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($CCOPTFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; Cray) CCOPTFLAGS="-O2" ;; # DOB: -O3 is unstable on Cray cc XLC) case "$target_os" in darwin*) # enabling ipa (-O4 or higher) breaks linking to MPI (and thus ibv). case `/usr/sbin/sysctl hw.cpusubtype | cut '-d ' -f2` in # bug926: on G5 (cpusubtype 100) -qarch={ppc970,auto} causes corruption of 64-bit integer arithmetic 100) CCOPTFLAGS="-O3 -qhot -qarch=g5 -qtune=auto -qthreaded -qmaxmem=-1" ;; *) CCOPTFLAGS="-O3 -qhot -qarch=auto -qtune=auto -qthreaded -qmaxmem=-1" ;; esac ;; linux*) CCOPTFLAGS="-O3 -qarch=auto -qtune=auto -qthreaded -qmaxmem=-1";; *) #CCOPTFLAGS="-O5 -qthreaded -qmaxmem=-1" ;; # -O5 == -O3 w/ intra-procedural analysis, maxmem=-1 is default for -O3 or higher CCOPTFLAGS="-O3 -qarch=auto -qtune=auto -qthreaded -qmaxmem=-1" ;; # -O5 causes linker to hang on Titanium esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-qnosmp) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -qnosmp") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -qnosmp" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -qnosmp") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -qnosmp" >&5 $as_echo_n "checking for C compiler flag -qnosmp... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CCOPTFLAGS="$CCOPTFLAGS -qnosmp" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CCOPTFLAGS="$CCOPTFLAGS -qnosmp" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-qnosmp) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # If $CC sets -q, then remove conflicting options from CCOPTFLAGS for flag in arch tune hot threaded smp; do if echo "$CC" | grep "q\(no\)\?${flag}" >/dev/null; then CCOPTFLAGS=`echo "$CCOPTFLAGS" | sed -e "s/-q\(no\)\?${flag}\(=[a-z0-9_]*\)\?//"` fi done ;; Intel) CCOPTFLAGS="-O3" ;; NVHPC) CCOPTFLAGS="-O1" ;; # TODO: restore -O2 if/when bugs are resolved? (see bug 4158) PGI) CCOPTFLAGS="-O2" # Default # Work-aroung bug 2842: bad code gen by pgcc 10.5-0 through 10.7-0 at -O2 # XXX: Need an ending version here when known # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(if PGI compiler misoptimizes assignment to (const char *),bug2842,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PGI compiler misoptimizes assignment to (const char *)" >&5 $as_echo_n "checking if PGI compiler misoptimizes assignment to (const char *)... " >&6; } if ${gasnet_cv_bug2842+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "gasnet_portable_platform.h" #if PLATFORM_COMPILER_VERSION_LT(10,5,0) || PLATFORM_COMPILER_VERSION_GT(10,7,0) #error "GOOD pgcc version should FAIL this test" #endif int main () { (void)0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_bug2842=yes else gasnet_cv_bug2842=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_bug2842" >&5 $as_echo "$gasnet_cv_bug2842" >&6; } if test "$gasnet_cv_bug2842" = yes; then : CCOPTFLAGS="-O1" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(if PGI compiler misoptimizes assignment to (const char *),bug2842,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; TINY) CCOPTFLAGS="" # optimization not supported SEPARATE_CC=1 # force separate compilation - multiple -c compilation not supported ;; Open64) if test "$GASNETI_PTR_BITS" = 32; then # See bug 2725 for info on test failures at -O3 # Also see "opencc -m32 -O2" crashing when building libupcr CCOPTFLAGS="-O1" else # See bug 2724 for info on "-OPT:wrap_around_unsafe=off" CCOPTFLAGS="-O3 -OPT:wrap_around_unsafe=off" fi ;; Clang) CCOPTFLAGS="-O3" ;; *) CCOPTFLAGS="-O" ;; esac case "$CC_FAMILY" in GNU) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"${gcc_flag_prefix}-g3") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="${gcc_flag_prefix}-g3" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"${gcc_flag_prefix}-g3") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) case "$target_os" in darwin*) # Want -gstabs+ instead of -g3, if supported # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${gcc_flag_prefix}-gstabs+) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}-gstabs+") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${gcc_flag_prefix}-gstabs+" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${gcc_flag_prefix}-gstabs+") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${gcc_flag_prefix}-gstabs+" >&5 $as_echo_n "checking for C compiler flag ${gcc_flag_prefix}-gstabs+... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="${gcc_flag_prefix}-gstabs+" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="${gcc_flag_prefix}-gstabs+" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${gcc_flag_prefix}-gstabs+) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; esac CCDEBUGFLAGS="$CFLAGS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; Pathscale) CCDEBUGFLAGS="-g3 -O0" ;; # need to explicitly disable optimization Open64) CCDEBUGFLAGS="-g3" ;; Clang) CCDEBUGFLAGS="-g -O0" ;; Cray) CCDEBUGFLAGS="-g -O0" ;; *) CCDEBUGFLAGS="-g" ;; esac # attempt to enable the ultrasparc ISA in MISC_C(XX)FLAGS, and test for related capabilities # flags is compiler options which enable ultrasparc instructions for 32-bit ABI # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_DISABLED(ultrasparc-probe,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-ultrasparc-probe was given. if test "${enable_ultrasparc_probe+set}" = set; then : enableval=$enable_ultrasparc_probe; fi case "$enable_ultrasparc_probe" in '' | yes) : ;; *) : DISABLE_ULTRASPARC=1 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_DISABLED(ultrasparc-probe,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # attempt to enable 64-bit inline asm in MISC_C(XX)FLAGS, and test for related capabilities # flags is compiler options which enable ppc64 instructions for 32-bit ABI # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_DISABLED(ppc64-probe,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-ppc64-probe was given. if test "${enable_ppc64_probe+set}" = set; then : enableval=$enable_ppc64_probe; fi case "$enable_ppc64_probe" in '' | yes) : ;; *) : DISABLE_PPC64=1 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_DISABLED(ppc64-probe,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # Detect features that affect MISCFLAGS if test "$cross_compiling" = "yes" && test -z "$gasnet_cv_c99_format" ; then gasnet_cv_c99_format=no # conservatively assume it's unavailable if we can't check fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for working C99 printf specifiers,c99_format,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C99 printf specifiers" >&5 $as_echo_n "checking for working C99 printf specifiers... " >&6; } if ${gasnet_cv_c99_format+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* snprintf */ #include /* strcmp */ #include /* types */ #include /* reporting */ char test[100]; char expect[100]; int check(void) { ptrdiff_t pd, pdneg; size_t sz = 0xAAAABBBB; strcat(expect, "AAAABBBB"); if (sizeof(size_t) >= 8) { sz <<= 16; sz <<= 16; sz += 0xCCCCDDDD; strcat(expect,"CCCCDDDD"); } strcat(expect, " 987654321"); pd = 987654321; if (sizeof(ptrdiff_t) >= 8) { pd *= 1000000000; pd += 987654321; strcat(expect, "987654321"); } strcat(expect, " -123456789"); pdneg = -123456789; int ret = snprintf(test,sizeof(test),"%zX %ti %ti",sz,pd,pdneg); if (ret <= 0) return ret; if (strcmp(test,expect)) return 666; return 0; } int main(void) { int ret = check(); if (ret) { printf("got %i(%s): \t'%s'\n",ret,strerror(errno),test); /* for debugging */ printf("expected: \t'%s'\n", expect); } return ret; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_c99_format=yes else gasnet_cv_c99_format=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_c99_format" >&5 $as_echo "$gasnet_cv_c99_format" >&6; } if test "$gasnet_cv_c99_format" = yes; then : have_c99_format=1 else : have_c99_format=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for working C99 printf specifiers,c99_format,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) cat >>confdefs.h <<_ACEOF #define HAVE_C99_FORMAT_SPECIFIERS $have_c99_format _ACEOF DEVWARN_CFLAGS= # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(debug,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; fi case "$enable_debug" in '' | no) : GASNET_OPT_CFLAGS="$CCOPTFLAGS" DEVWARN_CFLAGS="$DEVWARN_CFLAGS $DEVWARN_CFLAGS_OPT" $as_echo "#define GASNET_NDEBUG 1" >>confdefs.h BUILDCONFIG="optimize" enabled_debug=no ;; *) : if test -z "$GASNET_SUPPRESS_DEBUG_WARNING" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING Configuring the system for global, forced debugging mode. This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >&5 $as_echo "$as_me: WARNING: ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING Configuring the system for global, forced debugging mode. This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >&2;} echo " ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING Configuring the system for global, forced debugging mode. This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi GASNET_OPT_CFLAGS="$CCDEBUGFLAGS" $as_echo "#define GASNET_DEBUG 1" >>confdefs.h BUILDCONFIG="debug" enabled_debug=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(debug,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$enabled_debug" = yes; then BUILDCONFIG_DEBUG_TRUE= BUILDCONFIG_DEBUG_FALSE='#' else BUILDCONFIG_DEBUG_TRUE='#' BUILDCONFIG_DEBUG_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(valgrind,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-valgrind was given. if test "${enable_valgrind+set}" = set; then : enableval=$enable_valgrind; fi case "$enable_valgrind" in '' | no) : enabled_valgrind=no ;; *) : if test -z "$GASNET_SUPPRESS_DEBUG_WARNING" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling valgrind-friendly codegen, disabling some optimizations." >&5 $as_echo "$as_me: WARNING: Enabling valgrind-friendly codegen, disabling some optimizations." >&2;} echo "Enabling valgrind-friendly codegen, disabling some optimizations." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi $as_echo "#define GASNETI_VALGRIND 1" >>confdefs.h enable_debug_malloc=no # debug mallocator obfuscates heap activity and confuses valgrind if test x"$enable_pshm_xpmem" = xyes && test x"$enable_pshm" != xno; then # valgrind fundamentally incompatible with XPMEM, issuing errors on every access case "$target" in *-cnl-*) # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Valgrind (--enable-valgrind) does not interoperate with XPMEM (--enable-pshm-xpmem). This appears to be a Cray, so converting to --enable-pshm-hugetlbfs instead" >&5 $as_echo "$as_me: WARNING: Valgrind (--enable-valgrind) does not interoperate with XPMEM (--enable-pshm-xpmem). This appears to be a Cray, so converting to --enable-pshm-hugetlbfs instead" >&2;} echo "Valgrind (--enable-valgrind) does not interoperate with XPMEM (--enable-pshm-xpmem). This appears to be a Cray, so converting to --enable-pshm-hugetlbfs instead" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) enable_pshm_xpmem=no enable_pshm_hugetlbfs=yes ;; *) echo echo "configure error: Valgrind (--enable-valgrind) does not interoperate with XPMEM (--enable-pshm-xpmem). Please select a different PSHM protocol (e.g. --disable-pshm-xpmem --enable-pshm-posix) or disable PSHM (--disable-pshm) " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; esac fi enabled_valgrind=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(valgrind,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$enabled_valgrind" = yes; then VALGRIND_TRUE= VALGRIND_FALSE='#' else VALGRIND_TRUE='#' VALGRIND_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(dev-warnings,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-dev-warnings was given. if test "${enable_dev_warnings+set}" = set; then : enableval=$enable_dev_warnings; fi case "$enable_dev_warnings" in no) : enabled_dev_warnings=no ;; yes) : enabled_dev_warnings=yes ;; *) : enabled_dev_warnings=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(dev-warnings,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # Set MISC_CFLAGS: flags to be used by all C compilations, regardless of optimization/debugging level # This should include architectural/CPU flags, warning flags, and anything required for C99 conformance # We do not currently allow a user override of MISC_C(PP)FLAGS MISC_CFLAGS="" misc_flag_prefix='' misc_flag_delim=' ' case "$CC_FAMILY" in GNU) case "$CC_SUBFAMILY" in NVIDIA) misc_flag_prefix='-Xcompiler ' misc_flag_delim=',' ;; esac case "$target_cpu" in sparc) if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_ULTRASPARC" != 1; then for flag in "-mcpu=ultrasparc3 -mtune=ultrasparc3" "-mcpu=ultrasparc -mtune=ultrasparc" ; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($flag) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $flag" >&5 $as_echo_n "checking for C compiler flag $flag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ultrasparc_flag_worked=1 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=0 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=0 fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ultrasparc_flag_worked=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($flag) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$ultrasparc_flag_worked" = 1; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working flag $flag" >&5 $as_echo_n "checking for working flag $flag... " >&6; } if test "$cross_compiling" = yes; then : ultrasparc_flag_worked=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void foo(void) { #ifdef __GNUC__ register void * addr = 0; register int oldval = 0; register int newval = 1; __asm__ __volatile__ ("cas [%2], %0, %1" : "=&r"(oldval), "=&r"(newval) : "r" (addr) : "memory"); #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) __asm("cas [%i0], %i1, %i2"); #else #error unknown sparc compiler #endif } int main(void) { return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ultrasparc_flag_worked=1 else ultrasparc_flag_worked=0 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$ultrasparc_flag_worked" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MISC_CFLAGS="$flag" break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UltraSPARC instruction support" >&5 $as_echo_n "checking for UltraSPARC instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; rs6000|powerpc*) if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_PPC64" != 1 -a "$cross_compiling" != "yes"; then for flag in "-force_cpusubtype_ALL" "-Wa,-mppc64" ; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($flag) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $flag" >&5 $as_echo_n "checking for C compiler flag $flag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ppc64_flag_worked=1 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ppc64_flag_worked=0 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ppc64_flag_worked=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ppc64_flag_worked=0 fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ppc64_flag_worked=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($flag) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$ppc64_flag_worked" = 1; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working flag $flag" >&5 $as_echo_n "checking for working flag $flag... " >&6; } if test "$cross_compiling" = yes; then : ppc64_flag_worked=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ppc64_flag_worked=1 else ppc64_flag_worked=0 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$ppc64_flag_worked" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MISC_CFLAGS="$flag" break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PPC64 instruction support" >&5 $as_echo_n "checking for PPC64 instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; esac case "$target_os" in darwin*) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-long-double) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-long-double") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-long-double" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-long-double") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-long-double" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-long-double... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wlong-double) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wlong-double") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wlong-double" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wlong-double") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wlong-double" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wlong-double... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) MISC_CFLAGS="$MISC_CFLAGS ${misc_flag_prefix}-Wno-long-double" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="$MISC_CFLAGS ${misc_flag_prefix}-Wno-long-double" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wlong-double) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wlong-double) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wlong-double") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wlong-double" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wlong-double") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wlong-double" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wlong-double... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) MISC_CFLAGS="$MISC_CFLAGS ${misc_flag_prefix}-Wno-long-double" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="$MISC_CFLAGS ${misc_flag_prefix}-Wno-long-double" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wlong-double) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-long-double) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; esac ;; Cray) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cray C warning flags" >&5 $as_echo_n "checking for Cray C warning flags... " >&6; } crayc_warn_flags="236:3185" # 3185 = bug 3306 # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -g") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -g" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -g") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # bug 3309 is specific to -g # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" crayc_warn_flags="${crayc_warn_flags}:7212" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" crayc_warn_flags="${crayc_warn_flags}:7212" fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 # bug 3309, Cray C 8.5+ echo echo "configure error: failure building struct warning test" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) case "$target_cpu" in x86_64) MISC_CFLAGS="-hnomessage=$crayc_warn_flags" ;; # XT, XE, XK, XC, etc. *) as_fn_error $? "Cray C compiler for unknown target CPU" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MISC_CFLAGS" >&5 $as_echo "$MISC_CFLAGS" >&6; } ;; Intel) # Note we need to support both older -wd and newer -diag-disable # Setting (CC|MPI_CC)_WDFLAG simplifes doing so in later tests # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-diag-disable=177) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -diag-disable=177") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -diag-disable=177" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -diag-disable=177") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -diag-disable=177" >&5 $as_echo_n "checking for C compiler flag -diag-disable=177... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CC_WDFLAG='-diag-disable=' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CC_WDFLAG='-wd' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CC_WDFLAG='-diag-disable=' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CC_WDFLAG='-wd' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CC_WDFLAG='-wd' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-diag-disable=177) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) MISC_CFLAGS="${CC_WDFLAG}177 ${CC_WDFLAG}279" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${wdflag}1572) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${CC_WDFLAG}1572") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${CC_WDFLAG}1572" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${CC_WDFLAG}1572") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${CC_WDFLAG}1572" >&5 $as_echo_n "checking for C compiler flag ${CC_WDFLAG}1572... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) MISC_CFLAGS="$MISC_CFLAGS ${CC_WDFLAG}1572" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="$MISC_CFLAGS ${CC_WDFLAG}1572" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${wdflag}1572) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; NVHPC) # TODO: are either `-M` options, inherited from PGI, still required? # suppress large number of useless default warnings # get inline assembly and sign-extended widening MISC_CFLAGS="-w -Masmkeyword -Msignextend" ;; PGI) MISC_CFLAGS="-Masmkeyword -Msignextend" # get inline assembly and sign-extended widening # The following looks backwards, but is not. # PGI 20.1 introduced fine-grained warning control at the same time as # default-enabling a large number of useless warnings (on the level of # -Wextra in other compilers). # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG([-Wc,--diag_suppress=177]) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wc,--diag_suppress=177") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Wc,--diag_suppress=177" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wc,--diag_suppress=177") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Wc,--diag_suppress=177" >&5 $as_echo_n "checking for C compiler flag -Wc,--diag_suppress=177... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) MISC_CFLAGS="-w $MISC_CFLAGS" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="-w $MISC_CFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG([-Wc,--diag_suppress=177]) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; Sun) if test "$target_cpu" = "sparc"; then if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_ULTRASPARC" != 1; then for flag in "-xarch=v8plusb" "-xarch=v8plusa" "-xarch=v8plus" "-xarch=sparcvis2" "-xarch=sparcvis" "-xarch=sparc" ; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($flag) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $flag" >&5 $as_echo_n "checking for C compiler flag $flag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ultrasparc_flag_worked=1 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=0 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=0 fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ultrasparc_flag_worked=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($flag) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$ultrasparc_flag_worked" = 1; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working flag $flag" >&5 $as_echo_n "checking for working flag $flag... " >&6; } if test "$cross_compiling" = yes; then : ultrasparc_flag_worked=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void foo(void) { #ifdef __GNUC__ register void * addr = 0; register int oldval = 0; register int newval = 1; __asm__ __volatile__ ("cas [%2], %0, %1" : "=&r"(oldval), "=&r"(newval) : "r" (addr) : "memory"); #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) __asm("cas [%i0], %i1, %i2"); #else #error unknown sparc compiler #endif } int main(void) { return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ultrasparc_flag_worked=1 else ultrasparc_flag_worked=0 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$ultrasparc_flag_worked" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MISC_CFLAGS="$flag" break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UltraSPARC instruction support" >&5 $as_echo_n "checking for UltraSPARC instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) fi # Try to suppress warnings about __attribute__(__common__): # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-erroff=E_ATTRIBUTE_NOT_FUNC) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -erroff=E_ATTRIBUTE_NOT_FUNC") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -erroff=E_ATTRIBUTE_NOT_FUNC" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -erroff=E_ATTRIBUTE_NOT_FUNC") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -erroff=E_ATTRIBUTE_NOT_FUNC" >&5 $as_echo_n "checking for C compiler flag -erroff=E_ATTRIBUTE_NOT_FUNC... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) MISC_CFLAGS="$MISC_CFLAGS -erroff=E_ATTRIBUTE_NOT_FUNC" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="$MISC_CFLAGS -erroff=E_ATTRIBUTE_NOT_FUNC" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-erroff=E_ATTRIBUTE_NOT_FUNC) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) MISC_CFLAGS="$MISC_CFLAGS -errtags" ;; # show warning tag ids in warnings XLC) if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_PPC64" != 1 -a "$cross_compiling" != "yes"; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PPC64 instruction support" >&5 $as_echo_n "checking for PPC64 instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # Try to suppress certain warnings: # 1500-010 = infinite loop (such as in our tests) # 1500-029 = could not inline (e.g. varargs, alloc, etc.) # 1506-229 = empty source file (some linux headers) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-qsuppress=1500-010:1500-029:1506-229) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -qsuppress=1500-010:1500-029:1506-229") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -qsuppress=1500-010:1500-029:1506-229" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -qsuppress=1500-010:1500-029:1506-229") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -qsuppress=1500-010:1500-029:1506-229" >&5 $as_echo_n "checking for C compiler flag -qsuppress=1500-010:1500-029:1506-229... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) MISC_CFLAGS="$MISC_CFLAGS -qsuppress=1500-010:1500-029:1506-229" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="$MISC_CFLAGS -qsuppress=1500-010:1500-029:1506-229" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-qsuppress=1500-010:1500-029:1506-229) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; *) ;; esac # Add warning enable/suppression flags to MISC_CFLAGS case "$CC_FAMILY" in GNU | Pathscale | Open64 | Clang) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$MISC_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$MISC_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$MISC_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$enabled_dev_warnings" = "yes" ; then # enable additional supported warnings for warnflag in -Wall \ -Wpointer-arith \ -Wnested-externs \ -Wwrite-strings \ -Wmissing-format-attribute \ -Winit-self \ -Wvla \ -Wexpansion-to-defined \ -Woverlength-strings \ -Wclobbered \ -Wcast-function-type \ -Wempty-body \ -Wignored-qualifiers \ -Wimplicit-fallthrough \ -Wmissing-parameter-type \ -Wold-style-declaration \ -Wuninitialized \ -Wshift-negative-value \ ; do if test "$CC_FAMILY" = "Open64" && ( test "x$warnflag" = "x-Wempty-body" || test "x$warnflag" = "x-Wexpansion-to-defined" ) ; then : # Bug 3711: Open64 botches some warnings at link time, which is not probed here else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}$warnflag) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}$warnflag") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}$warnflag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}$warnflag") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}$warnflag" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}$warnflag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}$warnflag" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}$warnflag" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}$warnflag) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) fi done # Disable DEVWARN flags from -Wall that we don't support in our library code # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-format-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-format-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-truncation) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-truncation") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-truncation" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-truncation") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-format-truncation" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-format-truncation... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-truncation) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-truncation") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-truncation" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-truncation") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-truncation" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-truncation... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-truncation" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-truncation" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-truncation) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-truncation) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-truncation") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-truncation" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-truncation") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-truncation" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-truncation... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-truncation" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-truncation" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-truncation) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-truncation) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # Disable DEVWARN flag(s) from -Wcast-function-type that we don't support in our library code # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-cast-function-type-strict) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-cast-function-type-strict" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-cast-function-type-strict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wcast-function-type-strict) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wcast-function-type-strict" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wcast-function-type-strict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wcast-function-type-strict) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wcast-function-type-strict) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wcast-function-type-strict" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wcast-function-type-strict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wcast-function-type-strict) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-cast-function-type-strict) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # CC and MPI_CC only. Not desired for CXX # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-strict-prototypes) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-strict-prototypes" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-strict-prototypes... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-prototypes) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstrict-prototypes" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstrict-prototypes... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-prototypes) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-prototypes) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstrict-prototypes" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstrict-prototypes... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-prototypes) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-strict-prototypes) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) fi # compiler-specific global warning disables case "$CC_FAMILY" in Pathscale) # pathcc default enables -Wformat-security which we don't want # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-security) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-security") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-security" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-security") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-format-security" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-format-security... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-security) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-security") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-security" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-security") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-security" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-security... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-security" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-security" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-security) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-security) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-security") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-security" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-security") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-security" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-security... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-security" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-security" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-security) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-security) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; Open64) # Open64's maybe-uninitialized analysis is too broken to be usable # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-uninitialized) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-uninitialized") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-uninitialized" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-uninitialized") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-uninitialized" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-uninitialized... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuninitialized) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuninitialized") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wuninitialized" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuninitialized") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wuninitialized" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wuninitialized... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-uninitialized" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-uninitialized" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuninitialized) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuninitialized) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuninitialized") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wuninitialized" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuninitialized") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wuninitialized" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wuninitialized... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-uninitialized" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-uninitialized" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuninitialized) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-uninitialized) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # Open64 strict aliasing complains about (void **)/(T **) aliasing, which we use in places # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-strict-aliasing) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-strict-aliasing" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-strict-aliasing... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-aliasing) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstrict-aliasing" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstrict-aliasing... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-aliasing) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-aliasing) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstrict-aliasing" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstrict-aliasing... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-aliasing) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-strict-aliasing) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; GNU) # GCC 11 appears to have analysis problems which yield bogus warnings (bugs 4228,4231,4232) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler is gcc 11 or higher" >&5 $as_echo_n "checking whether C compiler is gcc 11 or higher... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : is_gcc11_or_higher=yes else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" is_gcc11_or_higher=yes else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : is_gcc11_or_higher=yes else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" is_gcc11_or_higher=yes fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 is_gcc11_or_higher=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $is_gcc11_or_higher" >&5 $as_echo "$is_gcc11_or_higher" >&6; } if test "$is_gcc11_or_higher" = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-array-bounds) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-array-bounds") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-array-bounds" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-array-bounds") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-array-bounds" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-array-bounds... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Warray-bounds) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Warray-bounds") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Warray-bounds" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Warray-bounds") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Warray-bounds" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Warray-bounds... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-array-bounds" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-array-bounds" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Warray-bounds) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Warray-bounds) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Warray-bounds") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Warray-bounds" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Warray-bounds") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Warray-bounds" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Warray-bounds... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-array-bounds" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-array-bounds" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Warray-bounds) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-array-bounds) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-stringop-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-stringop-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-stringop-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstringop-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstringop-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstringop-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstringop-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstringop-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstringop-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstringop-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstringop-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstringop-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstringop-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstringop-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstringop-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstringop-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstringop-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-stringop-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # These warnings were immediately problematic when introduced in 12.1 (bugs 4450,4451) # earlier versions silently ignore the unrecognized option # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-dangling-pointer) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-dangling-pointer" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-dangling-pointer... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wdangling-pointer) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wdangling-pointer") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wdangling-pointer" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wdangling-pointer") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wdangling-pointer" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wdangling-pointer... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wdangling-pointer) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wdangling-pointer) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wdangling-pointer") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wdangling-pointer" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wdangling-pointer") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wdangling-pointer" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wdangling-pointer... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wdangling-pointer) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-dangling-pointer) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-use-after-free) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-use-after-free") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-use-after-free" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-use-after-free") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-use-after-free" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-use-after-free... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuse-after-free) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuse-after-free") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wuse-after-free" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuse-after-free") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wuse-after-free" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wuse-after-free... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-use-after-free" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-use-after-free" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuse-after-free) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuse-after-free) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuse-after-free") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wuse-after-free" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuse-after-free") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wuse-after-free" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wuse-after-free... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-use-after-free" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-use-after-free" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuse-after-free) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-use-after-free) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) fi ;; esac # disable -Wformat if unsure we can support it for the printf implementation in use if test -z "$have_c99_format" ; then as_fn_error $? "Internal configure error - Wformat check missing" "$LINENO" 5 elif test "$have_c99_format" = 0 ; then # avoid false warnings # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-format" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-format... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) fi # disable warnings that should always be off (not supported by our headers) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CC_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CC_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CC_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CC_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # -Wno-unused is not enough to ignore unused params on clang -Wall -Wextra (clang 3.8.1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-parameter) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-parameter" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-parameter... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-parameter) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-parameter") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-parameter" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-parameter") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-parameter" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-parameter... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-parameter) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-parameter) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-parameter") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-parameter" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-parameter") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-parameter" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-parameter... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-parameter) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-parameter) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-address) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-address") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-address" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-address") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-address" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-address... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Waddress) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Waddress") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Waddress" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Waddress") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Waddress" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Waddress... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-address" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-address" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Waddress) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Waddress) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Waddress") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Waddress" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Waddress") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Waddress" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Waddress... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-address" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-address" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Waddress) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-address) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$use_pthreads" != "no" ; then # some crappy pthread mutex implementations generate warnings without -Wno-missing-braces { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy pthread.h mutex initializers" >&5 $as_echo_n "checking for buggy pthread.h mutex initializers... " >&6; } oldCFLAGS="$CFLAGS" CFLAGS="$DEVWARN_CFLAGS $CFLAGS" # FREEBSD requires the -pthread compiler flag when including pthread.h case "$target_os" in freebsd*) CFLAGS="-pthread $CFLAGS" ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < int main(void) { pthread_mutex_t fastmutex = PTHREAD_MUTEX_INITIALIZER; ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5 $as_echo "buggy" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-missing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-missing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-missing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-missing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-missing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-missing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wmissing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wmissing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-missing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5 $as_echo "buggy" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-missing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-missing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-missing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-missing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-missing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-missing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wmissing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wmissing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-missing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 #bug611: ignore failures here, which may be due to broken/missing pthreads support #AC_MSG_ERROR(failure while checking for buggy pthread.h mutexes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: failure - ignored" >&5 $as_echo "failure - ignored" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) CFLAGS="$oldCFLAGS" fi case "$target_os" in solaris*) # hide pragma warnings in system header files included by absolute path # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unknown-pragmas) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unknown-pragmas" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unknown-pragmas... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunknown-pragmas) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunknown-pragmas" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunknown-pragmas... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunknown-pragmas) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunknown-pragmas) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunknown-pragmas" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunknown-pragmas... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunknown-pragmas) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unknown-pragmas) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) esac #GASNET_TRY_CFLAG([-ansi -U__STRICT_ANSI__],[[C]FLAGS="$[C]FLAGS -ansi -U__STRICT_ANSI__"]) MISC_CFLAGS="$CFLAGS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; *) ;; esac # Set MISC_CPPFLAGS: flags to be used by all C preprocesses and compilations # Note this is ALSO used for C++ compilation, so only generic language-independent options should go in here # We do not currently allow a user override of MISC_C(PP)FLAGS # but this is where we embed the user's CPPFLAGS input to configure MISC_CPPFLAGS="$CPPFLAGS" case "$CC_FAMILY" in GNU) case "$target_os" in darwin*) # add some options which are specific to the Apple Inc version of gcc # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-no-cpp-precomp) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-no-cpp-precomp") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-no-cpp-precomp" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-no-cpp-precomp") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-no-cpp-precomp" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-no-cpp-precomp... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) MISC_CPPFLAGS="$MISC_CPPFLAGS ${misc_flag_prefix}-no-cpp-precomp" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CPPFLAGS="$MISC_CPPFLAGS ${misc_flag_prefix}-no-cpp-precomp" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-no-cpp-precomp) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) ;; esac ;; *) ;; esac # Determine the minimal CFLAGS we need to add for C99 compliance # This is done incrementally to avoid passing options on newer compiler versions where the # required compliance is provided by default, making the flag redundant (and potentially detrimental) # This also allows the user to pass a specific compliance flag in $CC without conflict case "$CC_FAMILY" in # Some known oddball cases: XLC) gasnet_c99_flags="-qlanglvl=extc99 -qlanglvl=stdc99";; Sun) gasnet_c99_flags="-xc99=all";; Cray) gasnet_c99_flags="'-h c99'";; PGI) gasnet_c99_flags="-c99 -c9x" ;; NVHPC) gasnet_c99_flags="-c99" ;; # One of these should work for the rest: # std=c99 requests strict C99 conformance from gcc and look-alikes, whereas # std=gnu99 additionally requests GNU-specific language extensions. # All GASNet code should adhere to the subset of strict C99 in the README coding standards, # (a subset of std=c99), however these flags are also used to compile network API headers # and client code that may require more general support. Therefore std=gnu99 is default. *) gasnet_c99_flags="${misc_flag_prefix}-std=gnu99 ${misc_flag_prefix}-c99 ${misc_flag_prefix}-std=c99";; esac # NOTE: We do not currently cache this check because it is expanded in multiple contexts GASNET_C99_FLAG=unknown eval set - $gasnet_c99_flags for flag in "" "$@"; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $MISC_CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS $MISC_CPPFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $MISC_CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # first see if the flag generates warnings # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($flag) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $flag" >&5 $as_echo_n "checking for C compiler flag $flag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # now see if it gives us the support we want # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define GASNETI_AMNUMARGS(...) GASNETI_AMNUMARGS_(__VA_ARGS__,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0) #define GASNETI_AMNUMARGS_(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,N,...) N int b[GASNETI_AMNUMARGS(1)+1]; int c[GASNETI_AMNUMARGS(1,2)+1]; int d[GASNETI_AMNUMARGS(1,2,3)+1]; void foo(void) { int a = 1; // C99 comment for (int i=0; i < 100; i++) a += i; // Conditional expression declaration int i = a; // mid-block decl int x = (int)(0x1234567812345678LL + 0x8765432187654321ULL + i); // (U)LL-suffix 64-bit integer literals } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : GASNET_C99_FLAG="$flag" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # now see if it gives us the support we want # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define GASNETI_AMNUMARGS(...) GASNETI_AMNUMARGS_(__VA_ARGS__,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0) #define GASNETI_AMNUMARGS_(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,N,...) N int b[GASNETI_AMNUMARGS(1)+1]; int c[GASNETI_AMNUMARGS(1,2)+1]; int d[GASNETI_AMNUMARGS(1,2,3)+1]; void foo(void) { int a = 1; // C99 comment for (int i=0; i < 100; i++) a += i; // Conditional expression declaration int i = a; // mid-block decl int x = (int)(0x1234567812345678LL + 0x8765432187654321ULL + i); // (U)LL-suffix 64-bit integer literals } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : GASNET_C99_FLAG="$flag" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($flag) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$GASNET_C99_FLAG" != "unknown"; then break; fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags required for C99 subset compliance" >&5 $as_echo_n "checking for flags required for C99 subset compliance... " >&6; } if test "$GASNET_C99_FLAG" = "unknown"; then as_fn_error $? "Could not determine \$CC flag to accept ISO C99 input. You may need to append flags in \$CC to enable C99 support" "$LINENO" 5 elif test "$GASNET_C99_FLAG" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: none required" >&5 $as_echo "none required" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GASNET_C99_FLAG" >&5 $as_echo "$GASNET_C99_FLAG" >&6; } MISC_CFLAGS="$MISC_CFLAGS $GASNET_C99_FLAG" fi if test "$enabled_dev_warnings" = "no" ; then DEVWARN_CFLAGS= fi # Some C compilers disable OS POSIX entry points when strict c99 conformance is selected # _GNU_SOURCE implies _XOPEN_SOURCE and enables other features we probe for, like "adaptive" mutex_t and pthread_rwlock_t # Known to work on Linux, cygwin, and expected to be safe or at worst ignored on other OS's GASNET_EXTRA_DEFINES="-D_GNU_SOURCE=1" # MISC_C(PP)FLAGS are added to C(PP)FLAGS here to ensure they are used for the remaining configure tests, # but they retain a separate identity post-configure CFLAGS="$GASNET_OPT_CFLAGS $MISC_CFLAGS" CPPFLAGS="$GASNET_EXTRA_DEFINES $MISC_CPPFLAGS" # warning suppression and other misc C flags # misc preprocessor flags # Final check to ensure everything works together -- in case some combination of flags broke something # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for working GASNet-required ISO C99 subset,gasnet_c99_subset,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GASNet-required ISO C99 subset" >&5 $as_echo_n "checking for working GASNet-required ISO C99 subset... " >&6; } if ${gasnet_cv_gasnet_c99_subset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define GASNETI_AMNUMARGS(...) GASNETI_AMNUMARGS_(__VA_ARGS__,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0) #define GASNETI_AMNUMARGS_(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,N,...) N int b[GASNETI_AMNUMARGS(1)+1]; int c[GASNETI_AMNUMARGS(1,2)+1]; int d[GASNETI_AMNUMARGS(1,2,3)+1]; void foo(void) { int a = 1; // C99 comment for (int i=0; i < 100; i++) a += i; // Conditional expression declaration int i = a; // mid-block decl int x = (int)(0x1234567812345678LL + 0x8765432187654321ULL + i); // (U)LL-suffix 64-bit integer literals } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_gasnet_c99_subset=yes else gasnet_cv_gasnet_c99_subset=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasnet_c99_subset" >&5 $as_echo "$gasnet_cv_gasnet_c99_subset" >&6; } if test "$gasnet_cv_gasnet_c99_subset" = yes; then : else : as_fn_error $? "Unable to find sufficient C99 support features in $CC to build GASNet. You may need to append flags in \$CC to enable C99 support" "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for working GASNet-required ISO C99 subset,gasnet_c99_subset,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(gasnet-verbose,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-gasnet-verbose was given. if test "${enable_gasnet_verbose+set}" = set; then : enableval=$enable_gasnet_verbose; fi case "$enable_gasnet_verbose" in '' | no) : enabled_debug_verbose=no ;; *) : enabled_debug_verbose=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(gasnet-verbose,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$enabled_debug_verbose" = yes; then $as_echo "#define GASNET_DEBUG_VERBOSE 1" >>confdefs.h fi if test "$enabled_debug_verbose" = yes; then BUILDCONFIG_DEBUG_VERBOSE_TRUE= BUILDCONFIG_DEBUG_VERBOSE_FALSE='#' else BUILDCONFIG_DEBUG_VERBOSE_TRUE='#' BUILDCONFIG_DEBUG_VERBOSE_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(trace,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-trace was given. if test "${enable_trace+set}" = set; then : enableval=$enable_trace; fi case "$enable_trace" in no) : enabled_trace=no ;; yes) : enabled_trace=yes ;; *) : enabled_trace=$enabled_debug ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(trace,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$enabled_trace" = yes; then $as_echo "#define GASNET_TRACE 1" >>confdefs.h fi if test "$enabled_trace" = yes; then BUILDCONFIG_TRACE_TRUE= BUILDCONFIG_TRACE_FALSE='#' else BUILDCONFIG_TRACE_TRUE='#' BUILDCONFIG_TRACE_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(stats,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-stats was given. if test "${enable_stats+set}" = set; then : enableval=$enable_stats; fi case "$enable_stats" in no) : enabled_stats=no ;; yes) : enabled_stats=yes ;; *) : enabled_stats=$enabled_debug ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(stats,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$enabled_stats" = yes; then $as_echo "#define GASNET_STATS 1" >>confdefs.h fi if test "$enabled_stats" = yes; then BUILDCONFIG_STATS_TRUE= BUILDCONFIG_STATS_FALSE='#' else BUILDCONFIG_STATS_TRUE='#' BUILDCONFIG_STATS_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(srclines,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-srclines was given. if test "${enable_srclines+set}" = set; then : enableval=$enable_srclines; fi case "$enable_srclines" in '' | no) : ;; *) : enabled_srclines=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(srclines,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$enabled_srclines" = yes; then $as_echo "#define GASNET_SRCLINES 1" >>confdefs.h fi if test "$enabled_srclines" = yes; then BUILDCONFIG_SRCLINES_TRUE= BUILDCONFIG_SRCLINES_FALSE='#' else BUILDCONFIG_SRCLINES_TRUE='#' BUILDCONFIG_SRCLINES_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(debug-malloc,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-debug-malloc was given. if test "${enable_debug_malloc+set}" = set; then : enableval=$enable_debug_malloc; fi case "$enable_debug_malloc" in no) : enabled_debug_malloc=no ;; yes) : enabled_debug_malloc=yes ;; *) : enabled_debug_malloc=$enabled_debug ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(debug-malloc,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test "$enabled_debug_malloc" = yes; then $as_echo "#define GASNET_DEBUGMALLOC 1" >>confdefs.h fi if test "$enabled_debug_malloc" = yes; then BUILDCONFIG_DEBUGMALLOC_TRUE= BUILDCONFIG_DEBUGMALLOC_FALSE='#' else BUILDCONFIG_DEBUGMALLOC_TRUE='#' BUILDCONFIG_DEBUGMALLOC_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_CORRECT_OPTIMIZEDDEBUG(...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_OPTIMIZEDDEBUG(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$enable_debug" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking CC for debug vs. optimize compilation conflict" >&5 $as_echo_n "checking CC for debug vs. optimize compilation conflict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CC,"$CC") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CC" = "" ; then _pushcnt_CC=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CC+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CC_$_pushcnt_CC=\$CC eval _pushedvarset_CC_$_pushcnt_CC=$_gasnet_pushvar_isset _pushcnt_CC=`expr $_pushcnt_CC + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CC="$CC" echo "pushed new CC value: $CC" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CC,"$CC") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $CPPFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXX,"$CC") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXX" = "" ; then _pushcnt_CXX=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXX+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXX_$_pushcnt_CXX=\$CXX eval _pushedvarset_CXX_$_pushcnt_CXX=$_gasnet_pushvar_isset _pushcnt_CXX=`expr $_pushcnt_CXX + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXX="$CC" echo "pushed new CXX value: $CXX" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXX,"$CC") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CFLAGS $CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CFLAGS $CPPFLAGS" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CFLAGS $CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(__OPTIMIZE__) || defined(NDEBUG) choke me #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_result=no else gasnet_result=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_result" >&5 $as_echo "$gasnet_result" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CC) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CC" -ge "1"; then _pushcnt_CC=`expr $_pushcnt_CC - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CC_$_pushcnt_CC if test "$_gasnet_pushvar_isset" = "1" ; then eval CC=\$_pushedvar_CC_$_pushcnt_CC echo "popping CC back to: $CC" >&5 else unset CC echo "popping CC back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CC" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXX) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXX" -ge "1"; then _pushcnt_CXX=`expr $_pushcnt_CXX - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXX_$_pushcnt_CXX if test "$_gasnet_pushvar_isset" = "1" ; then eval CXX=\$_pushedvar_CXX_$_pushcnt_CXX echo "popping CXX back to: $CXX" >&5 else unset CXX echo "popping CXX back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXX" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXX) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$gasnet_result" = yes; then : old_CC="$CC" CC="$CC -O0 -UNDEBUG" # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_OPTIMIZEDDEBUG(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$enable_debug" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking CC for debug vs. optimize compilation conflict" >&5 $as_echo_n "checking CC for debug vs. optimize compilation conflict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CC,"$CC") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CC" = "" ; then _pushcnt_CC=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CC+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CC_$_pushcnt_CC=\$CC eval _pushedvarset_CC_$_pushcnt_CC=$_gasnet_pushvar_isset _pushcnt_CC=`expr $_pushcnt_CC + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CC="$CC" echo "pushed new CC value: $CC" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CC,"$CC") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $CPPFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXX,"$CC") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CXX" = "" ; then _pushcnt_CXX=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXX+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXX_$_pushcnt_CXX=\$CXX eval _pushedvarset_CXX_$_pushcnt_CXX=$_gasnet_pushvar_isset _pushcnt_CXX=`expr $_pushcnt_CXX + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXX="$CC" echo "pushed new CXX value: $CXX" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXX,"$CC") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CFLAGS $CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CFLAGS $CPPFLAGS" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CFLAGS $CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(__OPTIMIZE__) || defined(NDEBUG) choke me #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_result=no else gasnet_result=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_result" >&5 $as_echo "$gasnet_result" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CC) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CC" -ge "1"; then _pushcnt_CC=`expr $_pushcnt_CC - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CC_$_pushcnt_CC if test "$_gasnet_pushvar_isset" = "1" ; then eval CC=\$_pushedvar_CC_$_pushcnt_CC echo "popping CC back to: $CC" >&5 else unset CC echo "popping CC back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CC" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXX) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CXX" -ge "1"; then _pushcnt_CXX=`expr $_pushcnt_CXX - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXX_$_pushcnt_CXX if test "$_gasnet_pushvar_isset" = "1" ; then eval CXX=\$_pushedvar_CXX_$_pushcnt_CXX echo "popping CXX back to: $CXX" >&5 else unset CXX echo "popping CXX back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXX" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXX) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$gasnet_result" = yes; then : echo echo "configure error: User requested --enable-debug but \$CC has enabled optimization (-O) or disabled assertions (-DNDEBUG). Appending '-O0 -UNDEBUG' to \$CC did not resolve this conflict. Try setting CC='$old_CC ' " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_OPTIMIZEDDEBUG(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Appending '-O0 -UNDEBUG' to \$CC to resolve debug vs. optimize compilation conflict" >&5 $as_echo "$as_me: WARNING: Appending '-O0 -UNDEBUG' to \$CC to resolve debug vs. optimize compilation conflict" >&2;} echo "Appending '-O0 -UNDEBUG' to \$CC to resolve debug vs. optimize compilation conflict" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_OPTIMIZEDDEBUG(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CORRECT_OPTIMIZEDDEBUG(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) case "$CC_FAMILY" in GNU) KEEPTMP_CFLAGS="-save-temps" ;; Clang) KEEPTMP_CFLAGS="-save-temps" ;; Pathscale) KEEPTMP_CFLAGS="-keep" ;; Open64) KEEPTMP_CFLAGS="-keep" ;; XLC) KEEPTMP_CFLAGS="-qlist" ;; # XXX: generates .lst w/ asm. Can't find a way to preserve .i PGI|NVHPC) KEEPTMP_CFLAGS="-Mkeepasm" ;; # XXX: only keeps .s. Can't find a way to preserve .i Intel) KEEPTMP_CFLAGS="-save-temps" ;; # XXX: only keeps .s. Can't find a way to preserve .i Sun) KEEPTMP_CFLAGS="-keeptmp" ;; Cray) KEEPTMP_CFLAGS="-hkeepfiles" ;; # XXX: only keeps .s. Can't find a way to preserve .i *) KEEPTMP_CFLAGS="" ;; esac # flags to preserve intermediate file (,i, .s, etc.) # Global opt-in to (semi-)automatic RPATH support # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; fi case "$enable_rpath" in '' | no) : enabled_rpath=no ;; *) : enabled_rpath=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) warn_missing_rpath='' # Probe(s) of compiler/linker support for RPATH # # TODO: warning-sensitive linker probe prior to making this ON-by-default # The logic below current uses `AC_TRY_LINK()` to test for support for # linker flags. However, this is not capable of rejecting flags which # induce warnings rather than failure. The most straight-forward approach # to checking for warnings is susceptible to persistent warnings (such as # for impending license expiration). Therefore, before RPATH support can be # ON by default, this probe should use `GASNET_TRY_LDFLAG()`, which does not # *yet* exist, but would be analogous to `GASNET_TRY_CFLAG()`. # Example scenarios where this would improve our behavior: # + Compilers/linkers which don't recognize flags we attempt, but only warn. # This would fail the probe, possibly allowing a later flag to be chosen. # + Conflicts (such as hypothetically with `-static`) which generate # warnings that an otherwise supported behavior is unavailable. # This would probably fail *all* the probes, resulting in disabling a # "non-feature" that only generates warnings. # + Might check if multiple instances of the same directory generates a warning. # However, we don't have a good solution in mind if this is ever the case. # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rpath option to \$CC" >&5 $as_echo_n "checking for rpath option to \$CC... " >&6; } if ${gasnet_cv_cc_rpath_option+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_cc_rpath_option='unknown' if test "$CC_FAMILY$CC_SUBFAMILY" = 'GNUNVIDIA'; then wl='-Xlinker ' else wl='-Wl,' fi for opt in "${wl}-rpath," "${wl}-rpath=" "${wl}-rpath ${wl}"; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$opt${TMPDIR:-/tmp}") vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$opt${TMPDIR:-/tmp}" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$opt${TMPDIR:-/tmp}") ^^^^^^^^^^^^^^^^^^^^^^ (L:1) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { puts("hello"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_rpath_option="$opt" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:1) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) if test x"$gasnet_cv_cc_rpath_option" != xunknown; then break fi done unset wl fi if test x"$gasnet_cv_cc_rpath_option" = 'xunknown'; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5 $as_echo "unknown" >&6; } unset cc_rpath_option else { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${gasnet_cv_cc_rpath_option}DIR\"" >&5 $as_echo "\"${gasnet_cv_cc_rpath_option}DIR\"" >&6; } # explicit (visible) quotes are intentional cc_rpath_option="$gasnet_cv_cc_rpath_option" fi segconfig="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(segment-fast,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-segment-fast was given. if test "${enable_segment_fast+set}" = set; then : enableval=$enable_segment_fast; fi case "$enable_segment_fast" in '' | no) : ;; *) : segconfig="fast$segconfig" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(segment-fast,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(segment-large,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-segment-large was given. if test "${enable_segment_large+set}" = set; then : enableval=$enable_segment_large; fi case "$enable_segment_large" in '' | no) : ;; *) : segconfig="large$segconfig" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(segment-large,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(segment-everything,...) vvvvvvvvvvvvvvvvvvvvvv (L:1) # Check whether --enable-segment-everything was given. if test "${enable_segment_everything+set}" = set; then : enableval=$enable_segment_everything; fi case "$enable_segment_everything" in '' | no) : ;; *) : segconfig="everything$segconfig" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(segment-everything,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:1) case "$segconfig" in "") segconfig=fast; #for AM_CONDITIONAL, below $as_echo "#define GASNET_SEGMENT_FAST 1" >>confdefs.h ;; # default is fast fast) $as_echo "#define GASNET_SEGMENT_FAST 1" >>confdefs.h ;; large) $as_echo "#define GASNET_SEGMENT_LARGE 1" >>confdefs.h ;; everything) $as_echo "#define GASNET_SEGMENT_EVERYTHING 1" >>confdefs.h ;; *) as_fn_error $? "Conflicting shared segment configurations specified" "$LINENO" 5 ;; esac # Do it all again because AM_CONDITIONAL()s can't go inside if or case. # Groan. if test "$segconfig" = fast; then GASNET_SEGMENT_FAST_TRUE= GASNET_SEGMENT_FAST_FALSE='#' else GASNET_SEGMENT_FAST_TRUE='#' GASNET_SEGMENT_FAST_FALSE= fi if test "$segconfig" = large; then GASNET_SEGMENT_LARGE_TRUE= GASNET_SEGMENT_LARGE_FALSE='#' else GASNET_SEGMENT_LARGE_TRUE='#' GASNET_SEGMENT_LARGE_FALSE= fi if test "$segconfig" = everything; then GASNET_SEGMENT_EVERYTHING_TRUE= GASNET_SEGMENT_EVERYTHING_FALSE='#' else GASNET_SEGMENT_EVERYTHING_TRUE='#' GASNET_SEGMENT_EVERYTHING_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_LIBGCC vvvvvvvvvvvvvvvvvvvvvv (L:1) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgcc link flags" >&5 $as_echo_n "checking for libgcc link flags... " >&6; } if ${gasnet_cv_lib_gcc+:} false; then : $as_echo_n "(cached) " >&6 else if test "$GCC" = yes; then #LIBGCC="`$CC -v 2>&1 | sed -n 's:^Reading specs from \(.*\)/specs$:-L\1 -lgcc:p'`" if test "$CC_SUBFAMILY" = 'NVIDIA'; then rm -f conftest.c echo 'int foo;' > conftest.c LIBGCC="-L`$CC -c conftest.c -Xcompiler -print-libgcc-file-name | xargs dirname` -lgcc" rm -rf conftest* else LIBGCC="-L`$CC -print-libgcc-file-name | xargs dirname` -lgcc" fi if test -z "$LIBGCC"; then echo echo "configure error: cannot find libgcc" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi fi gasnet_cv_lib_gcc="$LIBGCC" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_lib_gcc" >&5 $as_echo "$gasnet_cv_lib_gcc" >&6; } LIBGCC="$gasnet_cv_lib_gcc" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LIBGCC ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_RESTRICT vvvvvvvvvvvvvvvvvvvvvv (L:1) restrict_keyword="" # Due to xlc/mpcc_r oddity on AIX, we check "__restrict__" before "restrict". # Both ID the same, but xlc accepts either while mpcc_r only takes "__restrict__". if test "$restrict_keyword" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for __restrict__ keyword,gasneti_cc__restrict__,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __restrict__ keyword" >&5 $as_echo_n "checking for __restrict__ keyword... " >&6; } if ${gasnet_cv_gasneti_cc__restrict__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int dummy(void * __restrict__ p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_gasneti_cc__restrict__=yes else gasnet_cv_gasneti_cc__restrict__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_cc__restrict__" >&5 $as_echo "$gasnet_cv_gasneti_cc__restrict__" >&6; } if test "$gasnet_cv_gasneti_cc__restrict__" = yes; then : restrict_keyword="__restrict__" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for __restrict__ keyword,gasneti_cc__restrict__,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$restrict_keyword" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for restrict keyword,gasneti_ccrestrict,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for restrict keyword" >&5 $as_echo_n "checking for restrict keyword... " >&6; } if ${gasnet_cv_gasneti_ccrestrict+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int dummy(void * restrict p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_gasneti_ccrestrict=yes else gasnet_cv_gasneti_ccrestrict=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_ccrestrict" >&5 $as_echo "$gasnet_cv_gasneti_ccrestrict" >&6; } if test "$gasnet_cv_gasneti_ccrestrict" = yes; then : restrict_keyword="restrict" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for restrict keyword,gasneti_ccrestrict,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$restrict_keyword" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for __restrict keyword,gasneti_cc__restrict,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __restrict keyword" >&5 $as_echo_n "checking for __restrict keyword... " >&6; } if ${gasnet_cv_gasneti_cc__restrict+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int dummy(void * __restrict p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_gasneti_cc__restrict=yes else gasnet_cv_gasneti_cc__restrict=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_cc__restrict" >&5 $as_echo "$gasnet_cv_gasneti_cc__restrict" >&6; } if test "$gasnet_cv_gasneti_cc__restrict" = yes; then : restrict_keyword="__restrict" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for __restrict keyword,gasneti_cc__restrict,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi cat >>confdefs.h <<_ACEOF #define GASNETI_CC_RESTRICT $restrict_keyword _ACEOF restrict_on_typedefs=0 # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for restrict qualifying typedefs,gasneti_cc_restrict_typedefs,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for restrict qualifying typedefs" >&5 $as_echo_n "checking for restrict qualifying typedefs... " >&6; } if ${gasnet_cv_gasneti_cc_restrict_typedefs+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef void *foo_t; int dummy(foo_t GASNETI_CC_RESTRICT p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_gasneti_cc_restrict_typedefs=yes else gasnet_cv_gasneti_cc_restrict_typedefs=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_cc_restrict_typedefs" >&5 $as_echo "$gasnet_cv_gasneti_cc_restrict_typedefs" >&6; } if test "$gasnet_cv_gasneti_cc_restrict_typedefs" = yes; then : restrict_on_typedefs=1 else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for restrict qualifying typedefs,gasneti_cc_restrict_typedefs,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_CC_RESTRICT_MAY_QUALIFY_TYPEDEFS $restrict_on_typedefs _ACEOF # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_RESTRICT ^^^^^^^^^^^^^^^^^^^^^^ (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_ASM_SUPPORT(C compiler,CC) vvvvvvvvvvvvvvvvvvvvvv (L:1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -I$TOP_SRCDIR/other" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) case "$CC_FAMILY" in Sun) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C compiler for simple inline asm() support,cc_simple_asm,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler for simple inline asm() support" >&5 $as_echo_n "checking C compiler for simple inline asm() support... " >&6; } if ${gasnet_cv_cc_simple_asm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { asm("nop"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_simple_asm=yes else gasnet_cv_cc_simple_asm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_simple_asm" >&5 $as_echo "$gasnet_cv_cc_simple_asm" >&6; } if test "$gasnet_cv_cc_simple_asm" = yes; then : $as_echo "#define GASNETI_HAVE_CC_SIMPLE_ASM 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C compiler for simple inline asm() support,cc_simple_asm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # We lack a reliable configure probe to diagnose broken GCC inline asm support on Sun C # We only know 5.12 and newer on x86/x86-64 are reliable (see bug 2941) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C compiler for GCC inline asm support,cc_gcc_asm,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler for GCC inline asm support" >&5 $as_echo_n "checking C compiler for GCC inline asm support... " >&6; } if ${gasnet_cv_cc_gcc_asm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "gasnet_portable_platform.h" int main () { #if (PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64) && PLATFORM_COMPILER_VERSION_GE(5,12,0) __asm__ __volatile__ ("lock; addl \$0,0(%%esp)" : : : "memory", "cc"); #else #error Support has not been verified #endif ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_gcc_asm=yes else gasnet_cv_cc_gcc_asm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_gcc_asm" >&5 $as_echo "$gasnet_cv_cc_gcc_asm" >&6; } if test "$gasnet_cv_cc_gcc_asm" = yes; then : $as_echo "#define GASNETI_HAVE_CC_GCC_ASM 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C compiler for GCC inline asm support,cc_gcc_asm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; XLC) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GCC_ASM(C compiler,CC) vvvvvvvvvvvvvvvvvvvvvv (L:2) case "$target_cpu" in # TODO: expand as this becomes reachable on other CPUs rs6000|powerpc*) gcc_asm_string='"sync"';; *) as_fn_error $? "Internal error - GASNET_CHECK_GCC_ASM called for unknown architecture" "$LINENO" 5 ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C compiler for GCC inline asm support,cc_gcc_asm,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler for GCC inline asm support" >&5 $as_echo_n "checking C compiler for GCC inline asm support... " >&6; } if ${gasnet_cv_cc_gcc_asm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__ __volatile__ ($gcc_asm_string); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_gcc_asm=yes else gasnet_cv_cc_gcc_asm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_gcc_asm" >&5 $as_echo "$gasnet_cv_cc_gcc_asm" >&6; } if test "$gasnet_cv_cc_gcc_asm" = yes; then : $as_echo "#define GASNETI_HAVE_CC_GCC_ASM 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C compiler for GCC inline asm support,cc_gcc_asm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; GNU|Intel|Pathscale|Open64|Clang|NVHPC|PGI|TINY) # Currently believe all of these support GCC-style inline ASM on all CPUs # where we use it. If that is ever *not* the case then one should split # off the case for the relevant compiler and apply banlists or probes. # NOTE: be sure to keep gasnet_asm.h in-sync with any changes made here. $as_echo "#define GASNETI_HAVE_CC_GCC_ASM 1" >>confdefs.h ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C compiler for 32-bit __sync atomics support,cc_sync_atomics_32,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler for 32-bit __sync atomics support" >&5 $as_echo_n "checking C compiler for 32-bit __sync atomics support... " >&6; } if ${gasnet_cv_cc_sync_atomics_32+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "portable_inttypes.h" int main () { struct { volatile uint32_t ctr; } x = { 2 }; uint32_t op = 1; uint32_t oval = 2; uint32_t nval = 3; volatile uint32_t result; result = __sync_bool_compare_and_swap(&(x.ctr), oval, nval) + __sync_val_compare_and_swap(&(x.ctr), nval, oval) + __sync_fetch_and_add(&(x.ctr), op); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_sync_atomics_32=yes else gasnet_cv_cc_sync_atomics_32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_sync_atomics_32" >&5 $as_echo "$gasnet_cv_cc_sync_atomics_32" >&6; } if test "$gasnet_cv_cc_sync_atomics_32" = yes; then : $as_echo "#define GASNETI_HAVE_CC_SYNC_ATOMICS_32 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C compiler for 32-bit __sync atomics support,cc_sync_atomics_32,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C compiler for 64-bit __sync atomics support,cc_sync_atomics_64,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler for 64-bit __sync atomics support" >&5 $as_echo_n "checking C compiler for 64-bit __sync atomics support... " >&6; } if ${gasnet_cv_cc_sync_atomics_64+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "portable_inttypes.h" int main () { struct { volatile uint64_t ctr; } x = { 2 }; uint64_t op = 1; uint64_t oval = 2; uint64_t nval = 3; volatile uint64_t result; result = __sync_bool_compare_and_swap(&(x.ctr), oval, nval) + __sync_val_compare_and_swap(&(x.ctr), nval, oval) + __sync_fetch_and_add(&(x.ctr), op); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_sync_atomics_64=yes else gasnet_cv_cc_sync_atomics_64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_sync_atomics_64" >&5 $as_echo "$gasnet_cv_cc_sync_atomics_64" >&6; } if test "$gasnet_cv_cc_sync_atomics_64" = yes; then : $as_echo "#define GASNETI_HAVE_CC_SYNC_ATOMICS_64 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C compiler for 64-bit __sync atomics support,cc_sync_atomics_64,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_ASM_SUPPORT ^^^^^^^^^^^^^^^^^^^^^^ (L:2) inlinemod="" case "$CC_FAMILY" in XLC) # force __inline on XLC, to avoid warnings inlinemod=__inline ;; esac if test -z "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(C compiler for inline modifier,ccmodinline,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler for inline modifier" >&5 $as_echo_n "checking C compiler for inline modifier... " >&6; } if ${gasnet_cv_ccmodinline+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ inline int dummy(void) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_ccmodinline=yes else gasnet_cv_ccmodinline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ccmodinline" >&5 $as_echo "$gasnet_cv_ccmodinline" >&6; } if test "$gasnet_cv_ccmodinline" = yes; then : inlinemod="inline" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(C compiler for inline modifier,ccmodinline,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test -z "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(C compiler for __inline__ modifier,ccmod__inline__,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler for __inline__ modifier" >&5 $as_echo_n "checking C compiler for __inline__ modifier... " >&6; } if ${gasnet_cv_ccmod__inline__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ __inline__ int dummy(void) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_ccmod__inline__=yes else gasnet_cv_ccmod__inline__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ccmod__inline__" >&5 $as_echo "$gasnet_cv_ccmod__inline__" >&6; } if test "$gasnet_cv_ccmod__inline__" = yes; then : inlinemod="__inline__" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(C compiler for __inline__ modifier,ccmod__inline__,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test -z "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(C compiler for __inline modifier,ccmod__inline,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler for __inline modifier" >&5 $as_echo_n "checking C compiler for __inline modifier... " >&6; } if ${gasnet_cv_ccmod__inline+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ __inline int dummy(void) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_ccmod__inline=yes else gasnet_cv_ccmod__inline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ccmod__inline" >&5 $as_echo "$gasnet_cv_ccmod__inline" >&6; } if test "$gasnet_cv_ccmod__inline" = yes; then : inlinemod="__inline" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(C compiler for __inline modifier,ccmod__inline,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test -z "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(C compiler for _inline modifier,ccmod_inline,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler for _inline modifier" >&5 $as_echo_n "checking C compiler for _inline modifier... " >&6; } if ${gasnet_cv_ccmod_inline+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _inline int dummy(void) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_ccmod_inline=yes else gasnet_cv_ccmod_inline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ccmod_inline" >&5 $as_echo "$gasnet_cv_ccmod_inline" >&6; } if test "$gasnet_cv_ccmod_inline" = yes; then : inlinemod="_inline" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(C compiler for _inline modifier,ccmod_inline,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test -z "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(C compiler for _Inline modifier,ccmod_Inline,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler for _Inline modifier" >&5 $as_echo_n "checking C compiler for _Inline modifier... " >&6; } if ${gasnet_cv_ccmod_Inline+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _Inline int dummy(void) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_ccmod_Inline=yes else gasnet_cv_ccmod_Inline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ccmod_Inline" >&5 $as_echo "$gasnet_cv_ccmod_Inline" >&6; } if test "$gasnet_cv_ccmod_Inline" = yes; then : inlinemod="_Inline" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(C compiler for _Inline modifier,ccmod_Inline,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test -n "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(C compiler for working 'static $inlinemod',cc_static_inline,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C compiler for working 'static $inlinemod'" >&5 $as_echo_n "checking C compiler for working 'static $inlinemod'... " >&6; } if ${gasnet_cv_cc_static_inline+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ static $inlinemod int dummy() { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_static_inline=yes else gasnet_cv_cc_static_inline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_static_inline" >&5 $as_echo "$gasnet_cv_cc_static_inline" >&6; } if test "$gasnet_cv_cc_static_inline" = yes; then : inlinemod="static $inlinemod" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(C compiler for working 'static $inlinemod',cc_static_inline,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi cat >>confdefs.h <<_ACEOF #define GASNETI_CC_INLINE_MODIFIER $inlinemod _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__always_inline__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__always_inline__))" >&5 $as_echo_n "checking for __attribute__((__always_inline__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_alwaysinline+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_alwaysinline='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_alwaysinline='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_alwaysinline='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_alwaysinline='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_alwaysinline='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_alwaysinline" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_alwaysinline" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_alwaysinline" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_ALWAYSINLINE 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_ALWAYSINLINE 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__always_inline__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__noinline__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__noinline__))" >&5 $as_echo_n "checking for __attribute__((__noinline__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_noinline+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_noinline='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_noinline='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_noinline='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_noinline='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_noinline='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_noinline" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_noinline" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_noinline" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_NOINLINE 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_NOINLINE 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__noinline__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__malloc__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__malloc__))" >&5 $as_echo_n "checking for __attribute__((__malloc__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_malloc+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < __attribute__((__malloc__)) void * dummy(void) { return malloc(14); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_malloc='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_malloc='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_malloc='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_malloc='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_malloc='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_malloc" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_malloc" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_malloc" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_MALLOC 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_MALLOC 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__malloc__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__warn_unused_result__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__warn_unused_result__))" >&5 $as_echo_n "checking for __attribute__((__warn_unused_result__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_warnunusedresult+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_warnunusedresult='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_warnunusedresult='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_warnunusedresult='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_warnunusedresult='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_warnunusedresult='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_warnunusedresult" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_warnunusedresult" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_warnunusedresult" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_WARNUNUSEDRESULT 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_WARNUNUSEDRESULT 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__warn_unused_result__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__used__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__used__))" >&5 $as_echo_n "checking for __attribute__((__used__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_used+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < __attribute__((__used__)) void dummy(void) { abort(); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_used='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_used='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_used='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_used='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_used='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_used" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_used" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_used" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_USED 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_USED 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__used__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__may_alias__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__may_alias__))" >&5 $as_echo_n "checking for __attribute__((__may_alias__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_mayalias+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_mayalias='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_mayalias='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_mayalias='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_mayalias='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_mayalias='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_mayalias" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_mayalias" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_mayalias" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_MAYALIAS 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_MAYALIAS 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__may_alias__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__noreturn__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__noreturn__))" >&5 $as_echo_n "checking for __attribute__((__noreturn__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_noreturn+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < __attribute__((__noreturn__)) void dummy(void) { abort(); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_noreturn='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_noreturn='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_noreturn='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_noreturn='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_noreturn='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_noreturn" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_noreturn" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_noreturn" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_NORETURN 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_NORETURN 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__noreturn__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__const__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__const__))" >&5 $as_echo_n "checking for __attribute__((__const__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_const+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_const='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_const='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_const='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_const='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_const='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_const" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_const" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_const" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_CONST 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_CONST 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__const__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__pure__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__pure__))" >&5 $as_echo_n "checking for __attribute__((__pure__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_pure+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_pure='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_pure='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_pure='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_pure='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_pure='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_pure" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_pure" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_pure" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_PURE 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_PURE 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__pure__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__hot__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__hot__))" >&5 $as_echo_n "checking for __attribute__((__hot__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_hot+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_hot='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_hot='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_hot='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_hot='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_hot='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_hot" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_hot" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_hot" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_HOT 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_HOT 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__hot__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__cold__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__cold__))" >&5 $as_echo_n "checking for __attribute__((__cold__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_cold+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_cold='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_cold='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_cold='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_cold='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_cold='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_cold" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_cold" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_cold" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_COLD 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_COLD 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__cold__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__deprecated__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__deprecated__))" >&5 $as_echo_n "checking for __attribute__((__deprecated__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_deprecated+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_deprecated='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_deprecated='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_deprecated='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_deprecated='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_deprecated='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_deprecated" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_deprecated" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_deprecated" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_DEPRECATED 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_DEPRECATED 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__deprecated__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__common__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__common__))" >&5 $as_echo_n "checking for __attribute__((__common__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_common+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_common='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_common='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_common='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_common='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_common='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_common" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_common" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_common" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_COMMON 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_COMMON 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__common__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__fallthrough__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__fallthrough__))" >&5 $as_echo_n "checking for __attribute__((__fallthrough__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_fallthrough+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_fallthrough='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_fallthrough='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_fallthrough='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_fallthrough='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_fallthrough='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_fallthrough" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_fallthrough" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_fallthrough" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_FALLTHROUGH 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_FALLTHROUGH 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__fallthrough__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__format__) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__format__))" >&5 $as_echo_n "checking for __attribute__((__format__))... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_format+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < __attribute__((__format__ (__printf__, 1, 2))) void dummy(const char *fmt,...) { va_list argptr; va_start(argptr, fmt); va_end(argptr); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_format='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_format='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_format='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_format='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_format='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_format" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_format" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_format" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_FORMAT 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_FORMAT 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CC,,__format__) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__format__)) on function pointers" >&5 $as_echo_n "checking for __attribute__((__format__)) on function pointers... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_format_funcptr+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_format_funcptr='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_format_funcptr='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_format_funcptr='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_format_funcptr='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_format_funcptr='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_format_funcptr" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_format_funcptr" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_format_funcptr" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_FORMAT_FUNCPTR 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_FORMAT_FUNCPTR 0" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((__format__)) on function pointers as arguments" >&5 $as_echo_n "checking for __attribute__((__format__)) on function pointers as arguments... " >&6; } if ${gasnet_cv_gasneti_have_cc_attr_format_funcptr_arg+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_attr_format_funcptr_arg='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_format_funcptr_arg='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_attr_format_funcptr_arg='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_attr_format_funcptr_arg='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_attr_format_funcptr_arg='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_attr_format_funcptr_arg" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_attr_format_funcptr_arg" >&6; } if test "$gasnet_cv_gasneti_have_cc_attr_format_funcptr_arg" = yes; then $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_FORMAT_FUNCPTR_ARG 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_ATTRIBUTE_FORMAT_FUNCPTR_ARG 0" >>confdefs.h fi # bug 3613: try to enable any warning settings that might be relevant to -Wunknown-pragmas # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) _gasnet_CPPFLAGS_back="$CPPFLAGS" for flag in '-Wall' '-Wextra' '-Wunknown-pragmas' ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler flag $flag" >&5 $as_echo_n "checking for compiler flag $flag... " >&6; } CPPFLAGS="$CPPFLAGS $flag" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; _gasnet_CPPFLAGS_back="$CPPFLAGS" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; CPPFLAGS="$_gasnet_CPPFLAGS_back" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; _gasnet_CPPFLAGS_back="$CPPFLAGS" else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; CPPFLAGS="$_gasnet_CPPFLAGS_back" fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; CPPFLAGS="$_gasnet_CPPFLAGS_back" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic push/pop/ignored" >&5 $as_echo_n "checking for pragma GCC diagnostic push/pop/ignored... " >&6; } if ${gasnet_cv_gasneti_have_cc_pragma_gcc_diagnostic+:} false; then : $as_echo_n "(cached) " >&6 else # Note we're not checking whether the pragma actually *does* anything, # we only care that it doesn't generate new warnings, ie silently ignored is fine for our purposes # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cc_pragma_gcc_diagnostic='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_pragma_gcc_diagnostic='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_cc_pragma_gcc_diagnostic='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cc_pragma_gcc_diagnostic='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cc_pragma_gcc_diagnostic='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc_pragma_gcc_diagnostic" >&5 $as_echo "$gasnet_cv_gasneti_have_cc_pragma_gcc_diagnostic" >&6; } if test "$gasnet_cv_gasneti_have_cc_pragma_gcc_diagnostic" = yes; then $as_echo "#define GASNETI_HAVE_CC_PRAGMA_GCC_DIAGNOSTIC 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CC_PRAGMA_GCC_DIAGNOSTIC 0" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_BUILTINS vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __assume,gasneti_have_cc__assume,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __assume" >&5 $as_echo_n "checking for __assume... " >&6; } if ${gasnet_cv_gasneti_have_cc__assume+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { __assume(x == 0); if (x) __assume(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cc__assume=yes else gasnet_cv_gasneti_have_cc__assume=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc__assume" >&5 $as_echo "$gasnet_cv_gasneti_have_cc__assume" >&6; } if test "$gasnet_cv_gasneti_have_cc__assume" = yes; then : $as_echo "#define GASNETI_HAVE_CC_ASSUME 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __assume,gasneti_have_cc__assume,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_assume,gasneti_have_cc__builtin_assume,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_assume" >&5 $as_echo_n "checking for __builtin_assume... " >&6; } if ${gasnet_cv_gasneti_have_cc__builtin_assume+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { __builtin_assume(x == 0); if (x) __builtin_assume(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cc__builtin_assume=yes else gasnet_cv_gasneti_have_cc__builtin_assume=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc__builtin_assume" >&5 $as_echo "$gasnet_cv_gasneti_have_cc__builtin_assume" >&6; } if test "$gasnet_cv_gasneti_have_cc__builtin_assume" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_ASSUME 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_assume,gasneti_have_cc__builtin_assume,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_unreachable,gasneti_have_cc__builtin_unreachable,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5 $as_echo_n "checking for __builtin_unreachable... " >&6; } if ${gasnet_cv_gasneti_have_cc__builtin_unreachable+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { if (x) { __builtin_unreachable(), ((void)0); } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cc__builtin_unreachable=yes else gasnet_cv_gasneti_have_cc__builtin_unreachable=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc__builtin_unreachable" >&5 $as_echo "$gasnet_cv_gasneti_have_cc__builtin_unreachable" >&6; } if test "$gasnet_cv_gasneti_have_cc__builtin_unreachable" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_UNREACHABLE 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_unreachable,gasneti_have_cc__builtin_unreachable,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_expect,gasneti_have_cc__builtin_expect,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5 $as_echo_n "checking for __builtin_expect... " >&6; } if ${gasnet_cv_gasneti_have_cc__builtin_expect+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { if (__builtin_expect(x,1)) return 1; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cc__builtin_expect=yes else gasnet_cv_gasneti_have_cc__builtin_expect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc__builtin_expect" >&5 $as_echo "$gasnet_cv_gasneti_have_cc__builtin_expect" >&6; } if test "$gasnet_cv_gasneti_have_cc__builtin_expect" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_EXPECT 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_expect,gasneti_have_cc__builtin_expect,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_constant_p,gasneti_have_cc__builtin_constant_p,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5 $as_echo_n "checking for __builtin_constant_p... " >&6; } if ${gasnet_cv_gasneti_have_cc__builtin_constant_p+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { x = __builtin_constant_p(x) + __builtin_constant_p(2); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cc__builtin_constant_p=yes else gasnet_cv_gasneti_have_cc__builtin_constant_p=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc__builtin_constant_p" >&5 $as_echo "$gasnet_cv_gasneti_have_cc__builtin_constant_p" >&6; } if test "$gasnet_cv_gasneti_have_cc__builtin_constant_p" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_CONSTANT_P 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_constant_p,gasneti_have_cc__builtin_constant_p,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_prefetch,gasneti_have_cc__builtin_prefetch,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_prefetch" >&5 $as_echo_n "checking for __builtin_prefetch... " >&6; } if ${gasnet_cv_gasneti_have_cc__builtin_prefetch+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { __builtin_prefetch(&x,0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cc__builtin_prefetch=yes else gasnet_cv_gasneti_have_cc__builtin_prefetch=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cc__builtin_prefetch" >&5 $as_echo "$gasnet_cv_gasneti_have_cc__builtin_prefetch" >&6; } if test "$gasnet_cv_gasneti_have_cc__builtin_prefetch" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_PREFETCH 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_prefetch,gasneti_have_cc__builtin_prefetch,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_BUILTINS ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_STR(for PLATFORM_COMPILER_IDSTR,PLATFORM_COMPILER_IDSTR,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PLATFORM_COMPILER_IDSTR" >&5 $as_echo_n "checking for PLATFORM_COMPILER_IDSTR... " >&6; } if ${gasnet_cv_PLATFORM_COMPILER_IDSTR+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_COMPILER_IDSTR="" _extractstrembed='"$gasnetextractstr: (-(|" PLATFORM_COMPILER_IDSTR "|)-) $"' # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_PLATFORM_COMPILER_IDSTR=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_IDSTR " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_PLATFORM_COMPILER_IDSTR" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_PLATFORM_COMPILER_IDSTR=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_IDSTR " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_COMPILER_IDSTR" >&5 $as_echo "$gasnet_cv_PLATFORM_COMPILER_IDSTR" >&6; } if test -n "$gasnet_cv_PLATFORM_COMPILER_IDSTR" ; then GASNETI_PLATFORM_COMPILER_IDSTR=$gasnet_cv_PLATFORM_COMPILER_IDSTR fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_STR(for PLATFORM_COMPILER_IDSTR,PLATFORM_COMPILER_IDSTR,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_COMPILER_IDSTR "$GASNETI_PLATFORM_COMPILER_IDSTR" _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(for PLATFORM_COMPILER_FAMILYID,PLATFORM_COMPILER_FAMILYID,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PLATFORM_COMPILER_FAMILYID" >&5 $as_echo_n "checking for PLATFORM_COMPILER_FAMILYID... " >&6; } if ${gasnet_cv_PLATFORM_COMPILER_FAMILYID+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_COMPILER_FAMILYID="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_FAMILYID )>0?( PLATFORM_COMPILER_FAMILYID ):-( PLATFORM_COMPILER_FAMILYID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_FAMILYID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_COMPILER_FAMILYID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_FAMILYID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_PLATFORM_COMPILER_FAMILYID" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_FAMILYID )>0?( PLATFORM_COMPILER_FAMILYID ):-( PLATFORM_COMPILER_FAMILYID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_FAMILYID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_COMPILER_FAMILYID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_FAMILYID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_COMPILER_FAMILYID" >&5 $as_echo "$gasnet_cv_PLATFORM_COMPILER_FAMILYID" >&6; } if test -n "$gasnet_cv_PLATFORM_COMPILER_FAMILYID" ; then GASNETI_PLATFORM_COMPILER_FAMILYID=$gasnet_cv_PLATFORM_COMPILER_FAMILYID fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(for PLATFORM_COMPILER_FAMILYID,PLATFORM_COMPILER_FAMILYID,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_COMPILER_FAMILYID $GASNETI_PLATFORM_COMPILER_FAMILYID _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(for PLATFORM_COMPILER_ID,PLATFORM_COMPILER_ID,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PLATFORM_COMPILER_ID" >&5 $as_echo_n "checking for PLATFORM_COMPILER_ID... " >&6; } if ${gasnet_cv_PLATFORM_COMPILER_ID+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_COMPILER_ID="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_ID )>0?( PLATFORM_COMPILER_ID ):-( PLATFORM_COMPILER_ID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_ID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_COMPILER_ID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_ID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_PLATFORM_COMPILER_ID" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_ID )>0?( PLATFORM_COMPILER_ID ):-( PLATFORM_COMPILER_ID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_ID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_COMPILER_ID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_ID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_COMPILER_ID" >&5 $as_echo "$gasnet_cv_PLATFORM_COMPILER_ID" >&6; } if test -n "$gasnet_cv_PLATFORM_COMPILER_ID" ; then GASNETI_PLATFORM_COMPILER_ID=$gasnet_cv_PLATFORM_COMPILER_ID fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(for PLATFORM_COMPILER_ID,PLATFORM_COMPILER_ID,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_COMPILER_ID $GASNETI_PLATFORM_COMPILER_ID _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(for PLATFORM_COMPILER_VERSION,PLATFORM_COMPILER_VERSION,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PLATFORM_COMPILER_VERSION" >&5 $as_echo_n "checking for PLATFORM_COMPILER_VERSION... " >&6; } if ${gasnet_cv_PLATFORM_COMPILER_VERSION+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_COMPILER_VERSION="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_VERSION )>0?( PLATFORM_COMPILER_VERSION ):-( PLATFORM_COMPILER_VERSION )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_VERSION )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_COMPILER_VERSION=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_VERSION " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_PLATFORM_COMPILER_VERSION" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_VERSION )>0?( PLATFORM_COMPILER_VERSION ):-( PLATFORM_COMPILER_VERSION )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_VERSION )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_COMPILER_VERSION=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_VERSION " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_COMPILER_VERSION" >&5 $as_echo "$gasnet_cv_PLATFORM_COMPILER_VERSION" >&6; } if test -n "$gasnet_cv_PLATFORM_COMPILER_VERSION" ; then GASNETI_PLATFORM_COMPILER_VERSION=$gasnet_cv_PLATFORM_COMPILER_VERSION fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(for PLATFORM_COMPILER_VERSION,PLATFORM_COMPILER_VERSION,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_COMPILER_VERSION $GASNETI_PLATFORM_COMPILER_VERSION _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(for PLATFORM_COMPILER_C_LANGLVL,PLATFORM_COMPILER_C_LANGLVL,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PLATFORM_COMPILER_C_LANGLVL" >&5 $as_echo_n "checking for PLATFORM_COMPILER_C_LANGLVL... " >&6; } if ${gasnet_cv_PLATFORM_COMPILER_C_LANGLVL+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_COMPILER_C_LANGLVL="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_C_LANGLVL )>0?( PLATFORM_COMPILER_C_LANGLVL ):-( PLATFORM_COMPILER_C_LANGLVL )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_C_LANGLVL )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_COMPILER_C_LANGLVL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_C_LANGLVL " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_PLATFORM_COMPILER_C_LANGLVL" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_C_LANGLVL )>0?( PLATFORM_COMPILER_C_LANGLVL ):-( PLATFORM_COMPILER_C_LANGLVL )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_C_LANGLVL )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_COMPILER_C_LANGLVL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_C_LANGLVL " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_COMPILER_C_LANGLVL" >&5 $as_echo "$gasnet_cv_PLATFORM_COMPILER_C_LANGLVL" >&6; } if test -n "$gasnet_cv_PLATFORM_COMPILER_C_LANGLVL" ; then GASNETI_PLATFORM_COMPILER_C_LANGLVL=$gasnet_cv_PLATFORM_COMPILER_C_LANGLVL fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(for PLATFORM_COMPILER_C_LANGLVL,PLATFORM_COMPILER_C_LANGLVL,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_COMPILER_C_LANGLVL $GASNETI_PLATFORM_COMPILER_C_LANGLVL _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__PIC__,...,) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PIC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : $as_echo "#define GASNETI_CONFIGURED_PIC 1" >>confdefs.h fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PIC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define GASNETI_CONFIGURED_PIC 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__PIC__,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) CHECK_TENTATIVE_BASE=gasnet_conftest_tent CHECK_TENTATIVE_SRC=$CHECK_TENTATIVE_BASE.c CHECK_TENTATIVE_OBJ=$CHECK_TENTATIVE_BASE.o { $as_echo "$as_me:${as_lineno-$LINENO}: checking building tentative definition helper object" >&5 $as_echo_n "checking building tentative definition helper object... " >&6; } cat >$CHECK_TENTATIVE_SRC <<_GASNET_EOF int tentative; void increment(void) { tentative += 1; } _GASNET_EOF compile="$CC $CFLAGS $CPPFLAGS -c $CHECK_TENTATIVE_SRC -o $CHECK_TENTATIVE_OBJ" eval echo "$compile" >&5 if eval $compile 2>&5 && test -s $CHECK_TENTATIVE_OBJ ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else echo echo "configure error: failed while building tentative definition helper object" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi unset GASNETI_COMMON # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$CHECK_TENTATIVE_OBJ $LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$CHECK_TENTATIVE_OBJ $LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$CHECK_TENTATIVE_OBJ $LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_WITHCC(for tentative definition support,have_tentative_normal,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for tentative definition support,have_tentative_normal,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tentative definition support" >&5 $as_echo_n "checking for tentative definition support... " >&6; } if ${gasnet_cv_have_tentative_normal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int tentative; extern void increment(void); int main () { tentative = 1; increment(); return (tentative != 2); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_have_tentative_normal=yes else gasnet_cv_have_tentative_normal=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_tentative_normal" >&5 $as_echo "$gasnet_cv_have_tentative_normal" >&6; } if test "$gasnet_cv_have_tentative_normal" = yes; then : GASNETI_COMMON='' else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for tentative definition support,have_tentative_normal,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for tentative definition support,have_tentative_normal,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tentative definition support" >&5 $as_echo_n "checking for tentative definition support... " >&6; } if ${gasnet_cv_have_tentative_normal+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int tentative; extern void increment(void); int main(void) { tentative = 1; increment(); return (tentative != 2); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_have_tentative_normal=yes else gasnet_cv_have_tentative_normal=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_tentative_normal" >&5 $as_echo "$gasnet_cv_have_tentative_normal" >&6; } if test "$gasnet_cv_have_tentative_normal" = yes; then : GASNETI_COMMON='' else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for tentative definition support,have_tentative_normal,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_WITHCC(for tentative definition support,have_tentative_normal,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "${GASNETI_COMMON+set}" != set; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$CHECK_TENTATIVE_OBJ $LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$CHECK_TENTATIVE_OBJ $LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$CHECK_TENTATIVE_OBJ $LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_WITHCC(for tentative definition support via "common" attribute,have_tentative_common_attribute,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for tentative definition support via "common" attribute,have_tentative_common_attribute,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tentative definition support via \"common\" attribute" >&5 $as_echo_n "checking for tentative definition support via \"common\" attribute... " >&6; } if ${gasnet_cv_have_tentative_common_attribute+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ __attribute__((__common__)) int tentative; extern void increment(void); int main () { tentative = 1; increment(); return (tentative != 2); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_have_tentative_common_attribute=yes else gasnet_cv_have_tentative_common_attribute=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_tentative_common_attribute" >&5 $as_echo "$gasnet_cv_have_tentative_common_attribute" >&6; } if test "$gasnet_cv_have_tentative_common_attribute" = yes; then : GASNETI_COMMON='__attribute__((__common__))' else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for tentative definition support via "common" attribute,have_tentative_common_attribute,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for tentative definition support via "common" attribute,have_tentative_common_attribute,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tentative definition support via \"common\" attribute" >&5 $as_echo_n "checking for tentative definition support via \"common\" attribute... " >&6; } if ${gasnet_cv_have_tentative_common_attribute+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ __attribute__((__common__)) int tentative; extern void increment(void); int main(void) { tentative = 1; increment(); return (tentative != 2); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_have_tentative_common_attribute=yes else gasnet_cv_have_tentative_common_attribute=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_tentative_common_attribute" >&5 $as_echo "$gasnet_cv_have_tentative_common_attribute" >&6; } if test "$gasnet_cv_have_tentative_common_attribute" = yes; then : GASNETI_COMMON='__attribute__((__common__))' else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for tentative definition support via "common" attribute,have_tentative_common_attribute,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_WITHCC(for tentative definition support via "common" attribute,have_tentative_common_attribute,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi rm -f $CHECK_TENTATIVE_OBJ if test "${GASNETI_COMMON+set}" = set; then cat >>confdefs.h <<_ACEOF #define GASNETI_COMMON $GASNETI_COMMON _ACEOF else as_fn_error $? "could not determine how to use tentative definitions" "$LINENO" 5 fi rm -f $CHECK_TENTATIVE_SRC $CHECK_TENTATIVE_OBJ ######################################################################## # hunt for 16-, 32-, and 64-bit integer types # vvvvvvvvvvvvvvvvvvvvvv GASNET_SETUP_INTTYPES(,) vvvvvvvvvvvvvvvvvvvvvv (L:2) for ac_header in stddef.h do : ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" if test "x$ac_cv_header_stddef_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDDEF_H 1 _ACEOF echo "#include " >> confdefs.h fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(char,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then SIZEOF_CHAR= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(char) (binary probe),SIZEOF_CHAR,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(char) (binary probe)" >&5 $as_echo_n "checking sizeof(char) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_CHAR+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_CHAR="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(char))>0?(sizeof(char)):-(sizeof(char))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(char))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_CHAR=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(char)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_SIZEOF_CHAR" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(char))>0?(sizeof(char)):-(sizeof(char))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(char))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_CHAR=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(char)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_CHAR" >&5 $as_echo "$gasnet_cv_SIZEOF_CHAR" >&6; } if test -n "$gasnet_cv_SIZEOF_CHAR" ; then SIZEOF_CHAR=$gasnet_cv_SIZEOF_CHAR fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(char) (binary probe),SIZEOF_CHAR,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$SIZEOF_CHAR" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_CHAR,SIZEOF_CHAR,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_CHAR],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_CHAR setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_CHAR setting... " >&6; } envval_src_CROSS_SIZEOF_CHAR="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_CHAR+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_CHAR="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_CHAR="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeofchar+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_CHAR="${_gasneti_nenv_crosssizeofchar}" envval_src_CROSS_SIZEOF_CHAR=given elif test "${_gasneti_cenv_crosssizeofchar+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_CHAR="${_gasneti_cenv_crosssizeofchar}" envval_src_CROSS_SIZEOF_CHAR=conf else gasnet_cv_envvar_CROSS_SIZEOF_CHAR=$envval_default_CROSS_SIZEOF_CHAR envval_src_CROSS_SIZEOF_CHAR=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_CHAR crosssizeofchar $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_CHAR="$gasnet_cv_envvar_CROSS_SIZEOF_CHAR" if test "$CROSS_SIZEOF_CHAR" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_CHAR if test "$envval_src_CROSS_SIZEOF_CHAR" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_CHAR" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_CHAR\"" >&5 $as_echo " \"$CROSS_SIZEOF_CHAR\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_CHAR\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_CHAR\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_CHAR\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_CHAR\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_CHAR\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_CHAR\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_CHAR\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_CHAR\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_CHAR. Please configure --with-CROSS_SIZEOF_CHAR=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_CHAR],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_SIZEOF_CHAR" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_CHAR be set for cross-compilation" "$LINENO" 5 else SIZEOF_CHAR="$CROSS_SIZEOF_CHAR" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_CHAR,SIZEOF_CHAR,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ac_cv_sizeof_char=$SIZEOF_CHAR fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_char,"$ac_cv_sizeof_char") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_char" = "" ; then _pushcnt_ac_cv_sizeof_char=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_char+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_char_$_pushcnt_ac_cv_sizeof_char=\$ac_cv_sizeof_char eval _pushedvarset_ac_cv_sizeof_char_$_pushcnt_ac_cv_sizeof_char=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_char=`expr $_pushcnt_ac_cv_sizeof_char + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_char="$ac_cv_sizeof_char" echo "pushed new ac_cv_sizeof_char value: $ac_cv_sizeof_char" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_char,"$ac_cv_sizeof_char") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_sizeof_char" = "" ; then unset ac_cv_sizeof_char unset ac_cv_type_char fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 $as_echo_n "checking size of char... " >&6; } if ${ac_cv_sizeof_char+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : else if test "$ac_cv_type_char" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (char) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_char=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 $as_echo "$ac_cv_sizeof_char" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_CHAR $ac_cv_sizeof_char _ACEOF gasnet_checksizeoftmp_sizeof_char="$ac_cv_sizeof_char" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_char) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_char" -ge "1"; then _pushcnt_ac_cv_sizeof_char=`expr $_pushcnt_ac_cv_sizeof_char - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_char_$_pushcnt_ac_cv_sizeof_char if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_char=\$_pushedvar_ac_cv_sizeof_char_$_pushcnt_ac_cv_sizeof_char echo "popping ac_cv_sizeof_char back to: $ac_cv_sizeof_char" >&5 else unset ac_cv_sizeof_char echo "popping ac_cv_sizeof_char back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_char" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_char) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_cv_sizeof_char=$gasnet_checksizeoftmp_sizeof_char SIZEOF_CHAR=$gasnet_checksizeoftmp_sizeof_char if test "$SIZEOF_CHAR" = "0" -o "$SIZEOF_CHAR" = "" -o "$ac_cv_sizeof_char" != "$SIZEOF_CHAR"; then echo echo "configure error: failed to find sizeof(char)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_CHAR_indirect=SIZEOF_CHAR cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_CHAR_indirect $SIZEOF_CHAR _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(char,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(short,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then SIZEOF_SHORT= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(short) (binary probe),SIZEOF_SHORT,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(short) (binary probe)" >&5 $as_echo_n "checking sizeof(short) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_SHORT+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_SHORT="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(short))>0?(sizeof(short)):-(sizeof(short))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(short))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_SHORT=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(short)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_SIZEOF_SHORT" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(short))>0?(sizeof(short)):-(sizeof(short))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(short))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_SHORT=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(short)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_SHORT" >&5 $as_echo "$gasnet_cv_SIZEOF_SHORT" >&6; } if test -n "$gasnet_cv_SIZEOF_SHORT" ; then SIZEOF_SHORT=$gasnet_cv_SIZEOF_SHORT fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(short) (binary probe),SIZEOF_SHORT,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$SIZEOF_SHORT" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_SHORT,SIZEOF_SHORT,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_SHORT],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_SHORT setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_SHORT setting... " >&6; } envval_src_CROSS_SIZEOF_SHORT="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_SHORT+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_SHORT="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_SHORT="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeofshort+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_SHORT="${_gasneti_nenv_crosssizeofshort}" envval_src_CROSS_SIZEOF_SHORT=given elif test "${_gasneti_cenv_crosssizeofshort+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_SHORT="${_gasneti_cenv_crosssizeofshort}" envval_src_CROSS_SIZEOF_SHORT=conf else gasnet_cv_envvar_CROSS_SIZEOF_SHORT=$envval_default_CROSS_SIZEOF_SHORT envval_src_CROSS_SIZEOF_SHORT=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_SHORT crosssizeofshort $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_SHORT="$gasnet_cv_envvar_CROSS_SIZEOF_SHORT" if test "$CROSS_SIZEOF_SHORT" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_SHORT if test "$envval_src_CROSS_SIZEOF_SHORT" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_SHORT" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_SHORT\"" >&5 $as_echo " \"$CROSS_SIZEOF_SHORT\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_SHORT\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_SHORT\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_SHORT\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_SHORT\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_SHORT\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_SHORT\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_SHORT\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_SHORT\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_SHORT. Please configure --with-CROSS_SIZEOF_SHORT=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_SHORT],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_SIZEOF_SHORT" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_SHORT be set for cross-compilation" "$LINENO" 5 else SIZEOF_SHORT="$CROSS_SIZEOF_SHORT" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_SHORT,SIZEOF_SHORT,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ac_cv_sizeof_short=$SIZEOF_SHORT fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_short,"$ac_cv_sizeof_short") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_short" = "" ; then _pushcnt_ac_cv_sizeof_short=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_short+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_short_$_pushcnt_ac_cv_sizeof_short=\$ac_cv_sizeof_short eval _pushedvarset_ac_cv_sizeof_short_$_pushcnt_ac_cv_sizeof_short=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_short=`expr $_pushcnt_ac_cv_sizeof_short + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_short="$ac_cv_sizeof_short" echo "pushed new ac_cv_sizeof_short value: $ac_cv_sizeof_short" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_short,"$ac_cv_sizeof_short") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_sizeof_short" = "" ; then unset ac_cv_sizeof_short unset ac_cv_type_short fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 $as_echo_n "checking size of short... " >&6; } if ${ac_cv_sizeof_short+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : else if test "$ac_cv_type_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 $as_echo "$ac_cv_sizeof_short" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF gasnet_checksizeoftmp_sizeof_short="$ac_cv_sizeof_short" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_short) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_short" -ge "1"; then _pushcnt_ac_cv_sizeof_short=`expr $_pushcnt_ac_cv_sizeof_short - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_short_$_pushcnt_ac_cv_sizeof_short if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_short=\$_pushedvar_ac_cv_sizeof_short_$_pushcnt_ac_cv_sizeof_short echo "popping ac_cv_sizeof_short back to: $ac_cv_sizeof_short" >&5 else unset ac_cv_sizeof_short echo "popping ac_cv_sizeof_short back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_short" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_short) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_cv_sizeof_short=$gasnet_checksizeoftmp_sizeof_short SIZEOF_SHORT=$gasnet_checksizeoftmp_sizeof_short if test "$SIZEOF_SHORT" = "0" -o "$SIZEOF_SHORT" = "" -o "$ac_cv_sizeof_short" != "$SIZEOF_SHORT"; then echo echo "configure error: failed to find sizeof(short)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_SHORT_indirect=SIZEOF_SHORT cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_SHORT_indirect $SIZEOF_SHORT _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(short,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(int,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then SIZEOF_INT= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(int) (binary probe),SIZEOF_INT,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(int) (binary probe)" >&5 $as_echo_n "checking sizeof(int) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_INT+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_INT="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(int))>0?(sizeof(int)):-(sizeof(int))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(int))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_INT=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(int)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_SIZEOF_INT" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(int))>0?(sizeof(int)):-(sizeof(int))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(int))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_INT=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(int)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_INT" >&5 $as_echo "$gasnet_cv_SIZEOF_INT" >&6; } if test -n "$gasnet_cv_SIZEOF_INT" ; then SIZEOF_INT=$gasnet_cv_SIZEOF_INT fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(int) (binary probe),SIZEOF_INT,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$SIZEOF_INT" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_INT,SIZEOF_INT,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_INT],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_INT setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_INT setting... " >&6; } envval_src_CROSS_SIZEOF_INT="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_INT+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_INT="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_INT="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeofint+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_INT="${_gasneti_nenv_crosssizeofint}" envval_src_CROSS_SIZEOF_INT=given elif test "${_gasneti_cenv_crosssizeofint+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_INT="${_gasneti_cenv_crosssizeofint}" envval_src_CROSS_SIZEOF_INT=conf else gasnet_cv_envvar_CROSS_SIZEOF_INT=$envval_default_CROSS_SIZEOF_INT envval_src_CROSS_SIZEOF_INT=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_INT crosssizeofint $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_INT="$gasnet_cv_envvar_CROSS_SIZEOF_INT" if test "$CROSS_SIZEOF_INT" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_INT if test "$envval_src_CROSS_SIZEOF_INT" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_INT" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_INT\"" >&5 $as_echo " \"$CROSS_SIZEOF_INT\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_INT\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_INT\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_INT\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_INT\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_INT\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_INT\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_INT\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_INT\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_INT. Please configure --with-CROSS_SIZEOF_INT=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_INT],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_SIZEOF_INT" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_INT be set for cross-compilation" "$LINENO" 5 else SIZEOF_INT="$CROSS_SIZEOF_INT" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_INT,SIZEOF_INT,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ac_cv_sizeof_int=$SIZEOF_INT fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_int,"$ac_cv_sizeof_int") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_int" = "" ; then _pushcnt_ac_cv_sizeof_int=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_int+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_int_$_pushcnt_ac_cv_sizeof_int=\$ac_cv_sizeof_int eval _pushedvarset_ac_cv_sizeof_int_$_pushcnt_ac_cv_sizeof_int=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_int=`expr $_pushcnt_ac_cv_sizeof_int + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_int="$ac_cv_sizeof_int" echo "pushed new ac_cv_sizeof_int value: $ac_cv_sizeof_int" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_int,"$ac_cv_sizeof_int") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_sizeof_int" = "" ; then unset ac_cv_sizeof_int unset ac_cv_type_int fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF gasnet_checksizeoftmp_sizeof_int="$ac_cv_sizeof_int" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_int) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_int" -ge "1"; then _pushcnt_ac_cv_sizeof_int=`expr $_pushcnt_ac_cv_sizeof_int - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_int_$_pushcnt_ac_cv_sizeof_int if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_int=\$_pushedvar_ac_cv_sizeof_int_$_pushcnt_ac_cv_sizeof_int echo "popping ac_cv_sizeof_int back to: $ac_cv_sizeof_int" >&5 else unset ac_cv_sizeof_int echo "popping ac_cv_sizeof_int back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_int" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_int) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_cv_sizeof_int=$gasnet_checksizeoftmp_sizeof_int SIZEOF_INT=$gasnet_checksizeoftmp_sizeof_int if test "$SIZEOF_INT" = "0" -o "$SIZEOF_INT" = "" -o "$ac_cv_sizeof_int" != "$SIZEOF_INT"; then echo echo "configure error: failed to find sizeof(int)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_INT_indirect=SIZEOF_INT cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_INT_indirect $SIZEOF_INT _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(int,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(long,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then SIZEOF_LONG= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(long) (binary probe),SIZEOF_LONG,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(long) (binary probe)" >&5 $as_echo_n "checking sizeof(long) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_LONG+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_LONG="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(long))>0?(sizeof(long)):-(sizeof(long))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(long))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_LONG=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(long)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_SIZEOF_LONG" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(long))>0?(sizeof(long)):-(sizeof(long))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(long))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_LONG=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(long)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_LONG" >&5 $as_echo "$gasnet_cv_SIZEOF_LONG" >&6; } if test -n "$gasnet_cv_SIZEOF_LONG" ; then SIZEOF_LONG=$gasnet_cv_SIZEOF_LONG fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(long) (binary probe),SIZEOF_LONG,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$SIZEOF_LONG" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_LONG,SIZEOF_LONG,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_LONG],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_LONG setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_LONG setting... " >&6; } envval_src_CROSS_SIZEOF_LONG="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_LONG+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_LONG="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_LONG="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeoflong+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_LONG="${_gasneti_nenv_crosssizeoflong}" envval_src_CROSS_SIZEOF_LONG=given elif test "${_gasneti_cenv_crosssizeoflong+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_LONG="${_gasneti_cenv_crosssizeoflong}" envval_src_CROSS_SIZEOF_LONG=conf else gasnet_cv_envvar_CROSS_SIZEOF_LONG=$envval_default_CROSS_SIZEOF_LONG envval_src_CROSS_SIZEOF_LONG=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_LONG crosssizeoflong $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_LONG="$gasnet_cv_envvar_CROSS_SIZEOF_LONG" if test "$CROSS_SIZEOF_LONG" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_LONG if test "$envval_src_CROSS_SIZEOF_LONG" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_LONG" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_LONG\"" >&5 $as_echo " \"$CROSS_SIZEOF_LONG\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_LONG\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_LONG\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_LONG\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_LONG\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_LONG\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_LONG\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_LONG\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_LONG\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_LONG. Please configure --with-CROSS_SIZEOF_LONG=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_LONG],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_SIZEOF_LONG" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_LONG be set for cross-compilation" "$LINENO" 5 else SIZEOF_LONG="$CROSS_SIZEOF_LONG" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_LONG,SIZEOF_LONG,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ac_cv_sizeof_long=$SIZEOF_LONG fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_long,"$ac_cv_sizeof_long") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_long" = "" ; then _pushcnt_ac_cv_sizeof_long=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_long+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_long_$_pushcnt_ac_cv_sizeof_long=\$ac_cv_sizeof_long eval _pushedvarset_ac_cv_sizeof_long_$_pushcnt_ac_cv_sizeof_long=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_long=`expr $_pushcnt_ac_cv_sizeof_long + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_long="$ac_cv_sizeof_long" echo "pushed new ac_cv_sizeof_long value: $ac_cv_sizeof_long" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_long,"$ac_cv_sizeof_long") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_sizeof_long" = "" ; then unset ac_cv_sizeof_long unset ac_cv_type_long fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF gasnet_checksizeoftmp_sizeof_long="$ac_cv_sizeof_long" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_long) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_long" -ge "1"; then _pushcnt_ac_cv_sizeof_long=`expr $_pushcnt_ac_cv_sizeof_long - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_long_$_pushcnt_ac_cv_sizeof_long if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_long=\$_pushedvar_ac_cv_sizeof_long_$_pushcnt_ac_cv_sizeof_long echo "popping ac_cv_sizeof_long back to: $ac_cv_sizeof_long" >&5 else unset ac_cv_sizeof_long echo "popping ac_cv_sizeof_long back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_long" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_long) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_cv_sizeof_long=$gasnet_checksizeoftmp_sizeof_long SIZEOF_LONG=$gasnet_checksizeoftmp_sizeof_long if test "$SIZEOF_LONG" = "0" -o "$SIZEOF_LONG" = "" -o "$ac_cv_sizeof_long" != "$SIZEOF_LONG"; then echo echo "configure error: failed to find sizeof(long)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_LONG_indirect=SIZEOF_LONG cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_LONG_indirect $SIZEOF_LONG _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(long,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(long long,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then SIZEOF_LONG_LONG= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(long long) (binary probe),SIZEOF_LONG_LONG,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(long long) (binary probe)" >&5 $as_echo_n "checking sizeof(long long) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_LONG_LONG+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_LONG_LONG="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(long long))>0?(sizeof(long long)):-(sizeof(long long))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(long long))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_LONG_LONG=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(long long)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_SIZEOF_LONG_LONG" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(long long))>0?(sizeof(long long)):-(sizeof(long long))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(long long))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_LONG_LONG=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(long long)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_LONG_LONG" >&5 $as_echo "$gasnet_cv_SIZEOF_LONG_LONG" >&6; } if test -n "$gasnet_cv_SIZEOF_LONG_LONG" ; then SIZEOF_LONG_LONG=$gasnet_cv_SIZEOF_LONG_LONG fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(long long) (binary probe),SIZEOF_LONG_LONG,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$SIZEOF_LONG_LONG" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_LONG_LONG,SIZEOF_LONG_LONG,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_LONG_LONG],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_LONG_LONG setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_LONG_LONG setting... " >&6; } envval_src_CROSS_SIZEOF_LONG_LONG="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_LONG_LONG+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_LONG_LONG="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_LONG_LONG="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeoflonglong+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_LONG_LONG="${_gasneti_nenv_crosssizeoflonglong}" envval_src_CROSS_SIZEOF_LONG_LONG=given elif test "${_gasneti_cenv_crosssizeoflonglong+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_LONG_LONG="${_gasneti_cenv_crosssizeoflonglong}" envval_src_CROSS_SIZEOF_LONG_LONG=conf else gasnet_cv_envvar_CROSS_SIZEOF_LONG_LONG=$envval_default_CROSS_SIZEOF_LONG_LONG envval_src_CROSS_SIZEOF_LONG_LONG=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_LONG_LONG crosssizeoflonglong $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_LONG_LONG="$gasnet_cv_envvar_CROSS_SIZEOF_LONG_LONG" if test "$CROSS_SIZEOF_LONG_LONG" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_LONG_LONG if test "$envval_src_CROSS_SIZEOF_LONG_LONG" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_LONG_LONG" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_LONG_LONG\"" >&5 $as_echo " \"$CROSS_SIZEOF_LONG_LONG\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_LONG_LONG\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_LONG_LONG\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_LONG_LONG\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_LONG_LONG\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_LONG_LONG\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_LONG_LONG\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_LONG_LONG\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_LONG_LONG\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_LONG_LONG. Please configure --with-CROSS_SIZEOF_LONG_LONG=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_LONG_LONG],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_SIZEOF_LONG_LONG" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_LONG_LONG be set for cross-compilation" "$LINENO" 5 else SIZEOF_LONG_LONG="$CROSS_SIZEOF_LONG_LONG" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_LONG_LONG,SIZEOF_LONG_LONG,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ac_cv_sizeof_long_long=$SIZEOF_LONG_LONG fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_long_long,"$ac_cv_sizeof_long_long") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_long_long" = "" ; then _pushcnt_ac_cv_sizeof_long_long=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_long_long+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_long_long_$_pushcnt_ac_cv_sizeof_long_long=\$ac_cv_sizeof_long_long eval _pushedvarset_ac_cv_sizeof_long_long_$_pushcnt_ac_cv_sizeof_long_long=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_long_long=`expr $_pushcnt_ac_cv_sizeof_long_long + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_long_long="$ac_cv_sizeof_long_long" echo "pushed new ac_cv_sizeof_long_long value: $ac_cv_sizeof_long_long" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_long_long,"$ac_cv_sizeof_long_long") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_sizeof_long_long" = "" ; then unset ac_cv_sizeof_long_long unset ac_cv_type_long_long fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 $as_echo "$ac_cv_sizeof_long_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF gasnet_checksizeoftmp_sizeof_long_long="$ac_cv_sizeof_long_long" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_long_long) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_long_long" -ge "1"; then _pushcnt_ac_cv_sizeof_long_long=`expr $_pushcnt_ac_cv_sizeof_long_long - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_long_long_$_pushcnt_ac_cv_sizeof_long_long if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_long_long=\$_pushedvar_ac_cv_sizeof_long_long_$_pushcnt_ac_cv_sizeof_long_long echo "popping ac_cv_sizeof_long_long back to: $ac_cv_sizeof_long_long" >&5 else unset ac_cv_sizeof_long_long echo "popping ac_cv_sizeof_long_long back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_long_long" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_long_long) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_cv_sizeof_long_long=$gasnet_checksizeoftmp_sizeof_long_long SIZEOF_LONG_LONG=$gasnet_checksizeoftmp_sizeof_long_long if test "$SIZEOF_LONG_LONG" = "0" -o "$SIZEOF_LONG_LONG" = "" -o "$ac_cv_sizeof_long_long" != "$SIZEOF_LONG_LONG"; then echo echo "configure error: failed to find sizeof(long long)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_LONG_LONG_indirect=SIZEOF_LONG_LONG cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_LONG_LONG_indirect $SIZEOF_LONG_LONG _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(long long,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(void *,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then SIZEOF_VOID_P= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(void *) (binary probe),SIZEOF_VOID_P,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(void *) (binary probe)" >&5 $as_echo_n "checking sizeof(void *) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_VOID_P+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_VOID_P="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(void *))>0?(sizeof(void *)):-(sizeof(void *))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(void *))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_VOID_P=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(void *)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_SIZEOF_VOID_P" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(void *))>0?(sizeof(void *)):-(sizeof(void *))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(void *))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_VOID_P=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(void *)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_VOID_P" >&5 $as_echo "$gasnet_cv_SIZEOF_VOID_P" >&6; } if test -n "$gasnet_cv_SIZEOF_VOID_P" ; then SIZEOF_VOID_P=$gasnet_cv_SIZEOF_VOID_P fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(void *) (binary probe),SIZEOF_VOID_P,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$SIZEOF_VOID_P" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_VOID_P,SIZEOF_VOID_P,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_VOID_P],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_VOID_P setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_VOID_P setting... " >&6; } envval_src_CROSS_SIZEOF_VOID_P="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_VOID_P+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_VOID_P="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_VOID_P="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeofvoidp+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_VOID_P="${_gasneti_nenv_crosssizeofvoidp}" envval_src_CROSS_SIZEOF_VOID_P=given elif test "${_gasneti_cenv_crosssizeofvoidp+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_VOID_P="${_gasneti_cenv_crosssizeofvoidp}" envval_src_CROSS_SIZEOF_VOID_P=conf else gasnet_cv_envvar_CROSS_SIZEOF_VOID_P=$envval_default_CROSS_SIZEOF_VOID_P envval_src_CROSS_SIZEOF_VOID_P=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_VOID_P crosssizeofvoidp $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_VOID_P="$gasnet_cv_envvar_CROSS_SIZEOF_VOID_P" if test "$CROSS_SIZEOF_VOID_P" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_VOID_P if test "$envval_src_CROSS_SIZEOF_VOID_P" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_VOID_P" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_VOID_P\"" >&5 $as_echo " \"$CROSS_SIZEOF_VOID_P\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_VOID_P\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_VOID_P\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_VOID_P\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_VOID_P\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_VOID_P\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_VOID_P\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_VOID_P\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_VOID_P\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_VOID_P. Please configure --with-CROSS_SIZEOF_VOID_P=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_VOID_P],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_SIZEOF_VOID_P" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_VOID_P be set for cross-compilation" "$LINENO" 5 else SIZEOF_VOID_P="$CROSS_SIZEOF_VOID_P" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_VOID_P,SIZEOF_VOID_P,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ac_cv_sizeof_void_p=$SIZEOF_VOID_P fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_void_p,"$ac_cv_sizeof_void_p") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_void_p" = "" ; then _pushcnt_ac_cv_sizeof_void_p=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_void_p+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_void_p_$_pushcnt_ac_cv_sizeof_void_p=\$ac_cv_sizeof_void_p eval _pushedvarset_ac_cv_sizeof_void_p_$_pushcnt_ac_cv_sizeof_void_p=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_void_p=`expr $_pushcnt_ac_cv_sizeof_void_p + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_void_p="$ac_cv_sizeof_void_p" echo "pushed new ac_cv_sizeof_void_p value: $ac_cv_sizeof_void_p" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_void_p,"$ac_cv_sizeof_void_p") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_sizeof_void_p" = "" ; then unset ac_cv_sizeof_void_p unset ac_cv_type_void_p fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } if ${ac_cv_sizeof_void_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : else if test "$ac_cv_type_void_p" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 $as_echo "$ac_cv_sizeof_void_p" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF gasnet_checksizeoftmp_sizeof_void_p="$ac_cv_sizeof_void_p" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_void_p) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_void_p" -ge "1"; then _pushcnt_ac_cv_sizeof_void_p=`expr $_pushcnt_ac_cv_sizeof_void_p - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_void_p_$_pushcnt_ac_cv_sizeof_void_p if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_void_p=\$_pushedvar_ac_cv_sizeof_void_p_$_pushcnt_ac_cv_sizeof_void_p echo "popping ac_cv_sizeof_void_p back to: $ac_cv_sizeof_void_p" >&5 else unset ac_cv_sizeof_void_p echo "popping ac_cv_sizeof_void_p back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_void_p" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_void_p) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_cv_sizeof_void_p=$gasnet_checksizeoftmp_sizeof_void_p SIZEOF_VOID_P=$gasnet_checksizeoftmp_sizeof_void_p if test "$SIZEOF_VOID_P" = "0" -o "$SIZEOF_VOID_P" = "" -o "$ac_cv_sizeof_void_p" != "$SIZEOF_VOID_P"; then echo echo "configure error: failed to find sizeof(void *)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_VOID_P_indirect=SIZEOF_VOID_P cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_VOID_P_indirect $SIZEOF_VOID_P _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(void *,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(size_t,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then SIZEOF_SIZE_T= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(size_t) (binary probe),SIZEOF_SIZE_T,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(size_t) (binary probe)" >&5 $as_echo_n "checking sizeof(size_t) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_SIZE_T+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_SIZE_T="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(size_t))>0?(sizeof(size_t)):-(sizeof(size_t))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(size_t))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_SIZE_T=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(size_t)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_SIZEOF_SIZE_T" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(size_t))>0?(sizeof(size_t)):-(sizeof(size_t))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(size_t))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_SIZE_T=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(size_t)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_SIZE_T" >&5 $as_echo "$gasnet_cv_SIZEOF_SIZE_T" >&6; } if test -n "$gasnet_cv_SIZEOF_SIZE_T" ; then SIZEOF_SIZE_T=$gasnet_cv_SIZEOF_SIZE_T fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(size_t) (binary probe),SIZEOF_SIZE_T,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$SIZEOF_SIZE_T" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_SIZE_T,SIZEOF_SIZE_T,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_SIZE_T],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_SIZE_T setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_SIZE_T setting... " >&6; } envval_src_CROSS_SIZEOF_SIZE_T="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_SIZE_T+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_SIZE_T="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_SIZE_T="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeofsizet+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_SIZE_T="${_gasneti_nenv_crosssizeofsizet}" envval_src_CROSS_SIZEOF_SIZE_T=given elif test "${_gasneti_cenv_crosssizeofsizet+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_SIZE_T="${_gasneti_cenv_crosssizeofsizet}" envval_src_CROSS_SIZEOF_SIZE_T=conf else gasnet_cv_envvar_CROSS_SIZEOF_SIZE_T=$envval_default_CROSS_SIZEOF_SIZE_T envval_src_CROSS_SIZEOF_SIZE_T=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_SIZE_T crosssizeofsizet $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_SIZE_T="$gasnet_cv_envvar_CROSS_SIZEOF_SIZE_T" if test "$CROSS_SIZEOF_SIZE_T" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_SIZE_T if test "$envval_src_CROSS_SIZEOF_SIZE_T" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_SIZE_T" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_SIZE_T\"" >&5 $as_echo " \"$CROSS_SIZEOF_SIZE_T\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_SIZE_T\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_SIZE_T\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_SIZE_T\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_SIZE_T\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_SIZE_T\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_SIZE_T\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_SIZE_T\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_SIZE_T\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_SIZE_T. Please configure --with-CROSS_SIZEOF_SIZE_T=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_SIZE_T],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_SIZEOF_SIZE_T" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_SIZE_T be set for cross-compilation" "$LINENO" 5 else SIZEOF_SIZE_T="$CROSS_SIZEOF_SIZE_T" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_SIZE_T,SIZEOF_SIZE_T,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ac_cv_sizeof_size_t=$SIZEOF_SIZE_T fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_size_t,"$ac_cv_sizeof_size_t") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_size_t" = "" ; then _pushcnt_ac_cv_sizeof_size_t=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_size_t+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_size_t_$_pushcnt_ac_cv_sizeof_size_t=\$ac_cv_sizeof_size_t eval _pushedvarset_ac_cv_sizeof_size_t_$_pushcnt_ac_cv_sizeof_size_t=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_size_t=`expr $_pushcnt_ac_cv_sizeof_size_t + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_size_t="$ac_cv_sizeof_size_t" echo "pushed new ac_cv_sizeof_size_t value: $ac_cv_sizeof_size_t" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_size_t,"$ac_cv_sizeof_size_t") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_sizeof_size_t" = "" ; then unset ac_cv_sizeof_size_t unset ac_cv_type_size_t fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : else if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 $as_echo "$ac_cv_sizeof_size_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF gasnet_checksizeoftmp_sizeof_size_t="$ac_cv_sizeof_size_t" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_size_t) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_size_t" -ge "1"; then _pushcnt_ac_cv_sizeof_size_t=`expr $_pushcnt_ac_cv_sizeof_size_t - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_size_t_$_pushcnt_ac_cv_sizeof_size_t if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_size_t=\$_pushedvar_ac_cv_sizeof_size_t_$_pushcnt_ac_cv_sizeof_size_t echo "popping ac_cv_sizeof_size_t back to: $ac_cv_sizeof_size_t" >&5 else unset ac_cv_sizeof_size_t echo "popping ac_cv_sizeof_size_t back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_size_t" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_size_t) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_cv_sizeof_size_t=$gasnet_checksizeoftmp_sizeof_size_t SIZEOF_SIZE_T=$gasnet_checksizeoftmp_sizeof_size_t if test "$SIZEOF_SIZE_T" = "0" -o "$SIZEOF_SIZE_T" = "" -o "$ac_cv_sizeof_size_t" != "$SIZEOF_SIZE_T"; then echo echo "configure error: failed to find sizeof(size_t)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_SIZE_T_indirect=SIZEOF_SIZE_T cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_SIZE_T_indirect $SIZEOF_SIZE_T _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(size_t,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(ptrdiff_t,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then SIZEOF_PTRDIFF_T= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(ptrdiff_t) (binary probe),SIZEOF_PTRDIFF_T,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(ptrdiff_t) (binary probe)" >&5 $as_echo_n "checking sizeof(ptrdiff_t) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_PTRDIFF_T+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_PTRDIFF_T="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(ptrdiff_t))>0?(sizeof(ptrdiff_t)):-(sizeof(ptrdiff_t))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(ptrdiff_t))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_PTRDIFF_T=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(ptrdiff_t)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_SIZEOF_PTRDIFF_T" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(ptrdiff_t))>0?(sizeof(ptrdiff_t)):-(sizeof(ptrdiff_t))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(ptrdiff_t))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_PTRDIFF_T=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(ptrdiff_t)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_PTRDIFF_T" >&5 $as_echo "$gasnet_cv_SIZEOF_PTRDIFF_T" >&6; } if test -n "$gasnet_cv_SIZEOF_PTRDIFF_T" ; then SIZEOF_PTRDIFF_T=$gasnet_cv_SIZEOF_PTRDIFF_T fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(ptrdiff_t) (binary probe),SIZEOF_PTRDIFF_T,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$SIZEOF_PTRDIFF_T" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_PTRDIFF_T,SIZEOF_PTRDIFF_T,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_PTRDIFF_T],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_PTRDIFF_T setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_PTRDIFF_T setting... " >&6; } envval_src_CROSS_SIZEOF_PTRDIFF_T="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_PTRDIFF_T+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_PTRDIFF_T="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_PTRDIFF_T="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeofptrdifft+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_PTRDIFF_T="${_gasneti_nenv_crosssizeofptrdifft}" envval_src_CROSS_SIZEOF_PTRDIFF_T=given elif test "${_gasneti_cenv_crosssizeofptrdifft+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_PTRDIFF_T="${_gasneti_cenv_crosssizeofptrdifft}" envval_src_CROSS_SIZEOF_PTRDIFF_T=conf else gasnet_cv_envvar_CROSS_SIZEOF_PTRDIFF_T=$envval_default_CROSS_SIZEOF_PTRDIFF_T envval_src_CROSS_SIZEOF_PTRDIFF_T=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_PTRDIFF_T crosssizeofptrdifft $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_PTRDIFF_T="$gasnet_cv_envvar_CROSS_SIZEOF_PTRDIFF_T" if test "$CROSS_SIZEOF_PTRDIFF_T" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_PTRDIFF_T if test "$envval_src_CROSS_SIZEOF_PTRDIFF_T" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_PTRDIFF_T" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_PTRDIFF_T\"" >&5 $as_echo " \"$CROSS_SIZEOF_PTRDIFF_T\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_PTRDIFF_T\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_PTRDIFF_T\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_PTRDIFF_T\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_PTRDIFF_T\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_PTRDIFF_T\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_PTRDIFF_T\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_PTRDIFF_T\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_PTRDIFF_T\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_PTRDIFF_T. Please configure --with-CROSS_SIZEOF_PTRDIFF_T=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_PTRDIFF_T],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_SIZEOF_PTRDIFF_T" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_PTRDIFF_T be set for cross-compilation" "$LINENO" 5 else SIZEOF_PTRDIFF_T="$CROSS_SIZEOF_PTRDIFF_T" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_PTRDIFF_T,SIZEOF_PTRDIFF_T,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ac_cv_sizeof_ptrdiff_t=$SIZEOF_PTRDIFF_T fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_ptrdiff_t,"$ac_cv_sizeof_ptrdiff_t") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_ptrdiff_t" = "" ; then _pushcnt_ac_cv_sizeof_ptrdiff_t=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_ptrdiff_t+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_ptrdiff_t_$_pushcnt_ac_cv_sizeof_ptrdiff_t=\$ac_cv_sizeof_ptrdiff_t eval _pushedvarset_ac_cv_sizeof_ptrdiff_t_$_pushcnt_ac_cv_sizeof_ptrdiff_t=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_ptrdiff_t=`expr $_pushcnt_ac_cv_sizeof_ptrdiff_t + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_ptrdiff_t="$ac_cv_sizeof_ptrdiff_t" echo "pushed new ac_cv_sizeof_ptrdiff_t value: $ac_cv_sizeof_ptrdiff_t" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_ptrdiff_t,"$ac_cv_sizeof_ptrdiff_t") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_sizeof_ptrdiff_t" = "" ; then unset ac_cv_sizeof_ptrdiff_t unset ac_cv_type_ptrdiff_t fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of ptrdiff_t" >&5 $as_echo_n "checking size of ptrdiff_t... " >&6; } if ${ac_cv_sizeof_ptrdiff_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ptrdiff_t))" "ac_cv_sizeof_ptrdiff_t" "$ac_includes_default"; then : else if test "$ac_cv_type_ptrdiff_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (ptrdiff_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_ptrdiff_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ptrdiff_t" >&5 $as_echo "$ac_cv_sizeof_ptrdiff_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_PTRDIFF_T $ac_cv_sizeof_ptrdiff_t _ACEOF gasnet_checksizeoftmp_sizeof_ptrdiff_t="$ac_cv_sizeof_ptrdiff_t" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_ptrdiff_t) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_ptrdiff_t" -ge "1"; then _pushcnt_ac_cv_sizeof_ptrdiff_t=`expr $_pushcnt_ac_cv_sizeof_ptrdiff_t - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_ptrdiff_t_$_pushcnt_ac_cv_sizeof_ptrdiff_t if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_ptrdiff_t=\$_pushedvar_ac_cv_sizeof_ptrdiff_t_$_pushcnt_ac_cv_sizeof_ptrdiff_t echo "popping ac_cv_sizeof_ptrdiff_t back to: $ac_cv_sizeof_ptrdiff_t" >&5 else unset ac_cv_sizeof_ptrdiff_t echo "popping ac_cv_sizeof_ptrdiff_t back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_ptrdiff_t" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_ptrdiff_t) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_cv_sizeof_ptrdiff_t=$gasnet_checksizeoftmp_sizeof_ptrdiff_t SIZEOF_PTRDIFF_T=$gasnet_checksizeoftmp_sizeof_ptrdiff_t if test "$SIZEOF_PTRDIFF_T" = "0" -o "$SIZEOF_PTRDIFF_T" = "" -o "$ac_cv_sizeof_ptrdiff_t" != "$SIZEOF_PTRDIFF_T"; then echo echo "configure error: failed to find sizeof(ptrdiff_t)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_PTRDIFF_T_indirect=SIZEOF_PTRDIFF_T cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_PTRDIFF_T_indirect $SIZEOF_PTRDIFF_T _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(ptrdiff_t,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test x"$ac_cv_sizeof_int$ac_cv_sizeof_long$ac_cv_sizeof_void_p" = x444; then PLATFORM_ILP32=yes fi if test x"$ac_cv_sizeof_int$ac_cv_sizeof_long$ac_cv_sizeof_void_p" = x488; then PLATFORM_LP64=yes fi if test x"$ac_cv_sizeof_int$ac_cv_sizeof_long$ac_cv_sizeof_void_p" = x888; then PLATFORM_ILP64=yes fi if test "$PLATFORM_ILP32" = "yes"; then PLATFORM_ILP32_TRUE= PLATFORM_ILP32_FALSE='#' else PLATFORM_ILP32_TRUE='#' PLATFORM_ILP32_FALSE= fi if test "$PLATFORM_LP64" = "yes"; then PLATFORM_LP64_TRUE= PLATFORM_LP64_FALSE='#' else PLATFORM_LP64_TRUE='#' PLATFORM_LP64_FALSE= fi if test "$PLATFORM_ILP64" = "yes"; then PLATFORM_ILP64_TRUE= PLATFORM_ILP64_FALSE='#' else PLATFORM_ILP64_TRUE='#' PLATFORM_ILP64_FALSE= fi if test "$PLATFORM_ILP32" = "yes"; then PLATFORM_ILP32_TRUE= PLATFORM_ILP32_FALSE='#' else PLATFORM_ILP32_TRUE='#' PLATFORM_ILP32_FALSE= fi if test "$PLATFORM_LP64" = "yes"; then PLATFORM_LP64_TRUE= PLATFORM_LP64_FALSE='#' else PLATFORM_LP64_TRUE='#' PLATFORM_LP64_FALSE= fi if test "$PLATFORM_ILP64" = "yes"; then PLATFORM_ILP64_TRUE= PLATFORM_ILP64_FALSE='#' else PLATFORM_ILP64_TRUE='#' PLATFORM_ILP64_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_INTTYPES(stdint.h,) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(HAVE_STDINT_H,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_HAVE_STDINT_H" = "" ; then _pushcnt_HAVE_STDINT_H=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${HAVE_STDINT_H+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_HAVE_STDINT_H_$_pushcnt_HAVE_STDINT_H=\$HAVE_STDINT_H eval _pushedvarset_HAVE_STDINT_H_$_pushcnt_HAVE_STDINT_H=$_gasnet_pushvar_isset _pushcnt_HAVE_STDINT_H=`expr $_pushcnt_HAVE_STDINT_H + 1` _total_pushcnt=`expr $_total_pushcnt + 1` HAVE_STDINT_H="" echo "pushed new HAVE_STDINT_H value: $HAVE_STDINT_H" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(HAVE_STDINT_H,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) unset ac_cv_header_stdint_h for ac_header in stdint.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" if test "x$ac_cv_header_stdint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H 1 _ACEOF fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(HAVE_STDINT_H) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_HAVE_STDINT_H" -ge "1"; then _pushcnt_HAVE_STDINT_H=`expr $_pushcnt_HAVE_STDINT_H - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_HAVE_STDINT_H_$_pushcnt_HAVE_STDINT_H if test "$_gasnet_pushvar_isset" = "1" ; then eval HAVE_STDINT_H=\$_pushedvar_HAVE_STDINT_H_$_pushcnt_HAVE_STDINT_H echo "popping HAVE_STDINT_H back to: $HAVE_STDINT_H" >&5 else unset HAVE_STDINT_H echo "popping HAVE_STDINT_H back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on HAVE_STDINT_H" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(HAVE_STDINT_H) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_header_stdint_h" = "yes"; then HAVE_STDINT_H=1 $as_echo "#define HAVE_STDINT_H 1" >>confdefs.h if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for a complete stdint.h,COMPLETE_STDINT_H,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete stdint.h" >&5 $as_echo_n "checking for a complete stdint.h... " >&6; } if ${gasnet_cv_COMPLETE_STDINT_H+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int check() { int8_t i8; uint8_t u8; int16_t i16; uint16_t u16; int32_t i32; uint32_t u32; int64_t i64; uint64_t u64; intptr_t ip; uintptr_t up; if (sizeof(i8) != 1) return 1; if (sizeof(u8) != 1) return 1; if (sizeof(i16) != 2) return 1; if (sizeof(u16) != 2) return 1; if (sizeof(i32) != 4) return 1; if (sizeof(u32) != 4) return 1; if (sizeof(i64) != 8) return 1; if (sizeof(u64) != 8) return 1; if (sizeof(ip) != sizeof(void*)) return 1; if (sizeof(up) != sizeof(void*)) return 1; return 0; } int main () { return check(); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_COMPLETE_STDINT_H=yes else gasnet_cv_COMPLETE_STDINT_H=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_COMPLETE_STDINT_H" >&5 $as_echo "$gasnet_cv_COMPLETE_STDINT_H" >&6; } if test "$gasnet_cv_COMPLETE_STDINT_H" = yes; then : COMPLETE_STDINT_H=1 $as_echo "#define COMPLETE_STDINT_H 1" >>confdefs.h else : $as_echo "#define COMPLETE_STDINT_H 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for a complete stdint.h,COMPLETE_STDINT_H,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for a complete stdint.h,COMPLETE_STDINT_H,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete stdint.h" >&5 $as_echo_n "checking for a complete stdint.h... " >&6; } if ${gasnet_cv_COMPLETE_STDINT_H+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int check() { int8_t i8; uint8_t u8; int16_t i16; uint16_t u16; int32_t i32; uint32_t u32; int64_t i64; uint64_t u64; intptr_t ip; uintptr_t up; if (sizeof(i8) != 1) return 1; if (sizeof(u8) != 1) return 1; if (sizeof(i16) != 2) return 1; if (sizeof(u16) != 2) return 1; if (sizeof(i32) != 4) return 1; if (sizeof(u32) != 4) return 1; if (sizeof(i64) != 8) return 1; if (sizeof(u64) != 8) return 1; if (sizeof(ip) != sizeof(void*)) return 1; if (sizeof(up) != sizeof(void*)) return 1; return 0; } int main(void) { return check(); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_COMPLETE_STDINT_H=yes else gasnet_cv_COMPLETE_STDINT_H=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_COMPLETE_STDINT_H" >&5 $as_echo "$gasnet_cv_COMPLETE_STDINT_H" >&6; } if test "$gasnet_cv_COMPLETE_STDINT_H" = yes; then : COMPLETE_STDINT_H=1 $as_echo "#define COMPLETE_STDINT_H 1" >>confdefs.h else : $as_echo "#define COMPLETE_STDINT_H 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for a complete stdint.h,COMPLETE_STDINT_H,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_INTTYPES(stdint.h,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_INTTYPES(inttypes.h,) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(HAVE_INTTYPES_H,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_HAVE_INTTYPES_H" = "" ; then _pushcnt_HAVE_INTTYPES_H=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${HAVE_INTTYPES_H+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_HAVE_INTTYPES_H_$_pushcnt_HAVE_INTTYPES_H=\$HAVE_INTTYPES_H eval _pushedvarset_HAVE_INTTYPES_H_$_pushcnt_HAVE_INTTYPES_H=$_gasnet_pushvar_isset _pushcnt_HAVE_INTTYPES_H=`expr $_pushcnt_HAVE_INTTYPES_H + 1` _total_pushcnt=`expr $_total_pushcnt + 1` HAVE_INTTYPES_H="" echo "pushed new HAVE_INTTYPES_H value: $HAVE_INTTYPES_H" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(HAVE_INTTYPES_H,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) unset ac_cv_header_inttypes_h for ac_header in inttypes.h do : ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" if test "x$ac_cv_header_inttypes_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H 1 _ACEOF fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(HAVE_INTTYPES_H) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_HAVE_INTTYPES_H" -ge "1"; then _pushcnt_HAVE_INTTYPES_H=`expr $_pushcnt_HAVE_INTTYPES_H - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_HAVE_INTTYPES_H_$_pushcnt_HAVE_INTTYPES_H if test "$_gasnet_pushvar_isset" = "1" ; then eval HAVE_INTTYPES_H=\$_pushedvar_HAVE_INTTYPES_H_$_pushcnt_HAVE_INTTYPES_H echo "popping HAVE_INTTYPES_H back to: $HAVE_INTTYPES_H" >&5 else unset HAVE_INTTYPES_H echo "popping HAVE_INTTYPES_H back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on HAVE_INTTYPES_H" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(HAVE_INTTYPES_H) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_header_inttypes_h" = "yes"; then HAVE_INTTYPES_H=1 $as_echo "#define HAVE_INTTYPES_H 1" >>confdefs.h if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for a complete inttypes.h,COMPLETE_INTTYPES_H,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete inttypes.h" >&5 $as_echo_n "checking for a complete inttypes.h... " >&6; } if ${gasnet_cv_COMPLETE_INTTYPES_H+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int check() { int8_t i8; uint8_t u8; int16_t i16; uint16_t u16; int32_t i32; uint32_t u32; int64_t i64; uint64_t u64; intptr_t ip; uintptr_t up; if (sizeof(i8) != 1) return 1; if (sizeof(u8) != 1) return 1; if (sizeof(i16) != 2) return 1; if (sizeof(u16) != 2) return 1; if (sizeof(i32) != 4) return 1; if (sizeof(u32) != 4) return 1; if (sizeof(i64) != 8) return 1; if (sizeof(u64) != 8) return 1; if (sizeof(ip) != sizeof(void*)) return 1; if (sizeof(up) != sizeof(void*)) return 1; return 0; } int main () { return check(); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_COMPLETE_INTTYPES_H=yes else gasnet_cv_COMPLETE_INTTYPES_H=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_COMPLETE_INTTYPES_H" >&5 $as_echo "$gasnet_cv_COMPLETE_INTTYPES_H" >&6; } if test "$gasnet_cv_COMPLETE_INTTYPES_H" = yes; then : COMPLETE_INTTYPES_H=1 $as_echo "#define COMPLETE_INTTYPES_H 1" >>confdefs.h else : $as_echo "#define COMPLETE_INTTYPES_H 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for a complete inttypes.h,COMPLETE_INTTYPES_H,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for a complete inttypes.h,COMPLETE_INTTYPES_H,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete inttypes.h" >&5 $as_echo_n "checking for a complete inttypes.h... " >&6; } if ${gasnet_cv_COMPLETE_INTTYPES_H+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int check() { int8_t i8; uint8_t u8; int16_t i16; uint16_t u16; int32_t i32; uint32_t u32; int64_t i64; uint64_t u64; intptr_t ip; uintptr_t up; if (sizeof(i8) != 1) return 1; if (sizeof(u8) != 1) return 1; if (sizeof(i16) != 2) return 1; if (sizeof(u16) != 2) return 1; if (sizeof(i32) != 4) return 1; if (sizeof(u32) != 4) return 1; if (sizeof(i64) != 8) return 1; if (sizeof(u64) != 8) return 1; if (sizeof(ip) != sizeof(void*)) return 1; if (sizeof(up) != sizeof(void*)) return 1; return 0; } int main(void) { return check(); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_COMPLETE_INTTYPES_H=yes else gasnet_cv_COMPLETE_INTTYPES_H=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_COMPLETE_INTTYPES_H" >&5 $as_echo "$gasnet_cv_COMPLETE_INTTYPES_H" >&6; } if test "$gasnet_cv_COMPLETE_INTTYPES_H" = yes; then : COMPLETE_INTTYPES_H=1 $as_echo "#define COMPLETE_INTTYPES_H 1" >>confdefs.h else : $as_echo "#define COMPLETE_INTTYPES_H 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for a complete inttypes.h,COMPLETE_INTTYPES_H,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_INTTYPES(inttypes.h,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_INTTYPES(sys/types.h,) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(HAVE_SYS_TYPES_H,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_HAVE_SYS_TYPES_H" = "" ; then _pushcnt_HAVE_SYS_TYPES_H=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${HAVE_SYS_TYPES_H+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_HAVE_SYS_TYPES_H_$_pushcnt_HAVE_SYS_TYPES_H=\$HAVE_SYS_TYPES_H eval _pushedvarset_HAVE_SYS_TYPES_H_$_pushcnt_HAVE_SYS_TYPES_H=$_gasnet_pushvar_isset _pushcnt_HAVE_SYS_TYPES_H=`expr $_pushcnt_HAVE_SYS_TYPES_H + 1` _total_pushcnt=`expr $_total_pushcnt + 1` HAVE_SYS_TYPES_H="" echo "pushed new HAVE_SYS_TYPES_H value: $HAVE_SYS_TYPES_H" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(HAVE_SYS_TYPES_H,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) unset ac_cv_header_sys_types_h for ac_header in sys/types.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" if test "x$ac_cv_header_sys_types_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TYPES_H 1 _ACEOF fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(HAVE_SYS_TYPES_H) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_HAVE_SYS_TYPES_H" -ge "1"; then _pushcnt_HAVE_SYS_TYPES_H=`expr $_pushcnt_HAVE_SYS_TYPES_H - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_HAVE_SYS_TYPES_H_$_pushcnt_HAVE_SYS_TYPES_H if test "$_gasnet_pushvar_isset" = "1" ; then eval HAVE_SYS_TYPES_H=\$_pushedvar_HAVE_SYS_TYPES_H_$_pushcnt_HAVE_SYS_TYPES_H echo "popping HAVE_SYS_TYPES_H back to: $HAVE_SYS_TYPES_H" >&5 else unset HAVE_SYS_TYPES_H echo "popping HAVE_SYS_TYPES_H back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on HAVE_SYS_TYPES_H" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(HAVE_SYS_TYPES_H) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_header_sys_types_h" = "yes"; then HAVE_SYS_TYPES_H=1 $as_echo "#define HAVE_SYS_TYPES_H 1" >>confdefs.h if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for a complete sys/types.h,COMPLETE_SYS_TYPES_H,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete sys/types.h" >&5 $as_echo_n "checking for a complete sys/types.h... " >&6; } if ${gasnet_cv_COMPLETE_SYS_TYPES_H+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int check() { int8_t i8; uint8_t u8; int16_t i16; uint16_t u16; int32_t i32; uint32_t u32; int64_t i64; uint64_t u64; intptr_t ip; uintptr_t up; if (sizeof(i8) != 1) return 1; if (sizeof(u8) != 1) return 1; if (sizeof(i16) != 2) return 1; if (sizeof(u16) != 2) return 1; if (sizeof(i32) != 4) return 1; if (sizeof(u32) != 4) return 1; if (sizeof(i64) != 8) return 1; if (sizeof(u64) != 8) return 1; if (sizeof(ip) != sizeof(void*)) return 1; if (sizeof(up) != sizeof(void*)) return 1; return 0; } int main () { return check(); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_COMPLETE_SYS_TYPES_H=yes else gasnet_cv_COMPLETE_SYS_TYPES_H=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_COMPLETE_SYS_TYPES_H" >&5 $as_echo "$gasnet_cv_COMPLETE_SYS_TYPES_H" >&6; } if test "$gasnet_cv_COMPLETE_SYS_TYPES_H" = yes; then : COMPLETE_SYS_TYPES_H=1 $as_echo "#define COMPLETE_SYS_TYPES_H 1" >>confdefs.h else : $as_echo "#define COMPLETE_SYS_TYPES_H 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for a complete sys/types.h,COMPLETE_SYS_TYPES_H,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for a complete sys/types.h,COMPLETE_SYS_TYPES_H,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete sys/types.h" >&5 $as_echo_n "checking for a complete sys/types.h... " >&6; } if ${gasnet_cv_COMPLETE_SYS_TYPES_H+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int check() { int8_t i8; uint8_t u8; int16_t i16; uint16_t u16; int32_t i32; uint32_t u32; int64_t i64; uint64_t u64; intptr_t ip; uintptr_t up; if (sizeof(i8) != 1) return 1; if (sizeof(u8) != 1) return 1; if (sizeof(i16) != 2) return 1; if (sizeof(u16) != 2) return 1; if (sizeof(i32) != 4) return 1; if (sizeof(u32) != 4) return 1; if (sizeof(i64) != 8) return 1; if (sizeof(u64) != 8) return 1; if (sizeof(ip) != sizeof(void*)) return 1; if (sizeof(up) != sizeof(void*)) return 1; return 0; } int main(void) { return check(); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_COMPLETE_SYS_TYPES_H=yes else gasnet_cv_COMPLETE_SYS_TYPES_H=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_COMPLETE_SYS_TYPES_H" >&5 $as_echo "$gasnet_cv_COMPLETE_SYS_TYPES_H" >&6; } if test "$gasnet_cv_COMPLETE_SYS_TYPES_H" = yes; then : COMPLETE_SYS_TYPES_H=1 $as_echo "#define COMPLETE_SYS_TYPES_H 1" >>confdefs.h else : $as_echo "#define COMPLETE_SYS_TYPES_H 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for a complete sys/types.h,COMPLETE_SYS_TYPES_H,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_INTTYPES(sys/types.h,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) for type in CHAR SHORT INT LONG LONG_LONG VOID_P SIZE_T PTRDIFF_T ; do eval val="\$SIZEOF_$type" # vvvvvvvvvvvvvvvvvvvvvv GASNET_APPEND_DEFINE vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$SIZEOF_$type" != ""; then INTTYPES_DEFINES="$INTTYPES_DEFINES -DSIZEOF_$type=$val" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_APPEND_DEFINE ^^^^^^^^^^^^^^^^^^^^^^ (L:3) done # vvvvvvvvvvvvvvvvvvvvvv GASNET_APPEND_DEFINE vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$HAVE_STDINT_H" != ""; then INTTYPES_DEFINES="$INTTYPES_DEFINES -DHAVE_STDINT_H" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_APPEND_DEFINE ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_APPEND_DEFINE vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$COMPLETE_STDINT_H" != ""; then INTTYPES_DEFINES="$INTTYPES_DEFINES -DCOMPLETE_STDINT_H" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_APPEND_DEFINE ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_APPEND_DEFINE vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$HAVE_INTTYPES_H" != ""; then INTTYPES_DEFINES="$INTTYPES_DEFINES -DHAVE_INTTYPES_H" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_APPEND_DEFINE ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_APPEND_DEFINE vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$COMPLETE_INTTYPES_H" != ""; then INTTYPES_DEFINES="$INTTYPES_DEFINES -DCOMPLETE_INTTYPES_H" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_APPEND_DEFINE ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_APPEND_DEFINE vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$HAVE_SYS_TYPES_H" != ""; then INTTYPES_DEFINES="$INTTYPES_DEFINES -DHAVE_SYS_TYPES_H" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_APPEND_DEFINE ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_APPEND_DEFINE vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$COMPLETE_SYS_TYPES_H" != ""; then INTTYPES_DEFINES="$INTTYPES_DEFINES -DCOMPLETE_SYS_TYPES_H" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_APPEND_DEFINE ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SETUP_INTTYPES(,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ######################################################################## # get sizes of additional types for the "anytype" unions # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(float,) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then SIZEOF_FLOAT= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(float) (binary probe),SIZEOF_FLOAT,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(float) (binary probe)" >&5 $as_echo_n "checking sizeof(float) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_FLOAT+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_FLOAT="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(float))>0?(sizeof(float)):-(sizeof(float))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(float))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_FLOAT=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(float)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$gasnet_cv_SIZEOF_FLOAT" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(float))>0?(sizeof(float)):-(sizeof(float))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(float))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_FLOAT=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(float)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_FLOAT" >&5 $as_echo "$gasnet_cv_SIZEOF_FLOAT" >&6; } if test -n "$gasnet_cv_SIZEOF_FLOAT" ; then SIZEOF_FLOAT=$gasnet_cv_SIZEOF_FLOAT fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(float) (binary probe),SIZEOF_FLOAT,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$SIZEOF_FLOAT" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_FLOAT,SIZEOF_FLOAT,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_FLOAT],[]) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_FLOAT setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_FLOAT setting... " >&6; } envval_src_CROSS_SIZEOF_FLOAT="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_FLOAT+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_FLOAT="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_FLOAT="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeoffloat+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_FLOAT="${_gasneti_nenv_crosssizeoffloat}" envval_src_CROSS_SIZEOF_FLOAT=given elif test "${_gasneti_cenv_crosssizeoffloat+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_FLOAT="${_gasneti_cenv_crosssizeoffloat}" envval_src_CROSS_SIZEOF_FLOAT=conf else gasnet_cv_envvar_CROSS_SIZEOF_FLOAT=$envval_default_CROSS_SIZEOF_FLOAT envval_src_CROSS_SIZEOF_FLOAT=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_FLOAT crosssizeoffloat $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_FLOAT="$gasnet_cv_envvar_CROSS_SIZEOF_FLOAT" if test "$CROSS_SIZEOF_FLOAT" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_FLOAT if test "$envval_src_CROSS_SIZEOF_FLOAT" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_FLOAT" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_FLOAT\"" >&5 $as_echo " \"$CROSS_SIZEOF_FLOAT\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_FLOAT\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_FLOAT\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_FLOAT\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_FLOAT\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_FLOAT\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_FLOAT\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_FLOAT\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_FLOAT\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_FLOAT. Please configure --with-CROSS_SIZEOF_FLOAT=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_FLOAT],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$CROSS_SIZEOF_FLOAT" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_FLOAT be set for cross-compilation" "$LINENO" 5 else SIZEOF_FLOAT="$CROSS_SIZEOF_FLOAT" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_FLOAT,SIZEOF_FLOAT,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi ac_cv_sizeof_float=$SIZEOF_FLOAT fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_float,"$ac_cv_sizeof_float") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_ac_cv_sizeof_float" = "" ; then _pushcnt_ac_cv_sizeof_float=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_float+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_float_$_pushcnt_ac_cv_sizeof_float=\$ac_cv_sizeof_float eval _pushedvarset_ac_cv_sizeof_float_$_pushcnt_ac_cv_sizeof_float=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_float=`expr $_pushcnt_ac_cv_sizeof_float + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_float="$ac_cv_sizeof_float" echo "pushed new ac_cv_sizeof_float value: $ac_cv_sizeof_float" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_float,"$ac_cv_sizeof_float") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$ac_cv_sizeof_float" = "" ; then unset ac_cv_sizeof_float unset ac_cv_type_float fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 $as_echo_n "checking size of float... " >&6; } if ${ac_cv_sizeof_float+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then : else if test "$ac_cv_type_float" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (float) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_float=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 $as_echo "$ac_cv_sizeof_float" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_FLOAT $ac_cv_sizeof_float _ACEOF gasnet_checksizeoftmp_sizeof_float="$ac_cv_sizeof_float" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_float) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_ac_cv_sizeof_float" -ge "1"; then _pushcnt_ac_cv_sizeof_float=`expr $_pushcnt_ac_cv_sizeof_float - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_float_$_pushcnt_ac_cv_sizeof_float if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_float=\$_pushedvar_ac_cv_sizeof_float_$_pushcnt_ac_cv_sizeof_float echo "popping ac_cv_sizeof_float back to: $ac_cv_sizeof_float" >&5 else unset ac_cv_sizeof_float echo "popping ac_cv_sizeof_float back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_float" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_float) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ac_cv_sizeof_float=$gasnet_checksizeoftmp_sizeof_float SIZEOF_FLOAT=$gasnet_checksizeoftmp_sizeof_float if test "$SIZEOF_FLOAT" = "0" -o "$SIZEOF_FLOAT" = "" -o "$ac_cv_sizeof_float" != "$SIZEOF_FLOAT"; then echo echo "configure error: failed to find sizeof(float)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_FLOAT_indirect=SIZEOF_FLOAT cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_FLOAT_indirect $SIZEOF_FLOAT _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(float,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(double,) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then SIZEOF_DOUBLE= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(double) (binary probe),SIZEOF_DOUBLE,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(double) (binary probe)" >&5 $as_echo_n "checking sizeof(double) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_DOUBLE+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_DOUBLE="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(double))>0?(sizeof(double)):-(sizeof(double))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(double))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_DOUBLE=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(double)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$gasnet_cv_SIZEOF_DOUBLE" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(double))>0?(sizeof(double)):-(sizeof(double))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(double))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_DOUBLE=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(double)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_DOUBLE" >&5 $as_echo "$gasnet_cv_SIZEOF_DOUBLE" >&6; } if test -n "$gasnet_cv_SIZEOF_DOUBLE" ; then SIZEOF_DOUBLE=$gasnet_cv_SIZEOF_DOUBLE fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(double) (binary probe),SIZEOF_DOUBLE,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$SIZEOF_DOUBLE" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_DOUBLE,SIZEOF_DOUBLE,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_DOUBLE],[]) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_DOUBLE setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_DOUBLE setting... " >&6; } envval_src_CROSS_SIZEOF_DOUBLE="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_DOUBLE+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_DOUBLE="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_DOUBLE="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeofdouble+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_DOUBLE="${_gasneti_nenv_crosssizeofdouble}" envval_src_CROSS_SIZEOF_DOUBLE=given elif test "${_gasneti_cenv_crosssizeofdouble+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_DOUBLE="${_gasneti_cenv_crosssizeofdouble}" envval_src_CROSS_SIZEOF_DOUBLE=conf else gasnet_cv_envvar_CROSS_SIZEOF_DOUBLE=$envval_default_CROSS_SIZEOF_DOUBLE envval_src_CROSS_SIZEOF_DOUBLE=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_DOUBLE crosssizeofdouble $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_DOUBLE="$gasnet_cv_envvar_CROSS_SIZEOF_DOUBLE" if test "$CROSS_SIZEOF_DOUBLE" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_DOUBLE if test "$envval_src_CROSS_SIZEOF_DOUBLE" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_DOUBLE" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_DOUBLE\"" >&5 $as_echo " \"$CROSS_SIZEOF_DOUBLE\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_DOUBLE\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_DOUBLE\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_DOUBLE\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_DOUBLE\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_DOUBLE\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_DOUBLE\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_DOUBLE\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_DOUBLE\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_DOUBLE. Please configure --with-CROSS_SIZEOF_DOUBLE=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_DOUBLE],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$CROSS_SIZEOF_DOUBLE" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_DOUBLE be set for cross-compilation" "$LINENO" 5 else SIZEOF_DOUBLE="$CROSS_SIZEOF_DOUBLE" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_DOUBLE,SIZEOF_DOUBLE,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi ac_cv_sizeof_double=$SIZEOF_DOUBLE fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_double,"$ac_cv_sizeof_double") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_ac_cv_sizeof_double" = "" ; then _pushcnt_ac_cv_sizeof_double=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_double+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_double_$_pushcnt_ac_cv_sizeof_double=\$ac_cv_sizeof_double eval _pushedvarset_ac_cv_sizeof_double_$_pushcnt_ac_cv_sizeof_double=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_double=`expr $_pushcnt_ac_cv_sizeof_double + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_double="$ac_cv_sizeof_double" echo "pushed new ac_cv_sizeof_double value: $ac_cv_sizeof_double" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_double,"$ac_cv_sizeof_double") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$ac_cv_sizeof_double" = "" ; then unset ac_cv_sizeof_double unset ac_cv_type_double fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 $as_echo_n "checking size of double... " >&6; } if ${ac_cv_sizeof_double+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : else if test "$ac_cv_type_double" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (double) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_double=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 $as_echo "$ac_cv_sizeof_double" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_DOUBLE $ac_cv_sizeof_double _ACEOF gasnet_checksizeoftmp_sizeof_double="$ac_cv_sizeof_double" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_double) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_ac_cv_sizeof_double" -ge "1"; then _pushcnt_ac_cv_sizeof_double=`expr $_pushcnt_ac_cv_sizeof_double - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_double_$_pushcnt_ac_cv_sizeof_double if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_double=\$_pushedvar_ac_cv_sizeof_double_$_pushcnt_ac_cv_sizeof_double echo "popping ac_cv_sizeof_double back to: $ac_cv_sizeof_double" >&5 else unset ac_cv_sizeof_double echo "popping ac_cv_sizeof_double back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_double" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_double) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ac_cv_sizeof_double=$gasnet_checksizeoftmp_sizeof_double SIZEOF_DOUBLE=$gasnet_checksizeoftmp_sizeof_double if test "$SIZEOF_DOUBLE" = "0" -o "$SIZEOF_DOUBLE" = "" -o "$ac_cv_sizeof_double" != "$SIZEOF_DOUBLE"; then echo echo "configure error: failed to find sizeof(double)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_DOUBLE_indirect=SIZEOF_DOUBLE cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_DOUBLE_indirect $SIZEOF_DOUBLE _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(double,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for type _Bool,type__bool,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type _Bool" >&5 $as_echo_n "checking for type _Bool... " >&6; } if ${gasnet_cv_type__bool+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { if ((_Bool *) 0) return 0; if (sizeof (_Bool)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_type__bool=yes else gasnet_cv_type__bool=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_type__bool" >&5 $as_echo "$gasnet_cv_type__bool" >&6; } if test "$gasnet_cv_type__bool" = yes; then : # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(_Bool,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then SIZEOF__BOOL= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(_Bool) (binary probe),SIZEOF__BOOL,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(_Bool) (binary probe)" >&5 $as_echo_n "checking sizeof(_Bool) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF__BOOL+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF__BOOL="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(_Bool))>0?(sizeof(_Bool)):-(sizeof(_Bool))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(_Bool))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF__BOOL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(_Bool)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_SIZEOF__BOOL" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(_Bool))>0?(sizeof(_Bool)):-(sizeof(_Bool))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(_Bool))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF__BOOL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(_Bool)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF__BOOL" >&5 $as_echo "$gasnet_cv_SIZEOF__BOOL" >&6; } if test -n "$gasnet_cv_SIZEOF__BOOL" ; then SIZEOF__BOOL=$gasnet_cv_SIZEOF__BOOL fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(_Bool) (binary probe),SIZEOF__BOOL,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$SIZEOF__BOOL" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF__BOOL,SIZEOF__BOOL,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF__BOOL],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF__BOOL setting" >&5 $as_echo_n "checking for CROSS_SIZEOF__BOOL setting... " >&6; } envval_src_CROSS_SIZEOF__BOOL="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF__BOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF__BOOL="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF__BOOL="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeofbool+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF__BOOL="${_gasneti_nenv_crosssizeofbool}" envval_src_CROSS_SIZEOF__BOOL=given elif test "${_gasneti_cenv_crosssizeofbool+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF__BOOL="${_gasneti_cenv_crosssizeofbool}" envval_src_CROSS_SIZEOF__BOOL=conf else gasnet_cv_envvar_CROSS_SIZEOF__BOOL=$envval_default_CROSS_SIZEOF__BOOL envval_src_CROSS_SIZEOF__BOOL=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF__BOOL crosssizeofbool $gasnet_cv_configure_args_norm fi CROSS_SIZEOF__BOOL="$gasnet_cv_envvar_CROSS_SIZEOF__BOOL" if test "$CROSS_SIZEOF__BOOL" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF__BOOL if test "$envval_src_CROSS_SIZEOF__BOOL" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF__BOOL" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF__BOOL\"" >&5 $as_echo " \"$CROSS_SIZEOF__BOOL\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF__BOOL\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF__BOOL\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF__BOOL\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF__BOOL\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF__BOOL\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF__BOOL\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF__BOOL\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF__BOOL\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF__BOOL. Please configure --with-CROSS_SIZEOF__BOOL=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF__BOOL],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_SIZEOF__BOOL" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF__BOOL be set for cross-compilation" "$LINENO" 5 else SIZEOF__BOOL="$CROSS_SIZEOF__BOOL" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF__BOOL,SIZEOF__BOOL,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ac_cv_sizeof__bool=$SIZEOF__BOOL fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof__Bool,"$ac_cv_sizeof__bool") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof__Bool" = "" ; then _pushcnt_ac_cv_sizeof__Bool=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof__Bool+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof__Bool_$_pushcnt_ac_cv_sizeof__Bool=\$ac_cv_sizeof__Bool eval _pushedvarset_ac_cv_sizeof__Bool_$_pushcnt_ac_cv_sizeof__Bool=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof__Bool=`expr $_pushcnt_ac_cv_sizeof__Bool + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof__Bool="$ac_cv_sizeof__bool" echo "pushed new ac_cv_sizeof__Bool value: $ac_cv_sizeof__Bool" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof__Bool,"$ac_cv_sizeof__bool") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_sizeof__Bool" = "" ; then unset ac_cv_sizeof__Bool unset ac_cv_type__Bool fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5 $as_echo_n "checking size of _Bool... " >&6; } if ${ac_cv_sizeof__Bool+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then : else if test "$ac_cv_type__Bool" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (_Bool) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof__Bool=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5 $as_echo "$ac_cv_sizeof__Bool" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF__BOOL $ac_cv_sizeof__Bool _ACEOF gasnet_checksizeoftmp_sizeof__bool="$ac_cv_sizeof__Bool" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof__Bool) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof__Bool" -ge "1"; then _pushcnt_ac_cv_sizeof__Bool=`expr $_pushcnt_ac_cv_sizeof__Bool - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof__Bool_$_pushcnt_ac_cv_sizeof__Bool if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof__Bool=\$_pushedvar_ac_cv_sizeof__Bool_$_pushcnt_ac_cv_sizeof__Bool echo "popping ac_cv_sizeof__Bool back to: $ac_cv_sizeof__Bool" >&5 else unset ac_cv_sizeof__Bool echo "popping ac_cv_sizeof__Bool back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof__Bool" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof__Bool) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_cv_sizeof__bool=$gasnet_checksizeoftmp_sizeof__bool SIZEOF__BOOL=$gasnet_checksizeoftmp_sizeof__bool if test "$SIZEOF__BOOL" = "0" -o "$SIZEOF__BOOL" = "" -o "$ac_cv_sizeof__bool" != "$SIZEOF__BOOL"; then echo echo "configure error: failed to find sizeof(_Bool)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF__BOOL_indirect=SIZEOF__BOOL cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF__BOOL_indirect $SIZEOF__BOOL _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(_Bool,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : ac_cv_SIZEOF__BOOL_indirect=SIZEOF__BOOL cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF__BOOL_indirect 0 _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for type _Bool,type__bool,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for type long double,type_long_double,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type long double" >&5 $as_echo_n "checking for type long double... " >&6; } if ${gasnet_cv_type_long_double+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { if ((long double *) 0) return 0; if (sizeof (long double)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_type_long_double=yes else gasnet_cv_type_long_double=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_type_long_double" >&5 $as_echo "$gasnet_cv_type_long_double" >&6; } if test "$gasnet_cv_type_long_double" = yes; then : # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(long double,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then SIZEOF_LONG_DOUBLE= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(long double) (binary probe),SIZEOF_LONG_DOUBLE,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(long double) (binary probe)" >&5 $as_echo_n "checking sizeof(long double) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_LONG_DOUBLE+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_LONG_DOUBLE="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(long double))>0?(sizeof(long double)):-(sizeof(long double))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(long double))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_LONG_DOUBLE=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(long double)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_SIZEOF_LONG_DOUBLE" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(long double))>0?(sizeof(long double)):-(sizeof(long double))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(long double))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_LONG_DOUBLE=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(long double)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_LONG_DOUBLE" >&5 $as_echo "$gasnet_cv_SIZEOF_LONG_DOUBLE" >&6; } if test -n "$gasnet_cv_SIZEOF_LONG_DOUBLE" ; then SIZEOF_LONG_DOUBLE=$gasnet_cv_SIZEOF_LONG_DOUBLE fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(long double) (binary probe),SIZEOF_LONG_DOUBLE,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$SIZEOF_LONG_DOUBLE" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_LONG_DOUBLE,SIZEOF_LONG_DOUBLE,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_LONG_DOUBLE],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_LONG_DOUBLE setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_LONG_DOUBLE setting... " >&6; } envval_src_CROSS_SIZEOF_LONG_DOUBLE="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_LONG_DOUBLE+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_LONG_DOUBLE="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_LONG_DOUBLE="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeoflongdouble+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_LONG_DOUBLE="${_gasneti_nenv_crosssizeoflongdouble}" envval_src_CROSS_SIZEOF_LONG_DOUBLE=given elif test "${_gasneti_cenv_crosssizeoflongdouble+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_LONG_DOUBLE="${_gasneti_cenv_crosssizeoflongdouble}" envval_src_CROSS_SIZEOF_LONG_DOUBLE=conf else gasnet_cv_envvar_CROSS_SIZEOF_LONG_DOUBLE=$envval_default_CROSS_SIZEOF_LONG_DOUBLE envval_src_CROSS_SIZEOF_LONG_DOUBLE=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_LONG_DOUBLE crosssizeoflongdouble $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_LONG_DOUBLE="$gasnet_cv_envvar_CROSS_SIZEOF_LONG_DOUBLE" if test "$CROSS_SIZEOF_LONG_DOUBLE" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_LONG_DOUBLE if test "$envval_src_CROSS_SIZEOF_LONG_DOUBLE" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_LONG_DOUBLE" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_LONG_DOUBLE\"" >&5 $as_echo " \"$CROSS_SIZEOF_LONG_DOUBLE\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_LONG_DOUBLE\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_LONG_DOUBLE\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_LONG_DOUBLE\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_LONG_DOUBLE\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_LONG_DOUBLE\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_LONG_DOUBLE\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_LONG_DOUBLE\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_LONG_DOUBLE\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_LONG_DOUBLE. Please configure --with-CROSS_SIZEOF_LONG_DOUBLE=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_LONG_DOUBLE],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_SIZEOF_LONG_DOUBLE" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_LONG_DOUBLE be set for cross-compilation" "$LINENO" 5 else SIZEOF_LONG_DOUBLE="$CROSS_SIZEOF_LONG_DOUBLE" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_LONG_DOUBLE,SIZEOF_LONG_DOUBLE,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ac_cv_sizeof_long_double=$SIZEOF_LONG_DOUBLE fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_long_double,"$ac_cv_sizeof_long_double") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_long_double" = "" ; then _pushcnt_ac_cv_sizeof_long_double=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_long_double+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_long_double_$_pushcnt_ac_cv_sizeof_long_double=\$ac_cv_sizeof_long_double eval _pushedvarset_ac_cv_sizeof_long_double_$_pushcnt_ac_cv_sizeof_long_double=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_long_double=`expr $_pushcnt_ac_cv_sizeof_long_double + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_long_double="$ac_cv_sizeof_long_double" echo "pushed new ac_cv_sizeof_long_double value: $ac_cv_sizeof_long_double" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_long_double,"$ac_cv_sizeof_long_double") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_sizeof_long_double" = "" ; then unset ac_cv_sizeof_long_double unset ac_cv_type_long_double fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 $as_echo_n "checking size of long double... " >&6; } if ${ac_cv_sizeof_long_double+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : else if test "$ac_cv_type_long_double" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long double) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_double=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 $as_echo "$ac_cv_sizeof_long_double" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double _ACEOF gasnet_checksizeoftmp_sizeof_long_double="$ac_cv_sizeof_long_double" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_long_double) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_long_double" -ge "1"; then _pushcnt_ac_cv_sizeof_long_double=`expr $_pushcnt_ac_cv_sizeof_long_double - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_long_double_$_pushcnt_ac_cv_sizeof_long_double if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_long_double=\$_pushedvar_ac_cv_sizeof_long_double_$_pushcnt_ac_cv_sizeof_long_double echo "popping ac_cv_sizeof_long_double back to: $ac_cv_sizeof_long_double" >&5 else unset ac_cv_sizeof_long_double echo "popping ac_cv_sizeof_long_double back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_long_double" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_long_double) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_cv_sizeof_long_double=$gasnet_checksizeoftmp_sizeof_long_double SIZEOF_LONG_DOUBLE=$gasnet_checksizeoftmp_sizeof_long_double if test "$SIZEOF_LONG_DOUBLE" = "0" -o "$SIZEOF_LONG_DOUBLE" = "" -o "$ac_cv_sizeof_long_double" != "$SIZEOF_LONG_DOUBLE"; then echo echo "configure error: failed to find sizeof(long double)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_LONG_DOUBLE_indirect=SIZEOF_LONG_DOUBLE cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_LONG_DOUBLE_indirect $SIZEOF_LONG_DOUBLE _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(long double,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : ac_cv_SIZEOF_LONG_DOUBLE_indirect=SIZEOF_LONG_DOUBLE cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_LONG_DOUBLE_indirect 0 _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for type long double,type_long_double,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for type float _Complex,type_float__complex,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type float _Complex" >&5 $as_echo_n "checking for type float _Complex... " >&6; } if ${gasnet_cv_type_float__complex+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { if ((float _Complex *) 0) return 0; if (sizeof (float _Complex)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_type_float__complex=yes else gasnet_cv_type_float__complex=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_type_float__complex" >&5 $as_echo "$gasnet_cv_type_float__complex" >&6; } if test "$gasnet_cv_type_float__complex" = yes; then : # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_SIZEOF(float _Complex,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then SIZEOF_FLOAT__COMPLEX= # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(float _Complex) (binary probe),SIZEOF_FLOAT__COMPLEX,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof(float _Complex) (binary probe)" >&5 $as_echo_n "checking sizeof(float _Complex) (binary probe)... " >&6; } if ${gasnet_cv_SIZEOF_FLOAT__COMPLEX+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_SIZEOF_FLOAT__COMPLEX="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(float _Complex))>0?(sizeof(float _Complex)):-(sizeof(float _Complex))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(float _Complex))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_FLOAT__COMPLEX=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting sizeof(float _Complex)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_SIZEOF_FLOAT__COMPLEX" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((sizeof(float _Complex))>0?(sizeof(float _Complex)):-(sizeof(float _Complex))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((sizeof(float _Complex))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_SIZEOF_FLOAT__COMPLEX=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting sizeof(float _Complex)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_SIZEOF_FLOAT__COMPLEX" >&5 $as_echo "$gasnet_cv_SIZEOF_FLOAT__COMPLEX" >&6; } if test -n "$gasnet_cv_SIZEOF_FLOAT__COMPLEX" ; then SIZEOF_FLOAT__COMPLEX=$gasnet_cv_SIZEOF_FLOAT__COMPLEX fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(sizeof(float _Complex) (binary probe),SIZEOF_FLOAT__COMPLEX,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$SIZEOF_FLOAT__COMPLEX" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(SIZEOF_FLOAT__COMPLEX,SIZEOF_FLOAT__COMPLEX,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_SIZEOF_FLOAT__COMPLEX],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_SIZEOF_FLOAT__COMPLEX setting" >&5 $as_echo_n "checking for CROSS_SIZEOF_FLOAT__COMPLEX setting... " >&6; } envval_src_CROSS_SIZEOF_FLOAT__COMPLEX="cached" if ${gasnet_cv_envvar_CROSS_SIZEOF_FLOAT__COMPLEX+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_SIZEOF_FLOAT__COMPLEX="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_SIZEOF_FLOAT__COMPLEX="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosssizeoffloatcomplex+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_FLOAT__COMPLEX="${_gasneti_nenv_crosssizeoffloatcomplex}" envval_src_CROSS_SIZEOF_FLOAT__COMPLEX=given elif test "${_gasneti_cenv_crosssizeoffloatcomplex+set}" = "set" ; then gasnet_cv_envvar_CROSS_SIZEOF_FLOAT__COMPLEX="${_gasneti_cenv_crosssizeoffloatcomplex}" envval_src_CROSS_SIZEOF_FLOAT__COMPLEX=conf else gasnet_cv_envvar_CROSS_SIZEOF_FLOAT__COMPLEX=$envval_default_CROSS_SIZEOF_FLOAT__COMPLEX envval_src_CROSS_SIZEOF_FLOAT__COMPLEX=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_SIZEOF_FLOAT__COMPLEX crosssizeoffloatcomplex $gasnet_cv_configure_args_norm fi CROSS_SIZEOF_FLOAT__COMPLEX="$gasnet_cv_envvar_CROSS_SIZEOF_FLOAT__COMPLEX" if test "$CROSS_SIZEOF_FLOAT__COMPLEX" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_SIZEOF_FLOAT__COMPLEX if test "$envval_src_CROSS_SIZEOF_FLOAT__COMPLEX" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_SIZEOF_FLOAT__COMPLEX" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_SIZEOF_FLOAT__COMPLEX\"" >&5 $as_echo " \"$CROSS_SIZEOF_FLOAT__COMPLEX\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_SIZEOF_FLOAT__COMPLEX\"" >&5 $as_echo " (default) \"$CROSS_SIZEOF_FLOAT__COMPLEX\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_SIZEOF_FLOAT__COMPLEX\"" >&5 $as_echo " (disabled) \"$CROSS_SIZEOF_FLOAT__COMPLEX\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_FLOAT__COMPLEX\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_FLOAT__COMPLEX\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_SIZEOF_FLOAT__COMPLEX\"" >&5 $as_echo " (provided) \"$CROSS_SIZEOF_FLOAT__COMPLEX\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_SIZEOF_FLOAT__COMPLEX. Please configure --with-CROSS_SIZEOF_FLOAT__COMPLEX=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_SIZEOF_FLOAT__COMPLEX],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_SIZEOF_FLOAT__COMPLEX" = "" ; then as_fn_error $? "This configure script requires \$CROSS_SIZEOF_FLOAT__COMPLEX be set for cross-compilation" "$LINENO" 5 else SIZEOF_FLOAT__COMPLEX="$CROSS_SIZEOF_FLOAT__COMPLEX" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(SIZEOF_FLOAT__COMPLEX,SIZEOF_FLOAT__COMPLEX,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ac_cv_sizeof_float__complex=$SIZEOF_FLOAT__COMPLEX fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(ac_cv_sizeof_float__Complex,"$ac_cv_sizeof_float__complex") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_float__Complex" = "" ; then _pushcnt_ac_cv_sizeof_float__Complex=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${ac_cv_sizeof_float__Complex+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_ac_cv_sizeof_float__Complex_$_pushcnt_ac_cv_sizeof_float__Complex=\$ac_cv_sizeof_float__Complex eval _pushedvarset_ac_cv_sizeof_float__Complex_$_pushcnt_ac_cv_sizeof_float__Complex=$_gasnet_pushvar_isset _pushcnt_ac_cv_sizeof_float__Complex=`expr $_pushcnt_ac_cv_sizeof_float__Complex + 1` _total_pushcnt=`expr $_total_pushcnt + 1` ac_cv_sizeof_float__Complex="$ac_cv_sizeof_float__complex" echo "pushed new ac_cv_sizeof_float__Complex value: $ac_cv_sizeof_float__Complex" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(ac_cv_sizeof_float__Complex,"$ac_cv_sizeof_float__complex") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$ac_cv_sizeof_float__Complex" = "" ; then unset ac_cv_sizeof_float__Complex unset ac_cv_type_float__Complex fi if test "" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking size:" >&5 $as_echo_n "checking size:... " >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float _Complex" >&5 $as_echo_n "checking size of float _Complex... " >&6; } if ${ac_cv_sizeof_float__Complex+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float _Complex))" "ac_cv_sizeof_float__Complex" "$ac_includes_default"; then : else if test "$ac_cv_type_float__Complex" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (float _Complex) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_float__Complex=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float__Complex" >&5 $as_echo "$ac_cv_sizeof_float__Complex" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_FLOAT__COMPLEX $ac_cv_sizeof_float__Complex _ACEOF gasnet_checksizeoftmp_sizeof_float__complex="$ac_cv_sizeof_float__Complex" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(ac_cv_sizeof_float__Complex) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_ac_cv_sizeof_float__Complex" -ge "1"; then _pushcnt_ac_cv_sizeof_float__Complex=`expr $_pushcnt_ac_cv_sizeof_float__Complex - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_ac_cv_sizeof_float__Complex_$_pushcnt_ac_cv_sizeof_float__Complex if test "$_gasnet_pushvar_isset" = "1" ; then eval ac_cv_sizeof_float__Complex=\$_pushedvar_ac_cv_sizeof_float__Complex_$_pushcnt_ac_cv_sizeof_float__Complex echo "popping ac_cv_sizeof_float__Complex back to: $ac_cv_sizeof_float__Complex" >&5 else unset ac_cv_sizeof_float__Complex echo "popping ac_cv_sizeof_float__Complex back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on ac_cv_sizeof_float__Complex" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(ac_cv_sizeof_float__Complex) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_cv_sizeof_float__complex=$gasnet_checksizeoftmp_sizeof_float__complex SIZEOF_FLOAT__COMPLEX=$gasnet_checksizeoftmp_sizeof_float__complex if test "$SIZEOF_FLOAT__COMPLEX" = "0" -o "$SIZEOF_FLOAT__COMPLEX" = "" -o "$ac_cv_sizeof_float__complex" != "$SIZEOF_FLOAT__COMPLEX"; then echo echo "configure error: failed to find sizeof(float _Complex)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "" != ""; then ac_cv_SIZEOF_FLOAT__COMPLEX_indirect=SIZEOF_FLOAT__COMPLEX cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_FLOAT__COMPLEX_indirect $SIZEOF_FLOAT__COMPLEX _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_SIZEOF(float _Complex,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : ac_cv_SIZEOF_FLOAT__COMPLEX_indirect=SIZEOF_FLOAT__COMPLEX cat >>confdefs.h <<_ACEOF #define $ac_cv_SIZEOF_FLOAT__COMPLEX_indirect 0 _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for type float _Complex,type_float__complex,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ######################################################################## ## ## Page size ## # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(GASNETI_PAGESIZE,PAGESIZE,) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_PAGESIZE],[]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_PAGESIZE setting" >&5 $as_echo_n "checking for CROSS_PAGESIZE setting... " >&6; } envval_src_CROSS_PAGESIZE="cached" if ${gasnet_cv_envvar_CROSS_PAGESIZE+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_PAGESIZE="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_PAGESIZE="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosspagesize+set}" = "set" ; then gasnet_cv_envvar_CROSS_PAGESIZE="${_gasneti_nenv_crosspagesize}" envval_src_CROSS_PAGESIZE=given elif test "${_gasneti_cenv_crosspagesize+set}" = "set" ; then gasnet_cv_envvar_CROSS_PAGESIZE="${_gasneti_cenv_crosspagesize}" envval_src_CROSS_PAGESIZE=conf else gasnet_cv_envvar_CROSS_PAGESIZE=$envval_default_CROSS_PAGESIZE envval_src_CROSS_PAGESIZE=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_PAGESIZE crosspagesize $gasnet_cv_configure_args_norm fi CROSS_PAGESIZE="$gasnet_cv_envvar_CROSS_PAGESIZE" if test "$CROSS_PAGESIZE" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_PAGESIZE if test "$envval_src_CROSS_PAGESIZE" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_PAGESIZE" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_PAGESIZE\"" >&5 $as_echo " \"$CROSS_PAGESIZE\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_PAGESIZE\"" >&5 $as_echo " (default) \"$CROSS_PAGESIZE\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_PAGESIZE\"" >&5 $as_echo " (disabled) \"$CROSS_PAGESIZE\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_PAGESIZE\"" >&5 $as_echo " (provided) \"$CROSS_PAGESIZE\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_PAGESIZE\"" >&5 $as_echo " (provided) \"$CROSS_PAGESIZE\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_PAGESIZE. Please configure --with-CROSS_PAGESIZE=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_PAGESIZE],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$CROSS_PAGESIZE" = "" ; then as_fn_error $? "This configure script requires \$CROSS_PAGESIZE be set for cross-compilation" "$LINENO" 5 else GASNETI_PAGESIZE="$CROSS_PAGESIZE" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(GASNETI_PAGESIZE,PAGESIZE,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$GASNETI_PAGESIZE" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_EXPR(PAGESIZE,PAGESIZE,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking PAGESIZE" >&5 $as_echo_n "checking PAGESIZE... " >&6; } if ${gasnet_cv_PAGESIZE+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "confdefs.h" #include #include #include int main(void) { FILE *f=fopen("conftestval", "w"); int val = 0; if (!f) exit(1); { val = PAGESIZE; if (val<=0) exit(1); ; } fprintf(f, "%d\n", (int)(val)); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_PAGESIZE=`cat conftestval` else gasnet_cv_PAGESIZE=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PAGESIZE" >&5 $as_echo "$gasnet_cv_PAGESIZE" >&6; } if test "$gasnet_cv_PAGESIZE" != no; then : GASNETI_PAGESIZE=$gasnet_cv_PAGESIZE fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_EXPR(PAGESIZE,PAGESIZE,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$GASNETI_PAGESIZE" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_EXPR(PAGE_SIZE,PAGE_SIZE,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking PAGE_SIZE" >&5 $as_echo_n "checking PAGE_SIZE... " >&6; } if ${gasnet_cv_PAGE_SIZE+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "confdefs.h" #include #include #include int main(void) { FILE *f=fopen("conftestval", "w"); int val = 0; if (!f) exit(1); { val = PAGE_SIZE; if (val<=0) exit(1); ; } fprintf(f, "%d\n", (int)(val)); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_PAGE_SIZE=`cat conftestval` else gasnet_cv_PAGE_SIZE=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PAGE_SIZE" >&5 $as_echo "$gasnet_cv_PAGE_SIZE" >&6; } if test "$gasnet_cv_PAGE_SIZE" != no; then : GASNETI_PAGESIZE=$gasnet_cv_PAGE_SIZE fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_EXPR(PAGE_SIZE,PAGE_SIZE,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$GASNETI_PAGESIZE" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_EXPR(sysconf(_SC_PAGESIZE),_SC_PAGESIZE,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sysconf(_SC_PAGESIZE)" >&5 $as_echo_n "checking sysconf(_SC_PAGESIZE)... " >&6; } if ${gasnet_cv__SC_PAGESIZE+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "confdefs.h" #include #include #include int main(void) { FILE *f=fopen("conftestval", "w"); int val = 0; if (!f) exit(1); { val = sysconf(_SC_PAGESIZE); if (val<=0) exit(1); ; } fprintf(f, "%d\n", (int)(val)); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv__SC_PAGESIZE=`cat conftestval` else gasnet_cv__SC_PAGESIZE=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv__SC_PAGESIZE" >&5 $as_echo "$gasnet_cv__SC_PAGESIZE" >&6; } if test "$gasnet_cv__SC_PAGESIZE" != no; then : GASNETI_PAGESIZE=$gasnet_cv__SC_PAGESIZE fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_EXPR(sysconf(_SC_PAGESIZE),_SC_PAGESIZE,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$GASNETI_PAGESIZE" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_EXPR(sysconf(_SC_PAGE_SIZE),_SC_PAGE_SIZE,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking sysconf(_SC_PAGE_SIZE)" >&5 $as_echo_n "checking sysconf(_SC_PAGE_SIZE)... " >&6; } if ${gasnet_cv__SC_PAGE_SIZE+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "confdefs.h" #include #include #include int main(void) { FILE *f=fopen("conftestval", "w"); int val = 0; if (!f) exit(1); { val = sysconf(_SC_PAGE_SIZE); if (val<=0) exit(1); ; } fprintf(f, "%d\n", (int)(val)); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv__SC_PAGE_SIZE=`cat conftestval` else gasnet_cv__SC_PAGE_SIZE=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv__SC_PAGE_SIZE" >&5 $as_echo "$gasnet_cv__SC_PAGE_SIZE" >&6; } if test "$gasnet_cv__SC_PAGE_SIZE" != no; then : GASNETI_PAGESIZE=$gasnet_cv__SC_PAGE_SIZE fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_EXPR(sysconf(_SC_PAGE_SIZE),_SC_PAGE_SIZE,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$GASNETI_PAGESIZE" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_EXPR(getpagesize(),getpagesize,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking getpagesize()" >&5 $as_echo_n "checking getpagesize()... " >&6; } if ${gasnet_cv_getpagesize+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "confdefs.h" #include #include #include int main(void) { FILE *f=fopen("conftestval", "w"); int val = 0; if (!f) exit(1); { val = getpagesize(); if (val<=0) exit(1); ; } fprintf(f, "%d\n", (int)(val)); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_getpagesize=`cat conftestval` else gasnet_cv_getpagesize=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_getpagesize" >&5 $as_echo "$gasnet_cv_getpagesize" >&6; } if test "$gasnet_cv_getpagesize" != no; then : GASNETI_PAGESIZE=$gasnet_cv_getpagesize fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_EXPR(getpagesize(),getpagesize,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$GASNETI_PAGESIZE" != ""; then cat >>confdefs.h <<_ACEOF #define GASNETI_PAGESIZE $GASNETI_PAGESIZE _ACEOF case "$GASNETI_PAGESIZE" in 1024) GASNETI_PAGESHIFT=10 ;; 2048) GASNETI_PAGESHIFT=11 ;; 4096) GASNETI_PAGESHIFT=12 ;; 8192) GASNETI_PAGESHIFT=13 ;; 16384) GASNETI_PAGESHIFT=14 ;; 32768) GASNETI_PAGESHIFT=15 ;; 65536) GASNETI_PAGESHIFT=16 ;; 131072) GASNETI_PAGESHIFT=17 ;; 262144) GASNETI_PAGESHIFT=18 ;; 524288) GASNETI_PAGESHIFT=19 ;; 1048576) GASNETI_PAGESHIFT=20 ;; 2097152) GASNETI_PAGESHIFT=21 ;; 4194304) GASNETI_PAGESHIFT=22 ;; 8388608) GASNETI_PAGESHIFT=23 ;; 16777216) GASNETI_PAGESHIFT=24 ;; *) as_fn_error $? "unknown GASNETI_PAGESIZE=$GASNETI_PAGESIZE" "$LINENO" 5 ;; esac cat >>confdefs.h <<_ACEOF #define GASNETI_PAGESHIFT $GASNETI_PAGESHIFT _ACEOF fi # -lm should only live in LIBM, and only if we have it (not in LIBS) # vvvvvvvvvvvvvvvvvvvvvv GASNET_LIBM vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) case "$target_os" in darwin*) # libm is just an alias for the system default lib # Naming it explicitly causes linker failures when linking w/ mpich ;; *) # sin should be in everyone's libm if they've got one. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if ${ac_cv_lib_m_sin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sin=yes else ac_cv_lib_m_sin=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = xyes; then : LIBM="-lm" else LIBM="" fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LIBM ^^^^^^^^^^^^^^^^^^^^^^ (L:2) #--------------------------------------------------------------------------------------------------------------- # Machine defs GASNET_PLATFORM=generic GASNET_THREAD_DEFINES="" GASNET_THREAD_LIBS="" case "$target_os" in solaris*) GASNET_THREAD_DEFINES="-D_REENTRANT" # on some systems static linking fails with -lpthread, # but need it or pthread_create will fail at runtime GASNET_THREAD_LIBS="-lpthread" ;; linux*) if test "x$enable_force_arch" = xgeneric; then : # no action elif test "x$enable_force_arch" = xibmpe || # Check for IBM PE by presence of POE ( env PAGER=cat poe -h | grep 'Parallel Operating Environment' ) >/dev/null 2>&1; then GASNETI_ARCH_IBMPE=1 GASNET_PLATFORM=ibmpe $as_echo "#define GASNETI_ARCH_IBMPE 1" >>confdefs.h elif test "x$enable_force_arch" = xwsl || # Check for Microsoft Windows Subsystem for Linux (WSL) ( test -f /proc/sys/kernel/osrelease && grep 'Microsoft' /proc/sys/kernel/osrelease ) >/dev/null 2>&1; then GASNETI_ARCH_WSL=1 GASNET_PLATFORM=wsl $as_echo "#define GASNETI_ARCH_WSL 1" >>confdefs.h elif test "x$enable_force_arch" = xcrayex || # Check for HPE Cray EX (aka Shasta) using kernel version or CRAYPE_NETWORK_TARGET ( uname -r | grep cray_shasta ) >/dev/null 2>&1 || test "x$CRAYPE_NETWORK_TARGET" = xofi -o "x$CRAYPE_NETWORK_TARGET" = xucx ; then GASNETI_ARCH_CRAYEX=1 GASNET_PLATFORM=crayex $as_echo "#define GASNETI_ARCH_CRAYEX 1" >>confdefs.h # some defaults: if test "${enable_ofi-unset}" = unset; then enable_ofi=$enabled_auto_detect _conduit_reason_ofi=$_conduit_auto_reason fi if test "${enable_ibv-unset}" = unset; then enable_ibv=no; fi if test "${enable_udp-unset}" = unset; then enable_udp=no; fi if test "${with_ofi_spawner-unset}" = unset; then with_ofi_spawner=pmi; fi if test "${with_ucx_spawner-unset}" = unset; then with_ucx_spawner=pmi; fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux flavor" >&5 $as_echo_n "checking for Linux flavor... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GASNET_PLATFORM${enable_force_arch:+ (forced)}" >&5 $as_echo "$GASNET_PLATFORM${enable_force_arch:+ (forced)}" >&6; } GASNET_THREAD_DEFINES="-D_REENTRANT" GASNET_THREAD_LIBS="-lpthread" ;; freebsd*) # bug 1781: FreeBSD requires version-dependent magic to get a working pthread library OS_RELDATE="`/sbin/sysctl -n kern.osreldate 2>/dev/null`" if test "$OS_RELDATE" -lt "500016"; then GASNET_THREAD_DEFINES="-D_THREAD_SAFE" GASNET_THREAD_LIBS="-pthread" elif test "$OS_RELDATE" -lt "502102"; then GASNET_THREAD_DEFINES="-D_THREAD_SAFE" GASNET_THREAD_LIBS="-lc_r" else GASNET_THREAD_DEFINES="-D_THREAD_SAFE" # optional? GASNET_THREAD_LIBS="-pthread" fi ;; netbsd*) # The -pthread argument is effectively part of the standard compiler interface on *BSD # It's a frontend macro argument that expands to appropriate compiler-independent -D and -l # options in the right context, so we allow it to live in GASNET_DEFINES and GASNET_LIBS GASNET_THREAD_DEFINES="-pthread -D_REENTRANT" # _REENTRANT probably redundant GASNET_THREAD_LIBS="-pthread" # bug 1205: do not explicitly select threading lib ;; openbsd*) # Probe because at some point clang didn't accept -pthread as it does on the other BSDs # Otherwise same as netbsd, above, including the comments. # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-pthread) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -pthread") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -pthread" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -pthread") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -pthread" >&5 $as_echo_n "checking for C compiler flag -pthread... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) GASNET_THREAD_DEFINES="-pthread -D_REENTRANT" GASNET_THREAD_LIBS="-pthread" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } GASNET_THREAD_DEFINES="-D_POSIX_THREADS -D_REENTRANT" GASNET_THREAD_LIBS="-lpthread" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } GASNET_THREAD_DEFINES="-pthread -D_REENTRANT" GASNET_THREAD_LIBS="-pthread" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } GASNET_THREAD_DEFINES="-D_POSIX_THREADS -D_REENTRANT" GASNET_THREAD_LIBS="-lpthread" fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) GASNET_THREAD_DEFINES="-D_POSIX_THREADS -D_REENTRANT" GASNET_THREAD_LIBS="-lpthread" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-pthread) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; cygwin*) GASNET_THREAD_DEFINES="-D_REENTRANT" GASNET_THREAD_LIBS="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for Cygwin version 2.0 or newer,cygwin2,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cygwin version 2.0 or newer" >&5 $as_echo_n "checking for Cygwin version 2.0 or newer... " >&6; } if ${gasnet_cv_cygwin2+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if CYGWIN_VERSION_DLL_MAJOR < 2000 #error #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cygwin2=yes else gasnet_cv_cygwin2=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cygwin2" >&5 $as_echo "$gasnet_cv_cygwin2" >&6; } if test "$gasnet_cv_cygwin2" = yes; then : have_cygwin2='yes' else : have_cygwin2='no' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for Cygwin version 2.0 or newer,cygwin2,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; darwin*) GASNET_THREAD_DEFINES="-D_REENTRANT" GASNET_THREAD_LIBS="" ;; *) # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown OS - you may need to update the configure script" >&5 $as_echo "$as_me: WARNING: unknown OS - you may need to update the configure script" >&2;} echo "unknown OS - you may need to update the configure script" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; esac # Find the appropriate OS suffix for executables if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then EXESUFFIX=$ac_cv_exeext else case "$target_os" in cygwin*) EXESUFFIX='.exe' ;; *) EXESUFFIX='' ;; esac fi if test -n "$EXESUFFIX"; then HAVE_EXESUFFIX_TRUE= HAVE_EXESUFFIX_FALSE='#' else HAVE_EXESUFFIX_TRUE='#' HAVE_EXESUFFIX_FALSE= fi ######################################################################## ## ## Utilities for locating external packages ## ######################################################################## ## ## GASNET_CRAY_FIX_LINK_OPTS(lib [, envvar]) ## ## Modify CRAY_[LIB]_POST_LINK_OPTS envvars to reference the 'default' ## rather than the versioned directory normally set by environment modules ## lib: short name ('foo', not 'libfoo') ## envvar: defaults to CRAY_[upcase(lib)]_POST_LINK_OPTS ## # Fix the POST_LINK_OPTS for libs used with Cray Programming Environments case "$enable_cray_post_link_rewrite" in '' | yes) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_CRAY_FIX_LINK_OPTS([pmi]) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -n x"$CRAY_PMI_POST_LINK_OPTS"; then cplo_tmp=`$PERL -e "\\\$_='$CRAY_PMI_POST_LINK_OPTS'; s,/pmi/[^/]*/lib,/pmi/default/lib,g; print;"` cplo_dir=`$PERL -e "\\\$_='$cplo_tmp'; m,-L([^ ]*/pmi/[^ ]*),; print \\\$1;"` if test -d "$cplo_dir/."; then CRAY_PMI_POST_LINK_OPTS="$cplo_tmp" else # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Directory $cplo_dir missing - disabling rewrite of CRAY_PMI_POST_LINK_OPTS" >&5 $as_echo "$as_me: WARNING: Directory $cplo_dir missing - disabling rewrite of CRAY_PMI_POST_LINK_OPTS" >&2;} echo "Directory $cplo_dir missing - disabling rewrite of CRAY_PMI_POST_LINK_OPTS" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CRAY_FIX_LINK_OPTS ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CRAY_FIX_LINK_OPTS([xpmem]) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test -n x"$CRAY_XPMEM_POST_LINK_OPTS"; then cplo_tmp=`$PERL -e "\\\$_='$CRAY_XPMEM_POST_LINK_OPTS'; s,/xpmem/[^/]*/lib,/xpmem/default/lib,g; print;"` cplo_dir=`$PERL -e "\\\$_='$cplo_tmp'; m,-L([^ ]*/xpmem/[^ ]*),; print \\\$1;"` if test -d "$cplo_dir/."; then CRAY_XPMEM_POST_LINK_OPTS="$cplo_tmp" else # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Directory $cplo_dir missing - disabling rewrite of CRAY_XPMEM_POST_LINK_OPTS" >&5 $as_echo "$as_me: WARNING: Directory $cplo_dir missing - disabling rewrite of CRAY_XPMEM_POST_LINK_OPTS" >&2;} echo "Directory $cplo_dir missing - disabling rewrite of CRAY_XPMEM_POST_LINK_OPTS" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CRAY_FIX_LINK_OPTS ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; *) : ;; esac ######################################################################## ## ## Multithreading Libraries ## ## POSIX threads # have_pthread=no if test "$use_pthreads" != "no"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $GASNET_THREAD_DEFINES") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $GASNET_THREAD_DEFINES" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $GASNET_THREAD_DEFINES") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $GASNET_THREAD_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $GASNET_THREAD_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $GASNET_THREAD_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working pthreads support,pthreads_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working pthreads support" >&5 $as_echo_n "checking for working pthreads support... " >&6; } if ${gasnet_cv_pthreads_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_create(0,0,0,0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_pthreads_works=yes else gasnet_cv_pthreads_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_pthreads_works" >&5 $as_echo "$gasnet_cv_pthreads_works" >&6; } if test "$gasnet_cv_pthreads_works" = yes; then : have_pthread=yes else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working pthreads support,pthreads_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else pthread_reason="was disabled" fi if test "$use_pthreads$have_pthread" = "yesno" ; then as_fn_error $? "--enable-pthreads passed but no working pthreads support found" "$LINENO" 5 fi if test "$use_pthreads$have_pthread" = "tryno" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No working pthreads support found - disabling pthreads support" >&5 $as_echo "$as_me: WARNING: No working pthreads support found - disabling pthreads support" >&2;} echo "No working pthreads support found - disabling pthreads support" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) pthread_reason="appear to be missing or broken" fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(seq,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-seq was given. if test "${enable_seq+set}" = set; then : enableval=$enable_seq; fi case "$enable_seq" in no) : build_seq_libs="no" ;; yes) : build_seq_libs="yes" ;; *) : build_seq_libs="yes" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(seq,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(par,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-par was given. if test "${enable_par+set}" = set; then : enableval=$enable_par; fi case "$enable_par" in no) : build_par_libs="no" ;; yes) : build_par_libs="yes" ;; *) : build_par_libs="$have_pthread" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(par,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) build_parsync_libs="no" # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(parsync,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-parsync was given. if test "${enable_parsync+set}" = set; then : enableval=$enable_parsync; fi case "$enable_parsync" in no) : build_parsync_libs="no" ;; yes) : build_parsync_libs="yes" ;; *) : build_parsync_libs="$have_pthread" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(parsync,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$build_par_libs$have_pthread" = "yesno" ; then as_fn_error $? "--enable-par passed but no working pthreads support found" "$LINENO" 5 fi if test "$build_parsync_libs$have_pthread" = "yesno" ; then as_fn_error $? "--enable-parsync passed but no working pthreads support found" "$LINENO" 5 fi if test "$build_seq_libs$build_par_libs$build_parsync_libs" = "nonono" ; then as_fn_error $? "all libraries disabled by configure options!" "$LINENO" 5 fi if test "$build_seq_libs" = "yes"; then BUILD_SEQ_LIBS_TRUE= BUILD_SEQ_LIBS_FALSE='#' else BUILD_SEQ_LIBS_TRUE='#' BUILD_SEQ_LIBS_FALSE= fi if test "$build_par_libs" = "yes"; then BUILD_PAR_LIBS_TRUE= BUILD_PAR_LIBS_FALSE='#' else BUILD_PAR_LIBS_TRUE='#' BUILD_PAR_LIBS_FALSE= fi if test "$build_parsync_libs" = "yes"; then BUILD_PARSYNC_LIBS_TRUE= BUILD_PARSYNC_LIBS_FALSE='#' else BUILD_PARSYNC_LIBS_TRUE='#' BUILD_PARSYNC_LIBS_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(max-pthreads-per-node,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --with-max-pthreads-per-node was given. if test "${with_max_pthreads_per_node+set}" = set; then : withval=$with_max_pthreads_per_node; fi if test "${with_max_pthreads_per_node+set}" = set; then : withval=$with_max_pthreads_per_node; case "$withval" in no) : ;; *) : cat >>confdefs.h <<_ACEOF #define GASNETI_MAX_THREADS_CONFIGURE $withval _ACEOF ;; esac else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(max-pthreads-per-node,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$have_pthread" = no ; then GASNET_THREAD_DEFINES="" GASNET_THREAD_LIBS="" else # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS $GASNET_THREAD_DEFINES -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS $GASNET_THREAD_DEFINES -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS $GASNET_THREAD_DEFINES -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$GASNET_THREAD_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$GASNET_THREAD_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$GASNET_THREAD_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # define HAVE_PTHREAD_H for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF fi done # libraries that may be required for some POSIX thread features opt_pthread_libs="pthread pthreads c_r" # look for optional pthreads entry points and features { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setconcurrency" >&5 $as_echo_n "checking for library containing pthread_setconcurrency... " >&6; } if ${ac_cv_search_pthread_setconcurrency+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_setconcurrency (); int main () { return pthread_setconcurrency (); ; return 0; } _ACEOF for ac_lib in '' $opt_pthread_libs; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setconcurrency=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setconcurrency+:} false; then : break fi done if ${ac_cv_search_pthread_setconcurrency+:} false; then : else ac_cv_search_pthread_setconcurrency=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setconcurrency" >&5 $as_echo "$ac_cv_search_pthread_setconcurrency" >&6; } ac_res=$ac_cv_search_pthread_setconcurrency if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_kill" >&5 $as_echo_n "checking for library containing pthread_kill... " >&6; } if ${ac_cv_search_pthread_kill+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_kill (); int main () { return pthread_kill (); ; return 0; } _ACEOF for ac_lib in '' $opt_pthread_libs; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_kill=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_kill+:} false; then : break fi done if ${ac_cv_search_pthread_kill+:} false; then : else ac_cv_search_pthread_kill=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_kill" >&5 $as_echo "$ac_cv_search_pthread_kill" >&6; } ac_res=$ac_cv_search_pthread_kill if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_PTHREAD_KILL 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_kill_other_threads_np" >&5 $as_echo_n "checking for library containing pthread_kill_other_threads_np... " >&6; } if ${ac_cv_search_pthread_kill_other_threads_np+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_kill_other_threads_np (); int main () { return pthread_kill_other_threads_np (); ; return 0; } _ACEOF for ac_lib in '' $opt_pthread_libs; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_kill_other_threads_np=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_kill_other_threads_np+:} false; then : break fi done if ${ac_cv_search_pthread_kill_other_threads_np+:} false; then : else ac_cv_search_pthread_kill_other_threads_np=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_kill_other_threads_np" >&5 $as_echo "$ac_cv_search_pthread_kill_other_threads_np" >&6; } ac_res=$ac_cv_search_pthread_kill_other_threads_np if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5 $as_echo_n "checking for library containing pthread_sigmask... " >&6; } if ${ac_cv_search_pthread_sigmask+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_sigmask (); int main () { return pthread_sigmask (); ; return 0; } _ACEOF for ac_lib in '' $opt_pthread_libs; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_sigmask=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_sigmask+:} false; then : break fi done if ${ac_cv_search_pthread_sigmask+:} false; then : else ac_cv_search_pthread_sigmask=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5 $as_echo "$ac_cv_search_pthread_sigmask" >&6; } ac_res=$ac_cv_search_pthread_sigmask if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(rwlock,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-rwlock was given. if test "${enable_rwlock+set}" = set; then : enableval=$enable_rwlock; fi case "$enable_rwlock" in no) : enabled_rwlock=no ;; yes) : enabled_rwlock=yes ;; *) : enabled_rwlock=probe ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(rwlock,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_rwlock" != "no" ; then have_rwlock="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_rwlock_tryrdlock" >&5 $as_echo_n "checking for library containing pthread_rwlock_tryrdlock... " >&6; } if ${ac_cv_search_pthread_rwlock_tryrdlock+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_rwlock_tryrdlock (); int main () { return pthread_rwlock_tryrdlock (); ; return 0; } _ACEOF for ac_lib in '' $opt_pthread_libs; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_rwlock_tryrdlock=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_rwlock_tryrdlock+:} false; then : break fi done if ${ac_cv_search_pthread_rwlock_tryrdlock+:} false; then : else ac_cv_search_pthread_rwlock_tryrdlock=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_rwlock_tryrdlock" >&5 $as_echo "$ac_cv_search_pthread_rwlock_tryrdlock" >&6; } ac_res=$ac_cv_search_pthread_rwlock_tryrdlock if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else have_rwlock=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_rwlock_wrlock" >&5 $as_echo_n "checking for library containing pthread_rwlock_wrlock... " >&6; } if ${ac_cv_search_pthread_rwlock_wrlock+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_rwlock_wrlock (); int main () { return pthread_rwlock_wrlock (); ; return 0; } _ACEOF for ac_lib in '' $opt_pthread_libs; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_rwlock_wrlock=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_rwlock_wrlock+:} false; then : break fi done if ${ac_cv_search_pthread_rwlock_wrlock+:} false; then : else ac_cv_search_pthread_rwlock_wrlock=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_rwlock_wrlock" >&5 $as_echo "$ac_cv_search_pthread_rwlock_wrlock" >&6; } ac_res=$ac_cv_search_pthread_rwlock_wrlock if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else have_rwlock=no fi if test "$have_rwlock" = "yes" ; then $as_echo "#define GASNETI_HAVE_PTHREAD_RWLOCK 1" >>confdefs.h fi if test "$enabled_rwlock$have_rwlock" = "yesno"; then echo echo "configure error: --enable-rwlock passed but no working pthread_rwlock_t support found" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(tls,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-tls was given. if test "${enable_tls+set}" = set; then : enableval=$enable_tls; fi case "$enable_tls" in no) : enabled_tls=no ;; yes) : enabled_tls=yes ;; *) : enabled_tls=probe ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(tls,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_tls" != "no" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_TLS_SUPPORT vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_WITHCC(whether the GCC __thread extension is supported.,tls_supported,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(whether the GCC __thread extension is supported.,tls_supported,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the GCC __thread extension is supported." >&5 $as_echo_n "checking whether the GCC __thread extension is supported.... " >&6; } if ${gasnet_cv_tls_supported+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #define NTHREADS 5 pthread_t p[NTHREADS]; pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; extern __thread long tlocal; void foo() { tlocal = 4; } /* extern + use + definition crashes gcc-3.3/ia64 */ __thread long tlocal = 0; /* trigger a bug on gcc-3.4/solaris/SPARC - misalignment during compilation with -g leads to a link error: relocation error: R_SPARC_TLS_DTPOFF32 .. symbol misc2: offset 0xff351dd1 is non-aligned */ __thread int misc = 0; __thread long misc2 = 0; void * thread_start (void *arg) { int id = *((int *)arg); int *return_val = malloc(sizeof(int)); if (pthread_mutex_lock (&lock)) { exit (2); } /* if the value is truly thread-local, this assignment will yield the value 1, for each thread. If tlocal is instead a process global static value then tlocal will be incremented by each thread, and its final value will be the number of threads. */ tlocal += 1; if (pthread_mutex_unlock (&lock)) { exit (2); } *return_val = tlocal; /* detect an Intel 9.0/9.1 bug on x86/Linux (n2001) */ if (misc != 0 || misc2 != 0) *return_val = -1; return return_val; } int main () { int i; for (i = 0; i < NTHREADS; ++i) { int *id = (int *)malloc(sizeof(int)); *id = i; if (pthread_create(&p[i], NULL, thread_start, id)) { exit (2); } } for (i = 0; i < NTHREADS; ++i) { int *rc; if (pthread_join (p[i], (void **)&rc)) { exit (2); } if (*rc != 1) { exit (1); } } return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_tls_supported=yes else gasnet_cv_tls_supported=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_tls_supported" >&5 $as_echo "$gasnet_cv_tls_supported" >&6; } if test "$gasnet_cv_tls_supported" = yes; then : $as_echo "#define GASNETI_HAVE_TLS_SUPPORT 1" >>confdefs.h have_tls=yes else : have_tls=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(whether the GCC __thread extension is supported.,tls_supported,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(whether the GCC __thread extension is supported.,tls_supported,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the GCC __thread extension is supported." >&5 $as_echo_n "checking whether the GCC __thread extension is supported.... " >&6; } if ${gasnet_cv_tls_supported+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #define NTHREADS 5 pthread_t p[NTHREADS]; pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; extern __thread long tlocal; void foo() { tlocal = 4; } /* extern + use + definition crashes gcc-3.3/ia64 */ __thread long tlocal = 0; /* trigger a bug on gcc-3.4/solaris/SPARC - misalignment during compilation with -g leads to a link error: relocation error: R_SPARC_TLS_DTPOFF32 .. symbol misc2: offset 0xff351dd1 is non-aligned */ __thread int misc = 0; __thread long misc2 = 0; void * thread_start (void *arg) { int id = *((int *)arg); int *return_val = malloc(sizeof(int)); if (pthread_mutex_lock (&lock)) { exit (2); } /* if the value is truly thread-local, this assignment will yield the value 1, for each thread. If tlocal is instead a process global static value then tlocal will be incremented by each thread, and its final value will be the number of threads. */ tlocal += 1; if (pthread_mutex_unlock (&lock)) { exit (2); } *return_val = tlocal; /* detect an Intel 9.0/9.1 bug on x86/Linux (n2001) */ if (misc != 0 || misc2 != 0) *return_val = -1; return return_val; } int main(void) { int i; for (i = 0; i < NTHREADS; ++i) { int *id = (int *)malloc(sizeof(int)); *id = i; if (pthread_create(&p[i], NULL, thread_start, id)) { exit (2); } } for (i = 0; i < NTHREADS; ++i) { int *rc; if (pthread_join (p[i], (void **)&rc)) { exit (2); } if (*rc != 1) { exit (1); } } return 0; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_tls_supported=yes else gasnet_cv_tls_supported=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_tls_supported" >&5 $as_echo "$gasnet_cv_tls_supported" >&6; } if test "$gasnet_cv_tls_supported" = yes; then : $as_echo "#define GASNETI_HAVE_TLS_SUPPORT 1" >>confdefs.h have_tls=yes else : have_tls=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(whether the GCC __thread extension is supported.,tls_supported,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_WITHCC(whether the GCC __thread extension is supported.,tls_supported,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_TLS_SUPPORT ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$enabled_tls$have_tls" = "yesno"; then echo echo "configure error: --enable-tls passed but no working tls support found" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(threadinfo-opt,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-threadinfo-opt was given. if test "${enable_threadinfo_opt+set}" = set; then : enableval=$enable_threadinfo_opt; fi case "$enable_threadinfo_opt" in no) : cat >>confdefs.h <<_ACEOF #define GASNETI_THREADINFO_OPT_CONFIGURE 0 _ACEOF ;; yes) : cat >>confdefs.h <<_ACEOF #define GASNETI_THREADINFO_OPT_CONFIGURE 1 _ACEOF ;; *) : ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(threadinfo-opt,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) case "$target_os" in freebsd*) ;; # bug 1205: intentionally avoid -lpthread on BSD, where it causes problems netbsd*) ;; openbsd*) ;; *) GASNET_THREAD_LIBS="$LIBS" ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi # Determine the cache line size we should use for padding to avoid false sharing cache traffic { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared data cache line size" >&5 $as_echo_n "checking for shared data cache line size... " >&6; } # initial guess based on architecture case "$target_cpu" in # when chip revs differ, we should err on the larger size i*86) cache_line_guess=64 ;; x86_64) cache_line_guess=64 ;; arm*) cache_line_guess=64 ;; aarch64) cache_line_guess=64 ;; rs6000) cache_line_guess=32 ;; # https://www.csee.umbc.edu/portal/help/architecture/rs6000_arch.ps powerpc*) cache_line_guess=128 ;; # https://www.7-cpu.com/cpu/Power8.html sparc) cache_line_guess=128 ;; # https://en.wikipedia.org/wiki/SPARC64_V *) cache_line_guess=128 ;; # the default when we have no other info esac # allow the OS to refine our guess if test "$cross_compiling" = "no"; then cache_line_guess_os= case "$target_os" in darwin*) # could also use `sysctl machdep.cpu.cache.linesize` cache_line_guess_os=`(/usr/sbin/sysctl hw.cachelinesize | cut '-d ' -f2) 2>/dev/null` ;; linux*) # `getconf LEVEL1_DCACHE_LINESIZE` and cache_alignment in /proc/cpuinfo seem less reliable cache_line_guess_os=`(cat /sys/devices/system/cpu/cpu0/cache/index{0,1,2,3}/coherency_line_size | tail -1) 2>/dev/null` ;; *) ;; esac if test -n "$cache_line_guess_os" ; then cache_line_guess=$cache_line_guess_os fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cache_line_guess" >&5 $as_echo "$cache_line_guess" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CACHE_LINE_BYTES],[$cache_line_guess],[shared data cache line width, in bytes (default is platform-dependent)]) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --with-cache-line-bytes was given. if test "${with_cache_line_bytes+set}" = set; then : withval=$with_cache_line_bytes; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CACHE_LINE_BYTES setting" >&5 $as_echo_n "checking for CACHE_LINE_BYTES setting... " >&6; } envval_src_CACHE_LINE_BYTES="cached" if ${gasnet_cv_envvar_CACHE_LINE_BYTES+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_CACHE_LINE_BYTES="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CACHE_LINE_BYTES="$cache_line_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cachelinebytes+set}" = "set" ; then gasnet_cv_envvar_CACHE_LINE_BYTES="${_gasneti_nenv_cachelinebytes}" envval_src_CACHE_LINE_BYTES=given elif test "${_gasneti_cenv_cachelinebytes+set}" = "set" ; then gasnet_cv_envvar_CACHE_LINE_BYTES="${_gasneti_cenv_cachelinebytes}" envval_src_CACHE_LINE_BYTES=conf else gasnet_cv_envvar_CACHE_LINE_BYTES=$envval_default_CACHE_LINE_BYTES envval_src_CACHE_LINE_BYTES=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CACHE_LINE_BYTES cachelinebytes $gasnet_cv_configure_args_norm fi CACHE_LINE_BYTES="$gasnet_cv_envvar_CACHE_LINE_BYTES" if test "$CACHE_LINE_BYTES" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CACHE_LINE_BYTES if test "$envval_src_CACHE_LINE_BYTES" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CACHE_LINE_BYTES" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CACHE_LINE_BYTES\"" >&5 $as_echo " \"$CACHE_LINE_BYTES\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CACHE_LINE_BYTES\"" >&5 $as_echo " (default) \"$CACHE_LINE_BYTES\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CACHE_LINE_BYTES\"" >&5 $as_echo " (disabled) \"$CACHE_LINE_BYTES\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CACHE_LINE_BYTES\"" >&5 $as_echo " (provided) \"$CACHE_LINE_BYTES\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CACHE_LINE_BYTES\"" >&5 $as_echo " (provided) \"$CACHE_LINE_BYTES\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CACHE_LINE_BYTES. Please configure --with-CACHE_LINE_BYTES=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CACHE_LINE_BYTES],[$cache_line_guess],[shared data cache line width, in bytes (default is platform-dependent)]) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_CACHE_LINE_BYTES $CACHE_LINE_BYTES _ACEOF case "$CACHE_LINE_BYTES" in 8) GASNETI_CACHE_LINE_SHIFT=3 ;; 16) GASNETI_CACHE_LINE_SHIFT=4 ;; 32) GASNETI_CACHE_LINE_SHIFT=5 ;; 64) GASNETI_CACHE_LINE_SHIFT=6 ;; 128) GASNETI_CACHE_LINE_SHIFT=7 ;; 256) GASNETI_CACHE_LINE_SHIFT=8 ;; 512) GASNETI_CACHE_LINE_SHIFT=9 ;; 1024) GASNETI_CACHE_LINE_SHIFT=10 ;; *) as_fn_error $? "unsupported CACHE_LINE_BYTES=$CACHE_LINE_BYTES" "$LINENO" 5 ;; esac cat >>confdefs.h <<_ACEOF #define GASNETI_CACHE_LINE_SHIFT $GASNETI_CACHE_LINE_SHIFT _ACEOF if test x"$enabled_valgrind" = x"yes" ; then GASNETI_TM0_ALIGN=0 # team disalignment optimization leads to "possible leak" reports for every non-primordial gex_TM_t elif test $CACHE_LINE_BYTES -lt 8; then GASNETI_TM0_ALIGN=16 else GASNETI_TM0_ALIGN=`expr 2 \* $CACHE_LINE_BYTES` fi cat >>confdefs.h <<_ACEOF #define GASNETI_TM0_ALIGN $GASNETI_TM0_ALIGN _ACEOF if test "$have_pthread" = yes; then HAVE_PTHREAD_TRUE= HAVE_PTHREAD_FALSE='#' else HAVE_PTHREAD_TRUE='#' HAVE_PTHREAD_FALSE= fi PTHREADS="$have_pthread" ######################################################################## ## Process-shared memory (pshm) have_hugetlbfs=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(hugetlbfs,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-hugetlbfs was given. if test "${enable_hugetlbfs+set}" = set; then : enableval=$enable_hugetlbfs; fi case "$enable_hugetlbfs" in no) : enabled_hugetlbfs=no ;; yes) : enabled_hugetlbfs=yes ;; *) : enabled_hugetlbfs=probe ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(hugetlbfs,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_hugetlbfs" != 'no'; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_HOME(HUGETLBFS,hugetlbfs,hugectl,/usr/local,include/hugetlbfs.h) vvvvvvvvvvvvvvvvvvvvvv (L:2) HUGETLBFS_guess= for ac_prog in hugectl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_HUGETLBFS_guess_prog+:} false; then : $as_echo_n "(cached) " >&6 else case $HUGETLBFS_guess_prog in [\\/]* | ?:[\\/]*) ac_cv_path_HUGETLBFS_guess_prog="$HUGETLBFS_guess_prog" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_HUGETLBFS_guess_prog="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi HUGETLBFS_guess_prog=$ac_cv_path_HUGETLBFS_guess_prog if test -n "$HUGETLBFS_guess_prog"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HUGETLBFS_guess_prog" >&5 $as_echo "$HUGETLBFS_guess_prog" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$HUGETLBFS_guess_prog" && break done if test -n "$HUGETLBFS_guess_prog"; then HUGETLBFS_guess=`dirname \`dirname $HUGETLBFS_guess_prog\`` fi if test -z "$HUGETLBFS_guess" ; then for HUGETLBFS_guess_file in "include/hugetlbfs.h" "."; do for HUGETLBFS_guess in /usr/local /usr; do if test -r "$HUGETLBFS_guess/$HUGETLBFS_guess_file" ; then break 2 fi done done unset HUGETLBFS_guess_file fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HUGETLBFS_HOME],[$HUGETLBFS_guess],[Install prefix of hugetlbfs (auto-detected from PATH)]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-hugetlbfs-home was given. if test "${with_hugetlbfs_home+set}" = set; then : withval=$with_hugetlbfs_home; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HUGETLBFS_HOME setting" >&5 $as_echo_n "checking for HUGETLBFS_HOME setting... " >&6; } envval_src_HUGETLBFS_HOME="cached" if ${gasnet_cv_envvar_HUGETLBFS_HOME+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_HUGETLBFS_HOME="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HUGETLBFS_HOME="$HUGETLBFS_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hugetlbfshome+set}" = "set" ; then gasnet_cv_envvar_HUGETLBFS_HOME="${_gasneti_nenv_hugetlbfshome}" envval_src_HUGETLBFS_HOME=given elif test "${_gasneti_cenv_hugetlbfshome+set}" = "set" ; then gasnet_cv_envvar_HUGETLBFS_HOME="${_gasneti_cenv_hugetlbfshome}" envval_src_HUGETLBFS_HOME=conf else gasnet_cv_envvar_HUGETLBFS_HOME=$envval_default_HUGETLBFS_HOME envval_src_HUGETLBFS_HOME=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HUGETLBFS_HOME hugetlbfshome $gasnet_cv_configure_args_norm fi HUGETLBFS_HOME="$gasnet_cv_envvar_HUGETLBFS_HOME" if test "$HUGETLBFS_HOME" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HUGETLBFS_HOME if test "$envval_src_HUGETLBFS_HOME" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HUGETLBFS_HOME" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HUGETLBFS_HOME\"" >&5 $as_echo " \"$HUGETLBFS_HOME\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HUGETLBFS_HOME\"" >&5 $as_echo " (default) \"$HUGETLBFS_HOME\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HUGETLBFS_HOME\"" >&5 $as_echo " (disabled) \"$HUGETLBFS_HOME\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HUGETLBFS_HOME\"" >&5 $as_echo " (provided) \"$HUGETLBFS_HOME\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HUGETLBFS_HOME\"" >&5 $as_echo " (provided) \"$HUGETLBFS_HOME\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HUGETLBFS_HOME. Please configure --with-HUGETLBFS_HOME=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HUGETLBFS_HOME],[$HUGETLBFS_guess],[Install prefix of hugetlbfs (auto-detected from PATH)]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $HUGETLBFS_HOME is the hugetlbfs install prefix" >&5 $as_echo_n "checking if $HUGETLBFS_HOME is the hugetlbfs install prefix... " >&6; } HUGETLBFS_HOME_good=no if test -r "$HUGETLBFS_HOME/include/hugetlbfs.h"; then HUGETLBFS_HOME_good=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test $HUGETLBFS_HOME_good = no && test -n "$HUGETLBFS_guess_prog"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_FOLLOWLINKS(HUGETLBFS_guess_prog) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_fl_file="$HUGETLBFS_guess_prog" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` while test "$gasnet_fl_link"; do gasnet_fl_file="$gasnet_fl_link" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` done HUGETLBFS_guess_prog="$gasnet_fl_file" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FOLLOWLINKS(HUGETLBFS_guess_prog) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) HUGETLBFS_HOME_tmp=`dirname \`dirname $HUGETLBFS_guess_prog\`` if test -r "$HUGETLBFS_HOME_tmp/include/hugetlbfs.h"; then HUGETLBFS_HOME_good=yes HUGETLBFS_HOME="$HUGETLBFS_HOME_tmp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - followed symlink to $HUGETLBFS_HOME" >&5 $as_echo "no - followed symlink to $HUGETLBFS_HOME" >&6; } fi unset HUGETLBFS_HOME_tmp fi if test $HUGETLBFS_HOME_good = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: probably not - missing include/hugetlbfs.h" >&5 $as_echo "probably not - missing include/hugetlbfs.h" >&6; } fi unset HUGETLBFS_HOME_good unset HUGETLBFS_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_CFLAGS([HUGETLBFS]) vvvvvvvvvvvvvvvvvvvvvv (L:2) case "$HUGETLBFS_HOME" in /usr|/) HUGETLBFS_cflags_guess='';; *) if test -d "$HUGETLBFS_HOME/include/."; then HUGETLBFS_cflags_guess="-I$HUGETLBFS_HOME/include" else HUGETLBFS_cflags_guess='' fi;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HUGETLBFS_CFLAGS],[$HUGETLBFS_cflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-hugetlbfs-cflags was given. if test "${with_hugetlbfs_cflags+set}" = set; then : withval=$with_hugetlbfs_cflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HUGETLBFS_CFLAGS setting" >&5 $as_echo_n "checking for HUGETLBFS_CFLAGS setting... " >&6; } envval_src_HUGETLBFS_CFLAGS="cached" if ${gasnet_cv_envvar_HUGETLBFS_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_HUGETLBFS_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HUGETLBFS_CFLAGS="$HUGETLBFS_cflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hugetlbfscflags+set}" = "set" ; then gasnet_cv_envvar_HUGETLBFS_CFLAGS="${_gasneti_nenv_hugetlbfscflags}" envval_src_HUGETLBFS_CFLAGS=given elif test "${_gasneti_cenv_hugetlbfscflags+set}" = "set" ; then gasnet_cv_envvar_HUGETLBFS_CFLAGS="${_gasneti_cenv_hugetlbfscflags}" envval_src_HUGETLBFS_CFLAGS=conf else gasnet_cv_envvar_HUGETLBFS_CFLAGS=$envval_default_HUGETLBFS_CFLAGS envval_src_HUGETLBFS_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HUGETLBFS_CFLAGS hugetlbfscflags $gasnet_cv_configure_args_norm fi HUGETLBFS_CFLAGS="$gasnet_cv_envvar_HUGETLBFS_CFLAGS" if test "$HUGETLBFS_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HUGETLBFS_CFLAGS if test "$envval_src_HUGETLBFS_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HUGETLBFS_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HUGETLBFS_CFLAGS\"" >&5 $as_echo " \"$HUGETLBFS_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HUGETLBFS_CFLAGS\"" >&5 $as_echo " (default) \"$HUGETLBFS_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HUGETLBFS_CFLAGS\"" >&5 $as_echo " (disabled) \"$HUGETLBFS_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HUGETLBFS_CFLAGS\"" >&5 $as_echo " (provided) \"$HUGETLBFS_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HUGETLBFS_CFLAGS\"" >&5 $as_echo " (provided) \"$HUGETLBFS_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HUGETLBFS_CFLAGS. Please configure --with-HUGETLBFS_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HUGETLBFS_CFLAGS],[$HUGETLBFS_cflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) unset HUGETLBFS_cflags_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HUGETLBFS_LIBS],[-lhugetlbfs]) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --with-hugetlbfs-libs was given. if test "${with_hugetlbfs_libs+set}" = set; then : withval=$with_hugetlbfs_libs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HUGETLBFS_LIBS setting" >&5 $as_echo_n "checking for HUGETLBFS_LIBS setting... " >&6; } envval_src_HUGETLBFS_LIBS="cached" if ${gasnet_cv_envvar_HUGETLBFS_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_HUGETLBFS_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HUGETLBFS_LIBS="-lhugetlbfs" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hugetlbfslibs+set}" = "set" ; then gasnet_cv_envvar_HUGETLBFS_LIBS="${_gasneti_nenv_hugetlbfslibs}" envval_src_HUGETLBFS_LIBS=given elif test "${_gasneti_cenv_hugetlbfslibs+set}" = "set" ; then gasnet_cv_envvar_HUGETLBFS_LIBS="${_gasneti_cenv_hugetlbfslibs}" envval_src_HUGETLBFS_LIBS=conf else gasnet_cv_envvar_HUGETLBFS_LIBS=$envval_default_HUGETLBFS_LIBS envval_src_HUGETLBFS_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HUGETLBFS_LIBS hugetlbfslibs $gasnet_cv_configure_args_norm fi HUGETLBFS_LIBS="$gasnet_cv_envvar_HUGETLBFS_LIBS" if test "$HUGETLBFS_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HUGETLBFS_LIBS if test "$envval_src_HUGETLBFS_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HUGETLBFS_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HUGETLBFS_LIBS\"" >&5 $as_echo " \"$HUGETLBFS_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HUGETLBFS_LIBS\"" >&5 $as_echo " (default) \"$HUGETLBFS_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HUGETLBFS_LIBS\"" >&5 $as_echo " (disabled) \"$HUGETLBFS_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HUGETLBFS_LIBS\"" >&5 $as_echo " (provided) \"$HUGETLBFS_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HUGETLBFS_LIBS\"" >&5 $as_echo " (provided) \"$HUGETLBFS_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HUGETLBFS_LIBS. Please configure --with-HUGETLBFS_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HUGETLBFS_LIBS],[-lhugetlbfs]) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_LDFLAGS([HUGETLBFS],[hugetlbfs]) vvvvvvvvvvvvvvvvvvvvvv (L:2) case "$HUGETLBFS_HOME" in /usr|/) HUGETLBFS_ldflags_guess='';; *) for HUGETLBFS_ldflags_guess_dir in "$HUGETLBFS_HOME/lib${GASNETI_PTR_BITS}" "$HUGETLBFS_HOME/lib" ''; do test -z "$HUGETLBFS_ldflags_guess_dir" && break for HUGETLBFS_ldflags_guess_lib in hugetlbfs; do for HUGETLBFS_ldflags_guess_suff in a so sl dylib la dll; do if test -r "$HUGETLBFS_ldflags_guess_dir/lib$HUGETLBFS_ldflags_guess_lib.$HUGETLBFS_ldflags_guess_suff"; then break 3; fi done done done if test -n "$HUGETLBFS_ldflags_guess_dir"; then HUGETLBFS_ldflags_guess="-L$HUGETLBFS_ldflags_guess_dir" # deferred to appear after help for [PREFIX]_LDFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(hugetlbfs-rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) case "$enable_hugetlbfs_rpath" in no) : enabled_hugetlbfs_rpath='' ;; yes) : enabled_hugetlbfs_rpath="$HUGETLBFS_ldflags_guess_dir" ;; *) : if test -z "$enabled_hugetlbfs_rpath"; then if test "x$enabled_rpath" = xyes; then enabled_hugetlbfs_rpath="$HUGETLBFS_ldflags_guess_dir" else enabled_hugetlbfs_rpath='' fi fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(hugetlbfs-rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -n "$enabled_hugetlbfs_rpath"; then if test "${cc_rpath_option:+set}" = set; then HUGETLBFS_ldflags_guess="$HUGETLBFS_ldflags_guess $cc_rpath_option$enabled_hugetlbfs_rpath" else warn_missing_rpath="$warn_missing_rpath hugetlbfs" fi fi HUGETLBFS_ldflags_guess="${HUGETLBFS_ldflags_guess}" else HUGETLBFS_ldflags_guess='' fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HUGETLBFS_LDFLAGS],[$HUGETLBFS_ldflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-hugetlbfs-ldflags was given. if test "${with_hugetlbfs_ldflags+set}" = set; then : withval=$with_hugetlbfs_ldflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HUGETLBFS_LDFLAGS setting" >&5 $as_echo_n "checking for HUGETLBFS_LDFLAGS setting... " >&6; } envval_src_HUGETLBFS_LDFLAGS="cached" if ${gasnet_cv_envvar_HUGETLBFS_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_HUGETLBFS_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HUGETLBFS_LDFLAGS="$HUGETLBFS_ldflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hugetlbfsldflags+set}" = "set" ; then gasnet_cv_envvar_HUGETLBFS_LDFLAGS="${_gasneti_nenv_hugetlbfsldflags}" envval_src_HUGETLBFS_LDFLAGS=given elif test "${_gasneti_cenv_hugetlbfsldflags+set}" = "set" ; then gasnet_cv_envvar_HUGETLBFS_LDFLAGS="${_gasneti_cenv_hugetlbfsldflags}" envval_src_HUGETLBFS_LDFLAGS=conf else gasnet_cv_envvar_HUGETLBFS_LDFLAGS=$envval_default_HUGETLBFS_LDFLAGS envval_src_HUGETLBFS_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HUGETLBFS_LDFLAGS hugetlbfsldflags $gasnet_cv_configure_args_norm fi HUGETLBFS_LDFLAGS="$gasnet_cv_envvar_HUGETLBFS_LDFLAGS" if test "$HUGETLBFS_LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HUGETLBFS_LDFLAGS if test "$envval_src_HUGETLBFS_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HUGETLBFS_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HUGETLBFS_LDFLAGS\"" >&5 $as_echo " \"$HUGETLBFS_LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HUGETLBFS_LDFLAGS\"" >&5 $as_echo " (default) \"$HUGETLBFS_LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HUGETLBFS_LDFLAGS\"" >&5 $as_echo " (disabled) \"$HUGETLBFS_LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HUGETLBFS_LDFLAGS\"" >&5 $as_echo " (provided) \"$HUGETLBFS_LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HUGETLBFS_LDFLAGS\"" >&5 $as_echo " (provided) \"$HUGETLBFS_LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HUGETLBFS_LDFLAGS. Please configure --with-HUGETLBFS_LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HUGETLBFS_LDFLAGS],[$HUGETLBFS_ldflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # Check whether --enable-hugetlbfs-rpath was given. if test "${enable_hugetlbfs_rpath+set}" = set; then : enableval=$enable_hugetlbfs_rpath; fi unset HUGETLBFS_ldflags_guess unset HUGETLBFS_ldflags_guess_dir unset HUGETLBFS_ldflags_guess_lib unset HUGETLBFS_ldflags_guess_suff # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([HUGETLBFS_LDFLAGS],[HUGETLBFS_LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:2) eval gasnet_fn_split_linker_opts HUGETLBFS_LDFLAGS HUGETLBFS_LIBS $HUGETLBFS_LDFLAGS $HUGETLBFS_LIBS #echo "HUGETLBFS_LDFLAGS=[$]HUGETLBFS_LDFLAGS" #echo "HUGETLBFS_LIBS=[$]HUGETLBFS_LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([HUGETLBFS_LDFLAGS],[HUGETLBFS_LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $HUGETLBFS_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $HUGETLBFS_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $HUGETLBFS_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $HUGETLBFS_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $HUGETLBFS_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $HUGETLBFS_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $HUGETLBFS_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $HUGETLBFS_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $HUGETLBFS_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for usable libhugetlbfs,hugetlbfs_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable libhugetlbfs" >&5 $as_echo_n "checking for usable libhugetlbfs... " >&6; } if ${gasnet_cv_hugetlbfs_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int rc1 = hugetlbfs_unlinked_fd(); const char * rc2 = hugetlbfs_find_path(); long rc3 = gethugepagesize(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_hugetlbfs_works=yes else gasnet_cv_hugetlbfs_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_hugetlbfs_works" >&5 $as_echo "$gasnet_cv_hugetlbfs_works" >&6; } if test "$gasnet_cv_hugetlbfs_works" = yes; then : have_hugetlbfs=yes $as_echo "#define HAVE_HUGETLBFS 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for usable libhugetlbfs,hugetlbfs_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_hugetlbfs$have_hugetlbfs" = 'yesno'; then echo echo "configure error: User requested --enable-hugetlbfs but the header and/or library could not be found" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "$have_hugetlbfs" = 'yes'; then case "$enable_hugetlbfs_whole_archive" in '' | no) : ;; *) : if test "$HUGETLBFS_LIBS" = '-lhugetlbfs'; then HUGETLBFS_LIBS="-Wl,--whole-archive,-lhugetlbfs,--no-whole-archive" else echo echo "configure error: User requested --enable-hugetlbfs-whole-archive, which is a deprecated option available only when libhugetlbfs is the only library required. Please configure using the fully-general --with-hugetlbfs-libs option instead." if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi ;; esac fi fi with_pshm=no GASNET_PSHM_CFLAGS= GASNET_PSHM_LDFLAGS= GASNET_PSHM_LIBS= GASNET_PSHM_ENABLED=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(pshm,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-pshm was given. if test "${enable_pshm+set}" = set; then : enableval=$enable_pshm; fi case "$enable_pshm" in no) : enabled_pshm=no ;; yes) : enabled_pshm=yes ;; *) : if test "$segconfig" = everything; then enabled_pshm=no elif test "$cross_compiling" = yes; then enabled_pshm=no else # Current default is 'probe' unless overridden in case statment below enabled_pshm=probe case "$target_os" in cygwin*) if test "$have_cygwin2" = 'no'; then enabled_pshm=no; fi ;; esac fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(pshm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$segconfig$enabled_pshm" = everythingyes; then echo echo "configure error: User requested --enable-segment-everything and --enable-pshm but PSHM support does not include GASNET_SEGMENT_EVERYTHING." if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "$enabled_pshm" != no; then # First check for POSIX (shm_open) support # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(pshm-posix,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-pshm-posix was given. if test "${enable_pshm_posix+set}" = set; then : enableval=$enable_pshm_posix; fi case "$enable_pshm_posix" in no) : enabled_pshm_posix=no ;; yes) : enabled_pshm_posix=yes ;; *) : # Default is YES except: # + on Solaris due to incompatibility w/ ibv and the "robustness" of SysV # + on HPE Cray EX where we prefer hugetlbfs if available enabled_pshm_posix=yes case "$target_os" in solaris*) enabled_pshm_posix=no ;; esac if test "$GASNET_PLATFORM$have_hugetlbfs" = crayexyes; then enabled_pshm_posix=no fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(pshm-posix,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_pshm_posix$with_pshm" = yesno; then # shm_open() might be in libc (e.g. AIX, Darwin) or librt (e.g. Linux, Solaris) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) have_shm_open=probe { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5 $as_echo_n "checking for library containing shm_open... " >&6; } if ${ac_cv_search_shm_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shm_open (); int main () { return shm_open (); ; return 0; } _ACEOF for ac_lib in '' rt posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_shm_open=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_shm_open+:} false; then : break fi done if ${ac_cv_search_shm_open+:} false; then : else ac_cv_search_shm_open=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5 $as_echo "$ac_cv_search_shm_open" >&6; } ac_res=$ac_cv_search_shm_open if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" if test "$cross_compiling" = "yes" ; then # To the best of my knowledge CNL, and BG/L all lack # working shm_open() support, though at least CNL finds the symbol. # So, we default to NO shm_open() when cross-compiling. -PHH # Update: CNL on Cray XE *does* have working shm_open(). -PHH # One can set CROSS_HAVE_SHM_OPEN=1 to force building PSHM for POSIX. # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(GASNETI_HAVE_SHM_OPEN,HAVE_SHM_OPEN,0) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_HAVE_SHM_OPEN],[0]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_HAVE_SHM_OPEN setting" >&5 $as_echo_n "checking for CROSS_HAVE_SHM_OPEN setting... " >&6; } envval_src_CROSS_HAVE_SHM_OPEN="cached" if ${gasnet_cv_envvar_CROSS_HAVE_SHM_OPEN+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_HAVE_SHM_OPEN="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_HAVE_SHM_OPEN="0" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosshaveshmopen+set}" = "set" ; then gasnet_cv_envvar_CROSS_HAVE_SHM_OPEN="${_gasneti_nenv_crosshaveshmopen}" envval_src_CROSS_HAVE_SHM_OPEN=given elif test "${_gasneti_cenv_crosshaveshmopen+set}" = "set" ; then gasnet_cv_envvar_CROSS_HAVE_SHM_OPEN="${_gasneti_cenv_crosshaveshmopen}" envval_src_CROSS_HAVE_SHM_OPEN=conf else gasnet_cv_envvar_CROSS_HAVE_SHM_OPEN=$envval_default_CROSS_HAVE_SHM_OPEN envval_src_CROSS_HAVE_SHM_OPEN=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_HAVE_SHM_OPEN crosshaveshmopen $gasnet_cv_configure_args_norm fi CROSS_HAVE_SHM_OPEN="$gasnet_cv_envvar_CROSS_HAVE_SHM_OPEN" if test "$CROSS_HAVE_SHM_OPEN" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_HAVE_SHM_OPEN if test "$envval_src_CROSS_HAVE_SHM_OPEN" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_HAVE_SHM_OPEN" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_HAVE_SHM_OPEN\"" >&5 $as_echo " \"$CROSS_HAVE_SHM_OPEN\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_HAVE_SHM_OPEN\"" >&5 $as_echo " (default) \"$CROSS_HAVE_SHM_OPEN\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_HAVE_SHM_OPEN\"" >&5 $as_echo " (disabled) \"$CROSS_HAVE_SHM_OPEN\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_HAVE_SHM_OPEN\"" >&5 $as_echo " (provided) \"$CROSS_HAVE_SHM_OPEN\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_HAVE_SHM_OPEN\"" >&5 $as_echo " (provided) \"$CROSS_HAVE_SHM_OPEN\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_HAVE_SHM_OPEN. Please configure --with-CROSS_HAVE_SHM_OPEN=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_HAVE_SHM_OPEN],[0]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$CROSS_HAVE_SHM_OPEN" = "" ; then as_fn_error $? "This configure script requires \$CROSS_HAVE_SHM_OPEN be set for cross-compilation" "$LINENO" 5 else GASNETI_HAVE_SHM_OPEN="$CROSS_HAVE_SHM_OPEN" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(GASNETI_HAVE_SHM_OPEN,HAVE_SHM_OPEN,0) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$CROSS_HAVE_SHM_OPEN" != 1; then have_shm_open=no fi fi if test "$have_shm_open" = probe; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_WITHCC(for working shm_open(),have_shm_open,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working shm_open(),have_shm_open,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working shm_open()" >&5 $as_echo_n "checking for working shm_open()... " >&6; } if ${gasnet_cv_have_shm_open+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include #define SHM_NAME "/GASNETconftst" int main () { int size = GASNETI_PAGESIZE; int fd; void * addr; fd = shm_open(SHM_NAME, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR); (void)shm_unlink(SHM_NAME); if (fd < 0) return 1; if (ftruncate(fd, size) < 0) return 1; addr = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); (void)close(fd); if (!addr || (addr == MAP_FAILED)) return 1; (void)munmap(addr, size); return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_have_shm_open=yes else gasnet_cv_have_shm_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_shm_open" >&5 $as_echo "$gasnet_cv_have_shm_open" >&6; } if test "$gasnet_cv_have_shm_open" = yes; then : have_shm_open=yes else : have_shm_open=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working shm_open(),have_shm_open,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for working shm_open(),have_shm_open,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working shm_open()" >&5 $as_echo_n "checking for working shm_open()... " >&6; } if ${gasnet_cv_have_shm_open+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include #define SHM_NAME "/GASNETconftst" int main(void) { int size = GASNETI_PAGESIZE; int fd; void * addr; fd = shm_open(SHM_NAME, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR); (void)shm_unlink(SHM_NAME); if (fd < 0) return 1; if (ftruncate(fd, size) < 0) return 1; addr = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); (void)close(fd); if (!addr || (addr == MAP_FAILED)) return 1; (void)munmap(addr, size); return 0; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_have_shm_open=yes else gasnet_cv_have_shm_open=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_shm_open" >&5 $as_echo "$gasnet_cv_have_shm_open" >&6; } if test "$gasnet_cv_have_shm_open" = yes; then : have_shm_open=yes else : have_shm_open=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for working shm_open(),have_shm_open,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_WITHCC(for working shm_open(),have_shm_open,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test "$have_shm_open" = yes; then $as_echo "#define GASNETI_PSHM_POSIX 1" >>confdefs.h GASNET_PSHM_LIBS="$LIBS" with_pshm=posix fi else have_shm_open=no fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi # Second check is for SysV (shmget) support enabled_pshm_sysv=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(pshm-sysv,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-pshm-sysv was given. if test "${enable_pshm_sysv+set}" = set; then : enableval=$enable_pshm_sysv; fi case "$enable_pshm_sysv" in no) : enabled_pshm_sysv=no ;; yes) : enabled_pshm_sysv=yes ;; *) : # Default is NO except: # + on Solaris due to "robust" defaults and compatibility with ibv-conduit enabled_pshm_sysv=no case "$target_os" in solaris*) enabled_pshm_sysv=yes ;; esac ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(pshm-sysv,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_pshm_sysv$with_pshm" = yesno; then ac_fn_c_check_func "$LINENO" "shmget" "ac_cv_func_shmget" if test "x$ac_cv_func_shmget" = xyes; then : $as_echo "#define GASNETI_PSHM_SYSV 1" >>confdefs.h with_pshm=sysv fi fi # Third check is for XPMEM+hugetlbfs support enabled_pshm_xpmem=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(pshm-xpmem,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-pshm-xpmem was given. if test "${enable_pshm_xpmem+set}" = set; then : enableval=$enable_pshm_xpmem; fi case "$enable_pshm_xpmem" in '' | no) : ;; *) : enabled_pshm_xpmem=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(pshm-xpmem,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_pshm_xpmem$with_pshm" = yesno; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) for ac_header in xpmem.h do : ac_fn_c_check_header_mongrel "$LINENO" "xpmem.h" "ac_cv_header_xpmem_h" "$ac_includes_default" if test "x$ac_cv_header_xpmem_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_XPMEM_H 1 _ACEOF found_xpmem_h=yes else if expr "$target" : ".*-cnl-" >/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \$CRAY_XPMEM_INCLUDE_OPTS in the environment" >&5 $as_echo_n "checking for \$CRAY_XPMEM_INCLUDE_OPTS in the environment... " >&6; } if test "${CRAY_XPMEM_INCLUDE_OPTS+set}" = set; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (rechecking there for xpmem.h)" >&5 $as_echo "yes (rechecking there for xpmem.h)" >&6; } unset ac_cv_header_xpmem_h # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS ${CRAY_XPMEM_INCLUDE_OPTS}") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS ${CRAY_XPMEM_INCLUDE_OPTS}" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS ${CRAY_XPMEM_INCLUDE_OPTS}") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) for ac_header in xpmem.h do : ac_fn_c_check_header_mongrel "$LINENO" "xpmem.h" "ac_cv_header_xpmem_h" "$ac_includes_default" if test "x$ac_cv_header_xpmem_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_XPMEM_H 1 _ACEOF fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test $ac_cv_header_xpmem_h = yes; then : found_xpmem_h=yes CPPFLAGS="$CRAY_XPMEM_INCLUDE_OPTS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test $ac_cv_header_xpmem_h = no; then : for ac_header in sn/xpmem.h do : ac_fn_c_check_header_mongrel "$LINENO" "sn/xpmem.h" "ac_cv_header_sn_xpmem_h" "$ac_includes_default" if test "x$ac_cv_header_sn_xpmem_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SN_XPMEM_H 1 _ACEOF found_xpmem_h=yes else found_xpmem_h=no fi done fi ac_cv_header_xpmem_h=no fi done LDFLAGS="$CRAY_XPMEM_POST_LINK_OPTS" LIBS="-lxpmem" if test $found_xpmem_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing xpmem_get" >&5 $as_echo_n "checking for library containing xpmem_get... " >&6; } if ${ac_cv_search_xpmem_get+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char xpmem_get (); int main () { return xpmem_get (); ; return 0; } _ACEOF for ac_lib in '' xpmem; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_xpmem_get=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_xpmem_get+:} false; then : break fi done if ${ac_cv_search_xpmem_get+:} false; then : else ac_cv_search_xpmem_get=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_xpmem_get" >&5 $as_echo "$ac_cv_search_xpmem_get" >&6; } ac_res=$ac_cv_search_xpmem_get if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" if test $have_hugetlbfs = yes; then LIBS="$LIBS $HUGETLBFS_LIBS" $as_echo "#define GASNETI_USE_HUGETLBFS 1" >>confdefs.h fi GASNET_PSHM_CFLAGS="$CPPFLAGS" GASNET_PSHM_LDFLAGS="$LDFLAGS" GASNET_PSHM_LIBS="$LIBS" for ac_func in xpmem_make_2 do : ac_fn_c_check_func "$LINENO" "xpmem_make_2" "ac_cv_func_xpmem_make_2" if test "x$ac_cv_func_xpmem_make_2" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_XPMEM_MAKE_2 1 _ACEOF fi done $as_echo "#define GASNETI_PSHM_XPMEM 1" >>confdefs.h with_pshm=xpmem fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi # Next check is for mmap()ed file support on hugetlbfs enabled_pshm_hugetlbfs=no pshm_hugetlbfs_why='User requested' # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(pshm-hugetlbfs,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-pshm-hugetlbfs was given. if test "${enable_pshm_hugetlbfs+set}" = set; then : enableval=$enable_pshm_hugetlbfs; fi case "$enable_pshm_hugetlbfs" in no) : enabled_pshm_hugetlbfs=no ;; yes) : enabled_pshm_hugetlbfs=yes ;; *) : # Default is NO except: # + on HPE Cray EX if available if test "$GASNET_PLATFORM$have_hugetlbfs" = crayexyes; then enabled_pshm_hugetlbfs=yes pshm_hugetlbfs_why='System defaults to' fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(pshm-hugetlbfs,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_pshm_hugetlbfs$with_pshm" = yesno; then if test $enabled_hugetlbfs = no; then echo echo "configure error: User requested --enable-pshm-hugetlbfs, but hugetlbfs support was disabled." if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 elif test $have_hugetlbfs = no; then echo echo "configure error: $pshm_hugetlbfs_why --enable-pshm-hugetlbfs but hugetlbfs support was not found." if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi $as_echo "#define GASNETI_PSHM_FILE 1" >>confdefs.h $as_echo "#define GASNETI_USE_HUGETLBFS 1" >>confdefs.h GASNET_PSHM_CFLAGS="$HUGETLBFS_CFLAGS" GASNET_PSHM_LDFLAGS="$HUGETLBFS_LDFLAGS" GASNET_PSHM_LIBS="$HUGETLBFS_LIBS" with_pshm=hugetlbfs fi # Final check is for mmap()ed file support enabled_pshm_file=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(pshm-file,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-pshm-file was given. if test "${enable_pshm_file+set}" = set; then : enableval=$enable_pshm_file; fi case "$enable_pshm_file" in '' | no) : ;; *) : enabled_pshm_file=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(pshm-file,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_pshm_file$with_pshm" = yesno; then $as_echo "#define GASNETI_PSHM_FILE 1" >>confdefs.h with_pshm=file fi fi if test "$with_pshm" != no; then $as_echo "#define GASNETI_PSHM_ENABLED 1" >>confdefs.h GASNET_PSHM_ENABLED=yes case "$target_os" in netbsd*) # XXX: We know this is required for decent performance, but WHY?!? # What magic does libpthread perform at library init time? GASNET_PSHM_LIBS="$GASNET_PSHM_LIBS -pthread" # Even if --disable-pthreads ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(large-pshm,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-large-pshm was given. if test "${enable_large_pshm+set}" = set; then : enableval=$enable_large_pshm; fi case "$enable_large_pshm" in '' | no) : gasnet_pshm_max_nodes=255 ;; *) : gasnet_pshm_max_nodes=46655 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(large-pshm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_CONFIG_PSHM_MAX_NODES $gasnet_pshm_max_nodes _ACEOF elif test "$enabled_pshm" = yes; then echo echo "configure error: User requested --enable-pshm but no supported implementation was found" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 elif test "$have_hugetlbfs" = yes && test "$GASNET_PLATFORM" = crayex ; then # If PSHM is disabled or not found, but hugetlbfs is present on a supported # system, then ensure use of hugetlfs for segment allocation. # To do so, we (ab)use GASNET_PSHM_LIBS which would otherwise be empty. # Currently the supported systems are the Cray XC and HPE Cray EX # However, we are not doing anything here for the former $as_echo "#define GASNETI_USE_HUGETLBFS 1" >>confdefs.h GASNET_PSHM_CFLAGS="$HUGETLBFS_CFLAGS" GASNET_PSHM_LDFLAGS="$HUGETLBFS_LDFLAGS" GASNET_PSHM_LIBS="$HUGETLBFS_LIBS" fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([GASNET_PSHM_LDFLAGS],[GASNET_PSHM_LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:2) eval gasnet_fn_split_linker_opts GASNET_PSHM_LDFLAGS GASNET_PSHM_LIBS $GASNET_PSHM_LDFLAGS $GASNET_PSHM_LIBS #echo "GASNET_PSHM_LDFLAGS=[$]GASNET_PSHM_LDFLAGS" #echo "GASNET_PSHM_LIBS=[$]GASNET_PSHM_LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([GASNET_PSHM_LDFLAGS],[GASNET_PSHM_LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # Note that --enable-pshm disables aligned segments ONLY for conduits that USE it GASNETI_DISABLE_ALIGNED_SEGMENTS=0 # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(aligned-segments,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-aligned-segments was given. if test "${enable_aligned_segments+set}" = set; then : enableval=$enable_aligned_segments; fi case "$enable_aligned_segments" in '' | no) : GASNETI_DISABLE_ALIGNED_SEGMENTS=1 $as_echo "#define GASNETI_DISABLE_ALIGNED_SEGMENTS 1" >>confdefs.h ;; *) : RVMFILE="/proc/sys/kernel/randomize_va_space" if test "$segconfig" = everything ; then : # Alignment not applicable to segment-everything elif test -f $RVMFILE && test "`cat $RVMFILE`" != "0" ; then WMSG="$RVMFILE on this node indicates the Linux VM space randomization \ security feature is enabled. If this feature is also enabled on the compute \ nodes, you need to re-run configure without --enable-aligned-segments" # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $WMSG" >&5 $as_echo "$as_me: WARNING: $WMSG" >&2;} echo "$WMSG" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$with_pshm" != no; then as_fn_error $? "--enable-aligned-segments is incompatible with PSHM support. To force aligned segments, add --disable-pshm" "$LINENO" 5 fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(aligned-segments,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ac_fn_c_check_header_mongrel "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default" if test "x$ac_cv_header_sys_statvfs_h" = xyes; then : for ac_func in fstatvfs do : ac_fn_c_check_func "$LINENO" "fstatvfs" "ac_cv_func_fstatvfs" if test "x$ac_cv_func_fstatvfs" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FSTATVFS 1 _ACEOF fi done fi if test "$with_pshm" != no; then USE_PSHM_TRUE= USE_PSHM_FALSE='#' else USE_PSHM_TRUE='#' USE_PSHM_FALSE= fi ######################################################################## ## CPU feature checks ## Look for potentially buggy MIPS R10k systems # There is a processor erratum to work-around in our atomics :-( # The only SGI products w/ the bad cpus are the "IP27" platforms (Origin 200, Origin 2000, and Onyx 2) # XXX: We could refine this to check the reported cpu revision # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(arch-sgi-ip27,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-arch-sgi-ip27 was given. if test "${enable_arch_sgi_ip27+set}" = set; then : enableval=$enable_arch_sgi_ip27; fi case "$enable_arch_sgi_ip27" in no) : enabled_sgi_ip27=no ;; yes) : enabled_sgi_ip27=yes ;; *) : enabled_sgi_ip27=no ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(arch-sgi-ip27,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_sgi_ip27" = yes; then $as_echo "#define GASNETI_ARCH_SGI_IP27 1" >>confdefs.h fi # Check how to reference MIPS assembler temporary register ("$1" or "$at") if expr "$target_cpu" : "mips" >/dev/null; then for ac_header in sgidefs.h do : ac_fn_c_check_header_mongrel "$LINENO" "sgidefs.h" "ac_cv_header_sgidefs_h" "$ac_includes_default" if test "x$ac_cv_header_sgidefs_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SGIDEFS_H 1 _ACEOF fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for MIPS register '\$1',mips_reg_1,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MIPS register '\$1'" >&5 $as_echo_n "checking for MIPS register '\$1'... " >&6; } if ${gasnet_cv_mips_reg_1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define GASNETI_ASM(mnemonic) __asm__ __volatile__ (mnemonic : : : "memory") int main () { GASNETI_ASM(".set noat\n\t" "move \$1,\$0\n\t" ".set at"); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mips_reg_1=yes else gasnet_cv_mips_reg_1=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mips_reg_1" >&5 $as_echo "$gasnet_cv_mips_reg_1" >&6; } if test "$gasnet_cv_mips_reg_1" = yes; then : $as_echo "#define GASNETI_HAVE_MIPS_REG_1 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for MIPS register '\$1',mips_reg_1,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for MIPS register '\$at',mips_reg_at,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MIPS register '\$at'" >&5 $as_echo_n "checking for MIPS register '\$at'... " >&6; } if ${gasnet_cv_mips_reg_at+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define GASNETI_ASM(mnemonic) __asm__ __volatile__ (mnemonic : : : "memory") int main () { GASNETI_ASM(".set noat\n\t" "move \$at,\$0\n\t" ".set at"); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mips_reg_at=yes else gasnet_cv_mips_reg_at=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mips_reg_at" >&5 $as_echo "$gasnet_cv_mips_reg_at" >&6; } if test "$gasnet_cv_mips_reg_at" = yes; then : $as_echo "#define GASNETI_HAVE_MIPS_REG_AT 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for MIPS register '\$at',mips_reg_at,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi ## ARM-specific checks for "kernel helpers" if expr "$target_cpu" : "arm" >/dev/null; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ## Does ARM kernel have cmpxchg support? if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(GASNETI_HAVE_ARM_CMPXCHG,HAVE_ARM_CMPXCHG,) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_HAVE_ARM_CMPXCHG],[]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_HAVE_ARM_CMPXCHG setting" >&5 $as_echo_n "checking for CROSS_HAVE_ARM_CMPXCHG setting... " >&6; } envval_src_CROSS_HAVE_ARM_CMPXCHG="cached" if ${gasnet_cv_envvar_CROSS_HAVE_ARM_CMPXCHG+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_HAVE_ARM_CMPXCHG="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_HAVE_ARM_CMPXCHG="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosshavearmcmpxchg+set}" = "set" ; then gasnet_cv_envvar_CROSS_HAVE_ARM_CMPXCHG="${_gasneti_nenv_crosshavearmcmpxchg}" envval_src_CROSS_HAVE_ARM_CMPXCHG=given elif test "${_gasneti_cenv_crosshavearmcmpxchg+set}" = "set" ; then gasnet_cv_envvar_CROSS_HAVE_ARM_CMPXCHG="${_gasneti_cenv_crosshavearmcmpxchg}" envval_src_CROSS_HAVE_ARM_CMPXCHG=conf else gasnet_cv_envvar_CROSS_HAVE_ARM_CMPXCHG=$envval_default_CROSS_HAVE_ARM_CMPXCHG envval_src_CROSS_HAVE_ARM_CMPXCHG=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_HAVE_ARM_CMPXCHG crosshavearmcmpxchg $gasnet_cv_configure_args_norm fi CROSS_HAVE_ARM_CMPXCHG="$gasnet_cv_envvar_CROSS_HAVE_ARM_CMPXCHG" if test "$CROSS_HAVE_ARM_CMPXCHG" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_HAVE_ARM_CMPXCHG if test "$envval_src_CROSS_HAVE_ARM_CMPXCHG" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_HAVE_ARM_CMPXCHG" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_HAVE_ARM_CMPXCHG\"" >&5 $as_echo " \"$CROSS_HAVE_ARM_CMPXCHG\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_HAVE_ARM_CMPXCHG\"" >&5 $as_echo " (default) \"$CROSS_HAVE_ARM_CMPXCHG\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_HAVE_ARM_CMPXCHG\"" >&5 $as_echo " (disabled) \"$CROSS_HAVE_ARM_CMPXCHG\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_HAVE_ARM_CMPXCHG\"" >&5 $as_echo " (provided) \"$CROSS_HAVE_ARM_CMPXCHG\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_HAVE_ARM_CMPXCHG\"" >&5 $as_echo " (provided) \"$CROSS_HAVE_ARM_CMPXCHG\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_HAVE_ARM_CMPXCHG. Please configure --with-CROSS_HAVE_ARM_CMPXCHG=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_HAVE_ARM_CMPXCHG],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$CROSS_HAVE_ARM_CMPXCHG" = "" ; then as_fn_error $? "This configure script requires \$CROSS_HAVE_ARM_CMPXCHG be set for cross-compilation" "$LINENO" 5 else GASNETI_HAVE_ARM_CMPXCHG="$CROSS_HAVE_ARM_CMPXCHG" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(GASNETI_HAVE_ARM_CMPXCHG,HAVE_ARM_CMPXCHG,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for ARM cmpxchg kernel support,have_arm_cmpxchg,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM cmpxchg kernel support" >&5 $as_echo_n "checking for ARM cmpxchg kernel support... " >&6; } if ${gasnet_cv_have_arm_cmpxchg+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define GASNETI_IN_CONFIGURE 1 #define CHECK_ARM_CMPXCHG 1 #include "gasnet_arch_arm.h" int main(void) { return gasneti_arm_cmpxchg_check(); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_have_arm_cmpxchg=yes else gasnet_cv_have_arm_cmpxchg=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_arm_cmpxchg" >&5 $as_echo "$gasnet_cv_have_arm_cmpxchg" >&6; } if test "$gasnet_cv_have_arm_cmpxchg" = yes; then : GASNETI_HAVE_ARM_CMPXCHG=1 else : GASNETI_HAVE_ARM_CMPXCHG=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for ARM cmpxchg kernel support,have_arm_cmpxchg,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test $GASNETI_HAVE_ARM_CMPXCHG = 1; then $as_echo "#define GASNETI_HAVE_ARM_CMPXCHG 1" >>confdefs.h fi ## Does ARM kernel have membar support? if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(GASNETI_HAVE_ARM_MEMBAR,HAVE_ARM_MEMBAR,) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_HAVE_ARM_MEMBAR],[]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_HAVE_ARM_MEMBAR setting" >&5 $as_echo_n "checking for CROSS_HAVE_ARM_MEMBAR setting... " >&6; } envval_src_CROSS_HAVE_ARM_MEMBAR="cached" if ${gasnet_cv_envvar_CROSS_HAVE_ARM_MEMBAR+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_HAVE_ARM_MEMBAR="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_HAVE_ARM_MEMBAR="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosshavearmmembar+set}" = "set" ; then gasnet_cv_envvar_CROSS_HAVE_ARM_MEMBAR="${_gasneti_nenv_crosshavearmmembar}" envval_src_CROSS_HAVE_ARM_MEMBAR=given elif test "${_gasneti_cenv_crosshavearmmembar+set}" = "set" ; then gasnet_cv_envvar_CROSS_HAVE_ARM_MEMBAR="${_gasneti_cenv_crosshavearmmembar}" envval_src_CROSS_HAVE_ARM_MEMBAR=conf else gasnet_cv_envvar_CROSS_HAVE_ARM_MEMBAR=$envval_default_CROSS_HAVE_ARM_MEMBAR envval_src_CROSS_HAVE_ARM_MEMBAR=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_HAVE_ARM_MEMBAR crosshavearmmembar $gasnet_cv_configure_args_norm fi CROSS_HAVE_ARM_MEMBAR="$gasnet_cv_envvar_CROSS_HAVE_ARM_MEMBAR" if test "$CROSS_HAVE_ARM_MEMBAR" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_HAVE_ARM_MEMBAR if test "$envval_src_CROSS_HAVE_ARM_MEMBAR" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_HAVE_ARM_MEMBAR" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_HAVE_ARM_MEMBAR\"" >&5 $as_echo " \"$CROSS_HAVE_ARM_MEMBAR\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_HAVE_ARM_MEMBAR\"" >&5 $as_echo " (default) \"$CROSS_HAVE_ARM_MEMBAR\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_HAVE_ARM_MEMBAR\"" >&5 $as_echo " (disabled) \"$CROSS_HAVE_ARM_MEMBAR\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_HAVE_ARM_MEMBAR\"" >&5 $as_echo " (provided) \"$CROSS_HAVE_ARM_MEMBAR\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_HAVE_ARM_MEMBAR\"" >&5 $as_echo " (provided) \"$CROSS_HAVE_ARM_MEMBAR\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_HAVE_ARM_MEMBAR. Please configure --with-CROSS_HAVE_ARM_MEMBAR=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_HAVE_ARM_MEMBAR],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$CROSS_HAVE_ARM_MEMBAR" = "" ; then as_fn_error $? "This configure script requires \$CROSS_HAVE_ARM_MEMBAR be set for cross-compilation" "$LINENO" 5 else GASNETI_HAVE_ARM_MEMBAR="$CROSS_HAVE_ARM_MEMBAR" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(GASNETI_HAVE_ARM_MEMBAR,HAVE_ARM_MEMBAR,) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for ARM membar kernel support,have_arm_membar,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM membar kernel support" >&5 $as_echo_n "checking for ARM membar kernel support... " >&6; } if ${gasnet_cv_have_arm_membar+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define GASNETI_IN_CONFIGURE 1 #define CHECK_ARM_MEMBAR 1 #include "gasnet_arch_arm.h" int main(void) { return gasneti_arm_membar_check(); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_have_arm_membar=yes else gasnet_cv_have_arm_membar=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_arm_membar" >&5 $as_echo "$gasnet_cv_have_arm_membar" >&6; } if test "$gasnet_cv_have_arm_membar" = yes; then : GASNETI_HAVE_ARM_MEMBAR=1 else : GASNETI_HAVE_ARM_MEMBAR=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for ARM membar kernel support,have_arm_membar,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test $GASNETI_HAVE_ARM_MEMBAR = 1; then $as_echo "#define GASNETI_HAVE_ARM_MEMBAR 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi ## Check support for AARCH64 real time counter if test "$target_cpu" = "aarch64" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for aarch64 virtual timer count register,aarch64_cntvct_el0,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for aarch64 virtual timer count register" >&5 $as_echo_n "checking for aarch64 virtual timer count register... " >&6; } if ${gasnet_cv_aarch64_cntvct_el0+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { uint64_t tick, freq; __asm__ __volatile__ ("isb\n\t" "mrs %0,CNTVCT_EL0" : "=r" (tick) : /* no inputs */ : "memory"); __asm__ __volatile__ ("mrs %0,CNTFRQ_EL0" : "=r" (freq)); return !tick || !freq; /* Fail if either register is zero */ ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_aarch64_cntvct_el0=yes else gasnet_cv_aarch64_cntvct_el0=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_aarch64_cntvct_el0" >&5 $as_echo "$gasnet_cv_aarch64_cntvct_el0" >&6; } if test "$gasnet_cv_aarch64_cntvct_el0" = yes; then : $as_echo "#define GASNETI_HAVE_AARCH64_CNTVCT_EL0 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for aarch64 virtual timer count register,aarch64_cntvct_el0,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi ## Do CC/gas and CPU support "cmpxchg16b"? if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(GASNETI_HAVE_X86_CMPXCHG16B,HAVE_X86_CMPXCHG16B,probe) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_HAVE_X86_CMPXCHG16B],[probe]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_HAVE_X86_CMPXCHG16B setting" >&5 $as_echo_n "checking for CROSS_HAVE_X86_CMPXCHG16B setting... " >&6; } envval_src_CROSS_HAVE_X86_CMPXCHG16B="cached" if ${gasnet_cv_envvar_CROSS_HAVE_X86_CMPXCHG16B+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_HAVE_X86_CMPXCHG16B="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_HAVE_X86_CMPXCHG16B="probe" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosshavex86cmpxchg16b+set}" = "set" ; then gasnet_cv_envvar_CROSS_HAVE_X86_CMPXCHG16B="${_gasneti_nenv_crosshavex86cmpxchg16b}" envval_src_CROSS_HAVE_X86_CMPXCHG16B=given elif test "${_gasneti_cenv_crosshavex86cmpxchg16b+set}" = "set" ; then gasnet_cv_envvar_CROSS_HAVE_X86_CMPXCHG16B="${_gasneti_cenv_crosshavex86cmpxchg16b}" envval_src_CROSS_HAVE_X86_CMPXCHG16B=conf else gasnet_cv_envvar_CROSS_HAVE_X86_CMPXCHG16B=$envval_default_CROSS_HAVE_X86_CMPXCHG16B envval_src_CROSS_HAVE_X86_CMPXCHG16B=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_HAVE_X86_CMPXCHG16B crosshavex86cmpxchg16b $gasnet_cv_configure_args_norm fi CROSS_HAVE_X86_CMPXCHG16B="$gasnet_cv_envvar_CROSS_HAVE_X86_CMPXCHG16B" if test "$CROSS_HAVE_X86_CMPXCHG16B" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_HAVE_X86_CMPXCHG16B if test "$envval_src_CROSS_HAVE_X86_CMPXCHG16B" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_HAVE_X86_CMPXCHG16B" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_HAVE_X86_CMPXCHG16B\"" >&5 $as_echo " \"$CROSS_HAVE_X86_CMPXCHG16B\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_HAVE_X86_CMPXCHG16B\"" >&5 $as_echo " (default) \"$CROSS_HAVE_X86_CMPXCHG16B\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_HAVE_X86_CMPXCHG16B\"" >&5 $as_echo " (disabled) \"$CROSS_HAVE_X86_CMPXCHG16B\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_HAVE_X86_CMPXCHG16B\"" >&5 $as_echo " (provided) \"$CROSS_HAVE_X86_CMPXCHG16B\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_HAVE_X86_CMPXCHG16B\"" >&5 $as_echo " (provided) \"$CROSS_HAVE_X86_CMPXCHG16B\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_HAVE_X86_CMPXCHG16B. Please configure --with-CROSS_HAVE_X86_CMPXCHG16B=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_HAVE_X86_CMPXCHG16B],[probe]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$CROSS_HAVE_X86_CMPXCHG16B" = "" ; then as_fn_error $? "This configure script requires \$CROSS_HAVE_X86_CMPXCHG16B be set for cross-compilation" "$LINENO" 5 else GASNETI_HAVE_X86_CMPXCHG16B="$CROSS_HAVE_X86_CMPXCHG16B" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(GASNETI_HAVE_X86_CMPXCHG16B,HAVE_X86_CMPXCHG16B,probe) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$GASNETI_HAVE_X86_CMPXCHG16B" = '1'; then $as_echo "#define GASNETI_HAVE_X86_CMPXCHG16B 1" >>confdefs.h fi fi if test "$cross_compiling" = 'no' -o "$GASNETI_HAVE_X86_CMPXCHG16B" = 'probe' ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_WITHCC(for x86-64 cmpxchg16b support,x86_64_cmpxchg16b,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for x86-64 cmpxchg16b support,x86_64_cmpxchg16b,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-64 cmpxchg16b support" >&5 $as_echo_n "checking for x86-64 cmpxchg16b support... " >&6; } if ${gasnet_cv_x86_64_cmpxchg16b+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "gasnet_portable_platform.h" int main () { #if PLATFORM_ARCH_X86_64 #if PLATFORM_COMPILER_GNU || PLATFORM_COMPILER_INTEL || \ PLATFORM_COMPILER_PATHSCALE || PLATFORM_COMPILER_PGI || \ PLATFORM_COMPILER_OPEN64 || PLATFORM_COMPILER_CLANG || \ PLATFORM_COMPILER_NVHPC unsigned long *array[3]; volatile unsigned long *p = (void *)(((unsigned long)array + 15) & ~(unsigned long)15); /* Note oldhi selected to detect bug 2408 (anything in upper 32bits) */ register unsigned long oldlo = 0; register unsigned long oldhi = 0x1234llu << 32; register unsigned long newlo = 1234; register unsigned long newhi = 5678; register unsigned char result; p[0] = oldlo; p[1] = oldhi; __asm__ __volatile__ ( "lock; " "cmpxchg16b %1 \n\t" "sete %0 " : "=q" (result), "=m" (*p), "+&a" (oldlo), "+&d" (oldhi) : "b" (newlo), "c" (newhi) : "cc", "memory"); /* Want SUCCESS and changed values */ return (!result || (p[0] != 1234) || (p[1] != 5678)); #else /* Don't know, but also don't currently care */ return 1; #endif #else #error wrong CPU architecture #endif ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_x86_64_cmpxchg16b=yes else gasnet_cv_x86_64_cmpxchg16b=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_x86_64_cmpxchg16b" >&5 $as_echo "$gasnet_cv_x86_64_cmpxchg16b" >&6; } if test "$gasnet_cv_x86_64_cmpxchg16b" = yes; then : $as_echo "#define GASNETI_HAVE_X86_CMPXCHG16B 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for x86-64 cmpxchg16b support,x86_64_cmpxchg16b,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for x86-64 cmpxchg16b support,x86_64_cmpxchg16b,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-64 cmpxchg16b support" >&5 $as_echo_n "checking for x86-64 cmpxchg16b support... " >&6; } if ${gasnet_cv_x86_64_cmpxchg16b+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "gasnet_portable_platform.h" int main(void) { #if PLATFORM_ARCH_X86_64 #if PLATFORM_COMPILER_GNU || PLATFORM_COMPILER_INTEL || \ PLATFORM_COMPILER_PATHSCALE || PLATFORM_COMPILER_PGI || \ PLATFORM_COMPILER_OPEN64 || PLATFORM_COMPILER_CLANG || \ PLATFORM_COMPILER_NVHPC unsigned long *array[3]; volatile unsigned long *p = (void *)(((unsigned long)array + 15) & ~(unsigned long)15); /* Note oldhi selected to detect bug 2408 (anything in upper 32bits) */ register unsigned long oldlo = 0; register unsigned long oldhi = 0x1234llu << 32; register unsigned long newlo = 1234; register unsigned long newhi = 5678; register unsigned char result; p[0] = oldlo; p[1] = oldhi; __asm__ __volatile__ ( "lock; " "cmpxchg16b %1 \n\t" "sete %0 " : "=q" (result), "=m" (*p), "+&a" (oldlo), "+&d" (oldhi) : "b" (newlo), "c" (newhi) : "cc", "memory"); /* Want SUCCESS and changed values */ return (!result || (p[0] != 1234) || (p[1] != 5678)); #else /* Don't know, but also don't currently care */ return 1; #endif #else #error wrong CPU architecture #endif return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_x86_64_cmpxchg16b=yes else gasnet_cv_x86_64_cmpxchg16b=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_x86_64_cmpxchg16b" >&5 $as_echo "$gasnet_cv_x86_64_cmpxchg16b" >&6; } if test "$gasnet_cv_x86_64_cmpxchg16b" = yes; then : $as_echo "#define GASNETI_HAVE_X86_CMPXCHG16B 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for x86-64 cmpxchg16b support,x86_64_cmpxchg16b,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_WITHCC(for x86-64 cmpxchg16b support,x86_64_cmpxchg16b,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi ## x86 -fPIC which steals the B register ## XXX: Test currently only correctly identifies PIC mode with using a ## compiler which accepts GNU-style asm - but that is the only ## case where we *currently* care. Test may need some additional ## cases for other compilers in the future. # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for x86 EBX register,x86_ebx,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 EBX register" >&5 $as_echo_n "checking for x86 EBX register... " >&6; } if ${gasnet_cv_x86_ebx+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "gasnet_portable_platform.h" /* For PLATFORM_COMPILER_* */ int main () { #if PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_X86 #if PLATFORM_COMPILER_GNU || PLATFORM_COMPILER_INTEL || \ PLATFORM_COMPILER_PATHSCALE || PLATFORM_COMPILER_PGI || \ PLATFORM_COMPILER_OPEN64 || \ PLATFORM_COMPILER_NVHPC || \ PLATFORM_COMPILER_CLANG __asm__ __volatile__ ("push %0" : : "b" (0)); #else /* Don't know, but fortunately don't currently care */ #endif #else #error wrong CPU architecture #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_x86_ebx=yes else gasnet_cv_x86_ebx=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_x86_ebx" >&5 $as_echo "$gasnet_cv_x86_ebx" >&6; } if test "$gasnet_cv_x86_ebx" = yes; then : $as_echo "#define GASNETI_HAVE_X86_EBX 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for x86 EBX register,x86_ebx,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ## Does 32-bit SPARC compiler understand "U" and "h" register classes? if expr "$GASNETI_PTR_BITS$target_cpu" : "32sparc" >/dev/null; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for 64-bit SPARC asm support,have_sparc32_64bit_asm,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit SPARC asm support" >&5 $as_echo_n "checking for 64-bit SPARC asm support... " >&6; } if ${gasnet_cv_have_sparc32_64bit_asm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { unsigned long long u, v; volatile unsigned long long *p = &u; register int retval; register int tmp = 0; __asm__ __volatile__ ( "std %1, %0" : "=m"(*p) : "U"(v) ); __asm__ __volatile__ ( "clr %0 \n\tmovrz %1,1,%0" : "=&h"(retval), "+h"(tmp) ); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_have_sparc32_64bit_asm=yes else gasnet_cv_have_sparc32_64bit_asm=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_sparc32_64bit_asm" >&5 $as_echo "$gasnet_cv_have_sparc32_64bit_asm" >&6; } if test "$gasnet_cv_have_sparc32_64bit_asm" = yes; then : $as_echo "#define GASNETI_HAVE_SPARC32_64BIT_ASM 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for 64-bit SPARC asm support,have_sparc32_64bit_asm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi ## Spinloop hints # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # need to run here because some OS's (Solaris/x86) forbid the pause instruction # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_WITHCC(for x86 pause instruction,x86_pause_instruction,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for x86 pause instruction,x86_pause_instruction,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 pause instruction" >&5 $as_echo_n "checking for x86 pause instruction... " >&6; } if ${gasnet_cv_x86_pause_instruction+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "gasnet_portable_platform.h" #if PLATFORM_COMPILER_SUN #define GASNETI_ASM(mnemonic) __asm(mnemonic) #else /* All remaining x86/x86-64 compilers support GNU-style ASM or none at all */ #define GASNETI_ASM(mnemonic) __asm__ __volatile__ (mnemonic : : : "memory") #endif int main () { #if PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_X86 GASNETI_ASM("pause"); #else #error wrong CPU architecture #endif ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_x86_pause_instruction=yes else gasnet_cv_x86_pause_instruction=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_x86_pause_instruction" >&5 $as_echo "$gasnet_cv_x86_pause_instruction" >&6; } if test "$gasnet_cv_x86_pause_instruction" = yes; then : $as_echo "#define GASNETI_PAUSE_INSTRUCTION \"pause\"" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for x86 pause instruction,x86_pause_instruction,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for x86 pause instruction,x86_pause_instruction,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86 pause instruction" >&5 $as_echo_n "checking for x86 pause instruction... " >&6; } if ${gasnet_cv_x86_pause_instruction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "gasnet_portable_platform.h" #if PLATFORM_COMPILER_SUN #define GASNETI_ASM(mnemonic) __asm(mnemonic) #else /* All remaining x86/x86-64 compilers support GNU-style ASM or none at all */ #define GASNETI_ASM(mnemonic) __asm__ __volatile__ (mnemonic : : : "memory") #endif int main(void) { #if PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_X86 GASNETI_ASM("pause"); #else #error wrong CPU architecture #endif return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_x86_pause_instruction=yes else gasnet_cv_x86_pause_instruction=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_x86_pause_instruction" >&5 $as_echo "$gasnet_cv_x86_pause_instruction" >&6; } if test "$gasnet_cv_x86_pause_instruction" = yes; then : $as_echo "#define GASNETI_PAUSE_INSTRUCTION \"pause\"" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for x86 pause instruction,x86_pause_instruction,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_WITHCC(for x86 pause instruction,x86_pause_instruction,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ## Misc. builtins (e.g. for bit manipulation) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -I$TOP_SRCDIR/other" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_bswap32,cc_has_builtin_bswap32,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5 $as_echo_n "checking for __builtin_bswap32... " >&6; } if ${gasnet_cv_cc_has_builtin_bswap32+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "portable_inttypes.h" uint32_t x; int main () { __builtin_bswap32(x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_has_builtin_bswap32=yes else gasnet_cv_cc_has_builtin_bswap32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_builtin_bswap32" >&5 $as_echo "$gasnet_cv_cc_has_builtin_bswap32" >&6; } if test "$gasnet_cv_cc_has_builtin_bswap32" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_BSWAP32 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_bswap32,cc_has_builtin_bswap32,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_bswap64,cc_has_builtin_bswap64,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5 $as_echo_n "checking for __builtin_bswap64... " >&6; } if ${gasnet_cv_cc_has_builtin_bswap64+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "portable_inttypes.h" uint64_t x; int main () { __builtin_bswap64(x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_has_builtin_bswap64=yes else gasnet_cv_cc_has_builtin_bswap64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_builtin_bswap64" >&5 $as_echo "$gasnet_cv_cc_has_builtin_bswap64" >&6; } if test "$gasnet_cv_cc_has_builtin_bswap64" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_BSWAP64 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_bswap64,cc_has_builtin_bswap64,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_clz,cc_has_builtin_clz,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5 $as_echo_n "checking for __builtin_clz... " >&6; } if ${gasnet_cv_cc_has_builtin_clz+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned int x; int main () { __builtin_clz(x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_has_builtin_clz=yes else gasnet_cv_cc_has_builtin_clz=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_builtin_clz" >&5 $as_echo "$gasnet_cv_cc_has_builtin_clz" >&6; } if test "$gasnet_cv_cc_has_builtin_clz" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_CLZ 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_clz,cc_has_builtin_clz,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_clzl,cc_has_builtin_clzl,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clzl" >&5 $as_echo_n "checking for __builtin_clzl... " >&6; } if ${gasnet_cv_cc_has_builtin_clzl+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned long int x; int main () { __builtin_clzl(x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_has_builtin_clzl=yes else gasnet_cv_cc_has_builtin_clzl=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_builtin_clzl" >&5 $as_echo "$gasnet_cv_cc_has_builtin_clzl" >&6; } if test "$gasnet_cv_cc_has_builtin_clzl" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_CLZL 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_clzl,cc_has_builtin_clzl,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_clzll,cc_has_builtin_clzll,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clzll" >&5 $as_echo_n "checking for __builtin_clzll... " >&6; } if ${gasnet_cv_cc_has_builtin_clzll+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned long long int x; int main () { __builtin_clzll(x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_has_builtin_clzll=yes else gasnet_cv_cc_has_builtin_clzll=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_builtin_clzll" >&5 $as_echo "$gasnet_cv_cc_has_builtin_clzll" >&6; } if test "$gasnet_cv_cc_has_builtin_clzll" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_CLZLL 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_clzll,cc_has_builtin_clzll,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_ctz,cc_has_builtin_ctz,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5 $as_echo_n "checking for __builtin_ctz... " >&6; } if ${gasnet_cv_cc_has_builtin_ctz+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned int x; int main () { __builtin_ctz(x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_has_builtin_ctz=yes else gasnet_cv_cc_has_builtin_ctz=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_builtin_ctz" >&5 $as_echo "$gasnet_cv_cc_has_builtin_ctz" >&6; } if test "$gasnet_cv_cc_has_builtin_ctz" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_CTZ 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_ctz,cc_has_builtin_ctz,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_ctzl,cc_has_builtin_ctzl,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctzl" >&5 $as_echo_n "checking for __builtin_ctzl... " >&6; } if ${gasnet_cv_cc_has_builtin_ctzl+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned long x; int main () { __builtin_ctzl(x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_has_builtin_ctzl=yes else gasnet_cv_cc_has_builtin_ctzl=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_builtin_ctzl" >&5 $as_echo "$gasnet_cv_cc_has_builtin_ctzl" >&6; } if test "$gasnet_cv_cc_has_builtin_ctzl" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_CTZL 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_ctzl,cc_has_builtin_ctzl,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __builtin_ctzll,cc_has_builtin_ctzll,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctzll" >&5 $as_echo_n "checking for __builtin_ctzll... " >&6; } if ${gasnet_cv_cc_has_builtin_ctzll+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned long long int x; int main () { __builtin_ctzll(x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_has_builtin_ctzll=yes else gasnet_cv_cc_has_builtin_ctzll=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_builtin_ctzll" >&5 $as_echo "$gasnet_cv_cc_has_builtin_ctzll" >&6; } if test "$gasnet_cv_cc_has_builtin_ctzll" = yes; then : $as_echo "#define GASNETI_HAVE_CC_BUILTIN_CTZLL 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __builtin_ctzll,cc_has_builtin_ctzll,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) #--------------------------------------------------------------------------------------------------------------- # Linux's PR_SET_PDEATHSIG of interest to both smp-conduit and ssh-spawer # Linux's PR_SET_PTRACER of interest for backtracing if expr "$target_os" : "linux" >/dev/null; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_DISABLED(pdeathsig,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-pdeathsig was given. if test "${enable_pdeathsig+set}" = set; then : enableval=$enable_pdeathsig; fi case "$enable_pdeathsig" in '' | yes) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for PR_SET_PDEATHSIG,pr_set_pdeathsig,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_SET_PDEATHSIG" >&5 $as_echo_n "checking for PR_SET_PDEATHSIG... " >&6; } if ${gasnet_cv_pr_set_pdeathsig+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* to look for unsafe 2.4.x kernels */ #include int main () { struct utsname u; int rc1 = uname(&u); int rc2 = prctl(PR_SET_PDEATHSIG, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_pr_set_pdeathsig=yes else gasnet_cv_pr_set_pdeathsig=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_pr_set_pdeathsig" >&5 $as_echo "$gasnet_cv_pr_set_pdeathsig" >&6; } if test "$gasnet_cv_pr_set_pdeathsig" = yes; then : $as_echo "#define HAVE_PR_SET_PDEATHSIG 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for PR_SET_PDEATHSIG,pr_set_pdeathsig,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; *) : : ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_DISABLED(pdeathsig,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for PR_SET_PTRACER,pr_set_ptracer,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_SET_PTRACER" >&5 $as_echo_n "checking for PR_SET_PTRACER... " >&6; } if ${gasnet_cv_pr_set_ptracer+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef PR_SET_PTRACER #define PR_SET_PTRACER 0x59616d61 /* 'Yama' */ #endif #ifndef PR_SET_PTRACER_ANY #define PR_SET_PTRACER_ANY ((unsigned long)(-1)) #endif int main () { int rc = prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_pr_set_ptracer=yes else gasnet_cv_pr_set_ptracer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_pr_set_ptracer" >&5 $as_echo "$gasnet_cv_pr_set_ptracer" >&6; } if test "$gasnet_cv_pr_set_ptracer" = yes; then : $as_echo "#define HAVE_PR_SET_PTRACER 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for PR_SET_PTRACER,pr_set_ptracer,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi #--------------------------------------------------------------------------------------------------------------- # Global disable of fork() (and related calls) on "special" systems. # Conduits may also set GASNETI_NO_FORK individually have_fork=yes # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(fork,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-fork was given. if test "${enable_fork+set}" = set; then : enableval=$enable_fork; fi case "$enable_fork" in no) : have_fork=no fork_reason="was disabled" ;; yes) : : ;; *) : for ac_func in fork popen system do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF : else have_fork=no fork_reason="appears to be missing or broken" break fi done ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(fork,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test $have_fork = no; then $as_echo "#define GASNETI_NO_FORK 1" >>confdefs.h fi #--------------------------------------------------------------------------------------------------------------- # Check for overrides of compile-time checks for SMPs # Enable build of SMP-safe libraries (default is off) case "$enable_smp_safe" in '' | yes) : ;; *) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configure --disable-smp-safe is deprecated and may be unsafe. You should only use this option if you really know what you are doing." >&5 $as_echo "$as_me: WARNING: configure --disable-smp-safe is deprecated and may be unsafe. You should only use this option if you really know what you are doing." >&2;} echo "configure --disable-smp-safe is deprecated and may be unsafe. You should only use this option if you really know what you are doing." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) $as_echo "#define GASNETI_UNI_BUILD 1" >>confdefs.h ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(loopback-memsync,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-loopback-memsync was given. if test "${enable_loopback_memsync+set}" = set; then : enableval=$enable_loopback_memsync; fi case "$enable_loopback_memsync" in '' | no) : ;; *) : $as_echo "#define GASNETI_MEMSYNC_ON_LOOPBACK 1" >>confdefs.h ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(loopback-memsync,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(throttle-poll,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-throttle-poll was given. if test "${enable_throttle_poll+set}" = set; then : enableval=$enable_throttle_poll; fi case "$enable_throttle_poll" in '' | no) : ;; *) : $as_echo "#define GASNETI_THROTTLE_FEATURE_ENABLED 1" >>confdefs.h ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(throttle-poll,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(maxeps,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --with-maxeps was given. if test "${with_maxeps+set}" = set; then : withval=$with_maxeps; fi if test "${with_maxeps+set}" = set; then : withval=$with_maxeps; case "$withval" in no) : as_fn_error $? "--with-maxeps requires a positive integer argument" "$LINENO" 5 ;; *) : if expr "${withval}" : "[1-9][0-9]*" >/dev/null; then cat >>confdefs.h <<_ACEOF #define GASNETI_MAXEPS_CONFIGURE $withval _ACEOF else as_fn_error $? "--with-maxeps requires a positive integer argument" "$LINENO" 5 fi ;; esac else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(maxeps,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # FORCED non-default implementations - used mainly for debugging # # NOTE: If adding an "--enable-forced-*" option here, please: # 1) Set enabled_force=yes to trigger the warning below # 2) Add to the "don't trust performance" warning in tests/test.h # 3) If applicable, the corresponding portion of the GASNet config string should # distinguish forced behaviors from default ones. # 4) You probably want a "LINKCONFIG_IDIOTCHECK" as well (might be covered by #3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(force-generic-atomicops,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-force-generic-atomicops was given. if test "${enable_force_generic_atomicops+set}" = set; then : enableval=$enable_force_generic_atomicops; fi case "$enable_force_generic_atomicops" in '' | no) : ;; *) : enabled_force=yes; enabled_generic_atomicops=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(force-generic-atomicops,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(force-os-atomicops,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-force-os-atomicops was given. if test "${enable_force_os_atomicops+set}" = set; then : enableval=$enable_force_os_atomicops; fi case "$enable_force_os_atomicops" in '' | no) : ;; *) : enabled_force=yes; enabled_os_atomicops=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(force-os-atomicops,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(force-compiler-atomicops,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-force-compiler-atomicops was given. if test "${enable_force_compiler_atomicops+set}" = set; then : enableval=$enable_force_compiler_atomicops; fi case "$enable_force_compiler_atomicops" in '' | no) : ;; *) : enabled_force=yes; enabled_compiler_atomicops=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(force-compiler-atomicops,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test -z "$enabled_generic_atomicops$enabled_os_atomicops$enabled_compiler_atomicops"; then : # Nothing to do elif test "$enabled_generic_atomicops$enabled_os_atomicops$enabled_compiler_atomicops" != yes; then as_fn_error $? "You may request at most one of --enable-force-generic-atomicops, --enable-force-os-atomicops, --enable-force-compiler-atomicops" "$LINENO" 5 elif test -n "$enabled_generic_atomicops" ; then $as_echo "#define GASNETI_FORCE_GENERIC_ATOMICOPS 1" >>confdefs.h elif test -n "$enabled_os_atomicops"; then $as_echo "#define GASNETI_FORCE_OS_ATOMICOPS 1" >>confdefs.h elif test -n "$enabled_compiler_atomicops"; then $as_echo "#define GASNETI_FORCE_COMPILER_ATOMICOPS 1" >>confdefs.h fi # Check for clock_gettime # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for clock_gettime(),cc_has_clock_gettime,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime()" >&5 $as_echo_n "checking for clock_gettime()... " >&6; } if ${gasnet_cv_cc_has_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct timespec tm; int rc = clock_gettime(CLOCK_REALTIME,&tm); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_has_clock_gettime=yes else gasnet_cv_cc_has_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_clock_gettime" >&5 $as_echo "$gasnet_cv_cc_has_clock_gettime" >&6; } if test "$gasnet_cv_cc_has_clock_gettime" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h have_clock_gettime=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: entry point not found - disabled" >&5 $as_echo "entry point not found - disabled" >&6; } fi else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for clock_gettime(),cc_has_clock_gettime,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # Timer configuration use_timers=native if test x"$enabled_valgrind" = x"yes" ; then # valgrind emulation degrades timer calibration and reliability, default to posixrt use_timers=posixrt fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(force-native-timers,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-force-native-timers was given. if test "${enable_force_native_timers+set}" = set; then : enableval=$enable_force_native_timers; fi case "$enable_force_native_timers" in '' | no) : ;; *) : # don't enabled_force here because the warning makes no sense for this case use_timers=native if test -n "$force_timers" ; then as_fn_error $? "You may request at most one of: --enable-force-gettimeofday --enable-force-posix-realtime --enable-force-native-timers" "$LINENO" 5 fi force_timers=1 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(force-native-timers,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(force-gettimeofday,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-force-gettimeofday was given. if test "${enable_force_gettimeofday+set}" = set; then : enableval=$enable_force_gettimeofday; fi case "$enable_force_gettimeofday" in '' | no) : ;; *) : if test "$use_timers" != gettimeofday; then enabled_force=yes; use_timers=gettimeofday fi if test -n "$force_timers" ; then as_fn_error $? "You may request at most one of: --enable-force-gettimeofday --enable-force-posix-realtime --enable-force-native-timers" "$LINENO" 5 fi force_timers=1 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(force-gettimeofday,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(force-posix-realtime,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-force-posix-realtime was given. if test "${enable_force_posix_realtime+set}" = set; then : enableval=$enable_force_posix_realtime; fi case "$enable_force_posix_realtime" in '' | no) : ;; *) : if test "$use_timers" != posixrt; then enabled_force=yes; use_timers=posixrt fi if test -n "$force_timers" ; then as_fn_error $? "You may request at most one of: --enable-force-gettimeofday --enable-force-posix-realtime --enable-force-native-timers" "$LINENO" 5 fi force_timers=1 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(force-posix-realtime,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) case "$use_timers" in native) : ;; gettimeofday) $as_echo "#define GASNETI_FORCE_GETTIMEOFDAY 1" >>confdefs.h ;; posixrt) if test x$have_clock_gettime != xyes; then as_fn_error $? "No support found for posix-realtime timers. Try --enable-force-gettimeofday or --enable-force-native-timers" "$LINENO" 5 fi $as_echo "#define GASNETI_FORCE_POSIX_REALTIME 1" >>confdefs.h ;; *) as_fn_error $? "Internal error in timer configuration" "$LINENO" 5 ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(force-yield-membars,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-force-yield-membars was given. if test "${enable_force_yield_membars+set}" = set; then : enableval=$enable_force_yield_membars; fi case "$enable_force_yield_membars" in '' | no) : ;; *) : enabled_force=yes; enabled_yield_membars=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(force-yield-membars,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(force-slow-membars,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-force-slow-membars was given. if test "${enable_force_slow_membars+set}" = set; then : enableval=$enable_force_slow_membars; fi case "$enable_force_slow_membars" in '' | no) : ;; *) : enabled_force=yes; enabled_slow_membars=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(force-slow-membars,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_yield_membars$enabled_slow_membars" = yesyes; then as_fn_error $? "You cannot request both --enable-force-yield-membars and --enable-force-slow-membars" "$LINENO" 5 elif test -n "$enabled_yield_membars" ; then $as_echo "#define GASNETI_FORCE_YIELD_MEMBARS 1" >>confdefs.h elif test -n "$enabled_slow_membars" ; then $as_echo "#define GASNETI_FORCE_SLOW_MEMBARS 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(force-true-weakatomics,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-force-true-weakatomics was given. if test "${enable_force_true_weakatomics+set}" = set; then : enableval=$enable_force_true_weakatomics; fi case "$enable_force_true_weakatomics" in '' | no) : ;; *) : enabled_force=yes; $as_echo "#define GASNETI_FORCE_TRUE_WEAKATOMICS 1" >>confdefs.h ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(force-true-weakatomics,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(force-generic-semaphores,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-force-generic-semaphores was given. if test "${enable_force_generic_semaphores+set}" = set; then : enableval=$enable_force_generic_semaphores; fi case "$enable_force_generic_semaphores" in '' | no) : ;; *) : enabled_force=yes; $as_echo "#define GASNETI_FORCE_GENERIC_SEMAPHORES 1" >>confdefs.h ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(force-generic-semaphores,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_force" = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You have configured with one or more --enable-force-* options This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >&5 $as_echo "$as_me: WARNING: ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You have configured with one or more --enable-force-* options This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >&2;} echo " ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You have configured with one or more --enable-force-* options This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi #--------------------------------------------------------------------------------------------------------------- ## Determine our atomics "family" ## Must follow all potentially relevant probes of asm support and "force" option # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(atomic implementation family (binary probe),ATOMIC_IMPL,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking atomic implementation family (binary probe)" >&5 $as_echo_n "checking atomic implementation family (binary probe)... " >&6; } if ${gasnet_cv_ATOMIC_IMPL+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_ATOMIC_IMPL="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((GASNETI_ATOMIC_IMPL)>0?(GASNETI_ATOMIC_IMPL):-(GASNETI_ATOMIC_IMPL)) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((GASNETI_ATOMIC_IMPL)>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_ATOMIC_IMPL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting GASNETI_ATOMIC_IMPL" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_ATOMIC_IMPL" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((GASNETI_ATOMIC_IMPL)>0?(GASNETI_ATOMIC_IMPL):-(GASNETI_ATOMIC_IMPL)) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((GASNETI_ATOMIC_IMPL)>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_ATOMIC_IMPL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting GASNETI_ATOMIC_IMPL" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ATOMIC_IMPL" >&5 $as_echo "$gasnet_cv_ATOMIC_IMPL" >&6; } if test -n "$gasnet_cv_ATOMIC_IMPL" ; then GASNETI_ATOMIC_IMPL_CONFIGURE=$gasnet_cv_ATOMIC_IMPL fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(atomic implementation family (binary probe),ATOMIC_IMPL,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_ATOMIC_IMPL_CONFIGURE $GASNETI_ATOMIC_IMPL_CONFIGURE _ACEOF # Must keep the following consistent with gasnet_atomic_fwd.h case $GASNETI_ATOMIC_IMPL_CONFIGURE in 0) GASNETI_ATOMIC_IMPL_STR=generic;; 1) GASNETI_ATOMIC_IMPL_STR=native;; 2) GASNETI_ATOMIC_IMPL_STR=os;; 3) GASNETI_ATOMIC_IMPL_STR=compiler;; 4) GASNETI_ATOMIC_IMPL_STR=hybrid;; 5) GASNETI_ATOMIC_IMPL_STR=native;; # 5="special" is native but not inline *) echo echo "configure error: Invalid GASNETI_ATOMIC_IMPL detected" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(atomic32 implementation family (binary probe),ATOMIC32_IMPL,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking atomic32 implementation family (binary probe)" >&5 $as_echo_n "checking atomic32 implementation family (binary probe)... " >&6; } if ${gasnet_cv_ATOMIC32_IMPL+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_ATOMIC32_IMPL="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((GASNETI_ATOMIC32_IMPL)>0?(GASNETI_ATOMIC32_IMPL):-(GASNETI_ATOMIC32_IMPL)) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((GASNETI_ATOMIC32_IMPL)>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_ATOMIC32_IMPL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting GASNETI_ATOMIC32_IMPL" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_ATOMIC32_IMPL" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((GASNETI_ATOMIC32_IMPL)>0?(GASNETI_ATOMIC32_IMPL):-(GASNETI_ATOMIC32_IMPL)) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((GASNETI_ATOMIC32_IMPL)>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_ATOMIC32_IMPL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting GASNETI_ATOMIC32_IMPL" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ATOMIC32_IMPL" >&5 $as_echo "$gasnet_cv_ATOMIC32_IMPL" >&6; } if test -n "$gasnet_cv_ATOMIC32_IMPL" ; then GASNETI_ATOMIC32_IMPL_CONFIGURE=$gasnet_cv_ATOMIC32_IMPL fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(atomic32 implementation family (binary probe),ATOMIC32_IMPL,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_ATOMIC32_IMPL_CONFIGURE $GASNETI_ATOMIC32_IMPL_CONFIGURE _ACEOF # Must keep the following consistent with gasnet_atomic_fwd.h case $GASNETI_ATOMIC32_IMPL_CONFIGURE in 0) GASNETI_ATOMIC32_IMPL_STR=generic;; 1) GASNETI_ATOMIC32_IMPL_STR=native;; 2) GASNETI_ATOMIC32_IMPL_STR=os;; 3) GASNETI_ATOMIC32_IMPL_STR=compiler;; 4) GASNETI_ATOMIC32_IMPL_STR=hybrid;; 5) GASNETI_ATOMIC32_IMPL_STR=native;; # 5="special" is native but not inline *) echo echo "configure error: Invalid GASNETI_ATOMIC32_IMPL detected" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(atomic64 implementation family (binary probe),ATOMIC64_IMPL,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking atomic64 implementation family (binary probe)" >&5 $as_echo_n "checking atomic64 implementation family (binary probe)... " >&6; } if ${gasnet_cv_ATOMIC64_IMPL+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_ATOMIC64_IMPL="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((GASNETI_ATOMIC64_IMPL)>0?(GASNETI_ATOMIC64_IMPL):-(GASNETI_ATOMIC64_IMPL)) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((GASNETI_ATOMIC64_IMPL)>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_ATOMIC64_IMPL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting GASNETI_ATOMIC64_IMPL" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_ATOMIC64_IMPL" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( ((GASNETI_ATOMIC64_IMPL)>0?(GASNETI_ATOMIC64_IMPL):-(GASNETI_ATOMIC64_IMPL)) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((GASNETI_ATOMIC64_IMPL)>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_ATOMIC64_IMPL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting GASNETI_ATOMIC64_IMPL" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ATOMIC64_IMPL" >&5 $as_echo "$gasnet_cv_ATOMIC64_IMPL" >&6; } if test -n "$gasnet_cv_ATOMIC64_IMPL" ; then GASNETI_ATOMIC64_IMPL_CONFIGURE=$gasnet_cv_ATOMIC64_IMPL fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(atomic64 implementation family (binary probe),ATOMIC64_IMPL,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_ATOMIC64_IMPL_CONFIGURE $GASNETI_ATOMIC64_IMPL_CONFIGURE _ACEOF # Must keep the following consistent with gasnet_atomic_fwd.h case $GASNETI_ATOMIC64_IMPL_CONFIGURE in 0) GASNETI_ATOMIC64_IMPL_STR=generic;; 1) GASNETI_ATOMIC64_IMPL_STR=native;; 2) GASNETI_ATOMIC64_IMPL_STR=os;; 3) GASNETI_ATOMIC64_IMPL_STR=compiler;; 4) GASNETI_ATOMIC64_IMPL_STR=hybrid;; 5) GASNETI_ATOMIC64_IMPL_STR=native;; # 5="special" is native but not inline *) echo echo "configure error: Invalid GASNETI_ATOMIC64_IMPL detected" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$GASNETI_ATOMIC_IMPL_STR" = "$GASNETI_ATOMIC32_IMPL_STR" && test "$GASNETI_ATOMIC_IMPL_STR" = "$GASNETI_ATOMIC64_IMPL_STR"; then atomics_config="$GASNETI_ATOMIC_IMPL_STR" else atomics_config="$GASNETI_ATOMIC_IMPL_STR,${GASNETI_ATOMIC32_IMPL_STR}32,${GASNETI_ATOMIC64_IMPL_STR}64" fi #--------------------------------------------------------------------------------------------------------------- # PSHM uses atomics in shared memory for IPC. # So we assume that Generic and O/S atomics are insufficient. # If that is ever not the case, one can add exceptions as needed. if test "$with_pshm" != no; then case "$enabled_pshm" in yes) pshm_how='enabled explicitly by --enable-pshm';; *) pshm_how='auto-enabled';; esac # For all platforms of interest, compiler is equivalent to native check_atomics_match='' for check_atomics_val in native compiler; do if test $GASNETI_ATOMIC_IMPL_STR = $check_atomics_val; then check_atomics_match=1 break fi done if test -n "$check_atomics_match"; then : else if test -n "$enabled_generic_atomicops" ; then check_atomics_msg='user passed --enable-force-generic-atomicops' elif test -n "$enabled_os_atomicops"; then check_atomics_msg='user passed --enable-force-os-atomicops' else check_atomics_msg="this platform has defaulted to '$GASNETI_ATOMIC_IMPL_STR' atomicops" fi echo echo "configure error: PSHM support ($pshm_how) requires native atomicops, but $check_atomics_msg" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 unset check_atomics_msg fi unset check_atomics_match fi #--------------------------------------------------------------------------------------------------------------- # CONDUIT CONFIGURATION UTILITIES #--------------------------------------------------------------------------------------------------------------- # Hack-around to prevent a bogus autoconf 2.58 bug when AC_PROG_CXX is called conditionally below am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_DISABLED(auto-conduit-detect,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --enable-auto-conduit-detect was given. if test "${enable_auto_conduit_detect+set}" = set; then : enableval=$enable_auto_conduit_detect; fi case "$enable_auto_conduit_detect" in '' | yes) : enabled_auto_detect=yes;_conduit_auto_reason=auto ;; *) : enabled_auto_detect=no;_conduit_auto_reason=disabled ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_DISABLED(auto-conduit-detect,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$gasnet_toolsonly_mode" = "yes"; then TOOLSONLY_MODE_TRUE= TOOLSONLY_MODE_FALSE='#' else TOOLSONLY_MODE_TRUE='#' TOOLSONLY_MODE_FALSE= fi if test "$gasnet_toolsonly_mode" = "no"; then CONDUIT_MODE_TRUE= CONDUIT_MODE_FALSE='#' else CONDUIT_MODE_TRUE='#' CONDUIT_MODE_FALSE= fi #--------------------------------------------------------------------------------------------------------------- # CODE COMMON TO MULTIPLE CONDUITS #--------------------------------------------------------------------------------------------------------------- LINKHELPER_BASE=gasnet_conftest_cfunc LINKHELPER_SRC=$LINKHELPER_BASE.c LINKHELPER_OBJ=$LINKHELPER_BASE.o LINKHELPER_LIBS="$LINKHELPER_OBJ $LIBM" LINKHELPER_DECL="extern int linkhelper_cint; extern void linkhelper_cfunc(int val);" LINKHELPER_CODE="linkhelper_cfunc(linkhelper_cint);" if test x"$have_tls" = xyes; then LINKHELPER_TLS_DECL='__thread long tlocal;' LINKHELPER_TLS_CODE='tlocal = 4;' fi #--------------------------------------------------------------------------------------------------------------- # C++ configuration MISC_CXXFLAGS="" # start with a clean slate # Note: autoconf uses CPPFLAGS for both C and C++, so there is NO CXXCPPFLAGS if test "${CXX-__NOT_SET__}" = ""; then have_cxx=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C++ compiler disabled using --without-cxx" >&5 $as_echo "$as_me: WARNING: C++ compiler disabled using --without-cxx" >&2;} echo "C++ compiler disabled using --without-cxx" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else # bug 1725: Run GASNET_PROG_CXX with care in case it drops dead (missing C++) # Temporary override of AC_MSG_ERROR is a dirty hack! However, the previous approach # of probing in a subshell eventually ran afoul of autoconf's AC_REQUIRE() rules. have_cxx=yes ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} have_cxx=no; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # vvvvvvvvvvvvvvvvvvvvvv GASNET_PROG_CXX vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PROG_CXXCPP vvvvvvvvvvvvvvvvvvvvvv (L:3) ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} have_cxx=no; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # vvvvvvvvvvvvvvvvvvvvvv GASNET_GETFULLPATH(CXXCPP) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$gasnet_cv__gfp_disable" = ""; then if echo "$CXXCPP" | $AWK -F' ' '{if ($1 ~ /^(.*\/)?env$/) exit 0; else exit 1;}' >/dev/null; then for ac_prog in $ENVCMD env do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ENVCMD+:} false; then : $as_echo_n "(cached) " >&6 else case $ENVCMD in [\\/]* | ?:[\\/]*) ac_cv_path_ENVCMD="$ENVCMD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ENVCMD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ENVCMD=$ac_cv_path_ENVCMD if test -n "$ENVCMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENVCMD" >&5 $as_echo "$ENVCMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ENVCMD" && break done # assemble "ENVCMD key=val key=val " with a trailing space gasnet_gfp_progenv="$ENVCMD "`echo "$CXXCPP" | $AWK -F' ' 'BEGIN { ORS=" "; } { for (i=2;i<=NF;i++) { if ($i ~ /=/) { print $i; } else break; } }'` # just the program name gasnet_gfp_progname=`echo "$CXXCPP" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i<=NF;i++) { if ($i !~ /=/) { print $i; break; } } }'` # list of program arguments with no trailing space gasnet_gfp_progargs=`echo "$CXXCPP" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_gasnet_cv__gfp_fullprogname_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else case $gasnet_cv__gfp_fullprogname_CXXCPP in [\\/]* | ?:[\\/]*) ac_cv_path_gasnet_cv__gfp_fullprogname_CXXCPP="$gasnet_cv__gfp_fullprogname_CXXCPP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_gasnet_cv__gfp_fullprogname_CXXCPP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi gasnet_cv__gfp_fullprogname_CXXCPP=$ac_cv_path_gasnet_cv__gfp_fullprogname_CXXCPP if test -n "$gasnet_cv__gfp_fullprogname_CXXCPP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv__gfp_fullprogname_CXXCPP" >&5 $as_echo "$gasnet_cv__gfp_fullprogname_CXXCPP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$gasnet_cv__gfp_fullprogname_CXXCPP" != "" ; then gasnet_gfp_progname="$gasnet_cv__gfp_fullprogname_CXXCPP" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for full path expansion of CXXCPP" >&5 $as_echo_n "checking for full path expansion of CXXCPP... " >&6; } if test -n "$gasnet_gfp_progargs" ; then CXXCPP="$gasnet_gfp_progenv$gasnet_gfp_progname $gasnet_gfp_progargs" else CXXCPP="$gasnet_gfp_progenv$gasnet_gfp_progname" fi #echo "gasnet_gfp_progenv='$gasnet_gfp_progenv'" #echo "gasnet_gfp_progname='$gasnet_gfp_progname'" #echo "gasnet_gfp_progargs='$gasnet_gfp_progargs'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_GETFULLPATH(CXXCPP) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C++ preprocessor" >&5 $as_echo_n "checking for working C++ preprocessor... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu gasnet_progcxxcpp_extrainfo= if test -n "`$CXXCPP -version 2>&1 < /dev/null | grep MIPSpro`" ; then gasnet_progcxxcpp_extrainfo=" (added -diag_error 1035 to deal with broken MIPSPro preprocessor)" CXXFLAGS="$CXXFLAGS -diag_error 1035" fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : echo echo "configure error: Your C++ preprocessor is broken - reported success when it should have failed" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log have_cxx=no fi rm -f conftest.err conftest.i conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else echo echo "configure error: Your C++ preprocessor is broken - reported failure when it should have succeeded" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log have_cxx=no fi rm -f conftest.err conftest.i conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus #error __cplusplus must be defined in a C++ preprocessor! #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else echo echo "configure error: Your C++ preprocessor is broken, it fails to define __cplusplus." if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log have_cxx=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes$gasnet_progcxxcpp_extrainfo" >&5 $as_echo "yes$gasnet_progcxxcpp_extrainfo" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PROG_CXXCPP ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_GETFULLPATH(CXX) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$gasnet_cv__gfp_disable" = ""; then if echo "$CXX" | $AWK -F' ' '{if ($1 ~ /^(.*\/)?env$/) exit 0; else exit 1;}' >/dev/null; then for ac_prog in $ENVCMD env do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ENVCMD+:} false; then : $as_echo_n "(cached) " >&6 else case $ENVCMD in [\\/]* | ?:[\\/]*) ac_cv_path_ENVCMD="$ENVCMD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ENVCMD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ENVCMD=$ac_cv_path_ENVCMD if test -n "$ENVCMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENVCMD" >&5 $as_echo "$ENVCMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ENVCMD" && break done # assemble "ENVCMD key=val key=val " with a trailing space gasnet_gfp_progenv="$ENVCMD "`echo "$CXX" | $AWK -F' ' 'BEGIN { ORS=" "; } { for (i=2;i<=NF;i++) { if ($i ~ /=/) { print $i; } else break; } }'` # just the program name gasnet_gfp_progname=`echo "$CXX" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i<=NF;i++) { if ($i !~ /=/) { print $i; break; } } }'` # list of program arguments with no trailing space gasnet_gfp_progargs=`echo "$CXX" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_gasnet_cv__gfp_fullprogname_CXX+:} false; then : $as_echo_n "(cached) " >&6 else case $gasnet_cv__gfp_fullprogname_CXX in [\\/]* | ?:[\\/]*) ac_cv_path_gasnet_cv__gfp_fullprogname_CXX="$gasnet_cv__gfp_fullprogname_CXX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_gasnet_cv__gfp_fullprogname_CXX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi gasnet_cv__gfp_fullprogname_CXX=$ac_cv_path_gasnet_cv__gfp_fullprogname_CXX if test -n "$gasnet_cv__gfp_fullprogname_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv__gfp_fullprogname_CXX" >&5 $as_echo "$gasnet_cv__gfp_fullprogname_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$gasnet_cv__gfp_fullprogname_CXX" != "" ; then gasnet_gfp_progname="$gasnet_cv__gfp_fullprogname_CXX" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for full path expansion of CXX" >&5 $as_echo_n "checking for full path expansion of CXX... " >&6; } if test -n "$gasnet_gfp_progargs" ; then CXX="$gasnet_gfp_progenv$gasnet_gfp_progname $gasnet_gfp_progargs" else CXX="$gasnet_gfp_progenv$gasnet_gfp_progname" fi #echo "gasnet_gfp_progenv='$gasnet_gfp_progenv'" #echo "gasnet_gfp_progname='$gasnet_gfp_progname'" #echo "gasnet_gfp_progargs='$gasnet_gfp_progargs'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_GETFULLPATH(CXX) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C++ compiler" >&5 $as_echo_n "checking for working C++ compiler... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { fail for me ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : echo echo "configure error: Your C++ compiler is broken - reported success when it should have failed" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log have_cxx=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { printf("hi\n"); exit(0); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else echo echo "configure error: Your C++ compiler is broken - reported failure when it should have succeeded" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log have_cxx=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int some_bogus_nonexistent_symbol(); int main () { int x = some_bogus_nonexistent_symbol(); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : echo echo "configure error: Your C++ linker is broken - reported success when it should have failed" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log have_cxx=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { printf("hi\n"); exit(0); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : else echo echo "configure error: Your C++ link is broken - reported failure when it should have succeeded" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log have_cxx=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_SET_CROSS_COMPILE vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$CROSS_COMPILING" = 0; then cross_compiling=no ac_cv_prog_cc_cross=no ac_cv_prog_cxx_cross=no else cross_compiling=yes ac_cv_prog_cc_cross=yes ac_cv_prog_cxx_cross=yes fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SET_CROSS_COMPILE ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$cross_compiling" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking working C++ compiler executables" >&5 $as_echo_n "checking working C++ compiler executables... " >&6; } if test "$cross_compiling" = yes; then : echo echo "configure error: Internal configure error - please report" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log have_cxx=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void) { return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo echo "configure error: Cannot run executables created with C++ compiler. If you're attempting to cross-compile, use --enable-cross-compile" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log have_cxx=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PROG_CXX ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$have_cxx" = no; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears you have no working C++ compiler" >&5 $as_echo "$as_me: WARNING: It appears you have no working C++ compiler" >&2;} echo "It appears you have no working C++ compiler" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi if test -n "$CXXFLAGS"; then # embed user-provided CXXFLAGS into CXX for safe-keeping CXX="$CXX $CXXFLAGS" CXXFLAGS="" fi fi if test "$have_cxx" = yes; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # vvvvvvvvvvvvvvvvvvvvvv GASNET_FAMILY_CACHE_CHECK(C++,CXX,gasnet_cv_cxx_family) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler family" >&5 $as_echo_n "checking for C++ compiler family... " >&6; } if ${gasnet_cv_cxx_family+:} false; then : $as_echo_n "(cached) " >&6 else if test "CXX" != "CXX" ; then _GASNET_FAMILY_CACHE_CHECK_PREPROC="$CPP" else _GASNET_FAMILY_CACHE_CHECK_PREPROC="$CXXCPP" fi if test "`echo '$_GASNET_FAMILY_CACHE_CHECK_PREPROC' | grep '$C++'`" = "" ; then # preprocessor may differ from true compiler, so force full compilation testing _force_compile=1 else _force_compile= fi gasnet_cv_cxx_family=unknown if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__xlC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __xlC__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=XLC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __xlC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=XLC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__xlC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__ibmxl__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __ibmxl__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=XLC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __ibmxl__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=XLC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__ibmxl__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(_CRAYC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _CRAYC # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=Cray fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _CRAYC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=Cray fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(_CRAYC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__GNUC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __GNUC__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=GNU fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __GNUC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=GNU fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__GNUC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__clang__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __clang__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=Clang fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __clang__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=Clang fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__clang__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__PGI,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PGI # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=PGI fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PGI # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=PGI fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__PGI,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__NVCOMPILER,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCOMPILER # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=NVHPC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCOMPILER # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=NVHPC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__NVCOMPILER,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__INTEL_COMPILER,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __INTEL_COMPILER # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=Intel fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __INTEL_COMPILER # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=Intel fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__INTEL_COMPILER,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__OPENCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __OPENCC__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=Open64 fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __OPENCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=Open64 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__OPENCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__PCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PCC__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=PCC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=PCC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__PCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__PATHCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PATHCC__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=Pathscale fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PATHCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=Pathscale fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__PATHCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__DECC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECC # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=Compaq fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=Compaq fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__DECC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # Compaq C # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__DECCXX,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECCXX # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=Compaq fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECCXX # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=Compaq fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__DECCXX,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # Compaq C++ fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__SUNPRO_C,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_C # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=Sun fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_C # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=Sun fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__SUNPRO_C,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # Sun C # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__SUNPRO_CC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_CC # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=Sun fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_CC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=Sun fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__SUNPRO_CC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # Sun C++ fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__HP_cc,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_cc # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=HP fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_cc # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=HP fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__HP_cc,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # HP C # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__HP_aCC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_aCC # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=HP fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_aCC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=HP fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__HP_aCC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # HP aCC (C++) fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(_SGI_COMPILER_VERSION,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SGI_COMPILER_VERSION # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=MIPS fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SGI_COMPILER_VERSION # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=MIPS fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(_SGI_COMPILER_VERSION,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__MTA__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __MTA__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=MTA fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __MTA__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=MTA fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__MTA__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__KCC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __KCC # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=KAI fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __KCC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=KAI fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__KCC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__TINYC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __TINYC__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=TINY fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __TINYC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=TINY fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__TINYC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__LCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __LCC__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=LCC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __LCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=LCC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__LCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$gasnet_cv_cxx_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(_SX,...,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SX # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=NEC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SX # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=NEC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(_SX,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__sgi,...,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __sgi # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : gasnet_cv_cxx_family=MIPS fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __sgi # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_family=MIPS fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__sgi,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # MIPSPro 7.3.0 and earlier fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_family" >&5 $as_echo "$gasnet_cv_cxx_family" >&6; } if test "$gasnet_cv_cxx_family" != "GNU" ; then case CXX in CC) ac_cv_c_compiler_gnu=no GCC="" ;; CXX) ac_cv_cxx_compiler_gnu=no GXX="" ;; esac fi case "$gasnet_cv_cxx_family" in GNU) CXX_SUBFAMILY='GNU' # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_STR(for gcc version string,CXX_gcc_version_string,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc version string" >&5 $as_echo_n "checking for gcc version string... " >&6; } if ${gasnet_cv_CXX_gcc_version_string+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_CXX_gcc_version_string="" _extractstrembed='"$gasnetextractstr: (-(|" __VERSION__ "|)-) $"' # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_CXX_gcc_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$gasnet_cv_CXX_gcc_version_string" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_CXX_gcc_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_CXX_gcc_version_string" >&5 $as_echo "$gasnet_cv_CXX_gcc_version_string" >&6; } if test -n "$gasnet_cv_CXX_gcc_version_string" ; then _gasnet_CXX_gcc_version_string=$gasnet_cv_CXX_gcc_version_string fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_STR(for gcc version string,CXX_gcc_version_string,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) case "$_gasnet_CXX_gcc_version_string" in *gccfss*) CXX_SUBFAMILY='GCCFSS';; *Advance-Toolchain*) CXX_SUBFAMILY='IBM';; *) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__APPLE_CC__,...,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : CXX_SUBFAMILY='APPLE' fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : CXX_SUBFAMILY='APPLE' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__APPLE_CC__,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__NVCC__,...,) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCC__ # error #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : CXX_SUBFAMILY='NVIDIA' fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : CXX_SUBFAMILY='NVIDIA' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__NVCC__,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; esac ;; Clang) CXX_SUBFAMILY='LLVM' # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_STR(for clang version string,CXX_clang_version_string,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang version string" >&5 $as_echo_n "checking for clang version string... " >&6; } if ${gasnet_cv_CXX_clang_version_string+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_CXX_clang_version_string="" _extractstrembed='"$gasnetextractstr: (-(|" __VERSION__ "|)-) $"' # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_CXX_clang_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$gasnet_cv_CXX_clang_version_string" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_CXX_clang_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_CXX_clang_version_string" >&5 $as_echo "$gasnet_cv_CXX_clang_version_string" >&6; } if test -n "$gasnet_cv_CXX_clang_version_string" ; then _gasnet_CXX_clang_version_string=$gasnet_cv_CXX_clang_version_string fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_STR(for clang version string,CXX_clang_version_string,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) case "$_gasnet_CXX_clang_version_string" in *Apple*) CXX_SUBFAMILY='APPLE';; *Cray*) CXX_SUBFAMILY='CRAY';; *AMD*) CXX_SUBFAMILY='AMD';; *Arm*) CXX_SUBFAMILY='ARM';; *Intel*) CXX_SUBFAMILY='INTEL';; esac ;; *) CXX_SUBFAMILY='none' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler sub-family" >&5 $as_echo_n "checking for C++ compiler sub-family... " >&6; } # real "checking" was done above { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX_SUBFAMILY" >&5 $as_echo "$CXX_SUBFAMILY" >&6; } CXX_FAMILY=$gasnet_cv_cxx_family # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FAMILY_CACHE_CHECK(C++,CXX,gasnet_cv_cxx_family) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) CXXDEBUGFLAGS="-g" CXXOPTFLAGS="-O2" DEVWARN_CXXFLAGS= GASNET_UDP_LIBS="" gxx_flag_prefix='' gxx_flag_delim=' ' case "$CXX_FAMILY" in GNU) # vvvvvvvvvvvvvvvvvvvvvv GASNET_GCC_VERSION_CHECK(CXX) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for known buggy compilers" >&5 $as_echo_n "checking for known buggy compilers... " >&6; } badgccmsg="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if __GNUC__ == 3 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ <= 2 # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: CXX is gcc 3.2.0-2" >&5 $as_echo "CXX is gcc 3.2.0-2" >&6; } badgccmsg="Use of gcc/g++ 3.2.0-2 for compiling this software is strongly discouraged. \ This version has a serious known bug in the optimizer regarding structure copying, \ which may lead to bad code and incorrect runtime behavior when optimization is enabled. \ Consider using \$CXX to select a different compiler." # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(allow-gcc32,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --enable-allow-gcc32 was given. if test "${enable_allow_gcc32+set}" = set; then : enableval=$enable_allow_gcc32; fi case "$enable_allow_gcc32" in '' | no) : as_fn_error $? "$badgccmsg \ You may enable use of this broken compiler at your own risk by passing the --enable-allow-gcc32 flag." "$LINENO" 5 ;; *) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $badgccmsg" >&5 $as_echo "$as_me: WARNING: $badgccmsg" >&2;} echo "$badgccmsg" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(allow-gcc32,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if __GNUC__ == 4 && __GNUC_MINOR__ < 3 # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: CXX is gcc 4.x, for x < 3" >&5 $as_echo "CXX is gcc 4.x, for x < 3" >&6; } badgccmsg="Use of gcc/g++ 4.0, 4.1 or 4.2 for compiling this software is strongly discouraged. \ These versions have a known bug in the optimizer regarding aliasing analysis which may lead \ to bad code and incorrect runtime behavior when optimization is enabled. \ Consider using \$CXX to select a different compiler." # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(allow-gcc4,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --enable-allow-gcc4 was given. if test "${enable_allow_gcc4+set}" = set; then : enableval=$enable_allow_gcc4; fi case "$enable_allow_gcc4" in '' | no) : as_fn_error $? "$badgccmsg \ You may enable use of this broken compiler at your own risk by passing the --enable-allow-gcc4 flag.\ If you do so, please see the documentation on --enable-conservative-local-copy for a possible \ work around for the gcc-4.x bug." "$LINENO" 5 ;; *) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $badgccmsg" >&5 $as_echo "$as_me: WARNING: $badgccmsg" >&2;} echo "$badgccmsg" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(allow-gcc4,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test -z "$badgccmsg"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_GCC_VERSION_CHECK(CXX) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) case "$CC_SUBFAMILY" in NVIDIA) gxx_flag_prefix='-Xcompiler ' gxx_flag_delim=',' ;; esac case "$target_cpu" in sparc) if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_ULTRASPARC" != 1; then for flag in "-mcpu=ultrasparc3 -mtune=ultrasparc3" "-mcpu=ultrasparc -mtune=ultrasparc" ; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG($flag) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $flag" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag $flag" >&5 $as_echo_n "checking for C++ compiler flag $flag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) ultrasparc_flag_worked=1 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } ultrasparc_flag_worked=0 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } ultrasparc_flag_worked=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } ultrasparc_flag_worked=0 fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) ultrasparc_flag_worked=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG($flag) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$ultrasparc_flag_worked" = 1; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $MISC_CXXFLAGS $flag" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working flag $flag" >&5 $as_echo_n "checking for working flag $flag... " >&6; } if test "$cross_compiling" = yes; then : ultrasparc_flag_worked=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void foo(void) { #ifdef __GNUC__ register void * addr = 0; register int oldval = 0; register int newval = 1; __asm__ __volatile__ ("cas [%2], %0, %1" : "=&r"(oldval), "=&r"(newval) : "r" (addr) : "memory"); #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) __asm("cas [%i0], %i1, %i2"); #else #error unknown sparc compiler #endif } int main(void) { return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ultrasparc_flag_worked=1 else ultrasparc_flag_worked=0 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$ultrasparc_flag_worked" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MISC_CXXFLAGS="$flag" break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UltraSPARC instruction support" >&5 $as_echo_n "checking for UltraSPARC instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $MISC_CXXFLAGS" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; rs6000|powerpc*) if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_PPC64" != 1 -a "$cross_compiling" != "yes"; then for flag in "-force_cpusubtype_ALL" "-Wa,-mppc64" ; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG($flag) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $flag" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag $flag" >&5 $as_echo_n "checking for C++ compiler flag $flag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) ppc64_flag_worked=1 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } ppc64_flag_worked=0 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } ppc64_flag_worked=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } ppc64_flag_worked=0 fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) ppc64_flag_worked=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG($flag) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$ppc64_flag_worked" = 1; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $MISC_CXXFLAGS $flag" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working flag $flag" >&5 $as_echo_n "checking for working flag $flag... " >&6; } if test "$cross_compiling" = yes; then : ppc64_flag_worked=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ppc64_flag_worked=1 else ppc64_flag_worked=0 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$ppc64_flag_worked" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MISC_CXXFLAGS="$flag" break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PPC64 instruction support" >&5 $as_echo_n "checking for PPC64 instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $MISC_CXXFLAGS" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc < #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.cc $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; esac # set CXXDEBUGFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"${gxx_flag_prefix}-g3") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="${gxx_flag_prefix}-g3" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"${gxx_flag_prefix}-g3") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) case "$target_os" in darwin*) # Want -gstabs+ instead of -g3, if supported # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-gstabs+) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-gstabs+") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-gstabs+" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-gstabs+") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-gstabs+" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-gstabs+... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="${gxx_flag_prefix}-gstabs+" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="${gxx_flag_prefix}-gstabs+" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-gstabs+) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; esac CXXDEBUGFLAGS="$CXXFLAGS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; NVHPC) # TODO: are either `-M` options, inherited from PGI, still required? # suppress large number of useless default warnings # get inline assembly and sign-extended widening MISC_CXXFLAGS="-w -Masmkeyword -Msignextend" CXXOPTFLAGS="-O1" # TODO: restore -O2 if/when bugs are resolved? (see bug 4158) ;; PGI) MISC_CXXFLAGS="-Masmkeyword -Msignextend" case "$GASNETI_PTR_BITS$target_os" in 64darwin*) # PGI seems to have a different ABI # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(-Mllalign) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -Mllalign") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS -Mllalign" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -Mllalign") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag -Mllalign" >&5 $as_echo_n "checking for C++ compiler flag -Mllalign... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) MISC_CXXFLAGS="$MISC_CXXFLAGS -Mllalign" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } MISC_CXXFLAGS="$MISC_CXXFLAGS -Mllalign" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(-Mllalign) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_PGI_VERSION_CHECK(CXX) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for known buggy compilers" >&5 $as_echo_n "checking for known buggy compilers... " >&6; } badpgimsg="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if ((10000 * __PGIC__) + (100 * __PGIC_MINOR__) + __PGIC_PATCHLEVEL__) < 70205 # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: CXX is PGI prior to 7.2-5" >&5 $as_echo "CXX is PGI prior to 7.2-5" >&6; } badpgimsg="Use of PGI compilers older than 7.2-5 is not supported. Consider using \$CXX to select a different compiler." fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test -n "$badpgimsg"; then as_fn_error $? "$badpgimsg" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PGI_VERSION_CHECK(CXX) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # DOB: don't force this in client flags by default. The payoff is small and it has potential to break clients # because it's not a valid option for PGI C compilation. # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(--display_error_number) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS --display_error_number") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS --display_error_number" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS --display_error_number") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag --display_error_number" >&5 $as_echo_n "checking for C++ compiler flag --display_error_number... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) DEVWARN_CXXFLAGS="--display_error_number" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } DEVWARN_CXXFLAGS="--display_error_number" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(--display_error_number) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG([-Wc,--diag_suppress=177]) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -Wc,--diag_suppress=177") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS -Wc,--diag_suppress=177" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -Wc,--diag_suppress=177") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag -Wc,--diag_suppress=177" >&5 $as_echo_n "checking for C++ compiler flag -Wc,--diag_suppress=177... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # Intentionally empty - this is just to test whether surgical warning suppresion is available else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } MISC_CXXFLAGS="-w $MISC_CXXFLAGS" # old versions of pgc++ have no way to indep control warnings else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # Intentionally empty - this is just to test whether surgical warning suppresion is available else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } MISC_CXXFLAGS="-w $MISC_CXXFLAGS" # old versions of pgc++ have no way to indep control warnings fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) MISC_CXXFLAGS="-w $MISC_CXXFLAGS" # old versions of pgc++ have no way to indep control warnings fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG([-Wc,--diag_suppress=177]) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; Intel) # Note we need to support both older -wd and newer -diag-disable # Setting CXX_WDFLAG simplifes doing so in later tests # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(-diag-disable=654) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -diag-disable=654") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS -diag-disable=654" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -diag-disable=654") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag -diag-disable=654" >&5 $as_echo_n "checking for C++ compiler flag -diag-disable=654... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXX_WDFLAG='-diag-disable=' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXX_WDFLAG='-wd' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXX_WDFLAG='-diag-disable=' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXX_WDFLAG='-wd' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXX_WDFLAG='-wd' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(-diag-disable=654) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) MISC_CXXFLAGS="${CXX_WDFLAG}654 ${CXX_WDFLAG}1125 ${CXX_WDFLAG}279" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${CXX_WDFLAG}1572) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${CXX_WDFLAG}1572") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${CXX_WDFLAG}1572" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${CXX_WDFLAG}1572") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${CXX_WDFLAG}1572" >&5 $as_echo_n "checking for C++ compiler flag ${CXX_WDFLAG}1572... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) MISC_CXXFLAGS="$MISC_CXXFLAGS ${CXX_WDFLAG}1572" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } MISC_CXXFLAGS="$MISC_CXXFLAGS ${CXX_WDFLAG}1572" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${CXX_WDFLAG}1572) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; XLC) if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_PPC64" != 1 -a "$cross_compiling" != "yes"; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PPC64 instruction support" >&5 $as_echo_n "checking for PPC64 instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $MISC_CXXFLAGS" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc < #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.cc $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(-qsuppress=1540-0809) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -qsuppress=1540-0809") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS -qsuppress=1540-0809" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -qsuppress=1540-0809") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag -qsuppress=1540-0809" >&5 $as_echo_n "checking for C++ compiler flag -qsuppress=1540-0809... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # 1540-0809 = empty source file (some linux headers) MISC_CXXFLAGS="$MISC_CXXFLAGS -qsuppress=1540-0809" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # 1540-0809 = empty source file (some linux headers) MISC_CXXFLAGS="$MISC_CXXFLAGS -qsuppress=1540-0809" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(-qsuppress=1540-0809) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) MISC_CXXFLAGS="$MISC_CXXFLAGS -qeh" ;; Sun) if test "$target_cpu" = "sparc"; then if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_ULTRASPARC" != 1; then for flag in "-xarch=v8plusb" "-xarch=v8plusa" "-xarch=v8plus" "-xarch=sparcvis2" "-xarch=sparcvis" "-xarch=sparc" ; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG($flag) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $flag" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag $flag" >&5 $as_echo_n "checking for C++ compiler flag $flag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) ultrasparc_flag_worked=1 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } ultrasparc_flag_worked=0 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } ultrasparc_flag_worked=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } ultrasparc_flag_worked=0 fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) ultrasparc_flag_worked=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG($flag) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$ultrasparc_flag_worked" = 1; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $MISC_CXXFLAGS $flag" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working flag $flag" >&5 $as_echo_n "checking for working flag $flag... " >&6; } if test "$cross_compiling" = yes; then : ultrasparc_flag_worked=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void foo(void) { #ifdef __GNUC__ register void * addr = 0; register int oldval = 0; register int newval = 1; __asm__ __volatile__ ("cas [%2], %0, %1" : "=&r"(oldval), "=&r"(newval) : "r" (addr) : "memory"); #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) __asm("cas [%i0], %i1, %i2"); #else #error unknown sparc compiler #endif } int main(void) { return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ultrasparc_flag_worked=1 else ultrasparc_flag_worked=0 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$ultrasparc_flag_worked" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MISC_CXXFLAGS="$flag" break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UltraSPARC instruction support" >&5 $as_echo_n "checking for UltraSPARC instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $MISC_CXXFLAGS" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $MISC_CXXFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi CXXOPTFLAGS="-xO2" # Can we go higher to match "-fast -xO5" of CCOPTFLAGS? # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(-xlibmopt) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -xlibmopt") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS -xlibmopt" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -xlibmopt") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag -xlibmopt" >&5 $as_echo_n "checking for C++ compiler flag -xlibmopt... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXOPTFLAGS="$CXXOPTFLAGS -xlibmopt" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXOPTFLAGS="$CXXOPTFLAGS -xlibmopt" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(-xlibmopt) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(-errtags) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -errtags") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS -errtags" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -errtags") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag -errtags" >&5 $as_echo_n "checking for C++ compiler flag -errtags... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) MISC_CXXFLAGS="$MISC_CXXFLAGS -errtags" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } MISC_CXXFLAGS="$MISC_CXXFLAGS -errtags" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(-errtags) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; Cray) case "$target_cpu" in x86_64) # XT, XE, XK, XC, etc. CXXDEBUGFLAGS="-g -O0" # consistent with CCDEBUGFLAGS MISC_CXXFLAGS="-hnomessage=236:3185 -hexceptions -hnew_for_init" ;; *) as_fn_error $? "Cray C++ compiler for unknown target CPU" "$LINENO" 5 ;; esac ;; Pathscale) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PATHSCALE_VERSION_CHECK(CXX) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for known buggy compilers" >&5 $as_echo_n "checking for known buggy compilers... " >&6; } badpathscalemsg="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if (__PATHCC__ < 3) # error #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: CXX is PathScale prior to 3.0" >&5 $as_echo "CXX is PathScale prior to 3.0" >&6; } badpathscalemsg="Use of PathScale compilers older than 3.0 is not supported. Consider using \$CXX to select a different compiler." fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test -n "$badpathscalemsg"; then as_fn_error $? "$badpathscalemsg" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PATHSCALE_VERSION_CHECK(CXX) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) CXXDEBUGFLAGS="-g3 -O0" # consistent with CCDEBUGFLAGS CXXOPTFLAGS="-O3" # consistent with CCOPTFLAGS ;; Open64) if test "$GASNETI_PTR_BITS" = 32; then # consistent with CCOPTFLAGS CXXOPTFLAGS="-O1" else CXXOPTFLAGS="-O3 -OPT:wrap_around_unsafe=off" fi CXXDEBUGFLAGS="-g3" ;; Clang) CXXOPTFLAGS="-O3" CXXDEBUGFLAGS="-g -O0" # consistent with CCDEBUGFLAGS ;; esac if test "$BUILDCONFIG" = "optimize" ; then GASNET_OPT_CXXFLAGS="$CXXOPTFLAGS" else GASNET_OPT_CXXFLAGS="$CXXDEBUGFLAGS" fi # Add GNU-style warning enable/suppression flags to MISC_CXXFLAGS case "$CXX_FAMILY" in GNU | Pathscale | Open64 | Clang) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$MISC_CXXFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$MISC_CXXFLAGS" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$MISC_CXXFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$enabled_dev_warnings" = "yes" ; then # enable additional supported warnings for warnflag in -Wall \ -Wpointer-arith \ -Wnested-externs \ -Wwrite-strings \ -Wmissing-format-attribute \ -Winit-self \ -Wvla \ -Wexpansion-to-defined \ -Woverlength-strings \ -Wclobbered \ -Wcast-function-type \ -Wempty-body \ -Wignored-qualifiers \ -Wimplicit-fallthrough \ -Wmissing-parameter-type \ -Wold-style-declaration \ -Wuninitialized \ -Wshift-negative-value \ ; do if test "$CXX_FAMILY" = "Open64" && ( test "x$warnflag" = "x-Wempty-body" || test "x$warnflag" = "x-Wexpansion-to-defined" ) ; then : # Bug 3711: Open64 botches some warnings at link time, which is not probed here else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}$warnflag) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}$warnflag") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}$warnflag" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}$warnflag") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}$warnflag" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}$warnflag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}$warnflag" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}$warnflag" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}$warnflag) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi done # Disable DEVWARN flags from -Wall that we don't support in our library code # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-format-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-format-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format-overflow" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-format-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-format-overflow" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-format-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wformat-overflow" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-overflow" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-format-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-format-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wformat-overflow" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-overflow" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-format-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-format-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-format-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-format-truncation) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-format-truncation") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format-truncation" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-format-truncation") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-format-truncation" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-format-truncation... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-truncation) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-truncation") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wformat-truncation" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-truncation") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-truncation" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-truncation... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-format-truncation" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-format-truncation" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-truncation) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-truncation) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-truncation") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wformat-truncation" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-truncation") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-truncation" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-truncation... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-format-truncation" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-format-truncation" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-truncation) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-format-truncation) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # Disable DEVWARN flag(s) from -Wcast-function-type that we don't support in our library code # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-cast-function-type-strict) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-cast-function-type-strict") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-cast-function-type-strict" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-cast-function-type-strict") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-cast-function-type-strict" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-cast-function-type-strict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wcast-function-type-strict) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wcast-function-type-strict") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wcast-function-type-strict" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wcast-function-type-strict") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wcast-function-type-strict" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wcast-function-type-strict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-cast-function-type-strict" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-cast-function-type-strict" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wcast-function-type-strict) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wcast-function-type-strict) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wcast-function-type-strict") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wcast-function-type-strict" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wcast-function-type-strict") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wcast-function-type-strict" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wcast-function-type-strict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-cast-function-type-strict" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } DEVWARN_CXXFLAGS="$DEVWARN_CXXFLAGS ${gxx_flag_prefix}-Wno-cast-function-type-strict" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wcast-function-type-strict) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-cast-function-type-strict) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi # compiler-specific global warning disables case "$CXX_FAMILY" in Pathscale) # pathcc default enables -Wformat-security which we don't want # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-format-security) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-format-security") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format-security" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-format-security") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-format-security" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-format-security... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-security) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-security") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wformat-security" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-security") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-security" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-security... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format-security" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format-security" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-security) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-security) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-security") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wformat-security" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat-security") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-security" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wformat-security... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format-security" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format-security" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat-security) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-format-security) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; Open64) # Open64's maybe-uninitialized analysis is too broken to be usable # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-uninitialized) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-uninitialized") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-uninitialized" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-uninitialized") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-uninitialized" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-uninitialized... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wuninitialized) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wuninitialized") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wuninitialized" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wuninitialized") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wuninitialized" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wuninitialized... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-uninitialized" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-uninitialized" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wuninitialized) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wuninitialized) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wuninitialized") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wuninitialized" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wuninitialized") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wuninitialized" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wuninitialized... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-uninitialized" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-uninitialized" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wuninitialized) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-uninitialized) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # Open64 strict aliasing complains about (void **)/(T **) aliasing, which we use in places # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-strict-aliasing) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-strict-aliasing") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-strict-aliasing" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-strict-aliasing") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-strict-aliasing" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-strict-aliasing... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wstrict-aliasing) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wstrict-aliasing") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wstrict-aliasing" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wstrict-aliasing") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wstrict-aliasing" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wstrict-aliasing... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-strict-aliasing" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-strict-aliasing" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wstrict-aliasing) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wstrict-aliasing) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wstrict-aliasing") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wstrict-aliasing" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wstrict-aliasing") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wstrict-aliasing" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wstrict-aliasing... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-strict-aliasing" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-strict-aliasing" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wstrict-aliasing) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-strict-aliasing) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; GNU) # GCC 11 appears to have analysis problems which yield bogus warnings (bugs 4228,4231,4232) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler is g++ 11 or higher" >&5 $as_echo_n "checking whether C++ compiler is g++ 11 or higher... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : is_gcc11_or_higher=yes else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" is_gcc11_or_higher=yes else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then is_gcc11_or_higher=yes else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" is_gcc11_or_higher=yes fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 is_gcc11_or_higher=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $is_gcc11_or_higher" >&5 $as_echo "$is_gcc11_or_higher" >&6; } if test "$is_gcc11_or_higher" = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-array-bounds) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-array-bounds") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-array-bounds" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-array-bounds") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-array-bounds" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-array-bounds... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Warray-bounds) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Warray-bounds") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Warray-bounds" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Warray-bounds") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Warray-bounds" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Warray-bounds... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-array-bounds" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-array-bounds" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Warray-bounds) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Warray-bounds) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Warray-bounds") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Warray-bounds" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Warray-bounds") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Warray-bounds" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Warray-bounds... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-array-bounds" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-array-bounds" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Warray-bounds) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-array-bounds) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-stringop-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-stringop-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-stringop-overflow" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-stringop-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-stringop-overflow" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-stringop-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wstringop-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wstringop-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wstringop-overflow" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wstringop-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wstringop-overflow" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wstringop-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-stringop-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-stringop-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wstringop-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wstringop-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wstringop-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wstringop-overflow" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wstringop-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wstringop-overflow" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wstringop-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-stringop-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-stringop-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wstringop-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-stringop-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # These warnings were immediately problematic when introduced in 12.1 (bugs 4450,4451) # earlier versions silently ignore the unrecognized option # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-dangling-pointer) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-dangling-pointer") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-dangling-pointer" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-dangling-pointer") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-dangling-pointer" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-dangling-pointer... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wdangling-pointer) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wdangling-pointer") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wdangling-pointer" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wdangling-pointer") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wdangling-pointer" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wdangling-pointer... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-dangling-pointer" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-dangling-pointer" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wdangling-pointer) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wdangling-pointer) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wdangling-pointer") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wdangling-pointer" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wdangling-pointer") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wdangling-pointer" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wdangling-pointer... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-dangling-pointer" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-dangling-pointer" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wdangling-pointer) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-dangling-pointer) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-use-after-free) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-use-after-free") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-use-after-free" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-use-after-free") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-use-after-free" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-use-after-free... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wuse-after-free) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wuse-after-free") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wuse-after-free" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wuse-after-free") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wuse-after-free" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wuse-after-free... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-use-after-free" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-use-after-free" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wuse-after-free) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wuse-after-free) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wuse-after-free") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wuse-after-free" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wuse-after-free") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wuse-after-free" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wuse-after-free... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-use-after-free" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-use-after-free" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wuse-after-free) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-use-after-free) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi ;; esac # disable -Wformat if unsure we can support it for the printf implementation in use if test -z "$have_c99_format" ; then as_fn_error $? "Internal configure error - Wformat check missing" "$LINENO" 5 elif test "$have_c99_format" = 0 ; then # avoid false warnings # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-format) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-format") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-format") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-format" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-format... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wformat" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wformat" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wformat... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wformat" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wformat") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wformat" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wformat... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-format" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wformat) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-format) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi # disable warnings that should always be off (not supported by our headers) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CXX_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CXX_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CXX_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CXX_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-function" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-value" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # -Wno-unused is not enough to ignore unused params on clang -Wall -Wextra (clang 3.8.1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-parameter) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-parameter") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-parameter" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-parameter") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-parameter" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unused-parameter... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-parameter) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-parameter") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-parameter" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-parameter") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-parameter" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-parameter... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-parameter" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-parameter" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-parameter) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-parameter) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-parameter") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunused-parameter" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunused-parameter") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-parameter" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunused-parameter... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-parameter" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unused-parameter" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunused-parameter) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unused-parameter) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-address) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-address") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-address" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-address") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-address" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-address... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Waddress) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Waddress") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Waddress" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Waddress") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Waddress" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Waddress... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-address" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-address" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Waddress) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Waddress) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Waddress") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Waddress" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Waddress") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Waddress" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Waddress... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-address" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-address" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Waddress) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-address) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) if test "$use_pthreads" != "no" ; then # some crappy pthread mutex implementations generate warnings without -Wno-missing-braces { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy pthread.h mutex initializers" >&5 $as_echo_n "checking for buggy pthread.h mutex initializers... " >&6; } oldCXXFLAGS="$CXXFLAGS" CXXFLAGS="$DEVWARN_CXXFLAGS $CXXFLAGS" # FREEBSD requires the -pthread compiler flag when including pthread.h case "$target_os" in freebsd*) CXXFLAGS="-pthread $CXXFLAGS" ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc < int main(void) { pthread_mutex_t fastmutex = PTHREAD_MUTEX_INITIALIZER; ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.cc $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5 $as_echo "buggy" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-missing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-missing-braces" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-missing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) oldCXXFLAGS="$oldCXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } oldCXXFLAGS="$oldCXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) oldCXXFLAGS="$oldCXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } oldCXXFLAGS="$oldCXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-missing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5 $as_echo "buggy" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-missing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-missing-braces" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-missing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) oldCXXFLAGS="$oldCXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } oldCXXFLAGS="$oldCXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) oldCXXFLAGS="$oldCXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:10) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } oldCXXFLAGS="$oldCXXFLAGS ${gxx_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:10) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-missing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 #bug611: ignore failures here, which may be due to broken/missing pthreads support #AC_MSG_ERROR(failure while checking for buggy pthread.h mutexes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: failure - ignored" >&5 $as_echo "failure - ignored" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) CXXFLAGS="$oldCXXFLAGS" fi case "$target_os" in solaris*) # hide pragma warnings in system header files included by absolute path # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unknown-pragmas) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unknown-pragmas") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unknown-pragmas" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wno-unknown-pragmas") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unknown-pragmas" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wno-unknown-pragmas... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunknown-pragmas) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunknown-pragmas") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunknown-pragmas" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunknown-pragmas") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunknown-pragmas" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunknown-pragmas... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unknown-pragmas" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unknown-pragmas" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunknown-pragmas) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunknown-pragmas) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunknown-pragmas") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wunknown-pragmas" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS ${gxx_flag_prefix}-Wunknown-pragmas") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler flag ${gxx_flag_prefix}-Wunknown-pragmas" >&5 $as_echo_n "checking for C++ compiler flag ${gxx_flag_prefix}-Wunknown-pragmas... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unknown-pragmas" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } CXXFLAGS="$CXXFLAGS ${gxx_flag_prefix}-Wno-unknown-pragmas" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wunknown-pragmas) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CXXFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXFLAG(${gxx_flag_prefix}-Wno-unknown-pragmas) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) esac #GASNET_TRY_CXXFLAG([-ansi -U__STRICT_ANSI__],[[CXX]FLAGS="$[CXX]FLAGS -ansi -U__STRICT_ANSI__"]) MISC_CXXFLAGS="$CXXFLAGS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) ;; *) ;; esac if test "$enabled_dev_warnings" = "no" ; then DEVWARN_CXXFLAGS= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_STR(C++ compiler for PLATFORM_COMPILER_IDSTR,PLATFORM_CXX_IDSTR,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for PLATFORM_COMPILER_IDSTR" >&5 $as_echo_n "checking C++ compiler for PLATFORM_COMPILER_IDSTR... " >&6; } if ${gasnet_cv_PLATFORM_CXX_IDSTR+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_CXX_IDSTR="" _extractstrembed='"$gasnetextractstr: (-(|" PLATFORM_COMPILER_IDSTR "|)-) $"' # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_PLATFORM_CXX_IDSTR=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_IDSTR " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_PLATFORM_CXX_IDSTR" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_PLATFORM_CXX_IDSTR=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_IDSTR " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_CXX_IDSTR" >&5 $as_echo "$gasnet_cv_PLATFORM_CXX_IDSTR" >&6; } if test -n "$gasnet_cv_PLATFORM_CXX_IDSTR" ; then GASNETI_PLATFORM_CXX_IDSTR=$gasnet_cv_PLATFORM_CXX_IDSTR fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_STR(C++ compiler for PLATFORM_COMPILER_IDSTR,PLATFORM_CXX_IDSTR,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_CXX_IDSTR "$GASNETI_PLATFORM_CXX_IDSTR" _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(C++ compiler for PLATFORM_COMPILER_FAMILYID,PLATFORM_CXX_FAMILYID,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for PLATFORM_COMPILER_FAMILYID" >&5 $as_echo_n "checking C++ compiler for PLATFORM_COMPILER_FAMILYID... " >&6; } if ${gasnet_cv_PLATFORM_CXX_FAMILYID+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_CXX_FAMILYID="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_FAMILYID )>0?( PLATFORM_COMPILER_FAMILYID ):-( PLATFORM_COMPILER_FAMILYID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_FAMILYID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_CXX_FAMILYID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_FAMILYID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_PLATFORM_CXX_FAMILYID" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_FAMILYID )>0?( PLATFORM_COMPILER_FAMILYID ):-( PLATFORM_COMPILER_FAMILYID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_FAMILYID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_CXX_FAMILYID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_FAMILYID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_CXX_FAMILYID" >&5 $as_echo "$gasnet_cv_PLATFORM_CXX_FAMILYID" >&6; } if test -n "$gasnet_cv_PLATFORM_CXX_FAMILYID" ; then GASNETI_PLATFORM_CXX_FAMILYID=$gasnet_cv_PLATFORM_CXX_FAMILYID fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(C++ compiler for PLATFORM_COMPILER_FAMILYID,PLATFORM_CXX_FAMILYID,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_CXX_FAMILYID $GASNETI_PLATFORM_CXX_FAMILYID _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(C++ compiler for PLATFORM_COMPILER_ID,PLATFORM_CXX_ID,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for PLATFORM_COMPILER_ID" >&5 $as_echo_n "checking C++ compiler for PLATFORM_COMPILER_ID... " >&6; } if ${gasnet_cv_PLATFORM_CXX_ID+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_CXX_ID="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_ID )>0?( PLATFORM_COMPILER_ID ):-( PLATFORM_COMPILER_ID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_ID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_CXX_ID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_ID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_PLATFORM_CXX_ID" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_ID )>0?( PLATFORM_COMPILER_ID ):-( PLATFORM_COMPILER_ID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_ID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_CXX_ID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_ID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_CXX_ID" >&5 $as_echo "$gasnet_cv_PLATFORM_CXX_ID" >&6; } if test -n "$gasnet_cv_PLATFORM_CXX_ID" ; then GASNETI_PLATFORM_CXX_ID=$gasnet_cv_PLATFORM_CXX_ID fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(C++ compiler for PLATFORM_COMPILER_ID,PLATFORM_CXX_ID,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_CXX_ID $GASNETI_PLATFORM_CXX_ID _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(C++ compiler for PLATFORM_COMPILER_VERSION,PLATFORM_CXX_VERSION,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for PLATFORM_COMPILER_VERSION" >&5 $as_echo_n "checking C++ compiler for PLATFORM_COMPILER_VERSION... " >&6; } if ${gasnet_cv_PLATFORM_CXX_VERSION+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_CXX_VERSION="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_VERSION )>0?( PLATFORM_COMPILER_VERSION ):-( PLATFORM_COMPILER_VERSION )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_VERSION )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_CXX_VERSION=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_VERSION " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_PLATFORM_CXX_VERSION" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_VERSION )>0?( PLATFORM_COMPILER_VERSION ):-( PLATFORM_COMPILER_VERSION )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_VERSION )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_CXX_VERSION=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_VERSION " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_CXX_VERSION" >&5 $as_echo "$gasnet_cv_PLATFORM_CXX_VERSION" >&6; } if test -n "$gasnet_cv_PLATFORM_CXX_VERSION" ; then GASNETI_PLATFORM_CXX_VERSION=$gasnet_cv_PLATFORM_CXX_VERSION fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(C++ compiler for PLATFORM_COMPILER_VERSION,PLATFORM_CXX_VERSION,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_CXX_VERSION $GASNETI_PLATFORM_CXX_VERSION _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(C++ compiler for PLATFORM_COMPILER_CXX_LANGLVL,PLATFORM_CXX_CXX_LANGLVL,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for PLATFORM_COMPILER_CXX_LANGLVL" >&5 $as_echo_n "checking C++ compiler for PLATFORM_COMPILER_CXX_LANGLVL... " >&6; } if ${gasnet_cv_PLATFORM_CXX_CXX_LANGLVL+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_CXX_CXX_LANGLVL="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_CXX_LANGLVL )>0?( PLATFORM_COMPILER_CXX_LANGLVL ):-( PLATFORM_COMPILER_CXX_LANGLVL )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_CXX_LANGLVL )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_CXX_CXX_LANGLVL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_CXX_LANGLVL " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test -z "$gasnet_cv_PLATFORM_CXX_CXX_LANGLVL" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_CXX_LANGLVL )>0?( PLATFORM_COMPILER_CXX_LANGLVL ):-( PLATFORM_COMPILER_CXX_LANGLVL )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_CXX_LANGLVL )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_CXX_CXX_LANGLVL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_CXX_LANGLVL " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_CXX_CXX_LANGLVL" >&5 $as_echo "$gasnet_cv_PLATFORM_CXX_CXX_LANGLVL" >&6; } if test -n "$gasnet_cv_PLATFORM_CXX_CXX_LANGLVL" ; then GASNETI_PLATFORM_CXX_CXX_LANGLVL=$gasnet_cv_PLATFORM_CXX_CXX_LANGLVL fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(C++ compiler for PLATFORM_COMPILER_CXX_LANGLVL,PLATFORM_CXX_CXX_LANGLVL,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_CXX_CXX_LANGLVL $GASNETI_PLATFORM_CXX_CXX_LANGLVL _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) mismatch="" if test -z "$CXX_FAMILY" || test -z "$CC_FAMILY"; then as_fn_error $? "Internal error in ID_OTHER_COMPILER_PLATFORM(CXX)" "$LINENO" 5 elif test x"$CXX_FAMILY" != x"$CC_FAMILY"; then mismatch="families" elif test x"$gasnet_cv_PLATFORM_CXX_VERSION" != x"$gasnet_cv_PLATFORM_COMPILER_VERSION"; then mismatch="version codes" fi if test -n "$mismatch"; then idstr1=`echo "$gasnet_cv_PLATFORM_COMPILER_IDSTR" | $AWK -F'|' '{ printf("%-22s\t%s",$2,$3); }'` idstr2=`echo "$gasnet_cv_PLATFORM_CXX_IDSTR" | $AWK -F'|' '{ printf("%-22s\t%s",$2,$3); }'` # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:2) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The compiler $mismatch of \$CC and \$CXX do not match: CC: $idstr1 CXX: $idstr2 If this is not what you intended, then set \$CXX to select a different C++ compiler." >&5 $as_echo "$as_me: WARNING: The compiler $mismatch of \$CC and \$CXX do not match: CC: $idstr1 CXX: $idstr2 If this is not what you intended, then set \$CXX to select a different C++ compiler." >&2;} echo "The compiler $mismatch of \$CC and \$CXX do not match: CC: $idstr1 CXX: $idstr2 If this is not what you intended, then set \$CXX to select a different C++ compiler." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:2) fi # MISC_CXXFLAGS are added to CXXFLAGS here to ensure they are used for the remaining configure tests, # but they retain a separate identity post-configure CXXFLAGS="$GASNET_OPT_CXXFLAGS $MISC_CXXFLAGS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_CORRECT_OPTIMIZEDDEBUG(...) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_OPTIMIZEDDEBUG(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$enable_debug" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX for debug vs. optimize compilation conflict" >&5 $as_echo_n "checking CXX for debug vs. optimize compilation conflict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CC,"$CXX") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CC" = "" ; then _pushcnt_CC=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CC+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CC_$_pushcnt_CC=\$CC eval _pushedvarset_CC_$_pushcnt_CC=$_gasnet_pushvar_isset _pushcnt_CC=`expr $_pushcnt_CC + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CC="$CXX" echo "pushed new CC value: $CC" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CC,"$CXX") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CXXFLAGS $CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CXXFLAGS $CPPFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CXXFLAGS $CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXX,"$CXX") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CXX" = "" ; then _pushcnt_CXX=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXX+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXX_$_pushcnt_CXX=\$CXX eval _pushedvarset_CXX_$_pushcnt_CXX=$_gasnet_pushvar_isset _pushcnt_CXX=`expr $_pushcnt_CXX + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXX="$CXX" echo "pushed new CXX value: $CXX" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXX,"$CXX") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $CPPFLAGS" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(__OPTIMIZE__) || defined(NDEBUG) choke me #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_result=no else gasnet_result=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_result" >&5 $as_echo "$gasnet_result" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CC) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CC" -ge "1"; then _pushcnt_CC=`expr $_pushcnt_CC - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CC_$_pushcnt_CC if test "$_gasnet_pushvar_isset" = "1" ; then eval CC=\$_pushedvar_CC_$_pushcnt_CC echo "popping CC back to: $CC" >&5 else unset CC echo "popping CC back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CC" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXX) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CXX" -ge "1"; then _pushcnt_CXX=`expr $_pushcnt_CXX - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXX_$_pushcnt_CXX if test "$_gasnet_pushvar_isset" = "1" ; then eval CXX=\$_pushedvar_CXX_$_pushcnt_CXX echo "popping CXX back to: $CXX" >&5 else unset CXX echo "popping CXX back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXX" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXX) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$gasnet_result" = yes; then : old_CXX="$CXX" CXX="$CXX -O0 -UNDEBUG" # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_OPTIMIZEDDEBUG(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$enable_debug" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking CXX for debug vs. optimize compilation conflict" >&5 $as_echo_n "checking CXX for debug vs. optimize compilation conflict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CC,"$CXX") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CC" = "" ; then _pushcnt_CC=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CC+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CC_$_pushcnt_CC=\$CC eval _pushedvarset_CC_$_pushcnt_CC=$_gasnet_pushvar_isset _pushcnt_CC=`expr $_pushcnt_CC + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CC="$CXX" echo "pushed new CC value: $CC" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CC,"$CXX") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CXXFLAGS $CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CXXFLAGS $CPPFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CXXFLAGS $CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXX,"$CXX") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXX" = "" ; then _pushcnt_CXX=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXX+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXX_$_pushcnt_CXX=\$CXX eval _pushedvarset_CXX_$_pushcnt_CXX=$_gasnet_pushvar_isset _pushcnt_CXX=`expr $_pushcnt_CXX + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXX="$CXX" echo "pushed new CXX value: $CXX" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXX,"$CXX") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS $CPPFLAGS" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(__OPTIMIZE__) || defined(NDEBUG) choke me #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_result=no else gasnet_result=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_result" >&5 $as_echo "$gasnet_result" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CC) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CC" -ge "1"; then _pushcnt_CC=`expr $_pushcnt_CC - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CC_$_pushcnt_CC if test "$_gasnet_pushvar_isset" = "1" ; then eval CC=\$_pushedvar_CC_$_pushcnt_CC echo "popping CC back to: $CC" >&5 else unset CC echo "popping CC back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CC" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXX) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXX" -ge "1"; then _pushcnt_CXX=`expr $_pushcnt_CXX - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXX_$_pushcnt_CXX if test "$_gasnet_pushvar_isset" = "1" ; then eval CXX=\$_pushedvar_CXX_$_pushcnt_CXX echo "popping CXX back to: $CXX" >&5 else unset CXX echo "popping CXX back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXX" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXX) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$gasnet_result" = yes; then : echo echo "configure error: User requested --enable-debug but \$CXX has enabled optimization (-O) or disabled assertions (-DNDEBUG). Appending '-O0 -UNDEBUG' to \$CXX did not resolve this conflict. Try setting CXX='$old_CXX ' " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_OPTIMIZEDDEBUG(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Appending '-O0 -UNDEBUG' to \$CXX to resolve debug vs. optimize compilation conflict" >&5 $as_echo "$as_me: WARNING: Appending '-O0 -UNDEBUG' to \$CXX to resolve debug vs. optimize compilation conflict" >&2;} echo "Appending '-O0 -UNDEBUG' to \$CXX to resolve debug vs. optimize compilation conflict" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_OPTIMIZEDDEBUG(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CORRECT_OPTIMIZEDDEBUG(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([cxxLIBS],[],[Libraries to add when linking C++ code]) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --with-cxxlibs was given. if test "${with_cxxlibs+set}" = set; then : withval=$with_cxxlibs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cxxLIBS setting" >&5 $as_echo_n "checking for cxxLIBS setting... " >&6; } envval_src_cxxLIBS="cached" if ${gasnet_cv_envvar_cxxLIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_cxxLIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_cxxLIBS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cxxlibs+set}" = "set" ; then gasnet_cv_envvar_cxxLIBS="${_gasneti_nenv_cxxlibs}" envval_src_cxxLIBS=given elif test "${_gasneti_cenv_cxxlibs+set}" = "set" ; then gasnet_cv_envvar_cxxLIBS="${_gasneti_cenv_cxxlibs}" envval_src_cxxLIBS=conf else gasnet_cv_envvar_cxxLIBS=$envval_default_cxxLIBS envval_src_cxxLIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper cxxLIBS cxxlibs $gasnet_cv_configure_args_norm fi cxxLIBS="$gasnet_cv_envvar_cxxLIBS" if test "$cxxLIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset cxxLIBS if test "$envval_src_cxxLIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_cxxLIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$cxxLIBS\"" >&5 $as_echo " \"$cxxLIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$cxxLIBS\"" >&5 $as_echo " (default) \"$cxxLIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$cxxLIBS\"" >&5 $as_echo " (disabled) \"$cxxLIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$cxxLIBS\"" >&5 $as_echo " (provided) \"$cxxLIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$cxxLIBS\"" >&5 $as_echo " (provided) \"$cxxLIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$cxxLIBS. Please configure --with-cxxLIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([cxxLIBS],[],[Libraries to add when linking C++ code]) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([cxxLDFLAGS],[],[Linker flags to add when linking C++ code]) vvvvvvvvvvvvvvvvvvvvvv (L:2) # Check whether --with-cxxldflags was given. if test "${with_cxxldflags+set}" = set; then : withval=$with_cxxldflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cxxLDFLAGS setting" >&5 $as_echo_n "checking for cxxLDFLAGS setting... " >&6; } envval_src_cxxLDFLAGS="cached" if ${gasnet_cv_envvar_cxxLDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_cxxLDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_cxxLDFLAGS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cxxldflags+set}" = "set" ; then gasnet_cv_envvar_cxxLDFLAGS="${_gasneti_nenv_cxxldflags}" envval_src_cxxLDFLAGS=given elif test "${_gasneti_cenv_cxxldflags+set}" = "set" ; then gasnet_cv_envvar_cxxLDFLAGS="${_gasneti_cenv_cxxldflags}" envval_src_cxxLDFLAGS=conf else gasnet_cv_envvar_cxxLDFLAGS=$envval_default_cxxLDFLAGS envval_src_cxxLDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper cxxLDFLAGS cxxldflags $gasnet_cv_configure_args_norm fi cxxLDFLAGS="$gasnet_cv_envvar_cxxLDFLAGS" if test "$cxxLDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset cxxLDFLAGS if test "$envval_src_cxxLDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_cxxLDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$cxxLDFLAGS\"" >&5 $as_echo " \"$cxxLDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$cxxLDFLAGS\"" >&5 $as_echo " (default) \"$cxxLDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$cxxLDFLAGS\"" >&5 $as_echo " (disabled) \"$cxxLDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$cxxLDFLAGS\"" >&5 $as_echo " (provided) \"$cxxLDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$cxxLDFLAGS\"" >&5 $as_echo " (provided) \"$cxxLDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$cxxLDFLAGS. Please configure --with-cxxLDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([cxxLDFLAGS],[],[Linker flags to add when linking C++ code]) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([cxxLDFLAGS],[cxxLIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:2) eval gasnet_fn_split_linker_opts cxxLDFLAGS cxxLIBS $cxxLDFLAGS $cxxLIBS #echo "cxxLDFLAGS=[$]cxxLDFLAGS" #echo "cxxLIBS=[$]cxxLIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([cxxLDFLAGS],[cxxLIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) GASNET_UDP_LIBS="$GASNET_UDP_LIBS $cxxLIBS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $cxxLDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $cxxLDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $cxxLDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $cxxLIBS") vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $cxxLIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $cxxLIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_WITHCC(for working C++ exceptions,cxx_exceptions,...) vvvvvvvvvvvvvvvvvvvvvv (L:2) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working C++ exceptions,cxx_exceptions,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C++ exceptions" >&5 $as_echo_n "checking for working C++ exceptions... " >&6; } if ${gasnet_cv_cxx_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { try { int *p = new int[10]; throw p; return 1; } catch (int *exn) { if (exn) return 0; else return 2; } ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_cxx_exceptions=yes else gasnet_cv_cxx_exceptions=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_exceptions" >&5 $as_echo "$gasnet_cv_cxx_exceptions" >&6; } if test "$gasnet_cv_cxx_exceptions" = yes; then : else : echo echo "configure error: \"I can\'t figure out how to build and run a program that uses C++ exceptions\" " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working C++ exceptions,cxx_exceptions,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for working C++ exceptions,cxx_exceptions,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C++ exceptions" >&5 $as_echo_n "checking for working C++ exceptions... " >&6; } if ${gasnet_cv_cxx_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void) { try { int *p = new int[10]; throw p; return 1; } catch (int *exn) { if (exn) return 0; else return 2; } return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : gasnet_cv_cxx_exceptions=yes else gasnet_cv_cxx_exceptions=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_exceptions" >&5 $as_echo "$gasnet_cv_cxx_exceptions" >&6; } if test "$gasnet_cv_cxx_exceptions" = yes; then : else : echo echo "configure error: \"I can\'t figure out how to build and run a program that uses C++ exceptions\" " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for working C++ exceptions,cxx_exceptions,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_WITHCC(for working C++ exceptions,cxx_exceptions,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_RESTRICT vvvvvvvvvvvvvvvvvvvvvv (L:2) restrict_keyword="" # Due to xlc/mpcc_r oddity on AIX, we check "__restrict__" before "restrict". # Both ID the same, but xlc accepts either while mpcc_r only takes "__restrict__". if test "$restrict_keyword" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(C++ compiler for __restrict__ keyword,gasneti_cxx__restrict__,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __restrict__ keyword" >&5 $as_echo_n "checking C++ compiler for __restrict__ keyword... " >&6; } if ${gasnet_cv_gasneti_cxx__restrict__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int dummy(void * __restrict__ p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_gasneti_cxx__restrict__=yes else gasnet_cv_gasneti_cxx__restrict__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_cxx__restrict__" >&5 $as_echo "$gasnet_cv_gasneti_cxx__restrict__" >&6; } if test "$gasnet_cv_gasneti_cxx__restrict__" = yes; then : restrict_keyword="__restrict__" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(C++ compiler for __restrict__ keyword,gasneti_cxx__restrict__,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$restrict_keyword" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(C++ compiler for restrict keyword,gasneti_cxxrestrict,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for restrict keyword" >&5 $as_echo_n "checking C++ compiler for restrict keyword... " >&6; } if ${gasnet_cv_gasneti_cxxrestrict+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int dummy(void * restrict p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_gasneti_cxxrestrict=yes else gasnet_cv_gasneti_cxxrestrict=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_cxxrestrict" >&5 $as_echo "$gasnet_cv_gasneti_cxxrestrict" >&6; } if test "$gasnet_cv_gasneti_cxxrestrict" = yes; then : restrict_keyword="restrict" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(C++ compiler for restrict keyword,gasneti_cxxrestrict,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$restrict_keyword" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(C++ compiler for __restrict keyword,gasneti_cxx__restrict,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __restrict keyword" >&5 $as_echo_n "checking C++ compiler for __restrict keyword... " >&6; } if ${gasnet_cv_gasneti_cxx__restrict+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int dummy(void * __restrict p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_gasneti_cxx__restrict=yes else gasnet_cv_gasneti_cxx__restrict=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_cxx__restrict" >&5 $as_echo "$gasnet_cv_gasneti_cxx__restrict" >&6; } if test "$gasnet_cv_gasneti_cxx__restrict" = yes; then : restrict_keyword="__restrict" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(C++ compiler for __restrict keyword,gasneti_cxx__restrict,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi cat >>confdefs.h <<_ACEOF #define GASNETI_CXX_RESTRICT $restrict_keyword _ACEOF restrict_on_typedefs=0 # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(C++ compiler for restrict qualifying typedefs,gasneti_cxx_restrict_typedefs,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for restrict qualifying typedefs" >&5 $as_echo_n "checking C++ compiler for restrict qualifying typedefs... " >&6; } if ${gasnet_cv_gasneti_cxx_restrict_typedefs+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef void *foo_t; int dummy(foo_t GASNETI_CXX_RESTRICT p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_gasneti_cxx_restrict_typedefs=yes else gasnet_cv_gasneti_cxx_restrict_typedefs=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_cxx_restrict_typedefs" >&5 $as_echo "$gasnet_cv_gasneti_cxx_restrict_typedefs" >&6; } if test "$gasnet_cv_gasneti_cxx_restrict_typedefs" = yes; then : restrict_on_typedefs=1 else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(C++ compiler for restrict qualifying typedefs,gasneti_cxx_restrict_typedefs,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) cat >>confdefs.h <<_ACEOF #define GASNETI_CXX_RESTRICT_MAY_QUALIFY_TYPEDEFS $restrict_on_typedefs _ACEOF # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_RESTRICT ^^^^^^^^^^^^^^^^^^^^^^ (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_ASM_SUPPORT(C++ compiler,CXX) vvvvvvvvvvvvvvvvvvvvvv (L:2) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$CXXFLAGS -I$TOP_SRCDIR/other" echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) case "$CXX_FAMILY" in Sun) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C++ compiler for simple inline asm() support,cxx_simple_asm,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for simple inline asm() support" >&5 $as_echo_n "checking C++ compiler for simple inline asm() support... " >&6; } if ${gasnet_cv_cxx_simple_asm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { asm("nop"); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_cxx_simple_asm=yes else gasnet_cv_cxx_simple_asm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_simple_asm" >&5 $as_echo "$gasnet_cv_cxx_simple_asm" >&6; } if test "$gasnet_cv_cxx_simple_asm" = yes; then : $as_echo "#define GASNETI_HAVE_CXX_SIMPLE_ASM 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C++ compiler for simple inline asm() support,cxx_simple_asm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # We lack a reliable configure probe to diagnose broken GCC inline asm support on Sun C # We only know 5.12 and newer on x86/x86-64 are reliable (see bug 2941) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C++ compiler for GCC inline asm support,cxx_gcc_asm,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for GCC inline asm support" >&5 $as_echo_n "checking C++ compiler for GCC inline asm support... " >&6; } if ${gasnet_cv_cxx_gcc_asm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "gasnet_portable_platform.h" int main () { #if (PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64) && PLATFORM_COMPILER_VERSION_GE(5,12,0) __asm__ __volatile__ ("lock; addl \$0,0(%%esp)" : : : "memory", "cc"); #else #error Support has not been verified #endif ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_cxx_gcc_asm=yes else gasnet_cv_cxx_gcc_asm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_gcc_asm" >&5 $as_echo "$gasnet_cv_cxx_gcc_asm" >&6; } if test "$gasnet_cv_cxx_gcc_asm" = yes; then : $as_echo "#define GASNETI_HAVE_CXX_GCC_ASM 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C++ compiler for GCC inline asm support,cxx_gcc_asm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; XLC) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GCC_ASM(C++ compiler,CXX) vvvvvvvvvvvvvvvvvvvvvv (L:3) case "$target_cpu" in # TODO: expand as this becomes reachable on other CPUs rs6000|powerpc*) gcc_asm_string='"sync"';; *) as_fn_error $? "Internal error - GASNET_CHECK_GCC_ASM called for unknown architecture" "$LINENO" 5 ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C++ compiler for GCC inline asm support,cxx_gcc_asm,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for GCC inline asm support" >&5 $as_echo_n "checking C++ compiler for GCC inline asm support... " >&6; } if ${gasnet_cv_cxx_gcc_asm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__ __volatile__ ($gcc_asm_string); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_cxx_gcc_asm=yes else gasnet_cv_cxx_gcc_asm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_gcc_asm" >&5 $as_echo "$gasnet_cv_cxx_gcc_asm" >&6; } if test "$gasnet_cv_cxx_gcc_asm" = yes; then : $as_echo "#define GASNETI_HAVE_CXX_GCC_ASM 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C++ compiler for GCC inline asm support,cxx_gcc_asm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; GNU|Intel|Pathscale|Open64|Clang|NVHPC|PGI|TINY) # Currently believe all of these support GCC-style inline ASM on all CPUs # where we use it. If that is ever *not* the case then one should split # off the case for the relevant compiler and apply banlists or probes. # NOTE: be sure to keep gasnet_asm.h in-sync with any changes made here. $as_echo "#define GASNETI_HAVE_CXX_GCC_ASM 1" >>confdefs.h ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C++ compiler for 32-bit __sync atomics support,cxx_sync_atomics_32,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for 32-bit __sync atomics support" >&5 $as_echo_n "checking C++ compiler for 32-bit __sync atomics support... " >&6; } if ${gasnet_cv_cxx_sync_atomics_32+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "portable_inttypes.h" int main () { struct { volatile uint32_t ctr; } x = { 2 }; uint32_t op = 1; uint32_t oval = 2; uint32_t nval = 3; volatile uint32_t result; result = __sync_bool_compare_and_swap(&(x.ctr), oval, nval) + __sync_val_compare_and_swap(&(x.ctr), nval, oval) + __sync_fetch_and_add(&(x.ctr), op); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_cxx_sync_atomics_32=yes else gasnet_cv_cxx_sync_atomics_32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_sync_atomics_32" >&5 $as_echo "$gasnet_cv_cxx_sync_atomics_32" >&6; } if test "$gasnet_cv_cxx_sync_atomics_32" = yes; then : $as_echo "#define GASNETI_HAVE_CXX_SYNC_ATOMICS_32 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C++ compiler for 32-bit __sync atomics support,cxx_sync_atomics_32,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C++ compiler for 64-bit __sync atomics support,cxx_sync_atomics_64,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for 64-bit __sync atomics support" >&5 $as_echo_n "checking C++ compiler for 64-bit __sync atomics support... " >&6; } if ${gasnet_cv_cxx_sync_atomics_64+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "portable_inttypes.h" int main () { struct { volatile uint64_t ctr; } x = { 2 }; uint64_t op = 1; uint64_t oval = 2; uint64_t nval = 3; volatile uint64_t result; result = __sync_bool_compare_and_swap(&(x.ctr), oval, nval) + __sync_val_compare_and_swap(&(x.ctr), nval, oval) + __sync_fetch_and_add(&(x.ctr), op); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_cxx_sync_atomics_64=yes else gasnet_cv_cxx_sync_atomics_64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_sync_atomics_64" >&5 $as_echo "$gasnet_cv_cxx_sync_atomics_64" >&6; } if test "$gasnet_cv_cxx_sync_atomics_64" = yes; then : $as_echo "#define GASNETI_HAVE_CXX_SYNC_ATOMICS_64 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C++ compiler for 64-bit __sync atomics support,cxx_sync_atomics_64,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_ASM_SUPPORT ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__always_inline__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__always_inline__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__always_inline__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_alwaysinline+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_alwaysinline='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_alwaysinline='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_alwaysinline='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_alwaysinline='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_alwaysinline='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_alwaysinline" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_alwaysinline" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_alwaysinline" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_ALWAYSINLINE 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_ALWAYSINLINE 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__always_inline__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__noinline__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__noinline__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__noinline__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_noinline+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_noinline='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_noinline='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_noinline='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_noinline='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_noinline='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_noinline" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_noinline" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_noinline" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_NOINLINE 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_NOINLINE 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__noinline__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__malloc__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__malloc__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__malloc__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_malloc+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc < __attribute__((__malloc__)) void * dummy(void) { return malloc(14); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.cc $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:6) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_malloc='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_malloc='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_malloc='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_malloc='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_malloc='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_malloc" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_malloc" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_malloc" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_MALLOC 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_MALLOC 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__malloc__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__warn_unused_result__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__warn_unused_result__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__warn_unused_result__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_warnunusedresult+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_warnunusedresult='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_warnunusedresult='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_warnunusedresult='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_warnunusedresult='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_warnunusedresult='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_warnunusedresult" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_warnunusedresult" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_warnunusedresult" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_WARNUNUSEDRESULT 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_WARNUNUSEDRESULT 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__warn_unused_result__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__used__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__used__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__used__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_used+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc < __attribute__((__used__)) void dummy(void) { abort(); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.cc $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:6) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_used='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_used='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_used='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_used='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_used='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_used" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_used" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_used" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_USED 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_USED 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__used__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__may_alias__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__may_alias__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__may_alias__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_mayalias+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_mayalias='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_mayalias='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_mayalias='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_mayalias='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_mayalias='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_mayalias" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_mayalias" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_mayalias" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_MAYALIAS 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_MAYALIAS 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__may_alias__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__noreturn__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__noreturn__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__noreturn__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_noreturn+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc < __attribute__((__noreturn__)) void dummy(void) { abort(); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.cc $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:6) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_noreturn='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_noreturn='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_noreturn='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_noreturn='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_noreturn='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_noreturn" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_noreturn" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_noreturn" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_NORETURN 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_NORETURN 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__noreturn__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__const__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__const__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__const__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_const+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_const='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_const='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_const='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_const='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_const='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_const" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_const" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_const" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_CONST 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_CONST 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__const__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__pure__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__pure__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__pure__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_pure+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_pure='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_pure='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_pure='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_pure='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_pure='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_pure" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_pure" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_pure" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_PURE 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_PURE 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__pure__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__hot__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__hot__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__hot__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_hot+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_hot='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_hot='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_hot='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_hot='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_hot='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_hot" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_hot" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_hot" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_HOT 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_HOT 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__hot__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__cold__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__cold__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__cold__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_cold+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_cold='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_cold='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_cold='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_cold='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_cold='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_cold" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_cold" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_cold" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_COLD 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_COLD 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__cold__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__deprecated__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__deprecated__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__deprecated__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_deprecated+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_deprecated='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_deprecated='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_deprecated='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_deprecated='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_deprecated='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_deprecated" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_deprecated" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_deprecated" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_DEPRECATED 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_DEPRECATED 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__deprecated__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__common__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__common__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__common__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_common+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_common='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_common='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_common='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_common='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_common='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_common" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_common" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_common" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_COMMON 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_COMMON 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__common__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__fallthrough__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__fallthrough__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__fallthrough__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_fallthrough+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_fallthrough='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_fallthrough='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_fallthrough='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_fallthrough='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_fallthrough='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_fallthrough" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_fallthrough" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_fallthrough" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_FALLTHROUGH 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_FALLTHROUGH 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__fallthrough__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__format__) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__format__))" >&5 $as_echo_n "checking C++ compiler for __attribute__((__format__))... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_format+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc < __attribute__((__format__ (__printf__, 1, 2))) void dummy(const char *fmt,...) { va_list argptr; va_start(argptr, fmt); va_end(argptr); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.cc $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:6) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_format='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_format='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_format='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_format='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_format='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_format" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_format" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_format" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,__format__) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__format__)) on function pointers" >&5 $as_echo_n "checking C++ compiler for __attribute__((__format__)) on function pointers... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_format_funcptr+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_format_funcptr='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_format_funcptr='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_format_funcptr='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_format_funcptr='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_format_funcptr='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_format_funcptr" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_format_funcptr" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_format_funcptr" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT_FUNCPTR 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT_FUNCPTR 0" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __attribute__((__format__)) on function pointers as arguments" >&5 $as_echo_n "checking C++ compiler for __attribute__((__format__)) on function pointers as arguments... " >&6; } if ${gasnet_cv_gasneti_have_cxx_attr_format_funcptr_arg+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_attr_format_funcptr_arg='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_format_funcptr_arg='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_attr_format_funcptr_arg='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_attr_format_funcptr_arg='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_attr_format_funcptr_arg='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_attr_format_funcptr_arg" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_attr_format_funcptr_arg" >&6; } if test "$gasnet_cv_gasneti_have_cxx_attr_format_funcptr_arg" = yes; then $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT_FUNCPTR_ARG 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT_FUNCPTR_ARG 0" >>confdefs.h fi # bug 3613: try to enable any warning settings that might be relevant to -Wunknown-pragmas # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) _gasnet_CPPFLAGS_back="$CPPFLAGS" for flag in '-Wall' '-Wextra' '-Wunknown-pragmas' ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler flag $flag" >&5 $as_echo_n "checking for compiler flag $flag... " >&6; } CPPFLAGS="$CPPFLAGS $flag" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; _gasnet_CPPFLAGS_back="$CPPFLAGS" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; CPPFLAGS="$_gasnet_CPPFLAGS_back" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; _gasnet_CPPFLAGS_back="$CPPFLAGS" else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; CPPFLAGS="$_gasnet_CPPFLAGS_back" fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; CPPFLAGS="$_gasnet_CPPFLAGS_back" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) done { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for pragma GCC diagnostic push/pop/ignored" >&5 $as_echo_n "checking C++ compiler for pragma GCC diagnostic push/pop/ignored... " >&6; } if ${gasnet_cv_gasneti_have_cxx_pragma_gcc_diagnostic+:} false; then : $as_echo_n "(cached) " >&6 else # Note we're not checking whether the pragma actually *does* anything, # we only care that it doesn't generate new warnings, ie silently ignored is fine for our purposes # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_pragma_gcc_diagnostic='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_pragma_gcc_diagnostic='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_pragma_gcc_diagnostic='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_pragma_gcc_diagnostic='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_pragma_gcc_diagnostic='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_pragma_gcc_diagnostic" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_pragma_gcc_diagnostic" >&6; } if test "$gasnet_cv_gasneti_have_cxx_pragma_gcc_diagnostic" = yes; then $as_echo "#define GASNETI_HAVE_CXX_PRAGMA_GCC_DIAGNOSTIC 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_PRAGMA_GCC_DIAGNOSTIC 0" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_CXX11_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,fallthrough) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for C++ attribute [[fallthrough]]" >&5 $as_echo_n "checking C++ compiler for C++ attribute [[fallthrough]]... " >&6; } if ${gasnet_cv_gasneti_have_cxx_cppattr_fallthrough+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_cppattr_fallthrough='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_cppattr_fallthrough='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_cppattr_fallthrough='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_cppattr_fallthrough='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_cppattr_fallthrough='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_cppattr_fallthrough" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_cppattr_fallthrough" >&6; } if test "$gasnet_cv_gasneti_have_cxx_cppattr_fallthrough" = yes; then $as_echo "#define GASNETI_HAVE_CXX_CXX11_ATTRIBUTE_FALLTHROUGH 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_CXX11_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_CXX11_ATTRIBUTE_FALLTHROUGH 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_CXX11_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,fallthrough) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_CXX11_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,clang::fallthrough) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for C++ attribute [[clang::fallthrough]]" >&5 $as_echo_n "checking C++ compiler for C++ attribute [[clang::fallthrough]]... " >&6; } if ${gasnet_cv_gasneti_have_cxx_cppattr_clang__fallthrough+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_cxx_cppattr_clang__fallthrough='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_cppattr_clang__fallthrough='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then gasnet_cv_gasneti_have_cxx_cppattr_clang__fallthrough='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_cxx_cppattr_clang__fallthrough='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CXXCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_cxx_cppattr_clang__fallthrough='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CXXCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx_cppattr_clang__fallthrough" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx_cppattr_clang__fallthrough" >&6; } if test "$gasnet_cv_gasneti_have_cxx_cppattr_clang__fallthrough" = yes; then $as_echo "#define GASNETI_HAVE_CXX_CXX11_ATTRIBUTE_CLANG__FALLTHROUGH 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_CXX_CXX11_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_CXX_CXX11_ATTRIBUTE_CLANG__FALLTHROUGH 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_CXX11_ATTRIBUTE(GASNETI_HAVE_CXX,C++ compiler,clang::fallthrough) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_BUILTINS vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C++ compiler for __assume,gasneti_have_cxx__assume,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __assume" >&5 $as_echo_n "checking C++ compiler for __assume... " >&6; } if ${gasnet_cv_gasneti_have_cxx__assume+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { __assume(x == 0); if (x) __assume(0); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cxx__assume=yes else gasnet_cv_gasneti_have_cxx__assume=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx__assume" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx__assume" >&6; } if test "$gasnet_cv_gasneti_have_cxx__assume" = yes; then : $as_echo "#define GASNETI_HAVE_CXX_ASSUME 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C++ compiler for __assume,gasneti_have_cxx__assume,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C++ compiler for __builtin_assume,gasneti_have_cxx__builtin_assume,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __builtin_assume" >&5 $as_echo_n "checking C++ compiler for __builtin_assume... " >&6; } if ${gasnet_cv_gasneti_have_cxx__builtin_assume+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { __builtin_assume(x == 0); if (x) __builtin_assume(0); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cxx__builtin_assume=yes else gasnet_cv_gasneti_have_cxx__builtin_assume=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx__builtin_assume" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx__builtin_assume" >&6; } if test "$gasnet_cv_gasneti_have_cxx__builtin_assume" = yes; then : $as_echo "#define GASNETI_HAVE_CXX_BUILTIN_ASSUME 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C++ compiler for __builtin_assume,gasneti_have_cxx__builtin_assume,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C++ compiler for __builtin_unreachable,gasneti_have_cxx__builtin_unreachable,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __builtin_unreachable" >&5 $as_echo_n "checking C++ compiler for __builtin_unreachable... " >&6; } if ${gasnet_cv_gasneti_have_cxx__builtin_unreachable+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { if (x) { __builtin_unreachable(), ((void)0); } ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cxx__builtin_unreachable=yes else gasnet_cv_gasneti_have_cxx__builtin_unreachable=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx__builtin_unreachable" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx__builtin_unreachable" >&6; } if test "$gasnet_cv_gasneti_have_cxx__builtin_unreachable" = yes; then : $as_echo "#define GASNETI_HAVE_CXX_BUILTIN_UNREACHABLE 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C++ compiler for __builtin_unreachable,gasneti_have_cxx__builtin_unreachable,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C++ compiler for __builtin_expect,gasneti_have_cxx__builtin_expect,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __builtin_expect" >&5 $as_echo_n "checking C++ compiler for __builtin_expect... " >&6; } if ${gasnet_cv_gasneti_have_cxx__builtin_expect+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { if (__builtin_expect(x,1)) return 1; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cxx__builtin_expect=yes else gasnet_cv_gasneti_have_cxx__builtin_expect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx__builtin_expect" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx__builtin_expect" >&6; } if test "$gasnet_cv_gasneti_have_cxx__builtin_expect" = yes; then : $as_echo "#define GASNETI_HAVE_CXX_BUILTIN_EXPECT 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C++ compiler for __builtin_expect,gasneti_have_cxx__builtin_expect,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C++ compiler for __builtin_constant_p,gasneti_have_cxx__builtin_constant_p,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __builtin_constant_p" >&5 $as_echo_n "checking C++ compiler for __builtin_constant_p... " >&6; } if ${gasnet_cv_gasneti_have_cxx__builtin_constant_p+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { x = __builtin_constant_p(x) + __builtin_constant_p(2); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cxx__builtin_constant_p=yes else gasnet_cv_gasneti_have_cxx__builtin_constant_p=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx__builtin_constant_p" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx__builtin_constant_p" >&6; } if test "$gasnet_cv_gasneti_have_cxx__builtin_constant_p" = yes; then : $as_echo "#define GASNETI_HAVE_CXX_BUILTIN_CONSTANT_P 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C++ compiler for __builtin_constant_p,gasneti_have_cxx__builtin_constant_p,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(C++ compiler for __builtin_prefetch,gasneti_have_cxx__builtin_prefetch,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ compiler for __builtin_prefetch" >&5 $as_echo_n "checking C++ compiler for __builtin_prefetch... " >&6; } if ${gasnet_cv_gasneti_have_cxx__builtin_prefetch+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { __builtin_prefetch(&x,0); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_gasneti_have_cxx__builtin_prefetch=yes else gasnet_cv_gasneti_have_cxx__builtin_prefetch=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_cxx__builtin_prefetch" >&5 $as_echo "$gasnet_cv_gasneti_have_cxx__builtin_prefetch" >&6; } if test "$gasnet_cv_gasneti_have_cxx__builtin_prefetch" = yes; then : $as_echo "#define GASNETI_HAVE_CXX_BUILTIN_PREFETCH 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(C++ compiler for __builtin_prefetch,gasneti_have_cxx__builtin_prefetch,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_BUILTINS ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for __VA_ARGS__ support in C++,cxx_va_args,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__ support in C++" >&5 $as_echo_n "checking for __VA_ARGS__ support in C++... " >&6; } if ${gasnet_cv_cxx_va_args+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define GASNETI_AMNUMARGS(...) GASNETI_AMNUMARGS_(__VA_ARGS__,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0) #define GASNETI_AMNUMARGS_(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,N,...) N int b[GASNETI_AMNUMARGS(1)+1]; int c[GASNETI_AMNUMARGS(1,2)+1]; int d[GASNETI_AMNUMARGS(1,2,3)+1]; int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gasnet_cv_cxx_va_args=yes else gasnet_cv_cxx_va_args=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_va_args" >&5 $as_echo "$gasnet_cv_cxx_va_args" >&6; } if test "$gasnet_cv_cxx_va_args" = yes; then : $as_echo "#define GASNETI_CXX_HAS_VA_ARGS 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for __VA_ARGS__ support in C++,cxx_va_args,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # we link in an object compiled with CC that uses libc, to ensure that's working # [at least initially this is almost a clone of the MPI helper test] { $as_echo "$as_me:${as_lineno-$LINENO}: checking building C++ helper object" >&5 $as_echo_n "checking building C++ helper object... " >&6; } cat >$LINKHELPER_SRC <<_GASNET_EOF #include #include #include #include int linkhelper_cint = 0xFFFF; $LINKHELPER_TLS_DECL extern void linkhelper_cfunc(int val) { char s[255], s2[255]; int a[40] = {1}; /* trigger Intel C issue */ assert(val == linkhelper_cint); s[4] = '\0'; s[5] = (char)(sin((double)val)+cos((double)val))+sqrt((double)val)+log((double)val); strcpy(s2, s); memcpy(s2, s, strlen(s)); memmove(s2, s, strlen(s)); memcpy(s2, s, 4); memmove(s2, s, 4); $LINKHELPER_TLS_CODE } _GASNET_EOF compile="$CC $CFLAGS $CPPFLAGS -c $LINKHELPER_SRC -o $LINKHELPER_OBJ" eval echo "$compile" >&5 if eval $compile 2>&5 && test -s $LINKHELPER_OBJ ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else echo echo "configure error: failed while building C++ helper object" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # Now try to link/run the helper (which was built earlier) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LINKHELPER_LIBS $LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LINKHELPER_LIBS $LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LINKHELPER_LIBS $LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_WITHCC(for working C++ to C linkage,cxx_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working C++ to C linkage,cxx_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C++ to C linkage" >&5 $as_echo_n "checking for working C++ to C linkage... " >&6; } if ${gasnet_cv_cxx_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus extern "C" { #endif $LINKHELPER_DECL #ifdef __cplusplus } #endif int main () { $LINKHELPER_CODE ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_cxx_works=yes else gasnet_cv_cxx_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_works" >&5 $as_echo "$gasnet_cv_cxx_works" >&6; } if test "$gasnet_cv_cxx_works" = yes; then : cxx_helper_worked=yes else : cxx_helper_worked=no; if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working C++ to C linkage,cxx_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for working C++ to C linkage,cxx_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C++ to C linkage" >&5 $as_echo_n "checking for working C++ to C linkage... " >&6; } if ${gasnet_cv_cxx_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus extern "C" { #endif $LINKHELPER_DECL #ifdef __cplusplus } #endif int main(void) { $LINKHELPER_CODE return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : gasnet_cv_cxx_works=yes else gasnet_cv_cxx_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_works" >&5 $as_echo "$gasnet_cv_cxx_works" >&6; } if test "$gasnet_cv_cxx_works" = yes; then : cxx_helper_worked=yes else : cxx_helper_worked=no; if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for working C++ to C linkage,cxx_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_WITHCC(for working C++ to C linkage,cxx_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # Apple's gcc/g++ don't provide TLS support, but the FSF gcc/g++ do. # The two are link compatible IF we explicitly pass -lgcc_eh # XXX: Really only needed for PAR and PARSYNC, but we don't distinguish. if test "$cxx_helper_worked$have_tls$CC_FAMILY" = noyesGNU; then LIBS="$LIBS $LIBGCC -lgcc_eh" # $LIBGCC appears in $GASNET_LIBS eventually # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LINKHELPER_LIBS $LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LINKHELPER_LIBS $LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LINKHELPER_LIBS $LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_WITHCC(for working C++ to C linkage w/ added -lgcc_eh,cxx_works_gcc_eh,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working C++ to C linkage w/ added -lgcc_eh,cxx_works_gcc_eh,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C++ to C linkage w/ added -lgcc_eh" >&5 $as_echo_n "checking for working C++ to C linkage w/ added -lgcc_eh... " >&6; } if ${gasnet_cv_cxx_works_gcc_eh+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus extern "C" { #endif $LINKHELPER_DECL #ifdef __cplusplus } #endif int main () { $LINKHELPER_CODE ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gasnet_cv_cxx_works_gcc_eh=yes else gasnet_cv_cxx_works_gcc_eh=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_works_gcc_eh" >&5 $as_echo "$gasnet_cv_cxx_works_gcc_eh" >&6; } if test "$gasnet_cv_cxx_works_gcc_eh" = yes; then : cxx_helper_worked=yes GASNET_UDP_LIBS="$GASNET_UDP_LIBS -lgcc_eh" else : cxx_helper_worked=no; if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working C++ to C linkage w/ added -lgcc_eh,cxx_works_gcc_eh,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for working C++ to C linkage w/ added -lgcc_eh,cxx_works_gcc_eh,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C++ to C linkage w/ added -lgcc_eh" >&5 $as_echo_n "checking for working C++ to C linkage w/ added -lgcc_eh... " >&6; } if ${gasnet_cv_cxx_works_gcc_eh+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus extern "C" { #endif $LINKHELPER_DECL #ifdef __cplusplus } #endif int main(void) { $LINKHELPER_CODE return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : gasnet_cv_cxx_works_gcc_eh=yes else gasnet_cv_cxx_works_gcc_eh=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cxx_works_gcc_eh" >&5 $as_echo "$gasnet_cv_cxx_works_gcc_eh" >&6; } if test "$gasnet_cv_cxx_works_gcc_eh" = yes; then : cxx_helper_worked=yes GASNET_UDP_LIBS="$GASNET_UDP_LIBS -lgcc_eh" else : cxx_helper_worked=no; if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for working C++ to C linkage w/ added -lgcc_eh,cxx_works_gcc_eh,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_WITHCC(for working C++ to C linkage w/ added -lgcc_eh,cxx_works_gcc_eh,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi if test "$cxx_helper_worked" = no; then have_cxx=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your C++ and C compilers are not link-compatible" >&5 $as_echo "$as_me: WARNING: It appears your C++ and C compilers are not link-compatible" >&2;} echo "It appears your C++ and C compilers are not link-compatible" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi rm -f $LINKHELPER_SRC $LINKHELPER_OBJ # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$have_cxx" = yes; then HAVE_CXX_TRUE= HAVE_CXX_FALSE='#' else HAVE_CXX_TRUE='#' HAVE_CXX_FALSE= fi if test "$have_cxx" = no; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling udp-conduit, which requires C++" >&5 $as_echo "$as_me: WARNING: Disabling udp-conduit, which requires C++" >&2;} echo "Disabling udp-conduit, which requires C++" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi #--------------------------------------------------------------------------------------------------------------- # CONDUIT CONFIGURATIONS #--------------------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------------------- # UDP/AMUDP Configuration # bug 1946: prevent confusing cross-conduit error messages rm -f gasnet_errsave_file gasnet_errsave_err _conduit_list_udp=yes # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(udp,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --enable-udp was given. if test "${enable_udp+set}" = set; then : enableval=$enable_udp; fi case "$enable_udp" in no) : enabled_udp=no; _conduit_reason_udp=disabled ;; yes) : enabled_udp=yes;force_udp=yes; _conduit_reason_udp=enabled ;; *) : if test "$enable_udp" = "probe" ; then # --enable-conduit=probe overrides --disable-auto-conduit-detect enabled_udp=yes; _conduit_reason_udp=auto else # default enabled_udp=$enabled_auto_detect;_conduit_reason_udp=$_conduit_auto_reason fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(udp,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$enabled_udp" = yes; then if test "$have_cxx" = yes; then # detect libraries necessary for udp-* backends # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_udp=yes else have_udp=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_gethostbyname=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_gethostbyname+:} false; then : break fi done if ${ac_cv_search_gethostbyname+:} false; then : else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else have_udp=no fi GASNET_UDP_LIBS="$GASNET_UDP_LIBS $LIBS" # Note: getifaddrs may need -lsocket and -lnsl, but we caught those above for ac_header in ifaddrs.h do : ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" if test "x$ac_cv_header_ifaddrs_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IFADDRS_H 1 _ACEOF fi done for ac_func in getifaddrs do : ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" if test "x$ac_cv_func_getifaddrs" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETIFADDRS 1 _ACEOF fi done if test "$have_udp" = yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working UDP configuration" >&5 $as_echo_n "checking for working UDP configuration... " >&6; } # TODO: add a basic test of the UDP configuration to make sure it works # this is a mess because every OS has different headers required udp_test_worked=yes if test "$udp_test_worked" = yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: build test failed: I don't know how to build UDP programs on your system" >&5 $as_echo "$as_me: WARNING: build test failed: I don't know how to build UDP programs on your system" >&2;} echo "build test failed: I don't know how to build UDP programs on your system" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) have_udp=no fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$have_udp" = yes ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([GASNET_CSPAWN_CMD],[""],[See udp-conduit/README]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-gasnet-cspawn-cmd was given. if test "${with_gasnet_cspawn_cmd+set}" = set; then : withval=$with_gasnet_cspawn_cmd; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GASNET_CSPAWN_CMD setting" >&5 $as_echo_n "checking for GASNET_CSPAWN_CMD setting... " >&6; } envval_src_GASNET_CSPAWN_CMD="cached" if ${gasnet_cv_envvar_GASNET_CSPAWN_CMD+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_GASNET_CSPAWN_CMD="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_GASNET_CSPAWN_CMD="""" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_gasnetcspawncmd+set}" = "set" ; then gasnet_cv_envvar_GASNET_CSPAWN_CMD="${_gasneti_nenv_gasnetcspawncmd}" envval_src_GASNET_CSPAWN_CMD=given elif test "${_gasneti_cenv_gasnetcspawncmd+set}" = "set" ; then gasnet_cv_envvar_GASNET_CSPAWN_CMD="${_gasneti_cenv_gasnetcspawncmd}" envval_src_GASNET_CSPAWN_CMD=conf else gasnet_cv_envvar_GASNET_CSPAWN_CMD=$envval_default_GASNET_CSPAWN_CMD envval_src_GASNET_CSPAWN_CMD=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper GASNET_CSPAWN_CMD gasnetcspawncmd $gasnet_cv_configure_args_norm fi GASNET_CSPAWN_CMD="$gasnet_cv_envvar_GASNET_CSPAWN_CMD" if test "$GASNET_CSPAWN_CMD" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset GASNET_CSPAWN_CMD if test "$envval_src_GASNET_CSPAWN_CMD" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_GASNET_CSPAWN_CMD" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$GASNET_CSPAWN_CMD\"" >&5 $as_echo " \"$GASNET_CSPAWN_CMD\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$GASNET_CSPAWN_CMD\"" >&5 $as_echo " (default) \"$GASNET_CSPAWN_CMD\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$GASNET_CSPAWN_CMD\"" >&5 $as_echo " (disabled) \"$GASNET_CSPAWN_CMD\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$GASNET_CSPAWN_CMD\"" >&5 $as_echo " (provided) \"$GASNET_CSPAWN_CMD\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$GASNET_CSPAWN_CMD\"" >&5 $as_echo " (provided) \"$GASNET_CSPAWN_CMD\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$GASNET_CSPAWN_CMD. Please configure --with-GASNET_CSPAWN_CMD=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([GASNET_CSPAWN_CMD],[""],[See udp-conduit/README]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$GASNET_CSPAWN_CMD" != "" ; then cat >>confdefs.h <<_ACEOF #define GASNET_CSPAWN_CMD "$GASNET_CSPAWN_CMD" _ACEOF fi fi else have_udp=no fi fi _conduit_enabled_udp=no if test "$gasnet_toolsonly_mode" = "no" ; then if test "$enabled_udp$have_udp" = yesyes; then case "yes" in no) ;; g1) if test "$force_udp" = yes ; then echo echo "configure error: It appears your system has the required support for udp-conduit, however udp-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-udp " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else # warn and disable enabled_udp=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for udp-conduit, however udp-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-udp " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for udp-conduit, however udp-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-udp " >&2;} echo "It appears your system has the required support for udp-conduit, however udp-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-udp " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi ;; exp) if test "$force_udp" = yes || test "$enable_udp" = "probe" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: udp-conduit is still experimental, and may have performance and correctness bugs." >&5 $as_echo "$as_me: WARNING: udp-conduit is still experimental, and may have performance and correctness bugs." >&2;} echo "udp-conduit is still experimental, and may have performance and correctness bugs." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) _conduit_enabled_udp=yes else # warn and disable enabled_udp=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for udp-conduit. However, udp-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-udp. Otherwise, you can disable this message with --disable-udp " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for udp-conduit. However, udp-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-udp. Otherwise, you can disable this message with --disable-udp " >&2;} echo "It appears your system has the required support for udp-conduit. However, udp-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-udp. Otherwise, you can disable this message with --disable-udp " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi ;; yes) _conduit_enabled_udp=yes ;; esac else if test "$force_udp" = yes ; then echo echo "configure error: User requested --enable-udp but I don't know how to build udp programs for your system" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "$_conduit_reason_udp" = "auto" ; then _conduit_reason_udp="not found" fi fi if test "$_conduit_enabled_udp" = "yes" ; then _conduit_flagstr="ON ($_conduit_reason_udp)" else _conduit_flagstr="OFF ($_conduit_reason_udp)" fi _conduit_desc_udp=" Portable UDP/IP conduit (udp) $_conduit_flagstr" fi if test "$enabled_udp$have_udp" = yesyes; then USE_UDP_CONDUIT_TRUE= USE_UDP_CONDUIT_FALSE='#' else USE_UDP_CONDUIT_TRUE='#' USE_UDP_CONDUIT_FALSE= fi #--------------------------------------------------------------------------------------------------------------- # MPI/AMMPI Configuration # --enable-mpi-compat controls MPI compatibility in all conduits # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(mpi-compat,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --enable-mpi-compat was given. if test "${enable_mpi_compat+set}" = set; then : enableval=$enable_mpi_compat; fi case "$enable_mpi_compat" in no) : enabled_mpi_compat=no ;; yes) : enabled_mpi_compat=yes;force_mpi_compat=yes ;; *) : enabled_mpi_compat=yes ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(mpi-compat,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # --enable-mpi controls mpi-conduit # bug 1946: prevent confusing cross-conduit error messages rm -f gasnet_errsave_file gasnet_errsave_err _conduit_list_mpi=yes # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(mpi,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --enable-mpi was given. if test "${enable_mpi+set}" = set; then : enableval=$enable_mpi; fi case "$enable_mpi" in no) : enabled_mpi=no; _conduit_reason_mpi=disabled ;; yes) : enabled_mpi=yes;force_mpi=yes; _conduit_reason_mpi=enabled ;; *) : if test "$enable_mpi" = "probe" ; then # --enable-conduit=probe overrides --disable-auto-conduit-detect enabled_mpi=yes; _conduit_reason_mpi=auto else # default enabled_mpi=$enabled_auto_detect;_conduit_reason_mpi=$_conduit_auto_reason fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(mpi,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$enabled_mpi" = yes || test "$enabled_mpi_compat" = yes; then # user can explicitly configure MPI by setting MPI_CC, MPI_CFLAGS and MPI_LIBS # First step is to provide sane defaults when the user gave us nothing have_mpi=yes # start by assuming they have it DEFAULT_MPI_CFLAGS="$GASNET_OPT_CFLAGS" # default flags, assuming they are the same compiler if false ; then # just for help strings # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPI_CC],[],[[The MPI C compiler wrapper]]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-mpi-cc was given. if test "${with_mpi_cc+set}" = set; then : withval=$with_mpi_cc; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_CC setting" >&5 $as_echo_n "checking for MPI_CC setting... " >&6; } envval_src_MPI_CC="cached" if ${gasnet_cv_envvar_MPI_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_MPI_CC="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPI_CC="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpicc+set}" = "set" ; then gasnet_cv_envvar_MPI_CC="${_gasneti_nenv_mpicc}" envval_src_MPI_CC=given elif test "${_gasneti_cenv_mpicc+set}" = "set" ; then gasnet_cv_envvar_MPI_CC="${_gasneti_cenv_mpicc}" envval_src_MPI_CC=conf else gasnet_cv_envvar_MPI_CC=$envval_default_MPI_CC envval_src_MPI_CC=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPI_CC mpicc $gasnet_cv_configure_args_norm fi MPI_CC="$gasnet_cv_envvar_MPI_CC" if test "$MPI_CC" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPI_CC if test "$envval_src_MPI_CC" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPI_CC" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPI_CC\"" >&5 $as_echo " \"$MPI_CC\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPI_CC\"" >&5 $as_echo " (default) \"$MPI_CC\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPI_CC\"" >&5 $as_echo " (disabled) \"$MPI_CC\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CC\"" >&5 $as_echo " (provided) \"$MPI_CC\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CC\"" >&5 $as_echo " (provided) \"$MPI_CC\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPI_CC. Please configure --with-MPI_CC=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPI_CC],[],[[The MPI C compiler wrapper]]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPI_CFLAGS],[],[[Flags to add when compiling MPI C code (overrides auto-detected default)]]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-mpi-cflags was given. if test "${with_mpi_cflags+set}" = set; then : withval=$with_mpi_cflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_CFLAGS setting" >&5 $as_echo_n "checking for MPI_CFLAGS setting... " >&6; } envval_src_MPI_CFLAGS="cached" if ${gasnet_cv_envvar_MPI_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_MPI_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPI_CFLAGS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpicflags+set}" = "set" ; then gasnet_cv_envvar_MPI_CFLAGS="${_gasneti_nenv_mpicflags}" envval_src_MPI_CFLAGS=given elif test "${_gasneti_cenv_mpicflags+set}" = "set" ; then gasnet_cv_envvar_MPI_CFLAGS="${_gasneti_cenv_mpicflags}" envval_src_MPI_CFLAGS=conf else gasnet_cv_envvar_MPI_CFLAGS=$envval_default_MPI_CFLAGS envval_src_MPI_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPI_CFLAGS mpicflags $gasnet_cv_configure_args_norm fi MPI_CFLAGS="$gasnet_cv_envvar_MPI_CFLAGS" if test "$MPI_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPI_CFLAGS if test "$envval_src_MPI_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPI_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPI_CFLAGS\"" >&5 $as_echo " \"$MPI_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPI_CFLAGS\"" >&5 $as_echo " (default) \"$MPI_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPI_CFLAGS\"" >&5 $as_echo " (disabled) \"$MPI_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CFLAGS\"" >&5 $as_echo " (provided) \"$MPI_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CFLAGS\"" >&5 $as_echo " (provided) \"$MPI_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPI_CFLAGS. Please configure --with-MPI_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPI_CFLAGS],[],[[Flags to add when compiling MPI C code (overrides auto-detected default)]]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPI_LIBS],[],[[Libraries to add to the MPI link line]]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-mpi-libs was given. if test "${with_mpi_libs+set}" = set; then : withval=$with_mpi_libs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_LIBS setting" >&5 $as_echo_n "checking for MPI_LIBS setting... " >&6; } envval_src_MPI_LIBS="cached" if ${gasnet_cv_envvar_MPI_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_MPI_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPI_LIBS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpilibs+set}" = "set" ; then gasnet_cv_envvar_MPI_LIBS="${_gasneti_nenv_mpilibs}" envval_src_MPI_LIBS=given elif test "${_gasneti_cenv_mpilibs+set}" = "set" ; then gasnet_cv_envvar_MPI_LIBS="${_gasneti_cenv_mpilibs}" envval_src_MPI_LIBS=conf else gasnet_cv_envvar_MPI_LIBS=$envval_default_MPI_LIBS envval_src_MPI_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPI_LIBS mpilibs $gasnet_cv_configure_args_norm fi MPI_LIBS="$gasnet_cv_envvar_MPI_LIBS" if test "$MPI_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPI_LIBS if test "$envval_src_MPI_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPI_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPI_LIBS\"" >&5 $as_echo " \"$MPI_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPI_LIBS\"" >&5 $as_echo " (default) \"$MPI_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPI_LIBS\"" >&5 $as_echo " (disabled) \"$MPI_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_LIBS\"" >&5 $as_echo " (provided) \"$MPI_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_LIBS\"" >&5 $as_echo " (provided) \"$MPI_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPI_LIBS. Please configure --with-MPI_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPI_LIBS],[],[[Libraries to add to the MPI link line]]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPIRUN_CMD],[],[[Command template for running MPI programs, see mpi-conduit/README for syntax]]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # Check whether --with-mpirun-cmd was given. if test "${with_mpirun_cmd+set}" = set; then : withval=$with_mpirun_cmd; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPIRUN_CMD setting" >&5 $as_echo_n "checking for MPIRUN_CMD setting... " >&6; } envval_src_MPIRUN_CMD="cached" if ${gasnet_cv_envvar_MPIRUN_CMD+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_MPIRUN_CMD="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPIRUN_CMD="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpiruncmd+set}" = "set" ; then gasnet_cv_envvar_MPIRUN_CMD="${_gasneti_nenv_mpiruncmd}" envval_src_MPIRUN_CMD=given elif test "${_gasneti_cenv_mpiruncmd+set}" = "set" ; then gasnet_cv_envvar_MPIRUN_CMD="${_gasneti_cenv_mpiruncmd}" envval_src_MPIRUN_CMD=conf else gasnet_cv_envvar_MPIRUN_CMD=$envval_default_MPIRUN_CMD envval_src_MPIRUN_CMD=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPIRUN_CMD mpiruncmd $gasnet_cv_configure_args_norm fi MPIRUN_CMD="$gasnet_cv_envvar_MPIRUN_CMD" if test "$MPIRUN_CMD" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPIRUN_CMD if test "$envval_src_MPIRUN_CMD" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPIRUN_CMD" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPIRUN_CMD\"" >&5 $as_echo " \"$MPIRUN_CMD\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPIRUN_CMD\"" >&5 $as_echo " (default) \"$MPIRUN_CMD\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPIRUN_CMD\"" >&5 $as_echo " (disabled) \"$MPIRUN_CMD\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPIRUN_CMD\"" >&5 $as_echo " (provided) \"$MPIRUN_CMD\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPIRUN_CMD\"" >&5 $as_echo " (provided) \"$MPIRUN_CMD\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPIRUN_CMD. Please configure --with-MPIRUN_CMD=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPIRUN_CMD],[],[[Command template for running MPI programs, see mpi-conduit/README for syntax]]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi case "$target_os" in linux*) if test -n "$GASNETI_ARCH_IBMPE"; then gasnet_mpcc="mpcc -m$GASNETI_PTR_BITS" case "$CC_FAMILY" in GNU) gasnet_mpcc="$gasnet_mpcc -compiler gnu";; XLC) gasnet_mpcc="$gasnet_mpcc -compiler xl";; Intel) gasnet_mpcc="$gasnet_mpcc -compiler intel";; PGI) gasnet_mpcc="$gasnet_mpcc -compiler pgi";; Pathscale) gasnet_mpcc="$gasnet_mpcc -compiler ekopath";; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPI_CC],[$gasnet_mpcc]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_CC setting" >&5 $as_echo_n "checking for MPI_CC setting... " >&6; } envval_src_MPI_CC="cached" if ${gasnet_cv_envvar_MPI_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_MPI_CC="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPI_CC="$gasnet_mpcc" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpicc+set}" = "set" ; then gasnet_cv_envvar_MPI_CC="${_gasneti_nenv_mpicc}" envval_src_MPI_CC=given elif test "${_gasneti_cenv_mpicc+set}" = "set" ; then gasnet_cv_envvar_MPI_CC="${_gasneti_cenv_mpicc}" envval_src_MPI_CC=conf else gasnet_cv_envvar_MPI_CC=$envval_default_MPI_CC envval_src_MPI_CC=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPI_CC mpicc $gasnet_cv_configure_args_norm fi MPI_CC="$gasnet_cv_envvar_MPI_CC" if test "$MPI_CC" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPI_CC if test "$envval_src_MPI_CC" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPI_CC" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPI_CC\"" >&5 $as_echo " \"$MPI_CC\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPI_CC\"" >&5 $as_echo " (default) \"$MPI_CC\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPI_CC\"" >&5 $as_echo " (disabled) \"$MPI_CC\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CC\"" >&5 $as_echo " (provided) \"$MPI_CC\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CC\"" >&5 $as_echo " (provided) \"$MPI_CC\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPI_CC. Please configure --with-MPI_CC=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPI_CC],[$gasnet_mpcc]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPI_LIBS],[]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_LIBS setting" >&5 $as_echo_n "checking for MPI_LIBS setting... " >&6; } envval_src_MPI_LIBS="cached" if ${gasnet_cv_envvar_MPI_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_MPI_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPI_LIBS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpilibs+set}" = "set" ; then gasnet_cv_envvar_MPI_LIBS="${_gasneti_nenv_mpilibs}" envval_src_MPI_LIBS=given elif test "${_gasneti_cenv_mpilibs+set}" = "set" ; then gasnet_cv_envvar_MPI_LIBS="${_gasneti_cenv_mpilibs}" envval_src_MPI_LIBS=conf else gasnet_cv_envvar_MPI_LIBS=$envval_default_MPI_LIBS envval_src_MPI_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPI_LIBS mpilibs $gasnet_cv_configure_args_norm fi MPI_LIBS="$gasnet_cv_envvar_MPI_LIBS" if test "$MPI_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPI_LIBS if test "$envval_src_MPI_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPI_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPI_LIBS\"" >&5 $as_echo " \"$MPI_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPI_LIBS\"" >&5 $as_echo " (default) \"$MPI_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPI_LIBS\"" >&5 $as_echo " (disabled) \"$MPI_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_LIBS\"" >&5 $as_echo " (provided) \"$MPI_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_LIBS\"" >&5 $as_echo " (provided) \"$MPI_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPI_LIBS. Please configure --with-MPI_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPI_LIBS],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPIRUN_CMD],[env PAGER=cat MP_FENCE=-- poe %P -nodes %M -procs %N -use_bulk_xfer yes -- %A]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPIRUN_CMD setting" >&5 $as_echo_n "checking for MPIRUN_CMD setting... " >&6; } envval_src_MPIRUN_CMD="cached" if ${gasnet_cv_envvar_MPIRUN_CMD+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_MPIRUN_CMD="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPIRUN_CMD="env PAGER=cat MP_FENCE=-- poe %P -nodes %M -procs %N -use_bulk_xfer yes -- %A" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpiruncmd+set}" = "set" ; then gasnet_cv_envvar_MPIRUN_CMD="${_gasneti_nenv_mpiruncmd}" envval_src_MPIRUN_CMD=given elif test "${_gasneti_cenv_mpiruncmd+set}" = "set" ; then gasnet_cv_envvar_MPIRUN_CMD="${_gasneti_cenv_mpiruncmd}" envval_src_MPIRUN_CMD=conf else gasnet_cv_envvar_MPIRUN_CMD=$envval_default_MPIRUN_CMD envval_src_MPIRUN_CMD=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPIRUN_CMD mpiruncmd $gasnet_cv_configure_args_norm fi MPIRUN_CMD="$gasnet_cv_envvar_MPIRUN_CMD" if test "$MPIRUN_CMD" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPIRUN_CMD if test "$envval_src_MPIRUN_CMD" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPIRUN_CMD" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPIRUN_CMD\"" >&5 $as_echo " \"$MPIRUN_CMD\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPIRUN_CMD\"" >&5 $as_echo " (default) \"$MPIRUN_CMD\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPIRUN_CMD\"" >&5 $as_echo " (disabled) \"$MPIRUN_CMD\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPIRUN_CMD\"" >&5 $as_echo " (provided) \"$MPIRUN_CMD\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPIRUN_CMD\"" >&5 $as_echo " (provided) \"$MPIRUN_CMD\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPIRUN_CMD. Please configure --with-MPIRUN_CMD=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPIRUN_CMD],[env PAGER=cat MP_FENCE=-- poe %P -nodes %M -procs %N -use_bulk_xfer yes -- %A]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPI_CC],[mpicc]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_CC setting" >&5 $as_echo_n "checking for MPI_CC setting... " >&6; } envval_src_MPI_CC="cached" if ${gasnet_cv_envvar_MPI_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_MPI_CC="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPI_CC="mpicc" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpicc+set}" = "set" ; then gasnet_cv_envvar_MPI_CC="${_gasneti_nenv_mpicc}" envval_src_MPI_CC=given elif test "${_gasneti_cenv_mpicc+set}" = "set" ; then gasnet_cv_envvar_MPI_CC="${_gasneti_cenv_mpicc}" envval_src_MPI_CC=conf else gasnet_cv_envvar_MPI_CC=$envval_default_MPI_CC envval_src_MPI_CC=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPI_CC mpicc $gasnet_cv_configure_args_norm fi MPI_CC="$gasnet_cv_envvar_MPI_CC" if test "$MPI_CC" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPI_CC if test "$envval_src_MPI_CC" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPI_CC" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPI_CC\"" >&5 $as_echo " \"$MPI_CC\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPI_CC\"" >&5 $as_echo " (default) \"$MPI_CC\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPI_CC\"" >&5 $as_echo " (disabled) \"$MPI_CC\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CC\"" >&5 $as_echo " (provided) \"$MPI_CC\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CC\"" >&5 $as_echo " (provided) \"$MPI_CC\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPI_CC. Please configure --with-MPI_CC=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPI_CC],[mpicc]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPI_LIBS],[]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_LIBS setting" >&5 $as_echo_n "checking for MPI_LIBS setting... " >&6; } envval_src_MPI_LIBS="cached" if ${gasnet_cv_envvar_MPI_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_MPI_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPI_LIBS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpilibs+set}" = "set" ; then gasnet_cv_envvar_MPI_LIBS="${_gasneti_nenv_mpilibs}" envval_src_MPI_LIBS=given elif test "${_gasneti_cenv_mpilibs+set}" = "set" ; then gasnet_cv_envvar_MPI_LIBS="${_gasneti_cenv_mpilibs}" envval_src_MPI_LIBS=conf else gasnet_cv_envvar_MPI_LIBS=$envval_default_MPI_LIBS envval_src_MPI_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPI_LIBS mpilibs $gasnet_cv_configure_args_norm fi MPI_LIBS="$gasnet_cv_envvar_MPI_LIBS" if test "$MPI_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPI_LIBS if test "$envval_src_MPI_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPI_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPI_LIBS\"" >&5 $as_echo " \"$MPI_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPI_LIBS\"" >&5 $as_echo " (default) \"$MPI_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPI_LIBS\"" >&5 $as_echo " (disabled) \"$MPI_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_LIBS\"" >&5 $as_echo " (provided) \"$MPI_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_LIBS\"" >&5 $as_echo " (provided) \"$MPI_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPI_LIBS. Please configure --with-MPI_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPI_LIBS],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPIRUN_CMD],[mpirun -np %N %C]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPIRUN_CMD setting" >&5 $as_echo_n "checking for MPIRUN_CMD setting... " >&6; } envval_src_MPIRUN_CMD="cached" if ${gasnet_cv_envvar_MPIRUN_CMD+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_MPIRUN_CMD="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPIRUN_CMD="mpirun -np %N %C" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpiruncmd+set}" = "set" ; then gasnet_cv_envvar_MPIRUN_CMD="${_gasneti_nenv_mpiruncmd}" envval_src_MPIRUN_CMD=given elif test "${_gasneti_cenv_mpiruncmd+set}" = "set" ; then gasnet_cv_envvar_MPIRUN_CMD="${_gasneti_cenv_mpiruncmd}" envval_src_MPIRUN_CMD=conf else gasnet_cv_envvar_MPIRUN_CMD=$envval_default_MPIRUN_CMD envval_src_MPIRUN_CMD=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPIRUN_CMD mpiruncmd $gasnet_cv_configure_args_norm fi MPIRUN_CMD="$gasnet_cv_envvar_MPIRUN_CMD" if test "$MPIRUN_CMD" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPIRUN_CMD if test "$envval_src_MPIRUN_CMD" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPIRUN_CMD" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPIRUN_CMD\"" >&5 $as_echo " \"$MPIRUN_CMD\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPIRUN_CMD\"" >&5 $as_echo " (default) \"$MPIRUN_CMD\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPIRUN_CMD\"" >&5 $as_echo " (disabled) \"$MPIRUN_CMD\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPIRUN_CMD\"" >&5 $as_echo " (provided) \"$MPIRUN_CMD\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPIRUN_CMD\"" >&5 $as_echo " (provided) \"$MPIRUN_CMD\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPIRUN_CMD. Please configure --with-MPIRUN_CMD=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPIRUN_CMD],[mpirun -np %N %C]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi ;; *) # unknown OS - if user doesn't provide info, assume generic settings that often work # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPI_CC],[mpicc]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_CC setting" >&5 $as_echo_n "checking for MPI_CC setting... " >&6; } envval_src_MPI_CC="cached" if ${gasnet_cv_envvar_MPI_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_MPI_CC="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPI_CC="mpicc" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpicc+set}" = "set" ; then gasnet_cv_envvar_MPI_CC="${_gasneti_nenv_mpicc}" envval_src_MPI_CC=given elif test "${_gasneti_cenv_mpicc+set}" = "set" ; then gasnet_cv_envvar_MPI_CC="${_gasneti_cenv_mpicc}" envval_src_MPI_CC=conf else gasnet_cv_envvar_MPI_CC=$envval_default_MPI_CC envval_src_MPI_CC=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPI_CC mpicc $gasnet_cv_configure_args_norm fi MPI_CC="$gasnet_cv_envvar_MPI_CC" if test "$MPI_CC" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPI_CC if test "$envval_src_MPI_CC" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPI_CC" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPI_CC\"" >&5 $as_echo " \"$MPI_CC\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPI_CC\"" >&5 $as_echo " (default) \"$MPI_CC\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPI_CC\"" >&5 $as_echo " (disabled) \"$MPI_CC\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CC\"" >&5 $as_echo " (provided) \"$MPI_CC\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CC\"" >&5 $as_echo " (provided) \"$MPI_CC\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPI_CC. Please configure --with-MPI_CC=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPI_CC],[mpicc]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPI_LIBS],[]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_LIBS setting" >&5 $as_echo_n "checking for MPI_LIBS setting... " >&6; } envval_src_MPI_LIBS="cached" if ${gasnet_cv_envvar_MPI_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_MPI_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPI_LIBS="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpilibs+set}" = "set" ; then gasnet_cv_envvar_MPI_LIBS="${_gasneti_nenv_mpilibs}" envval_src_MPI_LIBS=given elif test "${_gasneti_cenv_mpilibs+set}" = "set" ; then gasnet_cv_envvar_MPI_LIBS="${_gasneti_cenv_mpilibs}" envval_src_MPI_LIBS=conf else gasnet_cv_envvar_MPI_LIBS=$envval_default_MPI_LIBS envval_src_MPI_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPI_LIBS mpilibs $gasnet_cv_configure_args_norm fi MPI_LIBS="$gasnet_cv_envvar_MPI_LIBS" if test "$MPI_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPI_LIBS if test "$envval_src_MPI_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPI_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPI_LIBS\"" >&5 $as_echo " \"$MPI_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPI_LIBS\"" >&5 $as_echo " (default) \"$MPI_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPI_LIBS\"" >&5 $as_echo " (disabled) \"$MPI_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_LIBS\"" >&5 $as_echo " (provided) \"$MPI_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_LIBS\"" >&5 $as_echo " (provided) \"$MPI_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPI_LIBS. Please configure --with-MPI_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPI_LIBS],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPIRUN_CMD],[mpirun -np %N %C]) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPIRUN_CMD setting" >&5 $as_echo_n "checking for MPIRUN_CMD setting... " >&6; } envval_src_MPIRUN_CMD="cached" if ${gasnet_cv_envvar_MPIRUN_CMD+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_MPIRUN_CMD="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPIRUN_CMD="mpirun -np %N %C" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpiruncmd+set}" = "set" ; then gasnet_cv_envvar_MPIRUN_CMD="${_gasneti_nenv_mpiruncmd}" envval_src_MPIRUN_CMD=given elif test "${_gasneti_cenv_mpiruncmd+set}" = "set" ; then gasnet_cv_envvar_MPIRUN_CMD="${_gasneti_cenv_mpiruncmd}" envval_src_MPIRUN_CMD=conf else gasnet_cv_envvar_MPIRUN_CMD=$envval_default_MPIRUN_CMD envval_src_MPIRUN_CMD=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPIRUN_CMD mpiruncmd $gasnet_cv_configure_args_norm fi MPIRUN_CMD="$gasnet_cv_envvar_MPIRUN_CMD" if test "$MPIRUN_CMD" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPIRUN_CMD if test "$envval_src_MPIRUN_CMD" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPIRUN_CMD" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPIRUN_CMD\"" >&5 $as_echo " \"$MPIRUN_CMD\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPIRUN_CMD\"" >&5 $as_echo " (default) \"$MPIRUN_CMD\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPIRUN_CMD\"" >&5 $as_echo " (disabled) \"$MPIRUN_CMD\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPIRUN_CMD\"" >&5 $as_echo " (provided) \"$MPIRUN_CMD\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPIRUN_CMD\"" >&5 $as_echo " (provided) \"$MPIRUN_CMD\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPIRUN_CMD. Please configure --with-MPIRUN_CMD=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPIRUN_CMD],[mpirun -np %N %C]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; esac if test -z "$MPI_CC" ; then # Avoid unecessary and potentially confusing probes and their errors/warnings have_mpi=no mpi_reason="was disabled" else # vvvvvvvvvvvvvvvvvvvvvv GASNET_GETFULLPATH(MPI_CC) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$gasnet_cv__gfp_disable" = ""; then if echo "$MPI_CC" | $AWK -F' ' '{if ($1 ~ /^(.*\/)?env$/) exit 0; else exit 1;}' >/dev/null; then for ac_prog in $ENVCMD env do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ENVCMD+:} false; then : $as_echo_n "(cached) " >&6 else case $ENVCMD in [\\/]* | ?:[\\/]*) ac_cv_path_ENVCMD="$ENVCMD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ENVCMD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ENVCMD=$ac_cv_path_ENVCMD if test -n "$ENVCMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENVCMD" >&5 $as_echo "$ENVCMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ENVCMD" && break done # assemble "ENVCMD key=val key=val " with a trailing space gasnet_gfp_progenv="$ENVCMD "`echo "$MPI_CC" | $AWK -F' ' 'BEGIN { ORS=" "; } { for (i=2;i<=NF;i++) { if ($i ~ /=/) { print $i; } else break; } }'` # just the program name gasnet_gfp_progname=`echo "$MPI_CC" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i<=NF;i++) { if ($i !~ /=/) { print $i; break; } } }'` # list of program arguments with no trailing space gasnet_gfp_progargs=`echo "$MPI_CC" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_gasnet_cv__gfp_fullprogname_MPI_CC+:} false; then : $as_echo_n "(cached) " >&6 else case $gasnet_cv__gfp_fullprogname_MPI_CC in [\\/]* | ?:[\\/]*) ac_cv_path_gasnet_cv__gfp_fullprogname_MPI_CC="$gasnet_cv__gfp_fullprogname_MPI_CC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_gasnet_cv__gfp_fullprogname_MPI_CC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi gasnet_cv__gfp_fullprogname_MPI_CC=$ac_cv_path_gasnet_cv__gfp_fullprogname_MPI_CC if test -n "$gasnet_cv__gfp_fullprogname_MPI_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv__gfp_fullprogname_MPI_CC" >&5 $as_echo "$gasnet_cv__gfp_fullprogname_MPI_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$gasnet_cv__gfp_fullprogname_MPI_CC" != "" ; then gasnet_gfp_progname="$gasnet_cv__gfp_fullprogname_MPI_CC" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for full path expansion of MPI_CC" >&5 $as_echo_n "checking for full path expansion of MPI_CC... " >&6; } if test -n "$gasnet_gfp_progargs" ; then MPI_CC="$gasnet_gfp_progenv$gasnet_gfp_progname $gasnet_gfp_progargs" else MPI_CC="$gasnet_gfp_progenv$gasnet_gfp_progname" fi #echo "gasnet_gfp_progenv='$gasnet_gfp_progenv'" #echo "gasnet_gfp_progname='$gasnet_gfp_progname'" #echo "gasnet_gfp_progargs='$gasnet_gfp_progargs'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPI_CC" >&5 $as_echo "$MPI_CC" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_GETFULLPATH(MPI_CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if command -v $MPI_CC > /dev/null 2>&1; then # figure out a reasonable fallback MPI_CFLAGS for this arch/OS and C99 support # this is complicated by the fact that $MPI_CC may be a different compiler than $CC # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CC,"$MPI_CC") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CC" = "" ; then _pushcnt_CC=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CC+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CC_$_pushcnt_CC=\$CC eval _pushedvarset_CC_$_pushcnt_CC=$_gasnet_pushvar_isset _pushcnt_CC=`expr $_pushcnt_CC + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CC="$MPI_CC" echo "pushed new CC value: $CC" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CC,"$MPI_CC") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(MISC_CFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_MISC_CFLAGS" = "" ; then _pushcnt_MISC_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${MISC_CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_MISC_CFLAGS_$_pushcnt_MISC_CFLAGS=\$MISC_CFLAGS eval _pushedvarset_MISC_CFLAGS_$_pushcnt_MISC_CFLAGS=$_gasnet_pushvar_isset _pushcnt_MISC_CFLAGS=`expr $_pushcnt_MISC_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` MISC_CFLAGS="" echo "pushed new MISC_CFLAGS value: $MISC_CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(MISC_CFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(MISC_CPPFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_MISC_CPPFLAGS" = "" ; then _pushcnt_MISC_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${MISC_CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_MISC_CPPFLAGS_$_pushcnt_MISC_CPPFLAGS=\$MISC_CPPFLAGS eval _pushedvarset_MISC_CPPFLAGS_$_pushcnt_MISC_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_MISC_CPPFLAGS=`expr $_pushcnt_MISC_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` MISC_CPPFLAGS="" echo "pushed new MISC_CPPFLAGS value: $MISC_CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(MISC_CPPFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(DEVWARN_CFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_DEVWARN_CFLAGS" = "" ; then _pushcnt_DEVWARN_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${DEVWARN_CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_DEVWARN_CFLAGS_$_pushcnt_DEVWARN_CFLAGS=\$DEVWARN_CFLAGS eval _pushedvarset_DEVWARN_CFLAGS_$_pushcnt_DEVWARN_CFLAGS=$_gasnet_pushvar_isset _pushcnt_DEVWARN_CFLAGS=`expr $_pushcnt_DEVWARN_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` DEVWARN_CFLAGS="" echo "pushed new DEVWARN_CFLAGS value: $DEVWARN_CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(DEVWARN_CFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MPI_CC appears functional" >&5 $as_echo_n "checking if $MPI_CC appears functional... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_mpi=no mpi_reason="compile test failed" # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPI compiler \"$MPI_CC\" does not appear to be functional. Consider passing --with-mpi-cc=/path/to/mpicc if you want mpi-conduit or require MPI compatibility" >&5 $as_echo "$as_me: WARNING: MPI compiler \"$MPI_CC\" does not appear to be functional. Consider passing --with-mpi-cc=/path/to/mpicc if you want mpi-conduit or require MPI compatibility" >&2;} echo "MPI compiler \"$MPI_CC\" does not appear to be functional. Consider passing --with-mpi-cc=/path/to/mpicc if you want mpi-conduit or require MPI compatibility" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $have_mpi = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_FAMILY_CACHE_CHECK(MPI,MPI_CC,gasnet_cv_mpi_cc_family) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI compiler family" >&5 $as_echo_n "checking for MPI compiler family... " >&6; } if ${gasnet_cv_mpi_cc_family+:} false; then : $as_echo_n "(cached) " >&6 else if test "MPI_CC" != "CXX" ; then _GASNET_FAMILY_CACHE_CHECK_PREPROC="$CPP" else _GASNET_FAMILY_CACHE_CHECK_PREPROC="$CXXCPP" fi if test "`echo '$_GASNET_FAMILY_CACHE_CHECK_PREPROC' | grep '$MPI'`" = "" ; then # preprocessor may differ from true compiler, so force full compilation testing _force_compile=1 else _force_compile= fi gasnet_cv_mpi_cc_family=unknown if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__xlC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __xlC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=XLC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __xlC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=XLC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__xlC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__ibmxl__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __ibmxl__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=XLC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __ibmxl__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=XLC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__ibmxl__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(_CRAYC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _CRAYC # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=Cray fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _CRAYC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=Cray fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(_CRAYC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__GNUC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __GNUC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=GNU fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __GNUC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=GNU fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__GNUC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__clang__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __clang__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=Clang fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __clang__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=Clang fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__clang__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__PGI,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PGI # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=PGI fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PGI # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=PGI fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__PGI,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__NVCOMPILER,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCOMPILER # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=NVHPC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCOMPILER # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=NVHPC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__NVCOMPILER,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__INTEL_COMPILER,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __INTEL_COMPILER # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=Intel fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __INTEL_COMPILER # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=Intel fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__INTEL_COMPILER,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__OPENCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __OPENCC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=Open64 fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __OPENCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=Open64 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__OPENCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__PCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PCC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=PCC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=PCC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__PCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__PATHCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PATHCC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=Pathscale fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __PATHCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=Pathscale fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__PATHCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__DECC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECC # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=Compaq fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=Compaq fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__DECC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Compaq C # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__DECCXX,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECCXX # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=Compaq fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __DECCXX # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=Compaq fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__DECCXX,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Compaq C++ fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__SUNPRO_C,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_C # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=Sun fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_C # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=Sun fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__SUNPRO_C,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Sun C # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__SUNPRO_CC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_CC # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=Sun fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __SUNPRO_CC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=Sun fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__SUNPRO_CC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Sun C++ fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__HP_cc,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_cc # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=HP fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_cc # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=HP fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__HP_cc,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # HP C # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__HP_aCC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_aCC # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=HP fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __HP_aCC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=HP fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__HP_aCC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # HP aCC (C++) fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(_SGI_COMPILER_VERSION,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SGI_COMPILER_VERSION # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=MIPS fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SGI_COMPILER_VERSION # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=MIPS fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(_SGI_COMPILER_VERSION,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__MTA__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __MTA__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=MTA fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __MTA__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=MTA fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__MTA__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__KCC,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __KCC # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=KAI fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __KCC # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=KAI fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__KCC,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__TINYC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __TINYC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=TINY fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __TINYC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=TINY fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__TINYC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__LCC__,...,$_force_compile) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "$_force_compile" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __LCC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=LCC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __LCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=LCC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__LCC__,...,$_force_compile) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$gasnet_cv_mpi_cc_family" = "unknown"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(_SX,...,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SX # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=NEC fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SX # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=NEC fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(_SX,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__sgi,...,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __sgi # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : gasnet_cv_mpi_cc_family=MIPS fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __sgi # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_family=MIPS fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__sgi,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # MIPSPro 7.3.0 and earlier fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_cc_family" >&5 $as_echo "$gasnet_cv_mpi_cc_family" >&6; } if test "$gasnet_cv_mpi_cc_family" != "GNU" ; then case MPI_CC in CC) ac_cv_c_compiler_gnu=no GCC="" ;; CXX) ac_cv_cxx_compiler_gnu=no GXX="" ;; esac fi case "$gasnet_cv_mpi_cc_family" in GNU) MPI_CC_SUBFAMILY='GNU' # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_STR(for gcc version string,MPI_CC_gcc_version_string,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc version string" >&5 $as_echo_n "checking for gcc version string... " >&6; } if ${gasnet_cv_MPI_CC_gcc_version_string+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_MPI_CC_gcc_version_string="" _extractstrembed='"$gasnetextractstr: (-(|" __VERSION__ "|)-) $"' # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_MPI_CC_gcc_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_MPI_CC_gcc_version_string" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_MPI_CC_gcc_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_MPI_CC_gcc_version_string" >&5 $as_echo "$gasnet_cv_MPI_CC_gcc_version_string" >&6; } if test -n "$gasnet_cv_MPI_CC_gcc_version_string" ; then _gasnet_MPI_CC_gcc_version_string=$gasnet_cv_MPI_CC_gcc_version_string fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_STR(for gcc version string,MPI_CC_gcc_version_string,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) case "$_gasnet_MPI_CC_gcc_version_string" in *gccfss*) MPI_CC_SUBFAMILY='GCCFSS';; *Advance-Toolchain*) MPI_CC_SUBFAMILY='IBM';; *) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__APPLE_CC__,...,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : MPI_CC_SUBFAMILY='APPLE' fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : MPI_CC_SUBFAMILY='APPLE' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__APPLE_CC__,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IFDEF(__NVCC__,...,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -z "" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCC__ # error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : MPI_CC_SUBFAMILY='NVIDIA' fi rm -f conftest.err conftest.i conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __NVCC__ # error #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : MPI_CC_SUBFAMILY='NVIDIA' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IFDEF(__NVCC__,...,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; esac ;; Clang) MPI_CC_SUBFAMILY='LLVM' # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_STR(for clang version string,MPI_CC_clang_version_string,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang version string" >&5 $as_echo_n "checking for clang version string... " >&6; } if ${gasnet_cv_MPI_CC_clang_version_string+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_MPI_CC_clang_version_string="" _extractstrembed='"$gasnetextractstr: (-(|" __VERSION__ "|)-) $"' # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_MPI_CC_clang_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_MPI_CC_clang_version_string" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_MPI_CC_clang_version_string=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting __VERSION__" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_MPI_CC_clang_version_string" >&5 $as_echo "$gasnet_cv_MPI_CC_clang_version_string" >&6; } if test -n "$gasnet_cv_MPI_CC_clang_version_string" ; then _gasnet_MPI_CC_clang_version_string=$gasnet_cv_MPI_CC_clang_version_string fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_STR(for clang version string,MPI_CC_clang_version_string,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) case "$_gasnet_MPI_CC_clang_version_string" in *Apple*) MPI_CC_SUBFAMILY='APPLE';; *Cray*) MPI_CC_SUBFAMILY='CRAY';; *AMD*) MPI_CC_SUBFAMILY='AMD';; *Arm*) MPI_CC_SUBFAMILY='ARM';; *Intel*) MPI_CC_SUBFAMILY='INTEL';; esac ;; *) MPI_CC_SUBFAMILY='none' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI compiler sub-family" >&5 $as_echo_n "checking for MPI compiler sub-family... " >&6; } # real "checking" was done above { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPI_CC_SUBFAMILY" >&5 $as_echo "$MPI_CC_SUBFAMILY" >&6; } MPI_CC_FAMILY=$gasnet_cv_mpi_cc_family # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FAMILY_CACHE_CHECK(MPI,MPI_CC,gasnet_cv_mpi_cc_family) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$BUILDCONFIG" = "debug" ; then SAFE_MPI_CFLAGS="-g" else SAFE_MPI_CFLAGS="-O" fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_SET_CHECKED_CFLAGS(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$MPI_CC" = "no" ; then : # Skip else # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPI_CFLAGS],[$DEFAULT_MPI_CFLAGS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_CFLAGS setting" >&5 $as_echo_n "checking for MPI_CFLAGS setting... " >&6; } envval_src_MPI_CFLAGS="cached" if ${gasnet_cv_envvar_MPI_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_MPI_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPI_CFLAGS="$DEFAULT_MPI_CFLAGS" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpicflags+set}" = "set" ; then gasnet_cv_envvar_MPI_CFLAGS="${_gasneti_nenv_mpicflags}" envval_src_MPI_CFLAGS=given elif test "${_gasneti_cenv_mpicflags+set}" = "set" ; then gasnet_cv_envvar_MPI_CFLAGS="${_gasneti_cenv_mpicflags}" envval_src_MPI_CFLAGS=conf else gasnet_cv_envvar_MPI_CFLAGS=$envval_default_MPI_CFLAGS envval_src_MPI_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPI_CFLAGS mpicflags $gasnet_cv_configure_args_norm fi MPI_CFLAGS="$gasnet_cv_envvar_MPI_CFLAGS" if test "$MPI_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPI_CFLAGS if test "$envval_src_MPI_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPI_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPI_CFLAGS\"" >&5 $as_echo " \"$MPI_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPI_CFLAGS\"" >&5 $as_echo " (default) \"$MPI_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPI_CFLAGS\"" >&5 $as_echo " (disabled) \"$MPI_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CFLAGS\"" >&5 $as_echo " (provided) \"$MPI_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPI_CFLAGS\"" >&5 $as_echo " (provided) \"$MPI_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPI_CFLAGS. Please configure --with-MPI_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPI_CFLAGS],[$DEFAULT_MPI_CFLAGS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$MPI_CFLAGS" = "$DEFAULT_MPI_CFLAGS" ; then # validate default # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CC,"$MPI_CC") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CC" = "" ; then _pushcnt_CC=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CC+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CC_$_pushcnt_CC=\$CC eval _pushedvarset_CC_$_pushcnt_CC=$_gasnet_pushvar_isset _pushcnt_CC=`expr $_pushcnt_CC + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CC="$MPI_CC" echo "pushed new CC value: $CC" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CC,"$MPI_CC") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($[MPI_CFLAGS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MPI_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MPI_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MPI_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $MPI_CFLAGS" >&5 $as_echo_n "checking for C compiler flag $MPI_CFLAGS... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to use default MPI_CFLAGS=\"$MPI_CFLAGS\" so using \"$SAFE_MPI_CFLAGS\" instead. Consider manually seting MPI_CFLAGS" >&5 $as_echo "$as_me: WARNING: Unable to use default MPI_CFLAGS=\"$MPI_CFLAGS\" so using \"$SAFE_MPI_CFLAGS\" instead. Consider manually seting MPI_CFLAGS" >&2;} echo "Unable to use default MPI_CFLAGS=\"$MPI_CFLAGS\" so using \"$SAFE_MPI_CFLAGS\" instead. Consider manually seting MPI_CFLAGS" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:9) MPI_CFLAGS="$SAFE_MPI_CFLAGS" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to use default MPI_CFLAGS=\"$MPI_CFLAGS\" so using \"$SAFE_MPI_CFLAGS\" instead. Consider manually seting MPI_CFLAGS" >&5 $as_echo "$as_me: WARNING: Unable to use default MPI_CFLAGS=\"$MPI_CFLAGS\" so using \"$SAFE_MPI_CFLAGS\" instead. Consider manually seting MPI_CFLAGS" >&2;} echo "Unable to use default MPI_CFLAGS=\"$MPI_CFLAGS\" so using \"$SAFE_MPI_CFLAGS\" instead. Consider manually seting MPI_CFLAGS" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:9) MPI_CFLAGS="$SAFE_MPI_CFLAGS" fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to use default MPI_CFLAGS=\"$MPI_CFLAGS\" so using \"$SAFE_MPI_CFLAGS\" instead. Consider manually seting MPI_CFLAGS" >&5 $as_echo "$as_me: WARNING: Unable to use default MPI_CFLAGS=\"$MPI_CFLAGS\" so using \"$SAFE_MPI_CFLAGS\" instead. Consider manually seting MPI_CFLAGS" >&2;} echo "Unable to use default MPI_CFLAGS=\"$MPI_CFLAGS\" so using \"$SAFE_MPI_CFLAGS\" instead. Consider manually seting MPI_CFLAGS" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:7) MPI_CFLAGS="$SAFE_MPI_CFLAGS" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($[MPI_CFLAGS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CC) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CC" -ge "1"; then _pushcnt_CC=`expr $_pushcnt_CC - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CC_$_pushcnt_CC if test "$_gasnet_pushvar_isset" = "1" ; then eval CC=\$_pushedvar_CC_$_pushcnt_CC echo "popping CC back to: $CC" >&5 else unset CC echo "popping CC back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CC" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SET_CHECKED_CFLAGS(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CC_FAMILY,"$MPI_CC_FAMILY") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CC_FAMILY" = "" ; then _pushcnt_CC_FAMILY=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CC_FAMILY+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CC_FAMILY_$_pushcnt_CC_FAMILY=\$CC_FAMILY eval _pushedvarset_CC_FAMILY_$_pushcnt_CC_FAMILY=$_gasnet_pushvar_isset _pushcnt_CC_FAMILY=`expr $_pushcnt_CC_FAMILY + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CC_FAMILY="$MPI_CC_FAMILY" echo "pushed new CC_FAMILY value: $CC_FAMILY" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CC_FAMILY,"$MPI_CC_FAMILY") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CC,"$MPI_CC $MPI_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CC" = "" ; then _pushcnt_CC=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CC+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CC_$_pushcnt_CC=\$CC eval _pushedvarset_CC_$_pushcnt_CC=$_gasnet_pushvar_isset _pushcnt_CC=`expr $_pushcnt_CC + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CC="$MPI_CC $MPI_CFLAGS" echo "pushed new CC value: $CC" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CC,"$MPI_CC $MPI_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # detect MISC for append to user's flags # we re-detect miscflags for MPI_CC, because it may differ from CC # Set MISC_CFLAGS: flags to be used by all C compilations, regardless of optimization/debugging level # This should include architectural/CPU flags, warning flags, and anything required for C99 conformance # We do not currently allow a user override of MISC_C(PP)FLAGS MISC_CFLAGS="" misc_flag_prefix='' misc_flag_delim=' ' case "$CC_FAMILY" in GNU) case "$CC_SUBFAMILY" in NVIDIA) misc_flag_prefix='-Xcompiler ' misc_flag_delim=',' ;; esac case "$target_cpu" in sparc) if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_ULTRASPARC" != 1; then for flag in "-mcpu=ultrasparc3 -mtune=ultrasparc3" "-mcpu=ultrasparc -mtune=ultrasparc" ; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($flag) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $flag" >&5 $as_echo_n "checking for C compiler flag $flag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) ultrasparc_flag_worked=1 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=0 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=0 fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) ultrasparc_flag_worked=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($flag) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$ultrasparc_flag_worked" = 1; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working flag $flag" >&5 $as_echo_n "checking for working flag $flag... " >&6; } if test "$cross_compiling" = yes; then : ultrasparc_flag_worked=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void foo(void) { #ifdef __GNUC__ register void * addr = 0; register int oldval = 0; register int newval = 1; __asm__ __volatile__ ("cas [%2], %0, %1" : "=&r"(oldval), "=&r"(newval) : "r" (addr) : "memory"); #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) __asm("cas [%i0], %i1, %i2"); #else #error unknown sparc compiler #endif } int main(void) { return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ultrasparc_flag_worked=1 else ultrasparc_flag_worked=0 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$ultrasparc_flag_worked" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MISC_CFLAGS="$flag" break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UltraSPARC instruction support" >&5 $as_echo_n "checking for UltraSPARC instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; rs6000|powerpc*) if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_PPC64" != 1 -a "$cross_compiling" != "yes"; then for flag in "-force_cpusubtype_ALL" "-Wa,-mppc64" ; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($flag) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $flag" >&5 $as_echo_n "checking for C compiler flag $flag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) ppc64_flag_worked=1 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ppc64_flag_worked=0 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ppc64_flag_worked=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ppc64_flag_worked=0 fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) ppc64_flag_worked=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($flag) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$ppc64_flag_worked" = 1; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working flag $flag" >&5 $as_echo_n "checking for working flag $flag... " >&6; } if test "$cross_compiling" = yes; then : ppc64_flag_worked=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ppc64_flag_worked=1 else ppc64_flag_worked=0 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$ppc64_flag_worked" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MISC_CFLAGS="$flag" break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PPC64 instruction support" >&5 $as_echo_n "checking for PPC64 instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; esac case "$target_os" in darwin*) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-long-double) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-long-double") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-long-double" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-long-double") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-long-double" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-long-double... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wlong-double) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wlong-double") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wlong-double" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wlong-double") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wlong-double" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wlong-double... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) MISC_CFLAGS="$MISC_CFLAGS ${misc_flag_prefix}-Wno-long-double" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="$MISC_CFLAGS ${misc_flag_prefix}-Wno-long-double" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wlong-double) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wlong-double) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wlong-double") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wlong-double" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wlong-double") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wlong-double" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wlong-double... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) MISC_CFLAGS="$MISC_CFLAGS ${misc_flag_prefix}-Wno-long-double" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="$MISC_CFLAGS ${misc_flag_prefix}-Wno-long-double" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wlong-double) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-long-double) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; esac ;; Cray) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cray C warning flags" >&5 $as_echo_n "checking for Cray C warning flags... " >&6; } crayc_warn_flags="236:3185" # 3185 = bug 3306 # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -g") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -g" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -g") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # bug 3309 is specific to -g # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" crayc_warn_flags="${crayc_warn_flags}:7212" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" crayc_warn_flags="${crayc_warn_flags}:7212" fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 # bug 3309, Cray C 8.5+ echo echo "configure error: failure building struct warning test" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) case "$target_cpu" in x86_64) MISC_CFLAGS="-hnomessage=$crayc_warn_flags" ;; # XT, XE, XK, XC, etc. *) as_fn_error $? "Cray C compiler for unknown target CPU" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MISC_CFLAGS" >&5 $as_echo "$MISC_CFLAGS" >&6; } ;; Intel) # Note we need to support both older -wd and newer -diag-disable # Setting (CC|MPI_CC)_WDFLAG simplifes doing so in later tests # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-diag-disable=177) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -diag-disable=177") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -diag-disable=177" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -diag-disable=177") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -diag-disable=177" >&5 $as_echo_n "checking for C compiler flag -diag-disable=177... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) MPI_CC_WDFLAG='-diag-disable=' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MPI_CC_WDFLAG='-wd' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MPI_CC_WDFLAG='-diag-disable=' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MPI_CC_WDFLAG='-wd' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) MPI_CC_WDFLAG='-wd' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-diag-disable=177) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) MISC_CFLAGS="${MPI_CC_WDFLAG}177 ${MPI_CC_WDFLAG}279" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${wdflag}1572) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${MPI_CC_WDFLAG}1572") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${MPI_CC_WDFLAG}1572" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${MPI_CC_WDFLAG}1572") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${MPI_CC_WDFLAG}1572" >&5 $as_echo_n "checking for C compiler flag ${MPI_CC_WDFLAG}1572... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) MISC_CFLAGS="$MISC_CFLAGS ${MPI_CC_WDFLAG}1572" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="$MISC_CFLAGS ${MPI_CC_WDFLAG}1572" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${wdflag}1572) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; NVHPC) # TODO: are either `-M` options, inherited from PGI, still required? # suppress large number of useless default warnings # get inline assembly and sign-extended widening MISC_CFLAGS="-w -Masmkeyword -Msignextend" ;; PGI) MISC_CFLAGS="-Masmkeyword -Msignextend" # get inline assembly and sign-extended widening # The following looks backwards, but is not. # PGI 20.1 introduced fine-grained warning control at the same time as # default-enabling a large number of useless warnings (on the level of # -Wextra in other compilers). # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG([-Wc,--diag_suppress=177]) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wc,--diag_suppress=177") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Wc,--diag_suppress=177" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wc,--diag_suppress=177") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Wc,--diag_suppress=177" >&5 $as_echo_n "checking for C compiler flag -Wc,--diag_suppress=177... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) MISC_CFLAGS="-w $MISC_CFLAGS" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="-w $MISC_CFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG([-Wc,--diag_suppress=177]) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; Sun) if test "$target_cpu" = "sparc"; then if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_ULTRASPARC" != 1; then for flag in "-xarch=v8plusb" "-xarch=v8plusa" "-xarch=v8plus" "-xarch=sparcvis2" "-xarch=sparcvis" "-xarch=sparc" ; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($flag) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $flag" >&5 $as_echo_n "checking for C compiler flag $flag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) ultrasparc_flag_worked=1 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=0 else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } ultrasparc_flag_worked=0 fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) ultrasparc_flag_worked=0 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($flag) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$ultrasparc_flag_worked" = 1; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working flag $flag" >&5 $as_echo_n "checking for working flag $flag... " >&6; } if test "$cross_compiling" = yes; then : ultrasparc_flag_worked=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void foo(void) { #ifdef __GNUC__ register void * addr = 0; register int oldval = 0; register int newval = 1; __asm__ __volatile__ ("cas [%2], %0, %1" : "=&r"(oldval), "=&r"(newval) : "r" (addr) : "memory"); #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) __asm("cas [%i0], %i1, %i2"); #else #error unknown sparc compiler #endif } int main(void) { return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ultrasparc_flag_worked=1 else ultrasparc_flag_worked=0 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$ultrasparc_flag_worked" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MISC_CFLAGS="$flag" break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UltraSPARC instruction support" >&5 $as_echo_n "checking for UltraSPARC instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_ULTRASPARC 1" >>confdefs.h else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi # Try to suppress warnings about __attribute__(__common__): # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-erroff=E_ATTRIBUTE_NOT_FUNC) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -erroff=E_ATTRIBUTE_NOT_FUNC") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -erroff=E_ATTRIBUTE_NOT_FUNC" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -erroff=E_ATTRIBUTE_NOT_FUNC") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -erroff=E_ATTRIBUTE_NOT_FUNC" >&5 $as_echo_n "checking for C compiler flag -erroff=E_ATTRIBUTE_NOT_FUNC... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) MISC_CFLAGS="$MISC_CFLAGS -erroff=E_ATTRIBUTE_NOT_FUNC" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="$MISC_CFLAGS -erroff=E_ATTRIBUTE_NOT_FUNC" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-erroff=E_ATTRIBUTE_NOT_FUNC) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) MISC_CFLAGS="$MISC_CFLAGS -errtags" ;; # show warning tag ids in warnings XLC) if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_PPC64" != 1 -a "$cross_compiling" != "yes"; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PPC64 instruction support" >&5 $as_echo_n "checking for PPC64 instruction support... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : if test "$cross_compiling" = yes; then : # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (cross-compiling w/ 64-bit pointers)" >&5 $as_echo "yes (cross-compiling w/ 64-bit pointers)" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (cross-compiling w/ 32-bit pointers)" >&5 $as_echo "no (cross-compiling w/ 32-bit pointers)" >&6; } fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif int main(void) { double x; return testme(&x); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define GASNETI_ARCH_PPC64 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/failure" >&5 $as_echo "no/failure" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning" >&5 $as_echo "no/warning" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error" >&5 $as_echo "no/error" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # Try to suppress certain warnings: # 1500-010 = infinite loop (such as in our tests) # 1500-029 = could not inline (e.g. varargs, alloc, etc.) # 1506-229 = empty source file (some linux headers) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-qsuppress=1500-010:1500-029:1506-229) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -qsuppress=1500-010:1500-029:1506-229") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -qsuppress=1500-010:1500-029:1506-229" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -qsuppress=1500-010:1500-029:1506-229") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -qsuppress=1500-010:1500-029:1506-229" >&5 $as_echo_n "checking for C compiler flag -qsuppress=1500-010:1500-029:1506-229... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) MISC_CFLAGS="$MISC_CFLAGS -qsuppress=1500-010:1500-029:1506-229" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CFLAGS="$MISC_CFLAGS -qsuppress=1500-010:1500-029:1506-229" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-qsuppress=1500-010:1500-029:1506-229) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; *) ;; esac # Add warning enable/suppression flags to MISC_CFLAGS case "$CC_FAMILY" in GNU | Pathscale | Open64 | Clang) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$MISC_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$MISC_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$MISC_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$enabled_dev_warnings" = "yes" ; then # enable additional supported warnings for warnflag in -Wall \ -Wpointer-arith \ -Wnested-externs \ -Wwrite-strings \ -Wmissing-format-attribute \ -Winit-self \ -Wvla \ -Wexpansion-to-defined \ -Woverlength-strings \ -Wclobbered \ -Wcast-function-type \ -Wempty-body \ -Wignored-qualifiers \ -Wimplicit-fallthrough \ -Wmissing-parameter-type \ -Wold-style-declaration \ -Wuninitialized \ -Wshift-negative-value \ ; do if test "$CC_FAMILY" = "Open64" && ( test "x$warnflag" = "x-Wempty-body" || test "x$warnflag" = "x-Wexpansion-to-defined" ) ; then : # Bug 3711: Open64 botches some warnings at link time, which is not probed here else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}$warnflag) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}$warnflag") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}$warnflag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}$warnflag") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}$warnflag" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}$warnflag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}$warnflag" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}$warnflag" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}$warnflag) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi done # Disable DEVWARN flags from -Wall that we don't support in our library code # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-format-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-format-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-truncation) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-truncation") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-truncation" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-truncation") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-format-truncation" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-format-truncation... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-truncation) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-truncation") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-truncation" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-truncation") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-truncation" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-truncation... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-truncation" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-truncation" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-truncation) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-truncation) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-truncation") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-truncation" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-truncation") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-truncation" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-truncation... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-truncation" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-format-truncation" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-truncation) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-truncation) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # Disable DEVWARN flag(s) from -Wcast-function-type that we don't support in our library code # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-cast-function-type-strict) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-cast-function-type-strict" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-cast-function-type-strict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wcast-function-type-strict) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wcast-function-type-strict" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wcast-function-type-strict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wcast-function-type-strict) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wcast-function-type-strict) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wcast-function-type-strict") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wcast-function-type-strict" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wcast-function-type-strict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-cast-function-type-strict" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wcast-function-type-strict) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-cast-function-type-strict) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # CC and MPI_CC only. Not desired for CXX # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-strict-prototypes) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-strict-prototypes" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-strict-prototypes... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-prototypes) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstrict-prototypes" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstrict-prototypes... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-prototypes) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-prototypes) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-prototypes") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstrict-prototypes" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstrict-prototypes... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } DEVWARN_CFLAGS="$DEVWARN_CFLAGS ${misc_flag_prefix}-Wno-strict-prototypes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-prototypes) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-strict-prototypes) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi # compiler-specific global warning disables case "$CC_FAMILY" in Pathscale) # pathcc default enables -Wformat-security which we don't want # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-security) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-security") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-security" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format-security") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-format-security" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-format-security... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-security) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-security") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-security" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-security") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-security" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-security... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-security" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-security" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-security) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-security) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-security") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat-security" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat-security") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat-security" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat-security... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-security" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format-security" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat-security) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format-security) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; Open64) # Open64's maybe-uninitialized analysis is too broken to be usable # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-uninitialized) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-uninitialized") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-uninitialized" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-uninitialized") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-uninitialized" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-uninitialized... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuninitialized) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuninitialized") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wuninitialized" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuninitialized") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wuninitialized" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wuninitialized... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-uninitialized" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-uninitialized" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuninitialized) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuninitialized) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuninitialized") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wuninitialized" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuninitialized") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wuninitialized" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wuninitialized... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-uninitialized" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-uninitialized" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuninitialized) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-uninitialized) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # Open64 strict aliasing complains about (void **)/(T **) aliasing, which we use in places # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-strict-aliasing) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-strict-aliasing" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-strict-aliasing... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-aliasing) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstrict-aliasing" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstrict-aliasing... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-aliasing) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-aliasing) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstrict-aliasing") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstrict-aliasing" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstrict-aliasing... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-strict-aliasing" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstrict-aliasing) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-strict-aliasing) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; GNU) # GCC 11 appears to have analysis problems which yield bogus warnings (bugs 4228,4231,4232) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler is gcc 11 or higher" >&5 $as_echo_n "checking whether C compiler is gcc 11 or higher... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : is_gcc11_or_higher=yes else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" is_gcc11_or_higher=yes else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : is_gcc11_or_higher=yes else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" is_gcc11_or_higher=yes fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 is_gcc11_or_higher=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $is_gcc11_or_higher" >&5 $as_echo "$is_gcc11_or_higher" >&6; } if test "$is_gcc11_or_higher" = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-array-bounds) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-array-bounds") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-array-bounds" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-array-bounds") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-array-bounds" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-array-bounds... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Warray-bounds) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Warray-bounds") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Warray-bounds" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Warray-bounds") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Warray-bounds" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Warray-bounds... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-array-bounds" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-array-bounds" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Warray-bounds) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Warray-bounds) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Warray-bounds") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Warray-bounds" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Warray-bounds") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Warray-bounds" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Warray-bounds... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-array-bounds" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-array-bounds" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Warray-bounds) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-array-bounds) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-stringop-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-stringop-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-stringop-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstringop-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstringop-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstringop-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstringop-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstringop-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstringop-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstringop-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstringop-overflow) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstringop-overflow") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wstringop-overflow" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wstringop-overflow") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wstringop-overflow" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wstringop-overflow... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-stringop-overflow" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wstringop-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-stringop-overflow) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # These warnings were immediately problematic when introduced in 12.1 (bugs 4450,4451) # earlier versions silently ignore the unrecognized option # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-dangling-pointer) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-dangling-pointer" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-dangling-pointer... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wdangling-pointer) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wdangling-pointer") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wdangling-pointer" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wdangling-pointer") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wdangling-pointer" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wdangling-pointer... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wdangling-pointer) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wdangling-pointer) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wdangling-pointer") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wdangling-pointer" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wdangling-pointer") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wdangling-pointer" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wdangling-pointer... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-dangling-pointer" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wdangling-pointer) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-dangling-pointer) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-use-after-free) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-use-after-free") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-use-after-free" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-use-after-free") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-use-after-free" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-use-after-free... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuse-after-free) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuse-after-free") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wuse-after-free" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuse-after-free") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wuse-after-free" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wuse-after-free... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-use-after-free" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-use-after-free" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuse-after-free) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuse-after-free) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuse-after-free") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wuse-after-free" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wuse-after-free") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wuse-after-free" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wuse-after-free... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-use-after-free" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-use-after-free" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wuse-after-free) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-use-after-free) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi ;; esac # disable -Wformat if unsure we can support it for the printf implementation in use if test -z "$have_c99_format" ; then as_fn_error $? "Internal configure error - Wformat check missing" "$LINENO" 5 elif test "$have_c99_format" = 0 ; then # avoid false warnings # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-format") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-format" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-format... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wformat" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wformat") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wformat" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wformat... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-format" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wformat) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-format) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi # disable warnings that should always be off (not supported by our headers) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CC_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CC_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CC_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$CC_FAMILY" != "Open64" ; then # Open64 accepts the illegal option and botches it # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-result") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-result" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-result... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-result" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-result) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # -Wno-unused meta disable failed, try to disable the problematic sub-options individually # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-function" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-function") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-function" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-function... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-function" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-function) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-value" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-value") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-value" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-value... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-value" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-value) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) vvvvvvvvvvvvvvvvvvvvvv (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-variable" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-variable") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-variable" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-variable... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-variable" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-variable) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # -Wno-unused is not enough to ignore unused params on clang -Wall -Wextra (clang 3.8.1) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-parameter) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unused-parameter" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unused-parameter... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-parameter) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-parameter") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-parameter" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-parameter") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-parameter" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-parameter... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-parameter) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-parameter) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-parameter") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunused-parameter" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunused-parameter") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunused-parameter" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunused-parameter... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unused-parameter" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunused-parameter) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unused-parameter) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-address) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-address") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-address" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-address") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-address" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-address... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Waddress) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Waddress") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Waddress" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Waddress") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Waddress" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Waddress... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-address" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-address" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Waddress) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Waddress) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Waddress") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Waddress" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Waddress") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Waddress" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Waddress... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-address" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-address" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Waddress) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-address) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$use_pthreads" != "no" ; then # some crappy pthread mutex implementations generate warnings without -Wno-missing-braces { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy pthread.h mutex initializers" >&5 $as_echo_n "checking for buggy pthread.h mutex initializers... " >&6; } oldCFLAGS="$CFLAGS" CFLAGS="$DEVWARN_CFLAGS $CFLAGS" # FREEBSD requires the -pthread compiler flag when including pthread.h case "$target_os" in freebsd*) CFLAGS="-pthread $CFLAGS" ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < int main(void) { pthread_mutex_t fastmutex = PTHREAD_MUTEX_INITIALIZER; ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5 $as_echo "buggy" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-missing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-missing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-missing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-missing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-missing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-missing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wmissing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wmissing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-missing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5 $as_echo "buggy" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-missing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-missing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-missing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-missing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-missing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-missing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wmissing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) vvvvvvvvvvvvvvvvvvvvvv (L:8) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") vvvvvvvvvvvvvvvvvvvvvv (L:9) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wmissing-braces" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wmissing-braces") ^^^^^^^^^^^^^^^^^^^^^^ (L:9) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wmissing-braces... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:9) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:11) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } oldCFLAGS="$oldCFLAGS ${misc_flag_prefix}-Wno-missing-braces" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wmissing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:12) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:11) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:11) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:10) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-missing-braces) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 #bug611: ignore failures here, which may be due to broken/missing pthreads support #AC_MSG_ERROR(failure while checking for buggy pthread.h mutexes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: failure - ignored" >&5 $as_echo "failure - ignored" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) CFLAGS="$oldCFLAGS" fi case "$target_os" in solaris*) # hide pragma warnings in system header files included by absolute path # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unknown-pragmas) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wno-unknown-pragmas" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wno-unknown-pragmas... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunknown-pragmas) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunknown-pragmas" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunknown-pragmas... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunknown-pragmas) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunknown-pragmas) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-Wunknown-pragmas") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-Wunknown-pragmas" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-Wunknown-pragmas... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } CFLAGS="$CFLAGS ${misc_flag_prefix}-Wno-unknown-pragmas" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wunknown-pragmas) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-Wno-unknown-pragmas) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) esac #GASNET_TRY_CFLAG([-ansi -U__STRICT_ANSI__],[[C]FLAGS="$[C]FLAGS -ansi -U__STRICT_ANSI__"]) MISC_CFLAGS="$CFLAGS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; *) ;; esac # Set MISC_CPPFLAGS: flags to be used by all C preprocesses and compilations # Note this is ALSO used for C++ compilation, so only generic language-independent options should go in here # We do not currently allow a user override of MISC_C(PP)FLAGS # but this is where we embed the user's CPPFLAGS input to configure MISC_CPPFLAGS="$CPPFLAGS" case "$CC_FAMILY" in GNU) case "$target_os" in darwin*) # add some options which are specific to the Apple Inc version of gcc # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${misc_flag_prefix}-no-cpp-precomp) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-no-cpp-precomp") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${misc_flag_prefix}-no-cpp-precomp" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${misc_flag_prefix}-no-cpp-precomp") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${misc_flag_prefix}-no-cpp-precomp" >&5 $as_echo_n "checking for C compiler flag ${misc_flag_prefix}-no-cpp-precomp... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) MISC_CPPFLAGS="$MISC_CPPFLAGS ${misc_flag_prefix}-no-cpp-precomp" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } MISC_CPPFLAGS="$MISC_CPPFLAGS ${misc_flag_prefix}-no-cpp-precomp" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${misc_flag_prefix}-no-cpp-precomp) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) ;; esac ;; *) ;; esac # Determine the minimal CFLAGS we need to add for C99 compliance # This is done incrementally to avoid passing options on newer compiler versions where the # required compliance is provided by default, making the flag redundant (and potentially detrimental) # This also allows the user to pass a specific compliance flag in $CC without conflict case "$CC_FAMILY" in # Some known oddball cases: XLC) gasnet_c99_flags="-qlanglvl=extc99 -qlanglvl=stdc99";; Sun) gasnet_c99_flags="-xc99=all";; Cray) gasnet_c99_flags="'-h c99'";; PGI) gasnet_c99_flags="-c99 -c9x" ;; NVHPC) gasnet_c99_flags="-c99" ;; # One of these should work for the rest: # std=c99 requests strict C99 conformance from gcc and look-alikes, whereas # std=gnu99 additionally requests GNU-specific language extensions. # All GASNet code should adhere to the subset of strict C99 in the README coding standards, # (a subset of std=c99), however these flags are also used to compile network API headers # and client code that may require more general support. Therefore std=gnu99 is default. *) gasnet_c99_flags="${misc_flag_prefix}-std=gnu99 ${misc_flag_prefix}-c99 ${misc_flag_prefix}-std=c99";; esac # NOTE: We do not currently cache this check because it is expanded in multiple contexts GASNET_C99_FLAG=unknown eval set - $gasnet_c99_flags for flag in "" "$@"; do # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $MISC_CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $MISC_CFLAGS $MISC_CPPFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $MISC_CFLAGS $MISC_CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # first see if the flag generates warnings # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG($flag) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag $flag" >&5 $as_echo_n "checking for C compiler flag $flag... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # now see if it gives us the support we want # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void foo(void) { int a = 1; // C99 comment for (int i=0; i < 100; i++) a += i; // Conditional expression declaration int i = a; // mid-block decl int x = (int)(0x1234567812345678LL + 0x8765432187654321ULL + i); // (U)LL-suffix 64-bit integer literals } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : GASNET_C99_FLAG="$flag" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # now see if it gives us the support we want # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $flag" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $flag") ^^^^^^^^^^^^^^^^^^^^^^ (L:8) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void foo(void) { int a = 1; // C99 comment for (int i=0; i < 100; i++) a += i; // Conditional expression declaration int i = a; // mid-block decl int x = (int)(0x1234567812345678LL + 0x8765432187654321ULL + i); // (U)LL-suffix 64-bit integer literals } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : GASNET_C99_FLAG="$flag" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:8) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG($flag) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) if test "$GASNET_C99_FLAG" != "unknown"; then break; fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags required for C99 subset compliance" >&5 $as_echo_n "checking for flags required for C99 subset compliance... " >&6; } if test "$GASNET_C99_FLAG" = "unknown"; then as_fn_error $? "Could not determine \$MPI_CC flag to accept ISO C99 input. You may need to append flags in \$MPI_CC to enable C99 support" "$LINENO" 5 elif test "$GASNET_C99_FLAG" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: none required" >&5 $as_echo "none required" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GASNET_C99_FLAG" >&5 $as_echo "$GASNET_C99_FLAG" >&6; } MISC_CFLAGS="$MISC_CFLAGS $GASNET_C99_FLAG" fi MPI_MISCFLAGS="$MISC_CFLAGS $MISC_CPPFLAGS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CC) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CC" -ge "1"; then _pushcnt_CC=`expr $_pushcnt_CC - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CC_$_pushcnt_CC if test "$_gasnet_pushvar_isset" = "1" ; then eval CC=\$_pushedvar_CC_$_pushcnt_CC echo "popping CC back to: $CC" >&5 else unset CC echo "popping CC back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CC" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CC_FAMILY) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CC_FAMILY" -ge "1"; then _pushcnt_CC_FAMILY=`expr $_pushcnt_CC_FAMILY - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CC_FAMILY_$_pushcnt_CC_FAMILY if test "$_gasnet_pushvar_isset" = "1" ; then eval CC_FAMILY=\$_pushedvar_CC_FAMILY_$_pushcnt_CC_FAMILY echo "popping CC_FAMILY back to: $CC_FAMILY" >&5 else unset CC_FAMILY echo "popping CC_FAMILY back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CC_FAMILY" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CC_FAMILY) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) DEVWARN_MPI_CFLAGS="$DEVWARN_CFLAGS" MPI_CFLAGS="$GASNET_EXTRA_DEFINES $MPI_CFLAGS $MPI_MISCFLAGS" CFLAGS="$MPI_CFLAGS" # for platform check # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS -I$TOP_SRCDIR/other" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_STR(MPI compiler for PLATFORM_COMPILER_IDSTR,PLATFORM_MPI_CC_IDSTR,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI compiler for PLATFORM_COMPILER_IDSTR" >&5 $as_echo_n "checking MPI compiler for PLATFORM_COMPILER_IDSTR... " >&6; } if ${gasnet_cv_PLATFORM_MPI_CC_IDSTR+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_MPI_CC_IDSTR="" _extractstrembed='"$gasnetextractstr: (-(|" PLATFORM_COMPILER_IDSTR "|)-) $"' # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_PLATFORM_MPI_CC_IDSTR=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_IDSTR " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$gasnet_cv_PLATFORM_MPI_CC_IDSTR" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_PLATFORM_MPI_CC_IDSTR=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_IDSTR " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_MPI_CC_IDSTR" >&5 $as_echo "$gasnet_cv_PLATFORM_MPI_CC_IDSTR" >&6; } if test -n "$gasnet_cv_PLATFORM_MPI_CC_IDSTR" ; then GASNETI_PLATFORM_MPI_CC_IDSTR=$gasnet_cv_PLATFORM_MPI_CC_IDSTR fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_STR(MPI compiler for PLATFORM_COMPILER_IDSTR,PLATFORM_MPI_CC_IDSTR,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_MPI_CC_IDSTR "$GASNETI_PLATFORM_MPI_CC_IDSTR" _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(MPI compiler for PLATFORM_COMPILER_FAMILYID,PLATFORM_MPI_CC_FAMILYID,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI compiler for PLATFORM_COMPILER_FAMILYID" >&5 $as_echo_n "checking MPI compiler for PLATFORM_COMPILER_FAMILYID... " >&6; } if ${gasnet_cv_PLATFORM_MPI_CC_FAMILYID+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_MPI_CC_FAMILYID="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_FAMILYID )>0?( PLATFORM_COMPILER_FAMILYID ):-( PLATFORM_COMPILER_FAMILYID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_FAMILYID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_MPI_CC_FAMILYID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_FAMILYID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$gasnet_cv_PLATFORM_MPI_CC_FAMILYID" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_FAMILYID )>0?( PLATFORM_COMPILER_FAMILYID ):-( PLATFORM_COMPILER_FAMILYID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_FAMILYID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_MPI_CC_FAMILYID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_FAMILYID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_MPI_CC_FAMILYID" >&5 $as_echo "$gasnet_cv_PLATFORM_MPI_CC_FAMILYID" >&6; } if test -n "$gasnet_cv_PLATFORM_MPI_CC_FAMILYID" ; then GASNETI_PLATFORM_MPI_CC_FAMILYID=$gasnet_cv_PLATFORM_MPI_CC_FAMILYID fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(MPI compiler for PLATFORM_COMPILER_FAMILYID,PLATFORM_MPI_CC_FAMILYID,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_MPI_CC_FAMILYID $GASNETI_PLATFORM_MPI_CC_FAMILYID _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(MPI compiler for PLATFORM_COMPILER_ID,PLATFORM_MPI_CC_ID,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI compiler for PLATFORM_COMPILER_ID" >&5 $as_echo_n "checking MPI compiler for PLATFORM_COMPILER_ID... " >&6; } if ${gasnet_cv_PLATFORM_MPI_CC_ID+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_MPI_CC_ID="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_ID )>0?( PLATFORM_COMPILER_ID ):-( PLATFORM_COMPILER_ID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_ID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_MPI_CC_ID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_ID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$gasnet_cv_PLATFORM_MPI_CC_ID" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_ID )>0?( PLATFORM_COMPILER_ID ):-( PLATFORM_COMPILER_ID )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_ID )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_MPI_CC_ID=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_ID " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_MPI_CC_ID" >&5 $as_echo "$gasnet_cv_PLATFORM_MPI_CC_ID" >&6; } if test -n "$gasnet_cv_PLATFORM_MPI_CC_ID" ; then GASNETI_PLATFORM_MPI_CC_ID=$gasnet_cv_PLATFORM_MPI_CC_ID fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(MPI compiler for PLATFORM_COMPILER_ID,PLATFORM_MPI_CC_ID,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_MPI_CC_ID $GASNETI_PLATFORM_MPI_CC_ID _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(MPI compiler for PLATFORM_COMPILER_VERSION,PLATFORM_MPI_CC_VERSION,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI compiler for PLATFORM_COMPILER_VERSION" >&5 $as_echo_n "checking MPI compiler for PLATFORM_COMPILER_VERSION... " >&6; } if ${gasnet_cv_PLATFORM_MPI_CC_VERSION+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_MPI_CC_VERSION="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_VERSION )>0?( PLATFORM_COMPILER_VERSION ):-( PLATFORM_COMPILER_VERSION )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_VERSION )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_MPI_CC_VERSION=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_VERSION " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$gasnet_cv_PLATFORM_MPI_CC_VERSION" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_VERSION )>0?( PLATFORM_COMPILER_VERSION ):-( PLATFORM_COMPILER_VERSION )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_VERSION )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_MPI_CC_VERSION=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_VERSION " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_MPI_CC_VERSION" >&5 $as_echo "$gasnet_cv_PLATFORM_MPI_CC_VERSION" >&6; } if test -n "$gasnet_cv_PLATFORM_MPI_CC_VERSION" ; then GASNETI_PLATFORM_MPI_CC_VERSION=$gasnet_cv_PLATFORM_MPI_CC_VERSION fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(MPI compiler for PLATFORM_COMPILER_VERSION,PLATFORM_MPI_CC_VERSION,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_MPI_CC_VERSION $GASNETI_PLATFORM_MPI_CC_VERSION _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(MPI compiler for PLATFORM_COMPILER_C_LANGLVL,PLATFORM_MPI_CC_C_LANGLVL,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI compiler for PLATFORM_COMPILER_C_LANGLVL" >&5 $as_echo_n "checking MPI compiler for PLATFORM_COMPILER_C_LANGLVL... " >&6; } if ${gasnet_cv_PLATFORM_MPI_CC_C_LANGLVL+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_PLATFORM_MPI_CC_C_LANGLVL="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_C_LANGLVL )>0?( PLATFORM_COMPILER_C_LANGLVL ):-( PLATFORM_COMPILER_C_LANGLVL )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_C_LANGLVL )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_MPI_CC_C_LANGLVL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting PLATFORM_COMPILER_C_LANGLVL " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$gasnet_cv_PLATFORM_MPI_CC_C_LANGLVL" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) cat >conftest.$ac_ext < extern char s[]; #define DIGIT(d) (((char)(( (( PLATFORM_COMPILER_C_LANGLVL )>0?( PLATFORM_COMPILER_C_LANGLVL ):-( PLATFORM_COMPILER_C_LANGLVL )) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (( PLATFORM_COMPILER_C_LANGLVL )>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_PLATFORM_MPI_CC_C_LANGLVL=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting PLATFORM_COMPILER_C_LANGLVL " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PLATFORM_MPI_CC_C_LANGLVL" >&5 $as_echo "$gasnet_cv_PLATFORM_MPI_CC_C_LANGLVL" >&6; } if test -n "$gasnet_cv_PLATFORM_MPI_CC_C_LANGLVL" ; then GASNETI_PLATFORM_MPI_CC_C_LANGLVL=$gasnet_cv_PLATFORM_MPI_CC_C_LANGLVL fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(MPI compiler for PLATFORM_COMPILER_C_LANGLVL,PLATFORM_MPI_CC_C_LANGLVL,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) cat >>confdefs.h <<_ACEOF #define GASNETI_PLATFORM_MPI_CC_C_LANGLVL $GASNETI_PLATFORM_MPI_CC_C_LANGLVL _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) mismatch="" if test -z "$MPI_CC_FAMILY" || test -z "$CC_FAMILY"; then as_fn_error $? "Internal error in ID_OTHER_COMPILER_PLATFORM(MPI_CC)" "$LINENO" 5 elif test x"$MPI_CC_FAMILY" != x"$CC_FAMILY"; then mismatch="families" elif test x"$gasnet_cv_PLATFORM_MPI_CC_VERSION" != x"$gasnet_cv_PLATFORM_COMPILER_VERSION"; then mismatch="version codes" fi if test -n "$mismatch"; then idstr1=`echo "$gasnet_cv_PLATFORM_COMPILER_IDSTR" | $AWK -F'|' '{ printf("%-22s\t%s",$2,$3); }'` idstr2=`echo "$gasnet_cv_PLATFORM_MPI_CC_IDSTR" | $AWK -F'|' '{ printf("%-22s\t%s",$2,$3); }'` # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The compiler $mismatch of \$CC and \$MPI_CC do not match: CC: $idstr1 MPI_CC: $idstr2 If this is not what you intended, then set \$MPI_CC to select a different MPI compiler." >&5 $as_echo "$as_me: WARNING: The compiler $mismatch of \$CC and \$MPI_CC do not match: CC: $idstr1 MPI_CC: $idstr2 If this is not what you intended, then set \$MPI_CC to select a different MPI compiler." >&2;} echo "The compiler $mismatch of \$CC and \$MPI_CC do not match: CC: $idstr1 MPI_CC: $idstr2 If this is not what you intended, then set \$MPI_CC to select a different MPI compiler." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CC) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CC" -ge "1"; then _pushcnt_CC=`expr $_pushcnt_CC - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CC_$_pushcnt_CC if test "$_gasnet_pushvar_isset" = "1" ; then eval CC=\$_pushedvar_CC_$_pushcnt_CC echo "popping CC back to: $CC" >&5 else unset CC echo "popping CC back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CC" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(MISC_CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_MISC_CFLAGS" -ge "1"; then _pushcnt_MISC_CFLAGS=`expr $_pushcnt_MISC_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_MISC_CFLAGS_$_pushcnt_MISC_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval MISC_CFLAGS=\$_pushedvar_MISC_CFLAGS_$_pushcnt_MISC_CFLAGS echo "popping MISC_CFLAGS back to: $MISC_CFLAGS" >&5 else unset MISC_CFLAGS echo "popping MISC_CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on MISC_CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(MISC_CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(MISC_CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_MISC_CPPFLAGS" -ge "1"; then _pushcnt_MISC_CPPFLAGS=`expr $_pushcnt_MISC_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_MISC_CPPFLAGS_$_pushcnt_MISC_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval MISC_CPPFLAGS=\$_pushedvar_MISC_CPPFLAGS_$_pushcnt_MISC_CPPFLAGS echo "popping MISC_CPPFLAGS back to: $MISC_CPPFLAGS" >&5 else unset MISC_CPPFLAGS echo "popping MISC_CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on MISC_CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(MISC_CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(DEVWARN_CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_DEVWARN_CFLAGS" -ge "1"; then _pushcnt_DEVWARN_CFLAGS=`expr $_pushcnt_DEVWARN_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_DEVWARN_CFLAGS_$_pushcnt_DEVWARN_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval DEVWARN_CFLAGS=\$_pushedvar_DEVWARN_CFLAGS_$_pushcnt_DEVWARN_CFLAGS echo "popping DEVWARN_CFLAGS back to: $DEVWARN_CFLAGS" >&5 else unset DEVWARN_CFLAGS echo "popping DEVWARN_CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on DEVWARN_CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(DEVWARN_CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPI compiler \"$MPI_CC\" was not found. Consider passing --with-mpi-cc=/path/to/mpicc if you want mpi-conduit or require MPI compatibility" >&5 $as_echo "$as_me: WARNING: MPI compiler \"$MPI_CC\" was not found. Consider passing --with-mpi-cc=/path/to/mpicc if you want mpi-conduit or require MPI compatibility" >&2;} echo "MPI compiler \"$MPI_CC\" was not found. Consider passing --with-mpi-cc=/path/to/mpicc if you want mpi-conduit or require MPI compatibility" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # Avoid unecessary and potentially confusing probes and their errors/warnings MPI_CC= have_mpi=no mpi_reason="was not found" fi fi if test $have_mpi = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_GETFULLPATH(MPIRUN_CMD) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$gasnet_cv__gfp_disable" = ""; then if echo "$MPIRUN_CMD" | $AWK -F' ' '{if ($1 ~ /^(.*\/)?env$/) exit 0; else exit 1;}' >/dev/null; then for ac_prog in $ENVCMD env do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ENVCMD+:} false; then : $as_echo_n "(cached) " >&6 else case $ENVCMD in [\\/]* | ?:[\\/]*) ac_cv_path_ENVCMD="$ENVCMD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ENVCMD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ENVCMD=$ac_cv_path_ENVCMD if test -n "$ENVCMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENVCMD" >&5 $as_echo "$ENVCMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ENVCMD" && break done # assemble "ENVCMD key=val key=val " with a trailing space gasnet_gfp_progenv="$ENVCMD "`echo "$MPIRUN_CMD" | $AWK -F' ' 'BEGIN { ORS=" "; } { for (i=2;i<=NF;i++) { if ($i ~ /=/) { print $i; } else break; } }'` # just the program name gasnet_gfp_progname=`echo "$MPIRUN_CMD" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i<=NF;i++) { if ($i !~ /=/) { print $i; break; } } }'` # list of program arguments with no trailing space gasnet_gfp_progargs=`echo "$MPIRUN_CMD" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_gasnet_cv__gfp_fullprogname_MPIRUN_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $gasnet_cv__gfp_fullprogname_MPIRUN_CMD in [\\/]* | ?:[\\/]*) ac_cv_path_gasnet_cv__gfp_fullprogname_MPIRUN_CMD="$gasnet_cv__gfp_fullprogname_MPIRUN_CMD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_gasnet_cv__gfp_fullprogname_MPIRUN_CMD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi gasnet_cv__gfp_fullprogname_MPIRUN_CMD=$ac_cv_path_gasnet_cv__gfp_fullprogname_MPIRUN_CMD if test -n "$gasnet_cv__gfp_fullprogname_MPIRUN_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv__gfp_fullprogname_MPIRUN_CMD" >&5 $as_echo "$gasnet_cv__gfp_fullprogname_MPIRUN_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$gasnet_cv__gfp_fullprogname_MPIRUN_CMD" != "" ; then gasnet_gfp_progname="$gasnet_cv__gfp_fullprogname_MPIRUN_CMD" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for full path expansion of MPIRUN_CMD" >&5 $as_echo_n "checking for full path expansion of MPIRUN_CMD... " >&6; } if test -n "$gasnet_gfp_progargs" ; then MPIRUN_CMD="$gasnet_gfp_progenv$gasnet_gfp_progname $gasnet_gfp_progargs" else MPIRUN_CMD="$gasnet_gfp_progenv$gasnet_gfp_progname" fi #echo "gasnet_gfp_progenv='$gasnet_gfp_progenv'" #echo "gasnet_gfp_progname='$gasnet_gfp_progname'" #echo "gasnet_gfp_progargs='$gasnet_gfp_progargs'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIRUN_CMD" >&5 $as_echo "$MPIRUN_CMD" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_GETFULLPATH(MPIRUN_CMD) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi # now run a basic test of the MPI configuration to make sure it works if test $have_mpi = yes; then # we link in an object compiled with CC that uses libc, to ensure that's working { $as_echo "$as_me:${as_lineno-$LINENO}: checking building MPI helper object" >&5 $as_echo_n "checking building MPI helper object... " >&6; } cat >$LINKHELPER_SRC <<_GASNET_EOF #include #include #include #include int linkhelper_cint = 0xFFFF; $LINKHELPER_TLS_DECL extern void linkhelper_cfunc(int val) { char s[255], s2[255]; int a[40] = {1}; /* trigger Intel C issue */ assert(val == linkhelper_cint); s[4] = '\0'; s[5] = (char)(sin((double)val)+cos((double)val))+sqrt((double)val)+log((double)val); strcpy(s2, s); memcpy(s2, s, strlen(s)); memmove(s2, s, strlen(s)); memcpy(s2, s, 4); memmove(s2, s, 4); $LINKHELPER_TLS_CODE } _GASNET_EOF compile="$CC $CFLAGS $CPPFLAGS -c $LINKHELPER_SRC -o $LINKHELPER_OBJ" eval echo "$compile" >&5 if eval $compile 2>&5 && test -s $LINKHELPER_OBJ ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else echo echo "configure error: failed while building MPI helper object" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # we need a clean slate here because MPI config may be totally different # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CC,"$MPI_CC") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CC" = "" ; then _pushcnt_CC=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CC+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CC_$_pushcnt_CC=\$CC eval _pushedvarset_CC_$_pushcnt_CC=$_gasnet_pushvar_isset _pushcnt_CC=`expr $_pushcnt_CC + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CC="$MPI_CC" echo "pushed new CC value: $CC" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CC,"$MPI_CC") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$MPI_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$MPI_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$MPI_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$MPI_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$MPI_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$MPI_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # we just try to link an MPI app - running MPI apps is a whole new can of worms # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LINKHELPER_LIBS $LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LINKHELPER_LIBS $LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LINKHELPER_LIBS $LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working MPI configuration,mpi_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working MPI configuration" >&5 $as_echo_n "checking for working MPI configuration... " >&6; } if ${gasnet_cv_mpi_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __cplusplus #error MPI_CC must be a true MPI-enabled ANSI C compiler - a C++ compiler is not an acceptable replacement. #endif #ifdef __cplusplus extern "C" { #endif $LINKHELPER_DECL #ifdef __cplusplus } #endif int main () { $LINKHELPER_CODE MPI_Init((void*)0,(void*)0); MPI_Finalize(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_mpi_works=yes else gasnet_cv_mpi_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_works" >&5 $as_echo "$gasnet_cv_mpi_works" >&6; } if test "$gasnet_cv_mpi_works" = yes; then : mpi_test_worked=yes else : mpi_test_worked=no if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working MPI configuration,mpi_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # Apple's gcc (and thus their mpicc) doesn't provide TLS support, but the # FSF gcc does. The two are link compatible IF we explicitly pass -lgcc_eh # XXX: Really only needed for PAR and PARSYNC, but we don't distinguish. if test "$mpi_test_worked$have_tls$CC_FAMILY" = noyesGNU; then LIBS="$LIBS $LIBGCC -lgcc_eh" # $LIBGCC appears in $GASNET_LIBS eventually # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LINKHELPER_LIBS $LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LINKHELPER_LIBS $LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LINKHELPER_LIBS $LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working MPI configuration w/ added -lgcc_eh,mpi_works_gcc_eh,...) vvvvvvvvvvvvvvvvvvvvvv (L:3) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working MPI configuration w/ added -lgcc_eh" >&5 $as_echo_n "checking for working MPI configuration w/ added -lgcc_eh... " >&6; } if ${gasnet_cv_mpi_works_gcc_eh+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __cplusplus #error MPI_CC must be a true MPI-enabled ANSI C compiler - a C++ compiler is not an acceptable replacement. #endif #ifdef __cplusplus extern "C" { #endif $LINKHELPER_DECL #ifdef __cplusplus } #endif int main () { $LINKHELPER_CODE MPI_Init((void*)0,(void*)0); MPI_Finalize(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_mpi_works_gcc_eh=yes else gasnet_cv_mpi_works_gcc_eh=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_works_gcc_eh" >&5 $as_echo "$gasnet_cv_mpi_works_gcc_eh" >&6; } if test "$gasnet_cv_mpi_works_gcc_eh" = yes; then : mpi_test_worked=yes MPI_LIBS="$MPI_LIBS -lgcc_eh" else : mpi_test_worked=no if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working MPI configuration w/ added -lgcc_eh,mpi_works_gcc_eh,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:3) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:3) fi rm -f $LINKHELPER_SRC $LINKHELPER_OBJ if test "$mpi_test_worked" = yes ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_RESTRICT vvvvvvvvvvvvvvvvvvvvvv (L:3) restrict_keyword="" # Due to xlc/mpcc_r oddity on AIX, we check "__restrict__" before "restrict". # Both ID the same, but xlc accepts either while mpcc_r only takes "__restrict__". if test "$restrict_keyword" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(MPI_CC for __restrict__ keyword,gasneti_mpi_cc__restrict__,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __restrict__ keyword" >&5 $as_echo_n "checking MPI_CC for __restrict__ keyword... " >&6; } if ${gasnet_cv_gasneti_mpi_cc__restrict__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int dummy(void * __restrict__ p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_gasneti_mpi_cc__restrict__=yes else gasnet_cv_gasneti_mpi_cc__restrict__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_mpi_cc__restrict__" >&5 $as_echo "$gasnet_cv_gasneti_mpi_cc__restrict__" >&6; } if test "$gasnet_cv_gasneti_mpi_cc__restrict__" = yes; then : restrict_keyword="__restrict__" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(MPI_CC for __restrict__ keyword,gasneti_mpi_cc__restrict__,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$restrict_keyword" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(MPI_CC for restrict keyword,gasneti_mpi_ccrestrict,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for restrict keyword" >&5 $as_echo_n "checking MPI_CC for restrict keyword... " >&6; } if ${gasnet_cv_gasneti_mpi_ccrestrict+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int dummy(void * restrict p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_gasneti_mpi_ccrestrict=yes else gasnet_cv_gasneti_mpi_ccrestrict=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_mpi_ccrestrict" >&5 $as_echo "$gasnet_cv_gasneti_mpi_ccrestrict" >&6; } if test "$gasnet_cv_gasneti_mpi_ccrestrict" = yes; then : restrict_keyword="restrict" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(MPI_CC for restrict keyword,gasneti_mpi_ccrestrict,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$restrict_keyword" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(MPI_CC for __restrict keyword,gasneti_mpi_cc__restrict,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __restrict keyword" >&5 $as_echo_n "checking MPI_CC for __restrict keyword... " >&6; } if ${gasnet_cv_gasneti_mpi_cc__restrict+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int dummy(void * __restrict p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_gasneti_mpi_cc__restrict=yes else gasnet_cv_gasneti_mpi_cc__restrict=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_mpi_cc__restrict" >&5 $as_echo "$gasnet_cv_gasneti_mpi_cc__restrict" >&6; } if test "$gasnet_cv_gasneti_mpi_cc__restrict" = yes; then : restrict_keyword="__restrict" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(MPI_CC for __restrict keyword,gasneti_mpi_cc__restrict,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi cat >>confdefs.h <<_ACEOF #define GASNETI_MPI_CC_RESTRICT $restrict_keyword _ACEOF restrict_on_typedefs=0 # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(MPI_CC for restrict qualifying typedefs,gasneti_mpi_cc_restrict_typedefs,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for restrict qualifying typedefs" >&5 $as_echo_n "checking MPI_CC for restrict qualifying typedefs... " >&6; } if ${gasnet_cv_gasneti_mpi_cc_restrict_typedefs+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef void *foo_t; int dummy(foo_t GASNETI_MPI_CC_RESTRICT p) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_gasneti_mpi_cc_restrict_typedefs=yes else gasnet_cv_gasneti_mpi_cc_restrict_typedefs=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_mpi_cc_restrict_typedefs" >&5 $as_echo "$gasnet_cv_gasneti_mpi_cc_restrict_typedefs" >&6; } if test "$gasnet_cv_gasneti_mpi_cc_restrict_typedefs" = yes; then : restrict_on_typedefs=1 else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(MPI_CC for restrict qualifying typedefs,gasneti_mpi_cc_restrict_typedefs,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat >>confdefs.h <<_ACEOF #define GASNETI_MPI_CC_RESTRICT_MAY_QUALIFY_TYPEDEFS $restrict_on_typedefs _ACEOF # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_RESTRICT ^^^^^^^^^^^^^^^^^^^^^^ (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_ASM_SUPPORT(MPI_CC,MPI_CC) vvvvvvvvvvvvvvvvvvvvvv (L:3) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -I$TOP_SRCDIR/other") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -I$TOP_SRCDIR/other" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -I$TOP_SRCDIR/other") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) case "$MPI_CC_FAMILY" in Sun) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(MPI_CC for simple inline asm() support,mpi_cc_simple_asm,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for simple inline asm() support" >&5 $as_echo_n "checking MPI_CC for simple inline asm() support... " >&6; } if ${gasnet_cv_mpi_cc_simple_asm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { asm("nop"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_mpi_cc_simple_asm=yes else gasnet_cv_mpi_cc_simple_asm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_cc_simple_asm" >&5 $as_echo "$gasnet_cv_mpi_cc_simple_asm" >&6; } if test "$gasnet_cv_mpi_cc_simple_asm" = yes; then : $as_echo "#define GASNETI_HAVE_MPI_CC_SIMPLE_ASM 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(MPI_CC for simple inline asm() support,mpi_cc_simple_asm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # We lack a reliable configure probe to diagnose broken GCC inline asm support on Sun C # We only know 5.12 and newer on x86/x86-64 are reliable (see bug 2941) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(MPI_CC for GCC inline asm support,mpi_cc_gcc_asm,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for GCC inline asm support" >&5 $as_echo_n "checking MPI_CC for GCC inline asm support... " >&6; } if ${gasnet_cv_mpi_cc_gcc_asm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "gasnet_portable_platform.h" int main () { #if (PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64) && PLATFORM_COMPILER_VERSION_GE(5,12,0) __asm__ __volatile__ ("lock; addl \$0,0(%%esp)" : : : "memory", "cc"); #else #error Support has not been verified #endif ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_mpi_cc_gcc_asm=yes else gasnet_cv_mpi_cc_gcc_asm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_cc_gcc_asm" >&5 $as_echo "$gasnet_cv_mpi_cc_gcc_asm" >&6; } if test "$gasnet_cv_mpi_cc_gcc_asm" = yes; then : $as_echo "#define GASNETI_HAVE_MPI_CC_GCC_ASM 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(MPI_CC for GCC inline asm support,mpi_cc_gcc_asm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; XLC) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GCC_ASM(MPI_CC,MPI_CC) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$target_cpu" in # TODO: expand as this becomes reachable on other CPUs rs6000|powerpc*) gcc_asm_string='"sync"';; *) as_fn_error $? "Internal error - GASNET_CHECK_GCC_ASM called for unknown architecture" "$LINENO" 5 ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(MPI_CC for GCC inline asm support,mpi_cc_gcc_asm,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for GCC inline asm support" >&5 $as_echo_n "checking MPI_CC for GCC inline asm support... " >&6; } if ${gasnet_cv_mpi_cc_gcc_asm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__ __volatile__ ($gcc_asm_string); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_mpi_cc_gcc_asm=yes else gasnet_cv_mpi_cc_gcc_asm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_cc_gcc_asm" >&5 $as_echo "$gasnet_cv_mpi_cc_gcc_asm" >&6; } if test "$gasnet_cv_mpi_cc_gcc_asm" = yes; then : $as_echo "#define GASNETI_HAVE_MPI_CC_GCC_ASM 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(MPI_CC for GCC inline asm support,mpi_cc_gcc_asm,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) ;; GNU|Intel|Pathscale|Open64|Clang|NVHPC|PGI|TINY) # Currently believe all of these support GCC-style inline ASM on all CPUs # where we use it. If that is ever *not* the case then one should split # off the case for the relevant compiler and apply banlists or probes. # NOTE: be sure to keep gasnet_asm.h in-sync with any changes made here. $as_echo "#define GASNETI_HAVE_MPI_CC_GCC_ASM 1" >>confdefs.h ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(MPI_CC for 32-bit __sync atomics support,mpi_cc_sync_atomics_32,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for 32-bit __sync atomics support" >&5 $as_echo_n "checking MPI_CC for 32-bit __sync atomics support... " >&6; } if ${gasnet_cv_mpi_cc_sync_atomics_32+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "portable_inttypes.h" int main () { struct { volatile uint32_t ctr; } x = { 2 }; uint32_t op = 1; uint32_t oval = 2; uint32_t nval = 3; volatile uint32_t result; result = __sync_bool_compare_and_swap(&(x.ctr), oval, nval) + __sync_val_compare_and_swap(&(x.ctr), nval, oval) + __sync_fetch_and_add(&(x.ctr), op); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_mpi_cc_sync_atomics_32=yes else gasnet_cv_mpi_cc_sync_atomics_32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_cc_sync_atomics_32" >&5 $as_echo "$gasnet_cv_mpi_cc_sync_atomics_32" >&6; } if test "$gasnet_cv_mpi_cc_sync_atomics_32" = yes; then : $as_echo "#define GASNETI_HAVE_MPI_CC_SYNC_ATOMICS_32 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(MPI_CC for 32-bit __sync atomics support,mpi_cc_sync_atomics_32,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(MPI_CC for 64-bit __sync atomics support,mpi_cc_sync_atomics_64,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for 64-bit __sync atomics support" >&5 $as_echo_n "checking MPI_CC for 64-bit __sync atomics support... " >&6; } if ${gasnet_cv_mpi_cc_sync_atomics_64+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "portable_inttypes.h" int main () { struct { volatile uint64_t ctr; } x = { 2 }; uint64_t op = 1; uint64_t oval = 2; uint64_t nval = 3; volatile uint64_t result; result = __sync_bool_compare_and_swap(&(x.ctr), oval, nval) + __sync_val_compare_and_swap(&(x.ctr), nval, oval) + __sync_fetch_and_add(&(x.ctr), op); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_mpi_cc_sync_atomics_64=yes else gasnet_cv_mpi_cc_sync_atomics_64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_cc_sync_atomics_64" >&5 $as_echo "$gasnet_cv_mpi_cc_sync_atomics_64" >&6; } if test "$gasnet_cv_mpi_cc_sync_atomics_64" = yes; then : $as_echo "#define GASNETI_HAVE_MPI_CC_SYNC_ATOMICS_64 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(MPI_CC for 64-bit __sync atomics support,mpi_cc_sync_atomics_64,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_ASM_SUPPORT ^^^^^^^^^^^^^^^^^^^^^^ (L:4) inlinemod="" case "$MPI_CC_FAMILY" in XLC) # force __inline on XLC, to avoid warnings inlinemod=__inline ;; esac if test -z "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(MPI_CC for inline modifier,mpi_ccmodinline,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for inline modifier" >&5 $as_echo_n "checking MPI_CC for inline modifier... " >&6; } if ${gasnet_cv_mpi_ccmodinline+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ inline int dummy(void) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_ccmodinline=yes else gasnet_cv_mpi_ccmodinline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_ccmodinline" >&5 $as_echo "$gasnet_cv_mpi_ccmodinline" >&6; } if test "$gasnet_cv_mpi_ccmodinline" = yes; then : inlinemod="inline" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(MPI_CC for inline modifier,mpi_ccmodinline,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test -z "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(MPI_CC for __inline__ modifier,mpi_ccmod__inline__,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __inline__ modifier" >&5 $as_echo_n "checking MPI_CC for __inline__ modifier... " >&6; } if ${gasnet_cv_mpi_ccmod__inline__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ __inline__ int dummy(void) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_ccmod__inline__=yes else gasnet_cv_mpi_ccmod__inline__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_ccmod__inline__" >&5 $as_echo "$gasnet_cv_mpi_ccmod__inline__" >&6; } if test "$gasnet_cv_mpi_ccmod__inline__" = yes; then : inlinemod="__inline__" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(MPI_CC for __inline__ modifier,mpi_ccmod__inline__,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test -z "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(MPI_CC for __inline modifier,mpi_ccmod__inline,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __inline modifier" >&5 $as_echo_n "checking MPI_CC for __inline modifier... " >&6; } if ${gasnet_cv_mpi_ccmod__inline+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ __inline int dummy(void) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_ccmod__inline=yes else gasnet_cv_mpi_ccmod__inline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_ccmod__inline" >&5 $as_echo "$gasnet_cv_mpi_ccmod__inline" >&6; } if test "$gasnet_cv_mpi_ccmod__inline" = yes; then : inlinemod="__inline" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(MPI_CC for __inline modifier,mpi_ccmod__inline,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test -z "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(MPI_CC for _inline modifier,mpi_ccmod_inline,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for _inline modifier" >&5 $as_echo_n "checking MPI_CC for _inline modifier... " >&6; } if ${gasnet_cv_mpi_ccmod_inline+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _inline int dummy(void) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_ccmod_inline=yes else gasnet_cv_mpi_ccmod_inline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_ccmod_inline" >&5 $as_echo "$gasnet_cv_mpi_ccmod_inline" >&6; } if test "$gasnet_cv_mpi_ccmod_inline" = yes; then : inlinemod="_inline" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(MPI_CC for _inline modifier,mpi_ccmod_inline,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test -z "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(MPI_CC for _Inline modifier,mpi_ccmod_Inline,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for _Inline modifier" >&5 $as_echo_n "checking MPI_CC for _Inline modifier... " >&6; } if ${gasnet_cv_mpi_ccmod_Inline+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _Inline int dummy(void) { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_ccmod_Inline=yes else gasnet_cv_mpi_ccmod_Inline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_ccmod_Inline" >&5 $as_echo "$gasnet_cv_mpi_ccmod_Inline" >&6; } if test "$gasnet_cv_mpi_ccmod_Inline" = yes; then : inlinemod="_Inline" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(MPI_CC for _Inline modifier,mpi_ccmod_Inline,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test -n "$inlinemod"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(MPI_CC for working 'static $inlinemod',mpi_cc_static_inline,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for working 'static $inlinemod'" >&5 $as_echo_n "checking MPI_CC for working 'static $inlinemod'... " >&6; } if ${gasnet_cv_mpi_cc_static_inline+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ static $inlinemod int dummy() { return 1; } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_cc_static_inline=yes else gasnet_cv_mpi_cc_static_inline=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_cc_static_inline" >&5 $as_echo "$gasnet_cv_mpi_cc_static_inline" >&6; } if test "$gasnet_cv_mpi_cc_static_inline" = yes; then : inlinemod="static $inlinemod" else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(MPI_CC for working 'static $inlinemod',mpi_cc_static_inline,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi cat >>confdefs.h <<_ACEOF #define GASNETI_MPI_CC_INLINE_MODIFIER $inlinemod _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__always_inline__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__always_inline__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__always_inline__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_alwaysinline+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_alwaysinline='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_alwaysinline='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_alwaysinline='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_alwaysinline='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_alwaysinline='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_alwaysinline" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_alwaysinline" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_alwaysinline" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_ALWAYSINLINE 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_ALWAYSINLINE 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__always_inline__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__noinline__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__noinline__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__noinline__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_noinline+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_noinline='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_noinline='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_noinline='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_noinline='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_noinline='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_noinline" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_noinline" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_noinline" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_NOINLINE 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_NOINLINE 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__noinline__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__malloc__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__malloc__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__malloc__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_malloc+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < __attribute__((__malloc__)) void * dummy(void) { return malloc(14); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:7) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_malloc='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_malloc='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_malloc='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_malloc='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_malloc='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_malloc" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_malloc" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_malloc" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_MALLOC 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_MALLOC 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__malloc__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__warn_unused_result__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__warn_unused_result__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__warn_unused_result__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_warnunusedresult+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_warnunusedresult='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_warnunusedresult='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_warnunusedresult='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_warnunusedresult='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_warnunusedresult='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_warnunusedresult" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_warnunusedresult" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_warnunusedresult" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_WARNUNUSEDRESULT 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_WARNUNUSEDRESULT 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__warn_unused_result__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__used__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__used__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__used__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_used+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < __attribute__((__used__)) void dummy(void) { abort(); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:7) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_used='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_used='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_used='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_used='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_used='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_used" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_used" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_used" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_USED 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_USED 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__used__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__may_alias__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__may_alias__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__may_alias__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_mayalias+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_mayalias='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_mayalias='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_mayalias='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_mayalias='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_mayalias='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_mayalias" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_mayalias" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_mayalias" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_MAYALIAS 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_MAYALIAS 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__may_alias__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__noreturn__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__noreturn__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__noreturn__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_noreturn+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < __attribute__((__noreturn__)) void dummy(void) { abort(); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:7) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_noreturn='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_noreturn='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_noreturn='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_noreturn='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_noreturn='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_noreturn" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_noreturn" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_noreturn" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_NORETURN 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_NORETURN 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__noreturn__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__const__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__const__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__const__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_const+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_const='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_const='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_const='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_const='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_const='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_const" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_const" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_const" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_CONST 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_CONST 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__const__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__pure__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__pure__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__pure__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_pure+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_pure='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_pure='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_pure='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_pure='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_pure='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_pure" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_pure" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_pure" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_PURE 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_PURE 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__pure__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__hot__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__hot__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__hot__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_hot+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_hot='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_hot='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_hot='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_hot='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_hot='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_hot" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_hot" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_hot" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_HOT 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_HOT 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__hot__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__cold__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__cold__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__cold__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_cold+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_cold='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_cold='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_cold='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_cold='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_cold='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_cold" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_cold" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_cold" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_COLD 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_COLD 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__cold__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__deprecated__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__deprecated__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__deprecated__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_deprecated+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_deprecated='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_deprecated='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_deprecated='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_deprecated='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_deprecated='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_deprecated" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_deprecated" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_deprecated" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_DEPRECATED 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_DEPRECATED 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__deprecated__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__common__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__common__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__common__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_common+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_common='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_common='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_common='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_common='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_common='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_common" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_common" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_common" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_COMMON 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_COMMON 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__common__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__fallthrough__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__fallthrough__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__fallthrough__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_fallthrough+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_fallthrough='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_fallthrough='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_fallthrough='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_fallthrough='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_fallthrough='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_fallthrough" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_fallthrough" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_fallthrough" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_FALLTHROUGH 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_FALLTHROUGH 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__fallthrough__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__format__) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__format__))" >&5 $as_echo_n "checking MPI_CC for __attribute__((__format__))... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_format+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < __attribute__((__format__ (__printf__, 1, 2))) void dummy(const char *fmt,...) { va_list argptr; va_start(argptr, fmt); va_end(argptr); } int main(void) { ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:7) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_format='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:8) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_format='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_format='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_format='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:9) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_format='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_format" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_format" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_format" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT 1" >>confdefs.h $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT 0" >>confdefs.h fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_GNU_ATTRIBUTE(GASNETI_HAVE_MPI_CC,MPI_CC,__format__) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__format__)) on function pointers" >&5 $as_echo_n "checking MPI_CC for __attribute__((__format__)) on function pointers... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT_FUNCPTR 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT_FUNCPTR 0" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __attribute__((__format__)) on function pointers as arguments" >&5 $as_echo_n "checking MPI_CC for __attribute__((__format__)) on function pointers as arguments... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr_arg+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr_arg='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr_arg='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr_arg='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr_arg='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr_arg='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr_arg" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr_arg" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_attr_format_funcptr_arg" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT_FUNCPTR_ARG 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT_FUNCPTR_ARG 0" >>confdefs.h fi # bug 3613: try to enable any warning settings that might be relevant to -Wunknown-pragmas # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="$CPPFLAGS" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) _gasnet_CPPFLAGS_back="$CPPFLAGS" for flag in '-Wall' '-Wextra' '-Wunknown-pragmas' ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler flag $flag" >&5 $as_echo_n "checking for compiler flag $flag... " >&6; } CPPFLAGS="$CPPFLAGS $flag" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; _gasnet_CPPFLAGS_back="$CPPFLAGS" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; CPPFLAGS="$_gasnet_CPPFLAGS_back" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; _gasnet_CPPFLAGS_back="$CPPFLAGS" else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; CPPFLAGS="$_gasnet_CPPFLAGS_back" fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; CPPFLAGS="$_gasnet_CPPFLAGS_back" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) done { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for pragma GCC diagnostic push/pop/ignored" >&5 $as_echo_n "checking MPI_CC for pragma GCC diagnostic push/pop/ignored... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc_pragma_gcc_diagnostic+:} false; then : $as_echo_n "(cached) " >&6 else # Note we're not checking whether the pragma actually *does* anything, # we only care that it doesn't generate new warnings, ie silently ignored is fine for our purposes # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_gasneti_have_mpi_cc_pragma_gcc_diagnostic='yes' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_pragma_gcc_diagnostic='no/warning' else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_gasneti_have_mpi_cc_pragma_gcc_diagnostic='yes' else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_gasneti_have_mpi_cc_pragma_gcc_diagnostic='no/warning' fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 gasnet_cv_gasneti_have_mpi_cc_pragma_gcc_diagnostic='no/error' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc_pragma_gcc_diagnostic" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc_pragma_gcc_diagnostic" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc_pragma_gcc_diagnostic" = yes; then $as_echo "#define GASNETI_HAVE_MPI_CC_PRAGMA_GCC_DIAGNOSTIC 1" >>confdefs.h else $as_echo "#define GASNETI_HAVE_MPI_CC_PRAGMA_GCC_DIAGNOSTIC 0" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_BUILTINS vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(MPI_CC for __assume,gasneti_have_mpi_cc__assume,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __assume" >&5 $as_echo_n "checking MPI_CC for __assume... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc__assume+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { __assume(x == 0); if (x) __assume(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_mpi_cc__assume=yes else gasnet_cv_gasneti_have_mpi_cc__assume=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc__assume" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc__assume" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc__assume" = yes; then : $as_echo "#define GASNETI_HAVE_MPI_CC_ASSUME 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(MPI_CC for __assume,gasneti_have_mpi_cc__assume,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(MPI_CC for __builtin_assume,gasneti_have_mpi_cc__builtin_assume,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __builtin_assume" >&5 $as_echo_n "checking MPI_CC for __builtin_assume... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc__builtin_assume+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { __builtin_assume(x == 0); if (x) __builtin_assume(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_mpi_cc__builtin_assume=yes else gasnet_cv_gasneti_have_mpi_cc__builtin_assume=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc__builtin_assume" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc__builtin_assume" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc__builtin_assume" = yes; then : $as_echo "#define GASNETI_HAVE_MPI_CC_BUILTIN_ASSUME 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(MPI_CC for __builtin_assume,gasneti_have_mpi_cc__builtin_assume,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(MPI_CC for __builtin_unreachable,gasneti_have_mpi_cc__builtin_unreachable,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __builtin_unreachable" >&5 $as_echo_n "checking MPI_CC for __builtin_unreachable... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc__builtin_unreachable+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { if (x) { __builtin_unreachable(), ((void)0); } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_mpi_cc__builtin_unreachable=yes else gasnet_cv_gasneti_have_mpi_cc__builtin_unreachable=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc__builtin_unreachable" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc__builtin_unreachable" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc__builtin_unreachable" = yes; then : $as_echo "#define GASNETI_HAVE_MPI_CC_BUILTIN_UNREACHABLE 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(MPI_CC for __builtin_unreachable,gasneti_have_mpi_cc__builtin_unreachable,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(MPI_CC for __builtin_expect,gasneti_have_mpi_cc__builtin_expect,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __builtin_expect" >&5 $as_echo_n "checking MPI_CC for __builtin_expect... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc__builtin_expect+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { if (__builtin_expect(x,1)) return 1; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_mpi_cc__builtin_expect=yes else gasnet_cv_gasneti_have_mpi_cc__builtin_expect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc__builtin_expect" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc__builtin_expect" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc__builtin_expect" = yes; then : $as_echo "#define GASNETI_HAVE_MPI_CC_BUILTIN_EXPECT 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(MPI_CC for __builtin_expect,gasneti_have_mpi_cc__builtin_expect,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(MPI_CC for __builtin_constant_p,gasneti_have_mpi_cc__builtin_constant_p,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __builtin_constant_p" >&5 $as_echo_n "checking MPI_CC for __builtin_constant_p... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc__builtin_constant_p+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { x = __builtin_constant_p(x) + __builtin_constant_p(2); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_mpi_cc__builtin_constant_p=yes else gasnet_cv_gasneti_have_mpi_cc__builtin_constant_p=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc__builtin_constant_p" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc__builtin_constant_p" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc__builtin_constant_p" = yes; then : $as_echo "#define GASNETI_HAVE_MPI_CC_BUILTIN_CONSTANT_P 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(MPI_CC for __builtin_constant_p,gasneti_have_mpi_cc__builtin_constant_p,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(MPI_CC for __builtin_prefetch,gasneti_have_mpi_cc__builtin_prefetch,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for __builtin_prefetch" >&5 $as_echo_n "checking MPI_CC for __builtin_prefetch... " >&6; } if ${gasnet_cv_gasneti_have_mpi_cc__builtin_prefetch+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int x; int x = 0; int main () { __builtin_prefetch(&x,0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_gasneti_have_mpi_cc__builtin_prefetch=yes else gasnet_cv_gasneti_have_mpi_cc__builtin_prefetch=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_gasneti_have_mpi_cc__builtin_prefetch" >&5 $as_echo "$gasnet_cv_gasneti_have_mpi_cc__builtin_prefetch" >&6; } if test "$gasnet_cv_gasneti_have_mpi_cc__builtin_prefetch" = yes; then : $as_echo "#define GASNETI_HAVE_MPI_CC_BUILTIN_PREFETCH 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(MPI_CC for __builtin_prefetch,gasneti_have_mpi_cc__builtin_prefetch,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_BUILTINS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(MPI_CC for value of MPI_VERSION (binary probe),MPI_VERSION,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for value of MPI_VERSION (binary probe)" >&5 $as_echo_n "checking MPI_CC for value of MPI_VERSION (binary probe)... " >&6; } if ${gasnet_cv_MPI_VERSION+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_MPI_VERSION="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < #ifdef __cplusplus #error MPI_CC must be a true MPI-enabled ANSI C compiler - a C++ compiler is not an acceptable replacement. #endif #include extern char s[]; #define DIGIT(d) (((char)(( ((MPI_VERSION)>0?(MPI_VERSION):-(MPI_VERSION)) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((MPI_VERSION)>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_MPI_VERSION=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting MPI_VERSION" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_MPI_VERSION" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < #ifdef __cplusplus #error MPI_CC must be a true MPI-enabled ANSI C compiler - a C++ compiler is not an acceptable replacement. #endif #include extern char s[]; #define DIGIT(d) (((char)(( ((MPI_VERSION)>0?(MPI_VERSION):-(MPI_VERSION)) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', ((MPI_VERSION)>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_MPI_VERSION=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting MPI_VERSION" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_MPI_VERSION" >&5 $as_echo "$gasnet_cv_MPI_VERSION" >&6; } if test -n "$gasnet_cv_MPI_VERSION" ; then GASNETI_MPI_VERSION=$gasnet_cv_MPI_VERSION fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(MPI_CC for value of MPI_VERSION (binary probe),MPI_VERSION,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -z "$GASNETI_MPI_VERSION" ; then # last resort is to use CROSS var # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(GASNETI_MPI_VERSION,MPI_VERSION,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_MPI_VERSION],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_MPI_VERSION setting" >&5 $as_echo_n "checking for CROSS_MPI_VERSION setting... " >&6; } envval_src_CROSS_MPI_VERSION="cached" if ${gasnet_cv_envvar_CROSS_MPI_VERSION+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_MPI_VERSION="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_MPI_VERSION="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crossmpiversion+set}" = "set" ; then gasnet_cv_envvar_CROSS_MPI_VERSION="${_gasneti_nenv_crossmpiversion}" envval_src_CROSS_MPI_VERSION=given elif test "${_gasneti_cenv_crossmpiversion+set}" = "set" ; then gasnet_cv_envvar_CROSS_MPI_VERSION="${_gasneti_cenv_crossmpiversion}" envval_src_CROSS_MPI_VERSION=conf else gasnet_cv_envvar_CROSS_MPI_VERSION=$envval_default_CROSS_MPI_VERSION envval_src_CROSS_MPI_VERSION=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_MPI_VERSION crossmpiversion $gasnet_cv_configure_args_norm fi CROSS_MPI_VERSION="$gasnet_cv_envvar_CROSS_MPI_VERSION" if test "$CROSS_MPI_VERSION" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_MPI_VERSION if test "$envval_src_CROSS_MPI_VERSION" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_MPI_VERSION" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_MPI_VERSION\"" >&5 $as_echo " \"$CROSS_MPI_VERSION\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_MPI_VERSION\"" >&5 $as_echo " (default) \"$CROSS_MPI_VERSION\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_MPI_VERSION\"" >&5 $as_echo " (disabled) \"$CROSS_MPI_VERSION\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_MPI_VERSION\"" >&5 $as_echo " (provided) \"$CROSS_MPI_VERSION\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_MPI_VERSION\"" >&5 $as_echo " (provided) \"$CROSS_MPI_VERSION\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_MPI_VERSION. Please configure --with-CROSS_MPI_VERSION=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_MPI_VERSION],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_MPI_VERSION" = "" ; then as_fn_error $? "This configure script requires \$CROSS_MPI_VERSION be set for cross-compilation" "$LINENO" 5 else GASNETI_MPI_VERSION="$CROSS_MPI_VERSION" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(GASNETI_MPI_VERSION,MPI_VERSION,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_EXPR(MPI_CC for value of MPI_VERSION,MPI_VERSION,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for value of MPI_VERSION" >&5 $as_echo_n "checking MPI_CC for value of MPI_VERSION... " >&6; } if ${gasnet_cv_MPI_VERSION+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "confdefs.h" #include #include #include #ifdef __cplusplus #error MPI_CC must be a true MPI-enabled ANSI C compiler - a C++ compiler is not an acceptable replacement. #endif int main(void) { FILE *f=fopen("conftestval", "w"); int val = 0; if (!f) exit(1); { val = MPI_VERSION;; } fprintf(f, "%d\n", (int)(val)); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_MPI_VERSION=`cat conftestval` else gasnet_cv_MPI_VERSION=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_MPI_VERSION" >&5 $as_echo "$gasnet_cv_MPI_VERSION" >&6; } if test "$gasnet_cv_MPI_VERSION" != no; then : GASNETI_MPI_VERSION=$gasnet_cv_MPI_VERSION fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_EXPR(MPI_CC for value of MPI_VERSION,MPI_VERSION,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test -z "$GASNETI_MPI_VERSION" || test 0 = "$GASNETI_MPI_VERSION" ; then # probe failed, assume worst-case MPI-1 GASNETI_MPI_VERSION=1 fi cat >>confdefs.h <<_ACEOF #define GASNETI_MPI_VERSION $GASNETI_MPI_VERSION _ACEOF # confirm MPI_CC has a working C99 environment (enough to parse gasnet.h) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for working GASNet-required ISO C99 subset in MPI_CC,mpi_gasnet_c99_subset,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GASNet-required ISO C99 subset in MPI_CC" >&5 $as_echo_n "checking for working GASNet-required ISO C99 subset in MPI_CC... " >&6; } if ${gasnet_cv_mpi_gasnet_c99_subset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void foo(void) { int a = 1; // C99 comment for (int i=0; i < 100; i++) a += i; // Conditional expression declaration int i = a; // mid-block decl int x = (int)(0x1234567812345678LL + 0x8765432187654321ULL + i); // (U)LL-suffix 64-bit integer literals } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_mpi_gasnet_c99_subset=yes else gasnet_cv_mpi_gasnet_c99_subset=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_mpi_gasnet_c99_subset" >&5 $as_echo "$gasnet_cv_mpi_gasnet_c99_subset" >&6; } if test "$gasnet_cv_mpi_gasnet_c99_subset" = yes; then : else : mpi_test_worked=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to find sufficient C99 support features in $MPI_CC to build GASNet. You may need to append flags in \$MPI_CC or \$MPI_CFLAGS to enable C99 support" >&5 $as_echo "$as_me: WARNING: Unable to find sufficient C99 support features in $MPI_CC to build GASNet. You may need to append flags in \$MPI_CC or \$MPI_CFLAGS to enable C99 support" >&2;} echo "Unable to find sufficient C99 support features in $MPI_CC to build GASNet. You may need to append flags in \$MPI_CC or \$MPI_CFLAGS to enable C99 support" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for working GASNet-required ISO C99 subset in MPI_CC,mpi_gasnet_c99_subset,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for MPI_Init_thread,have_mpi_init_thread,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init_thread" >&5 $as_echo_n "checking for MPI_Init_thread... " >&6; } if ${gasnet_cv_have_mpi_init_thread+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __cplusplus #error MPI_CC must be a true MPI-enabled ANSI C compiler - a C++ compiler is not an acceptable replacement. #endif int main () { { int required1 = MPI_THREAD_SINGLE; int required2 = MPI_THREAD_FUNNELED; int required3 = MPI_THREAD_SERIALIZED; int required4 = MPI_THREAD_MULTIPLE; int provided = -1; int err = MPI_Init_thread((void*)0,(void*)0,required1,&provided); } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_have_mpi_init_thread=yes else gasnet_cv_have_mpi_init_thread=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_mpi_init_thread" >&5 $as_echo "$gasnet_cv_have_mpi_init_thread" >&6; } if test "$gasnet_cv_have_mpi_init_thread" = yes; then : $as_echo "#define HAVE_MPI_INIT_THREAD 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for MPI_Init_thread,have_mpi_init_thread,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for MPI_Query_thread,have_mpi_query_thread,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Query_thread" >&5 $as_echo_n "checking for MPI_Query_thread... " >&6; } if ${gasnet_cv_have_mpi_query_thread+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __cplusplus #error MPI_CC must be a true MPI-enabled ANSI C compiler - a C++ compiler is not an acceptable replacement. #endif int main () { { int provided = -1; int err = MPI_Query_thread(&provided); } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_have_mpi_query_thread=yes else gasnet_cv_have_mpi_query_thread=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_mpi_query_thread" >&5 $as_echo "$gasnet_cv_have_mpi_query_thread" >&6; } if test "$gasnet_cv_have_mpi_query_thread" = yes; then : $as_echo "#define HAVE_MPI_QUERY_THREAD 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for MPI_Query_thread,have_mpi_query_thread,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else # bug 3443: MPI_CC was rejected, so don't cache information about that compiler # there is no way to "AC_UNDEF" so just ensure compiler mismatch $as_echo "#define GASNETI_PLATFORM_MPI_CC_ID 999999" >>confdefs.h $as_echo "#define GASNETI_PLATFORM_MPI_CC_FAMILYID 999999" >>confdefs.h $as_echo "#define GASNETI_PLATFORM_MPI_CC_VERSION 999999" >>confdefs.h $as_echo "#define GASNETI_PLATFORM_MPI_CC_IDSTR \"MPI_CC-compiler-rejected\"" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CC) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CC" -ge "1"; then _pushcnt_CC=`expr $_pushcnt_CC - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CC_$_pushcnt_CC if test "$_gasnet_pushvar_isset" = "1" ; then eval CC=\$_pushedvar_CC_$_pushcnt_CC echo "popping CC back to: $CC" >&5 else unset CC echo "popping CC back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CC" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$mpi_test_worked" = yes ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_CORRECT_OPTIMIZEDDEBUG(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_OPTIMIZEDDEBUG(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$enable_debug" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for debug vs. optimize compilation conflict" >&5 $as_echo_n "checking MPI_CC for debug vs. optimize compilation conflict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CC,"$MPI_CC") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CC" = "" ; then _pushcnt_CC=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CC+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CC_$_pushcnt_CC=\$CC eval _pushedvarset_CC_$_pushcnt_CC=$_gasnet_pushvar_isset _pushcnt_CC=`expr $_pushcnt_CC + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CC="$MPI_CC" echo "pushed new CC value: $CC" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CC,"$MPI_CC") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$MPI_CFLAGS ") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$MPI_CFLAGS " echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$MPI_CFLAGS ") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXX,"$MPI_CC") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXX" = "" ; then _pushcnt_CXX=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXX+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXX_$_pushcnt_CXX=\$CXX eval _pushedvarset_CXX_$_pushcnt_CXX=$_gasnet_pushvar_isset _pushcnt_CXX=`expr $_pushcnt_CXX + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXX="$MPI_CC" echo "pushed new CXX value: $CXX" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXX,"$MPI_CC") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$MPI_CFLAGS ") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$MPI_CFLAGS " echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$MPI_CFLAGS ") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __cplusplus #error MPI_CC must be a true MPI-enabled ANSI C compiler - a C++ compiler is not an acceptable replacement. #endif #if defined(__OPTIMIZE__) || defined(NDEBUG) choke me #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_result=no else gasnet_result=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_result" >&5 $as_echo "$gasnet_result" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CC) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CC" -ge "1"; then _pushcnt_CC=`expr $_pushcnt_CC - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CC_$_pushcnt_CC if test "$_gasnet_pushvar_isset" = "1" ; then eval CC=\$_pushedvar_CC_$_pushcnt_CC echo "popping CC back to: $CC" >&5 else unset CC echo "popping CC back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CC" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXX) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXX" -ge "1"; then _pushcnt_CXX=`expr $_pushcnt_CXX - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXX_$_pushcnt_CXX if test "$_gasnet_pushvar_isset" = "1" ; then eval CXX=\$_pushedvar_CXX_$_pushcnt_CXX echo "popping CXX back to: $CXX" >&5 else unset CXX echo "popping CXX back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXX" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXX) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) if test "$gasnet_result" = yes; then : old_MPI_CFLAGS="$MPI_CFLAGS" MPI_CFLAGS="$MPI_CFLAGS -O0 -UNDEBUG" # vvvvvvvvvvvvvvvvvvvvvv GASNET_CHECK_OPTIMIZEDDEBUG(...) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$enable_debug" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking MPI_CC for debug vs. optimize compilation conflict" >&5 $as_echo_n "checking MPI_CC for debug vs. optimize compilation conflict... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CC,"$MPI_CC") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CC" = "" ; then _pushcnt_CC=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CC+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CC_$_pushcnt_CC=\$CC eval _pushedvarset_CC_$_pushcnt_CC=$_gasnet_pushvar_isset _pushcnt_CC=`expr $_pushcnt_CC + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CC="$MPI_CC" echo "pushed new CC value: $CC" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CC,"$MPI_CC") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$MPI_CFLAGS ") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$MPI_CFLAGS " echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$MPI_CFLAGS ") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXX,"$MPI_CC") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CXX" = "" ; then _pushcnt_CXX=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXX+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXX_$_pushcnt_CXX=\$CXX eval _pushedvarset_CXX_$_pushcnt_CXX=$_gasnet_pushvar_isset _pushcnt_CXX=`expr $_pushcnt_CXX + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXX="$MPI_CC" echo "pushed new CXX value: $CXX" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXX,"$MPI_CC") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CXXFLAGS,"$MPI_CFLAGS ") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CXXFLAGS" = "" ; then _pushcnt_CXXFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CXXFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS=\$CXXFLAGS eval _pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS=$_gasnet_pushvar_isset _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CXXFLAGS="$MPI_CFLAGS " echo "pushed new CXXFLAGS value: $CXXFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CXXFLAGS,"$MPI_CFLAGS ") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CPPFLAGS,"") vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CPPFLAGS" = "" ; then _pushcnt_CPPFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CPPFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS=\$CPPFLAGS eval _pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS=$_gasnet_pushvar_isset _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CPPFLAGS="" echo "pushed new CPPFLAGS value: $CPPFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CPPFLAGS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:7) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __cplusplus #error MPI_CC must be a true MPI-enabled ANSI C compiler - a C++ compiler is not an acceptable replacement. #endif #if defined(__OPTIMIZE__) || defined(NDEBUG) choke me #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_result=no else gasnet_result=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_result" >&5 $as_echo "$gasnet_result" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CC) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CC" -ge "1"; then _pushcnt_CC=`expr $_pushcnt_CC - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CC_$_pushcnt_CC if test "$_gasnet_pushvar_isset" = "1" ; then eval CC=\$_pushedvar_CC_$_pushcnt_CC echo "popping CC back to: $CC" >&5 else unset CC echo "popping CC back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CC" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CC) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXX) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CXX" -ge "1"; then _pushcnt_CXX=`expr $_pushcnt_CXX - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXX_$_pushcnt_CXX if test "$_gasnet_pushvar_isset" = "1" ; then eval CXX=\$_pushedvar_CXX_$_pushcnt_CXX echo "popping CXX back to: $CXX" >&5 else unset CXX echo "popping CXX back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXX" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXX) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CXXFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CXXFLAGS" -ge "1"; then _pushcnt_CXXFLAGS=`expr $_pushcnt_CXXFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CXXFLAGS_$_pushcnt_CXXFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CXXFLAGS=\$_pushedvar_CXXFLAGS_$_pushcnt_CXXFLAGS echo "popping CXXFLAGS back to: $CXXFLAGS" >&5 else unset CXXFLAGS echo "popping CXXFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CXXFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CXXFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CPPFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CPPFLAGS" -ge "1"; then _pushcnt_CPPFLAGS=`expr $_pushcnt_CPPFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CPPFLAGS_$_pushcnt_CPPFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CPPFLAGS=\$_pushedvar_CPPFLAGS_$_pushcnt_CPPFLAGS echo "popping CPPFLAGS back to: $CPPFLAGS" >&5 else unset CPPFLAGS echo "popping CPPFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CPPFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CPPFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) if test "$gasnet_result" = yes; then : echo echo "configure error: User requested --enable-debug but \$MPI_CC has enabled optimization (-O) or disabled assertions (-DNDEBUG). Appending '-O0 -UNDEBUG' to \$MPI_CFLAGS did not resolve this conflict. Try setting MPI_CFLAGS='$old_MPI_CFLAGS ' , or consider passing --without-mpi-cc if an MPI compiler is not required." if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_OPTIMIZEDDEBUG(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Appending '-O0 -UNDEBUG' to \$MPI_CFLAGS to resolve debug vs. optimize compilation conflict" >&5 $as_echo "$as_me: WARNING: Appending '-O0 -UNDEBUG' to \$MPI_CFLAGS to resolve debug vs. optimize compilation conflict" >&2;} echo "Appending '-O0 -UNDEBUG' to \$MPI_CFLAGS to resolve debug vs. optimize compilation conflict" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:6) fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CHECK_OPTIMIZEDDEBUG(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CORRECT_OPTIMIZEDDEBUG(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) elif test "$mpi_reason" = ""; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: build test failed: I don't know how to build MPI programs on your system -- see $TOP_BUILDDIR/config.log for details: consider setting \$MPI_CC \$MPI_CFLAGS and \$MPI_LIBS to configure MPI support for your site if you want mpi-conduit or require MPI compatibility" >&5 $as_echo "$as_me: WARNING: build test failed: I don't know how to build MPI programs on your system -- see $TOP_BUILDDIR/config.log for details: consider setting \$MPI_CC \$MPI_CFLAGS and \$MPI_LIBS to configure MPI support for your site if you want mpi-conduit or require MPI compatibility" >&2;} echo "build test failed: I don't know how to build MPI programs on your system -- see $TOP_BUILDDIR/config.log for details: consider setting \$MPI_CC \$MPI_CFLAGS and \$MPI_LIBS to configure MPI support for your site if you want mpi-conduit or require MPI compatibility" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) have_mpi=no fi if test "$have_mpi$mpi_reason" = no ; then mpi_reason="was not found" fi if test "$have_mpi" = no ; then # bug 3443: MPI_CC was rejected, ensure we don't cache (potentially incomplete) info about that compiler # there is no way to "AC_UNDEF" so just ensure compiler mismatch $as_echo "#define GASNETI_PLATFORM_MPI_CC_ID 999999" >>confdefs.h $as_echo "#define GASNETI_PLATFORM_MPI_CC_FAMILYID 999999" >>confdefs.h $as_echo "#define GASNETI_PLATFORM_MPI_CC_VERSION 999999" >>confdefs.h $as_echo "#define GASNETI_PLATFORM_MPI_CC_IDSTR \"MPI_CC-compiler-rejected\"" >>confdefs.h fi else have_mpi=no mpi_reason="was disabled" fi # compiler to be used to build AMMPI, and linker for AMMPI-based backends # compiler flags (optimization, includes, etc) to be used with above compiler when building AMMPI # libs and ldflags that must be used when linking AMMPI-based backend # we don't currently GASNET_SPLIT_LINKER_OPTS on MPI_LIBS into MPI_LDFLAGS (which doesn't exist) because # a client can't portably replace the MPI_CC in GASNET_LD and still have a working MPI-enabled link # prototype command used by gasnetrun to run MPI programs _conduit_enabled_mpi=no if test "$gasnet_toolsonly_mode" = "no" ; then if test "$enabled_mpi$have_mpi" = yesyes; then case "yes" in no) ;; g1) if test "$force_mpi" = yes ; then echo echo "configure error: It appears your system has the required support for mpi-conduit, however mpi-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-mpi " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else # warn and disable enabled_mpi=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for mpi-conduit, however mpi-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-mpi " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for mpi-conduit, however mpi-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-mpi " >&2;} echo "It appears your system has the required support for mpi-conduit, however mpi-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-mpi " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ;; exp) if test "$force_mpi" = yes || test "$enable_mpi" = "probe" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mpi-conduit is still experimental, and may have performance and correctness bugs." >&5 $as_echo "$as_me: WARNING: mpi-conduit is still experimental, and may have performance and correctness bugs." >&2;} echo "mpi-conduit is still experimental, and may have performance and correctness bugs." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) _conduit_enabled_mpi=yes else # warn and disable enabled_mpi=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for mpi-conduit. However, mpi-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-mpi. Otherwise, you can disable this message with --disable-mpi " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for mpi-conduit. However, mpi-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-mpi. Otherwise, you can disable this message with --disable-mpi " >&2;} echo "It appears your system has the required support for mpi-conduit. However, mpi-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-mpi. Otherwise, you can disable this message with --disable-mpi " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ;; yes) _conduit_enabled_mpi=yes ;; esac else if test "$force_mpi" = yes ; then echo echo "configure error: User requested --enable-mpi but I don't know how to build mpi programs for your system" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "$_conduit_reason_mpi" = "auto" ; then _conduit_reason_mpi="not found" fi fi if test "$_conduit_enabled_mpi" = "yes" ; then _conduit_flagstr="ON ($_conduit_reason_mpi)" else _conduit_flagstr="OFF ($_conduit_reason_mpi)" fi _conduit_desc_mpi=" Portable MPI conduit (mpi) $_conduit_flagstr" fi if test "$enabled_mpi$have_mpi" = yesyes; then USE_MPI_CONDUIT_TRUE= USE_MPI_CONDUIT_FALSE='#' else USE_MPI_CONDUIT_TRUE='#' USE_MPI_CONDUIT_FALSE= fi if test "$enabled_mpi$have_mpi" = yesyes; then have_ammpi=yes fi if test "$have_ammpi" = yes; then USE_AMMPI_TRUE= USE_AMMPI_FALSE='#' else USE_AMMPI_TRUE='#' USE_AMMPI_FALSE= fi if test "$force_mpi_compat$have_mpi" = yesno ; then echo echo "configure error: User requested --enable-mpi-compat but I don't know how to build MPI programs for your system" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "$enabled_mpi_compat$have_mpi" = yesyes ; then have_mpi_compat=yes else have_mpi_compat=no if test "$have_mpi" = yes; then mpi_compat_reason="was disabled" else mpi_compat_reason="$mpi_reason" fi fi if test "$have_mpi_compat" = yes; then USE_MPI_COMPAT_TRUE= USE_MPI_COMPAT_FALSE='#' else USE_MPI_COMPAT_TRUE='#' USE_MPI_COMPAT_FALSE= fi # USE_MPI == MPI-compatbility or MPI-conduit if test "$have_mpi" = yes; then USE_MPI_TRUE= USE_MPI_FALSE='#' else USE_MPI_TRUE='#' USE_MPI_FALSE= fi #----------------------------------------------------------------------------------------------- # SMP configuration # bug 1946: prevent confusing cross-conduit error messages rm -f gasnet_errsave_file gasnet_errsave_err _conduit_list_smp=yes # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(smp,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-smp was given. if test "${enable_smp+set}" = set; then : enableval=$enable_smp; fi case "$enable_smp" in no) : enabled_smp=no; _conduit_reason_smp=disabled ;; yes) : enabled_smp=yes;force_smp=yes; _conduit_reason_smp=enabled ;; *) : if test "$enable_smp" = "probe" ; then # --enable-conduit=probe overrides --disable-auto-conduit-detect enabled_smp=yes; _conduit_reason_smp=auto else # default enabled_smp=$enabled_auto_detect;_conduit_reason_smp=$_conduit_auto_reason fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(smp,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$enabled_smp" = yes; then if test x"$with_pshm" != xno; then for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done case "$target_os" in solaris*) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_smp_libs=yes else have_smp_libs=no fi if test "x$have_smp_libs" = xyes ; then SMP_LIBS="$LIBS" fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $SMP_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $SMP_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $SMP_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_WITHCC(for socketpair() support,socketpair_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for socketpair() support,socketpair_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair() support" >&5 $as_echo_n "checking for socketpair() support... " >&6; } if ${gasnet_cv_socketpair_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if defined(HAVE_SYS_TYPES_H) #include #endif #if defined(HAVE_SYS_SOCKET_H) #include #endif int main () { int rc, sv[2]; #if defined(PF_LOCAL) rc = socketpair(PF_LOCAL, SOCK_STREAM, 0, sv); #elif defined(PF_UNIX) rc = socketpair(PF_UNIX, SOCK_STREAM, 0, sv); #else #error #endif if (rc < 0) return 1; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_socketpair_works=yes else gasnet_cv_socketpair_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_socketpair_works" >&5 $as_echo "$gasnet_cv_socketpair_works" >&6; } if test "$gasnet_cv_socketpair_works" = yes; then : socketpair_test_worked=yes else : socketpair_test_worked=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for socketpair() support,socketpair_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for socketpair() support,socketpair_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair() support" >&5 $as_echo_n "checking for socketpair() support... " >&6; } if ${gasnet_cv_socketpair_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if defined(HAVE_SYS_TYPES_H) #include #endif #if defined(HAVE_SYS_SOCKET_H) #include #endif int main(void) { int rc, sv[2]; #if defined(PF_LOCAL) rc = socketpair(PF_LOCAL, SOCK_STREAM, 0, sv); #elif defined(PF_UNIX) rc = socketpair(PF_UNIX, SOCK_STREAM, 0, sv); #else #error #endif if (rc < 0) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_socketpair_works=yes else gasnet_cv_socketpair_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_socketpair_works" >&5 $as_echo "$gasnet_cv_socketpair_works" >&6; } if test "$gasnet_cv_socketpair_works" = yes; then : socketpair_test_worked=yes else : socketpair_test_worked=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for socketpair() support,socketpair_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_WITHCC(for socketpair() support,socketpair_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$socketpair_test_worked" = yes; then $as_echo "#define GASNETC_USE_SOCKETPAIR 1" >>confdefs.h else SMP_LIBS="" fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN_WITHCC(for O_ASYNC support,o_async_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for O_ASYNC support,o_async_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_ASYNC support" >&5 $as_echo_n "checking for O_ASYNC support... " >&6; } if ${gasnet_cv_o_async_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if defined(HAVE_SYS_TYPES_H) #include #endif #if defined(HAVE_SYS_SOCKET_H) #include #endif #include int main () { int rc, sv[2]; #if !defined(GASNETC_USE_SOCKETPAIR) rc = pipe(sv); #elif defined(PF_LOCAL) rc = socketpair(PF_LOCAL, SOCK_STREAM, 0, sv); #elif defined(PF_UNIX) rc = socketpair(PF_UNIX, SOCK_STREAM, 0, sv); #else #error #endif if (rc < 0) return 1; rc = fcntl(sv[0], F_GETFL); if (rc < 0) return 1; rc = fcntl(sv[0], F_SETFL, rc | O_ASYNC); if (rc < 0) return 1; if (SIGIO == 0) return 1; rc = fcntl(sv[0], F_SETOWN, getpid()); if (rc < 0) return 1; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_o_async_works=yes else gasnet_cv_o_async_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_o_async_works" >&5 $as_echo "$gasnet_cv_o_async_works" >&6; } if test "$gasnet_cv_o_async_works" = yes; then : o_async_test_worked=yes else : o_async_test_worked=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for O_ASYNC support,o_async_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for O_ASYNC support,o_async_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_ASYNC support" >&5 $as_echo_n "checking for O_ASYNC support... " >&6; } if ${gasnet_cv_o_async_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if defined(HAVE_SYS_TYPES_H) #include #endif #if defined(HAVE_SYS_SOCKET_H) #include #endif #include int main(void) { int rc, sv[2]; #if !defined(GASNETC_USE_SOCKETPAIR) rc = pipe(sv); #elif defined(PF_LOCAL) rc = socketpair(PF_LOCAL, SOCK_STREAM, 0, sv); #elif defined(PF_UNIX) rc = socketpair(PF_UNIX, SOCK_STREAM, 0, sv); #else #error #endif if (rc < 0) return 1; rc = fcntl(sv[0], F_GETFL); if (rc < 0) return 1; rc = fcntl(sv[0], F_SETFL, rc | O_ASYNC); if (rc < 0) return 1; if (SIGIO == 0) return 1; rc = fcntl(sv[0], F_SETOWN, getpid()); if (rc < 0) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_o_async_works=yes else gasnet_cv_o_async_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_o_async_works" >&5 $as_echo "$gasnet_cv_o_async_works" >&6; } if test "$gasnet_cv_o_async_works" = yes; then : o_async_test_worked=yes else : o_async_test_worked=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for O_ASYNC support,o_async_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN_WITHCC(for O_ASYNC support,o_async_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$o_async_test_worked" = yes; then $as_echo "#define GASNETC_HAVE_O_ASYNC 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(smp-spawner,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-smp-spawner was given. if test "${with_smp_spawner+set}" = set; then : withval=$with_smp_spawner; fi if test "${with_smp_spawner+set}" = set; then : withval=$with_smp_spawner; case "$withval" in no) : as_fn_error $? "--with-smp-spawner argument must be \"fork\", \"ssh\", \"mpi\" or \"pmi\"" "$LINENO" 5 ;; *) : case "$withval" in fork|ssh|mpi|pmi) gasnet_spawner_conf=$withval ;; yes) as_fn_error $? "--with-smp-spawner requires an argument (\"fork\", \"ssh\", \"mpi\" or \"pmi\")" "$LINENO" 5 ;; *) as_fn_error $? "--with-smp-spawner argument must be \"fork\", \"ssh\", \"mpi\" or \"pmi\"" "$LINENO" 5 ;; esac ;; esac else : gasnet_spawner_conf=fork fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(smp-spawner,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$gasnet_spawner_conf$have_mpi_compat" = mpino; then as_fn_error $? "--with-smp-spawner=mpi requires MPI compatibility support which $mpi_compat_reason" "$LINENO" 5 elif test "$gasnet_spawner_conf" = pmi; then force_pmi=yes fi cat >>confdefs.h <<_ACEOF #define GASNETC_SMP_SPAWNER_CONF "$gasnet_spawner_conf" _ACEOF GASNET_SMP_SPAWNER_CONF=$gasnet_spawner_conf unset gasnet_spawner_conf fi _conduit_enabled_smp=no if test "$gasnet_toolsonly_mode" = "no" ; then if test "$enabled_smp" = yes; then case "yes" in no) ;; g1) if test "$force_smp" = yes ; then echo echo "configure error: It appears your system has the required support for smp-conduit, however smp-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-smp " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else # warn and disable enabled_smp=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for smp-conduit, however smp-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-smp " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for smp-conduit, however smp-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-smp " >&2;} echo "It appears your system has the required support for smp-conduit, however smp-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-smp " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ;; exp) if test "$force_smp" = yes || test "$enable_smp" = "probe" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: smp-conduit is still experimental, and may have performance and correctness bugs." >&5 $as_echo "$as_me: WARNING: smp-conduit is still experimental, and may have performance and correctness bugs." >&2;} echo "smp-conduit is still experimental, and may have performance and correctness bugs." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) _conduit_enabled_smp=yes else # warn and disable enabled_smp=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for smp-conduit. However, smp-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-smp. Otherwise, you can disable this message with --disable-smp " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for smp-conduit. However, smp-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-smp. Otherwise, you can disable this message with --disable-smp " >&2;} echo "It appears your system has the required support for smp-conduit. However, smp-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-smp. Otherwise, you can disable this message with --disable-smp " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ;; yes) _conduit_enabled_smp=yes ;; esac else if test "$force_smp" = yes ; then echo echo "configure error: User requested --enable-smp but I don't know how to build smp programs for your system" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "$_conduit_reason_smp" = "auto" ; then _conduit_reason_smp="not found" fi fi if test "$_conduit_enabled_smp" = "yes" ; then _conduit_flagstr="ON ($_conduit_reason_smp)" else _conduit_flagstr="OFF ($_conduit_reason_smp)" fi _conduit_desc_smp=" Portable SMP-loopback conduit (smp) $_conduit_flagstr" fi if test "$enabled_smp" = yes; then USE_SMP_CONDUIT_TRUE= USE_SMP_CONDUIT_FALSE='#' else USE_SMP_CONDUIT_TRUE='#' USE_SMP_CONDUIT_FALSE= fi #-------------------------------------------------------------------------------------------------------- # UCX configuration # # bug 1946: prevent confusing cross-conduit error messages rm -f gasnet_errsave_file gasnet_errsave_err _conduit_list_ucx=yes # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ucx,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ucx was given. if test "${enable_ucx+set}" = set; then : enableval=$enable_ucx; fi case "$enable_ucx" in no) : enabled_ucx=no; _conduit_reason_ucx=disabled ;; yes) : enabled_ucx=yes;force_ucx=yes; _conduit_reason_ucx=enabled ;; *) : if test "$enable_ucx" = "probe" ; then # --enable-conduit=probe overrides --disable-auto-conduit-detect enabled_ucx=yes; _conduit_reason_ucx=auto else # default enabled_ucx=$enabled_auto_detect;_conduit_reason_ucx=$_conduit_auto_reason fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ucx,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$enabled_ucx" = "yes" && expr "$segconfig" : everything >/dev/null; then msg="ucx-conduit does not support the EVERYTHING shared segment configuration" if test "$force_ucx" = yes ; then echo echo "configure error: User requested --enable-ucx but $msg" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $msg - disabling ucx" >&5 $as_echo "$as_me: WARNING: $msg - disabling ucx" >&2;} echo "$msg - disabling ucx" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) enabled_ucx=no fi if test "$enabled_ucx" = no; then : elif test "$have_fork" = no; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ucx-conduit requires fork() ($fork_reason) for startup - disabling ucx" >&5 $as_echo "$as_me: WARNING: ucx-conduit requires fork() ($fork_reason) for startup - disabling ucx" >&2;} echo "ucx-conduit requires fork() ($fork_reason) for startup - disabling ucx" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) elif test "$have_pthread" = no; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ucx-conduit requires libpthread ($pthread_reason) - disabling ucx" >&5 $as_echo "$as_me: WARNING: ucx-conduit requires libpthread ($pthread_reason) - disabling ucx" >&2;} echo "ucx-conduit requires libpthread ($pthread_reason) - disabling ucx" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else # # Either UCX was required explicitly, or we just need to probe for its existence # have_ucx=yes # assume success # vvvvvvvvvvvvvvvvvvvvvv CONDUIT_HOME([UCX library],[ucx_info],[/opt/mellanox/ucx],[include/ucp/api/ucp.h]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_HOME(UCX,UCX library,ucx_info,/opt/mellanox/ucx,include/ucp/api/ucp.h) vvvvvvvvvvvvvvvvvvvvvv (L:5) UCX_guess= for ac_prog in ucx_info do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_UCX_guess_prog+:} false; then : $as_echo_n "(cached) " >&6 else case $UCX_guess_prog in [\\/]* | ?:[\\/]*) ac_cv_path_UCX_guess_prog="$UCX_guess_prog" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_UCX_guess_prog="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi UCX_guess_prog=$ac_cv_path_UCX_guess_prog if test -n "$UCX_guess_prog"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UCX_guess_prog" >&5 $as_echo "$UCX_guess_prog" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$UCX_guess_prog" && break done if test -n "$UCX_guess_prog"; then UCX_guess=`dirname \`dirname $UCX_guess_prog\`` fi if test -z "$UCX_guess" ; then for UCX_guess_file in "include/ucp/api/ucp.h" "."; do for UCX_guess in /opt/mellanox/ucx /usr; do if test -r "$UCX_guess/$UCX_guess_file" ; then break 2 fi done done unset UCX_guess_file fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([UCX_HOME],[$UCX_guess],[Install prefix of UCX library (auto-detected from PATH)]) vvvvvvvvvvvvvvvvvvvvvv (L:6) # Check whether --with-ucx-home was given. if test "${with_ucx_home+set}" = set; then : withval=$with_ucx_home; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCX_HOME setting" >&5 $as_echo_n "checking for UCX_HOME setting... " >&6; } envval_src_UCX_HOME="cached" if ${gasnet_cv_envvar_UCX_HOME+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_UCX_HOME="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_UCX_HOME="$UCX_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ucxhome+set}" = "set" ; then gasnet_cv_envvar_UCX_HOME="${_gasneti_nenv_ucxhome}" envval_src_UCX_HOME=given elif test "${_gasneti_cenv_ucxhome+set}" = "set" ; then gasnet_cv_envvar_UCX_HOME="${_gasneti_cenv_ucxhome}" envval_src_UCX_HOME=conf else gasnet_cv_envvar_UCX_HOME=$envval_default_UCX_HOME envval_src_UCX_HOME=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper UCX_HOME ucxhome $gasnet_cv_configure_args_norm fi UCX_HOME="$gasnet_cv_envvar_UCX_HOME" if test "$UCX_HOME" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset UCX_HOME if test "$envval_src_UCX_HOME" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_UCX_HOME" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$UCX_HOME\"" >&5 $as_echo " \"$UCX_HOME\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$UCX_HOME\"" >&5 $as_echo " (default) \"$UCX_HOME\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$UCX_HOME\"" >&5 $as_echo " (disabled) \"$UCX_HOME\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$UCX_HOME\"" >&5 $as_echo " (provided) \"$UCX_HOME\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$UCX_HOME\"" >&5 $as_echo " (provided) \"$UCX_HOME\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$UCX_HOME. Please configure --with-UCX_HOME=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([UCX_HOME],[$UCX_guess],[Install prefix of UCX library (auto-detected from PATH)]) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $UCX_HOME is the UCX library install prefix" >&5 $as_echo_n "checking if $UCX_HOME is the UCX library install prefix... " >&6; } UCX_HOME_good=no if test -r "$UCX_HOME/include/ucp/api/ucp.h"; then UCX_HOME_good=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test $UCX_HOME_good = no && test -n "$UCX_guess_prog"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_FOLLOWLINKS(UCX_guess_prog) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_fl_file="$UCX_guess_prog" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` while test "$gasnet_fl_link"; do gasnet_fl_file="$gasnet_fl_link" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` done UCX_guess_prog="$gasnet_fl_file" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FOLLOWLINKS(UCX_guess_prog) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) UCX_HOME_tmp=`dirname \`dirname $UCX_guess_prog\`` if test -r "$UCX_HOME_tmp/include/ucp/api/ucp.h"; then UCX_HOME_good=yes UCX_HOME="$UCX_HOME_tmp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - followed symlink to $UCX_HOME" >&5 $as_echo "no - followed symlink to $UCX_HOME" >&6; } fi unset UCX_HOME_tmp fi if test $UCX_HOME_good = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: probably not - missing include/ucp/api/ucp.h" >&5 $as_echo "probably not - missing include/ucp/api/ucp.h" >&6; } fi unset UCX_HOME_good unset UCX_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ CONDUIT_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv CONDUIT_CFLAGS() vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_CFLAGS([UCX],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$UCX_HOME" in /usr|/) UCX_cflags_guess='';; *) if test -d "$UCX_HOME/include/."; then UCX_cflags_guess="-I$UCX_HOME/include" else UCX_cflags_guess='' fi;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([UCX_CFLAGS],[$UCX_cflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:6) # Check whether --with-ucx-cflags was given. if test "${with_ucx_cflags+set}" = set; then : withval=$with_ucx_cflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCX_CFLAGS setting" >&5 $as_echo_n "checking for UCX_CFLAGS setting... " >&6; } envval_src_UCX_CFLAGS="cached" if ${gasnet_cv_envvar_UCX_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_UCX_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_UCX_CFLAGS="$UCX_cflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ucxcflags+set}" = "set" ; then gasnet_cv_envvar_UCX_CFLAGS="${_gasneti_nenv_ucxcflags}" envval_src_UCX_CFLAGS=given elif test "${_gasneti_cenv_ucxcflags+set}" = "set" ; then gasnet_cv_envvar_UCX_CFLAGS="${_gasneti_cenv_ucxcflags}" envval_src_UCX_CFLAGS=conf else gasnet_cv_envvar_UCX_CFLAGS=$envval_default_UCX_CFLAGS envval_src_UCX_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper UCX_CFLAGS ucxcflags $gasnet_cv_configure_args_norm fi UCX_CFLAGS="$gasnet_cv_envvar_UCX_CFLAGS" if test "$UCX_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset UCX_CFLAGS if test "$envval_src_UCX_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_UCX_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$UCX_CFLAGS\"" >&5 $as_echo " \"$UCX_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$UCX_CFLAGS\"" >&5 $as_echo " (default) \"$UCX_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$UCX_CFLAGS\"" >&5 $as_echo " (disabled) \"$UCX_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$UCX_CFLAGS\"" >&5 $as_echo " (provided) \"$UCX_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$UCX_CFLAGS\"" >&5 $as_echo " (provided) \"$UCX_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$UCX_CFLAGS. Please configure --with-UCX_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([UCX_CFLAGS],[$UCX_cflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) unset UCX_cflags_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ CONDUIT_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([UCX_LIBS],[-lucp -lucs -luct -lucm]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ucx-libs was given. if test "${with_ucx_libs+set}" = set; then : withval=$with_ucx_libs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCX_LIBS setting" >&5 $as_echo_n "checking for UCX_LIBS setting... " >&6; } envval_src_UCX_LIBS="cached" if ${gasnet_cv_envvar_UCX_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_UCX_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_UCX_LIBS="-lucp -lucs -luct -lucm" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ucxlibs+set}" = "set" ; then gasnet_cv_envvar_UCX_LIBS="${_gasneti_nenv_ucxlibs}" envval_src_UCX_LIBS=given elif test "${_gasneti_cenv_ucxlibs+set}" = "set" ; then gasnet_cv_envvar_UCX_LIBS="${_gasneti_cenv_ucxlibs}" envval_src_UCX_LIBS=conf else gasnet_cv_envvar_UCX_LIBS=$envval_default_UCX_LIBS envval_src_UCX_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper UCX_LIBS ucxlibs $gasnet_cv_configure_args_norm fi UCX_LIBS="$gasnet_cv_envvar_UCX_LIBS" if test "$UCX_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset UCX_LIBS if test "$envval_src_UCX_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_UCX_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$UCX_LIBS\"" >&5 $as_echo " \"$UCX_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$UCX_LIBS\"" >&5 $as_echo " (default) \"$UCX_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$UCX_LIBS\"" >&5 $as_echo " (disabled) \"$UCX_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$UCX_LIBS\"" >&5 $as_echo " (provided) \"$UCX_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$UCX_LIBS\"" >&5 $as_echo " (provided) \"$UCX_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$UCX_LIBS. Please configure --with-UCX_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([UCX_LIBS],[-lucp -lucs -luct -lucm]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv CONDUIT_LDFLAGS([ucp]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_LDFLAGS([UCX],[ucp]) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$UCX_HOME" in /usr|/) UCX_ldflags_guess='';; *) for UCX_ldflags_guess_dir in "$UCX_HOME/lib${GASNETI_PTR_BITS}" "$UCX_HOME/lib" ''; do test -z "$UCX_ldflags_guess_dir" && break for UCX_ldflags_guess_lib in ucp; do for UCX_ldflags_guess_suff in a so sl dylib la dll; do if test -r "$UCX_ldflags_guess_dir/lib$UCX_ldflags_guess_lib.$UCX_ldflags_guess_suff"; then break 3; fi done done done if test -n "$UCX_ldflags_guess_dir"; then UCX_ldflags_guess="-L$UCX_ldflags_guess_dir" # deferred to appear after help for [PREFIX]_LDFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ucx-rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:6) case "$enable_ucx_rpath" in no) : enabled_ucx_rpath='' ;; yes) : enabled_ucx_rpath="$UCX_ldflags_guess_dir" ;; *) : if test -z "$enabled_ucx_rpath"; then if test "x$enabled_rpath" = xyes; then enabled_ucx_rpath="$UCX_ldflags_guess_dir" else enabled_ucx_rpath='' fi fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ucx-rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) if test -n "$enabled_ucx_rpath"; then if test "${cc_rpath_option:+set}" = set; then UCX_ldflags_guess="$UCX_ldflags_guess $cc_rpath_option$enabled_ucx_rpath" else warn_missing_rpath="$warn_missing_rpath ucx" fi fi UCX_ldflags_guess="${UCX_ldflags_guess}" else UCX_ldflags_guess='' fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([UCX_LDFLAGS],[$UCX_ldflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:6) # Check whether --with-ucx-ldflags was given. if test "${with_ucx_ldflags+set}" = set; then : withval=$with_ucx_ldflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCX_LDFLAGS setting" >&5 $as_echo_n "checking for UCX_LDFLAGS setting... " >&6; } envval_src_UCX_LDFLAGS="cached" if ${gasnet_cv_envvar_UCX_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_UCX_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_UCX_LDFLAGS="$UCX_ldflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ucxldflags+set}" = "set" ; then gasnet_cv_envvar_UCX_LDFLAGS="${_gasneti_nenv_ucxldflags}" envval_src_UCX_LDFLAGS=given elif test "${_gasneti_cenv_ucxldflags+set}" = "set" ; then gasnet_cv_envvar_UCX_LDFLAGS="${_gasneti_cenv_ucxldflags}" envval_src_UCX_LDFLAGS=conf else gasnet_cv_envvar_UCX_LDFLAGS=$envval_default_UCX_LDFLAGS envval_src_UCX_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper UCX_LDFLAGS ucxldflags $gasnet_cv_configure_args_norm fi UCX_LDFLAGS="$gasnet_cv_envvar_UCX_LDFLAGS" if test "$UCX_LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset UCX_LDFLAGS if test "$envval_src_UCX_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_UCX_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$UCX_LDFLAGS\"" >&5 $as_echo " \"$UCX_LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$UCX_LDFLAGS\"" >&5 $as_echo " (default) \"$UCX_LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$UCX_LDFLAGS\"" >&5 $as_echo " (disabled) \"$UCX_LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$UCX_LDFLAGS\"" >&5 $as_echo " (provided) \"$UCX_LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$UCX_LDFLAGS\"" >&5 $as_echo " (provided) \"$UCX_LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$UCX_LDFLAGS. Please configure --with-UCX_LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([UCX_LDFLAGS],[$UCX_ldflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # Check whether --enable-ucx-rpath was given. if test "${enable_ucx_rpath+set}" = set; then : enableval=$enable_ucx_rpath; fi unset UCX_ldflags_guess unset UCX_ldflags_guess_dir unset UCX_ldflags_guess_lib unset UCX_ldflags_guess_suff # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ CONDUIT_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([UCX_LDFLAGS],[UCX_LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) eval gasnet_fn_split_linker_opts UCX_LDFLAGS UCX_LIBS $UCX_LDFLAGS $UCX_LIBS #echo "UCX_LDFLAGS=[$]UCX_LDFLAGS" #echo "UCX_LIBS=[$]UCX_LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([UCX_LDFLAGS],[UCX_LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Try to compile and link a basic UCX program # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $UCX_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $UCX_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $UCX_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $UCX_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $UCX_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $UCX_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $UCX_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $UCX_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $UCX_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working UCX configuration,ucx_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working UCX configuration" >&5 $as_echo_n "checking for working UCX configuration... " >&6; } if ${gasnet_cv_ucx_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { { unsigned major_version, minor_version, release_number; ucp_get_version(&major_version, &minor_version, &release_number); } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_ucx_works=yes else gasnet_cv_ucx_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ucx_works" >&5 $as_echo "$gasnet_cv_ucx_works" >&6; } if test "$gasnet_cv_ucx_works" = yes; then : : else : have_ucx=no; if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working UCX configuration,ucx_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ucx_max_med_dflt=`expr 65536 - 16 - 64` # 16 = fixed Medium header, 64 = 16x 4-byte args # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ucx-max-medium,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ucx-max-medium was given. if test "${with_ucx_max_medium+set}" = set; then : withval=$with_ucx_max_medium; fi if test "${with_ucx_max_medium+set}" = set; then : withval=$with_ucx_max_medium; case "$withval" in no) : as_fn_error $? "--with-ucx-max-medium must be no smaller than 512" "$LINENO" 5 ;; *) : if expr "$withval" : '[0-9]*$' >/dev/null 2>&1 && \ expr "$withval" '>=' 512 >/dev/null 2>&1 ; then ucx_max_medium="$withval" else as_fn_error $? "--with-ucx-max-medium=\"$withval\" is not legal. Value must no smaller than 512." "$LINENO" 5 fi ;; esac else : ucx_max_medium=$ucx_max_med_dflt fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ucx-max-medium,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat >>confdefs.h <<_ACEOF #define GASNETC_UCX_MAX_MEDIUM_DFLT $ucx_max_medium _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ucx-spawner,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ucx-spawner was given. if test "${with_ucx_spawner+set}" = set; then : withval=$with_ucx_spawner; fi if test "${with_ucx_spawner+set}" = set; then : withval=$with_ucx_spawner; case "$withval" in no) : as_fn_error $? "--with-ucx-spawner argument must be \"ssh\", \"mpi\" or \"pmi\"" "$LINENO" 5 ;; *) : case "$withval" in ssh|mpi|pmi) gasnet_spawner_conf=$withval ;; yes) as_fn_error $? "--with-ucx-spawner requires an argument (\"ssh\", \"mpi\" or \"pmi\")" "$LINENO" 5 ;; *) as_fn_error $? "--with-ucx-spawner argument must be \"ssh\", \"mpi\" or \"pmi\"" "$LINENO" 5 ;; esac ;; esac else : if test "$have_mpi_compat" = yes; then gasnet_spawner_conf=mpi else gasnet_spawner_conf=ssh fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ucx-spawner,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$gasnet_spawner_conf$have_mpi_compat" = mpino; then as_fn_error $? "--with-ucx-spawner=mpi requires MPI compatibility support which $mpi_compat_reason" "$LINENO" 5 elif test "$gasnet_spawner_conf$have_fork" = sshno; then as_fn_error $? "--with-ucx-spawner=ssh requires fork() support which $fork_reason" "$LINENO" 5 elif test "$gasnet_spawner_conf" = pmi; then force_pmi=yes fi cat >>confdefs.h <<_ACEOF #define GASNETC_UCX_SPAWNER_CONF "$gasnet_spawner_conf" _ACEOF GASNET_UCX_SPAWNER_CONF=$gasnet_spawner_conf unset gasnet_spawner_conf fi _conduit_enabled_ucx=no if test "$gasnet_toolsonly_mode" = "no" ; then if test "$enabled_ucx$have_ucx" = yesyes; then case "exp" in no) ;; g1) if test "$force_ucx" = yes ; then echo echo "configure error: It appears your system has the required support for ucx-conduit, however ucx-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ucx " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else # warn and disable enabled_ucx=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for ucx-conduit, however ucx-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ucx " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for ucx-conduit, however ucx-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ucx " >&2;} echo "It appears your system has the required support for ucx-conduit, however ucx-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ucx " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ;; exp) if test "$force_ucx" = yes || test "$enable_ucx" = "probe" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ucx-conduit is still experimental, and may have performance and correctness bugs." >&5 $as_echo "$as_me: WARNING: ucx-conduit is still experimental, and may have performance and correctness bugs." >&2;} echo "ucx-conduit is still experimental, and may have performance and correctness bugs." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) _conduit_enabled_ucx=yes else # warn and disable enabled_ucx=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for ucx-conduit. However, ucx-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-ucx. Otherwise, you can disable this message with --disable-ucx " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for ucx-conduit. However, ucx-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-ucx. Otherwise, you can disable this message with --disable-ucx " >&2;} echo "It appears your system has the required support for ucx-conduit. However, ucx-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-ucx. Otherwise, you can disable this message with --disable-ucx " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ;; yes) _conduit_enabled_ucx=yes ;; esac else if test "$force_ucx" = yes ; then echo echo "configure error: User requested --enable-ucx but I don't know how to build ucx programs for your system" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "$_conduit_reason_ucx" = "auto" ; then _conduit_reason_ucx="not found" fi fi if test "$_conduit_enabled_ucx" = "yes" ; then _conduit_flagstr="ON ($_conduit_reason_ucx)" else _conduit_flagstr="OFF ($_conduit_reason_ucx)" fi _conduit_desc_ucx=" Unified Communication X conduit (ucx) $_conduit_flagstr" fi if test "$enabled_ucx$have_ucx" = yesyes; then USE_UCX_CONDUIT_TRUE= USE_UCX_CONDUIT_FALSE='#' else USE_UCX_CONDUIT_TRUE='#' USE_UCX_CONDUIT_FALSE= fi #-------------------------------------------------------------------------------------------------------- # IBV configuration # bug 1946: prevent confusing cross-conduit error messages rm -f gasnet_errsave_file gasnet_errsave_err _conduit_list_ibv=yes # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ibv,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ibv was given. if test "${enable_ibv+set}" = set; then : enableval=$enable_ibv; fi case "$enable_ibv" in no) : enabled_ibv=no; _conduit_reason_ibv=disabled ;; yes) : enabled_ibv=yes;force_ibv=yes; _conduit_reason_ibv=enabled ;; *) : if test "$enable_ibv" = "probe" ; then # --enable-conduit=probe overrides --disable-auto-conduit-detect enabled_ibv=yes; _conduit_reason_ibv=auto else # default enabled_ibv=$enabled_auto_detect;_conduit_reason_ibv=$_conduit_auto_reason fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ibv,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$enabled_ibv$have_mpi_compat$have_fork" = yesnono; then enabled_ibv=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ibv-conduit requires either MPI compatibility ($mpi_compat_reason) or fork() ($fork_reason) for startup - disabling ibv" >&5 $as_echo "$as_me: WARNING: ibv-conduit requires either MPI compatibility ($mpi_compat_reason) or fork() ($fork_reason) for startup - disabling ibv" >&2;} echo "ibv-conduit requires either MPI compatibility ($mpi_compat_reason) or fork() ($fork_reason) for startup - disabling ibv" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$enabled_ibv" = yes; then # Start by assuming we do have IBV have_ibv=yes # vvvvvvvvvvvvvvvvvvvvvv CONDUIT_HOME([IB Verbs library],[ibv_devinfo],[/usr/local/ofed /opt/ofed],[include/infiniband/verbs.h]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_HOME(IBV,IB Verbs library,ibv_devinfo,/usr/local/ofed /opt/ofed,include/infiniband/verbs.h) vvvvvvvvvvvvvvvvvvvvvv (L:5) IBV_guess= for ac_prog in ibv_devinfo do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_IBV_guess_prog+:} false; then : $as_echo_n "(cached) " >&6 else case $IBV_guess_prog in [\\/]* | ?:[\\/]*) ac_cv_path_IBV_guess_prog="$IBV_guess_prog" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_IBV_guess_prog="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi IBV_guess_prog=$ac_cv_path_IBV_guess_prog if test -n "$IBV_guess_prog"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IBV_guess_prog" >&5 $as_echo "$IBV_guess_prog" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$IBV_guess_prog" && break done if test -n "$IBV_guess_prog"; then IBV_guess=`dirname \`dirname $IBV_guess_prog\`` fi if test -z "$IBV_guess" ; then for IBV_guess_file in "include/infiniband/verbs.h" "."; do for IBV_guess in /usr/local/ofed /opt/ofed /usr; do if test -r "$IBV_guess/$IBV_guess_file" ; then break 2 fi done done unset IBV_guess_file fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([IBV_HOME],[$IBV_guess],[Install prefix of IB Verbs library (auto-detected from PATH)]) vvvvvvvvvvvvvvvvvvvvvv (L:6) # Check whether --with-ibv-home was given. if test "${with_ibv_home+set}" = set; then : withval=$with_ibv_home; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IBV_HOME setting" >&5 $as_echo_n "checking for IBV_HOME setting... " >&6; } envval_src_IBV_HOME="cached" if ${gasnet_cv_envvar_IBV_HOME+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_IBV_HOME="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_IBV_HOME="$IBV_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ibvhome+set}" = "set" ; then gasnet_cv_envvar_IBV_HOME="${_gasneti_nenv_ibvhome}" envval_src_IBV_HOME=given elif test "${_gasneti_cenv_ibvhome+set}" = "set" ; then gasnet_cv_envvar_IBV_HOME="${_gasneti_cenv_ibvhome}" envval_src_IBV_HOME=conf else gasnet_cv_envvar_IBV_HOME=$envval_default_IBV_HOME envval_src_IBV_HOME=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper IBV_HOME ibvhome $gasnet_cv_configure_args_norm fi IBV_HOME="$gasnet_cv_envvar_IBV_HOME" if test "$IBV_HOME" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset IBV_HOME if test "$envval_src_IBV_HOME" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_IBV_HOME" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$IBV_HOME\"" >&5 $as_echo " \"$IBV_HOME\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$IBV_HOME\"" >&5 $as_echo " (default) \"$IBV_HOME\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$IBV_HOME\"" >&5 $as_echo " (disabled) \"$IBV_HOME\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$IBV_HOME\"" >&5 $as_echo " (provided) \"$IBV_HOME\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$IBV_HOME\"" >&5 $as_echo " (provided) \"$IBV_HOME\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$IBV_HOME. Please configure --with-IBV_HOME=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([IBV_HOME],[$IBV_guess],[Install prefix of IB Verbs library (auto-detected from PATH)]) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $IBV_HOME is the IB Verbs library install prefix" >&5 $as_echo_n "checking if $IBV_HOME is the IB Verbs library install prefix... " >&6; } IBV_HOME_good=no if test -r "$IBV_HOME/include/infiniband/verbs.h"; then IBV_HOME_good=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test $IBV_HOME_good = no && test -n "$IBV_guess_prog"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_FOLLOWLINKS(IBV_guess_prog) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_fl_file="$IBV_guess_prog" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` while test "$gasnet_fl_link"; do gasnet_fl_file="$gasnet_fl_link" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` done IBV_guess_prog="$gasnet_fl_file" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FOLLOWLINKS(IBV_guess_prog) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) IBV_HOME_tmp=`dirname \`dirname $IBV_guess_prog\`` if test -r "$IBV_HOME_tmp/include/infiniband/verbs.h"; then IBV_HOME_good=yes IBV_HOME="$IBV_HOME_tmp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - followed symlink to $IBV_HOME" >&5 $as_echo "no - followed symlink to $IBV_HOME" >&6; } fi unset IBV_HOME_tmp fi if test $IBV_HOME_good = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: probably not - missing include/infiniband/verbs.h" >&5 $as_echo "probably not - missing include/infiniband/verbs.h" >&6; } fi unset IBV_HOME_good unset IBV_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ CONDUIT_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv CONDUIT_CFLAGS() vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_CFLAGS([IBV],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$IBV_HOME" in /usr|/) IBV_cflags_guess='';; *) if test -d "$IBV_HOME/include/."; then IBV_cflags_guess="-I$IBV_HOME/include" else IBV_cflags_guess='' fi;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([IBV_CFLAGS],[$IBV_cflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:6) # Check whether --with-ibv-cflags was given. if test "${with_ibv_cflags+set}" = set; then : withval=$with_ibv_cflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IBV_CFLAGS setting" >&5 $as_echo_n "checking for IBV_CFLAGS setting... " >&6; } envval_src_IBV_CFLAGS="cached" if ${gasnet_cv_envvar_IBV_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_IBV_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_IBV_CFLAGS="$IBV_cflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ibvcflags+set}" = "set" ; then gasnet_cv_envvar_IBV_CFLAGS="${_gasneti_nenv_ibvcflags}" envval_src_IBV_CFLAGS=given elif test "${_gasneti_cenv_ibvcflags+set}" = "set" ; then gasnet_cv_envvar_IBV_CFLAGS="${_gasneti_cenv_ibvcflags}" envval_src_IBV_CFLAGS=conf else gasnet_cv_envvar_IBV_CFLAGS=$envval_default_IBV_CFLAGS envval_src_IBV_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper IBV_CFLAGS ibvcflags $gasnet_cv_configure_args_norm fi IBV_CFLAGS="$gasnet_cv_envvar_IBV_CFLAGS" if test "$IBV_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset IBV_CFLAGS if test "$envval_src_IBV_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_IBV_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$IBV_CFLAGS\"" >&5 $as_echo " \"$IBV_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$IBV_CFLAGS\"" >&5 $as_echo " (default) \"$IBV_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$IBV_CFLAGS\"" >&5 $as_echo " (disabled) \"$IBV_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$IBV_CFLAGS\"" >&5 $as_echo " (provided) \"$IBV_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$IBV_CFLAGS\"" >&5 $as_echo " (provided) \"$IBV_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$IBV_CFLAGS. Please configure --with-IBV_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([IBV_CFLAGS],[$IBV_cflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) unset IBV_cflags_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ CONDUIT_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([IBV_LIBS],[-libverbs]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ibv-libs was given. if test "${with_ibv_libs+set}" = set; then : withval=$with_ibv_libs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IBV_LIBS setting" >&5 $as_echo_n "checking for IBV_LIBS setting... " >&6; } envval_src_IBV_LIBS="cached" if ${gasnet_cv_envvar_IBV_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_IBV_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_IBV_LIBS="-libverbs" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ibvlibs+set}" = "set" ; then gasnet_cv_envvar_IBV_LIBS="${_gasneti_nenv_ibvlibs}" envval_src_IBV_LIBS=given elif test "${_gasneti_cenv_ibvlibs+set}" = "set" ; then gasnet_cv_envvar_IBV_LIBS="${_gasneti_cenv_ibvlibs}" envval_src_IBV_LIBS=conf else gasnet_cv_envvar_IBV_LIBS=$envval_default_IBV_LIBS envval_src_IBV_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper IBV_LIBS ibvlibs $gasnet_cv_configure_args_norm fi IBV_LIBS="$gasnet_cv_envvar_IBV_LIBS" if test "$IBV_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset IBV_LIBS if test "$envval_src_IBV_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_IBV_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$IBV_LIBS\"" >&5 $as_echo " \"$IBV_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$IBV_LIBS\"" >&5 $as_echo " (default) \"$IBV_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$IBV_LIBS\"" >&5 $as_echo " (disabled) \"$IBV_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$IBV_LIBS\"" >&5 $as_echo " (provided) \"$IBV_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$IBV_LIBS\"" >&5 $as_echo " (provided) \"$IBV_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$IBV_LIBS. Please configure --with-IBV_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([IBV_LIBS],[-libverbs]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv CONDUIT_LDFLAGS([ibverbs]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_LDFLAGS([IBV],[ibverbs]) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$IBV_HOME" in /usr|/) IBV_ldflags_guess='';; *) for IBV_ldflags_guess_dir in "$IBV_HOME/lib${GASNETI_PTR_BITS}" "$IBV_HOME/lib" ''; do test -z "$IBV_ldflags_guess_dir" && break for IBV_ldflags_guess_lib in ibverbs; do for IBV_ldflags_guess_suff in a so sl dylib la dll; do if test -r "$IBV_ldflags_guess_dir/lib$IBV_ldflags_guess_lib.$IBV_ldflags_guess_suff"; then break 3; fi done done done if test -n "$IBV_ldflags_guess_dir"; then IBV_ldflags_guess="-L$IBV_ldflags_guess_dir" # deferred to appear after help for [PREFIX]_LDFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ibv-rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:6) case "$enable_ibv_rpath" in no) : enabled_ibv_rpath='' ;; yes) : enabled_ibv_rpath="$IBV_ldflags_guess_dir" ;; *) : if test -z "$enabled_ibv_rpath"; then if test "x$enabled_rpath" = xyes; then enabled_ibv_rpath="$IBV_ldflags_guess_dir" else enabled_ibv_rpath='' fi fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ibv-rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) if test -n "$enabled_ibv_rpath"; then if test "${cc_rpath_option:+set}" = set; then IBV_ldflags_guess="$IBV_ldflags_guess $cc_rpath_option$enabled_ibv_rpath" else warn_missing_rpath="$warn_missing_rpath ibv" fi fi IBV_ldflags_guess="${IBV_ldflags_guess}" else IBV_ldflags_guess='' fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([IBV_LDFLAGS],[$IBV_ldflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:6) # Check whether --with-ibv-ldflags was given. if test "${with_ibv_ldflags+set}" = set; then : withval=$with_ibv_ldflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IBV_LDFLAGS setting" >&5 $as_echo_n "checking for IBV_LDFLAGS setting... " >&6; } envval_src_IBV_LDFLAGS="cached" if ${gasnet_cv_envvar_IBV_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_IBV_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_IBV_LDFLAGS="$IBV_ldflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ibvldflags+set}" = "set" ; then gasnet_cv_envvar_IBV_LDFLAGS="${_gasneti_nenv_ibvldflags}" envval_src_IBV_LDFLAGS=given elif test "${_gasneti_cenv_ibvldflags+set}" = "set" ; then gasnet_cv_envvar_IBV_LDFLAGS="${_gasneti_cenv_ibvldflags}" envval_src_IBV_LDFLAGS=conf else gasnet_cv_envvar_IBV_LDFLAGS=$envval_default_IBV_LDFLAGS envval_src_IBV_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper IBV_LDFLAGS ibvldflags $gasnet_cv_configure_args_norm fi IBV_LDFLAGS="$gasnet_cv_envvar_IBV_LDFLAGS" if test "$IBV_LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset IBV_LDFLAGS if test "$envval_src_IBV_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_IBV_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$IBV_LDFLAGS\"" >&5 $as_echo " \"$IBV_LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$IBV_LDFLAGS\"" >&5 $as_echo " (default) \"$IBV_LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$IBV_LDFLAGS\"" >&5 $as_echo " (disabled) \"$IBV_LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$IBV_LDFLAGS\"" >&5 $as_echo " (provided) \"$IBV_LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$IBV_LDFLAGS\"" >&5 $as_echo " (provided) \"$IBV_LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$IBV_LDFLAGS. Please configure --with-IBV_LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([IBV_LDFLAGS],[$IBV_ldflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # Check whether --enable-ibv-rpath was given. if test "${enable_ibv_rpath+set}" = set; then : enableval=$enable_ibv_rpath; fi unset IBV_ldflags_guess unset IBV_ldflags_guess_dir unset IBV_ldflags_guess_lib unset IBV_ldflags_guess_suff # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ CONDUIT_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([IBV_LDFLAGS],[IBV_LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) eval gasnet_fn_split_linker_opts IBV_LDFLAGS IBV_LIBS $IBV_LDFLAGS $IBV_LIBS #echo "IBV_LDFLAGS=[$]IBV_LDFLAGS" #echo "IBV_LIBS=[$]IBV_LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([IBV_LDFLAGS],[IBV_LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Try to compile and link a basic IB Verbs program # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $IBV_CFLAGS $GASNET_THREAD_DEFINES") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $IBV_CFLAGS $GASNET_THREAD_DEFINES" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $IBV_CFLAGS $GASNET_THREAD_DEFINES") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $IBV_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $IBV_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $IBV_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $IBV_LIBS $GASNET_THREAD_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $IBV_LIBS $GASNET_THREAD_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $IBV_LIBS $GASNET_THREAD_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working IB Verbs configuration,ibv_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working IB Verbs configuration" >&5 $as_echo_n "checking for working IB Verbs configuration... " >&6; } if ${gasnet_cv_ibv_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(__GNUC__) && !defined(inline) /* ANSI-ify the verbs headers */ #define inline __inline__ #include #undef inline #else #include #endif int main () { { struct ibv_device device; const char *s = ibv_get_device_name(&device); } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_ibv_works=yes else gasnet_cv_ibv_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ibv_works" >&5 $as_echo "$gasnet_cv_ibv_works" >&6; } if test "$gasnet_cv_ibv_works" = yes; then : : else : have_ibv=no; if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working IB Verbs configuration,ibv_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # For all platforms of interest, compiler is equivalent to native { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate atomics support required by ibv-conduit" >&5 $as_echo_n "checking for appropriate atomics support required by ibv-conduit... " >&6; } check_atomics_match='' for check_atomics_val in native compiler; do if test $GASNETI_ATOMIC_IMPL_STR = $check_atomics_val; then check_atomics_match=1 break fi done if test -n "$check_atomics_match"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else if test -n "$enabled_generic_atomicops" ; then check_atomics_msg='user passed --enable-force-generic-atomicops' elif test -n "$enabled_os_atomicops"; then check_atomics_msg='user passed --enable-force-os-atomicops' else check_atomics_msg="this platform has defaulted to '$GASNETI_ATOMIC_IMPL_STR' atomicops" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ibv-conduit requires native atomicops, but $check_atomics_msg" >&5 $as_echo "$as_me: WARNING: ibv-conduit requires native atomicops, but $check_atomics_msg" >&2;} echo "ibv-conduit requires native atomicops, but $check_atomics_msg" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) have_ibv=no unset check_atomics_msg fi unset check_atomics_match if test "$have_ibv" = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for ibv_device.transport_type,ibv_transport_type,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_device.transport_type" >&5 $as_echo_n "checking for ibv_device.transport_type... " >&6; } if ${gasnet_cv_ibv_transport_type+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(__GNUC__) && !defined(inline) /* ANSI-ify the verbs headers */ #define inline __inline__ #include #undef inline #else #include #endif int main () { struct ibv_device device; device.transport_type = IBV_TRANSPORT_IB; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_ibv_transport_type=yes else gasnet_cv_ibv_transport_type=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ibv_transport_type" >&5 $as_echo "$gasnet_cv_ibv_transport_type" >&6; } if test "$gasnet_cv_ibv_transport_type" = yes; then : $as_echo "#define HAVE_IBV_TRANSPORT_TYPE 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for ibv_device.transport_type,ibv_transport_type,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) for ac_func in ibv_wc_status_str do : ac_fn_c_check_func "$LINENO" "ibv_wc_status_str" "ac_cv_func_ibv_wc_status_str" if test "x$ac_cv_func_ibv_wc_status_str" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IBV_WC_STATUS_STR 1 _ACEOF fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for ibv_create_qp_ex,have_ibv_create_qp_ex,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_create_qp_ex" >&5 $as_echo_n "checking for ibv_create_qp_ex... " >&6; } if ${gasnet_cv_have_ibv_create_qp_ex+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(__GNUC__) && !defined(inline) /* ANSI-ify the verbs headers */ #define inline __inline__ #include #undef inline #else #include #endif int main () { (void) ibv_create_qp_ex(NULL, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_have_ibv_create_qp_ex=yes else gasnet_cv_have_ibv_create_qp_ex=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_ibv_create_qp_ex" >&5 $as_echo "$gasnet_cv_have_ibv_create_qp_ex" >&6; } if test "$gasnet_cv_have_ibv_create_qp_ex" = yes; then : $as_echo "#define HAVE_IBV_CREATE_QP_EX 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for ibv_create_qp_ex,have_ibv_create_qp_ex,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$have_ibv" = yes; then # XXX: Need to support older (get_devices) interface at some point? #GASNET_PUSHVAR(LIBS,"$LIBS $IBV_LDFLAGS") #AC_SEARCH_LIBS(ibv_get_device_list, ibverbs, AC_DEFINE(HAVE_IBV_GET_DEVICE_LIST)) #AC_SEARCH_LIBS(ibv_get_devices, ibverbs, AC_DEFINE(HAVE_IBV_GET_DEVICES)) #GASNET_POPVAR(LIBS) # Since we are using firehose we need to disable certain optimizations. # See bug #350 for an example of why firehose needs this. # See bug #596 or #1031 for evidence that InfiniBand is affected by this. # See bug #1052 for evidence that xlc is affected. fh_cflags_default="" case "$CC_FAMILY" in GNU) fh_cflags_default="${gcc_flag_prefix}-fno-strict-aliasing";; Pathscale) fh_cflags_default="-fno-strict-aliasing";; Open64) fh_cflags_default="-fno-strict-aliasing";; Clang) fh_cflags_default="-fno-strict-aliasing";; XLC) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-qnoansialias -qalias=addr) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -qnoansialias -qalias=addr") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -qnoansialias -qalias=addr" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -qnoansialias -qalias=addr") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -qnoansialias -qalias=addr" >&5 $as_echo_n "checking for C compiler flag -qnoansialias -qalias=addr... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fh_cflags_default="-qnoansialias -qalias=addr" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fh_cflags_default="-qnoansialias -qalias=addr" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-qnoansialias -qalias=addr) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-qalias=noansi -qalias=addr) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -qalias=noansi -qalias=addr") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -qalias=noansi -qalias=addr" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -qalias=noansi -qalias=addr") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -qalias=noansi -qalias=addr" >&5 $as_echo_n "checking for C compiler flag -qalias=noansi -qalias=addr... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fh_cflags_default="-qalias=noansi -qalias=addr" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fh_cflags_default="-qalias=noansi -qalias=addr" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-qalias=noansi -qalias=addr) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; Intel) fh_cflags_default="-no-ansi-alias";; Sun) fh_cflags_default="-xalias_level=any";; NVHPC|PGI) fh_cflags_default="-alias=traditional";; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([FH_CFLAGS],[$fh_cflags_default],[C flags for building the Firehose memory registration library]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-fh-cflags was given. if test "${with_fh_cflags+set}" = set; then : withval=$with_fh_cflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FH_CFLAGS setting" >&5 $as_echo_n "checking for FH_CFLAGS setting... " >&6; } envval_src_FH_CFLAGS="cached" if ${gasnet_cv_envvar_FH_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_FH_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_FH_CFLAGS="$fh_cflags_default" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_fhcflags+set}" = "set" ; then gasnet_cv_envvar_FH_CFLAGS="${_gasneti_nenv_fhcflags}" envval_src_FH_CFLAGS=given elif test "${_gasneti_cenv_fhcflags+set}" = "set" ; then gasnet_cv_envvar_FH_CFLAGS="${_gasneti_cenv_fhcflags}" envval_src_FH_CFLAGS=conf else gasnet_cv_envvar_FH_CFLAGS=$envval_default_FH_CFLAGS envval_src_FH_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper FH_CFLAGS fhcflags $gasnet_cv_configure_args_norm fi FH_CFLAGS="$gasnet_cv_envvar_FH_CFLAGS" if test "$FH_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset FH_CFLAGS if test "$envval_src_FH_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_FH_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$FH_CFLAGS\"" >&5 $as_echo " \"$FH_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$FH_CFLAGS\"" >&5 $as_echo " (default) \"$FH_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$FH_CFLAGS\"" >&5 $as_echo " (disabled) \"$FH_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$FH_CFLAGS\"" >&5 $as_echo " (provided) \"$FH_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$FH_CFLAGS\"" >&5 $as_echo " (provided) \"$FH_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$FH_CFLAGS. Please configure --with-FH_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([FH_CFLAGS],[$fh_cflags_default],[C flags for building the Firehose memory registration library]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Collect IB-specifc configure options # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_DISABLED(ibv-atomics,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ibv-atomics was given. if test "${enable_ibv_atomics+set}" = set; then : enableval=$enable_ibv_atomics; fi case "$enable_ibv_atomics" in '' | yes) : if test "$segconfig" = fast; then $as_echo "#define GASNETC_IBV_ATOMICS_CONFIGURE 1" >>confdefs.h fi ;; *) : : ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_DISABLED(ibv-atomics,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ibv-rcv-thread,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ibv-rcv-thread was given. if test "${enable_ibv_rcv_thread+set}" = set; then : enableval=$enable_ibv_rcv_thread; fi case "$enable_ibv_rcv_thread" in no) : enabled_ibv_rcv_thread=no ;; yes) : enabled_ibv_rcv_thread=yes if test "$have_pthread" = no; then as_fn_error $? "--enable-ibv-rcv-thread requires pthread support but pthreads $pthread_reason" "$LINENO" 5 fi ;; *) : enabled_ibv_rcv_thread=$have_pthread ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ibv-rcv-thread,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$enabled_ibv_rcv_thread" = yes; then $as_echo "#define GASNETC_IBV_RCV_THREAD 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ibv-snd-thread,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ibv-snd-thread was given. if test "${enable_ibv_snd_thread+set}" = set; then : enableval=$enable_ibv_snd_thread; fi case "$enable_ibv_snd_thread" in no) : enabled_ibv_snd_thread=no ;; yes) : enabled_ibv_snd_thread=yes if test "$have_pthread" = no; then as_fn_error $? "--enable-ibv-snd-thread requires pthread support but pthreads $pthread_reason" "$LINENO" 5 fi ;; *) : enabled_ibv_snd_thread=$have_pthread ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ibv-snd-thread,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$enabled_ibv_snd_thread" = yes; then $as_echo "#define GASNETC_IBV_SND_THREAD 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ibv-conn-thread,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ibv-conn-thread was given. if test "${enable_ibv_conn_thread+set}" = set; then : enableval=$enable_ibv_conn_thread; fi case "$enable_ibv_conn_thread" in no) : enabled_ibv_conn_thread=no ;; yes) : enabled_ibv_conn_thread=yes if test "$have_pthread" = no; then as_fn_error $? "--enable-ibv-conn-thread requires pthread support but pthreads $pthread_reason" "$LINENO" 5 fi ;; *) : enabled_ibv_conn_thread=$have_pthread ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ibv-conn-thread,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$enabled_ibv_conn_thread" = yes; then $as_echo "#define GASNETC_IBV_CONN_THREAD 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ibv-spawner,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ibv-spawner was given. if test "${with_ibv_spawner+set}" = set; then : withval=$with_ibv_spawner; fi if test "${with_ibv_spawner+set}" = set; then : withval=$with_ibv_spawner; case "$withval" in no) : as_fn_error $? "--with-ibv-spawner argument must be \"ssh\", \"mpi\" or \"pmi\"" "$LINENO" 5 ;; *) : case "$withval" in ssh|mpi|pmi) gasnet_spawner_conf=$withval ;; yes) as_fn_error $? "--with-ibv-spawner requires an argument (\"ssh\", \"mpi\" or \"pmi\")" "$LINENO" 5 ;; *) as_fn_error $? "--with-ibv-spawner argument must be \"ssh\", \"mpi\" or \"pmi\"" "$LINENO" 5 ;; esac ;; esac else : if test "$have_mpi_compat" = yes; then gasnet_spawner_conf=mpi else gasnet_spawner_conf=ssh fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ibv-spawner,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$gasnet_spawner_conf$have_mpi_compat" = mpino; then as_fn_error $? "--with-ibv-spawner=mpi requires MPI compatibility support which $mpi_compat_reason" "$LINENO" 5 elif test "$gasnet_spawner_conf$have_fork" = sshno; then as_fn_error $? "--with-ibv-spawner=ssh requires fork() support which $fork_reason" "$LINENO" 5 elif test "$gasnet_spawner_conf" = pmi; then force_pmi=yes fi cat >>confdefs.h <<_ACEOF #define GASNETC_IBV_SPAWNER_CONF "$gasnet_spawner_conf" _ACEOF GASNET_IBV_SPAWNER_CONF=$gasnet_spawner_conf unset gasnet_spawner_conf # Multirail support options # ibv-conduit/README explains the interactions gasnetc_ibv_max_hcas=2 enabled_ibv_multirail=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ibv-max-hcas,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ibv-max-hcas was given. if test "${with_ibv_max_hcas+set}" = set; then : withval=$with_ibv_max_hcas; fi if test "${with_ibv_max_hcas+set}" = set; then : withval=$with_ibv_max_hcas; case "$withval" in no) : as_fn_error $? "--with-ibv-max-hcas requires a positive integer argument" "$LINENO" 5 ;; *) : if expr "${withval}" : "[1-9][0-9]*" >/dev/null; then gasnetc_ibv_max_hcas="$withval" enabled_ibv_multirail=yes else as_fn_error $? "--with-ibv-max-hcas requires a positive integer argument" "$LINENO" 5 fi ;; esac else : : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ibv-max-hcas,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ibv-multirail,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ibv-multirail was given. if test "${enable_ibv_multirail+set}" = set; then : enableval=$enable_ibv_multirail; fi case "$enable_ibv_multirail" in no) : enabled_ibv_multirail=no ;; yes) : enabled_ibv_multirail=yes ;; *) : ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ibv-multirail,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$enabled_ibv_multirail" = yes; then cat >>confdefs.h <<_ACEOF #define GASNETC_IBV_MAX_HCAS_CONFIGURE $gasnetc_ibv_max_hcas _ACEOF fi ibv_fenced_puts=0 # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ibv-fenced-puts,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ibv-fenced-puts was given. if test "${with_ibv_fenced_puts+set}" = set; then : withval=$with_ibv_fenced_puts; fi if test "${with_ibv_fenced_puts+set}" = set; then : withval=$with_ibv_fenced_puts; case "$withval" in no) : ibv_fenced_puts=0 ;; *) : case $withval in yes) ibv_fenced_puts=1;; 0|1) ibv_fenced_puts=$withval;; *) as_fn_error $? "Optional argument to --with-ibv-fenced-puts must be 0 or 1" "$LINENO" 5;; esac ;; esac else : ibv_fenced_puts=1 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ibv-fenced-puts,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat >>confdefs.h <<_ACEOF #define GASNETC_IBV_FENCED_PUTS_CONFIGURE $ibv_fenced_puts _ACEOF # Default GASNET_IBV_PORTS # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ibv-ports,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ibv-ports was given. if test "${with_ibv_ports+set}" = set; then : withval=$with_ibv_ports; fi if test "${with_ibv_ports+set}" = set; then : withval=$with_ibv_ports; case "$withval" in no) : ;; *) : if test "$withval" = 'yes'; then as_fn_error $? "--with-ibv-ports requires an argument" "$LINENO" 5 else cat >>confdefs.h <<_ACEOF #define GASNETC_IBV_PORTS_CONFIGURE "$withval" _ACEOF fi ;; esac else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ibv-ports,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ibv-physmem-max,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ibv-physmem-max was given. if test "${with_ibv_physmem_max+set}" = set; then : withval=$with_ibv_physmem_max; fi if test "${with_ibv_physmem_max+set}" = set; then : withval=$with_ibv_physmem_max; case "$withval" in no) : as_fn_error $? "--with-ibv-physmem-max requires a positive argument" "$LINENO" 5 ;; *) : if expr "${withval}" : "[0-9]" >/dev/null; then : # TODO: stronger validation? cat >>confdefs.h <<_ACEOF #define GASNETC_IBV_PHYSMEM_MAX_CONFIGURE "$withval" _ACEOF else as_fn_error $? "--with-ibv-physmem-max requires a positive argument" "$LINENO" 5 fi ;; esac else : : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ibv-physmem-max,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ibv-physmem-probe,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ibv-physmem-probe was given. if test "${enable_ibv_physmem_probe+set}" = set; then : enableval=$enable_ibv_physmem_probe; fi case "$enable_ibv_physmem_probe" in no) : force_physmem_probe=0 ;; yes) : force_physmem_probe=1 ;; *) : force_physmem_probe='' ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ibv-physmem-probe,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -n "$force_physmem_probe"; then cat >>confdefs.h <<_ACEOF #define GASNETC_IBV_PHYSMEM_PROBE_CONFIGURE $force_physmem_probe _ACEOF fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_DISABLED(ibv-srq,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ibv-srq was given. if test "${enable_ibv_srq+set}" = set; then : enableval=$enable_ibv_srq; fi case "$enable_ibv_srq" in '' | yes) : $as_echo "#define HAVE_IBV_SRQ 1" >>confdefs.h ;; *) : enabled_ibv_srq=no ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_DISABLED(ibv-srq,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ibv-xrc,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ibv-xrc was given. if test "${enable_ibv_xrc+set}" = set; then : enableval=$enable_ibv_xrc; fi case "$enable_ibv_xrc" in no) : enabled_ibv_xrc="no" ;; yes) : enabled_ibv_xrc="yes"; force_ibv_xrc="yes" ;; *) : enabled_ibv_xrc="yes" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ibv-xrc,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "x$enabled_ibv_srq" = xno; then if test "x$force_ibv_xrc" = xyes; then echo echo "configure error: IBV XRC support was requested with --enable-ibv-xrc but requires SRQ support which has been disabled" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi elif test "x$with_pshm" = xno; then if test "x$force_ibv_xrc" = xyes; then echo echo "configure error: IBV XRC support was requested with --enable-ibv-xrc but requires PSHM support which is not enabled" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi elif test "$enabled_ibv_xrc" = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $IBV_LDFLAGS $IBV_LIBS $GASNET_THREAD_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $IBV_LDFLAGS $IBV_LIBS $GASNET_THREAD_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $IBV_LDFLAGS $IBV_LIBS $GASNET_THREAD_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) for ac_func in ibv_open_xrc_domain ibv_cmd_open_xrcd do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF have_ibv_xrc=yes else have_ibv_xrc=no fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$have_ibv_xrc$force_ibv_xrc" = noyes; then echo echo "configure error: IBV XRC support was requested with --enable-ibv-xrc but is not available" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ibv-odp,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ibv-odp was given. if test "${enable_ibv_odp+set}" = set; then : enableval=$enable_ibv_odp; fi case "$enable_ibv_odp" in no) : enabled_ibv_odp="no"; $as_echo "#define GASNETC_IBV_ODP_DISABLED 1" >>confdefs.h ;; yes) : enabled_ibv_odp="yes"; force_ibv_odp="yes" ;; *) : enabled_ibv_odp="yes" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ibv-odp,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$enabled_ibv_odp" = yes; then have_ibv_odp=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $IBV_CFLAGS $GASNET_THREAD_DEFINES") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $IBV_CFLAGS $GASNET_THREAD_DEFINES" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $IBV_CFLAGS $GASNET_THREAD_DEFINES") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $IBV_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $IBV_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $IBV_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $IBV_LIBS $GASNET_THREAD_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $IBV_LIBS $GASNET_THREAD_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $IBV_LIBS $GASNET_THREAD_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for ibv ODP support (Mellanox),ibv_odp_support_mlnx,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv ODP support (Mellanox)" >&5 $as_echo_n "checking for ibv ODP support (Mellanox)... " >&6; } if ${gasnet_cv_ibv_odp_support_mlnx+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct ibv_exp_device_attr attr; attr.comp_mask = IBV_EXP_DEVICE_ATTR_ODP | IBV_EXP_DEVICE_ATTR_EXP_CAP_FLAGS; int ret = ibv_exp_query_device(NULL, &attr); int ok = (attr.exp_device_cap_flags & IBV_EXP_DEVICE_ODP) && (attr.odp_caps.general_odp_caps & IBV_EXP_ODP_SUPPORT_IMPLICIT) && (attr.odp_caps.per_transport_caps.rc_odp_caps & IBV_EXP_ODP_SUPPORT_READ) && (attr.odp_caps.per_transport_caps.rc_odp_caps & IBV_EXP_ODP_SUPPORT_WRITE); struct ibv_exp_reg_mr_in x; x.exp_access = IBV_EXP_ACCESS_ON_DEMAND | IBV_EXP_ACCESS_LOCAL_WRITE; x.length = IBV_EXP_IMPLICIT_MR_SIZE; struct ibv_mr *mr = ibv_exp_reg_mr(&x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_ibv_odp_support_mlnx=yes else gasnet_cv_ibv_odp_support_mlnx=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ibv_odp_support_mlnx" >&5 $as_echo "$gasnet_cv_ibv_odp_support_mlnx" >&6; } if test "$gasnet_cv_ibv_odp_support_mlnx" = yes; then : have_ibv_odp=yes $as_echo "#define GASNETC_IBV_ODP_MLNX 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for ibv ODP support (Mellanox),ibv_odp_support_mlnx,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for ibv ODP support (RDMA Core),ibv_odp_support_core,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv ODP support (RDMA Core)" >&5 $as_echo_n "checking for ibv ODP support (RDMA Core)... " >&6; } if ${gasnet_cv_ibv_odp_support_core+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct ibv_device_attr_ex attr; attr.comp_mask = 0; int ret = ibv_query_device_ex(NULL, NULL, &attr); int ok = (attr.odp_caps.general_caps & IBV_ODP_SUPPORT) && (attr.odp_caps.general_caps & IBV_ODP_SUPPORT_IMPLICIT) && (attr.odp_caps.per_transport_caps.rc_odp_caps & IBV_ODP_SUPPORT_READ) && (attr.odp_caps.per_transport_caps.rc_odp_caps & IBV_ODP_SUPPORT_WRITE); struct ibv_mr *mr = ibv_reg_mr(NULL, NULL, SIZE_MAX, IBV_ACCESS_ON_DEMAND | IBV_ACCESS_LOCAL_WRITE); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_ibv_odp_support_core=yes else gasnet_cv_ibv_odp_support_core=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ibv_odp_support_core" >&5 $as_echo "$gasnet_cv_ibv_odp_support_core" >&6; } if test "$gasnet_cv_ibv_odp_support_core" = yes; then : have_ibv_odp=yes $as_echo "#define GASNETC_IBV_ODP_CORE 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for ibv ODP support (RDMA Core),ibv_odp_support_core,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$have_ibv_odp$force_ibv_odp" = noyes; then echo echo "configure error: IBV ODP support was requested with --enable-ibv-odp but is not available" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 elif test "$have_ibv_odp" = yes; then $as_echo "#define GASNETC_IBV_ODP 1" >>confdefs.h fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_DISABLED(ibv-serialize-poll-cq,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ibv-serialize-poll-cq was given. if test "${enable_ibv_serialize_poll_cq+set}" = set; then : enableval=$enable_ibv_serialize_poll_cq; fi case "$enable_ibv_serialize_poll_cq" in '' | yes) : $as_echo "#define GASNETC_IBV_SERIALIZE_POLL_CQ_CONFIGURE 1" >>confdefs.h ;; *) : : ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_DISABLED(ibv-serialize-poll-cq,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ibv-max-medium,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ibv-max-medium was given. if test "${with_ibv_max_medium+set}" = set; then : withval=$with_ibv_max_medium; fi if test "${with_ibv_max_medium+set}" = set; then : withval=$with_ibv_max_medium; case "$withval" in no) : as_fn_error $? "--with-ibv-max-medium must be a power-of-two between 1024 and 262144, inclusive." "$LINENO" 5 ;; *) : case "$withval" in 1024|2048|4096|8192|16384|32768|65536|131072|262144) ibv_max_medium="$withval";; *) as_fn_error $? "--with-ibv-max-medium=\"$withval\" is not legal. Value must be a power-of-two between 1024 and 262144, inclusive." "$LINENO" 5 ;; esac ;; esac else : ibv_max_medium=65536 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ibv-max-medium,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat >>confdefs.h <<_ACEOF #define GASNETC_IBV_MAX_MEDIUM $ibv_max_medium _ACEOF fi fi if test "$enabled_ibv_rcv_thread$enabled_ibv_snd_thread$enabled_ibv_conn_thread" != nonono; then IBV_SEQ_THREADS_TRUE= IBV_SEQ_THREADS_FALSE='#' else IBV_SEQ_THREADS_TRUE='#' IBV_SEQ_THREADS_FALSE= fi _conduit_enabled_ibv=no if test "$gasnet_toolsonly_mode" = "no" ; then if test "$enabled_ibv$have_ibv" = yesyes; then case "yes" in no) ;; g1) if test "$force_ibv" = yes ; then echo echo "configure error: It appears your system has the required support for ibv-conduit, however ibv-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ibv " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else # warn and disable enabled_ibv=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for ibv-conduit, however ibv-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ibv " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for ibv-conduit, however ibv-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ibv " >&2;} echo "It appears your system has the required support for ibv-conduit, however ibv-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ibv " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ;; exp) if test "$force_ibv" = yes || test "$enable_ibv" = "probe" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ibv-conduit is still experimental, and may have performance and correctness bugs." >&5 $as_echo "$as_me: WARNING: ibv-conduit is still experimental, and may have performance and correctness bugs." >&2;} echo "ibv-conduit is still experimental, and may have performance and correctness bugs." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) _conduit_enabled_ibv=yes else # warn and disable enabled_ibv=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for ibv-conduit. However, ibv-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-ibv. Otherwise, you can disable this message with --disable-ibv " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for ibv-conduit. However, ibv-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-ibv. Otherwise, you can disable this message with --disable-ibv " >&2;} echo "It appears your system has the required support for ibv-conduit. However, ibv-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-ibv. Otherwise, you can disable this message with --disable-ibv " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ;; yes) _conduit_enabled_ibv=yes ;; esac else if test "$force_ibv" = yes ; then echo echo "configure error: User requested --enable-ibv but I don't know how to build ibv programs for your system" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "$_conduit_reason_ibv" = "auto" ; then _conduit_reason_ibv="not found" fi fi if test "$_conduit_enabled_ibv" = "yes" ; then _conduit_flagstr="ON ($_conduit_reason_ibv)" else _conduit_flagstr="OFF ($_conduit_reason_ibv)" fi _conduit_desc_ibv=" InfiniBand IB Verbs conduit (ibv) $_conduit_flagstr" fi if test "$enabled_ibv$have_ibv" = yesyes; then USE_IBV_CONDUIT_TRUE= USE_IBV_CONDUIT_FALSE='#' else USE_IBV_CONDUIT_TRUE='#' USE_IBV_CONDUIT_FALSE= fi #-------------------------------------------------------------------------------------------------------- # Libfabric Conduit # default to not probing ofi-conduit, regardless of enabled_auto_detect if test "${enable_ofi-unset}" = unset; then enable_ofi=no; fi # bug 1946: prevent confusing cross-conduit error messages rm -f gasnet_errsave_file gasnet_errsave_err _conduit_list_ofi=yes # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ofi,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ofi was given. if test "${enable_ofi+set}" = set; then : enableval=$enable_ofi; fi case "$enable_ofi" in no) : enabled_ofi=no; _conduit_reason_ofi=disabled ;; yes) : enabled_ofi=yes;force_ofi=yes; _conduit_reason_ofi=enabled ;; *) : if test "$enable_ofi" = "probe" ; then # --enable-conduit=probe overrides --disable-auto-conduit-detect enabled_ofi=yes; _conduit_reason_ofi=auto else # default enabled_ofi=$enabled_auto_detect;_conduit_reason_ofi=$_conduit_auto_reason fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ofi,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$enabled_ofi" = yes; then have_ofi=yes # vvvvvvvvvvvvvvvvvvvvvv CONDUIT_HOME([OFI libfabric],[fi_info],[/usr],[include/rdma/fabric.h]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_HOME(OFI,OFI libfabric,fi_info,/usr,include/rdma/fabric.h) vvvvvvvvvvvvvvvvvvvvvv (L:5) OFI_guess= for ac_prog in fi_info do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_OFI_guess_prog+:} false; then : $as_echo_n "(cached) " >&6 else case $OFI_guess_prog in [\\/]* | ?:[\\/]*) ac_cv_path_OFI_guess_prog="$OFI_guess_prog" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_OFI_guess_prog="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi OFI_guess_prog=$ac_cv_path_OFI_guess_prog if test -n "$OFI_guess_prog"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OFI_guess_prog" >&5 $as_echo "$OFI_guess_prog" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$OFI_guess_prog" && break done if test -n "$OFI_guess_prog"; then OFI_guess=`dirname \`dirname $OFI_guess_prog\`` fi if test -z "$OFI_guess" ; then for OFI_guess_file in "include/rdma/fabric.h" "."; do for OFI_guess in /usr /usr; do if test -r "$OFI_guess/$OFI_guess_file" ; then break 2 fi done done unset OFI_guess_file fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([OFI_HOME],[$OFI_guess],[Install prefix of OFI libfabric (auto-detected from PATH)]) vvvvvvvvvvvvvvvvvvvvvv (L:6) # Check whether --with-ofi-home was given. if test "${with_ofi_home+set}" = set; then : withval=$with_ofi_home; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OFI_HOME setting" >&5 $as_echo_n "checking for OFI_HOME setting... " >&6; } envval_src_OFI_HOME="cached" if ${gasnet_cv_envvar_OFI_HOME+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_OFI_HOME="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_OFI_HOME="$OFI_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ofihome+set}" = "set" ; then gasnet_cv_envvar_OFI_HOME="${_gasneti_nenv_ofihome}" envval_src_OFI_HOME=given elif test "${_gasneti_cenv_ofihome+set}" = "set" ; then gasnet_cv_envvar_OFI_HOME="${_gasneti_cenv_ofihome}" envval_src_OFI_HOME=conf else gasnet_cv_envvar_OFI_HOME=$envval_default_OFI_HOME envval_src_OFI_HOME=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper OFI_HOME ofihome $gasnet_cv_configure_args_norm fi OFI_HOME="$gasnet_cv_envvar_OFI_HOME" if test "$OFI_HOME" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset OFI_HOME if test "$envval_src_OFI_HOME" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_OFI_HOME" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$OFI_HOME\"" >&5 $as_echo " \"$OFI_HOME\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$OFI_HOME\"" >&5 $as_echo " (default) \"$OFI_HOME\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$OFI_HOME\"" >&5 $as_echo " (disabled) \"$OFI_HOME\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$OFI_HOME\"" >&5 $as_echo " (provided) \"$OFI_HOME\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$OFI_HOME\"" >&5 $as_echo " (provided) \"$OFI_HOME\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$OFI_HOME. Please configure --with-OFI_HOME=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([OFI_HOME],[$OFI_guess],[Install prefix of OFI libfabric (auto-detected from PATH)]) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $OFI_HOME is the OFI libfabric install prefix" >&5 $as_echo_n "checking if $OFI_HOME is the OFI libfabric install prefix... " >&6; } OFI_HOME_good=no if test -r "$OFI_HOME/include/rdma/fabric.h"; then OFI_HOME_good=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test $OFI_HOME_good = no && test -n "$OFI_guess_prog"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_FOLLOWLINKS(OFI_guess_prog) vvvvvvvvvvvvvvvvvvvvvv (L:6) gasnet_fl_file="$OFI_guess_prog" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` while test "$gasnet_fl_link"; do gasnet_fl_file="$gasnet_fl_link" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` done OFI_guess_prog="$gasnet_fl_file" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FOLLOWLINKS(OFI_guess_prog) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) OFI_HOME_tmp=`dirname \`dirname $OFI_guess_prog\`` if test -r "$OFI_HOME_tmp/include/rdma/fabric.h"; then OFI_HOME_good=yes OFI_HOME="$OFI_HOME_tmp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - followed symlink to $OFI_HOME" >&5 $as_echo "no - followed symlink to $OFI_HOME" >&6; } fi unset OFI_HOME_tmp fi if test $OFI_HOME_good = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: probably not - missing include/rdma/fabric.h" >&5 $as_echo "probably not - missing include/rdma/fabric.h" >&6; } fi unset OFI_HOME_good unset OFI_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ CONDUIT_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv CONDUIT_CFLAGS() vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_CFLAGS([OFI],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$OFI_HOME" in /usr|/) OFI_cflags_guess='';; *) if test -d "$OFI_HOME/include/."; then OFI_cflags_guess="-I$OFI_HOME/include" else OFI_cflags_guess='' fi;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([OFI_CFLAGS],[$OFI_cflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:6) # Check whether --with-ofi-cflags was given. if test "${with_ofi_cflags+set}" = set; then : withval=$with_ofi_cflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OFI_CFLAGS setting" >&5 $as_echo_n "checking for OFI_CFLAGS setting... " >&6; } envval_src_OFI_CFLAGS="cached" if ${gasnet_cv_envvar_OFI_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_OFI_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_OFI_CFLAGS="$OFI_cflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_oficflags+set}" = "set" ; then gasnet_cv_envvar_OFI_CFLAGS="${_gasneti_nenv_oficflags}" envval_src_OFI_CFLAGS=given elif test "${_gasneti_cenv_oficflags+set}" = "set" ; then gasnet_cv_envvar_OFI_CFLAGS="${_gasneti_cenv_oficflags}" envval_src_OFI_CFLAGS=conf else gasnet_cv_envvar_OFI_CFLAGS=$envval_default_OFI_CFLAGS envval_src_OFI_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper OFI_CFLAGS oficflags $gasnet_cv_configure_args_norm fi OFI_CFLAGS="$gasnet_cv_envvar_OFI_CFLAGS" if test "$OFI_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset OFI_CFLAGS if test "$envval_src_OFI_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_OFI_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$OFI_CFLAGS\"" >&5 $as_echo " \"$OFI_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$OFI_CFLAGS\"" >&5 $as_echo " (default) \"$OFI_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$OFI_CFLAGS\"" >&5 $as_echo " (disabled) \"$OFI_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$OFI_CFLAGS\"" >&5 $as_echo " (provided) \"$OFI_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$OFI_CFLAGS\"" >&5 $as_echo " (provided) \"$OFI_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$OFI_CFLAGS. Please configure --with-OFI_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([OFI_CFLAGS],[$OFI_cflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) unset OFI_cflags_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ CONDUIT_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([OFI_LIBS],[-lfabric]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ofi-libs was given. if test "${with_ofi_libs+set}" = set; then : withval=$with_ofi_libs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OFI_LIBS setting" >&5 $as_echo_n "checking for OFI_LIBS setting... " >&6; } envval_src_OFI_LIBS="cached" if ${gasnet_cv_envvar_OFI_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_OFI_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_OFI_LIBS="-lfabric" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ofilibs+set}" = "set" ; then gasnet_cv_envvar_OFI_LIBS="${_gasneti_nenv_ofilibs}" envval_src_OFI_LIBS=given elif test "${_gasneti_cenv_ofilibs+set}" = "set" ; then gasnet_cv_envvar_OFI_LIBS="${_gasneti_cenv_ofilibs}" envval_src_OFI_LIBS=conf else gasnet_cv_envvar_OFI_LIBS=$envval_default_OFI_LIBS envval_src_OFI_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper OFI_LIBS ofilibs $gasnet_cv_configure_args_norm fi OFI_LIBS="$gasnet_cv_envvar_OFI_LIBS" if test "$OFI_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset OFI_LIBS if test "$envval_src_OFI_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_OFI_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$OFI_LIBS\"" >&5 $as_echo " \"$OFI_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$OFI_LIBS\"" >&5 $as_echo " (default) \"$OFI_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$OFI_LIBS\"" >&5 $as_echo " (disabled) \"$OFI_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$OFI_LIBS\"" >&5 $as_echo " (provided) \"$OFI_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$OFI_LIBS\"" >&5 $as_echo " (provided) \"$OFI_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$OFI_LIBS. Please configure --with-OFI_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([OFI_LIBS],[-lfabric]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv CONDUIT_LDFLAGS([fabric]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_LDFLAGS([OFI],[fabric]) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$OFI_HOME" in /usr|/) OFI_ldflags_guess='';; *) for OFI_ldflags_guess_dir in "$OFI_HOME/lib${GASNETI_PTR_BITS}" "$OFI_HOME/lib" ''; do test -z "$OFI_ldflags_guess_dir" && break for OFI_ldflags_guess_lib in fabric; do for OFI_ldflags_guess_suff in a so sl dylib la dll; do if test -r "$OFI_ldflags_guess_dir/lib$OFI_ldflags_guess_lib.$OFI_ldflags_guess_suff"; then break 3; fi done done done if test -n "$OFI_ldflags_guess_dir"; then OFI_ldflags_guess="-L$OFI_ldflags_guess_dir" # deferred to appear after help for [PREFIX]_LDFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ofi-rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:6) case "$enable_ofi_rpath" in no) : enabled_ofi_rpath='' ;; yes) : enabled_ofi_rpath="$OFI_ldflags_guess_dir" ;; *) : if test -z "$enabled_ofi_rpath"; then if test "x$enabled_rpath" = xyes; then enabled_ofi_rpath="$OFI_ldflags_guess_dir" else enabled_ofi_rpath='' fi fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ofi-rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) if test -n "$enabled_ofi_rpath"; then if test "${cc_rpath_option:+set}" = set; then OFI_ldflags_guess="$OFI_ldflags_guess $cc_rpath_option$enabled_ofi_rpath" else warn_missing_rpath="$warn_missing_rpath ofi" fi fi OFI_ldflags_guess="${OFI_ldflags_guess}" else OFI_ldflags_guess='' fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([OFI_LDFLAGS],[$OFI_ldflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:6) # Check whether --with-ofi-ldflags was given. if test "${with_ofi_ldflags+set}" = set; then : withval=$with_ofi_ldflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OFI_LDFLAGS setting" >&5 $as_echo_n "checking for OFI_LDFLAGS setting... " >&6; } envval_src_OFI_LDFLAGS="cached" if ${gasnet_cv_envvar_OFI_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_OFI_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_OFI_LDFLAGS="$OFI_ldflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_ofildflags+set}" = "set" ; then gasnet_cv_envvar_OFI_LDFLAGS="${_gasneti_nenv_ofildflags}" envval_src_OFI_LDFLAGS=given elif test "${_gasneti_cenv_ofildflags+set}" = "set" ; then gasnet_cv_envvar_OFI_LDFLAGS="${_gasneti_cenv_ofildflags}" envval_src_OFI_LDFLAGS=conf else gasnet_cv_envvar_OFI_LDFLAGS=$envval_default_OFI_LDFLAGS envval_src_OFI_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper OFI_LDFLAGS ofildflags $gasnet_cv_configure_args_norm fi OFI_LDFLAGS="$gasnet_cv_envvar_OFI_LDFLAGS" if test "$OFI_LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset OFI_LDFLAGS if test "$envval_src_OFI_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_OFI_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$OFI_LDFLAGS\"" >&5 $as_echo " \"$OFI_LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$OFI_LDFLAGS\"" >&5 $as_echo " (default) \"$OFI_LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$OFI_LDFLAGS\"" >&5 $as_echo " (disabled) \"$OFI_LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$OFI_LDFLAGS\"" >&5 $as_echo " (provided) \"$OFI_LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$OFI_LDFLAGS\"" >&5 $as_echo " (provided) \"$OFI_LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$OFI_LDFLAGS. Please configure --with-OFI_LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([OFI_LDFLAGS],[$OFI_ldflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) # Check whether --enable-ofi-rpath was given. if test "${enable_ofi_rpath+set}" = set; then : enableval=$enable_ofi_rpath; fi unset OFI_ldflags_guess unset OFI_ldflags_guess_dir unset OFI_ldflags_guess_lib unset OFI_ldflags_guess_suff # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ CONDUIT_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([OFI_LDFLAGS],[OFI_LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) eval gasnet_fn_split_linker_opts OFI_LDFLAGS OFI_LIBS $OFI_LDFLAGS $OFI_LIBS #echo "OFI_LDFLAGS=[$]OFI_LDFLAGS" #echo "OFI_LIBS=[$]OFI_LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([OFI_LDFLAGS],[OFI_LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$have_ofi" = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $OFI_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $OFI_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $OFI_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $OFI_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $OFI_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $OFI_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $OFI_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $OFI_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $OFI_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working OFI GASNet bindings,ofi_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working OFI GASNet bindings" >&5 $as_echo_n "checking for working OFI GASNet bindings... " >&6; } if ${gasnet_cv_ofi_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { { int rc; rc = fi_getinfo(FI_VERSION(FI_MAJOR_VERSION,FI_MINOR_VERSION), 0, 0, 0, 0, 0); } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_ofi_works=yes else gasnet_cv_ofi_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ofi_works" >&5 $as_echo "$gasnet_cv_ofi_works" >&6; } if test "$gasnet_cv_ofi_works" = yes; then : : else : have_ofi=no; if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working OFI GASNet bindings,ofi_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$have_ofi" = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_EXPR(for libfabric version code,ofi_version,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfabric version code" >&5 $as_echo_n "checking for libfabric version code... " >&6; } if ${gasnet_cv_ofi_version+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_ofi_version="" # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < #ifndef FI_REVISION_VERSION /* first appears in 1.10.0 */ #define FI_REVISION_VERSION 0 #endif #include extern char s[]; #define DIGIT(d) (((char)(( (((FI_MAJOR_VERSION*10000 + FI_MINOR_VERSION*100 + FI_REVISION_VERSION))>0?((FI_MAJOR_VERSION*10000 + FI_MINOR_VERSION*100 + FI_REVISION_VERSION)):-((FI_MAJOR_VERSION*10000 + FI_MINOR_VERSION*100 + FI_REVISION_VERSION))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (((FI_MAJOR_VERSION*10000 + FI_MINOR_VERSION*100 + FI_REVISION_VERSION))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_ofi_version=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting (FI_MAJOR_VERSION*10000 + FI_MINOR_VERSION*100 + FI_REVISION_VERSION)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_ofi_version" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < #ifndef FI_REVISION_VERSION /* first appears in 1.10.0 */ #define FI_REVISION_VERSION 0 #endif #include extern char s[]; #define DIGIT(d) (((char)(( (((FI_MAJOR_VERSION*10000 + FI_MINOR_VERSION*100 + FI_REVISION_VERSION))>0?((FI_MAJOR_VERSION*10000 + FI_MINOR_VERSION*100 + FI_REVISION_VERSION)):-((FI_MAJOR_VERSION*10000 + FI_MINOR_VERSION*100 + FI_REVISION_VERSION))) >>(d*4))&0xF))+0x40) char s[] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (((FI_MAJOR_VERSION*10000 + FI_MINOR_VERSION*100 + FI_REVISION_VERSION))>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { static char *p = s; while (*p) printf("%c",*(p++)); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([ -]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",$2)); print "-" if ($1 eq "-"); print $val; exit 0;}' gasnet_cv_ofi_version=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting (FI_MAJOR_VERSION*10000 + FI_MINOR_VERSION*100 + FI_REVISION_VERSION)" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ofi_version" >&5 $as_echo "$gasnet_cv_ofi_version" >&6; } if test -n "$gasnet_cv_ofi_version" ; then ofi_version=$gasnet_cv_ofi_version fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_EXPR(for libfabric version code,ofi_version,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfabric 1.5.0 or newer" >&5 $as_echo_n "checking for libfabric 1.5.0 or newer... " >&6; } if test "$ofi_version" -ge 10500; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_ofi=no fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$have_ofi" = yes; then # What we actually care about is GASNETI_HAVE_SPINLOCK, which is available # whenever !GASNETI_ATOMICOPS_NOT_SIGNALSAFE # For all platforms of likely interest, checking (compiler||native) is sufficient. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate atomics support required by ofi-conduit" >&5 $as_echo_n "checking for appropriate atomics support required by ofi-conduit... " >&6; } check_atomics_match='' for check_atomics_val in native compiler; do if test $GASNETI_ATOMIC_IMPL_STR = $check_atomics_val; then check_atomics_match=1 break fi done if test -n "$check_atomics_match"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else if test -n "$enabled_generic_atomicops" ; then check_atomics_msg='user passed --enable-force-generic-atomicops' elif test -n "$enabled_os_atomicops"; then check_atomics_msg='user passed --enable-force-os-atomicops' else check_atomics_msg="this platform has defaulted to '$GASNETI_ATOMIC_IMPL_STR' atomicops" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ofi-conduit requires native atomicops, but $check_atomics_msg" >&5 $as_echo "$as_me: WARNING: ofi-conduit requires native atomicops, but $check_atomics_msg" >&2;} echo "ofi-conduit requires native atomicops, but $check_atomics_msg" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) have_ofi=no unset check_atomics_msg fi unset check_atomics_match fi if test "$have_ofi" = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ofi-spawner,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ofi-spawner was given. if test "${with_ofi_spawner+set}" = set; then : withval=$with_ofi_spawner; fi if test "${with_ofi_spawner+set}" = set; then : withval=$with_ofi_spawner; case "$withval" in no) : as_fn_error $? "--with-ofi-spawner argument must be \"ssh\", \"mpi\" or \"pmi\"" "$LINENO" 5 ;; *) : case "$withval" in ssh|mpi|pmi) gasnet_spawner_conf=$withval ;; yes) as_fn_error $? "--with-ofi-spawner requires an argument (\"ssh\", \"mpi\" or \"pmi\")" "$LINENO" 5 ;; *) as_fn_error $? "--with-ofi-spawner argument must be \"ssh\", \"mpi\" or \"pmi\"" "$LINENO" 5 ;; esac ;; esac else : if test "$have_mpi_compat" = yes; then gasnet_spawner_conf=mpi else gasnet_spawner_conf=ssh fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ofi-spawner,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$gasnet_spawner_conf$have_mpi_compat" = mpino; then as_fn_error $? "--with-ofi-spawner=mpi requires MPI compatibility support which $mpi_compat_reason" "$LINENO" 5 elif test "$gasnet_spawner_conf$have_fork" = sshno; then as_fn_error $? "--with-ofi-spawner=ssh requires fork() support which $fork_reason" "$LINENO" 5 elif test "$gasnet_spawner_conf" = pmi; then force_pmi=yes fi cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_SPAWNER_CONF "$gasnet_spawner_conf" _ACEOF GASNET_OFI_SPAWNER_CONF=$gasnet_spawner_conf unset gasnet_spawner_conf ofi_provider="" ofi_define_mr_virt_addr="no" # tri-state: "no" omits "#define", forcing runtime selection ofi_define_mr_prov_key="no" # tri-state: "no" omits "#define", forcing runtime selection ofi_define_use_av_map="no" # tri-state: "no" omits "#define", forcing runtime selection ofi_single_provider="yes" detected_ofi_provider="" ofi_use_thread_domain=0 ofi_use_multi_cq=0 ofi_retry_recvmsg=0 # List of known providers in order of preference. # Presence on this list does not necessarily indicate support status. # Consult ofi-conduit/README for the status of supported libfabric providers. known_providers="cxi psm2 gni verbs;ofi_rxm efa sockets udp;ofi_rxd tcp;ofi_rxm" # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ofi-provider,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ofi-provider was given. if test "${with_ofi_provider+set}" = set; then : withval=$with_ofi_provider; fi if test "${with_ofi_provider+set}" = set; then : withval=$with_ofi_provider; case "$withval" in no) : ;; *) : ofi_provider="$withval" ;; esac else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ofi-provider,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Don't autodetect if the user knows which provider they want if test -z "$ofi_provider"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(PATH,"$OFI_HOME/bin:$PATH") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_PATH" = "" ; then _pushcnt_PATH=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${PATH+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_PATH_$_pushcnt_PATH=\$PATH eval _pushedvarset_PATH_$_pushcnt_PATH=$_gasnet_pushvar_isset _pushcnt_PATH=`expr $_pushcnt_PATH + 1` _total_pushcnt=`expr $_total_pushcnt + 1` PATH="$OFI_HOME/bin:$PATH" echo "pushed new PATH value: $PATH" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(PATH,"$OFI_HOME/bin:$PATH") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if command -v fi_info > /dev/null 2>&1; then # Only do this if fi_info is in the $PATH for word in $known_providers do if fi_info --provider="$word" > /dev/null 2>&1; then detected_ofi_provider="$word" break fi done ofi_provider="$detected_ofi_provider" fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(PATH) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_PATH" -ge "1"; then _pushcnt_PATH=`expr $_pushcnt_PATH - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_PATH_$_pushcnt_PATH if test "$_gasnet_pushvar_isset" = "1" ; then eval PATH=\$_pushedvar_PATH_$_pushcnt_PATH echo "popping PATH back to: $PATH" >&5 else unset PATH echo "popping PATH back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on PATH" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(PATH) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else unset aliased_ofi_provider case "$ofi_provider" in verbs) aliased_ofi_provider='verbs;ofi_rxm' ;; tcp) aliased_ofi_provider='tcp;ofi_rxm' ;; udp) aliased_ofi_provider='udp;ofi_rxd' ;; *:*) aliased_ofi_provider=`echo "$ofi_provider" | sed -e 's/:/;/'` ;; esac if test "${aliased_ofi_provider+set}" = set ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-ofi-provider='$ofi_provider' converted to --with-ofi-provider='$aliased_ofi_provider'" >&5 $as_echo "$as_me: WARNING: Option --with-ofi-provider='$ofi_provider' converted to --with-ofi-provider='$aliased_ofi_provider'" >&2;} echo "Option --with-ofi-provider='$ofi_provider' converted to --with-ofi-provider='$aliased_ofi_provider'" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ofi_provider="$aliased_ofi_provider" fi fi ofi_floor=0 case "$ofi_provider" in psm2) ofi_define_mr_virt_addr=0 ofi_define_mr_prov_key=0 ofi_define_use_av_map=0 ofi_use_thread_domain=1 ;; cxi) ofi_define_mr_virt_addr=0 ofi_define_mr_prov_key=0 ofi_define_use_av_map=0 ofi_use_multi_cq=1 ofi_retry_recvmsg=1 ;; gni) ofi_define_mr_virt_addr=1 ofi_define_mr_prov_key=1 ofi_define_use_av_map=0 ofi_floor=11400 ;; verbs\;ofi_rxm) ofi_define_mr_virt_addr=1 ofi_define_mr_prov_key=1 ofi_define_use_av_map=0 if test "$GASNET_PLATFORM" = crayex; then ofi_floor=11100 else ofi_floor=11200 fi ;; tcp\;ofi_rxm) ofi_define_mr_virt_addr=0 ofi_define_mr_prov_key=0 ofi_define_use_av_map=0 ofi_floor=11500 ;; udp\;ofi_rxd) ofi_define_mr_virt_addr=0 ofi_define_mr_prov_key=0 ofi_define_use_av_map=0 ofi_retry_recvmsg=1 ofi_floor=10700 ;; sockets) ofi_define_mr_virt_addr=0 ofi_define_mr_prov_key=0 ofi_define_use_av_map=0 ;; efa) ofi_define_mr_virt_addr=1 ofi_define_mr_prov_key=1 ofi_define_use_av_map=0 ofi_retry_recvmsg=1 ;; default|generic|"") # NOTE: "default" is deprecated and can be removed when Spack packaging drops 2022.3.0 if test -n "$ofi_provider"; then why="as requested via --with-ofi-provider=$ofi_provider" else why='because no OFI provider was specified via the --with-ofi-provider option and no known provider could be auto-detected' fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using runtime provider feature detection in ofi-conduit $why." >&5 $as_echo "$as_me: WARNING: Using runtime provider feature detection in ofi-conduit $why." >&2;} echo "Using runtime provider feature detection in ofi-conduit $why." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ofi_use_multi_cq=1 ofi_retry_recvmsg=1 ofi_single_provider='no' ;; *) case "$enable_allow_unknown_ofi_provider" in '' | no) : echo echo "configure error: Unknown OFI provider '$ofi_provider' requested" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown OFI provider '$ofi_provider' requested together with '--enable-allow-unknown-ofi-provider'. Runtime provider feature detection and conservative defaults will be used except where overridden via --(en|dis)able-ofi-[feature] options." >&5 $as_echo "$as_me: WARNING: Unknown OFI provider '$ofi_provider' requested together with '--enable-allow-unknown-ofi-provider'. Runtime provider feature detection and conservative defaults will be used except where overridden via --(en|dis)able-ofi-[feature] options." >&2;} echo "Unknown OFI provider '$ofi_provider' requested together with '--enable-allow-unknown-ofi-provider'. Runtime provider feature detection and conservative defaults will be used except where overridden via --(en|dis)able-ofi-[feature] options." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ofi_use_multi_cq=1 ofi_retry_recvmsg=1 ;; esac ;; esac if test "$ofi_single_provider" = "yes"; then cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_PROVIDER_LIST "$ofi_provider" _ACEOF ofi_provider_ident=`echo "$ofi_provider" | cut '-d;' -f1` else cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_PROVIDER_LIST "$known_providers" _ACEOF ofi_provider_ident="generic" fi cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_PROVIDER_IDENT $ofi_provider_ident _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ofi-thread-domain,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ofi-thread-domain was given. if test "${enable_ofi_thread_domain+set}" = set; then : enableval=$enable_ofi_thread_domain; fi case "$enable_ofi_thread_domain" in no) : ofi_use_thread_domain="0" ;; yes) : ofi_use_thread_domain="1" ;; *) : ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ofi-thread-domain,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ofi-multi-cq,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ofi-multi-cq was given. if test "${enable_ofi_multi_cq+set}" = set; then : enableval=$enable_ofi_multi_cq; fi case "$enable_ofi_multi_cq" in no) : ofi_use_multi_cq="0" ;; yes) : ofi_use_multi_cq="1" ;; *) : ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ofi-multi-cq,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ofi-retry-recvmsg,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ofi-retry-recvmsg was given. if test "${enable_ofi_retry_recvmsg+set}" = set; then : enableval=$enable_ofi_retry_recvmsg; fi case "$enable_ofi_retry_recvmsg" in no) : ofi_retry_recvmsg="0" ;; yes) : ofi_retry_recvmsg="1" ;; *) : ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ofi-retry-recvmsg,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ofi-mr-virt-addr,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ofi-mr-virt-addr was given. if test "${enable_ofi_mr_virt_addr+set}" = set; then : enableval=$enable_ofi_mr_virt_addr; fi case "$enable_ofi_mr_virt_addr" in no) : ofi_define_mr_virt_addr="0" ;; yes) : ofi_define_mr_virt_addr="1" ;; *) : if test x$enable_ofi_mr_virt_addr = xdynamic; then : # undocumented explict request for dynamic behavior ofi_define_mr_virt_addr=no fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ofi-mr-virt-addr,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ofi-mr-prov-key,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ofi-mr-prov-key was given. if test "${enable_ofi_mr_prov_key+set}" = set; then : enableval=$enable_ofi_mr_prov_key; fi case "$enable_ofi_mr_prov_key" in no) : ofi_define_mr_prov_key="0" ;; yes) : ofi_define_mr_prov_key="1" ;; *) : if test x$enable_ofi_mr_prov_key = xdynamic; then : # undocumented explict request for dynamic behavior ofi_define_mr_prov_key=no fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ofi-mr-prov-key,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ofi-mr-scalable,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-ofi-mr-scalable was given. if test "${enable_ofi_mr_scalable+set}" = set; then : enableval=$enable_ofi_mr_scalable; fi case "$enable_ofi_mr_scalable" in no) : if test -n "${enable_ofi_mr_virt_addr+set}${enable_ofi_mr_prov_key+set}"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DEPRECATED option --disable-ofi-mr-scalable has been IGNORED due to use of one or more --(en|dis)able-ofi-mr-* options" >&5 $as_echo "$as_me: WARNING: DEPRECATED option --disable-ofi-mr-scalable has been IGNORED due to use of one or more --(en|dis)able-ofi-mr-* options" >&2;} echo "DEPRECATED option --disable-ofi-mr-scalable has been IGNORED due to use of one or more --(en|dis)able-ofi-mr-* options" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --disable-ofi-mr-scalable is DEPRECATED" >&5 $as_echo "$as_me: WARNING: option --disable-ofi-mr-scalable is DEPRECATED" >&2;} echo "option --disable-ofi-mr-scalable is DEPRECATED" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:5) ofi_define_mr_virt_addr="1"; ofi_define_mr_prov_key="1" fi ;; yes) : if test -n "${enable_ofi_mr_virt_addr+set}${enable_ofi_mr_prov_key+set}"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DEPRECATED option --enable-ofi-mr-scalable has been IGNORED due to use of one or more --(en|dis)able-ofi-mr-* options" >&5 $as_echo "$as_me: WARNING: DEPRECATED option --enable-ofi-mr-scalable has been IGNORED due to use of one or more --(en|dis)able-ofi-mr-* options" >&2;} echo "DEPRECATED option --enable-ofi-mr-scalable has been IGNORED due to use of one or more --(en|dis)able-ofi-mr-* options" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --enable-ofi-mr-scalable is DEPRECATED" >&5 $as_echo "$as_me: WARNING: option --enable-ofi-mr-scalable is DEPRECATED" >&2;} echo "option --enable-ofi-mr-scalable is DEPRECATED" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:5) ofi_define_mr_virt_addr="0"; ofi_define_mr_prov_key="0" fi ;; *) : ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ofi-mr-scalable,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # For separate enable/disable documentation: # Check whether --enable-ofi-av-map was given. if test "${enable_ofi_av_map+set}" = set; then : enableval=$enable_ofi_av_map; fi # Check whether --enable-ofi-av-map was given. if test "${enable_ofi_av_map+set}" = set; then : enableval=$enable_ofi_av_map; fi # Real work (w/o docs) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ofi-av-map,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$enable_ofi_av_map" in no) : ofi_define_use_av_map="0" ;; yes) : ofi_define_use_av_map="1" ;; *) : if test x$enable_ofi_use_av_map = xdynamic; then : # undocumented explict request for dynamic behavior ofi_define_use_av_map=no fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ofi-av-map,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Inform the user that settings were autodetected if test -n "$detected_ofi_provider" \ && test "$ofi_define_use_av_map" != "no" \ && test "$ofi_define_mr_virt_addr" != "no" \ && test "$ofi_define_mr_prov_key" != "no"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The $detected_ofi_provider OFI provider was detected on your system and the ofi-conduit has been configured for that provider. If that is not your desired provider, override this by using the --with-ofi-provider= configure flag. See the ofi-conduit README for details." >&5 $as_echo "$as_me: WARNING: The $detected_ofi_provider OFI provider was detected on your system and the ofi-conduit has been configured for that provider. If that is not your desired provider, override this by using the --with-ofi-provider= configure flag. See the ofi-conduit README for details." >&2;} echo " The $detected_ofi_provider OFI provider was detected on your system and the ofi-conduit has been configured for that provider. If that is not your desired provider, override this by using the --with-ofi-provider= configure flag. See the ofi-conduit README for details." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # Check provider-specific version *after* any $detected_ofi_provider message # # REMINDER: per-provider floors are documented in ofi-conduit/README # and also enforced in ofi-conduit/gasnet_ofi.c:gasnetc_ofi_init() case "$enable_allow_untrusted_ofi_provider" in '' | no) : if test $ofi_version -ne 0; then # NOTE: ofi_floor==0 if no floor is to be enforced { $as_echo "$as_me:${as_lineno-$LINENO}: checking for provider-specific minimum libfabric version" >&5 $as_echo_n "checking for provider-specific minimum libfabric version... " >&6; } if test $ofi_version -ge $ofi_floor; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else have="$(expr $ofi_version / 10000).$(expr $ofi_version / 100 % 100).$(expr $ofi_version % 100)" want="$(expr $ofi_floor / 10000).$(expr $ofi_floor / 100 % 100).$(expr $ofi_floor % 100)" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - provider '$ofi_provider' is untrusted in libfabric version $have (minimum trusted version is $want)." >&5 $as_echo "no - provider '$ofi_provider' is untrusted in libfabric version $have (minimum trusted version is $want)." >&6; } have_ofi=no fi fi ;; *) : : ;; esac if test "$ofi_define_mr_virt_addr" != "no"; then cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_HAS_MR_VIRT_ADDR_CONFIGURE "$ofi_define_mr_virt_addr" _ACEOF fi if test "$ofi_define_mr_prov_key" != "no"; then cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_HAS_MR_PROV_KEY_CONFIGURE "$ofi_define_mr_prov_key" _ACEOF fi if test "$ofi_define_use_av_map" != "no"; then cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_USE_AV_MAP_CONFIGURE "$ofi_define_use_av_map" _ACEOF fi cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_USE_THREAD_DOMAIN $ofi_use_thread_domain _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_USE_MULTI_CQ $ofi_use_multi_cq _ACEOF cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_RETRY_RECVMSG $ofi_retry_recvmsg _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ofi-num-completions,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ofi-num-completions was given. if test "${with_ofi_num_completions+set}" = set; then : withval=$with_ofi_num_completions; fi if test "${with_ofi_num_completions+set}" = set; then : withval=$with_ofi_num_completions; case "$withval" in no) : as_fn_error $? "--with-ofi-num-completions must be greater than 0" "$LINENO" 5 ;; *) : if expr "$withval" : '[0-9]*$' >/dev/null 2>&1 && \ expr "$withval" '>' 0 >/dev/null 2>&1 ; then ofi_num_completions="$withval" else as_fn_error $? "--with-ofi-num-completions=\"$withval\" is not legal. Value must be greater than 0" "$LINENO" 5 fi ;; esac else : ofi_num_completions=64 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ofi-num-completions,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_NUM_COMPLETIONS $ofi_num_completions _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ofi-max-medium,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ofi-max-medium was given. if test "${with_ofi_max_medium+set}" = set; then : withval=$with_ofi_max_medium; fi if test "${with_ofi_max_medium+set}" = set; then : withval=$with_ofi_max_medium; case "$withval" in no) : as_fn_error $? "--with-ofi-max-medium must be no smaller than 512" "$LINENO" 5 ;; *) : if expr "$withval" : '[0-9]*$' >/dev/null 2>&1 && \ expr "$withval" '>=' 512 >/dev/null 2>&1 ; then ofi_max_medium="$withval" else as_fn_error $? "--with-ofi-max-medium=\"$withval\" is not legal. Value must be no smaller than 512." "$LINENO" 5 fi ;; esac else : ofi_max_medium=8192 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ofi-max-medium,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat >>confdefs.h <<_ACEOF #define GASNETC_OFI_MAX_MEDIUM_DFLT $ofi_max_medium _ACEOF case "$enable_ofi_legacy_extended" in '' | no) : ;; *) : $as_echo "#define GASNETC_OFI_REFERENCE_EXTENDED 1" >>confdefs.h # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You passed --enable-ofi-legacy-extended This is unsupported and usually has a SERIOUS impact on performance. Do not trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >&5 $as_echo "$as_me: WARNING: ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You passed --enable-ofi-legacy-extended This is unsupported and usually has a SERIOUS impact on performance. Do not trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >&2;} echo " ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You passed --enable-ofi-legacy-extended This is unsupported and usually has a SERIOUS impact on performance. Do not trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; esac if test "$GASNET_PLATFORM" = crayex; then gex_fi_hmem_minor_floor=11 else gex_fi_hmem_minor_floor=12 fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $OFI_CFLAGS -DGEX_FI_MINOR_VERSION=$gex_fi_hmem_minor_floor") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $OFI_CFLAGS -DGEX_FI_MINOR_VERSION=$gex_fi_hmem_minor_floor" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $OFI_CFLAGS -DGEX_FI_MINOR_VERSION=$gex_fi_hmem_minor_floor") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $OFI_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $OFI_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $OFI_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $OFI_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $OFI_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $OFI_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Probe for fi_mr_regattr() # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for fi_mr_regattr(),fi_mr_regattr,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fi_mr_regattr()" >&5 $as_echo_n "checking for fi_mr_regattr()... " >&6; } if ${gasnet_cv_fi_mr_regattr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int rc = fi_mr_regattr(NULL, NULL, 0, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_fi_mr_regattr=yes else gasnet_cv_fi_mr_regattr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_fi_mr_regattr" >&5 $as_echo "$gasnet_cv_fi_mr_regattr" >&6; } if test "$gasnet_cv_fi_mr_regattr" = yes; then : $as_echo "#define GASNETC_HAVE_FI_MR_REG_ATTR 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for fi_mr_regattr(),fi_mr_regattr,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Probe for libfabric kinds support # FI_HMEM_{CUDA,ROCR} identifiers are an enum, so we create HAVE_* feature macros # TODO: allow-list or ban-list providers here? have_fi_hmem_cuda=no have_fi_hmem_rocr=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for FI_HMEM support (libfabric 1.$gex_fi_hmem_minor_floor or newer),have_fi_hmem,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FI_HMEM support (libfabric 1.$gex_fi_hmem_minor_floor or newer)" >&5 $as_echo_n "checking for FI_HMEM support (libfabric 1.$gex_fi_hmem_minor_floor or newer)... " >&6; } if ${gasnet_cv_have_fi_hmem+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION) < FI_VERSION(1, GEX_FI_MINOR_VERSION) #error "failed check for minimum libfabric version for memory kinds support" #endif int main () { { unsigned long caps = (unsigned long)FI_HMEM; struct fi_mr_attr x; x.iface = FI_HMEM_SYSTEM; (void)(&x.device); } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_have_fi_hmem=yes else gasnet_cv_have_fi_hmem=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_fi_hmem" >&5 $as_echo "$gasnet_cv_have_fi_hmem" >&6; } if test "$gasnet_cv_have_fi_hmem" = yes; then : # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for FI_HMEM_CUDA,have_fi_hmem_cuda,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FI_HMEM_CUDA" >&5 $as_echo_n "checking for FI_HMEM_CUDA... " >&6; } if ${gasnet_cv_have_fi_hmem_cuda+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { { struct fi_mr_attr x; x.iface = FI_HMEM_CUDA; } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_have_fi_hmem_cuda=yes else gasnet_cv_have_fi_hmem_cuda=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_fi_hmem_cuda" >&5 $as_echo "$gasnet_cv_have_fi_hmem_cuda" >&6; } if test "$gasnet_cv_have_fi_hmem_cuda" = yes; then : have_fi_hmem_cuda=yes $as_echo "#define GASNETC_HAVE_FI_HMEM_CUDA 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for FI_HMEM_CUDA,have_fi_hmem_cuda,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for FI_HMEM_ROCR,have_fi_hmem_rocr,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FI_HMEM_ROCR" >&5 $as_echo_n "checking for FI_HMEM_ROCR... " >&6; } if ${gasnet_cv_have_fi_hmem_rocr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { { struct fi_mr_attr x; x.iface = FI_HMEM_ROCR; } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_have_fi_hmem_rocr=yes else gasnet_cv_have_fi_hmem_rocr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_fi_hmem_rocr" >&5 $as_echo "$gasnet_cv_have_fi_hmem_rocr" >&6; } if test "$gasnet_cv_have_fi_hmem_rocr" = yes; then : have_fi_hmem_rocr=yes $as_echo "#define GASNETC_HAVE_FI_HMEM_ROCR 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for FI_HMEM_ROCR,have_fi_hmem_rocr,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for FI_HMEM_ZE,have_fi_hmem_ze,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FI_HMEM_ZE" >&5 $as_echo_n "checking for FI_HMEM_ZE... " >&6; } if ${gasnet_cv_have_fi_hmem_ze+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { { struct fi_mr_attr x; x.iface = FI_HMEM_ZE; } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_have_fi_hmem_ze=yes else gasnet_cv_have_fi_hmem_ze=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_fi_hmem_ze" >&5 $as_echo "$gasnet_cv_have_fi_hmem_ze" >&6; } if test "$gasnet_cv_have_fi_hmem_ze" = yes; then : have_fi_hmem_ze=yes $as_echo "#define GASNETC_HAVE_FI_HMEM_ZE 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for FI_HMEM_ZE,have_fi_hmem_ze,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for FI_HMEM support (libfabric 1.$gex_fi_hmem_minor_floor or newer),have_fi_hmem,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi fi _conduit_enabled_ofi=no if test "$gasnet_toolsonly_mode" = "no" ; then if test "$enabled_ofi$have_ofi" = yesyes; then case "yes" in no) ;; g1) if test "$force_ofi" = yes ; then echo echo "configure error: It appears your system has the required support for ofi-conduit, however ofi-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ofi " if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else # warn and disable enabled_ofi=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for ofi-conduit, however ofi-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ofi " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for ofi-conduit, however ofi-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ofi " >&2;} echo "It appears your system has the required support for ofi-conduit, however ofi-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-ofi " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ;; exp) if test "$force_ofi" = yes || test "$enable_ofi" = "probe" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ofi-conduit is still experimental, and may have performance and correctness bugs." >&5 $as_echo "$as_me: WARNING: ofi-conduit is still experimental, and may have performance and correctness bugs." >&2;} echo "ofi-conduit is still experimental, and may have performance and correctness bugs." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) _conduit_enabled_ofi=yes else # warn and disable enabled_ofi=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It appears your system has the required support for ofi-conduit. However, ofi-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-ofi. Otherwise, you can disable this message with --disable-ofi " >&5 $as_echo "$as_me: WARNING: It appears your system has the required support for ofi-conduit. However, ofi-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-ofi. Otherwise, you can disable this message with --disable-ofi " >&2;} echo "It appears your system has the required support for ofi-conduit. However, ofi-conduit is still experimental, and may have performance and correctness bugs. You can enable experimental support with --enable-ofi. Otherwise, you can disable this message with --disable-ofi " >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ;; yes) _conduit_enabled_ofi=yes ;; esac else if test "$force_ofi" = yes ; then echo echo "configure error: User requested --enable-ofi but I don't know how to build ofi programs for your system" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "$_conduit_reason_ofi" = "auto" ; then _conduit_reason_ofi="not found" fi fi if test "$_conduit_enabled_ofi" = "yes" ; then _conduit_flagstr="ON ($_conduit_reason_ofi)" else _conduit_flagstr="OFF ($_conduit_reason_ofi)" fi _conduit_desc_ofi=" OpenFabrics Interfaces conduit (ofi) $_conduit_flagstr" fi if test "$enabled_ofi$have_ofi" = yesyes; then USE_OFI_CONDUIT_TRUE= USE_OFI_CONDUIT_FALSE='#' else USE_OFI_CONDUIT_TRUE='#' USE_OFI_CONDUIT_FALSE= fi if test "$have_fi_hmem_cuda" = yes; then HAVE_FI_HMEM_CUDA_TRUE= HAVE_FI_HMEM_CUDA_FALSE='#' else HAVE_FI_HMEM_CUDA_TRUE='#' HAVE_FI_HMEM_CUDA_FALSE= fi if test "$have_fi_hmem_rocr" = yes; then HAVE_FI_HMEM_ROCR_TRUE= HAVE_FI_HMEM_ROCR_FALSE='#' else HAVE_FI_HMEM_ROCR_TRUE='#' HAVE_FI_HMEM_ROCR_FALSE= fi if test "$have_fi_hmem_ze" = yes; then HAVE_FI_HMEM_ZE_TRUE= HAVE_FI_HMEM_ZE_FALSE='#' else HAVE_FI_HMEM_ZE_TRUE='#' HAVE_FI_HMEM_ZE_FALSE= fi #--------------------------------------------------------------------------------------------------------------- # CONDUIT CONFIGURATIONS FINISH #--------------------------------------------------------------------------------------------------------------- CONDUITS= # reporting file output at completion if test -n "$CONDUIT_LIST" ; then CONDUIT_LIST_CLEAN=no else CONDUIT_LIST=.gasnet-conduit-list.tmp CONDUIT_LIST_CLEAN=yes fi cat >$CONDUIT_LIST <>$CONDUIT_LIST <> $CONDUIT_LIST fi if test "$_conduit_enabled_ofi" = "yes" ; then CONDUITS="$CONDUITS ofi" fi if test "$_conduit_list_ofi" = "yes" ; then echo "$_conduit_desc_ofi" >> $CONDUIT_LIST fi if test "$_conduit_enabled_udp" = "yes" ; then CONDUITS="$CONDUITS udp" fi if test "$_conduit_list_udp" = "yes" ; then echo "$_conduit_desc_udp" >> $CONDUIT_LIST fi if test "$_conduit_enabled_mpi" = "yes" ; then CONDUITS="$CONDUITS mpi" fi if test "$_conduit_list_mpi" = "yes" ; then echo "$_conduit_desc_mpi" >> $CONDUIT_LIST fi cat >>$CONDUIT_LIST <> $CONDUIT_LIST fi if test "$_conduit_enabled_ibv" = "yes" ; then CONDUITS="$CONDUITS ibv" fi if test "$_conduit_list_ibv" = "yes" ; then echo "$_conduit_desc_ibv" >> $CONDUIT_LIST fi #-------------------------------------------------------------------------------------------------------- if test -z "$CONDUITS" ; then if test "$enabled_auto_detect" = yes; then echo echo "configure error: No network conduits were auto-detected. Some conduits require --enable-XXX configure flags and/or additional variables providing the install location of vendor drivers. If you intend to use GASNet without network support, you must use the GASNet_Tools distribution instead (see https://gasnet.lbl.gov). See the GASNet documentation for additional details." if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else # if user had passed any --enable-* args then we would have failed earlier echo echo "configure error: No network conduits were enabled. When using --disable-auto-conduit-detect, at least one argument of the form --enable-SOME_NETWORK is required. If you intend to use GASNet without network support, you must use the GASNet_Tools distribution instead (see https://gasnet.lbl.gov). See the GASNet documentation for additional details." if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi fi cat >>confdefs.h <<_ACEOF #define GASNETI_CONDUITS "$CONDUITS" _ACEOF ######################################################################## # Configure conduit-independent spawners # Things needed by mpi spawner # All the env var settings (or other common logic) needed by the # various conduit-specific gasnetrun_* scripts that do (or may) # resolve to invoking gasnetrun_mpi.pl. MPIRUN_COMMON=$TOP_BUILDDIR/other/mpirun_common if test "$have_mpi_compat" = yes; then HAVE_BOOTSTRAP_MPI_TRUE= HAVE_BOOTSTRAP_MPI_FALSE='#' else HAVE_BOOTSTRAP_MPI_TRUE='#' HAVE_BOOTSTRAP_MPI_FALSE= fi # Option to omit MPI support? # Things needed by ssh spawner SSH_SPAWNER_LIBS="" for ac_header in sys/socket.h sys/sockio.h sys/uio.h netinet/tcp.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done case "$target_os" in solaris*) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_ssh_libs=yes else have_ssh_libs=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_gethostbyname=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_gethostbyname+:} false; then : break fi done if ${ac_cv_search_gethostbyname+:} false; then : else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else no fi if test "x$have_ssh_libs" = xno ; then : # XXX: what to do in this case? else SSH_SPAWNER_LIBS="$LIBS" fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t or its equivalent" >&5 $as_echo_n "checking for socklen_t or its equivalent... " >&6; } if ${gasnet_cv_socklen_t+:} false; then : $as_echo_n "(cached) " >&6 else # 'float' is to check the compiler is reliable gasnet_socklen_t="" for gasnet_socklen_try in socklen_t float size_t int long unsigned "unsigned long"; do if test "$gasnet_socklen_t"; then break; # break in success block of TRY would leave temp files else # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < #include #include int main(void) { $gasnet_socklen_try x = 0; getpeername(0,NULL,&x); getsockname(0,NULL,&x); ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:6) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_socklen_t="$gasnet_socklen_try" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_socklen_t="$gasnet_socklen_try" else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi done gasnet_cv_socklen_t="$gasnet_socklen_t" fi if test x"$gasnet_cv_socklen_t" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } elif test "$gasnet_cv_socklen_t" = float; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: compiler unreliable - defaulting to socklen_t" >&5 $as_echo "compiler unreliable - defaulting to socklen_t" >&6; } cat >>confdefs.h <<_ACEOF #define GASNET_SOCKLEN_T socklen_t _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_socklen_t" >&5 $as_echo "$gasnet_cv_socklen_t" >&6; } cat >>confdefs.h <<_ACEOF #define GASNET_SOCKLEN_T $gasnet_cv_socklen_t _ACEOF fi # Prefer setpgid(), but unless cross-compiling we can use setpgrp() for ac_func in setpgid do : ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid" if test "x$ac_cv_func_setpgid" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SETPGID 1 _ACEOF fi done if test "$cross_compiling" = "no" ; then for ac_func in setpgrp do : ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp" if test "x$ac_cv_func_setpgrp" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SETPGRP 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 $as_echo_n "checking whether setpgrp takes no argument... " >&6; } if ${ac_cv_func_setpgrp_void+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* If this system has a BSD-style setpgrp which takes arguments, setpgrp(1, 1) will fail with ESRCH and return -1, in that case exit successfully. */ return setpgrp (1,1) != -1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_setpgrp_void=no else ac_cv_func_setpgrp_void=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 $as_echo "$ac_cv_func_setpgrp_void" >&6; } if test $ac_cv_func_setpgrp_void = yes; then $as_echo "#define SETPGRP_VOID 1" >>confdefs.h fi fi done fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ssh-cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ssh-cmd was given. if test "${with_ssh_cmd+set}" = set; then : withval=$with_ssh_cmd; fi if test "${with_ssh_cmd+set}" = set; then : withval=$with_ssh_cmd; case "$withval" in no) : as_fn_error $? "--with-ssh-cmd requires an argument" "$LINENO" 5 ;; *) : case "$withval" in yes|no) as_fn_error $? "--with-ssh-cmd requires an argument" "$LINENO" 5 ;; *) gasnet_ssh_cmd="$withval" ;; esac ;; esac else : gasnet_ssh_cmd="ssh" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ssh-cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat >>confdefs.h <<_ACEOF #define GASNETI_DEFAULT_SSH_CMD "$gasnet_ssh_cmd" _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ssh-options,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ssh-options was given. if test "${with_ssh_options+set}" = set; then : withval=$with_ssh_options; fi if test "${with_ssh_options+set}" = set; then : withval=$with_ssh_options; case "$withval" in no) : as_fn_error $? "--with-ssh-options requires an argument" "$LINENO" 5 ;; *) : case "$withval" in yes|no) as_fn_error $? "--with-ssh-options requires an argument" "$LINENO" 5 ;; *) gasnet_ssh_options="$withval" ;; esac ;; esac else : gasnet_ssh_options="" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ssh-options,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat >>confdefs.h <<_ACEOF #define GASNETI_DEFAULT_SSH_OPTIONS "$gasnet_ssh_options" _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ssh-nodefile,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ssh-nodefile was given. if test "${with_ssh_nodefile+set}" = set; then : withval=$with_ssh_nodefile; fi if test "${with_ssh_nodefile+set}" = set; then : withval=$with_ssh_nodefile; case "$withval" in no) : as_fn_error $? "--with-ssh-nodefile requires an argument" "$LINENO" 5 ;; *) : case "$withval" in yes|no) as_fn_error $? "--with-ssh-nodefile requires an argument" "$LINENO" 5 ;; *) gasnet_ssh_nodefile="$withval" ;; esac ;; esac else : gasnet_ssh_nodefile="" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ssh-nodefile,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat >>confdefs.h <<_ACEOF #define GASNETI_DEFAULT_SSH_NODEFILE "$gasnet_ssh_nodefile" _ACEOF # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(ssh-out-degree,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ssh-out-degree was given. if test "${with_ssh_out_degree+set}" = set; then : withval=$with_ssh_out_degree; fi if test "${with_ssh_out_degree+set}" = set; then : withval=$with_ssh_out_degree; case "$withval" in no) : as_fn_error $? "--with-ssh-out-degree requires a non-negative integer argument" "$LINENO" 5 ;; *) : case "$withval" in yes|no) as_fn_error $? "--with-ssh-out-degree requires a non-negative integer argument" "$LINENO" 5 ;; esac if expr "${withval}" : "[0-9][0-9]*" >/dev/null; then gasnet_ssh_out_degree="$withval" else as_fn_error $? "--with-ssh-out-degree requires a non-negative integer argument" "$LINENO" 5 fi ;; esac else : gasnet_ssh_out_degree=32 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(ssh-out-degree,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) cat >>confdefs.h <<_ACEOF #define GASNETI_DEFAULT_SSH_OUT_DEGREE $gasnet_ssh_out_degree _ACEOF if test "$have_fork" = yes; then HAVE_BOOTSTRAP_SSH_TRUE= HAVE_BOOTSTRAP_SSH_FALSE='#' else HAVE_BOOTSTRAP_SSH_TRUE='#' HAVE_BOOTSTRAP_SSH_FALSE= fi # Things for pmi-spawner # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(pmi,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-pmi was given. if test "${enable_pmi+set}" = set; then : enableval=$enable_pmi; fi case "$enable_pmi" in no) : enable_pmi=no ;; yes) : enable_pmi=yes; force_pmi=yes ;; *) : enable_pmi=probe ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(pmi,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # If user specifies a PMI version, then we will not probe for others unset using_pmi_version pmi_why='Default' # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(pmi-version,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-pmi-version was given. if test "${with_pmi_version+set}" = set; then : withval=$with_pmi_version; fi if test "${with_pmi_version+set}" = set; then : withval=$with_pmi_version; case "$withval" in no) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring --without-pmi-version" >&5 $as_echo "$as_me: WARNING: Ignoring --without-pmi-version" >&2;} echo "Ignoring --without-pmi-version" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:5) ;; *) : case "$withval" in 1|2|x|cray) using_pmi_version="$withval";; *) echo echo "configure error: Argument to --with-pmi-version must be 'x', '1', '2', or 'cray'" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; esac pmi_why='Requested' ;; esac else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(pmi-version,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$GASNET_PLATFORM" = crayex && test -z "$using_pmi_version"; then using_pmi_version=cray fi # Check for header matching the selected lib # TODO: fragile if multiple PMI libs are installed have_pmi=no if test "$enable_pmi" != 'no'; then # Auto-detect Cray PMI prefix, *unless* non-Cray version requested if ( test -n "$CRAYPE_NETWORK_TARGET" || test "$GASNET_PLATFORM" = crayex ) && ( test "$using_pmi_version" = 'cray' || test -z "$using_pmi_version" ); then # Several places to look. for dir in `expr "x${CRAY_PMI_INCLUDE_OPTS}" : 'x-I\([^ ]*\)' 2>/dev/null` \ `expr "x${CRAY_PMI_POST_LINK_OPTS}" : 'x-L\([^ ]*\)' 2>/dev/null` \ "$CRAY_PMI_PREFIX/dummy" '/opt/cray/pe/pmi/default/dummy'; do if test -n "$dir"; then pmi_guess=`dirname "$dir" 2>/dev/null` if test -e "$pmi_guess/include/pmi_cray.h"; then break fi fi done else pmi_guess='/usr' fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([PMI_HOME],[$pmi_guess],[Install prefix of PMI library]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-pmi-home was given. if test "${with_pmi_home+set}" = set; then : withval=$with_pmi_home; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PMI_HOME setting" >&5 $as_echo_n "checking for PMI_HOME setting... " >&6; } envval_src_PMI_HOME="cached" if ${gasnet_cv_envvar_PMI_HOME+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_PMI_HOME="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_PMI_HOME="$pmi_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_pmihome+set}" = "set" ; then gasnet_cv_envvar_PMI_HOME="${_gasneti_nenv_pmihome}" envval_src_PMI_HOME=given elif test "${_gasneti_cenv_pmihome+set}" = "set" ; then gasnet_cv_envvar_PMI_HOME="${_gasneti_cenv_pmihome}" envval_src_PMI_HOME=conf else gasnet_cv_envvar_PMI_HOME=$envval_default_PMI_HOME envval_src_PMI_HOME=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper PMI_HOME pmihome $gasnet_cv_configure_args_norm fi PMI_HOME="$gasnet_cv_envvar_PMI_HOME" if test "$PMI_HOME" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset PMI_HOME if test "$envval_src_PMI_HOME" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_PMI_HOME" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PMI_HOME\"" >&5 $as_echo " \"$PMI_HOME\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$PMI_HOME\"" >&5 $as_echo " (default) \"$PMI_HOME\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$PMI_HOME\"" >&5 $as_echo " (disabled) \"$PMI_HOME\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$PMI_HOME\"" >&5 $as_echo " (provided) \"$PMI_HOME\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$PMI_HOME\"" >&5 $as_echo " (provided) \"$PMI_HOME\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$PMI_HOME. Please configure --with-PMI_HOME=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([PMI_HOME],[$pmi_guess],[Install prefix of PMI library]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_LDFLAGS([PMI],[pmi pmi2 pmix]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$PMI_HOME" in /usr|/) PMI_ldflags_guess='';; *) for PMI_ldflags_guess_dir in "$PMI_HOME/lib${GASNETI_PTR_BITS}" "$PMI_HOME/lib" ''; do test -z "$PMI_ldflags_guess_dir" && break for PMI_ldflags_guess_lib in pmi pmi2 pmix; do for PMI_ldflags_guess_suff in a so sl dylib la dll; do if test -r "$PMI_ldflags_guess_dir/lib$PMI_ldflags_guess_lib.$PMI_ldflags_guess_suff"; then break 3; fi done done done if test -n "$PMI_ldflags_guess_dir"; then PMI_ldflags_guess="-L$PMI_ldflags_guess_dir" # deferred to appear after help for [PREFIX]_LDFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(pmi-rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$enable_pmi_rpath" in no) : enabled_pmi_rpath='' ;; yes) : enabled_pmi_rpath="$PMI_ldflags_guess_dir" ;; *) : if test -z "$enabled_pmi_rpath"; then if test "x$enabled_rpath" = xyes; then enabled_pmi_rpath="$PMI_ldflags_guess_dir" else enabled_pmi_rpath='' fi fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(pmi-rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -n "$enabled_pmi_rpath"; then if test "${cc_rpath_option:+set}" = set; then PMI_ldflags_guess="$PMI_ldflags_guess $cc_rpath_option$enabled_pmi_rpath" else warn_missing_rpath="$warn_missing_rpath pmi" fi fi PMI_ldflags_guess="${PMI_ldflags_guess}" else PMI_ldflags_guess='' fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([PMI_LDFLAGS],[$PMI_ldflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-pmi-ldflags was given. if test "${with_pmi_ldflags+set}" = set; then : withval=$with_pmi_ldflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PMI_LDFLAGS setting" >&5 $as_echo_n "checking for PMI_LDFLAGS setting... " >&6; } envval_src_PMI_LDFLAGS="cached" if ${gasnet_cv_envvar_PMI_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_PMI_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_PMI_LDFLAGS="$PMI_ldflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_pmildflags+set}" = "set" ; then gasnet_cv_envvar_PMI_LDFLAGS="${_gasneti_nenv_pmildflags}" envval_src_PMI_LDFLAGS=given elif test "${_gasneti_cenv_pmildflags+set}" = "set" ; then gasnet_cv_envvar_PMI_LDFLAGS="${_gasneti_cenv_pmildflags}" envval_src_PMI_LDFLAGS=conf else gasnet_cv_envvar_PMI_LDFLAGS=$envval_default_PMI_LDFLAGS envval_src_PMI_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper PMI_LDFLAGS pmildflags $gasnet_cv_configure_args_norm fi PMI_LDFLAGS="$gasnet_cv_envvar_PMI_LDFLAGS" if test "$PMI_LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset PMI_LDFLAGS if test "$envval_src_PMI_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_PMI_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PMI_LDFLAGS\"" >&5 $as_echo " \"$PMI_LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$PMI_LDFLAGS\"" >&5 $as_echo " (default) \"$PMI_LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$PMI_LDFLAGS\"" >&5 $as_echo " (disabled) \"$PMI_LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$PMI_LDFLAGS\"" >&5 $as_echo " (provided) \"$PMI_LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$PMI_LDFLAGS\"" >&5 $as_echo " (provided) \"$PMI_LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$PMI_LDFLAGS. Please configure --with-PMI_LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([PMI_LDFLAGS],[$PMI_ldflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # Check whether --enable-pmi-rpath was given. if test "${enable_pmi_rpath+set}" = set; then : enableval=$enable_pmi_rpath; fi unset PMI_ldflags_guess unset PMI_ldflags_guess_dir unset PMI_ldflags_guess_lib unset PMI_ldflags_guess_suff # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) PMI_SPAWNER_LDFLAGS=$PMI_LDFLAGS; unset PMI_LDFLAGS # Check for various implementations' libs unless disqualifed by --with-pmi-version= # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $PMI_SPAWNER_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $PMI_SPAWNER_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $PMI_SPAWNER_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([PMI_LIBS],[probe]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-pmi-libs was given. if test "${with_pmi_libs+set}" = set; then : withval=$with_pmi_libs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PMI_LIBS setting" >&5 $as_echo_n "checking for PMI_LIBS setting... " >&6; } envval_src_PMI_LIBS="cached" if ${gasnet_cv_envvar_PMI_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_PMI_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_PMI_LIBS="probe" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_pmilibs+set}" = "set" ; then gasnet_cv_envvar_PMI_LIBS="${_gasneti_nenv_pmilibs}" envval_src_PMI_LIBS=given elif test "${_gasneti_cenv_pmilibs+set}" = "set" ; then gasnet_cv_envvar_PMI_LIBS="${_gasneti_cenv_pmilibs}" envval_src_PMI_LIBS=conf else gasnet_cv_envvar_PMI_LIBS=$envval_default_PMI_LIBS envval_src_PMI_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper PMI_LIBS pmilibs $gasnet_cv_configure_args_norm fi PMI_LIBS="$gasnet_cv_envvar_PMI_LIBS" if test "$PMI_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset PMI_LIBS if test "$envval_src_PMI_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_PMI_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PMI_LIBS\"" >&5 $as_echo " \"$PMI_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$PMI_LIBS\"" >&5 $as_echo " (default) \"$PMI_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$PMI_LIBS\"" >&5 $as_echo " (disabled) \"$PMI_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$PMI_LIBS\"" >&5 $as_echo " (provided) \"$PMI_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$PMI_LIBS\"" >&5 $as_echo " (provided) \"$PMI_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$PMI_LIBS. Please configure --with-PMI_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([PMI_LIBS],[probe]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ## Cray PMI if test "$using_pmi_version" = 'cray' || test -z "$using_pmi_version"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$PMI_LIBS" = 'probe'; then # At the time of writting, XC systems use libpmi and EX systems use libpmi2. # Use of AC_SEARCH_LIBS() will yield a "none required" result when using # Cray's `cc` wrapper, which could then require pmi environment module to # be loaded at application link time. The following "just works" because, # when using the wrapper, it reduces to checking if the library exists. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PMI_Get_nidlist_ptr in -lpmi2" >&5 $as_echo_n "checking for PMI_Get_nidlist_ptr in -lpmi2... " >&6; } if ${ac_cv_lib_pmi2_PMI_Get_nidlist_ptr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpmi2 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char PMI_Get_nidlist_ptr (); int main () { return PMI_Get_nidlist_ptr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pmi2_PMI_Get_nidlist_ptr=yes else ac_cv_lib_pmi2_PMI_Get_nidlist_ptr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pmi2_PMI_Get_nidlist_ptr" >&5 $as_echo "$ac_cv_lib_pmi2_PMI_Get_nidlist_ptr" >&6; } if test "x$ac_cv_lib_pmi2_PMI_Get_nidlist_ptr" = xyes; then : have_pmi=yes; LIBS="-lpmi2" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PMI_Get_nidlist_ptr in -lpmi" >&5 $as_echo_n "checking for PMI_Get_nidlist_ptr in -lpmi... " >&6; } if ${ac_cv_lib_pmi_PMI_Get_nidlist_ptr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpmi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char PMI_Get_nidlist_ptr (); int main () { return PMI_Get_nidlist_ptr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pmi_PMI_Get_nidlist_ptr=yes else ac_cv_lib_pmi_PMI_Get_nidlist_ptr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pmi_PMI_Get_nidlist_ptr" >&5 $as_echo "$ac_cv_lib_pmi_PMI_Get_nidlist_ptr" >&6; } if test "x$ac_cv_lib_pmi_PMI_Get_nidlist_ptr" = xyes; then : have_pmi=yes; LIBS="-lpmi" fi fi else LIBS="$PMI_LIBS" ac_fn_c_check_func "$LINENO" "PMI_Get_nidlist_ptr" "ac_cv_func_PMI_Get_nidlist_ptr" if test "x$ac_cv_func_PMI_Get_nidlist_ptr" = xyes; then : have_pmi=yes fi fi if test "$have_pmi" = 'yes'; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PMI_SPAWNER_CFLAGS([pmi_cray.h]) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of pmi_cray.h" >&5 $as_echo_n "checking for location of pmi_cray.h... " >&6; } for pmi_headers in "$PMI_HOME/include/slurm" "$PMI_HOME/include/portals4" "$PMI_HOME/include" ''; do test -z "${pmi_headers}" && break test -f "${pmi_headers}/pmi_cray.h" && break done if test -z "${pmi_headers}"; then have_pmi=no pmi_headers='not found' elif test "${pmi_headers}" != '/usr/include'; then PMI_SPAWNER_CFLAGS="-I${pmi_headers}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${pmi_headers}" >&5 $as_echo "${pmi_headers}" >&6; } # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PMI_SPAWNER_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$have_pmi" = 'yes'; then using_pmi_version=cray pretty_pmi_version=' (Cray)' $as_echo "#define HAVE_PMI_CRAY_H 1" >>confdefs.h PMI_SPAWNER_LIBS="$LIBS" case "$enable_cray_post_link_rewrite" in '' | yes) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_CRAY_FIX_LINK_OPTS([pmi],[PMI_SPAWNER_LDFLAGS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -n x"$PMI_SPAWNER_LDFLAGS"; then cplo_tmp=`$PERL -e "\\\$_='$PMI_SPAWNER_LDFLAGS'; s,/pmi/[^/]*/lib,/pmi/default/lib,g; print;"` cplo_dir=`$PERL -e "\\\$_='$cplo_tmp'; m,-L([^ ]*/pmi/[^ ]*),; print \\\$1;"` if test -d "$cplo_dir/."; then PMI_SPAWNER_LDFLAGS="$cplo_tmp" else # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Directory $cplo_dir missing - disabling rewrite of PMI_SPAWNER_LDFLAGS" >&5 $as_echo "$as_me: WARNING: Directory $cplo_dir missing - disabling rewrite of PMI_SPAWNER_LDFLAGS" >&2;} echo "Directory $cplo_dir missing - disabling rewrite of PMI_SPAWNER_LDFLAGS" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CRAY_FIX_LINK_OPTS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; *) : ;; esac fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ## PMIx if test "$using_pmi_version" = 'x' || test -z "$using_pmi_version"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$PMI_LIBS" = 'probe'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing PMIx_Init" >&5 $as_echo_n "checking for library containing PMIx_Init... " >&6; } if ${ac_cv_search_PMIx_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char PMIx_Init (); int main () { return PMIx_Init (); ; return 0; } _ACEOF for ac_lib in '' pmix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_PMIx_Init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_PMIx_Init+:} false; then : break fi done if ${ac_cv_search_PMIx_Init+:} false; then : else ac_cv_search_PMIx_Init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_PMIx_Init" >&5 $as_echo "$ac_cv_search_PMIx_Init" >&6; } ac_res=$ac_cv_search_PMIx_Init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_pmi=yes fi else LIBS="$PMI_LIBS" ac_fn_c_check_func "$LINENO" "PMIx_Init" "ac_cv_func_PMIx_Init" if test "x$ac_cv_func_PMIx_Init" = xyes; then : have_pmi=yes fi fi if test "$have_pmi" = 'yes'; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PMI_SPAWNER_CFLAGS([pmix.h]) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of pmix.h" >&5 $as_echo_n "checking for location of pmix.h... " >&6; } for pmi_headers in "$PMI_HOME/include/slurm" "$PMI_HOME/include/portals4" "$PMI_HOME/include" ''; do test -z "${pmi_headers}" && break test -f "${pmi_headers}/pmix.h" && break done if test -z "${pmi_headers}"; then have_pmi=no pmi_headers='not found' elif test "${pmi_headers}" != '/usr/include'; then PMI_SPAWNER_CFLAGS="-I${pmi_headers}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${pmi_headers}" >&5 $as_echo "${pmi_headers}" >&6; } # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PMI_SPAWNER_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$have_pmi" = 'yes'; then for ac_header in stdbool.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default" if test "x$ac_cv_header_stdbool_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDBOOL_H 1 _ACEOF fi done # We support PMIx API versions 2 and 3 # At least some version 1 headers did not define PMIX_VERSION_MAJOR at all # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$PMI_SPAWNER_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$PMI_SPAWNER_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$PMI_SPAWNER_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for PMIx API version 2 or newer,PMIX_API,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PMIx API version 2 or newer" >&5 $as_echo_n "checking for PMIx API version 2 or newer... " >&6; } if ${gasnet_cv_PMIX_API+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if HAVE_STDBOOL_H #include #endif #include #ifndef PMIX_VERSION_MAJOR #error not defined #elif PMIX_VERSION_MAJOR < 2 #error too old #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_PMIX_API=yes else gasnet_cv_PMIX_API=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_PMIX_API" >&5 $as_echo "$gasnet_cv_PMIX_API" >&6; } if test "$gasnet_cv_PMIX_API" = yes; then : else : # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring libpmix implementing API version 1 because version 2 or newer is required." >&5 $as_echo "$as_me: WARNING: Ignoring libpmix implementing API version 1 because version 2 or newer is required." >&2;} echo "Ignoring libpmix implementing API version 1 because version 2 or newer is required." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:5) have_pmi=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for PMIx API version 2 or newer,PMIX_API,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$have_pmi" = 'yes'; then using_pmi_version=x pretty_pmi_version=' (version=x)' $as_echo "#define HAVE_PMIX_H 1" >>confdefs.h PMI_SPAWNER_LIBS="$LIBS" fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ## PMI2 if test "$using_pmi_version" = '2' || test -z "$using_pmi_version"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$PMI_LIBS" = 'probe'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing PMI2_Init" >&5 $as_echo_n "checking for library containing PMI2_Init... " >&6; } if ${ac_cv_search_PMI2_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char PMI2_Init (); int main () { return PMI2_Init (); ; return 0; } _ACEOF for ac_lib in '' pmi2 mpich; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_PMI2_Init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_PMI2_Init+:} false; then : break fi done if ${ac_cv_search_PMI2_Init+:} false; then : else ac_cv_search_PMI2_Init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_PMI2_Init" >&5 $as_echo "$ac_cv_search_PMI2_Init" >&6; } ac_res=$ac_cv_search_PMI2_Init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_pmi=yes fi else LIBS="$PMI_LIBS" ac_fn_c_check_func "$LINENO" "PMI2_Init" "ac_cv_func_PMI2_Init" if test "x$ac_cv_func_PMI2_Init" = xyes; then : have_pmi=yes fi fi if test "$have_pmi" = 'yes'; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PMI_SPAWNER_CFLAGS([pmi2.h]) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of pmi2.h" >&5 $as_echo_n "checking for location of pmi2.h... " >&6; } for pmi_headers in "$PMI_HOME/include/slurm" "$PMI_HOME/include/portals4" "$PMI_HOME/include" ''; do test -z "${pmi_headers}" && break test -f "${pmi_headers}/pmi2.h" && break done if test -z "${pmi_headers}"; then have_pmi=no pmi_headers='not found' elif test "${pmi_headers}" != '/usr/include'; then PMI_SPAWNER_CFLAGS="-I${pmi_headers}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${pmi_headers}" >&5 $as_echo "${pmi_headers}" >&6; } # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PMI_SPAWNER_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$have_pmi" = 'yes'; then using_pmi_version=2 pretty_pmi_version=' (version=2)' $as_echo "#define HAVE_PMI2_H 1" >>confdefs.h PMI_SPAWNER_LIBS="$LIBS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(pmi2-fast-barrier,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-pmi2-fast-barrier was given. if test "${enable_pmi2_fast_barrier+set}" = set; then : enableval=$enable_pmi2_fast_barrier; fi case "$enable_pmi2_fast_barrier" in '' | no) : ;; *) : $as_echo "#define GASNETI_PMI2_FENCE_IS_BARRIER 1" >>confdefs.h ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(pmi2-fast-barrier,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi ## PMI (aka PMI1) if test "$using_pmi_version" = '1' || test -z "$using_pmi_version"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$PMI_LIBS" = 'probe'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing PMI_Init" >&5 $as_echo_n "checking for library containing PMI_Init... " >&6; } if ${ac_cv_search_PMI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char PMI_Init (); int main () { return PMI_Init (); ; return 0; } _ACEOF for ac_lib in '' pmi mpich portals_runtime; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_PMI_Init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_PMI_Init+:} false; then : break fi done if ${ac_cv_search_PMI_Init+:} false; then : else ac_cv_search_PMI_Init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_PMI_Init" >&5 $as_echo "$ac_cv_search_PMI_Init" >&6; } ac_res=$ac_cv_search_PMI_Init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_pmi=yes fi else LIBS="$PMI_LIBS" ac_fn_c_check_func "$LINENO" "PMI_Init" "ac_cv_func_PMI_Init" if test "x$ac_cv_func_PMI_Init" = xyes; then : have_pmi=yes fi fi if test "$have_pmi" = 'yes'; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PMI_SPAWNER_CFLAGS([pmi.h]) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of pmi.h" >&5 $as_echo_n "checking for location of pmi.h... " >&6; } for pmi_headers in "$PMI_HOME/include/slurm" "$PMI_HOME/include/portals4" "$PMI_HOME/include" ''; do test -z "${pmi_headers}" && break test -f "${pmi_headers}/pmi.h" && break done if test -z "${pmi_headers}"; then have_pmi=no pmi_headers='not found' elif test "${pmi_headers}" != '/usr/include'; then PMI_SPAWNER_CFLAGS="-I${pmi_headers}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${pmi_headers}" >&5 $as_echo "${pmi_headers}" >&6; } # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PMI_SPAWNER_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$have_pmi" = 'yes'; then using_pmi_version=1 pretty_pmi_version=' (version=1)' $as_echo "#define HAVE_PMI_H 1" >>confdefs.h PMI_SPAWNER_LIBS="$LIBS" fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi unset PMI_LIBS # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([PMI_SPAWNER_LDFLAGS],[PMI_SPAWNER_LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) eval gasnet_fn_split_linker_opts PMI_SPAWNER_LDFLAGS PMI_SPAWNER_LIBS $PMI_SPAWNER_LDFLAGS $PMI_SPAWNER_LIBS #echo "PMI_SPAWNER_LDFLAGS=[$]PMI_SPAWNER_LDFLAGS" #echo "PMI_SPAWNER_LIBS=[$]PMI_SPAWNER_LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([PMI_SPAWNER_LDFLAGS],[PMI_SPAWNER_LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # TODO: add a link test for a working PMI configuration # Look for use of malloc/free in the corresponding PMIx header if any if test "$have_pmi" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for use of malloc in PMIx headers" >&5 $as_echo_n "checking for use of malloc in PMIx headers... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${pmi_headers}/pmix_common.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "\<(malloc|calloc|free|strdup)\>" >/dev/null 2>&1; then : $as_echo "#define GASNETI_PMIX_HACK 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PMI spawner support" >&5 $as_echo_n "checking for PMI spawner support... " >&6; } if test "$have_pmi" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # These have not bee seen outside of Cray PMI, but we can hope: # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $PMI_SPAWNER_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $PMI_SPAWNER_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $PMI_SPAWNER_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $PMI_SPAWNER_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $PMI_SPAWNER_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $PMI_SPAWNER_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) for ac_func in PMI_Allgather PMI_Allgather_on_smp PMI_Bcast PMI_Get_numpes_on_smp do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Get a full path for PMIRUN_CMD, using MPIRUN_CMD as a fallback if test "$enabled_mpi" = yes || test "$enabled_mpi_compat" = yes; then : # Have already probed MIRUN_CMD, possibly system-specific else # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([MPIRUN_CMD],[mpirun -np %N %C]) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPIRUN_CMD setting" >&5 $as_echo_n "checking for MPIRUN_CMD setting... " >&6; } envval_src_MPIRUN_CMD="cached" if ${gasnet_cv_envvar_MPIRUN_CMD+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_MPIRUN_CMD="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_MPIRUN_CMD="mpirun -np %N %C" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_mpiruncmd+set}" = "set" ; then gasnet_cv_envvar_MPIRUN_CMD="${_gasneti_nenv_mpiruncmd}" envval_src_MPIRUN_CMD=given elif test "${_gasneti_cenv_mpiruncmd+set}" = "set" ; then gasnet_cv_envvar_MPIRUN_CMD="${_gasneti_cenv_mpiruncmd}" envval_src_MPIRUN_CMD=conf else gasnet_cv_envvar_MPIRUN_CMD=$envval_default_MPIRUN_CMD envval_src_MPIRUN_CMD=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper MPIRUN_CMD mpiruncmd $gasnet_cv_configure_args_norm fi MPIRUN_CMD="$gasnet_cv_envvar_MPIRUN_CMD" if test "$MPIRUN_CMD" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset MPIRUN_CMD if test "$envval_src_MPIRUN_CMD" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_MPIRUN_CMD" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MPIRUN_CMD\"" >&5 $as_echo " \"$MPIRUN_CMD\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$MPIRUN_CMD\"" >&5 $as_echo " (default) \"$MPIRUN_CMD\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$MPIRUN_CMD\"" >&5 $as_echo " (disabled) \"$MPIRUN_CMD\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPIRUN_CMD\"" >&5 $as_echo " (provided) \"$MPIRUN_CMD\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$MPIRUN_CMD\"" >&5 $as_echo " (provided) \"$MPIRUN_CMD\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$MPIRUN_CMD. Please configure --with-MPIRUN_CMD=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([MPIRUN_CMD],[mpirun -np %N %C]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi pmirun_cmd_default="$MPIRUN_CMD" # default of defaults if test $GASNET_PLATFORM = crayex; then for ac_prog in $SRUN srun do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SRUN_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $SRUN_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_SRUN_PATH="$SRUN_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SRUN_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi SRUN_PATH=$ac_cv_path_SRUN_PATH if test -n "$SRUN_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SRUN_PATH" >&5 $as_echo "$SRUN_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$SRUN_PATH" && break done for ac_prog in $APRUN aprun do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_APRUN_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $APRUN_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_APRUN_PATH="$APRUN_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_APRUN_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi APRUN_PATH=$ac_cv_path_APRUN_PATH if test -n "$APRUN_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $APRUN_PATH" >&5 $as_echo "$APRUN_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$APRUN_PATH" && break done if test -n "$SRUN_PATH" && test -n "$APRUN_PATH"; then : # Because both 'srun' and 'aprun' were found, will not use either as default PMIRUN_CMD elif test -n "$SRUN_PATH"; then pmirun_cmd_default="$SRUN_PATH -n %N -- %C" elif test -n "$APRUN_PATH"; then pmirun_cmd_default="$APRUN_PATH -n %N %C" fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([PMIRUN_CMD],[$pmirun_cmd_default],[[Command template for running PMI programs, see other/pmi-spawner/README]]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-pmirun-cmd was given. if test "${with_pmirun_cmd+set}" = set; then : withval=$with_pmirun_cmd; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PMIRUN_CMD setting" >&5 $as_echo_n "checking for PMIRUN_CMD setting... " >&6; } envval_src_PMIRUN_CMD="cached" if ${gasnet_cv_envvar_PMIRUN_CMD+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_PMIRUN_CMD="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_PMIRUN_CMD="$pmirun_cmd_default" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_pmiruncmd+set}" = "set" ; then gasnet_cv_envvar_PMIRUN_CMD="${_gasneti_nenv_pmiruncmd}" envval_src_PMIRUN_CMD=given elif test "${_gasneti_cenv_pmiruncmd+set}" = "set" ; then gasnet_cv_envvar_PMIRUN_CMD="${_gasneti_cenv_pmiruncmd}" envval_src_PMIRUN_CMD=conf else gasnet_cv_envvar_PMIRUN_CMD=$envval_default_PMIRUN_CMD envval_src_PMIRUN_CMD=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper PMIRUN_CMD pmiruncmd $gasnet_cv_configure_args_norm fi PMIRUN_CMD="$gasnet_cv_envvar_PMIRUN_CMD" if test "$PMIRUN_CMD" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset PMIRUN_CMD if test "$envval_src_PMIRUN_CMD" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_PMIRUN_CMD" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PMIRUN_CMD\"" >&5 $as_echo " \"$PMIRUN_CMD\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$PMIRUN_CMD\"" >&5 $as_echo " (default) \"$PMIRUN_CMD\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$PMIRUN_CMD\"" >&5 $as_echo " (disabled) \"$PMIRUN_CMD\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$PMIRUN_CMD\"" >&5 $as_echo " (provided) \"$PMIRUN_CMD\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$PMIRUN_CMD\"" >&5 $as_echo " (provided) \"$PMIRUN_CMD\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$PMIRUN_CMD. Please configure --with-PMIRUN_CMD=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([PMIRUN_CMD],[$pmirun_cmd_default],[[Command template for running PMI programs, see other/pmi-spawner/README]]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_GETFULLPATH(PMIRUN_CMD) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$gasnet_cv__gfp_disable" = ""; then if echo "$PMIRUN_CMD" | $AWK -F' ' '{if ($1 ~ /^(.*\/)?env$/) exit 0; else exit 1;}' >/dev/null; then for ac_prog in $ENVCMD env do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ENVCMD+:} false; then : $as_echo_n "(cached) " >&6 else case $ENVCMD in [\\/]* | ?:[\\/]*) ac_cv_path_ENVCMD="$ENVCMD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ENVCMD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ENVCMD=$ac_cv_path_ENVCMD if test -n "$ENVCMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENVCMD" >&5 $as_echo "$ENVCMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ENVCMD" && break done # assemble "ENVCMD key=val key=val " with a trailing space gasnet_gfp_progenv="$ENVCMD "`echo "$PMIRUN_CMD" | $AWK -F' ' 'BEGIN { ORS=" "; } { for (i=2;i<=NF;i++) { if ($i ~ /=/) { print $i; } else break; } }'` # just the program name gasnet_gfp_progname=`echo "$PMIRUN_CMD" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i<=NF;i++) { if ($i !~ /=/) { print $i; break; } } }'` # list of program arguments with no trailing space gasnet_gfp_progargs=`echo "$PMIRUN_CMD" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_gasnet_cv__gfp_fullprogname_PMIRUN_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $gasnet_cv__gfp_fullprogname_PMIRUN_CMD in [\\/]* | ?:[\\/]*) ac_cv_path_gasnet_cv__gfp_fullprogname_PMIRUN_CMD="$gasnet_cv__gfp_fullprogname_PMIRUN_CMD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_gasnet_cv__gfp_fullprogname_PMIRUN_CMD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi gasnet_cv__gfp_fullprogname_PMIRUN_CMD=$ac_cv_path_gasnet_cv__gfp_fullprogname_PMIRUN_CMD if test -n "$gasnet_cv__gfp_fullprogname_PMIRUN_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv__gfp_fullprogname_PMIRUN_CMD" >&5 $as_echo "$gasnet_cv__gfp_fullprogname_PMIRUN_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$gasnet_cv__gfp_fullprogname_PMIRUN_CMD" != "" ; then gasnet_gfp_progname="$gasnet_cv__gfp_fullprogname_PMIRUN_CMD" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for full path expansion of PMIRUN_CMD" >&5 $as_echo_n "checking for full path expansion of PMIRUN_CMD... " >&6; } if test -n "$gasnet_gfp_progargs" ; then PMIRUN_CMD="$gasnet_gfp_progenv$gasnet_gfp_progname $gasnet_gfp_progargs" else PMIRUN_CMD="$gasnet_gfp_progenv$gasnet_gfp_progname" fi #echo "gasnet_gfp_progenv='$gasnet_gfp_progenv'" #echo "gasnet_gfp_progname='$gasnet_gfp_progname'" #echo "gasnet_gfp_progargs='$gasnet_gfp_progargs'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PMIRUN_CMD" >&5 $as_echo "$PMIRUN_CMD" >&6; } fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_GETFULLPATH(PMIRUN_CMD) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) elif test -z "$force_pmi"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PMI_SPAWNER_LIBS="" PMI_SPAWNER_LDFLAGS="" PMI_SPAWNER_CFLAGS="" elif test -n "${using_pmi_version+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$using_pmi_version" = cray; then extra='. Try loading the "cray-pmi" or "pmi" environment module, or specifying a different --with-pmi-version=?.' else extra='' fi echo echo "configure error: $pmi_why PMI version \"$using_pmi_version\" could not be found$extra" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo echo "configure error: Requested PMI support could not be found" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi if test "$have_pmi" = yes; then HAVE_BOOTSTRAP_PMI_TRUE= HAVE_BOOTSTRAP_PMI_FALSE='#' else HAVE_BOOTSTRAP_PMI_TRUE='#' HAVE_BOOTSTRAP_PMI_FALSE= fi ######################################################################## # Check for alloca in C code # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir,dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_func in on_exit do : ac_fn_c_check_func "$LINENO" "on_exit" "ac_cv_func_on_exit" if test "x$ac_cv_func_on_exit" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ON_EXIT 1 _ACEOF fi done for ac_func in gethostid do : ac_fn_c_check_func "$LINENO" "gethostid" "ac_cv_func_gethostid" if test "x$ac_cv_func_gethostid" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETHOSTID 1 _ACEOF fi done for ac_func in setenv unsetenv putenv do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getrlimit setrlimit getrlimit64 setrlimit64 do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/resource.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" if test "x$ac_cv_header_sys_resource_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_RESOURCE_H 1 _ACEOF fi done for ac_header in sys/table.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/table.h" "ac_cv_header_sys_table_h" "$ac_includes_default" if test "x$ac_cv_header_sys_table_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TABLE_H 1 _ACEOF fi done for ac_header in features.h do : ac_fn_c_check_header_mongrel "$LINENO" "features.h" "ac_cv_header_features_h" "$ac_includes_default" if test "x$ac_cv_header_features_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FEATURES_H 1 _ACEOF fi done for ac_func in fopen64 do : ac_fn_c_check_func "$LINENO" "fopen64" "ac_cv_func_fopen64" if test "x$ac_cv_func_fopen64" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FOPEN64 1 _ACEOF fi done for ac_func in sigprocmask do : ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" if test "x$ac_cv_func_sigprocmask" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SIGPROCMASK 1 _ACEOF fi done for ac_func in srand_deterministic do : ac_fn_c_check_func "$LINENO" "srand_deterministic" "ac_cv_func_srand_deterministic" if test "x$ac_cv_func_srand_deterministic" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SRAND_DETERMINISTIC 1 _ACEOF fi done for ac_func in ffs do : ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs" if test "x$ac_cv_func_ffs" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FFS 1 _ACEOF fi done ######################################################################## # On various systems, the headers are missing certain functions # or only declare them under some condition we don't satisfy. # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for declaration/definition of setenv,have_SETENV_decl,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration/definition of setenv" >&5 $as_echo_n "checking for declaration/definition of setenv... " >&6; } if ${gasnet_cv_have_SETENV_decl+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include #include int main () { #ifdef setenv /* It is a macro and that is OK */ #else int x = (int)sizeof(&setenv); #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_have_SETENV_decl=yes else gasnet_cv_have_SETENV_decl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_SETENV_decl" >&5 $as_echo "$gasnet_cv_have_SETENV_decl" >&6; } if test "$gasnet_cv_have_SETENV_decl" = yes; then : have_SETENV_decl=yes else : have_SETENV_decl=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for declaration/definition of setenv,have_SETENV_decl,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test $have_SETENV_decl = yes; then $as_echo "#define HAVE_SETENV_DECL 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for declaration/definition of unsetenv,have_UNSETENV_decl,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration/definition of unsetenv" >&5 $as_echo_n "checking for declaration/definition of unsetenv... " >&6; } if ${gasnet_cv_have_UNSETENV_decl+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include #include int main () { #ifdef unsetenv /* It is a macro and that is OK */ #else int x = (int)sizeof(&unsetenv); #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_have_UNSETENV_decl=yes else gasnet_cv_have_UNSETENV_decl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_UNSETENV_decl" >&5 $as_echo "$gasnet_cv_have_UNSETENV_decl" >&6; } if test "$gasnet_cv_have_UNSETENV_decl" = yes; then : have_UNSETENV_decl=yes else : have_UNSETENV_decl=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for declaration/definition of unsetenv,have_UNSETENV_decl,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test $have_UNSETENV_decl = yes; then $as_echo "#define HAVE_UNSETENV_DECL 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for declaration/definition of snprintf,have_SNPRINTF_decl,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration/definition of snprintf" >&5 $as_echo_n "checking for declaration/definition of snprintf... " >&6; } if ${gasnet_cv_have_SNPRINTF_decl+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include #include int main () { #ifdef snprintf /* It is a macro and that is OK */ #else int x = (int)sizeof(&snprintf); #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_have_SNPRINTF_decl=yes else gasnet_cv_have_SNPRINTF_decl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_SNPRINTF_decl" >&5 $as_echo "$gasnet_cv_have_SNPRINTF_decl" >&6; } if test "$gasnet_cv_have_SNPRINTF_decl" = yes; then : have_SNPRINTF_decl=yes else : have_SNPRINTF_decl=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for declaration/definition of snprintf,have_SNPRINTF_decl,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test $have_SNPRINTF_decl = yes; then $as_echo "#define HAVE_SNPRINTF_DECL 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for declaration/definition of vsnprintf,have_VSNPRINTF_decl,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration/definition of vsnprintf" >&5 $as_echo_n "checking for declaration/definition of vsnprintf... " >&6; } if ${gasnet_cv_have_VSNPRINTF_decl+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include #include int main () { #ifdef vsnprintf /* It is a macro and that is OK */ #else int x = (int)sizeof(&vsnprintf); #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_have_VSNPRINTF_decl=yes else gasnet_cv_have_VSNPRINTF_decl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_VSNPRINTF_decl" >&5 $as_echo "$gasnet_cv_have_VSNPRINTF_decl" >&6; } if test "$gasnet_cv_have_VSNPRINTF_decl" = yes; then : have_VSNPRINTF_decl=yes else : have_VSNPRINTF_decl=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for declaration/definition of vsnprintf,have_VSNPRINTF_decl,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test $have_VSNPRINTF_decl = yes; then $as_echo "#define HAVE_VSNPRINTF_DECL 1" >>confdefs.h fi ######################################################################## # ctype.h wrapper support for ac_func in isblank isascii toascii do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for declaration/definition of isblank,have_ISBLANK_decl,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration/definition of isblank" >&5 $as_echo_n "checking for declaration/definition of isblank... " >&6; } if ${gasnet_cv_have_ISBLANK_decl+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include #include int main () { #ifdef isblank /* It is a macro and that is OK */ #else int x = (int)sizeof(&isblank); #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_have_ISBLANK_decl=yes else gasnet_cv_have_ISBLANK_decl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_ISBLANK_decl" >&5 $as_echo "$gasnet_cv_have_ISBLANK_decl" >&6; } if test "$gasnet_cv_have_ISBLANK_decl" = yes; then : have_ISBLANK_decl=yes else : have_ISBLANK_decl=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for declaration/definition of isblank,have_ISBLANK_decl,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test $have_ISBLANK_decl = yes; then $as_echo "#define HAVE_ISBLANK_DECL 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for declaration/definition of isascii,have_ISASCII_decl,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration/definition of isascii" >&5 $as_echo_n "checking for declaration/definition of isascii... " >&6; } if ${gasnet_cv_have_ISASCII_decl+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include #include int main () { #ifdef isascii /* It is a macro and that is OK */ #else int x = (int)sizeof(&isascii); #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_have_ISASCII_decl=yes else gasnet_cv_have_ISASCII_decl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_ISASCII_decl" >&5 $as_echo "$gasnet_cv_have_ISASCII_decl" >&6; } if test "$gasnet_cv_have_ISASCII_decl" = yes; then : have_ISASCII_decl=yes else : have_ISASCII_decl=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for declaration/definition of isascii,have_ISASCII_decl,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test $have_ISASCII_decl = yes; then $as_echo "#define HAVE_ISASCII_DECL 1" >>confdefs.h fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for declaration/definition of toascii,have_TOASCII_decl,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration/definition of toascii" >&5 $as_echo_n "checking for declaration/definition of toascii... " >&6; } if ${gasnet_cv_have_TOASCII_decl+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include #include int main () { #ifdef toascii /* It is a macro and that is OK */ #else int x = (int)sizeof(&toascii); #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_have_TOASCII_decl=yes else gasnet_cv_have_TOASCII_decl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_TOASCII_decl" >&5 $as_echo "$gasnet_cv_have_TOASCII_decl" >&6; } if test "$gasnet_cv_have_TOASCII_decl" = yes; then : have_TOASCII_decl=yes else : have_TOASCII_decl=no fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for declaration/definition of toascii,have_TOASCII_decl,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test $have_TOASCII_decl = yes; then $as_echo "#define HAVE_TOASCII_DECL 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy ctype.h" >&5 $as_echo_n "checking for buggy ctype.h... " >&6; } if ${gasnet_cv_buggy_ctype+:} false; then : $as_echo_n "(cached) " >&6 else # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$DEVWARN_CFLAGS $CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$DEVWARN_CFLAGS $CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$DEVWARN_CFLAGS $CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) gasnet_cv_buggy_ctype=unk # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN(...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c < int foo(char c) { return isalpha(c); } int main(void) { int x = foo('c'); ; return 0; } EOF gasnet_testfile=gasnet-conftest.c cp conftest.c $gasnet_testfile # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) vvvvvvvvvvvvvvvvvvvvvv (L:6) echo \"$gasnet_compile_cmd\" >&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cv_buggy_ctype=ok else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_buggy_ctype=yes/warning else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then : gasnet_cv_buggy_ctype=ok else gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" gasnet_cv_buggy_ctype=yes/warning fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CCOMPILE_WITHWARN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: failure building test of ctype.h" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_buggy_ctype" >&5 $as_echo "$gasnet_cv_buggy_ctype" >&6; } if test x$gasnet_cv_buggy_ctype != xok; then $as_echo "#define GASNETI_NEED_CTYPE_WRAPPERS 1" >>confdefs.h fi ######################################################################## # BACKTRACE support # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(backtrace,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-backtrace was given. if test "${enable_backtrace+set}" = set; then : enableval=$enable_backtrace; fi case "$enable_backtrace" in no) : use_backtrace="no" ;; yes) : use_backtrace="try" ;; *) : if test "$cross_compiling" = "yes" ; then # disable backtrace support by default when cross-compiling, # because the debuggers on the host system running configure are usually not what we want for the target use_backtrace="no" else use_backtrace="try" fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(backtrace,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(backtrace-execinfo,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-backtrace-execinfo was given. if test "${enable_backtrace_execinfo+set}" = set; then : enableval=$enable_backtrace_execinfo; fi case "$enable_backtrace_execinfo" in no) : use_execinfo="no" ;; yes) : use_execinfo="yes" ;; *) : use_execinfo="$use_backtrace" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(backtrace-execinfo,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$use_execinfo" != no; then for ac_header in execinfo.h do : ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" if test "x$ac_cv_header_execinfo_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_EXECINFO_H 1 _ACEOF fi done if test "$ac_cv_header_execinfo_h" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 $as_echo_n "checking for library containing backtrace... " >&6; } if ${ac_cv_search_backtrace+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char backtrace (); int main () { return backtrace (); ; return 0; } _ACEOF for ac_lib in '' execinfo; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_backtrace=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_backtrace+:} false; then : break fi done if ${ac_cv_search_backtrace+:} false; then : else ac_cv_search_backtrace=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 $as_echo "$ac_cv_search_backtrace" >&6; } ac_res=$ac_cv_search_backtrace if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # bug3637: BSD requires -lexecinfo for ac_func in backtrace backtrace_symbols do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi if test "$use_execinfo" = 'yes' && test "$ac_cv_func_backtrace" != 'yes'; then as_fn_error $? "User requested --enable-backtrace-execinfo but support is not available on your system." "$LINENO" 5 fi for ac_prog in addr2line do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ADDR2LINE_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $ADDR2LINE_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_ADDR2LINE_PATH="$ADDR2LINE_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ADDR2LINE_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ADDR2LINE_PATH=$ac_cv_path_ADDR2LINE_PATH if test -n "$ADDR2LINE_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ADDR2LINE_PATH" >&5 $as_echo "$ADDR2LINE_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ADDR2LINE_PATH" && break done if test -n "$ADDR2LINE_PATH"; then cat >>confdefs.h <<_ACEOF #define ADDR2LINE_PATH "$ADDR2LINE_PATH" _ACEOF fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(backtrace-gdb,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-backtrace-gdb was given. if test "${enable_backtrace_gdb+set}" = set; then : enableval=$enable_backtrace_gdb; fi case "$enable_backtrace_gdb" in no) : use_gdb="no" ;; yes) : use_gdb="yes" ;; *) : use_gdb="$use_backtrace" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(backtrace-gdb,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$use_gdb" != no; then for ac_prog in $GDB gdb do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GDB_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $GDB_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_GDB_PATH="$GDB_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GDB_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GDB_PATH=$ac_cv_path_GDB_PATH if test -n "$GDB_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDB_PATH" >&5 $as_echo "$GDB_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GDB_PATH" && break done if test -n "$GDB_PATH"; then cat >>confdefs.h <<_ACEOF #define GDB_PATH "$GDB_PATH" _ACEOF elif test "$use_gdb" = yes; then as_fn_error $? "User requested --enable-backtrace-gdb but gdb was not found. Perhaps you need to set \$GDB?" "$LINENO" 5 fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(backtrace-gstack,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-backtrace-gstack was given. if test "${enable_backtrace_gstack+set}" = set; then : enableval=$enable_backtrace_gstack; fi case "$enable_backtrace_gstack" in no) : use_gstack="no" ;; yes) : use_gstack="yes" ;; *) : use_gstack="$use_backtrace" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(backtrace-gstack,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$use_gstack" != no; then for ac_prog in $GSTACK gstack do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GSTACK_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $GSTACK_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_GSTACK_PATH="$GSTACK_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GSTACK_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GSTACK_PATH=$ac_cv_path_GSTACK_PATH if test -n "$GSTACK_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSTACK_PATH" >&5 $as_echo "$GSTACK_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GSTACK_PATH" && break done if test -n "$GSTACK_PATH"; then cat >>confdefs.h <<_ACEOF #define GSTACK_PATH "$GSTACK_PATH" _ACEOF elif test "$use_gstack" = yes; then as_fn_error $? "User requested --enable-backtrace-gstack but gstack was not found. Perhaps you need to set \$GSTACK?" "$LINENO" 5 fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(backtrace-pstack,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-backtrace-pstack was given. if test "${enable_backtrace_pstack+set}" = set; then : enableval=$enable_backtrace_pstack; fi case "$enable_backtrace_pstack" in no) : use_pstack="no" ;; yes) : use_pstack="yes" ;; *) : use_pstack="$use_backtrace" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(backtrace-pstack,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$use_pstack" != no; then for ac_prog in $PSTACK pstack do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PSTACK_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $PSTACK_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_PSTACK_PATH="$PSTACK_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PSTACK_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PSTACK_PATH=$ac_cv_path_PSTACK_PATH if test -n "$PSTACK_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PSTACK_PATH" >&5 $as_echo "$PSTACK_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PSTACK_PATH" && break done if test -n "$PSTACK_PATH"; then cat >>confdefs.h <<_ACEOF #define PSTACK_PATH "$PSTACK_PATH" _ACEOF elif test "$use_pstack" = yes; then as_fn_error $? "User requested --enable-backtrace-pstack but pstack was not found. Perhaps you need to set \$PSTACK?" "$LINENO" 5 fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(backtrace-pgdbg,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-backtrace-pgdbg was given. if test "${enable_backtrace_pgdbg+set}" = set; then : enableval=$enable_backtrace_pgdbg; fi case "$enable_backtrace_pgdbg" in no) : use_pgdbg="no" ;; yes) : use_pgdbg="yes" ;; *) : use_pgdbg="$use_backtrace" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(backtrace-pgdbg,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$use_pgdbg" != no; then for ac_prog in $PGDBG pgdbg do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PGDBG_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $PGDBG_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_PGDBG_PATH="$PGDBG_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PGDBG_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PGDBG_PATH=$ac_cv_path_PGDBG_PATH if test -n "$PGDBG_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGDBG_PATH" >&5 $as_echo "$PGDBG_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PGDBG_PATH" && break done if test -n "$PGDBG_PATH"; then cat >>confdefs.h <<_ACEOF #define PGDBG_PATH "$PGDBG_PATH" _ACEOF elif test "$use_pgdbg" = yes; then as_fn_error $? "User requested --enable-backtrace-pgdbg but pgdbg was not found. Perhaps you need to set \$PGDBG?" "$LINENO" 5 fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(backtrace-idb,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-backtrace-idb was given. if test "${enable_backtrace_idb+set}" = set; then : enableval=$enable_backtrace_idb; fi case "$enable_backtrace_idb" in no) : use_idb="no" ;; yes) : use_idb="yes" ;; *) : use_idb="$use_backtrace" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(backtrace-idb,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$use_idb" != no; then for ac_prog in $IDB idb idb-e do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_IDB_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $IDB_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_IDB_PATH="$IDB_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_IDB_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi IDB_PATH=$ac_cv_path_IDB_PATH if test -n "$IDB_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IDB_PATH" >&5 $as_echo "$IDB_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$IDB_PATH" && break done if test -n "$IDB_PATH"; then cat >>confdefs.h <<_ACEOF #define IDB_PATH "$IDB_PATH" _ACEOF elif test "$use_idb" = yes; then as_fn_error $? "User requested --enable-backtrace-idb but idb was not found. Perhaps you need to set \$IDB?" "$LINENO" 5 fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(backtrace-dbx,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-backtrace-dbx was given. if test "${enable_backtrace_dbx+set}" = set; then : enableval=$enable_backtrace_dbx; fi case "$enable_backtrace_dbx" in no) : use_dbx="no" ;; yes) : use_dbx="yes" ;; *) : use_dbx="$use_backtrace" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(backtrace-dbx,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$use_dbx" != no; then for ac_prog in $DBX dbx do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DBX_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $DBX_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_DBX_PATH="$DBX_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DBX_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DBX_PATH=$ac_cv_path_DBX_PATH if test -n "$DBX_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBX_PATH" >&5 $as_echo "$DBX_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DBX_PATH" && break done if test -n "$DBX_PATH"; then cat >>confdefs.h <<_ACEOF #define DBX_PATH "$DBX_PATH" _ACEOF elif test "$use_dbx" = yes; then as_fn_error $? "User requested --enable-backtrace-dbx but dbx was not found. Perhaps you need to set \$DBX?" "$LINENO" 5 fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(backtrace-lldb,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-backtrace-lldb was given. if test "${enable_backtrace_lldb+set}" = set; then : enableval=$enable_backtrace_lldb; fi case "$enable_backtrace_lldb" in no) : use_lldb="no" ;; yes) : use_lldb="yes" ;; *) : use_lldb="$use_backtrace" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(backtrace-lldb,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$use_lldb" != no; then for ac_prog in $LLDB lldb do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_LLDB_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $LLDB_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_LLDB_PATH="$LLDB_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_LLDB_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi LLDB_PATH=$ac_cv_path_LLDB_PATH if test -n "$LLDB_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLDB_PATH" >&5 $as_echo "$LLDB_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LLDB_PATH" && break done if test -n "$LLDB_PATH"; then cat >>confdefs.h <<_ACEOF #define LLDB_PATH "$LLDB_PATH" _ACEOF elif test "$use_lldb" = yes; then as_fn_error $? "User requested --enable-backtrace-lldb but lldb was not found. Perhaps you need to set \$LLDB?" "$LINENO" 5 fi fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(backtrace-printstack,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-backtrace-printstack was given. if test "${enable_backtrace_printstack+set}" = set; then : enableval=$enable_backtrace_printstack; fi case "$enable_backtrace_printstack" in no) : use_printstack="no" ;; yes) : use_printstack="yes" ;; *) : use_printstack="$use_backtrace" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(backtrace-printstack,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$use_printstack" != no; then have_printstack=no for ac_header in ucontext.h do : ac_fn_c_check_header_mongrel "$LINENO" "ucontext.h" "ac_cv_header_ucontext_h" "$ac_includes_default" if test "x$ac_cv_header_ucontext_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UCONTEXT_H 1 _ACEOF ac_fn_c_check_func "$LINENO" "printstack" "ac_cv_func_printstack" if test "x$ac_cv_func_printstack" = xyes; then : have_printstack=yes; $as_echo "#define HAVE_PRINTSTACK 1" >>confdefs.h fi fi done if test "$use_printstack$have_printstack" = yesno; then as_fn_error $? "User requested --enable-backtrace-printstack but printstack support was not found." "$LINENO" 5 fi fi ######################################################################## # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(memory-kinds,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-memory-kinds was given. if test "${enable_memory_kinds+set}" = set; then : enableval=$enable_memory_kinds; fi case "$enable_memory_kinds" in '' | no) : enable_mk_default=no ;; *) : enable_mk_default=probe ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(memory-kinds,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # This is potentially used CUDA_UVA and by HIP # So we'll factor it to avoid repeats in ouptut unset checked_pkg_cuda # GEX_MK_CLASS_CUDA_UVA enable_mk_cuda_uva_implicit=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(kind-cuda-uva,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-kind-cuda-uva was given. if test "${enable_kind_cuda_uva+set}" = set; then : enableval=$enable_kind_cuda_uva; fi case "$enable_kind_cuda_uva" in no) : enable_mk_cuda_uva="no" ;; yes) : enable_mk_cuda_uva="yes"; force_mk_cuda_uva="yes" ;; *) : if test "x$enable_kind_cuda_uva" = 'xprobe'; then enable_mk_cuda_uva="probe" elif test "$GASNETI_PTR_BITS" = 32; then enable_mk_cuda_uva="no" else enable_mk_cuda_uva="$enable_mk_default" enable_mk_cuda_uva_implicit=yes fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(kind-cuda-uva,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) unset have_mk_cuda_uva if test "$enable_mk_cuda_uva" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target having CUDA UVA memory kinds support" >&5 $as_echo_n "checking for target having CUDA UVA memory kinds support... " >&6; } if test "$GASNETI_PTR_BITS" = 32; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (32-bit targets are not supported)" >&5 $as_echo "no (32-bit targets are not supported)" >&6; } have_mk_cuda_uva=no else have_mk_cuda_uva=no case "$target_cpu:$target_os" in x86_64:linux*) have_mk_cuda_uva='yes';; powerpc*:linux*) if test "$WORDS_BIGENDIAN" = '0'; then have_mk_cuda_uva='yes'; fi;; aarch64:linux*) have_mk_cuda_uva='maybe';; esac if test "$have_mk_cuda_uva" = 'no'; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (unsupported or unrecognized target $target)" >&5 $as_echo "no (unsupported or unrecognized target $target)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mk_cuda_uva" >&5 $as_echo "$have_mk_cuda_uva" >&6; } fi fi if test "$have_mk_cuda_uva" != "no"; then # TODO: Can/should we scrape nvcc as UPC++ does? if test "${checked_pkg_cuda-unset}" = unset; then checked_pkg_cuda=y # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_HOME(CUDA,CUDA toolkit,nvcc,/usr/local/cuda,include/cuda.h) vvvvvvvvvvvvvvvvvvvvvv (L:4) CUDA_guess= for ac_prog in nvcc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CUDA_guess_prog+:} false; then : $as_echo_n "(cached) " >&6 else case $CUDA_guess_prog in [\\/]* | ?:[\\/]*) ac_cv_path_CUDA_guess_prog="$CUDA_guess_prog" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CUDA_guess_prog="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi CUDA_guess_prog=$ac_cv_path_CUDA_guess_prog if test -n "$CUDA_guess_prog"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUDA_guess_prog" >&5 $as_echo "$CUDA_guess_prog" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CUDA_guess_prog" && break done if test -n "$CUDA_guess_prog"; then CUDA_guess=`dirname \`dirname $CUDA_guess_prog\`` fi if test -z "$CUDA_guess" ; then for CUDA_guess_file in "include/cuda.h" "."; do for CUDA_guess in /usr/local/cuda /usr; do if test -r "$CUDA_guess/$CUDA_guess_file" ; then break 2 fi done done unset CUDA_guess_file fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CUDA_HOME],[$CUDA_guess],[Install prefix of CUDA toolkit (auto-detected from PATH)]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-cuda-home was given. if test "${with_cuda_home+set}" = set; then : withval=$with_cuda_home; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA_HOME setting" >&5 $as_echo_n "checking for CUDA_HOME setting... " >&6; } envval_src_CUDA_HOME="cached" if ${gasnet_cv_envvar_CUDA_HOME+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_CUDA_HOME="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CUDA_HOME="$CUDA_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cudahome+set}" = "set" ; then gasnet_cv_envvar_CUDA_HOME="${_gasneti_nenv_cudahome}" envval_src_CUDA_HOME=given elif test "${_gasneti_cenv_cudahome+set}" = "set" ; then gasnet_cv_envvar_CUDA_HOME="${_gasneti_cenv_cudahome}" envval_src_CUDA_HOME=conf else gasnet_cv_envvar_CUDA_HOME=$envval_default_CUDA_HOME envval_src_CUDA_HOME=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CUDA_HOME cudahome $gasnet_cv_configure_args_norm fi CUDA_HOME="$gasnet_cv_envvar_CUDA_HOME" if test "$CUDA_HOME" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CUDA_HOME if test "$envval_src_CUDA_HOME" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CUDA_HOME" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CUDA_HOME\"" >&5 $as_echo " \"$CUDA_HOME\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CUDA_HOME\"" >&5 $as_echo " (default) \"$CUDA_HOME\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CUDA_HOME\"" >&5 $as_echo " (disabled) \"$CUDA_HOME\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_HOME\"" >&5 $as_echo " (provided) \"$CUDA_HOME\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_HOME\"" >&5 $as_echo " (provided) \"$CUDA_HOME\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CUDA_HOME. Please configure --with-CUDA_HOME=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CUDA_HOME],[$CUDA_guess],[Install prefix of CUDA toolkit (auto-detected from PATH)]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CUDA_HOME is the CUDA toolkit install prefix" >&5 $as_echo_n "checking if $CUDA_HOME is the CUDA toolkit install prefix... " >&6; } CUDA_HOME_good=no if test -r "$CUDA_HOME/include/cuda.h"; then CUDA_HOME_good=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test $CUDA_HOME_good = no && test -n "$CUDA_guess_prog"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_FOLLOWLINKS(CUDA_guess_prog) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_fl_file="$CUDA_guess_prog" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` while test "$gasnet_fl_link"; do gasnet_fl_file="$gasnet_fl_link" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` done CUDA_guess_prog="$gasnet_fl_file" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FOLLOWLINKS(CUDA_guess_prog) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CUDA_HOME_tmp=`dirname \`dirname $CUDA_guess_prog\`` if test -r "$CUDA_HOME_tmp/include/cuda.h"; then CUDA_HOME_good=yes CUDA_HOME="$CUDA_HOME_tmp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - followed symlink to $CUDA_HOME" >&5 $as_echo "no - followed symlink to $CUDA_HOME" >&6; } fi unset CUDA_HOME_tmp fi if test $CUDA_HOME_good = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: probably not - missing include/cuda.h" >&5 $as_echo "probably not - missing include/cuda.h" >&6; } fi unset CUDA_HOME_good unset CUDA_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_CFLAGS([CUDA]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$CUDA_HOME" in /usr|/) CUDA_cflags_guess='';; *) if test -d "$CUDA_HOME/include/."; then CUDA_cflags_guess="-I$CUDA_HOME/include" else CUDA_cflags_guess='' fi;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CUDA_CFLAGS],[$CUDA_cflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-cuda-cflags was given. if test "${with_cuda_cflags+set}" = set; then : withval=$with_cuda_cflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA_CFLAGS setting" >&5 $as_echo_n "checking for CUDA_CFLAGS setting... " >&6; } envval_src_CUDA_CFLAGS="cached" if ${gasnet_cv_envvar_CUDA_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CUDA_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CUDA_CFLAGS="$CUDA_cflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cudacflags+set}" = "set" ; then gasnet_cv_envvar_CUDA_CFLAGS="${_gasneti_nenv_cudacflags}" envval_src_CUDA_CFLAGS=given elif test "${_gasneti_cenv_cudacflags+set}" = "set" ; then gasnet_cv_envvar_CUDA_CFLAGS="${_gasneti_cenv_cudacflags}" envval_src_CUDA_CFLAGS=conf else gasnet_cv_envvar_CUDA_CFLAGS=$envval_default_CUDA_CFLAGS envval_src_CUDA_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CUDA_CFLAGS cudacflags $gasnet_cv_configure_args_norm fi CUDA_CFLAGS="$gasnet_cv_envvar_CUDA_CFLAGS" if test "$CUDA_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CUDA_CFLAGS if test "$envval_src_CUDA_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CUDA_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CUDA_CFLAGS\"" >&5 $as_echo " \"$CUDA_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CUDA_CFLAGS\"" >&5 $as_echo " (default) \"$CUDA_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CUDA_CFLAGS\"" >&5 $as_echo " (disabled) \"$CUDA_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_CFLAGS\"" >&5 $as_echo " (provided) \"$CUDA_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_CFLAGS\"" >&5 $as_echo " (provided) \"$CUDA_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CUDA_CFLAGS. Please configure --with-CUDA_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CUDA_CFLAGS],[$CUDA_cflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) unset CUDA_cflags_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CUDA_LIBS],[-lcuda]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-cuda-libs was given. if test "${with_cuda_libs+set}" = set; then : withval=$with_cuda_libs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA_LIBS setting" >&5 $as_echo_n "checking for CUDA_LIBS setting... " >&6; } envval_src_CUDA_LIBS="cached" if ${gasnet_cv_envvar_CUDA_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CUDA_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CUDA_LIBS="-lcuda" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cudalibs+set}" = "set" ; then gasnet_cv_envvar_CUDA_LIBS="${_gasneti_nenv_cudalibs}" envval_src_CUDA_LIBS=given elif test "${_gasneti_cenv_cudalibs+set}" = "set" ; then gasnet_cv_envvar_CUDA_LIBS="${_gasneti_cenv_cudalibs}" envval_src_CUDA_LIBS=conf else gasnet_cv_envvar_CUDA_LIBS=$envval_default_CUDA_LIBS envval_src_CUDA_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CUDA_LIBS cudalibs $gasnet_cv_configure_args_norm fi CUDA_LIBS="$gasnet_cv_envvar_CUDA_LIBS" if test "$CUDA_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CUDA_LIBS if test "$envval_src_CUDA_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CUDA_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CUDA_LIBS\"" >&5 $as_echo " \"$CUDA_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CUDA_LIBS\"" >&5 $as_echo " (default) \"$CUDA_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CUDA_LIBS\"" >&5 $as_echo " (disabled) \"$CUDA_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_LIBS\"" >&5 $as_echo " (provided) \"$CUDA_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_LIBS\"" >&5 $as_echo " (provided) \"$CUDA_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CUDA_LIBS. Please configure --with-CUDA_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CUDA_LIBS],[-lcuda]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_LDFLAGS([CUDA],[cuda]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$CUDA_HOME" in /usr|/) CUDA_ldflags_guess='';; *) for CUDA_ldflags_guess_dir in "$CUDA_HOME/lib${GASNETI_PTR_BITS}" "$CUDA_HOME/lib" ''; do test -z "$CUDA_ldflags_guess_dir" && break for CUDA_ldflags_guess_lib in cuda; do for CUDA_ldflags_guess_suff in a so sl dylib la dll; do if test -r "$CUDA_ldflags_guess_dir/lib$CUDA_ldflags_guess_lib.$CUDA_ldflags_guess_suff"; then break 3; fi done done done if test -n "$CUDA_ldflags_guess_dir"; then CUDA_ldflags_guess="-L$CUDA_ldflags_guess_dir" # deferred to appear after help for [PREFIX]_LDFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(cuda-rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$enable_cuda_rpath" in no) : enabled_cuda_rpath='' ;; yes) : enabled_cuda_rpath="$CUDA_ldflags_guess_dir" ;; *) : if test -z "$enabled_cuda_rpath"; then if test "x$enabled_rpath" = xyes; then enabled_cuda_rpath="$CUDA_ldflags_guess_dir" else enabled_cuda_rpath='' fi fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(cuda-rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -n "$enabled_cuda_rpath"; then if test "${cc_rpath_option:+set}" = set; then CUDA_ldflags_guess="$CUDA_ldflags_guess $cc_rpath_option$enabled_cuda_rpath" else warn_missing_rpath="$warn_missing_rpath cuda" fi fi CUDA_ldflags_guess="${CUDA_ldflags_guess}" else CUDA_ldflags_guess='' fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CUDA_LDFLAGS],[$CUDA_ldflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-cuda-ldflags was given. if test "${with_cuda_ldflags+set}" = set; then : withval=$with_cuda_ldflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA_LDFLAGS setting" >&5 $as_echo_n "checking for CUDA_LDFLAGS setting... " >&6; } envval_src_CUDA_LDFLAGS="cached" if ${gasnet_cv_envvar_CUDA_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CUDA_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CUDA_LDFLAGS="$CUDA_ldflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cudaldflags+set}" = "set" ; then gasnet_cv_envvar_CUDA_LDFLAGS="${_gasneti_nenv_cudaldflags}" envval_src_CUDA_LDFLAGS=given elif test "${_gasneti_cenv_cudaldflags+set}" = "set" ; then gasnet_cv_envvar_CUDA_LDFLAGS="${_gasneti_cenv_cudaldflags}" envval_src_CUDA_LDFLAGS=conf else gasnet_cv_envvar_CUDA_LDFLAGS=$envval_default_CUDA_LDFLAGS envval_src_CUDA_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CUDA_LDFLAGS cudaldflags $gasnet_cv_configure_args_norm fi CUDA_LDFLAGS="$gasnet_cv_envvar_CUDA_LDFLAGS" if test "$CUDA_LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CUDA_LDFLAGS if test "$envval_src_CUDA_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CUDA_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CUDA_LDFLAGS\"" >&5 $as_echo " \"$CUDA_LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CUDA_LDFLAGS\"" >&5 $as_echo " (default) \"$CUDA_LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CUDA_LDFLAGS\"" >&5 $as_echo " (disabled) \"$CUDA_LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_LDFLAGS\"" >&5 $as_echo " (provided) \"$CUDA_LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_LDFLAGS\"" >&5 $as_echo " (provided) \"$CUDA_LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CUDA_LDFLAGS. Please configure --with-CUDA_LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CUDA_LDFLAGS],[$CUDA_ldflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # Check whether --enable-cuda-rpath was given. if test "${enable_cuda_rpath+set}" = set; then : enableval=$enable_cuda_rpath; fi unset CUDA_ldflags_guess unset CUDA_ldflags_guess_dir unset CUDA_ldflags_guess_lib unset CUDA_ldflags_guess_suff # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([CUDA_LDFLAGS],[CUDA_LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) eval gasnet_fn_split_linker_opts CUDA_LDFLAGS CUDA_LIBS $CUDA_LDFLAGS $CUDA_LIBS #echo "CUDA_LDFLAGS=[$]CUDA_LDFLAGS" #echo "CUDA_LIBS=[$]CUDA_LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([CUDA_LDFLAGS],[CUDA_LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # Try to compile and link a basic program using the CUDA Driver API # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CUDA_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $CUDA_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CUDA_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $CUDA_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $CUDA_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $CUDA_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $CUDA_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $CUDA_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $CUDA_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working CUDA configuration,libcuda_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working CUDA configuration" >&5 $as_echo_n "checking for working CUDA configuration... " >&6; } if ${gasnet_cv_libcuda_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { cuInit(0); CUdevice dev = 0; CUcontext ctx; CUresult res = cuDevicePrimaryCtxRetain(&ctx, dev); int isUVA; cuDeviceGetAttribute(&isUVA, CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, dev); CUpointer_attribute attrs[3] = { CU_POINTER_ATTRIBUTE_MEMORY_TYPE, CU_POINTER_ATTRIBUTE_IS_MANAGED, CU_POINTER_ATTRIBUTE_CONTEXT }; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_libcuda_works=yes else gasnet_cv_libcuda_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_libcuda_works" >&5 $as_echo "$gasnet_cv_libcuda_works" >&6; } if test "$gasnet_cv_libcuda_works" = yes; then : : else : have_mk_cuda_uva=no; if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working CUDA configuration,libcuda_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # If the probe(s) above passed on a target identified as "maybe" having # support, then upgrade to "yes" with a warning. if test "$have_mk_cuda_uva" = "maybe"; then have_mk_cuda_uva=yes # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: CUDA UVA memory kinds support enabled for $target, which may not be officially supported" >&5 $as_echo "$as_me: WARNING: CUDA UVA memory kinds support enabled for $target, which may not be officially supported" >&2;} echo "CUDA UVA memory kinds support enabled for $target, which may not be officially supported" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$have_mk_cuda_uva" = "yes"; then $as_echo "#define GASNETI_MK_CLASS_CUDA_UVA_ENABLED 1" >>confdefs.h CUDA_UVA_CFLAGS="$CUDA_CFLAGS" CUDA_UVA_LDFLAGS="$CUDA_LDFLAGS" CUDA_UVA_LIBS="$CUDA_LIBS" elif test "$force_mk_cuda_uva" = "yes"; then echo echo "configure error: CUDA UVA memory kinds support was requested with --enable-kind-cuda-uva but is not available" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else unset CUDA_UVA_CFLAGS unset CUDA_UVA_LDFLAGS unset CUDA_UVA_LIBS fi fi if test "$have_mk_cuda_uva" = "yes"; then HAVE_MK_CLASS_CUDA_UVA_TRUE= HAVE_MK_CLASS_CUDA_UVA_FALSE='#' else HAVE_MK_CLASS_CUDA_UVA_TRUE='#' HAVE_MK_CLASS_CUDA_UVA_FALSE= fi # GEX_MK_CLASS_HIP enable_mk_hip_implicit=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(kind-hip,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-kind-hip was given. if test "${enable_kind_hip+set}" = set; then : enableval=$enable_kind_hip; fi case "$enable_kind_hip" in no) : enable_mk_hip="no" ;; yes) : enable_mk_hip="yes"; force_mk_hip="yes" ;; *) : if test "x$enable_kind_hip" = 'xprobe'; then enable_mk_hip="probe" elif test "$GASNETI_PTR_BITS" = 32; then enable_mk_hip="no" else enable_mk_hip="$enable_mk_default" enable_mk_hip_implicit=yes fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(kind-hip,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) unset have_mk_hip if test "$enable_mk_hip" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target having HIP memory kinds support" >&5 $as_echo_n "checking for target having HIP memory kinds support... " >&6; } if test "$GASNETI_PTR_BITS" = 32; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (32-bit targets are not supported)" >&5 $as_echo "no (32-bit targets are not supported)" >&6; } have_mk_hip=no else have_mk_hip=no case "$target_cpu:$target_os" in x86_64:linux*) have_mk_hip='yes';; powerpc*:linux*) have_mk_hip='maybe';; aarch64:linux*) have_mk_hip='maybe';; esac if test "$have_mk_hip" = 'no'; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (unsupported or unrecognized target $target)" >&5 $as_echo "no (unsupported or unrecognized target $target)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mk_hip" >&5 $as_echo "$have_mk_hip" >&6; } fi fi if test "$have_mk_hip" != "no"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_HOME(HIP,HIP developer tools,hipcc,/opt/rocm,include/hip/hip_runtime.h) vvvvvvvvvvvvvvvvvvvvvv (L:4) HIP_guess= for ac_prog in hipcc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_HIP_guess_prog+:} false; then : $as_echo_n "(cached) " >&6 else case $HIP_guess_prog in [\\/]* | ?:[\\/]*) ac_cv_path_HIP_guess_prog="$HIP_guess_prog" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_HIP_guess_prog="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi HIP_guess_prog=$ac_cv_path_HIP_guess_prog if test -n "$HIP_guess_prog"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HIP_guess_prog" >&5 $as_echo "$HIP_guess_prog" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$HIP_guess_prog" && break done if test -n "$HIP_guess_prog"; then HIP_guess=`dirname \`dirname $HIP_guess_prog\`` fi if test -z "$HIP_guess" ; then for HIP_guess_file in "include/hip/hip_runtime.h" "."; do for HIP_guess in /opt/rocm /usr; do if test -r "$HIP_guess/$HIP_guess_file" ; then break 2 fi done done unset HIP_guess_file fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HIP_HOME],[$HIP_guess],[Install prefix of HIP developer tools (auto-detected from PATH)]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-hip-home was given. if test "${with_hip_home+set}" = set; then : withval=$with_hip_home; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HIP_HOME setting" >&5 $as_echo_n "checking for HIP_HOME setting... " >&6; } envval_src_HIP_HOME="cached" if ${gasnet_cv_envvar_HIP_HOME+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_HIP_HOME="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HIP_HOME="$HIP_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hiphome+set}" = "set" ; then gasnet_cv_envvar_HIP_HOME="${_gasneti_nenv_hiphome}" envval_src_HIP_HOME=given elif test "${_gasneti_cenv_hiphome+set}" = "set" ; then gasnet_cv_envvar_HIP_HOME="${_gasneti_cenv_hiphome}" envval_src_HIP_HOME=conf else gasnet_cv_envvar_HIP_HOME=$envval_default_HIP_HOME envval_src_HIP_HOME=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HIP_HOME hiphome $gasnet_cv_configure_args_norm fi HIP_HOME="$gasnet_cv_envvar_HIP_HOME" if test "$HIP_HOME" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HIP_HOME if test "$envval_src_HIP_HOME" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HIP_HOME" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HIP_HOME\"" >&5 $as_echo " \"$HIP_HOME\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HIP_HOME\"" >&5 $as_echo " (default) \"$HIP_HOME\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HIP_HOME\"" >&5 $as_echo " (disabled) \"$HIP_HOME\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_HOME\"" >&5 $as_echo " (provided) \"$HIP_HOME\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_HOME\"" >&5 $as_echo " (provided) \"$HIP_HOME\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HIP_HOME. Please configure --with-HIP_HOME=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HIP_HOME],[$HIP_guess],[Install prefix of HIP developer tools (auto-detected from PATH)]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $HIP_HOME is the HIP developer tools install prefix" >&5 $as_echo_n "checking if $HIP_HOME is the HIP developer tools install prefix... " >&6; } HIP_HOME_good=no if test -r "$HIP_HOME/include/hip/hip_runtime.h"; then HIP_HOME_good=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test $HIP_HOME_good = no && test -n "$HIP_guess_prog"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_FOLLOWLINKS(HIP_guess_prog) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_fl_file="$HIP_guess_prog" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` while test "$gasnet_fl_link"; do gasnet_fl_file="$gasnet_fl_link" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` done HIP_guess_prog="$gasnet_fl_file" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FOLLOWLINKS(HIP_guess_prog) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) HIP_HOME_tmp=`dirname \`dirname $HIP_guess_prog\`` if test -r "$HIP_HOME_tmp/include/hip/hip_runtime.h"; then HIP_HOME_good=yes HIP_HOME="$HIP_HOME_tmp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - followed symlink to $HIP_HOME" >&5 $as_echo "no - followed symlink to $HIP_HOME" >&6; } fi unset HIP_HOME_tmp fi if test $HIP_HOME_good = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: probably not - missing include/hip/hip_runtime.h" >&5 $as_echo "probably not - missing include/hip/hip_runtime.h" >&6; } fi unset HIP_HOME_good unset HIP_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_CFLAGS([HIP]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$HIP_HOME" in /usr|/) HIP_cflags_guess='';; *) if test -d "$HIP_HOME/include/."; then HIP_cflags_guess="-I$HIP_HOME/include" else HIP_cflags_guess='' fi;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HIP_CFLAGS],[$HIP_cflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-hip-cflags was given. if test "${with_hip_cflags+set}" = set; then : withval=$with_hip_cflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HIP_CFLAGS setting" >&5 $as_echo_n "checking for HIP_CFLAGS setting... " >&6; } envval_src_HIP_CFLAGS="cached" if ${gasnet_cv_envvar_HIP_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_HIP_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HIP_CFLAGS="$HIP_cflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hipcflags+set}" = "set" ; then gasnet_cv_envvar_HIP_CFLAGS="${_gasneti_nenv_hipcflags}" envval_src_HIP_CFLAGS=given elif test "${_gasneti_cenv_hipcflags+set}" = "set" ; then gasnet_cv_envvar_HIP_CFLAGS="${_gasneti_cenv_hipcflags}" envval_src_HIP_CFLAGS=conf else gasnet_cv_envvar_HIP_CFLAGS=$envval_default_HIP_CFLAGS envval_src_HIP_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HIP_CFLAGS hipcflags $gasnet_cv_configure_args_norm fi HIP_CFLAGS="$gasnet_cv_envvar_HIP_CFLAGS" if test "$HIP_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HIP_CFLAGS if test "$envval_src_HIP_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HIP_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HIP_CFLAGS\"" >&5 $as_echo " \"$HIP_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HIP_CFLAGS\"" >&5 $as_echo " (default) \"$HIP_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HIP_CFLAGS\"" >&5 $as_echo " (disabled) \"$HIP_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_CFLAGS\"" >&5 $as_echo " (provided) \"$HIP_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_CFLAGS\"" >&5 $as_echo " (provided) \"$HIP_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HIP_CFLAGS. Please configure --with-HIP_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HIP_CFLAGS],[$HIP_cflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) unset HIP_cflags_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # UNDOCUMENTED option to enable use of HIP over CUDA *by GASNet maintainers*. # TODO: Eventually we should REMOVE or DOCUMENT hip_platform=amd if test "${with_hip_platform+set}" = set; then : withval=$with_hip_platform; case "$withval" in no) : ;; *) : case "$withval" in amd|hcc) hip_platform='amd';; nvidia|nvcc) hip_platform='nvidia';; *) as_fn_error $? "--with-hip-platform requires an argument (amd or nvidia)" "$LINENO" 5 ;; esac ;; esac else : fi case "$hip_platform" in amd) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HIP_LIBS],[-lamdhip64]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-hip-libs was given. if test "${with_hip_libs+set}" = set; then : withval=$with_hip_libs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HIP_LIBS setting" >&5 $as_echo_n "checking for HIP_LIBS setting... " >&6; } envval_src_HIP_LIBS="cached" if ${gasnet_cv_envvar_HIP_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_HIP_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HIP_LIBS="-lamdhip64" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hiplibs+set}" = "set" ; then gasnet_cv_envvar_HIP_LIBS="${_gasneti_nenv_hiplibs}" envval_src_HIP_LIBS=given elif test "${_gasneti_cenv_hiplibs+set}" = "set" ; then gasnet_cv_envvar_HIP_LIBS="${_gasneti_cenv_hiplibs}" envval_src_HIP_LIBS=conf else gasnet_cv_envvar_HIP_LIBS=$envval_default_HIP_LIBS envval_src_HIP_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HIP_LIBS hiplibs $gasnet_cv_configure_args_norm fi HIP_LIBS="$gasnet_cv_envvar_HIP_LIBS" if test "$HIP_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HIP_LIBS if test "$envval_src_HIP_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HIP_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HIP_LIBS\"" >&5 $as_echo " \"$HIP_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HIP_LIBS\"" >&5 $as_echo " (default) \"$HIP_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HIP_LIBS\"" >&5 $as_echo " (disabled) \"$HIP_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_LIBS\"" >&5 $as_echo " (provided) \"$HIP_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_LIBS\"" >&5 $as_echo " (provided) \"$HIP_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HIP_LIBS. Please configure --with-HIP_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HIP_LIBS],[-lamdhip64]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_LDFLAGS([HIP],[amdhip64]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$HIP_HOME" in /usr|/) HIP_ldflags_guess='';; *) for HIP_ldflags_guess_dir in "$HIP_HOME/lib${GASNETI_PTR_BITS}" "$HIP_HOME/lib" ''; do test -z "$HIP_ldflags_guess_dir" && break for HIP_ldflags_guess_lib in amdhip64; do for HIP_ldflags_guess_suff in a so sl dylib la dll; do if test -r "$HIP_ldflags_guess_dir/lib$HIP_ldflags_guess_lib.$HIP_ldflags_guess_suff"; then break 3; fi done done done if test -n "$HIP_ldflags_guess_dir"; then HIP_ldflags_guess="-L$HIP_ldflags_guess_dir" # deferred to appear after help for [PREFIX]_LDFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(hip-rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$enable_hip_rpath" in no) : enabled_hip_rpath='' ;; yes) : enabled_hip_rpath="$HIP_ldflags_guess_dir" ;; *) : if test -z "$enabled_hip_rpath"; then if test "x$enabled_rpath" = xyes; then enabled_hip_rpath="$HIP_ldflags_guess_dir" else enabled_hip_rpath='' fi fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(hip-rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -n "$enabled_hip_rpath"; then if test "${cc_rpath_option:+set}" = set; then HIP_ldflags_guess="$HIP_ldflags_guess $cc_rpath_option$enabled_hip_rpath" else warn_missing_rpath="$warn_missing_rpath hip" fi fi HIP_ldflags_guess="${HIP_ldflags_guess}" else HIP_ldflags_guess='' fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HIP_LDFLAGS],[$HIP_ldflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-hip-ldflags was given. if test "${with_hip_ldflags+set}" = set; then : withval=$with_hip_ldflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HIP_LDFLAGS setting" >&5 $as_echo_n "checking for HIP_LDFLAGS setting... " >&6; } envval_src_HIP_LDFLAGS="cached" if ${gasnet_cv_envvar_HIP_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_HIP_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HIP_LDFLAGS="$HIP_ldflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hipldflags+set}" = "set" ; then gasnet_cv_envvar_HIP_LDFLAGS="${_gasneti_nenv_hipldflags}" envval_src_HIP_LDFLAGS=given elif test "${_gasneti_cenv_hipldflags+set}" = "set" ; then gasnet_cv_envvar_HIP_LDFLAGS="${_gasneti_cenv_hipldflags}" envval_src_HIP_LDFLAGS=conf else gasnet_cv_envvar_HIP_LDFLAGS=$envval_default_HIP_LDFLAGS envval_src_HIP_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HIP_LDFLAGS hipldflags $gasnet_cv_configure_args_norm fi HIP_LDFLAGS="$gasnet_cv_envvar_HIP_LDFLAGS" if test "$HIP_LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HIP_LDFLAGS if test "$envval_src_HIP_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HIP_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HIP_LDFLAGS\"" >&5 $as_echo " \"$HIP_LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HIP_LDFLAGS\"" >&5 $as_echo " (default) \"$HIP_LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HIP_LDFLAGS\"" >&5 $as_echo " (disabled) \"$HIP_LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_LDFLAGS\"" >&5 $as_echo " (provided) \"$HIP_LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_LDFLAGS\"" >&5 $as_echo " (provided) \"$HIP_LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HIP_LDFLAGS. Please configure --with-HIP_LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HIP_LDFLAGS],[$HIP_ldflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # Check whether --enable-hip-rpath was given. if test "${enable_hip_rpath+set}" = set; then : enableval=$enable_hip_rpath; fi unset HIP_ldflags_guess unset HIP_ldflags_guess_dir unset HIP_ldflags_guess_lib unset HIP_ldflags_guess_suff # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) $as_echo "#define GASNETI_HIP_PLATFORM_AMD 1" >>confdefs.h ;; nvidia) if test "${checked_pkg_cuda-unset}" = unset; then checked_pkg_cuda=y # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_HOME(CUDA,CUDA toolkit,nvcc,/usr/local/cuda,include/cuda.h) vvvvvvvvvvvvvvvvvvvvvv (L:4) CUDA_guess= for ac_prog in nvcc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CUDA_guess_prog+:} false; then : $as_echo_n "(cached) " >&6 else case $CUDA_guess_prog in [\\/]* | ?:[\\/]*) ac_cv_path_CUDA_guess_prog="$CUDA_guess_prog" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CUDA_guess_prog="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi CUDA_guess_prog=$ac_cv_path_CUDA_guess_prog if test -n "$CUDA_guess_prog"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUDA_guess_prog" >&5 $as_echo "$CUDA_guess_prog" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CUDA_guess_prog" && break done if test -n "$CUDA_guess_prog"; then CUDA_guess=`dirname \`dirname $CUDA_guess_prog\`` fi if test -z "$CUDA_guess" ; then for CUDA_guess_file in "include/cuda.h" "."; do for CUDA_guess in /usr/local/cuda /usr; do if test -r "$CUDA_guess/$CUDA_guess_file" ; then break 2 fi done done unset CUDA_guess_file fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CUDA_HOME],[$CUDA_guess],[Install prefix of CUDA toolkit (auto-detected from PATH)]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA_HOME setting" >&5 $as_echo_n "checking for CUDA_HOME setting... " >&6; } envval_src_CUDA_HOME="cached" if ${gasnet_cv_envvar_CUDA_HOME+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_CUDA_HOME="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CUDA_HOME="$CUDA_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cudahome+set}" = "set" ; then gasnet_cv_envvar_CUDA_HOME="${_gasneti_nenv_cudahome}" envval_src_CUDA_HOME=given elif test "${_gasneti_cenv_cudahome+set}" = "set" ; then gasnet_cv_envvar_CUDA_HOME="${_gasneti_cenv_cudahome}" envval_src_CUDA_HOME=conf else gasnet_cv_envvar_CUDA_HOME=$envval_default_CUDA_HOME envval_src_CUDA_HOME=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CUDA_HOME cudahome $gasnet_cv_configure_args_norm fi CUDA_HOME="$gasnet_cv_envvar_CUDA_HOME" if test "$CUDA_HOME" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CUDA_HOME if test "$envval_src_CUDA_HOME" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CUDA_HOME" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CUDA_HOME\"" >&5 $as_echo " \"$CUDA_HOME\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CUDA_HOME\"" >&5 $as_echo " (default) \"$CUDA_HOME\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CUDA_HOME\"" >&5 $as_echo " (disabled) \"$CUDA_HOME\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_HOME\"" >&5 $as_echo " (provided) \"$CUDA_HOME\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_HOME\"" >&5 $as_echo " (provided) \"$CUDA_HOME\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CUDA_HOME. Please configure --with-CUDA_HOME=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CUDA_HOME],[$CUDA_guess],[Install prefix of CUDA toolkit (auto-detected from PATH)]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CUDA_HOME is the CUDA toolkit install prefix" >&5 $as_echo_n "checking if $CUDA_HOME is the CUDA toolkit install prefix... " >&6; } CUDA_HOME_good=no if test -r "$CUDA_HOME/include/cuda.h"; then CUDA_HOME_good=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test $CUDA_HOME_good = no && test -n "$CUDA_guess_prog"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_FOLLOWLINKS(CUDA_guess_prog) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_fl_file="$CUDA_guess_prog" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` while test "$gasnet_fl_link"; do gasnet_fl_file="$gasnet_fl_link" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` done CUDA_guess_prog="$gasnet_fl_file" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FOLLOWLINKS(CUDA_guess_prog) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) CUDA_HOME_tmp=`dirname \`dirname $CUDA_guess_prog\`` if test -r "$CUDA_HOME_tmp/include/cuda.h"; then CUDA_HOME_good=yes CUDA_HOME="$CUDA_HOME_tmp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - followed symlink to $CUDA_HOME" >&5 $as_echo "no - followed symlink to $CUDA_HOME" >&6; } fi unset CUDA_HOME_tmp fi if test $CUDA_HOME_good = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: probably not - missing include/cuda.h" >&5 $as_echo "probably not - missing include/cuda.h" >&6; } fi unset CUDA_HOME_good unset CUDA_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_CFLAGS([CUDA]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$CUDA_HOME" in /usr|/) CUDA_cflags_guess='';; *) if test -d "$CUDA_HOME/include/."; then CUDA_cflags_guess="-I$CUDA_HOME/include" else CUDA_cflags_guess='' fi;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CUDA_CFLAGS],[$CUDA_cflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA_CFLAGS setting" >&5 $as_echo_n "checking for CUDA_CFLAGS setting... " >&6; } envval_src_CUDA_CFLAGS="cached" if ${gasnet_cv_envvar_CUDA_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CUDA_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CUDA_CFLAGS="$CUDA_cflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cudacflags+set}" = "set" ; then gasnet_cv_envvar_CUDA_CFLAGS="${_gasneti_nenv_cudacflags}" envval_src_CUDA_CFLAGS=given elif test "${_gasneti_cenv_cudacflags+set}" = "set" ; then gasnet_cv_envvar_CUDA_CFLAGS="${_gasneti_cenv_cudacflags}" envval_src_CUDA_CFLAGS=conf else gasnet_cv_envvar_CUDA_CFLAGS=$envval_default_CUDA_CFLAGS envval_src_CUDA_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CUDA_CFLAGS cudacflags $gasnet_cv_configure_args_norm fi CUDA_CFLAGS="$gasnet_cv_envvar_CUDA_CFLAGS" if test "$CUDA_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CUDA_CFLAGS if test "$envval_src_CUDA_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CUDA_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CUDA_CFLAGS\"" >&5 $as_echo " \"$CUDA_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CUDA_CFLAGS\"" >&5 $as_echo " (default) \"$CUDA_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CUDA_CFLAGS\"" >&5 $as_echo " (disabled) \"$CUDA_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_CFLAGS\"" >&5 $as_echo " (provided) \"$CUDA_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_CFLAGS\"" >&5 $as_echo " (provided) \"$CUDA_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CUDA_CFLAGS. Please configure --with-CUDA_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CUDA_CFLAGS],[$CUDA_cflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) unset CUDA_cflags_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CUDA_LIBS],[-lcuda]) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA_LIBS setting" >&5 $as_echo_n "checking for CUDA_LIBS setting... " >&6; } envval_src_CUDA_LIBS="cached" if ${gasnet_cv_envvar_CUDA_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CUDA_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CUDA_LIBS="-lcuda" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cudalibs+set}" = "set" ; then gasnet_cv_envvar_CUDA_LIBS="${_gasneti_nenv_cudalibs}" envval_src_CUDA_LIBS=given elif test "${_gasneti_cenv_cudalibs+set}" = "set" ; then gasnet_cv_envvar_CUDA_LIBS="${_gasneti_cenv_cudalibs}" envval_src_CUDA_LIBS=conf else gasnet_cv_envvar_CUDA_LIBS=$envval_default_CUDA_LIBS envval_src_CUDA_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CUDA_LIBS cudalibs $gasnet_cv_configure_args_norm fi CUDA_LIBS="$gasnet_cv_envvar_CUDA_LIBS" if test "$CUDA_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CUDA_LIBS if test "$envval_src_CUDA_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CUDA_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CUDA_LIBS\"" >&5 $as_echo " \"$CUDA_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CUDA_LIBS\"" >&5 $as_echo " (default) \"$CUDA_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CUDA_LIBS\"" >&5 $as_echo " (disabled) \"$CUDA_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_LIBS\"" >&5 $as_echo " (provided) \"$CUDA_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_LIBS\"" >&5 $as_echo " (provided) \"$CUDA_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CUDA_LIBS. Please configure --with-CUDA_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CUDA_LIBS],[-lcuda]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_LDFLAGS([CUDA],[cuda]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$CUDA_HOME" in /usr|/) CUDA_ldflags_guess='';; *) for CUDA_ldflags_guess_dir in "$CUDA_HOME/lib${GASNETI_PTR_BITS}" "$CUDA_HOME/lib" ''; do test -z "$CUDA_ldflags_guess_dir" && break for CUDA_ldflags_guess_lib in cuda; do for CUDA_ldflags_guess_suff in a so sl dylib la dll; do if test -r "$CUDA_ldflags_guess_dir/lib$CUDA_ldflags_guess_lib.$CUDA_ldflags_guess_suff"; then break 3; fi done done done if test -n "$CUDA_ldflags_guess_dir"; then CUDA_ldflags_guess="-L$CUDA_ldflags_guess_dir" # deferred to appear after help for [PREFIX]_LDFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(cuda-rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$enable_cuda_rpath" in no) : enabled_cuda_rpath='' ;; yes) : enabled_cuda_rpath="$CUDA_ldflags_guess_dir" ;; *) : if test -z "$enabled_cuda_rpath"; then if test "x$enabled_rpath" = xyes; then enabled_cuda_rpath="$CUDA_ldflags_guess_dir" else enabled_cuda_rpath='' fi fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(cuda-rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -n "$enabled_cuda_rpath"; then if test "${cc_rpath_option:+set}" = set; then CUDA_ldflags_guess="$CUDA_ldflags_guess $cc_rpath_option$enabled_cuda_rpath" else warn_missing_rpath="$warn_missing_rpath cuda" fi fi CUDA_ldflags_guess="${CUDA_ldflags_guess}" else CUDA_ldflags_guess='' fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CUDA_LDFLAGS],[$CUDA_ldflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA_LDFLAGS setting" >&5 $as_echo_n "checking for CUDA_LDFLAGS setting... " >&6; } envval_src_CUDA_LDFLAGS="cached" if ${gasnet_cv_envvar_CUDA_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CUDA_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CUDA_LDFLAGS="$CUDA_ldflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_cudaldflags+set}" = "set" ; then gasnet_cv_envvar_CUDA_LDFLAGS="${_gasneti_nenv_cudaldflags}" envval_src_CUDA_LDFLAGS=given elif test "${_gasneti_cenv_cudaldflags+set}" = "set" ; then gasnet_cv_envvar_CUDA_LDFLAGS="${_gasneti_cenv_cudaldflags}" envval_src_CUDA_LDFLAGS=conf else gasnet_cv_envvar_CUDA_LDFLAGS=$envval_default_CUDA_LDFLAGS envval_src_CUDA_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CUDA_LDFLAGS cudaldflags $gasnet_cv_configure_args_norm fi CUDA_LDFLAGS="$gasnet_cv_envvar_CUDA_LDFLAGS" if test "$CUDA_LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CUDA_LDFLAGS if test "$envval_src_CUDA_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CUDA_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CUDA_LDFLAGS\"" >&5 $as_echo " \"$CUDA_LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CUDA_LDFLAGS\"" >&5 $as_echo " (default) \"$CUDA_LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CUDA_LDFLAGS\"" >&5 $as_echo " (disabled) \"$CUDA_LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_LDFLAGS\"" >&5 $as_echo " (provided) \"$CUDA_LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CUDA_LDFLAGS\"" >&5 $as_echo " (provided) \"$CUDA_LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CUDA_LDFLAGS. Please configure --with-CUDA_LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CUDA_LDFLAGS],[$CUDA_ldflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) unset CUDA_ldflags_guess unset CUDA_ldflags_guess_dir unset CUDA_ldflags_guess_lib unset CUDA_ldflags_guess_suff # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([CUDA_LDFLAGS],[CUDA_LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) eval gasnet_fn_split_linker_opts CUDA_LDFLAGS CUDA_LIBS $CUDA_LDFLAGS $CUDA_LIBS #echo "CUDA_LDFLAGS=[$]CUDA_LDFLAGS" #echo "CUDA_LIBS=[$]CUDA_LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([CUDA_LDFLAGS],[CUDA_LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # HIP-over-CUDA sometimes depends on amdhip64 (version-dependent) # but always depends on functions from CUDA runtime (library name can vary). # libcudart is generally NOT in CUDA_LIBS, since the CUDA MK does not require it # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HIP_LIBS],[-lamdhip64 -lcudart]) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HIP_LIBS setting" >&5 $as_echo_n "checking for HIP_LIBS setting... " >&6; } envval_src_HIP_LIBS="cached" if ${gasnet_cv_envvar_HIP_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_HIP_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HIP_LIBS="-lamdhip64 -lcudart" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hiplibs+set}" = "set" ; then gasnet_cv_envvar_HIP_LIBS="${_gasneti_nenv_hiplibs}" envval_src_HIP_LIBS=given elif test "${_gasneti_cenv_hiplibs+set}" = "set" ; then gasnet_cv_envvar_HIP_LIBS="${_gasneti_cenv_hiplibs}" envval_src_HIP_LIBS=conf else gasnet_cv_envvar_HIP_LIBS=$envval_default_HIP_LIBS envval_src_HIP_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HIP_LIBS hiplibs $gasnet_cv_configure_args_norm fi HIP_LIBS="$gasnet_cv_envvar_HIP_LIBS" if test "$HIP_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HIP_LIBS if test "$envval_src_HIP_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HIP_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HIP_LIBS\"" >&5 $as_echo " \"$HIP_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HIP_LIBS\"" >&5 $as_echo " (default) \"$HIP_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HIP_LIBS\"" >&5 $as_echo " (disabled) \"$HIP_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_LIBS\"" >&5 $as_echo " (provided) \"$HIP_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_LIBS\"" >&5 $as_echo " (provided) \"$HIP_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HIP_LIBS. Please configure --with-HIP_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HIP_LIBS],[-lamdhip64 -lcudart]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # extra_cudart_flags ensures default HIP_LDFLAGS includes the CUDA libdir (for libcudart) # which notably may or may not be in CUDA_LDFLAGS (since CUDA only requires libcuda) extra_cudart_flags="-L$CUDA_HOME/lib64" if test -n "$cc_rpath_option" && test "x$enable_cuda_rpath" != "xno" && \ test "${enable_cuda_rpath}x${enabled_rpath}" != "xno" ; then extra_cudart_flags="$extra_cudart_flags $cc_rpath_option$CUDA_HOME/lib64" fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_LDFLAGS([HIP],[amdhip64],[$extra_cudart_flags]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$HIP_HOME" in /usr|/) HIP_ldflags_guess='$extra_cudart_flags';; *) for HIP_ldflags_guess_dir in "$HIP_HOME/lib${GASNETI_PTR_BITS}" "$HIP_HOME/lib" ''; do test -z "$HIP_ldflags_guess_dir" && break for HIP_ldflags_guess_lib in amdhip64; do for HIP_ldflags_guess_suff in a so sl dylib la dll; do if test -r "$HIP_ldflags_guess_dir/lib$HIP_ldflags_guess_lib.$HIP_ldflags_guess_suff"; then break 3; fi done done done if test -n "$HIP_ldflags_guess_dir"; then HIP_ldflags_guess="-L$HIP_ldflags_guess_dir" # deferred to appear after help for [PREFIX]_LDFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(hip-rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$enable_hip_rpath" in no) : enabled_hip_rpath='' ;; yes) : enabled_hip_rpath="$HIP_ldflags_guess_dir" ;; *) : if test -z "$enabled_hip_rpath"; then if test "x$enabled_rpath" = xyes; then enabled_hip_rpath="$HIP_ldflags_guess_dir" else enabled_hip_rpath='' fi fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(hip-rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -n "$enabled_hip_rpath"; then if test "${cc_rpath_option:+set}" = set; then HIP_ldflags_guess="$HIP_ldflags_guess $cc_rpath_option$enabled_hip_rpath" else warn_missing_rpath="$warn_missing_rpath hip" fi fi HIP_ldflags_guess="${HIP_ldflags_guess} $extra_cudart_flags" else HIP_ldflags_guess='$extra_cudart_flags' fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HIP_LDFLAGS],[$HIP_ldflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HIP_LDFLAGS setting" >&5 $as_echo_n "checking for HIP_LDFLAGS setting... " >&6; } envval_src_HIP_LDFLAGS="cached" if ${gasnet_cv_envvar_HIP_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_HIP_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HIP_LDFLAGS="$HIP_ldflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hipldflags+set}" = "set" ; then gasnet_cv_envvar_HIP_LDFLAGS="${_gasneti_nenv_hipldflags}" envval_src_HIP_LDFLAGS=given elif test "${_gasneti_cenv_hipldflags+set}" = "set" ; then gasnet_cv_envvar_HIP_LDFLAGS="${_gasneti_cenv_hipldflags}" envval_src_HIP_LDFLAGS=conf else gasnet_cv_envvar_HIP_LDFLAGS=$envval_default_HIP_LDFLAGS envval_src_HIP_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HIP_LDFLAGS hipldflags $gasnet_cv_configure_args_norm fi HIP_LDFLAGS="$gasnet_cv_envvar_HIP_LDFLAGS" if test "$HIP_LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HIP_LDFLAGS if test "$envval_src_HIP_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HIP_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HIP_LDFLAGS\"" >&5 $as_echo " \"$HIP_LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HIP_LDFLAGS\"" >&5 $as_echo " (default) \"$HIP_LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HIP_LDFLAGS\"" >&5 $as_echo " (disabled) \"$HIP_LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_LDFLAGS\"" >&5 $as_echo " (provided) \"$HIP_LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HIP_LDFLAGS\"" >&5 $as_echo " (provided) \"$HIP_LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HIP_LDFLAGS. Please configure --with-HIP_LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HIP_LDFLAGS],[$HIP_ldflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) unset HIP_ldflags_guess unset HIP_ldflags_guess_dir unset HIP_ldflags_guess_lib unset HIP_ldflags_guess_suff # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Suppress warnings when compiling gasnet_hip.c and testhip.c # due to "issues" in hip_runtime.h when parsed by a C compiler in # __HIP_PLATFORM_NVCC__ mode. unset HIP_NVCC_WARNFLAGS case "$CC_FAMILY" in Intel) # Deprecated decls: # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${CC_WDFLAG}1478) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${CC_WDFLAG}1478") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${CC_WDFLAG}1478" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${CC_WDFLAG}1478") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${CC_WDFLAG}1478" >&5 $as_echo_n "checking for C compiler flag ${CC_WDFLAG}1478... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS ${CC_WDFLAG}1478" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS ${CC_WDFLAG}1478" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${CC_WDFLAG}1478) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # "auto" becomes implicit int: # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(${CC_WDFLAG}303) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${CC_WDFLAG}303") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS ${CC_WDFLAG}303" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS ${CC_WDFLAG}303") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag ${CC_WDFLAG}303" >&5 $as_echo_n "checking for C compiler flag ${CC_WDFLAG}303... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS ${CC_WDFLAG}303" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS ${CC_WDFLAG}303" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(${CC_WDFLAG}303) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; PGI|NVHPC) : # Currently warning-free, so avoid the noise of the -Wno probes ;; *) # GCC and Clang, plus their derivatives and work-alikes # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-Wno-deprecated-declarations) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wno-deprecated-declarations") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Wno-deprecated-declarations" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wno-deprecated-declarations") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Wno-deprecated-declarations" >&5 $as_echo_n "checking for C compiler flag -Wno-deprecated-declarations... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-Wdeprecated-declarations) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wdeprecated-declarations") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Wdeprecated-declarations" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wdeprecated-declarations") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Wdeprecated-declarations" >&5 $as_echo_n "checking for C compiler flag -Wdeprecated-declarations... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-deprecated-declarations" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-deprecated-declarations" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-Wdeprecated-declarations) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-Wdeprecated-declarations) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wdeprecated-declarations") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Wdeprecated-declarations" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wdeprecated-declarations") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Wdeprecated-declarations" >&5 $as_echo_n "checking for C compiler flag -Wdeprecated-declarations... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-deprecated-declarations" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-deprecated-declarations" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-Wdeprecated-declarations) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-Wno-deprecated-declarations) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-Wno-implicit-int) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wno-implicit-int") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Wno-implicit-int" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wno-implicit-int") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Wno-implicit-int" >&5 $as_echo_n "checking for C compiler flag -Wno-implicit-int... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-Wimplicit-int) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wimplicit-int") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Wimplicit-int" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wimplicit-int") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Wimplicit-int" >&5 $as_echo_n "checking for C compiler flag -Wimplicit-int... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-implicit-int" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-implicit-int" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-Wimplicit-int) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-Wimplicit-int) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wimplicit-int") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Wimplicit-int" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wimplicit-int") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Wimplicit-int" >&5 $as_echo_n "checking for C compiler flag -Wimplicit-int... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-implicit-int" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-implicit-int" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-Wimplicit-int) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-Wno-implicit-int) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-Wno-return-type) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wno-return-type") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Wno-return-type" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wno-return-type") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Wno-return-type" >&5 $as_echo_n "checking for C compiler flag -Wno-return-type... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-Wreturn-type) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wreturn-type") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Wreturn-type" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wreturn-type") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Wreturn-type" >&5 $as_echo_n "checking for C compiler flag -Wreturn-type... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-return-type" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-return-type" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-Wreturn-type) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CFLAG(-Wreturn-type) vvvvvvvvvvvvvvvvvvvvvv (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wreturn-type") vvvvvvvvvvvvvvvvvvvvvv (L:5) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS -Wreturn-type" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS -Wreturn-type") ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler flag -Wreturn-type" >&5 $as_echo_n "checking for C compiler flag -Wreturn-type... " >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-return-type" else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) vvvvvvvvvvvvvvvvvvvvvv (L:7) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 ( $gasnet_compile_cmd ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/warning: $_GASNET_TRY_CFLAG_TMP" >&6; } else : echo "configure: warned program was:" >&5 cat $gasnet_testfile >&5 if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-return-type" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-Wreturn-type) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&5 $as_echo "no/new-warning: $_GASNET_TRY_CFLAG_TMP" >&6; } fi fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 echo echo "configure error: unknown failure case in TRY_CFLAG" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:8) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi else : echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&5 $as_echo "no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" >&6; } # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:7) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:7) fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_RUNCMD($gasnet_compile_cmd,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) rm -f $gasnet_testfile # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CCOMPILE_WITHWARN_NORETRY(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CFLAG(-Wno-return-type) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; esac HIP_LIBS="$HIP_LIBS $CUDA_LIBS" HIP_LDFLAGS="$HIP_LDFLAGS $CUDA_LDFLAGS" HIP_CFLAGS="$HIP_CFLAGS $CUDA_CFLAGS $HIP_NVCC_WARNFLAGS" $as_echo "#define GASNETI_HIP_PLATFORM_NVIDIA 1" >>confdefs.h ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([HIP_LDFLAGS],[HIP_LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) eval gasnet_fn_split_linker_opts HIP_LDFLAGS HIP_LIBS $HIP_LDFLAGS $HIP_LIBS #echo "HIP_LDFLAGS=[$]HIP_LDFLAGS" #echo "HIP_LIBS=[$]HIP_LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([HIP_LDFLAGS],[HIP_LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Try to compile and link a basic program using the HIP Driver API # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $HIP_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $HIP_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $HIP_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $HIP_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $HIP_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $HIP_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $HIP_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $HIP_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $HIP_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working HIP configuration,libamdhip64_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working HIP configuration" >&5 $as_echo_n "checking for working HIP configuration... " >&6; } if ${gasnet_cv_libamdhip64_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if GASNETI_HIP_PLATFORM_NVIDIA #define __HIP_PLATFORM_NVCC__ // legacy #define __HIP_PLATFORM_NVIDIA__ #else #define __HIP_PLATFORM_HCC__ // legacy #define __HIP_PLATFORM_AMD__ #endif #include int main () { void *addr; hipInit(0); hipDevice_t dev = 0; hipPointerAttribute_t attr; hipError_t res; res = hipMalloc(&addr, 1024); res = hipPointerGetAttributes(&attr, addr); #if HIP_VERSION_MAJOR < 6 int bad = (attr.memoryType != hipMemoryTypeDevice) || attr.isManaged; #else int bad = (attr.type != hipMemoryTypeDevice) || attr.isManaged; #endif ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_libamdhip64_works=yes else gasnet_cv_libamdhip64_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_libamdhip64_works" >&5 $as_echo "$gasnet_cv_libamdhip64_works" >&6; } if test "$gasnet_cv_libamdhip64_works" = yes; then : : else : have_mk_hip=no; if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working HIP configuration,libamdhip64_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # If the probe(s) above passed on a target identified as "maybe" having # support, then upgrade to "yes" with a warning. if test "$have_mk_hip" = "maybe"; then have_mk_hip=yes # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HIP memory kinds support enabled for $target, which may not be officially supported" >&5 $as_echo "$as_me: WARNING: HIP memory kinds support enabled for $target, which may not be officially supported" >&2;} echo "HIP memory kinds support enabled for $target, which may not be officially supported" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$have_mk_hip" = "yes"; then $as_echo "#define GASNETI_MK_CLASS_HIP_ENABLED 1" >>confdefs.h elif test "$force_mk_hip" = "yes"; then echo echo "configure error: HIP memory kinds support was requested with --enable-kind-hip but is not available" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else unset HIP_CFLAGS unset HIP_LDFLAGS unset HIP_LIBS fi fi if test "$have_mk_hip" = "yes"; then HAVE_MK_CLASS_HIP_TRUE= HAVE_MK_CLASS_HIP_FALSE='#' else HAVE_MK_CLASS_HIP_TRUE='#' HAVE_MK_CLASS_HIP_FALSE= fi # GEX_MK_CLASS_ZE enable_mk_ze_implicit=no # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(kind-ze,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-kind-ze was given. if test "${enable_kind_ze+set}" = set; then : enableval=$enable_kind_ze; fi case "$enable_kind_ze" in no) : enable_mk_ze="no" ;; yes) : enable_mk_ze="yes"; force_mk_ze="yes" ;; *) : if test "x$enable_kind_ze" = 'xprobe'; then enable_mk_ze="probe" elif test "$GASNETI_PTR_BITS" = 32; then enable_mk_ze="no" else enable_mk_ze="$enable_mk_default" enable_mk_ze_implicit=yes fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(kind-ze,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) unset have_mk_ze if test "$enable_mk_ze" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target having Level Zero memory kinds support" >&5 $as_echo_n "checking for target having Level Zero memory kinds support... " >&6; } if test "$GASNETI_PTR_BITS" = 32; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (32-bit targets are not supported)" >&5 $as_echo "no (32-bit targets are not supported)" >&6; } have_mk_ze=no else have_mk_ze=no case "$target_cpu:$target_os" in x86_64:linux*) have_mk_ze='yes';; esac if test "$have_mk_ze" = 'no'; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (unsupported or unrecognized target $target)" >&5 $as_echo "no (unsupported or unrecognized target $target)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mk_ze" >&5 $as_echo "$have_mk_ze" >&6; } fi fi if test "$have_mk_ze" != "no"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_HOME(ZE,oneAPI Level Zero,ocloc,/usr/local,include/level_zero/ze_api.h) vvvvvvvvvvvvvvvvvvvvvv (L:4) ZE_guess= for ac_prog in ocloc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ZE_guess_prog+:} false; then : $as_echo_n "(cached) " >&6 else case $ZE_guess_prog in [\\/]* | ?:[\\/]*) ac_cv_path_ZE_guess_prog="$ZE_guess_prog" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ZE_guess_prog="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ZE_guess_prog=$ac_cv_path_ZE_guess_prog if test -n "$ZE_guess_prog"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZE_guess_prog" >&5 $as_echo "$ZE_guess_prog" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ZE_guess_prog" && break done if test -n "$ZE_guess_prog"; then ZE_guess=`dirname \`dirname $ZE_guess_prog\`` fi if test -z "$ZE_guess" ; then for ZE_guess_file in "include/level_zero/ze_api.h" "."; do for ZE_guess in /usr/local /usr; do if test -r "$ZE_guess/$ZE_guess_file" ; then break 2 fi done done unset ZE_guess_file fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([ZE_HOME],[$ZE_guess],[Install prefix of oneAPI Level Zero (auto-detected from PATH)]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-ze-home was given. if test "${with_ze_home+set}" = set; then : withval=$with_ze_home; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZE_HOME setting" >&5 $as_echo_n "checking for ZE_HOME setting... " >&6; } envval_src_ZE_HOME="cached" if ${gasnet_cv_envvar_ZE_HOME+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_ZE_HOME="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_ZE_HOME="$ZE_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_zehome+set}" = "set" ; then gasnet_cv_envvar_ZE_HOME="${_gasneti_nenv_zehome}" envval_src_ZE_HOME=given elif test "${_gasneti_cenv_zehome+set}" = "set" ; then gasnet_cv_envvar_ZE_HOME="${_gasneti_cenv_zehome}" envval_src_ZE_HOME=conf else gasnet_cv_envvar_ZE_HOME=$envval_default_ZE_HOME envval_src_ZE_HOME=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper ZE_HOME zehome $gasnet_cv_configure_args_norm fi ZE_HOME="$gasnet_cv_envvar_ZE_HOME" if test "$ZE_HOME" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset ZE_HOME if test "$envval_src_ZE_HOME" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_ZE_HOME" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$ZE_HOME\"" >&5 $as_echo " \"$ZE_HOME\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$ZE_HOME\"" >&5 $as_echo " (default) \"$ZE_HOME\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$ZE_HOME\"" >&5 $as_echo " (disabled) \"$ZE_HOME\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$ZE_HOME\"" >&5 $as_echo " (provided) \"$ZE_HOME\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$ZE_HOME\"" >&5 $as_echo " (provided) \"$ZE_HOME\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$ZE_HOME. Please configure --with-ZE_HOME=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([ZE_HOME],[$ZE_guess],[Install prefix of oneAPI Level Zero (auto-detected from PATH)]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $ZE_HOME is the oneAPI Level Zero install prefix" >&5 $as_echo_n "checking if $ZE_HOME is the oneAPI Level Zero install prefix... " >&6; } ZE_HOME_good=no if test -r "$ZE_HOME/include/level_zero/ze_api.h"; then ZE_HOME_good=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test $ZE_HOME_good = no && test -n "$ZE_guess_prog"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_FOLLOWLINKS(ZE_guess_prog) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_fl_file="$ZE_guess_prog" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` while test "$gasnet_fl_link"; do gasnet_fl_file="$gasnet_fl_link" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` done ZE_guess_prog="$gasnet_fl_file" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FOLLOWLINKS(ZE_guess_prog) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) ZE_HOME_tmp=`dirname \`dirname $ZE_guess_prog\`` if test -r "$ZE_HOME_tmp/include/level_zero/ze_api.h"; then ZE_HOME_good=yes ZE_HOME="$ZE_HOME_tmp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - followed symlink to $ZE_HOME" >&5 $as_echo "no - followed symlink to $ZE_HOME" >&6; } fi unset ZE_HOME_tmp fi if test $ZE_HOME_good = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: probably not - missing include/level_zero/ze_api.h" >&5 $as_echo "probably not - missing include/level_zero/ze_api.h" >&6; } fi unset ZE_HOME_good unset ZE_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_CFLAGS([ZE]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$ZE_HOME" in /usr|/) ZE_cflags_guess='';; *) if test -d "$ZE_HOME/include/."; then ZE_cflags_guess="-I$ZE_HOME/include" else ZE_cflags_guess='' fi;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([ZE_CFLAGS],[$ZE_cflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-ze-cflags was given. if test "${with_ze_cflags+set}" = set; then : withval=$with_ze_cflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZE_CFLAGS setting" >&5 $as_echo_n "checking for ZE_CFLAGS setting... " >&6; } envval_src_ZE_CFLAGS="cached" if ${gasnet_cv_envvar_ZE_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_ZE_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_ZE_CFLAGS="$ZE_cflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_zecflags+set}" = "set" ; then gasnet_cv_envvar_ZE_CFLAGS="${_gasneti_nenv_zecflags}" envval_src_ZE_CFLAGS=given elif test "${_gasneti_cenv_zecflags+set}" = "set" ; then gasnet_cv_envvar_ZE_CFLAGS="${_gasneti_cenv_zecflags}" envval_src_ZE_CFLAGS=conf else gasnet_cv_envvar_ZE_CFLAGS=$envval_default_ZE_CFLAGS envval_src_ZE_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper ZE_CFLAGS zecflags $gasnet_cv_configure_args_norm fi ZE_CFLAGS="$gasnet_cv_envvar_ZE_CFLAGS" if test "$ZE_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset ZE_CFLAGS if test "$envval_src_ZE_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_ZE_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$ZE_CFLAGS\"" >&5 $as_echo " \"$ZE_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$ZE_CFLAGS\"" >&5 $as_echo " (default) \"$ZE_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$ZE_CFLAGS\"" >&5 $as_echo " (disabled) \"$ZE_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$ZE_CFLAGS\"" >&5 $as_echo " (provided) \"$ZE_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$ZE_CFLAGS\"" >&5 $as_echo " (provided) \"$ZE_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$ZE_CFLAGS. Please configure --with-ZE_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([ZE_CFLAGS],[$ZE_cflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) unset ZE_cflags_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([ZE_LIBS],[-lze_loader]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-ze-libs was given. if test "${with_ze_libs+set}" = set; then : withval=$with_ze_libs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZE_LIBS setting" >&5 $as_echo_n "checking for ZE_LIBS setting... " >&6; } envval_src_ZE_LIBS="cached" if ${gasnet_cv_envvar_ZE_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_ZE_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_ZE_LIBS="-lze_loader" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_zelibs+set}" = "set" ; then gasnet_cv_envvar_ZE_LIBS="${_gasneti_nenv_zelibs}" envval_src_ZE_LIBS=given elif test "${_gasneti_cenv_zelibs+set}" = "set" ; then gasnet_cv_envvar_ZE_LIBS="${_gasneti_cenv_zelibs}" envval_src_ZE_LIBS=conf else gasnet_cv_envvar_ZE_LIBS=$envval_default_ZE_LIBS envval_src_ZE_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper ZE_LIBS zelibs $gasnet_cv_configure_args_norm fi ZE_LIBS="$gasnet_cv_envvar_ZE_LIBS" if test "$ZE_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset ZE_LIBS if test "$envval_src_ZE_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_ZE_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$ZE_LIBS\"" >&5 $as_echo " \"$ZE_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$ZE_LIBS\"" >&5 $as_echo " (default) \"$ZE_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$ZE_LIBS\"" >&5 $as_echo " (disabled) \"$ZE_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$ZE_LIBS\"" >&5 $as_echo " (provided) \"$ZE_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$ZE_LIBS\"" >&5 $as_echo " (provided) \"$ZE_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$ZE_LIBS. Please configure --with-ZE_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([ZE_LIBS],[-lze_loader]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_LDFLAGS([ZE],[ze_loader]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$ZE_HOME" in /usr|/) ZE_ldflags_guess='';; *) for ZE_ldflags_guess_dir in "$ZE_HOME/lib${GASNETI_PTR_BITS}" "$ZE_HOME/lib" ''; do test -z "$ZE_ldflags_guess_dir" && break for ZE_ldflags_guess_lib in ze_loader; do for ZE_ldflags_guess_suff in a so sl dylib la dll; do if test -r "$ZE_ldflags_guess_dir/lib$ZE_ldflags_guess_lib.$ZE_ldflags_guess_suff"; then break 3; fi done done done if test -n "$ZE_ldflags_guess_dir"; then ZE_ldflags_guess="-L$ZE_ldflags_guess_dir" # deferred to appear after help for [PREFIX]_LDFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(ze-rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$enable_ze_rpath" in no) : enabled_ze_rpath='' ;; yes) : enabled_ze_rpath="$ZE_ldflags_guess_dir" ;; *) : if test -z "$enabled_ze_rpath"; then if test "x$enabled_rpath" = xyes; then enabled_ze_rpath="$ZE_ldflags_guess_dir" else enabled_ze_rpath='' fi fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(ze-rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -n "$enabled_ze_rpath"; then if test "${cc_rpath_option:+set}" = set; then ZE_ldflags_guess="$ZE_ldflags_guess $cc_rpath_option$enabled_ze_rpath" else warn_missing_rpath="$warn_missing_rpath ze" fi fi ZE_ldflags_guess="${ZE_ldflags_guess}" else ZE_ldflags_guess='' fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([ZE_LDFLAGS],[$ZE_ldflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-ze-ldflags was given. if test "${with_ze_ldflags+set}" = set; then : withval=$with_ze_ldflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZE_LDFLAGS setting" >&5 $as_echo_n "checking for ZE_LDFLAGS setting... " >&6; } envval_src_ZE_LDFLAGS="cached" if ${gasnet_cv_envvar_ZE_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_ZE_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_ZE_LDFLAGS="$ZE_ldflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_zeldflags+set}" = "set" ; then gasnet_cv_envvar_ZE_LDFLAGS="${_gasneti_nenv_zeldflags}" envval_src_ZE_LDFLAGS=given elif test "${_gasneti_cenv_zeldflags+set}" = "set" ; then gasnet_cv_envvar_ZE_LDFLAGS="${_gasneti_cenv_zeldflags}" envval_src_ZE_LDFLAGS=conf else gasnet_cv_envvar_ZE_LDFLAGS=$envval_default_ZE_LDFLAGS envval_src_ZE_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper ZE_LDFLAGS zeldflags $gasnet_cv_configure_args_norm fi ZE_LDFLAGS="$gasnet_cv_envvar_ZE_LDFLAGS" if test "$ZE_LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset ZE_LDFLAGS if test "$envval_src_ZE_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_ZE_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$ZE_LDFLAGS\"" >&5 $as_echo " \"$ZE_LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$ZE_LDFLAGS\"" >&5 $as_echo " (default) \"$ZE_LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$ZE_LDFLAGS\"" >&5 $as_echo " (disabled) \"$ZE_LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$ZE_LDFLAGS\"" >&5 $as_echo " (provided) \"$ZE_LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$ZE_LDFLAGS\"" >&5 $as_echo " (provided) \"$ZE_LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$ZE_LDFLAGS. Please configure --with-ZE_LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([ZE_LDFLAGS],[$ZE_ldflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # Check whether --enable-ze-rpath was given. if test "${enable_ze_rpath+set}" = set; then : enableval=$enable_ze_rpath; fi unset ZE_ldflags_guess unset ZE_ldflags_guess_dir unset ZE_ldflags_guess_lib unset ZE_ldflags_guess_suff # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([ZE],[ZE_LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) eval gasnet_fn_split_linker_opts ZE ZE_LIBS $ZE $ZE_LIBS #echo "ZE=[$]ZE" #echo "ZE_LIBS=[$]ZE_LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([ZE],[ZE_LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Try to compile and link a basic program using the ZE APIs # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $ZE_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $ZE_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $ZE_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $ZE_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $ZE_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $ZE_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $ZE_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $ZE_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $ZE_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for working oneAPI Level Zero configuration,ze_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working oneAPI Level Zero configuration" >&5 $as_echo_n "checking for working oneAPI Level Zero configuration... " >&6; } if ${gasnet_cv_ze_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ze_result_t res = zeInit(0); uint32_t count = 0; ze_driver_handle_t driver = NULL; (void) zeDriverGet(&count, &driver); ze_device_handle_t device = NULL; (void) zeDeviceGet(driver, &count, &device); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_ze_works=yes else gasnet_cv_ze_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ze_works" >&5 $as_echo "$gasnet_cv_ze_works" >&6; } if test "$gasnet_cv_ze_works" = yes; then : : else : have_mk_ze=no; if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for working oneAPI Level Zero configuration,ze_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$have_mk_ze" = "yes"; then $as_echo "#define GASNETI_MK_CLASS_ZE_ENABLED 1" >>confdefs.h # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: oneAPI Level Zero memory kinds support has been enabled. This support is experimental and may have performance and correctness bugs." >&5 $as_echo "$as_me: WARNING: oneAPI Level Zero memory kinds support has been enabled. This support is experimental and may have performance and correctness bugs." >&2;} echo " oneAPI Level Zero memory kinds support has been enabled. This support is experimental and may have performance and correctness bugs." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) elif test "$force_mk_ze" = "yes"; then echo echo "configure error: oneAPI Level Zero memory kinds support was requested with --enable-kind-ze but is not available" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 else unset ZE_CFLAGS unset ZE_LDFLAGS unset ZE_LIBS fi fi if test "$have_mk_ze" = "yes"; then HAVE_MK_CLASS_ZE_TRUE= HAVE_MK_CLASS_ZE_FALSE='#' else HAVE_MK_CLASS_ZE_TRUE='#' HAVE_MK_CLASS_ZE_FALSE= fi if test "x$enable_memory_kinds$have_mk_cuda_uva$have_mk_hip$have_mk_ze" = "xforcenonono"; then echo echo "configure error: Memory kinds support enabled with --enable-memory-kinds=force, but no supported memory kind was found" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi cat >>$CONDUIT_LIST <> $CONDUIT_LIST if test "$have_mk_hip" = "yes"; then if test "$force_mk_hip" = "yes"; then _mk_flagstr="ON (enabled)" else _mk_flagstr="ON (auto)" fi elif test "$enable_mk_hip" = "probe"; then _mk_flagstr="OFF (not found)" elif test "$enable_mk_hip_implicit" = "yes"; then _mk_flagstr="OFF (not enabled)" else _mk_flagstr="OFF (disabled)" fi echo " GPUs with AMD HIP API (hip) $_mk_flagstr" >> $CONDUIT_LIST if test "$have_mk_ze" = "yes"; then if test "$force_mk_ze" = "yes"; then _mk_flagstr="ON (enabled)" else _mk_flagstr="ON (auto)" fi elif test "$enable_mk_ze" = "probe"; then _mk_flagstr="OFF (not found)" elif test "$enable_mk_ze_implicit" = "yes"; then _mk_flagstr="OFF (not enabled)" else _mk_flagstr="OFF (disabled)" fi echo " GPUs with Intel oneAPI *EXPERIMENTAL* (ze) $_mk_flagstr" >> $CONDUIT_LIST ######################################################################## # Runtime Var Arrays #GASNET_IF_ENABLED_WITH_AUTO(vararray, Use stack arrays of variable size in code, #AC_DEFINE(VARARRAY_WORKS), #, #GASNET_TRY_CACHE_CHECK(for variable stack arrays, cc_vararray_mod, # [void dummy(int x) { char y[x]; }], [], # AC_DEFINE(VARARRAY_WORKS))) ######################################################################## # different high-precision sleep libraries # Check for usleep # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for usleep(),cc_has_usleep,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usleep()" >&5 $as_echo_n "checking for usleep()... " >&6; } if ${gasnet_cv_cc_has_usleep+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { usleep(500); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_has_usleep=yes else gasnet_cv_cc_has_usleep=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_usleep" >&5 $as_echo "$gasnet_cv_cc_has_usleep" >&6; } if test "$gasnet_cv_cc_has_usleep" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing usleep" >&5 $as_echo_n "checking for library containing usleep... " >&6; } if ${ac_cv_search_usleep+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char usleep (); int main () { return usleep (); ; return 0; } _ACEOF for ac_lib in '' posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_usleep=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_usleep+:} false; then : break fi done if ${ac_cv_search_usleep+:} false; then : else ac_cv_search_usleep=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_usleep" >&5 $as_echo "$ac_cv_search_usleep" >&6; } ac_res=$ac_cv_search_usleep if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_USLEEP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: entry point not found - disabled" >&5 $as_echo "entry point not found - disabled" >&6; } fi else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for usleep(),cc_has_usleep,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Check for nanosleep # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for nanosleep(),cc_has_nanosleep,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep()" >&5 $as_echo_n "checking for nanosleep()... " >&6; } if ${gasnet_cv_cc_has_nanosleep+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct timespec tm, tmremaining; tm.tv_sec =1; tm.tv_nsec = 1000000; nanosleep(&tm, &tmremaining); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_has_nanosleep=yes else gasnet_cv_cc_has_nanosleep=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_nanosleep" >&5 $as_echo "$gasnet_cv_cc_has_nanosleep" >&6; } if test "$gasnet_cv_cc_has_nanosleep" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5 $as_echo_n "checking for library containing nanosleep... " >&6; } if ${ac_cv_search_nanosleep+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char nanosleep (); int main () { return nanosleep (); ; return 0; } _ACEOF for ac_lib in '' posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_nanosleep=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_nanosleep+:} false; then : break fi done if ${ac_cv_search_nanosleep+:} false; then : else ac_cv_search_nanosleep=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5 $as_echo "$ac_cv_search_nanosleep" >&6; } ac_res=$ac_cv_search_nanosleep if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: entry point not found - disabled" >&5 $as_echo "entry point not found - disabled" >&6; } fi else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for nanosleep(),cc_has_nanosleep,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Check for clock_nanosleep # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for clock_nanosleep(),cc_has_clock_nanosleep,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_nanosleep()" >&5 $as_echo_n "checking for clock_nanosleep()... " >&6; } if ${gasnet_cv_cc_has_clock_nanosleep+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct timespec tm, tmremaining; tm.tv_sec = 1; tm.tv_nsec = 1000000; clock_nanosleep(CLOCK_REALTIME, 0, &tm, &tmremaining); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_has_clock_nanosleep=yes else gasnet_cv_cc_has_clock_nanosleep=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_clock_nanosleep" >&5 $as_echo "$gasnet_cv_cc_has_clock_nanosleep" >&6; } if test "$gasnet_cv_cc_has_clock_nanosleep" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_nanosleep" >&5 $as_echo_n "checking for library containing clock_nanosleep... " >&6; } if ${ac_cv_search_clock_nanosleep+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_nanosleep (); int main () { return clock_nanosleep (); ; return 0; } _ACEOF for ac_lib in '' rt posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_nanosleep=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_nanosleep+:} false; then : break fi done if ${ac_cv_search_clock_nanosleep+:} false; then : else ac_cv_search_clock_nanosleep=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_nanosleep" >&5 $as_echo "$ac_cv_search_clock_nanosleep" >&6; } ac_res=$ac_cv_search_clock_nanosleep if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: entry point not found - disabled" >&5 $as_echo "entry point not found - disabled" >&6; } fi else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for clock_nanosleep(),cc_has_clock_nanosleep,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Check for nsleep # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for nsleep(),cc_has_nsleep,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nsleep()" >&5 $as_echo_n "checking for nsleep()... " >&6; } if ${gasnet_cv_cc_has_nsleep+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct timespec tm, tmremaining; tm.tv_sec =1; tm.tv_nsec = 1000000; nsleep(&tm, &tmremaining); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_has_nsleep=yes else gasnet_cv_cc_has_nsleep=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_nsleep" >&5 $as_echo "$gasnet_cv_cc_has_nsleep" >&6; } if test "$gasnet_cv_cc_has_nsleep" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nsleep" >&5 $as_echo_n "checking for library containing nsleep... " >&6; } if ${ac_cv_search_nsleep+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char nsleep (); int main () { return nsleep (); ; return 0; } _ACEOF for ac_lib in '' posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_nsleep=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_nsleep+:} false; then : break fi done if ${ac_cv_search_nsleep+:} false; then : else ac_cv_search_nsleep=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nsleep" >&5 $as_echo "$ac_cv_search_nsleep" >&6; } ac_res=$ac_cv_search_nsleep if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_NSLEEP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: entry point not found - disabled" >&5 $as_echo "entry point not found - disabled" >&6; } fi else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for nsleep(),cc_has_nsleep,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Check for sched_yield # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for sched_yield(),cc_has_sched_yield,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield()" >&5 $as_echo_n "checking for sched_yield()... " >&6; } if ${gasnet_cv_cc_has_sched_yield+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { sched_yield(); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_has_sched_yield=yes else gasnet_cv_cc_has_sched_yield=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_sched_yield" >&5 $as_echo "$gasnet_cv_cc_has_sched_yield" >&6; } if test "$gasnet_cv_cc_has_sched_yield" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5 $as_echo_n "checking for library containing sched_yield... " >&6; } if ${ac_cv_search_sched_yield+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sched_yield (); int main () { return sched_yield (); ; return 0; } _ACEOF for ac_lib in '' posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sched_yield=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sched_yield+:} false; then : break fi done if ${ac_cv_search_sched_yield+:} false; then : else ac_cv_search_sched_yield=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5 $as_echo "$ac_cv_search_sched_yield" >&6; } ac_res=$ac_cv_search_sched_yield if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: entry point not found - disabled" >&5 $as_echo "entry point not found - disabled" >&6; } fi else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for sched_yield(),cc_has_sched_yield,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Check for sigaction() *and* a definition of the SA_RESTART flag # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_CHECK(for SA_RESTART,cc_has_sa_restart,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SA_RESTART" >&5 $as_echo_n "checking for SA_RESTART... " >&6; } if ${gasnet_cv_cc_has_sa_restart+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct sigaction act; act.sa_flags = SA_RESTART; int rc = sigaction(SIGTERM, &act, NULL); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gasnet_cv_cc_has_sa_restart=yes else gasnet_cv_cc_has_sa_restart=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_sa_restart" >&5 $as_echo "$gasnet_cv_cc_has_sa_restart" >&6; } if test "$gasnet_cv_cc_has_sa_restart" = yes; then : $as_echo "#define GASNETI_HAVE_SA_RESTART 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_CHECK(for SA_RESTART,cc_has_sa_restart,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # timer setup case "$target_os" in freebsd* | netbsd*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysctl machdep.tsc_freq" >&5 $as_echo_n "checking for sysctl machdep.tsc_freq... " >&6; } res="`/sbin/sysctl -n machdep.tsc_freq 2> /dev/null`" if test "$res" != "" -a "$res" != 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: $res" >&5 $as_echo "yes: $res" >&6; } $as_echo "#define GASNETI_HAVE_SYSCTL_MACHDEP_TSC_FREQ 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; esac # PLPA enabled_plpa="no" if test "$cross_compiling" = "no" ; then case "$target_os" in linux*) if test "$GASNET_PLATFORM" = "wsl" ; then enabled_plpa="no" else enabled_plpa="yes" fi ;; esac else case "$target" in x86_64-cnl-linux*) enabled_plpa="yes";; esac fi if test "$enabled_plpa" = "yes"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(plpa,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-plpa was given. if test "${enable_plpa+set}" = set; then : enableval=$enable_plpa; fi case "$enable_plpa" in no) : enabled_plpa="no - user disabled" ;; yes) : enabled_plpa="yes"; force_plpa="yes" ;; *) : enabled_plpa="yes" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(plpa,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$enabled_plpa" = yes; then # Included mode, or standalone? if test "$enable_included_mode" = "yes"; then plpa_mode=included else plpa_mode=standalone fi # Change the symbol prefix? if test "$with_plpa_symbol_prefix" = ""; then plpa_symbol_prefix_value=plpa_ else plpa_symbol_prefix_value=$with_plpa_symbol_prefix fi plpa_symbol_prefix_value=gasneti_plpa_ # Check for syscall() ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall" if test "x$ac_cv_func_syscall" = xyes; then : happy=1 else happy=0 fi # Look for syscall.h if test "$happy" = 1; then ac_fn_c_check_header_mongrel "$LINENO" "syscall.h" "ac_cv_header_syscall_h" "$ac_includes_default" if test "x$ac_cv_header_syscall_h" = xyes; then : happy=1 else happy=0 fi fi # Look for unistd.h if test "$happy" = 1; then ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : happy=1 else happy=0 fi fi # Check for __NR_sched_setaffinity if test "$happy" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __NR_sched_setaffinity" >&5 $as_echo_n "checking for __NR_sched_setaffinity... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #ifndef __NR_sched_setaffinity #error __NR_sched_setaffinity_not found! #endif int i = 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } happy=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } happy=0 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # Check for __NR_sched_getaffinity (probably overkill, but what # the heck?) if test "$happy" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __NR_sched_getaffinity" >&5 $as_echo_n "checking for __NR_sched_getaffinity... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #ifndef __NR_sched_getaffinity #error __NR_sched_getaffinity_not found! #endif int i = 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } happy=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } happy=0 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi # If all was good, do the real init if test "$happy" = 1; then # Are we building as standalone or included? { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PLPA building mode" >&5 $as_echo_n "checking for PLPA building mode... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plpa_mode" >&5 $as_echo "$plpa_mode" >&6; } # What prefix are we using? { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PLPA symbol prefix" >&5 $as_echo_n "checking for PLPA symbol prefix... " >&6; } cat >>confdefs.h <<_ACEOF #define PLPA_SYM_PREFIX $plpa_symbol_prefix_value _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plpa_symbol_prefix_value" >&5 $as_echo "$plpa_symbol_prefix_value" >&6; } # Success enabled_plpa="yes" else enabled_plpa="no - probe failed" : # in case enabled_plpa="no - probe failed" is empty. fi # Cleanup unset happy fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use PLPA for cpu binding" >&5 $as_echo_n "checking whether to use PLPA for cpu binding... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enabled_plpa" >&5 $as_echo "$enabled_plpa" >&6; } if test "$enabled_plpa" = yes; then $as_echo "#define HAVE_PLPA 1" >>confdefs.h elif test "$force_plpa" = yes; then as_fn_error $? "User requested --enable-plpa but PLPA is not supported on your system" "$LINENO" 5 fi fi if test "$enabled_plpa" = "yes"; then USE_PLPA_TRUE= USE_PLPA_FALSE='#' else USE_PLPA_TRUE='#' USE_PLPA_FALSE= fi # HWLOC header and library # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(hwloc,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-hwloc was given. if test "${enable_hwloc+set}" = set; then : enableval=$enable_hwloc; fi case "$enable_hwloc" in no) : enabled_hwloc_lib=no ;; yes) : enabled_hwloc_lib=yes ;; *) : enabled_hwloc_lib=probe ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(hwloc,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) have_hwloc_lib=no if test "$enabled_hwloc_lib" != no; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_HOME(HWLOC,hwloc,hwloc-info,/usr/local,include/hwloc.h) vvvvvvvvvvvvvvvvvvvvvv (L:4) HWLOC_guess= for ac_prog in hwloc-info do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_HWLOC_guess_prog+:} false; then : $as_echo_n "(cached) " >&6 else case $HWLOC_guess_prog in [\\/]* | ?:[\\/]*) ac_cv_path_HWLOC_guess_prog="$HWLOC_guess_prog" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_HWLOC_guess_prog="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi HWLOC_guess_prog=$ac_cv_path_HWLOC_guess_prog if test -n "$HWLOC_guess_prog"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HWLOC_guess_prog" >&5 $as_echo "$HWLOC_guess_prog" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$HWLOC_guess_prog" && break done if test -n "$HWLOC_guess_prog"; then HWLOC_guess=`dirname \`dirname $HWLOC_guess_prog\`` fi if test -z "$HWLOC_guess" ; then for HWLOC_guess_file in "include/hwloc.h" "."; do for HWLOC_guess in /usr/local /usr; do if test -r "$HWLOC_guess/$HWLOC_guess_file" ; then break 2 fi done done unset HWLOC_guess_file fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HWLOC_HOME],[$HWLOC_guess],[Install prefix of hwloc (auto-detected from PATH)]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-hwloc-home was given. if test "${with_hwloc_home+set}" = set; then : withval=$with_hwloc_home; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HWLOC_HOME setting" >&5 $as_echo_n "checking for HWLOC_HOME setting... " >&6; } envval_src_HWLOC_HOME="cached" if ${gasnet_cv_envvar_HWLOC_HOME+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_HWLOC_HOME="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HWLOC_HOME="$HWLOC_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hwlochome+set}" = "set" ; then gasnet_cv_envvar_HWLOC_HOME="${_gasneti_nenv_hwlochome}" envval_src_HWLOC_HOME=given elif test "${_gasneti_cenv_hwlochome+set}" = "set" ; then gasnet_cv_envvar_HWLOC_HOME="${_gasneti_cenv_hwlochome}" envval_src_HWLOC_HOME=conf else gasnet_cv_envvar_HWLOC_HOME=$envval_default_HWLOC_HOME envval_src_HWLOC_HOME=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HWLOC_HOME hwlochome $gasnet_cv_configure_args_norm fi HWLOC_HOME="$gasnet_cv_envvar_HWLOC_HOME" if test "$HWLOC_HOME" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HWLOC_HOME if test "$envval_src_HWLOC_HOME" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HWLOC_HOME" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HWLOC_HOME\"" >&5 $as_echo " \"$HWLOC_HOME\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HWLOC_HOME\"" >&5 $as_echo " (default) \"$HWLOC_HOME\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HWLOC_HOME\"" >&5 $as_echo " (disabled) \"$HWLOC_HOME\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HWLOC_HOME\"" >&5 $as_echo " (provided) \"$HWLOC_HOME\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HWLOC_HOME\"" >&5 $as_echo " (provided) \"$HWLOC_HOME\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HWLOC_HOME. Please configure --with-HWLOC_HOME=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HWLOC_HOME],[$HWLOC_guess],[Install prefix of hwloc (auto-detected from PATH)]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $HWLOC_HOME is the hwloc install prefix" >&5 $as_echo_n "checking if $HWLOC_HOME is the hwloc install prefix... " >&6; } HWLOC_HOME_good=no if test -r "$HWLOC_HOME/include/hwloc.h"; then HWLOC_HOME_good=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test $HWLOC_HOME_good = no && test -n "$HWLOC_guess_prog"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_FOLLOWLINKS(HWLOC_guess_prog) vvvvvvvvvvvvvvvvvvvvvv (L:5) gasnet_fl_file="$HWLOC_guess_prog" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` while test "$gasnet_fl_link"; do gasnet_fl_file="$gasnet_fl_link" gasnet_fl_link=`/bin/ls -al "$gasnet_fl_file" | $AWK 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` done HWLOC_guess_prog="$gasnet_fl_file" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FOLLOWLINKS(HWLOC_guess_prog) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) HWLOC_HOME_tmp=`dirname \`dirname $HWLOC_guess_prog\`` if test -r "$HWLOC_HOME_tmp/include/hwloc.h"; then HWLOC_HOME_good=yes HWLOC_HOME="$HWLOC_HOME_tmp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - followed symlink to $HWLOC_HOME" >&5 $as_echo "no - followed symlink to $HWLOC_HOME" >&6; } fi unset HWLOC_HOME_tmp fi if test $HWLOC_HOME_good = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: probably not - missing include/hwloc.h" >&5 $as_echo "probably not - missing include/hwloc.h" >&6; } fi unset HWLOC_HOME_good unset HWLOC_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_HOME ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_CFLAGS([HWLOC]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$HWLOC_HOME" in /usr|/) HWLOC_cflags_guess='';; *) if test -d "$HWLOC_HOME/include/."; then HWLOC_cflags_guess="-I$HWLOC_HOME/include" else HWLOC_cflags_guess='' fi;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HWLOC_CFLAGS],[$HWLOC_cflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-hwloc-cflags was given. if test "${with_hwloc_cflags+set}" = set; then : withval=$with_hwloc_cflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HWLOC_CFLAGS setting" >&5 $as_echo_n "checking for HWLOC_CFLAGS setting... " >&6; } envval_src_HWLOC_CFLAGS="cached" if ${gasnet_cv_envvar_HWLOC_CFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_HWLOC_CFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HWLOC_CFLAGS="$HWLOC_cflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hwloccflags+set}" = "set" ; then gasnet_cv_envvar_HWLOC_CFLAGS="${_gasneti_nenv_hwloccflags}" envval_src_HWLOC_CFLAGS=given elif test "${_gasneti_cenv_hwloccflags+set}" = "set" ; then gasnet_cv_envvar_HWLOC_CFLAGS="${_gasneti_cenv_hwloccflags}" envval_src_HWLOC_CFLAGS=conf else gasnet_cv_envvar_HWLOC_CFLAGS=$envval_default_HWLOC_CFLAGS envval_src_HWLOC_CFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HWLOC_CFLAGS hwloccflags $gasnet_cv_configure_args_norm fi HWLOC_CFLAGS="$gasnet_cv_envvar_HWLOC_CFLAGS" if test "$HWLOC_CFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HWLOC_CFLAGS if test "$envval_src_HWLOC_CFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HWLOC_CFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HWLOC_CFLAGS\"" >&5 $as_echo " \"$HWLOC_CFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HWLOC_CFLAGS\"" >&5 $as_echo " (default) \"$HWLOC_CFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HWLOC_CFLAGS\"" >&5 $as_echo " (disabled) \"$HWLOC_CFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HWLOC_CFLAGS\"" >&5 $as_echo " (provided) \"$HWLOC_CFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HWLOC_CFLAGS\"" >&5 $as_echo " (provided) \"$HWLOC_CFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HWLOC_CFLAGS. Please configure --with-HWLOC_CFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HWLOC_CFLAGS],[$HWLOC_cflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) unset HWLOC_cflags_guess # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_CFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HWLOC_LIBS],[-lhwloc]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-hwloc-libs was given. if test "${with_hwloc_libs+set}" = set; then : withval=$with_hwloc_libs; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HWLOC_LIBS setting" >&5 $as_echo_n "checking for HWLOC_LIBS setting... " >&6; } envval_src_HWLOC_LIBS="cached" if ${gasnet_cv_envvar_HWLOC_LIBS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_HWLOC_LIBS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HWLOC_LIBS="-lhwloc" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hwloclibs+set}" = "set" ; then gasnet_cv_envvar_HWLOC_LIBS="${_gasneti_nenv_hwloclibs}" envval_src_HWLOC_LIBS=given elif test "${_gasneti_cenv_hwloclibs+set}" = "set" ; then gasnet_cv_envvar_HWLOC_LIBS="${_gasneti_cenv_hwloclibs}" envval_src_HWLOC_LIBS=conf else gasnet_cv_envvar_HWLOC_LIBS=$envval_default_HWLOC_LIBS envval_src_HWLOC_LIBS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HWLOC_LIBS hwloclibs $gasnet_cv_configure_args_norm fi HWLOC_LIBS="$gasnet_cv_envvar_HWLOC_LIBS" if test "$HWLOC_LIBS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HWLOC_LIBS if test "$envval_src_HWLOC_LIBS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HWLOC_LIBS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HWLOC_LIBS\"" >&5 $as_echo " \"$HWLOC_LIBS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HWLOC_LIBS\"" >&5 $as_echo " (default) \"$HWLOC_LIBS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HWLOC_LIBS\"" >&5 $as_echo " (disabled) \"$HWLOC_LIBS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HWLOC_LIBS\"" >&5 $as_echo " (provided) \"$HWLOC_LIBS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HWLOC_LIBS\"" >&5 $as_echo " (provided) \"$HWLOC_LIBS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HWLOC_LIBS. Please configure --with-HWLOC_LIBS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HWLOC_LIBS],[-lhwloc]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PACKAGE_LDFLAGS([HWLOC],[hwloc]) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$HWLOC_HOME" in /usr|/) HWLOC_ldflags_guess='';; *) for HWLOC_ldflags_guess_dir in "$HWLOC_HOME/lib${GASNETI_PTR_BITS}" "$HWLOC_HOME/lib" ''; do test -z "$HWLOC_ldflags_guess_dir" && break for HWLOC_ldflags_guess_lib in hwloc; do for HWLOC_ldflags_guess_suff in a so sl dylib la dll; do if test -r "$HWLOC_ldflags_guess_dir/lib$HWLOC_ldflags_guess_lib.$HWLOC_ldflags_guess_suff"; then break 3; fi done done done if test -n "$HWLOC_ldflags_guess_dir"; then HWLOC_ldflags_guess="-L$HWLOC_ldflags_guess_dir" # deferred to appear after help for [PREFIX]_LDFLAGS # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(hwloc-rpath,...) vvvvvvvvvvvvvvvvvvvvvv (L:5) case "$enable_hwloc_rpath" in no) : enabled_hwloc_rpath='' ;; yes) : enabled_hwloc_rpath="$HWLOC_ldflags_guess_dir" ;; *) : if test -z "$enabled_hwloc_rpath"; then if test "x$enabled_rpath" = xyes; then enabled_hwloc_rpath="$HWLOC_ldflags_guess_dir" else enabled_hwloc_rpath='' fi fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(hwloc-rpath,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -n "$enabled_hwloc_rpath"; then if test "${cc_rpath_option:+set}" = set; then HWLOC_ldflags_guess="$HWLOC_ldflags_guess $cc_rpath_option$enabled_hwloc_rpath" else warn_missing_rpath="$warn_missing_rpath hwloc" fi fi HWLOC_ldflags_guess="${HWLOC_ldflags_guess}" else HWLOC_ldflags_guess='' fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HWLOC_LDFLAGS],[$HWLOC_ldflags_guess]) vvvvvvvvvvvvvvvvvvvvvv (L:5) # Check whether --with-hwloc-ldflags was given. if test "${with_hwloc_ldflags+set}" = set; then : withval=$with_hwloc_ldflags; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HWLOC_LDFLAGS setting" >&5 $as_echo_n "checking for HWLOC_LDFLAGS setting... " >&6; } envval_src_HWLOC_LDFLAGS="cached" if ${gasnet_cv_envvar_HWLOC_LDFLAGS+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_HWLOC_LDFLAGS="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HWLOC_LDFLAGS="$HWLOC_ldflags_guess" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hwlocldflags+set}" = "set" ; then gasnet_cv_envvar_HWLOC_LDFLAGS="${_gasneti_nenv_hwlocldflags}" envval_src_HWLOC_LDFLAGS=given elif test "${_gasneti_cenv_hwlocldflags+set}" = "set" ; then gasnet_cv_envvar_HWLOC_LDFLAGS="${_gasneti_cenv_hwlocldflags}" envval_src_HWLOC_LDFLAGS=conf else gasnet_cv_envvar_HWLOC_LDFLAGS=$envval_default_HWLOC_LDFLAGS envval_src_HWLOC_LDFLAGS=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HWLOC_LDFLAGS hwlocldflags $gasnet_cv_configure_args_norm fi HWLOC_LDFLAGS="$gasnet_cv_envvar_HWLOC_LDFLAGS" if test "$HWLOC_LDFLAGS" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HWLOC_LDFLAGS if test "$envval_src_HWLOC_LDFLAGS" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HWLOC_LDFLAGS" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HWLOC_LDFLAGS\"" >&5 $as_echo " \"$HWLOC_LDFLAGS\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HWLOC_LDFLAGS\"" >&5 $as_echo " (default) \"$HWLOC_LDFLAGS\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HWLOC_LDFLAGS\"" >&5 $as_echo " (disabled) \"$HWLOC_LDFLAGS\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HWLOC_LDFLAGS\"" >&5 $as_echo " (provided) \"$HWLOC_LDFLAGS\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HWLOC_LDFLAGS\"" >&5 $as_echo " (provided) \"$HWLOC_LDFLAGS\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HWLOC_LDFLAGS. Please configure --with-HWLOC_LDFLAGS=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HWLOC_LDFLAGS],[$HWLOC_ldflags_guess]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) # Check whether --enable-hwloc-rpath was given. if test "${enable_hwloc_rpath+set}" = set; then : enableval=$enable_hwloc_rpath; fi unset HWLOC_ldflags_guess unset HWLOC_ldflags_guess_dir unset HWLOC_ldflags_guess_lib unset HWLOC_ldflags_guess_suff # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PACKAGE_LDFLAGS ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([HWLOC_LDFLAGS],[HWLOC_LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) eval gasnet_fn_split_linker_opts HWLOC_LDFLAGS HWLOC_LIBS $HWLOC_LDFLAGS $HWLOC_LIBS #echo "HWLOC_LDFLAGS=[$]HWLOC_LDFLAGS" #echo "HWLOC_LIBS=[$]HWLOC_LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([HWLOC_LDFLAGS],[HWLOC_LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Try to compile and link a basic program using hwloc # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(CFLAGS,"$CFLAGS $HWLOC_CFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" = "" ; then _pushcnt_CFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${CFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_CFLAGS_$_pushcnt_CFLAGS=\$CFLAGS eval _pushedvarset_CFLAGS_$_pushcnt_CFLAGS=$_gasnet_pushvar_isset _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` CFLAGS="$CFLAGS $HWLOC_CFLAGS" echo "pushed new CFLAGS value: $CFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(CFLAGS,"$CFLAGS $HWLOC_CFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $HWLOC_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $HWLOC_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $HWLOC_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LIBS,"$LIBS $HWLOC_LIBS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" = "" ; then _pushcnt_LIBS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LIBS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LIBS_$_pushcnt_LIBS=\$LIBS eval _pushedvarset_LIBS_$_pushcnt_LIBS=$_gasnet_pushvar_isset _pushcnt_LIBS=`expr $_pushcnt_LIBS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LIBS="$LIBS $HWLOC_LIBS" echo "pushed new LIBS value: $LIBS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LIBS,"$LIBS $HWLOC_LIBS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for libhwloc with API v1.0 or newer,libhwloc_works,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libhwloc with API v1.0 or newer" >&5 $as_echo_n "checking for libhwloc with API v1.0 or newer... " >&6; } if ${gasnet_cv_libhwloc_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HWLOC_API_VERSION < 0x010000 #error No support for 0.9 series #endif int main () { hwloc_topology_t topology; hwloc_topology_init(&topology); hwloc_topology_load(topology); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_libhwloc_works=yes else gasnet_cv_libhwloc_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_libhwloc_works" >&5 $as_echo "$gasnet_cv_libhwloc_works" >&6; } if test "$gasnet_cv_libhwloc_works" = yes; then : have_hwloc_lib=yes else : HWLOC_CFLAGS="" HWLOC_LDFLAGS="" HWLOC_LIBS="" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for libhwloc with API v1.0 or newer,libhwloc_works,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LIBS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LIBS" -ge "1"; then _pushcnt_LIBS=`expr $_pushcnt_LIBS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LIBS_$_pushcnt_LIBS if test "$_gasnet_pushvar_isset" = "1" ; then eval LIBS=\$_pushedvar_LIBS_$_pushcnt_LIBS echo "popping LIBS back to: $LIBS" >&5 else unset LIBS echo "popping LIBS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LIBS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LIBS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(CFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_CFLAGS" -ge "1"; then _pushcnt_CFLAGS=`expr $_pushcnt_CFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_CFLAGS_$_pushcnt_CFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval CFLAGS=\$_pushedvar_CFLAGS_$_pushcnt_CFLAGS echo "popping CFLAGS back to: $CFLAGS" >&5 else unset CFLAGS echo "popping CFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on CFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(CFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$have_hwloc_lib" = yes; then $as_echo "#define GASNETI_HAVE_HWLOC_LIB 1" >>confdefs.h elif test "$enabled_hwloc_lib" = yes; then as_fn_error $? "User requested --enable-hwloc but the required hwloc header or library were not found." "$LINENO" 5 fi fi # HWLOC utilies: hwloc-{bind,calc} # Used as fallback if !have_hwloc_lib # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(hwloc-utils,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-hwloc-utils was given. if test "${enable_hwloc_utils+set}" = set; then : enableval=$enable_hwloc_utils; fi case "$enable_hwloc_utils" in no) : enabled_hwloc_utils=no ;; yes) : enabled_hwloc_utils=yes ;; *) : if test "$cross_compiling" = "no" || test "x$enable_hwloc_utils" = 'xprobe'; then enabled_hwloc_utils=probe else # utils on build system unlikely to represent the target enabled_hwloc_utils=no fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(hwloc-utils,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) have_hwloc_utils=no if test "$enabled_hwloc_utils" != no; then if test "$have_fork" = yes; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([HWLOC_UTILS_HOME],[],[Install prefix of hwloc command-line utilities (auto-detected from PATH)]) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-hwloc-utils-home was given. if test "${with_hwloc_utils_home+set}" = set; then : withval=$with_hwloc_utils_home; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HWLOC_UTILS_HOME setting" >&5 $as_echo_n "checking for HWLOC_UTILS_HOME setting... " >&6; } envval_src_HWLOC_UTILS_HOME="cached" if ${gasnet_cv_envvar_HWLOC_UTILS_HOME+:} false; then : $as_echo_n "(cached) " >&6 else if test "3" = "1" ; then # no default means unset envval_default_HWLOC_UTILS_HOME="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_HWLOC_UTILS_HOME="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_hwlocutilshome+set}" = "set" ; then gasnet_cv_envvar_HWLOC_UTILS_HOME="${_gasneti_nenv_hwlocutilshome}" envval_src_HWLOC_UTILS_HOME=given elif test "${_gasneti_cenv_hwlocutilshome+set}" = "set" ; then gasnet_cv_envvar_HWLOC_UTILS_HOME="${_gasneti_cenv_hwlocutilshome}" envval_src_HWLOC_UTILS_HOME=conf else gasnet_cv_envvar_HWLOC_UTILS_HOME=$envval_default_HWLOC_UTILS_HOME envval_src_HWLOC_UTILS_HOME=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper HWLOC_UTILS_HOME hwlocutilshome $gasnet_cv_configure_args_norm fi HWLOC_UTILS_HOME="$gasnet_cv_envvar_HWLOC_UTILS_HOME" if test "$HWLOC_UTILS_HOME" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset HWLOC_UTILS_HOME if test "$envval_src_HWLOC_UTILS_HOME" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_HWLOC_UTILS_HOME" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$HWLOC_UTILS_HOME\"" >&5 $as_echo " \"$HWLOC_UTILS_HOME\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$HWLOC_UTILS_HOME\"" >&5 $as_echo " (default) \"$HWLOC_UTILS_HOME\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$HWLOC_UTILS_HOME\"" >&5 $as_echo " (disabled) \"$HWLOC_UTILS_HOME\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HWLOC_UTILS_HOME\"" >&5 $as_echo " (provided) \"$HWLOC_UTILS_HOME\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$HWLOC_UTILS_HOME\"" >&5 $as_echo " (provided) \"$HWLOC_UTILS_HOME\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$HWLOC_UTILS_HOME. Please configure --with-HWLOC_UTILS_HOME=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([HWLOC_UTILS_HOME],[],[Install prefix of hwloc command-line utilities (auto-detected from PATH)]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -n "$HWLOC_UTILS_HOME"; then hwloc_utils_path="$HWLOC_UTILS_HOME/bin" else hwloc_utils_path="$PATH" fi for ac_prog in hwloc-bind do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GASNETI_HWLOC_BIND_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $GASNETI_HWLOC_BIND_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_GASNETI_HWLOC_BIND_PATH="$GASNETI_HWLOC_BIND_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $hwloc_utils_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GASNETI_HWLOC_BIND_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GASNETI_HWLOC_BIND_PATH=$ac_cv_path_GASNETI_HWLOC_BIND_PATH if test -n "$GASNETI_HWLOC_BIND_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GASNETI_HWLOC_BIND_PATH" >&5 $as_echo "$GASNETI_HWLOC_BIND_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GASNETI_HWLOC_BIND_PATH" && break done if test -n "$GASNETI_HWLOC_BIND_PATH" && test "$cross_compiling" = "no"; then # Require --get, added in hwloc 1.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required features in hwloc-bind" >&5 $as_echo_n "checking for required features in hwloc-bind... " >&6; } if expr `$GASNETI_HWLOC_BIND_PATH --get 2>&1` : 0x >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF #define GASNETI_HWLOC_BIND_PATH "$GASNETI_HWLOC_BIND_PATH" _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } unset GASNETI_HWLOC_BIND_PATH fi fi for ac_prog in hwloc-calc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GASNETI_HWLOC_CALC_PATH+:} false; then : $as_echo_n "(cached) " >&6 else case $GASNETI_HWLOC_CALC_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_GASNETI_HWLOC_CALC_PATH="$GASNETI_HWLOC_CALC_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $hwloc_utils_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GASNETI_HWLOC_CALC_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GASNETI_HWLOC_CALC_PATH=$ac_cv_path_GASNETI_HWLOC_CALC_PATH if test -n "$GASNETI_HWLOC_CALC_PATH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GASNETI_HWLOC_CALC_PATH" >&5 $as_echo "$GASNETI_HWLOC_CALC_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GASNETI_HWLOC_CALC_PATH" && break done if test -n "$GASNETI_HWLOC_CALC_PATH" && test "$cross_compiling" = "no"; then # Require --intersect, added in hwloc 1.1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required features in hwloc-calc" >&5 $as_echo_n "checking for required features in hwloc-calc... " >&6; } if $GASNETI_HWLOC_CALC_PATH --intersect Socket 0x0 /dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cat >>confdefs.h <<_ACEOF #define GASNETI_HWLOC_CALC_PATH "$GASNETI_HWLOC_CALC_PATH" _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } unset GASNETI_HWLOC_CALC_PATH fi fi if test -n "$GASNETI_HWLOC_BIND_PATH" && test -n "$GASNETI_HWLOC_CALC_PATH"; then have_hwloc_utils=yes # Have both $as_echo "#define GASNETI_HAVE_HWLOC_UTILS 1" >>confdefs.h if test "$cross_compiling" = "yes"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Utilities hwloc-bind and hwloc-calc have been located, as show above. However, their validation has been skipped due to cross-compilation." >&5 $as_echo "$as_me: WARNING: Utilities hwloc-bind and hwloc-calc have been located, as show above. However, their validation has been skipped due to cross-compilation." >&2;} echo "Utilities hwloc-bind and hwloc-calc have been located, as show above. However, their validation has been skipped due to cross-compilation." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi elif test "$enabled_hwloc_utils" = yes; then as_fn_error $? "User requested --with-hwloc-utils but one or both of hwloc-calc or hwloc-bind was not found." "$LINENO" 5 fi elif test "$enabled_hwloc_utils" = yes; then as_fn_error $? "User requested --with-hwloc-utils but this option requires popen which $fork_reason." "$LINENO" 5 fi fi if test "$have_hwloc_lib" = 'yes'; then hwloc_support='lib' elif test "$have_hwloc_utils" = 'yes'; then hwloc_support='utils' else hwloc_support='no' fi # AC_FUNC_MMAP # Check for mmap functionality we actually use if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_CROSS_VAR(HAVE_MMAP,HAVE_MMAP,) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$cross_compiling" = "yes" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_ENV_DEFAULT([CROSS_HAVE_MMAP],[]) vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CROSS_HAVE_MMAP setting" >&5 $as_echo_n "checking for CROSS_HAVE_MMAP setting... " >&6; } envval_src_CROSS_HAVE_MMAP="cached" if ${gasnet_cv_envvar_CROSS_HAVE_MMAP+:} false; then : $as_echo_n "(cached) " >&6 else if test "2" = "1" ; then # no default means unset envval_default_CROSS_HAVE_MMAP="__=-=-=-__NOT_SET__-=-=-=__" else envval_default_CROSS_HAVE_MMAP="" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_crosshavemmap+set}" = "set" ; then gasnet_cv_envvar_CROSS_HAVE_MMAP="${_gasneti_nenv_crosshavemmap}" envval_src_CROSS_HAVE_MMAP=given elif test "${_gasneti_cenv_crosshavemmap+set}" = "set" ; then gasnet_cv_envvar_CROSS_HAVE_MMAP="${_gasneti_cenv_crosshavemmap}" envval_src_CROSS_HAVE_MMAP=conf else gasnet_cv_envvar_CROSS_HAVE_MMAP=$envval_default_CROSS_HAVE_MMAP envval_src_CROSS_HAVE_MMAP=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper CROSS_HAVE_MMAP crosshavemmap $gasnet_cv_configure_args_norm fi CROSS_HAVE_MMAP="$gasnet_cv_envvar_CROSS_HAVE_MMAP" if test "$CROSS_HAVE_MMAP" = "__=-=-=-__NOT_SET__-=-=-=__" ; then unset CROSS_HAVE_MMAP if test "$envval_src_CROSS_HAVE_MMAP" = "cached"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: (not set)" >&5 $as_echo " (not set)" >&6; } fi else case "$envval_src_CROSS_HAVE_MMAP" in 'cached') { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CROSS_HAVE_MMAP\"" >&5 $as_echo " \"$CROSS_HAVE_MMAP\"" >&6; } ;; 'default') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (default) \"$CROSS_HAVE_MMAP\"" >&5 $as_echo " (default) \"$CROSS_HAVE_MMAP\"" >&6; } ;; 'disabled') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (disabled) \"$CROSS_HAVE_MMAP\"" >&5 $as_echo " (disabled) \"$CROSS_HAVE_MMAP\"" >&6; } ;; 'given') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_HAVE_MMAP\"" >&5 $as_echo " (provided) \"$CROSS_HAVE_MMAP\"" >&6; } ;; 'conf') { $as_echo "$as_me:${as_lineno-$LINENO}: result: (provided) \"$CROSS_HAVE_MMAP\"" >&5 $as_echo " (provided) \"$CROSS_HAVE_MMAP\"" >&6; } echo echo "configure error: Ambiguous environment setting for \$CROSS_HAVE_MMAP. Please configure --with-CROSS_HAVE_MMAP=\"intended value\"" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; *) echo echo "configure error: _GASNET_ENV_DEFAULT broken" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 esac fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_ENV_DEFAULT([CROSS_HAVE_MMAP],[]) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test "$CROSS_HAVE_MMAP" = "" ; then as_fn_error $? "This configure script requires \$CROSS_HAVE_MMAP be set for cross-compilation" "$LINENO" 5 else HAVE_MMAP="$CROSS_HAVE_MMAP" fi fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_CROSS_VAR(HAVE_MMAP,HAVE_MMAP,) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) mmap_reason="was disabled" else case "$target_os" in cygwin*) # mmap is known to be broken on Cygwin - dont even try HAVE_MMAP=0 mmap_reason="is not supported on Cygwin" ;; *) # default to trying it HAVE_MMAP=1 ;; esac fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(mmap,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-mmap was given. if test "${enable_mmap+set}" = set; then : enableval=$enable_mmap; fi case "$enable_mmap" in no) : HAVE_MMAP=0 mmap_reason="was disabled" ;; yes) : if test "$HAVE_MMAP" != "1" ; then echo echo "configure error: --enable-mmap was passed, but mmap functionality $mmap_reason" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi FORCE_MMAP=1 ;; *) : ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(mmap,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$HAVE_MMAP" != "0" && test "$cross_compiling" = "no" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_RUN(for working mmap(),have_mmap,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap()" >&5 $as_echo_n "checking for working mmap()... " >&6; } if ${gasnet_cv_have_mmap+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : as_fn_error $? "no default value for cross compiling" "$LINENO" 5 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include #include #include char junk[16384]; int testfd(int); int main(void) { int fd, retval; #if 0 char filename[255]; tmpnam(filename); /* unsafe */ fd = open(filename, O_RDWR | O_CREAT); #else char filename[255]; if (getenv("TMPDIR")) strcpy(filename,getenv("TMPDIR")); else strcpy(filename,"/tmp"); strcat(filename,"/gasnet-conftemp-XXXXXX"); fd = mkstemp(filename); /* leaves crap laying around */ #endif retval = testfd(fd); close(fd); remove(filename); return retval; } int testfd(int fd) { void *ptr,*ptr2; if (fd == -1) return 1; if (write(fd, junk, 16384) == -1) return 2; ptr = mmap(0, 16384, (PROT_READ|PROT_WRITE), MAP_PRIVATE, fd, 0); if (ptr == MAP_FAILED || ptr == NULL) return 3; if (munmap(ptr,16384) != 0) return 4; ptr2 = mmap(ptr, 16384, (PROT_READ|PROT_WRITE), (MAP_PRIVATE | MAP_FIXED), fd, 0); if (ptr2 == MAP_FAILED || ptr2 == NULL || ptr2 != ptr) return 5; if (munmap(ptr,16384) != 0) return 6; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gasnet_cv_have_mmap=yes else gasnet_cv_have_mmap=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_have_mmap" >&5 $as_echo "$gasnet_cv_have_mmap" >&6; } if test "$gasnet_cv_have_mmap" = yes; then : HAVE_MMAP=1 else : HAVE_MMAP=0 if test "$FORCE_MMAP" = "1" ; then echo echo "configure error: --enable-mmap was passed, but mmap functionality test failed" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi mmap_reason="test failed" fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_RUN(for working mmap(),have_mmap,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi if test "$HAVE_MMAP" != "0" ; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h # bug 1763: find the right mmap flags (which may be enum values or const vars) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for MAP_NORESERVE,map_noreserve,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_NORESERVE" >&5 $as_echo_n "checking for MAP_NORESERVE... " >&6; } if ${gasnet_cv_map_noreserve+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { void *junk = mmap(0, 0, 0, MAP_NORESERVE, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_map_noreserve=yes else gasnet_cv_map_noreserve=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_map_noreserve" >&5 $as_echo "$gasnet_cv_map_noreserve" >&6; } if test "$gasnet_cv_map_noreserve" = yes; then : $as_echo "#define HAVE_MAP_NORESERVE 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for MAP_NORESERVE,map_noreserve,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for MAP_ANONYMOUS,map_anonymous,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } if ${gasnet_cv_map_anonymous+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { void *junk = mmap(0, 0, 0, MAP_ANONYMOUS, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_map_anonymous=yes else gasnet_cv_map_anonymous=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_map_anonymous" >&5 $as_echo "$gasnet_cv_map_anonymous" >&6; } if test "$gasnet_cv_map_anonymous" = yes; then : $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for MAP_ANONYMOUS,map_anonymous,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for MAP_ANON,map_anon,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANON" >&5 $as_echo_n "checking for MAP_ANON... " >&6; } if ${gasnet_cv_map_anon+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { void *junk = mmap(0, 0, 0, MAP_ANON, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_map_anon=yes else gasnet_cv_map_anon=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_map_anon" >&5 $as_echo "$gasnet_cv_map_anon" >&6; } if test "$gasnet_cv_map_anon" = yes; then : $as_echo "#define HAVE_MAP_ANON 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for MAP_ANON,map_anon,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED(bug3480-workaround,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-bug3480-workaround was given. if test "${enable_bug3480_workaround+set}" = set; then : enableval=$enable_bug3480_workaround; fi case "$enable_bug3480_workaround" in '' | no) : ;; *) : $as_echo "#define GASNETI_BUG3480_WORKAROUND 1" >>confdefs.h if test "$GASNETI_DISABLE_ALIGNED_SEGMENTS" != 1 && \ test "$segconfig" != everything; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:5) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-bug3480-workaround is incompatible with GASNET_ALIGNED_SEGMENTS -- automatically applying option --disable-aligned-segments." >&5 $as_echo "$as_me: WARNING: --enable-bug3480-workaround is incompatible with GASNET_ALIGNED_SEGMENTS -- automatically applying option --disable-aligned-segments." >&2;} echo "--enable-bug3480-workaround is incompatible with GASNET_ALIGNED_SEGMENTS -- automatically applying option --disable-aligned-segments." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:5) GASNETI_DISABLE_ALIGNED_SEGMENTS=1 $as_echo "#define GASNETI_DISABLE_ALIGNED_SEGMENTS 1" >>confdefs.h fi ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED(bug3480-workaround,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) elif expr "$target_os" : 'cygwin' >/dev/null 2>&1; then : # Cygwin uses mmap() for PSHM even though it is not supported in general else # PSHM over SysV doesn't require mmap(), but the rest do case "$with_pshm" in no|sysv) ;; *) echo echo "configure error: PSHM was enabled, but required mmap functionality $mmap_reason" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; esac fi # Set a site-default for GASNET_HOST_DETECT # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(host-detect,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-host-detect was given. if test "${with_host_detect+set}" = set; then : withval=$with_host_detect; fi if test "${with_host_detect+set}" = set; then : withval=$with_host_detect; case "$withval" in no) : ;; *) : case "$withval" in conduit|hostname|gethostid) cat >>confdefs.h <<_ACEOF #define GASNETI_HOST_DETECT_CONFIGURE "$withval" _ACEOF ;; *) echo echo "configure error: User requested --with-host-detect='$withval'" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 ;; esac ;; esac else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(host-detect,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Determine the default GASNET_MAX_SEGSIZE string if test "$with_pshm" = "no" && test "$HAVE_MMAP" = 0 ; then GASNETI_MAX_SEGSIZE_DEFAULT="100MB/P" # rare malloc-based platforms else GASNETI_MAX_SEGSIZE_DEFAULT="0.85/H" # most platforms fi if test "${with_segment_mmap_max+set}" = set; then : withval=$with_segment_mmap_max; case "$withval" in no) : ;; *) : # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Obsolete option --with-segment-mmap-max ignored. See --help for --with-max-segsize" >&5 $as_echo "$as_me: WARNING: Obsolete option --with-segment-mmap-max ignored. See --help for --with-max-segsize" >&2;} echo "Obsolete option --with-segment-mmap-max ignored. See --help for --with-max-segsize" >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; esac else : fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(max-segsize,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-max-segsize was given. if test "${with_max_segsize+set}" = set; then : withval=$with_max_segsize; fi if test "${with_max_segsize+set}" = set; then : withval=$with_max_segsize; case "$withval" in no) : as_fn_error $? "--without-max-segsize is not supported" "$LINENO" 5 ;; *) : # this is an overly-permissive pattern, just here to detect obviously invalid values if echo "$withval" | $PERL -ne '$_ =~ s@[\s/]@@g; exit (m@^\d+(\.\d*)?([kmgt]?b?)?[ph]?$@i ? 1 : 0)' ; then as_fn_error $? "Illegal value for --with-max-segsize=$withval" "$LINENO" 5 fi cat >>confdefs.h <<_ACEOF #define GASNETI_MAX_SEGSIZE_CONFIGURE "$withval" _ACEOF ;; esac else : cat >>confdefs.h <<_ACEOF #define GASNETI_MAX_SEGSIZE_CONFIGURE "$GASNETI_MAX_SEGSIZE_DEFAULT" _ACEOF fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(max-segsize,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) for ac_header in malloc.h do : ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" if test "x$ac_cv_header_malloc_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MALLOC_H 1 _ACEOF fi done # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for ptmalloc,malloc_is_ptmalloc,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ptmalloc" >&5 $as_echo_n "checking for ptmalloc... " >&6; } if ${gasnet_cv_malloc_is_ptmalloc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if HAVE_STDLIB_H #include #endif #if HAVE_MALLOC_H #include #endif int main () { mallopt(M_TRIM_THRESHOLD, -1); mallopt(M_MMAP_MAX, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_malloc_is_ptmalloc=yes else gasnet_cv_malloc_is_ptmalloc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_malloc_is_ptmalloc" >&5 $as_echo "$gasnet_cv_malloc_is_ptmalloc" >&6; } if test "$gasnet_cv_malloc_is_ptmalloc" = yes; then : $as_echo "#define HAVE_PTMALLOC 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for ptmalloc,malloc_is_ptmalloc,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) for ac_func in posix_memalign do : ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" if test "x$ac_cv_func_posix_memalign" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_POSIX_MEMALIGN 1 _ACEOF fi done DEBUGMALLOC_VAR=GASNET_unused DEBUGMALLOC_VAL=0 case "$target" in *-openbsd*) debugmalloc_support=yes DEBUGMALLOC_VAR=MALLOC_OPTIONS DEBUGMALLOC_VAL=FJ # (F)reeguard (J)unk-fill openbsd_major=`expr \`uname -r\` : '\([1-9]*\).'` if test $openbsd_major -ge 5; then DEBUGMALLOC_VAL="${DEBUGMALLOC_VAL}S" # (S)ecurity auditing - added in 5.0 fi if test $openbsd_major -lt 6; then DEBUGMALLOC_VAL="${DEBUGMALLOC_VAL}A" # (A)bort - removed in 6.0 fi ;; *-freebsd* | *-netbsd*) debugmalloc_support=yes DEBUGMALLOC_VAR=MALLOC_OPTIONS DEBUGMALLOC_VAL=AJ # (A)bort (J)unk-fill ;; #*-solaris*) Not willing to mess w/ dynamic linker tricks -PHH # debugmalloc_support=yes # DEBUGMALLOC_VAR=LD_PRELOAD # DEBUGMALLOC_VAL=watchmalloc.so.1 # ;; #*-darwin*) Not willing to mess w/ dynamic linker tricks, plus need up to 9 more vars -PHH # debugmalloc_support=yes # DEBUGMALLOC_VAR=DYLD_INSERT_LIBRARIES # DEBUGMALLOC_VAL=/usr/lib/libgmalloc.dylib # ;; *) # MALLOC_CHECK_ is a glibc feature (but appears harmless elsewhere) # However, we need to weed out known buggy versions (see bug 2731) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_EXTRACT_STR(for glibc,glibc_version,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc" >&5 $as_echo_n "checking for glibc... " >&6; } if ${gasnet_cv_glibc_version+:} false; then : $as_echo_n "(cached) " >&6 else gasnet_cv_glibc_version="" _extractstrembed='"$gasnetextractstr: (-(|" GASNETI_GLIBC_VERSION "|)-) $"' # vvvvvvvvvvvvvvvvvvvvvv GASNET_COMPILE_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < #endif #ifndef _STRINGIFY #define _STRINGIFY_HELPER(x) #x #define _STRINGIFY(x) _STRINGIFY_HELPER(x) #endif #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) #define GASNETI_GLIBC_VERSION _STRINGIFY(__GLIBC__) "." _STRINGIFY(__GLIBC_MINOR__) #elif defined(__GLIBC__) #define GASNETI_GLIBC_VERSION _STRINGIFY(__GLIBC__) #else #define GASNETI_GLIBC_VERSION "no" #endif #include extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO.${ac_objext}" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest.${ac_objext} $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_glibc_version=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while compile extracting GASNETI_GLIBC_VERSION" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_COMPILE_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) if test -z "$gasnet_cv_glibc_version" ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_LINK_EXAMINE(...) vvvvvvvvvvvvvvvvvvvvvv (L:5) cat >conftest.$ac_ext < #endif #ifndef _STRINGIFY #define _STRINGIFY_HELPER(x) #x #define _STRINGIFY(x) _STRINGIFY_HELPER(x) #endif #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) #define GASNETI_GLIBC_VERSION _STRINGIFY(__GLIBC__) "." _STRINGIFY(__GLIBC_MINOR__) #elif defined(__GLIBC__) #define GASNETI_GLIBC_VERSION _STRINGIFY(__GLIBC__) #else #define GASNETI_GLIBC_VERSION "no" #endif #include extern const char *s; const char *s = $_extractstrembed; EOF cat >>conftest.$ac_ext <<"EOF" int main(void) { printf("%s",s); return 0; } EOF if test ! -f conftest.$ac_ext ; then as_fn_error $? "failed to write conftest.$ac_ext" "$LINENO" 5 fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" = "" ; then _pushcnt_GASNET_EXAMINE_BIN=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${GASNET_EXAMINE_BIN+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=\$GASNET_EXAMINE_BIN eval _pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN=$_gasnet_pushvar_isset _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN + 1` _total_pushcnt=`expr $_total_pushcnt + 1` GASNET_EXAMINE_BIN="gasnet-examine-bin-$LINENO$ac_exeext" echo "pushed new GASNET_EXAMINE_BIN value: $GASNET_EXAMINE_BIN" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") ^^^^^^^^^^^^^^^^^^^^^^ (L:6) mv conftest$ac_exeext $GASNET_EXAMINE_BIN _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "$1"; exit 0;}' gasnet_cv_glibc_version=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` rm -f $GASNET_EXAMINE_BIN # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(GASNET_EXAMINE_BIN) vvvvvvvvvvvvvvvvvvvvvv (L:6) if test "$_pushcnt_GASNET_EXAMINE_BIN" -ge "1"; then _pushcnt_GASNET_EXAMINE_BIN=`expr $_pushcnt_GASNET_EXAMINE_BIN - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN if test "$_gasnet_pushvar_isset" = "1" ; then eval GASNET_EXAMINE_BIN=\$_pushedvar_GASNET_EXAMINE_BIN_$_pushcnt_GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: $GASNET_EXAMINE_BIN" >&5 else unset GASNET_EXAMINE_BIN echo "popping GASNET_EXAMINE_BIN back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on GASNET_EXAMINE_BIN" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(GASNET_EXAMINE_BIN) ^^^^^^^^^^^^^^^^^^^^^^ (L:6) else echo Failed program: >&5 cat conftest.$ac_ext >&5 echo echo "configure error: Failed while link extracting GASNETI_GLIBC_VERSION" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_LINK_EXAMINE(...) ^^^^^^^^^^^^^^^^^^^^^^ (L:5) fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_glibc_version" >&5 $as_echo "$gasnet_cv_glibc_version" >&6; } if test -n "$gasnet_cv_glibc_version" ; then GASNETI_GLIBC_VERSION=$gasnet_cv_glibc_version fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_EXTRACT_STR(for glibc,glibc_version,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test x"$GASNETI_GLIBC_VERSION" != xno; then DEBUGMALLOC_VAR=MALLOC_CHECK_ DEBUGMALLOC_VAL=2 # Look for buggy versions, but keep in mind --enable-system-debug-malloc will override case $GASNETI_GLIBC_VERSION in 2.5) debugmalloc_support=no;; # Known buggy in 2.5-42 which orginated in RHEL5.4 (fine tune?) 2.10) debugmalloc_support=no;; # Known buggy 2.11) debugmalloc_support=no;; # Known buggy, but 2.11.1 is OK (TODO: identify >= 2.11.1) *) debugmalloc_support=yes;; esac fi ;; esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_IF_ENABLED_WITH_AUTO(system-debug-malloc,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --enable-system-debug-malloc was given. if test "${enable_system_debug_malloc+set}" = set; then : enableval=$enable_system_debug_malloc; fi case "$enable_system_debug_malloc" in no) : DEBUGMALLOC="no" ;; yes) : DEBUGMALLOC="yes" ;; *) : DEBUGMALLOC="$debugmalloc_support" ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_IF_ENABLED_WITH_AUTO(system-debug-malloc,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$DEBUGMALLOC" = "yes"; then DEBUGMALLOC_TRUE= DEBUGMALLOC_FALSE='#' else DEBUGMALLOC_TRUE='#' DEBUGMALLOC_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(for __func__,cc_has_func,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5 $as_echo_n "checking for __func__... " >&6; } if ${gasnet_cv_cc_has_func+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { const char* p = __func__; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_cc_has_func=yes else gasnet_cv_cc_has_func=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_cc_has_func" >&5 $as_echo "$gasnet_cv_cc_has_func" >&6; } if test "$gasnet_cv_cc_has_func" = yes; then : $as_echo "#define HAVE_FUNC 1" >>confdefs.h else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(for __func__,cc_has_func,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ######################################################################## ## Misc Header checks for ac_header in sys/param.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" if test "x$ac_cv_header_sys_param_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_PARAM_H 1 _ACEOF fi done ######################################################################## ## ## Supporting Command-Line Tools (continued) ## if test x"$BOURNE_SHELL" = x; then BOURNE_SHELL="/bin/sh" fi if test "$cross_compiling" = yes ; then CROSS_NM="${CROSS_NM:-${target_alias}-nm}" CROSS_AR="${CROSS_AR:-${target_alias}-ar}" CROSS_RANLIB="${CROSS_RANLIB:-${target_alias}-ranlib}" fi # we want but do not require nm for ac_prog in $NM $CROSS_NM nm do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else case $NM in [\\/]* | ?:[\\/]*) ac_cv_path_NM="$NM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi NM=$ac_cv_path_NM if test -n "$NM"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 $as_echo "$NM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$NM" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU nm" >&5 $as_echo_n "checking for GNU nm... " >&6; } if test "`${NM:-nm} --version 2>&1 | grep GNU`" = "" ; then gnu_nm=no else gnu_nm=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnu_nm" >&5 $as_echo "$gnu_nm" >&6; } if test "$gnu_nm" = "yes"; then GNU_NM_TRUE= GNU_NM_FALSE='#' else GNU_NM_TRUE='#' GNU_NM_FALSE= fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_PATH_PROGS(AR,$CROSS_AR ar gar,archiver) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$AR" in '') for ac_prog in $CROSS_AR ar gar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_AR+:} false; then : $as_echo_n "(cached) " >&6 else case $AR in [\\/]* | ?:[\\/]*) ac_cv_path_AR="$AR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi AR=$ac_cv_path_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver" >&5 $as_echo_n "checking for archiver... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } ;; esac case "$AR" in '') as_fn_error $? "cannot find archiver" "$LINENO" 5 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PATH_PROGS(AR,$CROSS_AR ar gar,archiver) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PATH_PROGS(RANLIB,$CROSS_RANLIB ranlib touch,ranlib) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$RANLIB" in '') for ac_prog in $CROSS_RANLIB ranlib touch do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else case $RANLIB in [\\/]* | ?:[\\/]*) ac_cv_path_RANLIB="$RANLIB" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RANLIB="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi RANLIB=$ac_cv_path_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$RANLIB" && break done ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ranlib" >&5 $as_echo_n "checking for ranlib... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } ;; esac case "$RANLIB" in '') as_fn_error $? "cannot find ranlib" "$LINENO" 5 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PATH_PROGS(RANLIB,$CROSS_RANLIB ranlib touch,ranlib) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) case "$target_os" in darwin*) RANLIB="$RANLIB -s -c" ;; # ensure correct common block behavior on darwin esac # vvvvvvvvvvvvvvvvvvvvvv GASNET_PATH_PROGS(BASENAME,basename,basename) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$BASENAME" in '') for ac_prog in basename do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_BASENAME+:} false; then : $as_echo_n "(cached) " >&6 else case $BASENAME in [\\/]* | ?:[\\/]*) ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi BASENAME=$ac_cv_path_BASENAME if test -n "$BASENAME"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5 $as_echo "$BASENAME" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$BASENAME" && break done ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for basename" >&5 $as_echo_n "checking for basename... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5 $as_echo "$BASENAME" >&6; } ;; esac case "$BASENAME" in '') as_fn_error $? "cannot find basename" "$LINENO" 5 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PATH_PROGS(BASENAME,basename,basename) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PATH_PROGS(DIRNAME,dirname,dirname) vvvvvvvvvvvvvvvvvvvvvv (L:4) case "$DIRNAME" in '') for ac_prog in dirname do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DIRNAME+:} false; then : $as_echo_n "(cached) " >&6 else case $DIRNAME in [\\/]* | ?:[\\/]*) ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DIRNAME=$ac_cv_path_DIRNAME if test -n "$DIRNAME"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5 $as_echo "$DIRNAME" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DIRNAME" && break done ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirname" >&5 $as_echo_n "checking for dirname... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5 $as_echo "$DIRNAME" >&6; } ;; esac case "$DIRNAME" in '') as_fn_error $? "cannot find dirname" "$LINENO" 5 ;; esac # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PATH_PROGS(DIRNAME,dirname,dirname) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Some platforms are lacking readlink, and we currently do not require it for ac_prog in $READLINK readlink do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_READLINK+:} false; then : $as_echo_n "(cached) " >&6 else case $READLINK in [\\/]* | ?:[\\/]*) ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi READLINK=$ac_cv_path_READLINK if test -n "$READLINK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5 $as_echo "$READLINK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$READLINK" && break done # other optional commands for ac_prog in $TIMECMD time do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_TIMECMD+:} false; then : $as_echo_n "(cached) " >&6 else case $TIMECMD in [\\/]* | ?:[\\/]*) ac_cv_path_TIMECMD="$TIMECMD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_TIMECMD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi TIMECMD=$ac_cv_path_TIMECMD if test -n "$TIMECMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIMECMD" >&5 $as_echo "$TIMECMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$TIMECMD" && break done for ac_prog in $ENVCMD env do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ENVCMD+:} false; then : $as_echo_n "(cached) " >&6 else case $ENVCMD in [\\/]* | ?:[\\/]*) ac_cv_path_ENVCMD="$ENVCMD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ENVCMD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ENVCMD=$ac_cv_path_ENVCMD if test -n "$ENVCMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENVCMD" >&5 $as_echo "$ENVCMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ENVCMD" && break done ######################################################################## # complete linker setup NOASLR_LDFLAGS= case "$target_os" in darwin*) if test "$CC_FAMILY$CC_SUBFAMILY" = 'GNUNVIDIA'; then dash_Wl='-Xlinker ' else dash_Wl='-Wl,' fi tmp_ver=`expr "$target_os" : 'darwin\([0-9]*\)' 2>/dev/null` # Darwin linker may complain about symbols defined in multiple dynamic libs. # This is a minor annoyance in some cases, however it becomes a fatal error # when linking with the mpich libs. # The `-multiply_defined suppress` linker option has been documented as # obsolete since Darwin 9 (MacOSX Leopard, Oct 2007) and has since (as of # Apple clang 15 / macOS Ventura / Darwin 22) begun to generate linker # warnings (see bug 4677). # To detect such warnings, we could use GASNET_TRY_LDFLAG() if such existed. # However, this OS version check should be sufficient: { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -multiply_defined linker option" >&5 $as_echo_n "checking for -multiply_defined linker option... " >&6; } if expr $tmp_ver \< 22 >/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LDFLAGS="$LDFLAGS ${dash_Wl}-multiply_defined,suppress" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Darwin 11 (MacOSX Lion) and newer use address-space randomization by default # But -no_pie is ignored (with a warning) on aarch64 # and on x86_64 starting with Darwin 21 tmp_ver=`expr "$target_os" : 'darwin\([0-9]*\)' 2>/dev/null` if test $target_cpu = aarch64; then : # not supported for this arch elif expr $tmp_ver \< 11 >/dev/null; then : # too old elif expr $tmp_ver \>= 21 >/dev/null; then : # too new else NOASLR_LDFLAGS="${dash_Wl}-no_pie" fi ;; openbsd*) # OpenBSD PIE-by-default breaks aligned segments and upcr linker segment (bug 3248) NOASLR_LDFLAGS='-nopie' # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $NOASLR_LDFLAGS") vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" = "" ; then _pushcnt_LDFLAGS=0 fi if test "$_total_pushcnt" = "" ; then _total_pushcnt=0 fi if test "${LDFLAGS+set}" = set; then _gasnet_pushvar_isset=1 else _gasnet_pushvar_isset=0 fi eval _pushedvar_LDFLAGS_$_pushcnt_LDFLAGS=\$LDFLAGS eval _pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS=$_gasnet_pushvar_isset _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS + 1` _total_pushcnt=`expr $_total_pushcnt + 1` LDFLAGS="$LDFLAGS $NOASLR_LDFLAGS" echo "pushed new LDFLAGS value: $LDFLAGS" >&5 # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $NOASLR_LDFLAGS") ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRY_CACHE_LINK(if linker supports '$NOASLR_LDFLAGS',ld_has_nopie,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports '$NOASLR_LDFLAGS'" >&5 $as_echo_n "checking if linker supports '$NOASLR_LDFLAGS'... " >&6; } if ${gasnet_cv_ld_has_nopie+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gasnet_cv_ld_has_nopie=yes else gasnet_cv_ld_has_nopie=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gasnet_cv_ld_has_nopie" >&5 $as_echo "$gasnet_cv_ld_has_nopie" >&6; } if test "$gasnet_cv_ld_has_nopie" = yes; then : else : NOASLR_LDFLAGS='' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRY_CACHE_LINK(if linker supports '$NOASLR_LDFLAGS',ld_has_nopie,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_POPVAR(LDFLAGS) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_pushcnt_LDFLAGS" -ge "1"; then _pushcnt_LDFLAGS=`expr $_pushcnt_LDFLAGS - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_LDFLAGS_$_pushcnt_LDFLAGS if test "$_gasnet_pushvar_isset" = "1" ; then eval LDFLAGS=\$_pushedvar_LDFLAGS_$_pushcnt_LDFLAGS echo "popping LDFLAGS back to: $LDFLAGS" >&5 else unset LDFLAGS echo "popping LDFLAGS back to: " >&5 fi else echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on LDFLAGS" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_POPVAR(LDFLAGS) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ;; esac if test "$GASNETI_DISABLE_ALIGNED_SEGMENTS" != 1 ; then LDFLAGS="$LDFLAGS $NOASLR_LDFLAGS" fi ######################################################################## # Figure out how to install config files GASNET_INSTALL_CMD="sed -e '/###NOINSTALL###/d' \ -e 's@###INSTALL_INCLUDE###@\$(includedir)@g' \ -e 's@###INSTALL_LIBEXEC###@\$(libexecdir)@g' \ -e 's@###INSTALL_DOC###@\$(docdir)@g' \ -e 's@###INSTALL_LIB###@\$(libdir)@g' \ -e 's@###INSTALL_BIN###@\$(bindir)@g' \ -e 's@###INSTALL_MAN###@\$(mandir)@g' \ -e 's@###INSTALL_ETC###@\$(sysconfdir)@g' \ -e 's@\$(prefix)/@\$\$(GASNET_PREFIX)/@g' \ -e 's@###INSTALL_PREFIX###@\$(prefix)@g'" TOOL_PREFIX=gasnet # vvvvvvvvvvvvvvvvvvvvvv GASNET_WITH(tool-prefix,...) vvvvvvvvvvvvvvvvvvvvvv (L:4) # Check whether --with-tool-prefix was given. if test "${with_tool_prefix+set}" = set; then : withval=$with_tool_prefix; fi if test "${with_tool_prefix+set}" = set; then : withval=$with_tool_prefix; case "$withval" in no) : ;; *) : TOOL_PREFIX=$withval ;; esac else : fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_WITH(tool-prefix,...) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ######################################################################## # Optional "third-party" libraries ## This section is currently empty ######################################################################## ## ## Final Output ## # TODO: exclude platforms where RPATH is "not a thing" if test -n "$warn_missing_rpath"; then # vvvvvvvvvvvvvvvvvvvvvv GASNET_MSG_WARN() vvvvvvvvvvvvvvvvvvvvvv (L:4) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I do not know how to encode an RPATH for your system. Had support been present, the following conduits or packages would have used an RPATH:$warn_missing_rpath." >&5 $as_echo "$as_me: WARNING: I do not know how to encode an RPATH for your system. Had support been present, the following conduits or packages would have used an RPATH:$warn_missing_rpath." >&2;} echo "I do not know how to encode an RPATH for your system. Had support been present, the following conduits or packages would have used an RPATH:$warn_missing_rpath." >> ".gasnet_cv_configure_warnings.tmp" echo " " >> ".gasnet_cv_configure_warnings.tmp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_MSG_WARN() ^^^^^^^^^^^^^^^^^^^^^^ (L:4) fi # vvvvvvvvvvvvvvvvvvvvvv GASNET_FIX_EXEC(smp-conduit/contrib/gasnetrun_smp) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_cv_exec_list="$gasnet_cv_exec_list smp-conduit/contrib/gasnetrun_smp" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FIX_EXEC(smp-conduit/contrib/gasnetrun_smp) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_FIX_EXEC(mpi-conduit/contrib/gasnetrun_mpi) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_cv_exec_list="$gasnet_cv_exec_list mpi-conduit/contrib/gasnetrun_mpi" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FIX_EXEC(mpi-conduit/contrib/gasnetrun_mpi) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_FIX_EXEC(ibv-conduit/contrib/gasnetrun_ibv) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_cv_exec_list="$gasnet_cv_exec_list ibv-conduit/contrib/gasnetrun_ibv" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FIX_EXEC(ibv-conduit/contrib/gasnetrun_ibv) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_FIX_EXEC(ofi-conduit/contrib/gasnetrun_ofi) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_cv_exec_list="$gasnet_cv_exec_list ofi-conduit/contrib/gasnetrun_ofi" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FIX_EXEC(ofi-conduit/contrib/gasnetrun_ofi) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_FIX_EXEC(ucx-conduit/contrib/gasnetrun_ucx) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_cv_exec_list="$gasnet_cv_exec_list ucx-conduit/contrib/gasnetrun_ucx" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FIX_EXEC(ucx-conduit/contrib/gasnetrun_ucx) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_FIX_EXEC(other/contrib/gasnet_trace) vvvvvvvvvvvvvvvvvvvvvv (L:4) gasnet_cv_exec_list="$gasnet_cv_exec_list other/contrib/gasnet_trace" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FIX_EXEC(other/contrib/gasnet_trace) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test "$gasnet_toolsonly_mode" = "no" ; then cat >>$CONDUIT_LIST <>$CONDUIT_LIST <> $CONDUIT_LIST # The following intentionally mirror the definitions in conduit fragments # These are intentionally non-additive, to help ensure configure checks add things to the # appropriate sub-variable and NOT add things directly to CFLAGS which gets overwritten # Do NOT change the following lines!!! CFLAGS="$GASNET_OPT_CFLAGS $MISC_CFLAGS" CPPFLAGS="$GASNET_EXTRA_DEFINES $MISC_CPPFLAGS" CXXFLAGS="$GASNET_OPT_CXXFLAGS $MISC_CXXFLAGS" # vvvvvvvvvvvvvvvvvvvvvv GASNET_SPLIT_LINKER_OPTS([LDFLAGS],[LIBS]) vvvvvvvvvvvvvvvvvvvvvv (L:4) eval gasnet_fn_split_linker_opts LDFLAGS LIBS $LDFLAGS $LIBS #echo "LDFLAGS=[$]LDFLAGS" #echo "LIBS=[$]LIBS" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SPLIT_LINKER_OPTS([LDFLAGS],[LIBS]) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # Files added here should also be added to ./unBootstrap # ORDER MATTERS: The order here determines the order of timestamps post-configure, # so ideally Makefile include dependencies should be honored, to prevent redundant # rebuilds of Makefiles during the first build rm -f gasnet_errsave_file gasnet_errsave_err # vvvvvvvvvvvvvvvvvvvvvv GASNET_SAVE_AUTOCONF_ENV vvvvvvvvvvvvvvvvvvvvvv (L:4) for varname in $gasnet_cv_acenv_list; do val=`eval echo '$'"$varname"` if test "$val" != ""; then cachevarname=gasnet_cv_acenv_$varname eval $cachevarname=\"$val\" fi done # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SAVE_AUTOCONF_ENV ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_PUSHPOP_CHECK vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "$_total_pushcnt" -ge "1" ; then echo echo "configure error: INTERNAL ERROR: GASNET_PUSH/POPVAR mismatch: $_total_pushcnt more pushes than pops" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log as_fn_error $? "See $CONFIG_FILE for details." "$LINENO" 5 fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_PUSHPOP_CHECK ^^^^^^^^^^^^^^^^^^^^^^ (L:4) ac_config_files="$ac_config_files other/perlstart config-aux/Makefile other/Makefile other/Makefile-libgasnet.mak other/gasnet_tools-fragment.mak tests/Makefile Makefile other/mpirun_common other/fragment-head.mak other/fragment-body.mak other/Makefile-conduit.mak other/ammpi/Makefile other/amudp/Makefile other/contrib/Makefile other/contrib/gasnet_trace other/firehose/Makefile other/firehose/firehose.mak other/valgrind/Makefile mpi-conduit/Makefile mpi-conduit/conduit.mak mpi-conduit/contrib/Makefile mpi-conduit/contrib/gasnetrun_mpi udp-conduit/Makefile udp-conduit/conduit.mak smp-conduit/Makefile smp-conduit/conduit.mak smp-conduit/contrib/Makefile smp-conduit/contrib/gasnetrun_smp ibv-conduit/Makefile ibv-conduit/conduit.mak ibv-conduit/contrib/Makefile ibv-conduit/contrib/gasnetrun_ibv ucx-conduit/Makefile ucx-conduit/conduit.mak ucx-conduit/contrib/Makefile ucx-conduit/contrib/gasnetrun_ucx ofi-conduit/Makefile ofi-conduit/conduit.mak ofi-conduit/contrib/Makefile ofi-conduit/contrib/gasnetrun_ofi" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${BUILD_IS_SRC_TRUE}" && test -z "${BUILD_IS_SRC_FALSE}"; then as_fn_error $? "conditional \"BUILD_IS_SRC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ALWAYS_TRUECOND_TRUE}" && test -z "${ALWAYS_TRUECOND_FALSE}"; then as_fn_error $? "conditional \"ALWAYS_TRUECOND\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ALWAYS_FALSECOND_TRUE}" && test -z "${ALWAYS_FALSECOND_FALSE}"; then as_fn_error $? "conditional \"ALWAYS_FALSECOND\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NEED_DOCDIR_TRUE}" && test -z "${NEED_DOCDIR_FALSE}"; then as_fn_error $? "conditional \"NEED_DOCDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILDCONFIG_DEBUG_TRUE}" && test -z "${BUILDCONFIG_DEBUG_FALSE}"; then as_fn_error $? "conditional \"BUILDCONFIG_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${VALGRIND_TRUE}" && test -z "${VALGRIND_FALSE}"; then as_fn_error $? "conditional \"VALGRIND\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILDCONFIG_DEBUG_VERBOSE_TRUE}" && test -z "${BUILDCONFIG_DEBUG_VERBOSE_FALSE}"; then as_fn_error $? "conditional \"BUILDCONFIG_DEBUG_VERBOSE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILDCONFIG_TRACE_TRUE}" && test -z "${BUILDCONFIG_TRACE_FALSE}"; then as_fn_error $? "conditional \"BUILDCONFIG_TRACE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILDCONFIG_STATS_TRUE}" && test -z "${BUILDCONFIG_STATS_FALSE}"; then as_fn_error $? "conditional \"BUILDCONFIG_STATS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILDCONFIG_SRCLINES_TRUE}" && test -z "${BUILDCONFIG_SRCLINES_FALSE}"; then as_fn_error $? "conditional \"BUILDCONFIG_SRCLINES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILDCONFIG_DEBUGMALLOC_TRUE}" && test -z "${BUILDCONFIG_DEBUGMALLOC_FALSE}"; then as_fn_error $? "conditional \"BUILDCONFIG_DEBUGMALLOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GASNET_SEGMENT_FAST_TRUE}" && test -z "${GASNET_SEGMENT_FAST_FALSE}"; then as_fn_error $? "conditional \"GASNET_SEGMENT_FAST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GASNET_SEGMENT_LARGE_TRUE}" && test -z "${GASNET_SEGMENT_LARGE_FALSE}"; then as_fn_error $? "conditional \"GASNET_SEGMENT_LARGE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GASNET_SEGMENT_EVERYTHING_TRUE}" && test -z "${GASNET_SEGMENT_EVERYTHING_FALSE}"; then as_fn_error $? "conditional \"GASNET_SEGMENT_EVERYTHING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PLATFORM_ILP32_TRUE}" && test -z "${PLATFORM_ILP32_FALSE}"; then as_fn_error $? "conditional \"PLATFORM_ILP32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PLATFORM_LP64_TRUE}" && test -z "${PLATFORM_LP64_FALSE}"; then as_fn_error $? "conditional \"PLATFORM_LP64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PLATFORM_ILP64_TRUE}" && test -z "${PLATFORM_ILP64_FALSE}"; then as_fn_error $? "conditional \"PLATFORM_ILP64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PLATFORM_ILP32_TRUE}" && test -z "${PLATFORM_ILP32_FALSE}"; then as_fn_error $? "conditional \"PLATFORM_ILP32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PLATFORM_LP64_TRUE}" && test -z "${PLATFORM_LP64_FALSE}"; then as_fn_error $? "conditional \"PLATFORM_LP64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PLATFORM_ILP64_TRUE}" && test -z "${PLATFORM_ILP64_FALSE}"; then as_fn_error $? "conditional \"PLATFORM_ILP64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_EXESUFFIX_TRUE}" && test -z "${HAVE_EXESUFFIX_FALSE}"; then as_fn_error $? "conditional \"HAVE_EXESUFFIX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_SEQ_LIBS_TRUE}" && test -z "${BUILD_SEQ_LIBS_FALSE}"; then as_fn_error $? "conditional \"BUILD_SEQ_LIBS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_PAR_LIBS_TRUE}" && test -z "${BUILD_PAR_LIBS_FALSE}"; then as_fn_error $? "conditional \"BUILD_PAR_LIBS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_PARSYNC_LIBS_TRUE}" && test -z "${BUILD_PARSYNC_LIBS_FALSE}"; then as_fn_error $? "conditional \"BUILD_PARSYNC_LIBS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PTHREAD_TRUE}" && test -z "${HAVE_PTHREAD_FALSE}"; then as_fn_error $? "conditional \"HAVE_PTHREAD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_PSHM_TRUE}" && test -z "${USE_PSHM_FALSE}"; then as_fn_error $? "conditional \"USE_PSHM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TOOLSONLY_MODE_TRUE}" && test -z "${TOOLSONLY_MODE_FALSE}"; then as_fn_error $? "conditional \"TOOLSONLY_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CONDUIT_MODE_TRUE}" && test -z "${CONDUIT_MODE_FALSE}"; then as_fn_error $? "conditional \"CONDUIT_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CXX_TRUE}" && test -z "${HAVE_CXX_FALSE}"; then as_fn_error $? "conditional \"HAVE_CXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_UDP_CONDUIT_TRUE}" && test -z "${USE_UDP_CONDUIT_FALSE}"; then as_fn_error $? "conditional \"USE_UDP_CONDUIT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_MPI_CONDUIT_TRUE}" && test -z "${USE_MPI_CONDUIT_FALSE}"; then as_fn_error $? "conditional \"USE_MPI_CONDUIT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_AMMPI_TRUE}" && test -z "${USE_AMMPI_FALSE}"; then as_fn_error $? "conditional \"USE_AMMPI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_MPI_COMPAT_TRUE}" && test -z "${USE_MPI_COMPAT_FALSE}"; then as_fn_error $? "conditional \"USE_MPI_COMPAT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_MPI_TRUE}" && test -z "${USE_MPI_FALSE}"; then as_fn_error $? "conditional \"USE_MPI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_SMP_CONDUIT_TRUE}" && test -z "${USE_SMP_CONDUIT_FALSE}"; then as_fn_error $? "conditional \"USE_SMP_CONDUIT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_UCX_CONDUIT_TRUE}" && test -z "${USE_UCX_CONDUIT_FALSE}"; then as_fn_error $? "conditional \"USE_UCX_CONDUIT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IBV_SEQ_THREADS_TRUE}" && test -z "${IBV_SEQ_THREADS_FALSE}"; then as_fn_error $? "conditional \"IBV_SEQ_THREADS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_IBV_CONDUIT_TRUE}" && test -z "${USE_IBV_CONDUIT_FALSE}"; then as_fn_error $? "conditional \"USE_IBV_CONDUIT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_OFI_CONDUIT_TRUE}" && test -z "${USE_OFI_CONDUIT_FALSE}"; then as_fn_error $? "conditional \"USE_OFI_CONDUIT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_FI_HMEM_CUDA_TRUE}" && test -z "${HAVE_FI_HMEM_CUDA_FALSE}"; then as_fn_error $? "conditional \"HAVE_FI_HMEM_CUDA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_FI_HMEM_ROCR_TRUE}" && test -z "${HAVE_FI_HMEM_ROCR_FALSE}"; then as_fn_error $? "conditional \"HAVE_FI_HMEM_ROCR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_FI_HMEM_ZE_TRUE}" && test -z "${HAVE_FI_HMEM_ZE_FALSE}"; then as_fn_error $? "conditional \"HAVE_FI_HMEM_ZE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_BOOTSTRAP_MPI_TRUE}" && test -z "${HAVE_BOOTSTRAP_MPI_FALSE}"; then as_fn_error $? "conditional \"HAVE_BOOTSTRAP_MPI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_BOOTSTRAP_SSH_TRUE}" && test -z "${HAVE_BOOTSTRAP_SSH_FALSE}"; then as_fn_error $? "conditional \"HAVE_BOOTSTRAP_SSH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_BOOTSTRAP_PMI_TRUE}" && test -z "${HAVE_BOOTSTRAP_PMI_FALSE}"; then as_fn_error $? "conditional \"HAVE_BOOTSTRAP_PMI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_MK_CLASS_CUDA_UVA_TRUE}" && test -z "${HAVE_MK_CLASS_CUDA_UVA_FALSE}"; then as_fn_error $? "conditional \"HAVE_MK_CLASS_CUDA_UVA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_MK_CLASS_HIP_TRUE}" && test -z "${HAVE_MK_CLASS_HIP_FALSE}"; then as_fn_error $? "conditional \"HAVE_MK_CLASS_HIP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_MK_CLASS_ZE_TRUE}" && test -z "${HAVE_MK_CLASS_ZE_FALSE}"; then as_fn_error $? "conditional \"HAVE_MK_CLASS_ZE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_PLPA_TRUE}" && test -z "${USE_PLPA_FALSE}"; then as_fn_error $? "conditional \"USE_PLPA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DEBUGMALLOC_TRUE}" && test -z "${DEBUGMALLOC_FALSE}"; then as_fn_error $? "conditional \"DEBUGMALLOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GNU_NM_TRUE}" && test -z "${GNU_NM_FALSE}"; then as_fn_error $? "conditional \"GNU_NM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by GASNet $as_me 2025.8.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to . GASNet home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ GASNet config.status 2025.8.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" PERL="$PERL" # for GASNET_TRUE_UNDEF # vvvvvvvvvvvvvvvvvvvvvv GASNET_FIX_EXEC_SETUP vvvvvvvvvvvvvvvvvvvvvv (L:4) if test "\${config_commands+set}" != set ; then config_commands="default" fi CONFIG_COMMANDS="\$config_commands" gasnet_cv_exec_list="$gasnet_cv_exec_list" # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FIX_EXEC_SETUP ^^^^^^^^^^^^^^^^^^^^^^ (L:4) _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "gasnet_config.h") CONFIG_HEADERS="$CONFIG_HEADERS gasnet_config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "other/perlstart") CONFIG_FILES="$CONFIG_FILES other/perlstart" ;; "config-aux/Makefile") CONFIG_FILES="$CONFIG_FILES config-aux/Makefile" ;; "other/Makefile") CONFIG_FILES="$CONFIG_FILES other/Makefile" ;; "other/Makefile-libgasnet.mak") CONFIG_FILES="$CONFIG_FILES other/Makefile-libgasnet.mak" ;; "other/gasnet_tools-fragment.mak") CONFIG_FILES="$CONFIG_FILES other/gasnet_tools-fragment.mak" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "other/mpirun_common") CONFIG_FILES="$CONFIG_FILES other/mpirun_common" ;; "other/fragment-head.mak") CONFIG_FILES="$CONFIG_FILES other/fragment-head.mak" ;; "other/fragment-body.mak") CONFIG_FILES="$CONFIG_FILES other/fragment-body.mak" ;; "other/Makefile-conduit.mak") CONFIG_FILES="$CONFIG_FILES other/Makefile-conduit.mak" ;; "other/ammpi/Makefile") CONFIG_FILES="$CONFIG_FILES other/ammpi/Makefile" ;; "other/amudp/Makefile") CONFIG_FILES="$CONFIG_FILES other/amudp/Makefile" ;; "other/contrib/Makefile") CONFIG_FILES="$CONFIG_FILES other/contrib/Makefile" ;; "other/contrib/gasnet_trace") CONFIG_FILES="$CONFIG_FILES other/contrib/gasnet_trace" ;; "other/firehose/Makefile") CONFIG_FILES="$CONFIG_FILES other/firehose/Makefile" ;; "other/firehose/firehose.mak") CONFIG_FILES="$CONFIG_FILES other/firehose/firehose.mak" ;; "other/valgrind/Makefile") CONFIG_FILES="$CONFIG_FILES other/valgrind/Makefile" ;; "mpi-conduit/Makefile") CONFIG_FILES="$CONFIG_FILES mpi-conduit/Makefile" ;; "mpi-conduit/conduit.mak") CONFIG_FILES="$CONFIG_FILES mpi-conduit/conduit.mak" ;; "mpi-conduit/contrib/Makefile") CONFIG_FILES="$CONFIG_FILES mpi-conduit/contrib/Makefile" ;; "mpi-conduit/contrib/gasnetrun_mpi") CONFIG_FILES="$CONFIG_FILES mpi-conduit/contrib/gasnetrun_mpi" ;; "udp-conduit/Makefile") CONFIG_FILES="$CONFIG_FILES udp-conduit/Makefile" ;; "udp-conduit/conduit.mak") CONFIG_FILES="$CONFIG_FILES udp-conduit/conduit.mak" ;; "smp-conduit/Makefile") CONFIG_FILES="$CONFIG_FILES smp-conduit/Makefile" ;; "smp-conduit/conduit.mak") CONFIG_FILES="$CONFIG_FILES smp-conduit/conduit.mak" ;; "smp-conduit/contrib/Makefile") CONFIG_FILES="$CONFIG_FILES smp-conduit/contrib/Makefile" ;; "smp-conduit/contrib/gasnetrun_smp") CONFIG_FILES="$CONFIG_FILES smp-conduit/contrib/gasnetrun_smp" ;; "ibv-conduit/Makefile") CONFIG_FILES="$CONFIG_FILES ibv-conduit/Makefile" ;; "ibv-conduit/conduit.mak") CONFIG_FILES="$CONFIG_FILES ibv-conduit/conduit.mak" ;; "ibv-conduit/contrib/Makefile") CONFIG_FILES="$CONFIG_FILES ibv-conduit/contrib/Makefile" ;; "ibv-conduit/contrib/gasnetrun_ibv") CONFIG_FILES="$CONFIG_FILES ibv-conduit/contrib/gasnetrun_ibv" ;; "ucx-conduit/Makefile") CONFIG_FILES="$CONFIG_FILES ucx-conduit/Makefile" ;; "ucx-conduit/conduit.mak") CONFIG_FILES="$CONFIG_FILES ucx-conduit/conduit.mak" ;; "ucx-conduit/contrib/Makefile") CONFIG_FILES="$CONFIG_FILES ucx-conduit/contrib/Makefile" ;; "ucx-conduit/contrib/gasnetrun_ucx") CONFIG_FILES="$CONFIG_FILES ucx-conduit/contrib/gasnetrun_ucx" ;; "ofi-conduit/Makefile") CONFIG_FILES="$CONFIG_FILES ofi-conduit/Makefile" ;; "ofi-conduit/conduit.mak") CONFIG_FILES="$CONFIG_FILES ofi-conduit/conduit.mak" ;; "ofi-conduit/contrib/Makefile") CONFIG_FILES="$CONFIG_FILES ofi-conduit/contrib/Makefile" ;; "ofi-conduit/contrib/gasnetrun_ofi") CONFIG_FILES="$CONFIG_FILES ofi-conduit/contrib/gasnetrun_ofi" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then ac_cs_awk_getline=: ac_cs_awk_pipe_init= ac_cs_awk_read_file=' while ((getline aline < (F[key])) > 0) print(aline) close(F[key])' ac_cs_awk_pipe_fini= else ac_cs_awk_getline=false ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" ac_cs_awk_read_file=' print "|#_!!_#|" print "cat " F[key] " &&" '$ac_cs_awk_pipe_init # The final `:' finishes the AND list. ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' fi ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 rm -f conf$$files.sh { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } if (nfields == 3 && !substed) { key = field[2] if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { \$ac_cs_awk_read_file next } } print line } \$ac_cs_awk_pipe_fini _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then $AWK -f "$ac_tmp/subs.awk" else $AWK -f "$ac_tmp/subs.awk" | $SHELL fi \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "default":C) # vvvvvvvvvvvvvvvvvvvvvv GASNET_FIX_EXEC_OUTPUT vvvvvvvvvvvvvvvvvvvvvv (L:4) for file in $gasnet_cv_exec_list; do case "$CONFIG_FILES" in *${file}*) chmod +x ${file} ;; esac done # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_FIX_EXEC_OUTPUT ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_SANITIZE_PACKAGE(gasnet_config.h) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -f 'gasnet_config.h' -a -n "`grep PACKAGE_NAME 'gasnet_config.h'`" ; then mv 'gasnet_config.h' 'gasnet_config.h.dirty' cat 'gasnet_config.h.dirty' | grep -v '#define PACKAGE_' > 'gasnet_config.h' rm -f 'gasnet_config.h.dirty' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_SANITIZE_PACKAGE(gasnet_config.h) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) # vvvvvvvvvvvvvvvvvvvvvv GASNET_TRUE_UNDEF(gasnet_config.h) vvvvvvvvvvvvvvvvvvvvvv (L:4) if test -f 'gasnet_config.h' -a -n "`grep '#trueundef' 'gasnet_config.h'`" ; then PERL=${PERL:-perl} $PERL -pi.dirty -e 's/^\s*#\s*trueundef\s/#undef /' 'gasnet_config.h' rm -f 'gasnet_config.h.dirty' fi # ^^^^^^^^^^^^^^^^^^^^^^ GASNET_TRUE_UNDEF(gasnet_config.h) ^^^^^^^^^^^^^^^^^^^^^^ (L:4) if test -f ".gasnet_cv_configure_warnings.tmp" ; then echo "--------------------------------------------------------------------" >&2 echo "--------------------------------------------------------------------" >&5 echo "configure warning summary:" >&2 echo "configure warning summary:" >&5 echo " " >&2 echo " " >&5 cat ".gasnet_cv_configure_warnings.tmp" >&2 cat ".gasnet_cv_configure_warnings.tmp" >&5 mv ".gasnet_cv_configure_warnings.tmp" ".gasnet_cv_configure_warnings.tmp"- if test -n "$GASNET_CONFIGURE_WARNING_GLOBAL" ; then cat ".gasnet_cv_configure_warnings.tmp"- >> "$GASNET_CONFIGURE_WARNING_GLOBAL" fi rm -f ".gasnet_cv_configure_warnings.tmp" ".gasnet_cv_configure_warnings.tmp"- fi CONDUIT_LIST=.gasnet-conduit-list.tmp if test -n "$CONDUIT_LIST" ; then CONDUIT_LIST_CLEAN=no else CONDUIT_LIST=.gasnet-conduit-list.tmp CONDUIT_LIST_CLEAN=yes fi if test -f "$CONDUIT_LIST" ; then if test "$CONDUIT_LIST_SUPPRESS" != "yes" ; then cat $CONDUIT_LIST fi if test "$CONDUIT_LIST_CLEAN" != "yes" ; then rm -f $CONDUIT_LIST fi fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi gasnet-2025.8.0/gasnet_pshm.c0000664000175000017500000021050515142313673016101 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_pshm.c $ * Description: GASNet infrastructure for shared memory communications * Copyright 2012, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #if GASNET_PSHM /* Otherwise file is empty */ #if GASNETI_PSHM_SYSV #define GASNETI_PSHM_API sysv #elif GASNETI_PSHM_POSIX #define GASNETI_PSHM_API posix #elif GASNETI_PSHM_FILE #if GASNETI_USE_HUGETLBFS #define GASNETI_PSHM_API hugetlbfs #else #define GASNETI_PSHM_API file #endif #elif GASNETI_PSHM_XPMEM #define GASNETI_PSHM_API xpmem #else #error "Unknown PSHM API" #endif GASNETI_IDENT(gasneti_IdentString_PSHM, "$GASNetPSHM: " _STRINGIFY(GASNETI_PSHM_API) " $"); #include /* for gasnetc_handler[] */ #include /* for gasneti_{prepare_alloc,commit_free}_buffer() */ #include #include #if defined(GASNETI_USE_GENERIC_ATOMICOPS) || defined(GASNETI_USE_OS_ATOMICOPS) #error "GASNet PSHM support requires Native atomics" #endif /* payload memory available for outstanding requests in units of max message size */ #define GASNETI_PSHM_NETWORK_DEPTH_DEFAULT (32UL) #define GASNETI_PSHM_NETWORK_DEPTH_MIN (4UL) #define GASNETI_PSHM_NETWORK_DEPTH_MAX ((unsigned long)GASNETI_ATOMIC_MAX/GASNETI_PSHMNET_ALLOC_MAXSZ) /* Global vars */ gasneti_pshmnet_t *gasneti_request_pshmnet = NULL; gasneti_pshmnet_t *gasneti_reply_pshmnet = NULL; /* Structure for PSHM intra-supernode barrier */ gasneti_pshm_barrier_t *gasneti_pshm_barrier = NULL; /* lives in shared space */ static unsigned long gasneti_pshmnet_network_depth = GASNETI_PSHM_NETWORK_DEPTH_DEFAULT; static uintptr_t gasneti_pshmnet_queue_mem = 0; static void *gasnetc_pshmnet_region = NULL; static struct gasneti_pshm_info { gasneti_atomic_t bootstrap_barrier_cnt; char _pad1[GASNETI_CACHE_PAD(sizeof(gasneti_atomic_t))]; gasneti_atomic_t bootstrap_barrier_gen; char _pad2[GASNETI_CACHE_PAD(sizeof(gasneti_atomic_t))]; /* early_barrier will be overwritten by other vars after its completion */ /* sig_atomic_t should be wide enough to avoid word-tearing, right? */ union { volatile sig_atomic_t val; char _pad[GASNETI_CACHE_LINE_BYTES]; } early_barrier[1]; /* variable length array */ } *gasneti_pshm_info = NULL; #define GASNETI_PSHM_BSB_LIMIT (GASNETI_ATOMIC_MAX - 3) // Limit of natural progression #define GASNETI_PSHM_BSB_ABORT (GASNETI_ATOMIC_MAX - 2) // Sentinel to trigger abnormal termination #define round_up_to_pshmpage(size_or_addr) \ GASNETI_ALIGNUP(size_or_addr, GASNETI_PSHMNET_PAGESIZE) #define pshmnet_get_struct_addr_from_field_addr(structname, fieldname, fieldaddr) \ ((structname*)(((uintptr_t)fieldaddr) - offsetof(structname,fieldname))) static const char *gasnetc_pshm_abort_context = ""; static void (*gasnetc_pshm_abort_callback)(void); void gasneti_pshm_prefault(void *addr, size_t len) { uint8_t *p = addr; // Full pages: for (size_t i = 0; i < len; i+= GASNET_PAGESIZE) { p[i] = 0; } // Final byte, possibly redundant p[len-1] = 0; } void *gasneti_pshm_init(gasneti_bootstrapBroadcastfn_t nbrhdbcastfn, size_t aux_sz) { size_t vnetsz, mmapsz; int discontig = 0; gex_Rank_t i; #if !GASNET_CONDUIT_SMP gex_Rank_t j; #endif gasneti_assert(nbrhdbcastfn != NULL); /* NULL nbrhdbcastfn no longer supported */ gasneti_assert_always_uint(gasneti_nodemap_local_count ,<=, GASNETI_PSHM_MAX_NODES); gasneti_pshm_nodes = gasneti_nodemap_local_count; gasneti_pshm_mynode = gasneti_nodemap_local_rank; gasneti_pshm_firstnode = gasneti_nodemap_local[0]; if (gasneti_pshm_nodes == 1) { gasneti_use_shared_allocator = gasneti_getenv_yesno_withdefault("GASNET_USE_PSHM_SINGLETON", 0); } else { // For multi-process nbrhd we must use PSHM-aware memory allocation. gasneti_assert( gasneti_use_shared_allocator ); } #if GASNET_CONDUIT_SMP gasneti_assert_uint(gasneti_pshm_nodes ,==, gasneti_nodes); gasneti_assert_uint(gasneti_pshm_mynode ,==, gasneti_mynode); gasneti_assert_uint(gasneti_pshm_firstnode ,==, 0); #else /* Determine if local supernode members are numbered contiguously */ for (i = 1; i < gasneti_nodemap_local_count; ++i) { if (gasneti_nodemap_local[i] != gasneti_pshm_firstnode + i) { discontig = 1; break; } } #endif // vars for gasneti_pshm_jobrank_in_supernode: if (discontig) { gasneti_pshm_first_or_self = gasneti_mynode; gasneti_pshm_nodes_or_one = 1; } else { gasneti_pshm_first_or_self = gasneti_pshm_firstnode; gasneti_pshm_nodes_or_one = gasneti_pshm_nodes; } gasneti_assert(gasneti_nodemap_global_count > 0); /* compute size of vnet shared memory region */ vnetsz = gasneti_pshmnet_memory_needed(gasneti_pshm_nodes); mmapsz = (2*vnetsz); size_t info_sz; { // gasneti_pshm_info contains different data (of variable length) at different times // 1. Space for the bootstrap barrier (long-lived) // The later allocations assume alignment size_t sz1 = offsetof(struct gasneti_pshm_info, early_barrier); gasneti_assert_uint(sz1 ,==, GASNETI_ALIGNUP(sz1, GASNETI_CACHE_LINE_BYTES)); gasneti_assert_uint(sz1 ,==, GASNETI_ALIGNUP(sz1, sizeof(gasneti_pshm_rank_t))); // 2a. Space for the early barrier (short-lived) size_t sz2a = gasneti_pshm_nodes * sizeof(gasneti_pshm_info->early_barrier[0]); // 2b. Space for long-lived data, recycling space from the early barrier // gasneti_pshm_firsts: size_t sz2b = (gasneti_nodemap_global_count * sizeof(gex_Rank_t)); // optional gasneti_pshm_rankmap[], properly aligned for its type if (discontig) { sz2b = GASNETI_ALIGNUP(sz2b, sizeof(gasneti_pshm_rank_t)); sz2b += gasneti_nodes * sizeof(gasneti_pshm_rank_t); } // PSHM intra-node barrier (cache aligned) sz2b = GASNETI_ALIGNUP(sz2b, GASNETI_CACHE_LINE_BYTES); sz2b += sizeof(gasneti_pshm_barrier_t) + (gasneti_pshm_nodes - 1) * sizeof(gasneti_pshm_barrier->node); #ifdef GASNETI_PSHM_PRIVATE_DATA_SIZE // Optional data private to an implementaion of PSHM sz2b = GASNETI_ALIGNUP(sz2b, GASNETI_CACHE_LINE_BYTES); sz2b += GASNETI_PSHM_PRIVATE_DATA_SIZE(); #endif // final info_sz required: info_sz = sz1 + MAX(sz2a, sz2b); // total to request: mmapsz += round_up_to_pshmpage(info_sz); } size_t padded_aux_sz = round_up_to_pshmpage(aux_sz); mmapsz += padded_aux_sz; // Report size before allocation to help identify out-of-memory crashes { const char *msg = "Allocating shared memory in nbrhd %d (containing %d procs): %s for intra-nbrhd AMs and %s for conduit use"; char valstr1[32], valstr2[32]; gasnett_format_number(mmapsz - padded_aux_sz, valstr1, sizeof(valstr1), 1); gasnett_format_number(padded_aux_sz, valstr2, sizeof(valstr2), 1); GASNETI_TRACE_PRINTF(I,(msg, gasneti_nodemap_global_rank, gasneti_nodemap_local_count, valstr1, valstr2)); if (!gasneti_mynode && gasneti_getenv_yesno_withdefault("GASNET_AMPSHM_MEMORY_REPORT", 0)) { gasneti_console_message("INFO", msg, gasneti_nodemap_global_rank, gasneti_nodemap_local_count, valstr1, valstr2); } } /* setup vnet shared memory region for AM infrastructure and supernode barrier. */ gasnetc_pshmnet_region = gasneti_mmap_vnet(mmapsz, nbrhdbcastfn); gasneti_assert_always_uint((((uintptr_t)gasnetc_pshmnet_region) % GASNETI_PSHMNET_PAGESIZE) ,==, 0); if (gasnetc_pshmnet_region == NULL) { const int save_errno = errno; char buf[16]; gasneti_unlink_vnet(); gasneti_fatalerror("Failed to mmap %s for intra-nbrhd shared memory communication, errno=%s(%i)", gasneti_format_number(mmapsz, buf, sizeof(buf), 1), strerror(save_errno), save_errno); } /* Prepare the shared info struct (including bootstrap barrier) */ gasneti_pshm_info = (struct gasneti_pshm_info *)((uintptr_t)gasnetc_pshmnet_region + 2*vnetsz); /* "early" barrier which protects initialization of the real barrier counter. */ gasneti_local_wmb(); if (gasneti_pshm_mynode) { gasneti_pshm_info->early_barrier[gasneti_pshm_mynode].val = 1; gasneti_waituntil(gasneti_pshm_info->early_barrier[0].val != 0); } else { for (i = 1; i < gasneti_pshm_nodes; ++i) { gasneti_waituntil(gasneti_pshm_info->early_barrier[i].val != 0); } // We prefault at init time to avoid risk of SIG{BUS,SEGV} later (part of bug 3693). // We do so here to avoid colliding with `early_barrier` (the cause of bug 3943). gasneti_pshm_prefault(gasneti_pshm_info, info_sz); gasneti_atomic_set(&gasneti_pshm_info->bootstrap_barrier_cnt, gasneti_pshm_nodes, 0); gasneti_atomic_set(&gasneti_pshm_info->bootstrap_barrier_gen, 0, 0); gasneti_local_wmb(); gasneti_pshm_info->early_barrier[0].val = 1; } /* Unlink the shared memory file to prevent leaks. * "early" barrier above ensures all procs have attached. */ gasneti_unlink_vnet(); /* Carve out various allocations, reusing the "early barrier" space. */ gasneti_pshmnet_bootstrapBarrier(); { uintptr_t addr = (uintptr_t)&gasneti_pshm_info->early_barrier; /* gasneti_pshm_firsts, an array of gasneti_nodemap_global_count*sizeof(gex_Rank_t): */ gasneti_pshm_firsts = (gex_Rank_t *)addr; addr += gasneti_nodemap_global_count * sizeof(gex_Rank_t); /* optional rankmap: */ if (discontig) { addr = GASNETI_ALIGNUP(addr, sizeof(gasneti_pshm_rank_t)); gasneti_pshm_rankmap = (gasneti_pshm_rank_t *)addr; addr += gasneti_nodes * sizeof(gasneti_pshm_rank_t); } /* intra-supernode barrier: */ addr = GASNETI_ALIGNUP(addr, GASNETI_CACHE_LINE_BYTES); gasneti_pshm_barrier = (gasneti_pshm_barrier_t *)addr; addr += sizeof(gasneti_pshm_barrier_t) + (gasneti_pshm_nodes-1) * sizeof(gasneti_pshm_barrier->node); #ifdef GASNETI_PSHM_PRIVATE_DATA_INIT // Optional private data (per implementaion of PSHM) // If used, must be last since this does not advance 'addr'. GASNETI_PSHM_PRIVATE_DATA_INIT(addr); #endif } /* Populate gasneti_pshm_firsts[] */ if (!gasneti_pshm_mynode) gasneti_pshm_firsts[0] = 0; #if !GASNET_CONDUIT_SMP for (i=j=1; i, gasneti_pshm_firsts[i-1]); gasneti_assert_uint(gasneti_nodemap[gasneti_pshm_firsts[i]] ,==, gasneti_pshm_firsts[i]); } } #endif /* construct rankmap, if any, with first node doing all the work. */ if (discontig) { if (gasneti_pshm_mynode == 0) { /* First node does all the work */ memset(gasneti_pshm_rankmap, 0xff, gasneti_nodes * sizeof(gasneti_pshm_rank_t)); for (i = 0; i < gasneti_pshm_nodes; ++i) { gasneti_pshm_rankmap[gasneti_nodemap_local[i]] = i; } } } /* Collective call to initialize Shared AM "networks" */ gasneti_request_pshmnet = gasneti_pshmnet_init(gasnetc_pshmnet_region, vnetsz, gasneti_pshm_nodes); gasneti_reply_pshmnet = gasneti_pshmnet_init((void*)((uintptr_t)gasnetc_pshmnet_region + vnetsz), vnetsz, gasneti_pshm_nodes); /* Ensure all peers are initialized before return */ gasneti_pshmnet_bootstrapBarrier(); /* Return the conduit's portion, if any */ return aux_sz ? (void*)((uintptr_t)gasnetc_pshmnet_region + mmapsz - round_up_to_pshmpage(aux_sz)) : NULL; } /******************************************************************************* * PSHM global variables: ******************************************************************************/ gasneti_pshm_rank_t gasneti_pshm_nodes = 0; gex_Rank_t gasneti_pshm_firstnode = (gex_Rank_t)(-1); gasneti_pshm_rank_t gasneti_pshm_mynode = (gasneti_pshm_rank_t)(-1); gex_Rank_t gasneti_pshm_first_or_self = (gex_Rank_t)(-1); gasneti_pshm_rank_t gasneti_pshm_nodes_or_one = (gasneti_pshm_rank_t)(-1); /* vectors constructed in shared space: */ gasneti_pshm_rank_t *gasneti_pshm_rankmap = NULL; gex_Rank_t *gasneti_pshm_firsts = NULL; /******************************************************************************* * "PSHM Net": message header formats * These come early because their sizes influence allocation ******************************************************************************/ // NOTE: // If sizes of these types changes, such that gasneti_pshmnet_allocator_block_t // also changes size, one must update GASNETC_MAX_MEDIUM_NBRHD_DFLT in gasnetex.h // to ensure a tight fit in 64KB: // sizeof(gasneti_pshmnet_allocator_block_t) == 65536 /* TODO: Could/should we squeeze unused args out of a Medium.*/ /* TODO: Pack category and numargs together (makes assumtion about ranges) */ typedef struct { gex_Rank_t source; gex_AM_Index_t handler_id; uint8_t category; /* AM msg type: short, med, long */ uint8_t numargs; gex_AM_Arg_t args[GASNETC_MAX_ARGS_NBRHD]; } gasneti_AMPSHM_msg_t; typedef gasneti_AMPSHM_msg_t gasneti_AMPSHM_shortmsg_t; typedef struct { gasneti_AMPSHM_msg_t msg; uint32_t numbytes; uint8_t mediumdata[1]; // flexible array member } gasneti_AMPSHM_medmsg_t; // Note: we round offset up to GASNETI_MEDBUF_ALIGNMENT boundary, since that is where payload will be placed #define GASNETI_AMPSHM_MEDMSG_DATA_OFFSET \ GASNETI_ALIGNUP(offsetof(gasneti_AMPSHM_medmsg_t,mediumdata), GASNETI_MEDBUF_ALIGNMENT) #define GASNETI_SIZEOF_AMPSHM_MEDMSG_T (GASNETI_AMPSHM_MEDMSG_DATA_OFFSET + GASNETC_MAX_MEDIUM_NBRHD) typedef struct { gasneti_AMPSHM_msg_t msg; uint32_t numbytes; void * longdata; } gasneti_AMPSHM_longmsg_t; typedef union { gasneti_AMPSHM_shortmsg_t Short; gasneti_AMPSHM_medmsg_t Medium; gasneti_AMPSHM_longmsg_t Long; } gasneti_AMPSHM_maxmsg_t; #define GASNETI_SIZEOF_AMPSHM_MAXMSG_T GASNETI_SIZEOF_AMPSHM_MEDMSG_T /* atomic operations on queue tail */ #if defined(GASNETI_HAVE_ATOMIC_CAS) typedef gasneti_atomic_t gasneti_pshmnet_tail_t; #define gasneti_pshmnet_tail_init(_t)\ gasneti_atomic_set((_t),0,0) #define gasneti_pshmnet_tail_cas(_t,_o,_n)\ gasneti_atomic_compare_and_swap((_t),(_o),(_n),0) #define gasneti_pshmnet_tail_swap(_t,_v)\ gasneti_atomic_swap((_t),(_v),GASNETI_ATOMIC_REL) #elif defined(GASNETI_HAVE_ATOMIC_ADD_SUB) typedef struct { gasneti_atomic_t last_ticket; gasneti_atomic_t curr_ticket; gasneti_atomic_val_t value; } gasneti_pshmnet_tail_t; GASNETI_INLINE(gasneti_pshmnet_tail_init) void gasneti_pshmnet_tail_init(gasneti_pshmnet_tail_t *t) { t->value = 0; gasneti_atomic_set(&t->last_ticket, 0, 0); gasneti_atomic_set(&t->curr_ticket, 1, 0); } GASNETI_INLINE(gasneti_pshmnet_tail_lock) gasneti_atomic_val_t gasneti_pshmnet_tail_lock(gasneti_pshmnet_tail_t *t) { const gasneti_atomic_val_t my_ticket = gasneti_atomic_add(&t->last_ticket, 1, 0); gasneti_waituntil(my_ticket == gasneti_atomic_read(&t->curr_ticket, 0)); /* includes RMB */ return my_ticket; } GASNETI_INLINE(gasneti_pshmnet_tail_unlock) void gasneti_pshmnet_tail_unlock(gasneti_pshmnet_tail_t *t, gasneti_atomic_val_t my_ticket) { gasneti_atomic_set(&t->curr_ticket, my_ticket+1, GASNETI_ATOMIC_REL); } GASNETI_INLINE(gasneti_pshmnet_tail_cas) int gasneti_pshmnet_tail_cas(gasneti_pshmnet_tail_t *t, gasneti_atomic_val_t oldval, gasneti_atomic_val_t newval) { gasneti_atomic_val_t my_ticket = gasneti_pshmnet_tail_lock(t); int result; if_pt (result = (t->value == oldval)) t->value = newval; gasneti_pshmnet_tail_unlock(t, my_ticket); return result; } GASNETI_INLINE(gasneti_pshmnet_tail_swap) gasneti_atomic_val_t gasneti_pshmnet_tail_swap(gasneti_pshmnet_tail_t *t, gasneti_atomic_val_t newval) { gasneti_atomic_val_t my_ticket = gasneti_pshmnet_tail_lock(t); gasneti_atomic_val_t result; result = t->value; t->value = newval; gasneti_pshmnet_tail_unlock(t, my_ticket); return result; } #else #error "Platform is missing both atomic ADD and atomic CAS" #endif /* queue of descriptors for messages received * * Based on Nemesis queues as documented in * D. Buntinas, G. Mercier, and W. Gropp, "Design and Evaluation of Nemesis, * a Scalable, Low-Latency, Message-Passing Communication Subsystem", * in Proc. CCGRID, 2006, pp.521-530. */ typedef struct gasneti_pshmnet_queue { /* Producers' cache line: */ gasneti_pshmnet_tail_t tail; volatile gasneti_atomic_val_t head; char _pad0[GASNETI_CACHE_PAD(sizeof(gasneti_pshmnet_tail_t) + sizeof(gasneti_atomic_val_t))]; /* Consumers' cache line: */ volatile gasneti_atomic_val_t shead; /* shadow head */ char _pad1[GASNETI_CACHE_PAD(sizeof(gasneti_atomic_val_t))]; } gasneti_pshmnet_queue_t; struct gasneti_pshmnet_allocator; /* forward definition */ /* message payload metadata */ typedef struct gasneti_pshmnet_payload { volatile gasneti_atomic_val_t next; struct gasneti_pshmnet_allocator *allocator; gasneti_pshm_rank_t from; size_t len; gasneti_AMPSHM_maxmsg_t data; } gasneti_pshmnet_payload_t; #define GASNETI_SIZEOF_PSHMNET_PAYLOAD_T \ (offsetof(gasneti_pshmnet_payload_t,data) + GASNETI_SIZEOF_AMPSHM_MAXMSG_T) /****************************************************************************** * Payload memory allocator interface. * * Keep the payload allocator interface clean, so we can change algorithms. ******************************************************************************/ /* Memory layout of allocator. * * Logically, we have this layout: * * 1) Atomic used by allocator as 'in use' bit * 2) A gasneti_pshmnet_payload_t, used by pshmnet * * Allocator returns #2 to the caller * NOTE: placement of #1 ensures no reference to offset==0 is ever used */ typedef struct { gasneti_atomic_t in_use; gasneti_pshmnet_payload_t payload; } gasneti_pshmnet_allocator_block_t; #define GASNETI_SIZEOF_PSHMNET_ALLOCATOR_BLOCK_T \ (offsetof(gasneti_pshmnet_allocator_block_t,payload) + GASNETI_SIZEOF_PSHMNET_PAYLOAD_T) #define GASNETI_PSHMNET_ALLOC_MAXSZ \ round_up_to_pshmpage(GASNETI_SIZEOF_PSHMNET_ALLOCATOR_BLOCK_T) #define GASNETI_PSHMNET_ALLOC_MAXPG (GASNETI_PSHMNET_ALLOC_MAXSZ >> GASNETI_PSHMNET_PAGESHIFT) #define GASNETI_PSHMNET_MAX_PAYLOAD \ (GASNETI_PSHMNET_ALLOC_MAXSZ - offsetof(gasneti_pshmnet_allocator_block_t, payload.data)) #define GASNETI_PSHMNET_MIN_PAYLOAD \ (GASNETI_PSHMNET_PAGESIZE - offsetof(gasneti_pshmnet_allocator_block_t, payload.data)) size_t gasneti_pshmnet_max_payload(void) { return GASNETI_PSHMNET_MAX_PAYLOAD; } /* This implementation uses a circular queue of variable-sized payloads. * This data structure lives entirely in private memory. * * The allocator's per-block metadata is external to the blocks, and is * stored in the "length" array. There is a length entry for each "page", * but only the entries corresponding to the first page of each block have * defined values. The "length[]", "next" and "count" are all in units * of GASNETI_PSHMNET_PAGESIZE (which must be a power-of-2). */ typedef struct gasneti_pshmnet_allocator { void *region; unsigned int next; unsigned int count; unsigned int length[1]; /* Variable length */ } gasneti_pshmnet_allocator_t; /* WARNING: the amount requested from this allocator must be less than * or equal to GASNETI_PSHMNET_MAX_PAYLOAD (which is at least as large * as sizeof(gasneti_pshmnet_payload_t)). * - returns NULL if no memory available */ static gasneti_pshmnet_allocator_t *gasneti_pshmnet_init_allocator(void *region, size_t len); static gasneti_pshmnet_payload_t * gasneti_pshmnet_alloc(gasneti_pshmnet_allocator_t *a, size_t nbytes); /* Frees memory. Note that this must be callable by a different node */ static void gasneti_pshmnet_free(gasneti_pshmnet_payload_t *p); /****************************************************************************** * ******************************************************************************/ /* Per node view of 'network' of queues in supernode * This struct is stored in private memory. */ struct gasneti_pshmnet { gasneti_pshm_rank_t nodecount; /* nodes in supernode */ gasneti_pshmnet_queue_t *queues; /* array of queue heads */ gasneti_pshmnet_queue_t *my_queue; /* only need to see one's own allocator */ gasneti_pshmnet_allocator_t *my_allocator; #if GASNET_PAR || GASNETI_CONDUIT_THREADS gasneti_mutex_t dequeue_lock; /* serializes dequeue operations */ #endif gasneti_mutex_t alloc_lock; /* serializes buffer allocation */ }; #define gasneti_assert_align(p, align) \ gasneti_assert((((uintptr_t)p) % align) == 0) /* Macros for determining the offset and the real address, used for * the addresses inside the pshmnet region */ #define gasneti_pshm_offset(addr) \ (gasneti_assert(addr != gasnetc_pshmnet_region), \ (gasneti_atomic_val_t)((uintptr_t)(addr) - (uintptr_t)gasnetc_pshmnet_region)) #if PLATFORM_COMPILER_PGI && PLATFORM_COMPILER_VERSION_LT(10,0,0) /* PGI 9.0-0 truncates the macro version to 32-bits! (older than 9.0 not tested) */ GASNETI_INLINE(gasneti_pshm_addr) void * gasneti_pshm_addr(uintptr_t offset) { gasneti_assert(offset); return (void*)(offset + (uintptr_t)gasnetc_pshmnet_region); } #else #define gasneti_pshm_addr(offset) \ (gasneti_assert(offset), \ (void *)((uintptr_t)(offset) + (uintptr_t)gasnetc_pshmnet_region)) #endif static uintptr_t get_queue_mem(int nodes) { /* Need enough to send the full queue depth at max size each */ size_t pernode; gasneti_pshmnet_network_depth = gasneti_getenv_int_withdefault("GASNET_PSHM_NETWORK_DEPTH", GASNETI_PSHM_NETWORK_DEPTH_DEFAULT, 0); if (gasneti_pshmnet_network_depth < GASNETI_PSHM_NETWORK_DEPTH_MIN) { gasneti_console_message("WARNING","GASNET_PSHM_NETWORK_DEPTH (%lu) less than min: using %lu", gasneti_pshmnet_network_depth, GASNETI_PSHM_NETWORK_DEPTH_MIN); gasneti_pshmnet_network_depth = GASNETI_PSHM_NETWORK_DEPTH_MIN; } else if (gasneti_pshmnet_network_depth > GASNETI_PSHM_NETWORK_DEPTH_MAX) { gasneti_console_message("WARNING","GASNET_PSHM_NETWORK_DEPTH (%lu) greater than max: using %lu", gasneti_pshmnet_network_depth, GASNETI_PSHM_NETWORK_DEPTH_MAX); gasneti_pshmnet_network_depth = GASNETI_PSHM_NETWORK_DEPTH_MAX; } pernode = GASNETI_PSHMNET_ALLOC_MAXSZ * gasneti_pshmnet_network_depth; gasneti_assert(pernode > 0); /* round up to multiple of allocator page size */ return round_up_to_pshmpage(pernode); } static size_t gasneti_pshmnet_memory_needed_pernode(gasneti_pshm_rank_t nodes) { /* Space for the message payloads */ if (nodes == 1) return 0; if_pf (!gasneti_pshmnet_queue_mem) { gasneti_pshmnet_queue_mem = get_queue_mem(nodes); } return round_up_to_pshmpage(gasneti_pshmnet_queue_mem); } static size_t gasneti_pshmnet_memory_needed_once(gasneti_pshm_rank_t nodes) { /* Space for the queue headers */ return round_up_to_pshmpage(nodes * sizeof(gasneti_pshmnet_queue_t)); } size_t gasneti_pshmnet_memory_needed(gasneti_pshm_rank_t nodes) { size_t pernode = gasneti_pshmnet_memory_needed_pernode(nodes); size_t once = gasneti_pshmnet_memory_needed_once(nodes); return once + nodes * pernode; } /* Initializes the pshmnet region. Called from each node twice: * to initialize pshmnet_request and pshmnet_reply */ gasneti_pshmnet_t * gasneti_pshmnet_init(void *region, size_t regionlen, gasneti_pshm_rank_t pshmnodes) { gasneti_pshmnet_t *vnet; size_t szonce, szpernode; void *myregion; /* make sure that our max buffer size fits all possible AMs */ gasneti_assert(GASNETI_SIZEOF_AMPSHM_MAXMSG_T <= GASNETI_PSHMNET_MAX_PAYLOAD); gasneti_assert(GASNETI_SIZEOF_AMPSHM_MAXMSG_T >= sizeof(gasneti_AMPSHM_shortmsg_t)); gasneti_assert(GASNETI_SIZEOF_AMPSHM_MAXMSG_T >= GASNETI_SIZEOF_AMPSHM_MEDMSG_T); gasneti_assert(GASNETI_SIZEOF_AMPSHM_MAXMSG_T >= sizeof(gasneti_AMPSHM_longmsg_t)); gasneti_assert((offsetof(gasneti_AMPSHM_medmsg_t, mediumdata) % 4) == 0); // Check GASNETC_MAX_MEDIUM_NBRHD_DFLT (if used) provides tight fit #if (PLATFORM_OS_LINUX || PLATFORM_OS_DARWIN) && \ (PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64) // Arbitrary choice of frequently-tested ABIs known to provide tight fit gasneti_assert((GASNETC_MAX_MEDIUM_NBRHD != GASNETC_MAX_MEDIUM_NBRHD_DFLT) || \ (GASNETI_SIZEOF_PSHMNET_ALLOCATOR_BLOCK_T == 65536)); #else // Other ABIs may have less restrictive alignments (allow 16-byte slack) gasneti_assert((GASNETC_MAX_MEDIUM_NBRHD != GASNETC_MAX_MEDIUM_NBRHD_DFLT) || \ ((GASNETI_SIZEOF_PSHMNET_ALLOCATOR_BLOCK_T <= 65536) && \ (GASNETI_SIZEOF_PSHMNET_ALLOCATOR_BLOCK_T >= 65536 - 16))); #endif szpernode = gasneti_pshmnet_memory_needed_pernode(pshmnodes); szonce = gasneti_pshmnet_memory_needed_once(pshmnodes); if (regionlen < (szonce + szpernode * pshmnodes)) gasneti_fatalerror("Internal error: not enough memory for pshmnet: \n" " given %"PRIuPTR" effective bytes, but need %"PRIuPTR, (uintptr_t)regionlen, (uintptr_t)(szonce + szpernode * pshmnodes)); vnet = gasneti_malloc(sizeof(gasneti_pshmnet_t)); vnet->nodecount = pshmnodes; #if GASNET_PAR || GASNETI_CONDUIT_THREADS gasneti_mutex_init(&vnet->dequeue_lock); #endif gasneti_mutex_init(&vnet->alloc_lock); // initialize my own allocator, only if any intra-nbrhd AM traffic is possible if (pshmnodes > 1) { myregion = (void *)((uintptr_t)region + (szpernode * gasneti_pshm_mynode)); gasneti_assert_align(myregion, GASNETI_PSHMNET_PAGESIZE); vnet->my_allocator = gasneti_pshmnet_init_allocator(myregion, gasneti_pshmnet_queue_mem); } else { vnet->my_allocator = NULL; } // initialize my own queue header, even if any no intra-nbrhd AM traffic is possible. // otherwise, gasneti_AMPSHMPoll() will dereference NULL 'head' and 'shead' vnet->queues = (gasneti_pshmnet_queue_t*)((uintptr_t)region + szpernode * pshmnodes); gasneti_assert_align(vnet->queues, GASNETI_PSHMNET_PAGESIZE); vnet->my_queue = &vnet->queues[gasneti_pshm_mynode]; vnet->my_queue->head = 0; vnet->my_queue->shead = 0; gasneti_pshmnet_tail_init(&vnet->my_queue->tail); gasneti_leak(vnet); return vnet; } void * gasneti_pshmnet_get_send_buffer(gasneti_pshmnet_t *vnet, size_t nbytes, gasneti_pshm_rank_t target /* currently unused */) { gasneti_pshmnet_payload_t *p; void *retval = NULL; gasneti_assert_uint(nbytes ,<=, GASNETI_PSHMNET_MAX_PAYLOAD); gasneti_assert(vnet->my_allocator); p = gasneti_pshmnet_alloc(vnet->my_allocator, nbytes); if (p != NULL) { p->next = 0; p->from = gasneti_pshm_mynode; p->allocator = vnet->my_allocator; retval = &p->data; } return retval; } void gasneti_pshmnet_deliver_send_buffer(gasneti_pshmnet_t *vnet, void *buf, size_t nbytes, gasneti_pshm_rank_t target) { gasneti_pshmnet_payload_t *p = pshmnet_get_struct_addr_from_field_addr(gasneti_pshmnet_payload_t, data, buf); gasneti_pshmnet_queue_t *q = &vnet->queues[target]; gasneti_atomic_val_t my_offset = gasneti_pshm_offset(p); gasneti_atomic_val_t prev_offset; p->len = nbytes; /* Nemesis enqueue: */ prev_offset = gasneti_pshmnet_tail_swap(&q->tail, my_offset); if (prev_offset) { gasneti_pshmnet_payload_t *prev = gasneti_pshm_addr(prev_offset); prev->next = my_offset; } else { q->head = my_offset; } } GASNETI_INLINE(gasneti_pshmnet_queue_peek) int gasneti_pshmnet_queue_peek(const gasneti_pshmnet_queue_t * const q) { return q->shead || q->head; } int gasneti_pshmnet_recv(gasneti_pshmnet_t *vnet, void **pbuf, size_t *psize, gasneti_pshm_rank_t *pfrom) { gasneti_atomic_val_t head; gasneti_pshmnet_payload_t *p = NULL; gasneti_pshmnet_queue_t *q = vnet->my_queue; #if GASNET_PAR || GASNETI_CONDUIT_THREADS if (gasneti_pshmnet_queue_peek(q)) { gasneti_mutex_lock(&vnet->dequeue_lock); #endif /* Nemesis dequeue: */ head = q->shead; if (!head && q->head) { head = q->shead = q->head; q->head = 0; } if_pt (head) { register gasneti_atomic_val_t next; p = gasneti_pshm_addr(head); gasneti_local_rmb(); /* ACQ */ /* NOTE: Unlike in the Nemesis paper, we loop on *both* p->next and * cas(tail) to allow weaker memory models which may reorder their * respective reads/writes. This is preferred over adding any memory * fence(s) to the race-free case. */ while (GASNETT_PREDICT_FALSE(0 == (next = p->next)) && GASNETT_PREDICT_FALSE(!gasneti_pshmnet_tail_cas(&q->tail, head, 0))) { GASNETI_WAITHOOK(); /* waituntil() has excess RMB */ } q->shead = next; } #if GASNET_PAR || GASNETI_CONDUIT_THREADS gasneti_mutex_unlock(&vnet->dequeue_lock); } #endif if (p) { *pbuf = &p->data; *psize = p->len; *pfrom = p->from; } return !p; } /* Note the current behavior if a user forgets to call this function is * NASTY--the message stays marked as state==BUSY, which will cause * senders to think the queue is full. This could cause * deadlock and/or lots of confusion (for me it was the latter). */ void gasneti_pshmnet_recv_release(gasneti_pshmnet_t *vnet, void *buf) { /* Address we handed out was the addr of the 'data' field */ gasneti_pshmnet_payload_t *p = pshmnet_get_struct_addr_from_field_addr(gasneti_pshmnet_payload_t, data, buf); gasneti_pshmnet_free(p); } /****************************************************************************** * PSHMnet bootstrap barrier * - TODO: only good a finite number of times before it wraps! ******************************************************************************/ static void do_pshmnet_barrier(int do_poll) { static gasneti_atomic_val_t generation = 0; gasneti_atomic_val_t curr, target; gasneti_assert(gasneti_pshm_info != NULL); gasneti_assert(gasneti_pshm_nodes > 0); #if GASNET_DEBUG curr = gasneti_atomic_read(&gasneti_pshm_info->bootstrap_barrier_gen, 0); // Check that bootstrap_barrier_gen is correct OR we are in an abnormal // termination. Use of `>=` allows for a race between the termination // request's atomic_set and the atomic_increment below (both in processes // other than the one asserting). gasneti_assert((curr == generation) || (curr >= GASNETI_PSHM_BSB_ABORT)); #endif if (gasneti_atomic_decrement_and_test(&gasneti_pshm_info->bootstrap_barrier_cnt, 0)) { gasneti_atomic_set(&gasneti_pshm_info->bootstrap_barrier_cnt, gasneti_pshm_nodes, 0); gasneti_atomic_increment(&gasneti_pshm_info->bootstrap_barrier_gen, GASNETI_ATOMIC_REL); } target = generation + 1; if_pf (target == GASNETI_PSHM_BSB_LIMIT) { gasneti_fatalerror("PSHM bootstrap barrier exceeded GASNETI_PSHM_BSB_LIMIT"); } if (do_poll) { gasneti_pollwhile((curr = gasneti_atomic_read(&gasneti_pshm_info->bootstrap_barrier_gen, 0)) == generation); } else { gasneti_waitwhile((curr = gasneti_atomic_read(&gasneti_pshm_info->bootstrap_barrier_gen, 0)) == generation); } if_pf (curr >= GASNETI_PSHM_BSB_ABORT) { if (gasnetc_pshm_abort_callback) gasnetc_pshm_abort_callback(); gasneti_fatalerror("PSHM bootstrap barrier aborting as requested"); } gasneti_assert_uint(curr ,==, target); generation = target; if (do_poll) { // Ensuring all AMPoll() calls cease before resuming non-AM traffic do_pshmnet_barrier(0); } } void gasneti_pshmnet_bootstrapBarrier(void) { do_pshmnet_barrier(0); } void gasneti_pshmnet_bootstrapBarrierPoll(void) { do_pshmnet_barrier(1); } /****************************************************************************** * "critical sections" in which we notify peers if we abort() while * they are potentially blocked in gasneti_pshmnet_bootstrapBarrier(). * These DO NOT nest (but there is no checking to ensure that). ******************************************************************************/ static struct { int sig; gasneti_sighandlerfn_t old_hand; } gasneti_pshm_catch_signals[] = { #ifdef SIGABRT { SIGABRT, NULL }, #endif #ifdef SIGILL { SIGILL, NULL }, #endif #ifdef SIGSEGV { SIGSEGV, NULL }, #endif #ifdef SIGBUS { SIGBUS, NULL }, #endif #ifdef SIGFPE { SIGFPE, NULL }, #endif #ifdef SIGINT { SIGINT, NULL }, #endif #ifdef SIGTERM { SIGTERM, NULL }, #endif #ifdef SIGQUIT { SIGQUIT, NULL }, #endif #ifdef SIGPIPE { SIGPIPE, NULL }, #endif #ifdef SIGHUP { SIGHUP, NULL }, #endif { 0, NULL } }; static void gasneti_pshm_abort_handler(int sig) { // Invoke callback, if any if (gasnetc_pshm_abort_callback) gasnetc_pshm_abort_callback(); // Force others to exit from barrier: gasneti_atomic_set(&gasneti_pshm_info->bootstrap_barrier_gen, GASNETI_PSHM_BSB_ABORT, 0); // Best-effort message if this is not due to gasneti_fatalerror() if (sig != SIGABRT) { // convert signal number to string const char *signame = gasnett_signame_fromval(sig); if (!signame) signame = "signal"; // convert rank to string char procstr[10]; // room for 9 digits gasneti_utoa(gasneti_mynode, procstr, sizeof(procstr), 10); // generate full message const char msg1[] = "*** FATAL ERROR (proc "; const char msg2[] = "): fatal "; const char *context = gasnetc_pshm_abort_context; char msg[128] = { '\0', }; gasneti_assert(strlen(msg1) + strlen(procstr) + strlen(msg2) + strlen(signame) + strlen(context) + 2 <= sizeof(msg)); strcat(strcat(strcat(strcat(strcat(strcat(msg, msg1), procstr), msg2), signame), context), "\n"); int ignore = write(STDERR_FILENO, msg, strlen(msg)); } // Reraise the signal for (int i = 0; gasneti_pshm_catch_signals[i].sig; ++i) { if (gasneti_pshm_catch_signals[i].sig != sig) continue; gasneti_reghandler(sig, gasneti_pshm_catch_signals[i].old_hand); break; } #if HAVE_SIGPROCMASK /* Is this ever NOT the case? */ { sigset_t new_set, old_set; sigemptyset(&new_set); sigaddset(&new_set, sig); sigprocmask(SIG_UNBLOCK, &new_set, &old_set); } #endif gasneti_raise(sig); } void gasneti_pshm_cs_enter(const char *context, void (*callback)(void)) { gasnetc_pshm_abort_context = context; gasnetc_pshm_abort_callback = callback; for (int i = 0; gasneti_pshm_catch_signals[i].sig; ++i) { gasneti_pshm_catch_signals[i].old_hand = gasneti_reghandler(gasneti_pshm_catch_signals[i].sig, &gasneti_pshm_abort_handler); } } void gasneti_pshm_cs_leave(void) { gasnetc_pshm_abort_context = ""; gasnetc_pshm_abort_callback = NULL; for (int i = 0; gasneti_pshm_catch_signals[i].sig; ++i) { gasneti_reghandler(gasneti_pshm_catch_signals[i].sig, gasneti_pshm_catch_signals[i].old_hand); } } /****************************************************************************** * Helpers for PSHMnet bootstrap broadcast and exchange ******************************************************************************/ /* Sends data to all peers excluding self */ static void gasneti_pshmnet_coll_send(gasneti_pshmnet_t *vnet, void *src, size_t len) { gasneti_pshm_rank_t i; void *msg; for (i = 0; i < vnet->nodecount; i++) { if (i == gasneti_pshm_mynode) continue; gasneti_waitwhile (NULL == (msg = gasneti_pshmnet_get_send_buffer(vnet, len, i))); memcpy(msg, src, len); gasneti_pshmnet_deliver_send_buffer(vnet, msg, len, i); } } /* Recive data from any peer excluding self, placing data according to srcidx*stride */ static void gasneti_pshmnet_coll_recv(gasneti_pshmnet_t *vnet, size_t stride, void *dest) { gasneti_pshm_rank_t from; void *msg, *dest_elem; size_t len; gasneti_waitwhile (gasneti_pshmnet_recv(vnet, &msg, &len, &from)); dest_elem = (void*)((uintptr_t)dest + (stride * from)); memcpy(dest_elem, msg, len); gasneti_pshmnet_recv_release(vnet, msg); } /****************************************************************************** * PSHMnet bootstrap broadcast * - Rootpshmnode is supernode-local rank * - Barriers ensure ordering w.r.t sends that may follow ******************************************************************************/ void gasneti_pshmnet_bootstrapBroadcast(gasneti_pshmnet_t *vnet, void *src, size_t len, void *dst, int rootpshmnode) { uintptr_t src_addr = (uintptr_t)src; uintptr_t dst_addr = (uintptr_t)dst; size_t remain = len; gasneti_assert(vnet != NULL); gasneti_assert_uint(vnet->nodecount ,==, gasneti_pshm_nodes); while (remain) { size_t nbytes = MIN(remain, GASNETI_PSHMNET_MAX_PAYLOAD); if (gasneti_pshm_mynode == rootpshmnode) { gasneti_pshmnet_coll_send(vnet, (void*)src_addr, nbytes); } else { gasneti_pshmnet_coll_recv(vnet, 0, (void*)dst_addr); } src_addr += nbytes; dst_addr += nbytes; remain -= nbytes; gasneti_pshmnet_bootstrapBarrier(); } if (gasneti_pshm_mynode == rootpshmnode) { memmove(dst, src, len); } } /****************************************************************************** * PSHMnet bootstrap exchange * - Barriers ensure ordering w.r.t sends that may follow ******************************************************************************/ void gasneti_pshmnet_bootstrapExchange(gasneti_pshmnet_t *vnet, void *src, size_t len, void *dst) { uintptr_t src_addr = (uintptr_t)src; uintptr_t dst_addr = (uintptr_t)dst; size_t remain = len; gasneti_assert(vnet != NULL); gasneti_assert_uint(vnet->nodecount ,==, gasneti_pshm_nodes); /* All nodes broadcast their contribution in turn */ while (remain) { size_t nbytes = MIN(remain, GASNETI_PSHMNET_MAX_PAYLOAD); gasneti_pshm_rank_t i; for (i = 0; i < vnet->nodecount; i++) { if (gasneti_pshm_mynode == i) { gasneti_pshmnet_coll_send(vnet, (void*)src_addr, nbytes); } else { gasneti_pshmnet_coll_recv(vnet, len, (void*)dst_addr); } } src_addr += nbytes; dst_addr += nbytes; remain -= nbytes; gasneti_pshmnet_bootstrapBarrier(); } memmove((void*)((uintptr_t)dst + (gasneti_pshm_mynode*len)), src, len); } /****************************************************************************** * PSHMnet bootstrap gather * - Barriers ensure ordering w.r.t sends that may follow ******************************************************************************/ void gasneti_pshmnet_bootstrapGather(gasneti_pshmnet_t *vnet, void *src, size_t len, void *dst, int rootpshmnode) { uintptr_t src_addr = (uintptr_t)src; uintptr_t dst_addr = (uintptr_t)dst; size_t remain = len; void *msg; gasneti_assert(vnet != NULL); gasneti_assert_uint(vnet->nodecount ,==, gasneti_pshm_nodes); /* All nodes send their contribution in chunks */ while (remain) { size_t nbytes = MIN(remain, GASNETI_PSHMNET_MAX_PAYLOAD); if (gasneti_pshm_mynode == rootpshmnode) { gasneti_pshm_rank_t i; for (i = 0; i < vnet->nodecount - 1; i++) { gasneti_pshm_rank_t msg_from; size_t msg_len; gasneti_waitwhile (gasneti_pshmnet_recv(vnet, &msg, &msg_len, &msg_from)); gasneti_assert_uint(msg_len ,==, nbytes); memcpy((void*)(dst_addr + (len * msg_from)), msg, msg_len); gasneti_pshmnet_recv_release(vnet, msg); } } else { gasneti_waitwhile (NULL == (msg = gasneti_pshmnet_get_send_buffer(vnet, nbytes, rootpshmnode))); memcpy(msg, (void*)src_addr, nbytes); gasneti_pshmnet_deliver_send_buffer(vnet, msg, nbytes, rootpshmnode); } src_addr += nbytes; dst_addr += nbytes; remain -= nbytes; gasneti_pshmnet_bootstrapBarrier(); } if (gasneti_pshm_mynode == rootpshmnode) { memmove((void*)((uintptr_t)dst + (gasneti_pshm_mynode*len)), src, len); } } /****************************************************************************** * Allocator implementation ******************************************************************************/ static gasneti_pshmnet_allocator_t *gasneti_pshmnet_init_allocator(void *region, size_t len) { int count = len >> GASNETI_PSHMNET_PAGESHIFT; gasneti_pshmnet_allocator_block_t *tmp; /* This implementation doesn't need to put allocator within shared memory. * If a later one does, consider increasing the size returned by * get_queue_mem() */ gasneti_pshmnet_allocator_t *a = gasneti_malloc(sizeof(gasneti_pshmnet_allocator_t) + (count-1) * sizeof(unsigned int)); gasneti_leak(a); /* make sure we've arranged for page alignment */ gasneti_assert_align(GASNETI_PSHMNET_ALLOC_MAXSZ, GASNETI_PSHMNET_PAGESIZE); gasneti_assert_align(region, GASNETI_PSHMNET_PAGESIZE); /* Ensure affinity to writer and prevent later starvation */ gasneti_pshm_prefault(region, len); /* Initial state is one large free block */ a->next = 0; a->count = count; a->length[0] = count; a->region = tmp = region; gasneti_atomic_set(&tmp->in_use, 0, 0); return a; } /* Basic page-granular first-fit allocator This allocator is NOT thread-safe - the callers are responsible for serialization. */ static gasneti_pshmnet_payload_t * gasneti_pshmnet_alloc(gasneti_pshmnet_allocator_t *a, size_t nbytes) { void *retval = NULL; unsigned int curr; unsigned int needed; int remain; void *region = a->region; nbytes += offsetof(gasneti_pshmnet_allocator_block_t, payload.data); gasneti_assert_uint(nbytes ,<=, GASNETI_PSHMNET_ALLOC_MAXSZ); needed = (nbytes + GASNETI_PSHMNET_PAGESIZE - 1) >> GASNETI_PSHMNET_PAGESHIFT; gasneti_assert_uint(needed ,<=, GASNETI_PSHMNET_ALLOC_MAXPG); curr = a->next; remain = a->count; do { unsigned int length = a->length[curr]; gasneti_pshmnet_allocator_block_t *next_block; gasneti_pshmnet_allocator_block_t * const block = (gasneti_pshmnet_allocator_block_t*) ((uintptr_t)region + (curr << GASNETI_PSHMNET_PAGESHIFT)); if (!gasneti_atomic_read(&block->in_use, GASNETI_ATOMIC_ACQ)) { while (length < needed) { unsigned int next = curr + length; gasneti_assert_uint(next ,<=, a->count); if (next == a->count) break; /* hit end of region */ next_block = (gasneti_pshmnet_allocator_block_t*) ((uintptr_t)block + (length << GASNETI_PSHMNET_PAGESHIFT)); if (gasneti_atomic_read(&next_block->in_use, GASNETI_ATOMIC_ACQ)) break; /* hit busy block */ length += a->length[next]; } if (length >= needed) { unsigned int next = curr + needed; if (length > needed) { /* Split it */ gasneti_assert_uint(next ,<, a->count); a->length[next] = length - needed; next_block = (gasneti_pshmnet_allocator_block_t*) ((uintptr_t)block + (needed << GASNETI_PSHMNET_PAGESHIFT)); gasneti_atomic_set(&next_block->in_use, 0, 0); } a->length[curr] = needed; gasneti_atomic_set(&block->in_use, 1, 0); retval = &block->payload; if ((curr =next) == a->count) curr = 0; break; /* do {} while (remain); */ } /* Assume write is cheaper than branching again when length is unchanged */ a->length[curr] = length; } remain -= length; if ((curr += length) == a->count) curr = 0; } while (remain > 0); /* could be negative if merging took us past our starting point */ a->next = curr; return retval; } static void gasneti_pshmnet_free(gasneti_pshmnet_payload_t *p) { /* Address we handed out was the addr of the 'payload' field */ gasneti_pshmnet_allocator_block_t *block = pshmnet_get_struct_addr_from_field_addr(gasneti_pshmnet_allocator_block_t, payload, p); gasneti_assert_ptr(p ,==, &block->payload); /* assert block is page-aligned */ gasneti_assert_uint( (((uintptr_t)block) % GASNETI_PSHMNET_PAGESIZE) ,==, 0); gasneti_atomic_set(&block->in_use, 0, GASNETI_ATOMIC_REL); } /****************************************************************************** * AMPSHM: Active Message API over PSHMnet ******************************************************************************/ /* The mediumdata field may not be aligned */ #define GASNETI_AMPSHM_MSG_MEDDATA_OFFSET \ (offsetof(gasneti_pshmnet_allocator_block_t, payload.data.Medium.mediumdata)&(GASNETI_MEDBUF_ALIGNMENT-1)) #define GASNETI_AMPSHM_MSG_MEDDATA_SHIFT \ (GASNETI_AMPSHM_MSG_MEDDATA_OFFSET?(GASNETI_MEDBUF_ALIGNMENT-GASNETI_AMPSHM_MSG_MEDDATA_OFFSET):0) #define GASNETI_AMPSHM_MSG_CATEGORY(msg) (((gasneti_AMPSHM_msg_t*)msg)->category) #define GASNETI_AMPSHM_MSG_HANDLERID(msg) (((gasneti_AMPSHM_msg_t*)msg)->handler_id) #define GASNETI_AMPSHM_MSG_NUMARGS(msg) (((gasneti_AMPSHM_msg_t*)msg)->numargs) #define GASNETI_AMPSHM_MSG_SOURCE(msg) (((gasneti_AMPSHM_msg_t*)msg)->source) #define GASNETI_AMPSHM_MSG_ARGS(msg) (((gasneti_AMPSHM_msg_t*)msg)->args) #define GASNETI_AMPSHM_MSG_MED_NUMBYTES(msg) (((gasneti_AMPSHM_medmsg_t*)msg)->numbytes) #define GASNETI_AMPSHM_MSG_MED_DATA(msg) ((((gasneti_AMPSHM_medmsg_t*)msg)->mediumdata) + \ GASNETI_AMPSHM_MSG_MEDDATA_SHIFT) #define GASNETI_AMPSHM_MSG_LONG_NUMBYTES(msg) (((gasneti_AMPSHM_longmsg_t*)msg)->numbytes) #define GASNETI_AMPSHM_MSG_LONG_DATA(msg) (((gasneti_AMPSHM_longmsg_t*)msg)->longdata) // Free space after the long header, GASNETI_MEDBUF_ALIGNMENT aligned for use by NP-AM Longs // Note "GASNETI_MEDBUF_ALIGNMENT-4" allows for either 4- or 8-byte natural alignment. #define GASNETI_AMPSHM_MSG_LONG_INLINE (GASNETI_PSHMNET_MIN_PAYLOAD - \ (sizeof(gasneti_AMPSHM_longmsg_t) + \ (GASNETI_MEDBUF_ALIGNMENT - 4))) #define GASNETI_AMPSHM_MSG_LONG_TMP(msg) ((uint8_t*) \ GASNETI_ALIGNUP((gasneti_AMPSHM_longmsg_t*)msg + 1, \ GASNETI_MEDBUF_ALIGNMENT)) #define GASNETI_AMPSHM_MAX_REPLY_PER_POLL 10 #define GASNETI_AMPSHM_MAX_REQUEST_PER_POLL 10 /* ------------------------------------------------------------------------------------ */ GASNETI_INLINE(gasneti_AMPSHM_service_incoming_msg) int gasneti_AMPSHM_service_incoming_msg(gasneti_pshmnet_t *vnet, int isReq GASNETI_THREAD_FARG) { void *msg; size_t msgsz; gasneti_pshm_rank_t from; gasneti_category_t category; gex_AM_Index_t handler_id; gex_AM_Fn_t handler_fn; int numargs; gex_AM_Arg_t *args; gasneti_assert(vnet != NULL); if (gasneti_pshmnet_recv(vnet, &msg, &msgsz, &from)) return -1; handler_id = GASNETI_AMPSHM_MSG_HANDLERID(msg); category = (gasneti_category_t) GASNETI_AMPSHM_MSG_CATEGORY(msg); gasneti_assert((category == gasneti_Short) || (category == gasneti_Medium) || (category == gasneti_Long)); gex_EP_t ep = NULL; // TODO-EX: get true value gex_AM_Entry_t *entry = gasnetc_get_hentry(ep,handler_id); gasnetc_nbrhd_token_t my_token; gex_Token_t token = gasnetc_nbrhd_token_init(&my_token, GASNETI_AMPSHM_MSG_SOURCE(msg), entry, isReq); #if GASNETI_THREADINFO_OPT my_token.threadinfo = GASNETI_MYTHREAD; #endif handler_fn = entry->gex_fnptr; numargs = GASNETI_AMPSHM_MSG_NUMARGS(msg); args = GASNETI_AMPSHM_MSG_ARGS(msg); gasneti_amtbl_check(entry, numargs, category, isReq); switch (category) { case gasneti_Short: { GASNETC_NBRHD_ENTERING_HANDLER_HOOK(category,isReq,handler_id,token,NULL,0,numargs,args); my_token.ti.gex_is_long = 0; GASNETI_RUN_HANDLER_SHORT(isReq,handler_id,handler_fn,token,args,numargs); } break; case gasneti_Medium: { void * data = GASNETI_AMPSHM_MSG_MED_DATA(msg); size_t nbytes = GASNETI_AMPSHM_MSG_MED_NUMBYTES(msg); GASNETC_NBRHD_ENTERING_HANDLER_HOOK(category,isReq,handler_id,token,data,nbytes,numargs,args); my_token.ti.gex_is_long = 0; GASNETI_RUN_HANDLER_MEDIUM( isReq,handler_id,handler_fn,token,args,numargs,data,nbytes); } break; case gasneti_Long: { void * data = GASNETI_AMPSHM_MSG_LONG_DATA(msg); size_t nbytes = GASNETI_AMPSHM_MSG_LONG_NUMBYTES(msg); GASNETC_NBRHD_ENTERING_HANDLER_HOOK(category,isReq,handler_id,token,data,nbytes,numargs,args); my_token.ti.gex_is_long = 1; GASNETI_RUN_HANDLER_LONG( isReq,handler_id,handler_fn,token,args,numargs,data,nbytes); } break; } GASNETC_NBRHD_LEAVING_HANDLER_HOOK(category,isReq); gasneti_pshmnet_recv_release(vnet, msg); return 0; } /* ------------------------------------------------------------------------------------ */ int gasneti_AMPSHMPoll(int repliesOnly GASNETI_THREAD_FARG) { int i = 0; #if 0 /* We skip CHECKATTACH to allow "early" internal use by conduits. */ GASNETI_CHECKATTACH(); #endif if (gasneti_pshmnet_queue_peek(gasneti_reply_pshmnet->my_queue)) { for (i = 0; i < GASNETI_AMPSHM_MAX_REPLY_PER_POLL; i++) if (gasneti_AMPSHM_service_incoming_msg(gasneti_reply_pshmnet, 0 GASNETI_THREAD_PASS)) break; } if (!repliesOnly && gasneti_pshmnet_queue_peek(gasneti_request_pshmnet->my_queue)) { for (i = 0; i < GASNETI_AMPSHM_MAX_REQUEST_PER_POLL; i++) if (gasneti_AMPSHM_service_incoming_msg(gasneti_request_pshmnet, 1 GASNETI_THREAD_PASS)) break; } return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ /* * Active Message Request Functions * ================================ */ static void * ampshm_buf_alloc( gasneti_pshmnet_t *vnet, int category, int isReq, gasneti_pshm_rank_t target, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { /* calculate size of buffer needed */ size_t msgsz; switch (category) { case gasneti_Short: msgsz = sizeof(gasneti_AMPSHM_shortmsg_t); break; case gasneti_Medium: msgsz = GASNETI_AMPSHM_MEDMSG_DATA_OFFSET + nbytes; break; case gasneti_Long: msgsz = sizeof(gasneti_AMPSHM_longmsg_t); break; default: gasneti_unreachable_error(("Invalid category=%i",(int)category)); } gasneti_assert_uint(msgsz ,<=, GASNETI_SIZEOF_AMPSHM_MAXMSG_T); /* Get buffer, poll if busy (unless IMMEDIATE) Lock serializes allocation so small messages can't starve large ones */ gasneti_mutex_t *lock = &vnet->alloc_lock; // Like gasneti_pollwhile(), but with a specialized poll and without RMB // If reply, will only poll reply network to avoid deadlock #define gasneti_pshm_pollwhile(cnd) do { \ if (cnd) { \ while (1) { \ if (isReq) gasnetc_AMPoll(GASNETI_THREAD_PASS_ALONE); /* No progress functions */ \ else gasneti_AMPSHMPoll(1 GASNETI_THREAD_PASS); \ if (!(cnd)) break; \ GASNETI_WAITHOOK(); \ } \ } \ } while (0) void *msg; if (flags & GEX_FLAG_IMMEDIATE) { if (gasneti_mutex_trylock(lock)) return NULL; msg = gasneti_pshmnet_get_send_buffer(vnet, msgsz, target); if (!msg) goto out_immediate; } else { gasneti_pshm_pollwhile(gasneti_mutex_trylock(lock)); gasneti_pshm_pollwhile(!(msg = gasneti_pshmnet_get_send_buffer(vnet, msgsz, target))); } out_immediate: gasneti_mutex_unlock(lock); return msg; } GASNETI_INLINE(gasnetc_ampshm_msgsource) gex_Rank_t gasnetc_ampshm_msgsource(gex_Token_t token) { return ((gasnetc_nbrhd_token_t *)(1^(uintptr_t)token))->ti.gex_srcrank; } // After sd, next 3 params (isFixed, isReq, category) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(ampshm_prepare_inner) int ampshm_prepare_inner( gasneti_AM_SrcDesc_t sd, const int isFixed, const int isReq, const int category, gex_Rank_t jobrank, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs GASNETI_THREAD_FARG) { // Sanity checks: gasneti_assert(isFixed || (category == gasneti_Medium) || (category == gasneti_Long)); gasneti_assert(!dest_addr || (category == gasneti_Long)); gasneti_assert(sd); // Determine PSHM peer gasneti_assert(gasneti_pshm_jobrank_in_supernode(jobrank)); gasneti_pshm_rank_t pshmrank = gasneti_pshm_jobrank_to_local_rank(jobrank); // Determine the xfer size size_t size; int inline_long = 0; if (isFixed) { size = most_payload; } else if (category == gasneti_Medium) { size = MIN(most_payload, GASNETC_MAX_MEDIUM_NBRHD); } else { size_t limit = client_buf ? GASNETC_MAX_LONG_NBRHD : GASNETC_REF_NPAM_MAX_ALLOC; size = MIN(most_payload, limit); // For small enough Long use the free space after the header to avoid malloc/free inline_long = (size <= GASNETI_AMPSHM_MSG_LONG_INLINE); } // Allocate our buffer (honoring IMMEDIATE) gasneti_pshmnet_t *vnet = (isReq ? gasneti_request_pshmnet : gasneti_reply_pshmnet); void *msg = ampshm_buf_alloc(vnet, category, isReq, pshmrank, size, flags GASNETI_THREAD_PASS); gasneti_assert(msg || (flags & GEX_FLAG_IMMEDIATE)); if (!msg) return 1; // Outputs consumed by commit sd->_void_p = msg; sd->_flags = flags; sd->_pshm._pshmrank = pshmrank; sd->_pshm._jobrank = jobrank; GASNETI_AMPSHM_MSG_NUMARGS(msg) = nargs; gasneti_assert_uint( GASNETI_AMPSHM_MSG_NUMARGS(msg) ,==, nargs ); // truncated? // Outputs for the client sd->_size = size; if (isFixed) { sd->_addr = (/*non-const*/void *)client_buf; } else if (client_buf) { sd->_addr = (/*non-const*/void *)client_buf; gasneti_leaf_finish(lc_opt); } else if (category == gasneti_Medium) { // NPAM Medium with GASNet-allocated buffer sd->_gex_buf = sd->_addr = GASNETI_AMPSHM_MSG_MED_DATA(msg); } else if (inline_long) { // NPAM Long with GASNet-allocated buffer, "inline" with header sd->_gex_buf = sd->_addr = GASNETI_AMPSHM_MSG_LONG_TMP(msg); } else { // NPAM Long with GASNet-allocated buffer, general case sd->_tofree = gasneti_alloc_npam_buffer(sd, isReq); } return 0; } // After sd, next 3 params (isFixed, isReq, category) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(ampshm_commit_inner) void ampshm_commit_inner( gasneti_AM_SrcDesc_t sd, const int isFixed, const int isReq, const int category, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, va_list argptr) { // Sanity checks: gasneti_assert(isFixed || (category == gasneti_Medium) || (category == gasneti_Long)); gasneti_assert(!dest_addr || (category == gasneti_Long)); gasneti_assert(sd); void *msg = sd->_void_p; /* Fill in message header */ GASNETI_AMPSHM_MSG_CATEGORY(msg) = category; gasneti_assert_uint( GASNETI_AMPSHM_MSG_CATEGORY(msg) ,==, category); // truncated? GASNETI_AMPSHM_MSG_HANDLERID(msg) = handler; GASNETI_AMPSHM_MSG_SOURCE(msg) = gasneti_mynode; const int nargs = GASNETI_AMPSHM_MSG_NUMARGS(msg); for (int i = 0; i < nargs; i++) { GASNETI_AMPSHM_MSG_ARGS(msg)[i] = (gex_AM_Arg_t)va_arg(argptr, gex_AM_Arg_t); } // Stage payload to final location switch (category) { case gasneti_Short: /* Nothing to do */ break; case gasneti_Medium: { GASNETI_AMPSHM_MSG_MED_NUMBYTES(msg) = nbytes; gasneti_assert_uint( GASNETI_AMPSHM_MSG_MED_NUMBYTES(msg) ,==, nbytes ); // truncated? void *data = GASNETI_AMPSHM_MSG_MED_DATA(msg); if (isFixed || (data != sd->_addr)) GASNETI_MEMCPY_SAFE_EMPTY(data, sd->_addr, nbytes); break; } case gasneti_Long: { GASNETI_AMPSHM_MSG_LONG_DATA(msg) = dest_addr; GASNETI_AMPSHM_MSG_LONG_NUMBYTES(msg) = nbytes; gasneti_assert_uint( GASNETI_AMPSHM_MSG_LONG_NUMBYTES(msg) ,==, nbytes ); // truncated? if (nbytes) { gasneti_static_assert((int)GASNETI_FLAG_PEER_SEG_AUX); // else next line truncates int is_aux = sd->_flags & GASNETI_FLAG_PEER_SEG_AUX; gasneti_assert_uint(!!is_aux ,==, !!gasneti_in_auxsegment(sd->_pshm._jobrank, dest_addr, nbytes)); void *data = gasneti_pshm_jobrank_addr2local(sd->_pshm._jobrank, dest_addr, is_aux); GASNETI_MEMCPY(data, sd->_addr, nbytes); } break; } default: gasneti_unreachable_error(("Invalid category=%i",(int)category)); } /* Deliver message */ gasneti_pshmnet_t *vnet = (isReq ? gasneti_request_pshmnet : gasneti_reply_pshmnet); gasneti_pshmnet_deliver_send_buffer(vnet, msg, 0 /*msgsz unused*/, sd->_pshm._pshmrank); if (sd->_tofree) { gasneti_free_npam_buffer(sd); } } // First 1 params (category, isReq) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(gasnetc_AMPSHM_ReqRepGeneric) int gasnetc_AMPSHM_ReqRepGeneric(gasneti_category_t category, int isReq, gex_Rank_t jobrank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { if (jobrank == gasneti_mynode) { return gasnetc_loopback_ReqRepGeneric( isReq, category, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr GASNETI_THREAD_PASS); } struct gasneti_AM_SrcDesc the_sd; the_sd._tofree = NULL; int imm = ampshm_prepare_inner( &the_sd, 1, isReq, category, jobrank, source_addr, 0, nbytes, dest_addr, NULL, flags, numargs GASNETI_THREAD_PASS); if (imm) return imm; gasneti_assume(the_sd._tofree == NULL); // in case the optimizer lost track ampshm_commit_inner(&the_sd, 1, isReq, category, handler, nbytes, dest_addr, argptr); return GASNET_OK; } // After sd, next 2 params (isReq, category) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(ampshm_prepare) int ampshm_prepare(gasneti_AM_SrcDesc_t sd, const int isReq, const gasneti_category_t category, gex_Rank_t jobrank, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { // Check for loopback // TODO-EX: TBD: move outward to "nbrhd" layer or leave here? int loopback = (jobrank == gasneti_mynode); sd->_pshm._loopback = loopback; if (loopback) { return gasnetc_loopback_Prepare(sd,isReq,category,client_buf,least_payload,most_payload, dest_addr,lc_opt,flags,nargs); } GASNET_POST_THREADINFO(sd->_thread); return ampshm_prepare_inner( sd, 0, isReq, category, jobrank, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs GASNETI_THREAD_PASS); } // After sd, next 2 params (isReq, category) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(ampshm_commit) void ampshm_commit(gasneti_AM_SrcDesc_t sd, const int isReq, const gasneti_category_t category, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, va_list argptr) { // Check for loopback // TODO-EX: TBD: move outward to "nbrhd" layer or leave here? if (sd->_pshm._loopback) { gasnetc_loopback_Commit(sd,isReq,category,handler,nbytes,dest_addr,argptr); return; } ampshm_commit_inner(sd, 0, isReq, category, handler, nbytes, dest_addr, argptr); } // After sd, remaining params (isReq, category) will be manifest constants // which should lead to specialization of the code upon inlining. GASNETI_INLINE(ampshm_cancel) int ampshm_cancel(gasneti_AM_SrcDesc_t sd, const int isReq, const gasneti_category_t category) { gasneti_assert(sd); // Check for loopback // TODO-EX: TBD: move outward to "nbrhd" layer or leave here? if (sd->_pshm._loopback) { return gasnetc_loopback_Cancel(sd, isReq, category); } // Release buffer without sending (normally done by the recipient) gasneti_pshmnet_recv_release(NULL /*unused*/, sd->_void_p); if (sd->_tofree) { gasneti_free_npam_buffer(sd); } return GASNET_OK; } // // AM Request/Reply external interface // // TODO-EX: GASNETI_THREAD_FARG // int gasneti_AMPSHM_RequestShort(gex_Rank_t jobrank, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { gasneti_assert(gasneti_pshm_jobrank_in_supernode(jobrank)); return gasnetc_AMPSHM_ReqRepGeneric(gasneti_Short, 1, jobrank, handler, NULL, 0, NULL, flags, numargs, argptr GASNETI_THREAD_PASS); } int gasneti_AMPSHM_RequestMedium(gex_Rank_t jobrank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { gasneti_assert(gasneti_pshm_jobrank_in_supernode(jobrank)); return gasnetc_AMPSHM_ReqRepGeneric(gasneti_Medium, 1, jobrank, handler, source_addr, nbytes, NULL, flags, numargs, argptr GASNETI_THREAD_PASS); } int gasneti_AMPSHM_RequestLong(gex_Rank_t jobrank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { gasneti_assert(gasneti_pshm_jobrank_in_supernode(jobrank)); return gasnetc_AMPSHM_ReqRepGeneric(gasneti_Long, 1, jobrank, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr GASNETI_THREAD_PASS); } int gasneti_AMPSHM_ReplyShort(gex_Token_t token, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr) { GASNETI_POST_THREADINFO_FROM_NBRHD_TOKEN(token); gex_Rank_t jobrank = gasnetc_ampshm_msgsource(token); return gasnetc_AMPSHM_ReqRepGeneric(gasneti_Short, 0, jobrank, handler, NULL, 0, NULL, flags, numargs, argptr GASNETI_THREAD_PASS); } int gasneti_AMPSHM_ReplyMedium(gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Flags_t flags, int numargs, va_list argptr) { GASNETI_POST_THREADINFO_FROM_NBRHD_TOKEN(token); gex_Rank_t jobrank = gasnetc_ampshm_msgsource(token); return gasnetc_AMPSHM_ReqRepGeneric(gasneti_Medium, 0, jobrank, handler, source_addr, nbytes, NULL, flags, numargs, argptr GASNETI_THREAD_PASS); } int gasneti_AMPSHM_ReplyLong(gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Flags_t flags, int numargs, va_list argptr) { GASNETI_POST_THREADINFO_FROM_NBRHD_TOKEN(token); gex_Rank_t jobrank = gasnetc_ampshm_msgsource(token); return gasnetc_AMPSHM_ReqRepGeneric(gasneti_Long, 0, jobrank, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr GASNETI_THREAD_PASS); } int gasnetc_AMPSHM_PrepareRequestMedium( gasneti_AM_SrcDesc_t sd, gex_Rank_t jobrank, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { return ampshm_prepare(sd, 1, gasneti_Medium, jobrank, client_buf, least_payload, most_payload, NULL, lc_opt, flags, nargs); } int gasnetc_AMPSHM_PrepareReplyMedium( gasneti_AM_SrcDesc_t sd, gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { #if GASNET_DEBUG sd->_dest._reply._token = token; #endif gex_Rank_t jobrank = gasnetc_ampshm_msgsource(token); return ampshm_prepare(sd, 0, gasneti_Medium, jobrank, client_buf, least_payload, most_payload, NULL, lc_opt, flags, nargs); } int gasnetc_AMPSHM_PrepareRequestLong( gasneti_AM_SrcDesc_t sd, gex_Rank_t jobrank, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { return ampshm_prepare(sd, 1, gasneti_Long, jobrank, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs); } int gasnetc_AMPSHM_PrepareReplyLong( gasneti_AM_SrcDesc_t sd, gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int nargs) { #if GASNET_DEBUG sd->_dest._reply._token = token; #endif gex_Rank_t jobrank = gasnetc_ampshm_msgsource(token); return ampshm_prepare(sd, 0, gasneti_Long, jobrank, client_buf, least_payload, most_payload, dest_addr, lc_opt, flags, nargs); } void gasnetc_AMPSHM_CommitRequestMedium( gasneti_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, va_list argptr) { ampshm_commit(sd, 1, gasneti_Medium, handler, nbytes, NULL, argptr); } void gasnetc_AMPSHM_CommitReplyMedium( gasneti_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, va_list argptr) { ampshm_commit(sd, 0, gasneti_Medium, handler, nbytes, NULL, argptr); } void gasnetc_AMPSHM_CommitRequestLong( gasneti_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, va_list argptr) { ampshm_commit(sd, 1, gasneti_Long, handler, nbytes, dest_addr, argptr); } void gasnetc_AMPSHM_CommitReplyLong( gasneti_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, va_list argptr) { ampshm_commit(sd, 0, gasneti_Long, handler, nbytes, dest_addr, argptr); } int gasnetc_AMPSHM_CancelRequestMedium( gasneti_AM_SrcDesc_t sd, gex_Flags_t flags) { return ampshm_cancel(sd, 1, gasneti_Medium); } int gasnetc_AMPSHM_CancelReplyMedium( gasneti_AM_SrcDesc_t sd, gex_Flags_t flags) { return ampshm_cancel(sd, 0, gasneti_Medium); } int gasnetc_AMPSHM_CancelRequestLong( gasneti_AM_SrcDesc_t sd, gex_Flags_t flags) { return ampshm_cancel(sd, 1, gasneti_Long); } int gasnetc_AMPSHM_CancelReplyLong( gasneti_AM_SrcDesc_t sd, gex_Flags_t flags) { return ampshm_cancel(sd, 0, gasneti_Long); } #endif /* GASNET_PSHM */ gasnet-2025.8.0/gasnet_asm.h0000664000175000017500000002004515142313673015715 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_asm.h $ * Description: GASNet header for semi-portable inline asm support * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #if !defined(_IN_GASNET_TOOLS_H) && !defined(_IN_GASNETEX_H) #error This file is not meant to be included directly- clients should include gasnetex.h or gasnet_tools.h #endif #ifndef _GASNET_ASM_H #define _GASNET_ASM_H /* Sort out the per-compiler support for asm and atomics */ #ifdef GASNETI_COMPILER_HAS #if GASNETI_COMPILER_HAS(GCC_ASM) #define GASNETI_HAVE_GCC_ASM 1 #endif #if GASNETI_COMPILER_HAS(SIMPLE_ASM) #define GASNETI_HAVE_SIMPLE_ASM 1 #endif #if GASNETI_COMPILER_HAS(SYNC_ATOMICS_32) #define GASNETI_HAVE_SYNC_ATOMICS_32 1 #endif #if GASNETI_COMPILER_HAS(SYNC_ATOMICS_64) #define GASNETI_HAVE_SYNC_ATOMICS_64 1 #endif #else #error header inclusion error: missing GASNETI_COMPILER_HAS #endif // NOTE: // // When adding new support for compilers with usable inline asm, one should // add to GASNET_CHECK_ASM_SUPPORT() in configure.in as the primary means of // identifying such support. The following is used as a secondary mechanism, // in particular for compilers not probed by configure. // // For version-based tests, also check if something should be added to the // "Sanity Checks" at the emd of this header. // #define GASNETI_ASM_AVAILABLE 1 #if GASNETI_HAVE_GCC_ASM /* Configure detected support for GCC-style inline asm */ #elif PLATFORM_COMPILER_GNU || PLATFORM_COMPILER_INTEL || PLATFORM_COMPILER_PATHSCALE || \ PLATFORM_COMPILER_TINY || PLATFORM_COMPILER_OPEN64 || PLATFORM_COMPILER_CLANG || \ PLATFORM_COMPILER_PGI || PLATFORM_COMPILER_NVHPC || \ (PLATFORM_COMPILER_SUN && PLATFORM_COMPILER_VERSION_GE(5,12,0) && \ (PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64)) || \ (PLATFORM_COMPILER_XLC && PLATFORM_ARCH_LITTLE_ENDIAN) #define GASNETI_HAVE_GCC_ASM 1 #elif GASNETI_HAVE_SIMPLE_ASM /* Configure detected support for asm("mnemonic") */ /* We only probe compiler families where we trust it (just Sun at this time) */ #define GASNETI_ASM(mnemonic) asm(mnemonic) #elif PLATFORM_COMPILER_SUN_CXX // TODO: unknown when/if C++ on Solaris/SPARC begins to support asm() #if PLATFORM_OS_LINUX || (PLATFORM_COMPILER_VERSION_GE(5,9,0) && !PLATFORM_ARCH_SPARC) #define GASNETI_ASM(mnemonic) asm(mnemonic) #define GASNETI_HAVE_SIMPLE_ASM 1 #else /* Sun C++ on Solaris (may) lack inline assembly support (man inline) */ #define GASNETI_ASM(mnemonic) ERROR_NO_INLINE_ASSEMBLY_AVAIL /* not supported or used */ #undef GASNETI_ASM_AVAILABLE #endif #elif PLATFORM_COMPILER_SUN_C #define GASNETI_ASM(mnemonic) __asm(mnemonic) #define GASNETI_HAVE_SIMPLE_ASM 1 // Equivalent to "simple" with a different spelling #elif PLATFORM_COMPILER_XLC || PLATFORM_COMPILER_CRAY /* platforms where inline assembly not supported or used */ #define GASNETI_ASM(mnemonic) ERROR_NO_INLINE_ASSEMBLY_AVAIL #undef GASNETI_ASM_AVAILABLE #if PLATFORM_COMPILER_CRAY && PLATFORM_ARCH_X86_64 #include "intrinsics.h" #endif #else #error "Don't know how to use inline assembly for your compiler" #endif #if GASNETI_HAVE_GCC_ASM #define GASNETI_ASM(mnemonic) __asm__ __volatile__ (mnemonic : : : "memory") #endif #ifndef GASNETI_ASM_SPECIAL #define GASNETI_ASM_SPECIAL GASNETI_ASM #endif // // Bugs, quirks, dialects, etc. // #if PLATFORM_COMPILER_PGI && PLATFORM_ARCH_POWERPC #if PLATFORM_COMPILER_VERSION_LT(17,3,0) // All known versions prior to 17.3 // PGI "tpr 23290" // Does not grok the immediate modifier "%I" in an asm template #define GASNETI_PGI_ASM_TPR23290 1 #endif #if PLATFORM_COMPILER_PGI_CXX && \ PLATFORM_COMPILER_VERSION_LT(17,1,0) // All known versions prior to 17.1 // PGI "tpr 23291" // C++ compiler does not grok "cr0", though C compiler does #define GASNETI_PGI_ASM_TPR23291 1 #endif #if PLATFORM_COMPILER_PGI_CXX && GASNET_NDEBUG && \ PLATFORM_COMPILER_VERSION_GE(16,0,0) && PLATFORM_COMPILER_VERSION_LT(17,7,0) // PGI "tpr 24514" // C++ compiler fails with certain asm constructs at -O2 #define GASNETI_PGI_ASM_TPR24514 1 #endif #elif PLATFORM_COMPILER_PGI /* x86 and x86-64 */ #if PLATFORM_COMPILER_VERSION_LT(7,2,5) #error "GASNet does not support PGI compilers prior to 7.2-5" #endif #if PLATFORM_ARCH_32 && \ PLATFORM_COMPILER_VERSION_GE(7,1,5) && PLATFORM_COMPILER_VERSION_LT(8,0,6) /* Compiler suffers from "tpr 14969" in which extended asm() output constraints can't * be met unless they appear in a specific order. This is on 32-bit targets only. * * NOTE: PGI reports TPR 14969 was fixed in 8.0-1. * However, we have only been able to test 8.0-6 and later. */ #define GASNETI_PGI_ASM_BUG2294 1 #endif #if PLATFORM_COMPILER_VERSION_GE(7,0,0) && PLATFORM_COMPILER_VERSION_LT(10,8,0) /* Compiler suffers from "tpr 17075" in which extended asm() may load only 32 bits of * a 64-bit operand at -O1 (but is OK at -O0 and -O2). */ #define GASNETI_PGI_ASM_BUG2843 1 #endif #if PLATFORM_COMPILER_PGI_CXX && PLATFORM_COMPILER_VERSION_GE(17,0,0) \ && PLATFORM_COMPILER_VERSION_LT(19,1,0) // C++ compiler generates code that is consistent with having lost the volatile // qualifier from the integer member of the atomic type struct. #define GASNETI_PGI_ASM_BUG3674 1 #endif #if PLATFORM_COMPILER_PGI_CXX && PLATFORM_COMPILER_VERSION_GT(17,4,0) \ && PLATFORM_COMPILER_VERSION_LT(19,1,0) // C++ compiler generates code that promotes 8-bit asm output to // 32-bits without clearing the other 24 bits. This was reported // as a second issue within bug 3674. // The work-around is the same as for an older (unrelated) bug 1754. // Present in 17.10 and not in 17.4, but uncertain about in between. #define GASNETI_PGI_ASM_BUG1754 1 #endif #endif // Compilers with __has_builtin() support (at least clang-derived ones) treat // the __sync* atomic functions as built-ins, allowing this preprocess-time // probe. However, we apply this only to compilers not probed for this support // by configure. // Lack of a __builtin prefix on these functions necessitates use of the // _GASNETI_HAS_BUILTIN macro, not originally intended for use outside // of gasnet_basic.h. #if GASNETI_COMPILER_IS_UNKNOWN #if _GASNETI_HAS_BUILTIN(__sync_bool_compare_and_swap) && \ _GASNETI_HAS_BUILTIN(__sync_val_compare_and_swap) && \ _GASNETI_HAS_BUILTIN(__sync_fetch_and_add) #define GASNETI_HAVE_SYNC_ATOMICS_32 1 #if PLATFORM_ARCH_64 #define GASNETI_HAVE_SYNC_ATOMICS_64 1 #endif #endif #endif #if PLATFORM_ARCH_ARM && PLATFORM_OS_LINUX /* For GASNETI_ARM_ASMCALL() */ #include "gasnet_arch_arm.h" #endif #if PLATFORM_ARCH_MIPS && defined(HAVE_SGIDEFS_H) /* For _MIPS_ISA and _MIPS_SIM values on some MIPS platforms */ #include #endif // // Sanity checks // For compilers with version-based ASM support here and behavior-based // logic in configure, we want to know if the version-based is ever // more permissive than configure-based. // #if !GASNETI_COMPILER_IS_UNKNOWN #if GASNETI_HAVE_GCC_ASM && !GASNETI_COMPILER_HAS(GCC_ASM) #error "Something about your compiler violates GASNet's hard-coded assumptions regarding GCC_ASM support. Please report this error to gasnet-devel@lbl.gov, including the failing compiler command line and compiler version information." #elif GASNETI_HAVE_SIMPLE_ASM && !GASNETI_COMPILER_HAS(SIMPLE_ASM) #if PLATFORM_COMPILER_SUN_C // Exceptional because configure probe tests a different spelling. // C compiler *always* supports `__asm()`, but support for `asm()` is probed. #else #error "Something about your compiler violates GASNet's hard-coded assumptions regarding SIMPLE_ASM support. Please report this error to gasnet-devel@lbl.gov, including the failing compiler command line and compiler version information." #endif #endif #endif #endif /* _GASNET_ASM_H */ gasnet-2025.8.0/Makefile.am0000664000175000017500000003500115142313673015455 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/Makefile.am $ # Description: Makefile for GASNet # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I other/plpa/config # Directories for automake to recurse into: SUBDIRS = \ config-aux \ other # GASNET_TOOLSONLY_TRUE_BEGIN # CONDUITMODE_DIST_SUBDIRS = # CONDUITMODE_headers = # CONDUITMODE_EXTRA_DIST = .gasnet_toolsonly_mode # CONDUITMODE_INSTALL_DOCS = # GASNET_TOOLSONLY_TRUE_END # GASNET_TOOLSONLY_FALSE_BEGIN # Directories we manually recurse into: CONDUITMODE_DIST_SUBDIRS = \ mpi-conduit \ smp-conduit \ udp-conduit \ ibv-conduit \ ucx-conduit \ ofi-conduit CONDUITMODE_headers = \ gasnetex.h \ gasnet.h \ gasnet_ammacros.h \ gasnet_trace.h \ gasnet_fwd.h \ other/kinds/gasnet_mk.h \ extended-ref/coll/gasnet_coll.h \ extended-ref/ratomic/gasnet_ratomic.h \ extended-ref/vis/gasnet_vis.h CONDUITMODE_EXTRA_DIST = \ docs \ extended-ref \ gasnet_legacy.c \ gasnet_event.c \ gasnet_event_internal.h \ gasnet_handler_internal.h \ gasnet_internal.h \ gasnet_internal.c \ gasnet_am.h \ gasnet_am.c \ gasnet_mmap.c \ gasnet_tm.c \ gasnet_diagnostic.c \ gasnet_pshm.h \ gasnet_pshm.c \ gasnet_syncops.h \ gasnet_trace.c CONDUITMODE_INSTALL_DOCS = \ docs/memory_kinds.pdf \ docs/memory_kinds_implementation.md \ docs/implementation_defined.md \ docs/gasnet1_differences.md \ docs/GASNet-EX.txt # GASNET_TOOLSONLY_FALSE_END # bug3285: Order matters here: other should follow conduits to maintain dependencies for distclean DIST_SUBDIRS = $(CONDUITMODE_DIST_SUBDIRS) $(SUBDIRS) configdir = $(includedir) config_DATA = $(CONFIG_HEADER) if NEED_DOCDIR docdir = $(datadir)/doc/GASNet endif headers = \ $(CONDUITMODE_headers) \ gasnet_asm.h \ gasnet_atomicops.h \ gasnet_atomic_bits.h \ gasnet_atomic_fwd.h \ gasnet_basic.h \ gasnet_help.h \ gasnet_membar.h \ gasnet_timer.h \ gasnet_tools.h \ gasnet_toolhelp.h EXTRA_DIST = \ $(CONDUITMODE_EXTRA_DIST) \ README \ README-tools \ ChangeLog \ license.txt \ .autom4te.cfg \ Bootstrap \ unBootstrap \ configure.in \ acconfig.h \ acinclude.m4 \ gasnet_tools.c # tests handled below include_HEADERS = $(headers) # deliberately omitted git-only docs: README-devel README-git README-release gasnet.* INSTALL_DOCS = \ $(CONDUITMODE_INSTALL_DOCS) \ README \ README-tools \ license.txt force: #------------------------------------------------------- # libgasnet_tools goop if BUILD_SEQ_LIBS libgasnet_tools_seq_a_SOURCES = libraries_seq = libgasnet_tools-seq.a fragments_seq = gasnet_tools-seq.mak pkgconfig_seq = gasnet_tools-seq.pc endif if BUILD_PAR_LIBS libgasnet_tools_par_a_SOURCES = libraries_par = libgasnet_tools-par.a fragments_par = gasnet_tools-par.mak pkgconfig_par = gasnet_tools-par.pc endif libraries = $(libraries_seq) $(libraries_par) fragments = $(fragments_seq) $(fragments_par) pkgconfig = $(pkgconfig_seq) $(pkgconfig_par) # leading - prevents distclean failures -include $(top_builddir)/other/Makefile-libgasnet.mak libgasnet_tools-seq.a: $(libgasnet_tools_dependencies) @$(MAKE) do-libgasnet_tools-seq libgasnet_tools-par.a: $(libgasnet_tools_dependencies) @$(MAKE) do-libgasnet_tools-par lib_LIBRARIES = $(libraries) #------------------------------------------------------- # bug1758: cannot depend on $(top_builddir)/other/Makefile-libgasnet.mak here, # as that will cause a failure during distclean on some make versions # make should automatically introduce the desired dependency on Makefile-libgasnet.mak.in # due to the include operation above Makefile: $(srcdir)/Makefile.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status # echo an arbitrary make/environment variable echovar: force @echo $(VARNAME)=\"$($(VARNAME))\" if CONDUIT_MODE @BUILD_PAR_LIBS_TRUE@ DEFAULT_TEST_MODE=par @BUILD_PAR_LIBS_FALSE@ DEFAULT_TEST_MODE=seq test: tests-$(DEFAULT_TEST_MODE) tests: tests-$(DEFAULT_TEST_MODE) tests-installed: tests-installed-$(DEFAULT_TEST_MODE) # automake name, used by distcheck: installcheck-local: tests-installed-$(DEFAULT_TEST_MODE) # xSDK alias: test_install: run-tests-installed-$(DEFAULT_TEST_MODE) other-tests: @cd $(top_builddir)/other && $(MAKE) all tests tests-seq tests-parsync tests-par tests-installed-seq tests-installed-par tests-installed-parsync: other-tests @for conduit in $(CONDUITS) ; do \ ( cd "$(top_builddir)/$$conduit-conduit" && $(MAKE) $@ ) || exit $$?; \ done TESTINSTANCE=$${PPID:-xxxx} TESTLOG=`pwd`/.test-results RUN_TEST_TARGETS= \ run-tests run-tests-seq run-tests-parsync run-tests-par \ run-tests-installed-seq run-tests-installed-parsync run-tests-installed-par $(RUN_TEST_TARGETS): do-begin-tests @testinst=$(TESTINSTANCE) ; \ testlog=$(TESTLOG) ; \ err=0 ; \ for conduit in $(CONDUITS) ; do \ ( cd "$(top_builddir)/$$conduit-conduit" && \ $(MAKE) TESTINSTANCE=$$testinst TESTLOG=$$testlog \ TESTLOG_INHERIT=1 $@ ) || err=$$? ; \ if test "$$err" != "0" ; then \ echo " *-* COMPILE FAILURE: $$conduit-conduit $@ *-*" >> $(TESTLOG) ; \ break ; \ fi ; \ done ; \ if test "$$err" = "0" ; then \ ( cd $(top_builddir)/other && \ $(MAKE) TESTINSTANCE=$$testinst TESTLOG=$$testlog \ TESTLOG_INHERIT=1 run-tests ) || err=$$? ; \ fi ; \ $(MAKE) TESTINSTANCE=$(TESTINSTANCE) TESTLOG=$(TESTLOG) do-end-tests ; \ exit $$err do-begin-tests: @testinst=$(TESTINSTANCE) ; \ testlog=$(TESTLOG) ; \ if test "`sed 1q $$testlog 2> /dev/null`" != "$$testinst" ; then \ echo "$$testinst" > $$testlog ; \ echo Starting a new test instance, log=$$testlog ; \ fi do-end-tests: @testinst=$(TESTINSTANCE) ; \ testlog=$(TESTLOG) ; \ if test "`sed 1q $$testlog 2> /dev/null`" = "$$testinst" ; then \ line='+++++++++++++++++++++++++++++++++++++++' ; line="$$line$$line" ; \ echo "$$line" ; \ echo Test results: `sed -n '1d;/\*-\*/p' $$testlog | wc -l` failures ; \ sed 1d $$testlog ; \ echo "$$line" ; \ fi CLEANFILES = $(TESTLOG) else TOOLSONLY_CHECK = run-tests TOOLSONLY_TESTS = testtools test: tests tests: $(TOOLSONLY_TESTS) $(TOOLSONLY_TESTS): force @$(MAKE) -f $(top_builddir)/tests/Makefile \ GASNET_INCLUDES="-I@TOP_BUILDDIR@ -I@TOP_SRCDIR@ -I@TOP_SRCDIR@/other" \ $@ run-tests: tests ./testtools CLEANFILES = $(TOOLSONLY_TESTS) endif # Build, clean, install, uninstall, etc. the conduits - in parallel if possible. # Instead of automake's loop over subdir, we expand to one target per subdir. # Care is taken w/ the 'clean-local' rule in case distclean has wiped the # local or conduit Makefiles # Note that if ($VAR:%=%FOO) doesn't work for a given make, then we are # reduced to using actual conduit names as PHONY targets, but the rule for # $(recurse_local) is tailored to work correctly regardless. recurse_local = $(CONDUITS:%=%-recurse) recurse_local_dummy $(recurse_local): @if test "$@" != "recurse_local_dummy" ; then \ cd `echo $@ | sed s/-recurse//`-conduit && $(MAKE) $(DO_WHAT) || exit $$? ; \ fi # conduit subdirectories that should be made, even when the conduit is disabled SPECIAL_SUBDIRS = mpi-conduit/contrib recurse_special: @for dir in $(SPECIAL_SUBDIRS) ; do \ if test -f $$dir/Makefile ; then \ cd $$dir && $(MAKE) $(DO_WHAT) || exit $$? ; \ fi ; \ done all-local: $(lib_LIBRARIES) $(fragments) $(pkgconfig) @$(MAKE) $(recurse_local) DO_WHAT=$${DO_WHAT=all} @$(MAKE) recurse_special DO_WHAT=$${DO_WHAT=all} clean-local: rm -f $(fragments) $(pkgconfig) @if test -f Makefile -a -f smp-conduit/Makefile; then \ $(MAKE) $(recurse_local) DO_WHAT=clean || exit $$? ; \ fi @if test -f Makefile; then \ $(MAKE) recurse_special DO_WHAT=clean ; \ fi check-local: check-exports $(TOOLSONLY_CHECK) $(MAKE) check-pkgconfig CHECK_FILES="$(pkgconfig)" seq par parsync: @$(MAKE) $(recurse_local) DO_WHAT=$@ check tests-clean: @$(MAKE) $(recurse_local) DO_WHAT=$@ @cd "$(top_builddir)/other" && $(MAKE) $@ check-prefix-vars: force @if test -n "$(DESTDIR)" -a `expr "X$(DESTDIR)" : X/` = 0; then \ echo "ERROR: install \$$DESTDIR must begin with a '/' character."; \ exit 1; \ fi @if test -n "$(DESTDIR)" -a `expr "$(DESTDIR)" : ".*[[:space:]]"` != 0; then \ echo "ERROR: install \$$DESTDIR must not contain space characters."; \ exit 1; \ fi @if test `expr "X$(prefix)" : X/` = 0; then \ echo "ERROR: install \$$prefix must begin with a '/' character."; \ exit 1; \ fi @if test `expr "$(prefix)" : ".*[[:space:]]"` != 0; then \ echo "ERROR: install \$$prefix must not contain space characters."; \ exit 1; \ fi install-data-local: check-prefix-vars @$(MAKE) $(recurse_local) DO_WHAT=install-data @$(MAKE) recurse_special DO_WHAT=install-data $(mkinstalldirs) $(DESTDIR)$(docdir) if test -f $(top_srcdir)/version.git ; then \ $(INSTALL_DATA) $(top_srcdir)/version.git $(DESTDIR)$(docdir)/version.git || exit $$? ; \ fi if test -f $(top_srcdir)/extended-ref/README ; then \ $(INSTALL_DATA) $(top_srcdir)/extended-ref/README $(DESTDIR)$(docdir)/README-extref || exit $$? ; \ fi @: Automake 1.4 correct handling of headers given by relative path: ensure nested ext-ref headers get correctly installed in top-level include @for file in $(include_HEADERS) ; do \ if test -f "$(srcdir)/$$file" ; then ( b=`basename $$file` ; set -x ; \ $(INSTALL_DATA) "$(srcdir)/$$file" "$(DESTDIR)$(includedir)/$$b" ) || exit $$?; \ fi; \ done for file in $(INSTALL_DOCS) ; do \ $(INSTALL_DATA) $(top_srcdir)/$$file $(DESTDIR)$(docdir)/`basename $$file` || exit $$? ; \ done $(mkinstalldirs) $(DESTDIR)$(libdir)/pkgconfig @list='$(fragments)'; for p in $$list; do \ if test -f $$p; then \ filename=`basename $$p`; \ destmak="$(DESTDIR)$(includedir)/$$filename"; \ echo @GASNET_INSTALL_CMD@ " < $$p > $$destmak"; \ @GASNET_INSTALL_CMD@ < $$p > $$destmak || exit $$? ; \ thread_model=`echo "$$filename" | sed 's/^.*-\(.*\)\.mak$$/\1/'` ; \ destpc="$(DESTDIR)$(libdir)/pkgconfig/gasnet_tools-$$thread_model.pc"; \ $(MAKE) do-pkgconfig-tools thread_model=$$thread_model pkgconfig_file="$$destpc" FRAGMENT="$$destmak" || exit $$? ; \ chmod 644 "$$destpc" || exit $$? ; \ else :; fi; \ done install-exec-local: check-prefix-vars @$(MAKE) $(recurse_local) DO_WHAT=install-exec @$(MAKE) recurse_special DO_WHAT=install-exec uninstall-local: @if test -n "$(DESTDIR)" -a `expr "X$(DESTDIR)" : X/` = 0; then \ echo "ERROR: \$$DESTDIR must begin with a '/' character."; \ exit 1; \ fi @if test `expr "X$(prefix)" : X/` = 0; then \ echo "ERROR: \$$prefix must begin with a '/' character."; \ exit 1; \ fi @$(MAKE) $(recurse_local) DO_WHAT=uninstall @$(MAKE) recurse_special DO_WHAT=uninstall rm -Rf $(DESTDIR)$(docdir) for file in $(fragments) ; do \ rm -f $(DESTDIR)$(includedir)/$$file ; \ done rm -f $(DESTDIR)$(libdir)/pkgconfig/gasnet_tools-*.pc # Bug3285: the behavior of distclean-recursive varies in incompatible ways # across automake versions, such that no matter what variables we specify # some versions will break the dependencies between subdirectories. # Very early automakes ignore DIST_SUBDIRS entirely. # We override it with our own top-level rule to ensure consistent ordering. distclean: force @for dir in $(DIST_SUBDIRS); do \ if test -f "$$dir/Makefile"; then \ ( cd "$$dir" && $(MAKE) distclean ) || exit 1; \ fi; \ done $(MAKE) recurse_special DO_WHAT=distclean $(MAKE) $(AM_MAKEFLAGS) distclean-am rm -f tests/Makefile rm -f $(am__CONFIG_DISTCLEAN_FILES) rm -f config.status gasnet_config.h stamp-h1 rm -f Makefile .PHONY: force tests test do-begin-tests do-end-tests \ other-tests other-run-tests tests-seq tests-par tests-parsync \ run-tests-seq run-tests-par run-tests-parsync \ recurse_special $(recurse_local) if TOOLSONLY_MODE TESTDIST = README testtools.c test.h Makefile.in # A tools-only git clone is *always* dirty, but we don't want to see the # string '-dirty' in version info of distributed tarballs and resuting installs. GIT_DESCRIBE_DIRTY = else TESTDIST = `find . -print | grep -v ^./mpi` GIT_DESCRIBE_DIRTY = --dirty endif dist-hook: @if grep -q 'cache_file=/dev/null' $(srcdir)/configure; then \ echo ERROR: Refusing to distribute configure not generated by Bootstrap. Please start with a clean source tree and Bootstrap. ; \ exit 1 ; \ fi if test -d $(srcdir)/.git ; then \ GASNET_DESC=`( cd $(srcdir) && $${GIT=git} describe --long --always $(GIT_DESCRIBE_DIRTY) ) 2>/dev/null | head -n 1`; \ if test -z "$$GASNET_DESC"; then \ echo 'Use of git describe failed even though .git exists' 1>&2; \ exit 1; \ fi; \ $(PERL) -pi -e "s:no-version-control-info:$$GASNET_DESC:;" -- $(distdir)/configure || exit $$? ; \ echo $$GASNET_DESC > $(distdir)/version.git || exit $$? ; \ fi if test -f $(distdir)/docs/Makefile ; then \ cd $(distdir)/docs && $(MAKE) dist-hook || exit $$? ; \ fi mkdir -p $(distdir)/tests # need this special hack to handle tests or distcheck will fail fulldistdir=`cd $(distdir) ; @PWD_PROG@` export fulldistdir ; \ cd $(srcdir)/tests ; for file in $(TESTDIST) ; do \ if test -d $$file -a ! -d $$fulldistdir/tests/$$file ; then \ mkdir -p $$fulldistdir/tests/$$file || exit $$? ; \ fi; \ if test -f $$file -a ! -f $$fulldistdir/tests/$$file ; then \ cp -p $$file $$fulldistdir/tests/$$file || exit $$? ; \ fi ; \ done # If we've enabled PSHM, also enabled for 'make distcheck' if USE_PSHM PSHM_CONFIG_FLAG=--enable-pshm else PSHM_CONFIG_FLAG= endif DISTCHECK_CONFIGURE_FLAGS = $(PSHM_CONFIG_FLAG) gasnet-2025.8.0/Bootstrap0000775000175000017500000001622115142313673015327 0ustar alastairalastair#!/bin/sh # $Source: bitbucket.org:berkeleylab/gasnet.git/Bootstrap $ # Description: GASNet developer Bootstrap script # Copyright 2004, Dan Bonachea # Terms of use are as specified in license.txt set -e srcdir=`dirname $0` TIME= CONFIRM=${GASNET_BOOTSTRAP_CONFIRM:-0} NOTOOLCHECK=0 TOOLSONLYMODE=0 autofilter="perl -0 -pe 's/^(autoheader.*?: )?WARN.+auxiliary files(.|\n)+WARN.+documentation.\n//m' \ | perl -pe 's/^.*?AC_PROG_LEX invoked multiple times.*?\n?$//g' \ | perl -pe 's/^.*docdir.*y defined (in condition TRUE|here).*?\n?$//' \ | perl -0 -pe 's/^((.*?AC_CONFIG_SUBDIRS.*?\n)+([^ ]* the top level\n)?)*//g'" for arg in "$@"; do case "$arg" in -h) echo "Usage: $0 [options]" echo " -v verbose mode: don't filter benign warnings from autotool output" echo " -t time autotool commands" echo " -y force a Bootstrap, even if it looks unnecessary" echo " -n no checks for autotool presence and versions" echo " -o Bootstrap for tools-only distribution (default is conduit-mode)" echo " -T touch Bootstrap-generated files to make them appear up-to-date" exit 1 ;; -T) DOTOUCH=1 ;; -v) autofilter=cat ;; -y) CONFIRM=1 ;; y) CONFIRM=1 ;; # legacy -n) NOTOOLCHECK=1 ;; n) NOTOOLCHECK=1 ;; # legacy -p) ;; # used by Titanium Bootstrap - ignore -P) ;; # used by Titanium Bootstrap - ignore -o) TOOLSONLYMODE=1 ;; -t) TIME='/usr/bin/time' if test ! -x "$TIME" ; then TIME= fi ;; *) ;; # ignore unrecognized args esac done if [ "$DOTOUCH" = 1 ]; then if [ -r $srcdir/gasnet_config.h.in \ -a -r $srcdir/Makefile.in \ -a -r $srcdir/aclocal.m4 \ -a -r $srcdir/configure \ ]; then echo "Touching Bootstrap-generated files in $srcdir to make them appear up-to-date" cd $srcdir touch aclocal.m4 sleep 2 touch configure gasnet_config.h.in sleep 2 perl -ane 'utime undef, undef, (grep {m/\bMakefile\.in$/ && -f $_} @F);' -- unBootstrap exit 0; else echo "Can't touch generated files because this tree does not appear to be Bootstrapped" exit 1; fi fi DOIT='echo "+ $CMD | \$autofilter" ; ( eval $TIME $CMD 2>&1 || kill $$ ) | eval $autofilter' if [ \ -r $srcdir/gasnet_config.h.in \ -a -r $srcdir/Makefile.in \ -a -r $srcdir/aclocal.m4 \ -a -r $srcdir/configure \ -a "$CONFIRM" != "1" \ ]; then echo 'The "Bootstrap" script need only be used on a' echo 'completely clean, fresh source tree. After the' echo 'first build, you should just use "make" or "gmake".' echo echo 'It looks as though you have already bootstrapped' echo 'this source tree. You should only bootstrap it' echo 'again if the makefiles or configuration files are' echo 'broken and "make" or "gmake" do not work properly.' echo echo 'Are you sure you want to re-bootstrap this tree?' echo case `echo -n` in '') n='-n' c='' ;; *) n='' c='\c' ;; esac echo $n "[y/n]: $c" read redo case $redo in y* ) ;; * ) exit 1; esac fi if test "$NOTOOLCHECK" != "1" ; then missing= for autotool in autoconf autoheader automake aclocal m4 ; do info=`( $autotool --version 2>/dev/null < /dev/null || echo 'Not found' ) | head -1` if test "$info" != "Not found" ; then info="$info, in `which $autotool`" elif test "$autotool" != "m4" ; then missing="$missing$autotool " fi echo "$autotool: $info" done if test "$missing" != ""; then echo "The following GNU autotools are missing from your PATH:" echo " $missing" if test -r $srcdir/gasnet_config.h.in \ -a -r $srcdir/Makefile.in \ -a -r $srcdir/aclocal.m4 \ -a -r $srcdir/configure ; then echo "However, it appears this directory has already been Bootstrapped." echo "You should skip Bootstrap and instead do: configure ; gmake" else echo "Please download them from ftp://ftp.gnu.org/gnu" fi exit 1 fi fi set -x cd $srcdir rm -Rf autom4te*.cache set +x TOOLSONLYFLAG=.gasnet_toolsonly_mode TOOLSONLYFILES="configure.in Makefile.am other/Makefile.am" if test "$TOOLSONLYMODE" = 1 -a ! -f "$TOOLSONLYFLAG" ; then echo "+ Switching source archive to GASNet tools-only mode" eval perl other/tools-toggle.pl -y $TOOLSONLYFILES touch "$TOOLSONLYFLAG" elif test "$TOOLSONLYMODE" = 0 -a -f "$TOOLSONLYFLAG" ; then if test ! -d smp-conduit ; then echo "+ WARNING: Attempted a conduit-mode Bootstrap, but conduit sources appear to be missing." echo "+ WARNING: Assuming you meant to include the -o option for a tools-only distribution." else echo "+ Switching source archive back from GASNet tools-only mode to regular mode" eval perl other/tools-toggle.pl -n $TOOLSONLYFILES rm -f "$TOOLSONLYFLAG" fi fi CMD="aclocal -I other/plpa/config" ; eval $DOIT CMD="autoheader" ; eval $DOIT set -x # autoheader omits updating the header if it thinks nothing has changed, # but automake's dependency checks are stronger (include aclocal.m4, which just changed) # ensure the header looks up-to-date (autoheader -f option not version portable) touch gasnet_config.h.in set +x CMD="autoconf" ; eval $DOIT set -x # Perform some postprocessing to fix bugs in the configure script: # 1) caching: # Our configure script requires caching, and autoconf 2.5 stupidly disables # caching by default. Caching may open some dangers of stale values, but # the alternative is worse - automake reconfiguring in the absence of # precious environment variables leads to silent incorrect behavior that # can't be detected or fixed because there's no cache! # Restore ./config.cache as the default cache # 2) recursive configure: # When $top_builddir contains a space, the configure script tries to cd # back to $top_builddir w/o quoting it. # Add quotes around the offending command. mv configure .configure-orig perl -pe 's@^cache_file=/dev/null$@cache_file=./config.cache@; s/cd \$ac_popdir/cd "\$ac_popdir"/;' \ .configure-orig > configure chmod +x configure rm -f .configure-orig set +x CMD="automake -a" ; eval $DOIT set -x # Perform some postprocessing to fix bugs in automake: # 1) Overrides: Automake is too stupid to notice several overrides we intentionally perform, # leading to spam of harmless warnings of the form: # warning: overriding commands for target X # warning: ignoring old commands for target X # Remove the earlier, overridden rule to silence the warning AND remove unwanted dependencies # top-level: Makefile and distclean targets, remove all but the last rule (ours) perl -0777 -i.bak -pe 's/^(distclean|Makefile):[^\n]*\n(?:\t[^\n]*\n)*(?=.*\n\1:)//msg' Makefile.in # conduits: Makefile target defined in included other/Makefile-conduit.mak, just clear the automake one perl -0777 -i.bak -pe 's/^Makefile:[^\n]*\n(?:\t[^\n]*\n)*//msg' *-conduit/Makefile.in rm -f Makefile.in.bak *-conduit/Makefile.in.bak rm -Rf autom4te*.cache rm -f config.cache gasnet-2025.8.0/configure.in0000664000175000017500000075304315142313673015747 0ustar alastairalastairdnl -*- m4 -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/configure.in $ # Description: GASNet configure script # Copyright 2002, Dan Bonachea # Copyright (c) 2014-2015 Intel Corporation. All rights reserved. # Based in part on the Titanium project configure script # Terms of use are as specified in license.txt define([cv_prefix],[gasnet_cv_]) dnl Public release version packaging identifier: define([GASNET_RELEASE_VERSION_MAJOR_D],[2025]) define([GASNET_RELEASE_VERSION_MINOR_D],[8]) define([GASNET_RELEASE_VERSION_PATCH_D],[0]) dnl GASNet-EX spec version: define([GASNETEX_SPEC_VERSION_MAJOR_D],[0]) define([GASNETEX_SPEC_VERSION_MINOR_D],[19]) dnl GASNet-1 spec version: define([GASNET_SPEC_VERSION_MAJOR_D],[1]) define([GASNET_SPEC_VERSION_MINOR_D],[8]) dnl GASNet tools spec version: define([GASNETT_SPEC_VERSION_MAJOR_D],[1]) define([GASNETT_SPEC_VERSION_MINOR_D],[20]) define([GASNET_RELEASE_VERSION_D], [GASNET_RELEASE_VERSION_MAJOR_D.GASNET_RELEASE_VERSION_MINOR_D.GASNET_RELEASE_VERSION_PATCH_D]) dnl Note that dist-hook rewrites AC_REVISION in the generated configure dnl GASNET_TOOLSONLY_FALSE_BEGIN AC_REVISION("no-version-control-info") define([AC_PACKAGE_NAME],[GASNet]) dnl GASNET_TOOLSONLY_FALSE_END dnl GASNET_TOOLSONLY_TRUE_BEGIN dnl AC_REVISION("no-version-control-info (tools only)") dnl define([AC_PACKAGE_NAME],[GASNet_Tools]) dnl GASNET_TOOLSONLY_TRUE_END define([AC_PACKAGE_BUGREPORT],[https://gasnet-bugs.lbl.gov]) define([AC_PACKAGE_URL],[https://gasnet.lbl.gov]) define([AC_PACKAGE_VERSION],[GASNET_RELEASE_VERSION_D]) ifdef([GASNET_TRIM_ACHELP], dnl must precede AC_INIT [GASNET_TRIM_ACHELP(sbindir,libexecdir,sysconfdir,datadir,sharedstatedir,localstatedir,oldincludedir,infodir,localedir,mandir,htmldir,dvidir,pdfdir,psdir)]) dnl the "new" init incantation dnl AC_INIT(AC_PACKAGE_NAME, AC_PACKAGE_VERSION, AC_PACKAGE_BUGREPORT, AC_PACKAGE_NAME, AC_PACKAGE_URL) dnl AC_CONFIG_SRCDIR(gasnet_tools.h) dnl AM_INIT_AUTOMAKE([no-define]) dnl the "old" init incantation AC_INIT(gasnet_tools.h) AC_PREREQ(2.13) ifdef([GASNET_NO_CHECK_OPTS],[GASNET_NO_CHECK_OPTS]) dnl Don't warn about unknown configure options (which probably belong to client), must precede AC_PRESERVE_HELP_ORDER ifdef([AC_PRESERVE_HELP_ORDER],[AC_PRESERVE_HELP_ORDER]) dnl select merged enable/with --help output GASNET_FIX_SHELL AC_CONFIG_AUX_DIR(config-aux) AC_CANONICAL_SYSTEM AC_VALIDATE_CACHED_SYSTEM_TUPLE dnl GASNET_TOOLSONLY_FALSE_BEGIN AM_INIT_AUTOMAKE(GASNet, GASNET_RELEASE_VERSION_D, no-define) dnl GASNET_TOOLSONLY_FALSE_END dnl GASNET_TOOLSONLY_TRUE_BEGIN dnl AM_INIT_AUTOMAKE(GASNet_Tools, GASNET_RELEASE_VERSION_D, no-define) dnl GASNET_TOOLSONLY_TRUE_END AC_PREFIX_DEFAULT(/usr/local/gasnet) AM_CONFIG_HEADER(gasnet_config.h) GASNET_START_CONFIGURE([],[CXX CXXCPP CXXFLAGS]) GASNET_DEFINE_CONFIGURE_VARS([GASNETI]) GASNET_SPLIT_LINKER_OPTS(LDFLAGS,LIBS) dnl early split to handle direct user input AM_CONDITIONAL(ALWAYS_TRUECOND, test -z "") AM_CONDITIONAL(ALWAYS_FALSECOND, test -n "") # Wish to define docdir in Makefiles if-and-only-if autoconf does not. # If/when we raise the mimumin required version of autoconf to 2.60, # then we can remove this and all uses of NEED_DOCDIR. AM_CONDITIONAL(NEED_DOCDIR, test -z "$docdir") # Set gasnet_toolsonly_mode based on how we Bootstrapped gasnet_toolsonly_mode=no dnl GASNET_TOOLSONLY_TRUE_BEGIN dnl gasnet_toolsonly_mode=yes dnl GASNET_TOOLSONLY_TRUE_END dnl define version identifiers AC_DEFINE_UNQUOTED(GASNET_RELEASE_VERSION_MAJOR,GASNET_RELEASE_VERSION_MAJOR_D) AC_DEFINE_UNQUOTED(GASNET_RELEASE_VERSION_MINOR,GASNET_RELEASE_VERSION_MINOR_D) AC_DEFINE_UNQUOTED(GASNET_RELEASE_VERSION_PATCH,GASNET_RELEASE_VERSION_PATCH_D) AC_DEFINE_UNQUOTED(GASNETI_EX_SPEC_VERSION_MAJOR,GASNETEX_SPEC_VERSION_MAJOR_D) AC_DEFINE_UNQUOTED(GASNETI_EX_SPEC_VERSION_MINOR,GASNETEX_SPEC_VERSION_MINOR_D) AC_DEFINE_UNQUOTED(GASNETI_SPEC_VERSION_MAJOR,GASNET_SPEC_VERSION_MAJOR_D) AC_DEFINE_UNQUOTED(GASNETI_SPEC_VERSION_MINOR,GASNET_SPEC_VERSION_MINOR_D) AC_DEFINE_UNQUOTED(GASNETI_TOOLS_SPEC_VERSION_MAJOR,GASNETT_SPEC_VERSION_MAJOR_D) AC_DEFINE_UNQUOTED(GASNETI_TOOLS_SPEC_VERSION_MINOR,GASNETT_SPEC_VERSION_MINOR_D) dnl legacy defines: AC_DEFINE_UNQUOTED(GASNETI_RELEASE_VERSION,GASNET_RELEASE_VERSION_D) AC_PROG_AWK ######################################################################## ## ## Misc configure option processing ## # default: support pthreads if library found # --enable-pthreads: fail if pthreads lib not found # --disable-pthreads: don't even look for pthreads library GASNET_IF_ENABLED_WITH_AUTO(pthreads, [enable use of pthreads (required to support pthreaded GASNet clients)], [use_pthreads="yes"], [use_pthreads="no"], [use_pthreads="try"]) GASNET_FORBID_PROGRAM_TRANSFORM # This is to support a very conservative implementation of # GASNETE_FAST_ALIGNED_MEMCPY and other type-punning operations. # It is to be enabled only to test if a given problem is related # to our type-punning issues (see bug 1389) GASNET_IF_ENABLED(conservative-local-copy, [enable use of conservative (slower) mechanism for local data movement (default is no)],[ AC_DEFINE(GASNETI_BUG1389_WORKAROUND) GASNET_MSG_WARN([ ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You passed --enable-conservative-local-copy This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------])]) ######################################################################## ## ## Perl ## ## We do this early so we can use "$PERL -e" for complex configure tests. GASNET_PROG_PERL AC_SUBST(PERL) PERLSTART=$TOP_BUILDDIR/other/perlstart AC_SUBST_FILE(PERLSTART) ######################################################################## ## ## Supporting Command-Line Tools ## dnl Store full paths, so we find right ones even if users have dnl some other version in their path GASNET_PATH_PROGS(GMAKE, gmake make $MAKE, GNU make) AC_MSG_CHECKING(for GNU make) GMAKE_VERSTR=`$GMAKE --version | grep GNU 2> /dev/null` if test "$GMAKE_VERSTR" = "" ; then AC_MSG_RESULT(no) AC_MSG_ERROR(cannot find a version of GNU make - please install GNU make and/or set \$GMAKE to indicate where it's located) else GMAKE_VER=`echo "$GMAKE_VERSTR" | $PERL -n -e 'if (/([[0-9]]+)\.([[0-9]]+)(\.[[0-9]]+)?/) { $maj=$1; $min=$2; $pat=$3; printf "%i%03i%03i",($maj,$min,($pat?$pat=~s/\.//:0)) }'` # Currently require 3.79 or newer if test $GMAKE_VER -lt 3079000 ; then AC_MSG_RESULT(no) AC_MSG_ERROR([This software requires GNU make version 3.79 or newer, and you appear to be running: "$GMAKE_VERSTR" - please install GNU make and/or set \$GMAKE to indicate where it's located]) else AC_MSG_RESULT($GMAKE_VERSTR) fi fi AC_SUBST(GMAKE) dnl Other tools checked later, after PROG_CC check sets cross_compiling ######################################################################## ## ## C/C++ Compilers ## GASNET_PROG_CC if test -n "$CFLAGS"; then # embed user-provided CFLAGS into CC for safe-keeping CC="$CC $CFLAGS" CFLAGS="" fi AC_PROG_LN_S GASNET_BIGENDIAN AC_CHECK_PROG(have_mpcc_r,mpcc_r,yes,no) ## specific compiler families GASNET_FAMILY_CACHE_CHECK(C, CC, gasnet_cv_cc_family) ## compiler family early initialization gcc_flag_prefix='' case "$CC_FAMILY" in GNU) GASNET_GCC_VERSION_CHECK(CC) gcc_flag_delim=' ' case "$CC_SUBFAMILY" in GCCFSS) AC_DEFINE(GASNETI_GCC_GCCFSS) ;; APPLE) AC_DEFINE(GASNETI_GCC_APPLE) ;; NVIDIA) gcc_flag_prefix='-Xcompiler ' gcc_flag_delim=',' ;; esac ;; PGI) GASNET_PGI_VERSION_CHECK(CC);; Pathscale) GASNET_PATHSCALE_VERSION_CHECK(CC);; esac if test "$cross_compiling" = "yes" ; then AC_DEFINE(GASNETI_CROSS_COMPILING) fi ## discover bit width dnl Use the results of CHECK_SIZEOF(void *) to select 64-bit mode for some tools dnl NOTE: CHECK_SIZEOF may only be safely called after AC_PROG_CC/AC_PROG_CPP dnl Store full paths, so we find right ones even if users have dnl some other version in their path GASNET_CHECK_SIZEOF(void *) GASNETI_PTR_BITS=`expr $SIZEOF_VOID_P \* 8` AC_SUBST(GASNETI_PTR_BITS) ### # Allow user forced ARCH and/or ISA settings w/o the corresponding probes # XXX: Incomplete... GASNET_IF_ENABLED_NOHELP(force-arch, [ case "$enable_force_arch" in generic|ibmpe|wsl|crayex) : # OK ;; yes|'') AC_MSG_ERROR([Missing required argument to --enable-force-arch]) ;; *) AC_MSG_ERROR([Unknown --enable-force-arch argument '$enable_force_arch']) ;; esac ]) ## # Look for a Cray-provided header allowing for the possibility we are not using Cray's wrapper compiler # There are two distinct "success" cases: # 1) The header is found w/o any extra CPPFLAGS # 2) The system is a Cray and the header is found only when the env var named by the 2nd arg is appended to CPPFLAGS # The includes_var passed is intended for use with CRAY_* variables defined only by Cray-provided standard modules, # and hence does NOT use GASNET_ENV_DEFAULT or generate --help output : these variables should NEVER be manually set # by an end-user, although they might be implicitly changed by switching loaded modules. # GASNET_CHECK_CRAY_HEADER(header, includes_var [, action-on-success-1] [, action-on-success-2] [, action-on-failure]) AC_DEFUN([GASNET_CHECK_CRAY_HEADER],[ pushdef([cvname],ac_cv_header_[]translit($1,'.-','__')) dnl Any others? AC_CHECK_HEADERS([$1], [$3], [ if expr "$target" : ".*-cnl-" >/dev/null; then AC_MSG_CHECKING([for [\$]$2 in the environment]) if test "${$2+set}" = set; then AC_MSG_RESULT([yes (rechecking there for $1)]) unset cvname GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS ${$2}") AC_CHECK_HEADERS([$1]) dnl Any action passed here could not set CPPFLAGS GASNET_POPVAR(CPPFLAGS) if test $cvname = yes; then : $4 fi else AC_MSG_RESULT(no) fi fi if test $cvname = no; then : $5 fi cvname=no dnl Otherwise recheck makes wrong choice ]) popdef([cvname]) ]) dnl GASNET_TRY_WNO_FLAG(type,flag,action-on-success,action-on-failure) type=C or CXX dnl As per bug 2718 gcc might silently ignore -Wno-such-flag, but not -Wsuch-flag dnl XXX: Probably sufficient to just probe for -Wsuch-flag (but lie in AC_MSG_CHECKING) AC_DEFUN([GASNET_TRY_WNO_FLAG],[ ]GASNET_TRY_[$1]FLAG[([$2], ]GASNET_TRY_[$1]FLAG[(patsubst([$2],[Wno-],[W]),[$3],[$4]),[$4])]) dnl GASNET_GET_GNUWARNINGFLAGS(type, family, flagprefix) type=C or CXX AC_DEFUN([GASNET_GET_GNUWARNINGFLAGS],[ if test "$enabled_dev_warnings" = "yes" ; then # enable additional supported warnings for warnflag in dnl Traditional GASNet devwarn: -Wall \ -Wpointer-arith \ -Wnested-externs \ -Wwrite-strings \ -Wmissing-format-attribute \ dnl Selected warnings: -Winit-self \ -Wvla \ -Wexpansion-to-defined \ -Woverlength-strings \ dnl -Wextra subset: -Wclobbered \ -Wcast-function-type \ -Wempty-body \ -Wignored-qualifiers \ -Wimplicit-fallthrough \ -Wmissing-parameter-type \ -Wold-style-declaration \ -Wuninitialized \ -Wshift-negative-value \ ; do if test "$2" = "Open64" && ( test "x$warnflag" = "x-Wempty-body" || test "x$warnflag" = "x-Wexpansion-to-defined" ) ; then : # Bug 3711: Open64 botches some warnings at link time, which is not probed here else ]GASNET_TRY_[$1]FLAG[([$3$warnflag], [DEVWARN_[$1]FLAGS="$DEVWARN_[$1]FLAGS $3$warnflag"]) fi done # Disable DEVWARN flags from -Wall that we don't support in our library code GASNET_TRY_WNO_FLAG([$1],[$3-Wno-format-overflow], [DEVWARN_[$1]FLAGS="$DEVWARN_[$1]FLAGS $3-Wno-format-overflow"]) GASNET_TRY_WNO_FLAG([$1],[$3-Wno-format-truncation], [DEVWARN_[$1]FLAGS="$DEVWARN_[$1]FLAGS $3-Wno-format-truncation"]) # Disable DEVWARN flag(s) from -Wcast-function-type that we don't support in our library code GASNET_TRY_WNO_FLAG([$1],[$3-Wno-cast-function-type-strict], [DEVWARN_[$1]FLAGS="$DEVWARN_[$1]FLAGS $3-Wno-cast-function-type-strict"]) ifelse(GASNETI_C_OR_CXX([$1]),[C],[ # CC and MPI_CC only. Not desired for CXX GASNET_TRY_WNO_FLAG([$1],[$3-Wno-strict-prototypes], [DEVWARN_[$1]FLAGS="$DEVWARN_[$1]FLAGS $3-Wno-strict-prototypes"]) ]) fi # compiler-specific global warning disables case "$2" in Pathscale) # pathcc default enables -Wformat-security which we don't want GASNET_TRY_WNO_FLAG([$1],[$3-Wno-format-security], [[$1]FLAGS="$[$1]FLAGS $3-Wno-format-security"]) ;; Open64) # Open64's maybe-uninitialized analysis is too broken to be usable GASNET_TRY_WNO_FLAG([$1],[$3-Wno-uninitialized], [[$1]FLAGS="$[$1]FLAGS $3-Wno-uninitialized"]) # Open64 strict aliasing complains about (void **)/(T **) aliasing, which we use in places GASNET_TRY_WNO_FLAG([$1],[$3-Wno-strict-aliasing], [[$1]FLAGS="$[$1]FLAGS $3-Wno-strict-aliasing"]) ;; GNU) # GCC 11 appears to have analysis problems which yield bogus warnings (bugs 4228,4231,4232) dnl We do not use AC_CACHE_CHECK() here since doing so w/o additional changes dnl would conflate CC and MPI_CC (and this is not a terribly expensive check). AC_MSG_CHECKING(whether ifelse([$1],[CXX],[C++ compiler is g++],[C compiler is gcc]) 11 or higher) GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") GASNET_TRY_COMPILE_WITHWARN(GASNETI_C_OR_CXX([$1]),[ #include "gasnet_portable_platform.h" #if PLATFORM_COMPILER_VERSION_LT(11,0,0) #error #endif ],[],[ is_gcc11_or_higher=yes ],[ is_gcc11_or_higher=yes ],[ is_gcc11_or_higher=no ]) GASNET_POPVAR(CPPFLAGS) AC_MSG_RESULT($is_gcc11_or_higher) if test "$is_gcc11_or_higher" = yes; then GASNET_TRY_WNO_FLAG([$1],[$3-Wno-array-bounds], [[$1]FLAGS="$[$1]FLAGS $3-Wno-array-bounds"]) GASNET_TRY_WNO_FLAG([$1],[$3-Wno-stringop-overflow], [[$1]FLAGS="$[$1]FLAGS $3-Wno-stringop-overflow"]) # These warnings were immediately problematic when introduced in 12.1 (bugs 4450,4451) # earlier versions silently ignore the unrecognized option GASNET_TRY_WNO_FLAG([$1],[$3-Wno-dangling-pointer], [[$1]FLAGS="$[$1]FLAGS $3-Wno-dangling-pointer"]) GASNET_TRY_WNO_FLAG([$1],[$3-Wno-use-after-free], [[$1]FLAGS="$[$1]FLAGS $3-Wno-use-after-free"]) fi ;; esac # disable -Wformat if unsure we can support it for the printf implementation in use if test -z "$have_c99_format" ; then AC_MSG_ERROR([Internal configure error - Wformat check missing]) elif test "$have_c99_format" = 0 ; then # avoid false warnings GASNET_TRY_WNO_FLAG([$1],[$3-Wno-format], [[$1]FLAGS="$[$1]FLAGS $3-Wno-format"]) fi # disable warnings that should always be off (not supported by our headers) GASNET_TRY_WNO_FLAG([$1],[$3-Wno-unused], [ [$1]FLAGS="$[$1]FLAGS $3-Wno-unused" # -Wno-unused unfortunately disables unused-result, which we want to preserve if test "$2" != "Open64" ; then # Open64 accepts the illegal option and botches it GASNET_TRY_[$1]FLAG([$3-Wunused-result], [[$1]FLAGS="$[$1]FLAGS $3-Wunused-result"]) fi ], [ # -Wno-unused meta disable failed, try to disable the problematic sub-options individually GASNET_TRY_WNO_FLAG([$1],[$3-Wno-unused-function], [[$1]FLAGS="$[$1]FLAGS $3-Wno-unused-function"]) GASNET_TRY_WNO_FLAG([$1],[$3-Wno-unused-value], [[$1]FLAGS="$[$1]FLAGS $3-Wno-unused-value"]) GASNET_TRY_WNO_FLAG([$1],[$3-Wno-unused-variable], [[$1]FLAGS="$[$1]FLAGS $3-Wno-unused-variable"]) ]) # -Wno-unused is not enough to ignore unused params on clang -Wall -Wextra (clang 3.8.1) GASNET_TRY_WNO_FLAG([$1],[$3-Wno-unused-parameter], [[$1]FLAGS="$[$1]FLAGS $3-Wno-unused-parameter"]) GASNET_TRY_WNO_FLAG([$1],[$3-Wno-address], [[$1]FLAGS="$[$1]FLAGS $3-Wno-address"]) if test "$use_pthreads" != "no" ; then # some crappy pthread mutex implementations generate warnings without -Wno-missing-braces AC_MSG_CHECKING(for buggy pthread.h mutex initializers) old[$1]FLAGS="$[$1]FLAGS" [$1]FLAGS="$DEVWARN_[$1]FLAGS $[$1]FLAGS" # FREEBSD requires the -pthread compiler flag when including pthread.h case "$target_os" in freebsd*) [$1]FLAGS="-pthread $[$1]FLAGS" ;; esac ]GASNET_TRY_[$1]COMPILE_WITHWARN[([#include ], [pthread_mutex_t fastmutex = PTHREAD_MUTEX_INITIALIZER;], [AC_MSG_RESULT(ok)], [AC_MSG_RESULT(buggy) GASNET_TRY_WNO_FLAG([$1],[$3-Wno-missing-braces], [old[$1]FLAGS="$old[$1]FLAGS $3-Wno-missing-braces"])], [#bug611: ignore failures here, which may be due to broken/missing pthreads support #AC_MSG_ERROR(failure while checking for buggy pthread.h mutexes) AC_MSG_RESULT(failure - ignored) ] ) [$1]FLAGS="$old[$1]FLAGS" fi case "$target_os" in solaris*) # hide pragma warnings in system header files included by absolute path GASNET_TRY_WNO_FLAG([$1],[$3-Wno-unknown-pragmas],[[$1]FLAGS="$[$1]FLAGS $3-Wno-unknown-pragmas"]) esac #]GASNET_TRY_[$1]FLAG[([-ansi -U__STRICT_ANSI__],[[$1]FLAGS="$[$1]FLAGS -ansi -U__STRICT_ANSI__"]) ]) ### # # choose the default CC flags # NOTE: we intentionally *overwrite* CFLAGS with reasonable, well-tested values, # to avoid picking up bad default flags from AC_PROG_CC or the default user environment # Users who want to insert a specific compiler flag for all builds should append it to $CC DEVWARN_CFLAGS_OPT= case "$CC_FAMILY" in GNU) GASNET_PUSHVAR(CFLAGS,"-O3") # prefer the --param inliner option(s), which give us finer control GASNET_TRY_CFLAG([${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns-single=35000], [CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns-single=35000" GASNET_TRY_CFLAG([${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000], [CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}max-inline-insns=100000"])], GASNET_TRY_CFLAG([${gcc_flag_prefix}-finline-limit=10000], [CFLAGS="$CFLAGS ${gcc_flag_prefix}-finline-limit=10000"]) ) # gcc 3.4+ require new flags to enable full inlining GASNET_TRY_CFLAG([${gcc_flag_prefix}--param${gcc_flag_delim}inline-unit-growth=10000], [CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}inline-unit-growth=10000"]) GASNET_TRY_CFLAG([${gcc_flag_prefix}--param${gcc_flag_delim}large-function-growth=200000], [CFLAGS="$CFLAGS ${gcc_flag_prefix}--param${gcc_flag_delim}large-function-growth=200000"]) # We'd like to use -Winline to detect call sites where the optimizer # ignores our inline function modifier (usually due to technical limitations) # However, some versions of gcc issue spurious warnings with -Winline # for inlining operations which the user did not request. # Detect that gcc bug and avoid -Winline for those versions GASNET_TRY_CFLAG([${gcc_flag_prefix}-Winline],[ DEVWARN_CFLAGS_OPT="${gcc_flag_prefix}-Winline" AC_MSG_CHECKING(for buggy -Winline) GASNET_PUSHVAR(CFLAGS,"$CFLAGS $DEVWARN_CFLAGS_OPT") GASNET_TRY_CCOMPILE_WITHWARN([ int foo() { return 0; } int bar() { return foo() + bar(); } ], [ int x = bar(); ], [ AC_MSG_RESULT(ok) # keep -Winline ], [ AC_MSG_RESULT(buggy) DEVWARN_CFLAGS_OPT="" # remove -Winline ], [ GASNET_MSG_ERROR(failure when detecting buggy -Winline)]) GASNET_POPVAR(CFLAGS) ]) CCOPTFLAGS="$CFLAGS" GASNET_POPVAR(CFLAGS) ;; Pathscale) GASNET_PUSHVAR(CFLAGS,"-O3") # We'd like to use -Winline (for the same reasons as with gcc). # However, some installations have been observed to complain # on every inline keyword, due to -fno-inline being inserted # by the compiler driver. Avoid using -Winline in such a case. GASNET_TRY_CFLAG([-Winline],[ DEVWARN_CFLAGS_OPT="-Winline" AC_MSG_CHECKING(for -Winline flags conflict) GASNET_PUSHVAR(CFLAGS,"$CFLAGS $DEVWARN_CFLAGS_OPT") GASNET_TRY_CCOMPILE_WITHWARN([ inline int foo() { return 0; } ], [ int x = foo(); ], [ AC_MSG_RESULT(ok) # keep -Winline ], [ AC_MSG_RESULT(conflict) DEVWARN_CFLAGS_OPT="" # remove -Winline ], [ GASNET_MSG_ERROR(failure when detecting -Winline conflict)]) GASNET_POPVAR(CFLAGS) ]) CCOPTFLAGS="$CFLAGS" GASNET_POPVAR(CFLAGS) ;; Sun) if test "$GASNETI_PTR_BITS" = 64; then # -fast => -xarch=v8 which clobbers user's 64-bit choice SUN_ARCH_FLAG=`echo "$CC $CFLAGS" | $PERL -ne 'foreach(split(/ /,$_)) { print "$_" if (m/^-xarch/);}'` else SUN_ARCH_FLAG= fi CCOPTFLAGS="-fast $SUN_ARCH_FLAG -xO5" # bug 3662: try to workaround warnings generated by -fast when the target system cannot be autodetected GASNET_TRY_CFLAG([$CCOPTFLAGS],[],[ SUN_FALLBACK_FLAG=`echo "$_GASNET_TRY_CFLAG_TMP" | $PERL -ne 'print " $1" if (m/falling back to (.*)$/);'` GASNET_TRY_CFLAG([$CCOPTFLAGS$SUN_FALLBACK_FLAG],[ CCOPTFLAGS="$CCOPTFLAGS$SUN_FALLBACK_FLAG" ]) ]) ;; Cray) CCOPTFLAGS="-O2" ;; # DOB: -O3 is unstable on Cray cc XLC) case "$target_os" in darwin*) # enabling ipa (-O4 or higher) breaks linking to MPI (and thus ibv). case `/usr/sbin/sysctl hw.cpusubtype | cut '-d ' -f2` in # bug926: on G5 (cpusubtype 100) -qarch={ppc970,auto} causes corruption of 64-bit integer arithmetic 100) CCOPTFLAGS="-O3 -qhot -qarch=g5 -qtune=auto -qthreaded -qmaxmem=-1" ;; *) CCOPTFLAGS="-O3 -qhot -qarch=auto -qtune=auto -qthreaded -qmaxmem=-1" ;; esac ;; linux*) CCOPTFLAGS="-O3 -qarch=auto -qtune=auto -qthreaded -qmaxmem=-1";; *) #CCOPTFLAGS="-O5 -qthreaded -qmaxmem=-1" ;; # -O5 == -O3 w/ intra-procedural analysis, maxmem=-1 is default for -O3 or higher CCOPTFLAGS="-O3 -qarch=auto -qtune=auto -qthreaded -qmaxmem=-1" ;; # -O5 causes linker to hang on Titanium esac GASNET_TRY_CFLAG([-qnosmp], [CCOPTFLAGS="$CCOPTFLAGS -qnosmp"]) # If $CC sets -q, then remove conflicting options from CCOPTFLAGS for flag in arch tune hot threaded smp; do if echo "$CC" | grep "q\(no\)\?${flag}" >/dev/null; then CCOPTFLAGS=`echo "$CCOPTFLAGS" | sed -e "s/-q\(no\)\?${flag}\(=[[a-z0-9_]]*\)\?//"` fi done ;; Intel) CCOPTFLAGS="-O3" ;; NVHPC) CCOPTFLAGS="-O1" ;; # TODO: restore -O2 if/when bugs are resolved? (see bug 4158) PGI) CCOPTFLAGS="-O2" # Default # Work-aroung bug 2842: bad code gen by pgcc 10.5-0 through 10.7-0 at -O2 # XXX: Need an ending version here when known GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") GASNET_TRY_CACHE_CHECK([if PGI compiler misoptimizes assignment to (const char *)], bug2842, [ #include "gasnet_portable_platform.h" #if PLATFORM_COMPILER_VERSION_LT(10,5,0) || PLATFORM_COMPILER_VERSION_GT(10,7,0) #error "GOOD pgcc version should FAIL this test" #endif ],[(void)0],[CCOPTFLAGS="-O1"]) GASNET_POPVAR(CPPFLAGS) ;; TINY) CCOPTFLAGS="" # optimization not supported SEPARATE_CC=1 # force separate compilation - multiple -c compilation not supported ;; Open64) if test "$GASNETI_PTR_BITS" = 32; then # See bug 2725 for info on test failures at -O3 # Also see "opencc -m32 -O2" crashing when building libupcr CCOPTFLAGS="-O1" else # See bug 2724 for info on "-OPT:wrap_around_unsafe=off" CCOPTFLAGS="-O3 -OPT:wrap_around_unsafe=off" fi ;; Clang) CCOPTFLAGS="-O3" ;; *) CCOPTFLAGS="-O" ;; esac AC_SUBST(SEPARATE_CC) case "$CC_FAMILY" in GNU) GASNET_PUSHVAR(CFLAGS,"${gcc_flag_prefix}-g3") case "$target_os" in darwin*) # Want -gstabs+ instead of -g3, if supported GASNET_TRY_CFLAG([${gcc_flag_prefix}-gstabs+], [CFLAGS="${gcc_flag_prefix}-gstabs+"]) ;; esac CCDEBUGFLAGS="$CFLAGS" GASNET_POPVAR(CFLAGS) ;; Pathscale) CCDEBUGFLAGS="-g3 -O0" ;; # need to explicitly disable optimization Open64) CCDEBUGFLAGS="-g3" ;; Clang) CCDEBUGFLAGS="-g -O0" ;; Cray) CCDEBUGFLAGS="-g -O0" ;; *) CCDEBUGFLAGS="-g" ;; esac dnl GASNET_GET_ULTRASPARC_FLAGS(type,flags) type=C or CXX # attempt to enable the ultrasparc ISA in MISC_C(XX)FLAGS, and test for related capabilities # flags is compiler options which enable ultrasparc instructions for 32-bit ABI GASNET_IF_DISABLED([ultrasparc-probe],[Disable probe for UltraSPARC compiler options],[DISABLE_ULTRASPARC=1]) AC_DEFUN([GASNET_GET_ULTRASPARC_FLAGS],[ pushdef([ultrasparc3code],[ void foo(void) { #ifdef __GNUC__ register void * addr = 0; register int oldval = 0; register int newval = 1; __asm__ __volatile__ ("cas [[%2]], %0, %1" : "=&r"(oldval), "=&r"(newval) : "r" (addr) : "memory"); #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) __asm("cas [[%i0]], %i1, %i2"); #else #error unknown sparc compiler #endif } ]) if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_ULTRASPARC" != 1; then for flag in $2 ; do ]GASNET_TRY_[$1]FLAG[([$flag],[ultrasparc_flag_worked=1],[ultrasparc_flag_worked=0]) if test "$ultrasparc_flag_worked" = 1; then GASNET_PUSHVAR([$1]FLAGS,"$[$1]FLAGS $MISC_[$1]FLAGS $flag") AC_MSG_CHECKING(for working flag $flag) AC_TRY_RUN(ultrasparc3code [ int main(void) { return 0; } ], [ultrasparc_flag_worked=1], [ultrasparc_flag_worked=0], [ultrasparc_flag_worked=1]) GASNET_POPVAR([$1]FLAGS) if test "$ultrasparc_flag_worked" = 1; then AC_MSG_RESULT(yes) MISC_[$1]FLAGS="$flag" break else AC_MSG_RESULT(no) fi fi done fi AC_MSG_CHECKING(for UltraSPARC instruction support) GASNET_PUSHVAR([$1]FLAGS,"$[$1]FLAGS $MISC_[$1]FLAGS") ]GASNET_TRY_[$1]COMPILE_WITHWARN[( [ ultrasparc3code ] , [ ], [ AC_MSG_RESULT(yes) AC_DEFINE(GASNETI_ARCH_ULTRASPARC) ], [ AC_MSG_RESULT(no/warning) ], [ AC_MSG_RESULT(no/error) ]) GASNET_POPVAR([$1]FLAGS) popdef([ultrasparc3code]) ]) dnl GASNET_GET_PPC64_FLAGS(type,flags) type=C or CXX # attempt to enable 64-bit inline asm in MISC_C(XX)FLAGS, and test for related capabilities # flags is compiler options which enable ppc64 instructions for 32-bit ABI GASNET_IF_DISABLED([ppc64-probe],[Disable probe for PPC64 compiler options],[DISABLE_PPC64=1]) AC_DEFUN([GASNET_GET_PPC64_FLAGS],[ pushdef([ppc64code],[[ #include #if (defined(__xlC__) || defined(__ibmxl__)) && !defined(__clang__) static int testme(double *p); #pragma mc_func testme { \\ /* ARGS: r3 = p LOCAL: r4, r5 */ \\ "38a00001" /* li r5,1 */ \\ "38800000" /* li r4,0 */ \\ "f8830000" /* std r4,0(r3) */ \\ "e8a30000" /* ld r5,0(r3) */ \\ "7ca32b78" /* mr r3,r5 */ \\ } #pragma reg_killed_by testme cr0, gr4, gr5 #else static int testme(double *p) { int tmp, result; __asm__ __volatile__ ( "li %2,1 \n\t" "li %1,0 \n\t" "std %1,0(%3) \n\t" "ld %2,0(%3) \n\t" : "=m" (*p), "=&b" (tmp), "=&r" (result) : "b" (p) ); return result; } #endif ]]) if test "$GASNETI_PTR_BITS" = 32 -a "$DISABLE_PPC64" != 1 -a "$cross_compiling" != "yes"; then dnl Bug 1587: "for flag in ; do" chokes the shell on Solaris - so use ifelse ifelse([$2],[],[:],[ for flag in $2 ; do ]GASNET_TRY_[$1]FLAG[([$flag],[ppc64_flag_worked=1],[ppc64_flag_worked=0]) if test "$ppc64_flag_worked" = 1; then GASNET_PUSHVAR([$1]FLAGS,"$[$1]FLAGS $MISC_[$1]FLAGS $flag") AC_MSG_CHECKING(for working flag $flag) AC_TRY_RUN(ppc64code [ int main(void) { double x; return testme(&x); } ], [ppc64_flag_worked=1], [ppc64_flag_worked=0], [ppc64_flag_worked=1]) GASNET_POPVAR([$1]FLAGS) if test "$ppc64_flag_worked" = 1; then AC_MSG_RESULT(yes) MISC_[$1]FLAGS="$flag" break else AC_MSG_RESULT(no) fi fi done ]) fi AC_MSG_CHECKING(for PPC64 instruction support) GASNET_PUSHVAR([$1]FLAGS,"$[$1]FLAGS $MISC_[$1]FLAGS") ]GASNET_TRY_[$1]COMPILE_WITHWARN[( [ ppc64code ] , [ ], AC_TRY_RUN(ppc64code [ int main(void) { double x; return testme(&x); } ], [AC_MSG_RESULT(yes) AC_DEFINE(GASNETI_ARCH_PPC64)], [AC_MSG_RESULT(no/failure)], [ # Cross compiling. For now just trust PTR_BITS. if test "$GASNETI_PTR_BITS" = 64; then AC_MSG_RESULT([yes (cross-compiling w/ 64-bit pointers)]) AC_DEFINE(GASNETI_ARCH_PPC64) else AC_MSG_RESULT([no (cross-compiling w/ 32-bit pointers)]) fi ]), [ AC_MSG_RESULT(no/warning) ], [ AC_MSG_RESULT(no/error) ]) GASNET_POPVAR([$1]FLAGS) popdef([ppc64code]) ]) # Detect features that affect MISCFLAGS if test "$cross_compiling" = "yes" && test -z "$gasnet_cv_c99_format" ; then gasnet_cv_c99_format=no # conservatively assume it's unavailable if we can't check fi GASNET_TRY_CACHE_RUN([for working C99 printf specifiers],c99_format, [ #include /* snprintf */ #include /* strcmp */ #include /* types */ #include /* reporting */ char test[[100]]; char expect[[100]]; int check(void) { ptrdiff_t pd, pdneg; size_t sz = 0xAAAABBBB; strcat(expect, "AAAABBBB"); if (sizeof(size_t) >= 8) { sz <<= 16; sz <<= 16; sz += 0xCCCCDDDD; strcat(expect,"CCCCDDDD"); } strcat(expect, " 987654321"); pd = 987654321; if (sizeof(ptrdiff_t) >= 8) { pd *= 1000000000; pd += 987654321; strcat(expect, "987654321"); } strcat(expect, " -123456789"); pdneg = -123456789; int ret = snprintf(test,sizeof(test),"%zX %ti %ti",sz,pd,pdneg); if (ret <= 0) return ret; if (strcmp(test,expect)) return 666; return 0; } int main(void) { int ret = check(); if (ret) { printf("got %i(%s): \t'%s'\n",ret,strerror(errno),test); /* for debugging */ printf("expected: \t'%s'\n", expect); } return ret; } ],[ have_c99_format=1 ],[ have_c99_format=0 ]) AC_DEFINE_UNQUOTED(HAVE_C99_FORMAT_SPECIFIERS,[$have_c99_format]) dnl GASNET_SET_MISCFLAGS(CC|MPI_CC, compliancecode) AC_DEFUN([GASNET_SET_MISCFLAGS],[ # Set MISC_CFLAGS: flags to be used by all C compilations, regardless of optimization/debugging level # This should include architectural/CPU flags, warning flags, and anything required for C99 conformance # We do not currently allow a user override of MISC_C(PP)FLAGS MISC_CFLAGS="" misc_flag_prefix='' misc_flag_delim=' ' case "$CC_FAMILY" in GNU) case "$CC_SUBFAMILY" in NVIDIA) misc_flag_prefix='-Xcompiler ' misc_flag_delim=',' ;; esac case "$target_cpu" in sparc) GASNET_GET_ULTRASPARC_FLAGS(C,["-mcpu=ultrasparc3 -mtune=ultrasparc3" "-mcpu=ultrasparc -mtune=ultrasparc"]);; rs6000|powerpc*) GASNET_GET_PPC64_FLAGS(C,["-force_cpusubtype_ALL" "-Wa,-mppc64"]);; esac case "$target_os" in darwin*) GASNET_TRY_WNO_FLAG([C],[${misc_flag_prefix}-Wno-long-double], [MISC_CFLAGS="$MISC_CFLAGS ${misc_flag_prefix}-Wno-long-double"]) ;; esac ;; Cray) AC_MSG_CHECKING([for Cray C warning flags]) crayc_warn_flags="236:3185" # 3185 = bug 3306 GASNET_PUSHVAR(CFLAGS,"$CFLAGS -g") # bug 3309 is specific to -g GASNET_TRY_CCOMPILE_WITHWARN( [ typedef struct { int f1; } S; S foo(void) { S s; s.f1 = 1; return s; } ], [], [], [ crayc_warn_flags="${crayc_warn_flags}:7212" ], # bug 3309, Cray C 8.5+ [GASNET_MSG_ERROR(failure building struct warning test)]) GASNET_POPVAR(CFLAGS) case "$target_cpu" in x86_64) MISC_CFLAGS="-hnomessage=$crayc_warn_flags" ;; # XT, XE, XK, XC, etc. *) AC_MSG_ERROR(Cray C compiler for unknown target CPU) ;; esac AC_MSG_RESULT([$MISC_CFLAGS]) ;; Intel) # Note we need to support both older -wd and newer -diag-disable # Setting (CC|MPI_CC)_WDFLAG simplifes doing so in later tests pushdef([wdflag],$1[]_WDFLAG) GASNET_TRY_CFLAG([-diag-disable=177], [wdflag='-diag-disable='], [wdflag='-wd']) MISC_CFLAGS="${wdflag}177 ${wdflag}279" GASNET_TRY_CFLAG([${wdflag}1572], [MISC_CFLAGS="$MISC_CFLAGS ${wdflag}1572"]) popdef([wdflag]) ;; NVHPC) # TODO: are either `-M` options, inherited from PGI, still required? # suppress large number of useless default warnings # get inline assembly and sign-extended widening MISC_CFLAGS="-w -Masmkeyword -Msignextend" ;; PGI) MISC_CFLAGS="-Masmkeyword -Msignextend" # get inline assembly and sign-extended widening # The following looks backwards, but is not. # PGI 20.1 introduced fine-grained warning control at the same time as # default-enabling a large number of useless warnings (on the level of # -Wextra in other compilers). GASNET_TRY_CFLAG([[-Wc,--diag_suppress=177]], [MISC_CFLAGS="-w $MISC_CFLAGS"]) ;; Sun) if test "$target_cpu" = "sparc"; then GASNET_GET_ULTRASPARC_FLAGS(C,["-xarch=v8plusb" "-xarch=v8plusa" "-xarch=v8plus" "-xarch=sparcvis2" "-xarch=sparcvis" "-xarch=sparc"]) fi # Try to suppress warnings about __attribute__(__common__): GASNET_TRY_CFLAG([-erroff=E_ATTRIBUTE_NOT_FUNC], [MISC_CFLAGS="$MISC_CFLAGS -erroff=E_ATTRIBUTE_NOT_FUNC"]) MISC_CFLAGS="$MISC_CFLAGS -errtags" ;; # show warning tag ids in warnings XLC) GASNET_GET_PPC64_FLAGS(C) # Try to suppress certain warnings: # 1500-010 = infinite loop (such as in our tests) # 1500-029 = could not inline (e.g. varargs, alloc, etc.) # 1506-229 = empty source file (some linux headers) GASNET_TRY_CFLAG([-qsuppress=1500-010:1500-029:1506-229], [MISC_CFLAGS="$MISC_CFLAGS -qsuppress=1500-010:1500-029:1506-229"]) ;; *) ;; esac # Add warning enable/suppression flags to MISC_CFLAGS case "$CC_FAMILY" in GNU | Pathscale | Open64 | Clang) GASNET_PUSHVAR(CFLAGS,"$MISC_CFLAGS") GASNET_GET_GNUWARNINGFLAGS(C,$CC_FAMILY,[${misc_flag_prefix}]) MISC_CFLAGS="$CFLAGS" GASNET_POPVAR(CFLAGS) ;; *) ;; esac # Set MISC_CPPFLAGS: flags to be used by all C preprocesses and compilations # Note this is ALSO used for C++ compilation, so only generic language-independent options should go in here # We do not currently allow a user override of MISC_C(PP)FLAGS # but this is where we embed the user's CPPFLAGS input to configure MISC_CPPFLAGS="$CPPFLAGS" case "$CC_FAMILY" in GNU) case "$target_os" in darwin*) # add some options which are specific to the Apple Inc version of gcc GASNET_TRY_CFLAG([${misc_flag_prefix}-no-cpp-precomp], [MISC_CPPFLAGS="$MISC_CPPFLAGS ${misc_flag_prefix}-no-cpp-precomp"]) ;; esac ;; *) ;; esac # Determine the minimal CFLAGS we need to add for C99 compliance # This is done incrementally to avoid passing options on newer compiler versions where the # required compliance is provided by default, making the flag redundant (and potentially detrimental) # This also allows the user to pass a specific compliance flag in $CC without conflict case "$CC_FAMILY" in # Some known oddball cases: XLC) gasnet_c99_flags="-qlanglvl=extc99 -qlanglvl=stdc99";; Sun) gasnet_c99_flags="-xc99=all";; Cray) gasnet_c99_flags="'-h c99'";; PGI) gasnet_c99_flags="-c99 -c9x" ;; NVHPC) gasnet_c99_flags="-c99" ;; # One of these should work for the rest: # std=c99 requests strict C99 conformance from gcc and look-alikes, whereas # std=gnu99 additionally requests GNU-specific language extensions. # All GASNet code should adhere to the subset of strict C99 in the README coding standards, # (a subset of std=c99), however these flags are also used to compile network API headers # and client code that may require more general support. Therefore std=gnu99 is default. *) gasnet_c99_flags="${misc_flag_prefix}-std=gnu99 ${misc_flag_prefix}-c99 ${misc_flag_prefix}-std=c99";; esac # NOTE: We do not currently cache this check because it is expanded in multiple contexts GASNET_C99_FLAG=unknown eval set - $gasnet_c99_flags for flag in "" "[$]@"; do GASNET_PUSHVAR(CFLAGS, "$CFLAGS $MISC_CFLAGS $MISC_CPPFLAGS") # first see if the flag generates warnings GASNET_TRY_CFLAG([$flag],[ # now see if it gives us the support we want GASNET_PUSHVAR(CFLAGS, "$CFLAGS $flag") AC_TRY_COMPILE($2,[],[GASNET_C99_FLAG="$flag"]) GASNET_POPVAR(CFLAGS) ]) GASNET_POPVAR(CFLAGS) if test "$GASNET_C99_FLAG" != "unknown"; then break; fi done AC_MSG_CHECKING([for flags required for C99 subset compliance]) if test "$GASNET_C99_FLAG" = "unknown"; then AC_MSG_ERROR([Could not determine \$$1 flag to accept ISO C99 input. You may need to append flags in \$$1 to enable C99 support]) elif test "$GASNET_C99_FLAG" = ""; then AC_MSG_RESULT([none required]) else AC_MSG_RESULT([$GASNET_C99_FLAG]) MISC_CFLAGS="$MISC_CFLAGS $GASNET_C99_FLAG" fi ]) dnl GASNET_SET_MISCFLAGS dnl Test code for compliance to the C99 subset required to compile gasnet.h dnl The following should ONLY include C99 features we officially adopt in the GASNet/README coding standards AC_DEFUN([GASNET_C99_TEST], [ void foo(void) { int a = 1; // C99 comment for (int i=0; i < 100; i++) a += i; // Conditional expression declaration int i = a; // mid-block decl int x = (int)(0x1234567812345678LL + 0x8765432187654321ULL + i); // (U)LL-suffix 64-bit integer literals } ]) dnl The following is required for $CC (when compiling libgasnet) and optional for clients compiling gasnet.h AC_DEFUN([GASNET_VA_ARGS_TEST],[ #define GASNETI_AMNUMARGS(...) GASNETI_AMNUMARGS_(__VA_ARGS__,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0) #define GASNETI_AMNUMARGS_(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,N,...) N int b[[GASNETI_AMNUMARGS(1)+1]]; int c[[GASNETI_AMNUMARGS(1,2)+1]]; int d[[GASNETI_AMNUMARGS(1,2,3)+1]]; ]) DEVWARN_CFLAGS= GASNET_IF_ENABLED(debug, Build GASNet in a debugging mode, [ if test -z "$GASNET_SUPPRESS_DEBUG_WARNING" ; then GASNET_MSG_WARN([ ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING Configuring the system for global, forced debugging mode. This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------]) fi GASNET_OPT_CFLAGS="$CCDEBUGFLAGS" AC_DEFINE(GASNET_DEBUG) BUILDCONFIG="debug" enabled_debug=yes], [ GASNET_OPT_CFLAGS="$CCOPTFLAGS" DEVWARN_CFLAGS="$DEVWARN_CFLAGS $DEVWARN_CFLAGS_OPT" AC_DEFINE(GASNET_NDEBUG) BUILDCONFIG="optimize" enabled_debug=no]) AM_CONDITIONAL(BUILDCONFIG_DEBUG, test "$enabled_debug" = yes) GASNET_IF_ENABLED(valgrind, [Build a valgrind-friendly library, disabling some optimizations. Implies --disable-debug-malloc], [ if test -z "$GASNET_SUPPRESS_DEBUG_WARNING" ; then GASNET_MSG_WARN([Enabling valgrind-friendly codegen, disabling some optimizations.]) fi AC_DEFINE(GASNETI_VALGRIND) enable_debug_malloc=no # debug mallocator obfuscates heap activity and confuses valgrind if test x"$enable_pshm_xpmem" = xyes && test x"$enable_pshm" != xno; then # valgrind fundamentally incompatible with XPMEM, issuing errors on every access case "$target" in *-cnl-*) GASNET_MSG_WARN([Valgrind (--enable-valgrind) does not interoperate with XPMEM (--enable-pshm-xpmem). This appears to be a Cray, so converting to --enable-pshm-hugetlbfs instead]) enable_pshm_xpmem=no enable_pshm_hugetlbfs=yes ;; *) GASNET_MSG_ERROR([Valgrind (--enable-valgrind) does not interoperate with XPMEM (--enable-pshm-xpmem). Please select a different PSHM protocol (e.g. --disable-pshm-xpmem --enable-pshm-posix) or disable PSHM (--disable-pshm) ]) ;; esac fi enabled_valgrind=yes ], [ enabled_valgrind=no ]) AM_CONDITIONAL(VALGRIND, test "$enabled_valgrind" = yes) GASNET_IF_ENABLED_WITH_AUTO(dev-warnings, Build GASNet with developer compiler warnings for the library and tests (default: yes), enabled_dev_warnings=yes, enabled_dev_warnings=no, enabled_dev_warnings=yes) GASNET_SET_MISCFLAGS(CC,[ GASNET_VA_ARGS_TEST GASNET_C99_TEST ]) if test "$enabled_dev_warnings" = "no" ; then DEVWARN_CFLAGS= fi AC_SUBST(DEVWARN_CFLAGS) # Some C compilers disable OS POSIX entry points when strict c99 conformance is selected # _GNU_SOURCE implies _XOPEN_SOURCE and enables other features we probe for, like "adaptive" mutex_t and pthread_rwlock_t # Known to work on Linux, cygwin, and expected to be safe or at worst ignored on other OS's GASNET_EXTRA_DEFINES="-D_GNU_SOURCE=1" AC_SUBST(GASNET_EXTRA_DEFINES) # MISC_C(PP)FLAGS are added to C(PP)FLAGS here to ensure they are used for the remaining configure tests, # but they retain a separate identity post-configure CFLAGS="$GASNET_OPT_CFLAGS $MISC_CFLAGS" CPPFLAGS="$GASNET_EXTRA_DEFINES $MISC_CPPFLAGS" AC_SUBST(MISC_CFLAGS) # warning suppression and other misc C flags AC_SUBST(MISC_CPPFLAGS) # misc preprocessor flags AC_SUBST(GASNET_OPT_CFLAGS) # Final check to ensure everything works together -- in case some combination of flags broke something GASNET_TRY_CACHE_CHECK(for working GASNet-required ISO C99 subset, gasnet_c99_subset, [ GASNET_VA_ARGS_TEST GASNET_C99_TEST ], [], [], [ AC_MSG_ERROR(Unable to find sufficient C99 support features in $CC to build GASNet. You may need to append flags in \$CC to enable C99 support) ]) GASNET_IF_ENABLED(gasnet-verbose, Build GASNet lib with debugging status messages, [ enabled_debug_verbose=yes ], [ enabled_debug_verbose=no ]) if test "$enabled_debug_verbose" = yes; then AC_DEFINE(GASNET_DEBUG_VERBOSE) fi AM_CONDITIONAL(BUILDCONFIG_DEBUG_VERBOSE, test "$enabled_debug_verbose" = yes) dnl GASNET_TOOLSONLY_FALSE_BEGIN GASNET_IF_ENABLED_WITH_AUTO(trace, Build GASNet with tracing enabled (enabled by default with --enable-debug), enabled_trace=yes, enabled_trace=no, enabled_trace=$enabled_debug) if test "$enabled_trace" = yes; then AC_DEFINE(GASNET_TRACE) fi AM_CONDITIONAL(BUILDCONFIG_TRACE, test "$enabled_trace" = yes) GASNET_IF_ENABLED_WITH_AUTO(stats, Build GASNet with statistical collection enabled (enabled by default with --enable-debug), enabled_stats=yes, enabled_stats=no, enabled_stats=$enabled_debug) if test "$enabled_stats" = yes; then AC_DEFINE(GASNET_STATS) fi AM_CONDITIONAL(BUILDCONFIG_STATS, test "$enabled_stats" = yes) GASNET_IF_ENABLED(srclines, Build GASNet with srclines support (enabled by default with --enable-trace), [ enabled_srclines=yes ]) if test "$enabled_srclines" = yes; then AC_DEFINE(GASNET_SRCLINES) fi AM_CONDITIONAL(BUILDCONFIG_SRCLINES, test "$enabled_srclines" = yes) dnl GASNET_TOOLSONLY_FALSE_END GASNET_IF_ENABLED_WITH_AUTO(debug-malloc, Build GASNet with debugging malloc implementation enabled (enabled by default with --enable-debug), enabled_debug_malloc=yes, enabled_debug_malloc=no, enabled_debug_malloc=$enabled_debug) if test "$enabled_debug_malloc" = yes; then AC_DEFINE(GASNET_DEBUGMALLOC) fi AM_CONDITIONAL(BUILDCONFIG_DEBUGMALLOC, test "$enabled_debug_malloc" = yes) GASNET_CORRECT_OPTIMIZEDDEBUG(CC,CFLAGS,CC,[$CPPFLAGS],[]) case "$CC_FAMILY" in GNU) KEEPTMP_CFLAGS="-save-temps" ;; Clang) KEEPTMP_CFLAGS="-save-temps" ;; Pathscale) KEEPTMP_CFLAGS="-keep" ;; Open64) KEEPTMP_CFLAGS="-keep" ;; XLC) KEEPTMP_CFLAGS="-qlist" ;; # XXX: generates .lst w/ asm. Can't find a way to preserve .i PGI|NVHPC) KEEPTMP_CFLAGS="-Mkeepasm" ;; # XXX: only keeps .s. Can't find a way to preserve .i Intel) KEEPTMP_CFLAGS="-save-temps" ;; # XXX: only keeps .s. Can't find a way to preserve .i Sun) KEEPTMP_CFLAGS="-keeptmp" ;; Cray) KEEPTMP_CFLAGS="-hkeepfiles" ;; # XXX: only keeps .s. Can't find a way to preserve .i *) KEEPTMP_CFLAGS="" ;; esac AC_SUBST(KEEPTMP_CFLAGS) # flags to preserve intermediate file (,i, .s, etc.) # Global opt-in to (semi-)automatic RPATH support GASNET_IF_ENABLED(rpath, [Build GASNet libraries using RPATH for dependent libraries (disabled by default)], enabled_rpath=yes, enabled_rpath=no) warn_missing_rpath='' # Probe(s) of compiler/linker support for RPATH # # TODO: warning-sensitive linker probe prior to making this ON-by-default # The logic below current uses `AC_TRY_LINK()` to test for support for # linker flags. However, this is not capable of rejecting flags which # induce warnings rather than failure. The most straight-forward approach # to checking for warnings is susceptible to persistent warnings (such as # for impending license expiration). Therefore, before RPATH support can be # ON by default, this probe should use `GASNET_TRY_LDFLAG()`, which does not # *yet* exist, but would be analogous to `GASNET_TRY_CFLAG()`. # Example scenarios where this would improve our behavior: # + Compilers/linkers which don't recognize flags we attempt, but only warn. # This would fail the probe, possibly allowing a later flag to be chosen. # + Conflicts (such as hypothetically with `-static`) which generate # warnings that an otherwise supported behavior is unavailable. # This would probably fail *all* the probes, resulting in disabling a # "non-feature" that only generates warnings. # + Might check if multiple instances of the same directory generates a warning. # However, we don't have a good solution in mind if this is ever the case. # pushdef([cache_var],cv_prefix[]cc_rpath_option) AC_MSG_CHECKING([for rpath option to \$CC]) AC_CACHE_VAL(cache_var, [ cache_var='unknown' if test "$CC_FAMILY$CC_SUBFAMILY" = 'GNUNVIDIA'; then wl='-Xlinker ' else wl='-Wl,' fi for opt in "${wl}-rpath," "${wl}-rpath=" "${wl}-rpath ${wl}"; do GASNET_PUSHVAR(LDFLAGS,"$opt${TMPDIR:-/tmp}") AC_TRY_LINK([ #include ], [ puts("hello"); ], [ cache_var="$opt" ], ) GASNET_POPVAR(LDFLAGS) if test x"$cache_var" != xunknown; then break fi done unset wl ]) if test x"$cache_var" = 'xunknown'; then AC_MSG_RESULT(unknown) unset cc_rpath_option else AC_MSG_RESULT("${cache_var}DIR") # explicit (visible) quotes are intentional cc_rpath_option="$cache_var" fi popdef([cache_var]) dnl GASNET_TOOLSONLY_FALSE_BEGIN segconfig="" GASNET_IF_ENABLED(segment-fast, Build GASNet in the FAST shared segment configuration, segconfig="fast$segconfig", ) GASNET_IF_ENABLED(segment-large, Build GASNet in the LARGE shared segment configuration, segconfig="large$segconfig", ) GASNET_IF_ENABLED(segment-everything, Build GASNet in the EVERYTHING shared segment configuration, segconfig="everything$segconfig", ) case "$segconfig" in "") segconfig=fast; #for AM_CONDITIONAL, below AC_DEFINE(GASNET_SEGMENT_FAST) ;; # default is fast fast) AC_DEFINE(GASNET_SEGMENT_FAST) ;; large) AC_DEFINE(GASNET_SEGMENT_LARGE) ;; everything) AC_DEFINE(GASNET_SEGMENT_EVERYTHING) ;; *) AC_MSG_ERROR(Conflicting shared segment configurations specified) ;; esac # Do it all again because AM_CONDITIONAL()s can't go inside if or case. # Groan. AM_CONDITIONAL(GASNET_SEGMENT_FAST, test "$segconfig" = fast) AM_CONDITIONAL(GASNET_SEGMENT_LARGE, test "$segconfig" = large) AM_CONDITIONAL(GASNET_SEGMENT_EVERYTHING, test "$segconfig" = everything) dnl GASNET_TOOLSONLY_FALSE_END dnl GASNET_GET_PLATFORM_ID(CCVAR, opt compiler-desc) dnl probe a compiler for version information AC_DEFUN([GASNET_GET_PLATFORM_COMPILER], [ GASNET_TRY_CACHE_EXTRACT_$4($2 for PLATFORM_COMPILER_$3, PLATFORM_$1_$3, [ #include "gasnet_portable_platform.h" ], [ PLATFORM_COMPILER_$3 ], GASNETI_PLATFORM_$1_$3) AC_DEFINE_UNQUOTED(GASNETI_PLATFORM_$1_$3, ifelse([$4],[STR],["$GASNETI_PLATFORM_$1_$3"],[$GASNETI_PLATFORM_$1_$3])) ]) AC_DEFUN([GASNET_GET_PLATFORM_ID], [ GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") GASNET_GET_PLATFORM_COMPILER([$1],[$2],[IDSTR],[STR]) GASNET_GET_PLATFORM_COMPILER([$1],[$2],[FAMILYID],[EXPR]) GASNET_GET_PLATFORM_COMPILER([$1],[$2],[ID],[EXPR]) GASNET_GET_PLATFORM_COMPILER([$1],[$2],[VERSION],[EXPR]) GASNET_GET_PLATFORM_COMPILER([$1],[$2],GASNETI_C_OR_CXX([$1])[_LANGLVL],[EXPR]) GASNET_POPVAR(CPPFLAGS) ]) dnl Try to discover the C compiler's inline modifier dnl GASNET_INLINE_MODIFIER(compiler-display-name, compiler-type) dnl Where compiler-type is CC|MPI_CC AC_DEFUN([GASNET_TRY_INLINE],[ dnl INTERNAL USE BY GASNET_INLINE_MODIFIER ONLY if test -z "$inlinemod"; then GASNET_TRY_CACHE_CHECK([$1 for $3 modifier], $2[]mod$3, [$3 int dummy(void) { return 1; }], [], [inlinemod="$3"]) fi ]) AC_DEFUN([GASNET_INLINE_MODIFIER],[ pushdef([lowername],translit($2,'A-Z','a-z')) pushdef([uppername],translit($2,'a-z','A-Z')) inlinemod="" case "$[]uppername[]_FAMILY" in XLC) # force __inline on XLC, to avoid warnings inlinemod=__inline ;; esac GASNET_TRY_INLINE($1,lowername,[inline]) GASNET_TRY_INLINE($1,lowername,[__inline__]) GASNET_TRY_INLINE($1,lowername,[__inline]) GASNET_TRY_INLINE($1,lowername,[_inline]) GASNET_TRY_INLINE($1,lowername,[_Inline]) if test -n "$inlinemod"; then GASNET_TRY_CACHE_CHECK($1 for working 'static $inlinemod', lowername[_static_inline], [static $inlinemod int dummy() { return 1; }], [], [inlinemod="static $inlinemod"]) fi AC_DEFINE_UNQUOTED(GASNETI_[]uppername[]_INLINE_MODIFIER, $inlinemod) popdef([uppername]) popdef([lowername]) ]) dnl Check GCC-style inline asm support dnl GASNET_CHECK_GCC_ASM(compiler-display-name, compiler-type) dnl Where compiler-type is CC|CXX|MPI_CC AC_DEFUN([GASNET_CHECK_GCC_ASM],[ GASNET_FUN_BEGIN([$0($1,$2)]) pushdef([lowername],translit($2,'A-Z','a-z')) pushdef([uppername],translit($2,'a-z','A-Z')) case "$target_cpu" in # TODO: expand as this becomes reachable on other CPUs rs6000|powerpc*) gcc_asm_string='"sync"';; *) AC_MSG_ERROR([Internal error - GASNET_CHECK[]_GCC_ASM called for unknown architecture]) ;; esac GASNET_TRY_CACHE_LINK([$1 for GCC inline asm support], lowername[]_gcc_asm, [], [ __asm__ __volatile__ ($gcc_asm_string); ], [ AC_DEFINE(GASNETI_HAVE_[]uppername[]_GCC_ASM) ]) popdef([uppername]) popdef([lowername]) ]) dnl Check for compilers with varying support for inline asm and atomics dnl GASNET_CHECK_ASM_SUPPORT(compiler-display-name, compiler-type) dnl Where compiler-type is CC|CXX|MPI_CC dnl dnl NOTE TO IMPLEMENTERS: dnl Changes made here that enable ASM support on additional platforms, dnl which do not require any compile/link/run test, should also be dnl applied in gasnet_asm.h. dnl AC_DEFUN([GASNET_CHECK_ASM_SUPPORT],[ GASNET_FUN_BEGIN([$0($1,$2)]) pushdef([lowername],translit($2,'A-Z','a-z')) pushdef([uppername],translit($2,'a-z','A-Z')) pushdef([flagsvar],ifelse(index([$2],[CXX]),[-1],[C],[CXX])[]FLAGS) GASNET_PUSHVAR(flagsvar,"$flagsvar -I$TOP_SRCDIR/other") case "$[]uppername[]_FAMILY" in Sun) GASNET_TRY_CACHE_LINK([$1 for simple inline asm() support], lowername[]_simple_asm, [], [ asm("nop"); ], [ AC_DEFINE(GASNETI_HAVE_[]uppername[]_SIMPLE_ASM) ]) # We lack a reliable configure probe to diagnose broken GCC inline asm support on Sun C # We only know 5.12 and newer on x86/x86-64 are reliable (see bug 2941) GASNET_TRY_CACHE_LINK([$1 for GCC inline asm support], lowername[]_gcc_asm, [ #include "gasnet_portable_platform.h" ],[ #if (PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64) && PLATFORM_COMPILER_VERSION_GE(5,12,0) __asm__ __volatile__ ("lock; addl \$[]0,0(%%esp)" : : : "memory", "cc"); #else #error Support has not been verified #endif ],[ AC_DEFINE(GASNETI_HAVE_[]uppername[]_GCC_ASM) ]) ;; XLC) GASNET_CHECK_GCC_ASM($1, $2) ;; GNU|Intel|Pathscale|Open64|Clang|NVHPC|PGI|TINY) # Currently believe all of these support GCC-style inline ASM on all CPUs # where we use it. If that is ever *not* the case then one should split # off the case for the relevant compiler and apply banlists or probes. # NOTE: be sure to keep gasnet_asm.h in-sync with any changes made here. AC_DEFINE(GASNETI_HAVE_[]uppername[]_GCC_ASM) ;; esac dnl TODO: factor this and loop over "32" and "64" ? GASNET_TRY_CACHE_LINK([$1 for 32-bit __sync atomics support], lowername[]_sync_atomics_32, [ #include "portable_inttypes.h" ],[ struct { volatile uint32_t ctr; } x = { 2 }; uint32_t op = 1; uint32_t oval = 2; uint32_t nval = 3; volatile uint32_t result; result = __sync_bool_compare_and_swap(&(x.ctr), oval, nval) + __sync_val_compare_and_swap(&(x.ctr), nval, oval) + __sync_fetch_and_add(&(x.ctr), op); ],[ AC_DEFINE(GASNETI_HAVE_[]uppername[]_SYNC_ATOMICS_32) ]) GASNET_TRY_CACHE_LINK([$1 for 64-bit __sync atomics support], lowername[]_sync_atomics_64, [ #include "portable_inttypes.h" ],[ struct { volatile uint64_t ctr; } x = { 2 }; uint64_t op = 1; uint64_t oval = 2; uint64_t nval = 3; volatile uint64_t result; result = __sync_bool_compare_and_swap(&(x.ctr), oval, nval) + __sync_val_compare_and_swap(&(x.ctr), nval, oval) + __sync_fetch_and_add(&(x.ctr), op); ],[ AC_DEFINE(GASNETI_HAVE_[]uppername[]_SYNC_ATOMICS_64) ]) GASNET_POPVAR(flagsvar) popdef([flagsvar]) popdef([uppername]) popdef([lowername]) GASNET_FUN_END([$0]) ]) GASNET_LIBGCC GASNET_CHECK_RESTRICT([GASNETI_CC]) GASNET_CHECK_ASM_SUPPORT([C compiler],[CC]) GASNET_INLINE_MODIFIER([C compiler],[CC]) GASNET_GET_GNU_ATTRIBUTES([GASNETI_HAVE_CC]) GASNET_CHECK_BUILTINS([GASNETI_HAVE_CC]) GASNET_GET_PLATFORM_ID([COMPILER]) GASNET_IFDEF([__PIC__],[AC_DEFINE(GASNETI_CONFIGURED_PIC)]) dnl Check for the historically behavior with respect to tentative dnl definitions, and seek means to restore this behavior when it dnl is lacking. dnl dnl This is only probing CC, this is only applicable to GASNet dnl library builds, not clients. dnl CHECK_TENTATIVE_BASE=gasnet_conftest_tent CHECK_TENTATIVE_SRC=$CHECK_TENTATIVE_BASE.c CHECK_TENTATIVE_OBJ=$CHECK_TENTATIVE_BASE.o dnl helper: GASNET_CHECK_TENTATIVE_TRY_RUN(msg,cv_var,extra,on_success) AC_DEFUN([GASNET_CHECK_TENTATIVE_TRY_RUN],[ GASNET_PUSHVAR(LIBS,"$CHECK_TENTATIVE_OBJ $LIBS") GASNET_TRY_CACHE_RUN_WITHCC($1, $2, [ $3 int tentative; extern void increment(void); ], [ tentative = 1; increment(); return (tentative != 2); ],[ $4 ]) GASNET_POPVAR(LIBS) ]) AC_MSG_CHECKING([building tentative definition helper object]) cat >$CHECK_TENTATIVE_SRC <<_GASNET_EOF int tentative; void increment(void) { tentative += 1; } _GASNET_EOF compile="$CC $CFLAGS $CPPFLAGS -c $CHECK_TENTATIVE_SRC -o $CHECK_TENTATIVE_OBJ" eval echo "$compile" >&5 if eval $compile 2>&5 && test -s $CHECK_TENTATIVE_OBJ ; then AC_MSG_RESULT(ok) else GASNET_MSG_ERROR(failed while building tentative definition helper object) fi unset GASNETI_COMMON GASNET_CHECK_TENTATIVE_TRY_RUN( [for tentative definition support], have_tentative_normal, [], [GASNETI_COMMON='']) if test "${GASNETI_COMMON+set}" != set; then GASNET_CHECK_TENTATIVE_TRY_RUN( [for tentative definition support via "common" attribute], have_tentative_common_attribute, [__attribute__((__common__))], [GASNETI_COMMON='__attribute__((__common__))']) fi rm -f $CHECK_TENTATIVE_OBJ if test "${GASNETI_COMMON+set}" = set; then AC_DEFINE_UNQUOTED(GASNETI_COMMON,$GASNETI_COMMON) else AC_MSG_ERROR(could not determine how to use tentative definitions) fi rm -f $CHECK_TENTATIVE_SRC $CHECK_TENTATIVE_OBJ ######################################################################## # hunt for 16-, 32-, and 64-bit integer types GASNET_SETUP_INTTYPES() ######################################################################## # get sizes of additional types for the "anytype" unions GASNET_CHECK_SIZEOF(float) GASNET_CHECK_SIZEOF(double) dnl Grumble! Can't use AC_CHECK_TYPE or AC_CHECK_TYPES in autoconf 2.13 dnl Additionally, this duplicates a check in recent AC_SIZEOF() just dnl for the sake of avoiding the error abort in GASNET_CHECK_SIZEOF. AC_DEFUN([GASNET_CHECK_SIZEOF_OPTIONAL], [ pushdef([uppername],translit($1,'a-z ','A-Z_')) pushdef([lowername],translit($1,'A-Z ','a-z_')) GASNET_TRY_CACHE_CHECK([for type $1],[type_]lowername,[], [ if (($1 *) 0) return 0; if (sizeof ($1)) return 0; ], [GASNET_CHECK_SIZEOF($1)], [dnl see GASNET_CHECK_SIZEOF for a desciption of this little gem: ac_cv_SIZEOF_[]uppername[]_indirect=SIZEOF_[]uppername AC_DEFINE_UNQUOTED($ac_cv_SIZEOF_[]uppername[]_indirect,0) ]) popdef([lowername]) popdef([uppername]) ]) GASNET_CHECK_SIZEOF_OPTIONAL(_Bool) GASNET_CHECK_SIZEOF_OPTIONAL(long double) GASNET_CHECK_SIZEOF_OPTIONAL(float _Complex) dnl NOT YET - GASNET_CHECK_SIZEOF_OPTIONAL(double _Complex) dnl NOT YET - GASNET_CHECK_SIZEOF_OPTIONAL(long double _Complex) ######################################################################## ## ## Page size ## GASNET_CROSS_VAR(GASNETI_PAGESIZE,PAGESIZE) if test "$GASNETI_PAGESIZE" = ""; then GASNET_TRY_CACHE_RUN_EXPR(PAGESIZE, PAGESIZE, [ #include ], [ val = PAGESIZE; if (val<=0) exit(1); ], GASNETI_PAGESIZE) fi if test "$GASNETI_PAGESIZE" = ""; then GASNET_TRY_CACHE_RUN_EXPR(PAGE_SIZE, PAGE_SIZE, [ #include ], [ val = PAGE_SIZE; if (val<=0) exit(1); ], GASNETI_PAGESIZE) fi if test "$GASNETI_PAGESIZE" = ""; then GASNET_TRY_CACHE_RUN_EXPR([sysconf(_SC_PAGESIZE)], _SC_PAGESIZE, [ #include ], [ val = sysconf(_SC_PAGESIZE); if (val<=0) exit(1); ], GASNETI_PAGESIZE) fi if test "$GASNETI_PAGESIZE" = ""; then GASNET_TRY_CACHE_RUN_EXPR([sysconf(_SC_PAGE_SIZE)], _SC_PAGE_SIZE, [ #include ], [ val = sysconf(_SC_PAGE_SIZE); if (val<=0) exit(1); ], GASNETI_PAGESIZE) fi if test "$GASNETI_PAGESIZE" = ""; then GASNET_TRY_CACHE_RUN_EXPR([getpagesize()], getpagesize, [ #include ], [ val = getpagesize(); if (val<=0) exit(1); ], GASNETI_PAGESIZE) fi if test "$GASNETI_PAGESIZE" != ""; then AC_DEFINE_UNQUOTED(GASNETI_PAGESIZE,$GASNETI_PAGESIZE) case "$GASNETI_PAGESIZE" in 1024) GASNETI_PAGESHIFT=10 ;; 2048) GASNETI_PAGESHIFT=11 ;; 4096) GASNETI_PAGESHIFT=12 ;; 8192) GASNETI_PAGESHIFT=13 ;; 16384) GASNETI_PAGESHIFT=14 ;; 32768) GASNETI_PAGESHIFT=15 ;; 65536) GASNETI_PAGESHIFT=16 ;; 131072) GASNETI_PAGESHIFT=17 ;; 262144) GASNETI_PAGESHIFT=18 ;; 524288) GASNETI_PAGESHIFT=19 ;; 1048576) GASNETI_PAGESHIFT=20 ;; 2097152) GASNETI_PAGESHIFT=21 ;; 4194304) GASNETI_PAGESHIFT=22 ;; 8388608) GASNETI_PAGESHIFT=23 ;; 16777216) GASNETI_PAGESHIFT=24 ;; *) AC_MSG_ERROR(unknown GASNETI_PAGESIZE=$GASNETI_PAGESIZE) ;; esac AC_DEFINE_UNQUOTED(GASNETI_PAGESHIFT,$GASNETI_PAGESHIFT) fi # -lm should only live in LIBM, and only if we have it (not in LIBS) GASNET_LIBM() #--------------------------------------------------------------------------------------------------------------- # Machine defs GASNET_PLATFORM=generic GASNET_THREAD_DEFINES="" GASNET_THREAD_LIBS="" case "$target_os" in solaris*) GASNET_THREAD_DEFINES="-D_REENTRANT" # on some systems static linking fails with -lpthread, # but need it or pthread_create will fail at runtime GASNET_THREAD_LIBS="-lpthread" ;; linux*) if test "x$enable_force_arch" = xgeneric; then : # no action elif test "x$enable_force_arch" = xibmpe || # Check for IBM PE by presence of POE ( env PAGER=cat poe -h | grep 'Parallel Operating Environment' ) >/dev/null 2>&1; then GASNETI_ARCH_IBMPE=1 GASNET_PLATFORM=ibmpe AC_DEFINE(GASNETI_ARCH_IBMPE) elif test "x$enable_force_arch" = xwsl || # Check for Microsoft Windows Subsystem for Linux (WSL) ( test -f /proc/sys/kernel/osrelease && grep 'Microsoft' /proc/sys/kernel/osrelease ) >/dev/null 2>&1; then GASNETI_ARCH_WSL=1 GASNET_PLATFORM=wsl AC_DEFINE(GASNETI_ARCH_WSL) elif test "x$enable_force_arch" = xcrayex || # Check for HPE Cray EX (aka Shasta) using kernel version or CRAYPE_NETWORK_TARGET ( uname -r | grep cray_shasta ) >/dev/null 2>&1 || test "x$CRAYPE_NETWORK_TARGET" = xofi -o "x$CRAYPE_NETWORK_TARGET" = xucx ; then GASNETI_ARCH_CRAYEX=1 GASNET_PLATFORM=crayex AC_DEFINE(GASNETI_ARCH_CRAYEX) # some defaults: if test "${enable_ofi-unset}" = unset; then enable_ofi=$enabled_auto_detect _conduit_reason_ofi=$_conduit_auto_reason fi if test "${enable_ibv-unset}" = unset; then enable_ibv=no; fi if test "${enable_udp-unset}" = unset; then enable_udp=no; fi if test "${with_ofi_spawner-unset}" = unset; then with_ofi_spawner=pmi; fi if test "${with_ucx_spawner-unset}" = unset; then with_ucx_spawner=pmi; fi fi AC_MSG_CHECKING(for Linux flavor) AC_MSG_RESULT($GASNET_PLATFORM${enable_force_arch:+ (forced)}) GASNET_THREAD_DEFINES="-D_REENTRANT" GASNET_THREAD_LIBS="-lpthread" ;; freebsd*) # bug 1781: FreeBSD requires version-dependent magic to get a working pthread library OS_RELDATE="`/sbin/sysctl -n kern.osreldate 2>/dev/null`" if test "$OS_RELDATE" -lt "500016"; then GASNET_THREAD_DEFINES="-D_THREAD_SAFE" GASNET_THREAD_LIBS="-pthread" elif test "$OS_RELDATE" -lt "502102"; then GASNET_THREAD_DEFINES="-D_THREAD_SAFE" GASNET_THREAD_LIBS="-lc_r" else GASNET_THREAD_DEFINES="-D_THREAD_SAFE" # optional? GASNET_THREAD_LIBS="-pthread" fi ;; netbsd*) # The -pthread argument is effectively part of the standard compiler interface on *BSD # It's a frontend macro argument that expands to appropriate compiler-independent -D and -l # options in the right context, so we allow it to live in GASNET_DEFINES and GASNET_LIBS GASNET_THREAD_DEFINES="-pthread -D_REENTRANT" # _REENTRANT probably redundant GASNET_THREAD_LIBS="-pthread" # bug 1205: do not explicitly select threading lib ;; openbsd*) # Probe because at some point clang didn't accept -pthread as it does on the other BSDs # Otherwise same as netbsd, above, including the comments. GASNET_TRY_CFLAG([-pthread], [GASNET_THREAD_DEFINES="-pthread -D_REENTRANT" GASNET_THREAD_LIBS="-pthread"], [GASNET_THREAD_DEFINES="-D_POSIX_THREADS -D_REENTRANT" GASNET_THREAD_LIBS="-lpthread"]) ;; cygwin*) GASNET_THREAD_DEFINES="-D_REENTRANT" GASNET_THREAD_LIBS="" GASNET_TRY_CACHE_CHECK( [for Cygwin version 2.0 or newer],cygwin2, [#include ],[ #if CYGWIN_VERSION_DLL_MAJOR < 2000 #error #endif ],[have_cygwin2='yes'],[have_cygwin2='no']) ;; darwin*) GASNET_THREAD_DEFINES="-D_REENTRANT" GASNET_THREAD_LIBS="" ;; *) GASNET_MSG_WARN(unknown OS - you may need to update the configure script) ;; esac AC_SUBST(GASNET_THREAD_DEFINES) AC_SUBST(GASNET_THREAD_LIBS) AC_SUBST(GASNET_PLATFORM) # Find the appropriate OS suffix for executables if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then EXESUFFIX=$ac_cv_exeext else case "$target_os" in cygwin*) EXESUFFIX='.exe' ;; *) EXESUFFIX='' ;; esac fi AC_SUBST(EXESUFFIX) AM_CONDITIONAL(HAVE_EXESUFFIX, test -n "$EXESUFFIX") ######################################################################## ## ## Utilities for locating external packages ## dnl GASNET_PACKAGE_HOME(PREFIX, DESC, PROG, DIRS, FILE) dnl sets [PREFIX]_HOME to the first found in the following dnl User-provided [PREFIX]_HOME dnl The grandparent of "PROG", if non-emppty dnl Example: /usr/local/bin/PROG -> /usr/local) dnl If the located PROG is a symlink, it may be followed dnl The first directory in [DIRS /usr] to contain FILE dnl The first directory in [DIRS /usr] to be readable dnl Last resort: /usr dnl FILE is used to help validate the [PREFIX]_HOME AC_DEFUN([GASNET_PACKAGE_HOME],[ GASNET_FUN_BEGIN([$0($1,$2,$3,$4,$5)]) pushdef([the_var],$1[]_HOME) pushdef([the_prog],$1[]_guess_prog) pushdef([the_guess],$1[]_guess) the_guess= ifelse(len([$3]),[0],[],[ AC_PATH_PROGS(the_prog, $3) if test -n "$the_prog"; then the_guess=`dirname \`dirname $the_prog\`` fi ]) if test -z "$the_guess" ; then dnl Look for first dir w/ the marker FILE, and then just first dir that exists for the_guess[]_file in "$5" "."; do for the_guess in $4 /usr; do if test -r "$the_guess/$the_guess[]_file" ; then break 2 fi done done unset the_guess[]_file fi GASNET_ENV_DEFAULT(the_var, $the_guess, [Install prefix of $2]ifelse(len([$3]),[0],[],[ (auto-detected from PATH)])) AC_MSG_CHECKING(if $the_var is the $2 install prefix) the_var[]_good=no if test -r "$the_var/$5"; then the_var[]_good=yes AC_MSG_RESULT([yes]) fi ifelse(len([$3]),[0],[],[ if test $the_var[]_good = no && test -n "$the_prog"; then GASNET_FOLLOWLINKS(the_prog) the_var[]_tmp=`dirname \`dirname $the_prog\`` if test -r "$the_var[]_tmp/$5"; then the_var[]_good=yes the_var="$the_var[]_tmp" AC_MSG_RESULT([no - followed symlink to $the_var]) fi unset the_var[]_tmp fi ]) if test $the_var[]_good = no; then AC_MSG_RESULT([probably not - missing $5]) fi unset the_var[]_good unset the_guess popdef([the_guess]) popdef([the_prog]) popdef([the_var]) GASNET_FUN_END([$0]) ]) dnl GASNET_PACKAGE_CFLAGS(PREFIX, [extra flags], [noenv]) dnl Construct [PREFIX]_CFLAGS to contain "-I$[PREFIX]_HOME/include" plus [extra flags] dnl Special cases $[PREFIX]_HOME = "/usr" or "/" to omit the "-I..." dnl If the optional [noenv] argument is non-empty then GASNET_ENV_DEFAULT in NOT used AC_DEFUN([GASNET_PACKAGE_CFLAGS],[ GASNET_FUN_BEGIN([$0($@)]) pushdef([the_home],$1[]_HOME) pushdef([the_var],$1[]_CFLAGS) pushdef([the_guess],$1[]_cflags_guess) pushdef([extra_flags],ifelse(len([$2]),[0],[],[ $2])) dnl prepends space only if non-empty dnl TODO - strengthen this if we can determine compiler's default search path: case "$the_home" in /usr|/) the_guess='$2';; *) if test -d "$the_home/include/."; then the_guess="-I$the_home/include[]extra_flags" else the_guess='$2' fi;; esac ifelse(len([$3]),[0],[GASNET_ENV_DEFAULT(the_var, $the_guess)],[the_var=$the_guess]) unset the_guess popdef([extra_flags]) popdef([the_guess]) popdef([the_var]) popdef([the_home]) GASNET_FUN_END([$0]) ]) dnl GASNET_PACKAGE_LDFLAGS(PREFIX, libnames, [extra flags], [noenv]) dnl Construct [PREFIX]_LDFLAGS to contain the proper "-L$[PREFIX]_HOME/lib{,32,64}" plus [extra flags] dnl Optionally includes an RPATH option, based on --enable-rpath and --(en|dis)able-[PREFIX]-rpath. dnl Special cases $[PREFIX]_HOME = "/usr" or "/" to omit the "-L..." and rpath dnl The libnames arg is like AC_CHECK_LIB: just "foo" and "bar", not libfoo.a or libbar.so dnl If the optional [noenv] argument is non-empty then GASNET_ENV_DEFAULT in NOT used AC_DEFUN([GASNET_PACKAGE_LDFLAGS],[ GASNET_FUN_BEGIN([$0($@)]) pushdef([the_home],$1[]_HOME) pushdef([the_var],$1[]_LDFLAGS) pushdef([the_guess],$1[]_ldflags_guess) pushdef([extra_flags],ifelse(len([$3]),[0],[],[ $3])) dnl prepends space only if non-empty pushdef([rpath_opt],translit($1,'A-Z_','a-z-')-rpath) pushdef([rpath_var],enabled_[]translit($1,'A-Z-','a-z_')_rpath) dnl TODO - strengthen this if we can determine linker's default search path: case "$the_home" in /usr|/) the_guess='$3';; *) for the_guess[]_dir in "$the_home/lib${GASNETI_PTR_BITS}" "$the_home/lib" ''; do test -z "$the_guess[]_dir[]" && break for the_guess[]_lib in $2; do for the_guess[]_suff in a so sl dylib la dll; do if test -r "$the_guess[]_dir/lib$the_guess[]_lib.$the_guess[]_suff"; then break 3; fi done done done if test -n "$the_guess[]_dir[]"; then the_guess="-L$the_guess[]_dir[]" pushdef([GASNET_SUPPRESSHELP],1) # deferred to appear after help for [PREFIX]_LDFLAGS GASNET_IF_ENABLED_WITH_AUTO(rpath_opt, [N/A], [rpath_var="$the_guess[]_dir"], [rpath_var=''], [if test -z "$rpath_var"; then if test "x$enabled_rpath" = xyes; then rpath_var="$the_guess[]_dir" else rpath_var='' fi fi]) popdef([GASNET_SUPPRESSHELP]) if test -n "$rpath_var"; then if test "${cc_rpath_option:+set}" = set; then the_guess="$the_guess $cc_rpath_option$rpath_var" else warn_missing_rpath="$warn_missing_rpath translit($1,'A-Z-','a-z_')" fi fi the_guess="${the_guess}extra_flags" else the_guess='$3' fi ;; esac dnl show_rpath_help captures whether with_expanded_[PKG]_LDFLAGS is defined dnl prior to us (optionally) calling GASNET_ENV_DEFAULT, which *will* set it. dnl This allows us to display the help for --enable-[pkg]-rpath immediately dnl following the help (if any) for [PKG]_LDFLAGS, while ensuring that dnl with_expanded_[PKG]_LDFLAGS will suppress both. pushdef([show_rpath_help],ifdef(with_expanded_[]the_var,no,yes)) ifelse(len([$4]),[0],[GASNET_ENV_DEFAULT(the_var, $the_guess)],[the_var=$the_guess]) ifelse(show_rpath_help,[yes],[ AC_ARG_ENABLE(rpath_opt,GASNET_OPTION_HELP((en|dis)able-rpath_opt, [Use RPATH in default the_var if appropriate (enabled by default with --enable-rpath)]))]) popdef([show_rpath_help]) unset the_guess unset the_guess[]_dir unset the_guess[]_lib unset the_guess[]_suff popdef([rpath_var]) popdef([rpath_opt]) popdef([extra_flags]) popdef([the_guess]) popdef([the_var]) popdef([the_home]) GASNET_FUN_END([$0]) ]) ######################################################################## ## ## GASNET_CRAY_FIX_LINK_OPTS(lib [, envvar]) ## ## Modify CRAY_[LIB]_POST_LINK_OPTS envvars to reference the 'default' ## rather than the versioned directory normally set by environment modules ## lib: short name ('foo', not 'libfoo') ## envvar: defaults to CRAY_[upcase(lib)]_POST_LINK_OPTS ## AC_DEFUN([GASNET_CRAY_FIX_LINK_OPTS],[ GASNET_FUN_BEGIN([$0($@)]) pushdef([varname],ifelse(len([$2]),[0],[CRAY_[]translit($1,'a-z','A-Z')[]_POST_LINK_OPTS],[$2])) if test -n x"$varname"; then cplo_tmp=`$PERL -e "\\\$_='$varname'; s,/$1/[[^/]]*/lib,/$1/default/lib,g; print;"` cplo_dir=`$PERL -e "\\\$_='$cplo_tmp'; m,-L([[^ ]]*/$1/[[^ ]]*),; print \\\$[]1;"` if test -d "$cplo_dir/."; then varname="$cplo_tmp" else GASNET_MSG_WARN([Directory $cplo_dir missing - disabling rewrite of varname]) fi fi popdef([varname]) GASNET_FUN_END([$0]) ]) # Fix the POST_LINK_OPTS for libs used with Cray Programming Environments GASNET_IF_DISABLED_NOHELP(cray-post-link-rewrite,[],[ GASNET_CRAY_FIX_LINK_OPTS([pmi]) GASNET_CRAY_FIX_LINK_OPTS([xpmem]) ]) ######################################################################## ## ## Multithreading Libraries ## ## POSIX threads # have_pthread=no if test "$use_pthreads" != "no"; then GASNET_PUSHVAR(CFLAGS,"$CFLAGS $GASNET_THREAD_DEFINES") GASNET_PUSHVAR(LIBS,"$LIBS $GASNET_THREAD_LIBS") GASNET_TRY_CACHE_LINK([for working pthreads support], pthreads_works, [ #include ], [ pthread_create(0,0,0,0); ], [have_pthread=yes]) GASNET_POPVAR(CFLAGS) GASNET_POPVAR(LIBS) else pthread_reason="was disabled" fi if test "$use_pthreads$have_pthread" = "yesno" ; then AC_MSG_ERROR([--enable-pthreads passed but no working pthreads support found]) fi if test "$use_pthreads$have_pthread" = "tryno" ; then GASNET_MSG_WARN([No working pthreads support found - disabling pthreads support]) pthread_reason="appear to be missing or broken" fi GASNET_IF_ENABLED_WITH_AUTO(seq, [support SEQ-mode single-threaded GASNet clients], [build_seq_libs="yes"], [build_seq_libs="no"], [build_seq_libs="yes"]) GASNET_IF_ENABLED_WITH_AUTO(par, [support PAR-mode pthreaded GASNet clients], [build_par_libs="yes"], [build_par_libs="no"], [build_par_libs="$have_pthread"]) build_parsync_libs="no" dnl GASNET_TOOLSONLY_FALSE_BEGIN GASNET_IF_ENABLED_WITH_AUTO(parsync, [support PARSYNC-mode pthreaded GASNet clients], [build_parsync_libs="yes"], [build_parsync_libs="no"], [build_parsync_libs="$have_pthread"]) dnl GASNET_TOOLSONLY_FALSE_END if test "$build_par_libs$have_pthread" = "yesno" ; then AC_MSG_ERROR([--enable-par passed but no working pthreads support found]) fi if test "$build_parsync_libs$have_pthread" = "yesno" ; then AC_MSG_ERROR([--enable-parsync passed but no working pthreads support found]) fi if test "$build_seq_libs$build_par_libs$build_parsync_libs" = "nonono" ; then AC_MSG_ERROR([all libraries disabled by configure options!]) fi AM_CONDITIONAL(BUILD_SEQ_LIBS, test "$build_seq_libs" = "yes") AM_CONDITIONAL(BUILD_PAR_LIBS, test "$build_par_libs" = "yes") AM_CONDITIONAL(BUILD_PARSYNC_LIBS, test "$build_parsync_libs" = "yes") GASNET_WITH(max-pthreads-per-node, [Set max pthreads supported per GASNet node], [AC_DEFINE_UNQUOTED(GASNETI_MAX_THREADS_CONFIGURE, $withval)] ) if test "$have_pthread" = no ; then GASNET_THREAD_DEFINES="" GASNET_THREAD_LIBS="" else GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS $GASNET_THREAD_DEFINES -I$TOP_SRCDIR/other") GASNET_PUSHVAR(LIBS,"$GASNET_THREAD_LIBS") # define HAVE_PTHREAD_H AC_CHECK_HEADERS(pthread.h) # libraries that may be required for some POSIX thread features opt_pthread_libs="pthread pthreads c_r" # look for optional pthreads entry points and features AC_SEARCH_LIBS(pthread_setconcurrency, $opt_pthread_libs, AC_DEFINE(HAVE_PTHREAD_SETCONCURRENCY)) AC_SEARCH_LIBS(pthread_kill, $opt_pthread_libs, AC_DEFINE(HAVE_PTHREAD_KILL)) AC_SEARCH_LIBS(pthread_kill_other_threads_np, $opt_pthread_libs, AC_DEFINE(HAVE_PTHREAD_KILL_OTHER_THREADS_NP)) AC_SEARCH_LIBS(pthread_sigmask, $opt_pthread_libs, AC_DEFINE(HAVE_PTHREAD_SIGMASK)) GASNET_IF_ENABLED_WITH_AUTO(rwlock, Enable/disable use of pthread_rwlock_t (auto-detected), enabled_rwlock=yes, enabled_rwlock=no, enabled_rwlock=probe) if test "$enabled_rwlock" != "no" ; then have_rwlock="yes" AC_SEARCH_LIBS(pthread_rwlock_tryrdlock, $opt_pthread_libs, [], have_rwlock=no) AC_SEARCH_LIBS(pthread_rwlock_wrlock, $opt_pthread_libs, [], have_rwlock=no) if test "$have_rwlock" = "yes" ; then AC_DEFINE(GASNETI_HAVE_PTHREAD_RWLOCK) fi if test "$enabled_rwlock$have_rwlock" = "yesno"; then GASNET_MSG_ERROR([--enable-rwlock passed but no working pthread_rwlock_t support found]) fi fi GASNET_IF_ENABLED_WITH_AUTO(tls, Enable/disable use of thread-local storage extensions (ie __thread) (auto-detected), enabled_tls=yes, enabled_tls=no, enabled_tls=probe) if test "$enabled_tls" != "no" ; then GASNET_CHECK_TLS_SUPPORT([ AC_DEFINE(GASNETI_HAVE_TLS_SUPPORT, 1) have_tls=yes ],[ have_tls=no ]) fi if test "$enabled_tls$have_tls" = "yesno"; then GASNET_MSG_ERROR([--enable-tls passed but no working tls support found]) fi GASNET_IF_ENABLED_WITH_AUTO(threadinfo-opt, [Enable/disable threadinfo passing optimization (default is system dependent)], [AC_DEFINE_UNQUOTED(GASNETI_THREADINFO_OPT_CONFIGURE, 1)], [AC_DEFINE_UNQUOTED(GASNETI_THREADINFO_OPT_CONFIGURE, 0)]) case "$target_os" in freebsd*) ;; # bug 1205: intentionally avoid -lpthread on BSD, where it causes problems netbsd*) ;; openbsd*) ;; *) GASNET_THREAD_LIBS="$LIBS" ;; esac GASNET_POPVAR(CPPFLAGS) GASNET_POPVAR(LIBS) fi # Determine the cache line size we should use for padding to avoid false sharing cache traffic AC_MSG_CHECKING(for shared data cache line size) # initial guess based on architecture case "$target_cpu" in # when chip revs differ, we should err on the larger size i*86) cache_line_guess=64 ;; x86_64) cache_line_guess=64 ;; arm*) cache_line_guess=64 ;; aarch64) cache_line_guess=64 ;; rs6000) cache_line_guess=32 ;; # https://www.csee.umbc.edu/portal/help/architecture/rs6000_arch.ps powerpc*) cache_line_guess=128 ;; # https://www.7-cpu.com/cpu/Power8.html sparc) cache_line_guess=128 ;; # https://en.wikipedia.org/wiki/SPARC64_V *) cache_line_guess=128 ;; # the default when we have no other info esac # allow the OS to refine our guess if test "$cross_compiling" = "no"; then cache_line_guess_os= case "$target_os" in darwin*) # could also use `sysctl machdep.cpu.cache.linesize` cache_line_guess_os=`(/usr/sbin/sysctl hw.cachelinesize | cut '-d ' -f2) 2>/dev/null` ;; linux*) # `getconf LEVEL1_DCACHE_LINESIZE` and cache_alignment in /proc/cpuinfo seem less reliable cache_line_guess_os=`(cat /sys/devices/system/cpu/cpu0/cache/index{0,1,2,3}/coherency_line_size | tail -1) 2>/dev/null` ;; *) ;; esac if test -n "$cache_line_guess_os" ; then cache_line_guess=$cache_line_guess_os fi fi AC_MSG_RESULT($cache_line_guess) GASNET_ENV_DEFAULT(CACHE_LINE_BYTES, $cache_line_guess, [shared data cache line width, in bytes (default is platform-dependent)]) AC_DEFINE_UNQUOTED(GASNETI_CACHE_LINE_BYTES,$CACHE_LINE_BYTES) case "$CACHE_LINE_BYTES" in 8) GASNETI_CACHE_LINE_SHIFT=3 ;; 16) GASNETI_CACHE_LINE_SHIFT=4 ;; 32) GASNETI_CACHE_LINE_SHIFT=5 ;; 64) GASNETI_CACHE_LINE_SHIFT=6 ;; 128) GASNETI_CACHE_LINE_SHIFT=7 ;; 256) GASNETI_CACHE_LINE_SHIFT=8 ;; 512) GASNETI_CACHE_LINE_SHIFT=9 ;; 1024) GASNETI_CACHE_LINE_SHIFT=10 ;; *) AC_MSG_ERROR(unsupported CACHE_LINE_BYTES=$CACHE_LINE_BYTES) ;; esac AC_DEFINE_UNQUOTED(GASNETI_CACHE_LINE_SHIFT,$GASNETI_CACHE_LINE_SHIFT) if test x"$enabled_valgrind" = x"yes" ; then GASNETI_TM0_ALIGN=0 # team disalignment optimization leads to "possible leak" reports for every non-primordial gex_TM_t elif test $CACHE_LINE_BYTES -lt 8; then GASNETI_TM0_ALIGN=16 else GASNETI_TM0_ALIGN=`expr 2 \* $CACHE_LINE_BYTES` fi AC_DEFINE_UNQUOTED(GASNETI_TM0_ALIGN,$GASNETI_TM0_ALIGN) AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = yes) PTHREADS="$have_pthread" AC_SUBST(PTHREADS) ######################################################################## ## Process-shared memory (pshm) dnl GASNET_TOOLSONLY_FALSE_BEGIN have_hugetlbfs=no GASNET_IF_ENABLED_WITH_AUTO(hugetlbfs, [Enable/disable huegtlbfs support (default is system dependent)], [enabled_hugetlbfs=yes], [enabled_hugetlbfs=no], [enabled_hugetlbfs=probe]) if test "$enabled_hugetlbfs" != 'no'; then GASNET_PACKAGE_HOME(HUGETLBFS, [hugetlbfs], [hugectl], [/usr/local], [include/hugetlbfs.h]) GASNET_PACKAGE_CFLAGS(HUGETLBFS) GASNET_ENV_DEFAULT(HUGETLBFS_LIBS, -lhugetlbfs) GASNET_PACKAGE_LDFLAGS(HUGETLBFS, hugetlbfs) GASNET_SPLIT_LINKER_OPTS(HUGETLBFS_LDFLAGS,HUGETLBFS_LIBS) GASNET_PUSHVAR(CFLAGS,"$CFLAGS $HUGETLBFS_CFLAGS") GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $HUGETLBFS_LDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $HUGETLBFS_LIBS") GASNET_TRY_CACHE_LINK([for usable libhugetlbfs], hugetlbfs_works, [ #include ], [ int rc1 = hugetlbfs_unlinked_fd(); const char * rc2 = hugetlbfs_find_path(); long rc3 = gethugepagesize(); ], [ have_hugetlbfs=yes AC_DEFINE(HAVE_HUGETLBFS)]) GASNET_POPVAR(LIBS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(CFLAGS) if test "$enabled_hugetlbfs$have_hugetlbfs" = 'yesno'; then GASNET_MSG_ERROR([User requested --enable-hugetlbfs but the header and/or library could not be found]) fi if test "$have_hugetlbfs" = 'yes'; then GASNET_IF_ENABLED_NOHELP(hugetlbfs-whole-archive, [ if test "$HUGETLBFS_LIBS" = '-lhugetlbfs'; then HUGETLBFS_LIBS="-Wl,--whole-archive,-lhugetlbfs,--no-whole-archive" else GASNET_MSG_ERROR([dnl User requested --enable-hugetlbfs-whole-archive, which is a deprecated option available only when libhugetlbfs is the only library required. Please configure using the fully-general --with-hugetlbfs-libs option instead.]) fi ]) fi fi with_pshm=no GASNET_PSHM_CFLAGS= GASNET_PSHM_LDFLAGS= GASNET_PSHM_LIBS= GASNET_PSHM_ENABLED=no GASNET_IF_ENABLED_WITH_AUTO(pshm, [Enable/disable inter-process shared memory support (default is system dependent)], [enabled_pshm=yes], [enabled_pshm=no], [ if test "$segconfig" = everything; then enabled_pshm=no elif test "$cross_compiling" = yes; then enabled_pshm=no else # Current default is 'probe' unless overridden in case statment below enabled_pshm=probe case "$target_os" in cygwin*) if test "$have_cygwin2" = 'no'; then enabled_pshm=no; fi ;; esac fi ]) if test "$segconfig$enabled_pshm" = everythingyes; then GASNET_MSG_ERROR([User requested --enable-segment-everything and --enable-pshm but PSHM support does not include GASNET_SEGMENT_EVERYTHING.]) fi if test "$enabled_pshm" != no; then # First check for POSIX (shm_open) support GASNET_IF_ENABLED_WITH_AUTO(pshm-posix, [Enable/disable use of POSIX shm_open() for inter-process shared memory support (default is system dependent)], [enabled_pshm_posix=yes], [enabled_pshm_posix=no], [ # Default is YES except: # + on Solaris due to incompatibility w/ ibv and the "robustness" of SysV # + on HPE Cray EX where we prefer hugetlbfs if available enabled_pshm_posix=yes case "$target_os" in solaris*) enabled_pshm_posix=no ;; esac if test "$GASNET_PLATFORM$have_hugetlbfs" = crayexyes; then enabled_pshm_posix=no fi ]) if test "$enabled_pshm_posix$with_pshm" = yesno; then # shm_open() might be in libc (e.g. AIX, Darwin) or librt (e.g. Linux, Solaris) GASNET_PUSHVAR(LIBS,"$LIBS") have_shm_open=probe AC_SEARCH_LIBS(shm_open, [rt posix4], [ if test "$cross_compiling" = "yes" ; then # To the best of my knowledge CNL, and BG/L all lack # working shm_open() support, though at least CNL finds the symbol. # So, we default to NO shm_open() when cross-compiling. -PHH # Update: CNL on Cray XE *does* have working shm_open(). -PHH # One can set CROSS_HAVE_SHM_OPEN=1 to force building PSHM for POSIX. GASNET_CROSS_VAR(GASNETI_HAVE_SHM_OPEN, HAVE_SHM_OPEN, 0) if test "$CROSS_HAVE_SHM_OPEN" != 1; then have_shm_open=no fi fi if test "$have_shm_open" = probe; then GASNET_TRY_CACHE_RUN_WITHCC([for working shm_open()], have_shm_open, [ #include #include #include #include #include #include #define SHM_NAME "/GASNETconftst" ],[ int size = GASNETI_PAGESIZE; int fd; void * addr; fd = shm_open(SHM_NAME, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR); (void)shm_unlink(SHM_NAME); if (fd < 0) return 1; if (ftruncate(fd, size) < 0) return 1; addr = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); (void)close(fd); if (!addr || (addr == MAP_FAILED)) return 1; (void)munmap(addr, size); return 0; ],[ have_shm_open=yes ], [ have_shm_open=no ]) fi if test "$have_shm_open" = yes; then AC_DEFINE(GASNETI_PSHM_POSIX) GASNET_PSHM_LIBS="$LIBS" with_pshm=posix fi ], [ have_shm_open=no ]) GASNET_POPVAR(LIBS) fi # Second check is for SysV (shmget) support enabled_pshm_sysv=no GASNET_IF_ENABLED_WITH_AUTO(pshm-sysv, [Enable use of SysV shmat() for inter-process shared memory support (default is system dependent)], [enabled_pshm_sysv=yes], [enabled_pshm_sysv=no], [ # Default is NO except: # + on Solaris due to "robust" defaults and compatibility with ibv-conduit enabled_pshm_sysv=no case "$target_os" in solaris*) enabled_pshm_sysv=yes ;; esac ]) if test "$enabled_pshm_sysv$with_pshm" = yesno; then dnl XXX Stronger probe? AC_CHECK_FUNC(shmget, [ AC_DEFINE(GASNETI_PSHM_SYSV) with_pshm=sysv ]) fi # Third check is for XPMEM+hugetlbfs support enabled_pshm_xpmem=no GASNET_IF_ENABLED(pshm-xpmem, [Enable use of XPMEM for inter-process shared memory support (default disabled)], [enabled_pshm_xpmem=yes]) if test "$enabled_pshm_xpmem$with_pshm" = yesno; then GASNET_PUSHVAR(LIBS,"") GASNET_PUSHVAR(LDFLAGS,"") GASNET_PUSHVAR(CPPFLAGS,"") GASNET_CHECK_CRAY_HEADER([xpmem.h], [CRAY_XPMEM_INCLUDE_OPTS], [ found_xpmem_h=yes ],[ found_xpmem_h=yes CPPFLAGS="$CRAY_XPMEM_INCLUDE_OPTS" ],[ AC_CHECK_HEADERS([sn/xpmem.h], [found_xpmem_h=yes], [found_xpmem_h=no]) ]) LDFLAGS="$CRAY_XPMEM_POST_LINK_OPTS" LIBS="-lxpmem" if test $found_xpmem_h = yes; then AC_SEARCH_LIBS(xpmem_get, xpmem, [ if test $have_hugetlbfs = yes; then LIBS="$LIBS $HUGETLBFS_LIBS" AC_DEFINE(GASNETI_USE_HUGETLBFS) fi GASNET_PSHM_CFLAGS="$CPPFLAGS" GASNET_PSHM_LDFLAGS="$LDFLAGS" GASNET_PSHM_LIBS="$LIBS" AC_CHECK_FUNCS([xpmem_make_2]) AC_DEFINE(GASNETI_PSHM_XPMEM) with_pshm=xpmem ]) fi GASNET_POPVAR(LIBS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(CPPFLAGS) fi # Next check is for mmap()ed file support on hugetlbfs enabled_pshm_hugetlbfs=no pshm_hugetlbfs_why='User requested' GASNET_IF_ENABLED_WITH_AUTO(pshm-hugetlbfs, [Enable use of hugetlbfs for inter-process shared memory support (default is system dependent)], [enabled_pshm_hugetlbfs=yes], [enabled_pshm_hugetlbfs=no], [ # Default is NO except: # + on HPE Cray EX if available if test "$GASNET_PLATFORM$have_hugetlbfs" = crayexyes; then enabled_pshm_hugetlbfs=yes pshm_hugetlbfs_why='System defaults to' fi ] ) if test "$enabled_pshm_hugetlbfs$with_pshm" = yesno; then if test $enabled_hugetlbfs = no; then GASNET_MSG_ERROR([User requested --enable-pshm-hugetlbfs, but hugetlbfs support was disabled.]) elif test $have_hugetlbfs = no; then GASNET_MSG_ERROR([$pshm_hugetlbfs_why --enable-pshm-hugetlbfs but hugetlbfs support was not found.]) fi AC_DEFINE(GASNETI_PSHM_FILE) AC_DEFINE(GASNETI_USE_HUGETLBFS) GASNET_PSHM_CFLAGS="$HUGETLBFS_CFLAGS" GASNET_PSHM_LDFLAGS="$HUGETLBFS_LDFLAGS" GASNET_PSHM_LIBS="$HUGETLBFS_LIBS" with_pshm=hugetlbfs fi # Final check is for mmap()ed file support enabled_pshm_file=no GASNET_IF_ENABLED(pshm-file, [Enable use of mmap()ed temporary files for inter-process shared memory support (default disabled)], [enabled_pshm_file=yes]) if test "$enabled_pshm_file$with_pshm" = yesno; then dnl Currently if requested, this will get used. AC_DEFINE(GASNETI_PSHM_FILE) with_pshm=file fi fi if test "$with_pshm" != no; then AC_DEFINE(GASNETI_PSHM_ENABLED) GASNET_PSHM_ENABLED=yes case "$target_os" in netbsd*) # XXX: We know this is required for decent performance, but WHY?!? # What magic does libpthread perform at library init time? GASNET_PSHM_LIBS="$GASNET_PSHM_LIBS -pthread" # Even if --disable-pthreads ;; esac GASNET_IF_ENABLED([large-pshm], [Enable PSHM support for upto 45k cores per node (default is 255 cores)], [gasnet_pshm_max_nodes=46655], [gasnet_pshm_max_nodes=255]) AC_DEFINE_UNQUOTED(GASNETI_CONFIG_PSHM_MAX_NODES, $gasnet_pshm_max_nodes) elif test "$enabled_pshm" = yes; then GASNET_MSG_ERROR([User requested --enable-pshm but no supported implementation was found]) elif test "$have_hugetlbfs" = yes && test "$GASNET_PLATFORM" = crayex ; then # If PSHM is disabled or not found, but hugetlbfs is present on a supported # system, then ensure use of hugetlfs for segment allocation. # To do so, we (ab)use GASNET_PSHM_LIBS which would otherwise be empty. # Currently the supported systems are the Cray XC and HPE Cray EX # However, we are not doing anything here for the former AC_DEFINE(GASNETI_USE_HUGETLBFS) GASNET_PSHM_CFLAGS="$HUGETLBFS_CFLAGS" GASNET_PSHM_LDFLAGS="$HUGETLBFS_LDFLAGS" GASNET_PSHM_LIBS="$HUGETLBFS_LIBS" fi GASNET_SPLIT_LINKER_OPTS(GASNET_PSHM_LDFLAGS,GASNET_PSHM_LIBS) AC_SUBST(GASNET_PSHM_ENABLED) AC_SUBST(GASNET_PSHM_CFLAGS) AC_SUBST(GASNET_PSHM_LDFLAGS) AC_SUBST(GASNET_PSHM_LIBS) # Note that --enable-pshm disables aligned segments ONLY for conduits that USE it GASNETI_DISABLE_ALIGNED_SEGMENTS=0 GASNET_IF_ENABLED([aligned-segments], [Force alignment for GASNet-allocated segment base address. Incompatible with PSHM, heterogeneous clusters and OS address randomization], [RVMFILE="/proc/sys/kernel/randomize_va_space" if test "$segconfig" = everything ; then : # Alignment not applicable to segment-everything elif test -f $RVMFILE && test "`cat $RVMFILE`" != "0" ; then WMSG="$RVMFILE on this node indicates the Linux VM space randomization \ security feature is enabled. If this feature is also enabled on the compute \ nodes, you need to re-run configure without --enable-aligned-segments" GASNET_MSG_WARN([$WMSG]) fi if test "$with_pshm" != no; then AC_MSG_ERROR([--enable-aligned-segments is incompatible with PSHM support. To force aligned segments, add --disable-pshm]) fi ],[ GASNETI_DISABLE_ALIGNED_SEGMENTS=1 AC_DEFINE(GASNETI_DISABLE_ALIGNED_SEGMENTS) ]) AC_CHECK_HEADER([sys/statvfs.h],[AC_CHECK_FUNCS([fstatvfs])]) dnl GASNET_TOOLSONLY_FALSE_END AM_CONDITIONAL(USE_PSHM, test "$with_pshm" != no) ######################################################################## ## CPU feature checks ## Look for potentially buggy MIPS R10k systems # There is a processor erratum to work-around in our atomics :-( # The only SGI products w/ the bad cpus are the "IP27" platforms (Origin 200, Origin 2000, and Onyx 2) # XXX: We could refine this to check the reported cpu revision GASNET_IF_ENABLED_WITH_AUTO(arch-sgi-ip27, Enable/disable work-around for buggy SGI IP27 platforms (Onyx2, Origin200 and Origin2000) (disabled), enabled_sgi_ip27=yes, enabled_sgi_ip27=no, enabled_sgi_ip27=no) if test "$enabled_sgi_ip27" = yes; then AC_DEFINE(GASNETI_ARCH_SGI_IP27) fi # Check how to reference MIPS assembler temporary register ("$1" or "$at") if expr "$target_cpu" : "mips" >/dev/null; then AC_CHECK_HEADERS(sgidefs.h) GASNET_TRY_CACHE_CHECK(for MIPS register '\$[]1', mips_reg_1, [ #define GASNETI_ASM(mnemonic) __asm__ __volatile__ (mnemonic : : : "memory") ], [ GASNETI_ASM(".set noat\n\t" "move \$1,\$0\n\t" ".set at"); ], [AC_DEFINE(GASNETI_HAVE_MIPS_REG_1)]) GASNET_TRY_CACHE_CHECK(for MIPS register '\$at', mips_reg_at, [ #define GASNETI_ASM(mnemonic) __asm__ __volatile__ (mnemonic : : : "memory") ], [ GASNETI_ASM(".set noat\n\t" "move \$at,\$0\n\t" ".set at"); ], [AC_DEFINE(GASNETI_HAVE_MIPS_REG_AT)]) fi ## ARM-specific checks for "kernel helpers" if expr "$target_cpu" : "arm" >/dev/null; then GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") dnl for gasnet_arch_arm.h ## Does ARM kernel have cmpxchg support? if test "$cross_compiling" = "yes" ; then GASNET_CROSS_VAR(GASNETI_HAVE_ARM_CMPXCHG, HAVE_ARM_CMPXCHG) else GASNET_TRY_CACHE_RUN([for ARM cmpxchg kernel support], have_arm_cmpxchg, [ #define GASNETI_IN_CONFIGURE 1 #define CHECK_ARM_CMPXCHG 1 #include "gasnet_arch_arm.h" int main(void) { return gasneti_arm_cmpxchg_check(); } ], [GASNETI_HAVE_ARM_CMPXCHG=1] , [GASNETI_HAVE_ARM_CMPXCHG=0]) fi if test $GASNETI_HAVE_ARM_CMPXCHG = 1; then AC_DEFINE(GASNETI_HAVE_ARM_CMPXCHG) fi ## Does ARM kernel have membar support? if test "$cross_compiling" = "yes" ; then GASNET_CROSS_VAR(GASNETI_HAVE_ARM_MEMBAR, HAVE_ARM_MEMBAR) else GASNET_TRY_CACHE_RUN([for ARM membar kernel support], have_arm_membar, [ #define GASNETI_IN_CONFIGURE 1 #define CHECK_ARM_MEMBAR 1 #include "gasnet_arch_arm.h" int main(void) { return gasneti_arm_membar_check(); } ], [GASNETI_HAVE_ARM_MEMBAR=1] , [GASNETI_HAVE_ARM_MEMBAR=0]) fi if test $GASNETI_HAVE_ARM_MEMBAR = 1; then AC_DEFINE(GASNETI_HAVE_ARM_MEMBAR) fi GASNET_POPVAR(CPPFLAGS) fi ## Check support for AARCH64 real time counter if test "$target_cpu" = "aarch64" ; then GASNET_TRY_CACHE_CHECK(for aarch64 virtual timer count register, aarch64_cntvct_el0, [ #include #include ], [ uint64_t tick, freq; __asm__ __volatile__ ("isb\n\t" "mrs %0,CNTVCT_EL0" : "=r" (tick) : /* no inputs */ : "memory"); __asm__ __volatile__ ("mrs %0,CNTFRQ_EL0" : "=r" (freq)); return !tick || !freq; /* Fail if either register is zero */ ], [AC_DEFINE(GASNETI_HAVE_AARCH64_CNTVCT_EL0)]) fi ## Do CC/gas and CPU support "cmpxchg16b"? if test "$cross_compiling" = "yes" ; then GASNET_CROSS_VAR(GASNETI_HAVE_X86_CMPXCHG16B,HAVE_X86_CMPXCHG16B,[probe]) if test "$GASNETI_HAVE_X86_CMPXCHG16B" = '1'; then AC_DEFINE(GASNETI_HAVE_X86_CMPXCHG16B) fi fi if test "$cross_compiling" = 'no' -o "$GASNETI_HAVE_X86_CMPXCHG16B" = 'probe' ; then GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") dnl for gasnet_portable_platform.h GASNET_TRY_CACHE_RUN_WITHCC([for x86-64 cmpxchg16b support],[x86_64_cmpxchg16b],[ #include "gasnet_portable_platform.h" ],[[ #if PLATFORM_ARCH_X86_64 #if PLATFORM_COMPILER_GNU || PLATFORM_COMPILER_INTEL || \ PLATFORM_COMPILER_PATHSCALE || PLATFORM_COMPILER_PGI || \ PLATFORM_COMPILER_OPEN64 || PLATFORM_COMPILER_CLANG || \ PLATFORM_COMPILER_NVHPC unsigned long *array[3]; volatile unsigned long *p = (void *)(((unsigned long)array + 15) & ~(unsigned long)15); /* Note oldhi selected to detect bug 2408 (anything in upper 32bits) */ register unsigned long oldlo = 0; register unsigned long oldhi = 0x1234llu << 32; register unsigned long newlo = 1234; register unsigned long newhi = 5678; register unsigned char result; p[0] = oldlo; p[1] = oldhi; __asm__ __volatile__ ( "lock; " "cmpxchg16b %1 \n\t" "sete %0 " : "=q" (result), "=m" (*p), "+&a" (oldlo), "+&d" (oldhi) : "b" (newlo), "c" (newhi) : "cc", "memory"); /* Want SUCCESS and changed values */ return (!result || (p[0] != 1234) || (p[1] != 5678)); #else /* Don't know, but also don't currently care */ return 1; #endif #else #error wrong CPU architecture #endif ]], [AC_DEFINE(GASNETI_HAVE_X86_CMPXCHG16B)]) GASNET_POPVAR(CPPFLAGS) fi ## x86 -fPIC which steals the B register ## XXX: Test currently only correctly identifies PIC mode with using a ## compiler which accepts GNU-style asm - but that is the only ## case where we *currently* care. Test may need some additional ## cases for other compilers in the future. GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") dnl for gasnet_portable_platform.h GASNET_TRY_CACHE_CHECK(for x86 EBX register, x86_ebx, [ #include "gasnet_portable_platform.h" /* For PLATFORM_COMPILER_* */ ], [ #if PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_X86 #if PLATFORM_COMPILER_GNU || PLATFORM_COMPILER_INTEL || \ PLATFORM_COMPILER_PATHSCALE || PLATFORM_COMPILER_PGI || \ PLATFORM_COMPILER_OPEN64 || \ PLATFORM_COMPILER_NVHPC || \ PLATFORM_COMPILER_CLANG __asm__ __volatile__ ("push %0" : : "b" (0)); #else /* Don't know, but fortunately don't currently care */ #endif #else #error wrong CPU architecture #endif ], [AC_DEFINE(GASNETI_HAVE_X86_EBX)]) GASNET_POPVAR(CPPFLAGS) ## Does 32-bit SPARC compiler understand "U" and "h" register classes? if expr "$GASNETI_PTR_BITS$target_cpu" : "32sparc" >/dev/null; then GASNET_TRY_CACHE_CHECK([for 64-bit SPARC asm support], have_sparc32_64bit_asm, [] ,[ unsigned long long u, v; volatile unsigned long long *p = &u; register int retval; register int tmp = 0; __asm__ __volatile__ ( "std %1, %0" : "=m"(*p) : "U"(v) ); __asm__ __volatile__ ( "clr %0 \n\tmovrz %1,1,%0" : "=&h"(retval), "+h"(tmp) ); ], [AC_DEFINE(GASNETI_HAVE_SPARC32_64BIT_ASM)]) fi ## Spinloop hints GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR/other") dnl for gasnet_portable_platform.h # need to run here because some OS's (Solaris/x86) forbid the pause instruction GASNET_TRY_CACHE_RUN_WITHCC(for x86 pause instruction,x86_pause_instruction, [ #include "gasnet_portable_platform.h" #if PLATFORM_COMPILER_SUN #define GASNETI_ASM(mnemonic) __asm(mnemonic) #else /* All remaining x86/x86-64 compilers support GNU-style ASM or none at all */ #define GASNETI_ASM(mnemonic) __asm__ __volatile__ (mnemonic : : : "memory") #endif ], [ #if PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_X86 GASNETI_ASM("pause"); #else #error wrong CPU architecture #endif ], [AC_DEFINE(GASNETI_PAUSE_INSTRUCTION, "pause")]) GASNET_POPVAR(CPPFLAGS) ## Misc. builtins (e.g. for bit manipulation) GASNET_PUSHVAR(CFLAGS,"$CFLAGS -I$TOP_SRCDIR/other") GASNET_TRY_CACHE_LINK(for __builtin_bswap32, cc_has_builtin_bswap32, [ #include "portable_inttypes.h" uint32_t x;], [__builtin_bswap32(x);], AC_DEFINE(GASNETI_HAVE_CC_BUILTIN_BSWAP32)) GASNET_TRY_CACHE_LINK(for __builtin_bswap64, cc_has_builtin_bswap64, [ #include "portable_inttypes.h" uint64_t x;], [__builtin_bswap64(x);], AC_DEFINE(GASNETI_HAVE_CC_BUILTIN_BSWAP64)) GASNET_POPVAR(CFLAGS) GASNET_TRY_CACHE_LINK(for __builtin_clz, cc_has_builtin_clz, [unsigned int x;], [__builtin_clz(x);], AC_DEFINE(GASNETI_HAVE_CC_BUILTIN_CLZ)) GASNET_TRY_CACHE_LINK(for __builtin_clzl, cc_has_builtin_clzl, [unsigned long int x;], [__builtin_clzl(x);], AC_DEFINE(GASNETI_HAVE_CC_BUILTIN_CLZL)) GASNET_TRY_CACHE_LINK(for __builtin_clzll, cc_has_builtin_clzll, [unsigned long long int x;], [__builtin_clzll(x);], AC_DEFINE(GASNETI_HAVE_CC_BUILTIN_CLZLL)) GASNET_TRY_CACHE_LINK(for __builtin_ctz, cc_has_builtin_ctz, [unsigned int x;], [__builtin_ctz(x);], AC_DEFINE(GASNETI_HAVE_CC_BUILTIN_CTZ)) GASNET_TRY_CACHE_LINK(for __builtin_ctzl, cc_has_builtin_ctzl, [unsigned long x;], [__builtin_ctzl(x);], AC_DEFINE(GASNETI_HAVE_CC_BUILTIN_CTZL)) GASNET_TRY_CACHE_LINK(for __builtin_ctzll, cc_has_builtin_ctzll, [unsigned long long int x;], [__builtin_ctzll(x);], AC_DEFINE(GASNETI_HAVE_CC_BUILTIN_CTZLL)) #--------------------------------------------------------------------------------------------------------------- # Linux's PR_SET_PDEATHSIG of interest to both smp-conduit and ssh-spawer # Linux's PR_SET_PTRACER of interest for backtracing if expr "$target_os" : "linux" >/dev/null; then GASNET_IF_DISABLED(pdeathsig, [Support use of Linux-specific prctl(PR_SET_PDEATHSIG) (default is to probe)], [:], [ GASNET_TRY_CACHE_LINK([for PR_SET_PDEATHSIG], pr_set_pdeathsig, [ #include /* to look for unsafe 2.4.x kernels */ #include ],[ struct utsname u; int rc1 = uname(&u); int rc2 = prctl(PR_SET_PDEATHSIG, 0); ],[ AC_DEFINE(HAVE_PR_SET_PDEATHSIG) ]) ]) GASNET_TRY_CACHE_LINK([for PR_SET_PTRACER], pr_set_ptracer, [ #include #ifndef PR_SET_PTRACER #define PR_SET_PTRACER 0x59616d61 /* 'Yama' */ #endif #ifndef PR_SET_PTRACER_ANY #define PR_SET_PTRACER_ANY ((unsigned long)(-1)) #endif ],[ int rc = prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY); ],[ AC_DEFINE(HAVE_PR_SET_PTRACER) ]) fi #--------------------------------------------------------------------------------------------------------------- # Global disable of fork() (and related calls) on "special" systems. # Conduits may also set GASNETI_NO_FORK individually have_fork=yes GASNET_IF_ENABLED_WITH_AUTO(fork, Allow internal use of fork() and related calls (default is to probe at configure time), [ : ], [ have_fork=no fork_reason="was disabled" ], [ AC_CHECK_FUNCS(fork popen system, [ : ], [ have_fork=no fork_reason="appears to be missing or broken" break])]) if test $have_fork = no; then AC_DEFINE(GASNETI_NO_FORK) fi #--------------------------------------------------------------------------------------------------------------- # Check for overrides of compile-time checks for SMPs # Enable build of SMP-safe libraries (default is off) GASNET_IF_DISABLED_NOHELP(smp-safe, [ GASNET_MSG_WARN([configure --disable-smp-safe is deprecated and may be unsafe. You should only use this option if you really know what you are doing.]) AC_DEFINE(GASNETI_UNI_BUILD) ]) dnl GASNET_TOOLSONLY_FALSE_BEGIN GASNET_IF_ENABLED(loopback-memsync, Force memory barriers for GASNet local (loopback) puts and gets, [AC_DEFINE(GASNETI_MEMSYNC_ON_LOOPBACK)]) GASNET_IF_ENABLED(throttle-poll, throttle polling threads in multi-threaded configurations to reduce contention (experimental, only implemented in some conduits), [AC_DEFINE(GASNETI_THROTTLE_FEATURE_ENABLED)]) GASNET_WITH(maxeps, [Maximum number of endpoints per-process, subject to per-conduit limits (default is conduit-dependent)], [if expr "${withval}" : "[[1-9]][[0-9]]*" >/dev/null; then AC_DEFINE_UNQUOTED(GASNETI_MAXEPS_CONFIGURE, $withval) else AC_MSG_ERROR([--with-maxeps requires a positive integer argument]) fi], [AC_MSG_ERROR([--with-maxeps requires a positive integer argument])]) dnl GASNET_TOOLSONLY_FALSE_END # FORCED non-default implementations - used mainly for debugging # # NOTE: If adding an "--enable-forced-*" option here, please: # 1) Set enabled_force=yes to trigger the warning below # 2) Add to the "don't trust performance" warning in tests/test.h # 3) If applicable, the corresponding portion of the GASNet config string should # distinguish forced behaviors from default ones. # 4) You probably want a "LINKCONFIG_IDIOTCHECK" as well (might be covered by #3) GASNET_IF_ENABLED(force-generic-atomicops, [Force mutex-based atomic ops (default is platform specific)], [enabled_force=yes; enabled_generic_atomicops=yes]) GASNET_IF_ENABLED(force-os-atomicops, [Force os-provided atomic ops (default is platform specific)], [enabled_force=yes; enabled_os_atomicops=yes]) GASNET_IF_ENABLED(force-compiler-atomicops, [Force compiler-provided atomic ops (default is platform specific)], [enabled_force=yes; enabled_compiler_atomicops=yes]) if test -z "$enabled_generic_atomicops$enabled_os_atomicops$enabled_compiler_atomicops"; then : # Nothing to do elif test "$enabled_generic_atomicops$enabled_os_atomicops$enabled_compiler_atomicops" != yes; then AC_MSG_ERROR([You may request at most one of --enable-force-generic-atomicops, --enable-force-os-atomicops, --enable-force-compiler-atomicops]) elif test -n "$enabled_generic_atomicops" ; then AC_DEFINE(GASNETI_FORCE_GENERIC_ATOMICOPS) elif test -n "$enabled_os_atomicops"; then AC_DEFINE(GASNETI_FORCE_OS_ATOMICOPS) elif test -n "$enabled_compiler_atomicops"; then AC_DEFINE(GASNETI_FORCE_COMPILER_ATOMICOPS) fi # Check for clock_gettime GASNET_TRY_CACHE_CHECK(for clock_gettime(), cc_has_clock_gettime, [ #include ], [ struct timespec tm; int rc = clock_gettime(CLOCK_REALTIME,&tm); ], AC_SEARCH_LIBS(clock_gettime, [rt posix4], [ AC_DEFINE(HAVE_CLOCK_GETTIME) have_clock_gettime=yes ], AC_MSG_RESULT(entry point not found - disabled))) # Timer configuration use_timers=native if test x"$enabled_valgrind" = x"yes" ; then # valgrind emulation degrades timer calibration and reliability, default to posixrt use_timers=posixrt fi AC_DEFUN([GASNET_CHECK_TIMER_OPTION],[ if test -n "$force_timers" ; then AC_MSG_ERROR([You may request at most one of: --enable-force-gettimeofday --enable-force-posix-realtime --enable-force-native-timers]) fi force_timers=1 ]) GASNET_IF_ENABLED(force-native-timers, [Force use of "native" timers (default is platform-specific)], [# don't enabled_force here because the warning makes no sense for this case use_timers=native GASNET_CHECK_TIMER_OPTION]) GASNET_IF_ENABLED(force-gettimeofday, [Force use of gettimeofday() for timers (default is platform-specific)], [if test "$use_timers" != gettimeofday; then enabled_force=yes; use_timers=gettimeofday fi GASNET_CHECK_TIMER_OPTION]) GASNET_IF_ENABLED(force-posix-realtime, [Force use of clock_gettime() for timers (default is platform-specific)], [if test "$use_timers" != posixrt; then enabled_force=yes; use_timers=posixrt fi GASNET_CHECK_TIMER_OPTION]) case "$use_timers" in native) : ;; gettimeofday) AC_DEFINE(GASNETI_FORCE_GETTIMEOFDAY) ;; posixrt) if test x$have_clock_gettime != xyes; then AC_MSG_ERROR([No support found for posix-realtime timers. Try --enable-force-gettimeofday or --enable-force-native-timers]) fi AC_DEFINE(GASNETI_FORCE_POSIX_REALTIME) ;; *) AC_MSG_ERROR([Internal error in timer configuration]) ;; esac GASNET_IF_ENABLED(force-yield-membars, [Force a sched_yield() call in memory barriers (disabled by default)], [enabled_force=yes; enabled_yield_membars=yes]) GASNET_IF_ENABLED(force-slow-membars, [Force function call based (non-inline) memory barriers (disabled by default)], [enabled_force=yes; enabled_slow_membars=yes]) if test "$enabled_yield_membars$enabled_slow_membars" = yesyes; then AC_MSG_ERROR([You cannot request both --enable-force-yield-membars and --enable-force-slow-membars]) elif test -n "$enabled_yield_membars" ; then AC_DEFINE(GASNETI_FORCE_YIELD_MEMBARS) elif test -n "$enabled_slow_membars" ; then AC_DEFINE(GASNETI_FORCE_SLOW_MEMBARS) fi GASNET_IF_ENABLED(force-true-weakatomics, [Force use of real atomic operations in sequential code (disabled by default)], [enabled_force=yes; AC_DEFINE(GASNETI_FORCE_TRUE_WEAKATOMICS)] ) GASNET_IF_ENABLED(force-generic-semaphores, [Force mutex-based semaphores (default is platform specific)], [enabled_force=yes; AC_DEFINE(GASNETI_FORCE_GENERIC_SEMAPHORES)] ) if test "$enabled_force" = yes; then GASNET_MSG_WARN([ ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You have configured with one or more --enable-force-* options This usually has a SERIOUS impact on performance, so you should NOT trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------]) fi #--------------------------------------------------------------------------------------------------------------- ## Determine our atomics "family" ## Must follow all potentially relevant probes of asm support and "force" option AC_DEFUN([GASNET_GET_ATOMIC_IMPL],[ pushdef([uppername],translit($1,'a-z','A-Z')) GASNET_TRY_CACHE_EXTRACT_EXPR([$1 implementation family (binary probe)], uppername[]_IMPL, [#include "gasnet_portable_platform.h" #define GASNETI_IN_CONFIGURE 1 #include "gasnet_atomic_fwd.h"], GASNETI_[]uppername[]_IMPL, GASNETI_[]uppername[]_IMPL_CONFIGURE) AC_DEFINE_UNQUOTED(GASNETI_[]uppername[]_IMPL_CONFIGURE, $GASNETI_[]uppername[]_IMPL_CONFIGURE) # Must keep the following consistent with gasnet_atomic_fwd.h case $GASNETI_[]uppername[]_IMPL_CONFIGURE in 0) GASNETI_[]uppername[]_IMPL_STR=generic;; 1) GASNETI_[]uppername[]_IMPL_STR=native;; 2) GASNETI_[]uppername[]_IMPL_STR=os;; 3) GASNETI_[]uppername[]_IMPL_STR=compiler;; 4) GASNETI_[]uppername[]_IMPL_STR=hybrid;; 5) GASNETI_[]uppername[]_IMPL_STR=native;; # 5="special" is native but not inline *) GASNET_MSG_ERROR([Invalid GASNETI_[]uppername[]_IMPL detected]) ;; esac popdef([uppername]) ]) GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS -I$TOP_SRCDIR -I$TOP_SRCDIR/other") GASNET_GET_ATOMIC_IMPL(atomic) GASNET_GET_ATOMIC_IMPL(atomic32) GASNET_GET_ATOMIC_IMPL(atomic64) GASNET_POPVAR(CPPFLAGS) if test "$GASNETI_ATOMIC_IMPL_STR" = "$GASNETI_ATOMIC32_IMPL_STR" && test "$GASNETI_ATOMIC_IMPL_STR" = "$GASNETI_ATOMIC64_IMPL_STR"; then atomics_config="$GASNETI_ATOMIC_IMPL_STR" else atomics_config="$GASNETI_ATOMIC_IMPL_STR,${GASNETI_ATOMIC32_IMPL_STR}32,${GASNETI_ATOMIC64_IMPL_STR}64" fi dnl Logic to check for certain atomics implementation(s) dnl dnl CHECK_ATOMICS(match-list, action-on-match, action-on-no-match) dnl Note: action-on-no-match runs with $check_atomics_msg set AC_DEFUN([CHECK_ATOMICS],[ check_atomics_match='' for check_atomics_val in [$1]; do if test $GASNETI_ATOMIC_IMPL_STR = $check_atomics_val; then check_atomics_match=1 break fi done if test -n "$check_atomics_match"; then : $2 else if test -n "$enabled_generic_atomicops" ; then check_atomics_msg='user passed --enable-force-generic-atomicops' elif test -n "$enabled_os_atomicops"; then check_atomics_msg='user passed --enable-force-os-atomicops' else check_atomics_msg="this platform has defaulted to '$GASNETI_ATOMIC_IMPL_STR' atomicops" fi $3 unset check_atomics_msg fi unset check_atomics_match ]) #--------------------------------------------------------------------------------------------------------------- # PSHM uses atomics in shared memory for IPC. # So we assume that Generic and O/S atomics are insufficient. # If that is ever not the case, one can add exceptions as needed. dnl GASNET_TOOLSONLY_FALSE_BEGIN if test "$with_pshm" != no; then case "$enabled_pshm" in yes) pshm_how='enabled explicitly by --enable-pshm';; *) pshm_how='auto-enabled';; esac # For all platforms of interest, compiler is equivalent to native CHECK_ATOMICS([native compiler],[],[ GASNET_MSG_ERROR([PSHM support ($pshm_how) requires native atomicops, but $check_atomics_msg]) ]) fi dnl GASNET_TOOLSONLY_FALSE_END #--------------------------------------------------------------------------------------------------------------- # CONDUIT CONFIGURATION UTILITIES #--------------------------------------------------------------------------------------------------------------- # Hack-around to prevent a bogus autoconf 2.58 bug when AC_PROG_CXX is called conditionally below am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= dnl GASNET_TOOLSONLY_FALSE_BEGIN GASNET_IF_DISABLED(auto-conduit-detect, [Enable/disable automatic detection of supported network conduits (enabled by default)], [enabled_auto_detect=no;_conduit_auto_reason=disabled], [enabled_auto_detect=yes;_conduit_auto_reason=auto]) dnl GASNET_TOOLSONLY_FALSE_END dnl CONDUIT_BEGIN(lowername, conduit_allow, desc) dnl conduit_allow should be a literal [yes|exp|g1|no] to control use of this conduit: dnl yes = normal EX conduit dnl exp = experimental EX conduit (don't auto-detect, warns and requires --enable-conduit or --enable-conduit=probe) dnl g1 = force-disabled: warns directing users to GASNet-1 version of conduit dnl no = completely disabled and hidden dnl sets enabled_ to yes or no for whether conduit should be enabled AC_DEFUN([CONDUIT_BEGIN],[ pushdef([CONDUIT_NAME],[$1]) pushdef([CONDUIT_UPPERNAME],translit($1,'a-z','A-Z')) pushdef([CONDUIT_DESC],[$3]) # bug 1946: prevent confusing cross-conduit error messages GASNET_ERR_CLEANUP pushdef([CONDUIT_IMPLEMENTED],$2) pushdef([CONDUIT_HELP_TAG],[]) ifelse(CONDUIT_IMPLEMENTED,[yes],[ _conduit_list_[]CONDUIT_NAME=yes pushdef([CONDUIT_IMPLEMENTED_HELP],yes) ],CONDUIT_IMPLEMENTED,[exp],[ _conduit_list_[]CONDUIT_NAME=yes pushdef([CONDUIT_IMPLEMENTED_HELP],yes) popdef([CONDUIT_HELP_TAG]) pushdef([CONDUIT_HELP_TAG],[**EXPERIMENTAL**]) ],CONDUIT_IMPLEMENTED,[g1],[ _conduit_list_[]CONDUIT_NAME=no pushdef([CONDUIT_IMPLEMENTED_HELP],no) ],CONDUIT_IMPLEMENTED,[no],[ _conduit_list_[]CONDUIT_NAME=no pushdef([CONDUIT_IMPLEMENTED_HELP],no) ],[m4_fatal([Internal error on CONDUIT_BEGIN($1,conduit_allow=$2)])]) ifelse(CONDUIT_IMPLEMENTED_HELP,[yes],[ GASNET_HELP_OUTPUT([ CONDUIT_NAME[]-conduit options: (CONDUIT_DESC) CONDUIT_HELP_TAG]) ],[ dnl unimplemented conduit help disabled pushdef([GASNET_SUPPRESSHELP],[set]) ]) popdef([CONDUIT_HELP_TAG]) dnl GASNET_TOOLSONLY_FALSE_BEGIN ifelse(CONDUIT_IMPLEMENTED,[no],[ enabled_[]$1=no ],[ GASNET_IF_ENABLED_WITH_AUTO($1, Enable/disable the CONDUIT_DESC ifelse(CONDUIT_IMPLEMENTED,[yes],[(auto-detected)],[]), [enabled_[]$1=yes;force_[]$1=yes; _conduit_reason_[]$1=enabled], [enabled_[]$1=no; _conduit_reason_[]$1=disabled], [ if test "$enable_$1" = "probe" ; then # --enable-conduit=probe overrides --disable-auto-conduit-detect enabled_[]$1=yes; _conduit_reason_[]$1=auto else # default enabled_[]$1=$enabled_auto_detect;_conduit_reason_[]$1=$_conduit_auto_reason fi ]) ]) dnl GASNET_TOOLSONLY_FALSE_END dnl GASNET_TOOLSONLY_TRUE_BEGIN dnl enabled_[]$1=no dnl GASNET_TOOLSONLY_TRUE_END ]) dnl CONDUIT_DISALLOW_SEGMENT(segment_type) AC_DEFUN([CONDUIT_DISALLOW_SEGMENT],[ pushdef([upperseg],translit($1,'a-z','A-Z')) if test "$enabled_[]CONDUIT_NAME" = "yes" && expr "$segconfig" : $1 >/dev/null; then msg="CONDUIT_NAME[]-conduit does not support the upperseg shared segment configuration" if test "$force_[]CONDUIT_NAME" = yes ; then GASNET_MSG_ERROR([User requested --enable-CONDUIT_NAME but $msg]) fi GASNET_MSG_WARN([$msg - disabling CONDUIT_NAME]) enabled_[]CONDUIT_NAME=no fi popdef([upperseg]) ]) dnl CONDUIT_HOME(DESC, PROG, DIRS, FILE) dnl Wrapper around GASNET_PACKAGE_HOME() to pass the implicit conduit name AC_DEFUN([CONDUIT_HOME],[ GASNET_FUN_BEGIN([$0($@)]) GASNET_PACKAGE_HOME(CONDUIT_UPPERNAME,$@) GASNET_FUN_END([$0]) ]) dnl CONDUIT_CFLAGS([extra flags]) dnl Wrapper around GASNET_PACKAGE_CFLAGS() to pass the implicit conduit name AC_DEFUN([CONDUIT_CFLAGS],[ GASNET_FUN_BEGIN([$0($@)]) GASNET_PACKAGE_CFLAGS(CONDUIT_UPPERNAME,$@) GASNET_FUN_END([$0]) ]) dnl CONDUIT_LDFLAGS(libnames, [extra flags]) dnl Wrapper around GASNET_PACKAGE_LDFLAGS() to pass the implicit conduit name AC_DEFUN([CONDUIT_LDFLAGS],[ GASNET_FUN_BEGIN([$0($@)]) GASNET_PACKAGE_LDFLAGS(CONDUIT_UPPERNAME,$@) GASNET_FUN_END([$0]) ]) dnl CONDUIT_SPAWNER dnl sets and substitutes GASNET_[CONDUIT_NAME]_SPAWNER_CONF dnl defines GASNETC_[CONDUIT_NAME]_SPAWNER_CONF AC_DEFUN([CONDUIT_SPAWNER],[ pushdef([the_option],--with-[]CONDUIT_NAME[]-spawner) pushdef([the_variable],GASNET_[]CONDUIT_UPPERNAME[]_SPAWNER_CONF) GASNET_WITH(CONDUIT_NAME[]-spawner, [CONDUIT_NAME job spawner ("ssh", "mpi" or "pmi", default is mpi when available)], [case "$withval" in ssh|mpi|pmi) gasnet_spawner_conf=$withval ;; yes) AC_MSG_ERROR([the_option requires an argument ("ssh", "mpi" or "pmi")]) ;; *) AC_MSG_ERROR([the_option argument must be "ssh", "mpi" or "pmi"]) ;; esac], [AC_MSG_ERROR([the_option argument must be "ssh", "mpi" or "pmi"])], [if test "$have_mpi_compat" = yes; then gasnet_spawner_conf=mpi else gasnet_spawner_conf=ssh fi]) if test "$gasnet_spawner_conf$have_mpi_compat" = mpino; then AC_MSG_ERROR([the_option=mpi requires MPI compatibility support which $mpi_compat_reason]) elif test "$gasnet_spawner_conf$have_fork" = sshno; then AC_MSG_ERROR([the_option=ssh requires fork() support which $fork_reason]) elif test "$gasnet_spawner_conf" = pmi; then force_pmi=yes fi AC_DEFINE_UNQUOTED(GASNETC_[]CONDUIT_UPPERNAME[]_SPAWNER_CONF, "$gasnet_spawner_conf") the_variable=$gasnet_spawner_conf AC_SUBST(the_variable) unset gasnet_spawner_conf popdef([the_variable]) popdef([the_option]) ]) dnl CONDUIT_PHYSMEM(default) dnl defines GASNETC_[CONDUIT_NAME]_PHYSMEM_{MAX,PROBE}_CONFIGURE AC_DEFUN([CONDUIT_PHYSMEM],[ pushdef([the_option],--with-[]CONDUIT_NAME[]-physmem-max) GASNET_WITH(CONDUIT_NAME[]-physmem-max, [Maximum physical memory CONDUIT_UPPERNAME may pin: less than 1.0 is fraction of apparent physical memory, larger than 1 is absolute size with optional M, G and T suffix (default is $1)], [if expr "${withval}" : "[[0-9]]" >/dev/null; then : # TODO: stronger validation? AC_DEFINE_UNQUOTED(GASNETC_[]CONDUIT_UPPERNAME[]_PHYSMEM_MAX_CONFIGURE, "$withval") else AC_MSG_ERROR([the_option requires a positive argument]) fi], [AC_MSG_ERROR([the_option requires a positive argument])], [:]) popdef([the_option]) GASNET_IF_ENABLED_WITH_AUTO(CONDUIT_NAME[]-physmem-probe, [Force default enable/disable of GASNET_PHYSMEM_PROBE in CONDUIT_NAME[]-conduit], force_physmem_probe=1, force_physmem_probe=0, force_physmem_probe='') if test -n "$force_physmem_probe"; then AC_DEFINE_UNQUOTED(GASNETC_[]CONDUIT_UPPERNAME[]_PHYSMEM_PROBE_CONFIGURE, $force_physmem_probe) fi ]) dnl CONDUIT_END(test_conduit_enabled) dnl note this may also change enabled_ for (conduit_allow != yes) AC_DEFUN([CONDUIT_END],[ _conduit_enabled_[]CONDUIT_NAME=no if test "$gasnet_toolsonly_mode" = "no" ; then if $1; then case "CONDUIT_IMPLEMENTED" in no) ;; g1) pushdef([EX_UNIMPL_MESSAGE],[It appears your system has the required support for CONDUIT_NAME[]-conduit, however CONDUIT_NAME[]-conduit is not yet fully implemented in this GASNet-EX distribution, If you want to use this conduit, please download the GASNet v1.x distribution from https://gasnet.lbl.gov. Otherwise, you can disable this message with --disable-[]CONDUIT_NAME ]) if test "$force_[]CONDUIT_NAME" = yes ; then GASNET_MSG_ERROR([EX_UNIMPL_MESSAGE]) else # warn and disable enabled_[]CONDUIT_NAME=no GASNET_MSG_WARN([EX_UNIMPL_MESSAGE]) fi popdef([EX_UNIMPL_MESSAGE]) ;; exp) pushdef([EXP_MESSAGE],[CONDUIT_NAME[]-conduit is still experimental, and may have performance and correctness bugs.]) if test "$force_[]CONDUIT_NAME" = yes || test "$enable_[]CONDUIT_NAME" = "probe" ; then GASNET_MSG_WARN([EXP_MESSAGE]) _conduit_enabled_[]CONDUIT_NAME=yes else # warn and disable enabled_[]CONDUIT_NAME=no GASNET_MSG_WARN([It appears your system has the required support for CONDUIT_NAME[]-conduit. However, EXP_MESSAGE You can enable experimental support with --enable-[]CONDUIT_NAME. Otherwise, you can disable this message with --disable-[]CONDUIT_NAME ]) fi popdef([EXP_MESSAGE]) ;; yes) _conduit_enabled_[]CONDUIT_NAME=yes ;; esac else if test "$force_[]CONDUIT_NAME" = yes ; then GASNET_MSG_ERROR([User requested --enable-CONDUIT_NAME but I don't know how to build CONDUIT_NAME programs for your system]) fi if test "$_conduit_reason_[]CONDUIT_NAME" = "auto" ; then _conduit_reason_[]CONDUIT_NAME="not found" fi fi if test "$_conduit_enabled_[]CONDUIT_NAME" = "yes" ; then _conduit_flagstr="ON ($_conduit_reason_[]CONDUIT_NAME)" else _conduit_flagstr="OFF ($_conduit_reason_[]CONDUIT_NAME)" fi _conduit_desc_[]CONDUIT_NAME=" CONDUIT_DESC m4_substr([ ],len(CONDUIT_DESC))$_conduit_flagstr" fi ifelse(CONDUIT_IMPLEMENTED_HELP,[no],[ popdef([GASNET_SUPPRESSHELP]) ]) popdef([CONDUIT_IMPLEMENTED]) popdef([CONDUIT_IMPLEMENTED_HELP]) popdef([CONDUIT_NAME]) popdef([CONDUIT_UPPERNAME]) popdef([CONDUIT_DESC]) ]) dnl CONDUIT_OUTPUT(lowername) AC_DEFUN([CONDUIT_OUTPUT],[ if test "$_conduit_enabled_[]$1" = "yes" ; then CONDUITS="$CONDUITS $1" fi if test "$_conduit_list_[]$1" = "yes" ; then echo "$_conduit_desc_[]$1" >> $CONDUIT_LIST fi ]) AM_CONDITIONAL(TOOLSONLY_MODE, test "$gasnet_toolsonly_mode" = "yes") AM_CONDITIONAL(CONDUIT_MODE, test "$gasnet_toolsonly_mode" = "no") dnl GASNET_TOOLSONLY_TRUE_BEGIN dnl define([GASNET_SUPPRESSHELP],[set]) dnl GASNET_TOOLSONLY_TRUE_END #--------------------------------------------------------------------------------------------------------------- # CODE COMMON TO MULTIPLE CONDUITS #--------------------------------------------------------------------------------------------------------------- dnl find proper CFLAGS for compiling firehose library AC_DEFUN([GASNET_FH_CFLAGS],[ fh_cflags_default="" case "$CC_FAMILY" in GNU) fh_cflags_default="${gcc_flag_prefix}-fno-strict-aliasing";; Pathscale) fh_cflags_default="-fno-strict-aliasing";; Open64) fh_cflags_default="-fno-strict-aliasing";; Clang) fh_cflags_default="-fno-strict-aliasing";; XLC) GASNET_TRY_CFLAG([-qnoansialias -qalias=addr], [fh_cflags_default="-qnoansialias -qalias=addr"]) GASNET_TRY_CFLAG([-qalias=noansi -qalias=addr], [fh_cflags_default="-qalias=noansi -qalias=addr"]) ;; Intel) fh_cflags_default="-no-ansi-alias";; Sun) fh_cflags_default="-xalias_level=any";; NVHPC|PGI) fh_cflags_default="-alias=traditional";; esac GASNET_ENV_DEFAULT(FH_CFLAGS, [$fh_cflags_default], [C flags for building the Firehose memory registration library]) AC_SUBST(FH_CFLAGS) ]) dnl GASNET_ID_OTHER_COMPILER_FAMILY(CCVAR, lang-decr) dnl CCVAR is CXX|MPI_CC AC_DEFUN([GASNET_ID_OTHER_COMPILER_FAMILY],[ pushdef([lowername],translit($1,'A-Z','a-z')) GASNET_FAMILY_CACHE_CHECK([$2], [$1], gasnet_cv_[]lowername[]_family) popdef([lowername]) ]) dnl GASNET_ID_OTHER_COMPILER_PLATFORM(CCVAR, lang-decr) dnl CCVAR is CXX|MPI_CC AC_DEFUN([GASNET_ID_OTHER_COMPILER_PLATFORM],[ GASNET_GET_PLATFORM_ID([$1],[$2 compiler]) mismatch="" if test -z "$[$1]_FAMILY" || test -z "$CC_FAMILY"; then AC_MSG_ERROR([Internal error in ID_OTHER_COMPILER_PLATFORM($1)]) elif test x"$[$1]_FAMILY" != x"$CC_FAMILY"; then mismatch="families" elif test x"$gasnet_cv_PLATFORM_[$1]_VERSION" != x"$gasnet_cv_PLATFORM_COMPILER_VERSION"; then mismatch="version codes" fi if test -n "$mismatch"; then pushdef([outfmt],[$AWK -F'|' '{ printf("%-22s\t%s",[$]2,[$]3); }']) idstr1=`echo "$gasnet_cv_PLATFORM_COMPILER_IDSTR" | outfmt` idstr2=`echo "$gasnet_cv_PLATFORM_[$1]_IDSTR" | outfmt` popdef([outfmt]) GASNET_MSG_WARN([dnl The compiler $mismatch of \$CC and \$[$1] do not match: CC: $idstr1 m4_substr([ ],len([$1]))$1: $idstr2 If this is not what you intended, then set \$[$1] to select a different $2 compiler.]) fi ]) dnl GASNET_LINKHELPER-*: dnl GASNET_LINKHELPER_SETUP(lang-decr) dnl GASNET_LINKHELPER_TRY_{RUN,LINK}(msg,cv_var,includes,body,on_success,on_failure) dnl GASNET_LINKHELPER_CLEANUP() LINKHELPER_BASE=gasnet_conftest_cfunc LINKHELPER_SRC=$LINKHELPER_BASE.c LINKHELPER_OBJ=$LINKHELPER_BASE.o LINKHELPER_LIBS="$LINKHELPER_OBJ $LIBM" LINKHELPER_DECL="extern int linkhelper_cint; extern void linkhelper_cfunc(int val);" LINKHELPER_CODE="linkhelper_cfunc(linkhelper_cint);" if test x"$have_tls" = xyes; then LINKHELPER_TLS_DECL='__thread long tlocal;' LINKHELPER_TLS_CODE='tlocal = 4;' fi AC_DEFUN([GASNET_LINKHELPER_SETUP],[ AC_MSG_CHECKING([building $1 helper object]) cat >$LINKHELPER_SRC <<_GASNET_EOF #include #include #include #include int linkhelper_cint = 0xFFFF; $LINKHELPER_TLS_DECL extern void linkhelper_cfunc(int val) { char s[[255]], s2[[255]]; int a[[40]] = {1}; /* trigger Intel C issue */ assert(val == linkhelper_cint); s[[4]] = '\0'; s[[5]] = (char)(sin((double)val)+cos((double)val))+sqrt((double)val)+log((double)val); strcpy(s2, s); memcpy(s2, s, strlen(s)); memmove(s2, s, strlen(s)); memcpy(s2, s, 4); memmove(s2, s, 4); $LINKHELPER_TLS_CODE } _GASNET_EOF compile="$CC $CFLAGS $CPPFLAGS -c $LINKHELPER_SRC -o $LINKHELPER_OBJ" eval echo "$compile" >&5 if eval $compile 2>&5 && test -s $LINKHELPER_OBJ ; then AC_MSG_RESULT(ok) else GASNET_MSG_ERROR(failed while building $1 helper object) fi ]) AC_DEFUN([GASNET_LINKHELPER_CLEANUP],[ rm -f $LINKHELPER_SRC $LINKHELPER_OBJ ]) AC_DEFUN([GASNET_LINKHELPER_TRY_INNER],[ GASNET_PUSHVAR(LIBS,"$LINKHELPER_LIBS $LIBS") ]GASNET_TRY_CACHE_[$1][($2,$3,[ $4 #ifdef __cplusplus extern "C" { #endif $LINKHELPER_DECL #ifdef __cplusplus } #endif ], [ $LINKHELPER_CODE $5 ],$6,$7) GASNET_POPVAR(LIBS) ]) AC_DEFUN([GASNET_LINKHELPER_TRY_LINK],[GASNET_LINKHELPER_TRY_INNER([LINK],$@)]) AC_DEFUN([GASNET_LINKHELPER_TRY_RUN],[GASNET_LINKHELPER_TRY_INNER([RUN_WITHCC],$@)]) #--------------------------------------------------------------------------------------------------------------- # C++ configuration AC_LANG_SAVE MISC_CXXFLAGS="" # start with a clean slate # Note: autoconf uses CPPFLAGS for both C and C++, so there is NO CXXCPPFLAGS if test "${CXX-__NOT_SET__}" = ""; then have_cxx=no GASNET_MSG_WARN([C++ compiler disabled using --without-cxx]) else # bug 1725: Run GASNET_PROG_CXX with care in case it drops dead (missing C++) # Temporary override of AC_MSG_ERROR is a dirty hack! However, the previous approach # of probing in a subshell eventually ran afoul of autoconf's AC_REQUIRE() rules. pushdef([AC_MSG_ERROR], [have_cxx=no]) have_cxx=yes GASNET_PROG_CXX popdef([AC_MSG_ERROR]) if test "$have_cxx" = no; then GASNET_MSG_WARN([It appears you have no working C++ compiler]) fi if test -n "$CXXFLAGS"; then # embed user-provided CXXFLAGS into CXX for safe-keeping CXX="$CXX $CXXFLAGS" CXXFLAGS="" fi fi if test "$have_cxx" = yes; then AC_LANG_CPLUSPLUS GASNET_ID_OTHER_COMPILER_FAMILY([CXX], [C++]) CXXDEBUGFLAGS="-g" CXXOPTFLAGS="-O2" DEVWARN_CXXFLAGS= GASNET_UDP_LIBS="" gxx_flag_prefix='' gxx_flag_delim=' ' case "$CXX_FAMILY" in GNU) GASNET_GCC_VERSION_CHECK(CXX) case "$CC_SUBFAMILY" in NVIDIA) gxx_flag_prefix='-Xcompiler ' gxx_flag_delim=',' ;; esac case "$target_cpu" in sparc) GASNET_GET_ULTRASPARC_FLAGS(CXX,["-mcpu=ultrasparc3 -mtune=ultrasparc3" "-mcpu=ultrasparc -mtune=ultrasparc"]);; rs6000|powerpc*) GASNET_GET_PPC64_FLAGS(CXX,["-force_cpusubtype_ALL" "-Wa,-mppc64"]);; esac # set CXXDEBUGFLAGS GASNET_PUSHVAR(CXXFLAGS,"${gxx_flag_prefix}-g3") case "$target_os" in darwin*) # Want -gstabs+ instead of -g3, if supported GASNET_TRY_CXXFLAG([${gxx_flag_prefix}-gstabs+], [CXXFLAGS="${gxx_flag_prefix}-gstabs+"]) ;; esac CXXDEBUGFLAGS="$CXXFLAGS" GASNET_POPVAR(CXXFLAGS) ;; NVHPC) # TODO: are either `-M` options, inherited from PGI, still required? # suppress large number of useless default warnings # get inline assembly and sign-extended widening MISC_CXXFLAGS="-w -Masmkeyword -Msignextend" CXXOPTFLAGS="-O1" # TODO: restore -O2 if/when bugs are resolved? (see bug 4158) ;; PGI) MISC_CXXFLAGS="-Masmkeyword -Msignextend" case "$GASNETI_PTR_BITS$target_os" in 64darwin*) # PGI seems to have a different ABI GASNET_TRY_CXXFLAG([-Mllalign], [MISC_CXXFLAGS="$MISC_CXXFLAGS -Mllalign"]) ;; esac GASNET_PGI_VERSION_CHECK(CXX) # DOB: don't force this in client flags by default. The payoff is small and it has potential to break clients # because it's not a valid option for PGI C compilation. GASNET_TRY_CXXFLAG([--display_error_number], [DEVWARN_CXXFLAGS="--display_error_number"]) GASNET_TRY_CXXFLAG([[-Wc,--diag_suppress=177]], [ # Intentionally empty - this is just to test whether surgical warning suppresion is available ], [ MISC_CXXFLAGS="-w $MISC_CXXFLAGS" # old versions of pgc++ have no way to indep control warnings ]) ;; Intel) # Note we need to support both older -wd and newer -diag-disable # Setting CXX_WDFLAG simplifes doing so in later tests GASNET_TRY_CXXFLAG([-diag-disable=654], [CXX_WDFLAG='-diag-disable='], [CXX_WDFLAG='-wd']) MISC_CXXFLAGS="${CXX_WDFLAG}654 ${CXX_WDFLAG}1125 ${CXX_WDFLAG}279" GASNET_TRY_CXXFLAG([${CXX_WDFLAG}1572], [MISC_CXXFLAGS="$MISC_CXXFLAGS ${CXX_WDFLAG}1572"]) ;; XLC) GASNET_GET_PPC64_FLAGS(CXX) GASNET_TRY_CXXFLAG([-qsuppress=1540-0809], # 1540-0809 = empty source file (some linux headers) [MISC_CXXFLAGS="$MISC_CXXFLAGS -qsuppress=1540-0809"]) MISC_CXXFLAGS="$MISC_CXXFLAGS -qeh" ;; Sun) if test "$target_cpu" = "sparc"; then GASNET_GET_ULTRASPARC_FLAGS(CXX,["-xarch=v8plusb" "-xarch=v8plusa" "-xarch=v8plus" "-xarch=sparcvis2" "-xarch=sparcvis" "-xarch=sparc"]) fi CXXOPTFLAGS="-xO2" # Can we go higher to match "-fast -xO5" of CCOPTFLAGS? GASNET_TRY_CXXFLAG([-xlibmopt], [CXXOPTFLAGS="$CXXOPTFLAGS -xlibmopt"]) GASNET_TRY_CXXFLAG([-errtags], [MISC_CXXFLAGS="$MISC_CXXFLAGS -errtags"]) ;; Cray) case "$target_cpu" in x86_64) # XT, XE, XK, XC, etc. CXXDEBUGFLAGS="-g -O0" # consistent with CCDEBUGFLAGS MISC_CXXFLAGS="-hnomessage=236:3185 -hexceptions -hnew_for_init" ;; *) AC_MSG_ERROR(Cray C++ compiler for unknown target CPU) ;; esac ;; Pathscale) GASNET_PATHSCALE_VERSION_CHECK(CXX) CXXDEBUGFLAGS="-g3 -O0" # consistent with CCDEBUGFLAGS CXXOPTFLAGS="-O3" # consistent with CCOPTFLAGS ;; Open64) if test "$GASNETI_PTR_BITS" = 32; then # consistent with CCOPTFLAGS CXXOPTFLAGS="-O1" else CXXOPTFLAGS="-O3 -OPT:wrap_around_unsafe=off" fi CXXDEBUGFLAGS="-g3" ;; Clang) CXXOPTFLAGS="-O3" CXXDEBUGFLAGS="-g -O0" # consistent with CCDEBUGFLAGS ;; esac if test "$BUILDCONFIG" = "optimize" ; then GASNET_OPT_CXXFLAGS="$CXXOPTFLAGS" else GASNET_OPT_CXXFLAGS="$CXXDEBUGFLAGS" fi AC_SUBST(GASNET_OPT_CXXFLAGS) # Add GNU-style warning enable/suppression flags to MISC_CXXFLAGS case "$CXX_FAMILY" in GNU | Pathscale | Open64 | Clang) GASNET_PUSHVAR(CXXFLAGS,"$MISC_CXXFLAGS") GASNET_GET_GNUWARNINGFLAGS(CXX,$CXX_FAMILY,[${gxx_flag_prefix}]) MISC_CXXFLAGS="$CXXFLAGS" GASNET_POPVAR(CXXFLAGS) ;; *) ;; esac if test "$enabled_dev_warnings" = "no" ; then DEVWARN_CXXFLAGS= fi AC_SUBST(DEVWARN_CXXFLAGS) GASNET_ID_OTHER_COMPILER_PLATFORM([CXX], [C++]) # MISC_CXXFLAGS are added to CXXFLAGS here to ensure they are used for the remaining configure tests, # but they retain a separate identity post-configure CXXFLAGS="$GASNET_OPT_CXXFLAGS $MISC_CXXFLAGS" GASNET_CORRECT_OPTIMIZEDDEBUG(CXX,CXXFLAGS,CXX,[$CPPFLAGS],[]) GASNET_ENV_DEFAULT(cxxLIBS,, [Libraries to add when linking C++ code]) GASNET_ENV_DEFAULT(cxxLDFLAGS,, [Linker flags to add when linking C++ code]) GASNET_SPLIT_LINKER_OPTS(cxxLDFLAGS,cxxLIBS) GASNET_UDP_LIBS="$GASNET_UDP_LIBS $cxxLIBS" AC_SUBST(cxxLIBS) AC_SUBST(cxxLDFLAGS) GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $cxxLDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $cxxLIBS") GASNET_TRY_CACHE_VERIFY_RUN( [for working C++ exceptions], cxx_exceptions, [ ], [ try { int *p = new int[[10]]; throw p; return 1; } catch (int *exn) { if (exn) return 0; else return 2; } ], [ "I can\'t figure out how to build and run a program that uses C++ exceptions" ] ) GASNET_CHECK_RESTRICT([GASNETI_CXX],[C++ compiler]) GASNET_CHECK_ASM_SUPPORT([C++ compiler],[CXX]) GASNET_GET_GNU_ATTRIBUTES([GASNETI_HAVE_CXX],[C++ compiler]) GASNET_GET_CXX11_ATTRIBUTES([GASNETI_HAVE_CXX],[C++ compiler]) GASNET_CHECK_BUILTINS([GASNETI_HAVE_CXX],[C++ compiler]) GASNET_TRY_CACHE_CHECK(for __VA_ARGS__ support in C++, cxx_va_args, [ GASNET_VA_ARGS_TEST ], [ ], [ AC_DEFINE(GASNETI_CXX_HAS_VA_ARGS) ]) # we link in an object compiled with CC that uses libc, to ensure that's working # [at least initially this is almost a clone of the MPI helper test] GASNET_LINKHELPER_SETUP([C++]) # Now try to link/run the helper (which was built earlier) GASNET_LINKHELPER_TRY_RUN(for working C++ to C linkage, cxx_works, [], [], [ cxx_helper_worked=yes ], [ cxx_helper_worked=no; GASNET_ERR_SAVE() ] ) # Apple's gcc/g++ don't provide TLS support, but the FSF gcc/g++ do. # The two are link compatible IF we explicitly pass -lgcc_eh # XXX: Really only needed for PAR and PARSYNC, but we don't distinguish. if test "$cxx_helper_worked$have_tls$CC_FAMILY" = noyesGNU; then LIBS="$LIBS $LIBGCC -lgcc_eh" # $LIBGCC appears in $GASNET_LIBS eventually GASNET_LINKHELPER_TRY_RUN(for working C++ to C linkage w/ added -lgcc_eh, cxx_works_gcc_eh, [],[], [ cxx_helper_worked=yes GASNET_UDP_LIBS="$GASNET_UDP_LIBS -lgcc_eh" ], [ cxx_helper_worked=no; GASNET_ERR_SAVE() ] ) fi if test "$cxx_helper_worked" = no; then have_cxx=no GASNET_MSG_WARN([It appears your C++ and C compilers are not link-compatible]) fi GASNET_LINKHELPER_CLEANUP() GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(LIBS) AC_SUBST(MISC_CXXFLAGS) fi AC_LANG_RESTORE AM_CONDITIONAL(HAVE_CXX, test "$have_cxx" = yes) if test "$have_cxx" = no; then GASNET_MSG_WARN([Disabling udp-conduit, which requires C++]) fi #--------------------------------------------------------------------------------------------------------------- # CONDUIT CONFIGURATIONS #--------------------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------------------- # UDP/AMUDP Configuration CONDUIT_BEGIN(udp,yes,[Portable UDP/IP conduit (udp)]) if test "$enabled_udp" = yes; then if test "$have_cxx" = yes; then # detect libraries necessary for udp-* backends GASNET_PUSHVAR(LIBS,"") AC_SEARCH_LIBS(socket, socket, have_udp=yes, have_udp=no) AC_SEARCH_LIBS(gethostbyname, nsl, , have_udp=no) GASNET_UDP_LIBS="$GASNET_UDP_LIBS $LIBS" # Note: getifaddrs may need -lsocket and -lnsl, but we caught those above AC_CHECK_HEADERS(ifaddrs.h) AC_CHECK_FUNCS(getifaddrs) if test "$have_udp" = yes ; then AC_MSG_CHECKING(for working UDP configuration) # TODO: add a basic test of the UDP configuration to make sure it works # this is a mess because every OS has different headers required udp_test_worked=yes if test "$udp_test_worked" = yes ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) GASNET_MSG_WARN(build test failed: I don't know how to build UDP programs on your system) have_udp=no fi fi GASNET_POPVAR(LIBS) if test "$have_udp" = yes ; then GASNET_ENV_DEFAULT(GASNET_CSPAWN_CMD, "", [See udp-conduit/README]) if test "$GASNET_CSPAWN_CMD" != "" ; then AC_DEFINE_UNQUOTED(GASNET_CSPAWN_CMD, "$GASNET_CSPAWN_CMD") fi fi else have_udp=no fi fi AC_SUBST(GASNET_UDP_LIBS) CONDUIT_END([test "$enabled_udp$have_udp" = yesyes]) AM_CONDITIONAL(USE_UDP_CONDUIT, test "$enabled_udp$have_udp" = yesyes) #--------------------------------------------------------------------------------------------------------------- # MPI/AMMPI Configuration dnl GASNET_TOOLSONLY_FALSE_BEGIN # --enable-mpi-compat controls MPI compatibility in all conduits GASNET_HELP_OUTPUT([ MPI compatibility options:]) GASNET_IF_ENABLED_WITH_AUTO(mpi-compat, Enable/disable MPI compatibility in all conduits (auto-detected), [enabled_mpi_compat=yes;force_mpi_compat=yes], enabled_mpi_compat=no, enabled_mpi_compat=yes) dnl GASNET_TOOLSONLY_FALSE_END # --enable-mpi controls mpi-conduit CONDUIT_BEGIN(mpi,yes,[Portable MPI conduit (mpi)]) if test "$enabled_mpi" = yes || test "$enabled_mpi_compat" = yes; then # user can explicitly configure MPI by setting MPI_CC, MPI_CFLAGS and MPI_LIBS # First step is to provide sane defaults when the user gave us nothing have_mpi=yes # start by assuming they have it DEFAULT_MPI_CFLAGS="$GASNET_OPT_CFLAGS" # default flags, assuming they are the same compiler if false ; then # just for help strings GASNET_ENV_DEFAULT(MPI_CC,, [[The MPI C compiler wrapper]]) GASNET_ENV_DEFAULT(MPI_CFLAGS,, [[Flags to add when compiling MPI C code (overrides auto-detected default)]]) GASNET_ENV_DEFAULT(MPI_LIBS,, [[Libraries to add to the MPI link line]]) GASNET_ENV_DEFAULT(MPIRUN_CMD,, [[Command template for running MPI programs, see mpi-conduit/README for syntax]]) fi case "$target_os" in linux*) if test -n "$GASNETI_ARCH_IBMPE"; then gasnet_mpcc="mpcc -m$GASNETI_PTR_BITS" case "$CC_FAMILY" in GNU) gasnet_mpcc="$gasnet_mpcc -compiler gnu";; XLC) gasnet_mpcc="$gasnet_mpcc -compiler xl";; Intel) gasnet_mpcc="$gasnet_mpcc -compiler intel";; PGI) gasnet_mpcc="$gasnet_mpcc -compiler pgi";; Pathscale) gasnet_mpcc="$gasnet_mpcc -compiler ekopath";; esac GASNET_ENV_DEFAULT(MPI_CC, $gasnet_mpcc) GASNET_ENV_DEFAULT(MPI_LIBS, ) GASNET_ENV_DEFAULT(MPIRUN_CMD, env PAGER=cat MP_FENCE=-- poe %P -nodes %M -procs %N -use_bulk_xfer yes -- %A) else GASNET_ENV_DEFAULT(MPI_CC, mpicc) GASNET_ENV_DEFAULT(MPI_LIBS, ) GASNET_ENV_DEFAULT(MPIRUN_CMD, mpirun -np %N %C) fi ;; *) # unknown OS - if user doesn't provide info, assume generic settings that often work GASNET_ENV_DEFAULT(MPI_CC, mpicc) GASNET_ENV_DEFAULT(MPI_LIBS, ) GASNET_ENV_DEFAULT(MPIRUN_CMD, mpirun -np %N %C) ;; esac if test -z "$MPI_CC" ; then # Avoid unecessary and potentially confusing probes and their errors/warnings have_mpi=no mpi_reason="was disabled" else GASNET_GETFULLPATH(MPI_CC) if command -v $MPI_CC > /dev/null 2>&1; then # figure out a reasonable fallback MPI_CFLAGS for this arch/OS and C99 support # this is complicated by the fact that $MPI_CC may be a different compiler than $CC GASNET_PUSHVAR(CC,"$MPI_CC") GASNET_PUSHVAR(CFLAGS,"") GASNET_PUSHVAR(CPPFLAGS,"") GASNET_PUSHVAR(MISC_CFLAGS,"") GASNET_PUSHVAR(MISC_CPPFLAGS,"") GASNET_PUSHVAR(DEVWARN_CFLAGS,"") AC_MSG_CHECKING(if $MPI_CC appears functional) AC_TRY_COMPILE([],[],[AC_MSG_RESULT(yes)],[ AC_MSG_RESULT(no) have_mpi=no mpi_reason="compile test failed" GASNET_MSG_WARN([MPI compiler "$MPI_CC" does not appear to be functional. Consider passing --with-mpi-cc=/path/to/mpicc if you want mpi-conduit or require MPI compatibility]) ]) if test $have_mpi = yes; then GASNET_ID_OTHER_COMPILER_FAMILY([MPI_CC], [MPI]) if test "$BUILDCONFIG" = "debug" ; then SAFE_MPI_CFLAGS="-g" else SAFE_MPI_CFLAGS="-O" fi GASNET_SET_CHECKED_CFLAGS(MPI_CC, MPI_CFLAGS, $DEFAULT_MPI_CFLAGS, $SAFE_MPI_CFLAGS) GASNET_PUSHVAR(CC_FAMILY,"$MPI_CC_FAMILY") GASNET_PUSHVAR(CC,"$MPI_CC $MPI_CFLAGS") # detect MISC for append to user's flags # we re-detect miscflags for MPI_CC, because it may differ from CC GASNET_SET_MISCFLAGS(MPI_CC, [ GASNET_C99_TEST ]) MPI_MISCFLAGS="$MISC_CFLAGS $MISC_CPPFLAGS" GASNET_POPVAR(CC) GASNET_POPVAR(CC_FAMILY) DEVWARN_MPI_CFLAGS="$DEVWARN_CFLAGS" AC_SUBST(DEVWARN_MPI_CFLAGS) MPI_CFLAGS="$GASNET_EXTRA_DEFINES $MPI_CFLAGS $MPI_MISCFLAGS" CFLAGS="$MPI_CFLAGS" # for platform check GASNET_ID_OTHER_COMPILER_PLATFORM([MPI_CC], [MPI]) fi GASNET_POPVAR(CC) GASNET_POPVAR(CFLAGS) GASNET_POPVAR(CPPFLAGS) GASNET_POPVAR(MISC_CFLAGS) GASNET_POPVAR(MISC_CPPFLAGS) GASNET_POPVAR(DEVWARN_CFLAGS) else GASNET_MSG_WARN([MPI compiler "$MPI_CC" was not found. Consider passing --with-mpi-cc=/path/to/mpicc if you want mpi-conduit or require MPI compatibility]) # Avoid unecessary and potentially confusing probes and their errors/warnings MPI_CC= have_mpi=no mpi_reason="was not found" fi fi if test $have_mpi = yes; then GASNET_GETFULLPATH(MPIRUN_CMD) fi # now run a basic test of the MPI configuration to make sure it works if test $have_mpi = yes; then # we link in an object compiled with CC that uses libc, to ensure that's working GASNET_LINKHELPER_SETUP(MPI) # we need a clean slate here because MPI config may be totally different GASNET_PUSHVAR(CC,"$MPI_CC") GASNET_PUSHVAR(CFLAGS,"$MPI_CFLAGS") GASNET_PUSHVAR(CPPFLAGS,"") GASNET_PUSHVAR(LDFLAGS,"") GASNET_PUSHVAR(LIBS,"$MPI_LIBS") # we just try to link an MPI app - running MPI apps is a whole new can of worms pushdef([mpi_header],[ #include #ifdef __cplusplus #error MPI_CC must be a true MPI-enabled ANSI C compiler - a C++ compiler is not an acceptable replacement. #endif ]) pushdef([mpi_body],[ MPI_Init((void*)0,(void*)0); MPI_Finalize(); ]) GASNET_LINKHELPER_TRY_LINK(for working MPI configuration, mpi_works, mpi_header, mpi_body, [ mpi_test_worked=yes ], [ mpi_test_worked=no GASNET_ERR_SAVE() ] ) # Apple's gcc (and thus their mpicc) doesn't provide TLS support, but the # FSF gcc does. The two are link compatible IF we explicitly pass -lgcc_eh # XXX: Really only needed for PAR and PARSYNC, but we don't distinguish. if test "$mpi_test_worked$have_tls$CC_FAMILY" = noyesGNU; then LIBS="$LIBS $LIBGCC -lgcc_eh" # $LIBGCC appears in $GASNET_LIBS eventually GASNET_LINKHELPER_TRY_LINK(for working MPI configuration w/ added -lgcc_eh, mpi_works_gcc_eh, mpi_header, mpi_body, [ mpi_test_worked=yes MPI_LIBS="$MPI_LIBS -lgcc_eh" ], [ mpi_test_worked=no GASNET_ERR_SAVE() ] ) fi GASNET_LINKHELPER_CLEANUP() popdef([mpi_body]) if test "$mpi_test_worked" = yes ; then GASNET_CHECK_RESTRICT([GASNETI_MPI_CC],[MPI_CC]) GASNET_CHECK_ASM_SUPPORT([MPI_CC],[MPI_CC]) GASNET_INLINE_MODIFIER([MPI_CC],[MPI_CC]) GASNET_GET_GNU_ATTRIBUTES([GASNETI_HAVE_MPI_CC],[MPI_CC]) GASNET_CHECK_BUILTINS([GASNETI_HAVE_MPI_CC],[MPI_CC]) if test "$cross_compiling" = "yes" ; then GASNET_TRY_CACHE_EXTRACT_EXPR([MPI_CC for value of MPI_VERSION (binary probe)],MPI_VERSION,mpi_header,MPI_VERSION,GASNETI_MPI_VERSION) if test -z "$GASNETI_MPI_VERSION" ; then # last resort is to use CROSS var GASNET_CROSS_VAR(GASNETI_MPI_VERSION,MPI_VERSION) fi else GASNET_TRY_CACHE_RUN_EXPR([MPI_CC for value of MPI_VERSION], MPI_VERSION, mpi_header, [val = MPI_VERSION;], GASNETI_MPI_VERSION) fi if test -z "$GASNETI_MPI_VERSION" || test 0 = "$GASNETI_MPI_VERSION" ; then # probe failed, assume worst-case MPI-1 GASNETI_MPI_VERSION=1 fi AC_DEFINE_UNQUOTED([GASNETI_MPI_VERSION],[$GASNETI_MPI_VERSION]) # confirm MPI_CC has a working C99 environment (enough to parse gasnet.h) GASNET_TRY_CACHE_CHECK(for working GASNet-required ISO C99 subset in MPI_CC, mpi_gasnet_c99_subset, [ GASNET_C99_TEST ], [], [], [ mpi_test_worked=no GASNET_MSG_WARN(Unable to find sufficient C99 support features in $MPI_CC to build GASNet. You may need to append flags in \$MPI_CC or \$MPI_CFLAGS to enable C99 support) ]) GASNET_TRY_CACHE_LINK(for MPI_Init_thread, have_mpi_init_thread, mpi_header, [{ int required1 = MPI_THREAD_SINGLE; int required2 = MPI_THREAD_FUNNELED; int required3 = MPI_THREAD_SERIALIZED; int required4 = MPI_THREAD_MULTIPLE; int provided = -1; int err = MPI_Init_thread((void*)0,(void*)0,required1,&provided); }], [ AC_DEFINE(HAVE_MPI_INIT_THREAD) ]) GASNET_TRY_CACHE_LINK(for MPI_Query_thread, have_mpi_query_thread, mpi_header, [{ int provided = -1; int err = MPI_Query_thread(&provided); }], [ AC_DEFINE(HAVE_MPI_QUERY_THREAD) ]) else # bug 3443: MPI_CC was rejected, so don't cache information about that compiler # there is no way to "AC_UNDEF" so just ensure compiler mismatch AC_DEFINE(GASNETI_PLATFORM_MPI_CC_ID, 999999) AC_DEFINE(GASNETI_PLATFORM_MPI_CC_FAMILYID, 999999) AC_DEFINE(GASNETI_PLATFORM_MPI_CC_VERSION, 999999) AC_DEFINE(GASNETI_PLATFORM_MPI_CC_IDSTR, "MPI_CC-compiler-rejected") fi GASNET_POPVAR(CC) GASNET_POPVAR(CFLAGS) GASNET_POPVAR(CPPFLAGS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(LIBS) fi if test "$mpi_test_worked" = yes ; then GASNET_CORRECT_OPTIMIZEDDEBUG(MPI_CC,MPI_CFLAGS,MPI_CFLAGS,[], mpi_header, [, or consider passing --without-mpi-cc if an MPI compiler is not required.]) elif test "$mpi_reason" = ""; then GASNET_MSG_WARN([build test failed: I don't know how to build MPI programs on your system -- see $TOP_BUILDDIR/config.log for details: consider setting \$MPI_CC \$MPI_CFLAGS and \$MPI_LIBS to configure MPI support for your site if you want mpi-conduit or require MPI compatibility]) have_mpi=no fi if test "$have_mpi$mpi_reason" = no ; then mpi_reason="was not found" fi if test "$have_mpi" = no ; then # bug 3443: MPI_CC was rejected, ensure we don't cache (potentially incomplete) info about that compiler # there is no way to "AC_UNDEF" so just ensure compiler mismatch AC_DEFINE(GASNETI_PLATFORM_MPI_CC_ID, 999999) AC_DEFINE(GASNETI_PLATFORM_MPI_CC_FAMILYID, 999999) AC_DEFINE(GASNETI_PLATFORM_MPI_CC_VERSION, 999999) AC_DEFINE(GASNETI_PLATFORM_MPI_CC_IDSTR, "MPI_CC-compiler-rejected") fi popdef([mpi_header]) else have_mpi=no mpi_reason="was disabled" fi AC_SUBST(MPI_CC) # compiler to be used to build AMMPI, and linker for AMMPI-based backends AC_SUBST(MPI_CFLAGS) # compiler flags (optimization, includes, etc) to be used with above compiler when building AMMPI AC_SUBST(MPI_LIBS) # libs and ldflags that must be used when linking AMMPI-based backend # we don't currently GASNET_SPLIT_LINKER_OPTS on MPI_LIBS into MPI_LDFLAGS (which doesn't exist) because # a client can't portably replace the MPI_CC in GASNET_LD and still have a working MPI-enabled link AC_SUBST(MPIRUN_CMD) # prototype command used by gasnetrun to run MPI programs CONDUIT_END([test "$enabled_mpi$have_mpi" = yesyes]) AM_CONDITIONAL(USE_MPI_CONDUIT, test "$enabled_mpi$have_mpi" = yesyes) if test "$enabled_mpi$have_mpi" = yesyes; then have_ammpi=yes fi AM_CONDITIONAL(USE_AMMPI, test "$have_ammpi" = yes) if test "$force_mpi_compat$have_mpi" = yesno ; then GASNET_MSG_ERROR(User requested --enable-mpi-compat but I don't know how to build MPI programs for your system) fi if test "$enabled_mpi_compat$have_mpi" = yesyes ; then have_mpi_compat=yes else have_mpi_compat=no if test "$have_mpi" = yes; then mpi_compat_reason="was disabled" else mpi_compat_reason="$mpi_reason" fi fi AM_CONDITIONAL(USE_MPI_COMPAT, test "$have_mpi_compat" = yes) # USE_MPI == MPI-compatbility or MPI-conduit AM_CONDITIONAL(USE_MPI, test "$have_mpi" = yes) #----------------------------------------------------------------------------------------------- # SMP configuration CONDUIT_BEGIN(smp,yes,[Portable SMP-loopback conduit (smp)]) if test "$enabled_smp" = yes; then if test x"$with_pshm" != xno; then dnl TODO: factor socket related probes AC_CHECK_HEADERS(sys/socket.h) case "$target_os" in solaris*) GASNET_PUSHVAR(LIBS,"") AC_SEARCH_LIBS(socket, socket, have_smp_libs=yes, have_smp_libs=no) if test "x$have_smp_libs" = xyes ; then SMP_LIBS="$LIBS" fi GASNET_POPVAR(LIBS) ;; esac GASNET_PUSHVAR(LIBS,"$LIBS $SMP_LIBS") GASNET_TRY_CACHE_RUN_WITHCC([for socketpair() support], socketpair_works, [ #include #if defined(HAVE_SYS_TYPES_H) #include #endif #if defined(HAVE_SYS_SOCKET_H) #include #endif ], [[ int rc, sv[2]; #if defined(PF_LOCAL) rc = socketpair(PF_LOCAL, SOCK_STREAM, 0, sv); #elif defined(PF_UNIX) rc = socketpair(PF_UNIX, SOCK_STREAM, 0, sv); #else #error #endif if (rc < 0) return 1; ]], [ socketpair_test_worked=yes ], [ socketpair_test_worked=no ]) if test "$socketpair_test_worked" = yes; then AC_DEFINE(GASNETC_USE_SOCKETPAIR) else SMP_LIBS="" fi GASNET_TRY_CACHE_RUN_WITHCC([for O_ASYNC support], o_async_works, [ #include #include #if defined(HAVE_SYS_TYPES_H) #include #endif #if defined(HAVE_SYS_SOCKET_H) #include #endif #include ], [[ int rc, sv[2]; #if !defined(GASNETC_USE_SOCKETPAIR) rc = pipe(sv); #elif defined(PF_LOCAL) rc = socketpair(PF_LOCAL, SOCK_STREAM, 0, sv); #elif defined(PF_UNIX) rc = socketpair(PF_UNIX, SOCK_STREAM, 0, sv); #else #error #endif if (rc < 0) return 1; rc = fcntl(sv[0], F_GETFL); if (rc < 0) return 1; rc = fcntl(sv[0], F_SETFL, rc | O_ASYNC); if (rc < 0) return 1; if (SIGIO == 0) return 1; rc = fcntl(sv[0], F_SETOWN, getpid()); if (rc < 0) return 1; ]], [ o_async_test_worked=yes ], [ o_async_test_worked=no ]) if test "$o_async_test_worked" = yes; then AC_DEFINE(GASNETC_HAVE_O_ASYNC) fi GASNET_POPVAR(LIBS) fi dnl TODO: reduce duplication w/ CONDUIT_SPAWNER GASNET_WITH(smp-spawner, [smp job spawner ("fork", "ssh", "mpi" or "pmi", default is fork)], [case "$withval" in fork|ssh|mpi|pmi) gasnet_spawner_conf=$withval ;; yes) AC_MSG_ERROR([--with-smp-spawner requires an argument ("fork", "ssh", "mpi" or "pmi")]) ;; *) AC_MSG_ERROR([--with-smp-spawner argument must be "fork", "ssh", "mpi" or "pmi"]) ;; esac], [AC_MSG_ERROR([--with-smp-spawner argument must be "fork", "ssh", "mpi" or "pmi"])], [gasnet_spawner_conf=fork]) if test "$gasnet_spawner_conf$have_mpi_compat" = mpino; then AC_MSG_ERROR([--with-smp-spawner=mpi requires MPI compatibility support which $mpi_compat_reason]) elif test "$gasnet_spawner_conf" = pmi; then force_pmi=yes fi AC_DEFINE_UNQUOTED(GASNETC_SMP_SPAWNER_CONF, "$gasnet_spawner_conf") GASNET_SMP_SPAWNER_CONF=$gasnet_spawner_conf AC_SUBST(GASNET_SMP_SPAWNER_CONF) unset gasnet_spawner_conf fi AC_SUBST(SMP_LIBS) CONDUIT_END([test "$enabled_smp" = yes]) AM_CONDITIONAL(USE_SMP_CONDUIT, test "$enabled_smp" = yes) #-------------------------------------------------------------------------------------------------------- # UCX configuration # CONDUIT_BEGIN(ucx,exp,[Unified Communication X conduit (ucx)]) CONDUIT_DISALLOW_SEGMENT(everything) if test "$enabled_ucx" = no; then : elif test "$have_fork" = no; then GASNET_MSG_WARN([ucx-conduit requires fork() ($fork_reason) for startup - disabling ucx]) elif test "$have_pthread" = no; then GASNET_MSG_WARN([ucx-conduit requires libpthread ($pthread_reason) - disabling ucx]) else # # Either UCX was required explicitly, or we just need to probe for its existence # have_ucx=yes # assume success CONDUIT_HOME([UCX library], [ucx_info], [/opt/mellanox/ucx], [include/ucp/api/ucp.h]) CONDUIT_CFLAGS GASNET_ENV_DEFAULT(UCX_LIBS, -lucp -lucs -luct -lucm) CONDUIT_LDFLAGS(ucp) GASNET_SPLIT_LINKER_OPTS(UCX_LDFLAGS,UCX_LIBS) # Try to compile and link a basic UCX program GASNET_PUSHVAR(CFLAGS,"$CFLAGS $UCX_CFLAGS") GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $UCX_LDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $UCX_LIBS") GASNET_TRY_CACHE_LINK(for working UCX configuration, ucx_works, [ #include ], [{ unsigned major_version, minor_version, release_number; ucp_get_version(&major_version, &minor_version, &release_number); }], [ : ], [ have_ucx=no; GASNET_ERR_SAVE() ] ) GASNET_POPVAR(CFLAGS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(LIBS) ucx_max_med_dflt=`expr 65536 - 16 - 64` # 16 = fixed Medium header, 64 = 16x 4-byte args GASNET_WITH(ucx-max-medium,[Specify gex_LUB*Medium() for ucx-conduit (default $ucx_max_med_dflt)], [if expr "$withval" : '[[0-9]]*$' >/dev/null 2>&1 && \ expr "$withval" '>=' 512 >/dev/null 2>&1 ; then ucx_max_medium="$withval" else AC_MSG_ERROR([--with-ucx-max-medium="$withval" is not legal. Value must no smaller than 512.]) fi], [AC_MSG_ERROR([--with-ucx-max-medium must be no smaller than 512])], [ucx_max_medium=$ucx_max_med_dflt]) AC_DEFINE_UNQUOTED(GASNETC_UCX_MAX_MEDIUM_DFLT, [$ucx_max_medium]) CONDUIT_SPAWNER fi AC_SUBST(UCX_CFLAGS) AC_SUBST(UCX_LDFLAGS) AC_SUBST(UCX_LIBS) CONDUIT_END([test "$enabled_ucx$have_ucx" = yesyes]) AM_CONDITIONAL(USE_UCX_CONDUIT, test "$enabled_ucx$have_ucx" = yesyes) #-------------------------------------------------------------------------------------------------------- # IBV configuration CONDUIT_BEGIN(ibv,yes,[InfiniBand IB Verbs conduit (ibv)]) if test "$enabled_ibv$have_mpi_compat$have_fork" = yesnono; then enabled_ibv=no GASNET_MSG_WARN([ibv-conduit requires either MPI compatibility ($mpi_compat_reason) or fork() ($fork_reason) for startup - disabling ibv]) fi if test "$enabled_ibv" = yes; then # Start by assuming we do have IBV have_ibv=yes CONDUIT_HOME([IB Verbs library], [ibv_devinfo], [/usr/local/ofed /opt/ofed], [include/infiniband/verbs.h]) CONDUIT_CFLAGS GASNET_ENV_DEFAULT(IBV_LIBS, -libverbs) CONDUIT_LDFLAGS(ibverbs) GASNET_SPLIT_LINKER_OPTS(IBV_LDFLAGS,IBV_LIBS) # Try to compile and link a basic IB Verbs program GASNET_PUSHVAR(CFLAGS,"$CFLAGS $IBV_CFLAGS $GASNET_THREAD_DEFINES") GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $IBV_LDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $IBV_LIBS $GASNET_THREAD_LIBS") pushdef([INCLUDE_VERBS_H],[ #if defined(__GNUC__) && !defined(inline) /* ANSI-ify the verbs headers */ #define inline __inline__ #include #undef inline #else #include #endif ]) GASNET_TRY_CACHE_LINK(for working IB Verbs configuration, ibv_works, [ INCLUDE_VERBS_H ], [{ struct ibv_device device; const char *s = ibv_get_device_name(&device); }], [ : ], [ have_ibv=no; GASNET_ERR_SAVE() ] ) # For all platforms of interest, compiler is equivalent to native AC_MSG_CHECKING(for appropriate atomics support required by ibv-conduit) CHECK_ATOMICS([native compiler],[ AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) GASNET_MSG_WARN([ibv-conduit requires native atomicops, but $check_atomics_msg]) have_ibv=no ]) if test "$have_ibv" = yes; then GASNET_TRY_CACHE_LINK(for ibv_device.transport_type, ibv_transport_type, [ INCLUDE_VERBS_H ], [ struct ibv_device device; device.transport_type = IBV_TRANSPORT_IB; ], [ AC_DEFINE(HAVE_IBV_TRANSPORT_TYPE) ] ) AC_CHECK_FUNCS(ibv_wc_status_str) GASNET_TRY_CACHE_LINK(for ibv_create_qp_ex, have_ibv_create_qp_ex, [ INCLUDE_VERBS_H ], [ (void) ibv_create_qp_ex(NULL, NULL); ], [ AC_DEFINE(HAVE_IBV_CREATE_QP_EX) ] ) fi popdef([INCLUDE_VERBS_H]) GASNET_POPVAR(CFLAGS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(LIBS) if test "$have_ibv" = yes; then # XXX: Need to support older (get_devices) interface at some point? #GASNET_PUSHVAR(LIBS,"$LIBS $IBV_LDFLAGS") #AC_SEARCH_LIBS(ibv_get_device_list, ibverbs, AC_DEFINE(HAVE_IBV_GET_DEVICE_LIST)) #AC_SEARCH_LIBS(ibv_get_devices, ibverbs, AC_DEFINE(HAVE_IBV_GET_DEVICES)) #GASNET_POPVAR(LIBS) # Since we are using firehose we need to disable certain optimizations. # See bug #350 for an example of why firehose needs this. # See bug #596 or #1031 for evidence that InfiniBand is affected by this. # See bug #1052 for evidence that xlc is affected. GASNET_FH_CFLAGS # Collect IB-specifc configure options GASNET_IF_DISABLED([ibv-atomics], [Disable atomics offload support in ibv-conduit (enabled by default in FAST segment mode)], [:], [if test "$segconfig" = fast; then AC_DEFINE(GASNETC_IBV_ATOMICS_CONFIGURE) fi]) GASNET_IF_ENABLED_WITH_AUTO(ibv-rcv-thread, [See ibv-conduit/README (enabled by default if pthreads available)], [enabled_ibv_rcv_thread=yes if test "$have_pthread" = no; then AC_MSG_ERROR([--enable-ibv-rcv-thread requires pthread support but pthreads $pthread_reason]) fi], [enabled_ibv_rcv_thread=no], [enabled_ibv_rcv_thread=$have_pthread]) if test "$enabled_ibv_rcv_thread" = yes; then AC_DEFINE(GASNETC_IBV_RCV_THREAD) fi GASNET_IF_ENABLED_WITH_AUTO(ibv-snd-thread, [See ibv-conduit/README (enabled by default if pthreads available)], [enabled_ibv_snd_thread=yes if test "$have_pthread" = no; then AC_MSG_ERROR([--enable-ibv-snd-thread requires pthread support but pthreads $pthread_reason]) fi], [enabled_ibv_snd_thread=no], [enabled_ibv_snd_thread=$have_pthread]) if test "$enabled_ibv_snd_thread" = yes; then AC_DEFINE(GASNETC_IBV_SND_THREAD) fi GASNET_IF_ENABLED_WITH_AUTO(ibv-conn-thread, [See ibv-conduit/README (enabled by default if pthreads available)], [enabled_ibv_conn_thread=yes if test "$have_pthread" = no; then AC_MSG_ERROR([--enable-ibv-conn-thread requires pthread support but pthreads $pthread_reason]) fi], [enabled_ibv_conn_thread=no], [enabled_ibv_conn_thread=$have_pthread]) if test "$enabled_ibv_conn_thread" = yes; then AC_DEFINE(GASNETC_IBV_CONN_THREAD) fi CONDUIT_SPAWNER # Multirail support options # ibv-conduit/README explains the interactions gasnetc_ibv_max_hcas=2 enabled_ibv_multirail=no GASNET_WITH(ibv-max-hcas, [Maximum number of IBV HCAs to open (default is 1)], [if expr "${withval}" : "[[1-9]][[0-9]]*" >/dev/null; then gasnetc_ibv_max_hcas="$withval" enabled_ibv_multirail=yes else AC_MSG_ERROR([--with-ibv-max-hcas requires a positive integer argument]) fi], [AC_MSG_ERROR([--with-ibv-max-hcas requires a positive integer argument])], [:]) GASNET_IF_ENABLED_WITH_AUTO(ibv-multirail, [Enable IBV over multiple HCAs. Use of --with-ibv-max-hcas=N is prefered (see ibv-conduit/README for more info).], enabled_ibv_multirail=yes, enabled_ibv_multirail=no) if test "$enabled_ibv_multirail" = yes; then AC_DEFINE_UNQUOTED(GASNETC_IBV_MAX_HCAS_CONFIGURE, $gasnetc_ibv_max_hcas) fi ibv_fenced_puts=0 GASNET_WITH(ibv-fenced-puts, [Default value of GASNET_USE_FENCED_PUTS environment variable for ibv-conduit (default is 0)], [ case $withval in yes) ibv_fenced_puts=1;; 0|1) ibv_fenced_puts=$withval;; *) AC_MSG_ERROR([Optional argument to --with-ibv-fenced-puts must be 0 or 1]);; esac], [ibv_fenced_puts=0], [ibv_fenced_puts=1]) AC_DEFINE_UNQUOTED(GASNETC_IBV_FENCED_PUTS_CONFIGURE, $ibv_fenced_puts) # Default GASNET_IBV_PORTS GASNET_WITH(ibv-ports, [Default value of GASNET_IBV_PORTS environment variable (default is empty)], [if test "$withval" = 'yes'; then AC_MSG_ERROR([--with-ibv-ports requires an argument]) else AC_DEFINE_UNQUOTED(GASNETC_IBV_PORTS_CONFIGURE, "$withval") fi]) CONDUIT_PHYSMEM("2/3") GASNET_IF_DISABLED([ibv-srq], [Disable Shared Receive Queue (SRQ) support in ibv-conduit (enabled by default)], [enabled_ibv_srq=no], [AC_DEFINE(HAVE_IBV_SRQ)]) GASNET_IF_ENABLED_WITH_AUTO([ibv-xrc], [Enable/disable eXtended Reliable Connection (XRC) support in ibv-conduit (default is to probe)], [enabled_ibv_xrc="yes"; force_ibv_xrc="yes"], [enabled_ibv_xrc="no"], [enabled_ibv_xrc="yes"]) if test "x$enabled_ibv_srq" = xno; then if test "x$force_ibv_xrc" = xyes; then GASNET_MSG_ERROR([IBV XRC support was requested with --enable-ibv-xrc but requires SRQ support which has been disabled]) fi elif test "x$with_pshm" = xno; then if test "x$force_ibv_xrc" = xyes; then GASNET_MSG_ERROR([IBV XRC support was requested with --enable-ibv-xrc but requires PSHM support which is not enabled]) fi elif test "$enabled_ibv_xrc" = yes; then GASNET_PUSHVAR(LIBS,"$LIBS $IBV_LDFLAGS $IBV_LIBS $GASNET_THREAD_LIBS") AC_CHECK_FUNCS([ibv_open_xrc_domain ibv_cmd_open_xrcd], [have_ibv_xrc=yes], [have_ibv_xrc=no]) GASNET_POPVAR(LIBS) if test "$have_ibv_xrc$force_ibv_xrc" = noyes; then GASNET_MSG_ERROR([IBV XRC support was requested with --enable-ibv-xrc but is not available]) fi fi GASNET_IF_ENABLED_WITH_AUTO([ibv-odp], [Enable/disable On Demand Paging (ODP) support in ibv-conduit (default is to probe)], [enabled_ibv_odp="yes"; force_ibv_odp="yes"], [enabled_ibv_odp="no"; AC_DEFINE(GASNETC_IBV_ODP_DISABLED)], [enabled_ibv_odp="yes"]) if test "$enabled_ibv_odp" = yes; then have_ibv_odp=no GASNET_PUSHVAR(CFLAGS,"$CFLAGS $IBV_CFLAGS $GASNET_THREAD_DEFINES") GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $IBV_LDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $IBV_LIBS $GASNET_THREAD_LIBS") GASNET_TRY_CACHE_LINK([for ibv ODP support (Mellanox)], ibv_odp_support_mlnx, [ #include ], [ struct ibv_exp_device_attr attr; attr.comp_mask = IBV_EXP_DEVICE_ATTR_ODP | IBV_EXP_DEVICE_ATTR_EXP_CAP_FLAGS; int ret = ibv_exp_query_device(NULL, &attr); int ok = (attr.exp_device_cap_flags & IBV_EXP_DEVICE_ODP) && (attr.odp_caps.general_odp_caps & IBV_EXP_ODP_SUPPORT_IMPLICIT) && (attr.odp_caps.per_transport_caps.rc_odp_caps & IBV_EXP_ODP_SUPPORT_READ) && (attr.odp_caps.per_transport_caps.rc_odp_caps & IBV_EXP_ODP_SUPPORT_WRITE); struct ibv_exp_reg_mr_in x; x.exp_access = IBV_EXP_ACCESS_ON_DEMAND | IBV_EXP_ACCESS_LOCAL_WRITE; x.length = IBV_EXP_IMPLICIT_MR_SIZE; struct ibv_mr *mr = ibv_exp_reg_mr(&x); ], [ have_ibv_odp=yes AC_DEFINE(GASNETC_IBV_ODP_MLNX) ]) GASNET_TRY_CACHE_LINK(for ibv ODP support (RDMA Core), ibv_odp_support_core, [ #include ], [ struct ibv_device_attr_ex attr; attr.comp_mask = 0; int ret = ibv_query_device_ex(NULL, NULL, &attr); int ok = (attr.odp_caps.general_caps & IBV_ODP_SUPPORT) && (attr.odp_caps.general_caps & IBV_ODP_SUPPORT_IMPLICIT) && (attr.odp_caps.per_transport_caps.rc_odp_caps & IBV_ODP_SUPPORT_READ) && (attr.odp_caps.per_transport_caps.rc_odp_caps & IBV_ODP_SUPPORT_WRITE); struct ibv_mr *mr = ibv_reg_mr(NULL, NULL, SIZE_MAX, IBV_ACCESS_ON_DEMAND | IBV_ACCESS_LOCAL_WRITE); ], [ have_ibv_odp=yes AC_DEFINE(GASNETC_IBV_ODP_CORE) ]) GASNET_POPVAR(CFLAGS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(LIBS) if test "$have_ibv_odp$force_ibv_odp" = noyes; then GASNET_MSG_ERROR([IBV ODP support was requested with --enable-ibv-odp but is not available]) elif test "$have_ibv_odp" = yes; then AC_DEFINE(GASNETC_IBV_ODP) fi fi GASNET_IF_DISABLED([ibv-serialize-poll-cq], [Disable serialization of CQ polling in ibv-conduit (enabled by default)], [:], [AC_DEFINE(GASNETC_IBV_SERIALIZE_POLL_CQ_CONFIGURE)]) GASNET_WITH(ibv-max-medium, [Specify gasnet_AMMaxMedium() for ibv-conduit (default 65536)], [case "$withval" in 1024|2048|4096|8192|16384|32768|65536|131072|262144) ibv_max_medium="$withval";; *) AC_MSG_ERROR([--with-ibv-max-medium="$withval" is not legal. Value must be a power-of-two between 1024 and 262144, inclusive.]) ;; esac ], [AC_MSG_ERROR([--with-ibv-max-medium must be a power-of-two between 1024 and 262144, inclusive.])], [ibv_max_medium=65536]) AC_DEFINE_UNQUOTED(GASNETC_IBV_MAX_MEDIUM, [$ibv_max_medium]) fi fi AC_SUBST(IBV_CFLAGS) AC_SUBST(IBV_LDFLAGS) AC_SUBST(IBV_LIBS) AM_CONDITIONAL(IBV_SEQ_THREADS, test "$enabled_ibv_rcv_thread$enabled_ibv_snd_thread$enabled_ibv_conn_thread" != nonono) CONDUIT_END([test "$enabled_ibv$have_ibv" = yesyes]) AM_CONDITIONAL(USE_IBV_CONDUIT, test "$enabled_ibv$have_ibv" = yesyes) #-------------------------------------------------------------------------------------------------------- # Libfabric Conduit # default to not probing ofi-conduit, regardless of enabled_auto_detect if test "${enable_ofi-unset}" = unset; then enable_ofi=no; fi CONDUIT_BEGIN(ofi,yes,[OpenFabrics Interfaces conduit (ofi)]) if test "$enabled_ofi" = yes; then have_ofi=yes CONDUIT_HOME([OFI libfabric], [fi_info], [/usr], [include/rdma/fabric.h]) CONDUIT_CFLAGS GASNET_ENV_DEFAULT(OFI_LIBS, -lfabric) CONDUIT_LDFLAGS(fabric) GASNET_SPLIT_LINKER_OPTS(OFI_LDFLAGS,OFI_LIBS) if test "$have_ofi" = yes; then GASNET_PUSHVAR(CFLAGS,"$CFLAGS $OFI_CFLAGS") GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $OFI_LDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $OFI_LIBS") GASNET_TRY_CACHE_LINK(for working OFI GASNet bindings, ofi_works, [ #include ], [{ int rc; rc = fi_getinfo(FI_VERSION(FI_MAJOR_VERSION,FI_MINOR_VERSION), 0, 0, 0, 0, 0); }], [ : ], [ have_ofi=no; GASNET_ERR_SAVE() ] ) if test "$have_ofi" = yes; then GASNET_TRY_CACHE_EXTRACT_EXPR(for libfabric version code, ofi_version,[ #include #ifndef FI_REVISION_VERSION /* first appears in 1.10.0 */ #define FI_REVISION_VERSION 0 #endif ],[(FI_MAJOR_VERSION*10000 + FI_MINOR_VERSION*100 + FI_REVISION_VERSION)],[ofi_version]) AC_MSG_CHECKING(for libfabric 1.5.0 or newer) if test "$ofi_version" -ge 10500; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) have_ofi=no fi fi GASNET_POPVAR(CFLAGS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(LIBS) fi if test "$have_ofi" = yes; then # What we actually care about is GASNETI_HAVE_SPINLOCK, which is available # whenever !GASNETI_ATOMICOPS_NOT_SIGNALSAFE # For all platforms of likely interest, checking (compiler||native) is sufficient. AC_MSG_CHECKING(for appropriate atomics support required by ofi-conduit) CHECK_ATOMICS([native compiler],[ AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) GASNET_MSG_WARN([ofi-conduit requires native atomicops, but $check_atomics_msg]) have_ofi=no ]) fi if test "$have_ofi" = yes; then CONDUIT_SPAWNER ofi_provider="" ofi_define_mr_virt_addr="no" # tri-state: "no" omits "#define", forcing runtime selection ofi_define_mr_prov_key="no" # tri-state: "no" omits "#define", forcing runtime selection ofi_define_use_av_map="no" # tri-state: "no" omits "#define", forcing runtime selection ofi_single_provider="yes" detected_ofi_provider="" ofi_use_thread_domain=0 ofi_use_multi_cq=0 ofi_retry_recvmsg=0 # List of known providers in order of preference. # Presence on this list does not necessarily indicate support status. # Consult ofi-conduit/README for the status of supported libfabric providers. known_providers="cxi psm2 gni verbs;ofi_rxm efa sockets udp;ofi_rxd tcp;ofi_rxm" GASNET_WITH(ofi-provider, [Statically configure ofi-conduit for the given provider], ofi_provider="$withval", ) # Don't autodetect if the user knows which provider they want if test -z "$ofi_provider"; then GASNET_PUSHVAR(PATH, "$OFI_HOME/bin:$PATH") if command -v fi_info > /dev/null 2>&1; then # Only do this if fi_info is in the $PATH for word in $known_providers do if fi_info --provider="$word" > /dev/null 2>&1; then detected_ofi_provider="$word" break fi done ofi_provider="$detected_ofi_provider" fi GASNET_POPVAR(PATH) else unset aliased_ofi_provider case "$ofi_provider" in verbs) aliased_ofi_provider='verbs;ofi_rxm' ;; tcp) aliased_ofi_provider='tcp;ofi_rxm' ;; udp) aliased_ofi_provider='udp;ofi_rxd' ;; *:*) aliased_ofi_provider=`echo "$ofi_provider" | sed -e 's/:/;/'` ;; esac if test "${aliased_ofi_provider+set}" = set ; then GASNET_MSG_WARN([Option --with-ofi-provider='$ofi_provider' converted to --with-ofi-provider='$aliased_ofi_provider']) ofi_provider="$aliased_ofi_provider" fi fi ofi_floor=0 case "$ofi_provider" in psm2) ofi_define_mr_virt_addr=0 ofi_define_mr_prov_key=0 ofi_define_use_av_map=0 ofi_use_thread_domain=1 ;; cxi) ofi_define_mr_virt_addr=0 ofi_define_mr_prov_key=0 ofi_define_use_av_map=0 ofi_use_multi_cq=1 ofi_retry_recvmsg=1 ;; gni) ofi_define_mr_virt_addr=1 ofi_define_mr_prov_key=1 ofi_define_use_av_map=0 ofi_floor=11400 ;; verbs\;ofi_rxm) ofi_define_mr_virt_addr=1 ofi_define_mr_prov_key=1 ofi_define_use_av_map=0 if test "$GASNET_PLATFORM" = crayex; then ofi_floor=11100 else ofi_floor=11200 fi ;; tcp\;ofi_rxm) ofi_define_mr_virt_addr=0 ofi_define_mr_prov_key=0 ofi_define_use_av_map=0 ofi_floor=11500 ;; udp\;ofi_rxd) ofi_define_mr_virt_addr=0 ofi_define_mr_prov_key=0 ofi_define_use_av_map=0 ofi_retry_recvmsg=1 ofi_floor=10700 ;; sockets) ofi_define_mr_virt_addr=0 ofi_define_mr_prov_key=0 ofi_define_use_av_map=0 ;; efa) ofi_define_mr_virt_addr=1 ofi_define_mr_prov_key=1 ofi_define_use_av_map=0 ofi_retry_recvmsg=1 ;; default|generic|"") # NOTE: "default" is deprecated and can be removed when Spack packaging drops 2022.3.0 if test -n "$ofi_provider"; then why="as requested via --with-ofi-provider=$ofi_provider" else why='because no OFI provider was specified via the --with-ofi-provider option and no known provider could be auto-detected' fi GASNET_MSG_WARN([Using runtime provider feature detection in ofi-conduit $why.]) ofi_use_multi_cq=1 ofi_retry_recvmsg=1 ofi_single_provider='no' ;; *) GASNET_IF_ENABLED_NOHELP(allow-unknown-ofi-provider, [ GASNET_MSG_WARN([dnl Unknown OFI provider '$ofi_provider' requested together with '--enable-allow-unknown-ofi-provider'. Runtime provider feature detection and conservative defaults will be used except where overridden via --(en|dis)able-ofi-[[feature]] options.]) ofi_use_multi_cq=1 ofi_retry_recvmsg=1 ], GASNET_MSG_ERROR([Unknown OFI provider '$ofi_provider' requested])) ;; esac if test "$ofi_single_provider" = "yes"; then AC_DEFINE_UNQUOTED(GASNETC_OFI_PROVIDER_LIST, ["$ofi_provider"]) ofi_provider_ident=`echo "$ofi_provider" | cut '-d;' -f1` else AC_DEFINE_UNQUOTED(GASNETC_OFI_PROVIDER_LIST, ["$known_providers"]) ofi_provider_ident="generic" fi AC_DEFINE_UNQUOTED(GASNETC_OFI_PROVIDER_IDENT, [$ofi_provider_ident]) GASNET_IF_ENABLED_WITH_AUTO(ofi-thread-domain, [Indicates if the conduit should use the FI_THREAD_DOMAIN threading model(advanced users only)], [ofi_use_thread_domain="1"], [ofi_use_thread_domain="0"], []) GASNET_IF_ENABLED_WITH_AUTO(ofi-multi-cq, [Indicates if the conduit should use multiple CQs (advanced users only)], [ofi_use_multi_cq="1"], [ofi_use_multi_cq="0"], []) GASNET_IF_ENABLED_WITH_AUTO(ofi-retry-recvmsg, [Indicates if the conduit should allow for retry of fi_recvmsg calls (advanced users only)], [ofi_retry_recvmsg="1"], [ofi_retry_recvmsg="0"], []) GASNET_IF_ENABLED_WITH_AUTO(ofi-mr-virt-addr, [Indicates if the conduit should statically compile FI_MR_VIRT_ADDR support into ofi-conduit (advanced users only)], [ofi_define_mr_virt_addr="1"], [ofi_define_mr_virt_addr="0"], [if test x$enable_ofi_mr_virt_addr = xdynamic; then : # undocumented explict request for dynamic behavior ofi_define_mr_virt_addr=no fi ]) GASNET_IF_ENABLED_WITH_AUTO(ofi-mr-prov-key, [Indicates if the conduit should statically compile FI_MR_PROV_KEY support into ofi-conduit (advanced users only)], [ofi_define_mr_prov_key="1"], [ofi_define_mr_prov_key="0"], [if test x$enable_ofi_mr_prov_key = xdynamic; then : # undocumented explict request for dynamic behavior ofi_define_mr_prov_key=no fi ]) GASNET_IF_ENABLED_WITH_AUTO(ofi-mr-scalable, [DEPRECATED], [ if test -n "${enable_ofi_mr_virt_addr+set}${enable_ofi_mr_prov_key+set}"; then GASNET_MSG_WARN([DEPRECATED option --enable-ofi-mr-scalable has been IGNORED due to use of one or more --(en|dis)able-ofi-mr-* options]) else GASNET_MSG_WARN([option --enable-ofi-mr-scalable is DEPRECATED]) ofi_define_mr_virt_addr="0"; ofi_define_mr_prov_key="0" fi ], [ if test -n "${enable_ofi_mr_virt_addr+set}${enable_ofi_mr_prov_key+set}"; then GASNET_MSG_WARN([DEPRECATED option --disable-ofi-mr-scalable has been IGNORED due to use of one or more --(en|dis)able-ofi-mr-* options]) else GASNET_MSG_WARN([option --disable-ofi-mr-scalable is DEPRECATED]) ofi_define_mr_virt_addr="1"; ofi_define_mr_prov_key="1" fi ], []) # For separate enable/disable documentation: AC_ARG_ENABLE(ofi-av-map,GASNET_OPTION_HELP(enable-ofi-av-map, [Include conduit support for FI_AV_MAP, excluding FI_AV_TABLE (advanced users only)])) AC_ARG_ENABLE(ofi-av-map,GASNET_OPTION_HELP(disable-ofi-av-map, [Include conduit support for FI_AV_TABLE, excluding FI_AV_MAP (advanced users only)])) # Real work (w/o docs) pushdef([GASNET_SUPPRESSHELP],1) GASNET_IF_ENABLED_WITH_AUTO(ofi-av-map, [N/A], [ofi_define_use_av_map="1"], [ofi_define_use_av_map="0"], [if test x$enable_ofi_use_av_map = xdynamic; then : # undocumented explict request for dynamic behavior ofi_define_use_av_map=no fi ]) popdef([GASNET_SUPPRESSHELP]) # Inform the user that settings were autodetected if test -n "$detected_ofi_provider" \ && test "$ofi_define_use_av_map" != "no" \ && test "$ofi_define_mr_virt_addr" != "no" \ && test "$ofi_define_mr_prov_key" != "no"; then GASNET_MSG_WARN([ The $detected_ofi_provider OFI provider was detected on your system and the ofi-conduit has been configured for that provider. If that is not your desired provider, override this by using the --with-ofi-provider= configure flag. See the ofi-conduit README for details.]) fi # Check provider-specific version *after* any $detected_ofi_provider message # # REMINDER: per-provider floors are documented in ofi-conduit/README # and also enforced in ofi-conduit/gasnet_ofi.c:gasnetc_ofi_init() GASNET_IF_ENABLED_NOHELP(allow-untrusted-ofi-provider, [:], [ if test $ofi_version -ne 0; then # NOTE: ofi_floor==0 if no floor is to be enforced AC_MSG_CHECKING([for provider-specific minimum libfabric version]) if test $ofi_version -ge $ofi_floor; then AC_MSG_RESULT([yes]) else have="$(expr $ofi_version / 10000).$(expr $ofi_version / 100 % 100).$(expr $ofi_version % 100)" want="$(expr $ofi_floor / 10000).$(expr $ofi_floor / 100 % 100).$(expr $ofi_floor % 100)" AC_MSG_RESULT([no - provider '$ofi_provider' is untrusted in libfabric version $have (minimum trusted version is $want).]) have_ofi=no fi fi ]) if test "$ofi_define_mr_virt_addr" != "no"; then AC_DEFINE_UNQUOTED(GASNETC_OFI_HAS_MR_VIRT_ADDR_CONFIGURE, ["$ofi_define_mr_virt_addr"]) fi if test "$ofi_define_mr_prov_key" != "no"; then AC_DEFINE_UNQUOTED(GASNETC_OFI_HAS_MR_PROV_KEY_CONFIGURE, ["$ofi_define_mr_prov_key"]) fi if test "$ofi_define_use_av_map" != "no"; then AC_DEFINE_UNQUOTED(GASNETC_OFI_USE_AV_MAP_CONFIGURE, ["$ofi_define_use_av_map"]) fi AC_DEFINE_UNQUOTED(GASNETC_OFI_USE_THREAD_DOMAIN, [$ofi_use_thread_domain]) AC_DEFINE_UNQUOTED(GASNETC_OFI_USE_MULTI_CQ, [$ofi_use_multi_cq]) AC_DEFINE_UNQUOTED(GASNETC_OFI_RETRY_RECVMSG, [$ofi_retry_recvmsg]) GASNET_WITH(ofi-num-completions, [Max number of completions for ofi-conduit to read from a CQ at one time (default 64)], [if expr "$withval" : '[[0-9]]*$' >/dev/null 2>&1 && \ expr "$withval" '>' 0 >/dev/null 2>&1 ; then ofi_num_completions="$withval" else AC_MSG_ERROR([--with-ofi-num-completions="$withval" is not legal. Value must be greater than 0]) fi ], [ AC_MSG_ERROR([--with-ofi-num-completions must be greater than 0])], [ofi_num_completions=64]) AC_DEFINE_UNQUOTED(GASNETC_OFI_NUM_COMPLETIONS, [$ofi_num_completions]) GASNET_WITH(ofi-max-medium, [gasnet_AMMaxMedium() for the ofi-conduit (default 8192)], [if expr "$withval" : '[[0-9]]*$' >/dev/null 2>&1 && \ expr "$withval" '>=' 512 >/dev/null 2>&1 ; then ofi_max_medium="$withval" else AC_MSG_ERROR([--with-ofi-max-medium="$withval" is not legal. Value must be no smaller than 512.]) fi ], [AC_MSG_ERROR([--with-ofi-max-medium must be no smaller than 512])], [ofi_max_medium=8192]) AC_DEFINE_UNQUOTED(GASNETC_OFI_MAX_MEDIUM_DFLT, [$ofi_max_medium]) GASNET_IF_ENABLED_NOHELP(ofi-legacy-extended, [AC_DEFINE(GASNETC_OFI_REFERENCE_EXTENDED) GASNET_MSG_WARN([ ----------------------------------------------------------------------- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING You passed --enable-ofi-legacy-extended This is unsupported and usually has a SERIOUS impact on performance. Do not trust any performance numbers obtained from programs built using this GASNet installation!!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING -----------------------------------------------------------------------])]) if test "$GASNET_PLATFORM" = crayex; then gex_fi_hmem_minor_floor=11 else gex_fi_hmem_minor_floor=12 fi GASNET_PUSHVAR(CFLAGS,"$CFLAGS $OFI_CFLAGS -DGEX_FI_MINOR_VERSION=$gex_fi_hmem_minor_floor") GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $OFI_LDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $OFI_LIBS") # Probe for fi_mr_regattr() GASNET_TRY_CACHE_LINK(for fi_mr_regattr(), fi_mr_regattr, [ #include ],[ int rc = fi_mr_regattr(NULL, NULL, 0, NULL); ], [ AC_DEFINE(GASNETC_HAVE_FI_MR_REG_ATTR) ] ) # Probe for libfabric kinds support # FI_HMEM_{CUDA,ROCR} identifiers are an enum, so we create HAVE_* feature macros # TODO: allow-list or ban-list providers here? have_fi_hmem_cuda=no have_fi_hmem_rocr=no GASNET_TRY_CACHE_LINK(for FI_HMEM support (libfabric 1.$gex_fi_hmem_minor_floor or newer), have_fi_hmem, [ #include #include #if FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION) < FI_VERSION(1, GEX_FI_MINOR_VERSION) #error "failed check for minimum libfabric version for memory kinds support" #endif ], [{ unsigned long caps = (unsigned long)FI_HMEM; struct fi_mr_attr x; x.iface = FI_HMEM_SYSTEM; (void)(&x.device); }], [ GASNET_TRY_CACHE_LINK(for FI_HMEM_CUDA, have_fi_hmem_cuda, [ #include ], [{ struct fi_mr_attr x; x.iface = FI_HMEM_CUDA; }], [ have_fi_hmem_cuda=yes AC_DEFINE(GASNETC_HAVE_FI_HMEM_CUDA) ]) GASNET_TRY_CACHE_LINK(for FI_HMEM_ROCR, have_fi_hmem_rocr, [ #include ], [{ struct fi_mr_attr x; x.iface = FI_HMEM_ROCR; }], [ have_fi_hmem_rocr=yes AC_DEFINE(GASNETC_HAVE_FI_HMEM_ROCR) ]) GASNET_TRY_CACHE_LINK(for FI_HMEM_ZE, have_fi_hmem_ze, [ #include ], [{ struct fi_mr_attr x; x.iface = FI_HMEM_ZE; }], [ have_fi_hmem_ze=yes AC_DEFINE(GASNETC_HAVE_FI_HMEM_ZE) ]) ]) GASNET_POPVAR(CFLAGS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(LIBS) fi fi AC_SUBST(OFI_CFLAGS) AC_SUBST(OFI_LDFLAGS) AC_SUBST(OFI_LIBS) CONDUIT_END([test "$enabled_ofi$have_ofi" = yesyes]) AM_CONDITIONAL(USE_OFI_CONDUIT, test "$enabled_ofi$have_ofi" = yesyes) AM_CONDITIONAL(HAVE_FI_HMEM_CUDA, test "$have_fi_hmem_cuda" = yes) AM_CONDITIONAL(HAVE_FI_HMEM_ROCR, test "$have_fi_hmem_rocr" = yes) AM_CONDITIONAL(HAVE_FI_HMEM_ZE, test "$have_fi_hmem_ze" = yes) #--------------------------------------------------------------------------------------------------------------- # CONDUIT CONFIGURATIONS FINISH #--------------------------------------------------------------------------------------------------------------- dnl GASNET_TOOLSONLY_TRUE_BEGIN dnl undefine([GASNET_SUPPRESSHELP]) dnl GASNET_TOOLSONLY_TRUE_END CONDUITS= AC_SUBST(CONDUITS) # reporting file output at completion AC_DEFUN([CONDUIT_LIST_FILE], [ if test -n "$CONDUIT_LIST" ; then CONDUIT_LIST_CLEAN=no else CONDUIT_LIST=.gasnet-conduit-list.tmp CONDUIT_LIST_CLEAN=yes fi ]) CONDUIT_LIST_FILE() cat >$CONDUIT_LIST <>$CONDUIT_LIST <>$CONDUIT_LIST < #include #include ], [$gasnet_socklen_try x = 0; getpeername(0,NULL,&x); getsockname(0,NULL,&x);], [gasnet_socklen_t="$gasnet_socklen_try"]) fi done gasnet_cv_socklen_t="$gasnet_socklen_t"]) if test x"$gasnet_cv_socklen_t" = x; then AC_MSG_RESULT([not found]) elif test "$gasnet_cv_socklen_t" = float; then AC_MSG_RESULT([compiler unreliable - defaulting to socklen_t]) AC_DEFINE_UNQUOTED(GASNET_SOCKLEN_T, socklen_t) else AC_MSG_RESULT($gasnet_cv_socklen_t) AC_DEFINE_UNQUOTED(GASNET_SOCKLEN_T, $gasnet_cv_socklen_t) fi # Prefer setpgid(), but unless cross-compiling we can use setpgrp() AC_CHECK_FUNCS(setpgid) if test "$cross_compiling" = "no" ; then AC_CHECK_FUNCS(setpgrp, [AC_FUNC_SETPGRP()]) fi GASNET_WITH(ssh-cmd, [default value for GASNET_SSH_CMD environment variable (default "ssh")], [case "$withval" in yes|no) AC_MSG_ERROR([--with-ssh-cmd requires an argument]) ;; *) gasnet_ssh_cmd="$withval" ;; esac], [AC_MSG_ERROR([--with-ssh-cmd requires an argument])], [gasnet_ssh_cmd="ssh"]) AC_DEFINE_UNQUOTED(GASNETI_DEFAULT_SSH_CMD, "$gasnet_ssh_cmd") GASNET_WITH(ssh-options, [default value for GASNET_SSH_OPTIONS environment variable (defaults to empty)], [case "$withval" in yes|no) AC_MSG_ERROR([--with-ssh-options requires an argument]) ;; *) gasnet_ssh_options="$withval" ;; esac], [AC_MSG_ERROR([--with-ssh-options requires an argument])], [gasnet_ssh_options=""]) AC_DEFINE_UNQUOTED(GASNETI_DEFAULT_SSH_OPTIONS, "$gasnet_ssh_options") GASNET_WITH(ssh-nodefile, [default value for GASNET_SSH_NODEFILE environment variable (defaults to empty - no fixed filename)], [case "$withval" in yes|no) AC_MSG_ERROR([--with-ssh-nodefile requires an argument]) ;; *) gasnet_ssh_nodefile="$withval" ;; esac], [AC_MSG_ERROR([--with-ssh-nodefile requires an argument])], [gasnet_ssh_nodefile=""]) AC_DEFINE_UNQUOTED(GASNETI_DEFAULT_SSH_NODEFILE, "$gasnet_ssh_nodefile") GASNET_WITH(ssh-out-degree, [default value for GASNET_SSH_OUT_DEGREE environment variable (defaults to 32)], [case "$withval" in yes|no) AC_MSG_ERROR([--with-ssh-out-degree requires a non-negative integer argument]) ;; esac if expr "${withval}" : "[[0-9]][[0-9]]*" >/dev/null; then gasnet_ssh_out_degree="$withval" else AC_MSG_ERROR([--with-ssh-out-degree requires a non-negative integer argument]) fi], [AC_MSG_ERROR([--with-ssh-out-degree requires a non-negative integer argument])], [gasnet_ssh_out_degree=32]) AC_DEFINE_UNQUOTED(GASNETI_DEFAULT_SSH_OUT_DEGREE, $gasnet_ssh_out_degree) AM_CONDITIONAL(HAVE_BOOTSTRAP_SSH, test "$have_fork" = yes) # Things for pmi-spawner GASNET_IF_ENABLED_WITH_AUTO(pmi, [Enable/disable PMI support for job spawning], [enable_pmi=yes; force_pmi=yes], [enable_pmi=no], [enable_pmi=probe]) # If user specifies a PMI version, then we will not probe for others unset using_pmi_version pmi_why='Default' GASNET_WITH(pmi-version, [PMI version (x, 1, 2 or cray)] , [ case "$withval" in 1|2|x|cray) using_pmi_version="$withval";; *) GASNET_MSG_ERROR([Argument to --with-pmi-version must be 'x', '1', '2', or 'cray']);; esac pmi_why='Requested' ], [ GASNET_MSG_WARN([Ignoring --without-pmi-version]) ]) if test "$GASNET_PLATFORM" = crayex && test -z "$using_pmi_version"; then using_pmi_version=cray fi # Check for header matching the selected lib # TODO: fragile if multiple PMI libs are installed AC_DEFUN([GASNET_PMI_SPAWNER_CFLAGS], [ GASNET_FUN_BEGIN([$0($@)]) AC_MSG_CHECKING(for location of $1) for pmi_headers in "$PMI_HOME/include/slurm" "$PMI_HOME/include/portals4" "$PMI_HOME/include" ''; do test -z "${pmi_headers}" && break test -f "${pmi_headers}/$1" && break done if test -z "${pmi_headers}"; then have_pmi=no pmi_headers='not found' elif test "${pmi_headers}" != '/usr/include'; then PMI_SPAWNER_CFLAGS="-I${pmi_headers}" fi AC_MSG_RESULT(${pmi_headers}) GASNET_FUN_END([$0]) ]) have_pmi=no if test "$enable_pmi" != 'no'; then # Auto-detect Cray PMI prefix, *unless* non-Cray version requested if ( test -n "$CRAYPE_NETWORK_TARGET" || test "$GASNET_PLATFORM" = crayex ) && ( test "$using_pmi_version" = 'cray' || test -z "$using_pmi_version" ); then # Several places to look. for dir in `expr "x${CRAY_PMI_INCLUDE_OPTS}" : 'x-I\([[^ ]]*\)' 2>/dev/null` \ `expr "x${CRAY_PMI_POST_LINK_OPTS}" : 'x-L\([[^ ]]*\)' 2>/dev/null` \ "$CRAY_PMI_PREFIX/dummy" '/opt/cray/pe/pmi/default/dummy'; do if test -n "$dir"; then pmi_guess=`dirname "$dir" 2>/dev/null` if test -e "$pmi_guess/include/pmi_cray.h"; then break fi fi done else pmi_guess='/usr' fi GASNET_ENV_DEFAULT(PMI_HOME, $pmi_guess, [Install prefix of PMI library]) GASNET_PACKAGE_LDFLAGS(PMI, [pmi pmi2 pmix]) PMI_SPAWNER_LDFLAGS=$PMI_LDFLAGS; unset PMI_LDFLAGS # Check for various implementations' libs unless disqualifed by --with-pmi-version= GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $PMI_SPAWNER_LDFLAGS") GASNET_ENV_DEFAULT(PMI_LIBS, probe) ## Cray PMI if test "$using_pmi_version" = 'cray' || test -z "$using_pmi_version"; then GASNET_PUSHVAR(LIBS,"") if test "$PMI_LIBS" = 'probe'; then # At the time of writting, XC systems use libpmi and EX systems use libpmi2. # Use of AC_SEARCH_LIBS() will yield a "none required" result when using # Cray's `cc` wrapper, which could then require pmi environment module to # be loaded at application link time. The following "just works" because, # when using the wrapper, it reduces to checking if the library exists. AC_CHECK_LIB(pmi2, PMI_Get_nidlist_ptr, [have_pmi=yes; LIBS="-lpmi2"], [AC_CHECK_LIB(pmi, PMI_Get_nidlist_ptr, [have_pmi=yes; LIBS="-lpmi"])]) else LIBS="$PMI_LIBS" AC_CHECK_FUNC(PMI_Get_nidlist_ptr, [have_pmi=yes]) fi if test "$have_pmi" = 'yes'; then GASNET_PMI_SPAWNER_CFLAGS([pmi_cray.h]) fi if test "$have_pmi" = 'yes'; then using_pmi_version=cray pretty_pmi_version=' (Cray)' AC_DEFINE(HAVE_PMI_CRAY_H) PMI_SPAWNER_LIBS="$LIBS" GASNET_IF_DISABLED_NOHELP(cray-post-link-rewrite,[], [GASNET_CRAY_FIX_LINK_OPTS([pmi],[PMI_SPAWNER_LDFLAGS])] ) fi GASNET_POPVAR(LIBS) fi ## PMIx if test "$using_pmi_version" = 'x' || test -z "$using_pmi_version"; then GASNET_PUSHVAR(LIBS,"") if test "$PMI_LIBS" = 'probe'; then AC_SEARCH_LIBS(PMIx_Init, [pmix], [have_pmi=yes]) else LIBS="$PMI_LIBS" AC_CHECK_FUNC(PMIx_Init, [have_pmi=yes]) fi if test "$have_pmi" = 'yes'; then GASNET_PMI_SPAWNER_CFLAGS([pmix.h]) fi if test "$have_pmi" = 'yes'; then AC_CHECK_HEADERS([stdbool.h]) # We support PMIx API versions 2 and 3 # At least some version 1 headers did not define PMIX_VERSION_MAJOR at all GASNET_PUSHVAR(CFLAGS,"$PMI_SPAWNER_CFLAGS") GASNET_TRY_CACHE_CHECK(for PMIx API version 2 or newer,PMIX_API,[ #include #include #include #if HAVE_STDBOOL_H #include #endif #include #ifndef PMIX_VERSION_MAJOR #error not defined #elif PMIX_VERSION_MAJOR < 2 #error too old #endif ],[],[],[ GASNET_MSG_WARN([Ignoring libpmix implementing API version 1 because version 2 or newer is required.]) have_pmi=no ]) GASNET_POPVAR(CFLAGS) fi if test "$have_pmi" = 'yes'; then using_pmi_version=x pretty_pmi_version=' (version=x)' AC_DEFINE(HAVE_PMIX_H) PMI_SPAWNER_LIBS="$LIBS" fi GASNET_POPVAR(LIBS) fi ## PMI2 if test "$using_pmi_version" = '2' || test -z "$using_pmi_version"; then GASNET_PUSHVAR(LIBS,"") if test "$PMI_LIBS" = 'probe'; then AC_SEARCH_LIBS(PMI2_Init, [pmi2 mpich], [have_pmi=yes]) else LIBS="$PMI_LIBS" AC_CHECK_FUNC(PMI2_Init, [have_pmi=yes]) fi if test "$have_pmi" = 'yes'; then GASNET_PMI_SPAWNER_CFLAGS([pmi2.h]) fi if test "$have_pmi" = 'yes'; then using_pmi_version=2 pretty_pmi_version=' (version=2)' AC_DEFINE(HAVE_PMI2_H) PMI_SPAWNER_LIBS="$LIBS" GASNET_IF_ENABLED(pmi2-fast-barrier, Use PMI2_KVS_fence as barrier. This may not work with all PMI2 implementations, [AC_DEFINE(GASNETI_PMI2_FENCE_IS_BARRIER,[1],[define to 1 if PMI2_KVS_fence() provides barrier functionality])], [] ) fi GASNET_POPVAR(LIBS) fi ## PMI (aka PMI1) if test "$using_pmi_version" = '1' || test -z "$using_pmi_version"; then GASNET_PUSHVAR(LIBS,"") if test "$PMI_LIBS" = 'probe'; then AC_SEARCH_LIBS(PMI_Init, [pmi mpich portals_runtime], [have_pmi=yes]) else LIBS="$PMI_LIBS" AC_CHECK_FUNC(PMI_Init, [have_pmi=yes]) fi if test "$have_pmi" = 'yes'; then GASNET_PMI_SPAWNER_CFLAGS([pmi.h]) fi if test "$have_pmi" = 'yes'; then using_pmi_version=1 pretty_pmi_version=' (version=1)' AC_DEFINE(HAVE_PMI_H) PMI_SPAWNER_LIBS="$LIBS" fi GASNET_POPVAR(LIBS) fi unset PMI_LIBS GASNET_POPVAR(LDFLAGS) GASNET_SPLIT_LINKER_OPTS(PMI_SPAWNER_LDFLAGS,PMI_SPAWNER_LIBS) # TODO: add a link test for a working PMI configuration # Look for use of malloc/free in the corresponding PMIx header if any if test "$have_pmi" = yes; then AC_MSG_CHECKING(for use of malloc in PMIx headers) AC_EGREP_HEADER([\<(malloc|calloc|free|strdup)\>], [${pmi_headers}/pmix_common.h], [ AC_DEFINE([GASNETI_PMIX_HACK]) AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ] ) fi fi AC_MSG_CHECKING(for PMI spawner support) if test "$have_pmi" = yes; then AC_MSG_RESULT(yes) # These have not bee seen outside of Cray PMI, but we can hope: GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $PMI_SPAWNER_LDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $PMI_SPAWNER_LIBS") AC_CHECK_FUNCS([PMI_Allgather PMI_Allgather_on_smp PMI_Bcast PMI_Get_numpes_on_smp]) GASNET_POPVAR(LIBS) GASNET_POPVAR(LDFLAGS) # Get a full path for PMIRUN_CMD, using MPIRUN_CMD as a fallback if test "$enabled_mpi" = yes || test "$enabled_mpi_compat" = yes; then : # Have already probed MIRUN_CMD, possibly system-specific else GASNET_ENV_DEFAULT(MPIRUN_CMD, mpirun -np %N %C) fi pmirun_cmd_default="$MPIRUN_CMD" # default of defaults if test $GASNET_PLATFORM = crayex; then AC_PATH_PROGS(SRUN_PATH, $SRUN srun) AC_PATH_PROGS(APRUN_PATH, $APRUN aprun) if test -n "$SRUN_PATH" && test -n "$APRUN_PATH"; then : # Because both 'srun' and 'aprun' were found, will not use either as default PMIRUN_CMD elif test -n "$SRUN_PATH"; then pmirun_cmd_default="$SRUN_PATH -n %N -- %C" elif test -n "$APRUN_PATH"; then pmirun_cmd_default="$APRUN_PATH -n %N %C" fi fi GASNET_ENV_DEFAULT(PMIRUN_CMD, $pmirun_cmd_default, [[Command template for running PMI programs, see other/pmi-spawner/README]]) GASNET_GETFULLPATH(PMIRUN_CMD) elif test -z "$force_pmi"; then AC_MSG_RESULT(no) PMI_SPAWNER_LIBS="" PMI_SPAWNER_LDFLAGS="" PMI_SPAWNER_CFLAGS="" elif test -n "${using_pmi_version+set}"; then AC_MSG_RESULT(no) if test "$using_pmi_version" = cray; then extra='. Try loading the "cray-pmi" or "pmi" environment module, or specifying a different --with-pmi-version=?.' else extra='' fi GASNET_MSG_ERROR([$pmi_why PMI version "$using_pmi_version" could not be found$extra]) else AC_MSG_RESULT(no) GASNET_MSG_ERROR([Requested PMI support could not be found]) fi AC_SUBST(PMI_SPAWNER_LIBS) AC_SUBST(PMI_SPAWNER_LDFLAGS) AC_SUBST(PMI_SPAWNER_CFLAGS) AC_SUBST(PMIRUN_CMD) AM_CONDITIONAL(HAVE_BOOTSTRAP_PMI, test "$have_pmi" = yes) dnl GASNET_TOOLSONLY_FALSE_END ######################################################################## # Check for alloca in C code GASNET_FUNC_ALLOCA AC_CHECK_FUNCS(on_exit) AC_CHECK_FUNCS(gethostid) AC_CHECK_FUNCS(setenv unsetenv putenv) AC_CHECK_FUNCS([getrlimit setrlimit getrlimit64 setrlimit64], [], []) AC_CHECK_HEADERS(sys/resource.h) AC_CHECK_HEADERS(sys/table.h) AC_CHECK_HEADERS(features.h) AC_CHECK_FUNCS(fopen64) AC_CHECK_FUNCS(sigprocmask) AC_CHECK_FUNCS(srand_deterministic) AC_CHECK_FUNCS(ffs) ######################################################################## # On various systems, the headers are missing certain functions # or only declare them under some condition we don't satisfy. AC_DEFUN([GASNET_CHECK_SYS_DECL], [ pushdef([uppername],translit($1,'a-z','A-Z')) pushdef([cvname],have_[]uppername[]_decl) GASNET_TRY_CACHE_CHECK(for declaration/definition of $1, cvname, [ #include #include #include #include #include #include #include ], [ #ifdef $1 /* It is a macro and that is OK */ #else int x = (int)sizeof(&$1); #endif ], [ cvname=yes ], [ cvname=no ]) if test $cvname = yes; then AC_DEFINE(HAVE_[]uppername[]_DECL) fi popdef([cvname]) popdef([uppername]) ]) GASNET_CHECK_SYS_DECL(setenv) GASNET_CHECK_SYS_DECL(unsetenv) GASNET_CHECK_SYS_DECL(snprintf) GASNET_CHECK_SYS_DECL(vsnprintf) ######################################################################## # ctype.h wrapper support AC_CHECK_FUNCS(isblank isascii toascii) GASNET_CHECK_SYS_DECL(isblank) GASNET_CHECK_SYS_DECL(isascii) GASNET_CHECK_SYS_DECL(toascii) AC_CACHE_CHECK([for buggy ctype.h], gasnet_cv_buggy_ctype, [ GASNET_PUSHVAR(CFLAGS,"$DEVWARN_CFLAGS $CFLAGS") gasnet_cv_buggy_ctype=unk GASNET_TRY_CCOMPILE_WITHWARN( [#include int foo(char c) { return isalpha(c); } ], [int x = foo('c');], [gasnet_cv_buggy_ctype=ok], [gasnet_cv_buggy_ctype=yes/warning], [GASNET_MSG_ERROR(failure building test of ctype.h)]) GASNET_POPVAR(CFLAGS) ]) if test x$gasnet_cv_buggy_ctype != xok; then AC_DEFINE(GASNETI_NEED_CTYPE_WRAPPERS) fi ######################################################################## # BACKTRACE support GASNET_HELP_OUTPUT([ Backtrace options:]) GASNET_IF_ENABLED_WITH_AUTO(backtrace, [support backtrace, via any mechanism (auto-detected)], [use_backtrace="try"], [use_backtrace="no"], [ if test "$cross_compiling" = "yes" ; then # disable backtrace support by default when cross-compiling, # because the debuggers on the host system running configure are usually not what we want for the target use_backtrace="no" else use_backtrace="try" fi ]) GASNET_IF_ENABLED_WITH_AUTO(backtrace-execinfo, support backtrace via execinfo.h (auto-detected), [use_execinfo="yes"], [use_execinfo="no"], [use_execinfo="$use_backtrace"]) if test "$use_execinfo" != no; then AC_CHECK_HEADERS(execinfo.h) if test "$ac_cv_header_execinfo_h" = "yes" ; then AC_SEARCH_LIBS(backtrace, execinfo) # bug3637: BSD requires -lexecinfo AC_CHECK_FUNCS(backtrace backtrace_symbols) fi if test "$use_execinfo" = 'yes' && test "$ac_cv_func_backtrace" != 'yes'; then AC_MSG_ERROR(User requested --enable-backtrace-execinfo but support is not available on your system.) fi AC_PATH_PROGS(ADDR2LINE_PATH, addr2line, , /usr/bin:${PATH}) if test -n "$ADDR2LINE_PATH"; then AC_DEFINE_UNQUOTED(ADDR2LINE_PATH,"$ADDR2LINE_PATH") fi fi GASNET_IF_ENABLED_WITH_AUTO(backtrace-gdb, support backtrace via gdb (auto-detected), [use_gdb="yes"], [use_gdb="no"], [use_gdb="$use_backtrace"]) if test "$use_gdb" != no; then AC_PATH_PROGS(GDB_PATH, $GDB gdb, , /usr/bin:${PATH}) if test -n "$GDB_PATH"; then AC_DEFINE_UNQUOTED(GDB_PATH,"$GDB_PATH") elif test "$use_gdb" = yes; then AC_MSG_ERROR(User requested --enable-backtrace-gdb but gdb was not found. Perhaps you need to set \$GDB?) fi fi GASNET_IF_ENABLED_WITH_AUTO(backtrace-gstack, support backtrace via gstack (auto-detected), [use_gstack="yes"], [use_gstack="no"], [use_gstack="$use_backtrace"]) if test "$use_gstack" != no; then AC_PATH_PROGS(GSTACK_PATH, $GSTACK gstack, , /usr/bin:${PATH}) if test -n "$GSTACK_PATH"; then AC_DEFINE_UNQUOTED(GSTACK_PATH,"$GSTACK_PATH") elif test "$use_gstack" = yes; then AC_MSG_ERROR(User requested --enable-backtrace-gstack but gstack was not found. Perhaps you need to set \$GSTACK?) fi fi GASNET_IF_ENABLED_WITH_AUTO(backtrace-pstack, support backtrace via pstack (auto-detected), [use_pstack="yes"], [use_pstack="no"], [use_pstack="$use_backtrace"]) if test "$use_pstack" != no; then AC_PATH_PROGS(PSTACK_PATH, $PSTACK pstack, , /usr/bin:${PATH}) if test -n "$PSTACK_PATH"; then AC_DEFINE_UNQUOTED(PSTACK_PATH,"$PSTACK_PATH") elif test "$use_pstack" = yes; then AC_MSG_ERROR(User requested --enable-backtrace-pstack but pstack was not found. Perhaps you need to set \$PSTACK?) fi fi GASNET_IF_ENABLED_WITH_AUTO(backtrace-pgdbg, support backtrace via pgdbg (auto-detected), [use_pgdbg="yes"], [use_pgdbg="no"], [use_pgdbg="$use_backtrace"]) if test "$use_pgdbg" != no; then AC_PATH_PROGS(PGDBG_PATH, $PGDBG pgdbg, , /usr/bin:${PATH}) if test -n "$PGDBG_PATH"; then AC_DEFINE_UNQUOTED(PGDBG_PATH,"$PGDBG_PATH") elif test "$use_pgdbg" = yes; then AC_MSG_ERROR(User requested --enable-backtrace-pgdbg but pgdbg was not found. Perhaps you need to set \$PGDBG?) fi fi GASNET_IF_ENABLED_WITH_AUTO(backtrace-idb, support backtrace via idb (auto-detected), [use_idb="yes"], [use_idb="no"], [use_idb="$use_backtrace"]) if test "$use_idb" != no; then AC_PATH_PROGS(IDB_PATH, $IDB idb idb-e, , /usr/bin:${PATH}) if test -n "$IDB_PATH"; then AC_DEFINE_UNQUOTED(IDB_PATH,"$IDB_PATH") elif test "$use_idb" = yes; then AC_MSG_ERROR(User requested --enable-backtrace-idb but idb was not found. Perhaps you need to set \$IDB?) fi fi GASNET_IF_ENABLED_WITH_AUTO(backtrace-dbx, support backtrace via dbx (auto-detected), [use_dbx="yes"], [use_dbx="no"], [use_dbx="$use_backtrace"]) if test "$use_dbx" != no; then AC_PATH_PROGS(DBX_PATH, $DBX dbx, , /usr/bin:${PATH}) if test -n "$DBX_PATH"; then AC_DEFINE_UNQUOTED(DBX_PATH,"$DBX_PATH") elif test "$use_dbx" = yes; then AC_MSG_ERROR(User requested --enable-backtrace-dbx but dbx was not found. Perhaps you need to set \$DBX?) fi fi GASNET_IF_ENABLED_WITH_AUTO(backtrace-lldb, support backtrace via lldb (auto-detected), [use_lldb="yes"], [use_lldb="no"], [use_lldb="$use_backtrace"]) if test "$use_lldb" != no; then AC_PATH_PROGS(LLDB_PATH, $LLDB lldb, , /usr/bin:${PATH}) if test -n "$LLDB_PATH"; then AC_DEFINE_UNQUOTED(LLDB_PATH,"$LLDB_PATH") elif test "$use_lldb" = yes; then AC_MSG_ERROR(User requested --enable-backtrace-lldb but lldb was not found. Perhaps you need to set \$LLDB?) fi fi GASNET_IF_ENABLED_WITH_AUTO(backtrace-printstack, support backtrace via printstack (auto-detected), [use_printstack="yes"], [use_printstack="no"], [use_printstack="$use_backtrace"]) if test "$use_printstack" != no; then have_printstack=no AC_CHECK_HEADERS(ucontext.h, [AC_CHECK_FUNC(printstack, [have_printstack=yes; AC_DEFINE(HAVE_PRINTSTACK)])]) if test "$use_printstack$have_printstack" = yesno; then AC_MSG_ERROR(User requested --enable-backtrace-printstack but printstack support was not found.) fi fi ######################################################################## dnl GASNET_TOOLSONLY_FALSE_BEGIN GASNET_HELP_OUTPUT([ Memory-kinds options:]) GASNET_IF_ENABLED(memory-kinds, [Support for memory kinds (transfers to/from device memory). Enables default auto-detection of all device type applicable to the target platform. However, the individual --enable-kind-* options have precedence. Use of --enable-memory-kinds=force makes failure to detect at least one supported kind fatal.], [enable_mk_default=probe], [enable_mk_default=no]) # This is potentially used CUDA_UVA and by HIP # So we'll factor it to avoid repeats in ouptut unset checked_pkg_cuda AC_DEFUN([CHECK_PKG_CUDA],[ if test "${checked_pkg_cuda-unset}" = unset; then checked_pkg_cuda=y GASNET_PACKAGE_HOME(CUDA, [CUDA toolkit], [nvcc], [/usr/local/cuda], [include/cuda.h]) GASNET_PACKAGE_CFLAGS(CUDA) GASNET_ENV_DEFAULT(CUDA_LIBS, -lcuda) GASNET_PACKAGE_LDFLAGS(CUDA, cuda) GASNET_SPLIT_LINKER_OPTS(CUDA_LDFLAGS,CUDA_LIBS) fi ]) # GEX_MK_CLASS_CUDA_UVA enable_mk_cuda_uva_implicit=no GASNET_IF_ENABLED_WITH_AUTO(kind-cuda-uva, [Support for memory kinds on UVA-capable CUDA devices (auto-detected with --enable-memory-kinds, otherwise disabled)], [enable_mk_cuda_uva="yes"; force_mk_cuda_uva="yes"], [enable_mk_cuda_uva="no"], [ if test "x$enable_kind_cuda_uva" = 'xprobe'; then enable_mk_cuda_uva="probe" elif test "$GASNETI_PTR_BITS" = 32; then enable_mk_cuda_uva="no" else enable_mk_cuda_uva="$enable_mk_default" enable_mk_cuda_uva_implicit=yes fi ]) unset have_mk_cuda_uva if test "$enable_mk_cuda_uva" != "no"; then AC_MSG_CHECKING(for target having CUDA UVA memory kinds support) if test "$GASNETI_PTR_BITS" = 32; then AC_MSG_RESULT([no (32-bit targets are not supported)]) have_mk_cuda_uva=no else have_mk_cuda_uva=no case "$target_cpu:$target_os" in x86_64:linux*) have_mk_cuda_uva='yes';; powerpc*:linux*) if test "$WORDS_BIGENDIAN" = '0'; then have_mk_cuda_uva='yes'; fi;; aarch64:linux*) have_mk_cuda_uva='maybe';; esac if test "$have_mk_cuda_uva" = 'no'; then AC_MSG_RESULT([no (unsupported or unrecognized target $target)]) else AC_MSG_RESULT([$have_mk_cuda_uva]) fi fi if test "$have_mk_cuda_uva" != "no"; then # TODO: Can/should we scrape nvcc as UPC++ does? CHECK_PKG_CUDA() # Try to compile and link a basic program using the CUDA Driver API GASNET_PUSHVAR(CFLAGS,"$CFLAGS $CUDA_CFLAGS") GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $CUDA_LDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $CUDA_LIBS") GASNET_TRY_CACHE_LINK(for working CUDA configuration, libcuda_works, [ #include ], [ cuInit(0); CUdevice dev = 0; CUcontext ctx; CUresult res = cuDevicePrimaryCtxRetain(&ctx, dev); int isUVA; cuDeviceGetAttribute(&isUVA, CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, dev); CUpointer_attribute attrs[[3]] = { CU_POINTER_ATTRIBUTE_MEMORY_TYPE, CU_POINTER_ATTRIBUTE_IS_MANAGED, CU_POINTER_ATTRIBUTE_CONTEXT }; ], [ : ], [ have_mk_cuda_uva=no; GASNET_ERR_SAVE() ]) GASNET_POPVAR(LIBS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(CFLAGS) fi # If the probe(s) above passed on a target identified as "maybe" having # support, then upgrade to "yes" with a warning. if test "$have_mk_cuda_uva" = "maybe"; then have_mk_cuda_uva=yes GASNET_MSG_WARN([CUDA UVA memory kinds support enabled for $target, which may not be officially supported]) fi if test "$have_mk_cuda_uva" = "yes"; then AC_DEFINE(GASNETI_MK_CLASS_CUDA_UVA_ENABLED) CUDA_UVA_CFLAGS="$CUDA_CFLAGS" CUDA_UVA_LDFLAGS="$CUDA_LDFLAGS" CUDA_UVA_LIBS="$CUDA_LIBS" elif test "$force_mk_cuda_uva" = "yes"; then GASNET_MSG_ERROR([CUDA UVA memory kinds support was requested with --enable-kind-cuda-uva but is not available]) else unset CUDA_UVA_CFLAGS unset CUDA_UVA_LDFLAGS unset CUDA_UVA_LIBS fi fi AC_SUBST(CUDA_UVA_CFLAGS) AC_SUBST(CUDA_UVA_LDFLAGS) AC_SUBST(CUDA_UVA_LIBS) AM_CONDITIONAL(HAVE_MK_CLASS_CUDA_UVA, test "$have_mk_cuda_uva" = "yes") # GEX_MK_CLASS_HIP enable_mk_hip_implicit=no GASNET_IF_ENABLED_WITH_AUTO(kind-hip, [support for memory kinds on HIP-compatible devices (auto-detected with --enable-memory-kinds, otherwise disabled)], [enable_mk_hip="yes"; force_mk_hip="yes"], [enable_mk_hip="no"], [ if test "x$enable_kind_hip" = 'xprobe'; then enable_mk_hip="probe" elif test "$GASNETI_PTR_BITS" = 32; then enable_mk_hip="no" else enable_mk_hip="$enable_mk_default" enable_mk_hip_implicit=yes fi ]) unset have_mk_hip if test "$enable_mk_hip" != "no"; then AC_MSG_CHECKING(for target having HIP memory kinds support) if test "$GASNETI_PTR_BITS" = 32; then AC_MSG_RESULT([no (32-bit targets are not supported)]) have_mk_hip=no else have_mk_hip=no case "$target_cpu:$target_os" in x86_64:linux*) have_mk_hip='yes';; powerpc*:linux*) have_mk_hip='maybe';; aarch64:linux*) have_mk_hip='maybe';; esac if test "$have_mk_hip" = 'no'; then AC_MSG_RESULT([no (unsupported or unrecognized target $target)]) else AC_MSG_RESULT([$have_mk_hip]) fi fi if test "$have_mk_hip" != "no"; then GASNET_PACKAGE_HOME(HIP, [HIP developer tools], [hipcc], [/opt/rocm], [include/hip/hip_runtime.h]) GASNET_PACKAGE_CFLAGS(HIP) # UNDOCUMENTED option to enable use of HIP over CUDA *by GASNet maintainers*. # TODO: Eventually we should REMOVE or DOCUMENT hip_platform=amd GASNET_WITH_NOHELP(hip-platform, [ case "$withval" in amd|hcc) hip_platform='amd';; nvidia|nvcc) hip_platform='nvidia';; *) AC_MSG_ERROR([--with-hip-platform requires an argument (amd or nvidia)]) ;; esac ]) case "$hip_platform" in amd) GASNET_ENV_DEFAULT(HIP_LIBS, -lamdhip64) GASNET_PACKAGE_LDFLAGS(HIP, amdhip64) AC_DEFINE(GASNETI_HIP_PLATFORM_AMD) ;; nvidia) CHECK_PKG_CUDA() # HIP-over-CUDA sometimes depends on amdhip64 (version-dependent) # but always depends on functions from CUDA runtime (library name can vary). # libcudart is generally NOT in CUDA_LIBS, since the CUDA MK does not require it GASNET_ENV_DEFAULT(HIP_LIBS, -lamdhip64 -lcudart) # extra_cudart_flags ensures default HIP_LDFLAGS includes the CUDA libdir (for libcudart) # which notably may or may not be in CUDA_LDFLAGS (since CUDA only requires libcuda) extra_cudart_flags="-L$CUDA_HOME/lib64" if test -n "$cc_rpath_option" && test "x$enable_cuda_rpath" != "xno" && \ test "${enable_cuda_rpath}x${enabled_rpath}" != "xno" ; then extra_cudart_flags="$extra_cudart_flags $cc_rpath_option$CUDA_HOME/lib64" fi GASNET_PACKAGE_LDFLAGS(HIP, amdhip64, $extra_cudart_flags) # Suppress warnings when compiling gasnet_hip.c and testhip.c # due to "issues" in hip_runtime.h when parsed by a C compiler in # __HIP_PLATFORM_NVCC__ mode. unset HIP_NVCC_WARNFLAGS case "$CC_FAMILY" in Intel) # Deprecated decls: GASNET_TRY_CFLAG([${CC_WDFLAG}1478], [HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS ${CC_WDFLAG}1478"]) # "auto" becomes implicit int: GASNET_TRY_CFLAG([${CC_WDFLAG}303], [HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS ${CC_WDFLAG}303"]) ;; PGI|NVHPC) : # Currently warning-free, so avoid the noise of the -Wno probes ;; *) # GCC and Clang, plus their derivatives and work-alikes GASNET_TRY_WNO_FLAG([C],[-Wno-deprecated-declarations], [HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-deprecated-declarations"]) GASNET_TRY_WNO_FLAG([C],[-Wno-implicit-int], [HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-implicit-int"]) GASNET_TRY_WNO_FLAG([C],[-Wno-return-type], [HIP_NVCC_WARNFLAGS="$HIP_NVCC_WARNFLAGS -Wno-return-type"]) ;; esac HIP_LIBS="$HIP_LIBS $CUDA_LIBS" HIP_LDFLAGS="$HIP_LDFLAGS $CUDA_LDFLAGS" HIP_CFLAGS="$HIP_CFLAGS $CUDA_CFLAGS $HIP_NVCC_WARNFLAGS" AC_DEFINE(GASNETI_HIP_PLATFORM_NVIDIA) ;; esac GASNET_SPLIT_LINKER_OPTS(HIP_LDFLAGS,HIP_LIBS) # Try to compile and link a basic program using the HIP Driver API GASNET_PUSHVAR(CFLAGS,"$CFLAGS $HIP_CFLAGS") GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $HIP_LDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $HIP_LIBS") GASNET_TRY_CACHE_LINK(for working HIP configuration, libamdhip64_works, [ #if GASNETI_HIP_PLATFORM_NVIDIA #define __HIP_PLATFORM_NVCC__ // legacy #define __HIP_PLATFORM_NVIDIA__ #else #define __HIP_PLATFORM_HCC__ // legacy #define __HIP_PLATFORM_AMD__ #endif #include ], [ void *addr; hipInit(0); hipDevice_t dev = 0; hipPointerAttribute_t attr; hipError_t res; res = hipMalloc(&addr, 1024); res = hipPointerGetAttributes(&attr, addr); #if HIP_VERSION_MAJOR < 6 int bad = (attr.memoryType != hipMemoryTypeDevice) || attr.isManaged; #else int bad = (attr.type != hipMemoryTypeDevice) || attr.isManaged; #endif ], [ : ], [ have_mk_hip=no; GASNET_ERR_SAVE() ]) GASNET_POPVAR(LIBS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(CFLAGS) fi # If the probe(s) above passed on a target identified as "maybe" having # support, then upgrade to "yes" with a warning. if test "$have_mk_hip" = "maybe"; then have_mk_hip=yes GASNET_MSG_WARN([HIP memory kinds support enabled for $target, which may not be officially supported]) fi if test "$have_mk_hip" = "yes"; then AC_DEFINE(GASNETI_MK_CLASS_HIP_ENABLED) elif test "$force_mk_hip" = "yes"; then GASNET_MSG_ERROR([HIP memory kinds support was requested with --enable-kind-hip but is not available]) else unset HIP_CFLAGS unset HIP_LDFLAGS unset HIP_LIBS fi fi AC_SUBST(HIP_CFLAGS) AC_SUBST(HIP_LDFLAGS) AC_SUBST(HIP_LIBS) AM_CONDITIONAL(HAVE_MK_CLASS_HIP, test "$have_mk_hip" = "yes") # GEX_MK_CLASS_ZE enable_mk_ze_implicit=no GASNET_IF_ENABLED_WITH_AUTO(kind-ze, [Support for memory kinds on devices via oneAPI Level Zero (auto-detected with --enable-memory-kinds, otherwise disabled)], [enable_mk_ze="yes"; force_mk_ze="yes"], [enable_mk_ze="no"], [ if test "x$enable_kind_ze" = 'xprobe'; then enable_mk_ze="probe" elif test "$GASNETI_PTR_BITS" = 32; then enable_mk_ze="no" else enable_mk_ze="$enable_mk_default" enable_mk_ze_implicit=yes fi ]) unset have_mk_ze if test "$enable_mk_ze" != "no"; then AC_MSG_CHECKING(for target having Level Zero memory kinds support) if test "$GASNETI_PTR_BITS" = 32; then AC_MSG_RESULT([no (32-bit targets are not supported)]) have_mk_ze=no else have_mk_ze=no case "$target_cpu:$target_os" in x86_64:linux*) have_mk_ze='yes';; esac if test "$have_mk_ze" = 'no'; then AC_MSG_RESULT([no (unsupported or unrecognized target $target)]) else AC_MSG_RESULT([$have_mk_ze]) fi fi if test "$have_mk_ze" != "no"; then GASNET_PACKAGE_HOME(ZE, [oneAPI Level Zero], [ocloc], [/usr/local], [include/level_zero/ze_api.h]) GASNET_PACKAGE_CFLAGS(ZE) GASNET_ENV_DEFAULT(ZE_LIBS, -lze_loader) GASNET_PACKAGE_LDFLAGS(ZE, ze_loader) GASNET_SPLIT_LINKER_OPTS(ZE,ZE_LIBS) # Try to compile and link a basic program using the ZE APIs GASNET_PUSHVAR(CFLAGS,"$CFLAGS $ZE_CFLAGS") GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $ZE_LDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $ZE_LIBS") GASNET_TRY_CACHE_LINK(for working oneAPI Level Zero configuration, ze_works, [ #include ], [ ze_result_t res = zeInit(0); uint32_t count = 0; ze_driver_handle_t driver = NULL; (void) zeDriverGet(&count, &driver); ze_device_handle_t device = NULL; (void) zeDeviceGet(driver, &count, &device); ], [ : ], [ have_mk_ze=no; GASNET_ERR_SAVE() ]) GASNET_POPVAR(LIBS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(CFLAGS) fi if test "$have_mk_ze" = "yes"; then AC_DEFINE(GASNETI_MK_CLASS_ZE_ENABLED) GASNET_MSG_WARN([ oneAPI Level Zero memory kinds support has been enabled. This support is experimental and may have performance and correctness bugs.]) elif test "$force_mk_ze" = "yes"; then GASNET_MSG_ERROR([oneAPI Level Zero memory kinds support was requested with --enable-kind-ze but is not available]) else unset ZE_CFLAGS unset ZE_LDFLAGS unset ZE_LIBS fi fi AC_SUBST(ZE_CFLAGS) AC_SUBST(ZE_LDFLAGS) AC_SUBST(ZE_LIBS) AM_CONDITIONAL(HAVE_MK_CLASS_ZE, test "$have_mk_ze" = "yes") if test "x$enable_memory_kinds$have_mk_cuda_uva$have_mk_hip$have_mk_ze" = "xforcenonono"; then GASNET_MSG_ERROR([Memory kinds support enabled with --enable-memory-kinds=force, but no supported memory kind was found]) fi AC_DEFUN([MK_OUTPUT],[ pushdef([lowername],translit($1,'A-Z','a-z')) if test "$have_mk_[]lowername" = "yes"; then if test "$force_mk_[]lowername" = "yes"; then _mk_flagstr="ON (enabled)" else _mk_flagstr="ON (auto)" fi elif test "$enable_mk_[]lowername" = "probe"; then _mk_flagstr="OFF (not found)" elif test "$enable_mk_[]lowername[]_implicit" = "yes"; then _mk_flagstr="OFF (not enabled)" else _mk_flagstr="OFF (disabled)" fi echo " $2 m4_substr([ ],len($2))$_mk_flagstr" >> $CONDUIT_LIST popdef([lowername]) ]) cat >>$CONDUIT_LIST < ], [ usleep(500); ], AC_SEARCH_LIBS(usleep, posix4, AC_DEFINE(HAVE_USLEEP), AC_MSG_RESULT(entry point not found - disabled))) # Check for nanosleep GASNET_TRY_CACHE_CHECK(for nanosleep(), cc_has_nanosleep, [ #include #include ], [ struct timespec tm, tmremaining; tm.tv_sec =1; tm.tv_nsec = 1000000; nanosleep(&tm, &tmremaining); ], AC_SEARCH_LIBS(nanosleep, posix4, AC_DEFINE(HAVE_NANOSLEEP), AC_MSG_RESULT(entry point not found - disabled))) # Check for clock_nanosleep GASNET_TRY_CACHE_CHECK(for clock_nanosleep(), cc_has_clock_nanosleep, [ #include ], [ struct timespec tm, tmremaining; tm.tv_sec = 1; tm.tv_nsec = 1000000; clock_nanosleep(CLOCK_REALTIME, 0, &tm, &tmremaining); ], AC_SEARCH_LIBS(clock_nanosleep, [rt posix4], AC_DEFINE(HAVE_CLOCK_NANOSLEEP), AC_MSG_RESULT(entry point not found - disabled))) # Check for nsleep GASNET_TRY_CACHE_CHECK(for nsleep(), cc_has_nsleep, [ #include #include ], [ struct timespec tm, tmremaining; tm.tv_sec =1; tm.tv_nsec = 1000000; nsleep(&tm, &tmremaining); ], AC_SEARCH_LIBS(nsleep, posix4, AC_DEFINE(HAVE_NSLEEP), AC_MSG_RESULT(entry point not found - disabled))) # Check for sched_yield GASNET_TRY_CACHE_CHECK(for sched_yield(), cc_has_sched_yield, [ #include ], [ sched_yield(); ], AC_SEARCH_LIBS(sched_yield, posix4, AC_DEFINE(HAVE_SCHED_YIELD), AC_MSG_RESULT(entry point not found - disabled))) # Check for sigaction() *and* a definition of the SA_RESTART flag GASNET_TRY_CACHE_CHECK(for SA_RESTART, cc_has_sa_restart, [ #include ], [ struct sigaction act; act.sa_flags = SA_RESTART; int rc = sigaction(SIGTERM, &act, NULL); ], [ AC_DEFINE(GASNETI_HAVE_SA_RESTART) ]) # timer setup case "$target_os" in freebsd* | netbsd*) AC_MSG_CHECKING(for sysctl machdep.tsc_freq) res="`/sbin/sysctl -n machdep.tsc_freq 2> /dev/null`" if test "$res" != "" -a "$res" != 0; then AC_MSG_RESULT(yes: $res) AC_DEFINE(GASNETI_HAVE_SYSCTL_MACHDEP_TSC_FREQ) else AC_MSG_RESULT(no) fi ;; esac # PLPA enabled_plpa="no" if test "$cross_compiling" = "no" ; then case "$target_os" in linux*) if test "$GASNET_PLATFORM" = "wsl" ; then enabled_plpa="no" else enabled_plpa="yes" fi ;; esac else case "$target" in x86_64-cnl-linux*) enabled_plpa="yes";; esac fi if test "$enabled_plpa" = "yes"; then GASNET_IF_ENABLED_WITH_AUTO(plpa, [use PLPA for CPU binding (default is to probe)], [enabled_plpa="yes"; force_plpa="yes"], [enabled_plpa="no - user disabled"], [enabled_plpa="yes"]) if test "$enabled_plpa" = yes; then PLPA_SET_SYMBOL_PREFIX([gasneti_plpa_]) PLPA_INIT([enabled_plpa="yes"],[enabled_plpa="no - probe failed"]) fi AC_MSG_CHECKING(whether to use PLPA for cpu binding) AC_MSG_RESULT($enabled_plpa) if test "$enabled_plpa" = yes; then AC_DEFINE(HAVE_PLPA) elif test "$force_plpa" = yes; then AC_MSG_ERROR(User requested --enable-plpa but PLPA is not supported on your system) fi fi AM_CONDITIONAL(USE_PLPA,test "$enabled_plpa" = "yes") # HWLOC header and library GASNET_IF_ENABLED_WITH_AUTO(hwloc, hwloc library (auto-detected), enabled_hwloc_lib=yes, enabled_hwloc_lib=no, enabled_hwloc_lib=probe) have_hwloc_lib=no if test "$enabled_hwloc_lib" != no; then GASNET_PACKAGE_HOME(HWLOC, [hwloc], [hwloc-info], [/usr/local], [include/hwloc.h]) GASNET_PACKAGE_CFLAGS(HWLOC) GASNET_ENV_DEFAULT(HWLOC_LIBS, -lhwloc) GASNET_PACKAGE_LDFLAGS(HWLOC, hwloc) GASNET_SPLIT_LINKER_OPTS(HWLOC_LDFLAGS,HWLOC_LIBS) # Try to compile and link a basic program using hwloc GASNET_PUSHVAR(CFLAGS,"$CFLAGS $HWLOC_CFLAGS") GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $HWLOC_LDFLAGS") GASNET_PUSHVAR(LIBS,"$LIBS $HWLOC_LIBS") GASNET_TRY_CACHE_LINK(for libhwloc with API v1.0 or newer, libhwloc_works, [ #include #if HWLOC_API_VERSION < 0x010000 #error No support for 0.9 series #endif ], [ hwloc_topology_t topology; hwloc_topology_init(&topology); hwloc_topology_load(topology); ], [ have_hwloc_lib=yes ],[ HWLOC_CFLAGS="" HWLOC_LDFLAGS="" HWLOC_LIBS="" ]) GASNET_POPVAR(LIBS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(CFLAGS) if test "$have_hwloc_lib" = yes; then AC_DEFINE(GASNETI_HAVE_HWLOC_LIB) elif test "$enabled_hwloc_lib" = yes; then AC_MSG_ERROR(User requested --enable-hwloc but the required hwloc header or library were not found.) fi fi AC_SUBST(HWLOC_CFLAGS) AC_SUBST(HWLOC_LDFLAGS) AC_SUBST(HWLOC_LIBS) # HWLOC utilies: hwloc-{bind,calc} # Used as fallback if !have_hwloc_lib GASNET_IF_ENABLED_WITH_AUTO(hwloc-utils, hwloc utilities (auto-detected), enabled_hwloc_utils=yes, enabled_hwloc_utils=no, [ if test "$cross_compiling" = "no" || test "x$enable_hwloc_utils" = 'xprobe'; then enabled_hwloc_utils=probe else # utils on build system unlikely to represent the target enabled_hwloc_utils=no fi ]) have_hwloc_utils=no if test "$enabled_hwloc_utils" != no; then if test "$have_fork" = yes; then GASNET_ENV_DEFAULT(HWLOC_UTILS_HOME, , [Install prefix of hwloc command-line utilities (auto-detected from PATH)]) if test -n "$HWLOC_UTILS_HOME"; then hwloc_utils_path="$HWLOC_UTILS_HOME/bin" else hwloc_utils_path="$PATH" fi AC_PATH_PROGS(GASNETI_HWLOC_BIND_PATH, hwloc-bind, , $hwloc_utils_path) if test -n "$GASNETI_HWLOC_BIND_PATH" && test "$cross_compiling" = "no"; then # Require --get, added in hwloc 1.0 AC_MSG_CHECKING(for required features in hwloc-bind) if expr `$GASNETI_HWLOC_BIND_PATH --get 2>&1` : 0x >/dev/null 2>&1; then AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(GASNETI_HWLOC_BIND_PATH,"$GASNETI_HWLOC_BIND_PATH") else AC_MSG_RESULT(no) unset GASNETI_HWLOC_BIND_PATH fi fi AC_PATH_PROGS(GASNETI_HWLOC_CALC_PATH, hwloc-calc, , $hwloc_utils_path) if test -n "$GASNETI_HWLOC_CALC_PATH" && test "$cross_compiling" = "no"; then # Require --intersect, added in hwloc 1.1 AC_MSG_CHECKING(for required features in hwloc-calc) if $GASNETI_HWLOC_CALC_PATH --intersect Socket 0x0 /dev/null 2>&1; then AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(GASNETI_HWLOC_CALC_PATH,"$GASNETI_HWLOC_CALC_PATH") else AC_MSG_RESULT(no) unset GASNETI_HWLOC_CALC_PATH fi fi if test -n "$GASNETI_HWLOC_BIND_PATH" && test -n "$GASNETI_HWLOC_CALC_PATH"; then have_hwloc_utils=yes # Have both AC_DEFINE(GASNETI_HAVE_HWLOC_UTILS) if test "$cross_compiling" = "yes"; then GASNET_MSG_WARN([Utilities hwloc-bind and hwloc-calc have been located, as show above. However, their validation has been skipped due to cross-compilation.]) fi elif test "$enabled_hwloc_utils" = yes; then AC_MSG_ERROR(User requested --with-hwloc-utils but one or both of hwloc-calc or hwloc-bind was not found.) fi elif test "$enabled_hwloc_utils" = yes; then AC_MSG_ERROR(User requested --with-hwloc-utils but this option requires popen which $fork_reason.) fi fi if test "$have_hwloc_lib" = 'yes'; then hwloc_support='lib' elif test "$have_hwloc_utils" = 'yes'; then hwloc_support='utils' else hwloc_support='no' fi # AC_FUNC_MMAP # Check for mmap functionality we actually use if test "$cross_compiling" = "yes" ; then GASNET_CROSS_VAR(HAVE_MMAP,HAVE_MMAP) mmap_reason="was disabled" else case "$target_os" in cygwin*) # mmap is known to be broken on Cygwin - dont even try HAVE_MMAP=0 mmap_reason="is not supported on Cygwin" ;; *) # default to trying it HAVE_MMAP=1 ;; esac fi GASNET_IF_ENABLED_WITH_AUTO(mmap,[force the use or non-use of mmap (default to probe)], [ if test "$HAVE_MMAP" != "1" ; then GASNET_MSG_ERROR([--enable-mmap was passed, but mmap functionality $mmap_reason]) fi FORCE_MMAP=1 ], [ HAVE_MMAP=0 mmap_reason="was disabled" ], []) if test "$HAVE_MMAP" != "0" && test "$cross_compiling" = "no" ; then GASNET_TRY_CACHE_RUN(for working mmap(), have_mmap, [ #include #include #include #include #include #include #include #include char junk[[16384]]; int testfd(int); int main(void) { int fd, retval; #if 0 char filename[[255]]; tmpnam(filename); /* unsafe */ fd = open(filename, O_RDWR | O_CREAT); #else char filename[[255]]; if (getenv("TMPDIR")) strcpy(filename,getenv("TMPDIR")); else strcpy(filename,"/tmp"); strcat(filename,"/gasnet-conftemp-XXXXXX"); fd = [mkstemp(filename)]; /* leaves crap laying around */ #endif retval = testfd(fd); close(fd); remove(filename); return retval; } int testfd(int fd) { void *ptr,*ptr2; if (fd == -1) return 1; if (write(fd, junk, 16384) == -1) return 2; ptr = mmap(0, 16384, (PROT_READ|PROT_WRITE), MAP_PRIVATE, fd, 0); if (ptr == MAP_FAILED || ptr == NULL) return 3; if (munmap(ptr,16384) != 0) return 4; ptr2 = mmap(ptr, 16384, (PROT_READ|PROT_WRITE), (MAP_PRIVATE | MAP_FIXED), fd, 0); if (ptr2 == MAP_FAILED || ptr2 == NULL || ptr2 != ptr) return 5; if (munmap(ptr,16384) != 0) return 6; return 0; }],[ HAVE_MMAP=1 ],[ HAVE_MMAP=0 if test "$FORCE_MMAP" = "1" ; then GASNET_MSG_ERROR([--enable-mmap was passed, but mmap functionality test failed]) fi mmap_reason="test failed" ]) fi if test "$HAVE_MMAP" != "0" ; then AC_DEFINE(HAVE_MMAP) # bug 1763: find the right mmap flags (which may be enum values or const vars) GASNET_TRY_CACHE_LINK([for MAP_NORESERVE],map_noreserve, [ #include ],[ void *junk = mmap(0, 0, 0, MAP_NORESERVE, 0, 0); ], [ AC_DEFINE(HAVE_MAP_NORESERVE) ] ) GASNET_TRY_CACHE_LINK([for MAP_ANONYMOUS],map_anonymous, [ #include ],[ void *junk = mmap(0, 0, 0, MAP_ANONYMOUS, 0, 0); ], [ AC_DEFINE(HAVE_MAP_ANONYMOUS) ] ) GASNET_TRY_CACHE_LINK([for MAP_ANON],map_anon, [ #include ],[ void *junk = mmap(0, 0, 0, MAP_ANON, 0, 0); ], [ AC_DEFINE(HAVE_MAP_ANON) ] ) dnl GASNET_TOOLSONLY_FALSE_BEGIN GASNET_IF_ENABLED(bug3480-workaround,[See smp-conduit README],[ AC_DEFINE(GASNETI_BUG3480_WORKAROUND) if test "$GASNETI_DISABLE_ALIGNED_SEGMENTS" != 1 && \ test "$segconfig" != everything; then GASNET_MSG_WARN([--enable-bug3480-workaround is incompatible with GASNET_ALIGNED_SEGMENTS -- automatically applying option --disable-aligned-segments.]) GASNETI_DISABLE_ALIGNED_SEGMENTS=1 AC_DEFINE(GASNETI_DISABLE_ALIGNED_SEGMENTS) fi ]) elif expr "$target_os" : 'cygwin' >/dev/null 2>&1; then : # Cygwin uses mmap() for PSHM even though it is not supported in general else # PSHM over SysV doesn't require mmap(), but the rest do case "$with_pshm" in no|sysv) ;; *) GASNET_MSG_ERROR([PSHM was enabled, but required mmap functionality $mmap_reason]) ;; esac dnl GASNET_TOOLSONLY_FALSE_END fi dnl GASNET_TOOLSONLY_FALSE_BEGIN # Set a site-default for GASNET_HOST_DETECT GASNET_WITH(host-detect, [Default value for GASNET_HOST_DETECT (default is system and network dependent)], [case "$withval" in conduit|hostname|gethostid) AC_DEFINE_UNQUOTED(GASNETI_HOST_DETECT_CONFIGURE, "$withval") ;; *) GASNET_MSG_ERROR(User requested --with-host-detect='$withval', but that is not a supported value.) ;; esac]) # Determine the default GASNET_MAX_SEGSIZE string if test "$with_pshm" = "no" && test "$HAVE_MMAP" = 0 ; then GASNETI_MAX_SEGSIZE_DEFAULT="100MB/P" # rare malloc-based platforms else GASNETI_MAX_SEGSIZE_DEFAULT="0.85/H" # most platforms fi GASNET_WITH_NOHELP(segment-mmap-max, GASNET_MSG_WARN([Obsolete option --with-segment-mmap-max ignored. See --help for --with-max-segsize])) GASNET_WITH(max-segsize, [Upper bound for GASNet segment utilization. Can be absolute size or fraction of physmem. Suffix denotes per-process or per-host limit (ex: "2GB/P", "0.85/H")], [# this is an overly-permissive pattern, just here to detect obviously invalid values if echo "$withval" | $PERL -ne '$_ =~ s@[[\s/]]@@g; exit (m@^\d+(\.\d*)?([[kmgt]]?b?)?[[ph]]?$@i ? 1 : 0)' ; then AC_MSG_ERROR(Illegal value for --with-max-segsize=$withval) fi AC_DEFINE_UNQUOTED(GASNETI_MAX_SEGSIZE_CONFIGURE, "$withval") ], [AC_MSG_ERROR(--without-max-segsize is not supported)], [AC_DEFINE_UNQUOTED(GASNETI_MAX_SEGSIZE_CONFIGURE, "$GASNETI_MAX_SEGSIZE_DEFAULT")]) dnl GASNET_TOOLSONLY_FALSE_END dnl Check for ptmalloc's mallopt() to work aroung bugs 495 and 955 AC_CHECK_HEADERS([malloc.h]) GASNET_TRY_CACHE_LINK(for ptmalloc, malloc_is_ptmalloc, [ #if HAVE_STDLIB_H #include #endif #if HAVE_MALLOC_H #include #endif ],[ mallopt(M_TRIM_THRESHOLD, -1); mallopt(M_MMAP_MAX, 0); ],[ AC_DEFINE(HAVE_PTMALLOC) ]) AC_CHECK_FUNCS(posix_memalign) DEBUGMALLOC_VAR=GASNET_unused DEBUGMALLOC_VAL=0 case "$target" in *-openbsd*) debugmalloc_support=yes DEBUGMALLOC_VAR=MALLOC_OPTIONS DEBUGMALLOC_VAL=FJ # (F)reeguard (J)unk-fill openbsd_major=`expr \`uname -r\` : '\([[1-9]]*\).'` if test $openbsd_major -ge 5; then DEBUGMALLOC_VAL="${DEBUGMALLOC_VAL}S" # (S)ecurity auditing - added in 5.0 fi if test $openbsd_major -lt 6; then DEBUGMALLOC_VAL="${DEBUGMALLOC_VAL}A" # (A)bort - removed in 6.0 fi ;; *-freebsd* | *-netbsd*) debugmalloc_support=yes DEBUGMALLOC_VAR=MALLOC_OPTIONS DEBUGMALLOC_VAL=AJ # (A)bort (J)unk-fill ;; #*-solaris*) Not willing to mess w/ dynamic linker tricks -PHH # debugmalloc_support=yes # DEBUGMALLOC_VAR=LD_PRELOAD # DEBUGMALLOC_VAL=watchmalloc.so.1 # ;; #*-darwin*) Not willing to mess w/ dynamic linker tricks, plus need up to 9 more vars -PHH # debugmalloc_support=yes # DEBUGMALLOC_VAR=DYLD_INSERT_LIBRARIES # DEBUGMALLOC_VAL=/usr/lib/libgmalloc.dylib # ;; *) # MALLOC_CHECK_ is a glibc feature (but appears harmless elsewhere) # However, we need to weed out known buggy versions (see bug 2731) GASNET_TRY_CACHE_EXTRACT_STR([for glibc],glibc_version,[ #if HAVE_FEATURES_H #include #endif #ifndef _STRINGIFY #define _STRINGIFY_HELPER(x) #x #define _STRINGIFY(x) _STRINGIFY_HELPER(x) #endif #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) #define GASNETI_GLIBC_VERSION _STRINGIFY(__GLIBC__) "." _STRINGIFY(__GLIBC_MINOR__) #elif defined(__GLIBC__) #define GASNETI_GLIBC_VERSION _STRINGIFY(__GLIBC__) #else #define GASNETI_GLIBC_VERSION "no" #endif ],[GASNETI_GLIBC_VERSION],[GASNETI_GLIBC_VERSION]) if test x"$GASNETI_GLIBC_VERSION" != xno; then DEBUGMALLOC_VAR=MALLOC_CHECK_ DEBUGMALLOC_VAL=2 # Look for buggy versions, but keep in mind --enable-system-debug-malloc will override case $GASNETI_GLIBC_VERSION in 2.5) debugmalloc_support=no;; # Known buggy in 2.5-42 which orginated in RHEL5.4 (fine tune?) 2.10) debugmalloc_support=no;; # Known buggy 2.11) debugmalloc_support=no;; # Known buggy, but 2.11.1 is OK (TODO: identify >= 2.11.1) *) debugmalloc_support=yes;; esac fi ;; esac GASNET_IF_ENABLED_WITH_AUTO(system-debug-malloc, [enable use of system-specific debugging malloc if available (default is system dependent)], [DEBUGMALLOC="yes"], [DEBUGMALLOC="no"], [DEBUGMALLOC="$debugmalloc_support"]) AM_CONDITIONAL(DEBUGMALLOC,test "$DEBUGMALLOC" = "yes") AC_SUBST(DEBUGMALLOC) AC_SUBST(DEBUGMALLOC_VAR) AC_SUBST(DEBUGMALLOC_VAL) GASNET_TRY_CACHE_LINK(for __func__, cc_has_func, [], [const char* p = __func__;], AC_DEFINE(HAVE_FUNC)) ######################################################################## ## Misc Header checks AC_CHECK_HEADERS(sys/param.h) ######################################################################## ## ## Supporting Command-Line Tools (continued) ## if test x"$BOURNE_SHELL" = x; then BOURNE_SHELL="/bin/sh" fi if test "$cross_compiling" = yes ; then CROSS_NM="${CROSS_NM:-${target_alias}-nm}" CROSS_AR="${CROSS_AR:-${target_alias}-ar}" CROSS_RANLIB="${CROSS_RANLIB:-${target_alias}-ranlib}" fi # we want but do not require nm AC_PATH_PROGS(NM, $NM $CROSS_NM nm) AC_MSG_CHECKING(for GNU nm) if test "`${NM:-nm} --version 2>&1 | grep GNU`" = "" ; then gnu_nm=no else gnu_nm=yes fi AC_MSG_RESULT($gnu_nm) AM_CONDITIONAL(GNU_NM, test "$gnu_nm" = "yes") GASNET_PATH_PROGS(AR, $CROSS_AR ar gar, archiver) GASNET_PATH_PROGS(RANLIB, $CROSS_RANLIB ranlib touch, ranlib) case "$target_os" in darwin*) RANLIB="$RANLIB -s -c" ;; # ensure correct common block behavior on darwin esac GASNET_PATH_PROGS(BASENAME, basename, basename) GASNET_PATH_PROGS(DIRNAME, dirname, dirname) # Some platforms are lacking readlink, and we currently do not require it AC_PATH_PROGS(READLINK, $READLINK readlink) # other optional commands AC_PATH_PROGS(TIMECMD, $TIMECMD time, , /usr/bin:${PATH}) AC_PATH_PROGS(ENVCMD, $ENVCMD env, , /usr/bin:${PATH}) AC_SUBST(BOURNE_SHELL) AC_SUBST(AR) AC_SUBST(NM) AC_SUBST(RANLIB) AC_SUBST(BASENAME) AC_SUBST(DIRNAME) AC_SUBST(READLINK) AC_SUBST(TIMECMD) AC_SUBST(ENVCMD) ######################################################################## # complete linker setup NOASLR_LDFLAGS= case "$target_os" in darwin*) if test "$CC_FAMILY$CC_SUBFAMILY" = 'GNUNVIDIA'; then dash_Wl='-Xlinker ' else dash_Wl='-Wl,' fi tmp_ver=`expr "$target_os" : 'darwin\([[0-9]]*\)' 2>/dev/null` # Darwin linker may complain about symbols defined in multiple dynamic libs. # This is a minor annoyance in some cases, however it becomes a fatal error # when linking with the mpich libs. # The `-multiply_defined suppress` linker option has been documented as # obsolete since Darwin 9 (MacOSX Leopard, Oct 2007) and has since (as of # Apple clang 15 / macOS Ventura / Darwin 22) begun to generate linker # warnings (see bug 4677). # To detect such warnings, we could use GASNET_TRY_LDFLAG() if such existed. # However, this OS version check should be sufficient: AC_MSG_CHECKING([for -multiply_defined linker option]) if expr $tmp_ver \< 22 >/dev/null; then AC_MSG_RESULT(yes) LDFLAGS="$LDFLAGS ${dash_Wl}-multiply_defined,suppress" else AC_MSG_RESULT(no) fi # Darwin 11 (MacOSX Lion) and newer use address-space randomization by default # But -no_pie is ignored (with a warning) on aarch64 # and on x86_64 starting with Darwin 21 tmp_ver=`expr "$target_os" : 'darwin\([[0-9]]*\)' 2>/dev/null` if test $target_cpu = aarch64; then : # not supported for this arch elif expr $tmp_ver \< 11 >/dev/null; then : # too old elif expr $tmp_ver \>= 21 >/dev/null; then : # too new else NOASLR_LDFLAGS="${dash_Wl}-no_pie" fi ;; openbsd*) # OpenBSD PIE-by-default breaks aligned segments and upcr linker segment (bug 3248) NOASLR_LDFLAGS='-nopie' GASNET_PUSHVAR(LDFLAGS,"$LDFLAGS $NOASLR_LDFLAGS") GASNET_TRY_CACHE_LINK(if linker supports '$NOASLR_LDFLAGS', ld_has_nopie, [], [], [], [NOASLR_LDFLAGS='']) GASNET_POPVAR(LDFLAGS) ;; esac if test "$GASNETI_DISABLE_ALIGNED_SEGMENTS" != 1 ; then LDFLAGS="$LDFLAGS $NOASLR_LDFLAGS" fi AC_SUBST(NOASLR_LDFLAGS) ######################################################################## # Figure out how to install config files GASNET_SET_INSTALL_CMD TOOL_PREFIX=gasnet GASNET_WITH(tool-prefix, [Naming prefix to use for contributed tools], TOOL_PREFIX=$withval) AC_SUBST(TOOL_PREFIX) dnl GASNET_TOOLSONLY_FALSE_BEGIN ######################################################################## # Optional "third-party" libraries ## This section is currently empty dnl GASNET_TOOLSONLY_FALSE_END ######################################################################## ## ## Final Output ## # TODO: exclude platforms where RPATH is "not a thing" if test -n "$warn_missing_rpath"; then GASNET_MSG_WARN([I do not know how to encode an RPATH for your system. Had support been present, the following conduits or packages would have used an RPATH:$warn_missing_rpath.]) fi GASNET_FIX_EXEC(smp-conduit/contrib/gasnetrun_smp) GASNET_FIX_EXEC(mpi-conduit/contrib/gasnetrun_mpi) GASNET_FIX_EXEC(ibv-conduit/contrib/gasnetrun_ibv) GASNET_FIX_EXEC(ofi-conduit/contrib/gasnetrun_ofi) GASNET_FIX_EXEC(ucx-conduit/contrib/gasnetrun_ucx) GASNET_FIX_EXEC(other/contrib/gasnet_trace) if test "$gasnet_toolsonly_mode" = "no" ; then cat >>$CONDUIT_LIST <>$CONDUIT_LIST <> $CONDUIT_LIST # The following intentionally mirror the definitions in conduit fragments # These are intentionally non-additive, to help ensure configure checks add things to the # appropriate sub-variable and NOT add things directly to CFLAGS which gets overwritten # Do NOT change the following lines!!! CFLAGS="$GASNET_OPT_CFLAGS $MISC_CFLAGS" CPPFLAGS="$GASNET_EXTRA_DEFINES $MISC_CPPFLAGS" CXXFLAGS="$GASNET_OPT_CXXFLAGS $MISC_CXXFLAGS" GASNET_SPLIT_LINKER_OPTS(LDFLAGS,LIBS) AC_SUBST(LDFLAGS) AC_SUBST(LIBS) # Files added here should also be added to ./unBootstrap # ORDER MATTERS: The order here determines the order of timestamps post-configure, # so ideally Makefile include dependencies should be honored, to prevent redundant # rebuilds of Makefiles during the first build GASNET_END_CONFIGURE() AC_OUTPUT( other/perlstart dnl must precede Perl scripts that use it config-aux/Makefile other/Makefile other/Makefile-libgasnet.mak dnl should precede conduit Makefiles other/gasnet_tools-fragment.mak tests/Makefile dnl should precede conduit Makefiles Makefile dnl should follow Makefile-libgasnet dnl GASNET_TOOLSONLY_FALSE_BEGIN other/mpirun_common dnl must precede gasnetrun scripts that use it dnl All of these should precede conduit Makefiles that use them other/fragment-head.mak other/fragment-body.mak other/Makefile-conduit.mak dnl should follow other/Makefile-libgasnet.mak other/ammpi/Makefile other/amudp/Makefile other/contrib/Makefile other/contrib/gasnet_trace other/firehose/Makefile other/firehose/firehose.mak other/valgrind/Makefile dnl Conduit Makefiles and scripts mpi-conduit/Makefile mpi-conduit/conduit.mak mpi-conduit/contrib/Makefile mpi-conduit/contrib/gasnetrun_mpi udp-conduit/Makefile udp-conduit/conduit.mak smp-conduit/Makefile smp-conduit/conduit.mak smp-conduit/contrib/Makefile smp-conduit/contrib/gasnetrun_smp ibv-conduit/Makefile ibv-conduit/conduit.mak ibv-conduit/contrib/Makefile ibv-conduit/contrib/gasnetrun_ibv ucx-conduit/Makefile ucx-conduit/conduit.mak ucx-conduit/contrib/Makefile ucx-conduit/contrib/gasnetrun_ucx ofi-conduit/Makefile ofi-conduit/conduit.mak ofi-conduit/contrib/Makefile ofi-conduit/contrib/gasnetrun_ofi dnl GASNET_TOOLSONLY_FALSE_END , GASNET_FIX_EXEC_OUTPUT() GASNET_SANITIZE_PACKAGE(gasnet_config.h) GASNET_TRUE_UNDEF(gasnet_config.h) [ GASNET_MSG_WARN_FINISH() CONDUIT_LIST=.gasnet-conduit-list.tmp CONDUIT_LIST_FILE() if test -f "$CONDUIT_LIST" ; then if test "$CONDUIT_LIST_SUPPRESS" != "yes" ; then cat $CONDUIT_LIST fi if test "$CONDUIT_LIST_CLEAN" != "yes" ; then rm -f $CONDUIT_LIST fi fi ] , PERL="$PERL" # for GASNET_TRUE_UNDEF GASNET_FIX_EXEC_SETUP() ) dnl GASNET_SUPPRESS_HELPVAR() gasnet-2025.8.0/acconfig.h0000664000175000017500000004060015142313673015344 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/acconfig.h $ */ /* Description: GASNet acconfig.h (or config.h) */ /* Copyright 2002, Dan Bonachea */ /* Terms of use are as specified in license.txt */ #ifndef _INCLUDE_GASNET_CONFIG_H_ #define _INCLUDE_GASNET_CONFIG_H_ #if !defined(_IN_GASNETEX_H) && !defined(_IN_GASNET_TOOLS_H) #error This file is not meant to be included directly- clients should include gasnetex.h or gasnet_tools.h #endif @TOP@ #undef GASNETI_BUILD_ID #undef GASNETI_CONFIGURE_ARGS #undef GASNETI_SYSTEM_TUPLE #undef GASNETI_SYSTEM_NAME #undef GASNETI_CROSS_COMPILING /* version identifiers */ #undef GASNET_RELEASE_VERSION_MAJOR #undef GASNET_RELEASE_VERSION_MINOR #undef GASNET_RELEASE_VERSION_PATCH #undef GASNETI_RELEASE_VERSION #undef GASNETI_SPEC_VERSION_MAJOR #undef GASNETI_SPEC_VERSION_MINOR #undef GASNETI_TOOLS_SPEC_VERSION_MAJOR #undef GASNETI_TOOLS_SPEC_VERSION_MINOR #undef GASNETI_EX_SPEC_VERSION_MAJOR #undef GASNETI_EX_SPEC_VERSION_MINOR /* configure-detected conduits */ #undef GASNETI_CONDUITS /* CC attributes support */ #undef GASNETI_HAVE_CC_ATTRIBUTE #undef GASNETI_HAVE_CC_ATTRIBUTE_ALWAYSINLINE #undef GASNETI_HAVE_CC_ATTRIBUTE_NOINLINE #undef GASNETI_HAVE_CC_ATTRIBUTE_MALLOC #undef GASNETI_HAVE_CC_ATTRIBUTE_WARNUNUSEDRESULT #undef GASNETI_HAVE_CC_ATTRIBUTE_USED #undef GASNETI_HAVE_CC_ATTRIBUTE_MAYALIAS #undef GASNETI_HAVE_CC_ATTRIBUTE_NORETURN #undef GASNETI_HAVE_CC_ATTRIBUTE_PURE #undef GASNETI_HAVE_CC_ATTRIBUTE_CONST #undef GASNETI_HAVE_CC_ATTRIBUTE_HOT #undef GASNETI_HAVE_CC_ATTRIBUTE_COLD #undef GASNETI_HAVE_CC_ATTRIBUTE_DEPRECATED #undef GASNETI_HAVE_CC_ATTRIBUTE_COMMON #undef GASNETI_HAVE_CC_ATTRIBUTE_FALLTHROUGH #undef GASNETI_HAVE_CC_ATTRIBUTE_FORMAT #undef GASNETI_HAVE_CC_ATTRIBUTE_FORMAT_FUNCPTR #undef GASNETI_HAVE_CC_ATTRIBUTE_FORMAT_FUNCPTR_ARG #undef GASNETI_HAVE_CC_PRAGMA_GCC_DIAGNOSTIC /* CXX attributes support */ #undef GASNETI_HAVE_CXX_ATTRIBUTE #undef GASNETI_HAVE_CXX_ATTRIBUTE_ALWAYSINLINE #undef GASNETI_HAVE_CXX_ATTRIBUTE_NOINLINE #undef GASNETI_HAVE_CXX_ATTRIBUTE_MALLOC #undef GASNETI_HAVE_CXX_ATTRIBUTE_WARNUNUSEDRESULT #undef GASNETI_HAVE_CXX_ATTRIBUTE_USED #undef GASNETI_HAVE_CXX_ATTRIBUTE_MAYALIAS #undef GASNETI_HAVE_CXX_ATTRIBUTE_NORETURN #undef GASNETI_HAVE_CXX_ATTRIBUTE_PURE #undef GASNETI_HAVE_CXX_ATTRIBUTE_CONST #undef GASNETI_HAVE_CXX_ATTRIBUTE_HOT #undef GASNETI_HAVE_CXX_ATTRIBUTE_COLD #undef GASNETI_HAVE_CXX_ATTRIBUTE_DEPRECATED #undef GASNETI_HAVE_CXX_ATTRIBUTE_COMMON #undef GASNETI_HAVE_CXX_ATTRIBUTE_FALLTHROUGH #undef GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT #undef GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT_FUNCPTR #undef GASNETI_HAVE_CXX_ATTRIBUTE_FORMAT_FUNCPTR_ARG #undef GASNETI_HAVE_CXX_PRAGMA_GCC_DIAGNOSTIC /* C++11 attribute support */ #undef GASNETI_HAVE_CXX_CXX11_ATTRIBUTE #undef GASNETI_HAVE_CXX_CXX11_ATTRIBUTE_FALLTHROUGH #undef GASNETI_HAVE_CXX_CXX11_ATTRIBUTE_CLANG__FALLTHROUGH /* MPI_CC attributes support */ #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_ALWAYSINLINE #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_NOINLINE #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_MALLOC #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_WARNUNUSEDRESULT #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_USED #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_MAYALIAS #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_NORETURN #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_PURE #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_CONST #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_HOT #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_COLD #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_DEPRECATED #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_COMMON #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_FALLTHROUGH #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT_FUNCPTR #undef GASNETI_HAVE_MPI_CC_ATTRIBUTE_FORMAT_FUNCPTR_ARG #undef GASNETI_HAVE_MPI_CC_PRAGMA_GCC_DIAGNOSTIC /* identification of the C compiler used at configure time */ #undef GASNETI_PLATFORM_COMPILER_IDSTR #undef GASNETI_PLATFORM_COMPILER_FAMILYID #undef GASNETI_PLATFORM_COMPILER_ID #undef GASNETI_PLATFORM_COMPILER_VERSION #undef GASNETI_PLATFORM_COMPILER_C_LANGLVL /* identification of the C++ compiler used at configure time */ #undef GASNETI_PLATFORM_CXX_IDSTR #undef GASNETI_PLATFORM_CXX_FAMILYID #undef GASNETI_PLATFORM_CXX_ID #undef GASNETI_PLATFORM_CXX_VERSION #undef GASNETI_PLATFORM_CXX_CXX_LANGLVL /* identification of the MPI C compiler used at configure time */ #undef GASNETI_PLATFORM_MPI_CC_IDSTR #undef GASNETI_PLATFORM_MPI_CC_FAMILYID #undef GASNETI_PLATFORM_MPI_CC_ID #undef GASNETI_PLATFORM_MPI_CC_VERSION #undef GASNETI_PLATFORM_MPI_CC_C_LANGLVL #undef GASNETI_MPI_VERSION #undef HAVE_MPI_INIT_THREAD #undef HAVE_MPI_QUERY_THREAD /* Defined to be the inline function modifier supported by the C compilers (if supported), prefixed by 'static' (if permitted) */ #undef GASNETI_CC_INLINE_MODIFIER #undef GASNETI_MPI_CC_INLINE_MODIFIER /* C, C++ and MPI_CC compilers 'restrict' keywords (or empty) */ #undef GASNETI_CC_RESTRICT #undef GASNETI_CXX_RESTRICT #undef GASNETI_MPI_CC_RESTRICT /* C, C++ and MPI_CC compilers misc builtins */ /* has __assume */ #undef GASNETI_HAVE_CC_ASSUME #undef GASNETI_HAVE_CXX_ASSUME #undef GASNETI_HAVE_MPI_CC_ASSUME /* has __builtin_assume */ #undef GASNETI_HAVE_CC_BUILTIN_ASSUME #undef GASNETI_HAVE_CXX_BUILTIN_ASSUME #undef GASNETI_HAVE_MPI_CC_BUILTIN_ASSUME /* has __builtin_unreachable */ #undef GASNETI_HAVE_CC_BUILTIN_UNREACHABLE #undef GASNETI_HAVE_CXX_BUILTIN_UNREACHABLE #undef GASNETI_HAVE_MPI_CC_BUILTIN_UNREACHABLE /* has __builtin_expect */ #undef GASNETI_HAVE_CC_BUILTIN_EXPECT #undef GASNETI_HAVE_CXX_BUILTIN_EXPECT #undef GASNETI_HAVE_MPI_CC_BUILTIN_EXPECT /* has __builtin_constant_p */ #undef GASNETI_HAVE_CC_BUILTIN_CONSTANT_P #undef GASNETI_HAVE_CXX_BUILTIN_CONSTANT_P #undef GASNETI_HAVE_MPI_CC_BUILTIN_CONSTANT_P /* has __builtin_prefetch */ #undef GASNETI_HAVE_CC_BUILTIN_PREFETCH #undef GASNETI_HAVE_CXX_BUILTIN_PREFETCH #undef GASNETI_HAVE_MPI_CC_BUILTIN_PREFETCH /* Which inline asm style(s) are supported - these are defined only where we use configure to determine what a compiler supports */ #undef GASNETI_HAVE_CC_GCC_ASM #undef GASNETI_HAVE_CXX_GCC_ASM #undef GASNETI_HAVE_MPI_CC_GCC_ASM #undef GASNETI_HAVE_CC_SIMPLE_ASM #undef GASNETI_HAVE_CXX_SIMPLE_ASM #undef GASNETI_HAVE_MPI_CC_SIMPLE_ASM /* Which non-native atomics are available */ #undef GASNETI_HAVE_CC_SYNC_ATOMICS_32 #undef GASNETI_HAVE_CXX_SYNC_ATOMICS_32 #undef GASNETI_HAVE_MPI_CC_SYNC_ATOMICS_32 #undef GASNETI_HAVE_CC_SYNC_ATOMICS_64 #undef GASNETI_HAVE_CXX_SYNC_ATOMICS_64 #undef GASNETI_HAVE_MPI_CC_SYNC_ATOMICS_64 /* Which atomics implementations are built in tools library */ #undef GASNETI_ATOMIC_IMPL_CONFIGURE #undef GASNETI_ATOMIC32_IMPL_CONFIGURE #undef GASNETI_ATOMIC64_IMPL_CONFIGURE /* Decoration, if any, needed for in-library tentative definitions */ #undef GASNETI_COMMON /* Does CXX support C99 __VA_ARGS__ */ #undef GASNETI_CXX_HAS_VA_ARGS /* Defined if __PIC__ defined at configure time */ #undef GASNETI_CONFIGURED_PIC /* true iff GASNETI_RESTRICT may be applied to types which are not pointer types until after typedef expansion */ #undef GASNETI_CC_RESTRICT_MAY_QUALIFY_TYPEDEFS #undef GASNETI_CXX_RESTRICT_MAY_QUALIFY_TYPEDEFS #undef GASNETI_MPI_CC_RESTRICT_MAY_QUALIFY_TYPEDEFS /* have mmap() */ #undef HAVE_MMAP /* mmap supporting flags */ #undef HAVE_MAP_NORESERVE #undef HAVE_MAP_ANON #undef HAVE_MAP_ANONYMOUS /* avoid mmap()-after-munmap() failures */ #undef GASNETI_BUG3480_WORKAROUND /* --with-max-segsize value (possibly defaulted) */ #undef GASNETI_MAX_SEGSIZE_CONFIGURE /* --with-max-threads value (if given) */ #undef GASNETI_MAX_THREADS_CONFIGURE /* --with-maxeps value (if given) */ #undef GASNETI_MAXEPS_CONFIGURE /* memory kinds support */ #undef GASNETI_MK_CLASS_CUDA_UVA_ENABLED #undef GASNETI_MK_CLASS_HIP_ENABLED #undef GASNETI_MK_CLASS_ZE_ENABLED /* HIP platform */ #undef GASNETI_HIP_PLATFORM_AMD #undef GASNETI_HIP_PLATFORM_NVIDIA /* has clock_gettime() */ #undef HAVE_CLOCK_GETTIME /* has usleep() */ #undef HAVE_USLEEP /* has nanosleep() */ #undef HAVE_NANOSLEEP /* has clock_nanosleep() */ #undef HAVE_CLOCK_NANOSLEEP /* has nsleep() */ #undef HAVE_NSLEEP /* has sched_yield() */ #undef HAVE_SCHED_YIELD /* has sigaction() and a definition of the SA_RESTART flag */ #undef GASNETI_HAVE_SA_RESTART /* have sysctl machdep.tsc_freq */ #undef GASNETI_HAVE_SYSCTL_MACHDEP_TSC_FREQ /* has Portable Linux Processor Affinity */ #undef HAVE_PLPA /* Portable Hardware Locality (hwloc) library and command-line utils */ #undef GASNETI_HAVE_HWLOC_LIB #undef GASNETI_HAVE_HWLOC_UTILS #undef GASNETI_HWLOC_BIND_PATH #undef GASNETI_HWLOC_CALC_PATH /* have ptmalloc's mallopt() options */ #undef HAVE_PTMALLOC /* has posix_memalign() */ #undef HAVE_POSIX_MEMALIGN /* have declarations/definitions */ #undef HAVE_SETENV_DECL #undef HAVE_UNSETENV_DECL #undef HAVE_SNPRINTF_DECL #undef HAVE_VSNPRINTF_DECL #undef HAVE_ISBLANK_DECL #undef HAVE_ISASCII_DECL #undef HAVE_TOASCII_DECL /* Have C99 %z and %t printf format specifiers */ /* allow command-line override for theoretical system that links more than one printf impl */ #ifndef HAVE_C99_FORMAT_SPECIFIERS #undef HAVE_C99_FORMAT_SPECIFIERS #endif /* ctype.h needs wrappers */ #undef GASNETI_NEED_CTYPE_WRAPPERS /* Forbidden to use fork(), popen() and system()? */ #undef GASNETI_NO_FORK /* building Process SHared Memory support? For which API? */ #undef GASNETI_PSHM_ENABLED #undef GASNETI_PSHM_POSIX #undef GASNETI_PSHM_SYSV #undef GASNETI_PSHM_FILE #undef GASNETI_PSHM_XPMEM /* Set default for GASNET_HOST_DETECT env var */ #undef GASNETI_HOST_DETECT_CONFIGURE /* How many cores/node must we support (255 is default) */ #undef GASNETI_CONFIG_PSHM_MAX_NODES /* hugetlbfs support available */ #undef HAVE_HUGETLBFS /* hugetlbfs support enabled */ #undef GASNETI_USE_HUGETLBFS /* support for backtracing */ #undef HAVE_EXECINFO_H #undef HAVE_BACKTRACE #undef HAVE_BACKTRACE_SYMBOLS #undef HAVE_PRINTSTACK #undef ADDR2LINE_PATH #undef GDB_PATH #undef GSTACK_PATH #undef PSTACK_PATH #undef PGDBG_PATH #undef IDB_PATH #undef DBX_PATH #undef LLDB_PATH /* have pthread_setconcurrency */ #undef HAVE_PTHREAD_SETCONCURRENCY /* has pthread_kill() */ #undef HAVE_PTHREAD_KILL /* has pthread_kill_other_threads_np() */ #undef HAVE_PTHREAD_KILL_OTHER_THREADS_NP /* have pthread_setconcurrency */ #undef HAVE_PTHREAD_SIGMASK /* has pthread rwlock support */ #undef GASNETI_HAVE_PTHREAD_RWLOCK /* has __thread thread-local-storage support */ #undef GASNETI_HAVE_TLS_SUPPORT /* force threadinfo optimization ON or OFF */ #undef GASNETI_THREADINFO_OPT_CONFIGURE /* pause instruction, if any */ #undef GASNETI_PAUSE_INSTRUCTION /* How to name MIPS assembler temporary register in inline asm, if at all */ #undef GASNETI_HAVE_MIPS_REG_1 #undef GASNETI_HAVE_MIPS_REG_AT /* has ARM kernel-level support for cmpxchg */ #undef GASNETI_HAVE_ARM_CMPXCHG /* has ARM kernel-level support for membar */ #undef GASNETI_HAVE_ARM_MEMBAR /* has usable AARCH64 (ARMV8) system counter support */ #undef GASNETI_HAVE_AARCH64_CNTVCT_EL0 /* has x86 EBX register (not reserved for GOT) */ #undef GASNETI_HAVE_X86_EBX /* has support (toolchain and cpu) for x86_64 cmpxchg16b instruction */ #undef GASNETI_HAVE_X86_CMPXCHG16B /* gcc support for "U" and "h" register classes on SPARC32 */ #undef GASNETI_HAVE_SPARC32_64BIT_ASM /* has _builtin_bswap{32,64} */ #undef GASNETI_HAVE_CC_BUILTIN_BSWAP32 #undef GASNETI_HAVE_CC_BUILTIN_BSWAP64 /* has _builtin_c[lt]z */ #undef GASNETI_HAVE_CC_BUILTIN_CLZ #undef GASNETI_HAVE_CC_BUILTIN_CLZL #undef GASNETI_HAVE_CC_BUILTIN_CLZLL #undef GASNETI_HAVE_CC_BUILTIN_CTZ #undef GASNETI_HAVE_CC_BUILTIN_CTZL #undef GASNETI_HAVE_CC_BUILTIN_CTZLL /* has __func__ function name defined */ #undef HAVE_FUNC /* portable inttypes support */ #undef HAVE_INTTYPES_H #undef HAVE_STDINT_H #undef HAVE_SYS_TYPES_H #undef COMPLETE_INTTYPES_H #undef COMPLETE_STDINT_H #undef COMPLETE_SYS_TYPES_H /* Linux prctl() support */ #undef HAVE_PR_SET_PDEATHSIG #undef HAVE_PR_SET_PTRACER /* forcing use of "non-native" implementations: */ #undef GASNETI_FORCE_GENERIC_ATOMICOPS #undef GASNETI_FORCE_OS_ATOMICOPS #undef GASNETI_FORCE_COMPILER_ATOMICOPS #undef GASNETI_FORCE_TRUE_WEAKATOMICS #undef GASNETI_FORCE_GENERIC_SEMAPHORES #undef GASNETI_FORCE_YIELD_MEMBARS #undef GASNETI_FORCE_SLOW_MEMBARS #undef GASNETI_FORCE_GETTIMEOFDAY #undef GASNETI_FORCE_POSIX_REALTIME /* forcing UP build, even if build platform is a multi-processor */ #undef GASNETI_UNI_BUILD /* force memory barriers on GASNet local (loopback) puts and gets */ #undef GASNETI_MEMSYNC_ON_LOOPBACK /* throttle polling threads in multi-threaded configurations to reduce contention */ #undef GASNETI_THROTTLE_FEATURE_ENABLED /* auto-detected mmap data page size */ #undef GASNETI_PAGESIZE #undef GASNETI_PAGESHIFT /* auto-detected shared data cache line size */ #undef GASNETI_CACHE_LINE_BYTES #undef GASNETI_CACHE_LINE_SHIFT /* minimum alignment of "tm0" */ #undef GASNETI_TM0_ALIGN /* udp-conduit default custom spawn command */ #undef GASNET_CSPAWN_CMD /* compiler is Sun's "gccfss" variant of GCC */ #undef GASNETI_GCC_GCCFSS /* compiler is Apple's variant of GCC */ #undef GASNETI_GCC_APPLE /* platform is a Linux cluster running IBM PE software */ #undef GASNETI_ARCH_IBMPE /* platform is Microsoft Windows Subsystem for Linux */ #undef GASNETI_ARCH_WSL /* platform is an HPE Cray EX */ #undef GASNETI_ARCH_CRAYEX /* have (potentially buggy) MIPS R10000 multiprocessor */ #undef GASNETI_ARCH_SGI_IP27 /* have working UltraSPARC ISA (lacks an associated builtin preprocessor macro) */ #undef GASNETI_ARCH_ULTRASPARC /* Have working PPC64 ISA (lacks an associated builtin preprocessor macro) */ #undef GASNETI_ARCH_PPC64 /* Type to use as socklen_t */ #undef GASNET_SOCKLEN_T /* GASNet build configuration */ #undef GASNET_DEBUG #undef GASNET_NDEBUG #undef GASNET_TRACE #undef GASNET_STATS #undef GASNET_DEBUGMALLOC #undef GASNET_SRCLINES #undef GASNET_DEBUG_VERBOSE #undef GASNETI_VALGRIND /* GASNet segment definition */ #undef GASNET_SEGMENT_FAST #undef GASNET_SEGMENT_LARGE #undef GASNET_SEGMENT_EVERYTHING /* Override to disable default segment alignment */ #undef GASNETI_DISABLE_ALIGNED_SEGMENTS /* GASNet smp-conduit */ #undef GASNETC_SMP_SPAWNER_CONF #undef GASNETC_HAVE_O_ASYNC #undef GASNETC_USE_SOCKETPAIR /* GASNet ofi-conduit settings */ #undef GASNETC_OFI_SPAWNER_CONF #undef GASNETC_OFI_REFERENCE_EXTENDED #undef GASNETC_OFI_MAX_MEDIUM_DFLT #undef GASNETC_OFI_NUM_COMPLETIONS #undef GASNETC_OFI_HAS_MR_VIRT_ADDR_CONFIGURE #undef GASNETC_OFI_HAS_MR_PROV_KEY_CONFIGURE #undef GASNETC_OFI_USE_AV_MAP_CONFIGURE #undef GASNETC_OFI_USE_THREAD_DOMAIN #undef GASNETC_OFI_USE_MULTI_CQ #undef GASNETC_OFI_RETRY_RECVMSG #undef GASNETC_OFI_PROVIDER_LIST #undef GASNETC_OFI_PROVIDER_IDENT #undef GASNETC_HAVE_FI_MR_REG_ATTR #undef GASNETC_HAVE_FI_HMEM_CUDA #undef GASNETC_HAVE_FI_HMEM_ROCR #undef GASNETC_HAVE_FI_HMEM_ZE /* GASNet ucx-conduit settings */ #undef GASNETC_UCX_SPAWNER_CONF #undef GASNETC_UCX_MAX_MEDIUM_DFLT /* GASNet ibv-conduit features and bug work-arounds */ #undef GASNETC_IBV_SPAWNER_CONF #undef HAVE_IBV_SRQ #undef HAVE_IBV_TRANSPORT_TYPE #undef HAVE_IBV_CREATE_QP_EX #undef GASNETC_IBV_MAX_MEDIUM #undef GASNETC_IBV_ODP #undef GASNETC_IBV_ODP_MLNX #undef GASNETC_IBV_ODP_CORE #undef GASNETC_IBV_ODP_DISABLED #undef GASNETC_IBV_RCV_THREAD #undef GASNETC_IBV_SND_THREAD #undef GASNETC_IBV_CONN_THREAD #undef GASNETC_IBV_ATOMICS_CONFIGURE #undef GASNETC_IBV_MAX_HCAS_CONFIGURE #undef GASNETC_IBV_PHYSMEM_MAX_CONFIGURE #undef GASNETC_IBV_PHYSMEM_PROBE_CONFIGURE #undef GASNETC_IBV_PORTS_CONFIGURE #undef GASNETC_IBV_FENCED_PUTS_CONFIGURE #undef GASNETC_IBV_SERIALIZE_POLL_CQ_CONFIGURE /* GASNet bug1389 detection/work-around */ #undef GASNETI_BUG1389_WORKAROUND /* Defaults for GASNET_SSH_* env vars */ #undef GASNETI_DEFAULT_SSH_CMD #undef GASNETI_DEFAULT_SSH_OPTIONS #undef GASNETI_DEFAULT_SSH_NODEFILE #undef GASNETI_DEFAULT_SSH_OUT_DEGREE /* Support for pmi-spawner */ #undef HAVE_PMI_H #undef HAVE_PMI2_H #undef GASNETI_PMIX_HACK #undef GASNETI_PMI2_FENCE_IS_BARRIER #undef HAVE_PMIX_H #undef HAVE_PMI_CRAY_H @BOTTOM@ /* these get us 64-bit file declarations under several Unixen */ /* they must come before the first include of features.h (included by many system headers) */ /* define them even on platforms lacking features.h */ #define _LARGEFILE64_SOURCE 1 #define _LARGEFILE_SOURCE 1 #ifdef HAVE_FEATURES_H #if _FORTIFY_SOURCE > 0 && __OPTIMIZE__ <= 0 /* silence an annoying MPICH/Linux warning */ #trueundef _FORTIFY_SOURCE #endif # include #endif #endif gasnet-2025.8.0/other/0000775000175000017500000000000015142313673014543 5ustar alastairalastairgasnet-2025.8.0/other/gasnet_tools-fragment.mak.in0000664000175000017500000000436715142313673022156 0ustar alastairalastair# Description: Makefile fragment for GASNet_tools, GASNET_#THREAD_MODEL# mode # #AUTOGEN# # @configure_input@ # Copyright 2011, Dan Bonachea # Terms of use are as specified in license.txt # ---------------------------------------------------------------------- # Usage instructions: # # Clients should include this file in their Makefile, using: (no leading '#') # include ###INSTALL_INCLUDE###/gasnet_tools-#thread_model#.mak # or alternatively, just: # include gasnet_tools-#thread_model#.mak # and use a -I###INSTALL_INCLUDE### # command-line option when invoking make # # Then in the Makefile, use a compile line something like this: # $(GASNETTOOLS_CC) $(GASNETTOOLS_CPPFLAGS) $(GASNETTOOLS_CFLAGS) -c myfile.c # # and a link line something like this: # $(GASNETTOOLS_LD) $(GASNETTOOLS_LDFLAGS) -o myfile myfile.o $(GASNETTOOLS_LIBS) # ---------------------------------------------------------------------- GASNET_PREFIX = ###INSTALL_PREFIX### GASNETTOOLS_INCLUDES = -I###INSTALL_INCLUDE### GASNETTOOLS_INCLUDES = -I@TOP_SRCDIR@ -I@TOP_SRCDIR@/other -I@TOP_BUILDDIR@ ###NOINSTALL### GASNETTOOLS_LIBDIR = ###INSTALL_LIB### GASNETTOOLS_LIBDIR = @TOP_BUILDDIR@ ###NOINSTALL### @BUILDCONFIG_DEBUG_FALSE@GASNETTOOLS_DEBUGFLAGS = -DNDEBUG GASNETTOOLS_THREADFLAGS_PAR = -DGASNETT_THREAD_SAFE @GASNET_THREAD_DEFINES@ GASNETTOOLS_THREADFLAGS_SEQ = -DGASNETT_THREAD_SINGLE GASNETTOOLS_THREADFLAGS = $(GASNETTOOLS_THREADFLAGS_#THREAD_MODEL#) GASNETTOOLS_THREADLIBS_PAR = @GASNET_THREAD_LIBS@ GASNETTOOLS_THREADLIBS_SEQ = GASNETTOOLS_THREADLIBS = $(GASNETTOOLS_THREADLIBS_#THREAD_MODEL#) GASNETTOOLS_TOOLLIB_NAME = gasnet_tools-#thread_model# GASNETTOOLS_CC = @CC@ GASNETTOOLS_CPPFLAGS = $(GASNETTOOLS_DEBUGFLAGS) $(GASNETTOOLS_THREADFLAGS) @GASNET_EXTRA_DEFINES@ @MISC_CPPFLAGS@ $(GASNETTOOLS_INCLUDES) $(MANUAL_DEFINES) GASNETTOOLS_CFLAGS = @GASNET_OPT_CFLAGS@ @MISC_CFLAGS@ $(KEEPTMP_CFLAGS) $(MANUAL_CFLAGS) GASNETTOOLS_LD = @CC@ GASNETTOOLS_LDFLAGS = @GASNET_OPT_CFLAGS@ @MISC_CFLAGS@ @LDFLAGS@ $(MANUAL_LDFLAGS) GASNETTOOLS_LIBS = -L$(GASNETTOOLS_LIBDIR) -l$(GASNETTOOLS_TOOLLIB_NAME) $(GASNETTOOLS_THREADLIBS) @LIBS@ @LIBM@ $(MANUAL_LIBS) GASNETTOOLS_CXX = @CXX@ GASNETTOOLS_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ @MISC_CXXFLAGS@ $(MANUAL_CXXFLAGS) gasnet-2025.8.0/other/Makefile-libgasnet.mak.in0000664000175000017500000003650415142313673021335 0ustar alastairalastair# This Makefile fragment is used to build GASNet libraries # it is not meant to be used directly # @configure_input@ .PHONY: do-libgasnet-seq do-libgasnet-par do-libgasnet-parsync \ do-libgasnet_tools-seq do-libgasnet_tools-par do-libgasnet_tools \ do-libgasnet check-exports do-pthreads-error do-tools-make-fragment VPATH=$(srcdir) thread_defines = @GASNET_THREAD_DEFINES@ SEPARATE_CC = @SEPARATE_CC@ @USE_PLPA_TRUE@PLPA_INCLUDES = -I$(top_srcdir)/other/plpa/src/libplpa @USE_PLPA_TRUE@PLPA_SOURCES = $(top_srcdir)/other/plpa/src/libplpa/plpa_api_probe.c \ @USE_PLPA_TRUE@ $(top_srcdir)/other/plpa/src/libplpa/plpa_dispatch.c @USE_PSHM_TRUE@PSHM_SOURCES = $(top_srcdir)/gasnet_pshm.c @HAVE_PTHREAD_FALSE@PTHREADS_ERROR_CHECK = $(MAKE) do-pthreads-error @HAVE_PTHREAD_TRUE@PTHREADS_ERROR_CHECK = : TOOLLIBINCLUDES = \ -I$(srcdir) \ -I$(top_srcdir) \ -I$(top_builddir) \ -I$(top_srcdir)/other \ $(PLPA_INCLUDES) LIBINCLUDES = $(TOOLLIBINCLUDES) \ -I$(top_srcdir)/other/kinds \ -I$(top_srcdir)/extended-ref/coll \ -I$(top_srcdir)/extended-ref/vis \ -I$(top_srcdir)/extended-ref/ratomic \ -I$(top_srcdir)/extended-ref TOOLLIBDEFINES = \ @GASNET_EXTRA_DEFINES@ \ $(LIBGASNET_THREAD_DEFINES) \ $(MANUAL_DEFINES) LIBDEFINES = \ $(TOOLLIBDEFINES) \ -DGASNET_$(THREAD_MODEL) @BUILDCONFIG_DEBUG_FALSE@ TOOLLIB_DEBUGFLAGS = -DNDEBUG TOOLLIBCFLAGS = \ -DGASNETI_BUILDING_TOOLS \ @GASNET_OPT_CFLAGS@ \ @DEVWARN_CFLAGS@ \ @MISC_CFLAGS@ \ @MISC_CPPFLAGS@ \ $(TOOLLIBDEFINES) \ $(TOOLLIB_DEBUGFLAGS) \ $(TOOLLIBINCLUDES) \ $${keeptmps:+@KEEPTMP_CFLAGS@} \ $(MANUAL_CFLAGS) LIBCFLAGS = \ -DGASNETI_BUILDING_CONDUIT \ @GASNET_OPT_CFLAGS@ \ @DEVWARN_CFLAGS@ \ @MISC_CFLAGS@ \ @MISC_CPPFLAGS@ \ @GASNET_PSHM_CFLAGS@ \ $(LIBDEFINES) \ $(CONDUIT_EXTRALIBCFLAGS) \ $(LIBINCLUDES) \ $${keeptmps:+@KEEPTMP_CFLAGS@} \ $(MANUAL_CFLAGS) libgasnet_tools_sources = \ $(top_srcdir)/gasnet_tools.c \ $(PLPA_SOURCES) libgasnet_sources = \ $(CONDUIT_SOURCELIST) \ $(libgasnet_tools_sources) \ $(PSHM_SOURCES) \ $(top_srcdir)/extended-ref/vis/gasnet_refvis.c \ $(top_srcdir)/extended-ref/ratomic/gasnet_refratomic.c\ $(top_srcdir)/extended-ref/coll/gasnet_refcoll.c \ $(top_srcdir)/extended-ref/coll/gasnet_putget.c \ $(top_srcdir)/extended-ref/coll/gasnet_eager.c \ $(top_srcdir)/extended-ref/coll/gasnet_rvous.c \ $(top_srcdir)/extended-ref/coll/gasnet_team.c \ $(top_srcdir)/extended-ref/coll/gasnet_hashtable.c \ $(top_srcdir)/extended-ref/coll/gasnet_reduce.c \ $(top_srcdir)/extended-ref/coll/gasnet_bootstrap.c \ $(top_srcdir)/other/kinds/gasnet_refkinds.c \ $(top_srcdir)/gasnet_event.c \ $(top_srcdir)/gasnet_legacy.c \ $(top_srcdir)/gasnet_internal.c \ $(top_srcdir)/gasnet_am.c \ $(top_srcdir)/gasnet_trace.c \ $(top_srcdir)/gasnet_mmap.c \ $(top_srcdir)/gasnet_tm.c \ $(top_srcdir)/gasnet_diagnostic.c libgasnet_objects = \ `for file in $(libgasnet_sources) ; do echo \`basename $$file .c\`.o ; done` \ $(CONDUIT_SPECIAL_OBJS) $(KINDS_SPECIAL_OBJS) libgasnet_tools_dependencies = \ $(CONFIG_HEADER) \ $(top_srcdir)/*.[ch] \ $(top_srcdir)/other/*.h libgasnet_dependencies = \ $(libgasnet_tools_dependencies) \ $(srcdir)/*.[ch] \ $(top_srcdir)/extended-ref/*/*.[ch] \ $(top_srcdir)/extended-ref/*.[ch] \ $(top_srcdir)/other/kinds/*.[ch] \ $(top_srcdir)/tests/test.h \ $(CONDUIT_SOURCELIST) \ $(CONDUIT_EXTRAHEADERS) \ $(CONDUIT_EXTRADEPS) # A tools-only git clone is *always* dirty, but we don't want to see the # string '-dirty' in version info of distributed tarballs and resuting installs. @TOOLSONLY_MODE_TRUE@GIT_DESCRIBE_DIRTY = # empty @TOOLSONLY_MODE_FALSE@GIT_DESCRIBE_DIRTY = --dirty # library targets THREAD_MODEL=SEQ THREAD_MODEL_LC=`echo "$(THREAD_MODEL)" | @AWK@ '{print tolower($$0)}'` LIBGASNET_NAME=libgasnet-$(CONDUIT_NAME) do-libgasnet: $(CONDUIT_SPECIAL_OBJS) $(KINDS_SPECIAL_OBJS) @mkdir -p .$(THREAD_MODEL) @libgasnet_objects="$(libgasnet_objects)" ; libgasnet_objects=`echo $$libgasnet_objects` ; \ pwd=`@PWD_PROG@`; keeptmps='$(KEEPTMPS)'; \ if test -z '$(KEEPTMPS)'; then rmcmd="&& rm -f $$libgasnet_objects"; fi; \ unset GASNET_DESC; \ if test -d $(top_srcdir)/.git ; then \ GASNET_DESC=`( cd $(top_srcdir) && $${GIT=git} describe --long --always $(GIT_DESCRIBE_DIRTY) ) 2>/dev/null | head -n 1`; \ fi; \ if test -z "$$GASNET_DESC" && test -f $(top_srcdir)/version.git ; then \ GASNET_DESC=`cat $(top_srcdir)/version.git` || exit $$? ; \ fi; \ unset DESCFLAG; \ if test -n "$$GASNET_DESC"; then \ DESCFLAG="-DGASNETI_GIT_HASH='$$GASNET_DESC'"; \ fi; \ if test -n '$(SEPARATE_CC)' ; then \ compcmd="for file in $(libgasnet_sources) ; do $(CC) $(LIBCFLAGS) $$DESCFLAG -c "'$$file'" || exit "'$$?'" ; done" ; \ else \ compcmd="$(CC) $(LIBCFLAGS) $$DESCFLAG -c $(libgasnet_sources)" ; \ fi ; \ cmd="$$compcmd && \ $(AR) cru $$pwd/$(LIBGASNET_NAME)-$(THREAD_MODEL_LC).a $$libgasnet_objects && \ $(RANLIB) $$pwd/$(LIBGASNET_NAME)-$(THREAD_MODEL_LC).a $$rmcmd"; \ echo " --- BUILDING $(LIBGASNET_NAME)-$(THREAD_MODEL_LC).a --- " ; \ echo $$cmd ; cd .$(THREAD_MODEL) ; eval $$cmd @test -n '$(KEEPTMPS)' || rm -Rf .$(THREAD_MODEL) set_dirs = top_srcdir=`cd $(top_srcdir); @PWD_PROG@` \ top_builddir=`cd $(top_builddir); @PWD_PROG@` \ srcdir=`cd $(srcdir); @PWD_PROG@` \ builddir=`@PWD_PROG@` do-libgasnet-seq: $(libgasnet_dependencies) $(CONDUIT_SEQ_HOOK) @$(MAKE) THREAD_MODEL=SEQ \ LIBGASNET_THREAD_DEFINES= \ $(set_dirs) do-libgasnet do-libgasnet-par: $(libgasnet_dependencies) $(CONDUIT_PAR_HOOK) @$(PTHREADS_ERROR_CHECK) @$(MAKE) THREAD_MODEL=PAR \ LIBGASNET_THREAD_DEFINES="$(thread_defines)" \ $(set_dirs) do-libgasnet do-libgasnet-parsync: $(libgasnet_dependencies) $(CONDUIT_PARSYNC_HOOK) @$(PTHREADS_ERROR_CHECK) @$(MAKE) THREAD_MODEL=PARSYNC \ LIBGASNET_THREAD_DEFINES="$(thread_defines)" \ $(set_dirs) do-libgasnet do-libgasnet_tools: @keeptmps="$(KEEPTMPS)" ; \ $(MAKE) \ LIBCFLAGS="$(TOOLLIBCFLAGS)" \ LIBGASNET_NAME=libgasnet_tools \ libgasnet_sources="$(libgasnet_tools_sources)" \ do-libgasnet do-libgasnet_tools-seq: $(libgasnet_tools_dependencies) @$(MAKE) THREAD_MODEL=SEQ \ LIBGASNET_THREAD_DEFINES=-DGASNETT_THREAD_SINGLE \ $(set_dirs) do-libgasnet_tools do-libgasnet_tools-par: $(libgasnet_tools_dependencies) @$(PTHREADS_ERROR_CHECK) @$(MAKE) THREAD_MODEL=PAR \ LIBGASNET_THREAD_DEFINES="$(thread_defines) -DGASNETT_THREAD_SAFE" \ $(set_dirs) do-libgasnet_tools fragment_deps = $(top_builddir)/other/gasnet_tools-fragment.mak $(top_builddir)/other/gasnet_tools-fragment.mak: $(top_srcdir)/other/gasnet_tools-fragment.mak.in cd "$(top_builddir)/other" && $(MAKE) gasnet_tools-fragment.mak gasnet_tools-par.mak : $(fragment_deps) @$(PTHREADS_ERROR_CHECK) $(MAKE) do-tools-make-fragment thread_model=par THREAD_MODEL=PAR gasnet_tools-seq.mak: $(fragment_deps) $(MAKE) do-tools-make-fragment thread_model=seq THREAD_MODEL=SEQ do-tools-make-fragment: force rm -f gasnet_tools-$(thread_model).mak @echo Building gasnet_tools-$(thread_model).mak... ; \ AUTOGENMSG='WARNING: This file is automatically generated - do NOT edit directly' ; \ cat $(top_builddir)/other/gasnet_tools-fragment.mak | \ sed -e 's@#THREAD_MODEL#@$(THREAD_MODEL)@g' \ -e 's@#thread_model#@$(thread_model)@g' \ -e "s@#AUTOGEN#@$${AUTOGENMSG}@g" \ > gasnet_tools-$(thread_model).mak || exit 1 pkgconfig_tools = $(top_srcdir)/other/pkgconfig-tools.pc gasnet_tools-seq.pc: gasnet_tools-seq.mak $(pkgconfig_tools) @$(MAKE) do-pkgconfig-tools thread_model=seq pkgconfig_file="$@" FRAGMENT="$<" gasnet_tools-par.pc: gasnet_tools-par.mak $(pkgconfig_tools) @$(PTHREADS_ERROR_CHECK) @$(MAKE) do-pkgconfig-tools thread_model=par pkgconfig_file="$@" FRAGMENT="$<" do-pkgconfig-tools: force rm -f $(pkgconfig_file) @echo Building $(pkgconfig_file) from $$FRAGMENT... @echo '# WARNING: This file is automatically generated - do NOT edit directly' > $(pkgconfig_file) @echo '# Copyright 2025, The Regents of the University of California' >> $(pkgconfig_file) @echo '# Terms of use are as specified in license.txt' >> $(pkgconfig_file) @echo '# See the GASNet README for instructions on using these variables' >> $(pkgconfig_file) @VARS="GASNETTOOLS_CC GASNETTOOLS_CPPFLAGS GASNETTOOLS_CFLAGS \ GASNETTOOLS_CXX GASNETTOOLS_CXXFLAGS \ GASNETTOOLS_LD GASNETTOOLS_LDFLAGS GASNETTOOLS_LIBS \ GASNET_PREFIX" ; \ $(MAKE) --no-print-directory -f $(top_srcdir)/other/Makefile-echovar.mak VARS="$$VARS" echovars-preserve-unset \ >> $(pkgconfig_file) @unset GASNET_DESC; \ if test -d $(top_srcdir)/.git ; then \ GASNET_DESC=`( cd $(top_srcdir) && $${GIT=git} describe --long --always $(GIT_DESCRIBE_DIRTY) ) 2>/dev/null | head -n 1`; \ fi; \ if test -z "$$GASNET_DESC" && test -f $(top_srcdir)/version.git ; then \ GASNET_DESC=`cat $(top_srcdir)/version.git` || exit $$? ; \ fi; \ if expr "x$$GASNET_DESC" : 'xgex-$(VERSION)-0-' >/dev/null 2>&1; then unset GASNET_DESC; fi; \ cat $(pkgconfig_tools) | \ sed -e 's@#thread_model#@$(thread_model)@g' \ -e "s@#version#@$(VERSION)$${GASNET_DESC:+ ($$GASNET_DESC)}@g" \ >> $(pkgconfig_file) do-pthreads-error: @echo "ERROR: pthreads support was not detected at configure time" @echo " try re-running configure with --enable-pthreads" @exit 1 # bug1613: avoid automake infinite recursion here, because top-level Makefile includes this # fragment and also provides the rules for rebuilding config.status #cd $(top_builddir)/other && $(MAKE) Makefile-libgasnet.mak $(top_builddir)/other/Makefile-libgasnet.mak: $(top_srcdir)/other/Makefile-libgasnet.mak.in cd $(top_builddir) && CONFIG_FILES=other/Makefile-libgasnet.mak CONFIG_HEADERS= ./config.status @GNU_NM_TRUE@check-exports: $(libraries) @GNU_NM_TRUE@ @echo Checking libgasnet exports... @GNU_NM_TRUE@ @if test x$(CHECK_EXPORTS) = x0; then \ @GNU_NM_TRUE@ echo Skipped by user request ; \ @GNU_NM_TRUE@ exit 0 ; \ @GNU_NM_TRUE@ fi ; \ @GNU_NM_TRUE@ failed=0 ; \ @GNU_NM_TRUE@ for lib in $(libraries) ; do \ @GNU_NM_TRUE@ echo ; \ @GNU_NM_TRUE@ echo $$lib: ; \ @GNU_NM_TRUE@ @NM@ --defined-only $$lib | \ @GNU_NM_TRUE@ @PERL@ -pe 's/ \.refptr\.//' | \ @GNU_NM_TRUE@ grep -v -e ' [\._]*gasnet_' -e ' [\._]*gasnet[tiecX]_' -e ' [\._]*gex_' \ @GNU_NM_TRUE@ -e ' [\._]*fh_' -e ' [\._]*firehose_' \ @GNU_NM_TRUE@ -e ' [\._]*fh[ic]_' -e ' [\._]*fhsmp_' -e ' [\._]*fhuni_' \ @GNU_NM_TRUE@ -e ' [\._]*myxml_' -e ' [\._]*smp_coll_' \ @GNU_NM_TRUE@ -e ' [\._]*emutls_' -e 'get_pc_thunk' \ @GNU_NM_TRUE@ -e ' D bg_[a-z]' -e ' D _uci_' -e ' D _parse[A-Z][a-z]' \ @GNU_NM_TRUE@ -e __FUNCTION__ -e __PRETTY_FUNCTION__ -e ' [\._]*DWinfo' \ @GNU_NM_TRUE@ -e ' [\._][\._]*debug_' \ @GNU_NM_TRUE@ -e ' [\._]*stab' -e ' [\._]*gnu_dev_' -e '^00* W ' | \ @GNU_NM_TRUE@ @PERL@ -n -e 'print if /^[0-9a-fA-F]+\s+[A-Z]\s+/' > .$$lib.exp; \ @GNU_NM_TRUE@ if test -s .$$lib.exp ; then \ @GNU_NM_TRUE@ cat .$$lib.exp ; \ @GNU_NM_TRUE@ echo FAILED ; \ @GNU_NM_TRUE@ failed=1 ; \ @GNU_NM_TRUE@ else \ @GNU_NM_TRUE@ echo PASSED ; \ @GNU_NM_TRUE@ fi ; \ @GNU_NM_TRUE@ rm -f .$$lib.exp ; \ @GNU_NM_TRUE@ done ; exit $$failed @GNU_NM_FALSE@check-exports: $(libraries) @GNU_NM_FALSE@ @echo check-exports test SKIPPED check-pkgconfig: @echo Checking pkgconfig... @if test x$(CHECK_PKGCONFIG) = x0; then \ echo SKIPPED: by user request ; \ exit 0 ; \ elif ! pkg-config --atleast-pkgconfig-version=0.16.0 > /dev/null ; then \ echo SKIPPED: No working pkg-config found ; \ exit 0 ; \ fi ; \ validate=--validate ; \ if test -z "`pkg-config --help 2>&1 | grep -e --validate`" ; then \ validate=--cflags ; \ fi ; \ for file in $(CHECK_FILES) ; do \ echo ; \ echo $$file: ; \ if pkg-config $$validate $$file ; then \ echo PASSED ; \ else \ echo FAILED ; exit 1 ; \ fi ; \ done gasnet-2025.8.0/other/firehose/0000775000175000017500000000000015142313673016347 5ustar alastairalastairgasnet-2025.8.0/other/firehose/firehose.h0000664000175000017500000011403615142313673020331 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/firehose/firehose.h $ * Description: Public Header file * Copyright 2004, Christian Bell * Terms of use are as specified in license.txt */ #ifndef FIREHOSE_H #define FIREHOSE_H #include #include struct _firehose_private_t; typedef struct _firehose_private_t firehose_private_t; #if ((defined(FIREHOSE_PAGE) && defined(FIREHOSE_REGION)) || \ (!defined(FIREHOSE_PAGE) && !defined(FIREHOSE_REGION)) || \ (defined(FIREHOSE_PAGE) && defined(FIREHOSE_CLIENT_T))) #error Only define one of FIREHOSE_PAGE or FIREHOSE_REGION. Make sure \ FIREHOSE_CLIENT_T is only defined if FIREHOSE_REGION is defined. #endif #define FIREHOSE_API_VERSION 0x101 /* The firehose request type is returned as a read-only type from * firehose local and remote pin functions. Based on the address and * length requested by the pin operation, this return type describes a * region that is a superset of the one requested, namely the start * address can be lower and the length of the region can be larger. * The returned base address ('addr' field) is always aligned on a * page boundary and the length ('len' field) is always a multiple of * page size. * * Once returned to the client, this type is read-only. Copies of * this type are never kept around in hash tables. On all the * firehose_*_pin functions, clients can pass a pointer to their own * allocated request_t or NULL which causes firehose to use its own * request_t allocation. If a request_t is to be returned and the * client passed a non-null request_t pointer, firehose guarantees * that the returned pointer will equal the one the client passed. */ typedef struct _firehose_request_t { uint16_t flags; /* internal -- opaque to client */ gex_Rank_t node; uintptr_t addr; size_t len; /* internal -- opaque to client */ firehose_private_t *internal; #ifdef FIREHOSE_CLIENT_T /* For CLIENT use, defined in firehose_fwd.h Useful for * keys/handles and similar transport-specific data Note that * this is included inline, not as a reference. */ firehose_client_t client; #endif } firehose_request_t; /* The firehose region type contains the necessary minimal information * required to describe a pinned region. The type is used both by the * client-supplied firehose_move_callback to pin and unpin regions and * internally by the firehose algorithm to disconnect old firehoses * and reconnect new ones. * * The address field is aligned on a page boundary and the length * field is a multiple of page size. * * If the network requires client data to be attached to each pinning * operation, the client field should be filled in. */ typedef struct _firehose_region_t { uintptr_t addr; size_t len; #ifdef FIREHOSE_CLIENT_T firehose_client_t client; #endif } firehose_region_t; /* The firehose information type contains information relative to the * the limits of system and network-related available to firehose. * The type is returned at initialization and contains limit * information the client can query at initialization. The limit * values are calculated by the firehose interface according to the * following parameters: * 1. Maximum amount of globally pinnable memory * 2. Maximum amount of regions that may be created * 3. Environment variables to control firehose (see * GASNET_FIREHOSE_ environment variables below). * 4. gex_AM_LUBR{Request,Reply}Medium() as * provided by the underlying gasnet core API. * 5. The size of firehose_remotecallback_args_t. * * The values returned by firehose_info_t are established at * initialization. Typically, a client will use these limits in order * to determine the size of the largest remote and/or local region * that can be requested through the firehose interface. See the * section "FIREHOSE PINNING FUNCTIONS (LOCAL & REMOTE)" for more * information. */ typedef struct _firehose_info_t { /* Local and remote maximum region sizes that can be requested * through one of the firehose_*_pin functions */ size_t max_RemotePinSize; size_t max_LocalPinSize; /* Local and remote maximum number of active regions */ size_t max_RemoteRegions; size_t max_LocalRegions; } firehose_info_t; /********************************************************************/ /* CLIENT-SUPPLIED CALLBACKS */ /********************************************************************/ /* The following callbacks are to be implemented by the client. * * Each of the callbacks should return 0 on success and non-zero on * failure. Firehose will exit with a fatal error if the callback * returns non-zero. * *************************** * FIREHOSE REMOTE CALLBACK *************************** * This callback can be invoked on the remote node when the firehose * library has completed a firehose move on the requested node. * Remote pin operations that require firehose moves can allow the * client to run a callback after the completion of the move operation * and before the firehose reply. * * When enabled for a move request, the callback is never run within * an AM handler context unless the client defines * FIREHOSE_REMOTE_CALLBACK_IN_HANDLER in which case the remote * callback will be executed within the firehose request handler after * the move is complete and before the firehose reply. In either * case, the callback must be thread-safe. * * A client enables the remote callback for a move operation by * setting the FIREHOSE_FLAG_ENABLE_REMOTE_CALLBACK bit in the * remote pin flags parameter. See firehose_remote_pin() and * firehose_try_remote_pin() functions. * * AM-handler context: Runs within AM handler if (and only if) client * defines FIREHOSE_REMOTE_CALLBACK_IN_HANDLER. * * Returns: 0 on success, non-zero on failure. */ extern int firehose_remote_callback(gex_Rank_t node, const firehose_region_t *pin_list, size_t num_pinned, firehose_remotecallback_args_t *args); /************************* * FIREHOSE MOVE CALLBACK ************************* * This callback is invoked when the firehose library has determined * the need to pin and/or unpin one or many regions and is a * synchronous (blocking) operation. If there are regions to be * unpinned, the unpin call should be executed prior to the pin call. * For some networks, it may be possible to use a repin operation, * allowing pinning resources to be used more effectively. * * If the client has defined FIREHOSE_CLIENT_T, the function should * fill-in any necessary data in the 'client' field of the 'pin_list' * of firehose regions, which will be copied back to the node owning * the firehose (could be the local node) in an AMReplyMedium(). * Changes to the client type in the region type will be reflected in * the request type once the move callback completes. * * AM-handler context: May run in AM handler context * * Returns: 0 on success, non-zero on failure. */ extern int firehose_move_callback(gex_Rank_t node, const firehose_region_t *unpin_list, size_t unpin_num, firehose_region_t *pin_list, size_t pin_num); #ifdef FIREHOSE_BIND_CALLBACK /* This prototype is for a callback implemented by the CLIENT iff the * client defines FIREHOSE_BIND_CALLBACK. * * This callback is invoked by the firehose library when the node * initiating a move operation has received a reply to the list of * regions to be pinned. It is up to the client to make sure * (possibly by way of a firehose_client_t) that any metadata required * to bind to a remote region is part of the region type. * * AM-handler context: May run in AM handler context */ extern int firehose_bind_callback(gex_Rank_t node, firehose_region_t *bind_list, size_t bind_num); #endif #ifdef FIREHOSE_UNBIND_CALLBACK /* This prototype is for a callback implemented by the CLIENT iff the * client defines FIREHOSE_UNBIND_CALLBACK. * * This callback is invoked when the firehose library selects one or * many regions to be unpinned. It is up to the client to make sure * (possibly by way of a firehose_client_t) that any metadata required * to unbind a local node to a remote region is part of the region * type. * * AM-handler context: May run in AM handler context */ extern int firehose_unbind_callback(gex_Rank_t node, const firehose_region_t *unbind_list, size_t unbind_num); #endif #ifdef FIREHOSE_EXPORT_CALLBACK /* This prototype is for a callback implemented by the CLIENT iff the * client defines FIREHOSE_EXPORT_CALLBACK. * * This callback is invoked by the firehose library when a request to * pin a local region is received. It is up to the client to make * sure (possibly by way of a firehose_client_t) that any metadata * required to export a region to a remote node is part of the region * type. * * AM-handler context: May run in AM handler context */ extern int firehose_export_callback(gex_Rank_t node, firehose_region_t *export_list, size_t export_num); #endif #ifdef FIREHOSE_UNEXPORT_CALLBACK /* This prototype is for a callback implemented by the CLIENT iff the * client defines FIREHOSE_UNEXPORT_CALLBACK. * * This callback is invoked by the firehose library when a request to * unpin a local region is received. It is up to the client to make * sure (possibly by way of a firehose_client_t) that any metadata * required to export a region to a remote node is part of the region * type. * * AM-handler context: May run in AM handler context */ extern int firehose_unexport_callback(gex_Rank_t node, const firehose_region_t *unexport_list, size_t unexport_num); #endif /********************************************************************/ /* FIREHOSE INITIALIZATION AND RUNTIME */ /********************************************************************/ /* The following functions must be used at initialization and * termination of the firehose interface, as well as at runtime for * the firehose progress engine (firehose_poll()). * *********************************** * Firehose AM Handler registration *********************************** * This function must be called by the client prior to initializing * the firehose interface in order to register firehose AM handlers. * The function returns an array of gex_AM_Entry_t terminated * with a gex_AM_Entry_t entry containing a NULL function * pointer. * * Upon calling firehose_get_handlertable(), clients should loop over * the array of gex_AM_Entry_t and fill in a valid * gex_AM_Index_t for each function pointer. At firehose * initialization, a check is made to make sure each function pointer * has been assigned a usable index number. */ extern gex_AM_Entry_t * firehose_get_handlertable(void); /************************** * Firehose Initialization ************************** * Called to setup the firehose tables and data structures. This call * must be executed once gasnet has registered the segment and all * core and extended AM handlers. Typically, the firehose init call * is done as part of the last step before gasnet_attach's final * bootstrap barrier. Additionally, the client must have registered * firehose AM handlers by querying firehose_gethandlers() prior to * calling firehose_init(). * * If a list of prepinned page-aligned regions is passed, firehose * initializes the reference count for these regions to 1 (which * guarantees that these regions remain pinned). It is up to the * client to make sure that these regions are pinned prior to calling * firehose_init. These regions may lie anywhere in the address space * -- in or out of the GASNet segment, in stack-addressable memory, * etc. The client is free to issue additional firehose_local_* and * firehose_remote_* calls on these regions. The memory for the * regions list is owned by the client and may safely be reused or * freed after firehose_init() returns. * * Prepinned regions are not given any special treatment except that * their length may exceed the max_LocalPinSize. In particular the * information about a prepinned region is not automatically propagated * to remote peers. Only the process of resolving a remote firehose * miss will propagate such information across the network. * * Firehose allocates pinning resources using three parameters: * 1. The 'max_pinnable_memory' is the upper bound for the * firehose 'M' parameter and must be the global minimum * of the largest amount of memory that can be pinned by each * node. This value should be a fraction of the amount of * physical memory a single process can pin and it is up to the * client to implement a network specific exchange operation to * find the global minimum. * 2. The 'max_regions' is the upper bound for the firehose * 'R' parameter and must be the global minimum of * the largest number of regions that can be allocated by each * node. * 3. The 'max_region_size' is the upper bound for the firehose * 'RS' parameter and must be the global minimum of * the largest size region that can be allocated by each * node. * * Along with the global minimum requirement, each node is required * to pass the same 'max_pinnable_memory', 'max_regions' and * 'max_region_size' values to the function. * For firehose-page 'max_regions' and 'max_region_size' must be 0. * * UNIMPLEMENTED: Setting any value to zero removes the constraints * associated to the count. In other words, the firehose algorithm * can consider there to be no constraints on the amount of pinned * memory or maximum regions if either value is set to 0. */ extern void firehose_init(uintptr_t max_pinnable_memory, size_t max_regions, size_t max_region_size, const firehose_region_t *prepinned_regions, size_t num_prepinned, uint32_t flags, firehose_info_t *info); /* Environment variables used in firehose initialization * * Although firehose is informed of job-wide resource limitations * through its initialization function, users can control firehose * parameters through environment variables. * * Except where noted, the numerical values are assumed to be base-2 * megabytes. For these environment variables, a suffix of 'GB' can * be appended for (base-2) gigabytes or 'KB' for (base-2) kilobytes * ('MB' will simply be ignored if it is specified). * * GASNET_FIREHOSE_M establishes, in megabytes, the number of * firehose buckets each node partitions across all * nodes. This is limited by the * 'max_pinnable_memory' parameter. * * GASNET_FIREHOSE_R establishes, in units of regions, the maximum * number of regions each node partitions across all * nodes. This value is ignored if 'max_regions' is * 0. * * GASNET_FIREHOSE_MAXVICTIM_M limits, in megabytes, the length of * the FIFO queue and hence the amount of * inactive pinned regions. This allows * firehose to amortize the number * of unpin operations. * * GASNET_FIREHOSE_MAXVICTIM_R limits, in units of regions, the * length of the FIFO queue and hence the * amount of inactive pinned regions. * This value is ignored if 'max_regions' * is 0. * * GASNET_FIREHOSE_MAXREGION_SIZE limits, in megabytes, the length * of the largest possible region to be * managed by firehose. * * NOTE: firehose_init() will fail at initialization if * (max_pinnable_memory != 0) && * (GASNET_FIREHOSE_M+GASNET_FIREHOSE_MAXVICTIM_M > max_pinnable_memory) * or if * (max_regions != 0) && * (GASNET_FIREHOSE_R+GASNET_FIREHOSE_MAXVICTIM_R > max_regions) * * Failing to set these environment variables causes metadata for the * maximum amount of memory and regions to be allocated at * initialization. */ /* Flags passed to firehose initialization * * FIREHOSE_INIT_FLAG_LOCAL_ONLY * Though firehose is designed to address the management of remote * pinning resources, it is also useful for managing purely local * dynamic pinnings (for instance when the GASNet conduit has * prepinned the segment and only needs to dynamically pin local * out-of-segment memory). * When firehose_init() is passed FIREHOSE_INIT_FLAG_LOCAL_ONLY, * firehose will manage only local pinnings. All resources indicated * by the max_pinnable_memory and max_regions arguments will be used * for the victim FIFO (local only firehoses), subject to override by * the corresponding environment variables. Tables used to track * remote firehoses will not be allocated. If this flag is passed, it * is an error to call firehose_remote_pin(), firehose_try_remote_pin() * or firehose_partial_remote_pin. The max_RemotePinSize and * max_RemoteRegions values in the firehose_info_t will be zero. * CURRENTLY ONLY IMPLEMENTED FOR FIREHOSE-REGION * * FIREHOSE_INIT_FLAG_UNPIN_ON_FINI * If this flag is set, firehose_fini() will unpin all memory it * has pinned (excludes pre-pinned regions passed to firehose_init()). * This may add significantly to the exit cost, and so should be used * only if you believe that the system does not cleanup properly when * a process exits. * CURRENTLY ONLY IMPLEMENTED FOR FIREHOSE-REGION * * FIREHOSE_INIT_FLAG_MAY_REINIT * If this flag is set, firehose_fini() will leave the state suitable * for a possible subsequent call to firehose_init() with the same * flags as the initial call. Without this flag any call make to * firehose_init() after firehose_fini() has undefined behavior. */ #define FIREHOSE_INIT_FLAG_LOCAL_ONLY 0x01 #define FIREHOSE_INIT_FLAG_UNPIN_ON_FINI 0x02 #define FIREHOSE_INIT_FLAG_MAY_REINIT 0x04 /************************ * Firehose Finalization ************************ * * Called to cleanup and terminate firehose. This call is * non-collective and should be called as part of gasnet_exit(). * */ extern void firehose_fini(void); /******************* * Firehose Polling ******************* * * Called to make progress on the outstanding firehose messages. This * call is thread-safe and may be called concurrently on different * threads outside a handler context. * * Client implementors should remember to call firehose_poll() after * servicing AMReply handlers. * * AM-handler context: Cannot be run in a handler. */ #if defined(FIREHOSE_REMOTE_CALLBACK_IN_HANDLER) && \ defined(FIREHOSE_COMPLETION_IN_HANDLER) #define firehose_poll() #else extern void firehose_poll(void); #endif /************************* * Firehose Segment Sizes ************************* * * Clients can retrieve M and Maxvictim values if firehose is given * a maximum amount of pinnable memory. * * AM-handler context: Irrelevant, but safe. * */ extern void firehose_get_params(uintptr_t max_pinnable_memory, uintptr_t *M, uintptr_t *Maxvictim); /********************************************************************/ /* FIREHOSE PINNING FUNCTIONS (LOCAL & REMOTE) */ /********************************************************************/ /* * The following semantics are shared by all the firehose pinning * functions, firehose_*_pin(): * * The firehose pinning functions cannot be called from within an * AM handler context. * * All the pinning functions take a request_t pointer as an * argument, and either return one, or pass one to a completion * callback. * If this "req" argument is not NULL then upon success: * + The firehose_*_pin() function will use this storage for its * result, and the value returned (or passed to a callback) will * be this same pointer. * + The client maintains ownership of this storage and is * responsible for any free() (or similar call) required, but * not before the corresponding firehose_release(). * If this "req" argument is NULL then upon success: * + The firehose firehose_*_pin() function will allocate storage * necessary for the request_t to be returned (or passed). * + The balancing call to firehose_release() will recover the * storage. * * The regions returned (or passed to completion callbacks) by the * firehose_*_pin() functions may lie partly outside of the requested * region. Specifically, the start address can be lower than requested * and/or the end of the region can be higher than requested. * * In order to RDMA to/from any local or remote memory, a client must * "own" a request_t at each end (except where the transport may have * weaker requirements on local memory or pre-pinned pages are used * without going through firehose). A request_t is "owned" by the * client from the time it is returned from a firehose_*_pin() function * or passed to a completion callback, until the time the client calls * firehose_release() on the request_t. * * The region limits in firehose_info_t can be described in terms of the * union of the local or remote request_t's owned by a client at any * given instant. * + max_RemoteRegions - the maximum number of distinct regions * pinned by the union of all the request_t's which reference any * given remote node. * + max_LocalRegions - the maximum number of distinct regions pinned * by the union of all the request_t's referencing the local node. * If any of these values is zero then that limit is not imposed. * * The pin size limit in firehose_info_t are: * + max_RemotePinSize - the maximum value of the 'len' argument to the * remote pinning functions firehose_remote_pin() and * firehose_try_remote_pin(). * + max_LocalPinSize - the maximum value of the 'len' argument to the * local pinning functions firehose_local_pin() and * firehose_try_local_pin(). * * The 'len' argument to the firehose_partial_*_pin() functions is not * limited by the max_*PinSize parameters. However, the request_t's * they return will have length bounded by the appropriate max_*PinSize. * * Note that for all the firehose_*_pin functions the pair (addr, len) * must be well formed, meaning that the closed interval [addr, * addr + (len-1)] must not "wrap around" the address space. * * Let an "operation" denote the collection of request_t's owned by a * client such that they will eventually reach firehose_release() * independent of any other calls to firehose_*_pin() functions. (A * typical example of an operation might include one local request_t * and one remote request_t to be used as the source and destination * of an GET or PUT). See the paragraphs below on deadlock avoidance * for restrictions on the request_t's that can belong to an operation. * * The client must ensure that every operation can make progress * toward firehose_release(), independent of any other operation. In * particular, when all the request_t's to be owned by an operation * have been acquired, some action must be taken (such as * starting/enqueing RDMA) which will lead to the eventual * firehose_release() of the operation's request_t's. This step must * be taken before the thread initiating the operation can make calls * to firehose_local_pin() or firehose_remote_pin() for the next * operation, since these two calls might block awaiting release of * the resources used by the previous operation. For the purpose of * this rule, submitting a callback argument to firehose_remote_pin() * is sufficient, even though the callback may not run until a later * time (provided, of course, that the callback will make progress * toward the release). To ensure progress is made, clients of * firehose are guaranteed that firehose_local_pin() and * firehose_remote_pin() will call gasnet_AMPoll() while they are * awaiting release of resources. * * A potential deadlock can occur in a situation such as this: * thread0: firehose_local_pin(); firehose_remote_pin(nodeN); * thread1: firehose_remote_pin(nodeN); firehose_local_pin(); * If the available resources are sufficient to satisfy the first pin * request from each thread, but not sufficient to simultaneously * satisfy the second pin request from either thread, then a deadlock * will occur. If resources are limited enough, then the same sort * of deadlock is possible with a single thread as follows: * thread0: firehose_local_pin(); firehose_local_pin(); * Note that in both examples, if the second call(s) had been made to * firehose_try_*_pin() or firehose_partial_*_pin(), then deadlock * would not have been possible (since these calls return immediately * regardless of whether the requested memory is already pinned). * * To avoid these deadlocks, clients should follow these recommendations: * 1) Pick a precedence for pinning. If operations always consist of * at most one remote request_t, then this precedence will be either * "local-over-remote" or "remote-over-local". If operations can * include request_t's on multiple remote nodes then the precedence * must be a total order over the nodes. Though the order need not * be the same on every node, every thread on a given node must abide * by the same precedence. * 2) Once an operation owns a request_t on a given node it may not * make calls to firehose_local_pin() or firehose_remote_pin() for * any node with equal or higher precedence, because these calls could * potentially block waiting for resources which will never become * available. * 3) Calls which cannot block awaiting resources (firehose_try_*_pin() * and firehose_partial_*_pin()) are permitted in any order. However, * once one returns a request_t the client must observe rule #2. * * The recommended precedence is "remote-over-local", meaning that a * typical operation will call firehose_remote_pin() and * firehose_local_pin() in that order. This is recommended because of * the potential for performing any required network round trip and * pinning by the remote node while concurrently executing the local * pin request. * * The calls firehose_try_*_pin() and firehose_partial_*_pin() will not * cause memory to become pinned, nor will they initiate network traffic * to determine if remote memory has previously been pinned. They only * return success when the request can be satisfied based on local * knowledge of what memory is already pinned. For this reason, spin * polling on these functions is not recommended. Additionally, be * aware that these functions can return NULL (failure) due to a * temporary lack of resources, even if the memory is known to be pinned. */ /********************************************************************/ /* FIREHOSE LOCAL PINNING FUNCTIONS */ /********************************************************************/ /* * ********************* * Firehose Local Pin ********************* * Called to request local pinning of a specified region. * The return value will be non-null on success. * * This is an immediate operation, meaning no network communication is * required to complete the operation, and all side effects have * occurred before this call returns. * * See the section "FIREHOSE PINNING FUNCTIONS (LOCAL & REMOTE)" for the * use of the "req" argument, and additional semantics common to all * firehose_*_pin() functions. * * AM-handler context: Cannot be run in a handler. */ extern const firehose_request_t * firehose_local_pin(uintptr_t addr, size_t len, firehose_request_t *req); /************************* * Firehose Try Local Pin ************************* * Called to find an existing local pinning of a specified region. * If the requested region is already pinned, a corresponding request * type is returned. If the region covered by (addr, addr+len) is not * pinned, the function returns NULL. A NULL result may also occur if * there is a temporary lack of resources. * * This is an immediate operation, meaning no network communication is * required to complete the operation, and all side effects have occurred * before this call returns. * * See the section "FIREHOSE PINNING FUNCTIONS (LOCAL & REMOTE)" for the * use of the "req" argument, and additional semantics common to all * firehose_*_pin() functions. * * AM-handler context: Cannot be run in a handler. */ extern const firehose_request_t * firehose_try_local_pin(uintptr_t addr, size_t len, firehose_request_t *req); /***************************** * Firehose Local Partial Pin ***************************** * Called to request a (potentially) partial local pinning operation. * The call returns with a valid request type if any portion of the * requested region is already pinned. If no portion of the requested * region is pinned this call returns NULL. A NULL result may also * occur if there is a temporary lack of resources. * * This is an immediate operation, meaning no network communication is * required to complete the operation, and all side effects have occurred * before this call returns. * * When multiple pinned regions intersect the requested region, then * it is guaranteed that the region returned will include the page with * the lowest address among all pinned pages in the requested region. * However, the choice among multiple regions which include this lowest * pinned page is implementation-specific. * * See the section "FIREHOSE PINNING FUNCTIONS (LOCAL & REMOTE)" for the * use of the "req" argument, and additional semantics common to all * firehose_*_pin() functions. * * AM-handler context: Cannot be run in a handler. */ extern const firehose_request_t * firehose_partial_local_pin(uintptr_t addr, size_t len, firehose_request_t *req); /********************************************************************/ /* FIREHOSE REMOTE PINNING FUNCTIONS */ /********************************************************************/ /* Remote pin functions may or may not require a network roundtrip. * In the case where a roundtrip is required to move firehoses, a * completion callback is used to acknowledge placement of new * firehoses. * * It is invalid to request a remote pin with the local node number as * a destination node. * * Remote memory regions must fall within the GASNet segment and/or * the set of pages that are pinned locally on the target node * (including both pre-pinned pages and pages pinned via one of the * firehose local pin functions). * ******************* * Remote Pin flags ******************* * Remote pin request behavior may be additionally controlled through * options set through the remote pin 'flags' parameter. The flags * are described below as * * FIREHOSE_FLAG_RETURN_IF_PINNED * If set, causes firehose_remote_pin() to return a valid * request_t pointer to the caller if the region is pinned * * FIREHOSE_FLAG_ENABLE_REMOTE_CALLBACK * If set, executes a callback on the remote node once the firehose * move is completed. */ #define FIREHOSE_FLAG_RETURN_IF_PINNED 0x01 #define FIREHOSE_FLAG_ENABLE_REMOTE_CALLBACK 0x02 /************************** * firehose_completed_fn_t ************************** * Type for function called after firehose placement is acknowledged * on the node initiating the firehose move. * * The callback is never run within an AM handler context unless the * client defines FIREHOSE_COMPLETION_IN_HANDLER in which case the * completion callback will be executed from within the firehose reply * handler. In either case, the callback must be thread-safe and * firehose makes no guarantees as to what thread the callback is run * on (which means the callback can run a thread different from the * thread that initiated the operation). * * The callback is run with a context pointer passed into one of the * remote pin functions and the request_t describes the remote region * that was successfully pinned. The 'allLocalHit' parameter is set * to non-zero if the remote pin operation could be successfully * completed without requiring any firehose moves (network roundtrips). * Thus if 'allLocalHit' is non-zero, any callback requested by the flag * FIREHOSE_FLAG_ENABLE_REMOTE_CALLBACK has NOT run on the remote node. * * AM-handler context: Runs within AM handler if (and only if) client * defines FIREHOSE_COMPLETION_IN_HANDLER. */ typedef void (*firehose_completed_fn_t) (void *context, const firehose_request_t *req, int allLocalHit); /*********************************** * firehose_remotecallback_args_fn_t *********************************** * Type for function called to assemble args for the remote callback. * * The callback is run with a context pointer passed into one of the * remote pin functions, and a pointer to space to initialize. The * callback must return the number of bytes written, which must not * exceed sizeof(firehose_remotecallback_args_t) but may be smaller. * * AM-handler context: Never called in AM handler context. */ typedef size_t (*firehose_remotecallback_args_fn_t) (void *context, firehose_remotecallback_args_t *args); /********************** * Firehose Remote Pin ********************** * Called to request unconditional remote pinning of a specified region. * This call will complete in two different manners, depending on the * presence of FIREHOSE_FLAG_RETURN_IF_PINNED in the "flags" argument. * When FIREHOSE_FLAG_RETURN_IF_PINNED is set and the requested region * is already pinned, a corresponding region_t is returned without * invoking the supplied completion callback. In all other cases, the * return value is NULL, and the the supplied completion callback will * be invoked on the local node with the supplied context pointer. * * In the cases which result in invoking the supplied completion * callback, it is not specified when or in what thread the callback * will run. In particular, if the requested region is already pinned * and FIREHOSE_FLAG_RETURN_IF_PINNED is not set, it is not guaranteed * that the callback will run before firehose_remote_pin() returns. * * It is invalid to call this function with the local node number as * a destination node. * * If FIREHOSE_FLAG_ENABLE_REMOTE_CALLBACK is set, the client must pass * as 'remote_args_callback' a valid function pointer of type * firehose_remotecallback_args_fn_t. If an AM needs to be sent to a * remote node to complete the pinning, this callback will be invoked * before firehose_remote_pin() returns, to construct the arguments * to pass when firehose_remote_callback() is invoked. If the request * can be satisfied from local tables, no network communication will * take place. In that case, the remote callback is NOT run. If the * flag FIREHOSE_FLAG_RETURN_IF_PINNED is set, this case is indicated * by a non-NULL return value. If FIREHOSE_FLAG_RETURN_IF_PINNED is * not set, a non-zero value of 'allLocalHit' passed to the completion * callback indicates the remote callback was not run. * * See the section "FIREHOSE PINNING FUNCTIONS (LOCAL & REMOTE)" for the * use of the "req" argument, and additional semantics common to all * firehose_*_pin() functions. * * AM-handler context: Cannot be run in a handler. */ extern const firehose_request_t * firehose_remote_pin(gex_Rank_t node, uintptr_t addr, size_t len, uint32_t flags, firehose_request_t *req, firehose_remotecallback_args_fn_t remote_args_callback, firehose_completed_fn_t callback, void *context); /************************** * Firehose Remote Try Pin ************************** * Called to find an existing remote pinning of a specified region. * If the requested region is already pinned, a corresponding request * type is returned. If the region covered by (addr, addr+len) is not * pinned, the function returns NULL. A NULL result may also occur if * there is a temporary lack of resources. * * This is an immediate operation, meaning no network communication is * required to complete the operation, and all side effects have occurred * before this call returns. * * See the section "FIREHOSE PINNING FUNCTIONS (LOCAL & REMOTE)" for the * use of the "req" argument, and additional semantics common to all * firehose_*_pin() functions. * * AM-handler context: Cannot be run in a handler. */ extern const firehose_request_t * firehose_try_remote_pin(gex_Rank_t node, uintptr_t addr, size_t len, uint32_t flags, firehose_request_t *req); /****************************** * Firehose Remote Partial Pin ****************************** * Called to request a (potentially) partial remote pinning operation. * The call returns with a valid request type if any portion of the * requested region is already pinned. If no portion of the requested * region is pinned this call returns NULL. A NULL result may also * occur if there is a temporary lack of resources. * * This is an immediate operation, meaning no network communication is * required to complete the operation, and all side effects have occurred * before this call returns. * * When multiple pinned regions intersect the requested region, then * it is guaranteed that the region returned will include the page with * the lowest address among all pinned pages in the requested region. * However, the choice among multiple regions which include this lowest * pinned page is implementation-specific. * * See the section "FIREHOSE PINNING FUNCTIONS (LOCAL & REMOTE)" for the * use of the "req" argument, and additional semantics common to all * firehose_*_pin() functions. * * AM-handler context: Cannot be run in a handler. */ extern const firehose_request_t * firehose_partial_remote_pin(gex_Rank_t node, uintptr_t addr, size_t len, uint32_t flags, firehose_request_t *req); /********************************************************************/ /* FIREHOSE RELEASE */ /********************************************************************/ /* Both local and remote pin requests must be balanced with a call to * firehose release. It indicates that the use of the indicated * 'num_requests' requests for RDMA has completed. This is a * synchronous (blocking) operation. * * The supplied regions can be local or remote. * * AM-handler context: May be called in an AM handler context * */ extern void firehose_release(firehose_request_t const **reqs, int numreqs); #endif gasnet-2025.8.0/other/firehose/firehose_region.c0000664000175000017500000017037615142313673021700 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/firehose/firehose_region.c $ * Description: * Copyright 2004, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include #include #ifdef FIREHOSE_REGION #include /* For possible inlining */ typedef struct _fh_bucket_t { fh_key_t fh_key; /* cached key for hash table */ void *fh_next; /* linked list in hash table */ /* _must_ be in this order */ /* pointer to the containing region. holds ref counts, etc */ firehose_private_t *priv; /* pointer to next bucket in same region */ struct _fh_bucket_t *next; } fh_bucket_t; /* IFF firehose_fwd.h DID set these, complain now */ #ifdef FIREHOSE_CLIENT_MAXREGION_SIZE #error "Conduits should no longer define FIREHOSE_CLIENT_MAXREGION_SIZE in firehose_fwd.h" #endif #ifdef FIREHOSE_CLIENT_MAXREGIONS #error "Conduits should no longer define FIREHOSE_CLIENT_MAXREGIONS in firehose_fwd.h" #endif /* ##################################################################### */ /* GLOBAL TABLES, LOCKS, ETC. */ /* ##################################################################### */ static firehose_private_t *fhi_lookup_cache; static firehose_private_t *fhi_priv_freelist; static size_t fhi_MaxRegionSize; /* Maximum number of regions to unpin per move callback */ #ifndef FH_MAX_UNPIN_REM #define FH_MAX_UNPIN_REM 4 #endif #ifndef FH_MAX_UNPIN_LOC #define FH_MAX_UNPIN_LOC 4 #endif /* ##################################################################### */ /* FORWARD DECLARATIONS, INTERNAL MACROS, ETC. */ /* ##################################################################### */ /* Disqualify remote pending buckets * and local buckets w/ only remote counts and no "free energy" */ #define FH_IS_READY(is_local, priv) \ ((is_local) \ ? (FHC_MAXVICTIM_BUCKETS_AVAIL || \ FH_IS_LOCAL_FIFO(priv) || \ FH_BUCKET_REFC(priv)->refc_l) \ : !FH_IS_REMOTE_PENDING(priv)) #ifdef FIREHOSE_CLIENT_T #define FH_CP_CLIENT(A,B) (A)->client = (B)->client #else #define FH_CP_CLIENT(A,B) ((void)0) #endif #if !defined FH_MAY_MERGE #define FH_MAY_MERGE(C) 1 #elif !defined FIREHOSE_CLIENT_T #error "Cannot define FH_MAY_MERGE without FIREHOSE_CLIENT_T" #endif /* Assumes node field is correct */ #define CP_PRIV_TO_REQ(req, priv) do { \ (req)->addr = FH_BADDR(priv); \ (req)->len = (priv)->len; \ (req)->internal = (priv); \ FH_CP_CLIENT((req), (priv)); \ } while(0) #define CP_REG_TO_PRIV(priv, node, reg) do { \ (priv)->fh_key = FH_KEYMAKE((reg)->addr, (node)); \ (priv)->len = (reg)->len; \ FH_CP_CLIENT((priv), (reg)); \ } while(0) #define CP_PRIV_TO_REG(reg, priv) do { \ (reg)->addr = FH_BADDR(priv); \ (reg)->len = (priv)->len; \ FH_CP_CLIENT((reg), (priv)); \ } while(0) static void fh_destroy_priv(firehose_private_t *priv); /* ##################################################################### */ /* VARIOUS HELPER FUNCTIONS */ /* ##################################################################### */ /* compute ending address of "region" */ GASNETI_INLINE(fh_region_end) uintptr_t fh_region_end(const firehose_region_t *region) { gasneti_assert(region != NULL); return (region->addr + (region->len - 1)); } /* compute ending address of "req" */ GASNETI_INLINE(fh_req_end) uintptr_t fh_req_end(const firehose_request_t *req) { gasneti_assert(req != NULL); return (req->addr + (req->len - 1)); } /* compute ending address of "priv" */ GASNETI_INLINE(fh_priv_end) uintptr_t fh_priv_end(const firehose_private_t *priv) { gasneti_assert(priv != NULL); return (FH_BADDR(priv) + (priv->len - 1)); } /* compute ending address of "bucket" */ GASNETI_INLINE(fh_bucket_end) uintptr_t fh_bucket_end(const fh_bucket_t *bucket) { gasneti_assert(bucket != NULL); return fh_priv_end(bucket->priv); } /* Compare two buckets with the same (node, address) * return non-zero if first is best * "best" is the one with the greatest forward extent. * In case of a tie on forward extent, the longer region wins. * In case of a complete tie, we return 0. */ GASNETI_INLINE(fh_bucket_is_better) int fh_bucket_is_better(const fh_bucket_t *a, const fh_bucket_t *b) { uintptr_t end_a, end_b; gasneti_assert(a != NULL); gasneti_assert(a->priv != NULL); gasneti_assert(b != NULL); gasneti_assert(b->priv != NULL); gasneti_assert(FH_KEY_EQ(a->fh_key, b->fh_key)); end_a = fh_bucket_end(a); end_b = fh_bucket_end(b); if_pt (end_a != end_b) { return (end_a > end_b); } else { return (a->priv->len > b->priv->len); } } /* Compare two buckets with the same (node, address) to pick the "best" one */ GASNETI_INLINE(fh_best_bucket) fh_bucket_t *fh_best_bucket(fh_bucket_t *a, fh_bucket_t *b) { return (fh_bucket_is_better(a,b)) ? a : b; } /* ##################################################################### */ /* BUCKET TABLE HANDLING */ /* ##################################################################### */ /* "Best" matches for each bucket go in the first ("best") hash table (1). * Any others go (unsorted) in the second ("other") hash table (2). * * Lookup only needs to consult the "best" list. * Insertion may involve bumping an entry from "best" to "other". * Deletion may involve promoting an entry from "other" to "best". * Only the deletion requires comparisions in the "other" list and * then only if we are deleting what is otherwise our best match. */ fh_hash_t *fh_BucketTable1; fh_hash_t *fh_BucketTable2; #define fh_bucket_uncover(B) do { ((B)->priv)->visible += 1; } while(0) #define fh_bucket_cover(B) do { ((B)->priv)->visible -= 1; } while(0) #ifdef FH_CLEAN_COVERED_AGGRESSIVE /* Since we search full FIFO there is no need to move covered to head */ #define fh_bucket_cover_and_check(B) fh_bucket_cover(B) #else GASNETI_INLINE(fh_bucket_cover_and_check) void fh_bucket_cover_and_check(fh_bucket_t *bucket) { firehose_private_t *priv = bucket->priv; fh_bucket_cover(bucket); if (priv->visible == 0) { fh_fifoq_t *fifo_head = NULL; gex_Rank_t node = FH_NODE(bucket); if (node == gasneti_mynode) { if (FH_IS_LOCAL_FIFO(priv)) { fifo_head = &fh_LocalFifo; } } else { if (FH_IS_REMOTE_FIFO(priv)) { fifo_head = &fh_RemoteNodeFifo[node]; } } if (fifo_head) { /* Move to HEAD of the FIFO */ gasneti_assert(!FH_TAILQ_EMPTY(fifo_head)); FH_TAILQ_REMOVE(fifo_head, priv); FH_TAILQ_INSERT_HEAD(fifo_head, priv); } else { /* Not yet in FIFO */ } } } #endif static fh_bucket_t *fh_bucket_lookup(gex_Rank_t node, uintptr_t addr) { FH_TABLE_ASSERT_LOCKED; FH_ASSERT_BUCKET_ADDR(addr); /* Only ever need to lookup in the first table */ return (fh_bucket_t *) fh_hash_find(fh_BucketTable1, FH_KEYMAKE(addr, node)); } static void fh_bucket_hash(fh_bucket_t *bucket, fh_key_t key) { fh_bucket_t *other; fh_hash_t *hash; FH_TABLE_ASSERT_LOCKED; gasneti_assert(bucket != NULL); bucket->fh_key = key; hash = fh_BucketTable1; /* check for existing entry, resolving conflict if any */ other = (fh_bucket_t *)fh_hash_find(fh_BucketTable1, key); if_pf (other != NULL) { /* resolve conflict */ if (fh_bucket_is_better(bucket, other)) { fh_hash_replace(fh_BucketTable1, other, bucket); fh_bucket_uncover(bucket); fh_bucket_cover_and_check(other); bucket = other; } hash = fh_BucketTable2; } else { fh_bucket_uncover(bucket); } fh_hash_insert(hash, key, bucket); return; } static void fh_bucket_unhash(fh_bucket_t *bucket) { fh_key_t key; FH_TABLE_ASSERT_LOCKED; gasneti_assert(bucket != NULL); key = bucket->fh_key; /* check for existence in "best" list */ if_pf ((fh_bucket_t *)fh_hash_find(fh_BucketTable1, key) == bucket) { /* found in the "best" list, so must search for a replacement */ fh_bucket_t *best = (fh_bucket_t *)fh_hash_find(fh_BucketTable2, key); if (best != NULL) { fh_bucket_t *other = fh_hash_next(fh_BucketTable2, best); while (other) { best = fh_best_bucket(other, best); other = fh_hash_next(fh_BucketTable2, other); } fh_hash_replace(fh_BucketTable2, best, NULL); fh_hash_replace(fh_BucketTable1, bucket, best); fh_bucket_uncover(best); } else { fh_hash_replace(fh_BucketTable1, bucket, NULL); } fh_bucket_cover(bucket); /* NOT fh_bucket_cover_and_check() which would place in FIFO */ } else { fh_hash_replace(fh_BucketTable2, bucket, NULL); } return; } static void fh_bucket_rehash(fh_bucket_t *bucket) { fh_bucket_t *other; fh_key_t key; FH_TABLE_ASSERT_LOCKED; gasneti_assert(bucket != NULL); key = bucket->fh_key; other = (fh_bucket_t *)fh_hash_find(fh_BucketTable1, key); if_pf ((other != bucket) && fh_bucket_is_better(bucket, other)) { /* We've moved up in the world */ fh_hash_replace(fh_BucketTable2, bucket, NULL); fh_hash_replace(fh_BucketTable1, other, bucket); fh_hash_insert(fh_BucketTable2, key, other); fh_bucket_uncover(bucket); fh_bucket_cover_and_check(other); } return; } /* XXX: merge freelist w/ page? */ static fh_bucket_t *fhi_bucket_freelist = NULL; GASNETI_INLINE(fh_bucket_new) fh_bucket_t *fh_bucket_new(void) { fh_bucket_t *bucket = fhi_bucket_freelist; if_pt (bucket != NULL) { fhi_bucket_freelist = bucket->fh_next; } else { /* Allocate a full page of buckets to amortize overheads */ const int count = GASNET_PAGESIZE / sizeof(fh_bucket_t); int i; bucket = gasneti_malloc(count * sizeof(fh_bucket_t)); gasneti_leak(bucket); for (i = 0; i < count - 1; ++i) { bucket[i].fh_next = &bucket[i+1]; } gasneti_assert(count > 1); bucket[count-1].fh_next = NULL; fhi_bucket_freelist = bucket + 1; } memset(bucket, 0, sizeof(fh_bucket_t)); return bucket; } GASNETI_INLINE(fh_bucket_free) void fh_bucket_free(fh_bucket_t *bucket) { bucket->fh_next = fhi_bucket_freelist; fhi_bucket_freelist = bucket; } GASNETI_INLINE(fh_clean_covered) int fh_clean_covered(int limit, firehose_region_t *reg, fh_fifoq_t *fifo_head) { firehose_private_t *priv = FH_TAILQ_FIRST(fifo_head); int count = 0; FH_TABLE_ASSERT_LOCKED; while ((count < limit) && priv) { firehose_private_t *next = FH_TAILQ_NEXT(priv); if (!priv->visible) { FH_TAILQ_REMOVE(fifo_head, priv); CP_PRIV_TO_REG(reg+count, priv); FH_TRACE_BUCKET(priv, REMFIFO); fh_destroy_priv(priv); ++count; } #ifndef FH_CLEAN_COVERED_AGGRESSIVE else break; /* Stop search at first visible region */ #endif priv = next; } return count; } GASNETI_INLINE(fh_clean_covered_local) int fh_clean_covered_local(int limit, firehose_region_t *reg) { int count = fh_clean_covered(limit, reg, &fh_LocalFifo); fhc_LocalVictimFifoBuckets -= count; fhc_LocalOnlyBucketsPinned -= count; return count; } GASNETI_INLINE(fh_clean_covered_remote) int fh_clean_covered_remote(gex_Rank_t node, int limit, firehose_region_t *reg) { int count = fh_clean_covered(limit, reg, &fh_RemoteNodeFifo[node]); fhc_RemoteVictimFifoBuckets[node] -= count; return count; } /* Also keep a hash table of the local private_t's we create so that we can * match them when received in an AM (pin reply or unpin request). * XXX: This use is trashing the NODE portion of priv->fh_key. We've been * careful to ensure that the only thing this breaks is the debugging output. * However, we should really see about a better way to do the lookup from * the unpin request to the private_t. I see two options: * 1) Carry an extra field over the wire (probably the actual private_t *) * that must be passed back to unpin (stored and passed in exactly the * same places that the client_t is) * 2) Keep a "PrivTable" which hashes locally pinned regions, but does so * external to the private_t. * If only local regions need to be hashed in this way then #2 wins on both * network traffic and storage space. * If remote regions are also hashed in this way (perhaps for detection of * duplicates?), then #2 wins on network traffic but loses slightly on * storage. */ fh_hash_t *fh_PrivTable; /* XXX: Would be nice to allow client to supply a hash on client_t. * However, that currently creates lifetime problems when creating * and destroying private_t's. */ #if defined(FIREHOSE_HASH_PRIV) /* Keep it */ #else #define FIREHOSE_HASH_PRIV(addr, len) \ FH_KEYMAKE((addr), ((len) >> FH_BUCKET_SHIFT)) #endif GASNETI_INLINE(fh_region_to_priv) firehose_private_t * fh_region_to_priv(const firehose_region_t *reg) { firehose_private_t *priv; fh_key_t key; FH_TABLE_ASSERT_LOCKED; key = FIREHOSE_HASH_PRIV(reg->addr, reg->len); priv = (firehose_private_t *)fh_hash_find(fh_PrivTable, key); return priv; } /* Given a node and a region_t, create the necessary hash table entries. * The FIFO linkage is NOT initialized */ static GASNETI_MALLOC firehose_private_t * fh_create_priv(gex_Rank_t node, const firehose_region_t *reg) { uintptr_t end_addr, bucket_addr; firehose_private_t *priv; fh_bucket_t **prev; FH_TABLE_ASSERT_LOCKED; priv = fhi_priv_freelist; if_pt (priv != NULL) { fhi_priv_freelist = priv->fh_next; } else { /* Allocate a full page of private_t's to amortize overheads */ const int count = GASNET_PAGESIZE / sizeof(firehose_private_t); int i; priv = gasneti_malloc(count * sizeof(firehose_private_t)); gasneti_leak(priv); for (i = 0; i < count - 1; ++i) { priv[i].fh_next = &priv[i+1]; } gasneti_assert(count > 1); priv[count-1].fh_next = NULL; fhi_priv_freelist = priv + 1; } memset(priv, 0, sizeof(firehose_private_t)); CP_REG_TO_PRIV(priv, node, reg); end_addr = fh_region_end(reg); prev = &priv->bucket; FH_FOREACH_BUCKET(reg->addr, end_addr, bucket_addr) { fh_bucket_t *bd = fh_bucket_new(); bd->priv = priv; fh_bucket_hash(bd, FH_KEYMAKE(bucket_addr, node)); *prev = bd; prev= &bd->next; } *prev = NULL; /* Hash the priv IFF local*/ if_pt (node == gasneti_mynode) { /* preserves the ADDR part but invalidates NODE */ priv->fh_key = FIREHOSE_HASH_PRIV(reg->addr, reg->len); gasneti_assert(fh_hash_find(fh_PrivTable, priv->fh_key) == NULL); fh_hash_insert(fh_PrivTable, priv->fh_key, priv); gasneti_assert(fh_hash_find(fh_PrivTable, priv->fh_key) == priv); } return priv; } static void fh_destroy_priv(firehose_private_t *priv) { fh_bucket_t *bucket; gex_Rank_t node; /* Unhash & free all the buckets */ bucket = priv->bucket; gasneti_assert(bucket != NULL); node = FH_NODE(bucket); do { fh_bucket_t *next = bucket->next; fh_bucket_unhash(bucket); fh_bucket_free(bucket); bucket = next; } while (bucket != NULL); /* Unhash the priv IFF local*/ if_pt (node == gasneti_mynode) { gasneti_assert(fh_hash_find(fh_PrivTable, priv->fh_key) == priv); fh_hash_insert(fh_PrivTable, priv->fh_key, NULL); gasneti_assert(fh_hash_find(fh_PrivTable, priv->fh_key) == NULL); } priv->fh_next = fhi_priv_freelist; fhi_priv_freelist = priv; } /* Given an existing private_t and a region_t, change the necessary hash * table entries. */ static void fh_update_priv(firehose_private_t *priv, const firehose_region_t *reg) { uintptr_t bucket_addr; uintptr_t old_start, new_start; uintptr_t old_end, new_end; gex_Rank_t node = FH_NODE(priv); /* safe because priv is remote */ fh_bucket_t *bucket; fh_bucket_t **prev; FH_TABLE_ASSERT_LOCKED; old_start = FH_BADDR(priv); old_end = fh_priv_end(priv); new_start = reg->addr; new_end = fh_region_end(reg); if_pt ((old_start == new_start) && (old_end == new_end)) { FH_CP_CLIENT(priv, reg); return; /* nothing else needs to change */ } #if 0 bucket = fh_bucket_lookup(node, new_start); if (bucket && (fh_bucket_end(bucket) == new_end)) { gasneti_console_message("FH INFO","exact match %p %p (%d, %p, %dk)", bucket->priv, priv, node, (void *)reg->addr, (int)(reg->len)/1024); } #endif /* updates fh_key, len and client */ CP_REG_TO_PRIV(priv, node, reg); /* Create new hash entries for "prefix" */ bucket = priv->bucket; if (new_start < old_start) { prev = &priv->bucket; FH_FOREACH_BUCKET(new_start, old_start-1, bucket_addr) { fh_bucket_t *bd = fh_bucket_new(); bd->priv = priv; fh_bucket_hash(bd, FH_KEYMAKE(bucket_addr, node)); *prev = bd; prev = &bd->next; } *prev = bucket; } /* Rehash existing buckets as needed */ do { fh_bucket_rehash(bucket); prev = &bucket->next; bucket = bucket->next; } while (bucket != NULL); /* Create new hash entries for "suffix" */ if (new_end > old_end) { FH_FOREACH_BUCKET(old_end+1, new_end, bucket_addr) { fh_bucket_t *bd = fh_bucket_new(); bd->priv = priv; fh_bucket_hash(bd, FH_KEYMAKE(bucket_addr, node)); *prev = bd; prev= &bd->next; } } return; } /* * Looks for opportunities to merge adjacent pinned regions. * The hash table is such that any region completely covered by * the new region will no longer get any hits. So, such regions will * eventually end up being recycled from the FIFO. * * XXX: Dan has noted that if we tracked which pages were *ever* pinned then * we could enlarge regions even more agressively, to cover pages that were * once used but not recently enough to be in the table. However, we'd hit * problems when glibc's malloc unmaps freed pages. */ GASNETI_INLINE(fhi_merge_regions) void fhi_merge_regions(firehose_region_t *pin_region) { uintptr_t addr = pin_region->addr; size_t len = pin_region->len; size_t space_avail = fhi_MaxRegionSize - len; size_t extend; fh_bucket_t *bd; gasneti_assert(len <= fhi_MaxRegionSize); /* Look to merge w/ successor */ if (space_avail && GASNETT_PREDICT_TRUE(addr + len != 0) /* avoid wrap around */) { uintptr_t next_addr = addr + len; bd = fh_bucket_lookup(gasneti_mynode, next_addr); if (bd && FH_MAY_MERGE(&bd->priv->client)) { uintptr_t end_addr = fh_priv_end(bd->priv) + 1; gasneti_assert(end_addr > next_addr); extend = end_addr - next_addr; if (extend <= space_avail) { /* We cover the other region fully */ len += extend; space_avail -= extend; } } gasneti_assert(len <= fhi_MaxRegionSize); } /* Look to merge w/ predecessor */ if (space_avail && GASNETT_PREDICT_TRUE(addr != 0) /* avoid wrap around */) { bd = fh_bucket_lookup(gasneti_mynode, addr - FH_BUCKET_SIZE); if (bd && FH_MAY_MERGE(&bd->priv->client)) { const firehose_private_t *priv = bd->priv; gasneti_assert(priv != NULL); gasneti_assert(fh_priv_end(priv) >= (addr - 1)); gasneti_assert(fh_priv_end(priv) < (addr + (len - 1))); extend = addr - FH_BADDR(priv); if (extend <= space_avail) { /* We cover the other region fully */ addr -= extend; len += extend; space_avail -= extend; } } gasneti_assert(len <= fhi_MaxRegionSize); } pin_region->addr = addr; pin_region->len = len; } /* Spin to get some more space */ GASNETI_INLINE(fhi_wait_for_one) void fhi_wait_for_one(const firehose_private_t *priv) { firehose_region_t unpin_regions[FH_MAX_UNPIN_LOC]; int num_unpin; /* Verify the state is what we think it is */ gasneti_assert(FH_BUCKET_REFC(priv)->refc_r > 0); gasneti_assert(FH_BUCKET_REFC(priv)->refc_l == 0); gasneti_assert(FHC_MAXVICTIM_BUCKETS_AVAIL == 0); num_unpin = fh_WaitLocalFirehoses(1, unpin_regions); if (num_unpin) { gasneti_assert(num_unpin == 1); num_unpin += fh_clean_covered_local(FH_MAX_UNPIN_LOC - num_unpin, unpin_regions + num_unpin); FH_TABLE_UNLOCK; firehose_move_callback(gasneti_mynode, unpin_regions, num_unpin, NULL, 0); FH_TABLE_LOCK; } #ifdef DEBUG_LOCAL_TABLE --fhc_LocalReserved; #endif fhc_LocalOnlyBucketsPinned--; gasneti_assert(FHC_MAXVICTIM_BUCKETS_AVAIL > 0); } /* add a locally pinned region to the tables */ GASNETI_INLINE(fhi_init_local_region) firehose_private_t * fhi_init_local_region(int local_ref, firehose_region_t *region) { #if GASNET_NDEBUG && PLATFORM_COMPILER_CLANG && PLATFORM_COMPILER_VERSION_GE(16,0,0) // Work-around bug 4617 by inhibiting some optimization(s) firehose_private_t * volatile priv; #else firehose_private_t *priv; #endif gasneti_assert(region != NULL); gasneti_assert((local_ref == 0) || (local_ref == 1)); priv = fh_region_to_priv(region); if_pf (priv != NULL) { /* We lost a race and somebody else created our region for us */ if_pf (local_ref && !FH_IS_READY(1, priv)) { /* The matching region currently has only remote referrences and * we'd overcommit the local-only limit if we acquired it locally. */ /* Spin to acquire 1 region of space */ fhi_wait_for_one(priv); /* We have space, but the region we hit might not exist anymore. */ priv = fh_region_to_priv(region); } if (priv) { gasneti_assert(!local_ref || FH_IS_READY(1, priv)); /* 1) acquire the existing pinning before releasing the lock */ fh_priv_acquire_local(local_ref, priv); /* 2) release the duplicate we've created */ FH_TABLE_UNLOCK; firehose_move_callback(gasneti_mynode, region, 1, NULL, 0); FH_TABLE_LOCK; if (local_ref) { /* 3a) correct resource count */ fhc_LocalOnlyBucketsPinned--; } else { /* 3b) ensure region has correct client_t */ FH_CP_CLIENT(region, priv); } return priv; } } /* We get here if there was no duplicate entry, or if there was one * which disappeared while we polled for additional resources. */ /* Create the new table entries w/ proper ref counts */ priv = fh_create_priv(gasneti_mynode, region); FH_BSTATE_SET(priv, fh_used); FH_SET_LOCAL_INUSE(priv); FH_BUCKET_REFC(priv)->refc_l = local_ref; FH_BUCKET_REFC(priv)->refc_r = !local_ref; FH_TRACE_BUCKET(priv, INIT); return priv; } /* Lookup a region, returning the coresponding priv if found, else NULL. */ GASNETI_INLINE(fhi_find_priv) firehose_private_t * fhi_find_priv(gex_Rank_t node, uintptr_t addr, size_t len) { firehose_private_t *priv = NULL; fh_bucket_t *bd; FH_TABLE_ASSERT_LOCKED; bd = fh_bucket_lookup(node, addr); if_pt (bd && ((addr + (len - 1)) <= fh_bucket_end(bd))) { /* Firehose HIT */ priv = bd->priv; } return priv; } /* * fh_FreeVictim(count, region_array, head) * * This function removes 'count' firehoses from the victim FIFO (local or * remote), and fills the region_array with regions suitable for move_callback. * It returns the amount of regions (not buckets) created in the region_array. * * NOTE: it is up to the caller to make sure the region array is large enough. */ int fh_FreeVictim(int count, firehose_region_t *reg, fh_fifoq_t *fifo_head) { firehose_private_t *priv; int i; FH_TABLE_ASSERT_LOCKED; gasneti_assert(count > 0); for (i = 0; i < count; ++i) { /* There must be enough buckets in the victim FIFO to unpin. This * criteria should always hold true per the constraints on * fhc_LocalOnlyBucketsPinned. */ gasneti_assert(!FH_TAILQ_EMPTY(fifo_head)); /* Now do the real work */ priv = FH_TAILQ_FIRST(fifo_head); FH_TAILQ_REMOVE(fifo_head, priv); CP_PRIV_TO_REG(reg+i, priv); FH_TRACE_BUCKET(priv, REMFIFO); fh_destroy_priv(priv); } return count; } /* ##################################################################### */ /* PINNING QUERIES */ /* ##################################################################### */ /* If entire region is pinned then return non-zero. Note that we are counting on lookup giving the match with greatest forward extent. We must take care to disqualify regions which cannot be acquired without blocking (the FH_IS_READY test). */ int fh_region_ispinned(gex_Rank_t node, uintptr_t addr, size_t len) { fh_bucket_t *bd; int retval = 0; FH_TABLE_ASSERT_LOCKED; bd = fh_bucket_lookup(node, addr); if_pt (bd && FH_IS_READY(node == gasneti_mynode, bd->priv) && ((addr + (len - 1)) <= fh_bucket_end(bd))) { fhi_lookup_cache = bd->priv; retval = 1; } return retval; } /* If any part of region is pinned then update region and return non-zero. We must take care to disqualify regions which cannot be acquired without blocking (the FH_IS_READY test). */ int fh_region_partial(gex_Rank_t node, uintptr_t *addr_p, size_t *len_p) { uintptr_t start_addr, end_addr, bucket_addr; int is_local = (node == gasneti_mynode); int retval = 0; FH_TABLE_ASSERT_LOCKED; start_addr = *addr_p; end_addr = start_addr + (*len_p - 1); FH_FOREACH_BUCKET(start_addr, end_addr, bucket_addr) { fh_bucket_t *bd = fh_bucket_lookup(node, bucket_addr); if (bd && FH_IS_READY(is_local, bd->priv)) { *addr_p = FH_BADDR(bd->priv); *len_p = bd->priv->len; fhi_lookup_cache = bd->priv; retval = 1; break; } } return retval; } /* ##################################################################### */ /* LOCAL PINNING */ /* ##################################################################### */ void fh_acquire_local_region(firehose_request_t *req) { firehose_private_t *priv; #if GASNET_DEBUG int loop_count = 0; #endif gasneti_assert(req != NULL); gasneti_assert(req->node == gasneti_mynode); gasneti_assert(req->len <= fhi_MaxRegionSize); FH_TABLE_ASSERT_LOCKED; retry: priv = fhi_find_priv(gasneti_mynode, req->addr, req->len); if_pf (priv == NULL) { /* Firehose MISS, now must pin it */ firehose_region_t pin_region; firehose_region_t unpin_regions[FH_MAX_UNPIN_LOC]; int num_unpin; pin_region.addr = req->addr; pin_region.len = req->len; fhi_merge_regions(&pin_region); num_unpin = fh_WaitLocalFirehoses(1, unpin_regions); gasneti_assert ((num_unpin == 0) || (num_unpin == 1)); /* unpin !visible regions on the Fifo */ num_unpin += fh_clean_covered_local(FH_MAX_UNPIN_LOC - num_unpin, unpin_regions + num_unpin); FH_TABLE_UNLOCK; firehose_move_callback(gasneti_mynode, unpin_regions, num_unpin, &pin_region, 1); FH_TABLE_LOCK; priv = fhi_init_local_region(1, &pin_region); #ifdef DEBUG_LOCAL_TABLE --fhc_LocalReserved; #endif GASNETI_TRACE_EVENT(C,FH_LOCAL_MISS); } else if_pf (!FH_IS_READY(1, priv)) { /* We hit, but the region currently has only remote referrences and * we'd overcommit the local-only limit if we acquired it locally. */ /* Spin to acquire 1 region of space */ fhi_wait_for_one(priv); /* We have space now, but the region we hit might not exist anymore. * So, we start over. Note we can only restart ONCE. */ gasneti_assert(!loop_count++); goto retry; } else { /* HIT on a region we can acquire w/o blocking */ fh_priv_acquire_local(1, priv); GASNETI_TRACE_EVENT(C,FH_LOCAL_HIT); } CP_PRIV_TO_REQ(req, priv); return; } void fh_commit_try_local_region(firehose_request_t *req) { firehose_private_t *priv; gasneti_assert(req != NULL); gasneti_assert(req->node == gasneti_mynode); FH_TABLE_ASSERT_LOCKED; /* We *MUST* be commiting the most recent lookup */ priv = fhi_lookup_cache; gasneti_assert(priv != NULL); gasneti_assert(req->addr >= FH_BADDR(priv)); gasneti_assert(fh_req_end(req) <= fh_priv_end(priv)); /* We must be able to acquire w/o overcommiting the FIFO */ gasneti_assert(FH_IS_READY(1, priv)); fh_priv_acquire_local(1, priv); CP_PRIV_TO_REQ(req, priv); } void fh_release_local_region(firehose_request_t *request) { FH_TABLE_ASSERT_LOCKED; gasneti_assert(request != NULL); gasneti_assert(request->node == gasneti_mynode); gasneti_assert(request->internal != NULL); fh_priv_release_local(1, request->internal); fh_AdjustLocalFifoAndPin(gasneti_mynode, NULL, 0); return; } /* ##################################################################### */ /* REMOTE PINNING */ /* ##################################################################### */ static void fhi_hang_callback(firehose_private_t *priv, firehose_request_t *req, firehose_completed_fn_t callback, void * context) { fh_completion_callback_t *ccb = fh_alloc_completion_callback(); ccb->flags = FH_CALLBACK_TYPE_COMPLETION; ccb->request = req; ccb->callback = callback; ccb->context = context; /* CSB: Make sure the end of the list contains a completion end tag */ if ((void *)priv->fh_tqe_next == NULL) ccb->fh_tqe_next = FH_COMPLETION_END; else ccb->fh_tqe_next = (fh_completion_callback_t *) priv->fh_tqe_next; gasneti_assert(ccb->fh_tqe_next != NULL); priv->fh_tqe_next = (firehose_private_t *) ccb; gasneti_assert(req->internal == NULL); req->internal = (firehose_private_t *) ccb; FH_TRACE_BUCKET(priv, PENDADD); GASNETI_TRACE_PRINTF(C, ("Firehose Pending ADD priv=%p " "(%p,%d), req=%p", (void *) priv, (void *) FH_BADDR(priv), (int) FH_NODE(priv->bucket), (void *) req)); req->flags |= FH_FLAG_PENDING; } void fh_acquire_remote_region(firehose_request_t *req, firehose_completed_fn_t callback, void * context, uint32_t flags, firehose_remotecallback_args_fn_t args_fn) { firehose_private_t *priv; gex_Rank_t node; gasneti_assert(req != NULL); gasneti_assert(req->node != gasneti_mynode); gasneti_assert(req->len <= fhi_MaxRegionSize); node = req->node; FH_TABLE_ASSERT_LOCKED; priv = fhi_find_priv(node, req->addr, req->len); if_pf (priv == NULL) { /* MISS */ char payload[(1+FH_MAX_UNPIN_REM)*sizeof(firehose_region_t) + sizeof(firehose_remotecallback_args_t)]; firehose_region_t *pin_region = (firehose_region_t *)payload; firehose_region_t *unpin_regions = pin_region + 1; size_t payload_size = sizeof(firehose_region_t); int num_unpin = 0; pin_region->addr = req->addr; pin_region->len = req->len; /* Acquire resources for the pinning */ if_pt (fhc_RemoteBucketsM > fhc_RemoteBucketsUsed[node]) { fhc_RemoteBucketsUsed[node]++; } else { num_unpin = fh_WaitRemoteFirehoses(node, 1, unpin_regions); gasneti_assert(num_unpin == 1); } gasneti_assert ((num_unpin == 0) || (num_unpin == 1)); /* unpin !visible regions on the Fifo */ num_unpin += fh_clean_covered_remote(node, FH_MAX_UNPIN_REM - num_unpin, unpin_regions + num_unpin); payload_size += num_unpin * sizeof(firehose_region_t); /* Create the "pending bucket" */ priv = fh_create_priv(node, pin_region); FH_BSTATE_SET(priv, fh_pending); FH_SET_REMOTE_PENDING(priv); FH_BUCKET_REFC(priv)->refc_r = 1; FH_TRACE_BUCKET(priv, INIT); fhi_hang_callback(priv, req, callback, context); /* Assemble AM payload */ if (flags & FIREHOSE_FLAG_ENABLE_REMOTE_CALLBACK) { payload_size += args_fn(context, (firehose_remotecallback_args_t *)(payload + payload_size)); gasneti_assert(payload_size <= gex_AM_LUBRequestMedium()); } FH_TABLE_UNLOCK; #ifdef FIREHOSE_UNBIND_CALLBACK if (num_unpin) firehose_unbind_callback(node, unpin_region, 1); #endif req->flags |= FH_FLAG_INFLIGHT; gex_AM_RequestMedium( gasneti_THUNK_TM, node, fh_handleridx(fh_am_move_reqh), payload, payload_size, GEX_EVENT_NOW, 0, flags, 1, num_unpin, PACK(priv)); } else if_pf (!FH_IS_READY(0, priv)) { /* HIT Pending */ fhi_hang_callback(priv, req, callback, context); FH_BUCKET_REFC(priv)->refc_r++; gasneti_assert(FH_BUCKET_REFC(priv)->refc_r > 0); FH_TRACE_BUCKET(priv, PENDING); FH_TABLE_UNLOCK; } else { /* "pure" HIT */ fh_priv_acquire_remote(node, priv); CP_PRIV_TO_REQ(req, priv); req->flags |= FH_FLAG_PINNED; FH_TABLE_UNLOCK; } FH_TABLE_ASSERT_UNLOCKED; } void fh_commit_try_remote_region(firehose_request_t *req) { firehose_private_t *priv; gasneti_assert(req != NULL); gasneti_assert(req->node != gasneti_mynode); FH_TABLE_ASSERT_LOCKED; /* We *MUST* be commiting the most recent lookup */ priv = fhi_lookup_cache; gasneti_assert(priv != NULL); gasneti_assert(req->addr >= FH_BADDR(priv)); gasneti_assert(fh_req_end(req) <= fh_priv_end(priv)); fh_priv_acquire_remote(req->node, priv); CP_PRIV_TO_REQ(req, priv); } void fh_release_remote_region(firehose_request_t *request) { FH_TABLE_ASSERT_LOCKED; gasneti_assert(request != NULL); gasneti_assert(request->node != gasneti_mynode); gasneti_assert(request->internal != NULL); gasneti_assert(!FH_IS_REMOTE_PENDING(request->internal)); fh_priv_release_remote(request->node, request->internal); gasneti_assert(fhc_RemoteVictimFifoBuckets[request->node] <= fhc_RemoteBucketsM); return; } /* * This function is called by the Firehose reply once a firehose request to pin * functions covered into a region completes. * * The function identifies the private_t's that were marked as 'pending'. * These 'pending buckets' may or may not have requests associated to them. * If they do, then requests pending a callback are added to a list to be run. * * The function returns the amount of callbacks that were added to the list of * pending requests pointing to the 'PendQ' parameter. */ int fh_find_pending_callbacks(gex_Rank_t node, firehose_region_t *region, int nreg, void *context, fh_pollq_t *PendQ) { firehose_private_t *priv = context; fh_completion_callback_t *ccb; int callspend = 0; FH_TABLE_ASSERT_LOCKED; /* Sanity checks */ gasneti_assert(priv != NULL); gasneti_assert(node != gasneti_mynode); gasneti_assert(node == FH_NODE(priv)); gasneti_assert(nreg == 1); FH_STAILQ_INIT(PendQ); /* Make sure the private_t was set as pending */ gasneti_assert(FH_IS_REMOTE_PENDING(priv)); FH_BSTATE_ASSERT(priv, fh_pending); /* Update priv to reflect the reply */ fh_update_priv(priv, region); /* Now make the private_t not pending */ FH_BSTATE_SET(priv, fh_used); /* Queue the callbacks */ ccb = (fh_completion_callback_t *) priv->fh_tqe_next; gasneti_assert(ccb != NULL); while (ccb != FH_COMPLETION_END) { firehose_request_t *req; fh_completion_callback_t *next; gasneti_assert(ccb->flags & FH_CALLBACK_TYPE_COMPLETION); next = FH_STAILQ_NEXT(ccb); req = ccb->request; gasneti_assert(req && (req->flags & FH_FLAG_PENDING)); req->flags &= ~FH_FLAG_PENDING; req->internal = priv; CP_PRIV_TO_REQ(req, priv); FH_STAILQ_INSERT_TAIL(PendQ, (fh_callback_t *) ccb); GASNETI_TRACE_PRINTF(C, ("Firehose Pending Request (%p,%d) " "enqueued %p for callback", (void *) req->addr, (int) req->len, (void *) req)); callspend++; ccb = next; } FH_SET_REMOTE_INUSE(priv); return callspend; } /* ##################################################################### */ /* INITIALIZATION & FINALIZATION */ /* ##################################################################### */ /* * XXX: * We are constrained in two directions: limits on pages & regions * For now we are going to take the easy way out. Since the code * inherited from firehose-page counts the number of private_t's * (which are pinned regions for us), we'll just use that single * limit. We then set the limits in fhinfo such that the products * of terms will fit the memory limits: * max_LocalRegions * max_LocalPinSize <= MAXVICTIM_M * max_RemoteRegions * max_RemotePinSize <= M / (N-1) * As with firehose-page, the prepinned regions are counted against * the local regions. */ void fh_init_plugin(uintptr_t max_pinnable_memory, size_t max_regions, size_t max_region_size, const firehose_region_t *regions, size_t num_prepinned, firehose_info_t *fhinfo) { /* Memory sizes: */ uintptr_t param_M, param_VM; uintptr_t m_prepinned; /* Region size: */ size_t param_RS; /* Region counts: */ int param_R, param_VR; int firehoses; int i, j; #if 0 /* UNUSED - see param_RS computation for explanation */ int med_regions; #endif uintptr_t b_prepinned = 0; gex_Rank_t num_nodes = gasneti_nodes; int dflt_M, dflt_VM; int dflt_R, dflt_VR; int dflt_RS, auto_RS; // Minimum permissible values uintptr_t M_min, VM_min; int R_min, VR_min; if ((fhi_InitFlags & FIREHOSE_INIT_FLAG_LOCAL_ONLY)) { // Want at least 16MB worth of buckets in victim FIFO VM_min = (16*1024*1024) / FH_BUCKET_SIZE; // Want at least 32 regions of victim FIFO VR_min = 32; // Other two are unused M_min = R_min = 0; } else { // Want at least 32 buckets per node M_min = FH_BUCKET_SIZE * num_nodes * 32; // Want at least 256 buckets of victim FIFO VM_min = FH_BUCKET_SIZE * 256; // Want at least 1 region per node -- XXX/PHH THIS IS REALLY A BARE MINIMUM R_min = num_nodes; // Want at least 2 regions of FIFO -- XXX/PHH THIS IS REALLY A BARE MINIMUM VR_min = 2; } #if 0 /* UNUSED - see param_RS computation for explanation */ /* Count how many regions fit into an AM Medium payload */ med_regions = (MIN(gex_AM_LUBRequestMedium(), gex_AM_LUBReplyMedium()) - sizeof(firehose_remotecallback_args_t)) / sizeof(firehose_region_t); gasneti_assert(med_regions > FH_MAX_UNPIN_REM); /* firehose_remotecallback_args_t too big? */ #endif /* * Prepin optimization: PHASE 1. * * Count the number of buckets that are set as prepinned. * */ for (i = 0; i < num_prepinned; i++) { b_prepinned += FH_NUM_BUCKETS(regions[i].addr,regions[i].len); } m_prepinned = FH_BUCKET_SIZE * b_prepinned; /* Get limits from the environment */ param_M = fh_getenv("GASNET_FIREHOSE_M", (1<<20), &dflt_M); param_VM = fh_getenv("GASNET_FIREHOSE_MAXVICTIM_M", (1<<20), &dflt_VM); param_R = fh_getenv("GASNET_FIREHOSE_R", 1, &dflt_R); param_VR = fh_getenv("GASNET_FIREHOSE_MAXVICTIM_R", 1, &dflt_VR); param_RS = fh_getenv("GASNET_FIREHOSE_MAXREGION_SIZE", (1<<20), &dflt_RS); auto_RS = !param_RS && !dflt_RS; // explicit zero GASNETI_TRACE_PRINTF(C, ("ENV: Firehose M=%"PRIuPTR", MAXVICTIM_M=%"PRIuPTR, param_M, param_VM)); GASNETI_TRACE_PRINTF(C, ("ENV: Firehose R=%d, MAXVICTIM_R=%d", param_R, param_VR)); GASNETI_TRACE_PRINTF(C, ("ENV: Firehose max region size=%"PRIuPTR, (uintptr_t)param_RS)); /* Now assign decent "M" defaults based on physical memory */ if (dflt_M && dflt_VM) { if ((fhi_InitFlags & FIREHOSE_INIT_FLAG_LOCAL_ONLY)) { param_M = m_prepinned; param_VM = max_pinnable_memory - param_M; } else { param_M = max_pinnable_memory * (1-FH_MAXVICTIM_TO_PHYSMEM_RATIO); param_VM = max_pinnable_memory * FH_MAXVICTIM_TO_PHYSMEM_RATIO; } } else if (dflt_M) { uintptr_t limit = max_pinnable_memory - M_min; if (param_VM > limit) { char str0[24], str1[24]; gasneti_fatalerror("GASNET_FIREHOSE_MAXVICTIM_M (%s) is larger than the maximum" "(%s) permitted without also setting GASNET_FIREHOSE_M.", gasneti_format_number(param_VM, str0, 24, 1), gasneti_format_number(limit, str1, 24, 1)); } param_M = max_pinnable_memory - param_VM; } else if (dflt_VM) { uintptr_t limit = max_pinnable_memory - VM_min; if (param_M > limit) { char str0[24], str1[24]; gasneti_fatalerror("GASNET_FIREHOSE_M (%s) is larger than the maximum (%s) " "permitted without also setting GASNET_FIREHOSE_MAXVICTIM_M.", gasneti_format_number(param_M, str0, 24, 1), gasneti_format_number(limit, str1, 24, 1)); } param_VM = max_pinnable_memory - param_M; } else if (param_M + param_VM > max_pinnable_memory) { if (!gasneti_mynode) { char str0[24], str1[24], str2[24]; gasneti_console_message("WARNING", "GASNET_FIREHOSE_M (%s) and GASNET_FIREHOSE_MAXVICTIM_M (%s) together " "are more than the maximum of %s recommended based on GASNET_PHYSMEM_MAX.", gasneti_format_number(param_M, str0, 24, 1), gasneti_format_number(param_VM, str1, 24, 1), gasneti_format_number(max_pinnable_memory, str2, 24, 1)); } } uintptr_t orig_M = param_M; uintptr_t orig_VM = param_VM; if (!param_RS) { // default or explicit zero for "auto" if ((fhi_InitFlags & FIREHOSE_INIT_FLAG_LOCAL_ONLY)) { param_RS = max_region_size; } else { /* We don't (yet) do accounting against param_R, so the worst case * is unpining FH_MAX_UNPIN_REM regions, rather than param_RS/FH_BUCKET_SIZE. */ #if 0 /* We always send one AM to pin one region. So, we need to * have enough room AM to encode the requested region plus * some number of regions to unpin. In the worst case, the * regions selected for replacement will be single-bucket * sized (the minimum possible). * So, we require param_RS <= (med_regions-1)*FH_BUCKET_SIZE */ param_RS = MIN(max_region_size, (med_regions-1)*FH_BUCKET_SIZE); #else param_RS = max_region_size; #endif } } /* Round down to multiple of FH_BUCKET_SIZE for sanity */ param_RS &= ~FH_PAGE_MASK; #if FH_KEY_PACKED // Ensure max size fits in available bits of fh_key_t uintptr_t RS_max = ((uintptr_t)(FH_BUCKET_SIZE - 1) << FH_BUCKET_SHIFT); if (param_RS > RS_max) { if (!gasneti_mynode) { char str0[24], str1[24]; gasneti_console_message("WARNING", "GASNET_FIREHOSE_MAXREGION_SIZE (%s) has been " "reduced to the largest supported value (%s).", gasneti_format_number(param_RS, str0, 24, 1), gasneti_format_number(RS_max, str1, 24, 1)); } param_RS = RS_max; } #endif // Try to "work it all out" to address the requested volume of memory. // Normally we try to keep fixed RS, reducing the number of regions if needed. // However, with "auto" RS, we first attempt to enlarge RS const int avail_regions = max_regions - num_prepinned; int rescaled = 0; if (dflt_R && dflt_VR) { if ((fhi_InitFlags & FIREHOSE_INIT_FLAG_LOCAL_ONLY)) { param_R = num_prepinned; param_VR = max_regions - param_R; } else { /* try naively... */ param_R = (param_M - m_prepinned) / param_RS; param_VR = param_VM / param_RS; // Two approaches to rescaling if needed: double ratio = avail_regions / (double)(param_R + param_VR); // 1. try to scale up region size IFF user-provided vaule was 0 if (ratio < 1. && auto_RS) { param_RS = GASNETI_ALIGNUP(param_RS / ratio, FH_BUCKET_SIZE); #if FH_KEY_PACKED param_RS = MIN(param_RS, RS_max); #endif param_R = (param_M - m_prepinned) / param_RS; param_VR = param_VM / param_RS; ratio = avail_regions / (double)(param_R + param_VR); } // 2. reduce R parameters if neccessary (possibly after auto-scaling RS) if (ratio < 1.) { param_R *= ratio; param_VR *= ratio; rescaled = 1; } } } else if (dflt_R) { int limit = avail_regions - R_min; if (param_VR > limit) { gasneti_fatalerror("GASNET_FIREHOSE_MAXVICTIM_R (%d) is larger than the " "maximum permited (%d) without also setting GASNET_FIREHOSE_R.", param_VR, limit); } param_R = avail_regions - param_VR; } else if (dflt_VR) { int limit = avail_regions - VR_min; if (param_R > limit) { gasneti_fatalerror("GASNET_FIREHOSE_R (%d) is larger than the maximum permitted " "(%d) without also setting GASNET_FIREHOSE_MAXVICTIM_R.", param_R, limit); } param_VR = avail_regions - param_R; } else if (param_R + param_VR > avail_regions) { if (!gasneti_mynode) { char str0[24], str1[24]; gasneti_console_message("WARNING", "GASNET_FIREHOSE_R (%d) and GASNET_FIREHOSE_MAXVICTIM_R (%d) together " "are more than the maximum of %d recommended based on GASNET_PINNED_REGIONS_MAX.", param_R, param_VR, avail_regions); } } /* Trim and eliminate round-off so that limits are self-consistent */ param_R = MIN(param_R, num_prepinned + ((param_M - m_prepinned) / param_RS)); param_VR = MIN(param_VR, param_VM / param_RS); param_M = param_RS * (param_R - num_prepinned) + m_prepinned; param_VM = param_RS * param_VR; // If truncation occurred, report it if (rescaled && !gasneti_mynode) { char str0[24], str1[24], str2[24], str3[24], str4[24], str5[24]; uintptr_t max_space = param_RS * avail_regions; gasneti_console_message("WARNING", "GASNET_FIREHOSE_M (%s) and GASNET_FIREHOSE_MAXVICTIM_M (%s) together " "are more than the %s addressable with %d firehose regions of length %s. " "M and MAXVICTIM_M have been reduced to %s and %s, respectively.", gasneti_format_number(orig_M, str0, 24, 1), gasneti_format_number(orig_VM, str1, 24, 1), gasneti_format_number(max_space, str2, 24, 1), avail_regions, gasneti_format_number(param_RS, str3, 24, 1), gasneti_format_number(param_M, str4, 24, 1), gasneti_format_number(param_VM, str5, 24, 1)); } /* Report final values */ GASNETI_TRACE_PRINTF(C, ("param_M=%"PRIuPTR" param_VM=%"PRIuPTR, param_M, param_VM)); GASNETI_TRACE_PRINTF(C, ("param_RS=%"PRIuPTR, (uintptr_t)param_RS)); GASNETI_TRACE_PRINTF(C, ("param_R=%d param_VR=%d", param_R, param_VR)); gasneti_envint_display("GASNET_FIREHOSE_M", param_M, dflt_M, 1); gasneti_envint_display("GASNET_FIREHOSE_MAXVICTIM_M", param_VM, dflt_VM, 1); gasneti_envint_display("GASNET_FIREHOSE_R", param_R, dflt_R, 0); gasneti_envint_display("GASNET_FIREHOSE_MAXVICTIM_R", param_VR, dflt_VR, 0); gasneti_envint_display("GASNET_FIREHOSE_MAXREGION_SIZE", param_RS, dflt_RS, 1); /* * Validate firehose parameters parameters * NOTE: some of these check may be redundant, but better safe than sorry */ if ((fhi_InitFlags & FIREHOSE_INIT_FLAG_LOCAL_ONLY)) { if_pf (param_RS < FH_BUCKET_SIZE) gasneti_fatalerror("GASNET_FIREHOSE_MAXREGION_SIZE (%d) " "is less than the minimum %d", (int)param_RS, FH_BUCKET_SIZE); if_pf (param_VM < VM_min) gasneti_fatalerror("GASNET_FIREHOSE_MAXVICTIM_M (%"PRIuPTR") is less than " "the minimum %"PRIuPTR" (%"PRIuPTR" buckets)", param_VM, VM_min, VM_min >> FH_BUCKET_SHIFT); if_pf (param_VR < VR_min) gasneti_fatalerror("GASNET_FIREHOSE_MAXVICTIM_R (%d) is less than " "the minimum %d", param_VR, VR_min); if_pf (param_M < m_prepinned) /* XXX: need this check? */ gasneti_fatalerror("Too many bytes in initial" " pinned regions list (%"PRIuPTR") for current " "GASNET_FIREHOSE_M parameter (%"PRIuPTR")", m_prepinned, param_M); if_pf (param_R < num_prepinned) /* XXX: need this check? */ gasneti_fatalerror("Too many regions passed on initial" " pinned bucket list (%"PRIuPTR") for current " "GASNET_FIREHOSE_R parameter (%d)", (uintptr_t)num_prepinned, param_R); } else { if_pf (param_RS < FH_BUCKET_SIZE) gasneti_fatalerror("GASNET_FIREHOSE_MAXREGION_SIZE (%d) " "is less than the minimum %d", (int)param_RS, FH_BUCKET_SIZE); /* We don't (yet) do accounting against param_R, so the worst case * is unpining FH_MAX_UNPIN_REM regions, rather than param_RS/FH_BUCKET_SIZE. */ #if 0 if_pf (param_RS > (med_regions-1)*FH_BUCKET_SIZE) gasneti_fatalerror("GASNET_FIREHOSE_MAXREGION_SIZE (%"PRIuPTR") " "is too large to encode in an AM Medium payload " "(%d bytes max)", (uintptr_t)param_RS, FH_BUCKET_SIZE*(med_regions-1)); #endif if_pf (param_M < M_min) gasneti_fatalerror("GASNET_FIREHOSE_M (%"PRIuPTR") is less " "than the minimum %"PRIuPTR" (%"PRIuPTR" buckets)", param_M, M_min, M_min >> FH_BUCKET_SHIFT); if_pf (param_VM < VM_min) gasneti_fatalerror("GASNET_FIREHOSE_MAXVICTIM_M (%"PRIuPTR") is less than " "the minimum %"PRIuPTR" (%"PRIuPTR" buckets)", param_VM, VM_min, VM_min >> FH_BUCKET_SHIFT); if_pf (param_M - m_prepinned < M_min) gasneti_fatalerror("Too many bytes in initial" " pinned regions list (%"PRIuPTR") for current " "GASNET_FIREHOSE_M parameter (%"PRIuPTR")", m_prepinned, param_M); if_pf (param_R < R_min) gasneti_fatalerror("GASNET_FIREHOSE_R (%d) is less" "than the minimum %d", param_R, R_min); if_pf (param_VR < VR_min) gasneti_fatalerror("GASNET_FIREHOSE_MAXVICTIM_R (%d) is less than " "the minimum %d", param_VR, VR_min); if_pf (param_R - num_prepinned < R_min) gasneti_fatalerror("Too many regions passed on initial" " pinned bucket list (%"PRIuPTR") for current " "GASNET_FIREHOSE_R parameter (%d)", (uintptr_t)num_prepinned, param_R); } /* * Set local parameters */ fhc_LocalOnlyBucketsPinned = 0; fhc_LocalVictimFifoBuckets = 0; fhc_MaxVictimBuckets = num_prepinned + param_VR; fhi_MaxRegionSize = param_RS; /* * Set remote parameters */ firehoses = MIN(param_R, (param_M - m_prepinned) / param_RS); if (!(fhi_InitFlags & FIREHOSE_INIT_FLAG_LOCAL_ONLY)) { fhc_RemoteBucketsM = num_nodes > 1 ? firehoses / (num_nodes - 1) : firehoses; } GASNETI_TRACE_PRINTF(C, ("Maximum pinnable=%"PRIuPTR"\tMax allowed=%"PRIuPTR, (firehoses + param_VR) * param_RS + m_prepinned, max_pinnable_memory)); gasneti_assert((firehoses + param_VR) * param_RS + m_prepinned <= max_pinnable_memory); // Initialize hash tables for buckets (per-page mapping to regions) // See "BUCKET TABLE HANDLING" for more onfo on these tables { i = b_prepinned + (param_R + param_VR) * (param_RS >> FH_BUCKET_SHIFT); double scale = gasneti_getenv_dbl_withdefault("GASNET_FIREHOSE_TABLE_SCALE", 1.); i *= (scale / 16.); // default to 16:1, subject to adjustment by env var i = MAX(65536, i); // subject to minimum of 64k } for (j = 1; j < i; j *= 2) { /* nothing */ } // next power of two fh_BucketTable1 = fh_hash_create(j); fh_BucketTable2 = fh_hash_create(j/2); // Allocate hash table for region tracking // TODO: replace the arbitrary factor 1.2 with an env var? i = 1.2 * (param_R + param_VR + num_prepinned); /* round 'i' up to a power of two: */ for (j = 1; j < i; j *= 2) { /* nothing */ } fh_PrivTable = fh_hash_create(j); /* * Prepin optimization: PHASE 2. * * In this phase, the firehose parameters have been validated and the * buckets are added to the firehose table and sent to the FIFO. */ for (i = 0; i < num_prepinned; i++) { firehose_private_t *priv; firehose_region_t *tmp; if (!regions[i].len) continue; /* We can safely discard the const qualifier, we know * fhi_init_local_region won't actually modify the region. */ tmp = (firehose_region_t *)&(regions[i]); priv = fhi_init_local_region(1, tmp); #ifdef DEBUG_BUCKETS priv->prepinned = 1; #endif fhc_LocalOnlyBucketsPinned++; #if 0 fh_priv_release_local(1, priv); #endif } /* * Set fields in the firehose information type, according to the limits * established by the firehose parameters. */ { fhinfo->max_LocalRegions = param_VR; fhinfo->max_LocalPinSize = param_RS; if ((fhi_InitFlags & FIREHOSE_INIT_FLAG_LOCAL_ONLY)) { fhc_MaxRemoteBuckets = 0; fhinfo->max_RemoteRegions = 0; fhinfo->max_RemotePinSize = 0; } else { fhc_MaxRemoteBuckets = param_RS >> FH_BUCKET_SHIFT; fhinfo->max_RemoteRegions = fhc_RemoteBucketsM; fhinfo->max_RemotePinSize = param_RS; } GASNETI_TRACE_PRINTF(C, ("Firehose M=%"PRIuPTR" (fh=%d)\tprepinned=%"PRIuPTR" (buckets=%"PRIuPTR")", param_M, firehoses, m_prepinned, b_prepinned)); GASNETI_TRACE_PRINTF(C, ("Firehose Maxvictim=%"PRIuPTR" (fh=%d)", param_VM, fhc_MaxVictimBuckets)); GASNETI_TRACE_PRINTF(C, ("MaxLocalPinSize=%"PRIuPTR"\tMaxRemotePinSize=%"PRIuPTR, (uintptr_t) fhinfo->max_LocalPinSize, (uintptr_t) fhinfo->max_RemotePinSize)); GASNETI_TRACE_PRINTF(C, ("MaxLocalRegions=%"PRIuPTR"\tMaxRemoteRegions=%"PRIuPTR, (uintptr_t) fhinfo->max_LocalRegions, (uintptr_t) fhinfo->max_RemoteRegions)); } return; } static void fh_priv_print_fn(void *val, void *arg) { firehose_private_t *priv = val; int lref = FH_IS_LOCAL_FIFO(priv) ? 0 : FH_BUCKET_REFC(priv)->refc_l; int rref = FH_IS_LOCAL_FIFO(priv) ? 0 : FH_BUCKET_REFC(priv)->refc_r; gasneti_console_message("FH INFO","%p - %p (%4d of %4d pages visible) refc=(%4dL, %4dR)\n", (void*)FH_BADDR(priv), (void*)fh_priv_end(priv), priv->visible, (int)(priv->len>>FH_BUCKET_SHIFT), lref, rref); } #ifdef DEBUG_BUCKETS static void fh_priv_check_fn(void *val, void *arg) { fh_bucket_t *bucket = val; firehose_private_t *priv = bucket->priv; int live = (FH_NODE(bucket) == gasneti_mynode) ? (!FH_IS_LOCAL_FIFO(priv) && FH_BUCKET_REFC(priv)->refc_l) : (!FH_IS_REMOTE_FIFO(priv) && FH_BUCKET_REFC(priv)->refc_r); if_pf (live && !priv->prepinned) { /* XXX: promote to fatalerror? */ gasneti_console_message("WARNING","firehose leak detected - %d:%p %4d pages (%4d pages visible)\n", (int)FH_NODE(bucket), (void*)FH_BADDR(priv), (int)(priv->len>>FH_BUCKET_SHIFT), priv->visible); priv->prepinned = 1; /* Avoids duplicates in output */ } } #endif static void fh_priv_cleanup_fn(void *val, void *arg) { firehose_private_t *priv = val; if (FH_IS_LOCAL_FIFO(priv) || !FH_BUCKET_REFC(priv)->refc_l) { firehose_region_t unpin_region; CP_PRIV_TO_REG(&unpin_region, priv); FH_TABLE_UNLOCK; firehose_move_callback(gasneti_mynode, &unpin_region, 1, NULL, 0); FH_TABLE_LOCK; } else { /* Indicates pre-pinned (or a leak!!) */ } fh_destroy_priv(priv); } void fh_fini_plugin(void) { firehose_private_t *priv; FH_TABLE_ASSERT_LOCKED; if (fh_verbose) { /* Dump the local table, unsorted */ gasneti_console_message("FH INFO","Final local firehose table:"); fh_hash_apply(fh_PrivTable, &fh_priv_print_fn, NULL); } #ifdef DEBUG_BUCKETS /* Check the hash table for leaks */ fh_hash_apply(fh_BucketTable1, &fh_priv_check_fn, NULL); fh_hash_apply(fh_BucketTable2, &fh_priv_check_fn, NULL); #endif if (fhi_InitFlags & FIREHOSE_INIT_FLAG_UNPIN_ON_FINI) { /* Unpin and free everything we pinned: */ fh_hash_apply(fh_PrivTable, &fh_priv_cleanup_fn, NULL); } fh_hash_destroy(fh_BucketTable2); fh_hash_destroy(fh_BucketTable1); fh_hash_destroy(fh_PrivTable); #if 0 /* No - fhi_priv_freelist is allocated in chunks, not individually */ priv = fhi_priv_freelist; while (priv != NULL) { firehose_private_t *next = priv->fh_next; gasneti_free(priv); priv = next; } #endif } /* ##################################################################### */ /* ACTIVE MESSAGES */ /* ##################################################################### */ int fh_move_request(gex_Rank_t node, firehose_region_t *new_reg, size_t r_new, firehose_region_t *old_reg, size_t r_old, void *context) { firehose_private_t *priv; int num_pin = 0; int i; FH_TABLE_LOCK; GASNETI_TRACE_PRINTF(C, ("Firehose move request: new=%d, old=%d", (int) r_new, (int)r_old)); gasneti_assert(r_new == 1); /* a feature of FIREHOSE_REGION */ priv = fhi_find_priv(gasneti_mynode, new_reg->addr, new_reg->len); if_pf (priv == NULL) { /* MISSED in table */ fhi_merge_regions(new_reg); num_pin = 1; } else { /* HIT in table */ fh_priv_acquire_local(0, priv); CP_PRIV_TO_REG(new_reg, priv); } GASNETI_TRACE_PRINTF(C, ("Firehose move request: pin new=%d", num_pin)); /* Release the "old" regions, potentially overcommiting the FIFO */ for (i=0; i < r_old; ++i) { fh_priv_release_local(0, fh_region_to_priv(&(old_reg[i]))); } /* Pin the region if needed and fix any FIFO overcommit */ fh_AdjustLocalFifoAndPin(node, new_reg, num_pin); /* Finish table entry for newly pinned region */ if_pf (num_pin) { (void)fhi_init_local_region(0, new_reg); } FH_TABLE_UNLOCK; return 1; } /* * Detailed, time-consuming validation of local table state. */ #ifdef DEBUG_LOCAL_TABLE int fhc_LocalReserved = 0; static void _fhi_acct_fifo_fn(void *key, void *val) { firehose_private_t *priv = key; int *count_p = val; if (FH_IS_LOCAL_FIFO(priv)) (*count_p)++; } static void _fhi_acct_lref_fn(void *key, void *val) { firehose_private_t *priv = key; int *count_p = val; fh_refc_t *rp = FH_BUCKET_REFC(priv); if (!FH_IS_LOCAL_FIFO(priv) && rp->refc_l) { (*count_p)++; } } void _fhi_debug_local_table(const char *func, int line) { int lonly, lref_count, fifo_count; firehose_private_t *priv; int err = 0; if_pf(!fh_PrivTable) return 0; /* Count FIFO length (method 1) */ fifo_count = 0; for (priv = FH_TAILQ_FIRST(&fh_LocalFifo); priv; priv = FH_TAILQ_NEXT(priv)) { ++fifo_count; } if (fifo_count != fhc_LocalVictimFifoBuckets) { gasneti_console_message("FH INFO","%s:%d fhc_LocalVictimFifoBuckets (%d) != FIFO entries (%d)", func, line, fhc_LocalVictimFifoBuckets, fifo_count); ++err; } /* Count FIFO length (method 2) */ fifo_count = 0; fh_hash_apply(fh_PrivTable, &_fhi_acct_fifo_fn, &fifo_count); if (fifo_count != fhc_LocalVictimFifoBuckets) { gasneti_console_message("FH INFO","%s:%d fhc_LocalVictimFifoBuckets (%d) != in-FIFO hash entries (%d)", func, line, fhc_LocalVictimFifoBuckets, fifo_count); ++err; } /* Count LocalOnly buckets */ lref_count = 0; fh_hash_apply(fh_PrivTable, &_fhi_acct_lref_fn, &lref_count); lonly = fhc_LocalReserved + fifo_count + lref_count; if (lonly != fhc_LocalOnlyBucketsPinned) { gasneti_console_message("FH INFO","%s:%d fhc_LocalOnlyBucketsPinned (%d) != FIFO + local-ref'd + resv'd (%d + %d + %d = %d)", func, line, fhc_LocalOnlyBucketsPinned, fifo_count, lref_count, fhc_LocalReserved, lonly); ++err; } if (err) gasneti_fatalerror("(see above)"); } #endif #endif gasnet-2025.8.0/other/firehose/firehose.c0000664000175000017500000011375015142313673020326 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/firehose/firehose.c $ * Description: * Copyright 2004, Christian Bell * Terms of use are as specified in license.txt */ #include #include static firehose_request_t *fh_request_freehead = NULL; static firehose_request_t *fh_request_new(firehose_request_t *ureq, int block); static void fh_request_free(firehose_request_t *req); /* Should we poll in the try/partial calls if we might be short on handles? */ #ifndef FH_POLL_FOR_HANDLES #define FH_POLL_FOR_HANDLES 0 #endif /* ##################################################################### */ /* LOCKS, FIFOS, ETC. */ /* ##################################################################### */ /* The following lock, referred to as the "table" lock, must be held for every * firehose operation that modifies the state of the firehose table. It must * be held during most of the firehose operations - adding/removing to the hash * table, adding/removing from the local and victim FIFOs. */ gasneti_mutex_t fh_table_lock = GASNETI_MUTEX_INITIALIZER; #ifndef FH_POLL_NOOP /* This lock protects the poll FIFO queue, used to enqueue callbacks. */ gasneti_mutex_t fh_pollq_lock = GASNETI_MUTEX_INITIALIZER; #endif /* Firehose FIFOs */ fh_fifoq_t fh_LocalFifo = FH_TAILQ_HEAD_INITIALIZER(fh_LocalFifo); fh_fifoq_t *fh_RemoteNodeFifo = NULL; /* Local Limits & Counters */ int fhc_LocalOnlyBucketsPinned; int fhc_LocalVictimFifoBuckets; int fhc_MaxVictimBuckets; /* Remote Limits & Counters */ int fhc_RemoteBucketsM; int fhc_MaxRemoteBuckets; int *fhc_RemoteBucketsUsed; int *fhc_RemoteVictimFifoBuckets; /* Freelist of fhi_RegionPool_t */ static FH_STAILQ_HEAD(_fhi_regpool_list_t, _fhi_RegionPool_t) fhi_regpool_list; static int fhi_regpool_num = 0; static int fhi_regpool_numbig = 0; /* Misc */ int fh_verbose = 0; /* ##################################################################### */ /* PUBLIC FIREHOSE INTERFACE */ /* ##################################################################### */ /* firehose_init() * firehose_fini() * * firehose_local_pin() * calls fh_acquire_local_region() * * firehose_try_local_pin() * calls fh_commit_try_local_region() * * firehose_partial_local_pin() * calls fh_commit_try_local_region() * * firehose_remote_pin() * calls fh_acquire_remote_region() * * firehose_try_local_pin() * calls fh_commit_try_remote_region() * * firehose_partial_local_pin() * calls fh_commit_try_remote_region() * * firehose_release() * calls fh_release_local_region() or fh_release_remote_region() */ uint32_t fhi_InitFlags = 0; extern void firehose_init(uintptr_t max_pinnable_memory, size_t max_regions, size_t max_region_size, const firehose_region_t *prepinned_regions, size_t num_prepinned, uint32_t flags, firehose_info_t *info) { int i; fh_verbose = gasneti_getenv_yesno_withdefault("GASNET_FIREHOSE_VERBOSE", 0); /* Make sure the refc field in buckets can also be used as a FIFO * pointer */ gasneti_assert(sizeof(fh_refc_t) == sizeof(void *)); gasneti_assert(FH_MAXVICTIM_TO_PHYSMEM_RATIO >= 0 && FH_MAXVICTIM_TO_PHYSMEM_RATIO <= 1); /* validate the prepinned regions list */ for (i = 0; i < num_prepinned; i++) { const firehose_region_t *region = &prepinned_regions[i]; if (region->addr % FH_BUCKET_SIZE != 0) gasneti_fatalerror("firehose_init: prepinned " "region is not aligned on a bucket " "boundary (addr = %p)", (void *) region->addr); if (region->len % FH_BUCKET_SIZE != 0) gasneti_fatalerror("firehose_init: prepinned " "region is not a multiple of firehose " "bucket size in length (len = %d)", (int) region->len); } FH_TABLE_LOCK; /* Initialize the local firehose FIFO queue */ FH_TAILQ_INIT(&fh_LocalFifo); /* hit the request_t freelist for first allocation */ if (0) /* DISABLED - most clients now manage their own allocations */ { firehose_request_t *req = fh_request_new(NULL, 0); gasneti_assert(req != NULL); fh_request_free(req); } /* Allocate the per-node FIFOs and counters */ if (!(flags & FIREHOSE_INIT_FLAG_LOCAL_ONLY)) { fh_RemoteNodeFifo = (fh_fifoq_t *) gasneti_malloc(gasneti_nodes * sizeof(fh_fifoq_t)); fhc_RemoteBucketsUsed = (int *) gasneti_malloc(gasneti_nodes * sizeof(int)); fhc_RemoteVictimFifoBuckets = (int *) gasneti_malloc(gasneti_nodes * sizeof(int)); for (i = 0; i < gasneti_nodes; i++) { FH_TAILQ_INIT(&fh_RemoteNodeFifo[i]); fhc_RemoteBucketsUsed[i] = 0; fhc_RemoteVictimFifoBuckets[i] = 0; } } /* Init the region pool freelist */ FH_STAILQ_INIT(&fhi_regpool_list); /* Initialize -page OR -region specific data. _MUST_ be the last thing * called before return */ fhi_InitFlags = flags; fh_init_plugin(max_pinnable_memory, max_regions, max_region_size, prepinned_regions, num_prepinned, info); FH_TABLE_UNLOCK; return; } #define FH_REQUEST_ALLOC_PERIDX 256 #define FH_REQUEST_ALLOC_MAXIDX 256 static firehose_request_t *fh_request_bufs[FH_REQUEST_ALLOC_MAXIDX] = { 0 }; static int fh_request_bufidx = 0; /* * XXX should call from gasnet_exit(), fatal or not * */ void firehose_fini(void) { int i; /* Acquire the lock(s) * DO NOT release unless FIREHOSE_INIT_FLAG_MAY_REINIT */ FH_TABLE_LOCK; #ifndef FH_POLL_NOOP FH_POLLQ_LOCK; #endif fh_fini_plugin(); /* Free the per-node firehose FIFO queues and counters */ if (!(fhi_InitFlags & FIREHOSE_INIT_FLAG_LOCAL_ONLY)) { gasneti_free(fh_RemoteNodeFifo); gasneti_free(fhc_RemoteBucketsUsed); gasneti_free(fhc_RemoteVictimFifoBuckets); } /* Free the region pool freelist */ while (!FH_STAILQ_EMPTY(&fhi_regpool_list)) { fhi_RegionPool_t *rpool; rpool = FH_STAILQ_FIRST(&fhi_regpool_list); FH_STAILQ_REMOVE_HEAD(&fhi_regpool_list); gasneti_free(rpool->regions); gasneti_free(rpool); } /* Deallocate the arrays of request_t buffers used, if applicable */ for (i = 0; i < FH_REQUEST_ALLOC_MAXIDX; i++) { if (fh_request_bufs[i] == NULL) break; gasneti_free(fh_request_bufs[i]); fh_request_bufs[i] = NULL; } fh_request_freehead = NULL; fh_request_bufidx = 0; if (fhi_InitFlags & FIREHOSE_INIT_FLAG_MAY_REINIT) { #ifndef FH_POLL_NOOP FH_POLLQ_UNLOCK; #endif FH_TABLE_UNLOCK; } return; } /* firehose_poll() * * Empties the Callback Fifo Queue. * * XXX should make fh_callback_t allocated from freelists. */ #ifndef FH_POLL_NOOP fh_pollq_t fh_CallbackFifo = FH_STAILQ_HEAD_INITIALIZER(fh_CallbackFifo); void firehose_poll() { fh_callback_t *fhc; while (!FH_STAILQ_EMPTY(&fh_CallbackFifo)) { FH_POLLQ_LOCK; if (!FH_STAILQ_EMPTY(&fh_CallbackFifo)) { fhc = FH_STAILQ_FIRST(&fh_CallbackFifo); FH_STAILQ_REMOVE_HEAD(&fh_CallbackFifo); FH_POLLQ_UNLOCK; #ifndef FIREHOSE_COMPLETION_IN_HANDLER if (fhc->flags & FH_CALLBACK_TYPE_COMPLETION) { fh_completion_callback_t *cc = (fh_completion_callback_t *) fhc; /* we flag a local hit if this completion was * not from an in-flight request */ int localhit = !(cc->request->flags & FH_FLAG_INFLIGHT); cc->callback(cc->context, cc->request, localhit); fh_free_completion_callback(cc); } #endif #ifndef FIREHOSE_REMOTE_CALLBACK_IN_HANDLER #ifndef FIREHOSE_COMPLETION_IN_HANDLER else #endif if (fhc->flags & FH_CALLBACK_TYPE_REMOTE) { fh_remote_callback_t *rc = (fh_remote_callback_t *) fhc; firehose_remote_callback(rc->node, rc->pin_list, rc->pin_list_num, &(rc->args)); /* Send an AMRequest to the reply handler */ fh_send_firehose_reply(rc); gasneti_free(rc->pin_list); gasneti_free(fhc); continue; } #endif } else FH_POLLQ_UNLOCK; } return; } #endif extern const firehose_request_t * firehose_local_pin(uintptr_t addr, size_t nbytes, firehose_request_t *ureq) { firehose_request_t *req = NULL; FH_TABLE_LOCK; req = fh_request_new(ureq, 1); gasneti_assert(req != NULL); req->node = gasneti_mynode; req->addr = FH_ADDR_ALIGN(addr); req->len = FH_SIZE_ALIGN(addr,nbytes); req->flags |= FH_FLAG_PINNED; GASNETI_TRACE_EVENT_VAL(C,FH_LOCAL_PIN,(req->len >> FH_BUCKET_SHIFT)); /* HIT/MISS tracing is done in fh_acquire_local_region() */ fh_acquire_local_region(req); FH_TABLE_UNLOCK; return req; } extern const firehose_request_t * firehose_try_local_pin(uintptr_t addr, size_t len, firehose_request_t *ureq) { firehose_request_t *req = NULL; addr = FH_ADDR_ALIGN(addr); len = FH_SIZE_ALIGN(addr,len); GASNETI_TRACE_EVENT_VAL(C,FH_TRY_LOCAL_PIN,(len >> FH_BUCKET_SHIFT)); #if FH_POLL_FOR_HANDLES if_pf (!ureq && !fh_request_freehead) FIREHOSE_AMPOLL(); #endif FH_TABLE_LOCK; if (fh_region_ispinned(gasneti_mynode, addr, len)) { req = fh_request_new(ureq, 0); if_pt (req != NULL) { req->node = gasneti_mynode; req->addr = addr; req->len = len; req->flags |= FH_FLAG_PINNED; fh_commit_try_local_region(req); GASNETI_TRACE_EVENT(C,FH_TRY_LOCAL_HIT); } else { GASNETI_TRACE_EVENT(C,FH_TRY_LOCAL_FAIL); } } else { GASNETI_TRACE_EVENT(C,FH_TRY_LOCAL_MISS); } FH_TABLE_UNLOCK; return req; } extern const firehose_request_t * firehose_partial_local_pin(uintptr_t addr, size_t len, firehose_request_t *ureq) { firehose_request_t *req = NULL; addr = FH_ADDR_ALIGN(addr); len = FH_SIZE_ALIGN(addr,len); GASNETI_TRACE_EVENT_VAL(C,FH_PARTIAL_LOCAL_PIN,(len >> FH_BUCKET_SHIFT)); #if FH_POLL_FOR_HANDLES if_pf (!ureq && !fh_request_freehead) FIREHOSE_AMPOLL(); #endif FH_TABLE_LOCK; if (fh_region_partial(gasneti_mynode, &addr, &len)) { req = fh_request_new(ureq, 0); if_pt (req != NULL) { req->node = gasneti_mynode; req->addr = addr; req->len = len; req->flags |= FH_FLAG_PINNED; fh_commit_try_local_region(req); GASNETI_TRACE_EVENT(C,FH_PARTIAL_LOCAL_HIT); } else { GASNETI_TRACE_EVENT(C,FH_PARTIAL_LOCAL_FAIL); } } else { GASNETI_TRACE_EVENT(C,FH_PARTIAL_LOCAL_MISS); } FH_TABLE_UNLOCK; return req; } extern const firehose_request_t * firehose_remote_pin(gex_Rank_t node, uintptr_t addr, size_t len, uint32_t flags, firehose_request_t *ureq, firehose_remotecallback_args_fn_t remote_args_callback, firehose_completed_fn_t callback, void *context) { firehose_request_t *req = NULL; if_pf (node == gasneti_mynode) gasneti_fatalerror("Cannot request a Remote pin on a local node."); gasneti_assert(remote_args_callback == NULL ? 1 : (flags & FIREHOSE_FLAG_ENABLE_REMOTE_CALLBACK)); FH_TABLE_LOCK; req = fh_request_new(ureq, 1); gasneti_assert(req != NULL); req->node = node; req->addr = FH_ADDR_ALIGN(addr); req->len = FH_SIZE_ALIGN(addr,len); GASNETI_TRACE_EVENT_VAL(C,FH_REMOTE_PIN,(req->len >> FH_BUCKET_SHIFT)); fh_acquire_remote_region(req, callback, context, flags, remote_args_callback); /* Note that fh_acquire_remote_region unlocks before returning */ FH_TABLE_ASSERT_UNLOCKED; if (req->flags & FH_FLAG_PINNED) { /* If the request could be entirely pinned, process the * callback or return to user. If it could not be pinned, the * callback will be subsequently called from within the * firehose library */ GASNETI_TRACE_EVENT(C, FH_REMOTE_HIT); if (flags & FIREHOSE_FLAG_RETURN_IF_PINNED) { return req; } else { GASNETI_TRACE_PRINTF(C, ("Firehose callback req=%p", (void *)req)); callback(context, req, 1); } } else if (req->flags & FH_FLAG_INFLIGHT) { GASNETI_TRACE_EVENT(C, FH_REMOTE_MISS); } else { GASNETI_TRACE_EVENT(C, FH_REMOTE_PENDING); } return NULL; } extern const firehose_request_t * firehose_try_remote_pin(gex_Rank_t node, uintptr_t addr, size_t len, uint32_t flags, firehose_request_t *ureq) { firehose_request_t *req = NULL; if_pf (node == gasneti_mynode) gasneti_fatalerror("Cannot request a Remote pin on a local node."); addr = FH_ADDR_ALIGN(addr); len = FH_SIZE_ALIGN(addr,len); GASNETI_TRACE_EVENT_VAL(C,FH_TRY_REMOTE_PIN,(len >> FH_BUCKET_SHIFT)); #if FH_POLL_FOR_HANDLES if_pf (!ureq && !fh_request_freehead) FIREHOSE_AMPOLL(); #endif FH_TABLE_LOCK; if (fh_region_ispinned(node, addr, len)) { req = fh_request_new(ureq, 0); if_pt (req != NULL) { req->node = node; req->addr = addr; req->len = len; fh_commit_try_remote_region(req); GASNETI_TRACE_EVENT(C,FH_TRY_REMOTE_HIT); } else { GASNETI_TRACE_EVENT(C,FH_TRY_REMOTE_FAIL); } } else { GASNETI_TRACE_EVENT(C,FH_TRY_REMOTE_MISS); } FH_TABLE_UNLOCK; return req; } extern const firehose_request_t * firehose_partial_remote_pin(gex_Rank_t node, uintptr_t addr, size_t len, uint32_t flags, firehose_request_t *ureq) { firehose_request_t *req = NULL; if_pf (node == gasneti_mynode) gasneti_fatalerror("Cannot request a Remote pin on a local node."); addr = FH_ADDR_ALIGN(addr); len = FH_SIZE_ALIGN(addr,len); GASNETI_TRACE_EVENT_VAL(C,FH_PARTIAL_REMOTE_PIN,(len >> FH_BUCKET_SHIFT)); #if FH_POLL_FOR_HANDLES if_pf (!ureq && !fh_request_freehead) FIREHOSE_AMPOLL(); #endif FH_TABLE_LOCK; if (fh_region_partial(node, &addr, &len)) { req = fh_request_new(ureq, 0); if_pt (req != NULL) { req->node = node; req->addr = addr; req->len = len; fh_commit_try_remote_region(req); GASNETI_TRACE_EVENT(C,FH_PARTIAL_REMOTE_HIT); } else { GASNETI_TRACE_EVENT(C,FH_PARTIAL_REMOTE_FAIL); } } else { GASNETI_TRACE_EVENT(C,FH_PARTIAL_REMOTE_MISS); } FH_TABLE_UNLOCK; return req; } extern void firehose_release(firehose_request_t const **reqs, int numreqs) { int i; GASNETI_TRACE_EVENT_VAL(C, FH_RELEASE, numreqs); FH_TABLE_LOCK; for (i = 0; i < numreqs; i++) { gasneti_assert(!(reqs[i]->flags & FH_FLAG_PENDING)); if (reqs[i]->node == gasneti_mynode) fh_release_local_region( (firehose_request_t *) reqs[i]); else fh_release_remote_region( (firehose_request_t *) reqs[i]); if (reqs[i]->flags & FH_FLAG_FHREQ) fh_request_free((firehose_request_t *) reqs[i]); } FH_TABLE_UNLOCK; return; } /* ##################################################################### */ /* COMMON FIREHOSE INTERFACE */ /* ##################################################################### */ /* TODO: allocate from a pool */ fh_completion_callback_t * fh_alloc_completion_callback(void) { fh_completion_callback_t *cc; FH_TABLE_ASSERT_LOCKED; cc = gasneti_malloc(sizeof(fh_completion_callback_t)); cc->flags = FH_CALLBACK_TYPE_COMPLETION; return cc; } void fh_free_completion_callback(fh_completion_callback_t *cc) { /* OK to free w/o the LOCK */ gasneti_free(cc); return; } /* Although clients can pass a pointer to a request_t, the alternative is to * have the firehose library allocate a request_t and return it. For the * latter case, allocation is done using a freelist allocator and the internal * pointer is used to link the request_t. */ static firehose_request_t * fh_request_new(firehose_request_t *ureq, int block) { firehose_request_t *req; FH_TABLE_ASSERT_LOCKED; if_pt (ureq != NULL) { req = ureq; req->flags = 0; req->internal = NULL; return req; } if_pt (fh_request_freehead != NULL) { req = fh_request_freehead; fh_request_freehead = (firehose_request_t *) req->internal; } else if_pf (fh_request_bufidx == FH_REQUEST_ALLOC_MAXIDX) { #if GASNETI_STATS_OR_TRACE gasneti_tick_t ticks = GASNETI_TICKS_NOW_IFENABLED(C); #endif /* If !block we cannot poll even once because calls to * fh_commit_*() could break if we release the lock here. */ if (!block) return NULL; do { FH_TABLE_UNLOCK; FIREHOSE_AMPOLL(); FH_TABLE_LOCK; } while (fh_request_freehead == NULL); req = fh_request_freehead; fh_request_freehead = (firehose_request_t *) req->internal; #if GASNETI_STATS_OR_TRACE ticks = GASNETI_TICKS_NOW_IFENABLED(C) - ticks; GASNETI_TRACE_EVENT_TIME(C, FH_REQUEST_STALL, ticks); #endif } else { firehose_request_t *buf; int i; GASNETI_STAT_EVENT_VAL(C, FH_REQUEST_ALLOC, FH_REQUEST_ALLOC_PERIDX); buf = (firehose_request_t *) gasneti_calloc(FH_REQUEST_ALLOC_PERIDX, sizeof(firehose_request_t)); fh_request_bufs[fh_request_bufidx] = buf; fh_request_bufidx++; for (i = 1; i < FH_REQUEST_ALLOC_PERIDX-1; i++) buf[i].internal = (firehose_private_t *) &buf[i+1]; buf[i].internal = NULL; req = &buf[0]; fh_request_freehead = &buf[1]; } req->flags = FH_FLAG_FHREQ; req->internal = NULL; return req; } static void fh_request_free(firehose_request_t *req) { /* Firehose allocated request, not pending */ gasneti_assert((req->flags & (FH_FLAG_FHREQ | FH_FLAG_PENDING)) == FH_FLAG_FHREQ); /* XXX: could use a distinct lock here */ req->internal = (firehose_private_t *) fh_request_freehead; fh_request_freehead = req; return; } /* region/page must provide implementations of these functions */ /* Data structures * * Table(s) of firehose_private_t * Adding: Entries are added once a private_t is pinned locally or a * mapped to a remote location. * Removing: Local private_t's are removed once memory is unpinned locally. * Remote private_t's are removed when an AM move is required and * that private_t had been selected for replacement. * non-common implementation * */ /* * fh_getenv() * * Read firehose environment variables, default to units given * * Recognizes modifiers [Mm][Kk][Gg] in numbers */ int64_t fh_getenv(const char *var, unsigned long multiplier, int *is_dflt) { const char *env = gasneti_getenv(var); if (is_dflt) *is_dflt = !(env && *env); // unset or empty return gasneti_parse_int(env, multiplier); } /* * Common data structures * * Local Victim FIFO of firehose_private_t (oldest at head, newest at tail) * Pushing: Adjacent entries are usually pushed in reverse-address order. * This allows a subsequent popping operation to optimistically * construct contiguous region_t's (for firehose-page). * Popping: Entries are usually removed so as to create one contiguous * region_t. * * Per-node firehose victim FIFO of firehose_private_t * Pushing: Firehoses which reach a refcount of zero are added to the * per-node firehose victim FIFO for possible replacement or reuse. * Popping: An entry is removed when a node decides that it has used up all * it's firehoses to a remote node and needs replacements. * * XXX/PHH: update to drop 'bucket' terminology here: * * Bucket state transitions * * Each bucket (whether local or remote) can be either pinned or unpinned. * Local buckets have a remote (R) and local (L) refcount whereas remote * buckets only have remote refcounts. * * Remote bucket handling is straightforward -- if R=0, the bucket is in the * remote fifo, and if R>0, it is in use. * * Local bucket handling is complicated by the L refcount and the necessity to * maintain the 'fhc_LocalOnlyBucketsPinned' counter (shown as LOnly below). * ********************************* * LOCAL BUCKET STATE TRANSITIONS ********************************* * Each state transition is triggered by acquire and release. * * R L * .---. * A. |0 0| (UNPINNED) * `---' * | ^ * | | LOnly-- * LOnly++ | | * V | R L * .---. (PINNED) .---. * B. |0 0| (IN FIFO) <-- -- -- -- --> |0 1| C. (PINNED) * `---' `---' * | ^ ^ * | | LOnly++ | * LOnly-- | | | * V | LOnly-- V * .---. <-- -- -- -- -- .---. * E. |1 0| (PINNED) -- -- -- -- --> |1 1| D. (PINNED) * `---' LOnly++ `---' * * All transitions _TO_ state 'B' add the bucket to the FIFO * All transitions _FROM_ state 'B' remove the bucket to the FIFO * ********************************* * REMOTE BUCKET STATE TRANSITIONS ********************************* * State transitions triggers are indicated in the diagram * * C. B. * .---. (PINNED) acquire(),R=1 .---. * |R=0| (IN FIFO) <-- -- -- -- --> |R>0| (PINNED) * `---' release(),R=0 `---' * ^ * | Firehose reply * | * | * .---. (UNPINNED, PENDING PIN) * Firehose request -- -- -- -- --> |R>0| -- --. * first acquire() `---' | * A. ^ | acquire() * |_ __ __ / * * - Some transitions from 'B' are missing, the transition to 'C' only happens * when the reference count reaches zero. * - Subsequent acquires on a bucket pending pin (state 'A') cause firehose * requests to be queued up at the sender. In other words, completions can * be coalesced by a single firehose reply. * *-- * Acquiring a bucket increments the refcount (either R or L) * Release a bucket decrements the refcount (ether R or L) * * These functions return the new reference count for the incremented count. * * The name of the function indicates where the memory resides (local, remote). * In the local case, the 'local_ref' boolean argument indicates where the * request originated and in the remote case the 'node' argument indicates * where the memory resides. */ fh_refc_t * fh_priv_acquire_local(int local_ref, firehose_private_t *entry) { fh_refc_t *rp = FH_BUCKET_REFC(entry); /* * 'local_ref' is TRUE if we are acquiring a local bucket for the * local node (ie: fh_local_pin). * 'local_ref' is FALSE if we are acquireing a local bucket from a * firehose request (fh_am_move). */ gasneti_assert((local_ref == 0) || (local_ref == 1)); FH_TABLE_ASSERT_LOCKED; /* * If the bucket is a local, if can contain both local and remote * reference counts. * */ gasneti_assert(entry != NULL); if (FH_IS_LOCAL_FIFO(entry)) { /* Bucket started in state "B" and is * now entering state (local_ref ? "C" : "E") */ #if PLATFORM_COMPILER_SUN_C gasneti_compiler_fence(); /* Work around bug 1857 */ #endif FH_TAILQ_REMOVE(&fh_LocalFifo, entry); FH_BSTATE_ASSERT(entry, fh_local_fifo); rp->refc_l = local_ref; rp->refc_r = !local_ref; /* We must dec LOnly if entering state "E" */ fhc_LocalOnlyBucketsPinned -= !local_ref; fhc_LocalVictimFifoBuckets--; FH_SET_LOCAL_INUSE(entry); FH_BSTATE_SET(entry, fh_used); FH_TRACE_BUCKET(entry, ACQFIFO); } else { /* Bucket started in state "C", "D" or "E" */ FH_BSTATE_ASSERT(entry, fh_used); if (local_ref) { /* Bucket is entering state "C" or "D". We * must inc LOnly if coming from state "E" */ fhc_LocalOnlyBucketsPinned += (rp->refc_l == 0); rp->refc_l++; FH_TRACE_BUCKET(entry, ACQUIRE); } else { /* Bucket is entering state "D" or "E" */ rp->refc_r++; FH_TRACE_BUCKET(entry, ACQUIRE); } } gasneti_assert(FHC_MAXVICTIM_BUCKETS_AVAIL >= 0); return rp; } fh_refc_t * fh_priv_acquire_remote(gex_Rank_t node, firehose_private_t *entry) { fh_refc_t *rp = FH_BUCKET_REFC(entry); FH_TABLE_ASSERT_LOCKED; gasneti_assert(entry != NULL); /* If the bucket is a remote bucket, the node cannot be equal to * gasneti_mynode */ gasneti_assert(node != gasneti_mynode); if (FH_IS_REMOTE_FIFO(entry)) { FH_BSTATE_ASSERT(entry, fh_remote_fifo); FH_TAILQ_REMOVE(&fh_RemoteNodeFifo[node], entry); fhc_RemoteVictimFifoBuckets[node]--; rp->refc_r = 1; FH_SET_REMOTE_INUSE(entry); FH_BSTATE_SET(entry, fh_used); FH_TRACE_BUCKET(entry, ACQFIFO); } else { gasneti_assert(!FH_IS_REMOTE_PENDING_UNCOMMITTED(entry)); gasneti_assert(rp->refc_r > 0); rp->refc_r++; FH_TRACE_BUCKET(entry, ACQUIRE); } return rp; } fh_refc_t * fh_priv_release_local(int local_ref, firehose_private_t *entry) { fh_refc_t *rp = FH_BUCKET_REFC(entry); /* * 'local_ref' is TRUE if we are releasing a local bucket for the * local node * 'local_ref' is FALSE if we are releasing a local bucket from a * firehose request * */ gasneti_assert((local_ref == 0) || (local_ref == 1)); FH_TABLE_ASSERT_LOCKED; gasneti_assert(entry != NULL); FH_BSTATE_ASSERT(entry, fh_used); gasneti_assert(!FH_IS_LOCAL_FIFO(entry)); if (local_ref) { gasneti_assert(rp->refc_l > 0); } else { gasneti_assert(rp->refc_r > 0); } rp->refc_l -= local_ref; rp->refc_r -= !local_ref; /* As a result, the bucket may be unused */ if (rp->refc_r == 0 && rp->refc_l == 0) { /* Have entered state "B" (FIFO) */ #ifdef FIREHOSE_REGION if (!entry->visible) FH_TAILQ_INSERT_HEAD(&fh_LocalFifo, entry); else #endif FH_TAILQ_INSERT_TAIL(&fh_LocalFifo, entry); /* We must inc LOnly if coming from state "E" */ fhc_LocalOnlyBucketsPinned += !local_ref; fhc_LocalVictimFifoBuckets++; FH_BSTATE_SET(entry, fh_local_fifo); gasneti_assert(FH_IS_LOCAL_FIFO(entry)); FH_TRACE_BUCKET(entry, ADDFIFO); } else { /* We must dec LOnly if entering state "E" from "D" */ fhc_LocalOnlyBucketsPinned -= (rp->refc_l == 0 && local_ref); FH_TRACE_BUCKET(entry, RELEASE); } return rp; } fh_refc_t * fh_priv_release_remote(gex_Rank_t node, firehose_private_t *entry) { fh_refc_t *rp = FH_BUCKET_REFC(entry); FH_TABLE_ASSERT_LOCKED; gasneti_assert(entry != NULL); FH_BSTATE_ASSERT(entry, fh_used); /* The bucket is a remote bucket, and it cannot contain any local * refcounts. Also, it should not be pending as pending buckets are * handled separately */ gasneti_assert(node != gasneti_mynode); gasneti_assert(FH_IS_REMOTE_INUSE(entry)); gasneti_assert(rp->refc_r > 0); rp->refc_r--; if (rp->refc_r == 0) { #ifdef FIREHOSE_REGION if (!entry->visible) FH_TAILQ_INSERT_HEAD(&fh_RemoteNodeFifo[node], entry); else #endif FH_TAILQ_INSERT_TAIL(&fh_RemoteNodeFifo[node], entry); fhc_RemoteVictimFifoBuckets[node]++; FH_BSTATE_SET(entry, fh_remote_fifo); FH_TRACE_BUCKET(entry, ADDFIFO); } else { FH_TRACE_BUCKET(entry, RELEASE); } return rp; } /* * Waiting/Polling for local and remote firehoses * * The WaitLocalFirehoses() and WaitRemoteFirehoses() functions stall on the * appropriate FIFO waiting on the total number of firehoses available for * replacement. The replacement firehoses are placed in the supplied array * or regions, which must be large enough to hold 'count' regions (worst * case is one region per firehose). These functions return the number of * regions in the array, which may be less than the number of requested * firehoses if coalescing was possible. * * WaitLocalFirehoses() has the additional property of enforcing the limit * fhc_LocalOnlyBucketsPinned <= fhc_MaxVictimBuckets. * * TODO: Firehose should implement a deadlock-free and starvation-free polling * mechanism for threaded clients. */ int fh_WaitLocalFirehoses(int count, firehose_region_t *region) { int b_remain, b_avail, r_freed; firehose_region_t *reg = region; FH_TABLE_ASSERT_LOCKED; /* First grab any "free" buckets due to a less-than-full FIFO */ gasneti_assert(FHC_MAXVICTIM_BUCKETS_AVAIL >= 0); b_avail = MIN(count, FHC_MAXVICTIM_BUCKETS_AVAIL); fhc_LocalOnlyBucketsPinned += b_avail; #ifdef DEBUG_LOCAL_TABLE fhc_LocalReserved += b_avail; #endif b_remain = count - b_avail; if (b_remain == 0) return 0; GASNETI_TRACE_PRINTF(C, ("Firehose Polls Local pinned needs to recover" " %d buckets from FIFO (currently %d buckets)", b_remain, fhc_LocalVictimFifoBuckets)); while (b_remain > 0) { b_avail = MIN(b_remain, fhc_LocalVictimFifoBuckets); if (b_avail > 0) { /* Adjusts LocalVictimFifoBuckets count */ r_freed = fhi_FreeVictimLocal(b_avail, reg); fhc_LocalVictimFifoBuckets -= b_avail; b_remain -= b_avail; reg += r_freed; } else { FH_TABLE_UNLOCK; FIREHOSE_AMPOLL(); FH_TABLE_LOCK; /* May have had a D->E state transition */ b_avail = MIN(b_remain, FHC_MAXVICTIM_BUCKETS_AVAIL); fhc_LocalOnlyBucketsPinned += b_avail; b_remain -= b_avail; } #ifdef DEBUG_LOCAL_TABLE fhc_LocalReserved += b_avail; #endif } gasneti_assert(FHC_MAXVICTIM_BUCKETS_AVAIL >= 0); return (int) (reg - region); } int fh_WaitRemoteFirehoses(gex_Rank_t node, int count, firehose_region_t *region) { int b_remain, b_avail, r_freed; firehose_region_t *reg = region; FH_TABLE_ASSERT_LOCKED; b_remain = count; GASNETI_TRACE_PRINTF(C, ("Firehose Polls Remote firehoses requires %d buckets (FIFO=%d)", count, fhc_RemoteVictimFifoBuckets[node])); while (b_remain > 0) { b_avail = MIN(b_remain, fhc_RemoteVictimFifoBuckets[node]); if (b_avail > 0) { r_freed = fhi_FreeVictimRemote(node, b_avail, reg); fhc_RemoteVictimFifoBuckets[node] -= b_avail; b_remain -= b_avail; reg += r_freed; } else { FH_TABLE_UNLOCK; FIREHOSE_AMPOLL(); FH_TABLE_LOCK; } } gasneti_assert(fhc_RemoteVictimFifoBuckets[node] >= 0); gasneti_assert(reg - region > 0); return (int) (reg - region); } /* fh_AdjustLocalFifoAndPin(): Given a vector of regions to pin, this * function makes the call to firehose_move_callback() by also including * a list of regions to unpin if the victim FIFO was overcommitted. * * called when releasing locally (w/ reg_pin == NULL) * * called from the move AM handler */ void fh_AdjustLocalFifoAndPin(gex_Rank_t node, firehose_region_t *reg_pin, size_t pin_num) { int b_unpin; FH_TABLE_ASSERT_LOCKED; /* Check if the local FIFO is overcommitted. If so, we build a list of * regions to unpin from the head of the FIFO (oldest victim).*/ b_unpin = fhc_LocalOnlyBucketsPinned - fhc_MaxVictimBuckets; if (b_unpin > 0) { fhi_RegionPool_t *rpool; GASNETI_TRACE_PRINTF(C, ("Firehose Overcommitted FIFO by %d buckets", b_unpin)); rpool = fhi_AllocRegionPool(b_unpin); rpool->buckets_num = b_unpin; rpool->regions_num = fhi_FreeVictimLocal(b_unpin, rpool->regions); fhc_LocalVictimFifoBuckets -= b_unpin; fhc_LocalOnlyBucketsPinned -= b_unpin; gasneti_assert(FHC_MAXVICTIM_BUCKETS_AVAIL >= 0); FH_TABLE_UNLOCK; firehose_move_callback(node, rpool->regions, rpool->regions_num, reg_pin, pin_num); FH_TABLE_LOCK; fhi_FreeRegionPool(rpool); } else if (pin_num > 0) { FH_TABLE_UNLOCK; firehose_move_callback(node, NULL, 0, reg_pin, pin_num); FH_TABLE_LOCK; } return; } /********************************* * Freelist of fhi_RegionPool_t *********************************/ fhi_RegionPool_t * fhi_AllocRegionPool(int count) { fhi_RegionPool_t *rpool; FH_TABLE_ASSERT_LOCKED; rpool = FH_STAILQ_FIRST(&fhi_regpool_list); if_pf (count > FH_REGIONPOOL_DEFAULT_COUNT || rpool == NULL) { rpool = (fhi_RegionPool_t *) gasneti_malloc(sizeof(fhi_RegionPool_t)); rpool->regions_num = 0; rpool->buckets_num = 0; if (count > FH_REGIONPOOL_DEFAULT_COUNT) { rpool->len = sizeof(firehose_region_t) * count; rpool->regions = (firehose_region_t *) gasneti_malloc(rpool->len); fhi_regpool_numbig++; return rpool; } else { count = FH_REGIONPOOL_DEFAULT_COUNT; rpool->len = FH_REGIONPOOL_DEFAULT_COUNT * sizeof(firehose_region_t); rpool->regions = (firehose_region_t *) gasneti_malloc(rpool->len); fhi_regpool_num++; return rpool; } } else { FH_STAILQ_REMOVE_HEAD(&fhi_regpool_list); return rpool; } } void fhi_FreeRegionPool(fhi_RegionPool_t *rpool) { FH_TABLE_ASSERT_LOCKED; gasneti_assert(rpool != NULL); if_pf (rpool->len > FH_REGIONPOOL_DEFAULT_COUNT*sizeof(firehose_region_t)) { gasneti_free(rpool->regions); gasneti_free(rpool); } else { rpool->regions_num = 0; rpool->buckets_num = 0; FH_STAILQ_INSERT_TAIL(&fhi_regpool_list, rpool); gasneti_assert(!FH_STAILQ_EMPTY(&fhi_regpool_list)); } return; } /********************************* * AM-related functions *********************************/ /* * Firehose AM Request Handler */ void fh_am_move_reqh_inner(gex_Token_t token, void *addr, size_t nbytes, gex_AM_Arg_t flags, gex_AM_Arg_t r_new, gex_AM_Arg_t r_old, void *context) { firehose_region_t *new_reg, *old_reg; int ret = 1; int hit_pending = 0; int remote_callback = 0; gex_Token_Info_t info; gex_Token_Info(token, &info, GEX_TI_SRCRANK); gex_Rank_t node = info.gex_srcrank; new_reg = (firehose_region_t *) addr; old_reg = new_reg + r_new; #ifdef FIREHOSE_UNEXPORT_CALLBACK if (r_old > 0) firehose_unexport_callback(node, old_reg, r_old); #endif ret = fh_move_request(node, new_reg, r_new, old_reg, r_old, context); hit_pending = (ret == -1); remote_callback = (flags & FIREHOSE_FLAG_ENABLE_REMOTE_CALLBACK); #ifdef FIREHOSE_EXPORT_CALLBACK if (r_new > 0) firehose_export_callback(node, new_reg, r_new); #endif /* If ret == -1, we hit a local bucket marked as pending (another * thread has marked it to be pinned but has not updated the table * saying the bucket is now pinned. We handle this by enqueueing the * request in a special "pending queue" */ gasneti_assert(hit_pending == -1 ? FIREHOSE_SMP : (1)); /* If the user requires to run a remote callback, and the * callback is not to be run in place, run it */ #ifdef FIREHOSE_REMOTE_CALLBACK_IN_HANDLER /* Handle this case separately */ if (remote_callback) { firehose_remotecallback_args_t *args = (firehose_remotecallback_args_t *)(old_reg + r_old); gasneti_assert(!hit_pending); firehose_remote_callback(node, (const firehose_region_t *) new_reg, r_new, args); gex_AM_ReplyMedium( token, fh_handleridx(fh_am_move_reph), new_reg, sizeof(firehose_region_t) * r_new, GEX_EVENT_NOW, 0, r_new, PACK(context)); return; } #else if (hit_pending || remote_callback) { fh_remote_callback_t *rc = (fh_remote_callback_t *) gasneti_malloc(sizeof(fh_remote_callback_t)); rc->flags = 0; rc->node = node; rc->pin_list_num = r_new; rc->reply_len = sizeof(firehose_region_t) * r_new; rc->context = context; rc->pin_list = (firehose_region_t *) gasneti_malloc(sizeof(firehose_region_t)*r_new); memcpy(rc->pin_list, new_reg, rc->reply_len); if (remote_callback) { firehose_remotecallback_args_t *args = (firehose_remotecallback_args_t *)(old_reg + r_old); memcpy(&(rc->args), args, sizeof(firehose_remotecallback_args_t)); rc->flags |= FH_CALLBACK_TYPE_REMOTE; } #if defined(FIREHOSE_PAGE) && FIREHOSE_SMP if (hit_pending) { rc->flags |= FH_CALLBACK_TYPE_PENDING; FH_POLLQ_LOCK; FH_TAILQ_INSERT_TAIL(&fhsmp_LocalPendingList, rc); FH_POLLQ_UNLOCK; } else { #endif FH_POLLQ_LOCK; FH_STAILQ_INSERT_TAIL(&fh_CallbackFifo, (fh_callback_t *) rc); FH_POLLQ_UNLOCK; #if defined(FIREHOSE_PAGE) && FIREHOSE_SMP } #endif } #endif /* REMOTE_CALLBACK_IN_HANDLER */ else { gex_AM_ReplyMedium( token, fh_handleridx(fh_am_move_reph), new_reg, sizeof(firehose_region_t) * r_new, GEX_EVENT_NOW, 0, r_new, PACK(context)); } return; } MEDIUM_HANDLER(fh_am_move_reqh,4,5, (token,addr,nbytes, a0, a1, a2, UNPACK (a3 )), (token,addr,nbytes, a0, a1, a2, UNPACK2(a3, a4))); /* * Firehose AM Reply Handler * Process (run or queue) pending completion callbacks which are satisfied * by the reply. */ void fh_am_move_reph_inner(gex_Token_t token, void *addr, size_t nbytes, gex_AM_Arg_t r_new, void *context) { firehose_region_t *regions = (firehose_region_t *) addr; fh_pollq_t pendCallbacks; int numpend; gex_Token_Info_t info; gex_Token_Info(token, &info, GEX_TI_SRCRANK); gex_Rank_t node = info.gex_srcrank; /* * At least one pending request is attached to a bucket, so process them * and dynamically create a list in pendCallbacks */ FH_TABLE_LOCK; numpend = fh_find_pending_callbacks(node, regions, r_new, context, &pendCallbacks); FH_TABLE_UNLOCK; if (numpend > 0) { #ifdef FIREHOSE_COMPLETION_IN_HANDLER fh_completion_callback_t *ccb, *ccb2; int hitlocal; ccb = (fh_completion_callback_t *)FH_STAILQ_FIRST(&pendCallbacks); while (ccb != NULL) { gasneti_assert(ccb != FH_COMPLETION_END); ccb2 = FH_STAILQ_NEXT(ccb); gasneti_assert(!(ccb->request->flags & FH_FLAG_PENDING)); /* If this request was not in flight, the referenced * pages are now pinned and the callback is called as * if we have a hit */ hitlocal = !(ccb->request->flags & FH_FLAG_INFLIGHT); ccb->callback(ccb->context, ccb->request, hitlocal); fh_free_completion_callback(ccb); ccb = ccb2; } #else FH_POLLQ_LOCK; gasneti_assert(!FH_STAILQ_EMPTY(&pendCallbacks)); FH_STAILQ_MERGE(&fh_CallbackFifo, &pendCallbacks); gasneti_assert(!FH_STAILQ_EMPTY(&fh_CallbackFifo)); FH_POLLQ_UNLOCK; #endif } else { gasneti_assert(FH_STAILQ_FIRST(&pendCallbacks) == NULL); } return; } MEDIUM_HANDLER(fh_am_move_reph,2,3, (token,addr,nbytes, a0, UNPACK (a1 )), (token,addr,nbytes, a0, UNPACK2(a1, a2))); void fh_send_firehose_reply(fh_remote_callback_t *rc) { FH_TABLE_ASSERT_UNLOCKED; /* Run the "reply" handler as a request */ gex_AM_RequestMedium( gasneti_THUNK_TM, rc->node, fh_handleridx(fh_am_move_reph), rc->pin_list, rc->reply_len, GEX_EVENT_NOW, 0, rc->pin_list_num, PACK(rc->context)); } gex_AM_Entry_t fh_am_handlers[] = { /* ptr-width dependent handlers */ gasneti_handler_tableentry_with_bits(fh_am_move_reqh,4,5,REQUEST,MEDIUM,0), gasneti_handler_tableentry_with_bits(fh_am_move_reph,2,3,REPLY,MEDIUM,0), GASNETI_HANDLER_EOT }; gex_AM_Entry_t * firehose_get_handlertable(void) { return fh_am_handlers; } gasnet-2025.8.0/other/firehose/firehose.mak.in0000664000175000017500000000401015142313673021245 0ustar alastairalastair# Firehose Makefile fragment # This Makefile fragment is used to build GASNet conduits # it is not meant to be used directly # # To use in a conduit Makefile.am, set fh_type to either "region" or # "page" (no quotes, no whitespace) and then include this fragment. # Example: # fh_type=region # include $(top_builddir)/other/firehose/firehose.mak # # This fragment defines the following variables for use # in the corresponding CONDUIT_* variables. For instance, # one should include $(fh_sourcelist) in CONDUIT_SOURCELIST # # fh_sourcelist - C files to build normally # fh_extralibcflags - CFLAGS needed for firehose headers # fh_extraheaders - firehose header(s) to install from firehose directory # fh_privheaders - firehose header(s) not to install from conduit directory # fh_extradeps - dependencies on firehose .c and .h files # fh_special_objs - firehose .o files with "abonormal" build requirements # # fh_{src,bld}dir are also set, but probably aren't needed outside this fragment fh_srcdir = $(top_srcdir)/other/firehose fh_blddir = $(top_builddir)/other/firehose fh_sourcelist = fh_extraheaders = $(fh_srcdir)/firehose_trace.h fh_privheaders = firehose_fwd.h fh_extralibcflags = -I$(fh_srcdir) fh_extradeps = $(fh_srcdir)/*.[ch] $(fh_blddir)/firehose.mak fh_special_objs = \ $(builddir)/firehose-$(THREAD_MODEL).o \ $(builddir)/firehose_$(fh_type)-$(THREAD_MODEL).o # Some Firehose source files need $(FH_CFLAGS) to disable strict/ANSI aliasing # optimizations. By building them as "special" we can avoid disabling these # useful optimizations for the entire conduit. $(builddir)/firehose-$(THREAD_MODEL).o: force keeptmps='$(KEEPTMPS)'; \ @CC@ $(LIBCFLAGS) @FH_CFLAGS@ -o $@ -c $(fh_srcdir)/firehose.c $(builddir)/firehose_$(fh_type)-$(THREAD_MODEL).o: force keeptmps='$(KEEPTMPS)'; \ @CC@ $(LIBCFLAGS) @FH_CFLAGS@ -o $@ -c $(fh_srcdir)/firehose_$(fh_type).c # How to rebuild this file $(fh_blddir)/firehose.mak: $(fh_srcdir)/firehose.mak.in cd $(@D) && $(MAKE) $(@F) gasnet-2025.8.0/other/firehose/firehose_trace.h0000664000175000017500000000354715142313673021513 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/firehose/firehose_trace.h $ * Description: Internal Header file * Copyright 2004, Christian Bell * Terms of use are as specified in license.txt */ #ifndef GASNETI_FIREHOSE_STATS #define GASNETI_FIREHOSE_STATS(CNT,VAL,TIME) \ VAL(C, FH_LOCAL_PIN, pages requested) \ CNT(C, FH_LOCAL_HIT, cnt) \ CNT(C, FH_LOCAL_MISS, cnt) \ VAL(C, FH_TRY_LOCAL_PIN, pages requested) \ CNT(C, FH_TRY_LOCAL_HIT, cnt) \ CNT(C, FH_TRY_LOCAL_MISS, cnt) \ CNT(C, FH_TRY_LOCAL_FAIL, cnt) \ VAL(C, FH_PARTIAL_LOCAL_PIN, pages requested) \ CNT(C, FH_PARTIAL_LOCAL_HIT, cnt) \ CNT(C, FH_PARTIAL_LOCAL_MISS, cnt) \ CNT(C, FH_PARTIAL_LOCAL_FAIL, cnt) \ VAL(C, FH_REMOTE_PIN, pages requested) \ CNT(C, FH_REMOTE_HIT, cnt) \ CNT(C, FH_REMOTE_PENDING, cnt) \ CNT(C, FH_REMOTE_MISS, cnt) \ VAL(C, FH_TRY_REMOTE_PIN, pages requested) \ CNT(C, FH_TRY_REMOTE_HIT, cnt) \ CNT(C, FH_TRY_REMOTE_MISS, cnt) \ CNT(C, FH_TRY_REMOTE_FAIL, cnt) \ VAL(C, FH_PARTIAL_REMOTE_PIN, pages requested) \ CNT(C, FH_PARTIAL_REMOTE_HIT, cnt) \ CNT(C, FH_PARTIAL_REMOTE_MISS, cnt) \ CNT(C, FH_PARTIAL_REMOTE_FAIL, cnt) \ VAL(C, FH_RELEASE, firehoses) \ TIME(C, FH_REQUEST_STALL, stalled time) \ VAL(C, FH_REQUEST_ALLOC, requests allocated) #endif gasnet-2025.8.0/other/firehose/firehose_page.c0000664000175000017500000025132615142313673021324 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/firehose/firehose_page.c $ * Description: * Copyright 2004, Christian Bell * Terms of use are as specified in license.txt */ #include #include #include #ifdef FIREHOSE_PAGE #include /* For possible inlining */ typedef firehose_private_t fh_bucket_t; /* * There is currently no support for bind callbacks in firehose-page * as no client_t is currently envisioned in known -page clients. */ #if defined(FIREHOSE_BIND_CALLBACK) || defined(FIREHOSE_UNBIND_CALLBACK) #error firehose-page currently has no support for bind/unbind callbacks #endif /* * For b_num buckets to be pinned and a function that uses coalescing to * create regions to be pinned, a worst case number of buckets is * calculated as follows: * * For each region (contiguous buckets), a worst case of (buckets+1)/2 new * region_t's are required to hold unpinned buckets. * * For example, new_r = { regA, regB } and new_num = 2. * * regA = 5 buckets, 3 unpinned of the form 10101 * regB = 3 buckets, 2 unpinned of the form 101 * * yields a calulation of (5+1)/2 + (3+1)/2 = 3 + 2 = 5 * * Another example, new_r = { regA, regB, regC } and new_num = 3. * * regA = 1 unpinned bucket * regB = 1 unpinned bucket * regC = 1 unpinned bucket * * yields a calculation of 3 * (1+1)/2 = 3 * 1 = 3 * */ #define FH_MIN_REGIONS_FOR_BUCKETS(buckets) (((buckets)+1)>>1) #define FH_MAX_BUCKETS_FOR_REGIONS(regions) (((regions)<<1)-1) /* ##################################################################### */ /* PAGE-SPECIFIC FUNCTIONS */ /* ##################################################################### */ /* * Local region handling * * Local regions can either be acquired by a local pin request or from an * AM handler as part of a remote firehose pin request. All three of the * functions below are called from both AM handler context and local pin * request: * * 1. AcquireLocalRegionsList(): Given a list of input regions to pin, an * unpinned list of regions is returned by way of a RegionPool. * * called by fh_acquire_local_region() * * called by fh_am_move_reqh() * * 2. ReleaseLocalRegionsList(): Given a list of input regions to unpin, * buckets reaching a refcount of zero are appended to (and possibly * overcommit) the local victim FIFO. * * called by fh_release_local_region() * * called by fh_am_move_reqh() */ int fhi_AcquireLocalRegionsList(int local_ref, firehose_region_t *region, size_t reg_num, fhi_RegionPool_t *rpool); void fhi_ReleaseLocalRegionsList(int local_ref, firehose_region_t *reg, size_t reg_num); void fh_dump_counters(void); /* ##################################################################### */ /* BUFFERS AND QUEUES */ /* ##################################################################### */ /* * GLOBAL SCRATCH BUFFERS * * The following two scratch buffers are used as temporary arrays to store * both bucket addresses and firehose bucket entry pointers (they are * allocated at startup). * * fh_temp_buckets[] is used to store bucket addresses between the * TryAcquireRemoteRegion() and CoalesceBuckets() phases of a remote pin * request. * * fh_temp_bucket_ptrs[] is used exclusively by FlushPendingRequests() as * part of a two phase operation in first marking pending buckets as * non-pending and then processing requests that were attached to these * pending buckets. */ static int fh_max_regions = 0; static uintptr_t * fh_temp_buckets = NULL; static fh_bucket_t ** fh_temp_bucket_ptrs = NULL; static void fh_dump_fhparams(void); /* * The bucket table */ fh_hash_t *fh_BucketTable; /* * Some data structures for firehose-region smp * * da[] Array of deadlock avoidance integers (one per node) */ #if FIREHOSE_SMP #define FH_DACOUNT_MAX 30 int *fh_da; int fh_local_da = 0; int fh_localpending = 0; /* XXX debug */ int fh_dacount = 0; fh_locpendq_t fhsmp_LocalPendingList = FH_TAILQ_HEAD_INITIALIZER(fhsmp_LocalPendingList); static gasneti_cond_t fh_local_da_cv = GASNETI_COND_INITIALIZER; #define FH_UPYL \ do { \ FH_TABLE_UNLOCK; \ FIREHOSE_AMPOLL(); \ gasneti_sched_yield(); /* Should this be GASNET_WAITHOOK? */ \ FH_TABLE_LOCK; \ } while (0) #define FH_UPYUL \ do { \ FH_TABLE_UNLOCK; \ FIREHOSE_AMPOLL(); \ gasneti_sched_yield(); /* Should this be GASNET_WAITHOOK? */ \ FIREHOSE_AMPOLL(); \ FH_TABLE_LOCK; \ } while (0) #endif /* FIREHOSE_SMP */ #define FHI_AVAIL(node) ( \ (fhc_RemoteBucketsM - fhc_RemoteBucketsUsed[node]) /* Free energy */ \ + fhc_RemoteVictimFifoBuckets[node] /* FIFO */ \ ) /* ##################################################################### */ /* UTILITY FUNCTIONS FOR REGIONS AND BUCKETS */ /* ##################################################################### */ static fh_bucket_t *fh_buckets_bufs[FH_BUCKETS_BUFS] = { 0 }; static fh_bucket_t *fh_buckets_freehead = NULL; static int fh_buckets_bufidx = 0; static int fh_buckets_per_alloc = 0; static void fh_bucket_init_freelist(int max_buckets_pinned) { FH_TABLE_ASSERT_LOCKED; /* XXX this should probably be further aligned. . */ fh_buckets_per_alloc = (int) MAX( ((max_buckets_pinned + (FH_BUCKETS_BUFS-1)) / FH_BUCKETS_BUFS), (1024)); fh_buckets_freehead = NULL; return; } GASNETI_INLINE(fh_bucket_lookup) fh_bucket_t * fh_bucket_lookup(gex_Rank_t node, uintptr_t bucket_addr) { FH_TABLE_ASSERT_LOCKED; FH_ASSERT_BUCKET_ADDR(bucket_addr); return (fh_bucket_t *) fh_hash_find(fh_BucketTable, FH_KEYMAKE(bucket_addr, node)); } static fh_bucket_t * fh_bucket_add(gex_Rank_t node, uintptr_t bucket_addr) { fh_bucket_t *entry; FH_TABLE_ASSERT_LOCKED; FH_ASSERT_BUCKET_ADDR(bucket_addr); /* allocate a new bucket for the table */ if (fh_buckets_freehead != NULL) { entry = fh_buckets_freehead; fh_buckets_freehead = entry->fh_next; } else { fh_bucket_t *buf; int i; if (fh_buckets_bufidx == FH_BUCKETS_BUFS) gasneti_fatalerror("Firehose: Ran out of " "hash entries (limit=%d)", FH_BUCKETS_BUFS*fh_buckets_per_alloc); buf = (fh_bucket_t *) gasneti_calloc(fh_buckets_per_alloc, sizeof(fh_bucket_t)); fh_buckets_bufs[fh_buckets_bufidx] = buf; fh_buckets_bufidx++; for (i = 1; i < fh_buckets_per_alloc-1; i++) buf[i].fh_next = &buf[i+1]; buf[i].fh_next = NULL; entry = &buf[0]; entry->fh_next = NULL; fh_buckets_freehead = &buf[1]; } entry->fh_key = FH_KEYMAKE(bucket_addr, node); fh_hash_insert(fh_BucketTable, entry->fh_key, entry); gasneti_assert(entry == (fh_bucket_t *)fh_hash_find(fh_BucketTable, entry->fh_key)); return entry; } static void fh_bucket_remove(fh_bucket_t *bucket) { void *entry; FH_TABLE_ASSERT_LOCKED; entry = fh_hash_insert(fh_BucketTable, bucket->fh_key, NULL); gasneti_assert(entry == (void *)bucket); memset(bucket, 0, sizeof(fh_bucket_t)); bucket->fh_next = fh_buckets_freehead; fh_buckets_freehead = bucket; } /* * Add a bucket addr to a pool of regions, and attempt to coalesce it in the * process */ GASNETI_INLINE(fh_bucket_AddtoPool) void fh_bucket_AddtoPool(fhi_RegionPool_t *rpool, uintptr_t bucket_addr) { int last_r = rpool->regions_num - 1; FH_TABLE_ASSERT_LOCKED; /* First region/bucket */ if_pf (last_r < 0) { rpool->regions[0].addr = bucket_addr; rpool->regions[0].len = FH_BUCKET_SIZE; rpool->regions_num = 1; gasneti_assert(rpool->buckets_num == 0); } else if ((rpool->regions[last_r].addr + rpool->regions[last_r].len) == bucket_addr) { /* Current bucket_addr is contiguous to the last one */ rpool->regions[last_r].len += FH_BUCKET_SIZE; } else { /* Current bucket_addr is *not* contiguous to the last one */ last_r++; rpool->regions[last_r].addr = bucket_addr; rpool->regions[last_r].len = FH_BUCKET_SIZE; rpool->regions_num++; } /* Always increment bucket count */ rpool->buckets_num++; } /* * Remove the last bucket from the pool and return its address */ uintptr_t fh_bucket_PopfromPool(fhi_RegionPool_t *rpool) { firehose_region_t *last_reg; uintptr_t last_addr = 0; last_reg = &rpool->regions[rpool->regions_num]; /* Last region has one bucket, and it is the last */ if (last_reg->len == FH_BUCKET_SIZE) { last_addr = last_reg->addr; last_reg->addr = 0; last_reg->len = 0; rpool->buckets_num--; if (rpool->regions_num > 0) rpool->regions_num--; } /* Last region is multi-bucket */ else { last_reg->len -= FH_BUCKET_SIZE; rpool->buckets_num--; last_addr = last_reg->addr + last_reg->len - FH_BUCKET_SIZE; } return last_addr; } /* fh_region_ispinned(node, addr, len) * * Returns non-null if the entire region is already pinned * * Uses fh_bucket_lookup() to query if the current page is pinned. */ int fh_region_ispinned(gex_Rank_t node, uintptr_t addr, size_t len) { uintptr_t bucket_addr; uintptr_t end_addr = addr + len - 1; fh_bucket_t *bd; int is_local = (node == gasneti_mynode); FH_TABLE_ASSERT_LOCKED; FH_FOREACH_BUCKET(addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); /* * Upon lookup, the bucket can either not be present in the * hash table in which case it is certainly unpinned, or it * can be in the table but be pending. If the bucket is * pending a firehose move, the region cannot be declared as * pinned. */ if (bd == NULL || (!is_local && FH_IS_REMOTE_PENDING(bd))) return 0; } return 1; } /* fh_commit_try_local_region(req) * * Applies the result of a successful 'try'. So the assumption holds that * the buckets in 'req' are already pinned. */ void fh_commit_try_local_region(firehose_request_t *req) { uintptr_t end_addr, bucket_addr; fh_bucket_t *bd; FH_TABLE_ASSERT_LOCKED; gasneti_assert(req->node == gasneti_mynode); /* Make sure the size of the region respects the local limits */ gasneti_assert( FH_NUM_BUCKETS(req->addr, req->len) <= fhc_MaxVictimBuckets); end_addr = req->addr + req->len - 1; FH_FOREACH_BUCKET(req->addr, end_addr, bucket_addr) { gasneti_assert(bucket_addr > 0); bd = fh_bucket_lookup(gasneti_mynode, bucket_addr); gasneti_assert(bd != NULL); fh_priv_acquire_local(1, bd); } return; } void fh_commit_try_remote_region(firehose_request_t *req) { uintptr_t bucket_addr, end_addr = req->addr + req->len - 1; fh_bucket_t *bd; gex_Rank_t node = req->node; FH_TABLE_ASSERT_LOCKED; /* Make sure the size of the region respects the remote limits */ gasneti_assert(FH_NUM_BUCKETS(req->addr, req->len) <= fhc_MaxRemoteBuckets); FH_FOREACH_BUCKET(req->addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); fh_priv_acquire_remote(node, bd); } return; } /* fh_release_local_region(request) * * DECrements/unpins pages covered in * [request->addr, request->addr+request->len]. */ void fh_release_local_region(firehose_request_t *request) { firehose_region_t reg; int b_total; FH_TABLE_ASSERT_LOCKED; b_total = FH_NUM_BUCKETS(request->addr, request->len); FH_COPY_REQUEST_TO_REGION(®, request); fhi_ReleaseLocalRegionsList(1, ®, 1); fh_AdjustLocalFifoAndPin(gasneti_mynode, NULL, 0); return; } /* * fh_FreeVictim(count, region_array, head) * * This function removes 'count' buckets from the victim FIFO (local or * remote), and fills the region_array with regions suitable for * move_callback. * It returns the amount of regions (not buckets) created in the * region_array. * * NOTE: it is up to the caller to make sure the region array can fit at most * 'buckets_topin' regions (ie: uncontiguous in the victim FIFO). * */ int fh_FreeVictim(int buckets, firehose_region_t *reg, fh_fifoq_t *fifo_head) { int i, j; fh_bucket_t *bd; uintptr_t next_addr = 0; FH_TABLE_ASSERT_LOCKED; /* There must be enough buckets in the victim FIFO to unpin. This * criteria should always hold true per the constraints on * fhc_LocalOnlyBucketsPinned. */ for (i = 0, j = -1; i < buckets; i++) { bd = FH_TAILQ_FIRST(fifo_head); if (i > 0 && FH_BADDR(bd) == next_addr) reg[j].len += FH_BUCKET_SIZE; else { ++j; reg[j].addr = FH_BADDR(bd); reg[j].len = FH_BUCKET_SIZE; } FH_TRACE_BUCKET(bd, REMFIFO); /* Remove the bucket descriptor from the FIFO and hash */ FH_TAILQ_REMOVE(fifo_head, bd); fh_bucket_remove(bd); /* Next contiguous bucket address */ next_addr = FH_BADDR(bd) + FH_BUCKET_SIZE; } gasneti_assert(buckets == j+1); return j+1; } static uintptr_t fh_M = (uintptr_t) 0; static uintptr_t fh_Maxvictim = (uintptr_t) 0; static uintptr_t fh_MaxPinnableMemory = (uintptr_t) 0; /* * Given an amount of max_pinnable_memory, return what the largest 'M' * parameter can be. */ #define FH_PRINTMB(d) ((int)((d)/(1024*1024))) void firehose_get_params(uintptr_t max_pinnable_memory, uintptr_t *M, uintptr_t *Maxvictim) { uintptr_t nM, nMaxvictim; int dfltM, dfltMaxvictim; if (fh_MaxPinnableMemory == max_pinnable_memory && fh_M && fh_Maxvictim) { *M = fh_M; *Maxvictim = fh_Maxvictim; return; } fh_MaxPinnableMemory = max_pinnable_memory; nM = fh_getenv("GASNET_FIREHOSE_M", (1<<20), &dfltM); nMaxvictim = fh_getenv("GASNET_FIREHOSE_MAXVICTIM_M", (1<<20), &dfltMaxvictim); /* First assign values based on either what the user passed or what * is determined to be the best M and maxvictim parameters based on * max_pinnable_memory and FH_MAXVICTIM_TO_PHYSMEM_RATIO */ if (nM == 0 && nMaxvictim == 0) { nM = max_pinnable_memory * (1-FH_MAXVICTIM_TO_PHYSMEM_RATIO); nMaxvictim = max_pinnable_memory * FH_MAXVICTIM_TO_PHYSMEM_RATIO; } else if (nM == 0) { if_pf (nMaxvictim > max_pinnable_memory) gasneti_fatalerror("GASNET_FIREHOSE_MAXVICTIM_M (%d Mb) is larger " "than the amount of determined pinnable memory (%d Mb)\n", FH_PRINTMB(nMaxvictim), FH_PRINTMB(max_pinnable_memory)); nM = max_pinnable_memory - nMaxvictim; } else if (nMaxvictim == 0) { if_pf (nM > max_pinnable_memory) gasneti_fatalerror("GASNET_FIREHOSE_MAXVICTIM_M (%d Mb) is larger " "than the amount of determined pinnable memory (%d Mb)\n", FH_PRINTMB(nM), FH_PRINTMB(max_pinnable_memory)); nMaxvictim = max_pinnable_memory - nM; } gasneti_envint_display("GASNET_FIREHOSE_M", nM, dfltM, 1); gasneti_envint_display("GASNET_FIREHOSE_MAXVICTIM_M", nMaxvictim, dfltMaxvictim, 1); /* * Validate firehose parameters parameters */ { uintptr_t M_min = FH_BUCKET_SIZE * gasneti_nodes * 32; uintptr_t maxvictim_min = FH_BUCKET_SIZE * 4096; if_pf (nM < M_min) gasneti_fatalerror("GASNET_FIREHOSE_M is less" "than the minimum %"PRIuPTR" (%"PRIuPTR" buckets)", M_min, (M_min >> FH_BUCKET_SHIFT)); if_pf (nMaxvictim < maxvictim_min) gasneti_fatalerror("GASNET_MAXVICTIM_M is less than the " "minimum %"PRIuPTR" (%"PRIuPTR" buckets)", maxvictim_min, (maxvictim_min >> FH_BUCKET_SHIFT)); } fh_M = *M = nM; fh_Maxvictim = *Maxvictim = nMaxvictim; return; } /* fh_init_plugin() * * This function is only called from firehose_init and allows -page OR * -region to run plugin specific code. */ void fh_init_plugin(uintptr_t max_pinnable_memory, size_t max_regions, size_t max_region_size, const firehose_region_t *regions, size_t num_prepinned, firehose_info_t *fhinfo) { int i; uintptr_t M, maxvictim, firehoses, m_prepinned = 0; size_t b_prepinned = 0; if (fhi_InitFlags & FIREHOSE_INIT_FLAG_LOCAL_ONLY) { gasneti_console0_message("WARNING","firehose_page does not yet implement FIREHOSE_INIT_FLAG_LOCAL_ONLY (resource allocation may not be as desired)."); } if (fhi_InitFlags & FIREHOSE_INIT_FLAG_UNPIN_ON_FINI) { gasneti_console0_message("WARNING","firehose_page does not yet implement FIREHOSE_INIT_FLAG_UNPIN_ON_FINI (resources may not be released on exit as desired)."); } /* Initialize the Bucket table to 128k lists */ fh_BucketTable = fh_hash_create((1<<17)); /* * In -page, we ignore regions. . there should not be a limit on the * number of regions */ if (max_regions != 0) gasneti_fatalerror("firehose-page does not support a " "limitation on the number of regions"); if (max_region_size != 0) gasneti_fatalerror("firehose-page does not support a " "limitation on region size"); /* * Prepin optimization: PHASE 1. * * Count the number of buckets that are set as prepinned. * */ if (num_prepinned > 0) { int i; for (i = 0; i < num_prepinned; i++) { gasneti_assert(regions[i].addr % FH_BUCKET_SIZE == 0); gasneti_assert(regions[i].len % FH_BUCKET_SIZE == 0); b_prepinned += FH_NUM_BUCKETS(regions[i].addr,regions[i].len); } } m_prepinned = FH_BUCKET_SIZE * b_prepinned; firehose_get_params(max_pinnable_memory, (uintptr_t *)&M, (uintptr_t *)&maxvictim); if_pf (M < m_prepinned) gasneti_fatalerror("Too much memory prepinned (%"PRIuPTR") for current " "GASNET_FIREHOSE_M parameter (%"PRIuPTR")", m_prepinned, M); fh_MaxPinnableMemory = max_pinnable_memory; if (fh_verbose) fh_dump_fhparams(); GASNETI_TRACE_PRINTF(C, ("Firehose M=(%d MB,%"PRIuPTR"), MAXVICTIM_M=(%d MB,%"PRIuPTR")", FH_PRINTMB(M), M, FH_PRINTMB(maxvictim), maxvictim)); /* * Set local parameters */ fhc_LocalOnlyBucketsPinned = b_prepinned; fhc_LocalVictimFifoBuckets = 0; fhc_MaxVictimBuckets = (maxvictim + m_prepinned) >> FH_BUCKET_SHIFT; /* * Set remote parameters */ firehoses = (M - m_prepinned) >> FH_BUCKET_SHIFT; fhc_RemoteBucketsM = gasneti_nodes > 1 ? firehoses / (gasneti_nodes-1) : firehoses; /* Initialize bucket freelist with the total amount of buckets * to be pinned (including the ones the client passed) */ fh_bucket_init_freelist(firehoses + fhc_MaxVictimBuckets); /* * Prepin optimization: PHASE 2. * * In this phase, the firehose parameters have been validated and the * buckets are added to the firehose table and sent to the FIFO * */ if (num_prepinned > 0) { uintptr_t bucket_addr, end_addr; fh_bucket_t *bd; for (i = 0; i < num_prepinned; i++) { end_addr = regions[i].addr + regions[i].len - 1; if (!regions[i].len) continue; FH_FOREACH_BUCKET(regions[i].addr, end_addr, bucket_addr) { bd = fh_bucket_add(gasneti_mynode, bucket_addr); FH_BSTATE_SET(bd, fh_used); FH_SET_LOCAL_INUSE(bd); FH_BUCKET_REFC(bd)->refc_l = 1; FH_BUCKET_REFC(bd)->refc_r = 0; #ifdef DEBUG_BUCKETS bd->prepinned = 1; #endif /* * Eventually, we may want to have an option where the client * passes a list of regions to prepin, but allow that these * pinned pages be unpinned as replacements later */ #if 0 if (gasneti_getenv_withdefault("GASNET_FIREHOSE_REUSE_PREPINNED",0) fh_priv_release_local(1, bd); #endif } } GASNETI_TRACE_PRINTF(C, ("Firehose Prepinned (%p,%d) total=%d bytes", (void *) regions[0].addr, (int) regions[0].len, (int) b_prepinned)); } /* * Set fields in the firehose information type, according to the * limits established by the firehose parameters. */ { unsigned med_regions, med_buckets; med_regions = (MIN(gex_AM_LUBRequestMedium(), gex_AM_LUBReplyMedium()) - sizeof(firehose_remotecallback_args_t)) / sizeof(firehose_region_t); /* * For med_regions possible regions in the AMMedium, the * worse case is drawn up as the following, a 1-for-1 * replacement of old and new regions, which leaves a worse * case of med_regions/2. * */ med_buckets = FH_MAX_BUCKETS_FOR_REGIONS(med_regions); fhc_MaxRemoteBuckets = MIN(med_buckets/2, fhc_RemoteBucketsM); fhinfo->max_RemoteRegions = 0; fhinfo->max_LocalRegions= 0; fhinfo->max_LocalPinSize = fhc_MaxVictimBuckets * FH_BUCKET_SIZE; fhinfo->max_RemotePinSize = fhc_MaxRemoteBuckets * FH_BUCKET_SIZE; fh_max_regions = MAX( FH_MIN_REGIONS_FOR_BUCKETS(fhc_MaxVictimBuckets), FH_MIN_REGIONS_FOR_BUCKETS(fhc_MaxRemoteBuckets) ); GASNETI_TRACE_PRINTF(C, ("Firehose M=%"PRIuPTR" (fh=%"PRIuPTR"),maxregions=%d,prepinned=%"PRIuPTR" (buckets=%d)", M, firehoses, fh_max_regions, m_prepinned, (int) b_prepinned)); GASNETI_TRACE_PRINTF(C, ("Firehose Maxvictim=%"PRIuPTR" (fh=%d)", maxvictim, fhc_MaxVictimBuckets)); GASNETI_TRACE_PRINTF(C, ("MaxLocalPinSize=%d\tMaxRemotePinSize=%d", (int) fhinfo->max_LocalPinSize, (int) fhinfo->max_RemotePinSize)); } /* * Allocate temporary buffers (temp_buckets and temp_bucket_ptrs) for * use in managing remote pinned regions. * */ fh_temp_buckets = (uintptr_t *) gasneti_malloc(sizeof(uintptr_t) * fh_max_regions); fh_temp_bucket_ptrs = (fh_bucket_t **) gasneti_malloc(sizeof(fh_bucket_t *) * fh_max_regions); #if FIREHOSE_SMP fh_da = (int *) gasneti_calloc(gasneti_nodes,sizeof(int)); #endif return; } #ifdef DEBUG_BUCKETS static void fh_priv_check_fn(void *val, void *arg) { fh_bucket_t *bd = val; int live = (FH_NODE(bd) == gasneti_mynode) ? (!FH_IS_LOCAL_FIFO(bd) && FH_BUCKET_REFC(bd)->refc_l) : (!FH_IS_REMOTE_FIFO(bd) && FH_BUCKET_REFC(bd)->refc_r); if_pf (live && !bd->prepinned) { /* XXX: promote to fatalerror? */ gasneti_console_message("WARNING","firehose leak detected - %d:%p\n", (int)FH_NODE(bd), (void*)FH_BADDR(bd)); } } #endif void fh_fini_plugin(void) { int i; FH_TABLE_ASSERT_LOCKED; #ifdef DEBUG_BUCKETS if (fh_verbose) { fh_hash_apply(fh_BucketTable, &fh_priv_check_fn, NULL); } #endif /* Deallocate the arrays of bucket buffers used, if applicable */ for (i = 0; i < FH_BUCKETS_BUFS; i++) { if (fh_buckets_bufs[i] == NULL) break; gasneti_free(fh_buckets_bufs[i]); } fh_hash_destroy(fh_BucketTable); gasneti_free(fh_temp_buckets); gasneti_free(fh_temp_bucket_ptrs); return; } /* fh_region_partial(node, addr_p, len_p) * * Search for first range of pinned pages in the given range * and if succesful, overwrite the region with the pinned range. * * Returns non-zero if any pinned pages were found. */ int fh_region_partial(gex_Rank_t node, uintptr_t *addr_p, size_t *len_p) { uintptr_t tmp_addr = 0; uintptr_t addr, end_addr, bucket_addr; size_t len; fh_bucket_t *bd; int is_local = (node == gasneti_mynode); addr = *addr_p; len = *len_p; end_addr = addr + len - 1; FH_TABLE_ASSERT_LOCKED; FH_FOREACH_BUCKET(addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); if ((bd != NULL) && (is_local || !FH_IS_REMOTE_PENDING(bd))) { /* found first pinned page */ tmp_addr = bucket_addr; break; } } addr = tmp_addr; if_pf (tmp_addr == 0) { /* No pinned pages found in the requested region */ return 0; } /* Search remainder of the interval, limiting the resulting length */ len = (end_addr - tmp_addr) + 1; /* bytes remaining */ if (is_local) { len = MIN(len, fhc_MaxVictimBuckets << FH_BUCKET_SHIFT); } else { len = MIN(len, fhc_MaxRemoteBuckets << FH_BUCKET_SHIFT); } end_addr = tmp_addr + (len - 1); tmp_addr += FH_BUCKET_SIZE; /* first page known pinned */ if_pt (tmp_addr != 0) { /* guards against wrap around */ FH_FOREACH_BUCKET(tmp_addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); if ((bd == NULL) || (!is_local && FH_IS_REMOTE_PENDING(bd))) { /* found an unpinned page */ len = bucket_addr - addr; break; } } } *addr_p = addr; *len_p = len; return 1; } /* ##################################################################### */ /* PAGE-SPECIFIC INTERNAL FUNCTIONS */ /* ##################################################################### */ /* fhi_AcquireLocalRegionsList * * This function is used as a utility function for 'acquiring' new buckets, * and is used both for client-initiated local pinning and local pinning * from AM handlers. The function differentiates these two with the * 'local_ref' parameter. * * It's main purpose is to filter out the buckets that are already pinned * from the input list of regions. This means incrementing the refcount * for buckets already pinned and returning only a region of buckets that * are currently _not_ pinned. This function does not call the * client-supplied move_callback. * * The function returns the amount of buckets (not regions) contained in * the buildregion type (the amount of regions can be queried from the * type). * * The rpool is updated to reflect the number of buckets and regions that * were written. */ int fhi_AcquireLocalRegionsList(int local_ref, firehose_region_t *region, size_t reg_num, fhi_RegionPool_t *rpool) { int i, saw_pending = 0; uintptr_t bucket_addr, end_addr; fh_bucket_t *bd; rpool->regions_num = 0; rpool->buckets_num = 0; for (i = 0; i < reg_num; i++) { end_addr = region[i].addr + region[i].len - 1; FH_FOREACH_BUCKET(region[i].addr, end_addr, bucket_addr) { gasneti_assert(bucket_addr > 0); bd = fh_bucket_lookup(gasneti_mynode, bucket_addr); if (bd == NULL) { /* Bucket is not pinned, add to the pool to be pinnned */ bd = fh_bucket_add(gasneti_mynode, bucket_addr); FH_SET_LOCAL_PENDING(bd); FH_BSTATE_SET(bd, fh_pending); FH_TRACE_BUCKET(bd, PENDING); fh_bucket_AddtoPool(rpool, bucket_addr); } else if (!FH_IS_LOCAL_PENDING(bd)) { /* * The bucket is already pinned, increment refc */ fh_priv_acquire_local(local_ref, bd); FH_BSTATE_ASSERT(bd, fh_used); } else { /* The bucket is pending. * Only AM handler-initiated pins can see pending * buckets */ gasneti_assert(!local_ref); FH_BUCKET_REFC(bd)->refc_r += 1; saw_pending = 1; } } } if (saw_pending) { gasneti_assert(!local_ref); return -1; } else { return rpool->buckets_num; } } /* * fhi_ReleaseLocalRegionsList * * This function releases a list of regions and builds a new list of * regions to be unpinned by way of the client-supplied move_callback(). * * By releasing buckets and adding them to the FIFO, it is possible that * the FIFO become overcommitted. Overcommitting to the FIFO is permitted * as we are looping over the regions as long as a check is subsequently * made. * * We process each region in the reverse order in order to ease coalescing * when popping victims from the victim FIFO. * */ void fhi_ReleaseLocalRegionsList(int local_ref, firehose_region_t *reg, size_t reg_num) { int i; uintptr_t bucket_addr, end_addr; fh_bucket_t *bd; FH_TABLE_ASSERT_LOCKED; for (i = 0; i < reg_num; i++) { end_addr = reg[i].addr + reg[i].len - 1; GASNETI_TRACE_PRINTF(C, ("Firehose ReleaseLocalRegions ("GASNETI_LADDRFMT", %d)", GASNETI_LADDRSTR(reg[i].addr), (int)reg[i].len)); FH_FOREACH_BUCKET_REV(reg[i].addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(gasneti_mynode, bucket_addr); gasneti_assert(bd != NULL); fh_priv_release_local(local_ref, bd); } } return; } /* ##################################################################### */ /* LOCAL PINNING */ /* ##################################################################### */ /* fhi_InitLocalRegionsList(local_ref, region, reg_num) * * This function adds all the buckets contained in the list of regions to the * hash table and initializes either the local or remote refcount to 1. * * It is used in fh_acquire_local_region() and fh_am_move_reqh_inner(). * */ void fhi_InitLocalRegionsList(int local_ref, firehose_region_t *region, int numreg) { uintptr_t end_addr, bucket_addr; fh_bucket_t *bd; int i; unsigned int loc, rem; gasneti_assert((local_ref == 0) || (local_ref == 1)); loc = local_ref; rem = !local_ref; FH_TABLE_ASSERT_LOCKED; /* Once pinned, We can walk over the regions to be pinned and * set the reference count to 1. */ for (i = 0; i < numreg; i++) { end_addr = region[i].addr + region[i].len - 1; gasneti_assert(region[i].addr > 0); FH_FOREACH_BUCKET(region[i].addr,end_addr,bucket_addr) { /* * Normally, the bucket will not already exist in the * table. However, in some threaded configurations * it is possible for another thread to add the * bucket (and pin the associated memory) while this * current thread unlocked the table lock. */ #if GASNET_PAR || GASNETI_CONDUIT_THREADS bd = fh_bucket_lookup(gasneti_mynode, bucket_addr); if_pf (bd != NULL) { FH_BSTATE_ASSERT(bd, fh_pending); FH_SET_LOCAL_INUSE(bd); FH_BSTATE_SET(bd, fh_used); FH_BUCKET_REFC(bd)->refc_l += loc; FH_BUCKET_REFC(bd)->refc_r += rem; FH_TRACE_BUCKET(bd, INIT++); } else #endif { bd = fh_bucket_add(gasneti_mynode, bucket_addr); FH_SET_LOCAL_INUSE(bd); FH_BSTATE_SET(bd, fh_used); FH_BUCKET_REFC(bd)->refc_l = loc; FH_BUCKET_REFC(bd)->refc_r = rem; FH_TRACE_BUCKET(bd, INIT); } } } return; } /* * This function is called by the Firehose reply once a firehose request to * pin functions covered into a region completes. * * The function walks over each bucket in the region and identifies the * buckets that were marked as 'pending'. These 'pending buckets' may or * may not have requests associated to them. In the former case, requests * pending a callback are identified and may be added to a list of * callbacks to be run (algorithm documented below). * * The function returns the amount of callbacks that were added to the list * of pending requests pointing to the 'reqpend' parameter. * */ /* * Phase 2. For each bucket containing a completion callback, either * move the callback to the next unpinned bucket or actually * run the callback handler if all buckets as part of that * request are pinned. */ int fh_PendingCallbacksProgress(gex_Rank_t node, fh_bucket_t **bd_list, int num_buckets, fh_pollq_t *PendQ) { fh_bucket_t *bd, *bdi; int i, callspend = 0; uintptr_t next_addr, end_addr, bucket_addr; fh_completion_callback_t *ccb, *next_ccb; firehose_request_t *req; FH_TABLE_ASSERT_LOCKED; /* uses fh_temp_bucket_ptrs */ for (i=0; ifh_tqe_next; gasneti_assert(ccb != NULL); FH_SET_REMOTE_INUSE(bd); FH_BSTATE_SET(bd, fh_used); FH_TRACE_BUCKET(bd, PENDING->INUSE had callback); while (ccb != FH_COMPLETION_END) { int remain_pending = 0; next_ccb = FH_STAILQ_NEXT(ccb); gasneti_assert(ccb->flags & FH_CALLBACK_TYPE_COMPLETION); req = ccb->request; gasneti_assert(req && (req->flags & FH_FLAG_PENDING)); gasneti_assert(next_ccb != NULL); GASNETI_TRACE_PRINTF(C, ("Firehose Advance Callback bd=%p (%p,%d), req=%p, next=%p", bd, (void *) FH_BADDR(bd), (int) FH_NODE(bd), req, next_ccb)); /* Assume no other buckets are pending */ end_addr = req->addr + req->len - 1; /* Walk through each bucket in the region until a pending bucket * is found. If none can be found, the callback can be called. */ FH_FOREACH_BUCKET(next_addr, end_addr, bucket_addr) { bdi = fh_bucket_lookup(node, bucket_addr); gasneti_assert(bdi != NULL); gasneti_assert(!FH_IS_REMOTE_PENDING_UNCOMMITTED(bdi)); if (FH_IS_REMOTE_PENDING(bdi)) { if (bdi->fh_tqe_next == NULL) ccb->fh_tqe_next = FH_COMPLETION_END; else ccb->fh_tqe_next = (fh_completion_callback_t *) bdi->fh_tqe_next; bdi->fh_tqe_next = (fh_bucket_t *) ccb; remain_pending++; break; } } /* If the ccb is not pending any more, it has not been attached * to any other bucket and its callback can be executed */ if (!remain_pending) { req->flags &= ~FH_FLAG_PENDING; FH_STAILQ_INSERT_TAIL(PendQ, (fh_callback_t *) ccb); GASNETI_TRACE_PRINTF(C, ("Firehose Pending Request (%p,%d) " "enqueued %p for callback", (void *) req->addr, (int) req->len, req)); callspend++; } ccb = next_ccb; } /* end while */ } /* end for */ #if 0 gasneti_assert(callspend > 0); gasneti_assert(!FH_STAILQ_EMPTY(PendQ)); #endif return callspend; } /* * Phase 1: fh_find_pending_callbacks * Identify which buckets have completion callbacks attached to them * and save them in fh_temp_bucket_ptrs. * * Called by fh_am_move_reph(), the handler called once the firehose * reply is recieved. */ int fh_find_pending_callbacks(gex_Rank_t node, firehose_region_t *region, int nreg, void *context, fh_pollq_t *PendQ) { int numpend = 0, callspend = 0; uintptr_t end_addr, bucket_addr; fh_bucket_t *bd; int i; FH_TABLE_ASSERT_LOCKED; /* uses fh_temp_bucket_ptrs */ gasneti_assert(node != gasneti_mynode); FH_STAILQ_INIT(PendQ); for (i = 0; i < nreg; i++) { end_addr = region[i].addr + region[i].len - 1; gasneti_assert(region[i].addr > 0); FH_FOREACH_BUCKET(region[i].addr,end_addr,bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); gasneti_assert(bd != NULL); /* Make sure the bucket was set as pending */ gasneti_assert(FH_IS_REMOTE_PENDING(bd)); FH_BSTATE_ASSERT(bd, fh_pending); /* if there is a pending request on the bucket, save it * in the temp array */ if (FH_HAS_COMPLETION_CALLBACK(bd)) { gasneti_assert(bd->fh_tqe_next != NULL); fh_temp_bucket_ptrs[numpend] = bd; numpend++; gasneti_assert(numpend < fh_max_regions); } else { FH_SET_REMOTE_INUSE(bd); FH_BSTATE_SET(bd, fh_used); FH_TRACE_BUCKET(bd, PENDING->INUSE); } } } callspend = fh_PendingCallbacksProgress(node, fh_temp_bucket_ptrs, numpend, PendQ); return callspend; } GASNETI_INLINE(fh_PendingCallbacksEnqueue) void fh_PendingCallbacksEnqueue(firehose_request_t *req, fh_bucket_t *bd, fh_completion_callback_t *ccb, fh_completion_callback_t *ccb_next) { fh_completion_callback_t *ccb_new; gasneti_assert(req->internal == NULL); gasneti_assert(!(req->flags & FH_FLAG_PENDING)); if (ccb_next == NULL) ccb_next = FH_COMPLETION_END; ccb_new = fh_alloc_completion_callback(); memcpy(ccb_new, ccb, sizeof(fh_completion_callback_t)); /* Set prev's next and cur's next */ bd->fh_tqe_next = (fh_bucket_t *) ccb_new; ccb_new->fh_tqe_next = ccb_next; req->flags |= FH_FLAG_PENDING; req->internal = (firehose_private_t *) ccb_new; GASNETI_TRACE_PRINTF(C, ("Firehose CallbackEnqueue bd=%p (%p,%d), ccb=%p, req=%p", bd, (void *) FH_BADDR(bd), (int) FH_NODE(bd), bd->fh_tqe_next, req)); return; } /* ##################################################################### */ /* Firehose SMP ONLY related functions */ /* ##################################################################### */ #if FIREHOSE_SMP extern void fhsmp_ServiceLocalPendingList(void) { int i; uintptr_t bucket_addr, end_addr; fh_bucket_t *bd; fh_locpendq_t pendCallbacks; fh_remote_callback_t *rc, *rc2; FH_TABLE_ASSERT_LOCKED; FH_POLLQ_LOCK; FH_TAILQ_INIT(&pendCallbacks); rc = (fh_remote_callback_t *) FH_TAILQ_FIRST(&fhsmp_LocalPendingList); while (rc != NULL) { int has_pending = 0; /* Verify that none of the buckets are pending anymore */ for (i = 0; i < rc->pin_list_num; i++) { end_addr = rc->pin_list[i].addr + rc->pin_list[i].len - 1; FH_FOREACH_BUCKET(rc->pin_list[i].addr,end_addr,bucket_addr) { bd = fh_bucket_lookup(gasneti_mynode,bucket_addr); gasneti_assert(bd != NULL); if (FH_IS_LOCAL_PENDING(bd)) { has_pending++; rc = (fh_remote_callback_t *) FH_TAILQ_NEXT(rc); goto next_rc; } } } next_rc: /* No buckets are pending any longer, run the callback */ if (!has_pending) { rc2 = rc; rc = (fh_remote_callback_t *) FH_TAILQ_NEXT(rc); FH_TAILQ_REMOVE(&fhsmp_LocalPendingList, rc2); FH_TAILQ_INSERT_TAIL(&pendCallbacks, rc2); } } FH_POLLQ_UNLOCK; /* * If we have local pending AMs to process, process them without holding * the table lock */ if (!FH_TAILQ_EMPTY(&pendCallbacks)) { FH_TABLE_UNLOCK; while (!FH_TAILQ_EMPTY(&pendCallbacks)) { rc = FH_TAILQ_FIRST(&pendCallbacks); if (rc->flags & FH_CALLBACK_TYPE_REMOTE) { firehose_remote_callback(rc->node, rc->pin_list, rc->pin_list_num, &(rc->args)); } /* Send an AMRequest to the reply handler */ fh_send_firehose_reply(rc); gasneti_free(rc->pin_list); gasneti_free(rc); FH_TAILQ_REMOVE(&pendCallbacks, rc); } FH_TABLE_LOCK; } return; } /* * ConsumeLocalBucket(num, unpin_p) * * Given 'num' new buckets to be pinned, an equal number in replacements * must be found. The replacement can come from "Free Energy" (unused * buckets) or from FIFO victims. */ int fhsmp_ConsumeLocalBucket(int b_num, fhi_RegionPool_t *unpin_p) { int b_remain, b_avail; FH_TABLE_ASSERT_LOCKED; gasneti_assert(FHC_MAXVICTIM_BUCKETS_AVAIL >= 0); /* * 1. Try to steal "Free Energy", if available. */ b_avail = MIN(b_num, FHC_MAXVICTIM_BUCKETS_AVAIL); fhc_LocalOnlyBucketsPinned += b_avail; b_remain = b_num - b_avail; /* "Free Energy" may have fulfilled all our needs */ if (b_remain == 0) return 0; /* * 2. Try to reap some Victims */ b_avail = MIN(b_remain, fhc_LocalVictimFifoBuckets); if (b_avail > 0) { int r_freed; firehose_region_t *reg; /* Append to unpin_p */ reg = &(unpin_p->regions[unpin_p->regions_num]); /* Adjusts LocalVictimFifoBuckets count */ r_freed = fhi_FreeVictimLocal(b_avail, reg); fhc_LocalVictimFifoBuckets -= b_avail; b_remain -= b_avail; unpin_p->buckets_num += b_avail; unpin_p->regions_num += r_freed; } gasneti_assert(FHC_MAXVICTIM_BUCKETS_AVAIL >= 0); return b_remain; } int fhsmp_TryAcquireLocalRegion(firehose_request_t *req, fhi_RegionPool_t *pin_p, fh_bucket_t **reused_bds, int *num_reused) { uintptr_t bucket_addr; int i, reused = 0; uintptr_t end_addr = req->addr + (uintptr_t)req->len - 1; fh_bucket_t *bd; gex_Rank_t node = req->node; FH_TABLE_ASSERT_LOCKED; /* * Go through each bucket, and return -1 as soon as we see a pending * bucket. The caller is advised that the contents of pin_p is * undefined if return is -1. */ FH_FOREACH_BUCKET(req->addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); if (bd != NULL) { if (FH_IS_LOCAL_PENDING(bd)) /* abort */ return -1; reused_bds[reused] = bd; reused++; gasneti_assert(reused < fh_max_regions); } else { bd = fh_bucket_add(node, bucket_addr); FH_SET_LOCAL_PENDING(bd); FH_BSTATE_SET(bd, fh_pending); FH_BUCKET_REFC(bd)->refc_l = 1; FH_BUCKET_REFC(bd)->refc_r = 0; FH_TRACE_BUCKET(bd, PENDING); fh_bucket_AddtoPool(pin_p, bucket_addr); } } /* * Now that we know the try operation will not abort, we can actually * acquire the buckets that we can reuse (those already pinned). */ for (i = 0; i < reused; i++) { bd = reused_bds[i]; fh_priv_acquire_local(1, bd); FH_BSTATE_ASSERT(bd, fh_used); } *num_reused = reused; return pin_p->buckets_num; } fh_bucket_t * fhsmp_ConsumeRemoteBucket(gex_Rank_t node, fhi_RegionPool_t *unpin_p) { fh_fifoq_t *fifo_head = &fh_RemoteNodeFifo[node]; fh_refc_t *rp; fh_bucket_t *bd; FH_TABLE_ASSERT_LOCKED; /* First, attempt to use any available free energy */ if (fhc_RemoteBucketsUsed[node] < fhc_RemoteBucketsM) { fhc_RemoteBucketsUsed[node]++; return (fh_bucket_t *) NULL; } /* When reclaiming a bucket from the FIFO, we increment its reference * count even though the intention is not to use that particular * bucket. This approach avoids the assocaited page to be double * pinned, which could happen if the bucket were simply removed from * the firehose table. * * We check later on if the refcount was incremented by more than 1 * (meaning another client wants to use up the page). */ if (fhc_RemoteVictimFifoBuckets[node] <= 0) fh_dump_counters(); gasneti_assert(fhc_RemoteVictimFifoBuckets[node] > 0); bd = FH_TAILQ_FIRST(fifo_head); FH_TAILQ_REMOVE(fifo_head, bd); FH_BSTATE_ASSERT(bd, fh_remote_fifo); FH_BSTATE_SET(bd, fh_used); FH_SET_REMOTE_INUSE(bd); FH_TRACE_BUCKET(bd, REMFIFO in Consume); rp = FH_BUCKET_REFC(bd); rp->refc_l = 0; rp->refc_r = 1; fhc_RemoteVictimFifoBuckets[node]--; fh_bucket_AddtoPool(unpin_p, FH_BADDR(bd)); return bd; } /* * This function estimates the number of buckets required to move in order * to satisfy the remote request at node 'node' for buckets covering * [start,end). * * Returns: * -1 Deadlock detected during estimation * 0 No additional buckets to pin * >0 Number of buckets to pin over [start,end) */ int fhsmp_EstimateRemoteRequest(int *myda, int *dacount, int *n_pending, gex_Rank_t node, uintptr_t start, uintptr_t end) { int count, pending = 0; uintptr_t bucket_addr; fh_bucket_t *bd; inner_again: count = 0; FH_FOREACH_BUCKET(start, end, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); if (bd == NULL) { /* We have a "pure" miss, increment the count */ count++; } else if (FH_IS_REMOTE_INUSE(bd)) { /* do nothing */ } else if (FH_IS_REMOTE_PENDING(bd)) { pending++; } else if (FH_IS_REMOTE_PENDING_UNCOMMITTED(bd)) { /* If we hit a non-committed pending bucket, increment the * deadlock avoidance count and handle the case appropriately * (whether we own or not the da bit). */ ++(*dacount); if (*myda) { /* We own the da bit! */ gasneti_assert(fh_da[node] > 0); } else if (fh_da[node]) { /* Someone else owns the da bit, abandon! */ *n_pending = pending; return -1; } else if (*dacount >= FH_DACOUNT_MAX) { *myda = fh_da[node] = 1; fh_dacount++; gasneti_sync_writes(); } /* unlock, poll, yield, lock and try again */ FH_UPYL; goto inner_again; } else { FH_BSTATE_ASSERT(bd, fh_remote_fifo); /* The bucket exists but only in the FIFO, which means we must use * it at least as a replacement in our request */ count++; } } *n_pending = pending; return count; } /* * If n_pending == 0, we had a complete hit. */ void fhsmp_PinRemoteAllHit(firehose_request_t *req, int n_pending, uintptr_t start, uintptr_t end) { uintptr_t bucket_addr; fh_bucket_t *bd; gex_Rank_t node = req->node; FH_FOREACH_BUCKET(start, end, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); gasneti_assert(bd && FH_BUCKET_REFC(bd)->refc_r > 0); fh_priv_acquire_remote(node, bd); } req->flags |= FH_FLAG_PINNED; return; } /* * In PinNoLog, we have already established that there are sufficient * resources (in Free Energy or in the FIFO) in order to satisfy the remote * pinning request -- we can proceed without polling. */ void fhsmp_PinRemoteNoLog(firehose_request_t *req, fh_completion_callback_t *ccb, uintptr_t start, uintptr_t end, fhi_RegionPool_t *pin_p, fhi_RegionPool_t *unpin_p) { uintptr_t bucket_addr; fh_bucket_t *bd; int first_pending = 1, new_b; gex_Rank_t node = req->node; pin_p->buckets_num = 0; pin_p->regions_num = 0; unpin_p->buckets_num = 0; unpin_p->regions_num = 0; FH_TABLE_ASSERT_LOCKED; FH_FOREACH_BUCKET(start, end, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); if (bd == NULL) { /* * Miss, add bucket to the table and the pool of regions */ bd = fh_bucket_add(node, bucket_addr); fh_bucket_AddtoPool(pin_p, bucket_addr); FH_BUCKET_REFC(bd)->refc_r = 1; FH_SET_REMOTE_PENDING(bd); FH_BSTATE_SET(bd, fh_pending); FH_TRACE_BUCKET(bd, INIT Pending Commit); if (first_pending) { fh_PendingCallbacksEnqueue(req, bd, ccb, FH_COMPLETION_END); first_pending = 0; } } else if (FH_IS_REMOTE_PENDING(bd)) { /* hit on a PENDING bucket, attach ourselves to it if we havn't * done so on any other pending bucket */ FH_BUCKET_REFC(bd)->refc_r++; gasneti_assert(FH_BUCKET_REFC(bd)->refc_r > 0); FH_TRACE_BUCKET(bd, PENDING added); if (first_pending) { fh_PendingCallbacksEnqueue(req, bd, ccb, (fh_completion_callback_t *) bd->fh_tqe_next); first_pending = 0; } } else { /* The bucket exists and is *NOT* pending, however make sure we * can't see remote pending *non-committed* buckets */ gasneti_assert(!FH_IS_REMOTE_PENDING_UNCOMMITTED(bd)); /* if (FH_IS_REMOTE_PENDING(bd)) gasneti_console_message("FH INFO","OK, problem is here. . PinNoLog!\n"); */ fh_priv_acquire_remote(node, bd); } } new_b = pin_p->buckets_num; if (new_b > 0) { /* Use up what we can in "free energy" */ int tmp = MIN(new_b, fhc_RemoteBucketsM - fhc_RemoteBucketsUsed[node]); new_b -= tmp; fhc_RemoteBucketsUsed[node] += tmp; /* Whatever's left will require replacement buckets, to be found in * the remote FIFO. We made sure to remove buckets we want to pin * from the FIFO a few lines above */ if (new_b > 0) { gasneti_assert(new_b <= fhc_RemoteVictimFifoBuckets[node]); unpin_p->buckets_num = new_b; unpin_p->regions_num = fhi_FreeVictimRemote(node, new_b, unpin_p->regions); fhc_RemoteVictimFifoBuckets[node] -= new_b; } } return; } /* * RemotePinWithLog * * This function makes the best progress it can given that 'n_avail' resources * are available. Presumably, this means recovering whatever is in the FIFO * (or in "free energy") in order to make progress over the region of interval * [start,end). * * This function is only called the first time an attempt to pin buckets is * made. Subsequent free resources use RemotePinWithLogAgain(). * */ uintptr_t fhsmp_RemotePinWithLog(int n_avail, gex_Rank_t node, uintptr_t start, uintptr_t end, fhi_RegionPool_t *pin_p, fhi_RegionPool_t *unpin_p) { uintptr_t bucket_addr, rem_addr; fh_bucket_t *bd; FH_TABLE_ASSERT_LOCKED; FH_FOREACH_BUCKET(start, end, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); if (bd != NULL) { /* EstimateRemoteRequest guarentees that we can't see * remote+noncommitted buckets */ gasneti_assert(!FH_IS_REMOTE_PENDING_UNCOMMITTED(bd)); /* * If we remove it from the fifo, we actually decrease the number * of available resources. */ if (FH_IS_REMOTE_FIFO(bd)) n_avail--; fh_priv_acquire_remote(node, bd); } else if (n_avail > 0) { try_this_again: /* Try to claim a "free" bucket, or one currently in the FIFO */ bd = fhsmp_ConsumeRemoteBucket(node, unpin_p); /* * Try to claim a "free" bucket or one in the FIFO. After that, * make sure we aren't free-ing a bucket to be used subsequently. */ if (bd != NULL && FH_BADDR(bd) >= start && FH_BADDR(bd) <= end) { rem_addr = fh_bucket_PopfromPool(unpin_p); gasneti_assert(rem_addr == FH_BADDR(bd)); fh_priv_release_remote(node, bd); /* return to end of FIFO */ FH_BSTATE_ASSERT(bd, fh_remote_fifo); --n_avail; if (!n_avail) return bucket_addr; goto try_this_again; } bd = fh_bucket_add(node, bucket_addr); FH_BUCKET_REFC(bd)->refc_r = 1; FH_SET_REMOTE_PENDING_UNCOMMITTED(bd); FH_BSTATE_SET(bd, fh_pending_commit); FH_TRACE_BUCKET(bd, INIT Pending Commit /w Log); fh_bucket_AddtoPool(pin_p, bucket_addr); --n_avail; } else { /* No more resources to claim, return where we are */ return bucket_addr; } } /* We already know that we can't fulfill all the required resources, so * it's impossible to reach this point. */ gasneti_fatalerror("Reached unreachable code"); return (uintptr_t) 0; } /* * RemotePinWithLogAgain. */ uintptr_t fhsmp_RemotePinWithLogAgain(int n_avail, gex_Rank_t node, uintptr_t start, uintptr_t end, fhi_RegionPool_t *pin_p, fhi_RegionPool_t *unpin_p) { uintptr_t bucket_addr, rem_addr; fh_bucket_t *bd; FH_TABLE_ASSERT_LOCKED; FH_FOREACH_BUCKET(start, end, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); if (bd != NULL) { /* * If we see a pending, uncomitted bucket, stop making progress and * retry later. */ if (FH_IS_REMOTE_PENDING_UNCOMMITTED(bd)) return bucket_addr; if (FH_IS_REMOTE_FIFO(bd)) n_avail--; fh_priv_acquire_remote(node, bd); } else if (n_avail > 0) { try_this_again: /* Try to claim a "free" bucket, or one currently in the FIFO */ bd = fhsmp_ConsumeRemoteBucket(node, unpin_p); /* Try to claim a "free" bucket or one in the FIFO. After that, * make sure we aren't free-ing a bucket to be used subsequently. */ if (bd != NULL && FH_BADDR(bd) >= start && FH_BADDR(bd) <= end) { rem_addr = fh_bucket_PopfromPool(unpin_p); gasneti_assert(rem_addr == FH_BADDR(bd)); fh_priv_release_remote(node, bd); /* return to end of FIFO */ FH_BSTATE_ASSERT(bd, fh_remote_fifo); --n_avail; if (!n_avail) { return bucket_addr; } goto try_this_again; } bd = fh_bucket_add(node, bucket_addr); FH_BUCKET_REFC(bd)->refc_r = 1; FH_SET_REMOTE_PENDING_UNCOMMITTED(bd); FH_BSTATE_SET(bd, fh_pending_commit); FH_TRACE_BUCKET(bd, INIT Pending Commit /w LogAgain); fh_bucket_AddtoPool(pin_p, bucket_addr); --n_avail; } else { /* As far as we could go with input 'n_avail' resources */ return bucket_addr; } } /* At this point, we have enough resources to finish */ return end + 1; } /* * Return zero if another thread hit one of the buckets contained * in our unpin pool. */ int fhsmp_RevalidateResources(gex_Rank_t node, fhi_RegionPool_t *unpin_p) { int i; uintptr_t bucket_addr, bucket_end; fh_bucket_t *bd; FH_FOREACH_BUCKET_IN_POOL(i, unpin_p, bucket_addr, bucket_end) { bd = fh_bucket_lookup(node, bucket_addr); gasneti_assert(bd != NULL); gasneti_assert(FH_BUCKET_REFC(bd)->refc_r > 0); /* Someone hit on a bucket we used in our unpin pool */ if (FH_BUCKET_REFC(bd)->refc_r != 1) { return 0; } } return 1; } /* * In Local Rollback, we rollback the resources in this order: * 1. Return all the buckets we planned to reuse * 2. Remove all new PENDING buckets added to the table (** a possible * optimization here is to leave the buckets in the table and mark them as * garbage, skipping the remove+add step required subsequently). * 3. Return all "Free Energy". Free energy is the total number of buckets * to pin, minus the ones we have in unpin, minus the ones remaining. * 4. Return all buckets contained in unpin_p to the FIFO. */ void fhsmp_LocalRollback(fhi_RegionPool_t *pin_p, fhi_RegionPool_t *unpin_p, fh_bucket_t **reused_bds, int b_reused, int b_remain) { int b_free; int b_unpin, i; uintptr_t bucket_end, bucket_addr; fh_bucket_t *bd; /* * 1. Decrement all the buckets we could reuse */ for (i=0; i < b_reused; i++) fh_priv_release_local(1, reused_bds[i]); /* * 2. Destroy all buckets we marked as "PENDING" */ FH_FOREACH_BUCKET_IN_POOL(i, pin_p, bucket_addr, bucket_end) { bd = fh_bucket_lookup(gasneti_mynode, bucket_addr); gasneti_assert(bd != NULL); gasneti_assert(FH_IS_LOCAL_PENDING(bd)); gasneti_assert(FH_BUCKET_REFC(bd)->refc_l == 1); fh_bucket_remove(bd); } /* * 3. Return "Free Energy", defined as * Buckets requested - (Buckets reaped + Buckets in Free Energy) * * These buckets are subtracted from LocalOnlyBucketsPinned as we * will *NOT* be pinning buckets in pin_p and these buckets should * not count against our limit */ b_unpin = unpin_p == NULL ? 0 : unpin_p->buckets_num; b_free = pin_p->buckets_num - (b_unpin + b_remain); gasneti_assert(b_free >= 0); fhc_LocalOnlyBucketsPinned -= b_free; /* * 4. Return all buckets reaped from the FIFO, if any. * We actually have to recreate the buckets since we removed them in * order to prevent other threads to hit on FIFO buckets that were to be * removed. */ if (b_unpin > 0) { FH_FOREACH_BUCKET_IN_POOL(i, unpin_p, bucket_addr, bucket_end) { gasneti_assert(fh_bucket_lookup(gasneti_mynode, bucket_addr) == NULL); bd = fh_bucket_add(gasneti_mynode, bucket_addr); FH_SET_LOCAL_INUSE(bd); FH_BUCKET_REFC(bd)->refc_l = 1; FH_BUCKET_REFC(bd)->refc_r = 0; fh_priv_release_local(1, bd); FH_BSTATE_ASSERT(bd, fh_local_fifo); } } /* * We should *NOT* have overflowed the LocalOnlyBucketsPinned counter */ gasneti_assert(fhc_LocalOnlyBucketsPinned <= fhc_MaxVictimBuckets); return; } void fhsmp_RemoteRollback(gex_Rank_t node, uintptr_t start_addr, uintptr_t saved_addr, fhi_RegionPool_t *pin_p, fhi_RegionPool_t *unpin_p) { uintptr_t bucket_addr, bucket_end; uintptr_t end_addr = saved_addr - 1; fh_bucket_t *bd; int i; /* May not have acquired any buckets if saved addr is start addr */ if (saved_addr == start_addr) { gasneti_assert(!pin_p || pin_p->buckets_num == 0); gasneti_assert(!unpin_p || unpin_p->buckets_num == 0); return; } /* * 1. Separate the buckets we used into the ones we created (set as * PENDING_UNCOMMITTED) and others we used (we can simply decrement). */ FH_FOREACH_BUCKET(start_addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); if (bd == NULL) gasneti_fatalerror("start=%p,save=%p and no bucket found at %p\n", (void*)start_addr,(void *)saved_addr,(void*)bucket_addr); gasneti_assert(bd != NULL); if (FH_IS_REMOTE_PENDING_UNCOMMITTED(bd)) { /* * We created this bucket (and set it pending and not committed), * it falls within the "handled" range */ FH_TRACE_BUCKET(bd, Rollback destroy); fh_bucket_remove(bd); } else if (FH_IS_REMOTE_PENDING(bd)) { /* Some other request had this bucket pending */ gasneti_assert(FH_BUCKET_REFC(bd)->refc_r > 1); FH_BUCKET_REFC(bd)->refc_r--; } else { fh_priv_release_remote(node, bd); FH_TRACE_BUCKET(bd, Rollback Release); } } /* * 2. Return to the FIFO all buckets we were able to reap. Buckets in our * unpin pool may also have a refcount > 1, in which case we had to * rollback because another thread wanted to use a bucket in our unpin * list. */ FH_FOREACH_BUCKET_IN_POOL(i, unpin_p, bucket_addr, bucket_end) { bd = fh_bucket_lookup(node, bucket_addr); gasneti_assert(bd != NULL); fh_priv_release_remote(node, bd); /* return to FIFO, if possible */ } /* * Restore the buckets taken as "free energy" */ GASNETI_TRACE_PRINTF(C, ("Rollback free energy = %d", (unsigned int) (pin_p->buckets_num - unpin_p->buckets_num))); fhc_RemoteBucketsUsed[node] += (pin_p->buckets_num - unpin_p->buckets_num); return; } /* * Once we've acquired the required resources, the calling thread can commit. * We */ void fhsmp_Commit(firehose_request_t *req, fh_completion_callback_t *ccb, uintptr_t start_addr, uintptr_t end_addr, fhi_RegionPool_t *pin_p, fhi_RegionPool_t *unpin_p) { /* * Commit all buckets we created, setting them pending and now committed. * Also, we hang a callback on the first pending bucket */ uintptr_t bucket_addr, bucket_end; fh_bucket_t *bd; int i, first_pending = 1; gex_Rank_t node = req->node; GASNETI_TRACE_PRINTF(C, ("Firehose SMP Commit (req=%p)", req)); FH_FOREACH_BUCKET_IN_POOL(i, pin_p, bucket_addr, bucket_end) { bd = fh_bucket_lookup(node, bucket_addr); gasneti_assert(bd != NULL); gasneti_assert(FH_BUCKET_REFC(bd)->refc_r == 1); gasneti_assert(FH_IS_REMOTE_PENDING_UNCOMMITTED(bd)); FH_SET_REMOTE_PENDING(bd); FH_BSTATE_SET(bd, fh_pending); FH_TRACE_BUCKET(bd, Pending->Committed); if (first_pending) { fh_PendingCallbacksEnqueue(req, bd, ccb, FH_COMPLETION_END); first_pending = 0; } } FH_FOREACH_BUCKET_IN_POOL(i, unpin_p, bucket_addr, bucket_end) { bd = fh_bucket_lookup(node, bucket_addr); gasneti_assert(bd != NULL); gasneti_assert(FH_BUCKET_REFC(bd)->refc_r == 1); fh_bucket_remove(bd); } /* * If we havn't attached any callback yet, either we hit entirely on * pending buckets or it so happens that all the buckets we were waiting * for are now pinned. * * XXX There is some room for optimization here, by handling this case * earlier. */ if (!(req->flags & FH_FLAG_PENDING)) { uintptr_t end_addr = req->addr + req->len - 1; FH_FOREACH_BUCKET(req->addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); gasneti_assert(FH_IS_REMOTE_INUSE(bd) || FH_IS_REMOTE_PENDING(bd)); if (FH_IS_REMOTE_PENDING(bd)) { fh_PendingCallbacksEnqueue(req, bd, ccb, (fh_completion_callback_t *) bd->fh_tqe_next); break; } } } return; } /* * fh_acquire_local_region(region) * * In acquiring local pages covered over the region, pin calls are coalesced. * Acquiring a page may lead to a pin call but always results in the page * reference count being incremented. * * Under firehose-page, acquiring means finding bucket descriptors for each * bucket in the region and incrementing the bucket descriptor's reference * count. * * Called by fh_local_pin() (firehose_local_pin, firehose_local_try_pin) */ void fh_acquire_local_region(firehose_request_t *req) { int b_total, b_new, b_reused; int outer_limit, inner_limit; int my_da = 0; int outer_count = 0; fhi_RegionPool_t *pin_p = NULL, *unpin_p = NULL; fh_bucket_t *bd; static gasneti_cond_t inflight_condvar = GASNETI_COND_INITIALIZER; FH_TABLE_ASSERT_LOCKED; gasneti_assert(req->node == gasneti_mynode); b_total = FH_NUM_BUCKETS(req->addr, req->len); /* Make sure the size of the region respects the local limits. */ /* XXX Should split up larger sizes into smaller requests */ gasneti_assert(b_total <= fhc_MaxVictimBuckets); #if 0 outer_limit = (gasnete_approx_num_threads() - 1); #endif outer_limit = 2; inner_limit = (b_total / 10); /* ??? */ again: gasneti_assert(pin_p == NULL && unpin_p == NULL); pin_p = fhi_AllocRegionPool(FH_MIN_REGIONS_FOR_BUCKETS(b_total)); unpin_p = NULL; FH_TABLE_ASSERT_LOCKED; outer_count++; if_pf (my_da) { /* If we assert my_da, make sure local da is set */ gasneti_assert(fh_local_da); } if_pf (fh_local_da) { /* Someone else owns fhi_local_da, wait for them to finish */ do { gasneti_cond_wait(&fh_local_da_cv, &fh_table_lock); } while (fh_local_da); /* loop until we win the race */ } else if_pf (outer_count > outer_limit) { /* take ownership of fhi_local_da */ my_da = fh_local_da = 1; /* give others a chance to release resources */ FH_TABLE_UNLOCK; FIREHOSE_AMPOLL(); gasneti_sched_yield(); FIREHOSE_AMPOLL(); FH_TABLE_LOCK; } /* Try to acquire local buckets */ b_new = fhsmp_TryAcquireLocalRegion(req, pin_p, fh_temp_bucket_ptrs, &b_reused); /* We saw no pendings and have zero or more to pin */ if_pt (b_new >= 0) { int inner_count = 0; int b_remain; int i; uintptr_t bucket_end, bucket_addr; unpin_p = fhi_AllocRegionPool(b_new); b_remain = fhsmp_ConsumeLocalBucket(b_new, unpin_p); /* * If b_remain is greater than zero, we have to wait for requests * currently in flight to fulfill our replacement needs. This * condition is satisfied when b_remain reaches 0. */ if_pf (b_remain > 0) { do { /* Unlock, poll, yield, poll, lock */ FH_UPYUL; FH_TABLE_ASSERT_LOCKED; inner_count++; if_pf (my_da) { /* We already "own" fhi_local_da, no checks needed */ gasneti_assert(fh_local_da); } else if_pf (fh_local_da) { /* Somebody else "owns" fhi_local_da. We must back off and start from scratch. */ fhsmp_LocalRollback(pin_p, unpin_p, fh_temp_bucket_ptrs, b_reused, b_remain); fhi_FreeRegionPool(pin_p); fhi_FreeRegionPool(unpin_p); pin_p = NULL; unpin_p = NULL; goto again; /* will recheck for (fhi_local_da != 0) */ } else if_pf (inner_count > inner_limit) { /* take ownership of fhi_local_da */ my_da = fh_local_da = 1; } } while ((b_remain = fhsmp_ConsumeLocalBucket(b_remain, unpin_p))); } /* * We have everything we need... commit */ if (pin_p->regions_num) { GASNETI_TRACE_EVENT(C,FH_LOCAL_MISS); } else { GASNETI_TRACE_EVENT(C,FH_LOCAL_HIT); } FH_TABLE_ASSERT_LOCKED; FH_TABLE_UNLOCK; gasneti_assert(pin_p != NULL); gasneti_assert(unpin_p != NULL); firehose_move_callback(gasneti_mynode, unpin_p->regions, unpin_p->regions_num, pin_p->regions, pin_p->regions_num); FH_TABLE_LOCK; FH_TABLE_ASSERT_LOCKED; fhi_FreeRegionPool(unpin_p); unpin_p = NULL; /* Must remove the PENDING bit on buckets we just pinned and actually * initialize the buckets. */ FH_FOREACH_BUCKET_IN_POOL(i, pin_p, bucket_addr, bucket_end) { bd = fh_bucket_lookup(gasneti_mynode, bucket_addr); gasneti_assert(bd != NULL); gasneti_assert(FH_IS_LOCAL_PENDING(bd)); FH_BSTATE_SET(bd, fh_used); FH_SET_LOCAL_INUSE(bd); FH_TRACE_BUCKET(bd, INIT NONPENDING); } fhi_FreeRegionPool(pin_p); pin_p = NULL; gasneti_cond_broadcast(&inflight_condvar); if_pf (my_da) { gasneti_assert(fh_local_da); FH_TABLE_UNLOCK; FIREHOSE_AMPOLL(); FH_TABLE_LOCK; fh_local_da = 0; gasneti_cond_broadcast(&fh_local_da_cv); } fhsmp_ServiceLocalPendingList(); } else { /* We saw one of more PENDING buckets. We unwind, wait * for them to be completed and then start over at the * begining (for a maximum of outer_limit times before * asserting fh_local_da. */ fhsmp_LocalRollback(pin_p, NULL, NULL, 0, 0); fhi_FreeRegionPool(pin_p); pin_p = NULL; gasneti_cond_wait(&inflight_condvar, &fh_table_lock); goto again; /* will recheck for (fh_local_da != 0) */ } FH_TABLE_ASSERT_LOCKED; return; } void fh_acquire_remote_region(firehose_request_t *req, firehose_completed_fn_t callback, void *context, uint32_t flags, firehose_remotecallback_args_fn_t args_fn) { int da_count = 0, b_total; int my_da = 0; int n_buckets, n_avail, n_pending, n_avail_old; gex_Rank_t node = req->node; uintptr_t end_addr = req->addr + req->len - 1; uintptr_t start_addr = req->addr; uintptr_t saved_addr, bucket_addr; fhi_RegionPool_t *pin_p = NULL, *unpin_p = NULL; fh_completion_callback_t ccb; FH_TABLE_ASSERT_LOCKED; /* Make sure the size of the region respects the remote limits */ gasneti_assert(req->node != gasneti_mynode); b_total = FH_NUM_BUCKETS(req->addr, req->len); FH_TABLE_ASSERT_LOCKED; req->internal = NULL; /* Fill in a completion callback */ ccb.flags = FH_CALLBACK_TYPE_COMPLETION; ccb.fh_tqe_next = FH_COMPLETION_END; ccb.callback = callback; ccb.request = req; ccb.context = context; GASNETI_TRACE_PRINTF(C, ("in fh_acquire_remote_region")); outer_again: n_pending = 0; /* Wait for deadlock to end */ while (fh_da[node]) { FH_UPYL; } n_avail = FHI_AVAIL(node); n_buckets = fhsmp_EstimateRemoteRequest(&my_da, &da_count, &n_pending, node, start_addr, end_addr); /* * No buckets to pin, the hit can be either perfect or exclusively on * pending buckets */ if (n_buckets == 0) { fh_bucket_t *bd; /* * Perfect hit: no pending buckets */ if (n_pending == 0) { FH_FOREACH_BUCKET(start_addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); gasneti_assert(bd && FH_BUCKET_REFC(bd)->refc_r > 0); fh_priv_acquire_remote(node, bd); } req->flags |= FH_FLAG_PINNED; } /* * Hit entirely on buckets currently in flight, don't bother sending * AM. just attach a callback on the first bucket found to be pending. */ else { int has_pending = 0; FH_FOREACH_BUCKET(start_addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); gasneti_assert(FH_IS_REMOTE_INUSE(bd) || FH_IS_REMOTE_PENDING(bd)); fh_priv_acquire_remote(node, bd); if (!has_pending && FH_IS_REMOTE_PENDING(bd)) { fh_PendingCallbacksEnqueue(req, bd, &ccb, (fh_completion_callback_t *) bd->fh_tqe_next); has_pending++; } } gasneti_assert(req->flags & FH_FLAG_PENDING); } goto done; } if (n_buckets < 0 && !my_da) goto outer_again; /* * At this point, we will remain the sole owners of the table lock until we * release it in order to poll. */ n_avail = FHI_AVAIL(node); pin_p = fhi_AllocRegionPool(FH_MIN_REGIONS_FOR_BUCKETS(b_total)); unpin_p = fhi_AllocRegionPool(FH_MIN_REGIONS_FOR_BUCKETS(n_buckets)); if (my_da) { gasneti_assert(fh_da[node]); goto won_da; } /* * 1. Easy Path: We have enough resources already */ if (n_buckets <= n_avail) { fhsmp_PinRemoteNoLog(req, &ccb, start_addr, end_addr, pin_p, unpin_p); gasneti_assert(!(req->flags & FH_FLAG_PINNED)); goto send_am; /* skip hard path */ } /* * 2. Hard Path: Not enough resources, we may have to poll. */ saved_addr = fhsmp_RemotePinWithLog(n_avail,node,start_addr,end_addr,pin_p,unpin_p); gasneti_assert(saved_addr < end_addr); while (da_count < FH_DACOUNT_MAX) { da_count++; /* Someone else asserted fh_da: start over */ if_pf (fh_da[node]) { gasneti_assert(!my_da); fhsmp_RemoteRollback(node, start_addr, saved_addr, pin_p, unpin_p); fhi_FreeRegionPool(pin_p); fhi_FreeRegionPool(unpin_p); pin_p = NULL; unpin_p = NULL; goto outer_again; } /*fh_dump_counters();*/ /* Poll, hoping that more resources are available */ FH_UPYL; n_avail = FHI_AVAIL(node); /* We may have lost some buckets, stolen by another thread */ if (!fhsmp_RevalidateResources(node, unpin_p)) { /* XXX: room for optimization here where we could try to * replace lost buckets with some from n_avail */ GASNETI_TRACE_PRINTF(C, ("Firehose ROLLBACK: Lost some unpin buckets")); fhsmp_RemoteRollback(node, start_addr, saved_addr, pin_p, unpin_p); fhi_FreeRegionPool(pin_p); fhi_FreeRegionPool(unpin_p); pin_p = NULL; unpin_p = NULL; goto outer_again; } saved_addr = fhsmp_RemotePinWithLogAgain(n_avail,node,saved_addr, end_addr,pin_p,unpin_p); /* In testing for 'end+1', we assume the last page in memory will * never appear in the code path */ if (saved_addr == (end_addr+1)) { fhsmp_Commit(req, &ccb, start_addr, end_addr, pin_p, unpin_p); goto send_am; } } fhsmp_RemoteRollback(node, start_addr, saved_addr, pin_p, unpin_p); /* We can *WIN* the deadlock avoidance bit race */ if (!fh_da[node]) { n_avail_old = FHI_AVAIL(node); my_da = fh_da[node] = 1; fh_dacount++; won_da: /* Wait for sufficient resources */ do { FH_UPYL; n_avail = FHI_AVAIL(node); } while (fhsmp_EstimateRemoteRequest(&my_da, &da_count, &n_pending, node, start_addr, end_addr) > FHI_AVAIL(node)); /* Once we are out of the polling loop, other threads have * relinquished their resources and we have satisfied our * requirements */ fhsmp_PinRemoteNoLog(req, &ccb, start_addr, end_addr, pin_p, unpin_p); fh_da[node] = 0; if (req->flags & FH_FLAG_PINNED) goto done; /* Turns out the operation is now free */ else goto send_am; } /* We *LOST* the deadlock avoidance race bit -- Rollback */ else { fhi_FreeRegionPool(pin_p); fhi_FreeRegionPool(unpin_p); pin_p = NULL; unpin_p = NULL; goto outer_again; } send_am: if (pin_p && pin_p->regions_num > 0) { size_t args_len = 0; size_t pin_r = pin_p->regions_num; size_t unpin_r = unpin_p->regions_num; size_t tot_r = pin_r + unpin_r; firehose_region_t *reg_alloc; if (flags & FIREHOSE_FLAG_ENABLE_REMOTE_CALLBACK) args_len = sizeof(firehose_remotecallback_args_t); reg_alloc = (void *) alloca(sizeof(firehose_region_t) * (pin_r+unpin_r+args_len)); /* Copy new and replacement regions */ memcpy(reg_alloc, pin_p->regions, pin_r*sizeof(firehose_region_t)); memcpy(reg_alloc + pin_r, unpin_p->regions, unpin_r * sizeof(firehose_region_t)); fhi_FreeRegionPool(pin_p); fhi_FreeRegionPool(unpin_p); FH_TABLE_UNLOCK; /* Construct remote callback args if required */ if (args_len > 0) { args_len = args_fn(context, (firehose_remotecallback_args_t *)(reg_alloc + tot_r)); } #ifdef FIREHOSE_UNBIND_CALLBACK if (unpin_r > 0) firehose_unbind_callback(node, reg_alloc + pin_r, unpin_r); #endif req->flags |= FH_FLAG_INFLIGHT; gex_AM_RequestMedium( gasneti_THUNK_TM, node, fh_handleridx(fh_am_move_reqh), reg_alloc, sizeof(firehose_region_t)*tot_r+args_len, GEX_EVENT_NOW, 0, (uint32_t) flags, (uint32_t) pin_r, (uint32_t) unpin_r, PACK(NULL)); goto done_unlocked; } else { fhi_FreeRegionPool(pin_p); fhi_FreeRegionPool(unpin_p); } done: /* Only set the PINNED flag if the request is not set on any * pending buckets */ if (!(req->flags & FH_FLAG_PENDING)) req->flags |= FH_FLAG_PINNED; FH_TABLE_UNLOCK; done_unlocked: FH_TABLE_ASSERT_UNLOCKED; return; } #else /* !FIREHOSE_SMP */ /* ##################################################################### */ /* Firehose UNI ONLY related functions */ /* ##################################################################### */ /* * fhuni_CoalesceBuckets(buckets_ptr_vec, num_buckets, regions_array) * * Helper function to coalesce contiguous buckets into the regions array. * * The function loops over the bucket descriptors in the 'buckets' array in * the hopes of creating the smallest amount of region_t in the 'regions' * array. * This is made possible by coalescing buckets found to be contiguous in * memory by looking at the previous bucekt descriptors in the 'buckets' * array. * * It is probably not worth our time making the coalescing process smarter by * searching through the whole 'buckets' array each time. * * The function returns the amount of regions in the region array. * */ int fhuni_CoalesceBuckets(uintptr_t *bucket_list, size_t num_buckets, firehose_region_t *regions) { int i, j = -1; /* new buckets created */ uintptr_t addr_next = 0, bucket_addr; FH_TABLE_ASSERT_LOCKED; gasneti_assert(num_buckets > 0); /* Coalesce consequentive pages into a single region_t */ for (i = 0; i < num_buckets; i++) { bucket_addr = bucket_list[i]; if (i > 0 && bucket_addr == addr_next) regions[j].len += FH_BUCKET_SIZE; else { j++; regions[j].addr = bucket_addr; regions[j].len = FH_BUCKET_SIZE; } addr_next = bucket_addr + FH_BUCKET_SIZE; } gasneti_assert(regions[j].addr > 0); return j+1; } int fhuni_TryAcquireRemoteRegion(firehose_request_t *req, fh_completion_callback_t *ccb, int *new_regions) { uintptr_t bucket_addr, end_addr, next_addr = 0; int unpinned = 0; int new_r = 0, b_num; int has_callback; fh_bucket_t *bd; gex_Rank_t node; end_addr = req->addr + (uintptr_t) req->len - 1; FH_TABLE_ASSERT_LOCKED; gasneti_assert(req != NULL); gasneti_assert(req->node != gasneti_mynode); node = req->node; has_callback = (req->flags & FH_FLAG_PENDING); b_num = FH_NUM_BUCKETS(req->addr, req->len); FH_FOREACH_BUCKET(req->addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(node, bucket_addr); if (bd == NULL) { /* We add the bucket but set it PENDING */ fh_temp_buckets[unpinned] = bucket_addr; bd = fh_bucket_add(node, bucket_addr); FH_BUCKET_REFC(bd)->refc_r++; FH_SET_REMOTE_PENDING(bd); FH_BSTATE_SET(bd, fh_pending); FH_TRACE_BUCKET(bd, INIT); if (next_addr != bucket_addr) new_r++; next_addr = bucket_addr + FH_BUCKET_SIZE; unpinned++; gasneti_assert(unpinned <= fh_max_regions); if (!has_callback) { fh_PendingCallbacksEnqueue(req, bd, ccb, FH_COMPLETION_END); has_callback = 1; } } else if (FH_IS_REMOTE_PENDING(bd)) { /* The bucket is pending: We increment the * refcount and attach a callback if we have not * attached a callback elsewhere */ if (!has_callback) { fh_PendingCallbacksEnqueue(req, bd, ccb, (fh_completion_callback_t *) bd->fh_tqe_next); has_callback = 1; } FH_BUCKET_REFC(bd)->refc_r++; gasneti_assert(FH_BUCKET_REFC(bd)->refc_r > 0); FH_TRACE_BUCKET(bd, PENDING); } else { /* The bucket exists and is *NOT* pending */ fh_priv_acquire_remote(node, bd); } } *new_regions = new_r; return unpinned; } /* * fh_acquire_local_region(region) * * In acquiring local pages covered over the region, pin calls are coalesced. * Acquiring a page may lead to a pin call but always results in the page * reference count being incremented. * * Under firehose-page, acquiring means finding bucket descriptors for each * bucket in the region and incrementing the bucket descriptor's reference * count. * * Called by fh_local_pin() (firehose_local_pin, firehose_local_try_pin) */ void fh_acquire_local_region(firehose_request_t *req) { int b_num, b_total; firehose_region_t region; fhi_RegionPool_t *pin_p; FH_TABLE_ASSERT_LOCKED; gasneti_assert(req->node == gasneti_mynode); b_total = FH_NUM_BUCKETS(req->addr, req->len); /* Make sure the size of the region respects the local limits */ gasneti_assert(b_total <= fhc_MaxVictimBuckets); pin_p = fhi_AllocRegionPool(FH_MIN_REGIONS_FOR_BUCKETS(b_total)); region.addr = req->addr; region.len = req->len; b_num = fhi_AcquireLocalRegionsList(1, ®ion, 1, pin_p); gasneti_assert(b_num >= 0); /* b_num contains the number of new Buckets to be pinned. We * may have to unpin Buckets in order to respect the threshold on * locally pinned buckets. */ if (b_num > 0) { fhi_RegionPool_t *unpin_p; unpin_p = fhi_AllocRegionPool(FH_MIN_REGIONS_FOR_BUCKETS(b_num)); unpin_p->regions_num = fh_WaitLocalFirehoses(b_num, unpin_p->regions); FH_TABLE_UNLOCK; firehose_move_callback(gasneti_mynode, unpin_p->regions, unpin_p->regions_num, pin_p->regions, pin_p->regions_num); FH_TABLE_LOCK; fhi_InitLocalRegionsList(1, pin_p->regions, pin_p->regions_num); fhi_FreeRegionPool(unpin_p); GASNETI_TRACE_EVENT(C,FH_LOCAL_MISS); } else { GASNETI_TRACE_EVENT(C,FH_LOCAL_HIT); } fhi_FreeRegionPool(pin_p); return; } /* fh_acquire_remote_region(request, callback, context, flags, * remotecallback_args_fn) * * The function only requests a remote pin operation (AM) if one of the pages * covered in the region is not known to be pinned on the remote host. Unless * the entire region hits the remote firehose hash, the value of the internal * pointer is set to FH_REQ_UNPINNED and a request for remote pages to be * pinned is enqueued. * * NOTE: this function begins with the table lock held an concludes with the * table lock released!!! * XXX/PHH: Can the UNBIND and AM stuff move to firehose.c to avoid this? * If so, we must stop using alloca() here! Instead of alloca(), we * should pass the AM-args around, eliminating the scalar arguments * entirely in favor of packing a struct provided by the caller * (in firehose.c), and replacing 'args'. * That means either calling alloca() for the maximum size * unconditionally in the caller, or equivalently having an automatic * variable or thread-local buffer of maximum size. */ void fh_acquire_remote_region(firehose_request_t *req, firehose_completed_fn_t callback, void *context, uint32_t flags, firehose_remotecallback_args_fn_t args_fn) { int notpinned, new_r = 0; fh_completion_callback_t ccb; gex_Rank_t node; FH_TABLE_ASSERT_LOCKED; node = req->node; req->internal = NULL; /* Fill in a completion callback struct temporarily as it may be used * in fhuni_TryAcquireRemoteRegion() */ ccb.flags = FH_CALLBACK_TYPE_COMPLETION; ccb.fh_tqe_next = FH_COMPLETION_END; ccb.callback = callback; ccb.request = req; ccb.context = context; /* Writes the non-pinned buckets to temp_buckets array */ notpinned = fhuni_TryAcquireRemoteRegion(req, &ccb, &new_r); GASNETI_TRACE_PRINTF(C, ("Firehose fh_acquire_remote_region %d ("GASNETI_LADDRFMT",%d) " "(%d buckets unpinned, flags=0x%x)", node, GASNETI_LADDRSTR(req->addr), (int) req->len, notpinned, req->flags)); /* * In moving remote regions, none of the temp arrays can be used, as * the AM call has to be done without holding the TABLE lock. For this * reason, alloca() is used to acquire a temporary array of regions. */ if (notpinned > 0) { int replace_b, old_r = 0, free_b; void *reg_alloc; firehose_region_t *reg_alloc_new, *reg_alloc_old; int args_len = 0; gasneti_assert(req->internal != NULL); gasneti_assert(req->flags & FH_FLAG_PENDING); /* Make sure the size of the region respects the remote limits */ if_pf(notpinned > fhc_RemoteBucketsM) gasneti_fatalerror("Region of %"PRIuPTR" bytes too large for only " "%d available remote firehoses (%"PRIuPTR" bytes)", (uintptr_t) req->len, fhc_RemoteBucketsM, (uintptr_t) fhc_RemoteBucketsM*FH_BUCKET_SIZE); /* If the remote victim fifo is not full, no replacements are * necessary */ free_b = MIN(notpinned, fhc_RemoteBucketsM - fhc_RemoteBucketsUsed[node]); replace_b = notpinned - free_b; /* See if we need any args */ if (flags & FIREHOSE_FLAG_ENABLE_REMOTE_CALLBACK) args_len = sizeof(firehose_remotecallback_args_t); /* We've calculated 'new_r' regions will be sufficient for the * replacement buckets and estimate a worst-case of 'replace_r' * will be required for replacement firehoses * XXX should keep stats on the size of the alloca */ reg_alloc = (void *) alloca(sizeof(firehose_region_t) * (new_r+replace_b) + args_len); reg_alloc_new = (firehose_region_t *) reg_alloc; /* Coalesce new buckets into a minimal amount of regions */ new_r = fhuni_CoalesceBuckets(fh_temp_buckets, notpinned, reg_alloc_new); gasneti_assert(new_r > 0); reg_alloc_old = reg_alloc_new + new_r; /* Find replacement buckets if required */ if (replace_b > 0) old_r = fh_WaitRemoteFirehoses(node, replace_b, reg_alloc_old); else old_r = 0; fhc_RemoteBucketsUsed[node] += (notpinned - replace_b); gasneti_assert(fhc_RemoteBucketsUsed[node] <= fhc_RemoteBucketsM); FH_TABLE_UNLOCK; /* Construct remote callback args if required */ if (args_len > 0) { args_len = args_fn(context, (firehose_remotecallback_args_t *)(reg_alloc_old + old_r)); } #ifdef FIREHOSE_UNBIND_CALLBACK if (old_r > 0) firehose_unbind_callback(node, reg_alloc_old, old_r); #endif req->flags |= FH_FLAG_INFLIGHT; gex_AM_RequestMedium( gasneti_THUNK_TM, node, fh_handleridx(fh_am_move_reqh), reg_alloc, sizeof(firehose_region_t)*(new_r+old_r)+args_len, GEX_EVENT_NOW, 0, flags, new_r, old_r, PACK(NULL)); } else { /* Only set the PINNED flag if the request is not set on any * pending buckets */ if (!(req->flags & FH_FLAG_PENDING)) req->flags |= FH_FLAG_PINNED; FH_TABLE_UNLOCK; } FH_TABLE_ASSERT_UNLOCKED; } #endif /* FIREHOSE_SMP */ /* * XXX not smp-ized * * fh_release_remote_region(request) * * This function releases every page in the region described in the firehose * request type. * * Loop over each bucket in reverse order * If the reference count reaches zero, push the descriptor at the head of * the victim FIFO */ void fh_release_remote_region(firehose_request_t *request) { uintptr_t end_addr, bucket_addr; fh_bucket_t *bd; FH_TABLE_ASSERT_LOCKED; end_addr = request->addr + request->len - 1; GASNETI_TRACE_PRINTF(C, ("Firehose release_remote_region(" GASNETI_LADDRFMT", %d) "GASNETI_LADDRFMT, GASNETI_LADDRSTR(request->addr), (int) request->len, GASNETI_LADDRSTR(request))); /* Process region in reverse order so regions can be later coalesced in * the proper order (lower to higher address) from the FIFO */ FH_FOREACH_BUCKET_REV(request->addr, end_addr, bucket_addr) { bd = fh_bucket_lookup(request->node, bucket_addr); gasneti_assert(bd != NULL); FH_BSTATE_ASSERT(bd, fh_used); gasneti_assert(!FH_IS_REMOTE_PENDING(bd)); fh_priv_release_remote(request->node, bd); } gasneti_assert( fhc_RemoteVictimFifoBuckets[request->node] <= fhc_RemoteBucketsM); return; } /* ##################################################################### */ /* ACTIVE MESSAGES */ /* ##################################################################### */ int fh_move_request(gex_Rank_t node, firehose_region_t *new_reg, size_t r_new, firehose_region_t *old_reg, size_t r_old, void *context) { fhi_RegionPool_t *rpool; int b_num, i, r_alloc; FH_TABLE_ASSERT_UNLOCKED; FH_TABLE_LOCK; GASNETI_TRACE_PRINTF(C, ("Firehose move request: new=%d, old=%d", (int) r_new, (int) r_old)); /* Loop over the new regions to count the worst case number of * regions we will need to describe their unpinned subset. */ for (i=0, r_alloc=0; i < r_new; ++i) { r_alloc += FH_MIN_REGIONS_FOR_BUCKETS( FH_NUM_BUCKETS( new_reg[i].addr, new_reg[i].len)); } rpool = fhi_AllocRegionPool(r_alloc); b_num = fhi_AcquireLocalRegionsList(0, new_reg, r_new, rpool); GASNETI_TRACE_PRINTF(C, ("Firehose move request: pin new=%d", (int) rpool->buckets_num)); /* The next function may overcommit the fifo before the call to * actually pin new regions is issued. */ fhi_ReleaseLocalRegionsList(0, old_reg, r_old); fh_AdjustLocalFifoAndPin(node, rpool->regions, rpool->regions_num); fhi_InitLocalRegionsList(0, rpool->regions, rpool->regions_num); fhi_FreeRegionPool(rpool); FH_TABLE_UNLOCK; return b_num; } static void fh_dump_fhparams(void) { gasneti_console0_message("FH INFO","MaxPinnable Memory = %8u MB, %"PRIuPTR" bytes", FH_PRINTMB(fh_MaxPinnableMemory), fh_MaxPinnableMemory); gasneti_console0_message("FH INFO","Firehose M = %8u MB, %"PRIuPTR" bytes", FH_PRINTMB(fh_M), fh_M); gasneti_console0_message("FH INFO","Firehose MaxVictim = %8u MB, %"PRIuPTR" bytes", FH_PRINTMB(fh_Maxvictim), fh_Maxvictim); return; } void fh_dump_counters(void) { int i; /* Local counters */ gasneti_console_message("FH INFO","MaxVictimB=%d, Local[Only/Fifo]=[%d/%d]", fhc_MaxVictimBuckets, fhc_LocalOnlyBucketsPinned, fhc_LocalVictimFifoBuckets); /* Remote counters */ for (i = 0; i < gasneti_nodes; i++) { if (i == gasneti_mynode) continue; gasneti_console_message("FH INFO","RemoteBuckets on %2d = [Used=%6d/FIFO=%6d," "total=%6d,n_avail=%6d]", i, fhc_RemoteBucketsUsed[i], fhc_RemoteVictimFifoBuckets[i], fhc_RemoteBucketsM, FHI_AVAIL(i)); } } #endif gasnet-2025.8.0/other/firehose/firehose_internal.h0000664000175000017500000007126515142313673022233 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/firehose/firehose_internal.h $ * Description: Internal Header file * Copyright 2004, Christian Bell * Terms of use are as specified in license.txt */ #include #include /* gasnet mutex */ /* * If we are building against a threaded client, firehose-smp support needs to * be hooked in */ #ifdef GASNET_PAR #define FIREHOSE_SMP 1 #else #define FIREHOSE_SMP 0 #endif /* * The following define is used only when users do not specify * the amount of memory required for the MACVICTIM_M parameter. * A conduit can also provide a default. */ #ifndef FH_MAXVICTIM_TO_PHYSMEM_RATIO #define FH_MAXVICTIM_TO_PHYSMEM_RATIO 0.25 #endif /* Some conduits may be able to support running both the completion and remote * callbacks from within an AM Handler, in which case there is no need for the * client to make progress through firehose_poll(). */ #if defined(FIREHOSE_REMOTE_CALLBACK_IN_HANDLER) && \ defined(FIREHOSE_COMPLETION_IN_HANDLER) #define FH_POLL_NOOP #endif /* If unspecified in the firehose_fwd.h, we default to using gasneti_AMPoll(). */ #ifndef FIREHOSE_AMPOLL #define FIREHOSE_AMPOLL() gasneti_AMPoll() #endif extern int fh_verbose; /* * Locks */ #ifdef DEBUG_LOCAL_TABLE /* NOTE: not yet implemented for page */ extern void _fhi_debug_local_table(const char *, int line); #define fhi_debug_local_table() _fhi_debug_local_table(GASNETI_CURRENT_FUNCTION, __LINE__) extern int fhc_LocalReserved; /* space reserved for upcoming pin */ #else #define fhi_debug_local_table() ((void)0) #endif extern gasneti_mutex_t fh_table_lock; #define FH_TABLE_LOCK do { gasneti_mutex_lock(&fh_table_lock); \ gasneti_compiler_fence(); \ gasneti_assert(FHC_MAXVICTIM_BUCKETS_AVAIL >= 0); \ fhi_debug_local_table(); \ } while (0) #define FH_TABLE_UNLOCK do { gasneti_assert(FHC_MAXVICTIM_BUCKETS_AVAIL >= 0); \ fhi_debug_local_table(); \ gasneti_compiler_fence(); \ gasneti_mutex_unlock(&fh_table_lock); \ } while (0) #define FH_TABLE_ASSERT_LOCKED gasneti_mutex_assertlocked(&fh_table_lock) #define FH_TABLE_ASSERT_UNLOCKED gasneti_mutex_assertunlocked(&fh_table_lock) #ifndef FH_POLL_NOOP /* Don't need a pollq_lock when we don't poll */ extern gasneti_mutex_t fh_pollq_lock; #define FH_POLLQ_LOCK gasneti_mutex_lock(&fh_pollq_lock) #define FH_POLLQ_UNLOCK gasneti_mutex_unlock(&fh_pollq_lock) #else #define FH_POLLQ_LOCK !!! error - no firehose polling !!! #define FH_POLLQ_UNLOCK !!! error - no firehose polling !!! #endif /* * INIT FLAGS * fhi_InitFlags - * Holds value of 'flags' argument passed to firehose_init(). * This makes these flags available to the firehose_fini and * to the _init and _fini plugins. */ extern uint32_t fhi_InitFlags; /* * LOCAL COUNTERS * XXX/PHH: actually counts of private_t's, rather than bucket_t's * * fhc_LocalOnlyBucketsPinned - incrementing counter * Amount of buckets pinned by the local node or in the FIFO * (localref > 0 OR remoteref == 0). This count must be less than * or equal to fhc_MaxVictimBuckets in order to avoid deadlocks. * * fhc_LocalVictimFifoBuckets - incrementing counter * Amount of buckets currently contained in the Local Victim FIFO. * * fhc_MaxVictimBuckets - static count * Maximum amount of victims that may be pinned other than M. * fhc_LocalOnlyBucketsPinned <= fhc_MaxVictimBuckets */ extern int fhc_LocalOnlyBucketsPinned; extern int fhc_LocalVictimFifoBuckets; extern int fhc_MaxVictimBuckets; #define FHC_MAXVICTIM_BUCKETS_AVAIL \ (fhc_MaxVictimBuckets - fhc_LocalOnlyBucketsPinned) /* * REMOTE COUNTERS * * fhc_RemoteBucketsM - static count * Amount of per-node firehoses that can be mapped as established by the * firehose 'M' parameter. * * fhc_MaxRemoteBuckets - static count * Maximum number of buckets that can be pinned in a single AM call. * * fhc_RemoteBucketsUsed[0..nodes-1] - Array of incrementing counters * Amount of buckets currently used by the current node. * * fhc_RemoteVictimFifoBuckets[0..nodes-1] - Array of incrementing counters * Available amount of remote buckets that can be used without sending * replacement buckets. * */ extern int fhc_RemoteBucketsM; extern int fhc_MaxRemoteBuckets; extern int *fhc_RemoteBucketsUsed; extern int *fhc_RemoteVictimFifoBuckets; #define FHI_REMOTE_AVAIL(node) \ ( \ (fhc_RemoteBucketsM - fhc_RemoteBucketsUsed[node]) /* Free energy */ \ + fhc_RemoteVictimFifoBuckets[node] /* FIFO */ \ ) #ifndef FH_BUCKET_SIZE #define FH_BUCKET_SIZE GASNET_PAGESIZE #endif #ifndef FH_BUCKET_SHIFT #define FH_BUCKET_SHIFT GASNETT_PAGESHIFT #endif /* Utility Macros */ #define FH_CACHE_LINE_BYTES GASNETI_CACHE_LINE_BYTES #define FH_PAGE_MASK (GASNET_PAGESIZE-1) #define FH_ADDR_ALIGN(addr) (GASNETI_ALIGNDOWN(addr, FH_BUCKET_SIZE)) #define FH_SIZE_ALIGN(addr,len) (GASNETI_ALIGNUP(addr+len, FH_BUCKET_SIZE)-\ GASNETI_ALIGNDOWN(addr, FH_BUCKET_SIZE)) #define FH_NUM_BUCKETS(addr,len)(FH_SIZE_ALIGN(addr,len)>>FH_BUCKET_SHIFT) #define FH_ASSERT_BUCKET_ADDR(bucket) (gasneti_assert((bucket) % FH_BUCKET_SIZE == 0)) #if !defined(GASNET_MAXNODES) #error "GASNET_MAXNODES undefined" #elif GASNET_MAXNODES <= GASNET_PAGESIZE #define FH_KEY_PACKED 1 typedef uintptr_t fh_key_t; #define FH_KEYMAKE(addr,node) ((addr) | (node)) #define FH_KEY_EQ(x,y) ((x) == (y)) #define FH_KEY2INT(x) ((intptr_t)(x)) #define FH_NODE(priv) ((*(fh_key_t*)(priv)) & FH_PAGE_MASK) #define FH_BADDR(priv) ((*(fh_key_t*)(priv)) & ~FH_PAGE_MASK) #else #define FH_KEY_STRUCT 1 typedef struct { uintptr_t addr; uintptr_t node; /* Might instead hold len in region case */ } fh_key_t; GASNETI_INLINE(fh_keymake) fh_key_t fh_keymake(uintptr_t addr, gex_Rank_t node) { fh_key_t key; key.addr = addr; key.node = node; return key; } #define FH_KEYMAKE(addr,node) fh_keymake(addr,node) #define FH_KEY_EQ(x,y) (((x).addr == (y).addr) && ((x).node == ((y).node))) #define FH_KEY2INT(x) ((intptr_t)(x).addr ^ (intptr_t)(x).node) #define FH_NODE(priv) (((fh_key_t*)(priv))->node) #define FH_BADDR(priv) (((fh_key_t*)(priv))->addr) #endif /* fh_bucket_t * * The firehose bucket type is a descriptor for a single page (or multiple amount * of pages according to the ability for the underlying memory allocator to * allocate in multiples of GASNET_PAGESIZE). * * The current implementation equates one bucket to one page. * * Under both firehose-page and firehose-region, bucket descriptors for all the * buckets contained in the region to be pinned are added to the firehose hash * table (for both remote and local pins). */ #if PLATFORM_ARCH_32 typedef uint16_t fh_refc_uint_t; #else typedef uint32_t fh_refc_uint_t; #endif /* The 'refcount' type is stored as a union with the fh_tqe_prev field * and must therefore be the same size as a pointer */ typedef struct _fh_refc_t { fh_refc_uint_t refc_l; fh_refc_uint_t refc_r; } fh_refc_t; /* * Bucket and private types */ #if GASNET_DEBUG #define DEBUG_BUCKETS #endif #ifdef DEBUG_BUCKETS typedef enum { fh_local_fifo, fh_remote_fifo, fh_pending, fh_pending_commit, fh_used, fh_unused } fh_bstate_t; #define FH_BSTATE_ASSERT(entry, state) gasneti_assert((entry)->fh_state == state) #define FH_BSTATE_SET(entry, state) (entry)->fh_state = state #else #define FH_BSTATE_ASSERT(entry, state) #define FH_BSTATE_SET(entry, state) #endif struct _fh_bucket_t; /* forward decl of type */ struct _firehose_private_t { fh_key_t fh_key; /* cached key for hash table */ void *fh_next; /* linked list in hash table */ /* _must_ be in this order */ /* FIFO and refcount */ firehose_private_t *fh_tqe_next; /* -1 when not in FIFO, NULL when end of list, else next pointer in FIFO */ union { firehose_private_t **fh_tqe_prev; /* refcount when not in FIFO, prev pointer otherwise */ fh_refc_t fh_refc; } u; #ifdef DEBUG_BUCKETS fh_bstate_t fh_state; int prepinned; #endif /* Region-specific additional fields: */ #ifdef FIREHOSE_REGION size_t len; struct _fh_bucket_t *bucket; /* pointer to first bucket */ int visible; #ifdef FIREHOSE_CLIENT_T firehose_client_t client; #endif /* CLIENT_T */ #endif /* REGION */ }; #define FH_BUCKET_REFC(priv) (&(priv)->u.fh_refc) /* Local and Remote buckets can be in various states. * * Local buckets can be in either of these two states: * 1. in FIFO (fh_tqe_next != FH_USED_TAG) * 2. in USE (fh_tqe_next == FH_USED_TAG) * The NEW state indicates that the bucket is in the process of * being pinned. * * Remote buckets can be in either of these three states * 1. in USE (fh_tqe_next == FH_USED_TAG) * a) COMMITTED (refcounts represent a real value) * b) PENDING (LOCAL reference count == FH_REMOTE_PENDING_TAG) * c) ** For SMP-page only: * PENDING COMMIT (LOCAL reference count == * FH_REMOTE_PENDING_UNCOMMITTED_TAG) * 2. in FIFO (fh_tqe_next != FH_USED_TAG) */ /* * Local firehose states * This assumes that the remote reference count will never exceed the tag * * Tags used for FH_LOCAL_STATE() */ #define FH_LOCAL_PENDING_TAG ((firehose_private_t *) -1) #define FH_LOCAL_INUSE_TAG ((firehose_private_t *) -2) #define FH_LOCAL_FIFO_TAG ((firehose_private_t *) -3) #define FH_COMPLETION_END_TAG ((firehose_private_t *) -4) #define FH_HAS_COMPLETION_CALLBACK(priv) ((priv)->fh_tqe_next != NULL && \ (priv)->fh_tqe_next <= FH_COMPLETION_END_TAG) #define FH_LOCAL_STATE(priv) ((priv)->fh_tqe_next < FH_LOCAL_INUSE_TAG \ ? FH_LOCAL_FIFO_TAG : (priv)->fh_tqe_next) #define FH_IS_LOCAL_FIFO(priv) ((priv)->fh_tqe_next < FH_LOCAL_INUSE_TAG) #define FH_IS_LOCAL_PENDING(priv) ((priv)->fh_tqe_next == FH_LOCAL_PENDING_TAG) #define FH_IS_LOCAL_INUSE(priv) ((priv)->fh_tqe_next == FH_LOCAL_INUSE_TAG) #define FH_SET_LOCAL_FIFO(priv) (FH_LOCAL_STATE(priv) = \ FH_LOCAL_STATE(priv) >= FH_LOCAL_INUSE_TAG ? NULL : FH_LOCAL_STATE(priv)) #define FH_SET_LOCAL_PENDING(priv) (priv)->fh_tqe_next = FH_LOCAL_PENDING_TAG #define FH_SET_LOCAL_INUSE(priv) (priv)->fh_tqe_next = FH_LOCAL_INUSE_TAG /* * Remote firehose states * * WARNING: These states unfortunately make the code very fragile */ #define FH_REMOTE_INUSE_TAG ((firehose_private_t *) -1) #define FH_REMOTE_PENDING_TAG ((fh_refc_uint_t) -1) #define FH_REMOTE_PENDING_UNCOMMITTED_TAG ((fh_refc_uint_t) -2) #define FH_IS_REMOTE_FIFO(priv) ((priv)->fh_tqe_next != FH_REMOTE_INUSE_TAG && \ FH_BUCKET_REFC(priv)->refc_l < FH_REMOTE_PENDING_UNCOMMITTED_TAG) #define FH_IS_REMOTE_INUSE(priv) ((priv)->fh_tqe_next == FH_REMOTE_INUSE_TAG && \ FH_BUCKET_REFC(priv)->refc_l == 0) #define FH_IS_REMOTE_PENDING(priv) (FH_BUCKET_REFC(priv)->refc_l==FH_REMOTE_PENDING_TAG) #define FH_IS_REMOTE_PENDING_UNCOMMITTED(priv) \ (FH_BUCKET_REFC(priv)->refc_l==FH_REMOTE_PENDING_UNCOMMITTED_TAG) #define FH_SET_REMOTE_INUSE(priv) do { (priv)->fh_tqe_next = FH_REMOTE_INUSE_TAG; \ FH_BUCKET_REFC(priv)->refc_l = 0; } while (0) #define FH_SET_REMOTE_PENDING(priv) FH_BUCKET_REFC(priv)->refc_l = FH_REMOTE_PENDING_TAG #define FH_SET_REMOTE_PENDING_UNCOMMITTED(priv) \ FH_BUCKET_REFC(priv)->refc_l = FH_REMOTE_PENDING_UNCOMMITTED_TAG /* * Both -page and -region implement these functions. * * Reusable functions are found in firehose.c and flavour-specific * functions should be in firehose_page.c and firehose_region.c * */ /* ##################################################################### */ void fh_init_plugin(uintptr_t max_pinnable_memory, size_t max_regions, size_t max_region_size, const firehose_region_t *prepinned_regions, size_t num_prepinned, firehose_info_t *info); void fh_fini_plugin(void); /* ##################################################################### */ /* Request type freelists (COMMON) */ /* ##################################################################### */ /* Flags */ #define FH_FLAG_FHREQ 0x01 /* firehose supplied the request_t */ #define FH_FLAG_PINNED 0x02 #define FH_FLAG_PENDING 0x04 /* Used in -PAGE only */ #define FH_FLAG_INFLIGHT 0x08 /* ##################################################################### */ /* Firehose Hash Table Utility (COMMON, firehose_hash.c) */ /* The hash table utility functions can be used for hashing buckets and */ /* regions (in firehose-region). */ /* ##################################################################### */ struct _fh_hash_t; typedef struct _fh_hash_t fh_hash_t; #if 0 /* We now #include into firehose_{page,region}.c */ fh_hash_t * fh_hash_create(size_t entries); void fh_hash_destroy(fh_hash_t *hash); void * fh_hash_find(fh_hash_t *hash, fh_key_t key); void * fh_hash_insert(fh_hash_t *hash, fh_key_t key, void *newval); void * fh_hash_next(fh_hash_t *hash, void *val); void fh_hash_replace(fh_hash_t *hash, void *val, void *newval); void fh_hash_apply(fh_hash_t *hash, void (*fn)(void *val, void *arg), void *arg); #endif /* ##################################################################### */ /* FIFO (local and remote) management operations (COMMON, firehose.c) */ /* ##################################################################### */ /* Return a descriptor given an existing private_t */ fh_refc_t * fh_priv_release_local(int local_ref, firehose_private_t *); fh_refc_t * fh_priv_release_remote(gex_Rank_t node, firehose_private_t *); /* Acquire and exisiting private_t (increments refcount) */ fh_refc_t * fh_priv_acquire_local(int local_ref, firehose_private_t *); fh_refc_t * fh_priv_acquire_remote(gex_Rank_t node, firehose_private_t *); /* Wait for local firehoses to release/reuse */ int fh_WaitLocalFirehoses(int count, firehose_region_t *region); /* Wait for remote firehoses to release/reuse */ int fh_WaitRemoteFirehoses(gex_Rank_t node, int count, firehose_region_t *region); /* Adjust for possible overcommit and then pin */ void fh_AdjustLocalFifoAndPin(gex_Rank_t node, firehose_region_t *reg_pin, size_t pin_num); /* ##################################################################### */ /* fhi_RegionPool_t (COMMON, firehose.c) */ /* ##################################################################### */ typedef struct _fhi_RegionPool_t { /* * Used internally */ size_t len; struct _fhi_RegionPool_t *fh_tqe_next; /* * User modifiable fields */ firehose_region_t *regions; size_t regions_num; size_t buckets_num; /* * Pad the struct to inhibit false sharing */ uint8_t _pad[MAX(1,(ssize_t)(FH_CACHE_LINE_BYTES- 3*sizeof(size_t)-2*sizeof(void*)))]; } fhi_RegionPool_t; /* Default size, in regions, of region pool entries */ #if defined(FIREHOSE_PAGE) /* Used to gather up to one region per page */ #define FH_REGIONPOOL_DEFAULT_COUNT 32768 #elif defined(FIREHOSE_REGION) /* Until page accounting is done, always use 1 region */ #define FH_REGIONPOOL_DEFAULT_COUNT 1 #endif extern fhi_RegionPool_t * fhi_AllocRegionPool(int count); extern void fhi_FreeRegionPool(fhi_RegionPool_t *rpool); /* ##################################################################### */ /* Misc functions (specific to page and region) */ /* ##################################################################### */ int fh_region_ispinned(gex_Rank_t node, uintptr_t addr, size_t len); int fh_region_partial(gex_Rank_t node, uintptr_t *addr_p, size_t *len_p); /* ##################################################################### */ /* Misc functions (COMMON, firehose.c) */ /* ##################################################################### */ int64_t fh_getenv(const char *var, unsigned long multiplier, int *is_dflt); /* Common Queue Macros for Firehose FIFO and Local Bucket FIFO */ #define FH_TAILQ_HEAD(name, type) \ struct name { \ struct type *fh_tqh_first; \ struct type **fh_tqh_last; \ } #define FH_STAILQ_HEAD(name,type) FH_TAILQ_HEAD(name,type) /* QUEUE functions (based on the BSD TAILQ and STAILQ macros of * /usr/include/sys/queue.h) */ #define FH_TAILQ_FIRST(head) ((head)->fh_tqh_first) #define FH_TAILQ_LAST(head) ((head)->fh_tqh_last) #define FH_TAILQ_EMPTY(head) ((head)->fh_tqh_first == NULL) #define FH_TAILQ_NEXT(elem) ((elem)->fh_tqe_next) #define FH_TAILQ_PREV(elem) ((elem)->u.fh_tqe_prev) #define FH_STAILQ_FIRST(head) ((head)->fh_tqh_first) #define FH_STAILQ_LAST(head) ((head)->fh_tqh_last) #define FH_STAILQ_EMPTY(head) ((head)->fh_tqh_first == NULL) #define FH_STAILQ_NEXT(elem) ((elem)->fh_tqe_next) /* Doubles/single list initialization */ #define FH_STAILQ_HEAD_INITIALIZER(head) { NULL, &(head).fh_tqh_first } #define FH_TAILQ_HEAD_INITIALIZER(head) { NULL, &(head).fh_tqh_first } #define FH_TAILQ_INIT(head) do { \ FH_TAILQ_FIRST((head)) = NULL; \ FH_TAILQ_LAST(head) = &FH_TAILQ_FIRST((head)); \ } while (0) #define FH_STAILQ_INIT(head) FH_TAILQ_INIT(head) /* Double/single list tail addition */ #define FH_TAILQ_INSERT_TAIL(head, elem) do { \ FH_TAILQ_NEXT(elem) = NULL; \ FH_TAILQ_PREV(elem) = FH_TAILQ_LAST(head); \ *(FH_TAILQ_LAST(head)) = (elem); \ FH_TAILQ_LAST(head) = &FH_TAILQ_NEXT(elem); \ } while (0) #define FH_STAILQ_INSERT_TAIL(head, elem) do { \ FH_STAILQ_NEXT(elem) = NULL; \ *(FH_STAILQ_LAST(head)) = (elem); \ FH_STAILQ_LAST(head) = &FH_STAILQ_NEXT(elem); \ } while (0) /* Double/single list head addition */ #define FH_TAILQ_INSERT_HEAD(head, elem) do { \ if ((FH_TAILQ_NEXT(elem) = FH_TAILQ_FIRST(head)) == NULL) \ FH_TAILQ_LAST(head) = &FH_TAILQ_NEXT(elem); \ else \ FH_TAILQ_PREV(FH_TAILQ_FIRST(head)) = \ &FH_TAILQ_NEXT(elem); \ FH_TAILQ_FIRST(head) = (elem); \ FH_TAILQ_PREV(elem) = &FH_TAILQ_FIRST(head); \ } while (0) #define FH_STAILQ_INSERT_HEAD(head, elem) do { \ if ((FH_STAILQ_NEXT(elem) = FH_STAILQ_FIRST(head)) == NULL) \ FH_STAILQ_LAST(head) = &FH_STAILQ_NEXT(elem); \ FH_STAILQ_FIRST(head) = (elem); \ } while (0); #define FH_STAILQ_MERGE(head1, head2) do { \ *(FH_STAILQ_LAST(head1)) = FH_STAILQ_FIRST(head2); \ FH_STAILQ_LAST(head1) = FH_STAILQ_LAST(head2); \ } while (0) /* Double remove anywhere in the list */ #define FH_TAILQ_REMOVE(head, elem) do { \ if (FH_TAILQ_NEXT(elem) != NULL) \ FH_TAILQ_PREV(FH_TAILQ_NEXT(elem)) = \ FH_TAILQ_PREV(elem); \ else \ FH_TAILQ_LAST(head) = FH_TAILQ_PREV(elem); \ *(FH_TAILQ_PREV(elem)) = FH_TAILQ_NEXT(elem); \ } while (0) /* Single remove from head only */ #define FH_STAILQ_REMOVE_HEAD(head) do { \ if ((FH_STAILQ_FIRST((head)) = \ FH_STAILQ_NEXT(FH_STAILQ_FIRST((head)))) == NULL) \ FH_STAILQ_LAST(head) = &FH_STAILQ_FIRST(head); \ } while (0) /* Double/single foreach over the list */ #define FH_TAILQ_FOREACH(head, var) \ for ((var) = FH_TAILQ_FIRST(head); (var) != NULL; \ (var) = FH_TAILQ_NEXT(var)) #define FH_STAILQ_FOREACH(head, var) \ for ((var) = FH_STAILQ_FIRST(head); (var) != NULL; \ (var) = FH_STAILQ_NEXT(var)) /* ##################################################################### */ /* Firehose/Bucket FIFOs and Callback Polling queues */ /* ##################################################################### */ FH_TAILQ_HEAD(_fh_fifoq_t, _firehose_private_t); typedef struct _fh_fifoq_t fh_fifoq_t; FH_STAILQ_HEAD(_fh_pollq_t, _fh_callback_t); typedef struct _fh_pollq_t fh_pollq_t; /* There is also a pollqueue which is drained by firehose_poll */ #ifndef FH_POLL_NOOP extern fh_pollq_t fh_CallbackFifo; #endif /* * There is a queue under FIREHOSE_SMP for local buckets seen as pending while * in an AM handler */ #if defined(FIREHOSE_PAGE) && FIREHOSE_SMP FH_TAILQ_HEAD(_fh_locpendq_t, _fh_remote_callback_t); typedef struct _fh_locpendq_t fh_locpendq_t; extern fh_locpendq_t fhsmp_LocalPendingList; extern void fhsmp_ServiceLocalPendingList(void); #endif /* Each node has a FirehoseFifo */ extern fh_fifoq_t *fh_RemoteNodeFifo; extern fh_fifoq_t fh_LocalFifo; /* This type is used to abstract the use of different callback types in the * same fifo. The 'flags' parameter is used as a tag to differentiate both * types. */ typedef struct _fh_callback_t { uint32_t flags; struct _fh_callback_t *fh_tqe_next; } fh_callback_t; #define FH_CALLBACK_TYPE_REMOTE 0x01 #define FH_CALLBACK_TYPE_COMPLETION 0x02 #define FH_CALLBACK_TYPE_PENDING 0x04 typedef struct _fh_remote_callback_t { uint32_t flags; struct _fh_remote_callback_t *fh_tqe_next; union { struct _fh_remote_callback_t **fh_tqe_prev; /* used in locpendq */ uintptr_t unused; } u; gex_Rank_t node; firehose_remotecallback_args_t args; firehose_region_t *pin_list; size_t pin_list_num; size_t reply_len; void *context; } fh_remote_callback_t; typedef struct _fh_completion_callback_t { uint32_t flags; struct _fh_completion_callback_t *fh_tqe_next; firehose_completed_fn_t callback; firehose_request_t *request; void *context; } fh_completion_callback_t; #define FH_COMPLETION_END ((fh_completion_callback_t *)(FH_COMPLETION_END_TAG)) fh_completion_callback_t * fh_alloc_completion_callback(void); void fh_free_completion_callback(fh_completion_callback_t *rc); /* ##################################################################### */ /* Firehose internal pinning functions */ /* ##################################################################### */ /* See documentation in firehose_page.c */ void fh_acquire_local_region(firehose_request_t *); void fh_commit_try_local_region(firehose_request_t *); void fh_release_local_region(firehose_request_t *); void fh_acquire_remote_region(firehose_request_t *req, firehose_completed_fn_t callback, void *context, uint32_t flags, firehose_remotecallback_args_fn_t args_fn); void fh_commit_try_remote_region(firehose_request_t *); void fh_release_remote_region(firehose_request_t *); int fh_move_request(gex_Rank_t node, firehose_region_t *new_reg, size_t r_new, firehose_region_t *old_reg, size_t r_old, void *context); int fh_find_pending_callbacks(gex_Rank_t node, firehose_region_t *region, int nreg, void *context, fh_pollq_t *PendQ); /* ##################################################################### */ /* Firehose AM-related things (page/region independent) */ /* ##################################################################### */ void fh_send_firehose_reply(fh_remote_callback_t *); extern gex_AM_Entry_t fh_am_handlers[]; /* Initial value of index for gasnet registration */ #define _hidx_fh_am_move_reqh 0 #define _hidx_fh_am_move_reph 0 /* Index into the fh_am_handlers table to obtain the gasnet registered index */ #define _fh_hidx_fh_am_move_reqh 0 #define _fh_hidx_fh_am_move_reph 1 #define fh_handleridx(reqh) (fh_am_handlers[ _fh_hidx_ ## reqh ].gex_index) /* ##################################################################### */ /* FIFO (local and remote) management operations (page/region specific) */ /* ##################################################################### */ int fh_FreeVictim(int count, firehose_region_t *reg, fh_fifoq_t *fifo_head); GASNETI_INLINE(fhi_FreeVictimLocal) int fhi_FreeVictimLocal(int count, firehose_region_t *reg) { gasneti_assert(count <= fhc_LocalVictimFifoBuckets); return fh_FreeVictim(count, reg, &fh_LocalFifo); } GASNETI_INLINE(fhi_FreeVictimRemote) int fhi_FreeVictimRemote(gex_Rank_t node, int count, firehose_region_t *reg) { gasneti_assert(count <= fhc_RemoteVictimFifoBuckets[node]); return fh_FreeVictim(count, reg, &fh_RemoteNodeFifo[node]); } /* How many buffers (of buffers) to allocate to use as bucket descriptors in * hash table */ #define FH_BUCKETS_BUFS 1024 /* * Macros to implement do/while and foreach over the region. When a reference * to 'end' is made, it refers to 'start + len - 1'. */ #define FH_FOREACH_BUCKET(start,end,bucket_addr) \ for ((bucket_addr) = (start); (bucket_addr) <= (end); \ (bucket_addr) += FH_BUCKET_SIZE) #define FH_FOREACH_BUCKET_REV(start,end,bucket_addr) \ for ((bucket_addr) = FH_ADDR_ALIGN(end); \ (bucket_addr) >= (start); \ (bucket_addr) -= FH_BUCKET_SIZE) #define FH_DO_BUCKET(start,bucket_addr) \ (bucket_addr) = (start); do { #define FH_WHILE_BUCKET(end,bucket_addr) \ } while ((bucket_addr) <= (end) && \ (bucket_addr) += FH_BUCKET_SIZE) #define FH_FOREACH_BUCKET_IN_POOL(i,pool,bucket_addr,bucket_end) \ for (i=0; i < pool->regions_num; i++) \ for (bucket_addr = pool->regions[i].addr, \ bucket_end = pool->regions[i].addr + \ pool->regions[i].len - 1; \ bucket_addr <= bucket_end; bucket_addr += FH_BUCKET_SIZE) /* * Macros to copy client_t to and from region/request */ #ifdef FIREHOSE_CLIENT_T #define FH_COPY_REGION_TO_REQUEST(req, reg) do { \ (req)->addr = (uintptr_t) (reg)->addr; \ (req)->len = (size_t) (reg)->len; \ memcpy(&((req)->client), &((reg)->client), \ sizeof(firehose_client_t)); \ } while (0) #define FH_COPY_REQUEST_TO_REGION(reg, req) do { \ (reg)->addr = (uintptr_t) (req)->addr; \ (reg)->len = (size_t) (req)->len; \ memcpy(&((reg)->client), &((req)->client), \ sizeof(firehose_client_t)); \ } while (0) #else #define FH_COPY_REGION_TO_REQUEST(req, reg) do { \ (req)->addr = (uintptr_t) (reg)->addr; \ (req)->len = (size_t) (reg)->len; \ } while (0) #define FH_COPY_REQUEST_TO_REGION(reg, req) do { \ (reg)->addr = (uintptr_t) (req)->addr; \ (reg)->len = (size_t) (req)->len; \ } while (0) #endif #if GASNET_TRACE #ifdef FIREHOSE_REGION /* Total hack: * FH_NODE(priv) doesn't work in firehose-region because the * "private_t" doesn't have the node info in the "key" field. * This hack lets us grab the info from the "key" field of the first * bucket w/o exposing the bucket_t outside of firehose_region.c */ #define FH_PRIV_NODE(p) ((p)->bucket ? FH_NODE((p)->bucket) : GEX_RANK_INVALID) #else #define FH_PRIV_NODE(p) FH_NODE(p) #endif #define FH_TRACE_BUCKET(bd, bmsg) \ do { \ char msg[64]; \ fh_refc_t *rp = FH_BUCKET_REFC(bd); \ if (FH_PRIV_NODE(bd) != gasneti_mynode) { \ if (FH_IS_REMOTE_PENDING(bd)) \ sprintf(msg, "rrefc=%d PENDING", \ rp->refc_r); \ else if (FH_IS_REMOTE_FIFO(bd)) \ sprintf(msg, "IN FIFO"); \ else \ sprintf(msg, "rrefc=%d", rp->refc_r); \ } \ else { \ if (FH_IS_LOCAL_FIFO(bd)) \ sprintf(msg, "IN FIFO"); \ else \ sprintf(msg, "rrefc=%d lrefc=%d", \ rp->refc_r, rp->refc_l); \ } \ GASNETI_TRACE_PRINTF(C, \ ("Firehose Bucket %s %s node=%d,addr=" \ GASNETI_LADDRFMT",%s", #bmsg, \ FH_PRIV_NODE(bd) == gasneti_mynode ? "Local ":"Remote", \ (int) FH_PRIV_NODE(bd), \ GASNETI_LADDRSTR(FH_BADDR(bd)), msg)); \ } while (0) #define FH_NUMPINNED_DECL int _fh_numpinned = 0 #define FH_NUMPINNED_INC _fh_numpinned++ #define FH_NUMPINNED_TRACE_LOCAL GASNETI_TRACE_EVENT_VAL(C, \ BUCKET_LOCAL_PINS, _fh_numpinned) #define FH_NUMPINNED_TRACE_REMOTE GASNETI_TRACE_EVENT_VAL(C, \ BUCKET_REMOTE_PINS, _fh_numpinned) #else #define FH_TRACE_BUCKET(bd, bmsg) #define FH_NUMPINNED_DECL #define FH_NUMPINNED_INC #define FH_NUMPINNED_TRACE_LOCAL #define FH_NUMPINNED_TRACE_REMOTE #endif /* * Conduit Features gm-conduit vapi-conduit sci-conduit * ------------------------------------------------------------------ * flavour page region ? * client_t no yes yes * bind callback no yes yes * unbind callback no yes yes * * Callbacks gm-conduit vapi-conduit sci-conduit * ------------------------------------------------------------------ * move callback unpins/pins repins ? unpins, * selects segmentId, * stores sci_local_segment_t * * bind callback n/a ? connects to segmentId, * stores sci_remote_segment_t * * unbind callback n/a ? disconnects sci_remote_segment_t */ gasnet-2025.8.0/other/firehose/Makefile.am0000664000175000017500000000133215142313673020402 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/other/firehose/Makefile.am $ # Description: Makefile for GASNet other/firehose # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt # No objects are built here, but we need a proper Makefile.am # to ensure the built firehose.mak is handled correctly. all: firehose.mak AUTOMAKE_OPTIONS = foreign 1.4 SUBDIRS = . EXTRA_DIST = \ firehose.c \ firehose_hash.c \ firehose_page.c \ firehose_region.c \ firehose.h \ firehose_trace.h \ firehose_internal.h \ firehose_fwd_sample.h \ firehose-local.txt \ firehose-remote.txt gasnet-2025.8.0/other/firehose/firehose-local.txt0000664000175000017500000002060015142313673022002 0ustar alastairalastair/* Firehose-local algorithm by: Dan Bonachea, Christian Bell and Paul Hargrove for deadlock-free, thread-safe management of firehose-local resources using optimistic concurrency control Known bugs/issues ----------------- 1) To avoid race between unlock-move-lock (keeping table and conduit consistent), we need a TRANSIT state (used for both "in bound" and "out bound" buckets). If the local (non-AM) code hits such a bucket then it must UPYL until it is either pinned or unpinned. In the case that the AM handler encounters one we need a new queue to deffer the the handler's actual work. This queue is serviced soon after the table is updated (except in the handler). WE NEED TO WRITE THE HANDLER CODE EXAMPLE TOO! 2) We need to worry about the E->D state transition since it requires a ++LOnly. To keep FHC_MAXVICTIM_BUCKETS_AVAIL > 0 we may need to UPYL even if we hit, if the bucket we hit is in state E (refc_r > 0, refc_l == 0) and FHC_MAXVICTIM_BUCKETS_AVAIL == 0. I think this is another thing to check for when making our first pass over the bucket table to estimate how many "new" buckets we will need. Note that we already got WaitLocalBucketsToPin correct with respect to the B->E and D->E state transitions which will raise FHC_MAXVICTIM_BUCKETS_AVAIL. */ int fhi_CheckLocalBucketsToPin(int b_num, fhi_RegionPool_t *unpin_p) { int b_remain, b_avail; FH_TABLE_ASSERT_LOCKED; assert(FHC_MAXVICTIM_BUCKETS_AVAIL >= 0); b_avail = MIN(b_num, FHC_MAXVICTIM_BUCKETS_AVAIL); fhc_LocalOnlyBucketsPinned += b_avail; b_remain = b_num - b_avail; if (b_remain == 0) return 0; GASNETI_TRACE_PRINTF(C, ("Firehose Polls Local pinned needs to recover" " %d buckets from FIFO (currently %d buckets)", b_remain, fhc_LocalVictimFifoBuckets)); b_avail = MIN(b_remain, fhc_LocalVictimFifoBuckets); if (b_avail > 0) { int r_freed; firehose_region_t *reg; /* Append to unpin_p */ reg = &(unpin_p->region[unpin_p->regions_num]); /* Adjusts LocalVictimFifoBuckets count */ r_freed = fhi_FreeVictimLocal(b_avail, reg); fhc_LocalVictimFifoBuckets -= b_avail; b_remain -= b_avail; unpin_p->regions_num += r_freed; } assert(FHC_MAXVICTIM_BUCKETS_AVAIL >= 0); return b_remain; } void fhi_WaitLocalBucketsToPin(int b_num, fhi_RegionPool_t *unpin_p) { int b_remain; b_remain = b_num; while ((b_remain = fhi_CheckLocalBucketsToPin(b_remain, unpin_p))) { FH_TABLE_UNLOCK; gasnet_AMPoll(); FH_TABLE_LOCK; } assert(FHC_MAXVICTIM_BUCKETS_AVAIL >= 0); } int fhi_local_da = 0; pthread_cond_t fhi_local_da_cv = PTHREAD_COND_INITIALIZER; void local_pin_foo(uintptr_t addr, size_t len) { /* Yes, I really do mean static here (not useful otherwise): */ static pthread_cond_t fhi_transit_cv = PTHREAD_COND_INITIALIZER; int my_da = 0; int outer_count = 0; int b_total, b_new; int outer_limit, inner_limit; fhi_RegionPool_t *pin_p, *unpin_p; b_total = FH_NUM_BUCKETS(addr, len); assert(b_total <= fhc_MaxVictimBuckets); outer_limit = (gasnete_approx_num_threads() - 1); inner_limit = (b_total / 10); /* ??? */ #if CALLER_HOLDS_TABLE_LOCK FH_TABLE_ASSERT_LOCKED; #else FH_TABLE_LOCK; #endif pin_p = fhi_AllocRegionPool(FH_MIN_REGIONS_FOR_BUCKETS(b_total)); unpin_p = NULL; again: FH_TABLE_ASSERT_LOCKED; outer_count++; if_pf (my_da) { /* We already "own" fhi_local_da, no checks needed */ assert(fhi_local_da); } else if_pf (fhi_local_da) { /* Somebody else "owns" fhi_local_da, wait for them to finish */ do { pthread_cond_wait(&fhi_local_da_cv, &fh_table_lock); } while (fhi_local_da); /* loop until we win the race */ /* Do NOT reset outer_count here - * If 3 threads were contending before fhi_local_da was set, then * we still have 2 threads now and deadlock might still * be a problem. By reseting outer_count at this point * we could delay detection of any remaining deadlock. * Note there might be threads stalled by the da condition that are * not involved in the starvation condition (e.g. pure hits * on remotely-pinned buckets) - but once they leave the above * loop they're guaranteed to grab their hits without rechecking * fhi_local_da, and therefore won't get caught in a second da * stall if one occurs. */ } else if_pf (outer_count > outer_limit) { /* take ownership of fhi_local_da */ my_da = fhi_local_da = 1; /* give others a chance to release resources */ FH_TABLE_UNLOCK; gasnet_AMPoll(); gasneti_sched_yield(); gasnet_AMPoll(); FH_TABLE_LOCK; } /* fhi_LocalTryToAcquire() = update table for all the buckets we need return <0 if we hit one or more TRANSIT buckets otherwise return the number of new buckets needed (that we set to TRANSIT) */ b_new = fhi_LocalTryToAcquire(addr, len, pin_p); if_pt (b_new >= 0) { /* We saw no TRANSITs, and have put b_new into TRANSIT. We may need to acquire as many as b_new firehoses to unpin while still respecting the limit (LocalOnlyPinned <= MaxVictimBuckets). That is done by looping over calls to fhi_CheckLocalBucketsToPin(). */ int inner_count = 0; int b_remain; unpin_p = fhi_AllocRegionPool(b_new); /* fhi_CheckLocalBucketsToPin() - try to find b_new buckets (FIFO victims or unused buckets during startup), fill in unpin list for selected victims, return how many more buckets are still needed. */ b_remain = fhi_CheckLocalBucketsToPin(b_new, unpin_p); if_pf (b_remain) { do { FH_TABLE_UNLOCK; gasnet_AMPoll(); gasneti_sched_yield(); FH_TABLE_LOCK; inner_count++; if_pf (my_da) { /* We already "own" fhi_local_da, no checks needed */ assert(fhi_local_da); } else if_pf (fhi_local_da) { /* Somebody else "owns" fhi_local_da. We must back off and start from scratch. */ UNWIND(addr, len, pin_p, unpin_p, b_remain); fhi_FreeRegionPool(unpin_p); unpin_p = NULL; goto again; /* will recheck for (fhi_local_da != 0) */ } else if_pf (inner_count > inner_limit) { /* take ownership of fhi_local_da */ my_da = fhi_local_da = 1; } } while (b_remain = fhi_CheckLocalBucketsToPin(b_remain, unpin_p)); } /* We have everything we need... commit */ FH_TABLE_UNLOCK; assert(pin_p != NULL); assert(unpin_p != NULL); firehose_move_callback(fh_mynode, unpin_p->regions, unpin_p->regions_num, pin_p->regions, pin_p->regions_num); FH_TABLE_LOCK; fhi_FreeRegionPool(unpin_p); fhi_FreeRegionPool(pin_p); /* Cleanup so others get a chance to make progress too */ Clear_TRANSIT_status(pin_p); pthread_cond_broadcast(&fhi_transit_cv); if_pf (my_da) { assert(fhi_local_da); FH_TABLE_UNLOCK; gasnet_AMPoll(); FH_TABLE_LOCK; fhi_local_da = 0; pthread_cond_broadcast(&fhi_local_da_cv); } Service_AM_Transit_Queue(); } else { /* We saw one of more TRANSIT buckets. We unwind, wait * for them to be completed and then start over at the * begining (for a maximum of outer_limit times before * asserting fhi_local_da. */ UNWIND(addr, len, pin_p, NULL, 0); pthread_cond_wait(&fhi_transit_cv, &fh_table_lock); goto again; /* will recheck for (fhi_local_da != 0) */ } FH_TABLE_ASSERT_LOCKED; #if !CALLER_HOLDS_TABLE_LOCK FH_TABLE_UNLOCK; #endif } gasnet-2025.8.0/other/firehose/Makefile.in0000664000175000017500000005634315142313673020427 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/other/firehose/Makefile.am $ # Description: Makefile for GASNet other/firehose # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = other/firehose ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = firehose.mak CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/firehose.mak.in \ $(top_srcdir)/config-aux/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 SUBDIRS = . EXTRA_DIST = \ firehose.c \ firehose_hash.c \ firehose_page.c \ firehose_region.c \ firehose.h \ firehose_trace.h \ firehose_internal.h \ firehose_fwd_sample.h \ firehose-local.txt \ firehose-remote.txt all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign other/firehose/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign other/firehose/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): firehose.mak: $(top_builddir)/config.status $(srcdir)/firehose.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic cscopelist-am ctags ctags-am \ distclean distclean-generic distclean-tags distdir dvi dvi-am \ html html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # No objects are built here, but we need a proper Makefile.am # to ensure the built firehose.mak is handled correctly. all: firehose.mak # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/other/firehose/firehose_fwd_sample.h0000664000175000017500000001230015142313673022521 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/firehose/firehose_fwd_sample.h $ * Description: Firehose forward declarations * Copyright 2004, Christian Bell * Terms of use are as specified in license.txt */ #include #include /* Exactly one one of the next two firehose impementations must be defined */ #undef FIREHOSE_REGION #undef FIREHOSE_PAGE #ifdef FIREHOSE_REGION /* Define the next preprocessor directive to allow firehose clients to * attach a client type in opaque firehose_region_t. It can only be * defined within the context of FIREHOSE_REGION. */ #define FIREHOSE_CLIENT_T #ifdef FIREHOSE_CLIENT_T typedef struct _firehose_client_t { int example_conduit_key; /* conduit-specific */ } firehose_client_t; #endif /* FIREHOSE_CLIENT_T */ #endif /* FIREHOSE_REGION */ /* Remote and completion callbacks * * Define the next preprocessor directive to allow firehose completion * handlers to run within an AM Handler context */ #undef FIREHOSE_COMPLETION_IN_HANDLER /* Define the next preprocessor directive to allow remote firehose * callbacks to run within an AM Handler context */ #undef FIREHOSE_REMOTE_CALLBACK_IN_HANDLER /* Remote callback arguments type * * This type is passed to the callback that can be optionally invoked * on the remote node when the firehose library has completed a * firehose move on the requested node (see 'Firehose Remote Pin' * documentation in firehose.h). * * This type must be defined, even if it is not used by the client. * */ typedef struct _firehose_remotecallback_args_t { uintptr_t local_addr; uintptr_t remote_addr; size_t nbytes; } firehose_remotecallback_args_t; /* Connection-oriented pinning networks * * Some networks actually need to connect/disconnect to remote * segments through their own API calls. For these networks, the * client must execute additional function calls for regions to be * pinned and unpinned. * * The firehose interface defines two preprocessor directives: * FIREHOSE_BIND_CALLBACK allows a client to bind to a remote region * that has been pinned in a network-specific * manner; * * FIREHOSE_UNBIND_CALLBACK allows a client to unbind from a remote * region in a network-specific manner * before it is effectively unpinned; */ /* Define the next preprocessor directive to allow the client to bind * to newly pinned regions once a move request completes locally. * * If active, this callback runs with the newly pinned regions once * the node initiating the move request receives the target's node's * reply. */ #undef FIREHOSE_BIND_CALLBACK /* Define the next preprocessor directive to allow the client to * unbind to regions locally once the firehose interface selects the * region for unpinning before any unpin messages are sent. * * If active, this callback runs with the regions selected for * unpinning and the target node the regions were mapped to. */ #undef FIREHOSE_UNBIND_CALLBACK /* Strict export pinning networks * * Most networks work under the assumption that a pinned region of * memory is memory accessible to every node on the cluster (possibly * through a key or no key at all). Some networks may require control * over who the region is exported to. These networks may want to * define one of the following two preprocessor directives: * FIREHOSE_EXPORT_CALLBACK allows a client to export a local * region for remote access in a * network-specific manner; * * FIREHOSE_UNEXPORT_CALLBACK allows a client to unexport a local * region for remote access in a * network-specific manner; */ /* Define the next preprocessor directive to allow the client to * export a region for remote access once a move request is received * locally. * * If active, this callback runs with the local regions requested for * pinning by a remote node. These regions will be pinned before the * callback but may already be exported to other nodes. */ #undef FIREHOSE_EXPORT_CALLBACK /* Define the next preprocessor directive to allow the client to * unexport a region for remote access once a move request is received * locally. An unexport call typically balances an export call on the * same region. * * If active, this callback runs with the local regions requested for * unpinning by a remote node. This callback is run prior to * unpinning the local region (although the local region may not be * subsequently unpinned if it has been exported to other nodes). */ #undef FIREHOSE_UNEXPORT_CALLBACK /* Define to a zero-argument macro that calls the "AMPoll()" function * which firehose should call when it needs to stall for resources. * If not set, defaults to * #define FIREHOSE_AMPOLL() gasneti_AMPoll() * * + This should be a non-tracing poll. * + To ensure progress of firehose, this poll function: * - should call firehose_release() where RDMAs have completed * - must run AM Replies if using firehose remotely * + To avoid recursion, this poll function must not call firehose * pinning request functions. For instance, if sending an AM Reply * could require a firehose then the poll must not run AM Requests. */ #undef FIREHOSE_AMPOLL gasnet-2025.8.0/other/firehose/firehose_hash.c0000664000175000017500000002111715142313673021324 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/firehose/firehose_hash.c $ * Description: * Copyright 2004, Christian Bell * Terms of use are as specified in license.txt */ #if 0 /* We now #include in firehose_{page,region}.c */ #include #include #include #include #include #endif struct _fh_hash_t { void **fh_table; size_t fh_entries; size_t fh_elemsize; #if FH_HASH_KNUTH unsigned fh_shift; #else unsigned fh_mask; #endif #ifdef FH_HASH_STATS int *fh_col_table; int fh_used; int fh_collisions; uint64_t fh_hops; #endif }; /* In firehose, hash tables are created for both local bucket addresses and * remote firehoses. Local bucket addresses are hashed on page addresses (as * integers) and remote firehoses are hashed on the bitwise or of * page_address|remote_node when enough lower order bits are available for node, * or their exclusive-or when node numbers are larger than the available bits. */ #define IS_POWER_OF_2(x) (!((x)&((x)-1))) #ifdef FH_HASH_STATS #define _fh_collision(hash) (hash)->fh_collisions++ #define _fh_entries_add(hash) (hash)->fh_used++ #define _fh_entries_del(hash) (hash)->fh_used-- #else #define _fh_collision(hash) #define _fh_entries_add(hash) #define _fh_entries_del(hash) #endif typedef struct fh_dummy_entry { fh_key_t hash_key; void *hash_next; } fh_dummy_entry_t; #if FH_HASH_KNUTH // Knuth's multiplicative hashing // See "The Art of Computer Programming, Volume 3, Sorting and Searching", D.E. Knuth, section 6.4 GASNETI_INLINE(knuth_hash) int knuth_hash(fh_key_t full_key, fh_hash_t *hash) { // Compute (k * (sqrt(5)-1)/2) mod 1.0 // The following "just works" to get the 32 most signficant bits of the // fractional part due to pre-shifting of the constant and overflow in the // multiplication. uint32_t kA_fract = 2654435769U * FH_KEY2INT(full_key); // Then extract the 'p' *most* significant bits of that fractional part int result = kA_fract >> hash->fh_shift; gasneti_assert(result >= 0); gasneti_assert_int(result ,<, hash->fh_entries); return result; } #define KEYHASH(key,hash) knuth_hash((key),(hash)) #else /* The following functions implement Thomas Wang's integer hashing functions, * found at http://www.concentric.net/~Ttwang/tech/inthash.htm. The hashing * functions are useful for integer hashing and make use of CPU native * instructions such as 'add complement' and 'shift and add'. * * A 32-bit and a 64-bit version are implemented below. */ GASNETI_INLINE(inthash) int inthash(fh_key_t full_key) { intptr_t key = FH_KEY2INT(full_key); #if PLATFORM_ARCH_32 key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16); #else key += ~(key << 32); key ^= (key >> 22); key += ~(key << 13); key ^= (key >> 8); key += (key << 3); key ^= (key >> 15); key += ~(key << 27); key ^= (key >> 31); #endif return (int) key; } #define KEYHASH(key,hash) \ (inthash(key) & (hash)->fh_mask); #endif /* fh_hash_create(keylen,entries) * * Allocates a table large enough to hold 'entries' entries of size 'keylen'. * Note that 'entries' must be a power of two. */ static fh_hash_t * fh_hash_create(size_t entries) { fh_hash_t *hash; if (!IS_POWER_OF_2(entries)) gasneti_fatalerror("fh_hash_create requires a power of 2!"); hash = (fh_hash_t *) gasneti_calloc(1,sizeof(fh_hash_t)); hash->fh_table = (void **) gasneti_calloc(entries, sizeof(void *)); #if FH_HASH_KNUTH // 32 minus desired bits of hash value hash->fh_shift = 32; for (size_t e = entries-1; e; e >>= 1) { hash->fh_shift -= 1; } #else hash->fh_mask = entries-1; #endif hash->fh_entries = entries; #ifdef FH_HASH_STATS hash->fh_col_table = (int *) gasneti_calloc(entries, sizeof(int)); #if FH_HASH_KNUTH gasneti_console_message("INFO", "hash create: entries=%"PRIuSZ", bits=%u\n", entries, (32 - hash->fh_shift)); #else gasneti_console_message("INFO", "hash create: entries=%"PRIuSZ", mask=%"PRIxSZ"\n", entries, entries-1); #endif hash->fh_used = 0; hash->fh_collisions = 0; #endif return hash; } static void fh_hash_destroy(fh_hash_t *hash) { #ifdef FH_HASH_STATS gasneti_console_message("INFO", "entries: %"PRIuSZ" elements: %d, collisions: %d, avg=%2.5f%%, load %g\n", hash->fh_entries, hash->fh_used, hash->fh_collisions, (double) hash->fh_collisions*100/hash->fh_used, (double) hash->fh_used/hash->fh_entries); if (0) { int i, hits; for (i = 0; i < hash->fh_entries; i++) { hits = hash->fh_col_table[i]; if (hits) { printf("%d\t%d\n", i, hits); } } } gasneti_free(hash->fh_col_table); #endif gasneti_free(hash->fh_table); gasneti_free(hash); } /* The firehose hash uses open addressing as a collision resolution scheme, * since space occupied by each entry must be minimized. */ static void * fh_hash_find(fh_hash_t *hash, fh_key_t key) { void *val; int keyhash = KEYHASH(key, hash); val = hash->fh_table[keyhash]; while (val != NULL && !FH_KEY_EQ(key, ((fh_dummy_entry_t *) val)->hash_key)) { val = ((fh_dummy_entry_t *) val)->hash_next; } return val; } /* * fh_hash_insert(hash, key, val) * If val==NULL, the key is removed from the table */ static void * fh_hash_insert(fh_hash_t *hash, fh_key_t key, void *newval) { int keyhash; void *val; keyhash = KEYHASH(key, hash); val = hash->fh_table[keyhash]; #ifdef FH_HASH_STATS hash->fh_col_table[keyhash]++; #endif /* May be a deletion request */ if (newval == NULL) { fh_dummy_entry_t *prev = NULL; fh_dummy_entry_t *cur = (fh_dummy_entry_t *) val; while (cur != NULL) { /* * If the key matches, adjust list and return the entry. * */ if (FH_KEY_EQ(cur->hash_key, key)) { if (prev == NULL) hash->fh_table[keyhash] = cur->hash_next; else prev->hash_next = cur->hash_next; return cur; } prev = cur; cur = cur->hash_next; } /* * No keys found matching deletion request * */ return NULL; } /* Add the key mapping */ else { _fh_entries_add(hash); /* bucket unused, simply copy the new data */ if (val == NULL) { hash->fh_table[keyhash] = newval; ((fh_dummy_entry_t *) newval)->hash_next = NULL; } else { _fh_collision(hash); ((fh_dummy_entry_t *) newval)->hash_next = hash->fh_table[keyhash]; hash->fh_table[keyhash] = newval; } return newval; } } /* * Apply a given function to all entries in the hash. * Deletion of the entry from the function is OK. */ void fh_hash_apply(fh_hash_t *hash, void (*fn)(void *val, void *arg), void *arg) { int i; for (i = 0; i < hash->fh_entries; ++i) { void *val = hash->fh_table[i]; while (val != NULL) { void *next = ((fh_dummy_entry_t *) val)->hash_next; (*fn)(val, arg); val = next; } } } #ifdef FIREHOSE_REGION /* Additional functionality required for FIREHOSE_REGION, which * can have multiple hash entries with identical key. */ /* Given an (non-NULL) entry, find the next one with the same key */ static void * fh_hash_next(fh_hash_t *hash, void *val) { fh_key_t key = ((fh_dummy_entry_t *) val)->hash_key; do { val = ((fh_dummy_entry_t *) val)->hash_next; } while (val != NULL && !FH_KEY_EQ(key, ((fh_dummy_entry_t *) val)->hash_key)); return val; } /* Given a (non-NULL) entry, by address not by key, replace * it with another entry, or delete if replacement is NULL */ static void fh_hash_replace(fh_hash_t *hash, void *val, void *newval) { int keyhash; fh_dummy_entry_t *cur; keyhash = KEYHASH(((fh_dummy_entry_t *)val)->hash_key, hash); cur = (fh_dummy_entry_t *)(hash->fh_table[keyhash]); /* Handle head of list case first */ if (cur == ((fh_dummy_entry_t *) val)) { if (newval == NULL) { /* Delete */ hash->fh_table[keyhash] = cur->hash_next; } else { /* Replace */ ((fh_dummy_entry_t *) newval)->hash_next = cur->hash_next; hash->fh_table[keyhash] = newval; } return; } /* Now handle non-head case */ while (cur != NULL) { fh_dummy_entry_t *next = cur->hash_next; if (next == ((fh_dummy_entry_t *) val)) { if (newval == NULL) { /* Delete */ cur->hash_next = next->hash_next; } else { /* Replace */ cur->hash_next = newval; ((fh_dummy_entry_t *) newval)->hash_next = next->hash_next; } return; } cur = next; } } #endif /* defined(FIREHOSE_REGION) */ gasnet-2025.8.0/other/firehose/firehose-remote.txt0000664000175000017500000003140715142313673022212 0ustar alastairalastair/* Firehose-remote algorithm by: Dan Bonachea, Christian Bell and Paul Hargrove for deadlock-free, thread-safe management of firehose-remote resources using optimistic concurrency control Known bugs/issues ----------------- * In a few places (where marked) we increment bucket ref counts without checking whether we need to remove it from the FIFO * Race condition: We call destroy_bucket() on victims pulled from the FIFO before we actually send the AM to unpin them, and we release the firehose lock before sending that AM. This means another thread could miss on that same bucket, race ahead of us and send the pin request for the remote page, which would arrive before our unpin request for that page. Once we commit, we need a way to prevent other threads from hitting OR missing on our selected FIFO victims until we've been guaranteed our unpin request has been serviced (or will be before any subsequent pin request) - this probably means blocking access to those buckets until the AMReply comes back for the unpin request - GASNet does not guarantee point-to-point ordering of AM's, and by definition, no conduit with concurrent handler execution will provide it. Perhaps a "pending unpin" state for the FIFO victims? Needs to be worked into all the cases where we might encounter one... - FIX: Need REMOTE_PENDING_UNPIN state (distinct from REMOTE_PENDING). This state must only be created at COMMIT time. If we need to acquire such a bucket we must UPYL until it is gone. */ #define FHI_AVAIL(node) \ ( \ (fhc_RemoteBucketsM - fhc_RemoteBucketsUsed[node]) /* Free energy */ \ + fhc_RemoteVictimFifoBuckets[node] /* FIFO */ \ ) #define UPYL \ do { \ FH_UNLOCK; \ gasnet_AMPoll(); \ gasneti_yield(); /* Shoulds this be GASNET_WAITHOOK? */ \ FH_LOCK; \ } while (0) firehose_bucket_t *consume_one_bucket(int node, fhi_RegionPool_t *unpin_p) { fh_fifoq_t *fifo_head = &fh_RemoteNodeFifo[node]; firehose_bucket_t *bd; if (fhc_RemoteBucketsUsed[node] < fhc_RemoteBucketsM) { /* consume Free Energy */ ++fhc_RemoteBucketsUsed[node]; return; } /* We remove buckets from the FIFO and increment their ref counts, even though they are not for the page we actually want. This is to claim them and avoid double pinning of their page (as could happen if we just removed them from the hash table entirely. We will check later if our ref count of 1 became 2, and release the bucket if it did. */ gasneti_assert(fhc_RemoteVictimFifoBuckets[node] > 0); bd = FH_TAILQ_FIRST(fifo_head); FH_TAILQ_REMOVE(fifo_head, bd); ++(bd->Rrefc); Add_to_rpool(FH_ADDR(bd), unpin_p); fhc_RemoteVictimFifoBuckets[node]--; return bd; } int *da; /* dynamically-allocated array of gasneti_nodes elements */ /* return count of the number of misses to resolve, or -1 if deadlock detected Note that we can call this from the deadlock resolution case, in which case my_da is 1 on entry. It is 0 otherwise. */ int fhi_EstimateRemoteRequest(int *my_da, int *da_count, node, start, end, ...) { int count; inner_again: count = 0; foreach bucket in [start, end] { bd = lookup_bucket(node, bucket_addr); if (bd == NULL) { /* Miss, count it */ count++; } else if (FH_IS_PENDING(bd) && !FH_IS_COMMITED(bd)) { ++(*da_count); if (*my_da) { /* Nothing to do, we "own" da[node] */ gasneti_assert(da[node]); } else if (da[node]) { /* Somebody else "owns" da[node], so give up */ return -1; } else if (*da_count >= SOME_LIMIT) { *my_da = da[node] = 1; gasneti_membar(); } UPYL; goto inner_again; /* start over */ } else if (FH_IS_REMOTE_FIFO(bd)) { /* Must reclaim from FIFO, so it counts against our limit */ count++; } } return count; } /* easy case: we know sufficient resources are available */ void fhi_PinNoLog(start, end, ...) { int first_pending = 1; foreach bucket in [start, end] { bd = lookup_bucket(node, bucket_addr); if (bd == NULL) { /* Miss */ create_new_bucket(node, bucket_addr, Rrefc=0, Lrefc=Pending/Committed); Add_to_rpool(pin_p, bucket_addr); } else if (IS_PENDING(bd)) { /* hit on PENDING bucket */ gasneti_assert(IS_COMMITTED(bd)); ++(bd->Rrefc); if (first_pending) { hang_on(bd); first_pending = 0; } } else { /* hit on non-pending bucket */ ++(bd->Rrefc); /* XXX: need to check if bucket is currently in FIFO and remove it if so */ } } /* now account for the resources we need: */ /* first claim "Free energy" */ tmp = MIN(n_buckets, fhc_RemoteBucketsM - fhc_RemoteBucketsUsed[node]); n_buckets -= tmp; fhc_RemoteBucketsUsed[node] += tmp; /* second claim needed FIFO buckets * This must come after we increment ref counts to avoid freeing our own hits */ if (n_buckets > 0) { gasneti_assert(n_buckets <= fhc_RemoteVictimFifoBuckets[node]); unpin_p->n_regions = fhi_FreeVictimRemote(node, n_buckets, &(unpin_p->regions)); fhc_RemoteVictimFifoBuckets[node] -= n_buckets; } } /* Get as much as we can, knowing it won't be enough: */ /* returns address of first "unresolved" page */ /* When we return the FIFO is either empty, OR it contains * only buckets that we need to hit on. */ uintptr_t fhi_PinWithLog(node, n_avail, start, end...) { int i; foreach bucket in [start, end] { bd = lookup_bucket(node, bucket_addr); if (bd) { /* hit */ if (IS_PENDING(bd)) { /* must be committed because we EstimateRemoteRequests ensures we never see pending uncommitted buckets on the (only) call to fhi_PinWithLog */ gasneti_assert(IS_COMMITTED(bd)); } ++(bd->Rrefc); /* XXX: need to check if bucket is currently in FIFO and remove it if so */ } else if (n_avail) { /* miss w/ resources still available */ try_this_again: bd = consume_one_bucket(node, unpin_p); if (bd != NULL && FH_BADDR(bd) > bucket_addr && FH_BADDR(bd) < end) { /* Oops, we just reclaimed a bucket that we need to hit on later */ unpin_p->num_buckets--; /* take it off the unpin list */ fhi_release_bucket(bd) /* put it back on the FIFO (at the far end) */ --n_avail; /* Reduce the amount of space we think we have */ if (!n_avail) return bucket_addr; goto try_this_again; } create_new_bucket(node, bucket_addr, Rrefc=0, Lrefc=Pending/UNcommitted); Add_to_rpool(pin_p, bucket_addr); --n_avail; } else { /* We've gone as far as we can w/ available resources */ return bucket_addr; } } gasneti_fatalerror("Reached unreachable code"); } /* Get as much "more" as we can, not knowing it will be enough: */ /* returns address of first "unresolved" page */ /* On success the returned page will be ROUNUP(start+len,PAGESIZE) */ /* Note that we've revalidated our status before entering this function */ /* When we return the FIFO is either empty, OR it contains * only buckets that we need to hit on. */ uintptr_t fhi_PinSomeMore(node, n_avail, saved_addr, end, ...) { int i; foreach bucket in [saved_addr, end] { bd = lookup_bucket(node, bucket_addr); if (bd) { if (IS_PENDING(bd) && !IS_COMMITTED(bd)) { return bucket_addr; } ++(bd->Rrefc); /* XXX: need to check if bucket is currently in FIFO and remove it if so */ } else if (n_avail) { /* miss w/ resources still available */ try_this_again: bd = consume_one_bucket(node, unpin_p); if (FH_BADDR(bd) > bucket_addr && FH_BADDR(bd) < end) { /* Oops, we just reclaimed a bucket that we need to hit on later */ unpin_p->num_buckets--; /* take it off the unpin list */ fhi_release_bucket(bd) /* put it back on the FIFO (at the far end) */ --n_avail; /* Reduce the amount of space we think we have */ if (!n_avail) return bucket_addr; goto try_this_again; } create_new_bucket(node, bucket_addr, Rrefc=0, Lrefc=Pending/UNcommitted); Add_to_rpool(pin_p, bucket_addr); --n_avail; } else { /* We've gone as far as we can w/ available resources */ return bucket_addr; } } /* If we get here we've got enough resources to finish! */ /* Indicate success */ return end + 1; } /* return zero if any of the FIFO buckets we claimed have been claimed by others as well. (We planned to unpin them, but can't if another thread needs them). */ int fhi_RevalidateResources(node, unpin_p) { foreach bucket in unpin_p { bd = lookup_bucket(node, bucket_addr); gasneti_assert(bd != NULL); gasneti_assert(bd->Rrefc > 0); if (bd->Rrefc != 1) { return 0; } } return 1; } /* XXX: Not yet discussed as a group */ void fhi_rollback(node, start, saved_addr, pin_p, unpin_p, ...) { int pin_count, unpin_count; for each bucket in [start, saved_addr] { bd = lookup_bucket(node, bucket_addr); gasneti_assert(bd != NULL); if (IS_PENDING(bd) && !IS_COMMITTED(bd)) { /* we must have created this pending uncommitted bucket, because it falls within the "handled" range */ destroy_bucket(bd); } else { /* decrement Rrefc and perhaps send to FIFO */ bucket_release_remote(bd); } } /* Restore "free energy" */ fhc_RemoteBucketsUsed[node] += (pin_p->n_buckets - unpin_p->n_buckets); } /* XXX: Not yet discussed as a group */ void fhi_commit(node, start, end, pin_p, unpin_p,...) { /* * Commit the pending buckets we created and hang on the * first pending bucket in the range */ int first_pending = 1; foreach bucket in [start, end] { bd = lookup_bucket(node, bucket_addr); gasneti_assert(bd != NULL); if (!IS_COMMITED(bd)) { SET_PENDING_COMMITTED(bd); } if (IS_PENDING(bd) && first_pending) { hang_on(bd); first_pending = 0; } } /* Destroy the FIFO buckets we were holding on to */ foreach bucket in unpin_p { bd = bucket_lookup(node, bucket_addr); gasneti_assert(bd != NULL); gasneti_assert(bd->Rrefc == 1); destroy_bucket(bd); /* DOB: there is a race condition here (see above) */ } } void fhi_SomePartOfRemotePin(...) { int da_count = 0; int my_da = 0; int n_buckets, n_avail; uintptr_t end = start + (len - 1); uintptr_t saved_addr; FH_LOCK; outer_again: while(da[node]) { UPYL; } /* stall for deadlock to end */ n_buckets = fhi_EstimateRemoteRequest(&my_da, &da_count, node, start, end,...); if (my_da) { gasneti_assert(da[node]); goto won_da; } /* this thread asserted da[node] */ if (n_buckets < 0) goto outer_again; /* other thread asserted da[node] */ n_avail = FHI_AVAIL(node); if (n_buckets <= n_avail) { fhi_PinNoLog(start, end, ...); goto done; /* ready to pin */ } else { saved_addr = fhi_PinWithLog(node, n_avail, start, end, ...); gasneti_assert(saved_addr < end); while (da_count < SOME_LIMIT) { da_count++; if_pf(da[node]) { gasneti_assert(!my_da); fhi_rollback(node, start, saved_addr, pin_p, unpin_p...); /* Did we want to reset da_count to 0? */ goto outer_again; } /* hope more resources become available */ UPYL; n_avail = FHI_AVAIL(node); /* Check that we didn't lose anything */ if (!fhi_RevalidateResources(node, unpin_p)) { /* XXX: room for optimization here where we could try to replace lost buckets with some from n_avail */ fhi_rollback(node, start, saved_addr, pin_p, unpin_p...); goto outer_again; } saved_addr = fhi_PinSomeMore(node, n_avail, saved_addr, end, ...); if (saved_addr == (end+1)) { /* note "> end" is not overflow-safe */ fhi_commit(node, start, saved_addr, pin_p, unpin_p...); goto done; } } /* da_count is too high now */ fhi_rollback(node, start, saved_addr, pin_p, unpin_p...); if (!da[node]) { /* WIN */ my_da = da[node] = 1; won_da: /* Wait for sufficient resources: */ do { UPYL; } while (fhi_EstimateRemoteRequest(&my_da, &da_count, node, start, end,...) > FHI_AVAIL(node)); fhi_PinNoLog(start, end, ...); da[node] = 0; goto done; } else { /* LOST */ FH_UNLOCK; goto outer_again; } } done: FH_UNLOCK; if (there were any misses) { SendAMRequest(...); } else { run request completion handler now.. } return; } gasnet-2025.8.0/other/kinds/0000775000175000017500000000000015142313673015653 5ustar alastairalastairgasnet-2025.8.0/other/kinds/gasnet_mk.h0000664000175000017500000001231415142313673017775 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/kinds/gasnet_mk.h $ * Description: GASNet Memory Kinds API types and declarations * Copyright (c) 2020, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _GASNET_MK_H #define _GASNET_MK_H #if defined(_INCLUDED_GASNET_INTERNAL_H) && !defined(_IN_GASNET_INTERNAL_H) #error Internal GASNet code should not directly include gasnet_mk.h, just gasnet_internal.h #endif #include GASNETI_BEGIN_EXTERNC GASNETI_BEGIN_NOWARN typedef enum { GEX_MK_CLASS_HOST, // "normal" memory (eg GEX_MK_HOST) GEX_MK_CLASS_CUDA_UVA, // CUDA UVA memory GEX_MK_CLASS_HIP, // HIP device memory GEX_MK_CLASS_ZE, // Level Zero device memory _GEX_MK_CLASS_COUNT } gex_MK_Class_t; // Struct containing a union and an enum to indicate which member has been populated. // Each union member is a struct named with the lowercase of the enum identifier. // All types in here are basic types, possibly type-erased/indirected versions of types // provided in device headers. typedef struct { uint64_t gex_flags; // Reserved. Must be 0 currently. gex_MK_Class_t gex_class; union { struct { int gex_CUdevice; } gex_class_cuda_uva; struct { int gex_hipDevice; } gex_class_hip; struct { void* gex_zeDevice; void* gex_zeContext; uint32_t gex_zeMemoryOrdinal; } gex_class_ze; } gex_args; } gex_MK_Create_args_t; // Constructor for gex_MK_t // This is a non-collective call extern int gex_MK_Create( gex_MK_t *_memkind_p, // OUT gex_Client_t _client, const gex_MK_Create_args_t *_args, // IN gex_Flags_t _flags // Reserved. Must be 0 currently. ); // Destructor extern void gex_MK_Destroy(gex_MK_t, gex_Flags_t); // Per-class impl(ementation) constants and function pointers struct gasneti_mk_impl_s; typedef struct gasneti_mk_impl_s gasneti_mk_impl_t; #ifndef _GEX_MK_T #define GASNETI_MK_COMMON \ GASNETI_OBJECT_HEADER \ gasneti_Client_t _client; \ gex_MK_Class_t _mk_class; \ gasneti_mk_impl_t *_mk_impl; \ void *_mk_conduit; \ gasneti_weakatomic32_t _ref_count; typedef struct { GASNETI_MK_COMMON } *gasneti_MK_t; #if GASNET_DEBUG extern gasneti_MK_t gasneti_import_mk(gex_MK_t _mk); extern gasneti_MK_t gasneti_import_mk_nonhost(gex_MK_t _mk); extern gasneti_MK_t gasneti_import_mk_nonhost_valid(gex_MK_t _mk); extern gex_MK_t gasneti_export_mk(gasneti_MK_t _real_mk); #else #define gasneti_import_mk(x) ((gasneti_MK_t)(x)) #define gasneti_import_mk_nonhost(x) ((gasneti_MK_t)(x)) #define gasneti_import_mk_nonhost_valid gasneti_import_mk_nonhost #define gasneti_export_mk(x) ((gex_MK_t)(x)) #endif // TODO: Either document the following, prohibiting GEX_MK_HOST, or fix them for that case #define gex_MK_SetCData(mk,val) ((void)(gasneti_import_mk_nonhost_valid(mk)->_cdata = (val))) #define gex_MK_QueryCData(mk) ((void*)gasneti_import_mk_nonhost_valid(mk)->_cdata) #define gex_MK_QueryFlags(mk) ((gex_Flags_t)gasneti_import_mk_nonhost_valid(mk)->_flags) #define gex_MK_QueryClient(mk) gasneti_export_client(gasneti_import_mk_nonhost_valid(mk)->_client) #define gex_MK_QueryClass(mk) ((gex_MK_Class_t)gasneti_import_mk_nonhost_valid(mk)->_mk_class) #endif GASNETI_END_NOWARN GASNETI_END_EXTERNC #if GASNET_HAVE_MK_CLASS_HIP // HIP platform was determined at GASNet-EX configure time. // If these conflict with client code, then this is not the right GASNet-EX build #if GASNETI_HIP_PLATFORM_NVIDIA #if defined(__HIP_PLATFORM_AMD__) || defined(__HIP_PLATFORM_HCC__) #error Conflicting HIP platform at GASNet configure vs gasnet_mk.h compile #endif #ifndef __HIP_PLATFORM_NVCC__ #define __HIP_PLATFORM_NVCC__ // legacy #endif #ifndef __HIP_PLATFORM_NVIDIA__ #define __HIP_PLATFORM_NVIDIA__ #endif #else #if defined(__HIP_PLATFORM_NVIDIA__) || defined(__HIP_PLATFORM_NVCC__) #error Conflicting HIP platform at GASNet configure vs gasnet_mk.h compile #endif #ifndef __HIP_PLATFORM_HCC__ #define __HIP_PLATFORM_HCC__ // legacy #endif #ifndef __HIP_PLATFORM_AMD__ #define __HIP_PLATFORM_AMD__ #endif #endif #endif // Things for use only in conduit code #if GASNETI_BUILDING_CONDUIT // Perform Push and Pop of a "context" if required for the given kind // Valid (but no-op) even for host memory segments // Returns GASNET_OK on success extern int gasneti_mk_segment_context_push(gasneti_Segment_t i_segment); extern int gasneti_mk_segment_context_pop(gasneti_Segment_t i_segment); #if GASNET_HAVE_MK_CLASS_ZE extern int gasneti_mk_ze_device_ordinal(void *device_handle_arg, int gpu_only); extern const char *gasneti_mk_ze_strerror(unsigned int result); #endif #endif #endif gasnet-2025.8.0/other/kinds/gasnet_cuda_uva.c0000664000175000017500000002606715142313673021162 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/kinds/gasnet_cuda_uva.c $ * Description: GASNet Memory Kinds Implementation for CUDA UVA devices * Copyright (c) 2020, The Regents of the University of California * Terms of use are as specified in license.txt */ #define GASNETI_NEED_GASNET_MK_H 1 #include #include #if GASNET_HAVE_MK_CLASS_CUDA_UVA // Else empty #include GASNETI_IDENT(gasneti_IdentString_MKClassCUDAUVA, "$GASNetMKClassCUDAUVA: 1 $"); // // Class-specific MK type and functions // typedef struct my_MK_s { GASNETI_MK_COMMON // Class-indep prefix CUcontext ctx; CUdevice dev; int use_sync_memops; } *my_MK_t; // Wrapper and format for use of cuGetErrorName() const char *_gasneti_cuerror_name(CUresult res) { static const char *unknown = "UNKNOWN"; const char *errorname; if (cuGetErrorName(res, &errorname)) errorname = unknown; return errorname; } #define GASNETI_CURESULT_FMT "%s(%d)" #define GASNETI_CURESULT_STRING(res) _gasneti_cuerror_name(res),(res) // // Error checking/reporting wrapper // #define gasneti_check_cudacall(op) do { \ CUresult _retval = (op); \ if_pf (_retval) { \ gasneti_fatalerror("%s returned "GASNETI_CURESULT_FMT,#op,GASNETI_CURESULT_STRING(_retval));\ } \ } while (0) static const char *gasneti_formatmk_cuda_uva(gasneti_MK_t i_mk) { my_MK_t kind = (my_MK_t) i_mk; return gasneti_dynsprintf("CUDA_UVA(gex_CUdevice=%d)", (int)kind->dev); } static void gasneti_MK_Destroy_cuda_uva( gasneti_MK_t i_mk, gex_Flags_t flags) { my_MK_t mk = (my_MK_t) i_mk; gasneti_check_cudacall(cuDevicePrimaryCtxRelease(mk->dev)); gasneti_free_mk(i_mk); } static int gasneti_MK_Segment_Create_cuda_uva( gasneti_Segment_t *i_segment_p, gasneti_MK_t i_mk, void * addr, uintptr_t size, gex_Flags_t flags) { my_MK_t kind = (my_MK_t) i_mk; CUdeviceptr dptr; CUresult result; void * to_free = NULL; int retval = GASNET_OK; int use_sync_memops = kind->use_sync_memops; gasneti_check_cudacall(cuCtxPushCurrent(kind->ctx)); // TODO: // Might want additional care with respect to error returns from the CUDA device API. // In particular, any call "may also return error codes from previous, asynchronous launches." // Presently, we try to always provide the specific CUDA error code as we fatalerror. if (addr) { // Client-allocated dptr = (CUdeviceptr)addr; // cuPointerGetAttributes available since CUDA 7.0 unsigned int mem_type = 0; unsigned int is_managed = 0; CUcontext ctx = NULL; void * ptrs[3] = { (void*)&mem_type, (void*)&is_managed, (void*)&ctx }; CUpointer_attribute attrs[3] = { CU_POINTER_ATTRIBUTE_MEMORY_TYPE, CU_POINTER_ATTRIBUTE_IS_MANAGED, CU_POINTER_ATTRIBUTE_CONTEXT }; result = cuPointerGetAttributes(3, attrs, ptrs, dptr); if (result) { gasneti_fatalerror("Failed to query pointer attributes of client-allocated memory: " GASNETI_CURESULT_FMT, GASNETI_CURESULT_STRING(result)); } if (mem_type != CU_MEMORYTYPE_DEVICE) { gasneti_fatalerror("Invalid call to gex_Segment_Create(CUDA_UVA) with non-device memory"); } if (is_managed) { gasneti_fatalerror("Invalid call to gex_Segment_Create(CUDA_UVA) with managed memory"); } // We currently accept memory allocated by *any* context for the same device. // TODO: should we be more strict by checking equality of contexts instead of devices? CUdevice dev; if (ctx == NULL) { // No context, even though other attributres are OK. // This would occur, for instance, with a cuMemMap() (which does // not support the SYNC_MEMOPS attribute). See bug 4767. use_sync_memops = 0; } else if ((result = cuCtxPushCurrent(ctx)) || (result = cuCtxGetDevice(&dev)) || (result = cuCtxPopCurrent(&ctx))) { gasneti_fatalerror("Failed to query CUDA device of client-allocated memory: " GASNETI_CURESULT_FMT, GASNETI_CURESULT_STRING(result)); } else if (dev != kind->dev) { gasneti_fatalerror("gex_Segment_Create(CUDA_UVA) with memory associated with wrong device"); } } else { // GASNet-allocated result = cuMemAlloc(&dptr, size); if (result == CUDA_ERROR_OUT_OF_MEMORY) { retval = GASNET_ERR_RESOURCE; goto out; } else if (result != CUDA_SUCCESS) { gasneti_fatalerror("cuMemAlloc() returned unexpected failure: " GASNETI_CURESULT_FMT, GASNETI_CURESULT_STRING(result)); } addr = to_free = (void *) dptr; } if (use_sync_memops) { int one = 1; gasneti_check_cudacall(cuPointerSetAttribute(&one, CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, dptr)); } gasneti_Client_t client = i_mk->_client; gex_MK_t e_mk = gasneti_export_mk(i_mk); gasneti_Segment_t i_segment = gasneti_alloc_segment(client, addr, size, e_mk, !to_free, flags); i_segment->_opaque_mk_use = to_free; *i_segment_p = i_segment; out: { CUcontext prev_ctx; gasneti_check_cudacall(cuCtxPopCurrent(&prev_ctx)); gasneti_assert(prev_ctx == kind->ctx); } return retval; } static void gasneti_MK_Segment_Destroy_cuda_uva( gasneti_Segment_t i_segment) { CUdeviceptr to_free = (CUdeviceptr)(i_segment->_opaque_mk_use); if (to_free) { my_MK_t kind = (my_MK_t) gasneti_import_mk_nonhost(i_segment->_kind); CUcontext prev_ctx; gasneti_check_cudacall( cuCtxPushCurrent(kind->ctx) ); gasneti_check_cudacall( cuMemFree(to_free) ); gasneti_check_cudacall( cuCtxPopCurrent(&prev_ctx) ); gasneti_assert(prev_ctx == kind->ctx); } } static int gasneti_cuda_context_push(gasneti_Segment_t i_segment) { my_MK_t kind = (my_MK_t) gasneti_import_mk_nonhost(i_segment->_kind); // cuCtx{Push,Pop}Current may return errors from asynchronous kernel launches // and we currently lack a mechanism to propagate these to the client, // so any CUDA errors deteced here are treated as fatal. gasneti_check_cudacall( cuCtxPushCurrent(kind->ctx) ); return GASNET_OK; } static int gasneti_cuda_context_pop(gasneti_Segment_t i_segment) { my_MK_t kind = (my_MK_t) gasneti_import_mk_nonhost(i_segment->_kind); CUcontext prev_ctx; // cuCtx{Push,Pop}Current may return errors from asynchronous kernel launches // and we currently lack a mechanism to propagate these to the client, // so any CUDA errors deteced here are treated as fatal. gasneti_check_cudacall( cuCtxPopCurrent(&prev_ctx) ); gasneti_assert(prev_ctx == kind->ctx); return GASNET_OK; } // // Class-specific "impl(ementation)": constants and function pointers. // // Due to lack of designated initializers in GASNet's required C99 subset, we // address the fragility as the structure grows or changes by lazy explicit // initialization. static gasneti_mk_impl_t *get_impl(void) { // Static storage duration ensures these are zero-initialized static gasneti_mk_impl_t the_impl; static gasneti_mk_impl_t *result; if (!result) { static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); if (!result) { the_impl.mk_class = GEX_MK_CLASS_CUDA_UVA; the_impl.mk_name = "CUDA_UVA"; the_impl.mk_sizeof = sizeof(struct my_MK_s); the_impl.mk_format = &gasneti_formatmk_cuda_uva; the_impl.mk_destroy = &gasneti_MK_Destroy_cuda_uva; the_impl.mk_segment_create = &gasneti_MK_Segment_Create_cuda_uva; the_impl.mk_segment_destroy = &gasneti_MK_Segment_Destroy_cuda_uva; the_impl.mk_segment_context_push = &gasneti_cuda_context_push; the_impl.mk_segment_context_pop = &gasneti_cuda_context_pop; gasneti_sync_writes(); result = &the_impl; } gasneti_mutex_unlock(&lock); } else { gasneti_sync_reads(); } gasneti_assert(result); return result; } // Class-specific create int gasneti_MK_Create_cuda_uva( gasneti_MK_t *i_memkind_p, gasneti_Client_t client, const gex_MK_Create_args_t *args, gex_Flags_t flags) { CUdevice dev = args->gex_args.gex_class_cuda_uva.gex_CUdevice; GASNETI_TRACE_PRINTF(O,("gex_MK_Create: class=CUDA_UVA gex_CUdevice=%d", dev)); if (dev < 0) { // This is always treated as programmer error gasneti_fatalerror("gex_MK_Create called with negative CUdevice=%i", dev); } // Obtain the primary context for the given device, initializing if needed CUcontext ctx; CUresult res = cuDevicePrimaryCtxRetain(&ctx, dev); if (res == CUDA_ERROR_NOT_INITIALIZED) { int initRes = cuInit(0); if (initRes == CUDA_SUCCESS) { res = cuDevicePrimaryCtxRetain(&ctx, dev); } else if (initRes == CUDA_ERROR_NO_DEVICE) { GASNETI_RETURN_ERRR(BAD_ARG,"GEX_MK_CLASS_CUDA_UVA: no CUDA devices found"); } else { const char *errorname; if (cuGetErrorName(initRes, &errorname)) errorname = "UNKNOWN"; const char *msg = gasneti_dynsprintf("GEX_MK_CLASS_CUDA_UVA: cuInit() returned %s(%i)", errorname, initRes); GASNETI_RETURN_ERRR(BAD_ARG,msg); } } // Failed to obtain the primary context, try to reason out why // TODO: explicit diagnosis of more failure cases if_pf (res != CUDA_SUCCESS) { const char *why = "unknown failure"; if (res == CUDA_ERROR_INVALID_DEVICE) { int dev_count; if (cuDeviceGetCount(&dev_count)) { why = "cuDeviceGetCount() failed"; } else if (! dev_count) { why = "no CUDA devices found"; } else { why = gasneti_dynsprintf("invalid CUdevice=%i (%d devices found)", dev, dev_count); } } else { const char *errorname; if (cuGetErrorName(res, &errorname)) errorname = "UNKNOWN"; why = gasneti_dynsprintf("cuDevicePrimaryCtxRetain() returned %s(%i)", errorname ,res); } const char *msg = gasneti_dynsprintf("GEX_MK_CLASS_CUDA_UVA: %s", why); GASNETI_RETURN_ERRR(BAD_ARG,msg); } int isUVA; if (cuDeviceGetAttribute(&isUVA, CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, dev)) { GASNETI_RETURN_ERRR(BAD_ARG,"GEX_MK_CLASS_CUDA_UVA: failed to query CUDA device for UVA support"); } if (!isUVA) { GASNETI_RETURN_ERRR(BAD_ARG,"GEX_MK_CLASS_CUDA_UVA: passed context for a non-UVA device"); } my_MK_t result = (my_MK_t) gasneti_alloc_mk(client, get_impl(), flags); result->dev = dev; result->ctx = ctx; // TODO: could be a per-device setting? // TODO: is '1' the best default? result->use_sync_memops = gasneti_getenv_yesno_withdefault("GASNET_USE_CUDA_SYNC_MEMOPS", 1); *i_memkind_p = (gasneti_MK_t) result; return GASNET_OK; } #endif gasnet-2025.8.0/other/kinds/gasnet_ze.c0000664000175000017500000003464415142313673020011 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/kinds/gasnet_ze.c $ * Description: GASNet Memory Kinds Implementation for oneAPI Level Zero * Copyright (c) 2022, The Regents of the University of California * Terms of use are as specified in license.txt */ #define GASNETI_NEED_GASNET_MK_H 1 #include #include #if GASNET_HAVE_MK_CLASS_ZE // Else empty #include GASNETI_IDENT(gasneti_IdentString_MKClassZE, "$GASNetMKClassZE: 1 $"); // // Class-specific MK type and functions // typedef struct my_MK_s { GASNETI_MK_COMMON // Class-indep prefix // TODO: This is an initial/experimental design. // For a final design we must determine which of these is *actually* needed. ze_device_handle_t device; ze_context_handle_t context; uint32_t ordinal; } *my_MK_t; // // Error checking/reporting support // GASNETI_COLD const char* gasneti_mk_ze_strerror(unsigned int result) { const char *errname = NULL; const char *errdesc = NULL; switch ((ze_result_t) result) { #define GASNETI_ZE_RESULT(name,desc) \ case name: errname=#name; errdesc = desc; break; GASNETI_ZE_RESULT(ZE_RESULT_SUCCESS, "[Core] success") GASNETI_ZE_RESULT(ZE_RESULT_NOT_READY, "[Core] synchronization primitive not signaled") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_DEVICE_LOST, "[Core] device hung, reset, was removed, or driver update occurred") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY, "[Core] insufficient host memory to satisfy call") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY, "[Core] insufficient device memory to satisfy call") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_MODULE_BUILD_FAILURE, "[Core] error occurred when building module, see build log for details") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_MODULE_LINK_FAILURE, "[Core] error occurred when linking modules, see build log for details") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET, "[Core] device requires a reset") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE, "[Core] device currently in low power state") GASNETI_ZE_RESULT(ZE_RESULT_EXP_ERROR_DEVICE_IS_NOT_VERTEX, "[Core, Expoerimental] device is not represented by a fabric vertex") GASNETI_ZE_RESULT(ZE_RESULT_EXP_ERROR_VERTEX_IS_NOT_DEVICE, "[Core, Experimental] fabric vertex does not represent a device") GASNETI_ZE_RESULT(ZE_RESULT_EXP_ERROR_REMOTE_DEVICE, "[Core, Expoerimental] fabric vertex represents a remote device or subdevice") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS, "[Sysman] access denied due to permission level") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_NOT_AVAILABLE, "[Sysman] resource already in use and simultaneous access not allowed or resource was removed") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE, "[Tools] external required dependency is unavailable or missing") GASNETI_ZE_RESULT(ZE_RESULT_WARNING_DROPPED_DATA, "[Tools] data may have been dropped") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_UNINITIALIZED, "[Validation] driver is not initialized") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_UNSUPPORTED_VERSION, "[Validation] generic error code for unsupported versions") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, "[Validation] generic error code for unsupported features") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_ARGUMENT, "[Validation] generic error code for invalid arguments") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_NULL_HANDLE, "[Validation] handle argument is not valid") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE, "[Validation] object pointed to by handle still in-use by device") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_NULL_POINTER, "[Validation] pointer argument may not be nullptr") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_SIZE, "[Validation] size argument is invalid (e.g., must not be zero)") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_UNSUPPORTED_SIZE, "[Validation] size argument is not supported by the device (e.g., too large)") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT, "[Validation] alignment argument is not supported by the device (e.g., too small)") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT, "[Validation] synchronization object in invalid state") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_ENUMERATION, "[Validation] enumerator argument is not valid") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION, "[Validation] enumerator argument is not supported by the device") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT, "[Validation] image format is not supported by the device") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_NATIVE_BINARY, "[Validation] native binary is not supported by the device") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_GLOBAL_NAME, "[Validation] global variable is not found in the module") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_KERNEL_NAME, "[Validation] kernel name is not found in the module") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_FUNCTION_NAME, "[Validation] function name is not found in the module") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION, "[Validation] group size dimension is not valid for the kernel or device") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION, "[Validation] global width dimension is not valid for the kernel or device") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX, "[Validation] kernel argument index is not valid for kernel") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE, "[Validation] kernel argument size does not match kernel") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE, "[Validation] value of kernel attribute is not valid for the kernel or device") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_MODULE_UNLINKED, "[Validation] module with imports needs to be linked before kernels can be created from it.") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_INVALID_COMMAND_LIST_TYPE, "[Validation] command list type does not match command queue type") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_OVERLAPPING_REGIONS, "[Validation] copy operations do not support overlapping regions of memory") GASNETI_ZE_RESULT(ZE_RESULT_WARNING_ACTION_REQUIRED, "[Sysman] an action is required to complete the desired operation") GASNETI_ZE_RESULT(ZE_RESULT_ERROR_UNKNOWN, "[Core] unknown or internal error") GASNETI_ZE_RESULT(ZE_RESULT_FORCE_UINT32, NULL) #undef GASNETI_ZE_RESULT default: (void)0; } if (!errname) { return gasneti_dynsprintf("UNRECOGNIZED(0x%x)", result); } else if (errdesc) { return gasneti_dynsprintf("%s: %s", errname, errdesc); } else { return errname; } } #define gasneti_check_zecall(op) do { \ ze_result_t _result = (op); \ if_pf (_result != ZE_RESULT_SUCCESS ) { \ gasneti_fatalerror("%s returned %s", #op, \ gasneti_mk_ze_strerror((unsigned int)_result)); \ } \ } while (0) static const char *gasneti_formatmk_ze(gasneti_MK_t i_mk) { my_MK_t kind = (my_MK_t) i_mk; return gasneti_dynsprintf("ZE(gex_zeDevice=%p, gex_zeContext=%p, gex_zeMemoryOrdinal=%u)", (void*)kind->device, (void*)kind->context, (unsigned int)kind->ordinal); } static gasneti_mk_impl_t *get_impl(void); // // Class-specific MK_Create // int gasneti_MK_Create_ze( gasneti_MK_t *i_memkind_p, gasneti_Client_t client, const gex_MK_Create_args_t *args, gex_Flags_t flags) { gasneti_static_assert(sizeof(ze_device_handle_t) == sizeof(void*)); gasneti_static_assert(sizeof(ze_context_handle_t) == sizeof(void*)); // TODO: validation // is Device valid? // is Context valid? // is are Device and Context from the same Driver? // is MemoryOrdinal valid for this Device? my_MK_t result = (my_MK_t) gasneti_alloc_mk(client, get_impl(), flags); result->device = args->gex_args.gex_class_ze.gex_zeDevice; result->context = args->gex_args.gex_class_ze.gex_zeContext; result->ordinal = args->gex_args.gex_class_ze.gex_zeMemoryOrdinal; *i_memkind_p = (gasneti_MK_t) result; return GASNET_OK; } // // Class-specific Segment_Create // static int gasneti_MK_Segment_Create_ze( gasneti_Segment_t *i_segment_p, gasneti_MK_t i_mk, void * addr, uintptr_t size, gex_Flags_t flags) { my_MK_t kind = (my_MK_t) i_mk; ze_result_t result; void * to_free = NULL; const char * failure = NULL; if (addr) { // Client-allocated // check that addr properties match the kind ze_memory_allocation_properties_t props = {ZE_STRUCTURE_TYPE_MEMORY_ALLOCATION_PROPERTIES,}; ze_device_handle_t device = NULL; gasneti_check_zecall( zeMemGetAllocProperties(kind->context, addr, &props, &device) ); if (props.type == ZE_MEMORY_TYPE_UNKNOWN) { failure = "address was not allocated with the gex_zeContext passed to gex_MK_Create()"; } else if (props.type != ZE_MEMORY_TYPE_DEVICE) { failure = "address is not device memory"; } else if (device != kind->device) { failure = "address was not allocated from the gex_zeDevice passed to gex_MK_Create()"; } } else { // GASNet-allocated ze_device_mem_alloc_desc_t allocDesc = {ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC,}; allocDesc.ordinal = kind->ordinal; result = zeMemAllocDevice( kind->context, &allocDesc, size, 0, kind->device, &addr ); if (result != ZE_RESULT_SUCCESS) { failure = gasneti_mk_ze_strerror(result); } to_free = addr; } if (failure) { const char *msg = gasneti_dynsprintf("GEX_MK_CLASS_ZE: %s", failure); GASNETI_RETURN_ERRR(BAD_ARG, msg); } gasneti_Client_t client = i_mk->_client; gex_MK_t e_mk = gasneti_export_mk(i_mk); gasneti_Segment_t i_segment = gasneti_alloc_segment(client, addr, size, e_mk, !to_free, flags); i_segment->_opaque_mk_use = to_free; *i_segment_p = i_segment; return GASNET_OK; } static void gasneti_MK_Segment_Destroy_ze( gasneti_Segment_t i_segment) { void *to_free = i_segment->_opaque_mk_use; if (to_free) { my_MK_t kind = (my_MK_t) gasneti_import_mk_nonhost(i_segment->_kind); gasneti_check_zecall( zeMemFree(kind->context, to_free) ); } } // // Class-specific "impl(ementation)": constants and function pointers. // // Due to lack of designated initializers in GASNet's required C99 subset, we // address the fragility as the structure grows or changes by lazy explicit // initialization. static gasneti_mk_impl_t *get_impl(void) { // Static storage duration ensures these are zero-initialized static gasneti_mk_impl_t the_impl; static gasneti_mk_impl_t *result; if (!result) { static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); if (!result) { the_impl.mk_class = GEX_MK_CLASS_ZE; the_impl.mk_name = "ZE"; the_impl.mk_sizeof = sizeof(struct my_MK_s); the_impl.mk_format = &gasneti_formatmk_ze; the_impl.mk_destroy = NULL; // No class-specific MK_Destroy needed the_impl.mk_segment_create = gasneti_MK_Segment_Create_ze; the_impl.mk_segment_destroy = gasneti_MK_Segment_Destroy_ze; gasneti_sync_writes(); result = &the_impl; } gasneti_mutex_unlock(&lock); } else { gasneti_sync_reads(); } gasneti_assert(result); return result; } // Determine the kind's device ordinal, used by at least libfabric. // This is basic device enumeration, terminated when a matching device is found. // This works because enumeration calls are guaranteed to return the same // handle for each device every time. // If `gpu_only` is non-zero, skips devices with `type != ZE_DEVICE_TYPE_GPU`. // Returns -1 is there is no match found. int gasneti_mk_ze_device_ordinal(void *device_handle_arg, int gpu_only) { ze_device_handle_t theDevice = (ze_device_handle_t) device_handle_arg; uint32_t driverCount = 0; gasneti_check_zecall( zeDriverGet(&driverCount, NULL) ); ze_driver_handle_t *driverArray = gasneti_malloc(driverCount * sizeof(ze_driver_handle_t)); gasneti_check_zecall( zeDriverGet(&driverCount, driverArray) ); ze_device_handle_t *deviceArray = NULL; int count = 0; int result = -1; for (uint32_t i = 0; i < driverCount; ++i) { ze_driver_handle_t driver = driverArray[i]; uint32_t deviceCount = 0; gasneti_check_zecall( zeDeviceGet(driver, &deviceCount, NULL) ); deviceArray = gasneti_realloc(deviceArray, deviceCount * sizeof(ze_device_handle_t)); gasneti_check_zecall( zeDeviceGet(driver, &deviceCount, deviceArray) ); for (uint32_t j = 0; j < deviceCount; ++j) { ze_device_handle_t currDevice = deviceArray[j]; // Only count GPU devices in our enumeration // This is needed because, in general, we don't control the zeInit() arguments ze_device_properties_t deviceProperties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES,}; gasneti_check_zecall( zeDeviceGetProperties(currDevice, &deviceProperties) ); if (gpu_only && (deviceProperties.type != ZE_DEVICE_TYPE_GPU)) continue; if (currDevice == theDevice) { result = count; goto done; } ++count; } } done: gasneti_free(deviceArray); gasneti_free(driverArray); return result; } #endif gasnet-2025.8.0/other/kinds/gasnet_refkinds.c0000664000175000017500000002024115142313673021164 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/kinds/gasnet_refkinds.c $ * Description: GASNet Memory Kinds Implementation * Copyright (c) 2020, The Regents of the University of California * Terms of use are as specified in license.txt */ #define GASNETI_NEED_GASNET_MK_H 1 #include #include // Convenience macro #define MK_IMPL(i_mk,short_field) ((i_mk)->_mk_impl->mk_##short_field) #ifndef gasneti_import_mk gasneti_MK_t gasneti_import_mk(gex_MK_t _mk) { const gasneti_MK_t _real_mk = GASNETI_IMPORT_POINTER(gasneti_MK_t,_mk); GASNETI_IMPORT_MAGIC(_real_mk, MK); return _real_mk; } #endif #ifndef gasneti_import_mk_nonhost gasneti_MK_t gasneti_import_mk_nonhost(gex_MK_t _mk) { if (_mk == GEX_MK_HOST) { gasneti_fatalerror("Invalid use of GEX_MK_HOST where prohibited"); } return gasneti_import_mk(_mk); } gasneti_MK_t gasneti_import_mk_nonhost_valid(gex_MK_t mk) { gasneti_assert(mk != GEX_MK_INVALID); return gasneti_import_mk_nonhost(mk); } #endif #ifndef gasneti_export_mk gex_MK_t gasneti_export_mk(gasneti_MK_t _real_mk) { GASNETI_CHECK_MAGIC(_real_mk, GASNETI_MK_MAGIC); return GASNETI_EXPORT_POINTER(gex_MK_t, _real_mk); } #endif gasneti_MK_t gasneti_alloc_mk( gasneti_Client_t i_client, gasneti_mk_impl_t *mk_impl, gex_Flags_t flags) { gasneti_assert(mk_impl); gasneti_MK_t mk; size_t alloc_size = mk_impl->mk_sizeof ? mk_impl->mk_sizeof : sizeof(*mk); gasneti_assert(alloc_size >= sizeof(*mk)); mk = gasneti_calloc(1, alloc_size); GASNETI_INIT_MAGIC(mk, GASNETI_MK_MAGIC); mk->_cdata = NULL; mk->_flags = flags; mk->_client = i_client; mk->_mk_class = mk_impl->mk_class; mk->_mk_impl = mk_impl; mk->_mk_conduit = NULL; gasneti_weakatomic32_set(&mk->_ref_count, 0, 0); return mk; } void gasneti_free_mk(gasneti_MK_t mk) { GASNETI_INIT_MAGIC(mk, GASNETI_MK_BAD_MAGIC); gasneti_free(mk); } void gasneti_destroy_mk(gasneti_MK_t mk, gex_Flags_t flags) { gasneti_assert(0 == gasneti_weakatomic32_read(&mk->_ref_count, 0)); if (MK_IMPL(mk,destroy)) MK_IMPL(mk,destroy)(mk, flags); else gasneti_free_mk(mk); } int gex_MK_Create( gex_MK_t *memkind_p, gex_Client_t e_client, const gex_MK_Create_args_t *args, gex_Flags_t flags) { gasneti_Client_t client = gasneti_import_client(e_client); gasneti_MK_t result = NULL; int rc = GASNET_ERR_BAD_ARG; GASNETI_TRACE_PRINTF(O,("gex_MK_Create: client='%s' flags=%d", client ? client->_name : "(NULL)", flags)); GASNETI_CHECK_INJECT(); if (! client) { gasneti_fatalerror("Invalid call to gex_MK_Create with NULL client"); } if (!memkind_p) { gasneti_fatalerror("Invalid call to gex_MK_Create with NULL memkind_p"); } if (!args) { gasneti_fatalerror("Invalid call to gex_MK_Create with NULL args"); } if (flags) { gasneti_fatalerror("Invalid call to gex_MK_Create with non-zero flags"); } if (args->gex_flags) { gasneti_fatalerror("Invalid call to gex_MK_Create with non-zero args->gex_flags"); } switch (args->gex_class) { case GEX_MK_CLASS_HOST: gasneti_fatalerror("Invalid call to gex_MK_Create with GEX_MK_CLASS_HOST"); break; case GEX_MK_CLASS_CUDA_UVA: #if GASNET_HAVE_MK_CLASS_CUDA_UVA rc = gasneti_MK_Create_cuda_uva(&result, client, args, flags); #else GASNETI_RETURN_ERRR(BAD_ARG,"This build lacks support for GEX_MK_CLASS_CUDA_UVA"); #endif break; case GEX_MK_CLASS_HIP: #if GASNET_HAVE_MK_CLASS_HIP rc = gasneti_MK_Create_hip(&result, client, args, flags); #else GASNETI_RETURN_ERRR(BAD_ARG,"This build lacks support for GEX_MK_CLASS_HIP"); #endif break; case GEX_MK_CLASS_ZE: #if GASNET_HAVE_MK_CLASS_ZE rc = gasneti_MK_Create_ze(&result, client, args, flags); #else GASNETI_RETURN_ERRR(BAD_ARG,"This build lacks support for GEX_MK_CLASS_ZE"); #endif break; default: gasneti_unreachable_error(("Unknown MK class: %i",(int)args->gex_class)); } if (! rc) { // Sanity checks on per-class initialization gasneti_assert(result->_mk_class == args->gex_class); gasneti_assert(result->_mk_impl); gasneti_assert(MK_IMPL(result,class) == args->gex_class); gasneti_assert(MK_IMPL(result,name)); gasneti_assert(strlen(MK_IMPL(result,name))); } #if GASNETC_MK_CREATE_HOOK if (! rc) { // Conduit-specific hook, if any rc = gasnetc_mk_create_hook(result, client, args, flags); if (rc) gasneti_destroy_mk(result, 0); // TODO: any flags to pass through? } #endif if (! rc) { *memkind_p = gasneti_export_mk(result); } return rc; } void gex_MK_Destroy( gex_MK_t e_mk, gex_Flags_t flags) { if (e_mk == GEX_MK_INVALID) { gasneti_fatalerror("Invalid call to gex_MK_Destroy(GEX_MK_INVALID)"); } if (e_mk == GEX_MK_HOST) { gasneti_fatalerror("Invalid call to gex_MK_Destroy(GEX_MK_HOST)"); } gasneti_MK_t i_mk = gasneti_import_mk(e_mk); // "this" gasneti_assert(i_mk->_mk_impl); gasneti_assert(MK_IMPL(i_mk,name)); GASNETI_TRACE_PRINTF(O,("gex_MK_Destroy: memkind=%p, class='%s' flags=%d", (void*)e_mk, MK_IMPL(i_mk,name), flags)); GASNETI_CHECK_INJECT(); if (flags) { gasneti_fatalerror("Invalid call to gex_MK_Destroy with non-zero flags"); } uint32_t ref_count = gasneti_weakatomic32_read(&i_mk->_ref_count, 0); if (ref_count) { gasneti_fatalerror("Invalid call to gex_MK_Destroy with ref_count=%u", (unsigned int)ref_count); } #if GASNETC_MK_DESTROY_HOOK // Conduit-specific hook, if any gasnetc_mk_destroy_hook(i_mk); #endif gasneti_destroy_mk(i_mk, flags); } int gasneti_MK_Segment_Create( gasneti_Segment_t *i_segment_p, gasneti_Client_t i_client, void *addr, uintptr_t size, gex_MK_t e_mk, gex_Flags_t flags) { gasneti_assert(e_mk != GEX_MK_INVALID); // Caller should have already checked user args gasneti_MK_t i_mk = gasneti_import_mk_nonhost(e_mk); if (i_mk->_client != i_client) { gasneti_fatalerror("Invalid call to gex_Segment_Create with a gex_MK_t from a different client"); } // Class-specific hook, if any if (MK_IMPL(i_mk,segment_create)) { int rc = MK_IMPL(i_mk,segment_create)(i_segment_p, i_mk, addr, size, flags); if (rc) return rc; } else { GASNETI_RETURN_ERRR(BAD_ARG,"gex_Segment_Create() called on unsupported memory kind"); } gasneti_weakatomic32_increment(&i_mk->_ref_count, 0); return GASNET_OK; } void gasneti_MK_Segment_Destroy( gasneti_Segment_t i_segment) { gasneti_assert(i_segment); gasneti_MK_t i_mk = gasneti_import_mk_nonhost(i_segment->_kind); // Class-specific hook, if any if (MK_IMPL(i_mk,segment_destroy)) { MK_IMPL(i_mk,segment_destroy)(i_segment); } gasneti_weakatomic32_decrement(&i_mk->_ref_count, 0); } const char *gasneti_formatmk( gex_MK_t e_mk) { if (e_mk == GEX_MK_INVALID) { return "GEX_MK_INVALID"; } else if (e_mk == GEX_MK_HOST) { return "GEX_MK_HOST"; } gasneti_MK_t i_mk = gasneti_import_mk_nonhost(e_mk); if (MK_IMPL(i_mk,format)) return MK_IMPL(i_mk,format)(i_mk); else return MK_IMPL(i_mk,name); } int gasneti_mk_segment_context_push(gasneti_Segment_t i_segment) { gasneti_assert(i_segment); if (i_segment->_kind != GEX_MK_HOST) { gasneti_MK_t i_mk = gasneti_import_mk_nonhost(i_segment->_kind); if (MK_IMPL(i_mk,segment_context_push)) { // Class-specific hook, if any return MK_IMPL(i_mk,segment_context_push)(i_segment); } } return 0; } int gasneti_mk_segment_context_pop(gasneti_Segment_t i_segment) { gasneti_assert(i_segment); if (i_segment->_kind != GEX_MK_HOST) { gasneti_MK_t i_mk = gasneti_import_mk_nonhost(i_segment->_kind); if (MK_IMPL(i_mk,segment_context_pop)) { // Class-specific hook, if any return MK_IMPL(i_mk,segment_context_pop)(i_segment); } } return 0; } gasnet-2025.8.0/other/kinds/gasnet_kinds_internal.h0000664000175000017500000001066615142313673022402 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/kinds/gasnet_kinds_internal.h $ * Description: GASNet Memory Kinds Internal Header * Copyright (c) 2020, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _GASNET_KINDS_INTERNAL_H #define _GASNET_KINDS_INTERNAL_H /*---------------------------------------------------------------------------------*/ // // Common logic for use by memory kinds implementatons // #define GASNETI_MK_MAGIC GASNETI_MAKE_MAGIC('M','K','_','t') #define GASNETI_MK_BAD_MAGIC GASNETI_MAKE_BAD_MAGIC('M','K','_','t') // Optional default allocation gasneti_MK_t gasneti_alloc_mk( gasneti_Client_t i_client, gasneti_mk_impl_t *mk_impl, gex_Flags_t flags); // Optional default free void gasneti_free_mk(gasneti_MK_t mk); /*---------------------------------------------------------------------------------*/ // // Declarations for class-specific create functions // #define GASNETI_MK_CLASS_DECL(kind) \ extern int gasneti_MK_Create_##kind( \ gasneti_MK_t *i_mk_p, \ gasneti_Client_t i_client, \ const gex_MK_Create_args_t *args, \ gex_Flags_t flags); #if GASNET_HAVE_MK_CLASS_CUDA_UVA GASNETI_MK_CLASS_DECL(cuda_uva) #endif #if GASNET_HAVE_MK_CLASS_HIP GASNETI_MK_CLASS_DECL(hip) #endif #if GASNET_HAVE_MK_CLASS_ZE GASNETI_MK_CLASS_DECL(ze) #endif /*---------------------------------------------------------------------------------*/ // // Dispatch table for class-specific operations // struct gasneti_mk_impl_s { // GEX_MK_CLASS_* enum value gex_MK_Class_t mk_class; // The characters after GEX_MK_CLASS_. Used in tracing and other messages const char *mk_name; // Size of class-specific gasneti_MK_t. // Must include the GASNETI_MK_COMMON fields (required as prefix) // If zero, then only space for the COMMON fields is allocated size_t mk_sizeof; // Class-specific implementation of gasneti_formatmk() // If NULL, the default uses mk_name const char * (*mk_format)(gasneti_MK_t); // Hook for gex_MK_Destroy() // If NULL, the default is to call gasneti_free_mk() void (*mk_destroy)(gasneti_MK_t, gex_Flags_t); // Hook for gex_Segment_Create() // If NULL, the default is failure of gex_Segment_Create() with GASNET_ERR_BAD_ARG int (*mk_segment_create)(gasneti_Segment_t *, gasneti_MK_t, void *, uintptr_t, gex_Flags_t); // Hook for gex_Segment_Destroy() // If NULL, the default is no class-specific destruction void (*mk_segment_destroy)(gasneti_Segment_t); // Push and pop of a "context" if any // If NULL, the default is no class-specific operation int (*mk_segment_context_push)(gasneti_Segment_t); int (*mk_segment_context_pop)(gasneti_Segment_t); }; #endif /* ------------------------------------------------------------------------------------ */ // Hooks to invoke conduit-specific functionality from common conduit-independent code. // Conduits requiring use of one or more of these should define the // corresponding preprocessor identifier in their gasnet_core_fwd.h. #if GASNETC_MK_CREATE_HOOK // Called after conduit-independent MK creation steps in gex_MK_Create(). // // Typical uses include verification that the kind can be supported, and // initialization of per-device resources (such as a memory registration cache). // The `_mk_conduit` field in `gasneti_MK_t` is a `void *` reserved for // use by the conduit. // // On success, returns GASNET_OK and the infrastructure will call the // matching destroy hook (if any), when the MK is destroyed. // On failure, returns any other value and the infrastructure will NOT call // any matching destroy hook, leaving this hook responsible for cleanup of // any conduit-specific state prior to such an error return. extern int gasnetc_mk_create_hook( gasneti_MK_t kind, gasneti_Client_t client, const gex_MK_Create_args_t *args, gex_Flags_t flags); #endif #if GASNETC_MK_DESTROY_HOOK // Called prior to conduit-independent MK destruction steps in gex_MK_Create(). // // Typical uses include cleanup of resources allocated in a Create hook. extern void gasnetc_mk_destroy_hook(gasneti_MK_t kind); #endif gasnet-2025.8.0/other/kinds/gasnet_hip.c0000664000175000017500000002032715142313673020144 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/kinds/gasnet_hip.c $ * Description: GASNet Memory Kinds Implementation for HIP devices * Copyright (c) 2021, The Regents of the University of California * Terms of use are as specified in license.txt */ #define GASNETI_NEED_GASNET_MK_H 1 #include #include #if GASNET_HAVE_MK_CLASS_HIP // Else empty #include GASNETI_IDENT(gasneti_IdentString_MKClassHIP, "$GASNetMKClassHIP: 1 $"); #if GASNETI_HIP_PLATFORM_AMD GASNETI_IDENT(gasneti_IdentString_HIPPlatform, "$GASNetHIPPlatform: AMD $"); #elif GASNETI_HIP_PLATFORM_NVIDIA GASNETI_IDENT(gasneti_IdentString_HIPPlatform, "$GASNetHIPPlatform: NVIDIA $"); #else #error Unknown HIP Platform #endif // // Class-specific MK type and functions // typedef struct my_MK_s { GASNETI_MK_COMMON // Class-indep prefix hipDevice_t dev; } *my_MK_t; // Format for use of hipGetErrorName() #define GASNETI_HIPRESULT_FMT "%s(%d)" #define GASNETI_HIPRESULT_ARG(res) hipGetErrorName(res),(res) // // Error checking/reporting wrapper // #define gasneti_check_hipcall(op) do { \ hipError_t _retval = (op); \ if_pf (_retval) { \ gasneti_fatalerror("%s returned "GASNETI_HIPRESULT_FMT,#op,GASNETI_HIPRESULT_ARG(_retval));\ } \ } while (0) static gasneti_mk_impl_t *get_impl(void); // Convenience wrappers around hip{Get,Set}Device() #define GASNETI_SAVE_AND_SET_HIP_DEVICE(kind, prev) do { \ gasneti_check_hipcall( hipGetDevice(&(prev)) ); \ if ((prev) != (kind)->dev) { \ gasneti_check_hipcall( hipSetDevice((kind)->dev) ); \ } \ } while (0) #define GASNETI_RESTORE_HIP_DEVICE(kind, prev) do { \ if ((prev) != (kind)->dev) { \ gasneti_check_hipcall( hipSetDevice(prev) ); \ } \ } while (0) static const char *gasneti_formatmk_hip(gasneti_MK_t i_mk) { my_MK_t kind = (my_MK_t) i_mk; return gasneti_dynsprintf("HIP(gex_hipDevice=%i)", (int)kind->dev); } // // Class-specific MK_Create // int gasneti_MK_Create_hip( gasneti_MK_t *i_memkind_p, gasneti_Client_t client, const gex_MK_Create_args_t *args, gex_Flags_t flags) { hipDevice_t dev = args->gex_args.gex_class_hip.gex_hipDevice; GASNETI_TRACE_PRINTF(O,("gex_MK_Create: class=HIP gex_hipDevice=%d", dev)); if (dev < 0) { // This is always treated as programmer error gasneti_fatalerror("gex_MK_Create called with negative hipDevice_t=%i", dev); } // Get handle for the user-specified device to validate hipDevice_t devHandle; hipError_t res = hipDeviceGet(&devHandle, dev); if (res != hipSuccess) { // try to Init (should not be necessary, but might as well try) int initRes = hipInit(0); if (initRes == hipSuccess) { res = hipDeviceGet(&devHandle, dev); } else if (initRes == hipErrorNoDevice) { GASNETI_RETURN_ERRR(BAD_ARG,"GEX_MK_CLASS_HIP: no HIP devices found"); } else { const char *msg = gasneti_dynsprintf("GEX_MK_CLASS_HIP: hipInit() returned "GASNETI_HIPRESULT_FMT, GASNETI_HIPRESULT_ARG(initRes)); GASNETI_RETURN_ERRR(BAD_ARG,msg); } } // Failed to get the device handle for the user-provided device, try to reason out why // TODO: explicit diagnosis of more failure cases if_pf (res != hipSuccess) { const char *why = "unknown failure"; if (res == hipErrorInvalidDevice) { int dev_count; if (hipGetDeviceCount(&dev_count)) { why = "hipGetDeviceCount() failed"; } else if (! dev_count) { why = "no HIP devices found"; } else { why = gasneti_dynsprintf("invalid gex_hipDevice=%i (%d devices found)", dev, dev_count); } } else { why = gasneti_dynsprintf("hipDeviceGet(%i,...) returned "GASNETI_HIPRESULT_FMT, dev, GASNETI_HIPRESULT_ARG(res)); } const char *msg = gasneti_dynsprintf("GEX_MK_CLASS_HIP: %s", why); GASNETI_RETURN_ERRR(BAD_ARG,msg); } my_MK_t result = (my_MK_t) gasneti_alloc_mk(client, get_impl(), flags); result->dev = dev; #if 0 // TODO: enable if HIP has equivalent of CU_POINTER_ATTRIBUTE_SYNC_MEMOPS result->use_sync_memops = gasneti_getenv_yesno_withdefault("GASNET_USE_HIP_SYNC_MEMOPS", 1); #endif *i_memkind_p = (gasneti_MK_t) result; return GASNET_OK; } // // Class-specific Segment_Create // static int gasneti_MK_Segment_Create_hip( gasneti_Segment_t *i_segment_p, gasneti_MK_t i_mk, void * addr, uintptr_t size, gex_Flags_t flags) { my_MK_t kind = (my_MK_t) i_mk; hipError_t result; void * to_free = NULL; int retval = GASNET_OK; // TODO: // Might want additional care with respect to error returns from the HIP device API. int prevDevice; GASNETI_SAVE_AND_SET_HIP_DEVICE(kind, prevDevice); if (addr) { // Client-allocated hipPointerAttribute_t attr; gasneti_check_hipcall(hipPointerGetAttributes(&attr, addr)); enum hipMemoryType memoryType; #if HIP_VERSION_MAJOR < 6 // Deprecated since 5.5 and removed in 6.0 memoryType = attr.memoryType; #else // Present since 5.5 memoryType = attr.type; #endif if (memoryType != hipMemoryTypeDevice) { gasneti_fatalerror("Invalid call to gex_Segment_Create(HIP) with non-device memory"); } if (attr.isManaged) { gasneti_fatalerror("Invalid call to gex_Segment_Create(HIP) with managed memory"); } if (attr.device != kind->dev) { gasneti_fatalerror("Invalid call to gex_Segment_Create(HIP) with memory associated with wrong device"); } } else { // GASNet-allocated result = hipMalloc(&addr, size); if (result == hipErrorOutOfMemory) { retval = GASNET_ERR_RESOURCE; goto out; } else if (result != hipSuccess) { gasneti_fatalerror("hipMalloc() returned unexpected failure: " GASNETI_HIPRESULT_FMT, GASNETI_HIPRESULT_ARG(result)); } to_free = addr; } #if 0 if (kind->use_sync_memops) { // TODO: if HIP has equivalent of CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, apply it here } #endif gasneti_Client_t client = i_mk->_client; gex_MK_t e_mk = gasneti_export_mk(i_mk); gasneti_Segment_t i_segment = gasneti_alloc_segment(client, addr, size, e_mk, !to_free, flags); i_segment->_opaque_mk_use = to_free; *i_segment_p = i_segment; out: GASNETI_RESTORE_HIP_DEVICE(kind, prevDevice); return retval; } static void gasneti_MK_Segment_Destroy_hip( gasneti_Segment_t i_segment) { void *to_free = i_segment->_opaque_mk_use; if (to_free) { gasneti_check_hipcall( hipFree(to_free) ); } } // // Class-specific "impl(ementation)": constants and function pointers. // // Due to lack of designated initializers in GASNet's required C99 subset, we // address the fragility as the structure grows or changes by lazy explicit // initialization. static gasneti_mk_impl_t *get_impl(void) { // Static storage duration ensures these are zero-initialized static gasneti_mk_impl_t the_impl; static gasneti_mk_impl_t *result; if (!result) { static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); if (!result) { the_impl.mk_class = GEX_MK_CLASS_HIP; the_impl.mk_name = "HIP"; the_impl.mk_sizeof = sizeof(struct my_MK_s); the_impl.mk_format = &gasneti_formatmk_hip; the_impl.mk_destroy = NULL; // No class-specific MK_Destroy needed the_impl.mk_segment_create = &gasneti_MK_Segment_Create_hip; the_impl.mk_segment_destroy = &gasneti_MK_Segment_Destroy_hip; gasneti_sync_writes(); result = &the_impl; } gasneti_mutex_unlock(&lock); } else { gasneti_sync_reads(); } gasneti_assert(result); return result; } #endif gasnet-2025.8.0/other/pmi-spawner/0000775000175000017500000000000015142313673017005 5ustar alastairalastairgasnet-2025.8.0/other/pmi-spawner/README0000664000175000017500000001750715142313673017677 0ustar alastairalastairREADME file for pmi-spawner =========================== @ TOC: @ @ Section: Overview @ @ Section: Basic Usage @ @ Section: Compatibility @ @ Section: Build-time Configuration @ @ Section: Runtime Configuration @ @ Section: Overview @ This document describes pmi-spawner, a component of the GASNet runtime library which allows applications using many GASNet conduits to utilize an installed PMI-based job spawner. PMI stands for "Process Management Interface" and it is a standard for interaction between a distributed job spawner and the processes they launch. Instances of PMI-based spawners include SLURM's "srun", and the "mpiexec.hydra" process manager distributed with MPICH and by many of its derivatives, including the "yod" distributed with portals4. On systems where PMI is used as the basis for launching MPI applications, the pmi-spawner may be as simple and reliable a mechanism for GASNet job launch as mpi-spawner, but without the resource usage associated with initializing the MPI runtime (which GASNet will not even use outside of startup and shutdown). @ Section: Basic Usage @ + Usage summary (option 1): Many languages and libraries built over GASNet provide their own commands for job launch. These should be used instead of GASNet's whenever possible. They typically wrap the mechanisms described below, while providing additional options specific to the language or library. The remaining options are documented here mainly for those who are implementing such a wrapper. + Usage summary (option 2): Conduits which support pmi-spawner each include a spawner utility named for the conduit: gasnetrun_[conduit] -n [options] [--] prog [program args] options: -n number of processes to run (required) -N number of nodes to run on (not always supported) -c number of cpus per process (not always supported) -E list of environment vars to propagate -v be verbose about what is happening -t test only, don't execute anything (implies -v) -k keep any temporary files created (implies -v) -spawner= force use of a specific spawner ([supported spawners]) -- ends option parsing The pmi-spawner described in this README is used if selected by one of the following three mechanisms, in order from greatest to least precedence: + Passing -spawner=pmi to the gasnetrun_[conduit] utility + Setting GASNET_[CONDUIT]_SPAWNER=pmi in the environment + If pmi-spawner was established as the default at configure time (see Build-time Configuration, below). + Usage summary (option 3): Provided GASNET_[CONDUIT]_SPAWNER=pmi in the environment, applications linked to a GASNet library with pmi-spawner support may be launched using the process manager's native launcher, such as `srun`, `aprun` or `yod`, among others. In general, it is not sufficient in this native launch scenario to establish pmi-spawner as the default at configure time; setting the environment variable GASNET_[CONDUIT]_SPAWNER=pmi is required. @ Section: Compatibility @ GASNet's pmi-spawner is believed to be compatible with the PMI1 and PMI2 libraries provided by MPICH (and its many derivatives), Cray, SLURM and Open MPI / Open PMIx. GASNet's pmi-spawner is believed to be compatible with at least API versions 2 and 3 of the PMIx library provided by Open MPI / Open PMIx. While API version 1 is not supported, the PMIx distributions which implement it are all believed to provide supported libraries for PMI2 and PMI1. Note that compatibility between the client library (which pmi-spawner uses) and the server (implemented by a process manager such as hydra, alps, slurm, orted, etc.) is also an important requirement. In general, one should use a PMI header and library pair from the same vendor or project as the process manager. Though some inter-product compatibility does exist, that topic is outside the scope of this document. @ Section: Build-time Configuration @ Conduits which support pmi-spawner each accept a configure option of the form --with-[conduit]-spawner=VALUE where VALUE is one of "mpi", "ssh", or "pmi". This sets the default spawner used by the corresponding gasnetrun_[conduit] utility, as described in the "Basic Usage" section above. Passing '--with-[conduit]-spawner=pmi' sets the default for the corresponding conduit, and additionally ensures that configure will fail if the corresponding conduit is to be built but PMI support was not found. In order to use pmi-spawner, a working PMI client library must be identified at configure time, and pmi-spawner must be instructed how to execute the corresponding PMI server. The following configure options are used for those purposes: --{enable,disable}-pmi Enables or disables PMI support. Default is to probe for availability. If '--enable-pmi' is given then configure will fail if a PMI client library cannot be identified. --with-pmi-home=DIR Explicitly provide DIR as the install prefix of the PMI support. DIR is taken as the directory containing an "include" subdirectory, and is also searched for "lib", "lib32" or "lib64" (as appropriate) unless the configure option '--with-pmi-ldflags' is also specified. Without this option configure will search the standard locations for headers and libraries. --with-pmi-ldflags=-L/path/to/pmi/lib This option specifies the linker flags needed to link the PMI client library, overriding the default search. Usually of the form -L/path/to/pmi/lib --with-pmi-libs=VALUE This option disables the default search logic for a PMI client library and uses the VALUE of this option as the linker argument to specify the library. This is useful if one needs to use a PMI implementation not yet recognized by GASNet's configure logic. Some example values include "-lpmi_runtime" or "/full/path/to/libpmi_static.a". Values such as "-Wl,-rpath=DIR -lpmi" may be used to deal with the case that DIR is not in the default shared library search path at run time (please note that this example is linker-specific). --with-pmi-version=VALUE (where VALUE must be 1, 2, or x) If present, this option forces configure to only accept a client library which implements the given version of the PMI specification. This is normally only required if several are available but the PMI server supports one but not the other. --with-pmirun-cmd=VALUE At runtime, the PMIRUN_CMD environment variable (documented below) controls how pmi-spawner executes the PMI server command. This configure option establishes a default value for that variable. If this option is not passed then the configure time value of the environment variable PMIRUN_CMD is used. If neither this option nor the PMIRUN_CMD environment variable provides a default value, then the value of MPIRUN_CMD selected by configure will be used. This is a reasonable behavior on systems where MPI launch is also PMI based. However, it can sometimes lead to unexpected behaviors (such as delays at startup or shutdown). For this reason, one is encouraged to pass '--with-pmirun-cmd=VALUE' or set PMIRUN_CMD explicitly if pmi-spawner will be used. @ Section: Runtime Configuration @ Recognized Environment Variables: * PMIRUN_CMD - a template for executing the PMI server process. A default value is established at configure time, but a value set at run time will take precedence over that default. The format of this variable is identical to that of MPIRUN_CMD, which is documented in mpi-conduit's README. * MPIRUN_CMD - a template for executing mpirun, or its equivalent. At configuration time this variable is used to establish a default for PMIRUN_CMD if it is not set. gasnet-2025.8.0/other/pmi-spawner/gasnet_bootstrap_pmi.c0000664000175000017500000006505715142313673023411 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/pmi-spawner/gasnet_bootstrap_pmi.c $ * Description: GASNet conduit-independent pmi-based spawner * Copyright 2013, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include #if GASNETI_PMIX_HACK // PMIx uses [mc]alloc(), free(), strdup() within its headers (regardless of // whether you use the PMI-1, PMI-2, or PMIx API) # undef malloc # undef calloc # undef free # undef strdup # undef strndup # undef strcasecmp # undef strncasecmp # undef realloc #endif #if HAVE_PMI_CRAY_H # include # define USE_PMI2_API 1 # ifndef PMI2_SUCCESS # define PMI2_SUCCESS PMI_SUCCESS # endif #elif HAVE_PMI_H # include #elif HAVE_PMI2_H # include # define USE_PMI2_API 1 #elif HAVE_PMIX_H # if HAVE_STDBOOL_H # include /* For use of "bool" in PMIx headers */ # endif # include # define USE_PMIX_API 1 #else # error "Unknown path to PMI header" #endif /* Sigh. For portals4/pmi.h and perhaps others. */ #ifndef PMI_TRUE typedef int PMI_BOOL; # define PMI_TRUE 1 # define PMI_FALSE 0 #endif // The ANL, Cray and Open PMIx PMI servers do not behave "well" for multiple // Puts to the same key (though the behaviors differ). We cannot currently // determine if we are using a server which does behave nicely (currently // only SLURM that we are aware of) because the servers and clients from // multiple projects are (intentionally) implementing the same wire // protocols. Notably SLURM adopts others' wire protocols to launch // unmodified MPICH and Open MPI applications. #if defined(GASNETI_PMI_DUP_KEYS) // enforce 1 or undef #if GASNETI_PMI_DUP_KEYS #undef GASNETI_PMI_DUP_KEYS #define GASNETI_PMI_DUP_KEYS 1 #else #undef GASNETI_PMI_DUP_KEYS #endif #endif // We really don't want to use PMI "point-to-point" on a Cray. // So, if the configure probe for PMI_Allgather() failed, we force // it here. We rather this results in an application link failure // than the alternative: use of the non-scalable bootstrapExchange(). // TODO: revisit if/when we have a more scalable PMI based Exchange. #if HAVE_PMI_CRAY_H && !defined(HAVE_PMI_ALLGATHER) #define HAVE_PMI_ALLGATHER 1 #endif GASNETI_IDENT(gasnetc_IdentString_HavePMISpawner, "$GASNetPMISpawner: 1 $"); static gasneti_spawnerfn_t const spawnerfn; static char *kvs_name = NULL, *kvs_key = NULL, *kvs_value = NULL; static int max_name_len, max_key_len, max_val_len; static int max_val_bytes; #ifdef USE_PMIX_API static pmix_proc_t myproc; #endif static int kvs_is_init = 0; // Gates lazy initialization #if GASNETI_PMI_DUP_KEYS // op "maps" used for GC of *only* previously-used keys // bit0 (value 1) set if phase 0 key used // bit1 (value 2) set if phase 1 key used #define OP_INC_MAP(stem,phase) op_##stem##_map |= (((phase)&1)+1) static unsigned int op_X_map, op_E_map, op_A_map, op_B_map, op_S_map; #else #define OP_INC_MAP(stem,phase) ((void)0) #endif /* do_{en,de}code() * Use a (minor) variant on Adobe's Ascii85 encoding. * See http://en.wikipedia.org/wiki/Ascii85 * No begin or end delimiters (or explict length) are required. * We add a 'y' exception to encode 0xFFFFFFFF (NOT the 'y'=0x20202020 exception in btoa) * We use 'v', 'w', and 'x' to deal with Cray PMI oddities. */ #if USE_PMI2_API /* Cray disallows '/', ';' and '=' */ GASNETI_INLINE(a85_enc) uint8_t a85_enc(uint8_t c) { c += '!'; switch (c) { case '/': return 'v'; case ';': return 'w'; case '=': return 'x'; default: return c; } } GASNETI_INLINE(a85_dec) uint8_t a85_dec(uint8_t c) { switch (c) { case 'v': return ('/' - '!'); case 'w': return (';' - '!'); case 'x': return ('=' - '!'); default: return (c - '!'); } } #else # define a85_enc(_c) ((_c) + '!') # define a85_dec(_c) ((_c) - '!') #endif static void do_encode(uint8_t *in, size_t len) { #if HAVE_PMI_CRAY_H // Cray PMI erroneously encodes a zero-length argument as the 6-char string "(null)" if (!len) { kvs_value[0] = 'z'; kvs_value[1] = '\0'; return; } #endif char *p = kvs_value; gasneti_assert_always(5 * ((len + 3) / 4) <= max_val_len); while (len) { uint32_t x = 0; const int sz = MIN(4, len); int i; for (i=0; i> (8 * pad); } i = sz; while (i--) { out[i] = x & 0xff; x = x >> 8; } len -= sz; out += sz; } // Check that we consumed the entire input size_t decoded = p - kvs_value; gasneti_assert_always_uint(decoded ,==, in_len); } /* Key generation helpers * * Default: * Stem - a single upper case char * Counter - 32-bit hex w/ a single-char separator * X,Y - 32-bit numbers expressed in hex w/ a single-char separator * Resulting max: 1 + 8 + 1 + 8 + 1 + 8 = 27 char * * GASNETI_PMI_DUP_KEYS: * Stem - a single upper case char * Counter - least significant bit determines upper/lower case use of Stem * X,Y - 32-bit numbers expressed in hex w/ a single-char separator * Resulting max: 1 + 8 + 1 + 8 = 18 char * * TODO: base85 could reduce the 8-char fields to max 5 chars each. */ static void do_kvs_key0(char stem, unsigned int counter) { gasneti_assert(isupper(stem)); #if GASNETI_PMI_DUP_KEYS kvs_key[0] = (counter&1) ? stem : tolower(stem); kvs_key[1] = '\0'; #else int rc = snprintf(kvs_key, max_key_len, "%c%x", stem, counter); gasneti_assert_always_int(rc ,>, 0); gasneti_assert_always_int(rc ,<, max_key_len); #endif } static void do_kvs_key1(char stem, unsigned int counter, unsigned int x) { gasneti_assert(isupper(stem)); #if GASNETI_PMI_DUP_KEYS char c = (counter&1) ? stem : tolower(stem); int rc = snprintf(kvs_key, max_key_len, "%c%x", c, x); #else int rc = snprintf(kvs_key, max_key_len, "%c%x.%x", stem, counter, x); #endif gasneti_assert_always_int(rc ,>, 0); gasneti_assert_always_int(rc ,<, max_key_len); } static void do_kvs_key2(char stem, unsigned int counter, unsigned int x, unsigned int y) { gasneti_assert(isupper(stem)); #if GASNETI_PMI_DUP_KEYS char c = (counter&1) ? stem : tolower(stem); int rc = snprintf(kvs_key, max_key_len, "%c%x.%x", c, x, y); #else int rc = snprintf(kvs_key, max_key_len, "%c%x.%x.%x", stem, counter, x, y); #endif gasneti_assert_always_int(rc ,>, 0); gasneti_assert_always_int(rc ,<, max_key_len); } /* Put/Get/Fence wrappers */ GASNETI_INLINE(do_kvs_put) void do_kvs_put(void *value, size_t sz, int is_local) { #if USE_PMIX_API pmix_value_t val; pmix_status_t ret; val.type = PMIX_BYTE_OBJECT; val.data.bo.bytes = value; val.data.bo.size = sz; ret = PMIx_Put(is_local ? PMIX_LOCAL : PMIX_GLOBAL, kvs_key, &val); gasneti_assert_always_int(PMIX_SUCCESS, ==, ret); #elif USE_PMI2_API do_encode(value, sz); int rc = PMI2_KVS_Put(kvs_key, kvs_value); gasneti_assert_always_int(PMI2_SUCCESS, ==, rc); #else do_encode(value, sz); int rc = PMI_KVS_Put(kvs_name, kvs_key, kvs_value); gasneti_assert_always_int(PMI_SUCCESS, ==, rc); #endif } GASNETI_INLINE(do_kvs_get) void do_kvs_get(void *value, size_t sz, gex_Rank_t src) { #if USE_PMIX_API pmix_status_t ret; pmix_value_t *val; myproc.rank = (src == GEX_RANK_INVALID) ? PMIX_RANK_UNDEF : src; ret = PMIx_Get(&myproc, kvs_key, NULL, 0, &val); gasneti_assert_always_int(PMIX_SUCCESS, ==, ret); gasneti_assert_always_ptr(NULL, !=, val); gasneti_assert_always_int(PMIX_BYTE_OBJECT, ==, val->type); gasneti_assert_always_ptr(NULL, !=, val->data.bo.bytes); gasneti_assert_always_uint(sz, ==, val->data.bo.size); memcpy(value, val->data.bo.bytes, sz); PMIX_VALUE_RELEASE(val); #elif USE_PMI2_API int rc; int len; if (src == GEX_RANK_INVALID) src = PMI2_ID_NULL; rc = PMI2_KVS_Get(kvs_name, src, kvs_key, kvs_value, max_val_len, &len); gasneti_assert_always_int(PMI2_SUCCESS, ==, rc); gasneti_assert_always_int(len, >=, 0); // Negative would mean value larger than max_val_len do_decode(value, sz, len); #else int rc; rc = PMI_KVS_Get(kvs_name, kvs_key, kvs_value, max_val_len); gasneti_assert_always_int(PMI_SUCCESS, ==, rc); size_t len = strlen(kvs_value); do_decode(value, sz, len); #endif } GASNETI_INLINE(do_kvs_fence) void do_kvs_fence(void) { #if USE_PMIX_API /* for now, we will assume that we direct the * server to collect all data because GASNET * will immediately pull all data for every * process. This can be changed to a non-blocking * fence, and to use the direct modex mode, at * some later date when further optimization * and/or memory footprint minimzation is desired */ pmix_info_t info; pmix_status_t rc; memset(&info, 0, sizeof(pmix_info_t)); (void)strncpy(info.key, PMIX_COLLECT_DATA, PMIX_MAX_KEYLEN); info.value.type = PMIX_UNDEF; info.value.data.flag = 1; rc = PMIx_Commit(); gasneti_assert_always_int(PMIX_SUCCESS, ==, rc); rc = PMIx_Fence(NULL, 0, &info, 1); gasneti_assert_always_int(PMIX_SUCCESS, ==, rc); #elif USE_PMI2_API PMI2_KVS_Fence(); #else PMI_KVS_Commit(kvs_name); PMI_Barrier(); #endif } PMI_BOOL gasneti_pmi_initialized = PMI_FALSE; /* gasneti_bootstrapInit */ extern gasneti_spawnerfn_t const * gasneti_bootstrapInit_pmi( int *argc_p, char ***argv_p, gex_Rank_t *nodes_p, gex_Rank_t *mynode_p) { int size, rank; #if USE_PMIX_API pmix_value_t *val; pmix_proc_t proc; if (PMIX_SUCCESS != PMIx_Init(&myproc, NULL, 0)) { return NULL; } /* the namespace is our kvs_name, and the rank is * our rank */ rank = myproc.rank; /* we will have been given our job size during init, * so retrieve it from the local cache here */ memset(proc.nspace, 0, PMIX_MAX_NSLEN+1); (void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN+1); proc.rank = PMIX_RANK_WILDCARD; pmix_key_t tmp = PMIX_JOB_SIZE; // this tmp silences a warning on gcc 12.2 if (PMIX_SUCCESS != PMIx_Get(&proc, tmp, NULL, 0, &val)) { gasneti_fatalerror("PMIx Get Job Size failed"); } if (NULL != val && PMIX_UINT32 == val->type) { size = val->data.uint32; PMIX_VALUE_RELEASE(val); } else { gasneti_fatalerror("PMIx Get Job Size failed"); } #elif USE_PMI2_API int spawned, appnum; if (PMI2_SUCCESS != PMI2_Init(&spawned, &size, &rank, &appnum)) { return NULL; } #else if (PMI_SUCCESS != PMI_Initialized(&gasneti_pmi_initialized)) { return NULL; } if (PMI_FALSE == gasneti_pmi_initialized) { int spawned; if (PMI_SUCCESS != PMI_Init(&spawned)) { return NULL; } } if (PMI_SUCCESS != PMI_Get_rank(&rank)) { gasneti_fatalerror("PMI_Get_rank() failed"); } if (PMI_SUCCESS != PMI_Get_size(&size)) { gasneti_fatalerror("PMI_Get_size() failed"); } #endif *mynode_p = rank; *nodes_p = size; #if USE_PMIX_API max_name_len = 0; // myproc used in place of kvs_name max_key_len = PMIX_MAX_KEYLEN + 1; max_val_len = 4096; /* totally arbitrary here */ #elif USE_PMI2_API max_name_len = 1024; /* XXX: can almost certainly be shorter than this! */ max_key_len = PMI2_MAX_KEYLEN; max_val_len = PMI2_MAX_VALLEN; #else if (PMI_SUCCESS != PMI_KVS_Get_name_length_max(&max_name_len)) { gasneti_fatalerror("PMI_KVS_Get_name_length_max() failed"); } if (PMI_SUCCESS != PMI_KVS_Get_key_length_max(&max_key_len)) { gasneti_fatalerror("PMI_KVS_Get_key_length_max() failed"); } if (PMI_SUCCESS != PMI_KVS_Get_value_length_max(&max_val_len)) { gasneti_fatalerror("PMI_KVS_Get_value_length_max() failed"); } #endif // Bound allocation to reasonable sizes #if GASNETI_PMI_DUP_KEYS max_key_len = MIN(max_key_len, 24); // 18+1 should be sufficient #else max_key_len = MIN(max_key_len, 32); // 29+1 should be sufficient #endif max_val_len = MIN(max_val_len, 4096); max_val_bytes = 4 * (max_val_len / 5); return &spawnerfn; } #define do_kvs_init() \ do { if_pf(!kvs_is_init) do_kvs_init_inner(); } while (0) static void do_kvs_init_inner(void) { gasneti_assert(! kvs_is_init); if (max_name_len) { kvs_name = (char*) gasneti_malloc(max_name_len); } kvs_key = (char*) gasneti_malloc(max_key_len); kvs_value = (char*) gasneti_malloc(max_val_len); #if USE_PMIX_API // nothing else to do #elif USE_PMI2_API if (PMI2_SUCCESS != PMI2_Job_GetId(kvs_name, max_name_len)) { gasneti_fatalerror("PMI2_Job_GetId() failed"); } #else if (PMI_SUCCESS != PMI_KVS_Get_my_name(kvs_name, max_name_len)) { gasneti_fatalerror("PMI_KVS_Get_my_name() failed"); } #endif kvs_is_init = 1; } /* bootstrapFini */ static void bootstrapFini(void) { #if USE_PMIX_API PMIx_Finalize(NULL, 0); #elif USE_PMI2_API PMI2_Finalize(); #else if (PMI_FALSE == gasneti_pmi_initialized) { PMI_Finalize(); } #endif } /* bootstrapAbort */ static void bootstrapAbort(int exitcode) { #if USE_PMIX_API PMIx_Abort(exitcode, "GASNet abnormal exit", NULL, 0); #elif USE_PMI2_API PMI2_Abort(1, "GASNet abnormal exit"); #else PMI_Abort(exitcode, "GASNet abnormal exit"); #endif gasneti_fatalerror("PMI_Abort failed."); /* NOT REACHED */ } /* bootstrapBarrier */ static void bootstrapBarrier(void) { #if USE_PMIX_API if (PMIX_SUCCESS != PMIx_Fence(NULL, 0, NULL, 0)) { gasneti_fatalerror("barrier failed"); } #elif USE_PMI2_API #if GASNETI_PMI2_FENCE_IS_BARRIER PMI2_KVS_Fence(); #else static unsigned counter; char v[16] = ""; do_kvs_init(); // This barrier assumes a worst-case "lazy" fence implementation. // TODO: is it possible to do even less than 1 Get per rank here? do_kvs_key0('X', counter); #if GASNET_DEBUG snprintf(v, sizeof(v), "%u", counter); #endif if (!gasneti_mynode) { OP_INC_MAP(X, counter); do_kvs_put(v, strlen(v), 0); } do_kvs_fence(); do_kvs_get(v, strlen(v), 0); #if GASNET_DEBUG if (atoi(v) != counter) gasneti_fatalerror("barrier failed: exp %u got %s\n", counter, v); #endif counter++; #endif #else PMI_Barrier(); #endif } #if HAVE_PMI_ALLGATHER static gex_Rank_t *gasnetc_pmi_allgather_order = NULL; GASNETI_INLINE(gasnetc_pmi_allgather_init) void gasnetc_pmi_allgather_init(void) { /* perform (just once) an Allgather of node number to establish the order */ if_pf (!gasnetc_pmi_allgather_order) { int rc; gasnetc_pmi_allgather_order = gasneti_malloc(gasneti_nodes * sizeof(gex_Rank_t)); rc = PMI_Allgather(&gasneti_mynode, gasnetc_pmi_allgather_order, sizeof(gex_Rank_t)); gasneti_assert_always(PMI_SUCCESS == rc); } } #endif /* bootstrapExchange */ static void bootstrapExchange(void *src, size_t len, void *dest) { #if HAVE_PMI_ALLGATHER uint8_t *unsorted = gasneti_malloc(len * gasneti_nodes); /* TODO: use alloca()? */ gex_Rank_t i; int rc; /* Allgather the callers data to a temporary array */ gasnetc_pmi_allgather_init(); rc = PMI_Allgather(src, unsorted, len); gasneti_assert_always(PMI_SUCCESS == rc); /* extract the records from the unsorted array by using the 'order' array */ for (i = 0; i < gasneti_nodes; i += 1) { gex_Rank_t peer = gasnetc_pmi_allgather_order[i]; gasneti_assert_always(peer < gasneti_nodes); GASNETI_MEMCPY((void *) ((uintptr_t) dest + (peer * len)), &unsorted[i * len], len); } gasneti_free(unsorted); #else static unsigned int counter = 0; size_t remain = len; uint8_t *s = src; uint8_t *d = dest; do_kvs_init(); while (remain) { size_t chunk = MIN(remain, max_val_bytes); uint8_t *p; gex_Rank_t i; do_kvs_key1('E', counter, gasneti_mynode); do_kvs_put(s, chunk, 0); do_kvs_fence(); for (i = 0, p = d; i < gasneti_nodes; ++i, p += len) { if (i == gasneti_mynode) continue; do_kvs_key1('E', counter, i); do_kvs_get(p, chunk, i); } s += chunk; d += chunk; remain -= chunk; OP_INC_MAP(E, counter); ++counter; } GASNETI_MEMCPY_SAFE_IDENTICAL((uint8_t*)dest + len*gasneti_mynode, src, len); #endif } #if USE_PMIX_API // only case that consumes is_local static int peer_is_local(gex_Rank_t peer) { if (gasneti_myhost.nodes) { // could be called before nodemap has been initialized for (int i = 0; i < gasneti_myhost.node_count; ++i) { if (gasneti_myhost.nodes[i] == peer) return 1; } } return 0; } #else #define peer_is_local(peer) 0 #endif /* bootstrapAlltoall */ static void bootstrapAlltoall(void *src, size_t len, void *dest) { static unsigned int counter = 0; size_t remain = len; uint8_t *s = src; uint8_t *d = dest; do_kvs_init(); while (remain) { size_t chunk = MIN(remain, max_val_bytes); uint8_t *p; gex_Rank_t i; for (i = 0, p = s; i < gasneti_nodes; ++i, p += len) { if (i == gasneti_mynode) continue; do_kvs_key2('A', counter, gasneti_mynode, i); do_kvs_put(p, chunk, peer_is_local(i)); } do_kvs_fence(); for (i = 0, p = d; i < gasneti_nodes; ++i, p += len) { if (i == gasneti_mynode) continue; do_kvs_key2('A', counter, i, gasneti_mynode); do_kvs_get(p, chunk, i); } s += chunk; d += chunk; remain -= chunk; OP_INC_MAP(A, counter); ++counter; } GASNETI_MEMCPY_SAFE_IDENTICAL((uint8_t*)dest + len*gasneti_mynode, (uint8_t*)src + len*gasneti_mynode, len); } /* bootstrapBroadcast */ static void bootstrapBroadcast(void *src, size_t len, void *dest, int rootnode) { #if HAVE_PMI_BCAST && 0 /* TODO */ #else static unsigned int counter = 0; size_t remain = len; uint8_t *s = src; uint8_t *d = dest; do_kvs_init(); while (remain) { size_t chunk = MIN(remain, max_val_bytes); do_kvs_key0('B', counter); if (gasneti_mynode == rootnode) { OP_INC_MAP(B, counter); do_kvs_put(s, chunk, 0); do_kvs_fence(); } else { do_kvs_fence(); do_kvs_get(d, chunk, rootnode); } s += chunk; d += chunk; remain -= chunk; ++counter; } if (gasneti_mynode == rootnode) { GASNETI_MEMCPY_SAFE_IDENTICAL(dest, src, len); } #endif } #if HAVE_PMI_ALLGATHER_ON_SMP static gex_Rank_t *gasnetc_pmi_allgather_on_smp_order = NULL; GASNETI_INLINE(gasnetc_pmi_allgather_on_smp_init) void gasnetc_pmi_allgather_on_smp_init(void) { /* perform (just once) an Allgather_on_smp of node number to establish the order */ if_pf (!gasnetc_pmi_allgather_on_smp_order) { int count = gasneti_myhost.node_count; gasnetc_pmi_allgather_on_smp_order = gasneti_malloc(count * sizeof(gex_Rank_t)); int rc = PMI_Allgather_on_smp(&gasneti_mynode, gasnetc_pmi_allgather_on_smp_order, sizeof(gex_Rank_t)); gasneti_assert_always(PMI_SUCCESS == rc); } } #endif // Since every caller extracts the desired rootnode's contribution from an // AllGather, the NbrhdBroadcast and HostBroadcast are identical. static void bootstrapSubsetBroadcast(void *src, size_t len, void *dest, int rootnode) { #ifdef HAVE_PMI_GET_NUMPES_ON_SMP // Cray PMI gives us a means to validate our "host" size. // The first SubsetBroadcast seems as good as place as any to check. // TODO: add a function pointer to gasneti_spawnerfn_t for this type of validation static int once = 0; if (!once) { once = 1; int our_count = gasneti_myhost.node_count; int their_count; int rc = PMI_Get_numpes_on_smp(&their_count); gasneti_assert_always(PMI_SUCCESS == rc); if (our_count != their_count) { gasneti_fatalerror("GASNet and PMI do not agree on the number of processes on " "this host (%s), seeing %d and %d, respectively. " "To make its count, GASNet has used %s as a unique host identifier. " "Please see documentation on GASNET_HOST_DETECT in README and " "consider setting its value to 'hostname' or reconfiguring using " "'--with-host-detect=hostname' to make that the default value.", gasneti_gethostname(), our_count, their_count, gasneti_format_host_detect()); } } #endif #if HAVE_PMI_ALLGATHER_ON_SMP const int count = gasneti_myhost.node_count; uint8_t *tmp = gasneti_malloc(len * count); /* Allgather_on_smp the callers data to a temporary array */ gasnetc_pmi_allgather_on_smp_init(); int rc = PMI_Allgather_on_smp(src ? src : dest, tmp, len); gasneti_assert_always(PMI_SUCCESS == rc); /* Extract the right piece */ int i; for (i = 0; i < count; ++i) { if (rootnode == gasnetc_pmi_allgather_on_smp_order[i]) { GASNETI_MEMCPY(dest, &tmp[i * len], len); break; } } gasneti_assert_always(i != count); gasneti_free(tmp); #elif HAVE_PMI_ALLGATHER /* TODO: test our assumption that PMI_Allgather it better than the Put/Get code below */ uint8_t *tmp = gasneti_malloc(len * gasneti_nodes); int rc, i; /* Allgather the data to the temporary array */ gasnetc_pmi_allgather_init(); rc = PMI_Allgather(src ? src : dest, tmp, len); gasneti_assert_always(PMI_SUCCESS == rc); /* Find the right piece */ for (i = 0; i < gasneti_nodes; i += 1) { gex_Rank_t peer = gasnetc_pmi_allgather_order[i]; if (peer == rootnode) { GASNETI_MEMCPY(dest, &tmp[i * len], len); break; } } gasneti_free(tmp); #elif HAVE_PMI_BCAST && 0 /* TODO - Need something here if Broadcast is ever implemented in terms of PMI_Bcast */ #else static unsigned int counter = 0; size_t remain = len; uint8_t *s = src; uint8_t *d = dest; do_kvs_init(); while (remain) { size_t chunk = MIN(remain, max_val_bytes); // encoding rootnode allows all roots to bcast concurrently do_kvs_key1('S', counter, rootnode); if (gasneti_mynode == rootnode) { OP_INC_MAP(S, counter); do_kvs_put(s, chunk, 1); do_kvs_fence(); } else { do_kvs_fence(); do_kvs_get(d, chunk, rootnode); } s += chunk; d += chunk; remain -= chunk; ++counter; } if (gasneti_mynode == rootnode) { GASNETI_MEMCPY_SAFE_IDENTICAL(dest, src, len); } #endif } #if GASNETI_PMI_DUP_KEYS // Put zero-length keys to free up space in KVS static void bootstrapGC(void) { char value[] = ""; size_t sz = 0; int phase; // First a barrier to ensure we cannot clobber keys being read by another proc // Consequently, we don't RESET_KVS(X,...) below. bootstrapBarrier(); #define RESET_KVS(stem, key_gen, is_local) \ do { \ unsigned int map = op_##stem##_map; \ op_##stem##_map = 0; \ if (map & 1) { phase = 0; key_gen; do_kvs_put(value, sz, is_local); } \ if (map & 2) { phase = 1; key_gen; do_kvs_put(value, sz, is_local); } \ } while (0) // RESET_KVS(X, do_kvs_key0('X', phase), 0); - omit to avoid interference w/ barrier above RESET_KVS(E, do_kvs_key1('E', phase, gasneti_mynode), 0); RESET_KVS(B, do_kvs_key0('B', phase), 0); RESET_KVS(S, do_kvs_key1('S', phase, gasneti_mynode), 1); #undef RESET_KVS if (op_A_map & 1) { for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) { if (i == gasneti_mynode) continue; do_kvs_key2('A', 0, gasneti_mynode, i); do_kvs_put(value, sz, peer_is_local(i)); } } if (op_A_map & 2) { for (gex_Rank_t i = 0; i < gasneti_nodes; ++i) { if (i == gasneti_mynode) continue; do_kvs_key2('A', 1, gasneti_mynode, i); do_kvs_put(value, sz, peer_is_local(i)); } } op_A_map = 0; do_kvs_fence(); } #else #define bootstrapGC() ((void)0) #endif static void bootstrapCleanup(void) { #if HAVE_PMI_ALLGATHER gasneti_free(gasnetc_pmi_allgather_order); gasnetc_pmi_allgather_order = NULL; #endif #if HAVE_PMI_ALLGATHER_ON_SMP gasneti_free(gasnetc_pmi_allgather_on_smp_order); gasnetc_pmi_allgather_on_smp_order = NULL; #endif bootstrapGC(); if (kvs_is_init) { gasneti_free(kvs_name); kvs_name = NULL; gasneti_free(kvs_key); kvs_key = NULL; gasneti_free(kvs_value); kvs_value = NULL; kvs_is_init = 0; } } static gasneti_spawnerfn_t const spawnerfn = { bootstrapBarrier, bootstrapExchange, bootstrapBroadcast, bootstrapSubsetBroadcast, // Nbrhd bootstrapSubsetBroadcast, // Host bootstrapAlltoall, bootstrapAbort, bootstrapCleanup, bootstrapFini, }; gasnet-2025.8.0/other/ssh-spawner/0000775000175000017500000000000015142313673017015 5ustar alastairalastairgasnet-2025.8.0/other/ssh-spawner/README0000664000175000017500000002744315142313673017707 0ustar alastairalastairREADME file for ssh-spawner =========================== @ TOC: @ @ Section: Overview @ @ Section: Basic Usage @ @ Section: Process Layout @ @ Section: Build-time Configuration @ @ Section: Runtime Configuration @ @ Section: Troubleshooting Connection Problems @ @ Section: Overview @ This document describes ssh-spawner, a component of the GASNet runtime library which allows applications using many GASNet conduits to utilize ssh (or rsh) to perform job launch. If installing GASNet on system which allows remote shell connections to the compute nodes, this may be a lower-overhead mechanism for job launch than use of the default mpi-spawner. This is also the default spawner for many conduits when MPI support is not present (or is disabled). This document does *not* cover ssh-based job spawning in udp-conduit, which uses distinct code. For information on spawning udp-conduit jobs, please see udp-conduit/README (source) or share/doc/gasnet/README-udp (installed). @ Section: Basic Usage @ + Usage summary (option 1): Many languages and libraries built over GASNet provide their own commands for job launch. These should be used instead of GASNet's whenever possible. They typically wrap the mechanisms described below, while providing additional options specific to the language or library. The remaining options are documented here mainly for those who are implementing such a wrapper. + Usage summary (option 2): Conduits which support ssh-spawner each include a spawner utility named for the conduit: gasnetrun_[conduit] -n [options] [--] prog [program args] options: -n number of processes to run (required) -N number of nodes to run on (not always supported) -c number of cpus per process (not always supported) -E list of environment vars to propagate -v be verbose about what is happening -t test only, don't execute anything (implies -v) -k keep any temporary files created (implies -v) -spawner= force use of a specific spawner ([supported spawners]) -- ends option parsing The ssh-spawner described in this README is used if selected by one of the following three mechanisms, in order from greatest to least precedence: + Passing -spawner=ssh to the gasnetrun_[conduit] utility + Setting GASNET_[CONDUIT]_SPAWNER=ssh in the environment + If ssh-spawner was established as the default at configure time (see Build-time Configuration, below). @ Section: Process Layout @ The ssh-spawner will layout processes in a "balanced" distribution and "blocked" order on a list of hosts (such as obtained from the GASNET_SSH_SERVERS environment variable). For P processes and N hosts, "balanced" distribution places ceil(P/N) processes on the first (P%N) hosts and floor(P/N) on the remainder. For P divisible by N, this yields P/N processes on every host, while for other all cases the last (N-P%N) hosts each have one fewer than the others. The "blocked" order means the processes on each host are numbered consecutively, with the first host holding processes starting from rank 0, the second holding processes starting from rank ceil(P/N), etc. By default the GASNET_SSH_SERVERS environment variable (or equivalent) is subject to de-duplication. However, by disabling this behavior (see GASNET_SSH_KEEPDUP environment variable below) one can exercise additional control over the placement of process though duplication of hostnames. For instance, with P=8, GASNET_SSH_SERVERS="node1 node2 node1 node2" and GASNET_SSH_KEEPDUP=1, the host "node1" will hold processes with ranks 0, 1, 4 and 5, rather than 0, 1, 2 and 3 as would be the case without setting GASNET_SSH_KEEPDUP. In the extreme case, populating GASNET_SSH_SERVERS with P entries allows for precise control over placement of every process, when de-duplication is disabled via GASNET_SSH_KEEPDUP=1. @ Section: Build-time Configuration @ The ssh-spawner offers the following configure-time options: --with-[conduit]-spawner=ssh Conduits which support ssh-spawner each accept a configure option of this form to set the default spawner used by the corresponding gasnetrun_[conduit] utility, as described in the "Basic Usage" section above. If this option is not used, the "mpi" is the default if MPI support is found at configure time, and "ssh" otherwise. However, one may pass this option to make ssh-spawner the default for the corresponding conduit. --disable-pdeathsig (auto-detect by default) On Linux, it is possible to request a signal be delivered to a process when its parent process dies. This can be used by the ssh-based spawner to reduce the possibility of orphan (run away) processes in certain abnormal termination scenarios. Because there are 2.4.x versions of Linux where use of this option can lock up the machine (as the result of a kernel bug), this option is disabled for kernels prior to 2.6.0, and can also be explicitly disabled at configure time. --with-ssh-{nodefile,cmd,options}= These control the default values used when the corresponding environment variables are not set. These environment variables are documented below. --with-ssh-out-degree= This establishes a default value for the GASNET_SSH_OUT_DEGREE environment variable, documented below. If your system does not permit remote shell connections among compute nodes, then you should configure using --with-ssh-out-degree=0 to ensure that ssh-spawner only attempts to make connections out-bound from the "master node". Be aware, however, that this may severely limit the size of jobs that one can launch. @ Section: Runtime Configuration @ Environment Variables: + A list of hosts is specified using one of the GASNET_SSH_NODEFILE, GASNET_SSH_SERVERS, or GASNET_NODEFILE environment variables (with precedence in that order). If set, variables GASNET_SSH_NODEFILE or GASNET_NODEFILE specify a file with one hostname per line. Blank lines and comment lines (using '#') are ignored. If set, the variable GASNET_SSH_SERVERS itself contains a list of hostnames, delimited by commas or whitespace. For sites using a static hosts file, a default value for the GASNET_SSH_NODEFILE variable may be set at configure time using the option --with-ssh-nodefile=. HOWEVER, if this is done then *only* setting this variable manually can override its default setting (since it has the highest precedence). Note that if starting a job via upcrun or tirun, these variables may be set for you from other sources. The following environment variables set by supported batch systems are also recognized if the GASNET_* variables are not set: PBS: PBS_NODEFILE LSF: LSB_HOSTS SGE: PE_HOSTFILE SLURM: Use `scontrol show hostname` if SLURM_JOB_ID is set + The environment variable GASNET_SSH_CMD can be set to specify a specific remote shell (perhaps rsh), without arguments (see below). If the value does not begin with "/" then $PATH will be searched to resolve a full path. The default value is "ssh", unless an other value has been configured using --with-ssh-cmd=. + The environment variable GASNET_SSH_OPTIONS can be set to specify options that will precede the hostname in the commands used to spawn jobs. One example, for OpenSSH, would be GASNET_SSH_OPTIONS="-o 'StrictHostKeyChecking no'" The parsing of the value follows the same rules for quotes (both single and double) and backslash as most shells. A default value may be configured using --with-ssh-options=. + The environment variable GASNET_SSH_OUT_DEGREE can be used to limit the number of out-going ssh connections from any given host. The value 0 means no limit is imposed. The default value is 32 unless an alternate value was set at configure time using --with-ssh-out-degree=. + The environment variable GASNET_SSH_REMOTE_PATH can be set to specify the working directory (defaults to current). + Users of OpenSSH should NOT add "-f" to GASNET_SSH_OPTIONS. Doing so causes the spawner to mistakenly believe that a process which it has spawned has exited. However, if agent forwarding or X11 forwarding are normally enabled in your configuration, "-a" and "-x" can be used with OpenSSH to disable them and speed the connection process (except where the agent forwarding is needed for authorization). + The environment variable GASNET_MASTERIP can be used to specify the exact IP address which the compute nodes should use to connect to the master (spawning) node. By default the master node will pass the result of gethostname() to the worker nodes, which will then resolve that to an IP address using gethostbynname(). + The environment variable GASNET_SSH_KEEPDUP controls the treatment of duplicate entries in GASNET_SSH_NODEFILE, GASNET_SSH_SERVERS and other sources of host lists. By default, GASNET_SSH_KEEPDUP=0 and duplicates are removed, keeping only the first instance of any given name. Note that this is based on string comparison only and does not consider multiple valid names for the same host to be duplicates. Setting GASNET_SSH_KEEPDUP=1 preserves the host list without any changes. @ Section: Troubleshooting Connection Problems @ For the following, the term "compute node" means one of the hosts given by GASNET_SSH_NODEFILE, GASNET_SSH_SERVERS, or obtained from a variable specific to the batch system. These are nodes which will run application processes. The term "master node" means the node from which the job was spawned. The master node may also be a compute nodes, but this is not required. The term "resolve" means translation of a hostname to an IP address using gethostbynname(). + The ssh (or rsh) at your site must be configured to allow logins from the master node to compute nodes. It is also strongly recommended that logins between compute nodes be permitted (see the description of the --with-ssh-out-degree configure option for the alternative). These must be achieved without user interaction such as entering a password or accepting hostkeys. For OpenSSH users, the following options are used automatically -o 'StrictHostKeyChecking no' -o 'BatchMode yes' which should ensure that ssh does not try to prompt the user. There is no need to specify these in the GASNET_SSH_OPTIONS environment variable. + Any firewall or port filtering must allow the ssh/rsh connections described above, plus TCP connections on an "untrusted port" (ports with numbers over 1024) from a compute node to the master node (and among compute nodes unless the out-degree has been set to 0). + Setting of the GASNET_MASTERIP environment variable trivially provides "resolution" of the master node's hostname. Otherwise: - The master node and all compute nodes must be able to resolve the hostname of the master node. + Providing only numeric IPs for compute nodes (in GASNET_SSH_SERVERS, the file named by GASNET_SSH_NODEFILE, or other source specific to the batch system) trivially provides "resolution" of the hostnames of all compute nodes. Otherwise: - The master node must be able to resolve the hostnames of all compute nodes. - Unless the out-degree has been set to zero, compute nodes must able to resolve the hostnames of the other compute nodes. @ Section: Known Problems @ + Use of the -E option to propagate environment variables currently has two limitations: - Will silently discard variables with non-conforming names. Specifically, names must match '[A-Za-z_][A-Za-z0-9_]*'. - Will silently discard variables with newline characters in their value. See Bug 4723 for the motivation behind these constraints. gasnet-2025.8.0/other/ssh-spawner/gasnet_bootstrap_ssh.c0000664000175000017500000023277315142313673023432 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/ssh-spawner/gasnet_bootstrap_ssh.c $ * Description: GASNet conduit-independent ssh-based spawner * Copyright 2005, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include #include #include #include #include #include #include #include #include #include #include #include #if HAVE_NETINET_TCP_H #include #endif #if HAVE_SYS_UIO_H #include #endif #if HAVE_SYS_SOCKIO_H #include #endif #ifdef HAVE_PR_SET_PDEATHSIG /* Under Linux we can ask to be sent a given signal when our parent exits. * We use if mainly because of a bug in some versions of OpenSSH that * fail to kill spawned children when the ssh exits. However, this will * also make us more resistant to runaways if somebody starts sending * SIGKILL to our processes (which leaves us no other way to cleanup * gracefully). Not safe on some Linux kernels. */ #include #include static int use_pdeathsig = 0; #endif #include #include #include #include #include #ifndef GASNET_SOCKLEN_T #error "Don't know socklen_t or equivalent" #endif #ifndef PATH_MAX #define PATH_MAX 1024 #endif /* NOTES This is a ssh-based (or rsh if you want) spawner for GASNet. It is intended to be conduit-neutral. In the interest of scalability the ssh processes are started up in a balanced N-ary tree, where N can be controlled at run time (via env var GASNET_SSH_OUT_DEGREE). Typically we want this value to be reasonably large, since deep trees would result in multiple steps of forwarding for standard I/O (which is performed entirely by the ssh processes at this point). IF GASNETI_SSH_OUT_DEGREE is set to zero then the tree effectively has infinite out-degree and the tree of control processes (defined below) is only one level deep. The leaf processes are assigned gasnet ranks ("rank processes"), while internal nodes in the tree are known as "control processes". The root of the tree is always a control process (even when running a single rank) and is also known as the "master process". Each control process may have both rank processes and additional control processes as children. In normal use, there is a single control process per host. NOTE: "normal use" is the default case in which the environment variable GASNET_SSH_KEEPDUP is unset or "false" AND there are no uses of "multi-homed" hosts. With GASNET_SSH_KEEPDUP set to a "true" value OR multiple names for the same host which cannot be de-duplicated, there will be one control process for each time a given host is used from the list. In addition to the tree of ssh connections, there is a control socket created between each process and its parent (this is true for both the rank and control processes). This socket is used for control information, during startup. For instance, the environment and arguments are transferred over this socket. The control sockets are used to send each control process only a portion of the list of host names. Rather than send the entire list, each process receives the hostnames of any children it may have. The spawner is able to (in most cases) avoid orphaned processes by using TCP out-of-band data to generate a SIGURG. The handler for this signal will send the out-of-band data both up and down the tree before exiting. If a child has the same hostname as its parent, it will be started directly, rather than via ssh IFF GASNETI_BOOTSTRAP_LOCAL_SPAWN is 1. By default this is enabled. The tree structure is used to provide scalable implementations of the following "service" routines for use during the bootstrap, as required in the template-conduit: void Barrier(void); void Exchange(void *src, size_t len, void *dest); void Broadcast(void *src, size_t len, void *dest, int rootnode); void NbrhdBroadcast(void *src, size_t len, void *dest, int rootnode); void HostBroadcast(void *src, size_t len, void *dest, int rootnode); Additionally, the following is useful (at least in ibv-conduit) for exchanging endpoint identifiers in a scalable manner: void Alltoall(void *src, size_t len, void *dest); If demand exists, scalable Scatter and Gather are possible. The following are needed to handle startup and termination: extern gasneti_spawnerfn_t const * gasneti_bootstrapInit_ssh(int *argc_p, char ***argv_p, gex_Rank_t *nodes_p, gex_Rank_t *mynode_p); void Fini(void); void Abort(int exitcode); In the case of normal termination, all processes should call Fini() before they call exit(). In the event that gasnet is unable to arrange for an orderly shutdown, a call to Abort() will try to force all processes to exit with the given exit code. To control the spawner, there are a few environment variables, all of which are processed only by the master process (which send the relevant information on to the others via the control sockets). See README for documentation on these variables. XXX: still to do + Give master its own rank children too? + Implement "custom" spawner in the spirit of udp-conduit. + Look at udp-conduit for things missing from this list. :-) + Can write/writev loops use O_NONBLOCK to write portions to each socket w/o blocking? */ GASNETI_IDENT(gasnetc_IdentString_HaveSSHSpawner, "$GASNetSSHSpawner: 1 $"); static gasneti_spawnerfn_t const spawnerfn; #ifndef GASNETI_BOOTSTRAP_LOCAL_SPAWN #define GASNETI_BOOTSTRAP_LOCAL_SPAWN 1 #endif #define WHITESPACE " \t\n\r" #define SSH_SERVERS_DELIM_CHARS ",/;:" WHITESPACE extern char **environ; #ifndef ENV_PREFIX #define ENV_PREFIX "GASNET_" #endif enum { BOOTSTRAP_CMD_FINI0, BOOTSTRAP_CMD_FINI1, BOOTSTRAP_CMD_BARR0, BOOTSTRAP_CMD_BARR1, BOOTSTRAP_CMD_BCAST0, BOOTSTRAP_CMD_BCAST1, BOOTSTRAP_CMD_EXCHG0, BOOTSTRAP_CMD_EXCHG1, BOOTSTRAP_CMD_TRANS0, BOOTSTRAP_CMD_TRANS1, BOOTSTRAP_CMD_SBCAST0, BOOTSTRAP_CMD_SBCAST1, }; static const int c_one = 1; static const int c_zero = 0; static int is_root = 0; static int is_control = 0; static int is_verbose = 0; static char args_delim = ':'; static gex_Rank_t nranks = 0; static char cwd[PATH_MAX]; static int listener = -1; static int listen_port = -1; static const char *argv0 = "[unknown]"; static int null_init = 0; static char **nodelist; static char **ssh_argv = NULL; static int ssh_argc = 0; static const char *wrapper = NULL; static const char *envcmd = "env"; static char *master_env = NULL; static size_t master_env_len = 0; static struct child { int sock; pid_t pid; gex_Rank_t rank; gex_Rank_t tree_ranks; /* ranks in this sub-tree, including self (1 for rank procs) */ gex_Rank_t tree_nodes; /* nodes in this sub-tree, including self (1 for rank procs) */ char ** nodelist; } *child = NULL; static volatile int initialized = 0; static int finalized = 0; static gasneti_atomic_t live = gasneti_atomic_init(0); static volatile int in_abort = 0; static gex_Rank_t out_degree = GASNETI_DEFAULT_SSH_OUT_DEGREE; static struct fds { fd_set set; int max; } child_fds, all_fds; static int parent = -1; /* socket */ static gex_Rank_t myrank = 0; static int myname = -1; static char my_host[1024] = "[unknown hostname]"; static int children = 0; static int ctrl_children = 0; static gex_Rank_t tree_ranks = GEX_RANK_INVALID; static gex_Rank_t tree_nodes = GEX_RANK_INVALID; static int mypid; static volatile int exit_status = 0; static gex_Rank_t nnodes = 0; /* nodes, as distinct from ranks */ static int nnodes_set = 0; /* non-zero if nnodes set explicitly */ static int keepdup = -1; // Value of [PREFIX]_SSH_KEEPDUP GASNETI_FORMAT_PRINTF(do_message,1,2, static void do_message(const char *fmt, ...)) { va_list args; va_start(args, fmt); gasneti_console_messageVA(0,0,0,-1, "SSH-SPAWNER", fmt, args); va_end(args); } #define BOOTSTRAP_VERBOSE(ARGS) do { \ if_pf (is_verbose) do_message ARGS; \ } while (0) /* Add single quotes around a string, taking care of any existing quotes */ static char *quote_arg(const char *arg) { char *p, *q, *tmp; char *result; result = gasneti_strdup("'"); p = tmp = gasneti_strdup(arg); while ((q = strchr(p, '\'')) != NULL) { *q = '\0'; result = gasneti_sappendf(result, "%s'\\''", p); p = q + 1; } result = gasneti_sappendf(result, "%s'", p); gasneti_free(tmp); return result; } /* Like gasneti_fatalerror, but w/o dumping core * This is used for probable user errors */ GASNETI_FORMAT_PRINTF(die,2,3, GASNETI_NORETURN static void die(int exitcode, const char *msg, ...)) { va_list argptr; va_start(argptr, msg); gasneti_console_messageVA(0,0,0,-1, "ERROR",msg,argptr); va_end(argptr); gasneti_killmyprocess(exitcode); } /* Fetch a variable from the environment on the master node. * (more or less copied from amudp_spmd.cpp) */ static char *do_getenv(const char *var) { if (master_env && var && (*var != '\0')) { char *p = master_env; size_t len = strlen(var); while (*p) { if (!strncmp(var, p, len) && (p[len] == '=')) { return p + len + 1; } else { p += strlen(p) + 1; } } } return NULL; } static void do_propagate_env(const char * keyname, int flags) { if (master_env) { gasneti_propagate_env_helper(master_env, keyname, flags); } } static const char* do_check_env_prefix_hook(const char *prefix) { return master_env ? gasneti_check_env_prefix_helper(master_env, prefix) : NULL; } #if HAVE_SETPGID || HAVE_SETPGRP /* signals sent to entire process groups */ #define pid_to_kill(pid) (-(pid)) static int my_setpgid(pid_t pid) { #if HAVE_SETPGID return setpgid(pid, pid); #elif SETPGRP_VOID /* Note this case is a no-op in the parent */ return pid ? 0 : setpgrp(); #else return setpgrp(pid, pid); #endif } #else /* signals sent to individual processes only */ #define pid_to_kill(pid) (pid) #define my_setpgid(pid) (0) #endif // POSIX.1-2008 designated siginterrupt() as obsolete. // This favors the recommended replacement via the SA_RESTART flag with // sigaction(), while providing a fallback if sigaction or SA_RESTART // are not available. static int do_siginterrupt(int signum, int flag) { #if GASNETI_HAVE_SA_RESTART struct sigaction act; int rc = sigaction(signum, NULL, &act); if (rc) return rc; if (flag) { act.sa_flags &= ~SA_RESTART; } else { act.sa_flags |= SA_RESTART; } return sigaction(signum, &act, NULL); #else return siginterrupt(signum, flag); #endif } /* returns count of signals sent */ static int signal_rank_procs(int signo) { gex_Rank_t j; int count = 0; for (j = ctrl_children; j < children; ++j) { /* loop over rank processes only */ pid_t pid = pid_to_kill(child[j].pid); if (! pid) continue; if (kill(pid, signo) < 0) { if ((kill(pid, 0) < 0) && (errno == ESRCH || errno == EPERM)) { /* Dead or recycled pid - not a failure */ child[j].pid = 0; } } else { if (signo) BOOTSTRAP_VERBOSE(("[%d] kill(rank=%d, %d)\n", myname, child[j].rank, signo)); ++count; } } return count; } static void kill_all_ranks(void) { int done, loops = 30; gasneti_assert_always(is_control); gasneti_reghandler(SIGQUIT, SIG_DFL); gasneti_reghandler(SIGINT, SIG_DFL); gasneti_reghandler(SIGTERM, SIG_DFL); gasneti_reghandler(SIGHUP, SIG_DFL); gasneti_reghandler(SIGPIPE, SIG_DFL); /* First try to ensure that processes are not stopped */ (void) signal_rank_procs(SIGCONT); /* First try the polite signal */ done = !signal_rank_procs(SIGTERM); /* Loop until all rank processes are gone (kill fails) or time runs out */ while (!done && (loops--)) { (void)sleep(1); done = !signal_rank_procs(0); } /* Be forcefull if still around */ if (!done) signal_rank_procs(SIGKILL); } /* Send SIGURG up and down the tree * If bit 8 is set send ONLY toward leaves (signal forwarding) * If bit 8 is clear send BOTH directions (abnormal exit handling) */ static void do_oob(unsigned char byte) { const int oob_flags = MSG_OOB #ifdef MSG_DONTWAIT | MSG_DONTWAIT #endif #ifdef MSG_NOSIGNAL | MSG_NOSIGNAL #endif ; int j; gasneti_reghandler(SIGPIPE, SIG_IGN); if (0x80 & byte) gasneti_reghandler(SIGURG, SIG_IGN); for (j = 0; j < children; ++j) { if (j >= ctrl_children) continue; (void)send(child[j].sock, &byte, 1, oob_flags); } if (!(0x80 & byte) && !is_root) { (void)send(parent, &byte, 1, oob_flags); } } /* master forwards fatal signals if possible */ static void sigforward(int sig) { gasneti_assert_always(is_control); { gasneti_sighandlerfn_t fp; switch (sig) { /* Termination signals are forwarded only once */ case SIGQUIT: case SIGINT: case SIGTERM: case SIGHUP: gasneti_reghandler(sig, SIG_DFL); break; /* Other signals are forwarded every time they occur */ default: gasneti_reghandler(sig, &sigforward); break; } } BOOTSTRAP_VERBOSE(("[%d] Forwarding signal %d\n", myname, sig)); do_oob(sig | 0x80); signal_rank_procs(sig); } static void signal_forward(int enable) { gasneti_sighandlerfn_t fp = enable ? &sigforward : SIG_DFL; /* Termination signals */ gasneti_reghandler(SIGQUIT, fp); gasneti_reghandler(SIGINT, fp); gasneti_reghandler(SIGTERM, fp); gasneti_reghandler(SIGHUP, fp); /* Some non-fatal signals (e.g. for freeze/unfreeze or backtrace) */ /* TODO: parse environment for GASNET_FREEZE_SIGNAL and GASNET_BACKTRACE_SIGNAL? */ #ifdef SIGCONT gasneti_reghandler(SIGCONT, fp); #endif #ifdef SIGUSR1 gasneti_reghandler(SIGUSR1, fp); #endif #ifdef SIGUSR2 gasneti_reghandler(SIGUSR2, fp); #endif } /* Cause everything to exit. * In a control process this returns to allow a full cleanup. * In worker processes there is no returning. */ static void do_abort(unsigned char exitcode) { /* avoid reentrance */ if (in_abort) { return; } else { in_abort = 1; } #if HAVE_PR_SET_PDEATHSIG /* disarm signal, if any, for termination of our parent */ if (use_pdeathsig) { (void)prctl(PR_SET_PDEATHSIG, 0); } #endif if (is_control) { signal_forward(0); do_oob(exitcode & 0x7f); kill_all_ranks(); } else { gasneti_killmyprocess(exitcode); /* paranoia... */ gasneti_reghandler(SIGABRT, SIG_DFL); gasneti_fatalerror("do_abort aborting..."); /* NOT REACHED */ } } static void reap_one(pid_t pid, int status) { gasneti_assert_always(pid); gasneti_atomic_decrement(&live, 0); if (child) { int j; for (j = 0; j < children; ++j) { if (pid == child[j].pid) { const char *kind = (j < ctrl_children) ? "Ctrl" : "Rank"; const char *fini = finalized ? "" : " before finalize"; const int sock = child[j].sock; if (sock) (void)close(sock); child[j].pid = 0; if (WIFEXITED(status)) { int tmp = WEXITSTATUS(status); if (exit_status == 0) exit_status = tmp; BOOTSTRAP_VERBOSE(("[%d] %s proc %d exited with status %d%s\n", myname, kind, child[j].rank, tmp, fini)); if (!sock && (j < ctrl_children)) { // Ctrl proc which did not yet connect const char *host = child[j].nodelist ? child[j].nodelist[0] : nodelist[0]; do_message("Failed to start processes on %s, possibly due to an " "inability to establish an ssh connection from %s without " "interactive authentication.", host, my_host); } } else if (WIFSIGNALED(status)) { int tmp = WTERMSIG(status); if (exit_status == 0) exit_status = tmp; BOOTSTRAP_VERBOSE(("[%d] %s proc %d died with signal %d%s\n", myname, kind, child[j].rank, tmp, fini)); } else { BOOTSTRAP_VERBOSE(("[%d] %s proc %d exited with unknown stats%s\n", myname, kind, child[j].rank, fini)); } if (!finalized) { do_abort(exit_status ? exit_status : -1); } break; } } if (j == children) { BOOTSTRAP_VERBOSE(("[%d] Reaped unknown pid %d\n", myname, (int)pid)); } } if (initialized != children) { gasneti_fatalerror("One or more processes died before setup was completed"); } } static void reaper(int sig) { gasneti_assert_always(!sig || sig == SIGCHLD); gasneti_reghandler(SIGCHLD, sig ? &reaper : SIG_DFL); { pid_t pid; int status; while((pid = waitpid(-1,&status,WNOHANG)) > 0) { reap_one(pid, status); } } } static void wait_for_all(void) { sigset_t child_set; sigset_t old_set; sigemptyset(&child_set); sigaddset(&child_set, SIGCHLD); sigprocmask(SIG_BLOCK, &child_set, &old_set); /* Call reaper() to collect any children that may have exited before * we got here. * Also calls gasneti_reghandler(SIGCHLD, &reaper) for us. */ reaper(SIGCHLD); while (gasneti_atomic_read(&live, 0)) { BOOTSTRAP_VERBOSE(("[%d] Sigsuspend with %d children left\n", myname, gasneti_atomic_read(&live, 0))); sigsuspend(&old_set); } } static void sigurg_handler(int sig) { unsigned char byte = 127; BOOTSTRAP_VERBOSE(("[%d] Received SIGURG\n", myname)); if (is_control) { /* We need to read our single byte of OOB data here. * Use of select() can tell us who sent it to us. * MSG_OOB is supposed to always be non-blocking.i * If multiple sockets have OOB data we read them all. * If the SIGURG came fron kill() rather than OOB, * then we'll keep the value 127, leading to an abort. */ struct timeval timeout = {0,0}; fd_set fds = all_fds.set; int count = select(all_fds.max+1, NULL, NULL, &fds, &timeout); if (!count) { BOOTSTRAP_VERBOSE(("[%d] sigurg with NO exception fds\n", myname)); do_abort(-1); } while (count) { int j, fd = -1; for (j = 0; j < ctrl_children; ++j) { /* Only check the control sockets */ if (FD_ISSET(child[j].sock, &fds)) { fd = child[j].sock; break; } } if ((fd < 0) && (parent >= 0) && FD_ISSET(parent, &fds)) { fd = parent; } if (fd < 0) break; /* Unknown source! */ (void)recv(fd, &byte, 1, MSG_OOB); FD_CLR(fd, &fds); --count; } } if (0x80 & byte) { /* signal forwarding */ gasneti_reghandler(SIGURG, &sigurg_handler); /* rearm */ signal_rank_procs(0x7f & byte); } else { /* abortive exit (or failure to locate any OOB data) */ gasneti_reghandler(SIGURG, SIG_IGN); /* ignore */ do_abort(byte); } } static void do_write(int fd, const void *buf, size_t len) { const char *p = (const char *)buf; while (len) { ssize_t rc = write(fd, p, len); if_pf (!rc || ((rc < 0) && (errno != EINTR))) { do_message("write() returned %d, errno = %d(%s)", (int)rc, errno, strerror(errno)); do_abort(-1); } if_pf (in_abort) break; if_pf (rc < 0) continue; // EINTR p += rc; len -= rc; } } /* NOTE that unlike writev() we clobber the iovec */ static void do_writev(int fd, struct iovec *iov, int iovcnt) { #if defined(IOV_MAX) static int iov_max = IOV_MAX; #elif defined(MAXIOV) static int iov_max = MAXIOV; #else static int iov_max = 1024; #endif while (iovcnt) { ssize_t rc; while (0 == iov->iov_len) { ++iov; if (0 == --iovcnt) return; } rc = writev(fd, iov, MIN(iovcnt, iov_max)); if_pf ((rc < 0) && (errno == EINVAL) && (iov_max > 32)) { iov_max /= 2; continue; } if_pf (!rc || ((rc < 0) && (errno != EINTR))) { do_message("writev() returned %d, errno = %d(%s)", (int)rc, errno, strerror(errno)); do_abort(-1); } if_pf (in_abort) break; if_pf (rc < 0) continue; // EINTR do { size_t len = iov->iov_len; if (rc >= len) { #if GASNET_DEBUG iov->iov_base = NULL; /* detect reuse, which is forbidden */ #endif ++iov; --iovcnt; rc -= len; } else { iov->iov_base = (void*)((uintptr_t)iov->iov_base + rc); iov->iov_len -= rc; break; } } while (rc); } } static void do_write_string(int fd, const char *string) { size_t len = string ? strlen(string) : 0; struct iovec iov[2]; iov[0].iov_base = (void *)&len; iov[0].iov_len = sizeof(len); iov[1].iov_base = (void *)string; iov[1].iov_len = len; do_writev(fd, iov, 2); } static void do_read(int fd, void *buf, size_t len) { char *p = (char *)buf; while (len) { ssize_t rc = read(fd, p, len); if_pf (!rc) { do_message("read() returned 0 (EOF)"); do_abort(-1); } else if_pf ((rc < 0) && (errno != EINTR)) { do_message("read() returned %d, errno = %d(%s)", (int)rc, errno, strerror(errno)); do_abort(-1); } if_pf (in_abort) break; if_pf (rc < 0) continue; // EINTR p += rc; len -= rc; } } /* NOTE that unlike readv() we clobber the iovec */ static void do_readv(int fd, struct iovec *iov, int iovcnt) { #if defined(IOV_MAX) static int iov_max = IOV_MAX; #elif defined(MAXIOV) static int iov_max = MAXIOV; #else static int iov_max = 1024; #endif { size_t len = 0; int c; for(c=0; ciov_len) { ++iov; if (0 == --iovcnt) return; } rc = readv(fd, iov, MIN(iovcnt, iov_max)); if_pf ((rc < 0) && (errno == EINVAL) && (iov_max > 32)) { iov_max /= 2; continue; } if_pf (!rc) { do_message("readv() returned 0 (EOF)"); do_abort(-1); } else if_pf ((rc < 0) && (errno != EINTR)) { do_message("readv() returned %d, errno = %d(%s)", (int)rc, errno, strerror(errno)); do_abort(-1); } if_pf (in_abort) break; if_pf (rc < 0) continue; // EINTR do { size_t len = iov->iov_len; if (rc >= len) { #if GASNET_DEBUG iov->iov_base = NULL; /* detect reuse, which is forbidden */ #endif ++iov; --iovcnt; rc -= len; } else { iov->iov_base = (void*)((uintptr_t)iov->iov_base + rc); iov->iov_len -= rc; break; } } while (rc); } } static char *do_read_string(int fd) { char *result = NULL; size_t len; do_read(fd, &len, sizeof(size_t)); if (len) { result = gasneti_malloc(len + 1); do_read(fd, result, len); result[len] = '\0'; } return result; } static int my_socketpair(int sv[2]) { #if defined(PF_LOCAL) const int domain = PF_LOCAL; #elif defined(PF_UNIX) const int domain = PF_UNIX; #endif int rc = socketpair(domain, SOCK_STREAM, 0, sv); return rc; } static int options_helper(char **list, const char *string, const char *where) { int count = 0; int in_quotes = 0; const char *special[] = {WHITESPACE "\\\"'", /* special chars outside dbl quotes */ "\\\""}; /* special chars inside dbl quotes */ if (!string) { return 0; } /* Outer loop adds a word to the list on each pass with the possible exception of the last */ while (*string) { char tmp[1024]; char *p = tmp; while (*string && strchr(WHITESPACE,*string)) ++string; /* eat leading whitespace */ if (!*string) { break; /* reached end of string */ } /* This loop brings together pieces of a "word", possible w/ quotes */ in_quotes = 0; do { int i = strcspn(string, special[in_quotes]); GASNETI_MEMCPY(p , string, i); p += i; gasneti_assert_always((uintptr_t)(p-tmp) < (sizeof(tmp)-1)); string += i; switch (*string) { case '\0': break; case '\\': if (!string[1]) { die(1, "string ends with \\ %s", where); } else if (strchr(special[in_quotes],string[1])) { /* Drop the backslash if it quotes a special character */ *(p++) = string[1]; gasneti_assert_always((uintptr_t)(p-tmp) < (sizeof(tmp)-1)); } else { /* Keep the backslash */ GASNETI_MEMCPY(p , string, 2); p += 2; gasneti_assert_always((uintptr_t)(p-tmp) < (sizeof(tmp)-1)); } string += 2; break; case '\'': ++string; i = strcspn(string, "\'"); if (string[i] != '\'') { die(1, "unbalanced ' %s", where); } GASNETI_MEMCPY(p , string, i); p += i; gasneti_assert_always((uintptr_t)(p-tmp) < (sizeof(tmp)-1)); string += i + 1; break; case '"': ++string; in_quotes = !in_quotes; break; default: /* WHITESPACE */ break; } } while (*string && (in_quotes || !strchr(WHITESPACE,*string))); if (in_quotes) { die(1, "unbalanced \" %s", where); } if (list) { gasneti_assert_always((uintptr_t)(p-tmp) < sizeof(tmp)); *p = '\0'; list[count] = gasneti_strdup(tmp); } ++count; } if (list) { list[count] = NULL; } return count; } /* Parse a string into an array of "words", following shell rules for '," and \ */ static char **parse_options(const char *string, int *count_p, const char *where) { int count; char **list; /* First parse pass will just count the words */ count = options_helper(NULL, string, where); list = gasneti_malloc(sizeof(char *) * (count+1)); /* Second pass fills the list of words */ (void)options_helper(list, string, where); if (count_p) *count_p = count; return list; } /* wrappers that map unset/empty to NULL */ static const char *my_getenv_withdefault(const char *key, const char *defval) { char *env_string = gasneti_getenv_withdefault(key, defval); return ((env_string != NULL) && strlen(env_string)) ? env_string : NULL; } static const char *my_getenv(const char *key) { return my_getenv_withdefault(key, NULL); } static void configure_ssh(void) { const char *env_string; const char *ssh_argv0; char **ssh_options = NULL; int is_openssh = 0; int optcount = 0; int i, argi; envcmd = my_getenv_withdefault(ENV_PREFIX "ENVCMD", "env"); /* Determine the ssh command */ ssh_argv0 = my_getenv_withdefault(ENV_PREFIX "SSH_CMD", GASNETI_DEFAULT_SSH_CMD); if (ssh_argv0 == NULL) { BOOTSTRAP_VERBOSE(("Ignoring empty value in environment variable " ENV_PREFIX "SSH_CMD\n")); ssh_argv0 = GASNETI_DEFAULT_SSH_CMD; } /* Check for OpenSSH */ { char *cmd = gasneti_sappendf(NULL, "%s -V 2>&1 | grep OpenSSH >/dev/null 2>/dev/null", ssh_argv0); is_openssh = (0 == system(cmd)); gasneti_free(cmd); BOOTSTRAP_VERBOSE(("Configuring for OpenSSH\n")); } /* Check for user-supplied options */ if ((env_string = my_getenv_withdefault(ENV_PREFIX "SSH_OPTIONS", GASNETI_DEFAULT_SSH_OPTIONS)) != NULL) { ssh_options = parse_options(env_string, &optcount, "while parsing " ENV_PREFIX "SSH_OPTIONS"); } /* Now build the command line */ ssh_argc = optcount + (is_openssh ? 10 : 1); ssh_argv = gasneti_calloc((ssh_argc + 3 /* host + cmd + NULL = 3 */), sizeof(char *)); ssh_argv[0] = gasneti_strdup(ssh_argv0); argi = 1; if (is_openssh) { ssh_argv[argi++] = (char *)"-o"; ssh_argv[argi++] = (char *)"StrictHostKeyChecking no"; ssh_argv[argi++] = (char *)"-o"; ssh_argv[argi++] = (char *)"FallBackToRsh no"; ssh_argv[argi++] = (char *)"-o"; ssh_argv[argi++] = (char *)"BatchMode yes"; ssh_argv[argi++] = (char *)"-o"; ssh_argv[argi++] = (char *)"ForwardX11 no"; ssh_argv[argi++] = (char *)"-q"; } if (optcount) { for (i=0; irank; iov[1].iov_len = sizeof(gex_Rank_t); iov[2].iov_base = (void*) &ch->tree_ranks; iov[2].iov_len = sizeof(gex_Rank_t); iov[3].iov_base = (void*) &ch->tree_nodes; iov[3].iov_len = sizeof(gex_Rank_t); do_writev(s, iov, 4); } static void recv_identity(int s) { struct iovec iov[4]; iov[0].iov_base = (void*) &nranks; iov[0].iov_len = sizeof(gex_Rank_t); iov[1].iov_base = (void*) &myrank; iov[1].iov_len = sizeof(gex_Rank_t); iov[2].iov_base = (void*) &tree_ranks; iov[2].iov_len = sizeof(gex_Rank_t); iov[3].iov_base = (void*) &tree_nodes; iov[3].iov_len = sizeof(gex_Rank_t); do_readv(s, iov, 4); gasneti_assert_always(nranks > 0); gasneti_assert_always(myrank < nranks); } /* * Send environment as a big char[] with \0 between each 'VAR=VAL' * and a double \0 to terminate. (inspired by amudp) */ static void send_env(int s) { if (!master_env) { int i; const char *p; char *q; size_t rlen = strlen(ENV_PREFIX "SSH_"); gasneti_assert_always(is_control); /* First pass over environment to get its size */ master_env_len = 1; /* for the doubled \0 at the end */ for (i = 0, p = environ[0]; p != NULL; p = environ[++i]) { if (!strncmp(ENV_PREFIX "SSH_", p, rlen)) { /* We parse these ourselves, don't forward */ } else { master_env_len += strlen(p) + 1; } } /* Append all the strings together */ q = master_env = gasneti_malloc(master_env_len); for (i = 0, p = environ[0]; p != NULL; p = environ[++i]) { if (!strncmp(ENV_PREFIX "SSH_", p, rlen)) { /* We parse these ourselves, don't forward */ } else { size_t tmp = strlen(p) + 1; GASNETI_MEMCPY(q, p, tmp); q += tmp; } } *q = '\0'; } /* send it */ do_write(s, &master_env_len, sizeof(master_env_len)); do_write(s, master_env, master_env_len); } static void recv_env(int s) { do_read(s, &master_env_len, sizeof(master_env_len)); master_env = gasneti_malloc(master_env_len); gasneti_leak(master_env); do_read(s, master_env, master_env_len); } static void send_ssh_argv(int s) { int i; do_write(s, &ssh_argc, sizeof(int)); for (i = 0; i < ssh_argc; ++i) { do_write_string(s, ssh_argv[i]); } } static void recv_ssh_argv(int s) { int i; do_read(s, &ssh_argc, sizeof(int)); ssh_argv = gasneti_calloc(ssh_argc+3, sizeof(char *)); gasneti_leak(ssh_argv); for (i = 0; i < ssh_argc; ++i) { ssh_argv[i] = do_read_string(s); gasneti_leak(ssh_argv[i]); } } static void send_argv(int s, int argc, char * const *argv) { int i; do_write(s, &argc, sizeof(int)); for (i = 0; i < argc; ++i) { do_write_string(s, argv[i]); } } static void recv_argv(int s, int *argc_p, char ***argv_p) { int argc, i; char **argv; do_read(s, &argc, sizeof(int)); argv = gasneti_malloc((argc+1) * sizeof(char*)); gasneti_leak(argv); for (i = 0; i < argc; ++i) { argv[i] = do_read_string(s); gasneti_leak(argv[i]); } argv[argc] = NULL; *argc_p = argc; *argv_p = argv; argv0 = argv[0]; } static int fcntl_setfl(int fd, int flag) { int rc; rc = fcntl(fd, F_GETFL, 0); if (rc >= 0) rc = fcntl(fd, F_SETFL, rc | flag); return rc; } #if 0 /* Unused */ static int fcntl_clrfl(int fd, int flag) { int rc; rc = fcntl(fd, F_GETFL, 0); if (rc >= 0) rc = fcntl(fd, F_SETFL, rc & ~flag); return rc; } #endif static int fcntl_setfd(int fd, int flag) { int rc; rc = fcntl(fd, F_GETFD, 0); if (rc >= 0) rc = fcntl(fd, F_SETFD, rc | flag); return rc; } static int fcntl_clrfd(int fd, int flag) { int rc; rc = fcntl(fd, F_GETFD, 0); if (rc >= 0) rc = fcntl(fd, F_SETFD, rc & ~flag); return rc; } static void fd_sets_init(void) { FD_ZERO(&child_fds.set); child_fds.max = -1; FD_ZERO(&all_fds.set); all_fds.max = -1; } static void fd_sets_add(int fd) { FD_SET(fd, &all_fds.set); all_fds.max = MAX(all_fds.max, fd); if (fd != parent) { FD_SET(fd, &child_fds.set); child_fds.max = MAX(child_fds.max, fd); } } static void pre_spawn(int count) { struct sockaddr_in sock_addr; GASNET_SOCKLEN_T addr_len; const char *env_string; /* Get the cwd */ if ((env_string = my_getenv(ENV_PREFIX "SSH_REMOTE_PATH")) != NULL) { strncpy(cwd, env_string, sizeof(cwd)-1); cwd[sizeof(cwd) - 1] = '\0'; } else if (!getcwd(cwd, sizeof(cwd))) { gasneti_fatalerror("getcwd() failed"); } /* Create listening socket */ if ((listener = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { gasneti_fatalerror("listener = socket() failed"); } (void)fcntl_setfd(listener, FD_CLOEXEC); sock_addr.sin_family = AF_INET; sock_addr.sin_port = 0; sock_addr.sin_addr.s_addr = INADDR_ANY; addr_len = sizeof(sock_addr); if (bind(listener, (struct sockaddr *)&sock_addr, addr_len) < 0) { gasneti_fatalerror("bind() failed"); } if (listen(listener, count) < 0) { gasneti_fatalerror("listen() failed w/ errno=%d", errno); } if (getsockname(listener, (struct sockaddr *)&sock_addr, &addr_len) < 0) { gasneti_fatalerror("getsockname() failed"); } listen_port = ntohs(sock_addr.sin_port); } static void post_spawn(int count, int argc, char * const *argv) { /* Accept count connections */ while (count--) { struct sockaddr_in sock_addr; GASNET_SOCKLEN_T addr_len = sizeof(sock_addr); gex_Rank_t child_id; struct child *ch = NULL; int s; reaper(SIGCHLD); /* Take notice of children dying while blocked in accept() */ if ((s = accept(listener, (struct sockaddr *)&sock_addr, &addr_len)) < 0) { gasneti_fatalerror("accept() failed w/ errno=%d", errno); } reaper(0); /* Disarm signal handler */ fd_sets_add(s); gasneti_assert_always(mypid == getpid()); (void)ioctl(s, SIOCSPGRP, &mypid); /* Enable SIGURG delivery on OOB data */ (void)fcntl_setfd(s, FD_CLOEXEC); #ifdef TCP_CORK (void)setsockopt(s, IPPROTO_TCP, TCP_CORK, (char *) &c_one, sizeof(c_one)); #endif do_read(s, &child_id, sizeof(gex_Rank_t)); gasneti_assert_always(child_id < children); ch = &(child[child_id]); gasneti_assert_always(ch->rank < nranks); ch->sock = s; send_identity(s, ch); send_argv(s, argc, argv); send_env(s); if (ch->tree_nodes > 1) { do_write(s, &out_degree, sizeof(gex_Rank_t)); send_nodelist(s, ch->tree_nodes - 1, ch->nodelist + 1); send_ssh_argv(s); do_write_string(s, wrapper); } #ifdef TCP_CORK (void)setsockopt(s, IPPROTO_TCP, TCP_CORK, (char *) &c_zero, sizeof(c_zero)); #endif #ifdef TCP_NODELAY (void)setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &c_one, sizeof(c_one)); #endif initialized++; } /* Close listener */ close(listener); } static void do_connect(const char *spawn_args, int *argc_p, char ***argv_p) { gex_Rank_t child_id; const char *parent_name; int parent_port; /* Extract child_id, parent_port and parent_name from spawn args * Format of spawn_args: "id:port:host" * : indicates the delimiter character (args_delim) * id is the non-negative integer child_id (rank among my parent's children) * port is the positive integer TCP port number * host is the parent's hostname, address or 'localhost' (everything after the last delimiter) */ { const char *p = spawn_args; char *endptr; long ltmp; gasneti_assert_always(p && *p); /* Required non-negative child id */ child_id = ltmp = strtol(p,&endptr,0); if ((endptr == p) || (ltmp < 0) || ((long)child_id != ltmp)) { die(1, "Unable to parse child id in " ENV_PREFIX "SPAWN_ARGS"); } if (*endptr != args_delim) { die(1, "Unable to parse " ENV_PREFIX "SPAWN_ARGS"); } p = endptr + 1; /* Required non-negative port */ parent_port = ltmp = strtol(p,&endptr,0); if ((endptr == p) || (ltmp < 0) || ((long)parent_port != ltmp)) { die(1, "Unable to parse port number in " ENV_PREFIX "SPAWN_ARGS"); } if (*endptr != args_delim) { die(1, "Unable to parse " ENV_PREFIX "SPAWN_ARGS"); } p = endptr + 1; /* Parent_name is everything that remains */ parent_name = p; } /* Connect */ { struct sockaddr_in sock_addr; GASNET_SOCKLEN_T addr_len; struct hostent *h = gethostbyname(parent_name); int rc, retry = 4; if (h == NULL) { gasneti_fatalerror("gethostbyname(%s) failed", parent_name); } if ((parent = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { gasneti_fatalerror("parent = socket() failed"); } sock_addr.sin_family = AF_INET; sock_addr.sin_port = htons(parent_port); sock_addr.sin_addr = *(struct in_addr *)(h->h_addr_list[0]); addr_len = sizeof(sock_addr); while ((rc = connect(parent, (struct sockaddr *)&sock_addr, addr_len)) < 0) { if ((errno != ECONNREFUSED) || !retry) { gasneti_fatalerror("connect(host=%s, port=%d) failed w/ errno=%d", parent_name, parent_port, errno); } else { sleep(1); --retry; } } } fd_sets_add(parent); gasneti_assert_always(mypid == getpid()); (void)ioctl(parent, SIOCSPGRP, &mypid); /* Enable SIGURG delivery on OOB data */ (void)fcntl_setfd(parent, FD_CLOEXEC); #ifdef TCP_NODELAY (void)setsockopt(parent, IPPROTO_TCP, TCP_NODELAY, (char *) &c_one, sizeof(c_one)); #endif do_write(parent, &child_id, sizeof(gex_Rank_t)); recv_identity(parent); recv_argv(parent, argc_p, argv_p); recv_env(parent); if (tree_nodes > 1) { do_read(parent, &out_degree, sizeof(out_degree)); recv_nodelist(parent, tree_nodes - 1); recv_ssh_argv(parent); wrapper = do_read_string(parent); gasneti_leak((/*non-const*/ void *)wrapper); } gasneti_getenv_hook = &do_getenv; gasneti_propagate_env_hook = &do_propagate_env; gasneti_check_env_prefix_hook = &do_check_env_prefix_hook; envcmd = my_getenv_withdefault(ENV_PREFIX "ENVCMD", "env"); myname = myrank; BOOTSTRAP_VERBOSE(("[%d] Connected via fd=%d\n", myname, parent)); } static void spawn_one_control(gex_Rank_t child_id, const char *cmdline, const char *my_host) { const char *host = child[child_id].nodelist ? child[child_id].nodelist[0] : nodelist[0]; pid_t pid; int is_local = (GASNETI_BOOTSTRAP_LOCAL_SPAWN && (!host || !strcmp(host, my_host))); child[child_id].pid = pid = fork(); if (pid < 0) { gasneti_fatalerror("fork() failed"); } else if (pid == 0) { char *cmd = gasneti_sappendf(NULL, "cd %s; exec %s %s " ENV_PREFIX GASNET_CORE_NAME_STR "_SPAWNER=ssh " ENV_PREFIX "SPAWN_ARGS='%c%s%c%d%c%d%c%s' " "%s", quote_arg(cwd), (wrapper ? wrapper : ""), envcmd, 'C', (is_verbose ? "v" : ""), args_delim, (int)child_id, args_delim, listen_port, args_delim, (is_local ? "localhost" : my_host), cmdline); if (is_local) { /* XXX: if we are clever enough, we might be able to "unwind" w/o the exec() */ BOOTSTRAP_VERBOSE(("[%d] spawning process %d on %s via fork()\n", myname, (int)child[child_id].rank, my_host)); execlp("sh", "sh", "-c", cmd, NULL); gasneti_fatalerror("execlp(sh) failed"); } else { #if HAVE_PR_SET_PDEATHSIG if (use_pdeathsig) { /* If its parent exits early (an abnormal condition) then we want ssh to exit too */ (void)prctl(PR_SET_PDEATHSIG, SIGHUP); } #endif BOOTSTRAP_VERBOSE(("[%d] spawning process %d on %s via %s\n\tCMD: %s", myname, (int)child[child_id].rank, host, ssh_argv[0], cmd)); ssh_argv[ssh_argc] = (/* noconst */ char *)host; ssh_argv[ssh_argc+1] = cmd; execvp(ssh_argv[0], ssh_argv); gasneti_fatalerror("execvp(ssh) failed"); } } gasneti_atomic_increment(&live, 0); } /* do_worker could probably be called "undo_control" */ static int do_worker(void) { gasneti_reghandler(SIGURG, SIG_DFL); gasneti_reghandler(SIGCHLD, SIG_DFL); gasneti_free(child-1); /* NOTE: was offset at allocation time */ child = NULL; children = 0; ctrl_children = 0; if (tree_nodes > 1) { int i; for (i = 0; i < tree_nodes - 1; ++i) { gasneti_free(nodelist[i]); } gasneti_free(nodelist); nodelist = NULL; for (i = 0; i < ssh_argc; ++i) { gasneti_free(ssh_argv[i]); } gasneti_free(ssh_argv); ssh_argv = NULL; gasneti_free((/*non-const*/ void *)wrapper); wrapper = NULL; } tree_nodes = GEX_RANK_INVALID; tree_ranks = GEX_RANK_INVALID; (void)fcntl_setfd(parent, FD_CLOEXEC); #if HAVE_PR_SET_PDEATHSIG if (use_pdeathsig) { /* If our parent exits early (an abnormal condition) then we should too */ (void)prctl(PR_SET_PDEATHSIG, SIGHUP); } #endif BOOTSTRAP_VERBOSE(("[r%d] Connected via fd=%d\n", myrank, parent)); return GASNET_OK; } /* Fork the rank process(es) */ static void spawn_rank(int argc, char **argv) { int j; for (j = ctrl_children; j < children; ++j) { int rc, sv[2]; rc = my_socketpair(sv); if (rc < 0) { /* TODO: is any recovery possible? */ gasneti_fatalerror("socketpair() failed!"); } child[j].sock = sv[1]; fd_sets_add(sv[1]); (void)fcntl_setfd(sv[1], FD_CLOEXEC); { pid_t pid = fork(); if (!pid) { int k; for (k = 0; k <= j; ++k) { (void)close(child[k].sock); } (void)close(parent); parent = sv[0]; signal_forward(0); is_control = 0; myrank = child[j].rank; myname = -911; mypid = getpid(); (void)my_setpgid(0); return; } else if (pid < 0) { gasneti_fatalerror("fork() failed!"); } (void)my_setpgid(pid); child[j].pid = pid; ++initialized; } (void)close(sv[0]); gasneti_atomic_increment(&live, 0); } } /* Spawn control procs via ssh (or fork() when possible) */ static void spawn_ctrl(int argc, char **argv) { char *cmdline = quote_arg(argv[0]); int j; const char *masterip; if (is_root && (NULL != (masterip = my_getenv(ENV_PREFIX "MASTERIP")))) { strncpy(my_host, masterip, sizeof(my_host) - 1); my_host[sizeof(my_host) - 1] = '\0'; } else if (gethostname(my_host, sizeof(my_host)) < 0) { die(1, "gethostname() failed"); } /* Before we began to support gasnet_init(NULL,NULL) the workers were spawned * with no arguments, and the gasnet_init() call actual *populated* the passed * argc_p and argv_p with the command line sent over the control socket. * NOW if we see a NULL-init, then we need to use the full command line in order * to be certain that main() will see the arguments. */ if (null_init) { for (j = 1; j < argc; ++j) { char *tmp = quote_arg(argv[j]); cmdline = gasneti_sappendf(cmdline, " %s", tmp); gasneti_free(tmp); } } pre_spawn(ctrl_children); for (j = 0; j < ctrl_children; ++j) { spawn_one_control(j, cmdline, my_host); } post_spawn(ctrl_children, argc, argv); gasneti_free(cmdline); } /*----------------------------------------------------------------------------------------------*/ static int do_select(int num_fds, fd_set *rd_fds, fd_set *wr_fds) { int rc; do { rc = select(num_fds, rd_fds, wr_fds, NULL, NULL); if_pf (!rc || ((rc < 0) && (errno != EINTR))) do_abort(-1); if_pf (in_abort) return -1; } while (rc <= 0); return rc; } /* Return index of a writable child, removing it from the fd_set */ static int next_write(fd_set *fds) { int j, rc; fd_set write_fds = *fds; rc = do_select(child_fds.max+1, NULL, &write_fds); if (in_abort) return -1; for (j = 0; j < children; ++j) { if (FD_ISSET(child[j].sock, &write_fds)) { FD_CLR(child[j].sock, fds); return j; } } /* NOT REACHED */ return -1; } #define WRITE_EACH_CHILD(_remain, _child, _fdset) \ if (0 != (_remain = children)) \ for (_fdset = child_fds.set; \ _remain && ((_child = next_write(&(_fdset))),1); \ --_remain) static void build_all2all_iov(struct iovec *iov, uint8_t *buf, size_t len, int rank, int size) { size_t row_len = len * nranks; size_t run_len = row_len - len * size; uint8_t *p = buf + row_len * (rank - myrank); int i; /* First partial */ iov[0].iov_base = p; iov[0].iov_len = len * rank; /* Skip that partial and the "local" piece */ p += len * (rank + size); /* Contiguous "wrap around" runs */ for (i = 1; i < size; ++i) { iov[i].iov_base = p; iov[i].iov_len = run_len; p += row_len; } /* Final partial */ iov[size].iov_base = p; iov[size].iov_len = run_len - len * rank; } /* In-place square matrix transpose * TODO: there are better algorithms than this */ static void transpose(uint8_t *buf, size_t len, size_t n) { const size_t row_len = len * nranks; uint8_t *tmp = gasneti_malloc(len); gex_Rank_t j, k; uint8_t *p0, *q0; uint8_t *p1, *q1; for ( j = 0, p0 = q0 = buf; j < n; ++j, q0 += len, p0 += row_len) { for (k = 0, p1 = p0, q1 = q0; k < j; ++k, p1 += len, q1 += row_len) { GASNETI_MEMCPY(tmp, p1, len); GASNETI_MEMCPY(p1, q1, len); GASNETI_MEMCPY(q1, tmp, len); } } } static void cmd_FINI(char cmd, int i) { /* Comands: */ const char cmd0 = BOOTSTRAP_CMD_FINI0; const char cmd1 = BOOTSTRAP_CMD_FINI1; /* State: */ static int count = 0; if (cmd == cmd0) { if (++count < children) return; count = 0; if (! is_root) { do_write(parent, &cmd0, sizeof(cmd0)); return; } } // Children can exit as quickly as they read the writes issued below. // So, temporarily disarm SIGCHLD to ensure the loop runs to completion. gasneti_blocksig(SIGCHLD); { fd_set fds; int j, k; WRITE_EACH_CHILD(j,k,fds) { if (k < 0) return; do_write(child[k].sock, &cmd1, sizeof(cmd1)); } finalized = 1; } gasneti_unblocksig(SIGCHLD); } static void cmd_BARR(char cmd, int i) { /* Comands: */ const char cmd0 = BOOTSTRAP_CMD_BARR0; const char cmd1 = BOOTSTRAP_CMD_BARR1; /* State: */ static int count = 0; if (cmd == cmd0) { if (++count < children) return; count = 0; if (! is_root) { do_write(parent, &cmd0, sizeof(cmd0)); return; } } { fd_set fds; int j, k; WRITE_EACH_CHILD(j,k,fds) { if (k < 0) return; do_write(child[k].sock, &cmd1, sizeof(cmd1)); } } } static void cmd_BCAST(char cmd, int i) { /* Comands: */ const char cmd0 = BOOTSTRAP_CMD_BCAST0; const char cmd1 = BOOTSTRAP_CMD_BCAST1; /* State: none */ /* Local: */ int s = child[i].sock; static size_t len; struct iovec iov[3]; uint8_t *data; if (cmd == cmd0) { do_read(s, &len, sizeof(len)); data = gasneti_malloc(len); do_read(s, data, len); if (! is_root) { iov[0].iov_base = (void*)&cmd0; iov[0].iov_len = sizeof(cmd0); iov[1].iov_base = (void*)&len; iov[1].iov_len = sizeof(len); iov[2].iov_base = data; iov[2].iov_len = len; do_writev(parent, iov, 3); } } else { do_read(s, &len, sizeof(len)); data = gasneti_malloc(len); do_read(s, data, len); } { fd_set fds; int j, k; WRITE_EACH_CHILD(j,k,fds) { if (k < 0) return; if (k == i) continue; iov[0].iov_base = (void*)&cmd1; iov[0].iov_len = sizeof(cmd1); iov[1].iov_base = &len; iov[1].iov_len = sizeof(len); iov[2].iov_base = data; iov[2].iov_len = len; do_writev(child[k].sock, iov, 3); } gasneti_free(data); } } static void cmd_EXCHG(char cmd, int i) { /* Comands: */ const char cmd0 = BOOTSTRAP_CMD_EXCHG0; const char cmd1 = BOOTSTRAP_CMD_EXCHG1; /* State: */ static uint8_t *data = NULL; static int count = 0; static size_t len; /* Local: */ struct iovec iov[3]; int s = child[i].sock; if (cmd == cmd0) { static size_t exchg_len; do_read(s, &len, sizeof(len)); if (!count) { gasneti_assert_always(!data); data = gasneti_malloc(len * nranks); exchg_len = len; } else { gasneti_assert_always_int(len ,==, exchg_len); } do_read(s, data + len * child[i].rank, len * child[i].tree_ranks); if (++count < children) return; count = 0; if (! is_root) { iov[0].iov_base = (void*)&cmd0; iov[0].iov_len = sizeof(cmd0); iov[1].iov_base = (void*)&len; iov[1].iov_len = sizeof(len); iov[2].iov_base = data + len * myrank; iov[2].iov_len = len * tree_ranks; do_writev(parent, iov, 3); return; } } else { gex_Rank_t next = myrank + tree_ranks; iov[0].iov_base = data; iov[0].iov_len = len * myrank; iov[1].iov_base = data + len*next; iov[1].iov_len = len * (nranks - next); do_readv(s, iov, 2); } { gex_Rank_t rank, next; fd_set fds; int j, k; WRITE_EACH_CHILD(j,k,fds) { if (k < 0) return; rank = child[k].rank; next = rank + child[k].tree_ranks; iov[0].iov_base = (void*)&cmd1; iov[0].iov_len = sizeof(cmd1); iov[1].iov_base = data; iov[1].iov_len = len * rank; iov[2].iov_base = data + len*next; iov[2].iov_len = len * (nranks - next); do_writev(child[k].sock, iov, 3); } gasneti_free(data); data = NULL; } } static void cmd_TRANS(char cmd, int i) { /* Comands: */ const char cmd0 = BOOTSTRAP_CMD_TRANS0; const char cmd1 = BOOTSTRAP_CMD_TRANS1; /* State: */ static uint8_t *data = NULL; static struct iovec *iov = NULL; static int count = 0; static size_t len; /* Local: */ int s = child[i].sock; if (cmd == cmd0) { static size_t trans_len; size_t row_len; do_read(s, &len, sizeof(len)); row_len = len * nranks; if (!count) { gasneti_assert_always(!data); data = gasneti_malloc(row_len * tree_ranks); iov = gasneti_calloc(3 + tree_ranks, sizeof(struct iovec)); trans_len = len; } else { gasneti_assert_always_int(len ,==, trans_len); } build_all2all_iov(iov, data, len, child[i].rank, child[i].tree_ranks); do_readv(s, iov, child[i].tree_ranks + 1); if (++count < children) return; count = 0; transpose(data + len*myrank, len, tree_ranks); if (! is_root) { iov[0].iov_base = (void*)&cmd0; iov[0].iov_len = sizeof(cmd0); iov[1].iov_base = (void*)&len; iov[1].iov_len = sizeof(len); build_all2all_iov(iov+2, data, len, myrank, tree_ranks); do_writev(parent, iov, 3 + tree_ranks); return; } } else { build_all2all_iov(iov, data, len, myrank, tree_ranks); do_readv(s, iov, 1 + tree_ranks); } { fd_set fds; int j, k; WRITE_EACH_CHILD(j,k,fds) { if (k < 0) return; iov[0].iov_base = (void*)&cmd1; iov[0].iov_len = sizeof(cmd1); build_all2all_iov(iov+1, data, len, child[k].rank, child[k].tree_ranks); do_writev(child[k].sock, iov, 2 + child[k].tree_ranks); } gasneti_free(data); gasneti_free(iov); data = NULL; iov = NULL; } } // TODO: this gets *much* easier if/when we truly have a single control proc per host static void cmd_SBCAST(char cmd, int i) { /* Comands: */ const char cmd0 = BOOTSTRAP_CMD_SBCAST0; const char cmd1 = BOOTSTRAP_CMD_SBCAST1; /* State: */ static uint8_t *data = NULL; static gex_Rank_t *roots = NULL; static struct iovec *iov = NULL; static int count = 0; static size_t len; /* Local: */ int s = child[i].sock; if (cmd == cmd0) { static size_t snbcast_len; gex_Rank_t *r; do_read(s, &len, sizeof(len)); if (!count) { gasneti_assert_always(!data); data = gasneti_malloc(tree_ranks * len); roots = gasneti_malloc(tree_ranks * sizeof(gex_Rank_t)); if (! is_root) { iov = gasneti_calloc(3 + children, sizeof(struct iovec)); } snbcast_len = len; } else { gasneti_assert_always_int(len ,==, snbcast_len); } { gex_Rank_t offset = (child[i].rank - myrank); gex_Rank_t *r = roots + offset; int j, root_count; do_read(s, r, child[i].tree_ranks * sizeof(gex_Rank_t)); for (j = root_count = 0; j < child[i].tree_ranks; ++j) { root_count += (r[j] == child[i].rank + j); } do_read(s, data + len * offset, root_count * len); if (! is_root) { int order = (i < ctrl_children) ? (i + (children - ctrl_children)) : (i - ctrl_children); iov[3 + order].iov_base = data + len * offset; iov[3 + order].iov_len = root_count * len; } } if (++count < children) return; count = 0; if (is_root) { uint8_t **index = gasneti_calloc(nranks, sizeof(uint8_t*)); uint8_t *p, *tmp = gasneti_malloc(nranks * len); gex_Rank_t r = 0; int j, k; for (j = 0; j < children; ++j) { r = child[j].rank; p = data + len * r; for (k = 0; k < child[j].tree_ranks; ++k, ++r) { if (r == roots[r]) { index[r] = p; p += len; } } } for (r = 0; r < nranks; ++r) { gasneti_assert_always(index[roots[r]]); GASNETI_MEMCPY(tmp + len * r, index[roots[r]], len); } gasneti_free(data); gasneti_free(roots); gasneti_free(index); data = tmp; } else { iov[0].iov_base = (void*)&cmd0; iov[0].iov_len = sizeof(cmd0); iov[1].iov_base = (void*)&len; iov[1].iov_len = sizeof(len); iov[2].iov_base = roots; iov[2].iov_len = tree_ranks * sizeof(gex_Rank_t); do_writev(parent, iov, 3 + children); gasneti_free(roots); gasneti_free(iov); return; } } else { do_read(s, data, len * tree_ranks); } { fd_set fds; int j, k; WRITE_EACH_CHILD(j,k,fds) { struct iovec iov[2]; iov[0].iov_base = (void*)&cmd1; iov[0].iov_len = sizeof(cmd1); iov[1].iov_base = data + len * (child[k].rank - myrank); iov[1].iov_len = len * child[k].tree_ranks; do_writev(child[k].sock, iov, 2); } gasneti_free(data); data = NULL; } } static void dispatch(char cmd, int k) { switch (cmd) { case BOOTSTRAP_CMD_FINI0: case BOOTSTRAP_CMD_FINI1: cmd_FINI(cmd, k); break; case BOOTSTRAP_CMD_BARR0: case BOOTSTRAP_CMD_BARR1: cmd_BARR(cmd, k); break; case BOOTSTRAP_CMD_BCAST0: case BOOTSTRAP_CMD_BCAST1: cmd_BCAST(cmd, k); break; case BOOTSTRAP_CMD_EXCHG0: case BOOTSTRAP_CMD_EXCHG1: cmd_EXCHG(cmd, k); break; case BOOTSTRAP_CMD_TRANS0: case BOOTSTRAP_CMD_TRANS1: cmd_TRANS(cmd, k); break; case BOOTSTRAP_CMD_SBCAST0: case BOOTSTRAP_CMD_SBCAST1: cmd_SBCAST(cmd, k); break; default: do_message("Spawner protocol error"); do_abort(-1); } } static void event_loop(void) GASNETI_NORETURN; static void event_loop(void) { int done = 0; do_siginterrupt(SIGCHLD, 1); reaper(SIGCHLD); while (!finalized && !in_abort) { char cmd; int k, rc; /* Use select to find a fd w/ available work or EOF */ { static int next = 0; /* fairness: start search after prev result */ int n = all_fds.max + 1; fd_set read_fds = all_fds.set; int j; rc = do_select(n, &read_fds, NULL); if (in_abort) break; for (j = 0, k = next; j <= children; ++j, ++k) { if (k == children) k = is_root ? 0 : -1; if (FD_ISSET(child[k].sock, &read_fds)) { break; } } next = k + 1; } gasneti_assert_always(k >= -1); gasneti_assert_always(k < children); /* Read 1 command byte */ do_read(child[k].sock, &cmd, sizeof(cmd)); if (in_abort) break; dispatch(cmd, k); } /* Wait for all children to terminate */ wait_for_all(); BOOTSTRAP_VERBOSE(("[%d] Exit with status %d\n", myname, (int)(unsigned char)exit_status)); _exit (exit_status); // See UPC++ Issue #419 } /* rank process wait for a specific command byte from parent */ static void wait_cmd(char the_cmd) { do { char cmd; do_read(parent, &cmd, sizeof(cmd)); if ((cmd == the_cmd) || in_abort) return; /* TODO: dispatch any valid rank-process commands (none yet) */ do_abort(127); } while (!in_abort); } /*----------------------------------------------------------------------------------------------*/ extern int (*gasneti_verboseenv_fn)(void); static void usage(const char *argv0) { die(1, "usage: %s [-GASNET-SPAWN-master] [OPTIONS] NPROC[:NODES] [--] [ARGS...]\n" " NPROC: required count of processes to launch\n" " NODES: optional count of nodes to use (defaults to NPROC)\n" " --: optional separator\n" " ARGS...: optional arguments passed to launched processes\n" " OPTIONS:\n" " -v enables verbose output from spawner\n" " -W[arg] prefix launch of remote ssh processes with [arg]\n" " example: \"-W'env LD_LIBRARY_PATH=/usr/local/lib64'\"\n" , argv0); } #if GASNET_MAXNODES <= INT_MAX typedef div_t nodediv_t; #define nodediv div #else typedef ldiv_t nodediv_t; #define nodediv ldiv #endif /* Allocate 'n' from the passed nodediv_t */ static gex_Rank_t nodediv_alloc(nodediv_t *x, gex_Rank_t n) { gex_Rank_t rem = MIN(x->rem, n); x->rem -= rem; return n * x->quot + rem; } /* Work common to do_master and do_control */ static void do_common(int argc, char **argv) { gex_Rank_t rank_children; /* Arrange to forward various signals */ signal_forward(1); /* Layout children: */ { char **sublist; gex_Rank_t rank; nodediv_t ppn, npc = {0,0}; int j; ppn = nodediv(tree_ranks, tree_nodes); if (is_root) { rank_children = 0; ctrl_children = MIN(tree_nodes, out_degree); npc = nodediv(tree_nodes, ctrl_children); } else { rank_children = nodediv_alloc(&ppn, 1); ctrl_children = MIN(tree_nodes - 1, out_degree); if (ctrl_children) { npc = nodediv(tree_nodes - 1, ctrl_children); } } children = ctrl_children + rank_children; child = gasneti_calloc(1 + children, sizeof(struct child)); gasneti_leak(child); /* parent socket stored as child[-1] */ child[0].sock = parent; ++child; /* rank processes take the lower ranks, but the higher slots in child[] */ rank = myrank; for (j = ctrl_children; j < children; ++j) { child[j].rank = rank; child[j].tree_ranks = 1; child[j].tree_nodes = 1; rank += 1; } gasneti_assert_always(rank == myrank + rank_children); /* ctrl processes take the upper ranks, but the lower slots in child[] */ sublist = nodelist; for (j = 0; j < ctrl_children; ++j) { const gex_Rank_t nodes = nodediv_alloc(&npc, 1); const gex_Rank_t procs = nodediv_alloc(&ppn, nodes); child[j].rank = rank; child[j].tree_ranks = procs; child[j].tree_nodes = nodes; child[j].nodelist = sublist; rank += procs; sublist += nodes; } gasneti_assert_always(rank == myrank + tree_ranks); } if (ctrl_children) spawn_ctrl(argc, argv); if (rank_children) spawn_rank(argc, argv); if (!is_control) return; /* A rank process return from spawn_rank */ event_loop(); /* NOT REACHED */ } /* The "main()" for the root master process */ static void do_master(const char *spawn_args, int *argc_p, char ***argv_p) GASNETI_NORETURN; static void do_master(const char *spawn_args, int *argc_p, char ***argv_p) { int argc = *argc_p; char **argv = *argv_p; long lnproc = 0; long lnnodes = 0; is_root = 1; is_control = 1; is_verbose = gasneti_getenv_yesno_withdefault(ENV_PREFIX "SPAWN_VERBOSE",0); // can be provided via env or cmdline fd_sets_init(); gasneti_reghandler(SIGURG, &sigurg_handler); do_siginterrupt(SIGURG, 1); if (NULL == spawn_args) { /* Explicit-master support */ int argi; gasneti_assert_always(argc && argv); gasneti_assert_always(0 == strcmp(argv[1], "-GASNET-SPAWN-master")); /* Optional args in any order */ for (argi = 2; argi < argc; ++argi) { if (0 == strcmp(argv[argi], "-v")) { is_verbose = 1; } else if (0 == strncmp(argv[argi], "-W", 2)) { wrapper = &argv[argi][2]; } else { break; } } /* Required "nproc" optionally followed by ":nnodes" */ if (argi >= argc) { usage(argv0); /* ran out of args */ } else { const char *p = argv[argi]; char *endptr; lnproc = strtol(p,&endptr,0); if ((endptr != p) && (':' == *endptr)) { const char *q = endptr + 1; lnnodes = strtol(q,&endptr,0); nnodes_set = (endptr != q); } if ((endptr == p) || *endptr) { die(1, "Unable to parse process and node count in '%s'", p); } } argi++; /* Optional "--" */ if ((argi < argc) && (strcmp(argv[argi], "--") == 0)) { argi++; } /* Splice out all the args we consumed above */ argv[argi-1] = argv[0]; argc -= argi-1; argv += argi-1; } else { /* Format of spawn_args: "fd:N:[M]:[W]" * : indicates the delimiter character * fd is an integer file descriptor to provide the command line * N is the positive integer process count * M is the positive node count, or empty * W is the "wrapper" and is everything (possibly empty) after the last delimiter */ const char *p = spawn_args; char *endptr; int argv_fd; gasneti_assert_always(p && *p); /* Required fd number (non-negative unless restarting) */ argv_fd = strtol(p,&endptr,0); if ((endptr == p) || (*endptr != args_delim) || (argv_fd < 0)) { die(1, "Failed to parse " ENV_PREFIX "SPAWN_ARGS"); } p = endptr + 1; /* Required process count */ lnproc = strtol(p,&endptr,0); if ((endptr == p) || (*endptr != args_delim)) { die(1, "Failed to parse " ENV_PREFIX "SPAWN_ARGS"); } p = endptr + 1; /* Optional node count */ lnnodes = strtol(p,&endptr,0); if ((endptr == p) && (*p == args_delim)) { /* Not present */ } else if ((endptr == p) || (*endptr != args_delim)) { die(1, "Failed to parse " ENV_PREFIX "SPAWN_ARGS"); } else { nnodes_set = 1; } p = endptr + 1; /* Wrapper is whatever remains */ wrapper = p; /* Load the command line (if necessary) from argv_fd */ if (!argv) { size_t len; char *q, *cmdline; int i; { struct stat s; if (fstat(argv_fd, &s) < 0) { die(1, "Unable to read the command line from temporary file %d(%s)", errno, strerror(errno)); } len = s.st_size; } gasneti_leak(cmdline = gasneti_malloc(len)); do_read(argv_fd, cmdline, len); for (q = cmdline, argc = 0; q < (cmdline+len); ++argc) { q += strlen(q) + 1; } argv = gasneti_malloc((argc+1) * sizeof(char*)); gasneti_leak((void*)argv); for (q = cmdline, i = 0; i < argc; ++i) { argv[i] = q; q += strlen(q) + 1; } argv[argc] = NULL; argv0 = argv[0]; } (void)close(argv_fd); } nranks = lnproc; if ((lnproc < 1) || ((long)nranks != lnproc)) { /* Non-positive or Overflow */ die(1, "Process count %ld is out-of-range of gex_Rank_t", lnproc); } if (nnodes_set) { nnodes = lnnodes; if ((lnnodes < 1) || ((long)nnodes != lnnodes)) { /* Non-positive or Overflow */ die(1, "Node count %ld is out-of-range of gex_Rank_t", lnnodes); } if (nnodes > nranks) { do_message("WARNING: requested node count reduced from %d to process count of %d", (int)nnodes, (int)nranks); nnodes = nranks; } BOOTSTRAP_VERBOSE(("Spawning '%s': %d processes on %d nodes\n", argv0, (int)nranks, (int)nnodes)); } else { nnodes = nranks; BOOTSTRAP_VERBOSE(("Spawning '%s': %d processes\n", argv0, (int)nranks)); } { const char *str = my_getenv(ENV_PREFIX "SSH_OUT_DEGREE"); if (str) out_degree = atoi(str); if (out_degree <= 0) out_degree = nnodes; /* unbounded */ } /* Enable VERBOSEENV */ gasneti_verboseenv_fn = NULL; configure_ssh(); build_nodelist(); /* May reduce nnodes */ tree_ranks = nranks; tree_nodes = nnodes; /* Work common to all ctrl processes: */ do_common(argc, argv); /* NOT REACHED */ gasneti_fatalerror("Unexpected return from do_common()"); } /* This is "main()" for control procs other than the root */ static void do_control(const char *spawn_args, int *argc_p, char ***argv_p) { is_root = 0; is_control = 1; fd_sets_init(); gasneti_reghandler(SIGURG, &sigurg_handler); do_siginterrupt(SIGURG, 1); #if HAVE_PR_SET_PDEATHSIG if (use_pdeathsig) { /* If parent exits before us (an abnormal condition) then trigger an abort */ (void)prctl(PR_SET_PDEATHSIG, SIGURG); } #endif /* Connect w/ parent */ do_connect(spawn_args, argc_p, argv_p); /* Work common to all ctrl processes: */ do_common(*argc_p, *argv_p); /* Only rank process should ever return from do_common() */ gasneti_assert_always(! is_control); } /*----------------------------------------------------------------------------------------------*/ /* gasneti_bootstrapInit * * Upon return: * + argc and argv are those the user specified * + *nodes_p and *mynode_p are set * + the global environment is available via gasneti_getenv() * * There is no barrier at the end, so it is possible that in a multi-level * tree, there are still some processes not yet spawned. This is OK, since * we assume that at least one gasneti_bootstrap*() collectives will follow. * Not waiting here allows any subsequent that first collective to overlap * with the spawning. */ extern gasneti_spawnerfn_t const * gasneti_bootstrapInit_ssh(int *argc_p, char ***argv_p, gex_Rank_t *nodes_p, gex_Rank_t *mynode_p) { const char *spawner, *spawn_args; int explicit_master = 0; null_init = !(argc_p && argv_p); if (!null_init && (*argc_p > 1) && !strcmp((*argv_p)[1], "-GASNET-SPAWN-master")) { /* Force legacy explict-master support: */ explicit_master = 1; spawn_args = "XX"; // unused, but avoids "may be used uninitialized" warnings } else { spawn_args = my_getenv(ENV_PREFIX "SPAWN_ARGS"); if (!spawn_args || (strlen(spawn_args) < 2)) { return NULL; } gasnett_unsetenv(ENV_PREFIX "SPAWN_ARGS"); } /* Use a "shadow" cmdline if necessary to have a place to receive them */ if (null_init) { static int dummy_argc = 0; static char **dummy_argv = NULL; argc_p = &dummy_argc; argv_p = &dummy_argv; } else { argv0 = (*argv_p)[0]; } /* set O_APPEND on stdout and stderr (see bug 2136) */ (void)fcntl_setfl(STDOUT_FILENO, O_APPEND); (void)fcntl_setfl(STDERR_FILENO, O_APPEND); #ifdef HAVE_PR_SET_PDEATHSIG { /* check safety of prctl(PR_SET_PDEATHSIG, ...) */ struct utsname name; if (0 == uname(&name)) { const char *dot = strchr(name.release,'.'); if (NULL != dot) { int major = atoi(name.release); int minor = atoi(dot + 1); use_pdeathsig = ((100 * major + minor) >= 206); /* 2.6.0 kernel or newer */ } } } #endif mypid = getpid(); if (explicit_master) { do_master(NULL, argc_p, argv_p); /* Does not return */ } else { /* Common processing: * Format of leading portion of spawn_args is 2 or 3 charachters: "C[v]d" * C = single command character used to dispatch switch() below * v = optional 'v' to enable verbose operation * d = delimiter - the single character in this position will separate the per-command args * The commands are passes the portion starting at the delimiter character * See do_[foo]() for the per-command arguments */ char spawn_cmd = spawn_args[0]; is_verbose = (spawn_args[1] == 'v'); args_delim = spawn_args[1 + is_verbose]; spawn_args += (2 + is_verbose); switch (spawn_cmd) { case 'M': /* The master (root control process) */ do_master(spawn_args, argc_p, argv_p); /* Does not return */ break; case 'C': /* Non-root control process */ do_control(spawn_args, argc_p, argv_p); break; default: return NULL; } } /* Reach here only in the rank processes */ gasneti_assert_always(! is_control); gasneti_getenv_hook = &do_getenv; gasneti_propagate_env_hook = &do_propagate_env; gasneti_check_env_prefix_hook = &do_check_env_prefix_hook; *nodes_p = nranks; *mynode_p = myrank; if (do_worker() == GASNET_OK) return &spawnerfn; else return NULL; } /* bootstrapFini */ static void bootstrapFini(void) { char cmd0 = BOOTSTRAP_CMD_FINI0; char cmd1 = BOOTSTRAP_CMD_FINI1; do_write(parent, &cmd0, sizeof(cmd0)); wait_cmd(cmd1); } /* bootstrapAbort * * Force immediate (abnormal) termination. */ static void bootstrapAbort(int exitcode) { BOOTSTRAP_VERBOSE(("[r%d] Abort(%d)\n", myrank, exitcode)); do_abort((unsigned char)exitcode); gasneti_fatalerror("do_abort failed."); /* NOT REACHED */ } static void bootstrapBarrier(void) { const char cmd0 = BOOTSTRAP_CMD_BARR0; const char cmd1 = BOOTSTRAP_CMD_BARR1; do_write(parent, &cmd0, sizeof(cmd0)); wait_cmd(cmd1); } static void bootstrapExchange(void *src, size_t len, void *dest) { char cmd0 = BOOTSTRAP_CMD_EXCHG0; char cmd1 = BOOTSTRAP_CMD_EXCHG1; const gex_Rank_t next = myrank + 1; struct iovec iov[3]; iov[0].iov_base = &cmd0; iov[0].iov_len = sizeof(cmd0); iov[1].iov_base = (void *)&len; iov[1].iov_len = sizeof(len); iov[2].iov_base = src; iov[2].iov_len = len; do_writev(parent, iov, 3); GASNETI_MEMCPY_SAFE_IDENTICAL((uint8_t*)dest + len*myrank, src, len); iov[0].iov_base = dest; iov[0].iov_len = len * myrank; iov[1].iov_base = (uint8_t*)dest + len * next; iov[1].iov_len = len * (nranks - next); wait_cmd(cmd1); do_readv(parent, iov, 2); } static void bootstrapAlltoall(void *src, size_t len, void *dest) { char cmd0 = BOOTSTRAP_CMD_TRANS0; char cmd1 = BOOTSTRAP_CMD_TRANS1; struct iovec iov[4]; iov[0].iov_base = &cmd0; iov[0].iov_len = sizeof(cmd0); iov[1].iov_base = (void *)&len; iov[1].iov_len = sizeof(len); build_all2all_iov(iov+2, src, len, myrank, 1); do_writev(parent, iov, 4); GASNETI_MEMCPY_SAFE_IDENTICAL((uint8_t*)dest + len*myrank, (uint8_t*)src + len*myrank, len); build_all2all_iov(iov, dest, len, myrank, 1); wait_cmd(cmd1); do_readv(parent, iov, 2); } static void bootstrapBroadcast(void *src, size_t len, void *dest, int rootnode) { const char cmd0 = BOOTSTRAP_CMD_BCAST0; const char cmd1 = BOOTSTRAP_CMD_BCAST1; struct iovec iov[3]; if (myrank == rootnode) { iov[0].iov_base = (void *)&cmd0; iov[0].iov_len = sizeof(cmd0); iov[1].iov_base = (void *)&len; iov[1].iov_len = sizeof(len); iov[2].iov_base = src; iov[2].iov_len = len; do_writev(parent, iov, 3); GASNETI_MEMCPY_SAFE_IDENTICAL(dest, src, len); } else { size_t bcast_len; wait_cmd(cmd1); iov[0].iov_base = (void *)&bcast_len; iov[0].iov_len = sizeof(bcast_len); iov[1].iov_base = dest; iov[1].iov_len = len; do_readv(parent, iov, 2); gasneti_assert_always_int(len ,==, bcast_len); } } // Since every caller receives the desired rootnode's contribution from // the control procs, the NbrhdBroadcast and HostBroadcast are identical. static void bootstrapSubsetBroadcast(void *src, size_t len, void *dest, int rootnode_arg) { char cmd0 = BOOTSTRAP_CMD_SBCAST0; char cmd1 = BOOTSTRAP_CMD_SBCAST1; const gex_Rank_t rootnode = rootnode_arg; struct iovec iov[4]; iov[0].iov_base = &cmd0; iov[0].iov_len = sizeof(cmd0); iov[1].iov_base = (void *)&len; iov[1].iov_len = sizeof(len); iov[2].iov_base = (void *)&rootnode; iov[2].iov_len = sizeof(rootnode); iov[3].iov_base = src; iov[3].iov_len = len; do_writev(parent, iov, (myrank == rootnode) ? 4 : 3); wait_cmd(cmd1); do_read(parent, dest, len); } static void bootstrapCleanup(void) { /* TODO: anything we can free at end of bootstrap collectives? */ } /*----------------------------------------------------------------------------------------------*/ static gasneti_spawnerfn_t const spawnerfn = { bootstrapBarrier, bootstrapExchange, bootstrapBroadcast, bootstrapSubsetBroadcast, // Nbrhd bootstrapSubsetBroadcast, // Host bootstrapAlltoall, bootstrapAbort, bootstrapCleanup, bootstrapFini, }; gasnet-2025.8.0/other/Makefile-conduit.mak.in0000664000175000017500000004330615142313673021030 0ustar alastairalastair# This Makefile fragment is used to build GASNet conduits # it is not meant to be used directly # @configure_input@ .PHONY: do-error do-make-fragment libs force clean-local \ do-clean-local do-install-data-local do-uninstall-local \ do-install-data-conduit do-uninstall-conduit \ test tests tests-seq tests-par tests-parsync tests-clean \ tests-check do-run-testexit # header files to be installed # Conduit-specific headers will overwrite any conflicts in extended-ref headers = $(top_srcdir)/extended-ref/*.h \ $(top_srcdir)/extended-ref/vis/gasnet_vis_fwd.h \ $(top_srcdir)/extended-ref/ratomic/gasnet_ratomic_fwd.h \ $(top_srcdir)/extended-ref/coll/gasnet_coll_fwd.h \ $(srcdir)/*.h \ $(CONDUIT_EXTRAHEADERS) # headers to exclude from $(headers) - please don't use wildcards private_headers = \ $(CONDUIT_PRIVATEHEADERS) @BUILD_SEQ_LIBS_TRUE@ makefile_fragments_seq = $(CONDUIT_NAME)-seq.mak @BUILD_PAR_LIBS_TRUE@ makefile_fragments_par = $(CONDUIT_NAME)-par.mak @BUILD_PARSYNC_LIBS_TRUE@ makefile_fragments_parsync = $(CONDUIT_NAME)-parsync.mak makefile_fragments = $(makefile_fragments_seq) $(makefile_fragments_par) $(makefile_fragments_parsync) @BUILD_SEQ_LIBS_TRUE@ pkgconfig_files_seq = gasnet-$(CONDUIT_NAME)-seq.pc @BUILD_PAR_LIBS_TRUE@ pkgconfig_files_par = gasnet-$(CONDUIT_NAME)-par.pc @BUILD_PARSYNC_LIBS_TRUE@ pkgconfig_files_parsync = gasnet-$(CONDUIT_NAME)-parsync.pc pkgconfig_files = $(pkgconfig_files_seq) $(pkgconfig_files_par) $(pkgconfig_files_parsync) @GASNET_SEGMENT_FAST_TRUE@GASNET_SEGMENT_STR="FAST" @GASNET_SEGMENT_LARGE_TRUE@GASNET_SEGMENT_STR="LARGE" @GASNET_SEGMENT_EVERYTHING_TRUE@GASNET_SEGMENT_STR="EVERYTHING" # All configured-in memory kinds objects, and conduit's supported subset @HAVE_MK_CLASS_CUDA_UVA_TRUE@kinds_cuda_uva_obj = $(builddir)/gasnet_cuda_uva-$(THREAD_MODEL).o @HAVE_MK_CLASS_HIP_TRUE@kinds_hip_obj = $(builddir)/gasnet_hip-$(THREAD_MODEL).o @HAVE_MK_CLASS_ZE_TRUE@kinds_ze_obj = $(builddir)/gasnet_ze-$(THREAD_MODEL).o KINDS_SPECIAL_OBJS = $(foreach kind, $(CONDUIT_KINDS), $(kinds_$(kind)_obj)) include $(top_builddir)/other/Makefile-libgasnet.mak EXTRA_DIST = $(CONDUIT_FILELIST) README @NEED_DOCDIR_TRUE@docdir = $(datadir)/doc/GASNet # convenience aliases seq par parsync: force @$(MAKE) gasnet-$(CONDUIT_NAME)-$@.pc libgasnet-$(CONDUIT_NAME)-$@.a @for dir in $(SUBDIRS) ; do \ if test "$$dir" != "." ; then \ ( cd $$dir && $(MAKE) all ) || exit 1 ; \ fi ; \ done # test targets tests: force @echo You must specify one of tests-seq, tests-par or tests-parsync @exit 1 test: tests TESTINSTANCE=$${PPID:-xxxx} TESTLOG=`pwd`/.test-results TESTLOG_INHERIT=0 do-begin-tests do-end-tests: @if test "$(TESTLOG_INHERIT)" = "0"; then \ ( cd "$(top_builddir)" && $(MAKE) TESTINSTANCE=$(TESTINSTANCE) TESTLOG=$(TESTLOG) $@ ) || exit $$? ; \ fi tests-seq: force libgasnet-$(CONDUIT_NAME)-seq.a $(CONDUIT_NAME)-seq.mak $(CONDUIT_SEQ_HOOK) @echo "*** Building all GASNet tests in SEQ/$(GASNET_SEGMENT_STR) mode ***" @$(MAKE) -f $(top_builddir)/tests/Makefile tests-seq \ configfile="$(CONDUIT_NAME)-seq.mak" \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) tests-parsync: force libgasnet-$(CONDUIT_NAME)-parsync.a $(CONDUIT_NAME)-parsync.mak $(CONDUIT_PARSYNC_HOOK) @echo "*** Building all GASNet tests in PARSYNC/$(GASNET_SEGMENT_STR) mode ***" @$(MAKE) -f $(top_builddir)/tests/Makefile tests-parsync \ configfile="$(CONDUIT_NAME)-parsync.mak" \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) tests-par: force libgasnet-$(CONDUIT_NAME)-par.a $(CONDUIT_NAME)-par.mak $(CONDUIT_PAR_HOOK) @echo "*** Building all GASNet tests in PAR/$(GASNET_SEGMENT_STR) mode ***" @$(MAKE) -f $(top_builddir)/tests/Makefile tests-par \ configfile="$(CONDUIT_NAME)-par.mak" \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) do-check-install: force @if test -r $(DESTDIR)$(includedir)/$(CONDUIT_NAME)-conduit/$(CONDUIT_NAME)-seq.mak && \ test -r $(DESTDIR)$(libdir)/libgasnet-$(CONDUIT_NAME)-seq.a ; then :; else \ echo "ERROR: tests-installed-* targets require first running a top-level 'make install', but there does not appear to be a valid install for $(CONDUIT_NAME)-conduit in prefix=$(prefix)" ; \ exit 1 ; \ fi tests-installed-seq: do-check-install @echo "*** Building all GASNet tests in SEQ/$(GASNET_SEGMENT_STR) mode against install in $(DESTDIR)$(libdir) ***" $(MAKE) -f $(top_builddir)/tests/Makefile tests-seq \ configfile="$(DESTDIR)$(includedir)/$(CONDUIT_NAME)-conduit/$(CONDUIT_NAME)-seq.mak" \ tools_fragment="$(DESTDIR)$(includedir)/gasnet_tools-seq.mak" \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) tests-installed-par: do-check-install @echo "*** Building all GASNet tests in PAR/$(GASNET_SEGMENT_STR) mode against install in $(DESTDIR)$(libdir) ***" $(MAKE) -f $(top_builddir)/tests/Makefile tests-par \ configfile="$(DESTDIR)$(includedir)/$(CONDUIT_NAME)-conduit/$(CONDUIT_NAME)-par.mak" \ tools_fragment="$(DESTDIR)$(includedir)/gasnet_tools-par.mak" \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) tests-installed-parsync: do-check-install @echo "*** Building all GASNet tests in parsync/$(GASNET_SEGMENT_STR) mode against install in $(DESTDIR)$(libdir) ***" $(MAKE) -f $(top_builddir)/tests/Makefile tests-parsync \ configfile="$(DESTDIR)$(includedir)/$(CONDUIT_NAME)-conduit/$(CONDUIT_NAME)-parsync.mak" \ tools_fragment="$(DESTDIR)$(includedir)/gasnet_tools-parsync.mak" \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) tests-mpi: force @echo "*** Building all MPI tests ***" @$(MAKE) -f $(top_builddir)/tests/Makefile tests-mpi \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) tests-mpi2: force @echo "*** Building all MPI2 tests ***" @$(MAKE) -f $(top_builddir)/tests/Makefile tests-mpi2 \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) testtools testtoolscxx: force @echo "*** Building $@ ***" @$(MAKE) -f $(top_builddir)/tests/Makefile $@ \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) testtool%-seq: force @$(MAKE) `basename $@ -seq` tools_fragment=@TOP_BUILDDIR@/gasnet_tools-seq.mak testtool%-par: force @$(PTHREADS_ERROR_CHECK) @$(MAKE) `basename $@ -par` tools_fragment=@TOP_BUILDDIR@/gasnet_tools-par.mak test%: $(top_srcdir)/tests/test%.c force @$(MAKE) libgasnet-$(CONDUIT_NAME)-$(THREAD_MODEL_LC).a $(CONDUIT_NAME)-$(THREAD_MODEL_LC).mak @echo "*** Building $@ in $(THREAD_MODEL)/$(GASNET_SEGMENT_STR) mode ***" @$(MAKE) -f $(top_builddir)/tests/Makefile $@ \ configfile="$(CONDUIT_NAME)-$(THREAD_MODEL_LC).mak" \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) test%: $(top_srcdir)/tests/test%.cc force @$(MAKE) libgasnet-$(CONDUIT_NAME)-$(THREAD_MODEL_LC).a $(CONDUIT_NAME)-$(THREAD_MODEL_LC).mak @echo "*** Building $@ in $(THREAD_MODEL)/$(GASNET_SEGMENT_STR) mode ***" @$(MAKE) -f $(top_builddir)/tests/Makefile $@ \ configfile="$(CONDUIT_NAME)-$(THREAD_MODEL_LC).mak" \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) test%: $(top_srcdir)/tests/mpi/test%.c force @echo "*** Building MPI test $@ ***" @$(MAKE) -f $(top_builddir)/tests/Makefile $@ \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) test%-seq: force @$(MAKE) `basename $@ -seq` THREAD_MODEL=SEQ test%-parsync: force @$(MAKE) `basename $@ -parsync` THREAD_MODEL=PARSYNC test%-par: force @$(MAKE) `basename $@ -par` THREAD_MODEL=PAR tests-clean: @$(MAKE) -f $(top_builddir)/tests/Makefile clean \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) check-run-tests-deps: force @if test "$(SUBDIRS)" != "" ; then \ for dir in "$(SUBDIRS)" ; do \ if test "$$dir" != "."; then \ ( cd "$$dir" && $(MAKE) ) || exit $$?; \ fi ; \ done ; \ fi run-tests do-run-testexit: check-run-tests-deps @$(MAKE) TESTINSTANCE=$(TESTINSTANCE) TESTLOG=$(TESTLOG) do-begin-tests @$(MAKE) -f $(top_builddir)/tests/Makefile $@ \ TESTINSTANCE=$(TESTINSTANCE) TESTLOG=$(TESTLOG) \ CONDUIT_NAME=$(CONDUIT_NAME) \ CONDUIT_RUNCMD="$(CONDUIT_RUNCMD)" \ CONDUIT_TESTS="$(CONDUIT_TESTS)" $(CONDUIT_TEST_MAKEARGS) ; \ $(MAKE) TESTINSTANCE=$(TESTINSTANCE) TESTLOG=$(TESTLOG) do-end-tests RUN_TESTS_TARGETS= \ run-tests-seq run-tests-par run-tests-parsync \ run-tests-installed-seq run-tests-installed-par run-tests-installed-parsync \ run-tests-mpi run-tests-mpi2 # these are separate make commands to ensure they can be composed # and still get multiple run-tests invocations $(RUN_TESTS_TARGETS): tests-clean @$(MAKE) `echo "$@" | sed 's/^run-//'` run-tests .PRECIOUS: run-testexit run-testexit: force @if test ! -x testexit ; then \ $(MAKE) testexit-par || exit $$? ; \ fi @$(MAKE) do-run-testexit @GNU_NM_TRUE@tests-check: @GNU_NM_TRUE@ @echo "checking for diagnostic export..." @GNU_NM_TRUE@ @symbols=`@NM@ testgasnet 2>&1 | grep gasneti_run_diagnostics`; \ @GNU_NM_TRUE@ if test "$$symbols" ; then \ @GNU_NM_TRUE@ echo "$$symbols" ; \ @GNU_NM_TRUE@ echo FAILED ; \ @GNU_NM_TRUE@ failed=1 ; \ @GNU_NM_TRUE@ else \ @GNU_NM_TRUE@ echo PASSED ; \ @GNU_NM_TRUE@ fi ; \ @GNU_NM_TRUE@ exit $$failed @GNU_NM_FALSE@tests-check: @GNU_NM_FALSE@ @echo "diagnostic export test SKIPPED" @BUILD_SEQ_LIBS_TRUE@ check_test_target = tests-seq @BUILD_PARSYNC_LIBS_TRUE@ check_test_target = tests-parsync @BUILD_PAR_LIBS_TRUE@ check_test_target = tests-par check: force @CHECK_TEST_TARGET_OVERRIDE=$(CHECK_TEST_TARGET_OVERRIDE) ; \ $(MAKE) check-pkgconfig CHECK_FILES="$(pkgconfig_files)" ; \ $(MAKE) check-exports $${CHECK_TEST_TARGET_OVERRIDE:-$(check_test_target)} tests-check force: do-clean-local: tests-clean @echo rm -f $(makefile_fragments) $(pkgconfig_files) $(libgasnet_objects) $(libraries) *.o core .test-results @rm -f $(makefile_fragments) $(pkgconfig_files) $(libgasnet_objects) $(libraries) *.o core .test-results @rm -Rf .SEQ .PAR .PARSYNC do-install-data-local: force $(headers) $(makefile_fragments) $(mkinstalldirs) $(DESTDIR)$(includedir)/$(CONDUIT_NAME)-conduit @list='$(headers)'; privlist='$(private_headers)'; \ for p in $$list; do \ if test -f $$p; then \ filename=`basename $$p`; \ for q in $$privlist; do \ if test "$$filename" = "$$q"; then filename=something_internal.h; break; fi; \ done; \ if test "$$filename" = "`basename $$p _internal.h`" ; then \ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/$(CONDUIT_NAME)-conduit/$$filename"; \ $(INSTALL_DATA) $$p $(DESTDIR)$(includedir)/$(CONDUIT_NAME)-conduit/$$filename || exit $$? ; \ else :; fi; \ else :; fi; \ done $(mkinstalldirs) $(DESTDIR)$(libdir)/pkgconfig @list='$(makefile_fragments)'; for p in $$list; do \ if test -f $$p; then \ filename=`basename $$p`; \ destmak="$(DESTDIR)$(includedir)/$(CONDUIT_NAME)-conduit/$$filename"; \ echo @GASNET_INSTALL_CMD@ " < $$p > $$destmak"; \ @GASNET_INSTALL_CMD@ < $$p > $$destmak || exit $$? ; \ thread_model=`echo "$$filename" | sed 's/^.*-\(.*\)\.mak$$/\1/'` ; \ destpc="$(DESTDIR)$(libdir)/pkgconfig/gasnet-$(CONDUIT_NAME)-$$thread_model.pc"; \ $(MAKE) do-pkgconfig-conduit thread_model=$$thread_model pkgconfig_file="$$destpc" FRAGMENT="$$destmak" || exit $$? ; \ chmod 644 "$$destpc" || exit $$? ; \ else :; fi; \ done $(mkinstalldirs) $(DESTDIR)$(docdir) $(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(docdir)/README-$(CONDUIT_NAME) if test -f $(srcdir)/license.txt ; then \ $(INSTALL_DATA) $(srcdir)/license.txt $(DESTDIR)$(docdir)/license-$(CONDUIT_NAME).txt || exit $$? ; \ fi if test "$(conduit_has_install_data_hook)" = yes; then \ $(MAKE) do-install-data-conduit || exit $$? ; \ fi do-uninstall-local: rm -f $(DESTDIR)$(includedir)/$(CONDUIT_NAME)-conduit/*.h $(DESTDIR)$(includedir)/$(CONDUIT_NAME)-conduit/*.mak rm -f $(DESTDIR)$(libdir)/pkgconfig/gasnet-$(CONDUIT_NAME)-*.pc rm -Rf $(DESTDIR)$(docdir) if test "$(conduit_has_uninstall_hook)" = yes; then \ $(MAKE) do-uninstall-conduit || exit $$? ; \ fi do-error: @echo "ERROR: $(CONDUIT_NAME)-conduit support was not detected at configure time" @echo " try re-running configure with --enable-$(CONDUIT_NAME)" @exit 1 $(top_builddir)/other/Makefile-conduit.mak: $(top_srcdir)/other/Makefile-conduit.mak.in cd $(top_builddir)/other && $(MAKE) Makefile-conduit.mak $(top_builddir)/other/fragment-body.mak: $(top_srcdir)/other/fragment-body.mak.in cd $(top_builddir)/other && $(MAKE) fragment-body.mak $(top_builddir)/other/fragment-head.mak: $(top_srcdir)/other/fragment-head.mak.in cd $(top_builddir)/other && $(MAKE) fragment-head.mak $(top_builddir)/tests/Makefile: $(top_srcdir)/tests/Makefile.in cd $(top_builddir)/tests && $(MAKE) Makefile Makefile: $(srcdir)/Makefile.in \ $(top_builddir)/other/Makefile-conduit.mak \ $(top_builddir)/other/Makefile-libgasnet.mak \ $(top_builddir)/tests/Makefile cd $(top_builddir) && CONFIG_FILES=$(CONDUIT_NAME)-conduit/$@ CONFIG_HEADERS= ./config.status make_fragment_deps = conduit.mak $(top_builddir)/other/fragment-head.mak $(top_builddir)/other/fragment-body.mak $(CONDUIT_NAME)-seq.mak: $(make_fragment_deps) $(MAKE) do-make-fragment thread_model=seq THREAD_MODEL=SEQ $(CONDUIT_NAME)-par.mak: $(make_fragment_deps) @$(PTHREADS_ERROR_CHECK) $(MAKE) do-make-fragment thread_model=par THREAD_MODEL=PAR $(CONDUIT_NAME)-parsync.mak: $(make_fragment_deps) @$(PTHREADS_ERROR_CHECK) $(MAKE) do-make-fragment thread_model=parsync THREAD_MODEL=PARSYNC do-make-fragment: force rm -f $(CONDUIT_NAME)-$(thread_model).mak @echo Building $(CONDUIT_NAME)-$(thread_model).mak... ; \ AUTOGENMSG='WARNING: This file is automatically generated - do NOT edit directly' ; \ cat $(top_builddir)/other/fragment-head.mak \ conduit.mak \ $(top_builddir)/other/fragment-body.mak | \ sed -e 's@#conduit_name#@$(CONDUIT_NAME)@g' \ -e 's@#THREAD_MODEL#@$(THREAD_MODEL)@g' \ -e 's@#thread_model#@$(thread_model)@g' \ -e '/#INSTRUCTIONS#/d' \ -e "s@#AUTOGEN#@$${AUTOGENMSG}@g" \ > $(CONDUIT_NAME)-$(thread_model).mak || exit 1 pkgconfig_conduit = $(top_srcdir)/other/pkgconfig-conduit.pc gasnet-$(CONDUIT_NAME)-seq.pc: $(CONDUIT_NAME)-seq.mak $(pkgconfig_conduit) @$(MAKE) do-pkgconfig-conduit thread_model=seq pkgconfig_file="$@" FRAGMENT="$<" gasnet-$(CONDUIT_NAME)-par.pc: $(CONDUIT_NAME)-par.mak $(pkgconfig_conduit) @$(PTHREADS_ERROR_CHECK) @$(MAKE) do-pkgconfig-conduit thread_model=par pkgconfig_file="$@" FRAGMENT="$<" gasnet-$(CONDUIT_NAME)-parsync.pc: $(CONDUIT_NAME)-parsync.mak $(pkgconfig_conduit) @$(PTHREADS_ERROR_CHECK) @$(MAKE) do-pkgconfig-conduit thread_model=parsync pkgconfig_file="$@" FRAGMENT="$<" do-pkgconfig-conduit: force rm -f $(pkgconfig_file) @echo Building $(pkgconfig_file) from $$FRAGMENT... @echo '# WARNING: This file is automatically generated - do NOT edit directly' > $(pkgconfig_file) @echo '# Copyright 2025, The Regents of the University of California' >> $(pkgconfig_file) @echo '# Terms of use are as specified in license.txt' >> $(pkgconfig_file) @echo '# See the GASNet README for instructions on using these variables' >> $(pkgconfig_file) @VARS="GASNET_CC GASNET_OPT_CFLAGS GASNET_MISC_CFLAGS \ GASNET_MISC_CPPFLAGS GASNET_DEFINES GASNET_INCLUDES \ GASNET_CXX GASNET_OPT_CXXFLAGS GASNET_MISC_CXXFLAGS GASNET_MISC_CXXCPPFLAGS \ GASNET_LD GASNET_LDFLAGS GASNET_LIBS \ GASNET_LD_REQUIRES_CXX GASNET_LD_REQUIRES_MPI \ GASNET_SPAWNER_DEFAULT GASNET_SPAWNER_PMI GASNET_SPAWNER_MPI GASNET_SPAWNER_SSH \ GASNET_PREFIX" ; \ $(MAKE) --no-print-directory -f $(top_srcdir)/other/Makefile-echovar.mak VARS="$$VARS" echovars-preserve-unset \ >> $(pkgconfig_file) @unset GASNET_DESC; \ if test -d $(top_srcdir)/.git ; then \ GASNET_DESC=`( cd $(top_srcdir) && $${GIT=git} describe --long --dirty --always ) 2>/dev/null | head -n 1`; \ fi; \ if test -z "$$GASNET_DESC" && test -f $(top_srcdir)/version.git ; then \ GASNET_DESC=`cat $(top_srcdir)/version.git` || exit $$? ; \ fi; \ if expr "x$$GASNET_DESC" : 'xgex-$(VERSION)-0-' >/dev/null 2>&1; then unset GASNET_DESC; fi; \ cat $(pkgconfig_conduit) | \ sed -e 's@#conduit_name#@$(CONDUIT_NAME)@g' \ -e 's@#thread_model#@$(thread_model)@g' \ -e "s@#version#@$(VERSION)$${GASNET_DESC:+ ($$GASNET_DESC)}@g" \ >> $(pkgconfig_file) # # Memory Kinds support "special objects" # # Memory kinds for CUDA UVA devices $(builddir)/gasnet_cuda_uva-$(THREAD_MODEL).o: force $(CC) $(LIBCFLAGS) @CUDA_UVA_CFLAGS@ -o $@ -c $(top_srcdir)/other/kinds/gasnet_cuda_uva.c # Memory kinds for HIP devices $(builddir)/gasnet_hip-$(THREAD_MODEL).o: force $(CC) $(LIBCFLAGS) @HIP_CFLAGS@ -o $@ -c $(top_srcdir)/other/kinds/gasnet_hip.c # Memory kinds for oneAPI Level Zero devices $(builddir)/gasnet_ze-$(THREAD_MODEL).o: force $(CC) $(LIBCFLAGS) @ZE_CFLAGS@ -o $@ -c $(top_srcdir)/other/kinds/gasnet_ze.c gasnet-2025.8.0/other/spawner/0000775000175000017500000000000015142313673016222 5ustar alastairalastairgasnet-2025.8.0/other/spawner/gasnetrun_mpi.pl0000664000175000017500000010166015142313673021436 0ustar alastairalastair#!/usr/bin/env perl # $Source: bitbucket.org:berkeleylab/gasnet.git/mpi-conduit/contrib/gasnetrun_mpi.pl $ # Description: GASNet MPI spawner # Terms of use are as specified in license.txt require 5.004; use strict; # NOTE: The shell wrapper must set values for GASNET_SPAWN_CONDUIT and either # MPIRUN_CMD or PMIRUN_CMD (as appropriate). my $conduit = $ENV{'GASNET_SPAWN_CONDUIT'}; my $spawner_var = 'GASNET_'.$conduit.'_SPAWNER'; my $cmd_var = uc($ENV{$spawner_var}) . 'RUN_CMD'; my $pshm_enabled = $ENV{'GASNET_PSHM_ENABLED'} eq 'yes'; my $orig_spawncmd = $ENV{$cmd_var} || 'mpirun -np %N %P %A'; $orig_spawncmd = stripouterquotes($orig_spawncmd); (my $spawncmd = $orig_spawncmd) =~ s/%C/%P %A/; # deal with common alias # Validate the spawncmd my $cmd_ok_var = $cmd_var . '_OK'; my $cmd_ok = exists($ENV{$cmd_ok_var}); if ($spawncmd =~ m/$cmd_ok_var/) { $spawncmd =~ s/\s*$cmd_ok_var//g; $cmd_ok = 1; } unless ($cmd_ok || (($spawncmd =~ m/%P/) && ($spawncmd =~ m/%[AQ]/) && ($spawncmd =~ m/%N/))) { die("gasnetrun: ERROR: $cmd_var='$orig_spawncmd'\n" . "The environment variable $cmd_var must contain the strings '%P' and '%A'\n" . "for expansion into the program and its arguments; and '%N' for expansion\n" . "into the number of processes ('%C' is acceptible as an alias for '%P %A'\n" . "and '%Q' may be substituted for '%A' to request extra quoting.)\n" . "To disable this check, set $cmd_ok_var in your environment, \n" . "or append the string $cmd_ok_var to the command.\n"); } # Globals my $envlist = ''; my $numproc = undef; my $numnode = undef; my $numcpu = undef; # For spawners that pin to a group of cpus. 0 means disable any such pinning. my @numprocargs = (); my $verbose = 0; my @verbose_opt = ("-v"); my $keep = 0; my $dryrun = 0; my $exename = undef; my $uname = `uname -a`; my $find_exe = 1; # should we find full path of executable? my $env_before_exe = 1; # place env cmd before exe? my $extra_quote_argv = 0; # add extra quotes around each argument my $encode_args = 0; # encode command-line options to workaround buggy spawners my $encode_env = 0; # encode environment variables to workaround buggy spawners my $group_join_argv = 0; # join all the args into one for %A? my $force_nonempty_argv = 0; # if args are empty, still pass empty arg for %A my $dashN_ok = 0; # does spawner support -N? my $ppn_opt = undef; # spawner implements a procs-per-node option my $nodes_opt = undef; # spawner implements a number-of-nodes option my $tmpdir = undef; my $nodefile = $ENV{'GASNET_NODEFILE'} || $ENV{'PBS_NODEFILE'} || ($ENV{'PE_HOSTFILE'} && $ENV{'TMPDIR'} && -f "$ENV{'TMPDIR'}/machines" && "$ENV{'TMPDIR'}/machines") || ($ENV{'PE_HOSTFILE'} && $ENV{'TMP'} && -f "$ENV{'TMP'}/machines" && "$ENV{'TMP'}/machines"); my @tmpfiles = (defined($nodefile) && $ENV{'GASNET_RM_NODEFILE'}) ? ("$nodefile") : (); ################################################################################ ## Encode args and env for safe consumption by GASNet ################################################################################ sub gasnet_encode($) { my ($in) = @_; my $permitted_chars = 'A-Za-z0-9%_,\\./:+=@^-'; # don't encode unless we see special chars, to avoid negative interactions with higher-level encoding like upcrun return $in unless ($in =~ m/[^$permitted_chars]/); $in =~ s/%(0[0-9A-Fa-f][0-9A-Fa-f])/%025$1/g; # prevent false decodes $in =~ s/([^$permitted_chars])/sprintf("%%0%02x",(ord($1)))/ge; return $in; } # Define how to pass the environment vars # 5 parameters to set: val, pre, inter, post and join # To pass env as "-X A -Y B -Y C -Z" (a made up example) #%envfmt = ('pre' => '-X', 'inter' => '-Y', 'post' => '-Z'); my %envfmt = (); # Probe for which MPI is running # mpi-conduit/contrib/mpirun_h contains a database of recognized mpirun -h output strings # if you add a line below, please also add an entry to that directory my $mpirun_cmd = $spawncmd; $mpirun_cmd =~ s/\s-.*/ -h/; # poe hangs on -help, so use -h $mpirun_cmd =~ s/\s%[A-Za-z]+//g; # required for Cray MPI #print "probing: $mpirun_cmd\n"; my $mpirun_help = `$mpirun_cmd 2>&1`; #print "probe result: $mpirun_help\n"; my $platform = $ENV{'GASNET_PLATFORM'}; #print "using platform hint: $platform\n"; my $is_lam = ($mpirun_help =~ m|LAM/MPI|); my $is_ompi = ($mpirun_help =~ m|Open( ?RTE\| MPI)|); my $is_mpich2 = ($mpirun_help =~ m|MPICH1 compatibility|); my $is_mpiexec = ($mpirun_help =~ m|mpiexec|); my $is_mpiexec_nt = ($mpirun_help =~ m|mpiexec| && $uname =~ m|cygwin|i ); my $is_mpich_nt = ($mpirun_help =~ m|Unknown option| && $uname =~ m|cygwin|i ); my $is_mpich = ($mpirun_help =~ m|ch_p4|); my $is_mvich = ($mpirun_help =~ m|MV(AP)?ICH|i); my $is_cray_mpi = ($mpirun_help =~ m|Psched|); my $is_crayt3e_mpi = ($uname =~ m|cray t3e|i ); my $is_sgi_mpi = ($mpirun_help =~ m|\[-miser\]|); my $is_poe = ($mpirun_help =~ m|Parallel Operating Environment|); my $is_aprun = ($mpirun_help =~ m|Usage: aprun \|aprunwrapper\|aprun_version\|rchitecture type.*?xt|i); my $is_yod = ($mpirun_help =~ m| yod |); my $is_hp_mpi = ($mpirun_help =~ m|-universe_size|); my $is_elan_mpi = ($mpirun_help =~ m|MPIRUN_ELANIDMAP_FILE|); my $is_jacquard = ($mpirun_help =~ m| \[-noenv\] |) && !$is_elan_mpi; my $is_infinipath = ($mpirun_help =~ m|InfiniPath |); my $is_srun = ($mpirun_help =~ m|srun: invalid option| || $mpirun_help =~ m|Usage: srun |); my $is_prun = ($mpirun_help =~ m|railmask|); my $is_pam = ($mpirun_help =~ m|TaskStarter|); my $is_jsrun = ($mpirun_help =~ m|jsrun --usage|); my $envprog = $ENV{'GASNET_ENVCMD'}; if (! -x $envprog) { # SuperUX has broken "which" implementation, so avoid if possible $envprog = `which env`; chomp $envprog; } my $spawner_desc = undef; if ($is_lam) { $spawner_desc = "LAM/MPI"; # pass env as "-x A,B,C" %envfmt = ( 'pre' => '-x', 'join' => ',' ); } elsif ($is_ompi) { $spawner_desc = "OpenMPI"; # pass env as "-x A -x B -x C" %envfmt = ( 'pre' => '-x', 'inter' => '-x' ); } elsif ($is_mpich2) { $spawner_desc = "MPICH2/mpiexec"; # pass env as "-envlist A,B,C" %envfmt = ( 'pre' => '-envlist', 'join' => ',' ); } elsif ($is_mpiexec_nt) { $spawner_desc = "mpiexec/NT"; # handles env for us %envfmt = ( 'noenv' => 1 ); } elsif ($is_mpiexec) { $spawner_desc = "mpiexec"; # handles env for us %envfmt = ( 'noenv' => 1 ); $ppn_opt = '-ppn' if ($mpirun_help =~ m/\bppn\b/); # mpiexec seems to brokenly insist on splitting argv on spaces, regardless of quoting # not much we can do about it... } elsif ($is_mpich_nt) { $spawner_desc = "MPICH/NT"; # pass env as "-env A=1|B=2|C=3" %envfmt = ( 'pre' => '-env', 'join' => '|', 'val' => '' ); $find_exe = 0; $extra_quote_argv = 1; } elsif ($is_mvich) { $spawner_desc = "MVICH/MVAPICH"; # pass env as "/usr/bin/env 'A=1' 'B=2' 'C=3'" %envfmt = ( 'pre' => $envprog, 'val' => "'" ); $extra_quote_argv = 1; } elsif ($is_mpich) { $spawner_desc = "MPICH"; # pass env as "/usr/bin/env 'A=1' 'B=2' 'C=3'" %envfmt = ( 'pre' => $envprog, 'val' => "'" ); } elsif ($is_hp_mpi) { $spawner_desc = "HP MPI"; # HP mpirun is a wrapper around many different backend-specific spawners, all with different behavior # Use a safe default %envfmt = ( 'pre' => $envprog, 'val' => '' ); } elsif ($is_elan_mpi) { $spawner_desc = "Quadrics/ELAN MPI"; # this spawner already propagates the environment for us automatically %envfmt = ( 'noenv' => 1 ); # unfortunately, it also botches spaces in arguments in an unrecoverable way } elsif ($is_cray_mpi) { $spawner_desc = "Cray MPI"; # cannot reliably use /usr/bin/env at all when running via aprun # (the binary doesnt support placed execution) # however, the OS already propagates the environment for us automatically %envfmt = ( 'noenv' => 1 ); } elsif ($is_crayt3e_mpi) { $spawner_desc = "Cray T3E MPI"; # OS already propagates the environment for us automatically %envfmt = ( 'noenv' => 1); } elsif ($is_sgi_mpi) { $spawner_desc = "SGI MPI"; # OS already propagates the environment for us automatically %envfmt = ( 'noenv' => 1 ); # Older spawner botches the argv quoting - BUT NOT RECENTLY # Use MPIRUN_CMD='mpirun -np %N %P %Q' if still a problem } elsif ($is_poe) { $spawner_desc = "IBM POE"; # POE already propagates the environment for us automatically %envfmt = ( 'noenv' => 1); # Used to need extra quoting but either recent versions of the # transition of our testing from AIX to Linux has eliminated it. # $extra_quote_argv = 1; # If still a problem: uncomment above or change '%A' to '%Q' in your MPIRUN_CMD } elsif ($is_aprun) { $spawner_desc = "Cray aprun"; # the OS already propagates the environment for us automatically %envfmt = ( 'noenv' => 1 ); } elsif ($is_yod) { $spawner_desc = "Catamount yod"; # the OS already propagates the environment for us automatically %envfmt = ( 'noenv' => 1 ); # what a mess: pbsyod needs extra quoting, bare yod does not. # recommend pbsyod users use "%Q" in MPIRUN_CMD @verbose_opt = ("-setenv", "PMI_DEBUG=1"); } elsif ($is_jacquard) { $spawner_desc = "NERSC/Jacquard mpirun"; if (`hostname` =~ m/jaccn/) { # compute node: pass env as "/usr/bin/env 'A=1' 'B=2' 'C=3'" %envfmt = ( 'pre' => $envprog, 'val' => "'" ); $extra_quote_argv = 1; } else { # front-end node: pass env as [/usr/bin/env '"A=1"' '"B=2"' '"C=3"'] to allow for extra shell %envfmt = ( 'pre' => $envprog, 'lquote' => "'\"", 'rquote' => "\"'" ); $extra_quote_argv = 2; } } elsif ($is_infinipath) { $spawner_desc = "InfiniPath"; %envfmt = ( 'pre' => $envprog, 'val' => ''); $encode_args = 1; $encode_env = 1; @verbose_opt = ("-V"); $ppn_opt = '-ppn'; } elsif ($is_srun) { $spawner_desc = "SLURM srun"; # this spawner already propagates the environment for us automatically %envfmt = ( 'noenv' => 1 ); @verbose_opt = ("-v"); $nodes_opt = '-N'; } elsif ($is_prun) { $spawner_desc = "Quadrics/RMS prun"; # this spawner already propagates the environment for us automatically %envfmt = ( 'noenv' => 1 ); @verbose_opt = ("-v"); $nodes_opt = '-N'; } elsif ($is_pam) { $spawner_desc = "LSF pam"; %envfmt = ( 'pre' => $envprog, 'val' => ''); $encode_args = 1; $encode_env = 1; @verbose_opt = ("-v"); } elsif ($is_jsrun) { $spawner_desc = "jsrun - IBM Job Step Manager"; %envfmt = ( 'pre' => '-E', 'inter' => '-E'); $encode_env = 1; # botches spaces in environment values $encode_args = 1; # and in arguments } else { $spawner_desc = "unknown program (using generic MPI spawner)"; # assume the OS will not propagate the environment # pass env as "/usr/bin/env A=1 B=2 C=3" # Our nearly universal default %envfmt = ( 'pre' => $envprog, 'val' => '' ); # use encoding as a safe default $encode_args = 1; $encode_env = 1; } sub usage { print (@_) if (@_); print "usage: gasnetrun -n [options] [--] prog [program args]\n"; print " options:\n"; print " -n number of processes to run\n"; print " -N number of nodes to run on (not supported on all mpiruns)\n"; print " -c number of cpus per process (not supported on all mpiruns)\n"; print " -E list of environment vars to propagate\n"; print " -v enable verbose output, repeated use increases verbosity\n"; print " -t test only, don't execute anything (implies -v)\n"; print " -k keep any temporary files created (implies -v)\n"; print " -(no)encode[-args,-env] use encoding of args, env or both to help with buggy spawners\n"; print " -- ends option parsing\n"; exit 1; } sub stripouterquotes { my ($val) = @_; while ( $val =~ s/['"](.*?)['"]/$1/ ) { } return $val; } # "Multiply" array(s) for mapping procs to nodes sub expand { my $ppn = int($numproc / $numnode); my $full = $numproc - $numnode * $ppn; # nodes carrying ($ppn + 1) procs my $part = $numnode - $full; # nodes carrying $ppn procs while (my $arr_ref = shift @_) { my @tmp = (); for (my $i = 0; $i < $full; ++$i) { my $elem = shift @$arr_ref; for (my $j = 0; $j <= $ppn; ++$j) { push @tmp, $elem; } } for (my $i = 0; $i < $part; ++$i) { my $elem = shift @$arr_ref; for (my $j = 0; $j < $ppn; ++$j) { push @tmp, $elem; } } @$arr_ref = @tmp; } } # We need to parse our command-line arguments while (@ARGV > 0) { $_ = $ARGV[0]; if ($_ eq '--') { shift; last; } elsif ($_ eq '-n' || $_ eq '-np') { shift; usage ("$_ option given without an argument\n") unless @ARGV >= 1; $numproc = 0+$ARGV[0]; usage ("$_ option with invalid argument '$ARGV[0]'\n") unless $numproc >= 1; } elsif ($_ =~ /^(-np?)([0-9]+)$/) { $numproc = 0+$2; usage ("$1 option with invalid argument '$2'\n") unless $numproc >= 1; } elsif ($_ eq '-N') { shift; usage ("$_ option given without an argument\n") unless @ARGV >= 1; $numnode = 0+$ARGV[0]; usage ("$_ option with invalid argument '$ARGV[0]'\n") unless $numnode >= 1; } elsif ($_ =~ /^(-N)([0-9]+)$/) { $numnode = 0+$2; usage ("$1 option with invalid argument '$2'\n") unless $numnode >= 1; } elsif ($_ eq '-E') { shift; usage ("-E option given without an argument\n") unless @ARGV >= 1; $envlist = $ARGV[0]; } elsif ($_ eq '-c') { shift; usage ("$_ option given without an argument\n") unless @ARGV >= 1; $numcpu = $ARGV[0]; usage ("$_ option given with invalid argument '$ARGV[0]'\n") unless $numcpu >= 0; } elsif ($_ =~ /^(-c)([0-9]+)$/) { $numcpu = $2; } elsif ($_ eq '-v') { $verbose++; } elsif ($_ eq '-t') { $dryrun = 1; $verbose = 1 if (!$verbose); } elsif ($_ eq '-k') { $keep = 1; $verbose = 1 if (!$verbose); } elsif ($_ =~ /^-+(no)?encode-args$/) { $encode_args = !(defined $1); } elsif ($_ =~ /^-+(no)?encode-env$/) { $encode_env = !(defined $1); } elsif ($_ =~ /^-+(no)?encode$/) { $encode_args = !(defined $1); $encode_env = !(defined $1); } elsif (m/^-/) { usage ("unrecognized option '$_'\n"); } else { last; } shift; } print "gasnetrun: identified spawner as: $spawner_desc\n" if ($verbose); # Validate/default -n as needed if (($conduit eq 'SMP') && ! $pshm_enabled) { if (!defined $numproc) { $numproc = 1; } elsif ($numproc != 1) { die "gasnetrun: smp-conduit without PSHM only supports '-n 1'\n"; } } elsif (!defined $numproc && $spawncmd =~ /%N/) { usage "Required option -n was not given\n" } # Validate/default -N as needed if ($conduit eq 'SMP') { if (!defined $numnode) { $numnode = 1; } elsif ($numnode != 1) { die "gasnetrun: smp-conduit only supports '-N 1'\n"; } } # User's MPIRUN_CMD might request over-quoting explicitly $extra_quote_argv++ if ($spawncmd =~ s/%Q/%A/); # Find the program my $exebase = shift or usage "No program specified\n"; if ($find_exe) { if ($exebase =~ m|^/|) { # full path, don't do anything to it $exename = $exebase; } elsif ($exebase =~ m|/| || -x $exebase) { # has directory components or exists in cwd my $cwd = `pwd`; chomp $cwd; $exename = "$cwd/$exebase"; } else { # search PATH foreach (split(':', $ENV{PATH})) { my $tmp = "$_/$exebase"; if (-x $tmp) { $exename = $tmp; last; } } } if ($uname =~ m|cygwin|i) { # convert cygwin paths to windows paths for non-cygwin spawners $exename = `cygpath -a -m $exename`; chomp($exename); } die("gasnetrun: unable to locate program '$exebase'\n") unless defined($exename); print("gasnetrun: located executable '$exename'\n") if ($verbose); die("gasnetrun: missing execute permissions for '$exename'\n") unless -x $exename; } else { $exename = $exebase; } # We need to gather a list of important environment variables # Form a list of the vars given by -E, plus any GASNET_* vars if ($verbose >= 1) { $ENV{"GASNET_VERBOSEENV"} = "1" unless (exists($ENV{"GASNET_VERBOSEENV"})); } if ($verbose >= 2) { $ENV{"GASNET_SPAWN_VERBOSE"} = "1" unless (exists($ENV{"GASNET_SPAWN_VERBOSE"})); } my @envvars = ((grep {+exists($ENV{$_})} split(',', $envlist)), (grep {+m/^GASNET_/} keys(%ENV))); # Build up the environment-passing arguments in several steps my @envargs = @envvars; if ($encode_env) { for my $var (@envvars) { my $val = $ENV{$var}; $ENV{$var} = gasnet_encode($val); print "encoding ENV{$var}: '$val' => " . $ENV{$var} . "\n" if ($verbose && $val ne $ENV{$var}); } } if (@envvars) { # pair the variables with their values if desired if (defined $envfmt{val}) { my $q = $envfmt{val}; @envargs = map { "$_=$q$ENV{$_}$q" } @envargs; } elsif (defined $envfmt{lquote} || defined $envfmt{rquote}) { my $lq = $envfmt{lquote}; my $rq = $envfmt{rquote}; @envargs = map { "$_=$lq$ENV{$_}$rq" } @envargs; } # join them into a single argument if desired if (defined $envfmt{join}) { @envargs = join($envfmt{join}, @envargs); } # introduce 'inter' arg between variable (no effect if already joined) if (defined $envfmt{inter}) { @envargs = map { ($_, $envfmt{inter}) } @envargs; pop @envargs; } # tack on 'pre' and 'post' args if (defined $envfmt{pre}) { unshift @envargs, $envfmt{pre}; } if (defined $envfmt{post}) { push @envargs, $envfmt{post}; } if (defined $envfmt{noenv}) { @envargs = (); } } print "envargs: " . (join " ", @envargs) . "\n" if ($verbose); # Special case for the mpich spawner if ($is_mpich && !$is_mpich_nt && !$is_mvich) { # General approach: create a wrapper script for the rsh/ssh command invoked by MPICH # that glues on the correct environment variables in a way that won't disturb MPICH $tmpdir = "gasnetrun_mpi-temp-$$"; mkdir ($tmpdir, 0777) or die "gasnetrun: cannot create \'$tmpdir\'"; my @spawners = ('ssh', 'rsh'); # default is to create ssh and rsh capture scripts # always create them because MPICH-GM device overrides RSHCOMMAND my $realprog = undef; my $realprog_args = undef; # If we have a direct path to the MPICH spawn script, rewrite it and replace RSHCOMMAND # for the most robust spawner capture (because RSHCOMMAND is sometimes an absolute path) if ($spawncmd =~ /^\s*(\S+)/ && -x "$1" && `grep 'RSHCOMMAND=' "$1" 2> /dev/null` ne "") { my $mpirun_script = stripouterquotes($1); my $tmprun = "$tmpdir/mpirun-tmp"; my $tmprsh = 'mpirun-rsh'; open (MPIRUN, $mpirun_script) or die "gasnetrun: can't open '$mpirun_script' for reading\n"; open (TMPRUN, ">$tmprun") or die "gasnetrun: can't open '$tmprun' for writing\n"; print "gasnetrun: cloning '$mpirun_script' to '$tmprun'\n" if ($verbose); while () { my $line = $_; if ($line =~ /^\s*RSHCOMMAND=(.+)$/) { $realprog = $1; $line =~ s/$realprog/"$tmprsh"/; $realprog = stripouterquotes($realprog); $realprog =~ s/^(\S+)\s*(.*)$/$1/; $realprog_args = $2; $realprog = stripouterquotes($realprog); } print TMPRUN "$line"; } close (MPIRUN); close (TMPRUN); chmod 0700, $tmprun or die "gasnetrun: cannot \'chmod 0700, $tmprun\'"; unshift @tmpfiles, "$tmprun"; if (!($realprog =~ /^\//)) { # RSHCOMMAND is a relative path - get absolute chomp($realprog = `which "$realprog" 2> /dev/null` || $realprog); } if (! -x "$realprog") { print "gasnetrun: warning: cannot find MPICH underlying spawner '$realprog'\n" if ($verbose); $realprog = `which "ssh" 2> /dev/null`; $realprog_args = undef; } unshift @spawners, $tmprsh; $spawncmd =~ s#$mpirun_script#$tmprun#; } my $args = join(' ',map { "\"\'$_\'\"" } @envargs); (my $degooped_exename = $exename) =~ s/#/\\#/g; (my $degooped_args = join(' ',map { "\'$_\'" } @envargs)) =~ s/#/\\#/g; foreach my $spawner (@spawners) { unless (defined $realprog) { chomp($realprog = `which "$spawner" 2> /dev/null`); } if (! -x "$realprog") { # Can't find that spawner - Assume we're not using it print "gasnetrun: warning: cannot find \'$spawner\'\n" if ($verbose); next; } my $tmpfile = "$tmpdir/$spawner"; unshift @tmpfiles, "$tmpfile"; print "gasnetrun: building '$tmpfile' to wrap '$realprog'\n" if ($verbose); open (TMPSPAWN, ">$tmpfile") or die "gasnetrun: cannot open $tmpfile"; print TMPSPAWN <= $numnode); my $ppn = int($numproc / $numnode); # quotient = minimum procs per node my $rem = $numproc - $numnode * $ppn; # remainder = nodes carrying ($ppn + 1) procs foreach (@hosts) { my $extra = $rem?1:0; push @tmp, ($_, ($ppn + $extra)); $rem -= $extra; } } else { foreach (@hosts) { my $n = $tmp{$_}; if ($n > $numproc - $np) { $n = $numproc - $np; } push @tmp, ($_, $n); $np += $n; last if ($np == $numproc); } die ("Not enough hosts/cpus in LSB_MCPU_HOSTS to satisfy '-n $numproc'\n") unless ($np == $numproc); } $ENV{'LSB_MCPU_HOSTS'} = join(' ', @tmp); print("gasnetrun: rewrote LSB_MCPU_HOSTS='$ENV{'LSB_MCPU_HOSTS'}'\n") if ($verbose); $dashN_ok = 1; } if ($is_jsrun) { # With jsrun we (attempt to) default to job size if -N was not given. # The "attempt" is a heuristic to exclude any launch node(s) which will # appear first in LSB_MCPU_HOSTS, based on the CPU count which we are # expecting to differ from that of the compute nodes. # However, if the list contains only one node width, a warning is issued # unless the user passed an explicit node and cpu count. # We also extract the CPU count as that of the widest node. my $cpus = 0; { my @tmp = split(" ", $ENV{'LSB_MCPU_HOSTS'}); my $first_width = $tmp[1]; my %tmp; while (@tmp) { my $h = shift @tmp; # Host my $n = shift @tmp; # Numcpus $tmp{$h} += $n; $cpus = $n if ($n > $cpus); } my $count = grep { $tmp{$_} != $first_width } keys %tmp; # counts hosts different than the first if (!$count) { # only one node width observed if (!defined($numnode) || !defined($numcpu)) { warn "WARNING: Unable to distinguish compute nodes from launch nodes.\n"; warn "WARNING: Process layout and/or affinity may be unreliable.\n"; warn "WARNING: Please pass explicit -N and -c options.\n"; } $count = keys %tmp; # total node count } $numnode = $count unless defined($numnode); } @numprocargs = ($numproc); ## The mess required to get our desired layout # One Resource Set per node, using all CPUs: push @numprocargs, ('--nrs', $numnode, '--cpu_per_rs', 'ALL_CPUS'); # Blocked layout: my $ppn = int( ( $numproc + $numnode - 1 ) / $numnode ); push @numprocargs, ('--launch_distribution', "plane:$ppn"); if (defined($numcpu) && !$numcpu) { # User has disabled binding by passing `-c 0` push @numprocargs, ('--bind', 'none'); } else { my $user_numcpu = defined($numcpu); $numcpu = int($cpus / $ppn) unless defined($numcpu); if (!$numcpu || ($cpus && ($numcpu > $cpus))) { # We are oversubscribed (OR possibly $cpus == 0 meaning unknown). # So we disable binding in a way that warns of oversubscription: push @numprocargs, ('--bind', 'rs'); } else { # Each proc is bound to user-provided number of cpus, or equal disjoint share of the node: push @numprocargs, ('--bind', "packed:$numcpu"); my $idle = $cpus % $ppn; if ($idle && !$user_numcpu) { warn "WARNING: $ppn procs/node does not evenly divide $cpus CPUs, leaving $idle CPUs idle\n"; warn "WARNING: per node. Consider using jsrun for more precise control over the\n"; warn "WARNING: job layout, passing '-c 0' to disable CPU+process binding, or passing\n"; warn "WARNING: '-c $numcpu' to confirm the computed layout (silencing this warning).\n"; } } } $dashN_ok = 1; } # LAM-specific preprocessing of $numproc in the presence of $numnode if ($is_lam && $numnode) { my @tmp = (0..($numnode-1)); expand \@tmp; @numprocargs = ($numproc, 'n' . join(',', @tmp)); $dashN_ok = 1; } # Open MPI if ($is_ompi) { push @numprocargs, $numproc; my $ompi_ver = 0; if ($mpirun_help =~ m/\(Open MPI\) ([1-9][0-9]*)\.([0-9]+)/) { print "gasnetrun: identified Open MPI verson $1.$2\n" if ($verbose); $ompi_ver = ($1 * 100) + $2; } # The `-map-by` option is present (and tested) in 1.8.x and newer # It is known to be absent in 1.6.5 my $have_mapby = ($ompi_ver >= 108); my $mapbyarg = undef; # Use of `-npernode` was seen to crash 1.4.2, but OK for a long time # With Open MPI 1.[567] it is the only option available my $use_npernode = ($ompi_ver >= 105) && ($ompi_ver <= 107); # PPN layout if ($numnode) { my $ppn = int( ( $numproc + $numnode - 1 ) / $numnode ); if ($use_npernode) { push @numprocargs, ('-npernode', $ppn); $dashN_ok = 1; } elsif ($have_mapby) { $mapbyarg = "ppr:$ppn:node"; $dashN_ok = 1; } } # CPU binding if (defined($numcpu)) { if ($numcpu == 0) { # At 1.8 `--bind-to-none` was replaced by `--bind-to none` push @numprocargs, ($ompi_ver < 108 ? '--bind-to-none' : qw/--bind-to none/); } elsif ($have_mapby) { if (defined $mapbyarg) { # must merge w/ ppn directive, using version-dependent separator $mapbyarg .= ($ompi_ver <= 300 ? ':' : ',') . "PE=$numcpu"; } else { $mapbyarg = "node:PE=$numcpu"; } } else { warn "WARNING: Don't know how to control cpu binding with your mpirun\n"; warn "WARNING: PROCESS LAYOUT MIGHT NOT MATCH YOUR REQUEST\n"; } } if (defined $mapbyarg) { push @numprocargs, ('-map-by', $mapbyarg); } } if ($is_aprun || $is_yod) { @numprocargs = ($numproc); # Try to honor allocation if no -N given if (!defined($numnode)) { my $pbs_nodes = $ENV{'PBS_NNODES'}; my $pbs_jobid = $ENV{'PBS_JOBID'}; if (defined($pbs_nodes) && defined($ENV{'PBS_SIZE'})) { $numnode = $pbs_nodes; } elsif (defined($pbs_jobid) && open(QSTAT, "qstat -f $pbs_jobid |")) { while () { if (/\.(mpp)?nodect\s*=\s*([0-9]+)/) { $numnode = $2; last; } } close(QSTAT); } elsif (exists($ENV{'SLURM_JOB_ID'}) && exists($ENV{'SLURM_NNODES'})) { $numnode = $ENV{'SLURM_NNODES'}; } elsif (exists($ENV{'COBALT_JOBID'}) && exists($ENV{'COBALT_JOBSIZE'})) { $numnode = $ENV{'COBALT_JOBSIZE'}; } } if ($numnode) { my $ppn = int( ( $numproc + $numnode - 1 ) / $numnode ); if ($is_aprun) { # aprun requires -N ppn push @numprocargs, ('-N', $ppn); } elsif ($ppn == 1) { # yod requires -SN or -VN push @numprocargs, '-SN'; } elsif ($ppn == 2) { push @numprocargs, '-VN'; } else { die "yod does not support more than 2 processes per node.\n"; } } if ($is_aprun && defined($numcpu)) { push @numprocargs, ($numcpu ? ('-d', $numcpu) : qw/-cc none/); } $dashN_ok = 1; } # Generic support for -N and -ppn if (!$numnode) { # Nothing } elsif (defined($nodes_opt)) { push @numprocargs, ($numproc, $nodes_opt, $numnode); $dashN_ok = 1; } elsif (defined($ppn_opt)) { my $ppn = int( ( $numproc + $numnode - 1 ) / $numnode ); push @numprocargs, ($numproc, $ppn_opt, $ppn); $dashN_ok = 1; } # Validate -N as needed if (defined($numnode) && !(($spawncmd =~ m/%M/) || $dashN_ok)) { warn "WARNING: Don't know how to control process->node layout with your mpirun\n"; warn "WARNING: PROCESS LAYOUT MIGHT NOT MATCH YOUR REQUEST\n"; } # Fix output if (!$dryrun) { # Try to set O_APPEND to avoid badly intermixed output use Fcntl; my $flags; $flags = fcntl(STDOUT, F_GETFL, 0) and fcntl(STDOUT, F_SETFL, $flags | O_APPEND); $flags = fcntl(STDERR, F_GETFL, 0) and fcntl(STDERR, F_SETFL, $flags | O_APPEND); } # Exec it my $cwd = `pwd`; chomp $cwd; my @spawncmd = map { if ($_ eq '%N') { @numprocargs ? @numprocargs : $numproc; } elsif ($_ eq '%M') { $numnode || $numproc; } elsif ($_ eq '%H') { $nodefile or die "gasnetrun: %H appears in $cmd_var, but GASNET_NODEFILE is not set in the environment\n"; } elsif ($_ eq '%P') { ( $env_before_exe ? (@envargs, $exename) : ($exename, @envargs) ); #my @tmp = @envargs; #if ($env_before_exe) { push(@tmp, $exename); } #else { unshift(@tmp, $exename); } #@tmp; } elsif ($_ eq '%D') { $cwd; } elsif ($_ eq '%A') { my @argv = @ARGV; if ($encode_args) { @argv = map { $_ = gasnet_encode($_); } @argv; } @argv = ( $extra_quote_argv == 1 ? (map { "'$_'" } @argv) : $extra_quote_argv == 2 ? (map { "'\"$_\"'" } @argv) : (@argv) ); ($force_nonempty_argv && !@argv ? ("") : ($group_join_argv ? join(' ', @argv) : @argv) ); } elsif ($_ eq '%V') { $verbose?@verbose_opt:(); } else { $_; } } split(" ", $spawncmd); if ($verbose) { my @quotedcmd = map { if (m/[ ]/ || m/^$/) { "'$_'"; # quote tricky args for readability } else { $_; } } @spawncmd; print("gasnetrun: running: ", join(' ', @quotedcmd), "\n"); } my $exitcode = 0; if ($dryrun) { # Do nothing } elsif (@tmpfiles || defined($tmpdir)) { my $rc = system(@spawncmd); my $signo = $rc & 127; if ($rc == -1) { warn "gasnetrun: system(@spawncmd) failed: $!\n"; $exitcode = 1; } elsif ($signo) { warn "gasnetrun: system(@spawncmd) died with signal $signo\n"; $exitcode = 1; } else { $exitcode = $rc >> 8; } } else { exec(@spawncmd); die "gasnetrun: exec(@spawncmd) failed: $!\n"; } if (!$keep) { foreach (@tmpfiles) { print("gasnetrun: unlinking \'$_\'\n") if ($verbose); if (! unlink $_) { warn "gasnetrun: failed to unlink \'$_\'"; $exitcode = $exitcode or 1; } } if (defined($tmpdir)) { print("gasnetrun: removing \'$tmpdir\'\n") if ($verbose); if (! rmdir $tmpdir) { warn "gasnetrun: failed to rmdir \'$tmpdir\'"; $exitcode = $exitcode or 1; } } } exit $exitcode; __END__ gasnet-2025.8.0/other/spawner/gasnetrun.pl0000664000175000017500000002706215142313673020574 0ustar alastairalastair#!/usr/bin/env perl # $Source: bitbucket.org:berkeleylab/gasnet.git/ibv-conduit/contrib/gasnetrun_ibv.pl $ # Description: GASNet spawner script for ibv-conduit and several other conduits # Terms of use are as specified in license.txt require 5.004; use strict; use Fcntl; use IO::File; use Cwd qw(cwd); BEGIN { eval 'use File::Temp qw(:POSIX);'; eval 'use POSIX qw(tmpnam);' if $!; die if $!; } # Globals my @mpi_args = (); my $numproc = undef; my $numnode = undef; my $restart = 0; my $verbose = 0; my $keep = 0; my $dryrun = 0; my $exebase = undef; my $exepath = undef; my $exeindex = undef; my $envlist = undef; my $nodefile = $ENV{'GASNET_NODEFILE'} || $ENV{'PBS_NODEFILE'}; my @tmpfiles = (defined($nodefile) && $ENV{'GASNET_RM_NODEFILE'}) ? ("$nodefile") : (); my $conduit = $ENV{'GASNET_SPAWN_CONDUIT'}; my $spawner_var = 'GASNET_' . $conduit . '_SPAWNER'; my $spawner = $ENV{$spawner_var}; my $pshm_enabled = $ENV{'GASNET_PSHM_ENABLED'} eq 'yes'; sub usage { print (@_) if (@_); my @spawners = (); push (@spawners,'fork') if ($ENV{'GASNET_SPAWN_HAVE_FORK'}); push (@spawners,'ssh') if ($ENV{'GASNET_SPAWN_HAVE_SSH'}); push (@spawners,'mpi') if ($ENV{'GASNET_SPAWN_HAVE_MPI'}); push (@spawners,'pmi') if ($ENV{'GASNET_SPAWN_HAVE_PMI'}); print "usage: gasnetrun_".lc($conduit)." -n [options] [--] prog [program args]\n"; print " options:\n"; print " -n number of processes to run\n"; print " -N number of nodes to run on (not always supported)\n" unless ($conduit eq 'SMP'); print " -c number of cpus per process (not always supported)\n"; print " -E list of environment vars to propagate\n"; print " -v enable verbose output, repeated use increases verbosity\n"; print " -t test only, don't execute anything (implies -v)\n"; print " -k keep any temporary files created (implies -v)\n"; print " -spawner= force use of a specific spawner (".join('|', @spawners).")\n" if (@spawners > 1); print " -- ends option parsing\n"; exit 1; } sub fullpath($) { my $file = shift; my $result = undef; if ($file =~ m|^/|) { # full path, don't do anything to it $result = $file; } elsif ($file =~ m|/| || -x $file) { # has directory components or exists in cwd $result = cwd() . "/$file"; } else { # search PATH foreach (split(':', $ENV{PATH})) { my $tmp = "$_/$file"; if (-x $tmp) { $result = $tmp; last; } } } return $result } # We need to parse our command-line arguments # We also build up @mpi_args, stripping out ones that are purely ours while (@ARGV > 0) { $_ = $ARGV[0]; push @mpi_args, $_; if ($_ eq '--') { shift; last; } elsif ($_ eq '-n' || $_ eq '-np') { shift; push @mpi_args, $ARGV[0]; usage ("$_ option given without an argument\n") unless @ARGV >= 1; $numproc = 0+$ARGV[0]; usage ("$_ option with invalid argument '$ARGV[0]'\n") unless $numproc >= 1; } elsif ($_ =~ /^(-np?)([0-9]+)$/) { $numproc = 0+$2; usage ("$1 option with invalid argument '$2'\n") unless $numproc >= 1; } elsif ($_ eq '-N') { shift; push @mpi_args, $ARGV[0]; usage ("$_ option given without an argument\n") unless @ARGV >= 1; $numnode = 0+$ARGV[0]; usage ("$_ option with invalid argument '$ARGV[0]'\n") unless $numnode >= 1; } elsif ($_ eq '-c') { shift; push @mpi_args, $ARGV[0]; usage ("$_ option given without an argument\n") unless @ARGV >= 1; usage ("$_ option with invalid argument '$ARGV[0]'\n") unless ($ARGV[0] =~ m/^[0-9]+$/); } elsif ($_ =~ /^(-c)([0-9]+)$/) { # nothing to do } elsif ($_ =~ /^(-N)([0-9]+)$/) { $numnode = 0+$2; usage ("$1 option with invalid argument '$2'\n") unless $numnode >= 1; } elsif ($_ eq '-E') { shift; push @mpi_args, $ARGV[0]; $envlist = $ARGV[0]; usage ("-E option given without an argument\n") unless @ARGV >= 1; } elsif ($_ =~ /^-spawner=(.+)$/) { $spawner = $1; pop @mpi_args; # not known to mpi/pmi spawner } elsif ($_ eq '-restart') { shift; $restart = 1; pop @mpi_args; # not known to mpi/pmi spawner usage "-restart option given without an argument\n" unless @ARGV >= 1; last; } elsif ($_ eq '-v') { $verbose++; } elsif ($_ eq '-t') { $dryrun = 1; $verbose = 1 if (!$verbose); } elsif ($_ eq '-k') { $keep = 1; $verbose = 1 if (!$verbose); } elsif (m/^-/) { usage ("unrecognized option '$_'\n"); } else { pop @mpi_args; # pop off program name last; } shift; } # Validate spawner if (!defined($spawner)) { usage "Option -spawner was not given and no default is set\n" } $ENV{$spawner_var} = lc($spawner); $spawner = uc($spawner); if ($spawner eq 'MPI') { usage "Spawner is set to MPI, but MPI support was not compiled in\n" unless $ENV{'GASNET_SPAWN_HAVE_MPI'}; } elsif ($spawner eq 'PMI') { usage "Spawner is set to PMI, but PMI support was not compiled in\n" unless $ENV{'GASNET_SPAWN_HAVE_PMI'}; } elsif ($spawner eq 'FORK') { usage "Spawner is set to FORK, which is not valid for ".lc($conduit)."-conduit\n" unless ($conduit eq 'SMP'); } # Restart-specific options processing if ($restart) { usage "Option -n cannot be specified with -restart\n" if defined($numproc); usage "Option -E cannot be specified with -restart\n" if defined($envlist); usage "Spawner $spawner does not implement -restart\n" unless grep(/$spawner/, qw/SSH/); my $dir = $ARGV[-1]; die "gasnetrun: restart argument '$dir' does not exist\n" unless -e $dir; die "gasnetrun: restart argument '$dir' is not a directory\n" unless -d $dir; die "gasnetrun: restart argument '$dir' is not accessible\n" unless -x $dir; my $found = 0; open (FILE, "$dir/metadata"); while () { if (/argv0:\s*(\S+)/) { splice(@ARGV,-1,0,$1); $found |= 1; } elsif (/nproc:\s*(\S+)/) { $numproc = $1; $found |= 2; } } close FILE; die "gasnetrun: '$dir' is not a valid restart directory\n" unless $found == 3; $ARGV[-1] = (cwd() . '/' . $dir) unless ($dir =~ m|^/|); } # Validate/default -n as needed if (($conduit eq 'SMP') && ! $pshm_enabled) { if (!defined $numproc) { $numproc = 1; } elsif ($numproc != 1) { die "gasnetrun: smp-conduit without PSHM only supports '-n 1'\n"; } } elsif (!defined $numproc) { usage "Required option -n was not given\n"; } # Validate/default -N as needed if ($conduit eq 'SMP') { if (!defined $numnode) { $numnode = 1; } elsif ($numnode != 1) { die "gasnetrun: smp-conduit only supports '-N 1'\n"; } } # Implement -E for ssh, if required, as a wrapper (processed below) if (($spawner eq 'SSH') && defined $envlist) { foreach (split(',', $envlist)) { # Screen both variable names and values for "bad" ones. # See Bug 4723 for the motivation. next if ($ENV{$_} =~ m/\n/); # skip value with newline(s), which we cannot portably quote next unless ($_ =~ m/^[A-Za-z_][A-Za-z0-9_]*$/); # skip invalid variable name unshift @ARGV, "$_=$ENV{$_}"; } unshift @ARGV, $ENV{'GASNET_ENVCMD'}; } # Find the program (possibly a wrapper) $exebase = $ARGV[0] or usage "No program specified\n"; $exepath = fullpath($exebase); die "gasnetrun: unable to locate program '$exebase'\n" unless (defined($exepath) && -e $exepath); print "gasnetrun: located executable '$exepath'\n" if ($verbose); die "gasnetrun: missing execute permissions for '$exepath'\n" unless -x $exepath; $ARGV[0] = $exepath; # Bug 3578: if (($conduit eq 'IBV') && !exists($ENV{'OMPI_MCA_mpi_warn_on_fork'})) { $ENV{'OMPI_MCA_mpi_warn_on_fork'} = 0; } # Find the GASNet executable and verify its capabilities my $pattern = "^GASNet" . $spawner . "Spawner: 1 \\\$"; my $found = undef; $exeindex = 0; foreach my $arg (@ARGV) { ++$exeindex; next if ($arg =~ m/^-/); # skip obvious options my $file = fullpath($arg); next unless (defined($file) && -x $file); # not found or not executable my $is_gasnet = undef; next unless open (FILE, $file); { local $/ = '$'; # use $ as the line break symbol while () { next unless(/^GASNet/); if (/GASNetConduitName: $conduit \$/o) { $is_gasnet = 1; next; } if (/$pattern/o) { $found = 1; last; } } } close (FILE); if ($found) { if ($exeindex > 1) { # wrapper in use $arg = $file; # canonicalize (foreach is by reference) print "gasnetrun: located GASNet executable '$file'\n" if ($verbose); } last; } elsif ($is_gasnet) { die "GASNet executable '$file' does not support spawner '$spawner'\n"; } } if (!$found) { warn "gasnetrun: unable to locate a GASNet program in '@ARGV'\n"; $exeindex = 1; # hope for the best! } # Run it which ever way makes sense if ($verbose >= 1) { $ENV{"GASNET_VERBOSEENV"} = "1" unless (exists($ENV{"GASNET_VERBOSEENV"})); } if ($verbose >= 2) { $ENV{"GASNET_SPAWN_VERBOSE"} = "1" unless (exists($ENV{"GASNET_SPAWN_VERBOSE"})); } if ($spawner eq 'MPI' || $spawner eq 'PMI') { print("gasnetrun: forwarding to $spawner-based spawner\n") if ($verbose); @ARGV = (@mpi_args, @ARGV); (my $mpi = $0) =~ s/\.pl$/-mpi.pl/; die "cannot find $mpi: $!" unless -f $mpi; my $err = do $mpi; # use 'do' to load another perl file (reduce forks, etc) if ($@ || $err) { die "error running $mpi:\n $@ $err\n"; } } elsif ($spawner eq 'FORK') { unshift(@ARGV, $ENV{'GASNET_ENVCMD'}, "GASNET_PSHM_NODES=$numproc"); print("gasnetrun: running: ", join(' ', @ARGV), "\n") if ($verbose); unless ($dryrun) { exec(@ARGV) or die "failed to exec $exebase\n"; } } elsif ($spawner eq 'SSH') { my $wrapper = ($exeindex > 1) ? join ' ', map { s/'/'\\''/g; "'".$_."'"; } splice @ARGV, 0, $exeindex-1 : undef; my $fh; my $fileno = -1; { # Create an unlinked temp file containing the entire command line my $filename; do { $filename = tmpnam(); } until $fh = IO::File->new($filename, O_RDWR|O_CREAT|O_EXCL, 0600); unlink($filename); binmode($fh); my $flags = fcntl($fh, F_GETFD, 0) or die "fcntl F_GETFD: $!"; fcntl($fh, F_SETFD, $flags & ~FD_CLOEXEC) or die "fcntl F_SETFD: $!"; foreach (@ARGV) { syswrite($fh, $_); syswrite($fh, chr(0)); } sysseek($fh, 0, SEEK_SET); $fileno = fileno($fh); } $ENV{'GASNET_SPAWN_ARGS'} = join(',', (($restart?'R':'M').($verbose >= 2?'v':'')), $fileno, $numproc, $numnode, $wrapper); print("gasnetrun: set GASNET_SPAWN_ARGS=|$ENV{GASNET_SPAWN_ARGS}|\n") if ($verbose); print("gasnetrun: running: ", join(' ', @ARGV), "\n") if ($verbose); unless ($dryrun) { exec(@ARGV) or die "failed to exec $exebase\n"; } } else { die "Unknown spawner '$spawner' requested\n"; } __END__ gasnet-2025.8.0/other/contrib/0000775000175000017500000000000015142313673016203 5ustar alastairalastairgasnet-2025.8.0/other/contrib/cross-configure-cray-xc-slurm0000775000175000017500000001235415142313673023752 0ustar alastairalastair#!/bin/sh # This is an automatically-generated cross-configuration setup script ################################################ # Usage Instructions: # 1. fill in the following values to point to the target and host compilers: # NOTE: this relies on module-established PATH setting to automatically # select the GCC or PGI-based MPI compilers, based on which PrgEnv is currently loaded # The same PrgEnv *must* be loaded when building and using the GASNet install CC='cc' # vanilla target C compiler CXX='CC' # vanilla target C++ compiler export CC export CXX XTPE_INFO_MESSAGE_OFF=1 ; export XTPE_INFO_MESSAGE_OFF # magic variable to disable Cray cc's target INFO warning # Host C compiler # NOTE: you may need to set GCC_EXEC_PREFIX=/usr/bin/ # to get the correct assembler if gcc is your host compiler HOST_CC='gcc' ; export HOST_CC HOST_CFLAGS='-g -O2' ; export HOST_CFLAGS # Host C++ compiler - required by Titanium, not required for UPC or GASNet HOST_CXX='g++' ; export HOST_CXX HOST_CXXFLAGS='' ; export HOST_CXXFLAGS # Optional additional settings: (see configure --help for complete list) MPI_CC="$CC" ; export MPI_CC # MPI-enabled C compiler #MPI_CFLAGS='' ; export MPI_CFLAGS # flags for MPI_CC MPI_LIBS='' ; export MPI_LIBS # libs for linking with MPI_CC MPIRUN_CMD="${SRUN:-srun} -K0 -W60 %V -mblock -n %N %C" ; export MPIRUN_CMD # launch command for MPI jobs EXTRA_CONFIGURE_ARGS="--disable-auto-conduit-detect --enable-smp --enable-ofi --enable-mpi=probe --with-ofi-provider=gni --disable-aligned-segments --enable-pshm --disable-pshm-posix --enable-pshm-xpmem" # OS string and PrgEnv identifier for test harness purposes PRGENV=`expr ":$LOADEDMODULES" : '.*:\(PrgEnv-[a-z]*\)' 2>/dev/null | tr '[A-Z]-' '[a-z]_'` EXTRA_CONFIGURE_ARGS="$EXTRA_CONFIGURE_ARGS --with-feature-list=os_cnl${PRGENV:+,$PRGENV}" # minimal backtracing support EXTRA_CONFIGURE_ARGS="$EXTRA_CONFIGURE_ARGS --enable-backtrace-execinfo" if test -x /usr/bin/gdb ; then # Enable gdb probe if it appears to be present EXTRA_CONFIGURE_ARGS="$EXTRA_CONFIGURE_ARGS --enable-backtrace-gdb" fi # Work around bug 3480 if a PrgEnv environment module with major version >= 6 is loaded if test -n `echo ":$LOADEDMODULES" | grep ':PrgEnv-[a-z]*/[6-9]' 2>/dev/null`; then EXTRA_CONFIGURE_ARGS="$EXTRA_CONFIGURE_ARGS --enable-bug3480-workaround" fi if test x"$CRAY_CPU_TARGET" = x"mic-knl" ; then EXTRA_CONFIGURE_ARGS="$EXTRA_CONFIGURE_ARGS --enable-large-pshm" fi # 2. Fill in the canonical target machine type. You can usually obtain this # by running config-aux/config.guess on the target machine TARGET_ID='x86_64-cnl-linux-gnu' # 3. Optionally cross-compile and run the detect-cachesz.c utility and # fill in the value below and uncomment. If not set the default is platform-dependent. CACHE_LINE_BYTES=64; export CACHE_LINE_BYTES # 4. Review the automatically-detected settings below and make corrections as necessary. # 5. Place this output script in your top-level source directory and run it, # passing it any additional configure arguments as usual (see configure --help). ################################################ # AUTOMATICALLY DETECTED SETTINGS: # Whether the system has a working version of anonymous mmap CROSS_HAVE_MMAP='1' ; export CROSS_HAVE_MMAP # The system VM page size (ie mmap granularity, even if swapping is not supported) CROSS_PAGESIZE='4096' ; export CROSS_PAGESIZE # Does the system stack grow up? CROSS_STACK_GROWS_UP='0' ; export CROSS_STACK_GROWS_UP # Is char a signed type? CROSS_CHAR_IS_SIGNED='1' ; export CROSS_CHAR_IS_SIGNED # Basic primitive C type sizes (in bytes) CROSS_SIZEOF_CHAR='1' ; export CROSS_SIZEOF_CHAR CROSS_SIZEOF_SHORT='2' ; export CROSS_SIZEOF_SHORT CROSS_SIZEOF_INT='4' ; export CROSS_SIZEOF_INT CROSS_SIZEOF_LONG='8' ; export CROSS_SIZEOF_LONG CROSS_SIZEOF_LONG_LONG='8' ; export CROSS_SIZEOF_LONG_LONG CROSS_SIZEOF_VOID_P='8' ; export CROSS_SIZEOF_VOID_P CROSS_SIZEOF_SIZE_T='8' ; export CROSS_SIZEOF_SIZE_T CROSS_SIZEOF_PTRDIFF_T='8' ; export CROSS_SIZEOF_PTRDIFF_T # System signal values CROSS_SIGHUP='1' ; export CROSS_SIGHUP CROSS_SIGINT='2' ; export CROSS_SIGINT CROSS_SIGQUIT='3' ; export CROSS_SIGQUIT CROSS_SIGKILL='9' ; export CROSS_SIGKILL CROSS_SIGTERM='15' ; export CROSS_SIGTERM CROSS_SIGUSR1='10' ; export CROSS_SIGUSR1 # Find source directory if test -z "$SRCDIR" || test ! -f "$SRCDIR/configure" ; then SRCDIR=`dirname $0` fi if test ! -f "$SRCDIR/configure" ; then echo "ERROR: Source directory not found. Either set \$SRCDIR=/path/to/src or copy/link the `basename $0` script to the same directory as the configure script" exit 1 fi # Detect the build+host machine type HOST_APPEND= for sys in host build; do SYS_ARG=`echo "$@" | grep -i -e --$sys` if test -z "$SYS_ARG"; then if test -z "$HOST_ID"; then HOST_ID=`env CC= HOST_CC= CC_FOR_BUILD= $SRCDIR/config-aux/config.guess` if test -z "$HOST_ID"; then echo 'ERROR: failed to auto-detect build host. Please run with --host=machineid --build=machineid to identify the host machine running this script' exit 1 fi fi HOST_APPEND="$HOST_APPEND --$sys=$HOST_ID" fi done # Now that everything is setup, run the actual configure script $SRCDIR/configure --enable-cross-compile$HOST_APPEND --target=$TARGET_ID $EXTRA_CONFIGURE_ARGS "$@" gasnet-2025.8.0/other/contrib/cross-configure-intel-knl0000775000175000017500000001165615142313673023145 0ustar alastairalastair#!/bin/sh ## Cross configure script for second-generation Intel MIC (Knights Landing / KNL) ## Target specific NOTES: ## ## This script is tailored for a system which runs appltication across multiple ## Phi coprocessors (pontentially on multiple hosts), and therefore expects to ## use an "mpirun.mpic" script for launching on ibv-conduit (InifiniBand). ## ## If your interest is in runs on a single Phi, then compile for smp-conduit ## and launch jobs using the gasnetrun_mic script in GASNet's contrib directory. ## To use (assuming it is in your PATH), for instance ## smp-conduit$ export SMP_RUNCMD="env GASNET_PSHM_NODES=%N gasnetrun_mic -E %L -- %C" ## smp-conduit$ make run-tests-seq ################################################ # Usage Instructions: # 1. fill in the following values to point to the target and host compilers: CC='icc -xMIC-AVX512' ; export CC # vanilla target C compiler CXX='icpc -xMIC-AVX512' ; export CXX # vanilla target C++ compiler # Host C compiler # NOTE: you may need to set GCC_EXEC_PREFIX=/usr/bin/ # to get the correct assembler if gcc is your host compiler HOST_CC='gcc' ; export HOST_CC HOST_CFLAGS='-g -O2' ; export HOST_CFLAGS # Host C++ compiler - required by Titanium, not required for UPC or GASNet HOST_CXX='g++' ; export HOST_CXX HOST_CXXFLAGS='-g -O2' ; export HOST_CXXFLAGS # Optional additional settings: (see configure --help for complete list) MPI_CC='mpiicc -xMIC-AVX512' ; export MPI_CC # MPI-enabled C compiler MPI_CFLAGS='' ; export MPI_CFLAGS # flags for MPI_CC MPI_LIBS='' ; export MPI_LIBS # libs for linking with MPI_CC MPIRUN_CMD='mpiexec -n %N %C' # User must set GASNET_NODEFILE export MPIRUN_CMD # launch command for MPI jobs EXTRA_CONFIGURE_ARGS='--disable-aligned-segments --enable-pshm --enable-large-pshm' ; export EXTRA_CONFIGURE_ARGS # misc configure args to pass # 2. Fill in the canonical target machine type. You can usually obtain this # by running config-aux/config.guess on the target machine TARGET_ID='x86_64-unknown-linux-gnu' # 3. Optionally cross-compile and run the detect-cachesz.c utility and # fill in the value below and uncomment. If not set the default is platform-dependent. CACHE_LINE_BYTES=64; export CACHE_LINE_BYTES # 4. Review the automatically-detected settings below and make corrections as necessary. # 5. Place this output script in your top-level source directory and run it, # passing it any additional configure arguments as usual (see configure --help). ################################################ # AUTOMATICALLY DETECTED SETTINGS: # Whether the system has a working version of anonymous mmap CROSS_HAVE_MMAP='1' ; export CROSS_HAVE_MMAP # The system VM page size (ie mmap granularity, even if swapping is not supported) ## YZ: MIC supports 2MB pages with the "MAP_HUGETLB" flag in ## mmap. Shoud check how to enable huge pages later as an ## optimization! CROSS_PAGESIZE='4096' ; export CROSS_PAGESIZE # Does the system stack grow up? CROSS_STACK_GROWS_UP='0' ; export CROSS_STACK_GROWS_UP # Is char a signed type? CROSS_CHAR_IS_SIGNED='1' ; export CROSS_CHAR_IS_SIGNED # Basic primitive C type sizes (in bytes) CROSS_SIZEOF_CHAR='1' ; export CROSS_SIZEOF_CHAR CROSS_SIZEOF_SHORT='2' ; export CROSS_SIZEOF_SHORT CROSS_SIZEOF_INT='4' ; export CROSS_SIZEOF_INT CROSS_SIZEOF_LONG='8' ; export CROSS_SIZEOF_LONG CROSS_SIZEOF_LONG_LONG='8' ; export CROSS_SIZEOF_LONG_LONG CROSS_SIZEOF_VOID_P='8' ; export CROSS_SIZEOF_VOID_P CROSS_SIZEOF_SIZE_T='8' ; export CROSS_SIZEOF_SIZE_T CROSS_SIZEOF_PTRDIFF_T='8' ; export CROSS_SIZEOF_PTRDIFF_T # System signal values CROSS_SIGHUP='1' ; export CROSS_SIGHUP CROSS_SIGINT='2' ; export CROSS_SIGINT CROSS_SIGQUIT='3' ; export CROSS_SIGQUIT CROSS_SIGKILL='9' ; export CROSS_SIGKILL CROSS_SIGTERM='15' ; export CROSS_SIGTERM CROSS_SIGUSR1='10' ; export CROSS_SIGUSR1 CROSS_HAVE_X86_CMPXCHG16B='1'; export CROSS_HAVE_X86_CMPXCHG16B # Enable Posix shared memory CROSS_HAVE_SHM_OPEN='1'; export CROSS_HAVE_SHM_OPEN # Find source directory if test -z "$SRCDIR" || test ! -f "$SRCDIR/configure" ; then SRCDIR=`dirname $0` fi if test ! -f "$SRCDIR/configure" ; then echo "ERROR: Source directory not found. Either set \$SRCDIR=/path/to/src or copy/link the `basename $0` script to the same directory as the configure script" exit 1 fi # Detect the build+host machine type HOST_APPEND= for sys in host build; do SYS_ARG=`echo "$@" | grep -i -e --$sys` if test -z "$SYS_ARG"; then if test -z "$HOST_ID"; then HOST_ID=`env CC= HOST_CC= CC_FOR_BUILD= $SRCDIR/config-aux/config.guess` if test -z "$HOST_ID"; then echo 'ERROR: failed to auto-detect build host. Please run with --host=machineid --build=machineid to identify the host machine running this script' exit 1 fi fi HOST_APPEND="$HOST_APPEND --$sys=$HOST_ID" fi done # Now that everything is setup, run the actual configure script $SRCDIR/configure --enable-cross-compile$HOST_APPEND --target=$TARGET_ID $EXTRA_CONFIGURE_ARGS "$@" gasnet-2025.8.0/other/contrib/cross-configure-intel-knc0000775000175000017500000001167615142313673023136 0ustar alastairalastair#!/bin/sh ## Cross configure script for first-generation Intel MIC (Knights Corner / KNC) ## Target specific NOTES: ## ## This script is tailored for a system which runs appltication across multiple ## Phi coprocessors (pontentially on multiple hosts), and therefore expects to ## use an "mpirun.mpic" script for launching on ibv-conduit (InifiniBand). ## ## If your interest is in runs on a single Phi, then compile for smp-conduit ## and launch jobs using the gasnetrun_mic script in GASNet's contrib directory. ## To use (assuming it is in your PATH), for instance ## smp-conduit$ export SMP_RUNCMD="env GASNET_PSHM_NODES=%N gasnetrun_mic -E %L -- %C" ## smp-conduit$ make run-tests-seq ################################################ # Usage Instructions: # 1. fill in the following values to point to the target and host compilers: CC='icc -mmic' ; export CC # vanilla target C compiler CXX='icpc -mmic' ; export CXX # vanilla target C++ compiler # Host C compiler # NOTE: you may need to set GCC_EXEC_PREFIX=/usr/bin/ # to get the correct assembler if gcc is your host compiler HOST_CC='icc' ; export HOST_CC HOST_CFLAGS='-g -O2' ; export HOST_CFLAGS # Host C++ compiler - required by Titanium, not required for UPC or GASNet HOST_CXX='icpc' ; export HOST_CXX HOST_CXXFLAGS='-g -O2' ; export HOST_CXXFLAGS # Optional additional settings: (see configure --help for complete list) MPI_CC='mpiicc -mmic' ; export MPI_CC # MPI-enabled C compiler MPI_CFLAGS='' ; export MPI_CFLAGS # flags for MPI_CC MPI_LIBS='' ; export MPI_LIBS # libs for linking with MPI_CC MPIRUN_CMD='mpirun.mic -n %N -hostfile %H %C' # User must set GASNET_NODEFILE export MPIRUN_CMD # launch command for MPI jobs EXTRA_CONFIGURE_ARGS='--disable-aligned-segments --enable-pshm' ; export EXTRA_CONFIGURE_ARGS # misc configure args to pass # 2. Fill in the canonical target machine type. You can usually obtain this # by running config-aux/config.guess on the target machine TARGET_ID='k1om-unknown-linux-gnu' # 3. Optionally cross-compile and run the detect-cachesz.c utility and # fill in the value below and uncomment. If not set the default is platform-dependent. CACHE_LINE_BYTES=64; export CACHE_LINE_BYTES # 4. Review the automatically-detected settings below and make corrections as necessary. # 5. Place this output script in your top-level source directory and run it, # passing it any additional configure arguments as usual (see configure --help). ################################################ # AUTOMATICALLY DETECTED SETTINGS: # Whether the system has a working version of anonymous mmap CROSS_HAVE_MMAP='1' ; export CROSS_HAVE_MMAP # The system VM page size (ie mmap granularity, even if swapping is not supported) ## YZ: MIC supports 2MB pages with the "MAP_HUGETLB" flag in ## mmap. Shoud check how to enable huge pages later as an ## optimization! CROSS_PAGESIZE='4096' ; export CROSS_PAGESIZE # Does the system stack grow up? CROSS_STACK_GROWS_UP='0' ; export CROSS_STACK_GROWS_UP # Is char a signed type? CROSS_CHAR_IS_SIGNED='1' ; export CROSS_CHAR_IS_SIGNED # Basic primitive C type sizes (in bytes) CROSS_SIZEOF_CHAR='1' ; export CROSS_SIZEOF_CHAR CROSS_SIZEOF_SHORT='2' ; export CROSS_SIZEOF_SHORT CROSS_SIZEOF_INT='4' ; export CROSS_SIZEOF_INT CROSS_SIZEOF_LONG='8' ; export CROSS_SIZEOF_LONG CROSS_SIZEOF_LONG_LONG='8' ; export CROSS_SIZEOF_LONG_LONG CROSS_SIZEOF_VOID_P='8' ; export CROSS_SIZEOF_VOID_P CROSS_SIZEOF_SIZE_T='8' ; export CROSS_SIZEOF_SIZE_T CROSS_SIZEOF_PTRDIFF_T='8' ; export CROSS_SIZEOF_PTRDIFF_T # System signal values CROSS_SIGHUP='1' ; export CROSS_SIGHUP CROSS_SIGINT='2' ; export CROSS_SIGINT CROSS_SIGQUIT='3' ; export CROSS_SIGQUIT CROSS_SIGKILL='9' ; export CROSS_SIGKILL CROSS_SIGTERM='15' ; export CROSS_SIGTERM CROSS_SIGUSR1='10' ; export CROSS_SIGUSR1 # MIC doesn't have cmpxchg16b instruction! CROSS_HAVE_X86_CMPXCHG16B='0'; export CROSS_HAVE_X86_CMPXCHG16B # Enable Posix shared memory CROSS_HAVE_SHM_OPEN='1'; export CROSS_HAVE_SHM_OPEN # Find source directory if test -z "$SRCDIR" || test ! -f "$SRCDIR/configure" ; then SRCDIR=`dirname $0` fi if test ! -f "$SRCDIR/configure" ; then echo "ERROR: Source directory not found. Either set \$SRCDIR=/path/to/src or copy/link the `basename $0` script to the same directory as the configure script" exit 1 fi # Detect the build+host machine type HOST_APPEND= for sys in host build; do SYS_ARG=`echo "$@" | grep -i -e --$sys` if test -z "$SYS_ARG"; then if test -z "$HOST_ID"; then HOST_ID=`env CC= HOST_CC= CC_FOR_BUILD= $SRCDIR/config-aux/config.guess` if test -z "$HOST_ID"; then echo 'ERROR: failed to auto-detect build host. Please run with --host=machineid --build=machineid to identify the host machine running this script' exit 1 fi fi HOST_APPEND="$HOST_APPEND --$sys=$HOST_ID" fi done # Now that everything is setup, run the actual configure script $SRCDIR/configure --enable-cross-compile$HOST_APPEND --target=$TARGET_ID $EXTRA_CONFIGURE_ARGS "$@" gasnet-2025.8.0/other/contrib/gasnet_ibrun0000775000175000017500000000221415142313673020610 0ustar alastairalastair#!/bin/bash # Thin wrapper around ibrun on Ranger so that it looks enough # like an mpirun command to keep gasnetrun_mpi happy (and indirectly # gasnetrun_ibv). # It is also possible to use this directly as the CONDUIT_RUNCMD # for mpi- and ibv-conduits on Ranger, or as the mpi_spawn and # ibv_spawn settings with Berkeley UPC. # -PHH 2009.03.06 # $Id: gasnet_ibrun,v 1.7 2010/10/19 18:04:26 phargrov Exp $ while [ $# -ge 1 ]; do case "$1" in -v) set -x ;; -h) # For gasnetrun_mpi's probe echo "wrapper for ibrun" exit 0 ;; -np) export MY_NSLOTS=$2 shift # Remove argument ;; --) shift break ;; -*) echo "unknown option $1" exit 1 ;; *) break ;; esac shift done # Don't yet know why, but this env var fouls up ibrun! unset MALLOC_CHECK_ # Increase the IB-level timeout to match the one TACC uses for MPI # This value is a bit-shift, and thus results in a timeout that is # 32 times larger than our default value 18. export GASNET_QP_TIMEOUT=23 # Could use 'ibrun tacc_affinity "$@"', but that has its own issues. exec ibrun "$@" gasnet-2025.8.0/other/contrib/ident0000775000175000017500000000153615142313673017241 0ustar alastairalastair#!/usr/bin/env perl require 5.004; use strict; if ($ARGV[0] =~ /^-+[vh]/) { die "ident (GASNet) 0.1 This script extracts configuration information embedded in the GASNet library and any executables that link it statically. Copyright (C) 2024-2025, UC Regents. See GASNet license.txt for terms of use. Usage: $0 [file ...] If no file is specified, reads from stdin. "; } sub read_file { my $FILE; if (not @_) { $FILE = *STDIN; } else { $FILE = $_[0]; } local $/ = '$'; # use $ as the line break symbol while (<$FILE>) { print " \$$_\n" if (/^[\w]+: [\w\s[:punct:]]+ \$/o); } } shift if ($ARGV[0] eq '--'); if (not @ARGV) { read_file(); } while ( my $exe = shift) { my $FILE; open (FILE, $exe) || die "Could not open file '$exe'"; print "$exe:\n"; read_file(*FILE); close(FILE); print "\n" if (@ARGV); } gasnet-2025.8.0/other/contrib/gasnet_handler.h0000664000175000017500000002552715142313673021345 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_handler.h $ * Description: GASNet Helpers for using bit-width-independent AM handlers * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNET_HANDLER_H #define _GASNET_HANDLER_H /* argument-list macros */ #define ARGS0 #define ARGS1 , gasnet_handlerarg_t a0 #define ARGS2 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1 #define ARGS3 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2 #define ARGS4 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3 #define ARGS5 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4 #define ARGS6 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4, gasnet_handlerarg_t a5 #define ARGS7 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4, gasnet_handlerarg_t a5, gasnet_handlerarg_t a6 #define ARGS8 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4, gasnet_handlerarg_t a5, gasnet_handlerarg_t a6, gasnet_handlerarg_t a7 #define ARGS9 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4, gasnet_handlerarg_t a5, gasnet_handlerarg_t a6, gasnet_handlerarg_t a7, \ gasnet_handlerarg_t a8 #define ARGS10 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4, gasnet_handlerarg_t a5, gasnet_handlerarg_t a6, gasnet_handlerarg_t a7, \ gasnet_handlerarg_t a8, gasnet_handlerarg_t a9 #define ARGS11 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4, gasnet_handlerarg_t a5, gasnet_handlerarg_t a6, gasnet_handlerarg_t a7, \ gasnet_handlerarg_t a8, gasnet_handlerarg_t a9, gasnet_handlerarg_t a10 #define ARGS12 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4, gasnet_handlerarg_t a5, gasnet_handlerarg_t a6, gasnet_handlerarg_t a7, \ gasnet_handlerarg_t a8, gasnet_handlerarg_t a9, gasnet_handlerarg_t a10, gasnet_handlerarg_t a11 #define ARGS13 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4, gasnet_handlerarg_t a5, gasnet_handlerarg_t a6, gasnet_handlerarg_t a7, \ gasnet_handlerarg_t a8, gasnet_handlerarg_t a9, gasnet_handlerarg_t a10, gasnet_handlerarg_t a11, \ gasnet_handlerarg_t a12 #define ARGS14 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4, gasnet_handlerarg_t a5, gasnet_handlerarg_t a6, gasnet_handlerarg_t a7, \ gasnet_handlerarg_t a8, gasnet_handlerarg_t a9, gasnet_handlerarg_t a10, gasnet_handlerarg_t a11, \ gasnet_handlerarg_t a12, gasnet_handlerarg_t a13 #define ARGS15 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4, gasnet_handlerarg_t a5, gasnet_handlerarg_t a6, gasnet_handlerarg_t a7, \ gasnet_handlerarg_t a8, gasnet_handlerarg_t a9, gasnet_handlerarg_t a10, gasnet_handlerarg_t a11, \ gasnet_handlerarg_t a12, gasnet_handlerarg_t a13, gasnet_handlerarg_t a14 #define ARGS16 , gasnet_handlerarg_t a0, gasnet_handlerarg_t a1, gasnet_handlerarg_t a2, gasnet_handlerarg_t a3, \ gasnet_handlerarg_t a4, gasnet_handlerarg_t a5, gasnet_handlerarg_t a6, gasnet_handlerarg_t a7, \ gasnet_handlerarg_t a8, gasnet_handlerarg_t a9, gasnet_handlerarg_t a10, gasnet_handlerarg_t a11, \ gasnet_handlerarg_t a12, gasnet_handlerarg_t a13, gasnet_handlerarg_t a14, gasnet_handlerarg_t a15 #define ARGNAMES0 #define ARGNAMES1 , a0 #define ARGNAMES2 , a0, a1 #define ARGNAMES3 , a0, a1, a2 #define ARGNAMES4 , a0, a1, a2, a3 #define ARGNAMES5 , a0, a1, a2, a3, a4 #define ARGNAMES6 , a0, a1, a2, a3, a4, a5 #define ARGNAMES7 , a0, a1, a2, a3, a4, a5, a6 #define ARGNAMES8 , a0, a1, a2, a3, a4, a5, a6, a7 #define ARGNAMES9 , a0, a1, a2, a3, a4, a5, a6, a7, a8 #define ARGNAMES10 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9 #define ARGNAMES11 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 #define ARGNAMES12 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11 #define ARGNAMES13 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 #define ARGNAMES14 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13 #define ARGNAMES15 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14 #define ARGNAMES16 , a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 /* ===================================== Pointer-width abstraction support ===================================== AM arguments are always 32-bits wide, but PTR64 platforms need the ability to send their 64-bit pointers as arguments. We do this by packing pointers into 2 arguments. The macros below support this packing/unpacking so you can write the calls and handlers once and generate the packing/unpacking code automatically as required for the platform. */ /* AM send call macros (use instead of direct calls to e.g. gasnet_AMRequestShort2) Usage: cnt32 = the number of args needed for AM call on PTR32 platform cnt64 = the number of args needed for AM call on PTR64 platform args = parenthesized argument list for AM request/reply call, with any pointer args wrapped in a PACK() macro */ #if PLATFORM_ARCH_32 #define SHORT_REQ(cnt32, cnt64, args) gasnet_AMRequestShort ## cnt32 args #define SHORT_REP(cnt32, cnt64, args) gasnet_AMReplyShort ## cnt32 args #define MEDIUM_REQ(cnt32, cnt64, args) gasnet_AMRequestMedium ## cnt32 args #define MEDIUM_REP(cnt32, cnt64, args) gasnet_AMReplyMedium ## cnt32 args #define LONG_REQ(cnt32, cnt64, args) gasnet_AMRequestLong ## cnt32 args #define LONG_REP(cnt32, cnt64, args) gasnet_AMReplyLong ## cnt32 args #define LONGASYNC_REQ(cnt32, cnt64, args) gasnet_AMRequestLongAsync ## cnt32 args #elif PLATFORM_ARCH_64 #define SHORT_REQ(cnt32, cnt64, args) gasnet_AMRequestShort ## cnt64 args #define SHORT_REP(cnt32, cnt64, args) gasnet_AMReplyShort ## cnt64 args #define MEDIUM_REQ(cnt32, cnt64, args) gasnet_AMRequestMedium ## cnt64 args #define MEDIUM_REP(cnt32, cnt64, args) gasnet_AMReplyMedium ## cnt64 args #define LONG_REQ(cnt32, cnt64, args) gasnet_AMRequestLong ## cnt64 args #define LONG_REP(cnt32, cnt64, args) gasnet_AMReplyLong ## cnt64 args #define LONGASYNC_REQ(cnt32, cnt64, args) gasnet_AMRequestLongAsync ## cnt64 args #endif /* pointer packing/unpacking helper macros */ #if PLATFORM_ARCH_32 #define PACK(ptr) ((gasnet_handlerarg_t)(ptr)) #define UNPACK(a0) ((void *)a0) #elif PLATFORM_ARCH_64 #define PACK(ptr) ((gasnet_handlerarg_t)GASNETI_HIWORD(ptr)), ((gasnet_handlerarg_t)GASNETI_LOWORD(ptr)) #define UNPACK2(a0,a1) ((void *)GASNETI_MAKEWORD(a0,a1)) #endif #ifndef GASNETI_HANDLER_SCOPE #define GASNETI_HANDLER_SCOPE extern #endif #if PLATFORM_ARCH_32 #define SHORT_HANDLER_DECL(name, cnt32, cnt64) \ GASNETI_HANDLER_SCOPE void name ## _32(gasnet_token_t token ARGS ## cnt32) #define SHORT_HANDLER(name, cnt32, cnt64, innerargs32, innerargs64) \ GASNETI_HANDLER_SCOPE void name ## _32(gasnet_token_t token ARGS ## cnt32) { \ name ## _inner innerargs32 ; \ } static int _dummy_##name = sizeof(_dummy_##name) #define MEDIUM_HANDLER_DECL(name, cnt32, cnt64) \ GASNETI_HANDLER_SCOPE void name ## _32(gasnet_token_t token, void *addr, size_t nbytes \ ARGS ## cnt32) #define MEDIUM_HANDLER(name, cnt32, cnt64, innerargs32, innerargs64) \ GASNETI_HANDLER_SCOPE void name ## _32(gasnet_token_t token, void *addr, size_t nbytes \ ARGS ## cnt32) { \ name ## _inner innerargs32 ; \ } static int _dummy_##name = sizeof(_dummy_##name) #elif PLATFORM_ARCH_64 #define SHORT_HANDLER_DECL(name, cnt32, cnt64) \ GASNETI_HANDLER_SCOPE void name ## _64(gasnet_token_t token ARGS ## cnt64) #define SHORT_HANDLER(name, cnt32, cnt64, innerargs32, innerargs64) \ GASNETI_HANDLER_SCOPE void name ## _64(gasnet_token_t token ARGS ## cnt64) { \ name ## _inner innerargs64 ; \ } static int _dummy_##name = sizeof(_dummy_##name) #define MEDIUM_HANDLER_DECL(name, cnt32, cnt64) \ GASNETI_HANDLER_SCOPE void name ## _64(gasnet_token_t token, void *addr, size_t nbytes \ ARGS ## cnt64) #define MEDIUM_HANDLER(name, cnt32, cnt64, innerargs32, innerargs64) \ GASNETI_HANDLER_SCOPE void name ## _64(gasnet_token_t token, void *addr, size_t nbytes \ ARGS ## cnt64) { \ name ## _inner innerargs64 ; \ } static int _dummy_##name = sizeof(_dummy_##name) #endif /* convenience declarators for bit-width-independent handlers */ #define SHORT_HANDLER_NOBITS_DECL(name, cnt) \ GASNETI_HANDLER_SCOPE void name(gasnet_token_t token ARGS ## cnt) #define MEDIUM_HANDLER_NOBITS_DECL(name, cnt) \ GASNETI_HANDLER_SCOPE void name(gasnet_token_t token, void *addr, size_t nbytes ARGS ## cnt) /* long and medium handlers have the same signature */ #define LONG_HANDLER MEDIUM_HANDLER #define LONG_HANDLER_DECL MEDIUM_HANDLER_DECL #define LONG_HANDLER_NOBITS_DECL MEDIUM_HANDLER_NOBITS_DECL typedef void (*gasneti_handler_fn_t)(); /* prototype for generic handler function */ /* handler table construction */ #define gasneti_handleridx(fnname) _hidx_ ## fnname #define gasneti_handler_tableentry_no_bits(fnname) \ { gasneti_handleridx(fnname), (gasneti_handler_fn_t)fnname } #if PLATFORM_ARCH_32 #define gasneti_handler_tableentry_with_bits(fnname) \ { gasneti_handleridx(fnname), (gasneti_handler_fn_t)fnname ## _32 } #elif PLATFORM_ARCH_64 #define gasneti_handler_tableentry_with_bits(fnname) \ { gasneti_handleridx(fnname), (gasneti_handler_fn_t)fnname ## _64 } #endif #endif gasnet-2025.8.0/other/contrib/gasnetrun_mic0000775000175000017500000000223215142313673020766 0ustar alastairalastair#!/usr/bin/perl # Usage "gasnetrun_mic [-v] [-t] [-E envvar1,envvar2] app [args]" # # This script can be used to launch smp-conduit programs on Intel Phi # coprocessors using the micnativeloadex loader. # # When installing one may need to edit the path to the perl interpreter in the # first line, and may need a fullpath to micnativeloadex in the line below. my $cmd = 'micnativeloadex'; my ($verbose, $dryrun); my @env_vars = grep {m/^GASNET_/} (keys %ENV); while ($#ARGV && (substr($ARGV[0],0,1) eq '-')) { my $opt = shift; if ($opt eq '-E') { push @env_vars, split(',', shift); } elsif ($opt eq '-v') { $verbose = 1; } elsif ($opt eq '-t') { $verbose = $dryrun = 1; } elsif ($opt eq '--') { last; } else { die "$0: unknown option $opt\n"; } } my @cmd = ($cmd, shift); push(@cmd, '-e', join(' ', map {"$_=".gasnet_encode($ENV{$_})} @env_vars)) if (@env_vars); push(@cmd, '-a', join(' ', map {gasnet_encode($_)} @ARGV)) if (@ARGV); print(join(' ', @cmd), "\n") if $verbose; exec @cmd or die "failed to exec $cmd" unless $dryrun; sub gasnet_encode { $_ = shift; s!%(0[0-9A-Fa-f]{2})!%025$1!g; s!([^A-Za-z0-9%_,\./:+=@^-])!'%0'.unpack("H2",$1)!ge; $_; } gasnet-2025.8.0/other/contrib/gasnet_trace.in0000775000175000017500000000015715142313673021200 0ustar alastairalastair#!@BOURNE_SHELL@ TOOL_PREFIX="@TOOL_PREFIX@" export TOOL_PREFIX VERSION="@VERSION@" export VERSION @PERLSTART@ gasnet-2025.8.0/other/contrib/cross-configure-cray-xc-alps0000775000175000017500000001233215142313673023543 0ustar alastairalastair#!/bin/sh # This is an automatically-generated cross-configuration setup script ################################################ # Usage Instructions: # 1. fill in the following values to point to the target and host compilers: # NOTE: this relies on module-established PATH setting to automatically # select the GCC or PGI-based MPI compilers, based on which PrgEnv is currently loaded # The same PrgEnv *must* be loaded when building and using the GASNet install CC='cc' # vanilla target C compiler CXX='CC' # vanilla target C++ compiler export CC export CXX XTPE_INFO_MESSAGE_OFF=1 ; export XTPE_INFO_MESSAGE_OFF # magic variable to disable Cray cc's target INFO warning # Host C compiler # NOTE: you may need to set GCC_EXEC_PREFIX=/usr/bin/ # to get the correct assembler if gcc is your host compiler HOST_CC='gcc' ; export HOST_CC HOST_CFLAGS='-g -O2' ; export HOST_CFLAGS # Host C++ compiler - required by Titanium, not required for UPC or GASNet HOST_CXX='g++' ; export HOST_CXX HOST_CXXFLAGS='' ; export HOST_CXXFLAGS # Optional additional settings: (see configure --help for complete list) MPI_CC="$CC" ; export MPI_CC # MPI-enabled C compiler #MPI_CFLAGS='' ; export MPI_CFLAGS # flags for MPI_CC MPI_LIBS='' ; export MPI_LIBS # libs for linking with MPI_CC MPIRUN_CMD="${APRUN:-aprun} -n %N %C" ; export MPIRUN_CMD # launch command for MPI jobs EXTRA_CONFIGURE_ARGS="--disable-auto-conduit-detect --enable-smp --enable-ofi --enable-mpi=probe --with-ofi-provider=gni --disable-aligned-segments --enable-pshm --disable-pshm-posix --enable-pshm-xpmem" # OS string and PrgEnv identifier for test harness purposes PRGENV=`expr ":$LOADEDMODULES" : '.*:\(PrgEnv-[a-z]*\)' 2>/dev/null | tr '[A-Z]-' '[a-z]_'` EXTRA_CONFIGURE_ARGS="$EXTRA_CONFIGURE_ARGS --with-feature-list=os_cnl${PRGENV:+,$PRGENV}" # minimal backtracing support EXTRA_CONFIGURE_ARGS="$EXTRA_CONFIGURE_ARGS --enable-backtrace-execinfo" if test -x /usr/bin/gdb ; then # Enable gdb probe if it appears to be present EXTRA_CONFIGURE_ARGS="$EXTRA_CONFIGURE_ARGS --enable-backtrace-gdb" fi # Work around bug 3480 if a PrgEnv environment module with major version >= 6 is loaded if test -n `echo ":$LOADEDMODULES" | grep ':PrgEnv-[a-z]*/[6-9]' 2>/dev/null`; then EXTRA_CONFIGURE_ARGS="$EXTRA_CONFIGURE_ARGS --enable-bug3480-workaround" fi if test x"$CRAY_CPU_TARGET" = x"mic-knl" ; then EXTRA_CONFIGURE_ARGS="$EXTRA_CONFIGURE_ARGS --enable-large-pshm" fi # 2. Fill in the canonical target machine type. You can usually obtain this # by running config-aux/config.guess on the target machine TARGET_ID='x86_64-cnl-linux-gnu' # 3. Optionally cross-compile and run the detect-cachesz.c utility and # fill in the value below and uncomment. If not set the default is platform-dependent. CACHE_LINE_BYTES=64; export CACHE_LINE_BYTES # 4. Review the automatically-detected settings below and make corrections as necessary. # 5. Place this output script in your top-level source directory and run it, # passing it any additional configure arguments as usual (see configure --help). ################################################ # AUTOMATICALLY DETECTED SETTINGS: # Whether the system has a working version of anonymous mmap CROSS_HAVE_MMAP='1' ; export CROSS_HAVE_MMAP # The system VM page size (ie mmap granularity, even if swapping is not supported) CROSS_PAGESIZE='4096' ; export CROSS_PAGESIZE # Does the system stack grow up? CROSS_STACK_GROWS_UP='0' ; export CROSS_STACK_GROWS_UP # Is char a signed type? CROSS_CHAR_IS_SIGNED='1' ; export CROSS_CHAR_IS_SIGNED # Basic primitive C type sizes (in bytes) CROSS_SIZEOF_CHAR='1' ; export CROSS_SIZEOF_CHAR CROSS_SIZEOF_SHORT='2' ; export CROSS_SIZEOF_SHORT CROSS_SIZEOF_INT='4' ; export CROSS_SIZEOF_INT CROSS_SIZEOF_LONG='8' ; export CROSS_SIZEOF_LONG CROSS_SIZEOF_LONG_LONG='8' ; export CROSS_SIZEOF_LONG_LONG CROSS_SIZEOF_VOID_P='8' ; export CROSS_SIZEOF_VOID_P CROSS_SIZEOF_SIZE_T='8' ; export CROSS_SIZEOF_SIZE_T CROSS_SIZEOF_PTRDIFF_T='8' ; export CROSS_SIZEOF_PTRDIFF_T # System signal values CROSS_SIGHUP='1' ; export CROSS_SIGHUP CROSS_SIGINT='2' ; export CROSS_SIGINT CROSS_SIGQUIT='3' ; export CROSS_SIGQUIT CROSS_SIGKILL='9' ; export CROSS_SIGKILL CROSS_SIGTERM='15' ; export CROSS_SIGTERM CROSS_SIGUSR1='10' ; export CROSS_SIGUSR1 # Find source directory if test -z "$SRCDIR" || test ! -f "$SRCDIR/configure" ; then SRCDIR=`dirname $0` fi if test ! -f "$SRCDIR/configure" ; then echo "ERROR: Source directory not found. Either set \$SRCDIR=/path/to/src or copy/link the `basename $0` script to the same directory as the configure script" exit 1 fi # Detect the build+host machine type HOST_APPEND= for sys in host build; do SYS_ARG=`echo "$@" | grep -i -e --$sys` if test -z "$SYS_ARG"; then if test -z "$HOST_ID"; then HOST_ID=`env CC= HOST_CC= CC_FOR_BUILD= $SRCDIR/config-aux/config.guess` if test -z "$HOST_ID"; then echo 'ERROR: failed to auto-detect build host. Please run with --host=machineid --build=machineid to identify the host machine running this script' exit 1 fi fi HOST_APPEND="$HOST_APPEND --$sys=$HOST_ID" fi done # Now that everything is setup, run the actual configure script $SRCDIR/configure --enable-cross-compile$HOST_APPEND --target=$TARGET_ID $EXTRA_CONFIGURE_ARGS "$@" gasnet-2025.8.0/other/contrib/gasnet_trace.pl0000775000175000017500000006415215142313673021212 0ustar alastairalastair#! /usr/bin/env perl ############################################################# # $Source: bitbucket.org:berkeleylab/gasnet.git/other/contrib/gasnet_trace.pl $ # # All files in this directory (except where otherwise noted) are subject to the #following licensing terms: # #--------------------------------------------------------------------------- #Copyright (c) 2003, The Regents of the University of California, through #Lawrence Berkeley National Laboratory (subject to receipt of any required #approvals from U.S. Dept. of Energy) # #All rights reserved. # #Redistribution and use in source and binary forms with its documentation, with #or without modification, are permitted for any purpose, without fee, provided #that the following conditions are met: # #(1) Redistributions of source code must retain the above copyright notice, this #list of conditions and the following disclaimer. #(2) Redistributions in binary form must reproduce the above copyright notice, #this list of conditions and the following disclaimer in the documentation and/or #other materials provided with the distribution. #(3) Neither the name of Lawrence Berkeley National Laboratory, U.S. Dept. of #Energy nor the names of its contributors may be used to endorse or promote #products derived from this software without specific prior written permission. # #THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED #WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE #DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR #ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES #(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; #LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON #ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT #(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS #SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # #--------------------------------------------------------------------------- # #author: Wei Tu #email: weitu@ocf.berkeley.edu # ############################################################# use strict; use FileHandle; use Getopt::Long; # Global Variables ######################## my $version = "2.0"; my ($opt_sort, $opt_output, $opt_help, $opt_report); my ($opt_internal, $opt_full, $opt_peer, $opt_thread, $opt_filter); my (%data, %report, %heapstats); my (%threads); # maps thread pidstring => global thread num my (%nodes); # maps thread pidstring => node num my (%node_threads); # maps node num => the number of threads on that node my (%job_nodes); # maps job idstring => num nodes my (%job_seen); # maps job idstring => boolean job encountered before my (%job_uniq); my $memtable; # textual table of memory info my $heapstats_report; my @heapstat_keys; # sorted desc keys into heapstats my $tool_prefix = $ENV{'TOOL_PREFIX'} || 'gasnet'; my $tool_prefix_mc = ucfirst($tool_prefix); $tool_prefix_mc =~ s/Gasnet/GASNet/; $tool_prefix_mc =~ s/Upc/UPC/; my $gasnet_version = $ENV{'VERSION'} || '?.?'; my $opt_debug = 0; my $lang_mode = "GASNET"; #%nodes, %threads are identifier->thread(node)num # Getting the Options ######################## # hack: if we're being called by help2man as part of generating the upcrun # man page, we use a different 'version' option (we can't use the regular # one, since we'll have no valid conf file to read) my (@v) = grep {s/^-h2mversion=([0-9.]+)$/$1/} @ARGV; if (@v) { # help2man format print $tool_prefix."_trace @v\n"; exit(0); } # same thing, but for help2man's -h2mhelp call if (grep { /-h2mhelp/ } @ARGV) { usage(undef, 1); } GetOptions ( 'h|?|help' => \$opt_help, 'd' => \$opt_debug, 'sort=s' => \$opt_sort, 'o=s' => \$opt_output, 'p' => \$opt_peer, 'peer!' => \$opt_peer, 'report=s' => \$opt_report, 't' => \$opt_thread, 'thread!' => \$opt_thread, 'i' => \$opt_internal, 'internal!' => \$opt_internal, 'f' => \$opt_full, 'full!' => \$opt_full, 'filter=s' => \$opt_filter ); # The main routine ######################## usage() if $opt_help; if (!@ARGV) { die "no tracefile(s) specified!\n"; } if ($opt_output) { open(STDOUT, ">$opt_output") or die "Could not write to $opt_output: $!\n"; } if (!$opt_report) { $opt_report="GET,PUT,BARRIER,TI_ARRAY_COPY,MEMORY"; } my ($got_memreport, $got_tracefile); ARG: while (@ARGV) { my $arg = pop @ARGV; if ($arg =~ /%/) { for (my $i=0; ; $i++) { my $targ = $arg; $targ =~ s/%/$i/g; if (-f $targ) { unshift @ARGV, $targ; } else { die "No tracefiles found matching pattern '$arg'\n" if ($i == 0); next ARG; } } } if (is_memreport($arg)) { parse_memreport($arg); $got_memreport = 1; } else { parse_threadinfo($arg); parse_tracefile($arg); $got_tracefile = 1; } } foreach my $job (keys %job_nodes) { my ($want, $have) = ($job_nodes{$job}, $job_seen{$job}); if ($have < $want) { print STDERR "WARNING: only have traces for $have out of $want nodes of job $job\n"; } } convert_report(); sort_report(); trace_output(*STDOUT, "GET") if ($got_tracefile && $opt_report =~ /GET/); trace_output(*STDOUT, "PUT") if ($got_tracefile && $opt_report =~ /PUT/); trace_output(*STDOUT, "BARRIER") if ($got_tracefile && $opt_report =~ /BARRIER/); trace_output(*STDOUT, "TI_ARRAY_COPY") if ($got_tracefile && $opt_report =~ /TI_ARRAY_COPY/ && $lang_mode eq "TITANIUM"); trace_output(*STDOUT, "MEMORY") if ($got_memreport && $opt_report =~ /MEMORY/); # Show program usage ######################## sub usage { my ($errormsg, $h2mhelp) = @_; print "${tool_prefix_mc} trace file summarization script, v${version} (GASNet v${gasnet_version})\n"; print "Usage: ${tool_prefix}_trace [options] trace-file(s)\n"; print " trace-file(s) may include any mix of ${tool_prefix_mc} trace files and local memory reports\n"; if ($tool_prefix eq "upc" && !$h2mhelp) { print < ; return ($line =~ m/GASNet Debug Mallocator Report/); } # subroutine to read a memory report file and dump the useful information into a # data-structure, namely an array of hashes and return the array. # args : the filename to be read. ######################## sub parse_memreport { my $filename = $_[0]; my ($node, $numnodes); my $in_memtable = 0; open (TRACEFILE, $filename) or die "Could not open $filename: $!\n"; print STDERR "Parsing memory report file for $filename\n"; LINE: while () { if (m/^#\s*node:\s*(\d+)\s*\/\s*(\d+)/) { $node = $1; $numnodes = $2; } elsif (m/^# Object size/) { $in_memtable = 0; } elsif (m/^#\s+(Private memory utilization)/) { if (!$got_memreport) { $memtable .= "$1\n"; my $next = ; $next =~ s/^#\s*//; $memtable .= $next; $memtable .= "\nMEMORY_TABLE_SUMMARY"; } $in_memtable = 1; } elsif ($in_memtable && m/^#\s+(.*)$/) { # memory table my $line = $1; if ($line =~ m/(malloc.*):.*?(\d+) bytes[^\d]*(\d+)?/) { my ($desc, $sz, $cnt) = ($1,$2,$3); # my $szstr = sprintf '%*s', length($sz)+6, shorten($1,"MEMORY"); # $line =~ s/$sz bytes/$szstr/; push @heapstat_keys, $desc unless ($heapstats{$desc}); if ($desc =~ m/peak/) { if ($sz > $heapstats{$desc}{"SZ"}) { $heapstats{$desc}{"SZ"} = $sz; $heapstats{$desc}{"CNT"} = $cnt; } } else { $heapstats{$desc}{"CNT"} += $cnt; $heapstats{$desc}{"SZ"} += $sz; } } elsif (!$got_memreport) { $memtable .= "$line\n"; } } elsif (/\s*(\d+)\s+(\S+)/) { my ($sz, $src) = ($1, $2); push @{$data{"MEMORY"}{$src}{""}{$node}}, $sz; } } } # subroutine to read the tracefile and dump the useful information into a # data-structure, namely an array of hashes and return the array. # args : the filename to be read. ######################## sub parse_threadinfo { my $filename = $_[0]; open (TRACEFILE, $filename) or die "Could not open $filename: $!\n"; print STDERR "Parsing thread info for $filename..\n"; my ($nodes_complete); my (%thread_magic_seen, %node_seen, %node_magic_seen, %node_done, %node_threads_seen); LINE: while () { if (/GASNET_TRACEMASK: (\S+)/) { my $initial_mask = $1; # note that mask may change during execution unless ($initial_mask =~ m/[N]/) { print STDERR "WARNING: '$filename' was created with the N tracing category disabled.\n". "WARNING: Line number information may be missing or incomplete.\n"; } #unless ($initial_mask =~ m/[H]/) { # die "ERROR: '$filename' was created with the H tracing category disabled.\n" . # "ERROR: ${tool_prefix}_trace currently requires GASNET_TRACEMASK to include 'H'.\n"; #} } elsif (/GASNET_TRACE_MAGIC/ && m/^(\S+).*?I am thread (\d+) of (\d+).*?on node (\d+) of (\d+).*?in job <([^>]+)>.*$/) { my $job_id = $6; $threads{$1} = $2; $nodes{$1} = $4; $node_magic_seen{$4} = 1; # remember we saw magic from some thread on this node $thread_magic_seen{$1} = 1; # remember we saw this thread's magic $node_threads_seen{$4}++; # track number of threads on this node # for error checking of total nodes/threads $job_nodes{$job_id} = $5; $job_seen{$job_id}++; if ($job_uniq{$job_id,$2}++) { print STDERR "WARNING: duplicate tracing data for thread $2 of job $job_id\n"; } $lang_mode = "TITANIUM" if ($job_id =~ /^Ti:/); $lang_mode = "UPC" if ($job_id =~ /^UPC:/); } elsif (/^(\d+).*?\(B\) BARRIER_WAIT/) { my $barrier_node = $1; # ensure we got them all - esp tricky if multiple nodes are in same file # stop parsing for each node at the second barrier after magic lines for that node $node_done{$barrier_node}++ if ($node_magic_seen{$barrier_node}); $nodes_complete++ if ($node_done{$barrier_node} == 2); next if ($nodes_complete == 0 || $nodes_complete < (scalar keys %node_seen)); # By now magic lines of every thread seen have been processed if ($opt_debug) { foreach my $node (keys %node_seen) { print " - Node $node has threads: "; foreach my $threadid (keys %nodes) { print $threads{$threadid}."[$threadid] " if ($nodes{$threadid} == $node); } print "\n"; } } last; } elsif (/^(\d+)> Program/) { $node_seen{$1} = 1; # remember we saw this node's trace output in this file } } die "ERROR: '$filename' does not appear to be a valid GASNet trace file!\n" unless (keys %node_magic_seen); # remember the number of threads per node foreach my $key (keys %node_threads_seen) { $node_threads{$key} = $node_threads_seen{$key}; } } sub parse_tracefile { open (TRACEFILE, $_[0]) or die "Could not open $_[0]: $!\n"; print STDERR "Parsing tracefile for $_[0].. 0%"; my $file_size = (stat($_[0]))[7]; # FILTERS for reports and types my %filters, my %reports; foreach my $filter (split /,/, $opt_filter) { $filters{$filter}++; } foreach my $report (split /,/, $opt_report) { $reports{$report}++; } # Counter for progress indication my $counter; # Flag for internal region my $inRegion; my $sawmagic; my %arraycopy_not_nb; # flag for nb copy failure detection while () { unless ($opt_internal) { # If in region, skip unless we have a leaveregion if (/GASNET_TRACE_LEAVEREGION/) { $inRegion = 0; next; } next if $inRegion; # Set the flag for entering a region if (/GASNET_TRACE_ENTERREGION/) { $inRegion = 1; next; } } $sawmagic = 1 if (/GASNET_TRACE_MAGIC/); # Actual info my ($thread, $src, $pgb, $type, $sz); $counter++; if ($counter > 100000) { my $percentage = int (tell(TRACEFILE) * 100 / $file_size); if ($percentage >= 10) { print STDERR "\b"; } print STDERR "\b\b$percentage%"; $counter = 0; } if (/^(\S+) \S+ (\[[^\]]+\] )?\([HPGB]\) (PUT|GET|BARRIER|TI_ARRAY_COPY)([^:]*):\D+(\d+(\.\d+)?)?/) { ($thread, $src, $pgb, $type, $sz) = ($1, $2, $3, $4, $5); # filter out lines that are not going to be in the report next unless $reports{$pgb}; if ($pgb =~ /^(?:PUT|GET)/) { $type = ($type =~ /_LOCAL$/) ? "LOCAL" : "GLOBAL"; # filter by type to increase performance next if $filters{$type}; if ($opt_peer && /node = (\d+)/) { $type .= '@' . $1; } } elsif ($pgb =~ /^BARRIER/) { $type =~ s/^_//; next unless ($type =~ /^(?:NOTIFYWAIT|WAIT)/); # discard unknowns next if $filters{$type}; $thread = $nodes{$thread}; } elsif ($pgb =~ /^TI_ARRAY_COPY/) { my $desc; if (/(issued as non-blocking.*)$/) { $arraycopy_not_nb{$thread} = $1; next; } else { /TI_ARRAY_COPY: \(.*?\) \S+ (.*)$/; $desc = $1; $desc .= "|NOTE: " . $arraycopy_not_nb{$thread} if ($arraycopy_not_nb{$thread}); $arraycopy_not_nb{$thread} = undef; } #$desc =~ s/ copy(?:ing)?//g; $desc =~ s/ region//g; $desc =~ s/\(local <- local\)//g; $desc =~ s/contiguous/contig/g; $desc =~ s/direction/dir/g; $desc =~ s/scatter-gather AM-based copy/strided /g; $desc =~ s/\(put:.*?\)/put/g; $desc =~ s/\(get:.*?\)/get/g; $type = "LOCAL"; $type = "GLOBAL" if (m/remote/); next if $filters{$type}; $type .= "|$desc"; } if ($src =~ m/\[([^\]]+)\]/) { $src = $1; } elsif (!$sawmagic) { $src = "_STARTUP:0"; } # anything before the first magic is internal else { $src = "UNKNOWN:0"; } # a user operation with missing line number push @{$data{$pgb}{$src}{$type}{$thread}}, $sz; } } print STDERR "\b\b\bdone\n"; } # subroutine to canonicalize the msg size # e.g -> 14336->14K, 2516582->2.4M # args: the msg size to be canonicalized ######################## sub shorten { my ($msg_sz, $type) = @_; if ($type =~ /GET|PUT|TI_ARRAY_COPY|MEMORY/) { if ($msg_sz < 1024) { return sprintf("%.0f B", $msg_sz); } elsif ($msg_sz < 1024 * 1024) { return sprintf("%.2f K", $msg_sz / 1024.0); } elsif ($msg_sz < 1024 * 1024 * 1024) { return sprintf("%.2f M", $msg_sz / (1024.0 * 1024.0)); } elsif ($msg_sz < 1024 * 1024 * 1024 * 1024) { return sprintf("%.2f G", $msg_sz / (1024.0 * 1024.0 * 1024.0)); } else { return sprintf("%.2f T", $msg_sz / (1024.0 * 1024.0 * 1024.0 * 1024.0)); } } else { if ($msg_sz < 1000) { return sprintf("%.1f us", $msg_sz); } elsif ($msg_sz < 1000 * 1000) { return sprintf("%.1f ms", $msg_sz / 1000.0); } elsif ($msg_sz < 1000 * 1000 * 60) { return sprintf("%.1f s", $msg_sz / (1000.0 * 1000.0)); } else { return sprintf("%.1fmin", $msg_sz / (1000.0 * 1000.0 * 60.0)); } } } # subroutine to separate the source file name # and the line number # args: the source line to be separated ####################### sub src_line { my ($line) = @_; $line =~ /(.*):(\d+)$/; return ($1, $2); } # transfer the raw data structure into report -- a hash of arrays ####################### sub convert_report { print STDERR "Generating reports..\n"; foreach my $pgb (keys %data) { foreach my $line (keys %{$data{$pgb}}) { foreach my $type (keys %{$data{$pgb}{$line}}) { my ($max, $min, $avg, $total, $totalc); foreach my $thread (keys %{$data{$pgb}{$line}{$type}}) { # change the raw sizes to max, min, avg, total, totalc; @{$data{$pgb}{$line}{$type}{$thread}} = get_minmax(@{$data{$pgb}{$line}{$type}{$thread}}); # For Barrier $thread is actually the node number my ($tmax, $tmin, $tavg, $ttotal, $ttotalc) = @{$data{$pgb}{$line}{$type}{$thread}}; $max = $max > $tmax ? $max : $tmax; $min = ($min > $tmin || !$min) ? $tmin : $min; if ($pgb =~ /BARRIER/) { $total += $ttotal * $node_threads{$thread}; $totalc += $ttotalc * $node_threads{$thread}; } else { $total += $ttotal; $totalc += $ttotalc; } #print "pgb=$pgb line=$line type=$type thread=$thread ". # "node_threads{$thread}=".$node_threads{$thread}." total=$total totalc=$totalc\n"; } die "INTERNAL ERROR" unless $totalc; $avg = $total / $totalc; my @entry = ($line, $type, $max, $min, $avg, $total, $totalc); push @{$report{$pgb}}, \@entry; } } } if ($got_memreport) { foreach my $desc (@heapstat_keys) { my ($totsz,$totcnt) = ($heapstats{$desc}{"SZ"}, $heapstats{$desc}{"CNT"}); my $line = sprintf(' %35s %15s', $desc, shorten($totsz,"MEMORY")); $line .= sprintf(' in %6i objects', $totcnt) if ($totcnt); $heapstats_report .= "$line\n"; } $memtable =~ s/MEMORY_TABLE_SUMMARY/$heapstats_report/; } } # get an array of raw msg sizes, return an array of max, min, avg, total and totalc sub get_minmax { my @msgs = @_; my ($max, $min, $avg, $total, $totalc); $max = $msgs[0]; $min = $msgs[0]; foreach my $sz (@msgs) { if ($sz > $max) { $max = $sz; } if ($sz < $min) { $min = $sz; } $total += $sz; } $totalc = scalar @msgs; $avg = $total / $totalc; return ($max, $min, $avg, $total, $totalc); } # report_sorting criterion ####################### sub criterion { my @mtd = @_; my $result; my $sort_mtd = shift @mtd; # Breaking ties using the less important fields. while (!$result && $sort_mtd) { if ($sort_mtd eq "CALLS") { $result = ${$b}[6] <=> ${$a}[6];; } if ($sort_mtd eq "TOTAL") { $result = ${$b}[5] <=> ${$a}[5]; } if ($sort_mtd eq "AVG") { $result = ${$b}[4] <=> ${$a}[4]; } if ($sort_mtd eq "MIN") { $result = ${$b}[3] <=> ${$a}[3]; } if ($sort_mtd eq "MAX") { $result = ${$b}[2] <=> ${$a}[2]; } if ($sort_mtd eq "TYPE") { $result = (${$a}[1] cmp ${$b}[1]); } if ($sort_mtd eq "SRC") { my ($a_src, $a_line) = src_line${$a}[0]; my ($b_src, $b_line) = src_line${$b}[0]; $result = ($a_src cmp $b_src) || ($a_line <=> $b_line); } $sort_mtd = shift @mtd; } return $result; } # sorting the report ######################## sub sort_report { my @sortmtd = split /,/, $opt_sort; # Checking for valid input foreach my $mtd (@sortmtd) { $mtd =~ /^(CALLS|AVG|MAX|MIN|TOTAL|SRC|TYPE)$/ or die "Could not recognize $mtd\n"; } foreach my $pgb (keys %report) { if ($opt_sort) { @{$report{$pgb}} = sort {criterion(@sortmtd)} @{$report{$pgb}}; } else { @{$report{$pgb}} = sort {criterion("SRC")} @{$report{$pgb}}; } } } sub get_threads { my ($node) = @_; my @threads; foreach my $identifier (keys %nodes) { if ($nodes{$identifier} == $node) { push @threads, $threads{$identifier}; } } @threads = sort @threads; return $threads[0] . ".." . $threads[-1]; } # subroutine to process the data structure produced by the parse_tracefile # subroutine and print out in a format that the caller specifies. # args: -filehandler -- specifying where the output should go ######################## sub trace_output { my ($handle, $pgb) = @_; # Print out print "\n$pgb REPORT:\n"; if ($pgb eq "MEMORY") { print <format_name("MEMFULL"); } else { $source = substr $source, -25, 25; $handle->format_name("MEMDEFAULT"); } } else { if ($opt_full) { printf "%s\n", $source; $handle->format_name("FULL"); } else { $source = substr $source, -14, 14; $handle->format_name("DEFAULT"); } } if ($pgb =~ /BARRIER/) { # bug 762 - don't display any cross-thread barrier call total if # we're showing call totals for each thread, because it's confusing if ($opt_thread) { $calls = ""; } else { # and divide barrier call counts by thread count in non-thread # view to represent the number of global calls. This could result # in a fractional call count for non-single barriers, but that's # an uncommon case, and this way the sum of the global barrier call # count across source lines always represents the total number of global barriers $calls /= (scalar keys %nodes); } } my $oldtype = $type; $type =~ m/^(.*?)(\|.*)?$/; ($type, $extra) = ($1, $2); write($handle); $extra =~ s/^\|//; for my $line (split(/\|/,$extra)) { $extra = $line; $handle->format_name("EXTRA"); write($handle); } $type = $oldtype; if ($opt_thread) { foreach my $thread (sort keys %{$data{$pgb}{$src_num}{$type}}) { $threadlabel = "Thread"; if ($pgb =~ /PUT|GET|TI_ARRAY_COPY/) { $threadnum = $threads{$thread}; } elsif ($pgb =~ /MEMORY/) { $threadnum = $thread; $threadlabel = " Node"; } else { $threadnum = get_threads($thread); } ($tmax, $tmin, $tavg, $ttotal, $tcalls) = @{$data{$pgb}{$src_num}{$type}{$thread}}; $tmax = shorten($tmax, $pgb); $tmin = shorten($tmin, $pgb); $tavg = shorten($tavg, $pgb); $ttotal = shorten($ttotal, $pgb); $handle->format_name("THREAD"); write($handle); } } } if (!$got_one) { print "NONE\n"; } # formats ######################## #@<<<<<<<<<<<<< @>>>> @>>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>>@* format DEFAULT = @<<<<<<<<<<<<< @>>>> @>>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>> $source, $lnum, $type, $min, $max, $avg, $total, $calls . format FULL = @>>>> @>>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>> $lnum, $type, $min, $max, $avg, $total, $calls . format EXTRA = ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $extra . format THREAD = @<<<<< @<<<<<<<<<<<< @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>> $threadlabel, $threadnum, $tmin, $tmax, $tavg, $ttotal, $tcalls . format MEMDEFAULT = @<<<<<<<<<<<<<<<<<<<<<<<< @>>>> @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>> $source, $lnum, $min, $max, $avg, $total, $calls . format MEMFULL = @>>>> @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>>>>> @>>>>> $lnum, $min, $max, $avg, $total, $calls . } gasnet-2025.8.0/other/contrib/Makefile.am0000664000175000017500000000252115142313673020237 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/other/contrib/Makefile.am $ # Description: Makefile for GASNet other/contrib # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 SUBDIRS = . EXTRA_DIST = $(dotpl_DATA) \ gasnet_handler.h \ gasnetrun_mic \ gasnet_ibrun \ ident \ cross-configure-cray-xc-alps \ cross-configure-cray-xc-slurm \ cross-configure-intel-knc \ cross-configure-intel-knl # exclude from distribution for now # cross-configure-linux-arm \ # dotpldir = $(bindir) dotpl_DATA = gasnet_trace.pl bin_SCRIPTS = \ gasnet_trace \ ident all-local: $(bin_SCRIPTS) $(dotpl_DATA) $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart gasnet_trace: $(top_builddir)/other/perlstart # Files to copy from srcdir to builddir if they differ if BUILD_IS_SRC files_we_copy = else files_we_copy = $(dotpl_DATA) $(files_we_copy): force @srcfile="$(srcdir)/`basename $@`" ; \ if test ! -f "$@" -o "`find $$srcfile -newer '$@' 2>&1`" ; then \ echo cp -f "$$srcfile" . ; \ cp -f "$$srcfile" . ; \ fi endif DISTCLEANFILES = $(files_we_copy) .PHONY: force force: gasnet-2025.8.0/other/contrib/Makefile.in0000664000175000017500000006740315142313673020262 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/other/contrib/Makefile.am $ # Description: Makefile for GASNet other/contrib # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = other/contrib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = gasnet_trace CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dotpl_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gasnet_trace.in \ $(top_srcdir)/config-aux/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 SUBDIRS = . EXTRA_DIST = $(dotpl_DATA) \ gasnet_handler.h \ gasnetrun_mic \ gasnet_ibrun \ ident \ cross-configure-cray-xc-alps \ cross-configure-cray-xc-slurm \ cross-configure-intel-knc \ cross-configure-intel-knl # exclude from distribution for now # cross-configure-linux-arm \ # dotpldir = $(bindir) dotpl_DATA = gasnet_trace.pl bin_SCRIPTS = \ gasnet_trace \ ident @BUILD_IS_SRC_FALSE@files_we_copy = $(dotpl_DATA) # Files to copy from srcdir to builddir if they differ @BUILD_IS_SRC_TRUE@files_we_copy = DISTCLEANFILES = $(files_we_copy) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign other/contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign other/contrib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gasnet_trace: $(top_builddir)/config.status $(srcdir)/gasnet_trace.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) install-dotplDATA: $(dotpl_DATA) @$(NORMAL_INSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dotpldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dotpldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dotpldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dotpldir)" || exit $$?; \ done uninstall-dotplDATA: @$(NORMAL_UNINSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(dotpldir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) $(DATA) all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dotplDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-dotplDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am clean clean-generic cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-tags distdir \ dvi dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am \ install-dotplDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-dotplDATA .PRECIOUS: Makefile all-local: $(bin_SCRIPTS) $(dotpl_DATA) $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart gasnet_trace: $(top_builddir)/other/perlstart @BUILD_IS_SRC_FALSE@$(files_we_copy): force @BUILD_IS_SRC_FALSE@ @srcfile="$(srcdir)/`basename $@`" ; \ @BUILD_IS_SRC_FALSE@ if test ! -f "$@" -o "`find $$srcfile -newer '$@' 2>&1`" ; then \ @BUILD_IS_SRC_FALSE@ echo cp -f "$$srcfile" . ; \ @BUILD_IS_SRC_FALSE@ cp -f "$$srcfile" . ; \ @BUILD_IS_SRC_FALSE@ fi .PHONY: force force: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/other/README0000664000175000017500000000711515142313673015427 0ustar alastairalastairExternal Software README ------------------------ This subdirectory contains various external libraries and tools used by this GASNet implementation. ------------------------------------------------------------------ AMUDP The amudp directory contains a snapshot of AMUDP, a software layer written by Dan Bonachea that provides AM2 functionality over UDP. The authoritative version of AMUDP is located here: https://gasnet.lbl.gov/amudp If you make fixes or changes to the code in that directory, please email them to Dan Bonachea . ------------------------------------------------------------------ AMMPI The ammpi directory contains a snapshot of AMMPI, a software layer written by Dan Bonachea that provides AM2 functionality over MPI. The authoritative version of AMMPI is located here: https://gasnet.lbl.gov/ammpi If you make fixes or changes to the code in that directory, please email them to Dan Bonachea . ------------------------------------------------------------------ AMX The amx directory contains the test suite for the stand-alone AMUDP and AMMPI products, and some factored components. ------------------------------------------------------------------ CONTRIB Various extra add-on tools which are useful in conjunction with add-on tools. See individual files or subdirectories for licensing and contact information. ------------------------------------------------------------------ FIREHOSE The firehose directory contains an implementation of the firehose distributed page registration management algorithm described in: C. Bell and D. Bonachea. "A New DMA Registration Strategy for Pinning-Based High Performance Networks", Workshop on Communication Architecture for Clusters (CAC'03), 2003. For more information, contact Christian Bell or Dan Bonachea . ------------------------------------------------------------------ PLPA The plpa directory contains a modified subset of the source code to the Portable Linux Processor Affinity (PLPA) library. This software is used to implement the GASNet processor-pinning calls on Linux platforms. See plpa/README for an expanded description. The PLPA software is not a product of the GASNet development team. However, if in doubt whether a specific problem is a bug in PLPA or in the GASNet-specific modification or usage, please report the problem to the GASNet team (who will forward the bug report if appropriate). To file PLPA bug reports, for general information about PLPA, for mailing lists, or for the full unmodified source, please see http://www.open-mpi.org/software/plpa/ ------------------------------------------------------------------ MPI-SPAWNER The mpi-spawner directory contains an implementation of job-launch and GASNet communications bootstrapping using MPI. It is optionally used by several GASNet conduits for cluster-based systems. ------------------------------------------------------------------ SSH-SPAWNER The ssh-spawner directory contains an implementation of job-launch and GASNet communications bootstrapping using ssh. It is optionally used by several GASNet conduits for cluster-based systems. ------------------------------------------------------------------ PMI-SPAWNER The pmi-spawner directory contains an implementation of job-launch and GASNet communications bootstrapping using PMI. It is optionally used by several GASNet for cluster-based systems and on the HPE Cray EX platform. ------------------------------------------------------------------ gasnet-2025.8.0/other/hwloc/0000775000175000017500000000000015142313673015657 5ustar alastairalastairgasnet-2025.8.0/other/hwloc/gasnet_hwloc_internal.h0000664000175000017500000001272715142313673022412 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/hwloc/gasnet_hwloc_internal.h $ * Description: GASNet conduit-independent hwloc utilities internal header * Copyright 2021, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _GASNET_HWLOC_INTERNAL_H #define _GASNET_HWLOC_INTERNAL_H // Initialization of GASNet's hwloc subsystem. extern int gasneti_hwloc_init(void); // Finalization of GASNet's hwloc subsystem. extern int gasneti_hwloc_fini(void); // For a given keyname: // 1. Look for a hwloc object type in env var "[kename]_TYPE", or dflt_type if none. // 2. Find the current procs binding(s) for the given type // 3. Return the value of env var "[keyname]_[binding]", or of "[keyname]" if none extern const char *gasneti_getenv_hwloc_withdefault( const char *keyname, const char *dflt_val, const char *dflt_type, int enable_auto); // Score devices by distance from the calling processes. // // This function takes two arrays ("distances" and "names") of length "count". // The "names" array is an input, containing strings which can be O/S device // names known to hwloc, or PCI addresses of the form xxxx:yy:zz.t or yy:zz.t. // // The distances[] array is an output, which is populated on success with a // uint32_t values expressing the mean distance between the PUs in the cpuset // queried in `gasneti_hwloc_init()` process and the corresponding device. If // hwloc cannot map a given names[] element to a device, the corresponding // element of distances[] will be GASNETI_HWLOC_DISTANCE_UNKNOWN. Excluding // such entries, there are two cases for the "distance" elements: // IFF GASNETI_HWLOC_DISTANCES_NORMALIZE is set in flags // Nearest device(s) will be assigned a distance of 0. // Next-nearest device(s) will be assigned a distance of 1, etc. // Otherwise, raw uint32_t distances are produced. In this case // larger unsigned values correspond to further topological distance, // though the relationship may be non-linear. // // Returns a negative value if hwloc is not available, is too old (API 2.0+ is // required), has not been properly initialized, or any other condition which // would prevent determining the distance of valid names[] elements. // In such cases, the content of distances[] will be undefined. // On success, returns the number of names[] elements successfully processed. // Together these mean that (retval > 0) is sufficient to determine that there // is at least one "meaningful" value in distances[]. extern int gasneti_hwloc_distances( int count, uint32_t *distances, // OUT const char **names, // IN unsigned int flags); #define GASNETI_HWLOC_DISTANCE_UNKNOWN (~(uint32_t)0) enum { GASNETI_HWLOC_DISTANCES_NORMALIZE = (1 << 0), }; // Selects as many as 'max_results' devices for the conduit to use, with // load-balance over processes on the same host. // // This function takes two arrays ("use" and "names") of length "count". // The "names" array is an input, containing strings which can be O/S device // names known to hwloc, or PCI addresses of the form xxxx:yy:zz.t or yy:zz.t. // // On success (positive return value) the elements of `use[]` are set as follows // to indicate if the caller should use the device indicated by the // corresponding element in `names[]`: // + negative if hwloc could not locate the device. // + positive if the device was selected for use. // + zero if the corresponding device was located, but was not selected. // // The `max_results` argument indicates the number of devices which the caller // desires to use. This is an upper bound on the number of positive values in // `use[]`. // NOTE: ** The current implementation only supports `max_results==1` ** // // The `verbose` argument is a boolean to enable console messages with info // on the auto device selection, eg as determined by the caller from the value // of `GASNET_IBV_PORTS_VERBOSE` or equivalent for other conduits. // // The `barrierfn` is a (non-NULL) pointer to a function to perform a // global bootstrap barrier. // The `hostbcastfn` is a (non-NULL) pointer to a function to perform a // host-scoped bootstrap broadcast. // // Returns a negative value if hwloc is not available, is too old (API 2.0+ is // required), has not been properly initialized, or any other condition which // would prevent determining the topological distance of valid names[] elements. // In such cases, the content of use[] will be undefined. // On success, returns the number of non-zeros in use[]. This will never // exceed MIN('max_results, 'count'), and may be less if some of the `names[]` // could not be identified by hwloc. // Together these mean that (retval > 0) is sufficient to determine that there // is at least one positive value in use[]. // // TBD: may want the "auto*" string from GASNET_*_TYPE as an argument, under the // assumption it will be used to control behavior(s) of this function. // Alternatively, the conduit might do all the work parsing the optional part. // In which case, a `flags` argument might be needed to request behaviors. extern int gasneti_hwloc_auto_select( int max_results, int count, int *use, // OUT const char **names, // IN int verbose, gasneti_bootstrapBarrierfn_t barrierfn, gasneti_bootstrapBroadcastfn_t hostbcastfn); #endif // _GASNET_HWLOC_INTERNAL_H gasnet-2025.8.0/other/hwloc/gasnet_hwloc.c0000664000175000017500000013053515142313673020507 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/hwloc/gasnet_hwloc.c $ * Description: GASNet conduit-independent hwloc utilities * Copyright 2021, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include #include #include #include #include #include #include #include #if GASNETI_HAVE_HWLOC_LIB #include "hwloc.h" #ifndef HWLOC_API_VERSION #error hwloc.h did not define HWLOC_API_VERSION #endif #define USE_HWLOC_LIB 1 #undef USE_HWLOC_UTILS typedef hwloc_obj_type_t gasneti_hwloc_obj_type_t; typedef hwloc_cpuset_t gasneti_hwloc_cpuset_t; #if HWLOC_API_VERSION < 0x010100 // "cpuset" names used prior to 1.1.0 #define hwloc_bitmap_alloc hwloc_cpuset_alloc #define hwloc_bitmap_intersects hwloc_cpuset_intersects #define hwloc_bitmap_free hwloc_cpuset_free #endif GASNETI_IDENT(gasnetc_IdentString_Hwloc, "$GASNetHwloc: lib (API version " _STRINGIFY(HWLOC_API_VERSION) ") $"); #elif GASNETI_HAVE_HWLOC_UTILS #include #include #undef HWLOC_API_VERSION #define USE_HWLOC_UTILS 1 typedef const char *gasneti_hwloc_obj_type_t; typedef const char *gasneti_hwloc_cpuset_t; #define CLOSE_STDIN " = 0x020000 // since 2.0.0 return hwloc_type_sscanf(string, result, NULL, 0); #elif HWLOC_API_VERSION >= 0x010900 // since 1.9.0 return hwloc_obj_type_sscanf(string, result, NULL, NULL, 0); #else *result = hwloc_obj_type_of_string(string); return ((int)(*result) < 0) ? -1 : 0; #endif } // Convert 'typestring' to gasneti_hwloc_obj_type_t. // If invalid, falls back to 'dflt_type, with a warning. // Returns 0 on success, negative on error. // Result is in `*result'. static int get_selector_type( gasneti_hwloc_obj_type_t *result, const char *keyname, const char *typestring, const char *dflt_type) { int rc = string_to_obj_type(typestring, result); if (rc < 0) { gasneti_console_message("WARNING", "%s_TYPE = '%s' is invalid. Using default '%s' instead.", keyname, typestring, dflt_type); rc = string_to_obj_type(dflt_type, result); gasneti_assert_int(rc ,==, 0); } // Currently non-zero only if dflt_type is invalid return rc; } #endif // USE_HWLOC_LIB || USE_HWLOC_UTILS #if USE_HWLOC_UTILS // Wraps popen(cmd) and gasneti_getline() with appropriate error handling. // Returns the first line of output (stripped of trailing newline, if any) or NULL on error. // Caller should gasneti_free() the result. // If 'len_p' is non-NULL, receives line length on success (not written on failure). static char *run_hwloc_cmd(const char *cmd, size_t *len_p) { char *output = NULL; FILE *stream = popen(cmd, "r"); if (!stream) { // failed popen() // probably a failed fork(), pipe(), or malloc() (maybe should be fatal?) return NULL; } size_t n = 0; ssize_t line_len = gasneti_getline(&output, &n, stream); int status = pclose(stream); if (!WIFEXITED(status) || WEXITSTATUS(status) || (line_len < 0)) { // one or both of pclose() or getline() says that the command failed gasneti_free(output); return NULL; } // strip trailing newline, if any if (line_len && (output[line_len-1] == '\n')) { output[line_len-1] = '\0'; line_len -= 1; } if (len_p) *len_p = line_len; return output; } #endif // USE_HWLOC_UTILS // Look for any "_N"-suffixed env vars. // Returns gasneti_malloc'ed string with first matched variable name, if any. static char *check_suffixed(const char *prefix) { size_t prefix_len = strlen(prefix); char *keyname = gasneti_malloc(prefix_len + 3); // 3: '_' + digit + '\0' strncpy(keyname, prefix, prefix_len+1); keyname[prefix_len] = '_'; keyname[prefix_len+2] = '\0'; char *result = NULL; for (char c = '0'; c <= '9'; ++c) { keyname[prefix_len+1] = c; const char* match = gasneti_check_env_prefix(keyname); if (match) { const char* p = strchr(match, '='); result = gasneti_strndup(match, p - match); break; } } gasneti_free(keyname); return result; } // Simple (statically defined and not thread-safe) "set" // Used to sort and de-dup small integers typedef unsigned long suff_set_word_t; static struct { // NOTE: static ensure zero initialization unsigned int word_count; suff_set_word_t *words; } gasneti_hwloc_suffix_set; static void suff_set_insert(unsigned int n, unsigned int div, unsigned int mod) { if (div) n /= div; if (mod) n %= mod; const size_t word_size = sizeof(suff_set_word_t); const unsigned int bits_per_word = 8 * word_size; const unsigned int word_idx = n / bits_per_word; const unsigned int bit_idx = n % bits_per_word; if (word_idx >= gasneti_hwloc_suffix_set.word_count) { unsigned int old_count = gasneti_hwloc_suffix_set.word_count; unsigned int new_count = word_idx + 1; suff_set_word_t *ptr = gasneti_realloc(gasneti_hwloc_suffix_set.words, word_size * new_count); memset(ptr + old_count, 0, word_size * (new_count - old_count)); gasneti_hwloc_suffix_set.words = ptr; gasneti_hwloc_suffix_set.word_count = new_count; } gasneti_hwloc_suffix_set.words[word_idx] |= ((suff_set_word_t)1) << bit_idx; } static char *suff_set_to_string(void) { char *result = NULL; const unsigned int bits_per_word = 8 * sizeof(suff_set_word_t); unsigned int n = 0; const unsigned int word_count = gasneti_hwloc_suffix_set.word_count; for (unsigned int word_idx = 0; word_idx < word_count; ++word_idx) { suff_set_word_t word = gasneti_hwloc_suffix_set.words[word_idx]; suff_set_word_t mask = 1; for (unsigned int bit_idx = 0; bit_idx < bits_per_word; ++bit_idx, mask <<= 1, ++n) { if (word & mask) { result = gasneti_sappendf(result, "_%u", n); } } } return result; } static void suff_set_free(void) { gasneti_free(gasneti_hwloc_suffix_set.words); gasneti_hwloc_suffix_set.words = NULL; gasneti_hwloc_suffix_set.word_count = 0; } // Check for the given operator and its operand in a typestring. // Returns 0 if the operator was not found // Otherwise: // + returns the integer operand (which cannot be zero) // + replace *typestring_p with a string stripped of the operator, // operand and optional whitespace before the operator. // + does NOT free() the prior value of *typestring_p static int check_op(const char **typestring_p, const char operator, const char* keyname) { const char *typestring = *typestring_p; const char *p; int result = 0; if (NULL != (p = strchr(typestring, operator))) { char *endp = NULL; result = strtol(p+1, &endp, 0); if (result <= 0) { // NOTE: strtol() will return 0 if no digits were seen gasneti_fatalerror("Operator %c in value \"%s\" of environment variable " "%s_TYPE must be followed by a positive integer", operator, typestring, keyname); } while (isspace(*endp)) ++endp; // "be liberal in what you accept" if (*endp) { gasneti_fatalerror("Value \"%s\" of environment variable %s_TYPE has " "unexpected characters after operator %c and its operand", typestring, keyname, operator); } // Strip operator+operand and optional preceding whitespace gasneti_assert(*p == operator); while ((p>typestring) && isspace(*(p-1))) --p; size_t keep = p - typestring; *typestring_p = gasneti_strndup(typestring, keep); } return result; } // ------------------------------------------------------------------------------------ // // Initialization and finalization // int gasneti_hwloc_init(void) { if (gasneti_hwloc_is_init) return 0; int cpubind_process; const char *envval = gasneti_getenv_withdefault("GASNET_HWLOC_QUERY","thread"); if (! gasneti_strcasecmp(envval,"thread")) { cpubind_process = 0; } else if (! gasneti_strcasecmp(envval,"process")) { cpubind_process = 1; } else { gasneti_fatalerror("GASNET_HWLOC_QUERY='%s' is not recognized", envval); } int result = 0; // assume success gasneti_tick_t t1 = GASNETI_TICKS_NOW_IFENABLED(I); gasneti_tick_t t2; GASNETI_TRACE_PRINTF(I,("gasneti_hwloc_init() {")); GASNETI_TRACE_PRINTF(I,(" GASNET_HWLOC_QUERY = '%s'", envval)); #if USE_HWLOC_LIB GASNETI_TRACE_PRINTF(I,(" using libhwloc API version 0x%x", HWLOC_API_VERSION)); int rc = hwloc_topology_init(&gasneti_hwloc_topology); if (rc < 0) { // failed to initialize hwloc GASNETI_TRACE_PRINTF(I,(" failed: hwloc_topology_init() returned %d", rc)); goto fail_bad_topo; } // Enable "whole system" mode for uniform counting/naming #if HWLOC_API_VERSION >= 0x020100 // since 2.1.0 (void)hwloc_topology_set_flags(gasneti_hwloc_topology, HWLOC_TOPOLOGY_FLAG_INCLUDE_DISALLOWED); #else (void)hwloc_topology_set_flags(gasneti_hwloc_topology, HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM); #endif // Enable inclusion (not free) of PCI and O/S devices #if HWLOC_API_VERSION >= 0x00020000 hwloc_topology_set_type_filter(gasneti_hwloc_topology, HWLOC_OBJ_PCI_DEVICE, HWLOC_TYPE_FILTER_KEEP_ALL); hwloc_topology_set_type_filter(gasneti_hwloc_topology, HWLOC_OBJ_OS_DEVICE, HWLOC_TYPE_FILTER_KEEP_ALL); #else hwloc_topology_set_flags(gasneti_hwloc_topology, HWLOC_TOPOLOGY_FLAG_IO_DEVICES); #endif gasneti_hwloc_cpuset = hwloc_bitmap_alloc(); if (!gasneti_hwloc_cpuset) { GASNETI_TRACE_PRINTF(I,(" failed: hwloc_bitmap_alloc() returned NULL")); goto fail_bad_cpuset; } rc = hwloc_topology_load(gasneti_hwloc_topology); if (rc < 0) { GASNETI_TRACE_PRINTF(I,(" failed: hwloc_topology_load() returned %d", rc)); goto fail_bad_cpuset; } hwloc_cpubind_flags_t cpubind_flags = cpubind_process ? HWLOC_CPUBIND_PROCESS : HWLOC_CPUBIND_THREAD; rc = hwloc_get_cpubind(gasneti_hwloc_topology, gasneti_hwloc_cpuset, cpubind_flags); if (rc < 0) { GASNETI_TRACE_PRINTF(I,(" failed: hwloc_get_cpubind() returned %d", rc)); goto fail_bad_cpuset; } if (GASNETI_TRACE_ENABLED(I)) { size_t len = hwloc_bitmap_snprintf(NULL, 0, gasneti_hwloc_cpuset); char *buf = gasneti_malloc(len+1); hwloc_bitmap_snprintf(buf, len+1, gasneti_hwloc_cpuset); GASNETI_TRACE_PRINTF(I,(" cpuset: %s", buf)); gasneti_free(buf); } goto success; fail_bad_cpuset: hwloc_topology_destroy(gasneti_hwloc_topology); fail_bad_topo: result = 1; goto done; #elif USE_HWLOC_UTILS GASNETI_TRACE_PRINTF(I,(" using hwloc command-line utilities")); // Note: gasneti_hwloc_cpuset_t is "char *" when using utils const char *cmd; if (cpubind_process) { cmd = gasneti_dynsprintf(GASNETI_HWLOC_BIND_PATH " --pid %lu --get" CLOSE_STDIN, (unsigned long)getpid()); } else { cmd = GASNETI_HWLOC_BIND_PATH " --get" CLOSE_STDIN; } gasneti_hwloc_cpuset = run_hwloc_cmd(cmd, NULL); // It is sufficient here to validate that we have a hexadecimal value. // `hwloc-calc` will perform stronger validation when we pass this as argument. if (!gasneti_hwloc_cpuset || gasneti_hwloc_cpuset[0] != '0' || gasneti_hwloc_cpuset[1] != 'x' || !isxdigit(gasneti_hwloc_cpuset[2])) { // failed to query cpu binding from hwloc GASNETI_TRACE_PRINTF(I,(" failed to query 'hwloc-bind --get' for cpuset")); goto fail_bad_cpuset; } GASNETI_TRACE_PRINTF(I,(" cpuset: %s", gasneti_hwloc_cpuset)); goto success; fail_bad_cpuset: gasneti_free((void *)gasneti_hwloc_cpuset); result = 1; goto done; #endif success: gasneti_assert(result == 0); // success gasneti_hwloc_is_init = 1; // fall through done: t2 = GASNETI_TICKS_NOW_IFENABLED(I); GASNETI_TRACE_PRINTF(I,(" initialized in %.3fus", gasneti_ticks_to_ns(t2-t1)/1000.0)); GASNETI_TRACE_PRINTF(I,("}")); return result; } int gasneti_hwloc_fini(void) { if (!gasneti_hwloc_is_init) return 0; #if USE_HWLOC_LIB if (gasneti_hwloc_cpuset) hwloc_bitmap_free(gasneti_hwloc_cpuset); hwloc_topology_destroy(gasneti_hwloc_topology); #elif USE_HWLOC_UTILS gasneti_free((void *)gasneti_hwloc_cpuset); #endif gasneti_hwloc_is_init = 0; return 0; } // ------------------------------------------------------------------------------------ // gasneti_getenv_hwloc_withdefault() // // In the steps below "return the value of keyname from the environment" means: // Return getenv(keyname) if non-NULL, otherwise return // gasneti_getenv_withdefault(keyname, dflt_val). // In either case the value is traced as if obtained by the latter. // This gives precedence to the local environment (see bug 4303). // // 1. Check for env var "[keyname]_TYPE" equal to "None" or prefixed with "Auto" (case insensitive). // If "None", return the value of keyname from the environment. // If starts with "Auto" then // if "enable_auto" is non-zero, return the entire value to caller // else continue and the "dflt_type" will be used instead (with a warning) // 2. Check for suffixed env vars. // If none, return the value of keyname from the environment. // 3. Strip any '/' or '%' suffixes to be applied in later steps // 4. Check for env var "[keyname]_TYPE" equal to "{J,H,N}Rank" (case insensitive). // If YES, return the associated suffixed env var (if any) or the value of keyname from the environment. // With hwloc support: // 5. Look for a hwloc object type in env var "[keyname]_TYPE", or dflt_type if none. // 6. Find the intersection of this proc's cpu binding with options of the given type. // 7. Return the value of env var "[keyname]_[binding]", if any, // otherwise return the value of keyname from the environment // Without hwloc support: // 8. If we get this far, warn at most once about lack of hwloc support // 9. Return the value of keyname from the environment. // // Detected hwloc errors result in a warning (at most once per "step") // and use of the unsuffixed variable. const char *gasneti_getenv_hwloc_withdefault(const char *keyname, const char *dflt_val, const char *dflt_type, int enable_auto) { #if USE_HWLOC_LIB || USE_HWLOC_UTILS // Define these early to avoid harmlss goto-bypasses-initialization warnings gasneti_hwloc_obj_type_t type = (gasneti_hwloc_obj_type_t)0; #endif const char *suffix = NULL; const char *result = NULL; // Step 1 - check env var "[keyname]_TYPE" for special cases: // + "None" (which disables all additional intelligence) // + "Auto" prefix (which will return the typestring to the caller) char *typekey = gasneti_sappendf(NULL, "%s_TYPE", keyname); const char *typestring = gasneti_getenv_withdefault(typekey, dflt_type); const char *orig_typestring = typestring; gasneti_free(typekey); if (typestring) { if (! gasneti_strcasecmp("none", typestring)) { // short-cut w/o using hwloc if TYPE is "none" goto out_return_unsuffixed; } if (! gasneti_strncasecmp("auto", typestring, 4) && enable_auto) { // inform caller that an "auto" mode has been requested return typestring; } } // Step 2 - check for suffixed vars char *firstkey = check_suffixed(keyname); if (! firstkey) { // short-cut w/o using hwloc if there are no suffixed variables goto out_return_unsuffixed; } // Step 3 - strip off any "%" or "/" expressions unsigned int div = check_op(&typestring, '/', keyname); unsigned int mod = check_op(&typestring, '%', keyname); if (div && mod) { gasneti_fatalerror("Value \"%s\" of environment variable %s_TYPE includes " "multiple arithmetic operations (at most one is allowed)", orig_typestring, keyname); } // Step 4 - check env var "[keyname]_TYPE" for "?Rank" (which doesn't need hwloc) if (typestring && typestring[0]) { gex_Rank_t n = GEX_RANK_INVALID; int match = !gasneti_strcasecmp("rank", typestring+1); // Note +1 offset into the string if (match) { switch (tolower(typestring[0])) { case 'j': // 'J'obrank n = gasneti_mynode; break; case 'h': // 'H'ost-relative rank n = gasneti_myhost.node_rank; break; case 'n': // 'N'brhd-relative rank n = gasneti_mysupernode.node_rank; break; default: match = 0; } if (match && (n == GEX_RANK_INVALID)) { gasneti_fatalerror("%s value uninitialized in gasneti_getenv_hwloc_withdefault()", typestring); } } if (match) { if (div) n /= div; if (mod) n %= mod; suffix = gasneti_sappendf(NULL, "_%d", n); goto try_suffix; } } #if USE_HWLOC_LIB || USE_HWLOC_UTILS // The "real thing" via EITHER libhwloc OR hwloc-{bind,calc} // Step 5 - hwloc object type // Note non-zero return indicates invalid dflt_type, not a user error gasneti_assert_zeroret( get_selector_type(&type, keyname, typestring, dflt_type) ); // Step 6 - compute intersection between 'cpuset' and object(s) of 'type' if (! gasneti_hwloc_is_init) { goto out_bad_hwloc; } #if USE_HWLOC_LIB { int count = hwloc_get_nbobjs_by_type(gasneti_hwloc_topology, type); if (count <= 0) { // EITHER there are no objects of the given type // OR type occurs at multiple levels (not a type suited to our purposes) goto out_bad_intersect; } for (int i = 0; i < count; ++i) { hwloc_obj_t obj = hwloc_get_obj_by_type(gasneti_hwloc_topology, type, i); gasneti_assert(obj); if (hwloc_bitmap_intersects(gasneti_hwloc_cpuset, obj->cpuset)) { suff_set_insert(i, div, mod); } } suffix = suff_set_to_string(); } #else { size_t len = 0; char *cmd = gasneti_sappendf(NULL, GASNETI_HWLOC_CALC_PATH " --intersect %s %s" CLOSE_STDIN, type, gasneti_hwloc_cpuset); char *buf = run_hwloc_cmd(cmd, &len); gasneti_free(cmd); if (!buf || !buf[0]) { // failed to compute the intersection gasneti_free(buf); goto out_bad_intersect; } gasneti_assert_uint(strlen(buf) ,==, len); for (int i = 0; i < len; ) { char c = buf[i]; if (c == ',') { ++i; } else if (isdigit(c)) { suff_set_insert(atoi(buf+i), div, mod); i += strspn(buf+i,"0123456789"); } else { // invalid character (such as in an error message?) gasneti_free(buf); goto out_bad_intersect; } } suffix = suff_set_to_string(); gasneti_free(buf); } #endif // Step 7 - query the environment with suffix goto try_suffix; out_bad_hwloc: { static int did_hwloc_warning = 0; if (!did_hwloc_warning) { gasneti_console_message("WARNING", "Failed to query hwloc for cpuset (binding) while processing environment variable '%s'. " "You may set '%s_TYPE=none' to disable checks for suffixed variants of this variable. " "Suppressing additional warnings, if any, for this error with additional variables.", keyname, keyname); did_hwloc_warning = 1; } goto out; } out_bad_intersect: { static int did_intersect_warning = 0; if (!did_intersect_warning) { gasneti_console_message("WARNING", "Failed to query hwloc for objects of type '%s' while processing environment variable '%s'. " "You may set '%s_TYPE=none' to disable checks for suffixed variants of this variable. " "Suppressing additional warnings, if any, for this error with additional variables.", typestring, keyname, keyname); did_intersect_warning = 1; } goto out; } #else // !(USE_HWLOC_LIB || USE_HWLOC_UTILS) // Fallback when hwloc is unavailable // Step 8. Warn at most once about presence of suffixed keys static int did_warn = 0; if (!did_warn) { gasneti_console_message("WARNING", "Ignoring environment variable '%s' (and maybe more) due to lack of hwloc support. " "You may set '%s_TYPE=none' to disable checks for suffixed variants of '%s'", firstkey, keyname, keyname); did_warn = 1; } gasneti_free(firstkey); // Step 9. Return the only thing we can goto out_return_unsuffixed; #endif try_suffix: if (suffix && suffix[0]) { char *fullkey = gasneti_sappendf(NULL, "%s%s", keyname, suffix); GASNETI_TRACE_PRINTF(I,("Query environment variable '%s' for type='%s'", fullkey, orig_typestring)); result = gasneti_getenv(fullkey); if (result) { gasnett_envstr_display(fullkey, result, 0); } gasneti_free(fullkey); } gasneti_free((void *) suffix); // discarding const qualifier to avoid warning out: if (typestring != orig_typestring) gasneti_free((void*)typestring); suff_set_free(); gasneti_free(firstkey); #if USE_HWLOC_UTILS // casts below discard const qualifiers to avoid warnings gasneti_free((void *)type); #endif // Return the suffixed variable's value if any, else use unsuffixed if (result) return result; out_return_unsuffixed: // Return the unsuffixed "keyname" value from the environment. // Here we give precedence to the local environment (bug 4303). // TODO: hoist this logic (or similar) for general use { char *local_envval = getenv(keyname); if (local_envval) { gasneti_envstr_display(keyname, local_envval, 0); return local_envval; } } return gasneti_getenv_withdefault(keyname, dflt_val); } #if USE_HWLOC_LIB && (HWLOC_API_VERSION >= 0x020000) // Helpers for pu_distance static int _gasneti_have_numa_latency = 0; static struct hwloc_distances_s *_gasneti_numa_latency; static struct hwloc_distances_s *gasneti_get_numa_latencies(void) { if (!_gasneti_have_numa_latency) { unsigned int nr = 1; #if HWLOC_API_VERSION >= 0x00020100 int rc = hwloc_distances_get_by_name(gasneti_hwloc_topology, "NUMALatency", &nr, &_gasneti_numa_latency, 0); #else unsigned long kind = HWLOC_DISTANCES_KIND_FROM_OS | HWLOC_DISTANCES_KIND_MEANS_LATENCY; int rc = hwloc_distances_get(gasneti_hwloc_topology, &nr, &_gasneti_numa_latency, kind, 0); #endif if ((rc < 0) || !nr) _gasneti_numa_latency = NULL; _gasneti_have_numa_latency = 1; } return _gasneti_numa_latency; } static void gasneti_release_numa_latencies(void) { if (_gasneti_numa_latency) { hwloc_distances_release(gasneti_hwloc_topology, _gasneti_numa_latency); } _gasneti_numa_latency = NULL; _gasneti_have_numa_latency = 0; } // Helper for gasneti_hwloc_distances() // // The return from this function is an unsigned 32-bit metric representing the // "distance" from a given PU (named by its physical/OS id) to the given 'obj'. // // The 'obj' argument is an hwloc object of "normal" or "io" type. // // Current metric: // + The upper eight bits are the number of levels one must traverse upward in // the hwloc hierarchy, starting at the PU, to reach a level which "contains" // the given device. Depending on the node architecture, we've seen instances // as near as L3 Cache and as distant as Machine. // + The lowest eight bits are the minimum of the distances taken from the hwloc // "NUMALatency" table between the NUMA nodeset of the PU and that of the // device connection point. // // TODO: // + While hwloc reports the OS-provided PCI "linkspeed" for devices, we do // not currently take this information in to account. // Use of this information might break ties between devices connected at // the same level, but via distinct PCI bus/bridge paths. // static uint32_t pu_distance(unsigned int pu_id, hwloc_obj_t obj) { // "io" objects don't have a cpuset or nodeset, so map to a "normal" one above them if (hwloc_obj_type_is_io(obj->type)) { obj = hwloc_get_non_io_ancestor_obj(gasneti_hwloc_topology, obj); } // Find depth of the nearest common object relative to the PUs unsigned int rel_depth = hwloc_get_type_depth(gasneti_hwloc_topology, HWLOC_OBJ_CORE) - obj->depth; hwloc_obj_t common = obj; while (common) { if (hwloc_bitmap_isset(common->cpuset, pu_id)) break; ++rel_depth; common = common->parent; } uint32_t distance = rel_depth << 24; hwloc_obj_t pu = hwloc_get_pu_obj_by_os_index(gasneti_hwloc_topology, pu_id); if (! hwloc_bitmap_isincluded(pu->nodeset, obj->nodeset)) { // PU's NUMA nodeset is not contained in that of the device connection // point. To avoid ties between cases in which the nodesets of devices are // not equidistant, this logic adds a NUMA latency component to the // distance. // // Why "isincluded" instead of "intersects"? // Skipping the NUMA latency scoring when the PU and device connection point // have intersecting nodesets could lead to omitting this metric when, for // instance, the only intersection is HBM. Since we assume transfers // to/from DRAM (or caches) are the important metric, such omission would // reduce the usefulness of the distance metric. // // Why use *minimum* latency between NUMA nodes of the PU and device? // Alternatives such as maximum, mean or median could "mix" things like HBM // in addition to DRAM. If, for instance, only a subset of sockets have // HBM, then their max/mean/median distance could appear greater than the // others even if there are no other differences (where in this example we // are assuming that high bandwidth comes at the expense of higher latency). // TODO: can we take a mean over "fast" memories, perhaps via obj->subtype? struct hwloc_distances_s *numa_latencies = gasneti_get_numa_latencies(); if (numa_latencies) { // Distance values in SLIT table are 1-byte (0..255) // 0-9 reserved // 10 self (diagonal) // 11-254 latency metric (off-diagonal) // 255 unreachable unsigned int min_distance = 256; unsigned int i, j; hwloc_bitmap_foreach_begin(i, pu->nodeset) { hwloc_obj_t nnode1 = hwloc_get_numanode_obj_by_os_index(gasneti_hwloc_topology, i); hwloc_bitmap_foreach_begin(j, obj->nodeset) { hwloc_obj_t nnode2 = hwloc_get_numanode_obj_by_os_index(gasneti_hwloc_topology, j); if (nnode1 == nnode2) continue; // self uint64_t fwd, bwd; int rc = hwloc_distances_obj_pair_values(numa_latencies, nnode1, nnode2, &fwd, &bwd); if (rc || fwd == 255 || bwd == 255) continue; // Invalid or unreachable unsigned int dist = (fwd + bwd) / 2; // mean, in case asymmetric min_distance = MIN(min_distance, dist); } hwloc_bitmap_foreach_end(); } hwloc_bitmap_foreach_end(); if (min_distance != 256) { distance += min_distance; } } } GASNETI_TRACE_PRINTF(I,(" PU L#%u is in cpuset of %s L#%d, %d levels away, NUMALatency %d", pu->logical_index, hwloc_obj_type_string(common->type), common->logical_index, rel_depth, distance & 0xff)); gasneti_assert( distance ); // logic elsewhere assumes non-zero return distance; } // Helper for gasneti_hwloc_distances() // // The return from this function is the mean over pu_distance() // for every PU in the process cpuset. // NOTE: making *one* pu_distance() call for the "process is INSIDE cpuset" // case (see trace logic below) did not prove to be an important optimization. static uint32_t proc_distance(hwloc_obj_t dev) { hwloc_obj_t obj = hwloc_get_non_io_ancestor_obj(gasneti_hwloc_topology, dev); if (GASNETI_TRACE_ENABLED(I)) { GASNETI_TRACE_PRINTF(I,(" %s L#%d, connected at %s L#%d", hwloc_obj_type_string(dev->type), dev->logical_index, hwloc_obj_type_string(obj->type), obj->logical_index)); if (hwloc_bitmap_isincluded(gasneti_hwloc_cpuset, obj->cpuset)) { GASNETI_TRACE_PRINTF(I,(" process is INSIDE cpuset of %s L#%d", hwloc_obj_type_string(obj->type), obj->logical_index)); } else { GASNETI_TRACE_PRINTF(I,(" process %s cpuset of %s L#%d", (hwloc_bitmap_intersects(gasneti_hwloc_cpuset, obj->cpuset) ? "INTERSECTS" : "is OUTSIDE"), hwloc_obj_type_string(obj->type), obj->logical_index)); } } // Take the mean over all PUs in proc cpuset uint32_t distance = 0; uint64_t sum = 0; unsigned int pu_id; hwloc_bitmap_foreach_begin(pu_id, gasneti_hwloc_cpuset) { sum += pu_distance(pu_id, obj); } hwloc_bitmap_foreach_end(); distance = sum / hwloc_bitmap_weight(gasneti_hwloc_cpuset); GASNETI_TRACE_PRINTF(I,(" distance 0x%08x", (unsigned int)distance)); return distance; } #endif // USE_HWLOC_LIB && (HWLOC_API_VERSION >= 0x020000) int gasneti_hwloc_distances(int count, uint32_t *distances, const char **names, unsigned int flags) { #if USE_HWLOC_LIB && (HWLOC_API_VERSION >= 0x020000) if (! gasneti_hwloc_is_init) return -1; uint32_t *raw = (flags & GASNETI_HWLOC_DISTANCES_NORMALIZE) ? gasneti_malloc(count * sizeof(uint32_t)) // temporary : distances; // in-place int retval = 0; for (int i = 0; i < count; ++i) { const char *name = names[i]; GASNETI_TRACE_PRINTF(I,("gasneti_hwloc_distances(%s): {", name)); // Try as a PCI ID string, and then as an OS device name hwloc_obj_t obj = hwloc_get_pcidev_by_busidstring(gasneti_hwloc_topology, name); if (!obj) { while (NULL != (obj = hwloc_get_next_osdev(gasneti_hwloc_topology, obj))) { if (strcmp(name,obj->name)) continue; break; } } if (obj) { raw[i] = proc_distance(obj); ++retval; } else { raw[i] = GASNETI_HWLOC_DISTANCE_UNKNOWN; GASNETI_TRACE_PRINTF(I,(" not found")); } GASNETI_TRACE_PRINTF(I,("}")); } gasneti_release_numa_latencies(); // Optionally normalize raw distance values to yield 0-based ones if (flags & GASNETI_HWLOC_DISTANCES_NORMALIZE) { for (int i = 0; i < count; ++i) { distances[i] = GASNETI_HWLOC_DISTANCE_UNKNOWN; } int remain = retval; // number of devices hwloc could find for (int norm_dist = 0; remain; ++norm_dist) { // Find lowest raw distance among unnormalized devices uint32_t best = GASNETI_HWLOC_DISTANCE_UNKNOWN; for (int i = 0; i < count; ++i) { if (distances[i] == GASNETI_HWLOC_DISTANCE_UNKNOWN) { best = MIN(best, raw[i]); } } if (best == GASNETI_HWLOC_DISTANCE_UNKNOWN) break; // Score the devices(s) with the current best distance for (int i = 0; i < count; ++i) { if (raw[i] == best) { distances[i] = norm_dist; remain--; } } gasneti_assert_always(remain >= 0); // else infinite loop! } gasneti_free(raw); } gasneti_assert_int(retval ,>=, 0); return retval; #else GASNETI_TRACE_PRINTF(I,("gasneti_hwloc_distances(0x%x) failure: libhwloc 2.0+ required", flags)); return -1; #endif } // ------------------------------------------------------------------------------------ // // Automatic device selection // // Array of unique device names, where indices are used in place of names // to identify devices. // NOTE: anticipated number of devices per host isn't large enough to warrant // use of a more-complex data structure. static const char **dev_names = NULL; static int dev_name_count = 0; // Adds a name to the array if not already present. // Returns the array index for the name, regardless of whether new or not. static int dev_name_to_idx(const char *name) { int i; for (i = 0; i < dev_name_count; ++i) { if (! strcmp(name, dev_names[i])) return i; } gasneti_assert(i == dev_name_count); dev_names = gasneti_realloc(dev_names, ++dev_name_count * sizeof(const char *)); dev_names[i] = gasneti_strdup(name); return i; } struct dev_table_row { int row_len; int assigned; struct dev_table_tuple { int dev_idx; int use; } *tuples; }; // Write out file w/ this proc's list on "nearest" of devices. // File format is a series of newline-terminated lines: // + First line is device count as base-10 integer (as "%d") // + Remainder are device (string) as "%s" // This allows device names to contain anything but \0 and \n. static void auto_dev_write_inputs(FILE *fp, int count, const char **names, uint32_t *distances) { int row_len = 0; for (int i = 0; i < count; ++i) { if (! distances[i]) ++row_len; } if (fprintf(fp, "%d\n", row_len) < 0) goto error; for (int i = 0; i < count; ++i) { if (distances[i]) continue; // skip - not near if (fprintf(fp, "%s\n", names[i]) < 0) goto error; } fflush(fp); return; error: gasneti_fatalerror("bad file write in automatic device selection"); } // Read file generated by auto_dev_write_inputs() static void auto_dev_read_inputs(FILE *fp, struct dev_table_row *row) { int row_len; if (fscanf(fp, " %d ", &row_len) < 0) goto error; row->row_len = row_len; row->tuples = gasneti_calloc(row_len, sizeof(struct dev_table_tuple)); struct dev_table_tuple *p = &row->tuples[0]; size_t buflen = 0; char *buf = NULL; for (int i = 0; i < row_len; ++i, ++p) { size_t line_len = gasneti_getline(&buf, &buflen, fp); if (line_len < 1) goto error; // replace \n with \0 gasneti_assert(buf[line_len - 1] == '\n'); buf[line_len-1] = 0; // convert to index of name in table of unique names p->dev_idx = dev_name_to_idx(buf); } gasneti_free(buf); return; error: gasneti_fatalerror("bad file read in automatic device selection"); } // lead process writes one row of the solution static void auto_dev_write_ouput(FILE *fp, struct dev_table_row *row) { const int row_len = row->row_len; struct dev_table_tuple *p = &row->tuples[0]; char *soln_string = gasneti_malloc((row_len + 1) * sizeof(char)); for (int i = 0; i < row_len; ++i, ++p) { soln_string[i] = p->use ? '1' : '0'; } soln_string[row_len] = '\0'; if (fprintf(fp, "%s", soln_string) < 0) goto error; // NOTE: skip fflush(fp) since caller will fclose(fp) gasneti_free(soln_string); return; error: gasneti_fatalerror("bad file write in automatic device selection"); } // A "set-contains" operation (helper for auto_dev_best_row) // // Return 1 if the given dev_idx appears in the passed row static int auto_dev_in_row(const struct dev_table_row *row, int dev_idx) { for (int i = 0; i < row->row_len; ++i) { if (row->tuples[i].dev_idx == dev_idx) return 1; } return 0; } // Compute one element of the solution (helper for auto_dev_solve) // // Returns the host-local rank (row index) of the "best" row for the given // device index. Here, "best" is defined as the row with the lowest `row_idx` // among those which include `dev_idx` among their `tuples[].dev_idx`, but // excluding those which are already marked as `assigned`. // Will return impossible `nproc` if no rows satisfy the constraints above. static int auto_dev_best_row(int nprocs, const struct dev_table_row *dev_table, int dev_idx) { int best_len = dev_name_count + 1; // impossibly large row_len int best_row = nprocs; // impossibly large host-local rank (row index) for (int i = 0; i < nprocs; ++i) { const struct dev_table_row *row = &dev_table[i]; if (row->assigned) continue; // this proc has already been assigned s device if (! auto_dev_in_row(row, dev_idx)) continue; // device is not near this proc if (row->row_len < best_len) { // MIN(row_len) == most constrained proc best_len = row->row_len; best_row = i; } } return best_row; } // compute the solution for automatic device selection // For every row in dev_table, sets `use` in up to `max_result` tuples. // TODO: support max_results != 1 static void auto_dev_solve(int max_results, gex_Rank_t nprocs, struct dev_table_row *dev_table) { gasneti_assert_int(max_results ,==, 1); // This algorithm is device-centric. // The devices take turns, round-robin, picking one process which will use // that device (if any remain). Each pick is a process which has identified // the corresponding device as near, but does not yet have an assigned device. // Among such processes, each pick will select one with the fewest devices // identified as near. const int num_devs = dev_name_count; int remain = nprocs; // number of unassigned procs for (int curr_dev = 0; remain; curr_dev = ((curr_dev + 1) % num_devs)) { int pick = auto_dev_best_row(nprocs, dev_table, curr_dev); if (pick == nprocs) continue; // no unassigned procs near this device struct dev_table_row *row = &dev_table[pick]; row->assigned = 1; for (int i = 0; i < dev_table[pick].row_len; ++i) { if (row->tuples[i].dev_idx == curr_dev) { row->tuples[i].use = 1; break; } } remain -= 1; } } // TODO: error returns in place of some fatal errors? // TODO: mode that favors use of all NICs even if one or more is not // "nearest" to any process? int gasneti_hwloc_auto_select( int max_results, int count, int *use, // OUT const char **devices, // IN int verbose, gasneti_bootstrapBarrierfn_t barrierfn, gasneti_bootstrapBroadcastfn_t hostbcastfn) { uint32_t *distances = gasneti_malloc(count * sizeof(uint32_t)); if (count == 1) { // Don't even need to initialize hwloc when there is exactly one dev locally. distances[0] = 0; } else { int rc = gasneti_hwloc_distances(count, distances, devices, GASNETI_HWLOC_DISTANCES_NORMALIZE); if (rc <= 0) { gasneti_free(distances); return rc; } } // TODO: when gasneti_myhost.node_count == 1, could skip the mkstemp() and // corresponding unlink() and possibly more. However, every process must // still enter each of the bootstrap collectives. gex_Rank_t leader = gasneti_myhost.nodes[0]; gex_Rank_t nprocs = gasneti_myhost.node_count; gex_Rank_t myproc = gasneti_myhost.node_rank; int i_am_lead = !myproc; FILE **files = NULL; // non-NULL only for lead process FILE *my_file = NULL; // Lead process generates a unique temporary file and one for each non-zero // host-local-rank. Host-scoped broadcast of the unique portion of the first // file is sufficient to name all of the others. // Post-bcast fopen() calls validate the assumption of a single-valued tmpdir. const char *tmpdir = gasneti_tmpdir(); if (!tmpdir && !tmpdir[0]) { gasneti_fatalerror("automatic device selection requires valid $GASNET_TMPDIR, $TMPDIR or /tmp"); } char *prefix = gasneti_sappendf(NULL, "%s/GEXtmpXXXXXX", tmpdir); if (i_am_lead) { int fd = mkstemp(prefix); if (fd < 0) { gasneti_fatalerror("mkstemp() failed in automatic device selection"); } close(fd); files = gasneti_malloc(nprocs * sizeof(FILE *)); const int flags = O_RDWR | O_CREAT | O_EXCL; const int mode = 0600; for (gex_Rank_t r = 1; r < nprocs; ++r) { const char *filename = gasneti_dynsprintf("%s%d", prefix, r); int tmp = open(filename, flags, mode); if (tmp < 0) { gasneti_fatalerror("open(O_CREAT) failed in automatic device selection"); } FILE *file = fdopen(tmp, "r+"); if (!file) { gasneti_fatalerror("fdopen() failed in automatic device selection"); } files[r] = file; } } { char *unique = prefix + strlen(prefix) - 6; hostbcastfn(unique, 6, unique, leader); } // Non-lead procs open and unlink their respective temporary files, where this // order ensures that the only possible file leaks are of *empty* files. // Next, the (device,distance) pairs are written to the temporary files. // A barrier after the writes lets the lead know when it can read the files. // This is effectively the first half of a host-scoped GatherV. if (! i_am_lead) { const char *filename = gasneti_dynsprintf("%s%d", prefix, myproc); my_file = fopen(filename, "r+"); if (!my_file) { gasneti_fatalerror("open() failed in automatic device selection"); } (void)unlink(filename); auto_dev_write_inputs(my_file, count, devices, distances); } barrierfn(); // Lead process now: // + Unlinks the original file (from mkstemp()), since there is no further // need for uniqueness (with all other files written and unlinked). // + Reads the per-proc temporary files to builds a table of all // (device,distance) tuples the temporary files. As part of this step, each // device name is converted to a zero-based integer index into a table of // all of the device names (effectively the second half of a host-scoped // GatherV) // + Some "magic happens" to perform device assignment // + Writes assignments for non-leads are to their respective temp files // (effectively a host-scoped Scatter) struct dev_table_row *dev_table = NULL; // used only in leads if (i_am_lead) { (void)unlink(prefix); // no longer needed to ensure uniqueness dev_table = gasneti_calloc(nprocs, sizeof(struct dev_table_row)); // Fill own row from local variables, skipping devices "UNKNOWN" to hwloc int row_len = 0; for (int i = 0; i < count; ++i) { if (! distances[i]) ++row_len; } dev_table[0].row_len = row_len; dev_table[0].tuples = gasneti_calloc(row_len, sizeof(struct dev_table_tuple)); for (int i = 0; i < row_len; ++i) { if (distances[i]) continue; // skip - not near dev_table[0].tuples[i].dev_idx = dev_name_to_idx(devices[i]); } // Read other rows from the temporary files for (gex_Rank_t rank = 1; rank < nprocs; ++rank) { auto_dev_read_inputs(files[rank], &dev_table[rank]); } // perform device assignment auto_dev_solve(max_results, nprocs, dev_table); // Write assignments for non-leads are to their respective temp files for (gex_Rank_t rank = 1; rank < nprocs; ++rank) { auto_dev_write_ouput(files[rank], &dev_table[rank]); fclose(files[rank]); // is also a fflush() } } barrierfn(); // Leads construct their solution from dev_table // Non-leads read their solution from temp files for (int i = 0, j = 0; i < count; ++i) { if (! distances[i]) { // nearest if (i_am_lead) { use[i] = dev_table[0].tuples[j++].use; } else { // TODO: auto_dev_read_ouput() abstraction? int c = fgetc(my_file); if_pf (c == EOF) { gasneti_fatalerror("bad file read in automatic device selection"); } use[i] = (c == '1') ? 1 : 0; } } else if (distances[i] == GASNETI_HWLOC_DISTANCE_UNKNOWN) { use[i] = -1; // hwloc did not locate } else if (distances[i]) { use[i] = 0; // not nearest } } // cleanups: gasneti_free(prefix); if (i_am_lead) { gasneti_free(files); for (gex_Rank_t rank = 0; rank < nprocs; ++rank) { gasneti_free(dev_table[rank].tuples); } gasneti_free(dev_table); for (int i = 0; i < dev_name_count; ++i) { gasneti_free((void*)dev_names[i]); } gasneti_free(dev_names); } else { fclose(my_file); } if (verbose) { // TODO: a "display name" argument would give the conduit control over the // output, which may be important for ofi-conduit where devices[] is // expected to contain PCI bus addresses. gasneti_console_message("INFO", "Automatic device selection summary (%d devices):", count); for (int i = 0; i < count; ++i) { const char *status; if (use[i] < 0) { status = "not found"; } else if (use[i] > 0) { gasneti_assert_uint(distances[i] ,==, 0); status = "distance=0 [selected]"; } else { status = gasneti_dynsprintf("distance=%u", (unsigned int)distances[i]); } gasneti_console_message("INFO", " device '%s' %s", devices[i], status); } } gasneti_free(distances); return 1; } gasnet-2025.8.0/other/plpa/0000775000175000017500000000000015142313673015477 5ustar alastairalastairgasnet-2025.8.0/other/plpa/README.GASNet0000664000175000017500000000127515142313673017444 0ustar alastairalastairIf you are receiving this directory as a part of GASNet, be advised that these files have been modified for use within GASNet and many files have been removed, and therefore this directory is not suitable for use in any other context. The unmodified PLPA package is available at http://www.open-mpi.org/software/plpa/ Notable changes in this source directory, relative to the upstream: + Resolved incorrect CPU mask computation on 64-bit systems, as reported in GASNet bug 4688. + "Safer" `PLPA_CPU_*` macros, including (1) added parenthesis to avoid issues with operator precedence and (2) measures to avoid multiple evaluation of their arguments (in case they have side-effects). gasnet-2025.8.0/other/plpa/AUTHORS0000664000175000017500000000035315142313673016550 0ustar alastairalastairPLPA Authors ============ The IDs in parenthesis are those used in Subversion commit notices. Current Authors --------------- Indiana University: - Jeff Squyres (jsquyres) Lawrence Berkeley National Lab: - Paul Hargrove (phargrov) gasnet-2025.8.0/other/plpa/README0000664000175000017500000004450615142313673016370 0ustar alastairalastairCopyright (c) 2004-2006 The Trustees of Indiana University and Indiana University Research and Technology Corporation. All rights reserved. Copyright (c) 2004-2005 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved. Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, University of Stuttgart. All rights reserved. Copyright (c) 2004-2025 The Regents of the University of California. All rights reserved. $COPYRIGHT$ Additional copyrights may follow $HEADER$ =========================================================================== This is the Portable Linux Processor Affinity (PLPA) package (pronounced "pli-pa"). It is intended for developers who wish to use Linux processor affinity via the sched_setaffinity() and sched_getaffinity() library calls, but don't want to wade through the morass of 3 different APIs that have been offered through the life of these calls in various Linux distributions and glibc versions. Specifically, to compile for any given Linux system, you need some complex compile-time tests to figure out which of the 3 APIs to use. And if you want your application to be binary portable across different Linux distributions, more complex run-time tests (and horrid compile-time trickery) are required to figure out which API the system you are running on uses. These problems all stem from the fact that the same 2 symbols have had three different APIs (with different numbers and types of parameters) throughout their life in Linux. Ick. The PLPA is an attempt to solve this problem by providing a single API that developers can write to. It provides two things: 1. A single API that developers can write to, regardless of what back-end API the system you are compiling on has. 2. A run-time test and dispatch that will invoke the Right back-end API depending on what back-end API the system you are running on has. This package is actually pretty small. It does not attempt to have many extra bells and whistles. Anyone could write it and package it. We did it simply because it appears that no one else has yet done this. In a world where larger scale SMPs are [again] becoming more common, particularly where at least some of them are NUMA-based architectures, processor affinity is going to become more and more important. Just because developers have not yet realized that they have this problem does not mean that they won't eventually figure it out. :-) Note that if you're looking into processor affinity, if you're on a NUMA machine, you probably also want to look into libnuma: ftp://ftp.suse.com/pub/people/ak/numa/ We hope that PLPA helps you. =========================================================================== What, exactly, is the problem? ------------------------------ There are at least 3 different ways that sched_setaffinity is implemented in glibc (only one of which is documented in the sched_setaffinity(2) man page), and some corresponding changes to what the kernel considers to be valid arguments: 1. int sched_setaffinity(pid_t pid, unsigned int len, unsigned long *mask); This originated in the time period of 2.5 kernels and some distros back-ported it to their 2.4 kernels and libraries. It's unknown if this version was ever packaged with any 2.6 kernels. 2. int sched_setaffinity (pid_t __pid, size_t __cpusetsize, const cpu_set_t *__cpuset); This appears to be in recent distors using 2.6 kernels. We don't know exactly when #1 changed into #2. However, this prototype is nice because the cpu_set_t type is accompanied by fdset-like CPU_ZERO(), CPU_SET(), CPU_ISSET(), etc. macros. 3. int sched_setaffinity (pid_t __pid, const cpu_set_t *__mask); (note the missing len parameter) This is in at least some Linux distros (e.g., MDK 10.0 with a 2.6.3 kernel, and SGI Altix, even though the Altix uses a 2.4-based kernel and therefore likely back-ported the 2.5 work or originated it in the first place). Similar to #2, the cpu_set_t type is accompanied by fdset-like CPU_ZERO(), CPU_SET(), CPU_ISSET(), etc. macros. But wait, it gets worse. Remember that getting/setting processor affinity has to involve the kernel. The sched_[sg]etaffinity() glibc functions typically do a little error checking and then make a syscall down into the kernel to actually do the work. There are multiple possibilities for problems here as the amount of checking has changed: 1. The glibc may support the affinity functions, but the kernel may not (and vice versa). This is typically only an issue with slightly older Linux distributions. Mandrake 9.2 is an example of this. PLPA can detect this at run-time and turn its internal functions into no-ops and return appropriate error codes (ENOSYS). 2. The glibc affinity functions may be buggy (i.e., they pass bad data down to the syscall). This is fortunately restricted to some older versions of glibc, and is relatively easy to check for at run-time. PLPA reliably detects this situation at run-time and returns appropriate error codes (ENOSYS). The original SuSE 9.1 version seems to have this problem, but it was fixed it somewhere in the SuSE patching history (it is unknown exactly when). Specifically, updating to the latest SuSE 9.1 patch level (as of Dec 2005) seems to fix the problem. 3. The CPU_* macros for manipulating cpu_set_t bitmasks may not compile because of typo bugs in system header files. PLPA avoids this problem by providing its own PLPA_CPU_* macros for manipulating CPU bitmasks. See "How do I use PLPA?", below, for more details. The PLPA avoids all the glibc issues by using syscall() to directly access the kernel set and get affinity functions. This is described below. =========================================================================== How does PLPA work? ------------------- Jeff Squyres initially sent a mail to the Open MPI developer's mailing list explaining the Linux processor affinity problems and asking for help coming up with a solution (particularly for binary compatibility): http://www.open-mpi.org/community/lists/devel/2005/11/0558.php Discussion on that thread and others eventually resulted in the run-time tests that form the heart of the PLPA. Many thanks to Paul Hargrove and Bogdan Costescu for their time and effort to get these tests right. PLPA was written so that other developers who want to use processor affinity in Linux don't have to go through this mess. The PLPA provides a single interface that can be used on any platform, regardless of which back-end API variant it has. This includes both the sched_setaffinity() and sched_getaffinity() calls as well as the CPU_*() macros. The PLPA avoids glibc altogether -- although tests were developed that could *usually* figure out which glibc variant to use at run time, there were still some cases where it was either impossible to determine or the glibc interface itself was buggy. Hence, it was decided that a simpler approach was simply to use syscall() to invoke the back-end kernel functions directly. The kernel functions have gone through a few changes as well, so the PLPA does a few run-time tests to determine which variant to use before actually invoking the back-end functions with the user-specified arguments. NOTE: The run-time tests that the PLPA performs involve getting the current affinity for the process in question and then attempting to set them back to the same value. By definition, this introduces a race condition (there is no atomic get-and-set functionality for processor affinity). The PLPA cannot guarantee consistent results if multiple entites (such as multiple threads or multiple processes) are setting the affinity for a process at the same time. In a worst case scenario, the PLPA may actually determine that it cannot determine the kernel variant at run time if another entity modifies a process' affinity while PLPA is executing its run-time tests. =========================================================================== Does PLPA make truly portable binaries? --------------------------------------- As much as Linux binaries are portable, yes. That is, if you have within your power to make a binary that is runnable on several different Linux distributions/versions/etc., then you may run into problems with the Linux processor affinity functions. PLPA attempts to solve this problem for you by *also* making the Linux processor affinity calls be binary portable. Hence, you need to start with something that is already binary portable (perhaps linking everything statically) -- then PLPA will be of help to you. Do not fall into the misconception that PLPA will magically make your executable be binary portable between different Linux variants. =========================================================================== How do I use PLPA? ------------------ There are two main uses of the PLPA: 1. Using the plpa_info executable to check if your system supports processor affinity and the PLPA can determine which to use at run-time. 2. Developers using the PLPA library to enable source and binary Linux processor affinity portability. In more detail: 1. The plpa_info executable is a simple call into the PLPA library that checks which API variant the system it is running on has. If the kernel supports processor affinity and the PLPA is able to figure out which API variant to use, it prints "PLPA_PROBE_OK". Other responses indicate an error. Since the PLPA library abstracts this kind of problem away, this is more a diagnostic tool than anything else. Note that plpa_info is *only* compiled and installed if PLPA is installed as a standalone package (see below). 2. Developers can use this package by including the header file and using the following prototypes: int plpa_sched_setaffinity(pid_t pid, size_t cpusetsize, const plpa_cpu_set_t *cpuset); int plpa_sched_getaffinity(pid_t pid, size_t cpusetsize, const plpa_cpu_set_t *cpuset) These functions perform run-time tests to determine which back-end API variant exists on the system and then dispatch to it correctly. The units of cpusetsize is number of bytes. This should normally just be sizeof(*cpuset), but is made available as a parameter to allow for future expansion of the PLPA (stay tuned). The observant reader will notice that this is remarkably similar to the one of the Linux API's (the function names are different and the CPU set type is different). PLPA also provides several macros for manipulating the plpa_cpu_set_t bitmask, quite similar to FDSET macros (see "What, Exactly, Is the Problem?" above for a description of problems with the native CPU_* macros): - PLPA_CPU_ZERO(&cpuset): Sets all bits in a plpa_cpu_set_t to zero. - PLPA_CPU_SET(num, &cpuset): Sets bit of to one. - PLPA_CPU_CLR(num, &cpuset): Sets bit of to zero. - PLPA_CPU_ISSET(num, &cpuset): Returns one if bit of is one; returns zero otherwise. Note that all four macros take a *pointer* to a plpa_cpu_set_t, as denoted by "&cpuset" in the descriptions above. =========================================================================== How do I compile / install the PLPA as a standalone package? ------------------------------------------------------------ The PLPA uses the standard GNU Autoconf/Automake/Libtool toolset to build and install itself. This means that generally, the following works: shell$ ./configure --prefix=/where/you/want/to/install [...lots of output...] shell$ make all [...lots of output...] shell$ make install Depending on your --prefix, you may need to run the "make install" step as root or some other privileged user. "make install" will install the following: - in $includedir (typically $prefix/include) - libplpa.la and libplpa.a and/or libplpa.so in $libdir (typically $prefix/lib) - plpa_info executable in $bindir (typically $prefix/bin) Note that since PLPA builds itself with GNU Libtool, it can be built as a static or shared library (or both). The default is to build a shared library. You can enable building a static library by supplying the "--enable-static" argument to configure; you can disable building the shared library by supplying the "--enable-shared" argument to configure. "make install" will install whichever library was built (or both). "make uninstall" will fully uninstall PLPA from the prefix directory (again, depending in filesystem permissions, you may need to run this as root or some privileged user). =========================================================================== How do I include PLPA in my software package? --------------------------------------------- It can be desirable to include PLPA in a larger software package (be sure to check out the LICENSE file) so that users don't have to separately download and install it before installing your software (after all, PLPA is a tiny little project -- why make users bother with it?). When used in "included" mode, PLPA will: - not install any header files - not build or install plpa_info - not build libplpa.* -- instead, it will build libplpa_included.* There are two ways to put PLPA into "included" mode. From the configure command line: shell$ ./configure --enable-included-mode ... Or by directly integrating PLPA's m4 configure macro in your configure script and invoking a specific macro to enable the included mode. Every project is different, and there are many different ways of integrating PLPA into yours. What follows is *one* example of how to do it. Copy the PLPA directory in your source tree and include the plpa.m4 file in your configure script -- perhaps with the following line in acinclude.m4 (assuming the use of Automake): m4_include(path/to/plpa.m4) The following macros can then be used from your configure script: - PLPA_INIT(action-upon-success, action-upon-failure) Invoke the PLPA tests and setup the PLPA to build. A traversal of "make" into the PLPA directory should build everything (it is safe to list the PLPA directory in the SUBDIRS of a higher-level Makefile.am, for example). - PLPA_STANDALONE Force the building of PLPA in standalone mode. Overrides the --enable-included-mode command line switch. - PLPA_INCLUDED Force the building of PLPA in included mode. - PLPA_SET_SYMBOL_PREFIX(foo) Tells the PLPA to prefix all types and public symbols with "foo" instead of "plpa_". This is recommended behavior if you are including PLPA in a larger project -- it is possible that your software will be combined with other software that also includes PLPA. If you both use different symbol prefixes, there will be no type/symbol clashes, and everything will compile and link successfully. If you both include PLPA and do not change the symbol prefix, it is likely that you will get multiple symbol definitions when linking. Here's an example of integrating with a larger project named sandbox: shell$ cd sandbox shell$ cp -r /somewhere/else/plpa-1.0 . shell$ edit acinclude.m4 ...add the line "m4_include(plpa-1.0/config/plpa.m4)"... shell$ edit Makefile.am ...add "plpa-1.0" to SUBDIRS... ...add "$(top_builddir)/plpa-1.0/src/libplpa/libplpa_included.la" to my executable's LDADD line... shell$ edit configure.ac ...add "PLPA_INCLUDED" line... ...add "PLPA_SET_SYMBOL_PREFIX(sandbox_plpa_)" line... ...add "PLPA_INIT(plpa_happy=yes, plpa_happy=no)" line... ...add error checking for plpa_happy=no case... shell$ edit src/my_program.c ...add #include ... ...add calls to plpa_sched_setaffinity()... shell$ aclocal shell$ autoconf shell$ libtoolize --automake shell$ automake -a shell$ ./configure ...lots of output... shell$ make ...lots of output... =========================================================================== How can I tell if PLPA is working? ---------------------------------- Run plpa_info; if it says "PLPA_PROBE_OK", then PLPA is working properly. If you want to compile your own test program to verify it, try compiling and running the following: --------------------------------------------------------------------------- #include #include int main(int argc, char* argv[]) { if (PLPA_PROBE_OK == plpa_api_probe()) { printf("All is good!\n"); } return 0; } --------------------------------------------------------------------------- You may need to supply appropriate -I and -L arguments to the compiler/linker, respectively, to tell it where to find the PLPA header and library files. Also don't forget to supply -lplpa to link in the PLPA library itself. For example, if you configured PLPA with: shell$ ./configure --prefix=$HOME/my-plpa-install Then you would compile the above program with: shell$ gcc my-plpa-test.c \ -I$HOME/my-plpa-install/include \ -L$HOME/my-plpa-install/lib -lplpa \ -o my-plpa-test shell$ ./my-plpa-test If it compiles, links, runs, and prints "All is good!", then all should be well. =========================================================================== What license does PLPA use? --------------------------- This package is distributed under the BSD license (see the LICENSE file in the top-level directory of a PLPA distribution). The copyrights of several institutions appear throughout the code base because some of the code was directly derived from the Open MPI project (http://www.open-mpi.org/), which is also distributed under the BSD license. =========================================================================== How do I get involved in PLPA? ------------------------------ Hopefully, PLPA is so simple that it won't need to be modified much after its first few releases. However, it is possible that we'll need to modify the run-time test if new variants of the Linux processor affinity API emerge. The best way to report bugs, send comments, or ask questions is to sign up on the user's mailing list: [The plpa-user list has been retired] Because of spam, only subscribers are allowed to post to this list (ensure that you subscribe with and post from exactly the same e-mail address -- joe@example.com is considered different than joe@mycomputer.example.com!). Visit this page to subscribe to the list: [The plpa-user list has been retired] Thanks for your time. gasnet-2025.8.0/other/plpa/src/0000775000175000017500000000000015142313673016266 5ustar alastairalastairgasnet-2025.8.0/other/plpa/src/libplpa/0000775000175000017500000000000015142313673017711 5ustar alastairalastairgasnet-2025.8.0/other/plpa/src/libplpa/plpa_bottom.h0000664000175000017500000000704615142313673022411 0ustar alastairalastair/* -*- c -*- * * Copyright (c) 2004-2005 The Trustees of Indiana University. * All rights reserved. * Copyright (c) 2004-2025 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ */ #ifndef PLPA_BOTTOM_H #define PLPA_BOTTOM_H /* Absolutely must not include here or it will generate conflicts. */ /* For memset() */ #include /* For pid_t and size_t */ #include /***************************************************************************/ /* Internal macro to munge names */ /* Preprocessors are fun -- the double inderection is necessary. Extra bonus points if you can figure out why! :p */ #define PLPA_MUNGE_NAME(a, b) PLPA_MUNGE_NAME2(a, b) #define PLPA_MUNGE_NAME2(a, b) a ## b #define PLPA_NAME(name) PLPA_MUNGE_NAME(PLPA_SYM_PREFIX, name) /***************************************************************************/ /* Values that can be returned from plpa_api_probe() */ typedef enum { /* Sentinel value */ PLPA_PROBE_UNSET, /* sched_setaffinity syscall available */ PLPA_PROBE_OK, /* syscall unavailable/unimplemented */ PLPA_PROBE_NOT_SUPPORTED, /* we experienced some strange failure that the user should report */ PLPA_PROBE_UNKNOWN } PLPA_NAME(api_type_t); /* PLPA bitmask type */ typedef unsigned long int PLPA_NAME(bitmask_t); #define PLPA_BITMASK_T_NUM_BITS (sizeof(PLPA_NAME(bitmask_t)) * 8) #define PLPA_BITMASK_CPU_MAX 1024 #define PLPA_BITMASK_NUM_ELEMENTS (PLPA_BITMASK_CPU_MAX / PLPA_BITMASK_T_NUM_BITS) typedef struct { PLPA_NAME(bitmask_t) bitmask[PLPA_BITMASK_NUM_ELEMENTS]; } PLPA_NAME(cpu_set_t); /***************************************************************************/ /* Internal macro for identifying the byte in a bitmask array */ #define PLPA_CPU_BYTE(num) ((num) / PLPA_BITMASK_T_NUM_BITS) /* Internal macro for identifying the bit in a bitmask array */ #define PLPA_CPU_BIT(num) ((num) % PLPA_BITMASK_T_NUM_BITS) /***************************************************************************/ /* Public macro to zero out a PLPA cpu set */ #define PLPA_CPU_ZERO(cpuset) \ memset(cpuset, 0, sizeof(PLPA_NAME(cpu_set_t))) /* Public macro to set a bit in a PLPA cpu set */ #define PLPA_CPU_SET(num, cpuset) do { \ unsigned int PLPA_NAME(tmp_num) = num; \ (cpuset)->bitmask[PLPA_CPU_BYTE(PLPA_NAME(tmp_num))] |= (1UL << PLPA_CPU_BIT(PLPA_NAME(tmp_num))); \ } while (0) /* Public macro to clear a bit in a PLPA cpu set */ #define PLPA_CPU_CLR(num, cpuset) \ unsigned int PLPA_NAME(tmp_num) = num; \ (cpuset)->bitmask[PLPA_CPU_BYTE(PLPA_NAME(tmp_num))] &= ~(1UL << PLPA_CPU_BIT(PLPA_NAME(tmp_num))); \ } while (0) /* Public interace to test if a bit is set in a PLPA cpu set */ static int PLPA_NAME(cpu_isset)(unsigned int num, const PLPA_NAME(cpu_set_t) *cpuset) { return (0 != ((cpuset)->bitmask[PLPA_CPU_BYTE(num)] & (1UL << PLPA_CPU_BIT(num)))); } #define PLPA_CPU_ISSET(num, cpuset) PLPA_NAME(cpu_isset)(num,cpuset) /***************************************************************************/ /* Check what API is on this machine */ PLPA_NAME(api_type_t) PLPA_NAME(api_probe)(void); /* Set processor affinity */ int PLPA_NAME(sched_setaffinity)(pid_t pid, size_t cpusetsize, const PLPA_NAME(cpu_set_t) *cpuset); /* Get processor affinity */ int PLPA_NAME(sched_getaffinity)(pid_t pid, size_t cpusetsize, PLPA_NAME(cpu_set_t) *cpuset); #endif /* PLPA_BOTTOM_H */ gasnet-2025.8.0/other/plpa/src/libplpa/plpa_dispatch.c0000664000175000017500000001232315142313673022671 0ustar alastairalastair/* -*- c -*- * * Copyright (c) 2004-2006 The Trustees of Indiana University. * All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ */ #include #include #include #include #include /* * Call the kernel's setaffinity, massaging the user's input * parameters as necessary */ int PLPA_NAME(sched_setaffinity)(pid_t pid, size_t cpusetsize, const PLPA_NAME(cpu_set_t) *cpuset) { int ret; size_t i; PLPA_NAME(cpu_set_t) tmp; switch (PLPA_NAME(api_probe)()) { case PLPA_PROBE_OK: /* This shouldn't happen, but check anyway */ if (cpusetsize > sizeof(*cpuset)) { return EINVAL; } if (NULL == cpuset) { return EINVAL; } /* If the user-supplied bitmask is smaller than what the kernel wants, zero out a temporary buffer of the size that the kernel wants and copy the user-supplied bitmask to the lower part of the temporary buffer. This could be done more efficiently, but we're looking for clarity/simplicity of code here -- this is not intended to be performance-critical. */ if (cpusetsize < PLPA_NAME(len)) { memset(&tmp, 0, sizeof(tmp)); for (i = 0; i < cpusetsize * 8; ++i) { if (PLPA_CPU_ISSET(i, cpuset)) { PLPA_CPU_SET(i, &tmp); } } } /* If the user-supplied bitmask is larger than what the kernel will accept, scan it and see if there are any set bits in the part larger than what the kernel will accept. If so, return EINVAL. Otherwise, copy the part that the kernel will accept into a temporary and use that. Again, efficinency is not the issue of this code -- clarity is. */ else if (cpusetsize > PLPA_NAME(len)) { for (i = PLPA_NAME(len) * 8; i < cpusetsize * 8; ++i) { if (PLPA_CPU_ISSET(i, cpuset)) { return EINVAL; } } /* No upper-level bits are set, so now copy over the bits that the kernel will look at */ memset(&tmp, 0, sizeof(tmp)); for (i = 0; i < PLPA_NAME(len) * 8; ++i) { if (PLPA_CPU_ISSET(i, cpuset)) { PLPA_CPU_SET(i, &tmp); } } } /* Otherwise, the user supplied a buffer that is exactly the right size. Just for clarity of code, copy the user's buffer into the temporary and use that. */ else { memcpy(&tmp, cpuset, cpusetsize); } /* Now do the syscall */ ret = syscall(__NR_sched_setaffinity, 0, PLPA_NAME(len), &tmp); /* Return 0 upon success. According to http://www.open-mpi.org/community/lists/plpa-users/2006/02/0016.php, all the kernel implementations return >= 0 upon success. */ if (ret >= 0) { return 0; } else { return ret; } break; case PLPA_PROBE_NOT_SUPPORTED: /* Process affinity not supported here */ return ENOSYS; break; default: /* Something went wrong */ /* JMS: would be good to have something other than EINVAL here -- suggestions? */ return EINVAL; break; } } /* * Call the kernel's getaffinity, massaging the user's input * parameters as necessary */ int PLPA_NAME(sched_getaffinity)(pid_t pid, size_t cpusetsize, PLPA_NAME(cpu_set_t) *cpuset) { int ret; switch (PLPA_NAME(api_probe)()) { case PLPA_PROBE_OK: /* This shouldn't happen, but check anyway */ if (PLPA_NAME(len) > sizeof(*cpuset)) { return EINVAL; } if (NULL == cpuset) { return EINVAL; } /* If the user supplied a buffer that is too small, then don't even bother */ if (cpusetsize < PLPA_NAME(len)) { return EINVAL; } /* Now we know that the user's buffer is >= the size required by the kernel. If it's >, then zero it out so that the bits at the top are cleared (since they won't be set by the kernel) */ if (cpusetsize > PLPA_NAME(len)) { memset(cpuset, 0, sizeof(*cpuset)); } /* Now do the syscall */ ret = syscall(__NR_sched_getaffinity, 0, PLPA_NAME(len), cpuset); /* Return 0 upon success. According to http://www.open-mpi.org/community/lists/plpa-users/2006/02/0016.php, all the kernel implementations return >= 0 upon success. */ if (ret >= 0) { return 0; } else { return ret; } break; case PLPA_PROBE_NOT_SUPPORTED: /* Process affinity not supported here */ return ENOSYS; break; default: /* Something went wrong */ return EINVAL; break; } } gasnet-2025.8.0/other/plpa/src/libplpa/plpa.h0000664000175000017500000000033415142313673021016 0ustar alastairalastair/* GASNet-specific replacement for PLPA's configure-generated plpa.h */ #ifndef PLPA_H #define PLPA_H 1 #undef PLPA_SYM_PREFIX #define PLPA_SYM_PREFIX gasneti_plpa_ #include "plpa_bottom.h" #endif /* PLPA_H */ gasnet-2025.8.0/other/plpa/src/libplpa/plpa_internal.h0000664000175000017500000000100415142313673022705 0ustar alastairalastair/* -*- c -*- * * Copyright (c) 2004-2005 The Trustees of Indiana University. * All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ */ #ifndef PLPA_INTERNAL_H #define PLPA_INTERNAL_H #include /* Cached size of the affinity buffers that the kernel expects */ extern size_t PLPA_NAME(len); #endif /* PLPA_INTERNAL_H */ gasnet-2025.8.0/other/plpa/src/libplpa/plpa_api_probe.c0000664000175000017500000000370715142313673023040 0ustar alastairalastair/* -*- c -*- * * Copyright (c) 2004-2005 The Trustees of Indiana University. * All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ */ #include #include #include #include /* Cache, just to make things a little more efficient */ static PLPA_NAME(api_type_t) cache = PLPA_PROBE_UNSET; /* The len value we find - not in public header, but used by the lib */ size_t PLPA_NAME(len) = 0; PLPA_NAME(api_type_t) PLPA_NAME(api_probe)(void) { if (PLPA_PROBE_UNSET == cache) { PLPA_NAME(cpu_set_t) mask; int rc; size_t len; for (len = sizeof(mask); len != 0; len >>= 1) { rc = syscall(__NR_sched_getaffinity, 0, len, &mask); if (rc >= 0) { /* OK, kernel is happy with a get(). Validate w/ a set(). */ /* Note that kernel may have told us the "proper" size */ size_t tmp = (0 != rc) ? ((size_t) rc) : len; /* Pass mask=NULL, expect errno==EFAULT if tmp was OK as a length */ rc = syscall(__NR_sched_setaffinity, 0, tmp, NULL); if ((rc < 0) && (errno == EFAULT)) { cache = PLPA_PROBE_OK; PLPA_NAME(len) = tmp; rc = 0; break; } } if (errno == ENOSYS) { break; /* No point in looping */ } } if (rc >= 0) { /* OK */ } else if (errno == ENOSYS) { /* Kernel returns ENOSYS because there is no support for processor affinity */ cache = PLPA_PROBE_NOT_SUPPORTED; } else { /* Unknown! */ cache = PLPA_PROBE_UNKNOWN; } } return cache; } gasnet-2025.8.0/other/plpa/NEWS0000664000175000017500000000261015142313673016175 0ustar alastairalastairCopyright (c) 2004-2006 The Trustees of Indiana University and Indiana University Research and Technology Corporation. All rights reserved. Copyright (c) 2004-2005 The Regents of the University of California. All rights reserved. $COPYRIGHT$ Additional copyrights may follow $HEADER$ =========================================================================== This file contains the main features as well as overviews of specific bug fixes (and other actions) for each version of PLPA since version 1.0. 1.0.3 ----- - Resolve some sizing / units ambiguities that mistakenly did not make it into 1.0.1. Thanks to Bert Wesarg for pointing these problems out. 1.0.2 ----- - Ensure that plpa_sched_[set|get]affinity() returns 0 upon success. Thanks to David Creasy for bringing this to our attention. 1.0.1 ----- - Specify that cpusetsize should be in units of bytes and add some missing "* 8"'s in plpa_dispatch.c. 1.0 --- - Initial release. 0.9a2 ----- - Change the back-end type of the plpa_bitmask_t to unsigned long instead of unsigned char to avoid an endian problem. - No longer attempt to set the affinity in plpa_api_probe() to avoid a possible race condition (setting it after getting it). - Fix PLPA_CPU_ZERO macro. Thanks to Bogdan Costescu for pointing this out. 0.9a1 ----- Initial public release. gasnet-2025.8.0/other/plpa/VERSION0000664000175000017500000000273215142313673016553 0ustar alastairalastair# This is the VERSION file for PLPA, describing the precise version of # PLPA in this distribution. The various components of the version # number below are combined to form a single version number string. # major, minor, and release are generally combined in the form # ... If release is zero, then it is omitted. major=1 minor=0 release=3 # greek is used for alpha or beta release tags. If it is non-empty, # it will be appended to the version number. It does not have to be # numeric. Common examples include a1 (alpha release 1), b1 (beta # release 1), sc2005 (Super Computing 2005 release). The only # requirement is that it must be entirely printable ASCII characters # and have no white space. greek=GASNet-EX # If want_svn=1, then the SVN r number will be included in the overall # PLPA version number in some form. want_svn=0 # If svn_r=-1, then the SVN r numbere will be obtained dynamically at # run time, either 1) via the "svnversion" command (if this is a # Subversion checkout) in the form "r", or b) with the date (if # this is not a Subversion checkout, and the svnversion command cannot # be used) in the form of "svn". Alternatively, if svn_r is not # -1, the value of svn_r will be directly appended to the version # string. This happens during "make dist", for example: if the # distribution tarball is being made from an SVN checkout, the value # of svn_r in this file is replaced with the output of "svnversion". svn_r=r58 gasnet-2025.8.0/other/plpa/LICENSE0000664000175000017500000000472715142313673016516 0ustar alastairalastairCopyright (c) 2004-2006 The Trustees of Indiana University and Indiana University Research and Technology Corporation. All rights reserved. Copyright (c) 2004-2025 The Regents of the University of California. All rights reserved. Portions copyright: Copyright (c) 2004-2005 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved. Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, University of Stuttgart. All rights reserved. $COPYRIGHT$ Additional copyrights may follow $HEADER$ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer listed in this license in the documentation and/or other materials provided with the distribution. - Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. The copyright holders provide no reassurances that the source code provided does not infringe any patent, copyright, or any other intellectual property rights of third parties. The copyright holders disclaim any liability to any recipient for claims brought against recipient by any third party for infringement of that parties intellectual property rights. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. gasnet-2025.8.0/other/plpa/config/0000775000175000017500000000000015142313673016744 5ustar alastairalastairgasnet-2025.8.0/other/plpa/config/acinclude.m40000664000175000017500000001204115142313673021133 0ustar alastairalastair# -*- shell-script -*- # # Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana # University Research and Technology # Corporation. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow # # $HEADER$ # # This file is a clone of plpa.m4, with GASNet-specific modifications. # # ChangeLog for GASNet-specific modifications: # * 2006.08.18: Paul Hargrove # + DISABLE use of AM_CONDITIONAL - we don't use the Makefiles and # need to avoid the configure time complaint if we build w/o PLPA. # * 2006.08.17: Paul Hargrove # + Disable AC_ARG_* calls - we don't need them and don't want their # help mesages in the GASNet configure help. # + Expand use of AS_IF for compatability with older automake # * 2006.08.16: Paul Hargrove # + Import plpa-1.0.3 AC_DEFUN([DISABLED_AC_ARG_ENABLE],[]) AC_DEFUN([DISABLED_AC_ARG_WITH],[]) AC_DEFUN([DISABLED_AM_CONDITIONAL],[]) # Main PLPA m4 macro, to be invoked by the user # # Expects two paramters: # 1. What to do upon success # 2. What to do upon failure # AC_DEFUN([PLPA_INIT],[ AC_REQUIRE([_PLPA_INTERNAL_SETUP]) AC_REQUIRE([AC_PROG_CC]) # Check for syscall() AC_CHECK_FUNC([syscall], [happy=1], [happy=0]) # Look for syscall.h if test "$happy" = 1; then AC_CHECK_HEADER([syscall.h], [happy=1], [happy=0]) fi # Look for unistd.h if test "$happy" = 1; then AC_CHECK_HEADER([unistd.h], [happy=1], [happy=0]) fi # Check for __NR_sched_setaffinity if test "$happy" = 1; then AC_MSG_CHECKING([for __NR_sched_setaffinity]) AC_TRY_COMPILE([#include #include ], [#ifndef __NR_sched_setaffinity #error __NR_sched_setaffinity_not found! #endif int i = 1;], [AC_MSG_RESULT([yes]) happy=1], [AC_MSG_RESULT([no]) happy=0]) fi # Check for __NR_sched_getaffinity (probably overkill, but what # the heck?) if test "$happy" = 1; then AC_MSG_CHECKING([for __NR_sched_getaffinity]) AC_TRY_COMPILE([#include #include ], [#ifndef __NR_sched_getaffinity #error __NR_sched_getaffinity_not found! #endif int i = 1;], [AC_MSG_RESULT([yes]) happy=1], [AC_MSG_RESULT([no]) happy=0]) fi # If all was good, do the real init if test "$happy" = 1; then _PLPA_INIT($1, $2) else [$2] : # in case $2 is empty. fi # Cleanup unset happy ])dnl #----------------------------------------------------------------------- # Build PLPA as a standalone package AC_DEFUN([PLPA_STANDALONE],[ AC_REQUIRE([_PLPA_INTERNAL_SETUP]) plpa_mode=standalone ])dnl #----------------------------------------------------------------------- # Build PLPA as an included package AC_DEFUN([PLPA_INCLUDED],[ AC_REQUIRE([_PLPA_INTERNAL_SETUP]) plpa_mode=included ])dnl #----------------------------------------------------------------------- # Specify the symbol prefix AC_DEFUN([PLPA_SET_SYMBOL_PREFIX],[ AC_REQUIRE([_PLPA_INTERNAL_SETUP]) plpa_symbol_prefix_value=$1 ])dnl #----------------------------------------------------------------------- # Internals AC_DEFUN([_PLPA_INTERNAL_SETUP],[ # Included mode, or standalone? DISABLED_AC_ARG_ENABLE([included-mode], AC_HELP_STRING([--enable-included-mode], [Using --enable-included-mode puts the PLPA into "included" mode. The default is --disable-included-mode, meaning that the PLPA is in "standalone" mode.])) if test "$enable_included_mode" = "yes"; then plpa_mode=included else plpa_mode=standalone fi # Change the symbol prefix? DISABLED_AC_ARG_WITH([plpa-symbol-prefix], AC_HELP_STRING([--with-plpa-symbol-prefix=STRING], [STRING can be any valid C symbol name. It will be prefixed to all public PLPA symbols. Default: "plpa_"])) if test "$with_plpa_symbol_prefix" = ""; then plpa_symbol_prefix_value=plpa_ else plpa_symbol_prefix_value=$with_plpa_symbol_prefix fi ])dnl #----------------------------------------------------------------------- # Internals for PLPA_INIT AC_DEFUN([_PLPA_INIT],[ AC_REQUIRE([_PLPA_INTERNAL_SETUP]) # Are we building as standalone or included? AC_MSG_CHECKING([for PLPA building mode]) DISABLED_AM_CONDITIONAL([PLPA_BUILD_STANDALONE], [test "$plpa_mode" = "standalone"]) AC_MSG_RESULT([$plpa_mode]) # What prefix are we using? AC_MSG_CHECKING([for PLPA symbol prefix]) AC_DEFINE_UNQUOTED(PLPA_SYM_PREFIX, [$plpa_symbol_prefix_value], [The PLPA symbol prefix]) AC_MSG_RESULT([$plpa_symbol_prefix_value]) # Success $1 ])dnl gasnet-2025.8.0/other/gasnet_portable_platform.h0000664000175000017500000012630715142313673022002 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/portable_platform.h $ * Description: Portable platform detection header * Copyright 2006, Dan Bonachea * Copyright 2018, The Regents of the University of California * Terms of Use: In ADDITION to the license information in license.txt, * anyone redistributing this header agrees not to change any part of this notice, or * the version handshake in the header versioning section below. * Furthermore, redistributed copies of any portion of this header must * not appear within files named "portable_platform.h" or "gasnet_portable_platform.h", * unless it is embedded within a complete copy of the GASNet distribution. * These restrictions are designed to prevent conflicts for end users * who compose multiple projects using the PLATFORM_ namespace. * * The canonical version of this header is hosted in the GASNet project at: * https://bitbucket.org/berkeleylab/gasnet * * Developers who clone this header into their own project are HIGHLY encouraged to * contribute any improvements (especially addition of new platforms) back to the * canonical version, for the benefit of the community. * Contributions and bug reports should be directed to: * https://gasnet-bugs.lbl.gov or gasnet-staff@lbl.gov */ /* ------------------------------------------------------------------------------------ */ /* Header versioning: DO NOT CHANGE ANYTHING IN THIS SECTION * The license terms for this header prohibit modifying this section in ANY way. Clones should continue to advertise a PLATFORM_HEADER_VERSION equal to the canonical version they cloned, and should not modify the handshake logic which ensures the highest canonical header version is used. */ /* Publish and enforce version number for the public interface to this header */ /* YOU ARE NOT PERMITTED TO CHANGE THIS SECTION WITHOUT DIRECT APPROVAL FROM DAN BONACHEA */ #if !defined(_PORTABLE_PLATFORM_H) || !defined(PLATFORM_HEADER_VERSION) \ || _PORTABLE_PLATFORM_H != PLATFORM_HEADER_VERSION \ || PLATFORM_HEADER_VERSION < 24 #undef PLATFORM_HEADER_VERSION #define PLATFORM_HEADER_VERSION 24 #undef _PORTABLE_PLATFORM_H #define _PORTABLE_PLATFORM_H PLATFORM_HEADER_VERSION /* End Header versioning handshake */ /* ------------------------------------------------------------------------------------ */ /* make sure that previously-included older/broken clones of this header do not pollute our namespace */ #undef PLATFORM_COMPILER_FAMILYNAME #undef PLATFORM_COMPILER_FAMILYID #undef PLATFORM_COMPILER_ID #undef PLATFORM_COMPILER_VERSION #undef PLATFORM_COMPILER_VERSION_STR #undef PLATFORM_COMPILER_VERSION_INT #undef PLATFORM_COMPILER_IDSTR #undef PLATFORM_COMPILER_VERSION_GT #undef PLATFORM_COMPILER_VERSION_GE #undef PLATFORM_COMPILER_VERSION_EQ #undef PLATFORM_COMPILER_VERSION_LE #undef PLATFORM_COMPILER_VERSION_LT #undef PLATFORM_COMPILER_C_LANGLVL #undef PLATFORM_COMPILER_CXX_LANGLVL #undef PLATFORM_COMPILER_INTEL #undef PLATFORM_COMPILER_INTEL_C #undef PLATFORM_COMPILER_INTEL_CXX #undef PLATFORM_COMPILER_PATHSCALE #undef PLATFORM_COMPILER_PATHSCALE_C #undef PLATFORM_COMPILER_PATHSCALE_CXX #undef PLATFORM_COMPILER_PGI #undef PLATFORM_COMPILER_PGI_C #undef PLATFORM_COMPILER_PGI_CXX #undef PLATFORM_COMPILER_XLC #undef PLATFORM_COMPILER_XLC_C #undef PLATFORM_COMPILER_XLC_CXX #undef PLATFORM_COMPILER_COMPAQ #undef PLATFORM_COMPILER_COMPAQ_C #undef PLATFORM_COMPILER_COMPAQ_CXX #undef PLATFORM_COMPILER_SUN #undef PLATFORM_COMPILER_SUN_C #undef PLATFORM_COMPILER_SUN_CXX #undef PLATFORM_COMPILER_HP #undef PLATFORM_COMPILER_HP_C #undef PLATFORM_COMPILER_HP_CXX #undef PLATFORM_COMPILER_SGI #undef PLATFORM_COMPILER_SGI_C #undef PLATFORM_COMPILER_SGI_CXX #undef PLATFORM_COMPILER_CRAY #undef PLATFORM_COMPILER_CRAY_C #undef PLATFORM_COMPILER_CRAY_CXX #undef PLATFORM_COMPILER_KAI #undef PLATFORM_COMPILER_KAI_C #undef PLATFORM_COMPILER_KAI_CXX #undef PLATFORM_COMPILER_MTA #undef PLATFORM_COMPILER_MTA_C #undef PLATFORM_COMPILER_MTA_CXX #undef PLATFORM_COMPILER_NECSX #undef PLATFORM_COMPILER_NECSX_C #undef PLATFORM_COMPILER_NECSX_CXX #undef PLATFORM_COMPILER_MICROSOFT #undef PLATFORM_COMPILER_MICROSOFT_C #undef PLATFORM_COMPILER_MICROSOFT_CXX #undef PLATFORM_COMPILER_TINY #undef PLATFORM_COMPILER_TINY_C #undef PLATFORM_COMPILER_TINY_CXX #undef PLATFORM_COMPILER_LCC #undef PLATFORM_COMPILER_LCC_C #undef PLATFORM_COMPILER_LCC_CXX #undef PLATFORM_COMPILER_OPEN64 #undef PLATFORM_COMPILER_OPEN64_C #undef PLATFORM_COMPILER_OPEN64_CXX #undef PLATFORM_COMPILER_PCC #undef PLATFORM_COMPILER_PCC_C #undef PLATFORM_COMPILER_PCC_CXX #undef PLATFORM_COMPILER_CLANG #undef PLATFORM_COMPILER_CLANG_C #undef PLATFORM_COMPILER_CLANG_CXX #undef PLATFORM_COMPILER_NVHPC #undef PLATFORM_COMPILER_NVHPC_C #undef PLATFORM_COMPILER_NVHPC_CXX #undef PLATFORM_COMPILER_GNU #undef PLATFORM_COMPILER_GNU_C #undef PLATFORM_COMPILER_GNU_CXX #undef PLATFORM_COMPILER_UNKNOWN #undef PLATFORM_OS_FAMILYNAME #undef PLATFORM_OS_SUBFAMILYNAME #undef PLATFORM_OS_CATAMOUNT #undef PLATFORM_OS_BGP #undef PLATFORM_OS_BGQ #undef PLATFORM_OS_K42 #undef PLATFORM_OS_UCLINUX #undef PLATFORM_OS_LINUX #undef PLATFORM_OS_CNL #undef PLATFORM_OS_SUBFAMILY_CNL #undef PLATFORM_OS_WSL #undef PLATFORM_OS_SUBFAMILY_WSL #undef PLATFORM_OS_BLRTS #undef PLATFORM_OS_CYGWIN #undef PLATFORM_OS_MSWINDOWS #undef PLATFORM_OS_AIX #undef PLATFORM_OS_TRU64 #undef PLATFORM_OS_FREEBSD #undef PLATFORM_OS_NETBSD #undef PLATFORM_OS_OPENBSD #undef PLATFORM_OS_SOLARIS #undef PLATFORM_OS_DARWIN #undef PLATFORM_OS_IRIX #undef PLATFORM_OS_HPUX #undef PLATFORM_OS_UNICOS #undef PLATFORM_OS_MTA #undef PLATFORM_OS_SUPERUX #undef PLATFORM_OS_UNKNOWN #undef PLATFORM_ARCH_FAMILYNAME #undef PLATFORM_ARCH_32 #undef _PLATFORM_ARCH_32 #undef PLATFORM_ARCH_64 #undef _PLATFORM_ARCH_64 #undef PLATFORM_ARCH_BIG_ENDIAN #undef _PLATFORM_ARCH_BIG_ENDIAN #undef PLATFORM_ARCH_LITTLE_ENDIAN #undef _PLATFORM_ARCH_LITTLE_ENDIAN #undef PLATFORM_ARCH_POWERPC #undef PLATFORM_ARCH_MIC #undef PLATFORM_ARCH_X86_64 #undef PLATFORM_ARCH_IA64 #undef PLATFORM_ARCH_X86 #undef PLATFORM_ARCH_ALPHA #undef PLATFORM_ARCH_MIPS #undef PLATFORM_ARCH_SPARC #undef PLATFORM_ARCH_PARISC #undef PLATFORM_ARCH_CRAYX1 #undef PLATFORM_ARCH_CRAYT3E #undef PLATFORM_ARCH_MTA #undef PLATFORM_ARCH_NECSX #undef PLATFORM_ARCH_MICROBLAZE #undef PLATFORM_ARCH_ARM #undef PLATFORM_ARCH_AARCH64 #undef PLATFORM_ARCH_TILE #undef PLATFORM_ARCH_S390 #undef PLATFORM_ARCH_RISCV #undef PLATFORM_ARCH_UNKNOWN /* prevent known old/broken versions of this header from loading */ #undef OMPI_PORTABLE_PLATFORM_H #define OMPI_PORTABLE_PLATFORM_H #undef OPAL_PORTABLE_PLATFORM_H #define OPAL_PORTABLE_PLATFORM_H /* ------------------------------------------------------------------------------------ */ /* most of this file was written based on information in vendor documents, system headers, and inspecting verbose compiler output. Another useful source of information: http://predef.sourceforge.net/ */ /* ------------------------------------------------------------------------------------ */ /* helpers */ #undef _PLATFORM_STRINGIFY_HELPER #define _PLATFORM_STRINGIFY_HELPER(x) #x #undef PLATFORM_STRINGIFY #define PLATFORM_STRINGIFY(x) _PLATFORM_STRINGIFY_HELPER(x) /* ------------------------------------------------------------------------------------ */ /* Compiler detection */ /* PLATFORM_COMPILER_: defined to 1 if compiler is a given family, undef otherwise PLATFORM_COMPILER__C PLATFORM_COMPILER__CXX defined to 1 if compiler is a given family, and is the C or C++ compiler, respectively PLATFORM_COMPILER_FAMILYNAME: unquoted token which provides the compiler family name PLATFORM_COMPILER_FAMILYID: defined to a positive integral value which is unique to a given compiler family or zero if the compiler is unrecognized PLATFORM_COMPILER_ID: same as PLATFORM_COMPILER_FAMILYID, except C and C++ compilers are differentiated PLATFORM_COMPILER_VERSION: defined to an integral expression which is guaranteed to be monotonically non-decreasing with increasing compiler versions. Will be zero for unrecognized compilers. The exact encoding of compiler version tuples into this constant may occasionally change when this header is upgraded, so code should use the (in)equality macros below to check against particular compiler versions, instead of embedding an encoded constant. PLATFORM_COMPILER_VERSION_STR: A string representation of the compiler version, which may contain additional info PLATFORM_COMPILER_VERSION_[GT,GE,EQ,LE,LT](maj,min,pat): evaluate to non-zero iff the compiler version in use is respectively greater-than, greater-or-equal, equal, less-or-equal, less-than the provided version components PLATFORM_COMPILER_IDSTR: a string which uniquely identifies recognized compilers PLATFORM_COMPILER_C_LANGLVL and PLATFORM_COMPILER_CXX_LANGLVL: (in PLATFORM_HEADER_VERSION >= 5) defined to a positive integral value corresponding to the C or C++ (respectively) language standard to which the current compiler advertises conformance. Otherwise undef (in particular at most one of these is defined in a given compilation). */ #if defined(__INTEL_COMPILER) #define PLATFORM_COMPILER_INTEL 1 #define PLATFORM_COMPILER_FAMILYNAME INTEL #define PLATFORM_COMPILER_FAMILYID 2 #ifdef __cplusplus #define PLATFORM_COMPILER_INTEL_CXX 1 #else #define PLATFORM_COMPILER_INTEL_C 1 #endif /* Intel compiler version "patch number" * ------------------------------------- * Intel compiler versioning is unfortunately complicated by behavioral changes. * Versions prior to Intel 14.0.0 (Sept 2013) lacked a preprocessor symbol to supply the "update" number. * Version 14.0.0 and later supply a __INTEL_COMPILER_UPDATE symbol, but sadly several releases of Version 19 * report the wrong value in this field (bug 3876). * For now, the "patch" field of the PLATFORM_COMPILER_VERSION for Intel is the release package BUILD DATE, * in the same decimal YYYYMMDD format as __INTEL_COMPILER_BUILD_DATE, as this is the only indicator that has * remained reliably stable/correct across versions. * So for example to check for icc --version "19.0.1.144 20181018" or later, pass: * PLATFORM_COMPILER_VERSION_GE(19, 0, 20181018) * NOTE 1: this build-date is unfortunately OS-DEPENDENT, sometimes differing by several days or weeks * between the Linux and OSX releases. For a complete mapping, see: * https://software.intel.com/en-us/articles/intel-compiler-and-composer-update-version-numbers-to-compiler-version-number-mapping * NOTE 2: some of the build-date entries in the table linked above have been observed to be incorrect, * so when possible it's safest to verify the build-date from `icc --version` on both Linux and macOS. */ #undef _PLATFORM_INTEL_COMPILER_BUILD_DATE #undef _PLATFORM_COMPILER_INTEL_MIN_BUILDDATE #define _PLATFORM_COMPILER_INTEL_MIN_BUILDDATE 19900000 /* year 1990: corresponds roughly to Intel v4.5 (1992) */ /* MIN_BUILDDATE is used to normalize build dates to a bit-saving range for the encoding * Intel officially supports the current release and two prior (currently back to 2016) * Our 1990 floor corresponds to Intel v4.x that only worked on MS-DOS and predates both Linux and BSD-based macOS */ #ifdef __INTEL_COMPILER_BUILD_DATE #define _PLATFORM_INTEL_COMPILER_BUILD_DATE __INTEL_COMPILER_BUILD_DATE #else #define _PLATFORM_INTEL_COMPILER_BUILD_DATE _PLATFORM_COMPILER_INTEL_MIN_BUILDDATE #endif /* Intel patch number is a decimal build date: YYYYMMDD - do NOT pass the "update number" */ #define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \ (((((maj) * 100) + (min)) << 19) | \ ((pat) < _PLATFORM_COMPILER_INTEL_MIN_BUILDDATE ? \ 0 : ((pat)-_PLATFORM_COMPILER_INTEL_MIN_BUILDDATE))) #undef _PLATFORM__INTEL_COMPILER #if __INTEL_COMPILER == 9999 /* Seen in 20110811 release of 12.1.0 - overflows VERSION_INT() */ #define _PLATFORM__INTEL_COMPILER 1201 #else #define _PLATFORM__INTEL_COMPILER __INTEL_COMPILER #endif #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(_PLATFORM__INTEL_COMPILER/100, _PLATFORM__INTEL_COMPILER%100, _PLATFORM_INTEL_COMPILER_BUILD_DATE) #define PLATFORM_COMPILER_VERSION_STR \ PLATFORM_STRINGIFY(_PLATFORM__INTEL_COMPILER) "." PLATFORM_STRINGIFY(_PLATFORM_INTEL_COMPILER_BUILD_DATE) #elif defined(__PATHSCALE__) #define PLATFORM_COMPILER_PATHSCALE 1 #define PLATFORM_COMPILER_FAMILYNAME PATHSCALE #define PLATFORM_COMPILER_FAMILYID 3 #ifdef __cplusplus #define PLATFORM_COMPILER_PATHSCALE_CXX 1 #else #define PLATFORM_COMPILER_PATHSCALE_C 1 #endif #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(__PATHCC__,__PATHCC_MINOR__,__PATHCC_PATCHLEVEL__+0) #define PLATFORM_COMPILER_VERSION_STR __PATHSCALE__ #elif defined(__NVCOMPILER) /* Must occur prior to PGI and CLANG */ #define PLATFORM_COMPILER_NVHPC 1 #define PLATFORM_COMPILER_FAMILYNAME NVHPC #define PLATFORM_COMPILER_FAMILYID 20 #ifdef __cplusplus #define PLATFORM_COMPILER_NVHPC_CXX 1 #else #define PLATFORM_COMPILER_NVHPC_C 1 #endif #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(__NVCOMPILER_MAJOR__,__NVCOMPILER_MINOR__,__NVCOMPILER_PATCHLEVEL__) #define PLATFORM_COMPILER_VERSION_STR \ PLATFORM_STRINGIFY(__NVCOMPILER_MAJOR__) "." PLATFORM_STRINGIFY(__NVCOMPILER_MINOR__) "-" PLATFORM_STRINGIFY(__NVCOMPILER_PATCHLEVEL__) #elif defined(__PGI) #define PLATFORM_COMPILER_PGI 1 #define PLATFORM_COMPILER_FAMILYNAME PGI #define PLATFORM_COMPILER_FAMILYID 4 #ifdef __cplusplus #define PLATFORM_COMPILER_PGI_CXX 1 #else #define PLATFORM_COMPILER_PGI_C 1 #endif #if __PGIC__ == 99 /* bug 2230: PGI versioning was broken for some platforms in 7.0 no way to know exact version, but provide something slightly more accurate */ #define PLATFORM_COMPILER_VERSION 0x070000 #define PLATFORM_COMPILER_VERSION_STR "7.?-?" #elif defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(__PGIC__,__PGIC_MINOR__,__PGIC_PATCHLEVEL__) #define PLATFORM_COMPILER_VERSION_STR \ PLATFORM_STRINGIFY(__PGIC__) "." PLATFORM_STRINGIFY(__PGIC_MINOR__) "-" PLATFORM_STRINGIFY(__PGIC_PATCHLEVEL__) #else /* PGI before 6.1-4 lacks any version ID preprocessor macros - so use this filthy hack */ #ifdef PLATFORM_PGI_IS_ANCIENT /* Include below might fail for ancient versions lacking this header, but testing shows it works back to at least 5.1-3 (Nov 2003), and based on docs probably back to 3.2 (Sep 2000) */ #define PLATFORM_COMPILER_VERSION 0 #elif defined(__x86_64__) /* bug 1753 - 64-bit omp.h upgrade happened in <6.0-8,6.1-1] */ #include "omp.h" #if defined(_PGOMP_H) /* 6.1.1 or newer */ #define PLATFORM_COMPILER_VERSION 0x060101 #define PLATFORM_COMPILER_VERSION_STR ">=6.1-1" #else /* 6.0.8 or older */ #define PLATFORM_COMPILER_VERSION 0 #define PLATFORM_COMPILER_VERSION_STR "<=6.0-8" #endif #else /* 32-bit omp.h upgrade happened in <5.2-4,6.0-8] */ #include "omp.h" #if defined(_PGOMP_H) /* 6.0-8 or newer */ #define PLATFORM_COMPILER_VERSION 0x060008 #define PLATFORM_COMPILER_VERSION_STR ">=6.0-8" #else /* 5.2-4 or older */ #define PLATFORM_COMPILER_VERSION 0 #define PLATFORM_COMPILER_VERSION_STR "<=5.2-4" #endif #endif #endif #elif defined(__xlC__) || defined(__ibmxl__) #define PLATFORM_COMPILER_XLC 1 #define PLATFORM_COMPILER_FAMILYNAME XLC #define PLATFORM_COMPILER_FAMILYID 5 #ifdef __cplusplus #define PLATFORM_COMPILER_XLC_CXX 1 #else #define PLATFORM_COMPILER_XLC_C 1 #endif #ifdef __ibmxl_version__ #define PLATFORM_COMPILER_VERSION \ (__ibmxl_version__ << 24 | __ibmxl_release__ << 16 | \ __ibmxl_modification__ << 8 | __ibmxl_ptf_fix_level__) #define PLATFORM_COMPILER_VERSION_STR \ PLATFORM_STRINGIFY(__ibmxl_version__) "." PLATFORM_STRINGIFY(__ibmxl_release__) "." PLATFORM_STRINGIFY(__ibmxl_modification__) "." PLATFORM_STRINGIFY(__ibmxl_ptf_fix_level__) #else #ifdef __xlC_ver__ #define PLATFORM_COMPILER_VERSION (__xlC__ << 16 | __xlC_ver__) #else #define PLATFORM_COMPILER_VERSION (__xlC__ << 16) #endif #ifdef __xlc__ #define PLATFORM_COMPILER_VERSION_STR __xlc__ #else #define PLATFORM_COMPILER_VERSION_STR PLATFORM_STRINGIFY(__xlC__) #endif #endif #define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \ ( ((maj) << 24) | ((min) << 16) | ((pat) << 8) ) #elif defined(__DECC) || defined(__DECCXX) #define PLATFORM_COMPILER_COMPAQ 1 #define PLATFORM_COMPILER_FAMILYNAME COMPAQ #define PLATFORM_COMPILER_FAMILYID 6 #ifdef __cplusplus #define PLATFORM_COMPILER_COMPAQ_CXX 1 #else #define PLATFORM_COMPILER_COMPAQ_C 1 #endif #if defined(__DECC_VER) #define PLATFORM_COMPILER_VERSION __DECC_VER #elif defined(__DECCXX_VER) #define PLATFORM_COMPILER_VERSION __DECCXX_VER #endif #define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \ ( ((maj) * 10000000) + ((min) * 100000) + (90000) + (pat) ) /* 90000 = official ver, 80000 = customer special ver, 60000 = field test ver */ #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) #define PLATFORM_COMPILER_SUN 1 #define PLATFORM_COMPILER_FAMILYNAME SUN #define PLATFORM_COMPILER_FAMILYID 7 #ifdef __cplusplus #define PLATFORM_COMPILER_SUN_CXX 1 #else #define PLATFORM_COMPILER_SUN_C 1 #endif #if defined(__SUNPRO_C) && __SUNPRO_C > 0 #define PLATFORM_COMPILER_VERSION __SUNPRO_C #elif defined(__SUNPRO_CC) && __SUNPRO_CC > 0 #define PLATFORM_COMPILER_VERSION __SUNPRO_CC #endif /* Sun version numbers look like hex but are actually a sloppy concatenation of decimal version numbers * leading to weird discontinuities in the version space, luckily it remains monotonic (so far) */ #define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) ( \ (min) < 10 ? \ ( ((maj) << 8) | ((min) << 4) | (pat) ) : \ ( ((maj) << 12) | (((min)/10) << 8) | (((min)%10) << 4) | (pat) ) ) #elif defined(__HP_cc) || defined(__HP_aCC) #define PLATFORM_COMPILER_HP 1 #define PLATFORM_COMPILER_FAMILYNAME HP #define PLATFORM_COMPILER_FAMILYID 8 #ifdef __cplusplus #define PLATFORM_COMPILER_HP_CXX 1 #else #define PLATFORM_COMPILER_HP_C 1 #endif #if defined(__HP_cc) && __HP_cc > 0 #define PLATFORM_COMPILER_VERSION __HP_cc #elif defined(__HP_aCC) && __HP_aCC > 0 #define PLATFORM_COMPILER_VERSION __HP_aCC #endif #define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \ ( ((maj) << 16) | ((min) << 8) | (pat) ) #elif defined(_SGI_COMPILER_VERSION) || \ (defined(_COMPILER_VERSION) && defined(__sgi) && !defined(__GNUC__)) /* 7.3.0 and earlier lack _SGI_COMPILER_VERSION */ #define PLATFORM_COMPILER_SGI 1 #define PLATFORM_COMPILER_FAMILYNAME SGI #define PLATFORM_COMPILER_FAMILYID 9 #ifdef __cplusplus #define PLATFORM_COMPILER_SGI_CXX 1 #else #define PLATFORM_COMPILER_SGI_C 1 #endif #if defined(_SGI_COMPILER_VERSION) && _SGI_COMPILER_VERSION > 0 #define PLATFORM_COMPILER_VERSION _SGI_COMPILER_VERSION #elif defined(_COMPILER_VERSION) && _COMPILER_VERSION > 0 #define PLATFORM_COMPILER_VERSION _COMPILER_VERSION #endif #define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \ ( ((maj) << 8) | ((min) << 4) | (pat) ) #elif defined(_CRAYC) #define PLATFORM_COMPILER_CRAY 1 #define PLATFORM_COMPILER_FAMILYNAME CRAY #define PLATFORM_COMPILER_FAMILYID 10 #ifdef __cplusplus #define PLATFORM_COMPILER_CRAY_CXX 1 #else #define PLATFORM_COMPILER_CRAY_C 1 #endif #if defined(_RELEASE_MAJOR) && defined(_RELEASE_MINOR) /* XE, XK, XC */ #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(_RELEASE_MAJOR,_RELEASE_MINOR,0) #elif defined(_RELEASE) && defined(_RELEASE_MINOR) /* X1 and XT */ #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(_RELEASE,_RELEASE_MINOR,0) #elif defined(_RELEASE) /* T3E */ #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(_RELEASE,0,0) #endif #ifdef _RELEASE_STRING /* X1 and XT, XK, XC */ #define PLATFORM_COMPILER_VERSION_STR _RELEASE_STRING #endif #elif defined(__KCC) #define PLATFORM_COMPILER_KAI 1 #define PLATFORM_COMPILER_FAMILYNAME KAI #define PLATFORM_COMPILER_FAMILYID 11 #ifdef __cplusplus #define PLATFORM_COMPILER_KAI_CXX 1 #else #define PLATFORM_COMPILER_KAI_C 1 #endif #elif defined(__MTA__) #define PLATFORM_COMPILER_MTA 1 #define PLATFORM_COMPILER_FAMILYNAME MTA #define PLATFORM_COMPILER_FAMILYID 12 #ifdef __cplusplus #define PLATFORM_COMPILER_MTA_CXX 1 #else #define PLATFORM_COMPILER_MTA_C 1 #endif #elif defined(_SX) #define PLATFORM_COMPILER_NECSX 1 #define PLATFORM_COMPILER_FAMILYNAME NECSX #define PLATFORM_COMPILER_FAMILYID 13 #ifdef __cplusplus #define PLATFORM_COMPILER_NECSX_CXX 1 #else #define PLATFORM_COMPILER_NECSX_C 1 #endif #elif defined(_MSC_VER) #define PLATFORM_COMPILER_MICROSOFT 1 #define PLATFORM_COMPILER_FAMILYNAME MICROSOFT #define PLATFORM_COMPILER_FAMILYID 14 #ifdef __cplusplus #define PLATFORM_COMPILER_MICROSOFT_CXX 1 #else #define PLATFORM_COMPILER_MICROSOFT_C 1 #endif #define PLATFORM_COMPILER_VERSION _MSC_VER #elif defined(__TINYC__) #define PLATFORM_COMPILER_TINY 1 #define PLATFORM_COMPILER_FAMILYNAME TINY #define PLATFORM_COMPILER_FAMILYID 15 #ifdef __cplusplus #define PLATFORM_COMPILER_TINY_CXX 1 #else #define PLATFORM_COMPILER_TINY_C 1 #endif #elif defined(__LCC__) #define PLATFORM_COMPILER_LCC 1 #define PLATFORM_COMPILER_FAMILYNAME LCC #define PLATFORM_COMPILER_FAMILYID 16 #ifdef __cplusplus #define PLATFORM_COMPILER_LCC_CXX 1 #else #define PLATFORM_COMPILER_LCC_C 1 #endif #elif defined(__OPENCC__) #define PLATFORM_COMPILER_OPEN64 1 #define PLATFORM_COMPILER_FAMILYNAME OPEN64 #define PLATFORM_COMPILER_FAMILYID 17 #ifdef __cplusplus #define PLATFORM_COMPILER_OPEN64_CXX 1 #else #define PLATFORM_COMPILER_OPEN64_C 1 #endif /* Note: can't use __OPENCC_PATCHLEVEL__ because it is sometimes non-integer (eg 3.2). Adding a cast would not result in a preprocessor constant expression. */ #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(__OPENCC__,__OPENCC_MINOR__,0) #define PLATFORM_COMPILER_VERSION_STR __OPEN64__ #elif defined(__PCC__) #define PLATFORM_COMPILER_PCC 1 #define PLATFORM_COMPILER_FAMILYNAME PCC #define PLATFORM_COMPILER_FAMILYID 18 #ifdef __cplusplus #define PLATFORM_COMPILER_PCC_CXX 1 #else #define PLATFORM_COMPILER_PCC_C 1 #endif #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(__PCC__,__PCC_MINOR__,__PCC_MINORMINOR__) #define PLATFORM_COMPILER_VERSION_STR \ PLATFORM_STRINGIFY(__PCC__) "." PLATFORM_STRINGIFY(__PCC_MINOR__) "." PLATFORM_STRINGIFY(__PCC_MINORMINOR__) #elif defined(__clang__) #define PLATFORM_COMPILER_CLANG 1 #define PLATFORM_COMPILER_FAMILYNAME CLANG #define PLATFORM_COMPILER_FAMILYID 19 #ifdef __cplusplus #define PLATFORM_COMPILER_CLANG_CXX 1 #else #define PLATFORM_COMPILER_CLANG_C 1 #endif #ifdef __clang_version__ /* clang 2.7 (gcc 4.2.1 compliant) and earlier lacked specific version identification */ #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(__clang_major__,__clang_minor__,__clang_patchlevel__) #define PLATFORM_COMPILER_VERSION_STR __clang_version__ #endif /* NOTE: PLATFORM_COMPILER_FAMILYID "20" is allocated to NVHPC, appearing earlier */ #else /* unknown compiler */ #define PLATFORM_COMPILER_UNKNOWN 1 #endif /* this stanza comes last, because many vendor compilers lie and claim to be GNU C for compatibility reasons and/or because they share a frontend */ #undef _PLATFORM_COMPILER_GNU_VERSION_STR #undef __PLATFORM_COMPILER_GNU_VERSION_STR #if defined(__GNUC__) #undef PLATFORM_COMPILER_UNKNOWN #ifndef PLATFORM_COMPILER_FAMILYID #define PLATFORM_COMPILER_GNU 1 #define PLATFORM_COMPILER_FAMILYNAME GNU #define PLATFORM_COMPILER_FAMILYID 1 #ifdef __cplusplus #define PLATFORM_COMPILER_GNU_CXX 1 #else #define PLATFORM_COMPILER_GNU_C 1 #endif #if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__) #elif defined(__GNUC_MINOR__) /* older versions of egcs lack __GNUC_PATCHLEVEL__ */ #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(__GNUC__,__GNUC_MINOR__,0) #else #define PLATFORM_COMPILER_VERSION \ PLATFORM_COMPILER_VERSION_INT(__GNUC__,0,0) #endif #define PLATFORM_COMPILER_VERSION_STR __PLATFORM_COMPILER_GNU_VERSION_STR #else #define _PLATFORM_COMPILER_GNU_VERSION_STR __PLATFORM_COMPILER_GNU_VERSION_STR #endif /* gather any advertised GNU version number info, even for non-gcc compilers */ #if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) #define __PLATFORM_COMPILER_GNU_VERSION_STR \ PLATFORM_STRINGIFY(__GNUC__) "." PLATFORM_STRINGIFY(__GNUC_MINOR__) "." PLATFORM_STRINGIFY(__GNUC_PATCHLEVEL__) #elif defined(__GNUC_MINOR__) #define __PLATFORM_COMPILER_GNU_VERSION_STR \ PLATFORM_STRINGIFY(__GNUC__) "." PLATFORM_STRINGIFY(__GNUC_MINOR__) ".?" #else #define __PLATFORM_COMPILER_GNU_VERSION_STR \ PLATFORM_STRINGIFY(__GNUC__) ".?.?" #endif #elif defined(PLATFORM_COMPILER_UNKNOWN) /* unknown compiler */ #define PLATFORM_COMPILER_FAMILYNAME UNKNOWN #define PLATFORM_COMPILER_FAMILYID 0 #endif /* defaulting */ #ifndef PLATFORM_COMPILER_VERSION #define PLATFORM_COMPILER_VERSION 0 /* don't know */ #endif #ifndef PLATFORM_COMPILER_VERSION_STR #define PLATFORM_COMPILER_VERSION_STR PLATFORM_STRINGIFY(PLATFORM_COMPILER_VERSION) #endif #ifndef PLATFORM_COMPILER_VERSION_INT #define PLATFORM_COMPILER_VERSION_INT(maj,min,pat) \ (((maj) << 16) | ((min) << 8) | (pat)) #endif /* version check macros */ #define PLATFORM_COMPILER_VERSION_GT(maj,min,pat) \ PLATFORM_COMPILER_VERSION > PLATFORM_COMPILER_VERSION_INT(maj,min,pat) #define PLATFORM_COMPILER_VERSION_GE(maj,min,pat) \ PLATFORM_COMPILER_VERSION >= PLATFORM_COMPILER_VERSION_INT(maj,min,pat) #define PLATFORM_COMPILER_VERSION_EQ(maj,min,pat) \ PLATFORM_COMPILER_VERSION == PLATFORM_COMPILER_VERSION_INT(maj,min,pat) #define PLATFORM_COMPILER_VERSION_LE(maj,min,pat) \ PLATFORM_COMPILER_VERSION <= PLATFORM_COMPILER_VERSION_INT(maj,min,pat) #define PLATFORM_COMPILER_VERSION_LT(maj,min,pat) \ PLATFORM_COMPILER_VERSION < PLATFORM_COMPILER_VERSION_INT(maj,min,pat) /* misc feature detection */ #ifdef __cplusplus #define PLATFORM_COMPILER_ID (10000+PLATFORM_COMPILER_FAMILYID) #else #define PLATFORM_COMPILER_ID PLATFORM_COMPILER_FAMILYID #endif /* default language spec conformance detection */ #if !defined(PLATFORM_COMPILER_C_LANGLVL) && !defined(PLATFORM_COMPILER_CXX_LANGLVL) #if defined(__cplusplus) && (__cplusplus > 0) /* C++98 or newer */ #define PLATFORM_COMPILER_CXX_LANGLVL __cplusplus #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 0) /* C95 or newer */ #define PLATFORM_COMPILER_C_LANGLVL __STDC_VERSION__ #elif defined(__STDC__) && !defined(__cplusplus) && !defined(__STDC_VERSION__) /* C89/C90 */ #define PLATFORM_COMPILER_C_LANGLVL 199000L #else /* unknown - leave both undef */ #endif #endif #undef _PLATFORM_COMPILER_STD_STDC #ifdef __STDC__ #define _PLATFORM_COMPILER_STD_STDC "__STDC__" #else #define _PLATFORM_COMPILER_STD_STDC "-" #endif #undef _PLATFORM_COMPILER_STD_STDC_VERSION #ifdef __STDC_VERSION__ #define _PLATFORM_COMPILER_STD_STDC_VERSION ",__STDC_VERSION__=" PLATFORM_STRINGIFY(__STDC_VERSION__) #else #define _PLATFORM_COMPILER_STD_STDC_VERSION #endif #undef _PLATFORM_COMPILER_STD_STDC_EXT #ifdef __STDC_EXT__ #define _PLATFORM_COMPILER_STD_STDC_EXT ",__STDC_EXT__=" PLATFORM_STRINGIFY(__STDC_EXT__) #else #define _PLATFORM_COMPILER_STD_STDC_EXT #endif #undef _PLATFORM_COMPILER_STD_CPLUSPLUS #ifdef __cplusplus #define _PLATFORM_COMPILER_STD_CPLUSPLUS ",__cplusplus=" PLATFORM_STRINGIFY(__cplusplus) #else #define _PLATFORM_COMPILER_STD_CPLUSPLUS #endif #undef _PLATFORM_COMPILER_MISC_VERSION_STR #ifndef _PLATFORM_COMPILER_MISC_VERSION_STR #ifdef __VERSION__ #define _PLATFORM_COMPILER_MISC_VERSION_STR "|misc:" __VERSION__ #else #define _PLATFORM_COMPILER_MISC_VERSION_STR #endif #endif #undef _PLATFORM_COMPILER_GNU_VERSION_STR_HELP #ifdef _PLATFORM_COMPILER_GNU_VERSION_STR #define _PLATFORM_COMPILER_GNU_VERSION_STR_HELP "|GNU:" _PLATFORM_COMPILER_GNU_VERSION_STR #else #define _PLATFORM_COMPILER_GNU_VERSION_STR_HELP #endif #define PLATFORM_COMPILER_IDSTR \ "|COMPILER_FAMILY:" \ PLATFORM_STRINGIFY(PLATFORM_COMPILER_FAMILYNAME) \ "|COMPILER_VERSION:" PLATFORM_COMPILER_VERSION_STR \ "|COMPILER_FAMILYID:" \ PLATFORM_STRINGIFY(PLATFORM_COMPILER_FAMILYID) \ _PLATFORM_COMPILER_GNU_VERSION_STR_HELP \ "|STD:" _PLATFORM_COMPILER_STD_STDC \ _PLATFORM_COMPILER_STD_STDC_VERSION \ _PLATFORM_COMPILER_STD_STDC_EXT \ _PLATFORM_COMPILER_STD_CPLUSPLUS \ _PLATFORM_COMPILER_MISC_VERSION_STR \ "|" /* ------------------------------------------------------------------------------------ */ /* OS detection */ /* PLATFORM_OS_: defined to a positive value if OS belongs to a given family, undef otherwise PLATFORM_OS_FAMILYNAME: unquoted token which provides the OS family name Some systems also define a subfamily: PLATFORM_OS_SUBFAMILY_: positive value or undef PLATFORM_OS_SUBFAMILYNAME: unquoted token for subfamily name or undef */ #if defined(__LIBCATAMOUNT__) || defined(__QK_USER__) #define PLATFORM_OS_CATAMOUNT 1 #define PLATFORM_OS_FAMILYNAME CATAMOUNT #elif defined(GASNETI_ARCH_BGP) || defined(__bgp__) #define PLATFORM_OS_BGP 1 #define PLATFORM_OS_FAMILYNAME BGP #elif defined(GASNETI_ARCH_BGQ) || defined(__bgq__) #define PLATFORM_OS_BGQ 1 #define PLATFORM_OS_FAMILYNAME BGQ #elif defined(__K42) #define PLATFORM_OS_K42 1 #define PLATFORM_OS_FAMILYNAME K42 #elif defined(__uClinux__) #define PLATFORM_OS_UCLINUX 1 #define PLATFORM_OS_FAMILYNAME UCLINUX #elif defined(__linux) || defined(__linux__) || defined(__gnu_linux__) #define PLATFORM_OS_LINUX 1 #define PLATFORM_OS_FAMILYNAME LINUX #if defined(GASNETI_ARCH_WSL) #define PLATFORM_OS_SUBFAMILY_WSL 1 #define PLATFORM_OS_SUBFAMILYNAME WSL #elif defined(__CRAYXT_COMPUTE_LINUX_TARGET) /* NOTE: As of 2022-07 this is ONLY defined for the Cray cc/CC wrappers, and not the raw PrgEnv compilers */ #define PLATFORM_OS_SUBFAMILY_CNL 1 #define PLATFORM_OS_SUBFAMILYNAME CNL #endif #elif defined(__blrts) || defined(__blrts__) || defined(__gnu_blrts__) #define PLATFORM_OS_BLRTS 1 #define PLATFORM_OS_FAMILYNAME BLRTS #elif defined(__CYGWIN__) #define PLATFORM_OS_CYGWIN 1 #define PLATFORM_OS_FAMILYNAME CYGWIN #elif defined(_WIN32) #define PLATFORM_OS_MSWINDOWS 1 #define PLATFORM_OS_FAMILYNAME MSWINDOWS #elif defined(_AIX) #define PLATFORM_OS_AIX 1 #define PLATFORM_OS_FAMILYNAME AIX #elif defined(__osf__) || defined(__digital__) #define PLATFORM_OS_TRU64 1 #define PLATFORM_OS_FAMILYNAME TRU64 #elif defined(__FreeBSD) || defined(__FreeBSD__) #define PLATFORM_OS_FREEBSD 1 #define PLATFORM_OS_FAMILYNAME FREEBSD #elif defined(__NetBSD) || defined(__NetBSD__) #define PLATFORM_OS_NETBSD 1 #define PLATFORM_OS_FAMILYNAME NETBSD #elif defined(__OpenBSD__) #define PLATFORM_OS_OPENBSD 1 #define PLATFORM_OS_FAMILYNAME OPENBSD #elif defined(__sun) || defined(__sun__) #define PLATFORM_OS_SOLARIS 1 #define PLATFORM_OS_FAMILYNAME SOLARIS #elif (defined(__APPLE__) && defined(__MACH__)) || \ defined(__osx86__) /* PGI on OSX */ #define PLATFORM_OS_DARWIN 1 #define PLATFORM_OS_FAMILYNAME DARWIN #elif defined(__sgi) || defined(__sgi__) #define PLATFORM_OS_IRIX 1 #define PLATFORM_OS_FAMILYNAME IRIX #elif defined(__hpux) || defined(__hpux__) #define PLATFORM_OS_HPUX 1 #define PLATFORM_OS_FAMILYNAME HPUX #elif defined(_CRAY) || defined(_UNICOSMP) #define PLATFORM_OS_UNICOS 1 #define PLATFORM_OS_FAMILYNAME UNICOS #elif defined(__MTA__) #define PLATFORM_OS_MTA 1 #define PLATFORM_OS_FAMILYNAME MTA #elif defined(_SX) #define PLATFORM_OS_SUPERUX 1 #define PLATFORM_OS_FAMILYNAME SUPERUX #else #define PLATFORM_OS_UNKNOWN 1 #define PLATFORM_OS_FAMILYNAME UNKNOWN #endif /* ------------------------------------------------------------------------------------ */ /* Architecture detection */ /* PLATFORM_ARCH_: defined to positive value if CPU belongs to a given family, undef otherwise PLATFORM_ARCH_FAMILYNAME: unquoted token which provides the CPU family name PLATFORM_ARCH_32 - 32-bit pointers PLATFORM_ARCH_64 - 64-bit pointers PLATFORM_ARCH_BIG_ENDIAN - big-endian word order PLATFORM_ARCH_LITTLE_ENDIAN - little-endian word order defined to positive value if CPU is known to have the indicated property, undef otherwise */ #if defined(__ppc64) || defined(__ppc64__) || \ defined(__PPC64) || defined(__PPC64__) || \ defined(__powerpc64) || defined(__powerpc64__) #define PLATFORM_ARCH_POWERPC 1 #define PLATFORM_ARCH_FAMILYNAME POWERPC #define _PLATFORM_ARCH_64 1 #define _PLATFORM_ARCH_BIG_ENDIAN 1 #elif defined(_POWER) || \ defined(__PPC) || defined(__PPC__) || \ defined(__powerpc) || defined(__powerpc__) || \ defined(__ppc) || defined(__ppc__) || \ defined(__POWERPC__) #define PLATFORM_ARCH_POWERPC 1 #define PLATFORM_ARCH_FAMILYNAME POWERPC #define _PLATFORM_ARCH_32 1 #define _PLATFORM_ARCH_BIG_ENDIAN 1 #elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) #define PLATFORM_ARCH_POWERPC 1 #define PLATFORM_ARCH_FAMILYNAME POWERPC #define _PLATFORM_ARCH_BIG_ENDIAN 1 #elif defined(__KNC__) || defined(__MIC__) #define PLATFORM_ARCH_MIC 1 #define PLATFORM_ARCH_FAMILYNAME MIC #define _PLATFORM_ARCH_64 1 #define _PLATFORM_ARCH_LITTLE_ENDIAN 1 #elif defined(__x86_64) || defined(__x86_64__) || \ defined(__athlon) || defined(__athlon__) || \ defined(__amd64) || defined(__amd64__) #define PLATFORM_ARCH_X86_64 1 #define PLATFORM_ARCH_FAMILYNAME X86_64 #define _PLATFORM_ARCH_64 1 #define _PLATFORM_ARCH_LITTLE_ENDIAN 1 #elif defined(__ia64__) || defined(__ia64) #define PLATFORM_ARCH_IA64 1 #define PLATFORM_ARCH_FAMILYNAME IA64 #define _PLATFORM_ARCH_64 1 #if defined(PLATFORM_OS_LINUX) || defined(PLATFORM_OS_FREEBSD) #define _PLATFORM_ARCH_LITTLE_ENDIAN 1 #elif defined(PLATFORM_OS_HPUX) #define _PLATFORM_ARCH_BIG_ENDIAN 1 #else /* Unknown. Hope one of the other mechanisms can sort it out. */ #endif #elif defined(__i386__) || defined(__i386) || \ defined(__i486__) || defined(__i486) || \ defined(__i586__) || defined(__i586) || \ defined(__i686__) || defined(__i686) || \ defined(__pentiumpro) || defined(__pentiumpro__) || \ defined(_M_IX86) #define PLATFORM_ARCH_X86 1 #define PLATFORM_ARCH_FAMILYNAME X86 #define _PLATFORM_ARCH_32 1 #define _PLATFORM_ARCH_LITTLE_ENDIAN 1 #elif defined(__alpha) || defined(__alpha__) #define PLATFORM_ARCH_ALPHA 1 #define PLATFORM_ARCH_FAMILYNAME ALPHA #define _PLATFORM_ARCH_64 1 #define _PLATFORM_ARCH_LITTLE_ENDIAN 1 #elif defined(_mips) || defined(__mips) || defined(__mips__) || \ defined(__host_mips) || defined(__host_mips__) || \ defined(_MIPS_ARCH) || defined(__R4000) #define PLATFORM_ARCH_MIPS 1 #define PLATFORM_ARCH_FAMILYNAME MIPS #ifdef _MIPSEL /* MIPS cores support both little and big endian modes */ /* SiCortex */ #define _PLATFORM_ARCH_LITTLE_ENDIAN 1 #else /* IRIX */ #define _PLATFORM_ARCH_BIG_ENDIAN 1 #endif #ifdef _MIPS_SZPTR #if _MIPS_SZPTR == 32 #define _PLATFORM_ARCH_32 1 #elif _MIPS_SZPTR == 64 #define _PLATFORM_ARCH_64 1 #endif #endif #elif defined(__sparc) || defined(__sparc__) || \ defined(__sparclet__) || defined(__sparclite__) || \ defined(__sparcv8) || defined(__sparcv9) #define PLATFORM_ARCH_SPARC 1 #define PLATFORM_ARCH_FAMILYNAME SPARC #define _PLATFORM_ARCH_BIG_ENDIAN 1 #elif defined(__hppa) || defined(__hppa__) || \ defined(__parisc) || defined(__parisc__) || \ defined(_PA_RISC1_1) || defined(_PA_RISC2_0) #define PLATFORM_ARCH_PARISC 1 #define PLATFORM_ARCH_FAMILYNAME PARISC #define _PLATFORM_ARCH_BIG_ENDIAN 1 #elif defined(__crayx1) #define PLATFORM_ARCH_CRAYX1 1 #define PLATFORM_ARCH_FAMILYNAME CRAYX1 #define _PLATFORM_ARCH_BIG_ENDIAN 1 #define _PLATFORM_ARCH_64 1 #elif defined(_CRAYT3E) #define PLATFORM_ARCH_CRAYT3E 1 #define PLATFORM_ARCH_FAMILYNAME CRAYT3E #define _PLATFORM_ARCH_BIG_ENDIAN 1 #define _PLATFORM_ARCH_64 1 #elif defined(__MTA__) #define PLATFORM_ARCH_MTA 1 #define PLATFORM_ARCH_FAMILYNAME MTA #elif defined(_SX) #define PLATFORM_ARCH_NECSX 1 #define PLATFORM_ARCH_FAMILYNAME NECSX #elif defined(__MICROBLAZE__) #define PLATFORM_ARCH_MICROBLAZE 1 #define PLATFORM_ARCH_FAMILYNAME MICROBLAZE #define _PLATFORM_ARCH_BIG_ENDIAN 1 #define _PLATFORM_ARCH_32 1 #elif defined(__arm__) #define PLATFORM_ARCH_ARM 1 #define PLATFORM_ARCH_FAMILYNAME ARM #define _PLATFORM_ARCH_32 1 #if defined(__ARMEB__) #define _PLATFORM_ARCH_BIG_ENDIAN 1 #elif defined(__ARMEL__) #define _PLATFORM_ARCH_LITTLE_ENDIAN 1 #endif #elif defined(__aarch64__) #define PLATFORM_ARCH_AARCH64 1 #define PLATFORM_ARCH_FAMILYNAME AARCH64 #if defined(__AARCH64EB__) #define _PLATFORM_ARCH_BIG_ENDIAN 1 #elif defined(__AARCH64EL__) #define _PLATFORM_ARCH_LITTLE_ENDIAN 1 #endif #elif defined(__tile__) #define PLATFORM_ARCH_TILE 1 #define PLATFORM_ARCH_FAMILYNAME TILE #define _PLATFORM_ARCH_LITTLE_ENDIAN 1 #if defined(__tilegx__) #define _PLATFORM_ARCH_64 1 #else #define _PLATFORM_ARCH_32 1 #endif #elif defined(__s390__) #define PLATFORM_ARCH_S390 1 #define PLATFORM_ARCH_FAMILYNAME S390 #define _PLATFORM_ARCH_BIG_ENDIAN 1 #if defined(__s390x__) #define _PLATFORM_ARCH_64 1 #else #define _PLATFORM_ARCH_32 1 #endif #elif defined(__riscv) #define PLATFORM_ARCH_RISCV 1 #define PLATFORM_ARCH_FAMILYNAME RISCV #define _PLATFORM_ARCH_LITTLE_ENDIAN 1 #if __riscv_xlen == 32 #define _PLATFORM_ARCH_32 1 #else /* (__riscv_xlen == 64) || (__riscv_xlen == 128) */ #define _PLATFORM_ARCH_64 1 #endif #else /* unknown CPU */ #define PLATFORM_ARCH_UNKNOWN 1 #define PLATFORM_ARCH_FAMILYNAME UNKNOWN #endif /* generic chip properties */ #if defined(PLATFORM_ARCH_BIG_ENDIAN) || defined(PLATFORM_ARCH_LITTLE_ENDIAN) #error internal error in endianness configuration #endif /* PLATFORM_ARCH_{BIG,LITTLE}_ENDIAN: first detect common preprocessor defines then default to any arch-specific value provided */ #if defined(__BIG_ENDIAN__) || defined(WORDS_BIGENDIAN) || \ ( __BYTE_ORDER__ > 0 && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ) #define PLATFORM_ARCH_BIG_ENDIAN 1 #elif defined(__LITTLE_ENDIAN__) || defined(WORDS_LITTLEENDIAN) || \ ( __BYTE_ORDER__ > 0 && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ) #define PLATFORM_ARCH_LITTLE_ENDIAN 1 #elif defined(_PLATFORM_ARCH_BIG_ENDIAN) #define PLATFORM_ARCH_BIG_ENDIAN 1 #elif defined(_PLATFORM_ARCH_LITTLE_ENDIAN) #define PLATFORM_ARCH_LITTLE_ENDIAN 1 #endif #undef _PLATFORM_ARCH_BIG_ENDIAN #undef _PLATFORM_ARCH_LITTLE_ENDIAN #if defined(PLATFORM_ARCH_BIG_ENDIAN) && defined(PLATFORM_ARCH_LITTLE_ENDIAN) #error conflicting endianness information #endif /* PLATFORM_ARCH_{32,64}: first trust SIZEOF_VOID_P, which is most likely to be accurate next, detect common 32/64 preprocessor defines finally default to any arch-specific value provided */ #if defined(PLATFORM_ARCH_64) || defined(PLATFORM_ARCH_32) #error internal error in bit width configuration #endif #if SIZEOF_VOID_P == 8 #define PLATFORM_ARCH_64 1 #elif SIZEOF_VOID_P == 4 #define PLATFORM_ARCH_32 1 #elif defined(_LP64) || defined(__LP64__) || \ defined(__arch64__) || defined(__64BIT__) || \ __INTPTR_MAX__ > 2147483647 #define PLATFORM_ARCH_64 1 #elif defined(_ILP32) || defined(__ILP32__) || \ defined(__arch32__) || defined(__32BIT__) || \ __INTPTR_MAX__ == 2147483647 #define PLATFORM_ARCH_32 1 #elif defined(_PLATFORM_ARCH_64) #define PLATFORM_ARCH_64 1 #elif defined(_PLATFORM_ARCH_32) #define PLATFORM_ARCH_32 1 #endif #undef _PLATFORM_ARCH_64 #undef _PLATFORM_ARCH_32 #if defined(PLATFORM_ARCH_64) && defined(PLATFORM_ARCH_32) #error conflicting bit width information #elif !defined(PLATFORM_ARCH_64) && !defined(PLATFORM_ARCH_32) #error missing bit width information #endif /* ------------------------------------------------------------------------------------ */ /* handy test code that can be parsed after preprocess or executed to show platform results */ #ifdef PLATFORM_SHOW #include #include const char * COMPILER_FAMILYNAME = PLATFORM_STRINGIFY(PLATFORM_COMPILER_FAMILYNAME) , * COMPILER_FAMILYID = PLATFORM_STRINGIFY(PLATFORM_COMPILER_FAMILYID) , * COMPILER_VERSION_STR = PLATFORM_COMPILER_VERSION_STR , * COMPILER_IDSTR = PLATFORM_COMPILER_IDSTR , * OS_FAMILYNAME = PLATFORM_STRINGIFY(PLATFORM_OS_FAMILYNAME) , * ARCH_FAMILYNAME = PLATFORM_STRINGIFY(PLATFORM_ARCH_FAMILYNAME) ; int main(void) { #define PLATFORM_DISP(x) printf("PLATFORM_"#x"=%s\n",x) #define PLATFORM_DISPI(x) printf("PLATFORM_"#x"=%li\n",(long int)PLATFORM_##x) #define PLATFORM_DISPX(x) printf("PLATFORM_"#x"=0x%lx\n",(long int)PLATFORM_##x) PLATFORM_DISP(COMPILER_FAMILYNAME); PLATFORM_DISP(COMPILER_FAMILYID); PLATFORM_DISPI(COMPILER_ID); PLATFORM_DISPX(COMPILER_VERSION); PLATFORM_DISP(COMPILER_VERSION_STR); PLATFORM_DISP(COMPILER_IDSTR); #ifdef PLATFORM_COMPILER_C_LANGLVL PLATFORM_DISPI(COMPILER_C_LANGLVL); #elif defined(PLATFORM_COMPILER_CXX_LANGLVL) PLATFORM_DISPI(COMPILER_CXX_LANGLVL); #else printf("WARNING: Missing PLATFORM_COMPILER_C(XX)_LANGLVL!"); #endif PLATFORM_DISP(OS_FAMILYNAME); #ifdef PLATFORM_OS_SUBFAMILYNAME { const char * OS_SUBFAMILYNAME = PLATFORM_STRINGIFY(PLATFORM_OS_SUBFAMILYNAME); PLATFORM_DISP(OS_SUBFAMILYNAME); } #endif PLATFORM_DISP(ARCH_FAMILYNAME); #ifdef PLATFORM_ARCH_32 PLATFORM_DISPI(ARCH_32); assert(sizeof(void *) == 4); #else PLATFORM_DISPI(ARCH_64); assert(sizeof(void *) == 8); #endif { int x = 0x00FF; unsigned char *p = (unsigned char *)&x; #ifdef PLATFORM_ARCH_BIG_ENDIAN PLATFORM_DISPI(ARCH_BIG_ENDIAN); assert(*p == 0); #else PLATFORM_DISPI(ARCH_LITTLE_ENDIAN); assert(*p == 0xFF); #endif } return 0; } #endif /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/other/portable_inttypes.h0000664000175000017500000003256715142313673020500 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/portable_inttypes.h $ */ /* Description: portable_inttypes.h */ /* Copyright 2004, Dan Bonachea */ /* inttypes.h is part of the POSIX and C99 specs, but in practice support for it varies wildly across systems. We need a totally portable way to unambiguously get the fixed-bit-width integral types, and this file provides that via the following typedefs: int8_t, uint8_t signed/unsigned 8-bit integral types int16_t, uint16_t signed/unsigned 16-bit integral types int32_t, uint32_t signed/unsigned 32-bit integral types int64_t, uint64_t signed/unsigned 64-bit integral types intptr_t, uintptr_t signed/unsigned types big enough to hold any pointer offset In general, it uses the system inttypes.h when it's known to be available, (as reported by configure via a previously-included config.h file), otherwise it uses configure-detected sizes for the types to try and auto construct the types. Some specific systems with known issues are handled specially. */ #ifndef _PORTABLE_INTTYPES_H #define _PORTABLE_INTTYPES_H #ifndef _INTTYPES_DEFINED #define _INTTYPES_DEFINED /* compilers complying to modern standards shouldn't need this header at all */ #if (__cplusplus >= 201103L || __STDC_VERSION__ >= 199901L) && !defined(COMPLETE_INTTYPES_H) #define COMPLETE_INTTYPES_H 1 #endif /* first, check for the easy and preferred case - if configure reports that a standards-compliant system header is available, then use it */ #if COMPLETE_INTTYPES_H /* inttypes.h is preferred, because it also provides format specifiers */ #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS 1 /* C99 mandates this predef for C++ clients */ #endif #include #elif COMPLETE_STDINT_H #include #elif COMPLETE_SYS_TYPES_H #include /* next, certain known systems are handled specially */ #elif defined(_WIN32) && defined(_MSC_VER) /* MS Visual C++ */ typedef signed __int8 int8_t; typedef unsigned __int8 uint8_t; typedef __int16 int16_t; typedef unsigned __int16 uint16_t; typedef __int32 int32_t; typedef unsigned __int32 uint32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; typedef int intptr_t; typedef unsigned int uintptr_t; #elif defined(_CRAYT3E) /* oddball architecture lacking a 16-bit type */ #define INTTYPES_16BIT_MISSING 1 typedef signed char int8_t; typedef unsigned char uint8_t; typedef short int16_t; /* This is 32-bits, should be 16 !!! */ typedef unsigned short uint16_t; /* This is 32-bits, should be 16 !!! */ typedef short int32_t; typedef unsigned short uint32_t; typedef int int64_t; typedef unsigned int uint64_t; typedef int intptr_t; typedef unsigned int uintptr_t; #elif defined(__MTA__) #include typedef u_int8_t uint8_t; typedef u_int16_t uint16_t; typedef u_int32_t uint32_t; typedef u_int64_t uint64_t; typedef int64_t intptr_t; typedef u_int64_t uintptr_t; #elif defined(_SX) #include /* provides int32_t and uint32_t - use to prevent conflict */ typedef signed char int8_t; typedef unsigned char uint8_t; typedef short int16_t; typedef unsigned short uint16_t; typedef long int64_t; typedef unsigned long uint64_t; typedef long intptr_t; typedef unsigned long uintptr_t; #elif defined(__CYGWIN__) #include #if CYGWIN_VERSION_DLL_MAJOR >= 2005 /* stdint.h is complete on modern cygwin */ #include #else /* what a mess - inttypes.h and stdint.h are incomplete or missing on older versions of cygwin, with no easy way to check */ #ifdef HAVE_INTTYPES_H #include #endif #ifdef HAVE_STDINT_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifndef __uint32_t_defined typedef u_int8_t uint8_t; typedef u_int16_t uint16_t; typedef u_int32_t uint32_t; typedef u_int64_t uint64_t; #endif #ifndef __intptr_t_defined typedef int intptr_t; typedef unsigned int uintptr_t; #endif #endif #elif defined(SIZEOF_CHAR) && \ defined(SIZEOF_SHORT) && \ defined(SIZEOF_INT) && \ defined(SIZEOF_LONG) && \ defined(SIZEOF_LONG_LONG) && \ defined(SIZEOF_VOID_P) /* configure-detected integer sizes are available, * so use those to automatically detect the sizes * system headers may typedef some subset of these, * so we cannot safely use typedefs here * so use macros instead */ /* first include the system headers if we know we have them, to try and avoid conflicts */ #ifdef HAVE_INTTYPES_H #include #endif #ifdef HAVE_STDINT_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #if SIZEOF_CHAR == 1 typedef signed char _pit_int8_t; typedef unsigned char _pit_uint8_t; #else #error Cannot find an 8-bit type for your platform #endif #if SIZEOF_CHAR == 2 typedef signed char _pit_int16_t; typedef unsigned char _pit_uint16_t; #elif SIZEOF_SHORT == 2 typedef short _pit_int16_t; typedef unsigned short _pit_uint16_t; #elif SIZEOF_INT == 2 typedef int _pit_int16_t; typedef unsigned int _pit_uint16_t; #else #error Cannot find a 16-bit type for your platform #endif #if SIZEOF_SHORT == 4 typedef short _pit_int32_t; typedef unsigned short _pit_uint32_t; #elif SIZEOF_INT == 4 typedef int _pit_int32_t; typedef unsigned int _pit_uint32_t; #elif SIZEOF_LONG == 4 typedef long _pit_int32_t; typedef unsigned long _pit_uint32_t; #else #error Cannot find a 32-bit type for your platform #endif #if SIZEOF_INT == 8 typedef int _pit_int64_t; typedef unsigned int _pit_uint64_t; #elif SIZEOF_LONG == 8 typedef long _pit_int64_t; typedef unsigned long _pit_uint64_t; #elif SIZEOF_LONG_LONG == 8 typedef long long _pit_int64_t; typedef unsigned long long _pit_uint64_t; #else #error Cannot find a 64-bit type for your platform #endif #if SIZEOF_VOID_P == SIZEOF_SHORT typedef short _pit_intptr_t; typedef unsigned short _pit_uintptr_t; #elif SIZEOF_VOID_P == SIZEOF_INT typedef int _pit_intptr_t; typedef unsigned int _pit_uintptr_t; #elif SIZEOF_VOID_P == SIZEOF_LONG typedef long _pit_intptr_t; typedef unsigned long _pit_uintptr_t; #elif SIZEOF_VOID_P == SIZEOF_LONG_LONG typedef long long _pit_intptr_t; typedef unsigned long long _pit_uintptr_t; #else #error Cannot find a integral pointer-sized type for your platform #endif #define int8_t _pit_int8_t #define uint8_t _pit_uint8_t #define int16_t _pit_int16_t #define uint16_t _pit_uint16_t #define int32_t _pit_int32_t #define uint32_t _pit_uint32_t #define int64_t _pit_int64_t #define uint64_t _pit_uint64_t #define intptr_t _pit_intptr_t #define uintptr_t _pit_uintptr_t #else /* no information available, so try inttypes.h and hope for the best if we die here, the correct fix is to detect the sizes using configure (and include *config.h before this file). */ #include #endif #endif /* _INTTYPES_DEFINED */ #endif /* _PORTABLE_INTTYPES_H */ /* Fixed-width printf/scanf format specifiers to go with the types defined above. * C99-compliant inttypes.h should already provide these, so here we just ensure * that's the case for the ones we care about and provide a last-ditch effort otherwise. * These are processed on every include of this header, to allow context-dependent adjustment. * * Currently only worry about the 64-bit and PTR versions. * * Also provide the following best-effort extensions, as replacements for C99 length modifiers t and z: * PRI[diouxX]SZ - size_t (signed or unsigned) * PRI[diouxX]PD - ptrdiff_t (signed or unsigned) * these require at least ONE of: * 1. GASNet configure results * 2. Advertised C99 support (via __STDC_VERSION__) * 3. Defines of __PRISZ_PREFIX and __PRIPD_PREFIX selecting the prefix to use * 4. Defines of HAVE_C99_FORMAT_SPECIFIERS to enable/disable use of C99 versions and * SIZEOF_{INT,LONG,LONG_LONG) defines when disabled. */ #if HAVE_C99_FORMAT_SPECIFIERS || \ (!defined(HAVE_C99_FORMAT_SPECIFIERS) && __STDC_VERSION__ >= 199901L) /* prefer libc-provided length modifiers added in C99 if we can determine they are available */ #ifndef __PRISZ_PREFIX #define __PRISZ_PREFIX "z" #endif #ifndef __PRIPD_PREFIX #define __PRIPD_PREFIX "t" #endif #endif #if !defined(__PRISZ_PREFIX) && SIZEOF_SIZE_T /* use configure info when available */ #if SIZEOF_SIZE_T == SIZEOF_INT #define __PRISZ_PREFIX #elif SIZEOF_SIZE_T == SIZEOF_LONG #define __PRISZ_PREFIX "l" #elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG #define __PRISZ_PREFIX "ll" #endif #endif #if !defined(__PRIPD_PREFIX) && SIZEOF_PTRDIFF_T /* use configure info when available */ #if SIZEOF_PTRDIFF_T == SIZEOF_INT #define __PRIPD_PREFIX #elif SIZEOF_PTRDIFF_T == SIZEOF_LONG #define __PRIPD_PREFIX "l" #elif SIZEOF_PTRDIFF_T == SIZEOF_LONG_LONG #define __PRIPD_PREFIX "ll" #endif #endif #if !defined(__PRI64_PREFIX) /* use configure info when available */ #if SIZEOF_LONG == 8 #define __PRI64_PREFIX "l" #elif SIZEOF_INT == 8 #define __PRI64_PREFIX #elif SIZEOF_LONG_LONG == 8 #define __PRI64_PREFIX "ll" #endif #endif #if !defined(__PRIPTR_PREFIX) && SIZEOF_VOID_P /* use configure info when available */ #if SIZEOF_VOID_P == SIZEOF_LONG #define __PRIPTR_PREFIX "l" #elif SIZEOF_VOID_P == SIZEOF_INT #define __PRIPTR_PREFIX #elif SIZEOF_VOID_P == SIZEOF_LONG_LONG #define __PRIPTR_PREFIX "ll" #endif #endif /* last resort */ #if SIZEOF_VOID_P == 4 || PLATFORM_ARCH_32 || __INTPTR_MAX__ == 2147483647 /* assume ILP32 */ #ifndef __PRI64_PREFIX #define __PRI64_PREFIX "ll" #endif #ifndef __PRIPTR_PREFIX #define __PRIPTR_PREFIX #endif #else /* assume LP64 */ #ifndef __PRI64_PREFIX #define __PRI64_PREFIX "l" #endif #ifndef __PRIPTR_PREFIX #define __PRIPTR_PREFIX "l" #endif #endif #ifndef PRIi64 #define PRIi64 __PRI64_PREFIX "i" #endif #ifndef PRId64 #define PRId64 __PRI64_PREFIX "d" #endif #ifndef PRIu64 #define PRIu64 __PRI64_PREFIX "u" #endif #ifndef PRIo64 #define PRIo64 __PRI64_PREFIX "o" #endif #ifndef PRIx64 #define PRIx64 __PRI64_PREFIX "x" #endif #ifndef PRIX64 #define PRIX64 __PRI64_PREFIX "X" #endif #ifndef PRIiPTR #define PRIiPTR __PRIPTR_PREFIX "i" #endif #ifndef PRIdPTR #define PRIdPTR __PRIPTR_PREFIX "d" #endif #ifndef PRIuPTR #define PRIuPTR __PRIPTR_PREFIX "u" #endif #ifndef PRIoPTR #define PRIoPTR __PRIPTR_PREFIX "o" #endif #ifndef PRIxPTR #define PRIxPTR __PRIPTR_PREFIX "x" #endif #ifndef PRIXPTR #define PRIXPTR __PRIPTR_PREFIX "X" #endif #ifdef __PRISZ_PREFIX /* these are best-effort definitions - see above */ #ifndef PRIiSZ #define PRIiSZ __PRISZ_PREFIX "i" #endif #ifndef PRIdSZ #define PRIdSZ __PRISZ_PREFIX "d" #endif #ifndef PRIuSZ #define PRIuSZ __PRISZ_PREFIX "u" #endif #ifndef PRIoSZ #define PRIoSZ __PRISZ_PREFIX "o" #endif #ifndef PRIxSZ #define PRIxSZ __PRISZ_PREFIX "x" #endif #ifndef PRIXSZ #define PRIXSZ __PRISZ_PREFIX "X" #endif #endif #ifdef __PRIPD_PREFIX /* these are best-effort definitions - see above */ #ifndef PRIiPD #define PRIiPD __PRIPD_PREFIX "i" #endif #ifndef PRIdPD #define PRIdPD __PRIPD_PREFIX "d" #endif #ifndef PRIuPD #define PRIuPD __PRIPD_PREFIX "u" #endif #ifndef PRIoPD #define PRIoPD __PRIPD_PREFIX "o" #endif #ifndef PRIxPD #define PRIxPD __PRIPD_PREFIX "x" #endif #ifndef PRIXPD #define PRIXPD __PRIPD_PREFIX "X" #endif #endif #ifndef SCNi64 #define SCNi64 __PRI64_PREFIX "i" #endif #ifndef SCNd64 #define SCNd64 __PRI64_PREFIX "d" #endif #ifndef SCNu64 #define SCNu64 __PRI64_PREFIX "u" #endif #ifndef SCNo64 #define SCNo64 __PRI64_PREFIX "o" #endif #ifndef SCNx64 #define SCNx64 __PRI64_PREFIX "x" #endif #ifndef SCNiPTR #define SCNiPTR __PRIPTR_PREFIX "i" #endif #ifndef SCNdPTR #define SCNdPTR __PRIPTR_PREFIX "d" #endif #ifndef SCNuPTR #define SCNuPTR __PRIPTR_PREFIX "u" #endif #ifndef SCNoPTR #define SCNoPTR __PRIPTR_PREFIX "o" #endif #ifndef SCNxPTR #define SCNxPTR __PRIPTR_PREFIX "x" #endif gasnet-2025.8.0/other/Makefile-echovar.mak0000664000175000017500000000150215142313673020375 0ustar alastairalastairinclude $(FRAGMENT) .EXPORT_ALL_VARIABLES: # echovar: # output a VAR=VAL string for provided $(VAR) # if the variable is unset, the result is an empty VAL echovar: @echo $(VAR)=$($(VAR)) # Iterative form accepts variable names in $(VARS) echovars: @for var in $(VARS) ; do \ eval echo $$var=\$$$$var ; \ done # echovar-preserve-unset: # output a VAR=VAL string for provided $(VAR) # if the variable is unset, the result is no output echovar-preserve-unset: @if ! test -z $${$(VAR)+set} ; then \ echo $(VAR)=$($(VAR)) ; \ fi # Iterative form accepts variable names in $(VARS) echovars-preserve-unset: @for var in $(VARS) ; do \ if ! eval test -z \$${$${var}+set} ; then \ eval echo $$var=\$$$$var ; \ fi ; \ done .PHONY: echovar echovars echovar-preserve-unset echovars-preserve-unset gasnet-2025.8.0/other/portable_platform.h0000664000175000017500000000024415142313673020430 0ustar alastairalastair/* This file is a redirect for backwards compatibility * New code should directly #include "gasnet_portable_platform.h" */ #include "gasnet_portable_platform.h" gasnet-2025.8.0/other/pkgconfig-tools.pc0000664000175000017500000000036415142313673020177 0ustar alastairalastair Name: gasnet_tools-#thread_model# Description: GASNet Tools in #thread_model# threading mode URL: https://gasnet.lbl.gov Version: #version# Cflags: ${GASNETTOOLS_CPPFLAGS} ${GASNETTOOLS_CFLAGS} Libs: ${GASNETTOOLS_LDFLAGS} ${GASNETTOOLS_LIBS} gasnet-2025.8.0/other/ammpi/0000775000175000017500000000000015142313673015646 5ustar alastairalastairgasnet-2025.8.0/other/ammpi/ammpi.h0000664000175000017500000013774115142313673017137 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/ammpi/ammpi.h $ * Description: AMMPI Header * Copyright 2000, Dan Bonachea */ #ifndef __AMMPI_H #define __AMMPI_H #include #include #include #ifdef __cplusplus #define AMMPI_BEGIN_EXTERNC extern "C" { #define AMMPI_END_EXTERNC } #else #define AMMPI_BEGIN_EXTERNC #define AMMPI_END_EXTERNC #endif AMMPI_BEGIN_EXTERNC /* miscellaneous macro helpers */ #ifndef AMX_STRINGIFY #define _AMX_STRINGIFY_HELPER(x) #x #define AMX_STRINGIFY(x) _AMX_STRINGIFY_HELPER(x) #endif #ifndef AMX_CONCAT #define _AMX_CONCAT_HELPER(a,b) a ## b #define AMX_CONCAT(a,b) _AMX_CONCAT_HELPER(a,b) #endif #define AMMPI_LIBRARY_VERSION_MAJOR 2 #define AMMPI_LIBRARY_VERSION_MINOR 11 #define AMMPI_LIBRARY_VERSION AMMPI_LIBRARY_VERSION_MAJOR.AMMPI_LIBRARY_VERSION_MINOR #define AMMPI_LIBRARY_VERSION_STR AMX_STRINGIFY(AMMPI_LIBRARY_VERSION) /* naming policy: AM-defined things start with AM_ internal things start with ammpi_ or AMMPI_ */ /* ------------------------------------------------------------------------------------ */ /* Internal constants */ #define AMMPI_MAX_SHORT 16 /* max number of handler arguments, >=8 */ #define AMMPI_MAX_MEDIUM 65000 /* max. data transmission unit for medium messages, >= 512 */ #define AMMPI_MAX_LONG 65000 /* max. data transmission unit for large messages, >= 8192 */ #define AMMPI_MAX_NUMHANDLERS 256 /* max. handler-table entries >= 256 */ #define AMMPI_INIT_NUMTRANSLATIONS 256 #define AMMPI_MAX_NUMTRANSLATIONS (0x7FFFFFFFu) /* max. translation-table entries >= 256 */ #define AMMPI_MAX_SEGLENGTH ((uintptr_t)-1) /* max. dest_offset */ #define AMMPI_MAX_BUNDLES 255 /* max bundles that can be allocated */ #define AMMPI_MAX_SPMDPROCS AMMPI_MAX_NUMTRANSLATIONS /* max SPMD procs we support */ /* ------------------------------------------------------------------------------------ */ /* Simple user-visible types */ /* Endpoint tag */ typedef uint64_t tag_t; /* Handler index */ typedef uint8_t handler_t; #define AMMPI_BADHANDLERVAL(h) (0) /* #define AMMPI_BADHANDLERVAL(h) (h < 0 || h >= AMMPI_MAX_NUMHANDLERS) */ /* Endpoint naming */ typedef uint32_t ammpi_node_t; typedef struct { int mpirank; int mpitag; } en_t; /* Endpoint types */ struct ammpi_eb; struct ammpi_ep; typedef struct ammpi_eb *eb_t; typedef struct ammpi_ep *ep_t; /* ------------------------------------------------------------------------------------ */ /* AMMPI extension types */ typedef void (*ammpi_handler_fn_t)(); /* prototype for handler function */ typedef enum { ammpi_Short=0, ammpi_Medium=1, ammpi_Long=2, ammpi_NumCategories=3 } ammpi_category_t; typedef void (*AMMPI_preHandlerCallback_t)(ammpi_category_t cat, int isReq, int handlerId, void *token, void *buf, size_t nbytes, int numargs, uint32_t *args); typedef void (*AMMPI_postHandlerCallback_t)(ammpi_category_t cat, int isReq); /* statistical collection * changes here need to also be reflected in the initialization vector AMMPI_initial_stats */ typedef struct { uint64_t RequestsSent[ammpi_NumCategories]; uint64_t RepliesSent[ammpi_NumCategories]; uint64_t RequestsReceived[ammpi_NumCategories]; uint64_t RepliesReceived[ammpi_NumCategories]; uint64_t ReturnedMessages; uint64_t RequestMinLatency; /* only if AMMPI_COLLECT_LATENCY_STATS */ uint64_t RequestMaxLatency; /* only if AMMPI_COLLECT_LATENCY_STATS */ uint64_t RequestSumLatency; /* only if AMMPI_COLLECT_LATENCY_STATS */ uint64_t RequestDataBytesSent[ammpi_NumCategories]; /* total of args + data payload */ uint64_t ReplyDataBytesSent[ammpi_NumCategories]; /* total of args + data payload */ uint64_t RequestTotalBytesSent[ammpi_NumCategories]; /* total of args + data payload */ uint64_t ReplyTotalBytesSent[ammpi_NumCategories]; /* total of args,payload and overhead */ uint64_t TotalBytesSent; /* total user level packet sizes for all req/rep */ } ammpi_stats_t; /* ------------------------------------------------------------------------------------ */ /* User-visible constants */ #define AM_ALL 1 /* Deliver all messages to endpoint */ #define AM_NONE 0 /* Deliver no messages to endpoint */ typedef enum { AM_NOEVENTS, /* No endpoint state transition generates an event */ AM_NOTEMPTY, /* A nonempty receive pool or a receive pool that has a message delivered to it generates an event */ /* AM_CANSEND, */ /* TODO: can send without blocking */ AM_NUMEVENTMASKS } ammpi_eventmask_t; typedef enum { AM_SEQ, /* Sequential bundle/endpoint access */ AM_PAR, /* Concurrent bundle/endpoint access */ AM_NUM_BUNDLE_MODES } ammpi_bundle_mode_t; /* * Return values to Active Message and Endpoint/Bundle API functions */ #define AM_OK 0 /* Function completed successfully */ #define AM_ERR_NOT_INIT 1 /* Active message layer not initialized */ #define AM_ERR_BAD_ARG 2 /* Invalid function parameter passed */ #define AM_ERR_RESOURCE 3 /* Problem with requested resource */ #define AM_ERR_NOT_SENT 4 /* Synchronous message not sent */ #define AM_ERR_IN_USE 5 /* Resource currently in use */ /* * Error codes for the AM error handler (status). */ #define EBADARGS 1 /* Arguments to request or reply function invalid */ #define EBADENTRY 2 /* X-lation table index selected unbound table entry */ #define EBADTAG 3 /* Sender's tag did not match the receiver's EP tag */ #define EBADHANDLER 4 /* Invalid index into the recv.'s handler table */ #define EBADSEGOFF 5 /* Offset into the dest-memory VM segment invalid */ #define EBADLENGTH 6 /* Bulk xfer length goes beyond a segment's end */ #define EBADENDPOINT 7 /* Destination endpoint does not exist */ #define ECONGESTION 8 /* Congestion at destination endpoint */ #define EUNREACHABLE 9 /* Destination endpoint unreachable */ #define EREPLYREJECTED 10 /* Destination endpoint refused reply message */ /* * Op codes for the AM error handler (opcode). */ typedef int op_t; #define AM_REQUEST_M 1 #define AM_REQUEST_IM 2 #define AM_REQUEST_XFER_M 3 #define AM_REPLY_M 4 #define AM_REPLY_IM 5 #define AM_REPLY_XFER_M 6 /* ------------------------------------------------------------------------------------ */ /* AMMPI-specific user entry points */ // programmatic tuning knobs extern int AMX_VerboseErrors; /* set to non-zero for verbose error reporting */ extern int AMX_SilentMode; /* set to non-zero to silence any non-error output */ extern const char *AMX_ProcessLabel; /* human-readable label for this process */ #ifdef __GNUC__ __attribute__((__format__ (__printf__, 1, 2))) #endif extern void AMX_FatalErr(const char *msg, ...); /* define the communicator to be used as the basis for all * subsequent calls to AM_AllocateEndpoint(), which must be called * collectively across the selected comm * the call is optional and the comm defaults to MPI_COMM_WORLD * the provided comm is only used to establish subcommunicators for library * communication, and is not otherwise directly utilized by AMMPI * endpoints may only map other endpoints created in the same collective call * to AM_AllocateEndpoint() */ extern int AMMPI_SetEndpointCommunicator(void *ptr_to_MPI_Comm); /* set the client callback fns to run before/after handler execution (callback fns may _NOT_ make any AMMPI calls, directly or indirectly) set to NULL for none */ extern int AMMPI_SetHandlerCallbacks(ep_t ep, AMMPI_preHandlerCallback_t preHandlerCallback, AMMPI_postHandlerCallback_t postHandlerCallback); /* statistical collection */ extern int AMMPI_GetEndpointStatistics(ep_t ep, ammpi_stats_t *stats); /* get ep counters */ extern int AMMPI_ResetEndpointStatistics(ep_t ep); /* reset ep counters */ extern int AMMPI_AggregateStatistics(ammpi_stats_t *runningsum, ammpi_stats_t *newvalues); /* aggregate statistics - augment running sum with the given values (fp is a FILE *) */ extern const char *AMMPI_DumpStatistics(void *fp, ammpi_stats_t *stats, int globalAnalysis); /* output stats to fp (if non-null) in human-readable form. * return a pointer to the same output in an internal static buffer (rewritten on each call) * pass globalAnalysis non-zero if stats is a global agreggation across all nodes */ extern const ammpi_stats_t AMMPI_initial_stats; /* the "empty" values for counters */ /* ------------------------------------------------------------------------------------ */ /* AM-2 Entry Points */ /* strictly speaking, many of these AM entry points should be true-blue functions (so, for example, a user could create a function pointer to them) but that seems a silly justification, so we went with macros on many of them in the interests of performance */ #ifdef AMMPI_COEXIST_WITH_AM /* allow linking with another library that also implements AM - rename entry points * to use this option, it must be defined when building the AMMPI library _and_ the application using it * note this still does not allow the same .c file to use both AM implementations * (any given source file should #include at most one AM header file) */ #define AM_Init AMMPI_Init #define AM_Terminate AMMPI_Terminate #define AM_AllocateBundle AMMPI_AllocateBundle #define AM_AllocateEndpoint AMMPI_AllocateEndpoint #define AM_FreeBundle AMMPI_FreeBundle #define AM_FreeEndpoint AMMPI_FreeEndpoint #define AM_MoveEndpoint AMMPI_MoveEndpoint #define AM_GetSeg AMMPI_GetSeg #define AM_SetSeg AMMPI_SetSeg #define AM_MaxSegLength AMMPI_MaxSegLength #define AM_GetTag AMMPI_GetTag #define AM_SetTag AMMPI_SetTag #define AM_UnMap AMMPI_UnMap #define AM_GetNumTranslations AMMPI_GetNumTranslations #define AM_SetNumTranslations AMMPI_SetNumTranslations #define AM_GetTranslationInuse AMMPI_GetTranslationInuse #define AM_GetTranslationTag AMMPI_GetTranslationTag #define AM_GetTranslationName AMMPI_GetTranslationName #define AM_SetExpectedResources AMMPI_SetExpectedResources #define _AM_SetHandler AMMPI_SetHandler #define _AM_SetHandlerAny AMMPI_SetHandlerAny #define AM_GetEventMask AMMPI_GetEventMask #define AM_SetEventMask AMMPI_SetEventMask #define AM_WaitSema AMMPI_WaitSema #define AM_GetSourceEndpoint AMMPI_GetSourceEndpoint #define AM_GetDestEndpoint AMMPI_GetDestEndpoint #define AM_GetMsgTag AMMPI_GetMsgTag #define AM_Poll AMMPI_Poll #endif /* standardized AM-2 extensions */ #ifndef AMMPI #define AMMPI 1 #endif #define AMX_SetTranslationTag AMMPI_SetTranslationTag #define AMX_GetEndpointStatistics AMMPI_GetEndpointStatistics #define AMX_DumpStatistics AMMPI_DumpStatistics #define AMX_AggregateStatistics AMMPI_AggregateStatistics #define AMX_initial_stats AMMPI_initial_stats #define amx_stats_t ammpi_stats_t #define amx_handler_fn_t ammpi_handler_fn_t #define AMX_GetSourceId AMMPI_GetSourceId #define AMX_enEqual AMMPI_enEqual #define AMX_GetTokenInfo AMMPI_GetTokenInfo #define amx_category_t ammpi_category_t #define amx_Short ammpi_Short #define amx_Medium ammpi_Medium #define amx_Long ammpi_Long #if !defined(AMMPI_DEBUG) && !defined(AMMPI_NDEBUG) #if defined(GASNET_DEBUG) || defined(AMX_DEBUG) #define AMMPI_DEBUG 1 #elif defined(GASNET_NDEBUG) || defined(AMX_NDEBUG) #define AMMPI_NDEBUG 1 #endif #endif #if defined(AMMPI_DEBUG) && !defined(AMMPI_NDEBUG) #undef AMMPI_DEBUG #define AMMPI_DEBUG 1 #elif !defined(AMMPI_DEBUG) && defined(AMMPI_NDEBUG) #undef AMMPI_NDEBUG #define AMMPI_NDEBUG 1 #else #error bad defns of AMMPI_DEBUG and AMMPI_NDEBUG #endif #undef AMX_DEBUG #undef AMX_NDEBUG #ifdef AMMPI_DEBUG #define AMX_DEBUG AMMPI_DEBUG #define AMMPI_DEBUG_CONFIG _DEBUG #endif #ifdef AMMPI_NDEBUG #define AMX_NDEBUG AMMPI_NDEBUG #define AMMPI_DEBUG_CONFIG _NDEBUG #endif #if AMX_DEBUG_VERBOSE || AMMPI_DEBUG_VERBOSE || GASNET_DEBUG_VERBOSE #undef AMX_DEBUG_VERBOSE #define AMX_DEBUG_VERBOSE 1 #endif #if defined(AMMPI_DEBUG) && (defined(__OPTIMIZE__) || defined(NDEBUG)) #error Tried to compile AMMPI client code with optimization enabled but also AMMPI_DEBUG (which seriously hurts performance). Disable C and MPI_CC compiler optimization or reconfigure/rebuild without --enable-debug #endif #undef AM_Init #define AM_Init AMX_CONCAT(AM_Init_AMMPI,AMMPI_DEBUG_CONFIG) /* System parameters */ #define AM_MaxShort() AMMPI_MAX_SHORT #define AM_MaxMedium() AMMPI_MAX_MEDIUM #define AM_MaxLong() AMMPI_MAX_LONG #define AM_MaxNumHandlers() AMMPI_MAX_NUMHANDLERS #define AM_MaxNumTranslations(trans) (*(trans) = AMMPI_MAX_NUMTRANSLATIONS,AM_OK) extern int AM_MaxSegLength(uintptr_t* nbytes); /* System initialization/termination */ extern int AM_Init(void); extern int AM_Terminate(void); /* endpoint/bundle management */ extern int AM_AllocateBundle(int type, eb_t *endb); extern int AM_AllocateEndpoint(eb_t bundle, ep_t *endp, en_t *endpoint_name); extern int AM_FreeBundle(eb_t bundle); extern int AM_FreeEndpoint(ep_t ea); extern int AM_MoveEndpoint(ep_t ea, eb_t from_bundle, eb_t to_bundle); extern int AM_GetSeg(ep_t ea, void **addr, uintptr_t *nbytes); extern int AM_SetSeg(ep_t ea, void *addr, uintptr_t nbytes); extern int AM_GetTag(ep_t ea, tag_t *tag); extern int AM_SetTag(ep_t ea, tag_t tag); /* Translation table */ /* use special hack in case en_t size is conservatively large */ extern int AMMPI_Map(ep_t ea, int index, en_t *name, tag_t tag); extern int AMMPI_MapAny(ep_t ea, int *index, en_t *name, tag_t tag); #define AM_Map(ea, index, name, tag) AMMPI_Map((ea), (index), &(name), (tag)) #define AM_MapAny(ea, index, name, tag) AMMPI_MapAny((ea), (index), &(name), (tag)) extern int AM_UnMap(ep_t ea, int index); extern int AM_GetTranslationInuse(ep_t ea, int i); extern int AM_GetTranslationTag(ep_t ea, int i, tag_t *tag); extern int AM_GetTranslationName(ep_t ea, int i, en_t *gan); extern int AM_GetNumTranslations(ep_t ep, int *pntrans); extern int AM_SetNumTranslations(ep_t ep, int ntrans); extern int AM_SetExpectedResources(ep_t ea, int n_endpoints, int n_outstanding_requests); extern int AMMPI_SetTranslationTag(ep_t ea, int index, tag_t tag); /* extension: legal after AM_SetExpectedResources */ /* Handler table */ extern int _AM_SetHandler(ep_t ea, handler_t handler, ammpi_handler_fn_t function); #define AM_SetHandler(ea, handler, function) _AM_SetHandler((ea), (handler), (ammpi_handler_fn_t)(function)) extern int _AM_SetHandlerAny(ep_t ea, handler_t *handler, ammpi_handler_fn_t function); #define AM_SetHandlerAny(ea, handler, function) _AM_SetHandlerAny((ea), (handler), (ammpi_handler_fn_t)(function)) #define AM_GetNumHandlers(ep, pnhandlers) \ ((ep) ? ((*(pnhandlers) = AMMPI_MAX_NUMHANDLERS), AM_OK) : AM_ERR_BAD_ARG) #define AM_SetNumHandlers(ep, nhandlers) \ ((ep) ? ((nhandlers) == AMMPI_MAX_NUMHANDLERS ? AM_OK : AM_ERR_RESOURCE) : AM_ERR_BAD_ARG) /* Events */ extern int AM_GetEventMask(eb_t eb, int *mask); extern int AM_SetEventMask(eb_t eb, int mask); extern int AM_WaitSema(eb_t eb); /* Message interrogation */ extern int AM_GetSourceEndpoint(void *token, en_t *gan); extern int AM_GetDestEndpoint(void *token, ep_t *endp); extern int AM_GetMsgTag(void *token, tag_t *tagp); extern int AMMPI_GetSourceId(void *token, int *srcid); extern int AMMPI_enEqual(en_t en1, en_t en2); extern int AMMPI_GetTokenInfo(void *token, handler_t *handler, ammpi_category_t *cat, int *is_req); /* Poll */ extern int AM_Poll(eb_t bundle); /* Requests and Replies These six functions do all requests and replies. Macros below expand all the variants */ extern int AMMPI_Request(ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, int numargs, ...); extern int AMMPI_RequestI (ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, int numargs, ...); extern int AMMPI_RequestXfer(ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int async, int numargs, ...); extern int AMMPI_Reply(void *token, handler_t handler, int numargs, ...); extern int AMMPI_ReplyI(void *token, handler_t handler, void *source_addr, size_t nbytes, int numargs, ...); extern int AMMPI_ReplyXfer(void *token, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, ...); /* alternate forms that take va_list ptr to support GASNet */ extern int AMMPI_RequestVA(ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, int numargs, va_list argptr); extern int AMMPI_RequestIVA(ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, int numargs, va_list argptr); extern int AMMPI_RequestXferVA(ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int async, int numargs, va_list argptr); extern int AMMPI_ReplyVA(void *token, handler_t handler, int numargs, va_list argptr); extern int AMMPI_ReplyIVA(void *token, handler_t handler, void *source_addr, size_t nbytes, int numargs, va_list argptr); extern int AMMPI_ReplyXferVA(void *token, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr); /* we cast to int32_t here to simulate function call - AM says these functions take 32-bit int args, * so this cast accomplishes the conversion to integral type for floating-point actuals, and * the truncation which might happen to long integer actuals * note the C compiler will subsequently apply default argument promotion to these arguments * (because these arguments fall within the ellipses (...) of the called functions) * which means they'll subsequently be promoted to int (which may differ from int32_t) */ #define AM_Request0(ep, destep, hnum) \ AMMPI_Request(ep, destep, hnum, 0) #define AM_Request1(ep, destep, hnum, a0) \ AMMPI_Request(ep, destep, hnum, 1, (int32_t)(a0)) #define AM_Request2(ep, destep, hnum, a0, a1) \ AMMPI_Request(ep, destep, hnum, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_Request3(ep, destep, hnum, a0, a1, a2) \ AMMPI_Request(ep, destep, hnum, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_Request4(ep, destep, hnum, a0, a1, a2, a3) \ AMMPI_Request(ep, destep, hnum, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_Request5(ep, destep, hnum, a0, a1, a2, a3, a4) \ AMMPI_Request(ep, destep, hnum, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_Request6(ep, destep, hnum, a0, a1, a2, a3, a4, a5) \ AMMPI_Request(ep, destep, hnum, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_Request7(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6) \ AMMPI_Request(ep, destep, hnum, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_Request8(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7) \ AMMPI_Request(ep, destep, hnum, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_Request9(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMMPI_Request(ep, destep, hnum, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_Request10(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMMPI_Request(ep, destep, hnum, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_Request11(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMMPI_Request(ep, destep, hnum, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_Request12(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMMPI_Request(ep, destep, hnum, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_Request13(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMMPI_Request(ep, destep, hnum, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_Request14(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMMPI_Request(ep, destep, hnum, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_Request15(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMMPI_Request(ep, destep, hnum, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_Request16(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMMPI_Request(ep, destep, hnum, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_RequestI0(ep, destep, hnum, sa, cnt) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 0) #define AM_RequestI1(ep, destep, hnum, sa, cnt, a0) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 1, (int32_t)(a0)) #define AM_RequestI2(ep, destep, hnum, sa, cnt, a0, a1) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_RequestI3(ep, destep, hnum, sa, cnt, a0, a1, a2) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_RequestI4(ep, destep, hnum, sa, cnt, a0, a1, a2, a3) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_RequestI5(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_RequestI6(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_RequestI7(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_RequestI8(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_RequestI9(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_RequestI10(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_RequestI11(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_RequestI12(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_RequestI13(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_RequestI14(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_RequestI15(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_RequestI16(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMMPI_RequestI(ep, destep, hnum, sa, cnt, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_RequestXfer0(ep, destep, desto, hnum, sa, cnt) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 0) #define AM_RequestXfer1(ep, destep, desto, hnum, sa, cnt, a0) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 1, (int32_t)(a0)) #define AM_RequestXfer2(ep, destep, desto, hnum, sa, cnt, a0, a1) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_RequestXfer3(ep, destep, desto, hnum, sa, cnt, a0, a1, a2) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_RequestXfer4(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_RequestXfer5(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_RequestXfer6(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_RequestXfer7(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_RequestXfer8(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_RequestXfer9(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_RequestXfer10(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_RequestXfer11(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_RequestXfer12(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_RequestXfer13(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_RequestXfer14(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_RequestXfer15(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_RequestXfer16(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_RequestXferAsync0(ep, destep, desto, hnum, sa, cnt) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 0) #define AM_RequestXferAsync1(ep, destep, desto, hnum, sa, cnt, a0) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 1, (int32_t)(a0)) #define AM_RequestXferAsync2(ep, destep, desto, hnum, sa, cnt, a0, a1) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_RequestXferAsync3(ep, destep, desto, hnum, sa, cnt, a0, a1, a2) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_RequestXferAsync4(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_RequestXferAsync5(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_RequestXferAsync6(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_RequestXferAsync7(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_RequestXferAsync8(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_RequestXferAsync9(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_RequestXferAsync10(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_RequestXferAsync11(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_RequestXferAsync12(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_RequestXferAsync13(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_RequestXferAsync14(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_RequestXferAsync15(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_RequestXferAsync16(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMMPI_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_Reply0(token, hnum) \ AMMPI_Reply(token, hnum, 0) #define AM_Reply1(token, hnum, a0) \ AMMPI_Reply(token, hnum, 1, (int32_t)(a0)) #define AM_Reply2(token, hnum, a0, a1) \ AMMPI_Reply(token, hnum, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_Reply3(token, hnum, a0, a1, a2) \ AMMPI_Reply(token, hnum, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_Reply4(token, hnum, a0, a1, a2, a3) \ AMMPI_Reply(token, hnum, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_Reply5(token, hnum, a0, a1, a2, a3, a4) \ AMMPI_Reply(token, hnum, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_Reply6(token, hnum, a0, a1, a2, a3, a4, a5) \ AMMPI_Reply(token, hnum, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_Reply7(token, hnum, a0, a1, a2, a3, a4, a5, a6) \ AMMPI_Reply(token, hnum, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_Reply8(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7) \ AMMPI_Reply(token, hnum, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_Reply9(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMMPI_Reply(token, hnum, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_Reply10(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMMPI_Reply(token, hnum, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_Reply11(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMMPI_Reply(token, hnum, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_Reply12(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMMPI_Reply(token, hnum, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_Reply13(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMMPI_Reply(token, hnum, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_Reply14(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMMPI_Reply(token, hnum, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_Reply15(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMMPI_Reply(token, hnum, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_Reply16(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMMPI_Reply(token, hnum, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_ReplyI0(token, hnum, sa, cnt) \ AMMPI_ReplyI(token, hnum, sa, cnt, 0) #define AM_ReplyI1(token, hnum, sa, cnt, a0) \ AMMPI_ReplyI(token, hnum, sa, cnt, 1, (int32_t)(a0)) #define AM_ReplyI2(token, hnum, sa, cnt, a0, a1) \ AMMPI_ReplyI(token, hnum, sa, cnt, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_ReplyI3(token, hnum, sa, cnt, a0, a1, a2) \ AMMPI_ReplyI(token, hnum, sa, cnt, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_ReplyI4(token, hnum, sa, cnt, a0, a1, a2, a3) \ AMMPI_ReplyI(token, hnum, sa, cnt, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_ReplyI5(token, hnum, sa, cnt, a0, a1, a2, a3, a4) \ AMMPI_ReplyI(token, hnum, sa, cnt, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_ReplyI6(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5) \ AMMPI_ReplyI(token, hnum, sa, cnt, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_ReplyI7(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6) \ AMMPI_ReplyI(token, hnum, sa, cnt, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_ReplyI8(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7) \ AMMPI_ReplyI(token, hnum, sa, cnt, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_ReplyI9(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMMPI_ReplyI(token, hnum, sa, cnt, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_ReplyI10(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMMPI_ReplyI(token, hnum, sa, cnt, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_ReplyI11(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMMPI_ReplyI(token, hnum, sa, cnt, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_ReplyI12(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMMPI_ReplyI(token, hnum, sa, cnt, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_ReplyI13(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMMPI_ReplyI(token, hnum, sa, cnt, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_ReplyI14(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMMPI_ReplyI(token, hnum, sa, cnt, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_ReplyI15(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMMPI_ReplyI(token, hnum, sa, cnt, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_ReplyI16(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMMPI_ReplyI(token, hnum, sa, cnt, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_ReplyXfer0(token, desto, hnum, sa, cnt) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 0) #define AM_ReplyXfer1(token, desto, hnum, sa, cnt, a0) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 1, (int32_t)(a0)) #define AM_ReplyXfer2(token, desto, hnum, sa, cnt, a0, a1) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_ReplyXfer3(token, desto, hnum, sa, cnt, a0, a1, a2) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_ReplyXfer4(token, desto, hnum, sa, cnt, a0, a1, a2, a3) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_ReplyXfer5(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_ReplyXfer6(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_ReplyXfer7(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_ReplyXfer8(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_ReplyXfer9(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_ReplyXfer10(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_ReplyXfer11(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_ReplyXfer12(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_ReplyXfer13(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_ReplyXfer14(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_ReplyXfer15(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_ReplyXfer16(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMMPI_ReplyXfer(token, hnum, sa, cnt, desto, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) AMMPI_END_EXTERNC #endif gasnet-2025.8.0/other/ammpi/Makefile.titanium.in0000664000175000017500000000143215142313673021544 0ustar alastairalastair# $Source: bitbucket.org:berkeleylab/gasnet.git/other/ammpi/Makefile.titanium.in $ # Description: setup necessary variables needed by Makefile # Copyright 2000, Dan Bonachea # variables added here should also go in Makefile.common, and vice-versa altincdir = $(srcdir)/.. amxdir = $(srcdir)/../amx # compiler CC = @MPI_CC@ ccdebugflags = @MPI_CFLAGS@ -g ccoptflags = @MPI_CFLAGS@ MPIRUN_CMD = @MPIRUN_CMD@ @ENABLED_DEBUG_TRUE@ ccflags = $(set_debug_ccflags) @ENABLED_DEBUG_FALSE@ ccflags = $(set_opt_ccflags) # system utilities ranlib = @RANLIB@ ar = @AR@ PERL = @PERL@ # stuff normally set by the pre-baked makefiles platform_defines = @TIC_MACHINE_DEFINES@ @INTTYPES_DEFINES@ -DUNIX platform_libraries = @LIBS@ @MPI_LIBS@ platform_ldflags = @LDFLAGS@ gasnet-2025.8.0/other/ammpi/ammpi_spmd.c0000664000175000017500000004564015142313673020151 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/ammpi/ammpi_spmd.c $ * Description: AMMPI Implementations of SPMD operations (bootstrapping and parallel job control) * Copyright 2000, Dan Bonachea */ #if _FORTIFY_SOURCE > 0 && __OPTIMIZE__ <= 0 /* silence an annoying MPICH/Linux warning */ #undef _FORTIFY_SOURCE #endif #include #include #include #include "ammpi_internal.h" /* must come after any other headers */ #ifndef FREEZE_WORKER #define FREEZE_WORKER 0 #endif #if AMX_DEBUG_VERBOSE #define DEBUG_MSG(msg) do { fprintf(stderr,"worker %i: %s\n", AMMPI_SPMDMYPROC, msg); fflush(stderr); } while(0) #else #define DEBUG_MSG(msg) do {} while(0) /* prevent silly warnings about empty statements */ #endif static ep_t AMMPI_SPMDEndpoint = NULL; static eb_t AMMPI_SPMDBundle = NULL; static en_t AMMPI_SPMDName = {0}; static volatile int AMMPI_SPMDBarrierDone = 0; /* flag barrier as complete */ static volatile int AMMPI_SPMDBarrierCount = 0; void AMMPI_SPMDHandleControlMessage(void *token, int32_t messageType, int32_t messageArg); static int AMMPI_SPMDShutdown(int exitcode); static ammpi_handler_fn_t AMMPI_SPMDControlMessageHandler = (ammpi_handler_fn_t)&AMMPI_SPMDHandleControlMessage; static int AMMPI_SPMDStartupCalled = 0; static int AMMPI_SPMDNUMPROCS = -1; static int AMMPI_SPMDMYPROC = -1; static MPI_Comm AMMPI_SPMDMPIComm; /* ------------------------------------------------------------------------------------ * misc helpers * ------------------------------------------------------------------------------------ */ static void flushStreams(const char *context) { static int do_sync = -1; if (!context) context = "flushStreams()"; if (fflush(NULL)) { /* passing NULL to fflush causes it to flush all open FILE streams */ perror("fflush"); AMX_FatalErr("failed to fflush(NULL) in %s", context); } if (fflush(stdout)) { perror("fflush"); AMX_FatalErr("failed to flush stdout in %s", context); } if (fflush(stderr)) { perror("fflush"); AMX_FatalErr("failed to flush stderr in %s", context); } fsync(STDOUT_FILENO); /* ignore errors for output is a console */ fsync(STDERR_FILENO); /* ignore errors for output is a console */ if (do_sync < 0) { /* Approximate match to GASNet's acceptance of 'Y|YES|y|yes|1' */ char c, *envval; envval = getenv("GASNET_FS_SYNC"); if (NULL == envval) envval = getenv("AMMPI_FS_SYNC"); c = envval ? envval[0] : '0'; do_sync = ((c == '1') || (c == 'y') || (c == 'Y')); } if (do_sync) { sync(); } AMX_sched_yield(); } /* ------------------------------------------------------------------------------------ */ extern char *AMMPI_enStr(en_t en, char *buf) { static char pbuf[80]; if (!buf) buf = pbuf; sprintf(buf, "(%i)", en.mpirank); return buf; } extern char *AMMPI_tagStr(tag_t tag, char *buf) { static char pbuf[80]; if (!buf) buf = pbuf; sprintf(buf, "0x%08x%08x", (unsigned int)(uint32_t)(tag >> 32), (unsigned int)(uint32_t)(tag & 0xFFFFFFFF)); return buf; } /* ------------------------------------------------------------------------------------ * basic inquiries * ------------------------------------------------------------------------------------ */ extern int AMMPI_SPMDNumProcs(void) { if (!AMMPI_SPMDStartupCalled) { AMX_Err("called AMMPI_SPMDNumProcs before AMMPI_SPMDStartup()"); return -1; } AMX_assert(AMMPI_SPMDNUMPROCS >= 1); return AMMPI_SPMDNUMPROCS; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_SPMDMyProc(void) { if (!AMMPI_SPMDStartupCalled) { AMX_Err("called AMMPI_SPMDMyProc before AMMPI_SPMDStartup()"); return -1; } AMX_assert(AMMPI_SPMDMYPROC >= 0); return AMMPI_SPMDMYPROC; } /* ------------------------------------------------------------------------------------ */ #ifndef HAVE_MPI_INIT_THREAD #define HAVE_MPI_INIT_THREAD (MPI_VERSION >= 2) #endif #ifndef HAVE_MPI_QUERY_THREAD #define HAVE_MPI_QUERY_THREAD (MPI_VERSION >= 2) #endif static int threadstr2int(const char *str) { char tmp[80]; char *p; int ret = -1; strncpy(tmp, str, sizeof(tmp)-1); for (p = tmp; *p; p++) if (*p >= 'a' && *p <= 'z') *p -= 'a'-'A'; /* upper-case */ #if HAVE_MPI_INIT_THREAD if (strstr(tmp,"SINGLE")) return MPI_THREAD_SINGLE; if (strstr(tmp,"FUNNELED")) return MPI_THREAD_FUNNELED; if (strstr(tmp,"SERIALIZED")) return MPI_THREAD_SERIALIZED; if (strstr(tmp,"MULTIPLE")) return MPI_THREAD_MULTIPLE; ret = MPI_THREAD_SINGLE-1; #endif return ret; } static const char *threadint2str(int id) { switch (id) { #if HAVE_MPI_INIT_THREAD case MPI_THREAD_SINGLE: return "MPI_THREAD_SINGLE"; case MPI_THREAD_FUNNELED: return "MPI_THREAD_FUNNELED"; case MPI_THREAD_SERIALIZED: return "MPI_THREAD_SERIALIZED"; case MPI_THREAD_MULTIPLE: return "MPI_THREAD_MULTIPLE"; default: return "UNKNOWN VALUE"; #endif } } extern int AMMPI_SPMDSetThreadMode(int usingthreads, const char **provided_level, int *argc, char ***argv) { int initialized = 0; if (AMMPI_SPMDStartupCalled) AMX_RETURN_ERR(RESOURCE); #if !HAVE_MPI_INIT_THREAD *provided_level = "MPI-1 compatibility mode"; return 1; #else { int required = (usingthreads ? MPI_THREAD_SERIALIZED : MPI_THREAD_SINGLE); int provided = -1; const char *override = getenv("AMMPI_MPI_THREAD"); if (!override) override = getenv("GASNET_MPI_THREAD"); if (override) { int overreq = threadstr2int(override); if (overreq >= MPI_THREAD_SINGLE) required = overreq; else { fprintf(stderr,"WARNING: Ignoring unrecognized GASNET_MPI_THREAD value."); fflush(stderr); } } MPI_SAFE(MPI_Initialized(&initialized)); if (initialized) { /* MPI already init, query current thread support level */ #if HAVE_MPI_QUERY_THREAD MPI_SAFE(MPI_Query_thread(&provided)); #else provided = required; #endif } else { /* init MPI and request our needed level of thread safety */ MPI_SAFE(MPI_Init_thread(argc, argv, required, &provided)); } *provided_level = threadint2str(provided); return (provided >= required); } #endif } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_SPMDStartup(int *argc, char ***argv, int networkdepth, uint64_t *networkpid, eb_t *eb, ep_t *ep) { uint64_t prvnetworkpid; tag_t mytag; if (AMMPI_SPMDStartupCalled) AMX_RETURN_ERR(RESOURCE); { /* initialize MPI, if necessary */ int initialized = 0; MPI_SAFE(MPI_Initialized(&initialized)); if (!initialized) { #if MPI_VERSION < 2 if (!argc || !argv) AMX_RETURN_ERR(BAD_ARG); #endif MPI_SAFE(MPI_Init(argc, argv)); } } /* defaulting */ if (networkdepth < 0) AMX_RETURN_ERR(BAD_ARG); if (networkdepth == 0) { const char *netdepth_str = getenv("AMMPI_NETWORKDEPTH"); if (netdepth_str) networkdepth = atoi(netdepth_str); if (networkdepth <= 0) networkdepth = AMMPI_DEFAULT_NETWORKDEPTH; } #if FREEZE_WORKER AMX_freezeForDebugger(); #else if (getenv("AMMPI_FREEZE")) AMX_freezeForDebugger(); #endif if (!eb || !ep) AMX_RETURN_ERR(BAD_ARG); if (AM_Init() != AM_OK) { AMX_Err("Failed to AM_Init() in AMMPI_SPMDStartup"); AMX_RETURN_ERRFR(RESOURCE, AMMPI_SPMDStartup, "AM_Init() failed"); } MPI_SAFE(MPI_Comm_rank(MPI_COMM_WORLD, &AMMPI_SPMDMYPROC)); MPI_SAFE(MPI_Comm_size(MPI_COMM_WORLD, &AMMPI_SPMDNUMPROCS)); AMX_assert(AMMPI_SPMDNUMPROCS > 0); AMX_assert(AMMPI_SPMDMYPROC >= 0 && AMMPI_SPMDMYPROC < AMMPI_SPMDNUMPROCS); if (!AMX_ProcessLabel) { static char label[80]; snprintf(label,sizeof(label),"Node %i",AMMPI_SPMDMYPROC); AMX_ProcessLabel = label; } { /* check job size */ int temp, maxtranslations = 0; if (AMMPI_SPMDNUMPROCS > AMMPI_MAX_SPMDPROCS) { AMX_Err("Too many MPI nodes: %d (max is %d)", AMMPI_SPMDNUMPROCS, AMMPI_MAX_SPMDPROCS); AMX_RETURN_ERR(RESOURCE); } temp = AM_MaxNumTranslations(&maxtranslations); if (temp != AM_OK) { AMX_Err("Failed to AM_MaxNumTranslations() in AMMPI_SPMDStartup"); AMX_RETURN(temp); } else if (AMMPI_SPMDNUMPROCS > maxtranslations) { AMX_Err("Too many nodes: AM_MaxNumTranslations (%d) less than number of MPI nodes (%d)", maxtranslations, AMMPI_SPMDNUMPROCS); AMX_RETURN_ERR(RESOURCE); } } #if AMX_DEBUG_VERBOSE fprintf(stderr, "worker %i/%i starting...\n", AMMPI_SPMDMYPROC, AMMPI_SPMDNUMPROCS); fflush(stderr); #endif { /* setup comm for isolation */ MPI_Group world_group; MPI_SAFE(MPI_Comm_group(MPI_COMM_WORLD, &world_group)); MPI_SAFE(MPI_Comm_create(MPI_COMM_WORLD, world_group, &AMMPI_SPMDMPIComm)); MPI_SAFE(MPI_Group_free(&world_group)); } { int mypid = getpid(); int networkpidtemp = 0; if (!mypid) mypid = (int)AMX_getMicrosecondTimeStamp() | 0x1; /* ensure nonzero pid */ AMX_assert(mypid); MPI_SAFE(MPI_Allreduce(&mypid, &networkpidtemp, 1, MPI_INT, MPI_SUM, AMMPI_SPMDMPIComm)); prvnetworkpid = (uint64_t)networkpidtemp; mytag = (((tag_t)prvnetworkpid) << 32 ) | (tag_t)AMMPI_SPMDMYPROC; AMX_assert(mytag != AM_ALL); AMX_assert(mytag != AM_NONE); } { /* create endpoint and get name */ int temp = AM_AllocateBundle(AM_SEQ, &AMMPI_SPMDBundle); if (temp != AM_OK) { AMX_Err("Failed to create bundle in AMMPI_SPMDStartup"); AMX_RETURN(temp); } temp = AM_AllocateEndpoint(AMMPI_SPMDBundle, &AMMPI_SPMDEndpoint, &AMMPI_SPMDName); if (temp != AM_OK) { AMX_Err("Failed to create endpoint in AMMPI_SPMDStartup"); AMX_RETURN(temp); } } { int i, temp; en_t *namebuf = AMX_malloc(sizeof(en_t)*AMMPI_SPMDNUMPROCS); tag_t *tagbuf = AMX_malloc(sizeof(tag_t)*AMMPI_SPMDNUMPROCS); /* gather names */ MPI_SAFE(MPI_Allgather(&AMMPI_SPMDName, sizeof(en_t), MPI_BYTE, namebuf, sizeof(en_t), MPI_BYTE, AMMPI_SPMDMPIComm)); /* gather tags */ MPI_SAFE(MPI_Allgather(&mytag, sizeof(tag_t), MPI_BYTE, tagbuf, sizeof(tag_t), MPI_BYTE, AMMPI_SPMDMPIComm)); /* setup translation table */ temp = AM_SetNumTranslations(AMMPI_SPMDEndpoint, AMMPI_SPMDNUMPROCS); if (temp != AM_OK) { AMX_Err("Failed to AM_SetNumTranslations() in AMMPI_SPMDStartup"); AMX_RETURN(temp); } for (i = 0; i < AMMPI_SPMDNUMPROCS; i++) { temp = AM_Map(AMMPI_SPMDEndpoint, i, namebuf[i], tagbuf[i]); if (temp != AM_OK) { AMX_Err("Failed to AM_Map() in AMMPI_SPMDStartup"); AMX_RETURN(temp); } } AMX_free(namebuf); AMX_free(tagbuf); } { /* allocate network buffers */ int temp = AM_SetExpectedResources(AMMPI_SPMDEndpoint, AMMPI_SPMDNUMPROCS, networkdepth); if (temp != AM_OK) { AMX_Err("Failed to AM_SetExpectedResources() in AMMPI_SPMDStartup"); AMX_RETURN(temp); } } { /* set tag */ int temp = AM_SetTag(AMMPI_SPMDEndpoint, mytag); if (temp != AM_OK) { AMX_Err("Failed to AM_SetTag() in AMMPI_SPMDStartup"); AMX_RETURN(temp); } } AMMPI_RegisterControlMessageHandler(AMMPI_SPMDEndpoint, AMMPI_SPMDControlMessageHandler); *eb = AMMPI_SPMDBundle; *ep = AMMPI_SPMDEndpoint; if (networkpid) *networkpid = prvnetworkpid; AMMPI_SPMDStartupCalled = 1; MPI_SAFE(MPI_Barrier(AMMPI_SPMDMPIComm)); /* wait for all control handlers to be registered */ #if AMX_DEBUG_VERBOSE { char temp[80]; tag_t tag; AM_GetTag(AMMPI_SPMDEndpoint, &tag); fprintf(stderr, "worker %i/%i starting (tag=%s)...\n", AMMPI_SPMDMyProc(), AMMPI_SPMDNumProcs(), AMMPI_tagStr(tag, temp)); fflush(stderr); } #endif return AM_OK; } /* ------------------------------------------------------------------------------------ */ void AMMPI_SPMDHandleControlMessage(void *token, int32_t messageType, int32_t messageArg) { switch (messageType) { case 'R': { /* barrier ready */ AMX_assert(AMMPI_SPMDMYPROC == 0); AMMPI_SPMDBarrierCount++; break; } case 'B': { /* barrier complete */ AMX_assert(AMMPI_SPMDMYPROC != 0); AMX_assert(AMMPI_SPMDBarrierDone == 0); AMMPI_SPMDBarrierDone = 1; break; } case 'E': { /* exit */ AMMPI_SPMDShutdown(messageArg); break; } default: AMX_Err("unrecognized AMMPI SPMD control message - ignoring..."); } } /* ------------------------------------------------------------------------------------ * process termination * ------------------------------------------------------------------------------------ */ static void (*AMMPI_SPMDExitCallback)(int) = NULL; extern int AMMPI_SPMDSetExitCallback(void (*fp)(int)) { AMMPI_SPMDExitCallback = fp; return AM_OK; } void (*AMMPI_SPMDkillmyprocess)(int) = &_exit; static int AMMPI_SPMDShutdown(int exitcode) { /* this function is not re-entrant - if someone tries, something is seriously wrong */ { static int shutdownInProgress = FALSE; if (shutdownInProgress) AMX_FatalErr("recursion failure in AMMPI_SPMDShutdown"); shutdownInProgress = TRUE; } if (AMMPI_SPMDExitCallback) (*AMMPI_SPMDExitCallback)(exitcode); flushStreams("AMMPI_SPMDExit"); #if !PLATFORM_OS_SUBFAMILY_CNL /* multi-node CNL hangs on exit if you close the streams */ if (fclose(stdin)) { #if AMX_DEBUG_VERBOSE AMX_Err("failed to fclose stdin in AMMPI_SPMDExit()"); perror("fclose"); #endif } if (fclose(stdout)) { #if AMX_DEBUG_VERBOSE AMX_Err("failed to fclose stdout in AMMPI_SPMDExit()"); perror("fclose"); #endif } if (fclose(stderr)) { #if AMX_DEBUG_VERBOSE AMX_Err("failed to fclose stderr in AMMPI_SPMDExit()"); perror("fclose"); #endif } #endif AMX_sched_yield(); int isfini = 0; MPI_SAFE(MPI_Finalized(&isfini)); if (!isfini) { if (AM_Terminate() != AM_OK) AMX_Err("failed to AM_Terminate() in AMMPI_SPMDExit()"); #if 0 MPI_SAFE(MPI_Abort(AMMPI_SPMDMPIComm, exitcode)); #endif MPI_SAFE(MPI_Comm_free(&AMMPI_SPMDMPIComm)); AMMPI_SPMDMPIComm = MPI_COMM_WORLD; MPI_SAFE(MPI_Finalize()); } AMMPI_SPMDStartupCalled = 0; DEBUG_MSG("exiting.."); AMMPI_SPMDkillmyprocess(exitcode); AMX_FatalErr("AMMPI_SPMDkillmyprocess failed"); return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_SPMDExit(int exitcode) { int i; if (!AMMPI_SPMDStartupCalled) AMX_RETURN_ERR(NOT_INIT); /* this function is not re-entrant - if someone tries, something is seriously wrong */ { static int exitInProgress = FALSE; if (exitInProgress) AMX_FatalErr("recursion failure in AMMPI_SPMDExit"); exitInProgress = TRUE; } int isfini = 0; MPI_SAFE(MPI_Finalized(&isfini)); if (isfini) { AMX_DEBUG_WARN(("MPI finalized by client, skipping exit signal broadcast and resource reclamation")); } else { /* tell others to exit */ for (i = 0; i < AMMPI_SPMDNUMPROCS; i++) { en_t remoteName; if (AM_GetTranslationName(AMMPI_SPMDEndpoint, i, &remoteName) == AM_OK && !AMMPI_enEqual(remoteName, AMMPI_SPMDName)) { if (AMMPI_SendControlMessage(AMMPI_SPMDEndpoint, remoteName, 2, (int32_t)'E', (int32_t)exitcode) != AM_OK) AMX_Err("Failed to AMMPI_SendControlMessage in AMMPI_SPMDExit()"); } } } /* exit this proc */ AMMPI_SPMDShutdown(exitcode); AMX_FatalErr("AMMPI_SPMDShutdown failed"); return 0; } /* ------------------------------------------------------------------------------------ * barrier * ------------------------------------------------------------------------------------ */ extern int AMMPI_SPMDBarrier(void) { int oldmask; #if !AMMPI_BLOCKING_SPMD_BARRIER uint32_t timeoutusec = 100; #endif if (!AMMPI_SPMDStartupCalled) { AMX_Err("called AMMPI_SPMDBarrier before AMMPI_SPMDStartup()"); AMX_RETURN_ERR(NOT_INIT); } flushStreams("AMMPI_SPMDBarrier"); /* Barrier algorithm: * everybody but 0 sends a ready signal to 0 (who counts them) * 0 sends back a done signal when everybody has reported */ AMX_assert(AMMPI_SPMDBarrierDone == 0); AM_GetEventMask(AMMPI_SPMDBundle, &oldmask); if (AMMPI_SPMDMYPROC == 0) { /* proc zero */ int i; if (AMMPI_SPMDNUMPROCS == 1) return AM_OK; AMMPI_SPMDBarrierCount++; /* count myself */ /* wait for each processor to report */ AM_Poll(AMMPI_SPMDBundle); while (AMMPI_SPMDBarrierCount != AMMPI_SPMDNUMPROCS) { #if AMMPI_BLOCKING_SPMD_BARRIER AM_SetEventMask(AMMPI_SPMDBundle, AM_NOTEMPTY); AM_WaitSema(AMMPI_SPMDBundle); AM_Poll(AMMPI_SPMDBundle); #else AMX_usleep(timeoutusec); AM_Poll(AMMPI_SPMDBundle); if (timeoutusec < 10000) timeoutusec *= 2; #endif } AMMPI_SPMDBarrierCount = 0; /* reset */ /* report success to others */ for (i = 1; i < AMMPI_SPMDNUMPROCS; i++) { en_t remoteName; if (AM_GetTranslationName(AMMPI_SPMDEndpoint, i, &remoteName) != AM_OK) AMX_RETURN_ERR(RESOURCE); if (AMMPI_SendControlMessage(AMMPI_SPMDEndpoint, remoteName, 2, (int32_t)'B', (int32_t)0) != AM_OK) AMX_RETURN_ERR(RESOURCE); } } else { /* proc non-zero */ en_t remoteName; if (AM_GetTranslationName(AMMPI_SPMDEndpoint, 0, &remoteName) != AM_OK) AMX_RETURN_ERR(RESOURCE); /* signal zero */ if (AMMPI_SendControlMessage(AMMPI_SPMDEndpoint, remoteName, 2, (int32_t)'R', (int32_t)0) != AM_OK) AMX_RETURN_ERR(RESOURCE); /* wait for completion */ AM_Poll(AMMPI_SPMDBundle); while (!AMMPI_SPMDBarrierDone) { #if AMMPI_BLOCKING_SPMD_BARRIER AM_SetEventMask(AMMPI_SPMDBundle, AM_NOTEMPTY); AM_WaitSema(AMMPI_SPMDBundle); AM_Poll(AMMPI_SPMDBundle); #else AMX_usleep(timeoutusec); AM_Poll(AMMPI_SPMDBundle); if (timeoutusec < 10000) timeoutusec *= 2; #endif } AMMPI_SPMDBarrierDone = 0; /* reset */ } AM_SetEventMask(AMMPI_SPMDBundle, oldmask); DEBUG_MSG("Leaving barrier"); return AM_OK; } /* ------------------------------------------------------------------------------------ * bootstrapping helpers * ------------------------------------------------------------------------------------ */ extern int AMMPI_SPMDAllGather(void *source, void *dest, size_t len) { if (!AMMPI_SPMDStartupCalled) AMX_RETURN_ERR(RESOURCE); MPI_SAFE(MPI_Allgather(source, len, MPI_BYTE, dest, len, MPI_BYTE, AMMPI_SPMDMPIComm)); return AM_OK; } extern int AMMPI_SPMDBroadcast(void *buf, size_t len, int rootid) { if (!AMMPI_SPMDStartupCalled) AMX_RETURN_ERR(RESOURCE); MPI_SAFE(MPI_Bcast(buf, len, MPI_BYTE, rootid, AMMPI_SPMDMPIComm)); return AM_OK; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/ammpi/README0000664000175000017500000001302315142313673016525 0ustar alastairalastairAMMPI Documentation =================== Author: Dan Bonachea Contact email: gasnet-devel@lbl.gov Home page: https://gasnet.lbl.gov/ammpi AMMPI is an implementation of the AM-2 specification over MPI-1. AMMPI is a portable implementation of the AM-2 specification that runs on MPI-1.1 message-passing operations. It does not currently use MPI-RMA in any way. The intent is a fully-portable implementation that will work on any system with a compliant MPI implementation. We don't expect to achieve latency performance competitive with a native implementation of AM optimized for special-purpose hardware, instead we seek to provide a compatibility layer that will allow AM-based systems to quickly get up and running on any HPC platform. AMMPI is a production-quality AM layer that provides a number of features in addition to the standard AM-2 API, including a helper library for SPMD job startup and an API to access built-in networking utilization and performance statistics. It has been successfully ported to a number of parallel architectures, and porting to new architectures generally requires minimal effort. AMMPI performs all its MPI calls on a separate, private MPI communicator, which is strongly guaranteed by the MPI spec to isolate it from any other MPI communication in the application, so there's never a possibility of deadlock or hard-limit resource contention between the two. AMMPI is used to implement the GASNet communication system (https://gasnet.lbl.gov). Further documentation about using AMMPI is available in the mpi-conduit documentation: https://gasnet.lbl.gov/dist/mpi-conduit/README Requirements ------------ * MPI 1.1 or later implementation, with a C99 compiler * GNU Make and basic UNIX tools for the provided Makefiles Limitations ----------- AMMPI is a purely polling-based implementation of Active Messages, in that incoming active messages are only serviced inside synchronous calls to the AMMPI library from the local process. This can lead to increased latency for those requests when the local node is inattentive to the network. AMMPI has a few notable departures from the AM-2 specification: * The client must call AM_SetExpectedResources() exactly once on an endpoint after setting up the translation table and before making any calls to the transport functions (AM_Poll, AM_Reply* or AM_Request*). It is also an error to call AM_Map, AM_MapAny or AM_Unmap (which change the translation table) after the call to AM_SetExpectedResources(). * AM_PAR bundle/endpoint access is not implemented - this means AMMPI does not provide thread safety, but can be used in a thread-funnelled mode with locking at the client level. * The nbytes argument to Medium and Long AM handlers has type `size_t` * AM_GetXferM is not implemented. * Clients should not take the address of AM_ entry point "functions", because many are implemented as macros. Change Log ---------- AMMPI 2.11 (08/2025) - Allow zero-byte Long AMs without validation of address against segment bounds, aligning the behavior with the GASNet-EX specification where the AM-2 specification leaves the behavior in such cases unspecified. AMMPI 2.10 (12/2023) - Implement new extension AMX_GetTokenInfo() - Finalize MPI more cautiously at exit, in case the client has already done so - Improved error reporting from the default AM handler - Repair USE_CLEAR_UNUSED_SPACE define for use with Valgrind AMMPI 2.9 (06/2018) - Medium and Long AM handlers change in signature on 64-bit platforms: the nbytes argument now has type size_t instead of int - New AMMPI_LIBRARY_VERSION_{MAJOR,MINOR} defines - Significant rearrangement of internal files and utilities - AM Handler dispatching code is now strictly spec-compliant - Several pseudo-public programmatic knobs renamed into the AMX_ namespace - AMX_ProcessLabel now supported for labelling per-node library output - Bug 2774: source_addr to Med/Long injection is now ignored for nbytes=0 - Fix an unreported cosmetic output bug in AMX_RETURN error reporting AMMPI 2.8 (03/2017) - Add AMMPI_FS_SYNC envvar to control exit-time filesystem sync() - Add AMMPI_MPI_THREAD to control MPI threading mode used to init MPI 2+ in AMMPI_SPMDSetThreadMode - Fix AM_{Get,Set}NumHandlers and AM_MoveEndpoint - Export AMMPI_enEqual - Expose AMX_SetTranslationTag - Add C++ compatibility to the public header (ie extern "C") - Renamed portable_platform.h - Rename some platform Makefile fragments - Remove support for: Cray T3E, Catamount, native Win32 (use cygwin instead) - Remove some obsolete files - make run-tests now outputs summary results at the end - Fix some harmless check-exports failures, and allow the test to be skipped via CHECK_EXPORTS=0 - Fix some harmless warnings on amxdist - Respect MANUAL_MPICFLAGS in stand-alone mode - Remove the debug/opt workaround - Fix possible syntax errors with AM expression arguments - Silence the annoying MPICH/Linux _FORTIFY_SOURCE warning - Use MPI_Comm_set_errhandler for MPI 2+ - Use realloc when appropriate to manage internal state - Use C99 __func__ when available in error messages - Fix compile errors for AMMPI_NONBLOCKING_SENDS==0 or AMMPI_PREPOST_RECVS=0 - Remove dead code - Update URL and contact email AMMPI 2.7 (10/2010) - Test for MPI_VERSION >= 2 in threaded utilities - Fix a harmless warning AMMPI 2.6 (05/2010) - Fix an assertion failure on PREDICT_PACKET_LENGTH_ AMMPI 2.5 (10/2009) - Implement strict prototypes, ie: fn(void) - Handle compilers that don't support __attribute__((__format__ (__printf__)) AMMPI 2.4 (10/2007) - Implement AMMPI_SPMDSetThreadMode - Implement AMMPI_VERIFY_MPI_ORDERING gasnet-2025.8.0/other/ammpi/license.txt0000664000175000017500000000357515142313673020043 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/ammpi/license.txt $ * All files in this directory and all sub-directories (except where otherwise noted) * are subject to the following licensing terms: * * --------------------------------------------------------------------------- * "Copyright (c) 2000-2025, The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * --------------------------------------------------------------------------- * * For more information about AMMPI, visit our home page at: * https://gasnet.lbl.gov/ammpi * Or send email to: * gasnet-devel@lbl.gov * * Source code contributions (fixes, patches, extensions etc.) should be * sent to to be reviewed for acceptance into the * primary distribution. Contributions are most likely to be accepted if they * are provided as public domain, or under a BSD-style license such as * the one above. * */ gasnet-2025.8.0/other/ammpi/ammpi_internal.h0000664000175000017500000004200315142313673021015 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/ammpi/ammpi_internal.h $ * Description: AMMPI internal header file * Copyright 2000, Dan Bonachea */ #ifndef _AMMPI_INTERNAL_H #define _AMMPI_INTERNAL_H #include #include #include #include /* ------------------------------------------------------------------------------------ */ /* AMMPI system configuration parameters */ #ifndef AMMPI_MAX_RECVMSGS_PER_POLL #define AMMPI_MAX_RECVMSGS_PER_POLL 10 /* max number of waiting messages serviced per poll (-1 for unlimited) */ #endif #ifndef AMMPI_INITIAL_NUMENDPOINTS #define AMMPI_INITIAL_NUMENDPOINTS 1 /* initial size of bundle endpoint table */ #endif #ifndef AMMPI_DEFAULT_NETWORKDEPTH #define AMMPI_DEFAULT_NETWORKDEPTH 4 /* default depth if none specified */ #endif #ifndef AMMPI_PREPOST_RECVS #define AMMPI_PREPOST_RECVS 1 /* pre-post non-blocking MPI recv's */ #endif #ifndef AMMPI_RECV_REPOST_SLACK #define AMMPI_RECV_REPOST_SLACK 1 /* number of recv operations to lazily re-post */ #endif #ifndef AMMPI_SEPARATE_TEST #define AMMPI_SEPARATE_TEST 1 /* issue separate MPI_Test calls in the common case, instead of a single MPI_TestAny */ #endif #ifndef AMMPI_SEPARATE_TEST_BOUNCE #define AMMPI_SEPARATE_TEST_BOUNCE 1 /* same as AMMPI_SEPARATE_TEST, but alternate pools */ #endif #ifndef AMMPI_NONBLOCKING_SENDS #define AMMPI_NONBLOCKING_SENDS 1 /* use non-blocking MPI send's */ #endif #ifndef AMMPI_SEND_EARLYCOMPLETE #define AMMPI_SEND_EARLYCOMPLETE 2 /* num outstanding send ops that initiates early completion attempt (0==never) */ #endif #ifndef AMMPI_LINEAR_SEND_COMPLETE #define AMMPI_LINEAR_SEND_COMPLETE 0 /* use linear algorithm to complete sends */ #endif #ifndef AMMPI_MPIIRECV_ORDERING_BUGCHECK #if PLATFORM_OS_AIX /* some MPI implementations intermittently fail to correctly maintain irecv ordering required by MPI spec number is how often to check for this bug */ #define AMMPI_MPIIRECV_ORDERING_BUGCHECK 100 #else #define AMMPI_MPIIRECV_ORDERING_BUGCHECK 0 #endif #endif #if AMMPI_MPIIRECV_ORDERING_BUGCHECK && AMMPI_RECV_REPOST_SLACK /* AMMPI_RECV_REPOST_SLACK incompatible with AMMPI_MPIIRECV_ORDERING_BUGCHECK */ #undef AMMPI_RECV_REPOST_SLACK #define AMMPI_RECV_REPOST_SLACK 0 #endif #ifndef AMMPI_VERIFY_MPI_ORDERING #define AMMPI_VERIFY_MPI_ORDERING 0 /* debugging aid for MPI implementations (not for general use) */ #endif #if AMMPI_NONBLOCKING_SENDS #define AMMPI_SENDBUFFER_SZ 2*AMMPI_MAX_NETWORK_MSG /* size of MPI send buffer (used for rejections) */ #else #define AMMPI_SENDBUFFER_SZ 1048576 /* size of MPI send buffer */ #endif #ifdef AMMPI_DISABLE_AMTAGS /* disable the use of the AM-2.0 message tags saves 8 bytes of AM header on the wire */ #define AMMPI_USE_AMTAGS 0 #else #define AMMPI_USE_AMTAGS 1 #endif #ifndef AMMPI_MAX_NETWORKDEPTH #define AMMPI_MAX_NETWORKDEPTH (1024*1024) /* max depth we ever allow user to ask for */ #endif #ifndef AMMPI_BUF_ALIGN #define AMMPI_BUF_ALIGN 128 /* alignment to use for buffers - optimized for cache lines (min is 8) */ #endif #ifndef AMMPI_FLOW_CONTROL #define AMMPI_FLOW_CONTROL 1 /* use token-based flow control to limit unexpected MPI messages */ #endif #ifndef AMMPI_DEFAULT_SYNCSEND_THRESH /* size threshhold above which to use synchronous non-blocking MPI send's * this can be used in lieu of AMMPI_FLOW_CONTROL as an alternate * (and less effective) flow control mechanism for MPI implementations lacking * a spec-compliant backpressure mechanism */ #define AMMPI_DEFAULT_SYNCSEND_THRESH -1 /* -1 == never use sync sends */ #endif /* AMMPI-SPMD system configuration parameters */ #ifndef AMMPI_BLOCKING_SPMD_BARRIER #define AMMPI_BLOCKING_SPMD_BARRIER 1 /* use blocking AM calls in SPMDBarrier() */ #endif #ifndef AMMPI_COLLECT_STATS #define AMMPI_COLLECT_STATS 1 /* collect AM messaging layer statistics */ #endif #ifndef AMMPI_COLLECT_LATENCY_STATS #define AMMPI_COLLECT_LATENCY_STATS 0 /* not yet implemented */ #endif #ifndef AMMPI_REPLYBUF_POOL_GROWTHFACTOR #define AMMPI_REPLYBUF_POOL_GROWTHFACTOR 1.5 #endif /* ------------------------------------------------------------------------------------ */ AMMPI_BEGIN_EXTERNC #if AMMPI_COLLECT_STATS #define AMMPI_STATS(stmt) stmt #else #define AMMPI_STATS(stmt) #endif /* ------------------------------------------------------------------------------------ */ /* Internal types */ /* message flags */ /* 0-1: category * 2: request vs. reply * 3: sequence number * 4-7: numargs */ typedef unsigned char ammpi_flag_t; #define AMMPI_MSG_SETFLAGS(pmsg, isreq, cat, numargs) \ ((pmsg)->flags = (ammpi_flag_t) ( \ (((numargs) & 0x1F) << 3) \ | (((isreq) & 0x1) << 2) \ | ((cat) & 0x3) \ )) #define AMMPI_MSG_NUMARGS(pmsg) ( ( ((unsigned char)(pmsg)->flags) >> 3 ) & 0x1F) #define AMMPI_MSG_ISREQUEST(pmsg) (!!(((unsigned char)(pmsg)->flags) & 0x4)) #define AMMPI_MSG_CATEGORY(pmsg) ((ammpi_category_t)((pmsg)->flags & 0x3)) /* active message header & meta info fields */ typedef struct { #if AMMPI_VERIFY_MPI_ORDERING uint64_t seqnum; #endif #if AMMPI_USE_AMTAGS tag_t tag; #endif ammpi_flag_t flags; uint8_t systemMessageType; uint8_t systemMessageArg; handler_t handlerId; uint16_t nBytes; /* TODO: remove for short */ uint16_t _reserved; uintptr_t destOffset; /* TODO: remove for short/med */ } ammpi_msg_t; /* non-transmitted ammpi buffer bookkeeping info - * this data must be kept to a bare minimum because it constrains packet size */ typedef struct { int8_t handlerRunning; int8_t replyIssued; ammpi_node_t sourceId; /* 0-based endpoint id of remote */ struct ammpi_ep *dest; /* ep_t of endpoint that received this message */ en_t sourceAddr; /* address of remote */ } ammpi_bufstatus_t; /* active message buffer, including message and space for data payload */ typedef struct ammpi_buf { ammpi_msg_t Msg; uint8_t _Data[(4*AMMPI_MAX_SHORT)+AMMPI_MAX_LONG]; /* holds args and data */ /* received requests & replies only */ ammpi_bufstatus_t status; /* padding to enforce sizeof(ammpi_buf_t)%AMMPI_BUF_ALIGN == 0 */ #define __EXP ((AMMPI_BUF_ALIGN - \ (sizeof(ammpi_msg_t) + \ (4*AMMPI_MAX_SHORT)+AMMPI_MAX_LONG + \ sizeof(ammpi_bufstatus_t)) % AMMPI_BUF_ALIGN) \ % AMMPI_BUF_ALIGN) #ifdef __GNUC__ uint8_t _pad[__EXP]; #else /* non-GNU compilers may choke on 0-length array in a struct */ uint8_t _pad[__EXP == 0 ? AMMPI_BUF_ALIGN : __EXP]; #endif #undef __EXP } ammpi_buf_t; #define AMMPI_MIN_NETWORK_MSG ((int)(uintptr_t)&((ammpi_buf_t *)NULL)->_Data[0]) #define AMMPI_MAX_SMALL_NETWORK_MSG ((int)(uintptr_t)&((ammpi_buf_t *)NULL)->_Data[(4*AMMPI_MAX_SHORT)]) #define AMMPI_MAX_NETWORK_MSG ((int)(uintptr_t)&((ammpi_buf_t *)NULL)->_Data[(4*AMMPI_MAX_SHORT)+AMMPI_MAX_LONG]) #define AMMPI_SMALL_SENDBUF_SZ AMX_ALIGNUP(AMMPI_MAX_SMALL_NETWORK_MSG, AMMPI_BUF_ALIGN) /* ------------------------------------------------------------------------------------ */ /* Complex user-visible types */ typedef struct { tag_t tag; /* remote tag */ char inuse; /* entry in use */ ammpi_node_t id; /* id in compressed table */ en_t name; /* remote address */ } ammpi_translation_t; typedef struct { /* gives us a compacted version of the translation table */ en_t remoteName; #if AMMPI_USE_AMTAGS tag_t tag; #endif #if AMMPI_FLOW_CONTROL uint32_t tokens_out; /* remaining tokens for sends to this host */ uint32_t tokens_in; /* coalesced tokens recieved from this host */ #endif #if AMMPI_VERIFY_MPI_ORDERING /* debugging aid for MPI implementations */ struct { uint64_t in; /* last seqnum recvd from this host */ uint64_t out; /* last seqnum sent to this host */ } seqnum[2]; /* reply, request */ #endif } ammpi_perproc_info_t; typedef struct { MPI_Request* txHandle; /* send buffer handles */ ammpi_buf_t** txBuf; /* send buffer ptrs */ int numBufs; int numActive; int bufSize; int numBlocks; /* buffer memory management */ char **memBlocks; int *tmpIndexArray; /* temporaries used during MPI interface */ MPI_Status *tmpStatusArray; } ammpi_sendbuffer_pool_t; typedef struct { MPI_Comm *mpicomm; /* send buffer tables (for AMMPI_NONBLOCKING_SENDS) */ ammpi_sendbuffer_pool_t sendPool_small; ammpi_sendbuffer_pool_t sendPool_large; /* recv buffer tables (for AMMPI_PREPOST_RECVS) */ MPI_Request* rxHandle; ammpi_buf_t* rxBuf; /* recv buffers (aligned) */ uint32_t rxNumBufs; /* number of recv buffers in each pool */ int rxCurr; /* the oldest recv buffer index */ #if AMMPI_RECV_REPOST_SLACK int rxPostSlack; /* number of recv reposts lazily delayed */ int rxPostSlackMax; /* max number of recv reposts lazily delayed */ #endif } ammpi_virtual_network_t; /* Endpoint bundle object */ struct ammpi_eb { struct ammpi_ep **endpoints; /* dynamically-grown array of endpoints in bundle */ int n_endpoints; /* Number of EPs in the bundle */ int cursize; /* size of the array */ uint8_t event_mask; /* Event Mask for blocking ops */ }; /* Endpoint object */ struct ammpi_ep { en_t name; /* Endpoint name */ tag_t tag; /* current tag */ eb_t eb; /* Bundle of endpoint */ void *segAddr; /* Start address of EP VM segment */ uintptr_t segLength; /* Length of EP VM segment */ ammpi_translation_t *translation; /* translation table */ ammpi_node_t translationsz; /* current size of table */ ammpi_handler_fn_t handler[AMMPI_MAX_NUMHANDLERS]; /* handler table */ ammpi_handler_fn_t controlMessageHandler; /* internal structures */ ammpi_node_t totalP; /* the number of endpoints we communicate with - also number of translations currently in use */ int depth; /* network depth, -1 until AM_SetExpectedResources is called */ #if AMMPI_FLOW_CONTROL uint32_t tokens_perhost; uint32_t tokens_slack; #endif ammpi_perproc_info_t *perProcInfo; ammpi_stats_t stats; /* statistical collection */ AMMPI_preHandlerCallback_t preHandlerCallback; /* client hooks for statistical/debugging usage */ AMMPI_postHandlerCallback_t postHandlerCallback; ammpi_buf_t* rxBuf_alloc; /* recv buffers (mallocated ptr) */ MPI_Request* rxHandle_both; /* all the recv handles, reply then request */ ammpi_virtual_network_t Req; /* requests */ ammpi_virtual_network_t Rep; /* replies */ }; /*------------------------------------------------------------------------------------ * Error reporting *------------------------------------------------------------------------------------ */ static const char *MPI_ErrorName(int errval) { const char *code = NULL; char systemErrDesc[MPI_MAX_ERROR_STRING+10]; int len = MPI_MAX_ERROR_STRING; static char msg[MPI_MAX_ERROR_STRING+100]; switch (errval) { case MPI_ERR_BUFFER: code = "MPI_ERR_BUFFER"; break; case MPI_ERR_COUNT: code = "MPI_ERR_COUNT"; break; case MPI_ERR_TYPE: code = "MPI_ERR_TYPE"; break; case MPI_ERR_TAG: code = "MPI_ERR_TAG"; break; case MPI_ERR_COMM: code = "MPI_ERR_COMM"; break; case MPI_ERR_RANK: code = "MPI_ERR_RANK"; break; case MPI_ERR_REQUEST: code = "MPI_ERR_REQUEST"; break; case MPI_ERR_ROOT: code = "MPI_ERR_ROOT"; break; case MPI_ERR_GROUP: code = "MPI_ERR_GROUP"; break; case MPI_ERR_OP: code = "MPI_ERR_OP"; break; case MPI_ERR_TOPOLOGY: code = "MPI_ERR_TOPOLOGY"; break; case MPI_ERR_DIMS: code = "MPI_ERR_DIMS"; break; case MPI_ERR_ARG: code = "MPI_ERR_ARG"; break; case MPI_ERR_UNKNOWN: code = "MPI_ERR_UNKNOWN"; break; case MPI_ERR_TRUNCATE: code = "MPI_ERR_TRUNCATE"; break; case MPI_ERR_OTHER: code = "MPI_ERR_OTHER"; break; case MPI_ERR_INTERN: code = "MPI_ERR_INTERN"; break; case MPI_ERR_PENDING: code = "MPI_ERR_PENDING"; break; case MPI_ERR_IN_STATUS: code = "MPI_ERR_IN_STATUS"; break; case MPI_ERR_LASTCODE: code = "MPI_ERR_LASTCODE"; break; default: code = "*unknown MPI error*"; } if (MPI_Error_string(errval, systemErrDesc, &len) != MPI_SUCCESS || len == 0) strcpy(systemErrDesc, "(no description available)"); sprintf(msg, "%s(%i): %s", code, errval, systemErrDesc); return msg; } /* ------------------------------------------------------------------------------------ */ /* make an MPI call - if it fails, print error message and return */ #if AMX_DEBUG || AMX_ENABLE_ERRCHECKS #define MPI_SAFE(fncall) do { \ int retcode = (fncall); \ if_pf (retcode != MPI_SUCCESS) { \ char msg[1024]; \ sprintf(msg, "\nAMMPI encountered an MPI Error: %s(%i)\n", MPI_ErrorName(retcode), retcode); \ AMX_RETURN_ERRFR(RESOURCE, fncall, msg); \ } \ } while (0) #else #define MPI_SAFE(fncall) (fncall) #endif /* make an MPI call - * if it fails, print error message and value of expression is FALSE, * otherwise, the value of this expression will be TRUE */ #if AMX_DEBUG || AMX_ENABLE_ERRCHECKS #define MPI_SAFE_NORETURN(fncall) (AMX_VerboseErrors ? \ AMMPI_checkMPIreturn(fncall, #fncall, AMX_CURRENT_FUNCTION, __FILE__, __LINE__): \ (fncall) == MPI_SUCCESS) #else #define MPI_SAFE_NORETURN(fncall) ((fncall),TRUE) #endif static int AMMPI_checkMPIreturn(int retcode, const char *fncallstr, const char *context, const char *file, int line) { if_pf (retcode != MPI_SUCCESS) { fprintf(stderr, "\nAMMPI %s encountered an MPI Error: %s(%i)\n" " at %s:%i\n", context, MPI_ErrorName(retcode), retcode, file, line); fflush(stderr); return FALSE; } else return TRUE; } /* ------------------------------------------------------------------------------------ */ /* global data */ extern int AMMPI_numBundles; extern eb_t AMMPI_bundles[AMMPI_MAX_BUNDLES]; /* ------------------------------------------------------------------------------------ */ /* global helper functions */ extern int AMMPI_Block(eb_t eb); /* block until some endpoint receive buffer becomes non-empty with a user message * may poll, and does handle SPMD control events */ extern int AMMPI_ServiceIncomingMessages(ep_t ep, int blockForActivity, int repliesOnly); /* debugging printouts */ extern char *AMMPI_enStr(en_t en, char *buf); extern char *AMMPI_tagStr(tag_t tag, char *buf); extern void AMMPI_DefaultReturnedMsg_Handler(int status, op_t opcode, void *token); /* ------------------------------------------------------------------------------------ */ /* interface for allowing control messages to be sent between mutually mapped endpoints * up to AMMPI_MAX_SHORT integer arguments are passed verbatim to the registered handler, * which should NOT call any AMMPI functions (including poll, reply, etc) * AMMPI_SendControlMessage is safe to call from a handler context */ extern int AMMPI_SendControlMessage(ep_t from, en_t to, int numargs, ...); /* beware - cast all optional args of AMMPI_SendControlMessage to int32_t */ extern int AMMPI_RegisterControlMessageHandler(ep_t ea, ammpi_handler_fn_t function); #if AMMPI_NONBLOCKING_SENDS extern int AMMPI_AllocateSendBuffers(ep_t ep); extern int AMMPI_ReleaseSendBuffers(ep_t ep); extern int AMMPI_AcquireSendBuffer(ep_t ep, int numBytes, int isrequest, ammpi_buf_t** pbuf, MPI_Request** pHandle); extern int AMMPI_ReapSendCompletions(ammpi_sendbuffer_pool_t* pool); extern int AMMPI_GrowReplyPool(ammpi_sendbuffer_pool_t* pool); #endif #if AMMPI_PREPOST_RECVS extern int AMMPI_PostRecvBuffer(ammpi_buf_t *rxBuf, MPI_Request *prxHandle, MPI_Comm *pmpicomm); #endif /* ------------------------------------------------------------------------------------ */ /* system message type field */ typedef enum { ammpi_system_user=0, /* not a system message */ ammpi_system_autoreply, /* automatically generated reply */ ammpi_system_returnedmessage, /* arg is reason code, req/rep represents the type of message refused */ ammpi_system_controlmessage, /* used to pass system control information - arg is reserved */ ammpi_system_numtypes } ammpi_system_messagetype_t; /* ------------------------------------------------------------------------------------ */ AMMPI_END_EXTERNC #endif gasnet-2025.8.0/other/ammpi/ammpi_reqrep.c0000664000175000017500000014471015142313673020502 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/ammpi/ammpi_reqrep.c $ * Description: AMMPI Implementations of request/reply operations * Copyright 2000, Dan Bonachea */ #if _FORTIFY_SOURCE > 0 && __OPTIMIZE__ <= 0 /* silence an annoying MPICH/Linux warning */ #undef _FORTIFY_SOURCE #endif #include #include #include "ammpi_internal.h" /* must come after any other headers */ /* forward decls */ static int AMMPI_RequestGeneric(ammpi_category_t category, ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr, uint8_t systemType, uint8_t systemArg); static int AMMPI_ReplyGeneric(ammpi_category_t category, ammpi_buf_t *requestbuf, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr, uint8_t systemType, uint8_t systemArg); /* ------------------------------------------------------------------------------------ */ /* mpihandle points to the MPI_Request to receive the non-blocking send handle, * or null to use a blocking send */ extern int AMMPI_syncsend_thresh; static int sendPacket(ep_t ep, ammpi_virtual_network_t *activeNet, void *packet, int packetlength, en_t destaddress, MPI_Request *mpihandle) { AMX_assert(ep && activeNet && packet && packetlength > 0); AMX_assert(packetlength <= AMMPI_MAX_NETWORK_MSG); AMX_VERBOSE_INFO(("sending %i byte packet to (%s)", packetlength, AMMPI_enStr(destaddress, 0))); #if AMMPI_NONBLOCKING_SENDS if_pt (mpihandle && *mpihandle == MPI_REQUEST_NULL) { if (packetlength >= AMMPI_syncsend_thresh) { /* synchronous mode non-blocking send - for MPI implementations lacking a reasonable implementation of back-pressure. This doesn't guarantee we dont get unexpected messages if the target is inattentive, but it at least limits the max number of messages in the unexpected message queue which exceed the syncsend threshold - limit is one depth of such messages (and an unlimited number of messages smaller than the threshold) */ MPI_SAFE(MPI_Issend(packet, packetlength, MPI_BYTE, destaddress.mpirank, destaddress.mpitag, *activeNet->mpicomm, mpihandle)); } else { MPI_SAFE(MPI_Isend(packet, packetlength, MPI_BYTE, destaddress.mpirank, destaddress.mpitag, *activeNet->mpicomm, mpihandle)); } } else #endif { MPI_SAFE(MPI_Bsend(packet, packetlength, MPI_BYTE, destaddress.mpirank, destaddress.mpitag, *activeNet->mpicomm)); } AMMPI_STATS(ep->stats.TotalBytesSent += packetlength); if_pt (mpihandle) { #if AMMPI_RECV_REPOST_SLACK && AMMPI_PREPOST_RECVS { /* use the send delay slot to catch up on deferred recv buffer reposting work */ /* check the opposite net, because a reply send means we just got a request, and a request send means we're likely to have recently received a reply */ ammpi_virtual_network_t * const altNet = ( (activeNet == &(ep->Req)) ? &(ep->Rep) : &(ep->Req) ); while (altNet->rxPostSlack > 0) { int altidx = altNet->rxCurr - altNet->rxPostSlack; if (altidx < 0) altidx += altNet->rxNumBufs; AMX_assert(altidx >= 0 && altidx < altNet->rxNumBufs && altidx != altNet->rxCurr); if (AMMPI_PostRecvBuffer(&altNet->rxBuf[altidx], &altNet->rxHandle[altidx], altNet->mpicomm)) AMX_RETURN_ERR(RESOURCE); altNet->rxPostSlack--; } } #endif #if AMMPI_SEND_EARLYCOMPLETE && AMMPI_NONBLOCKING_SENDS { /* use the send delay slot to catch up on send completion work */ ammpi_sendbuffer_pool_t * const pool = ( (packetlength <= AMMPI_SMALL_SENDBUF_SZ) ? &activeNet->sendPool_small : &activeNet->sendPool_large ); if (pool->numActive >= AMMPI_SEND_EARLYCOMPLETE) { int retval = AMMPI_ReapSendCompletions(pool); if_pf (retval != AM_OK) AMX_RETURN(retval); } } #endif } return AM_OK; } /* ------------------------------------------------------------------------------------ */ static int AMMPI_GetOpcode(int isrequest, ammpi_category_t cat) { switch (cat) { case ammpi_Short: if (isrequest) return AM_REQUEST_M; else return AM_REPLY_M; case ammpi_Medium: if (isrequest) return AM_REQUEST_IM; else return AM_REPLY_IM; case ammpi_Long: if (isrequest) return AM_REQUEST_XFER_M; else return AM_REPLY_XFER_M; default: AMX_FatalErr("unrecognized opcode in AMMPI_GetOpcode"); return -1; } } /* ------------------------------------------------------------------------------------ */ static int sourceAddrToId(ep_t ep, en_t sourceAddr) { /* return source id in ep perproc table of this remote addr, or -1 for not found */ ammpi_node_t i; /* try the common case where mapping ids match MPI rank */ if (sourceAddr.mpirank < ep->totalP && AMMPI_enEqual(ep->perProcInfo[sourceAddr.mpirank].remoteName, sourceAddr)) return sourceAddr.mpirank; /* failed - use linear search */ for (i = 0; i < ep->totalP; i++) { if (AMMPI_enEqual(ep->perProcInfo[i].remoteName, sourceAddr)) return i; } return -1; } /* ------------------------------------------------------------------------------------ */ /* accessors for packet args, data and length * the only complication here is we want data to be double-word aligned, so we may add * an extra unused 4-byte argument to make sure the data lands on a double-word boundary * TODO: remove padding arg for shorts and longs, where it's irrelevant */ #if 0 #define HEADER_EVEN_WORDLENGTH (((int)(uintptr_t)((&((ammpi_buf_t *)NULL)->_Data)-1))%8==0?1:0) #else #define HEADER_EVEN_WORDLENGTH \ ( ( (((uint8_t *)&(((ammpi_buf_t *)NULL)->_Data)) - ((uint8_t *)NULL)) & 0x7) == 0 ? 1 : 0) #endif #define ACTUAL_NUM_ARGS(pMsg) (AMMPI_MSG_NUMARGS(pMsg)%2==0? \ AMMPI_MSG_NUMARGS(pMsg)+!HEADER_EVEN_WORDLENGTH: \ AMMPI_MSG_NUMARGS(pMsg)+HEADER_EVEN_WORDLENGTH) #define GET_PACKET_LENGTH(pbuf) \ (((char *)&pbuf->_Data[4*ACTUAL_NUM_ARGS(&pbuf->Msg) + pbuf->Msg.nBytes]) - ((char *)pbuf)) #define PREDICT_PACKET_LENGTH_(nArgs,nBytes) /* conservative estimate of packet size */ \ ((int)(uintptr_t)(char *)&(((ammpi_buf_t*)NULL)->_Data[4*(nArgs+1) + nBytes])) #if AMX_DEBUG /* If we conservatively over-estimate too near the MAX, then we get an assertion failure */ #define PREDICT_PACKET_LENGTH(nArgs,nBytes) \ MIN(PREDICT_PACKET_LENGTH_(nArgs,nBytes),AMMPI_MAX_NETWORK_MSG) #else #define PREDICT_PACKET_LENGTH(nArgs,nBytes) PREDICT_PACKET_LENGTH_(nArgs,nBytes) #endif #define GET_PACKET_DATA(pbuf) \ (&pbuf->_Data[4*ACTUAL_NUM_ARGS(&pbuf->Msg)]) #define GET_PACKET_ARGS(pbuf) \ ((uint32_t *)pbuf->_Data) #if AMMPI_VERIFY_MPI_ORDERING /* debugging aid for MPI implementations */ #define AMMPI_VERIFY_MPI_SETSEQNUM(msg, isReq, ep, remoteid) ((msg).seqnum = ++((ep)->perProcInfo[remoteid]).seqnum[isReq].out) #else #define AMMPI_VERIFY_MPI_SETSEQNUM(msg, isReq, ep, remoteid) ((void)0) #endif /* ------------------------------------------------------------------------------------ */ #if AMX_DEBUG #define REFUSE_NOTICE(reason) AMX_Err("I just refused a message and returned to sender. Reason: %s", reason) #else #define REFUSE_NOTICE(reason) (void)0 #endif /* this is a local-use-only macro for AMMPI_processPacket */ #define AMMPI_REFUSEMESSAGE(ep, buf, errcode) do { \ int retval; \ buf->Msg.systemMessageType = (uint8_t)ammpi_system_returnedmessage; \ buf->Msg.systemMessageArg = (uint8_t)errcode; \ retval = sendPacket(ep, &ep->Rep, buf, GET_PACKET_LENGTH(buf), \ (buf)->status.sourceAddr, NULL); \ if (retval != AM_OK) AMX_Err("failed to sendPacket to refuse message"); \ else REFUSE_NOTICE(#errcode); \ return; \ } while(0) void AMMPI_processPacket(ammpi_buf_t *buf, int isloopback) { ep_t const ep = buf->status.dest; ammpi_msg_t * const msg = &buf->Msg; ammpi_bufstatus_t * const status = &buf->status; int const numargs = AMMPI_MSG_NUMARGS(msg); int const isrequest = AMMPI_MSG_ISREQUEST(msg); ammpi_category_t const cat = AMMPI_MSG_CATEGORY(msg); ammpi_node_t const sourceId = status->sourceId; int const issystemmsg = ((ammpi_system_messagetype_t)msg->systemMessageType) != ammpi_system_user; /* handle returned messages */ if_pf (issystemmsg) { ammpi_system_messagetype_t type = ((ammpi_system_messagetype_t)msg->systemMessageType); if (type == ammpi_system_returnedmessage) { amx_returned_handler_fn_t handlerfn = (amx_returned_handler_fn_t)ep->handler[0]; op_t opcode; if (sourceId == (ammpi_node_t)-1) return; /* unknown source, ignore message */ opcode = AMMPI_GetOpcode(isrequest, cat); /* note that source/dest for returned mesgs reflect the virtual "message denied" packet * although it doesn't really matter because the AM2 spec is too vague * about the argblock returned message argument for it to be of any use to anyone */ status->replyIssued = TRUE; /* prevent any reply */ status->handlerRunning = TRUE; AMX_assert(handlerfn); (*handlerfn)(msg->systemMessageArg, opcode, (void *)buf); status->handlerRunning = FALSE; AMMPI_STATS(ep->stats.ReturnedMessages++); return; } } if (!isloopback) { if (isrequest) AMMPI_STATS(ep->stats.RequestsReceived[cat]++); else AMMPI_STATS(ep->stats.RepliesReceived[cat]++); } if_pf (sourceId == (ammpi_node_t)-1) AMMPI_REFUSEMESSAGE(ep, buf, EBADENDPOINT); #if AMMPI_VERIFY_MPI_ORDERING /* debugging aid for MPI implementations */ if (!isloopback) { uint64_t seqnum = msg->seqnum; uint64_t seqnum_exp = ++(ep->perProcInfo[sourceId].seqnum[isrequest].in); if_pf (seqnum != seqnum_exp) AMX_FatalErr("MPI message ordering violation detected on %s arrival: \n" " myMPIrank=%i sourceId=%i remoteMPIrank=%i\n" " message seqnum: %"PRIu64", expected: %"PRIu64, (isrequest?"request":"reply"), (int)ep->name.mpirank, (int)sourceId, (int)ep->perProcInfo[sourceId].remoteName.mpirank, seqnum, seqnum_exp); } #endif #if AMMPI_USE_AMTAGS if_pf (ep->tag == AM_NONE || (ep->tag != msg->tag && ep->tag != AM_ALL)) AMMPI_REFUSEMESSAGE(ep, buf, EBADTAG); #endif if_pf (ep->handler[msg->handlerId] == amx_unused_handler && !issystemmsg && msg->handlerId != 0) AMMPI_REFUSEMESSAGE(ep, buf, EBADHANDLER); switch (cat) { case ammpi_Short: if_pf (msg->nBytes > 0 || msg->destOffset > 0) AMMPI_REFUSEMESSAGE(ep, buf, EBADLENGTH); break; case ammpi_Medium: if_pf (msg->nBytes > AMMPI_MAX_MEDIUM || msg->destOffset > 0) AMMPI_REFUSEMESSAGE(ep, buf, EBADLENGTH); break; case ammpi_Long: /* check segment limits */ if_pf (msg->nBytes && (((uintptr_t)ep->segAddr + msg->destOffset) == 0 || ep->segLength == 0)) AMMPI_REFUSEMESSAGE(ep, buf, EBADSEGOFF); if_pf (msg->destOffset + msg->nBytes > ep->segLength || msg->nBytes > AMMPI_MAX_LONG) AMMPI_REFUSEMESSAGE(ep, buf, EBADLENGTH); break; default: AMX_unreachable(); } /* --- message accepted --- */ #if AMMPI_COLLECT_LATENCY_STATS && AMMPI_COLLECT_STATS if (!isrequest && !isloopback) { /* gather some latency statistics */ uint64_t now = AMX_getMicrosecondTimeStamp(); uint64_t latency = (now - desc->firstSendTime); ep->stats.RequestSumLatency += latency; if (latency < ep->stats.RequestMinLatency) ep->stats.RequestMinLatency = latency; if (latency > ep->stats.RequestMaxLatency) ep->stats.RequestMaxLatency = latency; } #endif /* run the handler */ status->replyIssued = FALSE; status->handlerRunning = TRUE; uint32_t * const pargs = GET_PACKET_ARGS(buf); if_pf (issystemmsg) { /* an AMMPI system message */ ammpi_system_messagetype_t type = ((ammpi_system_messagetype_t)(msg->systemMessageType & 0xF)); switch (type) { case ammpi_system_autoreply: /* do nothing, already taken care of */ #if AMMPI_FLOW_CONTROL AMX_assert(!isloopback); ep->perProcInfo[sourceId].tokens_out += msg->systemMessageArg; /* returned tokens */ AMX_assert(ep->perProcInfo[sourceId].tokens_out <= ep->tokens_perhost); #endif break; case ammpi_system_controlmessage: /* run a control handler */ if (ep->controlMessageHandler == NULL || ep->controlMessageHandler == amx_unused_handler) AMX_Err("got an AMMPI control message, but no controlMessageHandler is registered. Ignoring..."); else { AMX_RUN_HANDLER_SHORT(ep->controlMessageHandler, buf, pargs, numargs); } break; default: AMX_unreachable(); } } else { /* a user message */ #if AMMPI_FLOW_CONTROL if (!isloopback) { if (isrequest) ep->perProcInfo[sourceId].tokens_in++; /* coalesce tokens */ AMX_assert(ep->perProcInfo[sourceId].tokens_in <= ep->tokens_perhost); ep->perProcInfo[sourceId].tokens_out += msg->systemMessageArg; /* returned tokens */ AMX_assert(ep->perProcInfo[sourceId].tokens_out <= ep->tokens_perhost); } #endif handler_t const hid = msg->handlerId; switch (cat) { case ammpi_Short: if (ep->preHandlerCallback) ep->preHandlerCallback(ammpi_Short, isrequest, hid, buf, NULL, 0, numargs, pargs); AMX_RUN_HANDLER_SHORT(ep->handler[hid], buf, pargs, numargs); if (ep->postHandlerCallback) ep->postHandlerCallback(cat, isrequest); break; case ammpi_Medium: { uint8_t * const pData = GET_PACKET_DATA(buf); if (ep->preHandlerCallback) ep->preHandlerCallback(ammpi_Medium, isrequest, hid, buf, pData, msg->nBytes, numargs, pargs); AMX_RUN_HANDLER_MEDIUM(ep->handler[hid], buf, pargs, numargs, pData, msg->nBytes); if (ep->postHandlerCallback) ep->postHandlerCallback(cat, isrequest); break; } case ammpi_Long: { int8_t * const pData = ((int8_t *)ep->segAddr) + msg->destOffset; if (!isloopback) /* a single-message bulk transfer. do the copy */ memcpy(pData, GET_PACKET_DATA(buf), msg->nBytes); if (ep->preHandlerCallback) ep->preHandlerCallback(ammpi_Long, isrequest, hid, buf, pData, msg->nBytes, numargs, pargs); AMX_RUN_HANDLER_LONG(ep->handler[hid], buf, pargs, numargs, pData, msg->nBytes); if (ep->postHandlerCallback) ep->postHandlerCallback(cat, isrequest); break; } default: AMX_unreachable(); } } status->handlerRunning = FALSE; #if AMMPI_FLOW_CONTROL || AMMPI_COLLECT_LATENCY_STATS if (isrequest && !status->replyIssued && ep->perProcInfo[sourceId].tokens_in > ep->tokens_slack) { static va_list va_dummy; va_list *p_dummy = &va_dummy; p_dummy++; /* dummy value */ /* user didn't reply, so issue an auto-reply */ if_pf (AMMPI_ReplyGeneric(ammpi_Short, buf, 0, 0, 0, 0, 0, va_dummy, ammpi_system_autoreply, 0) != AM_OK) /* should never happen */ AMX_Err("Failed to issue auto reply in AMMPI_ServiceIncomingMessages"); } #endif } #undef AMMPI_REFUSEMESSAGE /* this is a local-use-only macro */ /* main message receive workhorse - * service available incoming messages, up to AMMPI_MAX_RECVMSGS_PER_POLL * note this is NOT reentrant - only one call to this method should be in progress at any time * if blockForActivity, then block until something happens * sets numUserHandlersRun to number of user handlers that got run */ #if AMX_DEBUG /* enforce lack of reentrancy */ extern int _AMMPI_ServiceIncomingMessages(ep_t ep, int blockForActivity, int repliesOnly); extern int AMMPI_ServiceIncomingMessages(ep_t ep, int blockForActivity, int repliesOnly) { static int inServiceIncomingMessages = 0; int retval; AMX_assert(inServiceIncomingMessages == 0 || (inServiceIncomingMessages == 1 && repliesOnly)); inServiceIncomingMessages++; retval = _AMMPI_ServiceIncomingMessages(ep, blockForActivity, repliesOnly); inServiceIncomingMessages--; return retval; } #else #define _AMMPI_ServiceIncomingMessages AMMPI_ServiceIncomingMessages #endif extern int _AMMPI_ServiceIncomingMessages(ep_t ep, int blockForActivity, int repliesOnly) { int numUserHandlersRun = 0; do { #if AMMPI_PREPOST_RECVS ammpi_virtual_network_t *activeNet; int activeidx; #else static ammpi_buf_t _recvBuffer[2]; #endif ammpi_buf_t *buf = NULL; /* the buffer that holds the incoming msg */ MPI_Status mpistatus; /* check for message */ #if AMMPI_PREPOST_RECVS { int msgready = 0; #if AMMPI_MPIIRECV_ORDERING_BUGCHECK static int recvorder_bugcheck = 0; if (recvorder_bugcheck < 0 || recvorder_bugcheck++ == AMMPI_MPIIRECV_ORDERING_BUGCHECK) { int idxready; static int alt = 0; activeNet = &ep->Rep; if (!repliesOnly && ((alt++)&1)) activeNet = &ep->Req; MPI_SAFE(MPI_Testany(activeNet->rxNumBufs, activeNet->rxHandle, &idxready, &msgready, &mpistatus)); if (msgready) { if (idxready != activeNet->rxCurr && recvorder_bugcheck > 0) { AMX_DEBUG_WARN(("Detected bug in MPI recv ordering - activating workaround (%s,%i,%i)", (activeNet == &ep->Req ? "Req":"Rep"), idxready, activeNet->rxCurr)); recvorder_bugcheck = -1; /* ordering is now messed up - enable the hack for the remainder of this run */ } activeNet->rxCurr = idxready; goto gotone; } else if (recvorder_bugcheck > 0) recvorder_bugcheck = 0; } #endif #if AMMPI_SEPARATE_TEST /* use separate test calls */ #if AMMPI_SEPARATE_TEST_BOUNCE static int bounce = 0; /* bounce back and forth between pools */ if (!repliesOnly && ((bounce++)&1)) goto testreq; #endif activeNet = &ep->Rep; AMX_assert(activeNet->rxHandle[activeNet->rxCurr] != MPI_REQUEST_NULL); MPI_SAFE(MPI_Test(&activeNet->rxHandle[activeNet->rxCurr], &msgready, &mpistatus)); if (msgready) goto gotone; #if AMMPI_SEPARATE_TEST_BOUNCE goto testdone; #endif if (!repliesOnly) { testreq: activeNet = &ep->Req; AMX_assert(activeNet->rxHandle[activeNet->rxCurr] != MPI_REQUEST_NULL); MPI_SAFE(MPI_Test(&activeNet->rxHandle[activeNet->rxCurr], &msgready, &mpistatus)); if (msgready) goto gotone; } testdone: if_pt (!blockForActivity) return AM_OK; /* nothing else waiting */ #endif { MPI_Request rxCheck[2]; int idxready; int numToCheck = 1; rxCheck[0] = ep->Rep.rxHandle[ep->Rep.rxCurr]; AMX_assert(rxCheck[0] != MPI_REQUEST_NULL); if_pt (!repliesOnly) { rxCheck[1] = ep->Req.rxHandle[ep->Req.rxCurr]; AMX_assert(rxCheck[1] != MPI_REQUEST_NULL); numToCheck++; } if_pf (blockForActivity) { msgready = TRUE; MPI_SAFE(MPI_Waitany(numToCheck, rxCheck, &idxready, &mpistatus)); } else { MPI_SAFE(MPI_Testany(numToCheck, rxCheck, &idxready, &msgready, &mpistatus)); } if (msgready) { activeNet = (idxready ? &ep->Req : &ep->Rep); AMX_assert(rxCheck[idxready] == MPI_REQUEST_NULL); activeNet->rxHandle[activeNet->rxCurr] = MPI_REQUEST_NULL; /* required by AMMPI_FreeEndpointBuffers */ } else return AM_OK; /* nothing else waiting */ } gotone: #if AMMPI_MPIIRECV_ORDERING_BUGCHECK if (recvorder_bugcheck > 0) recvorder_bugcheck = 0; /* reset */ #endif AMX_assert(activeNet == &ep->Rep || !repliesOnly); activeidx = activeNet->rxCurr; AMX_assert(activeNet->rxHandle[activeidx] == MPI_REQUEST_NULL); buf = &activeNet->rxBuf[activeidx]; } #else do { /* we can't make a blocking probe on two separate communicators, so we need to spin bouncing between them */ int msgready; AMX_assert(repliesOnly == 0 || repliesOnly == 1); MPI_SAFE(MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, *ep->Rep.mpicomm, &msgready, &mpistatus)); if (msgready) { buf = &_recvBuffer[repliesOnly]; MPI_SAFE(MPI_Recv(buf, AMMPI_MAX_NETWORK_MSG, MPI_BYTE, MPI_ANY_SOURCE, MPI_ANY_TAG, *ep->Rep.mpicomm, &mpistatus)); break; } if (!repliesOnly) { MPI_SAFE(MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, *ep->Req.mpicomm, &msgready, &mpistatus)); if (msgready) { buf = &_recvBuffer[repliesOnly]; MPI_SAFE(MPI_Recv(buf, AMMPI_MAX_NETWORK_MSG, MPI_BYTE, MPI_ANY_SOURCE, MPI_ANY_TAG, *ep->Req.mpicomm, &mpistatus)); break; } } } while (blockForActivity); if (!buf) return AM_OK; /* nothing else waiting */ #endif AMX_assert(buf); /* we have a real message waiting - get it */ { ammpi_bufstatus_t* status = &(buf->status); /* the status block for this buffer */ #if AMX_DEBUG || AMX_DEBUG_VERBOSE int recvlen; #endif if_pf (mpistatus.MPI_TAG != ep->name.mpitag) { AMX_DEBUG_WARN(("ignoring a stray MPI message (wrong MPI tag)...")); goto donewithmessage; } #if AMX_DEBUG { /* MPI-specific sanity checks */ MPI_SAFE(MPI_Get_count(&mpistatus, MPI_BYTE, &recvlen)); AMX_CHECK_ERRFR((recvlen > AMMPI_MAX_NETWORK_MSG), RESOURCE, AMMPI_ServiceIncomingMessages, "buffer overrun - received message too long"); AMX_CHECK_ERRFR((recvlen < AMMPI_MIN_NETWORK_MSG), RESOURCE, AMMPI_ServiceIncomingMessages, "incomplete message received"); } #endif /* remember which ep sent/recvd this message */ status->sourceAddr.mpirank = mpistatus.MPI_SOURCE; status->dest = ep; { /* find the source id */ int32_t sourceId; /* id in perProcInfo of sender */ int mpi_id = status->sourceAddr.mpirank; /* can't use sourceAddrToId because we don't know full en_t (remote mpitag) */ if_pt (mpi_id < ep->totalP && /* first check common case where rank matches mapping */ mpi_id == ep->perProcInfo[mpi_id].remoteName.mpirank) { sourceId = mpi_id; status->sourceAddr.mpitag = ep->perProcInfo[sourceId].remoteName.mpitag; } else { /* do linear search - leave as -1 if unfound */ for (sourceId = ep->totalP-1; sourceId >= 0; sourceId--) { if (mpi_id == ep->perProcInfo[sourceId].remoteName.mpirank) break; } if (sourceId >= 0) status->sourceAddr.mpitag = ep->perProcInfo[sourceId].remoteName.mpitag; } status->sourceId = (ammpi_node_t)sourceId; } AMX_VERBOSE_INFO(("MPI_Recv got buflen=%i sourceAddr=%s", recvlen, AMMPI_enStr(status->sourceAddr, 0))); if (repliesOnly) AMX_assert(!AMMPI_MSG_ISREQUEST(&buf->Msg)); AMMPI_processPacket(buf, 0); numUserHandlersRun++; donewithmessage: ; /* message handled - continue to next one */ #if AMMPI_PREPOST_RECVS /* repost the recv */ AMX_assert(activeidx == activeNet->rxCurr); #if AMMPI_RECV_REPOST_SLACK /* postpone it until later if possible, to maximize overlap */ if (activeNet->rxPostSlack < activeNet->rxPostSlackMax) activeNet->rxPostSlack++; else { /* too far behind, repost oldest now */ int oldestidx = activeNet->rxCurr - activeNet->rxPostSlack; if (oldestidx < 0) oldestidx += activeNet->rxNumBufs; AMX_assert(oldestidx >= 0 && oldestidx < activeNet->rxNumBufs); if (AMMPI_PostRecvBuffer(&activeNet->rxBuf[oldestidx], &activeNet->rxHandle[oldestidx], activeNet->mpicomm)) AMX_RETURN_ERR(RESOURCE); } #else if (AMMPI_PostRecvBuffer(&activeNet->rxBuf[activeidx], &activeNet->rxHandle[activeidx], activeNet->mpicomm)) AMX_RETURN_ERR(RESOURCE); #endif activeidx++; if (activeidx >= activeNet->rxNumBufs) activeidx = 0; activeNet->rxCurr = activeidx; #endif } /* message waiting */ if_pf (blockForActivity && numUserHandlersRun > 0) return AM_OK; /* got one - done blocking */ } while (numUserHandlersRun < ((unsigned int)AMMPI_MAX_RECVMSGS_PER_POLL)); return AM_OK; } /* AMMPI_ServiceIncomingMessages */ /*------------------------------------------------------------------------------------ * Poll *------------------------------------------------------------------------------------ */ extern int AM_Poll(eb_t eb) { int i; AMX_CHECKINIT(); AMX_CHECK_ERR((!eb),BAD_ARG); for (i = 0; i < eb->n_endpoints; i++) { int retval; ep_t ep = eb->endpoints[i]; if_pt (ep->depth != -1) { /* only poll endpoints which have buffers */ retval = AMMPI_ServiceIncomingMessages(ep, FALSE, FALSE); /* drain network and check for activity */ if_pf (retval != AM_OK) AMX_RETURN(retval); } } return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_Block(eb_t eb) { /* block until some endpoint receive buffer becomes non-empty with a valid user message * may poll, and does handle SPMD control events */ int retval = AM_OK; if (eb->n_endpoints == 1) { /* drain network and check for activity */ retval = AMMPI_ServiceIncomingMessages(eb->endpoints[0], TRUE, FALSE); } else { /* we could implement this (at least for AMMPI_PREPOST_RECVS) by combining the handle vectors, * but it doesn't seem worthwhile right now */ AMX_FatalErr("unimplemented: tried to AMMPI_Block on an endpoint-bundle containing multiple endpoints..."); } return retval; } /*------------------------------------------------------------------------------------ * Generic Request/Reply *------------------------------------------------------------------------------------ */ static int AMMPI_RequestGeneric(ammpi_category_t category, ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr, uint8_t systemType, uint8_t systemArg) { static char _stagingbuf[sizeof(ammpi_buf_t)+8]; int packetlength; ammpi_buf_t *outgoingbuf; en_t destaddress = request_endpoint->translation[reply_endpoint].name; const int isloopback = AMMPI_enEqual(destaddress, request_endpoint->name); #if AMMPI_NONBLOCKING_SENDS int predictedsz; #endif /* always poll before sending a request */ AM_Poll(request_endpoint->eb); { MPI_Request *mpihandle = NULL; if (isloopback) { outgoingbuf = (ammpi_buf_t *)AMX_ALIGNUP(&_stagingbuf,8); } else { #if AMMPI_NONBLOCKING_SENDS /* acquire a free request buffer */ int retval; predictedsz = PREDICT_PACKET_LENGTH(numargs, nbytes); retval = AMMPI_AcquireSendBuffer(request_endpoint, predictedsz, TRUE, &outgoingbuf, &mpihandle); if_pf (retval != AM_OK) AMX_RETURN(retval); AMX_assert(outgoingbuf && mpihandle && *mpihandle == MPI_REQUEST_NULL); #else outgoingbuf = (ammpi_buf_t *)AMX_ALIGNUP(&_stagingbuf,8); #endif #if AMMPI_FLOW_CONTROL { int remoteid = request_endpoint->translation[reply_endpoint].id; AMX_assert(systemType == ammpi_system_user); AMX_assert(systemArg == 0); while (request_endpoint->perProcInfo[remoteid].tokens_out == 0) { /* back pressure */ AMX_DEBUG_WARN_TH("Out of request send credits. polling..."); AM_Poll(request_endpoint->eb); } request_endpoint->perProcInfo[remoteid].tokens_out--; systemArg = MIN(255,request_endpoint->perProcInfo[remoteid].tokens_in); /* return tokens */ request_endpoint->perProcInfo[remoteid].tokens_in -= systemArg; } #endif } /* setup message meta-data */ { ammpi_msg_t *msg = &outgoingbuf->Msg; AMMPI_MSG_SETFLAGS(msg, TRUE, category, numargs); msg->destOffset = dest_offset; msg->handlerId = handler; msg->nBytes = (uint16_t)nbytes; msg->systemMessageType = systemType; msg->systemMessageArg = systemArg; #if AMMPI_USE_AMTAGS msg->tag = request_endpoint->translation[reply_endpoint].tag; #endif } { /* setup args */ int i; uint32_t *args = GET_PACKET_ARGS(outgoingbuf); for (i = 0; i < numargs; i++) { args[i] = (uint32_t)va_arg(argptr, int); /* must be int due to default argument promotion */ } #if USE_CLEAR_UNUSED_SPACE if (i < AMMPI_MAX_SHORT) args[i] = 0; outgoingbuf->Msg._reserved = 0; #endif } if (isloopback) { /* run handler synchronously */ ammpi_bufstatus_t* const status = &(outgoingbuf->status); /* the status block for this buffer */ if (nbytes > 0) { /* setup data */ if (category == ammpi_Long) { /* one-copy */ memmove(((int8_t *)request_endpoint->segAddr) + dest_offset, source_addr, nbytes); } else { /* mediums still need data copy */ memcpy(GET_PACKET_DATA(outgoingbuf), source_addr, nbytes); } } status->dest = request_endpoint; status->sourceId = reply_endpoint; status->sourceAddr = request_endpoint->name; AMMPI_processPacket(outgoingbuf, 1); } else { /* perform the send */ int retval; if (nbytes > 0) { /* setup data */ memcpy(GET_PACKET_DATA(outgoingbuf), source_addr, nbytes); } AMMPI_VERIFY_MPI_SETSEQNUM(outgoingbuf->Msg, 1, request_endpoint, request_endpoint->translation[reply_endpoint].id); packetlength = GET_PACKET_LENGTH(outgoingbuf); #if AMMPI_NONBLOCKING_SENDS AMX_assert(packetlength <= predictedsz); #endif retval = sendPacket(request_endpoint, &request_endpoint->Req, outgoingbuf, packetlength, destaddress, mpihandle); if_pf (retval != AM_OK) AMX_RETURN(retval); #if AMMPI_COLLECT_LATENCY_STATS { uint64_t now = AMX_getMicrosecondTimeStamp(); outgoingdesc->firstSendTime = now; } #endif AMMPI_STATS(request_endpoint->stats.RequestsSent[category]++); AMMPI_STATS(request_endpoint->stats.RequestDataBytesSent[category] += sizeof(int) * numargs + nbytes); AMMPI_STATS(request_endpoint->stats.RequestTotalBytesSent[category] += packetlength); } return AM_OK; } } /* ------------------------------------------------------------------------------------ */ static int AMMPI_ReplyGeneric(ammpi_category_t category, ammpi_buf_t *requestbuf, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr, uint8_t systemType, uint8_t systemArg) { static char _stagingbuf[sizeof(ammpi_buf_t)+8]; ammpi_buf_t *outgoingbuf; ep_t const ep = requestbuf->status.dest; ammpi_node_t const destP = requestbuf->status.sourceId; const int isloopback = AMMPI_enEqual(requestbuf->status.sourceAddr, ep->name); #if AMMPI_NONBLOCKING_SENDS int predictedsz; #endif /* we don't poll within a reply because by definition we are already polling somewhere in the call chain */ { MPI_Request *mpihandle = NULL; if (isloopback) { outgoingbuf = (ammpi_buf_t *)AMX_ALIGNUP(&_stagingbuf,8); } else { #if AMMPI_NONBLOCKING_SENDS /* acquire a free reply buffer */ int retval; predictedsz = PREDICT_PACKET_LENGTH(numargs, nbytes); retval = AMMPI_AcquireSendBuffer(ep, predictedsz, FALSE, &outgoingbuf, &mpihandle); if_pf (retval != AM_OK) AMX_RETURN(retval); AMX_assert(outgoingbuf && mpihandle && *mpihandle == MPI_REQUEST_NULL); #else outgoingbuf = (ammpi_buf_t *)AMX_ALIGNUP(&_stagingbuf,8); #endif #if AMMPI_FLOW_CONTROL if (systemType == ammpi_system_user || systemType == ammpi_system_autoreply) { AMX_assert(systemArg == 0); systemArg = MIN(255,ep->perProcInfo[destP].tokens_in); ep->perProcInfo[destP].tokens_in -= systemArg; } #endif } /* setup message meta-data */ { ammpi_msg_t *msg = &outgoingbuf->Msg; AMMPI_MSG_SETFLAGS(msg, FALSE, category, numargs); msg->destOffset = dest_offset; msg->handlerId = handler; msg->nBytes = (uint16_t)nbytes; msg->systemMessageType = systemType; msg->systemMessageArg = systemArg; #if AMMPI_USE_AMTAGS msg->tag = ep->perProcInfo[destP].tag; #endif } { /* setup args */ int i; uint32_t *args = GET_PACKET_ARGS(outgoingbuf); for (i = 0; i < numargs; i++) { args[i] = (uint32_t)va_arg(argptr, int); /* must be int due to default argument promotion */ } #if USE_CLEAR_UNUSED_SPACE if (i < AMMPI_MAX_SHORT) args[i] = 0; outgoingbuf->Msg._reserved = 0; #endif } if (isloopback) { /* run handler synchronously */ ammpi_bufstatus_t* const status = &(outgoingbuf->status); /* the status block for this buffer */ if (nbytes > 0) { /* setup data */ if (category == ammpi_Long) { /* one-copy */ memmove(((int8_t *)ep->segAddr) + dest_offset, source_addr, nbytes); } else { /* mediums still need data copy */ memcpy(GET_PACKET_DATA(outgoingbuf), source_addr, nbytes); } } status->dest = ep; status->sourceId = destP; status->sourceAddr = ep->name; AMMPI_processPacket(outgoingbuf, 1); } else { /* perform the send */ int packetlength = GET_PACKET_LENGTH(outgoingbuf); en_t destaddress = ep->perProcInfo[destP].remoteName; int retval; if (nbytes > 0) { /* setup data */ memcpy(GET_PACKET_DATA(outgoingbuf), source_addr, nbytes); #if 0 /* not necessary- we never send this stuff */ #if USE_CLEAR_UNUSED_SPACE memset(&(GET_PACKET_DATA(outgoingbuf)[nbytes]), 0, AMMPI_MAX_LONG - nbytes); #endif #endif } AMMPI_VERIFY_MPI_SETSEQNUM(outgoingbuf->Msg, 0, ep, destP); #if AMMPI_NONBLOCKING_SENDS AMX_assert(packetlength <= predictedsz); #endif retval = sendPacket(ep, &ep->Rep, outgoingbuf, packetlength, destaddress, mpihandle); if_pf (retval != AM_OK) AMX_RETURN(retval); AMMPI_STATS(ep->stats.RepliesSent[category]++); AMMPI_STATS(ep->stats.ReplyDataBytesSent[category] += sizeof(int) * numargs + nbytes); AMMPI_STATS(ep->stats.ReplyTotalBytesSent[category] += packetlength); } requestbuf->status.replyIssued = TRUE; return AM_OK; } } /*------------------------------------------------------------------------------------ * Request *------------------------------------------------------------------------------------ */ extern int AMMPI_RequestVA(ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, int numargs, va_list argptr) { AMX_CHECKINIT(); AMX_CHECK_ERR((!request_endpoint),BAD_ARG); AMX_CHECK_ERR((AMMPI_BADHANDLERVAL(handler)),BAD_ARG); AMX_CHECK_ERR((request_endpoint->depth == -1),NOT_INIT); /* it's an error to call before AM_SetExpectedResources */ AMX_CHECK_ERR((reply_endpoint >= request_endpoint->translationsz || !request_endpoint->translation[reply_endpoint].inuse),BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMMPI_MAX_SHORT); /* call the generic requestor */ return AMMPI_RequestGeneric(ammpi_Short, request_endpoint, reply_endpoint, handler, NULL, 0, 0, numargs, argptr, ammpi_system_user, 0); } extern int AMMPI_Request(ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMMPI_RequestVA(request_endpoint, reply_endpoint, handler, numargs, argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_RequestIVA(ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, int numargs, va_list argptr) { AMX_CHECKINIT(); AMX_CHECK_ERR((!request_endpoint),BAD_ARG); AMX_CHECK_ERR((AMMPI_BADHANDLERVAL(handler)),BAD_ARG); AMX_CHECK_ERR((request_endpoint->depth == -1),NOT_INIT); /* it's an error to call before AM_SetExpectedResources */ AMX_CHECK_ERR((reply_endpoint >= request_endpoint->translationsz || !request_endpoint->translation[reply_endpoint].inuse),BAD_ARG); AMX_CHECK_ERR((!source_addr && nbytes > 0),BAD_ARG); AMX_CHECK_ERR(nbytes > AMMPI_MAX_MEDIUM,BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMMPI_MAX_SHORT); /* call the generic requestor */ return AMMPI_RequestGeneric(ammpi_Medium, request_endpoint, reply_endpoint, handler, source_addr, nbytes, 0, numargs, argptr, ammpi_system_user, 0); } extern int AMMPI_RequestI(ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMMPI_RequestIVA(request_endpoint, reply_endpoint, handler, source_addr, nbytes, numargs, argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_RequestXferVA(ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int async, int numargs, va_list argptr) { AMX_CHECKINIT(); AMX_CHECK_ERR((!request_endpoint),BAD_ARG); AMX_CHECK_ERR((AMMPI_BADHANDLERVAL(handler)),BAD_ARG); AMX_CHECK_ERR((request_endpoint->depth == -1),NOT_INIT); /* it's an error to call before AM_SetExpectedResources */ AMX_CHECK_ERR((reply_endpoint >= request_endpoint->translationsz || !request_endpoint->translation[reply_endpoint].inuse),BAD_ARG); AMX_CHECK_ERR((!source_addr && nbytes > 0),BAD_ARG); AMX_CHECK_ERR(nbytes > AMMPI_MAX_LONG,BAD_ARG); AMX_CHECK_ERR((dest_offset > AMMPI_MAX_SEGLENGTH),BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMMPI_MAX_SHORT); if (async) { /* decide if we can satisfy request without blocking */ /* it's unclear from the spec whether we should poll before an async failure, * but by definition the app must be prepared for handlers to run when calling this * request, so it shouldn't cause anything to break, and the async request is more likely * to succeed if we do. so: */ AM_Poll(request_endpoint->eb); /* too hard to compute whether this will block */ AMX_FatalErr("unimplemented: AMMPI_RequestXferAsyncM not implemented - use AMMPI_RequestXferM"); } /* perform the send */ return AMMPI_RequestGeneric(ammpi_Long, request_endpoint, reply_endpoint, handler, source_addr, nbytes, dest_offset, numargs, argptr, ammpi_system_user, 0); } extern int AMMPI_RequestXfer(ep_t request_endpoint, ammpi_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int async, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMMPI_RequestXferVA(request_endpoint, reply_endpoint, handler, source_addr, nbytes, dest_offset, async, numargs, argptr); va_end(argptr); return retval; } /*------------------------------------------------------------------------------------ * Reply *------------------------------------------------------------------------------------ */ extern int AMMPI_ReplyVA(void *token, handler_t handler, int numargs, va_list argptr) { ammpi_buf_t *requestbuf; AMX_CHECKINIT(); AMX_CHECK_ERR((!token),BAD_ARG); AMX_CHECK_ERR((AMMPI_BADHANDLERVAL(handler)),BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMMPI_MAX_SHORT); { /* semantic checking on reply (are we in a handler, is this the first reply, etc.) */ requestbuf = (ammpi_buf_t *)token; AMX_CHECK_ERR((!AMMPI_MSG_ISREQUEST(&requestbuf->Msg)),RESOURCE); /* token is not a request */ AMX_CHECK_ERR((!requestbuf->status.handlerRunning),RESOURCE); /* token is not for an active request */ AMX_CHECK_ERR((requestbuf->status.replyIssued),RESOURCE); /* already issued a reply */ AMX_CHECK_ERR((((ammpi_system_messagetype_t)requestbuf->Msg.systemMessageType) != ammpi_system_user), RESOURCE); /* can't reply to a system message (returned message) */ } /* call the generic replier */ return AMMPI_ReplyGeneric(ammpi_Short, requestbuf, handler, NULL, 0, 0, numargs, argptr, ammpi_system_user, 0); } extern int AMMPI_Reply(void *token, handler_t handler, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMMPI_ReplyVA(token, handler, numargs, argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_ReplyIVA(void *token, handler_t handler, void *source_addr, size_t nbytes, int numargs, va_list argptr) { ammpi_buf_t *requestbuf; AMX_CHECKINIT(); AMX_CHECK_ERR((!token),BAD_ARG); AMX_CHECK_ERR((AMMPI_BADHANDLERVAL(handler)),BAD_ARG); AMX_CHECK_ERR((!source_addr && nbytes > 0),BAD_ARG); AMX_CHECK_ERR(nbytes > AMMPI_MAX_MEDIUM,BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMMPI_MAX_SHORT); { /* semantic checking on reply (are we in a handler, is this the first reply, etc.) */ requestbuf = (ammpi_buf_t *)token; AMX_CHECK_ERR((!AMMPI_MSG_ISREQUEST(&requestbuf->Msg)),RESOURCE); /* token is not a request */ AMX_CHECK_ERR((!requestbuf->status.handlerRunning),RESOURCE); /* token is not for an active request */ AMX_CHECK_ERR((requestbuf->status.replyIssued),RESOURCE); /* already issued a reply */ AMX_CHECK_ERR((((ammpi_system_messagetype_t)requestbuf->Msg.systemMessageType) != ammpi_system_user), RESOURCE); /* can't reply to a system message (returned message) */ } /* call the generic replier */ return AMMPI_ReplyGeneric(ammpi_Medium, requestbuf, handler, source_addr, nbytes, 0, numargs, argptr, ammpi_system_user, 0); } extern int AMMPI_ReplyI(void *token, handler_t handler, void *source_addr, size_t nbytes, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMMPI_ReplyIVA(token, handler, source_addr, nbytes, numargs, argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_SendControlMessage(ep_t from, en_t to, int numargs, ...) { int dest_endpoint_index = -1; AMX_CHECKINIT(); AMX_CHECK_ERR((!from),BAD_ARG); AMX_CHECK_ERR((numargs < 0 || numargs > AMMPI_MAX_SHORT),BAD_ARG); AMX_CHECK_ERR((from->depth == -1),NOT_INIT); /* it's an error to call before AM_SetExpectedResources */ dest_endpoint_index = sourceAddrToId(from, to); AMX_CHECK_ERR((dest_endpoint_index == -1),BAD_ARG); /* can only send to a mapped peer */ { /* control messages use the Reply mechanism in order to be safe in AM handler context, where it's unsafe to poll */ int retval; ammpi_buf_t fakeRequestBuf; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ fakeRequestBuf.status.dest = from; /* pretend we're servicing a request from target node */ fakeRequestBuf.status.sourceId = dest_endpoint_index; fakeRequestBuf.status.sourceAddr = to; fakeRequestBuf.status.handlerRunning = 1; retval = AMMPI_ReplyGeneric(ammpi_Short, &fakeRequestBuf, 0, NULL, 0, 0, numargs, argptr, ammpi_system_controlmessage, 0); va_end(argptr); return retval; } } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_ReplyXferVA(void *token, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr) { ammpi_buf_t *requestbuf; AMX_CHECKINIT(); AMX_CHECK_ERR((!token),BAD_ARG); AMX_CHECK_ERR((AMMPI_BADHANDLERVAL(handler)),BAD_ARG); AMX_CHECK_ERR((!source_addr && nbytes > 0),BAD_ARG); AMX_CHECK_ERR(nbytes > AMMPI_MAX_LONG,BAD_ARG); AMX_CHECK_ERR((dest_offset > AMMPI_MAX_SEGLENGTH),BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMMPI_MAX_SHORT); { /* semantic checking on reply (are we in a handler, is this the first reply, etc.) */ requestbuf = (ammpi_buf_t *)token; AMX_CHECK_ERR((!AMMPI_MSG_ISREQUEST(&requestbuf->Msg)),RESOURCE); /* token is not a request */ AMX_CHECK_ERR((!requestbuf->status.handlerRunning),RESOURCE); /* token is not for an active request */ AMX_CHECK_ERR((requestbuf->status.replyIssued),RESOURCE); /* already issued a reply */ AMX_CHECK_ERR((((ammpi_system_messagetype_t)requestbuf->Msg.systemMessageType) != ammpi_system_user), RESOURCE); /* can't reply to a system message (returned message) */ } /* call the generic replier */ return AMMPI_ReplyGeneric(ammpi_Long, requestbuf, handler, source_addr, nbytes, dest_offset, numargs, argptr, ammpi_system_user, 0); } extern int AMMPI_ReplyXfer(void *token, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMMPI_ReplyXferVA(token, handler, source_addr, nbytes, dest_offset, numargs, argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ extern void AMMPI_DefaultReturnedMsg_Handler(int status, op_t opcode, void *token) { const char *statusStr = "*unknown*"; const char *opcodeStr = "*unknown*"; ammpi_buf_t *msgbuf = (ammpi_buf_t *)token; int numArgs = AMMPI_MSG_NUMARGS(&msgbuf->Msg); uint32_t *args = GET_PACKET_ARGS(msgbuf); char argStr[255]; int i; #define STATCASE(name, desc) case name: statusStr = #name ": " desc; break; switch (status) { STATCASE(EBADARGS , "Arguments to request or reply function invalid "); STATCASE(EBADENTRY , "X-lation table index selected unbound table entry "); STATCASE(EBADTAG , "Sender's tag did not match the receiver's EP tag "); STATCASE(EBADHANDLER , "Invalid index into the recv.'s handler table "); STATCASE(EBADSEGOFF , "Offset into the dest-memory VM segment invalid "); STATCASE(EBADLENGTH , "Bulk xfer length goes beyond a segment's end "); STATCASE(EBADENDPOINT , "Destination endpoint does not exist "); STATCASE(ECONGESTION , "Congestion at destination endpoint "); STATCASE(EUNREACHABLE , "Destination endpoint unreachable "); STATCASE(EREPLYREJECTED, "Destination endpoint refused reply message "); } #define OPCASE(name) case name: opcodeStr = #name; break; switch (opcode) { OPCASE(AM_REQUEST_M); OPCASE(AM_REQUEST_IM); OPCASE(AM_REQUEST_XFER_M); OPCASE(AM_REPLY_M); OPCASE(AM_REPLY_IM); OPCASE(AM_REPLY_XFER_M); } argStr[0] = '\0'; for (i=0; i < numArgs; i++) { char tmp[20]; sprintf(tmp, "0x%08x ", (unsigned int)args[i]); strcat(argStr, tmp); } AMX_FatalErr("An active message was returned to sender,\n" " and trapped by the default returned message handler (handler 0):\n" "Error Code: %s\n" "Message type: %s\n" "Destination: %s (%i)\n" "Handler: %i\n" "Tag: %s\n" "Arguments(%i): %s\n" "Aborting...", statusStr, opcodeStr, AMMPI_enStr(msgbuf->status.sourceAddr, 0), (int)msgbuf->status.sourceId, msgbuf->Msg.handlerId, #if AMMPI_USE_AMTAGS AMMPI_tagStr(msgbuf->Msg.tag, 0), #else "", #endif numArgs, argStr); } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/ammpi/ammpi_spmd.h0000664000175000017500000001111515142313673020144 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/ammpi/ammpi_spmd.h $ * Description: AMMPI Header for SPMD interface * Copyright 2000, Dan Bonachea */ #ifndef __AMMPI_SPMD_H #define __AMMPI_SPMD_H #include AMMPI_BEGIN_EXTERNC #undef AMMPI_SPMDStartup #define AMMPI_SPMDStartup AMX_CONCAT(AMMPI_SPMDStartup_AMMPI,AMMPI_DEBUG_CONFIG) /* ------------------------------------------------------------------------------------ */ /* AMMPI SPMD Entry Points */ typedef int (*spawnfn_t)(int nproc, int argc, char **argv); /* return non-zero if successful */ extern int AMMPI_SPMDStartup(int *argc, char ***argv, int networkdepth, uint64_t *networkpid, eb_t *eb, ep_t *ep); /* should be always be called by program to initialize parallel job before parsing command line arguments * must be called collectively by all worker processes * On worker processors, this call will modify the argc/argv params, call AM_Init, * and then return a bundle and endpoint properly configured for use with the SPMD job * (translation table will be filled in, AM_SetExpectedResources called, and each worker given a unique tag) * worker processors should setup handler table for the endpoint and call SPMDBarrier before starting communication * Arguments: * argc/argv - should be the unchanged ones passed to main, may return changed * networkdepth - desired network depth hint (0 for default) (ignored on workers) * networkpid - returns a globally unique pid for this job which is identical on all works (can be NULL for don't care) (ignored on master) * eb, ep - variables to receive newly allocated bundle and endpoint on workers (ignored on master) */ extern int AMMPI_SPMDExit(int exitcode); /* terminate the parallel job with given exit code (also handles AM_Terminate) */ extern int AMMPI_SPMDSetExitCallback(void (*fp)(int)); /* register a function to be called when AMMPI_SPMDExit is called by any node * exit code is passed */ extern void (*AMMPI_SPMDkillmyprocess)(int); /* function used to finally kill the process (_exit by default) */ extern int AMMPI_SPMDSetThreadMode(int usingthreads, const char **provided_level, int *argc, char ***argv); /* attempt to request thread support level indicated by usingthreads from MPI-2 * returns non-zero on success or zero on failure, * and in all cases returns the reported suport level in *provided_level * must be called before AMMPI_SPMDStartup */ extern int AMMPI_SPMDIsWorker(char **argv); /* given the initial command line arguments, determine whether this process is a * worker process created by the AMMPI SPMD job startup API */ extern int AMMPI_SPMDNumProcs(void); /* return the number of processors in the parallel job */ extern int AMMPI_SPMDMyProc(void); /* return a zero-based unique identifier of this processor in the parallel job */ extern int AMMPI_SPMDBarrier(void); /* block until all SPMD processors call this function, * and poll the SPMD endpoint while waiting * a slow, but functional barrier that is advisable to call after setting up handlers * but before making transport calls, to prevent returned messages due to races */ extern int AMMPI_SPMDAllGather(void *source, void *dest, size_t len); extern int AMMPI_SPMDBroadcast(void *buf, size_t len, int rootid); /* expose the MPI_AllGather & MPI_Bcast functions which can be useful for bootstrapping AMMPI_SPMDAllGather: gather len bytes from source buf on each node, concatenate them and write them into the dest buffer (which must have length len*numnodes) in rank order AMMPI_SPMDBroadcast: broadcast len bytes from buf on node rootid to buf on all nodes may only be used after startup - beware, these functions block without polling */ /* ------------------------------------------------------------------------------------ */ /* standardized AM-2 extensions */ #define AMX_SPMDgetenvMaster getenv #define AMX_SPMDBarrier AMMPI_SPMDBarrier #define AMX_SPMDNumProcs AMMPI_SPMDNumProcs #define AMX_SPMDMyProc AMMPI_SPMDMyProc #define AMX_SPMDExit AMMPI_SPMDExit #define AMX_SPMDSetExitCallback AMMPI_SPMDSetExitCallback #define AMX_SPMDkillmyprocess AMMPI_SPMDkillmyprocess #define AMX_SPMDIsWorker(x) (1) #define AMX_SPMDAllGather AMMPI_SPMDAllGather #define AMX_SPMDStartup(pargc, pargv, networkdepth, pnetworkpid, peb, pep) \ AMMPI_SPMDStartup((pargc), (pargv), (networkdepth), (pnetworkpid), (peb), (pep)) AMMPI_END_EXTERNC #endif gasnet-2025.8.0/other/ammpi/Makefile.tests0000664000175000017500000000722315142313673020453 0ustar alastairalastair TEST_NODES=2 TESTLOG=`pwd`/.test-results TEST_LINE=++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ AMMPI_RUNCMD_EXP=\ TEST_RUN_P=`echo "$$TEST_RUN" | sed 's/ .*$$//'` ; \ TEST_RUN_A=`echo "$$TEST_RUN" | sed 's/^[^ ]* //'` ; \ TEST_RUN_D=`pwd` ; \ TEST_DOIT=`echo $(AMMPI_RUNCMD) | sed 's/%N/$(TEST_NODES)/;s/%M/$(TEST_NODES)/;s@%C@'"$$TEST_RUN"'@;s@%P@'"$$TEST_RUN_P"'@;s@%A@'"$$TEST_RUN_A"'@;s@%D@'"$$TEST_RUN_D"'@;s@%H@'"$${GASNET_NODEFILE:-$$PBS_NODEFILE}"'@;s/%V//'` TEST_RUNCMD= ; $(AMMPI_RUNCMD_EXP) ; \ testname=`basename $$TEST_RUN_P` ; \ faildesc="ammpi/$$testname" ; \ if test -x "$$TEST_RUN_P" ; then \ echo " **** $$testname **** "; \ echo $$TEST_DOIT ; \ ( eval $$TEST_DOIT || echo "ERROR: Test exited with failure code=$$?" 2>&1 ) | tee .test-output ; \ failure=`$(PERL) -ne 'print if (/ERROR/ || /fatal signal/);' .test-output` ; \ if test "$$failure" != "" ; then \ echo " " >> $(TESTLOG) ; \ echo " *-* $$faildesc *-*" >> $(TESTLOG) ; \ echo " " >> $(TESTLOG) ; \ echo "$$failure" >> $(TESTLOG) ; \ fi ; \ rm -f .test-output ; \ echo $(TEST_LINE) ; \ fi TEST_ITERS=100 TEST_MODE=P TEST_DEPTH=32 TEST_DUPLEX=H AMMPI_NETWORKDEPTH=$(TEST_DEPTH) run-tests: tests @rm -f $(TESTLOG) ; touch $(TESTLOG) @echo $(TEST_LINE) @echo Running AMMPI tests... @echo If this fails to spawn a job, you may need to re-run with a @echo command like: $(MAKE) run-tests AMMPI_RUNCMD=\"$(AMMPI_RUNCMD)\" @echo $(TEST_LINE) @TEST_RUN="./testping $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testlatency $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testlatencyM $(TEST_ITERS) $(TEST_MODE) 64" $(TEST_RUNCMD) @TEST_RUN="./testbulk $(TEST_ITERS) 1048576 $(TEST_MODE) $(TEST_DUPLEX)" $(TEST_RUNCMD) @TEST_RUN="./testam $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testbounce $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testreduce " $(TEST_RUNCMD) @TEST_RUN="./testgetput $(TEST_ITERS)" $(TEST_RUNCMD) @TEST_RUN="./testreadwrite $(TEST_ITERS)" $(TEST_RUNCMD) @echo TESTS COMPLETE @cat $(TESTLOG) ; rm -f $(TESTLOG) # make a distribution amxdist: @set -x ; \ VERSION=`grep "#define AMMPI_LIBRARY_VERSION" $(srcdir)/ammpi.h | head -2 | $(PERL) -e '$$/=undef; my @a=split(/\s+/,<>); print "$$a[2].$$a[5]"'` ; \ export VERSION ; \ distdir=ammpi$${VERSION} ; \ echo "+++ Building distribution for AMMPI version $${VERSION} +++" && \ rm -Rf $$distdir.tar.gz $$distdir && \ mkdir $$distdir && \ cp $(srcdir)/Makefile.* $(srcdir)/README* $(srcdir)/*.txt $(srcdir)/*.[ch] $(amxdir)/*.[ch] \ $(altincdir)/portable_inttypes.h $(altincdir)/gasnet_portable_platform.h \ $$distdir && \ cd $$distdir && \ mv gasnet_portable_platform.h amx_portable_platform.h && \ rm -f Makefile.in Makefile.am Makefile.titanium* && \ mv Makefile.standalone Makefile && \ cd .. && \ tar -cvhf $$distdir.tar $$distdir && gzip -9 $$distdir.tar && \ rm -Rf $$distdir && \ echo "+++ $$distdir.tar.gz is ready for distribution +++" gasnet-2025.8.0/other/ammpi/ammpi_ep.c0000664000175000017500000015160115142313673017605 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/ammpi/ammpi_ep.c $ * Description: AMMPI Implementations of endpoint and bundle operations * Copyright 2000, Dan Bonachea */ #if _FORTIFY_SOURCE > 0 && __OPTIMIZE__ <= 0 /* silence an annoying MPICH/Linux warning */ #undef _FORTIFY_SOURCE #endif #include #include #include #include "ammpi_internal.h" /* must come after any other headers */ /* definitions for internal declarations */ ammpi_handler_fn_t ammpi_defaultreturnedmsg_handler = (ammpi_handler_fn_t)&AMMPI_DefaultReturnedMsg_Handler; int AMMPI_syncsend_thresh = 0; AMX_IDENT(AMMPI_IdentString_Version, "$AMMPILibraryVersion: " AMMPI_LIBRARY_VERSION_STR " $"); #ifdef MPI_VERSION #define AMMPI_MPI_VERSION_STR_1 "|MPI_VERSION="AMX_STRINGIFY(MPI_VERSION) #else #define AMMPI_MPI_VERSION_STR_1 #endif #ifdef MPI_SUBVERSION #define AMMPI_MPI_VERSION_STR_2 "|MPI_SUBVERSION="AMX_STRINGIFY(MPI_SUBVERSION) #else #define AMMPI_MPI_VERSION_STR_2 #endif #ifdef MPICH_VERSION #define AMMPI_MPI_VERSION_STR_3 "|MPICH_VERSION="MPICH_VERSION #else #define AMMPI_MPI_VERSION_STR_3 #endif #ifdef ROMIO_VERSION #define AMMPI_MPI_VERSION_STR_4 "|ROMIO_VERSION="AMX_STRINGIFY(ROMIO_VERSION) #else #define AMMPI_MPI_VERSION_STR_4 #endif AMX_IDENT(AMMPI_IdentString_MPIVersion, "$MPIVersion: " \ AMMPI_MPI_VERSION_STR_1 \ AMMPI_MPI_VERSION_STR_2 \ AMMPI_MPI_VERSION_STR_3 \ AMMPI_MPI_VERSION_STR_4 \ "| $"); AMX_IDENT(AMMPI_IdentString_MPICCVersion, "$MPICompiler: " PLATFORM_COMPILER_IDSTR " $"); const ammpi_stats_t AMMPI_initial_stats = /* the initial state for stats type */ { {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, 0, (uint64_t)-1, 0, 0, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, 0 }; /* ------------------------------------------------------------------------------------ */ extern int AMMPI_enEqual(en_t en1, en_t en2) { return (en1.mpirank == en2.mpirank && en1.mpitag == en2.mpitag); } /*------------------------------------------------------------------------------------ * Endpoint list handling for bundles *------------------------------------------------------------------------------------ */ int AMMPI_numBundles = 0; eb_t AMMPI_bundles[AMMPI_MAX_BUNDLES] = {0}; /* ------------------------------------------------------------------------------------ */ static int AMMPI_ContainsEndpoint(eb_t eb, ep_t ep) { int i; for (i = 0; i < eb->n_endpoints; i++) { if (eb->endpoints[i] == ep) return TRUE; } return FALSE; } /* ------------------------------------------------------------------------------------ */ static void AMMPI_InsertEndpoint(eb_t eb, ep_t ep) { AMX_assert(eb && ep); AMX_assert(eb->endpoints); if (eb->n_endpoints == eb->cursize) { /* need to grow array */ int newsize = eb->cursize * 2; eb->endpoints = (ep_t *)AMX_realloc(eb->endpoints, sizeof(ep_t)*newsize); eb->cursize = newsize; } eb->endpoints[eb->n_endpoints] = ep; eb->n_endpoints++; ep->eb = eb; } /* ------------------------------------------------------------------------------------ */ static void AMMPI_RemoveEndpoint(eb_t eb, ep_t ep) { AMX_assert(eb && ep); AMX_assert(eb->endpoints); AMX_assert(AMMPI_ContainsEndpoint(eb, ep)); { int i; for (i = 0; i < eb->n_endpoints; i++) { if (eb->endpoints[i] == ep) { eb->endpoints[i] = eb->endpoints[eb->n_endpoints-1]; eb->n_endpoints--; ep->eb = NULL; return; } } AMX_FatalErr("AMMPI_RemoveEndpoint failed"); } } /*------------------------------------------------------------------------------------ * Endpoint resource management *------------------------------------------------------------------------------------ */ static MPI_Comm currentComm = MPI_COMM_WORLD; extern int AMMPI_SetEndpointCommunicator(void *ptr_to_MPI_Comm) { AMX_assert(ptr_to_MPI_Comm); currentComm = *(MPI_Comm*)ptr_to_MPI_Comm; return AM_OK; } /*------------------------------------------------------------------------------------*/ static int AMMPI_AllocateEndpointResource(ep_t ep) { int procnum; int mpitag; int pid = getpid(); static int callcnt = 0; AMX_assert(ep); ep->translation = AMX_calloc(AMMPI_INIT_NUMTRANSLATIONS, sizeof(ammpi_translation_t)); if (ep->translation == NULL) AMX_RETURN_ERRFR(RESOURCE, AMMPI_AllocateEndpointResource, "out of memory"); ep->translationsz = AMMPI_INIT_NUMTRANSLATIONS; /* base MPI tag on pid to prevent receiving cross-talk messages sent to dead processes */ mpitag = (pid + (callcnt<<16)) % (MPI_TAG_UB+1); if (mpitag == MPI_ANY_TAG) mpitag = (mpitag + 1) % (MPI_TAG_UB+1); callcnt++; { /* setup MPI communicators for isolation */ MPI_Group world_group; MPI_SAFE(MPI_Comm_group(currentComm, &world_group)); ep->Req.mpicomm = AMX_malloc(sizeof(MPI_Comm)); ep->Rep.mpicomm = AMX_malloc(sizeof(MPI_Comm)); if (!ep->Req.mpicomm || !ep->Rep.mpicomm) AMX_RETURN_ERRFR(RESOURCE, AMMPI_AllocateEndpointResource, "out of memory"); MPI_SAFE(MPI_Comm_create(currentComm, world_group, ep->Req.mpicomm)); MPI_SAFE(MPI_Comm_create(currentComm, world_group, ep->Rep.mpicomm)); MPI_SAFE(MPI_Group_free(&world_group)); } MPI_SAFE(MPI_Comm_rank(currentComm, &procnum)); ep->name.mpirank = procnum; ep->name.mpitag = mpitag; #if MPI_VERSION >= 2 MPI_SAFE(MPI_Comm_set_errhandler(*ep->Req.mpicomm, MPI_ERRORS_RETURN)); MPI_SAFE(MPI_Comm_set_errhandler(*ep->Rep.mpicomm, MPI_ERRORS_RETURN)); #else MPI_SAFE(MPI_Errhandler_set(*ep->Req.mpicomm, MPI_ERRORS_RETURN)); MPI_SAFE(MPI_Errhandler_set(*ep->Rep.mpicomm, MPI_ERRORS_RETURN)); #endif return AM_OK; } /* ------------------------------------------------------------------------------------ */ static int AMMPI_AllocateEndpointBuffers(ep_t ep) { int numBufs; int retval = TRUE; AMX_assert(ep); AMX_assert(ep->depth >= 1); AMX_assert(ep->translationsz >= AMMPI_INIT_NUMTRANSLATIONS); AMX_assert(ep->translationsz <= AMMPI_MAX_NUMTRANSLATIONS); AMX_assert(ep->totalP <= ep->translationsz); AMX_assert(sizeof(ammpi_buf_t) % sizeof(int) == 0); /* assume word-addressable machine */ numBufs = 2*ep->depth; /* 2x to match small/large split in send pool */ /* compressed translation table */ ep->perProcInfo = (ammpi_perproc_info_t *)AMX_calloc(ep->totalP, sizeof(ammpi_perproc_info_t)); #if AMMPI_PREPOST_RECVS /* setup recv buffers */ ep->rxBuf_alloc = (ammpi_buf_t *)AMX_malloc((2*numBufs * sizeof(ammpi_buf_t))+AMMPI_BUF_ALIGN); ep->rxHandle_both = (MPI_Request *)AMX_malloc(2*numBufs * sizeof(MPI_Request)); if (!ep->rxBuf_alloc || !ep->rxHandle_both) return FALSE; ep->Rep.rxBuf = (ammpi_buf_t *)AMX_ALIGNUP(ep->rxBuf_alloc,AMMPI_BUF_ALIGN); ep->Req.rxBuf = ep->Rep.rxBuf + numBufs; ep->Rep.rxHandle = ep->rxHandle_both; ep->Req.rxHandle = ep->rxHandle_both + numBufs; AMX_assert(((uintptr_t)ep->Rep.rxBuf) % AMMPI_BUF_ALIGN == 0); AMX_assert(((uintptr_t)ep->Req.rxBuf) % AMMPI_BUF_ALIGN == 0); AMX_assert(sizeof(ammpi_buf_t) % AMMPI_BUF_ALIGN == 0); ep->Rep.rxNumBufs = numBufs; ep->Req.rxNumBufs = numBufs; { int i; for(i=0;iReq.rxHandle[i] = MPI_REQUEST_NULL; ep->Rep.rxHandle[i] = MPI_REQUEST_NULL; } for(i=0;iReq.rxBuf[i],&ep->Req.rxHandle[i],ep->Req.mpicomm); retval &= !AMMPI_PostRecvBuffer(&ep->Rep.rxBuf[i],&ep->Rep.rxHandle[i],ep->Rep.mpicomm); } ep->Req.rxCurr = 0; /* oldest recv */ ep->Rep.rxCurr = 0; #if AMMPI_RECV_REPOST_SLACK ep->Req.rxPostSlack = 0; ep->Rep.rxPostSlack = 0; ep->Req.rxPostSlackMax = MIN(numBufs-1,AMMPI_RECV_REPOST_SLACK); ep->Rep.rxPostSlackMax = MIN(numBufs-1,AMMPI_RECV_REPOST_SLACK); #endif } #endif #if AMMPI_NONBLOCKING_SENDS if (!AMMPI_AllocateSendBuffers(ep)) retval = FALSE; #endif return retval; } /* ------------------------------------------------------------------------------------ */ static int AMMPI_FreeEndpointResource(ep_t ep) { AMX_assert(ep); AMX_assert(ep->translation); AMX_free(ep->translation); ep->translation = NULL; MPI_SAFE(MPI_Comm_free(ep->Req.mpicomm)); MPI_SAFE(MPI_Comm_free(ep->Rep.mpicomm)); AMX_free(ep->Req.mpicomm); AMX_free(ep->Rep.mpicomm); ep->Req.mpicomm = NULL; ep->Rep.mpicomm = NULL; return TRUE; } /* ------------------------------------------------------------------------------------ */ static int AMMPI_FreeEndpointBuffers(ep_t ep) { int retval = TRUE; AMX_assert(ep); AMX_free(ep->perProcInfo); ep->perProcInfo = NULL; #if AMMPI_PREPOST_RECVS { int i,j; for (j=0; j < 2; j++) { ammpi_virtual_network_t *net = (j ? &ep->Req : &ep->Rep); for(i=0; i < net->rxNumBufs; i++) { MPI_Request *rxh = &net->rxHandle[i]; if (*rxh != MPI_REQUEST_NULL) { MPI_Status mpistatus; retval &= MPI_SAFE_NORETURN(MPI_Cancel(rxh)); #if PLATFORM_OS_AIX /* AIX 5.2 32-bit MPI implementation is unreliable for cancel-wait (frequent crashes observed for Titanium shutdown on MPI-over-LAPI 3.5.0.15, for 2 or more nodes) */ retval &= MPI_SAFE_NORETURN(MPI_Request_free(rxh)); #else retval &= MPI_SAFE_NORETURN(MPI_Wait(rxh, &mpistatus)); #endif *rxh = MPI_REQUEST_NULL; } } net->rxBuf = NULL; net->rxHandle = NULL; net->rxNumBufs = 0; } } AMX_free(ep->rxHandle_both); ep->rxHandle_both = NULL; AMX_free(ep->rxBuf_alloc); ep->rxBuf_alloc = NULL; #endif #if AMMPI_NONBLOCKING_SENDS retval &= AMMPI_ReleaseSendBuffers(ep); #endif return retval; } /*------------------------------------------------------------------------------------ * non-blocking recv buffer management *------------------------------------------------------------------------------------ */ #if AMMPI_PREPOST_RECVS extern int AMMPI_PostRecvBuffer(ammpi_buf_t *rxBuf, MPI_Request *prxHandle, MPI_Comm *pmpicomm) { AMX_assert(*prxHandle == MPI_REQUEST_NULL); AMX_assert(((uintptr_t)rxBuf) % AMMPI_BUF_ALIGN == 0); MPI_SAFE(MPI_Irecv(rxBuf, AMMPI_MAX_NETWORK_MSG, MPI_BYTE, MPI_ANY_SOURCE, MPI_ANY_TAG, *pmpicomm, prxHandle)); AMX_assert(*prxHandle != MPI_REQUEST_NULL); return AM_OK; } #endif /*------------------------------------------------------------------------------------ * non-blocking send buffer management *------------------------------------------------------------------------------------ */ #if AMMPI_NONBLOCKING_SENDS /* ------------------------------------------------------------------------------------ */ static int AMMPI_initSendBufferPool(ammpi_sendbuffer_pool_t* pool, int count, int bufsize) { char* tmp = NULL; int i; AMX_assert(pool && count > 0 && bufsize > 0); AMX_assert(bufsize % sizeof(int) == 0); bufsize = AMX_ALIGNUP(bufsize, AMMPI_BUF_ALIGN); pool->txHandle = (MPI_Request *)AMX_malloc(count*sizeof(MPI_Request)); pool->txBuf = (ammpi_buf_t**)AMX_malloc(count*sizeof(ammpi_buf_t*)); tmp = (char*)AMX_malloc(count*bufsize+AMMPI_BUF_ALIGN); pool->memBlocks = (char **)AMX_malloc(sizeof(char *)); pool->tmpIndexArray = (int *)AMX_malloc(count * sizeof(int)); pool->tmpStatusArray = (MPI_Status *)AMX_malloc(count * sizeof(MPI_Status)); if (!tmp || !pool->txHandle || !pool->txBuf || !pool->memBlocks || !pool->tmpIndexArray || !pool->tmpStatusArray) return FALSE; /* out of mem */ pool->numBlocks = 1; pool->memBlocks[0] = tmp; tmp = (char *)AMX_ALIGNUP(tmp, AMMPI_BUF_ALIGN); for (i=0; i < count; i++) { AMX_assert(((uintptr_t)tmp) % AMMPI_BUF_ALIGN == 0); pool->txBuf[i] = (ammpi_buf_t*)tmp; tmp += bufsize; pool->txHandle[i] = MPI_REQUEST_NULL; } pool->numBufs = count; pool->numActive = 0; pool->bufSize = bufsize; return TRUE; } /* allocate non-blocking send buffers for this endpoint, * return TRUE/FALSE to indicate success */ extern int AMMPI_AllocateSendBuffers(ep_t ep) { int retval = TRUE; AMX_assert(ep); AMX_assert(ep->depth >= 1); AMX_assert(ep->translationsz <= AMMPI_MAX_NUMTRANSLATIONS); AMX_assert(ep->totalP <= ep->translationsz); retval &= AMMPI_initSendBufferPool(&(ep->Req.sendPool_small), ep->depth, AMMPI_MAX_SMALL_NETWORK_MSG); retval &= AMMPI_initSendBufferPool(&(ep->Rep.sendPool_small), ep->depth, AMMPI_MAX_SMALL_NETWORK_MSG); retval &= AMMPI_initSendBufferPool(&(ep->Req.sendPool_large), ep->depth, AMMPI_MAX_NETWORK_MSG); retval &= AMMPI_initSendBufferPool(&(ep->Rep.sendPool_large), ep->depth, AMMPI_MAX_NETWORK_MSG); return retval; } /* ------------------------------------------------------------------------------------ */ static int AMMPI_freeSendBufferPool(ammpi_sendbuffer_pool_t* pool) { int retval = TRUE; AMX_assert(pool); /* terminate any outstanding communications */ { int i; for(i=0; i < pool->numActive; i++) { if (pool->txHandle[i] != MPI_REQUEST_NULL) { MPI_Status mpistatus; #if 0 /* the MPI spec states that MPI_Cancel is a local operation that must * complete immediately without blocking, but apparently too many * implementations screw this up */ retval &= MPI_SAFE_NORETURN(MPI_Cancel(&pool->txHandle[i])); retval &= MPI_SAFE_NORETURN(MPI_Wait(&pool->txHandle[i], &mpistatus)); #else #if 0 /* better to simply wait and hope the remote node hasn't crashed * (in which case we might get stuck here) */ retval &= MPI_SAFE_NORETURN(MPI_Wait(&pool->txHandle[i], &mpistatus)); #else { /* use a timeout to decide remote side is dead */ int j; int flag; #define RETRIES 2 for (j = 0; j < RETRIES; j++) { retval &= MPI_SAFE_NORETURN(MPI_Test(&pool->txHandle[i], &flag, &mpistatus)); if (flag) break; else AMX_usleep(1000); } if (j == RETRIES) { #if AMX_DEBUG_VERBOSE fprintf(stderr,"WARNING: Giving up on a timed-out send during shutdown\n"); #endif /* attempt to cancel */ retval &= MPI_SAFE_NORETURN(MPI_Cancel(&pool->txHandle[i])); retval &= MPI_SAFE_NORETURN(MPI_Request_free(&pool->txHandle[i])); } } #endif #endif pool->txHandle[i] = MPI_REQUEST_NULL; } } } /* free the mem */ AMX_free(pool->txHandle); pool->txHandle = NULL; AMX_free(pool->txBuf); pool->txBuf = NULL; AMX_free(pool->tmpIndexArray); pool->tmpIndexArray = NULL; AMX_free(pool->tmpStatusArray); pool->tmpStatusArray = NULL; { int i; for (i=0; i < pool->numBlocks; i++) AMX_free(pool->memBlocks[i]); AMX_free(pool->memBlocks); pool->memBlocks = NULL; } return retval; } /* cancel any outstanding non-blocking sends and release the associated buffers * for this endpoint, return TRUE/FALSE to indicate success */ extern int AMMPI_ReleaseSendBuffers(ep_t ep) { int retval = TRUE; AMX_assert(ep); retval &= AMMPI_freeSendBufferPool(&(ep->Req.sendPool_small)); retval &= AMMPI_freeSendBufferPool(&(ep->Rep.sendPool_small)); retval &= AMMPI_freeSendBufferPool(&(ep->Req.sendPool_large)); retval &= AMMPI_freeSendBufferPool(&(ep->Rep.sendPool_large)); return retval; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_ReapSendCompletions(ammpi_sendbuffer_pool_t* pool) { int numcompleted = 0; int i; MPI_SAFE(MPI_Testsome(pool->numActive, pool->txHandle, &numcompleted, pool->tmpIndexArray, pool->tmpStatusArray)); AMX_assert(numcompleted >= 0 && numcompleted <= pool->numActive); #if AMMPI_LINEAR_SEND_COMPLETE /* this algorithm is linear in the number of handles (as is MPI_Testsome), but relies on a spec-compliant MPI_Testsome. Appears to be slightly slower for most platforms with a small number of completions or deep queue. */ { int numActive = pool->numActive; MPI_Request * const txHandle = pool->txHandle; for (i = numActive-1; i >= 0; i--) { if (txHandle[i] == MPI_REQUEST_NULL) { numActive--; if (i != numActive) { /* swap a still-active buffer into this place */ ammpi_buf_t** const txBuf = pool->txBuf; ammpi_buf_t* const tmp = txBuf[i]; AMX_assert(txHandle[numActive] != MPI_REQUEST_NULL); txHandle[i] = txHandle[numActive]; txBuf[i] = txBuf[numActive]; txHandle[numActive] = MPI_REQUEST_NULL; txBuf[numActive] = tmp; } } } pool->numActive = numActive; } #else /* this algorithm is quadratic in the number of completed operations, but tolerates buggy MPI_Testsome */ /* sort the completions in ascending order (simple insertion sort) */ for (i=1; i < numcompleted; i++) { int x = pool->tmpIndexArray[i]; int j; for (j = i; j > 0 && pool->tmpIndexArray[j-1] > x; j--) pool->tmpIndexArray[j] = pool->tmpIndexArray[j-1]; pool->tmpIndexArray[j] = x; } /* collect completed buffers - maintain invariant that active buffers are all at front */ for (i=numcompleted-1; i >= 0; i--) { int doneidx = pool->tmpIndexArray[i]; int activeidx = pool->numActive-1; AMX_assert(doneidx >= 0 && doneidx < pool->numActive); #if PLATFORM_OS_AIX /* Some versions of IBM MPI (PE v? to v4.2.2.3) fail to set MPI_REQUEST_NULL as required by MPI_Testsome, and also apparently fail to reclaim the resources associated with the request */ if (pool->txHandle[doneidx] != MPI_REQUEST_NULL) { MPI_Status s; MPI_SAFE(MPI_Wait(&(pool->txHandle[doneidx]),&s)); } #endif AMX_assert(pool->txHandle[doneidx] == MPI_REQUEST_NULL); if (doneidx != activeidx) { /* swap a still-active buffer into this place */ ammpi_buf_t* tmp = pool->txBuf[doneidx]; AMX_assert(pool->txHandle[activeidx] != MPI_REQUEST_NULL); pool->txHandle[doneidx] = pool->txHandle[activeidx]; pool->txBuf[doneidx] = pool->txBuf[activeidx]; pool->txHandle[activeidx] = MPI_REQUEST_NULL; pool->txBuf[activeidx] = tmp; } pool->numActive--; } #endif return AM_OK; } /* ------------------------------------------------------------------------------------ */ /* acquire a buffer of at least the given size numBytes associated with ep, * to be used in a subsequent non-blocking MPI send operation * return a pointer to the buffer and the location that should be used to store the MPI * handle when the operation is initiated * if isrequest, may poll for an unbounded amount of time until some buffers become free * for replies, will not poll and will return in a bounded amount of time * the non-blocking send should be initiated before this method is called again * return AM_OK to indicate success */ extern int AMMPI_AcquireSendBuffer(ep_t ep, int numBytes, int isrequest, ammpi_buf_t** pbuf, MPI_Request** pHandle) { ammpi_sendbuffer_pool_t* pool; AMX_assert(ep); AMX_assert(pbuf); AMX_assert(pHandle); AMX_assert(numBytes >= AMMPI_MIN_NETWORK_MSG && numBytes <= AMMPI_MAX_NETWORK_MSG); /* select the appropriate pool */ if (numBytes <= AMMPI_SMALL_SENDBUF_SZ) pool = (isrequest ? &ep->Req.sendPool_small : &ep->Rep.sendPool_small); else pool = (isrequest ? &ep->Req.sendPool_large : &ep->Rep.sendPool_large); /* find a free buffer to fulfill request */ tryagain: if (pool->numActive < pool->numBufs) { /* buffer available */ const int idx = pool->numActive; AMX_assert(pool->txBuf[idx] && pool->txHandle[idx] == MPI_REQUEST_NULL); AMX_assert(((uintptr_t)pool->txBuf[idx]) % AMMPI_BUF_ALIGN == 0); *pbuf = pool->txBuf[idx]; *pHandle = &pool->txHandle[idx]; pool->numActive++; return AM_OK; } while (1) { if (pool->numActive > 0) { /* reap any pending pool completions */ int retval = AMMPI_ReapSendCompletions(pool); if_pf (retval != AM_OK) AMX_RETURN(retval); if (pool->numActive < pool->numBufs) goto tryagain; /* should now succeed */ } /* nothing immediately available */ if (isrequest) { /* poll until something available */ int retval; AMX_DEBUG_WARN_TH("Out of request send buffers. polling..."); retval = AMMPI_ServiceIncomingMessages(ep, FALSE, FALSE); /* NOTE this may actually cause reentrancy to this fn on reply pool */ if_pf (retval != AM_OK) AMX_RETURN(retval); } else { #if 1 /* poll the reply network only */ int retval; AMX_DEBUG_WARN_TH("Out of reply send buffers. polling..."); retval = AMMPI_ServiceIncomingMessages(ep, FALSE, TRUE); if_pf (retval != AM_OK) AMX_RETURN(retval); #else /* UNSAFE - do not use: can lead to unbounded buffer growth */ int retval = AMMPI_GrowReplyPool(pool); if_pf (retval != AM_OK) AMX_RETURN(retval); #endif } } AMX_FatalErr("AMMPI_AcquireSendBuffer failed"); return AM_OK; } /* ------------------------------------------------------------------------------------ */ /* old code to grow the reply pool instead of polling -- can lead to unbounded buffer growth */ extern int AMMPI_GrowReplyPool(ammpi_sendbuffer_pool_t* pool) { int newnumBufs = pool->numBufs + (int)(pool->numBufs * (AMMPI_REPLYBUF_POOL_GROWTHFACTOR-1)); MPI_Request *newtxHandle = (MPI_Request *)AMX_malloc(newnumBufs*sizeof(MPI_Request)); ammpi_buf_t**newtxBuf = (ammpi_buf_t**)AMX_malloc(newnumBufs*sizeof(ammpi_buf_t*)); char **newmemBlocks = (char **)AMX_malloc(sizeof(char *)*(pool->numBlocks+1)); char* newBlock = (char*)AMX_malloc((newnumBufs-pool->numBufs)*pool->bufSize+AMMPI_BUF_ALIGN); int * newtmpIndexArray = (int *)AMX_malloc(newnumBufs * sizeof(int)); MPI_Status *newtmpStatusArray = (MPI_Status *)AMX_malloc(newnumBufs * sizeof(MPI_Status)); int i; AMX_assert(newnumBufs > pool->numBufs); if (!newtxHandle || !newtxBuf || !newmemBlocks || !newBlock || !newtmpIndexArray || !newtmpStatusArray) AMX_RETURN_ERR(RESOURCE); /* out of mem */ AMX_DEBUG_WARN_TH("Out of reply send buffers. growing pool..."); /* copy old values & preserve ordering */ memcpy(newtxHandle, pool->txHandle, pool->numBufs*sizeof(MPI_Request)); memcpy(newtxBuf, pool->txBuf, pool->numBufs*sizeof(ammpi_buf_t*)); memcpy(newmemBlocks, pool->memBlocks, pool->numBlocks*sizeof(char*)); newmemBlocks[pool->numBlocks] = newBlock; /* tmps needs not be preserved */ newBlock = (char *)AMX_ALIGNUP(newBlock, AMMPI_BUF_ALIGN); AMX_assert(pool->bufSize % AMMPI_BUF_ALIGN == 0); for (i=pool->numBufs; i < newnumBufs; i++) { AMX_assert(((uintptr_t)newBlock) % AMMPI_BUF_ALIGN == 0); newtxBuf[i] = (ammpi_buf_t*)newBlock; newBlock += pool->bufSize; newtxHandle[i] = MPI_REQUEST_NULL; } AMX_free(pool->txHandle); pool->txHandle = newtxHandle; AMX_free(pool->txBuf); pool->txBuf = newtxBuf; AMX_free(pool->memBlocks); pool->memBlocks = newmemBlocks; AMX_free(pool->tmpIndexArray); pool->tmpIndexArray = newtmpIndexArray; AMX_free(pool->tmpStatusArray); pool->tmpStatusArray = newtmpStatusArray; pool->numBlocks++; pool->numBufs = newnumBufs; return AM_OK; } #endif /*------------------------------------------------------------------------------------ * System initialization/termination *------------------------------------------------------------------------------------ */ extern int AM_Init(void) { { int initialized = 0; MPI_SAFE(MPI_Initialized(&initialized)); if (!initialized) AMX_RETURN_ERRFR(RESOURCE, AM_Init, "MPI not initialized"); } if (AMX_Init()) { /* first call */ #if 0 #define DUMPSZ(T) printf("sizeof(" #T ")=%i\n", sizeof(T)) DUMPSZ(ammpi_msg_t); DUMPSZ(ammpi_buf_t); DUMPSZ(en_t); DUMPSZ(ammpi_bufstatus_t); #endif AMX_assert(sizeof(ammpi_msg_t) % 4 == 0); AMX_assert(sizeof(ammpi_buf_t) % 8 == 0); /* needed for payload alignment */ { char *buffer; /* we attach a buffer regardless of AMMPI_NONBLOCKING_SENDS, to ensure we can always use BSend to perform AM refusal */ buffer = (char *)AMX_malloc(AMMPI_SENDBUFFER_SZ); MPI_SAFE(MPI_Buffer_attach(buffer, AMMPI_SENDBUFFER_SZ)); } } { const char *syncsend_str = getenv("AMMPI_SYNCSEND_THRESH"); int thresh = AMMPI_DEFAULT_SYNCSEND_THRESH; if (syncsend_str) thresh = atoi(syncsend_str); if (thresh < 0) thresh = ((unsigned int)-1)>>1; /* negative == infinite */ AMMPI_syncsend_thresh = thresh; } return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_Terminate(void) { int retval = AM_OK; if (amx_Initialized == 1) { /* last termination call */ for (int i = 0; i < AMMPI_numBundles; i++) { if (AM_FreeBundle(AMMPI_bundles[i]) != AM_OK) retval = AM_ERR_RESOURCE; } AMMPI_numBundles = 0; { char *buffer= NULL; int sz = 0; if (!MPI_SAFE_NORETURN(MPI_Buffer_detach(&buffer, &sz))) retval = AM_ERR_RESOURCE; AMX_free(buffer); } } AMX_Terminate(); AMX_RETURN(retval); } /*------------------------------------------------------------------------------------ * endpoint/bundle management *------------------------------------------------------------------------------------ */ extern int AM_AllocateBundle(int type, eb_t *endb) { eb_t eb; AMX_CHECKINIT(); if (type < 0 || type >= AM_NUM_BUNDLE_MODES) AMX_RETURN_ERR(BAD_ARG); if (type != AM_SEQ) AMX_RETURN_ERR(RESOURCE); if (AMMPI_numBundles == AMMPI_MAX_BUNDLES-1) AMX_RETURN_ERR(RESOURCE); if (!endb) AMX_RETURN_ERR(BAD_ARG); eb = (eb_t)AMX_malloc(sizeof(struct ammpi_eb)); eb->endpoints = (ep_t *)AMX_malloc(AMMPI_INITIAL_NUMENDPOINTS*sizeof(ep_t)); eb->cursize = AMMPI_INITIAL_NUMENDPOINTS; eb->n_endpoints = 0; eb->event_mask = AM_NOEVENTS; AMMPI_bundles[AMMPI_numBundles++] = eb; /* keep track of all bundles */ *endb = eb; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_FreeBundle(eb_t bundle) { if (!bundle) AMX_RETURN_ERR(BAD_ARG); { int i; /* free all constituent endpoints */ for (i = 0; i < bundle->n_endpoints; i++) { int retval = AM_FreeEndpoint(bundle->endpoints[i]); if (retval != AM_OK) AMX_RETURN(retval); } AMX_assert(bundle->n_endpoints == 0); /* remove from bundle list */ for (i = 0; i < AMMPI_numBundles; i++) { if (AMMPI_bundles[i] == bundle) { AMMPI_bundles[i] = AMMPI_bundles[AMMPI_numBundles-1]; break; } } AMX_assert(i < AMMPI_numBundles); AMMPI_numBundles--; AMX_free(bundle->endpoints); AMX_free(bundle); } return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_AllocateEndpoint(eb_t bundle, ep_t *endp, en_t *endpoint_name) { ep_t ep; int retval; AMX_CHECKINIT(); if (!bundle || !endp || !endpoint_name) AMX_RETURN_ERR(BAD_ARG); ep = (ep_t)AMX_malloc(sizeof(struct ammpi_ep)); if (!ep) AMX_RETURN_ERRFR(RESOURCE, AM_AllocateEndpoint, "out of memory"); retval = AMMPI_AllocateEndpointResource(ep); if (retval != AM_OK) { AMX_free(ep); AMX_RETURN(retval); } /* setup eb<->ep link */ AMMPI_InsertEndpoint(bundle, ep); ep->eb = bundle; /* initialize ep data */ { int i; ep->handler[0] = ammpi_defaultreturnedmsg_handler; for (i = 1; i < AMMPI_MAX_NUMHANDLERS; i++) { ep->handler[i] = amx_unused_handler; } ep->controlMessageHandler = amx_unused_handler; ep->tag = AM_NONE; ep->segAddr = NULL; ep->segLength = 0; ep->totalP = 0; ep->depth = -1; ep->stats = AMMPI_initial_stats; ep->preHandlerCallback = NULL; ep->postHandlerCallback = NULL; } *endp = ep; *endpoint_name = ep->name; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_FreeEndpoint(ep_t ea) { int retval = AM_OK; AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (!AMMPI_ContainsEndpoint(ea->eb, ea)) AMX_RETURN_ERR(RESOURCE); if (!AMMPI_FreeEndpointResource(ea)) retval = AM_ERR_RESOURCE; if (ea->depth != -1) { if (!AMMPI_FreeEndpointBuffers(ea)) retval = AM_ERR_RESOURCE; } AMMPI_RemoveEndpoint(ea->eb, ea); AMX_free(ea); AMX_RETURN(retval); } /* ------------------------------------------------------------------------------------ */ extern int AM_MoveEndpoint(ep_t ea, eb_t from_bundle, eb_t to_bundle) { AMX_CHECKINIT(); if (!ea || !from_bundle || !to_bundle) AMX_RETURN_ERR(BAD_ARG); if (!AMMPI_ContainsEndpoint(from_bundle, ea)) AMX_RETURN_ERR(RESOURCE); AMMPI_RemoveEndpoint(from_bundle, ea); AMMPI_InsertEndpoint(to_bundle, ea); return AM_OK; } /*------------------------------------------------------------------------------------ * Tag management *------------------------------------------------------------------------------------ */ extern int AM_SetTag(ep_t ea, tag_t tag) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); /* TODO: return mismatched messages to sender */ ea->tag = tag; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetTag(ep_t ea, tag_t *tag) { AMX_CHECKINIT(); if (!ea || !tag) AMX_RETURN_ERR(BAD_ARG); *tag = ea->tag; return AM_OK; } /*------------------------------------------------------------------------------------ * VM Segment management *------------------------------------------------------------------------------------ */ extern int AM_GetSeg(ep_t ea, void **addr, uintptr_t *nbytes) { AMX_CHECKINIT(); if (!ea || !addr || !nbytes) AMX_RETURN_ERR(BAD_ARG); *addr = ea->segAddr; *nbytes = ea->segLength; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_SetSeg(ep_t ea, void *addr, uintptr_t nbytes) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (nbytes > AMMPI_MAX_SEGLENGTH) AMX_RETURN_ERR(BAD_ARG); ea->segAddr = addr; ea->segLength = nbytes; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_MaxSegLength(uintptr_t* nbytes) { AMX_CHECKINIT(); if (!nbytes) AMX_RETURN_ERR(BAD_ARG); *nbytes = AMMPI_MAX_SEGLENGTH; return AM_OK; } /*------------------------------------------------------------------------------------ * Translation management *------------------------------------------------------------------------------------ */ extern int AMMPI_Map(ep_t ea, int index, en_t *name, tag_t tag) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (index < 0 || index >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (ea->translation[index].inuse) AMX_RETURN_ERR(RESOURCE); /* it's an error to re-map */ if (ea->depth != -1) AMX_RETURN_ERR(RESOURCE); /* it's an error to map after call to AM_SetExpectedResources */ { int commsz; /* check communicator */ MPI_SAFE(MPI_Comm_size(*ea->Req.mpicomm, &commsz)); if (name->mpirank < 0 || name->mpirank >= commsz) AMX_RETURN_ERRFR(RESOURCE, AM_Map, "Bad endpoint name - may be due to a MPI communicator mismatch"); } ea->translation[index].inuse = TRUE; ea->translation[index].name = *name; ea->translation[index].tag = tag; ea->totalP++; /* track num of translations */ return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_MapAny(ep_t ea, int *index, en_t *name, tag_t tag) { AMX_CHECKINIT(); if (!ea || !index) AMX_RETURN_ERR(BAD_ARG); if (ea->depth != -1) AMX_RETURN_ERR(RESOURCE); /* it's an error to map after call to AM_SetExpectedResources */ { int commsz; /* check communicator */ MPI_SAFE(MPI_Comm_size(*ea->Req.mpicomm, &commsz)); if (name->mpirank < 0 || name->mpirank >= commsz) AMX_RETURN_ERRFR(RESOURCE, AM_Map, "Bad endpoint name - may be due to a MPI communicator mismatch"); } { ammpi_node_t i; for (i = 0; i < ea->translationsz; i++) { if (!ea->translation[i].inuse) { /* use this one */ ea->translation[i].inuse = TRUE; ea->translation[i].name = *name; ea->translation[i].tag = tag; ea->totalP++; /* track num of translations */ *index = i; return AM_OK; } } AMX_RETURN_ERR(RESOURCE); /* none available */ } } /* ------------------------------------------------------------------------------------ */ extern int AM_UnMap(ep_t ea, int index) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (index < 0 || index >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (!ea->translation[index].inuse) AMX_RETURN_ERR(RESOURCE); /* not mapped */ if (ea->depth != -1) AMX_RETURN_ERR(RESOURCE); /* it's an error to unmap after call to AM_SetExpectedResources */ ea->translation[index].inuse = FALSE; ea->totalP--; /* track num of translations */ return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetNumTranslations(ep_t ea, int *pntrans) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); AMX_assert(ea->translationsz <= AMMPI_MAX_NUMTRANSLATIONS); *(pntrans) = ea->translationsz; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_SetNumTranslations(ep_t ea, int ntrans) { ammpi_node_t newsz = (ammpi_node_t)ntrans; ammpi_node_t i; AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (ntrans < 0 || newsz > AMMPI_MAX_NUMTRANSLATIONS) AMX_RETURN_ERR(RESOURCE); if (newsz < AMMPI_INIT_NUMTRANSLATIONS) /* don't shrink beyond min value */ newsz = AMMPI_INIT_NUMTRANSLATIONS; if (newsz == ea->translationsz) return AM_OK; /* no change */ if (ea->depth != -1) AMX_RETURN_ERR(RESOURCE); /* it's an error to change translationsz after call to AM_SetExpectedResources */ for (i = newsz; i < ea->translationsz; i++) { if (ea->translation[i].inuse) AMX_RETURN_ERR(RESOURCE); /* it's an error to truncate away live maps */ } ea->translation = (ammpi_translation_t *)AMX_realloc(ea->translation, newsz * sizeof(ammpi_translation_t)); /* we may be growing or truncating the table */ if (newsz > ea->translationsz) memset(&(ea->translation[ea->translationsz]), 0, (newsz - ea->translationsz) * sizeof(ammpi_translation_t)); ea->translationsz = newsz; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetTranslationInuse(ep_t ea, int i) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (i < 0 || i >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (ea->translation[i].inuse) return AM_OK; /* in use */ else return AM_ERR_RESOURCE; /* don't complain here - it's a common case */ } /* ------------------------------------------------------------------------------------ */ extern int AM_GetTranslationTag(ep_t ea, int i, tag_t *tag) { AMX_CHECKINIT(); if (!ea || !tag) AMX_RETURN_ERR(BAD_ARG); if (i < 0 || i >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (!ea->translation[i].inuse) AMX_RETURN_ERR(RESOURCE); (*tag) = ea->translation[i].tag; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_SetTranslationTag(ep_t ea, int index, tag_t tag) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (index < 0 || index >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (!ea->translation[index].inuse) AMX_RETURN_ERR(RESOURCE); /* can't change tag if not mapped */ ea->translation[index].tag = tag; #if AMMPI_USE_AMTAGS if (ea->depth != -1) { /* after call to AM_SetExpectedResources we must update compressed table */ ea->perProcInfo[ea->translation[index].id].tag = tag; } #endif return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetTranslationName(ep_t ea, int i, en_t *gan) { AMX_CHECKINIT(); if (!ea || !gan) AMX_RETURN_ERR(BAD_ARG); if (i < 0 || i >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (!ea->translation[i].inuse) AMX_RETURN_ERR(RESOURCE); (*gan) = ea->translation[i].name; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_SetExpectedResources(ep_t ea, int n_endpoints, int n_outstanding_requests) { int retval = AM_OK; AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (ea->depth != -1) AMX_RETURN_ERR(RESOURCE); /* it's an error to call AM_SetExpectedResources again */ /* n_endpoints ignored */ /*if (n_endpoints < 1 || n_endpoints >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG);*/ if (n_outstanding_requests < 1 || n_outstanding_requests > AMMPI_MAX_NETWORKDEPTH) AMX_RETURN_ERR(BAD_ARG); ea->depth = n_outstanding_requests; #if AMMPI_FLOW_CONTROL ea->tokens_perhost = 2*ea->depth; { const char *t_str = getenv("AMMPI_CREDITS_PP"); if (t_str) ea->tokens_perhost = atoi(t_str); if (ea->tokens_perhost < 1) ea->tokens_perhost = 1; } ea->tokens_slack = ea->tokens_perhost * 0.75; { const char *t_str = getenv("AMMPI_CREDITS_SLACK"); if (t_str) ea->tokens_slack = atoi(t_str); } ea->tokens_slack = MIN(ea->tokens_slack,ea->tokens_perhost-1); #endif if (!AMMPI_AllocateEndpointBuffers(ea)) retval = AM_ERR_RESOURCE; /* compact a copy of the translation table into our perproc info array */ { ammpi_node_t procid = 0; ammpi_node_t i; for (i=0; i < ea->translationsz; i++) { if (ea->translation[i].inuse) { ea->perProcInfo[procid].remoteName = ea->translation[i].name; #if AMMPI_USE_AMTAGS ea->perProcInfo[procid].tag = ea->translation[i].tag; #endif #if AMMPI_FLOW_CONTROL ea->perProcInfo[procid].tokens_in = 0; ea->perProcInfo[procid].tokens_out = ea->tokens_perhost; #endif #if AMMPI_VERIFY_MPI_ORDERING ea->perProcInfo[procid].seqnum[0].in = 0; ea->perProcInfo[procid].seqnum[0].out = 0; ea->perProcInfo[procid].seqnum[1].in = 0; ea->perProcInfo[procid].seqnum[1].out = 0; #endif ea->translation[i].id = procid; procid++; if (procid == ea->totalP) break; /* should have all of them now */ } } } AMX_RETURN(retval); } /*------------------------------------------------------------------------------------ * Handler management *------------------------------------------------------------------------------------ */ extern int _AM_SetHandler(ep_t ea, handler_t handler, ammpi_handler_fn_t function) { AMX_CHECKINIT(); if (!ea || !function) AMX_RETURN_ERR(BAD_ARG); if (AMMPI_BADHANDLERVAL(handler)) AMX_RETURN_ERR(BAD_ARG); ea->handler[handler] = function; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int _AM_SetHandlerAny(ep_t ea, handler_t *handler, ammpi_handler_fn_t function) { int i; AMX_CHECKINIT(); if (!ea || !function || !handler) AMX_RETURN_ERR(BAD_ARG); for (i = 1 ; i < AMMPI_MAX_NUMHANDLERS; i++) { if (ea->handler[i] == amx_unused_handler) { /* find unused entry */ ea->handler[i] = function; *handler = (handler_t)i; return AM_OK; } } AMX_RETURN_ERR(RESOURCE); /* all in use */ } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_RegisterControlMessageHandler(ep_t ea, ammpi_handler_fn_t function) { AMX_CHECKINIT(); if (!ea || !function) AMX_RETURN_ERR(BAD_ARG); ea->controlMessageHandler = function; return AM_OK; } /*------------------------------------------------------------------------------------ * Event management *------------------------------------------------------------------------------------ */ extern int AM_GetEventMask(eb_t eb, int *mask) { AMX_CHECKINIT(); AMX_CHECK_ERR((!eb),BAD_ARG); *mask = eb->event_mask; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_SetEventMask(eb_t eb, int mask) { AMX_CHECKINIT(); AMX_CHECK_ERR((!eb),BAD_ARG); AMX_CHECK_ERR((mask < 0 || ((ammpi_eventmask_t)mask) >= AM_NUMEVENTMASKS),BAD_ARG); eb->event_mask = (uint8_t)mask; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_WaitSema(eb_t eb) { int retval; AMX_CHECKINIT(); AMX_CHECK_ERR((!eb),BAD_ARG); if (eb->event_mask == AM_NOEVENTS) AMX_FatalErr("it's an error to block when the mask is not set - will never return"); /* block here until a message arrives - this polls too */ retval = AMMPI_Block(eb); if (retval != AM_OK) eb->event_mask = AM_NOEVENTS; AMX_RETURN(retval); } /*------------------------------------------------------------------------------------ * Message interrogation *------------------------------------------------------------------------------------ */ extern int AM_GetSourceEndpoint(void *token, en_t *gan) { AMX_CHECKINIT(); AMX_CHECK_ERR((!token || !gan),BAD_ARG); AMX_CHECK_ERRFR((!((ammpi_buf_t *)token)->status.handlerRunning), RESOURCE,AM_GetSourceEndpoint,"handler not running"); *gan = ((ammpi_buf_t *)token)->status.sourceAddr; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_GetSourceId(void *token, int *srcid) { AMX_CHECKINIT(); AMX_CHECK_ERR((!token || !srcid),BAD_ARG); AMX_CHECK_ERRFR((!((ammpi_buf_t *)token)->status.handlerRunning), RESOURCE,AM_GetSourceEndpoint,"handler not running"); *srcid = ((ammpi_buf_t *)token)->status.sourceId; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetDestEndpoint(void *token, ep_t *endp) { AMX_CHECKINIT(); AMX_CHECK_ERR((!token || !endp),BAD_ARG); AMX_CHECK_ERRFR((!((ammpi_buf_t *)token)->status.handlerRunning), RESOURCE,AM_GetSourceEndpoint,"handler not running"); *endp = ((ammpi_buf_t *)token)->status.dest; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetMsgTag(void *token, tag_t *tagp) { AMX_CHECKINIT(); AMX_CHECK_ERR((!token || !tagp),BAD_ARG); AMX_CHECK_ERRFR((!((ammpi_buf_t *)token)->status.handlerRunning), RESOURCE,AM_GetSourceEndpoint,"handler not running"); #if AMMPI_USE_AMTAGS *tagp = ((ammpi_buf_t *)token)->Msg.tag; #else #if AMX_DEBUG_VERBOSE { static int first = 1; if (first) { first = 0; fprintf(stderr,"WARNING: AM_GetMsgTag called when AM tags disabled (AMMPI_DISABLE_AMTAGS)\n");} } #endif *tagp = ((ammpi_buf_t *)token)->status.dest->tag; #endif return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_GetTokenInfo(void *token, handler_t *handler, ammpi_category_t *cat, int *is_req) { AMX_CHECKINIT(); AMX_CHECK_ERR((!token || !handler || !cat || !is_req),BAD_ARG); ammpi_msg_t *msg = &((ammpi_buf_t *)token)->Msg; *handler = msg->handlerId; *cat = AMMPI_MSG_CATEGORY(msg); *is_req = AMMPI_MSG_ISREQUEST(msg); return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_SetHandlerCallbacks(ep_t ep, AMMPI_preHandlerCallback_t preHandlerCallback, AMMPI_postHandlerCallback_t postHandlerCallback) { AMX_CHECKINIT(); if (!ep) AMX_RETURN_ERR(BAD_ARG); ep->preHandlerCallback = preHandlerCallback; ep->postHandlerCallback = postHandlerCallback; return AM_OK; } /*------------------------------------------------------------------------------------ * Statistics API *------------------------------------------------------------------------------------ */ extern int AMMPI_GetEndpointStatistics(ep_t ep, ammpi_stats_t *stats) { /* called by user to get statistics */ AMX_CHECKINIT(); if (!ep || !stats) AMX_RETURN_ERR(BAD_ARG); memcpy(stats, &ep->stats, sizeof(ammpi_stats_t)); return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_ResetEndpointStatistics(ep_t ep) { AMX_CHECKINIT(); if (!ep) AMX_RETURN_ERR(BAD_ARG); ep->stats = AMMPI_initial_stats; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMMPI_AggregateStatistics(ammpi_stats_t *runningsum, ammpi_stats_t *newvalues) { int category; AMX_CHECKINIT(); if (!runningsum || !newvalues) AMX_RETURN_ERR(BAD_ARG); for (category = 0; category < ammpi_NumCategories; category++) { runningsum->RequestsSent[category] += newvalues->RequestsSent[category]; runningsum->RequestsReceived[category] += newvalues->RequestsReceived[category]; runningsum->RepliesSent[category] += newvalues->RepliesSent[category]; runningsum->RepliesReceived[category] += newvalues->RepliesReceived[category]; runningsum->RequestDataBytesSent[category] += newvalues->RequestDataBytesSent[category]; runningsum->ReplyDataBytesSent[category] += newvalues->ReplyDataBytesSent[category]; runningsum->RequestTotalBytesSent[category] += newvalues->RequestTotalBytesSent[category]; runningsum->ReplyTotalBytesSent[category] += newvalues->ReplyTotalBytesSent[category]; } runningsum->ReturnedMessages += newvalues->ReturnedMessages; #if AMMPI_COLLECT_LATENCY_STATS runningsum->RequestSumLatency += newvalues->RequestSumLatency; if (newvalues->RequestMinLatency < runningsum->RequestMinLatency) runningsum->RequestMinLatency = newvalues->RequestMinLatency; if (newvalues->RequestMaxLatency > runningsum->RequestMaxLatency) runningsum->RequestMaxLatency = newvalues->RequestMaxLatency; #endif runningsum->TotalBytesSent += newvalues->TotalBytesSent; return AM_OK; } /* ------------------------------------------------------------------------------------ */ static int AMMPI_StatPrecision(double val) { int prec = 3; while (val >= 10.0 && prec > 0) { val /= 10; prec -= 1; } return prec; } /* ------------------------------------------------------------------------------------ */ extern const char *AMMPI_DumpStatistics(void *_fp, ammpi_stats_t *stats, int globalAnalysis) { FILE *fp = (FILE *)_fp; static char msg[4096]; uint64_t requestsSent = 0; uint64_t requestsReceived = 0; uint64_t repliesSent = 0; uint64_t repliesReceived = 0; uint64_t reqdataBytesSent = 0; uint64_t repdataBytesSent = 0; uint64_t reqTotalBytesSent = 0; uint64_t repTotalBytesSent = 0; double reqavgpayload[ammpi_NumCategories]; double repavgpayload[ammpi_NumCategories]; double avgpayload[ammpi_NumCategories]; int category; AMX_assert(amx_Initialized); AMX_assert(stats != NULL); #if !AMMPI_COLLECT_STATS sprintf(msg, "(AMMPI_COLLECT_STATS disabled)\n"); if (fp != NULL) fprintf(fp, "%s", msg); return msg; #endif for (category = 0; category < ammpi_NumCategories; category++) { requestsSent += stats->RequestsSent[category]; requestsReceived += stats->RequestsReceived[category]; repliesSent += stats->RepliesSent[category]; repliesReceived += stats->RepliesReceived[category]; reqdataBytesSent += stats->RequestDataBytesSent[category]; repdataBytesSent += stats->ReplyDataBytesSent[category]; reqTotalBytesSent += stats->RequestTotalBytesSent[category]; repTotalBytesSent += stats->ReplyTotalBytesSent[category]; if (stats->RequestsSent[category] == 0) reqavgpayload[category] = 0.0; else reqavgpayload[category] = stats->RequestDataBytesSent[category] / (double)(stats->RequestsSent[category]); if (stats->RepliesSent[category] == 0) repavgpayload[category] = 0.0; else repavgpayload[category] = stats->ReplyDataBytesSent[category] / (double)(stats->RepliesSent[category]); if (stats->RequestsSent[category] + stats->RepliesSent[category] == 0) avgpayload[category] = 0.0; else avgpayload[category] = (stats->RequestDataBytesSent[category] + stats->ReplyDataBytesSent[category]) / (double)(stats->RequestsSent[category] + stats->RepliesSent[category]); } { uint64_t dataBytesSent = reqdataBytesSent + repdataBytesSent; uint64_t packetssent = (requestsSent + repliesSent); double avgreqdata = (requestsSent > 0 ? reqdataBytesSent / (double)requestsSent : 0.0); double avgrepdata = (repliesSent > 0 ? repdataBytesSent / (double)repliesSent : 0.0); double avgdata = (packetssent > 0 ? dataBytesSent / (double)packetssent : 0.0); double avgreqpacket = (requestsSent > 0 ? ((double)(reqTotalBytesSent)) / ((double)requestsSent) : 0.0); double avgreppacket = (repliesSent > 0 ? ((double)(repTotalBytesSent)) / ((double)repliesSent) : 0.0); double avgpacket =(packetssent > 0 ? ((double)(stats->TotalBytesSent)) / ((double)packetssent) : 0.0); /* batch lines together to improve chance of output together */ (sprintf)(msg, " Requests: %8"PRIu64" sent, %8"PRIu64" received\n" " Replies: %8"PRIu64" sent, %8"PRIu64" received\n" " Returned messages:%2"PRIu64"\n" #if AMMPI_COLLECT_LATENCY_STATS "Latency (request sent to reply received): \n" " min: %8i microseconds\n" " max: %8i microseconds\n" " avg: %8i microseconds\n" #endif "Message Breakdown: Requests Replies Avg data sz (Req/Rep/Both)\n" " Short (<=%5"PRIuSZ" bytes) %8"PRIu64" %8"PRIu64" %9.*f/%.*f/%.*f bytes\n" " Medium (<=%5"PRIuSZ" bytes) %8"PRIu64" %8"PRIu64" %9.*f/%.*f/%.*f bytes\n" " Long (<=%5"PRIuSZ" bytes) %8"PRIu64" %8"PRIu64" %9.*f/%.*f/%.*f bytes\n" " Total %9.*f/%.*f/%.*f bytes\n" "Data bytes sent: %"PRIu64"/%"PRIu64"/%"PRIu64" bytes\n" "Total bytes sent: %"PRIu64"/%"PRIu64"/%"PRIu64" bytes (incl. AM overhead)\n" "Bandwidth overhead: %.2f%%/%.2f%%/%.2f%%\n" "Average packet size: %.*f/%.*f/%.*f bytes (incl. AM overhead)\n" , requestsSent, requestsReceived, repliesSent, repliesReceived, stats->ReturnedMessages, #if AMMPI_COLLECT_LATENCY_STATS (int)stats->RequestMinLatency, (int)stats->RequestMaxLatency, (requestsSent>0?(int)(stats->RequestSumLatency / requestsSent):-1), #endif /* Message breakdown */ AMMPI_MAX_SHORT*sizeof(int), stats->RequestsSent[ammpi_Short], stats->RepliesSent[ammpi_Short], AMMPI_StatPrecision(reqavgpayload[ammpi_Short]), reqavgpayload[ammpi_Short], AMMPI_StatPrecision(repavgpayload[ammpi_Short]), repavgpayload[ammpi_Short], AMMPI_StatPrecision(avgpayload[ammpi_Short]), avgpayload[ammpi_Short], AMMPI_MAX_SHORT*sizeof(int) + AMMPI_MAX_MEDIUM, stats->RequestsSent[ammpi_Medium], stats->RepliesSent[ammpi_Medium], AMMPI_StatPrecision(reqavgpayload[ammpi_Medium]), reqavgpayload[ammpi_Medium], AMMPI_StatPrecision(repavgpayload[ammpi_Medium]), repavgpayload[ammpi_Medium], AMMPI_StatPrecision(avgpayload[ammpi_Medium]), avgpayload[ammpi_Medium], AMMPI_MAX_SHORT*sizeof(int) + AMMPI_MAX_LONG, stats->RequestsSent[ammpi_Long], stats->RepliesSent[ammpi_Long], AMMPI_StatPrecision(reqavgpayload[ammpi_Long]), reqavgpayload[ammpi_Long], AMMPI_StatPrecision(repavgpayload[ammpi_Long]), repavgpayload[ammpi_Long], AMMPI_StatPrecision(avgpayload[ammpi_Long]), avgpayload[ammpi_Long], /* avg data payload */ AMMPI_StatPrecision(avgreqdata), avgreqdata, AMMPI_StatPrecision(avgrepdata), avgrepdata, AMMPI_StatPrecision(avgdata), avgdata, reqdataBytesSent, repdataBytesSent, dataBytesSent, reqTotalBytesSent, repTotalBytesSent, stats->TotalBytesSent, /* bandwidth overhead */ (reqTotalBytesSent > 0 ? 100.0*((double)(reqTotalBytesSent - reqdataBytesSent)) / ((double)reqTotalBytesSent) : 0.0), (repTotalBytesSent > 0 ? 100.0*((double)(repTotalBytesSent - repdataBytesSent)) / ((double)repTotalBytesSent) : 0.0), (stats->TotalBytesSent > 0 ? 100.0*((double)(stats->TotalBytesSent - dataBytesSent)) / ((double)stats->TotalBytesSent) : 0.0), /* avg packet size */ AMMPI_StatPrecision(avgreqpacket), avgreqpacket, AMMPI_StatPrecision(avgreppacket), avgreppacket, AMMPI_StatPrecision(avgpacket), avgpacket ); if (globalAnalysis) { int64_t packetsrecvd = (requestsReceived + repliesReceived); int64_t packetslost = packetssent - packetsrecvd; sprintf(msg+strlen(msg), "Packets unaccounted for: %6i", abs((int)packetslost)); if (packetslost > 0) { sprintf(msg+strlen(msg), " (%6.3f%%)\n", (100.0*packetslost)/packetssent); } else strcat(msg, "\n"); } if (fp != NULL) fprintf(fp, "%s", msg); return msg; } } /* ------------------------------------------------------------------------------------ */ #include "amx_internal.c" gasnet-2025.8.0/other/ammpi/Makefile.am0000664000175000017500000001232515142313673017705 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/other/ammpi/Makefile.am $ # Description: Makefile for AMMPI/GASNet # Copyright 2004, Dan Bonachea # Terms of use are as specified in license.txt # NOTE: This Makefile is used to tie in with the GASNet build infrastructure # the stand-alone AMMPI product doesn't currently provide an automake framework AUTOMAKE_OPTIONS = foreign 1.4 no-dependencies apputils_flags = if BUILDCONFIG_DEBUG BUILDCONFIG_DEFINES = -DAMMPI_DEBUG=1 else BUILDCONFIG_DEFINES = -DAMMPI_NDEBUG=1 endif if VALGRIND VALGRIND_DEFINES = -DUSE_CLEAR_UNUSED_SPACE else VALGRIND_DEFINES = endif CC = @MPI_CC@ CFLAGS = @DEVWARN_MPI_CFLAGS@ @MPI_CFLAGS@ $(MANUAL_MPICFLAGS) $(apputils_flags) LDFLAGS = @LDFLAGS@ $(MANUAL_LDFLAGS) PERL = @PERL@ platform_defines = @GASNET_EXTRA_DEFINES@ $(BUILDCONFIG_DEFINES) $(VALGRIND_DEFINES) @INTTYPES_DEFINES@ -DAMMPI_DISABLE_AMTAGS $(MANUAL_DEFINES) platform_libraries = -L$(top_builddir) -lgasnet_tools-seq @LIBS@ @MPI_LIBS@ VPATH = $(srcdir) amxdir = $(srcdir)/../amx altincdir = $(srcdir)/.. gasnet_tools = -I$(srcdir)/../.. -I../.. -DHAVE_GASNET_TOOLS INCLUDES = -I$(srcdir) -I. -I$(amxdir) -I$(altincdir) $(platform_defines) $(gasnet_tools) compile = $(CC) $(CFLAGS) $(INCLUDES) link = $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) linkend = $(platform_libraries) $(MANUAL_LIBS) if USE_AMMPI BUILT_SOURCES = amx_portable_platform.h lib_LIBRARIES = libammpi.a endif headers = \ ammpi.h \ ammpi_internal.h \ ammpi_spmd.h allheaders = $(BUILT_SOURCES) $(headers) libammpi_a_SOURCES = \ ammpi_ep.c \ ammpi_reqrep.c \ ammpi_spmd.c amx_portable_platform.h: $(altincdir)/gasnet_portable_platform.h cp -f $< $@ libammpi_a_DEPENDENCIES = $(libammpi_a_SOURCES:%.c=%.o) $(libammpi_a_DEPENDENCIES): $(allheaders) EXTRA_DIST = \ $(headers) \ Makefile.tests \ Makefile.titanium.in \ license.txt # ---------- test programs ------------- # all the test executables testprograms = \ testam \ testbounce \ testbulk \ testlatency \ testlatencyM \ testping \ testreduce \ testgetput \ testreadwrite tests: apputils.o $(testprograms) test%.o : $(amxdir)/test%.c $(amxdir)/*.h $(allheaders) $(compile) -DAMMPI -I$(amxdir) -c $< -o $@ apputils.o : $(amxdir)/apputils.c $(amxdir)/apputils.h $(allheaders) $(compile) -DAMMPI -I$(amxdir) -c $(amxdir)/apputils.c -o apputils.o test%: test%.o apputils.o libammpi.a $(link) -o $@ $< apputils.o -L. -lammpi $(linkend) tests-clean: rm -f $(testprograms) AMMPI_RUNCMD='@MPIRUN_CMD@' include Makefile.tests %.o: %.c ammpi.h ammpi_spmd.h ammpi_internal.h $(amxdir)/*.h $(top_builddir)/libgasnet_tools-seq.a $(compile) -DAMMPI -o $@ -c $< ammpi_ep.o: $(amxdir)/amx_internal.c $(top_builddir)/libgasnet_tools-seq.a: force @cd $(top_builddir) && $(MAKE) libgasnet_tools-seq.a if USE_AMMPI if GNU_NM check-exports: libammpi.a @echo Checking libammpi exports... @lib=libammpi.a ; \ if test x$(CHECK_EXPORTS) = x0; then \ echo Skipped by user request ; \ exit 0 ; \ fi ; \ @NM@ --defined-only $$lib | \ @PERL@ -pe 's/ \.refptr\.//' | \ grep -v -e ' [\._]*ammpi_' -e ' [\._]*AMMPI_' -e ' [\._]*AM_' \ -e ' [\._]*amx_' -e ' [\._]*AMX_' \ -e ' [\._]*gasnett_' -e ' [\._]*gasneti_' \ -e ' [\._][\._]*debug_' -e 'get_pc_thunk' -e ' smpi_' \ -e __FUNCTION__ -e __PRETTY_FUNCTION__ -e debug_info_seg | \ @PERL@ -n -e 'print if /^[0-9a-fA-F]+\s+[A-Z]\s+/' > .$$lib.exp; \ if test -s .$$lib.exp ; then \ cat .$$lib.exp ; \ echo FAILED ; \ failed=1 ; \ else \ echo PASSED ; \ fi ; \ rm -f .$$lib.exp ; \ exit $$failed else check-exports: libammpi.a @echo check-exports test SKIPPED endif check: check-exports tests clean_local_files = libammpi.a *.o core .test-results $(BUILT_SOURCES) clean-local: @for f in $(testprograms); do \ cmd="rm -f '$$f$(EXESUFFIX)'"; echo "$$cmd"; eval "$$cmd" || exit $$? ; \ done; else clean_local_files = clean-local: @: #empty rule endif CLEANFILES = $(clean_local_files) force: .PHONY: force tests run-tests gasnet-2025.8.0/other/ammpi/Makefile.in0000664000175000017500000007776415142313673017740 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/other/ammpi/Makefile.am $ # Description: Makefile for AMMPI/GASNet # Copyright 2004, Dan Bonachea # Terms of use are as specified in license.txt # NOTE: This Makefile is used to tie in with the GASNet build infrastructure # the stand-alone AMMPI product doesn't currently provide an automake framework am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = other/ammpi ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libammpi_a_AR = $(AR) $(ARFLAGS) libammpi_a_LIBADD = am_libammpi_a_OBJECTS = ammpi_ep.$(OBJEXT) ammpi_reqrep.$(OBJEXT) \ ammpi_spmd.$(OBJEXT) libammpi_a_OBJECTS = $(am_libammpi_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libammpi_a_SOURCES) DIST_SOURCES = $(libammpi_a_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.tests \ $(top_srcdir)/config-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) VPATH = $(srcdir) ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @MPI_CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @DEVWARN_MPI_CFLAGS@ @MPI_CFLAGS@ $(MANUAL_MPICFLAGS) $(apputils_flags) COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ $(MANUAL_LDFLAGS) LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 no-dependencies apputils_flags = @BUILDCONFIG_DEBUG_FALSE@BUILDCONFIG_DEFINES = -DAMMPI_NDEBUG=1 @BUILDCONFIG_DEBUG_TRUE@BUILDCONFIG_DEFINES = -DAMMPI_DEBUG=1 @VALGRIND_FALSE@VALGRIND_DEFINES = @VALGRIND_TRUE@VALGRIND_DEFINES = -DUSE_CLEAR_UNUSED_SPACE platform_defines = @GASNET_EXTRA_DEFINES@ $(BUILDCONFIG_DEFINES) $(VALGRIND_DEFINES) @INTTYPES_DEFINES@ -DAMMPI_DISABLE_AMTAGS $(MANUAL_DEFINES) platform_libraries = -L$(top_builddir) -lgasnet_tools-seq @LIBS@ @MPI_LIBS@ amxdir = $(srcdir)/../amx altincdir = $(srcdir)/.. gasnet_tools = -I$(srcdir)/../.. -I../.. -DHAVE_GASNET_TOOLS INCLUDES = -I$(srcdir) -I. -I$(amxdir) -I$(altincdir) $(platform_defines) $(gasnet_tools) compile = $(CC) $(CFLAGS) $(INCLUDES) link = $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) linkend = $(platform_libraries) $(MANUAL_LIBS) @USE_AMMPI_TRUE@BUILT_SOURCES = amx_portable_platform.h @USE_AMMPI_TRUE@lib_LIBRARIES = libammpi.a headers = \ ammpi.h \ ammpi_internal.h \ ammpi_spmd.h allheaders = $(BUILT_SOURCES) $(headers) libammpi_a_SOURCES = \ ammpi_ep.c \ ammpi_reqrep.c \ ammpi_spmd.c libammpi_a_DEPENDENCIES = $(libammpi_a_SOURCES:%.c=%.o) EXTRA_DIST = \ $(headers) \ Makefile.tests \ Makefile.titanium.in \ license.txt # ---------- test programs ------------- # all the test executables testprograms = \ testam \ testbounce \ testbulk \ testlatency \ testlatencyM \ testping \ testreduce \ testgetput \ testreadwrite AMMPI_RUNCMD = '@MPIRUN_CMD@' TEST_NODES = 2 TESTLOG = `pwd`/.test-results TEST_LINE = ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ AMMPI_RUNCMD_EXP = \ TEST_RUN_P=`echo "$$TEST_RUN" | sed 's/ .*$$//'` ; \ TEST_RUN_A=`echo "$$TEST_RUN" | sed 's/^[^ ]* //'` ; \ TEST_RUN_D=`pwd` ; \ TEST_DOIT=`echo $(AMMPI_RUNCMD) | sed 's/%N/$(TEST_NODES)/;s/%M/$(TEST_NODES)/;s@%C@'"$$TEST_RUN"'@;s@%P@'"$$TEST_RUN_P"'@;s@%A@'"$$TEST_RUN_A"'@;s@%D@'"$$TEST_RUN_D"'@;s@%H@'"$${GASNET_NODEFILE:-$$PBS_NODEFILE}"'@;s/%V//'` TEST_RUNCMD = ; $(AMMPI_RUNCMD_EXP) ; \ testname=`basename $$TEST_RUN_P` ; \ faildesc="ammpi/$$testname" ; \ if test -x "$$TEST_RUN_P" ; then \ echo " **** $$testname **** "; \ echo $$TEST_DOIT ; \ ( eval $$TEST_DOIT || echo "ERROR: Test exited with failure code=$$?" 2>&1 ) | tee .test-output ; \ failure=`$(PERL) -ne 'print if (/ERROR/ || /fatal signal/);' .test-output` ; \ if test "$$failure" != "" ; then \ echo " " >> $(TESTLOG) ; \ echo " *-* $$faildesc *-*" >> $(TESTLOG) ; \ echo " " >> $(TESTLOG) ; \ echo "$$failure" >> $(TESTLOG) ; \ fi ; \ rm -f .test-output ; \ echo $(TEST_LINE) ; \ fi TEST_ITERS = 100 TEST_MODE = P TEST_DEPTH = 32 TEST_DUPLEX = H AMMPI_NETWORKDEPTH = $(TEST_DEPTH) @USE_AMMPI_FALSE@clean_local_files = @USE_AMMPI_TRUE@clean_local_files = libammpi.a *.o core .test-results $(BUILT_SOURCES) CLEANFILES = $(clean_local_files) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/Makefile.tests $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign other/ammpi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign other/ammpi/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(srcdir)/Makefile.tests $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ if test -f $$p; then \ $(am__strip_dir) \ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) libammpi.a: $(libammpi_a_OBJECTS) $(libammpi_a_DEPENDENCIES) $(EXTRA_libammpi_a_DEPENDENCIES) $(AM_V_at)-rm -f libammpi.a $(AM_V_AR)$(libammpi_a_AR) libammpi.a $(libammpi_a_OBJECTS) $(libammpi_a_LIBADD) $(AM_V_at)$(RANLIB) libammpi.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLIBRARIES clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLIBRARIES clean-local cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLIBRARIES .PRECIOUS: Makefile amx_portable_platform.h: $(altincdir)/gasnet_portable_platform.h cp -f $< $@ $(libammpi_a_DEPENDENCIES): $(allheaders) tests: apputils.o $(testprograms) test%.o : $(amxdir)/test%.c $(amxdir)/*.h $(allheaders) $(compile) -DAMMPI -I$(amxdir) -c $< -o $@ apputils.o : $(amxdir)/apputils.c $(amxdir)/apputils.h $(allheaders) $(compile) -DAMMPI -I$(amxdir) -c $(amxdir)/apputils.c -o apputils.o test%: test%.o apputils.o libammpi.a $(link) -o $@ $< apputils.o -L. -lammpi $(linkend) tests-clean: rm -f $(testprograms) run-tests: tests @rm -f $(TESTLOG) ; touch $(TESTLOG) @echo $(TEST_LINE) @echo Running AMMPI tests... @echo If this fails to spawn a job, you may need to re-run with a @echo command like: $(MAKE) run-tests AMMPI_RUNCMD=\"$(AMMPI_RUNCMD)\" @echo $(TEST_LINE) @TEST_RUN="./testping $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testlatency $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testlatencyM $(TEST_ITERS) $(TEST_MODE) 64" $(TEST_RUNCMD) @TEST_RUN="./testbulk $(TEST_ITERS) 1048576 $(TEST_MODE) $(TEST_DUPLEX)" $(TEST_RUNCMD) @TEST_RUN="./testam $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testbounce $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testreduce " $(TEST_RUNCMD) @TEST_RUN="./testgetput $(TEST_ITERS)" $(TEST_RUNCMD) @TEST_RUN="./testreadwrite $(TEST_ITERS)" $(TEST_RUNCMD) @echo TESTS COMPLETE @cat $(TESTLOG) ; rm -f $(TESTLOG) # make a distribution amxdist: @set -x ; \ VERSION=`grep "#define AMMPI_LIBRARY_VERSION" $(srcdir)/ammpi.h | head -2 | $(PERL) -e '$$/=undef; my @a=split(/\s+/,<>); print "$$a[2].$$a[5]"'` ; \ export VERSION ; \ distdir=ammpi$${VERSION} ; \ echo "+++ Building distribution for AMMPI version $${VERSION} +++" && \ rm -Rf $$distdir.tar.gz $$distdir && \ mkdir $$distdir && \ cp $(srcdir)/Makefile.* $(srcdir)/README* $(srcdir)/*.txt $(srcdir)/*.[ch] $(amxdir)/*.[ch] \ $(altincdir)/portable_inttypes.h $(altincdir)/gasnet_portable_platform.h \ $$distdir && \ cd $$distdir && \ mv gasnet_portable_platform.h amx_portable_platform.h && \ rm -f Makefile.in Makefile.am Makefile.titanium* && \ mv Makefile.standalone Makefile && \ cd .. && \ tar -cvhf $$distdir.tar $$distdir && gzip -9 $$distdir.tar && \ rm -Rf $$distdir && \ echo "+++ $$distdir.tar.gz is ready for distribution +++" %.o: %.c ammpi.h ammpi_spmd.h ammpi_internal.h $(amxdir)/*.h $(top_builddir)/libgasnet_tools-seq.a $(compile) -DAMMPI -o $@ -c $< ammpi_ep.o: $(amxdir)/amx_internal.c $(top_builddir)/libgasnet_tools-seq.a: force @cd $(top_builddir) && $(MAKE) libgasnet_tools-seq.a @GNU_NM_TRUE@@USE_AMMPI_TRUE@check-exports: libammpi.a @GNU_NM_TRUE@@USE_AMMPI_TRUE@ @echo Checking libammpi exports... @GNU_NM_TRUE@@USE_AMMPI_TRUE@ @lib=libammpi.a ; \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ if test x$(CHECK_EXPORTS) = x0; then \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ echo Skipped by user request ; \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ exit 0 ; \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ fi ; \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ @NM@ --defined-only $$lib | \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ @PERL@ -pe 's/ \.refptr\.//' | \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ grep -v -e ' [\._]*ammpi_' -e ' [\._]*AMMPI_' -e ' [\._]*AM_' \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ -e ' [\._]*amx_' -e ' [\._]*AMX_' \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ -e ' [\._]*gasnett_' -e ' [\._]*gasneti_' \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ -e ' [\._][\._]*debug_' -e 'get_pc_thunk' -e ' smpi_' \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ -e __FUNCTION__ -e __PRETTY_FUNCTION__ -e debug_info_seg | \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ @PERL@ -n -e 'print if /^[0-9a-fA-F]+\s+[A-Z]\s+/' > .$$lib.exp; \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ if test -s .$$lib.exp ; then \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ cat .$$lib.exp ; \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ echo FAILED ; \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ failed=1 ; \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ else \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ echo PASSED ; \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ fi ; \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ rm -f .$$lib.exp ; \ @GNU_NM_TRUE@@USE_AMMPI_TRUE@ exit $$failed @GNU_NM_FALSE@@USE_AMMPI_TRUE@check-exports: libammpi.a @GNU_NM_FALSE@@USE_AMMPI_TRUE@ @echo check-exports test SKIPPED @USE_AMMPI_TRUE@check: check-exports tests @USE_AMMPI_TRUE@clean-local: @USE_AMMPI_TRUE@ @for f in $(testprograms); do \ @USE_AMMPI_TRUE@ cmd="rm -f '$$f$(EXESUFFIX)'"; echo "$$cmd"; eval "$$cmd" || exit $$? ; \ @USE_AMMPI_TRUE@ done; @USE_AMMPI_FALSE@clean-local: @USE_AMMPI_FALSE@ @: #empty rule force: .PHONY: force tests run-tests # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/other/mpi-spawner/0000775000175000017500000000000015142313673017005 5ustar alastairalastairgasnet-2025.8.0/other/mpi-spawner/gasnet_bootstrap_mpi.c0000664000175000017500000002727315142313673023407 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/mpi-spawner/gasnet_bootstrap_mpi.c $ * Description: GASNet conduit-independent mpi-based spawner * Copyright 2003, The Regents of the University of California * Terms of use are as specified in license.txt */ #include #include #include #include #if (MPI_VERSION > 2) || (MPI_VERSION == 2 && MPI_SUBVERSION > 1) # define GASNETC_MPI_ALLGATHER_IN_PLACE 1 # define GASNETC_MPI_ALLTOALL_IN_PLACE 1 #elif MPI_VERSION == 2 # define GASNETC_MPI_ALLGATHER_IN_PLACE 1 # define GASNETC_MPI_ALLTOALL_IN_PLACE 0 #else # define GASNETC_MPI_ALLGATHER_IN_PLACE 0 # define GASNETC_MPI_ALLTOALL_IN_PLACE 0 #endif static MPI_Comm gasnetc_mpi_comm; static int gasnetc_mpi_preinitialized = 0; static int gasnetc_mpi_size = -1; static int gasnetc_mpi_rank = -1; static int is_verbose = 0; GASNETI_IDENT(gasnetc_IdentString_HaveMPISpawner, "$GASNetMPISpawner: 1 $"); static gasneti_spawnerfn_t const spawnerfn; #ifndef HAVE_MPI_INIT_THREAD #define HAVE_MPI_INIT_THREAD (MPI_VERSION >= 2) #endif #ifndef HAVE_MPI_QUERY_THREAD #define HAVE_MPI_QUERY_THREAD (MPI_VERSION >= 2) #endif #ifndef GASNET_MPI_THREAD_STRICT #define GASNET_MPI_THREAD_STRICT 0 // strictly adhere to the MPI threading specification #endif static int threadstr2int(const char *str) { char tmp[80]; char *p; strncpy(tmp, str, sizeof(tmp)-1); for (p = tmp; *p; p++) if (*p >= 'a' && *p <= 'z') *p -= 'a'-'A'; /* upper-case */ int ret = -1; #if HAVE_MPI_INIT_THREAD if (strstr(tmp,"SINGLE")) return MPI_THREAD_SINGLE; if (strstr(tmp,"FUNNELED")) return MPI_THREAD_FUNNELED; if (strstr(tmp,"SERIALIZED")) return MPI_THREAD_SERIALIZED; if (strstr(tmp,"MULTIPLE")) return MPI_THREAD_MULTIPLE; ret = MPI_THREAD_SINGLE-1; #endif return ret; } static const char *threadint2str(int id) { switch (id) { #if HAVE_MPI_INIT_THREAD case MPI_THREAD_SINGLE: return "MPI_THREAD_SINGLE"; case MPI_THREAD_FUNNELED: return "MPI_THREAD_FUNNELED"; case MPI_THREAD_SERIALIZED: return "MPI_THREAD_SERIALIZED"; case MPI_THREAD_MULTIPLE: return "MPI_THREAD_MULTIPLE"; #endif default: return "UNKNOWN VALUE"; } } // check whether MPI_Finalize has already occurred and we should bail out GASNETI_INLINE(check_early_finalize) void check_early_finalize(void) { #if (MPI_VERSION > 1) int isfini = 0; int err = MPI_Finalized(&isfini); gasneti_assert_always(err == MPI_SUCCESS); if (isfini) { // MPI specifies a very narrow range of guaranteed functionality after finalize, // which notably does NOT include MPI_Abort. // We cannot complete this client request, so just warn and hard-exit the process static char message[] = "GASNet mpi-spawner noticed that MPI has been finalized by the client. The process will now exit."; if (gasneti_spawn_verbose) gasneti_console_message("EXIT STATE","%s",message); if (gasneti_getenv_yesno_withdefault("GASNET_QUIET",0)) GASNETI_TRACE_PRINTF(I,("*** WARNING: %s",message)); else gasneti_console0_message("WARNING","%s",message); gasneti_flush_streams(); int exitcode = (int)gasneti_atomic_read(&gasneti_exit_code, 0); gasneti_killmyprocess(exitcode); } #endif } extern gasneti_spawnerfn_t const *gasneti_bootstrapInit_mpi(int *argc, char ***argv, gex_Rank_t *nodes, gex_Rank_t *mynode) { MPI_Group world; // environment may or may not be propagated yet, so this is "best effort" is_verbose = gasneti_getenv_yesno_withdefault("GASNET_SPAWN_VERBOSE",0); /* Call MPI_Init exactly once */ int err = MPI_Initialized(&gasnetc_mpi_preinitialized); if (MPI_SUCCESS != err) return NULL; if (is_verbose) gasneti_console_message("MPI-SPAWNER","MPI %s already initialized", (gasnetc_mpi_preinitialized ? "IS" : "IS NOT")); #if !HAVE_MPI_INIT_THREAD if (!gasnetc_mpi_preinitialized) { #if MPI_VERSION < 2 if (!argc || !argv) return NULL; #endif if (is_verbose) gasneti_console_message("MPI-SPAWNER","MPI_Init()"); err = MPI_Init(argc, argv); if (MPI_SUCCESS != err) return NULL; } #else /* HAVE_MPI_INIT_THREAD */ // Setup/verify the threading mode // By default we assume mpi-spawner is the only conduit-level client of MPI // If the process is fully single-threaded, we should be using THREAD_SINGLE // If other threads exist that don't call mpi-spawner/MPI then THREAD_FUNNELED // If other threads might call mpi-spawner (eg fini/exit) then THREAD_SERIALIZED // Clients who want to make asynchronous calls to MPI directly should override our thread mode to THREAD_MULTIPLE #if GASNET_MPI_THREAD_STRICT #if GASNETI_THREADS int required = MPI_THREAD_SERIALIZED; #elif _REENTRANT int required = MPI_THREAD_FUNNELED; #else int required = MPI_THREAD_SINGLE; #endif #else int required = MPI_THREAD_SINGLE; // temporarily loosened for backwards compatibility #endif int provided = -1; const char *override = gasneti_getenv_withdefault("GASNET_MPI_THREAD",threadint2str(required)); if (override) { int overreq = threadstr2int(override); if (overreq >= MPI_THREAD_SINGLE) required = overreq; else gasneti_console_message("WARNING","Ignoring unrecognized GASNET_MPI_THREAD value: %s",override); } if (gasnetc_mpi_preinitialized) { // MPI already init, query current thread support level #if HAVE_MPI_QUERY_THREAD if (is_verbose) gasneti_console_message("MPI-SPAWNER","MPI_Query_thread()"); MPI_Query_thread(&provided); // deliberately ignore errors on query #else provided = required; #endif } else { // init MPI and request our needed level of thread safety if (is_verbose) gasneti_console_message("MPI-SPAWNER","MPI_Init_thread(%s)",threadint2str(required)); err = MPI_Init_thread(argc, argv, required, &provided); if (err != MPI_SUCCESS) return NULL; } if (is_verbose) gasneti_console_message("MPI-SPAWNER","MPI threading mode: %s required, %s provided.", threadint2str(required), threadint2str(provided)); if (provided < required) { gasneti_console_message("MPI-SPAWNER", "WARNING: GASNet requested MPI threading support model: %s\n" " but the MPI library only provided: %s\n" " You may need to link a more thread-safe MPI library to ensure correct operation.\n" " You can override the required level by setting GASNET_MPI_THREAD.", threadint2str(required), threadint2str(provided) ); } #endif /* Create private communicator */ err = MPI_Comm_group(MPI_COMM_WORLD, &world); gasneti_assert_always(err == MPI_SUCCESS); err = MPI_Comm_create(MPI_COMM_WORLD, world, &gasnetc_mpi_comm); gasneti_assert_always(err == MPI_SUCCESS); err = MPI_Group_free(&world); gasneti_assert_always(err == MPI_SUCCESS); /* Get size and rank */ err = MPI_Comm_size(gasnetc_mpi_comm, &gasnetc_mpi_size); gasneti_assert_always(err == MPI_SUCCESS); *nodes = gasnetc_mpi_size; if ((int)(*nodes) != gasnetc_mpi_size) *nodes = 0; /* Overflow! */ err = MPI_Comm_rank(gasnetc_mpi_comm, &gasnetc_mpi_rank); gasneti_assert_always(err == MPI_SUCCESS); *mynode = gasnetc_mpi_rank; gasneti_setupGlobalEnvironment(*nodes, *mynode, spawnerfn.Exchange, spawnerfn.Broadcast); return &spawnerfn; } static void bootstrapFini(void) { int err; #if (MPI_VERSION > 1) /* Check to see if MPI is already finalized, for instance on an error path. */ int isfini = 0; err = MPI_Finalized(&isfini); gasneti_assert_always(err == MPI_SUCCESS); if (isfini) return; #endif err = MPI_Comm_free(&gasnetc_mpi_comm); gasneti_assert_always(err == MPI_SUCCESS); /* In most cases it appears that calling MPI_Finalize() will * prevent us from propagating the exit code to the spawner. * However, as seen w/ mpich-1.2.5, the alternative is to * hang on exit, which is no alternative at all. */ if (gasneti_getenv_yesno_withdefault("GASNET_MPI_FINALIZE", 1)) { if (is_verbose) gasneti_console_message("MPI-SPAWNER","MPI_Finalize()"); (void) MPI_Finalize(); } } static void bootstrapAbort(int exitcode) { if (is_verbose) gasneti_console_message("MPI-SPAWNER","MPI_Abort(%i)",exitcode); check_early_finalize(); (void) MPI_Abort(gasnetc_mpi_comm, exitcode); gasneti_reghandler(SIGABRT, SIG_DFL); gasneti_fatalerror("gasneti_bootstrapAbort_mpi aborting..."); /* NOT REACHED */ } static void bootstrapBarrier(void) { check_early_finalize(); int err = MPI_Barrier(gasnetc_mpi_comm); gasneti_assert_always(err == MPI_SUCCESS); } static void bootstrapExchange(void *src, size_t len, void *dest) { check_early_finalize(); const int inplace = ((uint8_t *)src == (uint8_t *)dest + len * gasnetc_mpi_rank); int err; if (inplace) { #if GASNETC_MPI_ALLGATHER_IN_PLACE src = MPI_IN_PLACE; #else void *tmp = gasneti_malloc(len); GASNETI_MEMCPY(tmp, src, len); src = tmp; #endif } err = MPI_Allgather(src, len, MPI_BYTE, dest, len, MPI_BYTE, gasnetc_mpi_comm); gasneti_assert_always(err == MPI_SUCCESS); #if !GASNETC_MPI_ALLGATHER_IN_PLACE if (inplace) gasneti_free(src); #endif } static void bootstrapAlltoall(void *src, size_t len, void *dest) { check_early_finalize(); const int inplace = (src == dest); int err; if (inplace) { #if GASNETC_MPI_ALLTOALL_IN_PLACE src = MPI_IN_PLACE; #else const size_t total_len = len * gasnetc_mpi_size; void *tmp = gasneti_malloc(total_len); GASNETI_MEMCPY(tmp, src, total_len); src = tmp; #endif } err = MPI_Alltoall(src, len, MPI_BYTE, dest, len, MPI_BYTE, gasnetc_mpi_comm); gasneti_assert_always(err == MPI_SUCCESS); #if !GASNETC_MPI_ALLTOALL_IN_PLACE if (inplace) gasneti_free(src); #endif } static void bootstrapBroadcast(void *src, size_t len, void *dest, int rootnode) { check_early_finalize(); int err; if (gasnetc_mpi_rank == rootnode) { memmove(dest, src, len); } err = MPI_Bcast(dest, len, MPI_BYTE, rootnode, gasnetc_mpi_comm); gasneti_assert_always(err == MPI_SUCCESS); } // Broadcast to members of a gasneti_nodegrp_t via Isend/Irecv static void nodegrpBcast(void *src, size_t len, void *dest, int rootnode, gasneti_nodegrp_t *scope) { check_early_finalize(); gex_Rank_t *scope_ranks = scope->nodes; gex_Rank_t self = scope->node_rank; int scope_count = scope->node_count; int err; if (gasnetc_mpi_rank == rootnode) { const int count = scope_count - 1; MPI_Request *reqs, *r; int i; memmove(dest, src, len); reqs = gasneti_malloc(count * sizeof(MPI_Request)); for (i = 0, r = reqs; i < scope_count; ++i) { if (i == self) continue; err = MPI_Isend(src,len,MPI_BYTE,scope_ranks[i],0,gasnetc_mpi_comm,r++); gasneti_assert_always(err == MPI_SUCCESS); } err = MPI_Waitall(count,reqs,MPI_STATUSES_IGNORE); gasneti_assert_always(err == MPI_SUCCESS); gasneti_free(reqs); } else { err = MPI_Recv(dest,len,MPI_BYTE,rootnode,0,gasnetc_mpi_comm,MPI_STATUS_IGNORE); gasneti_assert_always(err == MPI_SUCCESS); } } static void bootstrapNbrhdBroadcast(void *src, size_t len, void *dest, int rootnode) { nodegrpBcast(src, len, dest, rootnode, &gasneti_mysupernode); } static void bootstrapHostBroadcast(void *src, size_t len, void *dest, int rootnode) { nodegrpBcast(src, len, dest, rootnode, &gasneti_myhost); } static void bootstrapCleanup(void) { /* Nothing to do here */ } static gasneti_spawnerfn_t const spawnerfn = { bootstrapBarrier, bootstrapExchange, bootstrapBroadcast, bootstrapNbrhdBroadcast, bootstrapHostBroadcast, bootstrapAlltoall, bootstrapAbort, bootstrapCleanup, bootstrapFini, }; gasnet-2025.8.0/other/mpi-spawner/README0000664000175000017500000001541715142313673017675 0ustar alastairalastairREADME file for mpi-spawner =========================== @ TOC: @ @ Section: Overview @ @ Section: Basic Usage @ @ Section: Build-time Configuration @ @ Section: Runtime Configuration @ @ Section: Overview @ This document describes mpi-spawner, a component of the GASNet runtime library which allows applications using many GASNet conduits to utilize an existing installation of MPI to perform job launch. Because most systems where GASNet will be deployed are also used for MPI, this is often the simplest and most reliable way to launch GASNet applications. @ Section: Basic Usage @ + Usage summary (option 1): Many languages and libraries built over GASNet provide their own commands for job launch. These should be used instead of GASNet's whenever possible. They typically wrap the mechanisms described below, while providing additional options specific to the language or library. The remaining options are documented here mainly for those who are implementing such a wrapper. + Usage summary (option 2): Conduits which support mpi-spawner each include a spawner utility named for the conduit: gasnetrun_[conduit] -n [options] [--] prog [program args] options: -n number of processes to run (required) -N number of nodes to run on (not always supported) -c number of cpus per process (not always supported) -E list of environment vars to propagate -v be verbose about what is happening -t test only, don't execute anything (implies -v) -k keep any temporary files created (implies -v) -spawner= force use of a specific spawner ([supported spawners]) -- ends option parsing The mpi-spawner described in this README is used if selected by one of the following three mechanisms, in order from greatest to least precedence: + Passing -spawner=mpi to the gasnetrun_[conduit] utility + Setting GASNET_[CONDUIT]_SPAWNER=mpi in the environment + If mpi-spawner was established as the default at configure time (see Build-time Configuration, below). + Usage summary (option 3): When mpi-spawner is supported by a conduit, it is also possible to launch applications directly using mpirun, or its equivalent on your system. For example: mpirun -np N prog [program args] where N is the number of processes to run. @ Section: Build-time Configuration @ Conduits other than mpi-conduit which support mpi-spawner each accept a configure option of the form --with-[conduit]-spawner=VALUE where VALUE is one of "mpi", "ssh", or "pmi". This sets the default spawner used by the corresponding gasnetrun_[conduit] utility, as described in the "Basic Usage" section above. In all cases "mpi" is the default if MPI support is found at configure time. However, one may explicitly pass '--with-[conduit]-spawner=mpi' to ensure configure will fail if the corresponding conduit is to be built but MPI support was not found. In order to use mpi-spawner, a working MPI must be installed and configured on your system. See mpi-conduit/README for information on configuring GASNet for a particular MPI and in particular the setting of an MPIRUN_CMD (which is critical to correct operation of mpi-spawner). Note that you do not need to compile mpi-conduit if you never plan to use it. To do so while retaining support for mpi-based job launch, configure with --disable-mpi --enable-mpi-compat The first option disables building of mpi-conduit while the second ensures that configure fails if it is unable to find a working MPI installation. If one is using mpi-conduit, or is expecting to run hybrid GASNet+MPI applications with any conduit, then MPIRUN_CMD should be set as one would normally use mpirun for MPI applications. However, since mpi-spawner itself uses MPI only for initialization and finalization (and MPI is not used for GASNet communications other than in mpi-conduit) one can potentially reduce resource use by setting MPIRUN_CMD such that the MPI will use TCP/IP for its communication. Below are recommendations for several MPIs. When recommended to set an environment variable, the most reliable way is to prefix the mpirun command. For instance MPIRUN_CMD='env VARIABLE=value mpirun [rest of your template]' - Open MPI Pass "--mca btl tcp,self" to mpirun, OR Set environment variable OMPI_MCA_btl=tcp,self. - MPICH or MPICH2 These normally default to TCP/IP, so no special action is required. - MPICH3 or MPICH4 Set environment variable MPIR_CVAR_NEMESIS_NETMOD=tcp - MVAPICH family These most often support only InfiniBand and therefore are not recommended for use as a launcher for GASNet applications if one is concerned with reducing resource usage. - Intel MPI, prior to the 2019.x series Set environment variable I_MPI_DEVICE=sock. - Intel MPI, since 2019.x Set environment variable I_MPI_OFI_PROVIDER=tcp NOT SUPPORTED for ofi-conduit, because of defects in the MPI and/or libfabric library. A bug report has been submitted. - HP-MPI Set environment variable MPI_IC_ORDER=tcp. - LAM/MPI Pass "-ssi rpi tcp" to mpirun, OR Set environment variable LAM_MPI_SSI_rpi=tcp. Please also check the conduit-specific README for the conduit(s) you will use for any additional recommendations or restrictions. @ Section: Runtime Configuration @ Recognized Environment Variables: * MPIRUN_CMD - a template for executing mpirun, or its equivalent. A default value is established at configure time, but a value set at run time will take precedence over that default. See mpi-conduit's README for full documentation on this variable. * GASNET_MPI_THREAD - can be set to one of the values: "SINGLE", "FUNNELED", "SERIALIZED" or "MULTIPLE" to request the MPI library be initialized with a specific threading support level. The default value depends on the GASNET_{SEQ,PAR} mode and on the conduit. + SINGLE - Sufficient for mpi-spawner itself. This MPI thread mode is only guaranteed to work correctly in a strictly single-threaded process (i.e. no threads anywhere in the system). + FUNNELED - Other threads exist in the process, but never call MPI or GASNet. + SERIALIZED - GASNET_PAR or GASNET_PARSYNC mode, where multiple client threads may call GASNet. Also required if the conduit spawns internal AM progress threads. + MULTIPLE - Multi-threaded GASNet+MPI process that makes direct calls to MPI. See MPI documentation for detailed explanation of the threading levels. * GASNET_MPI_FINALIZE - a Boolean defaulting to True If and only if the value is true, then mpi-spawner will call MPI_Finalize() during normal gasnet_exit() processing. gasnet-2025.8.0/other/perlstart.in0000664000175000017500000000743415142313673017123 0ustar alastairalastair# @configure_input@ # $Source: bitbucket.org:berkeleylab/gasnet.git/other/perlstart.in $ # Description: # Copyright 2004, Dan Bonachea # Terms of use are as specified in license.txt # # Purpose of this utility: # # Perlstart does the "right thing" to start a sane perl environment on any # machine, which involves finding the right configure-detected perl interpreter # (or an appropriate substitute), resolving all symlinks to the perl script # itself (so that $0 is a canonical absolute path), and occasionally passing # special flags to workaround bugs in perl. It also allows passing # configure-detected values through the environment to the perl script. # Finally, it does all this while still allowing the *.pl file to remain a # completely conventional perl script that can be directly executed (on "sane" # systems) for script debugging and development purposes. # # perlstart usage info: # # create a script.in file with the following contents (minus leading #'s) # #!@BOURNE_SHELL@ # SOME_VAR_YOUR_SCRIPT_NEEDS=@SOME_VAR_YOUR_SCRIPT_NEEDS@ # export SOME_VAR_YOUR_SCRIPT_NEEDS # # any options you want passsed to the perl invocation # PERLSTART_FLAGS="-Mstrict" # @PERL START@ (remove the embedded space and this comment) # be sure to place your script file in configure.in AC_OUTPUT and GASNET_FIX_EXEC # also be sure to add targets in Makefile to copy the .pl file when builddir!=srcdir scriptname=$0 perl='@PERL@' perlopts='@GASNET_PERL_BYTESFLAG@' readlink='@READLINK@' dirname='@DIRNAME@' basename='@BASENAME@' pwd_prog='@PWD_PROG@' awk='@AWK@' # written carefully to still work if readlink is missing or broken if test -x "$readlink" -a "`$readlink / 2>&1 > /dev/null`" = ""; then link=`$readlink ${scriptname}` else readlink= if test ! -x "$awk" -o "`$awk '{}' /dev/null 2>&1`" != ""; then awk=awk fi link=`/bin/ls -al ${scriptname} | $awk 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` fi # fall back on versions in PATH if our hard-coded ones disappear # carefully detect stderr output if test ! -x "$dirname" -o "`dirname foo/bar 2>&1`" != "foo" ; then dirname=dirname fi if test ! -x "$basename" -o "`basename foo/bar 2>&1`" != "bar" ; then basename=basename fi if test ! -x "$pwd_prog" -o "`$pwd_prog 2>&1 > /dev/null`" != "" ; then pwd_prog=pwd fi if test ! -x "$perl" -o "`$perl -v 2>&1 > /dev/null`" != "" ; then perl=perl perlopts= fi # be sure to follow any symbolic links to reach the location # where this script truly resides. while test "$link" && \ "$dirname" ${scriptname} > /dev/null 2>&1 && \ "$basename" ${scriptname} > /dev/null 2>&1 do dir=`"$dirname" ${scriptname}`; newpath="$link"; newdir=`"$dirname" ${newpath}`; newname=`"$basename" ${newpath}`; dir=`cd ${dir} >/dev/null 2>&1; cd ${newdir} >/dev/null 2>&1; $pwd_prog`; scriptname="${dir}/${newname}"; oldlink="$link" if test -x "$readlink" ; then link=`$readlink ${scriptname}` else link=`/bin/ls -al ${scriptname} | $awk 'BEGIN{FS=">"}{split($2,A," ") ; print A[1]}'` fi # readlink on the SGI Origin returns name of non-symlink, instead of blank, so # make sure a 'link' resolves to something other than itself if test x"$link" = x"$oldlink"; then link= fi done # be sure we always use a full path dir=`"$dirname" ${scriptname}`; scriptname=`cd ${dir} >/dev/null 2>&1; $pwd_prog`/`"$basename" ${scriptname}`; PERL="$perl" export PERL PERLSTART_FLAGS="$perlopts $PERLSTART_FLAGS" export PERLSTART_FLAGS # bug 687/2475: perl's UTF support implicitly does some very stupid things, # esp when manipulating binary strings -- so we force it all to be turned off LC_ALL=C export LC_ALL LANG=@GASNET_PERL_LANG@ export LANG exec $perl $PERLSTART_FLAGS "${scriptname}.pl" "$@" echo "${scriptname}: exec failed." >&2 exit 1 gasnet-2025.8.0/other/myxml/0000775000175000017500000000000015142313673015711 5ustar alastairalastairgasnet-2025.8.0/other/myxml/myxml.c0000664000175000017500000003676415142313673017243 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/myxml/myxml.c $ * Description: code to manage xml data * Copyright 2009, Rajesh Nishtala * Terms of use are as specified in license.txt */ #define STR_ALLOC_AND_COPY(OUTSTR, INSTR) do {(OUTSTR) = gasneti_malloc(strlen(INSTR)+1); strcpy((OUTSTR), (INSTR));} while(0) myxml_node_t *myxml_createNode_attr_list(myxml_node_t* parent, const char *tag, const char **attribute_list, const char **attribute_vals, int num_attributes, const char *value) { int i; myxml_node_t *ret=gasneti_calloc(1,sizeof(myxml_node_t)); ret->parent = parent; ret->num_children = 0; ret->children = NULL; /*make sure that we aren't adding to a leaf or know that this is the root node*/ if(parent==NULL) { ret->nodeclass = MYXML_ROOT_NODE; } else if(parent->nodeclass == MYXML_LEAF_NODE) { fprintf(stderr, "can't add a child to a leaf node!\n"); exit(1); } if(tag==NULL) { fprintf(stderr, "tag can't be null!\n"); exit(1); } else { STR_ALLOC_AND_COPY(ret->tag, tag); } /*this mustbe a leaf node since an explicit value was declared*/ if(value) { STR_ALLOC_AND_COPY(ret->value, value); ret->nodeclass = MYXML_LEAF_NODE; } else if(parent!=NULL) { ret->nodeclass = MYXML_INTER_NODE; } ret->attribute_list = gasneti_malloc(sizeof(myxml_attribute_t)*num_attributes); for(i=0; iattribute_list[i].attribute_name, attribute_list[i]); STR_ALLOC_AND_COPY(ret->attribute_list[i].attribute_value, attribute_vals[i]); } /*add myself to my parents children list*/ if(parent) { parent->num_children++; if(parent->children) { parent->children = gasneti_realloc(parent->children,parent->num_children*sizeof(myxml_node_t*)); } else { parent->children = gasneti_malloc(parent->num_children*sizeof(myxml_node_t*)); } parent->children[parent->num_children-1] = ret; } return ret; } void myxml_addAttribute(myxml_node_t *node, const char *attribute_name, const char *attribute_value) { node->attribute_list = gasneti_realloc(node->attribute_list, sizeof(myxml_attribute_t)*(node->num_attributes+1)); /*if adding an attribute name and value can't be NULL*/ if(attribute_name == NULL || attribute_value == NULL) { fprintf(stderr, "myxml error: attribute_name and attribute value must be non null when adding new attribute!\n"); exit(1); } STR_ALLOC_AND_COPY(node->attribute_list[node->num_attributes].attribute_name, attribute_name); STR_ALLOC_AND_COPY(node->attribute_list[node->num_attributes].attribute_value, attribute_value); node->num_attributes++; } void myxml_addAttributeInt(myxml_node_t *node, const char *attribute_name, int attribute_value) { char buffer[50]; if(attribute_name == NULL ) { fprintf(stderr, "myxml error: attribute_name must be non null when adding new attribute!\n"); exit(1); } sprintf(buffer, "%d", attribute_value); node->attribute_list = gasneti_realloc(node->attribute_list, sizeof(myxml_attribute_t)*(node->num_attributes+1)); STR_ALLOC_AND_COPY(node->attribute_list[node->num_attributes].attribute_name, attribute_name); STR_ALLOC_AND_COPY(node->attribute_list[node->num_attributes].attribute_value, buffer); node->num_attributes++; } myxml_node_t *myxml_createNode(myxml_node_t* parent, const char *tag, const char *attribute, const char *attribute_val, const char *value) { myxml_node_t *ret = myxml_createNode_attr_list(parent, tag, NULL, NULL, 0, value); if(attribute!=NULL && attribute_val!=NULL) myxml_addAttribute(ret, attribute, attribute_val); return ret; } myxml_node_t *myxml_createNodeInt(myxml_node_t* parent, const char *tag, const char *attribute, int attribute_val, const char *value) { char buffer[100]; myxml_node_t *ret = myxml_createNode_attr_list(parent, tag, NULL, NULL, 0, value); sprintf(buffer, "%d", attribute_val); myxml_addAttribute(ret, attribute, buffer); return ret; } void myxml_destroyTree(myxml_node_t *node) { int i,j; if(node==NULL) return; for(i=0; inum_children; i++) { myxml_destroyTree(node->children[i]); } gasneti_free(node->children); for(j=0; jnum_attributes; j++) { gasneti_free(node->attribute_list[j].attribute_name); gasneti_free(node->attribute_list[j].attribute_value); } gasneti_free(node->attribute_list); if(node->tag) gasneti_free(node->tag); if(node->value) gasneti_free(node->value); gasneti_free(node); return; } void myxml_printTreeXML_helper(FILE *outstream, myxml_node_t *node, int level, const char *whitespace) { int i, l; for(l=0; ltag); for(i=0; inum_attributes; i++) { fprintf(outstream, " %s=\"%s\"", node->attribute_list[i].attribute_name, node->attribute_list[i].attribute_value); } fprintf(outstream, ">\n"); if(node->nodeclass == MYXML_LEAF_NODE) { for(l=0; lvalue); } else { for(i=0; inum_children; i++) { myxml_printTreeXML_helper(outstream, node->children[i], level+1, whitespace); } } for(l=0; l\n", node->tag); } /*dump the tree in a human readable XML format*/ void myxml_printTreeXML(FILE *outstream, myxml_node_t *node, const char *whitespace) { fprintf(outstream, "\n"); if(node != NULL) myxml_printTreeXML_helper(outstream, node, 0, whitespace); } #ifndef htonl #define MYHTONL(IN) ((uint32_t)(IN)) /* cast avoids self-assigment warnings */ #else #define MYHTONL(IN) htonl(IN) #endif #ifndef ntohl #define MYNTOHL(IN) ((uint32_t)(IN)) /* cast avoids self-assigment warnings */ #else #define MYNTOHL(IN) ntohl(IN) #endif #if 0 #define SAFE_READ(PTR, NBYTES, INSTREAM) do { \ size_t __ret; \ __ret = fread(PTR, 1, NBYTES, INSTREAM); \ if(__ret != (NBYTES)) { \ fprintf(stderr, "read error (expected: %d got: %d)", (uint32_t)NBYTES, (uint32_t)__ret); \ fclose(INSTREAM); \ exit(1); \ }} while(0) myxml_node_t* myxml_loadTreeHelper(FILE *instream, myxml_node_t *parent_node) { uint32_t temp; int i=0; myxml_node_t *curr_node = (myxml_node_t*) gasneti_malloc(sizeof(myxml_node_t)); curr_node->parent = parent_node; if(parent_node == NULL) { curr_node->nodeclass = MYXML_ROOT_NODE; } else { curr_node->nodeclass = MYXML_INTER_NODE; } SAFE_READ(&temp, sizeof(uint32_t), instream); curr_node->id = MYNTOHL(temp); SAFE_READ(&temp, sizeof(uint32_t), instream); curr_node->num_children = MYNTOHL(temp); SAFE_READ(&temp, sizeof(uint32_t), instream); curr_node->num_attributes = MYNTOHL(temp); /*read the tag length and allocate the buffer*/ SAFE_READ(&temp, sizeof(uint32_t), instream); temp = MYNTOHL(temp); curr_node->tag = (char*) gasneti_malloc(temp); /*read the tag*/ SAFE_READ(curr_node->tag, temp, instream); curr_node->attribute_list = (myxml_attribute_t*) gasneti_malloc(sizeof(myxml_attribute_t)*curr_node->num_attributes); for(i=0; inum_attributes; i++) { /*read the length of the string*/ SAFE_READ(&temp, sizeof(uint32_t), instream); temp = MYNTOHL(temp); curr_node->attribute_list[i].attribute_name = gasneti_malloc(temp); SAFE_READ(curr_node->attribute_list[i].attribute_name, temp, instream); SAFE_READ(&temp, sizeof(uint32_t), instream); temp = MYNTOHL(temp); curr_node->attribute_list[i].attribute_value = gasneti_malloc(temp); SAFE_READ(curr_node->attribute_list[i].attribute_value, temp, instream); } /*read the size of the value str*/ SAFE_READ(&temp, sizeof(uint32_t), instream); temp = MYNTOHL(temp); if(temp > 0) { curr_node->value = (char*) gasneti_malloc(temp); SAFE_READ(curr_node->value, temp, instream); curr_node->nodeclass = MYXML_LEAF_NODE; } curr_node->children = (myxml_node_t**) gasneti_malloc(sizeof(myxml_node_t*)*curr_node->num_children); for(i=0; inum_children; i++) { curr_node->children[i] = myxml_loadTreeHelper(instream, curr_node); } return curr_node; } myxml_node_t* myxml_loadTreeBIN(FILE *instream) { uint32_t num_nodes; uint32_t temp; SAFE_READ(&temp, sizeof(uint32_t), instream); num_nodes = MYNTOHL(temp); return myxml_loadTreeHelper(instream, NULL); } #endif #define SAFE_READ_BYTES(PTR, NBYTES, BYTESTREAM) do {\ memcpy(PTR, ((BYTESTREAM)->bytes)+(BYTESTREAM)->offset, NBYTES);\ (BYTESTREAM)->offset+=NBYTES; gasneti_assert_always((BYTESTREAM)->offset<=(BYTESTREAM)->size);\ } while(0) myxml_node_t* myxml_loadTreeHelper_bytestream(myxml_bytestream_t *instream, myxml_node_t *parent_node) { uint32_t temp; int i=0; myxml_node_t *curr_node = (myxml_node_t*) gasneti_malloc(sizeof(myxml_node_t)); curr_node->parent = parent_node; if(parent_node == NULL) { curr_node->nodeclass = MYXML_ROOT_NODE; } else { curr_node->nodeclass = MYXML_INTER_NODE; } SAFE_READ_BYTES(&temp, sizeof(uint32_t), instream); curr_node->id = MYNTOHL(temp); SAFE_READ_BYTES(&temp, sizeof(uint32_t), instream); curr_node->num_children = MYNTOHL(temp); SAFE_READ_BYTES(&temp, sizeof(uint32_t), instream); curr_node->num_attributes = MYNTOHL(temp); /*read the tag length and allocate the buffer*/ SAFE_READ_BYTES(&temp, sizeof(uint32_t), instream); temp = MYNTOHL(temp); curr_node->tag = (char*) gasneti_malloc(temp); /*read the tag*/ SAFE_READ_BYTES(curr_node->tag, temp, instream); curr_node->attribute_list = (myxml_attribute_t*) gasneti_malloc(sizeof(myxml_attribute_t)*curr_node->num_attributes); for(i=0; inum_attributes; i++) { /*read the length of the string*/ SAFE_READ_BYTES(&temp, sizeof(uint32_t), instream); temp = MYNTOHL(temp); curr_node->attribute_list[i].attribute_name = gasneti_malloc(temp); SAFE_READ_BYTES(curr_node->attribute_list[i].attribute_name, temp, instream); SAFE_READ_BYTES(&temp, sizeof(uint32_t), instream); temp = MYNTOHL(temp); curr_node->attribute_list[i].attribute_value = gasneti_malloc(temp); SAFE_READ_BYTES(curr_node->attribute_list[i].attribute_value, temp, instream); } /*read the size of the value str*/ SAFE_READ_BYTES(&temp, sizeof(uint32_t), instream); temp = MYNTOHL(temp); if(temp > 0) { curr_node->value = (char*) gasneti_malloc(temp); SAFE_READ_BYTES(curr_node->value, temp, instream); curr_node->nodeclass = MYXML_LEAF_NODE; } curr_node->children = (myxml_node_t**) gasneti_malloc(sizeof(myxml_node_t*)*curr_node->num_children); for(i=0; inum_children; i++) { curr_node->children[i] = myxml_loadTreeHelper_bytestream(instream, curr_node); } return curr_node; } myxml_node_t* myxml_loadTreeBYTESTREAM(char *bytes, size_t nbytes) { uint32_t num_nodes; uint32_t temp; myxml_bytestream_t bytestream; bytestream.bytes = bytes; bytestream.size = nbytes; bytestream.offset = 0; SAFE_READ_BYTES(&temp, sizeof(uint32_t), &bytestream); num_nodes = MYNTOHL(temp); return myxml_loadTreeHelper_bytestream(&bytestream, NULL); } myxml_bytestream_t myxml_loadFile_into_bytestream(FILE *instream) { myxml_bytestream_t ret; ret.offset = 0; fseek(instream, 0L, SEEK_END); ret.size = ftell(instream); rewind(instream); printf("loading %d bytes\n", (int)ret.size); ret.bytes = gasneti_calloc(sizeof(char),ret.size); if(fread(ret.bytes, 1, ret.size, instream)!=ret.size) { fprintf(stderr, "error reading input file!\n"); exit(1); } return ret; } myxml_node_t* myxml_loadTreeBIN(FILE *instream) { myxml_bytestream_t bytestream = myxml_loadFile_into_bytestream(instream); return myxml_loadTreeBYTESTREAM(bytestream.bytes, bytestream.size); } uint32_t myxml_countAndLabelNodes(myxml_node_t *node, uint32_t label) { int i; uint32_t count = 0; uint32_t num_children=0; node->id = label; /*add one for myself*/ label++; for(i=0; inum_children; i++) { num_children = myxml_countAndLabelNodes(node->children[i], label); label+=num_children; count += num_children; } /*add one for myself*/ return count+1; } #define SAFE_WRITE(PTR, NBYTES, OUTSTREAM) do { \ size_t __ret; \ __ret = fwrite(PTR, 1, NBYTES, OUTSTREAM); \ if(__ret != (NBYTES)) { \ fprintf(stderr, "write error (expected: %d got: %d)\n", (int)NBYTES, (int)__ret); \ fclose(OUTSTREAM); \ exit(1); }} while(0) #if 0 void myxml_fillSizes(myxml_node_t *node, size_t *sz_arr) { int i,j; size_t mysz; /*first figure out the size of mynode*/ mysz = sizeof(uint32_t)*3; /*id, num_children, num_attributes*/ mysz += sizeof(uint32_t)*node->num_children; mysz += sizeof(uint32_t) + strlen(node->tag)+1; /*tag is always non null*/ for(i=0; inum_attributes; i++) { mysz += sizeof(uint32_t) + strlen(node->attribute_list[i].attribute_name)+1; mysz +=sizeof(uint32_t) + strlen(node->attribute_list[i].attribute_value)+1; } mysz+=sizeof(uint32_t) + (node->value!=NULL ? strlen(node->value)+1 : 0); sz_arr[node->id] = mysz; /*and then recurse through my children*/ for(i=0; inum_children; i++) { myxml_fillSizes(node->children[i], sz_arr); } return; } #endif static void dump_TreeBIN(FILE *outstream, myxml_node_t *node) { uint32_t temp; int i; temp = MYHTONL(node->id); SAFE_WRITE(&temp, sizeof(uint32_t), outstream); temp = MYHTONL(node->num_children); SAFE_WRITE(&temp, sizeof(uint32_t), outstream); temp = MYHTONL(node->num_attributes); SAFE_WRITE(&temp, sizeof(uint32_t), outstream); temp = MYHTONL(strlen(node->tag)+1); SAFE_WRITE(&temp, sizeof(uint32_t), outstream); SAFE_WRITE(node->tag, strlen(node->tag)+1, outstream); for(i=0; inum_attributes; i++) { temp = MYHTONL(strlen(node->attribute_list[i].attribute_name)+1); SAFE_WRITE(&temp, sizeof(uint32_t), outstream); SAFE_WRITE(node->attribute_list[i].attribute_name, strlen(node->attribute_list[i].attribute_name)+1, outstream); temp = MYHTONL(strlen(node->attribute_list[i].attribute_value)+1); SAFE_WRITE(&temp, sizeof(uint32_t), outstream); SAFE_WRITE(node->attribute_list[i].attribute_value, strlen(node->attribute_list[i].attribute_value)+1, outstream); } if(node->value) { temp = MYHTONL(strlen(node->value)+1); SAFE_WRITE(&temp, sizeof(uint32_t), outstream); SAFE_WRITE(node->value, strlen(node->value)+1, outstream); } else { temp = MYHTONL(0); SAFE_WRITE(&temp, sizeof(uint32_t), outstream); } for(i=0; inum_children; i++) { dump_TreeBIN(outstream, node->children[i]); } } /*dump the tree as a Binary file that the other parts of GASNet can later load*/ void myxml_printTreeBIN(FILE *outstream, myxml_node_t *node) { /*first go through and count the number of nodes and the get the size of each one*/ int num_nodes = myxml_countAndLabelNodes(node, 0); uint32_t temp = MYHTONL(num_nodes); SAFE_WRITE(&temp, sizeof(uint32_t), outstream); dump_TreeBIN(outstream, node); fprintf(stdout, "tree size: %d nodes\n", num_nodes); } #undef SAFE_READ #undef SAFE_WRITE #undef MYNTOHL #undef MYHTONL gasnet-2025.8.0/other/myxml/myxml_bintoxml.c0000664000175000017500000000164415142313673021144 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/myxml/myxml_bintoxml.c $ * Description: code to manage xml data * Copyright 2009, Rajesh Nishtala * Terms of use are as specified in license.txt */ #include #include #include #include #define gasneti_malloc(SZ) malloc(SZ) #define gasneti_calloc(N,SZ) calloc(N,SZ) #define gasneti_realloc(PTR,SZ) realloc(PTR,SZ) #define gasneti_free(PTR) free(PTR) #define gasneti_assert_always(COND) do{if(!(COND)){ fprintf(stderr, "fatalERROR: %s:%d\n", __FILE__, __LINE__); exit(1);}}while(0) #include "./myxml.h" #include "./myxml.c" int main(int argc, char **argv) { myxml_node_t *A; FILE *fp; if(argc!=2) { fprintf(stderr, "usage: %s \n", argv[0]); } fp = fopen(argv[1], "r"); A = myxml_loadTreeBIN(fp); fclose(fp); myxml_printTreeXML(stdout, A, " "); myxml_destroyTree(A); } gasnet-2025.8.0/other/myxml/myxml.h0000664000175000017500000000462315142313673017235 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/myxml/myxml.h $ * Description: code to manage xml data * Copyright 2009, Rajesh Nishtala * Terms of use are as specified in license.txt */ #ifndef __MYXML_H__ #define __MYXML_H__ 1 #include #include #include typedef enum { MYXML_ROOT_NODE = 0, MYXML_LEAF_NODE, MYXML_INTER_NODE, MYXML_NUM_NODE_CLASSES} myxml_node_class_t; typedef struct myxml_attribute_t_ { char *attribute_name; char *attribute_value; } myxml_attribute_t; struct myxml_node_t_{ struct myxml_node_t_ *parent; struct myxml_node_t_ **children; int num_children; myxml_node_class_t nodeclass; char *tag; myxml_attribute_t *attribute_list; int num_attributes; char* value; int id; }; typedef struct myxml_bytstream_t_ { char* bytes; size_t offset; size_t size; } myxml_bytestream_t; typedef struct myxml_node_t_ myxml_node_t; typedef struct myxml_node_t_ *myxml_nodeptr_t; myxml_node_t *myxml_createNode_attr_list(myxml_node_t* parent, const char *tag, const char **attribute_list, const char **attribute_vals, int num_attributes, const char *value); myxml_node_t *myxml_createNode(myxml_node_t* parent, const char *tag, const char *attribute, const char *attribute_val, const char *value); myxml_node_t *myxml_createNodeInt(myxml_node_t* parent, const char *tag, const char *attribute, int attribute_val, const char *value); void myxml_addAttribute(myxml_node_t *node, const char *attribute_name, const char *attribute_value); void myxml_addAttributeInt(myxml_node_t *node, const char *attribute_name, int attribute_value); void myxml_printTreeXML(FILE *outstream, myxml_node_t *node, const char *whitespace); void myxml_printTreeBIN(FILE *outstream, myxml_node_t *node); myxml_bytestream_t myxml_loadFile_into_bytestream(FILE *instream); myxml_node_t* myxml_loadTreeBIN(FILE *instream); myxml_node_t* myxml_loadTreeBYTESTREAM(char *bytes, size_t nbytes); #define MYXML_PARENT(NODEPTR) ((NODEPTR)->parent) #define MYXML_CHILDREN(NODEPTR) ((NODEPTR)->children) #define MYXML_NUM_CHILDREN(NODEPTR) ((NODEPTR)->num_children) #define MYXML_NODEPTRCLASS(NODEPTR) ((NODEPTR)->nodeclass) #define MYXML_TAG(NODEPTR) ((NODEPTR)->tag) #define MYXML_NUM_ATTRIBUTES(NODEPTR) ((NODEPTR)->num_attributes) #define MYXML_ATTRIBUTES(NODEPTR) ((NODEPTR)->attribute_list) #define MYXML_VALUE(NODEPTR) ((NODEPTR)->value) #endif gasnet-2025.8.0/other/Makefile.am0000664000175000017500000000654715142313673016613 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/other/Makefile.am $ # Description: Makefile for GASNet other # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 # GASNET_TOOLSONLY_TRUE_BEGIN # CONDUITMODE_SUBDIRS = # CONDUITMODE_EXTRADIST = # GASNET_TOOLSONLY_TRUE_END # GASNET_TOOLSONLY_FALSE_BEGIN CONDUITMODE_SUBDIRS = \ ammpi \ amudp \ contrib \ firehose \ valgrind CONDUITMODE_EXTRADIST = \ amx \ hwloc \ ssh-spawner \ mpi-spawner \ pmi-spawner \ spawner \ kinds \ myxml \ detect-pshm.c \ pkgconfig-conduit.pc \ # exclude these from distribution for now # cross-configure-help.c # GASNET_TOOLSONLY_FALSE_END SUBDIRS = $(CONDUITMODE_SUBDIRS) EXTRA_DIST = \ $(CONDUITMODE_EXTRADIST) \ Makefile-echovar.mak \ pkgconfig-tools.pc \ check-pp.c \ check-header-erase.pl \ tools-toggle.pl # Excluded from distribution: # detect-cachesz.c \ # include_HEADERS = \ gasnet_arch_arm.h \ portable_inttypes.h \ portable_platform.h \ gasnet_portable_platform.h if CONDUIT_MODE if USE_UDP_CONDUIT UDP_dir=$(top_builddir)/other/amudp endif if USE_AMMPI MPI_dir=$(top_builddir)/other/ammpi endif testdirs= $(UDP_dir) $(MPI_dir) tests tests-clean run-tests check-exports: @list='$(testdirs)'; for dir in $$list ; do \ ( cd "$$dir" && $(MAKE) $@ ) || exit $$?; \ done CONDUITMODE_TARGETS = Makefile-conduit.mak mpirun_common endif # Automated correctness checks for portable_platform.h # CHECK_PP_C = $(srcdir)/check-pp.c $(CHECK_PP_C): gasnet_portable_platform.h portable_platform.h check-pp-tgt: $(CHECK_PP_C) @CC@ @CFLAGS@ @LDFLAGS@ -I$(srcdir) -I$(top_builddir) '-DCONFIG_HEADER="gasnet_config.h"' -D_IN_GASNET_TOOLS_H=1 $(MANUAL_DEFINES) $(MANUAL_CFLAGS) $(MANUAL_LDFLAGS) -o $@ $< @LIBS@ $(MANUAL_LIBS) # Disabled until we have a more compelling need for configure detection of HOST_CC #check-pp-host: $(CHECK_PP_C) # @HOST_CC@ @HOST_CFLAGS@ @HOST_LDFLAGS@ -I$(srcdir) $(MANUAL_DEFINES) $(MANUAL_CFLAGS) $(MANUAL_LDFLAGS) -o $@ $< @HOST_LIBS@ $(MANUAL_LIBS) if CROSS_COMPILING check-pp-run: check-pp-tgt else check-pp-run: check-pp-tgt ./check-pp-tgt endif .PHONY: check-pp-run CLEANFILES = check-pp-tgt$(EXESUFFIX) check-pp: check-pp-run @PERL@ $(srcdir)/check-header-erase.pl $(srcdir)/gasnet_portable_platform.h 1 check-local: check-pp # If we add plpa to EXTRA_DIST, then automake-1.9 tries to package # plpa/config/acinclude.m4 more than once. dist-hook: rm -f $(distdir)/plpa/config/acinclude.m4 cp -pR $(srcdir)/plpa $(distdir)/ all-local: $(CONDUITMODE_TARGETS) perlstart # GASNET_TOOLSONLY_FALSE_BEGIN ## Docs to install from any subdirs if NEED_DOCDIR docdir = $(datadir)/doc/GASNet endif install-data-local: $(mkinstalldirs) $(DESTDIR)$(docdir) $(INSTALL_DATA) $(srcdir)/ssh-spawner/README $(DESTDIR)$(docdir)/README-ssh-spawner $(INSTALL_DATA) $(srcdir)/mpi-spawner/README $(DESTDIR)$(docdir)/README-mpi-spawner $(INSTALL_DATA) $(srcdir)/pmi-spawner/README $(DESTDIR)$(docdir)/README-pmi-spawner uninstall-local: rm -Rf $(DESTDIR)$(docdir) # GASNET_TOOLSONLY_FALSE_END .PHONY: force clean tests tests-clean run-tests force: gasnet-2025.8.0/other/check-pp.c0000664000175000017500000001405215142313673016403 0ustar alastairalastair/* Test program for gasnet_portable_platform.h */ #ifdef CONFIG_HEADER #ifndef _FORTIFY_SOURCE #define _FORTIFY_SOURCE 0 /* avoid a harmless -Wundef warning */ #endif #include CONFIG_HEADER #endif #ifndef _CONCAT #define _CONCAT_HELPER(a,b) a ## b #define _CONCAT(a,b) _CONCAT_HELPER(a,b) #endif #ifdef __cplusplus #define LANGSLUG CXX #else #define LANGSLUG C #endif typedef struct { const char *key; const char *valstr; const int valint; } entry_t; typedef entry_t *snap_t; #define CAPTURE_FULL(key, valstr, valint) { key, valstr, (int)(valint) } #define CAPTURE_TOK(var) CAPTURE_FULL("PLATFORM_" #var, PLATFORM_STRINGIFY(PLATFORM_##var), 0) #define CAPTURE_STR(var) CAPTURE_FULL("PLATFORM_" #var, "\"" PLATFORM_##var "\"", 0) #define CAPTURE_INT(var) CAPTURE_FULL("PLATFORM_" #var, 0, PLATFORM_##var) #define CAPTURE_DEF(var) CAPTURE_FULL("IFDEF_PLATFORM_" #var, PLATFORM_STRINGIFY(PLATFORM_##var), 0) #define CAPTURE_SNAP(id) \ entry_t snap##id[] = { \ CAPTURE_INT(HEADER_VERSION), \ \ CAPTURE_TOK(COMPILER_FAMILYNAME), \ CAPTURE_INT(COMPILER_FAMILYID), \ CAPTURE_INT(COMPILER_ID), \ CAPTURE_INT(COMPILER_VERSION), \ CAPTURE_FULL("PLATFORM_COMPILER_" PLATFORM_STRINGIFY(LANGSLUG) "_LANGLVL", \ 0, _CONCAT(_CONCAT(PLATFORM_COMPILER_,LANGSLUG),_LANGLVL)), \ CAPTURE_STR(COMPILER_VERSION_STR), \ CAPTURE_STR(COMPILER_IDSTR), \ CAPTURE_FULL("PLATFORM_COMPILER_" PLATFORM_STRINGIFY(PLATFORM_COMPILER_FAMILYNAME), \ 0, _CONCAT(PLATFORM_COMPILER_,PLATFORM_COMPILER_FAMILYNAME)), \ CAPTURE_FULL("PLATFORM_COMPILER_" PLATFORM_STRINGIFY(PLATFORM_COMPILER_FAMILYNAME) \ "_" PLATFORM_STRINGIFY(LANGSLUG), \ 0, _CONCAT(PLATFORM_COMPILER_, \ _CONCAT(_CONCAT(PLATFORM_COMPILER_FAMILYNAME, _), LANGSLUG))), \ \ CAPTURE_TOK(OS_FAMILYNAME), \ CAPTURE_FULL("PLATFORM_OS_" PLATFORM_STRINGIFY(PLATFORM_OS_FAMILYNAME), \ 0, _CONCAT(PLATFORM_OS_,PLATFORM_OS_FAMILYNAME)), \ CAPTURE_OS_SUBFAMILY() \ \ CAPTURE_TOK(ARCH_FAMILYNAME), \ CAPTURE_FULL("PLATFORM_ARCH_" PLATFORM_STRINGIFY(PLATFORM_ARCH_FAMILYNAME), \ 0, _CONCAT(PLATFORM_ARCH_,PLATFORM_ARCH_FAMILYNAME)), \ CAPTURE_DEF(ARCH_32), \ CAPTURE_DEF(ARCH_64), \ CAPTURE_DEF(ARCH_LITTLE_ENDIAN), \ CAPTURE_DEF(ARCH_BIG_ENDIAN), \ \ } #include /* handle conditional subfamily definitions */ #ifdef PLATFORM_OS_SUBFAMILYNAME #define CAPTURE_OS_SUBFAMILY() \ CAPTURE_TOK(OS_SUBFAMILYNAME), \ CAPTURE_FULL("PLATFORM_OS_SUBFAMILY_" PLATFORM_STRINGIFY(PLATFORM_OS_SUBFAMILYNAME), \ 0, _CONCAT(PLATFORM_OS_SUBFAMILY_,PLATFORM_OS_SUBFAMILYNAME)), #else #define CAPTURE_OS_SUBFAMILY() \ CAPTURE_FULL("PLATFORM_OS_SUBFAMILY_NAME","",0), #endif CAPTURE_SNAP(0); #include /* test double-include */ #ifdef INJECT_ERROR /* for testing this file */ #undef PLATFORM_COMPILER_ID #define PLATFORM_COMPILER_ID 999 #undef PLATFORM_COMPILER_IDSTR #define PLATFORM_COMPILER_IDSTR "junk" #undef PLATFORM_ARCH_32 #undef PLATFORM_ARCH_64 #endif CAPTURE_SNAP(1); /* test for system header interference * use the C89 headers that should be safe everywhere */ #ifndef SKIP_SYS_HEADERS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif #ifdef USE_MPI #include #endif #define PLATFORM_SHOW 1 /* enable self-test */ #define main platform_show #undef _PORTABLE_PLATFORM_H /* force a re-include */ #include CAPTURE_SNAP(2); #include #undef main int errs = 0; int main() { /* first do the header self-test */ printf("PLATFORM_SHOW:\n-------------\n"); platform_show(); printf("\n"); { /* now look at our own snapshots of output */ size_t i,k; snap_t snaps[] = { snap0, snap1, snap2 }; size_t numsnaps = sizeof(snaps)/sizeof(snap_t); size_t numkeys = sizeof(snap1)/sizeof(entry_t); for (i=1; ikey, e0->key)) { printf("ERROR: key %i mismatch in snap %i: %s != %s\n", (int)k, (int)i, ei->key, e0->key); } else if (!ei->valstr != !e0->valstr) { printf("ERROR: %s type mismatch in snap %i\n", ei->key, (int)i); } else if (ei->valint != e0->valint) { printf("ERROR: %s mismatch in snap %i: %i != %i\n", ei->key, (int)i, ei->valint, e0->valint); } else if (ei->valstr && strcmp(ei->valstr, e0->valstr)) { printf("ERROR: %s mismatch in snap %i: %s != %s\n", ei->key, (int)i, ei->valstr, e0->valstr); } else errs--; } } for (i=0; ivalstr) { if (!strncmp(e->key,"IFDEF_",6)) { printf("%-30s: %s\n", e->key+6, (strcmp(e->key+6,e->valstr)?e->valstr:"")); } else { printf("%-30s: %s\n", e->key, e->valstr); } } else { printf("%-30s: (%i)\n", e->key, e->valint); } } if (!errs) break; } } return errs; } gasnet-2025.8.0/other/check-header-erase.pl0000664000175000017500000000655015142313673020506 0ustar alastairalastair#!/usr/bin/env perl # check-header-erase by Dan Bonachea # Checks that all #defines in a header file are guaranteed to be preceded by an #undef. # The check is conservative in that the preceding #undef must appear in a scope that # equals or encloses the scope containing the #define. # Additionally checks that any 'public' #defines (those that do not begin with '_') # have a preceding #undef at the global scope level (the "always parsed" scope). # # This condition is sufficient to ensure that a header file is "self-erasing", # specifically that it can be safely #included multiple times in succession without # encountering any errors concerning redefinition, and furthermore that only the # public #defines from the 'last' #include will remain. require 5.005; use strict; my $debug; if ($ARGV[0] eq "-d") { $debug = 1; shift; } my $filename = $ARGV[0]; my $globallevel = $ARGV[1]; $globallevel = 0 if !defined($globallevel); if (!($globallevel =~ m/^\d+$/) or ! -f $filename) { die "Usage: $0 [-d] []\n"; } my $level=0; my $linenum; my $cur_linenum=0; my $errs=0; my %first_undef = {}; # symbol => line of first #undef my %symstate = {}; # symbol => (+) line of last #define or (-) last of last #undef my @undef_stack = (); # [ scope level ] : symbol => line of first #undef in current scope push @undef_stack, {}; sub error { my ($err) = @_; print "$filename:$linenum ERROR: $err\n"; $errs++; } #use Data::Dumper; open(FIN, "<$filename"); while (defined(my $line = )) { $cur_linenum++; $linenum = $cur_linenum; $line =~ s@/\*.*\*/@@g; # strip inline C comments while ($line =~ s/\\$// or # concatenate split lines $line =~ m@/\*.*$@) { # concatenate lines ending with a multi-line C comment $line =~ s@\n$@@; $line .= ; $cur_linenum++; $line =~ s@/\*.*\*/@@g; # strip inline C comments } $line =~ s@//.*$@@; # strip C++ comments #print Dumper(\%symstate); if ($line =~ m/^\s*#\s*define\s+(\w+)(?:\s+(.*))?$/) { print "$linenum \tD:"." "x$level."$1=$2\n" if $debug; my $sym = $1; if (not $first_undef{$sym}) { error("No prior #undef $sym"); } elsif ($sym =~ m/^[^_]/ and not $undef_stack[$globallevel]{$sym}) { error("No prior #undef $sym of public symbol at global scope $globallevel"); } else { #print Dumper(\@undef_stack); my $found; for (my $scope = $#undef_stack; $scope >= 0; $scope--) { my $lookup = $undef_stack[$scope]{$sym}; if ($lookup) { $found = $lookup; last; } } error("No prior #undef $sym in current or enclosing scope") unless $found; } if ($symstate{$sym} > 0) { # currently too imprecise to be useful # error("Possible redefinition of $sym. Prior definition at line ".$symstate{$sym}); } $symstate{$sym} = $linenum; } elsif ($line =~ m/^\s*#\s*undef\s+(\w+)\s*$/) { print "$linenum \tU:"." "x$level."$1\n" if $debug; my $sym = $1; $first_undef{$sym} = $linenum unless $first_undef{$sym}; $undef_stack[$level]{$sym} = $linenum; $symstate{$sym} = - $linenum; } elsif ($line =~ m/^\s*#\s*if(?:n?def)?\b/) { $level++; push @undef_stack, {}; } elsif ($line =~ m/^\s*#\s*else\b/ or $line =~ m/^\s*#\s*elif\b/) { pop @undef_stack; push @undef_stack, {}; } elsif ($line =~ m/^\s*#\s*endif\b/) { pop @undef_stack; $level--; } } exit not $errs==0; gasnet-2025.8.0/other/gasnet_arch_arm.h0000664000175000017500000000741115142313673020034 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/gasnet_arch_arm.h $ * Description: GASNet ARM-specific Helpers (Internal code, not for client use) * Copyright 2018, The Regents of the University of California * Terms of use are as specified in license.txt * * This code is used by gasnet_asm.h, configure and cross_configure_helper. */ #if !defined(_IN_GASNETEX_H) && !defined(_IN_GASNET_TOOLS_H) && !defined(GASNETI_IN_CONFIGURE) #error This file is not meant to be included directly- clients should include gasnetex.h or gasnet_tools.h #endif #ifndef __arm__ #error Architecture-specific header included on wrong architecture. #endif #ifndef _GASNET_ARCH_ARM_H #define _GASNET_ARCH_ARM_H #if defined(__thumb__) && !defined(__thumb2__) /* "GASNet does not support ARM Thumb1 mode" */ #define GASNETI_ARM_ASMCALL(_tmp, _offset) "choke me" #elif defined(__ARM_ARCH_2__) /* "GASNet does not support ARM versions earlier than ARMv3" */ #define GASNETI_ARM_ASMCALL(_tmp, _offset) "choke me" #elif defined(__ARM_ARCH_3__) || defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) #define GASNETI_ARM_ASMCALL(_tmp, _offset) \ " mov " #_tmp ", #0xffff0fff @ _tmp = base addr \n" \ " mov lr, pc @ lr = return addr \n" \ " sub pc, " #_tmp ", #" #_offset " @ call _tmp - _offset \n" #else #define GASNETI_ARM_ASMCALL(_tmp, _offset) \ " mov " #_tmp ", #0xffff0fff @ _tmp = base addr \n" \ " sub " #_tmp ", " #_tmp ", #" #_offset " @ _tmp -= _offset \n" \ " blx " #_tmp " @ call _tmp \n" #endif /* ARCH-specific configure probes below */ #if GASNETI_IN_CONFIGURE #if CHECK_ARM_CMPXCHG int cmp_swap(volatile unsigned int *v, int oldval, int newval) { register unsigned int result asm("r0"); register unsigned int _newval asm("r1") = newval; register unsigned int _v asm("r2") = (unsigned long)v; register unsigned int _oldval asm("r4") = oldval; /* Transient failure is possible if interrupted. * Since we can't distinguish the cause of the failure, * we must retry as long as the failure looks "improper" * which is defined as (!swapped && (v->ctr == oldval)) */ __asm__ __volatile__ ( "0: mov r0, r4 @ r0 = oldval \n" GASNETI_ARM_ASMCALL(r3, 0x3f) #ifdef __thumb2__ " ite cc @ THUMB2: If(cc)-Then-Else \n" #endif " ldrcc ip, [r2, #0] @ if (!swapped) ip=v->ctr \n" " eorcs ip, r4, #1 @ else ip=oldval^1 \n" " teq r4, ip @ if (ip == oldval) \n" " beq 0b @ then retry \n" "1: " : "=&r" (result) : "r" (_oldval), "r" (_v), "r" (_newval) : "r3", "ip", "lr", "cc", "memory" ); return !result; } int gasneti_arm_cmpxchg_check(void) { /* Child */ volatile unsigned int X = 4321; /* Expect FAIL and X unchanged */ if (cmp_swap(&X, 0, 1234) || (X != 4321)) return 1; /* Expect SUCCESS and X changed */ if (!cmp_swap(&X, 4321, 1234) || (X != 1234)) return 1; return 0; } #endif #if CHECK_ARM_MEMBAR #define arm_membar() \ __asm__ __volatile__ ( \ GASNETI_ARM_ASMCALL(r0, 0x5f) \ : : : "r0", "lr", "cc", "memory" ) int gasneti_arm_membar_check(void) { /* First check the interface version (number of helpers) */ unsigned int kernel_helper_version = *(unsigned int *)0xffff0ffcUL; /* Max possible is 128 32-byte helper "slots". * We check this because prior to 2.6.12, the same location * held the thread-specific pointer! */ if (kernel_helper_version > 128) return 1; /* memory barrier occupies slot #3 */ if (kernel_helper_version < 3) return 1; /* Can't test any side effect, but at least check for crash */ arm_membar(); return 0; } #endif #endif #endif // _GASNET_ARCH_ARM_H gasnet-2025.8.0/other/valgrind/0000775000175000017500000000000015142313673016351 5ustar alastairalastairgasnet-2025.8.0/other/valgrind/Makefile.am0000664000175000017500000000077315142313673020414 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/other/valgrind/Makefile.am $ # Description: Makefile for GASNet other/valgrind # Copyright 2020, The Regents of the University of California # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 SUBDIRS = . suppression_files = gasnet.supp EXTRA_DIST = $(suppression_files) if VALGRIND vgdir = $(libdir)/valgrind vg_DATA = $(suppression_files) endif gasnet-2025.8.0/other/valgrind/gasnet.supp0000664000175000017500000001165015142313673020546 0ustar alastairalastair# This file is a suppression file for using Valgrind with GASNet. # See the valgrind documentation for info on the use and format of this file. # # $Source: bitbucket.org:berkeleylab/gasnet.git/other/contrib/gasnet.supp $ # # PLPA calls sched_setaffinity() with a NULL mask argument on purpose. { PLPA-sched_setaffinity-NULL-mask Memcheck:Param sched_setaffinity(mask) fun:syscall fun:gasneti_plpa_* } # ofi-conduit/gni-provider: suppress Cray NIC device accesses unrecognized by valgrind { GNI-bad-ioctl Memcheck:Param ioctl(generic) fun:ioctl obj:*/libugni.so* } { GNI-bad-device-PIO8 Memcheck:Addr8 obj:*/libugni.so* } { GNI-bad-device-PIO4 Memcheck:Addr4 obj:*/libugni.so* } { GNI-bad-device-PIO2 Memcheck:Addr2 obj:*/libugni.so* } { GNI-bad-device-PIO1 Memcheck:Addr1 obj:*/libugni.so* } { UDREG-bad-device-PIO8 Memcheck:Addr8 obj:*/libudreg.so* } # ofi-conduit/gni-provider: suppress Cray memory leak in UDREG_CacheCreate # see: https://github.com/ofi-cray/libfabric-cray/issues/990 { UDREG-UDREG_CacheCreate-leak Memcheck:Leak match-leak-kinds: definite fun:malloc ... fun:UDREG_CacheCreate } # # The following are suppressions for known-benign memory leaks. # They are only useful in a debug build, both because of the # _gasneti_malloc() wrapper included in the call stacks given, # and because in an optimized build the inliner will cause call # stacks to vary. # # gasneti_envstr_display keeps a linked list containing strdup()ed strings { gasneti_envstr_display-malloc-leak Memcheck:Leak fun:malloc fun:gasneti_envstr_display } { gasneti_envstr_display-strdup-leak Memcheck:Leak fun:malloc fun:strdup fun:gasneti_envstr_display } # gasneti_tick_metric allocates static data { gasneti_tick_metric-static-leak Memcheck:Leak fun:malloc fun:gasneti_tick_metric } # segment setup allocates global state { gasneti_segmentInit-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:gasneti_segmentInit } { gasneti_auxseg_init-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:_gasneti_calloc fun:gasneti_auxseg_init } { gasneti_auxseg_attach-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:gasneti_auxseg_attach } { gasneti_auxseg_dummy-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:gasneti_auxseg_dummy } # gasneti_attach allocates global data { gasneti_attach-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:gasneti_attach } # gasnete_coll_init allocates global state { gasnete_coll_init-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:gasnete_coll_init } # gasnet collectives keeps freelists { gasnete_coll-handle-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:gasnete_coll_handle_create } { gasnete_coll-op-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:gasnete_coll_op_create } { gasnete_coll-generic-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:gasnete_coll_generic_alloc } { gasnete_coll-p2p-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:gasnete_coll_p2p_get } # gasnete threaddata (and subordinates) are never freed { gasnete_new_threaddata-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:_gasneti_calloc fun:gasnete_new_threaddata } { gasnete_iop_new-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:gasnete_iop_new } { gasnete_eop_new-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:_gasneti_calloc fun:gasnete_eop_new } # gasnete_coll threaddata (and subordinates) are never freed { gasnete_coll_new_threaddata-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:_gasneti_calloc fun:gasnete_coll_new_threaddata } { gasnete_coll_local_handles-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:_gasneti_realloc fun:gasnete_coll_local_handles } # gasnet test_getseg allocates static data { gasnet_test_getseg-leak Memcheck:Leak fun:malloc fun:_test_malloc fun:_test_getseg } # # Known-benign memory leaks in amudp/udp-conduit # { AMUDP_SPMDStartup-SocketList-leak Memcheck:Leak # Mangled operator new[](unsigned) fun:* # Mangled SocketList::SocketList(unsigned long, bool) fun:*SocketList* fun:AMUDP_SPMDStartup_* } { AMUDP_SPMDStartup-leak Memcheck:Leak fun:malloc fun:_gasneti_malloc_inner fun:_gasneti_malloc fun:_gasneti_extern_malloc fun:AMUDP_SPMDStartup_* } gasnet-2025.8.0/other/valgrind/Makefile.in0000664000175000017500000006171515142313673020430 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/other/valgrind/Makefile.am $ # Description: Makefile for GASNet other/valgrind # Copyright 2020, The Regents of the University of California # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = other/valgrind ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(vgdir)" DATA = $(vg_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/config-aux/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 SUBDIRS = . suppression_files = gasnet.supp EXTRA_DIST = $(suppression_files) @VALGRIND_TRUE@vgdir = $(libdir)/valgrind @VALGRIND_TRUE@vg_DATA = $(suppression_files) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign other/valgrind/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign other/valgrind/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-vgDATA: $(vg_DATA) @$(NORMAL_INSTALL) @list='$(vg_DATA)'; test -n "$(vgdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(vgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(vgdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vgdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(vgdir)" || exit $$?; \ done uninstall-vgDATA: @$(NORMAL_UNINSTALL) @list='$(vg_DATA)'; test -n "$(vgdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(vgdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(vgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-vgDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-vgDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic cscopelist-am ctags ctags-am \ distclean distclean-generic distclean-tags distdir dvi dvi-am \ html html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip install-vgDATA \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-vgDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/other/amudp/0000775000175000017500000000000015142313673015651 5ustar alastairalastairgasnet-2025.8.0/other/amudp/amudp_ep.cpp0000664000175000017500000014344415142313673020161 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/amudp_ep.cpp $ * Description: AMUDP Implementations of endpoint and bundle operations * Copyright 2000, Dan Bonachea */ #include #include #include #include #include #include "amudp_internal.h" // must come after any other headers /* definitions for internal declarations */ amudp_handler_fn_t amudp_defaultreturnedmsg_handler = (amudp_handler_fn_t)&AMUDP_DefaultReturnedMsg_Handler; int AMUDP_PoliteSync = 0; uint32_t AMUDP_RequestTimeoutBackoff = AMUDP_REQUESTTIMEOUT_BACKOFF_MULTIPLIER; uint32_t AMUDP_MaxRequestTimeout_us = AMUDP_MAX_REQUESTTIMEOUT_MICROSEC; uint32_t AMUDP_InitialRequestTimeout_us = AMUDP_INITIAL_REQUESTTIMEOUT_MICROSEC; uint32_t AMUDP_SocketBuffer_initial = 0; uint32_t AMUDP_SocketBuffer_max = AMUDP_SOCKETBUFFER_MAX; AMX_IDENT(AMUDP_IdentString_Version, "$AMUDPLibraryVersion: " AMUDP_LIBRARY_VERSION_STR " $"); double AMUDP_FaultInjectionRate = 0.0; double AMUDP_FaultInjectionEnabled = 0; const amudp_stats_t AMUDP_initial_stats = /* the initial state for stats type */ { {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, 0,0,0, (amx_tick_t)-1, 0, 0, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, 0 }; /* ------------------------------------------------------------------------------------ */ extern int AMUDP_enEqual(en_t en1, en_t en2) { return enEqual(en1, en2); } /*------------------------------------------------------------------------------------ * Endpoint list handling for bundles *------------------------------------------------------------------------------------ */ int AMUDP_numBundles = 0; eb_t AMUDP_bundles[AMUDP_MAX_BUNDLES] = {0}; /* ------------------------------------------------------------------------------------ */ static int AMUDP_ContainsEndpoint(eb_t eb, ep_t ep) { int i; for (i = 0; i < eb->n_endpoints; i++) { if (eb->endpoints[i] == ep) return TRUE; } return FALSE; } /* ------------------------------------------------------------------------------------ */ static void AMUDP_InsertEndpoint(eb_t eb, ep_t ep) { AMX_assert(eb && ep); AMX_assert(eb->endpoints != NULL); if (eb->n_endpoints == eb->cursize) { /* need to grow array */ int newsize = eb->cursize * 2; eb->endpoints = (ep_t *)AMX_realloc(eb->endpoints, sizeof(ep_t)*newsize); eb->cursize = newsize; } eb->endpoints[eb->n_endpoints] = ep; eb->n_endpoints++; ep->eb = eb; } /* ------------------------------------------------------------------------------------ */ static void AMUDP_RemoveEndpoint(eb_t eb, ep_t ep) { AMX_assert(eb && ep); AMX_assert(eb->endpoints != NULL); AMX_assert(AMUDP_ContainsEndpoint(eb, ep)); { int i; for (i = 0; i < eb->n_endpoints; i++) { if (eb->endpoints[i] == ep) { eb->endpoints[i] = eb->endpoints[eb->n_endpoints-1]; eb->n_endpoints--; ep->eb = NULL; return; } } AMX_FatalErr("failure in AMUDP_RemoveEndpoint"); } } /*------------------------------------------------------------------------------------ * Endpoint buffer management *------------------------------------------------------------------------------------ */ /* internally, buffers have a header: * while allocated: pool points to the bufferpool * while freed: next pointer in free list */ #define AMUDP_BUFFERPOOL_MAGIC ((uint64_t)0x1001feedbac31001ULL) extern amudp_buf_t *AMUDP_AcquireBuffer(ep_t ep, size_t sz) { AMX_assert(ep); AMX_assert(sz >= AMUDP_MIN_BUFFER); AMX_assert(sz <= AMUDP_MAX_BUFFER); amudp_bufferpool_t *pool; if (sz <= AMUDP_MAX_SHORT_BUFFER) { pool = &ep->bufferPool[0]; } else { pool = &ep->bufferPool[1]; } size_t poolsz = pool->buffersz; AMX_assert(sz <= poolsz); AMX_assert(pool->magic == AMUDP_BUFFERPOOL_MAGIC); amudp_bufferheader_t *bh; if (pool->free) { bh = pool->free; pool->free = bh->next; } else { bh = (amudp_bufferheader_t *)AMX_malloc(sizeof(amudp_bufferheader_t) + poolsz); } bh->pool = pool; AMX_memcheck(bh); #if AMUDP_BUFFER_STATS pool->stats.alloc_curr++; pool->stats.alloc_total++; pool->stats.buffer_bytes += sz; pool->stats.alloc_peak = MAX(pool->stats.alloc_curr,pool->stats.alloc_peak); #endif amudp_buf_t *buf = (amudp_buf_t *)(bh+1); AMX_assert(!((uintptr_t)buf & 0x7)); // 8-byte alignment return buf; } /* ------------------------------------------------------------------------------------ */ extern void AMUDP_ReleaseBuffer(ep_t ep, amudp_buf_t *buf) { AMX_assert(ep); AMX_assert(buf); amudp_bufferheader_t *bh = ((amudp_bufferheader_t *)buf) - 1; AMX_memcheck(bh); amudp_bufferpool_t *pool = bh->pool; AMX_assert(pool->magic == AMUDP_BUFFERPOOL_MAGIC); bh->next = pool->free; pool->free = bh; #if AMUDP_BUFFER_STATS pool->stats.alloc_curr--; #endif } /* ------------------------------------------------------------------------------------ */ static void AMUDP_InitBuffers(ep_t ep) { for (int i=0; i < AMUDP_NUMBUFFERPOOLS; i++) { ep->bufferPool[i].free = NULL; #if AMX_DEBUG ep->bufferPool[i].magic = AMUDP_BUFFERPOOL_MAGIC; #endif } ep->bufferPool[0].buffersz = AMUDP_MAX_SHORT_BUFFER; ep->bufferPool[1].buffersz = AMUDP_MAX_BUFFER; } /* ------------------------------------------------------------------------------------ */ static void AMUDP_FreeAllBuffers(ep_t ep) { AMX_memcheck_all(); for (int i=0; i < AMUDP_NUMBUFFERPOOLS; i++) { amudp_bufferpool_t *pool = &ep->bufferPool[i]; for (amudp_bufferheader_t *bh = pool->free; bh; ) { amudp_bufferheader_t *next = bh->next; AMX_free(bh); bh = next; } #if AMUDP_BUFFER_STATS AMX_Info("Buffer pool %5i: %7.1fb avg\t%6" PRIu64 " alloc\t%4" PRIu64 " peak\t%2" PRIu64 " leaked", (int)pool->buffersz, pool->stats.buffer_bytes/(double)pool->stats.alloc_total, pool->stats.alloc_total, pool->stats.alloc_peak, pool->stats.alloc_curr ); #endif } } /*------------------------------------------------------------------------------------ * Endpoint resource management *------------------------------------------------------------------------------------ */ static uint32_t AMUDP_currentUDPInterface = INADDR_ANY; extern int AMUDP_SetUDPInterface(uint32_t IPAddress) { AMUDP_currentUDPInterface = IPAddress; return AM_OK; } /* ------------------------------------------------------------------------------------ */ #if USE_SOCKET_RECVBUFFER_GROW extern int AMUDP_growSocketBufferSize(ep_t ep, int targetsize, int szparam, const char *paramname) { #if PLATFORM_OS_LINUX // Linux internally doubles the requested setsockopt() size (to accomodate overhead) // and getsockopt() reports the *doubled* size (see `man 7 socket`) // Adjust the latter return value to ensure we use consistent non-doubled "units" everywhere. #define ADJUST_GET_SIZE(sz) ((sz)/2) #else #define ADJUST_GET_SIZE(sz) (sz) #endif int initialsize; /* original socket recv size */ GETSOCKOPT_LENGTH_T junk = sizeof(int); if (SOCK_getsockopt(ep->s, SOL_SOCKET, szparam, (char *)&initialsize, &junk) == SOCKET_ERROR) { AMX_DEBUG_WARN(("getsockopt(SOL_SOCKET, %s) on UDP socket failed: %s",paramname,strerror(errno))); initialsize = 65535; } initialsize = ADJUST_GET_SIZE(initialsize); AMX_VERBOSE_INFO(("getsockopt(SOL_SOCKET, %s) on UDP socket returned: %i", paramname, initialsize)); if (szparam == SO_RCVBUF) ep->socketRecvBufferSize = initialsize; /* ensure ep->socketRecvBufferSize is always initialized */ targetsize = MAX(initialsize, targetsize); /* never shrink buffer */ #if 0 && (PLATFORM_OS_LINUX || PLATFORM_OS_UCLINUX) /* it appears this max means nothing */ // this code requires and { int maxsize; #if PLATFORM_OS_LINUX || PLATFORM_OS_UCLINUX { /* try to determine the max we can use (reading /proc/sys/net/core/rmem_max may be more reliable) */ int rmem_max[1] = { NET_CORE_RMEM_MAX }; struct __sysctl_args args={&rmem_max,sizeof(rmem_max),&maxsize,sizeof(int),0,0}; if (_sysctl(&args)) { #if AMX_DEBUG perror("sysctl"); AMX_Err("sysctl() on UDP socket failed"); #endif } size = MIN(size, maxsize); } #endif } #endif #define SET_SIZE(request,result) do { \ int sz = request; /* prevent OS from tampering */ \ if (setsockopt(ep->s, SOL_SOCKET, szparam, (char *)&sz, sizeof(int)) == SOCKET_ERROR) \ AMX_VERBOSE_INFO(("setsockopt(SOL_SOCKET, %s, %i) on UDP socket failed: %s", paramname, request, strerror(errno))); \ junk = sizeof(int); \ if (SOCK_getsockopt(ep->s, SOL_SOCKET, szparam, (char *)&sz, &junk) == SOCKET_ERROR) { \ AMX_DEBUG_WARN(("getsockopt(SOL_SOCKET, %s) on UDP socket failed: %s", paramname, strerror(errno))); \ result = request;/* unknowable size, assume it worked */ \ } else { \ result = ADJUST_GET_SIZE(sz); \ if (szparam == SO_RCVBUF) ep->socketRecvBufferSize = result; \ } \ } while (0) // try setting it to targetsize int result; int maxedout = 0; SET_SIZE(targetsize, result); if (result >= targetsize) { // success, not known to encounter a limit } else { // we hit a kernel buffer size limit, so search for the largest value it will take maxedout = 1; int lo = result; int hi = targetsize; while (lo < hi) { int request = lo + (hi-lo+1)/2; SET_SIZE(request,result); AMX_VERBOSE_INFO(("AMUDP_growSocketBufferSize(%s) lo=%i \thi=%i \treq=%i \tres=%i", paramname,lo,hi,request,result)); if (result > lo) lo = result; // grow succeeded, kernel will accept at least this size else hi = request-1; // got less than request, limit must be less than request } } if (!AMX_SilentMode) AMX_Info("UDP %s buffer successfully set to %i bytes", paramname, result); return maxedout; // encountered kernel limit #undef ADJUST_GET_SIZE #undef SET_SIZE } #endif /* ------------------------------------------------------------------------------------ */ static int AMUDP_AllocateEndpointResource(ep_t ep) { AMX_assert(ep != NULL); /* allocate socket */ ep->s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (ep->s == INVALID_SOCKET) AMX_RETURN_ERRFR(RESOURCE, socket, strerror(errno)); ep->name.sin_family = AF_INET; ep->name.sin_port = 0; /* any port */ ep->name.sin_addr.s_addr = htonl(AMUDP_currentUDPInterface); memset(&ep->name.sin_zero, 0, sizeof(ep->name.sin_zero)); if (bind(ep->s, (struct sockaddr*)&ep->name, sizeof(struct sockaddr)) == SOCKET_ERROR) { closesocket(ep->s); AMX_RETURN_ERRFR(RESOURCE, bind, strerror(errno)); } { /* danger: this might fail on multi-homed hosts if AMUDP_currentUDPInterface was not set*/ GETSOCKNAME_LENGTH_T sz = sizeof(en_t); if (SOCK_getsockname(ep->s, (struct sockaddr*)&ep->name, &sz) == SOCKET_ERROR) { closesocket(ep->s); AMX_RETURN_ERRFR(RESOURCE, getsockname, strerror(errno)); } /* can't determine interface address */ if (ep->name.sin_addr.s_addr == INADDR_ANY) { closesocket(ep->s); AMX_RETURN_ERRFR(RESOURCE, AMUDP_AllocateEndpointResource, "AMUDP_AllocateEndpointResource failed to determine UDP endpoint interface address"); } if (ep->name.sin_port == 0) { closesocket(ep->s); AMX_RETURN_ERRFR(RESOURCE, AMUDP_AllocateEndpointResource, "AMUDP_AllocateEndpointResource failed to determine UDP endpoint interface port"); } } ep->translationsz = AMUDP_INIT_NUMTRANSLATIONS; ep->translation = (amudp_translation_t *)AMX_calloc(ep->translationsz, sizeof(amudp_translation_t)); return AM_OK; } /* ------------------------------------------------------------------------------------ */ static int AMUDP_AllocateEndpointBuffers(ep_t ep) { AMX_assert(ep != NULL); AMX_assert(ep->depth >= 1); AMX_assert(ep->P > 0 && ep->P <= AMUDP_MAX_NUMTRANSLATIONS); AMX_assert(ep->PD == (int)ep->P * ep->depth); AMX_assert(ep->recvDepth > 0 && ep->recvDepth <= AMUDP_MAX_RECVDEPTH); AMX_assert(ep->sendDepth > 0 && ep->sendDepth <= (int)MAX(1,ep->P - 1) * ep->depth); AMX_assert(sizeof(amudp_buf_t) % sizeof(int) == 0); /* assume word-addressable machine */ // setup initial socket OS buffer size { /* theoretical max required by HPAM is 2*PD*AMUDP_MAX_MSG, but that scales poorly */ int sz = AMUDP_SocketBuffer_initial; if (!sz) { sz = MIN(ep->recvDepth*AMUDP_MAX_MSG, AMUDP_SocketBuffer_max); } #if USE_SOCKET_RECVBUFFER_GROW ep->socketRecvBufferMaxedOut = AMUDP_growSocketBufferSize(ep, sz, SO_RCVBUF, "SO_RCVBUF"); #endif #if USE_SOCKET_SENDBUFFER_GROW AMUDP_growSocketBufferSize(ep, sz, SO_SNDBUF, "SO_SNDBUF"); #endif } /* instance hint pointers & compressed translation table */ ep->perProcInfo = (amudp_perproc_info_t *)AMX_calloc(ep->P, sizeof(amudp_perproc_info_t)); AMUDP_InitBuffers(ep); return TRUE; } /* ------------------------------------------------------------------------------------ */ static int AMUDP_FreeEndpointResource(ep_t ep) { AMX_assert(ep != NULL); /* close UDP port */ if (ep->translation) AMX_free(ep->translation); if (closesocket(ep->s) == SOCKET_ERROR) return FALSE; return TRUE; } /* ------------------------------------------------------------------------------------ */ static int AMUDP_FreeEndpointBuffers(ep_t ep) { AMX_assert(ep != NULL); for (amudp_node_t proc=0; proc < ep->P; proc++) { // release tx buffers in use for (int t=0; t < 2; t++) { amudp_bufdesc_t *desc = (t ? ep->perProcInfo[proc].requestDesc : ep->perProcInfo[proc].replyDesc ); if (desc) { for (int i=0; i < ep->depth; i++) { amudp_buf_t *buf = desc[i].buffer; if (buf) AMUDP_ReleaseBuffer(ep, buf); } AMX_free(desc); } } } ep->timeoutCheckPosn = NULL; ep->outstandingRequests = 0; for (amudp_buf_t *buf = ep->rxHead; buf; ) { // release rx buffers in use amudp_buf_t *tmp = buf->status.rx.next; AMUDP_ReleaseBuffer(ep, buf); buf = tmp; } ep->rxHead = NULL; ep->rxTail = NULL; ep->rxCnt = 0; AMUDP_FreeAllBuffers(ep); AMX_free(ep->perProcInfo); ep->perProcInfo = NULL; return TRUE; } /*------------------------------------------------------------------------------------ * System initialization/termination *------------------------------------------------------------------------------------ */ extern int AM_Init() { if (AMX_Init()) { /* first call */ AMX_assert(sizeof(amudp_msg_t) % 4 == 0); // may be required for correct argument alignment // We currently rely on two Linux-specific behaviors when compiled for Linux: // (1) working ioctl (IOCTL_WORKS) and (2) working AIO (USE_ASYNC_TCP_CONTROL) // At last test both of these features are broken by the kernel emulation layer in WSL1, // so we issue a warning if we were compiled for Linux but then run on WSL. // TODO: Verify behavior on WSL2 and consider re-enabling the Linux optimizations there // if we can reliably detect use of WSL2 #if PLATFORM_OS_LINUX && !PLATFORM_OS_SUBFAMILY_WSL FILE *fp = fopen("/proc/sys/kernel/osrelease", "r"); if (fp) { char line[255]; char *rc = fgets(line, sizeof(line), fp); fclose(fp); if (rc && strstr(line, "Microsoft")) { AMX_Warn("AMUDP was built for native Linux, you are running on an emulated kernel which has known differences that might cause problems. " "We do not support this model of operation, but we DO support building from source on this platform. Please rebuild from source here."); } } #endif } return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_Terminate() { int retval = AM_OK; if (amx_Initialized == 1) { /* last termination call */ for (int i = 0; i < AMUDP_numBundles; i++) { if (AM_FreeBundle(AMUDP_bundles[i]) != AM_OK) retval = AM_ERR_RESOURCE; } AMUDP_numBundles = 0; } AMX_Terminate(); AMX_RETURN(retval); } /*------------------------------------------------------------------------------------ * endpoint/bundle management *------------------------------------------------------------------------------------ */ extern int AM_AllocateBundle(int type, eb_t *endb) { eb_t eb; AMX_CHECKINIT(); if (type < 0 || type >= AM_NUM_BUNDLE_MODES) AMX_RETURN_ERR(BAD_ARG); if (type != AM_SEQ) AMX_RETURN_ERR(RESOURCE); if (AMUDP_numBundles == AMUDP_MAX_BUNDLES-1) AMX_RETURN_ERR(RESOURCE); if (!endb) AMX_RETURN_ERR(BAD_ARG); eb = (eb_t)AMX_malloc(sizeof(struct amudp_eb)); eb->endpoints = (ep_t *)AMX_malloc(AMUDP_INITIAL_NUMENDPOINTS*sizeof(ep_t)); eb->cursize = AMUDP_INITIAL_NUMENDPOINTS; eb->n_endpoints = 0; eb->event_mask = AM_NOEVENTS; AMUDP_bundles[AMUDP_numBundles++] = eb; /* keep track of all bundles */ *endb = eb; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_FreeBundle(eb_t bundle) { if (!bundle) AMX_RETURN_ERR(BAD_ARG); { int i; /* free all constituent endpoints */ for (i = 0; i < bundle->n_endpoints; i++) { int retval = AM_FreeEndpoint(bundle->endpoints[i]); if (retval != AM_OK) AMX_RETURN(retval); } AMX_assert(bundle->n_endpoints == 0); /* remove from bundle list */ for (i = 0; i < AMUDP_numBundles; i++) { if (AMUDP_bundles[i] == bundle) { AMUDP_bundles[i] = AMUDP_bundles[AMUDP_numBundles-1]; break; } } AMX_assert(i < AMUDP_numBundles); AMUDP_numBundles--; AMX_free(bundle->endpoints); AMX_free(bundle); } return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_AllocateEndpoint(eb_t bundle, ep_t *endp, en_t *endpoint_name) { ep_t ep; int retval; AMX_CHECKINIT(); if (!bundle || !endp || !endpoint_name) AMX_RETURN_ERR(BAD_ARG); ep = (ep_t)AMX_calloc(1, sizeof(struct amudp_ep)); retval = AMUDP_AllocateEndpointResource(ep); if (retval != AM_OK) { AMX_free(ep); AMX_RETURN(retval); } /* setup eb<->ep link */ AMUDP_InsertEndpoint(bundle, ep); ep->eb = bundle; { /* initialize ep data */ ep->handler[0] = amudp_defaultreturnedmsg_handler; for (int i = 1; i < AMUDP_MAX_NUMHANDLERS; i++) { ep->handler[i] = amx_unused_handler; } ep->tag = AM_NONE; ep->depth = -1; ep->stats = AMUDP_initial_stats; } *endp = ep; *endpoint_name = ep->name; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_FreeEndpoint(ep_t ea) { int retval = AM_OK; AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (!AMUDP_ContainsEndpoint(ea->eb, ea)) AMX_RETURN_ERR(RESOURCE); if (!AMUDP_FreeEndpointResource(ea)) retval = AM_ERR_RESOURCE; if (ea->depth != -1) { if (!AMUDP_FreeEndpointBuffers(ea)) retval = AM_ERR_RESOURCE; } AMUDP_RemoveEndpoint(ea->eb, ea); AMX_free(ea); AMX_RETURN(retval); } /* ------------------------------------------------------------------------------------ */ extern int AM_MoveEndpoint(ep_t ea, eb_t from_bundle, eb_t to_bundle) { AMX_CHECKINIT(); if (!ea || !from_bundle || !to_bundle) AMX_RETURN_ERR(BAD_ARG); if (!AMUDP_ContainsEndpoint(from_bundle, ea)) AMX_RETURN_ERR(RESOURCE); AMUDP_RemoveEndpoint(from_bundle, ea); AMUDP_InsertEndpoint(to_bundle, ea); return AM_OK; } /*------------------------------------------------------------------------------------ * Tag management *------------------------------------------------------------------------------------ */ extern int AM_SetTag(ep_t ea, tag_t tag) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); /* TODO: return mismatched messages to sender */ ea->tag = tag; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetTag(ep_t ea, tag_t *tag) { AMX_CHECKINIT(); if (!ea || !tag) AMX_RETURN_ERR(BAD_ARG); *tag = ea->tag; return AM_OK; } /*------------------------------------------------------------------------------------ * VM Segment management *------------------------------------------------------------------------------------ */ extern int AM_GetSeg(ep_t ea, void **addr, uintptr_t *nbytes) { AMX_CHECKINIT(); if (!ea || !addr || !nbytes) AMX_RETURN_ERR(BAD_ARG); *addr = ea->segAddr; *nbytes = ea->segLength; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_SetSeg(ep_t ea, void *addr, uintptr_t nbytes) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (nbytes > AMUDP_MAX_SEGLENGTH) AMX_RETURN_ERR(BAD_ARG); ea->segAddr = addr; ea->segLength = nbytes; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_MaxSegLength(uintptr_t* nbytes) { AMX_CHECKINIT(); if (!nbytes) AMX_RETURN_ERR(BAD_ARG); *nbytes = AMUDP_MAX_SEGLENGTH; return AM_OK; } /*------------------------------------------------------------------------------------ * Translation management *------------------------------------------------------------------------------------ */ extern int AM_Map(ep_t ea, int index, en_t name, tag_t tag) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (ea->depth != -1) AMX_RETURN_ERR(RESOURCE); /* it's an error to map after call to AM_SetExpectedResources */ if (index < 0 || (amudp_node_t)index >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (ea->translation[index].inuse) AMX_RETURN_ERR(RESOURCE); /* it's an error to re-map */ ea->translation[index].inuse = TRUE; ea->translation[index].name = name; ea->translation[index].tag = tag; ea->P++; /* track num of translations */ return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_MapAny(ep_t ea, int *index, en_t name, tag_t tag) { AMX_CHECKINIT(); if (!ea || !index) AMX_RETURN_ERR(BAD_ARG); if (ea->depth != -1) AMX_RETURN_ERR(RESOURCE); /* it's an error to map after call to AM_SetExpectedResources */ amudp_node_t i; for (i = 0; i < ea->translationsz; i++) { /* find a free entry, possibly a middle hole */ if (!ea->translation[i].inuse) break; /* use this one */ } if (i == ea->translationsz) AMX_RETURN_ERR(RESOURCE); /* none available */ int retval = AM_Map(ea, i, name, tag); if (retval == AM_OK) *index = i; return retval; } /* ------------------------------------------------------------------------------------ */ extern int AM_UnMap(ep_t ea, int index) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (ea->depth != -1) AMX_RETURN_ERR(RESOURCE); /* it's an error to unmap after call to AM_SetExpectedResources */ if (index < 0 || (amudp_node_t)index >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (!ea->translation[index].inuse) AMX_RETURN_ERR(RESOURCE); /* not mapped */ ea->translation[index].inuse = FALSE; ea->P--; /* track num of translations */ return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetNumTranslations(ep_t ea, int *pntrans) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); AMX_assert(ea->translationsz <= AMUDP_MAX_NUMTRANSLATIONS); *(pntrans) = ea->translationsz; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_SetNumTranslations(ep_t ea, int ntrans) { amudp_node_t newsz = (amudp_node_t)ntrans; AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (ntrans < 0 || newsz > AMUDP_MAX_NUMTRANSLATIONS) AMX_RETURN_ERR(RESOURCE); if (newsz < AMUDP_INIT_NUMTRANSLATIONS) /* don't shrink beyond min value */ newsz = AMUDP_INIT_NUMTRANSLATIONS; if (newsz == ea->translationsz) return AM_OK; /* no change */ if (ea->depth != -1) AMX_RETURN_ERR(RESOURCE); /* it's an error to change translationsz after call to AM_SetExpectedResources */ for (amudp_node_t i = newsz; i < ea->translationsz; i++) { if (ea->translation[i].inuse) AMX_RETURN_ERR(RESOURCE); /* it's an error to truncate away live maps */ } ea->translation = (amudp_translation_t *)AMX_realloc(ea->translation, newsz * sizeof(amudp_translation_t)); /* we may be growing or truncating the table */ if (newsz > ea->translationsz) memset(&(ea->translation[ea->translationsz]), 0, (newsz - ea->translationsz) * sizeof(amudp_translation_t)); ea->translationsz = newsz; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetTranslationInuse(ep_t ea, int i) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (i < 0 || (amudp_node_t)i >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (ea->translation && ea->translation[i].inuse) return AM_OK; /* in use */ else if (!ea->translation && (amudp_node_t)i < ea->P) return AM_OK; /* in use, after AM_SetExpectedResources */ else return AM_ERR_RESOURCE; /* don't complain here - it's a common case */ } /* ------------------------------------------------------------------------------------ */ extern int AM_GetTranslationTag(ep_t ea, int i, tag_t *tag) { AMX_CHECKINIT(); if (!ea || !tag) AMX_RETURN_ERR(BAD_ARG); if (i < 0 || (amudp_node_t)i >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (AM_GetTranslationInuse(ea,i) != AM_OK) AMX_RETURN_ERR(RESOURCE); /* not mapped */ if (ea->translation) (*tag) = ea->translation[i].tag; else (*tag) = ea->perProcInfo[i].tag; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_SetTranslationTag(ep_t ea, int index, tag_t tag) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (index < 0 || (amudp_node_t)index >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (AM_GetTranslationInuse(ea,index) != AM_OK) AMX_RETURN_ERR(RESOURCE); /* can't change tag if not mapped */ amudp_node_t id; if (ea->translation) { ea->translation[index].tag = tag; id = ea->translation[index].id; } else id = (amudp_node_t)index; if (ea->depth != -1) { /* after call to AM_SetExpectedResources we must update compressed table */ ea->perProcInfo[id].tag = tag; } return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetTranslationName(ep_t ea, int i, en_t *gan) { AMX_CHECKINIT(); if (!ea || !gan) AMX_RETURN_ERR(BAD_ARG); if (i < 0 || (amudp_node_t)i >= ea->translationsz) AMX_RETURN_ERR(BAD_ARG); if (AM_GetTranslationInuse(ea,i) != AM_OK) AMX_RETURN_ERR(RESOURCE); /* not mapped */ if (ea->translation) (*gan) = ea->translation[i].name; else (*gan) = ea->perProcInfo[i].remoteName; return AM_OK; } /* ------------------------------------------------------------------------------------ */ static void AMUDP_InitParameters(ep_t ep) { static int firsttime = 1; static int recvDepth; static int sendDepth; if (firsttime) { // only consult the environment once per process // transfer defaults are based on first endpoint // default depths enough for full-bandwidth comms with up to 4 neighbors recvDepth = 2 * ep->depth * MIN(MAX(1,ep->P-1),4); sendDepth = ep->depth * MIN(MAX(1,ep->P-1),4); char *faultRate = AMUDP_getenv_prefixed_withdefault("FAULT_RATE","0.0"); if (faultRate && (AMUDP_FaultInjectionRate = atof(faultRate)) != 0.0) { AMUDP_FaultInjectionEnabled = 1; AMX_Warn("Running with fault injection enabled. Rate = %6.2f %%", 100.0 * AMUDP_FaultInjectionRate); srand( (unsigned)time( NULL ) ); /* TODO: we should really be using a private rand num generator */ } #define ENVINT_WITH_DEFAULT(var, name, validate) do { \ char defval[80]; \ const char *valstr; \ snprintf(defval, sizeof(defval), "%u", (unsigned int)var); \ valstr = AMUDP_getenv_prefixed_withdefault(name,defval); \ if (valstr) { \ char *end = (char *)valstr; \ long val = strtol(valstr, &end, 0); \ if (end == valstr) { \ AMX_Warn(AMX_ENV_PREFIX_STR "_" name " may not be empty! Using default."); \ val = (long)var; \ } else if (sizeof(var) < 8 && \ (uint64_t)val != (uint64_t)(uint32_t)val) { \ AMX_Warn(AMX_ENV_PREFIX_STR "_" name " too large! Using default."); \ val = (long)var; \ } else var = (uint32_t)val; \ validate; \ } \ } while (0) ENVINT_WITH_DEFAULT(recvDepth, "RECVDEPTH", { if (val <= 0 || val > AMUDP_MAX_RECVDEPTH) AMX_FatalErr(AMX_ENV_PREFIX_STR "_RECVDEPTH must be in 1..%d", AMUDP_MAX_RECVDEPTH); }); ENVINT_WITH_DEFAULT(sendDepth, "SENDDEPTH", { if (!val) AMX_FatalErr(AMX_ENV_PREFIX_STR "_SENDDEPTH must be non-zero"); }); ENVINT_WITH_DEFAULT(AMUDP_MaxRequestTimeout_us, "REQUESTTIMEOUT_MAX", { if (val <= 0) AMUDP_MaxRequestTimeout_us = AMUDP_TIMEOUT_INFINITE; }); ENVINT_WITH_DEFAULT(AMUDP_InitialRequestTimeout_us, "REQUESTTIMEOUT_INITIAL", { if (val <= 0) AMUDP_InitialRequestTimeout_us = AMUDP_TIMEOUT_INFINITE; }); ENVINT_WITH_DEFAULT(AMUDP_RequestTimeoutBackoff, "REQUESTTIMEOUT_BACKOFF", { if (val <= 1) AMX_FatalErr(AMX_ENV_PREFIX_STR "_REQUESTTIMEOUT_BACKOFF must be > 1"); }); if (AMUDP_InitialRequestTimeout_us > AMUDP_MaxRequestTimeout_us) { AMX_Warn(AMX_ENV_PREFIX_STR "_REQUESTTIMEOUT_INITIAL must not exceed " AMX_ENV_PREFIX_STR "_REQUESTTIMEOUT_MAX. Raising MAX..."); AMUDP_MaxRequestTimeout_us = MAX(AMUDP_InitialRequestTimeout_us, AMUDP_InitialRequestTimeout_us*AMUDP_RequestTimeoutBackoff); } AMUDP_InitRetryCache(); ENVINT_WITH_DEFAULT(AMUDP_SocketBuffer_initial, "SOCKETBUFFER_INITIAL", { /* 0 = default */ if (val > 0x7FFFFFFF) // not currently 64-bit clean, must fit in SIGNED 32-bit AMX_FatalErr(AMX_ENV_PREFIX_STR "_SOCKETBUFFER_INITIAL too large"); }); AMUDP_SocketBuffer_max = MAX(AMUDP_SocketBuffer_initial,AMUDP_SocketBuffer_max); ENVINT_WITH_DEFAULT(AMUDP_SocketBuffer_max, "SOCKETBUFFER_MAX", { if (val > 0x7FFFFFFF) // not currently 64-bit clean, must fit in SIGNED 32-bit AMX_FatalErr(AMX_ENV_PREFIX_STR "_SOCKETBUFFER_MAX too large"); if (!val || (uint32_t)val < AMUDP_SocketBuffer_initial) AMX_FatalErr(AMX_ENV_PREFIX_STR "_SOCKETBUFFER_MAX must be >= " AMX_ENV_PREFIX_STR "_SOCKETBUFFER_INITIAL"); }); firsttime = 0; } ep->recvDepth = recvDepth; ep->sendDepth = sendDepth; int maxsendDepth = ep->depth * MAX(1,ep->P-1); if (ep->sendDepth < 0 || ep->sendDepth > maxsendDepth) // silently cap, since the max is P-dependent ep->sendDepth = maxsendDepth; if (ep->sendDepth < ep->depth) { AMX_Warn(AMX_ENV_PREFIX_STR "_SENDDEPTH may not be less than " AMX_ENV_PREFIX_STR "_NETWORKDEPTH. Raising " AMX_ENV_PREFIX_STR "_SENDDEPTH..."); ep->sendDepth = ep->depth; } } /* ------------------------------------------------------------------------------------ */ extern int AM_SetExpectedResources(ep_t ea, int n_endpoints, int n_outstanding_requests) { AMX_CHECKINIT(); if (!ea) AMX_RETURN_ERR(BAD_ARG); if (ea->depth != -1) AMX_RETURN_ERR(RESOURCE); /* it's an error to call AM_SetExpectedResources again */ /* n_endpoints ignored : P is set as we Map translations */ /*if (n_endpoints < 1 || n_endpoints >= AMUDP_MAX_NUMTRANSLATIONS) AMX_RETURN_ERR(BAD_ARG);*/ if (n_outstanding_requests < 1 || n_outstanding_requests > AMUDP_MAX_NETWORKDEPTH) AMX_RETURN_ERR(BAD_ARG); ea->depth = n_outstanding_requests; ea->PD = ea->P * ea->depth; AMUDP_InitParameters(ea); if (!AMUDP_AllocateEndpointBuffers(ea)) AMX_RETURN_ERR(RESOURCE); /* compact a copy of the translation table into our perproc info array */ { amudp_node_t procid = 0; amudp_node_t i; for (i=0; i < ea->translationsz; i++) { if (ea->translation[i].inuse) { ea->perProcInfo[procid].remoteName = ea->translation[i].name; ea->perProcInfo[procid].tag = ea->translation[i].tag; ea->translation[i].id = procid; if (enEqual(ea->perProcInfo[procid].remoteName, ea->name)) ea->idHint = procid; procid++; if (procid == ea->P) break; /* should have all of them now */ } } #if AMX_DEBUG for (amudp_node_t j=i+1; j < ea->translationsz; j++) AMX_assert(!ea->translation[j].inuse); #endif if (i+1 == ea->P) { // common case: dense translation table // improve scalability by freeing the now-redundant data structure AMX_free(ea->translation); ea->translation = NULL; } else { AMX_DEBUG_WARN(("Translation table is sparse. Memory utilization will be slightly less scalable.")); } } return AM_OK; } /*------------------------------------------------------------------------------------ * Handler management *------------------------------------------------------------------------------------ */ extern int _AM_SetHandler(ep_t ea, handler_t handler, amudp_handler_fn_t function) { AMX_CHECKINIT(); if (!ea || !function) AMX_RETURN_ERR(BAD_ARG); if (AMUDP_BADHANDLERVAL(handler)) AMX_RETURN_ERR(BAD_ARG); ea->handler[handler] = function; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int _AM_SetHandlerAny(ep_t ea, handler_t *handler, amudp_handler_fn_t function) { int i; AMX_CHECKINIT(); if (!ea || !function || !handler) AMX_RETURN_ERR(BAD_ARG); for (i = 1 ; i < AMUDP_MAX_NUMHANDLERS; i++) { if (ea->handler[i] == amx_unused_handler) { /* find unused entry */ ea->handler[i] = function; *handler = (handler_t)i; return AM_OK; } } AMX_RETURN_ERR(RESOURCE); /* all in use */ } /*------------------------------------------------------------------------------------ * Event management *------------------------------------------------------------------------------------ */ extern int AM_GetEventMask(eb_t eb, int *mask) { AMX_CHECKINIT(); AMX_CHECK_ERR((!eb),BAD_ARG); *mask = eb->event_mask; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_SetEventMask(eb_t eb, int mask) { AMX_CHECKINIT(); AMX_CHECK_ERR((!eb),BAD_ARG); AMX_CHECK_ERR((mask < 0 || ((amudp_eventmask_t)mask) >= AM_NUMEVENTMASKS),BAD_ARG); eb->event_mask = (uint8_t)mask; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_WaitSema(eb_t eb) { int retval; AMX_CHECKINIT(); AMX_CHECK_ERR((!eb),BAD_ARG); if (eb->event_mask == AM_NOEVENTS) AMX_FatalErr("it's an error to block when the mask is not set - will never return"); /* block here until a message arrives */ retval = AMUDP_Block(eb); if (retval != AM_OK) eb->event_mask = AM_NOEVENTS; /* it's not clear from the spec whether we should poll here, but it's probably safer to do so than not */ if (retval == AM_OK) retval = AM_Poll(eb); AMX_RETURN(retval); } /*------------------------------------------------------------------------------------ * Message interrogation *------------------------------------------------------------------------------------ */ extern int AM_GetSourceEndpoint(void *token, en_t *gan) { AMX_CHECKINIT(); AMX_CHECK_ERR((!token || !gan),BAD_ARG); *gan = ((amudp_buf_t *)token)->status.rx.sourceAddr; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_GetSourceId(void *token, int *srcid) { AMX_CHECKINIT(); AMX_CHECK_ERR((!token || !srcid),BAD_ARG); *srcid = (int)((amudp_buf_t *)token)->status.rx.sourceId; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetDestEndpoint(void *token, ep_t *endp) { AMX_CHECKINIT(); AMX_CHECK_ERR((!token || !endp),BAD_ARG); *endp = ((amudp_buf_t *)token)->status.rx.dest; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AM_GetMsgTag(void *token, tag_t *tagp) { AMX_CHECKINIT(); AMX_CHECK_ERR((!token || !tagp),BAD_ARG); *tagp = ((amudp_buf_t *)token)->msg.tag; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_GetTokenInfo(void *token, handler_t *handler, amudp_category_t *cat, int *is_req) { AMX_CHECKINIT(); AMX_CHECK_ERR((!token || !handler || !cat || !is_req),BAD_ARG); amudp_msg_t *msg = &((amudp_buf_t *)token)->msg; *handler = msg->handlerId; *cat = AMUDP_MSG_CATEGORY(msg); *is_req = AMUDP_MSG_ISREQUEST(msg); return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_SetHandlerCallbacks(ep_t ep, AMUDP_preHandlerCallback_t preHandlerCallback, AMUDP_postHandlerCallback_t postHandlerCallback) { AMX_CHECKINIT(); if (!ep) AMX_RETURN_ERR(BAD_ARG); ep->preHandlerCallback = preHandlerCallback; ep->postHandlerCallback = postHandlerCallback; return AM_OK; } /*------------------------------------------------------------------------------------ * Statistics API *------------------------------------------------------------------------------------ */ extern int AMUDP_GetEndpointStatistics(ep_t ep, amudp_stats_t *stats) { /* called by user to get statistics */ AMX_CHECKINIT(); if (!ep || !stats) AMX_RETURN_ERR(BAD_ARG); memcpy(stats, &ep->stats, sizeof(amudp_stats_t)); return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_ResetEndpointStatistics(ep_t ep) { AMX_CHECKINIT(); if (!ep) AMX_RETURN_ERR(BAD_ARG); ep->stats = AMUDP_initial_stats; return AM_OK; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_AggregateStatistics(amudp_stats_t *runningsum, amudp_stats_t *newvalues) { int category; AMX_CHECKINIT(); if (!runningsum || !newvalues) AMX_RETURN_ERR(BAD_ARG); for (category = 0; category < amudp_NumCategories; category++) { runningsum->RequestsSent[category] += newvalues->RequestsSent[category]; runningsum->RequestsRetransmitted[category] += newvalues->RequestsRetransmitted[category]; runningsum->RequestsReceived[category] += newvalues->RequestsReceived[category]; runningsum->RepliesSent[category] += newvalues->RepliesSent[category]; runningsum->RepliesRetransmitted[category] += newvalues->RepliesRetransmitted[category]; runningsum->RepliesSquashed[category] += newvalues->RepliesSquashed[category]; runningsum->RepliesReceived[category] += newvalues->RepliesReceived[category]; runningsum->RequestDataBytesSent[category] += newvalues->RequestDataBytesSent[category]; runningsum->ReplyDataBytesSent[category] += newvalues->ReplyDataBytesSent[category]; runningsum->RequestTotalBytesSent[category] += newvalues->RequestTotalBytesSent[category]; runningsum->ReplyTotalBytesSent[category] += newvalues->ReplyTotalBytesSent[category]; } runningsum->ReturnedMessages += newvalues->ReturnedMessages; #if AMUDP_COLLECT_LATENCY_STATS runningsum->RequestSumLatency += newvalues->RequestSumLatency; if (newvalues->RequestMinLatency < runningsum->RequestMinLatency) runningsum->RequestMinLatency = newvalues->RequestMinLatency; if (newvalues->RequestMaxLatency > runningsum->RequestMaxLatency) runningsum->RequestMaxLatency = newvalues->RequestMaxLatency; #endif runningsum->TotalBytesSent += newvalues->TotalBytesSent; return AM_OK; } /* ------------------------------------------------------------------------------------ */ static int AMUDP_StatPrecision(double val) { int prec = 3; while (val >= 10.0 && prec > 0) { val /= 10; prec -= 1; } return prec; } /* ------------------------------------------------------------------------------------ */ extern const char *AMUDP_DumpStatistics(void *_fp, amudp_stats_t *stats, int globalAnalysis) { FILE *fp = (FILE *)_fp; static char msg[4096]; uint64_t requestsSent = 0; uint64_t requestsRetransmitted = 0; uint64_t requestsReceived = 0; uint64_t repliesSent = 0; uint64_t repliesRetransmitted = 0; uint64_t repliesSquashed = 0; uint64_t repliesReceived = 0; uint64_t reqdataBytesSent = 0; uint64_t repdataBytesSent = 0; uint64_t reqTotalBytesSent = 0; uint64_t repTotalBytesSent = 0; double reqavgpayload[amudp_NumCategories]; double repavgpayload[amudp_NumCategories]; double avgpayload[amudp_NumCategories]; uint64_t reqUDPIPheaderbytes, repUDPIPheaderbytes; int category; AMX_assert(amx_Initialized); AMX_assert(stats != NULL); AMX_getCPUTicks(); /* ensure this has been called at least once, even if stats are empty */ #if !AMUDP_COLLECT_STATS snprintf(msg, sizeof(msg), "(AMUDP_COLLECT_STATS disabled)\n"); if (fp != NULL) fprintf(fp, "%s", msg); return msg; #endif for (category = 0; category < amudp_NumCategories; category++) { requestsSent += stats->RequestsSent[category]; requestsRetransmitted += stats->RequestsRetransmitted[category]; requestsReceived += stats->RequestsReceived[category]; repliesSent += stats->RepliesSent[category]; repliesRetransmitted += stats->RepliesRetransmitted[category]; repliesSquashed += stats->RepliesSquashed[category]; repliesReceived += stats->RepliesReceived[category]; reqdataBytesSent += stats->RequestDataBytesSent[category]; repdataBytesSent += stats->ReplyDataBytesSent[category]; reqTotalBytesSent += stats->RequestTotalBytesSent[category]; repTotalBytesSent += stats->ReplyTotalBytesSent[category]; if (stats->RequestsSent[category] == 0) reqavgpayload[category] = 0.0; else reqavgpayload[category] = stats->RequestDataBytesSent[category] / (double)(stats->RequestsSent[category]); if (stats->RepliesSent[category] == 0) repavgpayload[category] = 0.0; else repavgpayload[category] = stats->ReplyDataBytesSent[category] / (double)(stats->RepliesSent[category]); if (stats->RequestsSent[category] + stats->RepliesSent[category] == 0) avgpayload[category] = 0.0; else avgpayload[category] = (stats->RequestDataBytesSent[category] + stats->ReplyDataBytesSent[category]) / (double)(stats->RequestsSent[category] + stats->RepliesSent[category]); } { uint64_t dataBytesSent = reqdataBytesSent + repdataBytesSent; uint64_t packetssent = (requestsSent + requestsRetransmitted + repliesSent + repliesRetransmitted); double avgreqdata = (requestsSent > 0 ? reqdataBytesSent / (double)requestsSent : 0.0); double avgrepdata = (repliesSent > 0 ? repdataBytesSent / (double)repliesSent : 0.0); double avgdata = (packetssent > 0 ? dataBytesSent / (double)packetssent : 0.0); double avgreqpacket = (requestsSent > 0 ? ((double)(reqTotalBytesSent)) / ((double)requestsSent + requestsRetransmitted) : 0.0); double avgreppacket = (repliesSent > 0 ? ((double)(repTotalBytesSent)) / ((double)repliesSent + repliesRetransmitted) : 0.0); double avgpacket =(packetssent > 0 ? ((double)(stats->TotalBytesSent)) / ((double)packetssent) : 0.0); { int packetoverhead = (20 /* IP header */ + 8 /* UDP header*/); reqUDPIPheaderbytes = (requestsSent + requestsRetransmitted) * packetoverhead; repUDPIPheaderbytes = (repliesSent + repliesRetransmitted) * packetoverhead; avgreqpacket += packetoverhead; avgreppacket += packetoverhead; avgpacket += packetoverhead; } /* batch lines together to improve chance of output together */ (snprintf)(msg, sizeof(msg), " Requests: %8" PRIu64 " sent, %4" PRIu64 " retransmitted, %8" PRIu64 " received\n" " Replies: %8" PRIu64 " sent, %4" PRIu64 " retransmitted, %8" PRIu64 " received, %4" PRIu64 " squashed\n" " Returned messages: %8" PRIu64 "\n" " Misordered receipt: %8" PRIu64 "/%" PRIu64 "\n" #if AMUDP_COLLECT_LATENCY_STATS "Latency (request sent to reply received): \n" " min: %8i microseconds\n" " max: %8i microseconds\n" " avg: %8i microseconds\n" #endif "Message Breakdown: Requests Replies Avg data sz (Req/Rep/Both)\n" " Short (<=%5" PRIuSZ " bytes) %8" PRIu64 " %8" PRIu64 " %9.*f/%.*f/%.*f bytes\n" " Medium (<=%5" PRIuSZ " bytes) %8" PRIu64 " %8" PRIu64 " %9.*f/%.*f/%.*f bytes\n" " Long (<=%5" PRIuSZ " bytes) %8" PRIu64 " %8" PRIu64 " %9.*f/%.*f/%.*f bytes\n" " Total %9.*f/%.*f/%.*f bytes\n" "Data bytes sent: %" PRIu64 "/%" PRIu64 "/%" PRIu64 " bytes\n" "Total bytes sent: %" PRIu64 "/%" PRIu64 "/%" PRIu64 " bytes (incl. AM overhead)\n" "Bandwidth overhead: %.2f%%/%.2f%%/%.2f%%\n" "Average packet size: %.*f/%.*f/%.*f bytes (incl. AM & transport-layer overhead)\n" , requestsSent, requestsRetransmitted, requestsReceived, repliesSent, repliesRetransmitted, repliesReceived, repliesSquashed, stats->ReturnedMessages, stats->OutOfOrderRequests, stats->OutOfOrderReplies, #if AMUDP_COLLECT_LATENCY_STATS (stats->RequestMinLatency == (amx_tick_t)-1?(int)-1:(int)AMX_ticks2us(stats->RequestMinLatency)), (int)AMX_ticks2us(stats->RequestMaxLatency), (requestsSent>0?(int)(AMX_ticks2us(stats->RequestSumLatency) / requestsSent):-1), #endif /* Message breakdown */ AMUDP_MAX_SHORT*sizeof(int), stats->RequestsSent[amudp_Short], stats->RepliesSent[amudp_Short], AMUDP_StatPrecision(reqavgpayload[amudp_Short]), reqavgpayload[amudp_Short], AMUDP_StatPrecision(repavgpayload[amudp_Short]), repavgpayload[amudp_Short], AMUDP_StatPrecision(avgpayload[amudp_Short]), avgpayload[amudp_Short], AMUDP_MAX_SHORT*sizeof(int) + AMUDP_MAX_MEDIUM, stats->RequestsSent[amudp_Medium], stats->RepliesSent[amudp_Medium], AMUDP_StatPrecision(reqavgpayload[amudp_Medium]), reqavgpayload[amudp_Medium], AMUDP_StatPrecision(repavgpayload[amudp_Medium]), repavgpayload[amudp_Medium], AMUDP_StatPrecision(avgpayload[amudp_Medium]), avgpayload[amudp_Medium], AMUDP_MAX_SHORT*sizeof(int) + AMUDP_MAX_LONG, stats->RequestsSent[amudp_Long], stats->RepliesSent[amudp_Long], AMUDP_StatPrecision(reqavgpayload[amudp_Long]), reqavgpayload[amudp_Long], AMUDP_StatPrecision(repavgpayload[amudp_Long]), repavgpayload[amudp_Long], AMUDP_StatPrecision(avgpayload[amudp_Long]), avgpayload[amudp_Long], /* avg data payload */ AMUDP_StatPrecision(avgreqdata), avgreqdata, AMUDP_StatPrecision(avgrepdata), avgrepdata, AMUDP_StatPrecision(avgdata), avgdata, reqdataBytesSent, repdataBytesSent, dataBytesSent, reqTotalBytesSent, repTotalBytesSent, stats->TotalBytesSent, /* bandwidth overhead */ (reqTotalBytesSent > 0 ? 100.0*((double)(reqTotalBytesSent + reqUDPIPheaderbytes - reqdataBytesSent)) / ((double)reqTotalBytesSent + reqUDPIPheaderbytes) : 0.0), (repTotalBytesSent > 0 ? 100.0*((double)(repTotalBytesSent + repUDPIPheaderbytes - repdataBytesSent)) / ((double)repTotalBytesSent + repUDPIPheaderbytes) : 0.0), (stats->TotalBytesSent > 0 ? 100.0*((double)(stats->TotalBytesSent + reqUDPIPheaderbytes + repUDPIPheaderbytes - dataBytesSent)) / ((double)stats->TotalBytesSent + reqUDPIPheaderbytes + repUDPIPheaderbytes) : 0.0), /* avg packet size */ AMUDP_StatPrecision(avgreqpacket), avgreqpacket, AMUDP_StatPrecision(avgreppacket), avgreppacket, AMUDP_StatPrecision(avgpacket), avgpacket ); if (globalAnalysis) { int64_t reqsent = (int64_t)(requestsSent + requestsRetransmitted); int64_t reqlost = reqsent - (int64_t)requestsReceived; int64_t repsent = (int64_t)(repliesSent + repliesRetransmitted); int64_t replost = repsent - (int64_t)repliesReceived; int64_t packetslost = reqlost + replost; int64_t extra_rereq = (int64_t)requestsRetransmitted - reqlost - replost; int64_t extra_rerep = (int64_t)repliesRetransmitted - replost; int64_t extra_reboth = extra_rereq + extra_rerep; #define APPEND_PERCENT(num, denom, eol) \ if (num > 0) sprintf(msg+strlen(msg), " (%6.3f%%)%s", (100.0*(num))/(denom), eol); \ else strcat(msg, eol) sprintf(msg+strlen(msg), "Requests lost: %9" PRIi64, reqlost); APPEND_PERCENT(reqlost, reqsent, "\n"); sprintf(msg+strlen(msg), "Replies lost: %9" PRIi64, replost); APPEND_PERCENT(replost, repsent, "\n"); sprintf(msg+strlen(msg), "Total packets lost: %9" PRIi64, packetslost); APPEND_PERCENT(packetslost, packetssent, "\n"); sprintf(msg+strlen(msg), "Useless retransmits: %" PRIi64, extra_rereq); APPEND_PERCENT(extra_rereq, requestsRetransmitted, " / "); sprintf(msg+strlen(msg), "%" PRIi64, extra_rerep); APPEND_PERCENT(extra_rerep, repliesRetransmitted, " / "); sprintf(msg+strlen(msg), "%" PRIi64, extra_reboth); APPEND_PERCENT(extra_reboth, requestsRetransmitted+repliesRetransmitted, "\n"); } if (fp != NULL) fprintf(fp, "%s", msg); return msg; } } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/amudp/sockutil.h0000664000175000017500000001037415142313673017664 0ustar alastairalastair// $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/sockutil.h $ // Description: Simple sock utils // Copyright 1999, Dan Bonachea #ifndef SOCKUTIL_H #define SOCKUTIL_H #include #include "socket.h" #include "sockaddr.h" #include "exc.h" //------------------------------------------------------------------------------------- bool socklibinit(); bool socklibend(); bool isValidIP(const char* buf); bool isLittleEndian(); bool isBigEndian(); SOCKET listen_socket(unsigned short port, bool allowshared=false); // on any external interface SOCKET listen_socket(struct sockaddr* saddr, bool allowshared=false); // create a socket to listen to a specific port (throw exn on err) SOCKET accept_socket(SOCKET listener, struct sockaddr* calleraddr=0); // accept a new connection from a listener, blocking until one is available // optionally return caller's address SOCKET connect_socket(struct sockaddr* saddr); SOCKET connect_socket(char* addr); // create a socket and connect it to a remote host/port (throw exn on err) bool disable_sigpipe(SOCKET s); // disable SIGPIPE on manually-created stream sockets, if supported by the OS void recvAll(SOCKET s, void* buffer, int numbytes); // blocks until it can receive numbytes on s into buffer // (throws xSocket on close) int recvLine(SOCKET s, char* buf, int bufsiz); // block until next line (terminated by CRLF) is received // returns size with CRLF removed // may throw exception if bufsiz is too small void sendAll(SOCKET s, const void* buffer, int numbytes, bool dothrow=true); void sendAll(SOCKET s, const char* buffer, int numbytes=-1, bool dothrow=true); // blocks until it can send numbytes on s from buffer // (throws xSocket on close by default) void sendEOL(SOCKET s); // send CR LF uint32_t recv32(SOCKET s); void send32(SOCKET s, uint32_t value); // recv/send a 32-bit value with endian conversions extern bool endianconvert; // whether or not conversions should happen on recv/send uint16_t byteSwap16(uint16_t val); uint32_t byteSwap32(uint32_t val); uint64_t byteSwap64(uint64_t val); uint16_t ntoh16(uint16_t v); uint32_t ntoh32(uint32_t v); uint64_t ntoh64(uint64_t v); void ntoh16a(void *pv); void ntoh32a(void *pv); void ntoh64a(void *pv); uint16_t hton16(uint16_t v); uint32_t hton32(uint32_t v); uint64_t hton64(uint64_t v); void hton16a(void *pv); void hton32a(void *pv); void hton64a(void *pv); char recvch(SOCKET s); // get one character void waitForClose(SOCKET s); // blocks until close - throw exn if data received bool inputWaiting(SOCKET s, bool dothrow=true); // returns true if input or close conn is waiting bool waitForActivity(SOCKET s, struct timeval* tv=NULL); // block until data arrives or close posts int numBytesWaiting(SOCKET s); // returns number of bytes waiting to be received // checks if a connection has been closed bool isClosed(SOCKET s); // checks if socket s has OOB data waiting bool hasOOBdata(SOCKET s); void close_socket(SOCKET s); void closeGracefully(SOCKET s); // close a socket gracefully, blocking until everything is sent // note: does NOT throw exn, even though it closed it SockAddr getsockname(SOCKET s); SockAddr getpeername(SOCKET s); unsigned long getLocalAddress(SOCKET s); int getLocalPort(SOCKET s); void getSockPeer(SOCKET s, sockaddr_in &addr); unsigned long getRemoteAddress(SOCKET s); int getRemotePort(SOCKET s); void getSockName(SOCKET s, sockaddr_in &addr); char const *getMyHostName(); // return the local hostname SockAddr DNSLookup(const char *hostnameOrIPStr); // get the sockaddr for a hostname // don't call on a local hostname, because there may be several interfaces // and we may get the wrong one bool getIfaceAddr(SockAddr ipnet_sa, SockAddr &ret, char *subnets, size_t subnetsz); // returns true, and sets *ret, if we have a local interface on the subnet // given by ipnet_sa. Otherwise, fills in a textual list of suitable subnets. #ifdef __cplusplus extern "C" { #endif extern int myselect(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); #define select myselect extern int myrecvfrom(SOCKET s, char * buf, int len, int flags, struct sockaddr *from, int *fromlen); #ifdef __cplusplus } #endif #endif gasnet-2025.8.0/other/amudp/amudp_spmd.cpp0000664000175000017500000017772315142313673020527 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/amudp_spmd.cpp $ * Description: AMUDP Implementations of SPMD operations (bootstrapping and parallel job control) * Copyright 2000, Dan Bonachea */ #undef _PORTABLE_PLATFORM_H #include #include #include #include #if (PLATFORM_OS_LINUX || PLATFORM_OS_UCLINUX) && !defined(__USE_GNU) /* some Linuxes need this to pull in F_SETSIG */ #define __USE_GNU #include #undef __USE_GNU #else #include #endif #include // wait() extern char **environ; #include #include "sockutil.h" #include "socklist.h" #include "sig.h" #include "amudp_internal.h" // must come after any other headers #define FD_STDIN 0 #define FD_STDOUT 1 #define FD_STDERR 2 #ifndef FREEZE_WORKER #define FREEZE_WORKER 0 #endif #if AMX_DEBUG_VERBOSE #define DEBUG_WORKER(msg) do { \ if (AMX_ProcessLabel) AMX_Info("%s", msg); \ else AMX_Info("worker %i: %s", AMUDP_SPMDMYPROC, msg); \ } while (0) #define DEBUG_MASTER(msg) AMX_Info("master: %s", msg) #else #define DEBUG_WORKER(msg) ((void)0) #define DEBUG_MASTER(msg) ((void)0) #endif #define AMUDP_SPMDWORKER_ARGS "AMUDP_WORKER_ARGS" static int AMUDP_SPMDShutdown(int exitcode); /* master only */ static SOCKET AMUDP_SPMDListenSocket = INVALID_SOCKET; /* TCP bootstrapping listener */ static SOCKET AMUDP_SPMDStdListenSocket[3]; static SOCKET *AMUDP_SPMDWorkerSocket = NULL; /* table of TCP control sockets */ static en_t *AMUDP_SPMDTranslation_name = NULL; static tag_t *AMUDP_SPMDTranslation_tag = NULL; /* network byte order */ int AMUDP_SPMDSpawnRunning = FALSE; /* true while spawn is active */ int AMUDP_SPMDRedirectStdsockets; /* true if stdin/stdout/stderr should be redirected */ /* worker only */ SOCKET AMUDP_SPMDControlSocket = INVALID_SOCKET; static ep_t AMUDP_SPMDEndpoint = NULL; static eb_t AMUDP_SPMDBundle = NULL; static en_t AMUDP_SPMDName; // = {0}; volatile int AMUDP_SPMDIsActiveControlSocket = 0; static SOCKET newstd[3] = { INVALID_SOCKET, INVALID_SOCKET, INVALID_SOCKET }; static int AMUDP_SPMDMYPROC = AMUDP_PROCID_NEXT; /* -1 requests next avail procid */ static volatile int AMUDP_SPMDBarrierDone = 0; /* flag barrier as complete */ static volatile int AMUDP_SPMDGatherDone = 0; /* flag gather as complete */ static volatile int AMUDP_SPMDGatherLen = 0; static void * volatile AMUDP_SPMDGatherData = NULL; int AMUDP_SPMDwakeupOnControlActivity = 0; int AMUDP_FailoverAcksOutstanding = 0; /* master & worker */ static int AMUDP_SPMDStartupCalled = 0; static int AMUDP_SPMDNUMPROCS = -1; static char *AMUDP_SPMDMasterEnvironment = NULL; // used to pass info - always stored in network byte order // fields carefully ordered by size to avoid cross-platform struct packing differences typedef struct { uint64_t networkpid; // globally unique pid tag_t tag; // tag for this processor int32_t procid; // id for this processor int32_t numprocs; // num procs in job int32_t depth; // network depth uint32_t environtablesz; // size of environment table we're about to send uint16_t stdMaster[3]; // address of std listeners uint16_t _pad1; // ensure platform-independent table size } AMUDP_SPMDBootstrapInfo_t; /* Protocol for TCP bootstrapping/control sockets initialization: worker->master (int32) - send a forced rank, or -1 for default allocation worker->master (en_t) - send my endpoint name for init master->worker (int32 sizeof(AMUDP_SPMDBootstrapInfo_t)) master->worker (AMUDP_SPMDBootstrapInfo_t) master->worker (AMUDP_SPMDTranslation_name (variable size)) master->worker (AMUDP_SPMDTranslation_tag (variable size)) master->worker (AMUDP_SPMDMasterEnvironment (variable size)) master->worker messages "E"(int32 exitcode) - die now with this exit code "F"(int32 i)(old en_t)(new en_t) - worker i's NIC just failed over to new en_t "A"(int32 i) - (to worker i) worker acknowledged fail-over of worker i's NIC "B" - barrier complete "G"(int32 perproclen)(data) - end an AllGather, here's the result worker->master messages "E"(int32 exitcode) - exit with this code "F"(int32 i)(old en_t)(new en_t) - worker i's NIC just failed over to new en_t "A"(int32 i) - acknowledge fail-over of worker i's NIC "B" - enter barrier "G"(int32 i)(int32 perproclen)(data) - worker i begin an AllGather, here's the length and my data */ /* ------------------------------------------------------------------------------------ * misc helpers * ------------------------------------------------------------------------------------ */ static void flushStreams(const char *context) { if (!context) context = "flushStreams()"; if (fflush(NULL)) { /* passing NULL to fflush causes it to flush all open FILE streams */ perror("fflush"); AMX_FatalErr("failed to fflush(NULL) in %s", context); } if (fflush(stdout)) { perror("fflush"); AMX_FatalErr("failed to flush stdout in %s", context); } if (fflush(stderr)) { perror("fflush"); AMX_FatalErr("failed to flush stderr in %s", context); } fsync(FD_STDOUT); /* ignore errors for output is a console */ fsync(FD_STDERR); /* ignore errors for output is a console */ static int do_sync = -1; if (do_sync < 0) { /* Approximate match to GASNet's acceptance of 'Y|YES|y|yes|1' */ char *envval = AMUDP_getenv_prefixed_withdefault("FS_SYNC", "NO"); char c = envval[0]; do_sync = ((c == '1') || (c == 'y') || (c == 'Y')); } if (do_sync) { sync(); } AMX_sched_yield(); } //------------------------------------------------------------------------------------ extern char *AMUDP_enStr(en_t en, char *buf) { static char pbuf[80]; if (!buf) buf = pbuf; SockAddr tmp((sockaddr*)&en); sprintf(buf, "(%s:%i)", tmp.IPStr(), tmp.port()); return buf; } extern char *AMUDP_tagStr(tag_t tag, char *buf) { static char pbuf[80]; if (!buf) buf = pbuf; sprintf(buf, "0x%08x%08x", (int)(uint32_t)(tag >> 32), (int)(uint32_t)(tag & 0xFFFFFFFF)); return buf; } //------------------------------------------------------------------------------------ typedef struct { en_t name; SOCKET socket; } workerinfo_t; static int workerinfo_compare(const void *left_, const void *right_) { workerinfo_t *left = (workerinfo_t *)left_; workerinfo_t *right = (workerinfo_t *)right_; uint32_t lip = ntohl(left->name.sin_addr.s_addr); uint32_t rip = ntohl(right->name.sin_addr.s_addr); uint16_t lport = ntohs(left->name.sin_port); uint16_t rport = ntohs(right->name.sin_port); // compare ascending by IP then port if (lip < rip) return -1; else if (rip < lip) return 1; else if (lport < rport) return -1; else if (rport < lport) return 1; else return 0; } //------------------------------------------------------------------------------------ static void setupStdSocket(SOCKET& ls, SocketList& list, SocketList& allList) { if ((int)list.getCount() < AMUDP_SPMDNUMPROCS) { SockAddr remoteAddr; SOCKET newsock = accept_socket(ls, remoteAddr); list.insert(newsock); allList.insert(newsock); if ((int)list.getCount() == AMUDP_SPMDNUMPROCS) { // close listener close_socket(ls); allList.remove(ls); ls = INVALID_SOCKET; } } else AMX_Err("master detected some unrecognized activity on a std listener"); } //------------------------------------------------------------------------------------ static void handleStdOutput(FILE *fd, fd_set *psockset, SocketList& list, SocketList& allList, int nproc) { static size_t bufsz; static uint8_t *sbuf; static struct S_linebuf { size_t len; uint8_t *buf; } *linebuf; static size_t linebufcnt; static SOCKET *tempSockArr; #ifndef AMUDP_STD_BUFSZ #define AMUDP_STD_BUFSZ 1024 // recv buffer size, should be large enough for decent bandwidth on multi-line chunks #endif #ifndef AMUDP_MAX_LINEBUFSZ #define AMUDP_MAX_LINEBUFSZ 1024*1024 // sanity limit for environment knob #endif if (!tempSockArr) { // first call, setup data structures tempSockArr = (SOCKET *)AMX_malloc(sizeof(SOCKET)*nproc); bufsz = atoi( AMUDP_getenv_prefixed_withdefault("LINEBUFFERSZ", AMX_STRINGIFY(AMUDP_STD_BUFSZ)) ); if (bufsz == 0) { // line buffering disabled, use a static buffer bufsz = AMUDP_STD_BUFSZ; sbuf = (uint8_t *)AMX_malloc(bufsz); } else if (bufsz > AMUDP_MAX_LINEBUFSZ) { bufsz = AMUDP_MAX_LINEBUFSZ; } } int numset; if ((numset = list.getIntersection(psockset, tempSockArr, nproc))) { // we have some active std sockets for (int i=0; i < numset; i++) { SOCKET s = tempSockArr[i]; AMX_assert(FD_ISSET(s, psockset)); ssize_t rsz = SOCKET_ERROR; if (sbuf) { // static buffering rsz = recv(s, sbuf, bufsz, 0); if (rsz > 0) { // other cases handled below AMX_assert(rsz <= (ssize_t)bufsz); fwrite(sbuf, 1, rsz, fd); fflush(fd); continue; } } else { // line buffering if ((size_t)s >= linebufcnt) { // grow directory void *newdir = AMX_calloc((size_t)s+1,sizeof(struct S_linebuf)); if (linebufcnt > 0) { memcpy(newdir, linebuf, linebufcnt*sizeof(struct S_linebuf)); AMX_free(linebuf); } linebuf = (struct S_linebuf*)newdir; linebufcnt = (size_t)s+1; } struct S_linebuf * const e = &linebuf[s]; if (!e->buf) { // first use e->buf = (uint8_t *)AMX_malloc(bufsz); } AMX_assert(e->len < bufsz); rsz = recv(s, e->buf+e->len, bufsz-e->len, 0); if (rsz == 0) { // socket closed if (e->len) { // drain buffer fwrite(e->buf, 1, e->len, fd); fflush(fd); e->len = 0; } // close handled below } else if (rsz > 0) { e->len += rsz; AMX_assert(e->len <= bufsz); size_t len = e->len; uint8_t *bol = e->buf; int wrote = 0; // could use memrchr here if it ever makes it into the standard.. for (uint8_t *eol = bol+len-1; eol >= bol; eol--) { if (*eol == '\n') { size_t llen = eol-bol+1; AMX_assert(llen <= len); fwrite(bol, 1, llen, fd); wrote = 1; len -= llen; bol = eol+1; break; } } if (len == bufsz) { // full buffer with no breaks, drain it fwrite(e->buf, 1, bufsz, fd); wrote = 1; e->len = 0; } else { // save partial-line tail if (len > 0) memmove(e->buf, bol, len); e->len = len; } if (wrote) fflush(fd); continue; } } // line buffering // handle recv errors if (rsz == SOCKET_ERROR) { DEBUG_MASTER("recv error in handleStdOutput, closing."); close_socket(s); } else if (rsz == 0) { // socket closed DEBUG_MASTER("dropping a std output socket..."); close_socket(s); list.remove(s); allList.remove(s); } } } } //------------------------------------------------------------------------------------ #if USE_ASYNC_TCP_CONTROL extern "C" void AMUDP_SPMDControlSocketCallback(int sig) { AMUDP_SPMDIsActiveControlSocket = TRUE; AMX_VERBOSE_INFO(("got an AMUDP_SIGIO signal")); reghandler(AMUDP_SIGIO, AMUDP_SPMDControlSocketCallback); } #endif /* ------------------------------------------------------------------------------------ * basic inquiries * ------------------------------------------------------------------------------------ */ extern int AMUDP_SPMDNumProcs() { if (!AMUDP_SPMDStartupCalled) { AMX_Err("called AMUDP_SPMDNumProcs before AMUDP_SPMDStartup()"); return -1; } AMX_assert(AMUDP_SPMDNUMPROCS >= 1); return AMUDP_SPMDNUMPROCS; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_SPMDMyProc() { if (!AMUDP_SPMDStartupCalled) { AMX_Err("called AMUDP_SPMDMyProc before AMUDP_SPMDStartup()"); return -1; } AMX_assert(AMUDP_SPMDMYPROC >= 0); return AMUDP_SPMDMYPROC; } /* ------------------------------------------------------------------------------------ */ extern void AMUDP_SPMDSetProc(int rank) { if (AMUDP_SPMDStartupCalled) AMX_Err("called AMUDP_SPMDSetProc after AMUDP_SPMDStartup()"); if (rank < 0 || AMUDP_SPMDMYPROC != AMUDP_PROCID_NEXT) AMX_Err("AMUDP_SPMDSetProc may be called at most once before AMUDP_SPMDStartup()"); AMX_assert(rank != AMUDP_PROCID_NEXT); AMUDP_SPMDMYPROC = rank; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_SPMDIsWorker(char **argv) { if (AMUDP_SPMDStartupCalled) return 1; else { const char *env_val = getenv(AMUDP_SPMDWORKER_ARGS); return (env_val && (0 != atoi(env_val))); } } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_SPMDStartup(int *argc, char ***argv, int nproc, int networkdepth, amudp_spawnfn_t spawnfn, uint64_t *networkpid, eb_t *eb, ep_t *ep) { if (AMUDP_SPMDStartupCalled) AMX_RETURN_ERR(RESOURCE); char *linebuf = AMUDP_getenv_prefixed("LINEBUFFERSZ"); if (!linebuf || atoi(linebuf) > 0) { // ensure we line-buffer early output setvbuf(stdout, NULL, _IOLBF, BUFSIZ); setvbuf(stderr, NULL, _IOLBF, BUFSIZ); } /* we need a separate socklibinit for master and to prevent AM_Terminate from murdering all our control sockets */ if (!socklibinit()) AMX_RETURN_ERRFR(RESOURCE, AMUDP_SPMDStartup, "socklibinit() failed"); const char *env_var = getenv(AMUDP_SPMDWORKER_ARGS); const int worker_flag = env_var ? atoi(env_var) : 0; /* ------------------------------------------------------------------------------------ * I'm a master * ------------------------------------------------------------------------------------ */ if (! worker_flag) { int usingdefaultdegree = 0; uint64_t npid; if (nproc < 0 || nproc > (int)AMUDP_MAX_SPMDPROCS) AMX_RETURN_ERR(BAD_ARG); if (!argc || !argv) AMX_RETURN_ERR(BAD_ARG); #if AMX_DEBUG_VERBOSE AMX_SilentMode = 0; #else /* Approximate match to GASNet's acceptance of 'no|NO|n|N|0' */ char *envval = AMUDP_getenv_prefixed_withdefault("SPAWN_VERBOSE", "NO"); char c = envval[0]; AMX_SilentMode = ((c == '0') || (c == 'n') || (c == 'N')); #endif /* defaulting */ if (networkdepth < 0) AMX_RETURN_ERR(BAD_ARG); if (networkdepth == 0) { networkdepth = atoi( AMUDP_getenv_prefixed_withdefault("NETWORKDEPTH", AMX_STRINGIFY(AMUDP_DEFAULT_NETWORKDEPTH))); if (networkdepth <= 0) networkdepth = AMUDP_DEFAULT_NETWORKDEPTH; } if (networkdepth > AMUDP_MAX_NETWORKDEPTH) { // provide useful error message AMX_FatalErr(AMX_ENV_PREFIX_STR "_NETWORKDEPTH must be <= %d", AMUDP_MAX_NETWORKDEPTH); } if (nproc == 0) { /* default to read from args */ if (*argc > 1) nproc = atoi((*argv)[1]); if (nproc < 1) { fprintf(stderr, "AMUDP SPMD Runtime Layer v%s, Copyright 2001, Dan Bonachea\n" "This program requires you specify the parallel degree\n" "as the first argument to %s\n" , AMUDP_LIBRARY_VERSION_STR, (*argv)[0]); exit(1); AMX_RETURN_ERR(BAD_ARG); } usingdefaultdegree = 1; /* readjust params */ (*argv)[1] = (*argv)[0]; (*argv)++; (*argc)--; } AMUDP_SPMDNUMPROCS = nproc; { /* check job size */ int maxtranslations = 0; int temp = AM_MaxNumTranslations(&maxtranslations); if (temp != AM_OK) { AMX_Err("Failed to AM_MaxNumTranslations() in AMUDP_SPMDStartup"); AMX_RETURN(temp); } else if (AMUDP_SPMDNUMPROCS > maxtranslations) { AMX_Err("Too many nodes: AM_MaxNumTranslations (%d) less than number of requested nodes (%d)", maxtranslations, AMUDP_SPMDNUMPROCS); AMX_RETURN_ERR(RESOURCE); } } if (argv && !spawnfn && *argc > 1 && strlen((*argv)[1]) == 1) { for (int i=0; AMUDP_Spawnfn_Desc[i].abbrev; i++) { if (toupper((*argv)[1][0]) == toupper(AMUDP_Spawnfn_Desc[i].abbrev)) { spawnfn = AMUDP_Spawnfn_Desc[i].fnptr; break; } } if (spawnfn) { /* readjust params */ (*argv)[1] = (*argv)[0]; (*argv)++; (*argc)--; } } if (!spawnfn) { const char *spawnfn_str = AMUDP_getenv_prefixed_withdefault("SPAWNFN","S"); if (spawnfn_str) { for (int i=0; AMUDP_Spawnfn_Desc[i].abbrev; i++) { if (toupper(spawnfn_str[0]) == toupper(AMUDP_Spawnfn_Desc[i].abbrev)) { spawnfn = AMUDP_Spawnfn_Desc[i].fnptr; break; } } } } if (!spawnfn) { fprintf(stderr, "AMUDP SPMD Runtime Layer v%s, Copyright 2001, Dan Bonachea\n" "Usage: %s%s program args...\n" " = one of the following mechanisms for spawning remote workers:\n" , AMUDP_LIBRARY_VERSION_STR, (*argv)[0], (usingdefaultdegree?" ":"")); for (int i=0; AMUDP_Spawnfn_Desc[i].abbrev; i++) { fprintf(stderr, " '%c' %s\n", toupper(AMUDP_Spawnfn_Desc[i].abbrev), AMUDP_Spawnfn_Desc[i].desc); } exit(1); AMX_RETURN_ERR(BAD_ARG); } // setup bootstrap info AMUDP_SPMDBootstrapInfo_t bootstrapinfo; memset(&bootstrapinfo, 0, sizeof(bootstrapinfo)); // prevent valgrind warnings about sending uninit padding bootstrapinfo.numprocs = hton32(AMUDP_SPMDNUMPROCS); bootstrapinfo.depth = hton32(networkdepth); const char *masterHostname = getMyHostName(); if (!AMX_SilentMode) AMX_Info("master host name: %s", masterHostname); // TCP socket lists SocketList allList(AMUDP_SPMDNUMPROCS*4+10); // a list of all active sockets SocketList coordList(AMUDP_SPMDNUMPROCS); // a list of all coordination sockets SocketList stdinList(AMUDP_SPMDNUMPROCS); // a list of all stdin routing sockets SocketList stdoutList(AMUDP_SPMDNUMPROCS); // a list of all stdout routing sockets SocketList stderrList(AMUDP_SPMDNUMPROCS); // a list of all stderr routing sockets SocketList * const stdList[3] = { &stdinList, &stdoutList, &stderrList }; FILE *stdFILE[3] = { stdin, stdout, stderr }; AMUDP_SPMDWorkerSocket = (SOCKET*)AMX_malloc(AMUDP_SPMDNUMPROCS * sizeof(SOCKET)); try { // create our TCP listen ports unsigned short anyport = 0; AMUDP_SPMDListenSocket = listen_socket(anyport, false); allList.insert(AMUDP_SPMDListenSocket); for (int i=0; i <= 2; i++) { if (i == FD_STDIN) { // disable stdin forwarding, for now AMUDP_SPMDStdListenSocket[i] = INVALID_SOCKET; bootstrapinfo.stdMaster[i] = hton16(0); } else { SOCKET s = listen_socket(anyport, false); AMUDP_SPMDStdListenSocket[i] = s; allList.insert(s); bootstrapinfo.stdMaster[i] = hton16(getsockname(s).port()); } } } catch (xBase &exn) { AMX_RETURN_ERRFR(RESOURCE, AMUDP_SPMDStartup, exn.why()); } { /* flatten a snapshot of the master's environment for transmission to workers * here we assume the standard representation where a pointer to the environment * is stored in a global variable 'environ' and the environment is represented as an array * of null-terminated strings where each has the form 'key=value' and value may be empty, * and the final string pointer is a NULL pointer * we flatten this into a list of null-terminated 'key=value' strings, * terminated with a double-null */ int i; int totalEnvSize = 0; for(i = 0; environ[i]; i++) totalEnvSize += strlen(environ[i]) + 1; totalEnvSize++; AMUDP_SPMDMasterEnvironment = (char *)AMX_malloc(totalEnvSize); char *p = AMUDP_SPMDMasterEnvironment; p[0] = '\0'; for(i = 0; environ[i]; i++) { strcpy(p, environ[i]); p += strlen(p) + 1; } *p = '\0'; AMX_assert((p+1) - AMUDP_SPMDMasterEnvironment == totalEnvSize); bootstrapinfo.environtablesz = hton32(totalEnvSize); } // find the master addr SockAddr masterAddr = getsockname(AMUDP_SPMDListenSocket); const char *masterIPstr = AMUDP_getenv_prefixed_withdefault("MASTERIP", ""); if (*masterIPstr) masterAddr = SockAddr(masterIPstr, masterAddr.port()); if (masterAddr.IP() == 0) { try { /* requires master can resolve its own address */ SockAddr dnsAddr = DNSLookup(getMyHostName()); masterAddr = SockAddr(dnsAddr.IP(), masterAddr.port()); } catch (xBase &exn) { AMX_Warn("Master %s failed to resolve its own hostname: %s%s", getMyHostName(),exn.why(), (USE_NUMERIC_MASTER_ADDR?"":"\nTry setting " AMX_ENV_PREFIX_STR "_MASTERIP")); AMX_RETURN_ERRFR(RESOURCE, AMUDP_SPMDStartup, exn.why()); } } // setup NULL-terminated array of extra environment vars for worker // Currently have only one such variable, "AMUDP_WORKER_ARGS": // flag[,master,[network]] // flag: zero = this is not a worker // positive = this is a worker and value is verbosity (1 = not verbose) // master: IP or hostname of the master node (require if flag != 0) // network: value of [PREFIX]_WORKERIP if given char worker_env[1024] = AMUDP_SPMDWORKER_ARGS "="; strncat(worker_env, (AMX_SilentMode ? "1," : "2,"), sizeof(worker_env) - 1); ssize_t remain = sizeof(worker_env) - (strlen(worker_env) + 1); if (*masterIPstr) { strncat(worker_env, masterAddr.FTPStr(), remain); } else { #if USE_NUMERIC_MASTER_ADDR strncat(worker_env, masterAddr.FTPStr(), remain); #else char *tmp = worker_env + strlen(worker_env); snprintf(tmp, remain, "%s:%i", masterHostname, masterAddr.port()); #endif } remain = sizeof(worker_env) - (strlen(worker_env) + 1); strncat(worker_env, ",", remain); // append WORKERIP which it is needed before the master env is sent { char *network = AMUDP_getenv_prefixed_withdefault("WORKERIP",""); if (network && network[0]) { strncat(worker_env, network, remain-1); } } if (!remain) { // ran out of space! AMX_FatalErr("Error assembling arguments to SPMD worker threads. Exiting..."); } char *extra_env[2] = { worker_env, NULL }; { int masterpid = getpid(); uint32_t masterIP = masterAddr.IP(); npid = ((uint64_t)masterIP) << 32 | (((uint64_t)masterpid) & 0xFFFF); bootstrapinfo.networkpid = hton64(npid); if (networkpid) *networkpid = npid; } // create and initialize the translation table that we'll fill in as workers connect AMUDP_SPMDTranslation_name = (en_t*)AMX_malloc(AMUDP_SPMDNUMPROCS*sizeof(en_t)); AMUDP_SPMDTranslation_tag = (tag_t*)AMX_malloc(AMUDP_SPMDNUMPROCS*sizeof(tag_t)); for (int i=0; i < AMUDP_SPMDNUMPROCS; i++) { AMUDP_SPMDWorkerSocket[i] = INVALID_SOCKET; AMUDP_SPMDTranslation_tag[i] = hton64(npid | ((uint64_t)i) << 16); } AMUDP_SPMDRedirectStdsockets = strcmp(AMUDP_getenv_prefixed_withdefault("ROUTE_OUTPUT",(DISABLE_STDSOCKET_REDIRECT?"0":"1")),"0"); // call system-specific spawning routine AMUDP_SPMDSpawnRunning = TRUE; if (!spawnfn(AMUDP_SPMDNUMPROCS, *argc, *argv, extra_env)) AMX_FatalErr("Error spawning SPMD worker threads. Exiting..."); AMUDP_SPMDSpawnRunning = FALSE; if (!AMUDP_SPMDRedirectStdsockets) { // spawn function disabled our stdsocket redirect - signal the workers of this fact for (int i=0; i <= 2; i++) bootstrapinfo.stdMaster[i] = hton16(0); } // main communication loop for master try { int numWorkersAttached = 0; fd_set sockset; fd_set* psockset = &sockset; int numset; // helpers for coord socket SOCKET *tempSockArr = (SOCKET*)AMX_malloc(sizeof(SOCKET)*AMUDP_SPMDNUMPROCS); while (1) { pollentry: #ifdef FD_SETSIZE /* Should always be present, but just in case */ if (allList.getMaxFd() >= FD_SETSIZE) AMX_FatalErr("Open sockets exceed FD_SETSIZE=%d. Exiting...",FD_SETSIZE); #endif allList.makeFD_SET(psockset); if (select(allList.getMaxFd()+1, psockset, NULL, NULL, NULL) == -1) { // block for activity perror("select"); exit(1); } //------------------------------------------------------------------------------------ // stdin/stderr/stdout listeners - incoming connections for (int i=0; i<=2; i++) { SOCKET &s = AMUDP_SPMDStdListenSocket[i]; if (s != INVALID_SOCKET && FD_ISSET(s, psockset)) { setupStdSocket(s, *stdList[i], allList); // must re-select after accepting a connection that might alias a closed listener socket id goto pollentry; } } //------------------------------------------------------------------------------------ // stdout/err sockets - must come before possible exit to drain output handleStdOutput(stdout, psockset, stdoutList, allList, AMUDP_SPMDNUMPROCS); handleStdOutput(stderr, psockset, stderrList, allList, AMUDP_SPMDNUMPROCS); // stdin (illegal to receive anything here) if ((numset = stdinList.getIntersection(psockset, tempSockArr, AMUDP_SPMDNUMPROCS))) { for (int i=0; i < numset; i++) { SOCKET s = tempSockArr[i]; AMX_assert(FD_ISSET(s, psockset)); if (isClosed(s)) DEBUG_MASTER("dropping a stdinList socket..."); else AMX_Err("Master got illegal input on a stdin socket"); stdinList.remove(s); allList.remove(s); } } //------------------------------------------------------------------------------------ // coordination listener if (AMUDP_SPMDListenSocket != INVALID_SOCKET && FD_ISSET(AMUDP_SPMDListenSocket, psockset)) { // incoming connection on coordination socket //DEBUG_MASTER("got some activity on AMUDP_SPMDListenSocket"); if (numWorkersAttached < AMUDP_SPMDNUMPROCS) { // attach a worker SockAddr remoteAddr; SOCKET newcoord = accept_socket(AMUDP_SPMDListenSocket, remoteAddr); #if USE_COORD_KEEPALIVE { // make sure we get connection termination notification in a timely manner int val = 1; if (setsockopt(newcoord, SOL_SOCKET, SO_KEEPALIVE, (char *)&val, sizeof(int)) == SOCKET_ERROR) DEBUG_MASTER("failed to setsockopt(SO_KEEPALIVE) on coord socket"); } #endif static int forced_ranks = 0; { // receive bootstrapping info int32_t procid_nb; en_t name; // This is a worker connecting recvAll(newcoord, &procid_nb, sizeof(procid_nb)); // procid request (if any) recvAll(newcoord, &name, sizeof(name)); // worker address int32_t procid = ntoh32(procid_nb); if ( procid >= AMUDP_SPMDNUMPROCS || (procid < 0 && procid != AMUDP_PROCID_NEXT) ) { AMX_FatalErr("Invalid forced rank assignment (%i) via WORKER_RANK envvar or AMUDP_SPMDSetProc", procid); } if (numWorkersAttached == 0) forced_ranks = (procid != AMUDP_PROCID_NEXT); if ( ( procid == AMUDP_PROCID_NEXT && forced_ranks ) || ( procid != AMUDP_PROCID_NEXT && !forced_ranks ) ) { AMX_FatalErr("Non-collective use of forced rank assignments via WORKER_RANK envvar or AMUDP_SPMDSetProc"); } if (procid != AMUDP_PROCID_NEXT && AMUDP_SPMDWorkerSocket[procid] != INVALID_SOCKET) { AMX_FatalErr("Conflicting rank assignment (%i) by two or more worker processes via WORKER_RANK envvar or AMUDP_SPMDSetProc", procid); } if (procid == AMUDP_PROCID_NEXT) procid = numWorkersAttached; // provisional procid AMUDP_SPMDWorkerSocket[procid] = newcoord; AMUDP_SPMDTranslation_name[procid] = name; coordList.insert(newcoord); allList.insert(newcoord); numWorkersAttached++; } if (numWorkersAttached == AMUDP_SPMDNUMPROCS) { // all have now reported in, so we can begin computation // close listener close_socket(AMUDP_SPMDListenSocket); allList.remove(AMUDP_SPMDListenSocket); AMUDP_SPMDListenSocket = INVALID_SOCKET; // sanity check: look for conflicting networks which prevent inter-worker comms int saw_local = 0, saw_nonlocal = 0; en_t worker_subnet; bool force_output = false; for (int i=0; i < AMUDP_SPMDNUMPROCS; i++) { if (SockAddr(&AMUDP_SPMDTranslation_name[i]).is_localhost()) saw_local++; else { saw_nonlocal++; worker_subnet = AMUDP_SPMDTranslation_name[i]; } } if (saw_local && saw_nonlocal) { worker_subnet.sin_addr.s_addr &= 0x0000FFFFu; AMX_Warn("Detected that %i of %i workers are using the localhost network, " "which may prevent communication between ranks.\n" " This might indicate a DNS misconfiguration on those nodes.\n" " You may be able to workaround this by requesting a particular subnet for worker comms, " "ex: " AMX_ENV_PREFIX_STR "_WORKERIP=%s", saw_local, AMUDP_SPMDNUMPROCS, SockAddr(&worker_subnet).IPStr()); force_output = true; } if (!forced_ranks) { // sort worker entries by name (ie IP address, port) workerinfo_t *info_tmp = (workerinfo_t *)AMX_malloc(AMUDP_SPMDNUMPROCS * sizeof(workerinfo_t)); for (int i=0; i < AMUDP_SPMDNUMPROCS; i++) { info_tmp[i].name = AMUDP_SPMDTranslation_name[i]; info_tmp[i].socket = AMUDP_SPMDWorkerSocket[i]; } qsort(info_tmp, AMUDP_SPMDNUMPROCS, sizeof(workerinfo_t), &workerinfo_compare); for (int i=0; i < AMUDP_SPMDNUMPROCS; i++) { AMUDP_SPMDTranslation_name[i] = info_tmp[i].name; AMUDP_SPMDWorkerSocket[i] = info_tmp[i].socket; } AMX_free(info_tmp); } int32_t bootstrapinfosz_nb = hton32(sizeof(bootstrapinfo)); // transmit bootstrapping info for (int i=0; i < AMUDP_SPMDNUMPROCS; i++) { // fill out process-specific bootstrap info bootstrapinfo.procid = hton32(i); bootstrapinfo.tag = AMUDP_SPMDTranslation_tag[i]; // send it sendAll(AMUDP_SPMDWorkerSocket[i], &bootstrapinfosz_nb, sizeof(int32_t)); sendAll(AMUDP_SPMDWorkerSocket[i], &bootstrapinfo, sizeof(bootstrapinfo)); sendAll(AMUDP_SPMDWorkerSocket[i], AMUDP_SPMDTranslation_name, AMUDP_SPMDNUMPROCS*sizeof(en_t)); sendAll(AMUDP_SPMDWorkerSocket[i], AMUDP_SPMDTranslation_tag, AMUDP_SPMDNUMPROCS*sizeof(tag_t)); sendAll(AMUDP_SPMDWorkerSocket[i], AMUDP_SPMDMasterEnvironment, ntoh32(bootstrapinfo.environtablesz)); } if (!AMX_SilentMode || force_output) { AMX_Info("Endpoint table (nproc=%i):", AMUDP_SPMDNUMPROCS); for (int j=0; j < AMUDP_SPMDNUMPROCS; j++) { char temp1[80], temp2[80]; AMX_Info(" P#%i:\t%s\ttag: %s", j, AMUDP_enStr(AMUDP_SPMDTranslation_name[j], temp1), AMUDP_tagStr(ntoh64(AMUDP_SPMDTranslation_tag[j]), temp2)); } } } } else AMX_Err("master detected some unrecognized activity on AMUDP_SPMDListenSocket"); } //------------------------------------------------------------------------------------ // coord sockets if ((numset = coordList.getIntersection(psockset, tempSockArr, AMUDP_SPMDNUMPROCS))) { // we have some active coord sockets //DEBUG_MASTER("got some activity on coord sockets"); for (int i=0; i < numset; i++) { SOCKET s = tempSockArr[i]; AMX_assert(FD_ISSET(s, psockset)); if (isClosed(s)) { DEBUG_MASTER("dropping a coordList socket..."); coordList.remove(s); allList.remove(s); #if ABORT_JOB_ON_NODE_FAILURE int exitCode = -1; int32_t exitCode_nb = hton32(exitCode); for (int i=0; i < (int)coordList.getCount(); i++) { sendAll(coordList[i], "E"); sendAll(coordList[i], &exitCode_nb, sizeof(int32_t)); close_socket(coordList[i]); } if (!socklibend()) AMX_Err("master failed to socklibend()"); DEBUG_MASTER("Lost a worker process - job aborting..."); exit(exitCode); #endif continue; } char command; recvAll(s, &command, 1); switch(command) { case 'B': { // enter barrier static int AMUDP_SPMDBarrierCount = 0; /* number of processors that have entered barrier */ AMUDP_SPMDBarrierCount++; if (AMUDP_SPMDBarrierCount == AMUDP_SPMDNUMPROCS) { // barrier complete DEBUG_MASTER("Completed barrier"); // broadcast completion message for (int i=0; i < (int)coordList.getCount(); i++) { sendAll(coordList[i], "B"); } AMUDP_SPMDBarrierCount = 0; } break; } case 'G': { // enter gather static int AMUDP_SPMDGatherCount = 0; /* number of processors that have sent gather messages */ static int AMUDP_SPMDGatherLen = 0; static char *AMUDP_SPMDGatherBuf = NULL; int32_t len=0; int32_t len_nb=0; int32_t id=0; int32_t id_nb=0; try { recvAll(s, &id_nb, sizeof(int32_t)); recvAll(s, &len_nb, sizeof(int32_t)); } catch (xSocket& exn) { AMX_Err("got exn while reading gather len: %s", exn.why()); } id = ntoh32(id_nb); len = ntoh32(len_nb); AMX_assert(id >= 0 && id < AMUDP_SPMDNUMPROCS && len > 0); if (AMUDP_SPMDGatherCount == 0) { // first worker to report AMX_assert(AMUDP_SPMDGatherBuf == NULL && AMUDP_SPMDGatherLen == 0); AMUDP_SPMDGatherLen = len; AMUDP_SPMDGatherBuf = (char *)AMX_malloc(AMUDP_SPMDGatherLen*AMUDP_SPMDNUMPROCS); } else AMX_assert(len == AMUDP_SPMDGatherLen); try { recvAll(s, &(AMUDP_SPMDGatherBuf[AMUDP_SPMDGatherLen*id]), AMUDP_SPMDGatherLen); } catch (xSocket& exn) { AMX_Err("got exn while reading gather data: %s", exn.why()); } AMUDP_SPMDGatherCount++; if (AMUDP_SPMDGatherCount == AMUDP_SPMDNUMPROCS) { // gather complete DEBUG_MASTER("Completed gather"); hton32a(&len); // broadcast completion data for (int i=0; i < (int)coordList.getCount(); i++) { sendAll(coordList[i], "G"); sendAll(coordList[i], &len_nb, sizeof(int32_t)); sendAll(coordList[i], AMUDP_SPMDGatherBuf, AMUDP_SPMDGatherLen*AMUDP_SPMDNUMPROCS); } AMX_free(AMUDP_SPMDGatherBuf); AMUDP_SPMDGatherBuf = NULL; AMUDP_SPMDGatherCount = 0; AMUDP_SPMDGatherLen = 0; } break; } case 'E': { // exit code // get worker terminate code int32_t exitCode_nb = -1; int exitCode = -1; try { recvAll(s, &exitCode_nb, sizeof(int32_t)); } catch (xSocket& exn) { AMX_Err("got exn while reading exit code: %s", exn.why()); } exitCode = ntoh32(exitCode_nb); // tell all other workers to terminate // TODO: perhaps use an active message for this? for now, just rely on coord socket dying exitCode_nb = hton32(0); for (int i=0; i < (int)coordList.getCount(); i++) { sendAll(coordList[i], "E"); sendAll(coordList[i], &exitCode_nb, sizeof(int32_t)); #if PLATFORM_OS_DARWIN // bug4211: newer macos needs shutdown() to ensure the remote reliably sees the close closeGracefully(coordList[i]); #else close_socket(coordList[i]); #endif } /* bug 2029 - wait for any final stdout/stderr to arrive before shutdown */ uint64_t wait_iter = 0; while (stdoutList.getCount() || stderrList.getCount()) { // await final output if (!AMX_SilentMode && (!wait_iter++)) AMX_Info("Awaiting final worker outputs..."); for (int i=1; i <= 2; i++) { if (stdList[i]->getCount()) { stdList[i]->makeFD_SET(psockset); handleStdOutput(stdFILE[i], psockset, *stdList[i], allList, stdList[i]->getCount()); } } AMX_sched_yield(); } if (!AMX_SilentMode) AMX_Info("Waiting for child processes..."); int result; do { int status = 0; result = waitpid(-1, &status, 0); if (result == -1 && errno == ECHILD) break; if (!AMX_SilentMode) AMX_Info("result=%i status=%i errno=%s",result,status,strerror(errno)); } while(result != -1); if (!socklibend()) AMX_Err("master failed to socklibend()"); if (!AMX_SilentMode) AMX_Info("Exiting after AMUDP_SPMDExit(%i)...", exitCode); exit(exitCode); break; } default: AMX_Err("master got an unknown command on coord socket: %c", command); } } if (coordList.getCount() == 0) { DEBUG_MASTER("Exiting after losing all worker connections (none called AMUDP_Exit())"); exit(0); // program exit, noone called terminate } } //------------------------------------------------------------------------------------ } // loop } catch (xSocket& exn) { AMX_FatalErr("Master got an xSocket: %s", exn.why()); } catch (xBase& exn) { AMX_FatalErr("Master got an xBase: %s", exn.why()); } } /* ------------------------------------------------------------------------------------ * I'm a worker * ------------------------------------------------------------------------------------ */ else { int temp; /* propagate verbosity setting from master */ AMX_SilentMode = (worker_flag < 2); // TODO: values >2 for more verbose #if FREEZE_WORKER AMX_freezeForDebugger(); #else /* do *not* use prefixed getenv here - want an independent freeze point */ if (getenv("AMUDP_FREEZE")) AMX_freezeForDebugger(); #endif if (!eb || !ep) AMX_RETURN_ERR(BAD_ARG); if (AM_Init() != AM_OK) { AMX_Err("Failed to AM_Init() in AMUDP_SPMDStartup"); AMX_RETURN_ERRFR(RESOURCE, AMUDP_SPMDStartup, "AM_Init() failed"); } // parse special env var with our arguments char * _worker_args = AMX_strdup(env_var); char * worker_args = _worker_args; SockAddr masterAddr; { // Strip required "flag," off beginning char *endptr; (void) strtol(worker_args, &endptr, 0); if (! endptr || (',' != endptr[0])) AMX_Err("Malformed arguments '%s' to worker process", env_var); worker_args = endptr + 1; } // extract appended WORKERIP which it is needed before the master env is sent // must extract this field even without HAVE_GETIFADDRS const char *network = ""; { char *delimiter = strrchr(worker_args,','); if (delimiter != NULL) { network = delimiter+1; *delimiter = '\0'; } } char *master_localhost_warning = NULL; { // extract master's address if (strchr(worker_args,',')) { masterAddr = SockAddr(worker_args); } else { char *IPStr = (char *)AMX_malloc(strlen(worker_args)+10); strcpy(IPStr, worker_args); char *portStr = strchr(IPStr, ':'); if (!portStr) { AMX_Err("Malformed address argument passed to worker:'%s' (missing port)", worker_args); AMX_RETURN_ERR(BAD_ARG); } int masterPort = atoi(portStr+1); if (masterPort < 1 || masterPort > 65535) { AMX_Err("Malformed address argument passed to worker:'%s' (bad port=%i)", worker_args, masterPort); AMX_RETURN_ERR(BAD_ARG); } (*portStr) = '\0'; try { masterAddr = SockAddr((uint32_t)DNSLookup(IPStr).IP(), (uint16_t)masterPort); if (masterAddr.is_localhost()) { // we resolved master to 127.x.y.z localhost network, which may cause problems.. master_localhost_warning = (char *)AMX_malloc(1024); sprintf(master_localhost_warning, "worker %s resolved master hostname '%s' to the localhost network. " "You may need to set " AMX_ENV_PREFIX_STR "_MASTERIP to the master's external IP address.", getMyHostName(), IPStr); } } catch (xSocket &exn) { AMX_RETURN_ERRFR(RESOURCE, AMUDP_SPMDStartup, "worker failed DNSLookup on master host name"); } AMX_free(IPStr); } } if (AMUDP_SPMDMYPROC == AMUDP_PROCID_NEXT) { // WORKER_RANK is *deliberately* not propagated or fetched from the master environment, // because it must be set non-collectively by each worker process const char *rank_str = AMUDP_getenv_prefixed_withdefault("WORKER_RANK", AMX_STRINGIFY(AMUDP_PROCID_NEXT)); if (rank_str[0] >= 'A') { // indirect envvar load rank_str = getenv(rank_str); if (!rank_str) rank_str = AMX_STRINGIFY(AMUDP_PROCID_NEXT); } int forced_rank = atoi( rank_str ); if (forced_rank != AMUDP_PROCID_NEXT) { AMUDP_SPMDSetProc(forced_rank); } } try { if (!AMX_SilentMode) AMX_Info("worker connecting to %s:%i", masterAddr.IPStr(), masterAddr.port()); try { AMUDP_SPMDControlSocket = connect_socket(masterAddr); } catch (xSocket& exn) { // check for common failure mode if (master_localhost_warning) AMX_Warn("%s",master_localhost_warning); throw; // re-throw } AMX_free(master_localhost_warning); #if USE_COORD_KEEPALIVE { // make sure we get connection termination notification in a timely manner int val = 1; if (setsockopt(AMUDP_SPMDControlSocket, SOL_SOCKET, SO_KEEPALIVE, (char *)&val, sizeof(int)) == SOCKET_ERROR) DEBUG_MASTER("failed to setsockopt(SO_KEEPALIVE) on coord socket"); } #endif /* here we assume the interface used to contact the master is the same one to be used for UDP endpoints */ SockAddr myinterface = getsockname(AMUDP_SPMDControlSocket); if (network && network[0]) { #if HAVE_GETIFADDRS // allow user to override our same-interface assumption SockAddr networkaddr(network, 0); char subnets[1024]; if (! getIfaceAddr(networkaddr, myinterface, subnets, sizeof(subnets))) { AMX_Err("Failed to find interface on requested subnet %s. Available subnets: %s", network, subnets); AMX_RETURN(AM_ERR_RESOURCE); } #else AMX_Warn("WORKERIP set in the environment, but your platform lacks the required getifaddrs() support. Ignoring WORKERIP."); #endif } if (!AMX_SilentMode) AMX_Info("worker using IP %s", myinterface.IPStr()); AMUDP_SetUDPInterface(myinterface.IP()); AMX_free(_worker_args); /* create endpoint and get name */ temp = AM_AllocateBundle(AM_SEQ, &AMUDP_SPMDBundle); if (temp != AM_OK) { AMX_Err("Failed to create bundle in AMUDP_SPMDStartup"); AMX_RETURN(temp); } temp = AM_AllocateEndpoint(AMUDP_SPMDBundle, &AMUDP_SPMDEndpoint, &AMUDP_SPMDName); if (temp != AM_OK) { AMX_Err("Failed to create endpoint in AMUDP_SPMDStartup"); AMX_RETURN(temp); } // send our procid and endpoint name to the master int32_t procid_nb = hton32(AMUDP_SPMDMYPROC); sendAll(AMUDP_SPMDControlSocket, &procid_nb, sizeof(procid_nb)); sendAll(AMUDP_SPMDControlSocket, &AMUDP_SPMDName, sizeof(AMUDP_SPMDName)); // get information from master // get the bootstrap info and translation table AMUDP_SPMDBootstrapInfo_t bootstrapinfo; int32_t bootstrapinfosz_nb; recvAll(AMUDP_SPMDControlSocket, &bootstrapinfosz_nb, sizeof(int32_t)); int32_t bootstrapinfosz = ntoh32(bootstrapinfosz_nb); AMX_assert(bootstrapinfosz == sizeof(AMUDP_SPMDBootstrapInfo_t)); recvAll(AMUDP_SPMDControlSocket, &bootstrapinfo, sizeof(AMUDP_SPMDBootstrapInfo_t)); // unpack the bootstrapping info AMUDP_SPMDNUMPROCS = ntoh32(bootstrapinfo.numprocs); AMUDP_SPMDMYPROC = ntoh32(bootstrapinfo.procid); if (networkpid) *networkpid = ntoh64(bootstrapinfo.networkpid); // sanity checking on bootstrap info AMX_assert(AMUDP_SPMDNUMPROCS > 0 && AMUDP_SPMDNUMPROCS < (int)AMUDP_MAX_SPMDPROCS); AMX_assert(AMUDP_SPMDMYPROC >= 0 && AMUDP_SPMDMYPROC < (int)AMUDP_SPMDNUMPROCS); #if !DISABLE_STDSOCKET_REDIRECT for (int fd=0; fd <= 2; fd++) { if (bootstrapinfo.stdMaster[fd]) { // perform stdin/out/err redirection newstd[fd] = connect_socket(SockAddr(masterAddr.IP(),ntoh16(bootstrapinfo.stdMaster[fd]))); #if 0 // disable buffering setvbuf(stdFILE[fd], NULL, _IONBF, 0); #endif if (dup2(newstd[fd], fd) < 0) { // redirect std FD to socket perror("dup2(std)"); _exit(1); } } } #endif // retrieve translation table en_t *tempTranslation_name = (en_t *)AMX_malloc(AMUDP_SPMDNUMPROCS*sizeof(en_t)); tag_t *tempTranslation_tag = (tag_t *)AMX_malloc(AMUDP_SPMDNUMPROCS*sizeof(tag_t)); AMX_assert(tempTranslation_name && tempTranslation_tag); recvAll(AMUDP_SPMDControlSocket, tempTranslation_name, AMUDP_SPMDNUMPROCS*sizeof(en_t)); recvAll(AMUDP_SPMDControlSocket, tempTranslation_tag, AMUDP_SPMDNUMPROCS*sizeof(tag_t)); AMX_assert(ntoh64(tempTranslation_tag[AMUDP_SPMDMYPROC]) == ntoh64(bootstrapinfo.tag)); AMX_assert(enEqual(tempTranslation_name[AMUDP_SPMDMYPROC], AMUDP_SPMDName)); // setup translation table temp = AM_SetNumTranslations(AMUDP_SPMDEndpoint, AMUDP_SPMDNUMPROCS); if (temp != AM_OK) { AMX_Err("Failed to AM_SetNumTranslations() in AMUDP_SPMDStartup"); AMX_RETURN(temp); } for (int i = 0; i < AMUDP_SPMDNUMPROCS; i++) { temp = AM_Map(AMUDP_SPMDEndpoint, i, tempTranslation_name[i], ntoh64(tempTranslation_tag[i])); if (temp != AM_OK) { AMX_Err("Failed to AM_Map() in AMUDP_SPMDStartup"); AMX_RETURN(temp); } } if (!AMX_ProcessLabel) { static char label[80]; snprintf(label,sizeof(label),"Node %i",AMUDP_SPMDMYPROC); AMX_ProcessLabel = label; } AMX_free(tempTranslation_name); tempTranslation_name = NULL; AMX_free(tempTranslation_tag); tempTranslation_tag = NULL; // receive snapshot of master environment int environtablesz = ntoh32(bootstrapinfo.environtablesz); char *tempEnvironment = (char *)AMX_malloc(environtablesz); AMX_assert(tempEnvironment != NULL); recvAll(AMUDP_SPMDControlSocket, tempEnvironment, environtablesz); AMUDP_SPMDMasterEnvironment = tempEnvironment; /* allocate network buffers */ networkdepth = ntoh32(bootstrapinfo.depth); temp = AM_SetExpectedResources(AMUDP_SPMDEndpoint, AMUDP_SPMDNUMPROCS, networkdepth); if (temp != AM_OK) { AMX_Err("Failed to AM_SetExpectedResources() in AMUDP_SPMDStartup"); AMX_RETURN(temp); } // set tag temp = AM_SetTag(AMUDP_SPMDEndpoint, ntoh64(bootstrapinfo.tag)); if (temp != AM_OK) { AMX_Err("Failed to AM_SetTag() in AMUDP_SPMDStartup"); AMX_RETURN(temp); } } catch (xSocket& exn) { AMX_FatalErr("Got an xSocket while spawning worker process: %s", exn.why()); } *eb = AMUDP_SPMDBundle; *ep = AMUDP_SPMDEndpoint; AMUDP_SPMDStartupCalled = 1; /* Ensure that any children we fork() won't appear to be workers */ #if 1 unsetenv(AMUDP_SPMDWORKER_ARGS); #else putenv((char*)AMUDP_SPMDWORKER_ARGS "=0"); #endif #if USE_ASYNC_TCP_CONTROL // enable async notification reghandler(AMUDP_SIGIO, AMUDP_SPMDControlSocketCallback); if (fcntl(AMUDP_SPMDControlSocket, F_SETOWN, getpid())) { perror("fcntl(F_SETOWN, getpid())"); AMX_FatalErr("Failed to fcntl(F_SETOWN, getpid()) on TCP control socket - try disabling USE_ASYNC_TCP_CONTROL"); } if (fcntl(AMUDP_SPMDControlSocket, F_SETSIG, AMUDP_SIGIO)) { perror("fcntl(F_SETSIG)"); AMX_FatalErr("Failed to fcntl(F_SETSIG, AMUDP_SIGIO) on TCP control socket - try disabling USE_ASYNC_TCP_CONTROL"); } if (fcntl(AMUDP_SPMDControlSocket, F_SETFL, O_ASYNC|O_NONBLOCK)) { perror("fcntl(F_SETFL, O_ASYNC|O_NONBLOCK)"); AMX_FatalErr("Failed to fcntl(F_SETFL, O_ASYNC|O_NONBLOCK) on TCP control socket - try disabling USE_ASYNC_TCP_CONTROL"); } #endif flushStreams("AMUDP_SPMDStartup"); // to get ENV FS_SYNC if (!AMX_SilentMode) { char temp[80]; tag_t tag = 0; AM_GetTag(AMUDP_SPMDEndpoint, &tag); AMX_Info("Worker %i/%i starting (tag=%s)...", AMUDP_SPMDMyProc(), AMUDP_SPMDNumProcs(), AMUDP_tagStr(tag, temp)); } return AM_OK; } /* ------------------------------------------------------------------------------------ */ AMX_FatalErr("never reach here"); return AM_OK; } /* ------------------------------------------------------------------------------------ * worker control handler * ------------------------------------------------------------------------------------ */ // called by worker to handle traffic on control socket // sets controlMessagesServiced to indicate how many message serviced extern int AMUDP_SPMDHandleControlTraffic(int *controlMessagesServiced) { if (AMUDP_SPMDControlSocket == INVALID_SOCKET) return AM_OK; // not running in SPMD mode #if USE_ASYNC_TCP_CONTROL ASYNC_CHECK(1); if_pt (!AMUDP_SPMDIsActiveControlSocket) return AM_OK; // nothing to do ASYNC_TCP_DISABLE(); AMUDP_SPMDIsActiveControlSocket = FALSE; #endif if (controlMessagesServiced) *controlMessagesServiced = 0; while (1) { // service everything waiting if_pt (!inputWaiting(AMUDP_SPMDControlSocket,false)) { ASYNC_TCP_ENABLE(); return AM_OK; // nothing more to do } try { SOCKET s = AMUDP_SPMDControlSocket; if (isClosed(s)) { DEBUG_WORKER("master control socket slammed shut. Exiting..."); AMUDP_SPMDShutdown(1); } // there's something waiting on the control socket for us - grab it char command; recvAll(s, &command, 1); switch(command) { case 'B': { // barrier complete AMX_assert(!AMUDP_SPMDBarrierDone); AMUDP_SPMDBarrierDone = 1; // flag completion break; } case 'G': { // gather complete AMX_assert(!AMUDP_SPMDGatherDone && AMUDP_SPMDGatherLen > 0 && AMUDP_SPMDGatherData != NULL); try { int32_t len_nb = -1; recvAll(s, &len_nb, sizeof(int32_t)); int32_t len = ntoh32(len_nb); AMX_assert(len == AMUDP_SPMDGatherLen); recvAll(s, AMUDP_SPMDGatherData, AMUDP_SPMDGatherLen*AMUDP_SPMDNUMPROCS); } catch (xSocket& exn) { AMX_FatalErr("got exn while reading gather data: %s", exn.why()); } AMUDP_SPMDGatherDone = 1; // flag completion break; } case 'E': { // exit code // get worker terminate code int32_t exitCode_nb = -1; int exitCode = -1; try { recvAll(s, &exitCode_nb, sizeof(int32_t)); exitCode = ntoh32(exitCode_nb); } catch (xSocket& exn) { AMX_Err("got exn while reading exit code: %s", exn.why()); } if (!AMX_SilentMode) AMX_Info("Exiting after exit signal from master (%i)...", exitCode); AMUDP_SPMDShutdown(exitCode); break; } default: AMX_FatalErr("worker got an unknown command on coord socket: %c", command); } } catch (xSocket& exn) { AMX_Err("Worker got an xSocket: %s. Exiting...", exn.why()); AMUDP_SPMDShutdown(1); } catch (xBase& exn) { AMX_Err("Worker got an xBase: %s. Exiting...", exn.why()); AMUDP_SPMDShutdown(1); } if (controlMessagesServiced) (*controlMessagesServiced)++; } } /* ------------------------------------------------------------------------------------ * process termination * ------------------------------------------------------------------------------------ */ static amudp_exitcallback_t AMUDP_SPMDExitCallback = NULL; extern int AMUDP_SPMDSetExitCallback(amudp_exitcallback_t fp) { AMUDP_SPMDExitCallback = fp; return AM_OK; } extern "C" { void (*AMUDP_SPMDkillmyprocess)(int) = &_exit; } /* shutdown this process */ static int AMUDP_SPMDShutdown(int exitcode) { ASYNC_TCP_DISABLE_IGNOREERR(); /* (bug 765) prevent race where master has already reset async control socket */ /* this function is not re-entrant - if someone tries, something is seriously wrong */ { static int shutdownInProgress = FALSE; if (shutdownInProgress) AMX_FatalErr("recursive failure in AMUDP_SPMDShutdown"); shutdownInProgress = TRUE; } flushStreams("AMUDP_SPMDShutdown"); if (AMUDP_SPMDExitCallback) (*AMUDP_SPMDExitCallback)(exitcode); /* important to make this call to release resources */ if (AM_Terminate() != AM_OK) AMX_Err("failed to AM_Terminate() in AMUDP_SPMDExit()"); flushStreams("AMUDP_SPMDShutdown"); if (fclose(stdin)) AMX_VERBOSE_INFO(("failed to fclose stdin in AMUDP_SPMDExit(): %s(%i)",strerror(errno),errno)); if (fclose(stdout)) AMX_VERBOSE_INFO(("failed to fclose stdout in AMUDP_SPMDExit(): %s(%i)",strerror(errno),errno)); if (fclose(stderr)) AMX_VERBOSE_INFO(("failed to fclose stderr in AMUDP_SPMDExit(): %s(%i)",strerror(errno),errno)); /* use normal shutdown and closesocket to ignore errors */ for (int i=0; i <= 2; i++) { SOCKET s = newstd[i]; if (s != INVALID_SOCKET) { shutdown(s, SHUT_RDWR); closesocket(s); } } AMX_sched_yield(); if (AMUDP_SPMDControlSocket != INVALID_SOCKET) { closesocket(AMUDP_SPMDControlSocket); } if (!socklibend()) AMX_Err("worker failed to socklibend()"); AMUDP_SPMDStartupCalled = 0; DEBUG_WORKER("exiting.."); AMUDP_SPMDkillmyprocess(exitcode); AMX_FatalErr("AMUDP_SPMDkillmyprocess failed"); return AM_OK; } extern int AMUDP_SPMDExit(int exitcode) { DEBUG_WORKER("AMUDP_SPMDExit"); if (!AMUDP_SPMDStartupCalled) AMX_RETURN_ERR(NOT_INIT); ASYNC_TCP_DISABLE_IGNOREERR(); /* (bug 765) prevent race where master has already reset async control socket */ /* this function is not re-entrant - if someone tries, something is seriously wrong */ { static int exitInProgress = FALSE; if (exitInProgress) AMX_FatalErr("recursive failure in AMUDP_SPMDExit"); exitInProgress = TRUE; } flushStreams("AMUDP_SPMDExit"); AMX_sched_yield(); /* notify master we're exiting */ // We disable exceptions on the following sendALL calls because the C++ // spec warns that exceptions may not be usable in signal handlers, and // GASNet calls here when handling a fatal or termination signal. /* try */ { int exitcode_nb = hton32(exitcode); sendAll(AMUDP_SPMDControlSocket, "E", -1, false); sendAll(AMUDP_SPMDControlSocket, &exitcode_nb, sizeof(int32_t), false); while (1) { // swallow everything and wait for master to close char temp; int retval = recv(AMUDP_SPMDControlSocket, &temp, 1, 0); if (retval == 0 || retval == SOCKET_ERROR) break; } } /* catch (xBase& ) { } */ // ignore errors that may happen on conn reset AMUDP_SPMDStartupCalled = 0; DEBUG_WORKER("AMUDP_SPMDShutdown.."); /* exit this proc gracefully */ AMUDP_SPMDShutdown(0); AMX_FatalErr("AMUDP_SPMDShutdown failed"); return AM_OK; } /* ------------------------------------------------------------------------------------ * poll-wait for a flag to become non-zero as a result of a control message * ------------------------------------------------------------------------------------ */ static void AMUDP_SPMDWaitForControl(volatile int *done) { #if USE_BLOCKING_SPMD_BARRIER { int oldmask; AM_GetEventMask(AMUDP_SPMDBundle, &oldmask); // wait for completion AM_Poll(AMUDP_SPMDBundle); while (!*done) { AM_SetEventMask(AMUDP_SPMDBundle, AM_NOTEMPTY); AMUDP_SPMDwakeupOnControlActivity = 1; AM_WaitSema(AMUDP_SPMDBundle); AMUDP_SPMDwakeupOnControlActivity = 0; AM_Poll(AMUDP_SPMDBundle); } AM_SetEventMask(AMUDP_SPMDBundle, oldmask); } #else { uint32_t timeoutusec = 100; AM_Poll(AMUDP_SPMDBundle); while (!*done) { AMX_usleep(timeoutusec); AM_Poll(AMUDP_SPMDBundle); if (timeoutusec < 10000) timeoutusec *= 2; } } #endif } /* ------------------------------------------------------------------------------------ * barrier * ------------------------------------------------------------------------------------ */ extern int AMUDP_SPMDBarrier() { if (!AMUDP_SPMDStartupCalled) { AMX_Err("called AMUDP_SPMDBarrier before AMUDP_SPMDStartup()"); AMX_RETURN_ERR(NOT_INIT); } flushStreams("AMUDP_SPMDBarrier"); AMX_assert(AMUDP_SPMDBarrierDone == 0); ASYNC_TCP_DISABLE(); sendAll(AMUDP_SPMDControlSocket, "B"); ASYNC_TCP_ENABLE(); AMUDP_SPMDWaitForControl(&AMUDP_SPMDBarrierDone); AMUDP_SPMDBarrierDone = 0; DEBUG_WORKER("Leaving barrier"); return AM_OK; } /* ------------------------------------------------------------------------------------ * AMUDP_SPMDAllGather: gather len bytes from source buf on each node, concatenate them and write * them into the dest buffer (which must have length len*numnodes) in rank order * ------------------------------------------------------------------------------------ */ extern int AMUDP_SPMDAllGather(void *source, void *dest, size_t len) { if (!AMUDP_SPMDStartupCalled) { AMX_Err("called AMUDP_SPMDAllGather before AMUDP_SPMDStartup()"); AMX_RETURN_ERR(NOT_INIT); } if (source == NULL) AMX_RETURN_ERR(BAD_ARG); if (dest == NULL) AMX_RETURN_ERR(BAD_ARG); if (len <= 0) AMX_RETURN_ERR(BAD_ARG); AMX_assert(AMUDP_SPMDGatherDone == 0); AMUDP_SPMDGatherData = dest; AMUDP_SPMDGatherLen = len; int32_t myid_nb = hton32(AMUDP_SPMDMYPROC); int32_t mylen_nb = hton32(len); ASYNC_TCP_DISABLE(); sendAll(AMUDP_SPMDControlSocket, "G"); sendAll(AMUDP_SPMDControlSocket, &myid_nb, sizeof(int)); sendAll(AMUDP_SPMDControlSocket, &mylen_nb, sizeof(int)); sendAll(AMUDP_SPMDControlSocket, source, len); ASYNC_TCP_ENABLE(); AMUDP_SPMDWaitForControl(&AMUDP_SPMDGatherDone); AMUDP_SPMDGatherDone = 0; DEBUG_WORKER("Leaving gather"); return AM_OK; } /* ------------------------------------------------------------------------------------ * global getenv() * ------------------------------------------------------------------------------------ */ extern const char* AMUDP_SPMDgetenvMaster(const char *keyname) { if (!AMUDP_SPMDMasterEnvironment) { AMX_Err("called AMUDP_SPMDgetenvMaster before AMUDP_SPMDStartup()"); return NULL; } char *p = AMUDP_SPMDMasterEnvironment; if (!keyname) return NULL; int keylen = strlen(keyname); while (*p) { if (!strncmp(keyname, p, keylen) && p[keylen] == '=') { return p + keylen + 1; } p += strlen(p) + 1; } return NULL; // not found } extern const char *AMUDP_check_env_prefix(const char* prefix) { if (!AMUDP_SPMDMasterEnvironment) { AMX_Err("called AMUDP_env_prefix before AMUDP_SPMDStartup()"); return NULL; } char *p = AMUDP_SPMDMasterEnvironment; if (!prefix) return NULL; int len = strlen(prefix); while (*p) { if (!strncmp(prefix, p, len)) return p; p += strlen(p) + 1; } return NULL; // not found } extern char *AMUDP_getenv_prefixed(const char *basekey) { char key[3][255]; const char *val[3]; int winner = -1; char *(*getfn)(const char *) = NULL; if (AMUDP_SPMDMasterEnvironment) getfn = (char *(*)(const char *))AMUDP_SPMDgetenvMaster; else getfn = (char *(*)(const char *))getenv; if (basekey == NULL || !*basekey) return NULL; sprintf(key[0], "%s_%s", AMX_ENV_PREFIX_STR, basekey); val[0] = getfn(key[0]); sprintf(key[1], "%s_%s", "AMUDP", basekey); val[1] = getfn(key[1]); strcpy(key[2], basekey); val[2] = getfn(key[2]); for (int i=0; i < 3; i++) { if (val[i] != NULL) { if (winner == -1) winner = i; else if (strcmp(val[winner], val[i])) { AMX_Warn("Both $%s and $%s are set, to different values. Using the former.", key[winner], key[i]); } } } if (winner == -1) return NULL; else return (char *)val[winner]; } extern char *AMUDP_getenv_prefixed_withdefault(const char *basekey, const char *defaultval) { static int firsttime = 1; static int verboseenv = 0; char * retval = NULL; int usingdefault = 0; const char *dflt = ""; if (firsttime) { #if AMX_DEBUG_VERBOSE verboseenv = 1; #else const char *v = AMUDP_getenv_prefixed("VERBOSEENV"); if (!v) verboseenv = 0; // default off else { char s[10]; strncpy(s, v, sizeof(s)-1); s[sizeof(s)-1] = '\0'; for (size_t i = 0; i < sizeof(s) && s[i]; i++) s[i] = toupper(s[i]); if (!strcmp(s, "N") || !strcmp(s, "NO") || !strcmp(s, "0")) verboseenv = 0; else verboseenv = 1; // for legacy reasons accept anything else including empty as yes } #endif firsttime = 0; } AMX_assert(defaultval != NULL); retval = AMUDP_getenv_prefixed(basekey); if (retval == NULL) { retval = (char *)defaultval; dflt = " (default)"; usingdefault = 1; } #ifdef gasnett_envstr_display { char displaykey[255]; sprintf(displaykey,"%s_%s",AMX_ENV_PREFIX_STR,basekey); gasnett_envstr_display(displaykey, retval, usingdefault); } #else if (verboseenv && (AMUDP_SPMDMYPROC == -1 || AMUDP_SPMDMYPROC == 0)) { const char *displayval = retval; char displaykey[255]; int width; if (strlen(retval) == 0) displayval = "*empty*"; AMX_assert(strlen(basekey)+strlen(AMX_ENV_PREFIX_STR) < 200); sprintf(displaykey,"%s_%s",AMX_ENV_PREFIX_STR,basekey); width = MAX(10,55 - strlen(displaykey) - strlen(displayval)); fprintf(stderr, "ENV parameter: %s = %s%*s\n", displaykey, displayval, width, dflt); fflush(stderr); } #endif return retval; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/amudp/amudprun.c0000664000175000017500000001044115142313673017650 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/amudprun.c $ * Description: Stand-alone AMUDP job launcher * Copyright 2006, Dan Bonachea */ #include #include #include #include #include #include #ifdef HAVE_GASNET_TOOLS #define GASNETT_LITE_MODE /* preserves AMUDP's threading neutrality */ #include /* for ctype.h wrappers */ #else #include #endif #include #include extern char *AMUDP_getenv_prefixed(const char *); // for probing settings #ifndef AMX_ENV_PREFIX_STR #ifdef AMX_ENV_PREFIX #define AMX_ENV_PREFIX_STR AMX_STRINGIFY(AMX_ENV_PREFIX) #else #define AMX_ENV_PREFIX_STR "AMUDP_" #endif #endif static const char *argvzero; static void Usage(const char *msg) { int i; if (msg) fprintf(stderr, "ERROR: %s\n\n", msg); fprintf(stderr, "%s, version %s\n" "Usage: %s [] [...]\n\n" " -np N Spawn N processes (may also be spelled -N or -n)\n" " -spawn F Use spawning function F\n" " -depth D Use network depth D\n" " -v Enable verbose output, repeated use increases verbosity\n" " -h Show this help\n\n" , argvzero, AMUDP_LIBRARY_VERSION_STR, argvzero); fprintf (stderr, "Available spawn functions:\n"); for (i=0; AMUDP_Spawnfn_Desc[i].abbrev; i++) { fprintf(stderr, " '%c' %s\n", toupper(AMUDP_Spawnfn_Desc[i].abbrev), AMUDP_Spawnfn_Desc[i].desc); } fprintf(stderr, "\n"); exit(1); } static amudp_spawnfn_t spawnfn = NULL; static char spawnfn_abbr = '-'; static const char *spawnfn_str = ""; static void set_spawnfn(const char *str) { int i; spawnfn_abbr = toupper(str[0]); if (str[1]) Usage("Invalid spawn function"); for (i=0; AMUDP_Spawnfn_Desc[i].abbrev; i++) { if (spawnfn_abbr == toupper(AMUDP_Spawnfn_Desc[i].abbrev)) { spawnfn = AMUDP_Spawnfn_Desc[i].fnptr; spawnfn_str = AMUDP_Spawnfn_Desc[i].desc; break; } } if (!spawnfn) Usage("Unknown spawn value for -spawn"); } int main(int argc, char **argv) { int verbose = 0; int nproc = 0; int networkdepth = 0; if (AMUDP_SPMDIsWorker(argv)) Usage("launcher cannot be invoked as target program"); argvzero = argv[0]; argv++; argc--; /* strip launcher name */ while (argc && argv[0][0] == '-') { const char *arg = argv[0]; if (arg[1] == '-') arg++; if (!strcmp(arg,"-v")) { verbose++; } else if (!strcmp(arg,"-np") || !strcmp(arg,"-n") || !strcmp(arg,"-N")) { if (argc < 2) Usage("Missing process count for -np"); argv++; argc--; nproc = atoi(argv[0]); if (nproc < 1) Usage("Bad process count for -np"); } else if (!strcmp(arg,"-depth")) { if (argc < 2) Usage("Missing depth value for -depth"); argv++; argc--; networkdepth = atoi(argv[0]); if (networkdepth < 1) Usage("Bad depth value for -depth"); } else if (!strcmp(arg,"-spawn")) { if (argc < 2) Usage("Missing spawn value for -spawn"); argv++; argc--; set_spawnfn(argv[0]); } else if (!strcmp(arg,"-h") || !strcmp(arg,"-H") || !strcmp(arg,"-help")) { Usage(NULL); } else Usage("unknown option"); argv++; argc--; } if (argc < 1) Usage("missing program name"); AMX_VerboseErrors = 1; if (verbose >= 1) { if (!AMUDP_getenv_prefixed("VERBOSEENV")) { putenv((char *)AMX_ENV_PREFIX_STR "_VERBOSEENV=1"); } } if (verbose >= 2) { int i; if (!AMUDP_getenv_prefixed("SPAWN_VERBOSE")) { putenv((char *)AMX_ENV_PREFIX_STR "_SPAWN_VERBOSE=1"); } fprintf(stderr,"%s: Launching: ",argvzero); for (i = 0; i < argc; i++) { fprintf(stderr,"%s ", argv[i]); } fprintf(stderr,"\n"); fprintf(stderr,"%s: nprocs=%i depth=%i spawnfn=%c(%s)\n", argvzero,nproc,networkdepth,spawnfn_abbr,spawnfn_str); } { /* call startup */ eb_t eb; ep_t ep; uint64_t networkpid; int retval = AMUDP_SPMDStartup(&argc, &argv, nproc, networkdepth, spawnfn, &networkpid, &eb, &ep); /* should never return */ fprintf(stderr, "ERROR: AMUDP_SPMDStartup failed: %i\n", retval); } return 1; } gasnet-2025.8.0/other/amudp/amudp_const.h0000664000175000017500000001363115142313673020342 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/amudp.h $ * Description: AMUDP Namespace-clean Header for constants * Copyright 2000, Dan Bonachea */ #ifndef __AMUDP_CONST_H #define __AMUDP_CONST_H #undef _PORTABLE_PLATFORM_H #include /* naming policy: AM-defined things start with AM_ internal things start with amudp_ or AMUDP_ */ #ifndef AMX_STRINGIFY #define _AMX_STRINGIFY_HELPER(x) #x #define AMX_STRINGIFY(x) _AMX_STRINGIFY_HELPER(x) #endif #ifndef AMX_CONCAT #define _AMX_CONCAT_HELPER(a,b) a ## b #define AMX_CONCAT(a,b) _AMX_CONCAT_HELPER(a,b) #endif #ifndef AMUDP #define AMUDP 1 #endif #define AMUDP_LIBRARY_VERSION_MAJOR 3 #define AMUDP_LIBRARY_VERSION_MINOR 21 #define AMUDP_LIBRARY_VERSION AMUDP_LIBRARY_VERSION_MAJOR.AMUDP_LIBRARY_VERSION_MINOR #define AMUDP_LIBRARY_VERSION_STR AMX_STRINGIFY(AMUDP_LIBRARY_VERSION) #if !defined(AMUDP_DEBUG) && !defined(AMUDP_NDEBUG) #if defined(GASNET_DEBUG) || defined(AMX_DEBUG) #define AMUDP_DEBUG 1 #elif defined(GASNET_NDEBUG) || defined(AMX_NDEBUG) #define AMUDP_NDEBUG 1 #endif #endif #if defined(AMUDP_DEBUG) && !defined(AMUDP_NDEBUG) #undef AMUDP_DEBUG #define AMUDP_DEBUG 1 #elif !defined(AMUDP_DEBUG) && defined(AMUDP_NDEBUG) #undef AMUDP_NDEBUG #define AMUDP_NDEBUG 1 #else #error bad defns of AMUDP_DEBUG and AMUDP_NDEBUG #endif #undef AMX_DEBUG #undef AMX_NDEBUG #ifdef AMUDP_DEBUG #define AMX_DEBUG AMUDP_DEBUG #define AMUDP_DEBUG_CONFIG _DEBUG #endif #ifdef AMUDP_NDEBUG #define AMX_NDEBUG AMUDP_NDEBUG #define AMUDP_DEBUG_CONFIG _NDEBUG #endif #if AMX_DEBUG_VERBOSE || AMUDP_DEBUG_VERBOSE || GASNET_DEBUG_VERBOSE #undef AMX_DEBUG_VERBOSE #define AMX_DEBUG_VERBOSE 1 #endif /* idiot proofing */ #if defined(AMUDP_DEBUG) && (defined(__OPTIMIZE__) || defined(NDEBUG)) #error Tried to compile AMUDP client code with optimization enabled but also AMUDP_DEBUG (which seriously hurts performance). Disable C and C++ compiler optimization or reconfigure/rebuild without --enable-debug #endif /* ------------------------------------------------------------------------------------ */ /* Internal constants */ #define AMUDP_MAX_SHORT 16 /* max number of handler arguments, >=8 */ #define AMUDP_MAX_MEDIUM AMUDP_MAX_LONG /* max. data transmission unit for medium messages, >= 512 */ #ifdef AMUDP_MAX_LONG /* compile-time override for debugging MTU problems * users should never turn this knob unless directed by the maintainers */ #if AMUDP_MAX_LONG > 65000 || AMUDP_MAX_LONG < 512 #error invalid AMUDP_MAX_LONG #endif #elif PLATFORM_OS_IRIX #define AMUDP_MAX_LONG 61000 /* max. UDP datagram on IRIX is apparently 61412 */ #elif PLATFORM_OS_TRU64 || PLATFORM_OS_FREEBSD || PLATFORM_OS_NETBSD || \ PLATFORM_OS_DARWIN || PLATFORM_OS_AIX #define AMUDP_MAX_LONG 9000 /* max UDP datagram on OSF/FREEBSD/DARWIN is apparently 9196 */ #else #define AMUDP_MAX_LONG 65000 /* default max. UDP datagram */ #endif #define AMUDP_MAX_NUMHANDLERS 256 /* max. handler-table entries >= 256 */ #define AMUDP_INIT_NUMTRANSLATIONS 256 #define AMUDP_MAX_NUMTRANSLATIONS (1U<<20) /* max. translation-table entries. Ensure P*D cannnt overflow int32 */ #define AMUDP_MAX_SEGLENGTH ((uintptr_t)-1) /* max. dest_offset */ #define AMUDP_MAX_BUNDLES 255 /* max bundles that can be allocated */ #define AMUDP_MAX_NETWORKDEPTH 1024 /* max depth we ever allow user to ask for (constrained by instance bits) */ #define AMUDP_MAX_RECVDEPTH 65534 /* max length of recv queue we ever allow user to ask for (2^16-2) */ #define AMUDP_MAX_SPMDPROCS AMUDP_MAX_NUMTRANSLATIONS /* max SPMD procs we support */ #ifndef AMUDP_COLLECT_STATS #define AMUDP_COLLECT_STATS 1 #endif #ifndef AMUDP_COLLECT_LATENCY_STATS #define AMUDP_COLLECT_LATENCY_STATS 1 #endif /* ------------------------------------------------------------------------------------ */ /* User-visible constants */ #define AM_ALL 1 /* Deliver all messages to endpoint */ #define AM_NONE 0 /* Deliver no messages to endpoint */ typedef enum { AM_NOEVENTS, /* No endpoint state transition generates an event */ AM_NOTEMPTY, /* A nonempty receive pool or a receive pool that has a message delivered to it generates an event */ /* AM_CANSEND, */ /* TODO: can send without blocking */ AM_NUMEVENTMASKS } amudp_eventmask_t; typedef enum { AM_SEQ, /* Sequential bundle/endpoint access */ AM_PAR, /* Concurrent bundle/endpoint access */ AM_NUM_BUNDLE_MODES } amudp_bundle_mode_t; /* * Return values to Active Message and Endpoint/Bundle API functions */ #define AM_OK 0 /* Function completed successfully */ #define AM_ERR_NOT_INIT 1 /* Active message layer not initialized */ #define AM_ERR_BAD_ARG 2 /* Invalid function parameter passed */ #define AM_ERR_RESOURCE 3 /* Problem with requested resource */ #define AM_ERR_NOT_SENT 4 /* Synchronous message not sent */ #define AM_ERR_IN_USE 5 /* Resource currently in use */ /* * Op codes for the AM error handler (opcode). */ #define AM_REQUEST_M 1 #define AM_REQUEST_IM 2 #define AM_REQUEST_XFER_M 3 #define AM_REPLY_M 4 #define AM_REPLY_IM 5 #define AM_REPLY_XFER_M 6 /* System parameters */ #define AM_MaxShort() AMUDP_MAX_SHORT #define AM_MaxMedium() AMUDP_MAX_MEDIUM #define AM_MaxLong() AMUDP_MAX_LONG #define AM_MaxNumHandlers() AMUDP_MAX_NUMHANDLERS #define AM_GetNumHandlers(ep, pnhandlers) \ ((ep) ? ((*(pnhandlers) = AMUDP_MAX_NUMHANDLERS), AM_OK) : AM_ERR_BAD_ARG) #define AM_SetNumHandlers(ep, nhandlers) \ ((ep) ? ((nhandlers) == AMUDP_MAX_NUMHANDLERS ? AM_OK : AM_ERR_RESOURCE) : AM_ERR_BAD_ARG) #define AM_MaxNumTranslations(trans) (*(trans) = AMUDP_MAX_NUMTRANSLATIONS,AM_OK) /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/other/amudp/amudp_cdefs.c0000664000175000017500000000244115142313673020270 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/amudp_cdefs.c $ * Description: AMUDP definitions that must be compiled in C mode * Copyright 2005, Dan Bonachea */ #include "amudp_internal.h" #if SOCK_USE_C_BYPASS /* system calls which differ in signature across OS's in ways that C++ cannot deal with */ extern int SOCK_getsockopt(int s, int level, int optname, void *optval, GETSOCKOPT_LENGTH_T *optlen) { return getsockopt(s, level, optname, optval, (void *)optlen); } extern int SOCK_getsockname(int s, struct sockaddr *name, GETSOCKNAME_LENGTH_T *namelen) { return getsockname(s, name, (void *)namelen); } extern int SOCK_getpeername(int s, struct sockaddr *name, GETSOCKNAME_LENGTH_T *namelen) { return getpeername(s, name, (void *)namelen); } extern int SOCK_ioctlsocket(int d, int request, IOCTL_FIONREAD_ARG_T *val) { return ioctlsocket(d, request, (void *)val); } extern int SOCK_accept(SOCKET listener, struct sockaddr* calleraddr, LENGTH_PARAM *sz) { return accept(listener, calleraddr, (void *)sz); } extern int SOCK_recvfrom(SOCKET s, char * buf, int len, int flags, struct sockaddr *from, LENGTH_PARAM *sz) { return recvfrom(s, buf, len, flags, from, (void *)sz); } #endif #include "amx_internal.c" gasnet-2025.8.0/other/amudp/Makefile.common0000664000175000017500000000215115142313673020577 0ustar alastairalastair# $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/Makefile.common $ # Description: Platform-independent variable init, overridden by pre-baked makefiles # Copyright 2000, Dan Bonachea # variables added here should also go in Makefile.titanium.in, and vice-versa srcdir = . altincdir = $(srcdir) amxdir = $(srcdir) # compiler CC = gcc CXX = g++ #CC = /project/cs/titanium/srs/i686-pc-linux-gnu/bin/gcc-3.0.2 -static #CXX = /project/cs/titanium/srs/i686-pc-linux-gnu/bin/g++-3.0.2 -static #otherflags := $(otherflags) -pg #otherflags := $(otherflags) -DFREEZE_WORKER=1 #otherflags := $(otherflags) -static #ccdebugflags = -O0 -g3 -ansi -Wall -Wno-unused-variable -Wno-unused-function $(otherflags) ccdebugflags = -O0 -g3 $(otherflags) ccoptflags = -O3 $(otherflags) #cxxdebugflags = -O0 -g3 -ansi -Wall -Wno-unused-variable -Wno-unused-function $(otherflags) cxxdebugflags = -O0 -g3 $(otherflags) cxxoptflags = -O3 $(otherflags) # system utilities ranlib = ranlib ar = ar PERL = perl # To be set by pre-baked makefiles: platform_defines = platform_ldflags = platform_libraries = gasnet-2025.8.0/other/amudp/Makefile.titanium.in0000664000175000017500000000233515142313673021552 0ustar alastairalastair# $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/Makefile.titanium.in $ # Description: setup necessary variables needed by Makefile # Copyright 2000, Dan Bonachea # variables added here should also go in Makefile.common, and vice-versa altincdir = $(srcdir)/.. amxdir = $(srcdir)/../amx # compiler CC = @CC@ CXX = @TARGET_CXX@ #otherflags := $(otherflags) -pg #otherflags := $(otherflags) -DFREEZE_WORKER=1 #otherflags := $(otherflags) -static ccdebugflags = @TCBUILD_CFLAGS_COMMON@ @TCBUILD_CFLAGS_DEBUG@ $(otherflags) ccoptflags = @TCBUILD_CFLAGS_COMMON@ @TCBUILD_CFLAGS_OPTIMIZE@ $(otherflags) cxxdebugflags = @GENERIC_CXXFLAGS@ @CXXFLAGSE@ @CXXFLAGSDIAG@ -O0 -g $(otherflags) cxxoptflags = -O @GENERIC_CXXFLAGS@ @CXXFLAGSE@ @CXXFLAGSDIAG@ $(otherflags) @ENABLED_DEBUG_TRUE@ ccflags = $(set_debug_ccflags) @ENABLED_DEBUG_TRUE@ cxxflags = $(set_debug_cxxflags) @ENABLED_DEBUG_FALSE@ ccflags = $(set_opt_ccflags) @ENABLED_DEBUG_FALSE@ cxxflags = $(set_opt_cxxflags) # system utilities ranlib = @RANLIB@ ar = @AR@ # stuff normally set by the pre-baked makefiles platform_defines = @TIC_MACHINE_DEFINES@ @INTTYPES_DEFINES@ -DUNIX -DAMUDP_ENV_PREFIX=TI platform_libraries = @TIC_UDP_LIBS@ @LIBS@ gasnet-2025.8.0/other/amudp/exc.h0000664000175000017500000000467615142313673016616 0ustar alastairalastair// $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/exc.h $ // Description: Exception handlers for fserver // Copyright 1999, Dan Bonachea & Scott McPeak #ifndef _EXC_H #define _EXC_H #include "socket.h" void breaker(void); // by using this macro, the debugger gets a shot before the stack is unwound #ifdef THROW #undef THROW #endif #define THROW(obj) \ { breaker(); throw (obj); } // this function returns true if we're in the process of unwinding the // stack, and therefore destructors may want to avoid throwing new exceptions; // for now, may return false positives, but won't return false negatives bool unwinding(); // inside a catch expression, the unwinding() function needs a tweak; pass // the caught expression, and this returns whether there any *additional* // exceptions currently in flight class xBase; bool unwinding_other(xBase const &x); // using unwinding() in destructors to avoid abort() #define CAUTIOUS_RELAY \ catch (xBase &x) { \ if (!unwinding_other(x)) { \ throw; /* re-throw */ \ } \ } #define MAX_EXC_MSG 1024 //------------------------------------------------------------------------------------ // intent is to derive all exception objects from this class xBase { char msg[MAX_EXC_MSG]; // the human-readable description of the exception public: static int creationCount; // current # of xBases running about; used to support unrolling() xBase(char const *m); // create exception object with message 'm' xBase(xBase const &obj); // copy ctor virtual ~xBase(); char const *why() const { return msg; } }; //------------------------------------------------------------------------------------ // exception thrown by SOCKET funcs class xSocket : public xBase { public: SOCKET socket; // socket on which failure occurred // all xSocket exceptions imply that the socket has been closed // error condition ctor xSocket(SOCKET s, char const *msg); xSocket(xSocket const &obj); ~xSocket(); }; void xsocket(SOCKET s, char const *msg); // creates and throws an xsocket //------------------------------------------------------------------------------------ // exception thrown top indicate a form field problem class xForm : public xBase { public: // error condition ctor xForm(char const *m); // create exception object with message 'm' xForm(xForm const &obj); // copy ctor ~xForm(); }; #endif // _EXC_H gasnet-2025.8.0/other/amudp/socket.h0000664000175000017500000001332015142313673017311 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/socket.h $ * Description: portable header socket functions * (c) Scott McPeak, 1998-1999, Modified by Dan Bonachea */ #ifndef SOCKET_H #define SOCKET_H #include #undef _PORTABLE_PLATFORM_H #include #include /* Solaris 2.5.1 fix: u_short, required by sys/socket.h */ #include /* sockets */ #include /* timeval */ #include /* ioctl */ #include /* bzero, for FD_SET */ #include /* bzero, for FD_ZERO (AIX) */ #include /* INADDR_*, in_addr, sockaddr_in, htonl etc. */ #include /* getservbyname */ #include /* inet_addr */ #include /* socket error codes */ #if PLATFORM_OS_SOLARIS /* all this just to get ioctl(FIONREAD) to work (see man 7I streamio) */ #if 1 #include #include #define _FIONREAD I_NREAD #else #include /* FIONREAD */ #endif #elif PLATFORM_OS_AIX && 0 /* AIX has I_NREAD and the docs claim it has the right semantics */ /* but it appears to be broken for sockets */ #include #define _FIONREAD I_NREAD #elif PLATFORM_OS_SUPERUX && 0 /* similarly broken on SuperUX, despite the docs - what a disaster */ #include #define _FIONREAD I_NREAD #else #define _FIONREAD FIONREAD #endif #include #if PLATFORM_COMPILER_CRAY && PLATFORM_OS_LINUX /* Cray CC botches the inline assembly implementing FD_ZERO in Linux */ #undef FD_ZERO #define FD_ZERO(pfd_set) (memset(pfd_set, 0, sizeof(*(pfd_set)))) #endif #if PLATFORM_COMPILER_PGI && PLATFORM_OS_DARWIN /* bug 3379: workaround PGI optimizer bug */ extern uint16_t ntoh16(uint16_t v); extern uint32_t ntoh32(uint32_t v); extern uint16_t hton16(uint16_t v); extern uint32_t hton32(uint32_t v); #undef htons #define htons hton16 #undef ntohs #define ntohs ntoh16 #undef htonl #define htonl hton32 #undef ntohl #define ntohl ntoh32 #endif /* these constants are useful, but appear to be specific to */ /* winsock; so, I define them here and use them as if they */ /* were standard */ #define INVALID_SOCKET ((SOCKET)(~0)) #define SOCKET_ERROR (-1) #define SD_RECEIVE SHUT_RD #define SD_SEND SHUT_WR #define SD_BOTH SHUT_RDWR /* some systems (like Linux!) incorrectly #define NULL as ((void*)0), where */ /* the correct definition (for C++) is: */ #ifndef NULL #define NULL 0 #endif /* SunOS apparently doesn't have this */ #ifndef INADDR_NONE # define INADDR_NONE 0xffffffff #endif /* some linuxes are missing this */ #ifndef SHUT_RD enum { SHUT_RD = 0, /* No more receptions. */ #define SHUT_RD SHUT_RD SHUT_WR, /* No more transmissions. */ #define SHUT_WR SHUT_WR SHUT_RDWR /* No more receptions or transmissions. */ #define SHUT_RDWR SHUT_RDWR }; #endif /* closesocket */ #define closesocket close #if PLATFORM_OS_CYGWIN # include /* close */ #else /* __UNIX__ */ # include /* close */ #endif typedef unsigned int SOCKET; typedef fd_set FD_SET; /* resolve disagreements about types of arguments to misc. functions */ #if PLATFORM_OS_LINUX || PLATFORM_OS_UCLINUX || \ PLATFORM_OS_FREEBSD || PLATFORM_OS_NETBSD || \ PLATFORM_OS_SOLARIS || (PLATFORM_OS_AIX && defined(_AIX51)) # define GETSOCKNAME_LENGTH_T socklen_t # define GETSOCKOPT_LENGTH_T socklen_t #elif PLATFORM_OS_AIX # define GETSOCKNAME_LENGTH_T size_t # define GETSOCKOPT_LENGTH_T size_t #else # define GETSOCKNAME_LENGTH_T int # define GETSOCKOPT_LENGTH_T int #endif /* ioctlsocket */ #define ioctlsocket ioctl #if PLATFORM_OS_CYGWIN || PLATFORM_OS_AIX || PLATFORM_OS_SOLARIS || \ PLATFORM_OS_LINUX || PLATFORM_OS_UCLINUX || \ PLATFORM_OS_TRU64 || PLATFORM_OS_SUPERUX || \ PLATFORM_OS_DARWIN || /* bug 2428 */ \ PLATFORM_ARCH_CRAYX1 /* X1 docs claim it's a size_t, they lie */ #define IOCTL_FIONREAD_ARG_T unsigned int #elif PLATFORM_OS_IRIX #define IOCTL_FIONREAD_ARG_T size_t #else #define IOCTL_FIONREAD_ARG_T unsigned long #endif /* addr-length argument type fiasco.. */ #if PLATFORM_OS_LINUX || PLATFORM_OS_UCLINUX || \ PLATFORM_OS_FREEBSD || PLATFORM_OS_AIX || \ PLATFORM_OS_SOLARIS || PLATFORM_OS_NETBSD # define LENGTH_PARAM socklen_t #elif PLATFORM_OS_TRU64 # define LENGTH_PARAM unsigned long #else # define LENGTH_PARAM int #endif #if defined(AMUDP_DEBUG) || defined(AMUDP_NDEBUG) || \ defined(GASNET_DEBUG) || defined(GASNET_NDEBUG) #define SOCK_USE_C_BYPASS 1 /* Use C-mode bypass for system calls with non-portable signatures */ #endif #if SOCK_USE_C_BYPASS #ifdef __cplusplus extern "C" { #endif extern int SOCK_getsockopt(int s, int level, int optname, void *optval, GETSOCKOPT_LENGTH_T *optlen); extern int SOCK_getsockname(int s, struct sockaddr *name, GETSOCKNAME_LENGTH_T *namelen); extern int SOCK_getpeername(int s, struct sockaddr *name, GETSOCKNAME_LENGTH_T *namelen); extern int SOCK_ioctlsocket(int d, int request, IOCTL_FIONREAD_ARG_T *val); extern int SOCK_accept(SOCKET listener, struct sockaddr* calleraddr, LENGTH_PARAM *sz); extern int SOCK_recvfrom(SOCKET s, char * buf, int len, int flags, struct sockaddr *from, LENGTH_PARAM *sz); #ifdef __cplusplus } /* extern C */ #endif #else #define SOCK_getsockopt getsockopt #define SOCK_getsockname getsockname #define SOCK_getpeername getpeername #define SOCK_ioctlsocket ioctlsocket #define SOCK_accept accept #define SOCK_recvfrom recvfrom #endif #endif /* __SOCKET_H */ gasnet-2025.8.0/other/amudp/amudp_reqrep.cpp0000664000175000017500000020425115142313673021045 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/amudp_reqrep.cpp $ * Description: AMUDP Implementations of request/reply operations * Copyright 2000, Dan Bonachea */ #include #include #include #include #include #include #include #include "amudp_internal.h" // must come after any other headers /* forward decls */ static int AMUDP_RequestGeneric(amudp_category_t category, ep_t ep, amudp_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr, uint8_t systemType, uint8_t systemArg); static int AMUDP_ReplyGeneric(amudp_category_t category, amudp_buf_t *requestbuf, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr, uint8_t systemType, uint8_t systemArg); #if AMUDP_EXTRA_CHECKSUM static void AMUDP_SetChecksum(amudp_msg_t *m, size_t len); static void AMUDP_ValidateChecksum(amudp_msg_t const *m, size_t len); #endif /*------------------------------------------------------------------------------------ * Private helpers *------------------------------------------------------------------------------------ */ static uint64_t intpow(uint64_t val, uint64_t exp) { uint64_t retval = 1; for ( ; exp ; exp--) retval *= val; return retval; } #ifndef STATIC_RETRIES #define STATIC_RETRIES 30 #endif static amx_tick_t retryToticks[STATIC_RETRIES]; #define REQUEST_TIMEOUT_TICKS(retrycnt) ( \ AMX_assert(retryToticks[0]), \ (AMX_PREDICT_TRUE((retrycnt) < STATIC_RETRIES) ? \ retryToticks[(retrycnt)] : \ retryToticks[0] * intpow(AMUDP_RequestTimeoutBackoff,(retrycnt))) \ ) extern void AMUDP_InitRetryCache(void) { AMX_assert(!retryToticks[0]); if (AMUDP_InitialRequestTimeout_us == AMUDP_TIMEOUT_INFINITE) return; amx_tick_t tickout = AMX_us2ticks(AMUDP_InitialRequestTimeout_us); amx_tick_t maxticks = AMX_us2ticks(AMUDP_MaxRequestTimeout_us); for (int i=0; i < STATIC_RETRIES; i++) { AMX_assert(tickout > 0 && tickout <= maxticks); retryToticks[i] = tickout; tickout = MIN(tickout * AMUDP_RequestTimeoutBackoff, maxticks); } #if 0 // for debugging retry calc for (int i=0; i < STATIC_RETRIES*2; i++) { amx_tick_t tick = REQUEST_TIMEOUT_TICKS(i); printf("Timeout %2i: %9" PRIu64 " us, %9" PRIu64 " ticks\n",i,tick/AMX_us2ticks(1),tick); } #endif } /* ------------------------------------------------------------------------------------ */ typedef enum { REQUESTREPLY_PACKET, RETRANSMISSION_PACKET, REFUSAL_PACKET } packet_type; static int sendPacket(ep_t ep, amudp_msg_t *msg, size_t msgsz, en_t destaddress, packet_type type) { AMX_assert(ep && msg && msgsz > 0); AMX_assert(msgsz <= AMUDP_MAX_MSG); AMX_assert(!enEqual(destaddress, ep->name)); // should never be called for loopback #if AMX_DEBUG_VERBOSE { static int firsttime = 1; static int verbosesend = 0; if_pf (firsttime) { verbosesend = !!AMUDP_getenv_prefixed("VERBOSE_SEND"); firsttime = 0; } if (verbosesend) { AMX_VERBOSE_INFO(("sending %i-byte packet to (%s)", (int)msgsz, AMUDP_enStr(destaddress, 0))); } } #endif #if AMUDP_EXTRA_CHECKSUM AMUDP_SetChecksum(msg, msgsz); #endif int retry = 0; while (1) { if_pt (sendto(ep->s, (char *)msg, msgsz, /* Solaris requires cast to char* */ 0, (struct sockaddr *)&destaddress, sizeof(en_t)) > 0 ) { // success AMUDP_STATS(ep->stats.TotalBytesSent += msgsz); return AM_OK; } int err = errno; if (err == EPERM) { /* Linux intermittently gets EPERM failures here at startup for no apparent reason - so allow a retry */ if (retry++ < 5) { AMX_VERBOSE_INFO(("Got a '%s'(%i) on sendto(), retrying...", strerror(err), err)); sleep(1); } else { // something more serious appears to be wrong.. AMX_RETURN_ERRFR(RESOURCE, sendPacket, strerror(err)); } } else if (err == ENOBUFS || err == ENOMEM) { /* some linuxes also generate ENOBUFS for localhost backpressure - ignore it and treat it as a drop, let retransmisison handle if necessary */ AMX_DEBUG_WARN(("Got a '%s'(%i) on sendto(%i), ignoring...", strerror(err), err, (int)msgsz)); return AM_OK; } else AMX_RETURN_ERRFR(RESOURCE, sendPacket, strerror(err)); } } /* ------------------------------------------------------------------------------------ */ static int AMUDP_GetOpcode(int isrequest, amudp_category_t cat) { switch (cat) { case amudp_Short: if (isrequest) return AM_REQUEST_M; else return AM_REPLY_M; case amudp_Medium: if (isrequest) return AM_REQUEST_IM; else return AM_REPLY_IM; case amudp_Long: if (isrequest) return AM_REQUEST_XFER_M; else return AM_REPLY_XFER_M; default: AMX_FatalErr("unrecognized opcode in AMUDP_GetOpcode"); return -1; } } /* ------------------------------------------------------------------------------------ */ #define INVALID_NODE ((amudp_node_t)-1) // return source id in ep perproc table of this remote addr, or INVALID_NODE for not found // optional hint optimizes lookup static amudp_node_t sourceAddrToId(ep_t ep, en_t sourceAddr, amudp_node_t hint) { amudp_perproc_info_t * const pinfo = ep->perProcInfo; // hint values are 8-bit, try all the matching entries for (amudp_node_t i = hint; i < ep->P; i += 256) { en_t const name = pinfo[i].remoteName; if (enEqual(name, sourceAddr)) return i; } AMX_VERBOSE_INFO(("sourceAddrToId hint missed: hint=%i",(int)hint)); // hint may be wrong with non-uniform translation tables, brute-force scan for (amudp_node_t i = 0; i < ep->P; i++) { en_t const name = pinfo[i].remoteName; if (enEqual(name, sourceAddr)) return i; } #if AMX_DEBUG_VERBOSE AMX_DEBUG_WARN(("sourceAddrToId(%s,%i) failed to find a match in the endpoint table", AMUDP_enStr(sourceAddr,0), (int)hint)); AMX_Info("Endpoint table (nproc=%i):", ep->P); for (amudp_node_t j=0; j < ep->P; j++) { char temp1[80], temp2[80]; AMX_Info(" P#%i:\t%s\ttag: %s", j, AMUDP_enStr(pinfo[j].remoteName, temp1), AMUDP_tagStr(pinfo[j].tag, temp2)); } #endif return INVALID_NODE; } /* ------------------------------------------------------------------------------------ */ /* ioctl UDP fiasco: * According to POSIX, ioctl(I_NREAD) on a SOCK_DGRAM should report the EXACT size of * the next message waiting (or 0), not the number of bytes available on the socket. * We can use this as an optimization in choosing the recv buffer size. * Linux (FIONREAD) and Solaris (I_NREAD) get this right, * but all other systems seem to get it wrong, one way or another. * Cygwin: (bug 3284) not implemented * WSL1 (4/8/17) returns raw byte count, which can over or under-report * FreeBSD: (bug 2827) returns raw byte count, which can over or under-report * others: over-report by returning total bytes in all messages waiting */ #ifndef IOCTL_WORKS #if (PLATFORM_OS_LINUX && !PLATFORM_OS_SUBFAMILY_WSL) || PLATFORM_OS_SOLARIS || PLATFORM_OS_DARWIN #define IOCTL_WORKS 1 #else #define IOCTL_WORKS 0 #endif #endif /* ------------------------------------------------------------------------------------ */ /* AMUDP_DrainNetwork - read anything outstanding from hardware/kernel buffers into app space */ static int AMUDP_DrainNetwork(ep_t ep) { int totalBytesDrained = 0; while (1) { IOCTL_FIONREAD_ARG_T bytesAvail = 0; #if IOCTL_WORKS #if PLATFORM_OS_DARWIN // Apple-specific getsockopt(SO_NREAD) returns what we need GETSOCKOPT_LENGTH_T junk = sizeof(bytesAvail); if_pf (SOCK_getsockopt(ep->s, SOL_SOCKET, SO_NREAD, &bytesAvail, &junk) == SOCKET_ERROR) AMX_RETURN_ERRFR(RESOURCE, "getsockopt(SO_NREAD)", strerror(errno)); #else if_pf (SOCK_ioctlsocket(ep->s, _FIONREAD, &bytesAvail) == SOCKET_ERROR) AMX_RETURN_ERRFR(RESOURCE, "ioctl(FIONREAD)", strerror(errno)); #endif // sanity check if_pf ((size_t)bytesAvail > AMUDP_MAX_MSG) { char x; int retval = recvfrom(ep->s, (char *)&x, 1, MSG_PEEK, NULL, NULL); AMX_Err("bytesAvail=%lu recvfrom(MSG_PEEK)=%i", (unsigned long)bytesAvail, retval); AMX_RETURN_ERRFR(RESOURCE, "AMUDP_DrainNetwork: received message that was too long", strerror(errno)); } #else if (inputWaiting(ep->s, false)) bytesAvail = AMUDP_MAX_MSG; // conservative assumption #endif if (bytesAvail == 0) break; /* TODO: another possible workaround for !IOCTL_WORKS: * Use a MSG_PEEK of the header to retrieve the header and GET_MSG_SZ * to allocate an exact-sized buffer. * Probably not worth the overhead for a short-lived Rx buffer, * especially since some OSs will buffer overrun on MSG_PEEK of a partial datagram. * However this same strategy could be used (possibly on a dedicated socket) on any OS * to scatter-recv AMLong payloads directly into their final destination, saving a copy. */ /* something waiting, acquire a buffer for it */ size_t const msgsz = bytesAvail; if (ep->rxCnt >= ep->recvDepth) { /* out of buffers - postpone draining */ AMX_DEBUG_WARN_TH("Receive buffer full - unable to drain network. Consider raising RECVDEPTH or polling more often."); break; } amudp_buf_t *destbuf = AMUDP_AcquireBuffer(ep, MSGSZ_TO_BUFFERSZ(msgsz)); #if AMUDP_EXTRA_CHECKSUM && AMX_DEBUG memset((char *)&destbuf->msg, 0xCC, msgsz); // init recv buffer to a known value #endif /* perform the receive */ struct sockaddr sa; int sz = sizeof(en_t); int retval = myrecvfrom(ep->s, (char *)&destbuf->msg, msgsz, 0, &sa, &sz); #if IOCTL_WORKS if_pt (retval == (int)msgsz) ; // success #else if_pt (retval <= (int)msgsz) ; // success #endif else if_pf (retval == SOCKET_ERROR) AMX_RETURN_ERRFR(RESOURCE, "AMUDP_DrainNetwork: recvfrom()", strerror(errno)); else if_pf (retval == 0) AMX_RETURN_ERRFR(RESOURCE, "AMUDP_DrainNetwork: recvfrom() returned zero", strerror(errno)); else if_pf ((size_t)retval < AMUDP_MIN_MSG) AMX_RETURN_ERRFR(RESOURCE, "AMUDP_DrainNetwork: incomplete message received in recvfrom()", strerror(errno)); else if_pf ((size_t)retval > msgsz) AMX_RETURN_ERRFR(RESOURCE, "AMUDP_DrainNetwork: buffer overrun in recvfrom()", strerror(errno)); else { /* detect broken ioctl implementations */ AMX_assert(IOCTL_WORKS && retval != (int)bytesAvail); AMX_Warn("ioctl() is probably broken: bytesAvail=%i recvfrom returned=%i", (int)bytesAvail, retval); } #if AMX_DEBUG if_pf (sz != sizeof(en_t)) // should never happen AMX_RETURN_ERRFR(RESOURCE, "AMUDP_DrainNetwork: recvfrom() returned wrong sockaddr size", strerror(errno)); #endif #if AMUDP_EXTRA_CHECKSUM // the following lines can be uncommented to inject errors and verify the checksum support is working //memset(((char*)destbuf)+retval-8, 0, 8); //destbuf->msg.chk2 = 4; //destbuf->msg.packetlen = 4; AMUDP_ValidateChecksum(&(destbuf->msg), retval); #endif destbuf->status.rx.sourceAddr = *(en_t *)&sa; destbuf->status.rx.dest = ep; /* remember which ep recvd this message */ destbuf->status.rx.sourceId = sourceAddrToId(ep, *(en_t *)&sa, destbuf->msg.systemMessageArg); // add it to the recv queue destbuf->status.rx.next = NULL; if (!ep->rxCnt) { // first element AMX_assert(!ep->rxHead && !ep->rxTail); ep->rxTail = ep->rxHead = destbuf; } else { // append to FIFO AMX_assert(ep->rxHead && ep->rxTail); AMX_assert(ep->rxHead != ep->rxTail || ep->rxCnt == 1); ep->rxTail->status.rx.next = destbuf; ep->rxTail = destbuf; } ep->rxCnt++; totalBytesDrained += retval; } // drain recv loop #if USE_SOCKET_RECVBUFFER_GROW /* heuristically decide whether we should expand the OS socket recv buffers */ if (totalBytesDrained + AMUDP_MAX_MSG > ep->socketRecvBufferSize) { /* it's possible we dropped something due to insufficient OS socket buffer space */ if (!ep->socketRecvBufferMaxedOut) { /* try to do something about it */ /* TODO: we may want to add some hysterisis here to prevent artifical inflation * due to retransmits after a long period of no polling */ int newsize = 2 * ep->socketRecvBufferSize; if (newsize <= 0 || newsize > (int)AMUDP_SocketBuffer_max) { /* create a semi-sane upper bound */ newsize = AMUDP_SocketBuffer_max; ep->socketRecvBufferMaxedOut = 1; } ep->socketRecvBufferMaxedOut += AMUDP_growSocketBufferSize(ep, newsize, SO_RCVBUF, "SO_RCVBUF"); } } #endif return AM_OK; /* done */ } static int AMUDP_WaitForEndpointActivity(eb_t eb, struct timeval *tv) { /* drain network and block up to tv time for endpoint recv buffers to become non-empty (NULL to block) * return AM_OK for activity, AM_ERR_ for other error, -1 for timeout * wakeupOnControlActivity controls whether we return on control socket activity (for blocking) */ /* drain network and see if some receive buffer already non-empty */ for (int i = 0; i < eb->n_endpoints; i++) { ep_t ep = eb->endpoints[i]; int retval = AMUDP_DrainNetwork(ep); if (retval != AM_OK) AMX_RETURN(retval); if (ep->rxCnt) return AM_OK; } while (1) { fd_set sockset; fd_set* psockset = &sockset; int maxfd = 0; FD_ZERO(psockset); for (int i = 0; i < eb->n_endpoints; i++) { SOCKET s = eb->endpoints[i]->s; FD_SET(s, psockset); if ((int)s > maxfd) maxfd = s; } if (AMUDP_SPMDControlSocket != INVALID_SOCKET) { ASYNC_TCP_DISABLE(); FD_SET(AMUDP_SPMDControlSocket, psockset); if ((int)AMUDP_SPMDControlSocket > maxfd) maxfd = AMUDP_SPMDControlSocket; } /* wait for activity */ amx_tick_t starttime = AMX_getCPUTicks(); int retval = select(maxfd+1, psockset, NULL, NULL, tv); if (AMUDP_SPMDControlSocket != INVALID_SOCKET) ASYNC_TCP_ENABLE(); if_pf (retval == SOCKET_ERROR) { AMX_RETURN_ERRFR(RESOURCE, "AMUDP_Block: select()", strerror(errno)); } else if (retval == 0) return -1; /* time limit expired */ else if_pf (FD_ISSET(AMUDP_SPMDControlSocket, psockset)) { AMUDP_SPMDIsActiveControlSocket = TRUE; /* we may have missed a signal */ AMUDP_SPMDHandleControlTraffic(NULL); if (AMUDP_SPMDwakeupOnControlActivity) return AM_OK; } else return AM_OK; /* activity on some endpoint in bundle */ amx_tick_t endtime = AMX_getCPUTicks(); if (tv) { /* readjust remaining time */ int64_t elapsedtime = AMX_ticks2us(endtime - starttime); if (elapsedtime < tv->tv_usec) tv->tv_usec -= elapsedtime; else { int64_t remainingtime = ((int64_t)tv->tv_sec) * 1000000 + tv->tv_usec; remainingtime -= elapsedtime; if (remainingtime <= 0) return -1; /* time limit expired */ tv->tv_sec = (long)(remainingtime / 1000000); tv->tv_usec = (long)(remainingtime % 1000000); } } } } /* ------------------------------------------------------------------------------------ */ // Manage the doubly-linked tx ring static void AMUDP_EnqueueTxBuffer(ep_t ep, amudp_buf_t *buf) { if (!ep->timeoutCheckPosn) { // empty ring AMX_assert(ep->outstandingRequests == 0); ep->timeoutCheckPosn = buf; buf->status.tx.next = buf; buf->status.tx.prev = buf; ep->outstandingRequests = 1; } else { // insert "behind" current check posn AMX_assert(ep->outstandingRequests >= 1); buf->status.tx.next = ep->timeoutCheckPosn; buf->status.tx.prev = ep->timeoutCheckPosn->status.tx.prev; ep->timeoutCheckPosn->status.tx.prev = buf; buf->status.tx.prev->status.tx.next = buf; ep->outstandingRequests++; AMX_assert(ep->outstandingRequests <= ep->sendDepth); } } static void AMUDP_DequeueTxBuffer(ep_t ep, amudp_buf_t *buf) { AMX_assert(buf->status.tx.next); AMX_assert(buf->status.tx.prev); AMX_assert(ep->timeoutCheckPosn); if (buf->status.tx.next == buf) { // removing last element AMX_assert(ep->outstandingRequests == 1); AMX_assert(buf->status.tx.prev == buf); AMX_assert(ep->timeoutCheckPosn == buf); ep->timeoutCheckPosn = NULL; ep->outstandingRequests = 0; } else { // extract from ring AMX_assert(ep->outstandingRequests > 1); if (ep->timeoutCheckPosn == buf) // advance posn ep->timeoutCheckPosn = buf->status.tx.next; buf->status.tx.prev->status.tx.next = buf->status.tx.next; buf->status.tx.next->status.tx.prev = buf->status.tx.prev; ep->outstandingRequests--; } #if AMX_DEBUG buf->status.tx.next = NULL; buf->status.tx.prev = NULL; #endif } /* ------------------------------------------------------------------------------------ */ static int AMUDP_HandleRequestTimeouts(ep_t ep, int numtocheck) { /* check the next numtocheck requests for timeout (or -1 for all) * and retransmit as necessary. return AM_OK or AM_ERR_XXX */ amudp_buf_t *buf = ep->timeoutCheckPosn; if (!buf) { // tx ring empty AMX_assert(ep->outstandingRequests == 0); return AM_OK; } amx_tick_t now = AMX_getCPUTicks(); AMX_assert(ep->outstandingRequests > 0); AMX_assert(ep->outstandingRequests <= ep->PD); // sanity: weak test b/c ignores loopback if (numtocheck == -1) numtocheck = ep->outstandingRequests; else numtocheck = MIN(numtocheck, ep->outstandingRequests); for (int i = 0; i < numtocheck; i++) { if_pf (buf->status.tx.timestamp <= now) { AMX_assert(AMUDP_InitialRequestTimeout_us != AMUDP_TIMEOUT_INFINITE); static uint32_t max_retryCount = 0; if_pf (!max_retryCount) { // init precomputed values if (AMUDP_MaxRequestTimeout_us == AMUDP_TIMEOUT_INFINITE) { max_retryCount = (uint32_t)-1; } else { uint64_t temp = AMUDP_InitialRequestTimeout_us; while (temp <= AMUDP_MaxRequestTimeout_us) { temp *= AMUDP_RequestTimeoutBackoff; max_retryCount++; } } } amudp_msg_t * const msg = &buf->msg; amudp_category_t const cat = AMUDP_MSG_CATEGORY(msg); AMX_assert(AMUDP_MSG_ISREQUEST(msg)); amudp_node_t const destP = buf->status.tx.destId; if_pf (buf->status.tx.retryCount >= max_retryCount) { /* we already waited too long - request is undeliverable */ amx_returned_handler_fn_t handlerfn = (amx_returned_handler_fn_t)ep->handler[0]; int opcode = AMUDP_GetOpcode(1, cat); AMUDP_DequeueTxBuffer(ep, buf); amudp_bufdesc_t *txdesc = GET_REQ_DESC(ep, destP, AMUDP_MSG_INSTANCE(msg)); txdesc->buffer = NULL; // free tx descriptor /* pretend this is a bounced recv buffer */ /* note that source/dest for returned mesgs reflect the virtual "message denied" packet * although it doesn't really matter because the AM2 spec is too vague * about the argblock returned message argument for it to be of any use to anyone */ buf->status.rx.sourceId = destP; buf->status.rx.sourceAddr = ep->perProcInfo[destP].remoteName; buf->status.rx.dest = ep; buf->status.rx.replyIssued = TRUE; /* prevent any reply */ buf->status.rx.handlerRunning = TRUE; AMX_assert(handlerfn != NULL); (*handlerfn)(ECONGESTION, opcode, (void *)buf); buf->status.rx.handlerRunning = FALSE; AMUDP_ReleaseBuffer(ep, buf); AMUDP_STATS(ep->stats.ReturnedMessages++); } else { /* retransmit */ size_t msgsz = GET_MSG_SZ(msg); en_t destaddress = ep->perProcInfo[destP].remoteName; /* tag should NOT be changed for retransmit */ AMX_VERBOSE_INFO(("Retransmitting a request...")); int retval = sendPacket(ep, msg, msgsz, destaddress, RETRANSMISSION_PACKET); if (retval != AM_OK) AMX_RETURN(retval); uint32_t const retry = buf->status.tx.retryCount + 1; buf->status.tx.retryCount = retry; now = AMX_getCPUTicks(); // may have blocked in send buf->status.tx.timestamp = now + REQUEST_TIMEOUT_TICKS(retry); AMUDP_STATS(ep->stats.RequestsRetransmitted[cat]++); AMUDP_STATS(ep->stats.RequestTotalBytesSent[cat] += msgsz); } } // time expired buf = buf->status.tx.next; // advance AMX_assert(buf); } /* advance checked posn */ ep->timeoutCheckPosn = buf; return AM_OK; } /* ------------------------------------------------------------------------------------ */ #define MAXINT64 ((((uint64_t)1) << 63) - 1) static amx_tick_t AMUDP_FindEarliestRequestTimeout(eb_t eb) { /* return the soonest timeout value for an active request * (which may have already passed) * return 0 for no outstanding requests */ amx_tick_t earliesttime = (amx_tick_t)MAXINT64; for (int i = 0; i < eb->n_endpoints; i++) { ep_t ep = eb->endpoints[i]; amudp_buf_t * const startpos = ep->timeoutCheckPosn; if (!startpos) continue; amudp_buf_t *buf = startpos; do { amx_tick_t timestamp = buf->status.tx.timestamp; if (timestamp < earliesttime) earliesttime = timestamp; buf = buf->status.tx.next; } while (buf != startpos); } if (earliesttime == MAXINT64) return 0; else return earliesttime; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_Block(eb_t eb) { /* block until some endpoint receive buffer becomes non-empty * does not poll, but does handle SPMD control socket events */ /* first, quickly determine if something is already waiting */ { struct timeval tv = {0,0}; int retval = AMUDP_WaitForEndpointActivity(eb, &tv); if (retval != -1) AMX_RETURN(retval); /* error or something waiting */ } while (1) { /* we need to be careful we don't sleep longer than the next packet timeout */ amx_tick_t nexttimeout = AMUDP_FindEarliestRequestTimeout(eb); int retval; if (nexttimeout) { struct timeval tv; amx_tick_t now = AMX_getCPUTicks(); if (nexttimeout < now) goto timeout; /* already have a request timeout */ uint32_t const uspause = (uint32_t)AMX_ticks2us(nexttimeout - now); tv.tv_sec = (long)(uspause / 1000000); tv.tv_usec = (long)(uspause % 1000000); retval = AMUDP_WaitForEndpointActivity(eb, &tv); } else /* no outstanding requests, so just block */ retval = AMUDP_WaitForEndpointActivity(eb, NULL); if (retval != -1) AMX_RETURN(retval); /* error or something waiting */ /* some request has timed out - handle it */ timeout: { int i; for (i = 0; i < eb->n_endpoints; i++) { ep_t ep = eb->endpoints[i]; if (ep->depth != -1) { int retval = AMUDP_HandleRequestTimeouts(ep, -1); if (retval != AM_OK) AMX_RETURN(retval); } } } } } /* ------------------------------------------------------------------------------------ */ #if AMX_DEBUG #define REFUSE_NOTICE(reason,addr) \ AMX_Err("I just refused a message and returned to sender (%s). Reason: %s", \ AMUDP_enStr(addr,0), reason) #else #define REFUSE_NOTICE(reason,addr) (void)0 #endif /* this is a local-use-only macro for AMUDP_processPacket */ #define AMUDP_REFUSEMESSAGE(errcode) do { \ msg->systemMessageType = (uint8_t)amudp_system_returnedmessage; \ msg->systemMessageArg = (uint8_t)errcode; \ if (isloopback) { \ AMUDP_processPacket(buf, 1); \ } else { \ int retval = sendPacket(ep, msg, GET_MSG_SZ(msg), \ buf->status.rx.sourceAddr, REFUSAL_PACKET); \ /* ignore errors sending this */ \ if (retval != AM_OK) AMX_Err("failed to sendPacket(%s) to refuse message",\ AMUDP_enStr(buf->status.rx.sourceAddr,0)); \ else REFUSE_NOTICE(#errcode, buf->status.rx.sourceAddr); \ } \ return; \ } while(0) // Process an incoming buffer from any source, and return when complete // Does NOT release the buffer void AMUDP_processPacket(amudp_buf_t * const buf, int isloopback) { amudp_msg_t * const msg = &buf->msg; ep_t const ep = buf->status.rx.dest; amudp_node_t const sourceID = buf->status.rx.sourceId; int const numargs = AMUDP_MSG_NUMARGS(msg); uint8_t const seqnum = AMUDP_MSG_SEQNUM(msg); uint16_t const instance = AMUDP_MSG_INSTANCE(msg); int const isrequest = AMUDP_MSG_ISREQUEST(msg); amudp_category_t const cat = AMUDP_MSG_CATEGORY(msg); int const issystemmsg = ((amudp_system_messagetype_t)msg->systemMessageType) != amudp_system_user; /* handle returned messages */ if_pf (issystemmsg) { amudp_system_messagetype_t type = ((amudp_system_messagetype_t)msg->systemMessageType); if_pf (type == amudp_system_returnedmessage) { amx_returned_handler_fn_t handlerfn = (amx_returned_handler_fn_t)ep->handler[0]; if (sourceID == INVALID_NODE) return; /* unknown source, ignore message */ if (isrequest && !isloopback) { /* the returned message is a request, so free that request buffer */ amudp_bufdesc_t * const desc = GET_REQ_DESC(ep, sourceID, instance); if (desc->buffer && desc->seqNum == seqnum) { AMUDP_DequeueTxBuffer(ep, desc->buffer); AMUDP_ReleaseBuffer(ep, desc->buffer); desc->seqNum = AMUDP_SEQNUM_INC(desc->seqNum); desc->buffer = NULL; ep->perProcInfo[sourceID].instanceHint = instance; } } op_t opcode = AMUDP_GetOpcode(isrequest, cat); /* note that source/dest for returned mesgs reflect the virtual "message denied" packet * although it doesn't really matter because the AM2 spec is too vague * about the argblock returned message argument for it to be of any use to anyone */ buf->status.rx.replyIssued = TRUE; /* prevent any reply */ buf->status.rx.handlerRunning = TRUE; AMX_assert(handlerfn != NULL); (*handlerfn)(msg->systemMessageArg, opcode, (void *)buf); buf->status.rx.handlerRunning = FALSE; AMUDP_STATS(ep->stats.ReturnedMessages++); return; } } if (!isloopback) { if (isrequest) AMUDP_STATS(ep->stats.RequestsReceived[cat]++); else AMUDP_STATS(ep->stats.RepliesReceived[cat]++); } /* perform acceptance checks */ if_pf (ep->tag == AM_NONE || (ep->tag != msg->tag && ep->tag != AM_ALL)) AMUDP_REFUSEMESSAGE(EBADTAG); if_pf (instance >= ep->depth) AMUDP_REFUSEMESSAGE(EUNREACHABLE); if_pf (ep->handler[msg->handlerId] == amx_unused_handler && !issystemmsg && msg->handlerId != 0) AMUDP_REFUSEMESSAGE(EBADHANDLER); switch (cat) { case amudp_Short: if_pf (msg->nBytes > 0 || msg->destOffset > 0) AMUDP_REFUSEMESSAGE(EBADLENGTH); break; case amudp_Medium: if_pf (msg->nBytes > AMUDP_MAX_MEDIUM || msg->destOffset > 0) AMUDP_REFUSEMESSAGE(EBADLENGTH); break; case amudp_Long: /* check segment limits */ if_pf (msg->nBytes > AMUDP_MAX_LONG) AMUDP_REFUSEMESSAGE(EBADLENGTH); if_pf (msg->nBytes && ( ep->segLength == 0 || /* empty seg */ ((uintptr_t)ep->segAddr + msg->destOffset) == 0)) /* NULL target */ AMUDP_REFUSEMESSAGE(EBADSEGOFF); if_pf (msg->destOffset + msg->nBytes > ep->segLength) AMUDP_REFUSEMESSAGE(EBADLENGTH); break; default: AMX_unreachable(); } /* check the source id */ if_pf (sourceID == INVALID_NODE) { // AMUDP_REFUSEMESSAGE(EBADENDPOINT); // bug 4321: Some systems intermittently deliver an otherwise-valid packet with a corrupted sender port. // Due to security concerns we should not execute an AM on behalf of such a packet, however sending // a refusal packet is likely to crash the job if that refusal arrives back to a valid endpoint. // Instead we'll drop the packet, allowing us to tolerate intermittent misbehavior. AMX_DEBUG_WARN(("Dropping a packet from an unrecognized sender (%s). " "Your system might be affected by bug 4321.", AMUDP_enStr(buf->status.rx.sourceAddr,0))); return; // drop message } // fetch the descriptor relevant to this network message amudp_bufdesc_t * const desc = (isloopback ? NULL : AMUDP_get_desc(ep, sourceID, instance, !isrequest, // the alternate descriptor is the relevant one isrequest)); // should only need to allocate if this is a request if (!isloopback) { static const char *OOOwarn = "Detected arrival of out-of-order %s!\n" " It appears your system is delivering IP packets out-of-order between worker nodes,\n" " most likely due to striping over multiple adapters or links.\n" " This might (rarely) lead to corruption of AMUDP traffic."; /* check sequence number to see if this is a new request/reply or a duplicate */ if (isrequest) { if_pf (seqnum != desc->seqNum) { if_pf (AMUDP_SEQNUM_INC(seqnum) != desc->seqNum) { if (OOOwarn) { AMX_Warn(OOOwarn, "request"); OOOwarn = NULL; } // Out-of-order message can only be a "slow" copy from a previously-completed instance // that included retransmits. Hence, should always be discarded. AMUDP_STATS(ep->stats.OutOfOrderRequests++); AMX_VERBOSE_INFO(("Ignoring an Out-of-order request.")); return; } /* request resent or reply got dropped - resend reply */ amudp_buf_t * const replybuf = desc->buffer; AMX_assert(replybuf); amudp_msg_t * const replymsg = &replybuf->msg; int cat = AMUDP_MSG_CATEGORY(replymsg); if (!ep->replyEpoch) ep->replyEpoch = AMX_getCPUTicks(); if (replybuf->status.tx.timestamp == ep->replyEpoch) { // optimization: don't retransmit a reply more than once per epoch // This prevents request retransmit storms that built up while we were inattentive // from being exacerbated into reply retransmit storms AMX_VERBOSE_INFO(("Got a same-epoch duplicate request - squashing reply retransmit.")); AMUDP_STATS(ep->stats.RepliesSquashed[cat]++); return; } replybuf->status.tx.timestamp = ep->replyEpoch; size_t msgsz = GET_MSG_SZ(replymsg); AMX_VERBOSE_INFO(("Got a duplicate request - resending previous reply.")); int retval = sendPacket(ep, replymsg, msgsz, ep->perProcInfo[sourceID].remoteName, RETRANSMISSION_PACKET); if (retval != AM_OK) AMX_Err("sendPacket failed while resending a reply"); AMUDP_STATS(ep->stats.RepliesRetransmitted[cat]++); AMUDP_STATS(ep->stats.ReplyTotalBytesSent[cat] += msgsz); return; } } else { if (seqnum != desc->seqNum) { /* duplicate reply, we already ran handler - ignore it */ if_pf (AMUDP_SEQNUM_INC(seqnum) != desc->seqNum) { if (OOOwarn) { AMX_Warn(OOOwarn, "reply"); OOOwarn = NULL; } // Out-of-order message can only be a "slow" copy from a previously-completed instance // that included retransmits. Hence, should always be discarded. AMUDP_STATS(ep->stats.OutOfOrderReplies++); AMX_VERBOSE_INFO(("Ignoring an Out-of-order reply.")); return; } AMX_VERBOSE_INFO(("Ignoring a duplicate reply.")); return; } } /* --- message accepted --- */ if (isrequest) { // alternate the reply sequence number so duplicates of this request get ignored desc->seqNum = AMUDP_SEQNUM_INC(desc->seqNum); } else { /* it's a reply, free the corresponding request */ amudp_buf_t * const reqbuf = desc->buffer; if_pt (reqbuf) { #if AMUDP_COLLECT_LATENCY_STATS && AMUDP_COLLECT_STATS { /* gather some latency statistics */ amx_tick_t now = AMX_getCPUTicks(); amx_tick_t latency = (now - reqbuf->status.tx.firstSendTime); ep->stats.RequestSumLatency += latency; if (latency < ep->stats.RequestMinLatency) ep->stats.RequestMinLatency = latency; if (latency > ep->stats.RequestMaxLatency) ep->stats.RequestMaxLatency = latency; } #endif AMUDP_DequeueTxBuffer(ep, reqbuf); AMUDP_ReleaseBuffer(ep, reqbuf); desc->seqNum = AMUDP_SEQNUM_INC(desc->seqNum); desc->buffer = NULL; ep->perProcInfo[sourceID].instanceHint = instance; } else { /* request timed out and we decided it was undeliverable, then a reply arrived */ desc->seqNum = AMUDP_SEQNUM_INC(desc->seqNum); /* TODO: seq numbers may get out of sync on timeout * if request got through but replies got lost * we also may do bad things if a reply to an undeliverable message * arrives after we've reused the request buffer (very unlikely) * possible soln: add an epoch number */ return; /* reply handler should NOT be run in this situation */ } } } { /* run the handler */ buf->status.rx.replyIssued = FALSE; buf->status.rx.handlerRunning = TRUE; if (issystemmsg) { /* an AMUDP system message */ amudp_system_messagetype_t type = ((amudp_system_messagetype_t)(msg->systemMessageType & 0xF)); switch (type) { case amudp_system_autoreply: AMX_assert(!isloopback); return; /* already taken care of */ default: AMX_unreachable(); } } else { /* a user message */ uint32_t * const pargs = GET_MSG_ARGS(msg); handler_t const hid = msg->handlerId; switch (cat) { case amudp_Short: if (ep->preHandlerCallback) ep->preHandlerCallback(amudp_Short, isrequest, hid, buf, NULL, 0, numargs, pargs); AMX_RUN_HANDLER_SHORT(ep->handler[hid], buf, pargs, numargs); if (ep->postHandlerCallback) ep->postHandlerCallback(cat, isrequest); break; case amudp_Medium: { uint8_t * const pData = GET_MSG_DATA(msg); if (ep->preHandlerCallback) ep->preHandlerCallback(amudp_Medium, isrequest, hid, buf, pData, msg->nBytes, numargs, pargs); AMX_RUN_HANDLER_MEDIUM(ep->handler[hid], buf, pargs, numargs, pData, msg->nBytes); if (ep->postHandlerCallback) ep->postHandlerCallback(cat, isrequest); break; } case amudp_Long: { uint8_t * const pData = ((uint8_t *)ep->segAddr) + msg->destOffset; /* a single-message bulk transfer. do the copy */ if (!isloopback) memcpy(pData, GET_MSG_DATA(msg), msg->nBytes); if (ep->preHandlerCallback) ep->preHandlerCallback(amudp_Long, isrequest, hid, buf, pData, msg->nBytes, numargs, pargs); AMX_RUN_HANDLER_LONG(ep->handler[hid], buf, pargs, numargs, pData, msg->nBytes); if (ep->postHandlerCallback) ep->postHandlerCallback(cat, isrequest); break; } default: AMX_unreachable(); } } buf->status.rx.handlerRunning = FALSE; if (!isloopback && isrequest && !buf->status.rx.replyIssued) { static va_list va_dummy; /* dummy value - static to prevent uninit warnings */ /* user didn't reply, so issue an auto-reply */ if_pf (AMUDP_ReplyGeneric(amudp_Short, buf, 0, 0, 0, 0, 0, va_dummy, amudp_system_autoreply, 0) != AM_OK) /* should never happen - don't return here to prevent leaking buffer */ AMX_Err("Failed to issue auto reply in AMUDP_ServiceIncomingMessages"); } } } #undef AMUDP_REFUSEMESSAGE /* this is a local-use-only macro */ /* ------------------------------------------------------------------------------------ */ /* main message receive workhorse - * drain network once and service available incoming messages, up to AMUDP_MAX_RECVMSGS_PER_POLL */ static int AMUDP_ServiceIncomingMessages(ep_t ep) { /* drain network */ int retval = AMUDP_DrainNetwork(ep); if (retval != AM_OK) AMX_RETURN(retval); ep->replyEpoch = 0; for (int i = 0; AMUDP_MAX_RECVMSGS_PER_POLL == 0 || i < MAX(AMUDP_MAX_RECVMSGS_PER_POLL, ep->depth); i++) { amudp_buf_t * const buf = ep->rxHead; if (!buf) return AM_OK; /* nothing else waiting */ /* we have a real message waiting - dequeue it */ ep->rxHead = buf->status.rx.next; AMX_assert(ep->rxCnt > 0); ep->rxCnt--; if (ep->rxCnt == 0) { AMX_assert(!ep->rxHead); ep->rxTail = NULL; } if (AMUDP_FaultInjectionEnabled) { /* allow fault injection to drop some revcd messages */ double randval = rand() / (double)RAND_MAX; AMX_assert(randval >= 0.0 && AMUDP_FaultInjectionRate >= 0.0); if (randval < AMUDP_FaultInjectionRate) { AMX_VERBOSE_INFO(("Fault injection dropping a packet..")); goto donewithmessage; } } AMUDP_processPacket(buf, 0); donewithmessage: /* message handled - continue to next one */ /* free the handled buffer */ AMUDP_ReleaseBuffer(ep, buf); } /* for */ return AM_OK; } /* AMUDP_ServiceIncomingMessages */ /*------------------------------------------------------------------------------------ * Poll *------------------------------------------------------------------------------------ */ extern int AM_Poll(eb_t eb) { AMX_CHECKINIT(); AMX_CHECK_ERR(!eb, BAD_ARG); for (int i = 0; i < eb->n_endpoints; i++) { int retval; ep_t ep = eb->endpoints[i]; if_pt (ep->depth != -1) { /* only poll endpoints which have buffers */ #if USE_ASYNC_TCP_CONTROL if_pf (AMUDP_SPMDIsActiveControlSocket) /* async check */ #endif { retval = AMUDP_SPMDHandleControlTraffic(NULL); if_pf (retval != AM_OK) AMX_RETURN(retval); } retval = AMUDP_ServiceIncomingMessages(ep); /* drain network and check for activity */ if_pf (retval != AM_OK) AMX_RETURN(retval); retval = AMUDP_HandleRequestTimeouts(ep, AMUDP_TIMEOUTS_CHECKED_EACH_POLL); if_pf (retval != AM_OK) AMX_RETURN(retval); } } return AM_OK; } // poll/block eb while awaiting resource cond // upon error, execute cleanup and return it #define BLOCKUNTIL(eb, cond, cleanup) while (!(cond)) { \ int _retval = AM_OK; \ if (AMUDP_PoliteSync) { \ _retval = AMUDP_Block(eb); \ } \ if_pt (_retval == AM_OK) _retval = AM_Poll(eb); \ if_pf (_retval != AM_OK) { \ cleanup; \ AMX_RETURN(_retval); \ } \ } #define TRANSID_TO_NODEID(ep, transid) ( \ AMX_PREDICT_TRUE(!(ep)->translation) ? (amudp_node_t)(transid) : \ (AMX_assert((transid) < (ep)->translationsz), \ (ep)->translation[transid].id) \ ) /*------------------------------------------------------------------------------------ * Generic Request/Reply *------------------------------------------------------------------------------------ */ static int AMUDP_RequestGeneric(amudp_category_t category, ep_t ep, amudp_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr, uint8_t systemType, uint8_t systemArg) { amudp_node_t const destP = TRANSID_TO_NODEID(ep, reply_endpoint); amudp_perproc_info_t * const perProcInfo = &ep->perProcInfo[destP]; en_t const destaddress = perProcInfo->remoteName; const int isloopback = enEqual(destaddress, ep->name); uint16_t instance; amudp_bufdesc_t *outgoingdesc = NULL; /* always poll before sending a request */ int retval = AM_Poll(ep->eb); if_pf (retval != AM_OK) AMX_RETURN(retval); size_t const msgsz = COMPUTE_MSG_SZ(numargs, nbytes); size_t const buffersz = MSGSZ_TO_BUFFERSZ(msgsz); amudp_buf_t * const outgoingbuf = AMUDP_AcquireBuffer(ep, buffersz); if (isloopback) { instance = 0; /* not used */ } else { /* acquire a free request buffer */ int const depth = ep->depth; amudp_bufdesc_t * const descs = GET_REQ_DESC_ALLOC(ep, destP, 0); while(1) { // send descriptor acquisition loop uint16_t const hint = perProcInfo->instanceHint; AMX_assert(hint <= depth); amudp_bufdesc_t * const hintdesc = &descs[hint]; if_pt (!hintdesc->buffer) { /* hint is right */ instance = hint; outgoingdesc = hintdesc; perProcInfo->instanceHint = (hint+1==depth?0:hint+1); goto gotinstance; } else { /* hint is wrong */ /* search for a free instance */ instance = hint; do { instance = ((instance+1)==depth?0:instance+1); amudp_bufdesc_t * const tdesc = &descs[hint]; if (!tdesc->buffer) { outgoingdesc = tdesc; goto gotinstance; } } while (instance != hint); /* no buffers available - wait until one is open * (hint will point to a free buffer) */ BLOCKUNTIL(ep->eb, descs[perProcInfo->instanceHint].buffer == NULL, AMUDP_ReleaseBuffer(ep, outgoingbuf)); // prevent leak on error return } } gotinstance: AMX_assert(outgoingdesc); AMX_assert(!outgoingdesc->buffer); // wait for sendDepth, if necessary BLOCKUNTIL(ep->eb, ep->outstandingRequests < ep->sendDepth, AMUDP_ReleaseBuffer(ep, outgoingbuf)); // prevent leak on error return AMX_assert(!outgoingdesc->buffer); outgoingdesc->buffer = outgoingbuf; // claim desc } /* setup message meta-data */ amudp_msg_t * const msg = &outgoingbuf->msg; if (isloopback) AMUDP_MSG_SETFLAGS(msg, TRUE, category, numargs, 0, 0); else AMUDP_MSG_SETFLAGS(msg, TRUE, category, numargs, outgoingdesc->seqNum, instance); msg->destOffset = dest_offset; msg->handlerId = handler; msg->nBytes = (uint16_t)nbytes; AMX_assert(systemType == amudp_system_user); AMX_assert(systemArg == 0); msg->systemMessageType = systemType; msg->systemMessageArg = (uint8_t)ep->idHint; msg->tag = perProcInfo->tag; AMX_assert(GET_MSG_SZ(msg) == msgsz); { /* setup args */ int i; uint32_t *args = GET_MSG_ARGS(msg); for (i = 0; i < numargs; i++) { args[i] = (uint32_t)va_arg(argptr, int); /* must be int due to default argument promotion */ } #if USE_CLEAR_UNUSED_SPACE if (i < AMUDP_MAX_SHORT) args[i] = 0; #endif } if (isloopback) { /* run handler synchronously */ if (nbytes > 0) { /* setup data */ if (category == amudp_Long) { /* one-copy: buffer was overallocated, could be reduced with more complexity */ AMX_CHECK_ERRFRC(dest_offset + nbytes > ep->segLength, BAD_ARG, "AMRequestXfer", "segment overflow", AMUDP_ReleaseBuffer(ep, outgoingbuf)); memmove(((int8_t *)ep->segAddr) + dest_offset, source_addr, nbytes); } else { /* mediums still need data copy */ memcpy(GET_MSG_DATA(msg), source_addr, nbytes); } } /* pretend its a recv buffer */ outgoingbuf->status.rx.dest = ep; outgoingbuf->status.rx.sourceId = reply_endpoint; outgoingbuf->status.rx.sourceAddr = destaddress; AMUDP_processPacket(outgoingbuf, 1); AMUDP_ReleaseBuffer(ep, outgoingbuf); } else { /* perform the send */ /* setup data */ if (nbytes > 0) { memcpy(GET_MSG_DATA(msg), source_addr, nbytes); } int retval = sendPacket(ep, msg, msgsz, destaddress, REQUESTREPLY_PACKET); if_pf (retval != AM_OK) { outgoingdesc->buffer = NULL; /* send failed, so message rejected - release buffer */ AMUDP_ReleaseBuffer(ep, outgoingbuf); perProcInfo->instanceHint = instance; AMX_RETURN(retval); } amx_tick_t now = AMX_getCPUTicks(); if (AMUDP_InitialRequestTimeout_us == AMUDP_TIMEOUT_INFINITE) { // never timeout outgoingbuf->status.tx.timestamp = (amx_tick_t)-1; } else { outgoingbuf->status.tx.timestamp = now + REQUEST_TIMEOUT_TICKS(0); } #if AMUDP_COLLECT_LATENCY_STATS outgoingbuf->status.tx.firstSendTime = now; #endif outgoingbuf->status.tx.retryCount = 0; outgoingbuf->status.tx.destId = destP; AMUDP_EnqueueTxBuffer(ep, outgoingbuf); AMUDP_STATS(ep->stats.RequestsSent[category]++); AMUDP_STATS(ep->stats.RequestDataBytesSent[category] += sizeof(int) * numargs + nbytes); AMUDP_STATS(ep->stats.RequestTotalBytesSent[category] += msgsz); } return AM_OK; } /* ------------------------------------------------------------------------------------ */ static int AMUDP_ReplyGeneric(amudp_category_t category, amudp_buf_t *requestbuf, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr, uint8_t systemType, uint8_t systemArg) { ep_t const ep = requestbuf->status.rx.dest; amudp_node_t const destP = requestbuf->status.rx.sourceId; const int isloopback = enEqual(requestbuf->status.rx.sourceAddr, ep->name); amudp_perproc_info_t const * const perProcInfo = &ep->perProcInfo[destP]; /* we don't poll within a reply because by definition we are already polling somewhere in the call chain */ size_t const msgsz = COMPUTE_MSG_SZ(numargs, nbytes); size_t const buffersz = MSGSZ_TO_BUFFERSZ(msgsz); amudp_buf_t * const outgoingbuf = AMUDP_AcquireBuffer(ep, buffersz); amudp_bufdesc_t *outgoingdesc; uint16_t instance; if (isloopback) { #if AMX_DEBUG outgoingdesc = NULL; /* not used */ instance = 0; /* not used */ #endif } else { /* acquire a free descriptor */ /* trivial because replies always overwrite previous reply in request instance */ instance = AMUDP_MSG_INSTANCE(&(requestbuf->msg)); outgoingdesc = GET_REP_DESC(ep, destP, instance); // reply desc alloc in processPacket if (outgoingdesc->buffer) { /* free buffer of previous reply */ AMUDP_ReleaseBuffer(ep, outgoingdesc->buffer); } outgoingdesc->buffer = outgoingbuf; } /* setup message meta-data */ amudp_msg_t * const msg = &outgoingbuf->msg; if (isloopback) AMUDP_MSG_SETFLAGS(msg, FALSE, category, numargs, 0, 0); else AMUDP_MSG_SETFLAGS(msg, FALSE, category, numargs, AMUDP_MSG_SEQNUM(&requestbuf->msg), // clone request seqnum, as rep_desc already inc instance); msg->destOffset = dest_offset; msg->handlerId = handler; msg->nBytes = (uint16_t)nbytes; AMX_assert(systemType == amudp_system_user || systemType == amudp_system_autoreply); AMX_assert(systemArg == 0); msg->systemMessageType = systemType; msg->systemMessageArg = (uint8_t)ep->idHint; msg->tag = perProcInfo->tag; AMX_assert(GET_MSG_SZ(msg) == msgsz); { /* setup args */ int i; uint32_t *args = GET_MSG_ARGS(msg); for (i = 0; i < numargs; i++) { args[i] = (uint32_t)va_arg(argptr, int); /* must be int due to default argument promotion */ } #if USE_CLEAR_UNUSED_SPACE if (i < AMUDP_MAX_SHORT) args[i] = 0; #endif } en_t const destaddress = perProcInfo->remoteName; if (isloopback) { /* run handler synchronously */ if (nbytes > 0) { /* setup data */ if (category == amudp_Long) { /* one-copy */ AMX_CHECK_ERRFRC(dest_offset + nbytes > ep->segLength, BAD_ARG, "AMRequestXfer", "segment overflow", AMUDP_ReleaseBuffer(ep, outgoingbuf)); memmove(((int8_t *)ep->segAddr) + dest_offset, source_addr, nbytes); } else { /* mediums still need data copy */ memcpy(GET_MSG_DATA(msg), source_addr, nbytes); } } /* pretend its a recv buffer */ outgoingbuf->status.rx.dest = ep; outgoingbuf->status.rx.sourceId = destP; outgoingbuf->status.rx.sourceAddr = destaddress; AMUDP_processPacket(outgoingbuf, 1); AMUDP_ReleaseBuffer(ep, outgoingbuf); } else { /* perform the send */ /* setup data */ memcpy(GET_MSG_DATA(msg), source_addr, nbytes); int retval = sendPacket(ep, msg, msgsz, destaddress, REQUESTREPLY_PACKET); if_pf (retval != AM_OK) AMX_RETURN(retval); if (!ep->replyEpoch) ep->replyEpoch = AMX_getCPUTicks(); outgoingbuf->status.tx.timestamp = ep->replyEpoch; AMUDP_STATS(ep->stats.RepliesSent[category]++); AMUDP_STATS(ep->stats.ReplyDataBytesSent[category] += sizeof(int) * numargs + nbytes); AMUDP_STATS(ep->stats.ReplyTotalBytesSent[category] += msgsz); } requestbuf->status.rx.replyIssued = TRUE; return AM_OK; } /*------------------------------------------------------------------------------------ * Request *------------------------------------------------------------------------------------ */ extern int AMUDP_RequestVA(ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, int numargs, va_list argptr) { AMX_CHECKINIT(); AMX_CHECK_ERR(!request_endpoint, BAD_ARG); AMX_CHECK_ERR(AMUDP_BADHANDLERVAL(handler), BAD_ARG); AMX_CHECK_ERR(request_endpoint->depth == -1, NOT_INIT); /* it's an error to call before AM_SetExpectedResources */ AMX_CHECK_ERR(reply_endpoint >= request_endpoint->translationsz, BAD_ARG); AMX_CHECK_ERR(request_endpoint->translation && !request_endpoint->translation[reply_endpoint].inuse, BAD_ARG); AMX_CHECK_ERR(!request_endpoint->translation && reply_endpoint >= request_endpoint->P, BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMUDP_MAX_SHORT); return AMUDP_RequestGeneric(amudp_Short, request_endpoint, reply_endpoint, handler, NULL, 0, 0, numargs, argptr, amudp_system_user, 0); } extern int AMUDP_Request(ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMUDP_RequestVA(request_endpoint, reply_endpoint, handler, numargs, argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_RequestIVA(ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, int numargs, va_list argptr) { AMX_CHECKINIT(); AMX_CHECK_ERR(!request_endpoint, BAD_ARG); AMX_CHECK_ERR(AMUDP_BADHANDLERVAL(handler), BAD_ARG); AMX_CHECK_ERR(request_endpoint->depth == -1, NOT_INIT); /* it's an error to call before AM_SetExpectedResources */ AMX_CHECK_ERR(reply_endpoint >= request_endpoint->translationsz, BAD_ARG); AMX_CHECK_ERR(request_endpoint->translation && !request_endpoint->translation[reply_endpoint].inuse, BAD_ARG); AMX_CHECK_ERR(!request_endpoint->translation && reply_endpoint >= request_endpoint->P, BAD_ARG); AMX_CHECK_ERR(!source_addr && nbytes > 0, BAD_ARG); AMX_CHECK_ERR(nbytes > AMUDP_MAX_MEDIUM, BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMUDP_MAX_SHORT); return AMUDP_RequestGeneric(amudp_Medium, request_endpoint, reply_endpoint, handler, source_addr, nbytes, 0, numargs, argptr, amudp_system_user, 0); } extern int AMUDP_RequestI(ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMUDP_RequestIVA(request_endpoint, reply_endpoint, handler, source_addr, nbytes, numargs, argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_RequestXferVA(ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int async, int numargs, va_list argptr) { AMX_CHECKINIT(); AMX_CHECK_ERR(!request_endpoint, BAD_ARG); AMX_CHECK_ERR(AMUDP_BADHANDLERVAL(handler), BAD_ARG); AMX_CHECK_ERR(request_endpoint->depth == -1, NOT_INIT); /* it's an error to call before AM_SetExpectedResources */ AMX_CHECK_ERR(reply_endpoint >= request_endpoint->translationsz, BAD_ARG); AMX_CHECK_ERR(request_endpoint->translation && !request_endpoint->translation[reply_endpoint].inuse, BAD_ARG); AMX_CHECK_ERR(!request_endpoint->translation && reply_endpoint >= request_endpoint->P, BAD_ARG); AMX_CHECK_ERR(!source_addr && nbytes > 0, BAD_ARG); AMX_CHECK_ERR(nbytes > AMUDP_MAX_LONG, BAD_ARG); AMX_CHECK_ERR(dest_offset > AMUDP_MAX_SEGLENGTH, BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMUDP_MAX_SHORT); amudp_node_t const destP = TRANSID_TO_NODEID(request_endpoint, reply_endpoint); amudp_perproc_info_t const * const perProcInfo = &request_endpoint->perProcInfo[destP]; const int isloopback = enEqual(perProcInfo->remoteName, request_endpoint->name); if (async && !isloopback) { /* decide if we can satisfy request without blocking */ /* it's unclear from the spec whether we should poll before an async failure, * but by definition the app must be prepared for handlers to run when calling this * request, so it shouldn't cause anything to break, and the async request is more likely * to succeed if we do. so: */ AM_Poll(request_endpoint->eb); /* check senddepth */ if (request_endpoint->outstandingRequests >= request_endpoint->sendDepth) AMX_RETURN_ERRFR(IN_USE, AMUDP_RequestXferAsync, "Request can't be satisfied without blocking right now"); /* see if there's a free buffer */ amudp_bufdesc_t * const desc = GET_REQ_DESC_ALLOC(request_endpoint, destP, 0); uint16_t const hint = perProcInfo->instanceHint; int const depth = request_endpoint->depth; int i = hint; AMX_assert(i >= 0 && i < depth); while (1) { if (!desc[i].buffer) break; i = (i+1==depth ? 0 : i+1); if (i == hint) AMX_RETURN_ERRFR(IN_USE, AMUDP_RequestXferAsync, "Request can't be satisfied without blocking right now"); } } /* perform the send */ return AMUDP_RequestGeneric(amudp_Long, request_endpoint, reply_endpoint, handler, source_addr, nbytes, dest_offset, numargs, argptr, amudp_system_user, 0); } extern int AMUDP_RequestXfer(ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int async, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMUDP_RequestXferVA(request_endpoint, reply_endpoint, handler, source_addr, nbytes, dest_offset, async, numargs, argptr); va_end(argptr); return retval; } /*------------------------------------------------------------------------------------ * Reply *------------------------------------------------------------------------------------ */ extern int AMUDP_ReplyVA(void *token, handler_t handler, int numargs, va_list argptr) { AMX_CHECKINIT(); AMX_CHECK_ERR(!token, BAD_ARG); AMX_CHECK_ERR(AMUDP_BADHANDLERVAL(handler), BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMUDP_MAX_SHORT); amudp_buf_t * const buf = (amudp_buf_t *)token; amudp_msg_t * const msg = &buf->msg; // semantic checking on reply AMX_CHECK_ERR(!AMUDP_MSG_ISREQUEST(msg), RESOURCE); /* token is not a request */ AMX_CHECK_ERR(!buf->status.rx.handlerRunning, RESOURCE); /* token is not for an active request */ AMX_CHECK_ERR(buf->status.rx.replyIssued, RESOURCE); /* already issued a reply */ AMX_CHECK_ERR(((amudp_system_messagetype_t)msg->systemMessageType) != amudp_system_user, RESOURCE); /* can't reply to a system message (returned message) */ return AMUDP_ReplyGeneric(amudp_Short, buf, handler, NULL, 0, 0, numargs, argptr, amudp_system_user, 0); } extern int AMUDP_Reply(void *token, handler_t handler, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMUDP_ReplyVA(token, handler, numargs, argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_ReplyIVA(void *token, handler_t handler, void *source_addr, size_t nbytes, int numargs, va_list argptr) { AMX_CHECKINIT(); AMX_CHECK_ERR(!token, BAD_ARG); AMX_CHECK_ERR(AMUDP_BADHANDLERVAL(handler), BAD_ARG); AMX_CHECK_ERR(!source_addr && nbytes > 0, BAD_ARG); AMX_CHECK_ERR(nbytes > AMUDP_MAX_MEDIUM, BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMUDP_MAX_SHORT); amudp_buf_t * const buf = (amudp_buf_t *)token; amudp_msg_t * const msg = &buf->msg; // semantic checking on reply AMX_CHECK_ERR(!AMUDP_MSG_ISREQUEST(msg), RESOURCE); /* token is not a request */ AMX_CHECK_ERR(!buf->status.rx.handlerRunning, RESOURCE); /* token is not for an active request */ AMX_CHECK_ERR(buf->status.rx.replyIssued, RESOURCE); /* already issued a reply */ AMX_CHECK_ERR(((amudp_system_messagetype_t)msg->systemMessageType) != amudp_system_user, RESOURCE); /* can't reply to a system message (returned message) */ return AMUDP_ReplyGeneric(amudp_Medium, buf, handler, source_addr, nbytes, 0, numargs, argptr, amudp_system_user, 0); } extern int AMUDP_ReplyI(void *token, handler_t handler, void *source_addr, size_t nbytes, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMUDP_ReplyIVA(token, handler, source_addr, nbytes, numargs, argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ extern int AMUDP_ReplyXferVA(void *token, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr) { AMX_CHECKINIT(); AMX_CHECK_ERR(!token, BAD_ARG); AMX_CHECK_ERR(AMUDP_BADHANDLERVAL(handler), BAD_ARG); AMX_CHECK_ERR(!source_addr && nbytes > 0, BAD_ARG); AMX_CHECK_ERR(nbytes > AMUDP_MAX_LONG, BAD_ARG); AMX_CHECK_ERR(dest_offset > AMUDP_MAX_SEGLENGTH, BAD_ARG); AMX_assert(numargs >= 0 && numargs <= AMUDP_MAX_SHORT); amudp_buf_t * const buf = (amudp_buf_t *)token; amudp_msg_t * const msg = &buf->msg; // semantic checking on reply AMX_CHECK_ERR(!AMUDP_MSG_ISREQUEST(msg), RESOURCE); /* token is not a request */ AMX_CHECK_ERR(!buf->status.rx.handlerRunning, RESOURCE); /* token is not for an active request */ AMX_CHECK_ERR(buf->status.rx.replyIssued, RESOURCE); /* already issued a reply */ AMX_CHECK_ERR(((amudp_system_messagetype_t)msg->systemMessageType) != amudp_system_user, RESOURCE); /* can't reply to a system message (returned message) */ return AMUDP_ReplyGeneric(amudp_Long, buf, handler, source_addr, nbytes, dest_offset, numargs, argptr, amudp_system_user, 0); } extern int AMUDP_ReplyXfer(void *token, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, ...) { int retval; va_list argptr; va_start(argptr, numargs); /* pass in last argument */ retval = AMUDP_ReplyXferVA(token, handler, source_addr, nbytes, dest_offset, numargs, argptr); va_end(argptr); return retval; } /* ------------------------------------------------------------------------------------ */ extern void AMUDP_DefaultReturnedMsg_Handler(int status, op_t opcode, void *token) { const char *statusStr = "*unknown*"; const char *opcodeStr = "*unknown*"; amudp_buf_t * const buf = (amudp_buf_t *)token; amudp_msg_t * const msg = &buf->msg; int numArgs = AMUDP_MSG_NUMARGS(msg); uint32_t const * const args = GET_MSG_ARGS(msg); char argStr[255]; #define STATCASE(name, desc) case name: statusStr = #name ": " desc; break; switch (status) { STATCASE(EBADARGS , "Arguments to request or reply function invalid "); STATCASE(EBADENTRY , "X-lation table index selected unbound table entry "); STATCASE(EBADTAG , "Sender's tag did not match the receiver's EP tag "); STATCASE(EBADHANDLER , "Invalid index into the recv.'s handler table "); STATCASE(EBADSEGOFF , "Offset into the dest-memory VM segment invalid "); STATCASE(EBADLENGTH , "Bulk xfer length goes beyond a segment's end "); STATCASE(EBADENDPOINT , "Destination endpoint does not exist "); STATCASE(ECONGESTION , "Congestion at destination endpoint "); STATCASE(EUNREACHABLE , "Destination endpoint unreachable "); STATCASE(EREPLYREJECTED, "Destination endpoint refused reply message "); } #define OPCASE(name) case name: opcodeStr = #name; break; switch (opcode) { OPCASE(AM_REQUEST_M); OPCASE(AM_REQUEST_IM); OPCASE(AM_REQUEST_XFER_M); OPCASE(AM_REPLY_M); OPCASE(AM_REPLY_IM); OPCASE(AM_REPLY_XFER_M); } argStr[0] = '\0'; for (int i=0; i < numArgs; i++) { char tmp[20]; sprintf(tmp, "0x%08x ", (int)args[i]); strcat(argStr, tmp); } AMX_FatalErr("An active message was returned to sender,\n" " and trapped by the default returned message handler (handler 0):\n" "Error Code: %s\n" "Message type: %s\n" "Destination: %s (%i)\n" "Handler: %i\n" "Tag: %s\n" "Arguments(%i): %s\n" "Aborting...", statusStr, opcodeStr, AMUDP_enStr(buf->status.rx.sourceAddr, 0), buf->status.rx.sourceId, msg->handlerId, AMUDP_tagStr(msg->tag, 0), numArgs, argStr); } /* ------------------------------------------------------------------------------------ */ #if AMUDP_EXTRA_CHECKSUM static uint16_t checksum(uint8_t const * const data, size_t len) { uint16_t val = 0; for (size_t i=0; i < len; i++) { // a simple, fast, non-secure checksum uint8_t stir = (uint8_t)(i & 0xFF); val = (val << 8) | ( ((val >> 8) & 0xFF) ^ data[i] ^ stir ); } return val; } static void AMUDP_SetChecksum(amudp_msg_t * const m, size_t len) { AMX_assert(len > 0 && len <= AMUDP_MAX_MSG); m->packetlen = (uint32_t)len; uint8_t *data = (uint8_t *)&(m->packetlen); uint16_t chk = checksum(data, len - 4); // checksum includes chk* fields m->chk1 = chk; m->chk2 = chk; } static void AMUDP_ValidateChecksum(amudp_msg_t const * const m, size_t len) { static char report[512]; int failed = 0; { static int firstcall = 1; if (firstcall) AMX_Warn("AMUDP_EXTRA_CHECKSUM is enabled. This mode is ONLY intended for debugging system problems."); firstcall = 0; } if_pf (m->chk1 != m->chk2) { strcat(report, " : Checksum field corrupted"); failed = 1; } if_pf (len != m->packetlen) { strcat(report, " : Length mismatch"); failed = 1; } if_pf (len < AMUDP_MIN_MSG || len > AMUDP_MAX_MSG) { strcat(report, " : Packet length illegal"); failed = 1; } uint8_t const * const data = (uint8_t const *)&(m->packetlen); size_t datalen = len-4; uint16_t recvchk = checksum(data, datalen); if_pf (recvchk != m->chk1) { strcat(report, " : Checksum mismatch on data"); failed = 1; } if_pf (failed) { // further analysis uint8_t val = data[datalen-1]; int rep = 0; for (int i=datalen-1; i >= 0; i--) { if (data[i] == val) rep++; else break; } if (rep > 1) { char tmp[80]; sprintf(tmp," : Final %d bytes are 0x%02x",rep,val); strcat(report,tmp); } AMX_FatalErr("UDP packet failed checksum!\n recvLen: %d packetlen: %d\n chk1:0x%04x chk2:0x%04x recvchk:0x%04x\n Analysis%s", (int)len, (int)m->packetlen, m->chk1, m->chk2, recvchk, report); } } #endif gasnet-2025.8.0/other/amudp/README0000664000175000017500000001563315142313673016541 0ustar alastairalastairAMUDP Documentation =================== Author: Dan Bonachea and Dan Hettena Contact email: gasnet-devel@lbl.gov Home page: https://gasnet.lbl.gov/amudp AMUDP is an implementation of the AM-2 specification over UDP/IP. AMUDP is a portable implementation of the AM-2 specification that runs on UDP, a standard component of the TCP/IP protocol suite that is ubiquitous across platforms and operating systems. The intent is a fully-portable implementation that will work on any POSIX-like system. We don't expect to achieve latency performance competitive with a native implementation of AM optimized for special purpose hardware, instead we seek to provide a compatibility layer that will allow AM-based systems to quickly get up and running on virtually any platform. The motivation for choosing UDP over other protocols (such as TCP) is that it typically provides the lowest overhead access to the network with little or no internal buffering, and the connectionless model is best suited for scaling up the number of distributed processors. Because UDP occasionally drops packets, we add a thin reliability layer that provides the guaranteed delivery required by AM-2, hopefully providing this fault tolerance with better performance than full-blown TCP. Design documentation for the original AMUDP implementation is available from the website above. The current version of AMUDP strictly targets the BSD/POSIX sockets layer - it no longer supports UFXP or native MS Windows sockets, although Windows support is available via the Cygwin POSIX environment for Windows (http://cygwin.com), and the Windows Subsystem for Linux (WSL). AMUDP includes an extension interface called AMUDP_SPMD that performs job spawning and initialization services, using either ssh or a provided site-specific job spawner. See the paper above and test code for details. AMUDP is used to implement the GASNet communication system (https://gasnet.lbl.gov). Further documentation about using AMUDP is available in the udp-conduit documentation: https://gasnet.lbl.gov/dist/udp-conduit/README Requirements ------------ * C99 and C++98 compilers. The C++ STL is not used in any way. * A POSIX-like environment, including BSD/POSIX sockets and file descriptors * GNU Make and basic UNIX tools for the provided Makefiles Limitations ----------- AMUDP has a few notable departures from the AM-2 specification: * The client must call AM_SetExpectedResources() exactly once on an endpoint after setting up the translation table and before making any calls to the transport functions (AM_Poll, AM_Reply* or AM_Request*). It is also an error to call AM_Map, AM_MapAny or AM_Unmap (which change the translation table) after the call to AM_SetExpectedResources(). * AM_PAR bundle/endpoint access is not implemented - this means AMUDP does not provide thread safety, but can be used in a thread-funneled or thread-serialized mode with locking at the client level. * The nbytes argument to Medium and Long AM handlers has type `size_t` * AM_GetXferM is not implemented. * Clients should not take the address of AM_ entry point "functions", because many are implemented as macros. Change Log ---------- AMUDP 3.21 (08/2025) - Allow zero-byte Long AMs without validation of address against segment bounds, aligning the behavior with the GASNet-EX specification where the AM-2 specification leaves the behavior in such cases unspecified. AMUDP 3.20 (12/2023) - Implement new extension AMX_GetTokenInfo() - Improve warning messages about environment variables to more uniformly reference the prefixed variable name. - Improved error reporting from the default AM handler AMUDP 3.19 (09/2022) - amudprun now supports multiple verbosity levels through repeated -v arguments - New envvar AMUDP_SPAWN_VERBOSE now controls spawn-related verbose output, AMUDP_VERBOSEENV now specifically controls envvar-related output. - New envvars SOCKETBUFFER_{INITIAL,MAX} now allow manual control over library requests made for kernel-level socket buffers. AMUDP 3.18 (03/2021) - Add AMUDP_SPMDSetProc and envvar WORKER_RANK to support explicit rank assignment AMUDP 3.17 (10/2020) - Remove BLCR support - This version breaks compatibility of the amudprun spawner with prior versions AMUDP 3.16 (03/2020) - Improved startup error checking and reporting for DNS misconfigurations AMUDP 3.15 (06/2018) - Medium and Long AM handlers change in signature on 64-bit platforms: the nbytes argument now has type size_t instead of int - New AMUDP_LIBRARY_VERSION_{MAJOR,MINOR} defines - Fix compatibility issues with PGI C++ 17+ - Significant rearrangement of internal files and utilities - AM Handler dispatching code is now strictly spec-compliant - AMX_ENV_PREFIX_STR is now the preferred define for setting a client ENV prefix - Several pseudo-public programmatic knobs renamed into the AMX_ namespace - Bug 2774: source_addr to Med/Long injection is now ignored for nbytes=0 - Fix an unreported cosmetic output bug in AMX_RETURN error reporting AMUDP 3.14 (03/2017) - Fix AM_{Get,Set}NumHandlers and AM_MoveEndpoint - Fix bug 3379: workaround a PGI optimizer bug on Darwin - Export AMUDP_enEqual - make run-tests now outputs summary results at the end - Fix some harmless warnings about unused variables - Renamed portable_platform.h - Remove Makefile.darwin (no longer necessary) - Fix compilation errors in verbose debug mode - Update contact email AMUDP 3.13 (10/2016) - Restructure network buffer management to provide scalable buffer memory utilization to thousands of nodes and beyond. - Adjust the set of available environment tuning knobs for better control of transfer performance at scale. - Adjust default transfer parameters for better performance on 1GbE - Numerous misc changes to improve performance - Restructure AMUDP headers to reduce namespace clutter - Expose AMUDP_SetTranslationTag - Fix possible syntax errors with AM expression arguments - Fix a compatibility issue with Cray CNL - Fix a use-after-free bug in argument processing - Fix a data corruption issue on 64-bit OSX on PowerPC - Use realloc when appropriate to manage internal state AMUDP 3.12 (06/2016) - Add BLCR support - Improve stdout/stderr routing to be more robust and use fewer descriptors - Add AMUDP_ENV_CMD and AMUDP_LINEBUFFERSZ - Remove UETH/UFXP support - Remove GLUNIX and REXEC spawn support - Remove support for HPUX, SuperUX, MTX, Catamount, and native Win32 (use cygwin instead) - Remove some obsolete files Fix three significant bugs: - Out-of-order delivery of UDP messages (which can occur on networks with multiple paths) was going undetected and could lead to silent loss and/or erroneous redelivery of AMs in the presence of retransmissions (caused by packet loss or high network load). - On Cygwin 2.5 (2016-04-11 and later), ioctl(FIONREAD) always returns failure, was rendering AMUDP entirely unusable on that platform. - On FreeBSD, ioctl(FIONREAD) may truncate long datagrams to around 600 bytes, was rendering AMUDP unusable on that platform. gasnet-2025.8.0/other/amudp/socklist.h0000664000175000017500000000335015142313673017656 0ustar alastairalastair// $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/socklist.h $ // Description: // Copyright 2000, Dan Bonachea #ifndef _SOCKLIST_H #define _SOCKLIST_H #include #include "socket.h" #ifdef SOCKLIST_MT #include "semaphor.h" #endif class SocketList { private: SOCKET *table; unsigned long count; unsigned long size; unsigned long maxfd; fd_set prvSet; #ifdef SOCKLIST_MT static semaphore lock; #endif int TS; // threadsafe? bool prvlookup(SOCKET s); // used for locking public: SocketList(unsigned long maxsize, bool ThreadSafe=false); SocketList(SocketList& other); // copy ctr ~SocketList(); void clear(); unsigned long getCount(void) { return count; } unsigned long getMaxFd(void) { return maxfd; } #ifdef SOCKLIST_MT void setThreadSafe(int ThreadSafe) { TS = ThreadSafe; } #endif bool insert(SOCKET s); // return TRUE on success, false otherwise (full or reinsert) bool remove(SOCKET s); // return TRUE on success, false otherwise (not present) bool lookup(SOCKET s); // return TRUE on success, false otherwise (not present) SOCKET operator[](unsigned long index); // note: data gets rearranged on insert/remove // this operator is disallowed for threadsafe lists fd_set* makeFD_SET(fd_set* set); // make an fd_set using contents (very efficient) SOCKET *getIntersection(fd_set* set, SOCKET* buffer, int* size); // writes a list of sockets that appear in this list and set into buffer // size returns with num of values written, up to size int getIntersection(fd_set* set, SOCKET* buffer, int bufsiz); // same as above except return the number matched }; #endif gasnet-2025.8.0/other/amudp/amudp_spmd.h0000664000175000017500000001566415142313673020167 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/amudp_spmd.h $ * Description: AMUDP Header for SPMD interface * Copyright 2000, Dan Bonachea */ #ifndef __AMUDP_SPMD_H #define __AMUDP_SPMD_H #include AMUDP_BEGIN_EXTERNC /* idiot proofing */ #undef AMUDP_SPMDStartup #define AMUDP_SPMDStartup AMX_CONCAT(AMUDP_SPMDStartup_AMUDP,AMUDP_DEBUG_CONFIG) /* ------------------------------------------------------------------------------------ */ /* AMUDP SPMD Entry Points */ typedef int (*amudp_spawnfn_t)(int nproc, int argc, char **argv, char **extra_env); /* return non-zero if successful */ extern int AMUDP_SPMDStartup(int *argc, char ***argv, int nproc, int networkdepth, amudp_spawnfn_t spawnfn, uint64_t *networkpid, eb_t *eb, ep_t *ep); /* should be always be called by program to initialize parallel job before parsing command line arguments * On master processor, this call will never return if successful. * Instead, it will block for the duration of the job and behave as the console * It will call the spawnfn with the proper argc/argv to be used in spawning the worker threads * On worker processors, this call will modify the argc/argv params, call AM_Init, * and then return a bundle and endpoint properly configured for use with the SPMD job * (translation table will be filled in, AM_SetExpectedResources called, and each worker given a unique tag) * worker processors should setup handler table for the endpoint and call SPMDBarrier before starting communication * Arguments: * argc/argv - should be the unchanged ones passed to main, may return changed * nproc - the number of SPMD worker processors. 0 to read from arguments (ignored on workers) * networkdepth - desired network depth hint (0 for default) (ignored on workers) * spawnfn - callback function to be used in spawning workers from the master (ignored on workers) * this function may do arbitrary work, but the end result must be that nproc worker processes * are created somewhere on the accessible network, which then subsequently call AMUDP_SPMDStartup with the given args * the worker processes created MUST be all be in different address spaces (i.e. can't just create a thread) * may be one of special functions provided below (e.g. AMUDP_SPMDLocalSpawn) * passing NULL will give the user a choice amongst the library-provided spawn functions * networkpid - returns a globally unique pid for this job which is identical on all works (can be NULL for don't care) (ignored on master) * eb, ep - variables to receive newly allocated bundle and endpoint on workers (ignored on master) */ extern int AMUDP_SPMDExit(int exitcode); /* terminate the parallel job with given exit code (also handles AM_Terminate) */ typedef void (*amudp_exitcallback_t)(int); extern int AMUDP_SPMDSetExitCallback(amudp_exitcallback_t); /* register a function to be called when AMUDP_SPMDExit is called by any node * exit code is passed */ extern void (*AMUDP_SPMDkillmyprocess)(int); /* function used to finally kill the process (_exit by default) */ extern int AMUDP_SPMDIsWorker(char **argv); /* given the initial command line arguments, determine whether this process is a * worker process created by the AMUDP SPMD job startup API */ extern int AMUDP_SPMDNumProcs(void); /* return the number of processors in the parallel job */ extern int AMUDP_SPMDMyProc(void); /* return a zero-based unique identifier of this processor in the parallel job */ extern void AMUDP_SPMDSetProc(int rank); /* programmatically force a rank assignment for the calling worker process. * ignoring the WORKER_RANK envvar (if any). * May only be called collectively by all workers before AMUDP_SPMDStartup with disjoint * rank ids in 0..NumProcs-1. Not supported for local spawn. */ extern int AMUDP_SPMDBarrier(void); /* block until all SPMD processors call this function, * and poll the SPMD endpoint while waiting * a slow, but functional barrier that is advisable to call after setting up handlers * but before making transport calls, to prevent returned messages due to races */ extern const char* AMUDP_SPMDgetenvMaster(const char *keyname); /* This function is the global analog of the C library function getenv() * It reads variables from the environment of the SPMD master as it appeared at spawn time * returns NULL if the given keyname did not appear in the environment, * or if AMUDP_SPMDStartup() hasn't been successfully called yet * the string returned should never be modified by the caller */ extern const char *AMUDP_check_env_prefix(const char* prefix); /* This function searches the environment of the SPMD master as it appeared at spawn time * for any variable name with the given prefix. Returns an arbitary matching * "VAR=VAL" string if any is found, and NULL otherwise */ extern int AMUDP_SPMDAllGather(void *source, void *dest, size_t len); /* AMUDP_SPMDAllGather: gather len bytes from source buf on each node, concatenate them and write them into the dest buffer (which must have length len*numnodes) in rank order */ /* ------------------------------------------------------------------------------------ */ /* AMUDP SPMD Spawning functions * some useful library-provided spawning functions, * which can be passed to AMUDP_Startup * (should never be called directly) * you can always write your own to suit your environment, of course * (see amudp_spawn.c for several examples) */ extern int AMUDP_SPMDLocalSpawn(int nproc, int argc, char **argv, char **extra_env); /* fork/exec the worker processes on this machine */ extern int AMUDP_SPMDSshSpawn(int nproc, int argc, char **argv, char **extra_env); /* call ssh remote shell */ extern int AMUDP_SPMDCustomSpawn(int nproc, int argc, char **argv, char **extra_env); typedef struct { char abbrev; const char *desc; amudp_spawnfn_t fnptr; } amudp_spawnfn_desc_t; extern amudp_spawnfn_desc_t const AMUDP_Spawnfn_Desc[]; /* null-terminated array of spawn functions available, with descriptions */ /* ------------------------------------------------------------------------------------ */ /* standardized AM-2 extensions */ #define AMX_SPMDgetenvMaster AMUDP_SPMDgetenvMaster #define AMX_SPMDBarrier AMUDP_SPMDBarrier #define AMX_SPMDNumProcs AMUDP_SPMDNumProcs #define AMX_SPMDMyProc AMUDP_SPMDMyProc #define AMX_SPMDExit AMUDP_SPMDExit #define AMX_SPMDSetExitCallback AMUDP_SPMDSetExitCallback #define AMX_SPMDkillmyprocess AMUDP_SPMDkillmyprocess #define AMX_SPMDIsWorker AMUDP_SPMDIsWorker #define AMX_SPMDAllGather AMUDP_SPMDAllGather #define AMX_SPMDStartup(pargc, pargv, networkdepth, pnetworkpid, peb, pep) \ AMUDP_SPMDStartup((pargc), (pargv), 0, (networkdepth), NULL, (pnetworkpid), (peb), (pep)) AMUDP_END_EXTERNC #endif gasnet-2025.8.0/other/amudp/socklist.cpp0000664000175000017500000000551515142313673020216 0ustar alastairalastair// $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/socklist.cpp $ // Description: // Copyright 2000, Dan Bonachea #include #include "socklist.h" #ifdef SOCKLIST_MT semaphore SocketList::lock("socketlist"); #define LOCK do { if (TS) lock.wait(); } while (0) #define UNLOCK do { if (TS) lock.signal(); } while (0) #else #define LOCK #define UNLOCK #endif SocketList::SocketList(unsigned long maxsize, bool ThreadSafe) { size = maxsize; table = new SOCKET[maxsize]; count = 0; maxfd = 0; FD_ZERO(&prvSet); TS = ThreadSafe; } SocketList::~SocketList() { delete table; } void SocketList::clear() { LOCK; count = 0; maxfd = 0; FD_ZERO(&prvSet); UNLOCK; return; } bool SocketList::insert(SOCKET s) { LOCK; if (count >= size) { UNLOCK; return false; } if (prvlookup(s)) { UNLOCK; return false; } table[count] = s; count++; if (s > maxfd) maxfd = s; FD_SET(s, &prvSet); UNLOCK; return true; } bool SocketList::remove(SOCKET s) { LOCK; for (unsigned long i=0; i < count; i++) { if (table[i] == s) { table[i] = table[--count]; FD_CLR(s, &prvSet); if (maxfd == s) { maxfd = 0; for (unsigned long j=0; j < count; j++) { if (table[j] > maxfd) maxfd = table[j]; } } UNLOCK; return true; } } UNLOCK; return false; } SOCKET SocketList::operator[](unsigned long index) { // note: data gets rearranged on insert/remove assert(index < count && !TS); return table[index]; } bool SocketList::prvlookup(SOCKET s) { for (unsigned long i=0; i < count; i++) if (table[i] == s) return true; return false; } bool SocketList::lookup(SOCKET s) { LOCK; bool retval = prvlookup(s); UNLOCK; return retval; } fd_set* SocketList::makeFD_SET(fd_set* set) { LOCK; memcpy(set, &prvSet, sizeof(fd_set)); UNLOCK; return set; } int SocketList::getIntersection(fd_set* set, SOCKET* buffer, int bufsiz) { getIntersection(set, buffer, &bufsiz); return bufsiz; } SOCKET* SocketList::getIntersection(fd_set* set, SOCKET* buffer, int* sz) { LOCK; // writes a list of sockets that appear in this list and set into buffer unsigned long cur = 0; for (unsigned long i=0; i < count && cur < (unsigned long)*sz; i++) { if (FD_ISSET(table[i], set)) { buffer[cur++] = table[i]; } } *sz = cur; UNLOCK; return buffer; } SocketList::SocketList(SocketList& other) { // copy ctr #ifdef SOCKLIST_MT int locked = (TS || other.TS); if (locked) lock.wait(); #endif count = other.count; maxfd = other.maxfd; size = other.size; table = new SOCKET[size]; for (unsigned long i=0; i < count; i++) { table[i] = other.table[i]; } memcpy(&prvSet,&other.prvSet,sizeof(fd_set)); #ifdef SOCKLIST_MT if (locked) lock.signal(); #endif } gasnet-2025.8.0/other/amudp/amudp.h0000664000175000017500000012717315142313673017143 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/amudp.h $ * Description: AMUDP Header * Copyright 2000, Dan Bonachea */ #ifndef __AMUDP_H #define __AMUDP_H #include #include #include /* for sockaddr_in */ #include #include /* naming policy: AM-defined things start with AM_ internal things start with amudp_ or AMUDP_ */ #ifdef __cplusplus #define AMUDP_BEGIN_EXTERNC extern "C" { #define AMUDP_END_EXTERNC } #define AMUDP_EXTERNC extern "C" #else #define AMUDP_BEGIN_EXTERNC #define AMUDP_END_EXTERNC #define AMUDP_EXTERNC extern #endif AMUDP_BEGIN_EXTERNC /* ------------------------------------------------------------------------------------ */ /* User-visible types */ /* Endpoint tag */ typedef uint64_t tag_t; /* Handler index */ typedef uint8_t handler_t; #define AMUDP_BADHANDLERVAL(h) (0) /* #define AMUDP_BADHANDLERVAL(h) (h < 0 || h >= AMUDP_MAX_NUMHANDLERS) */ /* Endpoint name */ typedef uint32_t amudp_node_t; typedef struct sockaddr_in en_t; /* CPU ticks */ #define _AMX_TICK_T typedef uint64_t amx_tick_t; typedef enum { amudp_Short=0, amudp_Medium=1, amudp_Long=2, amudp_NumCategories=3 } amudp_category_t; /* statistical collection * changes here need to also be reflected in the initialization vector AMUDP_initial_stats */ typedef struct { uint64_t RequestsSent[amudp_NumCategories]; uint64_t RepliesSent[amudp_NumCategories]; uint64_t RequestsRetransmitted[amudp_NumCategories]; uint64_t RepliesRetransmitted[amudp_NumCategories]; uint64_t RepliesSquashed[amudp_NumCategories]; uint64_t RequestsReceived[amudp_NumCategories]; /* includes retransmits */ uint64_t RepliesReceived[amudp_NumCategories]; /* includes retransmits */ uint64_t ReturnedMessages; uint64_t OutOfOrderRequests; uint64_t OutOfOrderReplies; amx_tick_t RequestMinLatency; /* in CPU ticks, only if AMUDP_COLLECT_LATENCY_STATS */ amx_tick_t RequestMaxLatency; /* in CPU ticks, only if AMUDP_COLLECT_LATENCY_STATS */ amx_tick_t RequestSumLatency; /* in CPU ticks, only if AMUDP_COLLECT_LATENCY_STATS */ uint64_t RequestDataBytesSent[amudp_NumCategories]; /* total of args + data payload */ uint64_t ReplyDataBytesSent[amudp_NumCategories]; /* total of args + data payload */ uint64_t RequestTotalBytesSent[amudp_NumCategories]; /* total of args + data payload */ uint64_t ReplyTotalBytesSent[amudp_NumCategories]; /* total of args,payload and overhead */ uint64_t TotalBytesSent; /* total user level packet sizes for all req/rep */ } amudp_stats_t; typedef void (*amudp_handler_fn_t)(); /* prototype for handler function */ /* Endpoint bundle object */ struct amudp_eb; typedef struct amudp_eb *eb_t; /* Endpoint object */ struct amudp_ep; typedef struct amudp_ep *ep_t; /* * Op codes for the AM error handler (opcode). */ typedef int op_t; /* * Error codes for the AM error handler (status). */ #define EBADARGS 1 /* Arguments to request or reply function invalid */ #define EBADENTRY 2 /* X-lation table index selected unbound table entry */ #define EBADTAG 3 /* Sender's tag did not match the receiver's EP tag */ #define EBADHANDLER 4 /* Invalid index into the recv.'s handler table */ #define EBADSEGOFF 5 /* Offset into the dest-memory VM segment invalid */ #define EBADLENGTH 6 /* Bulk xfer length goes beyond a segment's end */ #define EBADENDPOINT 7 /* Destination endpoint does not exist */ #define ECONGESTION 8 /* Congestion at destination endpoint */ #define EUNREACHABLE 9 /* Destination endpoint unreachable */ #define EREPLYREJECTED 10 /* Destination endpoint refused reply message */ /* ------------------------------------------------------------------------------------ */ /* AMUDP-specific user entry points */ // programmatic tuning knobs extern int AMUDP_PoliteSync; /* set to non-zero for polite blocking while awaiting send resources */ extern int AMX_VerboseErrors; /* set to non-zero for verbose error reporting */ extern int AMX_SilentMode; /* set to non-zero to silence any non-error output */ extern const char *AMX_ProcessLabel; /* human-readable label for this process */ #ifdef __GNUC__ __attribute__((__format__ (__printf__, 1, 2))) #endif extern void AMX_FatalErr(const char *msg, ...); /* set the UDP interface (local IP address) to be used for new endpoints - * it's necessary to call this on multi-homed hosts, otherwise endpoint creation will fail */ extern int AMUDP_SetUDPInterface(uint32_t IPAddress); /* statistical collection */ extern int AMUDP_GetEndpointStatistics(ep_t ep, amudp_stats_t *stats); /* get ep counters */ extern int AMUDP_ResetEndpointStatistics(ep_t ep); /* reset ep counters */ extern int AMUDP_AggregateStatistics(amudp_stats_t *runningsum, amudp_stats_t *newvalues); /* aggregate statistics - augment running sum with the given values (fp is a FILE *) */ extern const char *AMUDP_DumpStatistics(void *fp, amudp_stats_t *stats, int globalAnalysis); /* output stats to fp (if non-null) in human-readable form. * return a pointer to the same output in an internal static buffer (rewritten on each call) * pass globalAnalysis non-zero if stats is a global agreggation across all nodes */ extern const amudp_stats_t AMUDP_initial_stats; /* the "empty" values for counters */ /* set the client callback fns to run before/after handler execution (callback fns may _NOT_ make any AMMPI calls, directly or indirectly) set to NULL for none */ typedef void (*AMUDP_preHandlerCallback_t)(amudp_category_t cat, int isReq, int handlerId, void *token, void *buf, size_t nbytes, int numargs, uint32_t *args); typedef void (*AMUDP_postHandlerCallback_t)(amudp_category_t cat, int isReq); extern int AMUDP_SetHandlerCallbacks(ep_t ep, AMUDP_preHandlerCallback_t preHandlerCallback, AMUDP_postHandlerCallback_t postHandlerCallback); extern int AMUDP_SPMDHandleControlTraffic(int *controlMessagesServiced); /* ------------------------------------------------------------------------------------ */ /* AM-2 Entry Points */ /* strictly speaking, many of these AM entry points should be true-blue functions (so, for example, a user could create a function pointer to them) but that seems a silly justification, so we went with macros on many of them in the interests of performance */ #ifdef AMUDP_COEXIST_WITH_AM /* allow linking with another library that also implements AM - rename entry points * note this still does not allow the same .c file to use both AM implementations * (any given file should #include at most one AM header file) */ #define AM_Init AMUDP_Init #define AM_Terminate AMUDP_Terminate #define AM_AllocateBundle AMUDP_AllocateBundle #define AM_AllocateEndpoint AMUDP_AllocateEndpoint #define AM_FreeBundle AMUDP_FreeBundle #define AM_FreeEndpoint AMUDP_FreeEndpoint #define AM_MoveEndpoint AMUDP_MoveEndpoint #define AM_GetSeg AMUDP_GetSeg #define AM_SetSeg AMUDP_SetSeg #define AM_MaxSegLength AMUDP_MaxSegLength #define AM_GetTag AMUDP_GetTag #define AM_SetTag AMUDP_SetTag #define AM_Map AMUDP_Map #define AM_MapAny AMUDP_MapAny #define AM_UnMap AMUDP_UnMap #define AM_GetNumTranslations AMUDP_GetNumTranslations #define AM_SetNumTranslations AMUDP_SetNumTranslations #define AM_GetTranslationInuse AMUDP_GetTranslationInuse #define AM_GetTranslationTag AMUDP_GetTranslationTag #define AM_GetTranslationName AMUDP_GetTranslationName #define AM_SetExpectedResources AMUDP_SetExpectedResources #define _AM_SetHandler AMUDP_SetHandler #define _AM_SetHandlerAny AMUDP_SetHandlerAny #define AM_GetEventMask AMUDP_GetEventMask #define AM_SetEventMask AMUDP_SetEventMask #define AM_WaitSema AMUDP_WaitSema #define AM_GetSourceEndpoint AMUDP_GetSourceEndpoint #define AM_GetDestEndpoint AMUDP_GetDestEndpoint #define AM_GetMsgTag AMUDP_GetMsgTag #define AM_Poll AMUDP_Poll #endif /* standardized AM-2 extensions */ #define AMX_SetTranslationTag AMUDP_SetTranslationTag #define AMX_GetEndpointStatistics AMUDP_GetEndpointStatistics #define AMX_DumpStatistics AMUDP_DumpStatistics #define AMX_AggregateStatistics AMUDP_AggregateStatistics #define AMX_initial_stats AMUDP_initial_stats #define amx_stats_t amudp_stats_t #define amx_handler_fn_t amudp_handler_fn_t #define AMX_GetSourceId AMUDP_GetSourceId #define AMX_enEqual AMUDP_enEqual #define AMX_GetTokenInfo AMUDP_GetTokenInfo #define amx_category_t amudp_category_t #define amx_Short amudp_Short #define amx_Medium amudp_Medium #define amx_Long amudp_Long #undef AM_Init #define AM_Init AMX_CONCAT(AM_Init_AMUDP,AMUDP_DEBUG_CONFIG) /* System parameters */ extern int AM_MaxSegLength(uintptr_t* nbytes); /* System initialization/termination */ extern int AM_Init(void); extern int AM_Terminate(void); /* endpoint/bundle management */ extern int AM_AllocateBundle(int type, eb_t *endb); extern int AM_AllocateEndpoint(eb_t bundle, ep_t *endp, en_t *endpoint_name); extern int AM_FreeBundle(eb_t bundle); extern int AM_FreeEndpoint(ep_t ea); extern int AM_MoveEndpoint(ep_t ea, eb_t from_bundle, eb_t to_bundle); extern int AM_GetSeg(ep_t ea, void **addr, uintptr_t *nbytes); extern int AM_SetSeg(ep_t ea, void *addr, uintptr_t nbytes); extern int AM_GetTag(ep_t ea, tag_t *tag); extern int AM_SetTag(ep_t ea, tag_t tag); /* Translation table */ extern int AM_Map(ep_t ea, int index, en_t name, tag_t tag); extern int AM_MapAny(ep_t ea, int *index, en_t name, tag_t tag); extern int AM_UnMap(ep_t ea, int index); extern int AM_GetTranslationInuse(ep_t ea, int i); extern int AM_GetTranslationTag(ep_t ea, int i, tag_t *tag); extern int AM_GetTranslationName(ep_t ea, int i, en_t *gan); extern int AM_GetNumTranslations(ep_t ep, int *pntrans); extern int AM_SetNumTranslations(ep_t ep, int ntrans); extern int AM_SetExpectedResources(ep_t ea, int n_endpoints, int n_outstanding_requests); extern int AMUDP_SetTranslationTag(ep_t ea, int index, tag_t tag); /* extension: legal after AM_SetExpectedResources */ /* Handler table */ extern int _AM_SetHandler(ep_t ea, handler_t handler, amudp_handler_fn_t function); #define AM_SetHandler(ea, handler, function) _AM_SetHandler((ea), (handler), (amudp_handler_fn_t)(function)) extern int _AM_SetHandlerAny(ep_t ea, handler_t *handler, amudp_handler_fn_t function); #define AM_SetHandlerAny(ea, handler, function) _AM_SetHandlerAny((ea), (handler), (amudp_handler_fn_t)(function)) /* Events */ extern int AM_GetEventMask(eb_t eb, int *mask); extern int AM_SetEventMask(eb_t eb, int mask); extern int AM_WaitSema(eb_t eb); /* Message interrogation */ extern int AM_GetSourceEndpoint(void *token, en_t *gan); extern int AM_GetDestEndpoint(void *token, ep_t *endp); extern int AM_GetMsgTag(void *token, tag_t *tagp); extern int AMUDP_GetSourceId(void *token, int *srcid); /* srcid retrieves a compressed id */ extern int AMUDP_enEqual(en_t en1, en_t en2); extern int AMUDP_GetTokenInfo(void *token, handler_t *handler, amudp_category_t *cat, int *is_req); /* Poll */ extern int AM_Poll(eb_t bundle); /* Requests and Replies These six functions do all requests and replies. Macros below expand all the variants */ extern int AMUDP_Request(ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, int numargs, ...); extern int AMUDP_RequestI (ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, int numargs, ...); extern int AMUDP_RequestXfer(ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int async, int numargs, ...); extern int AMUDP_Reply(void *token, handler_t handler, int numargs, ...); extern int AMUDP_ReplyI(void *token, handler_t handler, void *source_addr, size_t nbytes, int numargs, ...); extern int AMUDP_ReplyXfer(void *token, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, ...); /* alternate forms that take va_list ptr to support GASNet */ extern int AMUDP_RequestVA(ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, int numargs, va_list argptr); extern int AMUDP_RequestIVA(ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, int numargs, va_list argptr); extern int AMUDP_RequestXferVA(ep_t request_endpoint, amudp_node_t reply_endpoint, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int async, int numargs, va_list argptr); extern int AMUDP_ReplyVA(void *token, handler_t handler, int numargs, va_list argptr); extern int AMUDP_ReplyIVA(void *token, handler_t handler, void *source_addr, size_t nbytes, int numargs, va_list argptr); extern int AMUDP_ReplyXferVA(void *token, handler_t handler, void *source_addr, size_t nbytes, uintptr_t dest_offset, int numargs, va_list argptr); /* we cast to int32_t here to simulate function call - AM says these functions take 32-bit int args, * so this cast accomplishes the conversion to integral type for floating-point actuals, and * the truncation which might happen to long integer actuals * note the C compiler will subsequently apply default argument promotion to these arguments * (because these arguments fall within the ellipses (...) of the called functions) * which means they'll subsequently be promoted to int (which may differ from int32_t) */ #define AM_Request0(ep, destep, hnum) \ AMUDP_Request(ep, destep, hnum, 0) #define AM_Request1(ep, destep, hnum, a0) \ AMUDP_Request(ep, destep, hnum, 1, (int32_t)(a0)) #define AM_Request2(ep, destep, hnum, a0, a1) \ AMUDP_Request(ep, destep, hnum, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_Request3(ep, destep, hnum, a0, a1, a2) \ AMUDP_Request(ep, destep, hnum, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_Request4(ep, destep, hnum, a0, a1, a2, a3) \ AMUDP_Request(ep, destep, hnum, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_Request5(ep, destep, hnum, a0, a1, a2, a3, a4) \ AMUDP_Request(ep, destep, hnum, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_Request6(ep, destep, hnum, a0, a1, a2, a3, a4, a5) \ AMUDP_Request(ep, destep, hnum, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_Request7(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6) \ AMUDP_Request(ep, destep, hnum, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_Request8(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7) \ AMUDP_Request(ep, destep, hnum, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_Request9(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMUDP_Request(ep, destep, hnum, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_Request10(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMUDP_Request(ep, destep, hnum, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_Request11(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMUDP_Request(ep, destep, hnum, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_Request12(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMUDP_Request(ep, destep, hnum, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_Request13(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMUDP_Request(ep, destep, hnum, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_Request14(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMUDP_Request(ep, destep, hnum, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_Request15(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMUDP_Request(ep, destep, hnum, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_Request16(ep, destep, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMUDP_Request(ep, destep, hnum, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_RequestI0(ep, destep, hnum, sa, cnt) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 0) #define AM_RequestI1(ep, destep, hnum, sa, cnt, a0) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 1, (int32_t)(a0)) #define AM_RequestI2(ep, destep, hnum, sa, cnt, a0, a1) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_RequestI3(ep, destep, hnum, sa, cnt, a0, a1, a2) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_RequestI4(ep, destep, hnum, sa, cnt, a0, a1, a2, a3) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_RequestI5(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_RequestI6(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_RequestI7(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_RequestI8(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_RequestI9(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_RequestI10(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_RequestI11(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_RequestI12(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_RequestI13(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_RequestI14(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_RequestI15(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_RequestI16(ep, destep, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMUDP_RequestI(ep, destep, hnum, sa, cnt, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_RequestXfer0(ep, destep, desto, hnum, sa, cnt) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 0) #define AM_RequestXfer1(ep, destep, desto, hnum, sa, cnt, a0) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 1, (int32_t)(a0)) #define AM_RequestXfer2(ep, destep, desto, hnum, sa, cnt, a0, a1) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_RequestXfer3(ep, destep, desto, hnum, sa, cnt, a0, a1, a2) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_RequestXfer4(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_RequestXfer5(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_RequestXfer6(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_RequestXfer7(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_RequestXfer8(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_RequestXfer9(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_RequestXfer10(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_RequestXfer11(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_RequestXfer12(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_RequestXfer13(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_RequestXfer14(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_RequestXfer15(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_RequestXfer16(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 0, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_RequestXferAsync0(ep, destep, desto, hnum, sa, cnt) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 0) #define AM_RequestXferAsync1(ep, destep, desto, hnum, sa, cnt, a0) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 1, (int32_t)(a0)) #define AM_RequestXferAsync2(ep, destep, desto, hnum, sa, cnt, a0, a1) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_RequestXferAsync3(ep, destep, desto, hnum, sa, cnt, a0, a1, a2) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_RequestXferAsync4(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_RequestXferAsync5(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_RequestXferAsync6(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_RequestXferAsync7(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_RequestXferAsync8(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_RequestXferAsync9(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_RequestXferAsync10(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_RequestXferAsync11(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_RequestXferAsync12(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_RequestXferAsync13(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_RequestXferAsync14(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_RequestXferAsync15(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_RequestXferAsync16(ep, destep, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMUDP_RequestXfer(ep, destep, hnum, sa, cnt, desto, 1, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_Reply0(token, hnum) \ AMUDP_Reply(token, hnum, 0) #define AM_Reply1(token, hnum, a0) \ AMUDP_Reply(token, hnum, 1, (int32_t)(a0)) #define AM_Reply2(token, hnum, a0, a1) \ AMUDP_Reply(token, hnum, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_Reply3(token, hnum, a0, a1, a2) \ AMUDP_Reply(token, hnum, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_Reply4(token, hnum, a0, a1, a2, a3) \ AMUDP_Reply(token, hnum, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_Reply5(token, hnum, a0, a1, a2, a3, a4) \ AMUDP_Reply(token, hnum, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_Reply6(token, hnum, a0, a1, a2, a3, a4, a5) \ AMUDP_Reply(token, hnum, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_Reply7(token, hnum, a0, a1, a2, a3, a4, a5, a6) \ AMUDP_Reply(token, hnum, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_Reply8(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7) \ AMUDP_Reply(token, hnum, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_Reply9(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMUDP_Reply(token, hnum, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_Reply10(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMUDP_Reply(token, hnum, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_Reply11(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMUDP_Reply(token, hnum, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_Reply12(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMUDP_Reply(token, hnum, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_Reply13(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMUDP_Reply(token, hnum, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_Reply14(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMUDP_Reply(token, hnum, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_Reply15(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMUDP_Reply(token, hnum, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_Reply16(token, hnum, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMUDP_Reply(token, hnum, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_ReplyI0(token, hnum, sa, cnt) \ AMUDP_ReplyI(token, hnum, sa, cnt, 0) #define AM_ReplyI1(token, hnum, sa, cnt, a0) \ AMUDP_ReplyI(token, hnum, sa, cnt, 1, (int32_t)(a0)) #define AM_ReplyI2(token, hnum, sa, cnt, a0, a1) \ AMUDP_ReplyI(token, hnum, sa, cnt, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_ReplyI3(token, hnum, sa, cnt, a0, a1, a2) \ AMUDP_ReplyI(token, hnum, sa, cnt, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_ReplyI4(token, hnum, sa, cnt, a0, a1, a2, a3) \ AMUDP_ReplyI(token, hnum, sa, cnt, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_ReplyI5(token, hnum, sa, cnt, a0, a1, a2, a3, a4) \ AMUDP_ReplyI(token, hnum, sa, cnt, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_ReplyI6(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5) \ AMUDP_ReplyI(token, hnum, sa, cnt, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_ReplyI7(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6) \ AMUDP_ReplyI(token, hnum, sa, cnt, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_ReplyI8(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7) \ AMUDP_ReplyI(token, hnum, sa, cnt, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_ReplyI9(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMUDP_ReplyI(token, hnum, sa, cnt, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_ReplyI10(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMUDP_ReplyI(token, hnum, sa, cnt, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_ReplyI11(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMUDP_ReplyI(token, hnum, sa, cnt, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_ReplyI12(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMUDP_ReplyI(token, hnum, sa, cnt, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_ReplyI13(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMUDP_ReplyI(token, hnum, sa, cnt, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_ReplyI14(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMUDP_ReplyI(token, hnum, sa, cnt, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_ReplyI15(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMUDP_ReplyI(token, hnum, sa, cnt, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_ReplyI16(token, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMUDP_ReplyI(token, hnum, sa, cnt, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) #define AM_ReplyXfer0(token, desto, hnum, sa, cnt) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 0) #define AM_ReplyXfer1(token, desto, hnum, sa, cnt, a0) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 1, (int32_t)(a0)) #define AM_ReplyXfer2(token, desto, hnum, sa, cnt, a0, a1) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 2, (int32_t)(a0), (int32_t)(a1)) #define AM_ReplyXfer3(token, desto, hnum, sa, cnt, a0, a1, a2) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 3, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2)) #define AM_ReplyXfer4(token, desto, hnum, sa, cnt, a0, a1, a2, a3) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 4, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3)) #define AM_ReplyXfer5(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 5, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4)) #define AM_ReplyXfer6(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 6, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5)) #define AM_ReplyXfer7(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 7, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6)) #define AM_ReplyXfer8(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 8, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7)) #define AM_ReplyXfer9(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 9, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8)) #define AM_ReplyXfer10(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 10, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9)) #define AM_ReplyXfer11(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 11, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10)) #define AM_ReplyXfer12(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 12, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11)) #define AM_ReplyXfer13(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 13, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12)) #define AM_ReplyXfer14(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 14, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13)) #define AM_ReplyXfer15(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 15, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14)) #define AM_ReplyXfer16(token, desto, hnum, sa, cnt, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \ AMUDP_ReplyXfer(token, hnum, sa, cnt, desto, 16, (int32_t)(a0), (int32_t)(a1), (int32_t)(a2), (int32_t)(a3), (int32_t)(a4), (int32_t)(a5), (int32_t)(a6), (int32_t)(a7), (int32_t)(a8), (int32_t)(a9), (int32_t)(a10), (int32_t)(a11), (int32_t)(a12), (int32_t)(a13), (int32_t)(a14), (int32_t)(a15)) AMUDP_END_EXTERNC #endif gasnet-2025.8.0/other/amudp/sockaddr.h0000664000175000017500000001141115142313673017612 0ustar alastairalastair// $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/sockaddr.h $ // Description: Objects for encapsulating and hashing SockAddr's // Copyright 1998, Dan Bonachea #ifndef _SOCKADDR_H #define _SOCKADDR_H #include #include #include #ifdef HAVE_GASNET_TOOLS #ifndef GASNETT_LITE_MODE #define GASNETT_LITE_MODE // preserves AMUDP's threading neutrality #endif #include // for ctype.h wrappers #else #include #endif #include "socket.h" #define LOCALHOST (u_long)0x7F000001 #if !defined(AMUDP_NDEBUG) && !defined(NDEBUG) #define DEBUGIP() this->IPStr(); #else #define DEBUGIP() ; #endif class SockAddr { private: // could use a sockaddr here, but sockaddr_in is more robust because // it ensures correct struct alignment on architectures that care (eg SPARC/Solaris) sockaddr_in addr; // always stored in network byte order char IPBuffer[25]; public: SockAddr(void) { memset(&addr,'\0',sizeof(sockaddr_in)); } SockAddr(unsigned long IPaddr, unsigned short portnum, short sin_family=AF_INET) { addr.sin_family = sin_family; addr.sin_port = htons(portnum); // change to network format port addr.sin_addr.s_addr = htonl(IPaddr); // change to network format memset(&(addr.sin_zero), '\0', sizeof(addr.sin_zero)); DEBUGIP(); // makes it easier to see addresses in debugger } SockAddr(const char* IPStr, unsigned short portnum, short sin_family=AF_INET) { addr.sin_family = sin_family; addr.sin_port = htons(portnum); // change to network format port #if 1 addr.sin_addr.s_addr = inet_addr((char*)IPStr); // already in network format if (addr.sin_addr.s_addr + 1 == 0) addr.sin_addr.s_addr = 0; // portable test for -1 #else /* newer/safer interface, but not as widely portable */ if (!inet_aton((char*)IPStr, (in_addr*)&addr.sin_addr.s_addr)) addr.sin_addr.s_addr = 0; #endif memset(&(addr.sin_zero), '\0', sizeof(addr.sin_zero)); DEBUGIP(); // makes it easier to see addresses in debugger } SockAddr(const char* IPPortStr) { // parses from an FTP 227 or PORT string int num[6] = {0,0,0,0,0,0}; while(!isdigit(*IPPortStr)) IPPortStr++; // skip leading text for (int i=0; i < 6 && *IPPortStr; i++) { // read each digit num[i] = atoi(IPPortStr); while(isdigit(*IPPortStr)) IPPortStr++; // skip digit while(!isdigit(*IPPortStr) && *IPPortStr) IPPortStr++; // skip separator } unsigned short portnum; char IPStr[30]; sprintf(IPStr, "%i.%i.%i.%i", num[0], num[1], num[2], num[3]); portnum = (unsigned short)(num[4] << 8 | num[5]); addr.sin_family = AF_INET; addr.sin_port = htons(portnum); // change to network format port addr.sin_addr.s_addr = inet_addr(IPStr); // already in network format memset(&(addr.sin_zero), '\0', sizeof(addr.sin_zero)); DEBUGIP(); // makes it easier to see addresses in debugger } SockAddr(const sockaddr* sa) { memcpy(&addr, sa, sizeof(sockaddr)); DEBUGIP(); // makes it easier to see addresses in debugger } SockAddr(const sockaddr_in* sa) { memcpy(&addr, sa, sizeof(sockaddr)); DEBUGIP(); // makes it easier to see addresses in debugger } SockAddr(unsigned short _sa_family, char _sa_data[14]) { ((sockaddr*)&addr)->sa_family = _sa_family; memcpy(&(((sockaddr*)&addr)->sa_data), _sa_data, sizeof(((sockaddr*)&addr)->sa_data)); DEBUGIP(); // makes it easier to see addresses in debugger } operator sockaddr*(void) { return (sockaddr*)&addr; } operator sockaddr_in*(void) { return &addr; } unsigned long IP(void) { return ntohl(addr.sin_addr.s_addr); } unsigned short port(void) { return ntohs(addr.sin_port); } bool is_localhost() { return (addr.sin_addr.s_addr & 0x000000FFu) == 0x7Fu; } char *IPStr(void) { // inet_ntoa(((sockaddr_in*)&addr)->sin_addr); // This may screw up transparency unsigned char * pdata = (unsigned char *)(((sockaddr*)&addr)->sa_data); unsigned int a = pdata[2], b = pdata[3], c = pdata[4], d = pdata[5]; sprintf(IPBuffer, "%u.%u.%u.%u",a,b,c,d); return IPBuffer; } char *FTPStr(void) { unsigned char * pdata = (unsigned char *)(((sockaddr*)&addr)->sa_data); unsigned int a = pdata[2], b = pdata[3], c = pdata[4], d = pdata[5]; unsigned short prt = port(); unsigned int e = (prt >> 8), f = (prt & 0xFF); sprintf(IPBuffer, "%u,%u,%u,%u,%u,%u",a,b,c,d,e,f); return IPBuffer; } int operator==(const SockAddr& other) const { return !memcmp(this, &other.addr, sizeof(sockaddr)); } int operator!=(const SockAddr& other) const { return !(*this == other); } }; #endif gasnet-2025.8.0/other/amudp/license.txt0000664000175000017500000000357515142313673020046 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/license.txt $ * All files in this directory and all sub-directories (except where otherwise noted) * are subject to the following licensing terms: * * --------------------------------------------------------------------------- * "Copyright (c) 2000-2025, The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * --------------------------------------------------------------------------- * * For more information about AMUDP, visit our home page at: * https://gasnet.lbl.gov/amudp * Or send email to: * gasnet-devel@lbl.gov * * Source code contributions (fixes, patches, extensions etc.) should be * sent to to be reviewed for acceptance into the * primary distribution. Contributions are most likely to be accepted if they * are provided as public domain, or under a BSD-style license such as * the one above. * */ gasnet-2025.8.0/other/amudp/sig.h0000664000175000017500000000273015142313673016606 0ustar alastairalastair// $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/sig.h $ // Description: signal handling module // Copyright 1999, Dan Bonachea #ifndef _SIG_H #define _SIG_H #include #if PLATFORM_OS_IRIX #define signal(a,b) bsd_signal(a,b) #endif #ifdef __cplusplus extern "C" { #endif typedef void (*LPSIGHANDLER)(int); // all signal handlers must match prototype above // can also use special signal handlers: // SIG_DFL restore default signal handler // SIG_IGN to ignore signals typedef enum { ST_PROGRAM_ERROR, // program errors that will continus to occur if ignored ST_TERM_INT, // interrupt signal from the terminal (stop or kill) ST_SYS_INT, // interrupt signal from the system (kill, hangup, etc.) ST_FATAL, // interrupts that cannot be caught or ignored ST_OTHER, // everything else ST_ALL_CATCHABLE // special flag to represent all signals except ST_FATAL } SIGTYPE; // register a signal handler // it will be passed the signal as a parameter // the handler must re-register itself to continue receiving signals LPSIGHANDLER reghandler(int sigtocatch, LPSIGHANDLER fp); // register a signal handler for all catchable signals void regallhandler(LPSIGHANDLER fp, SIGTYPE sigtype=ST_ALL_CATCHABLE); // return a string decribing a signal const char* sigstr(int sig); SIGTYPE getsigtype(int sig); #ifdef __cplusplus } #endif #endif gasnet-2025.8.0/other/amudp/Makefile.tests0000664000175000017500000000734115142313673020457 0ustar alastairalastair TESTLOG=`pwd`/.test-results TEST_LINE=++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ AMUDP_RUNCMD_EXP=\ TEST_RUN_P=`echo "$$TEST_RUN" | sed 's/ .*$$//'` ; \ TEST_RUN_A=`echo "$$TEST_RUN" | sed 's/^[^ ]* //'` ; \ TEST_DOIT="$$TEST_RUN" TEST_RUNCMD= ; $(AMUDP_RUNCMD_EXP) ; \ testname=`basename $$TEST_RUN_P` ; \ faildesc="amudp/$$testname" ; \ if test -x "$$TEST_RUN_P" ; then \ echo " **** $$testname **** "; \ echo $$TEST_DOIT ; \ ( eval $$TEST_DOIT || echo "ERROR: Test exited with failure code=$$?" 2>&1 ) | tee .test-output ; \ failure=`$(PERL) -ne 'print if (/ERROR/ || /fatal signal/);' .test-output` ; \ if test "$$failure" != "" ; then \ echo " " >> $(TESTLOG) ; \ echo " *-* $$faildesc *-*" >> $(TESTLOG) ; \ echo " " >> $(TESTLOG) ; \ echo "$$failure" >> $(TESTLOG) ; \ fi ; \ rm -f .test-output ; \ echo $(TEST_LINE) ; \ fi TEST_NODES=2 TEST_ITERS=100 AMUDP_SPAWNFN=L TEST_SPAWNFN=$(AMUDP_SPAWNFN) TEST_MODE=P TEST_DEPTH=32 TEST_DUPLEX=H AMUDP_NETWORKDEPTH=$(TEST_DEPTH) run-tests: tests @rm -f $(TESTLOG) ; touch $(TESTLOG) @echo $(TEST_LINE) @echo Running AMUDP tests... @echo If this fails to spawn a job, you may need to re-run with a @echo command like: $(MAKE) run-tests AMUDP_SPAWNFN=S @echo $(TEST_LINE) @TEST_RUN="./testping $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testlatency $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testlatencyM $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) $(TEST_MODE) 64" $(TEST_RUNCMD) @TEST_RUN="./testbulk $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) 1048576 $(TEST_MODE) $(TEST_DUPLEX)" $(TEST_RUNCMD) @TEST_RUN="./testam $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testbounce $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testreduce $(TEST_NODES) $(TEST_SPAWNFN)" $(TEST_RUNCMD) @TEST_RUN="./testgetput $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS)" $(TEST_RUNCMD) @TEST_RUN="./testreadwrite $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS)" $(TEST_RUNCMD) @echo TESTS COMPLETE @cat $(TESTLOG) ; rm -f $(TESTLOG) # make a distribution amxdist: @set -x ; \ VERSION=`grep "#define AMUDP_LIBRARY_VERSION" $(srcdir)/amudp_const.h | head -2 | $(PERL) -e '$$/=undef; my @a=split(/\s+/,<>); print "$$a[2].$$a[5]"'` ; \ distdir=amudp$${VERSION} ; \ echo "+++ Building distribution for AMUDP version $${VERSION} +++" && \ rm -Rf $$distdir.tar.gz $$distdir && \ mkdir $$distdir && \ cp $(srcdir)/Makefile.* $(srcdir)/README* $(srcdir)/*.txt $(srcdir)/*.cpp $(srcdir)/*.c $(srcdir)/*.h $(amxdir)/*.[ch] \ $(altincdir)/portable_inttypes.h $(altincdir)/gasnet_portable_platform.h \ $$distdir && \ cd $$distdir && \ mv gasnet_portable_platform.h amx_portable_platform.h && \ rm -f Makefile.in Makefile.am Makefile.titanium* && \ mv Makefile.standalone Makefile && \ cd .. && \ tar -cvhf $$distdir.tar $$distdir && gzip -9 $$distdir.tar && \ rm -Rf $$distdir && \ echo "+++ $$distdir.tar.gz is ready for distribution +++" gasnet-2025.8.0/other/amudp/amudp_spawn.cpp0000664000175000017500000004462115142313673020702 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/amudp_spawn.cpp $ * Description: AMUDP Implementations of SPMD spawn functions for various environments * Copyright 2000, Dan Bonachea */ #undef _PORTABLE_PLATFORM_H #include #include #if PLATFORM_OS_CYGWIN #include // CreateProcess #endif #if PLATFORM_ARCH_CRAYX1 #include #include extern char **environ; #endif #include #include #include #include "amudp_internal.h" // must come after any other headers amudp_spawnfn_desc_t const AMUDP_Spawnfn_Desc[] = { { 'S', "Spawn jobs using ssh remote shells", (amudp_spawnfn_t)AMUDP_SPMDSshSpawn }, { 'L', "Spawn jobs using fork()/exec() on the local machine (good for SMP's)", (amudp_spawnfn_t)AMUDP_SPMDLocalSpawn }, { 'C', "Spawn jobs using custom job spawner (" AMX_ENV_PREFIX_STR"_CSPAWN_CMD)", (amudp_spawnfn_t)AMUDP_SPMDCustomSpawn }, { '\0', NULL, (amudp_spawnfn_t)NULL } }; /* Utility functions */ // Apply single quotes to prevent shell from evaluating special chars char *quote_for_remote(const char *arg) { const char *p; int c; for (p=arg, c=0; NULL != (p = strchr(p, '\'')); ++c, ++p) { /*empty*/ } size_t old_len = strlen(arg); size_t new_len = old_len + 2 + 3 * c; char *result = (char *)AMX_malloc(1 + new_len); result[0] = '\''; result[1] = '\0'; char *end = result+1; if (c) { char *dup = (char *)AMX_malloc(1 + old_len); p = strcpy(dup, arg); while (c--) { char *q = strchr((char *)p, '\''); *q = '\0'; strcpy(end, p); end += q-p; strcpy(end, "'\\''"); end += 4; p = q + 1; } AMX_free(dup); } else { p = arg; } strcpy(end, p); AMX_assert(strlen(result) == new_len-1); result[new_len-1] = '\''; result[new_len] = '\0'; return result; } // Apply quotes to protect against the shell spawned by system() // Note this is for use *inside* the double quotes we place around a command run by system. // shell docs tells us: // Inside double-quotes, '$' and '`' remain special unconditionally, // and '\' remains special only if followed by another special char *quote_for_local(const char *arg) { const char specials[] = "$`\\\""; char *tmp = quote_for_remote(arg); // count specials (assume every backslash is special) const char *p; int c; for (p=tmp, c=0; NULL != (p = strpbrk(p, specials)); ++c, ++p) { /*empty*/ } if (!c) return tmp; // Nothing to protect from local shell size_t old_len = strlen(tmp); size_t new_len = old_len + c; char *result = (char *)AMX_malloc(1 + new_len); char *end = result; char *q, *dup = (char *)AMX_malloc(1 + old_len); p = strcpy(dup, tmp); while (NULL != (q = strpbrk((char *)p, specials))) { size_t len = q-p; strncpy(end, p, len); end += len; end[0] = '\\'; end += 1; if (q[0] != '\\' || strchr(specials, q[1])) { end[0] = q[0]; end += 1; } p = q + 1; } strcpy(end, p); AMX_free(dup); AMX_free(tmp); AMX_assert(strlen(result) <= new_len); return result; } /* ------------------------------------------------------------------------------------ * spawn jobs on local machine * ------------------------------------------------------------------------------------ */ extern int AMUDP_SPMDLocalSpawn(int nproc, int argc, char **argv, char **extra_env) { /* just a simple fork/exec */ int i; if (!AMUDP_SPMDSpawnRunning) { AMX_Err("Spawn functions should never be run directly - only passed to AMUDP_SPMDStartup()"); return FALSE; } /* Temporarily assume values from extra_env[] (which we modify in-place) */ char **save_env = NULL; int envc = 0; if (extra_env && extra_env[0]) { for (envc=0; extra_env[envc]; ++envc) {/*empty*/} save_env = (char **)AMX_malloc(sizeof(char *)*envc); for (i=0;i&1 | grep OpenSSH", ssh_cmd); FILE *pop = popen(cmdtmp,"r"); while (!feof(pop) && !ferror(pop)) { int next = fgetc(pop); if (next != EOF && !isspace(next)) { isOpenSSH = 1; break; } } pclose(pop); } ssh_options = AMUDP_getenv_prefixed_withdefault("SSH_OPTIONS",""); p = ssh_servers; for (i = 0; i < nproc; i++) { /* check we have enough servers */ const char *end; while (*p && strchr(SSH_SERVERS_DELIM_CHARS, *p)) p++; end = p + strcspn(p, SSH_SERVERS_DELIM_CHARS); if (p == end) { AMX_Err("Not enough machines in environment variable " AMX_ENV_PREFIX_STR "_SSH_SERVERS to satisfy request for (%i).\n" "Only (%i) machines available: %s", nproc, i, ssh_servers); return FALSE; } if (*end) p = end+1; else p = end; } const char *envcmd = AMUDP_getenv_prefixed_withdefault("ENV_CMD", "env"); cmd1_sz = 1; /* terminating nul */ if (extra_env && extra_env[0]) { cmd1_sz += 1 + strlen(envcmd); // "env " for (i=0; extra_env[i]; ++i) { cmd1_sz += strlen(extra_env[i]) + 3; // "'%s' " } } char **quoted_args = (char**)AMX_malloc(argc * sizeof(char*)); for (i = 0; i < argc; i++) { AMX_assert(argv[i]); quoted_args[i] = quote_for_local(argv[i]); cmd1_sz += strlen(quoted_args[i]) + 1; // +1 for trailing space } cmd1 = (char *)AMX_malloc(cmd1_sz); { char *tmp = cmd1; if (extra_env && extra_env[0]) { tmp += sprintf(tmp, "%s ", envcmd); for (i=0; extra_env[i]; ++i) { tmp += sprintf(tmp, "'%s' ", extra_env[i]); } } for (i = 0; i < argc; i++) { AMX_assert(quoted_args[i]); tmp += sprintf(tmp, "%s ", quoted_args[i]); AMX_free(quoted_args[i]); } AMX_free(quoted_args); AMX_assert(!argv[i]); *tmp = '\0'; AMX_assert(strlen(cmd1) == cmd1_sz - 1); } cmd2_sz = cmd1_sz + strlen(ssh_remote_path) + 1024; /* estimated */ cmd2 = (char *)AMX_malloc(cmd2_sz); p = ssh_servers; for (i = 0; i < nproc; i++) { char ssh_server[255]; const char *end; while (*p && strchr(SSH_SERVERS_DELIM_CHARS, *p)) p++; end = p + strcspn(p, SSH_SERVERS_DELIM_CHARS); AMX_assert(p != end); strncpy(ssh_server, p, (end-p)); ssh_server[end-p] = '\0'; if (*end) p = end+1; else p = end; int forkRet = fork(); // fork a new process to hold ssh command if (forkRet == -1) { perror("fork"); return FALSE; } else if (forkRet != 0) { // parent continue; } else { // this is the child /* build the ssh command */ snprintf(cmd2, cmd2_sz, "%s %s%s%s %s \"%scd %s ; %s\" " " < /dev/null || kill %i 2>/dev/null", ssh_cmd, #if SSH_SUPRESSNEWKEYPROMPT (isOpenSSH?"-o 'StrictHostKeyChecking no' ":""), #else "", #endif #if SSH_PREVENTRSHFALLBACK (isOpenSSH?"-o 'FallBackToRsh no' ":""), #else "", #endif ssh_options, ssh_server, (AMX_SilentMode?"":"echo connected to \\$HOST... ; "), ssh_remote_path, cmd1, pid ); // This is currently written to keep a local shell process alive as a parent for the ssh command, // mostly to ensure that ssh connection/authentication failure results in immediate job teardown. // Keeping our process tree intact simplifies clean exit synchronization via wait(). // On modern Linux we could potentially background the ssh process (openssh -f), // allow the intermediate shell process to exit, and preserve our process tree using a // prctl(PR_SET_CHILD_SUBREAPER) call, but that approach is not portable. if (!AMX_SilentMode) AMX_Info("exec(/bin/sh -c '%s')", cmd2); int status = execlp("/bin/sh","/bin/sh", "-c", cmd2, NULL); AMX_Err("Failed to call exec() to spawn, status=%i, error=%s",status,strerror(errno)); kill(pid,15); _exit(127); } // child process } AMX_free(cmd1); AMX_free(cmd2); return TRUE; } /* ------------------------------------------------------------------------------------ * spawn jobs using a user-defined command * ------------------------------------------------------------------------------------ */ /* AMUDP custom spawn uses the following environment variables: * * option default description * -------------------------------------------------- * CSPAWN_SERVERS none list of servers to use - only required if %M is used below * CSPAWN_CMD none command to call for spawning - the following replacements will be made: * %M => list of servers taken from AMUDP_CSPAWN_SERVERS (the first nproc are taken) * %N => number of worker nodes requested * %C => AMUDP command that should be run by each worker node * %D => the current working directory * %% => % * CSPAWN_ROUTE_OUTPUT 0 set this variable to request stdout/stderr routing of workers * (any environment variable may be specified with an optional prefix * of AMUDP_ or AMX_ENV_PREFIX##_) */ int AMUDP_SPMDCustomSpawn(int nproc, int argc, char **argv, char **extra_env) { int i; char *spawn_cmd = NULL; char *spawn_servers = NULL; char workerservers[1024]; char workercmd[1024]; char nproc_str[10]; char cwd[1024]; char cmd[1024]; #if PLATFORM_OS_CYGWIN int spawn_use_create_process; #endif int spawn_route_output; int pid; if (!AMUDP_SPMDSpawnRunning) { AMX_Err("Spawn functions should never be run directly - only passed to AMUDP_SPMDStartup()"); return FALSE; } pid = getpid(); spawn_cmd = AMUDP_getenv_prefixed_withdefault("CSPAWN_CMD",""); if (!strlen(spawn_cmd)) { AMX_Err("You must set the " AMX_ENV_PREFIX_STR"_CSPAWN_CMD environment variable to use the custom spawn function"); return FALSE; } spawn_servers = AMUDP_getenv_prefixed_withdefault("CSPAWN_SERVERS",""); if (!strlen(spawn_servers)) spawn_servers = NULL; spawn_route_output = strcmp(AMUDP_getenv_prefixed_withdefault("CSPAWN_ROUTE_OUTPUT","0"),"0"); #if PLATFORM_OS_CYGWIN spawn_use_create_process = strcmp(AMUDP_getenv_prefixed_withdefault("CSPAWN_USE_CREATE_PROCESS","0"),"0"); #endif if (spawn_servers) { /* build server list */ char *p = spawn_servers; char servername[255]; char serverDelim[2]; strcpy(serverDelim," "); /* default to space */ workerservers[0] = '\0'; for (i = 0; i < nproc; i++) { /* check we have enough servers & copy the right number */ char *end; while (*p && strchr(SSH_SERVERS_DELIM_CHARS, *p)) p++; end = p + strcspn(p, SSH_SERVERS_DELIM_CHARS); if (p == end) { AMX_Err("Not enough machines in environment variable " AMX_ENV_PREFIX_STR"_CSPAWN_SERVERS to satisfy request for (%i).\n" "Only (%i) machines available: %s", nproc, i, spawn_servers); return FALSE; } strncpy(servername, p, end-p); servername[end-p] = '\0'; if (workerservers[0]) strcat(workerservers, serverDelim); if (*end) serverDelim[0] = *end; strcat(workerservers, servername); if (*end) p = end+1; else p = end; } } sprintf(nproc_str, "%i", nproc); if (!getcwd(cwd, 1024)) { AMX_Err("Error calling getcwd()"); return FALSE; } /* build the worker command */ { char temp[2048]; // TODO: allocate dynamically temp[0] = '\0'; if (extra_env && extra_env[0]) { const char *envcmd = AMUDP_getenv_prefixed_withdefault("ENV_CMD", "env"); strcat(temp,envcmd); strcat(temp," "); for (i=0; extra_env[i]; ++i) { strcat(temp,"'"); strcat(temp,extra_env[i]); strcat(temp,"' "); } } for (i = 0; i < argc; i++) { AMX_assert(argv[i] != NULL); char *qarg = quote_for_local(argv[i]); strcat(temp,qarg); strcat(temp," "); AMX_free(qarg); } AMX_assert(!argv[i]); #if PLATFORM_OS_CYGWIN if (spawn_use_create_process) strcpy(workercmd, temp); else #endif { sprintf(workercmd, "/bin/sh -c \"%s%s\" || ( echo \"spawn failed.\" ; kill %i ) ", (AMX_SilentMode?"":"echo connected to `uname -n`... ; "), temp, pid ); } } strcpy(cmd, spawn_cmd); { char tmp[1024]; char *p = cmd; while ((p = strchr(p, '%'))) { const char *replacement; switch (*(p+1)) { case 'M': case 'm': if (!spawn_servers) { /* user failed to provide servers and now is asking for them */ AMX_Err("You must set the " AMX_ENV_PREFIX_STR"_CSPAWN_SERVERS environment " "variable to use the %%M option in " AMX_ENV_PREFIX_STR"_CSPAWN_CMD"); } replacement = workerservers; break; case 'N': case 'n': replacement = nproc_str; break; case 'C': case 'c': replacement = workercmd; break; case 'D': case 'd': replacement = cwd; break; case 'P': case 'p': replacement = argv[0]; break; case '%': replacement = "%"; break; default: replacement = ""; } strcpy(tmp, cmd); tmp[p-cmd] = '\0'; strcat(tmp, replacement); if (*(p+1)) strcat(tmp, p+2); p += strlen(replacement); strcpy(cmd, tmp); } } AMUDP_SPMDRedirectStdsockets = spawn_route_output; { int forkRet; forkRet = fork(); /* fork a new process to hold cmd master */ if (forkRet == -1) { perror("fork"); return FALSE; } else if (forkRet != 0) { return TRUE; } else { /* this is the child - exec the new process */ if (!AMX_SilentMode) AMX_Info("system(%s)\n", cmd); #if PLATFORM_OS_CYGWIN if (spawn_use_create_process) { STARTUPINFO si; PROCESS_INFORMATION pi; DWORD code; ZeroMemory(&si, sizeof(STARTUPINFO)); si.cb = sizeof(STARTUPINFO); si.hStdError = GetStdHandle(STD_OUTPUT_HANDLE); si.hStdOutput = GetStdHandle(STD_ERROR_HANDLE); si.dwFlags |= STARTF_USESTDHANDLES; if ( TRUE != CreateProcess(0, AMX_strdup(cmd), 0, 0, TRUE, 0, 0, 0, &si, &pi) || WAIT_FAILED == WaitForSingleObject(pi.hProcess, INFINITE) || 0 == GetExitCodeProcess(pi.hProcess, &code) || 0 != code) AMX_FatalErr("Failed while calling CreateProcess() with custom spawn command:\n%s", cmd); } else #endif if (system(cmd) != 0) AMX_FatalErr("Failed while calling system() with custom spawn command:\n%s", cmd); exit(0); } } return TRUE; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/amudp/Makefile.standalone0000664000175000017500000000750315142313673021445 0ustar alastairalastair# $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/Makefile.standalone $ # Description: Makefile for AMUDP # Copyright 2000, Dan Bonachea srcdir = . include $(srcdir)/Makefile.common # leave this line alone # Uncomment one set of lines below to get debug or release configuration ccflags = $(set_opt_ccflags) cxxflags = $(set_opt_cxxflags) #ccflags = $(set_debug_ccflags) #cxxflags = $(set_debug_cxxflags) # Set host system to the appropriate value to get the right prebaked Makefile HOSTSYSTEM=generic include Makefile.$(HOSTSYSTEM) #------------------------------------------------------------------------------------- # You should never need to change things below this line set_debug_ccflags = -DAMUDP_DEBUG=1 $(ccdebugflags) $(MANUAL_CFLAGS) $(apputils_flags) set_debug_cxxflags = -DAMUDP_DEBUG=1 $(cxxdebugflags) $(MANUAL_CXXFLAGS) set_opt_ccflags = -DAMUDP_NDEBUG=1 -DNDEBUG $(ccoptflags) $(MANUAL_CFLAGS) $(apputils_flags) set_opt_cxxflags = -DAMUDP_NDEBUG=1 -DNDEBUG $(cxxoptflags) $(MANUAL_CXXFLAGS) VPATH = $(srcdir) includes = -I$(srcdir) -I$(altincdir) defines = -D_GNU_SOURCE=1 libraries = $(platform_libraries) Ccompile = $(CC) -c $(ccflags) $(defines) $(platform_defines) $(MANUAL_DEFINES) $(includes) CXXcompile = $(CXX) -c $(cxxflags) $(defines) $(platform_defines) $(MANUAL_DEFINES) $(includes) link = $(CXX) $(cxxflags) $(platform_ldflags) $(MANUAL_LDFLAGS) $(platform_defines) $(includes) linkend = $(libraries) $(MANUAL_LIBS) # all the test executables testprograms = \ testam \ testbounce \ testbulk \ testlatency \ testlatencyM \ testping \ testreduce \ testgetput \ testreadwrite # all the library objects and headers objects=amudp_cdefs.o amudp_ep.o amudp_reqrep.o amudp_spmd.o amudp_spawn.o exc.o sig.o socklist.o sockutil.o headers=Makefile* amudp.h amudp_const.h amudp_internal.h amudp_spmd.h socket.h exc.h sig.h sockaddr.h socklist.h sockutil.h .PHONY: all banner tests clean veryclean dist all: banner libamudp.a amudprun banner: @if test "$(HOSTSYSTEM)" = "generic" ; then \ OSTYPE="$${OSTYPE:-OSTYPE}" ; export OSTYPE ; \ MACHTYPE="$${MACHTYPE:-MACHTYPE}" ; export MACHTYPE ; \ echo "WARNING: Using Makefile.generic. " ; \ echo " If this build fails, try selecting one of the platform-specific makefiles, eg: " ; \ echo " $(MAKE) HOSTSYSTEM=$$OSTYPE" ; \ fi # ---------- AMUDP library ------------- libamudp.a: $(objects) $(ar) cru $@ $(objects) $(ranlib) $@ # ---------- build targets ------------- # main target tests: banner apputils.o $(testprograms) # method to convert .cpp to .o (more reliable than ".cpp.o" method) test%.o : $(amxdir)/test%.c $(amxdir)/*.h $(headers) $(Ccompile) -DAMUDP -I$(amxdir) $< -o $@ tests-clean: rm -f $(testprograms) apputils.o : $(amxdir)/apputils.c $(headers) $(Ccompile) -DAMUDP -I$(amxdir) $(amxdir)/apputils.c -o apputils.o amudprun: amudprun.o $(headers) libamudp.a $(link) -o $@ $< -L. -lamudp $(linkend) %.o : %.c $(headers) $(amxdir)/*.h $(Ccompile) $< -o $@ %.o : %.cpp $(headers) $(amxdir)/*.h $(CXXcompile) $< -o $@ amudp_cdefs.o: $(amxdir)/amx_internal.c # delete compiling byproducts clean: rm -f *.o core gmon.out veryclean: clean rm -f $(testprograms) libamudp.a @echo Done verycleaning. # ---------- test programs ------------- test% : test%.o apputils.o libamudp.a $(link) -o $@ $< apputils.o -L. -lamudp $(linkend) include $(srcdir)/Makefile.tests gasnet-2025.8.0/other/amudp/sockutil.cpp0000664000175000017500000005427415142313673020226 0ustar alastairalastair// $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/sockutil.cpp $ // Description: Simple sock utils // Copyright 1999, Dan Bonachea #include #include #include #include #include #include "sockaddr.h" // for gasnet_tools/gasnet_config.h #if HAVE_GETIFADDRS #if HAVE_IFADDRS_H #include #endif #include #endif #include "sockutil.h" #include "sig.h" #ifndef if_pf /* for stand-alone mode without gasnet_tools */ #define if_pf(cond) if(cond) #define if_pt(cond) if(cond) #endif bool endianconvert = false; //------------------------------------------------------------------------------------- static int isinit = 0; static bool nh_cvt = false; #define CHECKINIT() assert(isinit > 0) bool socklibinit(){ nh_cvt = isLittleEndian(); isinit++; return true; } bool socklibend(){ isinit--; return true; } //------------------------------------------------------------------------------------- SOCKET listen_socket(unsigned short port, bool allowshared) { // create a socket to listen to a specific port return listen_socket(SockAddr((long unsigned int)INADDR_ANY, port), allowshared); } //------------------------------------------------------------------------------------- SOCKET listen_socket(struct sockaddr* saddr, bool allowshared) { // create a socket to listen to a specific address SOCKET s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (s == INVALID_SOCKET) xsocket(s, "socket() failed while creating a listener socket"); if (allowshared) { int allow = 1; if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&allow, sizeof(int)) == -1) { closesocket(s); xsocket(s, "setsockopt() failed to set reuseaddr while creating a listener socket"); } } // bind if (bind(s, saddr, sizeof(struct sockaddr_in)) == SOCKET_ERROR) { closesocket(s); xsocket(s, "bind() failed to bind a listener socket"); } // listen if (listen(s, SOMAXCONN) == SOCKET_ERROR) { closesocket(s); xsocket(s, "listen() failed while creating a listener socket"); } return s; } //------------------------------------------------------------------------------------ SOCKET accept_socket(SOCKET listener, struct sockaddr* calleraddr) { LENGTH_PARAM sz = (calleraddr?sizeof(struct sockaddr_in):0); while (1) { SOCKET newsock; if ((newsock = SOCK_accept(listener, calleraddr, &sz)) == INVALID_SOCKET) { if (errno == EINTR) continue; // ignore signal interruptions - keep blocking closesocket(listener); xsocket(listener, "accept() failed on listener socket"); } disable_sigpipe(newsock); return newsock; } } //------------------------------------------------------------------------------------- bool disable_sigpipe(SOCKET s) { #ifdef SO_NOSIGPIPE // Some OSs (eg BSD) allow SIGPIPE generation to be blocked at the socket level #ifndef SIGPIPE_BLOCKED #define SIGPIPE_BLOCKED 1 #endif int set = 1; if (setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, (char *)&set, sizeof(set)) == -1) { closesocket(s); xsocket(s, "setsockopt() failed to set SO_NOSIGPIPE"); } return true; #else // flag doesn't exist return false; #endif } //------------------------------------------------------------------------------------- SOCKET connect_socket(struct sockaddr* saddr) { SOCKET s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (s == INVALID_SOCKET) xsocket(s, "socket() failed while creating a connect socket"); disable_sigpipe(s); if (connect(s, saddr, sizeof(struct sockaddr)) == SOCKET_ERROR) { closesocket(s); xsocket(s, "connect() failed while creating a connect socket"); } return s; } //------------------------------------------------------------------------------------- SOCKET connect_socket(char* addr) { // create a socket and connect it to a remote host/port // interpret addr char* p = strchr(addr, ':'); if (!p) throw xBase("Missing address in connect"); *p = '\0'; unsigned short portnum = atoi(++p); while(*p) { // check for stray crap if (!isdigit(*p)) throw xBase("Stray characters after address in connect"); p++; } struct sockaddr_in saddr; saddr.sin_family = AF_INET; saddr.sin_port = htons(portnum); for (int i=0; i < 8; i++) saddr.sin_zero[i] = '\0'; if (isValidIP(addr)) saddr.sin_addr.s_addr = inet_addr(addr); else { // need to do DNS thing struct hostent* he = gethostbyname(addr); if (!he) xsocket(INVALID_SOCKET, "DNS failure in gethostbyname()"); #if PLATFORM_OS_UNICOS assert(sizeof(u_long) == he->h_length); saddr.sin_addr.s_addr = *(u_long *)he->h_addr_list[0]; // s_addr is a bitfield on Unicos #else memcpy(&saddr.sin_addr.s_addr, he->h_addr_list[0], he->h_length); #endif } SOCKET s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (s == INVALID_SOCKET) xsocket(s, "socket() failed while creating a connect socket"); disable_sigpipe(s); if (connect(s, (struct sockaddr*)&saddr, sizeof(struct sockaddr_in)) == SOCKET_ERROR) { closesocket(s); xsocket(s, "connect() failed while creating a connect socket"); } return s; } //------------------------------------------------------------------------------------- void recvAll(SOCKET s, void* buffer, int numbytes) { // blocks until it can receive numbytes on s into buffer // (throws xSocket on close) char *buf = (char*)buffer; while (numbytes) { int retval; retval = recv(s, buf, numbytes, 0); if (retval == SOCKET_ERROR) { closesocket(s); xsocket(s, "error in recvAll() - connection closed"); } else if (retval == 0) { closesocket(s); xsocket(s, "connection closed on recv() in recvAll()"); } assert(retval <= numbytes); // can't send more than was in buffer... buf += retval; numbytes -= retval; } } //------------------------------------------------------------------------------------- #ifdef MSG_NOSIGNAL // POSIX mandates a SIGPIPE on send() to a disconnected stream socket // but it's more efficient and less disruptive to clients to handle this via return code // Linux and a few others allow this to be disabled via send flag #define SEND_FLAGS MSG_NOSIGNAL #ifndef SIGPIPE_BLOCKED #define SIGPIPE_BLOCKED 1 #endif #else #define SEND_FLAGS 0 #endif void sendAll(SOCKET s, const void* buffer, int numbytes, bool dothrow) { // blocks until it can send numbytes on s from buffer // (throws xSocket on close by default) #if !SIGPIPE_BLOCKED // must use heavyweight method to block SIGPIPE errors LPSIGHANDLER oldsighandler = reghandler(SIGPIPE, (LPSIGHANDLER)SIG_IGN); #endif char *buf = (char*)buffer; while (numbytes) { int retval; retval = send(s, buf, numbytes, SEND_FLAGS); if (retval == SOCKET_ERROR) { closesocket(s); #if !SIGPIPE_BLOCKED reghandler(SIGPIPE, oldsighandler); // restore handler #endif if (dothrow) xsocket(s, "error in sendAll() - connection closed"); else break; } assert(retval <= numbytes); // can't send more than was in buffer... buf += retval; numbytes -= retval; } #if !SIGPIPE_BLOCKED reghandler(SIGPIPE, oldsighandler); // restore handler #endif } //------------------------------------------------------------------------------------- void sendAll(SOCKET s, const char* buffer, int numbytes, bool dothrow) { if (numbytes == -1) numbytes = strlen(buffer); sendAll(s, (void *)buffer, numbytes, dothrow); } //------------------------------------------------------------------------------------- void sendEOL(SOCKET s) { sendAll(s, "\r\n", 2); } //------------------------------------------------------------------------------------- int recvLine(SOCKET s, char* buf, int bufsiz) { int readcount = 0; while(1) { int retval; retval = recv(s, buf+readcount, bufsiz-readcount, MSG_PEEK); if (retval == SOCKET_ERROR) xsocket(s, "error on recv() in recvLine()"); else if (retval == 0) { // graceful close - nothing left to read if (readcount == 0) xsocket(s, "connection closed in recvLine()"); else return readcount; } for(int i=0; i < retval-1; i++) { if (buf[readcount+i+1] == '\n') { // got eol bool bareeol = (buf[readcount+i] != '\r'); // also accept bare LF int retval = recv(s, buf+readcount, i+2, 0); if (retval == SOCKET_ERROR) xsocket(s, "error on recv() in recvLine()"); else if (retval == 0) { // should never happen? if (readcount == 0) xsocket(s, "connection closed in recv() in recvLine()"); // unexpected connection close else return readcount; } assert(retval == i+2); // make sure it gave us everything if (bareeol) { buf[readcount + i + 1] = '\0'; return readcount + i + 1; } else { buf[readcount + i] = '\0'; return readcount + i; } } } if (retval+readcount >= bufsiz) { // buffer too small to get entire line throw xBase("Buffer overrun in recvLine"); } else { // get what we can int len = retval; retval = recv(s, buf+readcount, len, 0); if (retval == SOCKET_ERROR) xsocket(s, "error on recv() in recvLine()"); else if (retval == 0) { // should never happen? if (readcount == 0) xsocket(s, "connection closed on recv() in recvLine()"); // unexpected connection close else return readcount; } assert(retval == len); // make sure it gave us everything readcount += retval; } } } //------------------------------------------------------------------------------------ void getSockName(SOCKET s, sockaddr_in &addr) { GETSOCKNAME_LENGTH_T namelen = sizeof(sockaddr_in); if (SOCK_getsockname(s, (sockaddr*)&addr, &namelen) == SOCKET_ERROR) { xsocket(s, "getsockname"); } } //------------------------------------------------------------------------------------- unsigned long getLocalAddress(SOCKET s) { sockaddr_in saddr; getSockName(s, saddr); return ntohl(saddr.sin_addr.s_addr); } //------------------------------------------------------------------------------------ int getLocalPort(SOCKET s) { sockaddr_in saddr; getSockName(s, saddr); return ntohs(saddr.sin_port); } //------------------------------------------------------------------------------------ void getSockPeer(SOCKET s, sockaddr_in &addr) { GETSOCKNAME_LENGTH_T namelen = sizeof(sockaddr_in); if (SOCK_getpeername(s, (sockaddr*)&addr, &namelen) == SOCKET_ERROR) { xsocket(s, "getpeername"); } } //------------------------------------------------------------------------------------ unsigned long getRemoteAddress(SOCKET s) { sockaddr_in saddr; getSockPeer(s, saddr); return ntohl(saddr.sin_addr.s_addr); } //------------------------------------------------------------------------------------ int getRemotePort(SOCKET s) { sockaddr_in saddr; getSockPeer(s, saddr); return ntohs(saddr.sin_port); } //------------------------------------------------------------------------------------ void byteSwap16(void *val) { uint8_t* p = (uint8_t *)val; uint8_t tmp; tmp = p[0]; p[0] = p[1]; p[1] = tmp; } //------------------------------------------------------------------------------------ void byteSwap32(void *val) { uint8_t* p = (uint8_t *)val; uint8_t tmp; tmp = p[0]; p[0] = p[3]; p[3] = tmp; tmp = p[1]; p[1] = p[2]; p[2] = tmp; } //------------------------------------------------------------------------------------ void byteSwap64(void *val) { uint8_t* p = (uint8_t *)val; uint8_t tmp; tmp = p[0]; p[0] = p[7]; p[7] = tmp; tmp = p[1]; p[1] = p[6]; p[6] = tmp; tmp = p[2]; p[2] = p[5]; p[5] = tmp; tmp = p[3]; p[3] = p[4]; p[4] = tmp; } //------------------------------------------------------------------------------------- #define NTOH_DEF(width) \ uint##width##_t ntoh##width(uint##width##_t v) { \ CHECKINIT(); \ if (nh_cvt) byteSwap##width(&v); \ return v; \ } \ void ntoh##width##a(void *pv) { \ CHECKINIT(); \ if (nh_cvt) byteSwap##width(pv); \ } \ uint##width##_t hton##width(uint##width##_t v) { \ CHECKINIT(); \ if (nh_cvt) byteSwap##width(&v); \ return v; \ } \ void hton##width##a(void *pv) { \ CHECKINIT(); \ if (nh_cvt) byteSwap##width(pv); \ } NTOH_DEF(16) NTOH_DEF(32) NTOH_DEF(64) //------------------------------------------------------------------------------------- uint32_t recv32(SOCKET s) { // get 32-bit integer uint32_t temp; recvAll(s, &temp, 4); if (endianconvert) byteSwap32(&temp); return temp; } //------------------------------------------------------------------------------------- void send32(SOCKET s, uint32_t value) { // send 32-bit integer if (endianconvert) byteSwap32(&value); sendAll(s, &value, 4); } //------------------------------------------------------------------------------------- char recvch(SOCKET s) { // get one character char temp; recvAll(s, &temp, 1); return temp; } //------------------------------------------------------------------------------------- SockAddr getsockname(SOCKET s) { GETSOCKNAME_LENGTH_T sz = sizeof(struct sockaddr); SockAddr saddr; if (SOCK_getsockname(s, (struct sockaddr *)saddr, &sz) == SOCKET_ERROR) xsocket(s, "getsockname"); return saddr; } //------------------------------------------------------------------------------------- SockAddr getpeername(SOCKET s) { GETSOCKNAME_LENGTH_T sz = sizeof(struct sockaddr); SockAddr saddr; if (SOCK_getpeername(s, (struct sockaddr *)saddr, &sz) == SOCKET_ERROR) xsocket(s, "getpeername"); return saddr; } //------------------------------------------------------------------------------------- char const *getMyHostName() { static char hostname[1024]; // assume never changes during program run static bool firsttime = true; if (firsttime) { if (gethostname(hostname, 1024) == SOCKET_ERROR) xsocket(INVALID_SOCKET, "gethostname"); firsttime = false; } return hostname; } //------------------------------------------------------------------------------------- SockAddr DNSLookup(const char *hostnameOrIPStr) { const char *hostname = hostnameOrIPStr; if (isValidIP(hostnameOrIPStr)) { // numeric IP return SockAddr(hostnameOrIPStr, 0); } else { hostent *he = gethostbyname(hostname); if (!he) xsocket(INVALID_SOCKET, "gethostbyname"); if (he->h_length != 4) xsocket(INVALID_SOCKET, "gethostbyname returned wrong h_length"); if (he->h_addr_list[0] == NULL) xsocket(INVALID_SOCKET, "gethostbyname returned no entries"); return SockAddr((unsigned long)ntohl(*((uint32_t *)he->h_addr_list[0])), (unsigned short)0); } } //------------------------------------------------------------------------------------- bool inputWaiting(SOCKET s, bool dothrow) { // returns true if input or close conn is waiting fd_set sockset; timeval tm = {0, 0}; FD_ZERO(&sockset); FD_SET(s, &sockset); int retval = select(s+1, &sockset, NULL, NULL, &tm); if_pf (retval == SOCKET_ERROR) { if (dothrow) xsocket(s, "select"); else return true; // error waiting } else if (retval > 0) return true; // new input or closed conn return false; } //------------------------------------------------------------------------------------- int numBytesWaiting(SOCKET s) { // returns number of bytes waiting to be received IOCTL_FIONREAD_ARG_T arg = 0; if (SOCK_ioctlsocket(s, _FIONREAD, &arg) == SOCKET_ERROR) xsocket(s, "numBytesWaiting"); return (int)arg; } //------------------------------------------------------------------------------------- bool isValidIP(const char* buf) { int a = atoi(buf); if (a > 255 || a < 0) return false; while (isdigit(*buf)) buf++; if (*buf != '.') return false; buf++; int b = atoi(buf); if (b > 255 || b < 0) return false; while (isdigit(*buf)) buf++; if (*buf != '.') return false; buf++; int c = atoi(buf); if (c > 255 || c < 0) return false; while (isdigit(*buf)) buf++; if (*buf != '.') return false; buf++; int d = atoi(buf); if (d > 255 || d < 0) return false; while (isdigit(*buf)) buf++; while (isspace(*buf)) buf++; if (*buf != '\0') return false; return true; } //------------------------------------------------------------------------------------- bool isLittleEndian() { union { int i; // machine word unsigned char b[sizeof(int)]; // b[0] overlaid with first byte of i } x; x.i = 0xFF; // set lsb, zero all others return x.b[0] == 0xFF; } //------------------------------------------------------------------------------------- bool isBigEndian() { return !isLittleEndian(); } //------------------------------------------------------------------------------------- void close_socket(SOCKET s) { if (closesocket(s) == SOCKET_ERROR) { xsocket(s, "closesocket"); } } //------------------------------------------------------------------------------------- void closeGracefully(SOCKET s){ // close a socket gracefully, blocking until everything is sent char temp; shutdown(s, SD_SEND); // initiate graceful close recv(s, &temp, 1, 0); // wait for other side to acknowledge or reset closesocket(s); // deallocate socket } //------------------------------------------------------------------------------------- void waitForClose(SOCKET s) { char temp; int retval = recv(s, &temp, 1, MSG_PEEK); // block for activity if (retval == 0) return; else if (retval == SOCKET_ERROR) xsocket(s, "waitForClose()"); else { xsocket(s, "waitForClose() got data when close expected"); } } //------------------------------------------------------------------------------------- bool waitForActivity(SOCKET s, struct timeval* tv) { fd_set set; FD_ZERO(&set); FD_SET(s, &set); int retval = select(s+1, &set, NULL, NULL, tv); if (retval < 0) { xsocket(s, "waitForActivity()"); } else if (retval == 1) return true; else if (retval == 0) return false; else { perror("select"); abort(); } return false; /* make compiler happy */ } //------------------------------------------------------------------------------------- bool isClosed(SOCKET s) { // first, test to see if recv will block fd_set set; FD_ZERO(&set); FD_SET(s, &set); struct timeval tv = {0,0}; if (!select(s+1, &set, NULL, NULL, &tv)) { // isn't readable, therefore can't be closed // (or at least our OS can't have detected it) return false; } char c; int len = recv(s, &c, 1, MSG_PEEK); // something is waiting -> never blocks if (len == 0) return true; // socket closed else if (len == SOCKET_ERROR) { int err = errno; if (err == ECONNRESET || err == ENOTCONN || err == ENETRESET || err == ECONNABORTED || err == ESHUTDOWN || err == EPIPE || err == ENOTSOCK || err == EBADF || err == ETIMEDOUT) return true; else xsocket(s, "recv(MSG_PEEK) within isClosed()"); // some error } // not closed return false; } //----------------------------------------------------------------------------------- bool hasOOBdata(SOCKET s) { FD_SET set; FD_ZERO(&set); FD_SET(s, &set); struct timeval tv = {0,0}; if (select(s+1, NULL, NULL, &set, &tv)) { // see what it is for debugging char buffer[10]; int retval = recv(s, buffer, 10, MSG_OOB); return true; } return false; } //------------------------------------------------------------------------------------ #undef select extern int myselect(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) { #ifdef FD_SETSIZE assert((unsigned int)n <= (unsigned int)FD_SETSIZE); #endif /* a select that ignores UNIX's ridiculously inconvenient interrupt signals */ int retval; do { retval = select(n, readfds, writefds, exceptfds, timeout); } while (retval == SOCKET_ERROR && errno == EINTR); return retval; } /* ------------------------------------------------------------------------------------ */ extern int myrecvfrom(SOCKET s, char * buf, int len, int flags, struct sockaddr *from, int *fromlen) { while (1) { LENGTH_PARAM sz; LENGTH_PARAM *psz = &sz; if (fromlen) sz = *fromlen; else psz = NULL; int retval = SOCK_recvfrom(s, buf, len, flags, from, psz); if (fromlen) *fromlen = (int)sz; if (retval == SOCKET_ERROR && errno == EINTR) continue; return retval; } } /* ------------------------------------------------------------------------------------ */ #if HAVE_GETIFADDRS bool getIfaceAddr(SockAddr ipnet_sa, SockAddr &ret, char *subnets, size_t subnetsz) { struct sockaddr_in *net = (sockaddr_in*)ipnet_sa; struct sockaddr_in *result = (sockaddr_in*)ret; bool found = false; struct ifaddrs *ifas; if (subnets) subnets[0] = '\0'; if (getifaddrs(&ifas) != -1) { for (struct ifaddrs *ifa = ifas; ifa != NULL; ifa = ifa->ifa_next) { if (!ifa->ifa_addr || (ifa->ifa_addr->sa_family != AF_INET) || !(ifa->ifa_flags & IFF_RUNNING) // ignore disabled interfaces ) continue; struct sockaddr_in *if_addr = (sockaddr_in*)ifa->ifa_addr; struct sockaddr_in *if_mask = (sockaddr_in*)ifa->ifa_netmask; unsigned long subnet = if_addr->sin_addr.s_addr & if_mask->sin_addr.s_addr; if (if_addr->sin_addr.s_addr == INADDR_ANY) continue; // can't use a wildcard interface (0.0.0.0) if (subnets && subnetsz > 0) { snprintf(subnets, subnetsz, "%s ",SockAddr((unsigned long)ntohl(subnet),0).IPStr()); size_t len = strlen(subnets); subnets += len; subnetsz -= len; } if (subnet == net->sin_addr.s_addr) { memcpy(result, if_addr, sizeof(struct sockaddr_in)); result->sin_port = 0; found = true; break; } } freeifaddrs(ifas); } return found; } #endif // HAVE_GETIFADDRS /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/amudp/Makefile.am0000664000175000017500000001531515142313673017712 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/Makefile.am $ # Description: Makefile for AMUDP/GASNet # Copyright 2004, Dan Bonachea # Terms of use are as specified in license.txt # NOTE: This Makefile is used to tie in with the GASNet build infrastructure # the stand-alone AMUDP product doesn't currently provide an automake framework AUTOMAKE_OPTIONS = foreign 1.4 no-dependencies apputils_flags = if BUILDCONFIG_DEBUG BUILDCONFIG_DEFINES = -DAMUDP_DEBUG=1 else BUILDCONFIG_DEFINES = -DAMUDP_NDEBUG=1 -DNDEBUG endif if VALGRIND VALGRIND_DEFINES = -DUSE_CLEAR_UNUSED_SPACE else VALGRIND_DEFINES = endif CC = @CC@ CFLAGS = @GASNET_OPT_CFLAGS@ @DEVWARN_CFLAGS@ @MISC_CFLAGS@ @MISC_CPPFLAGS@ $(MANUAL_CFLAGS) $(apputils_flags) CXX = @CXX@ CXXFLAGS = @GASNET_OPT_CXXFLAGS@ @DEVWARN_CXXFLAGS@ @MISC_CXXFLAGS@ @MISC_CPPFLAGS@ $(MANUAL_CXXFLAGS) LDFLAGS = @LDFLAGS@ @cxxLDFLAGS@ $(MANUAL_LDFLAGS) PERL = @PERL@ platform_defines = @GASNET_EXTRA_DEFINES@ $(BUILDCONFIG_DEFINES) $(VALGRIND_DEFINES) @INTTYPES_DEFINES@ -DAMX_ENV_PREFIX=GASNET $(MANUAL_DEFINES) platform_libraries = -L$(top_builddir) -lgasnet_tools-seq @LIBS@ @GASNET_UDP_LIBS@ VPATH = $(srcdir) amxdir = $(srcdir)/../amx altincdir = $(srcdir)/.. gasnet_tools = -I$(srcdir)/../.. -I../.. -DHAVE_GASNET_TOOLS INCLUDES = -I$(srcdir) -I. -I$(amxdir) -I$(altincdir) $(platform_defines) $(gasnet_tools) compile = $(CC) $(CFLAGS) $(INCLUDES) cxxcompile = $(CXX) $(CXXFLAGS) $(INCLUDES) link = $(CXX) $(CXXFLAGS) $(LDFLAGS) $(INCLUDES) linkend = $(platform_libraries) $(MANUAL_LIBS) if USE_UDP_CONDUIT BUILT_SOURCES = amx_portable_platform.h lib_LIBRARIES = libamudp.a bin_PROGRAMS = amudprun if HAVE_EXESUFFIX # ensure 'make amudprun' works on Cygwin amudpru% : amudpru%$(EXESUFFIX) : endif endif headers = \ amudp.h \ amudp_const.h \ amudp_internal.h \ amudp_spmd.h \ exc.h \ sig.h \ sockaddr.h \ socket.h \ socklist.h \ sockutil.h allheaders = $(BUILT_SOURCES) $(headers) libamudp_a_SOURCES = \ amudp_cdefs.c \ amudp_ep.cpp \ amudp_reqrep.cpp \ amudp_spawn.cpp \ amudp_spmd.cpp \ exc.cpp \ sig.cpp \ socklist.cpp \ sockutil.cpp amx_portable_platform.h: $(altincdir)/gasnet_portable_platform.h cp -f $< $@ libamudp_a_DEPENDENCIES = $(libamudp_a_SOURCES:%.cpp=%.o) $(libamudp_a_SOURCES:%.c=%.o) $(libamudp_a_DEPENDENCIES): $(allheaders) # Makefile.{standalone,common,generic} enable amudprun-host EXTRA_DIST = \ $(headers) \ Makefile.common \ Makefile.generic \ Makefile.standalone \ Makefile.tests \ Makefile.titanium.in \ amudprun.c \ license.txt # ---------- test programs ------------- # all the test executables testprograms = \ testam \ testbounce \ testbulk \ testlatency \ testlatencyM \ testping \ testreduce \ testoutput \ testgetput \ testreadwrite tests: apputils.o $(testprograms) test%: test%.o apputils.o libamudp.a $(link) -o $@ $< apputils.o -L. -lamudp $(linkend) tests-clean: rm -f $(testprograms) include Makefile.tests test%.o : $(amxdir)/test%.c $(amxdir)/*.h $(allheaders) $(compile) -DAMUDP -I$(amxdir) -c $< -o $@ apputils.o : $(amxdir)/apputils.c $(amxdir)/apputils.h $(allheaders) $(compile) -DAMUDP -I$(amxdir) -c $(amxdir)/apputils.c -o apputils.o amudprun$(EXEEXT): amudprun.o $(headers) libamudp.a $(link) -o $@ $< -L. -lamudp $(linkend) %.o: %.c $(allheaders) $(amxdir)/*.h $(compile) -o $@ -c `test -f $(srcdir)/$< && echo "$(srcdir)/"`$< %.o: %.cpp $(allheaders) $(amxdir)/*.h $(top_builddir)/libgasnet_tools-seq.a $(cxxcompile) -o $@ -c `test -f $(srcdir)/$< && echo "$(srcdir)/"`$< amudp_cdefs.o: $(amxdir)/amx_internal.c $(top_builddir)/libgasnet_tools-seq.a: force @cd $(top_builddir) && $(MAKE) libgasnet_tools-seq.a # WARNING: This is NOT an officially supported feature and may be removed in the future! # This target attempts to build amudprun for the host system and output binary amudprun-host # It may require explicitly providing working C/C++ compilers for the host, eg: # gmake -C other/amudp amudprun-host CC=clang CXX=clang++ amudprun-host$(EXEEXT): force @ srcdir=`cd $(srcdir) && pwd`; \ set -x && \ mkdir -p .host && \ cd .host && \ ln -sf $$srcdir/Makefile* . && \ ln -sf $$srcdir/../portable_inttypes.h . && \ ln -sf $$srcdir/../gasnet_portable_platform.h amx_portable_platform.h && \ ln -sf $$srcdir/../amx/*.[ch] . && \ $(MAKE) amudprun -f Makefile.standalone srcdir=$$srcdir amxdir=. altincdir=. MANUAL_DEFINES="-DAMX_ENV_PREFIX=GASNET $(MANUAL_DEFINES)" && \ mv amudprun ../amudprun-host && \ cd .. && rm -Rf .host if USE_UDP_CONDUIT if GNU_NM check-exports: libamudp.a @echo Checking libamudp exports... @lib=libamudp.a ; \ @NM@ --defined-only $$lib | \ @PERL@ -pe 's/ \.refptr\.//' | \ grep -v -e ' [\._]*amudp_' -e ' [\._]*AMUDP_' -e ' [\._]*AM_' \ -e ' [\._]*amx_' -e ' [\._]*AMX_' -e ' [\._]*SOCK_' \ -e ' [\._]*gasnett_' -e ' [\._]*gasneti_' \ -e ' [\._][\._]*debug_' -e 'get_pc_thunk' \ -e __FUNCTION__ -e __PRETTY_FUNCTION__ -e debug_info_seg | \ @PERL@ -n -e 'print if /^[0-9a-fA-F]+\s+[A-Z]\s+/' > .$$lib.exp; \ if test -s .$$lib.exp ; then \ cat .$$lib.exp ; \ echo FAILED ; \ failed=1 ; \ else \ echo PASSED ; \ fi ; \ rm -f .$$lib.exp ; \ exit $$failed else check-exports: libamudp.a @echo check-exports test SKIPPED endif # No check-exports by default due to name mangling check: tests clean_local_files = libamudp.a *.o core .test-results amudprun-host $(BUILT_SOURCES) clean-local: rm -Rf .host @for f in $(testprograms); do \ cmd="rm -f '$$f$(EXESUFFIX)'"; echo "$$cmd"; eval "$$cmd" || exit $$? ; \ done; else clean_local_files = clean-local: @: #empty rule endif CLEANFILES = $(clean_local_files) force: .PHONY: force tests run-tests gasnet-2025.8.0/other/amudp/amudp_internal.h0000664000175000017500000004546315142313673021040 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/amudp_internal.h $ * Description: AMUDP internal header file * Copyright 2000, Dan Bonachea */ #ifndef _AMUDP_INTERNAL_H #define _AMUDP_INTERNAL_H #include #include #if __cplusplus #include "sockutil.h" #else #include "socket.h" #endif #include AMUDP_BEGIN_EXTERNC /* AMUDP system configuration parameters */ #ifndef DISABLE_STDSOCKET_REDIRECT #define DISABLE_STDSOCKET_REDIRECT 0 /* disable redirection of worker stdin/stdout/stderr to master */ #endif #ifndef USE_SOCKET_RECVBUFFER_GROW #define USE_SOCKET_RECVBUFFER_GROW 1 /* grow RCVBUF on UDP sockets */ #endif #ifndef USE_SOCKET_SENDBUFFER_GROW #define USE_SOCKET_SENDBUFFER_GROW 1 /* grow SNDBUF on UDP sockets */ #endif #ifndef AMUDP_SOCKETBUFFER_MAX #define AMUDP_SOCKETBUFFER_MAX 4194304 /* default socket *BUF max to never exceed */ #endif #ifndef AMUDP_EXTRA_CHECKSUM #define AMUDP_EXTRA_CHECKSUM 0 /* add extra checksums to each message to detect buggy IP */ #endif extern uint32_t AMUDP_SocketBuffer_initial; extern uint32_t AMUDP_SocketBuffer_max; #define AMUDP_PROCID_NEXT -1 /* Use next unallocated procid */ #ifndef AMUDP_INITIAL_REQUESTTIMEOUT_MICROSEC #define AMUDP_INITIAL_REQUESTTIMEOUT_MICROSEC 100000 /* usec until first retransmit */ #endif #ifndef AMUDP_REQUESTTIMEOUT_BACKOFF_MULTIPLIER #define AMUDP_REQUESTTIMEOUT_BACKOFF_MULTIPLIER 2 /* timeout exponential backoff factor */ #endif #ifndef AMUDP_MAX_REQUESTTIMEOUT_MICROSEC #define AMUDP_MAX_REQUESTTIMEOUT_MICROSEC 30000000 /* max timeout before considered undeliverable */ #endif #define AMUDP_TIMEOUT_INFINITE ((uint32_t)-1) extern uint32_t AMUDP_MaxRequestTimeout_us; extern uint32_t AMUDP_InitialRequestTimeout_us; extern uint32_t AMUDP_RequestTimeoutBackoff; extern void AMUDP_InitRetryCache(void); #ifndef AMUDP_TIMEOUTS_CHECKED_EACH_POLL #define AMUDP_TIMEOUTS_CHECKED_EACH_POLL 1 /* number of timeout values we check upon each poll */ #endif #ifndef AMUDP_MAX_RECVMSGS_PER_POLL #define AMUDP_MAX_RECVMSGS_PER_POLL 10 /* max number of waiting messages serviced per poll (0 for unlimited) */ #endif /* we actually service up to MAX(AMUDP_MAX_RECVMSGS_PER_POLL, network_depth) to prevent unnecessary retransmits (where the awaited reply is sitting in recv buffer) */ #if !defined(USE_CLEAR_UNUSED_SPACE) && AMX_DEBUG #define USE_CLEAR_UNUSED_SPACE 1 /* clear any padding sent in AMs, to prevent valgrind warnings */ #endif #ifndef AMUDP_INITIAL_NUMENDPOINTS #define AMUDP_INITIAL_NUMENDPOINTS 1 /* initial size of bundle endpoint table */ #endif #ifndef AMUDP_DEFAULT_NETWORKDEPTH #define AMUDP_DEFAULT_NETWORKDEPTH 128 /* default depth if none specified */ #endif /* AMUDP-SPMD system configuration parameters */ #ifndef USE_NUMERIC_MASTER_ADDR #define USE_NUMERIC_MASTER_ADDR 0 /* pass a numeric IP on worker command line */ #endif #ifndef USE_COORD_KEEPALIVE #define USE_COORD_KEEPALIVE 1 /* set SO_KEEPALIVE on TCP coord sockets */ #endif #ifndef ABORT_JOB_ON_NODE_FAILURE #define ABORT_JOB_ON_NODE_FAILURE 1 /* kill everyone if any worker drops the TCP coord */ #endif #ifndef USE_BLOCKING_SPMD_BARRIER #define USE_BLOCKING_SPMD_BARRIER 1 /* use blocking AM calls in SPMDBarrier() */ #endif #if !defined(USE_ASYNC_TCP_CONTROL) && \ ( PLATFORM_OS_LINUX && !PLATFORM_OS_SUBFAMILY_WSL ) // NOT functional on WSL1 #define USE_ASYNC_TCP_CONTROL 1 /* use O_ASYNC and signals to stat TCP coord sockets, saves overhead on AMPoll */ #endif #ifndef AMUDP_SIGIO #define AMUDP_SIGIO 39 /* signal used for async IO operations */ #endif /* avoid SIGIO to prevent conflicts with application using library */ /* ------------------------------------------------------------------------------------ */ /* Internal types */ /* message flags: * 0-1: category (amudp_category_t) * 2: request vs. reply * 3-7: numargs * message instance: * 0-5: sequence number * 6-15: instance number */ typedef unsigned char amudp_flag_t; #define AMUDP_SEQNUM_BITS 6 #define AMUDP_SEQNUM_MASK 0x3F #define AMUDP_SEQNUM_INC(v) ((uint8_t)( (((uint8_t)(v))+1) & AMUDP_SEQNUM_MASK)) #define AMUDP_MSG_SETFLAGS(pmsg, isreq, cat, numargs, seqnum, instance) do { \ (pmsg)->flags = (amudp_flag_t) ( \ (((numargs) & 0x1F) << 3) \ | (((isreq) & 0x1) << 2) \ | ((cat) & 0x3) \ ); \ (pmsg)->_instance = (uint16_t) ( \ ((seqnum) & AMUDP_SEQNUM_MASK) \ | (((instance) & 0x3FF) << AMUDP_SEQNUM_BITS) \ ); \ } while (0) #define AMUDP_MSG_NUMARGS(pmsg) ( ( ((unsigned char)(pmsg)->flags) >> 3 ) & 0x1F) #define AMUDP_MSG_ISREQUEST(pmsg) (!!(((unsigned char)(pmsg)->flags) & 0x4)) #define AMUDP_MSG_CATEGORY(pmsg) ((amudp_category_t)((pmsg)->flags & 0x3)) #define AMUDP_MSG_SEQNUM(pmsg) (((uint8_t)(pmsg)->_instance) & AMUDP_SEQNUM_MASK) #define AMUDP_MSG_INSTANCE(pmsg) ((uint16_t)((pmsg)->_instance >> AMUDP_SEQNUM_BITS)) struct amudp_buf; /* active message header & meta info fields */ typedef struct { #if AMUDP_EXTRA_CHECKSUM uint16_t chk1; // these fields must come first in amudp_msg_t uint16_t chk2; uint32_t packetlen; #endif tag_t tag; uint16_t _instance; /* instance and seqnum */ amudp_flag_t flags; handler_t handlerId; uint16_t nBytes; uint8_t systemMessageType; uint8_t systemMessageArg; uintptr_t destOffset; // uint8_t data[]; /* args and data: up to (4*AMUDP_MAX_SHORT)+AMUDP_MAX_LONG */ // this would be a flexible array member if C++ provided that feature. } amudp_msg_t; /* non-transmitted amudp buffer bookkeeping info */ typedef union { struct amudp_rx_status { // Status for receive buffers en_t sourceAddr; // address of remote (16-byte) struct amudp_buf *next; // recv queue struct amudp_ep *dest; /* ep_t of endpoint that received this message */ amudp_node_t sourceId; /* 0-based endpoint id of remote */ int8_t handlerRunning; int8_t replyIssued; } rx; struct amudp_tx_status { // Status for transmit buffers /* Request tx fields */ struct amudp_buf *next; // retransmit ring struct amudp_buf *prev; amx_tick_t timestamp; // request expiration, reply last retransmit #if AMUDP_COLLECT_LATENCY_STATS amx_tick_t firstSendTime; /* for statistical purposes only */ #endif amudp_node_t destId; /* 0-based endpoint id of remote */ uint8_t retryCount; /* where we are in the retransmit backoff */ } tx; uint64_t _pad[5]; } amudp_bufstatus_t; /* active message buffer, including message and space for data payload */ typedef struct amudp_buf { amudp_bufstatus_t status; amudp_msg_t msg; } amudp_buf_t; /* limits for msg (wire packet) and buffer (in-memory rep) */ #define AMUDP_MIN_MSG (sizeof(amudp_msg_t)) #define AMUDP_MAX_SHORT_MSG (AMUDP_MIN_MSG+(4*AMUDP_MAX_SHORT)) #define AMUDP_MAX_MSG (AMUDP_MIN_MSG+(4*AMUDP_MAX_SHORT)+AMUDP_MAX_LONG) #define AMUDP_MIN_BUFFER (sizeof(amudp_buf_t)) #define AMUDP_MAX_SHORT_BUFFER (AMUDP_MIN_BUFFER+(4*AMUDP_MAX_SHORT)) #define AMUDP_MAX_BUFFER (AMUDP_MIN_BUFFER+(4*AMUDP_MAX_SHORT)+AMUDP_MAX_LONG) #define MSGSZ_TO_BUFFERSZ(sz) (offsetof(amudp_buf_t,msg)+(size_t)(sz)) /* message buffer descriptor - the minimal persistent state, kept to a minimum for scalability */ typedef struct { amudp_buf_t *buffer; /* active buffer, NULL for not in use */ uint8_t seqNum; /* seq number for next message to be sent/recv'd on this desc */ } amudp_bufdesc_t; /* ------------------------------------------------------------------------------------ */ /* Buffer pools */ #ifndef AMUDP_BUFFER_STATS #define AMUDP_BUFFER_STATS AMX_DEBUG_VERBOSE #endif struct amudp_bufferpool; typedef union amudp_bufferheader { struct amudp_bufferpool *pool; union amudp_bufferheader *next; uint64_t _pad[1]; // maintain 8-byte alignment } amudp_bufferheader_t; typedef struct amudp_bufferpool { #if AMX_DEBUG uint64_t magic; #endif #if AMUDP_BUFFER_STATS struct { uint64_t alloc_curr; uint64_t alloc_peak; uint64_t alloc_total; uint64_t buffer_bytes; } stats; #endif amudp_bufferheader_t *free; size_t buffersz; } amudp_bufferpool_t; #define AMUDP_NUMBUFFERPOOLS 2 /* ------------------------------------------------------------------------------------ */ /* Endpoints */ typedef struct { en_t name; /* remote address */ tag_t tag; /* remote tag */ amudp_node_t id;/* id in compressed table */ char inuse; /* entry in use */ } amudp_translation_t; typedef struct { amudp_bufdesc_t* requestDesc; // on-demand alloc amudp_bufdesc_t* replyDesc; // on-demand alloc tag_t tag; /* compacted from the translation table */ en_t remoteName; /* compacted from the translation table */ uint16_t instanceHint; /* instance hint pointer for request buffer allocation */ } amudp_perproc_info_t; /* Endpoint bundle object */ struct amudp_eb { struct amudp_ep **endpoints; /* dynamically-grown array of endpoints in bundle */ int n_endpoints; /* Number of EPs in the bundle */ int cursize; /* size of the array */ uint8_t event_mask; /* Event Mask for blocking ops */ }; /* Endpoint object */ struct amudp_ep { en_t name; /* Endpoint name */ tag_t tag; /* current tag */ eb_t eb; /* Bundle of endpoint */ void *segAddr; /* Start address of EP VM segment */ uintptr_t segLength; /* Length of EP VM segment */ amudp_translation_t *translation; /* translation table */ amudp_node_t translationsz; amudp_handler_fn_t handler[AMUDP_MAX_NUMHANDLERS]; /* handler table */ /* internal structures */ SOCKET s; /* UDP socket */ size_t socketRecvBufferSize; /* only used if USE_SOCKET_RECVBUFFER_GROW */ int socketRecvBufferMaxedOut; amudp_node_t P; /* the number of endpoints we communicate with - also number of translations currently in use */ int depth; /* network depth, -1 until AM_SetExpectedResources is called */ int PD; /* cached value of P * depth */ int recvDepth; /* recv depth */ int sendDepth; /* send depth: max outstandingRequests (to all peers) */ int outstandingRequests; /* number of requests awaiting a reply, does NOT include loopback */ amudp_buf_t *timeoutCheckPosn; /* current position of the timeout-checking circular walk */ amx_tick_t replyEpoch; /* timestamp of the first non-loopback reply sent during the current AMPoll */ amudp_perproc_info_t *perProcInfo; amudp_node_t idHint; /* hint of my loopback id */ /* pools for dynamic allocation of buffers */ amudp_bufferpool_t bufferPool[AMUDP_NUMBUFFERPOOLS]; amudp_buf_t *rxHead; /* inbound messages queue */ amudp_buf_t *rxTail; int rxCnt; // length of the queue AMUDP_preHandlerCallback_t preHandlerCallback; /* client hooks for statistical/debugging usage */ AMUDP_postHandlerCallback_t postHandlerCallback; amudp_stats_t stats; /* statistical collection */ }; /* ------------------------------------------------------------------------------------ */ #if AMUDP_COLLECT_STATS #define AMUDP_STATS(stmt) stmt #else #define AMUDP_STATS(stmt) #endif #define enEqual(en1,en2) \ ((en1).sin_port == (en2).sin_port \ && (en1).sin_addr.s_addr == (en2).sin_addr.s_addr) //------------------------------------------------------------------------------------ // global data extern int AMUDP_numBundles; extern eb_t AMUDP_bundles[AMUDP_MAX_BUNDLES]; extern double AMUDP_FaultInjectionRate; extern double AMUDP_FaultInjectionEnabled; /* ------------------------------------------------------------------------------------ */ // Buffer descriptor accessors static inline amudp_bufdesc_t *AMUDP_get_desc(ep_t ep, amudp_node_t proc, int inst, int isrequest, int allocate) { AMX_assert(ep); AMX_assert(ep->perProcInfo); AMX_assert(ep->depth > 0); AMX_assert(proc <= ep->P); AMX_assert(inst <= ep->depth); amudp_perproc_info_t * const pinfo = &ep->perProcInfo[proc]; amudp_bufdesc_t ** const pdesc = (isrequest ? &pinfo->requestDesc : &pinfo->replyDesc); if_pf (allocate && !*pdesc) { // first touch allocate *pdesc = (amudp_bufdesc_t *)AMX_calloc(ep->depth, sizeof(amudp_bufdesc_t)); } AMX_assert(*pdesc); return *pdesc + inst; } #define GET_REQ_DESC(ep, proc, inst) AMUDP_get_desc(ep, proc, inst, 1, 0) #define GET_REP_DESC(ep, proc, inst) AMUDP_get_desc(ep, proc, inst, 0, 0) #define GET_REQ_DESC_ALLOC(ep, proc, inst) AMUDP_get_desc(ep, proc, inst, 1, 1) #define GET_REP_DESC_ALLOC(ep, proc, inst) AMUDP_get_desc(ep, proc, inst, 0, 1) /* ------------------------------------------------------------------------------------ */ /* accessors for packet args, data and length * the only complication here is we want data to be double-word aligned, so we may add * an extra unused 4-byte argument to make sure the data lands on a double-word boundary */ #define HEADER_EVEN_WORDLENGTH ( (sizeof(amudp_msg_t) & 0x7) == 0 ? 1 : 0) #define ACTUAL_NUM_ARGS(args) ( ((args) & 0x1) ? \ (args) + HEADER_EVEN_WORDLENGTH : \ (args) + !HEADER_EVEN_WORDLENGTH ) #define COMPUTE_MSG_SZ(args, nbytes) \ ( sizeof(amudp_msg_t) + 4*ACTUAL_NUM_ARGS(args) + (nbytes) ) #define GET_MSG_SZ(pmsg) \ COMPUTE_MSG_SZ(AMUDP_MSG_NUMARGS(pmsg), (pmsg)->nBytes) #define GET_MSG_DATA(pmsg) \ ((uint8_t*)((pmsg)+1) + 4*ACTUAL_NUM_ARGS(AMUDP_MSG_NUMARGS(pmsg))) #define GET_MSG_ARGS(pmsg) ( (void)((pmsg)->_instance), /* typecheck pmsg */ \ ((uint32_t *)((pmsg)+1)) ) //------------------------------------------------------------------------------------ // global helper functions extern int AMUDP_Block(eb_t eb); /* block until receive buffer becomes non-empty * does not poll, but does handle SPMD control socket events */ // buffer management extern amudp_buf_t *AMUDP_AcquireBuffer(ep_t ep, size_t sz); extern void AMUDP_ReleaseBuffer(ep_t ep, amudp_buf_t *buf); #if USE_SOCKET_RECVBUFFER_GROW extern int AMUDP_growSocketBufferSize(ep_t ep, int targetsize, int szparam, const char *paramname); #endif // debugging printouts extern char *AMUDP_enStr(en_t en, char *buf); extern char *AMUDP_tagStr(tag_t tag, char *buf); extern void AMUDP_DefaultReturnedMsg_Handler(int status, op_t opcode, void *token); //------------------------------------------------------------------------------------ /* SPMD control information that has to be shared */ extern SOCKET AMUDP_SPMDControlSocket; /* SPMD TCP control socket */ extern int AMUDP_SPMDSpawnRunning; /* true while spawn is active */ extern int AMUDP_SPMDRedirectStdsockets; /* true if stdin/stdout/stderr should be redirected */ extern int AMUDP_SPMDwakeupOnControlActivity; /* true if waitForEndpointActivity should return on control socket activity */ extern volatile int AMUDP_SPMDIsActiveControlSocket; //------------------------------------------------------------------------------------ /* system message type field: * low 4 bits are actual type * high 4 bits are bulk transfer slot (all zero for non-bulk messages) * slot is only used if bulk xfer is spanned - more than one packet (arg > 0) */ typedef enum { amudp_system_user=0, // not a system message amudp_system_autoreply, // automatically generated reply amudp_system_returnedmessage, // arg is reason code, req/rep represents the type of message refused amudp_system_numtypes } amudp_system_messagetype_t; //------------------------------------------------------------------------------------ /* return the first environment variable matching one of: AMX_ENV_PREFIX_STR##_##basekey AMUDP##_##basekey basekey warn if more than one is set with different values */ extern char *AMUDP_getenv_prefixed(const char *basekey); /* same with a default value and console reporting in verbose mode */ extern char *AMUDP_getenv_prefixed_withdefault(const char *basekey, const char *defaultval); //------------------------------------------------------------------------------------ // socket support #if USE_ASYNC_TCP_CONTROL #if AMX_DEBUG #define ASYNC_CHECK(enabled) do { \ int flags = fcntl(AMUDP_SPMDControlSocket, F_GETFL, 0); \ if ((enabled && (flags & (O_ASYNC|O_NONBLOCK)) != (O_ASYNC|O_NONBLOCK)) || \ (!enabled && (flags & (O_ASYNC|O_NONBLOCK)) != 0)) { \ AMX_FatalErr("Failed to modify O_ASYNC|O_NONBLOCK flags in fcntl" \ " - try disabling USE_ASYNC_TCP_CONTROL"); \ } \ } while (0) #else #define ASYNC_CHECK(enabled) ((void)0) #endif #define ASYNC_TCP_ENABLE() do { \ if (fcntl(AMUDP_SPMDControlSocket, F_SETFL, O_ASYNC|O_NONBLOCK)) { \ perror("fcntl(F_SETFL, O_ASYNC|O_NONBLOCK)"); \ AMX_FatalErr("Failed to fcntl(F_SETFL, O_ASYNC|O_NONBLOCK) on TCP control socket" \ " - try disabling USE_ASYNC_TCP_CONTROL"); \ } else ASYNC_CHECK(1); \ if (inputWaiting(AMUDP_SPMDControlSocket,false)) /* check for arrived messages */ \ AMUDP_SPMDIsActiveControlSocket = 1; \ } while(0) #define _ASYNC_TCP_DISABLE(ignoreerr) do { \ if (fcntl(AMUDP_SPMDControlSocket, F_SETFL, 0) && !ignoreerr) { \ perror("fcntl(F_SETFL, 0)"); \ AMX_FatalErr("Failed to fcntl(F_SETFL, 0) on TCP control socket" \ " - try disabling USE_ASYNC_TCP_CONTROL"); \ } else if (!ignoreerr) ASYNC_CHECK(0); \ } while(0) #define ASYNC_TCP_DISABLE() _ASYNC_TCP_DISABLE(0) #define ASYNC_TCP_DISABLE_IGNOREERR() _ASYNC_TCP_DISABLE(1) #else #define ASYNC_TCP_ENABLE() ((void)0) #define ASYNC_TCP_DISABLE() ((void)0) #define ASYNC_TCP_DISABLE_IGNOREERR() ((void)0) #endif //------------------------------------------------------------------------------------ AMUDP_END_EXTERNC #endif gasnet-2025.8.0/other/amudp/Makefile.generic0000664000175000017500000000063115142313673020724 0ustar alastairalastair# $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/Makefile.generic $ # Description: Linux Makefile fragment # Copyright 2000, Dan Bonachea # additional defines required to build on this platform platform_defines = # additional linker flags required to build on this platform platform_ldflags = # additional libraries and/or library directories platform_libraries = gasnet-2025.8.0/other/amudp/Makefile.in0000664000175000017500000011045515142313673017724 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/Makefile.am $ # Description: Makefile for AMUDP/GASNet # Copyright 2004, Dan Bonachea # Terms of use are as specified in license.txt # NOTE: This Makefile is used to tie in with the GASNet build infrastructure # the stand-alone AMUDP product doesn't currently provide an automake framework am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @USE_UDP_CONDUIT_TRUE@bin_PROGRAMS = amudprun$(EXEEXT) subdir = other/amudp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" PROGRAMS = $(bin_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libamudp_a_AR = $(AR) $(ARFLAGS) libamudp_a_LIBADD = am_libamudp_a_OBJECTS = amudp_cdefs.$(OBJEXT) amudp_ep.$(OBJEXT) \ amudp_reqrep.$(OBJEXT) amudp_spawn.$(OBJEXT) \ amudp_spmd.$(OBJEXT) exc.$(OBJEXT) sig.$(OBJEXT) \ socklist.$(OBJEXT) sockutil.$(OBJEXT) libamudp_a_OBJECTS = $(am_libamudp_a_OBJECTS) amudprun_SOURCES = amudprun.c amudprun_OBJECTS = amudprun.$(OBJEXT) amudprun_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libamudp_a_SOURCES) amudprun.c DIST_SOURCES = $(libamudp_a_SOURCES) amudprun.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.tests \ $(top_srcdir)/config-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) VPATH = $(srcdir) ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @GASNET_OPT_CFLAGS@ @DEVWARN_CFLAGS@ @MISC_CFLAGS@ @MISC_CPPFLAGS@ $(MANUAL_CFLAGS) $(apputils_flags) COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @GASNET_OPT_CXXFLAGS@ @DEVWARN_CXXFLAGS@ @MISC_CXXFLAGS@ @MISC_CPPFLAGS@ $(MANUAL_CXXFLAGS) CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ @cxxLDFLAGS@ $(MANUAL_LDFLAGS) LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 no-dependencies apputils_flags = @BUILDCONFIG_DEBUG_FALSE@BUILDCONFIG_DEFINES = -DAMUDP_NDEBUG=1 -DNDEBUG @BUILDCONFIG_DEBUG_TRUE@BUILDCONFIG_DEFINES = -DAMUDP_DEBUG=1 @VALGRIND_FALSE@VALGRIND_DEFINES = @VALGRIND_TRUE@VALGRIND_DEFINES = -DUSE_CLEAR_UNUSED_SPACE platform_defines = @GASNET_EXTRA_DEFINES@ $(BUILDCONFIG_DEFINES) $(VALGRIND_DEFINES) @INTTYPES_DEFINES@ -DAMX_ENV_PREFIX=GASNET $(MANUAL_DEFINES) platform_libraries = -L$(top_builddir) -lgasnet_tools-seq @LIBS@ @GASNET_UDP_LIBS@ amxdir = $(srcdir)/../amx altincdir = $(srcdir)/.. gasnet_tools = -I$(srcdir)/../.. -I../.. -DHAVE_GASNET_TOOLS INCLUDES = -I$(srcdir) -I. -I$(amxdir) -I$(altincdir) $(platform_defines) $(gasnet_tools) compile = $(CC) $(CFLAGS) $(INCLUDES) cxxcompile = $(CXX) $(CXXFLAGS) $(INCLUDES) link = $(CXX) $(CXXFLAGS) $(LDFLAGS) $(INCLUDES) linkend = $(platform_libraries) $(MANUAL_LIBS) @USE_UDP_CONDUIT_TRUE@BUILT_SOURCES = amx_portable_platform.h @USE_UDP_CONDUIT_TRUE@lib_LIBRARIES = libamudp.a headers = \ amudp.h \ amudp_const.h \ amudp_internal.h \ amudp_spmd.h \ exc.h \ sig.h \ sockaddr.h \ socket.h \ socklist.h \ sockutil.h allheaders = $(BUILT_SOURCES) $(headers) libamudp_a_SOURCES = \ amudp_cdefs.c \ amudp_ep.cpp \ amudp_reqrep.cpp \ amudp_spawn.cpp \ amudp_spmd.cpp \ exc.cpp \ sig.cpp \ socklist.cpp \ sockutil.cpp libamudp_a_DEPENDENCIES = $(libamudp_a_SOURCES:%.cpp=%.o) $(libamudp_a_SOURCES:%.c=%.o) # Makefile.{standalone,common,generic} enable amudprun-host EXTRA_DIST = \ $(headers) \ Makefile.common \ Makefile.generic \ Makefile.standalone \ Makefile.tests \ Makefile.titanium.in \ amudprun.c \ license.txt # ---------- test programs ------------- # all the test executables testprograms = \ testam \ testbounce \ testbulk \ testlatency \ testlatencyM \ testping \ testreduce \ testoutput \ testgetput \ testreadwrite TESTLOG = `pwd`/.test-results TEST_LINE = ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ AMUDP_RUNCMD_EXP = \ TEST_RUN_P=`echo "$$TEST_RUN" | sed 's/ .*$$//'` ; \ TEST_RUN_A=`echo "$$TEST_RUN" | sed 's/^[^ ]* //'` ; \ TEST_DOIT="$$TEST_RUN" TEST_RUNCMD = ; $(AMUDP_RUNCMD_EXP) ; \ testname=`basename $$TEST_RUN_P` ; \ faildesc="amudp/$$testname" ; \ if test -x "$$TEST_RUN_P" ; then \ echo " **** $$testname **** "; \ echo $$TEST_DOIT ; \ ( eval $$TEST_DOIT || echo "ERROR: Test exited with failure code=$$?" 2>&1 ) | tee .test-output ; \ failure=`$(PERL) -ne 'print if (/ERROR/ || /fatal signal/);' .test-output` ; \ if test "$$failure" != "" ; then \ echo " " >> $(TESTLOG) ; \ echo " *-* $$faildesc *-*" >> $(TESTLOG) ; \ echo " " >> $(TESTLOG) ; \ echo "$$failure" >> $(TESTLOG) ; \ fi ; \ rm -f .test-output ; \ echo $(TEST_LINE) ; \ fi TEST_NODES = 2 TEST_ITERS = 100 AMUDP_SPAWNFN = L TEST_SPAWNFN = $(AMUDP_SPAWNFN) TEST_MODE = P TEST_DEPTH = 32 TEST_DUPLEX = H AMUDP_NETWORKDEPTH = $(TEST_DEPTH) @USE_UDP_CONDUIT_FALSE@clean_local_files = @USE_UDP_CONDUIT_TRUE@clean_local_files = libamudp.a *.o core .test-results amudprun-host $(BUILT_SOURCES) CLEANFILES = $(clean_local_files) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .cpp .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/Makefile.tests $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign other/amudp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign other/amudp/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(srcdir)/Makefile.tests $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ if test -f $$p; then \ $(am__strip_dir) \ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) libamudp.a: $(libamudp_a_OBJECTS) $(libamudp_a_DEPENDENCIES) $(EXTRA_libamudp_a_DEPENDENCIES) $(AM_V_at)-rm -f libamudp.a $(AM_V_AR)$(libamudp_a_AR) libamudp.a $(libamudp_a_OBJECTS) $(libamudp_a_LIBADD) $(AM_V_at)$(RANLIB) libamudp.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.o: $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: $(AM_V_CXX)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(LIBRARIES) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLIBRARIES \ clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-libLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-libLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libLIBRARIES clean-local \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libLIBRARIES install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-libLIBRARIES .PRECIOUS: Makefile # ensure 'make amudprun' works on Cygwin @HAVE_EXESUFFIX_TRUE@@USE_UDP_CONDUIT_TRUE@amudpru% : amudpru%$(EXESUFFIX) @HAVE_EXESUFFIX_TRUE@@USE_UDP_CONDUIT_TRUE@ : amx_portable_platform.h: $(altincdir)/gasnet_portable_platform.h cp -f $< $@ $(libamudp_a_DEPENDENCIES): $(allheaders) tests: apputils.o $(testprograms) test%: test%.o apputils.o libamudp.a $(link) -o $@ $< apputils.o -L. -lamudp $(linkend) tests-clean: rm -f $(testprograms) run-tests: tests @rm -f $(TESTLOG) ; touch $(TESTLOG) @echo $(TEST_LINE) @echo Running AMUDP tests... @echo If this fails to spawn a job, you may need to re-run with a @echo command like: $(MAKE) run-tests AMUDP_SPAWNFN=S @echo $(TEST_LINE) @TEST_RUN="./testping $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testlatency $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testlatencyM $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) $(TEST_MODE) 64" $(TEST_RUNCMD) @TEST_RUN="./testbulk $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) 1048576 $(TEST_MODE) $(TEST_DUPLEX)" $(TEST_RUNCMD) @TEST_RUN="./testam $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testbounce $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS) $(TEST_MODE)" $(TEST_RUNCMD) @TEST_RUN="./testreduce $(TEST_NODES) $(TEST_SPAWNFN)" $(TEST_RUNCMD) @TEST_RUN="./testgetput $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS)" $(TEST_RUNCMD) @TEST_RUN="./testreadwrite $(TEST_NODES) $(TEST_SPAWNFN) $(TEST_ITERS)" $(TEST_RUNCMD) @echo TESTS COMPLETE @cat $(TESTLOG) ; rm -f $(TESTLOG) # make a distribution amxdist: @set -x ; \ VERSION=`grep "#define AMUDP_LIBRARY_VERSION" $(srcdir)/amudp_const.h | head -2 | $(PERL) -e '$$/=undef; my @a=split(/\s+/,<>); print "$$a[2].$$a[5]"'` ; \ distdir=amudp$${VERSION} ; \ echo "+++ Building distribution for AMUDP version $${VERSION} +++" && \ rm -Rf $$distdir.tar.gz $$distdir && \ mkdir $$distdir && \ cp $(srcdir)/Makefile.* $(srcdir)/README* $(srcdir)/*.txt $(srcdir)/*.cpp $(srcdir)/*.c $(srcdir)/*.h $(amxdir)/*.[ch] \ $(altincdir)/portable_inttypes.h $(altincdir)/gasnet_portable_platform.h \ $$distdir && \ cd $$distdir && \ mv gasnet_portable_platform.h amx_portable_platform.h && \ rm -f Makefile.in Makefile.am Makefile.titanium* && \ mv Makefile.standalone Makefile && \ cd .. && \ tar -cvhf $$distdir.tar $$distdir && gzip -9 $$distdir.tar && \ rm -Rf $$distdir && \ echo "+++ $$distdir.tar.gz is ready for distribution +++" test%.o : $(amxdir)/test%.c $(amxdir)/*.h $(allheaders) $(compile) -DAMUDP -I$(amxdir) -c $< -o $@ apputils.o : $(amxdir)/apputils.c $(amxdir)/apputils.h $(allheaders) $(compile) -DAMUDP -I$(amxdir) -c $(amxdir)/apputils.c -o apputils.o amudprun$(EXEEXT): amudprun.o $(headers) libamudp.a $(link) -o $@ $< -L. -lamudp $(linkend) %.o: %.c $(allheaders) $(amxdir)/*.h $(compile) -o $@ -c `test -f $(srcdir)/$< && echo "$(srcdir)/"`$< %.o: %.cpp $(allheaders) $(amxdir)/*.h $(top_builddir)/libgasnet_tools-seq.a $(cxxcompile) -o $@ -c `test -f $(srcdir)/$< && echo "$(srcdir)/"`$< amudp_cdefs.o: $(amxdir)/amx_internal.c $(top_builddir)/libgasnet_tools-seq.a: force @cd $(top_builddir) && $(MAKE) libgasnet_tools-seq.a # WARNING: This is NOT an officially supported feature and may be removed in the future! # This target attempts to build amudprun for the host system and output binary amudprun-host # It may require explicitly providing working C/C++ compilers for the host, eg: # gmake -C other/amudp amudprun-host CC=clang CXX=clang++ amudprun-host$(EXEEXT): force @ srcdir=`cd $(srcdir) && pwd`; \ set -x && \ mkdir -p .host && \ cd .host && \ ln -sf $$srcdir/Makefile* . && \ ln -sf $$srcdir/../portable_inttypes.h . && \ ln -sf $$srcdir/../gasnet_portable_platform.h amx_portable_platform.h && \ ln -sf $$srcdir/../amx/*.[ch] . && \ $(MAKE) amudprun -f Makefile.standalone srcdir=$$srcdir amxdir=. altincdir=. MANUAL_DEFINES="-DAMX_ENV_PREFIX=GASNET $(MANUAL_DEFINES)" && \ mv amudprun ../amudprun-host && \ cd .. && rm -Rf .host @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@check-exports: libamudp.a @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ @echo Checking libamudp exports... @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ @lib=libamudp.a ; \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ @NM@ --defined-only $$lib | \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ @PERL@ -pe 's/ \.refptr\.//' | \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ grep -v -e ' [\._]*amudp_' -e ' [\._]*AMUDP_' -e ' [\._]*AM_' \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ -e ' [\._]*amx_' -e ' [\._]*AMX_' -e ' [\._]*SOCK_' \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ -e ' [\._]*gasnett_' -e ' [\._]*gasneti_' \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ -e ' [\._][\._]*debug_' -e 'get_pc_thunk' \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ -e __FUNCTION__ -e __PRETTY_FUNCTION__ -e debug_info_seg | \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ @PERL@ -n -e 'print if /^[0-9a-fA-F]+\s+[A-Z]\s+/' > .$$lib.exp; \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ if test -s .$$lib.exp ; then \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ cat .$$lib.exp ; \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ echo FAILED ; \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ failed=1 ; \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ else \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ echo PASSED ; \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ fi ; \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ rm -f .$$lib.exp ; \ @GNU_NM_TRUE@@USE_UDP_CONDUIT_TRUE@ exit $$failed @GNU_NM_FALSE@@USE_UDP_CONDUIT_TRUE@check-exports: libamudp.a @GNU_NM_FALSE@@USE_UDP_CONDUIT_TRUE@ @echo check-exports test SKIPPED # No check-exports by default due to name mangling @USE_UDP_CONDUIT_TRUE@check: tests @USE_UDP_CONDUIT_TRUE@clean-local: @USE_UDP_CONDUIT_TRUE@ rm -Rf .host @USE_UDP_CONDUIT_TRUE@ @for f in $(testprograms); do \ @USE_UDP_CONDUIT_TRUE@ cmd="rm -f '$$f$(EXESUFFIX)'"; echo "$$cmd"; eval "$$cmd" || exit $$? ; \ @USE_UDP_CONDUIT_TRUE@ done; @USE_UDP_CONDUIT_FALSE@clean-local: @USE_UDP_CONDUIT_FALSE@ @: #empty rule force: .PHONY: force tests run-tests # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/other/amudp/sig.cpp0000664000175000017500000001301015142313673017132 0ustar alastairalastair// $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/sig.cpp $ // Description: signal handling module // Copyright 1999, Dan Bonachea #include #include #include #include "sig.h" //------------------------------------------------------------------------------------ LPSIGHANDLER reghandler(int sigtocatch, LPSIGHANDLER fp) { LPSIGHANDLER fpret = signal(sigtocatch, fp); if (fpret == (LPSIGHANDLER)SIG_ERR) { printf("Got a SIG_ERR while registering handler for signal %s. Errno = %i\n", sigstr(sigtocatch), errno); return NULL; } #ifdef SIG_HOLD else if (fpret == (LPSIGHANDLER)SIG_HOLD) { printf("Got a SIG_HOLD while registering handler for signal %s(%i).\n", sigstr(sigtocatch), errno); return NULL; } #endif return fpret; } //------------------------------------------------------------------------------------ static struct { int sig; const char* desc; SIGTYPE sigtype; } sigdesctable[] = { #ifdef SIGABRT {SIGABRT, "SIGABRT: Process abort signal.", ST_PROGRAM_ERROR}, // (abort()) #endif #ifdef SIGFPE {SIGFPE, "SIGFPE: Erroneous arithmetic operation.", ST_PROGRAM_ERROR}, // (FP error) #endif #ifdef SIGILL {SIGILL, "SIGILL: Illegal instruction.", ST_PROGRAM_ERROR}, // (bad instruction) #endif #ifdef SIGINT {SIGINT, "SIGINT: Terminal interrupt signal.", ST_TERM_INT}, // (control-c) #endif #ifdef SIGSEGV {SIGSEGV, "SIGSEGV: Invalid memory reference.", ST_PROGRAM_ERROR}, // (seg fault) #endif #ifdef SIGTERM {SIGTERM, "SIGTERM: Termination signal.", ST_SYS_INT}, // (kill command) #endif #ifdef SIGALRM {SIGALRM, "SIGALRM: Alarm clock.", ST_OTHER}, #endif #ifdef SIGHUP {SIGHUP, "SIGHUP: Hangup.", ST_SYS_INT}, #endif #ifdef SIGKILL {SIGKILL, "SIGKILL: Kill (cannot be caught or ignored).", ST_FATAL}, // (kill -9 command) #endif #ifdef SIGPIPE {SIGPIPE, "SIGPIPE: Write on a pipe with no one to read it.", ST_OTHER}, // (send() after close) #endif #ifdef SIGQUIT {SIGQUIT, "SIGQUIT: Terminal quit signal.", ST_TERM_INT}, // (control-\) #endif #ifdef SIGUSR1 {SIGUSR1, "SIGUSR1: User-defined signal 1.", ST_OTHER}, #endif #ifdef SIGUSR2 {SIGUSR2, "SIGUSR2: User-defined signal 2.", ST_OTHER}, #endif #ifdef SIGCHLD {SIGCHLD, "SIGCHLD: Child process terminated or stopped.", ST_OTHER}, // (sent to parent proc) #endif #ifdef SIGCONT {SIGCONT, "SIGCONT: Continue executing, if stopped.", ST_OTHER}, // (also sent by kill command) #endif #ifdef SIGSTOP {SIGSTOP, "SIGSTOP: Stop executing (cannot be caught or ignored).", ST_FATAL}, #endif #ifdef SIGTSTP {SIGTSTP, "SIGTSTP: Terminal stop signal.", ST_TERM_INT}, // (control-z) #endif #ifdef SIGTTIN {SIGTTIN, "SIGTTIN: Background process attempting read.", ST_OTHER}, #endif #ifdef SIGTTOU {SIGTTOU, "SIGTTOU: Background process attempting write.", ST_OTHER}, #endif #ifdef SIGBUS {SIGBUS, "SIGBUS: Bus error.", ST_PROGRAM_ERROR}, // (alignment error) #endif #ifdef SIGPOLL {SIGPOLL, "SIGPOLL: Pollable event.", ST_OTHER}, #endif #ifdef SIGXFSZ {SIGXFSZ, "SIGXFSZ: File size limit exceeded.", ST_PROGRAM_ERROR}, #endif #ifdef SIGPROF {SIGPROF, "SIGPROF: Profiling timer expired.", ST_OTHER}, #endif #ifdef SIGSYS {SIGSYS, "SIGSYS: Bad system call.", ST_PROGRAM_ERROR}, #endif #ifdef SIGTRAP {SIGTRAP, "SIGTRAP: Trace/breakpoint trap.", ST_PROGRAM_ERROR}, #endif #ifdef SIGURG {SIGURG, "SIGURG: High bandwidth data is available at a socket.", ST_OTHER}, #endif #ifdef SIGVTALRM {SIGVTALRM,"SIGVTALRM: Virtual timer expired.", ST_OTHER}, #endif #ifdef SIGXCPU {SIGXCPU, "SIGXCPU: CPU time limit exceeded.", ST_PROGRAM_ERROR}, #endif #ifdef SIGEMT {SIGEMT, "SIGEMT: Emulation Trap", ST_OTHER}, #endif #ifdef SIGPWR {SIGPWR, "SIGPWR: Power Fail or Restart", ST_OTHER}, #endif #ifdef SIGWINCH {SIGWINCH, "SIGWINCH: Window Size Change", ST_OTHER}, #endif #ifdef SIGWAITING {SIGWAITING, "SIGWAITING: Concurrency signal reserved by threads library", ST_OTHER}, #endif #ifdef SIGLWP {SIGLWP, "SIGLWP: Inter-LWP signal reserved by threads library", ST_OTHER}, #endif #ifdef SIGFREEZE {SIGFREEZE, "SIGFREEZE: Check point Freeze", ST_OTHER}, #endif #ifdef SIGTHAW {SIGTHAW, "SIGTHAW: Check point Thaw", ST_OTHER}, #endif #ifdef SIGCANCEL {SIGCANCEL, "SIGCANCEL: Cancellation signal reserved by threads library", ST_OTHER}, #endif // SIGRTMIN ... SIGRTMAX (real-time signals) ignored {0, NULL, ST_OTHER} }; //------------------------------------------------------------------------------------ const char* sigstr(int sig) { for (int i=0; sigdesctable[i].desc; i++) { if (sigdesctable[i].sig == sig) return sigdesctable[i].desc; } return "Unknown Signal"; } //------------------------------------------------------------------------------------ void regallhandler(LPSIGHANDLER fp, SIGTYPE sigtype) { for (int i=0; sigdesctable[i].desc; i++) { if (sigdesctable[i].sigtype == sigtype || (sigtype == ST_ALL_CATCHABLE && sigdesctable[i].sigtype != ST_FATAL)) reghandler(sigdesctable[i].sig, fp); } return; } //------------------------------------------------------------------------------------ SIGTYPE getsigtype(int sig) { for (int i=0; sigdesctable[i].desc; i++) { if (sigdesctable[i].sig == sig) return sigdesctable[i].sigtype; } return ST_OTHER; } //------------------------------------------------------------------------------------ gasnet-2025.8.0/other/amudp/exc.cpp0000664000175000017500000000505115142313673017135 0ustar alastairalastair// $Source: bitbucket.org:berkeleylab/gasnet.git/other/amudp/exc.cpp $ // Description: Exception handlers for fserver // Copyright 1999, Dan Bonachea & Scott McPeak #include #include // strlen, strcpy #include "exc.h" // this module #include "sockutil.h" //------------------------------------------------------------------------------------ void ackackack(int*) {} void breaker() { static int i=0; int a=1; // all this junk is just to make sure // that this function has a complete ackackack(&a); // stack frame, so the debugger can unwind i++; // the stack } // ------------------------- xBase ----------------- int xBase::creationCount = 0; xBase::xBase(char const *m) { strncpy(msg, m, MAX_EXC_MSG-1); msg[MAX_EXC_MSG-1] = '\0'; // done at very end when we know this object will // successfully be created creationCount++; } xBase::xBase(xBase const &obj){ strcpy(msg, obj.msg); creationCount++; } xBase::~xBase() { creationCount--; } // this is obviously not perfect, since exception objects can be // created and not thrown; I heard the C++ standard is going to, // or already does, include (by this name?) a function that does this // correctly; until then, this will serve as a close approximation // (this kind of test is, IMO, not a good way to handle the underlying // problem, but it does reasonably handle 70-90% of the cases that // arise in practice, so I will endorse it for now) bool unwinding() { return xBase::creationCount != 0; } // tweaked version bool unwinding_other(xBase const &) { // we know the passed xBase exists.. any others? return xBase::creationCount > 1; } //------------------------------------------------------------------------------------- // ------------------- xSocket ---------------------------- xSocket::xSocket(SOCKET s, char const *msg) : xBase(msg), socket(s) {} xSocket::xSocket(xSocket const &obj) : xBase(obj), socket(obj.socket) {} xSocket::~xSocket() {} void xsocket(SOCKET s, char const *msg) { // creates and throws an xsocket char tmp[MAX_EXC_MSG-1]; int err = errno; snprintf(tmp, sizeof(tmp), "%s (%i:%s)", msg, err, strerror(err)); THROW(xSocket(s, tmp)); } //------------------------------------------------------------------------------------- // ------------------- xForm ---------------------------- xForm::xForm(char const *m) : xBase(m) {} // create exception object with message 'm' xForm::xForm(xForm const &obj) : xBase(obj) {} xForm::~xForm() {} gasnet-2025.8.0/other/detect-pshm.c0000664000175000017500000000256715142313673017136 0ustar alastairalastair/* detect-sysv: Copyright 2008, Jason Duell This is a program that will tell you the maximum supported Posix shared memory segment available on a machine. (or, of course, if it doesn't compile/run, that they aren't supported). On Linux, link with -lrt */ #include #include #include #include #include #include #include #include #define SHM_NAME "/posixshmemelem" #define MEGABYTE (1024*1024LU) int main(int argc, char **argv) { int fd; void *addr; size_t sz, gotsz = 0; /* find biggest size we can open */ for (sz = MEGABYTE; sz *= 2; ) { fd = shm_open(SHM_NAME, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR); if (fd == -1) { perror("error in shm_open"); exit (-1); } shm_unlink(SHM_NAME); if (ftruncate(fd, sz) == -1) { perror("error in ftruncate"); printf("Biggest size was %lu (%lu MB)\n", (unsigned long)gotsz , (unsigned long)gotsz/MEGABYTE); exit (-1); } addr = mmap(NULL, sz, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if (!addr) { perror("error in mmap"); printf("Biggest size was %lu (%lu MB)\n", (unsigned long)gotsz , (unsigned long)gotsz/MEGABYTE); exit (-1); } printf("got region of %lu bytes (%lu MB)\n", (unsigned long)sz , (unsigned long)sz/MEGABYTE); close(fd); munmap(addr, sz); gotsz = sz; } return 0; } gasnet-2025.8.0/other/fragment-body.mak.in0000664000175000017500000000770415142313673020410 0ustar alastairalastair# $Source: bitbucket.org:berkeleylab/gasnet.git/other/fragment-body.mak.in $ # ---------------------------------------------------------------------- # Following section @configure_input@ # ---------------------------------------------------------------------- # Directory-based options GASNET_INCLUDES = -I###INSTALL_INCLUDE### -I###INSTALL_INCLUDE###/#conduit_name#-conduit $(CONDUIT_INCLUDES) $(CONDUIT_INCLUDES_#THREAD_MODEL#) GASNET_LIBDIRS = -L###INSTALL_LIB### # Textual lines containing the string "###NOINSTALL###" are removed by the install process # (must be one continuous line) ###NOINSTALL### GASNET_INCLUDES = -I@TOP_SRCDIR@ -I@TOP_SRCDIR@/#conduit_name#-conduit -I@TOP_SRCDIR@/other $(CONDUIT_INCLUDES) $(CONDUIT_INCLUDES_#THREAD_MODEL#) -I@TOP_SRCDIR@/extended-ref/vis -I@TOP_SRCDIR@/extended-ref/coll -I@TOP_SRCDIR@/extended-ref/ratomic -I@TOP_SRCDIR@/extended-ref -I@TOP_SRCDIR@/other/kinds -I@TOP_BUILDDIR@ ###NOINSTALL### GASNET_LIBDIRS = -L@TOP_BUILDDIR@/#conduit_name#-conduit ###NOINSTALL### # ---------------------------------------------------------------------- # C compiler and options GASNET_CC = @CC@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ $(CONDUIT_OPT_CFLAGS) $(CONDUIT_OPT_CFLAGS_#THREAD_MODEL#) GASNET_MISC_CFLAGS = @MISC_CFLAGS@ $(CONDUIT_MISC_CFLAGS) $(CONDUIT_MISC_CFLAGS_#THREAD_MODEL#) GASNET_MISC_CPPFLAGS = @MISC_CPPFLAGS@ $(CONDUIT_MISC_CPPFLAGS) $(CONDUIT_MISC_CPPFLAGS_#THREAD_MODEL#) GASNET_DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ $(CONDUIT_DEVWARN_CFLAGS) $(CONDUIT_DEVWARN_CFLAGS#THREAD_MODEL#) # ---------------------------------------------------------------------- # C++ compiler and options # TODO: some options (especially CONDUIT_*) are not distinct from C compiler GASNET_CXX = @CXX@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ $(CONDUIT_OPT_CFLAGS) $(CONDUIT_OPT_CFLAGS_#THREAD_MODEL#) GASNET_MISC_CXXFLAGS = @MISC_CXXFLAGS@ $(CONDUIT_MISC_CFLAGS) $(CONDUIT_MISC_CFLAGS_#THREAD_MODEL#) GASNET_MISC_CXXCPPFLAGS = @MISC_CPPFLAGS@ $(CONDUIT_MISC_CPPFLAGS) $(CONDUIT_MISC_CPPFLAGS_#THREAD_MODEL#) GASNET_DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ $(CONDUIT_DEVWARN_CXXFLAGS) $(CONDUIT_DEVWARN_CXXFLAGS#THREAD_MODEL#) # ---------------------------------------------------------------------- # Common defines GASNET_EXTRADEFINES_SEQ = GASNET_EXTRADEFINES_PAR = @GASNET_THREAD_DEFINES@ GASNET_EXTRADEFINES_PARSYNC = @GASNET_THREAD_DEFINES@ GASNET_DEFINES = @GASNET_EXTRA_DEFINES@ -DGASNET_#THREAD_MODEL# $(GASNET_EXTRADEFINES_#THREAD_MODEL#) $(CONDUIT_DEFINES) $(CONDUIT_DEFINES_#THREAD_MODEL#) $(MANUAL_DEFINES) # ---------------------------------------------------------------------- # Documented compilation convenience aliases GASNET_CFLAGS = $(GASNET_OPT_CFLAGS) $(GASNET_MISC_CFLAGS) $(MANUAL_CFLAGS) GASNET_CPPFLAGS = $(GASNET_MISC_CPPFLAGS) $(GASNET_DEFINES) $(GASNET_INCLUDES) GASNET_CXXFLAGS = $(GASNET_OPT_CXXFLAGS) $(GASNET_MISC_CXXFLAGS) $(MANUAL_CXXFLAGS) GASNET_CXXCPPFLAGS = $(GASNET_MISC_CXXCPPFLAGS) $(GASNET_DEFINES) $(GASNET_INCLUDES) # ---------------------------------------------------------------------- # linker and options GASNET_LD = $(GASNET_LD_OVERRIDE) # linker flags that GASNet clients should use GASNET_LDFLAGS = $(GASNET_LDFLAGS_OVERRIDE) @GASNET_PSHM_LDFLAGS@ $(CONDUIT_LDFLAGS) $(CONDUIT_LDFLAGS_#THREAD_MODEL#) $(MANUAL_LDFLAGS) GASNET_EXTRALIBS_SEQ = GASNET_EXTRALIBS_PAR = @GASNET_THREAD_LIBS@ GASNET_EXTRALIBS_PARSYNC = @GASNET_THREAD_LIBS@ # libraries that GASNet clients should append to link line GASNET_LIBS = \ $(GASNET_LIBDIRS) \ -lgasnet-#conduit_name#-#thread_model# \ $(CONDUIT_LIBS) \ $(CONDUIT_LIBS_#THREAD_MODEL#) \ $(GASNET_EXTRALIBS_#THREAD_MODEL#) \ @GASNET_PSHM_LIBS@ \ @LIBGCC@ \ @LIBS@ \ @LIBM@ \ $(MANUAL_LIBS) # ---------------------------------------------------------------------- gasnet-2025.8.0/other/Makefile.in0000664000175000017500000007320015142313673016612 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/other/Makefile.am $ # Description: Makefile for GASNet other # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = other ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = perlstart Makefile-libgasnet.mak \ gasnet_tools-fragment.mak mpirun_common fragment-head.mak \ fragment-body.mak Makefile-conduit.mak CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile-conduit.mak.in \ $(srcdir)/Makefile-libgasnet.mak.in $(srcdir)/Makefile.in \ $(srcdir)/fragment-body.mak.in $(srcdir)/fragment-head.mak.in \ $(srcdir)/gasnet_tools-fragment.mak.in \ $(srcdir)/mpirun_common.in $(srcdir)/perlstart.in \ $(top_srcdir)/config-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ # GASNET_TOOLSONLY_FALSE_BEGIN @NEED_DOCDIR_TRUE@docdir = $(datadir)/doc/GASNet docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 # GASNET_TOOLSONLY_TRUE_BEGIN # CONDUITMODE_SUBDIRS = # CONDUITMODE_EXTRADIST = # GASNET_TOOLSONLY_TRUE_END # GASNET_TOOLSONLY_FALSE_BEGIN CONDUITMODE_SUBDIRS = \ ammpi \ amudp \ contrib \ firehose \ valgrind CONDUITMODE_EXTRADIST = \ amx \ hwloc \ ssh-spawner \ mpi-spawner \ pmi-spawner \ spawner \ kinds \ myxml \ detect-pshm.c \ pkgconfig-conduit.pc \ # exclude these from distribution for now # GASNET_TOOLSONLY_FALSE_END SUBDIRS = $(CONDUITMODE_SUBDIRS) EXTRA_DIST = \ $(CONDUITMODE_EXTRADIST) \ Makefile-echovar.mak \ pkgconfig-tools.pc \ check-pp.c \ check-header-erase.pl \ tools-toggle.pl # Excluded from distribution: # detect-cachesz.c \ # include_HEADERS = \ gasnet_arch_arm.h \ portable_inttypes.h \ portable_platform.h \ gasnet_portable_platform.h @CONDUIT_MODE_TRUE@@USE_UDP_CONDUIT_TRUE@UDP_dir = $(top_builddir)/other/amudp @CONDUIT_MODE_TRUE@@USE_AMMPI_TRUE@MPI_dir = $(top_builddir)/other/ammpi @CONDUIT_MODE_TRUE@testdirs = $(UDP_dir) $(MPI_dir) @CONDUIT_MODE_TRUE@CONDUITMODE_TARGETS = Makefile-conduit.mak mpirun_common # Automated correctness checks for portable_platform.h # CHECK_PP_C = $(srcdir)/check-pp.c CLEANFILES = check-pp-tgt$(EXESUFFIX) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign other/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign other/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): perlstart: $(top_builddir)/config.status $(srcdir)/perlstart.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ Makefile-libgasnet.mak: $(top_builddir)/config.status $(srcdir)/Makefile-libgasnet.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gasnet_tools-fragment.mak: $(top_builddir)/config.status $(srcdir)/gasnet_tools-fragment.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mpirun_common: $(top_builddir)/config.status $(srcdir)/mpirun_common.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ fragment-head.mak: $(top_builddir)/config.status $(srcdir)/fragment-head.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ fragment-body.mak: $(top_builddir)/config.status $(srcdir)/fragment-body.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ Makefile-conduit.mak: $(top_builddir)/config.status $(srcdir)/Makefile-conduit.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive all-am: Makefile $(HEADERS) all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-includeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-includeHEADERS uninstall-local .MAKE: $(am__recursive_targets) check-am install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am check-local clean clean-generic cscopelist-am \ ctags ctags-am dist-hook distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-includeHEADERS uninstall-local .PRECIOUS: Makefile # cross-configure-help.c @CONDUIT_MODE_TRUE@tests tests-clean run-tests check-exports: @CONDUIT_MODE_TRUE@ @list='$(testdirs)'; for dir in $$list ; do \ @CONDUIT_MODE_TRUE@ ( cd "$$dir" && $(MAKE) $@ ) || exit $$?; \ @CONDUIT_MODE_TRUE@ done $(CHECK_PP_C): gasnet_portable_platform.h portable_platform.h check-pp-tgt: $(CHECK_PP_C) @CC@ @CFLAGS@ @LDFLAGS@ -I$(srcdir) -I$(top_builddir) '-DCONFIG_HEADER="gasnet_config.h"' -D_IN_GASNET_TOOLS_H=1 $(MANUAL_DEFINES) $(MANUAL_CFLAGS) $(MANUAL_LDFLAGS) -o $@ $< @LIBS@ $(MANUAL_LIBS) # Disabled until we have a more compelling need for configure detection of HOST_CC #check-pp-host: $(CHECK_PP_C) # @HOST_CC@ @HOST_CFLAGS@ @HOST_LDFLAGS@ -I$(srcdir) $(MANUAL_DEFINES) $(MANUAL_CFLAGS) $(MANUAL_LDFLAGS) -o $@ $< @HOST_LIBS@ $(MANUAL_LIBS) @CROSS_COMPILING_TRUE@check-pp-run: check-pp-tgt @CROSS_COMPILING_FALSE@check-pp-run: check-pp-tgt @CROSS_COMPILING_FALSE@ ./check-pp-tgt .PHONY: check-pp-run check-pp: check-pp-run @PERL@ $(srcdir)/check-header-erase.pl $(srcdir)/gasnet_portable_platform.h 1 check-local: check-pp # If we add plpa to EXTRA_DIST, then automake-1.9 tries to package # plpa/config/acinclude.m4 more than once. dist-hook: rm -f $(distdir)/plpa/config/acinclude.m4 cp -pR $(srcdir)/plpa $(distdir)/ all-local: $(CONDUITMODE_TARGETS) perlstart install-data-local: $(mkinstalldirs) $(DESTDIR)$(docdir) $(INSTALL_DATA) $(srcdir)/ssh-spawner/README $(DESTDIR)$(docdir)/README-ssh-spawner $(INSTALL_DATA) $(srcdir)/mpi-spawner/README $(DESTDIR)$(docdir)/README-mpi-spawner $(INSTALL_DATA) $(srcdir)/pmi-spawner/README $(DESTDIR)$(docdir)/README-pmi-spawner uninstall-local: rm -Rf $(DESTDIR)$(docdir) # GASNET_TOOLSONLY_FALSE_END .PHONY: force clean tests tests-clean run-tests force: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/other/amx/0000775000175000017500000000000015142313673015330 5ustar alastairalastairgasnet-2025.8.0/other/amx/testping.c0000664000175000017500000000642215142313673017335 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/testping.c $ * Description: AMX test * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #include "apputils.h" #define PING_REQ_HANDLER 1 #define PING_REP_HANDLER 2 static volatile int numleft; int myproc; int numprocs; static void ping_request_handler(void *token) { numleft--; #if VERBOSE printf("%i: ping_request_handler(). sending reply...\n", myproc); fflush(stdout); #endif AM_Safe(AM_Reply0(token, PING_REP_HANDLER)); } static void ping_reply_handler(void *token) { #if VERBOSE printf("%i: ping_reply_handler()\n", myproc); fflush(stdout); #endif numleft--; } /* usage: testping numprocs spawnfn iters P/B */ int main(int argc, char **argv) { eb_t eb; ep_t ep; uint64_t networkpid; int64_t begin, end, total; int polling = 1; int k; int iters = 0; TEST_STARTUP(argc, argv, networkpid, eb, ep, 1, 2, "iters (Poll/Block)"); /* setup handlers */ AM_Safe(AM_SetHandler(ep, PING_REQ_HANDLER, ping_request_handler)); AM_Safe(AM_SetHandler(ep, PING_REP_HANDLER, ping_reply_handler)); setupUtilHandlers(ep, eb); /* get SPMD info */ myproc = AMX_SPMDMyProc(); numprocs = AMX_SPMDNumProcs(); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 1; if (argc > 2) { switch(argv[2][0]) { case 'p': case 'P': polling = 1; break; case 'b': case 'B': polling = 0; break; default: printf("polling must be 'P' or 'B'..\n"); AMX_SPMDExit(1); } } if (numprocs == 1) numleft = 2*iters; else if (myproc == 0) numleft = (numprocs-1)*iters; else numleft = iters; AM_Safe(AMX_SPMDBarrier()); if (myproc == 0) printf("Running %i iterations of ping test...\n", iters); begin = getCurrentTimeMicrosec(); #if ONE_TO_ALL if (myproc == 0) { /* 0 sends to everyone */ for (k=0; k < iters; k++) { int peer; for (peer=(numprocs==1?0:1); peer < numprocs; peer++) { #if VERBOSE printf("%i: sending request %i to %i...", myproc, k, peer); fflush(stdout); #endif AM_Safe(AM_Request0(ep, peer, PING_REQ_HANDLER)); } } } #else /* all-to-one */ if (myproc != 0 || numprocs == 1) { /* everybody sends packets to 0 */ for (k=0;k < iters; k++) { #if VERBOSE printf("%i: sending request %i...", myproc, k); fflush(stdout); #endif AM_Safe(AM_Request0(ep, 0, PING_REQ_HANDLER)); } } #endif if (polling) { /* poll until everyone done */ while (numleft) { AM_Safe(AM_Poll(eb)); } } else { while (numleft) { AM_Safe(AM_SetEventMask(eb, AM_NOTEMPTY)); AM_Safe(AM_WaitSema(eb)); AM_Safe(AM_Poll(eb)); } } end = getCurrentTimeMicrosec(); total = end - begin; if (myproc != 0 || numprocs == 1) printf("Worker %i: %i microseconds total, throughput: %i requests/sec (%.3f us / request)\n", myproc, (int)total, (int)(((float)1000000)*iters/((int)total)), ((double)total)/iters); else printf("Worker 0 done.\n"); fflush(stdout); /* dump stats */ AM_Safe(AMX_SPMDBarrier()); printGlobalStats(); AM_Safe(AMX_SPMDBarrier()); /* exit */ AM_Safe(AMX_SPMDExit(0)); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/amx/testam.h0000664000175000017500000007056215142313673017010 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/testam.h $ * Description: AMX test * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #ifdef TEST_GASNET #include "gasnet_tools.h" #include "test.h" typedef gasnet_handlerarg_t handlerarg_t; #define EXTERNC GASNETT_EXTERNC GASNETT_BEGIN_EXTERNC typedef void (*handler_fn_t)(); GASNETT_END_EXTERNC typedef gasnet_token_t token_t; gasnett_atomic_t numreq = gasnett_atomic_init(0); gasnett_atomic_t numrep = gasnett_atomic_init(0); #define INCREQ() gasnett_atomic_increment(&numreq,0) #define INCREP() gasnett_atomic_increment(&numrep,0) #define NUMREQ() gasnett_atomic_read(&numreq,0) #define NUMREP() gasnett_atomic_read(&numrep,0) #define RequestShort(num,args) GASNET_Safe(gasnet_AMRequestShort##num args) #define RequestMedium(num,args) GASNET_Safe(gasnet_AMRequestMedium##num args) #define RequestLong(num,AMargs,GASNETargs) GASNET_Safe(gasnet_AMRequestLong##num GASNETargs) #define RequestLongAsync(num,AMargs,GASNETargs) GASNET_Safe(gasnet_AMRequestLongAsync##num GASNETargs) #define ReplyShort(num,args) GASNET_Safe(gasnet_AMReplyShort##num args) #define ReplyMedium(num,args) GASNET_Safe(gasnet_AMReplyMedium##num args) #define ReplyLong(num,AMargs,GASNETargs) GASNET_Safe(gasnet_AMReplyLong##num GASNETargs) #define NUMHANDLERS_PER_TYPE (gasnet_AMMaxArgs()+1) #define MYPROC (gasnet_mynode()) #define NUMPROCS (gasnet_nodes()) #define MYSEG (TEST_MYSEG()) #define ENDPOINT #define GETPARTNER(token) gasnet_node_t partner; GASNET_Safe(gasnet_AMGetMsgSource(token, &partner)) #define EXTRA_S #define EXTRA_ML #define ALLAM_DONE(iters) ((int)NUMREP() == (int)(NUMHANDLERS_PER_TYPE*4*(iters))) #elif defined(TEST_GASNETEX) #include "gasnet_tools.h" #include "test.h" typedef gex_AM_Arg_t handlerarg_t; #define EXTERNC GASNETT_EXTERNC GASNETT_BEGIN_EXTERNC typedef gex_AM_Fn_t handler_fn_t; GASNETT_END_EXTERNC typedef gex_Token_t token_t; gasnett_atomic_t numreq = gasnett_atomic_init(0); gasnett_atomic_t numrep = gasnett_atomic_init(0); #define INCREQ() gasnett_atomic_increment(&numreq,0) #define INCREP() gasnett_atomic_increment(&numrep,0) #define NUMREQ() gasnett_atomic_read(&numreq,0) #define NUMREP() gasnett_atomic_read(&numrep,0) gasnett_atomic_t amcnt_RequestShort = gasnett_atomic_init(0); gasnett_atomic_t amcnt_ReplyShort = gasnett_atomic_init(0); gasnett_atomic_t amcnt_RequestMedium = gasnett_atomic_init(0); gasnett_atomic_t amcnt_ReplyMedium = gasnett_atomic_init(0); gasnett_atomic_t amcnt_RequestLong = gasnett_atomic_init(0); gasnett_atomic_t amcnt_ReplyLong = gasnett_atomic_init(0); #if GASNETT_HAVE_ATOMIC_ADD_SUB #define atomicinc(pvar) gasnett_atomic_add(pvar,1,0) #else // non-atomicity just increases non-determinism #define atomicinc(pvar) (gasnett_atomic_increment(pvar,0),gasnett_atomic_read(pvar)) #endif #define AMSend(MLReq,cat,num,args) do { \ int id = atomicinc(&amcnt_##cat); \ gex_Event_t *lc_opt = GEX_EVENT_NOW; \ gex_Event_t lc = GEX_EVENT_NO_OP; \ if (MLReq) { \ switch ((id >> 1) % 3) { \ case 0: /*lc_opt = GEX_EVENT_NOW;*/ break; \ case 1: lc_opt = GEX_EVENT_GROUP; break; \ case 2: lc_opt = &lc; break; \ } \ } \ do { \ if (id & 0x1) { /* try an immediate injection */ \ gex_Flags_t flags = GEX_FLAG_IMMEDIATE; \ int result = gex_AM_##cat##num args; \ if (!result) break; /* jump to lc sync */ \ } \ gex_Flags_t flags = 0; /* blocking injection */ \ int result = gex_AM_##cat##num args; \ assert_always(result == 0); \ } while (0); \ if (MLReq && lc_opt == GEX_EVENT_GROUP) { \ gex_NBI_Wait((id&0x2?GEX_EC_AM:GEX_EC_ALL), 0); \ } else if (MLReq && lc_opt == &lc) { \ assert_always(lc != GEX_EVENT_NO_OP); \ gex_Event_Wait(lc); \ } \ } while (0) #define RequestShort(num,args) AMSend(0,RequestShort,num,args) #define RequestMedium(num,args) AMSend(1,RequestMedium,num,args) #define RequestLong(num,AMargs,GASNETargs) AMSend(1,RequestLong,num,GASNETargs) #define RequestLongAsync(num,AMargs,GASNETargs) ((void)0) #define ReplyShort(num,args) AMSend(0,ReplyShort,num,args) #define ReplyMedium(num,args) AMSend(0,ReplyMedium,num,args) #define ReplyLong(num,AMargs,GASNETargs) AMSend(0,ReplyLong,num,GASNETargs) #define NUMHANDLERS_PER_TYPE (gex_AM_MaxArgs()+1) #define MYPROC (gex_System_QueryJobRank()) #define NUMPROCS (gex_System_QueryJobSize()) #define MYSEG (TEST_MYSEG()) #define GETPARTNER(token) gex_Rank_t partner; \ do { gex_Token_Info_t info; \ gex_TI_t rc = gex_Token_Info(token, &info, GEX_TI_SRCRANK); \ assert_always(rc & GEX_TI_SRCRANK); \ partner = info.gex_srcrank; \ } while(0) #define ENDPOINT myteam, #define EXTRA_S ,flags #define EXTRA_ML ,lc_opt,flags #define ALLAM_DONE(iters) ((int)NUMREP() == (int)(NUMHANDLERS_PER_TYPE*3*(iters))) #else #include "apputils.h" typedef int handlerarg_t; typedef amx_handler_fn_t handler_fn_t; typedef void *token_t; int numreq = 0; int numrep = 0; #define INCREQ() numreq++ #define INCREP() numrep++ #define NUMREQ() (numreq) #define NUMREP() (numrep) #define RequestShort(num,args) AM_Safe(AM_Request##num args) #define RequestMedium(num,args) AM_Safe(AM_RequestI##num args) #define RequestLong(num,AMargs,GASNETargs) AM_Safe(AM_RequestXfer##num AMargs) /* AM_RequestXferAsync generates errors if cannot be sent immediately - don't use it */ #define RequestLongAsync(num,AMargs,GASNETargs) ((void)0) #define ReplyShort(num,args) AM_Safe(AM_Reply##num args) #define ReplyMedium(num,args) AM_Safe(AM_ReplyI##num args) #define ReplyLong(num,AMargs,GASNETargs) AM_Safe(AM_ReplyXfer##num AMargs) #define NUMHANDLERS_PER_TYPE (AM_MaxShort()+1) #define MYPROC (AMX_SPMDMyProc()) #define NUMPROCS (AMX_SPMDNumProcs()) void *VMseg; int VMsegsz; #define MYSEG (VMseg) #define ENDPOINT ep, #define GETPARTNER(token) #define FATALERR AMX_FatalErr #define EXTRA_S #define EXTRA_ML #define ALLAM_DONE(iters) ((int)NUMREP() == (int)(NUMHANDLERS_PER_TYPE*3*(iters))) #endif typedef struct testam_payload_s { double doublevar; uint64_t int64var; struct testam_payload_s* partnerseg; int idx; } testam_payload_t; #define TESTAM_DOUBLEVAR_VAL (2.5f) #define TESTAM_INT64VAR_VAL ((uint64_t)0xFACEFEEDDEAFBEEFULL) #define ABASE ((handlerarg_t)0xBABE7000) #define A1 (ABASE + 1) #define A2 (ABASE + 2) #define A3 (ABASE + 3) #define A4 (ABASE + 4) #define A5 (ABASE + 5) #define A6 (ABASE + 6) #define A7 (ABASE + 7) #define A8 (ABASE + 8) #define A9 (ABASE + 9) #define A10 (ABASE + 10) #define A11 (ABASE + 11) #define A12 (ABASE + 12) #define A13 (ABASE + 13) #define A14 (ABASE + 14) #define A15 (ABASE + 15) #define A16 (ABASE + 16) #define FA0 #define FA1 FA0 , handlerarg_t a1 #define FA2 FA1 , handlerarg_t a2 #define FA3 FA2 , handlerarg_t a3 #define FA4 FA3 , handlerarg_t a4 #define FA5 FA4 , handlerarg_t a5 #define FA6 FA5 , handlerarg_t a6 #define FA7 FA6 , handlerarg_t a7 #define FA8 FA7 , handlerarg_t a8 #define FA9 FA8 , handlerarg_t a9 #define FA10 FA9 , handlerarg_t a10 #define FA11 FA10, handlerarg_t a11 #define FA12 FA11, handlerarg_t a12 #define FA13 FA12, handlerarg_t a13 #define FA14 FA13, handlerarg_t a14 #define FA15 FA14, handlerarg_t a15 #define FA16 FA15, handlerarg_t a16 #define aa0 #define aa1 aa0 , a1 #define aa2 aa1 , a2 #define aa3 aa2 , a3 #define aa4 aa3 , a4 #define aa5 aa4 , a5 #define aa6 aa5 , a6 #define aa7 aa6 , a7 #define aa8 aa7 , a8 #define aa9 aa8 , a9 #define aa10 aa9 , a10 #define aa11 aa10, a11 #define aa12 aa11, a12 #define aa13 aa12, a13 #define aa14 aa13, a14 #define aa15 aa14, a15 #define aa16 aa15, a16 #define AA0 #define AA1 AA0 , A1 #define AA2 AA1 , A2 #define AA3 AA2 , A3 #define AA4 AA3 , A4 #define AA5 AA4 , A5 #define AA6 AA5 , A6 #define AA7 AA6 , A7 #define AA8 AA7 , A8 #define AA9 AA8 , A9 #define AA10 AA9 , A10 #define AA11 AA10, A11 #define AA12 AA11, A12 #define AA13 AA12, A13 #define AA14 AA13, A14 #define AA15 AA14, A15 #define AA16 AA15, A16 #define CA0 0 #define CA1 CA0 || a1!=A1 #define CA2 CA1 || a2!=A2 #define CA3 CA2 || a3!=A3 #define CA4 CA3 || a4!=A4 #define CA5 CA4 || a5!=A5 #define CA6 CA5 || a6!=A6 #define CA7 CA6 || a7!=A7 #define CA8 CA7 || a8!=A8 #define CA9 CA8 || a9!=A9 #define CA10 CA9 || a10!=A10 #define CA11 CA10|| a11!=A11 #define CA12 CA11|| a12!=A12 #define CA13 CA12|| a13!=A13 #define CA14 CA13|| a14!=A14 #define CA15 CA14|| a15!=A15 #define CA16 CA15|| a16!=A16 /* we use handlers [SHORT_REQ_BASE...(SHORT_REQ_BASE+120)] */ #ifndef SHORT_REQ_BASE #define SHORT_REQ_BASE 100 #endif #define SHORT_0REQ_HANDLER (SHORT_REQ_BASE+0) #define SHORT_1REQ_HANDLER (SHORT_REQ_BASE+1) #define SHORT_2REQ_HANDLER (SHORT_REQ_BASE+2) #define SHORT_3REQ_HANDLER (SHORT_REQ_BASE+3) #define SHORT_4REQ_HANDLER (SHORT_REQ_BASE+4) #define SHORT_5REQ_HANDLER (SHORT_REQ_BASE+5) #define SHORT_6REQ_HANDLER (SHORT_REQ_BASE+6) #define SHORT_7REQ_HANDLER (SHORT_REQ_BASE+7) #define SHORT_8REQ_HANDLER (SHORT_REQ_BASE+8) #define SHORT_9REQ_HANDLER (SHORT_REQ_BASE+9) #define SHORT_10REQ_HANDLER (SHORT_REQ_BASE+10) #define SHORT_11REQ_HANDLER (SHORT_REQ_BASE+11) #define SHORT_12REQ_HANDLER (SHORT_REQ_BASE+12) #define SHORT_13REQ_HANDLER (SHORT_REQ_BASE+13) #define SHORT_14REQ_HANDLER (SHORT_REQ_BASE+14) #define SHORT_15REQ_HANDLER (SHORT_REQ_BASE+15) #define SHORT_16REQ_HANDLER (SHORT_REQ_BASE+16) #define SHORT_REP_BASE (SHORT_REQ_BASE+20) #define SHORT_0REP_HANDLER (SHORT_REP_BASE+0) #define SHORT_1REP_HANDLER (SHORT_REP_BASE+1) #define SHORT_2REP_HANDLER (SHORT_REP_BASE+2) #define SHORT_3REP_HANDLER (SHORT_REP_BASE+3) #define SHORT_4REP_HANDLER (SHORT_REP_BASE+4) #define SHORT_5REP_HANDLER (SHORT_REP_BASE+5) #define SHORT_6REP_HANDLER (SHORT_REP_BASE+6) #define SHORT_7REP_HANDLER (SHORT_REP_BASE+7) #define SHORT_8REP_HANDLER (SHORT_REP_BASE+8) #define SHORT_9REP_HANDLER (SHORT_REP_BASE+9) #define SHORT_10REP_HANDLER (SHORT_REP_BASE+10) #define SHORT_11REP_HANDLER (SHORT_REP_BASE+11) #define SHORT_12REP_HANDLER (SHORT_REP_BASE+12) #define SHORT_13REP_HANDLER (SHORT_REP_BASE+13) #define SHORT_14REP_HANDLER (SHORT_REP_BASE+14) #define SHORT_15REP_HANDLER (SHORT_REP_BASE+15) #define SHORT_16REP_HANDLER (SHORT_REP_BASE+16) #define MEDIUM_REQ_BASE (SHORT_REQ_BASE+40) #define MEDIUM_0REQ_HANDLER (MEDIUM_REQ_BASE+0) #define MEDIUM_1REQ_HANDLER (MEDIUM_REQ_BASE+1) #define MEDIUM_2REQ_HANDLER (MEDIUM_REQ_BASE+2) #define MEDIUM_3REQ_HANDLER (MEDIUM_REQ_BASE+3) #define MEDIUM_4REQ_HANDLER (MEDIUM_REQ_BASE+4) #define MEDIUM_5REQ_HANDLER (MEDIUM_REQ_BASE+5) #define MEDIUM_6REQ_HANDLER (MEDIUM_REQ_BASE+6) #define MEDIUM_7REQ_HANDLER (MEDIUM_REQ_BASE+7) #define MEDIUM_8REQ_HANDLER (MEDIUM_REQ_BASE+8) #define MEDIUM_9REQ_HANDLER (MEDIUM_REQ_BASE+9) #define MEDIUM_10REQ_HANDLER (MEDIUM_REQ_BASE+10) #define MEDIUM_11REQ_HANDLER (MEDIUM_REQ_BASE+11) #define MEDIUM_12REQ_HANDLER (MEDIUM_REQ_BASE+12) #define MEDIUM_13REQ_HANDLER (MEDIUM_REQ_BASE+13) #define MEDIUM_14REQ_HANDLER (MEDIUM_REQ_BASE+14) #define MEDIUM_15REQ_HANDLER (MEDIUM_REQ_BASE+15) #define MEDIUM_16REQ_HANDLER (MEDIUM_REQ_BASE+16) #define MEDIUM_REP_BASE (MEDIUM_REQ_BASE+20) #define MEDIUM_0REP_HANDLER (MEDIUM_REP_BASE+0) #define MEDIUM_1REP_HANDLER (MEDIUM_REP_BASE+1) #define MEDIUM_2REP_HANDLER (MEDIUM_REP_BASE+2) #define MEDIUM_3REP_HANDLER (MEDIUM_REP_BASE+3) #define MEDIUM_4REP_HANDLER (MEDIUM_REP_BASE+4) #define MEDIUM_5REP_HANDLER (MEDIUM_REP_BASE+5) #define MEDIUM_6REP_HANDLER (MEDIUM_REP_BASE+6) #define MEDIUM_7REP_HANDLER (MEDIUM_REP_BASE+7) #define MEDIUM_8REP_HANDLER (MEDIUM_REP_BASE+8) #define MEDIUM_9REP_HANDLER (MEDIUM_REP_BASE+9) #define MEDIUM_10REP_HANDLER (MEDIUM_REP_BASE+10) #define MEDIUM_11REP_HANDLER (MEDIUM_REP_BASE+11) #define MEDIUM_12REP_HANDLER (MEDIUM_REP_BASE+12) #define MEDIUM_13REP_HANDLER (MEDIUM_REP_BASE+13) #define MEDIUM_14REP_HANDLER (MEDIUM_REP_BASE+14) #define MEDIUM_15REP_HANDLER (MEDIUM_REP_BASE+15) #define MEDIUM_16REP_HANDLER (MEDIUM_REP_BASE+16) #define LONG_REQ_BASE (MEDIUM_REQ_BASE+40) #define LONG_0REQ_HANDLER (LONG_REQ_BASE+0) #define LONG_1REQ_HANDLER (LONG_REQ_BASE+1) #define LONG_2REQ_HANDLER (LONG_REQ_BASE+2) #define LONG_3REQ_HANDLER (LONG_REQ_BASE+3) #define LONG_4REQ_HANDLER (LONG_REQ_BASE+4) #define LONG_5REQ_HANDLER (LONG_REQ_BASE+5) #define LONG_6REQ_HANDLER (LONG_REQ_BASE+6) #define LONG_7REQ_HANDLER (LONG_REQ_BASE+7) #define LONG_8REQ_HANDLER (LONG_REQ_BASE+8) #define LONG_9REQ_HANDLER (LONG_REQ_BASE+9) #define LONG_10REQ_HANDLER (LONG_REQ_BASE+10) #define LONG_11REQ_HANDLER (LONG_REQ_BASE+11) #define LONG_12REQ_HANDLER (LONG_REQ_BASE+12) #define LONG_13REQ_HANDLER (LONG_REQ_BASE+13) #define LONG_14REQ_HANDLER (LONG_REQ_BASE+14) #define LONG_15REQ_HANDLER (LONG_REQ_BASE+15) #define LONG_16REQ_HANDLER (LONG_REQ_BASE+16) #define LONG_REP_BASE (LONG_REQ_BASE+20) #define LONG_0REP_HANDLER (LONG_REP_BASE+0) #define LONG_1REP_HANDLER (LONG_REP_BASE+1) #define LONG_2REP_HANDLER (LONG_REP_BASE+2) #define LONG_3REP_HANDLER (LONG_REP_BASE+3) #define LONG_4REP_HANDLER (LONG_REP_BASE+4) #define LONG_5REP_HANDLER (LONG_REP_BASE+5) #define LONG_6REP_HANDLER (LONG_REP_BASE+6) #define LONG_7REP_HANDLER (LONG_REP_BASE+7) #define LONG_8REP_HANDLER (LONG_REP_BASE+8) #define LONG_9REP_HANDLER (LONG_REP_BASE+9) #define LONG_10REP_HANDLER (LONG_REP_BASE+10) #define LONG_11REP_HANDLER (LONG_REP_BASE+11) #define LONG_12REP_HANDLER (LONG_REP_BASE+12) #define LONG_13REP_HANDLER (LONG_REP_BASE+13) #define LONG_14REP_HANDLER (LONG_REP_BASE+14) #define LONG_15REP_HANDLER (LONG_REP_BASE+15) #define LONG_16REP_HANDLER (LONG_REP_BASE+16) /* ------------------------------------------------------------------------------------ */ #define SHORTHANDLERS(num) \ EXTERNC void short_##num##req_handler(token_t token FA##num) { \ if (CA##num) \ FATALERR("Arg mismatch in short_%sreq_handler on P%i\n", #num, (int)MYPROC); \ INCREQ(); \ ReplyShort(num,(token, SHORT_##num##REP_HANDLER EXTRA_S aa##num)); \ } \ EXTERNC void short_##num##rep_handler(token_t token FA##num) { \ if (CA##num) \ FATALERR("Arg mismatch in short_%srep_handler on P%i\n", #num, (int)MYPROC); \ INCREP(); \ } #define MEDIUMHANDLERS(num) \ EXTERNC \ void medium_##num##req_handler(token_t token, void *buf, size_t nbytes FA##num) { \ testam_payload_t *payload = (testam_payload_t *)buf; \ if (CA##num) \ FATALERR("Arg mismatch in medium_%sreq_handler on P%i\n", #num, (int)MYPROC); \ if (nbytes != sizeof(testam_payload_t) || payload->idx != num || \ payload->doublevar != TESTAM_DOUBLEVAR_VAL || \ payload->int64var != TESTAM_INT64VAR_VAL) \ FATALERR("buf mismatch in medium_%sreq_handler on P%i: nbytes=%i, buf=%i\n", \ #num, (int)MYPROC, (int)nbytes, payload->idx); \ INCREQ(); \ payload->idx = -payload->idx; \ ReplyMedium(num,(token, MEDIUM_##num##REP_HANDLER, buf, nbytes EXTRA_ML aa##num)); \ memset(buf, 0xBB, sizeof(testam_payload_t)); \ } \ EXTERNC \ void medium_##num##rep_handler(token_t token, void *buf, size_t nbytes FA##num) { \ testam_payload_t *payload = (testam_payload_t *)buf; \ if (CA##num) \ FATALERR("Arg mismatch in medium_%srep_handler on P%i\n", #num, (int)MYPROC); \ if (nbytes != sizeof(testam_payload_t) || payload->idx != -num || \ payload->doublevar != TESTAM_DOUBLEVAR_VAL || \ payload->int64var != TESTAM_INT64VAR_VAL) \ FATALERR("buf mismatch in medium_%srep_handler on P%i: nbytes=%i, buf=%i\n", \ #num, (int)MYPROC, (int)nbytes, payload->idx); \ INCREP(); \ } #define LONGHANDLERS(num) \ EXTERNC \ void long_##num##req_handler(token_t token, void *buf, size_t nbytes FA##num) { \ testam_payload_t *payload = (testam_payload_t *)buf; \ testam_payload_t mybuf; \ GETPARTNER(token); \ if (CA##num) \ FATALERR("Arg mismatch in long_%sreq_handler on P%i\n", #num, (int)MYPROC); \ if (nbytes != sizeof(testam_payload_t) || \ buf != ((testam_payload_t*)MYSEG)+num || \ payload->idx != num || \ payload->doublevar != TESTAM_DOUBLEVAR_VAL || \ payload->int64var != TESTAM_INT64VAR_VAL) \ FATALERR("buf mismatch in long_%sreq_handler on P%i: nbytes=%i, buf=%i\n", \ #num, (int)MYPROC, (int)nbytes, payload->idx); \ mybuf = *payload; \ mybuf.idx = -mybuf.idx; \ INCREQ(); \ ReplyLong(num,(token, (NUMHANDLERS_PER_TYPE+num)*sizeof(testam_payload_t), \ LONG_##num##REP_HANDLER, &mybuf, nbytes aa##num), \ (token, LONG_##num##REP_HANDLER, &mybuf, nbytes, \ payload->partnerseg+NUMHANDLERS_PER_TYPE+num \ EXTRA_ML aa##num)); \ memset(&mybuf, 0xBB, sizeof(testam_payload_t)); \ } \ EXTERNC \ void long_##num##rep_handler(token_t token, void *buf, size_t nbytes FA##num) { \ testam_payload_t *payload = (testam_payload_t *)buf; \ if (CA##num) \ FATALERR("Arg mismatch in long_%srep_handler on P%i\n", #num, (int)MYPROC); \ if (nbytes != sizeof(testam_payload_t) || \ buf != ((testam_payload_t*)MYSEG)+NUMHANDLERS_PER_TYPE+num || \ payload->idx != -num || \ payload->doublevar != TESTAM_DOUBLEVAR_VAL || \ payload->int64var != TESTAM_INT64VAR_VAL) \ FATALERR("buf mismatch in long_%srep_handler on P%i: nbytes=%i, buf=%i\n", \ #num, (int)MYPROC, (int)nbytes, payload->idx); \ INCREP(); \ } #define HANDLERS(num) \ SHORTHANDLERS(num) \ MEDIUMHANDLERS(num) \ LONGHANDLERS(num) HANDLERS(0) HANDLERS(1) HANDLERS(2) HANDLERS(3) HANDLERS(4) HANDLERS(5) HANDLERS(6) HANDLERS(7) HANDLERS(8) HANDLERS(9) HANDLERS(10) HANDLERS(11) HANDLERS(12) HANDLERS(13) HANDLERS(14) HANDLERS(15) HANDLERS(16) #define SETUP_ALLAM_ID(num) do { \ AM_Safe(AM_SetHandler(ep, SHORT_##num##REQ_HANDLER, (handler_fn_t)short_##num##req_handler)); \ AM_Safe(AM_SetHandler(ep, MEDIUM_##num##REQ_HANDLER, (handler_fn_t)medium_##num##req_handler)); \ AM_Safe(AM_SetHandler(ep, LONG_##num##REQ_HANDLER, (handler_fn_t)long_##num##req_handler)); \ AM_Safe(AM_SetHandler(ep, SHORT_##num##REP_HANDLER, (handler_fn_t)short_##num##rep_handler)); \ AM_Safe(AM_SetHandler(ep, MEDIUM_##num##REP_HANDLER, (handler_fn_t)medium_##num##rep_handler)); \ AM_Safe(AM_SetHandler(ep, LONG_##num##REP_HANDLER, (handler_fn_t)long_##num##rep_handler)); \ } while(0) #define SETUP_ALLAM() do { \ SETUP_ALLAM_ID(0); \ SETUP_ALLAM_ID(1); \ SETUP_ALLAM_ID(2); \ SETUP_ALLAM_ID(3); \ SETUP_ALLAM_ID(4); \ SETUP_ALLAM_ID(5); \ SETUP_ALLAM_ID(6); \ SETUP_ALLAM_ID(7); \ SETUP_ALLAM_ID(8); \ SETUP_ALLAM_ID(9); \ SETUP_ALLAM_ID(10); \ SETUP_ALLAM_ID(11); \ SETUP_ALLAM_ID(12); \ SETUP_ALLAM_ID(13); \ SETUP_ALLAM_ID(14); \ SETUP_ALLAM_ID(15); \ SETUP_ALLAM_ID(16); \ } while (0) #if defined(TEST_GASNETEX) #define ALLAM_HANDLERS_ID(num) \ { SHORT_##num##REQ_HANDLER, (handler_fn_t)short_##num##req_handler, \ GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_SHORT, num, NULL, NULL}, \ { MEDIUM_##num##REQ_HANDLER, (handler_fn_t)medium_##num##req_handler, \ GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_MEDIUM, num, NULL, NULL}, \ { LONG_##num##REQ_HANDLER, (handler_fn_t)long_##num##req_handler, \ GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_LONG, num, NULL, NULL}, \ { SHORT_##num##REP_HANDLER, (handler_fn_t)short_##num##rep_handler, \ GEX_FLAG_AM_REPLY|GEX_FLAG_AM_SHORT, num, NULL, NULL}, \ { MEDIUM_##num##REP_HANDLER, (handler_fn_t)medium_##num##rep_handler, \ GEX_FLAG_AM_REPLY|GEX_FLAG_AM_MEDIUM, num, NULL, NULL}, \ { LONG_##num##REP_HANDLER, (handler_fn_t)long_##num##rep_handler, \ GEX_FLAG_AM_REPLY|GEX_FLAG_AM_LONG, num, NULL, NULL} #else #define ALLAM_HANDLERS_ID(num) \ { SHORT_##num##REQ_HANDLER, (handler_fn_t)short_##num##req_handler }, \ { MEDIUM_##num##REQ_HANDLER, (handler_fn_t)medium_##num##req_handler}, \ { LONG_##num##REQ_HANDLER, (handler_fn_t)long_##num##req_handler }, \ { SHORT_##num##REP_HANDLER, (handler_fn_t)short_##num##rep_handler }, \ { MEDIUM_##num##REP_HANDLER, (handler_fn_t)medium_##num##rep_handler}, \ { LONG_##num##REP_HANDLER, (handler_fn_t)long_##num##rep_handler } #endif #define ALLAM_HANDLERS() \ ALLAM_HANDLERS_ID(0), \ ALLAM_HANDLERS_ID(1), \ ALLAM_HANDLERS_ID(2), \ ALLAM_HANDLERS_ID(3), \ ALLAM_HANDLERS_ID(4), \ ALLAM_HANDLERS_ID(5), \ ALLAM_HANDLERS_ID(6), \ ALLAM_HANDLERS_ID(7), \ ALLAM_HANDLERS_ID(8), \ ALLAM_HANDLERS_ID(9), \ ALLAM_HANDLERS_ID(10), \ ALLAM_HANDLERS_ID(11), \ ALLAM_HANDLERS_ID(12), \ ALLAM_HANDLERS_ID(13), \ ALLAM_HANDLERS_ID(14), \ ALLAM_HANDLERS_ID(15), \ ALLAM_HANDLERS_ID(16) #define ALLAM_REQ_ID(num, partner) do { \ static testam_payload_t asyncbuf; /* static buf for data lifetime reqt of RequestLongAsync */ \ static testam_payload_t medbuf, longbuf; \ asyncbuf.doublevar = TESTAM_DOUBLEVAR_VAL; \ asyncbuf.int64var = TESTAM_INT64VAR_VAL; \ asyncbuf.partnerseg = (testam_payload_t*)MYSEG; \ asyncbuf.idx = num; \ RequestShort(num,(ENDPOINT partner, SHORT_##num##REQ_HANDLER EXTRA_S AA##num)); \ memcpy(&medbuf, &asyncbuf, sizeof(testam_payload_t)); \ RequestMedium(num,(ENDPOINT partner, MEDIUM_##num##REQ_HANDLER, \ &medbuf, sizeof(testam_payload_t) EXTRA_ML AA##num)); \ memset(&medbuf, 0xBB, sizeof(testam_payload_t)); /* ensure we can overwrite srcmem */ \ memcpy(&longbuf, &asyncbuf, sizeof(testam_payload_t)); \ RequestLong(num,(ENDPOINT partner, sizeof(testam_payload_t)*num, \ LONG_##num##REQ_HANDLER, &longbuf, sizeof(testam_payload_t) AA##num), \ (ENDPOINT partner, LONG_##num##REQ_HANDLER, &longbuf, sizeof(testam_payload_t), \ ((testam_payload_t*)TEST_SEG(partner))+num EXTRA_ML AA##num)); \ memset(&longbuf, 0xBB, sizeof(testam_payload_t)); /* ensure we can overwrite srcmem */ \ RequestLongAsync(num,(ENDPOINT partner, sizeof(testam_payload_t)*num, \ LONG_##num##REQ_HANDLER, &asyncbuf, sizeof(testam_payload_t) AA##num), \ (ENDPOINT partner, LONG_##num##REQ_HANDLER, &asyncbuf, sizeof(testam_payload_t), \ ((testam_payload_t*)TEST_SEG(partner))+num EXTRA_ML AA##num)); \ } while (0) \ #define ALLAM_REQ(partner) do { \ ALLAM_REQ_ID(0, partner); \ ALLAM_REQ_ID(1, partner); \ ALLAM_REQ_ID(2, partner); \ ALLAM_REQ_ID(3, partner); \ ALLAM_REQ_ID(4, partner); \ ALLAM_REQ_ID(5, partner); \ ALLAM_REQ_ID(6, partner); \ ALLAM_REQ_ID(7, partner); \ ALLAM_REQ_ID(8, partner); \ ALLAM_REQ_ID(9, partner); \ ALLAM_REQ_ID(10, partner); \ ALLAM_REQ_ID(11, partner); \ ALLAM_REQ_ID(12, partner); \ ALLAM_REQ_ID(13, partner); \ ALLAM_REQ_ID(14, partner); \ ALLAM_REQ_ID(15, partner); \ ALLAM_REQ_ID(16, partner); \ } while (0) gasnet-2025.8.0/other/amx/testreadwrite.c0000664000175000017500000000431015142313673020360 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/testreadwrite.c $ * Description: AMX test * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #include "apputils.h" #define MAX_PROCS 255 static uint32_t vals[MAX_PROCS]; uint32_t *myvals = vals; uint32_t *pvals[MAX_PROCS]; static uint32_t readarray[MAX_PROCS]; int main(int argc, char **argv) { eb_t eb; ep_t ep; uint64_t networkpid; int myproc; int numprocs; int k; int iters = 0; int errs = 0; TEST_STARTUP(argc, argv, networkpid, eb, ep, 1, 1, "iters"); /* setup handlers */ setupUtilHandlers(ep, eb); /* get SPMD info */ myproc = AMX_SPMDMyProc(); numprocs = AMX_SPMDNumProcs(); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 1; if (myproc == 0) { printf("Running %i iterations of read/write test...\n", iters); fflush(stdout); } /* gather pointers to static data, to handle non-uniform address spaces */ AM_Safe(AMX_SPMDAllGather(&myvals, pvals, sizeof(myvals))); for (k=0;k < iters; k++) { /* set left neighbor's array */ int i; int leftP = myproc-1; if (leftP == -1) leftP = numprocs-1; for (i=0;i * Terms of use are as specified in license.txt */ #include "apputils.h" #define MAX_PROCS 255 static uint32_t vals[MAX_PROCS]; uint32_t *myvals = vals; uint32_t *pvals[MAX_PROCS]; int main(int argc, char **argv) { eb_t eb; ep_t ep; uint64_t networkpid; int myproc; int numprocs; int k; int errs = 0; int iters = 0; TEST_STARTUP(argc, argv, networkpid, eb, ep, 1, 1, "iters"); /* setup handlers */ setupUtilHandlers(ep, eb); /* get SPMD info */ myproc = AMX_SPMDMyProc(); numprocs = AMX_SPMDNumProcs(); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 1; if (myproc == 0) { printf("Running %i iterations of get/put test...\n", iters); fflush(stdout); } /* gather pointers to static data, to handle non-uniform address spaces */ AM_Safe(AMX_SPMDAllGather(&myvals, pvals, sizeof(myvals))); for (k=0;k < iters; k++) { /* set just my val */ int i; for (i=0;i * Terms of use are as specified in license.txt */ #include "apputils.h" /* non-pipelined version of ping tester */ #define PING_REQ_HANDLER 1 #define PING_REP_HANDLER 2 static volatile int numleft; int myproc; int numprocs; eb_t eb; ep_t ep; static void ping_request_handler(void *token) { numleft--; #if VERBOSE printf("%i: ping_request_handler(). sending reply...\n", myproc); fflush(stdout); #endif AM_Safe(AM_Reply0(token, PING_REP_HANDLER)); } static void ping_reply_handler(void *token) { #if VERBOSE printf("%i: ping_reply_handler()\n", myproc); fflush(stdout); #endif numleft--; } void mywait(int polling) { if (polling) { /* poll until everyone done */ while (numleft) { AM_Safe(AM_Poll(eb)); } } else { while (numleft) { AM_Safe(AM_SetEventMask(eb, AM_NOTEMPTY)); AM_Safe(AM_WaitSema(eb)); AM_Safe(AM_Poll(eb)); } } } /* usage: testlatency numprocs spawnfn iters P/B */ int main(int argc, char **argv) { uint64_t networkpid; int64_t begin, end, total; int polling = 1; int k; int iters = 0; TEST_STARTUP(argc, argv, networkpid, eb, ep, 1, 2, "iters (Poll/Block)"); /* setup handlers */ AM_Safe(AM_SetHandler(ep, PING_REQ_HANDLER, ping_request_handler)); AM_Safe(AM_SetHandler(ep, PING_REP_HANDLER, ping_reply_handler)); setupUtilHandlers(ep, eb); /* get SPMD info */ myproc = AMX_SPMDMyProc(); numprocs = AMX_SPMDNumProcs(); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 1; if (argc > 2) { switch(argv[2][0]) { case 'p': case 'P': polling = 1; break; case 'b': case 'B': polling = 0; break; default: printf("polling must be 'P' or 'B'..\n"); AMX_SPMDExit(1); } } outputTimerStats(); AM_Safe(AMX_SPMDBarrier()); if (myproc == 0) printf("Running %i iterations of latency test...\n", iters); if (myproc == 0 && numprocs > 1) numleft = (numprocs-1)*iters; AM_Safe(AMX_SPMDBarrier()); begin = getCurrentTimeMicrosec(); if (myproc == 0 && numprocs > 1) { mywait(polling); } else { /* everybody sends packets to 0 */ int expect = (numprocs > 1 ? 1 : 2); for (k=0;k < iters; k++) { numleft = expect; #if VERBOSE printf("%i: sending request...", myproc); fflush(stdout); #endif AM_Safe(AM_Request0(ep, 0, PING_REQ_HANDLER)); mywait(polling); } } end = getCurrentTimeMicrosec(); total = end - begin; if (myproc != 0 || numprocs == 1) printf("Worker %i: %i microseconds total, throughput: %i requests/sec (%.3f us / request)\n", myproc, (int)total, (int)(((float)1000000)*iters/((int)total)), ((double)total)/iters); else printf("Worker 0 done.\n"); fflush(stdout); /* dump stats */ AM_Safe(AMX_SPMDBarrier()); printGlobalStats(); AM_Safe(AMX_SPMDBarrier()); /* exit */ AM_Safe(AMX_SPMDExit(0)); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/amx/testoutput.c0000664000175000017500000000355515142313673017744 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/testping.c $ * Description: AMX test * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #include "apputils.h" static volatile int numleft; int myproc; int numprocs; /* usage: testoutput numprocs spawnfn iters */ int main(int argc, char **argv) { eb_t eb; ep_t ep; uint64_t networkpid; int64_t begin, end, total; int k,j; int iters = 0; int maxwidth = 0; char *buf; char sym; TEST_STARTUP(argc, argv, networkpid, eb, ep, 1, 2, "iters (maxwidth)"); setupUtilHandlers(ep, eb); /* get SPMD info */ myproc = AMX_SPMDMyProc(); numprocs = AMX_SPMDNumProcs(); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 1; if (argc > 2) maxwidth = atoi(argv[2]); if (maxwidth < 1) maxwidth = 80; buf = malloc(maxwidth+4); if (myproc < 10) sym = '0'+myproc; else if (myproc < 36) sym = 'A'+(myproc-10); else sym = '*'; memset(buf, sym, maxwidth+4); AM_Safe(AMX_SPMDBarrier()); if (myproc == 0) printf("Running %i iterations of output test...\n", iters); begin = getCurrentTimeMicrosec(); for (j=1; j <= maxwidth; j++) { for (k=0;k < iters; k++) { fwrite(buf, j, 1, stdout); fputc('\n', stdout); } fflush(stdout); } end = getCurrentTimeMicrosec(); total = end - begin; printf("Worker %i: %i microseconds total, throughput: %.3f KB/sec\n", myproc, (int)total, ((float)iters)*(maxwidth/2)/1024/(total/1.0E6)); AM_Safe(AMX_SPMDBarrier()); /* final output 1, deliberately dangling line */ fwrite(buf, 4, 1, stdout); AM_Safe(AMX_SPMDBarrier()); /* final output 2, deliberately dangling line */ fwrite(buf, 4, 1, stdout); /* exit */ AM_Safe(AMX_SPMDExit(0)); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/amx/amx_internal_fwd.h0000664000175000017500000002010615142313673021021 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/amx_internal_fwd.h $ * Description: AMX internal header file, forward defines * Copyright 2002, Dan Bonachea * Copyright 2018, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _AMX_INTERNAL_FWD_H #define _AMX_INTERNAL_FWD_H #undef _PORTABLE_PLATFORM_H #include #ifdef HAVE_GASNET_TOOLS #ifndef GASNETT_LITE_MODE #define GASNETT_LITE_MODE /* use lite mode, to preserve AMX's threading neutrality */ #endif #include /* must precede internal assert defs */ #endif #if !defined(HAVE_C99_FORMAT_SPECIFIERS) && !(defined(__PRISZ_PREFIX) && defined(__PRIPD_PREFIX)) #define HAVE_C99_FORMAT_SPECIFIERS 1 #endif #include #include #include #include #include #include #include #include #include #include #ifndef AMX_STRINGIFY #define _AMX_STRINGIFY_HELPER(x) #x #define AMX_STRINGIFY(x) _AMX_STRINGIFY_HELPER(x) #endif #ifndef AMX_CONCAT #define _AMX_CONCAT_HELPER(a,b) a ## b #define AMX_CONCAT(a,b) _AMX_CONCAT_HELPER(a,b) #endif #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef MIN #define MIN(x,y) ((x)<(y)?(x):(y)) #endif #ifndef MAX #define MAX(x,y) ((x)>(y)?(x):(y)) #endif #ifdef GASNETT_CURRENT_FUNCTION #define AMX_CURRENT_FUNCTION GASNETT_CURRENT_FUNCTION #elif defined(__GNUC__) /* try to get the function name from GCC */ #define AMX_CURRENT_FUNCTION __PRETTY_FUNCTION__ #elif __cplusplus >= 201103L || __STDC_VERSION__ >= 199901 #define AMX_CURRENT_FUNCTION __func__ #else #define AMX_CURRENT_FUNCTION "" #endif /* alignment macros */ #define AMX_POWEROFTWO(P) (((P)&((P)-1)) == 0) #define AMX_ALIGNDOWN(p,P) (AMX_assert(AMX_POWEROFTWO(P)), \ ((uintptr_t)(p))&~((uintptr_t)((P)-1))) #define AMX_ALIGNUP(p,P) (AMX_ALIGNDOWN((uintptr_t)(p)+((uintptr_t)((P)-1)),P)) /* these macros return the boolean value of the expression given, but pass on a hint that you expect the value to be true or false. Use them to wrap the conditional expression in an if stmt when you have strong reason to believe the branch will frequently go in one direction and the branch is a bottleneck */ #ifdef GASNETT_PREDICT_TRUE #define AMX_PREDICT_TRUE(exp) GASNETT_PREDICT_TRUE(exp) #define AMX_PREDICT_FALSE(exp) GASNETT_PREDICT_FALSE(exp) #elif defined(__GNUC__) && __GNUC__ >= 3 && 0 #define AMX_PREDICT_TRUE(exp) (!__builtin_expect( (!(uintptr_t)(exp)), 0 )) #define AMX_PREDICT_FALSE(exp) ( __builtin_expect( ( (uintptr_t)(exp)), 0 )) #else #define AMX_PREDICT_TRUE(exp) (exp) #define AMX_PREDICT_FALSE(exp) (exp) #endif #ifndef if_pf /* if with branch prediction */ #define if_pf(cond) if (AMX_PREDICT_FALSE(cond)) #define if_pt(cond) if (AMX_PREDICT_TRUE(cond)) #endif //------------------------------------------------------------------------------------ // AMX_IDENT() takes a unique identifier and a textual string and embeds the textual string in the executable file #define AMX_PRAGMA(x) _Pragma ( #x ) #ifdef GASNETT_IDENT #define AMX_IDENT(identName, identText) GASNETT_IDENT(identName, identText) #else #define _AMX_IDENT(identName, identText) \ extern char volatile identName[]; \ char volatile identName[] = identText; \ extern char *_##identName##_identfn(void) { return (char*)identName; } \ static int _dummy_##identName = sizeof(_dummy_##identName) #if PLATFORM_COMPILER_CRAY && !PLATFORM_ARCH_X86_64 /* fouls up concatenation in ident string */ #define AMX_IDENT(identName, identText) \ AMX_PRAGMA(_CRI ident identText); \ _AMX_IDENT(identName, identText) #else #define AMX_IDENT _AMX_IDENT #endif #endif //------------------------------------------------------------------------------------ #if PLATFORM_OS_SUPERUX || PLATFORM_OS_NETBSD || \ PLATFORM_OS_BLRTS || PLATFORM_OS_OPENBSD // these implement sched_yield() in libpthread only, which we may not want #define AMX_sched_yield() sleep(0) #elif 0 && defined(HAVE_GASNET_TOOLS) // not currently part of GASNETT_LITE_MODE #define AMX_sched_yield() gasnett_sched_yield() #else #include #define AMX_sched_yield() sched_yield() #endif #if PLATFORM_OS_BLRTS /* lack working select */ #define AMX_usleep(timeoutusec) sleep(timeoutusec/1000000) #else #define AMX_usleep(timeoutusec) do { \ struct timeval _tv; \ int64_t _timeoutusec = (timeoutusec); \ _tv.tv_sec = _timeoutusec / 1000000; \ _tv.tv_usec = _timeoutusec % 1000000; \ if (select(1, NULL, NULL, NULL, &_tv) < 0) /* sleep a little while */ \ AMX_Err("failed to select(): %s(%i)", strerror(errno), errno); \ } while (0) #endif //------------------------------------------------------------------------------------ // Meta-macros for fixed-count text generation // // The following family of macros (named with a integer suffix in N=0..16) // perform N expansions of the provided macros. // They take two 3-argument macros as arguments: // fnb(-1,0,1) is expanded exactly once as the base case // fni(i_minus_1, i, i_plus_1) is expanded exactly N times as the inductive case, // with i=[1..N] and i_minus_1=(i-1) and i_plus_1=(i+1) at each step // The ASC[N] variants expand the macros in ascending numerical order, // whereas the DES[N] variants expand the macros in descending order // Note that due to C preprocessor rules fnb and fni cannot themselves // contain an expansion of the same meta-macro (even with different arguments), // but can they can use the "other" meta-macro. #define AMX_META_ASC0(fnb,fni) fnb(-1,0,1) #define AMX_META_ASC1(fnb,fni) AMX_META_ASC0(fnb,fni) fni(0,1,2) #define AMX_META_ASC2(fnb,fni) AMX_META_ASC1(fnb,fni) fni(1,2,3) #define AMX_META_ASC3(fnb,fni) AMX_META_ASC2(fnb,fni) fni(2,3,4) #define AMX_META_ASC4(fnb,fni) AMX_META_ASC3(fnb,fni) fni(3,4,5) #define AMX_META_ASC5(fnb,fni) AMX_META_ASC4(fnb,fni) fni(4,5,6) #define AMX_META_ASC6(fnb,fni) AMX_META_ASC5(fnb,fni) fni(5,6,7) #define AMX_META_ASC7(fnb,fni) AMX_META_ASC6(fnb,fni) fni(6,7,8) #define AMX_META_ASC8(fnb,fni) AMX_META_ASC7(fnb,fni) fni(7,8,9) #define AMX_META_ASC9(fnb,fni) AMX_META_ASC8(fnb,fni) fni(8,9,10) #define AMX_META_ASC10(fnb,fni) AMX_META_ASC9(fnb,fni) fni(9,10,11) #define AMX_META_ASC11(fnb,fni) AMX_META_ASC10(fnb,fni) fni(10,11,12) #define AMX_META_ASC12(fnb,fni) AMX_META_ASC11(fnb,fni) fni(11,12,13) #define AMX_META_ASC13(fnb,fni) AMX_META_ASC12(fnb,fni) fni(12,13,14) #define AMX_META_ASC14(fnb,fni) AMX_META_ASC13(fnb,fni) fni(13,14,15) #define AMX_META_ASC15(fnb,fni) AMX_META_ASC14(fnb,fni) fni(14,15,16) #define AMX_META_ASC16(fnb,fni) AMX_META_ASC15(fnb,fni) fni(15,16,17) #define AMX_META_DES0(fnb,fni) fnb(-1,0,1) #define AMX_META_DES1(fnb,fni) fni(0,1,2) AMX_META_DES0(fnb,fni) #define AMX_META_DES2(fnb,fni) fni(1,2,3) AMX_META_DES1(fnb,fni) #define AMX_META_DES3(fnb,fni) fni(2,3,4) AMX_META_DES2(fnb,fni) #define AMX_META_DES4(fnb,fni) fni(3,4,5) AMX_META_DES3(fnb,fni) #define AMX_META_DES5(fnb,fni) fni(4,5,6) AMX_META_DES4(fnb,fni) #define AMX_META_DES6(fnb,fni) fni(5,6,7) AMX_META_DES5(fnb,fni) #define AMX_META_DES7(fnb,fni) fni(6,7,8) AMX_META_DES6(fnb,fni) #define AMX_META_DES8(fnb,fni) fni(7,8,9) AMX_META_DES7(fnb,fni) #define AMX_META_DES9(fnb,fni) fni(8,9,10) AMX_META_DES8(fnb,fni) #define AMX_META_DES10(fnb,fni) fni(9,10,11) AMX_META_DES9(fnb,fni) #define AMX_META_DES11(fnb,fni) fni(10,11,12) AMX_META_DES10(fnb,fni) #define AMX_META_DES12(fnb,fni) fni(11,12,13) AMX_META_DES11(fnb,fni) #define AMX_META_DES13(fnb,fni) fni(12,13,14) AMX_META_DES12(fnb,fni) #define AMX_META_DES14(fnb,fni) fni(13,14,15) AMX_META_DES13(fnb,fni) #define AMX_META_DES15(fnb,fni) fni(14,15,16) AMX_META_DES14(fnb,fni) #define AMX_META_DES16(fnb,fni) fni(15,16,17) AMX_META_DES15(fnb,fni) #endif gasnet-2025.8.0/other/amx/apputils.h0000664000175000017500000001137715142313673017353 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/apputils.h $ * Description: AMX Application utilities * Copyright 2000, Dan Bonachea */ #ifndef _APPUTILS_H #define _APPUTILS_H #if _FORTIFY_SOURCE > 0 && __OPTIMIZE__ <= 0 /* silence an annoying MPICH/Linux warning */ #undef _FORTIFY_SOURCE #endif #include #if defined(AMUDP) #include #include #elif defined(AMMPI) #include #include #else #error You should #define AMUDP/AMMPI (or #include amudp.h/ammpi.h) before including apputils.h #endif #if !defined(DEBUG) && !defined(NDEBUG) #ifdef AMX_DEBUG #define DEBUG 1 #else #define NDEBUG 1 #endif #endif #ifndef VERBOSE #if AMX_DEBUG_VERBOSE || GASNET_DEBUG_VERBOSE #define VERBOSE 1 #else #define VERBOSE 0 #endif #endif #include #include #include #include #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #if PLATFORM_COMPILER_MICROSOFT #pragma warning(disable: 4127) #endif #ifdef __cplusplus #define EXTERNC extern "C" #else #define EXTERNC extern #endif #ifdef __cplusplus extern "C" { #endif /* in a multi-threaded program, this would also include a lock */ #define AM_Safe(fncall) do { \ if ((fncall) != AM_OK) { \ printf("Error calling: %s\n", #fncall); \ AMX_SPMDExit(-1); \ AMX_FatalErr("AMX_SPMDExit failed"); \ } \ } while(0) #define AM_PollBlock(eb) do { \ AM_Safe(AM_SetEventMask(eb, AM_NOTEMPTY)); \ AM_Safe(AM_WaitSema(eb)); \ AM_Safe(AM_Poll(eb)); \ } while (0) #if defined(AMUDP) #define LEADING_ARGS 2 #define LEADING_ARGS_STR " numprocs spawnfn" #else #define LEADING_ARGS 0 #define LEADING_ARGS_STR "" #endif #define TEST_STARTUP(argc, argv, networkpid, eb, ep, minargs, maxargs, usagestr) do { \ AMX_VerboseErrors = 1; \ if (AMX_SPMDIsWorker(argv)) { /* worker */ \ AM_Safe(AMX_SPMDStartup(&(argc), &(argv), 0, &(networkpid), &(eb), &(ep))); \ if ((argc) < (minargs)+1 || (argc) > (maxargs)+1 ) { \ fprintf(stderr, "Usage: %s %s\n", (argv)[0], (usagestr)); \ fflush(stderr); \ AMX_SPMDExit(-1); \ } \ } else { /* implicit master */ \ if ((argc) < (minargs)+LEADING_ARGS+1 || (argc) > (maxargs)+LEADING_ARGS+1 ) { \ fprintf(stderr, "Usage: %s%s %s\n", (argv)[0], LEADING_ARGS_STR, (usagestr)); \ fflush(stderr); \ exit(-1); \ } \ AM_Safe(AMX_SPMDStartup(&argc, &argv, 0, &networkpid, &eb, &ep)); \ } \ } while (0) /* app can define this before including to move our handlers NO - that doesn't work unless apputils.c is recompiled */ #ifndef APPUTIL_HANDLER_BASE #define APPUTIL_HANDLER_BASE 225 #endif /* call first to setup handlers for all app utils */ void setupUtilHandlers(ep_t activeep, eb_t activeeb); void printGlobalStats(void); extern int64_t getCurrentTimeMicrosec(void); extern void outputTimerStats(void); #define TEST_32BIT_ONLY() do { \ if (sizeof(void*) != 4) { \ if (AMX_SPMDMyProc() == 0) { \ printf("Test SKIPPED -- not implemented on 64-bit systems\n"); \ fflush(stdout); \ } \ AM_Safe(AMX_SPMDBarrier()); \ AM_Safe(AMX_SPMDExit(0)); \ } \ } while(0) uint32_t getWord(int proc, void *addr); void putWord(int proc, void *addr, uint32_t val); void readWord(void *destaddr, int proc, void *addr); void readSync(void); void writeWord(int proc, void *addr, uint32_t val); void writeSync(void); #ifdef __cplusplus } #endif #endif gasnet-2025.8.0/other/amx/amx_internal.c0000664000175000017500000001117515142313673020162 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/amx_internal.c $ * Description: AMX internal support code * Copyright 2002, Dan Bonachea * Copyright 2018, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _AMX_INTERNAL_H #error header inclusion error #endif /* definitions for internal declarations */ int amx_Initialized = 0; #if AMX_DEBUG_VERBOSE int AMX_VerboseErrors = 1; #else int AMX_VerboseErrors = 0; #endif int AMX_SilentMode = 0; const char *AMX_ProcessLabel = NULL; volatile int amx_frozen = 1; /* non-static to prevent a SunC problem (bug1626) */ /* all this to make sure we get a full stack frame for debugger */ AMX_NEVER_INLINE(_freezeForDebugger, static void _freezeForDebugger(int depth)) { if (!depth) _freezeForDebugger(1); else { volatile int i = 0; while (amx_frozen) { i++; AMX_sched_yield(); } } } extern void AMX_freezeForDebugger(void) { char name[255]; gethostname(name, sizeof(name)); AMX_Info("worker frozen for debugger: host=%s pid=%i : Attach and set amx_frozen=0", name, (int)getpid()); _freezeForDebugger(0); } /* ------------------------------------------------------------------------------------ */ /* error handling */ AMX_FORMAT_PRINTF(AMX_Msg,2,0, static int AMX_Msg(const char *prefix, const char *msg, va_list argptr)) { static char _expandedmsg[255]; // use static storage when possible for robustness in panic-mode static char plabel[80]; char *expandedmsg; size_t sz; int chk,retval; if (AMX_ProcessLabel && !*plabel) snprintf(plabel, sizeof(plabel), "(%s)", AMX_ProcessLabel); expandedmsg = _expandedmsg; sz = strlen(prefix) + strlen(plabel) + strlen(msg) + 8; if (sz > sizeof(_expandedmsg)) expandedmsg = (char *)AMX_malloc(sz); chk = snprintf(expandedmsg, sz, "%s%s: %s\n", prefix, plabel, msg); AMX_assert(chk < (int)sz); // truncation should not occur retval = vfprintf(stderr, expandedmsg, argptr); fflush(stderr); if (expandedmsg != _expandedmsg) AMX_free(expandedmsg); return retval; } extern int AMX_Info(const char *msg, ...) { va_list argptr; int retval; va_start(argptr, msg); // pass in last argument retval = AMX_Msg(AMX_ENV_PREFIX_STR, msg, argptr); va_end(argptr); return retval; } extern int AMX_Warn(const char *msg, ...) { va_list argptr; int retval; va_start(argptr, msg); // pass in last argument retval = AMX_Msg("*** " AMX_ENV_PREFIX_STR " WARNING", msg, argptr); va_end(argptr); return retval; } extern int AMX_Err(const char *msg, ...) { va_list argptr; int retval; va_start(argptr, msg); // pass in last argument retval = AMX_Msg("*** " AMX_ENV_PREFIX_STR " ERROR", msg, argptr); va_end(argptr); return retval; } extern void AMX_FatalErr(const char *msg, ...) { va_list argptr; va_start(argptr, msg); // pass in last argument AMX_Msg("*** FATAL ERROR", msg, argptr); va_end(argptr); abort(); } /* ------------------------------------------------------------------------------------ */ static void AMX_defaultAMHandler(void *token) { int srcnode = -1; handler_t hidx; amx_category_t category; int is_req; AMX_GetSourceId(token, &srcnode); AMX_GetTokenInfo(token,&hidx,&category,&is_req); AMX_FatalErr(AMX_LIB_STR" received an AM %s from node %i for a handler index %i " "with no associated AM handler function registered", (is_req?"Request":"Reply"), srcnode, (int)hidx); } amx_handler_fn_t amx_unused_handler = (amx_handler_fn_t)&AMX_defaultAMHandler; /*------------------------------------------------------------------------------------ * System initialization/termination *------------------------------------------------------------------------------------ */ extern int AMX_Init(void) { int firstcall = (amx_Initialized == 0); if (firstcall) { /* check system attributes */ AMX_assert(sizeof(int8_t) == 1); AMX_assert(sizeof(uint8_t) == 1); #ifndef INTTYPES_16BIT_MISSING AMX_assert(sizeof(int16_t) == 2); AMX_assert(sizeof(uint16_t) == 2); #endif AMX_assert(sizeof(int32_t) == 4); AMX_assert(sizeof(uint32_t) == 4); AMX_assert(sizeof(int64_t) == 8); AMX_assert(sizeof(uint64_t) == 8); AMX_assert(sizeof(uintptr_t) >= sizeof(void *)); } amx_Initialized++; return firstcall; } /* ------------------------------------------------------------------------------------ */ extern int AMX_Terminate(void) { int lastcall; AMX_CHECKINIT(); lastcall = (amx_Initialized == 1); amx_Initialized--; return lastcall; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/amx/testbounce.c0000664000175000017500000001157715142313673017662 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/testbounce.c $ * Description: AMX test * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #include "apputils.h" #define SMALL_REQ_HANDLER 1 #define SMALL_REP_HANDLER 2 #define MEDIUM_REQ_HANDLER 3 #define MEDIUM_REP_HANDLER 4 #define LARGE_REQ_HANDLER 5 #define LARGE_REP_HANDLER 6 int myproc; int numprocs; int partner; volatile int count = 0; volatile int done = 0; uint32_t *VMseg; static void large_request_handler(void *token, void *buf, size_t nbytes, int arg) { uint32_t *recvdbuf = (uint32_t *)buf; #if VERBOSE printf("%i: large_request_handler(). starting...\n", myproc); fflush(stdout); #endif assert(arg == 666); assert(buf == ((uint8_t *)VMseg) + 100); assert(nbytes == AM_MaxLong()); /* verify the result */ { int i; for (i = 0; i < AM_MaxLong()/4; i++) { if (recvdbuf[i] != (uint32_t)((count << 16) + i)) AMX_FatalErr("%i: ERROR: mismatched data recvdbuf[%i]=%i\n", myproc, i, (int)recvdbuf[i]); } count++; for (i = 0; i < AM_MaxLong()/4; i++) { recvdbuf[i] = (uint32_t)((count << 16) + i); } if (numprocs > 1) count++; } #if VERBOSE printf("%i: large_request_handler(). sending reply...\n", myproc); fflush(stdout); #endif AM_Safe(AM_ReplyXfer1(token, 100, LARGE_REP_HANDLER, buf, nbytes, 666)); done++; } static void large_reply_handler(void *token, void *buf, size_t nbytes, int arg) { uint32_t *recvdbuf = (uint32_t *)buf; /* assert(done < 2*nummsgs); */ #if VERBOSE printf("%i: bulk_reply_handler()\n", myproc); fflush(stdout); #endif assert(arg == 666); assert(buf == ((uint8_t *)VMseg) + 100); assert(nbytes == AM_MaxLong()); if (numprocs > 1) count++; /* verify the result */ { int i; for (i = 0; i < AM_MaxLong()/4; i++) { if (recvdbuf[i] != (uint32_t)((count << 16) + i)) AMX_FatalErr("%i: ERROR: mismatched data recvdbuf[%i]=%i\n", myproc, i, (int)recvdbuf[i]); } } count++; done = 1; } int main(int argc, char **argv) { eb_t eb; ep_t ep; uint64_t networkpid; int64_t begin, end, total; int polling = 1; int iters = 0; TEST_STARTUP(argc, argv, networkpid, eb, ep, 1, 2, "iters (Poll/Block)"); /* setup handlers */ AM_Safe(AM_SetHandler(ep, LARGE_REQ_HANDLER, large_request_handler)); AM_Safe(AM_SetHandler(ep, LARGE_REP_HANDLER, large_reply_handler)); setupUtilHandlers(ep, eb); /* get SPMD info */ myproc = AMX_SPMDMyProc(); numprocs = AMX_SPMDNumProcs(); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 1; if (argc > 2) { switch(argv[2][0]) { case 'p': case 'P': polling = 1; break; case 'b': case 'B': polling = 0; break; default: printf("polling must be 'P' or 'B'..\n"); AMX_SPMDExit(1); } } if (numprocs % 2 != 0 && numprocs > 1) { printf("requires an even or unary number of processors\n"); AMX_SPMDExit(1); } VMseg = (uint32_t *)malloc(AM_MaxLong()+100); memset(VMseg, 0, AM_MaxLong()+100); AM_Safe(AM_SetSeg(ep, VMseg, AM_MaxLong()+100)); if (myproc % 2 == 0) partner = (myproc + 1) % numprocs; else partner = (myproc - 1); AM_Safe(AMX_SPMDBarrier()); if (myproc == 0) printf("Running %i iterations of bulk bounce test...\n", iters); begin = getCurrentTimeMicrosec(); if (myproc % 2 == 1 || numprocs == 1) { int q; for (q=0; q * Copyright 2018, The Regents of the University of California * Terms of use are as specified in license.txt */ #ifndef _AMX_INTERNAL_H #define _AMX_INTERNAL_H #ifndef _AMX_INTERNAL_FWD_H #error header inclusion error #endif #ifdef __cplusplus extern "C" { #endif // At this point we should have the public header, which includes (N)EBUG indicators and library identification #if !(AMX_DEBUG ^ AMX_NDEBUG) #error incorrext AMX_(N)DEBUG settings #endif #if AMUDP #define AMX_LIB_STR "AMUDP" #elif AMMPI #define AMX_LIB_STR "AMMPI" #else #error missing AMX library identification #endif #include #undef assert #define assert(x) ERROR_use_AMX_assert #define AMX_curloc __FILE__ ":" AMX_STRINGIFY(__LINE__) #if AMX_NDEBUG #define AMX_assert(expr) ((void)0) #else #define AMX_assert(expr) \ (AMX_PREDICT_TRUE(expr) ? (void)0 : \ AMX_FatalErr("Assertion failure at %s %s: %s\n", \ AMX_CURRENT_FUNCTION, AMX_curloc, #expr)) #endif #ifdef gasnett_unreachable #define AMX_unreachable() gasnett_unreachable() #else #define AMX_unreachable() AMX_assert(!"unreachable") #endif // Attributes #if defined(__has_attribute) // introduced around gcc 5.x (2015) #define AMX_HAS_ATTRIBUTE(x) __has_attribute(x) #else #define AMX_HAS_ATTRIBUTE(x) 0 #endif #ifdef HAVE_GASNET_TOOLS #define AMX_FORMAT_PRINTF GASNETT_FORMAT_PRINTF #elif defined (__GNUC__) || AMX_HAS_ATTRIBUTE(__format__) #define AMX_FORMAT_PRINTF(fnname,fmtarg,firstvararg,declarator) \ __attribute__((__format__ (__printf__, fmtarg, firstvararg))) declarator #else #define AMX_FORMAT_PRINTF(fnname,fmtarg,firstvararg,declarator) declarator #endif #ifdef HAVE_GASNET_TOOLS #define AMX_INLINE(fn) GASNETT_INLINE(fn) #elif AMX_DEBUG #define AMX_INLINE(fn) static #elif __cplusplus #define AMX_INLINE(fn) inline #elif __STDC_VERSION__ >= 199901L #define AMX_INLINE(fn) static inline #else #define AMX_INLINE(fn) static #endif #ifdef HAVE_GASNET_TOOLS #define AMX_NEVER_INLINE(fnname,declarator) GASNETT_NEVER_INLINE(fnname,declarator) #else #define AMX_NEVER_INLINE(fnname,declarator) declarator #endif /* ------------------------------------------------------------------------------------ */ AMX_FORMAT_PRINTF(AMX_Err,1,2, extern int AMX_Err(const char *msg, ...)); AMX_FORMAT_PRINTF(AMX_Warn,1,2, extern int AMX_Warn(const char *msg, ...)); AMX_FORMAT_PRINTF(AMX_Info,1,2, extern int AMX_Info(const char *msg, ...)); // verbose debug messages (double-parens) #if AMX_DEBUG_VERBOSE #define AMX_VERBOSE_INFO(args) AMX_Info args #define _AMX_IS_DEBUG_VERBOSE 1 #else #define AMX_VERBOSE_INFO(args) ((void)0) #define _AMX_IS_DEBUG_VERBOSE 0 #endif #if AMX_DEBUG #define AMX_DEBUG_INFO(args) AMX_Info args #define AMX_DEBUG_WARN(args) AMX_Warn args // throttled debug-only warning #define AMX_DEBUG_WARN_TH(msg) do { \ static uint64_t _cnt = 0; \ static uint64_t _mask = 0xFF; \ _cnt++; \ if_pf (_AMX_IS_DEBUG_VERBOSE || (_cnt & _mask) == 0) { \ _mask = (_mask << 1) | 0x1; \ AMX_Warn("%s (%" PRIu64 " occurences)",msg,_cnt); \ } \ } while (0) #else #define AMX_DEBUG_INFO(args) ((void)0) #define AMX_DEBUG_WARN(args) ((void)0) #define AMX_DEBUG_WARN_TH(msg) ((void)0) #endif #ifdef GASNETT_NORETURN GASNETT_NORETURN #endif AMX_FORMAT_PRINTF(AMX_FatalErr,1,2, extern void AMX_FatalErr(const char *msg, ...)); #ifdef GASNETT_NORETURNP GASNETT_NORETURNP(AMX_FatalErr) #endif /* memory allocation */ static void *_AMX_malloc(size_t sz, const char *curloc) { void *ret = malloc(sz); if_pf(!ret) AMX_FatalErr("Failed to malloc(%" PRIuSZ ") at %s", sz, curloc); return ret; } static void *_AMX_calloc(size_t N, size_t S, const char *curloc) { void *ret = calloc(N,S); if_pf(!ret) AMX_FatalErr("Failed to calloc(%" PRIuSZ ",%" PRIuSZ ") at %s", N, S, curloc); return ret; } static void *_AMX_realloc(void *ptr, size_t S, const char *curloc) { void *ret = realloc(ptr,S); if_pf(!ret) AMX_FatalErr("Failed to realloc(%" PRIuSZ ") at %s", S, curloc); return ret; } static void _AMX_free(void *ptr, const char *curloc) { free(ptr); } #ifndef AMX_TENTATIVE_EXTERN #if __cplusplus #define AMX_TENTATIVE_EXTERN extern #elif AMX_HAS_ATTRIBUTE(__common__) // This attribute is notably available in or before: // gcc 4.8.5, clang 4.0.0, Intel 2017.0, PGI 18.4, Xcode 8.2.1 #define AMX_TENTATIVE_EXTERN __attribute__((__common__)) #else #define AMX_TENTATIVE_EXTERN #endif #endif #if AMX_DEBUG // use the gasnet debug malloc functions if a debug libgasnet is linked // This uses tentative definitions which are not supported in C++, // so at least one object in libamx must compile this header in C mode. AMX_TENTATIVE_EXTERN void *(*gasnett_debug_malloc_fn)(size_t sz, const char *curloc); AMX_TENTATIVE_EXTERN void *(*gasnett_debug_calloc_fn)(size_t N, size_t S, const char *curloc); AMX_TENTATIVE_EXTERN void *(*gasnett_debug_realloc_fn)(void *ptr, size_t sz, const char *curloc); AMX_TENTATIVE_EXTERN void (*gasnett_debug_free_fn)(void *ptr, const char *curloc); AMX_TENTATIVE_EXTERN char *(*gasnett_debug_strdup_fn)(const char *s, const char *curloc); AMX_TENTATIVE_EXTERN char *(*gasnett_debug_strndup_fn)(const char *s, size_t sz, const char *curloc); AMX_TENTATIVE_EXTERN void (*gasnett_debug_memcheck_fn)(void *ptr, const char *curloc); AMX_TENTATIVE_EXTERN void (*gasnett_debug_memcheck_one_fn)(const char *curloc); AMX_TENTATIVE_EXTERN void (*gasnett_debug_memcheck_all_fn)(const char *curloc); #define AMX_malloc(sz) \ ( (AMX_PREDICT_FALSE(gasnett_debug_malloc_fn==NULL) ? \ gasnett_debug_malloc_fn = &_AMX_malloc : 0), \ (*gasnett_debug_malloc_fn)(sz, AMX_curloc)) #define AMX_calloc(N,S) \ ( (AMX_PREDICT_FALSE(gasnett_debug_calloc_fn==NULL) ? \ gasnett_debug_calloc_fn = &_AMX_calloc : 0), \ (*gasnett_debug_calloc_fn)((N),(S), AMX_curloc)) #define AMX_realloc(ptr,S) \ ( (AMX_PREDICT_FALSE(gasnett_debug_realloc_fn==NULL) ? \ gasnett_debug_realloc_fn = &_AMX_realloc : 0), \ (*gasnett_debug_realloc_fn)((ptr),(S), AMX_curloc)) #define AMX_free(ptr) \ ( (AMX_PREDICT_FALSE(gasnett_debug_free_fn==NULL) ? \ gasnett_debug_free_fn = &_AMX_free : 0), \ (*gasnett_debug_free_fn)(ptr, AMX_curloc)) #define AMX_strdup(s) \ ( (AMX_PREDICT_FALSE(gasnett_debug_strdup_fn==NULL) ? \ gasnett_debug_strdup_fn = &_AMX_strdup : 0), \ (*gasnett_debug_strdup_fn)(s, AMX_curloc)) #define AMX_strndup(s,sz) \ ( (AMX_PREDICT_FALSE(gasnett_debug_strndup_fn==NULL) ? \ gasnett_debug_strndup_fn = &_AMX_strndup : 0), \ (*gasnett_debug_strndup_fn)(s, sz, AMX_curloc)) #define AMX_memcheck(ptr) do { \ AMX_assert(ptr); \ if (gasnett_debug_memcheck_fn) \ (*gasnett_debug_memcheck_fn)(ptr, AMX_curloc); \ } while (0) #define AMX_memcheck_one() do { \ if (gasnett_debug_memcheck_one_fn) \ (*gasnett_debug_memcheck_one_fn)(AMX_curloc); \ } while (0) #define AMX_memcheck_all() do { \ if (gasnett_debug_memcheck_all_fn) \ (*gasnett_debug_memcheck_all_fn)(AMX_curloc); \ } while (0) #undef malloc #define malloc(x) ERROR_use_AMX_malloc #undef calloc #define calloc(n,s) ERROR_use_AMX_calloc #undef realloc #define realloc(n,s) ERROR_use_AMX_realloc #undef free #define free(x) ERROR_use_AMX_free #undef strdup #define strdup(x) ERROR_use_AMX_strdup #undef strndup #define strndup(x) ERROR_use_AMX_strndup #else #define AMX_malloc(sz) _AMX_malloc((sz),AMX_curloc) #define AMX_calloc(N,S) _AMX_calloc((N),(S),AMX_curloc) #define AMX_realloc(ptr,S) _AMX_realloc((ptr),(S),AMX_curloc) #define AMX_free(ptr) _AMX_free(ptr,AMX_curloc) #define AMX_strdup(s) _AMX_strdup(s,AMX_curloc) #define AMX_strndup(s,sz) _AMX_strndup(s,sz,AMX_curloc) #define AMX_memcheck(ptr) ((void)0) #define AMX_memcheck_one() ((void)0) #define AMX_memcheck_all() ((void)0) #endif // some older OS's (eg Solaris 10) lack strndup, so roll our own static char *_AMX_strdup(const char *s, const char *curloc) { AMX_assert(s); size_t len = strlen(s); char *ret = (char*)AMX_malloc(len+1); if_pf(!ret) AMX_FatalErr("Failed to strdup(%" PRIuSZ ") at %s", strlen(s), curloc); memcpy(ret,s,len); ret[len] = 0; return ret; } static char *_AMX_strndup(const char *s, size_t sz, const char *curloc) { AMX_assert(s); size_t _len = strlen(s); size_t len = MIN(_len,sz); char *ret = (char *)AMX_malloc(len+1); if_pf(!ret) AMX_FatalErr("Failed to strndup(%" PRIuSZ ",%" PRIuSZ ") at %s", strlen(s), sz, curloc); memcpy(ret,s,len); ret[len] = 0; return ret; } /*------------------------------------------------------------------------------------ * Error reporting *------------------------------------------------------------------------------------ */ static const char *AMX_ErrorName(int errval) { switch (errval) { case AM_ERR_NOT_INIT: return "AM_ERR_NOT_INIT"; case AM_ERR_BAD_ARG: return "AM_ERR_BAD_ARG"; case AM_ERR_RESOURCE: return "AM_ERR_RESOURCE"; case AM_ERR_NOT_SENT: return "AM_ERR_NOT_SENT"; case AM_ERR_IN_USE: return "AM_ERR_IN_USE"; default: return "*unknown*"; } } static const char *AMX_ErrorDesc(int errval) { switch (errval) { case AM_ERR_NOT_INIT: return "Active message layer not initialized"; case AM_ERR_BAD_ARG: return "Invalid function parameter passed"; case AM_ERR_RESOURCE: return "Problem with requested resource"; case AM_ERR_NOT_SENT: return "Synchronous message not sent"; case AM_ERR_IN_USE: return "Resource currently in use"; default: return "no description available"; } } //------------------------------------------------------------------------------------ /* macros for returning errors that allow verbose error tracking */ #define AMX_RETURN_ERR(type) do { \ if (AMX_VerboseErrors) AMX_Warn("%s returning an error code: AM_ERR_%s (%s)\n" \ " at %s", \ AMX_CURRENT_FUNCTION, #type, AMX_ErrorDesc(AM_ERR_##type), AMX_curloc); \ return AM_ERR_ ## type; \ } while (0) #define AMX_RETURN_ERRF(type, fromfn) do { \ if (AMX_VerboseErrors) AMX_Warn("%s returning an error code: AM_ERR_%s (%s)\n" \ " from function %s\n" \ " at %s", \ AMX_CURRENT_FUNCTION, #type, AMX_ErrorDesc(AM_ERR_##type), \ #fromfn, AMX_curloc); \ return AM_ERR_ ## type; \ } while (0) #define AMX_RETURN_ERRFR(type, fromfn, reason) do { \ if (AMX_VerboseErrors) AMX_Warn("%s returning an error code: AM_ERR_%s (%s)\n" \ " from function %s\n" \ " at %s\n" \ " reason: %s\n", \ AMX_CURRENT_FUNCTION, #type, AMX_ErrorDesc(AM_ERR_##type), \ #fromfn, AMX_curloc, reason); \ return AM_ERR_ ## type; \ } while (0) /* return a possible error */ #define AMX_RETURN(val) do { \ if_pf (AMX_VerboseErrors && val != AM_OK) \ AMX_Warn("%s returning an error code: %s (%s)\n" \ " at %s", \ AMX_CURRENT_FUNCTION, AMX_ErrorName(val), AMX_ErrorDesc(val), \ AMX_curloc); \ return val; \ } while (0) #ifndef AMX_ENABLE_ERRCHECKS #if GASNETI_ENABLE_ERRCHECKS #define AMX_ENABLE_ERRCHECKS 1 #else #define AMX_ENABLE_ERRCHECKS 0 #endif #endif #if AMX_DEBUG || AMX_ENABLE_ERRCHECKS #define AMX_CHECK_ERR(errcond, type) \ do { if_pf (errcond) AMX_RETURN_ERR(type); } while(0) #define AMX_CHECK_ERRF(errcond, type, fromfn) \ do { if_pf (errcond) AMX_RETURN_ERRF(type, fromfn); } while(0) #define AMX_CHECK_ERRR(errcond, type, reason) \ do { if_pf (errcond) AMX_RETURN_ERRR(type, reason); } while(0) #define AMX_CHECK_ERRFR(errcond, type, fromfn, reason) \ do { if_pf (errcond) AMX_RETURN_ERRFR(type, fromfn, reason); } while(0) #define AMX_CHECK_ERRFRC(errcond, type, fromfn, reason, cleanup) \ do { if_pf (errcond) { { cleanup; } AMX_RETURN_ERRFR(type, fromfn, reason); } } while(0) #else #define AMX_CHECK_ERR(errcond, type) ((void)0) #define AMX_CHECK_ERRF(errcond, type, fromfn) ((void)0) #define AMX_CHECK_ERRR(errcond, type, reason) ((void)0) #define AMX_CHECK_ERRFR(errcond, type, fromfn, reason) ((void)0) #define AMX_CHECK_ERRFRC(errcond, type, fromfn, reason, cleanup) ((void)0) #endif #ifdef AMX_HERE #undef AMX_HERE #define AMX_HERE() AMX_Info("HERE at: %s",AMX_curloc) #else #define AMX_HERE() ((void)0) #endif extern int amx_Initialized; #define AMX_CHECKINIT() AMX_CHECK_ERR((!amx_Initialized),NOT_INIT) extern int AMX_Init(void); extern int AMX_Terminate(void); //------------------------------------------------------------------------------------ // shared variables extern amx_handler_fn_t amx_unused_handler; extern const char *AMX_ProcessLabel; //------------------------------------------------------------------------------------ // handler dispatch typedef void (*amx_returned_handler_fn_t)(int status, op_t opcode, void *token); #define _AMX_EMPTY(a,b,c) #define _AMX_harg(a,b,c) ,int32_t #define _AMX_harg_pass(Nm1,N,Np1) ,_args[Nm1] #define _AMX_Short_handlerfn_typedefN(Nm1,N,Np1) \ typedef void (*AMX_Short_handlerfn_type_##N)(void * AMX_META_DES##N(_AMX_EMPTY,_AMX_harg)); AMX_META_ASC16(_AMX_Short_handlerfn_typedefN,_AMX_Short_handlerfn_typedefN) #define _AMX_Short_RunCaseN(Nm1,N,Np1) \ case N: ((AMX_Short_handlerfn_type_##N)_phandlerfn)(_token AMX_META_ASC##N(_AMX_EMPTY,_AMX_harg_pass)); break; #define AMX_RUN_HANDLER_SHORT(phandlerfn, token, pArgs, numargs) do { \ amx_handler_fn_t const _phandlerfn = (amx_handler_fn_t)phandlerfn; \ void * const _token = (void *)token; \ int32_t const * const _args = (int32_t *)(pArgs); \ AMX_assert(_phandlerfn); AMX_assert(_token); AMX_assert(_args || !numargs); \ switch (numargs) { \ AMX_META_DES16(_AMX_Short_RunCaseN,_AMX_Short_RunCaseN) \ default: AMX_unreachable(); \ } \ } while (0) #define _AMX_MedLong_handlerfn_typedefN(Nm1,N,Np1) \ typedef void (*AMX_MedLong_handlerfn_type_##N)(void *, void *, size_t AMX_META_DES##N(_AMX_EMPTY,_AMX_harg)); AMX_META_ASC16(_AMX_MedLong_handlerfn_typedefN,_AMX_MedLong_handlerfn_typedefN) #define _AMX_MedLong_RunCaseN(Nm1,N,Np1) \ case N: ((AMX_MedLong_handlerfn_type_##N)_phandlerfn)(_token, _pData, _datalen AMX_META_ASC##N(_AMX_EMPTY,_AMX_harg_pass)); break; #define _AMX_RUN_HANDLER_MEDLONG(phandlerfn, token, pArgs, numargs, pData, datalen, extrachecks) do { \ amx_handler_fn_t const _phandlerfn = (amx_handler_fn_t)phandlerfn; \ void * const _token = (void *)token; \ int32_t const * const _args = (int32_t *)(pArgs); \ void * const _pData = (void *)pData; \ size_t const _datalen = datalen; \ AMX_assert(_phandlerfn); AMX_assert(_token); AMX_assert(_args || !numargs); \ AMX_assert(_pData || !_datalen); \ extrachecks; \ switch (numargs) { \ AMX_META_DES16(_AMX_MedLong_RunCaseN,_AMX_MedLong_RunCaseN) \ default: AMX_unreachable(); \ } \ } while (0) #define AMX_RUN_HANDLER_MEDIUM(phandlerfn, token, pArgs, numargs, pData, datalen) \ _AMX_RUN_HANDLER_MEDLONG(phandlerfn, token, pArgs, numargs, pData, datalen, \ AMX_assert(((uintptr_t)pData) % 8 == 0)) // ensure medium align #define AMX_RUN_HANDLER_LONG(phandlerfn, token, pArgs, numargs, pData, datalen) \ _AMX_RUN_HANDLER_MEDLONG(phandlerfn, token, pArgs, numargs, pData, datalen, ((void)0)) //------------------------------------------------------------------------------------ #ifndef AMX_ENV_PREFIX_STR // AMX_ENV_PREFIX_STR is the safest define, to avoid conflicting defns #ifdef AMX_ENV_PREFIX #define AMX_ENV_PREFIX_STR AMX_STRINGIFY(AMX_ENV_PREFIX) #elif defined(AMUDP_ENV_PREFIX) #define AMX_ENV_PREFIX_STR AMX_STRINGIFY(AMUDP_ENV_PREFIX) #elif defined(AMMPI_ENV_PREFIX) #define AMX_ENV_PREFIX_STR AMX_STRINGIFY(AMMPI_ENV_PREFIX) #else #define AMX_ENV_PREFIX_STR AMX_LIB_STR #endif #endif /* return the first environment variable matching one of: AMX_ENV_PREFIX_STR##_##basekey AMX_LIB_STR##_##basekey basekey warn if more than one is set with different values */ extern char *AMX_getenv_prefixed(const char *basekey); /* same with a default value and console reporting in verbose mode */ extern char *AMX_getenv_prefixed_withdefault(const char *basekey, const char *defaultval); extern void AMX_freezeForDebugger(void); //------------------------------------------------------------------------------------ /* *** TIMING *** */ #ifndef _AMX_TICK_T #define _AMX_TICK_T typedef uint64_t amx_tick_t; #endif #if defined(HAVE_GASNET_TOOLS) #define AMX_getMicrosecondTimeStamp() (gasnett_ticks_to_us(gasnett_ticks_now())) #define AMX_getCPUTicks() ((amx_tick_t)gasnett_ticks_now()) #define AMX_ticks2us(ticks) (gasnett_ticks_to_us((gasnett_tick_t)(ticks))) #define AMX_us2ticks(us) \ ((amx_tick_t)(us) * \ (amx_tick_t)(1000000000.0 / gasnett_ticks_to_us((gasnett_tick_t)1000000000))) #define AMX_tickspersec AMX_us2ticks(1000000) #else static int64_t AMX_getMicrosecondTimeStamp(void) { int64_t retval; struct timeval tv; retry: if (gettimeofday(&tv, NULL)) AMX_FatalErr("gettimeofday failed: %s",strerror(errno)); retval = ((int64_t)tv.tv_sec) * 1000000 + tv.tv_usec; #if PLATFORM_OS_UNICOS /* fix an empirically observed bug in UNICOS gettimeofday(), which occasionally returns ridiculously incorrect values */ if_pf(retval < (((int64_t)3) << 48)) goto retry; #endif return retval; } /* Ticks == us for gettimeofday */ #define AMX_getCPUTicks() ((amx_tick_t)AMX_getMicrosecondTimeStamp()) #define AMX_ticks2us(ticks) (ticks) #define AMX_us2ticks(us) ((amx_tick_t)(us)) #define AMX_tickspersec 1000000 #endif //------------------------------------------------------------------------------------ #if PLATFORM_OS_SUPERUX || PLATFORM_OS_NETBSD || \ PLATFORM_OS_BLRTS || PLATFORM_OS_OPENBSD /* these implement sched_yield() in libpthread only, which we may not want */ #define AMX_yield() sleep(0) #elif defined(HAVE_GASNET_TOOLS) #else #endif #ifdef __cplusplus } // extern "C" #endif #endif gasnet-2025.8.0/other/amx/testlatencyM.c0000664000175000017500000000646115142313673020157 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/testlatencyM.c $ * Description: AMX test * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #include "apputils.h" /* non-pipelined version of ping tester, using AMMediums of a given size */ #define PING_REQ_HANDLER 1 #define PING_REP_HANDLER 2 static volatile int numleft; int myproc; int numprocs; eb_t eb; ep_t ep; static void ping_request_handler(void *token, void *msg, size_t nbytes) { numleft--; #if VERBOSE printf("%i: ping_request_handler(). sending reply...\n", myproc); fflush(stdout); #endif AM_Safe(AM_Reply0(token, PING_REP_HANDLER)); } static void ping_reply_handler(void *token) { #if VERBOSE printf("%i: ping_reply_handler()\n", myproc); fflush(stdout); #endif numleft--; } void mywait(int polling) { if (polling) { /* poll until everyone done */ while (numleft) { AM_Safe(AM_Poll(eb)); } } else { while (numleft) { AM_Safe(AM_SetEventMask(eb, AM_NOTEMPTY)); AM_Safe(AM_WaitSema(eb)); AM_Safe(AM_Poll(eb)); } } } /* usage: testlatency numprocs spawnfn iters P/B msgsz */ int main(int argc, char **argv) { uint64_t networkpid; int64_t begin, end, total; int polling = 1; int k; int iters = 0; int msgsz = 0; char *msg=NULL; TEST_STARTUP(argc, argv, networkpid, eb, ep, 1, 3, "iters (Poll/Block) (msgsize)"); /* setup handlers */ AM_Safe(AM_SetHandler(ep, PING_REQ_HANDLER, ping_request_handler)); AM_Safe(AM_SetHandler(ep, PING_REP_HANDLER, ping_reply_handler)); setupUtilHandlers(ep, eb); /* get SPMD info */ myproc = AMX_SPMDMyProc(); numprocs = AMX_SPMDNumProcs(); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 1; if (argc > 2) { switch(argv[2][0]) { case 'p': case 'P': polling = 1; break; case 'b': case 'B': polling = 0; break; default: printf("polling must be 'P' or 'B'..\n"); AMX_SPMDExit(1); } } if (argc > 3) msgsz = atoi(argv[3]); if (!msgsz) msgsz = 1; outputTimerStats(); AM_Safe(AMX_SPMDBarrier()); if (myproc == 0) printf("Running %i iterations of latency test (MSGSZ=%i)...\n", iters, msgsz); if (myproc == 0 && numprocs > 1) numleft = (numprocs-1)*iters; AM_Safe(AMX_SPMDBarrier()); msg = (char *)calloc(1,msgsz); begin = getCurrentTimeMicrosec(); if (myproc == 0 && numprocs > 1) { mywait(polling); } else { /* everybody sends packets to 0 */ int expect = (numprocs > 1 ? 1 : 2); for (k=0;k < iters; k++) { numleft = expect; #if VERBOSE printf("%i: sending request...", myproc); fflush(stdout); #endif AM_Safe(AM_RequestI0(ep, 0, PING_REQ_HANDLER, msg, msgsz)); mywait(polling); } } end = getCurrentTimeMicrosec(); total = end - begin; if (myproc != 0 || numprocs == 1) printf("Worker %i: %i microseconds total, throughput: %i requests/sec (%.3f us / request)\n", myproc, (int)total, (int)(((float)1000000)*iters/((int)total)), ((double)total)/iters); else printf("Worker 0 done.\n"); fflush(stdout); /* dump stats */ AM_Safe(AMX_SPMDBarrier()); printGlobalStats(); AM_Safe(AMX_SPMDBarrier()); /* exit */ AM_Safe(AMX_SPMDExit(0)); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/amx/testam.c0000664000175000017500000001431615142313673016776 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/testam.c $ * Description: AMX test * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #include "testam.h" #define verify(cond) do { \ if (!(cond)) { fprintf(stderr,"%i: ERROR: verify(%s) failed at %s:%i\n", \ MYPROC, #cond, __FILE__,__LINE__); fflush(stderr); \ } } while(0) volatile int zero = 0; /* ------------------------------------------------------------------------------------ */ ep_t check_ep; en_t check_en; tag_t check_tag; handler_t check_hidx; void checkAMshort(void *token) { ep_t ep; en_t en; tag_t tag; int id = -1; handler_t hidx = ~check_hidx; amx_category_t category = amx_Long; int is_req = 0; AM_Safe(AMX_GetSourceId(token,&id)); verify(id == 0); AM_Safe(AM_GetSourceEndpoint(token,&en)); verify(AMX_enEqual(en,check_en)); AM_Safe(AM_GetDestEndpoint(token,&ep)); verify(ep == check_ep); AM_Safe(AM_GetMsgTag(token,&tag)); verify(tag == check_tag); AM_Safe(AMX_GetTokenInfo(token,&hidx,&category,&is_req)); verify(hidx == check_hidx); verify(category == amx_Short); verify(is_req); check_tag = 0; } /* ------------------------------------------------------------------------------------ */ int main(int argc, char **argv) { eb_t eb; ep_t ep; uint64_t networkpid; int partner; int iters=0, polling = 1, i; #if defined(AMUDP) const char *envvars[][3] = { #define DEFVAR(key,val) { key, val, key "=" val }, DEFVAR("A","A") DEFVAR("B","B") DEFVAR("C","C") DEFVAR("ABC","ABC") DEFVAR("AReallyLongEnvironmentName","A Really Long Environment Value") }; for (i=0; i < (int)(sizeof(envvars)/sizeof(envvars[0])); i++) { putenv((char*)(envvars[i][2])); } #endif TEST_STARTUP(argc, argv, networkpid, eb, ep, 1, 2, "iters (Poll/Block)"); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 1; if (argc > 2) { switch(argv[2][0]) { case 'p': case 'P': polling = 1; break; case 'b': case 'B': polling = 0; break; default: printf("polling must be 'P' or 'B'..\n"); AMX_SPMDExit(1); } } { /* misc tests for functions possibly not covered elsewhere */ int numhand = AM_MaxNumHandlers(); verify(numhand >= 256); int n = 0; tag_t t,mytag; AM_Safe(AM_SetNumHandlers(ep, numhand)); AM_Safe(AM_GetNumHandlers(ep, &n)); verify(n >= numhand); AM_Safe(AM_GetTag(ep, &mytag)); for (n=0; n < NUMPROCS; n++) { verify(AM_GetTranslationInuse(ep,n) == AM_OK); AM_Safe(AM_GetTranslationTag(ep,n,&t)); if (n == MYPROC) verify(t == mytag); } verify(AM_GetTranslationInuse(ep,NUMPROCS) != AM_OK); } { /* test direct endpoint/bundle ops */ eb_t eb1, eb2; ep_t ep1; en_t en1, en2; int i=0,n,m; size_t sz; void *vp=0; tag_t t1 = (tag_t)0x1234ABCDU; AM_Safe(AM_AllocateBundle(AM_SEQ,&eb1)); AM_Safe(AM_AllocateBundle(AM_SEQ,&eb2)); AM_Safe(AM_AllocateEndpoint(eb1,&ep1,&en1)); check_ep = ep1; check_en = en1; AM_Safe(AM_GetNumTranslations(ep1, &n)); verify(n >= 256); AM_Safe(AM_MaxNumTranslations(&m)); verify(m >= 256); if (m > 1024) m = 1024; AM_Safe(AM_SetNumTranslations(ep1, m)); AM_Safe(AM_GetNumTranslations(ep1, &n)); verify(n == m); AM_Safe(AM_MapAny(ep1,&i,en1,t1)); verify(i >= 0 && i < m); verify(AM_GetTranslationInuse(ep1,i) == AM_OK); check_tag = 0; AM_Safe(AM_GetTranslationTag(ep1,i,&check_tag)); verify(t1 == check_tag); AM_Safe(AM_UnMap(ep1,i)); verify(AM_GetTranslationInuse(ep1,i) != AM_OK); AM_Safe(AM_Map(ep1,i,en1,t1)); AM_Safe(AM_MaxSegLength(&sz)); verify(sz >= sizeof(int)); AM_Safe(AM_SetSeg(ep1,&n,sizeof(int))); AM_Safe(AM_SetTag(ep1,t1)); AM_Safe(AM_MoveEndpoint(ep1,eb1,eb2)); AM_Safe(AM_FreeBundle(eb1)); verify(AM_GetTranslationInuse(ep1,i) == AM_OK); check_tag = 0; AM_Safe(AM_GetTranslationTag(ep1,i,&check_tag)); verify(t1 == check_tag); AM_Safe(AM_GetTranslationName(ep1,i,&en2)); verify(AMX_enEqual(en1, en2)); AM_Safe(AM_GetSeg(ep1,&vp,&sz)); verify(sz == sizeof(int)); verify(vp == &n); AM_Safe(AM_GetNumTranslations(ep1, &n)); verify(n == m); check_tag = 0; AM_Safe(AM_GetTag(ep1,&check_tag)); verify(t1 == check_tag); AM_Safe(AM_SetExpectedResources(ep1,1,1)); check_hidx = (handler_t)-1; AM_Safe(AM_SetHandlerAny(ep1,&check_hidx,checkAMshort)); i = (int)check_hidx; // bug3459: avoid a warning verify(i >= 0 && i < AM_MaxNumHandlers()); AM_Safe(AM_Request0(ep1,0,check_hidx)); do { AM_Safe(AM_Poll(eb2)); } while (check_tag); AM_Safe(AM_FreeEndpoint(ep1)); AM_Safe(AM_FreeBundle(eb2)); } /* setup handlers */ SETUP_ALLAM(); setupUtilHandlers(ep, eb); VMsegsz = 2*sizeof(testam_payload_t)*NUMHANDLERS_PER_TYPE; VMseg = malloc(VMsegsz); memset(VMseg, 0, VMsegsz); AM_Safe(AM_SetSeg(ep, VMseg, VMsegsz)); if (zero) { /* don't actually call these, just ensure they link properly */ static char *ignore; AMX_SPMDSetExitCallback(NULL); ignore += ignore - AMX_SPMDgetenvMaster("PATH"); (void) AMX_SPMDIsWorker(argv); AMX_SPMDAllGather(NULL, NULL, 0); AMX_SPMDkillmyprocess(0); } /* barrier */ AM_Safe(AMX_SPMDBarrier()); partner = (MYPROC + 1)%NUMPROCS; /* compute */ for (i=0; i < iters; i++) { ALLAM_REQ(partner); while (!ALLAM_DONE(i+1)) { if (polling) { AM_Safe(AM_Poll(eb)); } else { AM_Safe(AM_SetEventMask(eb, AM_NOTEMPTY)); AM_Safe(AM_WaitSema(eb)); AM_Safe(AM_Poll(eb)); } } } #if defined(AMUDP) for (i=0; i < (int)(sizeof(envvars)/sizeof(envvars[0])); i++) { const char *key = envvars[i][0]; const char *val = envvars[i][1]; const char *actual = AMX_SPMDgetenvMaster(key); if (!actual) actual = ""; if (strcmp(val, actual)) printf("P%i: ERROR Environment value mismatch: %s='%s'\n", MYPROC, key, actual); } #endif printf("Worker %i done.\n", MYPROC); fflush(stdout); /* barrier */ AM_Safe(AMX_SPMDBarrier()); printGlobalStats(); AM_Safe(AMX_SPMDBarrier()); /* exit */ AM_Safe(AMX_SPMDExit(0)); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/amx/apputils.c0000664000175000017500000002761015142313673017343 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/apputils.c $ * Description: AMX Application utilities * Copyright 2000, Dan Bonachea */ #include "apputils.h" #if HAVE_GASNET_TOOLS #define GASNETT_LITE_MODE #include #else #include #include #endif #include #include #include #include /* init by setupUtilHandlers */ static ep_t ep = NULL; static eb_t eb = NULL; /* all handler indices are defined here and registered at bottom of file */ #define STATS_REQ_HANDLER (APPUTIL_HANDLER_BASE+0) #define GET_REQ_HANDLER (APPUTIL_HANDLER_BASE+1) #define GET_REP_HANDLER (APPUTIL_HANDLER_BASE+2) #define PUT_REQ_HANDLER (APPUTIL_HANDLER_BASE+3) #define PUT_REP_HANDLER (APPUTIL_HANDLER_BASE+4) #define READ_REQ_HANDLER (APPUTIL_HANDLER_BASE+5) #define READ_REP_HANDLER (APPUTIL_HANDLER_BASE+6) #define WRITE_REQ_HANDLER (APPUTIL_HANDLER_BASE+7) #define WRITE_REP_HANDLER (APPUTIL_HANDLER_BASE+8) /* ------------------------------------------------------------------------------------ */ /* statistics dump */ /* ------------------------------------------------------------------------------------ */ static int statscalls = 0; static amx_stats_t globalStats; static void stats_request_handler(void *token, void *buf, size_t nbytes, int32_t procnum) { assert(nbytes == sizeof(amx_stats_t)); AM_Safe(AMX_AggregateStatistics(&globalStats, (amx_stats_t *)buf)); statscalls++; } void printGlobalStats(void) { amx_stats_t stats; statscalls = 0; globalStats = AMX_initial_stats; AM_Safe(AMX_SPMDBarrier()); /* make sure we're done sending msgs for now */ { /* problem - we use messages to implement above barrier - * make sure P0 gets all the barrier replies, or above counts won't match up */ int64_t time = getCurrentTimeMicrosec(); while ((int)(getCurrentTimeMicrosec() - time) < 10000) { sleep(0); AM_Safe(AM_Poll(eb)); } } AM_Safe(AMX_GetEndpointStatistics(ep, &stats)); /* get statistics */ AM_Safe(AMX_SPMDBarrier()); /* don't let stats msgs interfere */ assert(sizeof(amx_stats_t) < AM_MaxMedium()); AM_Safe(AM_RequestI1(ep, 0, STATS_REQ_HANDLER, &stats, sizeof(amx_stats_t), AMX_SPMDMyProc())); /* send to zero */ if (AMX_SPMDMyProc() == 0) { uint32_t timeoutusec = 100; while (statscalls < AMX_SPMDNumProcs()) { #if USE_BLOCKING_SPMD_BARRIER AM_Safe(AM_SetEventMask(eb, AM_NOTEMPTY)); AM_Safe(AM_WaitSema(eb)); AM_Safe(AM_Poll(eb)); #else struct timeval tv; tv.tv_sec = timeoutusec / 1000000; tv.tv_usec = timeoutusec % 1000000; select(1, NULL, NULL, NULL, &tv); /* sleep a little while */ AM_Safe(AM_Poll(eb)); if (timeoutusec < 10000) timeoutusec *= 2; #endif } fprintf(stderr, "--------------------------------------------------\n" "Global stats:\n"); AMX_DumpStatistics(stderr, &globalStats, 1); fprintf(stderr, "--------------------------------------------------\n"); fflush(stderr); sleep(1); /* HACK: give a little time for this output to reach master */ } AM_Safe(AMX_SPMDBarrier()); /* just to keep things clean */ } /* ------------------------------------------------------------------------------------ */ #if HAVE_GASNET_TOOLS int64_t getCurrentTimeMicrosec(void) { gasnett_tick_t now = gasnett_ticks_now(); int64_t retval = gasnett_ticks_to_ns(now)/1000; return retval; } #else int64_t getCurrentTimeMicrosec(void) { int64_t retval; struct timeval tv; if (gettimeofday(&tv, NULL)) AMX_FatalErr("gettimeofday failed: %s",strerror(errno)); retval = ((int64_t)tv.tv_sec) * 1000000 + tv.tv_usec; return retval; } #endif /* ------------------------------------------------------------------------------------ */ extern void outputTimerStats(void) { int iters = 10000; int64_t starttime = getCurrentTimeMicrosec(); int64_t lasttime = starttime; int32_t mindiff = 1 << 30; int i; for (i=0; i < iters; i++) { int64_t time = getCurrentTimeMicrosec(); int32_t diff = (int32_t)(time - lasttime); if (diff < mindiff) mindiff = diff; lasttime = time; } { int64_t endtime = getCurrentTimeMicrosec(); double avgtime = ((int32_t)(endtime-starttime))/((double)(iters+1)); double granularity = avgtime - mindiff; fprintf(stdout, "Timer overhead: %f us per call\n" "Timer mindiff: %i us\n" "Timer granularity: +-%f us\n", (float)avgtime, (int)mindiff, (float)granularity); fflush(stdout); } } /* ------------------------------------------------------------------------------------ */ #define MAKEDWORD(hi,lo) ((((uint64_t)(hi)) << 32) | (((uint64_t)(lo)) & 0xFFFFFFFF)) #undef HIWORD /* prevent a conflict on cygwin */ #define HIWORD(arg) ((uint32_t)(((uint64_t)(uintptr_t)(arg)) >> 32)) #undef LOWORD /* prevent a conflict on cygwin */ #define LOWORD(arg) ((uint32_t)((uint64_t)(uintptr_t)(arg) & 0xFFFFFFFF)) /* synchronous gets and puts */ static void get_reply_handler(void *token, int ctrH, int ctrL, int destH, int destL, int val) { uint32_t *pctr = (uint32_t *)(uintptr_t)MAKEDWORD(ctrH,ctrL); uint32_t *pdest = (uint32_t *)(uintptr_t)MAKEDWORD(destH,destL); assert(pctr); assert(pdest); *pdest = (uint32_t)val; *pctr = TRUE; } static void get_request_handler(void *token, int ctrH, int ctrL, int destH, int destL, int addrH, int addrL) { uint32_t *paddr = (uint32_t *)(uintptr_t)MAKEDWORD(addrH,addrL); assert(paddr); AM_Safe(AM_Reply5(token, GET_REP_HANDLER, ctrH, ctrL, destH, destL, *paddr)); } uint32_t getWord(int proc, void *addr) { volatile uint32_t getdone = FALSE; volatile uint32_t getval = 0; AM_Safe(AM_Request6(ep, proc, GET_REQ_HANDLER, HIWORD(&getdone), LOWORD(&getdone), HIWORD(&getval), LOWORD(&getval), HIWORD(addr), LOWORD(addr))); while (!getdone) AM_PollBlock(eb); return getval; } /* ------------------------------------------------------------------------------------ */ static void put_reply_handler(void *token, int ctrH, int ctrL) { uint32_t *pctr = (uint32_t *)(uintptr_t)MAKEDWORD(ctrH,ctrL); assert(pctr); *pctr = TRUE; } static void put_request_handler(void *token, int ctrH, int ctrL, int destH, int destL, int val) { uint32_t *paddr = (uint32_t *)(uintptr_t)MAKEDWORD(destH,destL); assert(paddr); *paddr = (uint32_t)val; AM_Safe(AM_Reply2(token, PUT_REP_HANDLER, ctrH, ctrL)); } void putWord(int proc, void *addr, uint32_t val) { volatile uint32_t putdone = FALSE; AM_Safe(AM_Request5(ep, proc, PUT_REQ_HANDLER, HIWORD(&putdone), LOWORD(&putdone), HIWORD(addr), LOWORD(addr), (int)val)); while (!putdone) AM_PollBlock(eb); return; } /* ------------------------------------------------------------------------------------ */ /* asynchronous reads and writes */ static volatile uint32_t readCtr = 0; static void read_reply_handler(void *token, int ctrH, int ctrL, int destH, int destL, int val) { uint32_t *pctr = (uint32_t *)(uintptr_t)MAKEDWORD(ctrH,ctrL); uint32_t *pdest = (uint32_t *)(uintptr_t)MAKEDWORD(destH,destL); assert(pctr); assert(pdest); *pdest = (uint32_t)val; (*pctr)--; } static void read_request_handler(void *token, int ctrH, int ctrL, int destH, int destL, int addrH, int addrL) { uint32_t *paddr = (uint32_t *)(uintptr_t)MAKEDWORD(addrH,addrL); assert(paddr); AM_Safe(AM_Reply5(token, READ_REP_HANDLER, ctrH, ctrL, destH, destL, *paddr)); } void readWord(void *destaddr, int proc, void *addr) { readCtr++; AM_Safe(AM_Request6(ep, proc, READ_REQ_HANDLER, HIWORD(&readCtr), LOWORD(&readCtr), HIWORD(destaddr), LOWORD(destaddr), HIWORD(addr), LOWORD(addr))); } void readSync(void) { while (readCtr) AM_PollBlock(eb); } /* ------------------------------------------------------------------------------------ */ static volatile uint32_t writeCtr = 0; static void write_reply_handler(void *token, int ctrH, int ctrL) { uint32_t *pctr = (uint32_t *)(uintptr_t)MAKEDWORD(ctrH,ctrL); assert(pctr); (*pctr)--; } static void write_request_handler(void *token, int ctrH, int ctrL, int destH, int destL, int val) { uint32_t *paddr = (uint32_t *)(uintptr_t)MAKEDWORD(destH,destL); assert(paddr); *paddr = (uint32_t)val; AM_Safe(AM_Reply2(token, WRITE_REP_HANDLER, ctrH, ctrL)); } void writeWord(int proc, void *addr, uint32_t val) { writeCtr++; AM_Safe(AM_Request5(ep, proc, WRITE_REQ_HANDLER, HIWORD(&writeCtr), LOWORD(&writeCtr), HIWORD(addr), LOWORD(addr), (int)val)); } void writeSync(void) { while (writeCtr) AM_PollBlock(eb); } /* ------------------------------------------------------------------------------------ */ void free_resource_handler(int sig) { static int first = 1; if (first) { /* Avoid recursion if a fatal signal is raised while exiting */ signal (SIGHUP, SIG_DFL); signal (SIGINT, SIG_DFL); signal (SIGQUIT, SIG_DFL); signal (SIGTERM, SIG_DFL); signal (SIGABRT, SIG_DFL); signal (SIGFPE, SIG_DFL); signal (SIGSEGV, SIG_DFL); signal (SIGBUS, SIG_DFL); switch (sig) { case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS: { /* Signal context may call write(), but not fprintf() */ char digits[] = "0123456789"; char msg[] = "XXXX: Terminating on fatal signal XX\n"; const size_t len = sizeof(msg); /* Includes \n and \0 */ int myproc = AMX_SPMDMyProc(); static int ignoreerr; msg[0] = (myproc < 1000) ? ' ' : digits[(myproc / 1000) % 10]; msg[1] = (myproc < 100 ) ? ' ' : digits[(myproc / 100 ) % 10]; msg[2] = (myproc < 10 ) ? ' ' : digits[(myproc / 10 ) % 10]; msg[3] = digits[(myproc ) % 10]; msg[len-3] = digits[sig % 10]; msg[len-4] = (sig < 10) ? ' ' : digits[sig / 10]; ignoreerr += write(STDERR_FILENO, msg, len - 1); } } first = 0; } sleep(2); AMX_SPMDExit(-1); } /* ------------------------------------------------------------------------------------ */ void setupUtilHandlers(ep_t activeep, eb_t activeeb) { assert(activeep && activeeb); ep = activeep; eb = activeeb; AM_Safe(AM_SetHandler(ep, STATS_REQ_HANDLER, (amx_handler_fn_t)stats_request_handler)); AM_Safe(AM_SetHandler(ep, GET_REQ_HANDLER, (amx_handler_fn_t)get_request_handler)); AM_Safe(AM_SetHandler(ep, GET_REP_HANDLER, (amx_handler_fn_t)get_reply_handler)); AM_Safe(AM_SetHandler(ep, PUT_REQ_HANDLER, (amx_handler_fn_t)put_request_handler)); AM_Safe(AM_SetHandler(ep, PUT_REP_HANDLER, (amx_handler_fn_t)put_reply_handler)); AM_Safe(AM_SetHandler(ep, READ_REQ_HANDLER, (amx_handler_fn_t)read_request_handler)); AM_Safe(AM_SetHandler(ep, READ_REP_HANDLER, (amx_handler_fn_t)read_reply_handler)); AM_Safe(AM_SetHandler(ep, WRITE_REQ_HANDLER, (amx_handler_fn_t)write_request_handler)); AM_Safe(AM_SetHandler(ep, WRITE_REP_HANDLER, (amx_handler_fn_t)write_reply_handler)); /* some MPI implementations don't cleanup well and leave orphaned nodes * if we allow a node to crash without shutting down properly */ signal (SIGHUP, free_resource_handler); signal (SIGINT, free_resource_handler); signal (SIGQUIT, free_resource_handler); signal (SIGTERM, free_resource_handler); signal (SIGABRT, free_resource_handler); signal (SIGFPE, free_resource_handler); signal (SIGSEGV, free_resource_handler); signal (SIGBUS, free_resource_handler); } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/amx/testbulk.c0000664000175000017500000001142615142313673017335 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/other/amx/testbulk.c $ * Description: AMX test * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #include "apputils.h" #define BULK_REQ_HANDLER 1 #define BULK_REP_HANDLER 2 int myproc; int numprocs; int size = -1; int msg_size = 0; int nummsgs = 0; int done = 0; uint32_t *VMseg; static void bulk_request_handler(void *token, void *buf, size_t nbytes, int arg) { #if DEBUG uint32_t *recvdbuf = (uint32_t *)buf; #endif #if VERBOSE printf("%i: bulk_request_handler(). starting...\n", myproc); fflush(stdout); #endif assert(arg == 666); assert(nbytes == size % AM_MaxLong() || nbytes == AM_MaxLong()); assert(buf == ((uint8_t *)VMseg) + 100); /* assert(done < 2*nummsgs); */ #if DEBUG /* verify the result */ { int i; for (i = 0; i < nbytes/4; i++) { if (recvdbuf[i] != (uint32_t)i) AMX_FatalErr("%i: ERROR: mismatched data recvdbuf[%i]=%i\n", myproc, i, (int)recvdbuf[i]); } } #endif #if VERBOSE printf("%i: bulk_request_handler(). sending reply...\n", myproc); fflush(stdout); #endif AM_Safe(AM_Reply0(token, BULK_REP_HANDLER)); done++; } static void bulk_reply_handler(void *token, int ctr, int dest, int val) { /* assert(done < 2*nummsgs); */ #if VERBOSE printf("%i: bulk_reply_handler()\n", myproc); fflush(stdout); #endif done++; } int main(int argc, char **argv) { eb_t eb; ep_t ep; uint64_t networkpid; int64_t begin, end, total; int polling = 1; int fullduplex = 0; int rightguy; uint32_t *srcmem; int iters = 0; TEST_STARTUP(argc, argv, networkpid, eb, ep, 1, 4, "iters (bulkmsgsize) (Poll/Block) (Half/Full)"); /* setup handlers */ AM_Safe(AM_SetHandler(ep, BULK_REQ_HANDLER, bulk_request_handler)); AM_Safe(AM_SetHandler(ep, BULK_REP_HANDLER, bulk_reply_handler)); setupUtilHandlers(ep, eb); /* get SPMD info */ myproc = AMX_SPMDMyProc(); numprocs = AMX_SPMDNumProcs(); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 1; if (argc > 2) size = atoi(argv[2]); if (size == -1) size = 512; if (argc > 3) { switch(argv[3][0]) { case 'p': case 'P': polling = 1; break; case 'b': case 'B': polling = 0; break; default: printf("polling must be 'P' or 'B'..\n"); AMX_SPMDExit(1); } } if (argc > 4) { switch(argv[4][0]) { case 'h': case 'H': fullduplex = 0; break; case 'f': case 'F': fullduplex = 1; break; default: printf("duplex must be H or F..\n"); AMX_SPMDExit(1); } } if (!fullduplex && numprocs > 1 && numprocs % 2 != 0) { printf("half duplex requires an even number of processors\n"); AMX_SPMDExit(1); } msg_size = (size > AM_MaxLong() ? AM_MaxLong() : size); nummsgs = (size % AM_MaxLong() == 0 ? size / AM_MaxLong() : (size / AM_MaxLong())+1); srcmem = (uint32_t *)malloc(msg_size); memset(srcmem, 0, msg_size); VMseg = (uint32_t *)malloc(msg_size+100); memset(VMseg, 0, msg_size+100); AM_Safe(AM_SetSeg(ep, VMseg, msg_size+100)); rightguy = (myproc + 1) % numprocs; { /* init my source mem */ int i; int numints = msg_size/4; for (i=0; i < numints; i++) srcmem[i] = i; } AM_Safe(AMX_SPMDBarrier()); if (myproc == 0) printf("Running %s bulk test sz=%i...\n", (fullduplex?"full-duplex":"half-duplex"), size); begin = getCurrentTimeMicrosec(); if (fullduplex || myproc % 2 == 1 || numprocs == 1) { int q; for (q=0; q * Terms of use are as specified in license.txt */ #include "apputils.h" #define REDUCE_HANDLER 1 int total = 0; int numcalls = 0; void reduce_request_handler(void *token, int val) { printf("reduce_request_handler got: %i\n", val); total += val; numcalls++; } int main(int argc, char **argv) { eb_t eb; ep_t ep; uint64_t networkpid; int myproc; int numprocs; TEST_STARTUP(argc, argv, networkpid, eb, ep, 0, 0, ""); /* setup handlers */ AM_Safe(AM_SetHandler(ep, REDUCE_HANDLER, reduce_request_handler)); setupUtilHandlers(ep, eb); /* barrier */ AM_Safe(AMX_SPMDBarrier()); /* get SPMD info */ myproc = AMX_SPMDMyProc(); numprocs = AMX_SPMDNumProcs(); /* compute */ AM_Safe(AM_Request1(ep, 0, REDUCE_HANDLER, myproc)); if (myproc == 0) { while (numcalls < numprocs) { #if 0 /* poll-sleep */ AM_Safe(AM_Poll(eb)); sleep(1); #else /* poll-block */ AM_Safe(AM_SetEventMask(eb, AM_NOTEMPTY)); AM_Safe(AM_WaitSema(eb)); AM_Safe(AM_Poll(eb)); #endif printf("."); } printf("Reduction result: %i\n",total); { /* verify result */ int i, correcttotal=0; for (i = 0; i < numprocs; i++) correcttotal += i; if (total == correcttotal) printf("Result verified!\n"); else printf("ERROR!!! Result incorrect! total=%i correcttotal=%i\n", total, correcttotal); } } /* barrier */ AM_Safe(AMX_SPMDBarrier()); printGlobalStats(); AM_Safe(AMX_SPMDBarrier()); /* exit */ AM_Safe(AMX_SPMDExit(0)); return 0; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/other/tools-toggle.pl0000664000175000017500000000204215142313673017515 0ustar alastairalastair#!/usr/bin/env perl require 5.005; use strict; my $toolsonly; if ($ARGV[0] eq "-y") { $toolsonly = 1; } elsif ($ARGV[0] eq "-n") { $toolsonly = 0; } else { die "Usage: $0 [-y|-n] files...\n"; } shift; my $insec=0; my $show=0; my $cc; while (@ARGV) { my $filename = $ARGV[0]; print " + Processing $filename...\n"; open(FIN, "<$filename"); open(FOUT, ">$filename.tmp"); while (defined(my $line = )) { if ($line =~ m/^(.+)GASNET_TOOLSONLY_(TRUE|FALSE)_BEGIN/) { $cc = $1; $show = ($2 eq ($toolsonly?"TRUE":"FALSE")); $insec = 1; } elsif ($line =~ m/GASNET_TOOLSONLY_(TRUE|FALSE)_END/) { $insec = 0; } elsif ($insec) { if ($show) { $line =~ s/^(?:$cc)*(.*)$/$1/; } else { $line =~ s/^(?:$cc)*(.*)$/$cc$1/; } } print FOUT $line; } close(FIN); close(FOUT); rename("$filename.tmp", $filename); shift; } gasnet-2025.8.0/other/fragment-head.mak.in0000664000175000017500000000666215142313673020356 0ustar alastairalastair# Description: Makefile fragment for #conduit_name#-conduit, GASNET_#THREAD_MODEL# mode # #AUTOGEN# # @configure_input@ # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt # ---------------------------------------------------------------------- # GASNet client usage instructions: # # Clients should include this file in their Makefile, using: (no leading '#') # include ###INSTALL_INCLUDE###/#conduit_name#-conduit/#conduit_name#-#thread_model#.mak # or alternatively, just: # include #conduit_name#-#thread_model#.mak # and use a -I###INSTALL_INCLUDE###/#conduit_name#-conduit # command-line option when invoking make # # Then in the Makefile, use a compile line something like one of these: # $(GASNET_CC) $(GASNET_CPPFLAGS) $(GASNET_CFLAGS) -c myfile.c # $(GASNET_CXX) $(GASNET_CXXCPPFLAGS) $(GASNET_CXXFLAGS) -c myfile.cxx # # and a link line something like this: # $(GASNET_LD) $(GASNET_LDFLAGS) -o myfile myfile.o $(GASNET_LIBS) # # For GASNet clients who need finer-grained control over compiler options, # GASNET_CFLAGS is an alias for: # $(GASNET_OPT_CFLAGS) $(GASNET_MISC_CFLAGS) # GASNET_CPPFLAGS is an alias for: # $(GASNET_MISC_CPPFLAGS) $(GASNET_DEFINES) $(GASNET_INCLUDES) # GASNET_CXXFLAGS is an alias for: # $(GASNET_OPT_CXXFLAGS) $(GASNET_MISC_CXXFLAGS) # GASNET_CXXCPPFLAGS is an alias for: # $(GASNET_MISC_CXXCPPFLAGS) $(GASNET_DEFINES) $(GASNET_INCLUDES) # and those finer-grained variables can be used rather than the convenience aliases # # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- # GASNet conduit-writer instructions: # # Most conduit-specific tweaks for these fragments can be accomplished # by setting specially-named variables in your conduit.mak file: # # * Variables of the form CONDUIT_WHATEVER will be added to the GASNET_WHATEVER # variable in the fragment. # # * Variables of the form CONDUIT_WHATEVER_ (where is SEQ, PAR or PARSYNC) # will be added to the GASNET_WHATEVER variable for the fragment only. # # * Settings which are contingent on whether the fragment is being used # within the build tree or from an installed copy should be controlled using # the standard ###NO INSTALL### marker (without the internal space) # # * In the rare cases where a conduit needs to completely replace the # default value for a GASNET_WHATEVER variable (rather than simply adding # to it), this can be accomplished by setting one of the GASNET_WHATEVER_OVERRIDE # variables in the conduit.mak file. Note this is only supported for the # overridable variables listed below, and should only be used as a last resort # because it clobbers the default values established by configure and # complicates GASNet framework maintenance. # # ---------------------------------------------------------------------- GASNET_PREFIX = ###INSTALL_PREFIX### # ---------------------------------------------------------------------- # conduit-overridable variables GASNET_LD_OVERRIDE = @CC@ GASNET_LDFLAGS_OVERRIDE = @CFLAGS@ @LDFLAGS@ # NOTE: conduits setting GASNET_LD(FLAGS)_OVERRIDE should ALSO set corresponding # GASNET_LD_REQUIRES_* feature flags, for consumption by clients who # do not or cannot directly consume GASNET_LD. # ---------------------------------------------------------------------- # #conduit_name#-conduit/conduit.mak settings gasnet-2025.8.0/other/mpirun_common.in0000664000175000017500000000071215142313673017755 0ustar alastairalastair# BEGIN code common to spawners that may invoke gasnetrun_mpi.pl MPIRUN_CMD="${MPIRUN_CMD:-@MPIRUN_CMD@}" export MPIRUN_CMD PMIRUN_CMD="${PMIRUN_CMD:-@PMIRUN_CMD@}" export PMIRUN_CMD GASNET_PLATFORM="${GASNET_PLATFORM:-@GASNET_PLATFORM@}" export GASNET_PLATFORM GASNET_PSHM_ENABLED=@GASNET_PSHM_ENABLED@ export GASNET_PSHM_ENABLED GASNET_ENVCMD="${GASNET_ENVCMD:-@ENVCMD@}" export GASNET_ENVCMD # END code common to spawners that may invoke gasnetrun_mpi.pl gasnet-2025.8.0/other/pkgconfig-conduit.pc0000664000175000017500000000103215142313673020475 0ustar alastairalastairGASNET_CFLAGS = ${GASNET_OPT_CFLAGS} ${GASNET_MISC_CFLAGS} GASNET_CPPFLAGS = ${GASNET_MISC_CPPFLAGS} ${GASNET_DEFINES} ${GASNET_INCLUDES} GASNET_CXXFLAGS = ${GASNET_OPT_CXXFLAGS} ${GASNET_MISC_CXXFLAGS} GASNET_CXXCPPFLAGS = ${GASNET_MISC_CXXCPPFLAGS} ${GASNET_DEFINES} ${GASNET_INCLUDES} Name: gasnet-#conduit_name#-#thread_model# Description: GASNet #conduit_name#-conduit in #thread_model# threading mode URL: https://gasnet.lbl.gov Version: #version# Cflags: ${GASNET_CPPFLAGS} ${GASNET_CFLAGS} Libs: ${GASNET_LDFLAGS} ${GASNET_LIBS} gasnet-2025.8.0/gasnetex.h0000664000175000017500000013743115142313673015422 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnetex.h $ * Description: GASNet Header * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _GASNETEX_H #define _GASNETEX_H #define _IN_GASNETEX_H #define _INCLUDED_GASNETEX_H #ifdef _INCLUDED_GASNET_TOOLS_H #error Objects that use both GASNet-EX and GASNet tools must \ include gasnetex.h before gasnet_tools.h #endif #if defined(_INCLUDED_GASNET_INTERNAL_H) && !defined(_IN_GASNET_INTERNAL_H) #error Internal GASNet code should not directly include gasnetex.h, just gasnet_internal.h #endif #ifdef __cplusplus extern "C" { // cannot use GASNETI_BEGIN_EXTERNC here due to a header dependency cycle #endif /* Usage: see the GASNet specification and top-level README for details on how to use the GASNet interface clients should use the automatically-generated Makefile *.mak fragments to get the correct compile settings */ /* autoconf-generated configuration header */ #include /* public spec version numbers */ #define GEX_SPEC_VERSION_MAJOR GASNETI_EX_SPEC_VERSION_MAJOR #define GEX_SPEC_VERSION_MINOR GASNETI_EX_SPEC_VERSION_MINOR /* ------------------------------------------------------------------------------------ */ /* check threading configuration */ #if defined(GASNET_SEQ) && !defined(GASNET_PARSYNC) && !defined(GASNET_PAR) #undef GASNET_SEQ #define GASNET_SEQ 1 #define GASNETI_THREAD_MODEL SEQ #elif !defined(GASNET_SEQ) && defined(GASNET_PARSYNC) && !defined(GASNET_PAR) #undef GASNET_PARSYNC #define GASNET_PARSYNC 1 #define GASNETI_THREAD_MODEL PARSYNC #elif !defined(GASNET_SEQ) && !defined(GASNET_PARSYNC) && defined(GASNET_PAR) #undef GASNET_PAR #define GASNET_PAR 1 #define GASNETI_THREAD_MODEL PAR #else #error Client code must #define exactly one of (GASNET_PAR, GASNET_PARSYNC, GASNET_SEQ) before #including gasnetex.h #endif /* GASNETI_CLIENT_THREADS = GASNet client has multiple application threads */ #if GASNET_PAR || GASNET_PARSYNC #define GASNETI_CLIENT_THREADS 1 #elif defined(GASNETI_CLIENT_THREADS) #error bad defn of GASNETI_CLIENT_THREADS #endif #if !((defined(GASNET_DEBUG) && !defined(GASNET_NDEBUG)) || (!defined(GASNET_DEBUG) && defined(GASNET_NDEBUG))) #error Conflicting or incorrect definitions of GASNET_DEBUG and GASNET_NDEBUG #endif /* codify other configuration settings */ #ifdef GASNET_DEBUG #undef GASNET_DEBUG #define GASNET_DEBUG 1 #define GASNETI_DEBUG_P 1 #define GASNETI_DEBUG_CONFIG debug #else #define GASNETI_DEBUG_P 0 #define GASNETI_DEBUG_CONFIG nodebug #endif #ifdef GASNET_TRACE #undef GASNET_TRACE #define GASNET_TRACE 1 #define GASNETI_TRACE_CONFIG trace #else #define GASNETI_TRACE_CONFIG notrace #endif #ifdef GASNET_STATS #undef GASNET_STATS #define GASNET_STATS 1 #define GASNETI_STATS_CONFIG stats #else #define GASNETI_STATS_CONFIG nostats #endif #ifdef GASNET_DEBUGMALLOC #undef GASNET_DEBUGMALLOC #define GASNET_DEBUGMALLOC 1 #define GASNETI_MALLOC_CONFIG debugmalloc #else #define GASNETI_MALLOC_CONFIG nodebugmalloc #endif #if defined(GASNET_SRCLINES) || defined(GASNET_DEBUG) #define GASNETI_SRCLINES_FORCE #endif #if defined(GASNET_SRCLINES) || defined(GASNET_TRACE) #undef GASNET_SRCLINES #define GASNET_SRCLINES 1 #define GASNETI_SRCLINES_CONFIG srclines #else #define GASNETI_SRCLINES_CONFIG nosrclines #endif #if defined(GASNET_STATS) || defined(GASNET_TRACE) #define GASNETI_STATS_OR_TRACE 1 #elif defined(GASNETI_STATS_OR_TRACE) #error bad def of GASNETI_STATS_OR_TRACE #endif /* basic utilities used in the headers */ #include GASNETI_BEGIN_NOWARN /* ------------------------------------------------------------------------------------ */ /* check segment configuration */ #if defined(GASNET_SEGMENT_FAST) && !defined(GASNET_SEGMENT_LARGE) && !defined(GASNET_SEGMENT_EVERYTHING) #undef GASNET_SEGMENT_FAST #define GASNET_SEGMENT_FAST 1 #define GASNETI_SEGMENT_CONFIG FAST #elif !defined(GASNET_SEGMENT_FAST) && defined(GASNET_SEGMENT_LARGE) && !defined(GASNET_SEGMENT_EVERYTHING) #undef GASNET_SEGMENT_LARGE #define GASNET_SEGMENT_LARGE 1 #define GASNETI_SEGMENT_CONFIG LARGE #elif !defined(GASNET_SEGMENT_FAST) && !defined(GASNET_SEGMENT_LARGE) && defined(GASNET_SEGMENT_EVERYTHING) #undef GASNET_SEGMENT_EVERYTHING #define GASNET_SEGMENT_EVERYTHING 1 #define GASNETI_SEGMENT_CONFIG EVERYTHING #else #error Segment configuration must be exactly one of (GASNET_SEGMENT_FAST, GASNET_SEGMENT_LARGE, GASNET_SEGMENT_EVERYTHING) #endif /* Too early to know if conduit supports PSHM, so safety check below uses this instead. */ #if defined(GASNETI_PSHM_ENABLED) #define GASNETI_PSHM_CONFIG_ENABLED pshm #else #define GASNETI_PSHM_CONFIG_ENABLED nopshm #endif /* additional safety check, in case a very smart linker removes all of the checks at the end of this file */ #define gasnetc_Client_Init _CONCAT(_CONCAT(_CONCAT(_CONCAT(_CONCAT(_CONCAT(_CONCAT(_CONCAT(_CONCAT(_CONCAT(_CONCAT( \ gex_Client_Init_GASNET_, \ GASNET_RELEASE_VERSION_MAJOR), \ GASNET_RELEASE_VERSION_MINOR), \ GASNET_RELEASE_VERSION_PATCH), \ GASNETI_THREAD_MODEL), \ GASNETI_PSHM_CONFIG_ENABLED), \ GASNETI_SEGMENT_CONFIG), \ GASNETI_DEBUG_CONFIG), \ GASNETI_TRACE_CONFIG), \ GASNETI_STATS_CONFIG), \ GASNETI_MALLOC_CONFIG), \ GASNETI_SRCLINES_CONFIG) #define gex_Client_Init gasnetc_Client_Init /* ------------------------------------------------------------------------------------ */ // Default (read-only) shared-memory MaxMedium value "recommended" to conduits. // Value of GASNETC_MAX_MEDIUM_NBRHD determines the actual maximum. // See template-conduit/gasnet_core.h for more info. #if !GASNETI_PSHM_ENABLED #define GASNETC_MAX_MEDIUM_NBRHD_DFLT 65536 #elif PLATFORM_ARCH_64 #define GASNETC_MAX_MEDIUM_NBRHD_DFLT 65416 #else #define GASNETC_MAX_MEDIUM_NBRHD_DFLT 65436 #endif /* ------------------------------------------------------------------------------------ */ /* GASNet forward definitions, which may override some of the defaults below */ #include #include #include #include #include /* GASNET_PSHM = GASNet conduit is using PSHM */ #ifdef GASNET_PSHM #undef GASNET_PSHM #define GASNET_PSHM 1 #define GASNETI_PSHM_P 1 #else #define GASNETI_PSHM_P 0 #endif // GASNET_RCV_THREAD = conduit is built with support for a "receive progress thread" #ifdef GASNET_RCV_THREAD #undef GASNET_RCV_THREAD #define GASNET_RCV_THREAD 1 #endif // GASNET_SND_THREAD = conduit is built with support for a "send progress thread" #ifdef GASNET_SND_THREAD #undef GASNET_SND_THREAD #define GASNET_SND_THREAD 1 #endif /* GASNETI_CONDUIT_THREADS = GASNet conduit has one or more private threads which may be used to run conduit and/or client code */ #if defined(GASNETI_CONDUIT_THREADS) && (GASNETI_CONDUIT_THREADS != 1) #error bad defn of GASNETI_CONDUIT_THREADS #endif // GASNET_HIDDEN_AM_CONCURRENCY_LEVEL: non-zero iff the conduit *may* run AM // handlers on a thread not owned by the client. // // gex_System_QueryHiddenAMConcurrencyLevel(): more precise query at runtime // which can consider things like the environment or library/hardware // capabilities. #ifdef GASNET_HIDDEN_AM_CONCURRENCY_LEVEL // Trust conduit's definitions of macro and function extern int gex_System_QueryHiddenAMConcurrencyLevel(void); #elif GASNETI_CONDUIT_THREADS #define GASNET_HIDDEN_AM_CONCURRENCY_LEVEL 1 #define gex_System_QueryHiddenAMConcurrencyLevel() 1 #else #define GASNET_HIDDEN_AM_CONCURRENCY_LEVEL 0 #define gex_System_QueryHiddenAMConcurrencyLevel() 0 #endif /* GASNETI_THREADS = Threads exist at conduit and/or client level, and/or compiling for a tools-only client with thread-safety */ #if GASNETI_CLIENT_THREADS || GASNETI_CONDUIT_THREADS #define GASNETI_THREADS 1 #define _GASNETI_PARSEQ _PAR #elif defined(GASNETI_THREADS) #error bad defn of GASNETI_THREADS #else #define _GASNETI_PARSEQ _SEQ #endif /* basic utilities used in the headers, which may require GASNETI_THREADS */ #include /* GASNet memory barriers */ #include /* GASNet atomic memory operations */ #include /* ------------------------------------------------------------------------------------ */ /* constants */ /* selected constants and simple types */ #include #ifndef GASNETC_HANDLER_BASE #define GASNETC_HANDLER_BASE 1 #endif #ifndef GASNETE_HANDLER_BASE #define GASNETE_HANDLER_BASE 64 #endif #ifndef GASNETI_CLIENT_HANDLER_BASE #define GASNETI_CLIENT_HANDLER_BASE 128 #endif #ifndef GASNETC_MAX_NUMHANDLERS #define GASNETC_MAX_NUMHANDLERS 256 #endif #define GEX_AM_INDEX_BASE GASNETI_CLIENT_HANDLER_BASE #ifndef GASNET_MAXNODES /* an integer representing the maximum number of nodes supported in a single GASNet job */ #define GASNET_MAXNODES (0x7FFFFFFFu) #endif #ifndef GASNET_MAXEPS // an integer representing the max supported number of endpoints per process // should be kept _STRINGIFY()-friendly (e.g. `4095` not `((1<<12)-1)`) // Defaults and sanity checks #define GASNETI_MAXEPS_LIMIT 4096 // Maximum due to 12-bit field in TM-pair #ifndef GASNETC_MAXEPS_MAX #define GASNETC_MAXEPS_MAX GASNETI_MAXEPS_LIMIT #elif (GASNETC_MAXEPS_MAX > GASNETI_MAXEPS_LIMIT) #error GASNETC_MAXEPS_MAX exceeds GASNETI_MAXEPS_LIMIT #endif #if (GASNETC_MAXEPS_DFLT > GASNETI_MAXEPS_LIMIT) #error GASNETC_MAXEPS_DFLT exceeds GASNETI_MAXEPS_LIMIT #endif #if !defined(GASNETC_MAXEPS_DFLT) // Conduit lacks multi-ep support #define GASNET_MAXEPS 1 #elif !defined(GASNETI_MAXEPS_CONFIGURE) // No configure-time value provided - use conduit-specific default #define GASNET_MAXEPS GASNETC_MAXEPS_DFLT #else // Take MIN of user's --with-maxeps setting and the maximum #if (GASNETI_MAXEPS_CONFIGURE <= GASNETC_MAXEPS_MAX) #define GASNET_MAXEPS GASNETI_MAXEPS_CONFIGURE #else #define GASNET_MAXEPS GASNETC_MAXEPS_MAX #endif #endif #endif #if !defined(GASNET_ALIGNED_SEGMENTS) || \ (defined(GASNET_ALIGNED_SEGMENTS) && GASNET_ALIGNED_SEGMENTS != 0 && GASNET_ALIGNED_SEGMENTS != 1) /* defined to be 1 if gasnet_init guarantees that the remote-access memory segment will be aligned */ /* at the same virtual address on all nodes. defined to 0 otherwise */ #error GASNet core failed to define GASNET_ALIGNED_SEGMENTS to 0 or 1 #endif #if GASNET_ALIGNED_SEGMENTS #define GASNETI_ALIGN_CONFIG align #else #define GASNETI_ALIGN_CONFIG noalign #endif #if GASNET_PSHM #define GASNETI_PSHM_CONFIG pshm #else #define GASNETI_PSHM_CONFIG nopshm #endif #ifndef GASNET_BARRIERFLAG_ANONYMOUS /* barrier flags */ #define GASNET_BARRIERFLAG_ANONYMOUS 1 #define GASNET_BARRIERFLAG_MISMATCH 2 /* UNNAMED includes ANONYMOUS to yield a trivial default implementation: */ #define GASNETE_BARRIERFLAG_UNNAMED 8 #define GASNET_BARRIERFLAG_UNNAMED (GASNET_BARRIERFLAG_ANONYMOUS|GASNETE_BARRIERFLAG_UNNAMED) /* reserve bits for use by conduit-specific implementations */ #define GASNETE_BARRIERFLAG_CONDUIT0 0x80000000 #define GASNETE_BARRIERFLAG_CONDUIT1 0x40000000 #endif /* Errors: GASNET_OK must be zero */ #define GASNET_OK 0 #ifndef _GASNET_ERRORS #define _GASNET_ERRORS #define _GASNET_ERR_BASE 10000 #define GASNET_ERR_NOT_INIT (_GASNET_ERR_BASE+1) #define GASNET_ERR_RESOURCE (_GASNET_ERR_BASE+2) #define GASNET_ERR_BAD_ARG (_GASNET_ERR_BASE+3) #define GASNET_ERR_NOT_READY (_GASNET_ERR_BASE+4) #define GASNET_ERR_BARRIER_MISMATCH (_GASNET_ERR_BASE+5) #endif extern const char *gasnet_ErrorName(int); extern const char *gasnet_ErrorDesc(int); /* ------------------------------------------------------------------------------------ */ // feature macros // GASNET_SUPPORTS_AM_CANCEL // Value indicates revision date of the gex_AM_Cancel() API // // History: // 20240418 - Initial revison #define GASNET_SUPPORTS_AM_CANCEL 20240418L // GASNET_SUPPORTS_AM_COMMIT_V2 // Value indicates revision date of the gex_AM_Commit*_v2() APIs // // History: // 20240906 - Initial revison #define GASNET_SUPPORTS_AM_COMMIT_V2 20240906L /* ------------------------------------------------------------------------------------ */ /* core types */ // TODO-EX: need comments here? typedef uint8_t gex_AM_Index_t; typedef int32_t gex_AM_Arg_t; /* an opaque type passed to core API handlers which may be used to query message information */ struct gasneti_token_s; typedef struct gasneti_token_s *gex_Token_t; struct gasneti_team_member_s; typedef struct gasneti_team_member_s *gex_TM_t; #define GEX_TM_INVALID ((gex_TM_t)(uintptr_t)0) struct gasneti_client_s; typedef struct gasneti_client_s *gex_Client_t; #define GEX_CLIENT_INVALID ((gex_Client_t)(uintptr_t)0) struct gasneti_endpoint_s; typedef struct gasneti_endpoint_s *gex_EP_t; #define GEX_EP_INVALID ((gex_EP_t)(uintptr_t)0) struct gasneti_segment_s; typedef struct gasneti_segment_s *gex_Segment_t; #define GEX_SEGMENT_INVALID ((gex_Segment_t)(uintptr_t)0) struct gasneti_memkind_s; typedef struct gasneti_memkind_s *gex_MK_t; #define GEX_MK_INVALID ((gex_MK_t)(uintptr_t)0) #define GEX_MK_HOST ((gex_MK_t)(uintptr_t)1) typedef void (*gex_AM_Fn_t)(); /* struct type used to perform handler registration */ typedef struct { gex_AM_Index_t gex_index; // 0 on input == don't care gex_AM_Fn_t gex_fnptr; gex_Flags_t gex_flags; unsigned int gex_nargs; // Optional fields (both are "shallow copy") const void *gex_cdata; // Available to handler const char *gex_name; // Used in debug messages } gex_AM_Entry_t; #if GASNET_DEBUG #define GASNETI_OBJECT_HEADER_DEBUG gasneti_magic_t _magic; #else #define GASNETI_OBJECT_HEADER_DEBUG #endif #define GASNETI_OBJECT_HEADER \ GASNETI_OBJECT_HEADER_DEBUG \ const void * _cdata; \ gex_Flags_t _flags; // Needed to break client/tm0 and client/ep_tbl cycles struct gasneti_team_member_internal_s; struct gasneti_endpoint_internal_s; #ifndef _GEX_CLIENT_T #define GASNETI_CLIENT_COMMON \ GASNETI_OBJECT_HEADER \ struct gasneti_team_member_internal_s *_tm0; \ const char * _name; \ gasneti_weakatomic32_t _next_ep_index; \ struct gasneti_endpoint_internal_s *_ep_tbl[GASNET_MAXEPS]; typedef struct { GASNETI_CLIENT_COMMON } *gasneti_Client_t; #if GASNET_DEBUG extern gasneti_Client_t gasneti_import_client(gex_Client_t _client); extern gasneti_Client_t gasneti_import_client_valid(gex_Client_t _client); extern gex_Client_t gasneti_export_client(gasneti_Client_t _real_client); #else #define gasneti_import_client(x) ((gasneti_Client_t)(x)) #define gasneti_import_client_valid gasneti_import_client #define gasneti_export_client(x) ((gex_Client_t)(x)) #endif #define gex_Client_SetCData(client,val) ((void)(gasneti_import_client_valid(client)->_cdata = (val))) #define gex_Client_QueryCData(client) ((void*)gasneti_import_client_valid(client)->_cdata) #define gex_Client_QueryFlags(client) ((gex_Flags_t)gasneti_import_client_valid(client)->_flags) #define gex_Client_QueryName(client) ((const char*)gasneti_import_client_valid(client)->_name) #endif #ifndef _GEX_SEGMENT_T #define GASNETI_SEGMENT_COMMON \ GASNETI_OBJECT_HEADER \ gasneti_Client_t _client; \ void * _addr; \ void * _ub; \ uintptr_t _size; \ gex_MK_t _kind; \ void * _opaque_mk_use; \ unsigned int _opaque_container_use; \ int _client_allocated; typedef struct { GASNETI_SEGMENT_COMMON } *gasneti_Segment_t; #if GASNET_DEBUG extern gasneti_Segment_t gasneti_import_segment(gex_Segment_t _segment); extern gasneti_Segment_t gasneti_import_segment_valid(gex_Segment_t _segment); extern gex_Segment_t gasneti_export_segment(gasneti_Segment_t _real_segment); #else #define gasneti_import_segment(x) ((gasneti_Segment_t)(x)) #define gasneti_import_segment_valid gasneti_import_segment #define gasneti_export_segment(x) ((gex_Segment_t)(x)) #endif #define gex_Segment_SetCData(seg,val) ((void)(gasneti_import_segment_valid(seg)->_cdata = (val))) #define gex_Segment_QueryCData(seg) ((void*)gasneti_import_segment_valid(seg)->_cdata) #define gex_Segment_QueryClient(seg) gasneti_export_client(gasneti_import_segment_valid(seg)->_client) #define gex_Segment_QueryFlags(seg) ((gex_Flags_t)gasneti_import_segment_valid(seg)->_flags) #define gex_Segment_QueryAddr(seg) ((void*)gasneti_import_segment_valid(seg)->_addr) #define gex_Segment_QuerySize(seg) ((uintptr_t)gasneti_import_segment_valid(seg)->_size) #endif #ifndef _GEX_EP_T #define GASNETI_EP_COMMON \ GASNETI_OBJECT_HEADER \ gasneti_Client_t _client; \ gasneti_Segment_t _segment; \ gex_EP_Capabilities_t _caps, _orig_caps; \ gex_Rank_t _index; \ gex_AM_Entry_t _amtbl[GASNETC_MAX_NUMHANDLERS]; \ gasneti_mutex_t _amtbl_lock; #ifdef __cplusplus // ensure this struct is anonymous to prevent C++ linkage issues #define gasneti_endpoint_internal_s #endif typedef struct gasneti_endpoint_internal_s { GASNETI_EP_COMMON } *gasneti_EP_t; #if GASNET_DEBUG extern gasneti_EP_t gasneti_import_ep(gex_EP_t _ep); extern gasneti_EP_t gasneti_import_ep_valid(gex_EP_t _ep); extern gex_EP_t gasneti_export_ep(gasneti_EP_t _real_ep); #else #define gasneti_import_ep(x) ((gasneti_EP_t)(x)) #define gasneti_import_ep_valid gasneti_import_ep #define gasneti_export_ep(x) ((gex_EP_t)(x)) #endif #define gex_EP_SetCData(ep,val) ((void)(gasneti_import_ep_valid(ep)->_cdata = (val))) #define gex_EP_QueryCData(ep) ((void*)gasneti_import_ep_valid(ep)->_cdata) #define gex_EP_QueryClient(ep) gasneti_export_client(gasneti_import_ep_valid(ep)->_client) #define gex_EP_QueryFlags(ep) ((gex_Flags_t)gasneti_import_ep_valid(ep)->_flags) #define gex_EP_QuerySegment(ep) gasneti_export_segment(gasneti_import_ep_valid(ep)->_segment) #define gex_EP_QueryIndex(ep) ((gex_EP_Index_t)gasneti_import_ep_valid(ep)->_index) #endif #ifndef _GEX_TM_T #define GASNETI_TM_COMMON \ GASNETI_OBJECT_HEADER \ gasneti_EP_t _ep; \ gex_Rank_t _rank; \ gex_Rank_t _size; \ void * _coll_team; \ gex_Rank_t * _rank_map; \ gex_EP_Index_t * _index_map; #ifdef __cplusplus // ensure this struct is anonymous to prevent C++ linkage issues #define gasneti_team_member_internal_s #endif typedef struct gasneti_team_member_internal_s { GASNETI_TM_COMMON } *gasneti_TM_t; #if GASNET_DEBUG extern gasneti_TM_t gasneti_import_tm(gex_TM_t _tm); extern gasneti_TM_t gasneti_import_tm_nonpair(gex_TM_t _tm); extern gex_TM_t gasneti_export_tm(gasneti_TM_t _real_tm); #else #define gasneti_import_tm(x) ((gasneti_TM_t)(x)) #define gasneti_import_tm_nonpair(x) ((gasneti_TM_t)(x)) #define gasneti_export_tm(x) ((gex_TM_t)(x)) #endif #define gex_TM_SetCData(tm,val) ((void)(gasneti_import_tm_nonpair(tm)->_cdata = (val))) #define gex_TM_QueryCData(tm) ((void*)gasneti_import_tm_nonpair(tm)->_cdata) #define gex_TM_QueryClient(tm) gasneti_export_client(gasneti_import_tm_nonpair(tm)->_ep->_client) #define gex_TM_QueryEP(tm) gasneti_export_ep(gasneti_import_tm_nonpair(tm)->_ep) #define gex_TM_QueryFlags(tm) ((gex_Flags_t)gasneti_import_tm_nonpair(tm)->_flags) #define gex_TM_QueryRank(tm) ((gex_Rank_t)gasneti_import_tm_nonpair(tm)->_rank) #define gex_TM_QuerySize(tm) ((gex_Rank_t)gasneti_import_tm_nonpair(tm)->_size) #endif // TODO-EX: remove these legacy checks #ifdef _GASNET_NODE_T #error "out-of-date #define of _GASNET_NODE_T" #endif #ifdef _GASNET_HANDLER_T #error "out-of-date #define of _GASNET_HANDLER_T" #endif #ifdef _GASNET_TOKEN_T #error "out-of-date #define of _GASNET_TOKEN_T" #endif #ifdef _GASNET_HANDLERARG_T #error "out-of-date #define of _GASNET_HANDLERARG_T" #endif #ifdef _GASNET_REGISTER_VALUE_T #error "out-of-date #define of _GASNET_REGISTER_VALUE_T" #endif #ifdef _GASNET_HANDLE_T #error "out-of-date #define of _GASNET_HANDLE_T" #endif #ifdef _GASNET_HANDLERENTRY_T #error "out-of-date #define of _GASNET_HANDLERENTRY_T" #endif // TM-pair encoding macros // Packed bits as [rem:loc:reserved:tag] = [12:12:7:1] // Note: the 7 reserved bits will eventually be needed for client index // Note: this fits in 32 bits, but LP64 could have wider (or better aligned?) fields // Alternatively, gex_TM_t might be uint64_t to provide wide fields even on ILP32 #define GASNETI_TM_PAIR_TAG_WIDTH 1 #define GASNETI_TM_PAIR_RSV_WIDTH 7 #define GASNETI_TM_PAIR_IDX_WIDTH 12 #define GASNETI_TM_PAIR_IDX_MASK ((1<_addr) #define gex_AM_SrcDescSize(sd) ((size_t)gasneti_import_srcdesc_valid(sd)->_size) #ifndef gex_AM_CancelRequestMedium extern int gasnetc_AM_CancelRequestMedium( gex_AM_SrcDesc_t _sd, gex_Flags_t _flags); #define gex_AM_CancelRequestMedium(sd,flags) gasnetc_AM_CancelRequestMedium(sd,flags) #endif #ifndef gex_AM_CancelReplyMedium extern int gasnetc_AM_CancelReplyMedium( gex_AM_SrcDesc_t _sd, gex_Flags_t _flags); #define gex_AM_CancelReplyMedium(sd,flags) gasnetc_AM_CancelReplyMedium(sd,flags) #endif #ifndef gex_AM_CancelRequestLong extern int gasnetc_AM_CancelRequestLong( gex_AM_SrcDesc_t _sd, gex_Flags_t _flags); #define gex_AM_CancelRequestLong(sd,flags) gasnetc_AM_CancelRequestLong(sd,flags) #endif #ifndef gex_AM_CancelReplyLong extern int gasnetc_AM_CancelReplyLong( gex_AM_SrcDesc_t _sd, gex_Flags_t _flags); #define gex_AM_CancelReplyLong(sd,flags) gasnetc_AM_CancelReplyLong(sd,flags) #endif #endif /* ------------------------------------------------------------------------------------ */ /* progress threads */ // default trivial implementation #ifndef gex_System_QueryProgressThreads #define gex_System_QueryProgressThreads gasneti_query_progress_threads #endif typedef struct { const char * gex_device_list; unsigned int gex_thread_roles; void * (*gex_progress_fn) (void *); void * gex_progress_arg; } gex_ProgressThreadInfo_t; #define GEX_THREAD_ROLE_RCV (1U << 0) #define GEX_THREAD_ROLE_SND (1U << 1) extern int gex_System_QueryProgressThreads( gex_Client_t _client, unsigned int *_count_p, const gex_ProgressThreadInfo_t **_info_p, gex_Flags_t _flags); /* ------------------------------------------------------------------------------------ */ /* conditional and internal flags (others in gasnet_fwd.h) */ #define GEX_FLAG_PEER_NEVER_NBRHD (1U << 14) #if GASNET_PSHM #define GEX_FLAG_PEER_NEVER_SELF (1U << 15) #else #define GEX_FLAG_PEER_NEVER_SELF GEX_FLAG_PEER_NEVER_NBRHD #endif #if defined(_IN_GASNET_INTERNAL_H) #define GASNETI_FLAG_LC_OPT_IN (1U << 31) #define GASNETI_FLAG_COLL_SUBORDINATE (1U << 30) #define GASNETI_FLAG_PEER_SEG_AUX (1U << 29) #endif #define GASNETI_FLAG_INIT_LEGACY (1U << 31) #if GASNET_DEBUG #define GASNETI_FLAG_G2EX_DEBUG (1U << 30) #else #define GASNETI_FLAG_G2EX_DEBUG 0 #endif /* ------------------------------------------------------------------------------------ */ // GASNETC_MAX_{ARGS,MEDIUM,LONG}_NBRHD // These are compile-time constants used by the "neighborhood" AM support, // which includes "loopback" (same-process) and "AMPSHM" (shared-memory). // As described below, these defaults are not suitable for all conduits. // Any/all conduit-specific overrides belong in gasnet_core_fwd.h. #ifndef GASNETC_MAX_ARGS_NBRHD // Assumes gex_AM_MaxArgs() is a compile time constant. // If not, the conduit must define GASNETC_MAX_ARGS_NBRHD to a compile-time // constant in its gasnet_core_fwd.h. // The value may be a conservative upper-bound if the real value cannot be // known until run time (at the cost of wasted memory). #define GASNETC_MAX_ARGS_NBRHD (gex_AM_MaxArgs()) #endif #ifndef GASNETC_MAX_MEDIUM_NBRHD // This default assumes gex_AM_LUB{Request,Reply}Medium() expand to their // *greatest* upper-bound. If that is not true for a given conduit, then it // must define GASNETC_MAX_MEDIUM_NBRHD in its gasnet_core_fwd.h to an // expression which evaluates to the correct value no later than execution // of gasneti_pshm_init(). // The value may be a conservative upper-bound if the real value cannot be // known that early (at the cost of wasted memory). #define GASNETC_MAX_MEDIUM_NBRHD MAX(gex_AM_LUBRequestMedium(),gex_AM_LUBReplyMedium()) #endif #ifndef GASNETC_MAX_LONG_NBRHD // Same assumption and usage as GASNETC_MAX_MEDIUM_NBRHD, above, but for Long. #define GASNETC_MAX_LONG_NBRHD MAX(gex_AM_LUBRequestLong(),gex_AM_LUBReplyLong()) #endif // NPAM GASNet-allocated buffer can use per-thread buffers up to a limit // This provides conduits and PSHM with an intuitive name #define GASNETC_REF_NPAM_MAX_ALLOC GASNETC_MAX_MEDIUM_NBRHD /* ------------------------------------------------------------------------------------ */ extern void (*gasnet_client_attach_hook)(void *, uintptr_t); /* ------------------------------------------------------------------------------------ */ /* Main core header */ #include /* Main extended header */ #include #if GASNETI_THREADINFO_OPT #define GASNETI_TIOPT_CONFIG tiopt #else #define GASNETI_TIOPT_CONFIG notiopt #endif /* ------------------------------------------------------------------------------------ */ #if !defined(GASNET_NULL_ARGV_OK) || \ (defined(GASNET_NULL_ARGV_OK) && GASNET_NULL_ARGV_OK != 0 && GASNET_NULL_ARGV_OK != 1) /* defined to be 1 if gasnet_init(NULL,NULL) is supported. defined to 0 otherwise */ #error GASNet core failed to define GASNET_NULL_ARGV_OK to 0 or 1 #endif #ifndef GASNET_BEGIN_FUNCTION #error GASNet extended API failed to define GASNET_BEGIN_FUNCTION #endif #ifndef GEX_HSL_INITIALIZER #error GASNet core failed to define GEX_HSL_INITIALIZER #endif #ifndef GASNET_BLOCKUNTIL #error GASNet core failed to define GASNET_BLOCKUNTIL #endif #ifndef SIZEOF_GEX_RMA_VALUE_T #error GASNet failed to define SIZEOF_GEX_RMA_VALUE_T #endif /* GASNET_CONFIG_STRING a string representing all the relevant GASNet configuration settings that can be compared using string compare to verify version compatibility The string is also embedded into the library itself such that it can be scanned for within a binary executable. */ #ifndef GASNET_CONFIG_STRING /* allow extension by core and extended (all extensions should follow the same basic comma-delimited feature format below, and include an initial comma) */ #ifndef GASNETC_EXTRA_CONFIG_INFO #define GASNETC_EXTRA_CONFIG_INFO #endif #ifndef GASNETE_EXTRA_CONFIG_INFO #define GASNETE_EXTRA_CONFIG_INFO #endif #ifdef GASNETI_BUG1389_WORKAROUND #define GASNETC_BUG1389_CONFIG_INFO ",ConservativeLocalCopy" #else #define GASNETC_BUG1389_CONFIG_INFO #endif #define GASNET_CONFIG_STRING \ "RELEASE=" _STRINGIFY(GASNETI_RELEASE_VERSION) "," \ "SPEC=" _STRINGIFY(GEX_SPEC_VERSION_MAJOR) "." \ _STRINGIFY(GEX_SPEC_VERSION_MINOR) "," \ "CONDUIT=" GASNET_CONDUIT_NAME_STR "(" \ GASNET_CORE_NAME_STR "-" GASNET_CORE_VERSION_STR "/" \ GASNET_EXTENDED_NAME_STR "-" GASNET_EXTENDED_VERSION_STR "),"\ "THREADMODEL=" _STRINGIFY(GASNETI_THREAD_MODEL) "," \ "SEGMENT=" _STRINGIFY(GASNETI_SEGMENT_CONFIG) "," \ "PTR=" _STRINGIFY(GASNETI_PTR_CONFIG) "," \ "CACHE_LINE_BYTES=" _STRINGIFY(GASNETI_CACHE_LINE_BYTES) "," \ _STRINGIFY(GASNETI_ALIGN_CONFIG) "," \ _STRINGIFY(GASNETI_PSHM_CONFIG) "," \ _STRINGIFY(GASNETI_DEBUG_CONFIG) "," \ _STRINGIFY(GASNETI_TRACE_CONFIG) "," \ _STRINGIFY(GASNETI_STATS_CONFIG) "," \ _STRINGIFY(GASNETI_MALLOC_CONFIG) "," \ _STRINGIFY(GASNETI_SRCLINES_CONFIG) "," \ _STRINGIFY(GASNETI_TIMER_CONFIG) "," \ _STRINGIFY(GASNETI_MEMBAR_CONFIG) "," \ _STRINGIFY(GASNETI_ATOMIC_CONFIG) "," \ _STRINGIFY(GASNETI_ATOMIC32_CONFIG) "," \ _STRINGIFY(GASNETI_ATOMIC64_CONFIG) "," \ _STRINGIFY(GASNETI_TIOPT_CONFIG) \ GASNETC_BUG1389_CONFIG_INFO \ GASNETC_EXTRA_CONFIG_INFO \ GASNETE_EXTRA_CONFIG_INFO #endif /* ensure that the client links the correct library configuration * all objects in a given executable (client and library) must agree on all * of the following configuration settings, otherwise MANY things break, * often in very subtle and confusing ways (eg GASNet mutexes, threadinfo, etc.) * DO NOT REMOVE ANYTHING FROM THIS LIST!!!! */ #define GASNETI_LINKCONFIG_IDIOTCHECK(name) _CONCAT(gasneti_linkconfig_idiotcheck_,name) extern int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MAJOR_,GASNET_RELEASE_VERSION_MAJOR)); extern int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MINOR_,GASNET_RELEASE_VERSION_MINOR)); extern int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_PATCH_,GASNET_RELEASE_VERSION_PATCH)); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_THREAD_MODEL); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_SEGMENT_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_DEBUG_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_TRACE_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_STATS_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MALLOC_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_SRCLINES_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ALIGN_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_PSHM_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_PTR_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_TIMER_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MEMBAR_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ATOMIC_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ATOMIC32_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ATOMIC64_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_TIOPT_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MK_CLASS_CUDA_UVA_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MK_CLASS_HIP_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MK_CLASS_ZE_CONFIG); extern int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(HIDDEN_AM_CONCUR_,GASNET_HIDDEN_AM_CONCURRENCY_LEVEL)); extern int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(CACHE_LINE_BYTES_,GASNETI_CACHE_LINE_BYTES)); extern int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(GASNETI_TM0_ALIGN_,GASNETI_TM0_ALIGN)); extern int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(CORE_,GASNET_CORE_NAME)); extern int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(EXTENDED_,GASNET_EXTENDED_NAME)); #if GASNET_CONDUIT_OFI extern int GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(OFI_PROVIDER_,GASNETC_OFI_PROVIDER_IDENT)); #endif static int *gasneti_linkconfig_idiotcheck(void); #if !PLATFORM_COMPILER_TINY /* avoid a tinyc bug */ #define GASNETI_IDIOTCHECK_RECURSIVE_REFERENCE 1 static int *(*_gasneti_linkconfig_idiotcheck)(void) = &gasneti_linkconfig_idiotcheck; #endif GASNETI_USED static int *gasneti_linkconfig_idiotcheck(void) { static int _val; _val += + GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MAJOR_,GASNET_RELEASE_VERSION_MAJOR)) + GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MINOR_,GASNET_RELEASE_VERSION_MINOR)) + GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_PATCH_,GASNET_RELEASE_VERSION_PATCH)) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_THREAD_MODEL) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_SEGMENT_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_DEBUG_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_TRACE_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_STATS_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MALLOC_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_SRCLINES_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ALIGN_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_PSHM_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_PTR_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_TIMER_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MEMBAR_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ATOMIC_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ATOMIC32_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_ATOMIC64_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_TIOPT_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MK_CLASS_CUDA_UVA_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MK_CLASS_HIP_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(GASNETI_MK_CLASS_ZE_CONFIG) + GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(HIDDEN_AM_CONCUR_,GASNET_HIDDEN_AM_CONCURRENCY_LEVEL)) + GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(CACHE_LINE_BYTES_,GASNETI_CACHE_LINE_BYTES)) + GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(GASNETI_TM0_ALIGN_,GASNETI_TM0_ALIGN)) + GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(CORE_,GASNET_CORE_NAME)) + GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(EXTENDED_,GASNET_EXTENDED_NAME)) #if GASNET_CONDUIT_OFI + GASNETI_LINKCONFIG_IDIOTCHECK(_CONCAT(OFI_PROVIDER_,GASNETC_OFI_PROVIDER_IDENT)) #endif ; #if GASNETI_IDIOTCHECK_RECURSIVE_REFERENCE if (_gasneti_linkconfig_idiotcheck == &gasneti_linkconfig_idiotcheck) _val += *(*_gasneti_linkconfig_idiotcheck)(); #endif return &_val; } #if defined(GASNET_DEBUG) && (defined(__OPTIMIZE__) || defined(NDEBUG)) #error Tried to compile GASNet client code with optimization enabled but also GASNET_DEBUG (which seriously hurts performance). Reconfigure/rebuild GASNet without --enable-debug #endif /* ------------------------------------------------------------------------------------ */ GASNETI_END_NOWARN GASNETI_END_EXTERNC #undef _IN_GASNETEX_H #endif /* ------------------------------------------------------------------------------------ */ // Separate protection for definitions visible to GASNet-1 clients and to // internal code (to provide corresponding thunks), but *not* to EX clients. // This allows gasnet.h to be included either before or after gasnetex.h. #if !defined(_GASNETEX_LEGACY_H) && (defined(_IN_GASNET_INTERNAL_H) || defined(_INCLUDED_GASNET_H)) #define _GASNETEX_LEGACY_H // GASNet-1 version of gex_AM_Entry_t typedef struct { gex_AM_Index_t index; /* == 0 for don't care */ void (*fnptr)(); } gasnet_handlerentry_t; #endif /* ------------------------------------------------------------------------------------ */ /* intentionally expanded on every include */ #if defined(_INCLUDED_GASNET_INTERNAL_H) && !defined(_GASNET_INTERNAL_IDIOTCHECK) #define _GASNET_INTERNAL_IDIOTCHECK #undef gex_Client_Init #define gex_Client_Init gasneti_idiotcheck_gasnet_internal_dot_h_header_prohibited #endif gasnet-2025.8.0/acinclude.m40000664000175000017500000033423315142313673015623 0ustar alastairalastairdnl $Source: bitbucket.org:berkeleylab/gasnet.git/acinclude.m4 $ dnl Description: m4 macros dnl Copyright 2004, Dan Bonachea dnl Terms of use are as specified in license.txt dnl insert comments to improve readability of generated configure script pushdef([gasnet_fun_level],0) define([gasnet_fun_comment],[# $1]) AC_DEFUN([GASNET_FUN_BEGIN],[ pushdef([gasnet_fun_level],incr(defn([gasnet_fun_level]))) gasnet_fun_comment(vvvvvvvvvvvvvvvvvvvvvv [$1] vvvvvvvvvvvvvvvvvvvvvv (L:gasnet_fun_level)) ]) AC_DEFUN([GASNET_FUN_END],[ gasnet_fun_comment(^^^^^^^^^^^^^^^^^^^^^^ [$1] ^^^^^^^^^^^^^^^^^^^^^^ (L:gasnet_fun_level)) popdef([gasnet_fun_level]) ]) dnl determine the autoconf version used to build configure script AC_DEFUN([GASNET_GET_AUTOCONF_VERSION],[ GASNET_FUN_BEGIN([$0]) AC_REQUIRE([AC_PROG_AWK]) AC_MSG_CHECKING(autoconf version) ifdef([AC_AUTOCONF_VERSION],[ AUTOCONF_VERSION_STR='m4_defn([AC_AUTOCONF_VERSION])' ], [ AUTOCONF_VERSION_STR=`$AWK '/.*enerated.*utoconf.*([[0-9]]+).([[0-9]]+).*/ { [match]([$]0,"[[0-9]]+.[[0-9]]+"); print [substr]([$]0,RSTART,RLENGTH); exit 0 } ' < ${srcdir}/configure` ]) dnl AUTOCONF_VERSION=`echo $AUTOCONF_VERSION_STR | $AWK -F. '{ printf("%i%i",[$]1,[$]2); }'` AC_MSG_RESULT($AUTOCONF_VERSION_STR) GASNET_FUN_END([$0]) ]) AC_DEFUN([GASNET_FORBID_PROGRAM_TRANSFORM],[ GASNET_FUN_BEGIN([$0]) #echo cross_compiling=$cross_compiling target_alias=$target_alias program_prefix=$program_prefix program_suffix=$program_suffix program_transform_name=$program_transform_name # undo prefix autoconf automatically adds during cross-compilation # don't test for cross_compile here as it might not yet be set correctly if test "$program_prefix" = "${target_alias}-" ; then program_prefix=NONE fi # normalize empty prefix/suffix if test -z "$program_prefix" ; then program_prefix=NONE fi if test -z "$program_suffix" ; then program_suffix=NONE fi # canonicalize transforms caused by empty prefix/suffix program_transform_name=`echo "$program_transform_name" | sed -e 's/; *$//;' | sed -e "s/${target_alias}-//"` if expr "$program_transform_name" : 's.^..$' >/dev/null || \ expr "$program_transform_name" : 's.$$..$' >/dev/null || \ expr "$program_transform_name" : 's.$$..;s.^..$' >/dev/null ; then program_transform_name="s,x,x," fi if test "$program_prefix$program_suffix$program_transform_name" != "NONENONEs,x,x," ; then GASNET_MSG_ERROR([This configure script does not support --program-prefix, --program-suffix or --program-transform-name. Users are recommended to instead use --prefix with a unique directory and make symbolic links as desired for renaming.]) fi GASNET_FUN_END([$0]) ]) dnl GASNET_GCC_VERSION_CHECK(type) type=CC or CXX AC_DEFUN([GASNET_GCC_VERSION_CHECK],[ GASNET_FUN_BEGIN([$0($1)]) AC_MSG_CHECKING(for known buggy compilers) badgccmsg="" AC_TRY_COMPILE([ #if __GNUC__ == 3 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ <= 2 # error #endif ],[ ], [:], [ AC_MSG_RESULT([$1] is gcc 3.2.0-2) badgccmsg="Use of gcc/g++ 3.2.0-2 for compiling this software is strongly discouraged. \ This version has a serious known bug in the optimizer regarding structure copying, \ which may lead to bad code and incorrect runtime behavior when optimization is enabled. \ Consider using \$[$1] to select a different compiler." GASNET_IF_ENABLED(allow-gcc32, Allow the use of the known broken gcc/g++ 3.2.0-2 compiler, [ GASNET_MSG_WARN([$badgccmsg]) ],[ AC_MSG_ERROR([$badgccmsg \ You may enable use of this broken compiler at your own risk by passing the --enable-allow-gcc32 flag.]) ]) ]) AC_TRY_COMPILE([ #if __GNUC__ == 4 && __GNUC_MINOR__ < 3 # error #endif ],[ ], [:], [ AC_MSG_RESULT([$1 is gcc 4.x, for x < 3]) badgccmsg="Use of gcc/g++ 4.0, 4.1 or 4.2 for compiling this software is strongly discouraged. \ These versions have a known bug in the optimizer regarding aliasing analysis which may lead \ to bad code and incorrect runtime behavior when optimization is enabled. \ Consider using \$[$1] to select a different compiler." GASNET_IF_ENABLED(allow-gcc4, Allow the use of a broken gcc/g++ 4.0-4.2 compiler, [ GASNET_MSG_WARN([$badgccmsg]) ],[ AC_MSG_ERROR([$badgccmsg \ You may enable use of this broken compiler at your own risk by passing the --enable-allow-gcc4 flag.\ If you do so, please see the documentation on --enable-conservative-local-copy for a possible \ work around for the gcc-4.x bug.]) ]) ]) if test -z "$badgccmsg"; then AC_MSG_RESULT(ok) fi GASNET_FUN_END([$0($1)]) ]) dnl GASNET_PGI_VERSION_CHECK(type) type=CC or CXX AC_DEFUN([GASNET_PGI_VERSION_CHECK],[ GASNET_FUN_BEGIN([$0($1)]) AC_MSG_CHECKING(for known buggy compilers) badpgimsg="" AC_TRY_COMPILE([ #if ((10000 * __PGIC__) + (100 * __PGIC_MINOR__) + __PGIC_PATCHLEVEL__) < 70205 # error #endif ],[ ], [:], [ AC_MSG_RESULT([$1] is PGI prior to 7.2-5) badpgimsg="Use of PGI compilers older than 7.2-5 is not supported. Consider using \$[$1] to select a different compiler." ]) if test -n "$badpgimsg"; then AC_MSG_ERROR([$badpgimsg]) else AC_MSG_RESULT(ok) fi GASNET_FUN_END([$0($1)]) ]) dnl GASNET_PATHSCALE_VERSION_CHECK(type) type=CC or CXX AC_DEFUN([GASNET_PATHSCALE_VERSION_CHECK],[ GASNET_FUN_BEGIN([$0($1)]) AC_MSG_CHECKING(for known buggy compilers) badpathscalemsg="" AC_TRY_COMPILE([ #if (__PATHCC__ < 3) # error #endif ],[ ], [:], [ AC_MSG_RESULT([$1] is PathScale prior to 3.0) badpathscalemsg="Use of PathScale compilers older than 3.0 is not supported. Consider using \$[$1] to select a different compiler." ]) if test -n "$badpathscalemsg"; then AC_MSG_ERROR([$badpathscalemsg]) else AC_MSG_RESULT(ok) fi GASNET_FUN_END([$0($1)]) ]) AC_DEFUN([GASNET_FIX_SHELL],[ GASNET_FUN_BEGIN([$0]) AC_MSG_CHECKING(for good shell) if test "$BASH" = '' && test `uname` = HP-UX; then AC_MSG_RESULT([no, switching to bash]) case [$]# in 0) exec bash - "[$]0" ;; *) exec bash - "[$]0" "[$]@" ;; esac else AC_MSG_RESULT(yes) fi GASNET_FUN_END([$0]) ]) dnl find full pathname for a given header file, if it exists and AC_SUBST it AC_DEFUN([GASNET_FIND_HEADER],[ GASNET_FUN_BEGIN([$0($1)]) AC_REQUIRE([AC_PROG_AWK]) AC_CHECK_HEADERS($1) pushdef([lowername],patsubst(patsubst(patsubst([$1], [/], [_]), [\.], [_]), [-], [_])) pushdef([uppername],translit(lowername,'a-z','A-Z')) if test "$ac_cv_header_[]lowername" = "yes"; then AC_MSG_CHECKING(for location of $1) echo "#include <$1>" > conftest.c header_pathname= if test -n "$GASNET_FIND_HEADER_CPP"; then echo "$GASNET_FIND_HEADER_CPP conftest.c" >&5 header_pathname=`eval "$GASNET_FIND_HEADER_CPP conftest.c 2>&5" | grep $1 | head -1` header_pathname=`echo $header_pathname | $AWK '{ printf("%s",[$]3); }'` fi if test -z "$header_pathname"; then echo "$CPP conftest.c" >&5 header_pathname=`$CPP conftest.c 2>&5 | grep $1 | head -1` header_pathname=`echo $header_pathname | $AWK '{ printf("%s",[$]3); }'` fi if test -z "$header_pathname"; then # IBM xlc doesn't always emit include file name in output: try /usr/include if test -r /usr/include/$1; then header_pathname="\"/usr/include/$1\"" fi fi if test -z "$header_pathname"; then AC_MSG_RESULT(unknown) GASNET_MSG_WARN(Unable to detect pathname of $1 - pretending it doesn't exist) have=0 else AC_MSG_RESULT($header_pathname) have=1 fi else header_pathname= have=0 fi PATH_[]uppername=$header_pathname HAVE_[]uppername=$have AC_SUBST(PATH_[]uppername) AC_SUBST(HAVE_[]uppername) popdef([uppername]) popdef([lowername]) GASNET_FUN_END([$0($1)]) ]) dnl autoconf before 2.50 lacks AC_INCLUDES_DEFAULT AC_DEFUN([GASNET_INCLUDES_DEFAULT],[ ifdef([AC_INCLUDES_DEFAULT],[AC_INCLUDES_DEFAULT],[ dnl provide fallback include default for autoconf 2.13 /* this should include only C89 headers containing declarations we may want in configure */ #include #include #include #include #include #include #include #include #include #include #include ]) ]) AC_DEFUN([myeval],[$1]) dnl force our includes into an existing macro expansion define([_GASNET_INSERT_HEADERS],[ pushdef([hash],[#]) patsubst( [hash] ( $1 [hash] ), [\(#include <.*$\)], \1 GASNET_INCLUDES_DEFAULT) popdef([hash]) ]) ifdef([AC_AUTOCONF_VERSION],[ dnl fix a buggy AC_CHECK_SIZEOF(type *) in AC 2.66 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66], [ m4_copy([AC_CHECK_SIZEOF],[_GASNET_CHECK_SIZEOF]) m4_defun([AC_CHECK_SIZEOF],[ m4_pushdef([AS_LITERAL_IF],[]) _GASNET_CHECK_SIZEOF($@) m4_popdef([AS_LITERAL_IF]) ]) ]) ]) dnl do AC_CHECK_SIZEOF and also AC_SUBST the result, second arg is optional prefix AC_DEFUN([GASNET_CHECK_SIZEOF],[ GASNET_FUN_BEGIN([$0($1,$2)]) pushdef([typename],patsubst(patsubst([$1], [\ ], [_]), [\*], [p])) pushdef([barename],sizeof_[]typename) pushdef([lowername],translit($2[]barename,'A-Z','a-z')) pushdef([uppername],translit($2[]barename,'a-z','A-Z')) if test "$cross_compiling" = "yes" ; then uppername= GASNET_TRY_CACHE_EXTRACT_EXPR([sizeof($1) (binary probe)],uppername,[GASNET_INCLUDES_DEFAULT],[sizeof($1)],uppername) if test -z "$uppername" ; then # last resort is to use CROSS var GASNET_CROSS_VAR(uppername,uppername) fi ac_cv_[]lowername=$uppername fi dnl use bare AC_CHECK_SIZEOF here to get correct .h behavior & avoid duplicate defs GASNET_PUSHVAR(ac_cv_[]barename,"$ac_cv_[]lowername") if test "$ac_cv_[]barename" = "" ; then unset ac_cv_[]barename unset ac_cv_type_[]typename fi if test "$2" != "" ; then AC_MSG_CHECKING([$2 size:]) fi ifdef([AC_INCLUDES_DEFAULT], [ AC_CHECK_SIZEOF($1, $uppername) ],[ dnl autoconf 2.13 lacks header support in CHECK_SIZEOF, add ours _GASNET_INSERT_HEADERS([ AC_CHECK_SIZEOF($1, $uppername) ]) ]) gasnet_checksizeoftmp_[]lowername="$ac_cv_[]barename" GASNET_POPVAR(ac_cv_[]barename) ac_cv_[]lowername=$gasnet_checksizeoftmp_[]lowername uppername=$gasnet_checksizeoftmp_[]lowername if test "$uppername" = "0" -o "$uppername" = "" -o "$ac_cv_[]lowername" != "$uppername"; then GASNET_MSG_ERROR(failed to find sizeof($1)) fi if test "$2" != ""; then dnl work around an irritating autoheader bug - dnl different autoheader versions handle the auto-AC_DEFINE done by dnl AC_CHECK_SIZEOF differently. This mantra should ensure we get exactly one dnl copy of each def in the config.h.in for any autoheader version ac_cv_[]uppername[]_indirect=uppername dnl following must appear exactly once to prevent errors AC_DEFINE_UNQUOTED($ac_cv_[]uppername[]_indirect,$uppername) fi AC_SUBST(uppername) popdef([barename]) popdef([typename]) popdef([lowername]) popdef([uppername]) GASNET_FUN_END([$0($1,$2)]) ]) dnl GASNET_CHECK_INTTYPES(headername) dnl AC_DEFINE and set HAVE_HEADERNAME_H if the header exists dnl AC_DEFINE and AC_SUBST COMPLETE_HEADERNAME_H if it contains all the inttypes dnl that we care about (all of which are mandated by C99 and POSIX!) AC_DEFUN([GASNET_CHECK_INTTYPES_HELPERPROG],[ #include <$1> int check() { int8_t i8; uint8_t u8; int16_t i16; uint16_t u16; int32_t i32; uint32_t u32; int64_t i64; uint64_t u64; intptr_t ip; uintptr_t up; if (sizeof(i8) != 1) return 1; if (sizeof(u8) != 1) return 1; if (sizeof(i16) != 2) return 1; if (sizeof(u16) != 2) return 1; if (sizeof(i32) != 4) return 1; if (sizeof(u32) != 4) return 1; if (sizeof(i64) != 8) return 1; if (sizeof(u64) != 8) return 1; if (sizeof(ip) != sizeof(void*)) return 1; if (sizeof(up) != sizeof(void*)) return 1; return 0; } ]) dnl detect whether a given inttypes header is available and complete, with optional prefix AC_DEFUN([GASNET_CHECK_INTTYPES],[ GASNET_FUN_BEGIN([$0($1,$2)]) pushdef([lowername],patsubst(patsubst(patsubst([$1], [/], [_]), [\.], [_]), [-], [_])) pushdef([uppername],translit(lowername,'a-z','A-Z')) GASNET_PUSHVAR(HAVE_[]uppername,"") dnl force a recheck unset ac_cv_header_[]lowername AC_CHECK_HEADERS([$1]) GASNET_POPVAR(HAVE_[]uppername) if test "$ac_cv_header_[]lowername" = "yes"; then [$2]HAVE_[]uppername=1 AC_SUBST([$2]HAVE_[]uppername) AC_DEFINE([$2]HAVE_[]uppername) if test "$cross_compiling" = "yes" ; then dnl if cross-compiling, just ensure the header can build the inttypes program and hope for the best GASNET_TRY_CACHE_CHECK([for a complete $1],[$2]COMPLETE_[]uppername,[ GASNET_CHECK_INTTYPES_HELPERPROG($1) ],[ return check(); ], [ [$2]COMPLETE_[]uppername=1 AC_SUBST([$2]COMPLETE_[]uppername) AC_DEFINE([$2]COMPLETE_[]uppername) ],[ AC_DEFINE([$2]COMPLETE_[]uppername, 0) ]) else dnl otherwise, build and run the inttypes program to ensure the header values are actually correct GASNET_TRY_CACHE_RUN([for a complete $1],[$2]COMPLETE_[]uppername,[ GASNET_CHECK_INTTYPES_HELPERPROG($1) int main(void) { return check(); } ],[ [$2]COMPLETE_[]uppername=1 AC_SUBST([$2]COMPLETE_[]uppername) AC_DEFINE([$2]COMPLETE_[]uppername) ],[ AC_DEFINE([$2]COMPLETE_[]uppername, 0) ]) fi fi popdef([lowername]) popdef([uppername]) GASNET_FUN_END([$0($1,$2)]) ]) dnl PR828: AM_CONDITIONAL must appear on all control paths dnl this macro runs them for a prefix which is not encountered AC_DEFUN([GASNET_SETUP_INTTYPES_DUMMY], [ pushdef([cvsizeof],translit(ac_cv_[$1]sizeof_,'A-Z','a-z')) if test x"$[]cvsizeof[]int$[]cvsizeof[]long$[]cvsizeof[]void_p" = x444; then $1[]PLATFORM_ILP32=yes fi if test x"$[]cvsizeof[]int$[]cvsizeof[]long$[]cvsizeof[]void_p" = x488; then $1[]PLATFORM_LP64=yes fi if test x"$[]cvsizeof[]int$[]cvsizeof[]long$[]cvsizeof[]void_p" = x888; then $1[]PLATFORM_ILP64=yes fi dnl following worksaround buggy automake which mishandles m4 expansions in AM_CONDITIONAL dnl these versions just shut up its whining (but still provide correct values) AM_CONDITIONAL(PLATFORM_ILP32, test "$PLATFORM_ILP32" = "yes") AM_CONDITIONAL(PLATFORM_LP64, test "$PLATFORM_LP64" = "yes") AM_CONDITIONAL(PLATFORM_ILP64, test "$PLATFORM_ILP64" = "yes") dnl and now the real versions.. AM_CONDITIONAL($1[]PLATFORM_ILP32, test "$[$1]PLATFORM_ILP32" = "yes") AM_CONDITIONAL($1[]PLATFORM_LP64, test "$[$1]PLATFORM_LP64" = "yes") AM_CONDITIONAL($1[]PLATFORM_ILP64, test "$[$1]PLATFORM_ILP64" = "yes") popdef([cvsizeof]) ]) dnl all the inttypes goop required for portable_inttypes.h dnl second arg is optional prefix for defs AC_DEFUN([GASNET_SETUP_INTTYPES], [ GASNET_FUN_BEGIN([$0($1,$2)]) AC_CHECK_HEADERS(stddef.h,[ dnl Some platforms define types like ptrdiff_t only in stddef.h dnl so make sure that AC_CHECK_SIZEOF uses it echo "#include " >> confdefs.h ]) GASNET_CHECK_SIZEOF(char, $1) GASNET_CHECK_SIZEOF(short, $1) GASNET_CHECK_SIZEOF(int, $1) GASNET_CHECK_SIZEOF(long, $1) GASNET_CHECK_SIZEOF(long long, $1) GASNET_CHECK_SIZEOF(void *, $1) GASNET_CHECK_SIZEOF(size_t, $1) GASNET_CHECK_SIZEOF(ptrdiff_t, $1) GASNET_SETUP_INTTYPES_DUMMY($1) GASNET_CHECK_INTTYPES(stdint.h,$1) GASNET_CHECK_INTTYPES(inttypes.h,$1) GASNET_CHECK_INTTYPES(sys/types.h,$1) for type in CHAR SHORT INT LONG LONG_LONG VOID_P SIZE_T PTRDIFF_T ; do eval val="\$[$1]SIZEOF_$type" GASNET_APPEND_DEFINE([$1]INTTYPES_DEFINES, [$1]SIZEOF_$type, $val) done GASNET_APPEND_DEFINE([$1]INTTYPES_DEFINES, [$1]HAVE_STDINT_H) GASNET_APPEND_DEFINE([$1]INTTYPES_DEFINES, [$1]COMPLETE_STDINT_H) GASNET_APPEND_DEFINE([$1]INTTYPES_DEFINES, [$1]HAVE_INTTYPES_H) GASNET_APPEND_DEFINE([$1]INTTYPES_DEFINES, [$1]COMPLETE_INTTYPES_H) GASNET_APPEND_DEFINE([$1]INTTYPES_DEFINES, [$1]HAVE_SYS_TYPES_H) GASNET_APPEND_DEFINE([$1]INTTYPES_DEFINES, [$1]COMPLETE_SYS_TYPES_H) AC_SUBST([$1]INTTYPES_DEFINES) GASNET_FUN_END([$0($1,$2)]) ]) dnl Appends -Dvar_to_define onto target_var, iff var_to_define is set dnl If value also is provided, adds -Dvar_to_define=value dnl GASNET_APPEND_DEFINE(target_var, var_to_define [, value] ) AC_DEFUN([GASNET_APPEND_DEFINE],[ GASNET_FUN_BEGIN([$0]) if test "$[$2]" != ""; then ifelse([$3],[],[ [$1]="$[$1] -D[$2]" ],[ [$1]="$[$1] -D[$2]=$3" ]) fi GASNET_FUN_END([$0]) ]) dnl GASNET_SUBST_TEXT(varname, text to subst) dnl perform subst for multi-line text fields AC_DEFUN([GASNET_SUBST_TEXT],[ GASNET_FUN_BEGIN([$0($1,...)]) mkdir -p "$TOP_BUILDDIR/.subst_text" $1="$TOP_BUILDDIR/.subst_text/$1" cat > $$1 <&5 GASNET_FUN_END([$0($1,$2)]) ]) dnl push a variable, then unset it AC_DEFUN([GASNET_PUSHVAR_UNSET],[ GASNET_FUN_BEGIN([$0($1)]) GASNET_PUSHVAR($1,"") unset $1 GASNET_FUN_END([$0($1)]) ]) dnl restore the old value of varname, from a previous push dnl GASNET_POPVAR(varname) AC_DEFUN([GASNET_POPVAR],[ GASNET_FUN_BEGIN([$0($1)]) if test "$_pushcnt_$1" -ge "1"; then _pushcnt_$1=`expr $_pushcnt_$1 - 1` _total_pushcnt=`expr $_total_pushcnt - 1` eval _gasnet_pushvar_isset=\$_pushedvarset_$1_$_pushcnt_$1 if test "$_gasnet_pushvar_isset" = "1" ; then eval $1=\$_pushedvar_$1_$_pushcnt_$1 echo "popping $1 back to: $[$1]" >&5 else unset $1 echo "popping $1 back to: " >&5 fi else GASNET_MSG_ERROR([INTERNAL ERROR: GASNET_PUSH/POPVAR underflow on $1]) fi GASNET_FUN_END([$0($1)]) ]) AC_DEFUN([GASNET_PUSHPOP_CHECK],[ GASNET_FUN_BEGIN([$0]) if test "$_total_pushcnt" -ge "1" ; then GASNET_MSG_ERROR([INTERNAL ERROR: GASNET_PUSH/POPVAR mismatch: $_total_pushcnt more pushes than pops]) fi GASNET_FUN_END([$0]) ]) dnl add file to list of executable outputs that should be marked +x dnl would be nice to use AC_CONFIG_COMMANDS() for each file, but autoconf 2.53 dnl stupidly fails to execute commands having the same tag as a config output file dnl on subsequent calls to config.status AC_DEFUN([GASNET_FIX_EXEC],[ GASNET_FUN_BEGIN([$0($1)]) cv_prefix[]exec_list="$cv_prefix[]exec_list $1" GASNET_FUN_END([$0($1)]) ]) dnl ensure the "default" command is run on every invocation of config.status AC_DEFUN([GASNET_FIX_EXEC_SETUP],[[ GASNET_FUN_BEGIN([$0]) dnl round-about method ensure autoconf 2.53 picks up depfiles command if test "\${config_commands+set}" != set ; then config_commands="default" fi CONFIG_COMMANDS="\$config_commands" cv_prefix[]exec_list="$cv_prefix[]exec_list" GASNET_FUN_END([$0]) ]]) AC_DEFUN([GASNET_FIX_EXEC_OUTPUT],[[ GASNET_FUN_BEGIN([$0]) for file in $cv_prefix[]exec_list; do case "$CONFIG_FILES" in *${file}*) chmod +x ${file} ;; esac done GASNET_FUN_END([$0]) ]]) dnl bug1657: remove the autoconf-generated PACKAGE_* macros from config.h file AC_DEFUN([GASNET_SANITIZE_PACKAGE],[[ GASNET_FUN_BEGIN([$0($1)]) if test -f '$1' -a -n "`grep PACKAGE_NAME '$1'`" ; then mv '$1' '$1.dirty' cat '$1.dirty' | grep -v '#define PACKAGE_' > '$1' rm -f '$1.dirty' fi GASNET_FUN_END([$0($1)]) ]]) dnl allow a true #undef in config.h dnl Note this requires GASNET_PROG_PERL, although AC_REQUIRE cannot be used in this context AC_DEFUN([GASNET_TRUE_UNDEF],[[ GASNET_FUN_BEGIN([$0($1)]) if test -f '$1' -a -n "`grep '#trueundef' '$1'`" ; then PERL=${PERL:-perl} $PERL -pi.dirty -e 's/^\s*#\s*trueundef\s/#undef /' '$1' rm -f '$1.dirty' fi GASNET_FUN_END([$0($1)]) ]]) AC_DEFUN([GASNET_LIBGCC],[ GASNET_FUN_BEGIN([$0]) AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK(for libgcc link flags, cv_prefix[]lib_gcc, [if test "$GCC" = yes; then #LIBGCC="`$CC -v 2>&1 | sed -n 's:^Reading specs from \(.*\)/specs$:-L\1 -lgcc:p'`" if test "$CC_SUBFAMILY" = 'NVIDIA'; then rm -f conftest.c echo 'int foo;' > conftest.c LIBGCC="-L`$CC -c conftest.c -Xcompiler -print-libgcc-file-name | xargs dirname` -lgcc" rm -rf conftest* else LIBGCC="-L`$CC -print-libgcc-file-name | xargs dirname` -lgcc" fi if test -z "$LIBGCC"; then GASNET_MSG_ERROR(cannot find libgcc) fi fi cv_prefix[]lib_gcc="$LIBGCC"]) LIBGCC="$cv_prefix[]lib_gcc" AC_SUBST(LIBGCC) GASNET_FUN_END([$0]) ]) AC_DEFUN([GASNET_LIBM],[ GASNET_FUN_BEGIN([$0]) AC_REQUIRE([AC_PROG_CC]) GASNET_PUSHVAR(LIBS,"$LIBS") case "$target_os" in darwin*) # libm is just an alias for the system default lib # Naming it explicitly causes linker failures when linking w/ mpich ;; *) # sin should be in everyone's libm if they've got one. AC_CHECK_LIB(m, sin, LIBM="-lm", LIBM="") ;; esac AC_SUBST(LIBM) GASNET_POPVAR(LIBS) GASNET_FUN_END([$0]) ]) AC_DEFUN([_GASNET_SPLIT_LINKER_OPTS_HELPER], [ gasnet_fn_split_linker_opts() { gasnet_lo_ldflags=[$]1 shift gasnet_lo_libs=[$]1 shift eval $gasnet_lo_ldflags= eval $gasnet_lo_libs= for ac_opt in "[$]@"; do case "$ac_opt" in -l* | -L*) gasnet_lo_append=$gasnet_lo_libs ;; *.so | *.a) gasnet_lo_append=$gasnet_lo_libs ;; *) gasnet_lo_append=$gasnet_lo_ldflags ;; esac case "$ac_opt" in *' '* | *'$'* | *'`'*) # quote args containing selected dangerous characters ac_opt_quot="'$ac_opt'" ;; *) ac_opt_quot="$ac_opt" ;; esac if eval test -z \"\$$gasnet_lo_append\" ; then # avoid extraneous spaces eval $gasnet_lo_append=\"\$ac_opt_quot\" else eval $gasnet_lo_append=\"\$$gasnet_lo_append \$ac_opt_quot\" fi done } ]) dnl GASNET_FILTER_LINKER_OPTS(LDFLAGS, LIBS) dnl Filter the current contents of $LDFLAGS and $LIBS dnl Move all -l/-L/*.{a,so} options into LIBS and anything else into LDFLAGS AC_DEFUN([GASNET_SPLIT_LINKER_OPTS],[ GASNET_FUN_BEGIN([$0($@)]) AC_REQUIRE([_GASNET_SPLIT_LINKER_OPTS_HELPER]) eval gasnet_fn_split_linker_opts $1 $2 [$]$1 [$]$2 #echo "$1=[$]$1" #echo "$2=[$]$2" GASNET_FUN_END([$0($@)]) ]) AC_DEFUN([_GASNET_CONFIGURE_ARGS],[ # GASNet configure argument processing # start by capturing raw args, hopefully before autoconf clobbers positional parameters _gasneti_raw_args= for arg in "[$]@" ; do if test -z "$_gasneti_raw_args" ; then _gasneti_raw_args="'$arg'" else _gasneti_raw_args="$_gasneti_raw_args '$arg'" fi done # also capture the enclosing environment, before autoconf changes it _gasneti_envcmd=env for envcmd in $ENVCMD /usr/bin/env /bin/env ; do if test -x $envcmd ; then _gasneti_envcmd=$envcmd break fi done rm -f config.env trap 'rm -f config.env' 0 > /dev/null 2>&1 # prevent a leak on --help/--version $_gasneti_envcmd > config.env ]) dnl Need to capture the *REAL* user-provided command-line to correctly process variable priorities dnl $ac_configure_args is useless because autoconf's arg processing adds fake arguments dnl (eg ac_precious_vars) there which contaminate our GASNET_ENV_DEFAULT priority processing dnl Later autoconfs document that "$@" is intact with the real args immediately after AC_INIT, dnl but this is NOT true of some versions (eg autoconf 2.61 clobbers it with CONFIG_SITE). dnl The only thing that seems to work for all autoconf versions is this nasty hack - dnl we co-opt the AC_REVISION mechanism to run some code very early AC_REVISION([ _GASNET_CONFIGURE_ARGS dnl swallow any autoconf-provided revision suffix: echo > /dev/null \ ]) AC_DEFUN([GASNET_CONFIGURE_ARGS],[ AC_REQUIRE([_GASNET_CONFIGURE_ARGS]) AC_MSG_CHECKING(for configure arguments) AC_CACHE_VAL(cv_prefix[]configure_args, [ cv_prefix[]configure_args="$_gasneti_raw_args" ]) CONFIGURE_ARGS="$cv_prefix[]configure_args" AC_SUBST(CONFIGURE_ARGS) AC_MSG_RESULT([ configure args: $CONFIGURE_ARGS]) ]) AC_DEFUN([GASNET_ENV_DEFAULT_HELPER],[ AC_REQUIRE([AC_PROG_AWK]) gasnet_fn_env_helper() { gasnet_envh_upper=[$]1 shift gasnet_envh_norm=[$]1 shift for ac_opt in "[$]@"; do case "$ac_opt" in with:${gasnet_envh_norm}=* | ${gasnet_envh_norm}=*) ac_optarg=`expr "$ac_opt" : '[[^=]]*=\(.*\)'` eval cv_prefix[]envvar_${gasnet_envh_upper}=\$ac_optarg eval envval_src_${gasnet_envh_upper}=given ;; with:${gasnet_envh_norm}) eval cv_prefix[]envvar_${gasnet_envh_upper}=\$envval_default_${gasnet_envh_upper} eval envval_src_${gasnet_envh_upper}=default ;; without:${gasnet_envh_norm}) eval cv_prefix[]envvar_${gasnet_envh_upper}="" eval envval_src_${gasnet_envh_upper}=disabled ;; esac done } # normalize configure arguments gasnet_fn_env_argnorm() { cv_prefix[]configure_args_norm= for ac_opt in "[$]@"; do # For command-line args VAR is case-insensitive and dash/underscore insensitive ac_norm=`echo "$ac_opt" | $AWK '{gsub("^--?with-","with:");gsub("^--?without-","without:");gsub("^--?",":");gsub("[[-_]]",""); print tolower([$]0)}'` case "$ac_norm" in :*) : ;; # discard irrelevant arguments *=*) # opts with argument ac_norm=`expr "X$ac_norm" : 'X\([[^=]]*\)='` ac_optarg=`expr "X$ac_opt" : '[[^=]]*=\(.*\)$'` cv_prefix[]configure_args_norm="$cv_prefix[]configure_args_norm '$ac_norm=$ac_optarg'" ;; *) # bare opts, no argument cv_prefix[]configure_args_norm="$cv_prefix[]configure_args_norm '$ac_norm'" ;; esac done # echo $cv_prefix[]configure_args_norm } if test "${cv_prefix[]configure_args_norm+set}" = ""; then eval gasnet_fn_env_argnorm $cv_prefix[]configure_args fi # normalize environment varnames and convert to a form we can read back in # currently we assume values do not contain newlines and truncate there cat config.env | $AWK ['{ line=]$[0; if (match(line,"^[A-Za-z0-9_]+=")) { var=substr(line,1,RLENGTH-1); var=tolower(var); gsub("[-_]","",var); val=substr(line,RLENGTH+1); gsub("\047","\047\042\047\042\047",val); if (env[var] && env[var] != val) conf[var]=1; env[var]=val; } } END { for (var in env) { if (conf[var]) printf("_gasneti_cenv_%s=\047%s\047\n",var,env[var]); else printf("_gasneti_nenv_%s=\047%s\047\n",var,env[var]); } }'] > config.env2 . ./config.env2 rm -f config.env config.env2 ]) dnl GASNET_ENV_DEFAULT(envvar-name, default-value, optional-help-text) dnl load an environment variable, using default value if it's missing from env. dnl envvar-name must be a literal post-expansion (ie not a shell variable) dnl if only the first argument is passed, then the variable is left unset by default dnl caches the results to guarantee reconfig gets the originally loaded value dnl also adds a --with-foo-bar= option for the env variable FOO_BAR AC_DEFUN([GASNET_ENV_DEFAULT],[ GASNET_FUN_BEGIN([$0($@)]) pushdef([lowerdashname],patsubst(translit([$1],'A-Z','a-z'),[_],[-])) pushdef([lowernopunct],patsubst(lowerdashname,[-],[])) pushdef([UNSET],[__=-=-=-__NOT_SET__-=-=-=__]) dnl create the help prompt just once, and only if not suppressed ifdef(with_expanded_[$1], [], [ ifdef([GASNET_SUPPRESSHELP], [], [ AC_ARG_WITH(lowerdashname, GASNET_OPTION_HELP(with-[]lowerdashname[]=, [$1] setting[]ifelse([$3],[],[],[: $3])), [], []) ]) ]) define(with_expanded_[$1], [set]) AC_MSG_CHECKING(for $1 setting) envval_src_$1="cached" AC_CACHE_VAL(cv_prefix[]envvar_$1, [ if test "$#" = "1" ; then # no default means unset envval_default_$1="UNSET" else envval_default_$1="[$2]" fi # Lowest priority are the enclosing environment and the default value argument (lowest) if test "${_gasneti_nenv_[]lowernopunct+set}" = "set" ; then cv_prefix[]envvar_$1="${_gasneti_nenv_[]lowernopunct}" envval_src_$1=given elif test "${_gasneti_cenv_[]lowernopunct+set}" = "set" ; then cv_prefix[]envvar_$1="${_gasneti_cenv_[]lowernopunct}" envval_src_$1=conf else cv_prefix[]envvar_$1=$envval_default_$1 envval_src_$1=default fi # Left-to-right parsing of commandline settings that includes both mechanisms # --with-VAR=val or VAR=val => set to val # --with-VAR => set to default # --without-VAR => set to blank (ie "", not "no") eval gasnet_fn_env_helper $1 lowernopunct $cv_prefix[]configure_args_norm ]) [$1]="$cv_prefix[]envvar_$1" pushdef([alignarg],[m4_substr([ ],len([$1]))]) pushdef([aligncac],[m4_substr([ ],len([$1]))]) dnl reduce space for (cached) appended by AC_CACHE_VAL if test "$[$1]" = "UNSET" ; then unset $1 if test "$envval_src_$1" = "cached"; then AC_MSG_RESULT([aligncac (not set)]) else AC_MSG_RESULT([alignarg (not set)]) fi else case "$envval_src_$1" in 'cached') AC_MSG_RESULT([aligncac \"$[$1]\"]) ;; 'default') AC_MSG_RESULT([alignarg (default) \"$[$1]\"]) ;; 'disabled') AC_MSG_RESULT([alignarg (disabled) \"$[$1]\"]) ;; 'given') AC_MSG_RESULT([alignarg (provided) \"$[$1]\"]) ;; 'conf') AC_MSG_RESULT([alignarg (provided) \"$[$1]\"]) GASNET_MSG_ERROR([Ambiguous environment setting for \$$1. Please configure --with-$1="intended value"]) ;; *) GASNET_MSG_ERROR(_GASNET_ENV_DEFAULT broken) esac fi popdef([aligncac]) popdef([alignarg]) popdef([UNSET]) popdef([lowernopunct]) popdef([lowerdashname]) GASNET_FUN_END([$0($@)]) ]) AC_DEFUN([GASNET_DISPLAY_VERSION],[ GASNET_FUN_BEGIN([$0($@)]) AC_MSG_CHECKING(for package version) display_version_info="" ifdef([AC_PACKAGE_NAME],[ display_version_info="$display_version_info AC_PACKAGE_NAME" ]) ifdef([AC_PACKAGE_VERSION],[ display_version_info="$display_version_info AC_PACKAGE_VERSION" ]) if test -d "$srcdir/.git" ; then if test -f "$srcdir/.gasnet_toolsonly_mode"; then git_describe=`( cd "$srcdir" && ${GIT=git} describe --long --always ) 2> /dev/null` else git_describe=`( cd "$srcdir" && ${GIT=git} describe --long --dirty --always ) 2> /dev/null` fi if test -n "$git_describe"; then display_version_info="$display_version_info ($git_describe)" fi fi ifdef([AC_PACKAGE_URL],[ display_version_info="$display_version_info AC_PACKAGE_URL" ]) AC_MSG_RESULT([$display_version_info]) GASNET_FUN_END([$0($@)]) ]) dnl $1 = optional env variables to restore dnl $2 = autoconf env vars to populate (including from command-line) AC_DEFUN([GASNET_START_CONFIGURE],[ GASNET_FUN_BEGIN([$0($1,$2)]) AC_REQUIRE([GASNET_DISPLAY_VERSION]) AC_REQUIRE([GASNET_CONFIGURE_ARGS]) AC_REQUIRE([GASNET_SET_CROSS_COMPILE]) dnl run early to handle implicit AC_PROG_CC AC_REQUIRE([GASNET_ENV_DEFAULT_HELPER]) GASNET_RESTORE_AUTOCONF_ENV([CC CXX CFLAGS CXXFLAGS CPPFLAGS LIBS MAKE GMAKE AR AS RANLIB PERL SUM LEX YACC $1]) dnl the following cannot be handled here, as they are already detected: AWK, (G)MAKE, MKDIR_P, INSTALL GASNET_POPULATE_AUTOCONF_ENV([CC CFLAGS CPP CPPFLAGS LDFLAGS LIBS PERL $2]) if test "${CFLAGS+set}" != "set" ; then # default CFLAGS to empty, overriding autoconf's default of "-g -O2" CFLAGS="" fi if test "${CXXFLAGS+set}" != "set" ; then # same for CXXFLAGS CXXFLAGS="" fi GASNET_PATH_PROGS(PWD_PROG, pwd, pwd) define([GASNET_CONFIGURE_WARNING_LOCAL],[.[]cv_prefix[]configure_warnings.tmp]) if test -z "$GASNET_CONFIGURE_WARNING_GLOBAL" ; then GASNET_CONFIGURE_WARNING_GLOBAL="`$PWD_PROG`/GASNET_CONFIGURE_WARNING_LOCAL" export GASNET_CONFIGURE_WARNING_GLOBAL fi rm -f "GASNET_CONFIGURE_WARNING_LOCAL" dnl Save and display useful info about the configure environment GASNET_GET_AUTOCONF_VERSION() dnl ensure the cache is used in all reconfigures if test "$cache_file" = "/dev/null" ; then GASNET_MSG_WARN([configure cache_file setting got lost - you may need to run a fresh ./Bootstrap]) cache_file=config.cache fi ac_configure_args="$ac_configure_args --cache-file=$cache_file" dnl don't trust shell's builtin pwd, because it may include symlinks TOP_SRCDIR=`cd ${srcdir} && ${PWD_PROG}` AC_MSG_RESULT( TOP_SRCDIR: $TOP_SRCDIR) AC_SUBST(TOP_SRCDIR) TOP_BUILDDIR=`${PWD_PROG}` AC_MSG_RESULT( TOP_BUILDDIR: $TOP_BUILDDIR) AC_SUBST(TOP_BUILDDIR) dnl check against bug 1083 (spaces in directory name break things) if `echo $TOP_SRCDIR | grep ' ' >/dev/null 2>/dev/null`; then AC_MSG_ERROR(TOP_SRCDIR contains space characters - please unpack the source in a different directory.) fi if `echo $TOP_BUILDDIR | grep ' ' >/dev/null 2>/dev/null`; then AC_MSG_ERROR(TOP_BUILDDIR contains space characters - please build in a different directory.) fi dnl set AM_CONDITIONAL BUILD_IS_SRC for ease of use in generated Makefiles AM_CONDITIONAL(BUILD_IS_SRC, test "$TOP_BUILDDIR" = "$TOP_SRCDIR") dnl set AC_SUBST variable BUILD_IS_SRC for ease of use in generated scripts if test "$TOP_BUILDDIR" = "$TOP_SRCDIR"; then BUILD_IS_SRC=yes else BUILD_IS_SRC=no fi AC_SUBST(BUILD_IS_SRC) # Handle prefix defaulting with subconfigures # When users pass --prefix on the command-line, this is automatically passed to subconfigures # and everything lives happily in the same tree # Without --prefix, different packages may default to different directories # (due to AC_PREFIX_DEFAULT), so ensure that all subconfigures # default to the same location (as determined by the outermost configure) if test "$prefix" = "NONE" -a -n "$ac_default_prefix" ; then GASNET_SUBCONFIGURE_ARG(--prefix="$ac_default_prefix") fi SYSTEM_NAME="`hostname`" AC_SUBST(SYSTEM_NAME) case "$target" in # Apple gcc has -arch options for cross-compilation, but target binaries may still work due to Rosetta (making our cross-compilation support unnecessary) # ensure we report the correct target tuple *-apple-darwin*) _GASNET_GCCVER=`${CC:-gcc} -v 2>&1` _GASNET_GCCISAPPLE=`echo "$_GASNET_GCCVER" | grep 'gcc version' | grep 'Apple '` _GASNET_GCCTARGET=`echo "$_GASNET_GCCVER" | /usr/bin/perl -ne 'print \[$]1 if (m/--target=(\S+)/);'` _GASNET_GCCCPU=`echo "$_GASNET_GCCVER" | /usr/bin/perl -ne 'print \[$]1 if (m/--target=([[^-]]+)/);'` if test "$_GASNET_GCCISAPPLE" -a "$_GASNET_GCCTARGET" -a "$_GASNET_GCCCPU" ; then case "$target" in $_GASNET_GCCCPU-*) ;; *) GASNET_MSG_WARN([Apple gcc is cross-compiling for $_GASNET_GCCTARGET, readjusting configure target]) target="$_GASNET_GCCTARGET" target_alias="$target" ac_cv_target="$target" ac_cv_target_alias="$target" target_cpu="$_GASNET_GCCCPU" esac fi ;; esac SYSTEM_TUPLE="$target" AC_SUBST(SYSTEM_TUPLE) AC_MSG_RESULT( system info: $SYSTEM_NAME $SYSTEM_TUPLE) BUILD_USER=`whoami 2> /dev/null` if test $? -ne 0 || test -z "$BUILD_USER"; then BUILD_USER=`id -un 2> /dev/null` if test $? -ne 0 || test -z "$BUILD_USER"; then BUILD_USER="$USER" fi fi BUILD_ID="`date` $BUILD_USER" AC_MSG_RESULT( build id: $BUILD_ID) AC_SUBST(BUILD_ID) # ensure exec_list doesn't grow continuously each time we reconfigure unset cv_prefix[]exec_list GASNET_FUN_END([$0($1,$2)]) ]) AC_DEFUN([GASNET_END_CONFIGURE],[ GASNET_ERR_CLEANUP() GASNET_SAVE_AUTOCONF_ENV() GASNET_PUSHPOP_CHECK() ]) dnl AC_DEFINE the configure information variables detected by GASNET_START_CONFIGURE, with prefix AC_DEFUN([GASNET_DEFINE_CONFIGURE_VARS],[ GASNET_FUN_BEGIN([$0]) AC_REQUIRE([GASNET_START_CONFIGURE]) # backslash any double-quotes embedded in CONFIGURE_ARGS: scrub_CONFIGURE_ARGS=`echo $CONFIGURE_ARGS | sed -e 's/"/\\\\"/g;'` AC_DEFINE_UNQUOTED($1_[]CONFIGURE_ARGS, "$scrub_CONFIGURE_ARGS") AC_DEFINE_UNQUOTED($1_[]SYSTEM_NAME, "$SYSTEM_NAME") AC_DEFINE_UNQUOTED($1_[]SYSTEM_TUPLE, "$SYSTEM_TUPLE") AC_DEFINE_UNQUOTED($1_[]BUILD_ID, "$BUILD_ID") GASNET_FUN_END([$0]) ]) dnl GASNET_POPULATE_AUTOCONF_ENV(env1 env2 env3) dnl call at top of configure.in to setup environment variables dnl inspected by autoconf macros. Pass in names of variables dnl Includes parsing of --with-VAR=VAL args and display of user settings dnl Each variable is init with GASNET_ENV_DEFAULT([VAR]) - in particular, dnl variables with no existing value or setting remain unset. define([_gasnet_populate_env],[ dnl m4 recursion incantation ifelse([$#],[0],[], [$#],[1],[GASNET_ENV_DEFAULT([$1])],[ GASNET_ENV_DEFAULT([$1]) _gasnet_populate_env(builtin([shift],$@)) ]) ]) AC_DEFUN([GASNET_POPULATE_AUTOCONF_ENV],[ GASNET_FUN_BEGIN([$0($@)]) _gasnet_populate_env(patsubst(patsubst([$1],[^ +\| +$],[]),[ +],[,])) dnl convert space to comma-delim GASNET_FUN_END([$0($@)]) ]) dnl GASNET_RESTORE_AUTOCONF_ENV(env1 env2 env3) dnl call at top of configure.in to restore cached environment variables dnl inspected by autoconf macros. Pass in names of variables AC_DEFUN([GASNET_RESTORE_AUTOCONF_ENV],[ GASNET_FUN_BEGIN([$0($1)]) dnl pushdef = get a variable prefix variable which won't be cached. pushdef([nc_prefix],patsubst(cv_prefix,_cv_,_)) if test "$nc_prefix[]acenv_list" != ""; then GASNET_MSG_ERROR(_GASNET_RESTORE_AUTOCONF_ENV called more than once with prefix = "cv_prefix") fi nc_prefix[]acenv_list="$1" AC_MSG_CHECKING(for cached autoconf environment settings) _gasnet_restoreenv_tmp= for varname in $1; do val=`eval echo '$'"cv_prefix[]acenv_$varname"` if test "$val" != ""; then eval $varname=\"$val\" _gasnet_restoreenv_tmp="$_gasnet_restoreenv_tmp $varname=\"$val\"" fi done AC_MSG_RESULT([$_gasnet_restoreenv_tmp]) popdef([nc_prefix]) GASNET_FUN_END([$0($1)]) ]) dnl GASNET_SAVE_AUTOCONF_ENV() dnl cache the environment variables inspected by autoconf macros AC_DEFUN([GASNET_SAVE_AUTOCONF_ENV],[ GASNET_FUN_BEGIN([$0]) for varname in $cv_prefix[]acenv_list; do val=`eval echo '$'"$varname"` if test "$val" != ""; then cachevarname=cv_prefix[]acenv_$varname eval $cachevarname=\"$val\" fi done GASNET_FUN_END([$0]) ]) dnl m4 substr fiasco: dnl autoconf 2.13 has a working version of the m4 function 'substr', dnl but no m4_substr (and no format or m4_format) dnl autoconf 2.58 has working versions of m4_substr and m4_format, dnl but no substr or format dnl This incantation ensures m4_substr works regardless ifdef([substr],[define([m4_substr], defn([substr]))]) dnl similar issue for m4_cleardivert ifdef([m4_cleardivert],[],[ define([m4_cleardivert], [pushdef([_num], divnum)divert([-1])ifelse([$#], [0], [undivert[]], [undivert($@)])divert(_num)popdef([_num])]) ]) dnl same for m4_newline ifdef([m4_newline],[],[ define([m4_newline],[ $1])]) dnl do NOT reindent this line!!! AC_DEFUN([GASNET_OPTION_HELP],[ --$1 ]m4_substr[([ ],len([$1]))[$2]]) dnl Dumps a string directly into the option help output at this point (if supported) dnl Currently ignored if not AC_PRESERVE_HELP_ORDER AC_DEFUN([GASNET_HELP_OUTPUT],[dnl ifdef([GASNET_SUPPRESSHELP], [], [ ifdef([AC_PRESERVE_HELP_ORDER],[ AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],[ ifdef([_m4_divert(HELP_WITH)],[dnl m4_divert_text([HELP_WITH], [$1])dnl ])dnl ]) ])dnl ])dnl ]) AC_DEFUN([GASNET_SUPPRESS_HELPVAR], [ ifdef([_m4_divert(HELP_VAR)],[ m4_cleardivert([HELP_VAR]) ]) ifdef([_m4_divert(HELP_VAR_END)],[ m4_cleardivert([HELP_VAR_END]) ]) ]) dnl GASNET_TRIM_ACHELP(opt1, opt2, ...) dnl remove a list of Autoconf-generated options (ie --opt1=, --opt2= ) from --help define([GASNET_TRIM_ACHELP], [ ifdef([_AC_INIT_HELP],[ m4_copy([_AC_INIT_HELP],[_GASNET_INIT_HELP]) m4_defun([_AC_INIT_HELP],[patsubst(m4_defn([_GASNET_INIT_HELP]),[^.*--\(]m4_join([\|],$@)[\)=.*]m4_newline,[])]) ]) dnl Also remove program transform help output ifdef([AC_ARG_PROGRAM],[ m4_copy([AC_ARG_PROGRAM],[_GASNET_ARG_PROGRAM]) m4_defun([AC_ARG_PROGRAM],[patsubst(m4_defn([_GASNET_ARG_PROGRAM]),[HELP_BEGIN],[KILL])]) ]) dnl and automake's dependency tracking help and enable ifdef([AM_DEP_TRACK],[ m4_copy([AM_DEP_TRACK],[_GASNET_DEP_TRACK]) m4_defun([AM_DEP_TRACK],[ m4_pushdef([AC_ARG_ENABLE],[enable_dependency_tracking=no;]) _GASNET_DEP_TRACK m4_popdef([AC_ARG_ENABLE]) ]) ]) dnl and automake's silent-rules help and enable ifdef([AM_SILENT_RULES],[ m4_copy([AM_SILENT_RULES],[_GASNET_SILENT_RULES]) m4_defun([AM_SILENT_RULES],[ m4_pushdef([AC_ARG_ENABLE],[enable_silent_rules=no;]) _GASNET_SILENT_RULES m4_popdef([AC_ARG_ENABLE]) ]) ]) ]) dnl Perform AC_DISABLE_OPTION_CHECKING if it exists define([GASNET_NO_CHECK_OPTS],[ ifdef([AC_DISABLE_OPTION_CHECKING],[AC_DISABLE_OPTION_CHECKING]) dnl also fixup help ifdef([AC_PRESERVE_HELP_ORDER],[ m4_copy([AC_PRESERVE_HELP_ORDER],[_GASNET_PRESERVE_HELP_ORDER]) m4_defun([AC_PRESERVE_HELP_ORDER],[patsubst(m4_defn([_GASNET_PRESERVE_HELP_ORDER]), [^.*--disable-option-checking.*]m4_newline,[])]) ]) ]) dnl provide a --with-foo=bar configure option dnl action-withval runs for a named value in $withval (or withval=yes if named arg missing) dnl action-without runs for --without-foo or --with-foo=no dnl action-none runs for no foo arg given dnl GASNET_WITH(foo, description, action-withval, [action-without], [action-none]) AC_DEFUN([GASNET_WITH],[ GASNET_FUN_BEGIN([$0($1,...)]) ifdef([GASNET_SUPPRESSHELP], [], [ AC_ARG_WITH($1,GASNET_OPTION_HELP(with-$1=,[$2])) ]) GASNET_WITH_NOHELP([$1],[$3],[$4],[$5]) popdef([withname]) GASNET_FUN_END([$0($1,...)]) ]) AC_DEFUN([GASNET_WITH_NOHELP],[ pushdef([withname],with_[]patsubst([$1], -, _)) if test "${withname+set}" = set; then : withval=$withname; case "$withval" in no) : $3 ;; *) : $2 ;; esac else : $4 fi ]) AC_DEFUN([GASNET_IF_ENABLED_NOHELP],[ case "$enable_[]patsubst([$1], -, _)" in '' | no) : $3 ;; *) : $2 ;; esac ]) AC_DEFUN([GASNET_IF_DISABLED_NOHELP],[ case "$enable_[]patsubst([$1], -, _)" in '' | yes) : $3 ;; *) : $2 ;; esac ]) AC_DEFUN([GASNET_IF_ENABLED],[ GASNET_FUN_BEGIN([$0($1,...)]) ifdef([GASNET_SUPPRESSHELP], [], [ AC_ARG_ENABLE($1,GASNET_OPTION_HELP(enable-$1,[$2])) ]) GASNET_IF_ENABLED_NOHELP([$1],[$3],[$4]) GASNET_FUN_END([$0($1,...)]) ]) AC_DEFUN([GASNET_IF_DISABLED],[ GASNET_FUN_BEGIN([$0($1,...)]) ifdef([GASNET_SUPPRESSHELP], [], [ AC_ARG_ENABLE($1,GASNET_OPTION_HELP(disable-$1,[$2])) ]) GASNET_IF_DISABLED_NOHELP([$1],[$3],[$4]) GASNET_FUN_END([$0($1,...)]) ]) AC_DEFUN([GASNET_IF_ENABLED_WITH_AUTO],[ GASNET_FUN_BEGIN([$0($1,...)]) ifdef([GASNET_SUPPRESSHELP], [], [ AC_ARG_ENABLE($1,GASNET_OPTION_HELP((en|dis)able-$1,[$2])) ]) case "$enable_[]patsubst([$1], -, _)" in no) : $4 ;; yes) : $3 ;; *) : $5 ;; esac GASNET_FUN_END([$0($1,...)]) ]) AC_DEFUN([GASNET_SUBST],[ $1="$2" AC_SUBST($1)]) AC_DEFUN([GASNET_SUBST_FILE],[ $1="$2" AC_SUBST_FILE($1)]) AC_DEFUN([GASNET_CHECK_PROGS],[ GASNET_FUN_BEGIN([$0($1,$2,$3)]) case "$$1" in '') AC_CHECK_PROGS($1,$2) ;; *) AC_MSG_CHECKING(for $3) AC_MSG_RESULT($$1) ;; esac case "$$1" in '') AC_MSG_ERROR(cannot find $3) ;; esac GASNET_FUN_END([$0($1,$2,$3)]) ]) AC_DEFUN([GASNET_PATH_PROGS],[ GASNET_FUN_BEGIN([$0($1,$2,$3)]) case "$$1" in '') AC_PATH_PROGS($1,$2) ;; *) AC_MSG_CHECKING(for $3) AC_MSG_RESULT($$1) ;; esac case "$$1" in '') AC_MSG_ERROR(cannot find $3) ;; esac GASNET_FUN_END([$0($1,$2,$3)]) ]) dnl GASNET_GETFULLPATH(var) dnl var contains a program name, optionally followed by arguments dnl expand the program name to a fully qualified pathname if not already done dnl will special case "env var1=val1 var2-val2 prog args" ("env" may also be a full path) AC_DEFUN([GASNET_GETFULLPATH_CHECK],[ GASNET_IF_DISABLED(full-path-expansion, [Disable expansion of program names to full pathnames], [cv_prefix[]_gfp_disable=1]) ]) AC_DEFUN([GASNET_GETFULLPATH],[ GASNET_FUN_BEGIN([$0($1)]) AC_REQUIRE([AC_PROG_AWK]) AC_REQUIRE([GASNET_GETFULLPATH_CHECK]) if test "$cv_prefix[]_gfp_disable" = ""; then if echo "$$1" | $AWK -F' ' '{if ([$]1 ~ /^(.*\/)?env$/) exit 0; else exit 1;}' >/dev/null; then AC_PATH_PROGS(ENVCMD, $ENVCMD env, , /usr/bin:${PATH}) # assemble "ENVCMD key=val key=val " with a trailing space gasnet_gfp_progenv="$ENVCMD "`echo "$$1" | $AWK -F' ' 'BEGIN { ORS=" "; } { for (i=2;i<=NF;i++) { if ($i ~ /=/) { print $i; } else break; } }'` # just the program name gasnet_gfp_progname=`echo "$$1" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i<=NF;i++) { if ($i !~ /=/) { print $i; break; } } }'` # list of program arguments with no trailing space gasnet_gfp_progargs=`echo "$$1" | $AWK -F' ' 'BEGIN { ORS=""; } { for (i=2;i&5 ( $1 ) > conftest-runcmdout 2> conftest-runcmderr gasnet_cmd_result="$?" gasnet_cmd_stdout="`cat conftest-runcmdout`" gasnet_cmd_stderr="`cat conftest-runcmderr`" cat conftest-runcmdout >&5 cat conftest-runcmderr >&5 echo gasnet_cmd_result=$gasnet_cmd_result >&5 rm -rf conftest-runcmdout conftest-runcmderr if test "$gasnet_cmd_result" = "0" ; then if test -z "$gasnet_cmd_stdout$gasnet_cmd_stderr" ; then : $2 else : $3 fi else : $4 fi GASNET_FUN_END([$0($1,...)]) ]) dnl GASNET_TRY_CCOMPILE_WITHWARN(includes, function-body, action-success, action-warning, action-error) dnl Compile a C program and take different actions based on complete success, error or warning dnl Automatically handles compilers that issue unrelated warnings on every compile AC_DEFUN([GASNET_TRY_CCOMPILE_WITHWARN],[ GASNET_FUN_BEGIN([$0(...)]) GASNET_TRY_CCOMPILE_WITHWARN_NORETRY([$1],[$2],[$3],[ dnl got a warning - does same warning also happen with an empty program? _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" GASNET_TRY_CCOMPILE_WITHWARN_NORETRY([],[],[ dnl no warning on empty program => warning caused by input gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" $4 ],[ dnl still got a warning - is the same? if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then dnl identical warnings => no new warnings caused by program : $3 else dnl different warnings => program is likely causal factor gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" $4 fi ],[ dnl got an error on an empty program! GASNET_MSG_ERROR([unknown failure case in TRY_CCOMPILE_WITHWARN]) ]) ],[$5]) GASNET_FUN_END([$0(...)]) ]) dnl for internal use only AC_DEFUN([GASNET_TRY_CCOMPILE_WITHWARN_NORETRY],[ GASNET_FUN_BEGIN([$0(...)]) gasnet_compile_cmd="${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c" cat > conftest.c <&5 cat $gasnet_testfile >&5 $4 ],[ echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 $5 ]) rm -f $gasnet_testfile GASNET_FUN_END([$0(...)]) ]) dnl GASNET_TRY_CXXCOMPILE_WITHWARN(includes, function-body, action-success, action-warning, action-error) dnl Compile a C++ program and take different actions based on complete success, error or warning dnl Automatically handles compilers that issue unrelated warnings on every compile AC_DEFUN([GASNET_TRY_CXXCOMPILE_WITHWARN],[ GASNET_FUN_BEGIN([$0(...)]) GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY([$1],[$2],[$3],[ dnl got a warning - does same warning also happen with an empty program? _GASNET_TRY_COMPILE_WITHWARN_OUTTMP="$gasnet_cmd_stdout" _GASNET_TRY_COMPILE_WITHWARN_ERRTMP="$gasnet_cmd_stderr" GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY([],[],[ dnl no warning on empty program => warning caused by input gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" $4 ],[ dnl still got a warning - is the same? if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" ; then dnl identical warnings => no new warnings caused by program $3 else dnl different warnings => program is likely causal factor gasnet_cmd_stdout="$_GASNET_TRY_COMPILE_WITHWARN_OUTTMP" gasnet_cmd_stderr="$_GASNET_TRY_COMPILE_WITHWARN_ERRTMP" $4 fi ],[ dnl got an error on an empty program! GASNET_MSG_ERROR([unknown failure case in TRY_CXXCOMPILE_WITHWARN]) ]) ],[$5]) GASNET_FUN_END([$0(...)]) ]) dnl for internal use only AC_DEFUN([GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY],[ GASNET_FUN_BEGIN([$0(...)]) gasnet_compile_cmd="${CXX-c++} -c $CXXFLAGS $CPPFLAGS conftest.cc" cat > conftest.cc <&5 cat $gasnet_testfile >&5 $4 ],[ echo "configure: failed program was:" >&5 cat $gasnet_testfile >&5 $5 ]) rm -f $gasnet_testfile GASNET_FUN_END([$0(...)]) ]) dnl GASNET_TRY_COMPILE_WITHWARN(type, ...) where type is C or CXX dnl Indirection for GASNET_TRY_CCOMPILE_WITHWARN or GASNET_TRY_CXXCOMPILE_WITHWARN AC_DEFUN([GASNET_TRY_COMPILE_WITHWARN], GASNET_TRY_[$1]COMPILE_WITHWARN[([$2],[$3],[$4],[$5],[$6])]) dnl GASNET_TRY_CFLAG(flags, action-if-supported, action-if-not-supported) AC_DEFUN([GASNET_TRY_CFLAG],[ GASNET_FUN_BEGIN([$0($1)]) GASNET_PUSHVAR(CFLAGS,"$CFLAGS $1") AC_MSG_CHECKING(for C compiler flag $1) GASNET_TRY_CCOMPILE_WITHWARN_NORETRY([], [], [ AC_MSG_RESULT(yes) GASNET_POPVAR(CFLAGS) $2 ], [ dnl some compilers issue a warning on *every* compile, dnl so save the warning and try again without the flag being tested, dnl to verify the warning we saw is actually a new warning _GASNET_TRY_CFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" GASNET_POPVAR(CFLAGS) GASNET_TRY_CCOMPILE_WITHWARN_NORETRY([], [], [ dnl warning disappeared when flag removed => flag is the cause AC_MSG_RESULT(no/warning: $_GASNET_TRY_CFLAG_TMP) $3 ],[ if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CFLAG_TMP" ; then dnl got same warning => flag does not create new warnings AC_MSG_RESULT(yes/persistent-warning: $_GASNET_TRY_CFLAG_TMP) $2 else dnl warnings differ with and without flag => flag is probably a causal factor AC_MSG_RESULT(no/new-warning: $_GASNET_TRY_CFLAG_TMP) $3 fi ],[ dnl got an error - should never happen? GASNET_MSG_ERROR([unknown failure case in TRY_CFLAG]) ]) ], [ AC_MSG_RESULT(no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr) GASNET_POPVAR(CFLAGS) $3 ]) GASNET_FUN_END([$0($1)]) ]) dnl GASNET_TRY_CXXFLAG(flags, action-if-supported, action-if-not-supported) AC_DEFUN([GASNET_TRY_CXXFLAG],[ GASNET_FUN_BEGIN([$0($1)]) GASNET_PUSHVAR(CXXFLAGS,"$CXXFLAGS $1") AC_MSG_CHECKING(for C++ compiler flag $1) GASNET_TRY_CXXCOMPILE_WITHWARN_NORETRY([], [], [ AC_MSG_RESULT(yes) GASNET_POPVAR(CXXFLAGS) $2 ], [ dnl some compilers issue a warning on *every* compile, dnl so save the warning and try again without the flag being tested, dnl to verify the warning we saw is actually a new warning _GASNET_TRY_CXXFLAG_TMP="$gasnet_cmd_stdout$gasnet_cmd_stderr" GASNET_POPVAR(CXXFLAGS) GASNET_TRY_CCOMPILE_WITHWARN_NORETRY([], [], [ dnl warning disappeared when flag removed => flag is the cause AC_MSG_RESULT(no/warning: $_GASNET_TRY_CXXFLAG_TMP) $3 ],[ if test "$gasnet_cmd_stdout$gasnet_cmd_stderr" = "$_GASNET_TRY_CXXFLAG_TMP" ; then dnl got same warning => flag does not create new warnings AC_MSG_RESULT(yes/persistent-warning: $_GASNET_TRY_CXXFLAG_TMP) $2 else dnl warnings differ with and without flag => flag is probably a causal factor AC_MSG_RESULT(no/new-warning: $_GASNET_TRY_CXXFLAG_TMP) $3 fi ],[ dnl got an error - should never happen? GASNET_MSG_ERROR([unknown failure case in TRY_CXXFLAG]) ]) ], [ AC_MSG_RESULT(no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr) GASNET_POPVAR(CXXFLAGS) $3 ]) GASNET_FUN_END([$0($1)]) ]) dnl GASNET_SET_CHECKED_CFLAGS CCVAR CFLAGSVAR DEFAULT_CFLAGS SAFE_CFLAGS dnl Set CFLAGSVAR to a values that works with CCVAR dnl if CFLAGSVAR is already set, then keep it dnl otherwise, if DEFAULT_CFLAGS works, then use it dnl otherwise, use SAFE_CFLAGS AC_DEFUN([GASNET_SET_CHECKED_CFLAGS],[ GASNET_FUN_BEGIN([$0(...)]) if test "$[$1]" = "no" ; then : # Skip else GASNET_ENV_DEFAULT([$2], [$3]) if test "$[$2]" = "$3" ; then # validate default GASNET_PUSHVAR(CC,"$[$1]") GASNET_PUSHVAR(CFLAGS,"") GASNET_TRY_CFLAG([$[$2]], [], [ GASNET_MSG_WARN([Unable to use default $2="$[$2]" so using "$4" instead. Consider manually seting $2]) $2="$4" ]) GASNET_POPVAR(CC) GASNET_POPVAR(CFLAGS) fi fi GASNET_FUN_END([$0(...)]) ]) dnl GASNET_CHECK_OPTIMIZEDDEBUG CCVAR CFLAGSVAR EXTRAARGS INCLUDES ACTION dnl Ensure the compiler doesn't create a conflict between dnl optimization and debugging. Run ACTION upon failure AC_DEFUN([GASNET_CHECK_OPTIMIZEDDEBUG],[ GASNET_FUN_BEGIN([$0(...)]) if test "$enable_debug" = "yes" ; then AC_MSG_CHECKING([$1 for debug vs. optimize compilation conflict]) dnl bug 3548: Set both sets of variables to automatically handle either language mode GASNET_PUSHVAR(CC,"$[$1]") GASNET_PUSHVAR(CFLAGS,"$[$2] $3") GASNET_PUSHVAR(CXX,"$[$1]") GASNET_PUSHVAR(CXXFLAGS,"$[$2] $3") GASNET_PUSHVAR(CPPFLAGS,"") AC_TRY_COMPILE( [ $4 #if defined(__OPTIMIZE__) || defined(NDEBUG) choke me #endif ], [ ], [ gasnet_result=no ], [ gasnet_result=yes ]) AC_MSG_RESULT([$gasnet_result]) GASNET_POPVAR(CC) GASNET_POPVAR(CFLAGS) GASNET_POPVAR(CXX) GASNET_POPVAR(CXXFLAGS) GASNET_POPVAR(CPPFLAGS) if test "$gasnet_result" = yes; then : $5 fi fi GASNET_FUN_END([$0(...)]) ]) dnl GASNET_CORRECT_OPTIMIZEDDEBUG CCVAR CFLAGSVAR FIXVAR EXTRAARGS INCLUDES [EXTRAMSG] dnl Ensure the compiler doesn't create a conflict between dnl optimization and debugging. If it appears to, try appending dnl '-O0 -UNDEBUG' to FIXVAR. If that still fails, run ACTION. dnl If no ACTION is given, the default is an error message suggesting dnl changes to the CCVAR. AC_DEFUN([GASNET_CORRECT_OPTIMIZEDDEBUG],[ GASNET_FUN_BEGIN([$0(...)]) GASNET_CHECK_OPTIMIZEDDEBUG([$1],[$2],[$4],[$5],[ old_$3="$[$3]" $3="$[$3] -O0 -UNDEBUG" GASNET_CHECK_OPTIMIZEDDEBUG([$1],[$2],[$4],[$5],[ GASNET_MSG_ERROR([User requested --enable-debug but \$$1 has enabled optimization (-O) or disabled assertions (-DNDEBUG). Appending '-O0 -UNDEBUG' to \$$3 did not resolve this conflict. Try setting $3='$old_[$3] ' $6]) ]) GASNET_MSG_WARN([Appending '-O0 -UNDEBUG' to \$$3 to resolve debug vs. optimize compilation conflict]) ]) GASNET_FUN_END([$0(...)]) ]) dnl GASNET_CHECK_RESTRICT(PREFIX, opt compiler-desc) dnl Checks if 'restrict' C99 keyword (or variants) supported dnl #defines [PREFIX]_RESTRICT to correct variant, or to nothing dnl #defines [PREFIX]_RESTRICT_MAY_QUALIFY_TYPEDEFS as appropriate AC_DEFUN([GASNET_CHECK_RESTRICT],[ GASNET_FUN_BEGIN([$0]) dnl Check for restrict keyword pushdef([cvprefix],translit([$1],'A-Z','a-z')) restrict_keyword="" # Due to xlc/mpcc_r oddity on AIX, we check "__restrict__" before "restrict". # Both ID the same, but xlc accepts either while mpcc_r only takes "__restrict__". if test "$restrict_keyword" = ""; then GASNET_TRY_CACHE_CHECK($2 for __restrict__ keyword, cvprefix[]__restrict__, [int dummy(void * __restrict__ p) { return 1; }], [], restrict_keyword="__restrict__") fi if test "$restrict_keyword" = ""; then GASNET_TRY_CACHE_CHECK($2 for restrict keyword, cvprefix[]restrict, [int dummy(void * restrict p) { return 1; }], [], restrict_keyword="restrict") fi if test "$restrict_keyword" = ""; then GASNET_TRY_CACHE_CHECK($2 for __restrict keyword, cvprefix[]__restrict, [int dummy(void * __restrict p) { return 1; }], [], restrict_keyword="__restrict") fi AC_DEFINE_UNQUOTED([$1]_RESTRICT, $restrict_keyword) restrict_on_typedefs=0 GASNET_TRY_CACHE_CHECK($2 for restrict qualifying typedefs, cvprefix[]_restrict_typedefs, [typedef void *foo_t; int dummy(foo_t [$1]_RESTRICT p) { return 1; }], [], restrict_on_typedefs=1) AC_DEFINE_UNQUOTED([$1]_RESTRICT_MAY_QUALIFY_TYPEDEFS, $restrict_on_typedefs) popdef([cvprefix]) GASNET_FUN_END([$0]) ]) dnl GASNET_CHECK_BUILTINS(PREFIX, opt compiler-desc) dnl Checks for various commpiler builtins of interest dnl #defines [PREFIX]_ symbols AC_DEFUN([GASNET_CHECK_BUILTINS],[ GASNET_FUN_BEGIN([$0]) pushdef([cvprefix],translit([$1],'A-Z','a-z')) GASNET_TRY_CACHE_LINK($2 for __assume, cvprefix[]__assume, [ extern int x; int x = 0; ], [ __assume(x == 0); if (x) __assume(0); ], AC_DEFINE([$1]_ASSUME)) GASNET_TRY_CACHE_LINK($2 for __builtin_assume, cvprefix[]__builtin_assume, [ extern int x; int x = 0; ], [ __builtin_assume(x == 0); if (x) __builtin_assume(0); ], AC_DEFINE([$1]_BUILTIN_ASSUME)) GASNET_TRY_CACHE_LINK($2 for __builtin_unreachable, cvprefix[]__builtin_unreachable, [ extern int x; int x = 0; ], [ if (x) { __builtin_unreachable(), ((void)0); } dnl Detect bug 3702 ], AC_DEFINE([$1]_BUILTIN_UNREACHABLE)) GASNET_TRY_CACHE_LINK($2 for __builtin_expect, cvprefix[]__builtin_expect, [ extern int x; int x = 0; ], [ if (__builtin_expect(x,1)) return 1; ], AC_DEFINE([$1]_BUILTIN_EXPECT)) GASNET_TRY_CACHE_LINK($2 for __builtin_constant_p, cvprefix[]__builtin_constant_p, [ extern int x; int x = 0; ], [ x = __builtin_constant_p(x) + __builtin_constant_p(2); ], AC_DEFINE([$1]_BUILTIN_CONSTANT_P)) GASNET_TRY_CACHE_LINK($2 for __builtin_prefetch, cvprefix[]__builtin_prefetch, [ extern int x; int x = 0; ], [ __builtin_prefetch(&x,0); ], AC_DEFINE([$1]_BUILTIN_PREFETCH)) popdef([cvprefix]) GASNET_FUN_END([$0]) ]) dnl INTERNL USE ONLY AC_DEFUN([GASNETI_C_OR_CXX],[ifelse(index([$1],[CXX]),[-1],[C],[CXX])]) dnl check whether a given gcc/g++ attribute is available dnl GASNET_CHECK_GNU_ATTRIBUTE(PREFIX, compiler-name, attribute-name, declaration, code) dnl If PREFIX contains "CXX" then test is run as LANG_CPLUSPLUS dnl Caller is responsible for setting of CC and friends in the MPI_CC case AC_DEFUN([GASNET_CHECK_GNU_ATTRIBUTE],[ GASNET_FUN_BEGIN([$0($1,$2,$3)]) pushdef([uppername],translit(patsubst([$3], [_], []),'a-z','A-Z')) pushdef([cachevar],cv_prefix[]translit([$1]_attr_[]uppername,'A-Z','a-z')) AC_CACHE_CHECK($2 for __attribute__(($3)), cachevar, GASNET_TRY_COMPILE_WITHWARN(GASNETI_C_OR_CXX([$1]), [$4], [$5], [ cachevar='yes' ],[ dnl cachevar="no/warning: $gasnet_cmd_stdout$gasnet_cmd_stderr" cachevar='no/warning' ],[ dnl cachevar="no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" cachevar='no/error' ]) ) if test "$cachevar" = yes; then AC_DEFINE($1_ATTRIBUTE_[]uppername) AC_DEFINE($1_ATTRIBUTE) else AC_DEFINE($1_ATTRIBUTE_[]uppername, 0) fi GASNET_FUN_END([$0($1,$2,$3)]) popdef([cachevar]) popdef([uppername]) ]) dnl GASNET_GET_GNU_ATTRIBUTES(PREFIX, opt compiler-name) dnl Check all gcc attributes of interest/importance to GASNet dnl If PREFIX contains "CXX" then test is run as LANG_CPLUSPLUS dnl Caller must setup CC, CFLAGS, etc for MPI_CC case. dnl XXX: treatment of inline modifier is not generic AC_DEFUN([GASNET_GET_GNU_ATTRIBUTES],[ pushdef([inline_modifier],ifelse(index([$1],[MPI_CC]), [-1],[GASNETI_CC_INLINE_MODIFIER], [GASNETI_MPI_CC_INLINE_MODIFIER])) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__always_inline__], [__attribute__((__always_inline__)) #if defined __cplusplus inline #elif defined ]inline_modifier[ ]inline_modifier[ #endif int dummy(void) { return 1; }]) popdef([inline_modifier]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__noinline__], [__attribute__((__noinline__)) int dummy(void) { return 1; }]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__malloc__], [#include __attribute__((__malloc__)) void * dummy(void) { return malloc(14); }]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__warn_unused_result__], [__attribute__((__warn_unused_result__)) void * dummy(void) { return 0; }]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__used__], [#include __attribute__((__used__)) void dummy(void) { abort(); }]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__may_alias__], [typedef int __attribute__((__may_alias__)) dummy;]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__noreturn__], [#include __attribute__((__noreturn__)) void dummy(void) { abort(); }]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__const__], [__attribute__((__const__)) char *dummy(char *x) { return x+1; }], [char c; char *x = dummy(&c);]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__pure__], [__attribute__((__pure__)) int dummy(int x) { return x+1; }]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__hot__], [__attribute__((__hot__)) int dummy(void) { return 1; }]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__cold__], [__attribute__((__cold__)) int dummy(void) { return 1; }]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__deprecated__], [__attribute__((__deprecated__)) int dummy(void) { return 0; }]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__common__], [__attribute__((__common__)) int x;]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__fallthrough__], [int dummy(int x) { int result = 0; switch (x) { case 3: result++; __attribute__((__fallthrough__)); case 2: result++; __attribute__((__fallthrough__)); case 1: result++; } return result; }]) GASNET_CHECK_GNU_ATTRIBUTE([$1], [$2], [__format__], [#include __attribute__((__format__ (__printf__, 1, 2))) void dummy(const char *fmt,...) { va_list argptr; va_start(argptr, fmt); va_end(argptr); }]) pushdef([cachevar],cv_prefix[]translit([$1],'A-Z','a-z')[]_attr_format_funcptr) AC_CACHE_CHECK($2 for __attribute__((__format__)) on function pointers, cachevar, GASNET_TRY_COMPILE_WITHWARN(GASNETI_C_OR_CXX([$1]), [ __attribute__((__format__ (__printf__, 1, 2))) extern void (*dummy1)(const char *fmt,...); __attribute__((__format__ (__printf__, 1, 2))) void (*dummy2)(const char *fmt,...); ], [], [ cachevar='yes' ],[ cachevar='no/warning' ],[ cachevar='no/error' ]) ) if test "$cachevar" = yes; then AC_DEFINE([$1]_ATTRIBUTE_FORMAT_FUNCPTR) else AC_DEFINE([$1]_ATTRIBUTE_FORMAT_FUNCPTR, 0) fi popdef([cachevar]) pushdef([cachevar],cv_prefix[]translit([$1],'A-Z','a-z')[]_attr_format_funcptr_arg) AC_CACHE_CHECK($2 for __attribute__((__format__)) on function pointers as arguments, cachevar, GASNET_TRY_COMPILE_WITHWARN(GASNETI_C_OR_CXX([$1]), [ extern void dummy(__attribute__((__format__ (__printf__, 1, 2))) void (*dummy2)(const char *fmt,...)); ], [], [ cachevar='yes' ],[ cachevar='no/warning' ],[ cachevar='no/error' ]) ) if test "$cachevar" = yes; then AC_DEFINE([$1]_ATTRIBUTE_FORMAT_FUNCPTR_ARG) else AC_DEFINE([$1]_ATTRIBUTE_FORMAT_FUNCPTR_ARG, 0) fi popdef([cachevar]) # bug 3613: try to enable any warning settings that might be relevant to -Wunknown-pragmas GASNET_PUSHVAR(CPPFLAGS,"$CPPFLAGS") _gasnet_CPPFLAGS_back="$CPPFLAGS" for flag in '-Wall' '-Wextra' '-Wunknown-pragmas' ; do AC_MSG_CHECKING(for compiler flag $flag) CPPFLAGS="$CPPFLAGS $flag" GASNET_TRY_COMPILE_WITHWARN(GASNETI_C_OR_CXX([$1]), [], [], [ AC_MSG_RESULT(yes) ; _gasnet_CPPFLAGS_back="$CPPFLAGS" ], [ AC_MSG_RESULT(no) ; CPPFLAGS="$_gasnet_CPPFLAGS_back" ], [ AC_MSG_RESULT(no) ; CPPFLAGS="$_gasnet_CPPFLAGS_back" ]) done pushdef([cachevar],cv_prefix[]translit([$1],'A-Z','a-z')[]_pragma_gcc_diagnostic) AC_CACHE_CHECK($2 for pragma GCC diagnostic push/pop/ignored, cachevar, # Note we're not checking whether the pragma actually *does* anything, # we only care that it doesn't generate new warnings, ie silently ignored is fine for our purposes GASNET_TRY_COMPILE_WITHWARN(GASNETI_C_OR_CXX([$1]), [ _Pragma("GCC diagnostic push") #ifndef __cplusplus _Pragma("GCC diagnostic ignored \"-Wstrict-prototypes\"") _Pragma("GCC diagnostic ignored \"-Wmissing-prototypes\"") #endif _Pragma("GCC diagnostic ignored \"-Wunused-function\"") _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") _Pragma("GCC diagnostic ignored \"-Wunused-value\"") _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") _Pragma("GCC diagnostic ignored \"-Wunused\"") static int foo = 5; static void bar(void) { } _Pragma("GCC diagnostic pop") ], [ ], [ cachevar='yes' ],[ cachevar='no/warning' ],[ cachevar='no/error' ]) ) if test "$cachevar" = yes; then AC_DEFINE([$1]_PRAGMA_GCC_DIAGNOSTIC) else AC_DEFINE([$1]_PRAGMA_GCC_DIAGNOSTIC, 0) fi popdef([cachevar]) GASNET_POPVAR(CPPFLAGS) ]) dnl check whether a given C++11 attribute is available dnl GASNET_CHECK_CXX11_ATTRIBUTE(PREFIX, compiler-name, attribute-name, declaration, code) dnl Independent of PREFIX the test is run as LANG_CPLUSPLUS dnl Caller is responsible for setting of CXX and friends in the MPI_CXX case (if any) AC_DEFUN([GASNET_CHECK_CXX11_ATTRIBUTE],[ GASNET_FUN_BEGIN([$0($1,$2,$3)]) pushdef([uppername],translit(patsubst([$3], [_], []),'a-z:','A-Z_')) pushdef([cachevar],cv_prefix[]translit([$1]_cppattr_[]uppername,'A-Z','a-z')) AC_CACHE_CHECK($2 for C++ attribute [[[[$3]]]], cachevar, GASNET_TRY_COMPILE_WITHWARN(CXX, [$4], [$5], [ cachevar='yes' ],[ dnl cachevar="no/warning: $gasnet_cmd_stdout$gasnet_cmd_stderr" cachevar='no/warning' ],[ dnl cachevar="no/error: $gasnet_cmd_stdout$gasnet_cmd_stderr" cachevar='no/error' ]) ) if test "$cachevar" = yes; then AC_DEFINE($1_CXX11_ATTRIBUTE_[]uppername) AC_DEFINE($1_CXX11_ATTRIBUTE) else AC_DEFINE($1_CXX11_ATTRIBUTE_[]uppername, 0) fi GASNET_FUN_END([$0($1,$2,$3)]) popdef([cachevar]) popdef([uppername]) ]) dnl GASNET_GET_CXX11_ATTRIBUTES(PREFIX, opt compiler-name) dnl Check all C++11 attributes of interest/importance to GASNet dnl Caller must setup CXX, CXXFLAGS, etc for MPI_CXX case (if any). AC_DEFUN([GASNET_GET_CXX11_ATTRIBUTES],[ GASNET_CHECK_CXX11_ATTRIBUTE([$1], [$2], [fallthrough], [int dummy(int x) { int result = 0; switch (x) { case 3: result++; [[[[fallthrough]]]]; case 2: result++; [[[[fallthrough]]]]; case 1: result++; } return result; }]) GASNET_CHECK_CXX11_ATTRIBUTE([$1], [$2], [clang::fallthrough], [int dummy(int x) { int result = 0; switch (x) { case 3: result++; [[[[clang::fallthrough]]]]; case 2: result++; [[[[clang::fallthrough]]]]; case 1: result++; } return result; }]) ]) dnl Check to see if __thread attribute exists and works dnl Caller must setup CFLAGS/LIBS to support pthreaded compilation dnl GASNET_CHECK_TLS_SUPPORT(action-if-yes, action-if-no) AC_DEFUN([GASNET_CHECK_TLS_SUPPORT],[ GASNET_FUN_BEGIN([$0]) GASNET_TRY_CACHE_RUN_WITHCC([whether the GCC __thread extension is supported.], tls_supported, [ #include #include #include #include #define NTHREADS 5 pthread_t p[[NTHREADS]]; pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; extern __thread long tlocal; void foo() { tlocal = 4; } /* extern + use + definition crashes gcc-3.3/ia64 */ __thread long tlocal = 0; /* trigger a bug on gcc-3.4/solaris/SPARC - misalignment during compilation with -g leads to a link error: relocation error: R_SPARC_TLS_DTPOFF32 .. symbol misc2: offset 0xff351dd1 is non-aligned */ __thread int misc = 0; __thread long misc2 = 0; void * thread_start (void *arg) { int id = *((int *)arg); int *return_val = malloc(sizeof(int)); if (pthread_mutex_lock (&lock)) { exit (2); } /* if the value is truly thread-local, this assignment will yield the value 1, for each thread. If tlocal is instead a process global static value then tlocal will be incremented by each thread, and its final value will be the number of threads. */ tlocal += 1; if (pthread_mutex_unlock (&lock)) { exit (2); } *return_val = tlocal; /* detect an Intel 9.0/9.1 bug on x86/Linux (n2001) */ if (misc != 0 || misc2 != 0) *return_val = -1; return return_val; } ],[ int i; for (i = 0; i < NTHREADS; ++i) { int *id = (int *)malloc(sizeof(int)); *id = i; if (pthread_create(&p[[i]], NULL, thread_start, id)) { exit (2); } } for (i = 0; i < NTHREADS; ++i) { int *rc; if (pthread_join (p[[i]], (void **)&rc)) { exit (2); } if (*rc != 1) { exit (1); } } return 0; ],[$1],[$2]) GASNET_FUN_END([$0]) ]) dnl Output compilation error information, if available and do a AC_MSG_ERROR dnl should be used within the failed branch of the compile macro, otherwise dnl use GASNET_ERR_SAVE() in the failed branch to save the error info AC_DEFUN([GASNET_MSG_ERROR],[ pushdef([usermsg],[patsubst([$1],["],[\\"])]) echo echo "configure error: usermsg" if test "" ; then if test -f "conftest.$ac_ext" ; then errfile=conftest.$ac_ext else errfile=gasnet_errsave_file fi if test -f "$errfile" ; then echo echo " --- Failed program --- " cat $errfile echo " -----------------------" fi fi if test -f "conftest.err" ; then errfile=conftest.err else errfile=gasnet_errsave_err fi if test -f "$errfile" ; then echo echo "Compilation error: " echo cat $errfile fi echo CONFIG_FILE=`pwd`/config.log AC_MSG_ERROR(See $CONFIG_FILE for details.) popdef([usermsg]) ]) AC_DEFUN([GASNET_ERR_SAVE],[ if test -f "conftest.$ac_ext" ; then cp conftest.$ac_ext gasnet_errsave_file fi if test -f "conftest.err" ; then cp conftest.err gasnet_errsave_err fi ]) AC_DEFUN([GASNET_ERR_CLEANUP],[ rm -f gasnet_errsave_file gasnet_errsave_err ]) dnl Output a warning, and also save it to the warning list for summary display AC_DEFUN([GASNET_MSG_WARN],[ pushdef([usermsg],[patsubst([$1],["],[\\"])]) GASNET_FUN_BEGIN([$0()]) AC_MSG_WARN([$1]) echo "usermsg" >> "GASNET_CONFIGURE_WARNING_LOCAL" echo " " >> "GASNET_CONFIGURE_WARNING_LOCAL" GASNET_FUN_END([$0()]) popdef([usermsg]) ]) dnl Display the warning summary AC_DEFUN([GASNET_MSG_WARN_FINISH],[ if test -f "GASNET_CONFIGURE_WARNING_LOCAL" ; then echo "--------------------------------------------------------------------" >&2 echo "--------------------------------------------------------------------" >&5 echo "configure warning summary:" >&2 echo "configure warning summary:" >&5 echo " " >&2 echo " " >&5 cat "GASNET_CONFIGURE_WARNING_LOCAL" >&2 cat "GASNET_CONFIGURE_WARNING_LOCAL" >&5 mv "GASNET_CONFIGURE_WARNING_LOCAL" "GASNET_CONFIGURE_WARNING_LOCAL"- if test -n "$GASNET_CONFIGURE_WARNING_GLOBAL" ; then cat "GASNET_CONFIGURE_WARNING_LOCAL"- >> "$GASNET_CONFIGURE_WARNING_GLOBAL" fi rm -f "GASNET_CONFIGURE_WARNING_LOCAL" "GASNET_CONFIGURE_WARNING_LOCAL"- fi ]) dnl compile a program for a success/failure dnl GASNET_TRY_CACHE_CHECK(description,cache_name,includes,program,action-on-success,action-on-failure) AC_DEFUN([GASNET_TRY_CACHE_CHECK],[ GASNET_FUN_BEGIN([$0($1,$2,...)]) AC_CACHE_CHECK($1, cv_prefix[]$2, AC_TRY_COMPILE([$3], [$4], cv_prefix[]$2=yes, cv_prefix[]$2=no)) if test "$cv_prefix[]$2" = yes; then : $5 else : $6 fi GASNET_FUN_END([$0($1,$2,...)]) ]) dnl link a program for a success/failure dnl GASNET_TRY_CACHE_LINK(description,cache_name,includes,program,action-on-success,action-on-failure) AC_DEFUN([GASNET_TRY_CACHE_LINK],[ GASNET_FUN_BEGIN([$0($1,$2,...)]) AC_CACHE_CHECK($1, cv_prefix[]$2, AC_TRY_LINK([$3], [$4], cv_prefix[]$2=yes, cv_prefix[]$2=no)) if test "$cv_prefix[]$2" = yes; then : $5 else : $6 fi GASNET_FUN_END([$0($1,$2,...)]) ]) dnl run a program for a success/failure dnl GASNET_TRY_CACHE_RUN(description,cache_name,program,action-on-success,action-on-failure) AC_DEFUN([GASNET_TRY_CACHE_RUN],[ GASNET_FUN_BEGIN([$0($1,$2,...)]) AC_CACHE_CHECK($1, cv_prefix[]$2, AC_TRY_RUN([$3], cv_prefix[]$2=yes, cv_prefix[]$2=no, AC_MSG_ERROR(no default value for cross compiling))) if test "$cv_prefix[]$2" = yes; then : $4 else : $5 fi GASNET_FUN_END([$0($1,$2,...)]) ]) dnl compile and run a program and execute success/failure paths dnl cross-compilation will skip the run and assume success dnl GASNET_TRY_CACHE_RUN_WITHCC(description,cache_name,includes,program,action-on-success,action-on-failure) AC_DEFUN([GASNET_TRY_CACHE_RUN_WITHCC],[ GASNET_FUN_BEGIN([$0($1,$2,...)]) if test "$cross_compiling" = "yes" ; then GASNET_TRY_CACHE_LINK([$1],[$2],[$3],[$4],[$5],[$6]) else GASNET_TRY_CACHE_RUN([$1],[$2],[ $3 int main(void) { $4 return 0; } ],[$5],[$6]) fi GASNET_FUN_END([$0($1,$2,...)]) ]) dnl compile and run a program, error out if one fails (cross-compilation will skip the run) dnl GASNET_TRY_CACHE_VERIFY_RUN(description,cache_name,includes,program,errormsg-on-failure) AC_DEFUN([GASNET_TRY_CACHE_VERIFY_RUN],[ GASNET_TRY_CACHE_RUN_WITHCC([$1],[$2],[$3],[$4],[ ],[ GASNET_MSG_ERROR([$5]) ]) ]) dnl run a program to extract the value of a runtime expression dnl the provided code should set the integer val to the relevant value dnl GASNET_TRY_CACHE_RUN_EXPR(description,cache_name,headers,code_to_set_val,result_variable) AC_DEFUN([GASNET_TRY_CACHE_RUN_EXPR],[ GASNET_FUN_BEGIN([$0($1,$2,...)]) AC_CACHE_CHECK($1, cv_prefix[]$2, AC_TRY_RUN([ #include "confdefs.h" #include #include $3 int main(void) { FILE *f=fopen("conftestval", "w"); int val = 0; if (!f) exit(1); { $4; } fprintf(f, "%d\n", (int)(val)); return 0; }], cv_prefix[]$2=`cat conftestval`, cv_prefix[]$2=no, AC_MSG_ERROR(no default value for cross compiling))) if test "$cv_prefix[]$2" != no; then : $5=$cv_prefix[]$2 fi GASNET_FUN_END([$0($1,$2,...)]) ]) AC_DEFUN([GASNET_PROG_CPP], [ GASNET_FUN_BEGIN([$0]) AC_PROVIDE([$0]) AC_REQUIRE([AC_PROG_CC]) dnl bug 2648, 2748 AC_REQUIRE([AC_PROG_CPP]) AC_PROG_CC AC_PROG_CPP GASNET_GETFULLPATH(CPP) AC_SUBST(CPP) AC_SUBST(CPPFLAGS) AC_MSG_CHECKING(for working C preprocessor) AC_LANG_SAVE AC_LANG_C gasnet_progcpp_extrainfo= dnl deal with preprocessors who foolishly return success exit code even when they saw #error if test -n "`$CPP -version 2>&1 < /dev/null | grep MIPSpro`" ; then dnl The MIPSPro compiler has a broken preprocessor exit code by default, fix it dnl Using this flag is preferable to ensure that #errors encountered during compilation are fatal gasnet_progcpp_extrainfo=" (added -diag_error 1035 to deal with broken MIPSPro preprocessor)" CFLAGS="$CFLAGS -diag_error 1035" CPPFLAGS="$CPPFLAGS -diag_error 1035" fi dnl final check AC_TRY_CPP([ # error ], [GASNET_MSG_ERROR(Your C preprocessor is broken - reported success when it should have failed)], []) AC_TRY_CPP([], [], [GASNET_MSG_ERROR(Your C preprocessor is broken - reported failure when it should have succeeded)]) AC_TRY_CPP([ #ifdef __cplusplus #error __cplusplus should not be defined in a C preprocessor! #endif ], [], [GASNET_MSG_ERROR([Your C preprocessor is broken, it erroneously defines __cplusplus. This software requires a true, working ANSI C compiler - a C++ compiler is not an acceptable replacement.])]) AC_MSG_RESULT(yes$gasnet_progcpp_extrainfo) if test "$CPP" = "/lib/cpp" ; then badlibcppmsg="Autoconf detected your preprocessor to be '/lib/cpp' instead of '$CC -E'. This is almost always a mistake, resulting from either a broken C compiler or an outdated version of autoconf. Proceeding is very likely to result in incorrect configure decisions." GASNET_IF_ENABLED(allow-libcpp, Allow the use of /lib/cpp for preprocessing, [ GASNET_MSG_WARN([$badlibcppmsg]) ],[ AC_MSG_ERROR([$badlibcppmsg \ You may enable use of this preprocessor at your own risk by passing the --enable-allow-libcpp flag.]) ]) fi AC_LANG_RESTORE GASNET_FUN_END([$0]) ]) AC_DEFUN([GASNET_PROG_CXXCPP], [ GASNET_FUN_BEGIN([$0]) AC_PROVIDE([$0]) AC_REQUIRE([AC_PROG_CXX]) dnl bug 2648, 2748 AC_REQUIRE([AC_PROG_CXXCPP]) AC_PROG_CXX AC_PROG_CXXCPP GASNET_GETFULLPATH(CXXCPP) AC_SUBST(CXXCPP) AC_MSG_CHECKING(for working C++ preprocessor) AC_LANG_SAVE AC_LANG_CPLUSPLUS gasnet_progcxxcpp_extrainfo= dnl deal with preprocessors who foolishly return success exit code even when they saw #error if test -n "`$CXXCPP -version 2>&1 < /dev/null | grep MIPSpro`" ; then dnl The MIPSPro compiler has a broken preprocessor exit code by default, fix it dnl Using this flag is preferable to ensure that #errors encountered during compilation are fatal gasnet_progcxxcpp_extrainfo=" (added -diag_error 1035 to deal with broken MIPSPro preprocessor)" CXXFLAGS="$CXXFLAGS -diag_error 1035" fi dnl final check AC_TRY_CPP([ # error ], [GASNET_MSG_ERROR(Your C++ preprocessor is broken - reported success when it should have failed)], []) AC_TRY_CPP([], [], [GASNET_MSG_ERROR(Your C++ preprocessor is broken - reported failure when it should have succeeded)]) AC_TRY_CPP([ #ifndef __cplusplus #error __cplusplus must be defined in a C++ preprocessor! #endif ], [], [GASNET_MSG_ERROR([Your C++ preprocessor is broken, it fails to define __cplusplus.])]) AC_MSG_RESULT(yes$gasnet_progcxxcpp_extrainfo) AC_LANG_RESTORE GASNET_FUN_END([$0]) ]) AC_DEFUN([GASNET_CHECK_CROSS_COMPILE], [ GASNET_FUN_BEGIN([$0]) AC_PROVIDE([$0]) AC_MSG_CHECKING(if user enabled cross-compile) GASNET_IF_ENABLED(cross-compile, [Enable cross-compilation], [ AC_MSG_RESULT(yes) CROSS_COMPILING=1 ], [ AC_MSG_RESULT(no) CROSS_COMPILING=0 ]) GASNET_FUN_END([$0]) ]) AC_DEFUN([GASNET_SET_CROSS_COMPILE], [ GASNET_FUN_BEGIN([$0]) AC_PROVIDE([$0]) AC_REQUIRE([GASNET_CHECK_CROSS_COMPILE]) dnl older versions of autoconf unconditionally test executables during compiler detection and set the cross vars dnl however this auto-detection can generate wrong answers when the compiler is broken or the target is partially compatible dnl This function resets the autoconf cross vars to the correct value, overriding the unreliable auto-detection if test "$CROSS_COMPILING" = 0; then cross_compiling=no ac_cv_prog_cc_cross=no ac_cv_prog_cxx_cross=no else cross_compiling=yes ac_cv_prog_cc_cross=yes ac_cv_prog_cxx_cross=yes fi GASNET_FUN_END([$0]) ]) AC_DEFUN([GASNET_PROG_CC], [ GASNET_FUN_BEGIN([$0]) AC_REQUIRE([GASNET_SET_CROSS_COMPILE]) GASNET_PROG_CPP GASNET_GETFULLPATH(CC) dnl must come after PROG_CPP AC_SUBST(CC) AC_SUBST(CFLAGS) AC_MSG_CHECKING(for working C compiler) AC_LANG_SAVE AC_LANG_C AC_TRY_COMPILE([], [ fail for me ], [GASNET_MSG_ERROR(Your C compiler is broken - reported success when it should have failed)], []) AC_TRY_COMPILE([ #include #include ], [ printf("hi\n"); exit(0); ], [], [GASNET_MSG_ERROR(Your C compiler is broken - reported failure when it should have succeeded)]) AC_TRY_COMPILE([ double *p; void *foo(double *d) { return d; } ], [ double d; /* (void *) is compatible with any pointer type in a C program */ p = foo((void *)&d); ], [], [GASNET_MSG_ERROR([Your C compiler is broken, it fails to compile a simple C program using implicit void* conversion. This software requires a true, working ANSI C compiler - note that a C++ compiler is not an acceptable replacement.])]) AC_TRY_LINK([ extern int some_bogus_nonexistent_symbol(); ], [ int x = some_bogus_nonexistent_symbol(); ], [GASNET_MSG_ERROR(Your C linker is broken - reported success when it should have failed)], []) AC_TRY_LINK([ #include #include ], [ printf("hi\n"); exit(0); ], [], [GASNET_MSG_ERROR(Your C link is broken - reported failure when it should have succeeded)]) AC_MSG_RESULT(yes) GASNET_SET_CROSS_COMPILE if test "$cross_compiling" = no; then AC_MSG_CHECKING([working C compiler executables]) AC_TRY_RUN([int main(void) { return 0; }], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) GASNET_MSG_ERROR([Cannot run executables created with C compiler. If you're attempting to cross-compile, use --enable-cross-compile])], [GASNET_MSG_ERROR(Internal configure error - please report)]) fi AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes") AC_SUBST(CROSS_COMPILING) AC_LANG_RESTORE GASNET_FUN_END([$0]) ]) AC_DEFUN([GASNET_PROG_CXX], [ GASNET_FUN_BEGIN([$0]) AC_REQUIRE([GASNET_SET_CROSS_COMPILE]) GASNET_PROG_CXXCPP GASNET_GETFULLPATH(CXX) dnl must come after PROG_CXXCPP AC_SUBST(CXX) AC_SUBST(CXXFLAGS) AC_MSG_CHECKING(for working C++ compiler) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([], [ fail for me ], [GASNET_MSG_ERROR(Your C++ compiler is broken - reported success when it should have failed)], []) AC_TRY_COMPILE([ #include #include ], [ printf("hi\n"); exit(0); ], [], [GASNET_MSG_ERROR(Your C++ compiler is broken - reported failure when it should have succeeded)]) AC_TRY_LINK([ extern int some_bogus_nonexistent_symbol(); ], [ int x = some_bogus_nonexistent_symbol(); ], [GASNET_MSG_ERROR(Your C++ linker is broken - reported success when it should have failed)], []) AC_TRY_LINK([ #include #include ], [ printf("hi\n"); exit(0); ], [], [GASNET_MSG_ERROR(Your C++ link is broken - reported failure when it should have succeeded)]) AC_MSG_RESULT(yes) GASNET_SET_CROSS_COMPILE if test "$cross_compiling" = no; then AC_MSG_CHECKING([working C++ compiler executables]) AC_TRY_RUN([int main(void) { return 0; }], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) GASNET_MSG_ERROR([Cannot run executables created with C++ compiler. If you're attempting to cross-compile, use --enable-cross-compile])], [GASNET_MSG_ERROR(Internal configure error - please report)]) fi AC_LANG_RESTORE GASNET_FUN_END([$0]) ]) AC_DEFUN([GASNET_HOSTCC_BEGIN], [ GASNET_FUN_BEGIN([$0]) if test "$CROSS_COMPILING" != "1" ; then AC_MSG_ERROR([Internal error - please report]) fi GASNET_PUSHVAR(CC,"$HOST_CC") GASNET_PUSHVAR(CFLAGS,"$HOST_CFLAGS") GASNET_PUSHVAR(LDFLAGS,"$HOST_LDFLAGS") GASNET_PUSHVAR(LIBS,"$HOST_LIBS") dnl push all the other goop that AC_PROG_C(PP) caches away GASNET_PUSHVAR_UNSET(CPP) GASNET_PUSHVAR_UNSET(CPPFLAGS) GASNET_PUSHVAR_UNSET(ac_cv_prog_CC) GASNET_PUSHVAR_UNSET(ac_cv_prog_CPP) GASNET_PUSHVAR_UNSET(ac_cv_c_compiler_gnu) GASNET_PUSHVAR_UNSET(ac_cv_prog_cc_g) GASNET_PUSHVAR_UNSET(ac_cv_prog_cc_stdc) GASNET_PUSHVAR_UNSET(ac_cv_objext) GASNET_PUSHVAR(cross_compiling,"no") GASNET_FUN_END([$0]) ]) AC_DEFUN([GASNET_HOSTCC_END], [ GASNET_FUN_BEGIN([$0]) if test "$CROSS_COMPILING" != "1" ; then AC_MSG_ERROR([Internal error - please report]) fi GASNET_POPVAR(CC) GASNET_POPVAR(CFLAGS) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(LIBS) GASNET_POPVAR(CPP) GASNET_POPVAR(CPPFLAGS) GASNET_POPVAR(ac_cv_prog_CC) GASNET_POPVAR(ac_cv_prog_CPP) GASNET_POPVAR(ac_cv_c_compiler_gnu) GASNET_POPVAR(ac_cv_prog_cc_g) GASNET_POPVAR(ac_cv_prog_cc_stdc) GASNET_POPVAR(ac_cv_objext) GASNET_POPVAR(cross_compiling) GASNET_FUN_END([$0]) ]) dnl fetch the host C compiler AC_DEFUN([GASNET_PROG_HOSTCC], [ GASNET_FUN_BEGIN([$0]) if test "$cross_compiling" = "yes" ; then HOST_MSG="When cross-compiling, \$HOST_CC or --with-host-cc= must be set to indicate a C compiler for the host machine (ie the machine running this configure script)" pushdef([GASNET_SUPPRESSHELP],1) GASNET_ENV_DEFAULT(HOST_CC, ) GASNET_ENV_DEFAULT(HOST_CFLAGS, ) GASNET_ENV_DEFAULT(HOST_LDFLAGS, ) GASNET_ENV_DEFAULT(HOST_LIBS, ) popdef([GASNET_SUPPRESSHELP]) AC_SUBST(HOST_CC) AC_SUBST(HOST_CFLAGS) AC_SUBST(HOST_LDFLAGS) AC_SUBST(HOST_LIBS) if test ! "$HOST_CC" ; then AC_MSG_ERROR([$HOST_MSG]) fi GASNET_HOSTCC_BEGIN GASNET_PROG_CC AC_LANG_SAVE AC_LANG_C GASNET_PUSHVAR(cross_compiling,"no") AC_MSG_CHECKING([working host C compiler executables]) AC_TRY_RUN([int main(void) { return 0; }], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) GASNET_MSG_ERROR($HOST_MSG)], [GASNET_MSG_ERROR(Internal configure error - please report)]) GASNET_POPVAR(cross_compiling) HOST_CC="$CC" HOST_CPP="$CPP" HOST_CPPFLAGS="$CPPFLAGS" HOST_CFLAGS="$CFLAGS" HOST_LDFLAGS="$LDFLAGS" HOST_LIBS="$LIBS" AC_LANG_RESTORE GASNET_HOSTCC_END fi GASNET_FUN_END([$0]) ]) dnl fetch the host C++ compiler dnl this is a two part macro which must be called one after the other at the top level dnl in order to avoid some annoying bugs in autoconf AC_REQUIRE AC_DEFUN([GASNET_PROG_HOSTCXX], [ GASNET_FUN_BEGIN([$0]) if test "$cross_compiling" = "yes" ; then HOST_MSG="When cross-compiling, \$HOST_CXX or --with-host-cxx= must be set to indicate a C++ compiler for the host machine (ie the machine running this configure script)" pushdef([GASNET_SUPPRESSHELP],1) GASNET_ENV_DEFAULT(HOST_CXX, ) GASNET_ENV_DEFAULT(HOST_CXXFLAGS, ) GASNET_ENV_DEFAULT(HOST_CXX_LDFLAGS, ) GASNET_ENV_DEFAULT(HOST_CXX_LIBS, ) popdef([GASNET_SUPPRESSHELP]) AC_SUBST(HOST_CXX) AC_SUBST(HOST_CXXFLAGS) AC_SUBST(HOST_CXX_LDFLAGS) AC_SUBST(HOST_CXX_LIBS) if test ! "$HOST_CXX" ; then AC_MSG_ERROR([$HOST_MSG]) fi GASNET_PUSHVAR(CXX,"$HOST_CXX") GASNET_PUSHVAR(CXXFLAGS,"$HOST_CXXFLAGS") GASNET_PUSHVAR(LDFLAGS,"$HOST_CXX_LDFLAGS") GASNET_PUSHVAR(LIBS,"$HOST_CXX_LIBS") dnl push all the other goop that AC_PROG_CXX(CPP) caches away GASNET_PUSHVAR_UNSET(CXXCPP) GASNET_PUSHVAR_UNSET(ac_cv_prog_CXX) GASNET_PUSHVAR_UNSET(ac_cv_prog_CXXCPP) GASNET_PUSHVAR_UNSET(ac_cv_cxx_compiler_gnu) GASNET_PUSHVAR_UNSET(ac_cv_prog_cxx_g) GASNET_PROG_CXX AC_LANG_SAVE AC_LANG_CPLUSPLUS GASNET_PUSHVAR(cross_compiling,"no") AC_MSG_CHECKING([working host CXX compiler executables]) AC_TRY_RUN([int main(void) { return 0; }], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) GASNET_MSG_ERROR($HOST_MSG)], [GASNET_MSG_ERROR(Internal configure error - please report)]) GASNET_POPVAR(cross_compiling) HOST_CXX="$CXX" HOST_CXXCPP="$CXXCPP" HOST_CXXFLAGS="$CXXFLAGS" HOST_CXX_LDFLAGS="$LDFLAGS" HOST_CXX_LIBS="$LIBS" AC_LANG_RESTORE GASNET_POPVAR(CXX) GASNET_POPVAR(CXXFLAGS) GASNET_POPVAR(CXXCPP) GASNET_POPVAR(LDFLAGS) GASNET_POPVAR(LIBS) GASNET_POPVAR(ac_cv_prog_CXX) GASNET_POPVAR(ac_cv_prog_CXXCPP) GASNET_POPVAR(ac_cv_cxx_compiler_gnu) GASNET_POPVAR(ac_cv_prog_cxx_g) fi GASNET_FUN_END([$0]) ]) dnl find working version of perl. Checks to see if 'bytes' module is available, dnl and sets GASNET_PERL_BYTESFLAG to either '-Mbytes' or empty string, for dnl scripts that need to ward off Perl/UTF-8 issues dnl similiarly determines if LANG=en_US is available, setting GASNET_PERL_LANG AC_DEFUN([GASNET_PROG_PERL],[ GASNET_FUN_BEGIN([$0]) GASNET_PATH_PROGS(PERL, perl5 perl, perl) MIN_PERL_VERSION="5.005" AC_MSG_CHECKING(for perl version $MIN_PERL_VERSION or later) if $PERL -e "require $MIN_PERL_VERSION;" 2>/dev/null; then dnl NOTE: unused $x below avoids unbalanced square brackets PERL_VERSION=[`$PERL -e 'my $x="["; print (defined $^V ? $^V : $])'`] AC_MSG_RESULT(yes: $PERL_VERSION) else AC_MSG_ERROR(cannot find perl $MIN_PERL_VERSION or later) fi if $PERL -Mbytes -e "exit 0" 2>/dev/null; then GASNET_PERL_BYTESFLAG="-Mbytes" else GASNET_PERL_BYTESFLAG= fi AC_SUBST(GASNET_PERL_BYTESFLAG) if test -n "`env LC_ALL=en_US LANG=en_US $PERL -e 'exit 0' 2>&1 | grep locale`"; then GASNET_PERL_LANG=C else GASNET_PERL_LANG=en_US fi AC_SUBST(GASNET_PERL_LANG) GASNET_FUN_END([$0]) ]) dnl GASNET_IFDEF(preprocsymbol[, action-if-defined, action-if-notdefined, forcecompile]) dnl test whether preprocsymbol is defined and execute appropriate action dnl forcecompile forces a full compile, otherwise just use preprocessor AC_DEFUN([GASNET_IFDEF],[ GASNET_FUN_BEGIN([$0($1,...,$4)]) if test -z "$4" ; then AC_TRY_CPP([ #ifndef $1 # error #endif], [$2], [$3]) else AC_TRY_COMPILE([ #ifndef $1 # error #endif], [ ], [$2], [$3]) fi GASNET_FUN_END([$0($1,...,$4)]) ]) dnl GASNET_FAMILY_CACHE_CHECK(lang-display-name, (CC|MPI_CC|CXX), family_output_var) AC_DEFUN([GASNET_FAMILY_CACHE_CHECK],[ GASNET_FUN_BEGIN([$0($1,$2,$3)]) AC_REQUIRE_CPP AC_CACHE_CHECK(for $1 compiler family, $3, [ if test "$2" != "CXX" ; then _GASNET_FAMILY_CACHE_CHECK_PREPROC="$CPP" else _GASNET_FAMILY_CACHE_CHECK_PREPROC="$CXXCPP" fi if test "`echo '$_GASNET_FAMILY_CACHE_CHECK_PREPROC' | grep '[$]$1'`" = "" ; then # preprocessor may differ from true compiler, so force full compilation testing _force_compile=1 else _force_compile= fi $3=unknown dnl start with compilers having very slow preprocessors if test "$$3" = "unknown"; then GASNET_IFDEF(__xlC__, $3=XLC, [], $_force_compile) fi if test "$$3" = "unknown"; then GASNET_IFDEF(__ibmxl__, $3=XLC, [], $_force_compile) fi if test "$$3" = "unknown"; then GASNET_IFDEF(_CRAYC, $3=Cray, [], $_force_compile) fi dnl gcc-like compilers, which may define __GNUC__ - order matters here if test "$$3" = "unknown"; then GASNET_IFDEF(__GNUC__, $3=GNU, [], $_force_compile) dnl Note GNUC one above must precede many of those below GASNET_IFDEF(__clang__, $3=Clang, [], $_force_compile) dnl Note __clang__ must precede one or more of those below GASNET_IFDEF(__PGI, $3=PGI, [], $_force_compile) dnl Note __PGI must precede __NVCOMPILER GASNET_IFDEF(__NVCOMPILER, $3=NVHPC, [], $_force_compile) GASNET_IFDEF(__INTEL_COMPILER, $3=Intel, [], $_force_compile) GASNET_IFDEF(__OPENCC__, $3=Open64, [], $_force_compile) GASNET_IFDEF(__PCC__, $3=PCC, [], $_force_compile) GASNET_IFDEF(__PATHCC__, $3=Pathscale, [], $_force_compile) fi dnl other vendor compilers if test "$$3" = "unknown"; then GASNET_IFDEF(__DECC, $3=Compaq, [], $_force_compile) # Compaq C GASNET_IFDEF(__DECCXX, $3=Compaq, [], $_force_compile) # Compaq C++ fi if test "$$3" = "unknown"; then GASNET_IFDEF(__SUNPRO_C, $3=Sun, [], $_force_compile) # Sun C GASNET_IFDEF(__SUNPRO_CC, $3=Sun, [], $_force_compile) # Sun C++ fi if test "$$3" = "unknown"; then GASNET_IFDEF(__HP_cc, $3=HP, [], $_force_compile) # HP C GASNET_IFDEF(__HP_aCC, $3=HP, [], $_force_compile) # HP aCC (C++) fi if test "$$3" = "unknown"; then GASNET_IFDEF(_SGI_COMPILER_VERSION, $3=MIPS, [], $_force_compile) fi if test "$$3" = "unknown"; then GASNET_IFDEF(__MTA__, $3=MTA, [], $_force_compile) fi if test "$$3" = "unknown"; then GASNET_IFDEF(__KCC, $3=KAI, [], $_force_compile) fi if test "$$3" = "unknown"; then GASNET_IFDEF(__TINYC__, $3=TINY, [], $_force_compile) fi if test "$$3" = "unknown"; then GASNET_IFDEF(__LCC__, $3=LCC, [], $_force_compile) fi dnl compilers lacking specific identifying marks - identify by platform if test "$$3" = "unknown"; then GASNET_IFDEF(_SX, $3=NEC) GASNET_IFDEF(__sgi, $3=MIPS) # MIPSPro 7.3.0 and earlier fi ]) if test "$$3" != "GNU" ; then dnl Some compilers (eg Intel 8.0) define __GNUC__ even though they are definitely not GNU C dnl Don't believe their filthy lies case $2 in CC) ac_cv_c_compiler_gnu=no GCC="" ;; CXX) ac_cv_cxx_compiler_gnu=no GXX="" ;; esac fi dnl Compiler may have a sub-family too case "$$3" in GNU) $2_SUBFAMILY='GNU' GASNET_TRY_CACHE_EXTRACT_STR([for gcc version string],$2_gcc_version_string,[ #ifndef __VERSION__ #define __VERSION__ "unknown" #endif ],[__VERSION__],[_gasnet_$2_gcc_version_string]) case "$_gasnet_$2_gcc_version_string" in *gccfss*) $2_SUBFAMILY='GCCFSS';; *Advance-Toolchain*) $2_SUBFAMILY='IBM';; *) GASNET_IFDEF(__APPLE_CC__, [$2_SUBFAMILY='APPLE']) GASNET_IFDEF(__NVCC__, [$2_SUBFAMILY='NVIDIA']) ;; esac ;; Clang) $2_SUBFAMILY='LLVM' GASNET_TRY_CACHE_EXTRACT_STR([for clang version string],$2_clang_version_string,[ #ifndef __VERSION__ #define __VERSION__ "unknown" #endif ],[__VERSION__],[_gasnet_$2_clang_version_string]) case "$_gasnet_$2_clang_version_string" in *Apple*) $2_SUBFAMILY='APPLE';; *Cray*) $2_SUBFAMILY='CRAY';; *AMD*) $2_SUBFAMILY='AMD';; *Arm*) $2_SUBFAMILY='ARM';; *Intel*) $2_SUBFAMILY='INTEL';; esac ;; *) $2_SUBFAMILY='none' ;; esac AC_MSG_CHECKING([for $1 compiler sub-family]) # real "checking" was done above AC_MSG_RESULT([$[]$2_SUBFAMILY]) $2_FAMILY=$$3 AC_SUBST($2_FAMILY) AC_SUBST($2_SUBFAMILY) GASNET_FUN_END([$0($1,$2,$3)]) ]) dnl deal with a buggy version of autoconf which assumes alloca returns char * AC_DEFUN([GASNET_FUNC_ALLOCA_HELPER],[ patsubst([$*], [p = alloca], [p = (char *)alloca]) ]) AC_DEFUN([GASNET_FUNC_ALLOCA],[ AC_SUBST(ALLOCA) GASNET_FUNC_ALLOCA_HELPER(AC_FUNC_ALLOCA) ]) dnl Set command for use in Makefile.am to install makefile fragments dnl This command should remove all the magic used to run from the build dnl directory, as well as deal with setting of the prefix at install time. dnl All expansions except '###INSTALL_PREFIX###' are relative to $(prefix). AC_DEFUN([GASNET_SET_INSTALL_CMD],[ GASNET_INSTALL_CMD="sed -e '/###NOINSTALL###/d' \ -e 's@###INSTALL_INCLUDE###@\$(includedir)@g' \ -e 's@###INSTALL_LIBEXEC###@\$(libexecdir)@g' \ -e 's@###INSTALL_DOC###@\$(docdir)@g' \ -e 's@###INSTALL_LIB###@\$(libdir)@g' \ -e 's@###INSTALL_BIN###@\$(bindir)@g' \ -e 's@###INSTALL_MAN###@\$(mandir)@g' \ -e 's@###INSTALL_ETC###@\$(sysconfdir)@g' \ -e 's@\$(prefix)/@\$\$(GASNET_PREFIX)/@g' \ -e 's@###INSTALL_PREFIX###@\$(prefix)@g'" AC_SUBST(GASNET_INSTALL_CMD) ]) dnl pass $1 to all subconfigures invoked recursively from this configure script AC_DEFUN([GASNET_SUBCONFIGURE_ARG],[ GASNET_FUN_BEGIN([$0($1)]) ac_configure_args="$ac_configure_args $1" GASNET_FUN_END([$0($1)]) ]) dnl GASNET_SUBCONFIGURE_INVOKE(subdirname, [shared_cache:0/1]) dnl recursively invoke a subconfigure in $1 AC_DEFUN([GASNET_SUBCONFIGURE_INVOKE],[ GASNET_FUN_BEGIN([$0($1)]) if test "$no_recursion" != yes; then ac_config_dir="$1" if test ! -f $srcdir/$ac_config_dir/configure; then AC_MSG_ERROR(failed to invoke sub-configure in $ac_config_dir - file not found) fi # Remove --cache-file, --srcdir and --prefix arguments so they do not pile up. ac_sub_configure_args= ac_prev= for ac_arg in $ac_configure_args; do if test -n "$ac_prev"; then ac_prev= continue fi case "$ac_arg" in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=*) ;; *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; esac done # Always prepend --prefix to ensure using the same prefix in sub-configs if test "$prefix" = "NONE" -a -n "$ac_default_prefix" ; then ac_sub_configure_args="--prefix=$ac_default_prefix $ac_sub_configure_args" else ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args" fi echo configuring in $ac_config_dir case "$srcdir" in .) ;; *) if test -d ./$ac_config_dir || mkdir -p ./$ac_config_dir; then :; else AC_MSG_ERROR(failed to create `pwd`/$ac_config_dir) fi ;; esac ac_popdir=`pwd` cd $ac_config_dir # A "../" for each directory in /$ac_config_dir. ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'` case "$srcdir" in .) # No --srcdir option. We are building in place. ac_sub_srcdir=$srcdir ;; /*) # Absolute path. ac_sub_srcdir=$srcdir/$ac_config_dir ;; *) # Relative path. ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; esac ac_sub_configure="$ac_sub_srcdir/configure" ac_sub_cache_file= if test "$2" = "1"; then # Make the cache file name correct relative to the subdirectory. case "$cache_file" in /*) ac_sub_cache_file=--cache-file=$cache_file ;; *) # Relative path. ac_sub_cache_file="--cache-file=$ac_dots$cache_file" ;; esac fi echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args" \ " $ac_sub_cache_file --srcdir=$ac_sub_srcdir" # The eval makes quoting arguments work. if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args \ $ac_sub_cache_file --srcdir=$ac_sub_srcdir then : else AC_MSG_ERROR(sub-configure failed for $ac_config_dir) fi cd "$ac_popdir" fi GASNET_FUN_END([$0($1)]) ]) dnl GASNET_SUBCONFIGURE_EXTRACT(subdirname, varname) dnl extract an AC_SUBST variable result from a recursively invoked subconfigure dnl and set it in the current scope AC_DEFUN([GASNET_SUBCONFIGURE_EXTRACT],[ GASNET_FUN_BEGIN([$0($1)]) AC_REQUIRE([GASNET_PROG_PERL]) AC_MSG_CHECKING([for $2 in $1]) _subconfig_extract_file="$1/config.status" if test ! -f $_subconfig_extract_file; then AC_MSG_ERROR([failed to open $_subconfig_extract_file - file not found]) fi _subconfig_extract_result=`$PERL -n -e 'if (m/^S\[["('$2')"\]]="(.*)"/) { print "[$]1='"'"'[$]2'"'"'"; };' -e 'if (m/^s(.)\@('$2')\@\1([[^\1]]*)\1/) { my ($var,$val) = ([$]2,[$]3); $val =~ s/\|#_!!_#\|//g; print "$var='"'"'$val'"'"'"; };' $_subconfig_extract_file` if test -n "$_subconfig_extract_result" ; then eval $_subconfig_extract_result AC_MSG_RESULT($[$2]) else AC_MSG_RESULT(failed) AC_MSG_ERROR([failed to extract $2 variable value from $_subconfig_extract_file]) fi GASNET_FUN_END([$0($1)]) ]) dnl fetch a cross-compilation variable, if we are cross compiling dnl if a default is not provided (or is empty) then var must be set dnl GASNET_CROSS_VAR(variable-to-set, basicname, default-value) AC_DEFUN([GASNET_CROSS_VAR],[ GASNET_FUN_BEGIN([$0($1,$2,$3)]) pushdef([cross_varname],CROSS_$2) if test "$cross_compiling" = "yes" ; then pushdef([GASNET_SUPPRESSHELP],1) GASNET_ENV_DEFAULT(cross_varname,$3) popdef([GASNET_SUPPRESSHELP]) if test "$cross_varname" = "" ; then AC_MSG_ERROR([This configure script requires \$cross_varname be set for cross-compilation]) else $1="$cross_varname" fi fi popdef([cross_varname]) GASNET_FUN_END([$0($1,$2,$3)]) ]) dnl query the numerical value of a system signal and AC_SUBST it AC_DEFUN([GASNET_GET_SIG], [ GASNET_FUN_BEGIN([$0]) if test "$cross_compiling" = "yes" ; then GASNET_TRY_CACHE_EXTRACT_EXPR([value of SIG$1 (binary probe)],SIG$1,[#include ],[SIG$1],SIG$1) if test -z "$SIG$1" ; then # last resort is to use CROSS var GASNET_CROSS_VAR(SIG$1,SIG$1) fi else GASNET_TRY_CACHE_RUN_EXPR([value of SIG$1], SIG$1, [#include ], [val = (int)SIG$1;], SIG$1) fi AC_SUBST(SIG$1) GASNET_FUN_END([$0]) ]) dnl check for endianness in a cross-compiling friendly way (using an object scan) dnl argument is optional prefix to WORDS_BIGENDIAN setting AC_DEFUN([GASNET_BIGENDIAN], [ GASNET_FUN_BEGIN([$0($1)]) AC_REQUIRE([GASNET_PROG_PERL]) if test "$cross_compiling" = "no" ; then GASNET_TRY_CACHE_RUN_EXPR([whether byte ordering is bigendian $1], c_bigendian,[ ],[ { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[[sizeof (long)]]; } u; u.l = 1; val = (u.c[[sizeof (long) - 1]] == 1); }], $1[]WORDS_BIGENDIAN) else AC_MSG_CHECKING(whether byte ordering is bigendian (binary probe) $1) pushdef([endiancode],[[ short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } int foo() { _ascii (); _ebcdic (); return 0; } ]]) $1[]WORDS_BIGENDIAN="" dnl try both link and compile, because some systems (eg X1) have an unscannable dnl string table in one or the other. Start with compile because it's faster pushdef([endianscan],[ # use perl here, because some greps barf on binary files (eg Solaris) if test `$PERL -ne 'if (m/BIGenDianSyS/) { print "yes\n"; }' $GASNET_EXAMINE_BIN` ; then $1[]WORDS_BIGENDIAN=1 fi if test `$PERL -ne 'if (m/LiTTleEnDian/) { print "yes\n"; }' $GASNET_EXAMINE_BIN` ; then if test -z "$[$1]WORDS_BIGENDIAN" ; then $1[]WORDS_BIGENDIAN=0 else $1[]WORDS_BIGENDIAN="" fi fi ]) GASNET_COMPILE_EXAMINE([ endiancode ],[foo();],[ endianscan ],[GASNET_MSG_ERROR(error building endian probe)]) if test -z "$[$1]WORDS_BIGENDIAN" ; then GASNET_LINK_EXAMINE([ endiancode ],[foo();],[ endianscan ],[GASNET_MSG_ERROR(error building endian probe)]) fi popdef([endianscan]) popdef([endiancode]) AC_MSG_RESULT($[$1]WORDS_BIGENDIAN) fi if test "$[$1]WORDS_BIGENDIAN" = "1"; then AC_DEFINE($1[]WORDS_BIGENDIAN, 1, [whether byteorder is bigendian]) elif test "$[$1]WORDS_BIGENDIAN" = ""; then GASNET_MSG_ERROR(Inconsistent results from endian probe) fi GASNET_FUN_END([$0($1)]) ]) dnl GASNET_COMPILE_EXAMINE(headers,body,action-success,action-failure) dnl compile the program given by headers and body dnl if it suceeds, run action-success with $GASNET_EXAMINE_BIN set to filename of generated object dnl else, run action-failure AC_DEFUN([GASNET_COMPILE_EXAMINE], [ AC_REQUIRE([AC_OBJEXT]) GASNET_FUN_BEGIN([$0(...)]) dnl allow variable expansion on headers for AC_INCLUDES_DEFAULT cat >conftest.$ac_ext <>conftest.$ac_ext <<"EOF" int main(void) { $2 return 0; } EOF if test ! -f conftest.$ac_ext ; then AC_MSG_ERROR(failed to write conftest.$ac_ext) fi if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest.${ac_objext} ; then GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO.${ac_objext}") mv conftest.${ac_objext} $GASNET_EXAMINE_BIN $3 rm -f $GASNET_EXAMINE_BIN GASNET_POPVAR(GASNET_EXAMINE_BIN) else echo Failed program: >&5 cat conftest.$ac_ext >&5 $4 fi GASNET_FUN_END([$0(...)]) ]) dnl GASNET_LINK_EXAMINE(headers,body,action-success,action-failure) dnl link the program given by headers and body dnl if it suceeds, run action-success with $GASNET_EXAMINE_BIN set to filename of generated executable dnl else, run action-failure AC_DEFUN([GASNET_LINK_EXAMINE], [ GASNET_FUN_BEGIN([$0(...)]) dnl allow variable expansion on headers for AC_INCLUDES_DEFAULT cat >conftest.$ac_ext <>conftest.$ac_ext <<"EOF" int main(void) { $2 return 0; } EOF if test ! -f conftest.$ac_ext ; then AC_MSG_ERROR(failed to write conftest.$ac_ext) fi if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && \ test -f conftest$ac_exeext ; then GASNET_PUSHVAR(GASNET_EXAMINE_BIN,"gasnet-examine-bin-$LINENO$ac_exeext") mv conftest$ac_exeext $GASNET_EXAMINE_BIN $3 rm -f $GASNET_EXAMINE_BIN GASNET_POPVAR(GASNET_EXAMINE_BIN) else echo Failed program: >&5 cat conftest.$ac_ext >&5 $4 fi GASNET_FUN_END([$0(...)]) ]) dnl build a program and extract the value of a compile-time constant string expression dnl GASNET_TRY_CACHE_EXTRACT_STR(description,cache_name,headers,expression,result_variable) AC_DEFUN([GASNET_TRY_CACHE_EXTRACT_STR],[ AC_REQUIRE([GASNET_PROG_PERL]) GASNET_FUN_BEGIN([$0($1,$2,...)]) AC_CACHE_CHECK($1, cv_prefix[]$2,[ cv_prefix[]$2="" _extractstrembed='"$gasnetextractstr: (-(|" $4 "|)-) $"' pushdef([embedcode],[ #include extern const char *s; const char *s = $_extractstrembed; ]) pushdef([unpackcode],[ _extract_prog='BEGIN{$/="\0";} if (m/\$gasnetextractstr: \(-\(\|(.+?)\|\)-\) \$/) { print "[$]1"; exit 0;}' cv_prefix[]$2=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` ]) GASNET_COMPILE_EXAMINE([$3 embedcode ],[ printf("%s",s); ], [ unpackcode ],[GASNET_MSG_ERROR(Failed while compile extracting $4)]) if test -z "$cv_prefix[]$2" ; then GASNET_LINK_EXAMINE([$3 embedcode ],[ printf("%s",s); ], [ unpackcode ],[GASNET_MSG_ERROR(Failed while link extracting $4)]) fi popdef([unpackcode]) popdef([embedcode]) ]) if test -n "$cv_prefix[]$2" ; then $5=$cv_prefix[]$2 fi GASNET_FUN_END([$0($1,$2,...)]) ]) dnl build a program and extract the value of a compile-time constant expression dnl GASNET_TRY_CACHE_EXTRACT_EXPR(description,cache_name,headers,expression,result_variable) AC_DEFUN([GASNET_TRY_CACHE_EXTRACT_EXPR],[ AC_REQUIRE([GASNET_PROG_PERL]) GASNET_FUN_BEGIN([$0($1,$2,...)]) AC_CACHE_CHECK($1, cv_prefix[]$2,[ cv_prefix[]$2="" pushdef([embedcode],[ #include extern char s[[]]; #define DIGIT(d) (((char)(( (($4)>0?($4):-($4)) >>(d*4))&0xF))+0x40) char s[[]] = {'$','g','a','s','n','e','t','e','x','t','r','a','c','t','e','x','p','r',':',' ', (($4)>=0?' ':'-'), ' ', DIGIT(7),DIGIT(6),DIGIT(5),DIGIT(4), DIGIT(3),DIGIT(2),DIGIT(1),DIGIT(0), ' ','$','\0'}; ]) pushdef([unpackcode],[ _extract_prog='BEGIN{$/="\$";} if (m/^gasnetextractexpr: ([[ -]]) (.+?) \$/) { map($val=($val<<4)+($_-0x40),unpack("C8",[$]2)); print "-" if ([$]1 eq "-"); print $val; exit 0;}' cv_prefix[]$2=`$PERL $GASNET_PERL_BYTESFLAG -ne "$_extract_prog" $GASNET_EXAMINE_BIN` ]) dnl Do not remove the "static" from the decl of "p" in GASNET_{COMPILE,LINK}_EXAMINE calls below. dnl It prevents (at least) Apple Clang 9.0.0 LTO from optimizing out the char array! GASNET_COMPILE_EXAMINE([$3 embedcode ],[ static char *p = s; while (*p) printf("%c",*(p++)); ], [ unpackcode ],[GASNET_MSG_ERROR(Failed while compile extracting $4)]) if test -z "$cv_prefix[]$2" ; then GASNET_LINK_EXAMINE([$3 embedcode ],[ static char *p = s; while (*p) printf("%c",*(p++)); ], [ unpackcode ],[GASNET_MSG_ERROR(Failed while link extracting $4)]) fi popdef([unpackcode]) popdef([embedcode]) ]) if test -n "$cv_prefix[]$2" ; then $5=$cv_prefix[]$2 fi GASNET_FUN_END([$0($1,$2,...)]) ]) gasnet-2025.8.0/gasnet_tools.c0000664000175000017500000047241015142313673016277 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_tools.c $ * Description: GASNet implementation of internal helpers * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #if defined(GASNETT_THREAD_SAFE) || defined(GASNETT_THREAD_SINGLE) /* nothing */ #elif defined(GASNET_PAR) #define GASNETT_THREAD_SAFE 1 #elif defined(GASNET_SEQ) || defined(GASNET_PARSYNC) #define GASNETT_THREAD_SINGLE 1 #else #error Missing threading definition #endif // this file is built for exactly one of libgasnet/tools or libgasnet/conduit #if (GASNETI_BUILDING_TOOLS && GASNETI_BUILDING_CONDUIT) || (!GASNETI_BUILDING_TOOLS && !GASNETI_BUILDING_CONDUIT) #error Invalid GASNETI_BUILDING_ macro #endif #undef GASNET_SEQ #undef GASNET_PAR #undef GASNET_PARSYNC #include #include #include #include #include #include #include #include #include #include #include /* gasneti_system_redirected_coprocess */ #include #include #include /* gasneti_gettimeofday_us, gasneti_nsleep */ #include /* gasneti_gettimeofday_us, gasneti_nsleep */ #include #if HAVE_EXECINFO_H #include #endif #ifdef HAVE_UCONTEXT_H #include #endif #ifdef HAVE_SYS_RESOURCE_H #include #endif #if PLATFORM_OS_CYGWIN #include #endif #if HAVE_PR_SET_PTRACER #include #ifndef PR_SET_PTRACER #define PR_SET_PTRACER 0x59616d61 /* 'Yama' */ #endif #ifndef PR_SET_PTRACER_ANY #define PR_SET_PTRACER_ANY ((unsigned long)(-1)) #endif #endif #if PLATFORM_OS_DARWIN #include // uname() #endif #if PLATFORM_COMPILER_SUN_C /* disable warnings triggerred by some macro idioms we use */ #pragma error_messages(off, E_END_OF_LOOP_CODE_NOT_REACHED) #pragma error_messages(off, E_STATEMENT_NOT_REACHED) #endif int _gasneti_unused_result = -1; /* ------------------------------------------------------------------------------------ */ /* generic atomics support */ #if GASNETI_BUILDING_TOOLS && \ (defined(GASNETI_BUILD_GENERIC_ATOMIC32) || defined(GASNETI_BUILD_GENERIC_ATOMIC64)) #ifdef GASNETI_ATOMIC_LOCK_TBL_DEFNS GASNETI_ATOMIC_LOCK_TBL_DEFNS(malloc) #endif #ifdef GASNETI_GENATOMIC32_DEFN GASNETI_GENATOMIC32_DEFN #endif #ifdef GASNETI_GENATOMIC64_DEFN GASNETI_GENATOMIC64_DEFN #endif #endif #if GASNETI_MUTEX_CAUTIOUS_INIT #if GASNETI_ATOMIC32_NOT_SIGNALSAFE #error GASNETI_MUTEX_CAUTIOUS_INIT requires !GASNETI_ATOMIC32_NOT_SIGNALSAFE #endif /* initstep values: 0 = initial value for a new mutex 1 = initialization of mutex in progress by some thread 2 = mutex is fully initialized and ready for use */ extern void gasneti_mutex_cautious_init(/*gasneti_mutex_t*/void *_pl) { gasneti_mutex_t *pl = _pl; gasneti_atomic32_t *initstep = (gasneti_atomic32_t *)&(pl->initstep); while (1) { /* check if initialization is complete */ if_pt (gasneti_atomic32_read(initstep,GASNETI_ATOMIC_RMB_POST) == 2) return; /* mutex needs initialization, try to acquire that job */ if (gasneti_atomic32_compare_and_swap(initstep, 0, 1, GASNETI_ATOMIC_ACQ_IF_TRUE)) break; /* some other thread beat us to it */ gasneti_sched_yield(); } /* perform an uncontended lock/unlock cycle on the new mutex, to ensure pthread library data structures are correctly created */ gasneti_assert_zeroret(pthread_mutex_lock(&(pl->lock))); gasneti_assert_zeroret(pthread_mutex_unlock(&(pl->lock))); /* init complete, release */ gasneti_atomic32_set(initstep, 2, GASNETI_ATOMIC_WMB_PRE); return; } #endif #if GASNETI_BUG3430_WORKAROUND // Only used subject to GASNETI_USE_TRUE_MUTEXES, but that is not always available gasneti_mutex_t gasneti_bug3430_lock = GASNETI_MUTEX_INITIALIZER; gasneti_cond_t gasneti_bug3430_cond = GASNETI_COND_INITIALIZER; volatile int gasneti_bug3430_creating = 0; #endif /* ------------------------------------------------------------------------------------ */ /* rwlock support */ #if GASNET_DEBUG || GASNETI_BUILDING_TOOLS /* Use a thread-specific list of locks held, to avoid the need for extra synchronization. * If a thread exits with locks held we currently leak this list, although if it ever matters * this could be fixed using a destructor function in pthread_key_create. */ GASNETI_THREADKEY_DEFINE(_gasneti_rwlock_list); typedef struct _S_gasnet_rwlocklist { gasneti_rwlock_t const *l; struct _S_gasnet_rwlocklist *next; _gasneti_rwlock_state state; } _gasneti_rwlocklist_t; extern _gasneti_rwlock_state _gasneti_rwlock_query(gasneti_rwlock_t const *l) { _gasneti_rwlocklist_t const *list = gasneti_threadkey_get(_gasneti_rwlock_list); gasneti_assert(l); while (list) { if (list->l == l) return list->state; list = list->next; } return _GASNETI_RWLOCK_UNLOCKED; } extern void _gasneti_rwlock_insert(gasneti_rwlock_t const *l, _gasneti_rwlock_state state) { _gasneti_rwlocklist_t *list = gasneti_threadkey_get(_gasneti_rwlock_list); _gasneti_rwlocklist_t *elem = malloc(sizeof(_gasneti_rwlocklist_t)); gasneti_assert(l); gasneti_assert(state); elem->l = l; elem->state = state; elem->next = list; gasneti_threadkey_set(_gasneti_rwlock_list, elem); } extern void _gasneti_rwlock_remove(gasneti_rwlock_t const *l) { _gasneti_rwlocklist_t *list = gasneti_threadkey_get(_gasneti_rwlock_list); _gasneti_rwlocklist_t **p = &list; gasneti_assert(l); while (*p) { if ((*p)->l == l) { _gasneti_rwlocklist_t *elem = *p; *p = elem->next; free(elem); break; } p = &(*p)->next; } gasneti_threadkey_set(_gasneti_rwlock_list, list); } #endif /* ------------------------------------------------------------------------------------ */ /* call-based atomic support for C compilers with limited inline assembly */ #ifdef GASNETI_ATOMIC32_SPECIALS GASNETI_ATOMIC32_SPECIALS #endif #ifdef GASNETI_ATOMIC64_SPECIALS GASNETI_ATOMIC64_SPECIALS #endif /* ------------------------------------------------------------------------------------ */ /* call-based membar/atomic support for compilers which lack inline assembly of configured CC */ #if defined(GASNETI_USING_SLOW_ATOMICOPS) || \ defined(GASNETI_USING_SLOW_ATOMIC32) || \ defined(GASNETI_USING_SLOW_ATOMIC64) || \ defined(GASNETI_USING_SLOW_MEMBARS) #error gasnet_tools.c must be compiled with support for inline assembly #endif #ifdef GASNETI_TICKS_NOW_BODY GASNETI_SPECIAL_ASM_DEFN(gasneti_slow_ticks_now, GASNETI_TICKS_NOW_BODY) #else extern gasneti_tick_t gasneti_slow_ticks_now(void) { return gasneti_ticks_now(); } #endif #ifdef GASNETI_COMPILER_FENCE_BODY GASNETI_SPECIAL_ASM_DEFN(gasneti_slow_compiler_fence, GASNETI_COMPILER_FENCE_BODY) #else extern void gasneti_slow_compiler_fence(void) { gasneti_compiler_fence(); } #endif #ifdef GASNETI_LOCAL_WMB_BODY GASNETI_SPECIAL_ASM_DEFN(gasneti_slow_local_wmb, GASNETI_LOCAL_WMB_BODY) #else extern void gasneti_slow_local_wmb(void) { gasneti_local_wmb(); } #endif #ifdef GASNETI_LOCAL_RMB_BODY GASNETI_SPECIAL_ASM_DEFN(gasneti_slow_local_rmb, GASNETI_LOCAL_RMB_BODY) #else extern void gasneti_slow_local_rmb(void) { gasneti_local_rmb(); } #endif #ifdef GASNETI_LOCAL_MB_BODY GASNETI_SPECIAL_ASM_DEFN(gasneti_slow_local_mb, GASNETI_LOCAL_MB_BODY) #else extern void gasneti_slow_local_mb(void) { gasneti_local_mb(); } #endif /* Warn (once) if slow atomics are reached */ static int gasneti_slow_atomic_warning_issued = 0; GASNETI_NEVER_INLINE(gasneti_slow_atomic_warn, static void gasneti_slow_atomic_warn(void)) { gasneti_slow_atomic_warning_issued = 1; gasneti_console_message("WARNING", "using slow atomics due to use of a compiler not probed by GASNet at configure time"); } #define GASNETI_SLOW_ATOMIC_WARNING() do { \ if_pf (! gasneti_slow_atomic_warning_issued) gasneti_slow_atomic_warn(); \ } while (0) #ifdef GASNETI_USE_GENERIC_ATOMICOPS /* We don't need or want slow versions of generics (they use no ASM) */ #else extern gasneti_atomic_val_t gasneti_slow_atomic_read(gasneti_atomic_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic_read(p,flags); } extern void gasneti_slow_atomic_set(gasneti_atomic_t *p, gasneti_atomic_val_t v, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); gasneti_atomic_set(p, v, flags); } extern void gasneti_slow_atomic_increment(gasneti_atomic_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); gasneti_atomic_increment(p, flags); } extern void gasneti_slow_atomic_decrement(gasneti_atomic_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); gasneti_atomic_decrement(p, flags); } extern int gasneti_slow_atomic_decrement_and_test(gasneti_atomic_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic_decrement_and_test(p, flags); } #if defined(GASNETI_HAVE_ATOMIC_CAS) extern int gasneti_slow_atomic_compare_and_swap(gasneti_atomic_t *p, gasneti_atomic_val_t oldval, gasneti_atomic_val_t newval, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic_compare_and_swap(p,oldval,newval,flags); } extern gasneti_atomic_val_t gasneti_slow_atomic_swap(gasneti_atomic_t *p, gasneti_atomic_val_t val, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic_swap(p,val,flags); } #endif #if defined(GASNETI_HAVE_ATOMIC_ADD_SUB) extern gasneti_atomic_val_t gasneti_slow_atomic_add(gasneti_atomic_t *p, gasneti_atomic_val_t op, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic_add(p,op,flags); } extern gasneti_atomic_val_t gasneti_slow_atomic_subtract(gasneti_atomic_t *p, gasneti_atomic_val_t op, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic_subtract(p,op,flags); } #endif #endif #ifdef GASNETI_USE_GENERIC_ATOMIC32 /* We don't need or want slow versions of generics (they use no ASM) */ #else extern uint32_t gasneti_slow_atomic32_read(gasneti_atomic32_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic32_read(p,flags); } extern void gasneti_slow_atomic32_set(gasneti_atomic32_t *p, uint32_t v, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); gasneti_atomic32_set(p, v, flags); } extern void gasneti_slow_atomic32_increment(gasneti_atomic32_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); gasneti_atomic32_increment(p, flags); } extern void gasneti_slow_atomic32_decrement(gasneti_atomic32_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); gasneti_atomic32_decrement(p, flags); } extern int gasneti_slow_atomic32_decrement_and_test(gasneti_atomic32_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic32_decrement_and_test(p, flags); } extern int gasneti_slow_atomic32_compare_and_swap(gasneti_atomic32_t *p, uint32_t oldval, uint32_t newval, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic32_compare_and_swap(p,oldval,newval,flags); } extern uint32_t gasneti_slow_atomic32_swap(gasneti_atomic32_t *p, uint32_t val, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic32_swap(p,val,flags); } extern uint32_t gasneti_slow_atomic32_add(gasneti_atomic32_t *p, uint32_t op, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic32_add(p,op,flags); } extern uint32_t gasneti_slow_atomic32_subtract(gasneti_atomic32_t *p, uint32_t op, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic32_subtract(p,op,flags); } #endif #ifdef GASNETI_USE_GENERIC_ATOMIC64 /* We don't need or want slow versions of generics (they use no ASM) */ #else extern uint64_t gasneti_slow_atomic64_read(gasneti_atomic64_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic64_read(p,flags); } extern void gasneti_slow_atomic64_set(gasneti_atomic64_t *p, uint64_t v, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); gasneti_atomic64_set(p, v, flags); } extern void gasneti_slow_atomic64_increment(gasneti_atomic64_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); gasneti_atomic64_increment(p, flags); } extern void gasneti_slow_atomic64_decrement(gasneti_atomic64_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); gasneti_atomic64_decrement(p, flags); } extern int gasneti_slow_atomic64_decrement_and_test(gasneti_atomic64_t *p, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic64_decrement_and_test(p, flags); } extern int gasneti_slow_atomic64_compare_and_swap(gasneti_atomic64_t *p, uint64_t oldval, uint64_t newval, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic64_compare_and_swap(p,oldval,newval,flags); } extern uint64_t gasneti_slow_atomic64_swap(gasneti_atomic64_t *p, uint64_t val, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic64_swap(p,val,flags); } extern uint64_t gasneti_slow_atomic64_add(gasneti_atomic64_t *p, uint64_t op, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic64_add(p,op,flags); } extern uint64_t gasneti_slow_atomic64_subtract(gasneti_atomic64_t *p, uint64_t op, const int flags) { GASNETI_SLOW_ATOMIC_WARNING(); return gasneti_atomic64_subtract(p,op,flags); } #endif /* ------------------------------------------------------------------------------------ */ /* ident strings and idiot checks */ #define GASNETT_THREAD_MODEL_STR _STRINGIFY(GASNETT_THREAD_MODEL) GASNETI_IDENT(gasnett_IdentString_ThreadModel, "$GASNetToolsThreadModel: " GASNETT_THREAD_MODEL_STR " $"); GASNETI_IDENT(gasnett_IdentString_Config, "$GASNetToolsConfig: " GASNETT_CONFIG_STRING " $"); GASNETI_IDENT(gasnett_IdentString_BuildTimestamp, "$GASNetBuildTimestamp: " __DATE__ " " __TIME__ " $"); GASNETI_IDENT(gasnett_IdentString_BuildID, "$GASNetBuildId: " GASNETI_BUILD_ID " $"); GASNETI_IDENT(gasnett_IdentString_ConfigureArgs, "$GASNetConfigureArgs: " GASNETI_CONFIGURE_ARGS " $"); GASNETI_IDENT(gasnett_IdentString_SystemTuple, "$GASNetSystemTuple: " GASNETI_SYSTEM_TUPLE " $"); GASNETI_IDENT(gasnett_IdentString_SystemName, "$GASNetSystemName: " GASNETI_SYSTEM_NAME " $"); GASNETI_IDENT(gasnett_IdentString_CompilerID, "$GASNetCompilerID: " PLATFORM_COMPILER_IDSTR " $"); #ifndef GASNETI_GIT_HASH #define GASNETI_GIT_HASH no-version-control-info #endif GASNETI_IDENT(gasnett_IdentString_GitHash, "$GASNetGitHash: " _STRINGIFY(GASNETI_GIT_HASH) " $"); int GASNETT_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MAJOR_,GASNET_RELEASE_VERSION_MAJOR)) = 1; int GASNETT_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_MINOR_,GASNET_RELEASE_VERSION_MINOR)) = 1; int GASNETT_LINKCONFIG_IDIOTCHECK(_CONCAT(RELEASE_PATCH_,GASNET_RELEASE_VERSION_PATCH)) = 1; int GASNETT_LINKCONFIG_IDIOTCHECK(LITE) = 1; int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_THREAD_MODEL) = 1; int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_DEBUG_CONFIG) = 1; int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_PTR_CONFIG) = 1; int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_TIMER_CONFIG) = 1; int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_MEMBAR_CONFIG) = 1; int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETT_ATOMIC_CONFIG) = 1; int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETI_ATOMIC32_CONFIG) = 1; int GASNETT_LINKCONFIG_IDIOTCHECK(GASNETI_ATOMIC64_CONFIG) = 1; static gasneti_atomic_t gasneti_backtrace_enabled = gasneti_atomic_init(1); static int volatile gasneti_internal_crash = 0; extern uint64_t gasnett_release_version(void) { // motivated by xSDK Community Policy M8 return GASNET_RELEASE_VERSION_MAJOR * (uint64_t)1000000 + GASNET_RELEASE_VERSION_MINOR * (uint64_t)10000 + GASNET_RELEASE_VERSION_PATCH; } extern const char *gasnett_release_version_str(void) { // motivated by xSDK Community Policy M8 return _STRINGIFY(GASNET_RELEASE_VERSION_MAJOR) "." _STRINGIFY(GASNET_RELEASE_VERSION_MINOR) "." _STRINGIFY(GASNET_RELEASE_VERSION_PATCH); } extern const char *gasnett_performance_warning_str(void) { static const char *result = #if defined(GASNET_DEBUG) || defined(GASNETI_STATS_OR_TRACE) || defined(GASNET_DEBUGMALLOC) " " /* Leading white space: */ #ifdef GASNET_DEBUG "debugging " #endif #ifdef GASNET_TRACE "tracing " #endif #ifdef GASNET_STATS "statistical collection " #endif #ifdef GASNET_DEBUGMALLOC "debugging malloc " #endif "\n" /* Trailing white space: */ #endif #if defined(GASNETI_FORCE_GENERIC_ATOMICOPS) " FORCED mutex-based atomicops\n" #elif defined(GASNETI_FORCE_OS_ATOMICOPS) " FORCED os-provided atomicops\n" #endif #if defined(GASNETI_FORCE_TRUE_WEAKATOMICS) && GASNETT_THREAD_SINGLE " FORCED atomics in sequential code\n" #endif #if defined(GASNETI_FORCE_GENERIC_SEMAPHORES) && GASNETT_THREAD_SAFE " FORCED mutex-based semaphores\n" #endif #if defined(GASNETI_FORCE_YIELD_MEMBARS) " FORCED sched_yield() in memory barriers\n" #elif defined(GASNETI_FORCE_SLOW_MEMBARS) " FORCED non-inlined memory barriers\n" #endif #if defined(GASNETI_FORCE_GETTIMEOFDAY) " FORCED timers using gettimeofday()\n" #elif defined(GASNETI_FORCE_POSIX_REALTIME) " FORCED timers using clock_gettime()\n" #endif #if defined(GASNETI_BUG1389_WORKAROUND) " FORCED conservative byte-wise local access\n" #endif ""; return result; } /* ------------------------------------------------------------------------------------ */ /* hostname query */ /* get MAXHOSTNAMELEN */ #if PLATFORM_OS_SOLARIS #include #else #include #endif #ifndef MAXHOSTNAMELEN #ifdef HOST_NAME_MAX #define MAXHOSTNAMELEN HOST_NAME_MAX #else #define MAXHOSTNAMELEN 1024 /* give up */ #endif #endif const char *gasneti_gethostname(void) { static gasneti_mutex_t hnmutex = GASNETI_MUTEX_INITIALIZER; static int firsttime = 1; static char hostname[MAXHOSTNAMELEN]; gasneti_mutex_lock(&hnmutex); if (firsttime) { if (gethostname(hostname, MAXHOSTNAMELEN)) gasnett_fatalerror("gasneti_gethostname() failed to get hostname: aborting"); hostname[MAXHOSTNAMELEN - 1] = '\0'; size_t len = strlen(hostname); // Scan for chars that suggest anything other than 7-bit ASCII int safe = 1; for (int i = 0; i < len; ++i) { if (iscntrl(hostname[i])) { safe = 0; break; } } // Normalize to lowercase if it looks "safe" to do so if (safe) { for (int i = 0; i < len; ++i) { hostname[i] = tolower(hostname[i]); } } firsttime = 0; } gasneti_mutex_unlock(&hnmutex); return hostname; } /* ------------------------------------------------------------------------------------ */ /* sleep/delay support */ /* Sleep for at least ns_delay nanoseconds * If interrupted by signal, may terminate early returning non-zero with errno = EINTR */ extern int gasneti_nsleep(uint64_t ns_delay) { if_pf (!ns_delay) return 0; #if HAVE_NANOSLEEP struct timespec ts; ts.tv_sec = ns_delay / (uint64_t)1E9; ts.tv_nsec = ns_delay % (uint64_t)1E9; return nanosleep(&ts, NULL); #elif HAVE_CLOCK_NANOSLEEP struct timespec ts; ts.tv_sec = ns_delay / (uint64_t)1E9; ts.tv_nsec = ns_delay % (uint64_t)1E9; return clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL); #elif HAVE_NSLEEP struct timespec ts; ts.tv_sec = ns_delay / (uint64_t)1E9; ts.tv_nsec = ns_delay % (uint64_t)1E9; return nsleep(&ts, NULL); #elif HAVE_USLEEP && 0 // Disabled because: // 1) some systems prohibit us_delay > 1 million // 2) some systems have undesired interactions with alarm() return usleep(ns_delay / 1000); #else struct timeval tv; uint64_t us_delay = ns_delay / 1000; tv.tv_sec = us_delay / (uint64_t)1E6; tv.tv_usec = us_delay % (uint64_t)1E6; return select(0, NULL, NULL, NULL, &tv); #endif } /* ------------------------------------------------------------------------------------ */ /* timer support */ #ifdef GASNETI_TIMER_DEFN GASNETI_TIMER_DEFN #endif GASNETI_INLINE(_gasneti_gettimeofday_us) uint64_t _gasneti_gettimeofday_us(void) { uint64_t retval; struct timeval tv; gasneti_assert_zeroret(gettimeofday(&tv, NULL)); retval = ((uint64_t)tv.tv_sec) * 1000000 + (uint64_t)tv.tv_usec; return retval; } extern uint64_t gasneti_gettimeofday_us(void) { return _gasneti_gettimeofday_us(); } GASNETI_INLINE(_gasneti_wallclock_ns) uint64_t _gasneti_wallclock_ns(void) { #if HAVE_CLOCK_GETTIME struct timespec tm; #if defined(_POSIX_MONOTONIC_CLOCK) static clockid_t clockid = CLOCK_MONOTONIC; if_pf (clock_gettime(clockid,&tm)) { clockid = CLOCK_REALTIME; // next call will succeed gasneti_assert_zeroret(clock_gettime(CLOCK_REALTIME,&tm)); } #else gasneti_assert_zeroret(clock_gettime(CLOCK_REALTIME,&tm)); #endif return tm.tv_sec*((uint64_t)1E9)+tm.tv_nsec; #else struct timeval tv; gasneti_assert_zeroret(gettimeofday(&tv, NULL)); return ((uint64_t)tv.tv_sec)*1000000000 + ((uint64_t)tv.tv_usec)*1000; #endif } extern uint64_t gasneti_wallclock_ns(void) { return _gasneti_wallclock_ns(); } // Conditionally available: #if GASNETI_USING_GETTIMEOFDAY // Used *only* for gtod-based timers: extern uint64_t gasneti_ticks_gtod_us(void) { return _gasneti_gettimeofday_us(); } #endif #if GASNETI_USING_POSIX_REALTIME // Used *only* for POSIX-RT timers: extern uint64_t gasneti_ticks_posix_ns(void) { return _gasneti_wallclock_ns(); } #endif extern double gasneti_tick_metric(int idx) { static double *_gasneti_tick_metric = NULL; gasneti_assert_int(idx ,<=, 1); if_pf (_gasneti_tick_metric == NULL) { int i, ticks, iters = 1000, minticks = 10; double *_tmp_metric; gasneti_tick_t min = GASNETI_TICK_MAX; gasneti_tick_t start = gasneti_ticks_now(); gasneti_tick_t last = start; for (i=0,ticks=0; i < iters || ticks < minticks; i++) { gasneti_tick_t x = gasneti_ticks_now(); gasneti_tick_t curr = (x - last); if_pt (curr > 0) { ticks++; if_pf (curr < min) min = curr; } last = x; } _tmp_metric = (double *)malloc(2*sizeof(double)); gasneti_assert(_tmp_metric != NULL); /* granularity */ gasneti_assert(min > 0); uint64_t min_ns = gasneti_ticks_to_ns(min); if (!min_ns) min_ns = 1; // Never report a granularity of 0 _tmp_metric[0] = ((double)min_ns)/1000.0; /* overhead */ _tmp_metric[1] = ((double)(gasneti_ticks_to_ns(last - start)))/(i*1000.0); gasneti_sync_writes(); _gasneti_tick_metric = _tmp_metric; } else gasneti_sync_reads(); return _gasneti_tick_metric[idx]; } /* ------------------------------------------------------------------------------------ */ #ifndef GASNETI_MAYBE_TRACEFILE #if GASNET_TRACE && GASNETI_BUILDING_CONDUIT extern FILE *gasneti_tracefile; #define GASNETI_MAYBE_TRACEFILE gasneti_tracefile #else #define GASNETI_MAYBE_TRACEFILE ((FILE *)NULL) #endif #endif #if GASNETI_BUILDING_CONDUIT // shadows gasnet_fwd.h, which is deliberately excluded: extern uint32_t gasneti_mynode; #define GASNETI_PROCID gasneti_mynode #define GASNETI_PROCID_INVALID ((uint32_t)-1) #else #define GASNETI_PROCID 0 #define GASNETI_PROCID_INVALID -1 #endif extern const char *gasneti_procid_str; const char *gasneti_procid_str = NULL; extern void gasneti_console_messageVA(const char *funcname, const char *filename, int linenum, int console_procid, // -1 == wildcard const char *prefix, const char *msg, va_list argptr) { #ifndef GASNETI_CONSOLEMSG_PREFIX_LEN #define GASNETI_CONSOLEMSG_PREFIX_LEN 128 #endif #ifndef GASNETI_CONSOLEMSG_IDSTR_LEN #define GASNETI_CONSOLEMSG_IDSTR_LEN MIN(MAXHOSTNAMELEN,128) #endif #ifndef GASNETI_CONSOLEMSG_CONTEXT_LEN #define GASNETI_CONSOLEMSG_CONTEXT_LEN 128 #endif int console_speak = 1; char expandedmsg[GASNETI_CONSOLEMSG_PREFIX_LEN+GASNETI_CONSOLEMSG_IDSTR_LEN+GASNETI_CONSOLEMSG_CONTEXT_LEN+20]; if (console_procid >= 0) { // omit proc id for "job-wide" messages snprintf(expandedmsg, sizeof(expandedmsg)-4, "*** %s: ", prefix); console_speak = (console_procid == GASNETI_PROCID) // I am the walrus || (GASNETI_PROCID == GASNETI_PROCID_INVALID); // too early to know, assume I am the walrus } else if (gasneti_procid_str) { snprintf(expandedmsg, sizeof(expandedmsg)-4, "*** %s (%s): ", prefix, gasneti_procid_str); } else { // we are either in tools-only mode or early in conduit startup before procid's are established // try to provide some useful information to identify the failing process. int pid = (int)getpid(); // Do NOT use gasneti_gethostname here, too many dependencies and chance of recursion char hostname[MAXHOSTNAMELEN]; if (!gethostname(hostname, MAXHOSTNAMELEN) && hostname[0] && strlen(hostname) < GASNETI_CONSOLEMSG_IDSTR_LEN) { snprintf(expandedmsg, sizeof(expandedmsg)-4, "*** %s (%s:%i): ", prefix, hostname, pid); } else { // no idstr easily accessible snprintf(expandedmsg, sizeof(expandedmsg)-4, "*** %s (:%i): ", prefix, pid); } } if (funcname || filename) { // append location information, if any #ifndef GASNETI_CONSOLEMSG_NAME_LEN #define GASNETI_CONSOLEMSG_NAME_LEN 55 #endif // use the last NAME_LEN characters of funcname and filename if (!funcname) funcname = ""; size_t funclen = strlen(funcname); if (funclen > GASNETI_CONSOLEMSG_NAME_LEN) funcname += (funclen - GASNETI_CONSOLEMSG_NAME_LEN); if (!filename || !*filename) filename = "*unknown file*"; size_t filelen = strlen(filename); if (filelen > GASNETI_CONSOLEMSG_NAME_LEN) filename += (filelen - GASNETI_CONSOLEMSG_NAME_LEN); // format location info char linestr[8] = { 0 }; if (linenum > 0 && linenum <= 999999) { // format up to 6-char linenum, if provided snprintf(linestr, sizeof(linestr), ":%i", linenum); } gasneti_static_assert(GASNETI_CONSOLEMSG_CONTEXT_LEN >= 2*GASNETI_CONSOLEMSG_NAME_LEN + 18); const size_t pos = strlen(expandedmsg); if (*funcname) snprintf(expandedmsg+pos, sizeof(expandedmsg)-4 - pos, "in %s%s at %s%s: ", funcname, (funcname[strlen(funcname)-1] != ')'?"()":""), filename, linestr); else snprintf(expandedmsg+pos, sizeof(expandedmsg)-4 - pos, "at %s%s: ", filename, linestr); } const size_t maxshortmsg = sizeof(expandedmsg)-4 - strlen(expandedmsg); const size_t msglen = strlen(msg); int isshort = 0; int isveryshort = 0; #ifndef GASNETI_CONSOLEMSG_VERYSHORT_LEN #define GASNETI_CONSOLEMSG_VERYSHORT_LEN 384 #endif char veryshort_msg[GASNETI_CONSOLEMSG_VERYSHORT_LEN]; if (msglen <= maxshortmsg) { // short enough to send to fprintf(stderr) in a single operation strncat(expandedmsg, msg, maxshortmsg); if (expandedmsg[strlen(expandedmsg)-1] != '\n') strcat(expandedmsg, "\n"); isshort = 1; va_list args; va_copy(args, argptr); int result = vsnprintf(veryshort_msg, sizeof(veryshort_msg), expandedmsg, args); if (result < sizeof(veryshort_msg)) isveryshort = 1; // short enough to send as a formatted buffer va_end(args); } FILE * streams[] = { (console_speak ? stderr : NULL), GASNETI_MAYBE_TRACEFILE }; for (int s = 0; s < sizeof(streams)/sizeof(streams[0]); s++) { FILE *stream = streams[s]; if (stream) { if (isveryshort) { fputs(veryshort_msg, stream); } else { va_list args; va_copy(args, argptr); if (isshort) { vfprintf(stream, expandedmsg, args); } else { /* long format msg */ fputs(expandedmsg, stream); vfprintf(stream, msg, args); if (msg[msglen-1] != '\n') fprintf(stream, "\n"); } va_end(args); } fflush(stream); } } } #undef GASNETI_MAYBE_TRACEFILE #undef GASNETI_PROCID #undef GASNETI_PROCID_INVALID extern void gasneti_console_message(const char *prefix, const char *msg, ...) { va_list argptr; va_start(argptr, msg); /* pass in last argument */ gasneti_console_messageVA(0,0,0,-1, prefix, msg, argptr); va_end(argptr); } extern void gasneti_console0_message(const char *prefix, const char *msg, ...) { va_list argptr; va_start(argptr, msg); /* pass in last argument */ gasneti_console_messageVA(0,0,0,0, prefix, msg, argptr); va_end(argptr); } static void gasneti_output_config(void) { gasneti_console_message("Details for bug reporting", "config=" GASNETT_CONFIG_STRING " compiler=" _STRINGIFY(PLATFORM_COMPILER_FAMILYNAME) "/" PLATFORM_COMPILER_VERSION_STR " sys=" GASNETT_SYSTEM_TUPLE); } extern void gasneti_error_abort(void) { gasneti_internal_crash = 1; gasnett_freezeForDebuggerErr(); /* allow freeze */ /* try to get a pre-signal backtrace, which may be more precise */ if (!gasneti_print_backtrace_ifenabled(STDERR_FILENO)) gasneti_atomic_set(&gasneti_backtrace_enabled,0,GASNETI_ATOMIC_REL); // Try to flush I/O (especially the tracefile) before crashing signal(SIGALRM, _exit); alarm(5); gasneti_flush_streams(); #if PLATFORM_OS_CYGWIN && CYGWIN_VERSION_DLL_MAJOR < 3000 && GASNETT_THREAD_SAFE // Bug 3856 - Cygwin signal-handling discrepancies with multiple threads // Following should be equivalent to abort(), but Cygwin 2.x abort is non-compliant // and this generates more reliable behavior: if (gasneti_raise(SIGABRT) == 0) (void)0; // success else #endif /* intentional fall-thru */ abort(); static const char err[] = "ERROR: abort() returned!\n"; gasneti_unused_result( write(2 /*stderr*/, err, sizeof(err)) ); (void)fsync(2); // ensure this function never returns, even if abort does _exit(1); } const char *_gasneti_fatalerror_funcname; const char *_gasneti_fatalerror_filename; int _gasneti_fatalerror_linenum; extern void _gasneti_fatalerror(const char *msg, ...) { va_list argptr; va_start(argptr, msg); /* pass in last argument */ gasneti_console_messageVA(_gasneti_fatalerror_funcname, _gasneti_fatalerror_filename, _gasneti_fatalerror_linenum, -1, "FATAL ERROR", msg, argptr); va_end(argptr); gasneti_error_abort(); } extern void gasneti_fatalerror_nopos(const char *msg, ...) { va_list argptr; va_start(argptr, msg); /* pass in last argument */ gasneti_console_messageVA(0,0,0,-1, "FATAL ERROR", msg, argptr); va_end(argptr); gasneti_error_abort(); } extern void _gasneti_assert_fail(const char *funcname, const char *filename, int linenum, const char *fmt, ...) { // generate the fatal error and crash va_list argptr; va_start(argptr, fmt); /* pass in last argument */ gasneti_console_messageVA(funcname, filename, linenum, -1, "FATAL ERROR: Assertion failure", fmt, argptr); va_end(argptr); gasneti_error_abort(); } /* ------------------------------------------------------------------------------------ */ extern void gasneti_killmyprocess(int exitcode) { /* wrapper for _exit() that does the "right thing" to immediately kill this process */ #if GASNETI_THREADS && defined(HAVE_PTHREAD_KILL_OTHER_THREADS_NP) /* on LinuxThreads we need to explicitly kill other threads before calling _exit() */ pthread_kill_other_threads_np(); #endif _exit(exitcode); /* use _exit to bypass atexit handlers */ gasneti_fatalerror("gasneti_killmyprocess failed to kill the process!"); } extern void gasneti_filesystem_sync(void) { static int enabled = -1; if (enabled == -1) enabled = gasneti_getenv_yesno_withdefault("GASNET_FS_SYNC",0); if (enabled) { sync(); } } extern void gasneti_flush_streams(void) { /* XXX: When should we consider failures to be errors? When should we warn? * For a long time failures here were fatal, but that choice precludes * clients or systems which close the standard fds. */ fflush(stdout); fflush(stderr); fsync(STDOUT_FILENO); /* ignore errors for output is a console */ fsync(STDERR_FILENO); /* ignore errors for output is a console */ fflush(NULL); /* passing NULL to fflush SHOULD cause it to flush all open FILE streams */ gasneti_filesystem_sync(); gasneti_sched_yield(); } extern void gasneti_close_streams(void) { /* XXX: When should we consider failures to be errors? When should we warn? * For a long time failures here were fatal, but that choice precludes * clients or systems which close the standard fds. */ gasneti_reghandler(SIGPIPE, SIG_IGN); /* In case we still try to generate output */ fclose(stdin); fclose(stdout); fclose(stderr); gasneti_sched_yield(); } /* ------------------------------------------------------------------------------------ */ static void (*_gasneti_exitfn)(int); #if HAVE_ON_EXIT static void gasneti_on_exit(int exitcode, void *arg) { if (_gasneti_exitfn) _gasneti_exitfn(exitcode); } #else static void gasneti_atexit(void) { if (_gasneti_exitfn) _gasneti_exitfn(0); } #endif extern void gasneti_registerExitHandler(void (*_exitfn)(int)) { _gasneti_exitfn = _exitfn; static int firstcall = 1; if (!firstcall) return; firstcall = 0; if (gasneti_getenv_yesno_withdefault("GASNET_CATCH_EXIT", 1)) { #if HAVE_ON_EXIT on_exit(gasneti_on_exit, NULL); #else atexit(gasneti_atexit); #endif } } /* ------------------------------------------------------------------------------------ */ extern gasneti_sighandlerfn_t gasneti_reghandler(int sigtocatch, gasneti_sighandlerfn_t fp) { gasneti_sighandlerfn_t fpret = (gasneti_sighandlerfn_t)signal(sigtocatch, fp); if (fpret == (gasneti_sighandlerfn_t)SIG_ERR) { gasneti_fatalerror("Got a SIG_ERR while registering handler for signal %i : %s", sigtocatch,strerror(errno)); return NULL; } #ifdef SIG_HOLD else if (fpret == (gasneti_sighandlerfn_t)SIG_HOLD) { gasneti_fatalerror("Got a SIG_HOLD while registering handler for signal %i : %s", sigtocatch,strerror(errno)); return NULL; } #endif return fpret; } /* ------------------------------------------------------------------------------------ */ typedef struct { int signum; const char *name; const char *desc; enum { GASNETI_SV_PROGRAM_ERROR, /* program errors that will continus to occur if ignored */ GASNETI_SV_TERM_INT, /* interrupt signal from the terminal (stop or kill) */ GASNETI_SV_SYS_INT, /* interrupt signal from the system (kill, hangup, etc.) */ GASNETI_SV_FATAL, /* interrupts that cannot be caught or ignored */ GASNETI_SV_OTHER /* everything else */ } variety; int enable_gasnet_handler; gasneti_sighandlerfn_t oldhandler; } gasnett_siginfo_t; static gasnett_siginfo_t gasneti_sigtable[] = { #ifdef SIGABRT {SIGABRT, "SIGABRT", "Process abort signal.", GASNETI_SV_PROGRAM_ERROR, 1}, /* (abort()) */ #endif #ifdef SIGFPE {SIGFPE, "SIGFPE", "Erroneous arithmetic operation.", GASNETI_SV_PROGRAM_ERROR, 1}, /* (FP error) */ #endif #ifdef SIGILL {SIGILL, "SIGILL", "Illegal instruction.", GASNETI_SV_PROGRAM_ERROR, 1}, /* (bad instruction) */ #endif #ifdef SIGINT {SIGINT, "SIGINT", "Terminal interrupt signal.", GASNETI_SV_TERM_INT, 1}, /* (control-c) */ #endif #ifdef SIGSEGV {SIGSEGV, "SIGSEGV", "Invalid memory reference.", GASNETI_SV_PROGRAM_ERROR, 1}, /* (seg fault) */ #endif #ifdef SIGTERM {SIGTERM, "SIGTERM", "Termination signal.", GASNETI_SV_SYS_INT, 1}, /* (kill command) */ #endif #ifdef SIGALRM {SIGALRM, "SIGALRM", "Alarm clock.", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGHUP {SIGHUP, "SIGHUP", "Hangup.", GASNETI_SV_SYS_INT, 1}, #endif #ifdef SIGKILL {SIGKILL, "SIGKILL", "Kill (cannot be caught or ignored).", GASNETI_SV_FATAL, 0}, /* (kill -9 command) */ #endif #ifdef SIGPIPE {SIGPIPE, "SIGPIPE", "Write on a pipe with no one to read it.", GASNETI_SV_OTHER, 1}, /* (send() after close) */ #endif #ifdef SIGQUIT {SIGQUIT, "SIGQUIT", "Terminal quit signal.", GASNETI_SV_TERM_INT, 1}, /* (control-\) */ #endif #ifdef SIGUSR1 {SIGUSR1, "SIGUSR1", "User-defined signal 1.", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGUSR2 {SIGUSR2, "SIGUSR2", "User-defined signal 2.", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGCHLD {SIGCHLD, "SIGCHLD", "Child process terminated or stopped.", GASNETI_SV_OTHER, 0}, /* (sent to parent proc) */ #endif #ifdef SIGCONT {SIGCONT, "SIGCONT", "Continue executing, if stopped.", GASNETI_SV_OTHER, 0}, /* (also sent by kill command) */ #endif #ifdef SIGSTOP {SIGSTOP, "SIGSTOP", "Stop executing (cannot be caught or ignored).", GASNETI_SV_FATAL, 0}, #endif #ifdef SIGTSTP {SIGTSTP, "SIGTSTP", "Terminal stop signal.", GASNETI_SV_TERM_INT, 0}, /* (control-z) */ #endif #ifdef SIGTTIN {SIGTTIN, "SIGTTIN", "Background process attempting read.", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGTTOU {SIGTTOU, "SIGTTOU", "Background process attempting write.", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGBUS {SIGBUS, "SIGBUS", "Bus error.", GASNETI_SV_PROGRAM_ERROR, 1}, /* (alignment error) */ #endif #ifdef SIGPOLL {SIGPOLL, "SIGPOLL", "Pollable event.", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGXFSZ {SIGXFSZ, "SIGXFSZ", " File size limit exceeded.", GASNETI_SV_PROGRAM_ERROR, 0}, #endif #ifdef SIGPROF {SIGPROF, "SIGPROF", "Profiling timer expired.", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGSYS {SIGSYS, "SIGSYS", "Bad system call.", GASNETI_SV_PROGRAM_ERROR, 0}, #endif #ifdef SIGTRAP {SIGTRAP, "SIGTRAP", "Trace/breakpoint trap.", GASNETI_SV_PROGRAM_ERROR, 0}, #endif #ifdef SIGURG {SIGURG, "SIGURG", "High bandwidth data is available at a socket.", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGVTALRM {SIGVTALRM,"SIGVTALRM", "Virtual timer expired.", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGXCPU {SIGXCPU, "SIGXCPU", "CPU time limit exceeded.", GASNETI_SV_PROGRAM_ERROR, 0}, #endif #ifdef SIGEMT {SIGEMT, "SIGEMT", "Emulation Trap", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGPWR {SIGPWR, "SIGPWR", "Power Fail or Restart", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGWINCH {SIGWINCH, "SIGWINCH", "Window Size Change", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGWAITING {SIGWAITING, "SIGWAITING", "Concurrency signal reserved by threads library", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGLWP {SIGLWP, "SIGLWP", "Inter-LWP signal reserved by threads library", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGFREEZE {SIGFREEZE, "SIGFREEZE", "Check point Freeze", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGTHAW {SIGTHAW, "SIGTHAW", "Check point Thaw", GASNETI_SV_OTHER, 0}, #endif #ifdef SIGCANCEL {SIGCANCEL, "SIGCANCEL", "Cancellation signal reserved by threads library", GASNETI_SV_OTHER, 0}, #endif {0, NULL, NULL, GASNETI_SV_OTHER, 0} }; /* ------------------------------------------------------------------------------------ */ gasnett_siginfo_t *gasnett_siginfo_fromval(int sigval) { size_t i; for (i=0; iname); return(NULL); } gasnett_siginfo_t *gasnett_siginfo_fromstr(const char *str) { while (*str && isspace(*str)) str++; if (isdigit(*str)) return gasnett_siginfo_fromval(atoi(str)); else { size_t i; char tmp[255]; char *p = &tmp[0]; if (!(strlen(str) >= 3 && toupper(str[0]) == 'S' && toupper(str[1]) == 'I' && toupper(str[2]) == 'G')) { strcpy(p,"SIG"); p += 3; } while (*str && !isspace(*str)) { *(p++) = toupper(*(str++)); } *p = '\0'; for (i=0; i= 4); gasneti_assert(buffer); gasneti_assert(base > 1); gasneti_assert(base <= 16); size_t maxlen = buflen - 1; char *p = buffer + buflen; // one past end size_t len = 0; // construct output in reverse order (starting with least-significant digit) static const char digits[] = "0123456789abcdef"; for (size_t i = 0; i < maxlen; ++i) { ++len; *(--p) = digits[val % base]; val /= base; if (!val) break; } gasneti_assert_uint(len ,<=, maxlen); if (val) len = 0; // overflow // shift output to align with start of caller's buffer for (size_t i = 0; i < len; ++i) buffer[i] = p[i]; buffer[len] = '\0'; return len; } /* ------------------------------------------------------------------------------------ */ extern int gasneti_raise(int sig) { #if PLATFORM_OS_CYGWIN && CYGWIN_VERSION_DLL_MAJOR < 3000 && \ GASNETT_THREAD_SAFE && HAVE_PTHREAD_KILL // Bug 3856 - Cygwin signal-handling discrepancies with multiple threads // Following should be equivalent to raise(), but Cygwin 2.x raise is non-compliant // and this generates more reliable behavior. // This workaround was previously used for a bug in OpenBSD-5.2 kernel, fixed in OpenBSD-current in Nov 2012 if (pthread_kill(pthread_self(), sig) == 0) return 0; // success #endif /* intentional fall-thru */ return raise(sig); } /* ------------------------------------------------------------------------------------ */ /* Functions to (un)block a single signal: * int gasneti_unblocksig(int sig); * int gasneti_blocksig(int sig); * On error (including systems w/o support) both return -1. * Otherwise they return the prior state: positive for blocked, zero for not blocked. */ #if HAVE_SIGPROCMASK || (HAVE_PTHREAD_SIGMASK && GASNETI_THREADS) static int _gasneti_sigmask(int sig, int op) { sigset_t sig_set, old_set; sigemptyset(&sig_set); sigaddset(&sig_set, sig); #if HAVE_PTHREAD_SIGMASK && GASNETI_THREADS if (! pthread_sigmask(op, &sig_set, &old_set)) { return sigismember(&old_set, sig); } #endif #if HAVE_SIGPROCMASK if (! sigprocmask(op, &sig_set, &old_set)) { return sigismember(&old_set, sig); } #endif return -1; } extern int gasneti_blocksig(int sig) { return _gasneti_sigmask(sig, SIG_BLOCK); } extern int gasneti_unblocksig(int sig) { return _gasneti_sigmask(sig, SIG_UNBLOCK); } #else /* TODO: implement for systems w/o POSIX signals */ extern int gasneti_blocksig(int sig) { return -1; } extern int gasneti_unblocksig(int sig) { return -1; } #endif /* ------------------------------------------------------------------------------------ */ #ifndef GASNETI_UNFREEZE_SIGNAL /* signal to use for unfreezing, could also use SIGUSR1/2 or several others */ #define GASNETI_UNFREEZE_SIGNAL SIGCONT #define GASNETI_UNFREEZE_SIGNAL_STR "SIGCONT" #endif static volatile int * volatile _gasneti_freeze_flag = NULL; static void gasneti_unfreezeHandler(int sig) { gasneti_assert(_gasneti_freeze_flag); *_gasneti_freeze_flag = 0; } /* all this to make sure we get a full stack frame for debugger */ static void _freezeForDebugger(int depth) { if (!depth) _freezeForDebugger(1); else { volatile int i=0; gasneti_sighandlerfn_t old = gasneti_reghandler(GASNETI_UNFREEZE_SIGNAL, gasneti_unfreezeHandler); const int was_blocked = (gasneti_unblocksig(GASNETI_UNFREEZE_SIGNAL) > 0); while (*_gasneti_freeze_flag) { i++; sleep(1); } if (was_blocked) gasneti_blocksig(GASNETI_UNFREEZE_SIGNAL); } } extern void gasneti_freezeForDebuggerNow(volatile int *flag, const char *flagsymname) { gasneti_console_message("Process frozen for debugger","host=%s pid=%i\n" " To unfreeze, attach a debugger and set '%s' to 0, or send a " GASNETI_UNFREEZE_SIGNAL_STR "\n", gasnett_gethostname(), (int)getpid(), flagsymname); _gasneti_freeze_flag = flag; *_gasneti_freeze_flag = 1; gasneti_local_wmb(); _freezeForDebugger(0); } volatile int gasnet_frozen = 0; static int gasneti_freezeonerr_isinit = 0; static int gasneti_freezeonerr_userenabled = 0; static int gasneti_freezesignal = 0; static int gasneti_backtracesignal = 0; static void gasneti_ondemandHandler(int sig) { gasnett_siginfo_t const *siginfo = gasnett_siginfo_fromval(sig); char sigstr[80]; if (siginfo) snprintf(sigstr, sizeof(sigstr), "%s(%i)", siginfo->name, sig); else snprintf(sigstr, sizeof(sigstr), "(%i)", sig); if (sig == gasneti_freezesignal) { gasneti_console_message("Caught GASNET_FREEZE_SIGNAL","signal %s\n", sigstr); gasneti_freezeForDebuggerNow(&gasnet_frozen,"gasnet_frozen"); } else if (sig == gasneti_backtracesignal) { gasneti_console_message("Caught GASNET_BACKTRACE_SIGNAL","signal %s\n", sigstr); gasneti_print_backtrace(STDERR_FILENO); } else gasneti_fatalerror("unrecognized signal in gasneti_ondemandHandler: %i", sig); } extern void gasneti_ondemand_init(void) { static int firsttime = 1; if (firsttime) { const char *str = gasneti_getenv_withdefault("GASNET_FREEZE_SIGNAL",NULL); if (str) { gasnett_siginfo_t const *info = gasnett_siginfo_fromstr(str); if (!info) gasneti_console_message("WARNING","ignoring unrecognized GASNET_FREEZE_SIGNAL: %s\n", str); else gasneti_freezesignal = info->signum; } str = gasneti_getenv_withdefault("GASNET_BACKTRACE_SIGNAL",NULL); if (str) { gasnett_siginfo_t const *info = gasnett_siginfo_fromstr(str); if (!info) gasneti_console_message("WARNING","ignoring unrecognized GASNET_BACKTRACE_SIGNAL: %s\n", str); else gasneti_backtracesignal = info->signum; } gasneti_local_wmb(); firsttime = 0; } else gasneti_local_rmb(); if (gasneti_backtracesignal) gasneti_reghandler(gasneti_backtracesignal, gasneti_ondemandHandler); if (gasneti_freezesignal) gasneti_reghandler(gasneti_freezesignal, gasneti_ondemandHandler); } static void gasneti_freezeForDebugger_init(void) { if (gasneti_freezeonerr_isinit) { gasneti_local_rmb(); return; } gasneti_freezeonerr_userenabled = gasneti_getenv_yesno_withdefault("GASNET_FREEZE_ON_ERROR",0); gasneti_local_wmb(); gasneti_freezeonerr_isinit = 1; gasneti_ondemand_init(); } extern void gasneti_freezeForDebuggerErr(void) { gasneti_freezeForDebugger_init(); if (gasneti_freezeonerr_userenabled) gasneti_freezeForDebuggerNow(&gasnet_frozen,"gasnet_frozen"); /* allow user freeze */ } /* ------------------------------------------------------------------------------------ */ // command-line retrieval support #if PLATFORM_OS_LINUX || PLATFORM_OS_CYGWIN || \ PLATFORM_OS_FREEBSD || PLATFORM_OS_NETBSD || PLATFORM_OS_OPENBSD #define GASNETI_HAVE_ARGV_FROM_PROC 1 /* Try to get substitute argv from /proc, if available. * Note that /proc is not mounted by default on many/most BSD systems. */ static void gasneti_argv_from_proc(int **ppargc, char ****ppargv) { static int argc = 0; static char **argv = NULL; #if PLATFORM_OS_LINUX || PLATFORM_OS_CYGWIN const char *filename = "/proc/self/cmdline"; #elif PLATFORM_OS_FREEBSD || PLATFORM_OS_NETBSD || PLATFORM_OS_OPENBSD const char *filename = "/proc/curproc/cmdline"; #endif int fd; size_t len = 0; char *cmdline; if_pf (argc) { /* duplicate call */ *ppargc = &argc; *ppargv = &argv; return; } if ((fd = open(filename, O_RDONLY)) < 0) return; /* Read the whole file, made harder because stat() yields st_size=0 */ { ssize_t rc; size_t asize = 32; cmdline = malloc(asize); while (1) { rc = read(fd, cmdline+len, asize-len); if (rc == 0) { break; /* Normal termination */ } else if (rc < 0) { if (errno == EINTR) continue; free(cmdline); (void) close(fd); return; /* Fail silently (non-fatal) */ } len += rc; if (len == asize) { asize += MIN(asize,1024); /* double up to 1k and linear after */ cmdline = realloc(cmdline, asize); } } (void) close(fd); } if (len == 0 || !cmdline[0] || cmdline[len-1]) { // bug 4076: we read an obviously garbled cmdline static int retried = 0; free(cmdline); if (!retried) { // retry at most once gasneti_nsleep(100*1000*1000); // sleep 100ms gasneti_sched_yield(); retried = 1; gasneti_argv_from_proc(ppargc, ppargv); } return; // fail silently } cmdline = realloc(cmdline, len); gasneti_assert(cmdline[len-1] == 0); /* Parse the cmdline on '\0' separators */ { char *p; int i; for (p = cmdline, argc = 0; p < (cmdline+len); ++argc) { p += strlen(p) + 1; } argv = malloc((argc+1) * sizeof(char*)); for (p = cmdline, i = 0; i < argc; ++i) { argv[i] = p; p += strlen(p) + 1; } argv[argc] = NULL; } *ppargc = &argc; *ppargv = &argv; } #endif #if PLATFORM_OS_SOLARIS #include #define GASNETI_HAVE_ARGV_FROM_PROC 1 /* Try to get address of true original argv from /proc, if available. */ static void gasneti_argv_from_proc(int **ppargc, char ****ppargv) { static int argc = 0; static char **argv = NULL; int fd; size_t len = 0; psinfo_t psi; if_pf (argc) { /* duplicate call */ *ppargc = &argc; *ppargv = &argv; return; } if ((fd = open("/proc/self/psinfo", O_RDONLY)) < 0) return; /* Read the whole file */ { ssize_t rc; char *p = (char *)ψ do { rc = read(fd, p + len, sizeof(psi) - len); if (rc < 0) { if (errno == EINTR) continue; (void) close(fd); return; /* Fail silently (non-fatal) */ } len += rc; } while (len != sizeof(psi)); (void) close(fd); } /* Extract argc and (shallow) copy argv */ argc = psi.pr_argc; len = (argc+1) * sizeof(char*); argv = memcpy(malloc(len), (void*)(psi.pr_argv), len); *ppargc = &argc; *ppargv = &argv; } #endif #if PLATFORM_OS_DARWIN #include #if defined(CTL_KERN) && defined(KERN_PROCARGS2) #define GASNETI_HAVE_ARGV_FROM_SYSCTL 1 /* Try to get substitute argv from the memory above our stack. */ static void gasneti_argv_from_sysctl(int **ppargc, char ****ppargv) { static int argc = 0; static char **argv = NULL; int i, mib[3]; char *argv0, *buf; size_t len; if_pf (argc) { /* duplicate call */ *ppargc = &argc; *ppargv = &argv; return; } mib[0] = CTL_KERN; mib[1] = KERN_PROCARGS2; mib[2] = getpid(); retry: /* Query for length and allocate space */ len = 0; if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0) return; len += 8; /* Empirically determined that we must add at least 1 */ buf = malloc(len); /* Actual sysctl() query */ if (sysctl(mib, 3, buf, &len, NULL, 0) < 0) { free(buf); return; } /* Extract argc and the argv array from buf */ { char *start, *end; if (mib[1] == KERN_PROCARGS2) { /* argc is first int */ argc = *(int*)buf; start = buf + sizeof(int); } else { start = buf; } /* Skip over execpath and any trailing '\0' to find argv[0] */ start += strlen(start) + 1; while ((start - buf < len) && ! *start) start++; #if defined(KERN_PROCARGS) if ((start - buf == len) && (mib[1] == KERN_PROCARGS2)) { // Did not find anything after exepath. // So, try again using KERN_PROCARGS (which excludes argc). free(buf); len = 0; mib[1] = KERN_PROCARGS; goto retry; } #endif gasneti_assert_uint(start - buf ,<, len); /* Skip over the args to find end */ for (end = start, i = 0; i < argc; ++i) { end += strlen(end) + 1; gasneti_assert_uint(end - buf ,<, len); } /* Keep a copy of only what we need */ len = end - start; argv0 = memcpy(malloc(len), start, len); free(buf); } /* Build the argv array */ argv = malloc((argc+1) * sizeof(char*)); { char *p = argv0; for (i = 0; i < argc; ++i) { argv[i] = p; p += strlen(p) + 1; } argv[argc] = NULL; } *ppargc = &argc; *ppargv = &argv; } #endif #endif #if PLATFORM_OS_FREEBSD || PLATFORM_OS_NETBSD || PLATFORM_OS_OPENBSD #include #if (PLATFORM_OS_FREEBSD && defined(CTL_KERN) && defined(KERN_PROC) && defined(KERN_PROC_ARGS)) || \ (PLATFORM_OS_NETBSD && defined(CTL_KERN) && defined(KERN_PROC_ARGS) && defined(KERN_PROC_ARGV)) || \ (PLATFORM_OS_OPENBSD && defined(CTL_KERN) && defined(KERN_PROC_ARGS) && defined(KERN_PROC_ARGV)) #define GASNETI_HAVE_ARGV_FROM_SYSCTL 1 static void gasneti_argv_from_sysctl(int **ppargc, char ****ppargv) { static int argc = 0; static char **argv = NULL; int mib[4]; char *buf; size_t len; if_pf (argc) { /* duplicate call */ *ppargc = &argc; *ppargv = &argv; return; } mib[0] = CTL_KERN; #if PLATFORM_OS_FREEBSD mib[1] = KERN_PROC; mib[2] = KERN_PROC_ARGS; mib[3] = getpid(); #elif PLATFORM_OS_NETBSD || PLATFORM_OS_OPENBSD mib[1] = KERN_PROC_ARGS; mib[2] = getpid(); mib[3] = KERN_PROC_ARGV; #else #error #endif /* Query for length and allocate space */ len = 0; if (sysctl(mib, 4, NULL, &len, NULL, 0) < 0) return; buf = malloc(len); /* Actual sysctl() query */ if (sysctl(mib, 4, buf, &len, NULL, 0) < 0) { free(buf); return; } #if PLATFORM_OS_FREEBSD || PLATFORM_OS_NETBSD /* Extract argc and the argv array from buf */ { char *p; int i; buf = realloc(buf, len); for (argc = 0, p = buf ; p - buf < len; ++argc) { p += strlen(p) + 1; } argv = malloc((argc+1) * sizeof(char*)); for (i = 0, p = buf; i < argc; ++i) { argv[i] = p; p += strlen(p) + 1; } argv[argc] = NULL; } #elif PLATFORM_OS_OPENBSD /* Count and relocate (due to realloc) argv[] array already in buf */ argv = realloc(buf, len); for (argc = 0; argv[argc]; ++argc) { argv[argc] += ((uintptr_t)argv - (uintptr_t)buf); } #else #error #endif *ppargc = &argc; *ppargv = &argv; } #endif #endif // retrieve the argc/argv into the (empty) provided variables GASNETI_COLD extern void gasneti_argv_from_system(int **pargc, char ****pargv) { gasneti_assert(pargc && pargv); // Some systems may support multiple mechanisms, // and we try them all until we get something. #ifdef GASNETI_HAVE_ARGV_FROM_SYSCTL gasneti_argv_from_sysctl(pargc,pargv); #endif #ifdef GASNETI_HAVE_ARGV_FROM_PROC if (!*pargc || !*pargv) gasneti_argv_from_proc(pargc,pargv); #endif } extern const char *gasneti_exe_name(void) { static char exename[PATH_MAX] = { 0 }; if (*exename) return exename; static int *argc = 0; static char ***argv = 0; gasneti_argv_from_system(&argc, &argv); if (argc && *argc > 0 && argv && *argv && (*argv)[0] && (*argv)[0][0]) { gasneti_qualify_path(exename, (*argv)[0]); } return exename; } /* ------------------------------------------------------------------------------------ */ /* Dynamic backtrace support */ /* Prefix a string with the CWD, unless already fully qualified. * path_out must have size at least PATH_MAX. * Also used by gasnet_trace.c */ extern void gasneti_qualify_path(char *path_out, const char *path_in) { if (path_in[0] == '/' || path_in[0] == '\\') { path_out[0] = '\0'; } else { if (getcwd(path_out, PATH_MAX)) { strcat(path_out,"/"); } else { strcpy(path_out,"/GETCWD_FAILED/"); } } strcat(path_out, path_in); } /* All configure-detected backtrace mechanisms available */ #if HAVE_BACKTRACE #define GASNETI_BT_EXECINFO &gasneti_bt_execinfo #endif #if HAVE_PRINTSTACK #define GASNETI_BT_PRINTSTACK &printstack #endif #if defined(GSTACK_PATH) && !GASNETI_NO_FORK #define GASNETI_BT_GSTACK &gasneti_bt_gstack #endif #if defined(PSTACK_PATH) && !GASNETI_NO_FORK #define GASNETI_BT_PSTACK &gasneti_bt_pstack #endif #if defined(GDB_PATH) && !GASNETI_NO_FORK #define GASNETI_BT_GDB &gasneti_bt_gdb #endif #if defined(DBX_PATH) && !GASNETI_NO_FORK #define GASNETI_BT_DBX &gasneti_bt_dbx #endif #if defined(IDB_PATH) && !GASNETI_NO_FORK #define GASNETI_BT_IDB &gasneti_bt_idb #endif #if defined(LLDB_PATH) && !GASNETI_NO_FORK #define GASNETI_BT_LLDB &gasneti_bt_lldb #endif #if defined(PGDBG_PATH) && !GASNETI_NO_FORK #define GASNETI_BT_PGDBG &gasneti_bt_pgdbg #endif #if !GASNETI_NO_FORK /* Execute system w/ stdout redirected to 'fd' and std{in,err} to /dev/null */ static int gasneti_system_redirected(const char *cmd, int stdout_fd) { int rc; int saved_stdin, saved_stdout, saved_stderr; off_t beginpos, endpos; /* XXX: what if the following two writes fail? */ gasneti_unused_result( write(stdout_fd, cmd, strlen(cmd)) ); gasneti_unused_result( write(stdout_fd, "\n", 1) ); beginpos = lseek(stdout_fd, 0, SEEK_CUR); /* fetch current position */ /* Redirect output to 'fd' and std{in,err} to /dev/null */ saved_stdin = dup(STDIN_FILENO); saved_stdout = dup(STDOUT_FILENO); saved_stderr = dup(STDERR_FILENO); dup2(stdout_fd, STDOUT_FILENO); rc = open("/dev/null", O_WRONLY); dup2(rc, STDERR_FILENO); close(rc); rc = open("/dev/null", O_RDONLY); dup2(rc, STDIN_FILENO); close(rc); /* Run the command */ rc = system(cmd); // will return -1 on failure to spawn child process endpos = lseek(stdout_fd, 0, SEEK_CUR); /* fetch current position */ if (!rc && beginpos > 0 && endpos > 0 && (beginpos == endpos)) { rc = -2; /* command failed to generate output - consider it a failure */ } /* Restore I/O */ dup2(saved_stdout, STDOUT_FILENO); close(saved_stdout); dup2(saved_stderr, STDERR_FILENO); close(saved_stderr); dup2(saved_stdin, STDIN_FILENO); close(saved_stdin); return rc; } static volatile int gasneti_bt_complete_flag = 0; static void gasneti_bt_complete_handler(int sig) { gasneti_bt_complete_flag = 1; } /* Fork a co-process to execute gasneti_system_redirected with the supplied arguments, and wait for completion in a manner which avoids placing the wait system call on the top of the target process's stack (because it confuses some stackwalkers) */ static int gasneti_system_redirected_coprocess(const char *cmd, int stdout_fd) { FILE *file; int tmpfd; int rc = 0; pid_t parentpid = getpid(); /* Create a tmpfile to communicate with the child */ file = tmpfile(); if (!file) return -3; tmpfd = fileno(file); { /* setup the parent to sleep */ gasneti_sighandlerfn_t old_sigh = gasneti_reghandler(GASNETI_UNFREEZE_SIGNAL, gasneti_bt_complete_handler); const int was_blocked = (gasneti_unblocksig(GASNETI_UNFREEZE_SIGNAL) > 0); volatile int i=0; if (!fork()) { /* the child - debugger co-process launcher */ #if PLATFORM_OS_OPENBSD || PLATFORM_OS_DARWIN // OpenBSD refuses to ptrace attach a connected ancestor because it // would create a cycle in the process tree which the kernel is unable // to tolerate. This behavior was introduced in OpenBSD 4.5 Errata 011 // and has not changed though at least OpenBSD 6.1. // We avoid this cycle using an extra fork()+_exit() to disconnect the // process requesting the attach from the target. // It appeares macOS 10.15 (Darwin 19) also needs this separation, // though it is unknown if the reason is the same as for OpenBSD. #if PLATFORM_OS_DARWIN struct utsname uname_data; int os_ver = uname(&uname_data) ? 0 : atoi(uname_data.release); if (!os_ver || os_ver >= 19) // assume extra fork() needed if fail to query os release #endif { pid_t childpid = getpid(); if (fork()) _exit(0); do {} while (getppid() == childpid); } #endif int retval = gasneti_system_redirected(cmd, tmpfd); if (retval) { /* system call failed - nuke the output */ gasneti_unused_result( ftruncate(tmpfd, 0) ); } #if 0 /* gasneti_filesystem_sync() is currenlty a no-op by default */ gasneti_filesystem_sync(); /* flush output */ #else fsync(tmpfd); /* flush output */ #endif kill(parentpid, GASNETI_UNFREEZE_SIGNAL); /* signal the parent of completion */ gasneti_killmyprocess(0); /* die */ } else { /* the parent - our debugger target */ struct stat tmpstat; while (!gasneti_bt_complete_flag) { i++; // sched_yield seems to be friendlier than sleep() for stack-walkers // additionally, use a non-error checking call to avoid possible recursive failures _gasneti_sched_yield(); } /* awakened */ gasneti_bt_complete_flag = 0; if (was_blocked) gasneti_blocksig(GASNETI_UNFREEZE_SIGNAL); gasneti_reghandler(GASNETI_UNFREEZE_SIGNAL, old_sigh); if (fstat(tmpfd, &tmpstat)) rc = -4; /* never happens? */ else if (tmpstat.st_size == 0) rc = -5; /* child process spawn failed */ else if (lseek(tmpfd, 0, SEEK_SET)) rc = -6; else { static char tmpbuf[255]; ssize_t bytes = tmpstat.st_size; while ((bytes = read(tmpfd, &tmpbuf, sizeof(tmpbuf))) > 0 || (bytes == -1 && errno == EINTR)) { if (bytes > 0) { int retval; tryagain: retval = write(stdout_fd, tmpbuf, bytes); if (retval == -1) { if (errno == EINTR) goto tryagain; else { rc = -7; break; } /* write error */ } } } if (bytes == -1) rc = -8; /* read error occurred */ } } } fclose(file); /* close and delete temp file */ return rc; } #endif #if (PATH_MAX < 1024) #define GASNETI_BT_PATHSZ 1024 /* OpenBSD warns if this is smaller than 1024 */ #else #define GASNETI_BT_PATHSZ PATH_MAX #endif static int gasneti_backtrace_mt; static char gasneti_exename_bt[GASNETI_BT_PATHSZ]; static const char *gasneti_tmpdir_bt = "/tmp"; static int gasneti_bt_mkstemp(char *filename, int limit) { static const char template[] = "/gasnet_XXXXXX"; char *p; int len; len = strlen(gasneti_tmpdir_bt); len = MIN(len, limit-1); memcpy(filename,gasneti_tmpdir_bt,len); p = filename + len; len = MIN(limit - len - 1, sizeof(template)); memcpy(p,template,len); p[len] = '\0'; gasneti_assert_int(strlen(filename) ,<, limit); return mkstemp(filename); } #ifdef GASNETI_BT_DBX static int gasneti_bt_dbx(int fd) { /* dbx's thread support is poor and not easily scriptable */ static const char fmt[] = "echo 'attach %d; where; quit' | %s '%s'"; static char cmd[sizeof(fmt) + 2*GASNETI_BT_PATHSZ]; const char *dbx = (access(DBX_PATH, X_OK) ? "dbx" : DBX_PATH); int rc = snprintf(cmd, sizeof(cmd), fmt, (int)getpid(), dbx, gasneti_exename_bt); if ((rc < 0) || (rc >= sizeof(cmd))) return -10; return gasneti_system_redirected(cmd, fd); } #endif #ifdef GASNETI_BT_IDB static int gasneti_bt_idb(int fd) { static const char mt_fmt[] = "echo 'set $stoponattach; attach %d; where thread all; quit' | %s -dbx -quiet '%s'"; static const char st_fmt[] = "echo 'set $stoponattach; attach %d; where; quit' | %s -dbx -quiet '%s'"; const char *fmt = gasneti_backtrace_mt ? mt_fmt : st_fmt; // Size cmd[] to the larger *_fmt: gasneti_static_assert(sizeof(mt_fmt) >= sizeof(st_fmt)); static char cmd[sizeof(mt_fmt) + 2*GASNETI_BT_PATHSZ]; const char *idb = (access(IDB_PATH, X_OK) ? "idb" : IDB_PATH); int rc = snprintf(cmd, sizeof(cmd), fmt, (int)getpid(), idb, gasneti_exename_bt); if ((rc < 0) || (rc >= sizeof(cmd))) return -10; return gasneti_system_redirected_coprocess(cmd, fd); } #endif #ifdef GASNETI_BT_PGDBG static int gasneti_bt_pgdbg(int fd) { static const char mt_fmt[] = "%s -text -c 'attach %i %s ; threads ; [all] where ; detach ; quit'"; static const char st_fmt[] = "%s -text -c 'attach %i %s ; where ; detach ; quit'"; const char *fmt = gasneti_backtrace_mt ? mt_fmt : st_fmt; // Size cmd[] to the larger *_fmt: gasneti_static_assert(sizeof(mt_fmt) >= sizeof(st_fmt)); static char cmd[sizeof(mt_fmt) + 2*GASNETI_BT_PATHSZ]; const char *pgdbg = (access(PGDBG_PATH, X_OK) ? "pgdbg" : PGDBG_PATH); int rc = snprintf(cmd, sizeof(cmd), fmt, pgdbg, (int)getpid(), gasneti_exename_bt); if ((rc < 0) || (rc >= sizeof(cmd))) return -10; return gasneti_system_redirected_coprocess(cmd, fd); } #endif #ifdef GASNETI_BT_LLDB static int gasneti_bt_lldb(int fd) { static const char fmt[] = "%s -p %d -o 'bt all' -o quit"; static char cmd[sizeof(fmt) + 2*GASNETI_BT_PATHSZ]; const char *lldb = (access(LLDB_PATH, X_OK) ? "lldb" : LLDB_PATH); int rc = snprintf(cmd, sizeof(cmd), fmt, lldb, (int)getpid()); if ((rc < 0) || (rc >= sizeof(cmd))) return -10; return gasneti_system_redirected_coprocess(cmd, fd); } #endif #ifdef GASNETI_BT_GSTACK static int gasneti_bt_gstack(int fd) { static char cmd[12 + GASNETI_BT_PATHSZ]; const char *gstack = (access(GSTACK_PATH, X_OK) ? "gstack" : GSTACK_PATH); int rc = snprintf(cmd, sizeof(cmd), "%s %i", gstack, (int)getpid()); if ((rc < 0) || (rc >= sizeof(cmd))) return -10; return gasneti_system_redirected_coprocess(cmd, fd); } #endif #ifdef GASNETI_BT_PSTACK static int gasneti_bt_pstack(int fd) { static char cmd[12 + GASNETI_BT_PATHSZ]; const char *pstack = (access(PSTACK_PATH, X_OK) ? "pstack" : PSTACK_PATH); int rc = snprintf(cmd, sizeof(cmd), "%s %i", pstack, (int)getpid()); if ((rc < 0) || (rc >= sizeof(cmd))) return -10; return gasneti_system_redirected_coprocess(cmd, fd); } #endif #ifdef GASNETI_BT_GDB static int gasneti_bt_gdb(int fd) { /* Change "backtrace" to "backtrace full" to also see local vars from each frame */ static const char mt_commands[] = "\ninfo threads\nthread apply all backtrace 50\ndetach\nquit\n"; #if PLATFORM_OS_CYGWIN /* bug1848: cygwin is always multi-threaded, user thread is usually (always?) #1 */ static const char st_commands[] = "\nthread 1\nbacktrace 50\ndetach\nquit\n"; #else static const char st_commands[] = "\nbacktrace 50\ndetach\nquit\n"; #endif const char *commands = gasneti_backtrace_mt ? mt_commands : st_commands; size_t commands_sz = gasneti_backtrace_mt ? sizeof(mt_commands) : sizeof(st_commands); static const char shell_rm[] = "shell /bin/rm -f "; static const char fmt[] = "%s -nx -batch -x %s '%s' %d"; static char cmd[sizeof(fmt) + 3*GASNETI_BT_PATHSZ]; char filename[GASNETI_BT_PATHSZ]; const char *gdb = (access(GDB_PATH, X_OK) ? "gdb" : GDB_PATH); int rc; /* Build gdb commands file, since it won't take commands on stdin */ { int tmpfd, len; tmpfd = gasneti_bt_mkstemp(filename,sizeof(filename)); if (tmpfd < 0) return -11; len = sizeof(shell_rm) - 1; if (len != write(tmpfd, shell_rm, len)) { rc = -12; goto out; } len = strlen(filename); if (len != write(tmpfd, filename, len)) { rc = -13; goto out; } len = commands_sz - 1; if (len != write(tmpfd, commands, len)) { rc = -14; goto out; } if (0 != close(tmpfd)) { rc = -15; goto out; } } rc = snprintf(cmd, sizeof(cmd), fmt, gdb, filename, gasneti_exename_bt, (int)getpid()); if ((rc < 0) || (rc >= sizeof(cmd))) { rc = -10; goto out; } #if PLATFORM_OS_OPENBSD // OpenBSD is unable to ptrace attach a connected ancestor. // For more info see comment in gasneti_system_redirected_coprocess(). rc = gasneti_system_redirected_coprocess(cmd, fd); #else rc = gasneti_system_redirected(cmd, fd); #endif out: (void)unlink(filename); /* just in case */ return rc; } #endif #ifdef GASNETI_BT_EXECINFO static int gasneti_bt_execinfo(int fd) { #define MAXBT 1024 static void *btaddrs[MAXBT]; int entries; char **fnnames = NULL; int i; entries = backtrace(btaddrs, MAXBT); #if HAVE_BACKTRACE_SYMBOLS fnnames = backtrace_symbols(btaddrs, entries); #endif #if defined(ADDR2LINE_PATH) && !GASNETI_NO_FORK // volatile below to avoid an optimizer bug observed on icc 17.0.2 const char * volatile addr2line_path = (access(ADDR2LINE_PATH, X_OK) ? "addr2line" : ADDR2LINE_PATH); static const char fmt[] = "%s -f -e '%s' %p"; static char cmd[sizeof(fmt) + 2*GASNETI_BT_PATHSZ + 10]; #define XLBUF 64 /* even as short as 2 bytes is still safe */ static char xlstr[XLBUF]; { strcpy(cmd,addr2line_path); strcat(cmd," --version"); // use --version to check if addr2line looks functional FILE *fp = popen(cmd,"r"); while (fp && fgets(xlstr, sizeof(xlstr), fp)) ; // slurp if (!fp || pclose(fp)) { const char *msg = "*** Warning: "ADDR2LINE_PATH" is unavailable to translate symbols\n"; gasneti_unused_result( write(fd, msg, strlen(msg)) ); addr2line_path = NULL; } } #endif for (i=0; i < entries; i++) { /* XXX: what if the write()s fail? */ static char linebuf[16]; snprintf(linebuf, sizeof(linebuf), "%i: ", i); gasneti_unused_result( write(fd, linebuf, strlen(linebuf)) ); if (fnnames) { // note this usually only gets hex addresses, unless linked w/-rdynamic gasneti_unused_result( write(fd, fnnames[i], strlen(fnnames[i])) ); gasneti_unused_result( write(fd, " ", 1) ); } #if defined(ADDR2LINE_PATH) && !GASNETI_NO_FORK if (addr2line_path) /* use addr2line when available to retrieve symbolic info */ { FILE *xlate; int rc; xlstr[0] = '\0'; rc = snprintf(cmd, sizeof(cmd), fmt, addr2line_path, gasneti_exename_bt, btaddrs[i]); if ((rc < 0) || (rc >= sizeof(cmd))) { return -10; } xlate = popen(cmd, "r"); if (xlate) { while (fgets(xlstr, sizeof(xlstr), xlate)) { size_t len = strlen(xlstr); if (xlstr[len-1] == '\n') xlstr[len-1] = ' '; gasneti_unused_result( write(fd, xlstr, len) ); } pclose(xlate); } } #undef XLBUF #endif gasneti_unused_result( write(fd, "\n", 1) ); } /* if (fnnames) free(fnnames); */ return 0; } #endif /* table of known/detected backtrace mechanisms */ static gasnett_backtrace_type_t gasneti_backtrace_mechanisms[] = { /* * Debuggers capable of backtracing all threads: */ #if defined(GASNETI_BT_LLDB) && PLATFORM_OS_DARWIN // bug3626: vendor-signed debugger has priority { "LLDB", GASNETI_BT_LLDB, 1 }, #endif #ifdef GASNETI_BT_GDB { "GDB", GASNETI_BT_GDB, 1 }, #endif #ifdef GASNETI_BT_IDB { "IDB", GASNETI_BT_IDB, 1 }, #endif #ifdef GASNETI_BT_PGDBG { "PGDBG", GASNETI_BT_PGDBG, 1 }, #endif #if defined(GASNETI_BT_LLDB) && !PLATFORM_OS_DARWIN { "LLDB", GASNETI_BT_LLDB, 1 }, #endif // On Linux, [gp]stack are shell scripts that invoke gdb. // Place them below gdb to eliminate the script from the process group, // since it could interfere with orphan control signalling. // On Solaris, pstack is a real utility that generates higher-quality // backtraces than dbx. #ifdef GASNETI_BT_GSTACK { "GSTACK", GASNETI_BT_GSTACK, 1 }, #endif #ifdef GASNETI_BT_PSTACK { "PSTACK", GASNETI_BT_PSTACK, 1 }, #endif /* * Debuggers NOT capable of backtracing all threads: */ #ifdef GASNETI_BT_DBX { "DBX", GASNETI_BT_DBX, 0 }, #endif /* * Library calls capable of backtracing only the calling thread: */ #ifdef GASNETI_BT_EXECINFO { "EXECINFO", GASNETI_BT_EXECINFO, 1 }, #endif #ifdef GASNETI_BT_PRINTSTACK { "PRINTSTACK", GASNETI_BT_PRINTSTACK, 1 }, #endif /* * Space for registration of optional user mechanism */ { NULL, NULL, 0 } }; static int gasneti_backtrace_mechanism_count = /* excludes the NULL */ (sizeof(gasneti_backtrace_mechanisms)/sizeof(gasneti_backtrace_mechanisms[0])) - 1; static int gasneti_backtrace_isinit = 0; static int gasneti_backtrace_userenabled = 0; #if GASNETI_BUILDING_CONDUIT static int gasneti_backtrace_userdisabled = 0; extern const char *gasneti_backtraceid(void); // allow conduit to provide [NODE] line prefix #endif static const char *gasneti_backtrace_list = 0; static int gasneti_backtrace_prctl = -2; GASNETI_TENTATIVE_LIBRARY_DEFN gasnett_backtrace_type_t gasnett_backtrace_user; /* allow client provided backtrace function */ extern void gasneti_backtrace_init(const char *exename) { static int user_is_init = 0; #if HAVE_PR_SET_PTRACER // May be necessary to allow ptrace_attach(): // errors here are ignored, but saved to possibly assist in later diagnosis gasneti_backtrace_prctl = prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY); #endif gasneti_qualify_path(gasneti_exename_bt, exename); gasneti_backtrace_userenabled = gasneti_getenv_yesno_withdefault("GASNET_BACKTRACE",0); #if GASNETI_BUILDING_CONDUIT if (gasneti_backtrace_userenabled && !gasneti_check_node_list("GASNET_BACKTRACE_NODES")) { gasneti_backtrace_userdisabled = 1; } #endif #if GASNETI_THREADS #define GASNETI_BACKTRACE_MT_DEFAULT 1 #else #define GASNETI_BACKTRACE_MT_DEFAULT 0 #endif gasneti_backtrace_mt = gasneti_getenv_yesno_withdefault("GASNET_BACKTRACE_MT", GASNETI_BACKTRACE_MT_DEFAULT); gasneti_tmpdir_bt = gasneti_tmpdir(); if (!gasneti_tmpdir_bt) { gasneti_console_message("WARNING", "Failed to init backtrace support because none of $GASNET_TMPDIR, $TMPDIR or /tmp is usable"); return; } if (!user_is_init && gasnett_backtrace_user.name && gasnett_backtrace_user.fnp) { memcpy(&gasneti_backtrace_mechanisms[gasneti_backtrace_mechanism_count++], &gasnett_backtrace_user, sizeof(gasnett_backtrace_user)); user_is_init = 1; } { static char btlist_def[255]; int th; int i; btlist_def[0] = '\0'; #if GASNETI_THREADS for (th = 1; th >= 0; th--) #endif { for (i = 0; i < gasneti_backtrace_mechanism_count; ++i) { // silence a buggy array-bounds warning from gcc-5: gasneti_assume(i < sizeof(gasneti_backtrace_mechanisms)/sizeof(gasneti_backtrace_mechanisms[0])); #if GASNETI_THREADS if (th == gasneti_backtrace_mechanisms[i].threadsupport) #endif { if (strlen(btlist_def)) strcat(btlist_def, ","); strcat(btlist_def,gasneti_backtrace_mechanisms[i].name); } } } gasneti_backtrace_list = gasneti_getenv_withdefault("GASNET_BACKTRACE_TYPE",btlist_def); } gasneti_backtrace_isinit = 1; gasneti_freezeForDebugger_init(); } /* "best effort" to produce a backtrace * Returns 0 on apparent success, non-zero otherwise. * NOTE: If fd corresponds to a FILE*, caller should fflush() it first. */ extern int gasneti_print_backtrace(int fd) { int retval = 1; if (!gasneti_backtrace_isinit) { gasneti_console_message("WARNING", "Ignoring call to gasneti_print_backtrace before gasneti_backtrace_init"); return -1; } /* a hopefully signal-safe lock to ensure mutual exclusion and prevent recursion */ if (!gasneti_atomic_decrement_and_test(&gasneti_backtrace_enabled,GASNETI_ATOMIC_ACQ)) return -1; { /* Save signal handlers to avoid recursion */ gasneti_sighandlerfn_t old_ABRT = gasneti_reghandler(SIGABRT, SIG_DFL); gasneti_sighandlerfn_t old_ILL = gasneti_reghandler(SIGILL, SIG_DFL); gasneti_sighandlerfn_t old_SEGV = gasneti_reghandler(SIGSEGV, SIG_DFL); gasneti_sighandlerfn_t old_BUS = gasneti_reghandler(SIGBUS, SIG_DFL); gasneti_sighandlerfn_t old_FPE = gasneti_reghandler(SIGFPE, SIG_DFL); FILE *file; /* Create a tmpfile to hold the backtrace */ #if 0 /* tmpfile() doesn't honor TMPDIR (see bug 2671) */ file = tmpfile(); #else { char filename[GASNETI_BT_PATHSZ]; int tmpfd = gasneti_bt_mkstemp(filename,sizeof(filename)); (void)unlink(filename); file = fdopen(tmpfd, "r+"); } #endif if (file) { int tmpfd = fileno(file); const char *plist = gasneti_backtrace_list; static char linebuf[1024]; char *linep = linebuf; int linelen = sizeof(linebuf); const char *btid; *linep = '\0'; #if GASNETI_BUILDING_CONDUIT if ((btid = gasneti_backtraceid())) { strncpy(linebuf, btid, 80); linebuf[80] = '\0'; linelen -= strlen(linebuf); linep += strlen(linebuf); } #endif while (*plist) { /* Loop over selections until success or end */ int i; static char btsel[255]; /* parse selection */ char *psel = btsel; while (*plist && !strchr(" ,|;",*plist)) { /* ICK: Our toupper() replacement for Tru64 is a macro that * evaluates its argument multiple times. * So, need ++ outside toupper(); */ *psel++ = toupper(*plist); plist++; } *psel = '\0'; if (*plist) plist++; for (i = 0; i < gasneti_backtrace_mechanism_count; ++i) { // silence a buggy array-bounds warning from gcc-5: gasneti_assume(i < sizeof(gasneti_backtrace_mechanisms)/sizeof(gasneti_backtrace_mechanisms[0])); if (!strcmp(gasneti_backtrace_mechanisms[i].name,btsel)) { snprintf(linep, linelen, "Invoking %s for backtrace...\n", btsel); gasneti_unused_result( write(fd, linebuf, strlen(linebuf)) ); retval = (*gasneti_backtrace_mechanisms[i].fnp)(tmpfd); break; } } if (i == gasneti_backtrace_mechanism_count) { gasneti_console_message("WARNING","GASNET_BACKTRACE_TYPE=%s unrecognized or unsupported - ignoring..\n", btsel); } else if (retval == 0) { /* Send to requested destination (and tracefile if any) */ GASNETT_TRACE_PRINTF_FORCE("========== BEGIN BACKTRACE =========="); rewind(file); while (fgets(linep, linelen, file)) { /* XXX: what if this write() fails? */ gasneti_unused_result( write(fd, linebuf, strlen(linebuf)) ); /* w/ node prefix */ GASNETT_TRACE_PRINTF_FORCE("%s",linep);/* w/o node prefix */ } GASNETT_TRACE_PRINTF_FORCE("========== END BACKTRACE =========="); gasneti_flush_streams(); break; } else { /* backtrace attempt failed - retry with next mechanism */ snprintf(linep, linelen, "%s backtrace failed! (0x%08x:%d)\n", btsel, retval, retval); gasneti_unused_result( write(fd, linebuf, strlen(linebuf)) ); rewind(file); gasneti_unused_result( ftruncate(tmpfd, 0) ); // in case failed backtrace wrote any output // detect and report system configuration issues that may be responsible for backtrace failure #if PLATFORM_OS_LINUX && !defined(YAMA_PTRACE_SCOPE) #define YAMA_PTRACE_SCOPE "/proc/sys/kernel/yama/ptrace_scope" #endif #ifdef YAMA_PTRACE_SCOPE { int ptracefd = 0; if (!access(YAMA_PTRACE_SCOPE,R_OK) && (ptracefd = open(YAMA_PTRACE_SCOPE,O_RDONLY))) { char scope = 0; // docs: https://www.kernel.org/doc/Documentation/security/Yama.txt if (read(ptracefd, &scope, 1) == 1 && scope != '0' // 0 = no restrictions && !(scope == '1' && !gasneti_backtrace_prctl)) { // 1 = restricted, only works if prctl succeeded snprintf(linep, linelen, "WARNING: %s=%c may be preventing debugger attach\n", YAMA_PTRACE_SCOPE, scope); gasneti_unused_result( write(fd, linebuf, strlen(linebuf)) ); } gasneti_unused_result( close(ptracefd) ); } } #endif #if PLATFORM_OS_OPENBSD && \ defined(CTL_KERN) && defined(KERN_GLOBAL_PTRACE) { int mib[] = { CTL_KERN, KERN_GLOBAL_PTRACE }; int ptrace = 0; size_t len = sizeof(ptrace); if (!sysctl(mib, sizeof(mib)/sizeof(int), &ptrace, &len, NULL, 0) && ptrace == 0) { snprintf(linep, linelen, "WARNING: sysctl kern.global_ptrace=%i may be preventing debugger attach\n", ptrace); gasneti_unused_result( write(fd, linebuf, strlen(linebuf)) ); } } #endif } } fclose(file); } gasneti_reghandler(SIGABRT, old_ABRT); gasneti_reghandler(SIGILL, old_ILL); gasneti_reghandler(SIGSEGV, old_SEGV); gasneti_reghandler(SIGBUS, old_BUS); gasneti_reghandler(SIGFPE, old_FPE); } gasneti_atomic_set(&gasneti_backtrace_enabled,1,GASNETI_ATOMIC_REL); return retval; } void gasneti_registerSignalHandlers(gasneti_sighandlerfn_t handler) { int i; char *nocatch = gasneti_getenv("GASNET_NO_CATCH_SIGNAL"); int star = ((nocatch != NULL) && (strcmp(nocatch, "*") == 0)) ? 1: 0; if ((nocatch != NULL) && !star){ const char *sep = " ,"; char *w; for (w = (char *)strtok(nocatch, sep); w; w = (char *)strtok(NULL, sep)) { gasnett_siginfo_t *s; if ((s = gasnett_siginfo_fromstr(w)) != NULL) { GASNETT_TRACE_PRINTF("gasnett leaving signal %s unregistered", s->name); s->enable_gasnet_handler = 0; } else { gasneti_console_message("WARNING","unknown signal %s in GASNET_NO_CATCH_SIGNAL\n", w); } } } if (!star) { for (i = 0; i < sizeof(gasneti_sigtable)/sizeof(gasnett_siginfo_t); i++) { gasnett_siginfo_t *s = gasneti_sigtable + i; if (s->enable_gasnet_handler) s->oldhandler = gasneti_reghandler(s->signum, handler); } } else { GASNETT_TRACE_PRINTF("gasnett not registering any default signal handlers\n"); } gasneti_ondemand_init(); /* allow user override of signal handlers */ } /* ------------------------------------------------------------------------------------ */ static int _gasneti_print_backtrace_ifenabled(int fd) { static int noticeshown = 0; if (!gasneti_backtrace_isinit) { gasneti_console_message("WARNING", "Ignoring call to gasneti_print_backtrace_ifenabled before gasneti_backtrace_init"); return -1; } #if !GASNET_DEBUG #define GASNETI_NDEBUG_ADVISORY() do { \ if (!noticeshown) { \ gasneti_console_message("NOTICE","We recommend linking the debug version of GASNet to assist you in resolving this application issue."); \ noticeshown = 1; \ } \ } while (0) #else #define GASNETI_NDEBUG_ADVISORY() ((void)0) #endif #if GASNETI_BUILDING_CONDUIT if (gasneti_backtrace_userdisabled) { return 1; /* User turned off backtrace, so don't whine */ } else #endif if (gasneti_backtrace_userenabled) { GASNETI_NDEBUG_ADVISORY(); if (gasneti_internal_crash) gasneti_output_config(); // GEX info iff this looks like a GEX-related crash return gasneti_print_backtrace(fd); } else if (gasneti_backtrace_mechanism_count && !noticeshown) { gasneti_console_message("NOTICE", "Before reporting bugs, run with GASNET_BACKTRACE=1 in the environment to generate a backtrace."); GASNETI_NDEBUG_ADVISORY(); noticeshown = 1; return 1; } else { GASNETI_NDEBUG_ADVISORY(); return 1; /* We don't support any backtrace methods, so avoid false advertising. */ } } int (*gasneti_print_backtrace_ifenabled)(int fd) = &_gasneti_print_backtrace_ifenabled; /* ------------------------------------------------------------------------------------ */ extern uint64_t gasneti_checksum(const void *p, int numbytes) { uint8_t const *buf = p; uint64_t result = 0; int i; for (i=0;i> 56) & 0xFF) ) ^ *buf; buf++; } return result; } /* ------------------------------------------------------------------------------------ */ extern int gasneti_isLittleEndian(void) { union { int i; /* machine word */ unsigned char b[sizeof(int)]; /* b[0] overlaid with first byte of i */ } x; x.i = 0xFF; /* set lsb, zero all others */ return x.b[0] == 0xFF; } /* ------------------------------------------------------------------------------------ */ /* build a code-location string */ extern char *gasneti_build_loc_str(const char *funcname, const char *filename, int linenum) { int sz; char *loc; int fnlen; if (!funcname) funcname = ""; if (!filename) filename = "*unknown file*"; fnlen = strlen(funcname); sz = fnlen + strlen(filename) + 20; loc = malloc(sz); if (*funcname) snprintf(loc,sz,"%s%s at %s:%i", funcname, (fnlen && funcname[fnlen-1] != ')'?"()":""), filename, linenum); else snprintf(loc,sz,"%s:%i", filename, linenum); return loc; } /* ------------------------------------------------------------------------------------ */ /* number/size formatting */ extern int64_t gasneti_parse_int(const char *str, uint64_t mem_size_multiplier) { uint64_t val = 0; int base = 10; int neg = 0; const char *p = str; #define GASNETI_NUMBUF_SZ 80 int isfrac = 0; char numbuf[GASNETI_NUMBUF_SZ+1]; int i = 0; if (!str) return 0; /* null returns 0 */ if (*p == '+') p++; /* check for sign */ else if (*p == '-') { neg=1; p++; } while (*p && isspace(*p)) p++; /* eat spaces */ if (!*p) return 0; /* empty string returns 0 */ if (*p == '0' && toupper(*(p+1)) == 'X') { base = 16; p += 2; } /* check for hex */ while (*p && i < GASNETI_NUMBUF_SZ && ( (isdigit(*p) && *p < ('0'+base)) || (isalpha(*p) && toupper(*p) < ('A'+base-10)) || *p == '.') ) { if (isdigit(*p)) { val = (val * base) + (*p - '0'); } else if (isalpha(*p)) { val = (val * base) + (10 + toupper(*p) - 'A'); } else if (*p == '.') { isfrac = 1; /* user value is a fraction */ if (base != 10) gasneti_fatalerror("Format error in numerical string: %s", str); } numbuf[i++] = *p; p++; } numbuf[i] = '\0'; while (*p && isspace(*p)) p++; /* eat spaces */ if (mem_size_multiplier) { /* its a mem size, check for provided unit overridder */ if (*p == 'T' || *p == 't') mem_size_multiplier = ((uint64_t)1)<<40; else if (*p == 'G' || *p == 'g') mem_size_multiplier = ((uint64_t)1)<<30; else if (*p == 'M' || *p == 'm') mem_size_multiplier = ((uint64_t)1)<<20; else if (*p == 'K' || *p == 'k') mem_size_multiplier = ((uint64_t)1)<<10; else if (*p == 'B' || *p == 'b') mem_size_multiplier = 1; /* else - default to the context-sensitive mem_size_multiplier of the caller */ } else { mem_size_multiplier = 1; } if (isfrac) { double dval = atof(numbuf); val = (uint64_t)(int64_t)(dval*(double)mem_size_multiplier); } else { val = val * mem_size_multiplier; } if (neg) return -((int64_t)val); return (int64_t)val; #undef GASNETI_NUMBUF_SZ } extern char *gasneti_format_number(int64_t val, char *buf, size_t bufsz, int is_mem_size) { const char *unit = ""; const char *neg = ""; int64_t divisor = 1; if (val < 0) { val = -val; neg = "-"; } if (val >= ((int64_t)1) << 50) divisor = -1; /* use hex for huge vals */ else if (is_mem_size) { /* Try to strike a compromise between digits and round off */ #define GASNETI_USE_DIV(div, unit_str) \ if ((val >= 10*(div)) || ((val >= (div)) && !(val % (div)))) { \ divisor = (div); unit = (unit_str); break; \ } do { GASNETI_USE_DIV(((int64_t)1) << 40, " TB"); GASNETI_USE_DIV(((int64_t)1) << 30, " GB"); GASNETI_USE_DIV(((int64_t)1) << 20, " MB"); GASNETI_USE_DIV(((int64_t)1) << 10, " KB"); GASNETI_USE_DIV(((int64_t)1), " B"); } while (0); #undef GASNETI_USE_DIV } if (divisor > 0) { snprintf(buf, bufsz, "%s%"PRId64"%s", neg, (val/divisor), unit); } else if (divisor == -1) { if (*neg) val = -val; snprintf(buf, bufsz, "0x%"PRIx64, val); } else gasneti_fatalerror("internal error in gasneti_format_number"); return buf; } // Parses a floating-point number or fraction, with result by reference. // Errors return non-zero (and result possibly modified) // NULL is not an error, and yields 0. extern int gasneti_parse_dbl(const char *str, double *result_p) { double result = 0.; if (str != NULL) { char *endptr; result = strtod(str, &endptr); if (endptr != str) { while (*endptr && isspace(*endptr)) endptr++; /* Skip whitespace */ if (*endptr == '/') { char *endptr2; double denom = strtod(1+endptr, &endptr2); if ((denom != 0) && (endptr2 != (1+endptr))) { for (endptr = endptr2; *endptr && isspace(*endptr); endptr++) {/* Skip whitespace */} result /= denom; } else { /* endptr is left pointing at '/', triggering rejection below */ } } } if ((endptr == str) || (*endptr != '\0')) { /* match was empty or has trailing non-whitespace */ return 1; } } *result_p = result; return 0; } // Parses a string indicating a boolean yes/no value. // Returns 1 for a valid YES, 0 for a valid NO and -1 for no conforming value extern int gasneti_parse_yesno(const char *str) { if (!str) return -1; char s[10]; strncpy(s, str, sizeof(s)-1); s[sizeof(s)-1] = '\0'; for (int i = 0; i < sizeof(s); i++) s[i] = toupper(s[i]); if (!strcmp(s, "N") || !strcmp(s, "NO") || !strcmp(s, "0")) return 0; else if (!strcmp(s, "Y") || !strcmp(s, "YES") || !strcmp(s, "1")) return 1; else return -1; } /* ------------------------------------------------------------------------------------ */ /* environment support */ #if HAVE_SETENV && !HAVE_SETENV_DECL extern int setenv(const char *, const char *, int); #endif #if HAVE_UNSETENV && !HAVE_UNSETENV_DECL extern int unsetenv(const char *); #endif /* set an environment variable, for the local process ONLY */ extern void gasneti_setenv(const char *key, const char *value) { /* both are POSIX - prefer setenv because it manages memory for us */ #if HAVE_SETENV int retval = setenv((char *)key, (char *)value, 1); if (retval) gasneti_fatalerror("Failed to setenv(\"%s\",\"%s\",1) in gasneti_setenv => %s(%i)", key, value, strerror(errno), errno); #elif HAVE_PUTENV char *tmp = malloc(strlen(key) + strlen(value) + 2); int retval; strcpy(tmp, key); strcat(tmp, "="); strcat(tmp, value); retval = putenv(tmp); if (retval) gasneti_fatalerror("Failed to putenv(\"%s\") in gasneti_setenv => %s(%i)", tmp, strerror(errno), errno); #else gasneti_fatalerror("Got a call to gasneti_setenv, but don't know how to do that on your system"); #endif } /* unset an environment variable, for the local process ONLY */ extern void gasneti_unsetenv(const char *key) { /* prefer unsetenv because it's documented to remove env vars */ #if HAVE_UNSETENV #if 0 /* bug 1135: POSIX requires unsetenv to return int, but several OS's (at least Linux and BSD) are non-compliant and return void. It's not worth our trouble to detect this (since the possible errors are few) so ignore the return value */ int retval = unsetenv(key); if (!retval) gasneti_fatalerror("Failed to unsetenv(\"%s\") in gasneti_unsetenv => %s(%i)", key, strerror(errno), errno); #else /* check for a few error cases ourselves */ if (!key || strlen(key)==0 || strchr(key,'=')) gasneti_fatalerror("Bad key (\"%s\") passed to gasneti_unsetenv",key); unsetenv((char *)key); #endif #elif HAVE_PUTENV /* this relies on undocumented putenv behavior, and may or may not work */ char *tmp = malloc(strlen(key) + 2); int retval; strcpy(tmp, key); strcat(tmp, "="); retval = putenv(tmp); if (retval) gasneti_fatalerror("Failed to putenv(\"%s\") in gasneti_unsetenv => %s(%i)", key, strerror(errno), errno); #else gasneti_fatalerror("Got a call to gasneti_unsetenv, but don't know how to do that on your system"); #endif } /* ------------------------------------------------------------------------------------ */ #if GASNETI_BUILDING_CONDUIT extern const char * gasneti_decode_envval(const char *); extern int (*gasneti_verboseenv_fn)(void); #endif gasneti_getenv_fn_t *gasneti_getenv_hook = NULL; char *gasneti_globalEnv = NULL; // Internal function which will not trace or call envdecode hook (if any) static char *gasneti_getenv_early(const char *keyname) { char *retval = NULL; if (keyname && gasneti_getenv_hook) { /* highest priority given to spawner- or conduit-specific getenv */ retval = (*gasneti_getenv_hook)(keyname); } if (keyname && !retval && gasneti_globalEnv) { /* global environment takes precedence * (callers who want the local environment can call getenv directly) */ char *p = gasneti_globalEnv; int keylen = strlen(keyname); while (*p) { if (!strncmp(keyname, p, keylen) && p[keylen] == '=') { retval = p + keylen + 1; break; } p += strlen(p) + 1; } } if (keyname && !retval) /* try local environment */ retval = getenv(keyname); return retval; } extern char *gasneti_getenv(const char *keyname) { char *retval = gasneti_getenv_early(keyname); #if GASNETI_BUILDING_CONDUIT if (retval && /* check if environment value needs decoding */ strcmp(keyname, "GASNET_DISABLE_ENVDECODE") && strcmp(keyname, "GASNET_VERBOSEENV")) { /* prevent inf recursion */ retval = (char *)gasneti_decode_envval(retval); } #endif GASNETT_TRACE_PRINTF("gasnet_getenv(%s) => '%s'", (keyname?keyname:"NULL"),(retval?retval:"NULL")); return retval; } // parse a GASNET_VERBOSEENV value into boolean enable/disable extern int gasneti_verboseenv_parse(const char *v) { if (!v) return 0; // default is off else { if (gasneti_parse_yesno(v) == 0) return 0; else return 1; // for legacy reasons accept anything else including empty as yes } } /* indicate whether GASNET_VERBOSEENV reporting is enabled on this node 1 = yes, 0 = no, -1 = not yet / don't know */ extern int gasneti_verboseenv(void) { #if GASNETI_BUILDING_CONDUIT if (gasneti_verboseenv_fn) return (*gasneti_verboseenv_fn)(); else #endif return gasneti_verboseenv_parse(gasneti_getenv("GASNET_VERBOSEENV")); } typedef struct gasneti_verboseenv_S { struct gasneti_verboseenv_S *next; const char *key; const char *displaystr; } gasneti_verboseenv_t; /* display an integral/string/double environment setting iff gasneti_verboseenv() */ extern void gasneti_envstr_display(const char *key, const char *val, int is_dflt) { const char *dflt = (is_dflt?" (default)":""); const char *displayval = val; int verbose = gasneti_verboseenv(); if (!val) displayval = "*not set*"; else if (strlen(val) == 0) displayval = "*empty*"; GASNETT_TRACE_PRINTF("ENV parameter: %s = %s%s", key, displayval, dflt); if (verbose) { static gasneti_mutex_t envmutex = GASNETI_MUTEX_INITIALIZER; static gasneti_verboseenv_t *displaylist = NULL; static gasneti_verboseenv_t *displaylist_tail = NULL; static int notyet = 1; gasneti_verboseenv_t *p; char tmpstr[255]; char *displaystr = tmpstr; int width = 55 - strlen(key) - strlen(displayval); width = MAX(10, width); int len = snprintf(tmpstr, sizeof(tmpstr), "ENV parameter: %s = %s%*s\n", key, displayval, width, dflt); if (len >= sizeof(tmpstr)) { /* Too long for the static buffer */ displaystr = malloc(len + 1); snprintf(displaystr, len+1, "ENV parameter: %s = %s%*s\n", key, displayval, width, dflt); } gasneti_mutex_lock(&envmutex); for (p = displaylist; p; p = p->next) { /* check for previous report */ if (!strcmp(key,p->key)) break; } if (!p) { /* new entry */ p = malloc(sizeof(gasneti_verboseenv_t)); p->key = strdup(key); if (verbose > 0 && !notyet) { /* display now */ p->displaystr = NULL; fputs(displaystr, stderr); fflush(stderr); } else { /* cache for later */ p->displaystr = strdup(displaystr); } if (!displaylist) displaylist = p; if (displaylist_tail) displaylist_tail->next = p; displaylist_tail = p; p->next = NULL; } if (notyet && verbose > 0) { /* dump cached values */ for (p = displaylist; p; p = p->next) { fputs(p->displaystr, stderr); fflush(stderr); free((void *)p->displaystr); p->displaystr = NULL; } notyet = 0; } gasneti_mutex_unlock(&envmutex); if (displaystr != tmpstr) free(displaystr); } } extern void gasneti_envdbl_display(const char *key, double val, int is_dflt) { char valstr[80]; char displayval[80]; if (!gasneti_verboseenv() && !GASNETT_TRACE_ENABLED) return; snprintf(valstr, sizeof(valstr), "%g", val); const char * const rawval = gasneti_getenv(key); gasneti_assert(is_dflt || rawval); if (is_dflt || !strcmp(rawval,valstr)) { /* Use the numerical value */ strcpy(displayval, valstr); } else { /* Use both the environment string and numerical value when they differ textually */ snprintf(displayval, sizeof(displayval), "%s (%s)", rawval, valstr); } gasneti_envstr_display(key, displayval, is_dflt); } extern void gasneti_envint_display(const char *key, int64_t val, int is_dflt, int is_mem_size) { char valstr[80]; char displayval[80]; if (!gasneti_verboseenv() && !GASNETT_TRACE_ENABLED) return; gasneti_format_number(val, valstr, 80, is_mem_size); const char * const rawval = gasneti_getenv(key); gasneti_assert(is_dflt || rawval); if (is_dflt) { /* Use the numerical value */ strcpy(displayval, valstr); } else if (!strcmp(rawval,valstr)) { strcpy(displayval, valstr); } else { /* Use the environment string and numerical value */ snprintf(displayval, sizeof(displayval), "%s (%s)", rawval, valstr); } gasneti_envstr_display(key, displayval, is_dflt); } static char *_gasneti_getenv_withdefault(const char *keyname, const char *defaultval, int valmode, int64_t *val) { const char * retval = NULL; int is_dflt = 0; retval = gasneti_getenv(keyname); if (retval == NULL) { retval = defaultval; is_dflt = 1; } if (valmode == 0) { /* just a string value */ gasneti_envstr_display(keyname, retval, is_dflt); } else if (valmode == 1) { /* yes/no value */ int r = gasneti_parse_yesno(retval); if (r == 1) retval = "YES"; else if (r == 0) retval = "NO"; else gasneti_fatalerror("If used, environment variable '%s' must be set to 'Y|YES|y|yes|1' or 'N|n|NO|no|0'", keyname); gasneti_envstr_display(keyname, retval, is_dflt); } else if (valmode == 2 || valmode == 3) { /* int value, regular or memsize */ int is_mem_size = (valmode == 3); gasneti_assert(val); *val = gasneti_parse_int(retval, *val); gasneti_envint_display(keyname, *val, is_dflt, is_mem_size); } else gasneti_fatalerror("internal error in _gasneti_getenv_withdefault"); return (char *)retval; } extern char *gasneti_getenv_withdefault(const char *keyname, const char *defaultval) { return _gasneti_getenv_withdefault(keyname, defaultval, 0, NULL); } extern int gasneti_getenv_yesno_withdefault(const char *keyname, int defaultval) { return !strcmp(_gasneti_getenv_withdefault(keyname, (defaultval?"YES":"NO"), 1, NULL), "YES"); } extern int64_t gasneti_getenv_int_withdefault(const char *keyname, int64_t defaultval, uint64_t mem_size_multiplier) { int64_t val = mem_size_multiplier; char defstr[80]; gasneti_format_number(defaultval, defstr, 80, mem_size_multiplier); if (gasneti_parse_int(defstr, mem_size_multiplier) != defaultval) { // Discard result from gasneti_format_number() if it is rounded/truncated gasneti_assert(mem_size_multiplier); // should not happen otherwise snprintf(defstr, sizeof(defstr), "%"PRId64" B", defaultval); } _gasneti_getenv_withdefault(keyname, defstr, (mem_size_multiplier?3:2), &val); return val; } extern double gasneti_getenv_dbl_withdefault(const char *keyname, double defaultval) { double retval = defaultval; int is_dflt = 1; const char * envval = gasneti_getenv(keyname); if (envval != NULL) { is_dflt = 0; if (gasneti_parse_dbl(envval, &retval)) { gasneti_fatalerror("If used, environment variable '%s' must be a valid floating point value or fraction", keyname); } } gasneti_envdbl_display(keyname, retval, is_dflt); return retval; } // Parse an environment variable as a memory size as follows: // + If parses as double between 0. and 1., multiply by "fraction_of". // + If parses as integer (w/ optional suffix) take as an absolute size. // if pph is non-zero, accept [pPhH] suffixes and for [hH] divide by this value. // The value is then aligned up to PAGESIZE. // overhead_per_p is added to the resulting value, unless there was an [hH] suffix. // Final value is silently rounded down to maximum (if it's nonzero) // and dies if the final result is below "minimum" (which should include overhead, if any). // The result is always page aligned. // 32-BIT: The return value is always less than 4GB extern uint64_t gasneti_getenv_memsize_withdefault(const char *key, const char *dflt, uint64_t minimum, uint64_t maximum, uint64_t fraction_of, uint64_t pph, uint64_t overhead_per_p) { const char *input = gasneti_getenv(key); int using_default = (NULL == input); if (using_default) input = dflt; const char *str = input; // Parse and remove (/?[phPH]) suffix char tmp[255]; int got_h = 0; if (pph) { size_t len = strlen(str); gasneti_assert_uint(sizeof(tmp) ,>, len); strncpy(tmp,str,sizeof(tmp)); char *p = &tmp[len-1]; while (p >= tmp && isspace(*p)) *(p--) = 0; // strip end whitespace switch (*p) { case 'h': case 'H': got_h = 1; GASNETI_FALLTHROUGH case 'p': case 'P': *(p--) = 0; // strip while (p >= tmp && isspace(*p)) *(p--) = 0; // strip end whitespace if (p >= tmp && *p == '/') *(p--) = 0; // strip } str = tmp; } double dbl; int64_t val; int is_fraction = 0; if (0 == gasneti_parse_dbl(str, &dbl)) { if ((dbl > 0.) && (dbl < 1.)) { is_fraction = 1; val = dbl * fraction_of; } else { val = dbl; } } else { // Note: default suffix is irrelevant since un-suffixed case was parsed as a double val = gasneti_parse_int(str, 1); } // check sign before ALIGNDOWN if (val < 0) { gasneti_fatalerror("%s='%s' is negative.", key, input); } if (got_h) { gasneti_assert(pph > 0); val = val / pph; } if (val == 0 && minimum > 0 && (got_h || minimum > GASNETI_PAGE_ALIGNUP(overhead_per_p))) { gasneti_fatalerror("%s='%s' is zero or unrecognized.", key, input); } // from here on we operate on page granularity // max is enforced throughout because the GASNETI_PAGE_ALIGN* macros operate on pointer-width // 32-bit builds currently limit value to 4GB - PAGESIZE uint64_t maxrep = GASNETI_PAGE_ALIGNDOWN((uintptr_t)-1); if (!maximum) maximum = maxrep; else { maximum = MIN(maximum,maxrep); maximum = GASNETI_PAGE_ALIGNDOWN(maximum); } val = MIN(val, maximum); val = GASNETI_PAGE_ALIGNUP(val); // display parsed/aligned input value GASNETT_TRACE_PRINTF("%s='%s' yields %"PRId64, key, input, val); gasneti_envint_display(key, val, using_default, 1); // add overhead if (overhead_per_p && !got_h) { overhead_per_p = GASNETI_PAGE_ALIGNUP(overhead_per_p); val += overhead_per_p; val = MIN(val, maximum); } gasneti_assert_uint(val ,==, GASNETI_PAGE_ALIGNDOWN(val)); gasneti_assert_uint(val ,<=, maxrep); gasneti_assert_uint(val ,<=, maximum); GASNETT_TRACE_PRINTF("%s='%s' final value: %"PRId64, key, input, val); if (val < minimum) { const char *parsed_as = is_fraction ? "a fraction" : "an amount"; char min_display[16]; char val_display[16]; gasneti_format_number(minimum, min_display, sizeof(min_display), 1); gasneti_format_number(val, val_display, sizeof(val_display), 1); char pph_display[255] = {0}; if (got_h && pph > 1) { snprintf(pph_display, sizeof(pph_display), " (split across %d processes on host %s)", (int)pph, gasneti_gethostname()); } char overhead_display[80] = {0}; if (overhead_per_p) { strncpy(overhead_display, ", including overhead of ", sizeof(overhead_display)); size_t len = strlen(overhead_display); gasneti_format_number(overhead_per_p, overhead_display+len, sizeof(overhead_display)-len, 1); } gasneti_fatalerror( "Parsing '%s' as %s of memory%s yields %s of %"PRId64" (%s)%s, " "which is less than the minimum supported value of %s%s.", input, parsed_as, pph_display, key, val, val_display, (got_h?"":overhead_display), min_display, (got_h?overhead_display:"") ); } return (uint64_t) val; } // Check for presence of any env vars in local or GASNet global env with a given prefix. // Returns an arbitrary "VAR=VAL" match if any, or NULL otherwise. // spawner- or conduit-specific hook: gasneti_check_env_prefix_fn_t *gasneti_check_env_prefix_hook = NULL; // helper for scanning a serialized envrironment: extern const char* gasneti_check_env_prefix_helper(const char *environ, const char *prefix) { const char *p = environ; gasneti_assert(environ); gasneti_assert(prefix && !strchr(prefix,'=')); const size_t len = strlen(prefix); while (*p) { if (!strncmp(prefix, p, len)) return p; p += strlen(p) + 1; } return NULL; } extern char** environ; extern const char* gasneti_check_env_prefix(const char *prefix) { gasneti_assert(prefix); gasneti_assert(NULL == strchr(prefix, '=')); const char *result = NULL; // First, look for matches via conduit-specific getenv (if any) if (gasneti_check_env_prefix_hook) { result = gasneti_check_env_prefix_hook(prefix); } // Next, look for matches in gasneti_globalEnv (if any) if (!result && gasneti_globalEnv) { result = gasneti_check_env_prefix_helper(gasneti_globalEnv, prefix); } // Finally, look for matches in the local environment (if any) if (!result && environ) { size_t len = strlen(prefix); for (char **p = environ; *p; ++p) { if (!strncmp(prefix, *p, len)) { result = *p; break; } } } if (result) { GASNETT_TRACE_PRINTF("gasnett_check_env_prefix(%s) found '%s'", prefix, result); } else { GASNETT_TRACE_PRINTF("gasnett_check_env_prefix(%s) found no matches", prefix); } return result; } static int _gasneti_tmpdir_valid(const char *dir) { struct stat s; /* non-empty */ if (!dir || !strlen(dir)) return 0; /* an absolute path */ if (dir[0] != '/') return 0; /* an existing directory (stat follows symlinks) */ if (stat(dir, &s) || !S_ISDIR(s.st_mode)) return 0; /* allow us to search and write */ if (access(dir, (X_OK | W_OK))) return 0; return 1; } extern const char *gasneti_tmpdir(void) { static const char slash_tmp[] = "/tmp"; static const char *result = NULL; const char *tmpdir; if_pt (result) return result; if (_gasneti_tmpdir_valid(tmpdir = gasneti_getenv_withdefault("GASNET_TMPDIR", NULL))) { result = tmpdir; } else if (_gasneti_tmpdir_valid(tmpdir = gasneti_getenv_withdefault("TMPDIR", NULL))) { result = tmpdir; } else if (_gasneti_tmpdir_valid(slash_tmp)) { result = slash_tmp; } return result; } /* ------------------------------------------------------------------------------------ */ /* Resource limit control */ int gasnett_maximize_rlimits(void) { int success = 1; struct res_s { int res; const char *desc; } res[] = { #ifdef RLIMIT_CPU { RLIMIT_CPU, "RLIMIT_CPU" }, #endif #ifdef RLIMIT_DATA { RLIMIT_DATA, "RLIMIT_DATA" }, #endif #ifdef RLIMIT_RSS { RLIMIT_RSS, "RLIMIT_RSS" }, #endif #ifdef RLIMIT_STACK { RLIMIT_STACK, "RLIMIT_STACK" }, #endif #ifdef RLIMIT_AS { RLIMIT_AS, "RLIMIT_AS" }, #endif }; size_t idx; for (idx = 0; idx < sizeof(res)/sizeof(struct res_s); idx++) { success &= gasnett_maximize_rlimit(res[idx].res, res[idx].desc); } return success; } int gasnett_maximize_rlimit(int res, const char *lim_desc) { int success = 0; char ctrl_var[32] = "GASNET_MAXIMIZE_"; gasneti_assert_uint(strlen(ctrl_var) + strlen(lim_desc) ,<, sizeof(ctrl_var)); if (!gasneti_getenv_yesno_withdefault(strncat(ctrl_var, lim_desc, sizeof(ctrl_var)-1), 1)) return 1; /* function pointers used in this macro are a workaround an annoying glibc header bug, * which erroneously declares get/setrlimit to take * the enum type __rlimit_resource_t, instead of int as required by POSIX */ #define SET_RLIMITS(structname, getrlimit, setrlimit) do { \ static int (*get_fp)(int,structname *) = (int (*)(int,structname *))&getrlimit; \ static int (*set_fp)(int,const structname *) = (int (*)(int,const structname *))&setrlimit; \ structname oldval,newval; \ if (get_fp(res, &oldval)) { \ GASNETT_TRACE_PRINTF("gasnett_maximize_rlimit: "#getrlimit"(%s) failed: %s", \ lim_desc, strerror(errno)); \ } else { \ char newvalstr[128]; \ newval = oldval; \ if (newval.rlim_cur == RLIM_INFINITY || \ newval.rlim_max == RLIM_INFINITY) { \ newval.rlim_cur = RLIM_INFINITY; \ strncpy(newvalstr, "RLIM_INFINITY", sizeof(newvalstr)); \ } else { \ gasneti_assert_uint(newval.rlim_cur ,<=, newval.rlim_max); \ newval.rlim_cur = newval.rlim_max; \ snprintf(newvalstr, sizeof(newvalstr), "%"PRIu64, (uint64_t)newval.rlim_cur); \ } \ if (newval.rlim_cur != oldval.rlim_cur) { \ if (set_fp(res, &newval)) { \ GASNETT_TRACE_PRINTF("gasnett_maximize_rlimit: "#setrlimit"(%s, %s) failed: %s", \ lim_desc, newvalstr, strerror(errno)); \ } else { \ GASNETT_TRACE_PRINTF("gasnett_maximize_rlimit: "#setrlimit"(%s, %s)" \ " raised limit from %"PRIu64, \ lim_desc, newvalstr, (uint64_t)oldval.rlim_cur); \ success = 1; \ } \ } \ } \ } while (0) #if defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) SET_RLIMITS(struct rlimit, getrlimit, setrlimit); #endif /* do 64-bit second, to favor the potentially higher limits */ #if defined(HAVE_GETRLIMIT64) && defined(HAVE_SETRLIMIT64) SET_RLIMITS(struct rlimit64, getrlimit64, setrlimit64); #endif return success; } /* ------------------------------------------------------------------------------------ */ /* Physical CPU query */ #if PLATFORM_OS_DARWIN || PLATFORM_OS_FREEBSD || PLATFORM_OS_NETBSD || PLATFORM_OS_OPENBSD #include #include #endif /* return the physical count of CPU's on this node, or zero if that cannot be determined */ extern int gasneti_cpu_count(void) { static int hwprocs = -1; if (hwprocs >= 0) return hwprocs; #if PLATFORM_OS_DARWIN || PLATFORM_OS_FREEBSD || PLATFORM_OS_NETBSD || PLATFORM_OS_OPENBSD { int mib[2]; size_t len; mib[0] = CTL_HW; mib[1] = HW_NCPU; len = sizeof(hwprocs); gasneti_assert_zeroret(sysctl(mib, 2, &hwprocs, &len, NULL, 0)); if (hwprocs < 1) hwprocs = 0; } #else hwprocs = sysconf(_SC_NPROCESSORS_ONLN); if (hwprocs < 1) hwprocs = 0; /* catch failures on Solaris/Cygwin */ #endif gasneti_assert_always(hwprocs >= 0); return hwprocs; } /* ------------------------------------------------------------------------------------ */ /* Physical memory query */ #ifdef _SC_PHYS_PAGES /* if the sysconf exists, try to use it */ static uint64_t _gasneti_getPhysMemSysconf(void) { long pages = sysconf(_SC_PHYS_PAGES); if (pages < 0) pages = 0; return (((uint64_t)pages)*GASNET_PAGESIZE); } #else #define _gasneti_getPhysMemSysconf() 0 #endif #if PLATFORM_OS_DARWIN || PLATFORM_OS_FREEBSD || PLATFORM_OS_NETBSD || PLATFORM_OS_OPENBSD #include #include #endif extern uint64_t gasneti_getPhysMemSz(int failureIsFatal) { uint64_t retval = _gasneti_getPhysMemSysconf(); if (retval) return retval; #if PLATFORM_OS_LINUX || PLATFORM_OS_UCLINUX #define _BUFSZ 120 { FILE *fp; char line[_BUFSZ+1]; if ((fp = fopen("/proc/meminfo", "r")) == NULL) gasneti_fatalerror("Failed to open /proc/meminfo in gasneti_getPhysMemSz()"); while (fgets(line, _BUFSZ, fp)) { uint64_t memval = 0; /* MemTotal: on 2.4 and 2.6 kernels - preferred because less chance of scanf overflow */ if (sscanf(line, "MemTotal: %"SCNu64" kB", &memval) > 0 && memval > 0) { retval = memval * 1024; } /* Mem: only on 2.4 kernels */ else if (sscanf(line, "Mem: %"SCNu64, &memval) > 0 && memval > 0 && !retval) { retval = memval; } } fclose(fp); } #undef _BUFSZ #elif PLATFORM_OS_DARWIN || PLATFORM_OS_FREEBSD || PLATFORM_OS_NETBSD || PLATFORM_OS_OPENBSD { /* see "man 3 sysctl" */ int mib[2]; size_t len = 0; mib[0] = CTL_HW; mib[1] = HW_PHYSMEM; sysctl(mib, 2, NULL, &len, NULL, 0); switch (len) { /* accomodate both 32 and 64-bit systems */ case 4: { uint32_t retval32 = 0; if (sysctl(mib, 2, &retval32, &len, NULL, 0)) gasneti_fatalerror("sysctl(CTL_HW.HW_PHYSMEM) failed: %s(%i)",strerror(errno),errno); if (retval32) retval = (uint64_t)retval32; break; } case 8: if (sysctl(mib, 2, &retval, &len, NULL, 0)) gasneti_fatalerror("sysctl(CTL_HW.HW_PHYSMEM) failed: %s(%i)",strerror(errno),errno); break; default: gasneti_fatalerror("sysctl(CTL_HW.HW_PHYSMEM) failed to get required size, got len=%i: %s(%i)", (int)len, strerror(errno), errno); } } #else /* unknown OS */ { } #endif if (!retval && failureIsFatal) gasneti_fatalerror("Failed to determine physical memory size in gasneti_getPhysMemSz()"); return retval; } /* ------------------------------------------------------------------------------------ */ /* CPU affinity control */ #if HAVE_PLPA #include "plpa.h" #elif PLATFORM_OS_SOLARIS #include #include #include #endif static int gasneti_set_affinity_cpus(void) { int cpus = gasneti_cpu_count(); if_pf (cpus == 0) { static int once = 1; if (once) { once = 0; gasneti_console_message("WARNING","gasnett_set_affinity called, but cannot determine cpu count."); } } return cpus; } #if PLATFORM_OS_LINUX // return non-zero iff this Linux system is actually Microsoft Windows Subsystem for Linux extern int gasneti_platform_isWSL(void) { // Ideally we would use uname(2) here, but direct experimentation on the 4/16/17 version // of WSL reveals that uname does not return any identifying marks to distinguish Microsoft's // emulated Ubuntu kernel. // Microsoft devs suggest grepping /proc/version or /proc/sys/kernel/osrelease for "Microsoft" int fd = open("/proc/sys/kernel/osrelease", O_RDONLY); if (fd < 0) return 0; static char line[255]; line[0] = 0; ssize_t rc = read(fd, line, sizeof(line)); close(fd); if (rc > 0 && strstr(line, "Microsoft")) return 1; else return 0; } #endif // // NOTE: when adding implementations here, update the #define of // GASNETT_SET_AFFINITY_SUPPORT in gasnet_toolhelp.h to match. // int gasneti_set_affinity_default(int rank) { #if HAVE_PLPA { static int fails = 0; gasneti_plpa_cpu_set_t mask; int cpus = gasneti_set_affinity_cpus(); if (cpus == 1) { /* NO-OP (success) on single-processor platform */ return 0; } if (fails == 1) { /* NO-OP (failure) as determined by an earlier call */ return 1; } // Dynamically handle binaries built on native Ubuntu and ported to Microsoft's WSL kernel // emulator, which currently fail inside plpa_sched_setaffinity with EINVAL. #if PLATFORM_OS_LINUX if (gasneti_platform_isWSL()) { /* NO-OP on WSL */ fails = 1; return 1; } #endif /* Try a GET first to check for support */ if_pf (ENOSYS == gasneti_plpa_sched_getaffinity(0, sizeof(mask), &mask)) { /* becomes a NO-OP on next call*/ fails = 1; return 1; } { int local_rank = rank % cpus; PLPA_CPU_ZERO(&mask); PLPA_CPU_SET(local_rank, &mask); return gasneti_plpa_sched_setaffinity(0, sizeof(mask), &mask); } } #elif PLATFORM_OS_SOLARIS { static processorid_t *avail_cpus = NULL; static int num_cpus = 0; if_pf (!num_cpus) { static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); if (!num_cpus) { processorid_t i; int tmp_cpus; int j; /* Find max possible CPU ID */ processorid_t cpuid_max = sysconf(_SC_CPUID_MAX); /* Find the number of online CPUS. */ tmp_cpus = gasneti_set_affinity_cpus(); /* Allocate avail. CPU table. */ avail_cpus = (processorid_t *) malloc(tmp_cpus * sizeof(processorid_t)); /* Init avail. CPU table */ for (i = j = 0; i <= cpuid_max; i++) { if (p_online(i, P_STATUS) != -1) avail_cpus[j++] = i; } /* Ensure avail_cpus written/populated before num_cpus is written */ gasneti_sync_writes(); num_cpus = tmp_cpus; } gasneti_mutex_unlock(&lock); } else { gasneti_sync_reads(); } /* From the processor_bind man page: * P_LWPID: the binding affects the LWP of the * current process with LWP ID id. * P_MYID: the specified LWP, process, task, or * process is the current one. */ { int local_rank = rank % num_cpus; return processor_bind(P_LWPID, P_MYID, avail_cpus[local_rank], NULL); } } #elif defined(GASNETT_SET_AFFINITY_SUPPORT) #error "GASNETT_SET_AFFINITY_SUPPORT defined, but no implementation is reachable." #else /* No implementation -> NO-OP */ return 1; #endif } int gasneti_set_affinity(int rank) { GASNETT_TRACE_PRINTF("gasnett_set_affinity(%d)", rank); return gasneti_set_affinity_default(rank); } /* ------------------------------------------------------------------------------------ */ /* Count zero bytes in a region w/ or w/o a memcpy() */ /* These implementations use full-word reads and writes where possible */ #if PLATFORM_ARCH_64 #define gasneti_count0s_word_shift 3 /* multiply or divide by 8 */ #else #define gasneti_count0s_word_shift 2 /* multiply or divide by 4 */ #endif /* gasneti_count0s_xform_limit determines how many iterations of xform1 may * be performed before applying xform2 to reduce the partial results. For * "Algorithm D" in xform2, the limit is the potential overflow of the 8-bit * fields after 255 iterations. * If one were to switch to Algorithm B or C, then the limit is the possible * overflow in the summation of xform2, and one should use the word_shift * dependent limit value. */ #if 1 #define gasneti_count0s_xform_limit 255 #else #define gasneti_count0s_xform_limit ((256 >> gasneti_count0s_word_shift) - 1) #endif /* Given a word, set the least-significant bit of each non-zero byte, zeroing all other bits */ GASNETI_INLINE(gasneti_count0s_xform1) GASNETI_CONST uintptr_t gasneti_count0s_xform1(uintptr_t x) { #if 0 /* Original shift-based method */ x |= (x >> 4); x |= (x >> 2); x |= (x >> 1); #if PLATFORM_ARCH_64 return (x & 0x0101010101010101UL); #else return (x & 0x01010101UL); #endif #else /* Variants of the following algorithm can be found many places on the internet. * One such is http://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord */ #if PLATFORM_ARCH_64 const uint64_t mask = 0x7f7f7f7f7f7f7f7fUL; uint64_t tmp; #else const uint32_t mask = 0x7f7f7f7fUL; uint32_t tmp; #endif tmp = x & mask; tmp += mask; tmp |= x; tmp &= ~mask; return tmp >> 7; #endif } /* Given a sum of words generated by no more than gasneti_count0s_xform_limit iterations * of xform1, sum the least-significant bits of the bytes into a single value. */ GASNETI_INLINE(gasneti_count0s_xform2) GASNETI_CONST size_t gasneti_count0s_xform2(uintptr_t x) { #if 0 /* Algorithm A: * simplest expression, but usually a poor performer */ return x % 255; #elif 0 /* Algorithm B: * Form that is equvalent to Algorithm C, and is said to be faster * IFF one has a fast integer multiply instruction. * Works because the product is x + (x<<8) + (x<<16) + (x<<24) + ... * and thus our sum is in the UPPER 8 bits. * See, for instance, http://en.wikipedia.org/wiki/Hamming_weight * This form will overflow if the sum of xform1-results * includes more than 255 counts. */ #if PLATFORM_ARCH_64 return (x * 0x0101010101010101UL) >> 56; #else return (x * 0x01010101UL) >> 24; #endif #elif 0 /* Algorithm C: * A "tree" reduction of 4 or 8 "fields" of 8-bits each. * This form will overflow if the sum of xform1-results * includes more than 255 counts. */ #if PLATFORM_ARCH_64 x += (x >> 32); #endif x += (x >> 16); x += (x >> 8); return (x & 0xff); #else /* Algorithm D: * A "tree" reduction of 4 or 8 "fields" of 8-bits each. * This form won't overflow regardless of final sum and requires * only 2 more operations (both ANDs) than Algorithm C while * raising gasneti_count0s_xform_limit (almost) by a factor * of either 4 or 8. */ #if PLATFORM_ARCH_64 const uintptr_t mask = 0x00ff00ff00ff00ffUL; #else const uintptr_t mask = 0x00ff00ffUL; #endif x = (x & mask) + ((x >> 8) & mask); x += (x >> 16); #if PLATFORM_ARCH_64 x += (x >> 32); #endif return (x & 0x7ff); #endif } /* Count non-zero bytes in a word-aligned region */ GASNETI_INLINE(gasneti_count0s_nzs_aligned_region) GASNETI_PURE size_t gasneti_count0s_nzs_aligned_region(const uintptr_t *p, size_t words) { size_t non_zeros = 0; int i; while (words > gasneti_count0s_xform_limit) { uintptr_t partial = 0; for (i = 0; i < gasneti_count0s_xform_limit; ++i) { partial += gasneti_count0s_xform1(*(p++)); } non_zeros += gasneti_count0s_xform2(partial); words -= gasneti_count0s_xform_limit; } { uintptr_t partial = 0; for (i = 0; i < words; ++i) { partial += gasneti_count0s_xform1(*(p++)); } non_zeros += gasneti_count0s_xform2(partial); } return non_zeros; } /* Copy and count non-zero bytes w/o any alignment requirement */ GASNETI_INLINE(gasneti_count0s_copy_bytes) int gasneti_count0s_copy_bytes(void * GASNETI_RESTRICT dst, const void * GASNETI_RESTRICT src, size_t bytes) { int non_zeros = 0; uint8_t *d = dst; const uint8_t *s = src; gasneti_assert_uint(bytes ,<, SIZEOF_VOID_P); switch (bytes) { #if PLATFORM_ARCH_64 case 7: non_zeros = !!(*(d++) = *(s++)); GASNETI_FALLTHROUGH case 6: non_zeros += !!(*(d++) = *(s++)); GASNETI_FALLTHROUGH case 5: non_zeros += !!(*(d++) = *(s++)); GASNETI_FALLTHROUGH case 4: non_zeros += !!(*(d++) = *(s++)); GASNETI_FALLTHROUGH case 3: non_zeros += !!(*(d++) = *(s++)); GASNETI_FALLTHROUGH #else case 3: non_zeros = !!(*(d++) = *(s++)); GASNETI_FALLTHROUGH #endif case 2: non_zeros += !!(*(d++) = *(s++)); GASNETI_FALLTHROUGH case 1: non_zeros += !!(*(d++) = *(s++)); } return non_zeros; } /* Copy and count non-zero bytes w/ both dst and src word-aligned */ GASNETI_INLINE(gasneti_count0s_copy_dstsrc_aligned) size_t gasneti_count0s_copy_dstsrc_aligned(void * GASNETI_RESTRICT dst, const void * GASNETI_RESTRICT src, size_t words) { size_t non_zeros = 0; uintptr_t *d = dst; const uintptr_t *s = src; int i; gasneti_assert(!((uintptr_t)dst & (SIZEOF_VOID_P - 1))); gasneti_assert(!((uintptr_t)src & (SIZEOF_VOID_P - 1))); while (words > gasneti_count0s_xform_limit) { uintptr_t partial = 0; for (i = 0; i < gasneti_count0s_xform_limit; ++i) { partial += gasneti_count0s_xform1((*(d++) = *(s++))); } non_zeros += gasneti_count0s_xform2(partial); words -= gasneti_count0s_xform_limit; } { uintptr_t partial = 0; for (i = 0; i < words; ++i) { partial += gasneti_count0s_xform1((*(d++) = *(s++))); } non_zeros += gasneti_count0s_xform2(partial); } return non_zeros; } /* Copy and count non-zero bytes w/ dst word-aligned, but not src */ GASNETI_INLINE(gasneti_count0s_copy_dst_aligned) size_t gasneti_count0s_copy_dst_aligned(void * GASNETI_RESTRICT dst, const void * GASNETI_RESTRICT src, size_t words) { #if !WORDS_BIGENDIAN #define GASNETI_MEMCPY0_MERGE(w0,s0,w1,s1) (((w0)>>(s0)) | ((w1)<<(s1))) #else #define GASNETI_MEMCPY0_MERGE(w0,s0,w1,s1) (((w0)<<(s0)) | ((w1)>>(s1))) #endif const uintptr_t *s = (uintptr_t *)GASNETI_ALIGNDOWN(src, SIZEOF_VOID_P); const size_t s0 = ((uintptr_t)src & (SIZEOF_VOID_P - 1)) << 3; const size_t s1 = (SIZEOF_VOID_P * 8) - s0; uintptr_t *d = dst; uintptr_t w0; size_t non_zeros = 0; int i; gasneti_assert(!((uintptr_t)dst & (SIZEOF_VOID_P - 1))); gasneti_assert(((uintptr_t)src & (SIZEOF_VOID_P - 1))); /* XXX: Options for reducing the bottle neck in GASNETI_MEMCPY0_MERGE() * * 1) Consider an outer 3- or 7-way switch on alignment. Doing so would allow for * fixed-count shifts which might be cheaper than variable count. * * 2) Consider splitting _MERGE(), to perform the shift of w0 as soon as it is available. * Doing so would benefit x86, x86_64 and PA-RISC which must reload a fixed shift-count * register to perform a variable-count shift. However, keeping the form with both of * the shifts and the OR together benefits machines w/ powerful extract/deposit/merge * instructions. Use of macros could hide the differences. * * 3) Consider arch-specific asm(). For x86 and x86_64 the SHLD or SHRD instructions * would be appropriate. Others have similar (or more powerful) merging operations * that have no C equivalents. * 3.5) Search for compiler-specific C constructs that may generate the merge instructions. */ w0 = *(s++); while (words > gasneti_count0s_xform_limit) { uintptr_t partial = 0; for (i = 0; i < gasneti_count0s_xform_limit; ++i) { const uintptr_t w1 = *(s++); partial += gasneti_count0s_xform1((*(d++) = GASNETI_MEMCPY0_MERGE(w0,s0,w1,s1))); w0 = w1; } non_zeros += gasneti_count0s_xform2(partial); words -= gasneti_count0s_xform_limit; } { uintptr_t partial = 0; for (i = 0; i < words; ++i) { const uintptr_t w1 = *(s++); partial += gasneti_count0s_xform1((*(d++) = GASNETI_MEMCPY0_MERGE(w0,s0,w1,s1))); w0 = w1; } non_zeros += gasneti_count0s_xform2(partial); } return non_zeros; } extern size_t gasneti_count0s_copy(void * GASNETI_RESTRICT dst, const void * GASNETI_RESTRICT src, size_t bytes) { #if 0 /* Naive byte-oriented loop */ size_t zeros = 0; uint8_t *d = dst; const uint8_t *s = src; while (bytes--) zeros += !(*(d++) = *(s++)); return zeros; #elif PLATFORM_COMPILER_PATHSCALE /* avoid bug 3428 using pre-memcpy/post-count0s */ size_t zeros = gasneti_count0s(memcpy(dst, src, bytes), bytes); #else /* Carefully optimized (but still portable) word-oriented loop */ size_t tmp, remain, zeros; const uint8_t *s; uint8_t *d; /* Short cut on less than full word, simplifying the logic below */ if (bytes < SIZEOF_VOID_P) { return (bytes - gasneti_count0s_copy_bytes(dst, src, bytes)); } s = (uint8_t *)src; d = (uint8_t *)dst; remain = zeros = bytes; /* Copy by bytes until dst is aligned */ tmp = ((uintptr_t)dst & (SIZEOF_VOID_P - 1)); if (tmp) { tmp = SIZEOF_VOID_P - tmp; zeros -= gasneti_count0s_copy_bytes(d, s, tmp); d += tmp; s += tmp; remain -= tmp; } /* Copy full words of dst */ tmp = remain >> gasneti_count0s_word_shift; if ((uintptr_t)s & (SIZEOF_VOID_P - 1)) { zeros -= gasneti_count0s_copy_dst_aligned(d, s, tmp); } else { zeros -= gasneti_count0s_copy_dstsrc_aligned(d, s, tmp); } d += tmp << gasneti_count0s_word_shift; s += tmp << gasneti_count0s_word_shift; /* Copy any remainder by bytes until done */ tmp = remain & (SIZEOF_VOID_P - 1); zeros -= gasneti_count0s_copy_bytes(d, s, tmp); #endif return zeros; } size_t gasneti_count0s(const void * src, size_t bytes) { #if 0 /* Naive byte-oriented loop */ const uint8_t *s = src; size_t zeros = 0; while (bytes--) { zeros += !*(s++); } #elif (PLATFORM_COMPILER_CLANG && __cray__) && \ PLATFORM_COMPILER_VERSION_GE(13,0,0) && \ __CRAY_MIC_KNL // Version which works-around a CCE-13 ICE (see bug 4417) const uint8_t *s = src; volatile size_t zeros = 0; while (bytes--) { zeros = zeros + !*(s++); } #else /* Carefully optimized (but still portable) word-oriented loop */ const uintptr_t *s; size_t zeros, tmp; /* Short cut on less than full word, simplifying the logic below */ if (bytes < SIZEOF_VOID_P) { const uint8_t *s8 = src; zeros = 0; while (bytes--) { zeros += !*(s8++); } return zeros; } s = (uintptr_t *)GASNETI_ALIGNUP(src, SIZEOF_VOID_P); zeros = bytes; /* Count partial leading word (if any) */ tmp = (uintptr_t)s - (uintptr_t)src; if_pf (tmp) { const uint8_t *s8 = src; bytes -= tmp; do { zeros -= !!*(s8++); } while (--tmp); } /* Count full words of src */ tmp = bytes >> gasneti_count0s_word_shift; zeros -= gasneti_count0s_nzs_aligned_region(s, tmp); s += tmp; /* Count partial trailing word (if any) */ tmp = bytes & (SIZEOF_VOID_P - 1); if_pf (tmp) { const uint8_t *s8 = (const uint8_t *)s; do { zeros -= !!*(s8++); } while (--tmp); } #endif return zeros; } /* ------------------------------------------------------------------------------------ */ /* "out-of-line" helper(s) for calibration of timers */ // gasneti_clock_t: (struct timespec) or (struct timeval) // gasneti_clock_init(x): required initialization (not thread-safe) // gasneti_clock_gettime(&x): record current wallclock as opaque gasneti_clock_t (struct) // gasneti_clock_to_ns(x): convert gasneti_clock_t to nanoseconds since arbitrary base // gasneti_clock_getns(x): return current wallcock as nanoseconds since arbitrary base #if HAVE_CLOCK_GETTIME static clockid_t gasneti_clockid = CLOCK_REALTIME; typedef struct timespec gasneti_clock_t; #define gasneti_clock_to_ns(x) ((x).tv_sec*((uint64_t)1E9)+(x).tv_nsec) #else typedef struct timeval gasneti_clock_t; #define gasneti_clock_to_ns(x) ((x).tv_sec*((uint64_t)1E9)+1000*(x).tv_usec) #endif static int gasneti_clock_is_init = 0; static int gasneti_tsc_verbose = 0; static void gasneti_clock_init(void) { if (gasneti_clock_is_init) return; gasneti_clock_is_init = 1; #if HAVE_CLOCK_GETTIME #ifdef _POSIX_MONOTONIC_CLOCK struct timespec tm; if (!clock_gettime(CLOCK_MONOTONIC, &tm)) { // Monotonic but subject to rate adjustment by NTP gasneti_clockid = CLOCK_MONOTONIC; if (gasneti_tsc_verbose) gasneti_console_message("TICKS","using clock_gettime(CLOCK_MONOTONIC)"); } else #endif { // May be adjusted by both ntp and by clock_settime() gasneti_assert(gasneti_clockid == CLOCK_REALTIME); if (gasneti_tsc_verbose) gasneti_console_message("TICKS","using clock_gettime(CLOCK_REALTIME)"); } #else if (gasneti_tsc_verbose) gasneti_console_message("TICKS","using gettimeofday()"); #endif } GASNETI_INLINE(gasneti_clock_gettime) void gasneti_clock_gettime(gasneti_clock_t *x) { gasneti_assert(gasneti_clock_is_init); #if HAVE_CLOCK_GETTIME gasneti_assert_zeroret(clock_gettime(gasneti_clockid, x)); #else gasneti_assert_zeroret(gettimeofday(x, NULL)); #endif } GASNETI_INLINE(gasneti_clock_getns) uint64_t gasneti_clock_getns(void) { gasneti_clock_t tmp; gasneti_clock_gettime(&tmp); return gasneti_clock_to_ns(tmp); } // Estimate gasneti_ticks_now() rate in GHz by comparision to // the OS-provided wallclock an interval of the specified length. static double gasneti_approx_tick_ghz(uint64_t ns_interval) { gasneti_assert(ns_interval > 0); uint64_t ref, ref_base; uint64_t tsc, tsc_base; uint64_t goal; ref_base = gasneti_clock_getns(); tsc_base = gasneti_ticks_now(); ref = ref_base; goal = ref_base + ns_interval; do { gasneti_nsleep(goal - ref); ref = gasneti_clock_getns(); tsc = gasneti_ticks_now(); } while (ref < goal); return (tsc-tsc_base) / (double)(ref-ref_base); } // Calibrate GHz rate of gasneti_ticks_now() against the OS-provided wallclock. // // This algorithm is based on use of upper- and lower-bounds which are collected // using sampling methodologies with one-sided errors, and combined via MIN() // and MAX() to yield an estimate that is nearly oblivous to noise and outliers. // // Consider the following code // 1. A0 = sample_timer_A(); // 2. B0 = sample_timer_B(); // 3. delay(); // 4. B1 = sample_timer_B(); // 5. A1 = sample_timer_A(); // If one assumes the delay is sufficiently long relative to the resolutions and // overheads of timers A and B, then the ratio (A1-A0)/(B1-B0) will always // over-estimate the true ratio of their rates, since the B samples are taken // closer togther than the A samples. The introduction of delays between lines // 1 and 2, or between lines 4 and 5 can only increase the ratio, since the // diffence in B samples is unchanged. Meanwhile, any delays beween lines 2 and // 4 will increase both the A and B intervals equally (up to their respective // resolutions). A repetition of the AB-BA pattern is the basis for measuring // an upper bound on the true ratio of the rates of timers A and B. By taking // the MIN() over many pairs a fairly tight upper-bound is obtained. The // simultaneous collection of a BA-BA pattern provides a fairly tight // lower-bound without the need for an additional delay, and the mid-point // between the the two bounds is returned as the calibrated rate. // // IN: ref_res should be a estimated resolution in nanoseconds of the // gasneti_clock_getns() timer if available, or 1E9 otherwise. // // OUT: If non-NULL, err_p is a location in which to store the relative // error of the calibration. // // RETURN: the rate gasneti_ticks_now() in units of GHz. static double gasneti_calibrate_tick_ghz(uint64_t ref_res, double *err_p) { #ifndef GASNETI_TICKS_WC_ITERS #define GASNETI_TICKS_WC_ITERS 10 #endif #ifndef GASNETI_TICKS_WC_MIN_INTERVAL #define GASNETI_TICKS_WC_MIN_INTERVAL 100E6 // 100ms #endif #ifndef GASNETI_TICKS_WC_MIN_REF_TICKS #define GASNETI_TICKS_WC_MIN_REF_TICKS 1000 #endif #ifndef GASNETI_TICKS_WC_MAX_RETRY #define GASNETI_TICKS_WC_MAX_RETRY 2 #endif // Collected start and end times: gasneti_clock_t wc0[GASNETI_TICKS_WC_ITERS], wc1[GASNETI_TICKS_WC_ITERS]; // wallclock samples uint64_t lo0[GASNETI_TICKS_WC_ITERS], lo1[GASNETI_TICKS_WC_ITERS]; // "too low" ticks samples uint64_t hi0[GASNETI_TICKS_WC_ITERS], hi1[GASNETI_TICKS_WC_ITERS]; // "too high" ticks samples int trycnt = 0; retry_calibration:; // Collect start-time samples and compute {ticks,ref}_res. uint64_t ticks_res = 1E9; const int count = GASNETI_TICKS_WC_ITERS; for (int i = 0; i < count; ++i) { gasneti_compiler_fence(); hi0[i] = gasneti_ticks_now(); gasneti_compiler_fence(); gasneti_clock_gettime(&wc0[i]); gasneti_compiler_fence(); lo0[i] = gasneti_ticks_now(); gasneti_compiler_fence(); // Ensure next samples will be distinct, and refine *_res estimates. // Use of ">=" is (quite limited) protection against ticks samples going backwards uint64_t tmp1, tmp2; tmp1 = lo0[i]; while (tmp1 >= (tmp2 = gasneti_ticks_now())) { gasneti_compiler_fence(); } tmp2 -= tmp1; ticks_res = MIN(ticks_res, tmp2); tmp1 = gasneti_clock_getns(); while (tmp1 >= (tmp2 = gasneti_clock_getns())) { gasneti_compiler_fence(); } tmp2 -= tmp1; ref_res = MIN(ref_res, tmp2); } if (gasneti_tsc_verbose) gasneti_console_message("TICKS","ticks and wallclock resolutions are %d and %d ns (or better)", (int)ticks_res, (int)ref_res); // Delay, with a default interval of MAX(100ms, 1000 ref ticks) const uint64_t interval_ns = MAX(GASNETI_TICKS_WC_MIN_INTERVAL, GASNETI_TICKS_WC_MIN_REF_TICKS * ref_res); uint64_t now = gasneti_clock_to_ns(wc0[count - 1]); uint64_t end = now + interval_ns; do { gasneti_nsleep(end - now); now = gasneti_clock_getns(); } while (now < end); // Collect end-time samples static volatile double acc = 0.; for (int i = 0; i < count; ++i) { gasneti_compiler_fence(); lo1[i] = gasneti_ticks_now(); gasneti_compiler_fence(); gasneti_clock_gettime(&wc1[i]); gasneti_compiler_fence(); hi1[i] = gasneti_ticks_now(); gasneti_compiler_fence(); // Busy-work to supply some inter-sample delay for (int j = 0; j < i; ++j) { acc += (double)hi1[j]; } } // Sanity check: detect the largest monotonicity violations in the sample set uint64_t max_err_tick = 0; uint64_t max_err_wcns = 0; uint64_t samp_tick = hi0[0]; uint64_t samp_wcns = gasneti_clock_to_ns(wc0[0]); #define CHECK_NEXT_TICK(this_tick) do { \ if (this_tick + ticks_res < samp_tick) { \ uint64_t back_step = samp_tick - this_tick; \ max_err_tick = MAX(max_err_tick, back_step); \ } \ samp_tick = this_tick; \ } while (0) #define CHECK_NEXT_WC(this_wc) do { \ uint64_t this_wcns = gasneti_clock_to_ns(this_wc); \ if (this_wcns + ref_res < samp_wcns) { \ uint64_t back_step = samp_wcns - this_wcns; \ max_err_wcns = MAX(max_err_wcns, back_step); \ } \ samp_wcns = this_wcns; \ } while (0) for (int i = 0; i < count; ++i) { CHECK_NEXT_TICK(hi0[i]); // do not reorder these calls CHECK_NEXT_TICK(lo0[i]); CHECK_NEXT_WC(wc0[i]); } for (int i = 0; i < count; ++i) { CHECK_NEXT_TICK(lo1[i]); // do not reorder these calls CHECK_NEXT_TICK(hi1[i]); CHECK_NEXT_WC(wc1[i]); } #undef CHECK_NEXT_TICK #undef CHECK_NEXT_WCE // Compute the best lower- and upper-bounds from the collected samples // Worst case each difference is too high or low by its respective granulatity double lo = 0; double hi = 1E30; for (int i = 0; i < count; ++i) { for (int j = 0; j < count; ++j) { // bug 3866: following expressions are carefully written to encourage isolated "backward steps" in the // tick samples to end up as double values that will be discarded by the MIN/MAX operation, // instead of overflowing into values that corrupt the entire calculation. // Backward steps in the ref timer are not tolerated here, but will trigger a repeat of sample collection. const double wc_delta = (double)(int64_t)(gasneti_clock_to_ns(wc1[i]) - gasneti_clock_to_ns(wc0[j])); const double lo_delta = (double)(int64_t)(lo1[i] - lo0[j]); // bias overflow to negative const double hi_delta = (double)(uint64_t)(hi1[i] - hi0[j]); // bias overflow to large positive double new_lo = (lo_delta - ticks_res) / (wc_delta + ref_res); double new_hi = (hi_delta + ticks_res) / (wc_delta - ref_res); lo = MAX(lo, new_lo); hi = MIN(hi, new_hi); } } // Sanity check: detect violations of the relationship between computed frequency bounds // This should never happen with properly-behaved clocks (ie those that // reliably return samples with a fixed linear relationship to true time, // within resolution error), but might concievably occur if calibration coincides // with a process migration across cores with sufficiently de-synchronized time bases. if (lo > hi || max_err_tick > 0 || max_err_wcns > 0) { // also report monotonicity violations if (gasneti_tsc_verbose || (trycnt == GASNETI_TICKS_WC_MAX_RETRY)) gasneti_console_message("WARNING","GASNet timer calibration on %s detected non-linear timer behavior: " "max_err_tick=%"PRIu64" max_err_wcns=%"PRIu64" ticks_res=%"PRIu64" ref_res=%"PRIu64" lo=%"PRIu64" hi=%"PRIu64". See docs for GASNET_TSC_RATE." "%s\n", gasneti_gethostname(), max_err_tick, max_err_wcns, ticks_res, ref_res, (uint64_t)(1e9 * lo), (uint64_t)(1e9 * hi), (trycnt < GASNETI_TICKS_WC_MAX_RETRY?" Retrying...":"")); if (gasneti_tsc_verbose) { char sample_msg[GASNETI_TICKS_WC_ITERS*400]; char *p = sample_msg; for (int n0 = 0; n0 < count; ++n0) { if (p < &sample_msg[sizeof(sample_msg)]) { int n1 = count-1-n0; uint64_t wc0_n0 = gasneti_clock_to_ns(wc0[n0]); uint64_t wc1_n1 = gasneti_clock_to_ns(wc1[n1]); const double wc_delta = (double)(int64_t)(wc1_n1 - wc0_n0); const double lo_delta = (double)(int64_t)(lo1[n1] - lo0[n0]); const double hi_delta = (double)(uint64_t)(hi1[n1] - hi0[n0]); double new_lo = (lo_delta - ticks_res) / (wc_delta + ref_res); double new_hi = (hi_delta + ticks_res) / (wc_delta - ref_res); p += snprintf(p, sizeof(sample_msg) - (p - sample_msg), " wc1[%i]=%-10"PRIu64" wc0[%i]=%-10"PRIu64" delta=%-10.0f" " lo1[%i]=%-10"PRIu64" lo0[%i]=%-10"PRIu64" delta=%-10.0f" " hi1[%i]=%-10"PRIu64" hi0[%i]=%-10"PRIu64" delta=%-10.0f" " lo=%8.6f hi=%8.6f\n", n1, wc1_n1, n0, wc0_n0, wc_delta, n1, lo1[n1], n0, lo0[n0], lo_delta, n1, hi1[n1], n0, hi0[n0], hi_delta, new_lo, new_hi); } } gasneti_console_message("TICKS: Debugging information:","\n%s",sample_msg); } if (++trycnt <= GASNETI_TICKS_WC_MAX_RETRY) goto retry_calibration; if (lo > hi) { // retry did not help // swap hi and lo to prevent sign errors below and continue double tmp = lo; lo = hi; hi = tmp; } } // Find mid-point between the two bounds, and its associated relative error gasneti_assert_dbl(lo ,<=, hi); double mid = (hi + lo) / 2.; double half_width = mid - lo; double err = half_width / hi; if (err_p) *err_p = err; if (gasneti_tsc_verbose) { double sum = 0; for (int i = 0; i < count; ++i) { const double delta = gasneti_clock_to_ns(wc1[i]) - gasneti_clock_to_ns(wc0[i]); sum += (hi1[i] - lo0[i]) / delta; sum += (lo1[i] - hi0[i]) / delta; } double mean = sum / (2 * count); gasneti_console_message("TICKS","range: %"PRIu64" +/- %"PRIu64" mean: %"PRIu64" offset: %"PRId64, (uint64_t)(1e9 * mid), (uint64_t)(1e9 * half_width), (uint64_t)(1e9 * mean), (int64_t)(1e9 * (mean-mid))); gasneti_console_message("TICKS","calibrated to err of %g in %d iters\n", err, GASNETI_TICKS_WC_ITERS); } return mid; } #if GASNETI_CALIBRATE_TSC /* x86, x86-64 and MIC */ extern double gasneti_calibrate_tsc_from_kernel(void) { double Tick = 0.0; /* Inverse GHz */ #if GASNETI_HAVE_SYSCTL_MACHDEP_TSC_FREQ /* FreeBSD and NetBSD */ int64_t cpuspeed = 0; size_t len = sizeof(cpuspeed); if (sysctlbyname("machdep.tsc_freq", &cpuspeed, &len, NULL, 0) == -1) gasneti_fatalerror("Failure in sysctlbyname('machdep.tsc_freq')=%s",strerror(errno)); // ensure it looks reasonable gasneti_assert_dbl(cpuspeed ,>, 1E6); gasneti_assert_dbl(cpuspeed ,<, 1E11); Tick = 1.0E9 / cpuspeed; #elif PLATFORM_OS_OPENBSD int MHz = 0; size_t len = sizeof(MHz); int mib[2]; mib[0] = CTL_HW; mib[1] = HW_CPUSPEED; if (sysctl(mib, 2, &MHz, &len, NULL, 0)) gasneti_fatalerror("Failure in sysctl(CTL_HW.HW_CPUSPEED)=%s",strerror(errno)); // ensure it looks reasonable gasneti_assert_int(MHz ,>, 1); gasneti_assert_int(MHz ,<, 100000); Tick = 1000. / MHz; #else // Linux && (X86 || X86_64 || MIC) FILE *fp = NULL; char input[512]; /* 256 is too small for "flags" line in /proc/cpuino */ double MHz = 0.0; fp = fopen("/proc/cpuinfo","r"); if (!fp) gasneti_fatalerror("Failure in fopen('/proc/cpuinfo','r')=%s",strerror(errno)); /* First pass gets speed from /proc/cpuinfo */ while (!feof(fp) && fgets(input, sizeof(input), fp)) { if (strstr(input,"cpu MHz")) { char *p = strchr(input,':'); if (p) MHz = atof(p+1); // ensure it looks reasonable gasneti_assert_dbl(MHz ,>, 1); gasneti_assert_dbl(MHz ,<, 100000); Tick = 1000. / MHz; break; } } /* Now try to deal with variable frequency CPUs. The TSC may still run at constant rate (or else is useless to us). If so, this code will determine the proper rate. */ { FILE *fp2 = fopen("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq","r"); if (fp2 && fgets(input, sizeof(input), fp2)) { int good_tsc = 0; int bogocount = 0; double bogosum = 0.0; /* cpuinfo_max_freq contains a "round" value in KHz */ MHz = atof(input) / 1000.0; fclose(fp2); // ensure it looks reasonable gasneti_assert_dbl(MHz ,>, 1); gasneti_assert_dbl(MHz ,<, 100000); /* Now use mean of measured bogomips values to correct the "round" MHz */ rewind(fp); while (!feof(fp) && fgets(input, sizeof(input), fp)) { if (strstr(input,"bogomips")) { char *p = strchr(input,':'); double tmp; if (p && (sscanf(p+1, "%lg", &tmp) == 1)) { bogocount++; bogosum += tmp; } } else if (strstr(input," constant_tsc") || strstr(input," tsc_reliable")) { good_tsc = 1; } } if (bogocount && good_tsc) { double tmp = 12.0 * bogosum / bogocount; /* 12 allows 1/2, 1/3 or 1/4 steps */ int ratio = 0.5 + (tmp / MHz); /* truncates toward zero */ MHz = tmp / ratio; Tick = 1000. / MHz; } /* Else we are stuck trusting the "cpu MHz" from /proc/cpuinfo */ } } fclose(fp); #endif return Tick; } extern double gasneti_calibrate_tsc(void) { static int firstTime = 1; static double Tick = 0.0; /* Inverse GHz */ if_pt (! firstTime) { gasneti_sync_reads(); return Tick; } // Serialize threads attempting initialization static gasneti_mutex_t tscmutex = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&tscmutex); // NOTICE: // To avoid potential mutual-recursion with the tracing code, one must not // make any calls that may produce tracing output until 'firstTime' has been // set to zero. In particular one must use gasneti_getenv_early() for any // reads of environment variables. However, GASNETI_TSC_TRACE_OUTPUT() can // be defined to perform tracing calls, such as to gasneti_env*_display(), // and will run when it is safe. if_pf (firstTime) { #if !(PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_MIC) || \ !PLATFORM_OS_LINUX Tick = gasneti_calibrate_tsc_from_kernel(); #else // Linux && (X86 || X86_64 || MIC) int tsc_verbose_dflt = 1; { const char *s = gasneti_getenv_early("GASNET_TSC_VERBOSE"); if (s) { gasneti_tsc_verbose = gasneti_parse_yesno(s); tsc_verbose_dflt = 0; } } #ifndef GASNETI_DEFAULT_TSC_RATE // TODO: need logic to default to "cpuinfo" when we can determine CPU model is trustworthy #define GASNETI_DEFAULT_TSC_RATE "wallclock" #endif const char *tsc_rate = gasneti_getenv_early("GASNET_TSC_RATE"); int tsc_rate_dflt = (NULL == tsc_rate); if (tsc_rate_dflt) tsc_rate = GASNETI_DEFAULT_TSC_RATE; enum { tsc_source_cpuinfo, // "cpuinfo" - parse /proc/cpuinfo for the TSC rate tsc_source_wallclock, // "wallclock" - calibrate TSC against OS-provided wallclock tsc_source_user, // rate in Hz - user provided rate (subject to verification) } tsc_source; if (0 == strcmp(tsc_rate, "cpuinfo")) { tsc_source = tsc_source_cpuinfo; } else if (0 == strcmp(tsc_rate, "wallclock")) { tsc_source = tsc_source_wallclock; } else { tsc_source = tsc_source_user; int64_t Hz = gasneti_parse_int(tsc_rate, 0); if (Hz < 1E6 || Hz > 1E11) { // 1MHz to 100GHz (same range accepted elsewhere) gasneti_fatalerror("GASNET_TSC_RATE must be a rate in Hz (no M or G suffix) or the name of a known source ('cpuinfo' or 'wallclock'), but was set to '%s'.", tsc_rate); } Tick = 1e9 / Hz; } // Allowable relative error for the calibrated TSC rate. // GASNETI_DEFAULT_TSC_RATE_TOLERANCE - warn if we can't meet this // GASNETI_DEFAULT_TSC_RATE_HARD_TOLERANCE - fatalerror if we can't meet this // Zero values disable the associated checks. // NOTE: "wallclock" calibration applies this slightly differently than others. #ifndef GASNETI_DEFAULT_TSC_RATE_TOLERANCE #define GASNETI_DEFAULT_TSC_RATE_TOLERANCE 0.0005 // 0.05% - matches testtools default #endif double soft_tolerance = GASNETI_DEFAULT_TSC_RATE_TOLERANCE; const char *soft_tol_str = gasneti_getenv_early("GASNET_TSC_RATE_TOLERANCE"); int soft_tol_dflt = (NULL == soft_tol_str); if (!soft_tol_dflt && gasneti_parse_dbl(soft_tol_str, &soft_tolerance)) { gasneti_fatalerror("If set, environment variable GASNET_TSC_RATE_TOLERANCE must be a valid floating point value or fraction"); } const int check_soft = soft_tolerance > 0.0; if ((soft_tolerance < 0.0) || (soft_tolerance > 1.0)) { gasneti_fatalerror( "GASNET_TSC_RATE_TOLERANCE must be in the range 0.0 - 1.0, inclusive, but '%g' was given", soft_tolerance); } #ifndef GASNETI_DEFAULT_TSC_RATE_HARD_TOLERANCE #define GASNETI_DEFAULT_TSC_RATE_HARD_TOLERANCE 0.02 // 2% #endif double hard_tolerance = GASNETI_DEFAULT_TSC_RATE_HARD_TOLERANCE; const char *hard_tol_str = gasneti_getenv_early("GASNET_TSC_RATE_HARD_TOLERANCE"); int hard_tol_dflt = (NULL == hard_tol_str); if (!hard_tol_dflt && gasneti_parse_dbl(hard_tol_str, &hard_tolerance)) { gasneti_fatalerror("If set, environment variable GASNET_TSC_RATE_HARD_TOLERANCE must be a valid floating point value or fraction"); } const int check_hard = hard_tolerance > 0.0; if ((hard_tolerance < 0.0) || (hard_tolerance > 1.0)) { gasneti_fatalerror( "GASNET_TSC_RATE_HARD_TOLERANCE must be in the range 0.0 - 1.0, inclusive, but '%g' was given", hard_tolerance); } // We test using the smaller of the "active" tolerances double tolerance; if (check_hard) { if (check_soft) { tolerance = MIN(hard_tolerance, soft_tolerance); } else { tolerance = hard_tolerance; } } else { tolerance = soft_tolerance; // Even if zero } #define GASNETI_TSC_TRACE_OUTPUT() do { \ gasneti_envstr_display("GASNET_TSC_VERBOSE", (gasneti_tsc_verbose?"YES":"NO"), tsc_verbose_dflt); \ gasneti_envstr_display("GASNET_TSC_RATE", tsc_rate, tsc_rate_dflt); \ gasneti_envdbl_display("GASNET_TSC_RATE_TOLERANCE", soft_tolerance, soft_tol_dflt); \ gasneti_envdbl_display("GASNET_TSC_RATE_HARD_TOLERANCE", hard_tolerance, hard_tol_dflt); \ } while (0) // Determine/initialize the best available wallclock timer gasneti_clock_init(); uint64_t begin_tsc_calibration = gasneti_clock_getns(); // Approximate the resolution of the reference clock in ns (if needed) uint64_t ref_res = (uint64_t)1E9; if ((tsc_source == tsc_source_wallclock) || (tolerance > 0.0)) { const uint64_t max_res = 5000; // We actually only care that it is below 5us const uint64_t max_sum = 20000000; // And we don't want to spend more than 20ms here uint64_t sum = 0; int i; for (i=0; (i < 1000) && (ref_res > max_res) && (i < 10 || sum < max_sum); i++) { uint64_t start, next; start = gasneti_clock_getns(); while (start == (next = gasneti_clock_getns())); uint64_t delta = (next-start); ref_res = MIN(ref_res, delta); sum += delta; } if (gasneti_tsc_verbose) gasneti_console_message("TICKS","reference resolution is %d ns or better (in %d iters, %lu ns)\n", (int)ref_res, i, (unsigned long)sum); if_pf (ref_res > max_res) { gasneti_fatalerror("Reference timer resolution of %lu ns on %s is not acceptable for calibration of the TSC.\n" "Please reconfigure with --enable-force-gettimeofday or --enable-force-posix-realtime.\n", (unsigned long)ref_res, gasneti_gethostname()); } } if (tsc_source == tsc_source_cpuinfo) { Tick = gasneti_calibrate_tsc_from_kernel(); } else if (tsc_source == tsc_source_wallclock) { double err, rate = gasneti_calibrate_tick_ghz(ref_res , &err); Tick = 1. / rate; // Inverse GHz // Check that we converged within given tolerance if (check_hard && (err > hard_tolerance)) { gasneti_fatalerror( "TSC calibration did not converge with reasonable certainty on %s (%g > %g).\n" "Please see GASNet's README-tools for a description of GASNET_TSC_RATE_HARD_TOLERANCE or " "reconfigure with either --enable-force-gettimeofday or --enable-force-posix-realtime.", gasneti_gethostname(), err, hard_tolerance); } if (check_soft && (err > soft_tolerance)) { gasneti_console_message("WARNING", "TSC calibration did not converge with reasonable certainty on %s (%g > %g). " "Please see GASNet's README-tools for a description of GASNET_TSC_RATE_TOLERANCE or " "reconfigure with either --enable-force-gettimeofday or --enable-force-posix-realtime.\n", gasneti_gethostname(), err, soft_tolerance); } } else { gasneti_assert(tsc_source == tsc_source_user); } // Don't blindly trust either the user or cpuinfo // Validate Tick by comparison to reference wallclock over 10ms interval // Zero or negative GASNET_TSC_RATE_TOLERANCE disables this check if ((tsc_source != tsc_source_wallclock) && (tolerance > 0.0)) { const int max_tries = 3; double best = 1e4; int i; for (i = 0; i < max_tries; ++i) { // Retry in case we get unlucky double ratio = Tick * gasneti_approx_tick_ghz(10000000); if (ratio < best) { best = ratio; if ((best > (1. - tolerance)) && (best < (1. + tolerance))) break; // Pass } } if (i == max_tries) { if (check_hard && ((best < (1. - hard_tolerance)) || (best > (1. + hard_tolerance)))) { gasneti_fatalerror( "Reference timer and calibrated TSC differ too much on %s (ratio %g).\n" "Please see GASNet's README-tools for a description of GASNET_TSC_RATE_HARD_TOLERANCE or " "reconfigure with either --enable-force-gettimeofday or --enable-force-posix-realtime.", gasneti_gethostname(), best); } if (check_soft && ((best < (1. - soft_tolerance)) || (best > (1. + soft_tolerance)))) { gasneti_console_message("WARNING", "Reference timer and calibrated TSC differ too much on %s (ratio %g). " "Please see GASNet's README-tools for a description of GASNET_TSC_RATE_TOLERANCE or " "reconfigure with either --enable-force-gettimeofday or --enable-force-posix-realtime.\n", gasneti_gethostname(), best); } } if (gasneti_tsc_verbose) gasneti_console_message("TICKS","relative to wallclock = %g", best); } if (gasneti_tsc_verbose) gasneti_console_message("TICKS","rate calibrated to %g MHz in %g sec", 1e3/Tick, 1e-9*(gasneti_clock_getns()-begin_tsc_calibration)); #endif gasneti_sync_writes(); firstTime = 0; #ifdef GASNETI_TSC_TRACE_OUTPUT GASNETI_TSC_TRACE_OUTPUT(); #endif } gasneti_mutex_unlock(&tscmutex); return Tick; } #endif /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/gasnet_atomic_bits.h0000664000175000017500000041517615142313673017447 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_atomic_bits.h $ * Description: GASNet header for platform-specific parts of atomic operations * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #if !defined(_IN_GASNET_TOOLS_H) && !defined(_IN_GASNETEX_H) #error This file is not meant to be included directly- clients should include gasnetex.h or gasnet_tools.h #endif #ifndef _GASNET_ATOMIC_BITS_H #define _GASNET_ATOMIC_BITS_H // NOTE: // This header provides only a portion of the atomics implementation. // It is CRUCIAL that any changes/additions to support for any cpu/os/compiler // combination also be reflected in gasnet_atomic_fwd.h /* ------------------------------------------------------------------------------------ */ /* Atomics HOW TO: This file implements the platform-specific aspects of GASNet's atomic operations, where "platform" is defined as (at least) OS, ABI and compiler. The GASNet atomics provide a set of operations on 32-bit and 64-bit types, which are implemented using mutexes if a platform cannot implement all of the required operations "natively". If that is the case, then a "private" atomic type can be defined which may have either a reduced set of operations, a size other than 4 or 8 bytes, or both. If a platform can implement the 32- and/or 64-bit operations (enumerated below) then it must provide the following items, where "??" is to be replaced by "32" or "64". + #define GASNETI_HAVE_ATOMIC??_T 1 This indicates that the given type is implemented natively, suppressing the generation of the corresponding mutex-based version. + typedef ... gasneti_atomic??_t; This is most often implemented as struct { volatile uint??_t gasneti_ctr; } Use of a struct prevent client code from accidentally treating it as a scalar, while the volatile qualifier helps ensure correct code in the implementation. + #define gasneti_atomic??_init(v) ... Static initializer for gasneti_atomic??_t. + One must #define EITHER gasneti_atomic??_[OP] or _gasneti_atomic??_[OP], for each OP in {set, read, compare_and_swap, swap}. The first (no "_" prefix) form takes a "const int flags" argument as described in README-tools and must implement the fences it requests. In the case of implementations of the atomic operations which include both a compiler fence and full memory barrier, one can simply ignore the argument. At present there are no platforms using this non-prefixed option EXCEPT for fully-fenced ones which ignore the flags argument. The form with the "_" prefix does NOT take a "flags" argument and the atomics subsystem automatically implements the fences to produce the non-prefixed version. Because of the way these are used, it is safe to define these as macros which evaluate their arguments multiple times because the arguments will never have side-effects. A #define must be used to allow the rest of the atomics subsystem to know which is available. However, the OP itself is often implemented as an inline function and its name is #define'd to itself. + The arithmetic operations {increment, decrement, add, subtract} can be provided either explicitly or implicitly. The choice between explicit or implicit definition is independent - one may mix explicit and implicit definitions of these four operations freely. To provide the operations explicitly one #define's them, with or without a "_" prefix as above. If neither form is defined, the atomics subsystem will construct them automatically provided one #defines any ONE of the following: uint??_t gasneti_atomic??_fetchadd(ptr, op, flags) uint??_t gasneti_atomic??_addfetch(ptr, op, flags) uint??_t _gasneti_atomic??_fetchadd(ptr, op) uint??_t _gasneti_atomic??_addfetch(ptr, op) A "fetchadd" returns the value before addition, while a "addfetch" returns the value after. Note that the "op" has an unsigned type (uint??_t) rather than signed (int??_t) as in the add and subtract operations. This does not impact the results since we perform 2s-complement arithmetic on the 32- and 64-bit types. + The decrement_and_test operation can either be #define'd explicitly (with or without a "_" prefix) OR it can be constructed automatically from either a "_"-prefixed fetchadd or addfetch. However, it will NOT be constructed automatically from the corresponding non-prefixed (fenced) operations because there is currently no suitable mechanism to reconcile the fencing. + Fences: If you define any of the operations above with the "_" prefix, then the non-prefixed version (w/ flags argument) will be constructed automatically, and this construction will implement the fences requested by this flags argument. By default this construction assumes that there are no fencing side-effects (compiler fence or memory barriers) in the "_"-prefixed operations. When that is NOT the case, one can override this default behavior by defining the appropriate fencing macros. At present this is done only for the x86/x86-64. In the case of the x86/x86-64 all of the read-modify-write operations include a full memory barrier but do NOT include a compiler fence. So the following definitions are used to replace the defaults: #define _gasneti_atomic??_prologue_rmw(p,f) #define _gasneti_atomic??_fence_before_rmw(p,f) _gasneti_atomic_cf_before(f) #define _gasneti_atomic??_fence_after_rmw(p,f) _gasneti_atomic_cf_after(f) #define _gasneti_atomic??_fence_after_bool(p,f,v) _gasneti_atomic_cf_after(f) where "cf" stands for compiler fence and _gasneti_atomic_cf_before() and ...after are defined in gasneti_atomicops.h along with several other macros used to construct the default fences. + Native atomics: The term "native atomics" is used to refer to the implementation of atomic operations via inline assembly. + Compiler atomics and OS atomics: These terms are used to refer to the implementation of atomic operations by a third-party such as a compiler or a system header. + Generic atomics: The term "generic atomics" is used here and in gasnet_atomicops.h to refer to the implementation of atomic operations via gasnett_mutex_t. + Hybrid 64-bit atomics: With an ABI for which the alignment of 64-bit types is NOT sufficient to allow free use of the CPU's native atomic operations, we have a "hybrid" mechanism in which a run-time branch selects between native atomics for the properly-aligned case and generic atomics for unaligned values. A platform requiring the hybrid implementation need only #define GASNETI_HYBRID_ATOMIC64 1 and provide exactly the operations expected by the corresponding code in gasnet_atomicops.h (search for GASNETI_HYBRID_ATOMIC64). + Special atomics: The term "special atomics" describes the case of native atomics for C compilers which require use of "out-of-line" asm support (receiving args and returning a value using the ABI-defined function calling convention). In this case the implementation defines the necessary operations through any combination of macros, inline functions and "special" functions. Special functions are defined via GASNETI_ATOMIC{32,64}_[OPNAME]_BODY macros, each providing the assembly to be expanded as the body of a library function (and triggering generation of the necessary wrappers). The macros GASNETI_ATOMIC{32,64}_SPECIALS collect the BODY macros to be expanded in gasnet_tools.c. + Slow atomics: The term "slow atomics" is for when the C compiler which built the gasnet library used an implementation which the current compiler cannot be relied upon to also generate. This can occur (1) when the C++ compiler lacks the same asm support as the C compiler, or (2) when the compiler used at client compile time does not match the one used to build the library. All that is required to use slow atomics is to define GASNETI_USING_SLOW_ATOMIC{32,64} where one would otherwise define the atomic functions. These cause atomic operations to resolve function calls to the library. Note: The CC probed at configure time cannot use slow atomics. Note: The generic and slow atomics are mutually exclusive for a given bit-width. + Differing implementations of 32-bit and 64-bit atomics: There are assumptions in how atomicsops are constructed for compilers other than the configure-time CC which limit which 64-bit atomics implementations can be mixed with a given 32-bit implementation. The main limitation is that the 64-bit atomics are never "better" than the 32-bit. The assumptions are listed (and enforced) at the end of gasnet_atomic_fwd.h. TODO: Fully document the macros used to override the default fences. For now, the code for x86/x86_64 is the only decent example. TODO: Document definition of a "private" atomic type. There are no surviving examples, however the SPARC7 and PA-RISC code (removed after GASNet-1.22.0) were good examples. SEE ALSO: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=1607 */ /* ------------------------------------------------------------------------------------ */ /* Determine which atomic implementations are appropriate to the current compiler */ #include "gasnet_atomic_fwd.h" /* ------------------------------------------------------------------------------------ */ /* Work-arounds and special cases for various platforms */ /* Cannot always use "register" (bug 3528): */ #ifdef GASNETI_ASM_REGISTER_KEYWORD /* Preserve any override */ #elif PLATFORM_ARCH_ARM && defined(GASNETI_HAVE_ARM_CMPXCHG) && \ PLATFORM_OS_LINUX && (PLATFORM_COMPILER_GNU || PLATFORM_COMPILER_CLANG) /* This target *must* use the "register" keyword. * Leaving GASNETI_ASM_REGISTER_KEYWORD undefined will catch any mis-guided use. */ #elif (__cplusplus >= 201103L) /* C++11 deprecated the "register" keyword, and C++17 makes it a reserved word. */ #define GASNETI_ASM_REGISTER_KEYWORD /* empty */ #else #define GASNETI_ASM_REGISTER_KEYWORD register #endif #if PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_X86 || PLATFORM_ARCH_MIC #ifdef GASNETI_UNI_BUILD #define GASNETI_X86_LOCK_PREFIX "" #else #define GASNETI_X86_LOCK_PREFIX "lock\n\t" #endif /* Partial x86 solution(s) to bug 1718 (-fPIC support when configure-time check was non-PIC). * AUTOMATIC WORK AROUND: * + gcc: on most platforms (including Linux, Darwin and Solaris) defines __PIC__ when building * position independent code (e.g. -fPIC or -fpic; not passed -mdynamic-no-pic on Darwin). * + pathcc: same as gcc * MANUAL WORK AROUND: * + pgcc: no distinguishing macro when passed -fPIC, so no automatic work-around available * JUST WORKS: * + icc: mimics gcc, but is able to schedule %ebx so no work-around is needed * + open64: mimics gcc, but is able to schedule %ebx so no work-around is needed * + llvm-gcc: mimics gcc, but is able to schedule %ebx so no work-around is needed * + Sun cc: use of specials doesn't encounter the problem * NOT APPLICABLE: * + nvhpc: only generates LP64 ABI (PLATFORM_ARCH_64), not ILP32 (PLATFORM_ARCH_32) * * Bottom line is that we recommend YOUR_PIC_CFLAGS="-fPIC -DGASNETI_FORCE_PIC", * replacing "-fPIC" with your compiler-specific flag(s) as needed. */ #if ((PLATFORM_COMPILER_GNU && !defined(__llvm__)) || \ PLATFORM_COMPILER_PATHSCALE || PLATFORM_COMPILER_PGI) && \ ((defined(__PIC__) && !defined(GASNETI_CONFIGURED_PIC)) || defined(GASNETI_FORCE_PIC)) /* Disable use of %ebx when building PIC, but only on affected compilers. */ #define GASNETI_USE_X86_EBX 0 #endif /* By default use the configure-probed result */ #ifndef GASNETI_USE_X86_EBX #define GASNETI_USE_X86_EBX GASNETI_HAVE_X86_EBX #endif #endif /* ------------------------------------------------------------------------------------ */ /* ABI properties, independent of implementation */ // Exceptional cases #if PLATFORM_ARCH_X86 #define gasneti_atomic64_align 4 #endif // Defaults #ifndef gasneti_atomic32_align #define gasneti_atomic32_align 4 #endif #ifndef gasneti_atomic64_align #define gasneti_atomic64_align 8 #endif /* ------------------------------------------------------------------------------------ */ /* Helpers for "special" call-based atomics on platforms w/ crippled inline asm support. */ #define GASNETI_SPECIAL_ASM_DECL(name) \ extern void name(void) #define GASNETI_SPECIAL_ASM_DEFN(name, body) \ GASNETI_NEVER_INLINE(name, extern void name(void)) { body; } /* ------------------------------------------------------------------------------------ */ // Logic to handle compilers other than the configured CC, including: // + CXX, if any // + MPI_CC, if any and it differs from CC // + compilers not probed by configure // The first two cases (CXX and MPI_CC) differ from the last in the use of // configure probed information which may be more precise than what can be // determined from the preprocess environment alone. // // NOTE: probably incomplete with respect to a "private" atomic type #if !GASNETI_COMPILER_IS_CC // The current compiler is not the C compiler used to build GASNet libraries. // So, we must decide between allowing the compiler to generate either the // actual atomicops or library calls. // Notes on COMPATIBLE implementations // // Two implementations are considered "compatible" if they interoperate // (linking and producing correct results). The logic below determines if // the current compiler would normally use implementations of the 32- and // 64-bit atomic operations that are compatible with those in the GASNet // libraries. If not, then later logic makes the necessary definitions to // ensure force use of compatible implementations. In some cases this // means use of "SLOW" atomics - calling GASNet library functions. // // GENERIC, OS and HYBRID implementations are each compatible only with // themselves. However, each is compatible across all supported compiler // families. // // NATIVE and SYNC implementations are currently all mutually compatible. // This is true because we currently only enable __sync atomics which we // believe to be compatible with the native inline asm. In particular we // assume compilers do not use a mutex-based implementation which might not // be compatible with native atomics or between distinct compiler families. // If these assumptions are ever broken, then additional logic will be // needed to sort out which pairs are compatible. // // The compatibility of SPECIAL implementations is asymmetric. A library // built with SPECIAL atomics is compatible with any compiler's use of SYNC // or NATIVE atomics implementations for the same reasons those two can be // mixed. However, a SPECIAL implementation uses compiler-specific support // routines in the library. Therefore a compiler's SPECIAL implementation // is compatible only with a library built with SPECIAL by the same compiler // family (all other cases will lack the appropriate support routines). #if (GASNETI_ATOMIC32_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_SPECIAL) #if (GASNETI_ATOMIC32_IMPL == GASNETI_ATOMIC_IMPL_SPECIAL) && \ (PLATFORM_COMPILER_FAMILYID == GASNETI_PLATFORM_COMPILER_FAMILYID) // SPECIAL is self-COMPATIBLE only within a compiler family #elif (GASNETI_ATOMIC32_IMPL == GASNETI_ATOMIC_IMPL_NATIVE) || \ (GASNETI_ATOMIC32_IMPL == GASNETI_ATOMIC_IMPL_SYNC) // SPECIAL library is assumed COMPATIBLE with NATIVE and SYNC // Exceptions should be added here #else #define GASNETI_ATOMIC32_WANT_SLOW 1 #endif #elif (GASNETI_ATOMIC32_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_GENERIC) #define GASNETI_ATOMIC32_WANT_GENERIC 1 #elif (GASNETI_ATOMIC32_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_OS) #define GASNETI_ATOMIC32_WANT_OS 1 #elif (GASNETI_ATOMIC32_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_NATIVE) || \ (GASNETI_ATOMIC32_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_SYNC) #if (GASNETI_ATOMIC32_IMPL == GASNETI_ATOMIC_IMPL_NATIVE) || \ (GASNETI_ATOMIC32_IMPL == GASNETI_ATOMIC_IMPL_SYNC) // All NATIVE and SYNC are assumed to be COMPATIBLE (see note above) // Exceptions should be added here #else #define GASNETI_ATOMIC32_WANT_SLOW 1 #endif #else // NOTE 32-bit atomics are never "hybrid" #error Internal error - unexpected atomics configuration #endif #if (GASNETI_ATOMIC64_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_SPECIAL) #if (GASNETI_ATOMIC64_IMPL == GASNETI_ATOMIC_IMPL_SPECIAL) && \ (PLATFORM_COMPILER_FAMILYID == GASNETI_PLATFORM_COMPILER_FAMILYID) // SPECIAL is self-COMPATIBLE only within a compiler family #elif (GASNETI_ATOMIC64_IMPL == GASNETI_ATOMIC_IMPL_NATIVE) || \ (GASNETI_ATOMIC64_IMPL == GASNETI_ATOMIC_IMPL_SYNC) // SPECIAL library is assumed COMPATIBLE with NATIVE and SYNC // Exceptions should be added here #else #define GASNETI_ATOMIC64_WANT_SLOW 1 #endif #elif (GASNETI_ATOMIC64_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_GENERIC) #define GASNETI_ATOMIC64_WANT_GENERIC 1 #elif (GASNETI_ATOMIC64_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_OS) #define GASNETI_ATOMIC64_WANT_OS 1 #elif (GASNETI_ATOMIC64_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_NATIVE) || \ (GASNETI_ATOMIC64_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_SYNC) #if (GASNETI_ATOMIC64_IMPL == GASNETI_ATOMIC_IMPL_NATIVE) || \ (GASNETI_ATOMIC64_IMPL == GASNETI_ATOMIC_IMPL_SYNC) // All NATIVE and SYNC are assumed to be COMPATIBLE (see note above) // Exceptions should be added here #else #define GASNETI_ATOMIC64_WANT_SLOW 1 #endif #elif (GASNETI_ATOMIC64_IMPL_CONFIGURE == GASNETI_ATOMIC_IMPL_HYBRID) // Note that hybrid is not "compatible" with anything but itself #define GASNETI_ATOMIC64_WANT_SLOW 1 #else #error Internal error - unexpected atomics configuration #endif // As checked by the logic at the end of gasnet_atomic_fwd.h, the // implementation of 32-bit atomics strongly limits which implementations // may be used for 64-bit atomics. As a result, the disposition of 32-bit // atomics is the sole determining factor in how the main implementation // ladder will be traversed. #if GASNETI_ATOMIC32_WANT_GENERIC #define GASNETI_USE_GENERIC_ATOMICOPS 1 #elif GASNETI_ATOMIC32_WANT_OS #define GASNETI_USE_OS_ATOMICOPS 1 #elif GASNETI_ATOMIC32_WANT_SLOW #define GASNETI_USING_SLOW_ATOMIC32 1 #define GASNETI_ATOMIC32_NOINLINE 1 // Suppress OS, SYNC and NATIVE #define GASNETI_HAVE_ATOMIC32_T 1 // Suppress GENERIC #endif // Disposition of 64-bit atomics must suppress cases which could be // reachable in the main ladder, but are undesired. #if GASNETI_ATOMIC64_WANT_GENERIC #define GASNETI_ATOMIC64_NOINLINE 1 // Suppress OS, SYNC, NATIVE, HYBRID #elif GASNETI_ATOMIC64_WANT_SLOW #define GASNETI_USING_SLOW_ATOMIC64 1 #define GASNETI_ATOMIC64_NOINLINE 1 // Suppress OS, SYNC, NATIVE, HYBRID #define GASNETI_HAVE_ATOMIC64_T 1 // Suppress GENERIC #endif // Check for cases in which desired 64-bit atomics are unreachable. // Any #error here which does not first trip an #error at the end of // gasnet_atomic_fwd.h indicates a flaw in the logic above. #if (GASNETI_ATOMIC32_NOINLINE && !GASNETI_ATOMIC64_NOINLINE) || \ (GASNETI_ATOMIC64_WANT_OS && !GASNETI_USE_OS_ATOMICOPS) #error Internal error - unexpected atomics configuration #endif // For local use only #undef GASNETI_ATOMIC32_WANT_GENERIC #undef GASNETI_ATOMIC64_WANT_GENERIC #undef GASNETI_ATOMIC32_WANT_OS #undef GASNETI_ATOMIC64_WANT_OS #undef GASNETI_ATOMIC32_WANT_SLOW #undef GASNETI_ATOMIC64_WANT_SLOW #endif /* ------------------------------------------------------------------------------------ */ #if defined(GASNETI_ATOMIC32_NOINLINE) /* Logic above has determined current compiler cannot safely use these implementations. */ /* This case exists only to prevent the following cases from matching. */ #elif defined(GASNETI_USE_GENERIC_ATOMICOPS) /* Use a very slow but portable implementation of atomic ops using mutexes */ /* This case exists only to prevent the following cases from matching. */ #elif defined(GASNETI_USE_COMPILER_ATOMICOPS) #if GASNETI_HAVE_SYNC_ATOMICS_32 /* Generic implementation in terms of GCC's __sync atomics */ #if 0 // Update if/when using 32-bit __sync atomic where they are not signal-safe #define GASNETI_ATOMIC32_NOT_SIGNALSAFE 1 #endif /* GCC documentation promises a full memory barrier */ #define _gasneti_atomic32_prologue_rmw(p,f) /*empty*/ #define _gasneti_atomic32_fence_before_rmw(p,f) /*empty*/ #define _gasneti_atomic32_fence_after_rmw(p,f) /*empty*/ #define _gasneti_atomic32_fence_after_bool(p,f,v) /*empty*/ #define GASNETI_HAVE_ATOMIC32_T 1 typedef struct { volatile uint32_t gasneti_ctr; } gasneti_atomic32_t; #define gasneti_atomic32_init(v) { (v) } #define _gasneti_atomic32_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic32_set(p,v) do { (p)->gasneti_ctr = (v); } while(0) /* Default impls of inc, dec, add and sub */ #define gasneti_atomic32_fetchadd(p,op,f) (__sync_fetch_and_add(&(p)->gasneti_ctr, (uint32_t)(op))) #define gasneti_atomic32_decrement_and_test(p,f) (1==gasneti_atomic32_fetchadd((p),-1,(f))) #define gasneti_atomic32_compare_and_swap(p,oval,nval,f) \ (__sync_bool_compare_and_swap(&((p)->gasneti_ctr), (oval), (nval))) #if __GCC_ATOMIC_TEST_AND_SET_TRUEVAL // means test_and_set is actually a swap // Unlike the other __sync*(), __sync_lock_test_and_set() is documented as // having only an ACQ fence. So, we *may* need to make up the difference. #if PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_MIC // Nothing to do: SWAP must be lock-prefix instruction (or mutex cycle) // TODO: other ARCHs w/ this property? #define _gasneti_atomic_fence_before_swap(f) ((void)0) #define _gasneti_atomic_fence_after_swap(f) ((void)0) #elif (GASNETI_RMB_IS_MB && 0) // TODO: disabled since GASNETI_RMB_IS_MB could reflect *our* choice // of RMB and not the implementation of __sync_lock_test_and_set(). // Example: on PPC we use lwsync but compiler might use isync. #define _gasneti_atomic_fence_before_swap(f) _gasneti_atomic_fence_before(f) #define _gasneti_atomic_fence_after_swap() ((void)0) #else #define _gasneti_atomic_fence_before_swap(f) _gasneti_atomic_fence_before(f) #define _gasneti_atomic_fence_after_swap(f) _gasneti_atomic_fence_after((f) & ~GASNETI_ATOMIC_ACQ) #endif #endif // Two implementations of SWAP are possible: // 1) __sync_lock_test_and_set() is often a swap, and modern GCC will // `#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1` on such platforms. // Since it has only an acquire fence, some additional work is required. // 2) Loop on (fully-fenced) __sync_val_compare_and_swap(). GASNETI_INLINE(gasneti_atomic32_swap) uint32_t gasneti_atomic32_swap(gasneti_atomic32_t *_p, uint32_t _nval, const int _flags) { GASNETI_ASM_REGISTER_KEYWORD volatile uint32_t *_p32 = &(_p->gasneti_ctr); GASNETI_ASM_REGISTER_KEYWORD uint32_t _oval; #if __GCC_ATOMIC_TEST_AND_SET_TRUEVAL _gasneti_atomic_fence_before_swap(_flags); _oval = __sync_lock_test_and_set(_p32,_nval); _gasneti_atomic_fence_after_swap(_flags); #else GASNETI_ASM_REGISTER_KEYWORD uint32_t _tmp = *_p32; do { _oval = _tmp; } while (_oval != (_tmp = __sync_val_compare_and_swap(_p32,_oval,_nval))); #endif return _oval; } // TODO: use 64-bit sync atomics on ILP32 iff signal safe (otherwise probably equivalent to generics) #if GASNETI_ATOMIC64_NOINLINE // Using SLOW or GENERIC alternative #elif PLATFORM_ARCH_64 && GASNETI_HAVE_SYNC_ATOMICS_64 #if 0 // Update if/when using 64-bit __sync atomic where they are not signal-safe #define GASNETI_ATOMIC64_NOT_SIGNALSAFE 1 #endif #define _gasneti_atomic64_prologue_rmw(p,f) /*empty*/ #define _gasneti_atomic64_fence_before_rmw(p,f) /*empty*/ #define _gasneti_atomic64_fence_after_rmw(p,f) /*empty*/ #define _gasneti_atomic64_fence_after_bool(p,f,v) /*empty*/ #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(v) { (v) } #define _gasneti_atomic64_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic64_set(p,v) do { (p)->gasneti_ctr = (v); } while(0) #define gasneti_atomic64_fetchadd(p,op,f) (__sync_fetch_and_add(&(p)->gasneti_ctr, (uint64_t)(op))) #define gasneti_atomic64_decrement_and_test(p,f) (1==gasneti_atomic64_fetchadd((p),-1,(f))) #define gasneti_atomic64_compare_and_swap(p,oval,nval,f) \ (__sync_bool_compare_and_swap(&((p)->gasneti_ctr), (oval), (nval))) // See comments w/ gasneti_atomic64_swap GASNETI_INLINE(gasneti_atomic64_swap) uint64_t gasneti_atomic64_swap(gasneti_atomic64_t *_p, uint64_t _nval, const int _flags) { GASNETI_ASM_REGISTER_KEYWORD volatile uint64_t *_p64 = &(_p->gasneti_ctr); GASNETI_ASM_REGISTER_KEYWORD uint64_t _oval; #if __GCC_ATOMIC_TEST_AND_SET_TRUEVAL _gasneti_atomic_fence_before_swap(_flags); _oval = __sync_lock_test_and_set(_p64,_nval); _gasneti_atomic_fence_after_swap(_flags); #else GASNETI_ASM_REGISTER_KEYWORD uint64_t _tmp = *_p64; do { _oval = _tmp; } while (_oval != (_tmp = __sync_val_compare_and_swap(_p64,_oval,_nval))); #endif return _oval; } #endif /* GASNETI_HAVE_SYNC_ATOMICS_64 */ #undef _gasneti_atomic_fence_before_swap #undef _gasneti_atomic_fence_after_swap #else #error "GASNETI_USE_COMPILER_ATOMICOPS for unknown or unsupported compiler" #endif #elif defined(GASNETI_USE_OS_ATOMICOPS) /* ------------------------------------------------------------------------------------ * Use OS-provided atomics, which should be CPU-independent and * which should work regardless of the compiler's inline assembly support. * ------------------------------------------------------------------------------------ */ #if PLATFORM_OS_CYGWIN /* These are *NOT* Cygwin calls, but Windows API calls that may actually * be intrinsics in the MS compilers on 64-bit systems. * Intrinsics below incur full memory barriers. Win8+ offer finer-grained * control over fencing, but we don't currently use those. */ #include #define GASNETI_HAVE_ATOMIC32_T 1 typedef struct { volatile uint32_t gasneti_ctr; } gasneti_atomic32_t; #define gasneti_atomic32_init(v) { (v) } #define gasneti_atomic32_increment(p,f) InterlockedIncrement((LONG *)&((p)->gasneti_ctr)) #define gasneti_atomic32_decrement(p,f) InterlockedDecrement((LONG *)&((p)->gasneti_ctr)) #define _gasneti_atomic32_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic32_set(p,v) ((p)->gasneti_ctr = (v)) #define gasneti_atomic32_decrement_and_test(p,f) \ (InterlockedDecrement((LONG *)&((p)->gasneti_ctr)) == 0) #define gasneti_atomic32_compare_and_swap(p,oval,nval,f) \ (InterlockedCompareExchange((LONG *)&((p)->gasneti_ctr),nval,oval) == (LONG)(oval)) #define gasneti_atomic32_fetchadd(p,op,f) InterlockedExchangeAdd((LONG *)&((p)->gasneti_ctr), op) #define gasneti_atomic32_swap(p,op,f) InterlockedExchange((LONG *)&((p)->gasneti_ctr), op) #if GASNETI_ATOMIC64_NOINLINE // Using SLOW or GENERIC alternative #elif PLATFORM_ARCH_64 /* TODO: Identify ILP32 running on 64-bit CPU */ #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(v) { (v) } #define gasneti_atomic64_increment(p,f) InterlockedIncrement64((LONGLONG *)&((p)->gasneti_ctr)) #define gasneti_atomic64_decrement(p,f) InterlockedDecrement64((LONGLONG *)&((p)->gasneti_ctr)) #define _gasneti_atomic64_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic64_set(p,v) ((p)->gasneti_ctr = (v)) #define gasneti_atomic64_decrement_and_test(p,f) \ (InterlockedDecrement64((LONGLONG *)&((p)->gasneti_ctr)) == 0) #define gasneti_atomic64_compare_and_swap(p,oval,nval,f) \ (InterlockedCompareExchange64((LONGLONG *)&((p)->gasneti_ctr),nval,oval) == (LONGLONG)(oval)) #define gasneti_atomic64_fetchadd(p,op,f) InterlockedExchangeAdd64((LONGLONG *)&((p)->gasneti_ctr), op) #define gasneti_atomic64_swap(p,op,f) InterlockedExchange64((LONGLONG *)&((p)->gasneti_ctr), op) #endif /* ------------------------------------------------------------------------------------ */ #else #error GASNETI_USE_OS_ATOMICOPS defined on unsupported OS - need to implement GASNet atomics (or #define GASNETI_USE_GENERIC_ATOMICOPS) #endif #else /* ------------------------------------------------------------------------------------ * Not using GENERIC (mutex), compiler-provided or OS-provided atomics, so * provide our own based on the CPU and compiler support for inline assembly code * ------------------------------------------------------------------------------------ */ #if PLATFORM_ARCH_X86 || PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_MIC /* x86 and Athlon64/Opteron and MIC */ /* We have a full memory barrier in all read-modify-write operations, * but NOT a compiler fence. */ #define _gasneti_atomic32_prologue_rmw(p,f) /*empty*/ #define _gasneti_atomic32_fence_before_rmw(p,f) _gasneti_atomic_cf_before(f) #define _gasneti_atomic32_fence_after_rmw(p,f) _gasneti_atomic_cf_after(f) #define _gasneti_atomic32_fence_after_bool(p,f,v) _gasneti_atomic_cf_after(f) #define _gasneti_atomic64_prologue_rmw(p,f) /*empty*/ #define _gasneti_atomic64_fence_before_rmw(p,f) _gasneti_atomic_cf_before(f) #define _gasneti_atomic64_fence_after_rmw(p,f) _gasneti_atomic_cf_after(f) #define _gasneti_atomic64_fence_after_bool(p,f,v) _gasneti_atomic_cf_after(f) /* The odd-ball is 64-bit read/set on ILP32, for which we have * fully fenced read and set. */ #if PLATFORM_ARCH_32 #define _gasneti_atomic64_prologue_set(p,f) /*empty*/ #define _gasneti_atomic64_fence_before_set(p,f) _gasneti_atomic_cf_before(f) #define _gasneti_atomic64_fence_after_set(p,f) _gasneti_atomic_cf_after(f) #define _gasneti_atomic64_prologue_read(p,f) /*empty*/ #define _gasneti_atomic64_fence_before_read(p,f) _gasneti_atomic_cf_before(f) #define _gasneti_atomic64_fence_after_read(p,f) _gasneti_atomic_cf_after(f) #endif #if PLATFORM_COMPILER_GNU || PLATFORM_COMPILER_INTEL || \ PLATFORM_COMPILER_PATHSCALE || PLATFORM_COMPILER_PGI || \ PLATFORM_COMPILER_OPEN64 || \ PLATFORM_COMPILER_CLANG || \ PLATFORM_COMPILER_NVHPC || \ (PLATFORM_COMPILER_SUN && GASNETI_HAVE_GCC_ASM) #if PLATFORM_COMPILER_SUN_C #pragma error_messages(off, E_ASM_UNUSED_PARAM) #elif PLATFORM_COMPILER_SUN_CXX #pragma error_messages(off, inlasmpnu) #endif #define GASNETI_HAVE_ATOMIC32_T 1 typedef struct { volatile uint32_t gasneti_ctr; } gasneti_atomic32_t; #define gasneti_atomic32_init(v) { (v) } #if !(GASNETI_ATOMIC64_NOINLINE || (PLATFORM_COMPILER_OPEN64 && PLATFORM_ARCH_32)) #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(v) { (v) } #endif #if PLATFORM_COMPILER_PATHSCALE || PLATFORM_COMPILER_OPEN64 /* Pathscale optimizer is buggy and fails to clobber memory output location correctly unless we include an extraneous full memory clobber */ #define GASNETI_ATOMIC_MEM_CLOBBER ,"memory" #else #define GASNETI_ATOMIC_MEM_CLOBBER #endif GASNETI_INLINE(_gasneti_atomic32_swap) uint32_t _gasneti_atomic32_swap(gasneti_atomic32_t *_v, uint32_t _value) { GASNETI_ASM_REGISTER_KEYWORD uint32_t _x = _value; __asm__ __volatile__( GASNETI_X86_LOCK_PREFIX /* 'lock' is implied, but is the fence? */ "xchgl %0, %1" : "=r" (_x) : "m" (_v->gasneti_ctr), "0" (_x) : "cc", "memory" /* instead of listing (v->gasneti_ctr) as an output */ ); return _x; } #define _gasneti_atomic32_swap _gasneti_atomic32_swap #if GASNETI_PGI_ASM_BUG3674 #define _gasneti_atomic32_read(p) (*(uint32_t volatile *)&((p)->gasneti_ctr)) #define _gasneti_atomic32_set(p,v) (*(uint32_t volatile *)&((p)->gasneti_ctr) = (v)) #else #define _gasneti_atomic32_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic32_set(p,v) ((p)->gasneti_ctr = (v)) #endif #if PLATFORM_COMPILER_SUN // Sun compiler warns if any %n fails to appear in the template. // Suppression of the warning via #pragma is only partially effective. // Fortunately, "appearance" in comments is sufficient. #define GASNETI_ASM_USED(n) "# arg %" #n " is used \n\t" #else #define GASNETI_ASM_USED(n) #endif GASNETI_INLINE(_gasneti_atomic32_increment) void _gasneti_atomic32_increment(gasneti_atomic32_t *_v) { __asm__ __volatile__( GASNETI_ASM_USED(1) GASNETI_X86_LOCK_PREFIX "incl %0" : "=m" (_v->gasneti_ctr) : "m" (_v->gasneti_ctr) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); } #define _gasneti_atomic32_increment _gasneti_atomic32_increment GASNETI_INLINE(_gasneti_atomic32_decrement) void _gasneti_atomic32_decrement(gasneti_atomic32_t *_v) { __asm__ __volatile__( GASNETI_ASM_USED(1) GASNETI_X86_LOCK_PREFIX "decl %0" : "=m" (_v->gasneti_ctr) : "m" (_v->gasneti_ctr) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); } #define _gasneti_atomic32_decrement _gasneti_atomic32_decrement GASNETI_INLINE(_gasneti_atomic32_decrement_and_test) int _gasneti_atomic32_decrement_and_test(gasneti_atomic32_t *_v) { #if PLATFORM_COMPILER_SUN unsigned char _retval; #else GASNETI_ASM_REGISTER_KEYWORD unsigned char _retval; #endif __asm__ __volatile__( GASNETI_ASM_USED(2) GASNETI_X86_LOCK_PREFIX "decl %0 \n\t" "sete %1" : "=m" (_v->gasneti_ctr), "=qm" (_retval) : "m" (_v->gasneti_ctr) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); #if GASNETI_PGI_ASM_BUG1754 return _retval & 0xFF; #else return _retval; #endif } #define _gasneti_atomic32_decrement_and_test _gasneti_atomic32_decrement_and_test GASNETI_INLINE(_gasneti_atomic32_compare_and_swap) int _gasneti_atomic32_compare_and_swap(gasneti_atomic32_t *_v, uint32_t _oldval, uint32_t _newval) { #if PLATFORM_COMPILER_SUN unsigned char _retval; #else GASNETI_ASM_REGISTER_KEYWORD unsigned char _retval; #endif GASNETI_ASM_REGISTER_KEYWORD uint32_t _readval; __asm__ __volatile__ ( GASNETI_ASM_USED(4) GASNETI_X86_LOCK_PREFIX "cmpxchgl %3, %1 \n\t" #if GASNETI_PGI_ASM_BUG2294 /* Sensitive to output constraint order */ "sete %2" : "=a" (_readval), "=m" (_v->gasneti_ctr), "=qm" (_retval) #else /* The version that has always worked everywhere else */ "sete %0" : "=qm" (_retval), "=m" (_v->gasneti_ctr), "=a" (_readval) #endif : "r" (_newval), "m" (_v->gasneti_ctr), "a" (_oldval) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); #if GASNETI_PGI_ASM_BUG1754 return _retval & 0xFF; #else return _retval; #endif } #define _gasneti_atomic32_compare_and_swap _gasneti_atomic32_compare_and_swap GASNETI_INLINE(_gasneti_atomic32_fetchadd) uint32_t _gasneti_atomic32_fetchadd(gasneti_atomic32_t *_v, uint32_t _op) { /* CAUTION: Both PathScale and Intel compilers have been seen to be * rather fragile with respect to this asm template (bug 1563). * Change this at your own risk! */ uint32_t _retval = _op; __asm__ __volatile__( GASNETI_ASM_USED(3) GASNETI_X86_LOCK_PREFIX "xaddl %0, %1" : "=&r" (_retval), "=m" (_v->gasneti_ctr) : "0" (_retval), "m" (_v->gasneti_ctr) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); return _retval; } #define _gasneti_atomic32_fetchadd _gasneti_atomic32_fetchadd /* 64-bit differ between x86 and x86-64: */ #if GASNETI_ATOMIC64_NOINLINE // Using SLOW or GENERIC alternative #elif PLATFORM_ARCH_64 #if GASNETI_PGI_ASM_BUG3674 #define _gasneti_atomic64_read(p) (*(uint64_t volatile *)&((p)->gasneti_ctr)) #define _gasneti_atomic64_set(p,v) (*(uint64_t volatile *)&((p)->gasneti_ctr) = (v)) #else #define _gasneti_atomic64_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic64_set(p,v) ((p)->gasneti_ctr = (v)) #endif GASNETI_INLINE(_gasneti_atomic64_compare_and_swap) int _gasneti_atomic64_compare_and_swap(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval) { #if GASNETI_PGI_ASM_BUG2843 && GASNET_NDEBUG #pragma routine opt 2 /* Bug 2843 - pgcc miscompiles this code at -O1, so force -O2 */ #endif GASNETI_ASM_REGISTER_KEYWORD unsigned char _retval; GASNETI_ASM_REGISTER_KEYWORD uint64_t _readval = _oldval; __asm__ __volatile__ ( GASNETI_ASM_USED(4) GASNETI_X86_LOCK_PREFIX "cmpxchgq %3, %1 \n\t" "sete %0" : "=q" (_retval), "=m" (_p->gasneti_ctr), "=a" (_readval) : "r" (_newval), "m" (_p->gasneti_ctr), "a" (_oldval) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); #if GASNETI_PGI_ASM_BUG1754 return _retval & 0xFF; #else return _retval; #endif } #define _gasneti_atomic64_compare_and_swap _gasneti_atomic64_compare_and_swap GASNETI_INLINE(_gasneti_atomic64_swap) uint64_t _gasneti_atomic64_swap(gasneti_atomic64_t *_v, uint64_t _value) { #if GASNETI_PGI_ASM_BUG2843 && GASNET_DEBUG #pragma routine opt 1 /* pgcc miscompiles this code at -O0, so force -O1 */ #endif GASNETI_ASM_REGISTER_KEYWORD uint64_t _retval; __asm__ __volatile__( GASNETI_ASM_USED(2) GASNETI_X86_LOCK_PREFIX /* 'lock' is implied, but is the fence? */ "xchgq %0, %1" : "=r" (_retval), "=m" (_v->gasneti_ctr) : "m" (_v->gasneti_ctr), "0" (_value) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); return _retval; } #define _gasneti_atomic64_swap _gasneti_atomic64_swap GASNETI_INLINE(_gasneti_atomic64_fetchadd) uint64_t _gasneti_atomic64_fetchadd(gasneti_atomic64_t *_v, uint64_t _op) { /* CAUTION: see atomic32_fetchadd for note about PathScale and Intel compilers */ #if GASNETI_PGI_ASM_BUG2843 && GASNET_DEBUG #pragma routine opt 1 /* pgcc miscompiles this code at -O0, so force -O1 */ #endif GASNETI_ASM_REGISTER_KEYWORD uint64_t _retval; __asm__ __volatile__( GASNETI_ASM_USED(2) GASNETI_X86_LOCK_PREFIX "xaddq %0, %1" : "=r" (_retval), "=m" (_v->gasneti_ctr) : "m" (_v->gasneti_ctr), "0" (_op) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); return _retval; } #define _gasneti_atomic64_fetchadd _gasneti_atomic64_fetchadd #elif PLATFORM_COMPILER_OPEN64 /* No known working 64-bit atomics for this compiler on ILP32. See bug 2725. */ #elif GASNETI_USE_X86_EBX && \ !(__APPLE_CC__ && defined(__llvm__)) /* bug 3071 */ /* "Normal" ILP32 case: * * To perform read and set atomically on x86 requires use of the locked * 8-byte c-a-s instruction. This is the only atomic 64-bit operation * available on this architecture. Note that we need the lock prefix * even on a uniprocessor to ensure that we are signal safe. * * See the following #elif/#else clauses for slight variants. */ GASNETI_INLINE(_gasneti_atomic64_compare_and_swap) int _gasneti_atomic64_compare_and_swap(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint32_t _newlo = GASNETI_LOWORD(_newval); GASNETI_ASM_REGISTER_KEYWORD uint32_t _newhi = GASNETI_HIWORD(_newval); __asm__ __volatile__ ( "lock; " "cmpxchg8b %0 \n\t" "sete %b1 " : "=m" (_p->gasneti_ctr), "+&A" (_oldval) : "m" (_p->gasneti_ctr), "b" (_newlo), "c" (_newhi) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); return (uint8_t)_oldval; } #define _gasneti_atomic64_compare_and_swap _gasneti_atomic64_compare_and_swap GASNETI_INLINE(_gasneti_atomic64_swap) uint64_t _gasneti_atomic64_swap(gasneti_atomic64_t *_p, uint64_t _v) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _oldval = _p->gasneti_ctr; GASNETI_ASM_REGISTER_KEYWORD uint32_t _newlo = GASNETI_LOWORD(_v); GASNETI_ASM_REGISTER_KEYWORD uint32_t _newhi = GASNETI_HIWORD(_v); _GASNETI_ATOMIC_CHECKALIGN(gasneti_atomic64_align, _p); __asm__ __volatile__ ( "0: \n\t" "lock; " "cmpxchg8b %0 \n\t" "jnz 0b \n\t" : "=m" (_p->gasneti_ctr), "+&A" (_oldval) : "m" (_p->gasneti_ctr), "b" (_newlo), "c" (_newhi) : "cc", "memory"); return _oldval; } #define _gasneti_atomic64_swap _gasneti_atomic64_swap #define _gasneti_atomic64_set(p,v) ((void)_gasneti_atomic64_swap(p,v)) GASNETI_INLINE(_gasneti_atomic64_read) uint64_t _gasneti_atomic64_read(gasneti_atomic64_t *_p) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _retval; _GASNETI_ATOMIC_CHECKALIGN(gasneti_atomic64_align, _p); __asm__ __volatile__ ( /* Set [a:d] = [b:c], thus preserving b and c */ "movl %%ebx, %%eax \n\t" "movl %%ecx, %%edx \n\t" "lock; " "cmpxchg8b %0 " : "=m" (_p->gasneti_ctr), "=&A" (_retval) : "m" (_p->gasneti_ctr) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); return _retval; } #define _gasneti_atomic64_read _gasneti_atomic64_read GASNETI_INLINE(_gasneti_atomic64_cas_val) /* for 64-bit FETCHADD */ uint64_t _gasneti_atomic64_cas_val(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint32_t _newlo = GASNETI_LOWORD(_newval); GASNETI_ASM_REGISTER_KEYWORD uint32_t _newhi = GASNETI_HIWORD(_newval); __asm__ __volatile__ ( GASNETI_ASM_USED(2) "lock; " "cmpxchg8b %0 " : "=m" (_p->gasneti_ctr), "+&A" (_oldval) : "m" (_p->gasneti_ctr), "b" (_newlo), "c" (_newhi) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); return _oldval; } #define _gasneti_atomic64_cas_val _gasneti_atomic64_cas_val #elif (__APPLE_CC__ && defined(__llvm__)) /* bug 3071 */ /* "Normal" ILP32 case except w/o "m" inputs or outputs to CAS and Set. * Such operands lead to "Ran out of registers during register allocation!" * Instead a "memory" clobber is used. * Read is identical to the Normal case. */ GASNETI_INLINE(_gasneti_atomic64_compare_and_swap) int _gasneti_atomic64_compare_and_swap(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint32_t _newlo = GASNETI_LOWORD(_newval); GASNETI_ASM_REGISTER_KEYWORD uint32_t _newhi = GASNETI_HIWORD(_newval); __asm__ __volatile__ ( "lock; " "cmpxchg8b (%1) \n\t" "sete %b0 " : "+&A" (_oldval) : "r" (&_p->gasneti_ctr), "b" (_newlo), "c" (_newhi) : "cc", "memory"); return (uint8_t)_oldval; } #define _gasneti_atomic64_compare_and_swap _gasneti_atomic64_compare_and_swap GASNETI_INLINE(_gasneti_atomic64_swap) uint64_t _gasneti_atomic64_swap(gasneti_atomic64_t *_p, uint64_t _v) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _oldval = _p->gasneti_ctr; GASNETI_ASM_REGISTER_KEYWORD uint32_t _newlo = GASNETI_LOWORD(_v); GASNETI_ASM_REGISTER_KEYWORD uint32_t _newhi = GASNETI_HIWORD(_v); _GASNETI_ATOMIC_CHECKALIGN(gasneti_atomic64_align, _p); __asm__ __volatile__ ( GASNETI_ASM_USED(2) "0: \n\t" "lock; " "cmpxchg8b (%1) \n\t" "jnz 0b " : "+&A" (_oldval) : "r" (&_p->gasneti_ctr), "b" (_newlo), "c" (_newhi) : "cc", "memory"); return _oldval; } #define _gasneti_atomic64_swap _gasneti_atomic64_swap #define _gasneti_atomic64_set(p,v) ((void)_gasneti_atomic64_swap(p,v)) GASNETI_INLINE(_gasneti_atomic64_read) uint64_t _gasneti_atomic64_read(gasneti_atomic64_t *_p) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _retval; _GASNETI_ATOMIC_CHECKALIGN(gasneti_atomic64_align, _p); __asm__ __volatile__ ( /* Set [a:d] = [b:c], thus preserving b and c */ "movl %%ebx, %%eax \n\t" "movl %%ecx, %%edx \n\t" "lock; " "cmpxchg8b %0 " : "=m" (_p->gasneti_ctr), "=&A" (_retval) : "m" (_p->gasneti_ctr) : "cc" GASNETI_ATOMIC_MEM_CLOBBER); return _retval; } #define _gasneti_atomic64_read _gasneti_atomic64_read GASNETI_INLINE(_gasneti_atomic64_cas_val) /* for 64-bit FETCHADD */ uint64_t _gasneti_atomic64_cas_val(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint32_t _newlo = GASNETI_LOWORD(_newval); GASNETI_ASM_REGISTER_KEYWORD uint32_t _newhi = GASNETI_HIWORD(_newval); __asm__ __volatile__ ( "lock; " "cmpxchg8b (%1) " : "+&A" (_oldval) : "r" (&_p->gasneti_ctr), "b" (_newlo), "c" (_newhi) : "cc", "memory"); return _oldval; } #define _gasneti_atomic64_cas_val _gasneti_atomic64_cas_val #elif !GASNETI_USE_X86_EBX /* Much the same as the "normal" ILP32 case, but w/ save and restore of EBX. * This is achieved by passing the "other" 64-bit value in ECX and a second * register of the compiler's choosing, which is then swapped w/ EBX. * * We also need to take care that the cmpxchg8b intruction won't get a * GOT-relative address argument - since EBX doesn't hold the GOT pointer * at the time it is executed. This is done by loading the address into * an available register (but not EBX) rather than giving it as an "m". * * Alas, if we try to add an "m" output for the target location, gcc thinks * it needs to allocate another register for it. Having none left, it gives * up at this point. So, we need to list "memory" in the clobbers instead. */ GASNETI_INLINE(_gasneti_atomic64_compare_and_swap) int _gasneti_atomic64_compare_and_swap(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint32_t _newlo = GASNETI_LOWORD(_newval); GASNETI_ASM_REGISTER_KEYWORD uint32_t _newhi = GASNETI_HIWORD(_newval); __asm__ __volatile__ ( "xchgl %1, %%ebx \n\t" "lock; " "cmpxchg8b (%3) \n\t" "sete %b0 \n\t" "movl %1, %%ebx " : "+&A" (_oldval), "+&r" (_newlo) : "c" (_newhi), "DS" (&_p->gasneti_ctr) /* "DS" = EDI or ESI, but not EBX */ : "cc", "memory"); return (uint8_t)_oldval; } #define _gasneti_atomic64_compare_and_swap _gasneti_atomic64_compare_and_swap GASNETI_INLINE(_gasneti_atomic64_swap) uint64_t _gasneti_atomic64_swap(gasneti_atomic64_t *_p, uint64_t _v) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _oldval = _p->gasneti_ctr; GASNETI_ASM_REGISTER_KEYWORD uint32_t _newlo = GASNETI_LOWORD(_v); GASNETI_ASM_REGISTER_KEYWORD uint32_t _newhi = GASNETI_HIWORD(_v); _GASNETI_ATOMIC_CHECKALIGN(gasneti_atomic64_align, _p); __asm__ __volatile__ ( "xchgl %1, %%ebx \n\t" "0: \n\t" "lock; " "cmpxchg8b (%3) \n\t" "jnz 0b \n\t" "movl %1, %%ebx " : "+&A" (_oldval), "+&r" (_newlo) : "c" (_newhi), "DS" (&_p->gasneti_ctr) /* "DS" = EDI or ESI, but not EBX */ : "cc", "memory"); return _oldval; } #define _gasneti_atomic64_swap _gasneti_atomic64_swap #define _gasneti_atomic64_set(p,v) ((void)_gasneti_atomic64_swap(p,v)) GASNETI_INLINE(_gasneti_atomic64_read) uint64_t _gasneti_atomic64_read(gasneti_atomic64_t *_p) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _retval; _GASNETI_ATOMIC_CHECKALIGN(gasneti_atomic64_align, _p); __asm__ __volatile__ ( /* Set [a:d] = [b:c], thus preserving b and c */ "movl %%ebx, %%eax \n\t" "movl %%ecx, %%edx \n\t" "lock; " "cmpxchg8b (%2) " : "=m" (_p->gasneti_ctr), "=&A" (_retval) : "r" (&_p->gasneti_ctr) : "cc"); return _retval; } #define _gasneti_atomic64_read _gasneti_atomic64_read GASNETI_INLINE(_gasneti_atomic64_cas_val) /* for 64-bit FETCHADD */ uint64_t _gasneti_atomic64_cas_val(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint32_t _newlo = GASNETI_LOWORD(_newval); GASNETI_ASM_REGISTER_KEYWORD uint32_t _newhi = GASNETI_HIWORD(_newval); __asm__ __volatile__ ( "xchgl %1, %%ebx \n\t" "lock; " "cmpxchg8b (%3) \n\t" "movl %1, %%ebx " : "+&A" (_oldval), "+&r" (_newlo) : "c" (_newhi), "DS" (&_p->gasneti_ctr) /* "DS" = EDI or ESI, but not EBX */ : "cc", "memory"); return _oldval; } #define _gasneti_atomic64_cas_val _gasneti_atomic64_cas_val #else #error "unreachable case in gasneti_asm_bits.h" #endif /* Optionally build a 128-bit atomic type using 64-bit types for all args */ #if GASNETI_HAVE_X86_CMPXCHG16B && !GASNETI_ATOMIC64_NOINLINE #define GASNETI_HAVE_ATOMIC128_T 16 /* Encodes aligment */ typedef struct { volatile uint64_t _lo, _hi; } gasneti_atomic128_t; #define gasneti_atomic128_init(hi,lo) {(lo),(hi)} GASNETI_INLINE(gasneti_atomic128_compare_and_swap) int gasneti_atomic128_compare_and_swap(gasneti_atomic128_t *_p, uint64_t _oldhi, uint64_t _oldlo, uint64_t _newhi, uint64_t _newlo, const int _flags) { GASNETI_ASM_REGISTER_KEYWORD unsigned char _retval; _GASNETI_ATOMIC_CHECKALIGN(16, _p); /* cmpxchg16b requires 16-byte alignment */ __asm__ __volatile__ ( "lock; " "cmpxchg16b %1 \n\t" "sete %0 " : "=q" (_retval), "=m" (*_p), "+&a" (_oldlo), "+&d" (_oldhi) : "b" (_newlo), "c" (_newhi) : "cc", "memory"); #if GASNETI_PGI_ASM_BUG1754 return _retval & 0xFF; #else return _retval; #endif } #define gasneti_atomic128_compare_and_swap gasneti_atomic128_compare_and_swap GASNETI_INLINE(gasneti_atomic128_set) void gasneti_atomic128_set(gasneti_atomic128_t *_p, uint64_t _newhi, uint64_t _newlo, const int _flags) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _oldlo = _p->_lo; GASNETI_ASM_REGISTER_KEYWORD uint64_t _oldhi = _p->_hi; _GASNETI_ATOMIC_CHECKALIGN(16, _p); /* cmpxchg16b requires 16-byte alignment */ __asm__ __volatile__ ( "0: \n\t" "lock; " "cmpxchg16b %0 \n\t" "jnz 0b " : "=m" (*_p), "+&a" (_oldlo), "+&d" (_oldhi) : "b" (_newlo), "c" (_newhi) : "cc", "memory"); } #define gasneti_atomic128_set gasneti_atomic128_set GASNETI_INLINE(gasneti_atomic128_read) void gasneti_atomic128_read(uint64_t *_outhi, uint64_t *_outlo, gasneti_atomic128_t *_p, const int _flags) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _retlo, _rethi; _GASNETI_ATOMIC_CHECKALIGN(16, _p); /* cmpxchg16b requires 16-byte alignment */ __asm__ __volatile__ ( "movq %%rbx, %1 \n\t" "movq %%rcx, %2 \n\t" "lock; " "cmpxchg16b %0 " : "+m" (*_p), "=&a" (_retlo), "=&d" (_rethi) : /* no inputs */ : "cc", "memory"); *_outlo = _retlo; *_outhi = _rethi; } #define gasneti_atomic128_read gasneti_atomic128_read #endif /* GASNETI_HAVE_X86_CMPXCHG16B */ #if PLATFORM_COMPILER_SUN_C #pragma error_messages(default, E_ASM_UNUSED_PARAM) #elif PLATFORM_COMPILER_SUN_CXX #pragma error_messages(default, inlasmpnu) #endif #elif PLATFORM_COMPILER_SUN /* First, some macros to hide the x86 vs. x86-64 ABI differences */ #if PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_MIC #define _gasneti_atomic_addr "(%rdi)" #define _gasneti_atomic_load_arg0 "" /* arg0 in rdi */ #define _gasneti_atomic_load_arg1 "movq %rsi, %rax \n\t" #define _gasneti_atomic_load_arg2 "" /* arg2 in rdx */ #else #define _gasneti_atomic_addr "(%ecx)" #define _gasneti_atomic_load_arg0 "movl 8(%ebp), %ecx \n\t" #define _gasneti_atomic_load_arg1 "movl 12(%ebp), %eax \n\t" #define _gasneti_atomic_load_arg2 "movl 16(%ebp), %edx \n\t" #endif #define GASNETI_HAVE_ATOMIC32_T 1 typedef struct { volatile uint32_t gasneti_ctr; } gasneti_atomic32_t; #define gasneti_atomic32_init(v) { (v) } #define _gasneti_atomic32_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic32_set(p,v) ((p)->gasneti_ctr = (v)) #define GASNETI_ATOMIC32_INCREMENT_BODY \ GASNETI_ASM_SPECIAL( \ _gasneti_atomic_load_arg0 \ GASNETI_X86_LOCK_PREFIX \ "incl " _gasneti_atomic_addr ) #define GASNETI_ATOMIC32_DECREMENT_BODY \ GASNETI_ASM_SPECIAL( \ _gasneti_atomic_load_arg0 \ GASNETI_X86_LOCK_PREFIX \ "decl " _gasneti_atomic_addr ) #define GASNETI_ATOMIC32_DECREMENT_AND_TEST_BODY \ GASNETI_ASM_SPECIAL( \ _gasneti_atomic_load_arg0 \ GASNETI_X86_LOCK_PREFIX \ "decl " _gasneti_atomic_addr "\n\t" \ "sete %cl \n\t" \ "movzbl %cl, %eax" ) #define GASNETI_ATOMIC32_COMPARE_AND_SWAP_BODY \ GASNETI_ASM_SPECIAL( \ _gasneti_atomic_load_arg0 \ _gasneti_atomic_load_arg1 \ _gasneti_atomic_load_arg2 \ GASNETI_X86_LOCK_PREFIX \ "cmpxchgl %edx, " _gasneti_atomic_addr "\n\t" \ "sete %cl \n\t" \ "movzbl %cl, %eax" ) #define GASNETI_ATOMIC32_SWAP_BODY \ GASNETI_ASM_SPECIAL( \ _gasneti_atomic_load_arg0 \ _gasneti_atomic_load_arg1 \ GASNETI_X86_LOCK_PREFIX \ "xchgl %eax, " _gasneti_atomic_addr ) /* Fetch-add version is faster for calls that ignore the result and * for subtraction of constants. In both cases because the "extra" * work is done in C code that the optimizer can discard. */ #define GASNETI_ATOMIC32_FETCHADD_BODY \ GASNETI_ASM_SPECIAL( \ _gasneti_atomic_load_arg0 \ _gasneti_atomic_load_arg1 \ GASNETI_X86_LOCK_PREFIX \ "xadd %eax, " _gasneti_atomic_addr ) #define GASNETI_ATOMIC32_SPECIALS \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic32_increment, \ GASNETI_ATOMIC32_INCREMENT_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic32_decrement, \ GASNETI_ATOMIC32_DECREMENT_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic32_decrement_and_test, \ GASNETI_ATOMIC32_DECREMENT_AND_TEST_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic32_compare_and_swap, \ GASNETI_ATOMIC32_COMPARE_AND_SWAP_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic32_swap, \ GASNETI_ATOMIC32_SWAP_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic32_fetchadd, \ GASNETI_ATOMIC32_FETCHADD_BODY) #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(v) { (v) } /* 64-bit differ between x86 and x86-64: */ #if PLATFORM_ARCH_X86_64 || PLATFORM_ARCH_MIC /* Athlon64/Opteron */ #define _gasneti_atomic64_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic64_set(p,v) ((p)->gasneti_ctr = (v)) #define GASNETI_ATOMIC64_COMPARE_AND_SWAP_BODY \ GASNETI_ASM_SPECIAL( \ _gasneti_atomic_load_arg0 \ _gasneti_atomic_load_arg1 \ _gasneti_atomic_load_arg2 \ GASNETI_X86_LOCK_PREFIX \ "cmpxchgq %rdx, " _gasneti_atomic_addr "\n\t" \ "sete %cl \n\t" \ "movzbl %cl, %eax" ) #define GASNETI_ATOMIC64_SWAP_BODY \ GASNETI_ASM_SPECIAL( \ _gasneti_atomic_load_arg0 \ _gasneti_atomic_load_arg1 \ GASNETI_X86_LOCK_PREFIX \ "xchgq %rax, " _gasneti_atomic_addr ) #define GASNETI_ATOMIC64_FETCHADD_BODY \ GASNETI_ASM_SPECIAL( \ _gasneti_atomic_load_arg0 \ _gasneti_atomic_load_arg1 \ GASNETI_X86_LOCK_PREFIX \ "xaddq %rax, " _gasneti_atomic_addr ) #define GASNETI_ATOMIC64_SPECIALS \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_compare_and_swap, \ GASNETI_ATOMIC64_COMPARE_AND_SWAP_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_swap, \ GASNETI_ATOMIC64_SWAP_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_fetchadd, \ GASNETI_ATOMIC64_FETCHADD_BODY) #else /* x86 */ #define GASNETI_ATOMIC64_READ_BODY \ GASNETI_ASM_SPECIAL( \ "pushl %edi \n\t" \ "movl 8(%ebp), %edi \n\t" \ "movl %ebx, %eax \n\t" \ "movl %ecx, %edx \n\t" \ GASNETI_X86_LOCK_PREFIX \ "cmpxchg8b (%edi) \n\t" \ "popl %edi" ) #define GASNETI_ATOMIC64_SET_BODY \ GASNETI_ASM_SPECIAL( \ "pushl %edi \n\t" \ "movl 8(%ebp), %edi \n\t" \ "pushl %ebx \n\t" \ "movl 0(%edi), %eax \n\t" \ "movl 4(%edi), %edx \n\t" \ "movl 12(%ebp), %ebx \n\t" \ "movl 16(%ebp), %ecx \n\t" \ "1: \n\t" \ GASNETI_X86_LOCK_PREFIX \ "cmpxchg8b (%edi) \n\t" \ "jnz 1b \n\t" \ "popl %ebx \n\t" \ "popl %edi" ) #define GASNETI_ATOMIC64_COMPARE_AND_SWAP_BODY \ GASNETI_ASM_SPECIAL( \ "pushl %edi \n\t" \ "movl 8(%ebp), %edi \n\t" \ "pushl %ebx \n\t" \ "movl 12(%ebp), %eax \n\t" \ "movl 16(%ebp), %edx \n\t" \ "movl 20(%ebp), %ebx \n\t" \ "movl 24(%ebp), %ecx \n\t" \ GASNETI_X86_LOCK_PREFIX \ "cmpxchg8b (%edi) \n\t" \ "popl %ebx \n\t" \ "sete %cl \n\t" \ "popl %edi \n\t" \ "movzbl %cl, %eax" ) /* Yes, really: */ #define GASNETI_ATOMIC64_SWAP_BODY GASNETI_ATOMIC64_SET_BODY #define GASNETI_ATOMIC64_FETCHADD_BODY \ GASNETI_ASM_SPECIAL( \ "pushl %edi \n\t" \ "movl 8(%ebp), %edi \n\t" \ "pushl %ebx \n\t" \ "movl 0(%edi), %eax \n\t" \ "pushl %ebp \n\t" \ "movl 4(%edi), %edx \n\t" \ "pushl %esi \n\t" \ "movl 12(%ebp), %esi \n\t" \ "movl 16(%ebp), %ebp \n\t" \ "1: \n\t" \ "movl %eax, %ebx \n\t" \ "movl %edx, %ecx \n\t" \ "addl %esi, %ebx \n\t" \ "adcl %ebp, %ecx \n\t" \ GASNETI_X86_LOCK_PREFIX \ "cmpxchg8b (%edi) \n\t" \ "jnz 1b \n\t" \ "popl %esi \n\t" \ "popl %ebp \n\t" \ "popl %ebx \n\t" \ "popl %edi" ) #define GASNETI_ATOMIC64_SPECIALS \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_read, \ GASNETI_ATOMIC64_READ_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_set, \ GASNETI_ATOMIC64_SET_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_compare_and_swap, \ GASNETI_ATOMIC64_COMPARE_AND_SWAP_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_swap, \ GASNETI_ATOMIC64_SWAP_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_fetchadd, \ GASNETI_ATOMIC64_FETCHADD_BODY) #endif #elif (PLATFORM_ARCH_X86_64 && PLATFORM_COMPILER_CRAY) #define GASNETI_HAVE_ATOMIC32_T 1 typedef struct { volatile uint32_t gasneti_ctr; } gasneti_atomic32_t; #define gasneti_atomic32_init(v) { (v) } #define _gasneti_atomic32_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic32_set(p,v) ((p)->gasneti_ctr = (v)) #define gasneti_atomic32_fetchadd(p,op,f) \ __sync_fetch_and_add(&((p)->gasneti_ctr), (uint32_t)(op)) #define gasneti_atomic32_decrement_and_test(p,f) (1==gasneti_atomic32_fetchadd((p),-1,(f))) #define gasneti_atomic32_compare_and_swap(p,oval,nval,f) \ (__sync_val_compare_and_swap(&((p)->gasneti_ctr), (oval), (nval)) == (oval)) GASNETI_INLINE(gasneti_atomic32_swap) uint32_t gasneti_atomic32_swap(gasneti_atomic32_t *_p, uint32_t _nval, const int _flags) { GASNETI_ASM_REGISTER_KEYWORD volatile uint32_t *_p32 = &(_p->gasneti_ctr); GASNETI_ASM_REGISTER_KEYWORD uint32_t _oval, _tmp = *_p32; do { _oval = _tmp; } while (_oval != (_tmp = __sync_val_compare_and_swap(_p32,_oval,_nval))); return _tmp; } #define gasneti_atomic32_swap gasneti_atomic32_swap #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(v) { (v) } #define _gasneti_atomic64_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic64_set(p,v) ((p)->gasneti_ctr = (v)) #define gasneti_atomic64_fetchadd(p,op,f)\ __sync_fetch_and_add(&((p)->gasneti_ctr), (uint64_t)(op)) #define gasneti_atomic64_decrement_and_test(p,f) (1==gasneti_atomic64_fetchadd((p),-1,(f))) #define gasneti_atomic64_compare_and_swap(p,oval,nval,f) \ (__sync_val_compare_and_swap(&((p)->gasneti_ctr), (oval), (nval)) == (oval)) GASNETI_INLINE(gasneti_atomic64_swap) uint64_t gasneti_atomic64_swap(gasneti_atomic64_t *_p, uint64_t _nval, const int _flags) { GASNETI_ASM_REGISTER_KEYWORD volatile uint64_t *_p64 = &(_p->gasneti_ctr); GASNETI_ASM_REGISTER_KEYWORD uint64_t _oval, _tmp = *_p64; do { _oval = _tmp; } while (_oval != (_tmp = __sync_val_compare_and_swap(_p64,_oval,_nval))); return _tmp; } #define gasneti_atomic64_swap gasneti_atomic64_swap #else #error unrecognized x86 compiler - need to implement GASNet atomics (or #define GASNETI_USE_GENERIC_ATOMICOPS) #endif /* Optionally construct 64-bit FETCHADD from a CAS which returns the old value. We do it this way because x86 has so few registers that it is VERY hard to build this operation purely from inline asm. The alternative based on the boolean CAS is a poor choice because it must either perform cmpxchg8b TWICE per iteration (the extra is atomic64_read), or use only non-atomic 64-bit reads. */ #if defined(_gasneti_atomic64_cas_val) GASNETI_INLINE(_gasneti_atomic64_fetchadd) uint64_t _gasneti_atomic64_fetchadd(gasneti_atomic64_t *_p, const uint64_t _op) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _oval; GASNETI_ASM_REGISTER_KEYWORD uint64_t _tmp = _p->gasneti_ctr; do { GASNETI_ASM_REGISTER_KEYWORD uint64_t _sum = _op + (_oval = _tmp); _tmp = _gasneti_atomic64_cas_val(_p,_oval,_sum); } while (_oval != _tmp); return _tmp; } #define _gasneti_atomic64_fetchadd _gasneti_atomic64_fetchadd #endif /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_SPARC #if defined(__sparcv9) || defined(__sparcv9cpu) || \ defined(__sparc_v9__) || defined(GASNETI_ARCH_ULTRASPARC) /* SPARC v9 ISA */ #if PLATFORM_COMPILER_GNU #define GASNETI_HAVE_ATOMIC32_T 1 typedef struct { volatile uint32_t gasneti_ctr; } gasneti_atomic32_t; #define gasneti_atomic32_init(v) { (v) } #define _gasneti_atomic32_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic32_set(p,v) ((p)->gasneti_ctr = (v)) GASNETI_INLINE(_gasneti_atomic32_swap) uint32_t _gasneti_atomic32_swap(gasneti_atomic32_t *_v, uint32_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint32_t volatile * _addr = (uint32_t volatile *)(&_v->gasneti_ctr); GASNETI_ASM_REGISTER_KEYWORD uint32_t _val = _newval; __asm__ __volatile__ ( "swap %1, %0" : "+r" (_val), "=m" (*_addr) ); return _val; } #define _gasneti_atomic32_swap _gasneti_atomic32_swap /* Default impls of inc, dec, dec-and-test, add and sub */ GASNETI_INLINE(_gasneti_atomic32_fetchadd) uint32_t _gasneti_atomic32_fetchadd(gasneti_atomic32_t *_v, uint32_t _op) { /* SPARC v9 architecture manual, p.333 * This function requires the cas instruction in Sparc V9, and therefore gcc -mcpu=ultrasparc * The manual says (sec A.9) no memory fences in CAS (in conflict w/ JMM web page). */ GASNETI_ASM_REGISTER_KEYWORD uint32_t volatile * _addr = (uint32_t volatile *)(&_v->gasneti_ctr); GASNETI_ASM_REGISTER_KEYWORD uint32_t _oldval; GASNETI_ASM_REGISTER_KEYWORD uint32_t _newval; __asm__ __volatile__ ( "ld [%4],%0 \n\t" /* oldval = *addr; */ "0: \t" "add %0,%3,%1 \n\t" /* newval = oldval + op; */ "cas [%4],%0,%1 \n\t" /* if (*addr == oldval) SWAP(*addr,newval); else newval = *addr; */ "cmp %0, %1 \n\t" /* check if newval == oldval (swap succeeded) */ "bne,a,pn %%icc, 0b \n\t" /* otherwise, retry (,pn == predict not taken; ,a == annul) */ " mov %1, %0 " /* oldval = newval; (branch delay slot, annulled if not taken) */ : "=&r"(_oldval), "=&r"(_newval), "=m"(_v->gasneti_ctr) : "rI"(_op), "r"(_addr), "m"(_v->gasneti_ctr) ); return _oldval; } #define _gasneti_atomic32_fetchadd _gasneti_atomic32_fetchadd GASNETI_INLINE(_gasneti_atomic32_compare_and_swap) int _gasneti_atomic32_compare_and_swap(gasneti_atomic32_t *_v, uint32_t _oldval, uint32_t _newval) { GASNETI_ASM_REGISTER_KEYWORD volatile uint32_t * _addr = (volatile uint32_t *)&(_v->gasneti_ctr); __asm__ __volatile__ ( "cas [%3],%2,%0" /* if (*addr == oldval) SWAP(*addr,newval); else newval = *addr; */ : "+r"(_newval), "=m"(_v->gasneti_ctr) : "r"(_oldval), "r"(_addr), "m"(_v->gasneti_ctr) ); return (int)(_newval == _oldval); } #define _gasneti_atomic32_compare_and_swap _gasneti_atomic32_compare_and_swap #if GASNETI_ATOMIC64_NOINLINE // Using SLOW or GENERIC alternative #elif PLATFORM_ARCH_64 #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(v) { (v) } #define _gasneti_atomic64_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic64_set(p,v) do { (p)->gasneti_ctr = (v); } while(0) GASNETI_INLINE(_gasneti_atomic64_compare_and_swap) int _gasneti_atomic64_compare_and_swap(gasneti_atomic64_t *_v, uint64_t _oldval, uint64_t _newval) { GASNETI_ASM_REGISTER_KEYWORD volatile uint64_t * _addr = (volatile uint64_t *)&(_v->gasneti_ctr); __asm__ __volatile__ ( "casx [%3],%2,%0" /* if (*addr == oldval) SWAP(*addr,newval); else newval = *addr; */ : "+r"(_newval), "=m"(_v->gasneti_ctr) : "r"(_oldval), "r"(_addr), "m"(_v->gasneti_ctr) ); return (int)(_newval == _oldval); } #define _gasneti_atomic64_compare_and_swap _gasneti_atomic64_compare_and_swap GASNETI_INLINE(_gasneti_atomic64_fetchadd) uint64_t _gasneti_atomic64_fetchadd(gasneti_atomic64_t *_v, uint64_t _op) { GASNETI_ASM_REGISTER_KEYWORD int64_t volatile * _addr = (int64_t volatile *)(&_v->gasneti_ctr); GASNETI_ASM_REGISTER_KEYWORD uint64_t _oldval; GASNETI_ASM_REGISTER_KEYWORD uint64_t _newval; __asm__ __volatile__ ( "ldx [%4],%0 \n\t" /* oldval = *addr; */ "0:\t" "add %0,%3,%1 \n\t" /* newval = oldval + op; */ "casx [%4],%0,%1 \n\t" /* if (*addr == oldval) SWAP(*addr,newval); else newval = *addr; */ "cmp %0, %1 \n\t" /* check if newval == oldval (swap succeeded) */ "bne,a,pn %%xcc, 0b \n\t" /* otherwise, retry (,pn == predict not taken; ,a == annul) */ " mov %1, %0 " /* oldval = newval; (branch delay slot, annulled if not taken) */ : "=&r"(_oldval), "=&r"(_newval), "=m"(_v->gasneti_ctr) : "rI"(_op), "r"(_addr), "m"(_v->gasneti_ctr) ); return _oldval; } #define _gasneti_atomic64_fetchadd _gasneti_atomic64_fetchadd GASNETI_INLINE(_gasneti_atomic64_swap) uint64_t _gasneti_atomic64_swap(gasneti_atomic64_t *_v, int64_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint64_t volatile * _addr = (uint64_t volatile *)(&_v->gasneti_ctr); GASNETI_ASM_REGISTER_KEYWORD uint64_t _oldval; GASNETI_ASM_REGISTER_KEYWORD uint64_t _tmp; __asm__ __volatile__ ( "mov %3, %1 \n\t" /* tmp = newval; */ "0:\t" "ldx [%4],%0 \n\t" /* oldval = *addr; */ "casx [%4],%0,%1 \n\t" /* if (*addr == oldval) SWAP(*addr,tmp); else tmp = *addr; */ "cmp %0, %1 \n\t" /* check if tmp == oldval (swap succeeded) */ "bne,a,pn %%xcc, 0b \n\t" /* otherwise, retry (,pn == predict not taken; ,a == annul) */ " mov %3, %1 " /* tmp = newval; (branch delay slot, annulled if not taken) */ : "=&r"(_oldval), "=&r"(_tmp), "=m"(_v->gasneti_ctr) : "r"(_newval), "r"(_addr), "m"(_v->gasneti_ctr) ); return _oldval; } #define _gasneti_atomic64_swap _gasneti_atomic64_swap #elif GASNETI_HAVE_SPARC32_64BIT_ASM /* compiler supports "U" and "h" constraints */ /* ILP32 on a 64-bit CPU. */ /* Note that the ldd/std instructions *are* atomic, even though they use 2 registers. * We wouldn't need asm here if we could be sure the compiler always used ldd/std. */ #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(v) { (v) } GASNETI_INLINE(_gasneti_atomic64_set) void _gasneti_atomic64_set(gasneti_atomic64_t *_p, uint64_t _v) { #if PLATFORM_OS_SOLARIS // Bug 3797 __asm__ __volatile__ ( "std %1, %0" : "=m"(_p->gasneti_ctr) : "U!f"(_v) ); #else __asm__ __volatile__ ( "std %1, %0" : "=m"(_p->gasneti_ctr) : "U"(_v) ); #endif } #define _gasneti_atomic64_set _gasneti_atomic64_set GASNETI_INLINE(_gasneti_atomic64_read) uint64_t _gasneti_atomic64_read(gasneti_atomic64_t *_p) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _retval; #if PLATFORM_OS_SOLARIS // Bug 3797 __asm__ __volatile__ ( "ldd %1, %0" : "=U!f"(_retval) : "m"(_p->gasneti_ctr) ); #else __asm__ __volatile__ ( "ldd %1, %0" : "=U"(_retval) : "m"(_p->gasneti_ctr) ); #endif return _retval; } #define _gasneti_atomic64_read _gasneti_atomic64_read GASNETI_INLINE(_gasneti_atomic64_compare_and_swap) int _gasneti_atomic64_compare_and_swap(gasneti_atomic64_t *_v, uint64_t _oldval, uint64_t _newval) { /* TODO: Even though {new,old}val are inputs we clear their upper 32-bits. * That *probably* should never matter, but we could use another tmp. */ GASNETI_ASM_REGISTER_KEYWORD volatile uint64_t * _addr = (volatile uint64_t *)&(_v->gasneti_ctr); GASNETI_ASM_REGISTER_KEYWORD int _retval, _tmp; __asm__ __volatile__ ( "sllx %H5,32,%0 \n\t" /* retval = HI(new) << 32 */ "sllx %H6,32,%1 \n\t" /* tmp = HI(old) << 32 */ "srl %L5,0,%L5 \n\t" /* zap any sign-extension of newval */ "srl %L6,0,%L6 \n\t" /* zap any sign-extension of oldval */ "or %0,%L5,%0 \n\t" /* retval |= LO(new) */ "or %1,%L6,%1 \n\t" /* tmp |= LO(old) */ "casx [%3],%1,%0 \n\t" /* atomic CAS, with read value -> retval */ "xor %1,%0,%1 \n\t" /* tmp = 0 IFF retval == tmp */ "clr %0 \n\t" /* retval = 0 */ "movrz %1,1,%0" /* retval = 1 IFF tmp == 0 */ : "=&h"(_retval), "=&h"(_tmp), "=m"(_v->gasneti_ctr) /* 'h' = 64bit 'o' or 'g' reg */ : "r"(_addr), "m"(_v->gasneti_ctr), "r"(_newval), "r"(_oldval) ); return _retval; } #define _gasneti_atomic64_compare_and_swap _gasneti_atomic64_compare_and_swap GASNETI_INLINE(_gasneti_atomic64_swap) uint64_t _gasneti_atomic64_swap(gasneti_atomic64_t *_v, uint64_t _newval) { /* TODO: as in CAS, above, consider preserving upper 32-bits of newval */ GASNETI_ASM_REGISTER_KEYWORD uint64_t volatile * _addr = (uint64_t volatile *)(&_v->gasneti_ctr); GASNETI_ASM_REGISTER_KEYWORD uint64_t _oldval; /* register pair for ILP32 ABI */ GASNETI_ASM_REGISTER_KEYWORD int _tmp1, _tmp2, _tmp3; __asm__ __volatile__ ( "sllx %H5,32,%1 \n\t" /* tmp1 = HI(newval) << 32 */ "srl %L5,0,%L5 \n\t" /* zap any sign-extension of newval */ "or %1,%L5,%1 \n\t" /* tmp1 |= LO(newval) */ "mov %1,%3 \n\t" /* tmp3 = tmp1 */ "0:\t" "ldx [%6],%2 \n\t" /* tmp2 = *addr; */ "casx [%6],%2,%1 \n\t" /* if (*addr == tmp2) SWAP(*addr,tmp1); else tmp1 = *addr; */ "cmp %2,%1 \n\t" /* check if tmp1 == tmp2 (swap succeeded) */ "bne,a,pn %%xcc, 0b \n\t" /* otherwise, retry (,pn == predict not taken; ,a == annul) */ " mov %3,%1 \n\t" /* tmp1 = tmp3; (branch delay slot, annulled if not taken) */ "srlx %1,32,%H0 \n\t" /* HI(oldval) = tmp1 >> 32 */ "srl %1,0,%L0 " /* LO(oldval) = (uint32_t)tmp1 */ : "=&r"(_oldval), "=&h"(_tmp1), "=&h"(_tmp2), "=&h"(_tmp3), "=m"(_v->gasneti_ctr) : "r"(_newval), "r"(_addr), "m"(_v->gasneti_ctr) ); return _oldval; } #define _gasneti_atomic64_swap _gasneti_atomic64_swap GASNETI_INLINE(_gasneti_atomic64_fetchadd) uint64_t _gasneti_atomic64_fetchadd(gasneti_atomic64_t *_v, uint64_t _op) { /* TODO: as in CAS, above, consider preserving upper 32-bits of op */ GASNETI_ASM_REGISTER_KEYWORD uint64_t volatile * _addr = (uint64_t volatile *)(&_v->gasneti_ctr); GASNETI_ASM_REGISTER_KEYWORD uint64_t _oldval; /* register pair for ILP32 ABI */ GASNETI_ASM_REGISTER_KEYWORD int _tmp1, _tmp2, _tmp3; __asm__ __volatile__ ( "sllx %H5,32,%1 \n\t" /* tmp1 = HI(op) << 32 */ "srl %L5,0,%L5 \n\t" /* zap any sign-extension of op */ "or %1,%L5,%1 \n\t" /* tmp1 |= LO(op) */ "ldx [%6],%2 \n\t" /* tmp2 = *addr; */ "0:\t" "add %1,%2,%3 \n\t" /* tmp3 = tmp1 + tmp2 */ "casx [%6],%2,%3 \n\t" /* if (*addr == tmp2) SWAP(*addr,tmp3); else tmp3 = *addr; */ "cmp %2,%3 \n\t" /* check if tmp2 == tmp3 (swap succeeded) */ "bne,a,pn %%xcc, 0b \n\t" /* otherwise, retry (,pn == predict not taken; ,a == annul) */ " mov %3,%2 \n\t" /* tmp2 = tmp3; (branch delay slot, annulled if not taken) */ "srlx %3,32,%H0 \n\t" /* HI(oldval) = tmp3 >> 32 */ "srl %3,0,%L0 " /* LO(oldval) = (uint32_t)tmp3 */ : "=&r"(_oldval), "=&h"(_tmp1), "=&h"(_tmp2), "=&h"(_tmp3), "=m"(_v->gasneti_ctr) : "r"(_op), "r"(_addr), "m"(_v->gasneti_ctr) ); return _oldval; } #define _gasneti_atomic64_fetchadd _gasneti_atomic64_fetchadd #else /* use generics, since fixed-register asm never did work right */ #endif /* Using default fences, as our asm includes none */ #elif PLATFORM_COMPILER_SUN #if 0 /* Sun compiler gets an assertion failure upon seeing movrz */ #define GASNETI_SPARC_MOVRZ_g1_1_i0 "movrz %g1, 1, %i0" #else #define GASNETI_SPARC_MOVRZ_g1_1_i0 ".long 0xb1786401" #endif #define GASNETI_HAVE_ATOMIC32_T 1 typedef struct { volatile uint32_t gasneti_ctr; } gasneti_atomic32_t; #define gasneti_atomic32_init(v) { (v) } #define _gasneti_atomic32_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic32_set(p,v) ((p)->gasneti_ctr = (v)) /* Default impls of inc, dec, dec-and-test, add and sub */ #define GASNETI_ATOMIC32_COMPARE_AND_SWAP_BODY \ GASNETI_ASM_SPECIAL( \ /* if (*addr == oldval) SWAP(*addr,newval); else newval = *addr; */ \ "cas [%i0], %i1, %i2 \n\t" \ /* retval = (oldval == newval) ? 1 : 0 */ \ "xor %i2, %i1, %g1 \n\t" /* g1 = 0 IFF old==new */ \ "cmp %g0, %g1 \n\t" /* Set/clear carry bit */ \ "subx %g0, -1, %i0 " ) /* Subtract w/ carry */ #define GASNETI_ATOMIC32_SWAP_BODY \ GASNETI_ASM_SPECIAL( "swap [%i0], %i1 \n\t" \ "mov %i1, %i0" ) #define GASNETI_ATOMIC32_FETCHADD_BODY /* see gcc asm, above, for more detail */ \ GASNETI_ASM_SPECIAL( \ /* oldval = *addr; */ \ "ld [%i0], %g1 \n" \ /* while (!cas(addr, oldval, oldval + op)) { oldval = *addr; } */ \ "0: \n\t" \ "add %g1, %i1, %i5 \n\t" \ "cas [%i0], %g1, %i5 \n\t" \ "cmp %g1, %i5 \n\t" \ "bne,a,pn %icc, 0b \n\t" \ " mov %i5, %g1 \n\t" /* annulled delay slot */ \ /* Retval = oldval */ \ "mov %i5, %i0" ) #define GASNETI_ATOMIC32_SPECIALS \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic32_compare_and_swap, \ GASNETI_ATOMIC32_COMPARE_AND_SWAP_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic32_swap, \ GASNETI_ATOMIC32_SWAP_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic32_fetchadd, \ GASNETI_ATOMIC32_FETCHADD_BODY) #if GASNETI_ATOMIC64_NOINLINE // Using SLOW or GENERIC alternative #elif PLATFORM_ARCH_64 #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(v) { (v) } #define _gasneti_atomic64_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic64_set(p,v) ((p)->gasneti_ctr = (v)) #define GASNETI_ATOMIC64_COMPARE_AND_SWAP_BODY \ GASNETI_ASM_SPECIAL( \ /* if (*addr == oldval) SWAP(*addr,newval); else newval = *addr; */ \ "casx [%i0], %i1, %i2 \n\t" \ /* retval = (oldval == newval) ? 1 : 0 */ \ "xor %i2, %i1, %g1 \n\t" /* g1 = 0 IFF old==new */ \ "clr %i0 \n\t" /* retval = 0 */ \ GASNETI_SPARC_MOVRZ_g1_1_i0 ) /* retval = 1 IFF g1 == 0 */ #define GASNETI_ATOMIC64_SWAP_BODY \ GASNETI_ASM_SPECIAL( \ "mov %i1, %g1 \n\t" \ ".LGN001: \n\t" \ "ldx [%i0], %g4 \n\t" \ "casx [%i0], %g4, %g1 \n\t" \ "cmp %g4, %g1 \n\t" \ "bne,a,pn %xcc, .LGN001 \n\t" \ " mov %i1, %g1 \n\t" \ "mov %g4, %i0" ) #define GASNETI_ATOMIC64_FETCHADD_BODY \ GASNETI_ASM_SPECIAL( \ "ldx [%i0], %g1 \n\t" \ ".LGN002: \n\t" \ "add %g1, %i1, %g4 \n\t" \ "casx [%i0], %g1, %g4 \n\t" \ "cmp %g1, %g4 \n\t" \ "bne,a,pn %xcc, .LGN002 \n\t" \ " mov %g4, %g1 \n\t" \ "mov %g4, %i0" ) #define GASNETI_ATOMIC64_SPECIALS \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_compare_and_swap, \ GASNETI_ATOMIC64_COMPARE_AND_SWAP_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_fetchadd, \ GASNETI_ATOMIC64_FETCHADD_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_swap, \ GASNETI_ATOMIC64_SWAP_BODY) #else /* ILP32 on a 64-bit CPU. */ #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(v) { (v) } /* see gcc asm, above, for explanations */ \ #define GASNETI_ATOMIC64_SET_BODY \ GASNETI_ASM_SPECIAL( \ "mov %i1, %o2 \n\t" \ "mov %i2, %o3 \n\t" \ "std %o2, [%i0]" ) #define GASNETI_ATOMIC64_READ_BODY \ GASNETI_ASM_SPECIAL( \ "ldd [%i0], %i0 " ); #define GASNETI_ATOMIC64_COMPARE_AND_SWAP_BODY \ GASNETI_ASM_SPECIAL( \ "sllx %i3, 32, %o1 \n\t" \ "sllx %i1, 32, %g1 \n\t" \ "srl %i4, 0, %i4 \n\t" \ "srl %i2, 0, %i2 \n\t" \ "or %o1, %i4, %o1 \n\t" \ "or %g1, %i2, %g1 \n\t" \ "casx [%i0], %g1, %o1 \n\t" \ "xor %g1, %o1, %g1 \n\t" \ "clr %i0 \n\t" /* retval = 0 */ \ GASNETI_SPARC_MOVRZ_g1_1_i0 ) /* retval = 1 IFF g1 == 0 */ #define GASNETI_ATOMIC64_SWAP_BODY \ GASNETI_ASM_SPECIAL( \ "sllx %i1,32,%o5 \n\t" \ "srl %i2,0,%i2 \n\t" \ "or %o5,%i2,%o5 \n\t" \ "mov %o5,%g1 \n\t" \ ".LGN001: \n\t" \ "ldx [%i0],%o7 \n\t" \ "casx [%i0],%o7,%o5 \n\t" \ "cmp %o7,%o5 \n\t" \ "bne,a,pn %xcc, .LGN001 \n\t" \ " mov %g1,%o5 \n\t" \ "srlx %o5,32,%i0 \n\t" \ "srl %o5,0,%i1" ) #define GASNETI_ATOMIC64_FETCHADD_BODY \ GASNETI_ASM_SPECIAL( \ "sllx %i1,32,%o5 \n\t" \ "srl %i2,0,%i2 \n\t" \ "or %o5,%i2,%o5 \n\t" \ "ldx [%i0],%o7 \n\t" \ ".LGN002: \n\t" \ "add %o5,%o7,%g1 \n\t" \ "casx [%i0],%o7,%g1 \n\t" \ "cmp %o7,%g1 \n\t" \ "bne,a,pn %xcc, .LGN002 \n\t" \ " mov %g1,%o7 \n\t" \ "srlx %g1,32,%i0 \n\t" \ "srl %g1,0,%i1" ) #define GASNETI_ATOMIC64_SPECIALS \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_set, \ GASNETI_ATOMIC64_SET_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_read, \ GASNETI_ATOMIC64_READ_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_compare_and_swap, \ GASNETI_ATOMIC64_COMPARE_AND_SWAP_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_swap, \ GASNETI_ATOMIC64_SWAP_BODY) \ GASNETI_SPECIAL_ASM_DEFN(_gasneti_special_atomic64_fetchadd, \ GASNETI_ATOMIC64_FETCHADD_BODY) #endif /* Using default fences, as our asm includes none */ #else #error unrecognized Sparc v9 compiler - need to implement GASNet atomics (or #define GASNETI_USE_GENERIC_ATOMICOPS) #endif #else /* SPARC pre-v9 lacks RMW instructions - we no longer support atomic swap */ #error "GASNet no longer supports SPARC prior to the v8+/v9 ABIs" #endif /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_POWERPC #if defined(GASNETI_ARCH_PPC64) /* We are running on a 64-bit capable CPU/OS, but can't use native atomics on improperly aligned data. Since our "contract" with the developer says atomic64_t works on 64-bit types without any extra alignment, we may need to use mutex-based atomics when not aligned. See bug 1595 for more info. */ #if (PLATFORM_OS_DARWIN && PLATFORM_ARCH_32) /* + Apple's 32-bit ABI only guarantees 4-byte minimum aligment for 64-bit integers and doubles. */ #define GASNETI_HYBRID_ATOMIC64 1 #endif /* Should we use native 64-bit atomics on ILP32? */ #if PLATFORM_ARCH_32 && (PLATFORM_OS_DARWIN || PLATFORM_OS_LINUX) #define GASNETI_PPC64_ILP32_NATIVE_ATOMICS 1 #endif #endif #if GASNETI_HAVE_GCC_ASM #if GASNETI_PGI_ASM_TPR23291 #define GASNETI_ASM_CR0 /*empty*/ #else #define GASNETI_ASM_CR0 "cr0" #endif #define GASNETI_HAVE_ATOMIC32_T 1 typedef struct { volatile uint32_t gasneti_ctr; } gasneti_atomic32_t; #define gasneti_atomic32_init(v) { (v) } #define _gasneti_atomic32_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic32_set(p,v) ((p)->gasneti_ctr = (v)) GASNETI_INLINE(_gasneti_atomic32_addfetch) uint32_t _gasneti_atomic32_addfetch(gasneti_atomic32_t *_v, uint32_t _op) { GASNETI_ASM_REGISTER_KEYWORD uint32_t _result; #if GASNETI_PGI_ASM_TPR24514 // Work-around bug 3570 gasneti_atomic32_t * volatile _w = _v; _v = _w; #endif #if GASNETI_PGI_ASM_TPR23290 __asm__ __volatile__ ( "0:\t" "lwarx %0,0,%2 \n\t" "add %0,%0,%3 \n\t" "stwcx. %0,0,%2 \n\t" "bne- 0b \n\t" : "=&b"(_result), "=m" (_v->gasneti_ctr) /* constraint b = 'b'ase register (not r0) */ : "r" (_v), "r"(_op) , "m"(_v->gasneti_ctr) : GASNETI_ASM_CR0); #else __asm__ __volatile__ ( "0:\t" "lwarx %0,0,%2 \n\t" "add%I3 %0,%0,%3 \n\t" "stwcx. %0,0,%2 \n\t" "bne- 0b \n\t" : "=&b"(_result), "=m" (_v->gasneti_ctr) /* constraint b = 'b'ase register (not r0) */ : "r" (_v), "Ir"(_op) , "m"(_v->gasneti_ctr) : GASNETI_ASM_CR0); #endif return _result; } #define _gasneti_atomic32_addfetch _gasneti_atomic32_addfetch /* Default impls of inc, dec, dec-and-test, add and sub */ GASNETI_INLINE(_gasneti_atomic32_swap) uint32_t _gasneti_atomic32_swap(gasneti_atomic32_t *_v, uint32_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint32_t _oldval; __asm__ __volatile__ ( "0:\t" "lwarx %0,0,%2 \n\t" "stwcx. %3,0,%2 \n\t" "bne- 0b \n\t" : "=&r"(_oldval), "=m" (_v->gasneti_ctr) : "r" (_v), "r"(_newval) , "m"(_v->gasneti_ctr) : GASNETI_ASM_CR0); return _oldval; } #define _gasneti_atomic32_swap _gasneti_atomic32_swap GASNETI_INLINE(_gasneti_atomic32_compare_and_swap) int _gasneti_atomic32_compare_and_swap(gasneti_atomic32_t *_p, uint32_t _oldval, uint32_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint32_t _result; // The following use of _tmp addresses Bug 3742 by clearing the upper // 32 bits of the register on LP64, while being a no-op on ILP32: GASNETI_ASM_REGISTER_KEYWORD uintptr_t _tmp = _oldval; __asm__ __volatile__ ( "0:\t" "lwarx %0,0,%2 \n\t" /* load to result */ "xor. %0,%0,%3 \n\t" /* xor result w/ tmp */ "bne 1f \n\t" /* branch on mismatch */ "stwcx. %4,0,%2 \n\t" /* store newval */ "bne- 0b \n\t" "1: " : "=&r"(_result), "=m"(_p->gasneti_ctr) : "r" (_p), "r"(_tmp), "r"(_newval), "m"(_p->gasneti_ctr) : GASNETI_ASM_CR0); return (_result == 0); } #define _gasneti_atomic32_compare_and_swap _gasneti_atomic32_compare_and_swap #if GASNETI_ATOMIC64_NOINLINE // Using SLOW or GENERIC alternative #elif PLATFORM_ARCH_64 #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(_v) { (_v) } #define _gasneti_atomic64_set(_p,_v) do { (_p)->gasneti_ctr = (_v); } while(0) #define _gasneti_atomic64_read(_p) ((_p)->gasneti_ctr) GASNETI_INLINE(_gasneti_atomic64_compare_and_swap) int _gasneti_atomic64_compare_and_swap(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _result; __asm__ __volatile__ ( "0:\t" "ldarx %0,0,%2 \n\t" /* load to result */ "xor. %0,%0,%3 \n\t" /* compare result w/ oldval */ "bne 1f \n\t" /* branch on mismatch */ "stdcx. %4,0,%2 \n\t" /* store newval */ "bne- 0b \n\t" /* retry on conflict */ "1: " : "=&b"(_result), "=m"(_p->gasneti_ctr) : "r" (_p), "r"(_oldval), "r"(_newval), "m"(_p->gasneti_ctr) : GASNETI_ASM_CR0); return (_result == 0); } #define _gasneti_atomic64_compare_and_swap _gasneti_atomic64_compare_and_swap GASNETI_INLINE(_gasneti_atomic64_swap) uint64_t _gasneti_atomic64_swap(gasneti_atomic64_t *_p, uint64_t _newval) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _oldval; __asm__ __volatile__ ( "0:\t" "ldarx %0,0,%2 \n\t" /* load to oldval */ "stdcx. %3,0,%2 \n\t" /* store newval */ "bne- 0b" /* retry on conflict */ : "=&b"(_oldval), "=m"(_p->gasneti_ctr) : "r" (_p), "r"(_newval), "m"(_p->gasneti_ctr) : GASNETI_ASM_CR0); return _oldval; } #define _gasneti_atomic64_swap _gasneti_atomic64_swap GASNETI_INLINE(_gasneti_atomic64_addfetch) uint64_t _gasneti_atomic64_addfetch(gasneti_atomic64_t *_p, uint64_t _op) { GASNETI_ASM_REGISTER_KEYWORD uint64_t _result; #if GASNETI_PGI_ASM_TPR24514 // Work-around bug 3570 gasneti_atomic64_t * volatile _q = _p; _p = _q; #endif #if GASNETI_PGI_ASM_TPR23290 __asm__ __volatile__ ( "0:\t" "ldarx %0,0,%2 \n\t" "add %0,%0,%3 \n\t" "stdcx. %0,0,%2 \n\t" "bne- 0b \n\t" : "=&b"(_result), "=m" (_p->gasneti_ctr) /* constraint b = 'b'ase register (not r0) */ : "r" (_p), "r"(_op) , "m"(_p->gasneti_ctr) : GASNETI_ASM_CR0); #else __asm__ __volatile__ ( "0:\t" "ldarx %0,0,%2 \n\t" "add%I3 %0,%0,%3 \n\t" "stdcx. %0,0,%2 \n\t" "bne- 0b \n\t" : "=&b"(_result), "=m" (_p->gasneti_ctr) /* constraint b = 'b'ase register (not r0) */ : "r" (_p), "Ir"(_op) , "m"(_p->gasneti_ctr) : GASNETI_ASM_CR0); #endif return _result; } #define _gasneti_atomic64_addfetch _gasneti_atomic64_addfetch #elif defined(GASNETI_PPC64_ILP32_NATIVE_ATOMICS) /* ILP32 on 64-bit CPU */ #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(_v) { (_v) } GASNETI_INLINE(_gasneti_atomic64_set) void _gasneti_atomic64_set(gasneti_atomic64_t *_p, uint64_t _val) { uint32_t _tmp; /* We are using the ll/sc reservation as a "canary" that will ensure we don't write to memory a value that was clobbered by an interruption (context switch, signal handler, etc.). */ __asm__ __volatile__ ( "clrldi %L2,%L2,32 \n\t" /* Zap undefined top half of val */ "0:\t" "ldarx %1,0,%3 \n\t" /* establish reservation */ "sldi %1,%2,32 \n\t" /* construct 64-bit... */ "or %1,%1,%L2 \n\t" /* ... value in tmp register */ "stdcx. %1,0,%3 \n\t" /* store val */ "bne- 0b " /* retry on loss of reservation */ : "=m"(_p->gasneti_ctr), "=&b"(_tmp) : "r"(_val), "r"(_p), "m"(_p->gasneti_ctr) : GASNETI_ASM_CR0 ); } #define _gasneti_atomic64_set _gasneti_atomic64_set GASNETI_INLINE(_gasneti_atomic64_read) uint64_t _gasneti_atomic64_read(gasneti_atomic64_t *_p) { uint64_t _retval; /* gcc allocates a pair of regs for this */ uint32_t _tmp; /* We are using an extra register with a non-zero upper half as a "canary" to detect when an interruption (context switch, signal handler, etc.) has clobbered the upper halves of the register set. We pick a value that is zero in the lower half to be insensitive to whether the "clobber" does sign extension or zero extension. */ __asm__ __volatile__ ( "0:\t" "li %1,0x7fff \n\t" /* Canary value in tmp ... */ "sldi %1,%1,32 \n\t" /* ... = 0x00007FFF.00000000 */ "ld %0,%2 \n\t" /* 64-bit load into "hi" reg of pair */ "clrldi %L0,%0,32 \n\t" /* "lo" reg of pair gets 32 low bits */ "srdi %0,%0,32 \n\t" /* "hi" reg of pair gets 32 high bits */ "srdi %1,%1,32 \n\t" /* Check that upper half of canary... */ "cmpdi %1,0x7fff \n\t" /* ... is still 0x00007FFF */ "bne- 0b " /* retry on canary changed */ : "=&r"(_retval), "=&r"(_tmp) : "m"(_p->gasneti_ctr) : GASNETI_ASM_CR0 ); return _retval; } #define _gasneti_atomic64_read _gasneti_atomic64_read GASNETI_INLINE(_gasneti_atomic64_compare_and_swap) int _gasneti_atomic64_compare_and_swap(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval) { GASNETI_ASM_REGISTER_KEYWORD int _result; GASNETI_ASM_REGISTER_KEYWORD uint32_t _tmp; /* We are using the ll/sc reservation as a "canary" that will ensure we don't trust registers clobbered by an interruption (context switch, signal handler, etc.). To make this work correctly we need to perform the "swap" even on a failed "compare" (in case the clobber is the only reason the compare failed). If that is the case, then we swap in the original value, knowing that the normal ll/sc rules will not let us overwrite the value if it changed since we read it. */ __asm__ __volatile__ ( "clrldi %L5,%L5,32 \n\t" /* Zap undefined top half of oldval */ "clrldi %L6,%L6,32 \n\t" /* Zap undefined top half of newval */ "0:\t" "ldarx %1,0,%3 \n\t" /* load memory to tmp */ "sldi %0,%5,32 \n\t" /* shift hi32 half of oldval to result */ "or %0,%0,%L5 \n\t" /* and or in lo32 of oldval to result */ "cmpd 0,%0,%1 \n\t" /* compare memory (tmp) w/ oldval (result) */ "li %0,0 \n\t" /* assume failure */ "bne 1f \n\t" /* branch to stdcx. on mismatch */ "li %0,1 \n\t" /* success */ "sldi %1,%6,32 \n\t" /* shift hi32 half of newval to tmp */ "or %1,%1,%L6 \n\t" /* and or in lo32 of newval to tmp */ "1:\t" "stdcx. %1,0,%3 \n\t" /* try to store tmp (may be newval or read value) */ "bne- 0b " /* retry on loss of reservation */ : "=&r"(_result), "=&r"(_tmp), "=m"(_p->gasneti_ctr) : "r" (_p), "m"(_p->gasneti_ctr), "r"(_oldval), "r"(_newval) : GASNETI_ASM_CR0); return _result; } #define _gasneti_atomic64_compare_and_swap _gasneti_atomic64_compare_and_swap GASNETI_INLINE(_gasneti_atomic64_swap) uint64_t _gasneti_atomic64_swap(gasneti_atomic64_t *_p, uint64_t _val) { uint64_t _retval; /* gcc allocates a pair of regs for this */ uint32_t _tmp; /* We are using the ll/sc reservation as a "canary" that will ensure we don't write to memory a value that was clobbered by an interruption (context switch, signal handler, etc.). */ __asm__ __volatile__ ( "clrldi %L3,%L3,32 \n\t" /* Zap undefined top half of val */ "0:\t" "ldarx %2,0,%4 \n\t" /* load retval, establishing reservation */ "sldi %1,%3,32 \n\t" /* construct 64-bit... */ "or %1,%1,%L3 \n\t" /* ... value in tmp register */ "clrldi %L2,%2,32 \n\t" /* "lo" reg of pair gets 32 low bits */ "srdi %2,%2,32 \n\t" /* "hi" reg of pair gets 32 high bits */ "stdcx. %1,0,%4 \n\t" /* store tmp */ "bne- 0b " /* retry on loss of reservation */ : "=m"(_p->gasneti_ctr), "=&b"(_tmp), "=&b"(_retval) : "r"(_val), "r"(_p), "m"(_p->gasneti_ctr) : GASNETI_ASM_CR0 ); return _retval; } #define _gasneti_atomic64_swap _gasneti_atomic64_swap GASNETI_INLINE(_gasneti_atomic64_fetchadd) uint64_t _gasneti_atomic64_fetchadd(gasneti_atomic64_t *_p, uint64_t _val) { uint64_t _retval; /* gcc allocates a pair of regs for this */ uint32_t _tmp; /* We are using the ll/sc reservation as a "canary" that will ensure we don't write to memory a value that was clobbered by an interruption (context switch, signal handler, etc.). */ __asm__ __volatile__ ( "clrldi %L3,%L3,32 \n\t" /* Zap undefined top half of val */ "0:\t" "ldarx %2,0,%4 \n\t" /* load retval, establishing reservation */ "sldi %1,%3,32 \n\t" /* construct 64-bit... */ "or %1,%1,%L3 \n\t" /* ... value in tmp register */ "add %1,%1,%2 \n\t" /* 64-bit sum in tmp register */ "clrldi %L2,%2,32 \n\t" /* "lo" reg of pair gets 32 low bits */ "srdi %2,%2,32 \n\t" /* "hi" reg of pair gets 32 high bits */ "stdcx. %1,0,%4 \n\t" /* store tmp */ "bne- 0b " /* retry on loss of reservation */ : "=m"(_p->gasneti_ctr), "=&b"(_tmp), "=&b"(_retval) : "r"(_val), "r"(_p), "m"(_p->gasneti_ctr) : GASNETI_ASM_CR0 ); return _retval; } #define _gasneti_atomic64_fetchadd _gasneti_atomic64_fetchadd #else /* 32-bit CPU - generics are the only option */ #endif /* Using default fences as we have none in our asms */ #else #error Unrecognized PowerPC - need to implement GASNet atomics (or #define GASNETI_USE_GENERIC_ATOMICOPS) #endif /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_MIPS #if GASNETI_ARCH_SGI_IP27 /* According to the Linux kernel source, there is an erratum for the R10k cpu * (multi-processor only) in which ll/sc or lld/scd may not execute atomically! * The work-around is to predict-taken the back-branch after the sc or scd. * We must *not* use "beqzl" unconditionally, since the MIPS32 manual warns * that the "branch likely" instructions will be removed in a future revision. */ #define GASNETI_MIPS_BEQZ "beqzl " /* 'l' = likely */ #else #define GASNETI_MIPS_BEQZ "beqz " #endif #if defined(GASNETI_HAVE_MIPS_REG_AT) #define GASNETI_MIPS_AT "$at" #elif defined(GASNETI_HAVE_MIPS_REG_1) #define GASNETI_MIPS_AT "$1" #endif #if PLATFORM_OS_LINUX && PLATFORM_COMPILER_GNU #define GASNETI_HAVE_ATOMIC32_T 1 typedef struct { volatile uint32_t gasneti_ctr; } gasneti_atomic32_t; #define gasneti_atomic32_init(v) { (v) } #define _gasneti_atomic32_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic32_set(p,v) ((p)->gasneti_ctr = (v)) /* We can't assume GNU as, so no push/pop. */ #if 1 /* Only gcc supported currently */ /* Default is at,reorder,macro */ #define GASNETI_MIPS_START_NOAT ".set noat\n\t" #define GASNETI_MIPS_END_NOAT ".set at\n\t" #define GASNETI_MIPS_START_NOREORDER ".set noreorder\n\t.set nomacro\n\t" #define GASNETI_MIPS_END_NOREORDER ".set reorder\n\t.set macro\n\t" #define GASNETI_MIPS_RETRY(ARGS) GASNETI_MIPS_BEQZ ARGS "\n\t" #else #error #endif /* Macro that expands to either 32- or 64-bit SWAP */ /* NOTE: evaluates _p multiple times */ #define __gasneti_atomic_swap_inner(_abi, _ll, _sc, _retval, _p, _newval, _tmp) \ __asm__ __volatile__( \ ".set " _abi " \n\t" \ "1: \n\t" \ "move %1,%3 \n\t" \ _ll " %0,0(%4) \n\t" \ _sc " %1,0(%4) \n\t" \ GASNETI_MIPS_RETRY("%1,1b") \ ".set mips0 \n\t" \ : "=&r" (_retval), "=&r" (_tmp), "=m" ((_p)->gasneti_ctr) \ : "r" (_newval), "r" (_p), "m" ((_p)->gasneti_ctr) ) GASNETI_INLINE(_gasneti_atomic32_swap) uint32_t _gasneti_atomic32_swap(gasneti_atomic32_t *_p, uint32_t _newval) { uint32_t _retval, _tmp; __gasneti_atomic_swap_inner("mips2", "ll", "sc", _retval, _p, _newval, _tmp); return _retval; } #define _gasneti_atomic32_swap _gasneti_atomic32_swap GASNETI_INLINE(_gasneti_atomic32_fetchadd) uint32_t _gasneti_atomic32_fetchadd(gasneti_atomic32_t *_p, uint32_t _op) { #ifdef GASNETI_MIPS_AT uint32_t _retval; __asm__ __volatile__( GASNETI_MIPS_START_NOAT ".set mips2 \n\t" "1: \n\t" "ll %0,0(%3) \n\t" "addu " GASNETI_MIPS_AT ",%0,%2 \n\t" "sc " GASNETI_MIPS_AT ",0(%3) \n\t" GASNETI_MIPS_RETRY(GASNETI_MIPS_AT ",1b") ".set mips0 \n\t" GASNETI_MIPS_END_NOAT : "=&r" (_retval), "=m" (_p->gasneti_ctr) : "Ir" (_op), "r" (_p), "m" (_p->gasneti_ctr) ); #else /* Don't know how to access $1/$at. So use another temporary */ uint32_t _tmp, _retval; __asm__ __volatile__( ".set mips2 \n\t" "1: \n\t" "ll %0,0(%4) \n\t" "addu %1,%0,%3 \n\t" "sc %1,0(%4) \n\t" GASNETI_MIPS_RETRY("%1,1b") ".set mips0 \n\t" : "=&r" (_retval), "=&r" (_tmp), "=m" (_p->gasneti_ctr) : "Ir" (_op), "r" (_p), "m" (_p->gasneti_ctr) ); #endif return _retval; } #define _gasneti_atomic32_fetchadd _gasneti_atomic32_fetchadd /* Macro that expands to either 32- or 64-bit CAS */ /* NOTE: evaluates _p multiple times */ #define __gasneti_atomic_compare_and_swap_inner(_abi, _ll, _sc, _retval, _p, _oldval, _newval) \ __asm__ __volatile__ ( \ "1: \n\t" \ ".set " _abi " \n\t" /* [ set ABI to allow ll/sc ] */ \ _ll " %0,0(%4) \n\t" /* _retval = *p (starts ll/sc reservation) */ \ ".set mips0 \n\t" /* [ set ABI back to default ] */ \ GASNETI_MIPS_START_NOREORDER /* [ tell assembler we fill our delay slot ] */ \ "bne %0,%z2,2f \n\t" /* Break loop on mismatch */ \ " move %0,$0 \n\t" /* Zero _retval (in delay slot) */ \ GASNETI_MIPS_END_NOREORDER /* [ tell assembler to fill delay slots ] */ \ "move %0,%z3 \n\t" /* _retval = _newval */ \ ".set " _abi " \n\t" /* [ set ABI to allow ll/sc ] */ \ _sc " %0,0(%4) \n\t" /* Try *p = _retval (sets _retval 0 or 1) */ \ ".set mips0 \n\t" /* [ set ABI back to default ] */ \ GASNETI_MIPS_RETRY("%0,1b") /* Retry on contention */ \ "2: " \ : "=&r" (_retval), "=m" ((_p)->gasneti_ctr) \ : "Jr" (_oldval), "Jr" (_newval), "r" ((_p)), "m" ((_p)->gasneti_ctr) ) GASNETI_INLINE(_gasneti_atomic32_compare_and_swap) int _gasneti_atomic32_compare_and_swap(gasneti_atomic32_t *_p, uint32_t _oldval, uint32_t _newval) { int _retval; #if defined(_MIPS_SIM) && (_MIPS_SIM >= 2) /* N32 or 64-bit ABI */ if (!__builtin_constant_p(_oldval)) { /* Ensure oldval is properly sign-extended for comparison to read value */ __asm__ __volatile__("sll %0,%0,0" : "+r" (_oldval)); } #endif __gasneti_atomic_compare_and_swap_inner("mips2", "ll", "sc", _retval, _p, _oldval, _newval); return _retval; } #define _gasneti_atomic32_compare_and_swap _gasneti_atomic32_compare_and_swap #if GASNETI_ATOMIC64_NOINLINE // Using SLOW or GENERIC alternative #elif defined(_MIPS_SIM) && (_MIPS_SIM >= 2) /* N32 or 64-bit ABI */ #define GASNETI_HAVE_ATOMIC64_T 1 typedef struct { volatile uint64_t gasneti_ctr; } gasneti_atomic64_t; #define gasneti_atomic64_init(v) { (v) } #define _gasneti_atomic64_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic64_set(p,v) ((p)->gasneti_ctr = (v)) GASNETI_INLINE(_gasneti_atomic64_swap) uint64_t _gasneti_atomic64_swap(gasneti_atomic64_t *_p, uint64_t _newval) { uint64_t _retval, _tmp; __gasneti_atomic_swap_inner("mips3", "lld", "scd", _retval, _p, _newval, _tmp); return _retval; } #define _gasneti_atomic64_swap _gasneti_atomic64_swap GASNETI_INLINE(_gasneti_atomic64_compare_and_swap) int _gasneti_atomic64_compare_and_swap(gasneti_atomic64_t *_p, uint64_t _oldval, uint64_t _newval) { int _retval; __gasneti_atomic_compare_and_swap_inner("mips3", "lld", "scd", _retval, _p, _oldval, _newval); return _retval; } #define _gasneti_atomic64_compare_and_swap _gasneti_atomic64_compare_and_swap GASNETI_INLINE(_gasneti_atomic64_fetchadd) uint64_t _gasneti_atomic64_fetchadd(gasneti_atomic64_t *_p, uint64_t _op) { #ifdef GASNETI_MIPS_AT uint64_t _retval; __asm__ __volatile__( GASNETI_MIPS_START_NOAT ".set mips3 \n\t" "1: \n\t" "lld %0,0(%3) \n\t" "daddu " GASNETI_MIPS_AT ",%0,%2 \n\t" "scd " GASNETI_MIPS_AT ",0(%3) \n\t" GASNETI_MIPS_RETRY(GASNETI_MIPS_AT ",1b") ".set mips0 \n\t" GASNETI_MIPS_END_NOAT : "=&r" (_retval), "=m" (_p->gasneti_ctr) : "Ir" (_op), "r" (_p), "m" (_p->gasneti_ctr) ); #else /* Don't know how to access $1/$at. So use another temporary */ uint64_t _tmp, _retval; __asm__ __volatile__( ".set mips3 \n\t" "1: \n\t" "lld %0,0(%4) \n\t" "daddu %1,%0,%3 \n\t" "scd %1,0(%4) \n\t" GASNETI_MIPS_RETRY("%1,1b") ".set mips0 \n\t" : "=&r" (_retval), "=&r" (_tmp), "=m" (_p->gasneti_ctr) : "Ir" (_op), "r" (_p), "m" (_p->gasneti_ctr) ); #endif return _retval; } #define _gasneti_atomic64_fetchadd _gasneti_atomic64_fetchadd #endif /* SGI docs say ll/sc include a memory fence. * SGI Part Number 02-00036-005, page 5-5 and 5-7 * Tests conducted on the an SGI Origin 2000 are consistent with this. * * Since the 2.6.23 kernel, Linux is supporting a configuration option * (CONFIG_WEAK_REORDERING_BEYOND_LLSC) for MIPS processors, though there * are no template configs that set this option as of the 2.6.28 kernel. * When set, this option causes a "SYNC" to be inserted in the kernel's * mutex-type assembly routines as follows: * - AFTER lock acquisition * - BEFORE lock release * The behavior of a SiCortex machine appears consistent with this * "weak reordering beyond ll/sc" behavior. * * We'll stick w/ the safe option for now: use the default fences. * However, we could potentially improve peformance on SGI machines * as follows: * #if PLATFORM_OS_IRIX * #define _gasneti_atomic{32,64}_prologue_rmw(p,f) # #define _gasneti_atomic{32,64}_fence_before_rmw(p,f) _gasneti_atomic_cf_before(f) # #define _gasneti_atomic{32,64}_fence_after_rmw(p,f) _gasneti_atomic_cf_after(f) * #define _gasneti_atomic{32,64}_fence_after_bool(p,f,v) _gasneti_atomic_cf_after(f) * #endif */ /* No memory fences in our asm, so using default fences */ #else #error "unrecognized MIPS compiler and/or OS - need to implement GASNet atomics (or #define GASNETI_USE_GENERIC_ATOMICOPS)" #endif /* ------------------------------------------------------------------------------------ */ #elif PLATFORM_ARCH_ARM && defined(GASNETI_HAVE_ARM_CMPXCHG) #if PLATFORM_OS_LINUX && (PLATFORM_COMPILER_GNU || PLATFORM_COMPILER_CLANG) #define GASNETI_HAVE_ATOMIC32_T 1 typedef struct { volatile uint32_t gasneti_ctr; } gasneti_atomic32_t; #define gasneti_atomic32_init(v) { (v) } #define _gasneti_atomic32_read(p) ((p)->gasneti_ctr) #define _gasneti_atomic32_set(p,v) ((p)->gasneti_ctr = (v)) // A note regarding use of the "register" keyword: // // For the GASNETI_HAVE_ARM_CMPXCHG code, we must use a GCC feature known // as Explicit Register Variables which in turn leaves us no alternative // but to use the "register" keyword even when C++11 and newer have // deprecated or reserved it. Fortunately, g++ and clang++ both allow // this particular usage without warnings. #define gasneti_atomic32_addfetch_const(p, op) ({ \ register unsigned long __sum __asm("r1"); \ register unsigned long __ptr __asm("r2") = (unsigned long)(p); \ __asm__ __volatile__ ( \ "0: ldr r0, [r2] @ r0 = *p \n" \ " add r1, r0, %2 @ r1 = r0 + op \n" \ GASNETI_ARM_ASMCALL(r3, 0x3f) \ " bcc 0b @ retry on Carry Clear" \ : "=&r" (__sum) \ : "r" (__ptr), "IL" (op) \ : "r0", "r3", "ip", "lr", "cc", "memory" ); \ (__sum); \ }) GASNETI_INLINE(gasneti_atomic32_increment) void gasneti_atomic32_increment(gasneti_atomic32_t *_p, const int _flags) { (void)gasneti_atomic32_addfetch_const(_p, 1); } #define gasneti_atomic32_increment gasneti_atomic32_increment GASNETI_INLINE(gasneti_atomic32_decrement) void gasneti_atomic32_decrement(gasneti_atomic32_t *_p, const int _flags) { (void)gasneti_atomic32_addfetch_const(_p, -1); } #define gasneti_atomic32_decrement gasneti_atomic32_decrement GASNETI_INLINE(gasneti_atomic32_decrement_and_test) int gasneti_atomic32_decrement_and_test(gasneti_atomic32_t *_p, const int _flags) { return !gasneti_atomic32_addfetch_const(_p, -1); } #define gasneti_atomic32_decrement_and_test gasneti_atomic32_decrement_and_test /* Need to schedule r4, since '=&r' doesn't appear to prevent * selection of the same register for __op and __sum. * XXX: otherwise could use for inc, dec, dec-and-test */ GASNETI_INLINE(gasneti_atomic32_addfetch) uint32_t gasneti_atomic32_addfetch(gasneti_atomic32_t *_p, uint32_t _op, const int _flags) { register unsigned long __sum __asm("r1"); register unsigned long __ptr __asm("r2") = (unsigned long)(_p); register unsigned long __op __asm("r4") = _op; __asm__ __volatile__ ( "0: ldr r0, [r2] @ r0 = *p \n" " add r1, r0, %2 @ r1 = r0 + op \n" GASNETI_ARM_ASMCALL(r3, 0x3f) " bcc 0b @ retry on Carry Clear " : "=&r" (__sum) : "r" (__ptr), "r" (__op) : "r0", "r3", "ip", "lr", "cc", "memory" ); return __sum; } #define gasneti_atomic32_addfetch gasneti_atomic32_addfetch /* Default impls of add and sub */ GASNETI_INLINE(gasneti_atomic32_compare_and_swap) int gasneti_atomic32_compare_and_swap(gasneti_atomic32_t *_v, int _oldval, int _newval, const int _flags) { register unsigned int _result __asm("r0"); register unsigned int __newval __asm("r1") = _newval; register unsigned int __v __asm("r2") = (unsigned long)_v; register unsigned int __oldval __asm("r4") = _oldval; /* Transient failure is possible if interrupted. * Since we can't distinguish the cause of the failure, * we must retry as long as the failure looks "improper" * which is defined as (!swapped && (v->gasneti_ctr == oldval)) */ __asm__ __volatile__ ( "0: mov r0, r4 @ r0 = oldval \n" GASNETI_ARM_ASMCALL(r3, 0x3f) #ifdef __thumb2__ " ite cc @ THUMB2: If(cc)-Then-Else \n" #endif " ldrcc ip, [r2] @ if (!swapped) ip=v->gasneti_ctr \n" " eorcs ip, r4, #1 @ else ip=oldval^1 \n" " teq r4, ip @ if (ip == oldval) \n" " beq 0b @ then retry " : "=&r" (_result) : "r" (__oldval), "r" (__v), "r" (__newval) : "r3", "ip", "lr", "cc", "memory" ); return !_result; } #define gasneti_atomic32_compare_and_swap gasneti_atomic32_compare_and_swap GASNETI_INLINE(gasneti_atomic32_swap) uint32_t gasneti_atomic32_swap(gasneti_atomic32_t *_p, uint32_t _op, const int _flags) { register unsigned long _newval __asm("r1") = _op; register unsigned long __p __asm("r2") = (unsigned long)(_p); register unsigned long _oldval __asm("r4"); __asm__ __volatile__ ( "0: ldr r0, [r2] @ r0 = *p \n" " mov r4, r0 @ oldval = r0 \n" GASNETI_ARM_ASMCALL(r3, 0x3f) " bcc 0b @ retry on Carry Clear " : "=&r" (_oldval) : "r" (__p), "r" (_newval) : "r0", "r3", "ip", "lr", "cc", "memory" ); return _oldval; } #define gasneti_atomic32_swap gasneti_atomic32_swap /* Linux kernel sources say c-a-s "includes memory barriers as needed" * and our code includes a "memory" clobber (compiler fence). */ #define _gasneti_atomic32_prologue_rmw(p,f) /*empty*/ #define _gasneti_atomic32_fence_before_rmw(p,f) /*empty*/ #define _gasneti_atomic32_fence_after_rmw(p,f) /*empty*/ #define _gasneti_atomic32_fence_after_bool(p,f,v) /*empty*/ #else #error "unrecognized ARM compiler and/or OS - need to implement GASNet atomics (or #define GASNETI_USE_GENERIC_ATOMICOPS)" #endif /* ------------------------------------------------------------------------------------ */ #else /* Unknown ARCH will "fall through" to use of the generics */ #endif #endif #undef GASNETI_ASM_REGISTER_KEYWORD // Not for use beyond this point: #undef GASNETI_ATOMIC32_NOINLINE #undef GASNETI_ATOMIC64_NOINLINE /* ------------------------------------------------------------------------------------ */ /* Configure non-default features of generic atomics IFF required for the current platform. */ /* * Example for a CPU w/o native atomics and only 2-byte aligment for uint32_t and uint64_t: #if PLATFORM_JUST_AN_EXAMPLE #define gasneti_genatomic32_align 2 #define gasneti_genatomic64_align 2 #endif */ /* ------------------------------------------------------------------------------------ */ /* Request build of generic atomics IFF required for the current platform */ #ifndef GASNETI_HAVE_ATOMIC32_T #define GASNETI_USE_GENERIC_ATOMIC32 1 /* Use generics for gasneti_atomic32_t */ #endif #ifndef GASNETI_HAVE_ATOMIC64_T #define GASNETI_USE_GENERIC_ATOMIC64 1 /* Use generics for gasneti_atomic64_t */ #endif /* Not for use outside this file: */ #undef GASNETI_HAVE_ATOMIC32_T #undef GASNETI_HAVE_ATOMIC64_T #if defined(GASNETI_USE_GENERIC_ATOMIC32) #define GASNETI_ATOMIC32_NOT_SIGNALSAFE 1 #define GASNETI_BUILD_GENERIC_ATOMIC32 1 /* Build the 32-bit generics */ #define gasneti_nonatomic32_align gasneti_genatomic32_align #endif #if defined(GASNETI_USE_GENERIC_ATOMIC64) || defined(GASNETI_HYBRID_ATOMIC64) #define GASNETI_ATOMIC64_NOT_SIGNALSAFE 1 #define GASNETI_BUILD_GENERIC_ATOMIC64 1 /* Build the 64-bit generics */ #define gasneti_nonatomic64_align gasneti_genatomic64_align #endif /* ------------------------------------------------------------------------------------ */ /* Define configuration-dependent choice of locks for generic atomics (if any) */ #if defined(GASNETI_BUILD_GENERIC_ATOMIC32) || defined(GASNETI_BUILD_GENERIC_ATOMIC64) #if GASNETI_USE_TRUE_MUTEXES /* Case I: gasnett_mutex_t in a gasnet client or thread-safe tools client*/ #define GASNETI_GENATOMIC_LOCKS 1 #if PLATFORM_ARCH_32 || defined(GASNETI_HYBRID_ATOMIC64) || defined(GASNETI_UNALIGNED_ATOMIC64) // Inform gasnet_atomicops.h we need mutex on 64-bit read() to avoid word tearing #define _gasneti_need_genatomic64_read 1 #endif // To avoid a header dependence cycle (bug 693), we must declare and define all // bits involving the mutexes (among other things) later. // So, here we just define macros to be expanded in gasnet_tools.{c,h}. #if PLATFORM_ARCH_64 #define GASNETI_ATOMIC_LOCK_HASH_64(val) val ^= (val >> 32) #else #define GASNETI_ATOMIC_LOCK_HASH_64(val) #endif #define GASNETI_ATOMIC_LOCK_TBL_DECLS \ typedef struct { \ gasnett_mutex_t _lock; \ char _pad[GASNETI_CACHE_PAD(sizeof(gasnett_mutex_t))]; \ } gasneti_mutex_atomic_tbl_t; \ extern gasneti_mutex_atomic_tbl_t *gasneti_mutex_atomic_tbl; \ extern uintptr_t gasneti_mutex_atomic_tbl_mask; \ extern void gasneti_mutex_atomic_tbl_init(void); \ GASNETI_INLINE(gasneti_mutex_atomic_hash_lookup) \ gasnett_mutex_t * gasneti_mutex_atomic_hash_lookup(uintptr_t _val) { \ /* Step 0. Initialization check */ \ if_pf (!gasneti_mutex_atomic_tbl_mask) gasneti_mutex_atomic_tbl_init(); \ else gasneti_local_rmb(); \ /* Step 1. Mask out the bits within a single cache line */ \ _val &= ~(((uintptr_t)1 << GASNETI_CACHE_LINE_SHIFT) - 1); \ /* Step 2. Fold with xor so all bits influence the lowest 8 */ \ GASNETI_ATOMIC_LOCK_HASH_64(_val); \ _val ^= (_val >> 16); \ _val ^= (_val >> 8); \ /* Step 3. Return the index */ \ return &((gasneti_mutex_atomic_tbl[_val & gasneti_mutex_atomic_tbl_mask])._lock); \ } #define GASNETI_ATOMIC_LOCK_TBL_DEFNS(mallocator) \ uintptr_t gasneti_mutex_atomic_tbl_mask = 0; \ gasneti_mutex_atomic_tbl_t *gasneti_mutex_atomic_tbl = NULL; \ GASNETI_COLD GASNETI_NEVER_INLINE(gasneti_mutex_atomic_tbl_init, \ extern void gasneti_mutex_atomic_tbl_init(void)) { \ static gasnett_mutex_t gasneti_mutex_atomic_tbl_lock = GASNETT_MUTEX_INITIALIZER; \ gasnett_mutex_lock(&gasneti_mutex_atomic_tbl_lock); \ if (gasneti_mutex_atomic_tbl_mask == 0) { \ int gasneti_mutex_atomic_tbl_size = \ gasnett_getenv_int_withdefault("GASNET_ATOMIC_TABLESZ",256,0); \ gasneti_assert_always(GASNETI_POWEROFTWO(gasneti_mutex_atomic_tbl_size)); \ /* Over allocate to leave at least a cache line before and after */ \ gasneti_mutex_atomic_tbl = mallocator((2 + gasneti_mutex_atomic_tbl_size) \ * sizeof(gasneti_mutex_atomic_tbl_t)); \ ++gasneti_mutex_atomic_tbl; \ for (int i = 0; i < gasneti_mutex_atomic_tbl_size; ++i) { \ gasnett_mutex_init(&(gasneti_mutex_atomic_tbl[i]._lock)); \ } \ gasneti_local_wmb(); /* enforce locks init before mask is written */ \ gasneti_mutex_atomic_tbl_mask = (gasneti_mutex_atomic_tbl_size - 1); \ } \ gasnett_mutex_unlock(&gasneti_mutex_atomic_tbl_lock); \ } #elif defined(_INCLUDED_GASNETEX_H) /* Case II: Empty mutexes in a GASNET_SEQ or GASNET_PARSYNC client w/o conduit-internal threads */ #else /* Case III: Serial gasnet tools client. */ /* attempt to generate a compile error if pthreads actually are in use */ #define PTHREAD_MUTEX_INITIALIZER ERROR_include_pthread_h_before_gasnet_tools_h extern int pthread_mutex_lock; #endif #ifndef gasneti_genatomic32_align #define gasneti_genatomic32_align 4 #endif #if defined(gasneti_genatomic64_align) /* Keep the current value */ #elif defined(GASNETI_UNALIGNED_ATOMIC64) #define gasneti_genatomic64_align GASNETI_UNALIGNED_ATOMIC64 #elif PLATFORM_ARCH_32 || defined(GASNETI_HYBRID_ATOMIC64) #define gasneti_genatomic64_align 4 #else #define gasneti_genatomic64_align 8 #endif #endif /* ------------------------------------------------------------------------------------ */ /* Wrappers for "special" atomics, if any */ #ifdef GASNETI_ATOMIC32_READ_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic32_read); #define _gasneti_atomic32_read (*(uint32_t (*)(gasneti_atomic32_t *))(&_gasneti_special_atomic32_read)) #endif #ifdef GASNETI_ATOMIC32_SET_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic32_set); #define _gasneti_atomic32_set (*(void (*)(gasneti_atomic32_t *, uint32_t))(&_gasneti_special_atomic32_set)) #endif #ifdef GASNETI_ATOMIC32_INCREMENT_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic32_increment); #define _gasneti_atomic32_increment (*(void (*)(gasneti_atomic32_t *))(&_gasneti_special_atomic32_increment)) #endif #ifdef GASNETI_ATOMIC32_DECREMENT_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic32_decrement); #define _gasneti_atomic32_decrement (*(void (*)(gasneti_atomic32_t *))(&_gasneti_special_atomic32_decrement)) #endif #ifdef GASNETI_ATOMIC32_DECREMENT_AND_TEST_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic32_decrement_and_test); #define _gasneti_atomic32_decrement_and_test (*(int (*)(gasneti_atomic32_t *))(&_gasneti_special_atomic32_decrement_and_test)) #endif #ifdef GASNETI_ATOMIC32_COMPARE_AND_SWAP_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic32_compare_and_swap); #define _gasneti_atomic32_compare_and_swap (*(int (*)(gasneti_atomic32_t *, uint32_t, uint32_t))(&_gasneti_special_atomic32_compare_and_swap)) #endif #ifdef GASNETI_ATOMIC32_SWAP_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic32_swap); #define _gasneti_atomic32_swap (*(uint32_t (*)(gasneti_atomic32_t *, uint32_t))(&_gasneti_special_atomic32_swap)) #endif #ifdef GASNETI_ATOMIC32_ADD_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic32_add); #define _gasneti_atomic32_add (*(uint32_t (*)(gasneti_atomic32_t *, uint32_t))(&_gasneti_special_atomic32_add)) #endif #ifdef GASNETI_ATOMIC32_SUBTRACT_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic32_subtract); #define _gasneti_atomic32_subtract (*(uint32_t (*)(gasneti_atomic32_t *, uint32_t))(&_gasneti_special_atomic32_subtract)) #endif #ifdef GASNETI_ATOMIC32_FETCHADD_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic32_fetchadd); #define _gasneti_atomic32_fetchadd (*(uint32_t (*)(gasneti_atomic32_t *, uint32_t))(&_gasneti_special_atomic32_fetchadd)) #endif #ifdef GASNETI_ATOMIC32_ADDFETCH_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic32_addfetch); #define _gasneti_atomic32_addfetch (*(uint32_t (*)(gasneti_atomic32_t *, uint32_t))(&_gasneti_special_atomic32_addfetch)) #endif #ifdef GASNETI_ATOMIC64_READ_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic64_read); #define _gasneti_atomic64_read (*(uint64_t (*)(gasneti_atomic64_t *))(&_gasneti_special_atomic64_read)) #endif #ifdef GASNETI_ATOMIC64_SET_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic64_set); #define _gasneti_atomic64_set (*(void (*)(gasneti_atomic64_t *, uint64_t))(&_gasneti_special_atomic64_set)) #endif #ifdef GASNETI_ATOMIC64_INCREMENT_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic64_increment); #define _gasneti_atomic64_increment (*(void (*)(gasneti_atomic64_t *))(&_gasneti_special_atomic64_increment)) #endif #ifdef GASNETI_ATOMIC64_DECREMENT_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic64_decrement); #define _gasneti_atomic64_decrement (*(void (*)(gasneti_atomic64_t *))(&_gasneti_special_atomic64_decrement)) #endif #ifdef GASNETI_ATOMIC64_DECREMENT_AND_TEST_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic64_decrement_and_test); #define _gasneti_atomic64_decrement_and_test (*(int (*)(gasneti_atomic64_t *))(&_gasneti_special_atomic64_decrement_and_test)) #endif #ifdef GASNETI_ATOMIC64_COMPARE_AND_SWAP_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic64_compare_and_swap); #define _gasneti_atomic64_compare_and_swap (*(int (*)(gasneti_atomic64_t *, uint64_t, uint64_t))(&_gasneti_special_atomic64_compare_and_swap)) #endif #ifdef GASNETI_ATOMIC64_SWAP_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic64_swap); #define _gasneti_atomic64_swap (*(uint64_t (*)(gasneti_atomic64_t *, uint64_t))(&_gasneti_special_atomic64_swap)) #endif #ifdef GASNETI_ATOMIC64_ADD_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic64_add); #define _gasneti_atomic64_add (*(uint64_t (*)(gasneti_atomic64_t *, uint64_t))(&_gasneti_special_atomic64_add)) #endif #ifdef GASNETI_ATOMIC64_SUBTRACT_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic64_subtract); #define _gasneti_atomic64_subtract (*(uint64_t (*)(gasneti_atomic64_t *, uint64_t))(&_gasneti_special_atomic64_subtract)) #endif #ifdef GASNETI_ATOMIC64_FETCHADD_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic64_fetchadd); #define _gasneti_atomic64_fetchadd (*(uint64_t (*)(gasneti_atomic64_t *, uint64_t))(&_gasneti_special_atomic64_fetchadd)) #endif #ifdef GASNETI_ATOMIC64_ADDFETCH_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic64_addfetch); #define _gasneti_atomic64_addfetch (*(uint64_t (*)(gasneti_atomic64_t *, uint64_t))(&_gasneti_special_atomic64_addfetch)) #endif #ifdef GASNETI_ATOMIC_READ_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic_read); #define _gasneti_atomic_read (*(gasneti_atomic_val_t (*)(gasneti_atomic_t *))(&_gasneti_special_atomic_read)) #endif #ifdef GASNETI_ATOMIC_SET_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic_set); #define _gasneti_atomic_set (*(void (*)(gasneti_atomic_t *, gasneti_atomic_val_t))(&_gasneti_special_atomic_increment)) #endif #ifdef GASNETI_ATOMIC_INCREMENT_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic_increment); #define _gasneti_atomic_increment (*(void (*)(gasneti_atomic_t *))(&_gasneti_special_atomic_increment)) #endif #ifdef GASNETI_ATOMIC_DECREMENT_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic_decrement); #define _gasneti_atomic_decrement (*(void (*)(gasneti_atomic_t *))(&_gasneti_special_atomic_decrement)) #endif #ifdef GASNETI_ATOMIC_DECREMENT_AND_TEST_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic_decrement_and_test); #define _gasneti_atomic_decrement_and_test (*(int (*)(gasneti_atomic_t *))(&_gasneti_special_atomic_decrement_and_test)) #endif #ifdef GASNETI_ATOMIC_COMPARE_AND_SWAP_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic_compare_and_swap); #define _gasneti_atomic_compare_and_swap (*(int (*)(gasneti_atomic_t *, gasneti_atomic_val_t, gasneti_atomic_val_t))(&_gasneti_special_atomic_compare_and_swap)) #endif #ifdef GASNETI_ATOMIC_ADD_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic_add); #define _gasneti_atomic_add (*(gasneti_atomic_val_t (*)(gasneti_atomic_t *, gasneti_atomic_val_t))(&_gasneti_special_atomic_add)) #endif #ifdef GASNETI_ATOMIC_SUBTRACT_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic_subtract); #define _gasneti_atomic_subtract (*(gasneti_atomic_val_t (*)(gasneti_atomic_t *, gasneti_atomic_val_t))(&_gasneti_special_atomic_subtract)) #endif #ifdef GASNETI_ATOMIC_FETCHADD_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic_fetchadd); #define _gasneti_atomic_fetchadd (*(gasneti_atomic_val_t (*)(gasneti_atomic_t *, gasneti_atomic_val_t))(&_gasneti_special_atomic_fetchadd)) #endif #ifdef GASNETI_ATOMIC_ADDFETCH_BODY GASNETI_SPECIAL_ASM_DECL(_gasneti_special_atomic_addfetch); #define _gasneti_atomic_addfetch (*(gasneti_atomic_val_t (*)(gasneti_atomic_t *, gasneti_atomic_val_t))(&_gasneti_special_atomic_addfetch)) #endif /* ------------------------------------------------------------------------------------ */ #endif gasnet-2025.8.0/docs/0000775000175000017500000000000015142313673014352 5ustar alastairalastairgasnet-2025.8.0/docs/GASNet-EX.txt0000664000175000017500000061752415142313673016525 0ustar alastairalastair/////////////////////////////// // GASNet-EX API Description // /////////////////////////////// // This is *not* a final normative document. // This is "beta documentation" for a work-in-progress. // // This document assumes a reasonable degree of familiarity with the current // (aka GASNet-1) specification: https://gasnet.lbl.gov/dist/docs/gasnet.pdf // // Except where otherwise noted, all definitions in this document // are provided by gasnetex.h. // // See implementation_defined.md, a sibling to this file, for additional // features provided by the implementation hosted at https://gasnet.lbl.gov, // which are not required by this specification. // Document Conventions // // This document includes the annotation [UNIMPLEMENTED] in several places // where we feel we have a suitable design ready for consideration, but // have yet to provide a complete and/or correct implementation. // // This document includes the annotation [EXPERIMENTAL] in several places // where we feel we have a suitable design and an implementation which is // sufficiently complete to be used. However, based on feedback received // from early use, the design may change in non-trivial ways (to the degree // that client code may need to change). // Public Header Files // // The following public headers may be included in any order: // gasnetex.h : GASNet-EX API + Tools // gasnet.h : GASNet-1 API (also includes gasnetex.h) // gasnet_fwd.h : See below // gasnet_ratomic.h : Remote Atomics API // gasnet_vis.h : Non-contiguous RMA (VIS) API // gasnet_coll.h : Collectives API // // No other `*.h` files appearing in the source distribution or install tree // are intended for direct inclusion by client code. // The `gasnet_fwd.h` header // // The gasnet_fwd.h provides a subset of `gasnetex.h`, for convenience of // clients who want a minimal header that is safe to include in their own // client's code. It defines only preprocessor `#define` constants and // stand-alone `typedefs` for simple data types. All preprocessor // identifiers are in the `GEX_` or `_GEX_` namespace. // // `gasnet_fwd.h` contains at least the following type definitions: // // `gex_Rank_t` // `gex_EP_Index_t` // `gex_Addr_t` // `gex_Event_t` // `gex_Flags_t` // `gex_DT_t` // `gex_OP_t` // `gex_EP_Capabilities_t` // // and the following constants: // // `GEX_RANK_INVALID` // `GEX_EVENT_*` // `GEX_FLAG_*` // `GEX_DT_*` // `GEX_OP_*` // `GEX_EP_CAPABILITY_*` // The semantics of these identifiers are described in subsequent sections. // // Specification and release versioning: // // Release version tuple // // This takes the form YEAR.MONTH.PATCH in GASNet-EX releases, // (where YY, MM and PP below represent the appropriate digits) // providing a clear distinction from GASNet-1 with MAJOR==1. #define GASNET_RELEASE_VERSION_MAJOR 20YY #define GASNET_RELEASE_VERSION_MINOR MM #define GASNET_RELEASE_VERSION_PATCH PP // Major and Minor versions of the GASNet-EX specification. // // This is currently a version number for *this* document. #define GEX_SPEC_VERSION_MAJOR 0 #define GEX_SPEC_VERSION_MINOR 19 // Major and Minor versions of the GASNet-1 specification. // // This is the version to which the gasnet_* APIs adhere // and which prevails for all matters which this document // does not (yet) address. #define GASNET_SPEC_VERSION_MAJOR 1 #define GASNET_SPEC_VERSION_MINOR 8 // Major and Minor versions of the GASNet-Tools specification. // // This is the spec version for the GASNet Tools // // For GASNet Tools API documentation see README-tools, located // at the top level of the GASNet-EX sources. #define GASNETT_SPEC_VERSION_MAJOR 1 #define GASNETT_SPEC_VERSION_MINOR 20 // // Relationship to GASNet-1 APIs: // // This release should continue to support nearly all GASNet-1 APIs, // provided the client #includes , which implements the // GASNet-1 APIs in terms of the new GASNet-EX interfaces. // // Most gasnet_ APIs have gex_ counterparts that are either interoperable, // or which provide a superset of the most closely-related gasnet_ APIs. // // Where a gex_/GEX_ identifier is interoperable or synonymous with // a gasnet_/GASNET_ identifier, that is noted below. // // Hybrid/transitional client support: // // All clients must initialize GASNet using *either* the legacy // gasnet_init()/gasnet_attach() calls *or* the new gex_Client_Init() call // described in a subsequent section. // // Clients who are incrementally adopting GASNet-EX may have a period of time // when they are using deprecated GASNet-1 calls (see below). A process using // such deprecated calls must enable legacy support, which is done implicitly // when a process calls gasnet_init() or explicitly when a caller passes the // GEX_FLAG_USES_GASNET1 flag to gex_Client_Init(). // // The following functions from GASNet-1 have been deprecated in favor of new // GASNet-EX equivalents. These `gasnet_`-prefixed deprecated functions shall // only be invoked if legacy support has been enabled. // + gasnet_AMRequest*() // + gasnet_get*(), including bulk, non-bulk, value-based and VIS // + gasnet_put*(), including bulk, non-bulk, value-based and VIS // + gasnet_memset*() // NOTE: This list is subject to expansion as new GASNet-EX APIs are // implemented which displace less-capable GASNet-1 APIs. // // Note that gasnet_init()/gasnet_attach() may only be called once per process, // and currently only one client per process can use the deprecated GASNet-1 // functions listed above. // #define GEX_FLAG_USES_GASNET1 ((gex_Flags_t)???) // The following API allows jobs that enable legacy support (as described // immediately above) to access the key GASNet-EX objects created explicitly by // gex_Client_Init(), or implicitly by gasnet_init()/gasnet_attach(). The types // and usage of these objects are described below. // // This call is defined in gasnet.h (not gasnetex.h). // // The arguments are all pointers to locations for outputs, each of which // may be NULL if the caller does not need a particular value. // // client_p: receives the gex_Client_t // endpoint_p: receives the gex_EP_t // tm_p: receives the gex_TM_t // segment_p: receives the gex_Segment_t, if any // extern void gasnet_QueryGexObjects(gex_Client_t *client_p, gex_EP_t *endpoint_p, gex_TM_t *tm_p, gex_Segment_t *segment_p); // Calls from restricted context // // The only GASNet functions which may be called within AM handler context, // or while holding a GASNet handler-safe lock are as follows: // // gasnet_mynode(), gasnet_nodes(), gasnet_hsl_*(), gasnet_exit(), // gasnet_QueryGexObjects(), gex_System_QueryNbrhdInfo(), gex_System_QueryHostInfo(), // gex_System_QueryMyPosition(), gex_System_QueryJob{Rank,Size}(), gex_HSL_*(), // gex_*_{Set,Query}CData(), gex_{Client,Segment,EP,TM,AD}_Query*(), gex_TM_Pair(), // gex_AM_Max*(), gex_AM_LUB*(), gex_Token_Max*(), gex_Token_Info(), gasnet_AMGetMsgSource(), // gex_System_GetVerboseErrors(), gex_System_SetVerboseErrors(), // gex_System_QueryMaxThreads(), gex_System_QueryHiddenAMConcurrencyLevel() // // The following are conditionally permitted in handler context, the condition being the // caller must be within an AMRequest handler and not holding a handler-safe lock: // // gasnet_AMReply*(), gex_AM_Reply*() // gex_AM_{Prepare,Commit,Cancel}Reply*(), gex_AM_SrcDesc*() // // The following are conditionally permitted in handler context, the condition // being that the 'flags' argument must include GEX_FLAG_IMMEDIATE: // // gex_EP_QueryBoundSegmentNB() // // All other functions are prohibited to be called from a thread within the // dynamic context of an AM handler, or while holding a handler-safe lock. // This prohibition notably prohibits all communication initiation (aside from Reply // injection from a Request handler), explicit polling and test/wait operations on handles/events. // // Glossary: // The following terms will be used with specific meanings in this document. // // "Collective Call" // // Several APIs in this specification are described as being "collective // calls". All collective calls are collective with respect to a specific // ordered set of participants, which is usually specified by an argument // naming a team (discussed later in detail). The designation of a call // as collective over a given team means: // + For every given team that exists in an execution of the program, all // collective calls made over that team are initiated "in the same order" // by all team members -- otherwise behavior is undefined. // + Here "in the same order" means that for every member of a given team, // the calls over that team and their arguments are "compatible" across all // members at every point in their respective sequence of collective calls // over the team. // + The definition of "compatible" as used here may vary slightly as // defined individually for each call. However, in the absence of per-call // documentation to the contrary the following rules apply: // - The function called must be the same, or from a related group of calls // explicitly documented as mutually compatible. // - Any arguments documented as "single-valued" must be identical across // all callers. // - Any additional argument compatibility constraints documented for a // given call must be satisfied. // // In addition to the requirement on compatibility of collective calls over // any given team, all collective calls over *distinct* teams must be ordered // such that no deadlock would occur if all such calls were replaced by // blocking barriers. A formal specification of this constraint will appear // in a future revision of this document. // "Single-valued" // // This term is used to designate an argument to a collective call as one that // must have the same value on all callers participating in the collective, or // on a well-defined subset of callers. // // In the case of 'flags' arguments, this term may be applied in a qualified // form as "partially single-valued" when the constraint applies only to some // bits (with freedom to differ in the remaining bits). // // Basic types: // // Rank // The type gex_Rank_t is used for a position within, or size of, an ordered // set (such as a team). // Guaranteed to be an unsigned integer type // This type is interoperable with gasnet_node_t typedef [some unsigned integer type] gex_Rank_t; // Pre-defined constant used to indicate "not a rank". // Use may have different semantics in various contexts. // Guaranteed to be larger than any valid rank. // However, a specific value is NOT defined by specification. // In particular, might NOT be equal to GASNET_MAXNODES #define GEX_RANK_INVALID ((gex_Rank_t)???) // "Job rank": // In a non-resilient build this will be the same as the rank in the team // constructed by gex_Client_Init() and will be identical across clients. // This is semantically equivalent to gasnet_mynode(). // // Semantics in a resilient build will be defined in a later release. gex_Rank_t gex_System_QueryJobRank(void); // "Job size": // In a non-resilient build this will be the same as the size in the team // constructed by gex_Client_Init() and will be identical across clients. // This is semantically equivalent to gasnet_nodes(). // // Semantics in a resilient build will be defined in a later release. gex_Rank_t gex_System_QueryJobSize(void); // Utility // By default, certain non-fatal error returns in GASNet-EX will print messages // to the console. This behavior can be queried and set with the following. // Returns non-zero if console messages are enabled for certain non-fatal errors. int gex_System_GetVerboseErrors(); // Enable (1) or disable (0) console messages for certain non-fatal errors. // Values other than 0 and 1 are currently reserved. void gex_System_SetVerboseErrors(int enable); // Client Threads // The maximum number of live client threads permitted to enter GASNet. // // In threaded (non-SEQ) builds of GASNet, client threads making GASNet calls may // implicitly become associated with thread-specific state managed by the GASNet // library. When such a thread exits, a thread destructor registered by the library // cleans up any associated thread-specific state. The library is permitted to limit // the number of live client threads that may concurrently be implicitly associated // with GASNet-managed state. // // + The limit is per-process and the value returned is for the calling process. // + The limit is process-wide, independent of gex_Client_t. // + Threads internal to GASNet, if any, do not count against this limit. // + Client threads which have not yet entered GASNet do not count against // this limit. // + Client threads which exit after having entered GASNet cease to count // against this limit. // // In a SEQ build of GASNet, this query always returns 1. uint64_t gex_System_QueryMaxThreads(void); // Events // An "Event" is an opaque scalar type, representing a handle // to an asynchronous event that will be generated by a pending operation. // Events are a generalization of GASNet-1 handles, in that // a single non-blocking operation may expose several events // associated with its progress (eg local and remote completion). // Initiation of a event-based (NB-suffix) non-blocking operation will // usually generate one root event (representing the completion // of the entire operation), and zero or more leaf events // (representing completion of intermediate steps). // Root events must eventually be synchronized by passing them // to a Wait or successful Test function, which recycles all the // events (root and leaf) associated with the operation in question. // Leaf events may optionally be synchronized before that point. // This type is interoperable with gasnet_handle_t // - Sync operation: test/wait with one/all/some flavors // + Success consumes the event typedef ... gex_Event_t; // Pre-defined output values of type gex_Event_t // - GEX_EVENT_INVALID // + result for already-completed operation // + synonymous with GASNET_INVALID_HANDLE // + guaranteed to be zero // - GEX_EVENT_NO_OP // + result for a failed communication attempt (eg immediate-mode // injection that encountered backpressure) // + guaranteed to be non-zero // + Erroneous to pass this value to test/wait operations #define GEX_EVENT_INVALID ((gex_Event_t)0) #define GEX_EVENT_NO_OP ((gex_Event_t)???) // Pre-defined input values of type gex_Event_t* // These are passed to communication injection operations // in place of a pointer to an actual gex_Event_t for certain leaf // events, to forgo an independent leaf event and instead request // specific predefined behavior: // - GEX_EVENT_NOW // + Pass to require completion of the leaf event before returning // from the initiation call // - GEX_EVENT_DEFER // + Pass to allow deferring completion of the leaf event to as late // as completion of the root event // - GEX_EVENT_GROUP // + Pass to NBI initiation calls to allow client to use NBI-based // calls to detect event completion (or to use an explicit event // returned/generated by gex_NBI_EndAccessRegion()). #define GEX_EVENT_NOW ((gex_Event_t*)???) #define GEX_EVENT_DEFER ((gex_Event_t*)???) #define GEX_EVENT_GROUP ((gex_Event_t*)???) // Integer flag type used to pass hints/assertions/modifiers to various functions // Flag value bits to a given API are guaranteed to be disjoint, although // flag values used for unrelated functions might share bits. typedef [some integer type] gex_Flags_t; // // Flags for point-to-point communication initiation // // // IMMEDIATE // // This flag indicates that GASNet-EX *may* return without initiating // any communication if the conduit could determine that it would // need to block temporarily to obtain the necessary resources. In // this case calls with return type 'gex_Event_t' return // GEX_EVENT_NO_OP while those with return type 'int' will // return non-zero. // // Additionally, calls with this flag are not required to make any // progress toward recovery of the "necessary resources". Therefore, // clients should not assume that repeated calls with this flag will // eventually succeed. In the presence of multiple threads, it is // even possible that calls with this flag may never succeed due to // racing for resources. // #define GEX_FLAG_IMMEDIATE ((gex_Flags_t)???) // // LC_COPY_{YES,NO} // // This mutually-exclusive pair of flags *may* override GASNet-EX's // choice of whether or not to make a copy of a source payload (of a // non-blocking Put or AM) for the purpose of accelerating local // completion. In the absence of these flags the conduit-specific // logic will apply. // // NOTE: these need more thought w.r.t. the implementation and // specification #define GEX_FLAG_LC_COPY_YES ((gex_Flags_t)???) [UNIMPLEMENTED] #define GEX_FLAG_LC_COPY_NO ((gex_Flags_t)???) [UNIMPLEMENTED] // // PEER_NEVER_{SELF,NBRHD} // [Since spec v0.14] // // These flags, passed to a supporting communication initiation API, assert to // the GASNet-EX library that the '(tm,rank)' tuple (or equivalent) does NOT // name an endpoint in certain processes. // // Use of these flags *may* allow the library to omit its own checks for the // asserted condition. However, to have this desired impact, the compiler must // be capable of statically deciding their presence in the 'flags' argument. // Therefore, non-trivial logic to determine whether or not to pass either of // these flags is strongly discouraged. The intended use case for these flags // is in situations where the asserted property is known without additional // logic at the specific call site. // // Providing an assertion which is untrue will yield undefined results (though // in a high-quality implementation, a debug build will report the discrepancy). // // SELF - Asserts that the "remote" peer in a communication call is not // an endpoint in the initiating process. // NBRHD - Asserts that the "remote" peer in a communication call is not // an endpoint in any process in the initiator's nbrhd. // // Use of GEX_FLAG_PEER_NEVER_NBRHD implies GEX_FLAG_PEER_NEVER_SELF. // However, their use is not mutually exclusive. // // Currently these flags are valid to pass to: // gex_RMA_*() // // A future revision may permit these flags for additional communication // injection calls. #define GEX_FLAG_PEER_NEVER_SELF ((gex_Flags_t)???) #define GEX_FLAG_PEER_NEVER_NBRHD ((gex_Flags_t)???) // // AD_MY_{RANK,NBRHD} // // This mutually-exclusive pair of flags each assert a locality property of // the target of a remote atomic operation, and are described in detail in // the "Remote Atomic Operations" section. // #define GEX_FLAG_AD_MY_RANK ((gex_Flags_t)???) #define GEX_FLAG_AD_MY_NBRHD ((gex_Flags_t)???) // // AD_FAVOR_{MY_RANK,MY_NBRHD,REMOTE} // // This mutually-exclusive group of flags each request that gex_AD_Create() // bias its algorithm selection to favor calls with a given locality property // for the target locations, and are described in detail in the "Remote Atomic // Operations" section. // #define GEX_FLAG_AD_FAVOR_MY_RANK ((gex_Flags_t)???) #define GEX_FLAG_AD_FAVOR_MY_NBRHD ((gex_Flags_t)???) #define GEX_FLAG_AD_FAVOR_REMOTE ((gex_Flags_t)???) // // AD_{ACQ,REL} // // This pair of flags requests memory fencing behaviors for remote atomic // operations, and are described in detail in the "Remote Atomic Operations" // section. It is permitted to include zero, one, or both of these flags // when calling gex_AD_Op*(). // #define GEX_FLAG_AD_ACQ ((gex_Flags_t)???) #define GEX_FLAG_AD_REL ((gex_Flags_t)???) // // RANK_IS_JOBRANK // // This flag indicates, to those calls explicitly documented as accepting it, // that the 'rank' (or equivalent argument) is a jobrank rather than a rank // within the normal associated team. // // Currently this flags is accepted by: // gex_AD_Op*() // #define GEX_FLAG_RANK_IS_JOBRANK ((gex_Flags_t)???) // // AM_PREPARE_LEAST_{CLIENT,ALLOC} // // This pair of mutually exclusive flags modify the behavior of the // gex_AM_Max{Request,Reply}{Medium,Long}() queries to request the largest // legal 'least_payload' argument to the corresponding "gex_AM_Prepare*()" // rather than the default behavior (returning the largest legal 'nbytes' // argument to the corresponding "gex_AM_{Request,Reply}*()"). // // CLIENT - query largest 'least_payload' for a Prepare call with a // client-provided buffer (non-NULL 'client_buf' argument). // ALLOC - query largest 'least_payload' for a Prepare call with a // GASNet-allocated buffer (NULL 'client_buf' argument). // // Legal (and meaningful) in gex_AM_Max{Request,Reply}{Medium,Long}() calls. // Ignored in gex_AM_Prepare{Request,Reply}{Medium,Long}() calls. // Invalid in gex_AM_{Request,Reply}{Medium,Long}*() calls. // #define GEX_FLAG_AM_PREPARE_LEAST_CLIENT ((gex_Flags_t)???) #define GEX_FLAG_AM_PREPARE_LEAST_ALLOC ((gex_Flags_t)???) // SEGMENT DISPOSITION // // The following family of flags assert the segment disposition of // address ranges provided to communication initiation operations. // // The segment disposition flags come in two varieties: // // SELF - describes the segment disposition of addresses associated // with local buffers and the initiating endpoint (ie the EP // which is usually implicitly named by a gex_TM_t argument). // Eg in a Put operation this variety describes source locations, // and in a Get this variety describes destination locations. // // PEER - describes the segment disposition of buffers associated // with (potentially) remote memory and the peer endpoint(s) // (the EPs usually explicitly named by gex_Rank_t arguments). // Eg in a Put operation this variety describes destination locations, // and in a Get this variety describes source locations. // // The following flags are mutually exclusive within each variety - // a given operation may specify at most one SELF flag and one PEER flag. // Unless otherwise noted, the default behavior for each variety in the // absence of an explicitly provided flag corresponds to: // + When the local EP is unbound or bound to host memory: // GEX_FLAG_SELF_SEG_UNKNOWN, GEX_FLAG_PEER_SEG_BOUND // + When the local EP is bound to a device segment: // GEX_FLAG_SELF_SEG_BOUND, GEX_FLAG_PEER_SEG_BOUND // These are backwards-compatible with GASNet-1 segment behavior (where // there is no support for device memory). // NOTE: the flags below are currently [UNIMPLEMENTED], and consequently // these defaults are also the only supported settings for all APIs. // // Each explicit flag has a distinct bit pattern. // Unless otherwise noted, the caller is responsible for ensuring the // assertions expressed by these flags to a given call remain true for // the entire period of time that the described address sequences are "active" // with respect to the operation requested by the call. The definition of // "active" varies based on call type, but generally extends from entry to // the call accepting the assertions until completion is signalled for // all described address ranges. // // {SELF,PEER}_SEG_UNKNOWN // // These flag bits indicate that the corresponding address range(s) // are not known by the caller to reside within current GASNet-EX segments. // Example 1: the address ranges are known to lie partially or entirely // outside any segments in the process hosting the respective endpoint(s). // Example 2: the caller lacks information about the segment disposition // of the address ranges, and passes this flag to reflect a lack of // such assertions and request maximally permissive behavior // (potentially incurring a performance cost). #define GEX_FLAG_SELF_SEG_UNKNOWN ((gex_Flags_t)???) [UNIMPLEMENTED] #define GEX_FLAG_PEER_SEG_UNKNOWN ((gex_Flags_t)???) [UNIMPLEMENTED] // // {SELF,PEER}_SEG_SOME // // These flag bits assert that the corresponding address range(s) // are contained entirely within the union of current GASNet-EX segments // created by any client in the process hosting the respective endpoint. #define GEX_FLAG_SELF_SEG_SOME ((gex_Flags_t)???) [UNIMPLEMENTED] #define GEX_FLAG_PEER_SEG_SOME ((gex_Flags_t)???) [UNIMPLEMENTED] // // {SELF,PEER}_SEG_BOUND // // These flag bits assert that the corresponding address range(s) // are contained entirely within the segment bound to the respective endpoint. // Implies that the respective endpoint has a bound segment. #define GEX_FLAG_SELF_SEG_BOUND ((gex_Flags_t)???) [UNIMPLEMENTED] #define GEX_FLAG_PEER_SEG_BOUND ((gex_Flags_t)???) [UNIMPLEMENTED] // // {SELF,PEER}_SEG_OFFSET // // These flag bits indicate that the corresponding address argument(s) // are byte *offsets* relative to the bound segment base address. // Implies that the respective endpoint has a bound segment, and // that the specified range(s) are contained entirely within that segment. #define GEX_FLAG_SELF_SEG_OFFSET ((gex_Flags_t)???) [UNIMPLEMENTED] #define GEX_FLAG_PEER_SEG_OFFSET ((gex_Flags_t)???) [UNIMPLEMENTED] // COLLECTIVE SCRATCH ALLOCATION // // The following family of flags control the interpretation of address ranges // provided to team construction APIs to describe collective scratch spaces. // // TM_{GLOBAL,LOCAL,SYMMETRIC,NO}_SCRATCH // This mutually-exclusive group indicates the number and meaning of // a gex_Addr_t specified to certain team construction APIs. // [Since spec v0.9:] // GLOBAL: gex_Addr_t per member of the output team // LOCAL: gex_Addr_t per local member of the output team // SYMMETRIC: single gex_Addr_t used for all members of the output team // [Since spec v0.11:] // NO: no gex_Addr_t (and no scratch space is allocated). // #define GEX_FLAG_TM_GLOBAL_SCRATCH ((gex_Flags_t)???) // gex_TM_Create only #define GEX_FLAG_TM_LOCAL_SCRATCH ((gex_Flags_t)???) // gex_TM_Create only #define GEX_FLAG_TM_SYMMETRIC_SCRATCH ((gex_Flags_t)???) // gex_TM_Create only #define GEX_FLAG_TM_NO_SCRATCH ((gex_Flags_t)???) // gex_TM_Create and gex_TM_Split // // SCRATCH_SEG_OFFSET // // This flag bit indicates that the corresponding gex_Addr_t argument(s) // are byte *offsets* relative to the bound segment base address. // Implies that the respective endpoint has a bound segment, and // that the specified range(s) are contained entirely within that segment. #define GEX_FLAG_SCRATCH_SEG_OFFSET ((gex_Flags_t)???) [UNIMPLEMENTED] // GEX_FLAG_GLOBALLY_QUIESCED // [Since spec v0.10] // // This flag bit indicates to the corresponding object destructor call that // the client has satisfied the call's documented global quiescence criteria. // This permits, but does not require, the implementation to elide // synchronization which might otherwise be required. #define GEX_FLAG_GLOBALLY_QUIESCED ((gex_Flags_t)???) // A "token" is an opaque scalar type // This type is interoperable with gasnet_token_t typedef ... gex_Token_t; // Handler index - a fixed-width integer type, used to name an AM handler // This type is interoperable with gasnet_handler_t typedef uint8_t gex_AM_Index_t; // Handler argument - a fixed-width integer type, used for client-defined handler arguments // This type is interoperable with gasnet_handlerarg_t typedef int32_t gex_AM_Arg_t; // Handler function pointer type typedef ... gex_AM_Fn_t; // Widest scalar and width // This type is interoperable with gasnet_register_value_t typedef [some unsigned integer type] gex_RMA_Value_t; // Preprocess-time constant size of gex_RMA_Value_t // Synonymous with SIZEOF_GASNET_REGISTER_VALUE_T #define SIZEOF_GEX_RMA_VALUE_T ... // gex_Addr_t // Type which is suitable to hold both addresses and offsets. // // This is always an alias for `void*`, but is given a distinct type to make // prototypes self-documenting with respect to arguments which may (with the // proper flags) be interpreted alternatively as addresses or offsets. typedef void* gex_Addr_t; // Memvec // A "memvec" describes a tuple of memory address and length // gex_Memvec_t is guaranteed to have the same in-memory representation as gasnet_memvec_t; // these two struct types name their fields differently so they are technically // incompatible as far as the compiler is concerned -- it *is* safe to type-pun // pointers to them with explicit casts. typedef struct { void *gex_addr; // [EXPERIMENTAL]: will eventually have type gex_Addr_t size_t gex_len; } gex_Memvec_t; // gex_EP_t is an opaque scalar handle to an Endpoint (EP), // a local representative of an isolated communication context typedef ... gex_EP_t; // Pre-defined value of type gex_EP_t // This zero value is guaranteed never to alias a valid endpoint #define GEX_EP_INVALID ((gex_EP_t)0) // gex_EP_Index_t is an unsigned integer type. // // Every EP within a given gex_Client_t can be uniquely identified by // the jobrank of a process and an endpoint index. // The primordial endpoint, created by gex_Client_Init(), will always have // an index of 0. At this time, there are no other guarantees regarding how // endpoint indices are allocated/assigned. typedef ... gex_EP_Index_t; // Max supported number of endpoints per client in each process. // This is an optimistic compile-time constant which cannot account // for limitations due to scarcity of network resources and/or memory. // The value is implementation-defined and may be conduit-specific. #define GASNET_MAXEPS ... // gex_EP_Location_t is a (rank, ep_index) tuple. typedef struct { gex_Rank_t gex_rank; gex_EP_Index_t gex_ep_index; } gex_EP_Location_t; // gex_Client_t is an opaque scalar handle to a Client, // an instance of the client interface to the GASNet library typedef ... gex_Client_t; // Pre-defined value of type gex_Client_t // This zero value is guaranteed never to alias a valid client #define GEX_CLIENT_INVALID ((gex_Client_t)0) // gex_Segment_t is an opaque scalar handle to a Segment, // a local client-declared memory range for use in communication typedef ... gex_Segment_t; // Pre-defined value of type gex_Segment_t // Used, for instance, to indicate no bound segment #define GEX_SEGMENT_INVALID ((gex_Segment_t)0) // In general, gex_TM_t is an opaque scalar handle to a Team Member, // a collective communication context used for remote endpoint naming. // There is also a less-general form, known as a "TM-pair" which carries only // sufficient information for naming an endpoint in point-to-point communication // or queries. // In collective calls, an argument of type gex_TM_t specifies both an ordered // set of Endpoints (local or remote), and a local gex_EP_t, a local // representative of that team. Use of a TM-pair is prohibited in such calls. // In point-to-point calls the local and remote gex_EP_t are named by a tuple // consisting of one argument of type gex_TM_t and another of type gex_Rank_t // together. Similarly, several queries take a '(tm,rank)' tuple to name an // endpoint. Use of a TM-pair or a fully general gex_TM_t are both permitted // in these non-collective calls. typedef ... gex_TM_t; // Pre-defined value of type gex_TM_t // This zero value will never to alias a valid gex_TM_t (including TM-pairs) #define GEX_TM_INVALID ((gex_TM_t)0) // // Client-Data (CData) // // The major opaque object types in GASNet-EX provide the means for the client // to set and retrieve one void* field of client-specific data for each object // instance, which is NULL for newly created objects. void gex_Client_SetCData(gex_Client_t client, const void *val); void* gex_Client_QueryCData(gex_Client_t client); void gex_Segment_SetCData(gex_Segment_t seg, const void *val); void* gex_Segment_QueryCData(gex_Segment_t seg); void gex_TM_SetCData(gex_TM_t tm, const void *val); void* gex_TM_QueryCData(gex_TM_t tm); void gex_EP_SetCData(gex_EP_t ep, const void *val); void* gex_EP_QueryCData(gex_EP_t ep); // // Operations on gex_Client_t // // Query flags passed to gex_Client_Init() gex_Flags_t gex_Client_QueryFlags(gex_Client_t client); // Query client name passed to gex_Client_Init() const char * gex_Client_QueryName(gex_Client_t client); // Initialize the client // This is a collective call over all processes comprising this GASNet job. // Currently supports only one call per job. // * clientName must reference a string that uniquely identifies this client // within the process, and must match the pattern: [A-Z][A-Z0-9_]+ // The contents of the string referenced by clientName must be single-valued. // In future release this string will be used in such contexts as error messages // and naming of environment variables to control per-client aspects of GASNet. // * argc/argv are optional references to the command-line arguments received by main(). // The caller is permitted to pass NULL for both arguments, if this is done // by all callers. However, providing pointers to the values received in // main() may improve portability or supplementary services. // * client_p, ep_t and tm_p are OUT parameters that receive references to the // newly-created Client, the primordial (thread-safe) Endpoint for this process/client, // and the primordial Team (which contains all the primordial Endpoints, one // for every process in this job). // * flags control the creation of the primordial objects. Supported flags: // + GEX_FLAG_USES_GASNET1 - created client requests the use of GASNet-1 APIs // (defined in gasnet.h). Only permitted for use in one client per process. // + GEX_FLAG_DEFER_THREADS [Since spec v0.18] [EXPERIMENTAL] // Client requests that the conduit defer launching of internal progress // threads. See `gex_System_QueryProgressThreads()` for information on the // means for the client to control launch of the progress threads, if any, // after return from `gex_Client_Init()`. // This is a single-valued parameter. // // There is an implicit barrier synchronization prior to return from this call // to ensure that creation of communications resources has completed on all // callers prior to return on any caller. extern int gex_Client_Init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags); // // Operations on gex_Segment_t // // NOTE: *currently* gex_Segment_Attach() is the only way to create a segment // suitable for use as the bound segment of a primordial endpoint (one created // by gex_Client_Init). In particular, the current release does not *yet* // support use of the APIs gex_Segment_Create(), gex_EP_BindSegment() and // gex_EP_PublishBoundSegment() as an alternative to Attach. However, support // for that usage may appear in a future release. // // See also in [PROPOSED] section: // gex_Segment_Create() // gex_EP_BindSegment() // // Query owning client gex_Client_t gex_Segment_QueryClient(gex_Segment_t seg); // Query flags passed when segment was created // There are no segment flags defined in the current release. gex_Flags_t gex_Segment_QueryFlags(gex_Segment_t seg); // Query base address of a segment // For segments created using gex_Create_Segment() with a 'kind' not equal to // GEX_MK_HOST, the return value is a device address. // Otherwise, it is a host address. void * gex_Segment_QueryAddr(gex_Segment_t seg); // Query length of a segment uintptr_t gex_Segment_QuerySize(gex_Segment_t seg); // Collective allocation and creation of Segments // Analogous to gasnet_attach (but see below) // // This is a collective call over the team named by the 'tm' argument that // allocates and binds a local GASNet segment on each caller. // // There is an implicit barrier synchronization prior to return from this call // to ensure that the creation and binding of a segment has completed on all // callers prior to return on any caller. // // segment_p: An OUT parameter that receives the newly created gex_Segment_t. // This is not a single-valued parameter. // tm: The call is collective over this team. // size: Size of the local segment to allocate and bind to the local // Endpoint represented by tm. The value must be a non-zero // multiple of GASNET_PAGESIZE, not larger than // gasnet_getMaxLocalSegmentSize(). // This is not a single-valued parameter. // // The current release allows up to one call per process. // // The current release requires that 'tm' be the team created by // gex_Client_Init(). // // NOTE: gex_Segment_Attach() does not provide alignment of segments across ranks. // Use of --enable-aligned-segments at configure time and definition of // GASNET_ALIGNED_SEGMENTS at compile time are relevant only to the legacy // gasnet_attach() interface. // // NOTE: In the current release, when the legacy GASNET_SEGMENT_EVERYTHING // configuration is in effect, the following additional rules apply: // - In this mode, the primordial endpoint is implicitly bound to the entire // virtual address space by gex_Client_Init(), and this call has no semantic // effect (aside from a barrier synchronization). // - If the optional call is made, the size argument is ignored, and the resulting // gex_Segment_t in `*segment_p` shall be GEX_SEGMENT_INVALID. extern int gex_Segment_Attach( gex_Segment_t *segment_p, gex_TM_t tm, uintptr_t size); // // Operations on gex_TM_t // // Query owning client gex_Client_t gex_TM_QueryClient(gex_TM_t tm); // Query corresponding endpoint gex_EP_t gex_TM_QueryEP(gex_TM_t tm); // Query flags passed when tm was created gex_Flags_t gex_TM_QueryFlags(gex_TM_t tm); // Query rank of team member, and size of team gex_Rank_t gex_TM_QueryRank(gex_TM_t tm); gex_Rank_t gex_TM_QuerySize(gex_TM_t tm); // Split a Team into zero or more disjoint teams // // This is a collective call over the team named by the 'parent_tm' argument // that creates zero or more new teams. While this call is collective, the // arguments are NOT required to be single-valued over the parent team, except // as noted for certain bits in 'flags'. However, the value of 'scratch_size' // (if applicable) must be collective over callers passing the same 'color'. // // + When passing any of the GEX_FLAG_TM_SCRATCH_SIZE_* family of flags, this // call is a collective query to determine the minimum or recommended value // for the 'scratch_size' argument, based on the other parameters (excluding // scratch_addr and scratch_len). No teams are created and nothing is // written into `new_tm_p`. Otherwise, this call creates zero or more teams // as described in the remaining semantics. // + When not operating as a query, the return value is currently undefined. // + Callers passing NULL for 'new_tm_p' do not participate in team creation. // This assists in following the collective call requirement without the // need to create teams that are not needed by the client. // + For callers passing non-NULL for 'new_tm_p', this call creates a new team // consisting of the associated endpoints of all such callers passing the // same value of 'color'. // + Within each newly created team, ranks are assigned (contiguously from // zero) by increasing order of the 'key' argument of the members. In the // case of equal 'key', ties are broken by ranks in the 'parent_tm' team. // In particular this implies that if all ranks pass the same 'key' value, // then relative rank order from the 'parent_tm' is preserved in all created // teams. // + The client may optionally provide scratch space within the bound segment // of the endpoint corresponding to 'parent_tm', for use by the // implementation. No portion of this memory may be written by the client // or passed to any GASNet function, nor may the segment be destroyed, for // the lifetime of the newly created team. When the team is destroyed, // ownership of this memory is returned to the client. // To NOT provide a scratch space, the client must pass 'flags' containing // 'GEX_FLAG_TM_NO_SCRATCH'. // [TBD: what about Unbind of the segment w/o destroying it?] // // new_tm_p: An OUT parameter that receives the gex_TM_t representing the // newly-created team, if any. // parent_tm: The call is collective over this team. // color: A non-negative integer used to match callers to belong to the // same new team. // key: An integer used to order the ranks within newly created teams. // scratch_addr, scratch_size: // If 'GEX_FLAG_TM_NO_SCRATCH' appears in 'flags', then these two // arguments are ignored. Otherwise, the memory // [scratch_addr, scratch_addr+scratch_size) // is granted to the implementation for internal use. // The value of 'scratch_size' must be single-valued over the members // of each new team to be created (non-NULL 'new_tm_p' and same 'color'). // The value of 'scratch_size' must non-zero. // flags: // Single valued: // GEX_FLAG_TM_SCRATCH_SIZE_* // These mutually exclusive flags convert this call into a collective query. // No team is created in the presence of any flag in this family. // - GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED // This query returns the recommended optimal value to be passed in // 'scratch_size' for a subsequent call to gex_TM_Split() with the same // value for the other arguments. In particular, a NULL value of the // 'new_tm_p' indicates the caller will not be a member of any team // created by the subsequent split (and thus the return will be zero). // Return values are guaranteed to be single-valued over the members // of each new team to be created (non-NULL 'new_tm_p' and same 'color'). // - GEX_FLAG_TM_SCRATCH_SIZE_MIN [DEPRECATED at spec version 0.11] // This flag is deprecated and will be removed in a future release. // Use in this release will printing a warning at runtime. // Partially single valued: // GEX_FLAG_TM_NO_SCRATCH // This flag causes creation of a team without a scratch space. The // 'scratch_addr' and 'scratch_size' arguments are ignored. This flag // is intended for use when creating teams which will not perform any // significant collectives, and its use otherwise will most likely // degrade the performance of collectives. // Presence/absence of this flag must be single-valued over the members // of each new team to be created (non-NULL 'new_tm_p' and same 'color'). // Non-single valued: // None currently defined // size_t gex_TM_Split(gex_TM_t *new_tm_p, gex_TM_t parent_tm, int color, int key, void *scratch_addr, size_t scratch_size, gex_Flags_t flags); // Create zero or more new disjoint Teams // [Since spec v0.9] // // This is a collective call which provides the means to construct one or more // teams per call (at most one per caller) with greater generality than the // gex_TM_Split(), including the ability to incorporate endpoints not yet in any // team. // // While this call is collective, the arguments are NOT required to be // single-valued over the parent team, except as noted for certain bits in // 'flags'. However, the value of some arguments must be collective over // callers which comprise the same "output team". // // + Collective over parent_tm, which must contain at least one member for every // process named in the args[] of any caller. // + When flags contains GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED (presence of which // must be single-valued over the parent team), this API behaves analogously // to that documented for gex_TM_Split(): returning the recommended size for // the collective scratch space of the team which would otherwise be created // for this caller based on the arguments num_new_tms, numargs and args[], and // ignoring the arguments new_tms, scratch_length and scratch_addrs. // Similarly, passing the (deprecated) GEX_FLAG_TM_SCRATCH_SIZE_MIN returns // the minimum scratch size. // In the absence of these flags, the remaining semantics apply. // + Creates either zero (for numargs == 0) teams or one team (for numargs > 0) // per caller. // + When passing numargs == 0, the caller must provide a value for flags which // is consistent with any "single-valued over the parent team" constraints. // However, all arguments other than parent_tm, numargs and flags are ignored // (and subsequent semantics constraining the ignored arguments do not apply). // + The args[] must contain numargs > 0 distinct elements naming every endpoint // to become a member of the team the caller is creating, in rank order. // + The gex_rank field of args[] specifies a process by jobrank if // GEX_FLAG_RANK_IS_JOBRANK is present in flags, otherwise the gex_rank field // is a rank relative to parent_tm and the process is the one associated with // that team member. // + The presence/absence of GEX_FLAG_RANK_IS_JOBRANK in flags must be // single-valued over the output team. // + The value of numargs and content of args[] must be single-valued over the // output team. // + Taken over all callers, any two non-empty args[] arrays must either be // identical (constructing the same team) or name a disjoint set of endpoints // (creating a distinct, non-overlapping team). A numargs == 0 caller is // always disjoint. // + The immediately preceding restriction applies not only to callers in // distinct processes, but also to the case of multiple callers per process // (due to multiple members in parent_team). // + The value of numargs and content of args[] are not required to be // single-valued over parent_tm, allowing for creation of multiple teams per // collective call (but at most one per caller). // + The endpoint corresponding to parent_tm is not required to be among the // entries in args[]. // + The value of num_new_tms must equal the number of local endpoints named in // args[], and the location named by new_tms[] must have sufficient space to // receive num_new_tms entries. // + On output, the array new_tms[] will be populated with a distinct gex_TM_t // for each local member in the newly created team, in their respective rank // order. No entries will be populated or skipped/reserved for non-local // members. // + Each new team is created with a collective scratch space, which may be // optionally provided from the bound segment of the corresponding endpoint // via the scratch_length and scratch_addrs arguments. // + As with gex_TM_Split(), this "option" is actually required in the current // implementation. // + The argument scratch_length must be single-valued over the output team. // + If GEX_FLAG_SCRATCH_SEG_OFFSET is set in flags, then the value(s) in // scratch_addrs[] are byte offsets into the respective bound segments of the // endpoints being joined into the new team. Otherwise, these values are // virtual addresses in those same bound segments. // + The presence/absence of GEX_FLAG_SCRATCH_SEG_OFFSET in flags must be // single-valued over the output team. // + The length and contents of scratch_addrs[] depends on which of the // following mutually-exclusive values are included in the value of flags // (there is currently no default). // - GEX_FLAG_TM_SYMMETRIC_SCRATCH // There is exactly one entry in scratch_addrs[] and it provides the address // or offset used for all members of the output team. // - GEX_FLAG_TM_LOCAL_SCRATCH // The array scratch_offsets[] has length num_new_tms and provides the // addresses or offsets for each local member in the output team. // - GEX_FLAG_TM_GLOBAL_SCRATCH // The array scratch_offsets[] has length num_args and provides the // addresses or offsets for every member in the output team. // - GEX_FLAG_TM_NO_SCRATCH // The arguments scratch_length and scratch_offsets[] are ignored. // No scratch space is assigned and collectives over this team are prohibited // (this prohibition may be relaxed in the future). // + Scratch space, if any, must always reside in a bound segment with kind // GEX_MK_HOST. Consequently, calls to this team constructor that include // endpoints bound to segments with other memory kinds (such as devices) // currently MUST pass GEX_FLAG_TM_NO_SCRATCH. // This restriction might be relaxed in the future. // + The mutually exclusive choice of // GEX_FLAG_TM_{SYMMETRIC,LOCAL,GLOBAL,NO}_SCRATCH in flags must be // single-valued over the output team. // + This call is guaranteed to provide sufficient synchronization that each // caller may begin using the new handles in new_tms[] immediately following // return. If flags included GEX_FLAG_TM_LOCAL_SCRATCH then this call provides // barrier synchronization individually over each new team created by the call. // In all other cases the implementation is permitted but not required to include // barrier synchronization, which may or may not be necessary to allow immediate // use of the resulting team. // // NOTE: The current implementation only supports creation of teams composed // entirely of primordial endpoints, even with conduits which support creation // of additional endpoints. This limitation will be removed in a later release. size_t gex_TM_Create( gex_TM_t *new_tms, // OUT size_t num_new_tms, // Length of new_tms gex_TM_t parent_tm, gex_EP_Location_t *args, // IN size_t numargs, // single-valued over output team gex_Addr_t *scratch_addrs, // IN size_t scratch_size // single-valued over output team gex_Flags_t flags); // Flags (partially single-valued) // Destroy a (quiesced) team // [Since spec v0.10] // // This is a collective call to destroy a team which is no longer needed and // reclaim associated resources. // // + This call is collective over members of the team named by tm. // + Destroys the team, releasing resources allocated to it by the // implementation. // + It is erroneous to destroy the primordial team. // + Use of tm after return from this call is erroneous. // + Does not destroy the endpoint associated with tm. // + For the purpose of this API, a tm has been "locally quiesced" only when // all of the following are true with respect to calls initiated on the local // process: // - No calls taking this tm as an argument are executing concurrently on // other threads. // - All collective operations using this tm are complete (client has synced // their gex_Event_t's). // - Any gex_AD_t objects created using this tm have been destroyed. // + The identifier GEX_FLAG_GLOBALLY_QUIESCED is a preprocessor macro // expanding to a constant integer expression suitable for use as a value of // type gex_Flags_t. // + By default, the tm must be locally quiesced on *each* caller before it may // invoke this API. However, if GEX_FLAG_GLOBALLY_QUIESCED is passed in // flags, then the caller is additionally asserting that the tm has been // quiesced on *all* callers (globally) prior to any caller invoking this API. // + The presence/absence of GEX_FLAG_GLOBALLY_QUIESCED in flags must be // single-valued. // + Regardless of the presence/absence of GEX_FLAG_GLOBALLY_QUIESCED in flags, // this call is permitted, but not required, to incur barrier synchronization // across tm. // + The scratch_p argument may be NULL. If non-NULL then if-and-only-if the // collective scratch space used by the team was provided by the client, then // its location is written to the location named by the scratch_p argument. // + If a value is written to *scratch_p then return value is non-zero. // Otherwise, zero is returned. // + [UNIMPLEMENTED] If GEX_FLAG_SCRATCH_SEG_OFFSET is set in flags, then the // value (if any) written to the gex_addr field of *scratch_p is assigned the // byte offset into the bound segment of the endpoint associated with tm. // Otherwise, the value (if any) assigned to this field is a virtual address. // + The presence/absence of GEX_FLAG_SCRATCH_SEG_OFFSET in flags need not be // single-valued, and need not match the value used at team construction. // + Any cleanup action with respect to ClientData associated with the tm is // the client's responsibility. // // The specification of GEX_FLAG_GLOBALLY_QUIESCED is intended to make the // synchronization optional in order to remove unnecessary barriers. For // instance given a scenario in which a client has a "row team" and a "column // team" with a common parent, it would be sufficient to locally quiesce both // teams, followed by a barrier over their common parent, followed by making // back-to-back calls to destroy these row and column teams with this flag. // // The definition of "locally quiesced" intentionally excludes completion of // non-blocking point-to-point operations using tm at their initiation. This // is possible because the semantics of such operations depend on the endpoints // involved, and not on the tm used to name them. // // The optional scratch_p argument is intended to assist the client in // reclaiming use of the space it may have granted to the collectives // implementation when the team was created, without creating a requirement // for the client to track something GASNet-EX already tracks. int gex_TM_Destroy( gex_TM_t tm, gex_Memvec_t *scratch_p, // OUT gex_Flags_t flags); // Create an "ad hoc" TM for point-to-point communication // [Since spec v0.12] // // This API provides the means to locally construct a value which can be passed // as the tm argument to point-to-point communication calls in lieu of a // collectively created team, allowing communication between endpoints which // might not be members of any common team (or of any team at all). // // With the exception of AM Replies, all GASNet-EX point-to-point // communications APIs name both the local and remote endpoints using a pair of // arguments of type gex_TM_t and gex_Rank_t. However, a gex_TM_t // corresponding to a team has associated semantics that are not well-suited to // inclusion of endpoints which lack corresponding host CPU threads to perform // collective calls. This API allows for communication to/from the memory in // segments bound to any endpoint in the job without the need include it in // a team. // // + This is not a collective operation. // + Returns a value of type gex_TM_t representing an ad hoc "TM-pair" // consisting of the given local_ep in the calling process and the endpoint // with index remote_ep_index in the process with a jobrank given by the rank // argument passed along with this gex_TM_t in a point-to-point communication // call. // + gex_TM_Pair is a lightweight, non-communicating utility call. // + The result is a TM-pair value which may be stored, reused or discarded, // and has no corresponding free or release call (although it only remains // valid for use while the referenced endpoints exist). // + Two TM-pair values will compare equal if and only if they were created by // calls to gex_TM_Pair() with the same arguments, and will never compare // equal to a gex_TM_t created by other means. // + The result is not a valid argument to any API with a prefix of gex_TM_, // gex_AD_ or gex_Coll_, nor to any API documented as collective over the // argument (regardless of prefix). // + The result is valid for use in AM payload limit queries: // gex_AM_Max{Request,Reply}{Medium,Long}() // + The result is valid for use in bound segment queries: // gex_Segment_QueryBound() [DEPRECATED] and gex_EP_QueryBoundSegmentNB() // + The result is valid for use in point-to-point communication calls in the // gex_RMA_*(), gex_VIS_*() and gex_AM_*() families when used in a manner // similar to what is shown in examples below. // // Example 1. // A call to gex_RMA_GetNBI() to read from the endpoint with index rem_idx on // the process with the given jobrank, and initiated using the local endpoint // loc_ep: // gex_RMA_GetNBI(gex_TM_pair(loc_ep, rem_idx), dest, jobrank, src, nbytes, flags); // // Example 2. // Communicating between a local endpoint ep0 and the remote endpoints with // index 1 in several processes, using a single TM-Pair: // gex_TM_t tm_pair_01 = gex_TM_pair(ep0, 1); // for (int i = 0; i < num_peers; ++i) // gex_RMA_GetNBI(tm_pair_01, dest[i], jobrank[i], src[i], nbytes, flags); gex_TM_t gex_TM_Pair( gex_EP_t local_ep, gex_EP_Index_t remote_ep_index); // Translations between (tm,rank) and jobrank // // These functions provide translations in either direction between a // (tm,rank) pair and a jobrank. // // gex_Rank_t gex_TM_TranslateRankToJobrank(tm, rank) // Returns the jobrank of the endpoint in 'tm' with the given 'rank'. // Requires 0 <= rank < gex_TM_QuerySize(tm) // gex_Rank_t gex_TM_TranslateJobrankToRank(tm, jobrank) // If there is an endpoint in 'tm' with the given 'jobrank', return its // rank in 'tm'. Otherwise, returns GEX_RANK_INVALID. // Requires 0 <= jobrank < gex_System_QueryJobSize() // // These queries MAY communicate. // [TBD: exception for 'self' in one both directions?] // These calls are not legal in contexts which prohibit communication, // including (but not limited to) AM Handler context or when holding an HSL. // gex_Rank_t gex_TM_TranslateRankToJobrank(gex_TM_t tm, gex_Rank_t rank); gex_Rank_t gex_TM_TranslateJobrankToRank(gex_TM_t tm, gex_Rank_t jobrank); // Translation from (tm,rank) to gex_EP_Location_t // // This function provides translation from a (tm,rank) pair to a // gex_EP_Location_t, which is a (jobrank,epidx) pair. // // tm: A valid gex_TM_t // rank: The rank of some member of tm. // Requires 0 <= rank < gex_TM_QuerySize(tm). // flags: Flags are reserved for future use and must currently be zero // // Returns: A gex_EP_Location_t describing the given member of tm. // // This query MAY communicate. // [TBD: exception for 'self' in one both directions?] // This call is not legal in contexts which prohibit communication, // including (but not limited to) AM Handler context or when holding an HSL. // gex_EP_Location_t gex_TM_TranslateRankToEP( gex_TM_t tm, gex_Rank_t rank, gex_Flags_t flags); // // Operations on gex_EP_t // // Query owning client gex_Client_t gex_EP_QueryClient(gex_EP_t ep); // Query flags passed when ep was created gex_Flags_t gex_EP_QueryFlags(gex_EP_t ep); // Query the bound segment // Newly-created EPs have no bound segment and will yield GEX_SEGMENT_INVALID. gex_Segment_t gex_EP_QuerySegment(gex_EP_t ep); // Query the endpoint index gex_EP_Index_t gex_EP_QueryIndex(gex_EP_t ep); // Query addresses and length of a (possibly remote) bound segment // [Since spec v0.13] // // This query takes a gex_TM_t and gex_Rank_t, which together name an endpoint. // Other than flags, the remaining arguments are pointers to locations for // outputs, each of which may be NULL if the caller does not need a particular // value. // // If the value of flags does NOT include GEX_FLAG_IMMEDIATE, then this API // behaves as follows: // + The return value is a root event which can be successfully synchronized // (return from gex_Event_Wait*() or zero return from gex_Event_Test*()) // once the query results have been written to the output locations. // It is permitted to be GEX_EVENT_INVALID (but not GEX_EVENT_NO_OP). // + Between entering this call and synchronizing the event it returns, the // content of the output locations is undefined. // + A "successful" query is one in which the endpoint named by (tm, rank) has a // bound segment *and* one or more of the following are true: // + The endpoint resides in the calling process // + The endpoint has a segment that was bound via gex_Segment_Attach() // + The endpoint had the bound segment at the time it was the subject of a // preceding call to gex_EP_PublishBoundSegment() in which the calling // process was a participant. // + A successful query writes the corresponding segment's properties to each of // the non-NULL output locations as described in "Segment properties and output // locations", below. // + If the endpoint named by (tm, rank) does not satisfy the above conditions // for a successful query, then the query may be "unsuccessful", whereby the // size_p output (unless NULL) will receive the value 0 and the remaining // outputs are undefined. The implementation is thus permitted, but not // required, to be successful for a non-primordial bound segment which has not // yet been published to the calling process. // + Since a segment cannot have zero-length, a caller can reliably distinguish // between a successful or unsuccessful query via the size_p output. // + The current definition of "unsuccessful" notably includes the case of a // remote endpoint with a bound segment which has not been published to the // calling process. However, the behavior for this case is subject to // possible change in a future release. // // In the case that flags DOES include GEX_FLAG_IMMEDIATE, then this API // behaves as follows: // + If the query can be resolved without communication, then the return value // is GEX_EVENT_INVALID, with the behavior otherwise identical to the case // without GEX_FLAG_IMMEDIATE. // + Queries which would require communication to resolve will return // GEX_EVENT_NO_OP. // + All queries for which (tm, rank) names an endpoint which resides in the // calling process are guaranteed to return GEX_EVENT_INVALID. // + Queries for which (tm, rank) names an endpoint which does not reside in the // calling process may return either GEX_EVENT_INVALID or GEX_EVENT_NO_OP and // the same query is not guaranteed to return the same value each time. // This permits an implementation to cache information for remote endpoints. // // Segment properties and output locations: // owneraddr_p: receives the address of the segment in the address space // of the process which owns the segment. // For segments of kind GEX_MK_HOST, this is a host address // while for all other kinds this is a device address. In // either case it is the address which would be returned by // gex_Segment_QueryAddr() immediately after segment creation // (via either gex_Segment_Attach() or gex_Segment_Create()). // localaddr_p: receives the address of the segment in the address space // of the calling process, *if* mapped, and NULL otherwise. // size_p: receives the length of the segment. // // Only segments of kind GEX_MK_HOST may report a non-NULL localaddr property, // and all other kinds will yield NULL. The current release additionally // limits the reporting of non-NULL values to primordial segments (those // created by gex_Segment_Attach()). // // Passing GEX_RANK_INVALID as the rank argument is *not* permitted. // Use of a TM-pair for the 'tm' argument *is* permitted. // Passing a '(tm,rank)' tuple naming an endpoint residing on the calling // process *is* permitted. // // When passing a '(tm,rank)' tuple naming an endpoint not residing on the // calling process, this query MAY communicate unless GEX_FLAG_IMMEDIATE is // included in flags. // If and only if GEX_FLAG_IMMEDIATE is included in flags, then this call is // permitted in contexts which prohibit communication (such as AM Handler // context or when holding an HSL). extern gex_Event_t gex_EP_QueryBoundSegmentNB( gex_TM_t tm, gex_Rank_t rank, void **owneraddr_p, void **localaddr_p, uintptr_t *size_p, gex_Flags_t flags); // Query addresses and length of a (possibly remote) bound segment // [DEPRECATED since spec v0.13 - see gex_EP_QueryBoundSegmentNB(), above] // // This query provides semantics similar to // gex_Event_Wait( gex_EP_QueryBoundSegmentNB([...args...], 0) ) // where "[...args...]" represent the five arguments to this query. // // The semantic differences are as follows: // + Success/failure // - This call returns zero for a "successful" query, defined as one in which // (tm, rank) names an endpoint with a bound segment (and, if remote, that // segment is primordial or has been published to the caller). Otherwise, // a non-zero value is returned. // - An successful query with gex_EP_QueryBoundSegmentNB() is distinguishable // by a non-zero size output, while an unsuccessful query will write zero // to the size output. // + Preservation of outputs on failure // - This call guarantees that an unsuccessful query leaves the outputs // unmodified. // - An unsuccessful query with gex_EP_QueryBoundSegmentNB() writes zero to // the size output and leaves the others undefined. // // This call is not legal in contexts which prohibit communication, including // (but not limited to) AM Handler context or when holding an HSL. int gex_Segment_QueryBound( gex_TM_t tm, gex_Rank_t rank, void **owneraddr_p, void **localaddr_p, uintptr_t *size_p); // Publish of EP's Bound Segment "RMA Credentials" // // Description: // Some conduits require "credentials" to initiate communication targeting // the bound segment of a remote endpoint. This call performs any // communication and setup necessary to ensure that after successful return // the local process may safely initiate such communication with any // endpoint named in this call which had a bound segment at the time of // this call. // // Semantics: // + On success, returns GASNET_OK. // + Non-fatal failures return a documented error code. // + Lack of sufficient resources to satisfy the given request will yield a // return of GASNET_ERR_RESOURCE. // + This call is collective over tm, which identifies a team used for // underlying communication. // + The eps argument is an array of length num_eps (possibly zero) of valid // endpoints. // + The num_eps argument may vary by caller (it is not required to be // single-valued). // + This call publishes the bound segments, if any, of the endpoints named // by the eps argument. // + The endpoint associated with tm is not implicitly Published, but it may // be explicitly included in eps if Publication is desired. // + The concatenation of eps arrays must name distinct endpoints. // Duplication is prohibited both within a given eps array, and across eps // arrays passed by multiple tm (from the same team) within a given // process. This restriction may be relaxed in a future release. // + Upon successful return, the local process may safely initiate // communication targeting the bound segment of any endpoint named by the // eps arguments which had a bound segment prior to the corresponding entry // to this collective call. // + It is permitted for eps to contain endpoints without a bound segment, in // which case no credential will be published for such endpoints. // + It is permitted for the same endpoint to be the subject of multiple // successive Publish operations and any bound segment will replace a prior // Publish in which an endpoint had no bound segment. // + The allowance for multiple Publish operations includes the one implicit // in gex_Segment_Attach(). // + The endpoints named by eps must be idle for the duration of this operation. // - No communication operations may be in-flight on any named endpoint // when this operation starts. // - No communication operations may be initiated on any named endpoint // concurrent with this operation. // - No AM Request may target any named endpoint for the duration of this // operation. // - As an exception to the restrictions above, inclusion of the endpoint // associated with tm in eps is explicitly permitted. // - A named endpoint may not be the subject of concurrent segment // operations including (but not limited to) gex_Segment_QueryBound, // gex_EP_BindSegment, gex_EP_PublishBoundSegment, and // gex_EP_QueryBoundSegmentNB. // + The publication of credentials is per local process and remote endpoint, // independent of the specific team used to perform this operation. This // means that upon return, initiation of communication is permitted using // any (tm_x, rank) pair from a participating process naming a participating // remote endpoint, including initiation using a gex_TM_t created using // gex_TM_Pair(). Additionally, this persists beyond destruction of the // team used to Publish. // + The flags argument is reserved for future use and must currently be // zero. // + This call is permitted but not required to incur barrier synchronization // across the team. extern int gex_EP_PublishBoundSegment( gex_TM_t tm, gex_EP_t *eps, // IN size_t num_eps, gex_Flags_t flags); // Minimum permitted fixed index for AM handler registration. // Applies to both gasnet_attach() and gex_EP_RegisterHandlers(). // An integer constant, guaranteed to be 128 or less. #define GEX_AM_INDEX_BASE ??? // // Conduit-internal progress threads // // A conduit may include one or more threads intended to provide asynchronous // progress. // // If present, a "receive progress thread" (or just "receive thread") is // intended to progress the reception of AMs, and consequently may run // client-provided handlers. // // If present, a "send progress thread" (or just "send thread") is intended to // perform internal actions to progress various in-flight communication // operations. This thread will never run client-provided AM handler code. // Implementation-induced concurrency of AM handlers // This value (always defined) has a non-zero value iff the implementation // may run AM handlers from a receive thread not owned by the client // (and in particular, concurrently with the client when no client // thread is inside a synchronous call to GASNet). // Note this is orthogonal to SEQ/PAR/PARSYNC mode - in particular, in PAR // mode multiple client threads concurrently entering GASNet may result // in AM handler concurrency, independent of this value. #define GASNET_HIDDEN_AM_CONCURRENCY_LEVEL ??? // Returns the runtime value of AM concurrency level for the calling process // which may be more precise than the conservative static value provided by // GASNET_HIDDEN_AM_CONCURRENCY_LEVEL. In particular, this query is sensitive // to whether a conduit's receive thread(s) are enabled or disabled at run time. // Only valid after gex_Client_Init(). // The value is constant across multiple calls, and in particular if the client // has passed `GEX_FLAG_DEFER_THREADS` to `gex_Client_Init()` then the result // reflects the expected concurrency once the client has started all progress // threads. // [Since spec v0.14] int gex_System_QueryHiddenAMConcurrencyLevel(void); // // Deferred progress thread initialization // [Since spec v0.18] [EXPERIMENTAL] // // Query deferred progress threads // [Since spec v0.18] [EXPERIMENTAL] // // The `gex_System_QueryProgressThreads()` query provides information about any // progress threads enabled in the library that the client is responsible for // starting due to passing `GEX_FLAG_DEFER_THREADS` to `gex_Client_Init()`. The // information provided is intended to allow the client to make decisions about // such issues as CPU and memory affinity prior to starting these threads. // // + A client which passes `GEX_FLAG_DEFER_THREADS` to `gex_Client_Init()` is // required to make exactly one call to this query and to start each of // the threads described in the result. // + If a client which passes `GEX_FLAG_DEFER_THREADS` to `gex_Client_Init()` // makes multiple calls to this query, then the behavior is undefined. // + If `GEX_FLAG_DEFER_THREADS` was not passed to `gex_Client_Init()`, then // calls to this query are erroneous (returning `GASNET_ERR_RESOURCE` if // there are no other errors). // + Each thread must be started by invoking `gex_progress_fn(gex_progress_arg)` // in a POSIX thread, where `gex_progress_*` name fields of the query result // (described below). This may be accomplished by passing these two field // values as the third and fourth arguments to `pthread_create()`, but a // client is free to invoke the progress function from a thread it has // created by other means. // + In the case of a normal `gasnet_exit()`, the library will terminate each // progress thread either by inducing it to call `pthread_exit()` or via // `pthread_cancel()`. The library assumes responsibility for joining or // detaching the progress thread. The client is responsible for providing // the progress thread in a joinable state, and should neither join nor // detach the progress thread. // + In no case will the progress function return. A client starting a // progress thread by means other than by calling `pthread_create()` must not // depend on return from the progress function. // + The client may start the threads in any order and/or concurrently. // + In general, failure to start all threads prior to `gasnet_exit()` or // process termination (whether normal or abnormal) leads to undefined // behavior. However, a given conduit may relax this restriction (see the // conduit-specific README). // + Other than `gasnet_exit()`, there are no restrictions on GASNet calls which // the client may make prior to starting the progress threads. This means the // client may communicate as necessary to collect information needed to make // decisions regarding CPU and/or memory locality. // + The result of this query is the tuple `(*count_p, *info_p)`, where // the expression `*info_p` points to library-owned memory which must not be // modified or freed by the client. // + The lifetime of this library-owned memory extends from return from this // call until all the progress threads start. Consequently, any accesses to // this memory after all progress threads have begun running have undefined // behavior. // + The `client` argument is the client created by `gex_Client_Init()`. // + The `count_p` argument is a pointer to an `unsigned int` which, upon // successful return, will contain the number of deferred progress threads. // This may be zero. // + The `info_p` argument is a pointer to a `const gex_ProgressThreadInfo_t *` // which, upon successful return with non-zero `*count_p`, will contain the // address of an array (of length `*count_p`) of structures each describing a // single progress thread. // See the description of `gex_ProgressThreadInfo_t`, below, for details. // + If `*count_p` is zero, then the value of `*info_p` is undefined. // + The `flags` argument is reserved for future use and must currently be zero. // + If the `count_p` or `info_p` arguments are `NULL`, or if the `flags` // argument is non-zero, `GASNET_ERR_BAD_ARG` is returned in the absence of // other errors. // + If the call returns an error (non-zero), then the content of the locations // named by `count_p` and `info_p` are undefined. // + If there are multiple reportable errors, the precedence is undefined. int gex_System_QueryProgressThreads( gex_Client_t client, unsigned int *count_p, const gex_ProgressThreadInfo_t **info_p, gex_Flags_t flags); // Type to describe deferred progress threads // [Since spec v0.18] [EXPERIMENTAL] // // The result of the `gex_System_QueryProgressThreads()` query is an array // of zero or more of this structure, each describing a single progress thread // for which the conduit has deferred launch due to `GEX_FLAG_DEFER_THREADS` // in the `flags` passed to `gex_Client_Init()`: // // + gex_device_list // This field is a non-NULL pointer to a comma-delimited string listing the // "devices" for which this thread will provide progress. The nature of the // comma-delimited names is conduit-defined (in the respective README). // + gex_thread_roles // This field has a non-zero value generated by bitwise-OR of one or more // GEX_THREAD_ROLE_* constants below, or ones added in a later version of this // specification. This value indicates the role or roles this thread takes in // progressing communications. // + gex_progress_fn and gex_progress_arg // This pair are the function and argument which the client should ensure // will run in a joinable POSIX thread (such as by passing them as the third // and fourth arguments to `pthread_create()`). typedef struct { const char * gex_device_list; unsigned int gex_thread_roles; void * (*gex_progress_fn) (void *); void * gex_progress_arg; } gex_ProgressThreadInfo_t; // Thread roles in gex_ProgressThreadInfo_t // [Since spec v0.18] [EXPERIMENTAL] #define GEX_THREAD_ROLE_RCV ??? #define GEX_THREAD_ROLE_SND ??? // Preprocessor defines advertising configured progress thread support // [Since spec v0.18] // GASNET_RCV_THREAD is defined to 1 iff the current library build includes // support for a receive thread. Because the user can typically use environment // variables to enable or disable launch of this thread, this does not indicate // with certainty that the thread will run. // // If the current conduit does not include any receive thread support, or it was // disabled at configure time, then GASNET_RCV_THREAD will be #undef. // // Clients which may set environment variables to request a receive thread // should make such logic conditional on this preprocessor identifier to avoid // conduit-specific warnings which may result when requesting a receive thread // which is not enabled. #define GASNET_RCV_THREAD 1 or #undef // GASNET_SND_THREAD is defined to 1 iff the current library build includes // support for a send thread. Because the user can typically use environment // variables to enable or disable launch of this thread, this does not indicate // with certainty that the thread will run. // // If the current conduit does not include any send thread support, or it was // disabled at configure time, then GASNET_SND_THREAD will be #undef. // // Clients which may set environment variables to request a send thread should // make such logic conditional on this preprocessor identifier to avoid // conduit-specific warnings which may result when requesting a send thread // which is not enabled. #define GASNET_SND_THREAD 1 or #undef // // AM handlers // // Client-facing type for describing one AM handler // This type is an alternative to (*not* interchangeable with) gasnet_handlerentry_t // // gex_index may either be in the range [GEX_AM_INDEX_BASE .. 255] to register // at a fixed index, or 0 for "don't care" (see gex_EP_RegisterHandlers() for // more information on this case). // // Because the gex_fnptr field is used to hold pointers to functions with many // possible signatures, C++ and C23 (or higher) require explicit casts to the // type gex_AM_Fn_t when populating this field. Since a client author might // not control the default C language level of the compiler, casts in C clients // should be considered "best practice". // // The gex_nargs and gex_flags fields are used by the client to supply the implementation // with assertions regarding the future invocations and behavior of each AM handler. // If a handler invocation (eg via an AM injection targeting a given handler) or // execution of an AM handler violates its registration assertions, behavior is undefined. typedef struct { gex_AM_Index_t gex_index; // 0 or in [GEX_AM_INDEX_BASE .. 255] gex_AM_Fn_t gex_fnptr; // Pointer to the handler on this process gex_Flags_t gex_flags; // Incl. required S/M/L and REQ/REP, see below unsigned int gex_nargs; // Required in [0 .. gex_AM_MaxArgs()] // Optional fields (both are "shallow copy") const void *gex_cdata; // Available to handler const char *gex_name; // Used in debug messages } gex_AM_Entry_t; // Required flags for gex_flags field when registering AM handlers. // // When registering AM handlers, the gex_flags field of each // gex_AM_Entry_t must indicate how the handler may be called. // This requires ORing one constant from each of the following // two groups. // AM Category Flags: #define GEX_FLAG_AM_SHORT ??? // Called only as a Short #define GEX_FLAG_AM_MEDIUM ??? // Called only as a Medium #define GEX_FLAG_AM_LONG ??? // Called only as a Long #define GEX_FLAG_AM_MEDLONG ??? // Called as a Medium or Long // AM Request/Reply Flags: #define GEX_FLAG_AM_REQUEST ??? // Called only as a Request #define GEX_FLAG_AM_REPLY ??? // Called only as a Reply #define GEX_FLAG_AM_REQREP ??? // Called as a Request or Reply // gex_EP_RegisterHandlers() // // Registers a client-provided list of AM handlers with the given EP, with // semantics similar to gasnet_attach(). However, unlike gasnet_attach() // this function is not collective and does not include an implicit barrier. // Therefore the client must provide for any synchronization required to // ensure handlers are registered before any process may send a corresponding // AM to the Endpoint. // // May be called multiple times on the same Endpoint to incrementally register handlers. // Like gasnet_attach() the handler indices specified in the table (other than // "don't care" zero indices) must be unique. That now extends across multiple // calls on the same gex_EP_t (though provisions to selectively relax this // restriction are planned for a later release). // // Registration of handlers via a call to gasnet_attach() does *not* preclude // use of this function to register additional handlers. // // As in GASNet-1, handlers with a handler index (gex_index) of 0 on entry are // assigned values by GASNet after the non-zero (fixed index) entries have been // registered. While GASNet-1 leaves the algorithm for the assignment // unspecified (only promising that it is deterministic) this specification // guarantees that entries with gex_index==0 are processed in the same order // they appear in 'table' and are assigned the highest-numbered index which is // then still unallocated (where 255 is the highest possible). However, in // the case of concurrent calls to gex_EP_RegisterHandlers() and/or // gasnet_attach() on the same endpoint with gex_index==0, the order in which // such entries are processed is unspecified and may be non-deterministic. // // Updating of gex_index fields that were passed as 0 upon input is the only // modification this function will perform upon the contents of 'table' // (whose elements are otherwise treated as if const-qualified by this call). // Upon return from this function, the relevant information from 'table' // has been copied into storage internal to the endpoint implementation, // and the client is permitted to overwrite or free the contents of 'table'. // // If any sequence of calls attempts register a total of more than (256 - // GEX_AM_INDEX_BASE) handlers to a single gex_EP_t, the result is undefined // // Returns: GASNET_OK == 0 on success int gex_EP_RegisterHandlers( gex_EP_t ep, gex_AM_Entry_t *table, size_t numentries); // // Active Message (AM) limit queries // // Maximum number of supported AM arguments // Semantically identical to gasnet_AMMaxArgs() unsigned int gex_AM_MaxArgs(void); // Maximum payload size queries // Superset of gasnet_AMMax{Medium,LongRequest,LongReply}() // // This family of calls provide maximum payload queries of two types: // + In the absence of the GEX_FLAG_AM_PREPARE_LEAST_{CLIENT,ALLOC} flags, // these queries return the maximum legal 'nbytes' argument value for the // corresponding gex_AM_{Request,Reply}{Medium,Long}*() call (collectively // known as "fixed-payload AM" injection calls) using the named local and // remote endpoint and the same 'lc_opt', 'numargs' and 'flags' arguments. // + When passed either of the GEX_FLAG_AM_PREPARE_LEAST_{CLIENT,ALLOC} flags, // these queries return the maximum legal 'least_payload' argument value for // the corresponding gex_AM_Prepare{Request,Reply}{Medium,Long}() call // (collectively known as "negotiated-payload AM" prepare calls) using the // named local and remote endpoint and the same 'lc_opt', numargs' and 'flags' // arguments. // // 1. If 'tm' names a local endpoint which is not AM-capable, then the call // is erroneous. Here "AM-capable endpoint" is defined as any primordial // endpoint or a non-primordial endpoint which was created with // GEX_EP_CAPABILITY_AM. // 2. When (other_rank != GEX_RANK_INVALID) // a. The result of each query is a function of the 'numargs', 'lc_opt' and // 'flags' arguments, and the two endpoints (one local and one remote) // named by the tuple consisting of the 'tm' and 'other_rank' arguments. // b. The result is independent of *how* the endpoints are named, such as by // distinct 'tm' values with overlapping membership or use of a TM-pair. // c. If the remote endpoint named by the '(tm,other_rank)' tuple is not // AM-capable or does not exist (only possible with a TM-pair), then the // call is erroneous. // 3. When (other_rank == GEX_RANK_INVALID) // a. The result of each query is a min-of-maxes over all AM-capable remote // endpoints that are addressable with the given 'tm' when 'other_rank' // is varied over its valid range, with the given 'numargs', 'lc_opt' and // 'flags' arguments. // b. This valid range excludes any endpoints which are not AM-capable. // c. In the case that 'tm' is a TM-pair, the valid range also excludes // jobranks which do not have an endpoint at the associated remote // endpoint index. // d. If valid range defined above is empty (no AM-capable endpoints are // addressable), then the call is erroneous. // 4. The result of each query function is guaranteed to be symmetric with // respect to exchanging the local and remote endpoints. Two calls, by // appropriate processes, that reverse the local and remote endpoint roles // while keeping all other input arguments equal, are guaranteed to return // the same value. Note this does NOT imply any relationship between the // results of different query functions (eg MaxRequestMedium versus // MaxReplyMedium). // 5. When (other_rank == GEX_RANK_INVALID) all callers providing a 'tm' naming // the same set of participating endpoints are guaranteed to get the same // result when given the same values for the other input arguments. Due to // the symmetry noted above, this includes two calls using TM-pairs to // identify the same two endpoints. // 6. Due to the symmetry properties described above, 'other_rank' can (and // therefore should) always name the other party in the communication, // regardless of whether that rank or the caller is to be the sender or the // receiver. // 7. 'numargs' must be between 0 and gex_AM_MaxArgs(), inclusive. It is // guaranteed that increasing 'numargs' will produce monotonically non- // increasing results when all other parameters are held fixed. // 8. 'lc_opt' indicates the payload local completion option to be used for // the AM injection or prepare call in question. The predefined constants // GEX_EVENT_NOW and GEX_EVENT_GROUP should be used directly, while a // pointer to any variable of type gex_Event_t (or a NULL pointer) may be // used interchangeably to indicate that the injection or prepare call // passes any such value (without requiring that the same pointer value be // passed). // 9. 'flags' indicates the flags that will be provided to the corresponding // AM injection or prepare function (and should not to be confused with the // handler registration flags). The result of the query is only guaranteed // to be correct for an injection of prepare call with exactly the same // 'flags', excepting only that the GEX_FLAG_AM_PREPARE_LEAST_* flags may // be omitted from a prepare call. // // The result of all four query functions is guaranteed to be at least 512 (bytes). // // The result is guaranteed to be stable throughout a given job execution - ie // for the same set of input arguments, it will always return the same value. // // Aside from the explicit guarantees above, the result may otherwise vary with // the input arguments in unspecified ways, and thus only defines the documented // limit for an call with corresponding local and remote endpoints and values of // lc_opt, flags and numargs. For example, limits often vary between different // conduits and may also vary based on job layout, between pairs of ranks in // the same team, or between different pair of endpoints linking the same two // processes. size_t gex_AM_MaxRequestLong( gex_TM_t tm, gex_Rank_t other_rank, const gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int numargs); size_t gex_AM_MaxReplyLong( gex_TM_t tm, gex_Rank_t other_rank, const gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int numargs); size_t gex_AM_MaxRequestMedium( gex_TM_t tm, gex_Rank_t other_rank, const gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int numargs); size_t gex_AM_MaxReplyMedium( gex_TM_t tm, gex_Rank_t other_rank, const gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int numargs); // Token-specific max fixed-payload queries for specific nargs, lc_opt and flags // // Semantics are identical to the may payload queries above, except that // a gex_Token_t replaces the (tm,rank) tuple. The token names the local // endpoint on which the AM has been received and the remote endpoint which // sent it. In particular, this implies the queries return the limits // governing the AM Reply operations that can be performed using this token. // // These are only permitted in Request handlers. size_t gex_Token_MaxReplyLong( gex_Token_t token, const gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int numargs); size_t gex_Token_MaxReplyMedium( gex_Token_t token, const gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int numargs); // Least-upper-bound fixed-payload queries (unknown team/peer, nargs, lc_opt and flags) // Guaranteed to be less than or equal to the result of the corresponding AM_Max* // function, for all valid input parameters to that function (excluding use of the // GEX_FLAG_AM_PREPARE_LEAST_* flags). // The result of all four query functions is guaranteed to be at least 512 (bytes). // These functions correspond semantically to the gasnet_AMMax*() queries in GASNet-1, // which return a globally conservative maximum. size_t gex_AM_LUBRequestLong(void); size_t gex_AM_LUBReplyLong(void); size_t gex_AM_LUBRequestMedium(void); size_t gex_AM_LUBReplyMedium(void); // // AM Token Info // // Struct type for gex_Token_Info queries contains *at least* the following // fields, in some *unspecified* order typedef struct { // "Job rank" of the sending process, as defined with the description // of gex_System_QueryJobRank(). gex_Rank_t gex_srcrank; // Destination (receiving) endpoint gex_EP_t gex_ep; // Entry describing the currently-running handler corresponding to this token. // The referenced gex_AM_Entry_t object resides in library-owned storage, // and should not be directly modified by client code. // If handler was registered using the legacy gasnet_attach() call, this // value may be set to a valid pointer to a gex_AM_Entry_t, with undefined // contents. const gex_AM_Entry_t *gex_entry; // 1 if the current handler is a Request, 0 otherwise. [some integral type] gex_is_req; // 1 if the current handler is a Long, 0 otherwise. [some integral type] gex_is_long; } gex_Token_Info_t; // Bitmask constants to request specific info from gex_Token_Info(): // All listed constants are required, but the corresponding queries // are divided into Required ones and Optional ones (with the // exception of GEX_TI_ALL). typedef [some integer type] gex_TI_t; // REQUIRED: All implementations must support these queries: #define GEX_TI_SRCRANK ((gex_TI_t)???) # required since spec v0.1 #define GEX_TI_EP ((gex_TI_t)???) # required since spec v0.1 // OPTIONAL: Some implementations might not support these queries: #define GEX_TI_ENTRY ((gex_TI_t)???) # optional since spec v0.1 #define GEX_TI_IS_REQ ((gex_TI_t)???) # optional since spec v0.1 #define GEX_TI_IS_LONG ((gex_TI_t)???) # optional since spec v0.1 // Convenience: all defined queries (Required and Optional) #define GEX_TI_ALL ((gex_TI_t)???) # required since spec v0.1 // Support indicators for Optional token into queries // Available since spec v0.17 // // GASNET_SUPPORTS_TI_* preprocessor identifiers are defined to 1 or #undef // to indicate whether (or not, respectively) the implementation of // gex_Token_Info() supports the corresponding query for all valid tokens. // // When any of these is defined for an Optional query, it is an indication that // the current implementation of the current conduit supports the // corresponding query. However, it is not a guarantee of such support in // other conduits or in future releases of the current conduit. // // When any of these is #undef, the implementation is still permitted to // support the query conditionally. For instance, the shared-memory transport // may support an Optional query that is not supported for AMs travelling // outside of the shared-memory nbrhd, or vice-versa. #define GASNET_SUPPORTS_TI_SRCRANK 1 #define GASNET_SUPPORTS_TI_EP 1 #define GASNET_SUPPORTS_TI_ENTRY 1 or #undef #define GASNET_SUPPORTS_TI_IS_REQ 1 or #undef #define GASNET_SUPPORTS_TI_IS_LONG 1 or #undef // Takes a token, address of client-allocated gex_Token_Info_t, and a mask. // The mask is a bit-wise OR of GEX_TI_* constants, which indicates which // fields of the gex_Token_Info_t should be set by the call. // // The return value is of the same form as the mask. // The implementation is permitted to set fields not requested by the // caller to valid or *invalid* values. The returned mask will indicate // which fields contain valid results, and may include bits not present // in the mask. // // Each GEX_TI_* corresponds to either a Required or Optional query. // When a client requests a Required query, a conforming implementation // MUST set these fields and the corresponding bit in the return value. // An Optional query may not be implemented on all conduits or all // configurations, or even under various conditions (e.g. may not be // supported in a Reply handler). If the client makes an Optional request // the presence of the corresponding bit in the return value is the only // indication that the struct field is valid. extern gex_TI_t gex_Token_Info( gex_Token_t token, gex_Token_Info_t *info, gex_TI_t mask); // // Fixed-payload AM APIs // // NOTE 0: Prototypes in this section are "patterns" // // These API instantiate the "[M]" at the end of each prototype with // the integers 0 through gex_AM_MaxArgs(), inclusive. // The '[,arg0, ... ,argM-1]' then represent the arguments // (each of type gex_AM_Arg_t). // Additionally, on compilers supporting the __VA_ARG__ preprocessor feature // (added in C99 and C++11) the "[M]" may optionally be omitted entirely and // is inferred based on the argument count. // // NOTE 1: Return value // // An AM Request or Reply call is a "no op" IF AND ONLY IF the value // GEX_FLAG_IMMEDIATE is included in the 'flags' argument AND the // conduit could determine that it would need to block temporarily to // obtain the necessary resources. This case is distinguished by a // non-zero return. In all other cases the return value is zero. // // In the "no op" case no communication has been performed and the // contents of the location named by the 'lc_opt' argument (if any) is // undefined. // // NOTE 2: The 'lc_opt' argument for local completion // // The AM interfaces never detect or report remote completion, but do // have selectable behavior with respect to local completion (which // means that the source buffer may safely by written, free()ed, etc). // // Short AMs have no payload and therefore have no 'lc_opt' argument. // // The Medium and Long Requests accept the pre-defined constant values // GEX_EVENT_NOW and GEX_EVENT_GROUP, and pointers to variables of type // 'gex_Event_t' (note that GEX_EVENT_DEFER is prohibited). // The NOW constant requires that the Request call not // return until after local completion. The GROUP constant allows the // Request call to return without delaying for local completion and adds // the AM operation to the set of operations for which // gex_NBI_{Test,Wait}() call may check local completion when passed // GEX_EC_AM. Use of a pointer to a variable of type 'gex_Event_t' // allows the call to return without delay, and requires the client to later // check local completion of this root event using gex_Event_{Test,Wait}*(). // // The 'lc_opt' argument to Medium and Long Reply calls behave as for the // Requests with the exception that GEX_EVENT_GROUP is *not* permitted. // It is also important to note that it is not legal to "test", or // "wait" on a 'gex_Event_t' in AM handler context. // [TBD: we *could* allow handlers to make bounded calls to "test", which // does not Poll, if we wanted to.] // // NOTE 3: The 'flags' argument for segment disposition [UNIMPLEMENTED] // // The 'flags' argument to Medium and Long Request/Reply calls may include // GEX_FLAG_SELF_SEG_* flags to assert segment disposition properties of the // address range described by [source_addr..(source_addr+nbytes-1)]. Any such // assertions must remain true until local completion is signalled (see above). // // The 'flags' argument to Long Request/Reply calls may include // GEX_FLAG_PEER_SEG_* flags to assert segment disposition properties of the // address range described by [dest_addr..(dest_addr+nbytes-1)]. Any such // assertions must remain true until the AM handler begins execution at the target. // // NOTE 4: Overlap // // Within a single gex_AM_*Long* operation, if the specified source and destination // memory regions overlap, behavior is undefined. High-quality implementations // may choose to diagnose such errors. // // NOTE 5: Longs and Bound Segments // // In general, the 'tm' and 'rank' arguments to Long Request/Reply calls must // name a destination EP with a bound segment known to the initiator, where // "known" means the segment was created with gex_Segment_Attach() or was // published to the initiator. However, for the special case of 'nbytes == 0`, // no bound segment is required. // // Other arguments behave as in the analogous GASNet-1 functions. // Misc semantic strengthening: // * dest_addr for Long is guaranteed to be passed to the handler as provided // by the initiator, even for the degenerate case when nbytes==0 // Long int gex_AM_RequestLong[M]( gex_TM_t tm, // Names a local context ("return address") gex_Rank_t rank, // Together with 'tm', names a remote context gex_AM_Index_t handler, // Index into handler table of remote context const void *source_addr, // Payload address (or OFFSET) size_t nbytes, // Payload length void *dest_addr, // Payload destination address (or OFFSET) gex_Event_t *lc_opt, // Local completion control (see above) gex_Flags_t flags // Flags to control this operation [,arg0, ... ,argM-1]) // Handler argument list, each of type gex_AM_Arg_t int gex_AM_ReplyLong[M]( gex_Token_t token, // Names local and remote contexts gex_AM_Index_t handler, const void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags [,arg0, ... ,argM-1]); // Medium int gex_AM_RequestMedium[M]( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, const void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags [,arg0, ... ,argM-1]); int gex_AM_ReplyMedium[M]( gex_Token_t token, gex_AM_Index_t handler, const void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags [,arg0, ... ,argM-1]); // Short int gex_AM_RequestShort[M]( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, gex_Flags_t flags [,arg0, ... ,argM-1]); int gex_AM_ReplyShort[M]( gex_Token_t token, gex_AM_Index_t handler, gex_Flags_t flags [,arg0, ... ,argM-1]); // // Negotiated-payload AM APIs (aka "NPAM") // // The fixed-payload APIs for Active Message Mediums and Longs (brought // forward from GASNet-1) allow sending any payload up to defined maximum // lengths. However, this comes with the potential costs of extra in-memory // copies of the payload and/or conservative maximum lengths. Use of the // negotiated-payload APIs can overcome these limitations to yield performance // improvements in two important cases. First, when the client can begin the // negotiation before the payload is assembled (for instance concatenation of // a client-provided header and application-provided data) payload negotiation // can ensure that the GASNet conduit will not need to make an additional // in-memory copy to prepend its own header, or to send from pre-registered // memory. Second, when the client has a need for fragmentation and // reassembly (due to a payload exceeding the maximums) use of negotiated // payload may permit a smaller number of fragments by taking advantage of // transient conditions (for instance in GASNet's buffer management) that // allow sending AMs with a larger payload than can be guaranteed in general. // // The basis of negotiated-payload AMs is a split-phase interface: "Prepare" // and "Commit". The first phase is a Prepare function to which the client // passes an optional source buffer address, the minimum and maximum lengths // it is willing to send, and many (but not all) of the other parameters // normally passed when injecting an Active Message. In this phase, GASNet // determines how much of the payload can be sent. // // The return from the Prepare call provides the client with an address and a // length. The length is in the range defined by the minimum and maximum // lengths. When the client_buf argument is non-NULL, the address provided by // the return will be exactly that value. Otherwise the address will be a // GASNet-allocated buffer of the indicated length, suitably aligned to hold any // data type. // // It is important to note that passing NULL for the client_buf argument to a // Prepare call requires GASNet to allocate buffer space of size no smaller // than least_payload. Use of gex_AM_Max{Request,Reply}{Medium,Long}() with // the GEX_FLAG_AM_PREPARE_LEAST_ALLOC flag gives the limits on the space GASNet // is required to allocate. Larger values of least_payload are erroneous. // // Between the Prepare and the Commit calls the client is responsible for // assembling its payload (or the prefix of the given length) at the selected // address (potentially a no-op). The client may send a length shorter than // the value returned from the Prepare, for instance rounding down to some // natural boundary. The client may also defer until the Prepare-Commit // interval its selection of the AM handler and arguments, which might depend // on the address and length returned by the Prepare call (though the number // of args must be fixed at Prepare). In the case of a Long, the client may // also defer selecting the destination address. These various parameters are // passed to the Commit function which performs the actual AM injection. // // It is important to note that in the interval between a Prepare and successful // Commit (or Cancel) the client is bound by the same restrictions as in an // Active Message Reply handler (ie all communication calls are prohibited). // Prepare/commit pairs do not nest. Additionally, the Prepare returns a // thread-specific object that must be consumed (exactly once) by a Cancel or // successful Commit in the same thread. Calls to Prepare are permitted in the // same places as the corresponding fixed-payload AM injection call. // // Currently the semantics of the least_payload==0 case are unspecified. // We advise avoiding that case until a later release has resolved this. // Opaque type for AM Source Descriptor // Used in negotiated-payload AM calls: // Produced by gex_AM_Prepare*() // Consumed by gex_AM_Cancel*() or successful gex_AM_Commit*() typedef ... gex_AM_SrcDesc_t; // Predefined value of type gex_AM_SrcDesc_t // Guaranteed to be zero. // May be returned by gex_AM_Prepare*() when the GEX_FLAG_IMMEDIATE flag // was passed, but required resources are not available. // Must not be passed to gex_AM_Commit*() or gex_AM_Cancel*(), or the // gex_AM_SrcDesc*() queries. #define GEX_AM_SRCDESC_NO_OP ((gex_AM_SrcDesc_t)0) // Query the address component of a gex_AM_SrcDesc_t // // Will be identical to the 'client_buf' passed to the Prepare call if that // value was non-NULL, and otherwise will be GASNet-allocated memory suitably // aligned to hold any data type. void *gex_AM_SrcDescAddr(gex_AM_SrcDesc_t sd); // Query the length component of a gex_AM_SrcDesc_t // // Indicates the maximum length of the buffer located at gex_AM_SrcDescAddr() // that can be sent in the Commit call. // Will be between the 'least_payload' and 'most_payload' passed // to the Prepare call (inclusive). size_t gex_AM_SrcDescSize(gex_AM_SrcDesc_t sd); // Native implementation indicators for negotiated-payload active messages // GASNET_NATIVE_NP_ALLOC_{REQ,REP}_{MEDIUM,LONG} symbols are defined to 1 or // #undef to indicate whether (or not, respectively) the implementation // of negotiated-payload AM Request/Reply Medium/Long (with a GASNet-allocated // source buffer, i.e., initiated with client_buf == NULL) for the network // transport of the current conduit are "native". This is a performance hint // to clients, and does not affect correctness or normative behavior. // The native designation implies that AM injection using these calls can avoid // one or more payload copies relative to the corresponding fixed-payload AM // call under the right conditions (which may be implementation dependent). // Note that in configurations providing GASNet shared-memory bypass for AM // to intra-nbrhd peers (activated by --enable-pshm, enabled by default), // these only denote the behavior of the network transport (AM to peers outside // the caller's nbrhd). The shared-memory transport for all conduits always // provides native behavior for Medium requests and replies. #define GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM 1 or #undef #define GASNET_NATIVE_NP_ALLOC_REP_MEDIUM 1 or #undef #define GASNET_NATIVE_NP_ALLOC_REQ_LONG 1 or #undef #define GASNET_NATIVE_NP_ALLOC_REP_LONG 1 or #undef // // gex_AM_Prepare calls // // RETURNS: gex_AM_SrcDesc_t // + An opaque scalar type (with accessors) described above // + This is thread-specific value // + This object is "consumed" by (cannot be used after) a // gex_AM_Cancel* or successful gex_AM_Commit* call. // ARGUMENTS: // gex_TM_t tm, gex_Rank_t rank [REQUEST ONLY] // + These arguments name the destination of an AMRequest // gex_Token_t token [REPLY ONLY] // + This argument identifies (implicitly) the destination of // an AMReply // const void *client_buf // + If non-NULL the client is offering this buffer as a // source_addr // + If NULL, the client is requesting a GASNet-allocated source // buffer to populate // size_t least_payload // + This is the minimum length that the Prepare call may // return on success - ie the least-sized payload the // client is willing to send at this time. // + The value must not exceed the value of the // gex_AM_Max[...]() call with the analogous Prepare arguments // size_t most_payload // + This is the maximum length that the Prepare call may // return on success - ie a (not necessarily tight) upper // bound on the payload size the client is willing to send at // this time. // + The value must not be less than least_payload (but they may // be equal). // + The value *may* exceed the corresponding gex_AM_Max[...](). // void *dest_addr [LONG ONLY] // + If this value is non-NULL then GASNet may use this value // (and flags in the GEX_FLAG_PEER_SEG_* family) to guide its // choice of outputs (addr and size) // + If this value is non-NULL then the client is required to // pass the same value to the Commit call. // + May be NULL to request conservative behavior // + In all cases the actual dest_addr is supplied at Commit. // gex_Event_t *lc_opt // + If client_buf is NULL, this argument must also be NULL. // + If client_buf is non-NULL, this argument operates in the same // manner as the 'lc_opt' argument to the fixed-payload AM calls. // Between Prepare and a successful Commit, the contents of the // gex_Event_t referenced by lc_opt, if any, is indeterminate. // Only after return from a successful Commit call may such a // value be used by the caller. // gex_Flags_t flags // + Bitwise OR of flags valid for the corresponding // fixed-payload AM injection // + GEX_FLAG_IMMEDIATE: the Prepare call may return // GEX_AM_SRCDESC_NO_OP==0 if injection resources (in // particular a buffer of size least_payload or longer) cannot // be obtained. // The Commit-time behavior is unaffected by this flag. // + [UNIMPLEMENTED] GEX_FLAG_SELF_SEG_OFFSET: is prohibited // + [UNIMPLEMENTED] GEX_FLAG_SELF_SEG_*: these flags may only be // passed if client_buf is non-NULL, and assert segment disposition // properties for the range [client_buf..(client_buf+most_payload-1)] // that must be true upon entry to Prepare. If gex_AM_SrcDescAddr() // on the Prepare result is equal to client_buf, then the assertion // must remain true until after local completion is signalled via `lc_opt`. // + [UNIMPLEMENTED] GEX_FLAG_PEER_SEG_*: [LONG ONLY] if `dest_addr` is // non-NULL, these flags assert segment disposition properties for the // range [dest_addr..(dest_addr+most_payload-1)] that must be true upon // entry to Prepare and remain true until entry to the AM handler at // the target. If `dest_addr` is NULL at Prepare and non-NULL at Commit, // these flags assert segment disposition properties for the Commit-time // range [dest_addr..(dest_addr+nbytes-1)] that must be true upon // entry to Commit and remain true until entry to the AM handler at // the target. // unsigned int numargs // + The number of arguments to be passed to the Commit call // extern gex_AM_SrcDesc_t gex_AM_PrepareRequestMedium( gex_TM_t tm, gex_Rank_t rank, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int numargs); extern gex_AM_SrcDesc_t gex_AM_PrepareReplyMedium( gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int numargs); extern gex_AM_SrcDesc_t gex_AM_PrepareRequestLong( gex_TM_t tm, gex_Rank_t rank, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int numargs); extern gex_AM_SrcDesc_t gex_AM_PrepareReplyLong( gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int numargs); // // gex_AM_Commit family calls // // This section applies to two groups of APIs described below: // + gex_AM_Commit[M]() // + gex_AM_Commit[M]_v2() // // The `sd` argument to either `gex_AM_Commit[M]()` or // `gex_AM_Commit[M]_v2()` must be the return from a call to the // corresponding (i.e. same ``) `gex_AM_Prepare()`, and with `[M]` // (if any) matching the `numargs` passed to the Prepare. // // NOTE: Prototypes in the following two sections are "patterns" // These API instantiate the "[M]" at the end of each prototype with // the integers 0 through gex_AM_MaxArgs(), inclusive. // The '[,arg0, ... ,argM-1]' then represent the arguments // (each of type gex_AM_Arg_t). // Additionally, on compilers supporting the __VA_ARG__ preprocessor feature // (added in C99 and C++11) the "[M]" may optionally be omitted entirely and // is inferred based on the argument count. // // ARGUMENTS: // gex_AM_SrcDesc sd // + The value returned by the immediately preceding Prepare // call on this thread. // gex_AM_Index_t handler // + The index of the AM handler to run at the destination // size_t nbytes // + The client's payload length // + Must be in the range: [0 .. gex_AM_SrcDescSize(sd)] // + The base address of the source payload buffer is implicitly // specified by gex_AM_SrcDescAddr(sd) // void *dest_addr [LONG ONLY] // + The destination address for transfer of Long payloads // + If non-NULL dest_addr was passed to Prepare, this must // be the same value // gex_Flags_t commit_flags [V2 ONLY] // + Bitwise OR of a subset of the flags valid for the corresponding // fixed-payload AM injection, as described more fully in the // gex_AM_Commit[M]_v2 section, below. // // gex_AM_Commit[M] calls // // RETURNS: void // ARGUMENTS: // gex_AM_SrcDesc sd // gex_AM_Index_t handler // size_t nbytes // void *dest_addr [LONG ONLY] // + See "gex_AM_Commit family calls", above // extern void gex_AM_CommitRequestMedium[M]( gex_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes [,arg0, ... ,argM-1]); extern void gex_AM_CommitReplyMedium[M]( gex_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes [,arg0, ... ,argM-1]); extern void gex_AM_CommitRequestLong[M]( gex_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, void *dest_addr [,arg0, ... ,argM-1]); extern void gex_AM_CommitReplyLong[M]( gex_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, void *dest_addr [,arg0, ... ,argM-1]); // // gex_AM_Commit[M]_v2 calls [EXPERIMENTAL] // // This corresponds to feature macro GASNET_SUPPORTS_AM_COMMIT_V2 == 20240906L // // These APIs are analogous to the gex_AM_Commit[M]() APIs described above, // with the addition of a `commit_flags` argument and a return type of `int` // (instead of `void`). Depending on the `commit_flags` bits set, there may // also be semantic differences, as described below. However, when // `commit_flags == 0` the behavior is identical to the corresponding // gex_AM_Commit[M]() // // RETURNS: int // 0 on success, non-zero under conditions described below // ARGUMENTS: // gex_AM_SrcDesc sd // gex_AM_Index_t handler // size_t nbytes // void *dest_addr [LONG ONLY] // + See "gex_AM_Commit family calls", above // gex_Flags_t commit_flags // + Bitwise OR of a subset of the flags valid for the corresponding // fixed-payload AM injection // + GEX_FLAG_IMMEDIATE: a Commit*_v2 call may return non-zero if injection // resources cannot be obtained without polling to progress the underlying // network. Use of this flag bit is entirely independent of its presence or // absence from the `flags` passed to Prepare. A client may validly pass // this flag to one, both, or neither of the Prepare and Commit*_v2 calls. // + Currently, no other GEX_FLAG_* values are supported. // Passing flags not explicitly listed here as supported will result in // undefined behavior. // // NOTE 1: Return value // // A call is a "no op" IF AND ONLY IF the value GEX_FLAG_IMMEDIATE is included // in the 'commit_flags' argument AND the conduit could determine that it // would need to block temporarily to obtain the necessary resources. This // case is distinguished by a non-zero return. In all other cases the return // value is zero. // // In the "no op" case no communication has been performed and the contents of // the location named by the 'lc_opt' argument (if any) remains indeterminate; // the `sd` remains unchanged and valid for use in subsequent calls to // gex_AM_{SrcDesc,Commit,Cancel}*(). // // The "no op" case is not a "successful Commit". Where this document refers // to a "successful Commit" only the zero-return case is included. // // NOTE 2: Repeated calls to gex_AM_Commit*_v2() // // As with any call which takes the `GEX_FLAG_IMMEDIATE` flag, a client should // not assume that a sequence of repeated calls will eventually succeed. // extern int gex_AM_CommitRequestMedium[M]_v2( gex_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, gex_Flags_t commit_flags [,arg0, ... ,argM-1]); extern int gex_AM_CommitReplyMedium[M]_v2( gex_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, gex_Flags_t commit_flags [,arg0, ... ,argM-1]); extern int gex_AM_CommitRequestLong[M]_v2( gex_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, gex_Flags_t commit_flags [,arg0, ... ,argM-1]); extern int gex_AM_CommitReplyLong[M]_v2( gex_AM_SrcDesc_t sd, gex_AM_Index_t handler, size_t nbytes, void *dest_addr, gex_Flags_t commit_flags [,arg0, ... ,argM-1]); // // gex_AM_Cancel calls [EXPERIMENTAL] // // This corresponds to feature macro GASNET_SUPPORTS_AM_CANCEL == 20240418L // // Cancel a gex_AM_SrcDesc_t without initiating communication // // The `sd` argument to `gex_AM_Cancel()` must be the return from a call to // the corresponding (i.e. same ``) `gex_AM_Prepare()`. // // This call is valid only after a Prepare without a following successful // Commit (or Cancel), and enables the client to elect not to perform the // communication described by the Prepare. This call "consumes" the 'sd', // meaning that after return it is no longer a valid argument to any GASNet // API call. // // Any resources allocated by the Prepare call are released. In particular, if // the Prepare call allocated a buffer (client_buf == NULL), then any accesses // to that buffer by the client after a Cancel will yield undefined behavior. // // The contents of the location named by the 'lc_opt' argument (if any) to the // Prepare call was undefined since return from the Prepare call and remains so // upon return from this call. // // Currently, `flags` is reserved and must be zero. // // Returns 0 on success, non-zero on error extern int gex_AM_CancelRequestMedium( gex_AM_SrcDesc_t sd, gex_Flags_t flags); extern int gex_AM_CancelReplyMedium( gex_AM_SrcDesc_t sd, gex_Flags_t flags); extern int gex_AM_CancelRequestLong( gex_AM_SrcDesc_t sd, gex_Flags_t flags); extern int gex_AM_CancelReplyLong( gex_AM_SrcDesc_t sd, gex_Flags_t flags); // // Extended API // // NOTE 1: Return value // // An Extended API initiation call is a "no op" IF AND ONLY IF the value // GEX_FLAG_IMMEDIATE is included in the 'flags' argument AND the // conduit could determine that it would need to block temporarily to // obtain the necessary resources. The blocking and NBI calls return a // non-zero value *only* in the "no op" case, while the NB calls return // GEX_EVENT_NO_OP. // // In the "no op" case no communication has been performed and the // contents of the location named by the 'lc_opt' argument (if any) is // undefined. // // NOTE 2a: The 'lc_opt' argument for local completion (NBI case) // // Implicit-event non-blocking Puts have an 'lc_opt' argument which // controls the behavior with respect to local completion. The value can // be the pre-defined constants GEX_EVENT_NOW, GEX_EVENT_DEFER, or // GEX_EVENT_GROUP. The NOW constant requires that the call not // return until the operation is locally complete. The DEFER constant // permits the call to return without delaying for local completion, // which may occur as late as in the call which syncs (retires) the // operation (could be an explicit-event call if using an NBI access // region). The GROUP constant allows the call to return without // delaying for local completion and adds the operation to the set for // which gex_NBI_{Test,Wait}() call may check local completion when // passed GEX_EC_LC. // // NOTE 2b: The 'lc_opt' argument for local completion (NB case) // // Explicit-event non-blocking Puts have an 'lc_opt' argument which // controls the behavior with respect to local completion. The value can // be the pre-defined constants GEX_EVENT_NOW or GEX_EVENT_DEFER, or // a pointer to a variable of type 'gex_Event_t'. The NOW // constant requires that the call not return until the operation is // locally complete. The DEFER constant permits the call to return // without delaying for local completion, which may occur as late as in // the call which syncs (retires) the returned event. Use of a pointer // to a variable of type 'gex_Event_t' allows the call to return without // delay, and allows the client to check local completion using // gex_Event_{Test,Wait}*(). // // NOTE 3: Local addressing // // Let "the local endpoint" refer to the endpoint associated with 'tm'. // // Let "device segment" denote a segment created using gex_Segment_Create() // with a 'kind' argument other than GEX_MK_HOST. // // Let "in the local bound segment" mean that a given range of addresses // lies entirely within the range of the segment as might be determined by // applying gex_Segment_QueryAddr() and gex_Segment_QuerySize() to the // segment bound to the local endpoint. // // The local address (src of a Put, dest of a Get) is interpreted and // constrained as follows: // + [UNIMPLEMENTED] In the presence of GEX_FLAG_SELF_SEG_OFFSET in 'flags' // the address argument is interpreted as an unsigned offset in bytes from // the start address of the local endpoint's (required) bound segment. // The memory so named must be in the local bound segment. // + In the absence of GEX_FLAG_SELF_SEG_OFFSET in 'flags': // - If the local endpoint has a bound device segment, then the address is // a device address and the memory so named must be in the local bound // segment. // - Otherwise the address is a host address, and the named memory is not // constrained to lie within the local bound segment (if any). // // NOTE 4: Remote addressing // // Let "the remote endpoint" refer to the endpoint named by '(tm,rank)'. // // Let "device segment" denote a segment created using gex_Segment_Create() // with a 'kind' argument other than GEX_MK_HOST. // // Let "in the remote bound segment" mean that a given range of addresses // lies entirely within the range of the segment as might be determined from // the owneraddr and size properties obtained using gex_Segment_QueryBound() // or gex_EP_QueryBoundSegmentNB() applied to the '(tm,rank)' tuple. // // The remote address (dest of a Put, src of a Get) is interpreted as // follows: // + [UNIMPLEMENTED] In the presence of GEX_FLAG_PEER_SEG_OFFSET in 'flags' // the address argument is interpreted as an unsigned offset in bytes from // the start address of the remote endpoint's bound segment. // + In the absence of GEX_FLAG_PEER_SEG_OFFSET in 'flags': // - If the bound segment of the remote endpoint is a device segment, then // the address is a device address. // - Otherwise the address is a host address. // In all cases, the remote memory must be in the remote bound segment. // // NOTE 5: Overlap // // Within a single gex_RMA_* operation, if the specified source and destination // memory regions overlap, behavior is undefined. High-quality implementations // may choose to diagnose such errors. // Put int gex_RMA_PutBlocking( gex_TM_t tm, // Names a local context ("return address") gex_Rank_t rank, // Together with 'tm', names a remote context void *dest, // Remote (destination) address (or OFFSET) const void *src, // Local (source) address (or OFFSET) size_t nbytes, // Length of xfer gex_Flags_t flags); // Flags to control this operation int gex_RMA_PutNBI( gex_TM_t tm, gex_Rank_t rank, void *dest, const void *src, size_t nbytes, gex_Event_t *lc_opt, // Local completion control (see above) gex_Flags_t flags); gex_Event_t gex_RMA_PutNB( gex_TM_t tm, gex_Rank_t rank, void *dest, const void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags); // Get int gex_RMA_GetBlocking( // Returns non-zero *only* in "no op" case (IMMEDIATE flag) gex_TM_t tm, // Names a local context ("return address") void *dest, // Local (destination) address (or OFFSET) gex_Rank_t rank, // Together with 'tm', names a remote context void *src, // Remote (source) address (or OFFSET) size_t nbytes, // Length of xfer gex_Flags_t flags); // Flags to control this operation int gex_RMA_GetNBI( // Returns non-zero *only* in "no op" case (IMMEDIATE flag) gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags); gex_Event_t gex_RMA_GetNB( gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags); // Value-based payloads gex_RMA_Value_t gex_RMA_GetBlockingVal( gex_TM_t tm, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags); int gex_RMA_PutBlockingVal( gex_TM_t tm, gex_Rank_t rank, void *dest, gex_RMA_Value_t value, size_t nbytes, gex_Flags_t flags); int gex_RMA_PutNBIVal( gex_TM_t tm, gex_Rank_t rank, void *dest, gex_RMA_Value_t value, size_t nbytes, gex_Flags_t flags); gex_Event_t gex_RMA_PutNBVal( gex_TM_t tm, gex_Rank_t rank, void *dest, gex_RMA_Value_t value, size_t nbytes, gex_Flags_t flags); // NBI Access regions: // These are interoperable with, and have the same semantics as, // gasnet_{begin,end}_nbi_accessregion() // flags are reserved for future use and must currently be zero. void gex_NBI_BeginAccessRegion(gex_Flags_t flags); gex_Event_t gex_NBI_EndAccessRegion(gex_Flags_t flags); // Event test/wait operations // The operation is indicated by the suffix // + _Test: no Poll call is made, returns zero on success, and non-zero otherwise. // + _Wait: Polls until success, void return // // In general it is not permitted to test or wait on a leaf event after // synchronization of its corresponding root event because synchronization of a // root event *implicitly* synchronizes any/all leaves. // However, when using NB event array APIs gex_Event_{Test,Wait}{Some,All}() // one may mix leaf events with their corresponding root events in the same // array without concern for their relative order. In other words, placement // of a leaf event later in the array than its corresponding root event is // not "test or wait on a leaf event after synchronization of its corresponding // root event". // Completion of a single NB event // Success is defined as when the passed event is complete. int gex_Event_Test (gex_Event_t event); void gex_Event_Wait (gex_Event_t event); // Completion of an NB event array - "some" // Success is defined as one or more events have been completed, OR // the input array contains only GEX_EVENT_INVALID (which are otherwise ignored). // Completed events, if any, are overwritten with GEX_EVENT_INVALID. // These are the same semantics as gasnet_{try,wait}_syncnb_some(), // except that "Test" does not AMPoll as "try" does. // flags are reserved for future use and must currently be zero. int gex_Event_TestSome (gex_Event_t *pevent, size_t numevents, gex_Flags_t flags); void gex_Event_WaitSome (gex_Event_t *pevent, size_t numevents, gex_Flags_t flags); // Completion of an NB event array - "all" // Success is defined as all passed events have been completed, OR // the input array contains only GEX_EVENT_INVALID (which are otherwise ignored). // Completed events, if any, are overwritten with GEX_EVENT_INVALID. // These are the same semantics as gasnet_{try,wait}_syncnb_all(), // except that "Test" does not AMPoll as "try" does. // flags are reserved for future use and must currently be zero. int gex_Event_TestAll (gex_Event_t *pevent, size_t numevents, gex_Flags_t flags); void gex_Event_WaitAll (gex_Event_t *pevent, size_t numevents, gex_Flags_t flags); // Identifiers to name Event Categories (such as local completion from NBI Puts) // TODO: will eventually include categories for collectives, VIS metadata, ... typedef [some integer type] gex_EC_t; #define GEX_EC_ALL ((gex_EC_t)???) #define GEX_EC_GET ((gex_EC_t)???) #define GEX_EC_PUT ((gex_EC_t)???) #define GEX_EC_AM ((gex_EC_t)???) #define GEX_EC_LC ((gex_EC_t)???) #define GEX_EC_RMW ((gex_EC_t)???) // Sync of specified subset of NBI operations // The 'event_mask' argument is bitwise-OR of GEX_EC_* constants // flags are reserved for future use and must currently be zero. int gex_NBI_Test(gex_EC_t event_mask, gex_Flags_t flags); void gex_NBI_Wait(gex_EC_t event_mask, gex_Flags_t flags); // Extract a leaf event from the root event // NOTE: name is subject to change // // The 'root' argument must be a valid root event, such as returned by an // NB initiation function (gex_*NB()) or gex_NBI_EndAccessRegion. // It is permitted to be GEX_EVENT_INVALID (but not GEX_EVENT_NO_OP). // The 'event_category' argument is an GEX_EC_ constant. // It cannot be a bitwise-OR of multiple such values, nor GEX_EC_ALL. // // There are additional validity constraints to be documented, such as one // cannot ask for an event that was "suppressed" by passing EVENT_NOW or EVENT_DEFER. // Violating those constraints give undefined results (though we want a debug // build to report the violation). // // For root==GEX_EVENT_INVALID, or equivalently for // an event that has "already happened" the implementation may return // either GEX_EVENT_INVALID or a valid event that tests as done. The // implementation is not constrained to pick consistently between these two // options (and in the extreme could choose between them at random). // // This is a *query* and does not instantiate a new object, and so multiple // calls with the same argument (that don't return INVALID_HANDLE) must return // the *same* event. gex_Event_t gex_Event_QueryLeaf( gex_Event_t root, gex_EC_t event_category); // // Neighborhood and Host: // // A "neighborhood" is defined as a set of GEX processes that can share // memory via the GASNet PSHM feature, and is abbreviated to Nbrhd. // // A "host" is an abstract boundary in the system hierarchy that is guaranteed // to be a superset of the neighborhood, but the exact definition may be // system-specific. Generally it encompasses processing resources associated // with a single physical address space and OS kernel image. When using // GASNet-Tools from the same release, it is guaranteed that the definition // for "host" is consistent with the following: // gasnett_cpu_count(), gasnett_getPhysMemSz() // However, there is no guarantee of correspondence to gasnett_gethostname(). // // As with all functions in the gex_System_*() namespace, the following queries // return information about the global GASNet job, independent of any // particular client, team or endpoint. // Const-qualified struct type for describing a member of a neighborhood typedef const struct { gex_Rank_t gex_jobrank; // the Job Rank (as defined above) // Reserved for future expansion and/or internal-use fields } gex_RankInfo_t; // Query information about the neighborhood of the calling process. // // All arguments are pointers to locations for outputs, each of which // may be NULL if the caller does not need a particular value. // // info_p: // Receives the address of an array with elements of type // gex_RankInfo_t (defined above), which includes one entry // for each process in the neighborhood of the calling process. // Entries are sorted by increasing gex_jobrank. // The storage of this array is owned by GASNet and must not be // written to or free()ed. // High-quality implementations will store this array in shared memory // to reduce memory footprint. Therefore, clients should consider using // it in-place to avoid creating a less-scalable copy per process. // info_count_p: // Receives the number of processes in the neighborhood of the calling // process. This includes the caller, and is therefore always non-zero. // my_info_index_p: // Receives the 0-based index of the calling process relative to its // neighborhood. In particular, the following formula holds: // (*info_p)[*my_info_index_p].gex_jobrank == gex_System_QueryJobRank() // // Semantics in a resilient build will be defined in a later release. extern void gex_System_QueryNbrhdInfo( gex_RankInfo_t **info_p, gex_Rank_t *info_count_p, gex_Rank_t *my_info_index_p); // Query information about the Host of the calling process. // // Operates analogously to gex_System_QueryNbrhdInfo, except that instead of // querying information about the neighborhood, this function instead queries // information about the "host" enclosing the calling process and its // neighborhood. // // Argument semantics are identical to gex_System_QueryNbrhdInfo with // "neighborhood" replaced with "host". extern void gex_System_QueryHostInfo( gex_RankInfo_t **info_p, gex_Rank_t *info_count_p, gex_Rank_t *my_info_index_p); // Query information about the sets of Neighborhoods and Hosts // // All arguments are pointers to locations for outputs, each of which // may be NULL if the caller does not need a particular value. // // nbrhd_set_size_p: // Receives the number of neighborhoods in the job. // nbrhd_set_rank_p: // Receives the 0-based rank of the caller's neighborhood within // the set of neighborhoods in the job (a value between 0 and // nbrhd_set_size-1, inclusive). // host_set_size_p: // Receives the number of hosts in the job. // host_set_rank_p: // Receives the 0-based rank of the caller's host within the // set of host in the job (a value between 0 and host_set_size-1, // inclusive). // // In a non-resilient build, the values returned by this query are constant for // any given caller over the lifetime of the job. Semantics in a resilient // build will be defined in a later release. // // Information returned by this query is guaranteed to be self consistent: // (where the value received into the variable referenced by "PROPERTY_p" // is referred to below as "PROPERTY") // + All callers receive identical nbrhd_set_size. // + Callers in the same neighborhood receive identical nbrhd_set_rank. // + Callers in distinct neighborhoods receive distinct nbrhd_set_rank. // + All callers receive identical host_set_size. // + Callers on the same host receive identical host_set_rank. // + Callers on distinct hosts receive distinct host_set_rank. // Other than these rules, and the [0,set_size) ranges, there are no other // guarantees as to how the ranks are assigned. extern void gex_System_QueryMyPosition( gex_Rank_t *nbrhd_set_size_p, gex_Rank_t *nbrhd_set_rank_p, gex_Rank_t *host_set_size_p, gex_Rank_t *host_set_rank_p); // // Handler-safe locks (HSLs) // Lock semantics are identical to those in GASNet-1 // // Type for an HSL // This type interoperable with gasnet_hsl_t typedef {...} gex_HSL_t; // Static-initializer for an HSL // Synonymous with GASNET_HSL_INITIALIZER #define GEX_HSL_INITIALIZER {...} // The following operations on HSLs are semantically identical // to the corresponding gasnet_hsl_* functions: void gex_HSL_Init (gex_HSL_t *hsl); void gex_HSL_Destroy(gex_HSL_t *hsl); void gex_HSL_Lock (gex_HSL_t *hsl); void gex_HSL_Unlock (gex_HSL_t *hsl); int gex_HSL_Trylock(gex_HSL_t *hsl); // // Data types for atomics and reductions // // GASNet-EX defines (as preprocess-time constants) at least the following // data types codes for use with remote atomic and reduction operations. // These are known as the "built-in data types". // // GEX Constant C Data Type // ------------ ----------- // Integer types: // GEX_DT_I32 int32_t // GEX_DT_U32 uint32_t // GEX_DT_I64 int64_t // GEX_DT_U64 uint64_t // Floating-point types: // GEX_DT_FLT float // GEX_DT_DBL double // // In addition to the built-in data types, the following is used to denote an // opaque user-defined data type in the context of a reduction operation. // GEX_DT_USER // // It is guaranteed that all GEX_DT_* values are represented by disjoint non-zero bits. // // Currently, Remote Atomics support all built-in data types listed above. // Currently, Reductions support all data types (built-in and user-defined) // listed above. // // Note that GASNet-EX supports signed and unsigned exact-width integer types. // Any mapping to types such as 'int', 'long' and 'long long' is the // responsibility of the client. typedef [some integer type] gex_DT_t; #define GEX_DT_??? ((gex_DT_t)???) // For each GEX_DT_* above // // Operation codes (opcodes) for atomics and reductions // // GASNet-EX defines (as preprocess-time constants) at least the following // operation codes for use with atomic and reduction operations. Not all // operations are valid in all contexts, as indicated below. // See documentation for the atomic and reduction operations for more details. // // The following apply to the operation definitions which follow: // For atomics: // 'op0' denotes the value at the target location prior to the operation // 'op1' and 'op2' denote the value of the corresponding function arguments // 'expr' denotes the value of the target location after the operation // Fetching operations always return 'op0' // For reductions: // 'op0' represents the "left" (first) reduction operand // 'op1' represents the "right" (second) reduction operand // 'expr' denotes the value of the result of the pairwise reduction // // Except where otherwise noted, the expressions below are evaluated according // to C language rules. // // The following are known as the "built-in operations": // + Non-fetching Operations // - Binary Arithmetic Operations // Valid for Atomics and Reductions // Valid for all built-in data types // GEX_OP_ADD expr = (op0 + op1) // GEX_OP_MULT expr = (op0 * op1) // GEX_OP_MIN expr = ((op0 < op1) ? op0 : op1) // GEX_OP_MAX expr = ((op0 > op1) ? op0 : op1) // - Non-commutative Binary Arithmetic Operations // Valid only for Atomics // Valid for all built-in data types // GEX_OP_SUB expr = (op0 - op1) // - Unary Arithmetic Operations // Valid only for Atomics // Valid for all built-in data types // GEX_OP_INC expr = (op0 + 1) // GEX_OP_DEC expr = (op0 - 1) // - Bit-wise Operations // Valid for Atomics and Reductions // Valid only for Integer built-in types // GEX_OP_AND expr = (op0 & op1) // GEX_OP_OR expr = (op0 | op1) // GEX_OP_XOR expr = (op0 ^ op1) // + Fetching Operations // Valid only for Atomics // Each GEX_OP_Fxxx performs the same operation as GEX_OP_xxx, above, // and is valid for the same types. // Additionally these operations fetch 'op0' as the result of the atomic. // - Binary Arithmetic Operations // GEX_OP_FADD // GEX_OP_FMULT // GEX_OP_FMIN // GEX_OP_FMAX // - Non-commutative Binary Arithmetic Operations // GEX_OP_FSUB // - Unary Arithmetic Operations // GEX_OP_FINC // GEX_OP_FDEC // - Bit-wise Operations // GEX_OP_FAND // GEX_OP_FOR // GEX_OP_FXOR // + Accessor Operations // Valid only for Atomics // Valid for all built-in data types // - Non-fetching Accessor // GEX_OP_SET expr = op1 (writes 'op1' to the target location) // GEX_OP_CAS expr = ((op0 == op1) ? op2 : op0) // With a guarantee to be free of spurious failures as from // cache events. // - Fetching Accessors (fetch 'op0' as the result of the atomic) // GEX_OP_GET expr = op0 (does not modify the target location) // GEX_OP_SWAP expr = op1 (swaps 'op1' with the target location) // GEX_OP_FCAS Fetching variant of GEX_OP_CAS // // NOTE: GEX_OP_CSWAP is a deprecated alias for GEX_OP_FCAS // // In addition to the built-in operations, the following constants are defined: // + User-defined Operations // Valid only for Reductions // Valid for all built-in data types and GEX_DT_USER // The client code, not this specification, determines the operation. // - Commutative User-Defined Reduction Operation // GEX_OP_USER // - Non-commutative User-Defined Reduction Operation // GEX_OP_USER_NC // // It is guaranteed that all GEX_OP_* values are represented by disjoint non-zero bits. typedef [some integer type] gex_OP_t; #define GEX_OP_??? ((gex_OP_t)???) // For each GEX_OP_* above // Opcode conversion // // The macro GEX_OP_TO_FETCHING(op) takes a non-fetching opcode as an argument // and returns the corresponding fetching opcode. The value of 'op' must be // GEX_OP_SET, GEX_OP_CAS or an opcode listed under "Non-fetching Operations", // above. All other values return undefined results. // // The macro GEX_OP_TO_NONFETCHING(op) takes a fetching opcode as an argument // and returns the corresponding non-fetching opcode. The value of 'op' must be // GEX_OP_SWAP, GEX_OP_FCAS or an opcode listed under "Fetching Operations", // above. All other values return undefined results. // // In addition to the natural result when applied to the arithmetic opcodes and // (F)CAS, SWAP/SET are considered to be a fetching/non-fetching pair: // GEX_OP_TO_FETCHING(GEX_OP_SET) == GEX_OP_SWAP // GEX_OP_TO_NONFETCHING(GEX_OP_SWAP) == GEX_OP_SET #define GEX_OP_TO_FETCHING(op) ??? #define GEX_OP_TO_NONFETCHING(op) ??? //---------------------------------------------------------------------- // // Remote Atomic Operations // APIs in this section are provided by gasnet_ratomic.h // // // Atomic Domains // // An "Atomic Domain" is an opaque scalar type. // // Just as all point-to-point RMA calls take a gex_TM_t argument, calls to // initiate Remote Atomic operations take a gex_AD_t, where "AD" is short for // "Atomic Domain". // // + Creation of an AD associates it with a specific gex_TM_t. // // This association defines the memory locations which can be accessed using // the AD. Only memory within the address space of a process hosting an // endpoint that is a member of this team may be accessed by atomic // operations which pass a given AD. // // Currently, there is an additional constraint that target locations must // lie within the bound segments of the team's endpoints. // // + Creation of an AD associates with it one data type and a set of operations. // // This permits selection of the best possible implementation which can // provide correct results for the given set of operations on the given data // type. This is important because the best possible implementation of a // operation "X" may not be compatible with operation "Y". So, this best // "X" can only be used when it is known that "Y" will not be used. This // issue arises because a NIC may offload "X" (but not "Y") and use of a // CPU-based implementation of "Y" would not be coherent with the NIC // performing a concurrent "X" operation. // // + Use of an AD is conceptually tied to specific data and time. // // Correct operation of gex_AD_Op*() APIs is only assured if the client code // can ensure that there are no other accesses to the same target locations // concurrent with the operations on a given AD. // // The prohibition against concurrent access applies to all access by CPUs, // GPUs and any other hardware that references memory; and to all GASNet-EX // operations other than the atomic accesses defined in this section. The // write by a fetching remote atomic operation to an output location on the // initiator is NOT an atomic access for the purposes of this prohibition. // // Prohibited accesses by CPUs and GPUs include not only load/store, but // also any atomic operations provided by languages such as C11 and C++11, // by compiler intrinsics, operating system facilities, etc. // // This prohibition also extends to concurrent access via multiple ADs, even // if created with identical arguments. However, this specification does // not prohibit concurrent access to distinct (non overlapping) data using // distinct ADs. // // GASNet-EX does not provide any mechanisms to detect violations of the // prohibitions described above. // // + Atomic Access Phases [INCOMPLETE / OPEN ISSUE] // // It is the intent of this specification to permit access to the same data // using remote atomics and other (non-atomic) mechanisms, and to the same // data using multiple atomics domains. However, such different accesses // must be NON-concurrent. This separation is into what we will call // "atomic access phases": // During a given atomic access phase, any given byte in the memory of any // GASNet process shall NOT be accessed by more than ONE of: // (1) gex_AD_Op*() calls that reference that byte as part of the target // object. // (2) any means except for (1). // Furthermore, during a given atomic access phase, all gex_AD_Op*() calls // accessing a given target byte shall use the same AD object. // // Note that the byte-granularity of this definition has consequences for // the use of union types and of type-punning, either of which may result in // a given byte being considered part of multiple C objects. // // The means for a transition between atomic access phases has not yet been // fully specified. We do NOT expect that the resolution to this open issue // will invalidate any interface defined in this current specification. // However, when implementations of remote atomics are introduced with // properties such as caching, it may become necessary for clients using // remote atomics to take additional steps to transition between atomic // access phases. // // FOR *THIS* RELEASE we believe it is sufficient to separate atomic access // phases by a barrier synchronization. However, it is necessary to ensure // that any GASNet-EX accesses which may conflict have been completed // (synced) prior to the barrier. This includes completing all remote atomic // operations before a transition to non-atomic access or accesses by a // different atomic domain; and completing all other GASNet data-movement // operations (RMA, Collective, etc.) before a transition to atomic access. // // + Memory Ordering/Fencing/Consistency // // By default calls to the gex_AD_Op*() APIs are not guaranteed to be ordered // with respect to other memory accesses. However, one can request Acquire // or Release fencing through the use of 'flags' as described in more detail // with the description of gex_AD_Op*(). The definitions given below for // Acquire and Release are intended to be compatible with the same concepts // in the C11 and C++ language specifications for atomic operations. // Opaque scalar type for Atomic Domain typedef ... gex_AD_t; // Pre-defined constant, guaranteed to be zero #define GEX_AD_INVALID ((gex_AD_t)0) // Create an Atomic Domain // // This is a collective call over the team named by the 'tm' argument that // creates an atomic domain for the operations in the 'ops' argument performed // on data type 'dt'. // // The 'ad_p' is an OUT parameter that receives a reference to the // newly created atomic domain. // // The 'dt' and 'ops' arguments define the type and operations. // + 'dt' is a value of type gex_DT_t // + 'ops' is a bitwise-OR of one or more GEX_OP_* constants of type gex_OP_t. // If 'dt' and 'ops' do not define only valid combinations (as described in the // definitions of gex_OP_t), then the behavior is undefined. // // The 'flags' argument provides additional control over the created domain. // + GEX_FLAG_AD_FAVOR_{MY_RANK,MY_NBRHD,REMOTE} // This family of mutually-exclusive flags are hints to influence the // selection of implementation to favor PERFORMANCE of accesses initiated // for target locations having certain locality properties. Presence or // absence of these flags will never impact correctness. // - GEX_FLAG_AD_FAVOR_MY_RANK: // Favor calls with the initiating and target endpoint being the same. // (e.g use of GEX_FLAG_AD_MY_RANK would be legal at initiation). // - GEX_FLAG_AD_FAVOR_MY_NBRHD: // Favor calls with the initiating and target endpoints belonging to // processes in the same "Neighborhood", as defined previously. (e.g. // use of GEX_FLAG_AD_MY_NBRHD would be legal at initiation). // - GEX_FLAG_AD_FAVOR_REMOTE: // Favor calls with the initiating and target endpoints belonging to // distinct Neighborhoods. // If a call to gex_AD_Create does not include any flag from this group, the // behavior is not required to correspond to any of the behaviors described // above. A high-quality implementation should examine the composition of // 'tm' and when possible favor either RANK (TM with a single member) or // NBRHD (TM with all members in the same Neighborhood). // // The 'dt', 'ops' and 'flags' parameters are each single-valued. // void gex_AD_Create( gex_AD_t *ad_p, // Output gex_TM_t tm, // The team gex_DT_t dt, // The data type gex_OP_t ops, // OR of operations gex_Flags_t flags); // flags // Destroy an Atomic Domain // // This is a collective call over the team named at creation of the 'ad' // argument that destroys an atomic domain. // // All operations initiated on the atomic domain must be complete prior to any // rank making this call (or the behavior is undefined). In practice, this // means completing (syncing) all atomic operation at their initiators, // followed by a barrier prior to calling this function. // // [INCOMPLETE / OPEN ISSUE] // Once this specification includes a complete specification of atomic access // phases, this call will provide and/all aspects of division between such // phases which are stronger than the quiescence pre-condition. We do NOT // expect that the resolution to this open issue will invalidate this API's // specification. // // Though this function is collective, it does not guarantee barrier // synchronization. // void gex_AD_Destroy(gex_AD_t ad); // // Query operations on gex_AD_t // // Query the parameters passed when atomic domain was created gex_Flags_t gex_AD_QueryFlags(gex_AD_t ad); gex_TM_t gex_AD_QueryTM(gex_AD_t ad); gex_DT_t gex_AD_QueryDT(gex_AD_t ad); gex_OP_t gex_AD_QueryOps(gex_AD_t ad); // Client-Data (CData) support for gex_AD_t // These calls provide the means for the client to set and retrieve one void* // field of client-specific data for each AD, which is NULL for a newly // created AD. void gex_AD_SetCData(gex_AD_t ad, const void *val); void* gex_AD_QueryCData(gex_AD_t ad); // // Remote Atomic Operations // // Remote atomic operations are point-to-point communication calls that // perform read-modify-write and accessor operations on typed data (the // "target location") in the address space of a process hosting an endpoint // that is a member of the team passed to gex_AD_Create(). // // These operations are guaranteed to be atomic with respect to all other // accesses to the same target location made using the same AD, from any rank. // When using a thread-safe endpoint this includes atomicity of concurrent // access by multiple threads within a rank. No other atomicity guarantees // are provided. [Currently all endpoints are "thread-safe" when using a // GASNET_PAR build, and no endpoints are thread-safe otherwise.] // // Despite "Remote" in the name, it is explicitly permitted to apply these // operations to the caller's own memory (and a high-quality implementation // will optimize this case when possible). // // Additional semantics are described following the "Argument synopsis". // // Return value: // // Atomic operations are available with explicit-event (NB) or implicit-event // (NBI) completion, with different return types: // // + The gex_AD_OpNB_*() APIs return a gex_Event_t. // // If (and only if) the GEX_FLAG_IMMEDIATE flag is passed to remote atomic // initiation, these calls are *permitted* to return GEX_EVENT_NO_OP to // indicate that no operation was initiated. Otherwise, the return value // is an event to be used in calls to gex_NBI_{Test,Wait}() to check for // completion. These calls may return GEX_EVENT_INVALID if the operation // was completed synchronously. // // + The gex_AD_OpNBI_*() APIs return an integer. // // If (and only if) the GEX_FLAG_IMMEDIATE flag is passed to remote atomic // initiation, these calls are *permitted* to return non-zero to indicate // that no operation was initiated. Otherwise, the return value is zero // and a gex_NBI_{Test,Wait}() call must be used to check completion. For // the opcodes GEX_OP_SET and GEX_OP_GET, one should use GEX_EC_PUT and // GEX_EC_GET, respectively, to check completion. All other opcodes // correspond to an event category of GEX_EC_RMW. // // Data types and prototypes: // The APIs for remote atomic initiation are typed. Therefore, descriptions // and prototypes below use "[DATATYPE]" to denote the tokens corresponding // to the "???" in each supported GEX_DT_???, and "[TYPE]" to denote the // corresponding C type. There is an instance of each function (NB and NBI) // for each supported data type. // See the "Data types for atomics and reductions" section for which data // types are supported for remote atomics, and their corresponding C types. // // "Fetching": // Text below uses "fetching" to denote operations that write to an output // location ('*result_p') at the initiator (and "non-fetching" for all // others). // See the "Operation codes (opcodes) for atomics and reductions" section // for which opcodes are fetching vs non-fetching. // // Endpoints: // Let 'tm' denote the corresponding argument passed to gex_AD_Create(). // The endpoint associated with 'tm' is known as the "initiating endpoint". // The endpoint named by (tm, tgt_rank) is known as the "target endpoint". // // Argument synopsis: // gex_AD_t ad // + The Atomic Domain for this operation. // [TYPE] * result_p // + Address (or offset) of the output location for fetching operations. // Ignored for non-fetching operations. // gex_Rank_t tgt_rank // + Rank of the target location // void * tgt_addr // + Address (or offset) of the target location // gex_OP_t opcode // + Indicates the operation to perform atomically. // Operations are described with the definition of gex_OP_t. // [TYPE] operand1 // + First operand, if any. // Ignored if the given opcode takes no operands. // [TYPE] operand2 // + Second operand, if any. // Ignored if the given opcode takes fewer than two operands. // gex_Flags_t flags // + Per-operation flags // A bitwise OR of zero or more of the GEX_FLAG_* constants. // // Semantics of gex_AD_Op*(): // // + Successful synchronization of a fetching remote atomic operation means // that the local output value (at *result_p) is ready to be examined, and // will contain a value that was held at the target location at some time in // the interval between the call to the initiation function and the // successful completion of the synchronization. This value will be the one // present at the start of the atomic operation and denoted as 'op0' in the // definition of the applicable opcode. // [THIS PARAGRAPH IS NOT INTENDED TO BE A FORMAL MODEL. // HOWEVER, ONE IS FORTHCOMING.] // // + Successful synchronization of any remote atomic operation means the // operation has been performed atomically (including any constituent Read // and Write access to the target location) and any remote atomic issued // subsequently by any thread on any rank with the same AD and target // location will observe the Write, if any (assuming no intervening updates). // [THIS PARAGRAPH IS NOT INTENDED TO BE A FORMAL MODEL. // HOWEVER, ONE IS FORTHCOMING.] // // + Atomicity guarantees apply only to "target locations". They do not apply // to the output of a fetching operation. Therefore, clients must check for // operation completion before the output value of a fetching operation can // safely be read (analogous to the destination of an gex_RMA_Get*()). // Additionally, a given 'result_p' location must not be used as the target // location of remote atomic operations in the same atomic access phase. // (see "Atomic Access Phases"). // // + If two target objects accessed by gex_AD_Op*() overlap (partially or // completely) those accesses are subject to the restrictions documented in // "Atomic Access Phases" above. In particular, such accesses are // permitted during the same atomic access phase *only* if the accessed // bytes exactly coincide and the calls use the same AD object. // // + Currently, the target location must be contained entirely within the // bound segment of the target endpoint (though this may eventually be // relaxed). // // + The data type associated with 'ad' and that of the gex_AD_Op*() call must // be equal. // // + The 'result_p' argument to fetching operations must be a valid pointer to // an object of the given type [TYPE] on the initiator. (See also the // description of the [UNIMPLEMENTED] GEX_FLAG_SELF_SEG_OFFSET flag, below.) // // + The 'result_p' argument to non-fetching operations is ignored. // // + The 'tgt_rank' argument names the target endpoint. By default, this // argument must be a valid rank relative to the team associated with the AD // at its creation. However, in the presence of GEX_FLAG_RANK_IS_JOBRANK, // this argument instead names the target endpoint by a valid rank in the // primordial team, created by gex_Client_Init(). In this latter case the // named endpoint must be a member of the team associated with the AD at its // creation. // // + The 'tgt_addr' argument names the target location, which must be properly // aligned for its data type [TYPE] and (for any operation except // GEX_OP_SET) must contain an object with compatible effective type, // including a qualified version of [TYPE], and (for integer types only) // including signed or unsigned variants. (See also the description of the // [UNIMPLEMENTED] GEX_FLAG_PEER_SEG_OFFSET flag, below.) // // + The 'opcode' argument gives the operation to be performed atomically. // See the "Operation codes (opcodes) for atomics and reductions" section // for definitions of each operation. // // + The 'opcode' must be a single GEX_OP_* value, not a bitwise OR of two or // more GEX_OP_* values. // // + The 'opcode' must be a member of the set of opcodes passed to // gex_AD_Create(). // // + Operations on floating-point data types are not guaranteed to obey all // rules in the IEEE 754 standard even when the C float and double types // otherwise do conform. Deviations from IEEE 754 include (at least): // - Operations on signalling NaNs have undefined behavior. // - (F)CAS *may* be performed as if on integers of the same width. // This could result in non-conforming behavior with quiet NaNs // or negative zero. // - MIN, MAX, FMIN and FMAX *may* be performed as if on "sign // and magnitude representation integers" of the same width. // This could result in non-conforming behavior with quiet NaNs. // (see https://en.wikipedia.org/wiki/IEEE_754-1985, and especially // the section Comparing_floating-point_numbers) // [THIS PARAGRAPH MAY NOT BE A COMPLETE LIST OF NON-IEEE BEHAVIORS] // // + If the given opcode requires one or more operands, the 'operand1' // argument provides the first ('op1' in the gex_OP_t documentation). // Otherwise, 'operand1' is ignored. // // + If the given opcode requires two operands, the 'operand2' argument // provides the second ('op2' in the gex_OP_t documentation). // Otherwise, 'operand2' is ignored. // // + The 'flags' argument must either be zero, or a bitwise OR of one or more // of the following flags. // - GEX_FLAG_IMMEDIATE: the call is permitted (but not required) to // return a distinguishing value without initiating any communication if // the conduit could determine that it would need to block temporarily // to obtain the necessary resources. The NBI calls return a non-zero // value (only) in this "no op" case, while the NB calls will return // GEX_EVENT_NO_OP. // - At most one flag from the following mutually-exclusive group: // - GEX_FLAG_AD_MY_RANK: asserts that the initiating endpoint and target // endpoint are the same endpoint. This may allow the implementation to // perform the operation more efficiently. // The precise definition of the assertion is: // (tgt_rank == gex_TM_QueryRank(gex_AD_QueryTM(ad))). // - GEX_FLAG_AD_MY_NBRHD: asserts that the target EP belongs to // a process within the "Neighborhood" (defined earlier in this // document) of the calling process. This may allow the // implementation to perform the operation more efficiently. // - GEX_FLAG_AD_REL: this atomic operation shall perform a "release". // Within the thread that initiates this operation, memory accesses by // the processor, issued before the initiation call, shall not be // reordered after that call. Additionally, this includes accesses to // memory by any GASNet operations synchronized by that thread before // initiation. However, there is no ordering with respect to other // GASNet operations. // - GEX_FLAG_AD_ACQ: this atomic operation shall perform an "acquire". // Within the thread that synchronizes this operation, memory accesses by // the processor, issued after the synchronization call, shall not be // reordered before that call. Additionally, this includes accesses to // memory by any GASNet operations initiated by that thread after // synchronization. However, there is no ordering with respect to other // GASNet operations. // - GEX_FLAG_RANK_IS_JOBRANK: this flag indicates that the 'tgt_rank' // argument is a jobrank (rank in the primordial team created by // gex_Client_Init()), rather than the rank in the team associated with // the AD at its creation. // - [UNIMPLEMENTED] GEX_FLAG_SELF_SEG_OFFSET: 'result_p' is to be // interpreted as an offset relative to the bound segment of the // initiating endpoint (instead of as a virtual address). // Ignored for non-fetching operations. // - [UNIMPLEMENTED] GEX_FLAG_PEER_SEG_OFFSET: 'tgt_addr' is to be // interpreted as an offset relative to the bound segment of the target // endpoint (instead of as a virtual address). // gex_Event_t gex_AD_OpNB_[DATATYPE]( gex_AD_t ad, // The atomic domain [TYPE] * result_p, // Output location, if any, else ignored gex_Rank_t tgt_rank, // Rank of target endpoint void * tgt_addr, // Address (or OFFSET) of target location gex_OP_t opcode, // The operation (GEX_OP_*) to perform [TYPE] operand1, // First operand, if any, else ignored [TYPE] operand2, // Second operand, if any, else ignored gex_Flags_t flags); // Flags to control this operation int gex_AD_OpNBI_[DATATYPE]( gex_AD_t ad, [TYPE] * result_p, gex_Rank_t tgt_rank, void * tgt_addr, gex_OP_t opcode, [TYPE] operand1, [TYPE] operand2, gex_Flags_t flags); // End of section describing APIs provided by gasnet_ratomic.h //---------------------------------------------------------------------- // // Vector/Indexed/Strided (VIS) // // APIs in this section are provided by gasnet_vis.h // This API is an updated and expanded version of the VIS prototype offered // in GASNet-1, which is documented here: https://gasnet.lbl.gov/pubs/upc_memcpy_gasnet-2.0.pdf // The following semantics apply to all VIS functions, superseding the above document: // For NB variants, return type for all functions in this section is gex_Event_t. // For NBI/Blocking variants, the return type is int which is non-zero *only* in the // "no op" case (IMMEDIATE flag), exactly analogous to the gex_RMA_{Put,Get}*() functions. // // By default, local completion of all client-owned input buffers (ie payload // buffers and metadata arrays) passed to non-blocking initiation functions // can occur as late as operation completion, and thus must remain valid until // that time (as in GASNet-1). // As an exception, the metadata arrays passed to Strided variants ({src,dst}strides[] and count[]) // are guaranteed to be consumed synchronously before return from initiation. // gex_VIS_*Put{NB,NBI} optionally expose local completion of data payload buffers - // this functionality must be requested using the GEX_FLAG_ENABLE_LEAF_LC flag (see below). // // A future revision may expose other intermediate completion events [UNIMPLEMENTED] // // Within a single VIS operation, if any destination location overlaps a source location // or another destination location, then behavior is undefined. // Source locations are permitted to overlap with each other. // // The 'flags' argument must either be zero, or a bitwise OR of one or more // of the following flags: // - GEX_FLAG_IMMEDIATE: the call is permitted (but not required) to return a // distinguishing value without initiating any communication if the conduit // could determine that it would need to block temporarily to obtain the // necessary resources. The Blocking and NBI calls return a non-zero value // (only) in this "no op" case, while the NB calls will return GEX_EVENT_NO_OP. // - GEX_FLAG_ENABLE_LEAF_LC: (gex_VIS_*Put{NB,NBI} only) This flag requests // asynchronous local completion indication for the local data payload buffers // comprising the source region(s) of the VIS Put operation. Without this flag, // local completion behaves as GEX_EVENT_DEFER, i.e. folded into operation completion. // When this flag is passed to gex_VIS_*PutNBI, asynchronous local completion indication // behaves as specified in sec:`Extended API` for lc_opt=GEX_EVENT_GROUP. // When this flag is passed to gex_VIS_*PutNB, asynchronous local completion indication // behaves as specified in sec:`Extended API` for lc_opt=&(gex_Event_t variable). // In the latter case, the client should retrieve the gex_Event_t corresponding to // local completion by passing the root gex_Event_t returned by the Put initiation // call to gex_Event_QueryLeaf(), for example: // gex_Event_t VISput_RC = gex_VIS_VectorPutNB(..., GEX_FLAG_ENABLE_LEAF_LC); // gex_Event_t VISput_LC = gex_Event_QueryLeaf(VISput_RC, GEX_EC_LC); // The second call is only valid when GEX_FLAG_ENABLE_LEAF_LC was passed to the _VIS_*PutNB() // call, and otherwise has undefined behavior. // NOTE: All of the (void *) types in this API will eventually be gex_Addr_t [UNIMPLEMENTED] // // Vector and Indexed Puts and Gets // // These operate analogously to those in the GASNet-1 prototype gasnet_{put,get}[vi]_* API {gex_Event_t,int} gex_VIS_VectorGet{NB,NBI,Blocking}( gex_TM_t tm, // Names a local context size_t dstcount, gex_Memvec_t const dstlist[], // Local destination data description gex_Rank_t srcrank, // Together with 'tm', names a remote context size_t srccount, gex_Memvec_t const srclist[], // Remote source data description gex_Flags_t flags); // Flags to control this operation {gex_Event_t,int} gex_VIS_VectorPut{NB,NBI,Blocking}( gex_TM_t tm, gex_Rank_t dstrank, size_t dstcount, gex_Memvec_t const dstlist[], size_t srccount, gex_Memvec_t const srclist[], gex_Flags_t flags); {gex_Event_t,int} gex_VIS_IndexedGet{NB,NBI,Blocking}( gex_TM_t tm, size_t dstcount, void * const dstlist[], size_t dstlen, gex_Rank_t srcrank, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags); {gex_Event_t,int} gex_VIS_IndexedPut{NB,NBI,Blocking}( gex_TM_t tm, gex_Rank_t dstrank, size_t dstcount, void * const dstlist[], size_t dstlen, size_t srccount, void * const srclist[], size_t srclen, gex_Flags_t flags); // // Strided Puts and Gets // // These operate similarly to the GASNet-1 prototype gasnet_{put,get}s_* API, // but the metadata format is changing slightly in EX. Notable changes: // + The stride arrays change type from (const size_t[]) to (const ptrdiff_t[]) // + The 'count[0]' datum moves to a new parameter 'elemsz', and the subsequent // elements 'count[1..stridelevels]' "slide down", meaning 'count' now references // an array with 'stridelevels' entries (down from 'stridelevels+1'). // Note that 'elemsz' need not match the "native" element size of the underlying // datastructure, it just needs to indicate a size of contiguous data chunks // (eg, it could be the length of an entire row of doubles stored contiguously). // These interface changes enable the Strided interface to support more generalized // strided data movements (specifically, transpose and reflection). // // Degenerate cases: // // * If elemsz == 0: // the operation is a no-op and all other arguments are ignored // * If stridelevels == 0: // the operation is a contiguous copy of elemsz bytes, and the // srcstrides, dststrides, count arguments are all ignored // * If any entry in count[0..stridelevels-1] == 0: // the operation is a no-op and tm, rank, srcaddr, dstaddr are ignored // ({src,dst}strides must still reference valid arrays) // {gex_Event_t,int} gex_VIS_StridedGet{NB,NBI,Blocking}( gex_TM_t tm, void *dstaddr, const ptrdiff_t dststrides[], gex_Rank_t srcrank, void *srcaddr, const ptrdiff_t srcstrides[], size_t elemsz, const size_t count[], size_t stridelevels, gex_Flags_t flags); {gex_Event_t,int} gex_VIS_StridedPut{NB,NBI,Blocking}( gex_TM_t tm, gex_Rank_t dstrank, void *dstaddr, const ptrdiff_t dststrides[], void *srcaddr, const ptrdiff_t srcstrides[], size_t elemsz, const size_t count[], size_t stridelevels, gex_Flags_t flags); // // VIS Put Peer Completion [DEPRECATED] // // The following call "arms" a peer completion callback that will // signal completion of the next VIS operation initiated by the current thread // to the (possibly remote) peer endpoint. When the selected VIS data movement // operation is complete with respect to the peer, an Active Message // (with some restrictions defined below) is delivered to the peer endpoint. // Currently this feature is only supported for VIS Put operations (not Gets). // // Argument synopsis: // gex_AM_Index_t handler // + The AM handler index to invoke at the peer endpoint. // const void * source_addr // size_t nbytes // + The local source address and length of an optional client-provided payload // to be delivered in the AM notification. // gex_Flags_t flags // + Unused in the current release, should be set to zero. // // + This call "arms" a peer completion handler and binds it to the next VIS operation // successfully initiated by the current thread. Only the next such operation is affected, after // which the peer completion binding for this thread is automatically "disarmed". // In this release, the VIS operation in question may not be passed GEX_FLAG_IMMEDIATE. // [this restriction may be relaxed in a future release] // + If `handler == 0` then any previous gex_VIS_SetPeerCompletionHandler() call from // this thread (if any) is "disarmed" and cancelled. // + Otherwise, `handler` specifies a 0-argument AM Medium Reply handler to invoke at the peer // endpoint selected by the VIS initiation call. The handler is invoked after the data // movement associated with the VIS operation is complete with respect to the peer process. // + The selected AM handler must have been registered at the peer endpoint using gex_EP_RegisterHandlers() // with gex_flags == GEX_FLAG_AM_MEDIUM | GEX_FLAG_AM_REPLY and gex_nargs == 0 // [this restriction may be relaxed in a future release] // and must adhere to the signature and restrictions of a 0-argument AM Medium Reply handler. // + If `nbytes == 0`, then `source_addr` is ignored. // + Otherwise, `nbytes` must be no greater than GEX_VIS_MAX_PEERCOMPLETION. // + If `nbytes > 0`, the specified source memory must remain valid and unchanged starting from the // call to gex_VIS_SetPeerCompletionHandler and lasting until the earlier of either operation completion // or local completion (if enabled) of the VIS operation is signalled to the initiating rank. // + The specified payload is delivered to the invoked AM Medium handler as usual. // + The thread running the peer completion AM handler is guaranteed to observe the results // of the VIS data movement operation upon which it depends. However if it wishes to hand-off // completion notification to other local threads it should use normal cross-thread // synchronization mechanisms (including issuing a write memory barrier on most architectures) // to ensure other cores also observe the payload delivery. void gex_VIS_SetPeerCompletionHandler(gex_AM_Index_t handler, const void *source_addr, size_t nbytes, gex_Flags_t flags); // The largest permissible size (in bytes) for a client payload in a VIS peer completion handler. // Guaranteed to be at least 127 bytes. #define GEX_VIS_MAX_PEERCOMPLETION ((size_t)???) // End of section describing APIs provided by gasnet_vis.h //---------------------------------------------------------------------- // // Collectives (Coll) // // With the exception of gex_Coll_BarrierNB(), APIs in this section are provided // by gasnet_coll.h // // This API is an updated and expanded version of the collectives prototype // offered in GASNet-1, and previously documented in docs/collective_notes.txt. // As these APIs are fully specified and implemented, the corresponding // portions of the GASNet-1 collectives prototype will be removed from // gasnet_coll.h and replaced with GEX variants. The GASNet-1 collectives API // signatures will not be supported in future releases. // The following semantics apply to all Coll functions: // For NB variants, return type for all functions in this section is gex_Event_t. // There are no NBI or Blocking variants at this time. // All functions in this section are "Collective Calls" as defined in the // Glossary. // Multiple collective operations from this section may be active concurrently, // over multiple teams or over a single team. There is no longer an exception // regarding gex_Coll_BarrierNB(), as was the case in an earlier release. // GASNet-EX collectives and the GASNet-1 barrier must not operate concurrently. // Specifically, the gasnet_barrier*() family of calls may not operate // concurrently with any gex_Coll_*() operation (including barriers) over the // primordial team (created by gex_Client_Init(flags=GEX_FLAG_USES_GASNET1) or // obtained from a call to gasnet_QueryGexObjects()). // - Collective operations over the primordial team issued prior to a // GASNet-1 barrier over the same team must be complete/synchronized prior // to initiating the barrier. // - No collective call may be initiated over the primordial team between the // initiation and completion/synchronization of any GASNet-1 barrier over // the same team. // [This restriction may be relaxed in a future release] // // Uses of the GASNet-1 barrier APIs which do not violate the restriction above // are permitted in the same program as GASNet-EX collectives. // In contrast to the UPC-influenced design of the GASNet-1 collectives, the // GASNet-EX collectives do not support "NOSYNC" or "ALLSYNC" flags (they // behave as if IN_MYSYNC|OUT_MYSYNC), nor single-valued address information. // [A future release may re-introduce single-valued addressing for symmetric // heaps via offset-based addressing] // In this respect, the intuition one may hold from MPI-3 non-blocking // collectives is largely applicable. // By default, local completion of all client-owned input buffers ('src' // arguments) passed to the collective initiation functions can occur as late // as operation completion, and thus these buffers must remain valid until that time. // // A future revision may expose intermediate completion events [UNIMPLEMENTED] // Upon operation completion (synchronization of the gex_Event_t returned at // initiation) the following will hold: // + Any input buffer ('src' argument) will be locally complete (analogous // to the source of a gex_RMA_PutNB() with GEX_EVENT_DEFER). // + Any output buffer ('dst' argument) is ready to be examined by the thread // performing the sync of the gex_Event_t (analogous to the destination of // a gex_RMA_GetNB()). // + Unless otherwise noted in the description of a given operation, there are // no guarantees regarding the state on other ranks participating in the // collective operation nor their associated input and output buffers. // Unless noted explicitly, no API in this section, other than a Barrier, is // required to synchronize the calling ranks. However, the implementation is // *permitted* to do so in any call in this section. // NOTE: All of the (void *) types for source and destination buffers in these // APIs will eventually be gex_Addr_t [UNIMPLEMENTED] // // Collectives Part I. Barrier // // Split-phase barrier over a Team // // This is a collective call over the team named by the 'tm' argument that // initiates a split-phase (non-blocking) barrier over the callers. // // + The return value is a root event which can be successfully synchronized // (return from gex_Event_Wait*() or zero return from gex_Event_Test*()) // only after all members of the team have issued a corresponding call. // + This call is non-blocking (may return before other team members have // issued a corresponding call). // + Calls to gex_Coll_BarrierNB() are not "compatible" with calls to // gasnet_barrier() or gasnet_barrier_notify() for the purpose of // determining collective calling order. // + The barrier operation provides the following memory ordering behaviors: // - Initiating a barrier operation shall perform a "release". // Within the thread that initiates the operation, memory accesses by the // processor, issued before the initiation call, shall not be reordered // after that call. Additionally, this includes accesses to memory by any // GASNet operations synchronized by that thread before initiation. // However, there is no ordering with respect to other GASNet operations. // - Synchronizing a barrier operation shall perform an "acquire". // Within the thread that synchronizes the operation, memory accesses by // the processor, issued after the synchronization call, shall not be // reordered before that call. Additionally, this includes accesses to // memory by any GASNet operations initiated by that thread after // synchronization. However, there is no ordering with respect to other // GASNet operations. // // tm: The call is collective over the associated team. // flags: Flags are reserved for future use and must currently be zero // gex_Event_t gex_Coll_BarrierNB(gex_TM_t tm, gex_Flags_t flags); // // Collectives Part II. Data Movement // // The following argument descriptions are applicable to all collective data // movement APIs in this section using arguments with these names. // // root: // The rank within 'tm' of one distinguished endpoint. More information // on the distinguishing role of the root is provided with the detailed // description of each such collective operation. // This is always a single-valued parameter. // src: // The local address of the caller's input buffer, if any. // This is not a single-valued parameter. // dst: // The local address of the caller's output buffer, if any. // This is not a single-valued parameter. // nbytes: // The length in bytes of one element of data. // This is a single-valued parameter. // flags: // A bitwise OR of zero or more of permitted GEX_FLAG_* constants. // Currently no flags are defined for data-movement collective // operations, and the value zero should be passed. // However, a future release will support the "segment disposition" // flags [UNIMPLEMENTED]. // Individual flags bits may or may not be single-valued, as will // be documented with each supported flag. // Broadcast // // This operation copies 'nbytes' bytes of data starting at 'src' on rank // 'root' of 'tm', to 'dst' on every rank within the 'tm'. // // The value of 'src' is ignored on all ranks other than 'root'. // // On the 'root' rank, the data is copied from 'src' to 'dst' except in the // case these pointers are equal. However, any other overlap between 'src' // and 'dst' buffers on the root rank yields undefined behavior. gex_Event_t gex_Coll_BroadcastNB( gex_TM_t tm, // The team gex_Rank_t root, // Root rank (single-valued) void * dst // Destination (all ranks) const void * src, // Source (root rank only) size_t nbytes, // Length of data (single-valued) gex_Flags_t flags); // Flags (partially single-valued) // // Collectives Part III. Computational // // User-Defined Reduction Operations // // GASNet provides a set of useful built-in reduction operations. These // should be favored whenever possible in performance-critical reductions, // because using a built-in operator is generally a prerequisite to leveraging // hardware-offload support for reductions which is available in some network // hardware. However for situations where none of the provided built-in // operations fit client requirements, GASNet also allows clients to provide // code for their own reduction operation. // // Reduction operations which do not correspond to a built-in opcode // (GEX_OP_*) constant are supported by passing GEX_OP_USER or GEX_OP_USER_NC // as the 'op' when initiating a reduction. // + GEX_OP_USER: denotes a user-defined operation that is both // associative and commutative. // + GEX_OP_USER_NC: denotes a user-defined operation that is // associative but NOT commutative. [UNIMPLEMENTED] // // The implementation will invoke the user-provided function an unspecified // number of times to perform the user's operation on a pair of vectors of // operands. // // The user-defined reduction operation is passed to the initiation call using // a function pointer with type gex_Coll_ReduceFn_t: typedef void (*gex_Coll_ReduceFn_t)( const void * arg1, // "Left" operands void * arg2_and_out, // "Right" operands and result size_t count, // Operand count const void * cdata); // Client-data // These arguments are defined as follows, with additional semantics below: // arg1: // This is a pointer to memory containing 'count' consecutive operands. // These may be caller-provided input values or intermediate results. // In the case of a non-commutative operation, these are the operands on // the "left-hand side" of the nominal operator. // The reduction operation is not permitted to write to this memory. // arg2_and_out: // This is a pointer to memory containing 'count' consecutive operands. // These may be caller-provided input values or intermediate results. // In the case of a non-commutative operation, these are the operands on // the "right-hand side" of the nominal operator. // The reduction operation must write the result(s) to this memory, as // described below. // count: // This is the number of "fields" on which to perform the reduction, and // thus the length of the accessible memory at 'arg1' and 'arg2_and_out' // is equal to 'count' times the size of each element (passed as 'dt_sz' // at initiation of the reduction). // Note that this argument may take on any positive value, which may be // either smaller or larger than the 'dt_cnt' passed at initiation of // the reduction. // cdata: // This is the value of the 'user_cdata' argument passed locally at // initiation of the reduction, and is intended to assist in implementing // more than a single data type and/or operation with a common C function. // // The function implementing a user-defined reduction operation: // + May use the 'cdata' argument to receive information (such as the // operation or data type) not provided by the other arguments. // + May assume 'arg1' and 'arg2_and_out' do not overlap each other. However, // they can overlap the 'src' buffer (and 'dst' buffer, if any) passed at // operation initiation. // + May perform the element-wise operations in any order, and parallel // computation is explicitly permitted. // + Shall interpret the 'arg1' and 'arg2_and_out' as arrays of length 'count' // with an element type corresponding to the data type passed at initiation // of the reduction. // + Shall apply the desired operation element-wise to each of the 'count' // pairs of operands, storing the result in the location from which the // second (right-hand) operand is retrieved. Here "element-wise" // application can be expressed in pseudo-code as follows, using 'T' to // denote the C data type and '(+)' to denote the operator: // T* x = (T*)arg1; // T* y = (T*)arg2_and_out; // For all i in [0..count) do y[i] = x[i] (+) y[i]; // + Shall not assume 'count' is equal to the 'dt_cnt' passed at operation // initiation, since the implementation is free to process the 'dt_cnt' // elements passed in at initiation in smaller groups, or to group more // than 'dt_cnt' pairs of operands into a single call to the user's // function. // + Shall not block pending any condition the satisfaction of which is // dependent on progress in GASNet (whether local or global). // + Shall not make any GASNet calls other than those enumerated as permitted // while holding a handler-safe lock, in the section "Calls from restricted // context" // + Shall not assume that the executing thread was created by the client. // + Shall allow for the possibility that the implementation invokes the // function concurrent with itself, even if the client has not spawned // threads. Use of handler-safe locks or GASNet-Tools atomics are // recommended mechanisms to deal with any access to global/persistent // state. // User-Defined Data Types // // Reductions on types without a corresponding built-in data type (GEX_DT_*) // constant are supported by passing GEX_DT_USER as the 'dt' when initiating a // reduction. In this case data elements are treated as indivisible byte // sequences with length given as 'dt_sz' at initiation of the reduction. // Reduction operations passing GEX_DT_USER for the data type must pass either // GEX_OP_USER or GEX_OP_USER_NC for the operation. // Limitations for Built-in Data Types // // + Operations on floating-point data types are not guaranteed to obey all // rules in the IEEE 754 standard even when the C float and double types // otherwise do conform. Deviations from IEEE 754 include (at least): // - Operations on signalling NaNs have undefined behavior. // - MIN and MAX *may* be performed as if on "sign and magnitude // representation integers" of the same width, resulting in // non-conforming behavior with quiet NaNs. // (See https://en.wikipedia.org/wiki/IEEE_754-1985, and especially // the section "Comparing_floating-point_numbers") // [THIS PARAGRAPH MAY NOT BE A COMPLETE LIST OF NON-IEEE BEHAVIORS] // // The following argument descriptions are applicable to all computational // collective APIs in this section using arguments with these names. // // src: // The local address of the caller's input buffer. // This is not a single-valued parameter. // dst: // The local address of the caller's output buffer, if any. // This is not a single-valued parameter. // dt: // The data type for the reduction operation. // Must be a GEX_DT_* constant documented as valid for Reductions. // This is a single-valued parameter. // dt_sz: // The length in bytes of one element of data. // When 'dt' is a built-in type, this value must be the size in bytes of // the corresponding built-in C type. When 'dt' is GEX_DT_USER, this // value must be the size in bytes of the user-defined data type. // This length must be non-zero. // This is a single-valued parameter. // dt_cnt: // The per-rank count of data elements to reduce (not a length in bytes). // This count must be non-zero. // This is a single-valued parameter. // op: // The opcode, of type gex_OP_t, naming the reduction operator. // Must be a GEX_OP_* constant documented as valid for Reductions. // This is a single-valued parameter. // user_op, user_cdata: // If 'op' is neither GEX_OP_USER nor GEX_OP_USER_NC, then these two // arguments are ignored. Otherwise 'user_op' is a local function // pointer of type gex_Coll_ReduceFn_t (described above), and // 'user_cdata' is a client data pointer to be passed to each local // invocation of 'user_op'. The 'user_cdata' is treated as opaque by the // implementation and therefore is not required to be a pointer to valid // memory. In particular, it may be NULL. // flags: // A bitwise OR of zero or more of permitted GEX_FLAG_* constants. // Currently no flags are defined for computational collective // operations, and the value zero should be passed. // However, a future release will support the "segment disposition" // flags [UNIMPLEMENTED]. // Individual flags bits may or may not be single-valued, as will // be documented with each supported flag. // Common Semantics // // All reductions are performed via an unspecified pattern of applications of // the operator to pairs of operands, under the assumptions that (1) all // operations are mathematically associative and (2) operations other than // GEX_OP_USER_NC are mathematically commutative. // // The implementation is not required to take measures to accommodate any // divergence (for instance of IEEE floating-point arithmetic) from the // assumptions in the preceding paragraph. Specifically, in the presence of // such divergence, the implementation is not required to provide equality of // the results of calls with mathematically equivalent arguments; neither // between distinct calls in the same execution, nor between the same call in // distinct executions. However, high-quality implementations will provide // reproducibility among calls with the same parameters within a single // execution (e.g. by applying the operation in a deterministic order). // // The implementation is not required to preserve the vector of 'dt_cnt' // elements as an indivisible unit. It is permitted not only to break the // vector into shorter ones, but may also concatenate multiple vectors to // lessen the number of calls to a user-defined reduction operator. // // This specification does not require that a user-defined function applies // the semantically equivalent operation to every pair of inputs. Nothing in // this specification prohibits passing a different user-defined operator on // each caller, nor does it prohibit a user-defined operator from applying a // different operation depending on an element's location in the argument // vectors. However, both behaviors are strongly discouraged. Since this // specification explicitly permits the implementation freedom in the order of // reductions in both rank and vector dimensions, either of these behaviors // will result in unpredictable output values. Nothing in this paragraph is // intended to prohibit, or discourage use of, user-defined operations with // behaviors which depend on characteristics encoded in a user-defined data // type (which may include position in the rank or vector dimensions); the // intent is to discourage operators which *infer* such position information. // Reduction to one // // This is a collective call over the team named by the 'tm' argument that // initiates a non-blocking reduction applying the operation denoted by 'op' // repeatedly to reduce a collection of operands of type denoted by 'dt'. // Each member of 'tm' provides a 'src' vector of length 'dt_cnt' (in // elements), and the elements are reduced element-wise such that the i'th // element of the output vector is the reduction over the i'th elements of the // 'src' vectors of all team members. The result is written to the 'dst' of // one 'root' rank. // // Using `(+)` to represent the nominal reduction operator, and `src_i[j]` to // denote the i'th element of the 'src' vector passed by rank 'j', the result // produced on the 'root' rank can be expressed as: // dst_i = src_i[0] (+) src_i[1] ... (+) src_i[N-1] // where `N = gex_TM_QuerySize(tm)`. // // This call is non-blocking (may return before other team members have issued // a corresponding call). // // On the 'root' rank the 'dst' buffer has length in bytes of 'dt_sz * dt_cnt'. // The value of 'dst' is ignored on all other ranks. // // On all ranks the 'src' buffer has length in bytes of 'dt_sz * dt_cnt'. // // On the 'root' rank, it is permitted that 'src' and 'dst' be equal. // However, any other overlap between 'src' and 'dst' buffers on the root rank // yields undefined behavior. // // LIMITATIONS of the current release: // + The current implementation may limit `dt_sz` for user-defined types to as // little as 32KB bytes in some configurations and with default parameters. // The precise limit depends on the network, the sizes of the job and team, // and the size of the team's collective scratch space. gex_Event_t gex_Coll_ReduceToOneNB( gex_TM_t tm, // The team gex_Rank_t root, // Root rank (single-valued) void * dst, // NOT single-valued const void * src, // NOT single-valued gex_DT_t dt, // Data type (single-valued) size_t dt_sz, // Data type size (single-valued) size_t dt_cnt, // Element count (single-valued) gex_OP_t op, // Operation (single-valued) gex_Coll_ReduceFn_t user_op, // NOT single-valued void * user_cdata, // NOT single-valued gex_Flags_t flags); // Flags (partially single-valued) // Reduction to all // // This is a collective call over the team named by the 'tm' argument that // initiates a non-blocking reduction applying the operation denoted by 'op' // repeatedly to reduce a collection of operands of type denoted by 'dt'. // Each member of 'tm' provides a 'src' vector of length 'dt_cnt' (in // elements), and the elements are reduced element-wise such that the i'th // element of the output vector is the reduction over the i'th elements of the // 'src' vectors of all team members. The result is written to the 'dst' of // all ranks. // // The definition of the element-wise reduction is the same as was given above // for gex_Coll_ReduceToOneNB(). // // This call produces an output in the 'dst' buffer of all ranks. However, // the implementation is free to apply associativity (and commutativity for // operators other than GEX_OP_USER_NC) *differently* in producing the // multiple outputs. Therefore, when the operator differs from the assumed // mathematical properties, the results on different ranks might not be // identical. // // The 'dst' and 'src' buffers have length in bytes of 'dt_sz * dt_cnt'. // // It is permitted that 'src' and 'dst' be equal pairwise either on every rank, // or on none of them. Any other overlap between 'src' and 'dst' buffers // yields undefined behavior. This includes any case in which 'src' and 'dst' // are equal on at least one rank, but less than all ranks in the team (though // this last restriction may be relaxed in a future release). // // LIMITATIONS of the current release: // + The current implementation may limit `dt_sz` for user-defined types to as // little as 32KB bytes in some configurations and with default parameters. // The precise limit depends on the network and sizes of the job and team. gex_Event_t gex_Coll_ReduceToAllNB( gex_TM_t tm, // The team void * dst, // NOT single-valued const void * src, // NOT single-valued gex_DT_t dt, // Data type (single-valued) size_t dt_sz, // Data type size (single-valued) size_t dt_cnt, // Element count (single-valued) gex_OP_t op, // Operation (single-valued) gex_Coll_ReduceFn_t user_op, // NOT single-valued void * user_cdata, // NOT single-valued gex_Flags_t flags); // Flags (partially single-valued) // End of section describing APIs provided by gasnet_coll.h //---------------------------------------------------------------------- // // Memory Kinds (Device memory support) // // GASNet-EX features support for communication involving memory segments // which are associated with various accellerator devices, e.g. HBM onboard GPUs. // // The API for this support is currently described in the following document: // // GASNet-EX API: Memory Kinds // // which should be available in memory_kinds.pdf as a sibling to this file. // Implementation status of Memory Kinds support is described in the document: // // GASNet-EX Memory Kinds: Implementation Status // // which should be available in memory_kinds_implementation.md as a sibling to this file. // End of "Memory Kinds" section //---------------------------------------------------------------------- // vim: syntax=c gasnet-2025.8.0/docs/gasnet1_differences.md0000664000175000017500000001744315142313673020604 0ustar alastairalastair# GASNet-1 Backwards-Compatibility in GASNet-EX ## Introduction The GASNet-EX library is the result of a major specification upgrade and implementation renovation effort, building upon 15 years of lessons learned with the earlier GASNet-1 interface and implementation. GASNet-EX is the next generation of the GASNet-1 communication system, continuing our commitment to provide portable, high-performance, production-quality, open-source software. GASNet-EX interfaces are focused on the emerging needs of exascale supercomputing, providing communication services to a variety of programming models on current and future HPC architectures. For an introduction to GASNet-EX, please see: * Bonachea D, Hargrove P. "GASNet-EX: A High-Performance, Portable Communication Library for Exascale", Proceedings of Languages and Compilers for Parallel Computing (LCPC'18), Oct 2018. https://doi.org/10.25344/S4QP4W For more details on the GASNet-EX API see: [GASNet-EX.txt](GASNet-EX.txt) ## Using GASNet-1 APIs over GASNet-EX We highly encourage all client authors to update their codes from GASNet-1 interfaces to GASNet-EX replacements, in order to reap benefits in performance, scalability and functionality relative to what's available through the GASNet-1 API. However in the interests of backwards-compatibility and smoothing transitional efforts, the GASNet-EX implementation also includes a complete implementation of the GASNet-1 API. Legacy client codes may continue to `#include ` and use the GASNet-1 APIs provided by that header, as specified in the latest GASNet-1 spec: * Bonachea D, Hargrove P., "GASNet Specification, v1.8.1", Lawrence Berkeley National Laboratory Tech Report (LBNL-2001064). Aug 2017. https://doi.org/10.2172/1398512 ### Compliance Status Early versions of GASNet-EX (starting in release 2017.6.0) were mostly compliant with the GASNet-1 API, implementing all GASNet-1 calls in common usage. Starting in release 2019.3.0, the **current GASNet-EX implementation is fully compliant with the GASNet-1 specification**. The GASNet-EX implementation of GASNet-1 APIs is functionally correct, but may exhibit minor differences in performance characteristics relative to the GASNet-1 implementation. In many cases, the GASNet-EX implementation is noticably more efficient (by virtue of improvements made to shared internal code). In a few rare cases the opposite may be true. One notable example of the latter is `gasnet_AMRequestLongAsync*()` now always blocks for local completion of the source payload before returning from injection; clients wishing flexible control over local completion behavior should call `gex_AM_RequestLong*()` instead. ### Behavioral Differences Although GASNet-EX provides a compliant implementation of the GASNet-1 specification, there are some minor behavioral differences between the legacy GASNet-1 implementation and the current GASNet-EX-based backwards-compatibility layer. These differences are unlikely to be relevant for most clients, and mostly arise in unspecified or underspecified areas of the GASNet-1 specification. They are documented below for completeness: * The GASNet-1 spec is a bit vague about the behavior of RMA operations or AMLong operations where the source and destination memory regions overlap. GASNet-EX considers this a usage error that yields undefined behavior, and in some cases the implementation may diagnose such errors as fatal. * There is similarly some vagueness in the behavior of RMA operations or AMLong operations where any portion of the remote address range falls outside the registered GASNet segment. GASNet-EX considers this a usage error that yields undefined behavior, and in some cases the implementation may diagnose such errors as fatal. * GASNet-1 provided "non-bulk" RMA put/get operations, which required the payloads be "properly aligned for accessing objects of size nbytes". This requirement has been relaxed in the GASNet-EX implementation which no longer requires any particular payload alignment for RMA put/get. As such, `gasnet_get{,_nb,_nbi}()` and *blocking* `gasnet_put()` are now semantically identical to their `_bulk` variants. Non-blocking put calls still differ in the local completion semantics of the source buffer for `_bulk` vs "non-bulk" variants. * The `nbytes` argument to `AM_{Request,Reply}Long()` calls has always been permitted to be zero, specifying an empty payload transfer. GASNet-1 stated that in this case the destination address passed to the AMLong handler at the target was unspecified. GASNet-EX strengthens this to guarantee the `dest_addr` value provided at the initiator is always delivered to the corresponding target-side handler argument, even in the case of an empty payload transfer. * The `minheapoffset` argument to `gasnet_attach()` is now ignored. * The GASNet-1 spec only requires implementations to support 65535 "in-flight" non-blocking operations per process, and the GASNet-1 implementation imposed a per-thread limit of ~64K explicit handles. In the GASNet-EX implementation the number of in-flight ops is now limited only by available heap memory. * GASNet-1 specifies `gasnet_handle_t` values are thread-specific, but GASNet-EX implements `gasnet_handle_t` as an alias for `gex_Event_t`, values of which are thus thread-independent. * The GASNet-1 spec allowed creation of a zero-length RMA segment, but this was not a useful capability in practice, with no known clients relying upon this corner-case. GASNet-EX prohibits zero-length memory segments to reduce pointless corner cases. Calls to the legacy `gasnet_attach()` call requesting a zero-length segment are now silently rounded up to one page, maintaining compatibility at the cost of wasting a small amount of memory for clients theoretically using this corner case. * The Vector/Index/Strided (VIS) non-contiguous RMA library calls in the GASNet-1 implementation `gasnet_{put,get}{v,i,s}*()` were prototypes and not a normative part of the GASNet-1 specification. Nevertheless, the GASNet-EX implementation provides full backwards-compatibility with those prototype interfaces, declared in ``. * The collectives library calls (excluding barrier) in the GASNet-1 implementation (`gasnet_coll_*`) were prototypes and not a normative part of the GASNet-1 specification. GASNet-EX includes a fundamental redesign of these interfaces, specified in [GASNet-EX.txt](GASNet-EX.txt). The GASNet-1 prototype variants of these calls are not supported. ## Mixing GASNet-EX and GASNet-1 in a Transitional Client GASNet-EX supports incremental migration from GASNet-1 APIs to GASNet-EX APIs, allowing calls to both APIs within a transitional client. Such clients are subject to the following notes and restrictions: * Clients must initialize the library using exactly one of `gasnet_init()` (GASNet-1) or `gex_Client_Init()` (GASNet-EX). The former automatically activates backwards-compatibility with legacy GASNet-1 behaviors. The latter can be passed the flag `GEX_FLAG_USES_GASNET1` to activate the same behaviors. * Clients who call `gasnet_init()` have selected the GASNet-1 init sequence, and are required to call `gasnet_attach()` before making any other GASNet calls, aside from those documented in the GASNet-1 specification as permitted in the init/attach interval. * Clients who init using `gasnet_init()` may obtain the objects necessary for invoking GASNet-EX calls using `gasnet_QueryGexObjects()`. See [GASNet-EX.txt](GASNet-EX.txt) for details. * GASNet-EX collectives calls and the GASNet-1 barrier call are prohibited from operating concurrently. See [GASNet-EX.txt](GASNet-EX.txt) for details. * See [GASNet-EX.txt](GASNet-EX.txt) for complete details on how GASNet-EX types and functions differ from the GASNet-1 entities they replace. gasnet-2025.8.0/docs/implementation_defined.md0000664000175000017500000000416715142313673021407 0ustar alastairalastair# GASNet-EX Implementation-Defined Documentation This file documents client-facing implementation-specific behaviors of the current GASNet-EX implementation provided by Lawrence Berkeley National Laboratory. For details of the GASNet-EX API specification and/or detailed implementation status information, see appropriate sibling documents. ## Preprocessor Identifiers The following are preprocessor identifiers conditionally provided by this implementation. These are not officially part of the GASNet-EX library specification, and all represent optional implementation features. In particular, lack of support for these features would not prevent an alternative implementation from claiming conformance. + `GASNET_[NET]_CONDUIT` This is defined to `1`, with the name of the conduit in upper-case replacing the `[NET]` place-holder. Example: `GASNET_SMP_CONDUIT` Exactly one such macro will be defined by this implementation in any given include of gasnetex.h. + `GASNET_DEBUG` *OR* `GASNET_NDEBUG` `GASNET_DEBUG` is defined to `1` if and only if the library was configured with debugging support enabled, and is #undef otherwise. `GASNET_NDEBUG` is defined to `1` if and only if the library was configured *without* debugging support enabled, and is #undef otherwise. Exactly one such macro will be defined by this implementation in any given include of gasnetex.h. + `GASNET_TRACE` This identifier is defined to `1` if and only if the library was configured with tracing support enabled, and is #undef otherwise. + `GASNET_STATS` This identifier is defined to `1` if and only if the library was configured with statistical collection support enabled, and is #undef otherwise. + `GASNET_SRCLINES` This identifier is defined to `1` if and only if the library was configured with source lines support enabled, and is #undef otherwise. + `GASNET_PSHM` This identifier is defined to `1` if and only if the library was configured with PSHM support enabled, and is #undef otherwise. See top-level README documentation for more details about each of these optional features. gasnet-2025.8.0/docs/memory_kinds_implementation.md0000664000175000017500000007076215142313673022515 0ustar alastairalastair# GASNet-EX Memory Kinds: Implementation Status # Introduction This document provides a detailed status of the Memory Kinds feature implementation and is updated as that status changes. This document makes references to an external document: + GASNet-EX API: Memory Kinds which is available in the repository as For brevity, this will be referenced as simply "the MK API". The majority of this document will address only "CUDA_UVA" and "HIP" memory kinds. For information regarding other experimental memory kinds, see the [Experimental Memory Kinds](#markdown-header-experimental-memory-kinds) section. # General Usage By default, the `configure` script does not enable support for any non-host memory kinds. Use of new configure option `--enable-memory-kinds` enables probes for the necessary headers and libraries for all available device "kinds" (presently "CUDA_UVA", "HIP" and "ZE") and enables the prototype implementation of memory kinds if such support is found. This is the recommended mechanism to enable memory kinds support, since it will enable additional kinds as they are added. For more detailed control for a given kind (such as "cuda-uva" or "hip") the following take precedence over `--(en|dis)able-memory-kinds`: + `--disable-kind-[name]` disables probing for support for the named kind. + `--enable-kind-[name]` probes for support for the named kind, with failure of the probe being a fatal `configure` error. + `--enable-kind-[name]=probe` probes for support for the named kind, with failure of the probe being non-fatal (the same behavior requested for all kinds by using `--enable-memory-kinds`). On our main development platforms, the logic in `configure` is sufficient to locate the required headers and libraries with no additional options. However, the following options (and environment equivalents) are available to guide the probe if needed: + `--with-cuda-home=...` or `CUDA_HOME` + `--with-cuda-cflags=...` or `CUDA_CFLAGS` + `--with-cuda-libs=...` or `CUDA_LIBS` + `--with-cuda-ldflags=...` or `CUDA_LDFLAGS` + `--with-hip-home=...` or `HIP_HOME` + `--with-hip-cflags=...` or `HIP_CFLAGS` + `--with-hip-libs=...` or `HIP_LIBS` + `--with-hip-ldflags=...` or `HIP_LDFLAGS` Generally, it is sufficient to provide the installation prefix of the device library installation using the `--with-...-home` option or the corresponding environment variable, since the remaining settings all have sensible defaults once the installation prefix is known. Clients can use the preprocessor identifier `GASNET_HAVE_MK_CLASS_CUDA_UVA` (defined to `1` or undefined) to determine if support for the CUDA_UVA memory kind was detected at configure time. Clients can use the preprocessor identifier `GASNET_HAVE_MK_CLASS_HIP` (defined to `1` or undefined) to determine if support for the HIP memory kind was detected at configure time. The preprocessor identifier `GASNET_HAVE_MK_CLASS_MULTIPLE` is more general, providing the client with an indication if configure detected support for *any* memory kinds other than host memory. Again the value is either defined to `1` or undefined. # Supported Configurations All current memory kinds implementation work is limited to two types of devices: 1. Devices with the CUDA Device API and Unified Virtual Addressing (UVA). This should include all modern NVIDIA GPUs and CUDA Toolkit versions. 2. Devices with the HIP API, which should include all AMD GPUs supported by AMD ROCm. Please consult the ROCm documentation for information on supported devices. Support is further limited to the following conduit/network combinations, and only when running drivers with support for PCIe peer-to-peer communication: + ibv-conduit on Linux over NVIDIA/Mellanox InfiniBand hardware + ucx-conduit on Linux over NVIDIA/Mellanox InfiniBand hardware + ofi-conduit (`verbs` provider) on Linux over NVIDIA/Mellanox InfiniBand hardware + ofi-conduit (`verbs` provider) on HPE Cray EX systems using Slingshot-10 NICs + ofi-conduit (`cxi` provider) on HPE Cray EX systems using Slingshot-11 NICs + ofi-conduit *may* work with other providers and/or networks, but the GASNet-EX maintainers lack access to test such configurations. Reports of success or failure are encouraged! In this document we will use "communication offload" in place of vendor-specific terms for the relevant technology ("GPUDirect RDMA" for NVIDIA or "ROCmRDMA" for AMD), except when a specific vendor's technology is intended. In some cases, additional optional software (such as GPU-specific Linux kernel modules) is required. Please consult your GPU vendor's documentation for assistance determining what driver software is needed for your specific hardware and Linux distribution. The Open MPI and MVAPICH projects also have some documentation regarding deploying of communication offload for their respective MPI implementations. With ibv-conduit, `GASNET_SEGMENT_FAST` segment mode is supported. This is the default segment mode, but can be specified explicitly at configure time using the `--enable-segment-fast` option. To be clear: `--enable-segment-large` and `--enable-segment-everything` configurations of ibv-conduit do not support the memory kinds work in the current implementation. With ucx-conduit, `GASNET_SEGMENT_FAST` and `GASNET_SEGMENT_LARGE` segment modes are supported. Fast is the default segment mode, but can be specified explicitly at configure time using the `--enable-segment-fast` option. To be clear: `--enable-segment-everything` configurations of ucx-conduit do not support the memory kinds work in the current implementation. With ofi-conduit, `GASNET_SEGMENT_FAST` and `GASNET_SEGMENT_LARGE` segment modes are supported. Fast is the default segment mode, but can be specified explicitly at configure time using the `--enable-segment-fast` option. To be clear: `--enable-segment-everything` configurations of ofi-conduit do not support the memory kinds work in the current implementation. To the best of our knowledge communications offload support is not available on current aarch64 (aka ARM64 or ARMv8) systems. NVIDIA does not support UVA on 32-bit platforms, and AMD does not claim any 32-bit CPU support at all. This work currently supports only x86-64 and ppc64le. For configurations on an unsupported CPU architecture which otherwise appear to to satisfy the configure-testable requirements above, a warning will be issued. In the case that `--enable-kind-[kind]` was passed but a testable requirement other than CPU architecture is not satisfied, `configure` will fail. In other cases lacking prerequisites, `GASNET_HAVE_MK_CLASS_[KIND]` will be undefined and attempts to create device segments will fail at runtime. Future releases are expected to eventually include a "reference implementation" that will allow creation of device segments on a wider range of platforms and transparently stage transfers through host memory bounce buffers, but that is not yet present. If support is enabled at configure time, then the implementation will attempt to determine at runtime if communication offload support is present or not. If it is not, then `gex_MK_Create()` will fail with an appropriate message. ## Limits on GPU segment size Modern GPUs supporting communication offload utilize a "Base Address Register" mechanism to map the device memory into the PCIe address space. The amount of memory which can be mapped by GASNet-EX as a GPU segment is limited by the `BAR` capability of your GPU, which can also be severely limited by the motherboard and/or BIOS. To query the BAR capability of an NVIDIA GPU, run `nvidia-smi -q` and look for the "Total" value in the "BAR1 Memory Usage" section for an (optimistic) maximum on the amount of memory which can be mapped. We are not currently aware of a programmatic means to query the BAR capability of an AMD GPU. However, the Linux kernel boot messages (sometimes available via the `dmesg` utility or in `/var/log/boot`, or similar) may contain lines like the following: ``` [ 115.169185] amdgpu 0000:03:00.0: amdgpu: VRAM: 32752M 0x0000008000000000 - 0x00000087FEFFFFFF (32752M used) [ 115.169188] amdgpu 0000:03:00.0: amdgpu: GART: 512M 0x0000000000000000 - 0x000000001FFFFFFF [ 115.169190] amdgpu 0000:03:00.0: amdgpu: AGP: 267780096M 0x000000A000000000 - 0x0000FFFFFFFFFFFF [ 115.169201] [drm] Detected VRAM RAM=32752M, BAR=32768M ``` Which in this case shows slightly under 32GB of VRAM and a BAR size of a full 32GB. In this instance, the VRAM size of `32752M` is the relevant size and, just like the NVIDIA case, is an (optimistic) maximum limit on mappable memory. For either GPU vendor, these limits are per GPU across all process and runtimes on a given node. Thus a portion is consumed by each GASNet-EX segment created on a given node, as well as by other uses of GPUDirect RDMA such as an MPI implementation. Typically a few tens of MB are also reserved by the driver itself, though driver overheads as large as 560MB per process have been observed. Additionally, the BAR usage is *per-HCA* and thus use of multiple rails may limit the size of GPU segments. ## UCX Support for Memory Kinds The support for CUDA and HIP/ROCm device memory has been *optionally* available in UCX since the 1.6.0 release (which is also the oldest supported by ucx-conduit). The ucx-conduit has support for `GEX_MK_CLASS_CUDA_UVA` and `GEX_MK_CLASS_HIP`. However, see "UCX and CUDA memory" under "Known Issues", below. ## OFI (aka libfabric) Support for Memory Kinds Our testing has found version 1.12.0 of libfabric to be the oldest which correctly supports CUDA device memory (modulo the known issues listed later). For HIP/ROCm device memory the minimum is 1.12.1. In both cases the support in libfabric is optional and must be explicitly enabled when the library is built. In general, absence of the appropriate device support in a build of libfabric will go undetected at run time and device memory will be treated as host memory. This can lead to random data corruption, SIGBUS or SIGSEGV errors, which might be indistinguishable from some of the known issues described later. To enable device memory support in a build of libfabric from sources, pass its `configure` script one or both of `--with-cuda` or `--with-rocr` (yes "rocr" not "rocm"). If the necessary CUDA or ROCm runtime libraries are not in the default locations, then one may pass an optional argument such as `--with-cuda=/opt/nvidia/cuda-11.2`. To query an install of libfabric for CUDA support, the most reliable means known to us is to run `fi_pingpong` on a compute node with debug tracing enabled using the two commands which follow: ```sh $ fi_pingpong & $ env FI_LOG_LEVEL=debug fi_pingpong localhost |& grep ofi_hmem_init ``` This will yield one or more lines of the form ``` libfabric:[PID]:[TIMESTAMP]:core:core:ofi_hmem_init():222 Hmem iface FI_HMEM_[API] not supported ``` Where `[API]` may be `CUDA` or `ROCR`, among others. These lines enumerate the device APIs which are *not* supported in the libfabric build. It is generally safe to assume that absence of your target API from this output means support is present in your build of libfabric (assuming it meets the minimum version requirements, above). The ofi-conduit has support for `GEX_MK_CLASS_CUDA_UVA` and `GEX_MK_CLASS_HIP`. However, see multiple "OFI *" entries under "Known Issues", below. # Known Issues ## Loopback The current implementation does not handle RMA operations between combinations of host and GPU memory in the same process (loopback), though this will be supported in the future. It should be noted that this temporary limitation precludes use of GASNet for transfers which could alternatively be performed using `cudaMemcpy()`, or `cuMemcpy{DtoH,HtoD,DtoD}()` (possibly with some CUDA calls to enable peer-to-peer access), or by using the `hipMemcpy*()` equivalents. Therefore, it is recommended practice (and will *continue* to be so when this limitation is removed) that clients bypass GASNet-EX to perform such transfers. For the most up-to-date information on this issue see [bug 4149](https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4149) ## CUDA Primary Context The current implementation of CUDA_UVA memory kinds uses the device's primary context for any GASNet-allocated segments, and requires that client-allocated CUDA device memory passed to `gex_Segment_Create()` be associated with the device's primary context. This limitation is not part of the specification, and may be relaxed in a future release. ## Small Gets into CUDA memory on supported InfiniBand hardware As documented [here](https://github.com/linux-rdma/rdma-core/blob/master/providers/mlx5/man/mlx5dv_create_qp.3.md) current versions of libibverbs for "mlx5" generation HCAs may default to performing small RMA Gets into an unused space in the work request structure to minimize the number of PCI bus crossings required. Such Get operations are eventually completed by a `memcpy()` to the original destination when the completion queue entry is reaped. This `memcpy()` fails (with a `SIGSEGV`) when the destination is device memory. As noted in the vendor's documentation, setting `MLX5_SCATTER_TO_CQE=0` in the environment disables this undesired behavior. We hope to be able to provide a better solution (automatic and specific to device memory Gets) in a future release. This issue has been seen to impact ibv-, ucx- and ofi-conduits running over supported InfiniBand hardware, but not on *every* system. Because this work-around may increase the latency of all small RMA Gets, including those into host memory, it is recommended that you set `MLX5_SCATTER_TO_CQE=0` only if your system exhibits this issue. For the most up-to-date information on this issue see [bug 4151](https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4151) ## UCX and CUDA memory Use of GASNet-EX "CUDA_UVA" memory kinds with ucx-conduit may crash due to incorrect default algorithm selection inside UCX for RMA transfers involving device memory. For sufficiently recent UCX versions, there are work-arounds based on setting environment variables to modify the algorithm selection to be correct for device memory at the expense of slowing of host memory RMA. For the most up-to-date information on this issue see [bug 4384](https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4384) ## OFI and Unsupported Providers Currently, ofi-conduit support for memory kinds is limited to the `verbs` and `cxi` libfabric providers (when they are built with appropriate `FI_HMEM` capability support). If ofi-conduit is compiled with memory kinds enabled and used with any other provider, the `GEX_MK_CLASS_*` defines will indicate support for the relevant kinds but calls to `gex_MK_Create()` will return `GASNET_ERR_RESOURCE`. It is hoped that in the future builds of ofi-conduit for an unsupported provider will not define `GEX_MK_CLASS_*`. ## OFI/InfiniBand and CUDA memory When using ofi-conduit and the `verbs` provider over supported InfiniBand hardware, RMA Puts with their source in CUDA device memory may crash with a `SIGSEGV` due to incorrect algorithm selection inside libfabric. This issue has been seen with a subset of applicable systems, with the majority of those tested *not* reproducing the problem. We have been unable to correlate the problem with the versions of the HCA, firmware, driver or libibverbs. If you are using an impacted system, this issue can be worked-around by setting `FI_VERBS_INLINE_SIZE=0` in the environment. Because this setting disables a valuable performance optimization, it may increase the latency of all small RMA Puts, including those from host memory, and small Active Message. Therefore, it is strongly recommended that you set this variable *only* if your system exhibits this issue. For the most up-to-date information on this second issue see [bug 4494](https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4494) ## OFI/Slingshot-10 and CUDA memory Because the Slingshot-10 network uses an InfiniBand HCA and libfabric's `verbs` provider, such systems are impacted by two of the known issues described above. 1. Small Gets into CUDA memory on supported InfiniBand hardware The work around of setting `MLX5_SCATTER_TO_CQE=0` is effective. 2. OFI/InfiniBand and CUDA memory The work around of setting `FI_VERBS_INLINE_SIZE=0` is effective. This is based on testing with HPE's `libfabric/1.11.0.x.y` environment module (for multiple values of `x` and `y`). # Tested Configurations We have yet to establish the minimum required versions of hardware, drivers or libraries. However, the following platforms are our primary development systems and represent "known good" combinations (modulo those caveats listed elsewhere in this document): Summit: + ppc64le (IBM POWER9) + CUDA 10.1.243 and 11.3 + Mellanox ConnectX-5 HCAs + NVIDIA Volta-class GPUs Dirac: + x86_64 (Intel Nehalem) + CUDA 11.1 through 11.6 + Mellanox ConnectX-5 HCAs + NVIDIA Maxwell-class GPUs AMD GPU systems: + x86_64 (multiple AMD CPU families) + ROCm 4.5 + Mellanox ConnectX-5 and ConnectX-6 HCAs + AMD Instinct-class (MI50, MI100, MI250X) GPUs HPE Cray EX systems with Slingshot-10: + SS10+Nvidia: - AMD Milan CPUs - Mellanox ConnectX-5 HCAs - Nvidia A100 GPUs - CUDA 11.6 and 11.7 + SS10+AMD: - AMD Rome CPUs - Mellanox ConnectX-5 HCAs - AMD MI100 GPUs - ROCm 4.5 HPE Cray EX systems with Slingshot-11: + SS11+Nvidia: - AMD Milan CPUs - HPE Cassini NICs - Nvidia A100 GPUs - CUDA 11.7 + SS11+AMD: - AMD Milan CPUs - HPE Cassini NICs - AMD MI250X GPUs - ROCm 5.1.0 Eventual minimum requirements may be lower than on the platforms listed above, or possibly higher. # Experimental Memory Kinds ## oneAPI Level Zero "ZE" Kind Currently there is experimental support for the "oneAPI Level Zero" API of Intel GPUs, which is known as the "ZE" kind. There are known correctness issues, the performance has yet to be characterized or tuned, and there are multiple quality-of-implementation issues to be addressed before this support can be recommended for use in production. One notable aspect of the experimental status is that the kind-specific members in `gex_MK_Create_args_t` are subject to change in future releases. We advise contacting us at gasnet-staff@lbl.gov if you wish to use the ZE kind. Support for the ZE kind is only present in ofi-conduit, and has only been tested with the `cxi` provider for HPE Cray EX systems using Slingshot-11 NICs. It has *not* been tested with ofi-conduit using the 'verbs' libfabric provider for Slingshot-10 or other networks using NVIDIA/Mellanox InfiniBand hardware. We encourage reports of success or failure with other libfabric providers. There currently is no ZE memory kind support in ibv- or ucx-conduits. We are seeking access to InfiniBand-connected clusters of nodes with Intel GPUs to enable work on ibv- and ucx-conduits, and on the `verbs` provider for ofi-conduit. Please contact us if you can provide such access. Configure options and environment variables to enable and configure the ZE kind are analogous to those for CUDA-UVA and HIP, and behave as described earlier under [General Usage](#markdown-header-general-usage): + `--enable-kind-ze[=probe]` + `--with-ze-home=...` or `ZE_HOME` + `--with-ze-cflags=...` or `ZE_CFLAGS` + `--with-ze-libs=...` or `ZE_LIBS` + `--with-ze-ldflags=...` or `ZE_LDFLAGS` Clients can use the preprocessor identifier `GASNET_HAVE_MK_CLASS_ZE` (defined to `1` or undefined) to determine if support for the ZE memory kind was detected at configure time. ### Minimum System Requirements for the ZE Kind Testing of the ZE kind and Slingshot-11 networks has shown the vendor-provided kernel with SUSE Linux Enterprise Server 15 SP4 (aka "SLES 15.4") to be usable. However, when using the kernel provided with SLES 15.3, all calls to `gex_EP_BindSegment()` with ZE device memory segments fail. We encourage reports of success or failure with other kernel versions. Our testing has shown that prior to the 2.1.2 release of HPE's Slingshot Host Software, 32KiB was the largest device memory segment size which could successfully be used with the ZE kind and the ofi-conduit `cxi` provider. Consequently, we strongly recommend the 2.1.2 release of HPE's Slingshot Host Software as a minimum version when using the `cxi` provider. For the most up-to-date information on this issue see [bug 4679](https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4679) ### Known Issues with the ZE Memory Kind As documented (see `man fi_cxi` on an HPE Cray EX), the libfabric cxi provider can only support native memory kinds on Intel GPUs when "implicit scaling" is disabled. The following two environment variables should be set to accomplish that: ``` EnableImplicitScaling=0 NEOReadDebugKeys=1 ``` Otherwise, all calls to `gex_EP_BindSegment()` with ZE device memory segments fail with a "Function not implemented" error message. As of the time of writing, testing has shown 2GiB to be the largest device memory segment size which can reliably be used with the ZE kind and the ofi-conduit `cxi` provider. Sizes above 2GiB are unreliable (we see random communication errors), and 16GiB and above fail in `gex_EP_BindSegment()` with a "Function not implemented" or "No such device or address" error message. We encourage reports of success with device segments larger than 2GiB. See [bug 4679](https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4679) for more information on the topic of limited device segment sizes. # Implementation Status Summary Currently the implementation is sufficient (when hardware, software and configuration constraints are met) to use the pseudo-code below to perform RMA operations between combinations of host and GPU memory (subject to any previously noted temporary prohibitions, such as on loopback transfers). Please note that all error checking has been elided from this example. Proper checking of return codes, if any, is especially important when using this prototype. Modifications for `GEX_MK_CLASS_HIP` are straight-forward, requiring only changes to the initialization of `args`. ``` // Bootstrap and establish host memory segment for the primordial endpoints gex_Client_Init(&myClient, &myEP, &myTM, "MK example", &argc, &argv, 0) gex_Segment_Attach(...); // Create memory kind object for CUDA device 0 gex_MK_t dev0Kind; gex_MK_Create_args_t args; args.gex_flags = 0; args.gex_class = GEX_MK_CLASS_CUDA_UVA; args.gex_args.gex_class_cuda_uva.gex_CUdevice = 0; gex_MK_Create(&dev0_kind, myClient, args, 0); // Ask GASNet to allocate a 1GB CUDA UVA segment gex_Segment_t dev0Segment; gex_Segment_Create(&dev0Segment, myClient, NULL, 1024*1024*1024, dev0Kind, 0); // Create an RMA-only endpoint, bind dev0Segment and publish RMA credentials gex_EP_t dev0EP; gex_EP_Create(&dev0EP, myClient, GEX_EP_CAPABILITY_RMA, 0); gex_EP_BindSegment(dev0EP, dev0Segment, 0); gex_EP_PublishBoundSegment(myTM, &dev0EP, 1, 0); // Note assumptions made in remainder of this example assert( gex_EP_QueryIndex(myEP) == 0 ); assert( gex_EP_QueryIndex(dev0EP) == 1 ); // Query device addresses needed for RMA void *loc_dev0, *rem_dev0; loc_dev0 = gex_Segment_QueryAddr(dev0Segment); gex_Event_t ev = gex_EP_QueryBoundSegmentNB(gex_TM_Pair(myEP,1), peer_rank, &rem_dev0, NULL, NULL, 0); gex_Event_Wait(ev); // [ do something that places data in GPU memory ] // Perform a blocking 4MB GPU-to-GPU Get gex_RMA_GetBlocking(gex_TM_Pair(dev0EP,1), loc_dev0, peer_rank, rem_dev0, 4*1024*1024, 0); ``` # Implementation Status by GASNet-EX API This section describes the known limitations of each of the APIs introduced recently in order to support memory kinds. Due to interaction among APIs, it is impossible to completely avoid forward references. ## `gex_Segment_Attach()` The `gex_Segment_Attach()` call remains the only supported means by which to create and bind a segment to the primordial endpoint. This is true despite the recent introduction of APIs which, when used in the proper sequence, would appear to provide a suitable replacement. While this is technically a limitation of the alternative APIs, it is documented here for clarity. ## `gex_Segment_Create()` This API, along with all types and constants required to specify its arguments, are defined and will link in any conduit. However, it is useful only when multi-EP support exists (see `gex_EP_Create()` for the current scope of multi-EP support). On those conduits and segment modes listed under "Supported Configurations", the implementation of this API is believed to be complete with respect to the MK API. In particular, it is capable of creating segments of both client-allocated and GASNet-allocated memory, using either the defined `kind` value `GEX_MK_HOST` or a kind created using `gex_MK_Create()` with a class of `GEX_MK_CLASS_CUDA_UVA` or `GEX_MK_CLASS_HIP`. Notably lacking from both specification and implementation is a means to request or demand allocation of memory suitable for intra-nbrhd cross-mapping via PSHM. ## `gex_Segment_Destroy()` This API is fully implemented to the current proposed specification. ## `gex_EP_Create()` This API, along with all types and constants required to specify its arguments, are defined and will link in any conduit. However, it is useful only when multi-EP support exists, as described in the following paragraphs. Current builds of GASNet-EX will define a preprocessor macro `GASNET_MAXEPS` which advertises the optimistic maximum number of endpoints per process, inclusive of the primordial endpoint created by `gex_Client_Init()`. Any call to `gex_EP_Create()` which would exceed this limit will fail with a return of GASNET_ERR_RESOURCE. Currently, only those conduits and segment modes listed under "Supported Configurations" have values of `GASNET_MAXEPS` larger than 1 (each currently 33). Additionally, these conduits support only the `GEX_EP_CAPABILITY_RMA` capability for non-primordial endpoints. The `GEX_FLAG_HINT_ACCEL_*` values are currently defined, but ignored. ## `gex_EP_BindSegment()` This API, along with all types and constants required to specify its arguments, are defined and will link in any conduit. However, it is useful only when multi-EP support exists (see `gex_EP_Create()` for the current scope of multi-EP support). ## `gex_EP_PublishBoundSegment()` This API does not appear in the MK API, nor in related documents which preceded it. Complete semantics are documented in `docs/GASNet-EX.txt`. This call is currently necessary as the only means to actively distribute the RMA credentials required by some conduits (ibv, ucx and ofi among them). While this task is performed in `gex_Segment_Attach()` for primordial endpoints, use of this API is required prior to use of `gex_RMA_*()` APIs using non-primordial endpoints. It is hoped that this call can become optional in the future. This API, along with all types and constants required to specify its arguments, are defined and will link in any conduit. However, it is useful only when multi-EP support exists (see `gex_EP_Create()` for the current scope of multi-EP support). ## `gex_TM_Pair()` This API is believed to be fully implemented in all conduits and accepted by all APIs required to do so by the MK API (notably the `gex_RMA_*()`, `gex_AM_*()` and `gex_VIS_*()` API families). Since multi-EP support is currently exclusive to ibv, ucx and ofi conduits (and only in some segment modes), the use in other conduits is effectively limited to aliasing of the primordial team. ## `gex_TM_Create()` At this point in time, there is no support for non-primordial endpoints as members of teams, and more specifically they are not accepted in the `args` passed to `gex_TM_Create()`. This means all RMA communication involving non-primordial endpoints must currently utilize a `gex_TM_t` returned by `gex_TM_Pair()`. ## `gex_TM_Dup()` Not implemented. ## `gex_MK_Create()` This API is implemented as described in the MK API. This includes the conditional definition (defined to `1` or undefined) of `GASNET_HAVE_MK_CLASS_CUDA_UVA` and/or `GASNET_HAVE_MK_CLASS_HIP`, each of which is defined only when the respective headers and libs were located at configure time *and* one is using a conduit and segment mode listed under "Supported Configurations". Otherwise these feature macros will be undefined. While these feature macros have only a conditional definition, the enum values `GEX_MK_CLASS_CUDA_UVA` and `GEX_MK_CLASS_HIP` are both defined unconditionally in `gasnet_mk.h`. Any calls to `gex_MK_Create()` specifying a class when *not* supported will return `GASNET_ERR_BAD_ARG`, as documented in the MK API. ## `gex_MK_Destroy()` This API is implemented, but is currently only allowed for a `gex_MK_t` not ever used to create a segment. gasnet-2025.8.0/docs/immediate.txt0000664000175000017500000000543415142313673017057 0ustar alastairalastairBest Practices for use of GEX_FLAG_IMMEDIATE Use of GEX_FLAG_IMMEDIATE requests that a call to inject communication return without doing so if the necessary (network and implementation dependent) resources are not immediately available. Because a call with GEX_FLAG_IMMEDIATE is not required (in general) to run the progress engine, it may fail due to an apparent lack of a resource that would be recovered by polling of the progress engine. This has potentially both positive and negative impacts for code using it. Because of the lack of a guaranteed progress call, an IMMEDIATE call my have lower overhead when it does succeed than the same call without this flag. However, a long-enough series of IMMEDIATE calls back-to-back can easily deplete the available resources such that subsequent ones are certain to fail. Even with frequent polling, there is no guarantee that a given operation will ever succeed with the IMMEDIATE flag set. When an IMMEDIATE call fails, the reason might be due to either a per-peer or global resource shortage, and there is no indication of which. In the first case an IMMEDIATE call with a different rank argument might succeed, while in the second case it would not. No operation should be retried as IMMEDIATE indefinitely. After some bounded number of attempts one must either abandon an operation or issue it without the IMMEDIATE flag Since any GASNet communication (or Poll) operation may consume resources needed for communication, a client should arrange that every IMMEDIATE operation should eventually follow right after an AMPoll(). This "fairness" can reduce the likelihood of starvation due solely to other operations issued between the Poll and a given operation. To achieve a good balance between the benefit and dangers of non-polling calls with the IMMEDIATE flag, we recommend a Poll following each failed IMMEDIATE call, but not between successful ones. In this case the "fairness" requirement is met by retrying each failed operation once after the Poll. Note that since almost every non-trivial GASNet client must Poll periodically to process incoming Active Messages, we included a poll at the start of our model progress loop. Below is pseudo code illustrating this idea, for some collection of NBI operations. gasnet_AMPoll(); // This is a logical place to check for side-effects of // inbound AMs and to test gex_Event_t's foreach OP in (some_collection) { int imm_flag = (OP->retries++ < RETRY_LIMIT) ? GEX_FLAG_IMMEDIATE : 0; if (issue_some_NBI(OP, imm_flag)) { // non-zero return from NBI indicates IMMEDIATE injection failed gasnet_AMPoll(); imm_flag = (OP->retries++ < RETRY_LIMIT) ? GEX_FLAG_IMMEDIATE : 0; if (issue_some_NBI(OP, imm_flag))) continue; // second failure } delete(some_collection, OP); // success } gasnet-2025.8.0/docs/memory_kinds.pdf0000664000175000017500000152661015142313673017560 0ustar alastairalastair%PDF-1.4 %âãÏÓ 1034 0 obj <> endobj xref 1034 113 0000000016 00000 n 0000003260 00000 n 0000003624 00000 n 0000003946 00000 n 0000004120 00000 n 0000004268 00000 n 0000004441 00000 n 0000004589 00000 n 0000004754 00000 n 0000005004 00000 n 0000005365 00000 n 0000006126 00000 n 0000006303 00000 n 0000006556 00000 n 0000006932 00000 n 0000007563 00000 n 0000008202 00000 n 0000008841 00000 n 0000009519 00000 n 0000010123 00000 n 0000010295 00000 n 0000010554 00000 n 0000010796 00000 n 0000011397 00000 n 0000011817 00000 n 0000014368 00000 n 0000077599 00000 n 0000080150 00000 n 0000088784 00000 n 0000091335 00000 n 0000130202 00000 n 0000130277 00000 n 0000130444 00000 n 0000130578 00000 n 0000130757 00000 n 0000130890 00000 n 0000131039 00000 n 0000131212 00000 n 0000131381 00000 n 0000131597 00000 n 0000131773 00000 n 0000131905 00000 n 0000132083 00000 n 0000132259 00000 n 0000132430 00000 n 0000132607 00000 n 0000132781 00000 n 0000132915 00000 n 0000133052 00000 n 0000133196 00000 n 0000133343 00000 n 0000133473 00000 n 0000133611 00000 n 0000133808 00000 n 0000133939 00000 n 0000134077 00000 n 0000134267 00000 n 0000134397 00000 n 0000134535 00000 n 0000134740 00000 n 0000134871 00000 n 0000135009 00000 n 0000135206 00000 n 0000135336 00000 n 0000135474 00000 n 0000135669 00000 n 0000135798 00000 n 0000135935 00000 n 0000136080 00000 n 0000136226 00000 n 0000136372 00000 n 0000136518 00000 n 0000136664 00000 n 0000136793 00000 n 0000136930 00000 n 0000137075 00000 n 0000137205 00000 n 0000137343 00000 n 0000137534 00000 n 0000137664 00000 n 0000137802 00000 n 0000137979 00000 n 0000138109 00000 n 0000138247 00000 n 0000138393 00000 n 0000138539 00000 n 0000138685 00000 n 0000138815 00000 n 0000138953 00000 n 0000139137 00000 n 0000139267 00000 n 0000139405 00000 n 0000139591 00000 n 0000139721 00000 n 0000139859 00000 n 0000140042 00000 n 0000140172 00000 n 0000140310 00000 n 0000140456 00000 n 0000140602 00000 n 0000140748 00000 n 0000140894 00000 n 0000141024 00000 n 0000141162 00000 n 0000141308 00000 n 0000141470 00000 n 0000141629 00000 n 0000141825 00000 n 0000141996 00000 n 0000142131 00000 n 0000142266 00000 n 0000142416 00000 n 0000002556 00000 n trailer <]/Prev 416825>> startxref 0 %%EOF 1146 0 obj <>stream hÞb```b`àÎ``e`à8Ë Ä€B@16Ž 1ÑZÕpâ‚øA–xFÖ zÌÝÌ< ¹f5üǘ~;|Xp€ÿ:³cॿ9œ!Lû(?``à´cœë0ë¼—í×ê×Q_÷° ØÁ€Ød"â#Ëç”q´ÉD\‹I<ª±)uVÉd×Ô©Ëž,qƒ|%—OEpÓæ…NOœ©!Qè¥3$žæÅ&Ô­ú#m^øœÈòL)µÌ§‘e’“ÛEœUßú\,ö†\ªNU—ÊEâ¶Ù î”Én`½™;5 \°«ŽA4zš„Ŷ¥,ÄÆU’¹d£§I|[æÓ¥`K!^ð48ïV.Pý7z°l ij¢Ó§mŸ:=q"Ȩ g­Ý´±]\FÈL ]Q9ÀÀcLËèèh`PêèèFSH$4¢$d¹x@Xli`i$!lÜÑaà‹00@¸Æ& ‘4˜A10“IIIÙ*flU¥¤QÏlŒ°j4‹‹KDÜ8A (‹B³¸@”‰4˜s€ºA ÈNk@#LXNFi 6êÊ Àð—!“ÁŸ!ˆ¶2ª0maÈaØÁhÌdÄd„‰Lâ é ûÖ2‰0Æsnú¶‹s“b)ç¦é} ‚ ®*d\À`ËàËP͹!›a'£°Ì†8 ˆ/ƒ7C2C*C‹ãÏ[@Fƒ+öæ)`NcÞÍÀ¨yÈçc`;¶GgßíU} GX€8Ø"@nf"€?-µ endstream endobj 1035 0 obj <>/Metadata 1031 0 R/Outlines 1064 0 R/OutputIntents[<>]/PageMode/UseOutlines/Pages 1030 0 R/StructTreeRoot 75 0 R/Type/Catalog>> endobj 1036 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 0/Type/Page>> endobj 1037 0 obj <>/AP<>/BS<>/F 4/Rect[160.66 446.8 271.71 459.45]/StructParent 1/Subtype/Link>> endobj 1038 0 obj <>/Subtype/Form/Type/XObject>>stream H‰0 endstream endobj 1039 0 obj <>/AP<>/BS<>/F 4/Rect[15.75 424.15 120.69 446.8]/StructParent 2/Subtype/Link>> endobj 1040 0 obj <>/Subtype/Form/Type/XObject>>stream H‰0 endstream endobj 1041 0 obj <> endobj 1042 0 obj <> endobj 1043 0 obj [278 278 355 0 0 0 0 191 333 333 389 584 278 333 278 278 556 556 556 556 556 556 556 556 556 556 278 278 0 0 0 556 1015 667 667 722 722 667 611 778 722 278 500 667 556 833 722 778 667 778 722 667 611 722 667 944 667 667 611 0 0 0 0 556 0 556 556 500 556 556 278 556 556 222 222 500 222 833 556 556 556 556 333 500 278 556 500 722 500 500 500] endobj 1044 0 obj <>stream H‰œT[OÛ0~ϯ8öDÛqnBjc 2"mâ!KÝ6Óš°Ôeâßï8NB$ö’:'§ßÍÇöç)×yaàøØŸ“[½‚QSïàÑ¿?ü0/OüOumt~Ö¾-óMY妬+89Yœ‚÷ÛãÀ!âTB£½o ò™çg!W­½0‰Yš@È™ˆ [yDÐì§wžyw“RÅÄ:€óTqçùKkåK^m€èŠú7§Wg;I¥Œ:!K°G¥,v,óû[m&jp¤ˆYqfï†!KÒÄ9§’¥iJ¾w¿0_^}ªç’Üè]ݼôo×eµ¢!v%dO³Ïï¢V)†œŒÕOÉZü3kÎlº] [ %˘ñÄyüªŸ©à¤ÜÓYHÊÚ>+: HŽPEûÆøSoè‚Æ#ºÁ×{PÎaAÌ1Nô’$·ºöñ ìó’Á%M\¹Ù4­´&‰¶•£¶ç,¯l5ílæè°°‹-.´«ü‡S…ó§‚‘ÆI;('žÞŸ–¢(a\ºë§ïª24Àዉõ-±&Èê`}µE¼>hÜNp5y6N¥Xx'9 Þy[Yg p·¿ÅíYÚ–í¡ŠÈœ™¬j*ܪ8ìPÈ6Cg6 E†Æ¢®úNÓ×ò¯B@Ga()ÉV·§<±iÿ¤1UÎcR”T„dMgÂ}ARØ[¹ûK«¢û¯#ªûÊú®A)2Šá›[\tbæÔõÞSW¿EBmÀÆÒÞ=T8ñöêq_ð·Þ´kú*¯'';ŽW;º››Ã7Þ8øcÓ¶¦ØB¹‡ª¶Õž¿K« u’w¶h³ÄØží¾Øµ†§¼A9i¼îÑ œaÿÉ1 ½£M{„¿ IÙ¥² endstream endobj 1045 0 obj <> endobj 1046 0 obj <> endobj 1047 0 obj [600 600 600 600 0 0 600 0 600 600 600 600 600 600 600 600 600 600 600 600 600 0 600 0 0 600 600 600 600 600 600 600 0 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 0 600 0 600 0 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600] endobj 1048 0 obj <>stream H‰¬TËnÛ0¼ë+xä-êiA€¼P¤hŠÐmªDÇ É•ä¢ùû.M.Ù½퉯ÝáÎìù{ï&÷>y?½€,•!ËV!ë”÷å k¼ËÜ[äyÀ¤AÌòµ'—,b‘¦,¯¼oüø±‚˜_€?Ûñ#$\ ðσO–"Ž_ÝÀ}ÈŸf!¤¡é¤Æ ÿ ~"V«”30c¿SâlÉËZ¬Á—®^cée1Ô­=o@š #²ß9øfk‹±mYØÈ|¡*°`Œ¶4jà ;þoÙÂ(iòOº…±Qö7áLe‚J¬€¿Aç‰fme’å-m9ú?ö¤ˆÉÉYîIáŽÜD¡út¯ ך¿€ l;-Z±³Mp}-ºVT…I5M@¤ —!ßÔ(ô'pu¿Ü?«ƒtq'¦iO(¸KÇ[(½íjôÌÈÆ…Ž´ÉR}ÛÐŒôó_U‹dò¬˜µÇÍÝCœÅ=;;[|(šG¦_Ü]Ý^³˜Ÿ_^ãùŒ¯eÌ–Æ=¹VY¾Q'á™x$Û¾O­ËðËi¬Sv=š*oC-wI`Æ{máÛǹk«j¶˜2Á‡O¨j[ ¯=†M‹p‘ñ~–õL$ZÏ$[ëI<ŽßÄ:Ô5)—ª¿!¢NL‰Ó‘RXêqwv]ûKCë’«Úz¶y<ÎtMÜomÌDƒÝÖV¬˜jªmHK¼›Áþ…==&üUØ‹mœ endstream endobj 1049 0 obj <>stream H‰œTMoœ0½ó+|´«®cæã˜JQÕžR…ª‡&Š8»+ØM»ÿ¾cì±mTe{Æ3óæ½y¸úÝTÑ—èg$ˆ ™ŒI^ÆdÔÑ·w¤>TÑUUI"%)©ž£´È¸* Oð¼ U}§[ͤ¢YÊ…HéÍ-KxY*ú8³‡ê ÝEè®’’ÇÙªû=c›ú”°E8hf##Ë!ÃÉ¥@² ªÌ Ör‡FO“ñÒï="¤å¢kÙìLÒjœß†þž):cöŽÔpªèapU3Sð̨îA!r“j‹M]ýÃÓ™R¨Ð¿Ý³l‰L«ª¾™!Å ð„@¿ % ‰tN#Ý #–†X=¿I#­m§ûÙëê îéÛ>1J’d<ÏW*ƒQl;ðŠ…½[¬³í\|‘ÇÄg4ÓåJ㘧kÜ`!î„ö¼=ÃkضNI·Ð ÷лXW¶Þеaqë:|ÂèäQjwÄA49ÀÌ·]×ð¤}3P-Üoñ™m¤í [,7ÿÇô 8Yš0Mí}zj0iË6ÅòBñÎ"1Æ#+PÚW¼eX÷3H#¯3Z.òëñ>ùjTö]½F/hf3s£ Œâ~¶Îµ 3ñ³½û—;·¾áŒ’&ƒ™Úk³Ó+Ÿ$ ÏÔJ}¼»&?Ák.Ù÷~3VzÌx ¸±ÐíÜŽz2,‚){l 1g ׂ[y±Ÿ÷Æ…áï€:™¬WýtDWÿºÙù+À,¸jà endstream endobj 1050 0 obj <>stream H‰¤TQoÓ0~ϯ8í)F«c§IÓHÓ¤mP¢nx@<„$eCmS’vÿžs컦!ETìKñ5Ø·šÊ¸×:ÖË~„ûÅ L°„««à]¾ý¦p°¸›Ï †ëëÛÆ%2‰-9™%ÝO•¡Â ÇSÞû¿v´9ÏbÒÍXVnü¶`Þ -ßh¿š)·`&¼…½)«Tè?= mW-«RÖî´‘Ç®6=UˆðÁô¦‰<™žù1•*ü/ˆPi©£ ò¹WGW¶ìÊmá™ùBÿ9ïÙ¬ž?cäfb6,Ù5ì 2kS¿¡€ÕãÊ”¸0ªt|oê†Ð~!V‡Ïb¾=QKòÂEïžÙx{Ø¹à®æËheï5o=Å3cá”®ÝyÄ2ÜÙˆN£5Õ¨š|ß·[Mž9ZìÈ8îV¡ë ·ÚlKíf¢_èq0m ­íÐ¥Yº–˜Fnÿƒ›}GÀEg‹¾KŸŠåk´£Þn_öžµ?XÁ[iO´§÷¶ ¤‰]µg7ü=f~rÆ˜ÓæL˜{øL¹×”µtÇ>bv{é Áiùy-f–Û½cíÞðÛžÿëÑ€ß 9Þaå endstream endobj 1051 0 obj <>stream H‰¬UßoÓ0~Ï_áGZíÔùñ8ÄT@ -S'¡=¤ÄcEkR’tˆÿ'öÙ!-žrñ}>ßÝ÷½~AêèU½, N„`|IЇ(NS9Q±bB‘¢Š>Q B²<ÏhEݬ]˜qžR‹¥1–´GãÑl°–÷u‡ƒw>šÇTlVÝ£«……5š¾Á T™ß„þ0?£±×.\E¶µËȶÂx—`¿7`@QÝÃ}ñ.º*¢Ñ·ˆN!IšKÒêh}²%*MO&-¡ (¾žBdDIÉ–±íè•Kè‰1Thä®c»ÄÐ'„ó1¬tÄ m¸˜ôÒ—îˆ÷ ÒqÓk˜³BØ5Eo«ó;ËŽT†$1&¶óL`›;ä Ç`í` Y”˜Ž§VW Þš³j6§•㓽q„ý%Q2KY’O:}>Q2l)~C–MîWGÄ䨉@Õ…«Ùo/±£ÊÞSð1õѰè'ð’™ÉýÚ%8Ò‰Nhc†f»òg,'æÓ²×AüŒÍÿ=w’eÉ?ѩ҄©ùìÅߎ˹I “Ìs–¹hAqЀ­>g|¸»XÍqoL[šïÃ|r.©~F~tkÆÙ†Çö,íŸÜÜè®{\-'Z ³õ±> 0ÜÓÞçÓA66³Ë]ïºÄ‹ÞËóÐêA:§TN>—{TU¹ SÍøý%oÝ‘Çòñšl´®avÇUþ¡™äÔB>þ ñwßT,[Zå®ÍÊQµ87áQrD‘ºéíQûv|¨vÓÁ0oå=ù)ÀXö“# endstream endobj 1052 0 obj <>stream H‰œTMÓ0½çWÌ1Fª±óã"q€H–8 ®ãn»ÚuJÜ‚ößã©?’~€èªZ™™÷ÞÌ<[|Î>Šìkö3cÀ á´}“}Ù{!pNYb“­e¼+@(¨›’6Ô¬§] bÈróD<Ý…Ç;¨ú–rŽßóYU”±*ßJRºCë¾Ô´ï›bDšy%œ‡ì^‡˜Ú^ç²â>²#u®Rž’û'פpÝ)áÙýð?RâY[Ø™ãêKw¨*w¤q‡:· {IàTÇmˆë´ïK,ñµ)ñ7*Œ´øKðk=Îò_ÈÊÝ?}ú„_¸ŒbÆ×íbÒ¼¢›"{¬Æ\9¹ú¹iuŒrâs§H¯½ LVSÒžO(Q| åØà¢ §5Æ)ÛD~ÃM`ÿÔ䇸ÏËè½®¢uðžÖ> endobj 1054 0 obj <> endobj 1055 0 obj [278 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 556 556 500 556 556 0 0 556 222 0 0 222 833 556 556 556 556 333 500 278 556 500 722 0 500] endobj 1056 0 obj <>stream H‰¤TÉnÛ0½ë+æHMj!E ‚,Z4@‚ è¡ÈA¶)Çm*¥¢Ý¢_ª\´À“æ"Hξ7oÄDA’2ÁˆP®#¸ü]—ÑõÍ%DwÑâNOŸªfH5xqsùá 8œ]\™ýŸ œ% dоœ@]”Ñ¢,)0Fhe±²L’$í+|EïÎ¥Rkœ) ´¬\°ú87G?pl—ª?˜Ùpœš GK…ÊEZo17AŽ:Ÿ¦V>mçCµ€³óéíPâ¾ü8¦ÿù©j( Ž*@ å(IÓÔ< è6sQxB >fƒca9ëÆÝUíüîÞRK ÆM@±kóÛP%{­0³’v½È” ¤Ï]·±éÜ£kñ=Ø´Žé¯¹ô‡œW¼Òy —$ËÇÄá8ñ„HH>¥¹5Lj;¦ÁNƨô¹vœf]Y{£)ïÜ^ŒØãy—Nu0¸ÞoÝ?P-GXjpp(Éfæ³PÛ'l›df5Ô_û‚zµ×Ú´Ë¿1ó ÜÊ´&ÎÑÃØ ³ÊS§ØMýnÐÀݯÃÒi¦à€-Ã( Â$0ÊI^ô{YßÕúÄ:ê¹Q–ÿñ3K9Iåó3;üyŽÏî>stream H‰¤SMk1½çWÌ16›ÉÇš€xðãÐR¡B éAª«–v—j¥ôß7Q³*x¨zÚ!3óæÍ{³ä‹P „¶“°ž“—T¤çÃó‚äÞ @äBƒ/ ¢åº­ ®ø¡Àü;z2&×ÀHäÆžÀL芡¡%ËPs!t€ÍwÎÐ_†"­·L†ÀS?±eÅ Ý,á›eíÐ(iÍ^ýãõ„¬áhïßËZ®ÎÖZ³lÏz>=Ð[2L‹ü›ª<ÎÁw>¤®Ø, v‹R9.ÜÝH-Ïa&48³·t9gGs÷ÁtËTÚ'Eu*ZG›cnÓ^'åÊT¬_sÒ¿:¼lš!³:)¿MýŸ+U× ð›ôS6P4—õÛ–æJ Á­Žpe‹ G} ù3t:ùÓ´Z@d”úƒ ÝnoÒW hTÜâ7\ å%˜×1?9]âL endstream endobj 1058 0 obj <>stream True endstream endobj 1059 0 obj <>stream xœì `eÚÇŸ÷I2¹¯¦i“´Iš&•”¶Ð-¥”ô‚jålÁAZ r(‚¼Åz X\×e]Q×UÖ‹´ [Ð]Xq=ðÀûV 誻ë‚û­ëzu¾ç– j©ý>b¶Û÷7<ÿ÷žyf2y3“N€@ŠÍåÕ'N¸ì¼i Ap-p½3¡¼büÕ_]w"ÐÉïÐÇ&L™\}ÑŒû7vÀ® ÕÓKß+­Ÿ ´óQ÷Í'U׌_^¤Æñ5¸ÖÔ“kª+­oSäEŒs&WçäZ†_QŠë’°½~JÙÉ5ß\T\†ë¿Ë£f”O¬rãâÏ"¸~ëMó–4,+MÎòó"“;ïÜå¾;=¯ÿȽخ®9}Ù‚%Ï^P·È/–aù¬ MË ´¸¾›p}–g^púö§6ïòà?.øráü%篟ñÑR€i#€”H æ¿_¨ú€\˶¿+lyö·°ü8–Ó.Y~þ5NÅmÑ…ÃÞ8£ñœ³„,š´t#Ö]~æÒy —¿x×@3áñj_Òpþ2ÛÙ† 8þ#ï;«aI㌉ V ÐU.[Ú´\Ã:ôo9k_vNã²àkw¹µ@ÿ`¯…*/¯þÌó&Ì1}&¹Ùa¸ë@F˜¥{V4¾ÜôÍ H,j•þ L5Å“ Ì_núòB ô´t£·²ã©P ‚RAÁ90_öp» AXCnHªõª<\»+^„Ó©MRQ½Z¤ ±ÂòN8¿Lñ©™Xæƒø‚Ϩ^îœJò4Ť-D–e\{HõÛSÕÝ.ÑÑ=¥¯ÃiðÈj˜I™ )€s°ï}X.Át;+6Át´½hEh3Ð\ÝuÑЪYûncc\?ÖÏ”¼°T5CþF5Ö©ž„ÓÑnÇü]âب K°|7ŽÛ!ä³>8fú>¸ëoÃöyXw;¦µX¾ó³pܰî¼Vs$³MõC¾»b“¼¯Û“ЮÂmLÁt“ P§@%êT8Qþ;LS´NB­*ù˜Qg(z LB­…Éòß ¦ ÎDýN…©˜ŸÕ¨³¡õ4EçÀtù¯P3PàÔ¹¨yP‡:f¢6©¨§Ã,ùcX èB˜ºN“?‚ÅPù3=P—À\¬? æ¡.UtÌ—?„³¡õX€Ú¤èrX(ÿVÀ"Ôsa1êy¨Àùpê°õB8 õ"E/†¥¨—À2Ô•p¶ü>\ªh34¡^ËQ/‡ò¸ÎE½RÑUpž¼®‚óQWèkàBÔ«á"y´ÀŨ×À%Xs-ê>¸V¢^—¢®…ËPo@퀟Áå¨7¨?‡+å½p“¢¿€U¨ë`5ê/a ¶ÞŒºn«Q×C‹üÜ × Þ×¢þJÑÛázÔ °õ¸õNÔwá.øê¯áFÔ»á稿›äwàø…ü6Ü ëP7Â/Q«è}p3êýp êp+ꃊ>·¡n‚_¡FávÔVÔ·  6 n†;P·À]ò›ð0üZ~¶*ú;¸µ~ƒº îAÝ®è#°õQø­ü:üîCýƒ¢;à~ÔðêáAÔÇà!Ô]°I~ ‡(꟠U~žPôIhC} 6˯ÀÓ°u7<Œú lE}~‡ú´£>ÛP÷(úlG}E} ~/¿ /£¾¯ÀP_…¨¯ÁNùEx]Ñ7à1Ô7aê[ð8êÛŠ¾B}ž@}ž”_€½ŠvÀÓòØ»Q÷Ã3¨}žEýžCý3<ú!¼ ?)ú1¼ˆúxI~þ /£þMÑOàÔ¿Ãkò³p^G=¤è§ðê?àMÔÿ·Pÿ©ègðŽü ü ÞEýÞCý7ênøö¢~ ¨_Á>Ô¯ýÈOC'¼*è|NýœþéŸÓÿú£çô{™Ó?þÞœþQ/sú‡ß›Óÿü#æô÷{æôsŽšÓô2§Pæôß›Ó÷+súþ#æôýÊœ¾_™Ó÷1§ïûޜޡÌéÊœÞ1çô7ã4§¿Âçt>§¸9} _§Ü9½·ët>§ó9ý‡çô§þ ætÀŒõúD Šì?i¨(ŠjA„oï| ìQƒj½¤a·Ã% UiP%4Z#é4»1jåž¹ZT«)UQ©++Ña&&ÿ›$Š@Ý£æÿ4ñv`ÒSƒ¿<Ç¢OŒ· ‡Ãáôʹrä IZŒ¯„Ãñ•JÃâ+MJ|¥1h$­VÒhµ‚š©¶«¤Ñk”/ãe¨ò}duW ¬V#bI¥U©úøðÿŒ¯„c÷è£ù?~ÿÓÓ TŠƒjHŠ· ‡Ãáôʹrä Œ.†+‚±øJ‘oã+‘^£–!é0¾Â¨J«ÃE‹q–c,6ŽÅWšîøJs8¾1¾êŽ¿Ž;ÿ5ñ¿€ÿééÇ©Á_žã5ºâí‡Ãáp8½2@®9sªÕ®ûL‚J¥ÖŠ*Q”zPâ+ɬÕéõ:­^'ht’^gÐô,Æ2cÌÅÆIÐÕW’X|edyŒÓ$v+6W¨èîG|¥·ƒ~œºØy1è æÔx»Àáp8N¯ +GÎÀÀâ3°øJù;©žøJÛƒ_i-z½C*ƒ^ôZ£Þ€‹^«×›õZ%@Ђò•AQ+‰‚„ñŽ;_ÅæþÆWâ±{ w ¿€ÿéáñU\ _¼]àp8§Wú¸°äpúƒ5͈áJw|¥Vkt*µJõm|¥ÜØÒZÇW*í‘ñV÷ÄW¬/†X,¾byµ$²¿ÏÒÆæþ•ZÝ×Û 6÷uÜáð?=ý˜@õ±óbÐA­iñvÃáp8œ^áñç8b™0¾R+÷™DŒ¯ô,¾Ò÷ ÄWz»Ñh2 f£ZgÔ›¸`Éh´ 6N:½N¯Wëu¢¨-˜Õ«u*–EZ1qZ£éëm›çwøüOO?&PCì¼tP{(Þ.p8‡Ó+<¾âGa {ºzW|¥ÑHµF­6ô <`Ýà0šÌRYLj½É`5YL³É`2:0èbã `ÀÊ ÆpLÔ‰vwKƒÑ–Þ¬ÓÇ,¾êãÕ‰¯Œñv`Ò ”¿<ÇÁŽ· ‡ÃáôÊùæg`4̆ኤÄA*IÒš4’FcìAù*c’ÙbµZÌv«Ú`1Ú­v‹Ýj1YÍN³ÅÌÆÁÈÂ-ɤRÔ &£É$4&½UoˆÍIú/‰¯Ìñv`Ò ”¿<Ç!iX¼]àp8§Wx|Å9ޏG%°§ÿ)¤ÒjõI+Iæ$öTf·Í–`³:ì’ÑfvÚVG‚ c,ÕfeãÌ`6›ÌfÙ¬V›Ô‰lœÖ$™vƒ)6w´Ú¾¨_YâíÀ ¤§†5v^ :÷¨x»Àáp8N¯ +GÎÀ ¥0ã+­_©u:½UÒI’¥%¾²¤Øí‡ÝæthÌv‹Óá´;XcOµÛmlœ,3öµX4“&™Ó™%‹Ña4šbâ´N××Û`€<øÜo!ý˜@í±óbÐ!¦ÆÛ‡Ãápz…ÇWœãˆ/’Z­^yЂZ¯7صz­ÖÖƒò€ ›Ïáp: ÉN­Åas;“É`9XÀÆÙÀjµX­:«M£±hÜ6«Õª·hmf§É›oX¡»}<ø}€ÄWüþ§§?;/¢/o8‡Ã镨ü¢gâ/Mfñ•òwR_0¾JKLLJJLp%i­‰6w’+Ñ•”èHJLû6¾²á¢³ޝl6½•ÅWf³%&Nÿ×ÄWüþ§§¨#v^ :Di¼]àp8§Wx|Å9ŽOò€N§WþNJc0˜uÎуŽ}qÐJNv»“)n­=Ùáu§$§`ÉJv:Ù8$8쎦ÑÚ5^6Î`Ó9¬n«56_€3 Ö ñUb¼„ôã'Ù’bçÅ C<)Þ.p8‡Ó+±ùÅVÎ %\ãÃpŤ|O2™,É“ÁàìAy 3ÓãIMõ¸ü©‡ÇHõ{üXJõ„Ýç§ÓátN Ítélœ)W’’èˆÍ“©¯j€ürQr¼„ô#ôvÇ΋A‡*\o8‡Ãé•ò?óœAö¬& ËkÍf›Ûh6]=Ù-WŽ×ë÷{=é~ƒÓë úÓ½éXò{³½©6Î.—Óå2¹\:SbãÌN£ËéwvÝß:î˜Í ;v_yâíÀ ¤3çHRbçÅ C=+Þ.p8‡Ó+ý¸<àpú"w~L&‹ò=>ÕjO1YM&O&ö@OžßŸŽ!UFº)Ùï’žáÏÀRº?ƒ.6ÎO2öõx ºdà lœ5ÙäI$%ÇæÕ úc÷ˆÍs ;©ñv`Ò Ô3'êÜùñvÃáp8œ^éãÂ’Ãé£Îf³UyÎfsøÌ6³9µå€©ùééR…3ÌîôÔ¬ŒpzKé£?— ©©n웚b4ºY)8Îæ6§¸3\nWLœ¶ÙúºA5@~Öo!ý˜@ÓbçÅ C3êÌx»Àáp8N¯ o>q…ˇ‚ÅbWþNJo·;Ó,v‹Å׃łõ¾1ápF +lNÉð儳2²0À gC6Î>_ öõùŒÆTãp6Ξbñ¥ ñ¸có8»úøáâ_âíÀ ¤h0v^ :4…Ëãí‡Ãáp8½ÒÇ…%‡ÓÊ®ÊÅp%QyRš11Ñ•aO´Ûƒ=ØÙ­`yVÖ°aYCF ³§eó‡È¥aY¥™YCظ ƒiØ74›ÓÌ£Ù¸Ä4{ПãóÇæMbb_ÔùáÞâíÀ ¤_ÍŒƒ©ìªx»Àáp8N¯ ÿ™ç ªÖ€ÃáTž”fJNNêHv8Â=( Ÿœ›;jTnvá(G(7.,9œþP}O18ÉÊ“Ò,o˜Óãtf÷ <0»&?¿¨(?¯¤ÈÎÏ®(*É/)ÊQ”_]0*ˆììpvvRv¶Íži›ÀÆyÂÎì!c±¹Aãñôuƒ*6Ï-<îäÆÛAH?&Б±óbС«¾'Þ.p8‡Ó+ä›OœÁ¬ö p¹\Ê÷øl^oú(—×åÊëÁÅP‘7{ìØÒÒ±•¥®ì±yU¥•c+KÇŽ.{jñØ6.òò²óòÜ#ò9 qØo¶+/«$++67h¼^H8vò˰ñv`bÿñ]ÇÄ΋A‡aV{¼]àp8§Wú¸°äpúÃü§ªÀãñ¤³¼ÝïÏ(ôø=ž‚<ì§—•UV–TéÉ-+¨®œT6©²¬¸²l]l\ä¤ä$&æ&Öà°|®§`ø„áÇÇÄi¿Ýc€ü2lQ¼„ôã«£‘˜91ø0Î*Þ.p8‡Ó+}\Xr8ýDè6¥|7–0GîÖ{üºkLc`&Ì áx §ùÂJuÄ—ìK >#ËÀ#˜ã°½á;íÖ.èYæár·ôÆ×w|íøUÇ/ßníÞî1 jèéD( ß퀻 ªXN§7Mf‹ÕfOp$:“’]nO û™©´@z0”qÂpæÐ¬ìœaÃsóFŒ•_0ºpL‘$–ByÅø •'žTuòÄI“§LV]3}Æ)µu3O5ûøç„îtóØÚG×WÈÿǼ‘²é5%‘qÅc‹ÆŽ.È9"/wø°œì¬¡™á!'d„‚é4¿Ï›šâq»’“œ‰Ž»Íj1›Œ½N+iÔ*Q †VÆ×û¢¡ú¨ TVf±r +ލ¨ú°jüÑ}¢¾z¥›ïèžìyúwzFºzFzz‹¯в†ú*¾èså_;™9µóוê|ÑO”üD%ƒ’7bÞïÇ¾Š¤…å¾(©÷UDÇŸ»°¥¢¾WתוÊuYC¡U§Ç¬sQg`Y+q%C…­$#:uÊ+¢ÉræATV4ÌN™Z[Qîöû벆FIÙ¼ÀÜ(J£æL¥ ”)›‰ªË¢e3¾Eloà_ëÐ-×¶[`n}¦a~`~ìڨÐPǶaÍÄí–G¾ŸômWn+«]}d«[h©HZäcÅ––Õ¾èSklõ3­«ÃuàX_ß27}-Ījn®ª«’U¸IÛ¶W]ûר`5õ‹}Qm 4°°eq=¾4®–(L»ÀßærE¶ÉàªðµÔÔüÑqî@]C¹§5Z¦]°9OÑ£[²†¶Z¬]¶ÕdîÎŒGf{Ú”œÒ媦õYÂ< œˆ'DÔ7χžÔpŸ ˜4@˼ì†Ô¯È¢¨¶¬¾ÅRÈêÙø¨*h øZ><Ÿüí蚆îuÐò°,;OzN5l?œffFÃavŠhÊð5E‹•òȬ¡ç¶Ó@`™Å‡ >˜‚Ƕ¡®0¿ßÏ^àkÚ#0 Ñæ©µ]eÌu·A$'³.JëYËÎÃ-Žé¬¥ùpKÏðúžÉ[”7¸#*…zþ™-‰öŠ……Q’xŒæÆ®öªê@ÕÔ™µ¾Š–úîc[UsT©«½ §­;µ—Õ nÚ£nAiÅ“rVOgV¨5DÅ þS+'õüv„g¥RC|㣖úÊ.­Óùý?rP»|ˆR’o‡u»-Ì<º<æ¨òQîZtX Ѫš™--º£ÚðTëÚà‰Ý žñPSë÷•Ea:¾3ƒø¯]ÞYÀ¬Îà!+cðüëªê.ÕÑݯCØÙ™5t¢«:»´+ÍÚ•Ú‚¹Í,Õsw–$ ‰¸“‰èø2TB3!à…;DѨ î®‰¶Íé¡Ü ;ˆ@óÁ+ïH›Ñš[¢£2=6ðÒ¿ÓOºZè'›MÖÜ %'Ñý° mš@÷ã²îƒKi;æ¨ãÐ6 í@ÛƒvMM;pÙ‹Ë{ô=0Ów!mÚ´ h;Тi軨ú›Ÿeùqh”¾ƒj¡oãn½j¦oaî-úºör[þèÜmJ&3§;ã vgœîîŒ-1·¾ÔöÅ<£BøJãõˆÅ'¤µ‡{Û…¤¶¢EÞvz`³/Ó{GÉ0ú DÑØ…è+¸åWÀ‡6­mšs¯aî5hF»í´(že¨4Ýö,Úk0 -‚6M¢/´áfÚéž¶P©·$‘>OŸ'ñçèSJú,}BIŸ¡RÒ§1MÅt7}¢-Õ %zlcÁÔ‚i¶«è7§Û¼r‰•îÀcçEÍA‡6mÚZ45ÝAÓÚæ{m¸’G`·س >VÒ{à. "‹½‘Pž€>&¡Â±˜CÙàÛ¢‘к[°È$tý˜cºòZÌ1 ]x昄Î<sLBócŽIhæÌ1 M®ÁJ;½ýwéÞüÉg_‰™ž‡Gé<’i§þ¶ó”¤BI6—°7¦c‹qö1S?Q?žó~œv îA“•R;ùÒº:'§²4msx\W9»0wiI%Ý…wá˰ ö¢‰øíÂÓh®d®ÀŒ:mÚN´ƒh2š{§¡ãk5£æ C›ƒv)ÚA4µâÎA4 K»]ܤ8–ÓíôdV¢»pIÃÅOý‘‹Ç’i©Özˆ9•LN•Si>{¶ €Í*YÛ‰qëçÆnm‰–^O×B ¾7t§kÛ¾Hñ¶“›ÛBxKä—*âYGFCˆ1-€&¥<<KG€‡Þin›g3·…†z·µÕû…ç}ïÇžvŠÙUúIøÁÌúOJíê·¾«_Çc¿t–`?­‚J¿ V«ô ë×Ú”^QÞšž®ôqú IéÓäôÙgwûƒJŸÄfØ­ôÙØÌúD‹•.vIõ(]ˆ ¶å+ºsÝÇbywÚ5‡4>$=°ƒ•ÙsÄ–ã Aµ’Ñ\ª{!Y ±ï–Ë¢}ÄÒÎEòG¬¥ô/8ѵwÀFx,‚aœ gÁ2Ò,×Ê×Ë7ÊwÃo`›ð”ü èÁópyNþ»ê ùÈ¿€[`/¹Qû0Dp+ÍØóWp¬f‹D^ ‰øá<ôA„‰ðÙI3qíð!I" e¸–_ËQùqìåÙ°ÖÃv2’L ~Õ,y¢ü$â6ÎǵÞm°—vø=¼E ªCòÝò!H†¡p"îÏxžì:¿¹¬s1¥!0[–ÂàIxÈéR•A•«Š¨.”_ÓÑÛ{qäŸÉçt%.— OˆãåR0áqù;Úð'ØG\$‡L&3躔Þ.œnq8.óaï›qíïái´•èá×âýâWê”ÎÙ„¯Hn…_Á‰÷ÔGšÈåä5r€–Ñ9ôVº_¸Iü­ø’¦÷ú4X×Áýð9±‘2•œJ’‹Éjò3r y޼@>¢%´†žA …³…ß‹¥¸T‹M⪫Tר?ê¬í|¼óÅÎÏå\ù*˜ŠçÃeèý/àvܳm°ÞÄe/ì'*¢'&\|ÄO¦“‹pYI®#w‘ä·d n岟|ŒIŸ‘¯(~ÒR5uãÅ» Ðsð ó&zÝƒË ôoô Á)¤ ™ÂH¡H¨–¢W«…pyXØ'ºÄ=¢ŒÇ9WµNµAµQu¿ê1Õ!µAs9~Æ?ûõ¯¿ ó^'t®é\×ÙÖ¹EÞ| ñÓ®"ô¾—Åøz¯Ã3n¼L xì\$LŠÉÉxdæÅälr>É+ÉzòÅ÷‡È£x”^'Ñg#õ(>gÓ‘´”NÆå4ÚHÏÆ‹±éúýRÐzÁ,8„°0A˜-4 Ë… „uBTxVxWØ/üKøYÔ‰^1M ‰™âqޏB¼]üPüP5KõŒêµN½D}•º]ý)^Õk¦h¦jfkÖj¶j^‘êñìÜÃïŽü?bÒ!\&TÃõ4OLÆæy<ŸçÀ|a"Å3•n$kè%d MW¯CÇIpH á±~‚n ÿ¢c„‰¤ŠTÃbÚýý,u‚x&Eâ.øD|÷íy\óùjYIª І×H£q›†‰™Â3ð–°—hÄ;ámQGœäz¯0ςߋŪZð ·ÁCÂÙäx˜Vè¾’®Åóx¹ç…’Kþ-Èx< Ï¢|á\gÐ7à|¯_’ùâ¸òÈÅð!܃ïŠ!ª³Ôaµƒîåßq •ÂNÈëœD[åñÂ2Üß½0U¾Wö,”Ï„Éð(üF£‚M&¾ÆQòîïEÐH§ÉË…ÆÎExÖâQˆàÑZóÏÕx5¬Lx*v;Eà·ú­A¼r†¯}Âί#*ø |âNv¯(ŠÞ®ÅOhá’V5û¦6 ªvº)¢—ŠÔ:m¡X¤.ü_Ò¾<Š*ÛÿÞ[kWUwWï[ÒéN'B dmh&åCQ–.´€((ˆÀ Q²©(A\FY\AE ‘atÄÉè Š»2ó*oÂ0‘'¤ó?÷vw@ç½ïó}’ªº]U]uî=¿ó;˽QŒK:º;PM÷ñšÀ«9ìj®$*ê;œi°PÍ'P5ÜÇ% aŒßQuIxócù^®w%µz§ÞèÐO¢ššZ½û8D¾Í&XOè‰úú¥ÎVf㸊2×WU_–?ó.¾‰3áKR{Ïýúu{;•õ®™ÜÎdUÑ­{ÀEžiÎ/,Z{ÎùÑârUT` wQ=i’eŽ#H’ŠÕÔh"&ˆ —ÙZnús|‚`Ãl+Ç>­á/1–¨íNèݱd¢;jT¨îì°ÍÓm`)ŽÅT<®Œí›µ÷ÿ|`{)׌=§N¥¾Iïi:2N19£† NÄ- á&Lð,‘¾Q?ìD58ýäôcW `³ÿ}ê$ƒ-'?é>û^ýýë÷þ6•— ýäý×ZÒG'&EÇÈn¢(9 Ç´‘»ÆÒÚsªE×É8hœi±ZY££ÅlfVE!㬖< ±¼lÏÈHáŸÉéˆ [yQ~ÊÜ·K'ÝK`Äó‡-\²obí»©+ðQü·}{Öß?ñ¯g»?9™ú6%ƒ”7|RzÑ c¤ŠU%€ ¯˜4:Ñ)‰*&^:Ë&!ž“=v³$‰wcÓnfMuò'cET„ô;_]ω­xažC†ÍQŽ|¾¹«Ó ©í¢VèN&â% »'¿ Bv¤‡¥(é¨r{  ¢TYå%·GЉRQeUÔ°ñ2^Ë9g.°xáÐ[îá?:)‹ëùŠ· ûÁ®rñ¸W e\CñyÁ4›=@S_3¢ ÃGÈdC=ƒÜš{žC%`@í°k‡þÐÒÜýÓ'uÁ“Dú¤ã`¬qÒð©ªH©Ó3H×4º§çzyþ™-bȧç€yï$!õw=G‘6;lÖž£Æµ¼¸’¬RWYß¶&Iõ’K£]#}ÃW;&»&û® Ì–f«Ó7¹fû¦î$·‹·© ­+ÅǤõúÛÞOÈñˆú©Õß+î|“Ž”—š02éÀÖMy¶ùˆR¶Άi ¾õ@š<€7’ ±ÎŒ˜8Ùi[óŽa«¯wèöʲAn·HDŒäEº»lP¥MFò%qÜìÛnÛ¹à?fÞüþk÷l]´hëÖ{L’ØÇC_žÒœêù$•Jý~Ûc¯á§RþóÄÞ³NÞ¸‚båKPàYЂ¶!ŽzÙüb²†<.ó/óØ„Dp&kR˜ô í”O[{Ž2–„Æ ÃÆšÃja …Q6|T]Y0ýø5ÁŸ%dG¢TÀ!ÈWˆàSÛp/GiÓhˆÁ¸d²Lø@}¸YJNÔo%Q2ŽØDQª+,#g[.:|õ£/YÀßõ«Ey¯\zh í[°,Aß‚ø­ –L6Ýìu8Äqf %›5N&]‡VÐ))D=ô†`^ æXàJP£’[É^C#ŠÇÊÓm䔼ßN÷í¨¤“JZC÷Qð’Þjv;a/4LVɾ稡Úd\ÐIÏÑgï„GSSQU2ÎC½ ÅÿémÏô}ômìeFåaˆ¸Wx]Ü+½%¿#Ð굫-³µë, í ÷Ù÷ÙùNùµ×Õ×$ çè¹zPÉ¥à—áhmùƒŠ.‹â¡¿3'Ç/çø-dgê­äÙæ16lkÅÞ]´ˆ ‡M™ï9 £M±Ž÷’%(„t\mh¶]5ÞBž´‘”‡×¼š;ðÊé¥êw5ÝÉ[Öí¬´ ˆY€jÒL‹²P’89¯¾¾ÐŽVÆ+++ÊúŒ„Á.€Ž!%^:WE<…Ï<ñÏ-ßµôI¼Çqæ/‡O_ö§'·m»(1}ÿ=͘ýÈ“÷;ÞýøÄ¶ /î{vÕ´€”ºžã¼ÃõÅ©>¯AÇß›ƒ0…jLƒ¸8¢˜­š5¨(Å®`,ΊͳæõAÒ)øCR”j‘Þ-¡ìÓ^B=^SN¤ô×ù¦þ¦=®Œ ¢Õ_Áì6_b^aæ/±·Ýà®tߤÏr^ç¾Õ|§s…ù~ç}çÌŠânè¢'^Âð^LÕB'^÷bZ 0ãŠMsñÞ6ò,ò‘Œ"R1ÍöùSB·„HÈK‘j”æG7E1ŠêQw½F¯D›ú{[qõNßa܆«Á‘ì7ÔólÕ¯?üj–°˜)guÅ’iÞêî à?Iõ™V'˜*(¬7ÔCA9‹)NªêmfuH•(Ñ=ŠäGëZòÖÍ^¼ýé»ËF;íêüÖ³n\íl ŸxåŽC³g\·´)õõ‘7zð½ÞÇWîXºh³s¹ãîéK—- ízkæÎë¦<9 øÛ‡ö§¾?Bûtˆ\œ¨QiŸ Ý =¡mÕÞÖ„ÑÜhó¯yÎGšÈI‚¢rÒÀØq¼“ãxÎŒˆf†xj/Ù‹dHB6 ây¸RøV2ã5APŒÜ¼r%Ë„JÚ1±ÆIæ¡”V\e˜%#?R.5†+¤&+¡pRÍÎrDt"¡_¦ßFÇnú²ËÒŠW³‘þ°#Â.J/ ý¸ÎxPïJœNØâqm¯ãÁd¬V+ 7«šÁçÛã@9ïjYœËïçøÜÜ}D=(î1œš¡ÆµÆ±q͈Ƶü8ö3¶­‡Äª—ÙÊ\gÃd}÷2òÔ#o¾Ù’ªÀSžãvŸù\j3õºîÙ<êûÃÂóÀ±uiËÙƒ0ôÏL;„s,JÐåʱSªP­<Ì1[0’¼à/XDÀÌÊ(§Q+¡8uË †QlgÜkeûQþ;sïÏ]ïxÁñ{íˆöi@69¼–¾~ÎT*”ªmÀcX‡îP\v‡ãÅê´8œ«LÄpPA Ë&Ø-VÃ…3B½fåñaj>ÀjFˆŠg›¢ß¢/Ö×è¼FâeFâÅÈ«{‰7k$Þ¦}®@V¼@U½Ó²ë2–¼ŸËysIÒˆl„u4iƒf’+å1´ˆñ1Îà mýÄlÀVór`/Èå” ˆŽû­ëñ›–¶l[=~uŸ­‘»_³lí~,/x°ëݸQ¿ÿƒO?±sL›üëåÔm“S§ÿòÖÚGiÔV šsç墾xL†õò¬8OÁô fl6ƒ« ùA§Y bT¨S'Æ"8=èÑ©=Œó<,‚ód­ö÷Ûõ?d5™ìÔ&©&ûÏöá‹%Ãu±ïâÐDûÕ¡ÙÜuÒuò,ûu¡ò­9Ëå9Gä÷Ý6)D‡¸(mâ¸#<Ú ³ ½PŠ„Âô‚J9ÖL@Î><…*HÏ”•âÙjÃŽvÎ×™"!×ÓÁJ¡§^£‰ÞÔO¡š â¸á®ñLñÜâYìá=nzÍ㦯󴒂æX:HKììUb†ñÓA3£æCÙ®CŽÄB3Hš@Yvê "ùȦWQªÃÎ TÊmöö1»î¢q×’‹öÍlé¾ý½eKuï®óÐåóž}ú®…/òWYf•Ö–þêägÓ§¦~øëý÷àQxÞúÆ–ç>O¾Xߺá±íÛa¦ß¹…Í5,͘‡_"ó&à2j…¥ó&Í<Ÿã’1ÌEsÄo•ç›þ ÝO!\ nÁ‹!xôY2(¦yXC¢¶«órý4Æhf@½wÜO»j+Í`DĉR¤Òn¯šÆíZêUiÝÃ-ýî>þÇm«×¥ì©³­ŸnÃ'ð[OÒJÎU€@ Ѓ"¨” 4[4  q7`€=…>A»9hÒ(Øh°›e1+ÍÓ) ­ÙÀ‰6ØE«—Ë&ñ\ö.®¾\K£·»Ø] ¾®óÙÂOSquÒ¢F&#y "fÓ‚t°ÌÄšåðÌûé9hœ3òéIúZúM£3ëéùþe_ïÂ%²µ ª 7.vpˆ×¾)L¥ønt7^Ä/ÔyÚ­æ…žÐýx5¿B^¢.ÓV˜ôüÉö¦Ãž–²3'䧇P¨„ú‡¢Ô|‚Å! ½H16 ÀŒôü×MØÔJfzl¾ÕíX1²êVbmÅkwòÎß©3\ßY0ßÕ›Ò¸ q5 ìMiºÀö»Ò”×™é[’u.S|ÊþY/Dv ¨¡¾G£å™p. 8ãp^`-šž5÷¦ã¯ï?1{ÎÊS§?þ8uzíµ+fß°ü¾3W ÑtÕ’-Û–.~ ?6kÓ'_nšñhq¿ƒ«öõ Œ÷¯y_}ò{§L_¹ì\OmӘ痾¸%›ËRL_Éè[ÍPhpš)”zÆN^šâô¡õÚ˜Jm,Ó±ymýbjŸ ­±p‹Ř…‘f² L=M> ¢é¨Œ%1Ä´Má§Sýü½™ÄBœ÷F_æwR¸®¸nD}ÝõÞë gßæ_˜;¯`¹w™uîá•QŸEkAÜUÔ•+Ö¢Ru¬JTɽ—\††¡Qdo˰Áœ’G#ÛÁ8›#±6\‹ŠÈÞÝ%—X%,µ’{ «>öW¨À¾ÉZPªÏ…p¨ oE²¡¥¦ºoÜoB²Á0…*p…oÂøÕ™lg7 b“]Ýàó’ÎÎ$0JÀ£&Ù‰h¢^HÍ’9+ZyªÊ¸´ÝUUÚ+ÊIA$Ÿ'.§/ T•‰"É/((¢z±£ð žÊYd[ÅÎŒ=ƒª,„¿ï¢ÍWÔo¹ñ™oçßÏon çVÔÍ[þRj[û‰ÔÝ|€ù‹øÚ »ÊΤ^üשûRg†]}ÝBü6ÎàæMûÓî.ç4§ÜK¯®^ÔpÙÊiFÃ,ã™Q“nøhÉF\³iRò7ÝÓV[ECÇbóšpþ+Ÿ¦fžø>µaëŽ{nüdñ¼cë~ûi×çØŠCï¼½íÔ;ԷȇGß÷ذeïÌXµþ¢¦?â{ºÁÈê!ß”ÏÜ-V%vß¶dg˜ã 4©gA ¶/ÑKõ™ò ¦©ú*®I[xSܯŸÒUY¨Çud¬~ƒºCÿNûÎüÅÄk¼™·pªbx^3[dQ’4hË¢&a„èü‘•UâB’æ„K„ãè9=Ç…xÍ ß2AŠœØJæ&$kßÒ†Upªa×Bèz‰»r,ÿ.ÿ%Ï5U´bl¨cµýÒ—פa~Ö­Ò»Y,5JDzÄzäÃ4•ø`ƒ_/ ÃïÓµ½5 ? …™g'­'Ç ×Y9ÀËŽé)Hdõƒ-®ÒG°ÚQ;Ô«Fí^1qB oåd©­ç$£¤_ç5$ÓõÁ.Ã.Ì9šàHÙ_È„Ï_êþÍæñ¿žŸS&´ý8ïK]L&âõ{nð}®nú4eccâA'—Òº1ÏÔEfDæ›–™Äý· sMÀ»Â½ªXä6qÞ¢¾Aw®Éä°ûö-.F9¹A·¼`ІdoTÔhÈ)¶ö7ʨ›íÔE‹"yQ¦O™®E'ÅxuaTË¡ßÐzŸFqá¢wiþ~¹Á+³†25ÖÓÌï³F¦¾úc Srº!¦+® «²&cC&{{+¨t ðrö¡¶³+STÍTß`’ÎLÄKltZ§Ë6´ÂZf _P—±J—Þ¢‘0\KÓ(´×“è–wæÏ˜¹|ÍøÆ7V§ÁC—T5|é†Ô§xÎ5Ña_½nuj›ÐV¿çúkž/+Ú×8óÕ©¹+mîµ#n)>»IÒªg¿òδj;£ç+á6ð¹èð®édV.Áéàžõïkc m…Ð ót4-ÈmDËr›ÐÂKÜsæ=\‹ù-ó{¨#÷»\›ÅžkËÍåúŠ}l}sBy—šëœã]u¾„Ù¹wÙ°?Á=ny"g ~–l±}`q 'òëNÝÏÓ‰’}â,Xëß'®[掠Ƃ¼IZG¢( öçy¢!Ë•Fö§ONO§QÂ@Ã>“!¦h€Vô!9œ‡=Œð`àìày™×X„‹r£!+,uS|Ñé“zM¹VOžÎô„§¥žÞ‚@‚}N×¹ã4ð@_ÌG9þ_'jQ½Ð͋ʅ|4Rè5熑ÛêÃÍNGH‚OùBa稀l§ vAS8Œ 8ر•™€p|÷®³¤X‡Èª¢Ðööp{¤胮‚  ßÆ&sÖ¤ÞÛôQjcK3ûéFŒŽn_»û–ånW¯Ädí=§~Ej^ÆÝGçÍ߃¯ùèžß2³õ×¥sk¯X6fÕÆƒ©3Óª° ôñ,0J>³„hUy¿áw¸Êy.hR6)ï)DQe°à$‰´âÍ<Œ7-ÙA‹EZjð2χ™çK6𱙍¡Ìâ~C‡þøÉø]À8îŒõ„Ì8dkžjžkæ‡Ô{cɆÞÉÃ4¥õK°ò9XSbVŸõo,}£oònY4lþ=Ü·ç|­‡f}Ay¢>áJŠhœ2‚\~U\6 .R*ÄJåRe<·‚û“nS>æ>'DY‚¹Æ>Âjþ~áEþ„,(<®àðtíÕQÃd—s!ºƒ ¡Y‹ÛéÙfø,gŽ<=æ²ãþf»›žÿÂêƒw•M>ßP0]“b’ãù 8>9‰µ‹Š‚Âc"©2’ލñ­d°a-ð&a‡°_8*ðÂH™žSK%‚(|‡ÄA’·ÂÐÔÐÿÕ}{Þm¡a|CÝɆNZ± Œ” æ“HÐ Xòt¶Ž^6%ÉzBN@Øî…°=a;ª?ª®OÒè‡SÍšŽ×)à Q·ØÊeÝ¢—›hKÑÁ62KÓëYÜÄþÑù*›)Æ­Ÿ/ÎÓ-?ãøb·šî¸H‡UµÇå|gœ7œq:Ì» ¡éŠ_°V½ž>7ÌKÆM(úqïd[€|„¥îÇÉÒÔ}ú˜1ù°û•s‘ã'R|5|_¶þmŽ¡a ( ™VOZÉ †U"Ü/vý§ÿ-\ÿ-\:žLûü´‰†] Þ_ÁL¿Û¯x !Ñ ’è¤#;ß&0†”-fón@ÐèÒ†>´¥ÙéeÁªq&„‰lR-H6E™íêÃýq73\ÑIÌLOÎd{r®å'‹thi¼fÿ~ý½÷öÓyÞX,­-”]´“'1>Ùžc{ží¶—)Ú"´EXP“zcËùŒXa{)›0ËtÀòص€µb/·² q[ $“!6£§Oc ö½¤Ùa¬ê s&z³ÃÏ‹h¡=ÖUXgn!‘îLò<ö2)0#b•$ ó·i+´?ÂPj#´V®˜/4÷³Là&ñ·™ï°¬4Ë*丹Ò2†Œâ.– ¹Öüå1ò8·^Z/oá^D;±Z,¥k'²f6— 24eíJë•Ø€\–MŠ ¼o±èTOSívbo#[Ü)„äV<ÐP4“2´Å*VÛ “¬ÂÒ ‰»É @´ÎÕ±ÞJê^ S…F\ ÙÒl£®ÑGW¶%^ÀËÍ¡íïýБ„L½&Á‹fü¿SC_y7KØáÜ{>1ÿ-ÒzÎ Òs„åå£vhp­³~sÏ™W- =›™˜~w8néf“Ó»«â–AU¬¹«?œÍL@Çê!³¥5]€?v{*«p4Ž`Ûc¸O*uû*ð,ìMÕmOMÚÎ~»ö²±¿áÎý8œçlô,5Æ'éóhŒï~Õ®fã Ù«¹ÙLÐ×F˜¶d^X’ne"qœlâ 1I2Ï…DQÈú[¡7¤Ò–AˆágpN†TRǪSÕ¹j£*¨2DÓ,¨1ÃË~YXÍÿ{\ÓV_àÌcÉ‹dº~ɰÊ[<¾’gÊ-×sô5àW9;ÄÈ”• ƒÙ‡îïß=<.ƒÒÍAq Ø•¦¾»}ДnÒ³‘ôÊA5—,NØôs×n4sÓÍ\hºhóÌ«½t‹/0Pa¦ñ¶=ùGÚÞ:—…-ჲÏ6Ò¼u:DýŸ ï#  CÆX¿;u§3à x^çªG ð[=»-oZ8Ç ¡\Ã6Æ1Æcø'Lãõq¶)މž)Þ:ÿøÀžÇ‰î rœ=¨š\Ñ­yB”A• e£&‰ÎÌÑ¡—hÜAG_ÊÎèHT-aF=þÆ\œkRŠP‡/'›ë§“ýd–¹k²z~‡Në™45e1{•ŽÊ![9„MÇ«på;xøK-©Ý¯¿›jÛòGœûá§8pç7kÿœúÂsðSRÏ}öejÓ®?≿Kýz—ã@3VIKçú|7 ÛŒ¼h§ÑïzÛl'¥rNÒ'9yU à 7ëÙ£2«.Éz†{3Ùìù1üú½æÿk øï¬ïB7–©85$Ó5§Þ$0sC*Ã÷ ± ‡mÐîÍÙIñõ7=\2õvj¾k߆äèËR÷ mûõ»çìMuw¿ÌáÕ‹'ßë2SäLèyH8 Èq¡>øcÝ”èÆ(ñy«\DÍáóh6æÌsFľBO,:DHxGG £=#¢Ia\dBôá.n¡°š[-¬COpÏ¢—¸Ðîcè˜ç˜×Ÿ#ÄP_aˆÀ'…‡½ë£DùBwßh¹;á‘sIÞ%‘QÑ:y‚mœkbÎÄܺ¼ñ¡ñù7 3\³£wEÊy(ú©÷³¨Oõb°ÛÎ@ÑÅ8Õ8ïuzû ƒžpî>œÔ'êu H s¿@è$ƒVŽÈAÉä:¼TŽ,rÙˆÙA!LuáÈ"—6ŒBªÇHâõmìKú†£ÀN*˽T†^ÕWüsôÖvõÖ;kXÁ*“ÓzâÈV¦¿­¿ÌT°Ð<ÊÉ ó ÓKÀ/ÈC)ÆáleÜ6ŠôªhÿýÊyñ O=ó‡·Rû¶ïÀ—¼Ms÷ñ-s^œœú;|vÃäI×?•Œ­Œß5i?žüÉÇøº¶7RÏ}²+õåƒ%É'q|'VI}˜‚›S.Bÿ[›×·ò½(Ÿ3ÂvÕ‚í•9ófÈsòx[d*³½Äö4y¡CÆ–|Ò†–m¨Ù†½µçïÍv9O5ç•ÛèçÜ¢r=s´fŽpý£æÜhú:ܯgŽôº1…–‘9#CW©“sæäÌ3Ýa¹Óº\Ye}Ô¼ÕÚjýÚò•U‡'d³:m6«Íª™ìö»ÑNW‰ ^“Éíñû‚ê>Ø¢f…ó™ {9µ<)f—S‹Yód v>KµEVTN† æ4pùÞ_j×âÿêƒ"4øYi'Cz¾ogæ/K2ö£ó‡ñ¶š3½˜Sè]7~Á?”ÉM E6¬q«>ØfL]n`Q‚<Žß·O²Ãf1râ:„öz~l½N¦þ‚ò´ÇíqD¸($Âè„­o&÷üÓÂC‡kûŒÝÓu`ÜÍãû‡Gý o^¾þòGŸI• mcþxç“Gr .¿5Õ€.[]­JÝ·reUw^z[=¹ç+þ¿„蔸Œ¢éÜt~>·€ç ‹*¸xÎÿ£ëK£ªÎýï¹û¾ÍrgËÌ$™™,$BB4eGöE–D£‚˜€JØ]ÐP•ÅSû¬Ú u£l‘jͳÔÖ*Z•VZ„Öˆ¸ðäo)¯3yçœ{'í?aî=s™õ|Ëù¾ßù}_®¥Ær׌ŒHŒ*™FÍæš ®/ÝàQ‹Ü„æ;‘$óƒT~P’cQ8vÉü •” •*©™ J’C´LñˆäÈÊ9ñ™Å3’‹¤6e¡z«w~à.énånmµ¾<±4¹–zXÚ <¬=¦?”x ù„òC퇾¨(L™áTHH•Á$œ( ™tÕà1—2à®ð†0Nú•Ñ’$H2~9g—*:@ˆFý^çÒÐG4;:5c¾gåç7lH&TEb #Ñ0ϱ4E² ™(‚×X&²‘Ú=מ3~bôpd¥ƒ8˜ ZÀbÐ X°ì´=Ð[¢·†Ÿxœ"Ê@Z¶U•œQ†>š‚žWª‚ß ¤L²¡ÿ2óJnöm†™Ó‘-»_ó„Œ-œÁ;#—!{=ÛœF{œés讕B»"³æÐ~Y‹¡/ôÔFÉê*qN”` &³º¸¾Ïkùi +)ò—©¦W”·úΧMn–[4¥uÁ}_ÿÇ–oÖ2´í/ì|¶n(øpVÇÝk/þô·¹<þ¤ßñØõ×,1rA±uSºvËü;ÿk^ë»kÔG6®™;©ºzaé°½+–^º Wh ‚ñÀ¼ï¸ÁV2 'œÀí÷„ýäÒ=qg÷î6ÈJDÝ`/pñ·Ó¶„Ýïú†¯ó©êßóNâRÞ)䜤 ½"¿ï™þY+ªˆÓ³=ͧt\1ã`üˆHŠKt<¹úá\˜Q¶o¿ðôiŸ…½ć¶˜Òfѳø·yÚÔÀãæ =ŒEãWhÛ˜Ó'¤±Ÿüe+xSd>&'ûbrRwAÝ“v§”Íq?ˆû'ûÉÿb‡Ÿò+àͧbÜ¥ê:îPÌkŠØçEÚM#w(ö¹C±Ù‡BòËî0ÝŒ@bžr"@ᤉfPm¸‘Ƨ0TeÐ-oÎË]|ÿ¿s¿9zûê£û˜—vÏ]Ú²(ŸQ“.í~cïÍoâºB€ëÜ(Ä\W»ìL“#:‘`ž$Syü~üQ] ç¼oÀ‡íD%ʉR*)Vʃäy¿A蔻峲—'Ë$MJ<éR› Ãä¾dc#Þ……Ï!Î3^žg¨"$ã%IF€oõY\„Ùè|Ì'y L–ÖMæAßÉÃûØ i—ÖÝH‚ÇÉM$I¢+Fœ™Ìƒ`ÚÉt3gf¡ë÷H-Ï;Yh;ªò@·€îT…‚gNµ‘»9Œö†LÓ ³ÉÝ„%ñÿv &@'˜ŒÃ°È¡¡¤³>lN: ÜF ∌Yª²ó¿û#X=0V4<úVöM˜‰ü©cñªUtÙ…Qh΃Á­@±ø‹*#RF™™ ÔCŒ:sH`,1ÚkŽÌ"®7f™×ô§ù§5w"íj„‚i_†ÉÈ#˜òxßtfº<×7™'/ô-c–É÷ø4ƇР“‡¦Fb966b©YØ{¢ÉR4Ã,'_„š((ª¦É^i¢î¦J6ìaˆ@eÓ@g{ަœƒŠT /D€áù¨/àõù¦,QŸ ‡¦!kZ\7¼ºn˜‚Ì|ŒfèЮàGb¨€®i‚Àó$üLÓ4 ‚YVH.€)DœáÑo6Á€)ûâhû3ÜÙåÍ¡à„l(͆‚ÙÀÄ‘óGœê‹ òŠÜ¢ÓüVÿ„þ€Â•'hIëTýàAxh8˜õ?@akPØÒ SD´Ê†r_þã‘.ê0‰m~4>ôÅ-®ÅŽ…Úã!÷Úep5 ¿D–™ež¡ –ʆ*õjYëM‚MtP]¬XqÏý1d{‘ãy˜y%X)‘)ºŒ+•ÊÕ”9„®çë%ôŠcøét3ß$ÍQ§› À|º_(µªóÍåôÝ<Š Vš+=k釹‡Å'éýü+æ[ôÛüŸè?óªGÍOéÓüiõ”YÁâ*.Ù€‹°%¡©ýk¸z.ɄϫDƒEqçi[E#%Hz%’Ä’1\•n†Ú,5‚¥àBãÑTEº®¦Ç#Á9#‰’=¢Xô¢Ç'èÿŠT”¸Lye™‚‰¢HÒ£À¥žà+}Àµ3.Û2)ï7¾;Ån‘÷ƒý{otÏ~[d»l}²~X§tø [ŒA¯ïÍBä|ÒÏ!m|<Ó|¦°Ú6_¡·ë˜+Tñòá¦!­làö?9Zyp6lü¶>Ä­„ ”`@Ál \g"ŽA¸ÎãœhDY×ñEá:Tѽ;‚±n;©óÀÀ—‚7Eõ[ Óo]Åà ¡¢áHB°Ì@˜ª™u’\Px $H4’=¼æ±à54"áèŠ< úaä e5¸ì)ó&!µ9ùS N+|-(y/›%ÓgsÇ ûrä%òW¹õË'_ÊN¸ô ) ¨™ÍÜØÊ]½dжê)zürŸî1-¤ØŸÚ*ÐAx ÐA@yUëüŸíap@—ƒ U/+Uú6p{›ôK#%byN`Y¥QF†¸(yEQb)V P¨ìGW©8 àÂXYb …€´Ÿ Ú‚(B½‚맺Ÿ Ø‚,LµÅ‘„š³×V$IŽÔÔIäãXƒöÚô¦Þ|ædK8<’ÝèïnDö)ª«Uç\Ñž³Î銄àãÊЮ˜NópUc0õ Ö!“ãwZÐYEÕ‰—™>Ð{Ž zÏa‚ël‡W‡2&ïƒÀT›vQ2t¹WP¡qY€9,ûΗ pòÈkn‘¿g_!o§&äFÝ{ïÒN°ãÒžì”Ê`Ô¸KIÞeªHí4ÅÈŒ£ù1%ò’_ÞT™P Ee¸2EYhæÙ†ÆìA×ÄÓ/ÑpŽ ‘æE1UP˜)Á70䊮I´X*E2„÷À3$íAWáS˜(Ç’’…Æ-þìE Ñàô‡ noÃàbœÜ()¤‚a§AEžpÝ™pZ)"4L8×Þ ÷è—ú˜ FÖn\¸ÜŽÌWÕÝ¥cÉl\«€÷”²¨° ‘Ý}´7XGáù„™e R‹bWÀúÊȯ&¹ôßtèÒÛ³©ç»¨—æÛ¾ý·`;zÿ–k…íEÀ„4¢ o"H_;×°æ«»)øB1ú…\ë÷¾‡0«q½§é}5QJÔ’ì AʃJ¨¼L)/¯S†øjÃõåcË›•æò6¥µ¼eÐÃÊÚ²ùzAñ•æ÷TKp%5m ¾Xº/øËÒƒÁÃ¥ô/åGøAeE \Mó2¹°­'3Ð(fÅéŠòL]W1–S1“Ÿ¾•oM¯×ÉoËß(ߤڌ h½2‘±ª ½Ëî,#Ë"•j£ú¸ºIíU™Mêõ+•Re·7Âçùn çlª¥U1^e[^U#”µŸ|q_àIo$ÂèA!œPŒ,«"”Tv“~ÁbÃJ&P|ï¦Ï_:ñ}‚F¶–@|T³‘@¨ úî ´Y,¡·Kà7Jä3•Ä~r®­–ب¶1ž”Ú‘bê „òB˜V݇ƒë0L-Î ªë®#7×: }¶áè­d ¨2ñ{˜%cl#K²*†\°ù³Œµà¢¬ŠqÌ aíW¸ “Ê´UWõ% Ùô'Ÿ \¡'/›Ì?¾ÝI©óå“Np%ÑîðjQŠY‹k2%‰ùjçœ~ŸÏë·ŠSb3;Lwø ªaÞ«m;^½tLÍÂc @õÈõ÷ßU°3pÇ‘ ë_œ¬ VÑkëæƒw6UÝÞzÛs©‚fŒz顉k&zU%”HŠw ¸jv{ ý‘ñöMã®:{ñ¡«†‚㥽tB嘖¹“®Z 5z-Ôh´Ó‚êÿ;ìFÖL 3’ac;cd,V©Ž\Y댱õžCè:ÿu¡f¾Y™¥5ûoµñ‹”Û´;üw„ºcÊǬcÁ¿{¾´¾ ~\p2Ö Æ™J­Ò;ˆiÔlæ:m2s+s¬àŸô]Ö}* }Q8×)ÑQ¥@âˆtÉ–Z¤‰v˜nÖQ)ànržÏ#góì§¥€„ Ë0DŠt ÉSZŒj‚vöhpâ[M%I²€N°ìg` J‘ÒTêS€Ô `U85&R€UÅS]HÃðCýè­AS™0!££k¯H0‘V,Aü#x¥GÏ^¾è¶˜µé,íKˆöÂb˜m©®Š’>(.*¡¼V¿Š™?ïZ²ëæívîë×_[Hff|ÅËÿ¹|ÅËÌì?Ÿôøï—æ¾Êý)øá39ôΑ·A_<¹÷4uú«˜ãæ¡õ~ h@„•ÅÐ÷ÑfDâZªãÑ·çð·çp] §£oÏa ?ôþ[Ær°¹ ÝPº:ZA,r­çZkšgšÕâi±~Lþ˜ú‘²Uß’y%(¶‘­T³\^¬t(Ûä½Â>q¯,ûåµòÇ$¥ݨݩݯQ€.ƾkfÑ´ÀÕIl&NgaP®iqù3FàGO¨<öOEaøýR:Wz€ÈÍH@6–Î,“–ÉØˆ/q˜1®‘#9ï‰èAv¯Üàpæ ‹… –„Ã[â6·Æå°CgŸYr.}fIž=fÔUêÍ=ðF” ÜfË)t)óyôIŽjØUðÕ/ŽåþwÉg¶ÿ5¶#xÿœõ/n}°m#xÈzå0(âË€\³ãÙðÂE¿~ïè›xevÂá6ƒöV‘¤•¤’QF(L·&r=9]œêY@Îcæ ·x["ݱ÷™<ǃŸx>ñ~e}ü[ž?K‡¹Ž!Ûå’ e ¿ž¬QÆ“#•QÞ±‘ëÅ™ÊåöSÿpNÕR%]ƒ)qM’’Õ¨jIKêúè†m´4M¤Ž&²/ZÈT i ÖÀ šqCE3näwö É\ƒK®–™‰7¸ÃÜ ®—£‘ˆ&qÅ*‡ý4uT‹ /K^}¸`43¹?ç²}™l£Ã-_z0¤ƒn—í íNÖ\Qã€È$ýËÔ†Î?xÿËÛޠ凕{²ñ——¯øÏçïYõìÚŸ=zqË&@=Dxzì©hTÁ³æ‡Ìïù=جŽ 7'„†G¦˜MÁ©‘›ÌÛC7EV±«|çÉóðM±¬É~„ŽQþˆÖ©oÖI]§Ã‘#/"Í{³nh pÞuhOz õX6LNþŠá2%_â®äÙ[8oJÊ3; „bˆô”LeÐÙŽ–Ùˆù«õg'Ê3yIÅûI*‚%åXËóû¤úûÄæô„lÏD½FÜí}°"·¹ea Ùö·®Ê%²cÞOÞÄœmX/Wˆ9Pˆ+uYê†ÿóêg¹¯€÷¯\:-î~è–G³ÇÈ)òЙî}Ì´¶ttö2(Í}”ûFï8pxríµ·mƒ^ÄEØÁ¼GX@±£^hÁÊà  \ü±üå…)¥ÊÎ`w¢ù( Å2¼BÉZD>2íõÐKˆ›¼ÀÛë±i+IùÀT‚=ƒ‡f0¥ ‰e: ´‘™mš‰› ”âä¤Qá¦(_»[;^wkçs¼ì`rnʲ¿÷®‚&¶‚¯D!qˆD>É›Îh` }F?s¦ÙIgPÏŽ:á¼zuƒ8–‡’.˜aÂ`µ0€©eùš5 ídIµQ\Sj® ™@·†¼šuؽi“'ôÀŠëšÂC«¦Ž8|˜úÑ£í 3£®7*Žj¹ùÑK·B‹¸&7…úZªÅ¼Ón‘$Æ[!%½×I#½¬P,¨RÞŠâ:iˆwœ4Ê;“›%Ý&]ÿéSW”\]|uÉu%›+¸!…CÊ+FI£ G–M/œ^ÖÊÝRxKYKEGű’Ó…ÿSüU‰aùYß~rWWiÄÃá•Dƒð:ÒAtG¶’«í*&ÑÄ‘EYôûª“Õb28bݲ­«Ã¢+à”“3*°[³°[³úÜš…Ý*+ÇW?wÜz*3wÝš…‚‚q¸ò|™’DQ,ñ†vX;¡õjtLkÔ&Á…[ŒB²ÕŠp©3F½ ömZ0]±¬¹·ôÄ~îíÜý[.Ûsu#èq‹*{ðº.J¢Õã²Ä©¥D~ΪÉ-û×äÞºCªºvÙêõ¬Øù—³wüá±×îÞ6ÿ/›õù3ÛVßûüö»W=?+4%Y5oNíÎG@Ãñ§xôéŽKmÿ:¼ê%ªüÝo¼ûë·~²ÑuA!Þ½Üô*ᇊï³2¸ã ¯“t 5’: ÐøR½ÌX¼!^Š„a8¯$ÊIÁ®’é@·üxñ۸С½HJ, \ò€c;!„'àw’ò"‘hÁP‘¾~¦§MÄÛVfHf§ÿ¬Ÿ\ìßìßéïõÓ~Ò›t¨?:ü gQ®8Ôœ“ù.pÁ¶°•ÒyJs?Ð'$Hl–$9'úFOîÇ«À½0 (Ý/BÄ—q¯."¤[§Êª\Reå0Pxh—Â|ÖШÚ³ÓvÅ(6°YŸ±®ë¾î¿ßµ|áäÇ`HøõÍ[’½‘|vÝ=Ó6®ÎþÚäz(¨Ì…æˆCö Âô & Âfa§Ð-œÎ !Ä„ÅB‡°É½tRèĘc,Ž&)¥î˰´ÈrI† 7Ñ›ét7}’f»é³4IÐqú¼GÓN¬LΠûæÆóF‹è]iìÙè¼g£óûS42"Í!=‘ÿöì-ÁÝÑLõïƒØ¼¤=ëZᬬïêꢿ8|ø¢N]<†júžËMõø;›ÄöHšI2Ãèjf-ÃX<Ãp4MÒŒ‡ŠDR^™6‰CßPb¹ˆ¡uBnYÐ*•¤(vJ &5J“$ Ñ-íZô\ú%N$œSJQœ™ÈèKI<ÎI°mKAw{áèþV­Õ&LÔ‚ÙN4NÀ$Ó%q8p{uõ:wjnT^×R¼.† raÂÑÔ|®Úœž¶–F[d4ƒ6f$‰éý@³†ÆèJîÆqv ;Ô±NII‚LÂ\‘Ä$h9ˆ?Û>–8áÐö±&&ö8 pjBeåo…£oí/k,j¼_Ý~ïW§/³/`xjÕ!¸‹ÎÓ±/›ƒbç(|tí*t{a^f;áâÚlo÷îBL!ÜíG§v똌 OøžŒO»¤<¯rè­Ìã4à½~øn^o> 2Ëîzò—»ÂÎÃAólý@í]ÃÒ´Pðâg¹6ðÆG¹gïg\z ìÌ­ÈÎ#cwçæ"½|j±½~¼Á `Ôu 125ÎyÐ`çìt\í¶“p¹Ñ˜³‰9ÁГàá,CŘÅLÓËÐЛ‹$å8xôJØÑû`d³‰Ý0Í$û{û]ööý¼½#k'ãÝ`,¿¥ÞÛ›ßdw}1‘¾Òw!ç… #§xà{èÍÌ]¸ŒÃYCÙŒ™ŠÁoÝö\ž=}.ß/ñÏöIÉ$éºGø›õIœù€9'->^,Âq¢Š£Ö‡B °Å¡ .I‚Îäæ$™„~LMvÀ qƆ©i†épÆæÅ](p=ôE çmØ 3ò¼A#Ï¿6öƒf[$;à Œ_.Ü÷raüraÄa7ÐË…ñ*ƉwÙ^œÃ2zápù £×óduq!ÂÈìÂöWðû×ð»+ð¥|Œ|Îöâ¥Ø…ê˜d"¹¬Úómìà3Ùž~M?¨ÞÉâÝ¥ö%NåD£cĆտrL•½ž”W6ÂÀT|ù…ÚM]P'.L*±po¼\ã8ºÿÂýlÕ¶¶OÅîûýÏ^ÜSÜtõâÿèš5ïº5õtêɉ7Þ<ëÀŽ}Ùò§‹n¬rkö)r÷ªU“ôýì‡ù˜ëÔ?Xm{ŠõÏëûõ©O=g©ó–F.·*Ì]:xZ?8è ÐqÞ«zý&Œ¹ëWDE•ÕDÇYsI8Ú’p´%õE[6©?Í0޶$mÁûß8•D;ocw(á€NðŸ41€Œ.„"¯ÀÙ¹8°9°3РYíócÛ<ßenÁÅ¿ ¸Äo\F¿€‹v-±Û6¿ÀM´pû‘¾Ô†aW\Mã%Lˆkp_æg AäEN¤X=e°jh¢é öµ#/Œ¥ì¢¸ýD¼î¹åÇ[ž¬‹]å Ç,ý9zjÇÈŪVg—’kï¸}øïfqåïˆÞÓt ”¢BÁÂ}¾€K= õD²—¢Qÿ‡É‰Ay4;†ŸÉÎæ°­<ŸÑëÍzM`¤>Þïhbš„©z³Ù쟸¹]˜§ßnÞîŸX |Ë(s©éÌtq®¼ˆšÏÌÉ¢¡9º o"ŒsŸ0V®¯-(‡ÁÌC¯xàr®FI./ºmO"™Ä‚Ó¹8GqƒO@®EP« BVQÚ‹+ì Œ5,_ !¸V‹ý о$r$18„ ·m³#9½=Ý|¾¹Q±Ïð¼_4™&ÜÌÜ,ÐhmBñà†^„ÛÞ«R4bë†ßüøïù⑹3¯î^·v÷ž‡Öí&= dãŠÜß²‡¾øˆåÝwÞýÃoÞù=ü@ër­t!” IDÁÍöFY _¥×鯸Î8‹—ÉÅU¾ª‚k Ç;ã|½Ug ÏæçÊMVS¸_(·ê·[ ÃÝñ÷¼ÇÇCïE{¼=Ñ“ñÞ¸¿˜Nëi_ ]¯¢ÇésôO¤/ rºd¨”?‚ sÖQ%B &Žˆ@m±Eìé8aÜv‰Q§œýO1'J庾ŠF‘®cÒÔ2à©&«Í$Aü{Ä<”ëý€rý  üü·r¼‘]$Êc£kà ¤<”&wˆÍuýQrOÞ©ú}^ܨĠúIoÝÖú'n[¤mù‰{æ<>ÐØ¶bÕK?_¶tW®•yýá)Sí}zKîâ#×Õg/R[|çƒw~ÿ'd…cr­ÔI(Cˆ€!öF‰L“åaäxò.™mô5Ç;£›£LÆ“ 7FGxF„§y¦…oñÜn‰vDßg?0O±ŸÉŸô2²HNûêÈy,9JžC¶’Ê |ìÿ,x*|‰Ô­xC‰SYo„†‚³Ôjá«Ð5[kÑ:4:Šˆ(–ž†­ˆÐ0¡a Bà )†üh®5‡_Î:oÄÞc™ñ]|5-cÆ 8¿ø:x]AôJôáß`«Ùs ß Ñ â W ªåOÍx=÷ÕïÝ÷›öç²…/¯ZºmÇŠå[r­$?l"¸Í¹¶m¼p-µýС_ÿöý£¿E+ÜCP4oA©ÄÛö°JÐiPLgèkéiô­ô2š ^àÅc Añ@Â&AˆBi'ø¢¸xÈ"ãÿŸÙ÷Åzÿ²~ ‹Ñ…“ܳý‚ü‰æèƒßIî{ôæsKPÝ<ššº|“OB{ŠK¯š— ¾Žú:ˆЇž»ºµqî W_sͰ¼Q:õlû˜úŸ—ŒnlY’}ÍBcïijœ…A”eßCy‹ê…qˆÄÌ¢ùE÷ …Û$ƒ¯CÙø ^`¬Ûö¢‡ë¨ôNG`¢t€kž÷xýW › G;[И8•NÙ$`:2PŠ…@(´=Lzz%ÆkÎYK÷=ÆÑ3ƒqô¬ Nƒïî'çîæåð©{#uGÊA9zôŒò<÷¿†ÃAG@VD@~]Hk"\º)IÓ‹ˆ" ˜IôrüHad ·˜ëà:9š€‘Ófn'×ÍáX\þæÖÁÃZÄ!²7Þ®uò1wàVÆ]ÀÚb2´ö#hÇ Íœ¨’;@¶0d×­ßJRñŸMÈ6è=ÈßAtäáêjÜAÆWIËÙ:C;F-î3ŒÙѤº®áæE>¸gï^Oº4úì&ýêùÏ‘·< ¸E¹ÇÍþ`BEç÷ЗD[ Lz•¡='˜¹“q✵«Mo&í Þã—Ç/AgnÀi"ªýÉ€…Ò‰ÎU,œ¥X&†åûÈ&vßV_~by]€ÞEƒ-œpZ(?QÐ|ôZ ÛÖÄÆPj:"‡6‡v†zCtHN } úKqáˆpR …üÂ!ô-.-b Ù0îŒsƒÁÂÄà}¿›„4dñžecC¾%4¢­«Š¦ f1j¸Z o8`yù‡²èîj–¤0 h]n¯@5ÞûÁ [&éR—dÜ1eÊÆa]?ésû¤š¥äÙ= =eÚãëɺ‹Ç tBŇÒÁç._ÀbxBäYÀöÑÖ¸ª¶2ÝŸ½ŽÉë¯Ô0€(2êDäߣN€if†Gzº=ð ܳˆ  !Z˜!JáÇBQ2CøáÞ;fßW:0CÄáA“ˈR!%Ö5âb´8Ì$gó³„[Á­d+ß*¬"V‚•ä]ü*a¥¸¬#×R¸õüÃÂO‰§…ï‹/ω¯¯p»Ä·‰ßˆÇˆÄ/‰Å‹Ä9±~1@øÅR5bœDØ¢Àئ?Ã@UÉäÿââì³( @*¥á"ûP4ègѬà«$ÃÈ"Où·CéCi¢²Ü_+r<ŸD¯ ˆE’I‡õ͈"!:n–ŠL¥ ä"Þ¶mçoð^›é`HŽl!NÚ HúüH›Î„‚Ùæls(p¦§ÙmGÙ‡+uW–~#&¢ËGºüãpì1¥ÚS À/r‹~Õ“ŒÒ_¾š»ƒNe\pçôäz„¥;¼ÐW v˜tA¾‰"Sì}ëæïã&ú4®PA##.;ÿÑÝ¥:›piE#ÃÆ÷Eƒ„ £!Àjp67]“ @Ò"mˆ.:å8:5Õ=¤=¤¿[¸<|üíÐ2†0´@/(§ËDrœ1רhPFÜiéî6§¦ó¹!V˜Ñ#nm¿KdhV,À 6É•ói5CÔpõü0u5šµ¹ üxéZm´1Μ«M5róøæ]ìÝÜ2þUö€¶Ïü'{Q(•ŒR¢T)QKµ³Ò;”¨5Wòkù§©§äŸƒçÉç¥mò^b{@ý}”ýP8MŸÖ>5ϱ„ˆ„ke|ÔY‡¦‡—t|4]µ ‹ªF›„Ás|’Ó’*JãTŽR€œTö÷µk‘—R ö•ã\M^+JFJLÓé©b“±È¸×xØ ‘†ºˆÄáæÛ%•és•N¡•Þƒ~Õþ Û^ —BpŒ Š<ÌQþ½o¢Èú=U=ÕÓ3ÓóÈ$ ‘G0 Ä,F6"ÈS^BÄH IIf’pYd]×UÄeY|.²,²Êú)ƈˆñ¬¸®ŠñëŠâ"®TDÉÜU÷$£â~{ï÷ÝßK*§êtõ©S§Î9U]]=Õí$$`|Ÿx¿  æ, +Ü~_è©§r&ƒ™Â™$„Ó;÷÷ú’¼^ŸÛL·‘„âr„ÝSˆ3gÐaøLŸW‰Ä8.ßð%»NÐ/÷M»“޼L¾Lh•Wóîd,t‡¦ºYû ù[a>«Ð55Õ%\‘ ·%Í*ô›¯Ö‰5t®?>ÀŽ%«PS¢ÔÉG/½4óüËNviÊé÷Fؽ.AÅÿÆÖ§/P á—öÏZ'nï3cN«7d†x[ôÌiß!_ôÅVÊö‡‚ðÑÎ7-ϸ=w†zcÈ‹÷9å»s‘ÑwÆÄí9ê‡JFôûœ!+7h¿ÝAnÆ|q¦‚àÑêÅg¶äØB£ù.«¦Næå’U¹„è;÷»C޶÷]Ø[;_ÞÌ£ÁAµ!ú¾Ä®ß/[ëÙ²û©7?ÈE'‰Éjƒ†6Pc;Þu×¹Žœ»º}ÄvÜÛÑúð]ƒ^ÃsëÁ„gyí©›þòW^qòM¾âo^ÇÆuè3Œ4ö–}êægÝÁ]:×½ðH¿š‘û‡f*§Toêëù ?Èüé©Ö+e¦¥æû7867ûnñ?.×wþÅïòvÏë¡%ººy{F°|ÏÏØõchðbÇ\ç\Ïßì&÷MžùNóϳ¾çoj¯¸öy÷Þwƒ]{(‚ þo ¶‡Bb~µ‡Âíæú÷÷PTèºfí¢Ð]j…ßÛ(ü~o sEÀ­û¹ßØC{\<пsÅ/óößH¡ÔF ÷Ô Nð®4ÓÝþRݵ²Ð+Ã…ú4}•z)è }!m%OŸ ]NHX±Ûþv‹ºXàZx?pôãïí™ÈʼÔöÖKíÈ-jŸÄn+FâT{' l§hõ¥ôÊSÛ<½òÌôä< [úæÔž½ny,½ož«0­óu>sÕ¢©zF$7-$ËKÏ(ùtHÈü쪎›ü!+mpÿû_ëø5ûÕßÞÌï8Ì3XÇñ ²Çæœì0O=Ï.œÛq)ÚÕ·ã"íøHö•í#½ÜI~Í£¥¥úƒºGO, úCžB3dûJêÐÌë‘òש™¨›tuÙèy¿?ùe#–¤åe$ÍößëÖ ½…0H(#;7 #§é v÷¦zš½#͑޾›<ÁŒÄñÝçç&ÎíV¬J¬ê¶\_ê]žpyÒåÝ~á½.aupuâµI7¹ïô´NØ•ô¡ûPÒ—ÞSãIÑ´Þ1êžèIëéðù¯òkþÔNñ­E„`çö²Q~¿ÀX‰™CjRbbÿ ; ~ƒa·ÁîDù“q.PZ M{,§íäç>à‡. “vò™…žsƒ…A~Yð± îdcwøY:ßÓ-O)m†Ìlsª©M3£j‡ÎØû‡ú¡~nkÏÐ ŒPÞ)ùvX8‘|çLJàèÁTùŧ{¤>V¥È‡˜Gñ4¥KÙ{o&n÷a´IÁhó0™ÑÈý€Å5IÑ·wŒÊs§Êó¡—=Ð-/ÁÞ<>WΗåK à>‰­_¹ŒRÛÁì)Œü˜ÐYéW$3¸`|rÂáéXòäß2Óûd¾×ÚQs^¿ì³s;ÝÈè×s±¿—#ãÔÍM?[±”/>ù̽cçγœ Œ=/ï|ìÞBop'ßkð nm~y¾Ð„é­žt?Yx!A<Ã54ÇòÜØ8>Θàš˜Çfò™F±kZ †-ä j×OX£ñׯØ/Œk]ÇÙQùÂìl‘éÊ3î0^cNÙ[ tËå^]ò}gáFšç»ÜÜp»û3ŽËgòeÁ¼Td¢‰îR/YߥRWóLŸ›ïdþV\ …þ0¿„ˆœrÙJ-Ö§{7ùù }ó}«|G|BýÖ¿Ÿ<åk$÷JÆî%6•ê(J©NPª?ÐØWrÐ~v}J"3Õ/ÊÔkº3 ïãñ}õãJ{ªðí¶_'¾TMÇ`ͱ†\”±´gH]âèÉ¥¥*­×&†çª]2òZöv‹_íë°’ì™ç2º÷ü‘œœµ$ç©Û.w÷<žèѽk`ÉÁô³¬­#súvËà[ætLÕÊN=Q·¼šýsfèëšO•üÄu«\ñ¡}Á‹E;yäýzá¼ÛSïMåŸ:?Mäwþ=‘¿à|!‘?æ|,‘ßë¼7‘ßî¼=‘¯u®Mä++ùIãd¯1j’x±QœÄMÃLâI‰†w˜ÒüÇ}Úqîórfx©@~ËdZáÐÄ:çεNÍÉG'ø¼f&,…É=r}MÌ9Ú(àŒ 4m-g<5Åþ ¨õîÊÀ©ƒê£[ £såëY>|ëïÖ;Þå=:EÂá0 ÛìRÖí,õÒôd]wöÃYÒ¡³/<*Wcëc˜c÷¾;®.˜6h\ò%waÐÔÚa>EìUšÚ_8Eiêˆq$‰3ƒ%ñwœï$ò/&òÇ'òíÎí‰|³ss"_ç\—ȯt^™Èëõ‰¼Ü(Oâ3Œ¶¦ü¦G£¤?%Jݘ^¨Ìe1ãON™‘Í @NŒùü&ô5Л<Æ4½R]Þ&ε‚Ê’ÜÏZbÂÔ~¾TÕÁ€ÂÕ»äåÇcé·•Õ©§°|7¾õKš$§õjüœ8üâ'úd^2xäíõâø :ç¢At¿lF&Gí0û‘ÒUcá€vç{N~Ÿó)'ÿÜ`¿1~oðãJƒÏ2Êq³g0°Ü[5˜yÐdêlj^ªù»åÎ`·êTüG-)fvi÷ø&¬8´RÆ=ˆ.Wß%¨~€ËÛ[!¬¾ $þ ~(A!õ£—ƒ±õñZ½Ö Žt½y0¶H^h}!°—8þà°îKíE¸ê?ä­ÀzÞžVõ³,N-t­ã,íy©'d÷Á‘Éò¡xìÁÁ^]÷òÒŽŽvt,}¹îÒ{¼zã¯,¸G;y9‚<ÆlhL*Ù^r㫯ވ³Ú]¬?»“É/h¦Ä§büç}ä’„€ú2’œÔ3\×'ŸÚ}YÉ¥r]JŽìBýÂlà(õM€ 9,?gì† Eé#ûLîînÍjJYâ;)gU;æ©Ow³Ãbz¬3¼ËÒY{Ÿ§òY|ßÀŸ×îvôCõ4ý9ç]ÆzãCw®gŠg…g¿̙ޙ¾A¾/ýë#7¾Hx88&¸=±_Ò¹IWuOíþIò5)žTÑ㜞7ô<”¶¼WNïé}^ý©ïÄÎPÞ·<ýù³éwcÿð€iN ü%%¾q%[E:!úE×"ݸq%E+©iÈï‡|‰ç©8?ÚŠ¸@ásAÙŠU¸I|–Šç¨x^ô*Pz(Pz+Ï"Ä ïÎàùÄRÂ%axJÙöð”ø •?SásT©¹ˆ'Ðpž@;¨?ÍR2ÏRÒÎBÎ$š‹œJÄ ˆ‹ÕÙbuvžÊŸ§òw(ëï€V÷#ÞXþåóGI~íZþU«XSžéVGçä£m\£zÎÆq4‚RØÙ6®“µq'-è¤1(œ,ÜE×±i6îåÛ˜Ü`ýp\e㌄ã!çät·q†:>´qG S¤Ú¸NNÑ߯4¬“Æ ǯlÜEç‹Á6îe³Dœ™CC]¦¾Gáx@UáºÊÿ‡Â*ÿs…wr…»lZ¸¥C ·thá–-ÜGcéÐÂ-Z¸¥C ·thá–-ÜÒ¡ÄÝqò{”lA…›qù>‰;Ó²9‡+<xÐY¨ð¤8únª½Þ=.?U•®ðžª.‹g¯8š>qx?E?_ág+¼VáC¾BâFœüF\]f\¾kË]¢áÐÈ0Ê6“*©édª£Z@#-§z•ócE€Ë¸ùUŠ" gΣ„MGÞ"”o¤uTŽ´ÔK—ò<àU(+i«M) Qñ+ͤZŒ¼:ªø?’å»”ùߪSJ´ˆš€Ëzòi¶’®Á.Â(œ-Œ–NU´gëp^JÓˆÑÿtôRs]uL†Ìß—vf'V¤ämu-$ ÑTp®P5ɳC”ŒuðÔ*ÅŠ:S‰)q FÞ4ÕÞˆ:S¥ô7qèËléBhC†dsQ² ÇR¯Ë‘6){HWÚú¯P²6ª¼:Äe*¿^Õ·\ÙGò !'¢d’” í2åöq©âT¯j_ªFuN–Z x4ÚV¬±ÛYÛ)…U"&G$޶^i¾ /TuXúhVrKœ¾ Ö±¤]ˆÚš”FÊ”‡~W²DÂ2@?©ô¾¶Ü§ç]û_h{÷²NÛGTÿˆÙ2æÃ§kA¬öïËuNœdK¬¶4ªúb½Cò·ÚZ†œfÕò:Õãþ•'”~ËêåÊ:uvlµÊ›pT¯â’vi§7[|$e (þ•eÝž=,74³²<4¹®¶®qy}yèÇu‘úºHicU]mV輚šÐôªE• ¡éå å‘¥åeYçEªJkBU ¡ÒPc¤´¬|Iidq¨®â‡¹Ä2ó­’ÓË5Õ”Fòg—Gp:4"kØÈPÆäª…‘º†ºŠÆA]ùóU‰É3;ÙΔQQ¤´¹ªvQhjEEÕÂòÐÐôºUµ¡)U +ëjJ‡¦•6FªV•†f”6Õ–]hXÞèásëšBKJ—‡šÊC•¿¢®¶1ÔX*«j¨¯Á‰ÒÚ²P}¤ ™ q¦iiC¨¾<²¤ª±±¼,´`9Š•‡jPg­d’GDåÖGêÊš6† Gs%‰«iU횦2è.¢®¶fy(£jP¨|ÉðŽ£®ý—µ+ò2ÙúHyƒl¥ÔpW²x'¯sT‹2ªPKcùiŽHj-«k®­©+-û¶J­¦—GBhQªBÜÔXßÔ*+_*Õ šÊòšúok( ceêƒr®…·ËQt9óÂêq|Xȱó3àsV¯‘½£L»E»O{D{ ð¶K»;ŽW©µbÇïòoÕUþ-nŠŸ£·c˜c¢ãÇ纽Bö7ëªPɶ³ßcÊ&Gy刨Ñ[ò°æ(¿„|Ú?äL)XTþ³®Éü±tžç@Tø¦Ø…ãåܱ¿(þèÜhÇyÓ'MÏΕ5'$2‘a_ƒf|51¾†ßL¿…ßüV~+ðÛømÀÇ7¿þÿøq hA s"-Qüm"ðIîô+´+ˆk«´£À¿Ô¾~JëÕ ³ƒ ˜«4:79–¿Üq9ðŸ8~ |ã7À×;Öÿ­ã·À7ˆáÄDŽÈ%MŒ£€ç/Ћˆéçë¨WŸ¤O>EŸ|¦üܰ>[¿ø}ð¹ú%ÀçéÀ›ô&àKõfàËô_ׯÖ üýZà×9·sÞἃ4çVçÀwç7ƘU?5Ð:ã ã6à¿3>þ©qø—.Ôâšëj&͵̃«Çíñ’æñy2€òà.Гëù#ð;=÷ßîyø“žÝÀŸöüøsž¿÷<ï9 üCÏÇÈÿÄóð£žcÀ¿ò|ük4ï9î9ü$Œ§™Ì| ³¸ÝæŸ?c~ü ó(qóKo€˜7Á›Jš·‡·X~çÁ¶9§¾Jó–Î-mÛzF§£E3 è͘c EF±Q¼ÔXˆ¸Â¨G¼ÔXŽørhCêágˆ¯4®DÎÏŸ¿Ê¸ø/k_gü ø ЕÔÒç¶N8´‘ |°÷ОlO¶jï?äùHµåiÄ{LÌOÍ?£]²Ý'{“Ñ–o ðTÙ.»=nÚÀÚH”FJPháòH Y)_LS*ËD¨¤¦´±½ßMlÖô¢%¡gE¡yl ÷:J7¤z“¼ßñÆ3Ü3ø:z8Mš9>DÝm ._{nãÎ(aqy¤–*U\«âF_./N´JÅרøoPñ6?¯âw—,^²˜Ž©¸CÆLW±OÅÝUÜÛnÿébŽ”Ç¥j/0dònòºÑzSÝABZ R"ôÒ -J¦J¥Ô“Ò¨õ¦>¸JŸ¾Üéòä›ã[©ü(„ñ<Œ‡5õVÐU´šÖÓm´…î¦Vj£Ý¸¯{™Þ¢ƒô¥o˜ƒ™¬Ë`#Y›Äf²y,ÂÖ±[Øf¶µ°]ìIö,{ œ bìj’ß‘gÁlȈ´W%$E"+í{Ðê éWYéÈ+õ¢•æeYi¾åì‚cV:þm+ð¤•^"—é6Òåwx.[A:ˆ•´ê_¸QJC¬,‚c'ÒV~ÙN+-ϲÒEÝ£*«jlÕìªjûèõªª©:É:ª~µúÃêŽÅAëhñªÅëß¹¸Í*_³ÒJ—T[im‘¢2êz× ¯_WR×Xw]ݦº*×[[ýöúÝõ¯×¦pR8#\ž. / ¯¶¤Œ–1Ò‹[¤ÂJ ­´±ÕJ›>´èšKì´Byk¾ž˜¿^i¨ŠÞb:ì6œ²VÏ®dÏqÎsy„¯à×ñõ€| oáÏðÑu|Zp¡V¯-ÕžÑ^Â5¢‡cŽ#â¸Æ±Ùq·.6iψgõ^­×ë[õ·4ŸSw&¡‚s¬s޳ÄYæÜæ€`` 3zè{|;kï´Ã+ß²ƒnûÔ øÓ‰x-‡M6©¯ÝS”ás}às}PÇ~H¹RöaÙ€a€åmßÑæ~hs?$ïÃQž'E§@S Õj¥Õ^H{c\áÜYÑiÐÎZÞy©g€nòÏŽNÁõ6&iz‡´¶÷¯ý›~WŠoÛ´;ðÓÛu¹²«ô¿h¿[À±ò·@ëo€ªoU 4Þ‚9äúo÷« 85£þVpk†%¶c3dhFéý~Jï‡<Áa?8HÏÚÍ­š![3¬· ž~EÞïyÓé<)ý;Þ$K@©(u¥¤€ú¨€z,öJ@‰°Ò (u@én/JíE©½(µ¥ö¢®½(¹%÷¢ä^”Ø‹Q ÖïeŸ÷ü`¹X™V9Ô²óT‡GêtW´™¶Z¢í¹vD竸³¶Ðø*âçEóóimç€OD*G±ÉÑ­| F²‹€_Œ¼bJæ5H—€¦x3 !ÏGŽä0^•<Œ’[PrJæSqî"c,‡Ã|. °²tCÉ6>…ŠC?_qi—6pi—6UÿTÈaqYm¼t€àR–:@øòèaÌ:OÓnÔÔŒššQK;jYÃÇA¾ñH'‚«äX | 4—/T*‘Wt Ò&¤KËËÁ_ç“¡‹)ª¥»x)ôY‰ã%Ð Wõ-†Tn[Cí–†p~2ô= uzü©Riå0¶bºl‡+]^úÕ&^ÛVÝ»p7-i.Q5'“Ë.qØâ2-¶ÎBW‡a»dò(ÛÅ, ëŒt*tbÕÕ}´+{AØ×û;~Š‘å§YÚ1²´C»k:5[ª.íÆµUyC»í [×beÃùh÷V´{+oFÞr\-ýò(UŒÓ$à“•'¬±¯­»”?ÉÖ͇Ñ"ÜiÄf@wE·B¶­¶å¥µñBPZ\ÛÁq‹ò+K–-°üVȲVßÊËåÈ«P²ÍçUH¥å+ë¯&¶ò@`)``yt €vŽ@;G:µcI±R¶µ´ÅÖP›òò)ªOXz¾ ýïRÐXšiæóq¾TIµ…/^†´ùH¤OV!­,^‡´4–¤¶VÛTÍ“Àqr§…wc9•\±žgɵËöÈvxñxÕ÷¥?Ç<[Ž ²çà® #JœµÙZÞÛµÛ^ í—cûÕ|{ØïSvïǬ=¥,¯kƒU“¥lªŸË~mÚ–Üjûê–¸>²Ææ-½j‹m½Ã¸³*Uc„5^…Ñ?¬½OÑ\†œù€Råß’^õSÙ^^«ü½M(€f%A;P= ÇŸ.rDÛ§ä”[ÜY§Å) îöØäŽMàÔnËÑnshGi)C»¢ä(Ó®ú¨Ë®±=NÞ¶¸‘¯]ʉ¶^×·a!Og¹Ë:¥ì’Pàö¨‰š0>Á¾à1D¥R÷qcFÍ[ÊÃU®Ô¦¦jœåˆcÄÉhµ'¦ù:[û’bŸ}v×wϪV;”Õ+ãF(w¬O+ÝK¿PzÇkiÌn ( ÌemCùb{,ì*‘¬JXV:„>c•”:h¶=ÌÙ©±xéc²¹:­Óg—µcºlG ¾sZºÌ>Z¢´WƒV½RÙFj;fûêZ×)OL£1ÉcgeM¼³½ÎÎ+^×È3#Ï|uÅw©;…ÿì.ÓµöDò7.ò½–$ŸBÐh(‚ƒr¨F`N< ÁIy”û›·ü=fø³LšKŸç›'í@à*@»‚,“ ¡D6” ¥î¸ŸÏ¡döûŒRÙ—ì+êÁ޳ãÔ‹d'©7ÇäšúpÁõåNî¦tnr/ à~î§ žÌ“iOå©t6ïÉÓ(“÷á}á¹ýx?ÊæøÆñA4œgòLÊáY<‹ry.‡ì<ŸŸG£xGçòñ|<åòiôc>×â ùl>‡&ñbøÿT^Æ+èb^ «ój^O—ðÞ€ÙçR¾Œò«ùÕTÁ¯á×Ð"¾š¯¦Jbz™¾M> §·)—¨þ6Àfb‘·Þ ¸ø»H[»Û°ðœ /…+‘¾xpe>@ú!àààÐp€ð’=!ÀÀ`”ùépÀhuŽEŽªó,ré@àBÀ4Àlb 0{x`QÓVÀÝ€bM;‘> ØÍJë7Gò#ކ•õG¦W”DÊê?ŒÔ+ø&²4lD6¿;<¯ÁTé‚3üQdàšú;#…õ÷Z#…‹²#…áçfÖë‘qõ»"ã:i^ÌA^!ò -þ‹no‰”„·EJê÷D¦«óÏ!}iW½+âð’ú#HaŽr>Ð|Ù„ãMáPd«’K¦¯GîFâøÅÎôXäUßDÞRðaä]Àᑷƒ£#ï>@ùwÃÓtE‘1<ÖöŠ’†Þ—7œ­àꆑÐÛôðêÈ-² áís3äÛÑ@ᶆ©‹˜Â5æË¶Û:=øKENÄôèk’ÔaLoŠ×Ë]üê_BûÆéíñÈe·=áõE:ó¿{>NÐI½Ø·$N×WÆÛþh–†“Ðn_äzÀzàë¥=€ß¢òcÐò´S<(›–Ý S‹î´í·²îþ®ýÂÃa'i¯1°ÑÛV¶7\¥ OC*ù ×5èlšÄçKû^ Ùlû5l Þ–϶Rä¿…ü`ÌïUZ©Ò8NAz=Ò`,?\ ÿXß7váð¡~ðŸl«¡Ï×#ÕáuÐÝMu¼hCx#|ªËVרþ2OÚ al ”OÄ@úÆ›6þàñ¾ë‡èwòÜG 8^Š´ ù$üuòp‡ZvhþŸUíêê'ŸŽJ¿‡>ÇCoSäy·ErUŸ”~Àm?›<‰~`§õ7¬Tþ¯|Rõƒ˜ÏÎA}2M—2ZùHccC¼ÏÚ>(ý6ª—>§|Êîû_K€#èãG"4v ¿¿8f79ÐŽi]Ç–4¥+ˆó•X»”/–ÝÕ±!Á?vÌ‚`Ó‘Mh»V†W7eɶ4åB>ôÓ¦|¤oËvÉñ#’®€Ç_WzrJꙩ¡ž–ºÔ3MŸzšPÏ1“ÔÌžêÙe_õÔò,õÄp€zÞ—.OñO9®'Z­q­¯Ö—4m 6ˆZ¦–INmˆ6܇jCÉ¥ Ó†‘[ËÑrÈ£ÐF’©ýLûù´_j¿¢Dm¶–R´_k¿¦žÚo´ßRšv£v#õÑnÖn¦v«v+õÕ~§ÝNéÚïµ?Pí픡ݥÝE™ÚŸ´?Ñ`í?´ÿ !Ú½Ú½”¥Ý§ÝGCµûµû)[{@{€†ijÒpí!í!ÊÑÖ¦\íí¡=¦=F#µ'´'h”ö´ö4Ööjû(Ok×^¡±ÚkÚt¾¶_ÛO㵿ih‚öžöMÑÞ×Þ§©Ú!íMÓkÓEÚ§Ú4[dˆÁt‰(E4_Œã¨JŒRµ˜$&Ñ1EL¡Z1ML£:1]L§z1S̤°˜-fSDÌs¨A‹bjóÄ5‹b-e¢Œ–‹ QI—‹jQC?µ¢žV‰ˆh¤Ÿ‹¥b]-.+èZ±R¬¤Õb•XEkÄ•âJº^\%®¢µâjq5Ý ®×ЯÅuâ:Z'V‹Õôq½¸žÖ‹Ä ô[±N¬£ b½XO7Š bÝ$èfq‹¸…n·‰ÛèV±Ql¤ÛÄ&±‰~'6‹Í´Ql[èv±Ul¥MâNq'ý^lÛh³¸[ÜM÷ˆ{h‹Ø.¶Ó¢E´ÐVÑ*Zéb‡x˜îˆÇèñ„xŠîO‹?S«Ø+þBŠ¿Šh—Ø'öÑ#¢]´Ó£âñ =&^¯Ñãâ ñ=!ö‹ýô¤ø›ø=%þ.þN»Åq€žï‰÷hx_¼O‡Ä!zF‡i¯ø§ø'=+>Ó_ħâSzN|&>£¿Š/Äô¼øR|I/ˆ¯ÄWô¢8.ŽÓ>qRœ¤—Ä)¥v齪 ÝIoè.ÝCoé^ÝK×ýºŸÞÑô: 'ê‰ô®ÞMïFïéÉz2ÔSõžô¾ÞKO§ô~z?úD  Oõ =ƒŽègëgÓgú`}0}®géYô…ž­gÓQ}¸>’¾ÔGë£é„ž¯ŸC'õ1úé”>OŸÇ4½D/a}¾>Ÿ }¾€é˜5.bN½J¯b}±^ÃL=¢70ŸÇåq±€ç>ÏN–`búËRM‡é`=LÝÔYOÓ0 –fºM7ëeâõ6}¦õ1f€…Ì d}Í$3‰¥›ÝÍîì,3ÅLaýÌfÖßL3ÓØ³·bÍt³;Û``CÌ 3ƒe™g›g³¡æ`s0Ë6³Ì,6ÌÌ6 ØpsŒYÈÎ5ÇšÓØXsº9]dÎ4g²éæls6›aÎ1ç°™f±YÌf™óÌyl¶Yb–°‹Íùæ|6Ç\`.`sÍ2³Œ›f%»Ä¬6«Y‰YcÖ°ËÌZ³–Í'ÆGó•]óçrÌGË[„yt9æÄåµÀ7#m\XeÃÕ€Õ6¬#ªÈ@z`#` Ê`î]¾ °°Ðxð àyÀË€7ïþøeîAú9àkuŽ-jUçÙ"ÌÛË;P‡àÝ‘y|E ¨ºPˆ«^†t%à*êI£iMÑüõÎ2º’VÓÚ„{ÕVz”ž¡—è-ú¡ÌÁ|,…¥ÿ/ò¾(ªíÌóô›¿Bä!ly<Â3‡tÁÜc¾lîGÍ€ù&Òmó0èQóýO„Oj?1PоEûCCn…ûÂqÿ sÃæBÉæ"–ÍEæâfä`xF>‹ù:ÉPþæ%‹ÍËn¥Ei!ŸÇ¼Ü$9‰ƒ˜wÿ1ñ“÷…9*ø=ޤ •ÄÊæºÄ}úèb4r[-«¡Úõ¡~zýZn3¸ÇD‹í¨{ú¶¸'ūȧ}†U÷Œ˜mkr?Ÿ7äÖ1÷œxå´%rëU–¢o®-ÙÝ"z­÷ HÛê^m'Q?duzŽÚÒܧEbËt;‘ǹ½hãv¯Š“6ѽ.NÛ¬h9b¶s¾…o5ºƒh“Ã,ê•箃RÍ>w—Øe+F~ÑV꾈¼ÂÝ+öÚxÆ32Ü}°žà¾ÊrJŸu.ÃßcâŒuÄz]|j;ß'&ÙºÛ“ÅFÛ%Œ2FÄ9æo·™^c˜‹ëbjHBkû%¼ŽÖÛ®´§ùžVÛ3ÅE[q{lØå_f`ÿUÛµöï?jïÿ&ë aÈßj@$ɦÌŸÌZž¤£ø­Öéö%?u½€¨5í.òó¶8HòÜ^Âæ‚—èe1Ã~Ó–ìo²ßv8©° àí†u÷ ßm=Mý6%ZìÃ’—!ùhˆ¦k0d¶N³í÷鸆1w*´žh-NÛ§<1Ðý1ÚôcN—³œib•}¢ã„¨´?é8-¶€v2ÚËèúÇfÊê.:vÎjñ¤Àsf<éðœFÏMh4Ó~CÌuL;ÆŽ×Jàæ·é.àxÚ ܶ¿ð †iŒ ŒÚr<¾aÇ\Gæ‘цU{‹÷/;zÅ*Ǫ#˜€õ¼)ù]“Ol<èçèÛ'Ž9Ö]Ï ¨W^؇ùWP>p³ýn`ÅÉu\ûìaí~gê%ò«Å¾o5z9xõ´{È?ïXôÆaÜ>o2<Ÿ÷¦!b4Ñ8fOñfB¯1Jz=YXÅ‹ÆO Þøž3jŽ½é¶­Û“ï{lî)„W/xJ`ùž21h_ñTúnÚ×<‡`¥O™?vÓÁ'=GU£e.Ý5ü¢¡Ëcb5 þ ´löŸuO<ù¹ç”ÿ¼Cé±û»i¤ò_r$9›|ŽTGL²7xt‡²çCòn‡ÒÅ‘á9‡–íwÅuG¶›ø¯aÄ ˜)§§Ç÷ܑ빌®×Ó5uØ€WÜô øoXƒtWÅ”+6: »’E¶yxrŒµÏ žüQ躵чÒþ»]k\t-øï9ÔžÛþ¶&ÏMÿCXcØÿ|ÔþYDÎaÿ3D DBë•Óáõæ3¡/ æ8Ï{ó‚yÎnï¾à>ç%oq°ØyÅ[,u^óV+œ7¬Î@™ó–—òÎ;^!(8ïzkƒµ†qÏ 1×yÏkœÜ‹Á£X×Wp…€ýº˜¼GA_¥ëÝ™Œ¹v>ô6uZ¬Ç _ þã…ùmõ t~Aßóž 6YǼVćq¯;Øê|ä!Õ,¤:é|©¬ÎyošC ƒÞ³â:Ý‚nô̓ˆ¨Øm1ÖyøU7è1øhêWâÚt‹ÁÿØ3šíŽEìVWíç¼Éb—L»Ç÷íÃÔ÷ì ÞK4PÚ::|®øVœKÞkAÑ–Ciëuï5Qm×yoÈþ‰¾aÚzÚÛCŽëØséܯй ^£«#¤…ÞþÂ5Üy‘®\f½Ðêx*æºb¼wà3ëдϑÝ~Ã?oíó û—嘋%ëa\Aå:ªà ˈ?j?çÀÕ ÿÖŽ‡ú¼g”å÷ѦÆ3áí¨òLbh{äuÈlg=SÇRо ³3ãyLs¬¾ ‡ÅM)†—ž'¾5êK¨gcÑíP±\EsQíè2Æù ðL5Õöq[;’:HR8â¸hml*wôbEcMu¤[sô9.LÖ9ÇÅck°äc1Ûב{Â~·£®#^väŠ-ŽÃXénûätÓùWih°öµß4Ó8hv\Dƒ½Î,ä´@’iŒÞº*·IžSŽ«EÐW§»ãº¡££þØ9GM‡:à1¬z<~Þ4\÷lMØ%sƒå€-¹£*pÎ1Ôq8pÁ¡ì(òw;F:j`½±Žº@rKà²ÕÒш(ÑÛÑâ[A„ ˆsŽqO ÐÏöˆ5äk¥“8“qõ¾†(1…ufsœ™®©N%v:wg½ïLý½#è·7àl?½žïÌ tg6£smM”¦;fgamÚh½?Í:º™F¶Î"ëŒk­“PõŒ¶Ý£÷ Îzµoã=žN5Ö 4ÛS0ÖŠm–ÊC×Hg¹ã:d¨ræÑzç¾pýaV_Ãè:JÚì\ÇTô~!pÈ–ƒö Îb´±Ø_`ÏZ¡º`ŸÝÙÈhD`ÊÁ:ä\ L9KA·8+ ]'X} ­ï<Íh'ksÈÉ{ÎuzBÇ 8èä;†=Zèë :k;Æ‘ça^aûévOg—u{îF—3z”ÑÝfKë˜Äž>Øx-’¶?† óœêÉö~ÈÜë<Ú¡ììcôaF_EûiÄØ&[kçuCWÇtg®³ô ­ïržt(;¯ÿ=ÂÚ9“;f0ïņéÎqøÿL礵Å0Ù9AÏ0ú)¥*È\Ö9/- ¤3ºŽÒ4&Ëtç"½>Á5¤ª#É?‹}̓kkGRçKû½Ä5ÌS±Å0ä¼Ò¹Šuô´s×Oh{›ˆ9ÚL³ë›(öÁOFé5Md;Úhsr61GéÎIF'VJ\ÕwÌÓœîŽE±Å)v¼DT|Ú±êŸwžíXÕgìg®ïk1ÃÕì‹ ¾¢ã_³q‹è¸gb¤»izï\DïÏ$PIΤ0IŠ6$9“Ò"!éò™,z|&+¤½sgvMãí ?§;ÈÝAÎäÓš3…t žIwµÙZÏ”HÜú˜œ§| gÊ\_zÀz:zbà:ç;sÈZ‡ëœa×_Öô,‚Ýõ»z|ª3G\—}ùgLÒ3f7é©»wÝö:Ó&=µ=Ñ¡çèÕyØÕï+ Œº|%W]m¾²3 ®›¾Ê3Íô?Z°_’ˆ_rìW‡1qUq&²ýÒ0‹ýÒpû¥anœ=ÎC>ˆóÅý ¢f¿"Ô°_Ö&~!±ˆÔ%.&.‘£ì—³ß9ÇÅ$—|™“oLÒDü¤„ü R¹Hþ©'ýäß#@2“›ä±‘ò1'?'ÇÈ3ò·ä»ä’%â «äW¤CÁ) È?Wt)Γ[Š^ÅÏÉPüB1G~Óómò1×b¾O~s7æÇŠm1“1?SÄÇ,Äüâ³1«Û·)þ`{îöw{•]Ê»Šw•cÊ+LÊŸ(¢°((ªøHùßb•Š?ŽÝ©ø×±»c³×b÷Äúñ¾ø³Üöø?‰ïævÄ/þ2·3þ߯ßävÅÿ0~‚{?þgñ³ÜWã¿Ê}-þÒ¸oÒ¿4q‰É‰Ÿá‚‰©‰;¹³‰ÿ#q;Ÿt*é ×›ô;8î/wìÚ±‹ûÙŽÝ;örvì(àþjÇw|‘{B°K{RšM¯¥éú€«Àu’©éÓ\Õ\× j†4#š1PãšIÍ´fFóT3§YÔ¼D¹ªYç9>ŽOæÓøL>‡Ï£¿ýcsKâ4qÂÅ qûd*·ÛGWÊ•WÆ•Žûûlãª8 ‰aïs)9=§'±\=WOâ8#g!ñÜÇÜÇd×Ä'Éì}®îÛÜ·Ég9gOç&Ÿcïs턽sI†ò§ÊŸÒçýd†Š--'Gc¿{˜|#ö£Ø£äãØ†Ø¬éÃJ¢VV‘íÌgˆfF€1R®y¦™×,i–5¯4¯ùÍ+>OáÓù,^¥YæóùB¾„/ã+ùC¼ùÀÄ7ðÍ| ÉÎ{øŽ¿À÷ ¿Ì÷󨻉ºÛü0ïÑÌjò£š‡H@?BþPsKsGsWsþ1î»q6ökÓ„MÖr!•ÿŠ´Ÿü ’«þoÉ’¤ÒØÚØZr ¶>¶ž”Å6Ç6“ƒD‘´²ƒýÇR@b ©KÒˆÂðe&zXßV\g˜cH6,2P:Íð².Ó°ÊŽs ëuyFŽÕï3ÆÕ“Y==Oëävr?™.5¦…yÓzÚ—‚ò’iÊ[¦+Œ™ ô<-é8ò9¼1‡—ûQšŽGKÆ$}èØµ( ‘–Ñü¶’)R¶H¼©o4¨®GyÌ.­Æ}aÝe¹¨,ô<µlWa 4aÌHÐ~2¨.2dÙ¨Íh?Êó$Æ”m#9‡”‡¤ce‚±x“k¥’ž—ÛË%=g5–†m+ó¦¥[’Ò¢±‚•g|Øîr)Mé|Ê¥,#µÕ‰êpÞ(üZY7¹ì6ÖÖ]2ê®n’3R—hY…(;Èef„lTÙ~ѾÐAGúlœ¤ƒl?Z'ó¸flÚ4†\&¿AYßä(ýåcê?”–ûa,ƒ2T]†ÛÜ0¶ÖÝ2ž¬{e¼U÷ÚxçvÙªtÿ†çßÖî·§I²¯lç̨ùú´Ò½qlH éý¦2l—([RCvz[žwa‹2RHß§å£57îÝu÷Œ"£åRŽÉòú|`<>÷ÐxžKý^Ž×ŒÝu³ÆKa›Åmø+Ÿ¯„u¤íç×ê–ÐfÙx#¼Î¥>õ1Æ»õ Æ{Œì“(ëSŒ(útãð¿Ê¥ëêóÏ곌˜ LÆ"Ó¨Amºo(7Mиn¨2M±ºÃ¦Ç†ÓÖ®1‘ÆËè9† à]õ_ßo:ÂüÞ²1FxÎMÏ©a[¿Í÷š¢Öv´OEÇ«è¸$ÙˆÊdh1-È1ÄpÂôÂpÚ´bpšÖ¶’ÇŒŽÇ²ßlµ?EÕ׫Œ³ÌÎ…ÆùúãRä>U_f\®¯4¾ª?d|½‰—¼Ïõ:SLýS£M¦¶çÊù4˜ÒYÙlʪo3©êO™ò™þo@½ÝTH!û]½ÇTÂÊ€©,r/­?gª¬¿`:¹÷Ô÷˜t¬¼ °#›ßȽ=/äõ&Õ—éxÓÔPÛÔÌú ›Ú"íU?j:Ußd¯Ÿ0yê§LúǦsõOLꟛzêL—ë_˜úëWLõk¦›¿ ·Úûä=%2¿©Œö¯h~r=ÝÇš"üm«¸ïÞ‚¿åëyÈk>.—h;ê‹ÙÒþ\±QrCó-—a¼MÏ7ÄÚM¾YÊë&9jEï±”éQ†÷ý¨˜´©|“¼µQöŒ/¼WFï«ÑåɈxYÊs"Çë}!{Çú·¼Þ ^3¡ëÀ4+ ]æ$1Ýf¸hN¥_‡ËüdÞT¾^sFx Óq"¯åõ'_KýYüÆ>aè3g‡×=­Çº£ë/’Ÿáª9wËko‰¯áº¹`Ó:ŒŠQr,2 š‹6]Ñs4&™Õuqæòºds•aÄ|˜ÑûÌ5uy溺 ³Å0fndÇ8_Ç›[Øyœ3Lš¬mX)ñ`tŽùk3n>Mïâãþ4î_’ø%öŸ«þ>ñï ý¯­y¿ßç+Û·‘_±ç(³ç(Ç”cÊŸ(zØ”Kì ÊUöeš=Aùköåoâ} i\{.2Þ‹üwö\䝨s‘¿fÏEþŽ>Ù–IŸ‹l˧ÏE¶}>ÙVDŸ‹lûîh¯‘OÔ9¬®PójA]«6¨ª÷©›Ô­ê“j+r7hN-ªÏªÏ«»Õ—Ôqêbõœ¹¦¾¡NfépGƒü.Ò=õõCõ#urI@=«~¦žW/©Ó–Õ¯Ô¯ÿ0FÉRŽ:£ÐTÌ8Ò£L†R´-VçÐ'qfúþdÔ½­3ÒA|¸«D:ÀîsËÈOÉ4îd!}Yñ_¤"f*æg¤’>¯BO1‘†}sˆJ’ ã…4/–t—5wGè|S}oAÏHwЪI}—ÉHŸüíd¿H$ðž<ö½ö|Ôúÿy÷!ÅBòÙN¾DŠq½Ÿ”’xÈÄ“äR29Œô" ¥ÒgI ù$ý:9BÒàs&’Îþãf&±#í"^¤,""í&“HÙÐýgäóŠdE2ÙÃÞõnèZýp[qõÃò—Õªg«ŸU\¨ž¯^Ú?ñáXõRõrõ«ê×Õ„˜êe!AHÙoRÊç„t!«¢MP¡.¿B§Î-_,_ …’ýýBÍÕJ5©Ð •¡ýýmåãj"èªç+<4 GªV?LÕÏ×ð'áø°ôa]ùúþ ÁN¹ÈIMBiÿ‚Ѐžž 6ƒò}N¸ðAsEèg Ï„f¡ ýc Ï#: K=ÕË/…Ê )f?ì­hC¯ B z^(DëËBõ£ ÅþðY„›Õ³êÜêYá¶0\ý¬|‘r㵚0 ½Î Â(ã~_˜Øo*R 5F“0%<¦|åQGBx‚r \¡G°ÓD-!<>ÊBF¡í^+pMKdnB‚VIÇß46 MÒ¦ é°>´…” dÐÖ­˜\¿ žiû6É¿ Ú¾ýûûµWµ×µƒÚ¡°¾تžÖiG6$ߤêµct–C 2Ð1Âò?*_òµÙä¹ðJã:[ýH[°A[¤UWœÒ–WÏk«´‡µ5û'ª—˜Ÿm]õk­­µ-=B@{‚Íášö´ÖI-©õjƒðx.æPÛ¥½ï0i{…Jý)½]ïÑôçôô=úËúþý•úJÁS=¯`³‰ô7õ·)´]ú¡,ÔƒžÓÐÀ|'lÍ儞òi:ãs*ÄÀ·z°î€ê[úQý}Æ{B?UqªüåþSÌW/ §hj›òEuîþJ$“î†î–L³T©»ß)Dy¸ýÉþš>üpP÷@÷P÷H7«{¦ÎÕÍÃ>•º%ݲîÕ‡ãŽë^ áùþþ/ŸÔq:}ÌÁ|}‚>EתO×g±N©sõ*¬ÎQ}>|cè ¿ÌUTjO³õ„‘õ%ú2íEØÎòå“å“úJý!½NXÓ©~­7ÑYÒ7%T“ò—˜Áqí¤vZ;#˜ V ö)0§ÑB3áòÁ@Ø^—µ/µ«Úuª}Å…òuÙîÕK:.T %º8]².M—IW‘\w°¼×t9º¼"¯nŸ®¸ú•Z[ÛÚ ®cVmÄ…ð¼Ä ¶Q°u¯«xP䥾£«Õ˜I4ó¢°£º&íi]«¶JwRgÕ¹u¢î¬ì݈¨:´=Z™ºnDWÍPìÐqºKº+ºkåãÕóðþåý=OÑh«Œyx¬¢oÖ·éŸ ‡h<„ŒË˜û}ÚªŠËB>¢ó:t"BåþþP4¦ó£_.ëUtæ…JŒž¯¡_ѯ …5¤FY“T“*T~РíªÉ¨É®ÉL55E5êšòšªšÃû+kjjêj,5ÕË=˜­s³jkZ¨M¨Ü5ÎP¤¤ŒY¯9Qsší…üOè ª•œbÏÌéÿ'…v¢Ò O#9‘¼HHA¤®ÂÉ‹H½HH}H]HW‘®#ѺA¤!¤¤:¤1¤ñÂqúß-ã>ŽkdÿÅó+ä«°k5ö6¢ÇÕ’ü¬—;ƒ|Ž(’’–™Dìo]†ˆ¢¼åʪmŬ3 I ô0&“Rý40#ÕIucQýdú©TÊõÓ&#èñzN¤TÎDœ“±(à5$•2"õ‘KYÆh~[É)[$ÞÔ7T×—Ò˜«ºËrIçŸFÉèñÇ"0Y¶9©ß¤4¦l›éˆzyÇ"t\²£\NG´—Kœ+ã"lyN–eYœT&GÈ05ö4Ÿr)ûx¨,KÛ¢ÿÈM:–e9@Þf97é-k´¢Ëè1£ç"‘>+ë ÛonƒGÙ¾Ok+ý£eˆ.ŸF̃<¾\]JmÊŠR@Î~Š]þ)eûÊ囿ë-eXï·”Ñ6–íô¶rÓúŠ.§·_æ_q ¼vÊx@h!¢]„/—ÕF´1„ø3¿—âuÙQ )Âf‘¾Aç¿õÀ¦uXv°î»Ë¾rè>^‹á5yI’åÊͱfä@8Ö•Ý®…胀à2ЀÅõƒRÝMà¶46‰«[Ì¡¬Ct=Æ:˜Ò-r ùüÁá›bàÛ|-:Þ~Z¼Ú*.‡d:8ºQð>0LEØêMqHÖu«ý)ª¾ì†dgŠ;ÀÝ›ö©²{Ààa¯¹ ”=f%úYhnÂùÌKå° ¼’ôÊ^‡ ûÝÁ©L8°i/=˜¤Ø§fI¥J²c~„î2`«ƒ…!}©ŽK€2©_åf{<è€#€ hš6à`<@à7ðÈ=åÓâòoêor)¯­7í=o*#ccäZ.å9S9ó¼mü·ÅÞ­ì½~¶ÚÿßVFÄ¢-Ëßf~"ù¾aÏÜrü­Êéˆñ#ìn”牮ǡupð ð8'a!„ðõªÜ_æM}ùÅ5<~`óõ±¼þäkc©?ßtŸ8¸²![{é¡õÉïàÚ­¯½%¾åäÀæu£äXT®<°ùšh:´ŽË“6ô+Oð ©]yF”ŸHö.ÏݰexÞ"×m“}`¾÷ľ²@þéÜk*.ÒÿÂO’ÉôÃ&cÀ80 L3ÀS`X”Ž_«Àzèø}NB\¨ÍûÉ@Z2#ÚäyÀ> Xê_ THõü切8*ÉÑ´†Æb8ù)°’Êg· XÐUpñwAï;Vš .F¤>™z§»àjÁõwÎK篃ïÔ  ½—KsZJÔHè-¯²v´ïXÁõ‚ñ‚q´˜ŒHô ©¿þ¦/û²H û¦È°o‡¤³o‡¼Ã¾’ž²›½ã›ÃÞñý"ûFÈ—Ø×AJØwAö³ï‚¨ÙAJÙA°o|ø{O¡HU„Þš!ïò|é½Õ(¬K¨ •ùð›|øV~ràWùð«ü œ„<©Ü·Á‹µÅÜç—†Àê«6@Ï©¼ï¿wñ½Þ¨Ô÷k5Ÿ^¿E¢_doröå˜Ð7c¶³7¹Ø›Ü;Ø7c2Øwb²Øbv³oÃä°oÀ¨Ø×_òØ_òÙW^¾À¾ïRðÿŒ¯‚ ’¡¿íî!úwgwÓôî³Ý¦wçß]zwùÝ%vüŠ– ¯wçÅä%H­†óRh=Myé´.O…”JïÎÒ$sÌËÇ0?–¿q’ùì61 h3@ûÑúÐÈ»‡é“CŽÚXÉõs°þcî/I6÷Ÿ¹y²WéP:ˆ†FOÂ'þ(qŒ|…}±&H•¾³'Ü?ý¯¡ÿ7B¶swÁ+“õÉB‹t–KöØUHô«O4§_3"¥¤"¢EI͘Θޕ­:©²îÊÞ•»«`W RÆ®¢Œ§»Ô@ù®ª]‡Kô \îûÜ÷1ö¸ æ‡Ü ÇÝæn“mÜŸsÉþ#¤Ù8¦M$û ’˜øŸ _ VÜ9Åöìîù,h«jS­©Ní%2Xߢ½U”'ƒi¯¨ ²É€lo®$ãŠêÂÞ‚½W­*Û[Žñî³±zŸ$I®aI¦òûyŽagköTÎÑ0ÏœóÙ·³×(rø¥9üž©0J7RHÆì!sjÑϽ§ŸÒ{†÷ ääíÑálVH>*›$W)FÀY »$xSyVrÎBÎûb‚Ê=ÒíZ÷ôä4å´b4ôÍ^'Ð{.ãÈšC¿«’Äý)‡Í}û‰çþŒû3’oŽ7ÃâàÇãÃÚâO’äøïÆ—|Ž}õ,-q%q…ìL\M\%ì»fïüV1ÎÔ'Y”S±ß˜XØ» åRäcßÏ%nöÆ‚ŠhWLZè×yÂíˆFÿÍ!±ñÙhÙl4úÍÝ8æé„yz ót%óôXæéñÌÓ˜§'ÂÓídãDu L‡íL‡w™<½’Ü7ÙØ{Y]€I­ cu%¹#Û0©äÿðv6àUT×Þß3söœ“dBÂIÔ4ò‘„H#¢¤jDŒˆ#M5¥ˆˆˆ)" r¹¾ˆŠ¥h# E‹HA-*"""µ¨ˆV­¢* ò%E@@ Ö¢$ïZ¿=ÆpûöíǽÏ}æ9ÿùŸµ×¬½÷Úk¯Ùó‘“‘±L=ë¿ã{õzÁßíuˆ%ƒ%K>–,¥°¡ÿÙþm¨% ûÍþ®/|þç—zÃC[ú8.öÅÈF™ojâQlª74öEïXöïŒÒ?÷¿×îfY“v;Ù³æÁ&±çd#âQl*›â7²ÿ©1ügFá¿3Êÿ/_xf©yƒUA¡þúx~ÿÆÏù•²æ÷Ë_#8X¾Õ :^)¥•ù#dœ?†ïÊ+ãm¢l•ù·ÅŸÊ&S²UòùÆÞ7–šÚÁ^KÆSÿ0÷]û’qYÆeÒç‘e×ehüÓç&³˜ŒŸlæ ”ÏÃæ‚¼¹²ÎoÜÏmÜæç-läKdL/Nß•©[ÍéÅ|¾ùî,-dÿ­……–œ±y‘“¤«åórzHúå¼góžUL¿¬QžqEư·‡é½ò9d.HïO‘þ:ÏÏKå5ËËÔ}a^Q^1¼$¯³ ŸW–×CdEyy•Âûå `,š…yÃd+‹7=&ÕhqDÞ°0o¼è¨µTliblgpú )SIŠ£õSAI =œ1æ_8ø²þ_Ovuó°X?ßëì•™•ò}æQÒö^'²ðÍGI[ymÉåµGIó½B3Q¾8Jšéåòw–åGIš*ùÞ¡‰Ô7_°ÎÎo”}Û·<ÃÓþ\žh<ä?,™íÿYY/ðÈ‘‹üEâ›eþ2“ß¼hRþËâ¡ ÿ-äŸwüwM¶¿Î_grü÷ý÷M®¿Áß`šû›ýÍbs›¿MrγYÏJÎyNVåÇȪü‰ ]Ûß Þ Þû7üî&|j>½ ¿'æÒw¯È“þzßüŸÒvÈ ¼VòmÿQ²\Okßt”,å5“o«Ž’©‡=é&2󥩗osŽ’í¯{r.j*Ûiör6j*ÛlvÈ·!GÉÜß™ö;J¶†Øê~”lÕQç'[a^i2Öí¸FÓq5ädœ¬Ù¸–3ÞQ^Íþ7^ÚD> >¸ ØÄów6ñüÝßòXçž&ÇÞÓĦãW5jŽk_ÚðV§^GºÞ´ÿV[Úï®A f+«½ÌFéQù&ª7&;a.È6Ùav$ŸtvAv+AÝ·•ï²Ke+È>]°{öY"ï-[Zä}³«DC·Úxß–ãšn­D/-Ç†Ù£ÄÆ8Ù«N—v—Ï„ìK(sGëç¶ÒìA‚ƒ²‡6Y7ü³×3ͼ*z8JúmÒ™òÉmò‘ë´ø-ÝF>!éN±\õæü—ÏÃñ~AÌ˧‹|ºÉ§Ü}Ïa.ÈœÔ|só~‚;šïi~ ù—²íi^ŸNdNÒ-Ù¼^÷¹½›oNç6ß‘ÎM›Îíº¥3ÓmÒmÐËu›;ê‹éöjQ{éNjK-}k'ÝEì&šoΪÞ"«$³6sVº…à¤ÌÚÿ±Ï?{6ÛJ¶ˆx—Ød•Êçtùt÷ú9K>½ã}߸LõªâÏ%âÏ YÅÒÉY³Ê²zdUÈV™Õ/sræÝ„W²¯­Î²g Ȫá»l²ï'ºZ^ã¶ø¨o-ŽhjOmÅ–¾±S–U,šÅj+s\f]f]Öà¬a²ŸY÷o^Ÿü[‘›#s3Wòs®Df®Dh®Dn®Dn®Dn®Dn®Dnn—X¯|d5˜[-Y%åJÞÌ.Ÿ‘qÙXùHÔæ–ÇùÞy‚¹ ¹:§¸Ù Á’œ2ÙzÈV–³9§2¹Z·œ~9ì{äç 959ø®Ûˆœa9Ã(à¶ø¨£-–‰öÔ–¾µS&ß*åÓCøàÔ¨äâäÖœÁ‚«“‹ÿ×#Wÿïá&+½Þ ëGÙþÍöΪï1zšƒW5”}““ƒIað¡ŽíŽäd°ZåÉåÆKL°›$3ï õ,v8Xk<»)”«äD¡Ê3:;—l‘è#’­ám#­Ñcô ·CQ4$ÿ{•œvÔT®LRI0éÈÕQLLP‰¿ÍÊR‡`â ä{“µõsE>®AÎæAE¯¤a¸®Â]ŠÉùà HªÀ:PÛ¿)Ôw/÷‡?VL®AóV=C…›g„z%×9™B^‹ŽâÐX½>5Z*ú?FÂ}»‰k[áÍoB6ˆ…¸®õ zû0GÖ™ÃÚ ákµ´¾Øäê·^Æ­!O-׈ýŒÄ Ô¸T<óx²Bp8=”‘ö_÷‚T¯£¯$¡ëÐï)§Ã‹U?LÇ|Iåþ‰–ÂH{¼?'NþGMS´£áCÁYà“Šá@ì|­n¦Æ*O„Èw¡Ù^@]EðIhž™hO u¦|®¼£˜@â_ Ÿ¼¯ÿÍè¬(šã½E`˜òd&6ìõŸæ—YJuÎzz´)8^[®×9Þf_ýP¯/óÒóK•û³á·½5à{ÁUâÏרÄk‰üKEÉ*úL‡•CÁ”®Ijåþ|ø•à4WÃçÕ`GO²¥ß—öt»ÑÚ\ÿ§˜ô(±H¾ÅI´ R»êô«‘ïçØCH>VlØŸè,^ícG.Ò¹\͈\Gk‡Â§Áç*ŠÎb^4o*úó8ª’B- v¢3&–,!’—¨—ЌܢhGÃËП À øp-M‡ÎTð$,LÃZ=™ª¶EŠf 6_¢Íã]\áç+§ Ocyö§¢sGuu}{+6lÕ¾?›<lÃçdoÍÿEʽ–”ÎÓR¿¾¾œŒ~m,WýCHJÁ 0]_óÍÕ”ê9åô‹±PÌQ»ÀëÑ©ÏݵãK þ·™GzGQFú*Á»°³·~©öMœSF*·Ô"úª9Ió³\K˸ËLà즘h ¿æ°Ä¯EóR= xü®Êýþ⥧ý‰àÓàv¼±Ep;q•íKò=fSp&Qw~b·žïÛDr¿Zа_ ß©èB²É$°¿b¢y1’¥à[àÕŠ¶=:¿‚çÃÁÇas%’>èÏG*šÃ ½«¹ ¼]Ñ+€ÏQ”V)ß>¤ÖêhI*¶ ,û¥ðð pòé`-8ù@Ž5qíÊi§Ù> îug€SÀŠ ƒàCÀîj'è‚eÆË{ºÖÐÓµø¡—³ÖÀ\b\×3¿So4,Ò~{E®™d‰¢¬CT²”Òå`ò:p³b¢:ýÁ"0w¢?­Ø\ÅQ‡Àðt&£?¯’«½Î‰·…´Ãáõ‚E6W#_ãdzʽ|ÛJ0ËFʺŽÜê½”÷­®Iv…Þ«ìZ«þñ{Ò—ž‰¿(êQ‚j¡„ºêœ}Úó Xs-­RM9›ciÏ<Ú6O{$¼„œO_´.Y3Œ„ÏÒöH“ø1?ÔÑçÉË.£ kÌé ¶6Ã<^§y¬á 9öòjždS±PÏÙ¬CrXÑ+q\×ó²š]ª¥Ê½‡nÅÎQ%\ Ô±z¯Óu¯ fÚb•ûÕèÂæ@tê5‹å™ÍW;‚ÃÉ¥—èQh¢–•ðûÀ•Ôxx›iá~J¯wÈQ×Sº‘º6Òþ-hnq6uî tíÄ?‡$.Õ5ü*ŽZ¥r)íïAO#ïGæ«ÄÕŽq³Ÿ£ ÷Àz¦á5Áü†w[!ÉGÒªá+Yÿ¯P‰¯¸TÑç>›Ÿ¢UÜõ”>ª¤^âΞ”r¿ÒŸ®qgjJop=rçVøŠâq™Ë g+J]Ê ÅšÖ;¼¡(ùê5m¹ŒK&œ³¿¶Ü‚Î2°.æ®Íš1¦€;ÀwÀ9àjßd¸ÊÐ3¦¹Ýãº59˜lƒÉ„ÆeÞê9Y% {U"™AgSARßZyÏ5’ÈHaž/dtˆj2CŽßSç¬ÌÍ:ÍÕîz9¾ªu3E}5 ïUÄ>œ¡ëUx6ØÜŽ·wÁ'»X­ú²ÞÐÒ ãÑœaâ{ÝÞƒHx‹Ç»Øé‹ ©KÑ;Ö)šÃðGÀ•èƒó‘”À³Ážàvä»àËÁÉà^Å ?¥¯‚7€RË~tº!©ë)]Ö"©¢åUŒx•Fˆ×~!üB 鵋|=¯ŒW#Pû»˜Xýšu×YX{ ,ï0Ï`¾«f7äo€¯‚¸&šÇpf? ÌÏËX'ÜAVP¦5˜¯^ô,\‰æÓŠGÎo g6Ü·ƒÀ§A]µÚX>Ô¬kê?ƒ¿ NPk¬uÍ‘/)^ÿž•³ù‘zv®ßf ~¦(þ(ø:qÛ îî|ÞH ޾qUÌiOpþ,ñ¿þòOáo‚¿5S®þL‚ö«ö¨}“O-ŸÃMbH_ÒÇú­I‘#Û“Ý´åzî ÷@Ârpø8 ÔÕQ}ië{ùÏÀÀ³Á›8ÿÎ_”³À€TÁWÛîŠ>˜0àhä*&ïTôÐ÷‘¤ÐI¶Lq¿ýÝ”^ .P Û-p,$Ö!y Ë›à=álޤ>ý1`=uE`¥Ðü<t–/EŸÒ ÉW”vBò ’OáÁ³ÑÏÇ>¸^ÌG ™Öbí"–'†‚®×ùàëH¦€ƒÀö`XÒÇÄմĵíLz÷ Hiʵÿ)J¯¯ ÞðJ–[±V†äFÅLÆ(ƒñJ ‘³°v:"ï…|Ç>ŒõàmHð¿e,üý[@éCX8Ò%X@n»ÀçÀ«Á`)r"¤áRCA‰CÿFð"ó2½Gäý6ÌÑøÔÈ·¯*&¶)†]}0Á½ÁÄhä*&ïTôÐ÷‘H„Ï$ÂgÛ35båɖβòÄngM¹1: ô-«èû‰uH^£ÞMðžp 6GRþ°žF`¥Ðü<t–/EŸÒ ÉW”vBò ’OáÁ³ÑÏÇ>Höðgƒ#Lk±vHËCA×ë|ðu$SÀA`{° ¬écâjZâÚv&½{¤4åÚÿ¥×ÀWPo x%H˲\¢ Én4µMà:ÆÈ(zn4UÌ3ñÔcƒYX¸‹º:"7NÞ Ôõ0õ®oCÂxYÆÎç>v²€Ò‡°v¥K°€Üvs¯ÛVƒ;ÀRäÄUÃ¥z-ÜpqƒÄyCΪÕ_ ¸ ¼V1h¡è¾»"¿|EÑ ï!I Ü…Üé_Gip8ù~8üáàvŽîƒ)$sà߇woDrXþ˜ÍÇAäÞ­ð#”‡ä’Cðup¬ùI°;è×£s!x’óÀÓ±vØÉ© ëo&x’^`)˜v‹ÀÓÐüx?Ö6‚ô:aÑù€Ògà›)m¼ÒÏán¼^P´n\£Dg°'šobáUðä'"ç(ÿ]ðjðlðYð9tÆqÔ$ýámá(uòûàktå#qUC\).»‚¬‹Œ“T”(ª!ÞT2þgtÚ7|¡÷]Y7.%V¿dõÈÛ8‰dÅðÞ}ɬw á*8¨ ôa°k¯€Ëy’5”£ª¯WHFrm» =À.*IræµÝuA5šÍ¨Å½aò޶?É5uëÿw½Æuq…¢í®˜ÁEÈ¿ä9Ñw?¶¾·®Øý[µUÁ[î¾%u Ë]½XxŸÒîzV) èËZ4ê5Qà®»à2€Ì8-ÝFË—0 {iá%H‡´_|"¥v•b¢8K¯‚ýÉÔø ö»Pï\ô#j°9ÖYл¸rZÁ•õ z­˜—ƒÁ±`i,_‹Ÿ§#™ŸˆßjÁ½ÜyàÙbÀ_‰øÎvý$®úçRï\FG}%nùH®…µzuV)Š']-*y#Ö_K6[‹MÕ#Ñœ ŸKTžÂ'›U3ñ}wý‚…!àýà*qüÏ%6je7‚#é;>'––0.ãñ\ø/°ð²»ºD¿›»'ƒ…z=ІçGqT/-.*â9’!ü6=*ä>ƒ¢¥áz,V;‰=Øß@wÒª)ŠÄ^ê€b’ûá²ØÂxFD0ÉUs8P¹5Èçã·ÕÎ&uÍvWÍÜçÙ¥˜˜ä⇮ /åúæ·u÷@®ñ6‰¼%:3éK¼†1=LO7!™‹dumGÒN‡ƒ…`J—¢9Ÿç뱜À>±$ò'ºlFÛ˜éÁ‰´êZž¢Nçñ\µ¾Ž'­mà_c)í&‘̯ [ žÀóÙÃÓX¨CR¡hvƒ[œ|Ö†ºg»`)O~ó°pùÇàôø¹³®1Öñ”¹HÑæcsz¼rSåñz¬BïB°¾mc…z›5FQlGñ<žÝ£ÆÖJiÛ$ê­S*IôA¾”– ŸåCÎXîvY§ùÇQzxGMF^n÷éùózgÉg-dXÿøÕÈO£Æ“¨e’Z¼×Ÿˆæ0[{á»'ã}yÛ/ïTtÄ«Üà{è/ÇW¯ÀûRÚÞÎzUFJm„ÿ§ó*–ÛÑžÇÝyZþ5nÓôt1:7À÷ba/õnpo ùýÅð]¿Üó}۠팣îÚ½Zº*&a¹Í/Ñ™¯¦®yÎÏ¡¾ITNéxJû2voPš…ÍŽ#ÿ+w'vú˜W\ &‘¯tÈ(ì‡o„Ïw¸˜·7kû•ÛGÁ»]<ë}¿`':-ðírjŸ$?~âf ÇÕ–Ø„ÇoY\®ÑǤjŽÅo·Rzµ,D²äjů¯%þw3w¸† jÜXÓ‹›8ö&ø>ø>Ç96 ÆOiÉ!°Žë¢=IûÃJÅ$ñiWÑžÇSORzòî WLÁHçìÐ’$Þ‡ám®¼\&¡öbZ2ØYÆÂÚ?Åå‡pþGœü‚줼X&îE§«ÕŒ}«>™’œ³W¯ãTÇlS.ãÎÛ`/»U~'J7[ðÉ2µã?ç7}Nt0¼^íÇ™°Lå3­¾áógêÚJYN _×ÓþÕø§rò­5àÉH~…Î\|ò–b¢PÑFò’,° Éñàu.JíAáŸ!Ù ~Žf½3&qXN{ÆQo9¹´œÚ“œì8j߉NEÑQ^ˆo'ƒËU_rÅ8ŽUž¬ÌeÎîß²œk¬›ÝÄ3¸\1ÑàYŠáƒ–hQL>C„Gß/¦ obÿ:ëÚI«¬›eZ{/J—bó¯ð¿âO²bÂÇ#_M/Z8}úûµusvo5h ×`g¼¯¯˜(£µ(]ËQsÜyÍ/âÖ–3úãà*?—º¾vÙÒÙ=©5Þï†Í¯µÏÐé¨5&‰MÔ;†ÈYÍ[¨ëyjÿdÞ%f'1šg ÿ¼½‹"ÇÑùÐÙ§¢‰ÇìÍp¢]¼šÏè«ät$ÌÁp!|46‡À3Á—(ý1G Àç§‚[é×ýÌ—HN?Ï%”Ã=x3,3ý+Á#XXá츙/â¨/à39ª—;(&oÅy>YëÚã²4šw#Ù'‹·µ”3B’³’}Ësm;â¹g«‹¯vDo;¢½ónªÞ§¢FÎ’aüxu½IË_÷`­}Åqg\A]W¢YÆŒ› ÖÆñ_Îèè¼¾Q-d^¢O¸ó ÙþHßøyÊM‚9ðœøI ϦxÒÑp X öãÞÑnø}*¡ú _4¬E2UÏæjÇ¿V18>\ޤ+|¢×|I5¥ýÁ"$Óá|/8œü-ø<ð^°,+°œá$G>г½ß‚…¡”öT‰\Ũþ@°ùÇðÍZê»6¬Sž8¾†Ò°Ë‡‘§xBÝÞžZjàµhÂZ7×B¬õAg)ún69M$ÙèOÆæfÞÝMº6»¾«Äï.ç¹ö,¼Déb7 úÜÖ!¹2ö‰Z+Âò9î©:Çžµ½`Ol>_f;?£ßÉDìLâØ÷œÜhRº˜+²<ôo@þ%òéõHçmg‡Òì‹ä<ÇÝ(ÄS;5½·eÄ•ÿý”þý*ZÕ›Zz×:¢SIkw»ÑÇÈO¡–tC[EJ»Å5ª¼#–—)Ú»_i©ð¶šº–¸˜×·übð4ÿðRÞRh‰µ–¼·°E18–Ҏ𢆻Õç\ÛÈgƒóg"™vs¥` p:¸Í×ñ@·®=à^p0ø1ši9HjiÛ{ànw÷;?rQÎ+àŽÝ@¿*Áà>úø :Ï`ù—È7ƒÃÜŒ†_NœœŽæXg ðÿ_ñÉ[®à•UOÁGQ×zFv‡•ê¢<É< «ÀrÆîb-M’£Âv¼ ¿‡qlE¿ÆÓª‹ˆŠ!h’µBg?|¿kù‘±Ì,Å•®Ín¦s¿(à®ÔlNaÏÖ8‘|Ø–¸mK6k«™Çe°+¹èVìt#?£Ì6$½âÙ§:.)C]~C^n߯fE}Aï„æ8Zû€›Søð w/»‚tï¯y)ýMgý…í¶ñ~ºÑ¿üô2ûþ&s íõ2ߌ÷›Ü>·•Ûç-–ãd\/·/æì¬ºÄ~Ášøûö¸ú>oñ«&¾´ú}“!ÙoÿË¿Ge‡kDymü.A¯Dµiaº™³L¥éo.1ƒÍp3ÊŒ77‹çêÌL3ÇÌ7‹ÌRó¼yżiÖ›Ìv³Ç2_Ë©#J.5ArAòñä3ì&—±"ù;ö‹’ÏÊþqa¿gÿxr9û…ÉçØ?‘|žý¢ä Æ—ý ù¶P´_dÿxr%û…É—Ø?‘|™ý¢äD{aòùö„h¿Êþñä*ö “¯±"¹šý¢äë¢ýDò ù¶H´ÿÈþñä›ì&ßbÿDr ûEÉ·E{Ññˆþ2ù83ñŸòÈ;ô|AòÝØ3kcϬ‹=³>öÌ{RÏ‚äû±>ˆý²!öËÆØ/›b|{䣨#ÇÙ{d Ù{d[ì‘í±G>‰=²#öÈŸðÈÎØ#ŸÆÙ{dwì‘=±G>û™af›‡Í¿둽±GöÅÙ{äóØ#bÄ#‡bü9Ž˜/bÏü%öÌ—±gþJÄŽýóU쟯c¿‰ýR{¤ÁyD IyÎ#)ßy$¨GR ç‘”uI…Î#©¤óH*å<’Êø<ò²yì5›Ä#»ÌsØó½ÌT¦óH*Ëy$9¤²GRÍœGR9ê‘T®óHª¹óH*í<’ÊsIå;¤ŽQ¤ŽuIç<’*p“úŽóLªÐy&u¼FLª…óOªeìŸV±ZÇ~ù®ö4Uû儨/mb¿œû¥­óË¿ì‘=)Ž=Ò.öHûØ#'Åé{¤#)‰=rrì‘N±G¾{¤4öÈ)x¤sì‘Sct‰=rZì‘ÓcœGÊbt=Ò-öÈ™qÄt=ó}"¦G왞±gÊcÏüÀyF[SÛÍhªœ "3B_“³A SlJÅ_¦¯©ŽÞ•Lvꇉ©ÑÚ˜M‹ÖÁú‹l}̦Eï ;½÷c6-ú¦zb6ßWik:™2>f€$Y}Œ™`îˆ66Ö´©±¦kú¨±¦kÚÜXÓ–Æš¶~SS´[ع©³E¶'fÓ¢Ï`çˆloÌþ-ÚÖØ¢í-ú¤±E;[ô§Æíllѧ-ÚÕØ¢}-Úߨ¢Ï ±E2÷½N^'YÀú…²<Ñ?‘s±¬Ü²»° côע£FKV?Á¹Æ÷ÿëÝÈÎkd•ì|˜å7ð d­Ø–#pÔAŽ8„öŸÑüB£Å? Gh´L7ßù[_™ûd]³Ð,3ïÈüùRfNäëy¼.^¯·§ï;'²VŠ­{a/5²—¿aþ…Í„½ÙÈÞjdkÙÛ0]•Fþ;Êým‚3({·Qkm#[ Ä{ÍL¾¿ž#´%wúÚŠ{Ðy¯‰Î±¾¶i†ÿˆæ ÿýFK4² lc#ÛÔÈ>ld5²ÙfXRÖͦHF¯“9Ýt÷emàß/õ½F­÷û¯ŠÖý¾¬üÙò}5ÒÙþ*‘Îö·4ÚÚû"éßå×I¼ÌñÍùþ“é/ôš‘ÿ¤ÉõŸò—˜´¿ÔVVü+ã|‰ý]÷åÆ¿¨ø)xÌLl.ýÀÎNÖŠyþtþR\/OãPÎ:ú?Òeå+yֿϿϴôgù³L+±ñ‚iÍ_~÷ä/¿Ëùå» ¼=¼Í׫…  ú 3ÈÔûPA„=Ñ> [ù^Ø:;Ëζsìƒv¾]`Ù%öû¬ý½}Á¾d_µ¯Û·ìÛv­}ßn´Ûmv§Ýc÷ÛCöKû•mƒ0f…9aó0/<., [I¿‹ÂÂ6aÛ°8lvKÂNaixjxZXžö žÖ„ƒÂ+ÂÑY‹³–d-ü(Œ2£fQ::6*ŒZG'FÅQû¨CTuºGåÑ9ÑyÑQ¿¨*ªŽj¢AÑHµâ·A*Ð%Gë µŒC» ñÅËeNN–üpJpбÁiÁi& n n2Éà–à“ïßj2‚ÛƒÛMfðóàç&+¸3¸ÓD2¿4ÙÁ4Áf2*÷˜™{Mnpp¿iü&øI™<©GL¾ŒÖcæ±Çͱ2jO˜ãdäž42zO›ïÈþÎÊ(>gŽ—‘|Ñ´Ñüƒi¼¼fZ þhZËȾmŠdt×™d„?0md”?4'ÊHo‘löIð‰ùnðið©)v»M;ùÏLû`_°Ïœ||n:H´7%JL‰ín»›“mÛÃt²å¶Ü|ÏžeÏ2¥æ‰^¦³ím{›S%R*M‰–¾æ4‰˜þæt‰šæ ‰œKL™DÏ@ÓU"h°éf‡Ú¡æL;\®hºÛv„ù¾eG™v¬kzÚñv¼)—èš`~ 6Ñœ%Qv³9["m’©h»Íœ#w‡é%Q7Ùœ+‘7Åô–è»Ëœ'Xg*% §šó%§›>3Ì‘3M_‰ÊûÌ…™³L?‰ÎÙæ‡¡sL‰ÒÍE©óM•Dës±Dì"3@¢v‰ù‘]j—šj^óc‰ßÌ¥Ã/™‰ãWÍO$–_7%žß2?•˜~Û ²ïÚwÍeö=ûž,ñ½Ñ\.1þ±"q¾Í\aÿdÿd†ÚÝv·¹Òî³ûÌ0{Ð4Wٿؿ˜áÿ_™«mƒm0µ2ó3™ I3BæC–¹FæDŽ)ó¢¹¹VæFž%óã83:üNø3&l¶4×É\icÆÊLikÆËl)6ÿ)3¦½¹AfMóBý‹¶ 2{:™e•š‰aç°³¹)ìv17Ël*3·„ÝÂnfRØ#ìan ËÃrs[xVx–¹]fX¹CfÙ óópH8ÄLG…£Ì/²žÌzÒLÉz*ë)sgÖÓYO›»döùæ—2CS'³0ÓÜ-3±™™*³1m¦ÉŒ<ÖL—YYhî‰ZE­ÌŒ¨MÔÆüJfh±™)³´½¹WfjsŸÌÖóë¨4*5³¢.QsT•™Ù2{»›d—›9QETa~õŽz›¹QŸ¨™'3ºŸyPfu•yHfvµyXfwù­ÌðAf¾Ìò!摨Væú£2Û÷˜ÑÁ ÁIAiÐ%8ü"¸;øUðëà`^ðÛà©à™à÷Á dÌ7‚5ÁÚàý`c°9ØüIòå{RpОd;¿°}l?[e«md‡Øa¶ÖŽ´cì8{ƒk¶Ú…v±ÄÒïlGû¼]i_±«í›ÁZÙ¯·ì‡v‹ýÄî²{íû…=lëC? ÃÌ0;ø“í´ kÃÓm•°áàðJ»%kY”ˆRQåFùQAÔ"*ŠÚF¢S£3¢3£žÑÙѹÑùÑ…Qÿh@tI40 FH_G‘Ó 9Í#›ùd³€l– kYòUH¦J’©Rdª 2U&™*‹Œ‘‘²ÉHÍÈH9d¤\2Rs2RšŒ”GFÊ'#CF:–Œt©€Œô2R!éxrQ rQKrQ+rQkòLyæòLò̉䙶ä™ï’gŠÉ3íÈ3íÉ3'‘g:g:’gJÈ3'“:‘¾G(%œBèL8• Ð… pà 2@ + àL2@w2À÷É=È=Éåd€Î"œM¨ œCèE8— Л p ’ p> à2@_2À…d€~2÷[›2—û3‹/bW1s/fæ`æþˆ™[Ílý1³õfë¥ÌÖfëO˜­™­?e¶b¶^ÆlÌܼœ¹9„¹yss(sóJææ0ææUÌÍáÌÍ«ÿo{gåúÿñgV & ’ìû6<³X#[È.„j";eƒPaBJª“´ƒ”Š$*¥rœr²F¡:IE²ï’Tò{æQŽs¾}Ï9ß?Îï\ßëú^syæÞžÏÜsߟ÷kîÏ}_3`mÁÚ †µk3Öf¬ÍpX›ôeÚÔ@QþP›¨Tê)¤ÍW°6!úªM•¿¬ÍJŒ æ¦S‹©Ç4£Ú çÌ/_µ9ˆÅLbf0s˜y,‹Ár-iSÒæX›Ò°6ý mÞø®6ÉA×CØT‰1Àî„®†ØXèjŒÝ]M¿cá=lálá#lá3la?l!¶[Ø [€â?ìv 8¿”JXJ%.¥˜K©½K©¤¥T2œ‚#jživšçÝ·ˆ6¯3ù !.@q"Ä,€…ø€8!]ûÁß{µ‚w*l…» R3t'jè[ ò v´ß å¦¡è­ n‡GÅCÚ‡êŸQCp„ÈŽ(86@@w¾bÇ„ð'ñöCÑh1{ÉZŒîÜø9¹`÷‰}6%¨A£kôu¿ Že›–âþ^ö¯©·K©¾o)l4»õÆÆð‰ |"ÇŸ4AC…œ@­Fû£Ð_Oî‹­@”ý}^A¸­™¢UX.•”õ)³¼$‹)Z !7ȅŨâQHQ zbqªXÁÔF"Ð,'p¨¶¬D,_"A Їö€„A€/À€þÖ² ô2chÁ˜®ÃùG'ŒqmbAî9à5ÚAESˆ 2Ñ÷@&ê …D ‘ ÔEªɨžU“w˜ ò.õú wµ% 7:‘ ?;ÃIÀ¹zF†ø3BCH| ž]ÈAàpôõ  ñ!I€bìAÈ6ЛêÇ2 ¥‡…Ò=ÐÒ $»EùµÞ90Ø—èÄð “r05%Vò’( …¬MA²æf(Kµ–²`bùßÒ3^›]ÏM@ÛÚ;8’AùŬDˆi`X€/]j“™”™“ž‰Ž™)‘S‰Ú$*•$Ê.¾#±ï¾#'_zT ·/ÈDÈ,a@1+¨‡d"À[QŽÜqµöëTŸFªÔÔm´3í× Çö°ÜšZÿÌö³3×ÕËS6!F,ƒ”Ñ3:i®"3?’yG©GF~6{[u'q‘ÞŒ¥idÏ"<‰WªCM@7,'$L †@Û€Vàúoy™¢ÿõ¢££¿÷¾ô?°Ì ìþÊ£y@Ü7“(Îß Åö’&¬‰’•†’¸sªÚü݈e ýšñŸ\G|ÛljèSòï{“µ‘bán¦—&ë/zÕꦿ¿_£9VsÄïi‡û­C¹®)ÇøXôK\ß+ÆÉÚ¯zö:8 -z ”*P¸¾þ­Ó”™]må~E¾3Þ´ÈÆ]ÎÐ&ܼ«—cüü”KNkÛkáãGè6¥ˆY9ì§Uª'¯nlŠÍ8ª·ƒ—0ÏqM»Ñ‡¹®+úSY+Mçòå4Ñâ±þõjkõBÍÄi‚ÔP…UFNuö^—ø! šr8÷1Ï`µoÿŒîË!™Ñ}/]]s ñSÉëχä…xdîæòŒŠC0Ö¾ cWøKqi­kr»` _ù=ÆbþXȂҋ¢]^ïã+åèY]2™J&S(ÝEQ—²`âÞÿ}mŽú7ÍÿL¥´|)ÞJ»ncââKƆ£Š•œ õ:v—¢ô¹n¢:¶T¤]0,Òî&:Œj ÛÛÆv¢R¯¨Ml¢]î~ªÙ»:Y1kú1ÇXK•ÛèÓÝ5·nÒ"3„­(µÚW¦‡÷Í Ñ8}Å¥µ'ÔnÉpó•ñ‰–INÚesõ‘+3_ÒÞñœ¶cÍÔã¤{.¾AhYÌk0·'¢f.h¾8æzæ“u;žÙ©sXàË›'±ŒTŸn¯ûòê*—ψHâ%®ÿT*Ww¸ýR,ƒfy.æÚõ·saqJˆ¤Jå–ê L÷ëá¶ó%4Ù½ÊÃj­ê“ÚöülÊ `Êì}Ãk¿i4"´ï µŒV›ÂÏm¦Ø>?É‘°$qwßl<n`Wó£!^œ5×ý~~ ag1 ISWS•êçézi“ˆž>m"ÕÓ“BôÔ‚²ÚZ^Þ &™B¥zúü€ü +„ÝõÚêaá›6§q’ Ë"íA,)fÿ!_†<rbP‡H!É „¸yí@‚˸ö¯!ðߨf|w¤§!*®”ÄŽ3?Ï鵯³åÌsµ}˘döí¨€œ#yÙÜ÷âóNÚÞÊÔýÄûº;ëÝV¹«ÓS…ôvu–<,¯º¥«f¶[ŽßYäå]°Bq¼íõÛªwFüßG±+Œ)ûÀ9ä’žg½Š8;¾]´ØÚ+grׂñë›m¯®››ÐÏ6y6°«o%++ €KiybœuËß±¤f°<âÜcïf«žµ½Óvó y¯«„5[¥^n4,¸|Ĉ¤©ä޾`Ü7ctG²yÀ¬ãrÏÖµ3‘úü¼·5uœNÚ—.ÎŽS[½ÅËLü­ðÖÕzøñë™zçuzåržKõƒ–m˜ÛïÎ.òçIQ…Wk¤ßcΦŽë¨ÂþŒ)5Ä*a4ð¤UàÊßr-Í ‰ª.rAîW.8††Bp€&*Ð/ÐÛ“á+eÉ¥2b`˜A 0 ‰L&éRÈÌÈ_³dvöŸäìŸì*}mèS-~z›””É©(§ µ«Ÿ„65NíørB˜ïõ+=Æ^Ñ,òÈÂËŸLìd;è@§¦+nÃe)ËwŶÖé…wb¬Ã³,8žÏË¿:™Úr1b]üÓÄÎé;SZgëif/JK ^+œ=_Hp™\y¬w^óõ$ÊC"Úlo²ŽpkÄ ä2é…W5ž¯âþr”¡Ü¥áÜ%núð8Ýk¾±ÞÜäpS‘Ðk¶Ð•ù”dhÛ°ÈGšót°É4;¦’ †|Ãú©½wÿc¢×¤™A1'ðÞÄ\³¤Ï®2ŽoèæYØX˜-EüÈípߥ™øÆêñí°þ"Þ|T¡ËëÊÖ®S™&Ù“ÓãcoR$©ú•.§'œd“UÎ2Å2zŽqˆOõØ}8˜×0@(üÁ®nõãÃôL•ðà,ÑbNOü›dhâÍùï(^ñvY—¿¡yn°ÀÍ¥+ i¶NÃãÝóËíLrÈç³™„ÞáÀþ ùjwëTùð¾‡NuÎäPàòÕ96+iUõ¨Ûe uçqZ½¦°GW†¸å!âÝê:±1>!Q`k—æé‡'p%ãÚã v»”×gÓM5ÔŒ„¸uÝ},µz=jólK?ŽQ¨5JÔXY×G×xZ¦ïÏœs¼šNö•Àèâ{éó.ô¡y{ÛÊÁ˜û芶Oj¯$äã>Jzçº/Ä›Wql³ðÝfdwÅdÄn´<*æŽÊ,–@’ìÁ;w½ÍûôÖ‚¯Äç䂃°ú®jŒtlO¦±bཌÙõéϲ¤/óÒ²'ò/§ìåÙN¬ŠÚˆ/™Ž{/¼WîfjËö" ’Æéo ž{¼,=L­¯ùˆ§§×”"¶/fïá+â«Ðvà|rÏdb9 ~ã·pæ·Ø?ÁoP¤‚±5) {1J&ÁY(Ô†²ÿ\¸ÿgôÎÍ *{Õ¹þ¨Ê®꫺ïô¼©=µAÖ¡äa—ˆÜбGçÙ”0@)þaŽçL!Ëc«MŽ^>Iž;âîŒìçX1‹GŸœØß$ÙH‘Ûwf꿘Úç¸þTñ¡~»‚¼Y§†ôf-\­î¥­WLÐùsç‚2üŸ*½0wº’ÒúVÉ\]±8Å~£#O/JíÓö#GÀ}Ó›À3÷<9Q> }bχDŽiÎNÁŽfGr×V~üŠÊ~E'zÛ°‰VùsIçù-¹˜¹I£w~AœwàLø@óÑ/eÍ«îsK%v“¢›²^­Ù›‘牼&Î[öy6ë*⡌µóÂæÞORÜßè} ‘óDïï¿¡7ßrzC%˜xr¾‰GÀÄôïã7Ïû¬çßîžL¾˜á<+Va‰M„Û;‚ºï õÿRè5߉÷h¨uZ]ƒ%Ñc6Ø"ÊÔá[‚y—Þ;\©Þ.0Ø«ÒÙh'Ep8ÕkÔãZUêvZ¬[‘R\µs*­ud b¬çîa¦.}}Ï„“P—ý¥£½ýéÛ;júŽMa5’Qƒ?¨ÈÉ„}zÿ¹wç)uÞYŽž°Û"vgíÀÑ3+ót³ý‰µðC^4Cá“iR†=¢ä¹&’UÉ@•Î]7f°Œ#¼ú çyhâiåÊa»´øZMU÷‚êáÛ»¹MâÚèÒc`CÕN_ÚÄJœ þñsÁ“3ú7ýÜʉýsÉ)M\΄ *ÖµiS}Q$ÖKyD @HnÿÜzùûÛ&¿n"³ï³—k_ý— EâY¾C uà×7 .¯b/¿Ýˆ&APª=—ëŸÍyŽËøjfPF#[þf|è³ì’ èÌRIPl@À ¡ð&·À¤g ƒrþP¹'” bòäþ­X1a¡þtϰ€ß}¨ ™`]¨ÿ®6Ûd¾dOϳð—Fãwû½šø•7Î<Œèö:vª›H÷™ÝŸ>Cç+©^YÃ!|“kŠQø Ò”Þï.8Ükµ7žE‹\kq3&j7Xù*ù¸m’»â]]·øµÊ îÜÒÃ+½Ã{ñ¤%bЛ(?u:ü(FHg!bŸáØ\¾DžçV)Ç-ö²%SÙ^CÓ‚Ç»ôE¸:ç?t]-ÿMzªiüƒmpY›|óûE‰¦Zt„®QxE^â÷]‹*É•œ+nK«ótDÿøLJëG ÇÇóëÞpŠx;úÇgìï9¿®JÄ¡ÕIi6IMZÈ¥´kÍͺ#;ߨ~|m’ÇD*L¤Ü¯s„%1‘BP?앇þ±UÀ÷O$–ùäVPd¹Krÿz²‚€^|©CZ±¸ËFÒ!éP@Üü/9£ïp(ªið¨+ž|’þ()ÿw¼fûÊãìë?§ eñv7øˆ'ÅÒÜk¶Ôˆ X†ø¤¤[éÄFÝQónÄÛ8~<%Q¤tY=j‡Q@ü|ǥ؇/¬çì.ñ<_EžÇ›¦é®9Ǥ¸Eoxòœ÷Gìä½YÁÌz·Æ§¦÷ýsûœm²BsÒ´™‰üo#ƒ|¸Ýùõ0{¦Üîî¸hJ¸Kº}§ ¾µóùÕ‹I‘ tsk5AñÍ–Zm¹£îåøp•tZ%Rm$ذ<#wÂÿ¸Kˆ¬d÷PªÂG]Œvpë3ºÜ6Cî™I÷VÁÑ/Û¾œ¹ÐD’iooW®):Uñ$+FÅã`ü„oŸ˜xS¦ÏïÁ¼Ÿè‹9àÿÓ4 endstream endobj 1060 0 obj <>stream True endstream endobj 1061 0 obj <>stream xœí{yt[ŹøÌ½’—8±-Ë’lY¶öŲ%K–µÚ²%y_â-qv'¶ã5^c;; Ù! Ùœ„@œÍNš„Ø@i P C–hù•¶?(-íãñàKzß\ÉŽœÀ9=¿ÿ~çTŸçêÎÜ™o¾}¾]#ŒŠF›ŠçÔyž˜µ™BÈü"´fUÍÉÈ<ðü/ÂíPo˜3×=÷ó­79ðÚPÉòîÆ¾Ê7¾´#ý±¨­q Úcáy|G´u­k5œúĉPä’YÚ[›gt?¸ž} ÅÒ 3.a-ŒU@]ÑÞ=¸ösÅ70¿PØ×]½Ëÿ¹ý+˜/=Ô»×öÑ›Ð6x^ý%=Ý-–—êGÈ4!*·¯w`Ðßšaþ ò¼¯¿¥¯=lôü-ÔÃá•Fž?÷/‹ÉùEE òyõ+Žž|ÿ9Vú— ¶÷7aÅMPD |`\D“÷7±Þž`û +f0…~0i¡×ÂÜ4J€q¡ÏÙ:‹õ6ރرŸf›`€8ðM¿‹ZƒÓD¾þ€(,’,&zqUU1r¡Y~o€†ˆ&*M‚ðñ*˜ƒå`2ý0ëmfp ::Ñat ½ ´ìDQ´¼ŽžD»Ñ h[Š®¢Õ¨mGŨÍGNÔŽ xº=Š¢0â&zµî×£ h.…»ÐÀe@=¨ ¡½èW¨°•£`–>t íÇ›qÎÇ"‹ÐOT¥¡*¤‡yΖq4 ½N¢'ÐJ$ ÔBmø3ü5Ðõ¸ EÉ ‰¿ÃO¡2T…ÿí_â·ñ‹¸ëpSoÁ.|òñ¼­ÌG€¯˜e¨9‹.U¯ —Ðú§¡td¡DØýÖ¡EÀsî€ù 'ÔÞGŸµ5?è€Ãþ×@¢Óa]ƒÖfIß ÉÀÀŠ)XÎ\‹VõWÍ ‚ÑÐAiœAègàÈ@ÚÔŒÍèÐít¸eQþÏA×Óa”Ñÿ!(Û Lò³~ Öܽ½ÄƒÆG‚° tzåÁ„‚ ÀÇA׿@cŒ³ñ×X µÿÁ¯4¾ Ÿü5zýа UCLÅ&Þò¶OüÄ»p‚M¥b.e©éA~°È“`‡…¨5¢‡Úb´äµ =ƒÆ€[;憶n°’c`Å`›aœi¡ Ú‚òÃIT„’¡çI”|C2Ѱá~àÛ }ŸAÏÃ8Hð4Ü[Ñcð}µƒ4΂< ú³CÿÓp·Uù¿ ¨Ðf$‚–N´ ¾7‚u«ÁòV½uàÕ`ko¡OÀê‘î ç À6µAŸeèøÇjô.šÀ7¨ß9ߨ_`lpvB:dêz€·A c ÌŸ”ïC‚™Uè þ5ôS°ý'VôiÜ-0K5´þ ů½ ©] ‘ °­.ôcŸgñ;x ŽÁå åRô{ð§C€ÃþîF¢çàÎŽÌè;À„€ŠÌŒÅQ8k±›ñ»ø[ÞÉØçÿ8p8³ïbJÿ÷þ›þq¿ß¿Éx$QípH¼ìüT,«ûŸ-NôvÐÄuÐë8ÈíE𼦶JŒ$žðÈaŸÆà» í'×NÀu°u¾BÀw„Ñ+‰{»ÁJ{ ö^Pe1m©Þ º´õå%ç:›GËæoKM‘âƒ8Y(_YdÙXпÁìîPÈUDž×€š, & äi–r¤ÁB¿ã¢^œØN?èͦNÅ¿>v»ú(Å"¾ñ2ŒpˆȻ#Lú·Þ“Ô‰Í/P[Žâ¯¡3µ…ômöÿµ´•P -åIi†õ§ÿ²Æ|FcKhŸk(AZ=GåiWklqq›©Rµz ÛUJ}Ôó‘•.×ùÖ%O:²çŠˆÞÄâ”E99-ÃŒqª6Á <ã±òkäÈ9R(&¸²òF¼ç.^¤êØ£Þ]T?Hà„w‘ÁEèŸè?‡òâd|×ùÎÑ}¾S¸ž=zâÎÞ¡!Vï Ò¿ ,œÏø&rsB-\b»V½R+”íWXýbdY®ó¹Ö–syy¥{t"*·W«5jÕªvgË)»#·0×y¶…þ–à'¾ÿ à‡}•›0„Œp†* _ÿÔû)ö~ê«ÛùÒKÔ3Þ%´‰Úèýb”ú%ÄŽ/ÉØ×al1Œ…½N áÝŒ£>Êæ‚uçOÂó xM¼“˜„$¾!(¬û¿Wbþ¹Ïйò™‘hDRå^6ëò¾2Óñ»a|nÀ¶@¶4\ÌÊ}öÞ|ñš2³Gï¼Âʽ]ÍrÝù9‰+@V`_JØ­€5NÚÕº< rS58¦"Þ¤òù¬Fœ(Lª±Ùö-Z´×f«&%bˆDÂZ›mo°E˜x GEÇdÈËÝî&…‚D üEŠ&W %z&µõÙÊ¡²²‡ «Õ`|¸¬ìx峕Ç& › áÎdõ[ÁüÔz½ZÕj³ö›Î˜VÚ¬-j•^§R·Xm+Sâuë@2±°b w j˜ñšøG•ñZ,nñxfÏöxFš|š1,vukÔ:FÓå¢J°Ãj=ÑÑqÒjuP ‡?P6¬Q*Wx¢WQÙ^½WFyÇ©O¨÷`´3èõÑ@ ]ì»ú>~>Oã×Þ£~C}<Ñëý”Ó{¡?ä¸,k ~¶`5ˆ FR·¨‰ê oEß8Êzdç±;î9JüüÈݪ„̲”ÈÝÌÉ ñtSˆ­ñx¡fŒ§|¾’ÑSÀÍM¦@ Wý".Þcw[ÒrÜjËÆãR0kö2©TñÖÊçÝîb³Ñ°}žy©6µPDÏò½j $NÑîn8kS©—ÆêÖYð?ÿD¯ÓÙtúþlYž@ JIUëÒÓu,,X¥MËäs¹™"YÞZQbBFëII?–dC?Â×ð•ɾœdî)ï rE–;뽫BüôÐŹ'hå‹’„i†ÕE¶Ä&;§á늜éÎùIñ¼±™³b-š” ½¡Z"1ÆqŒqµ!½$Y눛5‹âðêåÙKd*>“‘L9n£ U¬D–’¤^Snß²„gX¢1Ïñ‰S?T8üÄø¸Äæ´F².?&Г ô* ‰«“Q Dg¼iú ¤ÈÔ†ù«ä ±X¡X5ÏÖ(—§â#ûDÆëÎ\ø8¯o˜wÌé,Å#X§T.Û\h³n/Ö=n³ª¤ÒùÆÚ=æ,炲òW;µ]7ÊÊdg·”èf‹’%DÖÄwE kÉgçÜ]Ë>g’*Á]z9“2Þžk³oj~Êqv̼·qùÍî“)何‹×+ëëg÷È2JÅ|³¬ln§? yßÉu×––ÞÜÅ«Úmµ¸ê<¾Åsó,–]„ŽGŽB‘ vL¨PO)Ó,5ß/!nЪk)µãØ-ËJÓÓËËHO3†Ól»Ã1²ªþRaÑÜŠ‚‚—·Éd*ïx”U£iލv§ÚfÔ¯­ Ÿ³ò•’⚊â’w¶hWþ¼¨¨’~+K«ÈŒ,ШSIl;>Ù–FN|M$]¾+ khôæw}eŸð-“Ë$y¹Ý©|af¢ªRÓpÄjsú>ÀZúÜV‰XÌ‹>Å„]ÃÑöŠÝÀýß7Çáx¶“%_ ‰IN Ѳ žg“ùbåOÐu §N›#¹“¼¼ÕÂhªm3à¶±±xSŠjQ¦s©89eÌl4n¯sR,ô!ªí6¢ã$æx¡Ëå’F—·Žî>ž•e„5šg%Vufªc߀ˆšš¿ÓñD†¡Vu÷ùöÐûŽ¿kµYm±±³4Baê¬Ø–ã„7|hˆ~‹t99ºDm4d1³b´€û}_9½p'ÃŽ¹÷+jj>˜ §áµL¶$+Ú(LÊâÌJÔ DqóQ«Åþ¾ÅÆ|,0ëDÃì‰$ S˜Md…Se·Z†ÚYnœ¬s:uº¼<"ÉQàoHòÞÝþïü›/_ûÔwtÝø8þÞN­Á7|G6Óço#¼šŒedÆüºqW2SrC'†Ø гždW`Žà¾ $¸2êÊ2ßÛrWA%i-ýìhwÇ(MÑÅÄÆŒÒq±±©8#6&vT!/²ÁrÂWEG‰¹Â´ŠN)Ëqçuº>VidL,'K6ñZÉNL‘¤áZS9 Hq<'F#HÔDÇq±Ë>ia©@±˜¬ÿ÷ÑBZ~qŒkJQ.0e/–ˆ%ûÊ[iØf=KGÈüÄd‘XÜ\¶5ÒuÔd2`¹„g— ëZ1«fI$‘}š×šCmkšgòBýy}+ïùþk®¼‚‚<¹ËsŒÁ“þÙ³ÔŒ! TÌ„JÍ_õ8ßܲ²7VñWÖÕ••½¹_µ×ju»­Ö½Uüj¸u¹à–ÐvÁ×ÀÊÚ’8‡ÿ#Äð´*­ cñzaZgnëq ˜¦ì/»M›’Ŧ>”+}³ UQ:‡›)I.M«ìS*ä¾*‚¯ŒI¡oòÖÝ,-­MLˆÕ‰V{¿äUíZxqY)T¤ÌÆåÆ»,Ö@ôk`‰¦hýÈîó_ŒrÙ6Û‰6óµØœ0v6‚gHÒ¶8ÚOÙlŽ1¹HM+§¹ñ™’”’´Ù½ …|2žÅs£5‰^û£Nˆ] ÁصÇfõð¸\“ØûW©•ˉïËÂ$³4­<ð H­žæ°$ЫÇ<8bt<ΪLí)07ZE½¬Ê¶…I{ï¼N]ˬI¤Q3¯ÎŒ&v:ÌàîÛ=„ÚRÈîaš%MËBwã¹âž²ŒµÆÌËËÉ>ßÓpÒápÛ-–cÍË“SRR’fÛK$Š1§Í6Ô\ØfËͱZÕW´ŠÅB,ê¹by|BB¥½p“Á˜­×jW—ä·ªUV^Œ$d(vðùB‰P˜//Þ ×ge¦¥ xò[”* 7FÉ盳]ÀY*ÛÅìÇä$¸pBÕªQœ™¬ªTó¸ïÏXdÖë7–¤ÍW«=!Çœ"v¥¤–ŠD|Ä×Ìvùnïö^iÞ™®KˆçEoaE±Ùáñ‰ µy,¢0ç˜SÌr ³VË9Ó&‘ß%€^sfÿÉò›À^Ð’‹ýDM-Ê&@¨‡Z‰–iîÎ uÏc¹\9Α¾Þ‘§ËåtŽöö]ÌÉqy£Rµò{¹LžÁJÓËšòrdJ}$e¡t¸nû­²²Ù³ËÊnm÷Û~«´¼¼¢¬ôÖ(äjß´6ªSU*eo‰w3*€(Eo)¾$ª‹.ćÁî,Œ9Ýbó”:,Æû!ÞÈýõðÞ;9Du ‰4ö«Àj4KC!‚üMÛ’{x¬4¯?j]®R¦;íöÓm}„Ÿq¹BÞYš³L&•ó…Ây.Ÿü>“³.7÷!÷ü'-g‰ÓyjIAZ¥M•Ë—YÒçè3zнÿØT,õITT¼$t® /ü@tùW(•ãG¶¤jtj…¢5/7•ææ74 çæ DÉËŠ³ë’’„.‡ãdSËéìl÷8 kÌv.“He°ëï,¢OI¤Òå…-2™T!•.µ7<••eÌæXkf«^_&H,OÓ.Ò¶< ªÏ³XŸ˜c_"•ÊÅbI£Û w*²²•ƒŒÛ@3˜sJ,_äXÂâ¶rè#¯y©ƒc7'.á )ø ú—1ݾ‹¸öuÈæÍ€Ñ;Áú”ìKH\$2^©i›®i‹c °›èûeHyè±GþgÞÆy.·ãl_ï°Ýn7˜LǺ3«5Â0w^Îõ­±_ç7K¥¹LÞì¶µªÕzŽC¥ZÀ¾4ÞFßеù+Þ¯*YTY¥uáù‚‚9`ãfqÃ5O^¹oËÈXç*Ùžži6™ö7äê+’’Rˆöûý[Éùž'ïxý’6FoþãÒö·¶ a½¨©°ðrgסÁ4Ôi¸›K…OfK¼»¦!˜4#º&C¡l²Yú2ÕÒ"iZmr¼4QÀ/TªçiÕ™½V CCáŒCßvt_,.l­LšmrôÌþÝ£ÑkÞ]ÔxÊíj¯5^êêdh8ë{ƒ¶„m ž£BÂönñ â¿gÿåàw%Ã~Bzí‡^²`/$0ØðþO>Á;Ã6ü~íÁðëÐ'ß·þ<ÌIV·5(D&~OÊ2 H•œÇpǤ„ïñrkãqÏà`ïL>¯®„ײ+=#í±;Óë2vùö P®Lã†Üá5WõWמu>itQt+¸æìÞ‡÷âÍ{†«Oy ç†Ð`ëþ Lnž<Þ ‘qÁ]DÉù¼¦]útX:KjWII·½1¾d.Ÿ7KoHÌרÝBc/!±öÎ5/?ÿTõpQ«L.Å{Ó2¤‹sÎÎ=_謠hcæγ•Û2“ÒccµBã#UùŒ™àkh ÚǪg]c¬•HAÉõú˜o~j  gáaßüë>'¾qì˜p7KK_Ëžv“T†¥ØBo„2óÄ _ãÐà=‹^¥o³ÊI&ØbVª­J3æÑ·½GÌfªybôÕW¿Œã|õªï‘}Ä›.£×XJVé»C?¶ œ}™˜ØI=š“ã]÷Þ°¯ù+.çÒ{¿……™˜ˆ I¶w’ZvÚ;´1L÷ýûS"_?u)ð”ðC]ÚïëÏýî&Ã2o ¸\+VªÙ\9WN%úîìûõûü?hñíO¾œè{ÂB?á[Áh.Xzù)|ηøÀ‰¬äÄúóë%9›¡M\“YÎ9-%…'…b¢É[ RšºQ½»zâ…y»vw­ï;rù¦ }ÿüOhâˆBü´¯?ýnÚŽ‡| ¤l÷{,ØF"ͼ0 Ù •¡å°û ]·&b×ÌÙÁýá=hUÁ ²¶Y­8æïÿd'Ùó,w˜%NÑœß_-*}kä¾·—¦Wˆ’ÄéšÔÁâÚ­&N סTkÄ u.$$Š››)Âù ¦$eõ`u§I³¸qÜȨ(xU¢jæŒxÕ¼½YYabŒ&¡çï >Þ´à  ?Q--P©æ›sûÒ´™útÝ–:M…RWŸ)TVh3û}o©¤Ò&®].«LMðÕÄKgrâèÏ4ÅII’$ßž"0ô¼zE4Ñ4õÆ—­Ca)vàj<ŽßÃ¥„”*¡Ú©MÔ·t:}šþ#«†ÕÌ:ÀºÀz—õ;‚-aï`æ {$ì½pvøá—ÂÿO„4"/bnÄ…ˆ?Dê#·F~4Ïè™qfÆ3¾ŒâD¢š£6DÝŠúbfúÌÃ3ÇgŽÏ1ðàÿ#ø~Ö÷ÑÑÑŠhC´3eÑóƒ°ò>øiô·11˜%1# ür >fà¿b#‚ ˜å=P»™“ôoø7üþ ÿ†ÿYï¢ÐãäMRù_Œ+ÌÎ…Üc¤‚Zàž‚ìçwÁ{e¡¿ïY[Löa#!N Þ‡!¶/ Üc„fâ}Áû¸?¼E3ðY”zQ¬½ý¨µ¡v4ˆ$(“yËÓ ws¡¥¾k¡W”A(4®=Ì]5ŒëE+ Ïrf¤­bÞ ï…ö¨kŒƒ0Ãr  €6˜‡ôXøô0ªu3­½m¨ 0µ2ØaDƒ}rÞî଩°ë#0¨*€ïB ÇWr?ÕÁý2–¡ºp®¬€é_倡mÆ¢yp%œt0sK h60Ò •Ȥa¿Å0ÿ-Á¼»Ï\ˆZÓÖ>H^`îlì¤G>stream True endstream endobj 1063 0 obj <>stream xœì |EÚÿŸªîéžž³g2“L&ÇL˜$„LHBÈ@p0A"á& .<À ¨quÝWWu’x€»º¢²ê®¨x,À{U’~Ÿ®D7ïÿþ/+ìç­ï¤U]UÝ]]]õëš3@ E„š’Šó† Ý^2hìgÞw‡””–µ<}¤ ÈâCä»!£GUì»3c!ËÞ¸ã¢!ã¯Ýt³Ô6À|ïðqC-Þ©ˆù@iU‘sô“«>ÁmqP3ºxø¸Ô}Kp›q=BɈÊÑË/:„å·O›;¥nÂô{f ¤á6N»t‘À'i}€ôºÀP3³nÖÜq;çæI±àúÞYSÖÜßݸ?uÖœ¥3ˆ\’õM86{úÜ%£®ü wÀÑM³gL™~ðÍû–ã¾çèÇŸ ¶!â`\߀ëɳç.Zrñ³@ñ|Ü÷Ï™7mÊ%_ÌÞdÜ~€¨ïæNYRgùTöbù±¼ÿ’)sgˆG>{ÈìW,áºy i‰pÖç =¿nÁŒº¡ö: éØ^ÒFÐÛÚ›ëº&ëöÉöÂo±FÐY¿àO;õðÕÅS2z¯u–é€üPý¼  åm#¡ØôðOïý8Öt’@†“yK/£üù¸ *dÃx<“«ñ¸s©°Š4€Œ†» ¹HâX8Qx fR§Ñ@Í’H)U¨xLÀ’âöãŒQìǘŸô2¼Ñv>É•’¦¾ÇN“jØ¡Ÿ)ˆRGeißËBúqï +‰øë´séa˜x&÷'.„‰¸”àÉ.Äp.”WB^€?¯c<_ÌÊ/„éâBís kéÃlû‘z[âú ŒßoxÖ²}œÉÊrÎIðº_y¶ëÀáp8‡Ãáp8‡ÃùOBùQ&„È’—º´Åm¤I6I­¥¾=ß—’¤Ì@]3Q2]³QC-ê¥p1êeL—ÀíX sQ—Á%¨—3½æ¡^ uÚÇpÌG] ´C°¢^ ‹P¯Å¨×Â¥¨×1½.Ó>‚` êJXŠºŠép9j=\¡}«áJÔ5Lo‚«Po†åÚp ¬@m`z+\ƒú;¸V;ˆO•®G½éïáÔ;`%êPÀ1½nD½ êQÿ«Qï†5¨÷0½nÒÞ‡µp ê:h@½õ=¸nE]¿CÝ·iïÂL7Âí¨Â¨›à¨1}þ õ¸S{6Ã]¨2} þˆú8܃†{Q™6ÁZíoÐ ëP·Àý¨[a=ê6¦OÀÔ< ½ Ûa#ê¦Oƒ¨OÁ&Ô§á!ÔgàaÔðˆöì‚ͨÏ£¨búgxL{žƒÇµ¿ÂóFý 4¢¾M¨/B3êK°õeØŠº¶¡¾OhûaDP÷ÂvÔW™îƒ¨¯Á“Úð:<…úÓýð´ö:üv¢¾ »Pßbú6<‹ú7ø“öüþŒúÓwáyÔ÷à/¨ïà Ú>8Àô ¼ˆú¼Œú!ìFýˆé!xõcØ£½ ŸÀ^m/| ¯¢~Æô°õ0¼¦íÏá Ô/˜¶À~Ô#ðWÔ£ð&ê1¦_Â[¨_ÁßP¿†¿k¯À7L¿…wP¿ƒwµÝð=¼§½ ÿ„÷Q€¨?ÂAÔŸàÔãL[áCÔ6øUƒCzùÿ(O÷3OObžÞyzàOÿžyú÷èéÝQ3˜f2gïÌÓ3˜§g2OÏbžž­}ƒž®k>:û7èé½PuOÿæ´<½ê ¦º§ù?xú—ÌÓ¿džþ%óôcÌÓ1O?Æ<ýX—=ýóô#ÌÓ0OoažÞÂ<½…yz óôæé-ÌÓ[þÅÓ?gžþ9óôÏ™§Î<ý0óôÃÌÓ3O?Ì<ý0óôÃÌÓ3O?|F<ý"æé1O¿˜yúæés»àé ˜§/dž¾¨Ëž¾ìáé×1O¿ŽyúõÌÓoàžÎ=ý xúnæé»™§ïfž¾›yúnæé»™§ïfž¾û?ÈÓ8g<ýæéß0Oÿú7ñô®ÏÓ¹§sOÿ¿æéû™§ïgž¾ŸyúÌÓß`žþóô7ºìé¯1OyúkÌÓ_ûÿòô½ÌÓ÷2OßË<}/óô½ÌÓ÷þÛ=ÐqA9nVŒ ûX?íÒK9J'i’ÜþΜ (•DI 2ÎàKH§…p¶Ìáp8‡s.c1+g`î'%YÆ@Ÿû™eç~²dìâç¼þ ð¹‡Ãáp8N'XÍ&E‘½@×µ¹Ÿ©“4Ù(ÿjî‡>÷ãp8‡Ã9ǰ[Í'æ~]›0Y;I3ê` Ïý¬zÜ`FŒg²ª§Ÿûq8‡Ãát‚j³ès?ö]×&Lýº†¢@´)Îý”³9÷ã?KÌáp8‡Ó › Ãÿzî§œ:÷“ƒb´túÙÀß>÷ãp8‡Ãé„(‡MŸû±ÿÞÖµ “ÚIšÙl2›10fD2Ì&[§Ÿ üM8k_0æp8‡Ã9—q;T$é4æ~ŽNÒ,³Å‚›ûYÙl°˜m`>“U=øÜÃáp8§<.'ȲÌÞœíÚ„ÉÕIšÕj±Z1ÐãÏeÅ5£E¶ZT°œÉªžgí Æ‡Ãáp8ç2qÑ.ý[ºìÍÙ®Íý¢;I³Ûmv;úÜ/ÚŽkŠÍh·E½ÿºzÖ¾dÂáp8‡s.“à‰>1÷ëÚ‹ežNÒTÕ®ªè¿ñçQ“ݨڣÁ~kzZÈgëÀ‡Ãáp8ç2þ8þ-]öÁ¼®Íýâ:Is:U§}îçt8fUqª1~/ä7á¬}Á˜Ãáp8ç\&)>VŸû±æumîßIšSŸïa ¿ççDÌÅéðtú½ßþž/‡Ãáp8N'¤$ƃÉdbÿ¬£ko”&v’ævG¹ÝèÿÛ#ÑX¢Lî(/DɪžgíÇe8‡ÃápÎeÒ~°X,ìƒy]{±,ÐIZLŒ;&ý÷1ˆÍm‰qûÀ}&«z:œµ/s8‡ÃáœËd¥Àjµªz¼k’Kí$Íëñz10˜R½^o¬=Æêé1g°¦§Egÿt˜Ãáp8çÿ<9é©`³Ùœz¼ko”¦w’îÁœ爵ÅÇ&C왬êépÖ~\†Ãáp8ç\&?³ØívöÁ¼®Íý2;IKLŒKLÄÀ `ÉHDœqöĸî~'ø7á¬ý¸ ‡Ãáp8ιL¿ž ª*û`^×þ[ÏNÒüþ¿ý{dû‘¨ÕŸÐÎ\EOõl˜Ãáp8ç\¦¸ ¢¢¢Ø6wíCr¤¥¤tKIÁ@ÿß}RènQ)ÝzA·3YÕÓá¬}Á˜Ãáp8ç\¦|`¸Ýnöæl×>$7 “´ôôÔôt ŽéHlª;=5¿Óï…ü&œµ/s8‡ÃáœËT”„˜˜öæ¬Ú¥-J:IËÊJÏÊÂ@ÿ}çÒ,$>=&+½°Óï…ü&œµ/s8‡ÃáœËLQ ^¯7I;»´ÅðNÒrs³rs1p¸Fä"¾,onV1dɪžÞ³u`‡Ãáp8œs™é埬ǻö!¹ŠNÒ r 0ˆˆ[€$åÄäœ9g²ª§CgÿxŽÃáp8‡ t,ñ@Øú¸†1r ˆPƒë.P1E„nÐFÀ ¨…Ë`)¬#½4 sý,u ̆9?§jò˜¦mèØó¿@$8‘E( ¿.€U z¬k?@Ó³“´’Ò²!CʇŒ=flŸñί¬š“º´ÇÓ@èzÑ¿žÿ··rhиPÑÀ…ýûõ-èÓ;/7§WÏì¬ÌŒ`z´î©)ÉnI~_bB|œ7ÖívE9ªÝfµ˜MŠQ– ¢@ d”ÊjüáÔš°˜:4S_LÁ„)'%Ô„ý˜Tvj™°¿†óŸZ2„%gþªd¨½dèDI¢ú ¡03Ã_ð‡÷”ü2qL%Æo* TùÃ-,>‚ÅÅT¶bÅ•¤$ÜÂ_ê™]â“i¸ìÒÙõ¥5%¸¿F³©8P<Ô™&3FÍ ÇêIÌ@Â"4¦´_#£köJJñ½ a!¥tÊôðè1•¥%qIIU™aR<-05 Áa{bv˜°T–ÙaüµúéÀjcÆ®ú5¦Ö-ÓÓ§Lª Sªôc8‚xÜ’p̲Cž_VqçÎâÊ•'çÆ õ¥žZ¿¾Z_¿Ò^7¦òäÜ$]«ªp¸-M)«©/ÃC¯Ñ[ѓѫ¯ŸJûIÍ”ê)5ùÃJ`p`výE5xA¼õa»4©Éë mׂ·Ô_?®2.Š TM)‰otAýإͱ!ì©9™ª£½5möŽˆÅzrdƉ<cÅõXùØÍIôÎÃnöOócM*x"ºÌ(€úiX ©"¸Ux:^†Ú°R\S¯öÓÓõíÆ5à¯ÿð²Z¾85eJGŠ”¢~ zTï':æÿƒáôt½_ÈÅx!±ŽÙzïÌŒK#4?P§ú1ÀæƒÑ•¸YU¿lló¤$ýª®Ž„`*®„WŒ©l_÷ÃÔ¸&e«Â´FÏÙõsŽ{¼ž³â眛װûnaCÙ6¦žø³«ÑQ¥³û…Iôÿ#{F{~yE |ÌÄJi}MGÛ–;e­=¿àD^G,U\)ÄÑŽX.öÄI' ë+•–°˜‚ëÉÓ#²»"K!þ²°Z3´]«LII]Ü(¢Ó·bÁ/›uT3Ü/xêzÿSÖO©ž¥^À ‹©´|ÜÄúzÓ)yeè;õõeY}Mý”ˆ¶bjÀ¯ê·Óèõu¥5?_ш¶cu\¸lMžÄlÒ{+…Á²jLcˆ¬ª˜X¹]EC^5®²‰Z\3¸ª1ó*·ûÑiY*=‘ª¯ùõ5('ØÓ›¨‘eÅm¬`¹"K`ëÓ"Xšñç4Ó"´=MeiH&@㸞OÒ‡17D75õÍ Eè¦fÕ£‡M²¾úP³Å™³|ƒn„ÇqÙ‰ËQ\Dè‰: —ɸ¸ùƦ[ôò›&³ y䘜z8|D[ mMÖöPé×öÌÕËmh.]¢¯ohÎé×¾žÞ«}=9¯RýŽt”©5—"\–ã"âÁ74»Ú7S\úf뛽q9öt=–XÛ­gU\2a¶s”4J¦Gõ!ŸãÞÖ2]Ît2Ó"¦ÙLí¹‡õ£3ÝÉôq¦ÙL‹˜Žb:)+OZðñ>>ÇÇar8ä„ >¢â­ÈGB$ä#Û‰BÌMy¾[#Äê“çËòûrpÉõñe`èÃåòô¡¾L\’ÒK|}î‚÷Ðÿù8ÆP„l~¢m¥µu¥”)jJî¤~°CÔ—Ë]¸ˆMé |ÏàÖ~¶Š½Ž>Òäû)3B&4ù~ôEŒ¤É÷ƒ/BI(Ê÷Oß!ß÷¾'}ßú†ù^JÄ·KÝÕ䋸""–Z—¡„ì¾Õ¾±X¹C¾%¾9¾Kü,kN!³on41}¢¯í 2ÒÏŽ2ć»Ùæ+ÅÌ’ô!Û|!ß¾ÜL¶i޾é6_/ß_–.£ýp=Úë–¦Û|Ýñ`ÝØQJ}ã­ŠUéÓð®Ü°InØ(7\%7 ’úË ùrCo¹¡§Ü-7冹!AvFÕh3ZŒ&£Ñ(E#5‚Ñц‚úÜÐ%©z ‰ºŠ,®R]õi$6%F à %”ÓòŠÁ¤<¼k”Oõ‡¿«Dˆ ½ÃLÂÎr(7Ø.–Gdml¸O°<,¾ ²‘›«05LWáÐW!±zÒõqú½y;^ÕØëoŠÓCíú›ªª úÒ"O‘s £oYI'RÓ¡Á_ðO¡|ôÒíx•+›eßW+pµA_mÐW= á;Ê+*Ã'T…sôˆ–PU¾­Â?©r;yŒl.-ÙNÕƒªÊíBy¬t¬ž.d”TU•ã¥aå°Û?¦—{L°œñM(ÒËA‘ñMVN$íå¬v»örÑ~°rhÿ)åÉ£z¹t=Àr1!‘•KŒ9xR¹ÆÒ’Æ@àç}í`ev´ï+\ÈŠø|X$ÉÇŠàPñ±">BY‘²_ŠdvÉ:Q$‹I ¿”ñµ—±ú.cÕì3ƒ¥µz_]Ùh„ÁUxçba´Z7]wkìÀâvÀëÂç`Æ›· gæÀ`(*òÕB’-YÂ&ɸè¥û'y®ŠÛ!ÙÄJ[0ÙÚ‘•9(sž…½WϲéÓÈŽ,ÏUý“âvMY*&;ð'ÕsÑ¢ÅxJkKNü-ì`qG¸ÊÃéåá"¼i6Êr)άJª0­çÏifsiDÛÕž˜…‰…z¢ œ(x"MQ: bkl•AFùH¬BUp!Vtr .ZȨaIJe#xÅTðhŸâò™¶ÕjGô¼¶yÚ‡ôC®[;–vž‚°ša#>A%"LÇç=«ññ,†z¸n%[`!,ƒ ’««ÃZ_wáy%&Ež% ñÚ~Àgp€Ïóò`”Âb<›ç`7ü >†’ñd& ÒqBhgiÑÚ¬sä ¹ Ãç…ãñä°[ìh¤ë…5mϵ}(à#kÝúáùOĶÚ'KRHw2”TZ²ŽüDeÚ—^M7Ð|a½°UxO8 |)—ˆŸHf-M+×fkK´µÚNílS¤ÁpПE_ˆÏKë𜮆ka^­»ñq¬…`D:¼àø ¾'6’Cú“B2“Ì!KЇ¶’'È«äuZM§Ðûé! LÄcoÀAQ"ŽН·A[AÛš¶Æ¶½šMkÒ^оÐZ±5}Øæ)Ø¢™P‰Ï•¯†ëáV¸ø<a|ì€wà]ø¶œ‚•¸H I&=H&É&ùd4C&’YdYJ®!7“r'¹›„I3Öæò<ù;ùŒ#_aË`3S3µSíF3h&Í¢#é,º’6ÐÍt+} ûè~ú6}‡~L¿¤?Á…nBª0T&Læ K„¥ÂUÂ#Øž»…ƒ¢ˆ×Ï.¦‰âuââãâ«âçâ³áfÃm†ÿ2|løXI•H£¥ÙÒ賂ô7YÇÈ3å«äåò5ò6¼ûŒ›¡ GG#žéIÐIp¼Až÷ÉFÁE!£éƒäbü î•Ú€×ýH¥C¡79O¿6ô(|Ž£ÃAŠà"'­d½a½,>£˜@ZéÒß°fâýjÒLG »É!yOa)'³i_2Zár?ù„އôZX/Î2ì'ï‘ i˜ýăÂyÂLEŸü—@‡-8öÀpáE˜D~‡£ ÂytÜ#óIžŒ@DKÞÞÞµB3q~ûmÛtê‰Ø>?bJ¾:D¢”©ç9«„ œs„¹b­ñb¥ÖRk笚ç]ê\î½Q¸ÞQï|Èù¶ó€7n­÷€—6J´x\åxc í³f‹5Ã}!¯Í‘gSÍñyîŠÁm€˜`4â|«¨°¨°P¯µ~ïÖkÛ'¶ví`“Í/=¥í.¢¶+DƒJ²Ñh°Xm6³]u8lQ.·Ûãñ¸WÙŒŠ?¢Íh68øü!-4ÖMð °Áèt»œ£ÓmÄ¸Ãær¨Ã¦˜L‰f›Ël¶a?Nô¸]¸ñ¸'RÅv¹1ÍHñùµÇ™æt8Ìf“) ŒŠbRŒ²x«AFE#¤HÅιGq»ç6ƒb³á<¥¹G0…î† mjž-Û¼Öü¸Y˜g^n>`ÌÙÞ"/õ¾lÂJ\®˜Í·)~CƒÖ`O0Äzmf·G5ÇxbÊ6³IºZˆS»Xl–ìêùÁeLj';¸ì]Õ¯æ/S«ç?«·Z,&ªíy»ÚWô"±ê!}^xRDï/*öLÀ¦×ÖÂö¾³ÒÄN³2ËÃ#††“#x •ªí¹çþG‚‚RPP…Ým~õ‚\’“߇ä’@T~”$“€Ú]’…‰$çËÛ”·PúmÛÞgïì=­¨ºõý§os)±ž?vöäæÛ[…5?–Ñ—¾'¹· mØnl\vŒÍ¾zGÇ?}DBuuŠ$º¥öÎËÏÜ'¿w^÷Ô@7IŸ›£¿. ’ÛH’$ÙFÝ®èÜœü|A½ð±i·msÔdü0wVÑÒ·&=QðõöçVÆö~Â> õü™÷^3¸vÊÄ5×)teÕN‹-aX¯¢äœÕê½›.,«_×öÏ«Få\˜G>±«Š-xaßáS'?¬»l ¶ñPt„(ÀñÐL¯Go¢.bÒ¨”ÅîzÇCŽí©‡#;¥(eˆ{‚{¦[Z–D§ËÝ- +éâ“ÉEiŸ'ãp¡i8Löù$9* LŸÝ¬øEñâ³ã‹âGÅ7ÄÇGÈÎGRô!ù¡X¥'ìµ0 &ëOV&$㌠b&ÌЇF! .Éz}õ‚à²íƒŸaïßņB{Þ||âÐ\Ϫ«»:è™E­‡0èèñúêðÍçtzõ„j¼ƒØ…ýRà•° x¡ºËQ2»ÎÞyìBI%$gëÜ k†ÿþ…Ñ—^uÝ€Úu™ésÉ5S&¯yõä©úô0ìhýfÔ ÷÷ßtxíäìy ^"[º­ºùzâ½ì†ÛÿpÏbtß…ØÖÑØŸã`MÈÔW¨uÍŠûƒ$zôׯ«Ž¼¾¦Õ:)®V½BYªÞi4H®hW¥˜TÒJ£dO¶U˜IrOœ‚7èï‰NŸYŽõáÜ¡ÒOzJŽÙ¢ýrj¼½lªÚÊ Êõ.û]õÖ[[ðȤEw—Cjë!vã«âéÇtôLg²~úrª~ºPHÚZòÓºGߪ'äG^l" /œ»î‚%••÷‘k£^xöàK‘Ñ?»Ö2cA}ۧ׬Zuö¨9x–/a²ãìyÓvHÐ6ãÉ9õ³œŒýJ$›˜+ÔZ"Öm69ÚæJè!ÜClçÛ$W Λ“Lî ¦™&C?’c*t—“Á¦anÉc·[Ìf—b8Ÿ"Ûm&—𭝨*-¯¨öÉöyöuvÑ!ÉÛ’T¿!ÕŸº¤°!û~úß±›¿~ö…¸èþŠv%»öÕh_xõS:Z@‹Qhbħ¯Rl Ô?>ô‡—Ö]ò—K¶´í}°­gÆEÃ.Ÿ~ÃuÓ]\;ô®¦ûÿD­ÛIûÿXFžž·büЇ¼êæ~«ßÔGØE؃ðªÇB7ص’°lŸ%Zo•J½U¤´n«=«cEOì/•akìó±8»Ï0_æ]éA/ q^œÄaO€d•ÔàÝŸpŒÆˆH*Ä8o†£Á¹ÎINÑï³È1Ø3œú»PœËoL $øí¡ØU{ý¶ÔÀäÔíÝ#ØÞ?Ú›‡u}~ÖZ=ÿ»?ãHy)¨w•ó«õ»OŒ$bKè,.9Ijï)$©½±$at8µíèÓ—>?ë>¿æ#Ûñ¯Ä§UoiK¦ãȪ‹í$µÎk¿˜»ïúÇȵ_¼2r¬/ö÷÷,#Ëâ-«n]‡£¤;w}ŽB\¡Ë†ˆ$U&>‹ÏJ’b<”ÏV÷:äYò2ã2t§'O:$Ñ,Ú¨ËìÂ+ã¡Ôã ÁÙ,Q,–€UuY­j:’îMVt%EÁôJ«r‹JTUɶY—[_µŠªu”u²užU´Z#ôÊP¦ o÷• 8 òk{ŠU¨Vt(kÌ„¿Ü¾Oò)ô§j4+õKÝ¡Úͪݥ:rÚ3–íê¸Y·/-ºQé· ÙÍY¶¶ÕêP=ÿ$Ÿ’¼Ù¶7:Þju{Z<ã±I×ýÎíÖ• CK¦6ÍHŸŒ¦´gêøÕ îh½‰^»&9oð¬æÚ °_ÀΙŒíŒsz’2=(üEøTøV}*3<» o”²BÙ§>%[Y«<®ìT4EÂé¾HlJ 8G•å€H\zÊ4½m%ƒ$§‰&l5Y¾DTTÖjNQÔwèÁ®÷‰T ™íyâb#š»ØÑpœÄ–@ß*†Fd±Í”¢Ô"140…­5—§¶§Ú%aªë¿ÙûúÀ¨ŠlϺuûöwº;I“/ iB! †@f ÈòI B¾í@Hnw:ݤ;FƉŒÃ‡"ƒ à ëã1Ⱥˆ3Eú‡QGÐeDxŽòDa—ç2(éýUÝ›Ð(ÎξÝÿ®§êÜsO:çÔ©SU7É5EÌpåÑÐqJ=d¬RÇ«¬;c:’ßH6õ¶×pK¾3FÊ °ò²ºdd±s‚TP ³)áÎr Ø^ ±ãEafVwVߌó‡Îk.ÿþ÷_ÇjÒ¿þ€½žßå¾ísc³·@ê”Þ‘D½"•ž‘^^•Â’ŽŠ¢§|ÕDdÂu¢ØØp18¿Mh'yÃå4aWâÒ(kâŠ~·1¯y§gBÌTÒï4œÆï,Còpgæ,F:8,O©á$Òï$œĩpQ½Íê—¦±‡Ãcn÷Ü€ë¾å¹…–{Šm qÈÌ9Ô÷–Ôs£ž™ŽH'²a¦0ÛùƒÂh!Ûi0æ>“ýëá¯f¿ÿÛá©öçñ?¾/n_ê Ù¿Ž×δ”è‹-ÆÔYÎÖ„T}ªe‚~¼¥P¯ÍfŠ/ˆ²åŠ£2)ÍÌdž¶I^ýRÉÐääá)»ƒBJŠÃ3<Ön·3‚]ˆµHÑ&¦˜Í<+h3S’Ùv%ûˆð®3Ên5Ä”Úm$ÖK±3YåŒJjK.uØHŠ gPFI!Ô–Y*Øn僒, ŒÃ–b·Å² Væ»ìð‰jÞM ‰”£þ©±gÃSzl Ò-KÀnGoå„,–²–¯ã)!þމ!Ÿ~þЈÚg–WÿxТƒÕ?þqüÆC›bï+X´gùð†C[lÓrç=·2µ^“þ‚»¤¾¼¦ºÃsûæbúJɈ܂ªgþùæMúûÙ)¹Îªží3ª™zÆ2žüŹ0M7AG‡Ó4ýDZ¨/¡šëh«>½7úU$è“úßF[ĸxªÑŠ4>ž•Ó6Iæc¥&i› æjñˆÐçŒÆÑL›aŽŠÂi›%[Ãá¥æR*'Ò¶p+eÿš†°ÂR¡ç@|©pDèqÆFŒM­$Ýÿ&•ÏÙülT5µ€àð”À3°êq–ƒóC“åøqe3?àñÛ||~×ÈU=•<•ôØ¡õƒfÏüéÇ?¤Iyuͺ–{¾¢ÿ¥jì„ûNü¾Lèì Šà= qÀË$;°Ì6ß# BEªœJµÒàAödq‰½lPIrIJÓ ŠítIðÚ|öö¤¶änQ’¢Ña+h²:ˆsôØ\’>,ÑAt6¬uÍ©éµ{@¬ô|gÛ7Ö¶ ÇÚò3(_ÖóØR>…ì{j^zú?Žþysß_žþnÕ¡'š&{ªfJy²±x{‚ð”wrÏÕ“/õ½¾gå±'·üblEû«—>ñÌ¢ío#ý…ÿÜW¯™û¢É0rÙ:3¥DSn-´Ê*M4!e¦fžuö i„fŒ5kPž¦À*ÙŽ„¯:Áø!ÌKBkÂO„§ÉõaÚÄ„ts¾0KxÈæJÐê‡ 1ÑTO££Õôi³Y†*ë»6>ÅbŠÎ ƒ#‰$­ÀÑûæLcg Ct4–òµ<³ÚØíæHjK§$Õø;8 gáŒ|y•%µåß]¦YÂ]Žú²ºV+Ç‹hì'o.%üP ïb{¹\B…²}öH1ÖÏ6—1ª 㕲ü©¢­'wî*yµ>ðbt¢çþíG©˜é«½¯¯^úÍæÊûϽµ»ï/»ç»ùª8Û?fÚBaÅK=5ûÉwGõðó*øé‡\qšzÌB{âO’º†ŠÉØ\„+cÙ&3HRܽd’eYJVm*Kñ£Çç²Ú9;~H®69.ùA öO6[±›S‹Õ:ÜeÇ-Ûr[2¢´lÏm˰Z,ƒÕZj3ÈQ˜®p¦Íf›j[`[aà ÕN›!{pÛ°Œ(›-Þ6̈Íx:‰ôï|ì7³Ú¾\>à×ï®#—om†T¿2ÏÚ” ˜…­B¦aÄ®=.>OÙ¶œØt8²Ñ/±aóÉ_üµ³ò™{Fmï{ëPßÖ5•E¿ZÕU¹â‡Ë'džøÓÛoΫÿåÆtñ‡¿|z­`{xÍæ) Ÿö%¿‰KáY+¹æl7ˆ]†§ôO4Ú¨¸¨ÝúÕ\Òܵé4C“/L¤³„Vá'‚Îb¥¢‰Âoêö7“˜Vey‡ßˆÓbË%¶À³1ÇŽs6B+ˆŒ…þ*ò•’¹DRbã«ýï^ ÈÀ‚Ͻ†•u:ûÁ(ÁÚ‡©‹¸%ëtTœ²xŽçõduÝ^¢n@³î¸ç¼åèþøEzèOrñ:¾­GrÛ9ºè—EÌ›¿âĤ2MúÛ}#÷¤žî»ÜWÂü5M„¿²É—‡L™VœqŽ„ß?ˆZd˜ägQÛ‡mO}b[âÓÏÌ›ê5N‡1®@~,þ4a—iw”¦Pl5­5‰™æ´a©Ãó͇Ù$ŵFˆO‹+Š%i‚0*)%V'¥Œ2 u8±£÷ ÙìàcJlÃ.#Ôî´fo€®êd„mq5Žy,:mT.‰³ÅÑâ„¸×Æ”¼¦$KwÖ¼kËo^XÔs …{àÜÌŽÍÑñ“„håµá“<‹¿>ÈŠÍãGFþ^'m$;!ñ¨TNÓƒ0åÙ5ÈÎS@zñ¡q”i#úþ”1}Ɖîм¨él)wN½3±¤ò_;òÈ#Â*ÓüÆÂŠic33ÛG5Íêè~ùis…\’““ž4±,÷ÿ‚­K—.åï®ÐMÒ’DÖ:3çXë¬>ëcÖ­–ŸÇþʰÈÑ!ŸÅb±D’h%1¦ìh3ö=¢Éz5+ì›7¦Gè#±tðA{©Á|„>å5õÒÁÖÁÄ'™Ò²¬6ÃFƒh8B7œ½Ð_žuíÂ5øƒ•ÊÉúfÁTøe’í·,zFè¸rób‡çÍÇ놋ÊIQøsò´48Ç%=²qèÆ¼·H~±=~DfÁS›£'dÌÞAë× R¨¯cÝÍCrœ#öu"®|št¬ï}ΖD}¢ág¦ÃºÃÆ‹ƒþ=AgÐ š»~¦û™ñ¿ŠÏiõ#y >Ïè5·$h³…±¶Iѳ£5ƒ°íˆK´Ça—ñ0†;.‘m;$½]?Û½ Iz¢OŒ3èãµV¤¹Ä£””—¨—lñ¥qlCaM(š(Ø$®HlJÔ$âŒxp0f8Û‹ 1;ÆIÂ;ÒGÒUI+M•¨”/ÅKIÆü×ÔÄ7ŸMÚy—¯±1nTYʋ٣ì°q{lÿøâÁ¶üU,~þ³Øú_Rõç»<œ<ÔS÷ļ‰ìn¸˜øê‰ö§S;mˆ™ýùOÖ‹Zqèü¯ŽžY_7ýŸhíÍ%Åc ¦Ïé(É{\øŽ(y{·VøÔH~é¼?f¤è0æ…æŸèÖ:Íÿ,ì6¾$˜´’dŒÓŒ4æ ‡æñzÉ®×K°MOÇ+oû zöö\kÄ™º”èmz o ¶¿“º*ˆMÂF aS0¿BeSêæ°QlÏeã‡}Äa—¯œHmÝzcL|®µd˜8ðfYX¸oÿRk\î"¡úÕ›;5é7_ªø£{}˜Ûó Îy°' ý§ÿ{¢`òoCè¨Ä&úc»ÄNS—yMì:“ž6¼g¿høÌøY¬e?6ËeµsºÉ–kÃÂe6™,ƒââãí ‰IIñìW“µFöËÉX¼“ˆ%6ÞÎN_m42Ëc-Õv{’¶:‰c{h ±ÓÚ—’†ÄÇ'Å”F÷/­9xÔ(/¤¥v#5­,' ¯9 VlE¯_ÇÂãž÷•ûSÛͯ–÷%~•p3qþÌÚŸ&̳}u¾º W]V×ne—n„Þ¤ßkH2¼el7ÅšÞ6O5_ŠZd±âZóÿÝuýîu÷º{ݽî^w¯»×Ýëîu÷º{ݽî^w¯»×Ýëîu÷úG.þ,ˆŸ“þŒ¬ä¥ÈÿÄÕH‚*N‰™l%ý_sià\"ÿºHy_Å%àWT\K†°¯¯p\Gª„TדqüüÆpy\xTÅ£è^jøÂÈ͈¤ùJÅ)ÑJÉDÍe׳4\Å%àcU\K,Ò½*®#÷H³U\O4¯ª¸Ì”ÚTÑÍ⸎ÓTœÑ+8®çôu*Îè7¨þWpÅÿ ®ø_Áÿ+¸âWü¯àŠÿ\ñ¿‚+þWpÅÿ ®øŸáÆÛ¶›@·«¶˜@w¨¶˜A·év©¸† Ñ)zZ@×뎪¸m»9nãòO«8“‚㱜~EÅýcŽÛ#|hðá Æ¯×«8ãÿ†ãqœžªâ ëã8žÈäè Trôã8>˜ó/VqƯŒÝЈ~‡Fô›Âå4ª8“SÅñ4.§KÅ™œ6ŽgrúNgôÍÍåô¨8“³áúÿë#ü¯°Ka—9‚ßÁoŽsÿ¸â…ù±™dƒ¶÷åáOê¹î lê |9‰äÃKв÷̦VÔ-| ™µ.Õö:®«—ÓšPÖpºÌûkå¾ar x¸NŒ³ZmS«ÞWrI2ï}5¸¼ükUÅexU6¨v6h¡´è×ÃÁ+ó¨ÆÕ¼Å~®7óÈmPîo5zká©áQýmO° Ëÿ(Ôlä«T½ï,»ñÿÂö[ÒkÆÞÃçTÿXöÇÏ,èïý»zÝ1FÌÅ/ï¯?2™|ÅÖPüÜò&í/*oõZ>:Mj©X¥à-¸“yéàÚú¢Y‘Ã8Àñ÷bhÌsŽœq÷ä:»j󚛼­r­cz“GnòTzë›Ç8¦548Šêry›EµÍµ_m͘~ÎÉÓ<õ•x\ûPKC¥Ç1Û[ÙP_=¹¤ÖÓŒ¦Ž cî™èȘW_íijnªóŽR˜¦[<9ã8}´BŸ·XáªovT:¼žÊšÚÕ•žUަºï×p€¸˜3<•þúƇ êêê«k£EMUõŽùõÕ®¦†ÊælÇÂJ¯§¾º¾Òñ@eKc ÔpÜ3)?gIS‹cue«£¥¹Öáu¡÷º¦F¯ÃÛ䨩o–ð ²±Æ!{êA¬Æ“Zԕ͹ֳºÞë­­qTµ¢Y­Ô62xÀdx8Uö4Õ´T{ÐÃï‚"= ®o¬nh©WýJ456´:2êG9jWWAvwãßí³×0ë=µÍÌJæŸ[°æ²îåeÔ£oíjæLO=z­iò764UÖÜî„JÅôZ5¡+”-^¹Å먩õ17ƒÇUÛ ßî¡1·eüéˆTeÅðùdÒF.Ï¥M$ýþzŸû-‘ÏÅâ¯ÅçŃâËâ‹ß³‚¹Ñ¢ö¶g3„E¨½ßÒ¹)¢Ÿ;[S‹ù{'ÝZ1ß+¿ÓûŸÔ\|›4M’fºÆ©™¦É×äÜAÖ<#Œ°dÕm-’&¡’ç‚ÆoiÜÈ÷õäsŽE>™ Ym<—U²óBø`$Ùò¿Å'êé€í°£‰+_›œG_ͦ“4éDp~ õàÞÑ?Ñü_ÿÈÔpß´¢¹³Ç#Ä©œ=vÝDH²!m  ëˆ@×ÓŸ‘n£Û€ÿ‚þøvºø/éàψ:"ˆzûRÑ F·ˆØW‹Vqðtq$ð 1ø(qðL±øoÄßEóö‚g5g‰¨ùPógà_H~B¥€t€ˆÒA©›Ò!é5àǤcÀÿEzø)m´#´™DÔfi7ߨýoÀ÷é§b§èÔO'¢~†¾ø }=ð•úþ‘»ký'jˆhÐLìwò ÐÖ`5XÛ 6àцàµðzà À÷ŽÙð7öY$ÕO” ãV+ö*–ª6BÿµÐöqi=ð 4”ž°–ž–àIi»´åóÒ (÷ÃRfãK(HèEzYzxÔ ü78 ÒQî7`;³:Cµ‘ºJàUúZØU§¯ãv‰ÐScÐpýå!ÃC ¸` ³âÊÆà¼d@†#Ì.Õ#ñUDSÝêi IyjW‘LWm•‡Ln¨ô6’Bn7áÑÅΟ†ˆ{œX‰qà^ÀIÌH„¹‹g9HœÊAq"3©8‹T3‰ZUëi$ yYÂËe¼¬b qñ²‘—òr/{W¯Z½Š¼ÃË3¼üˆ—Ÿ2pzþnIù©—Õìd+±ï9@öýS‰ÂÙЊ:šÄXb'ƒ sÚ xœ>AwÐnú>ý‚ÞÍb ʱN”=âgì/5e¯æqÍR’”ºÄ:éyÑ,}©«íÐÕ~®ýF§¥7Ø¥ËÕêæêŠt[uë3ôÛôÏëèOêoì†dC®¡søscƒñŠ)Á”cršæ›JM›LGMŸš‰9Õ\c~Üü„ù˜ùt”1jHTzTATyÔ£QÛ¢NG]±è-™–\ËË K‰Åeñˆ1˜iánR>+ü5Ü-|…úo¨¿wS!|–ÖðYöM¸° ¼"xó€M o$“A/¾u`Yø 9Œçp%Ö¾ë$§ÜjÇú›þ³àßÈù»oã×€÷,xϪ}tc^Zш O2€ñæ€ch…€Y€¹Ð¢u1ž• .E]Xˆ‚¤@ê¡h™ Hƒ3@›˜‹û"ÔŨK¹Mg¡½°hÔi¼¿³à>Ëû²*Örí\ªvÝÛ­Êus£*w#y°PŠçKÂì{£‡‘4h¿q F¡\S¦%åÏ¢9fo’Dà%ÜwÝD¢£ÃZ:1<”Îí»Bõýwº8<±oí»oÞ®“?`<€ñüÆó4)¼“Ž$åDõ¨—@½„Q~£ü$AÝ?p§r§h" -ü:]>…µ>5ü[bÆ„?ÆîŒBm€x€ Hd…?A>ÄÈ Ùá-ÂèðO¨ÞB áIÔØwb´¹äd.ý,¡½Æ@úFHßé!}#lxz¹ ­ ÚºÐÛFƒv±€@`0ã 6¾•t|dâquøÔ@ۯ뷹ˆÔhÿ#hvš]„f¡ÙEpî€6aûEšH8é€Q€¬ðE.÷ìåj1ã.Ýq¤ñ‹°¹>'ü IE<"V …ý3òÏBóаö ãPßø¶ÿ$X€ 3žØ_ºàË«ð£ ^ÙK épàiÀG„KXÜÐ Ü=ý&¨š¸TMxÔÿ^Üÿf)}p†¼×g &/Ci—Û|v´jô%çÈû}´:ìK.”{}ÙÁÐíh{Ì—\&Ÿ@Û*àvàÇ|ùA—ü–oJ°Q>í›Ñþ Ê9(á· WþÀ·ÞøÈWPß²öóÀ«`£Ë·ŸYq[y¸¿tá”c°n«Üåë…]ß)ݹ¾cÁ÷dß Ø›ï{+¸åéö7ÜNß°¨Ó÷QÐþ}¥¼Õ÷ip/ç@ É@þ§>W°­8Éר~Þ]èû"¸×=ôýÅm˜P‘ü…Ï ë¾ôµaŒ¨¯<¥¾¾à w¹_|Ë]ÎÃÅz¿czÝ×Î>æ·†µ*Öû;ÝFN±ùÖ»Üq(×¹‡ø6¡Lõm n?d~«ÜÑ~ÔáÛÅK†×xËo]-û‚§åMrgð÷J¿-¨wËþ¸à²ú-èe¿[†—>âñ¶ÛÕ‹±Ø´¨¶ù¾„†]¾ëÁcnŸHû·ÓŸüÔêÏ€ƒ-=Á/Ükàÿ/Ýkýc‚×Ýü¹—Í߯ñ àésý“ÑïNŒÚi÷n¿3¤q?ïËÝ ù>÷Äù³|ît»_ñ†lr£.ž÷â„Ïûêßð—¢í›þòà÷;þX´Îd8bõ´¼Ã-§¸ŽÀŸGÁß‹±û€ãïûWB‡ý2›S~ðýFè–ë†â܆˾·BC0^ C©îÏük‚¹¯´t‡2Ü×ükCcÜ70 ÏßÊ…LæÿfŒ~ÇßñoÎÚNöÿÎàG*®åxºwû>Ùÿ|Èé‰ñh¿àIðµ…R=ÉÌ"ù:$ìÁX¬ öyÒüGúqDÅ+˜ ]ð•GÔ÷d2Ü3Žá ¹ýŒg¢ïÓP¡§rø¸„ ‹“üÇCs=÷ù7‡ ÝLCøíÍ`’g–ÿ8fS—ÿàó[‚]žÅþ÷Ûßð”ù?DYá{‹ã#Zv°Ùá©sˈáuÍù¡RÈÿ,Tîið_ Õx<¿Rî*ÎÉ<“$± 2rNë%tÏõ_ b^_h¿Š‘­(49ïIfcÁµeø àùÓÐJOGszhëöÏ|ûCkå,Ü×3—[!o’ü‘‚³9¨Ðùœây´uYz¶·V«€»8ÞÈñz󦿯ö ˆÿœÐ†â¤@´ÝHFDåö!7úÍ[[öu¼+¿ÕrµãLó¶ 4ïjõvœ÷ì ìé¸à9ÚòMÇçò=íÝÍ{[Û!w;YîmÞßÚÙqµùpkWpJsos~ÇWò:ùXÇ7,ó?L=G}–‡õnp Ú® ö6k9ÿ°ôü‡a52ÿUÐ7!þã;äc­[ƒ[Ýx{{ó ÐUúç7¶^GToðÝp§¶ö¡ß…mšPœÜ׆Q€÷Çš¿h³Á®­<§¥Ò‚×Y_,2™Û9=žg±6ísËqíïzž LDTï  –öî vzº³Ú÷xzó‘9Û÷…Rá·ÅígŠseÈ*p: ÓÚì*8¥.4œ ¡mž7É@h§çd #´›eªÐóžw½¹ˆÃ3ÍA=ž>ÊV(sVöœ ðœ<Îÿqh{ÁGCGÐãÈs[0^Ÿ¶ƒ?=ðlûôõ(¢"ØzE.a«*V±ôà2ÏUä%½ç+÷;!Ù}Í[:ŽH>ƒu³SÎ ½ÉðÐ;ž3ÅÁëÅö– ¡÷å…îЇÅ}¡‘sºCŸy¾A»ÒL_CÆ@&”·2=›sÚâ: a/íœë]Ó6¤³È»¶-µ³Ô»¡-£³Ü»¹mLgw[[nçJïNyNÇbïî¶É²÷ù6g§Ï{ ­°3è9¸t¬ü mnçïßk1¯wc‡€õ:Tè}¥­¸—Íwo*Æ®Û{¼­ôá®â¤¶rÌ}ÄO‡ã[šËÆ·Ãì>ж²sƒ¼µMƬÜÑæëÜì}³-­ÞVÛ¼ïC«ÞÛn圶5°+Bçnב6V"'[m›w´­E\!–“8x6€Gfñ£àÞŽujSp‡gq›&ØåýLÁ}Ç:®º3XìÉ]mÿ‹¼ïŠ*;ó¼ïUQX, tAãp´d¨Aš†úg5Ä q ª 6MÚ5ÄN ˆEÁ8†eŒ± Mã8Æc 1ŒK³Äa!Æ%–°†vYBš6 ëz8.KÃ8°ß÷½÷ŠWÕÐv2³9sΜ{~ßýÞwïýîw¿û÷=¯ÚaN-x,{æècïlýy—À{üõçŒÞùúKÒø”óžìúSþkóõ]þ>·úê1·¤Âá¿áÕ½Ñç¿õ…Žúk°2À)ëX”wN>Ýpvº VÝ«îyýBUiMºÿÎŽ£gÁZ˜•W«{ûiæj³c²!¡šÕ÷Áj0-í¬|ðƵc žÚë>V¥®á}Ì“'¨„ªÈštŸª¢fÍbÅùŠ"ÐpÆ-ŒùÚ›DoC½ÍµC>­gh,œ‚Ò}±0nÓ}ñUѵw}[`®ÙÁóeµcHAOtUè7¸²kï}‚c úŽêBêK†£V˜ý­<àIð¥ ÔÓVáñ™`ä?8ÖW•XûÐg'šKt/ÍÚÌ#Œ4¨‘‡ÑQûäèXURí3\ŸqdVëxßþªtW=PcåCßJ_Úwˆ¨ iƒ±Êâ:y¬wsl)ø§NzO}Gª²=I¾JœM¾ÚªÝ0£ïx:«ü>_Õ¾ªbßqO?P_EWíÌÓòºHð$œ±l…ãXK•».º¡´Ö ƒ-8׿úZ+Ÿ½qÍwÚU†´ªò”T¦aÏ‚qÇJ -O}© ÖÆ8ÐV ’³Ueu Ð ]5Ñ>œã‰` Èa_h®Kô]®°U•s€†$Ðà‡]2¡ª¼.Éw¨Ñ×4Ýw½Ê[—pìRU}¼ç¯ËöݺÛwÛc¬Û§ˆ¤:7ìwX&«NÔ÷ áј#êqcRÕ0œÞŸÀ*1šGa„Ü­¯j4z²+ŠÓñÞh©š„]ïle¤áy¾1ùÆÝÄïsù‘dzÑ]aƒ<(‡“R'ð§qek,®ì¨~Ö˜„ü±(/ëÃ{ªi<íWÔT•7–Â<åÁo ®Ç_¸öài,ƒul¨±¼jå×r/Éë‰÷#ïë¨ì˜v”ξdäýÈãš,ñþ<ŸÀR£w¶²Ú˜à-ªyê×UÇ;A8à 7”ºÒ½íþÍ•ë†ý[á|2mL­m{ÔÞÔÿù@o£1ÙÛh<½¦ « ;ÅÂè 4½¶‰Þ@ÛÖvý ½_—Fo—eÑÛeûÔ¯©1g8®dÅôÜkôþÛëP‡‘mÁ¯i³lö*‹c¥¬‰¥²ÿÁÉN³7™‹gßd…ôcŸe]¬›í§_«zÝfï²Ï±IökVÁþ=bo°'l‰ãxÎÀ¾Ìµr'Y7×Á½Ëþ÷+îû¿ü¢‚cÿ¤HWd²%Å>…‹S((>Ï…+ÜzE«âmîãŠ>ŹO*n*æ¸?Rq|ŸÁxÞÊ[™‚·óYLIÏVUü~[ûxSó…ü~οƿÆÖñ¥üë,’ž­Fñ_â¿ÄÖóÕ|5è|ƒ¯gèÙê àï>«\£\Ã6B›ÆØ}j™ß²Ë1±ÒSŽ='7goŽ3gΜC9Gr*sjs|9ÇsZsNçtäœÍ¹s9çjNOÎõœ›ßÎʹ a,ç>Ð9sç<ðÌÁ;ÔŽHGtÎcGœ#Á‘èHré‹#èn*ÁÑàzýbˆ„1ì³_w¸Žb@´£ÔQZË^Ü 8N8®8NBð:Ú õœW•Sþ¼4ÎñýTúE¶ VcÞNãüÓô»h{`„ÿí…ñý.û {aùèÏ•ŸU¾Âò•¯*_e.å生cnåëʃ¬PyHyˆ}VyDy„íWz”öвRYÉŠ•Ç”>öªòMe{MÙ®l‡ù±³0“ÐË›ñ'©ìWÝ€^@?3Ù'ìSöû¬}Þ¾ÅìóYª,M–6+6+Þ>›µ%Ë•œ•–eʲgåÝ pfíÏ:u(ë„ʬÚ,_Öñ¬Ö¬Ó@;²Îf]Ùe]Íêɪµß³ßɺn¿áð#@ïØ»ì×ì}öø–\Øw¾Gï7Fy«B*û9„ì}i0ëÍ^b3Ò•'”'ØËÊ¿RþËPžQža™ŒÓ̯‹ ÿö3°5ŒåÃìÈObœ‹‡Ø€ñìR"ÆüçB¢óù$Ÿot©é:Ý™oqE“<Û—¿Û•@rLG™”O*'ñû\‰Ý(DzÔ%ñ¨[âÝ®$¦cŒõHiŠ]FJ—Ê!õa,¡ê+Ûƒu—A\6bªo%›ä¶É±ZÙP`[½®tò‹ße ´]² mÁtôä×ÒPuÊå$`[$H¶¡Ï°ê<uJ¾‘ê–÷!êÚ˜ ¦I~,cL—òK1¦te|+鯏M´ùN×nŠÏ¹öü.ÅRÝxý)Å’è/´ ÛpÑåþ@y©mR|ÅUœßí*Íïu•Ù)oK¨­¥!~b£Ì6lä?´Û&Åõ!×Ò˜•|)ùe’Ž~WyPRœ¸Jû¥ö&†´_ºÆñƒ¼TêrªYhÈ3àòæºê ¢\½1®þUý²RÜöÓŸ—ïw©'ÔÏÆþú°¸mùÚ©Ú½Z,ù%Ô×N­à§çÅ~/]!–·C>öåc1ìòçºN/ÅÒš,ÍÏq×É@Ú¤8/§]mõú‘«3Îu.ೄ屑ÿÔu1Ñu%ÐFÈ_ tuD@¬[šçb™k€Æ%ê‘Æ$Ä›]ƒ¨£`«k80^¥à4¸/9“Ý]Òp¦¹¯9Mî>§Ý}ƒëŽqîuß"™Ó}¯)ß~Xq½ ícð¡3t…Ê¥ùãþÀr>?äqqß øúyc¯^\ç¥8tL…®W¡ë’è#g¥{ÂYëž’Ö§Ï=Cc !ùJª3t=–ÆÍJûSˆ¼`‡k´ Õ5^áš,°¹¦ ®Gò}ª Ï5WïzZPäZ Ò%í³!((q+iÏ• é9莠ø°;ªÀ#ôµÔ¸uC îÍÍî­-î§Ü©ò½´ ÝQpÆ5'ß{ λm_r;‚öt9pÜv¹ó°½ÔFÄ5w>•ësÉýUpÃ]RpË}°àŽûpÁˆÛSpÏ]S0án(˜r7̸[ fݧ æÝí î3X WÚû¤=E¾¯‡Ž¯P}’Çq½l¼­´î·­ _¾!¤y"ÍùÙXÂ|8ãÅýÙ½;·ý-Å<¯«¬µAcYKó&1d…î²µ”Ú#‹û~Èš¯foYˆ?Cê ì•¡ûjh|B¶ÞÉc©O¤õ:[ð÷»¾xMšcÎãîYg«{ÞyÚ½€óÁÉÜç …Ìy¶P8‡Kú$Ýhß…BM`c=òó±4ÿ¤³±TÿåB­ója¬³§0>0×qîÁ¼Ãù'×ç¼^¸eų·¨×y³Ð4CÖ(i-rÞ.L–ÎD8ÿÉ\‡ Óò Mù‰…vŠÙ…¹ù–½ùîB§óná~ºÆôâ”iÎû…•$‡<K:O/Q$ãsE ÜÑ^dW–Ÿ¤\a¹)Ó)RæOSSFJc„1ÊTgT¦\1n6n5î0¦3RºSÆ6HqóRz1óE)ƒ@K 46zŒ5pÕ`l6¶OÛSúSúgŒç—Œ])S†SF)ŒSÀ«Â$äOÄ'a_¥ÿÝ ¾·­‡9Æá®ö*„—é>7ƒýwvîdG!˜¹Ÿqw˜EqPñyfÃçUP’cE¬DÖÞA¶Y´`êZ>Ž-´[·Übhm*¶Ö˜o,‚öåC(\ƃdã°ñz/ÁèÁÿbÛ ‡{iS°$J¶ƒý c)Ì÷×;Y: ›²Ù:æ€Ér!|Œ~÷>ŠåAXÏö²Ï€¥ÎòY4Œ¹"C_qˆc5^d>:懠gCâ¡í¿`Ÿà"¹H¶‰qªZ•o¹­™Ý cfwZLfofæ@zyæ`æpzñÎñÌÑÌñÌÉÌáÌéÌG€¹Ì§ {šÂ2MJS„)*sÜ“ÂL:SDz¹i³i«i‡)Õ”a²™¦¼”XS¾©$)G@Vb:hÊ36y2»3»M5™¤õ)èS3è¤^,Ô"ÐAò5dN›Z2ûͱ¨ ø3¦ó 9ø€Tj˜¦Z Àոɖùí+úM§€;œùÈÔž9hÚ u]25göBÛz±E gÜÔeºùt€>Ǫ́5H6å¦Sb3çL;¨ý–éÎÎñ”#Àg °6ªqÀ4¶€^©Ò(l@˜j 6mEͦ{¦`Á4ašÚ9nJÍ5ͤô˜f¡½ó/˜ÕO6˜UX¿¼n„YcÖBÄÖ¦—!'Ú%1g7ô=ÚöA¬$ïÍ0Ÿ²?æÓh³¹Ã|Ö|Á|9`¡ +ÉQf¾ºlyP+®£Íd7ØuHö›f@cŽ_Ç À73àá~ó³ÁœlN3›€·gšsM-ée0Fqœš÷š™Ãæý™ÓææCæ#¦vs¥y‹¥?³×\kš@Oš}PC+h<Œ}h>nnµn~)FD¾µÝzÆzÞzÉÚe½fí³Þ°v™"¬·¬w¤žÄ¬#æ4„ù8ôXªPÓ¬÷¬™Ã)­ŠžK/~IƒXîÓÀ¸"/X§¬3ÖYë<ŽëÌÕ~hŽûq³©°ùÆlZTZÔK±¦S–^œ¦S;ç,ý–¸Æ1¶9-Æ2œÂ,£)­–q[b°LZ¦-,s–§ _ž²*­Ö¨“;'-»­1àƒVIgÝlÝ íßaMµfXm ÍH÷§°”V«Ã¤K2kÁ_³æÜ“i;Ç͵`{)6yÒc¬y 3ßTb-²–XZ[=ÖšÌakCæ µzo ެ´àzÌ×Í7Í·ÍCæ»Øs`Ì|ßüâ‡æÇ’¿L7ÌOÌÏ,<¬3·ÒËqÝ’fÌxˆ-j˜Ÿ£–HK´%FË=ìœA–óíÌAK¢é %Ñ’d1šf-陓&G4·Sz,ómK¶e÷Fð#S>úDzaq[Šqþ™oZJ1–xE–2K¹Åk©Çykñ›ïZNXNZÚ,R¿ÂŠSb9g¹(ÌLh™f?"Bw–+&¥üqÖÒƒÐÃãéeÅj\mm›km±ž2µØzÆý8¬7l,efƒ.½ÜoN†Õx‡¸{L›m[l[2IòM¶4K›Íd³ƒ<×’nÛ «P¾Í ²ý6ƒ©ÆÒf]°°,ZG€ï‡Ü‡lGl•¶™½§aÏxŠk.®;`M­Í‡>!»=ÂJ ;ÇØ3i;nk¥½ðÿŽNPeÌCÏÌñiÌÏ8@´!ΰÛ!‚B#„tƒeÛÝmw ÙP¶Â>nņzC)„2CÙ¶gÛžÊ!x ^üÊAØ[aø×Å0–Ãþ üú)öi8WìÓŠ€÷Ö‚Ÿ_e§™ÑÌ‘Eô·.ëãìy߃8_a´Þ±;#"¿˜¯§3¢|0/Ê'DÙDH9‰_cI>+bFÆO-ó6&Ó)ž—å“ò¨ÄòS2]#b,AÞ)–lœ]3+ȦB°ZÙP@[m¡N›VÖvÉ® 1}!ÄÞP„Ö?!È SËþ£r3b’ofer©'dm¼cö£ÏÊòK1¤Ùbe¾•§I6`/Æ[d6Œ„Ô="ö§ËmŸýhX¡ü={PmÉ€4€)ØÎ ¶„Úê‡Ð8´Î)±m«Å3!þŸ‘ùCÔa³¯^׊íµ!4^õƒT¿$ ¥<¹€½€ÀÙñË¿•8ÔÏ«õ×sâ@»Ÿ‡úXòÓóâ ùÏ®`è\Àºœ€ý"¿_–O6–mdy úmGìõÚV ¨]ö™|lØ|€ãÁuÛZ§…ºƒÖ(,sA—Söà9yY´åª=x­¹'`×I@›=0vuÎ.Џèe½Â5µG#®—¡}(ù2T~o¹mò:¤ô]ý€Y{?ÂXûÀzûaëÕJë”Û5^–ïÇØ^™¯V[‡¤¶®´?…Èm=€ë€›€Û€!{ð~z0¸RŽ­‚vaÏ• å(ÆOD^õ!x&íÝÅÔ€H@´=h/ÝH°­Ó»Å8IÖæP€¯v…öR»ÒÅr–`íÊìì¸Å€R@ àÔüa|È÷”[—?êx“bin­¶÷¬ËÖÆ }<4–ö¡ÕâùUð¼úŸ·ö®tvP}Hüak¨<–­E+Æ¿KÿÈõ®²g®XÿJñ¬¬~™ß —çØ®qÀ$`Z˜»Nˆx˜³/ŸW%}’nËOíËóxÊXí›eí“ö™Ùå:í[CƉèo{ê²/ý&›”g‡Ýï=Ñ×÷Ø¿Ÿ{Mî4~Ži¸HüH¤áà`p0˜Ìfóâõ‚¶´]%y @ ˆÄ¶ €d@À°r{ENÀ~ÀÀ¡ßG•€Z>Á¾íÇŸpZDLJ •Ù g ç — ]†k†>à Ã- ×dáŽaDäî& S†1}0k˜7,¶3¤ Üv•(½¹&„²Û5†©íZà)YˆÇw=?ø¦/}qRIßšü8}S2†¾)¹‘¾&©£ïHêéßzÇ÷éÛ‘)ôÕÈTú^äNú^d})2¾ù2}#Òú¯ã´œðÖìu0ÛzýÁØ4#`Û€†£2Œ&‹o@yÓbü0'–ǼO‹"æÝ@ÚFûs±}›{[qpØR*‘ÉKe’Ò•óaÀ¯Ýӛ܌¾(*|K4ŒÞ䎠7¹×Ñ·Dcéû¡:úr¨ž¾š@ßÝL_M¤/n¥¯n£ï~þ¿éåØUÖ³ü7 Ýu¶gÓÁM‡õ'7yí›jô'õåú¶M ›š7µ€¤yÓ)HíY§¾òœÐ—oò€ô0ä9á älØtB³R4ž}T®“B@ÔyxS3HÚô^(ç¡:±fÏ&iO¸Tüyþ¿À²þcþ§,žÿ¯ü4û¤âGб,\=Y¶ú¨ï³úÚi,@+~_T(¯„ò¡ü%þ: ãûAW•ÑAŽ¢’?Î3_ÐEŠ_­eé̲œc£i_~axãñ­o=½±cãu¾g_ßxpyãÕ=¤£ßÀå¿Ãêþ>ÿ}ü€ÿãùkü5¦àßáßËþ¬ ƒ6 25µ&,û%[«þØ3®…¤gwùl=c1°*ë®2熸‡ú/7·óP>” ˆÛÍöèNê‹tmú]§þ îœþ°î¢>_wEïÑuëkt½ú]¿¾™®1Ï€¾E7²aý)ݨ¾äãú3”óNêÏ0ï´þÉ‘¤¿£›Ówéžê¯eõ1úyéè•úz]< `³~DêÑoÕO W¿C?E<Ø¢OÕÏ’m}èBÛÀ.*¡¿… ;öÄ3´GoÓÏèú{ú<ýÙú&¡ý‹ú>ÔAö`ù(}>òÔFH£~Äï+3ú:2§:­úãUo©:˜JuFu†©UgUÍÂU£ú¶VõmÕ·™FuYõ]¶NÕ¥ú>ûØGÃ×Å=¥þ®s ÓJe(QðЍ°VTÝI!–C×&ãýË€kN1KŒ‰z¦KÕµè2ô* ‚CW¤Ëƒ¯× ®šéºòÔeè£L¯Äê< ¯ÐyšAÞB©‡uíÀp¤6à/éæu]úxM¿%€<½IW¢ßK¸¥—t]ºKúýLÈÂÙ˜F6¢M%P~y°eVŸ öeÈì‹ÕÍ‚]EP®Eoд@èí™ÝhOžÞiɺƒz'Ù-è.‚|·t×@GpEPöÈnrèna/ñ_áß‚>}››…ó_çauV}UõUíªv_W}FÀyÕE©úŽê;l}é::\®a/„G†G²Xú®õÆßi;Øh U.žþǤ Öޙĕ/žòµÐøŸ.Ëùl ÿrÈÇÃ:$×߇ÑÊ“”¬¡ºã©nü¥5{Fã^Iã^Eã~ ûp÷4î׸ïbëH¶ˆQ‹Â¨EDÖuˆ­è"K>A²fjÇnÊdÃb+äù®S8æe<[û/ê ìƒØU[­"MŒ4q¤‰'M Ò¤&ø›Ha´jYKú#WõÏŽ³3ä ¡Wè×sØ Ñž€ŒgÅbŸÊóyE_䊲߷—>ú(X­¬OÖŠM$»Î.ÊÆ¥ +ûT.kûT’ýkõèGé“IŸ¯ä ü~ðâðû`ÆسáÙ†gëEóÑêèH ÑžEG¢,:Ž(ñ« ¢£éx!xc´hº!ׯ~|Y_@“Lj"¨£“¨þ8áÛ¢z[õ6´ù’ê´ù{ªïÑøˆû»F=(þÕS 'yí#¶G;£YŸ€T;+ÅDgD~>À/@@š§Ýº>ÃrÎ *mBº5ÍS¼¬a> IÐ5&æZ¢Ð–l`R-¾óÅ«¾¡:÷{·°Ð-<®mÕžÖvhÏj/h/Åøª¶G{ø›ÚÛ@;´CÚ» ëÑŽiïÿ@ûÂÈyUû ÂÎR5nà7¨‘j¯nˆ„<¨í¬ iC´¨ç‰¶ÒP÷Y*£”ÇÔÂNÕ•ßaoááÞà­µÂ<Äß÷RpF. Àugt+·ƒÖäæ i<·…Vö#AÒh.ŽùáÚ$à¢è0mARz´cdRž=¡3xt@¶Ü¶çÏp-ÿäø6 ÎÞßå¿ §î.¾ JvóÝà›>¾­ßü˜©ù[à¡pþçü¬?wù_°uü»ü»ìcü?Æ¢øq~œ­ç'ùIÐù>ÿ>¬9cê1­þ%œØ?'ö_ÁØÀsÿ›D¿Bôëàß”ñm2¾]Æ¿%òÐv.K„s¡ôÛŸ$Y,WƒdQÖ>$Ssø;†ƒA2ô0=-“±§l®ÎÉ3ü­Ã“A²†_ï¯ ’M²i¸:$þu_l„Æ–)H6´²›ì¶¬¯?I÷oدŒÖdŽÖd\/ÐþäUÕùxµM&ÿñ2¾]æù¯È<ÿæ2/æyKVö-™NÿfP¯ <¶e3½ñC¿V­Ù²œìîO‘âoD°08 F¤A»ˆæ  ÐËöh®®½±¶fí MÏÚ–µ·4=k®ÃõMÍmÍmà‡ ¾«ƒ”ûz@þ@óPsÃ:^ˆ!ôÐt⡵7Ö©×¶¬‹}gm˜~WÓ³.ZóÓÄÒˆÇnkž}¢y¶êIâ£ÞýDrNjs%x‚iR2ÀJ¡qòù€"QŽùZBpJŒÛEþ  ãTsX¸VM±=a‹c÷>ÐDD<ŒxñX±Vñ,lÃZ~­cMTÄØÚȈk#×F¯„Ü1@jÜÚ8Ê)¡”¤Qu5ª ú41¨ 5-ëÑèàêYĘêNØ¢ªEu)lZ£j ›-Óÿjg º¿MÑú¡¡7™úà!à±#žž q8/¦A¾pµˆH¶G=6L«©çÔOÕ‹ø<1<"< ®Ç1A±rÍA˜ ×á5ˆÁfJ× A(µ¬1p½NŠlu¼z Pƒ:B„dµImWdcPçª÷Rœ¹œÇ©Þ¯vÒ5E·ú€ú¥;… – Ö˜ ¹Hê"MËz’áÊHƒôaÅ#E’¢â$¸Júƒ\ü]™Ù™ï‡T‹ž~ …çì!˜Ÿ£ÞÃUyp)]Z¥—6¨`ÿ\JWѯ ¿Ó«ìeœ"aM6¬Ò³DÇUPžÿ1REÑ|”+^$þ&¥Žÿs¢’lWþh6ÑOý*ʹEâGr‰ÿ1Ñ"¢­T6™ôXˆ·¢|éJ#ã”yaå@»ñ·¹_TÀþ¢¨VÆ=Dü׈¿€ò`ÎaNå0å_Ct†äqD½”Gô›H9=åÑä/èÀªˆO§ümDÝH7‰?Œ©k^ ¿—ìÙN4ƒ¬UŸH|’²Û…<{è4Úµc+Ñ"’?¦üó$ù{¤K©Þ„°>œYJ8Û)o=«ì¤„ò?%úOÊ+@‘çÊ*ö’ü$I û;è»ß ÆeÊÔ „û§°h⧇Z®Ð\Ã<D7 ]³›´½O4Žô§Ò¼HP´}§ŽO »ƒcFùI\0• â/ *Òr‰ô[voR©,Å÷pü³LIPêçaôqÜåNšqX6)X˜Hý’Hó%XVå¤ZH^LÚò)ç¸À#å‹°.¾ŸøYѪ­¤uð‹DŽ”OxÅ®Q¤á¦¨+Ù”só/CÎWø|èwx?õ`+ñï}@3ú= ¨×a*ÏÑèÍ'ÚI}ýeݨù"ÙƒôËH¹XâÏ#Ÿ ÿÑ¢ä@uH¹ÓDçI¢F ÚP’G’dⓈí#y;Rð*òýDõSžAç’$5D+ˆ–#ùÏІ¥»D½Di[‚»%þ åé#zšRéŽÚ‰+€šøⓉïÖ.ZaèÎK¢Ôv¢#$i ÔAÚO&z—èy¢ï!åʈŸ þÓø[‘ŒW¾ü+ÊoâŠD­ž!zœh>Reµ=‘$½DNô‹HöRž·‰&¾›øZòÒIÈÛŠN¢ê†mg¢ =Æ¢Ñc,ž$Ñ$‰G-ÞDÉâ(Ñ^J¥»dî»ÂJ.¬½Há4íZÊB ë2òqÔ^FcÄT‘JV•½Hí!«FÉfÙ6H”ìgD¯},XN´ƒèI¢åH—´‘~þåµn‚èzué‡è‡¥nìw¢³HAŽ«_R.‰$½”ÚO4›ä§‰N"UæQž|¢ D5Dg(ÿ·(Ïé¤RóDc‰6PžVÊïê%~‰¨ðÄ€ž/,="~Ÿ°G%ÏÓÓ ~7Ñ«$¡<ÜIh4â™$Ó¢VN^á“$§gQ¼“èfÚ©yÚyzΤÈ&J#æ_ëÂŽvgÅv’œ!m´Ûrß&J–ó'(§ƒx:Ep¿4¨ð÷WÏEÊ=&~7ñûˆ.‘¤è[$™&þ4ÑI’4ï$º™èQRE6Q-I^'>‘ø3Dõ¤á.Ñou=Otèo¨Ôvâ]Kpàœ"Åu#øÏÿäat ô,Ð?¦^{‘Z-x{œhQ¡)•]$ ­9ü!J½Düß½C”žO*htñϨì5¢³Do}•ê}HyêÅ3öé¥ÒØà ˆ> <©DcHBk#÷Ÿ‰VV‰ß¥1ÃhEåöý•m$¹›f±‰(­flÑx¢´>,ýñÍ´†T½J’âÊöOÔÔFòOžTªHÒK|ѳ$!…ÑÓ6…ð䶃R‡I’Kü¢ôTvS” ž$Ÿ+„¶'.zðl@„g½‹õxÆ ¾œjÙOùÉKl+æço#åNü&É{HN}ÁÏ"¯¢qÂÿ¿ê¾;,Šd{»§gz†$¢ ""¢=0(b¢""  ²*”,"¨«€9»ŠY1,*(愺fQÌVÄ€ *FL|Uo·³Þ½{Ó÷wŸïñyÞ9sêÔ©So:]==ƒTæð ¹Z ÈéZŽ À-fJmd³I<°Þ0Ê7á4NQRLccŽÂÏ]ÚỄý4¬È[ø)@T%𜉾×(JU°t‡Ï!QÁ¤:@ü?¶R|*ÍFÃf»?w#ì1 µŽ½Bõœ<çÀUN6ú[ ÝATÃ&{c.¹°lÏÐߎ§|û =E¶¢d;äÞ‹¡ €··¥íU1¼E‹£”Ð+þ·ôœŒÖUÀ›°ÙFï XÜGÈF‰k1 +EÏ]±Ð µÚ~‚)=E7x˜}²ÀØî M!l2à à h桵 4F3ÅlÉÁ:æÀg<"Ç|©e$EªaŒÎtšÀ4ÎBnÃÃ$èÏÓ°²Ù¢º8çpZÈÛX/oä>i–MF†LÂ,ì±^‘ðªÅ¼‚7/ÄÖ/qMCéy–·zT69®Dv„<ù“ƒQŠÁ­bÀ³ií%»DQ•MzF—/"¤¹M˜!¨ýÈÝ¥²g9õ™0CÇÂI¬…°;ܱÜq–ÓÚ‚;Ê0SìŒHTX÷yÀWŒñ+TÉ]z®oµ°s?‚«Xx¨“È f˜È!õ¹1XC“d`Šl®„zÕ×…[Ü7Fò5W®Cä—rm‚Õë÷Ò;#‚¨¹½{•eBs˜ÍV`,ÞÜî•–ÏQ=p¯ìPðäL 9 Ë£¥÷Ëô[¿FZKÚ*§÷ÈõkH%¦X}ì§ç ×(à%à)z½S«Ì× …3—"šhÌÅ…"‡³œü%~Öd/?D«ü&0HÏœŒb:ШAF9ÄáD*·€ü r ß‘÷¦“ÔOÆÕd°8h Ü ¤Ÿip¢~0V­X Í)àdê û‚ùúؘ^ï¸ãôœÃe ¢w’_å ÉŠûÑùrg)ÊQ”w¦Èe p,ô[)*æS”Àž…†óÓXA=P”w¦¨Á¨¬0<ÃFôFeÖ…ÊRXÞ€Ÿ{ÐÀ¿¬š"Œ;š›ÐÜ:Bï}"ð9úÖ!BMȯ`sX‹^þ‡BnŒ^ÅÐBs˜ƒ¾Ó€`S ì#€,Ù"Ëns`hëLžCk:0h Á&£/Å\Æ»Á97­·aDÄÃYÀÃ1´"‡eNÐV «38”¢Œ¡(Vm+4MбiA£‰5„ÕwFëxjÀƒr@CX‹×À@XbÕ¸a@9æ%ÈðШûM°×†œ„±Àn¥‚l9­ZÐ`vRäIýpz·õ-¯ždx=ÎZä:à#`E© E e€¡ø}ë0Š&äW°9 ¬E/ÈC!7F¯bh ¡9ÌAßiÀ°© ö@ø˜Ü?æÀ.Ð 6Ö˜ <‡Öt`8Ð 4‚MF_йŒv‚OnZ oȈ‡³€‡ch-‡ìýÈM Ç¸ZXMxÓVÍ­ 0 PCàö50­XnPŽ8Y½u`¿ öÚ“àóâÀ•T g£U D+ź×§¹Gð8½úc¬Íx&•¬nÞÀ³- ÈŸÉ“2 š\±¯)±|‰§]-Ñë-äÆhmŒçb‹ ÷¦ÈTBÓò]øT¡—ì€úðy­ùÐCþˆgv TûÎTæ à3×”B´â (Åõ—ØS¬Á)ep†ˆÄR2BôCmûr7qeðé,<+ĸÎBœT#ó8¡æô¹ðùz\£ÙLøy@[¥í¡é‡Ö†›Âà*X– Ï Ñê‘&›'pNî-$’AÂIöŽÐ·ƒfÆý}4X­‡\ˆVÈRø¿ y=Á’ó™;Û~ì`yè èqÕ&+E8a/ÀÃ\Œe9’z`>A¶Â¸×з¸ úItF2cøyýWȓׇý$è?BlÄ « øA«è M?AVGd’ú)¥ù)¹J‘dÍÕOÐס— ä¡è勨Ü1–;dðé›E˜o¥0GÈË€¯`3¨Äèë-)ÂÒYŒ„ê;ÀÏŠÜ/eŸi+‘-i=ÆXˆMØ#ߺÓ: û2OQb o¦TfR”¢µdóú_èºà9ˆú,`®À˜€Ð¤…V  0¸ –ÀIw!Ï…x€5À`à}X62 šhÄv X)<„aÀæ ð úÞÁ¼úG_bŽa³žBÿ)TÈ!ÂS0X& Þ€RaÅÁÉe!N`z}ƒ¬9cÝD~>¡½4TTV`_Ë}.X»!´Uš&·¢²¬ ëh†yM@T>ÈPX¢ÊÉÿ2!g„È¿&#s(žbrÏgÁ›ö{ÍR9-±ú¨{–´F µõ µH2]˜•¥Ø Ì#øj”‹Pa©)Ô=X† õúoÀRàUøïý­=A²-,SÀêxÛ&ì80ÌÏÎ@<Ía× žwˆÄžþŽDbM‘…ÖQ² §Ì“p(ÜñúæOe|þC¿÷‚§Ù¤G(SÈÈBR£ãˆÄ°1ŒedXp"ÃG%Å2ÝúýU¦ž~'ç»$ùA&·.ôŒÄÃ×Ýœþ%´³b›”!‡ó˜x¦ :{†FGE0Ñq!Ñ ýž‡ñÐçœÔ'÷7š?$ ƒï?&cÀ˜0–Œ5£bº2½Æ—‘Kh›;#|çöšð*%Š{ˆU¢¨`èï¡$šYÂ{-‚´Ÿ–ø¾­8ýûè«ÀoZ<˜dâôÿ‰cÿïÿ 7šp¢'±`UR7Y™¹3Ó“éO˜Æ3£™Df“ÁÌb1+˜l&—)`ö1G™3Ì%æ&s©`ª˜·ÌRudUŒ”œ„ɪñZAN$ôõ±ì%^ŸÈ^‘×GDz×G²Z¼VÈÞàõ±ì-^ŸÈÞÑïüÉÞ“wÄú^É>âµBV‡×DzOx}"ûL¬+d_È»ÇÄú+^ɾáµBV×ÇdÑéëŽ~Ÿð1Gò‡ô,ç¤x}ÄÉðZÁqx}Lî{éëެŽìÉŸ¡“7…Iûwá40órNS`†Ó˜á´fÈý;˜áqÊ9]®¡À §'ðÂ5xá Œpú#ä4 F¸&#œ¡À×”2 ŒpÍF8c®¹Èˆ‰Èˆ)1i!2b.2ÒRdÄBd¤Õ¿`d“Ålf¶ÿCF,EFZ‹Œ´±i+2ÒŒ´é d g-2c#2c+2cG3†ãE~”"?ö"/"/*‘G‘‘Ž"#DFœDF:ƒg‘‘."#]EFº‰Œtéñ0rŠ)fJ˜»„‘L-óIÂJ´8‘W‘‘ž"#½DFz‹Œô#n"#}EFÜEFú‰ŒôF½ÿîô'!“œÆÈéКpã"®õÄQ¬^³ "­†ôX-=ù.IQë:/á„.N¯ c|–¼@Ëã3ŒË5ÛÏpŸñ¡DÁfgçU.Kn”µyM9×AWÊs $×ê 'õŒN¬D–íÃæ­И䘥™ã3ý7ˆ\Æ2qL4F¶L9ú“|ËœÉ Þ—î k{Nº+a«Ä}QfQåsßìŒ&|†ì$Ÿ!Ý–-e%,«ï@BTY*]в§ÎGÀ*¾:Z 9Áñã¦tˆL®ÏñQêóè }-ÿ ±‘Q±Iq±J=^—*ú ï°Ð˜¸ØP¥oB5ZúMF…$Æ O2ï——”Ez´ä[Ðv©¾Ñí¾Q1a6>IA1ñæ^½\y³¦ ”¼ƒ}'{žw²wFÞªøŽê·|úîÿJd xmÚ®­/8ÈË[iÅ·ÞšÅöŠŠ K4ïíÓǼ§sO§>½lxW•M'¥J¥lÍ·fdò—3ò KLŽ ã3$?2,!gä IC†èµØ r{óØX‘¯µÌºdŸ*ô‚ʼ¶P1w¯æ]ï’øuåÖOßÞønŸíÎôC%Uý¢ÛÉÌÞ9Íõ7z÷›}ƒjÕ¢ª3}ž£ÕzëËõgÞ~Ñÿâè»Ovp¿t«æâ+]/oÛÙ:üð¶œýFu)ú)ã.Îuü¹:âTµôkÛ¼€QÇ'I›ï°$(XcçÂÁúN>u£õs›p×ë½TŸ–§ü2s}ugïŸw¯‘V$ï¨(-=8úl§Ë3öè_Òºöì¹ù;‚"æÜñ±{ãa6Õ:ä|¶žw£Céc{N{¤ÚUóbÉQŒ+?/Ó4Åî²ÞOÆ}·±¯GZ2nǹ65±§Å çG—x‘²6dH4 #oJ(5Õ•Ê FèyOç SvIxÇù~Ÿ“†ö Oï€2m%3â Ó Z©>þîí¯Uíò9ùóî'w7ä}©A Ù@~ß/»ovŸ½"“’âíìB£mc¾¯“mH\Œ]ü˜(ªµ‹OŒ ’4ÖN½Œt±ˆ$+m‰  × “ã‰ÌƒïÏ»ϳ3ºŠŒ?þ¯Kü'ž“x}ok™¯õÝ¥TãORJ³¤aO¯ìfùM{´ÐÚܡӜˆ›ü ./OøGU…]÷8í•X;¶õûŠiìéq& ½¶½.Úºàþù¸€®³ŸÚ]œàX~ëÆˆC ÖùÏÈÔË®Ü)ßÿ½ÕÄVƒšÝ~“,kÍ5Îß´`C›}î}jûxž>0ÛJoí–G—[=OÞ¾$ÒÙøþ)ƒ}œ³\ï¬ô˺rýá²E‰;$,埛uX±kHñ„uÏ;QNL{£›å?wÿn_çÖ«–g´ë8×iûö¹Æy5O«l °Ý¤pL£oþbOÿ%YÇÖLõ›’ßÄ.°]‚vf„ÓþXØÓwï½°¨ž9oÛ®.{%'ò|Yк‰ŽÅÑu:Õ¦¤ŒU‘2VòC+h´Ckî•.ëÊP† þ\ÆRÿ+Å¢ßRØôÆ?¶‡†™ûDEį?2¥½ÊÞÞÁÁ¡³PÈTê·|úÔÿ‹B&šKÿù¿,LÏvæ˜7øØvR!7qJ~Mer^[ŸÎ¥.?ï^àðĿǦÁMT¾›.ï™»¥Gn§‡6^ÕŽ†ž/N(ÕOžU`ýjhà–ʇ·Ú«h>Ýjõ›6Y®;h»|>ÚåÐÁÀqK ½œw8Ý©àMåäÜw®M5ÂL[vze}ÈB[o§ÞÚñÓ§Mt°ù¢‚w¾Í}«³Ê3û]‘VËò­$û~µË.}·Åñn¦ÿÚÏJt3J6þöèæ„¤Y¡ƒOµ¶m¿}­Q ]³}'vXîÑõ*¼g²$°ßæÔ½ûJ/ÕÅOl+™v }»ËǶpÜà ~Íl5µ]åÙÓýÏ=³šv}ò™^ÚKnç °„Óß Ó(ÂHà_mTéÕjhÂæaï¬P¤ÕO3;:³.ÑÞµ–L›ÉH½ØèÆ÷þóú ¡o9ýöJÇÎŽTáAá|p'¥MP¨C'UPƒMPGò¶SÇàÞÑÞA¥ ý›x¡Ñ³ó×öHŠ:Ù:ôX¥Õ‚÷ à ž”ÀlRgôù Ée’É$‰GòN6J{^É£û¡zò¤þP»ÿ{%ðøNú«z§¼Û¾±¿Cúµg*ëœKzÔȪqôðý©—Ù5…É‘Y‹Ö¯Ñ>9%gÞ뇖vþÜàÁÃÕo²lØ|þ¬&ΓJó/í.Š>ÔÙºÏÏ–|Ûð Ô÷}!U<®ÿÉzâZÓ-zŸL ’jEÉÚb9íNõ²ìûc7¾mœ7 8ëõ¤ß ¦¸_¸«wÝ«®KbzÞ~6éIÓìÕ‘‘šmëØå/IExç¾{ìæk!û—w¯xãùµ~ýƒÃ¬~—ŸÌï é±aû"¥Ó¸¶#d[Übž¼›êr¤ÅÅg}nl/ÿ©û»qgŸ„‡Œ*¾±jÚÌù–ü‡—ª+!¦;{Fô×pÌY÷徥ο:U´^¬±yV89¶q…¤ÞmêVCcœÖ”.s#Q=´4·™½¤Ö:TÒÌPJˆW6ã›þRS½.J¾ƒP,ÿ¨ Þqq¤8…Š J 3w——•”ŠbF`J{{eg{RÌìÅ·öôíÿ²Îþ« ¶+qh`3>ô˜éªQææ=W&ûDwo~3®øÂëc¾-7Ô{pß9iªñ~»lûªú{'zz¶º‘È”:úkÍ>¿Ý¼ßÛW‘yÌßt$u@Â꾊;_[ß_;nÖå­c{O¹•^úæHmÇE}îîÈïö märã_7%Žõ{Ý4³â«cfböÍä‘fãûLîdxeìpޤÌüM»¢ìî4Óþ¶8©]y²o™?ôãµùÁ_/tSz´Ò¯pá/'¶Ókkq¶“g·lûn‹.®w’OôôËhÛž³ß?àÖ §×l‚_÷éö4Oƒyï¶>ëêðym|žMØÚ¿Öír§®NY{Ænjš5ÿB£…~]çiŽ”^ÿ^ÁFF†ñ ieЗHêe/%/?T¯¿¬$´X™6”ÉHÎàË5Å[“&Çäø«Ö±ÔË׫JÏëmæ,}¸bT—\eÜæ®…·møfj#V¦c¦Åø0ãÈíL/Æõoj™n^Æ(?«å[ëiÿPËgéЊ¼—PËúñ}ù>Ù½²]gôø÷k™º9‘¤6-A¨b¾?T1wžåª˜Ór£¦—àõïë+a†vî>¥ÛŽÊ8—ö{GWêÚÅæöûP9r\µG›[½òµ¿]xn£ÜЪx’׊´–?åu³ó8”“ë·æQüá{>¦îí—ø¡û ×)çê4º°i¹Í'm¯S~mõ¿Vÿ4·AŽt“߃sø×.í¹æõ›—5f´Pu=à·ê•O«éí7f˜,)ÏT˜Ö–{~œ·þü3ýM¿xžk~maâÒö 1«?š¼ò¹QlQhz1gÞ«]©!~½s_¬{¾!À¯l5Û§·ÝÈ·w¶—dØÇ~Ù¸T¿¢2êé–ë£ç:èé†-XYú.çSã6šaN™¯'´èøêC¿gWR–9Ž,[bÚoÍÑ|Uo“½&ÆÌOeŽÃ[^ZqV³fºî¼A1ºúžÝ&µs_“xõMôùãUñüûÿœ9?»¹»t؇Ë"´’6u¬¶±kzîIb§ÆoãvvȨóÞ5ßÁ0ÌLwN™Þ½Ð·q—ÜJ®7}žzJ¶çúgëû-ædåi}Ö·rɯ¨{¸eŠÛaŨ¾a£\< zVyVïNN½­¥ÒŒ1IS¶(×õ-{¼þóã¾zù¡+ê½ m'ãZN(_êjurÉÂ¥Eóo¯n¹½AàšW9ÛgDNÕms8y cº,¿Öpâ{é–g]ÛWi·ên·˜ÉÁ}¯^šUtÀè“nâüãºí`]F×G­^V®—«·§“—ÆÍ“Ýø ¹‚Ôï—ßë·a¤ õÛäQ¿ùN¼Š'Ûѧ‡Q{%Þ’[mòöw»ÿ¯ª÷ºõÑ;ï—º/n?iŒm³‡GÊ^9¸•Wþ¥2#Oˆ5W½ê‘ŸÄ›7ªTÜð]Ú¤_fóž‹·¯äÛÜaÆ<›x¤j¶¢á]ÙŠW³‹[\p°œ¹¶öm„‰õ—‰Og™¾xê¹aýñV>ççêsYóʈW zÊrê6G/‰¸Õö®›OÁŒ+ÛºÙZåÍ4Ä[§Bjýyô¢E|ìÌ7CùµŸ&ß\¾ûYËå“?^Ó£±ß'Æ{OŸEëÜ™þ}ÃYµ Ï]^q]žÞ?§nÚ¯úhf¬›V=$å›d•©—ÆtFw«Þ¯•ÛáS6¾ëv˜¥¸*ǯ¾ßeê’õAì^Ó;¿|X½KrÉb€o}wò„¹ö÷ê½0òë?«Þy#ü7Õ[ïÇêM4 Ÿ¾B(¾é‹øôù]~ׇl ú¯§g†^j¾áúþÙ›ò=ƼUèÛ†ýSõÿ­[wµÞò9'¥½;–=ß“?¾ôRêà’¶I Ãctô·]::qáÛ’Æ9ób‚ø³<Íõ½V–Mp)÷?¼#`•ÉCSÉŒ¼Ã)µs¯Tu‘Ô”]¨Å›ï^þʧIÙ m‹+žÎ}#íø“ÌZ¹Ýtéó_Ú[ZÄ~ÿ¥"e¥mƒŠòøB#ϵ Æh%.=°¾óš›Óƒu_ö0\1×¼G¹Âؾ®XÙ?YÙ­C¢ö¹ñÝê§kéß?¡´àÕ­M+=çN9íØaĆc•…?k÷œXâ“Ø²†?8%,p¸¤©–îµ;+Þu=°ÛÆîiÝôŃýž­ÏŒÎëìQò>õØV£ Áí^æ¬n§’7.êfÓ"ã•öYë×{í~\WõóÞGs“xžNhÕ¸M²vWïy ÃÜzîÞ]00âܺžõi©-Ó²šðáÏz6a|.Ë¢å•^Ï;DÎN?EkbþjJ•:?~BMøã¶R—ÿ±µ = ~ï(S’¢¤Û婳®«‘ûœ×_³Ç÷­¨û¶úC¥ï›Ý>­-3‰bB˜D&r‡3IŒ9ãˤ2ñä]Ñ)’I]ß&ÍònÖ¤Ôø¸ˆÄ øÈT»?]Td&rËþŠšð#ízDZŽ{ýy՞讞e·_ìlTðiþîÍ-=W\šqqS…÷Ê ‹óÖMÍv´7J‹ûýú9öSž&+VöÕI;2°h¢9ƒmËg°–¬‘\™Á6!ªFÈÊÿ³SÀ_?‘ø!'â~LIí?ž¬HÈàêNÙPø”Mé¤trày~ØßedæÒc®yÆòPß’~¾'–^ý½§ãŸê5Í•‡û.œkqÂ+vô™+á'U÷’] ÖÏI¯ó?þô ù`·SO«j ~ÛéÒæ÷“ãïT/õ–—͉Þ6!¸¶Ì©*µnÊ2¶êäë‡.Ž=G¾[> endobj 1065 0 obj <> endobj 1066 0 obj <> endobj 1067 0 obj <> endobj 1068 0 obj <> endobj 1069 0 obj <> endobj 1070 0 obj <> endobj 1071 0 obj <> endobj 1072 0 obj <> endobj 1073 0 obj <> endobj 1074 0 obj <> endobj 1075 0 obj <> endobj 1076 0 obj <> endobj 1077 0 obj <> endobj 1078 0 obj <> endobj 1079 0 obj <> endobj 1080 0 obj <> endobj 1081 0 obj <> endobj 1082 0 obj <> endobj 1083 0 obj <> endobj 1084 0 obj <> endobj 1085 0 obj <> endobj 1086 0 obj <> endobj 1087 0 obj <> endobj 1088 0 obj <> endobj 1089 0 obj <> endobj 1090 0 obj <> endobj 1091 0 obj <> endobj 1092 0 obj <> endobj 1093 0 obj <> endobj 1094 0 obj <> endobj 1095 0 obj <> endobj 1096 0 obj <> endobj 1097 0 obj <> endobj 1098 0 obj <> endobj 1099 0 obj <> endobj 1100 0 obj <> endobj 1101 0 obj <> endobj 1102 0 obj <> endobj 1103 0 obj <> endobj 1104 0 obj <> endobj 1105 0 obj <> endobj 1106 0 obj <> endobj 1107 0 obj <> endobj 1108 0 obj <> endobj 1109 0 obj <> endobj 1110 0 obj <> endobj 1111 0 obj <> endobj 1112 0 obj <> endobj 1113 0 obj <> endobj 1114 0 obj <> endobj 1115 0 obj <> endobj 1116 0 obj <> endobj 1117 0 obj <> endobj 1118 0 obj <> endobj 1119 0 obj <> endobj 1120 0 obj <> endobj 1121 0 obj <> endobj 1122 0 obj <> endobj 1123 0 obj <> endobj 1124 0 obj <> endobj 1125 0 obj <> endobj 1126 0 obj <> endobj 1127 0 obj <> endobj 1128 0 obj <> endobj 1129 0 obj <> endobj 1130 0 obj <> endobj 1131 0 obj <> endobj 1132 0 obj <> endobj 1133 0 obj <> endobj 1134 0 obj <> endobj 1135 0 obj <> endobj 1136 0 obj <> endobj 1137 0 obj <> endobj 1138 0 obj <> endobj 1139 0 obj <> endobj 1140 0 obj <> endobj 1141 0 obj <> endobj 1142 0 obj <> endobj 1143 0 obj <> endobj 1144 0 obj <> endobj 1145 0 obj <> endobj 1 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 3/Type/Page>> endobj 2 0 obj <>stream H‰äWYoä6~÷¯ ò$±LR¢ŽÅ _s$3gíl‚ƒv[¶{Çn9jy&þ÷[¼)5)[n/°Ø}é–H±Î¯ê+îí·Ýòr¾èЫW{û]7_\×èÓÞAÓuÍ-úcïôþ¼{¸«ÑÞë¦éê퉷“ùÕr5ï–Í ÍfG‡hçÏŒ0Ê EEEQ[ïüú=ZíœíìaDH‚3tv¹ÃÊ"©JÄpBrtv±Ñøì_;Çg;??YB•%Ä€”€ã`ÅÏ;{'Ü•÷óÕŠêU¼÷áð݈}ÌJœdèJi¢\ )Q‘Ó¤ \ɧèñ.êx7Úõ2fQÃWü½]®;ñÚ>Äœýøˆ3Šª*IËÌQ6ôèO°%©rTPš”9ÈLÒ,C”%”fF²×mbÝ~‚ˆHÓ4a`Z$e)£@qL“ª*íCŽÃ‹ò„¸Þ?G_žËH…ÃHpÁ%IhžiÉŒÀ_ú¤`PŒ§Èذ®dII³^8ŽõMÌ y´ŒwYô5æßcXn¡Ž3"HßbÂ"Žš.ÞÍ`;‹®ÑËvŽôëI,ÿs´¿ˆÁŒ©ý–4r{Rb‚…n¤³pËÿ³x·ªµä1‘ ¤pÓô¬HÐBAÜ<í:Eü,‘»8Á¤ø/-ª„¥®t´­| M£¬F å…LúBáß)Èü ˜ùóDóŒ¬un‘BR§³ÙKö Û…*;çâÈwüSŒ‹è>³k$Ècù±nëœ8•åŽ+Ûçœ@xx—u¢s¬ŒþM9¡ÝÔNi4¿ÓA1À?Q_´ºæš;ªf=WO<‚SMé™Â¸¿Q[Nám])´´ôE£Æ+%K ^))†gæJ?>ùn[ù)tî¼'t£ ËZ’é á‰ÌÊ—óÆŸs—ß‹e–&ÀtbYüèArS„³]â$ƒ\™Œ[Øßõ‹Ö~Ë]å·³/'Ÿ¹j'd1*+¥ÚI±ÐÒ7(´¯‡¶Eh5iæež0‡3S:NllÈò#BI’ÓG9ž»"KorþíM›Q?ÂøR®EñcaÉ7š÷ˆ„`ëvó?ÃöSâ ¹ÞfÈÓÁ¦ô0½• hÜNºæù  ¼P)^*yY%XAEçaÞBör“ÊùÍ}øê­ÎW} ¦ Áo[±$ûÕZÏ=A+D1­\0%JpLKÍWމ¢ñÂ'òÉ,aKˆ½ÑR÷•fÊàä1%¸)tVøÊw[üÁ #a¬—­c^°¿Åf¢f’05_ëAb]¯y¨TUjêÄøVÿ¥ch–î55::¯õòJÛs¥'Skâ¶dÀ˜• ‡QÆ„{œ¥Ì†YM5}Ê̪X˜1} ÙcKö„é׈ò \t.‚ƒkdh[É ìö “Ïk.‘$Ý`̰„cR;SÙ^D‡Œ™zs‚6͘4<3Yd ¹O¿5’l³W…E{•‰ÿczJh‚•„_¼úVþ÷’ï¿4ùÒÑËÂ$’|©{YxŒ|é|ÓòbŒ"ß ìý€f/h¸d4L¾2»¶Ûÿ¥QôùTŧ›üF{ëBHCLÁâó‘¾k¾0{‚I9ªš¯ß#½ö{KéÛF™¦yB‰ãð8½ä.½¤•iÌzÉ2ç>àáÏIm»<$¯N”pË‘Y`[É ìö†E’§îGÑHk-†3*#@2¬²càÉx¯eÓô)š± GhFIv˜G£QnÔå¨Peºñø¼œM šb'§†˜*Rp„›‡gpÄÈm¢9’%¨õ£±z!4BƒÁ©ŒÂßyʾj¸ðKκ^£+~c‘-ޒıJÿ‰ Üçµ ®F-§*œµ¦™«ÛzÕ©¾Ï©@J*Ø6ˆî˜9ÞŒ’Å. `jšç€paG\xj'ƒàÕÓ„Uöš.Á})5¸Ýg ,,&Ü3€Z‡$0""Ä Zs5ä€lÈÌËSÔi 0úÆ(@ ~úUƒÒÍš‘Á;¤Ÿ=5g£ñ *¡˜1øcê(‡ÿr&¢Â—ðlW?g%¼»UÌD‡‚GœÎdKâË,x"Ëf$$8+Ìgøµ_ðþŒ0!žs¾ÿ©T¨¿ «™d þ~hs‚ÓÙk¹s8“E) €çñ,…Ð}»N³™~Ló™V›!Lh/fžFòHŠÜPº±øñÑͤ¤§ðÄ馟ôRÆ3=˜í2ýž÷Rã4=´±p“Ÿ¸Ð¡ç§×\Áä^æ͘' )ž‘ÂVBœœó^è±1IÀôpÆ-9È, Ù6uY‘óþç)ýçJÔ嚥IQ…¯Rj °ìxW+þ3 Ίî-jpQšß(ö4#Úú^ÏqwZjÓvqö‚aŒ æ3£ÑH2s`½?àìwC¥ïkõ)ÌŠñoÔ d¼üg­N·ŠÆŽ©£6Õ¸Ú´qÕ³ù Ÿ&ô” Ûÿ¶E[læäiœüS‡üYžÒì“?+ˆsõØdßI3ºgtÙ ¿NÄà›2ËßCöl+™Ý>÷÷6Ö^¶Áý#"BÜOqBØûÙûK/÷OQ§¹ßèã~âN—O ÛäþÁ^âリ Q M<¸ÉÙ¾¢ë„gZFÓ.çjº†æakxq=WŸ¯t5^éé»^ë%oÉMq‡ÂËÊÑX»%—»%øÔP”\Êxë—œç¤6^ –œW§ø\W"x_ô¶D ‹-GÜØŽì#]# Ñl{e› ÷•€l½ë=º)ré/‡Â–F¦¨¨z€ÁI†®l(Ç Ä.+ó$S·ÍÃæ.ÞeÑpMÔ.íÔ<º Êx>U|^‰ò·*†ô;R>êˆÐQi ·kÎbB¤ÁÂü5ð`ÄÙ°Œæqõ÷ügÑ‚oJ7ï`³ã+ÏòoåÑsø®æKâGœG\ÅÜHêŒÆ†ÿ´âà óá9z)hÎC+%Ìá]¾æ‹ò •+-yFˆ×o1aJ®8¾Ð6¡ƒšo¿@’Ä ÷¥6?JiKxnÌiî›ø½ç‡ùë¹µ~n\’ï0ÄHY÷Æú Ž*¹½VøÇm“ælaãÑñcó™¢kØœö¦ý'/ûÇa><ÄÐc#:É ¬“2¶ §ýãŸ"Ì£ÁøÏáÛ8‹?¢—š7ô‡\€R‚u–•Êù$7xu@ã#DÚðKršˆäÕw2ù<‹"Ý|bt@þ”r·j€I ´J«ª7ç?~XŽf=K®.…­Ç+ÞŽ$à®4¶¥¶Úel¸âáMó5fê GçÐ;dÀ-;^"æ+Ùàë¸lQ©õ:Ba!DQÈ纪–ºuX³Z)ê\¶VÝ º‰oDZòW¡íŠKç§$jÕ5x±‹l [¹[ñèÒV1w,dœÐék ? Ýp¸à/Ò–J~ ZÕu!mÔÊxñãÒ\ÝĪžù“˰¹ãྉU»üª›`+Œw¬[y»‘[ÝÕE$ÿÍz•í¶Á_áÛŠ€Åˆ‡D$¶,àx+Æ.`¿(º D¦JÊñ÷;Ó=} Eo<ʾä 8œ>ª«ª£Ò·ªY‘u–àˆ!-†Þé úGœ °3Pä#Wç\/"ÂÊ”%n}6(’¬:;ülP&iéÅÄ@ScKqoP€¹J¨Òl!n7g$TWœŸŸÙS½ã+-3Ë›Q©‘e8-5¸Y¡ÁsºªX¡DRˆ¶0È& ó*×lyªŽÞðUEpvöwl=Ü÷+ò:¥zuî8ÁÕÀ€àÍK #¡²u˜2æfs)¼ŠáP±ŠL™RŽT"´Z¬lÂáH.”ŠA’åJ$œf(óÆã+ÌVQP#à·hNöD,Ê¥ëÑ}bß>ƒ|¤KöŽÉyOg!˜$ ì&ù²T5x™Ÿ®Î[ Ò<Éœß0®ìB ÞDWkãcö³Ít-hÎYÒÁ()Õ}/Ê*„m y5æt:·„9Zq7~Glì©khM¹8íb% ÑS'?•ZÔ6-'`/?¶®³Ï–mžq65kÍŽ _¸Ä("óѲ0÷5—á`ù_Ÿ8 ðXÏZÙKº&MXœ {›gà^×õ+sÃŽé¤UçdÉû¼_Éò³&ŸÌ#JÆ-ˆãÌ€#2[ŽÚµŠbšbÎ_óYnÌïØñ¨|¹ðÀÿ%éZ“­¼m—“«¹0Ø\ß*7z­8¹anŸjXpœ" Û\»Ûm+µ÷Šù]þj¶'àôPŒû(F(qIœÈãÝbÅ„_3€÷JþÚÆô¾& ^ß“Þ~ÆC9h~ºÄù[&ó$÷[íÀjþP •@ÉqmÐé2H9)²PØ•e2,1U to<´vG“»¥[Ô>rþŽ+!¶¯‡ªMvîw¤ÆfÊË?!Vxç”XGæÝUbmnsÁi$Ås*îó¯%É£b­îH7Œê+Ú¶=ß½%3d>s%7Ž÷DjAk]"d1@ï0%°1a•X*üünJaت^«vXŽ0ÔfiRùHqÁ©p ØÉ#3píacÿ;™eÃY½ê׸>ˇ6¤5C¶@ûìP¨ÝÕàN ØsÇô£­¹ëq®ýÜ—rñ3ñw¥Ö5–-û‚'½@Ì™¹EÀ-Ö(Þfá½Þ¦6¦ó©ã`øñ¿oÑwNOº´oOÔAÝÊÇE’V^Ƕ:¯Æ5®"èçÚA1 “䱪$Ú†êÞX:X‘À¡e¿[Ød–𥆄Z°Z²¸ &A Ùá(;ÇàVŒ–üÙ=cÇ÷Y,  ¬iî£mOÄq¢…3äR;÷®|[2›Gæ\°ägÉzïaÝM5TÍæß|‹Ý%­:}öçï`sAàá Í}>«c2죑Á ÓÝœØB†×¸ÛMámré³½þè;ïæ"‚…é¡ýD°#Ž_E4'&WF—Sزõt¸ bÑtœ 2§ y¯ã±Bû̶ƒm&¼6ÓÆÙÇg1JŠÊ#sh¥-ôŽI@µXȃ•e.UÞS_[‹òcÃ6—,–ÝšKÿ ÖvL»äW¿y{Ž ìª«A5ʆƒ$zuýÞ²Ô¶Ê•Úðþ—ìJ¦\¾ õŽ_þí6ÉP÷¶K¹÷]ª¶ËŽ1ÐéÃ2%©öÎjO7䩜Ì×$'Pm¤øO>…G¶âbaæÉßQ‰çX¡1/ðYСӉ1YC‹®Y@¨¦ä ë-¤ÂJ ?¸PfÌøÿRk){»™g^÷$š3ž4Æ–£qGÄjmoõ–Š„ÖÍŠsÓ†ã9\œ,<qšÙ«Ã6¥2© Ètà#ýiêç-&9(þ‡`6LFi§ÙÔ³ØWâ%³Ø–¤VåîÂÄ$ÍÍòc]° âmÌv3˜L/ÃWðéÆKê€~EpÔ±¹&aœ[B·%+“À§/öøõ‡ËÈ|ãÕÇèõëW7ÓzõuüêÃåŸWQžFoÞ¼»2/<{Å )¢^d~Ä>gÕ˜k÷6îg½Ùך{ôÝBv³˜cÃG]cu×é¥é0)Fêâ—¥—ý2=¿Ù8O†cÌKQÌŽrûÆ`ñƒ©@¨÷#|'8Sö.Y{,#68{"ºmå¸þ§cuÛ mO…Âw.ý¥öè{‚–¾Ämë ‡Å ¢xì¥ö¯2lƒäI‘ª2öú®K/:Þ$ƒÙ|fQ>µ>4¹ ùRn ã¸ú­@Æ’¥­eƒ @rs~xv ¹á*ïøƒ)Äc|t =t¶°‹Ìé£B!ôÐT꘮"öXË¥¼y£èH¯e î“Iÿ¸²Ì»#Ñžhïi‹~ç:N µp6+Æx¨Ädežd#,Å_†c1ü®EK]?á±k{šÅE›©«tÊ·ÚVkg#dÝé‹R¬K4YÐJztÆbì´á-äy3¶N{^tãx‡A»öÞ|áíävqÏÌøòT•0ŒYîè]ÿc‹Œ†YAk*ÛŽŠ3wu×ËPô;á¦:ðŠëžyç?Ûó-†pˆ|‹ÂÊT‘É /O…‡Ënïd½MS·È´R.æ…£ŒîQf­Ü)÷€ýnDBv߬€}øÊO„PœÛ.)ðÚ@oèÑ mˆEùi´üз>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 4/Type/Page>> endobj 4 0 obj <>stream H‰¬W]oã¶}ϯ úd m}YPÈv³Å^t»éØöA–ÛwmÉW’“æß_Rä )R›Øê}Ùx%j8gΜ™ß6Ýî1/:òÃóۮˋ-+É—ù»ºëêùkþpZw/GFæêºc ™¯úÿÝç›]•w»º"?þøîýOäê¿W ² K? I†]ýþ=©®Þ­®æ«Õ‚ø>]Ddõx§ ÍR/¨¿$«òjz«ÿ\Ý­®~;ÛBQß0@”»O܋߮æ÷"”_òjCf¬òæŸ~úøž›=ËË`¡îðS’D1"q×Y@‰ÑÅ"˜}~bÍÓŽ={­þuŽ×ÚbÒe`X=ËoÿÂì ¿ƒˆ¦Òí•wÓ¥³-óüÿŠù¥7òGãÝý;þJþ8À“|çÅüÇrV•ž:Óðï䳎?z7"%7¹äãY¶;õ¤%ð¨äŸÉ_ÅépnîtTqJ‡‘ñI/:uÞÄ}7î-jøb‘ˆèäcíÉ-+¬ŒE§^µž¿è3À {u}ÕqÅB§Sçµ=ªC58[Bb*¸fC:Q#,¼òÉ]P9«O½¢xÕc»ÌZþÞÜzòïƒ'ýʓǺ‹ë%1]„º>³›K{:JRšÄf…ïÚ«Œå`!(ö.³ŒFK Áo¶G¹rûڮгè3½¦ ’ó:jœæÝAuHy†ô fxÕÚm}Ú+4–„ý-pÜ«÷92à nVÚ èÜ(4üO÷ç)Hcê'ƒ\ BFªô[ç°Kþøˆt݈º‰&±Ø¶&¹ª¹ Fäªïu@ ¥v1 ƒÛ^;2°Ñp.Z‡Ex?¨ÙWÀ»oq•µæ%4ø…A8h`´NÃrº¤é›X†k¦ç̘ÑÚÖ¯j˜÷ne×n¢‹ÚIô±ñ2IS[àVH}+¼xB@ P5Úû¨ü~´«­©ÒïŠ3 A‹RrÇÉ54#æä´³oêñè²on>Rö †°9,Ðif±”ozEÒHêëÆôA !ðu Tª2‡à)l!‘,@ë¨4$¬^e£cŒ5èOÈïü˜SEä-O‹oñÿÄ6H¸wlƒunâ«pµ¡[I‘2”¼Ùu/ ³˜gÏa|SX &–W ׆ۨ6@‡ˆ—ÿ·¶ xê³ÄÈÉåâ2|ºÌiUêòùwè³&µÈ\;ó_´ JqGmÀ<Á¯ØUþ§$;-5TB` |8æÕÈ"¼¹òEs™ Ãÿ›’fc¥!ä«g2LÃH±äß³‹õö­œÓƒðÂúa5£YüOJŠ ä#T¯Ø KºÃúÆËÏTŒOPyî¶]Úû‘º†oÖuxÌZ.Ít’KÛ!æ50ñeöçL+V®ºÕdÔûW©âÂ?=8J/îåxÐpÜ÷‘Š#^}š¥Ä_¦Bðw‘¸àñ{™ÖѤFo7 ±%x7öi¬¶¹O‚ò•¶RçŠÄö[kîï^ýp#{Ü®:CÐèu·Á¡Dø’þ§+I¥'‘<«•R{BF‚éøÝØtT†ÀË9úÓØ£?ÿpM‚Ãàd©’÷jÄhÑP[ª 4ç¬%(iK±e@öò'7é/l1 E?î`ÏY1䯩8”ÐÐ" Jha<(=‹ÙûÏ™å㸠S”µ¸H2€¡¼€@¿rî16Î2¨MmÅXkeµëú” ÀšS›òÀÌg0ƒÜWÚ{DÓ2ð_a2Ȇ³ ÔÐB}»ÖjÂ~WÝB{^ÞšðX3ܵàVäüu°7S›"¶äŸÔÏog'N NG:»’½­÷ê{Éccbªnˆ–eˆ5)ÎjÇ|1¥—[ÖJ‘;2âbl|<«jˆKôª­Ä¬êpÓ|} š2I¾–%ÛmÉȇÚ;Y8“7м!¹ìEÖ’±9°[9º aH!xG‘á´ª)±­ŠÔÝf˜Óç?&â~töÐîb@Ë(!‘¨Ü” c)/z.Ù’(£üÅÁ."^Ó/f »«´ÏüCRäÁDJ~˜»0¯téòÔ‰ÏÀEn°F%2WE€?êÃeEÞâRÙºÍmî@êwò:Ab´Kä=$Ý€¯Ñ0ƒ¢É8õí[8˜?iBÛÁ9­F{=t]0¬Ó”:„!×]±Q‹sÔ䘙phf¼¤zM‚Ü‹\l ý ˲\Ï;.TݰeFw6î¥:o½Œµ(Ýäù ¨xÐ]sõäHÍ©çO©Yœ%Ô+ÙkkF|"æ-U“ÆIJÃXV4 >%w’Œ|.õNæ$é'õ%¡à üæ-gŲœ¦îã8¥±Šeò`¤ÕïT§W µ+*j~N¥ ÆçÐn­f:gy> mz«ìß«Sõ¸øCΫŠÑ »ˆfèŒQø§¥4£ŒþÙ#RzŒ2¾ÂtL££8£¾oTjv3‰Žøš™†ƒ‚Tú¸nxÈ* {;(,E}PëÐFò©2ôj‘›pP£‡áƒ½žáPº†ÝRÓ\/D¿ôh3yÆÆ·àË Å ¦6I£mGæ‡Ö¤¦\¦4J̸¦i„ħq6ˆ ^ñØûþ°ÅS«…oé‹ÎàOëÕ±ée7îcâšÒ(ÿ橞}ò|‰/€Èˆ<™+j.EzAÀ4Líâ £A"S†ûÎ €žy˜÷ýìP7àà‹1|paTXqòÕÅ—VI|õ“¹–ÎÚЗ —\e°Q·v˜¡b8·ÔmýþRÕ_ûý…8ºª=5E– ~ƒú c Nû±Á¦U',ypÛ°¼l©òaZ颀ÿ ò¥n’iJ-Êú ÔJ@©± צ<‰<®l6Y¨ù4ŒKÎ %&Ô¢$ ±ÿ¶P{P›m¦q,s|‹ ô@k¡)Îo|âÅ|ŒHtŒ¬P“a0ÄÜѼĞõ* NëiØ÷±üàÅ‘zÈnÌÍc£pà´uBa’ê.z¡u®Â-XÛæž&:à Ñ‘8ý‡›ÑWFJ6 aÉa°Mõ4Iuy éaZkÞðµ×OùúT8.;—²C|Aœ2ÜBÑ(†i£?¡±iå‹!Öši»â‚ÆÁÀ"â³tÔV»…wÍ¥Óu[€CôÞ:È‹…d+Š»Uˈ™N%qüŽL_:M“…b³0çðV6‘‚ƒˆ.%;rš¤dÅòC{ ÀV–ÒÅ22í㵿˜H·‹ˆ¦¯Ñ­¬¾bŽpoölYgkQ t( Ú¬ V´µ»‘´®¶bC¦F?ØßŽ(Fz`¢©ŠÛOû“ZÌÕÎÒHlù`$C ÕÖç†&*@bœ@õ7Æþ§Ö-tB²¶WݨðÛΖI§¢S§^s}¤ŽòLÃksÜÀ`Û¨pDô¤=_M£¯dAÃÈ@è4^å ³õ›]?[BùÞÞÏ\?­zãç@]È´æ~¦±)Î#{±à\½ÖŒ]4¼ê^I¢v(ýh¿¼éJƒ®}k;0šB]R)a­…weÀ¾ÈMá¥Ú“£‡OÑí_ñ´†um¸/0\-HΡ®±(.D¡Á¦ ù̧áC9æÿã¼Zv„à¯pEªÜã„~@ÔCÔ^zé•„DáŒú÷]ï®c'õ ïkfvÖ¼7zpŠáãi®A‡O/ü[â½(7J(AãÂ== <è–<3ϳ°Ùw$~:œ£?êa¶uNSc2ê¿<±“v¼ä:14'&gXXùɼ^ò‡®;Z-{ŽìþŒCë#ÛúÈ;ã[cÄàNãz#”˜9mõ-8vl¨¯¿@E“.4¯ o,‘]믺7™™Z¨í&ñz<¦¹,U)Q®=Ü-ó+«4›%e%Ô/ÝRdŸG¼n­¬›^HÀ‘ëá®5jÚÍ‹¤oøW‰W­l‰{Y‰Eš%“·zbÉÜLÉ%ÇbÀ ]ÎK k>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 6/Type/Page>> endobj 6 0 obj <>stream H‰¼WmoÜ6þî_AôÓ*°i½Q/¸¢€ãns¹k7Ù¢8…!K´­;¯´YiøßßPä”´ñ­´Á}H¬¥Äápæ™gž9¿Ø¶å]–·äÇÏ/Ú6ËxA®Ï_×m[¯É_çw·íó†“ó_êºå[r¾ê~]e÷e•µe]‘Ÿ~zýó%9ù|â—DžOâÔ'[~òç+R¼^œ¯V.ñ<ê†duwÂ’˜¦ a.õ"²*N¡³ú÷ÉruòûÁÒz–¢ ,/~?9¿Wù5«îÉ‚WÎùo—o³yé»ê /!1c”ùâ„ëE@‰R×õKç¯Õ?qW›b0c[«ŠMíœù4MÓEYµÍd“žŸR?²lob¦D ‚€†¡ôú­s&B.*â$ð/ÞàÊ…#ÿ~t¸[¼sØ‚·‡^K»4†'sèâl*6â†~Øó{éxlñ/åá)ºLð!«o° º Ç“7ªK'‚%¶¨Zø,î ðiáȇ7>;ž ŸG‹ WÈaAðÌ Î ÉpƒUN¼$ ^/÷üëÍòê¦?`4{QùäH&æÚ%d­qÄ&¸'qXw“ŒäõZ=¯qË®räƒØ’ P×­`ÿÀj^ãÇ&LŽ}ÅxéWÔÊ\ц–*…O¸‰oŸ´Ÿ9¨+ãX5aȨǎB ¤¹©È_&4îkë©ÖBl™åPy4özɆ)Æ”Éçáz )gÃt‹šÉnmàè,+٣ ü=´ôŒç+Òì\}BäÔ¢ѰmÑÛºE”>Œ÷Å'5¸íë ÚÇ ½.,ÜÊW[ñ ®Éñ¾k\>'Z7­q·®o• ~8Œ4ܼX5_G›©"%,Vâx’‘þ„M*¸IÝ]ãD%~Ë¿3ybZ‡Í£ŠU—ñ_;jò>;FR.úÙÖyç‡XmšS–9Øwc©«ï±DP9az~"_¨/ÛGÕfÏðÊÊcÈ‘j¯ ¶‘¬p‰]AUø{ÀO¢,"øX5°Ar±ó9î!ƒfòwQm_°Jø“ɤrɤLmÝ!&z«HDé!ì~_Dô²Þð€b`L)v˜¤VV¯nuó•˜t•hå©‚Zîk­bÈ4%²Î½Í¯š(~ÐÕ´-G”WoA ;ÖŒn?Œ´†]jj{©>•6£^¢4 ±¼bn(.s”É‹‘Üë@F8L>£´ |û<â";Ûÿ£wÔÆØ|±è»>M|; B,^>–ó\µ7o«²ý$¤ßdAÌÒÀX?hÞð§ÏŒ¡ê !øÀ‘ T‘) D®þ¡Ñ1–©½3œ0µØ!z•®y†ãÔõfØ]CUûÒ+íï±Éê3+vÓéÜ=1 ØáïMýÁD«˜“Zø(¸:+{rhˆ£  U#Î.’‘¯Jdn8ÈÃt{¢Âªa[Õ‡iÊn­®"J±§ÄÐ× lhD¼34\ Á% ¤ÅÌ? šÅØØòÝp¤ˆ¥Uߟš™g¨¨äéDè+Œ%ªvªk[ÚéüAÜD†yÌe®Ø<*7ê3¡¤½7 Âòã[ Ãêöo»ñA_¦×ƒïÓ8¶â¡Ùj‚ F“´R,Ö+åþ[ôÔ”C6’Ø]¹ð†',ŒŒá8 }ž·%Â¥"E`Êw£TòѰ0†žÝ †ðÛwC3§ÃÊ4J£-Cz¨}ômF“Š í«V"ZX7ó dzX°qªͽ53~Ù ÂÓTƒɪb4mTZèš´ ¢4ù&1˜ñ­ÛL§s/ŽiöŠm­!¤o7–j/)4¼³Rå§H{’lÂ3h5¹-ÔÅ]=ÄÝ÷èñl0AXÖxþ gµQ?18¬w£|vM¦0T7l]šø €¾ÕÉýjNÑ¡Sgà«ÎWvÙGáÀ‚Pu¹O{sѶ Z;A7 Ìí0fìÒé&‚‰C4ap &„ˆFâpÓ“Kò3gÔ£‡±º×3&CB²ÍI±¼¼º¹ÜÊ&žBÝ·üp©lâU(:Ë×CâN×Ê,Å µr9bÞ UW¢Í¿5GœQÓªŸìB/,R~aÖ‘•·v$#p˜¥”èª,ÑÕXâC‹U38=N§~ßVë…ãEúîØKó nÜÄñN•nÂÓ==Í˵ʺˆ{ûv߃ÊÍÄB0Q ìÈÕl<ßÞŽüVõã}^½”ÙäØÌ† ˆæ‹Ð÷hÌz xsññÝru³üðáæÃòãû?>à•.—Ó›c¢}}±¨ÂãŠÊ h,w8·¨Œ‰YE¥·_/V«>¢ó q3R²l…!ÑQµA'PÓ˜:r]-Èí³jJZBɸ3Ð:›QåÕO¸$*P ÇiÏ”Ýü±äÕa“­âÀMhÚ³39ÏèŠÁ¾D¿ˆLv2ƒÔ¥LžÆf"Ó21™fûÿ ™UÖ-RDí³ª“<û_Ö«­·m£‰þÂO`Z^ÅGÇu]i8~È(жX¤JŠIüýúîrgfo²"’y(êPäî\ΜsѶE®0„f–"‰“‹'¦·X––¦7a{„'wÑ_æÝua‹Ó ¯èxZV`ù›£?+g rÜDÔä8 ÆÞY•"æÁ—˜…ÔÆ–*ýŒ…VËKåt0Çíšz‡Þ’4W´(ß—†gU^/GmÜ* ¿‘ +}ÊIá5ñ¯µˆ«Ç)wæàô âç™<ðï¹Ð,‰üCX™`ñâå­Í~ï.5âºt:±Ö´]"ª0òJÑí¦²QÐv+8¸¥“ ê„ßÈò ÐΛ,_þÄœ–|båK ²ï½ò5|v°ÐÎoçßf3q2¼2\ÇÃ4>Auå4¶L¦±eûëoKƲ¥:b[Ò翟-÷€EÌ'eÄ¢ÈO#«5î‚Ü_Ïd~ºñ½3^/9ü¤ì1¸ÕžÓ!ž×ˆZ5 4ÏÛžyªý…m®WÝ{ë‚ΈéBÖ#„ñ_{‚TÁU?Û¡äÎ4ç˜ÒnGÒ„nÉyÒ3,Æ¥fÑ»B.þ ´v‡¿it&gºíŠ—wchÇñjø ô^'D«UªØNe¾ÇƒÎ'âçÊ\¨iËb¿Á~TØOùäÁ|òå ”5`ùôg£Ö~_K<Oš<öÛ9†ËÙP>:C9ÁˆÑ\GUÏÓ1ƈaæ/²þ¶t,#ª#F1"}~œK¢údÇ,£HÍSݦSDËP>5Ñ–Ì këp8É3p—wÕZûYEH$°FvH—ã>bÒ…£Æ úðåþ Ë1i[­^LÄë¯ðßv#Ò®#9Êxy:0.cÎüÔÀÆÿI šZ1*˜zN?‘lˆ|ÿÅŽuå4¤~å[áHŠU_¡ƒ²Ìƒ¥yù™qÝQü·3ëúú‡ðs"´J¹ÉÕÛawþ¢š/¤tDí”2Wv ‘œx‡~ÒžT–*.O?t/h”­fGEùöQ”Â9gYxÞ¶#ˆ6c~jÅ=hÓˆ–!LûÛc‰V1ŠhéóÇókѳ†7B;'éíø“ûX`ÎS€¥¾ÜÝÕMOŽ¥ÛC›µîƈŸ÷Í«âÇÆÜ!  @™$.¥Ã+¤‡7ÄðQð+€ Ì÷i®Õôœ†3¦á,YøQjÔ“·¼u—K¯6ðäcÝìáɦ„wÚá ¥~OBŒß(žû‰ž±õi2óÀ êÏKŸÑ=½æÏípˆýy2m,æ Ÿ¶Þ¢¼™e}ùI–;Tå-zB2¡¨E€ §£8 }Jã(e“è(Èþ"îoËFÒ‘vÄ:RŸ¿ãû†Ž›ÂWšø\?õ‹|—¯6¯›ý¦ 3Ç~8)[s"ŒŒÉ¸4è)qM¥TÓTI¨žnøZwS‹)Ò*&¿¶ŒÏ a~l`°› ’Øb£ÿ`°÷º ­±,O‡|ÔE O£Ü­L– W“‚È#¾ ³ H梣= ¿–¥-ËZ¤)Äô{à…©¿êÜÞ|]Þ|^^_}¾úp÷ñÉåá#LkægÑ´aåif¬*Wî£Ü/Çɇ60gÄíúi”k±Ÿ À„£–Ú˜«IƒEaa®‹Ö˜çÛk#`¢òÎ@Éoñ“xðuv)/à‹žüã3hýò\ÁܯàÿàùFÏá!É“£#6ëu=Óæ¦%±Êmfiq³;£LÅ·IKò€²(ÀoY¿ kÔó =>ººñÓ–ÓKÚNÁ£åp®ÚE¼\¸WõJoñµV[C,&|©±å8,qïÙ2W84_iK'®0–o>ó°ùD5%R±§Ê(îo™™•Xè,óª|íFqŽNžö»NqÜ{ªãÛÀËuÑÆ’:áô+\A¼»V¾Ûã•¥xMÛ/Ê™ÙXoõ ¡tS/‘Ð žO1þ~…qîj­Ÿ=V“~í,(’Ê[q A&]K낪Ä%sn9ie¸5úROWοgLN#ÒÅ&C¯]á–ÇßM­zÒ`z×5Tì+¨ì;f!úU6ù^w ªe¾º ÈåŠÁ¶#eB ´R€W|0h½"¯ªzf-•Ê>¹ÄVp‚gÕ3–>( ÝÊ™}¦3¨™ïÓTíÀêŠ$r#jÈÍ#ŽüE¢J|Òâ̧-Q⇋þ6ÞºÁV„ùÜ3igŒÚ<èóG®¢²ðO šèm1ô ¶Á£t³Ý½‚‡+·|œxdBJ” ÖâbFLm«XÍ)ÌAT‰i™ ÑùÛ«/Ÿn–7÷÷ËW,¯îooºÜñQ×ÎŒ&–Æý¶AG‹Èõ °úÕ€ñ¿bíÆÓ„ ˜$,c~H!F vÆ!PŸ?е èÞµ¾d;ÖØ†zX©ö'67Ôª0kýv¢èümxó¢Àg“JÁ"!XF@+ELëW2œœdê"·=%w‰ÖdÑyS”·P’ǯÃÉ¤ß }Ze½—ÖÎëtx׺۬ÊË‹¢SS6¹ÇÒ1R~å¿1‘²áŸÈHr‚€WÔâ°-ÿ·0·ÔË®ÒfµèuV’PåÕ;äÉ^±FkµÐ¥ˆ`F#È„¥)ðÓ× IX«’Âú[{Ÿ®glP˜š ±08V‘Þ¢ä]‚®ÿ‰!D—p»„?þºƒw>=ØnàúžÜ|î‘“È´¨FlŠIjœð¨a8w$ iÝurõ“ÝßËÌÄ›¹ÛVéÀûÛ9žß–îh´Ý 1Wxš J|ZygXxüšÄÝbëòO¨;o“#B//ÿ¹ÃÐ> pùòž1ùÂ5¿Vü‡Ç‡{Þ¾PVýZ—¸¥Ö{‡µÎ°hßf`†+«Ð¼$cBó¯{¨Î½áDÍíY¸Ð³ºƒz>a><8‘`ñQ«x¾1™ú¯Û?@u^#v‚cÌØÓeÁÖSÁ eÓëäˆÛÒ›¥„wùà]vå¹½˜¥¿:¥rn!€åë-Y5Œr;[˜aÿP¥“U¨ŠÁç–6 ÂUÊ¿ºÛ4'î|Üp£”J¨´§ª°,oƒè/Ê‹ÙÂä{²Ì•Ë&}•6¸:Âú}/m‡ÀM…D–xÏð$?Võè§Ú¶‡–*ø¨Â'}pt;í º¯“¨öŽ"(Ñ#›®‰8Z fvÝ(‹ÈôÒ*‹¶€Ø»„[±ÓŸú;>ǯñ‹õp²ŠƒÌÏdNÛÂi[@ȇ,‘[@8v PgŒÚèóÇó{1ŧl{­fH¸ *ps„ÀïyN'ñÁNˆßâÅË¢2¯7W8^ß‘í¸‡½ÔœÄJÖ[wƒÆ\˜˜QÑÒÛc9k¯ü)âxÁ8º‘û Êäµµ¸X1Ðà £$ôƒTGÍåPÔD‰ n3ÏŸØ‘‚&#˜ŒÒZ’ÚÉIÅqè§‹IIÅqÚ› -)w¾çL-[5‚V¬7>î˜%–è—Ä2çdžÞ3\¡Iâ9̹Ùp¤E á¹dèù<9ßÔUþZžÆáó¹‘g‹H»ã´tâI<™ÍÓõ49˜%£Øç¯¨Æ$}-,'º€5@¢Dù$°“ U{åÑ$ÈwÊ@  #^z-“Ág!FOF™GWËÝÑ¢Þn…zw˜¦õ"×V¦ÌÞsäM¢Q¶®Û­Pt¶xT‡D#ÐÁ¤ÍñÁI{BUÈO6;\Ö¦Ì9ä?þ㼌•„ ú+iSˆÂ(Ž¥¥…?€!#!ŒA¿_crw!§3Ji„ÍÝî¾–…–òQãåÒÃ>/æ  52 i“ßÒOQ3FAí’îz;.ƒI?£‘¿ì£Ž*á–< _¼ª…ñdàkc1Å‘Q’ü€égËÀ«ƒ‰Â×àêÑæ2Ù)s{ÆmwÇê(¶p h¯n"z¯˜)q$M>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 7/Type/Page>> endobj 8 0 obj <>stream H‰¤WÛnÛH}÷W4ò$."ФDI\Ç3›A<›Ù0 8ƒ Mµ%N,RáÅŽÿ~»Ù]Õ7Ú1å‡$ É®®Ë©S§fï궸¡yKÞ¼™½k[šïÙ–\ÍÞWm[È_³ÿv×íÑ‘Ù/UÕ²šÌ6ýÿ>Ó]QÒ¶¨JòöíûçäìûYD"²Œ²ÊR³³?ÿAʳ÷›³Ùf‘8£ÙÜœ¥ëU˜­I…ñ’l¶g“4Øü}v±9ûãÙ²Eˆ2pqɽøãlöY„ò‰–;2ae0»<ÿø›çå4 £xMNæK²Z&ábÝ_–„cÝ]¤¡øD› £^ǯ&ƒé"Œ¢Å¤Ìoƒ%ÿ•Nº¦Ò0Ë–“ª þcÍo™ÎùtR±|rüµùmÔÅq”…«¹ó»×‰å~ îïYË_äyžÅ†ÝyÆkËnNiíHùuÄéä¶PÏÛB=gÍèL$q&Ù‹R‘Äóp[.Ó:Èz×vÁtͬ&]À¿?¢|⇰üѪ È…7[¬ú ëÔBÍÙøÔ è'‹ùQ.­ ½øß×_>½ûõë¿>þ¾ùúîüüâÓèvHÖa¿(“ Q|;“7ÁTaé6H'²ˆym°(¤¦¦#ö#ˆ£É‘©ÖÉ1l«!ªµ^_UŽgy«páHè0ZAcnŸY §ï™¢9Ž–[eJدrЏPžâñSí?ÅX$kÔˆ±¦Rƺ:X÷ÇrÖ{8º/Ô‰|¯Á4í]0=e庅¯¾L ã•Wt—Ý!tP¤œ#>Æk€¼<ø%à>fÙ\›ºf®®má–ptUæË(\ÌÊz¨'Ò'éiú0Meñ†øW !ÁžÅU&ëäÃo*›dòêSÙX,×^cVRZF\Ì@Ã!Ÿ‹§^ m+@eÞX‰H¬ì$ª©¼«@÷>o5.‹ :°’hO+/•šÙJOóíËF¥‘¹RôÁ€ׇë*gâ©à¸ÚSŸÈ©' ÞLäY‘?úb´/bJ¾b,oufÜP_Œ¾.Ž–áʸqüdŠ£Lðºé4m Ç‚Q†Æì ·—„ŠR™*Û‰½vÕv_ºk÷ÚÛVï Pz%BŠÙØ Å]ˆ•à„1<¤!C+Ø Ò•v±Ö,ÉiÈý‘{¼²ÉM>̶ÆH¼eŒ1 äï¤ñª:4Øs§`”/"™¬v_º¨²ƒ>`D¬^²c¾'9 nv³#Xt>í´™RõÁFN^3ŠÓ«ô´Œ8á‘ô7F(â+ðÓÅò0ÔófÑNy„ŸóȦ9è…å¤ÞB~æ®ãÊ+f=O7ž„æ8’ŠR±ê¶Ï³ÎŒpówoö"¨¿ƒí¡/·rl{,ã3$Fô[s4Ð^W—ŒÇž¦‘Þמ45Ôɳ0ÛK_ù'Ð8ç÷®{þªø®úETe$q….VOméÊ(m¨yÅQ6ïÕ¾VI¹™ÆÀh›«Þ\„$0’wµ:Wÿ\fmqIêžg ±üaÍA„(ÛùIÆkšYYò¥1Ò|ãëò¡Å¬ø²t Ë5öŽ ƒfRbzË¥¥º‡uÏÓת(¨L÷ëZì|3µ8š:I“$\­:ímúS\ä|c ™fµòÁ æ•ñú’Lƒ«v‰‹ý0(Û]$yÖötÚCyš¢rìbåÑ ÌÍôP•öNŒ@yÌRÙhçûd Ä<«z‰®Þb¾ã̪ »C÷êÑhX¤Y˜¦†½ñjl!dØÊréépY‰¹R—w@Œ-àè ½û•Î8Bò)ÍÁgN¬âìWÁ9‚ðqâ¾PÄMó½Ç9rs¥eÙSA*òùÑÛ«†ÐÒ×µ9’ƒ1?½V#À€"*TGPìI¢Wqèlì5yÛ!éúň™rSž|@y‹ŒaoIu„ÀÚñ€_/DyÍ*{-ž6àŽ—™j1Y~™j¥uËÏŸ€Ê4[…‹¥ôWëX_®9r Êù„_• k¯!Ù*/ìŽûÜö ojߦ´äªB¥‹ËÍ?½Ži85iŠ;¨ïQ¼L£"Ð Éìj®yqp#ý ±«¸ ¿òD÷u‘ûìdŠdÔoÈÀV³å½×î=ý|ƒ™$¥´2©AF\rŸ©o è÷­q Lyw­]˜vL]­ ¾(¼j‰¤¼²*•·Åá4Óî°DzüqF{¢®Oæ* ãXó}CÌ™UBñúWã‡J…«…‰ ŠX ò Fu yÁ.¾1¶ÜÇ·ÖÇÅŽ|ƒ<¥ÇDéÊOÝ#¥¸]*dô!å5£ .=à+Ùg–Q¬º)_sÇæz¾š‡qjäëÅå9ávfŸÉ›7³O´Üу³ËóÈœ¼}ûþÿÌ[¦QÅë„lr2_’T¨dyYŽÖÇiÈ?1LŒVØ¿xüjò'/¬›}¯· Z{xÍ¥'Má -¥‚\aŠ˜¹1fœ|¥ žëu©Š,kGpVrTCðˆýGÁçh¬0.s ßœi…+é¼yýø¼ó²Ðøê–bäV¹æ‰¼óü¨ mìžn¡-°hÞXÙâù­Î;*õØQ6FfžÕ3±æd!À, Ä™f=wìÇ×Íå×MMËæ–¶ì·êšÿü¶©þÃÿþ2á-:©Iº—©yÅh°'Ë8\­ WšKrzP2œ+…갶ͨ£§Uã ÞƬÁïbþX³~Oòá$ç+Y%ÞÜxJëÎ(˜Cl ÅÊ_¦P`€ç;r!ãƒÁÔ€já–§MÊyÎUâÑM·ƒÇÚ£u˜Z¦Ëv@sìÉaTÁbyPËÖà6Ûãw¬=Jĺ`Êå-9Ö8ór<Û4¡:MtEåƒ ˜ÀÇÁ›ÏMëÚñ1ùÞ§]É@+ÎvmQa ÅOl>•øJ渧gYšŽø+Í­ú3 -Û®c%¡¥¿Öžò/¿‘=½·eÓi޳p¹’({\&ùzX§ mÃío¡^ªke¡+æˆüðÛko`꘷îH:ÖÕ5ÖŒÙÛùGuÖT„oµ›ô{ -ÜÅÊSƒ(® Í0Å·X2sß}\ ütÖ¢êC÷;ænJÐ<±VºêdZ3Æb­&ZŒ_kë‰ÔÚW¨h.…þ²!÷ØH8ߟ½ˆãVAOK‹okËi¾W2r¤"ÄdkÆÄsâtbß$F1b§>µ^dþúxå}åÿ™¯ºæ¶q$øWø(]Å(ñ›|ô9Þ-W%·¹äjw¯œ*EÁ–ê,R©¬óïo@` @+$µ~ØM"’ƒÁLOwÏtǬ`½ÉŒËrÜÑEŽ;Ê#ÆÝaáLÇm„˜ã¸õç÷‹AÈÇ£yn(÷ Ó›.¾¨®yÜ Ê©Ÿ®•¢‰”Ä·êß<¯bSZÕ÷K ¬¿f’=’9 yh“ó:ÚeÖ]<þ“¢®‡VbDާ‚¿ôL¦éÍ+×C8(1â·5XU¥Ì‰„%ÚÉPGd}ÁFÂ*°‹®e{*^‘7Rhw(ɈѼvV¶ÓS‹–½™á/›YÌe€"Ÿ¿–¯èôÚa^K¹U­‘Ä7Ø:zÿDò¶'³¶!9ñM‚pGçÖ.’iç/øìáV•`õï§\©g¿´²±{* §7¬ökGI݉ú†s|Úé©£²oˆ®jo-V¡;ÝŒ÷÷Î![9Ž ˆs(áØœÖTÝoØ'2•¶¨–©¨ñ³ÎjñràEœ{œ8Ÿ–²‘kÆxè’~Úk1½B‚òã*JìËpŸÏ4xej‘ÃT)îút,¹Ø5Ó%> ¡€¡m”ÄÇ?•ø ’Ð{R§E(y waÊR_æýK§!!¬<²0`À¦W>T+Z¼ïš,vGÞ_¾(Õû­lH¾ØAo3iGÜü•œ‚ˆÅf^£*\frÈ%ïóçšb–É¡Ïï@9¥O6HäÒÞÅH•âGà¸'¸o5÷šÓA½s@±5m±>œˆƒôƒbÀväKš¡M…<w”Ûptqß hæ~D$³ñaà åãSÉ@¦Ë ù”ïÔHÔmCƒ”ýè,^Gc'£«ª¥p¸8¥Ë–tß VºFù¨Z¥p ³k1¤™>>Â%y¸pìHªq¼Ö>5Zç,+‰ötÜ:•×ø¤>ñ²%?`iì–[ê{¦ÝF·_Ûl‹ÊömczxƵ—ÎÆÉ)Ö£ëWï»Ccν§m{äÅÆ!Z¡8òcjÇ!Ÿ¤5Óbg,ÍæŒñIéE>)ÌÊ™>É1Ç'éÏï‡PÓ¨·ù–KÁñ€ R ²ÐQÕ¯i‘Q¹-pk"ÙßkKà,z*‘o˜ðÉMØÍÃdhÇ|J]² MY÷ÊV\.púÖ“2?¼¨›!\8è§V8ÏÅÚb<ñgOyCè[$¨]ò€×Â’«ílZû]ò_åÚEÙâ‰ANŽ ÞbׇÌÈ‚•0UuÚà±åiÏ«1T8jÝyÃjÅmð.e'³ˆ„ãŠÉzKÈ«¯ÑÁÔ'‘Ð¥µX­t4]_óc·( ³á˜¢ÚàÔ¾æ›u—É4Ë|t¦Ô7ùKƒ›¹f{,ËíÏÍ¥{¶]kD&q’ñÉtæÏY÷4´&Sì•Ec˜-ùkϾ¶ÊÚOÚ6'ÑåÒy˜Žc–†ò {6ÿƒdWr<Ÿl*¶{ÆkG‹éÑωEw ˆþÀK¡Y—ž©ä¯ªñik#v$*ewÞÙÖVSÇ9p$)¢Ñ.œÑ_Z‚íÞ¨^n0¡A] -žR wk ¿ï-‚HX‹(1 8,žøËÃí§‡»ê±þºøºœì|˜ 3Þt¯€÷ zEKýi)o|§¯®Êt"•q©aÞ€D‹|%ŽDä€)u‹N(ÚêBňT'›þ f½“GùÊl¤¯ô$âhý*él¥ÛÁ*f¡ìSÈ6®W~/˜ÂQÎVf¸ûů· Ý\ˉΟ®ÿy÷áî?ÿ]<$€ Œb3×јÒ!–å½ünꪑ‹¿h‹ªm¦ç•eý £ú•OÜ KA²(±­·C:†ŒH0³#åºdZ?zè¿ ˜·®¡ÚêdÅ‘;ö¬ößYK£ä¹µHeuAÄ¿W’'®èáåAñÃ-àÓƒztsTá…z§Å¯:–›ìÂ@Nn¤1Ã…‰}“Ö0b–hX»r·ô¥Ÿùa÷ã/ñ|‹8­/·^Yï§Û eIØËE„ÛÅ7 Pm‡³,Ùx…ì?®~øv—ü î„)Ià™LS/è>ê‚hÕàõe/dSŒ3­-Ç¥üœºõެ¬ÙçþÜã/âÒï?m0 e³”ïq͘ yÐÄ­m/‰?|¹í2ÈÃM»‰FŠÆiì;yíy9”DÞ–=5€º. írÇRçEæc5ƒ“£ÈØ_aãpÈ9R Ô’øIìPä>¼žJ~0Pfu2¥ø9x‹"!”1ÖîK@4|N³îjž2çÅvbzº¦Ò~ð‘5òrYÿóGÔk¤üL'õ4éøn~ùÂÜo¯|‚wó.Ÿ½t©˜lù‡:¶>¨Wùle'È&‰N7¶«Œ ªtnxvHü‹†D$Í^™’ë“!ž%ÄuÔÙSrA ñÖæÄHÌ”ënPæ t6¼¨ra2¿_¹¿mD:KAB%>ÕŽvƨø,ΆîzvV‚‹fT9H^™•ßï¾ÌUvö°\‡…B¼µa1s‡å÷;1,_.W• *ˆ²b$ú6uŽãÙa /Ì4zeXn~ûða:ÔsfܹP×!ÞÔÍÄ\¨ßÔêÏÏê÷9«b^TÂ>ì—°,žÕÅÅfÓÐBìŽû•“K\bäÚÑPKøJÕ•¤¢ åp§"‰…L~éé%ª[ƒ&†Ÿ±0*ÉÙш. X†É¯x®÷3=—u®Œ\g‹B¼µÙ2ð\ï/ó\—TNy.3Á·2R³&j³Á‚œ¨xâ@‰1J@vå*ùà8&+–‘Üqœ#T­ÓAgãü8á~±ÞÙùK@^ô¸á“›$)‹C#ëɦ> zþ†àü¼Œ5k$ŒÇå•B1=ëM ýúöŒîWz|âÊO587Ž#¡ÃŠRT\ÑÆÛéYSiz¶8= …qE4•æ½G ñŸ'ÓW%fS¥Œª´!X éì@&c²§B0Ä ‹ÇŸN£:ôr-B¿bà~”ø4ôøC¶&ŒónM3ÊðÄ_:oCyŠõîy×îxó0ÝåEyʲÄlÕdŽWHf†%Ùe²á',‘§seC‡˜%ôùýâz©¹^y˜aÑÐÀ‘bÑZHk‰ÇEîX-ß¹ýŒ([,iPbk2NôÓ/%£lŠîo–$1ò=J׸¹‡[‰é­Å±£œ-×T$ŸÓ/Gghºˆ„p¶8À|Ï«'¿hw(v•qùyouíJ%lP’L S~ëÍç)Æ*êþÑmŽõÈ Ò`FÄáÚù0ÿ'¯,°ÔMAÓA©ýÐWÝõ‘ØÌ±,•®Ðdê‡cÄÂBW™AýPÄ4íUãà¸l4Z™#Ô„V‰¤ßFÄg Þ-ŸBÀeÃ&_1ôã~~ãø.¿ˆïò• ,qX8“ît„9lG_ß/þ€²ÝLl±-_y‡¢iÀàú½ùsX{Eå Rç'ÕÀ;M jÅC0–'sŽÅ lódY"{†Z“,\GZ\¤×ÿ(7«…rýÎËha†¢¿ÒWAŠƒ•Õßû,®ÛÀ¿7®¹IZõa}^Wšœ{/Ë4Ö°W®ÇH¿ÛûÏíMbU؃K…ÚNwÇ–Açéð†‡ËàC´]üövV+š&…†É=ª ƒ±1pH%uy"Lp…¶–¡žPå?”2‹¡ÏiÞN±¤ìèdÏwÚ!ãÎó,•Ë%aÜ”h€*+iwÐHŽ=Õ2jÙ&jy®𼤻ƒ¸½°ÝÿÖl"¶yÏ5¯x·×ÑOAŸ¢¥í[€ö½K endstream endobj 9 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 8/Type/Page>> endobj 10 0 obj <>stream H‰¤WÛnÛH}÷W4öeÅ…E‹w  \v× g'“{3h²mia‘ŠH&ã¿ßnvWõMöˆôK"“ì꺜:uêj}ìw÷eÕ“Ÿ~ºZ÷}YmiMn¯Þ´}ßîÉoWŸ‡»þé@ÉÕ_Û¶§GrµÿúX>욲ߵ ùùç7ïÞ’‹o+²"i’¬É‘^üû/¤¹x³¹¸ÚlV$üUL6÷IžùEN’•¤dS_,Roó¿‹÷›‹_϶PÄ~  ÒÀûÌ‹_/®>òPnÊæ,hã]}x{ýŽ™æår寂<$›ŠD)ÉÒÐóñ²ØŸênœøüe‚L8ÖŽß.®½eì¯Vñ¢!eóäñÏV ³šøE‘.¼%Kp‘/v^²øî«ñ)KDÄ>ËØgòðÑ[†ãwôQž¤¥'žtôÒËå׿mþñǾÊ× Éý45üýÛ{/Hÿùꉋßd®E²øúV>YÓõùäú~lä«ÿÂñõ|rsžoZÃ"óƒìU¥ˆV+?,Œð~ðèx²½%ÿ'Q9¾£vÖ{ø±u^Ýí¼ c¿Bõšîèä`£<ñ³Dv99ؼðãÌöpíÓg:B¯õœ{oˆ×,*Q¥Ðõ¨Pßñ§%Gèv[4SS/¿øYñ‹'¦¡³5Á#ãkÒs›<©Ût¤³;FySòKxQöÜÿ!êš,´6ƒr=©§Ö†7t\ø¡Lê)P×Ü7ÍäËŠÈÏSýÂé@`}“ä¦ÏÕá#‘(Fi X=:É:"²Žú“c 2f^íœY¼nD©ŸŠË’¹³@™˜5 ðøí⟠›mOä¬ÛD‡4Tµ tÉ p\cqÜv{Óºá mZÏ*|/oǵîŸLÖ«ÀòWå*\Å~ùªJð¾¼ÓRÁ#4RÂÿ ÙAât_l‘‘LÆÙ©ÖUO1h‡?ÝCÞP6º§M܃lÔ뇰–—ª·€’XO‚—Öu%aü'_"Ín'%æ¦gt:—ÄIèçfQ¾C(­Âg—íJ6Ùsò åIå*UÚmæquÈ _»-Ø h5ù²ð–â·:^&ÛAałѣ¨¤]bƒ‡™ã?0Ô/ž'z¾5Rærò|Ѳ޵ŠE|% n\œ q”œ¤i{¤ûN›Ïâx{ô Ð òIϽu>:^Õ-¤«öì»Õ¢éËžó“Ñ*Š ®¬ÚýaTÊ 9̓gÉZBBª-a·Ë°NˆchËyXbD/a©z,mZÝq6V*åɡ드liÉÃ5e¿RÍ㳦kø‡Ó•)è4"ò¶nËIš~&9áÓ(÷£E)é0]°U³|Ë êÅ®±kãèrî•å‘q«4Û‘ö@•*”ŠD#_öãFyU9]ɆÑÊσW¥$ŒX‘‘ŠâòÒîd7²Yœ™¤RáPn8IÈ© A«A‰5Ö¦ÌËôÝ.IüTbÆn—Œ“\O_#ž±ÔŽ6WÇ(Aß!?ÇŠi'ù%Ÿâ %Oîá4þ 0 :m+Xka"úÖžøÿƒäbæ( D5U×<€.Vëh£TÛ öN™þ)D¶Lýñ|'•eò‘š9¿rÊ=“0ò!›ð…¤l<c\äfƒ Ž‚ñŽ&óqøê×["ÒUûªD­³Ô=¿‰ò™cEiù½ƒüvn®XDzåàÜÐ~‡GÜb æ5éºÇiŒ}‹ÓºVëö¶Ï÷ÏK—d|ꙡ· ZÐzNë×à,%=àPÕkü">ÄNáO׿(ºJðÀØE\¥„¯[G¤•X$Åš0P2½­Jï¬[Ð8W2ráµA"RAÉ8•ü€£[Ø®˜FûŒºƒÕØS`$0zDÞQ[þ <ªI;ŠKrGÊ@® lòº”Ä~he›>°â$óĄ̃¼žH3n“›“˜‡•ÀŸŒÈ ðãôTx/Iªøq•øy*²ðË6"ºlq-ðS0nª±ƒ‡Û’f Ç‚-ªa¬Ý}V”É«„c’ç~’¿J8j&æGuü–§WöéÆÞ@Þ¡@E䜽."}h.µÌ(Ömq4w°¶–w—öFûƒ·&%Ûò»Z[ÛÞ˜¶c‡L˜Çì¦QÅwÎ5ÎHM(®n*Gç*I€’oÔLi Éuï @œw_<ßÃêÆ†ß×p¯–TÌ¥8Þé Ù•N3Æf’±Ö–Ÿ%ý8 ¸zÁ„Qgh¡©ŒªÕd§‘°…än¨¶JTH$kÛBç”ÜÜÕɹót¾h®%ξçÀ‚t¤Òæ\Cä–¦ Ø<ÇøÊýîQ~þäHHc¸¿ØÙ6O4=»JüT ckMfÔ„‹å•dC #뛉µK§/;5€S˜ýsf„®l :ÀNÊ÷Ù–7ø¢6Úþ;˨6SÌw¼©¬“•¥ ^ØIË#åIVš­—íŽ,vôp£’ŸN4Âm× pÔ]<Æ2[šNªÍšsD7ë7g¨Ð0Tš¼Öȶé™oRöú lªòÑ+íAî:eÖ†U+õlÏ€Áá6¤ Ûqux´Ìú³€èà:KÔ¤¯5ÉÊO‚ñ²p®¨Q&f‰<~»Ø@÷œØÀE­`¿T\„ô7‚ëjTçÄjæ(#ª8°ì9Ì%&%ÔNnNè©xõ/ÞA¨Ï>#ZÃõ-7 Ž£%V Rn-¼Ó·)LÄ…KíYä¡è{Ì ØÓ (0 ñj€ÜAaíÃþSŒ]âŠÆ(Öf!‡|ÖžøÿƒäÉ©?±·â¾5Œgí>=ao+<ø_ UÖ<¢R?)8+¥ªJ›÷”~P‘šP~iàß5•ÒÂgW´ñË~×Bu»­<Ìky¸$£'â‚•9¶•IVêÌT¬2£§Ö¨¼R¤Î–e|‚ᑹ&â{ÖI|=vÚQнìH¦ï¦Ÿ,;ÒØ-Kgm8Ù«6œ8OüX\ÍÜp4s6uüvñ‰3¢šL(AV{‡YN¬îZôl- séþÒ³N¥67Y A|ª¨«¢@Cß]QZŒJ‡pÚ1Þ ˆ^‹?”ÂB=y§AU8Ø´Ö€×/yÜfUîŠòÌÞ£‡’ #‡ s²wJ‡¬·(þyÀD·fAËiÕU~G¹4• ¾›y¼“…~–ˆ¡Ï¸ÉµÇ]¿åÉ”+wh™VÚ¢ÁÕ»U¹ÔŠcj§µ¡#—ZaÓ;Ú†·~‡X°toKÖ¦³JûY¤å`úh³Ü#ˆvÅ“Ó íÁ³úÖ`e½YâΛ𦂑K'g"Ê#¾Ýèa4=®‰[gÑõ÷3]ên¥ßVJ9°ÖDßsšèÿÜ—ÛnÛH†_…˜+ p¸âI"÷fa8™™™Í"ì àEv,amÒË&s˜§ßjvWõIRHênïlŠì®®®úÿ¯¨²„$þ¶Žäš·®BM^®cÙt» £ÌaF¡†`'s®1̵±A×u—8ÉʼnûUQªzW€å+&¦öÇ…-Ò½Øèú Ž«—£,ѯuõݽ*ò길 ÚX[™­iu{6£S6´¬ø•0‡y¾hü¡¤÷Ô’NeרAܪ ¦B¥À¾Óv!¦ôÊœk±“Ñêyè±s›Ù¤H0oE£çv¼*ì àÁ”çÓÞ7Ì_.ü»ï)J§éVqƒïÒ&$ýä"'Ãs€ ¢;·±ŒšÏ¶»0¶Š¶^Tµ ŒŸ‘¬ÚwT•CŸHL¦bË'B±Å]‰‚ÔcJw+í³+¦tM~¾d-uhá#„Pù4G‘s±±®‰»‡Dñê=2ý)CíìP;O—ÿ%”ÀÎðߡ̉t9äÍoÜ|S¯4µÛ©úÚ¼~2úNqh·Îm!_hku.æu´‹¸2sn£¦´olënì-Y zæ[B/qƪ8_òYÅ^mIð µ Ný©:ì¶IwÃøÚoJS=p3„Æ:8iJ¹YŠP¬ÕHÀ Ù˜@1`ª†Ò誙Ì!±V©§’W.¾"ãQ÷ú_ÑI‚Mü“…}¶|ø€ø‚]Ü)̱_›—Yb›®bBjÇ™UÆnJJ&ŽcŒP¹+í )dtT 2/³?ä%¥¹)´¥9F¼”†)L[ xA¥×|#RÈ#DpŸú߯‘1r†ÎÀLÇT1ž?‰¦Û0ÚY‡¶ÎØ6άwJ!°ŠŸŒâ­™+¦å“!%mUº°j¡)¾5ÚÎ1ïý€˜d¶¤Š'!m)c¢‰$À¬Èw¯Ñ±6 ÚýÛ¼$P/^oƒ' ©T鬯“.*館†¹ºÝýw-ÜÞ˜âÍN­¦®É—oÜÑ*·&¶JWü#]$X;ÎìÏ­Ö™nëÛµ“ösêcôL”¨˜3wÒ´½ò„IÎÏP¬¹ðŸ…zÓ¹7•›0MŒÛš4]WMWIž†±Ü,[8]K,áTýù=°'qˆS\(«DÏkàþs[S¤“;¾Y3Ͻ6~>韬vEÍ`1flìÝÝ%v÷³÷6 ÌgO{44Ôè¢íQå­éE/ÈšCÇÐ}<#<‰ç߈ª<¥ñXª_­ËýÙïâ(G㤻ûµ2Bœä ök[@ÔYä–>‰Ÿµê¿x7a]mFœ_ÚùÒ[$áöúÙmÂ8“ RY&:Qb"»ùãTôþ. ³Ü\|õȾ=ܾ~¸ëLŸ€ânæíŠ0ÊÍ5gŸ”)L¬#¶rô\Ï‹­gk²5K·×M|FÁo{OnFγ;äæ+~èÞž°•£ƒ /:Ñ©Ñã@æBG¸g˧ H¶§^¨ôfOú'Ÿ×c É/xñímq~\B% ‰ºä¾}¶ÐÚ£² ^qÑæCcCUöGÏÝÃÙqEÛm˜nØ&yp´ù¡ CAo“àQm—R¹Iœ…;•†ŸG)„1®—>´¬¥Ái„@&R³;6ZHi’ï÷2%Åêu•/ñ G?Sœ‚4qMKAt‡lò0‘»EK9D/±HféóûÕGd½ÓàH<à°§ûBñƒ-„|$ÒG\· J.‡^KÅ–²§pC湪øˆ}}~B‚á4Ù<Î'#Þñüô'EFš'¿=àÞÕ!è üâ$Éßx4ƒ¿Ð«7žÆÿ[½B”ø»;^q 8á\ÆT¤çšÔêÖ=QÓÒug =È_\辯1•Ü ¢yÄ´ôÂ!ØÏµ( {GfXža— ¯¯ ަºZbÝáWÜÃ/ ÔÕŠÖB}À<çåXµ¡kmto5wb…8¨f¸~fGWã†#%ZÇj*ÃAÄXÍ«bуBçšÐø%ó,÷mGw¨;£k×׎ŸÈÛ7údçÎŒÑxè£)€Å€ˆ%Å XVäŠA[¼a]­eã$œã­‘æˆDѽ¼òÃ;Ücœ`øŠ-äBD¾c Òq¸0Ñ9‚1sæêù{|éƒ5\¼N®&ƒ«áè–£n_¯ä&µq…Î&¥VYGD)õ¬WšZá"]Ú†Ä里‡4#R6~„ûUh°xÌ¾àæ¬=¦>t« ëX]£š8T¼¨ð`HTá½tíÎ%7Kš³Ÿ| ÒìÖuåó?P0› ¸Ê"¹8iÃv¾<áªîDê°måxf&ÃÊÿãzºm´öðâA¼Xæ‹°:@ ÍÍkaY¹ÕŠÌ—Ãs’m¬0ÖFŽñU䪃¹‰Ýâ…äh,±„õç÷«?àêbÙ;º¥•€y¥××6\ÜhMJbMžä ¾»j ¡y´4º­%t &äÞ¨Wzð‰bñݳõö3*_ÓsW´ñM«žÈ¾Ö8ou“„Û̼–GöíáîéÈšþámsì?­>­g_5@P¾»ê®ÓH€¿uß½ç(8ÔQÄnµÇƺx‹0t³øŸŒo¼×J£á.­. b£ ŠEþ¤Ôˆ­1ö%ÂÇ1Jôñ¹¥HÑÊ'—áHlkt¬–`¨Wª{žG—ÂsIpÅlAf»ìX …ÕL˜vö ¯Sdw4n@é¸z™†,gJÒQé;¹57Âp½âiM."ƒZ¿’¿(ã²ðCØ{…F6T4¾OÄPüÜÞݽy795¸MœD£Üéh'+“^*½°"¼k1´†ËÛV})${n|É&ãèT|¯.iëpaQž†‘ ÿ# Gw¤Xè_³Kfžšo¹ÈXjëÌð‘>É?¸Ž_)hÇðøÚr`¸ôzàz­ü¹3§°%€&‰ùf-ú8Ú™'{dB¹¾=(>ó¯µ<ÊÃzÒ1õ¤ìÕöi¥þ;Ÿ ›)pÖîšÛIýæ œÈŸŒÉL†ÿ‚OZα6÷hpþH¢xèaìþ)£³Š"³¥v¨Ði¬å-wø(¹gIË£m‘éöó}~;2½Îö«¹Ùí½ÍÃ]JÜcVŠ~±d¡Û•ïˆÁHèW¢‹—y…KðKïÔ„Îz@YûVÀ+ŸOkiÝcÊxЊ0?{îݾ¬)*°ÊþH5ÒhúÆ« ±\"¹n«1›Ðû<è¾wHä+†R~Çdq׈N`ŠÜ´U|ï”ØžÆ–†HFƒ”"%ù‚ÁYľêœAЧt&®Í­\Qwu¸ÓΩ˜~å0´>œ–ƒÖSo£ÏŒe ‚]ƒ’¯ðªò×Ý‹[V‘ëJ—ú#Ì®?QÌÎT z¸-ÌlÁ쨎K·U1>þâ<²VžÙ€ˆO 0•D1@K>nF¬¦íáöõlý*Š0ŽÍugNœ@2³ë–Ømì%îWo”‡¾üТȄhÖµ®Yz֩ħöæN‰ ˜L•Ayrk2mPrà{ç°RVâã ŸaL²ªU A)^¢*oŸÕüBÎvE˜åóó|¶– Ëòóµt÷þÝ»Ù÷ÝfæÊ‹«éš%T5ÑÿoÕTµOj +«úãt›™piñüŒŸ«+P”d{^¢TŒhyf¬»´¨®YAÖ­p¿Ú#ÈP[Æ´ÌæþMf‰álM6»0¶"|óÁDªK®oq=ý‚åH?lMÌ%ŸÔgH©Ñ|ôD“â­7!‹qºIbœ;ã¥yÆ[#Óß'eÚZ!óí‰jR¾ÿ?:QŽÆ endstream endobj 11 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 9/Type/Page>> endobj 12 0 obj <>stream H‰¤Wkoã6ýž_Aô“µ˜ÈÖÛŠ3™™nŠtg:5Ð2E KLì6–\=2Éþú%EÞKŠ´3–ü))^^ÞÇ9çÎßÖíö>Ë[òãó·m›åZÛù»ªm«ùsþ{·n_ö”Ì?VUKk2_õÿ}ζeÖn«’üôÓ»÷Wä⟋YØóI’ú¤¦ü‹”ïVóÕjA<Ï]„du-7]’ház1Y³ÄYýuñauñÛÉÒÐõ4Døð+óâ·‹ùgþ”›¬| 3Z:ó_¯®ß3³ã¼¼\¸ oé“UN‚˜$qà.û» {ù%®àU9mš wvÜçvÄ-;þƒûšåðà–ª7Îrøú F÷D Ûûû`Fµ…‹Ðí yUBTô2¶†gÃa¬û;Z¬Ùƒs™ˆ—ƒa|9>·ž!¼ûšc+‹€Ýþ\ý2ºªÂÔ]ʲj:æY¾SÎëƒG8«Ò[r[ø•ãÞöÖ`¿Ìd¸[=&ÚKâ>œOð`¾›v\ì·xÿ7Ç“uKG¿Þ÷™D‹Àìrl[ú~âÆé ˆŸàE_˜W˜C|§V@âª1íXîTC±ÉZÆÈd2¤5Ûµâ¦á2#¯/XJt\õxCxôÃ£Ô ¢AèóÝÇÇìîiîÚÑ Ï]z‚Æo&N! ï<¢b7—ùS™B™˜DxüvöÖQÿ(Jò0S¨j Ñ EˆÚA¨âÛXTõ¬ Õ5÷§»pÚ†Ç5èÄ¥—†f»í£ +b$Úø:ÀÚû¾£„ªfŠŸW<c¤¯œtG‡?`ÝZ NÂ0ÿ< cë¸,˜ŠaÊÄ$ Ãã·³?Xðü>'H<ü(É>k&V=­ì[H ÉJ«'T%ˆ”_«n§ ¨©¼ÓÛ“ßaÔ(—³&ü©îØÃæ ?^Q—ÐG]—–˜ÚJ@×ËTöÙ=qÈ<ÿh¡ã…ÂXá²¥ÏQ_a¸a¢WÉhõ†žë¥ƒJ9¬¾t`ÇgÊ-@+JªÁ(ÀxW5Ì.•­ÆjèÆñ™’¸ÉrðvL…g = ôãt鯾œ hý$mHkQ&†¥=r=µ*é5ØWÝ)þ^Ë<¼†Ô½`iôéD¦Èso¥öÎ7„égEeUž)†Ì%¦´>®lväUsŒ!å¡ÄVuËçì…Û†´á6`•¦ÎX¿X9ÑõЇþŠy¦ó­]2¾bRNPªjNâ©à,žŠ—¡›ôw…iJY˜ÂRxúViŠ’‘΋bï¨g£²T% D„šlè9ýŸÕ¼hÉGs÷ç¼þ{'ÓýñF²áÛŸåÊÝ¿ÿ#WVðñÛ+¹uõA®ÜÜÁñX¯sXP‚䜄¬¸ÃT%2Ô#“fÃùgMÍØÛªsŸgˆísÈ/`=’FÚSÇsßÂwãDê÷©OA­DP½ó‰ÄÄc’#µ5„É™ÊCý6à2ˆ2„_]åxcdŽÌÉ‹"–)ì–xntŒ9‰’:ÆN9ú®4p—±vßød§‰-çÝ+ÃQ ßšÊö º€V?™x 3¯=켿‹÷ ×ò ï á®%‰C†ý±À—f‚™˜=‹x¶­Êìñ”V5zYÒÏZ6ÔT_YÍ”³¾†˜n35 m¯ ™6øAL·ycéà¬4‘sŽÖkÆõC¡V „ZÞnŸà›]öÂá1l\Œaœ¿Î¬·¹Òƒ—˜ó†-=®zµ/Md¶¸‡©Ö“6ÖwÜNå%„ Æï@Ò•Hýºt-©Ù?@Zøpø9ž|uÀ+U…Xl•˜gº@|ÒhT/îØÁ´“othP- H¦ ¥1Ö BQªøj·hqT=VVynô‰pOhÙØôM•L‚æÃö~±„UžY3äzô#}&i™àÖJ k%å+o%è{8ަb¬¬W)ÜÆÁ–.܃ÀN÷5C6X­­,sŽõ^bËe†ÙXÿK¬ðe¬›ñš' ™âNµ ¤âéª'Šù‹¤ÆßÓR@fÂçM”•¹B ,t´çÞHSÕP»±jwŸôÊä,5…K7ñÎRCš‰)jH¿åá•8H¶³zÝYzU:œ”Ïôñæ{ÓÀì7„Ÿå@÷ÿO6Ù@!kLÂGØ×‰ò™îôÙÀ€+hcEAÙo¾+¢ø ’Ú­M®ý-„@é¶éP(i÷È¡— œ&l_æ-p«"à è‘5–Uƒç1þ qÍp¡K×füˆHÅ®eu ¨^€­h;¯…kä+K¶°•ËŒIJôŒ! K÷;Æ»žñºL‰ IÎMË(^ÅmçP»‡u)ê Ñ—¢ÐÙµUf{Ha–+×ûþ,I Ý£”„5oÁkŒQ…#fžìóÏ BŸùµ=uЃ…rx4± 7‰iiwsã€ø6Æ¡W†œùkö¶Ÿ®ËF×Úb醾æèIܰ<ØœºHúËü©Ü LLâ<~«IV[›P²mH&ލ=ÐKlÖƒÅÐÕñ–ÜòŠÄ¤ÏåU˜Bú‚=¨°P…)ðó^e1MŒ kZç°Kðà ˆ*½{M=×5ªk¿Á]üñŠ}NìoX*L¬ðJa©æâLËÕ}¾»zÜÒ²…‡Ü]—Ûö+oÑ-%î2˜?À ¢Eõ1Å»­þÕlûA Ë`¼òo¨¬žñÌòég i\ÂZœaQÿB]¡®¦Úõ3¯ª3`{ˆÄ(àÃXY|\Y3³tÝáHb0ñq)`V&๚t ²f-!³¡ +…I@­½j©ìäa†«G£@b4е];©QH'ªÞ:ñPÈY»5Q’Š72Ü`*:U‚bg_ow˜AG ÈZöh†uD±—?*¬Âv…,™Û±Vf'QH:}ˆ “Ä QÐå¼Ôµ¢ébwž{½+œ½w¡`jÚWMÊtŒø¾…ùjËò|î€åù¡é~oq‹†ñÂõ¢³&,ÍÄUÇù„eŒGs¥ÇTÂ~ÄCóXô%Ù×pEþ)[ÖÛŠÚ4\0èh“©aûBf}Å .Ší'PŽ¥Z´ñIMu5'b# ôZ~X ^¢á¶®7–ZÛÆ"Î]Ù Ì]Æ­œA¼z.7Ü$’W¶–~<öã+êñP ¡R(˜!¬æ¨S(âµQ²¤(oGÃO”º^Ê—SJ9LÜHÖÌB Ò;×ñªT³Ž%/8 Aµ“‚6v¬¹­µrlCU¬LáwyåsXv`}òí¬AÑ«º”·µd»W„ª¨/£‘Ö[C}“ÔÈ.­éüÈ]Z6ÇCè§ü¬^ŸÀÕ/Ì+×dS(hüª´’¸yLì+³16Ô’üñùÚþ?ñÕ¶Û¶D…@_,ÀaÅå½}2Ú 0FÚva0"m«qHE¤Eÿ½3»;³Ë]Y%©}±‰œûœ9ç…¬TŸwÏZM6‹(a'a©ìˆ>éôøSßK¨öÕˆ6iXW·©hV¤ºÖ¥]<|¶ÐµÀ`”—¨ñF‹éfmPŽçQ—S†4»8"/Â4˜SÁÇ`ש*˜iK³1löxþ¯“E#"”ÕMÓ_²‹Š²ì}ôâªÖaë=S¯<ì}miý—8´Íñ¬–‰’eW© ÌÝür¦¾ÛÚ:–£ÝÃç+5*COˆF‚Ïõ"„«Éù#ç<SßXî–Wí7Ï¡¢ó‡²LÂ$²j6ÖD â2•ݤèO¬¿£¤JÕÊ}šûf®<ƒÙ|ç"Ìr;ÉI$:šH¢¡ºY£H”D\Àš+gq˜„ÓHp42&´•ÀÙæ€E4/÷ooî¯ÛÕ›L ¾&W…Ûnßô£r©'y†ø§¯”Ëé+hÚ)´ô³Õ¿´C@ÂFÖ®ÖVÑí¬‰t6bÎu›e¶O´²@OH@õòãø?6®Ò©z˜-¦˜·,FŒÕ¡Ê$e !õ%„VùØÍf¿R>@a¨‡{°:#yœAÂ_Y¬±nšOãE™„EiUonFgáf¸Q(” qÓ2±7Íëÿ'nÚQX'–IÂù-EqWžU!¥!ôØŽÏÎ`WÉýÀ’ØÕ@ˆúJB‚£ÜõGZ.ðÇŽjnäk ·„‹ÿäåŽì³ïnCA>y{D¡à]#D(Ì7°ñ•,5Æ¥xjÍ žW©c¨¿äPë`;ô ÀÙO¦e¦K3zçH$Š0ˬ¦ˆ8@ræÒY¼?ØÂ"ø ·o/~ƒº¤N±*õC0PÍ_œ»Üo:êRã]¥Î»ú'o±òçί‚k~—£–X¯Ã¼°J‡˜õÓó¶i‡‰zȆ˜;jWòÒ°:v*¥'ï:û|ãи Ú=˜E3¥]ž}œ&ævÀÙ «—ÙK”dy§ç e’¯Ãd݆A‘µâ¡äT¦º†yÄðO$ŽÝGb†Þª% ÿ¬tmLÈ›AÕ1†—A\Z"›W…§Gx…€tÏ:)üÖç¨*Fõ…,¼Ù’Ì•¾m‡­OË%ÙÞ¯ ½’jxîö«r¼äUëú8ŠÑÌU#p¹4 ÓܪÔ4(ŽÿŠ× ÅâàQ»Kù üךtXa¶1PaÌr½Î.`ªg©Œ~˜Ëq'E$÷Ï8š–SrÞy‘Í”·hé}1&~ýöâj¥Æ¨®­~M&¸ªÎèDOB0¬öþéF±Ã¦tŠ-`õÛþTW´’¸‰M´LiY²h:x"l¾”l\¯ß1ÂÕ3ÖwžÙˆˆ)ååæ^Ñ‚¿žú‘s½ÛoéùÏd»Û×[Ý!F “•¤é)µË×ymA®£?¸YÞÁŸmÒLFŒ­ï=Ii`¯ó8w³ÉKƒÁOSµ‡ÜUbrD‚¾Ácx ÅuºqŒQM^UÏ8ÐÕøí´êj¥þßh7×ÌÑ 1P¢4™º õé·Q endstream endobj 13 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 10/Type/Page>> endobj 14 0 obj <>stream H‰ÔWÛnÛH}÷W4üD.lš÷Ël WÀƒ¹8Yy°Mµ%M$R#R‰ý÷[Íîªn’²,Jû²Ad©»º.§Nºz·iyѰ7o®Þ5M^Ìù”Ý^½¯š¦Z±¿®þ³}hž×œ]}®ª†oØÕ¤ýë&Ÿ-ʼYT%{ûöýÇììŸ3—¹,ö|–d>Ûð³oÿbåÙûÉÙÕdâ2ÏsÜMÏ¢4q²”E®ãÅl2=³R{ò÷Ù§ÉÙ—ƒ-d¡ã˜2ðéwðâËÙÕå·¼œ1‹—öÕï®?‚Ùq^^ºŽë¥>›,ˆYûN˜¶ùÎXwÃÈG´ 6:àи~k}³/}ßq]ßšÛžïdYj-ìÈZÂ?Îì~I¬Æ¾ áCh͹-0û2€‘µÅK5g•í¹Ö#žeö_“__÷ÌÓžyA ¥0›q[{º·å{_sÛ‹¬ò»úþ¾9ì#~ßõdNI¡ïFPÐŽ§¶']‚,mÖ6"Gâ% $“5]«ÕÂŽá DÔØ fVÚU(§¶.IÁköç5+ª²ßO±(ð üÀñÚ…Áÿ±öÀ¬¤‡uR_mk¬¥.¥¼EGr6](ÓpØk=o:Cë« Þ~[­ëz~ŠbŠPæU É¡×zÎVèØ˜ê¡=Ì_•)_ªŒ|Wö¥Ìyë=+âh4ŠÕ §bë #ªÛ<,U)RºõÀm€ü¦ÌûÕ¢ø‘´­È7Ž})m2ÿï{ôNõÀÔIcFQ!Þ:a?cå.^RÀ£W ¨¼´QwÞ€Š÷‘»·ò2šöF¾±³öÒ ‹ÑÅ$-™™Å·/[3òÜzSý…QÞìâ,ù¶n|eŠFž:é4 ÁÀ´f ð,XÓ| ²0ce2`öKÐ%n³ò§šÊբޑs¶(Õ™B¤a‹ðâX¡EÑÎè¼øÞŒâ áë6|}ÈwØ>;|µ‰£†/]¿µ¾Š)û7f 0·jN͹È.”i¾þðäÐî°ï¼ mЈj‰yª£ç¶üå·JU¶ÒKÕ¼¸ú¯Ãõƒo<“@a}€ |´Ï¼q½äÃÛ‘@KR'îXÕÌí9r ÈQeý ¦KÕŸdÓsŒ¡QmúßôM(þÓ6ˆK=ãçjVü¢‘#ÏÒðÈh “ïZÃСºX­—¶n yÍÀ»„^‡« îÊæ µ¶%Íb/2èò@aL#&/¬—Øa ”â[dƒ|Ô^šbëê¡Jªr<ÈÓÐ vÁfƃ#1g© q2r4ÂÉ‚ð•\J%ô| ës’õ²;·%?M ]Ê“Í_újOËÎJ+2yf†TW€Õ}~%ÂÍû2§œ!‘bGi-K`Ajò’-L¹*¶V+S§–Ð!òIÝ%²ÑBÁÇ‹¢ÐMG5ûó× q®EºÒ@è{µEØm}…=ÚÅ ÂÞÚ} ¾Ú`®ãÇ›©·BRX,Žhè6®y)CL¬k • ö8_ÿ«/¶¼¥* ÊBÛý,DØv&>}PŒÑIº.yµoyGÊ:máUG·o­?ÌÍk¼ÌH]'pÃîìK^|@¼Ô céúg†m# ôÒºðÒƒXBëcˉ±µØðvÉÊ QäùÁ³€ÀOEç‡NdúuP’ÓàÚÎOÃ6q€èúÿ AC‡ö%0=0À±xÅøhó ŠâÀIµVEÎa ð:Æ€0À Þ5Íݘ{ºÿtsÿe+GTëÏóu9åOwÖ}XnŒ‡üÀsâÈô÷Üd#Á%2N¨B é?ÇÁ[ÓT|§„ÆŒ×zF©Ù´ÆñE³½"‰+Ðg½sAëjÍ•Zü8βò…=QIŽ=òH8 °ì+_‹s®…ŠúŠ“@BõS™1” C'Ú?§jó§Á+5ÞKU>@È›ªÈ ÅE‡Á%ùÈË.õd õj¥Ö2&nPüõ@øÌ)ÝSSü]ØIO;A åWX¨üy‡Á‚KÈàxøR›ˆ7}fJ×I©jë§ÆŽ€»Ÿ:‰€Z)ÖÍ {[Ô¼E£<褱\«ºl›šõá7„¨îyâB<¥¤å+9Öyj/ß,Ju}Æ–yÇ«kë–HwöDMÀF¦ö¶b»âe£ªéŒN¬JÊ÷ŒäÄVž{]ùÝY(éQäŠD´)êmÙö¾aÄÄšÕW ãë;ûßcÇ^%Nœ˜/žwÒ¨“ÌI¼“F½aâ˜Q¯¯ßZ_4Û B§¬±?Lf%>÷Â.óì 1lù!«ªËZU½ÿHgw¾6·^æøY'PØŸ”¹RŸÚ½Pw ŠÁÄ!Ç·SŠÈ v•o/ÞüãÅu¦Na©¥XÎI\ƒZΗ‡è»Ýö“ÄñÒÐxã°p‚ÓÚ'€é–œÖ>ÚÄQíC×ÿÿ”•< ó9•CgÇçþÜ2uUO ¨¶Vƒýi@{Åvšñ úi§jzQÈiº±eLhGK–-¶¾1ò¥Áå¾ô·1w½H³Æº¢œ‰} Т˜3”a€zµb?1i„ŸbÎ5++Ú:cãiP€¶Ø@•‚嫇V« ûTy6bƒL˜UC‘)!E!W:yùΧrcÈȨ”j¶KËwÕb‘×¼OÚX|¶¯4…í¼áË—\§0«¥ú¦E öÈOa¾…úLn€~ºÐº6ï×^\J÷'f…¡?pšCÙ,åèb‡>l–Qpër4=ú‘D̬7‹U…£h§8óe_DïUw¶³“‚;t³P|³ƒêãºÄœ8’ëe+õèËÕÜ£ëU„ 4HùT[…<¸îuÕ@çk~ص¾„³iú>4G((O 931|¨ ^™uõî§ýÎß³jæuM»Í• Ñ¥"¹|@»ª¢"´°Å |%º’¯ŒEŒ—\•l ÜZm]Žã£û3ËœÀHèab)<^ûIè¬ÝŸk^ÊŒ'¢<"ì¨RÖøÈTöÜÑšÆV9ýöaaF'i Šô´•Ê0qŒ&Ô×o­?ìN ÅIê:îrho〴+ç?+LliIØn8´ °AZÛ6q½ámCdV¡Î7ˆ!Ø)N‘ç‡NdúuX ’Ó@äB³Ó@¤M"º~k}ƒ|JÆûê=,œUY«¥Aq?ý¨¤KoP-¥(ÚÐøV<»FÅU´²J(w=\‹¼YT¸`0! ôcÆØÄ·‚¾g ØsB¯“‡Wdüt¯(úÚ¿¹W?]—êÃce£Ô¥1¶ñ‚öYï¤":èðNùv£\£áxÑWN$4õ$g9°6Õ~.uÉHäÅ@×]M,Œ¶ß0›6I¥5ÆWI´ P@C¬Æ¾ùý'^õ’®ÇíÝ&”—ÿ`Ñ}7û endstream endobj 15 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 11/Type/Page>> endobj 16 0 obj <>stream H‰´W]oÛ¸}ϯà£uÑ0¢¾uoïín·‹H[÷!Y²ÌÄnbÉ•äm³¿~‡"‡¤$DZäö)Ž$Î gæœ9sñ¦jÖwYÞׯ/Þ4M–¯ø’\_¼-›¦Ü?/>ïÍÓ–“‹ß˲Ṙ·ÿ]e÷ë"kÖeA~ùåío¿’³¯g.qIÄ<§©øÙÿÿEг·ó³‹ùÜ%ŒQ7 ó»³0‰išÐ¥,"óåÙ,uæ_Î.çg¶”Yˆ2pù¢øxvq%®ò>+îÉŒÎŇ_ßýf‹2¤i$|¸Ôu#Ìs‡1õZW>(9*^Ö±åÂTRײv=»çßoçnç•sÑ4MgYQ?f ÿ”óòòêfvã8ÎÿåÎKš„VÐÇ䇬¢ÈŠR?’™;çPÕ4™­ÖÄ‘F³š8ç>ü goù÷Êaáì>…×ä8˜mæµG! òGù>c³%wä?ÆbƒgWøŽ8<g'†¿ÞŒgêEQ“FÄ&–hV*ê3m1[+K…õ±|Õà)ðÊô%ä/ÎykM=×WÉÀŒ<ý íÀ3ùrIx±Ü:òi‰‰ÓŽ›AªD:Š¥:Í¿ o®›÷ú‚wæ¨4ª}ꈹŽb«~˜âHËwhÙÔ]`¦ÍµÈÑŠMD1 ÓN#ÝÀµ¥½Í+Ñ/U¦º§xPÏE„M Ër3;¶_€¸é[LTEçG§ã›ˆ~…Ý”¯ŽÌNb,¥‰òW ¿ úâ5Yšå•*¢© à&i«¹߈ÙÓ u}$Uø1Ço¿îö]˜/çpR ”—Øuµ#îéZXÖwù À†Ý ¾«±ßM äÍ•ÓÒŽ4~]Ìü"Cs[LA6`¤Öí}Bð4]V? hàwJ«sÀ+'mX†6*‡‰áwùU~²,‘cò݆·ô!€©RUÑñ„Q7Ô£F‰wÌ(ñŒ—s=ÀDb¶'­/1/¯nß—y+3n¢Çå`L…g˧ïÇbFZÞŽ¹™?ùf ø#ŠSEúvp—flä,†éÞ±t™Ù&@ ¸§™07ó|è²Ð6Ös4ç…~[Žæ: ) t®E¯LÈvêõlMÎö &†Ù6Æ ãó ƒ·kæäyäé|ÿþ˜Ý×Sž+–±-cìNDuãügt—zá¾°ñE0RT‹ÈYÒn 2"È«ª£cK•õlã%O`¿ž}‚aÇ›]…S¥¨b‚´ºÈ @£Ù ÿãÌVs`ôó´;;)žë¦ß‰Ï,&yG(,,%/3tïœ'*UQWô ˜½²\m$ ËÕ&ÓŠKáË2kØÄÂÈ8îq9'þÂdr³ŒÖínLý°“Œ 5ljá/7|ŸFþIe üˆÆÝÈZíÖÉŽRK/¦³8½©ƒJ×Ar³ å…B~íIË!î Oãx®ˆÎ›Ê=ÆÄ$îÑǯgs¬Ðª]FäF0½*1$Òµ=´T#éØ8™—Ò:á¦Ìg ׳;眙e‡?*ô/ È|W¼ÅîíS " #ÙÚ¼Æí±% \ åÑg¿Þåæ Øž• |®™oü"ä%À"~çîÞá –Hëæê•Í¢ý0·U™s\…j³,µÌ©Y×l±Ä‰»«¤•Î"ÛXÛ®n@õáAÆVVÉ`Éå5N‰¥¾¦£s’†xˆ¢“¸!LcÊZ_þDj0¦0ƒ>ý³ˆÁ„'xoo×Å’ì0¤þ)WeabØÃ L¢ÔPƒnMùÙ!€Xh8‚…/ŒÇ–%"øíw’@Å(Q$TŒ<×Næ¥ú̼.XJÔOæâ”©P(L3¼«ÚÞGzºï ЀVQP1½É¬öÖ øi‹7Ò¹Öd–óz ÚÃ@À|ØS‡Àö½pXO<&­¯`<ØSêÙ&]ÿih7N’.?é–Ì ÛªZ7ÍLçHˆkî6¼À±fuœl]Ýð» 4R³¤Ù£:&p¸$ßÖl !¡]o`xn™~FŠ””Œê#·“¾‰ÊÉ¿G×Þ¦ã‹Åº-Á2çO;nº/•¿,c.yý_"Z¼&bðÌ?Ü~Üñêéóúo~‹Ã3Ö›ï2ê…û>DÉiê ôi(Ù)œ*Œ‰I”¡ÿ4Ê0Þ=f÷õxħ@à§\“À<¯sÕÑœqn´Dœ`Éi„×­l0ºTœ€P6sº¬œ´ƒrñJæ7à~ÌÉÜ)ëø™¿K²ÁÍf/ÃÉW¹¶W‰W-iá¸×>Å>ô4pµ¨‰¿13¼*Ç쀥4Þ[éCLO`àR_:‹¦И˜@}Ü Ž—ÇE®(F·†2í'RϸµcÍýƒ£f\ZêI’«GåFôÑl‡]!LåÙ /ùø‚{~B™¿/‡ ÎÜÓ*îŢ˄·xjʼnI×ÇO¯xQ:X‡°‹NM<`F”Êe]ôQ›—…Óc³_èúŸßÄæ£ãÍWd[iñ¿rL¿-Ér‰öu‡9VX6:&ˆÇ:âWƒ=¢Ý“rLÝni+Ж&{ÌõÍÌ‘[Öb×ç>³*•Ï//¢BÂÃ~¼õ÷Êf°¶`9Ç¡¬¾qäßKð<õ?§ezµ6byEP‚¾PSì•Ñ;t/\%‰e÷–¡´%›ù§ «Räd©÷Ä6å‚’öL*ýH\볺ôûñ|Ââ@l:Àã脽H'.õ"ŸÜ+ozKHø4R¹øäˆÒø³¬‘u„M¡,²G1¡ßû$¬USÆÑqwòN¢È h¶ÞØDŠ´LL¡HsüŠì!äJtß»ÍthL¡@£¦¶ö. JµËñAkæÙŸe k"ò5 ‡:©r]M—ÓÈ£$í¤F->s؃jtû˜5üìEóòr!¤A-£µ˜P?=©ŒŒ9Ðqv¼-It²µ"ÙH"F¹½‡â‰E•òÉݠЇ*g*Žç·¥=‚ÔÔþ‹2ÝôÎ$š B—¾¼vk×4Aivþìʪ^*$»[*M‰4Ø%’ö‡¶iwä…¬.d!  ¨s©{.ŠùýÖ‘‘\^)(Þ¾WOÊ\=FTw)ÕâV½jÆkÆØ¥,¶"ߘ^ìS/í\Æôcf†|OPm«Rh*)£pÐÕº3âÈ!½Ñ{T¦Z©¨‡òÚÔB–ô«Þ?ñ ¯žT)u&LÞë­h• õ¶£ ŸkkGi™¬µÎÀqiîï¨Ã~6IACç—ª°o¦¡Ì©ç[ä²Â[´âqEÖ5ÂXhàX[Á„{Õ"6Åô$^69ÞiWUbCâZÐX‚W+`5‘°'6JpÒþ§XQ{²Ÿ`ìÉ'¦×”’¯Ç£'…[i›€ž$¦QÚɼ¾]†böšÃµb²õ(¬ iîSlUfvï4͑ܪÓóEíñèOvÁ£{úÕHl={uÝ+ä€]Ž)yŽÑµ’a¡Æ‚V2õIËÓÆÌõHížfê< z;Ã1¸\÷[XÅ/_÷¦'}²ºÖ¢mψ≖kSÄ Ž‹Õµ¿G¦<Öæe=ÒˆHgØŒÖd”¡õÈÁkë¬[LWwüBâ)œ´’~œz÷OSï.Txó¦ªwcb’z×ǯ¡¯e¡L'ï'ÈâÔ£a`ûì¨âýjx,å¥q«9NȊﺭæ°2c“O¿­ë-WË×"]‚ úò¬Y£„-Ž¢»~Ð3eÀÅ9@Z¾è4„PÍjàvWÄ÷)äåf/:êC\ ÿ¿ŸÄl>)P©íP¢$hÏìŽ&§‡ Ò·=Œ”z0û®âB h¥„çcoÄ"Ð~‰u«ÙùØžc1@#é$¦Îujô+rÔrkoóàU¡[áÚ«¬7R#ÿ´O¶ä%Ã5Àc”l$GJ²JVʃW²hZ̰±óëSMwUWwcïÀ(O}Ôõ%H.”‰ž¬W;€äŸÙLñ¦óU’N2åÐÁj`Ðxÿà,Œ[Œ½piÃ(H-:r²Ø^ä7Må6º¯ýíÇzeG½é§5=ò-ÏU)?_à)dgùX’‹a¬mM6ŸK]·9d®«úa¢ÔÉaHbüT?®\9EqWƒÄ´Ý2¬Êê¸ÌiëÙ£ávM=zCjZ o»_©ÅFƒïeì‹™\ª‚Œ`ù8&Q&×òúㄊðP4ÔÁFÜö˜æÇRnÃÌŠå$U’ž¥J’|ÙtZ²R•°-Ö¨³üF l­kœ‰‘”j·8£e&©}Btròg|dPëng¶ÑÖyÞ$ÂpC3pŽrŠ7Û0ÍxZû~±:JJg›åž2¥-åù«Ì¸+´¹G÷¢E‘>è’ἓl"ĵ|A“=.('¨‹𪶚¼ÌÅ‘D jqÑ>¨ Ÿ\_•)$îÿN`Eõ€œíÞC~ƒ¼O”ÖK²Ž¡ æ_PØž@l‡~Uey¸Í¥Û—Åt(¦ú1â9—÷ •˧QG|Õæ  X³ƒÌ¥, !|ä¦w²9n¹Õ‹áô® û4PÍÎÕ4 Ëd:-] ªf‹U JËÕ3¢ k:  °oYæ„GHpÜ-§ê(M„ǵ\8§Ð±›ajÏ] ¥úÛÚÓ,LÄï‹ÒNX¬ºk§\Qæüs›«»”«Ë(Ÿ’r’½"¥²«Óóršl£ºçôM!q°&~ÂÖ×|ï 9lh{Z»`'<”Ùkäûf8¸GÑÊy` >&q˜èDT-ѹTõ ADŒFG/à÷œ´|À£MØð»jÚ9¯Bª±œñ˜‡÷N‰pEÕ¸Õ'¢{] Liª˜zž×N;áz$C«Ç@„ì¿î Gø€çuÇ_éX@%ÿ19Áñpˆ^?z×DË”½Ã#shöÅæ %nþE¯†ÇŽœªÐÈ•¡ä™^Ç–ëƒÖŒãšÊp©®±.{ É%7x%žJË9J¢p»e×8‘·ßeäMo“à^—âqE¼Rÿq­‚™\º D ²SV!¿ú^1¥¢?!¼ùsÁÌmAÏ›³O 3?KxÄ Ôót:-Z)<Øk„‡Y~sñ;o±¸QŠM˜lÒ¹ ½™ÁâŒFË”éËÿ¢{blÁJ¾‰ šôâçËD#ˆŒ|j™Z?`=Bèç6Q§aÆïuZ Êóš(ÞHv9«‰Ì«šˆ–õÚ>Ï©ÒÓš+²C†ñ„ˆKð¸)?óâ^<ß~úíöÓ±jû§jVí—OݯÝ|ù,¹raHq™‡0Ù<¬«y­ þNapý ¨'Éô™`V>^ªÅ×ú ú@<{¸-HÎà«þʘZF_yUµ©¡û¦îÔ÷;OÇÚî‚èµÚ11ƒ”Û—ëðIƒY ©¬bºx¦OçûÞ£ õÕ¦†~ßÑ1*ò¯(cFO¬ºÂy» åË=QfÖ=œèkÝåX#MÏTÚZ 0šWu=]Þw^æ™Qûc2Þ*{Ýí÷ÒZâ«æZA·á»ËÒ6Ÿ½ØW“/ëåâ!í¼IXÆNÄxs Fe‚]¯ÄC³Ã8¤Õ7]š2Kgë”Åqd2ÔßkšrÖ:¦c*¯æý ñÀš…Ú …>qĦÇ^ î)$®ï ®ï8žT$Ë7¹Ø×@|qï%iYg½â"Ø£A££Âe£Ór€l  ©¥ôâpu5ðœ·X²[«ð1…•©H •V„(Náüþ1Á«‚ÌTõ£‹õºÃSÑ&æið8@[ê”0+€7t €¤ÅRËZtŽåóݧ5°²°AUàíÉš9¡]Y?«šœ¾ÅßQf2¹“¼óÒTò48ŒÎƒÃíVŠRyZ²Í«‘–ß\ü ƒOƒ#L}õðá,ÀôáØEª€šµ÷®œ‘ràãèh¢·qi%›e‰•êd=A' óÎÓj ¢—"h¼Â4²Ž¼º'Ÿoµ¨ü€û¼Å™oõ»N³ I=QtV$8&;g¾&Ö »r¡Œ;Í—AcO¯[Ssšì ×Aó~úxÏ{hê˜cpIÊ‹îzž“MŸA›oA龈ööº½ëÖ8’(+¥€2{Þø8øum·è dak‰·Q[]¨ÿ®^‡PAÃà‚3¼Š"2¤¶¦ûày"K.Sø37£°PhP¸?êÒÏ0%*Eõ'ù)F”N1阼‡ d•7™Kj.>Nʽ÷>{;jªx„°äk”GR„Eú±]Άyæßý4:ŒÏ£Ã8 ˆ¥kÙvXE†¸úÿç û®Áæ‡o@¬Pw}Em:Ò€Q>½xÍÇaR-3:ùN˜8ÂgÒTF`/&Á¢˜HÐ$ð³$žuWÞ~Àaö8°úÕ3¾–3!·<:§x3IX$l³ªmNÛ%%Ýdaò½¤ü¤#zÔO&e¸%Þ[쯊4LÏš†´!Å&ÚxñeXZ3ÕБ6-ê7gX¡“cÔxÝñ(‘XôÝèÔñ :ãô‚'Ôƒuõ¤ß.oyIøÎ5Œîóüž_^ÌÚ(ÎØAË«oŠ0É­»*D$’bK,gŠ8Mí½]¦øO€ Lठendstream endobj 17 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 12/Type/Page>> endobj 18 0 obj <>stream H‰ÌW]oÛ¸}ϯà£tQ3"õ»X m³Aîö#»1öH†l3Ž·±äZrÛÜ_I‘CR’ëJrúDÅápfΙ3ç»jý-*ôË/çU•-ÙÝ¿,ªªØ ¿Ïo÷óêyËÐùoEQ±:ŸÖ¿n²Õ:Ϫu‘£_}ùú:ûtæ!E„¢8¥hÇÎþû/”Ÿ½œžO§"{š>œM<ì‘„¢é… ÁI„B“M—gñÜé?g—Ó³?úZ ÓËR.ßrþ8;¿×z“å+ä°Ü=ûêú57ÛÏã§‘8ƒ;ìEµÃ$AqcZåã£^þ’†-SAŠ=ËÚ³b_g—7³—kwá4M|yËV–W÷νëþ=ýÏ ƒh@0 -wûD† Ì¥ˆ‡á(‘W˜º“˜»ž8k—û‘FN‰Ü‰ÏŸBç•ÿo\:×ð–/<º³u ­·î܉|(>Ã+nÌY2Wþ0+ØûkÈø‹ÐÙ¸1ÿO–©…¼D•ðM¼,À¬64oó¥ÛZʬåa%ƒW+¸í\æq$ò+íR¦+åZ²YߡåV=Ú•ÊMø†Øya,©¾Ë¯—²¹ÚõÄ$‚”w\ƒãµ‹ÅŽûïé÷úCí ÛeO®ÁÁC •¤~ËDâ }ˆƒŒI€"Áá5…8ë¼Bš-ìu Ë>õBœ„¶å>·ðGß‚P^–EqŠ#ÙˆÔ-ª¡ž“8·,õë1¶‰4i93Ø„¹õ9ÎBÛÛ¾œŽÐ¯ÓÑõèX:‚é€$D!&LÂø{Ÿâ¨aÌ‚êà¬Rþ$`¬ý€”c¥ôkx^’ènËKx2L¸^‹¨†ÉoOÙª^æQÃØˆ©1ö ¼ºwÿ=<¦ž^Ü:Óh¼Šö#ñ¸ª’ÁŒðäSÛD¿0Ú"<°¶ß9ï¡7ç¨Ü µ±X°²t‰ß4 @G˜VÞR'¢¢¥ŠÑdzi¥–6‰U)›FõÁi ­Í.®YbµÍè é¿>u^€ÚÛk‡ÊZ^ÙÒPî:( •$„ã,©×•¸¤+µxTk–zÁAlWÛ.ª ÀQ|RUAŒã´QY™¾³Qš'Ü3J1 m¯.nß]Ngà09 D<ê wZ=ËìêɈU5ªôï*y‰+Æw€(:äø1¶ŠOc+‘;yËVÆÄ(¶ÒÛïÄ, ÀŒšNsxa;>‘‰3¡ê™©P{Írö”¤ÀÙY²çÎÖRüS¥´–ÚI‹Î –åG Dßà¹öÅ%œ˜m^<">!ÊUS’0.Ÿ­£[ãai]o^ì!üöm>gAÖ¾}›H‡W½@~HUѱªONªúË•´>ËYôÆÂ˜š×»¶’Jà$â''ö}®.E•~˜¹òÛKWúõV½¹|§ÞLá›ëwêᯠµôæZ½y=¸œh’`šž’šò–Kì;^)P–£ôAV1Æp4øQ ú`×ýc`HOC`?© Æ¢Á˜½ýgÃÃoã¥)ŽýF¬®.?Ì.of?Ä«=ÿëâÍõpÈø”òz°“8¸ |¶Lô©[âV¸¼s¤a}Z8¶p‰Q…«·ÿì…»]ªG·Z?0ÄëXºË6Å||†‚Ò^[2`Ãj~ó<ÚË»csÓv·ÞàŽÇîõMkP´IWo­Â-tÒDºµ÷»šHc’-…§âÉL¡Ï?d’‰#œøÒX±¯³WOknåÕì:_W÷ν;bHH„N² wp釼Á5Mô+9 ¬a„cyZ4¬ÆÄ(°êíýÁºeZ]ËÒÚˆQßâ;جKœùÜZ)G©—èªiUe™mDá˜o•6úŽ0—»µe¤ t©zûþÉ|,w‹Ûná<¾ê0ÄòZøÔýÍ`°Þ}ÂG¾ÜáÝ'LZ&z4=­ ŠcRŸ-hcbTAëíwÎjÀ® ñ$Æ9Œxö ÎÃS¶*‡:I¼““®IxÍQÚ¸ju˜Ôõ¿ßˆÂ§õK]çMdC³ÑoÁ+ Ô'ºUJ¾f¦¯J\<¸aÞ3SuŒY’ñ߃ŸÚ•=|Ìоd›iÔ.E[–ö„hµ.8j¡í퀕øýåƒ>S€µÛÎçL•úî¶+†-IE~dú(ý$|Ô$|¾óe%h&ì܆+ÉHeq "­¨q¤hå\rßìçOÔuùø²ØçË[VK£Q]œÁRë¤ckHpBΊŠÏQ²è€»‚‚¸PT!}'8¾5Jð¬Z÷˜Œ%’°qK—„Î@nw²¯Pº6æ@QkI¸oÈ×6f Ã-(©V+|4Å&W6‘™—FHNtÖm·)ôvÍk¹;爬Ñöçz8Œ/ÊÕ¼§ŠRµFTÃùzSÑ¡<@ìrP¶X@(ËR”êdN@$â–ìKõ# à»äaÊ¥ÅJ˜ø±ÃTÆïÏ5¾“U’ˆ9)yöÄz\ã°ý8Æ$ ¬3ú]'|¦— ˜ Ù.kè×*ºlH‚¹I §+U}`ñVQâH*¤žE™˜ˆ ¦BêE8õQ¹TÎ}p[c‚Iý´;aõQ[ | П´¢‚7"Ræ;«§dÐS,òmÍ>cÊchSŽ3lÑáÍ &ªå®ž‚ʲë¶ÐMòW‚2—¬3܈«¯ëÁå‹}'Cëk•þfÃl¹3/@¢ξ¢Ò¹R¢ñöÕûðÍÉŽ»Ý”«ßŽ7ªƒšC·…k¦Û¼Bˆ<ë8¸ì ªì+¸¶"f0·+P™?[™WîáæsvàzÊDÙ¹wªÍ ´Ëò\ž •$‰/d­em0¹ùI„¿‘ö-µ-;Ñ2ZÜ#›Ít&»¡ý[O#Ö e§Ä:HR&vt„HžY>«7ÞÇIÒˆn ”µ™y»å8,R>E…Í®s£øõÚ Ly±Ýb0¬Ã½dVKi =[m[("7nRtækX]vÆš­•š2W a;ѤܶÆVÞb‰>j¥ÕŸÒD¨};~6•˜êΫî„÷²Ô?ÀV{åGÙiLzšÍæÊ°x¾j{  $ÿ_´ÛcClv4}ÖU©2ÑÍ–$MPM_ÃUjÈË:‰¬€õ“uÑi²Ž„"Kâ4:VÖ£dÞ.¤2ï:{Ùn¹VˆËu!X»bEgq¿Ë“.1Í[ÖF”fÙÃ2㩤AÍ^&\ë|0RqeÒŒ¼¨ÃF.±ºkCíh–);"`4·Ä„êÄj:ÐkqÄâ8ÿé<û"¶5%ÖÑÄþv=fß* u2»T÷ü5ÿ»Qµò6iz_LAý¹¶ÖHÿîûi¨³t¬¨Åć„Ù˜fä¡ùë´Ÿ‚ŽÜgݱ=û´ÔyX¾ÜŠdkµ–W%nó+ìÓA~„¯ËcfàÃG^VžÃÊŽàЉùNP3”sׇ†Ñ÷=úV(‡^¾`6²QµÕ´pù3P‹ø‘=œêaTÞH£fêÔ yÑ–ñsÀ”f-ýíý£³²ÒýªÝëYG›™°±¦&àÏÁeJÌÛ‹œZ|ZUÙR»Â¼º³ÔÑÚÉÜ|¥¹zŒ|.J}图©Qe ò¤VÌYµ†ß9š3¸ÇÿY/·Þ´a(Ž•<‚ÔyÁNò8i¬ª´õeÓ6©•ª,¸…©DB·?ßαCIèÞ òåø\þçwЭeBà’ÎþÒß›¤ùõ[ч¨UÝô®Ša¥Á^DM¨1ÓîU}!W‘ðŠdÝ&•íæjG§¡¤E(ø %i·¶’у£ã•19_ͽ˜¯×Œå„̓°«žÖÃf,A¿RíôºŸú¾¸Ù·Ó2x×%ÑQÞÜfÖÔU‹nF¯ÿÔ#XÎIVšWžþ¶‹"YE‘ é=ΉØÜ‚~°u2®€â°ã‰xÆ Â ïEÈ8?KÄ)¡œ%Oöº ®“WI¤¥ÖyŸ4O°É¡3¥ÈÕ#d´¤®•™$¦·–Ũò–…j³QHüÊCMi@ÊPÜPÜ'¹ë—ÿ˜^²9„xÚˆm7 ñð1’™fƒê gn#èˆ6J ZØ]õ{éIë/…”“Y˜Š]4¾e Ty® שu½øùðuqýeqûíáæöû‡Ï7G'[^êds‡Ž®=)$°ënR70ü(!_JJ ŒKÄ•GŸ_·™´jêPQfƒÓ×ÜOlF!UB%ÓA£6‹aZUSЉ­ ›H+0\Oºn ³7æ8ˆ† íýÔ]î2Ù\²<ÍRG(|Qƒ4Ò%òq›m_+¼/—ÀCš>7q÷ãaÔ÷ÊyB[Õ ®áÙj™u¬%@ʃ›€Z­“J‚”%êœÎ±”Ýç§ó ò³ {†±¨úë©roütb¬!䎨äàb­ŠÄòH¤_à“z26W6É^‰°Jv±óбª…½xƒãz¼ëϯÏy^ýÖPYÄ1:™rJ8õj¸”ÃÀ…¦ŽÙ(/ ç£äÎmç2Mè±#¬•ÿ‡vÓ endstream endobj 19 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 13/Type/Page>> endobj 20 0 obj <>stream H‰¤WÛnã8}ÏW³/Ö"¡EÝ…m4¾ìLv:;=;@Ò‰±½KQîéüý’"‹¤D;m9]Šu9uêÔü²íÖEÙ¡7oæ—]W”+Z¡Ûù»¦ëš ú2¿Ù=tÏ[ŠæÿlšŽ¶h¾èÿû\,×uÑ­›½}ûîÃ{töç™|”¥y€Zzöß¿£úìÝâl¾XøˆìGhñxvácŸdZ”(ÎÎû˜$hQÍñÿ;û¸8ûýXkqabY@ÊÀÇkîÑïgóÏ"¬OE½D3Z{óë÷W¸Ù£<|uÉPÇ8Ä ·³#/¾ÌnèrCëŽy_ÿ:Ækc1ôqYVò›LÌ´ð; qI¿¯¼ áv4«‘—ñ‹tö3ܹôäïâuö[ÈfQƒ•¥É¢z©ÏÁòâ> n¥ô¦}öòQñke¹Bž¬ôOðöÃÚKúÖ•z§a©þÑïÙ@Òw¤OD¥ø ¢ëõ¼×8IÐ~‰›Q×r¢ ²T¸UŽ‹#øBº¤S¤cøJdD»¹*<À¹Ì5R–6â ÑBzIßÙ“óö… uôI¡[Èä¤,5~à!5yxRþÐsÛ•+€±Àœ^ÿÝ# è?Ððב@mvi¤ ]z26ý¶.ý§F¹ªc°»UhËÓíÖ.4P/†'W>âäGrSý£†B0}($y"¦O¯Ïž.ª êä¸gáÛ¯²|šìNÂE¯rÈRäJÁYÖ¶´j/Kp½Î¥ÜÇA ’´mç’2†žÖ‚°“O”V“€ØK€¿>ضª3j=A8- F~6@°;*Ël0ê²óF£å'h0¶ÒôeΫƆ5ŸêÙ¾e?q/ÙWžidšfËÖè›Ñß=©;G·p— ê•É]9Æ(HˆŠã*˜IµDsOKF²h7ñgsTÔî<¨žµF/¼‘ž–§ñ‡v¤6¸%QGºIo ”³·¸)òÐ9„këWx$Ó×¾ ¥„:’—ÏÓCsœZQLï)…â[; ­jy[\ˆÉ»CÔ ÚEØžäá18WF/$ªìòAøc z”•_ûÙiMÀZmdæè‘³€MLcìáىЙ¡º $ø@IÔ=Š„¶%4Ä¥ÏËÆöQÞ1ÞòD‹©Ãð:óqŠ3(u=æF±AÐb4‚>‚jw«É'§Y¯ìÓùmæt§L†ú€ÄÙ-F3nú© ±èâÁš­<±¥ÙÔs—q÷€ÃV·ã­Dp’ög«w™!(_¬¹¨¹›Á·¥ðPX³&ÓÔ܇I.v“ûé<¦üp2ÏÌ['‰ªª±è7µsðvJkè‘ Ub|K“ý8 h#`ÛÏ.× —SÚ'Šq 2ð«ëPB"[l{n!ôVÝ0ºÄð<^‚„!&…ªC«Wšü·uÑÙ&ŒÄfwöF…aµð.²¾l6¬åBR(24Ð_€„µXm¤Åî OKk¹0½Â×AÅ|fäCvY kí‘ÿ`vJéÊ¥Šè³K¯m:|þ@u"ûôBêîlPQUfº©QȘ%ˆÜî/wÎ<4j©vÄãi@ fˆÀ?¾ O_&r¹Lè󸿒=>^¿GÜÎü3zófþ©¨—HD7¿~õ…èíÛwøóƒ§5¢¥:-²"óùщŒì·-­e}SQOEÎÙCò_ucG{í›ð;?Žnÿ¹|?MÄ|ÒgeôÃ(nUa‚â,À‘<Œà©ŒÌyˆ¿b™@“wÎÈúüVô½ÄþŠí1^%vV÷Êwvm/l#'› ÓÄ‹Á³DHŽ~Ζô¨8‰­’œcý~¯¸â†*²Xnú½¤V÷»{uÿ²ƒ;…º(WêÑÝìΛÜMALp¿ªnAá8ij‚áË4çÖÍž‘¼§G)jTŠ;=˴ΰ‰Xm)hEÓreéùá9¨çü´\ƒµ.(Ö*Ù5_ +G‚=PG&›×ãSC‹•] HN¥gXN›A(«Ó|ƒóh‹`i¨!ýLÒ94CLþê\²sgá4ãh§l=Ù¼H/$Z&ñ¤ ¬mV³±"Oª%È £šºK$ØLÂb«Þ.´XâñÂÄÒÎZªìð2€Öf}r×!M8®cî²hVWú…«ð¹ —‡µžì®%…ˆÒ‚#µ½Œ”ïñ&Ò@§ÃËç% ,ˆM×ó±Ÿ÷œh¡´´–¢É æ“ûU\g Úš®9¡ãa|'8å‚_µý*Q ýw)Ä ŽÉT͆ÖõNÛâÐ6Ño?;ØŠ–¨x†Ç ;–ÌÞxao»z‚¸¤4CßÕ #ºlŒ=eãò2ßì¶Ó^Ž¥€ ÒmÆÂÞEu¬à H¹=sT+oµ¿öÊi4’øVãh@6Éâ¬Í>òÒKz÷h%j$jÊ,j‚}¦¦|êy©'—jÒº“gúΧ&6ÞRÓñ‘jš‡”ˆS¸Jô“^L îáJ1”gE˜àãT“’“·½?0·¤ßﯽï¦Z$¤icé˜$$W z”§8JÇ*䃦g;ÁŒ–¿8cÓœžrZî1ÓèAp²®õc…¸œP©tsZs$¦íÊücƒébä”nºèH#œó+sÜQó6=fÞû˜ ú(âxÏû³ºç-­è#ºÅA02þqTYæ?ÆYl>Žìöz„¼âcó9º¬Q³-þÜQĸX,Z$<ŸzF˜"É{Ü|)×ÙÄ\‹ )â£OÈ_UMÞL©ÜÿÆK¹®)úù㢎¿üv³˜š"’òý1°N®$É3¡ _cƒ1Ƨ±Ö6w^\ÎoS‘%8H÷ùøRˆ?QæŠ8HÖ‹ý0Aa–*ž:¤¢óW,“å„p& SËÒåÑk‡[Ÿ$ÂÑÀØ©²“ðy$¯ >3ËÄí¬.@-n`fRöÒ«µÇm[‰þ¡Ÿ$ +è-¸0°›&¹E¶hRܰÐÊìÚ·±ä˜ò&ûï;|Ì]¯%Ö!©áp^ç¯J€àñ§@±˜¿ üÎv[¿hŽÄ‚2ÚºÃ3¯þLB™¸Ì`­Ç÷¬Av ¶ 0K.†êDΞ„ûD>¤(áÞw¼™ˆ`ä™Uýì°‚)÷·àFŒ#ÂìÁy=ùÚ¹Õ\¹È¯ÂŸ~:Q€©Q |2Ë#Ù ÿoD¨?c, †bD–Âz¨˜˜pþJ³­éìAøPæblI€Œ¨k%inj}9Á^y(nê¦!y#<@·‘ƒöšô4áx˦mšg;dó…*] —Ò]TV¦‚ø°Ç¢a½ ¨M”%ê¨Ü!¥#ThÝnÜ-Äïämä,«8òÞÄbî;¹Ã~Må×Èí˜Ïö² LØåqîÄ×áN\¡\2wŒ‰é26³>_ùo»€Bœê{Yzp1G’LdŽ˜¹­p;¶lóíô?:ÓÝÁ`©‘ƒ¶ëBW vfVªÂü E~;®ãqãTMžI _œÊÒÙ²Jæ—U™HfU˜I]çדK«ŠÃ8ؘ\[‹häÆÊÿ„óhðsM3{ì‡ø²(a¦Êês`P¯ÓVcZ¿áGÔXÀBšèœ×Ós˜¦ažr0„€K¹ Ã8R„ÀøpÑ…'I\"Xœ}õl— 7|„Õ˜H*Ø1Œ¬IÇ×´ý¶Åì=b¼©gjÚ£¥î—þhﳡÒà òá^2›1ÄË8LãSu{¶ÛÒë»M”ˆ®³»Íظ‚öcßcS5§ÍÛalÉTÏ^'÷yXÚ­þ5÷z™ÃŸ¼ˆ¢(]ª2Ë™ø?¬§Ë8ûùR Ø«à_¹ŒélµŒio±¼1Úv,ÏÈz«¥2Á•y¢¶ób©šU/‡nä1} [¹>e;›'˘¬/Ìúà X•¥-ÎÜ)ßðB¸\B݉Oè÷ks&Oå{ðÉÑÛátK98&Ÿ™˜¨ žiêÖ¶Œ Nß©˜Ÿzæ]º”“C{©ˆFÖËeŒ&ï2“ÒÁUÉ vÀéH¾¼¡€WVðo—J‰3¢JÞ. 4™É|Yi ƒ@ÝÉK)PÅ8Ñh#†E˜GÊÛhä’¬8^NÖ&y¦'§ÀÙÙ•Mœ]8°âE˜–òšfúÀŠ@Í l̦dbE2•=#m`s;M 𨼠 ưôðlÈà||ŽP÷… ÏÙ㎵ýýmß×Íæ‹ÿ%˜ŒÖÉBÒÆ+"œ¦‰|+ÂÀt´$ÓÂQ+5Ïâº**OaæÕžnÅ•¥ö\Ïf6YR…i>pêÝ÷Ï÷©ï• ûÿêõß>ê•O“ù´jX Ò3¹Öó(™¸¨-óë)ET ]ϦÆÆì%+ÿ£¨Ša÷IÚN½µGAŹØx@êÍPG ‚ösƽNˆ’¿ÆDÙHÃ- K¨­gl Kœ¤zkÍ4æ EAÆ¡þqX;yׂÅP"™ph_öÊs¦+:A+Ýá9¨F,¾?¢6¾+?H ˆ[Ÿ0GÌúP™z‡~× þ'œŸÎõó˜«N•øÙÆ,^lÌ(LŠÔ{Ô×eHc+/)³P­?¤ë©_÷*I…¿íÚú+»à§Í—eW™¹â²Ç”ó§LZxI^†Y"o‹'O˜,áˆebò€É3ëó•)‹[]È~Z°Ÿ\‹,Ì û ÿfò¬TR,/ߌú x(‹{8ÿ°ä©ÒÙì‘=Â*a§lÍGÝìödнŒÐlú §(üõ;pɸÍeµ×|Ýâ µñžñ žp/ò÷85ç0Å úql-·jýÞ~?Œˆ‘ËkôÇp³ÆúTy&žóì„Îr³†˜F <2ÜíÆëÂù¦ J>´ ”ŒPÜx[îµ]`œ'(¨œŒ&FÝ4lŒŠ…&X[g¸Rtؘ+¯°ÒJ&[¼õ@Á‚âÞ¦C`ì•ô ñS5š¯FuöA¨ü|×p×γ:ö>° {ƒðÜ…Ö £Jí0,æ¡Só–%YüÍÊÝ‘c­Jt ÕÙZS‡±hL–µy`Mý‹DK=´©÷z§~ ;=$þÚäC]8WK˜zVé^†DÕuHZ%–—%sˆ,ÌÂ!üzå¿“l·Šg4ôú-ÒÚÖÎçæ6ZYc“þ…‚-Ùí¼W°évr›Âö4Þ!+dx­˜¶@üô."°êÒ™›BŸ$ +ò“ñ55ÅvôI £¡wpžý §õqkdÃhbñSlU[üâãñ‡g,e|ý%ðä9™{ܱñÀ¡ánží!þoä™ó®Aÿí s„Çô‰Ñðã}§†ñH œÆ´ûÝ ý,Õ4Ù6ºg(Lq…Eb9ì?²÷™ ø}?µ®’¢³Ü67y($Å"ÌËA÷˜3C:žpi+æ…™÷.:lH¿ØÚÌ20B„¨Yû„cÏŽp<Ç€‡ÅüJÍèÚæÌhö¾c7(#š·Ãb©Ÿ Ì~à{¬7μ? ¬ÔØGuhêµiˆØòéŒ$…_@ÆM¼FÃëƒÝìÄ endstream endobj 21 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 14/Type/Page>> endobj 22 0 obj <>stream H‰´WÙnÛH}÷WòDf¬‹dqÁ4pÒNº;vXÁPƒË’º-RMRNœ¯ŸÚYEEÎ<¦¸œºË¹÷ž;½¨šõ}¶hÀ/¿L/š&[¬HæÓeÓ”ðez³»kž¶L_•eC*0ñ_ï³åºÈšuY€_}ñÛKpöÏ™<!Ä©*röŸç 8{1;›Îf@z!˜ÝŸM<è¡Ä³À ‚I°Qfù™ƒ|wö×Ùåììéh8 !2€¸¼¦}8›¾gn]eÅ8¤p§×/ÿøÂžf1†iÄΠ{7% Æ1ôùQ!ô!8É^ÔÁòC¦Ð3ÐæÎ’|»½!Ë q'LÓÔ)šÛ—ÉòÙùìº_fZä‡úØ0÷”È Ë\²xŒáÂÌÄÔôÄY­]jG95p'½ÂÎ…+þ¿wvþPwéãF7t¶.òù§•;壺EÁœœ¸âG‹Ø¨oWêp#z;7¦ÿ}‡dòAQƒ†ÙÆn– V-*våy1û L N\$žiS3à /7ÊT²¡ ^kúýÅÝ×GÔDºT1ÚèC‹Þ¡çÒ}æW5‡F!®À†…½UöbGÀ¢¤¨ˆ?Ö¨mhdzTÀÚPêˆuÝ Ô¶bIñº ÉÁó·µµ‘ FZT,¿©`2„ZŸÊ~K• p2×Í–"ªŠÒ÷`"(¯KŠ–’hm¼”,[  ÞÄ…öÁÄ)ÕèŸRþ¡0àD¬1òºtXûÎÉ=x,×9x΂r‘çÕmóï“Ü0ðmZØ„>­ÿ´ÑÂ=°éðÙr_V £’º&5øºnV Ü²I“=€òþ¾& ¨É&+šõ¢¶=Ç1 yp,Á¨DD)Äâ¬uÑ““ª½[çÁÃ0Á&ò)^„ƒ½@~Äèa ½¨WY xní€yî[@k")úŒ€0¸{{`µtn{n‹Ðø?3,}èÅ&-’wgÖFQ¥ŇŒ:Æ<š1¡£–1/Öœ0CøNµŒ6˜.# útiÁÜ3{® èŽKK4:-ô uZÄ4°ŽJuÀgeD?+-˜"öiñ}Þ_ûfKK<:-ôQ$äÁŽŽŠmSÙ— J0 ;PƒòêƒPyÑÏk ö@Še³\m}«Ž¥5›VœÆtEUÅvýf@Rã„éÆhhNG È”Ž@èe´Åú{]äöéô‚ÃËf::›‰¯DK竇lYȨèØà„Œ€èg¤»gŽ}v­wYdÌ:–ä’¯k:b»ÕHÀ8a2‰†¬—³CúŠqZ ªòÛÏçÎ;µ× Þ¹Ès :…\DéêÅιz \ Ó4rwÐ ì¬ÖòN Ô­Eö ïÑÿô ùéÂeg{ة܉O'q‘¸  û;™º£¿*ˆ+Løê"öeöçÏÝDéâÓ†”š1ë,¶ñ P£´C#J2Ühí/  œx‡ý(–®vW|Ðy…†ßãqÔW™ü Èå 1ëBE<ÆcEö`_” Ô±§,\¤=ñÏdü7ì{vAòÞKwOŠ(cÄcžœçz›±Í ò=Þô4Ö¡Ìd*b¹A9ñ¨Òž*¯tvUÁjƒçî4O »<ˆ<^ü( ùhl]žV¾ÆÒ¢ÄD{}qóörvûîmä|À05¡¬“£=ˆ“Z)×Jýz?ÍÚJ[ˆA­T>wfî$æŒZq1J)‹˜ zÏ<+ë¢ðèlå%¢ mäw<ÕíºrcZ¾³T®ïh鲇ìfcŸnlblu„¬¦îÝ jû ©{Ó ;Fhå­k‰³É¦¬ÔOê$ ñÆ5úo®›£X÷ ¬¬€+®Ì#2›”wz®éplôÈ+”ÝZ7’ IaJæÑóÇÕmúXhÖ`hµƒjL>wÞË,ê^]>ªfÍ›+URð0¶L1"šY¿ãÉÛWWÖ¥%="(D0îÆäQɪ¿„ Ø‘cü…$‚ibÚŸåyÅô¢í´hÎÒQðªÝQ'}ùîK*"Z[é:¬ûÚ6ë«zçµ*ö IÄùÿ-k\}IÓyéÇf &Ö‚4¤II;¸d}é“»×};òœ)Á=‘C€«º–(ã µTA¾oƒt¬] jÒºLt¹>*PÒêØ:ÒK``†rȼÄtSGÓhŸ8ˆ¹à3ê¥ÈGH>Ú Ã4eÙfX¤X6+[óÒ€¶ gN'‘ԑ̱ J«húÛË_Ýr«§¦ŸI¨JÎå‚Rz™A°.&›ã¤ãÿO CÉåSgä‹—ùÎâ²J Lv?¥M)0ý:i²Ã'{ìsR… †a,¨i=ÝQØÁ°.–ÔÛ3cî¼*÷g¼¢å* ® eæ £a¿=›èæwí?Mh_·Ê‘Óh²7«tQqÁÉ*O£­ì¹Ó+dŸµƒÉé˜`¯/?Ý^¿¹ýýÝÍÌ6˜SUÀt'i16aÏG`OmXë RŸŒá{bˆÓ_ôްÓ{¹9‰Äßõ÷ž¢”]©°¦@ˆiAÅ£ˆâÆ]G¾+º’ªlU·šì9 ïk/]¬V²ÊMù½>‘vÏœtmËU_E;†KÕŽbj'æYfuAšÛ%i®³oW´œn/Ò›õwòÙùìZëV:"lqÒü5vP5~i'ب¹UÊŸðþ!¦TÖ¬5EÀº6&´8m«ÖØJÎ-ÍDÙa”Æè)Ú'ûRP?j÷³ÊOÞcp›DÒk‰ŒZ²ZE^ûánûc¬Ò’†­Ž0ͼØw:ÛÊ;۪ܲ³X¨µ»,rYC•ô·ëÏ•&uASÄt/‹x#ß8ï|[7½¼e ÞÝ)å\Ùu8†•D@µtˆ;¡X9u¿©oÕü%Kùh£Þ¡G‹G·ä‘wª'5½×òâ»zÄëɺ™ED¦©ö]9Œøfz«'íK%c£Ž»f**”U³¿l\Tn½F¿Sm¬s’ÌïzYÎl¶mJÍõ u—\³.•; TìõVÓÝ£c+0qa¯žQ„a¸§©çp¸zèi~ }¡ÕCkåbH_1 ¬)ËVAýùÜy¿¯™ËGµ™0îäj+x’;Œd#Ìöĉ邽vBt¼`:þ#ý»ºê̓GU º«îÚ™(|k‰\Vn"=\ øô@6¨[³<¯H][O|ÚV<*Û>U[ˆ¹Ñ…~<êžàª—ý)sU/ÂrÙøÿl[ADUŘ€Š¦¨K™KÖ§?Ñ­%aëByÞ†©õSJ%Ñ`8ÏÔ Özצì°÷‘Í¢ò1ŒB¾d>ž¾Q>S寫{µÔÅ¿7¦FÈ&ÖŠèù±\r;Ee Ê»¶^E´z%¶´©zR“N›É¾/@£z×½X)Ñ«5co‰Õ <Æ7粜v¡WŸºþ—X.(™ Š9½SúÂk?qù“&d¡½±5ª.Óÿ¦ýѡ̬Œ aÛ•Q4ýz«H±à"¹máÌÌE7ÿ é°d[ñߪmu¶ΧûÞ–yP” ¡»‡ –.dj-âl€zƒÛËE»Ê­å+º9÷…e¦UÑ!Ë·7’ñ;õ¤nzßõ E/yí"C¬h«ît*¹¬€«·.Õ>lÃèǯ:”¦bœv!æÿ¥½ÚvÛF’è¯ðQZ$ŒšwÛq.˜Í$° Lh©c#“ZQrFƒýø­fwU_ÈhL2ûD&›ÕÝU§NcHWJ³ž $,‘­–§ì’žOz”²#ÿ‰TÙ^yàZ#eöކôvÜ+ßMs»^?%pùåê糞´à¡MMñâ¯4npŒhŠ0Í…} $%cG‘áiy … ¯M‹ÏG‘ C!Nõ‰†ˆÓÄ©u§Ó\Õêæ¡A¬4x ‘Ù] ¯5‘¿k.q>\s÷£%ÄQ§Z‚=ŪcYåÿ$yNsü˜$EµÉ@mY³¢“ÚÔa, £sT©#Èu»–•#ØÚW!÷:9êý]µëš‘0WNµ=iûB]Õq›Ùä !  ÄŽÚ/¨¾z4øŠ·<·¹ôÐ91(õ:­»#ù'’jò•5lœ{ßC½¥9E{׃ÀS,—œ’[72qCúüþ(¡ub”òeíAýšÏjÔŒºŒxÔrï¡pü!p"–k@t«J™?J±øä¹¿fJ!\jÕ‘·ÚÜ":ùÎï¸jj"††éåç â¼ùê½}ûæßEùà‰3¼ù|ñéÇbo>? ^¸ÐÃ, „ NƒF‡Ià‡a³cá÷åØŒù,²bô–ùÌ9Æíä}5%9嘡_añXûafzÀlÉ}fù§O>å+5®*xíˆjš.ÄñAqîG¹yû—ߟ[|ür}óªo"Â0ó“|ˆùYh%ÓÌQÖ\ª ãï²jåŒt¢Èq@ÙâI‹aÌ뽫&™Ð=ôk=WÊžÎÄ(S$~l7°š´;%Ùõ¤­ûÓ t}ŒªWœÆ Sg¬´æL$‚(õ3ÖmÃˇýºwoysEŠs+ä±3é´eh9¦ðµýÕà?®Ã£jõöš•× I9 £ºZÆ>¶J3R–H,¤^{;… š£°E¹ò~tš=â î 3³Oùd.•gÔÖ¨¾›Œ(mX‰B³´_¯¾Ü,®.ÏÞyÿ}OBÌBë¸\}º¹ì ›ê±n'wSÌOúû”>Úõ î‘GÖÖîºÖ‡½jÿu蓮Åfšz7} üXjQ+ÊÚð†ÿ¬(É”ý/’G>3OÑr9`0·.ò7ö߉I2@¼…Aà³°+Á'Å[2\¼…‰²ÌOg;‰{ ·(öa‰¢ÿˆŒÏ»5›$ºyÜaÆöë65µ½Ù†MÇþ,±ÎüáRùxñY5Ùo õêãõãú¦?\ƒ´icKcÉ쌗$a¼b%LZ;¹ÃNÝH)-+Ã^ÀúÖá­WØÅËÈWñZ0=j´Þ•5¬ùV=)v€ÓKqÀÑpO CÃ.8Ÿì¿t\ÿÍ"´jÉÐþÓ!õ}~;9Ãyql•ªi=œSψK"¯¼eõ„ëI¢”ÅÔáu ƒm~‡VF A–ÉNÕÉùó¨£g~ \<ËÇÏÂÔŒ÷j„æXê'ÌŒ†m×w%acF`Àd$B[™ÇAØ÷šA–‰ fkƒÅ…¾‘µ¡DB`Ä4uçÄLfd¯„ñF°— ´Á^l7¦$¶›DZKÂ5²FĈ{Ôâ»’¾|FÚ*H©óÿs‡DièG©•ƒg׿_Þ,.¯°¿¯çgïgWú“ij&KNA–ûjèéùãí‰IÑa®Daªe1ÅTŸäà&%,I‡3Gò×½Á…cè(ñ™qŸÉ¿jþ3o¿Øönù8úU‡ê¯ÃAÅ@ƒÉUàWÀ·À⥘zrÀ¿ý5ÎP£0ÎÌ&ß7ÅCï¡Ãf¹ÏF]“AKuUC/Êæ~À»;ÚÐix±ÙÓ l„×H£Dâ$^™ˆlI¹šW«Ý4WÛèW2ÿ‡–O=àbîjÞ%œÕ§+:F±»iw±°òÕ’âéÑQº|&ZôØÚêÞ˜rÝߘ°¥ý0bÐy•>Ùù?vàÌáâ=¨í"DEæQ¯$"®©NнÌC2y¬ÊbÃ_pîøi ׈Œ=^t`6ŽP‚ÈOänl(¡èƒ…>¿|F6´šÁ¸óÔcÂWåM3qëG4a·eAv잀¦>" ÆU½ÒáI!zU©Ðíô4º“¯J9~jé¯â£h?D(:]cTµ|¨¼åNÅä-—ÂQÇ §Û0+šå{à-®Õàß÷9ŽG¡!ßa…P£¿¨G)Éhæ3fE5/z¶‡¤B*‹åúnr7íÍBÚ„Åi :×ÈÀ M˜ÓðGd^£FÀv¹öÖ"j\”‡¶FÜU’¿ˆ,å)¾§eª4÷•"ñ‚§öLâ¨úaÙ³îTô´›Ù—éuG£°¦Kä_¾Zçé&”{Z"Ù®ZâˉSa{‘‰iH­RÝ_÷åPßÐ(Óƒ—ƒGŒ­J;Ž7¾›àµØÝ¹¯nÜÛ¦¼áŠþ3T¤æÑ_÷îÑ$ö“Ô:ú’\á¦ÿ‰² q#Nd ´(‹ý,1£mù®w ΘáÆ)žÅ¾ÓÉ[- ³KNTȬ_¹è×X€›rþe5íåýlžaÂ(§«8+·•«HuGµt(ö=Ík=|‘oxI£«ïYûafœ³!X(¼€yS«ÀË‚¤kŒª›4ª¼‰ÐÌòIþ'Cù2‡ð¨–m5Q`*V‘*©Ëâ;(÷kç(e¥m–¬‰>IÑ¢oS-É'õ–«UËGA¾º’m±^àG6Ó±aŸ•&`™­j¿æèeLî—!Ö¨ZJ}ßc< gšµüpùmñù·ÅÇ/×xü›þ."ŽÁÊ^$»ÙpÁ€Bcyƒ/[^Êd¦bŠ,å!é,j|pà wq;Ø\䉟@ië—]2å-X”ùA0Ê[!†H)ýùíäȦÔD\ÃQvõqĽ£r|ï¹Ú»òV»\ òbç'Ó»”ØpÔRÑzÞ1 Zt’Æ}×Aú¶Ñ3¥ž%N'ÓŠcK§Ýk5Wò%¯ëBöiÓ‚‘`Rí[*¸ñ€\ú–îhpIÚøÃ!fR ý¥L$6·@òÓé€U>5„PdX·•p[$WZKï6…ÒyÛa³Fe”É;èY²-h–ËcÑaDòá®Ú„š•ÆªÁO5ÿ"ãºÜoŽ'&ÔUX­ÿ=ÆÊ«àAl(ø¶`¨ZúÈnUMN\Sq=•+~èêªp)‰töGU8Ëý4µ*òT¹Î¦[u(´”((!Ôõ¾&”XÕSþ/èÁ¯Ð¤?ùj‹@ ‚o(>tûJ“#ö³§Ú0„¦U“‘ §¶WµtàðL¥uË]©j™Ûº±L¥×üÉbn N5.®ðë D•Ü[0ÀÕ®+îÒ:o¡Ú:bÙßÂ0ÁYhä¡ÿ`  ¼ØJe“¯Ù‹i ûå1B¥=D5)Þ¢ºrqoL Þ_ª…`ï¼ëî'UL8NÅÀE™ôÁP£C R1ôùíäÙ@´˜L¼V ÈŠ„±âh8 …|œ`«G·É-aqÖåŽ!Ô9¸'æ"ô޲õî1Dûó%í³:Lu?ô'lláÞ„-Ú!‹­, £¤l)Î¥RÈ}sJ¸Ó\êÍaù–zÓMõædªÒœœØŠsÍ]-R´ã^ŸKï}p-¯=˜¿3qO{zü¥–e~˜*Q”>³*´Ý õ$})ÑîjŒ¿„F“$~à µ³¼é{V«eÄzIË_ +Hã8·o¡†³¹,!ü޲9Ãßæó8€1ü»˜ ¿ãÙû¹,©øΛªŠ• üË üÏ1¬ ÕQ$–éÄ»-âݹØlÞ\D;›³Ø]r1âT?2£ã'rñN^¥+>ç ¿ÃæÚ”T~Ò,cúo–Öœ7ŸÐ!SûüF´8ž7ºåçWÀcŸ'òQâ¬lÒi%6Š¢ƒG™8­ÞÖ½—/æ’[œ£XÕ—©¡(¡uMÊÌEk/ ØU¥šø¤”:ˆyC¡B[ p”)\Ño]>Ææ½Å^ù,êè#5ëÿ'Àܘ~F endstream endobj 23 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 15/Type/Page>> endobj 24 0 obj <>stream H‰¼WÛnÜ8}ï¯ ò$ lZuÝ çÌbgá ½Øg`ÈjºÝ·äè’Ä¿¼IINK Ì“eµXU¬:UçÔÕë¦Û=e‡~ýõêu×å#Û Û«ëºëê=úóêcß½<3tõ¾®;Ö «µüï¦Øîª¢ÛÕúí·ë·oÐêË*@JHˆÒÿ! ^ßù—”?%^ß0ä_œç‘÷Ö§üoâíæ§ü)÷Jý=ÿ<”/xîüL~Ôú®ÿõ“{ÿ ¦0±×I ËkF”F§º`xnÁ¢‹O¬ 4»ä‘süÖûÝ¿yx^þ7æõ‹o>‰½º?!·CÅ4:yòcoƒîEyEí2ï«OYºâI»í _ýtÏ?–?1ôÀÑò_C¯nü\…Æá>2}écâÀÝ'ê§Üvpú±ä?ªÇ=ü¸ãAVpdë_¦³æ3¶çGkó®_þÅ”µ/r€šot¯}õ÷Fÿ5ehÁŒl‹Á5Ìai»4™Ûè ðôª˜¿@ð=eÍŽù#Çe\=O~ªŸÁÔ¤sãb-zÚùºl* "câ “ÚjϪÎW_¢Ù08sœ† b&>Öv: [Ùr%ê'ž H3¯½z:12lð0ýMÂ'‰™Wl6 kÛ¹mJR9ÜC³;Ý;$FÖŠjsšÁÃ×ÌLÝxO¬ÚvsC )Çb:(ä…†§)Œ)cX´m ÍßéCö˜+•ÓFê› œ~†‡ ZIvØVw¯iƒk¢Д=G³p!ÂèôÁk#â£Nw˜ax6꣔â‚Å1 Ï#,’àXú —ò•±°ˆ®à4 ½ g b¸˜õ-›” *ÿesF úD̦B”Rä*ScÛÔ¹ä<¨lH*›@©5*w‚6ÅlU–9=!¯>î´÷ªkýlªb"*&“xc mǸ,p Ö6½N‹€v7w4LpHœB^Î-$åÍ©[ÌCISáË=áÌý$9æ ׳;)¾Üx&7£G&« žDd-´·L¢ÏGcæÂ‚ ¨½/Au˜—E;ƒš•¹}#)Ô€AÏ'8¸„;ùõÓlÌÔéûŽáéŽb[2w>š‰976òÀÜøæC„)Ž’Áͬ7)LgL `Ô)kÚÞçÒs/ò² ž;ãR!Épœ.UÚÂÀC‡ ‚¡ ȨüÙWHœ÷ §0=‘yxC%ÂK 6A%Y2”p—±òaŠOÖ+Ž1%W".T]s·Þ–}¿ûȶ{æ_&r›¬º»·\:6õË'Waà,v#>%;ÑL^9‰Lô%ÖÐ¥†R,X_ûê¿OfÑ]ÿ^ ä˜~iH*»r)0íaL­Õ¢&fýcÝeÖ¢ÎÑzŠ¥ê`c;)a½9Î9Ðîˆ=ZznNxÔCg5§úø›ÈϪº_ùˆv-ªj³¾>¹½ef%ûñUÁ•ÙÆ>L¨ÂÙ ñÃø¶§%åÎ,¤#É[´mmù”ÿß …Ùc˜CM×+pÒ7%ôæ«Ø$Ç4‹'uK|J·„‡ÖÎwI Z¾¾Ö» 2Àmü“LèÎdŽ¶Øµ}Ê=’Å÷ \…!Šs‚C•7u¹q;¾¯-Ê”t§ ÛpÈOQìZšo‚F"瘰7 Ó`d¬U徘k“†¡˜íÂ:Våôì*§ NRSå÷OŶ½ëæOòLØ[\–3LLËb=ˆ‹}òÿ9»,\¹‡Ã:V–l&åŠÈI& MPSéŒà¹ .Š1ÿÄ1qZ‡ºÝ¿õÞò)/F—©(A¦emE*†Z9k#ôÖjõ¾h M(V+š£éýIó¡áùVï!—@E£½hH‚+5 Œ&É´„Hk!íÐÄ^£]§)Ñ\ìþe",\…2&W©‘ Ïà›íeTUWð³F3+žOkQá4?TácˆÌ—#2 e[ÅQ ü ‡ÅlTf“h`c6,ó`Æ-Wœ*Áåy ºH*ÿÏnœ¢ÖZ,u;ÀV5£Y‡,Þ^iP‰É@arüfò–]u€5ln_Á!¼Ç æ´Héd­8ÃŽÄ+Û׌¦{\ «B’²TDiÝ[¡Í#)æÞ¬¸&ÈÆ•°ÆÁ¸µ;£Z».®›¿Œ»f¨ î¶îñPâvèM"+5·ßwa†I>Ö©faMË6ó›™Ðg‰cü¤f&ÁùÝÌK*B»_ÜÍÖÆân6&–vó~ÒiæMݼèEmÐ5ºe¿nƒZû€#‰ÀbXBQÈtp­fÔ!™eÍ\i@:Ó Œ~rœΘäÛK ¼#£lÓû£¥R6ëdœ˜â°_^2:HÈ–é6þ~'Òü‘éîÞîõ{Vé7Ý~ó¦Ÿ ø Œ|ò>ù³ËÇDìRnTŽ _ÓãÕxö ¦äòÑð: ÉÈv‚†»8Pÿ Dµ`è„9ï_ÇíiC‡œ%j£ŒÏ}*½… E­cb‰¨µÇŬ1¥ª=(©åsÖøÙ°5Ð3ª³…™â¶«z¨'?m €-¸6ZA(ë: ž›àrF4.€ùÌÜù‰°•c…ed†Ídîò!5wP®\£t~ɡƽŽ1±¿~dòjw¯»®(ål˜ µŒbr(Æ£½žMÈQJÅ gF 9%Ÿ®6üeѦ"Ê4=+'!%8ËñÉýÖtYùˆž‹V¤e$û„èɾ¶¿×8ý,6̲CÀ¯Cu)žÅ[“âùk åÅäè=põ£ ŽÏ1 pK÷‹Alm,±1ñ7‚Øñ)@üîæîzWm>ˆ¦—!9!Ég$&L"‰d'ÈS‘ Ødˆ#ø³ɱ ¯ÊÉPw  ìm†¶€6$^Ç|dG!Åi~(G‘ÌD6À™$˜*AZ·s€ãh`c1œ‰¿ÎŽO ç=kŒêº®{nêÿ\/‚5å„§O–ûBìj¤fe½ç÷Õ è™—‰^{n¤.Yë*eIá„—ÑdŒï;êi²î|(÷“SS×EãgòÁ4€QPn' •˜•AÈ =ÿ)Ï)×TbSÏ.«ÌÍ6`) ˜èl»Œ$Úºtä !/Í¢@ŒÏï_ÂWçµõ|‡5$/¬âôŽqü±oÔÜ]+N¸rdHP&å?÷ë¿ÊäÚ÷'n?Fª<4ãÚ}r(˜£´é¿YÇòI?BY–rÿ51g!T-Pf³$Ì„ü1d‚xcH‡¸]}CnÖkŠ!ß'œyíÅ``ç A~QìÚ=*÷ظ:«) ª›r½QOùŒQ]µ±&Op΀²·Bpç`ÝD„kŒØc´Þ­ßCìWù^M$‚°¢Õ§¶Ñò²ž5«ód¶TMg%_”+Åj+Ä&»-ÿ±Ðê¥érC;Ÿ·M¶æ²N­ðÚÞ{I:±¥C«yj¹&«JGI¦ƒŠKVëaERRà²ÖÓ†ÊÞtˆpËܺ€ó—™-‘Å=Ú¡%;_åaYX]à;ŸZïî°¨Úþtì~y-{ˆ+ɫٓ¥å(Ä%̘Dþ»˜~1 ü“‰ãù̘Áª“Òó™1Oì4nWtc{±¤ÿ1,8M‘wÿËÍõÝçáôN´{fÆI‘ H2¦b‹€†ê€Ð$ލհ`K×¡Ùæ#ãd¾¨ü ÊÛ—Á=@÷`DßQ¸†=ÂaíPŽ¡•Α´`,b»v,`}|9Êc«¹láÁG‡S ÂÜó.™]Ÿœ º3üæî—Ih¶D¨é*Uù»'TÍcý’åuMôò3¬`ß;5Ó-ûŽ$;àfZÞ˜eJ>2båÕϦÅvö–&jEý¶îëÖ¼ÃÑ ë¬:u¾+M³"Ìb҄˸7^̽I•‡'&¾ÜKbør¯ ñ6ÜKRDîý³]Ľ4c½rFG:ç#§$Ǹ¥Vx6€Ô’Ùà¼_Fˆ*ô¦ÃÏtþ»`]ØöŽ K­@–òØ#äQU ¨íÎz–—š“’…Ê@‘=ô„·ßµæ®î2!íãëùM^‘ðºuõ‘Ëã#¦4.]§qùÓ|š`i$fËpK$ËY"¯Â¢'2o–01¼YB‡x#–0)r–¸¾¹{÷©;ÜûÑD…yl¥|¥PЕŠ´ÙãUaR-ª,ƒéNí4Ÿ[éÎÁD6y¿ó~müŽñkZß•¼ו fJ<Æ/) õŒÈl‹#Äÿ9kÃfà÷-lX’åa¦áY‰YùRÊ)¥ 8³LYY-*2‹s±*¤—­špQ]øÏÚ9¥É“Ûæs.ë…L›‹ŸÜ·íÆ<•í.|«´[M@ëTá„}úytx×üÚc6cU÷AÍÍĤ5mI…Õ!)#§•¼?í±B5!V’¥aZ‘Ë]Æ9™çdQűXàgS€dæòÄý~?Ÿu¢’7…D™Ï:In‡¸]}4rd甽¨¼Œœ‘æ!³Žxjuëåä>šÃgêgÏk•pB^Tš*³CÜ}ë€ úAÍvëðÂW¿n<ßNAÍŠÜðO4Oð2 Út_+Ð~½·zr@ìiÜuX;ý“xQH;/¸K2:âïê°ÏkMæ82›.øÉY_}‡öøå¤‡l5lÔOÿpäëzm‚^Ã;éÑà6ƒ©%aÁ`>cŠ<¬Ä¸lºáÐxø1,&ÌED’û›–œš«Òs HaÆb6L²”|~»ú†}ãk'šFÓ…Œ#zÂêï‡ú¾ŸÏ”U/ºf q W­tKP陦<±=­k™Î0iûvÌSr*aG|Äq]©cÌ#YÿØxùò€/·ÁÀ!7rµFZ<" ýÄ6 À¯ãi£ ÷—è3¹/p̦¯Ö@í [ÔLÔÎ2«™ÿé»ù"«°˜°³À/^~&9 îÕq)cÄLžÍsÿ"˜š­¤ÃŽ" ûîP?\RÚéøEÆÜžè3.»N¹ŒÇ`¼˜ÔêØ—ÇL/ÓŸßjõÓ-––c°F-ÔN ª5èZ{=åÛú ê†(<‡„4<ê=w“:h£\†o>:oÓÏí5§‹UYðCô©üZPê÷ OƒX œô‘ÿÄù¨ûåxðz 3…³JË÷ί­X\îðÂ'Ì%°²©ž«!ý_€ )Ý endstream endobj 25 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 16/Type/Page>> endobj 26 0 obj <>stream H‰¬WÛŽÛÈ}Ÿ¯hÌ“x8lÞ$"‹Æ— ¼ˆíÙ¬‚°EõHJF¤V$Çž¿OߪºÙ-iD9†5d³º.§Nº½Ûw›‡²êÈO?ÝÞu]Y­Ù’|¾}Ýt]³%ÜþÞ/ºç#·¿4MÇöäv.ÿº/W›ºì6MM~þùõÛ7äêÏ«ˆD$§1™1Ù³«ý…ÔW¯çW·óyD( £”Ì®n¢0¢³˜Ì+’Íh8ËI…4'óåÕ„¦Áü?WïæW¿k-+ÒZˆ6ðî÷è·«Û{ÖßËzE&¬n?¼yÿ–›}Éã(Œó„¬ô]©¾‹ÎÈ4W/¯>O>íXM‚,,Šéä}póŤ øé(áÿë= füGΟü1ÿõ…Øß[äa§ÖÝgEI/¯K’“iš„S]”plQÒ,GŒ 2º¬©õùçÉÛ ›°‡à†ŠœÎ&þg½‘©Ï']p“ð™|ÚÔ:B‚QˆtR“e@þdj^‰¶ªN³ÉîQÛcÛ ¯|Ùé7í²Q“& ÑäL¡Í»@ý¯ÿ/Z~^Z!ào¯¸)tZ½º¯þ)"]VØKýÇu0åLJ%qÂÉkaNüVvÚõÌñ€¥Év}Íäüe6Y@€½em*´l¥aά ©Ï[ã Ä´Çäfl©ÓÂd5D¨!ÄLt–áÿOð¢®õåòq”˜–Ýí›'Q7ö¬._q¯U2Kkfå|了oGúƒoUÙ|ÔÿððÎVÍ–áùŸŸªÑ±ÆÂÞax[hR™Íá  -CFEÇ&0á÷ÄÙ ‰‡Ê¥Ó¾bnÑO ½ê+p´³C|¥#ÃD¢ »_Ô+¨ÛYØ.+¯JxÓÚ{å¤Y[eXœK7À2«ÒîÚ¶» »t¦±J;‡Ï|f:S®J+‰§üêÛÎg _¬ê]ç¬,àIÓ»àÄ3¼\‹6D(¤^]z”ùQ8Ü1Ñ— n[ˆW…¨ÊGýjÐnKè"Ö’Ÿ4ÎÉ^¤Eÿ=uÀkóŒ—ÃVu•å\ÁQpæÁ‚·:×¶ÜË¢HLlHÔÏÞHÀŽZ,[×Ú4ulr@+®Œ3£,œ*ØCû&ùVßSùª3- )ÆôzPZ<{­m(9°¦¿4CüÕCO„Ùœ(Œš|@ù¬XCÓ/  Þ!›Ò"0Jø´nç[Ëg±¾Ö4ÑŸÐD=$³îhTåÅ`þ Ô-¾$1l -#¬æÓߢ¯]«æÔð Ç6rd§x=~QJåÈ£*ñÈÍ‹„ïæ~ìïÒ*l?¹]|@,ýqEiQá–ɲ óå©úÍÁ—µɪ„Ö/mÝb =|†;0I/Èô°n4dOZɹ¶§–šp»v+טlPH×÷“ôEô£/°9(wÔr«ã sâ:ÅËVNJ5`.ÁÔ, “™U 'Ÿ5ñꃳOû¸ÃÀÒ7Ç„£Ñ({¹u §ê²øÂ¥Õ2qÉÒj>ÿlV¿R|B~!ǹÙÛ-uÇyñZ°FòØBÑŒ;7ÈÝÍØÀiNÅ·vðÃÞæÑ93Пýä¼+F„ê•ožh÷§Êiã,.Íþͳ¼†‰Ðzv¶ØL® löÏAáÈî!‚Ïj˜?˜1oRã`l¹ÓwuöC8OgŸ±vµ¥$óçyÙÜ•Ž~fqÄJ€#Yí%4žñ·Æ»1öf}»CÉE¸ÆHUòÎֵ؜hyô@|¾€3*ͼRWØnMÝÇY¶@øö}2F5dÆ Óåžµ­^ÈœM7|źš|Þa«`¸ò×mWr9Χá±fCãÿàþ}Ê@<½ MÖì´Ãl_v¦/¨U¦WÆ_\ÕôÇöâÀ+m”½­#.Z‡Iª€f6",0Ú¾òVƒÁ^a0ça‹à>rt¢ ´¨ÔƒÝø)Ngy8µ#:kŠ'/Nñ(Œó„¬ôm)ÞÆÏÒêÜý"ËpÉ¢2–Oú=—+7”G•NÞ‰*ØžIÌ“JŸïêŠÉ†§r&µgD~ħ8 3Û¯³2þŽÉø“Çò2z¡Ž±L\¢cÌçŸ'o8&ûý^èS‹¾-6±yÈ'3wI°;Bµ²„hǾÛ/n»öZ#¬‰.î<ΪÀe3™J74¶ô|_<{ì 9uîêQVk0tmñ¡iøÖ|8›µµì,6®m”Q¡«@€îæëÀºi¼\ˆ‹0M~Ni‡Y6€Ž´ÒO(_{`‹qàÁ@S–ßá+¶tWÉߤ„ ÿÃ*d¡Máü"°3ž'³)'¥CY:EÙy$G†³,ó©JbYÚx2gåöìÒs ÓØ2y–ÓùHfN'Q8¥Ç–¢¿Áh ßUžBú¸S~ÿe.¿ÏLSž˜tà÷;!*þ€÷Xɦ@-K@àöp÷â^[Ø—Çö²¨éŸ®Zž¾©ÇœÇt’ûTUÃ¥”ÚZê®}åvº¹4¢ó˜†Å78+væÈY¦¦,¶²i‰˜â‘Áþèá)nJOºsQå`Á\…'kÁP]îˆ&d{QÞòäÌ Åâ …x+KßDceC£ïê/XÆ™uÁøš$i˜L‡•ôˆæ´ªíµ˜úÅ!¯OqøìLçõÊÅ-\ÁDy,$Œ*߀RuWÒð¼,Ñ1%‡RÞ–¶9¥†æ¾¾ebÂEÁ©fßœI°Ö t–„Ü]ËÑs’R\0Ø¢"œeî`Ãt`°QIU î¼Õ§Aa"ðm˜×G‘·5o"‘Ö­Ó¾2¶¡a±§QÃðx ÕËÄ |­—ÔÑS2O¤X/¸›–Ô T=*†ÒZb…ªÔcý"å[¤ŠÙ)W?‘(ÊÙö0Z“â.Ô6Tžkø¥'@ŒÝfeï¾2»Õz.å,Z); ÷4:øÉ¡…†_–ÌÒNåe›º#ØÁ²s¿LÎ"‡ÄÞAŠ0m«g…@/ƹXz’¼s•3Bw±Ù¾Ï2é»15ÞD1s¼m"æC(úíÕ¶Ü6ŽD…5û0Ò–Ãð~™}RbÙã*íz²Nª’R¶T;Ú±EHyâ¿ß†€n€„¬Èì“eQl4ºÏ9}:BU'€ñÒÖ<]Xg”ðx$£“= ÷4†ùROÿÉžžY¹h¬Ó÷bn ´h½{2 „Ùìïu¹+šòÛbkÝ›0‚]$ýA™…) ·ìí[çöÓGÛˆ‘Ÿ¾’ÔIÀ„ƒy|1CÀ\=µ=^8‡“V°ÞxÂÄ‹ vÏ/öuük°ÀRMëd_¢AóΔ øÛŠÝ¯aºž~^\Í&׋ëÙí»ÉlöeñáÓÍôîýôÒºÎØ(Öϰ®sè%‡ê¡ØÈ ¤‚Í]×ýuNiÜ sVŸâA}ò|…ѧ»÷ÿž||ÿëânz½¸½ºº›Z+B£•WYÒ»QB˜RÁ5ÊÌéd£ËM…çíg‡ý-L@`·Ê§ù®íŠ$zˆóŠØ2©Ú믬MÂl—úoîñÉG?¡WÞ“UnŒ•j Þ>jûNæáÀ ã&$Î(«Öã²YÓÆ1Æ‹áê+Ìÿ÷'¶ƒ‡"&¥J›}³Ämd'×¥Z )|o\K_ûº÷Ó71¹ ©UL>Ú¨%í -C>">,_Ô–xÖ â£HåˆR*Í“5Ú‚-†=`a´·CœE±tÅ`wMÅiA_Š©½(F¯ÏG—ϰ!*+êom‚‡«ƒrÊ™‡£ …P[-¹È]x)„wÒQ m8_&»oÔ•çó£g%« ¯ø‡ó³*1¬Ên¥(!BÓ£ÊY7ãìðs¥Ê»=Â.ž<‘fK—{È@~!z»hÖ¾¿qÏ£P ±P ðN"6†ØØw}qZر*D/ÄÒëóÑ‚eÒ–[Þ†šÆvÐUþ€Rm$H©æ€nµ¾Ñ”¶óh…²\ãÑ;~ÿ §ÍkŽf»[?U8.(¿N9šm§i&_³GQ֬푦œDQ> EaêÉá´¨/ŠTˆ^(¢×ç£O+Ì&x|”bú´ Àégôi¾¸~4èš¾ówõ«†ePh2ÄÔTÞfÏkDÿoœqÚŽ¦H€xÂoЭ).¬å7uËzµœœˆŠd~-ÑS¬Æ<êÔȽ5Ìœ¢Fà £F¸it8-îK Â3<™ØË岦Eº¬lC%0H=ÆF·³©e6Oh©l¨>|ÿÚð!+>­¶2f…(Û4ZŠ¢& Qrl ÷ÃþçØÈS€í¥ ~tЄ >§zEí5!ÈбÃ!AžuBœ…i¦=848œ–ôÅ´ ÑKîéu}“4ÄûMpÜ4kM.}õ ²C†„x¼zf×ÓÏ‹«Ùä7ÄÅõìöÝd6û²øðéfz÷~zÙCÂC¿”£.L[‰¶¹p¶;bàkª8\¿k »îX S”†¾W8gØw|¶Åu³’pk Ç9®pÊjSc±IW ‘Fm-d+}®$ŒÁÄÀ!·ñ mhú9øw)êz;VÃ$3Ç©FiÔûuwšKmëaŽÜb8néúÆx—¯ªÉœ‚·5V>~ôŒI#zÏTZ¢L•N´Q<_°Þ[6Æ~Ø’(HSŽH­rŒ7æûBVìêq,{ù ¿©ò›ÆÞ„qâFÚqçIf0H2ý4G?žö”L-DÉT¯ÏGW•,£A[}³é a»7¤`‹cW³ÛȰ¸ÍÂo¸)™ðÿ&3¡Õï ©Þþòxžê5ì1®áú‘?¨Ÿ¸qØêÅ7T>µÞ.±öÊÿгŸ°ö\ª²ÐTâ±Ç4 ÝÌo¥C|¦ÿ@]Üc YM#`õi囎ºñ”^ŽÛ0×æÌ–` ÊÛ9ƒ„Éèö%ˆ #y<¨©L~/meT™FCc1 ¹'žÐ®Z=J6z 6'bÇn;f°—º7=Q#ܔҖ÷U+eF•œòޱ›VÚ8Ú›b­ h¸³1M“/ÞÕ'kçHn£6RM)­ÛË©yxn>ê_왕nj5:oÈ„ý‡ È¥Îá¯Øn ëA“ù‡õF‹aM†Üë¤1ý‹×ÙáV•®Í‘ÌÿœñDçñ+òfæœÒæÊóžEnÞº¸ýxðaó‚AÅ <Þ€VñŠÚàJaøÇB™A!T¯ý;‘I5S‘ ÉnZ=`ï^Ò´½òC—a%‘®Ü£q&[‡‹N:sƘ–˜ì½éHð’¦ÇرbU£àÙÃ6£ìhO’6NÚ0uc±Î-{“VÅèMZ 1s¦ú%¥Q|QVºRƒÊ¯Ÿ±U`·lW´dš:[#u÷5RVfÿZqê&¹^š®/õÜ4TÞ ›•·Ê C›ÓL«*ñ ¹³EÀðñèëIZòÊóâ²M—¤Ä(e+ ²ÕöSž»¡ßºqxS¢Y9 ö“¸z mEíß˶6¿ÕËö}1}f›fÑXïCAv`ºv¡Ÿp_ÇR_ì$Ž>î`夀Ė‚ªvŸQÚK†çÆ‘ Ð[/ÄûJ,6/?bUó¹íÊ(;ÞæÉ¥}ý$rÓ¬ÿ%ýF¨ºcµ”þïøM¬¹[ådJ¤„š¦…â§ø ÷¬?ÞÒCþŠ'?Ha¾ذ"öZz™ÅýK§8U5%‘z£0gÉ€§¾bJÌüW6а5z8XµüܸàIö&ýǘ8>/©Ø2kG± ?ÑBXw„ïqôú|ôNV^whÔ¡ò|£•®s¯úF« 5‰ºîŒ€6 ­™~åF=òÜ$T6? Û!æ|n‹ëíkmñµX*‡ôX¡[nm¼/j••ïüA¹ÏêK¸rª£©ŒìHù­³f±üJ¼½d¨<÷äº;&d=Žu'!J÷*4q×^Ø<ã×Õï˜2ÓœÀZÆ1}Èd,þþ&Aw#ïéâBtÞ¯ÜPþ9öEh†Ç=ch¶»Àë:­µ…ƒcö%‡(b5¸ž~^\Í&׋ëÙí»ÉlöeñáÓÍôîýôÒÚ±›ÄZh{ƒ v<*E˜:SS ¶…$o]@‡.:³ŠÞ¼pYt’Þ‹.BÌ ¢#¿èÇ©xý€S{KšEnÒº²æ25xªñ\ÐÍWënæ­MEËìM|D ¨¢¬'-ºM«˜ÈˆD¨)†Ê ^1%9ñ„ZÆQ5dÙ‹eœøn g >,ŒôNé» ªž½ÕvÀŦ2â«EÖó/eÔ2…@¯®–†&é¶÷ñãÈ͵;õ˜I14;ÑÓi¶.Ã*)HMå? ‡{|2Á^$ÁN”ÚîÖ•q}è]%_*Ë¥ 8ê•‚2Mµ°mØê$àÄRä ¥ O™îkÃñ\…Ð,¿ýÀ´7¾™«ÌI뛲¾IâfÑá°¼§óUú_z{>úˆmøÆŒñ¸Ý±šm@3`¾¥€\Grð_t!ÿ^uh€÷Í|.¤ZÚ†ÁY¥¼ˆõ\7K‡T6Œ9õ4¥Áèó0IÝ$Ô’º,jkÌx^;ŠõÕ"/lEà®_)˜~wÚ¶>Nú~Ö'J#7޵{¼±¾Gš¹Aªßƒ,4™Ÿ= I×~8‡ŽaHŠÉÿ–}x endstream endobj 27 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 17/Type/Page>> endobj 28 0 obj <>stream H‰´Wmoã6þž_AÜ—³Š #ŠzŠÙl’K‘î[¼¸-ÜÂe%ö^"¹’¼½ô×ßP|•䤦„û@!ÍáÌpæyž9;¯ší}š5èÇÏΛ&Í6ù-ÎÞ–MS>¡ßÏîö«æy—£³«²lò ÍÛÿ>¦Û"m¶e~úéí» tòlj‹\E‰‡ªüäß? âäíüäl>w!ØõÑüþäÔÅ.‰=4ÏP‡(p1 Ñ|}2#3ÿvr9?ùt¬µ ñ11, aàòðèÓÉÙGÖmZ< Y^8g¿\ܼ³£=¦!ŠBû1w×ÅÖþìù¦ dmÁ<¾˜}v‚YþàœFØu½YZ­>ýY^×ñp’ÄpÇ)_+Bá#šÝ˵Õ8§~Ì69ûûBriW9qû‘×°É_d¹Ã­ŸÉŸ¥+±RCªùüHûÀUÊÇßç?ÿ}ˆÎçÇ8ˆ:y¸¾q]:ü¢«[‡³ók±¾¼ë·ÄÊÛsñq{+¶~]Š•O_ÄÊ4{w!>.ßç®ñd¾Mzuߣ˜$ˆ·ðò…}îX5C B1ûÔÇ15ݺLjkרkf1{ã½P?z#ßz³uBøfPœ®ü ßÊÒG±÷èz™…Y#±³“EW9§üã‰]ÁJšý®?S×åk§W~«½,oUñGæ°×ƒ~„“‡[”âÃ$O€rSõÁ¬UÙÇ~;øv¶F‰¶ª£öÒ’:§cKelj¯r80°ìx;§"ûÏ ¾ŠlÓOi)ïb‡þ’ïİÞá©.PšUÊ73õ”b¤.c`¤uÖ<ÙV"%1v;6¬ñ™z¤gâF!Ó…RìûœQÈXFÑ6F1Š:¾˜Íe…šL0þa£·ã`Ui“m–;[G p0)TBczpSÝO¼UT‡>AÜYÑ Ga ÿHŸÔºÊEsLÉ•çE˜R3Â÷_€œ,ƒôŠ#Ú +@æý¯Ü¾ ÈØp?ò°›˜î€%Çxor{¢°cäÔÖ„áQcMM(õ|E“ ÂËv¢Zœ(K§TÕ–I˜{k~¢T0±ÏáKEpةʴX[' JpMr‰ÆÝ*ªb’áÙ^˜¹´™µS¾ -tœb´i l)7x nò¾$ÉÊG±Ç¢È³fû]BŽjÆ´``‡S¶Aõ.• žåh_Ã̶zfh5NÌq&/U¥Ô2ZT¥bç À#I¨ŽäOV®ivZ¨PXVÖÒ¦öVƒk¥.dYiõKÑ—Y†ÎN1ü·Å`áBQ0e(ßf·•Yª®â7°CPl=ׄ6ÿµÑ+%®éé_Ã'^wƒºAúFzIÞõ-Ò>oÂìÏv«!•mY!p›•Ugb‚ªRGfE\ T i;ûò Lõ=ãäàHÈÊIZW@Äíkƒ h‹ˆi•M¨¶þ7ÄA¬¯NhçÎûÇVI>8R¥Y#y‹tl¾é·²Ù¢e$ ·¦¼> Ãkô»<äÿ]¦ëue=m„@S^Ø÷¼®‰+q¢_0—¾F%c”Ÿ?ˆ±g¾ñì˜lÒ&Û!Ú6*ð¡NëuàCw’JŠ«X™ÖÈv/w´Ž.zã"µßfZŠÀ:w‡Á‘!Sèረ(}Ëp#¢í±æË(ÄÄ5M,fï¡X¾Àßí­ÈÆoŽ þÊW9®k¶¡2\¨Ac­;gÖ‚ú‹xªRùOîM´ê —.Z5e Ž>òÞR.í 5Ʋ \=+˜ÒÒ$ì”Ò%£8úc"»¾®ªæÖ;¹WnE’бT²ªMëºÞe,´aCŸšqIµ3 n¦4wy¡òjžì;2ÄA·¾p¿¹¤|ÿðJ¾*¶Ç¢W1¶:ÌZ+~Â<ê‰å­xÅi} ÊB€'_^ƒD3ô´¨V÷„KB³øÅþÆ>üV¥²Ù]Jé©ßïS{Íàºíc !#ÙZÖz•×µ½’ôü‘aÿ(%éOS’4À¡Ç•¤?VIj£”¤:¾˜ÍåK•d5/²œë™ÊùJ<{­&×, g&ŽLW¨$&m~ÿ?$* ìG“²KC.` OG OC¡E~+O´[÷éCm­­Ü¨gÆ^žAŽ;& É{€R”/ ‘•Á›‚ Û,Iõ®(‹u{n^§Ó¬Eà‚§q'Ro©Ô {Žo4Å)&”Á¨¥j ôƒFöeöuŠ{4¤ÈžÉX.#ø†©"z’6°TÅ~ pöµ!‡ÒÆ „<•„÷$ OrDVÊüÔ²*Sì³f+ãQ¥0Ôc»‘¦£@=˜ê. Çô`,¦+£ ]ž^ÌÎÅ\Z<P9kû)•9Þ üÞ¡4ƒÇã"A=Ы‚¬røW^ïdQg óhW"”‘qf˜­ÑƒŠøý»V¦ˆùrDž.3)l˜`D²^L¿„$AìCS¤NÞ“Äx{íHãÓdÊóÒ„à€˜O,—aC÷<{9×ÿ”¿© ÎW”Le¯Ë¿ÊBÚn‘z%DÚWfŸ¥5ûÆ <Úª½A¦^ëÛðoû–qEâ2_\FbÀØèSžÑÏmÓP(0;ˆØ²HážÃö£˜jõGEMB¡ô 0dB>TºgšCúøbv£çV^+á¶VÕVîEiVoÝÎM«n·Òã”Ú.À·«JFßíÁuîôˆykN⮪N*ÙAERµäHsÄRhÇUšõäl% õÑ$Ìr%›êkQ =6WÝ´S.¶Yfiÿ¬ê-èÈ(³£bRùÚƒðâàfÂ×`æZþHrÏ ‡÷ìêÆ ü„bÖ º­œŸ@ z¼dtñ¨E‚]×åÂåQ0NžJ‘GøŽ™¶b§î—öYø¾1ÜC5F]öT5Ÿ£¶*﵋Ü5Í„ýSå²t5uWN•¹V{¹¦ ¢èS>+¶ç£(5ÚæGŠ}¾ô Ó9Bê… ¦ÔHÝQ OYê16f—ycAV›²êøÂ¨ÅaWÖ 4@?Aík¤bùÏR¦¶ùëƒnWp¯ [E@Ø&]w¯/E·}•ö—W¢ïne#^/åÇ­ØúðV¬œË•Û_ÅÊò“øør#¶.ïÄÊÅ¥Xyg]W”ˆLz'ê…8ˆ:ÁKÚë’´¥èÏX~EG«Á*•ûx]w–[áv­:µ€!±Ï l˜§©ÑU5¼ÁÅÝ\¨Ü5&(¨Û­!“í‹q˜JÄeµÎ«> ¾’aq2Ã*çLKˆ=´/Š\ÔY–«‰¥N«g•ê!V©Ó“•™€\.î'@™¸*Y«cÝZR—k D{–¿‘ÃÀmÜ~°Cß峿5•¢:ËÉ¿Û÷BÛ¢¯£ÚL‘b¶A|’3‡[¨£›Tò•îUÚjåB!ê…+¹`>©šsÿÇzµõºm#á¿"ä)NSwElÛ]Øìè>,Ð Yâ9–\]Nšþú%EÎpHÊ®%ïK{b›Ãá\¾ ’ÏW`VPTò©Û†lŸ…¹²7pUÝÁOçÖcgޝř"¹©w,¹[]OV|Ù™,­»ä—ÊÝlŽ?ÂQyZZºqçh¥9'¡×Uʲ­Mpà¼a˜ c(L(爳õµ1p¬l¼tÀ]–Îýfä·>û0àƒ‡ +88t#¤w4ó„×a?œG™ÿäJ,|ZgéoQÕ@Þ€ÐÆZ¾y¨\‡ªw§YÁÀ¦!”й,5Ò½Âu2Ø;ç­GN`@‰z]Ýw…-Ù¨ÑÒµ:C–&a’YYVž ‘c‰œ¥þxr¤71[/ú#¨¾‚Q}3¬â»äù†gY‘µ‡ ôËz1±O¥H5o_of„M÷å,@÷‚$RLøÓµÒ„!ËJ(ŽXX”V?35¬Îã¬î¡_ãV@¢Œ„™ßêÜô° f[)¨ß5 5ŽØ á°Fê#Ÿ\%äÞ´Ó c]]êþR’;¡-‹‹kõ¼ÞN•‰ÐëôÞ»ìTùJ²"Ìòù²x£"!¶Ø)sü¶jð#Sñ6N.{Yzö¦¥RQ5ÌXVÃhɹœÇ®’žTkz‚߸Ò¼éTyHõWŠƒpüÂÌÂnjôq>’=tä ãÒ0¨_Ñ/UÖ‰úS¡ÛJÛ®ÚD ™pdV£YEa[ƒpÀêê+\:UÖõe˜elAB0³‚­'„t…IôPBR3{—.­gN`ø» ÌO_-oа =…äÈS•Ê4Àš´‚ÛÁ0Ü”ÙÀ%²èE¦ ½âíx^[±2 ³Èб¼Ê2Ìû¥¢„¶tùSÝG!âä’ŸVdAA‡®r7ÀIø‰<89pøRýÚ>GiF©UîI ZæøÎ{^ •€55}ºãvLØ©>zw‰IW¿“.qp…:j:—B$N: }Úx…DyPµ¾_¢/Vèʃ·m]²—P:w¢Æ7µØëkéù?=Æ´w ì·ï-KÄgIrÃÞJ+ÃhˆÕkËÒ<Œ"«TÓ€£Ù#Èγ·¶”Jrêqà;»ËwÖ-¢ËU„ynåÙr‡Ôxõë·Uàf‘>T»¨ÈìTÃ>Vžö"°x(!eÄ-r”/¨ ×a§ú#tsúeGT%ʹ»Ræh_d:¤<ïíÝd^Ëò x!ÔÎáѤ²"…©^WGÝœJxª¡ËÀhÒ'BÚAì<‘¯ª-Ï ^íWz“rÝàÙþy®>g©)äßÕ7| â«*8Ú.î7VæÉ…èÍpΜ‚ÄÎIöÏL:&B»¹Gê¡-PæÌ’œ«‡UÉrƒ ΢0¶Þi’“fi”gÔJ ¢xË‚‰ }Ý]jÚ5¤T ê.x4èîZsêÎÓNøÇÔµ)­ûPw³oȦJd\Ø:«ëÑáª4?ìÞ©?>í€ú@Ö_])ëß}]]à8TS’"¯ŸŠ8Nä<Ð>Y°àa÷¢w0\Ÿl¾YJ“†ýéÓˆóþçà»ïÞÿ½jŸÙÒ÷Ÿ~øøcÀöÁ÷ßÿåGñƒ;¯‘ŠŠ‘”Tq$û}+ߘ„kk“¤¡ø ±ZÈ Àã¿'ÂÓ s\\,Ós¨uà "îS `n§4Ôbë〓.«ûÊò|®”‰b4ì¼*X#$Ç (؈(Îh؈‰¸#o®EL¡µª]P ÃI‡¼¸Tº ¬ˆâöÂ~—Y 1ŠL@9„­ùì3è 9A¸Áh@¸ÕQ}D+©o$К§ÄwR°4„ŽYébk·…(â"™î=’P¿à5Ï7ו±oMn¶­ƒÍ’ýãõxz…óBgžÎ‚çõ•g>·N&dôÑF5 !l‰PŨæ³õj%é'¥U­Êc:[ Žª{à !ÖÄ-å™WÀÖ@ðÜi à5ˆ9£øªÝ‚\ÆÉÇ"õ6zÏáÐoph‚Õ0{s–ÎOìx°CÙ¥g¡ülõ{Ñ©lØ< SÝ‚ÅÕwŒØH¤ÍðÁ÷T5<ú‹{³¯z¨yƒ'×IiUпÁo?è9þEÿÿ2ßqõÓ#–ÉÑ3Ï_¯9"V†EiUð'9hÿ†)5cxhz Õø`DõÊr%@© úe/)¥¿K¿°‡ôKœíÃ,oK7êb‹~1Çoë—‘a–Õ¬åà¢] –’¯°ò@Ã}· cóí#4FfU¤Ïeõü&ûy(l”Äó‘âVÆò¨‘ÇUž–˜'ð@c”]q€Ø×ÒUµ›¡EWy0œ ֬ߑ" ÷1­ÌzCR£›Ú•†îÐèáxV€‚|ƒ]Ç7~Ðúïg ¾3ú̘ÐÔjX¨Ì¡”X€¿xnv¦Ãˆì®j£vJ$ǪV£'Ìþï"v0ã ê¶ÃóêiP¦Yt­Æ)p…ëà@…Æ~Rú[M_©ˆ‘[%£WªŒ¨ìÑ7-¹JÈ ×‘œ;q8‚L¿fŠ» a¾Œs\Ks(ªvµÏ‚Ën1XØeæ–®H]úœjb ¬{l#’[/ÌùºûØŽâi–‡QDÚ÷v<¯&5Á1 ±šXÓ"¶#Ü¥¢Ç”@,ª§n˶*b“Àã·•@°6ÌhRF5[Ò ôèàØ¦ÁèÐÂNB£îX[] ÀA•gþ€9ŸM4þû öGuðÝBçíÏ…; âû,ØÅa©ñh€Ni+Gð¹ÄMŠŠ9ÚŒGÝxÐvÜ8LâíÎꈗ-~iÄ Åœ•]¢Ó°„ºß35&&Û{\\£¯‘2\?ú×N¦Û£kx»<¬Bô«ù“®¦ÝŽ+h«RWƒÿáÒÄ꯰¹È‹#MдüŒò2ÌsRå •QX¤4Æz[¦3’f{ aôOßÕ| k¶«< wö&?9`3z1 e“H´+Ž\1´zš“„…ij=’{80T^¦Ôüh½ hv6µQÇ?¿…ÇH²UKy *ù4B´Ü+Ô…ãN«óÛ–uŸ†s¥cÏ+¼Ÿwðª§%µx}Ȧ8ÞHô¡´ó¦ïëè¬ñz<½ÂXðÏ»p=r ÈÌéÝ}9þS‰¼£,žõu‰¾ŽA”±0‹Ô˜üóÂ[Õ…üíGUÀR`’,ƒÀYø`âs[„N½ãyË÷–™¸3!wß÷Ìä!'%I'óml£ !¶8süWY_/gïg"0r„å0È/D !Wêñ¼Šú,Q—­M–æa’Yo3?gK–þ†±ÅA`;-é=üz€å„¨&Æ÷5­Lª«+‚õ,TC3…9|¨?ÚÚcè„éK[#Ð!ò}ªÒãA y=(éFÙ…¢ˆe3@ÎWñ@¾PqøÌ®â+õ/ÉêÇë!%Ý'a´8º7w-}l×bÜìhë®Å8¬ÚµØàÚ¿ ñÁ{Os"cTß”P\Daʬ³Ë5ê6û…&fÆM·n·QVvª1Ÿ$dͨhRp©0”£õwÎPÒKCBX¦™ŒEiýÎèÎ|µE€Š„µþ´yÛˆÀG5 •;¯d6 Q!Æ„í³™ûߎçµfB‡Å$ÂjbQD—Øî)é†Îc¶ÁéwÚ/!,¡@Çj}Ý9®ò#5 ¦]aÓW'-[°’¸ØÏЂpðÝÿH¯šÞ¶aúWŒž ð"û4lØWaØm‡(\Ûm²vV`'íöïG["E[n;‡QùøÞc±qä®jrëjCµöÆF†>|ë~÷Bš;ŸCÀ/‚gó­AÕ\¬OZ­EåÒšÖøŒ7«&Ñá¿ýCõ÷öóÏÛïøÙ‹D};Ÿ]£líEçà´ëÓuàÁ ÐßL6¦“$„Û&õe?'ªÉ{Ž…D³N‘¹m³¦T(ÖHSnÌž3X!ºŽÙsð‚f*ÍxŒÙ÷×)8¥AÖs2ʉw”›¦¶¢³^çó#Ý&¯g_f×@5‡ZhS½dž]s7ª¤Üé[¾õiáÀ.r')£m%-Wÿ:6g™ðógÙùób¯½$bà8m^ŒÏšE’x~ÜŸ,œYˆ%*h¶_»¿–¾ö*+UËØ øn»Ò–öt©Ýí˜ËœZή‹Hp”ì•õlOšd^8HÔìÉG¤ÀÜÃdÝaïËâ‘s¹±–Î3hXßÜM»•hAÀýúh«aÿ´£|ÐA~j^¸Â=—3ØùÎ2";«¸ò—tµN;[«Ÿ´¯ó¯h«Ê¨\§³Ö´U-èa¨t"¦Zâh'oöðâ΃>.$TÀg¸µ¯ñ¥¯J³‡bõØ=4§$ßi™„Ù—~åζYèþþY~מçzç Â—NgI» =H¶:ŒòKL¦ˆ<í1k¤Ïª“çÞâJúŠÓ49;Áß0¬º‡÷PÙê…7.1z³Êù£“a$pw‰+Fõ§ëËT¶5À2•¥>9†¤îÌ qdS•)gg=ð×^*xæ·50ãà;êŒ!5FMŽtå üUÐ¥¯_ñ·=TÛ6ǃ´ÿ„Ö÷7«Eª'ػnjÿ_€&£ endstream endobj 29 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 18/Type/Page>> endobj 30 0 obj <>stream H‰´WkoÜ6ýî_!t¿H…M‹Ô[p'u7i<@»µƒ¬‘=³ðHIãÄýõKм$õˆ;”²_<²D^Þǹ瞞UÍæ>Íë§ŸNÏš&ÍÖùʺ9}U6M¹µ>^ïïšç]n¾)Ë&¯¬ÓEû߇ôaS¤Í¦,¬Ÿ~õúÜ:ú|äZ®bbE ±ªüè­âèÕâèt±p-Œ‘ë[‹û£¹8&Ö"³‚£8´áÐZ¬Žl:‹ÿ],Ž~?-H|„5K\\Q‹~?:ýÀ®õ.-,;/œÓ«óË×ö0‹”„ì j°¶ãØŠ‚‘ö¨dd/î`ŸAù r5´û!ÿº\\-_ï“%Ibïní[Çù´øÕèúÈ'š™‡xÆùÁ QsÓÎIDMŽíõÆ¡v$¡][ΉGŸûÌá¿Ø—ð–~ö©W}{ç`Òn­œþP>Á+ f¯r‡ÿ£Ø»†o–Ò½u"úKì<ŠÚj˜mìe °hµËvÂlvb–69]Øiá`~´6ÿªÛV7€Äþ+¤5bµüLíÁüi ·T&Ó5®1óøCor+w°kßÊ=à¶V²?4~MžD/b?Ó]ímF<&3pF{!–Ü^³wÂÜÜú¢{@3?³´õXT° ²¸ÿÀmê"Ôm"@ÖÁ¹®S ¯&–ÄE1OyQJ×»ÇMÓ‘!©`ê@VC ™Cx(ðuˆCêR‡dÌô¬Qa[‘v½ù;_6–¤J%]@ƒÆa–k ‡\À›|Lh†Ñó¢…¡ÅÆÜò¸µ\!ÆÒ:D÷Œ1†P7#Íö@û±È¿,›írwlŠê¹në¨ø³£ûß%* irTf@ £¢ÀÊjó@£b‡(ÆÌz)&Áì˜PÑ*¾;[­ª QIHkrTf@ £¢Àê¬J›l½LéýÌË'mh†¶½špvh¨6»”¦R¨ÃLÊt„aLÔ¥DHóbBD^ž/¯Ï?ž-Î1¾u4½‘:e†Ÿ=7d~VX7¡OÆië%]”1ÿÅb5æÀwïÏÏÞMv^„çiG|ï)°YîÚôRŠ&³R4¤ è}ÓÅ¿½Ÿì߀´wQøÆþ%‘;b"6+DC›^ v‰‘Ûµ³‰ˆÒ8Ñ))hOÃÆ#–OõÑ!s¢†ÀÒDn¿±leSꚦô!´kK̽Yú(^Ñ_6ت¶–cnVê‹ò¬Ù<ÁÜ›[%}víލœþÅ[¶ð"ßÞål›ëµª–G–yÇZΧůÿ|o<Ú…|‚ü@w¢PÁ¦®$1í ãx’÷ Ê@1 l¢Àïšö~¦]Ž÷»=”ÖêÖ9vNþ+ÝDû$_®ÚÓ™Ã?8Üm—b…\p'‰míðÔIU—¬­Mѯi½p{ŸêaJº”‹dœÓbI‰ƒ/ª`› xªó X•bu¶‡oªYkÌÅWç+Cõ³\–‚ÖýM9Ýwc”àNø¤ÿ¾ ï/ÂýWKñæz'7âSCkI•cžÛ.F„t¬8OåðTÏ›=Ó>ÒÙĨ[Òá© Á„šó“„næ6É8µ'múRk¿u’n—(«þª<+!¶âbÃ4XÉP¬œ^¶õÿ7TZn91t*ü­³U¡å*©Ä+&6yiˆÍ:« hÓÆádš­­z—vˆP¸»¦®ŸôÚ“<•RѰI×/—ߥQút5ãôä@‹4­è/T´.w¦dÈ0CZNlf¤/£X=6îòëí LW¬O­Œ/x :ÖTæÚÒG¸a,4­øòt°´XÍPAlÎìzû‘&‹é éÐᇳnȃvÄÂUåÚp‡µä.@j(BLõõºÝ{Õ2û…Tu”L;Iæ4ãŽu=¥ÎßR•Ì‘ÔV 4”¬×:”g:è^ÌŒ¬VNpÈN¬Ûçä_éèµl¦ÌHž•Uô¡×ÉÙ±e1ºa{V€½²îA]HW–É|€Ì¹+…{I-†TÑKI3ÁÌãž? Z¸ñ½áCg=H_i½dinë"Mr$,*€~[UøÀ² I<÷"½ª¤à‹Ÿ —Xj5ÍǦTKb…¸ëC°&­àòFPm¶o–©xX­׌ H?Úœ:ì ØÓÑÒbu Öåf„¼ž;2qÕ ü2âŽGG†Ó¸ ôæ¸Á§žLºV§•“ð6éœÄ¼ÚG³%*€dº×ÓÇÖÓd»Å‹í0˜Þ©XeZÚÇ! pã–c„ý†±ï·gÆ}&’¡í&‚Xæ ˜Äíð ÌÚõîqÓÜ29fx BhÜ£Î-Ž•ìKW`(uÁdGØŸµ~¶{ŽÃצ™2)ŒH' "M9d1÷¦ZXOÛrÝ9·Î"³¶q cc‹5²ÇnÄzµƒ+apÈÅq’ÃIíŽÝ¼ôk¼s¾PË"4®AXn%ü‘žW„‹àd¦ÏÂJ1VðI6œVL…µÅ$X¡åça…¦$ Cò¦ ÀÖÔ2.ämôHõW|c •>«–œG<32ŽJ~Pð®n+ƒ¡*f%?åÎyL+@¹§gúÃ"ÒäԷпÎ @”ͺp9‹ óÂS‹Òe ÇHÝö ½¸Ò—Êk+‚HÛôÓÚ½ÆU¯hhé‹o æ<|ïõ—ºaq€aAO­¶5Á‹0ˆiNëµo«20¸€Î#9;ï ÿTêå8Y  M´‹!Í+ãqÝvøðàœ‚bÈ’Srv€Ù¼ŽÓ Lų©¬ö˜4À´üáâƒä¢?©pU¿‹H¡@ñ)SÎÂáTýðOxúoK_œóñF>¹Â>-å“û[ùÍò«|ò;>¹Å}î¿ÈŸ¯í¯¿È'W÷øä_ΕLÅPI­I¦Wâòm¥8‰{Q9³róÛòãÍÕ§åýíò‹sw}u³üzýåê~Bðqx8¯yâѬaÓúÅlNçM1K¿ú¿ïè¾®à] ÚPÛ×ùº!¾H ÖïÛ¢ad?H qXÒÕ¯ úÝH>é¨O<*0îÐÖ7X¹©Æ.˜“ó(f¨üaŒÁ˜á´a¡â¾þ~{ûáþËçëÉÈ-à„dVÚ"ˆ'ÊŒXç# 8µÓÚ†0I,¢y·Kò€%£Ûu#Œ&¤R´ƒ†aÔDÞl|¦‰#…>º‚_öøîYu€I[ÎÂñ§ZR"˜õ?¢/ùˆ³e†Á*W«Ö™b£h XÚÌÝaEéÀ°¸ƒ¬ËÈòˆ‰Ì·Ó0›.R-\gÈfYÁ­‚î Ï¡ñ­ÎÑÌ¡Æè°‹X %¶ÔýzÝ ƒ½øR œÆM)jÅ®µÝ¢Cç•pãzǵ†|ZŽø•Ó ÞÁFëÚx@Üâÿn5‚×ÇÆ¾ó3’zÕ줮Ú!R÷´™3ó1è“P¯SUö¼Íx^•@yã\™„Ã@Y³\ÔQ®šò·PB£ÆóÁ®Ê²N”¡;J©„=/¼pÔÔLXÌ X™0ŒoùQZ¥›+ùê„ C£v‡Në ŸüXËñR&ZÄÐ?¡•—6 R*æ¦£Ž¨K™÷êÙã*­ÈÚnüЄ7*ëjƒ'°x" hëA”ò·šŽu­l²•gvb…Ú§ô‘=^ kUÊ«•ü¦u€|ÁAQ?:P÷ÀŸ2VY¤éÿŽÓÃ9¥ã4«êzÙ0eC“Ó ¼jM®IèNͼïÎ0’9ŠnÐëñ‘Š ¥kDiÚHSU®9 ú,1.q¢‹ñ YÆåÖ'RuM}§Ü¿ÎI}AdF­J&>½cØ9¬´ lÃl¯&Lnš=Án%ƒ¦2îÞÖœ÷¦|ºâT)A"Ï}có`½BQ|©†\¶ |m÷2ô‘TS!<"R¹¾;êcVkoÓyîÜPED:ï’J<’#&¨CìWýæ~Sw^ãNa¤ÌÈIRƒ©pÊ7òøÎ³¥¡ÄÎGI8 +*ÅlÛÐ6›Ñ6+Ag&½£ ¬*_Gõh;¦VîW#‹—".O6¶Giü\“zÒŸqä2ÏÄàÇþÈÓ£:žÀÍÀù Ñ<ÔÏ¡‘üp{íÁ>ïõ~úéýM¹_{îÞß^þÅûùçþ¼ñŽ-,9¸D0½àã„¶‚,:# xÀ´…;„h«.îq¾ž±³:•¡ÚŒÓ74žÇÒŒr€¡zµ¶aº×$ö‰|mÏGkäm$v5Í!À¦¬]Åÿ©Ç1(„zÅÁÝ.‰Ã[¸VQDÊsñMþKž³ß ,ê^ÚŒ<õç‘bªJ—Z?—Á‰‡§ÇSº:ÜŒr?ŒÜhŒVŒ*¾s%Ÿ€„èýò=rÿ Z“~°¶hYh1åJvfK‡‹@#2JàN㯲Uö5zŒW%ŸDîyÉžÔkÄ]‹hŽ!Ý|ñÕEáQ/›ûØîYOµŸx æn¬ pëÝ ã2´¤Ôå£N‘“*O>(k+—4%ÿ®—W¥ud—¼püþ0)ÐÛ^DYñÿŒä-@}·ò-(8ƒC1*wšgz×ðñε÷Xbš¨®éF§ðØ" Rô‰'qGÞý ÀSV-¦¿é:÷‘fi0#"²oíFñz‰â'Ÿ\º›¬¹~ГÆA±¾p°!®ªž½j®J¦j‰_çôi]­u•bÔéòk£ª&w×•í«” oéÙó̦«6‹‘u¶•qétK· ¶•¹ë¢$Ì‚4>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 19/Type/Page>> endobj 32 0 obj <>stream H‰¤W]oÛ8}ϯࣴhQŸ0 mg°Yl±™­ó EflmmÉ•ä4Ý_¿¤È{I‰ªkÙ3M‘¼¼÷Üsν¹mºò%/:òË/7·]—¶"7ï뮫w䯛χçîûž‘›ßëºc ¹Yö¿Ýçë²Ê»²®È¯¿¾ÿø\}½ò‰O4 Hîþü©®Þ/¯n–KŸPêùY¾\]ûžOY$^Po‘Ø÷hB–«+‡¦îò¿W¿-¯þ8õ´8‹/ Ø*Ád¯£Ïnú$öÒì"|EÉ‹ãÆþäÜšfÞ 1-jQŠª»€â?HŽáÕÎß$ÅdÛÇ÷èÀ¹ÏÙ*õ…—Ø—øÌ›U‹µ,jkØO–åJÇ]¢$ñ>rema- Ø_µ±‚  .ñѲ]nX\ãú¢µMƒ^wÌ\C (§`4‘¨ÔÈ'·oOËOOŸ÷Û²ë5.‚üÐ 3óÄù ô“ᓯÖT¥t|LU“îX‰0³bÞZðîÃÌî¯Ä17Q2•c"]&RÜ4%ò²à\‘ÒGœ%R¸ýA[©N%r@üº)@³æ ¬`´R‘òÇãÐ@ôôXP@7á¹\.U{nߤ硓• ¤ÆâÒOë$öoÕz€…ñŠ‘rǽ©â‘~æ¥ýˆˆ÷³ÕøîžH ÷Q¢!Ž€ý‡¥ÊÉàA˜)b «|œÃZFzrù¡O ‰·êM÷Š>ïÔç´RÖ·’ Íc­_ÖJAê‰_øeá¹­¤8«•p{¯Å” ƒ¿d:s«g„ î%˜ŽFŽ‘Cߪí¬fׇ¦¼>ƒ÷^Ï}/]„¾ùZ_ Y”c”ѯɫjÖ´e­`VÍ7÷O4\^¶l,Äó:Ìç­ æ^õRá»1¸g6.ÓÞªuý KªÞ0Ñ–Õx³ ŸÞëÆtrü±re,Ò‚{ᔨøâœ15óR:Õ!Ç::9Nû™QÖöw5’:Éx‰sh± ÝÈùØ—.qʆõ ‘qW)¿ï`„-ùÓ/aiy±×IH/â´8åéN/ša#Îá4½ýt{ ~Ûᘠ]ÂçKÙû=%€³^Ù¦;Ÿ˜ìÎ÷Í4 ÕixÙæëv6Ý¥Üé^”LŹfBwšã¹ëXgn`H=B,´.†ÙI<4Zh`×W¸ë€>—‘uprÛñɶíË»Ý=Z &ÅCõމ?àžaG½u©ÐÀTdßà;öÚ¯†ØCâ3ÝÏLm¸*\ê­ŸMó<$yBZKÂl_Ä*áSW,ë¯ëÊÉÓˆúÀ!ée}Qø‘—÷:uS®ŸºÝlÇ\3ƒxãLcúþ.,ø7,+Àí„—5ïÜkô³ªõåE¢¸5[A9:µÀ«.(Cû (fä™±ÊEqÔ(AÉ­:s.¡Ž £æËd¸DwÉ>E$—‰¯ /š!#Î Ü~ºH°7Hþ Rèž[¹`­`šmqƒØó“Ah=(ŽBkÑPí´'Wäù¢>>t‡Æâ¿g±o¦ç3&K• è~%œ†ïÏEãˆÒ©™š"GÁT°ÂóH¡dTé#‰,¤Ûg…ƒLAƒéÊhµY y2¿‰Jœ˜x¶êlq+LâkI[Œ¥+Q,6¤Ýç–ÀÓ:s‡©+|ܺ–ï°Lu µ0ÔMÚf |rcBj÷Ë"²¡óEv*¦ü»9Ó¨€¸VÚ^u€ Ú8@~~ܨxZàY¼Œv)½ ÍÑëßð™Ý~ÕøpLJgž…3 Þ€#kܬ_9†ù+³£© Ð3nT±±’ˆæH®.òqà ‚œ/(ŸA`Àô$AÉ.>é,Âþ²ð\AÑGœ%(¸ýÁY¢-6ZU[%ð÷ºÝiŽí#H·à Dèg~x1M‡ž{uà°– {м× ý?&pT Œ§ðN¯ ð°B¯<Û»‰· ƒÜëä1€ð Ìx å¨:ñ™Œ¼÷мP2NÕ[x[í O¬1vOj^jñ2ËV8W’MÝŠ¬£ õøà PÈþãž« <0Je&4¥5,_µÖ•²iv$ب q2ªñƒQx¨ò'ÌdmRÏPAI‘›òêY­?€èá ª×vCˆé©Tþ]7ŸüênÜ'y Ýz-ù Sмµ_?t‘‡ úmý„Aô´j hÚìéu>GGYâÑ…—“8šú'’4Ç{"®áí'=GóË¢”uò²Ø ½ÓH–“ÓaÄ5Ò<îÁY³·§å§§œ>3ÎO{tÝ“gP¸„f¡/#Ö“Cgª—HGy1½X0öNëWÓº#ÈÚÉN ýMô^µz¦0:Èጆ­j ¬q ²åà©/º'e*Њ0ÂÙeP~„îËîW‡è,ÕjMÆ£#‹i³×À8áŸÝ“/€°ZË‘é'W(|c£¼×Ô0Ò×b~¯K,›xËÁÅö4Üð>¹6†»^v4P •8 é,çÚ¢ŒGM#•sƒ .pÎÑS˜•3͈æLŠÙþÅ›€?¢ÜBÊÆTØ´§ó¡Ð¬ÝYï¤C+YÆç'Æ«Õ>ï·eדÙLWD‘eƒ<¾ÛH°br­˜zÕ5X”ŸIù³±S ê‡E›RBI'|Õ¾K¤=á0Â*nñÔq`¸ÅCñŸpÓÚSŒ"dÚ3˜)"yuä ½.6þsSzidà$é N‘ž` qÜ/F|y‘õ—µåÿØSGPJ¥„ž„9ãtšýŸ÷ªímÜ8Â…@¿‡ÓšKîò¥MpßÕbM*žDK,J%©8é¯ï,¹o"ev×í' &ùìì<Ï<3!èøîI—ˆ­/(›È‹óÅ©^6­ièˆ#£:Òi#Šƒ0!ÒÐ"W•ߘ@~Sì]U¾ÌÚuóÞ”„‘Ô).Â Ø B]ÐpvvæÝþãÞ8¨,Gc:*yâ,ù,bzÕj×Xka†"ªY+Þ‚+ÞB(Þb¬xVíÖ3kÑGEé¡ÐŽªƒ:«#ÉPï¢93;¡:”µ>\ ¸> „> ÆúP`Û¢.«äaa‰Ùë$u$Îê 0®(u\~ž]oæìg•Eß„ý‚¹ˆ‚´æÇbÌ{WÔKóÊ3Œ’Ô)(Ñ®Þä^¢])0hWW?›w«áC!U\ꬸ8G¿E·R@ÖnäÁÝÈB¨Ýb¬vÝÊNï9̿顰Ž*#sVFD;ˆ­2µ2\ ¸2 „2 ÆÊÐÒ;¯‹v¾š=—Õ²]¤ˆ¤oœ03fÖ,ŠfŽ ë÷âyW.ŒC¢ÌÔÑJÊ+ ‡ba]ý|±¨-Úy”uTXÖÅäÁ‹ÉB“ĸ˜Ø;QM¤Ùb/ xøÕ¤À\FƒqHÇd…®²r*v#&ÛÏŲ±Ð-ˆ.¡:˜­è\ ¸è\ F¢ÓÀYn‚¿™Ï²ÛB„u”ZlM-%^”b“î°¿,Êǧªô>]þ:ûx}þivwñËùýÅßgw—Ÿf·?Þ]Þs•Ñ.Ñêk®\ 8CÝi6›"„¾˜/ø•˜Žr9qM”¾ÂõýÍìî·››Ëû_®.ñÆlçÝ„§cͶ gÛb̶sb{ÓQ¶c'¶ãèÕʶ¯o/ί{¦íÓѬ³su”…j ²= kÕ¸@pÕ8@ŒU£ÀœT3Žé¨jˆ“jpвèUÕ|º¾ýAÈÆ†ê ªŸaMµ §ÚbLµs¢zÓQª©ÕaŒâW™þùÖšeuIxëÏAÈÄ«Äa,‰å¤‘QDG%’œ"‘p?jÌ4a'†Èû-£“âÕEðŠB8-hT~=õ/êožŠò<ñá¯_Îۧߣ0LýÒÛöeH}øgÿ£¬½àËýOß>\|¢Ez ¶E]Ví¬]›^Ã`Ÿ$úeÞ!HÊ$†Qÿ%ÀÔ_=ñûÍWÞ:˜ô¿wM€#ø•ùíè«ù¦b`?[ñ¿B€T^àP=ðÄç]öŠ mÚ é²%fÿ¨Ëó ¨Á#ùŸ¯%ÿªR€‰à£>ŒG † ¶j†Ç~H`‰ä…Ýgeýg‹ÛößoëͼlOYÁýú'*®E CîA6 SŸÁþ®«R¾f/J2”gš@ŠzÙLO«k]æ š¹JBíµµ©d‰0_jÿ5"Í‹½âªÑi™ÑeŽD"Êi•ºÅ,yì´ÈÖ¡„UæåçSÿŸ èÿJP ÍW.RË€¢Ÿå?>ËÆØˆpÆæ —ãC({·žKÃ8àAÍÈC¤>«rX«Ò 5§ëHèUHUÛ'”MZyºw mú4s9!OÙ¢åšÏS³»«]š¦=N¥NÌÅi¾1Õ¬¹™_ kf¾Éœ`ì ¦§ûßÁ¤7Ú])¬Yz½¤Cÿ9;§XІ$ž?øÂÕûæ¸/”Þ¶æF^6BDÕ\É©ÿ^6…ô¸ÔÄîg¬¦ËØWM³}ìM×`–ìâ¬ð;ó4>%‡1ÑOò'Æ…b”f{ÁÊ^ ÖÞ§k'Â_xö´‘øœ!§ å]'¦+ÖGV{Ql 9ˆ&] q´Æ™Šàì=Z¦Œ !‚Ã÷ ¦êî0‰:H ÖØDÔï‡s’JØÔˆ„KuœýßÏAÿêצǿzZ‰,©¨ñŠ ˜ëuµ‘ Ûìxˆ /OyäÀ)7jêé]‰Ëµ#{]lø£ùn4Ù•ÊÞ{mÈêo!ízSË™Íe®‚Ù› èwŒÞeùÛGï¶ÏOí£Ã´.H?•HÄ©ÿ×Ñ-fֲݱª¨9ù• VÕ·¥„cÊÿÈ„uŽð4r¡Qb…QiY›HÓ也oF3®´h ¦ÿ±e­uÛþ«Îžþ#7"! m(~°ÕÊ…CœðÌû_Äc4óZJÑÂo4ÒælMƒüjí½Ï¯*¥r -½2Åõ6^æ^édÐwѱXž ÞsïŽ;áêÈP¢*I`µp mç¨÷Ú;:ÚW „×½ÇRÈÛ[¡œRäaÝÉ6úm&…›oÎý²|¤Ö5ºUŠ¥_WÉ@s…øR”ÕRŽÇÌE4Tåh¦B€Š÷¨¨Ä‰»5·àYÅ=¹|ÿiùucÌ>¸ sf[$‹ºÖ'÷ߟ֚š ­0Jt´j·f ¦ñŠëò4o˜ÚÊEãt€VT ‡kBIæõNÏn7ýb”_)”)ô须˭w1ZFXõ:³~EÛhC«fåË¡À[nNÚ¤TÔ¼Šþ_Z×68AVy¬Ê—Y»6 LrÜ!f`1¢‹£,ßÂÁÃ칬–íÊx‰É0"±BsÑrœD©¦?'%“ø?pÏb±¨¹ 9 óº¨Ñ°cJ-Þ¾ÚB…û¾¢Ë“±{ËoÑOÁó¸Ñª‘e]øüµ·Øp¢X¿Ð¸çƒ;÷qBÿäuô=ÿñ½Ç…æ»(ÉÁúÉj[õ m~寘š¿~2˜*¬°ÚÉãáo#ºM©ö@ÎÖYúAL Ä$ûÌìĤUð¬×KþŸFöæ‚"sF‰þ#ÛZåÛÍ`6w’Ãчj“[Éæžâ endstream endobj 33 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 20/Type/Page>> endobj 34 0 obj <>stream H‰´WkoÛÆýî_±è'òÂZsù&ÐpÚ$7¦mj ੵ¬Ä"U’rêßY¢hÉ{?Y^’³3gfΜ¹¸¬ÛÍ]^´èÇ/.Û6/îé -/^Tm[mÑõÅûÛöiGÑÅ«ªji.®ºÿ~Ë×›2o7U‰ž?ñóOèìï3y(&>J2ÕôìÏÿ òìÅÕÙÅÕ•‡Á^ˆ®îÎöH꣫E)ÁiŒ"“]­Î’ºWŸÏ^^ý~ªµ( 11, aàå/àÑïg¿±°Þçå9´t/~ùéÍÏ`v²ÇAŒ’ØÇaÚ]b[wóW´ dph|¾tþt¾=Ïwî]âã,Kê’N§D»¼i6nä”òÙ¹×Wo¿!Ñ?fI2/-÷n7„Î6w°9õZœ4ò&ôLœ¹ìNÏÈÙ2U¼ø×î"éZ¤+ë*ŒÒ©‰ÅbJÓ†P1Ç Èë"ƒáU¼—U´B¬¼<¨Vˆ†‡¤Âw¹;(NðgF)ì(‚È·?¸l a®‘ªoÔ¹L_Ù6¢Ìñð&åßÁ|Y‹á¿À¡² T©Ÿ‹ø• ‘Ó³\ö.¤2í>Ü˶ÒDÎ(Ÿ ³ò§jCq¨"2ðáo)&ÍKøôŽ ‚£ÌÈ?d­¦e{Ónmˈ3ÒYÍàÐ7­žŸÖ¡†a–`ү̃ÌMרwM`¿ç 5ƒ˜J!Œq`º ¹YY¬“Â2pN§H`fÌ03'À Lس5oi.Ëp–š6–¬Õ”ÁQuQ ÃgÐßtåöÛâ“£Z¿T$åòï›ý­d ú·dYÅeå©Êm6t›wOÙûª_™kE#{!U³’²s€ÔI *È”†Õx7&:¿««®$«ê)?Òë½øl{„ŒÅi+…½:ÒéhµÌ‘¸ô¶“¢âIôÉ•bû6õS¥‡ªø˜‚&ó4IqÖÝMÐÊÂ$ý,¿^:W2ç÷Tgx:×'1&žq4ñºY^ÛúHH„“9Aø41ã4¤n+¦voìËúŠ7M9’†Ý P”û-C=GžmH~kH4?ʺmB£²’¤¡™¥Œ…A\ýmƒÊæ£[áJfŽ„F™¹ ¿†É²SI j© õ“ZTÄ]RÙ¬vÂj¥E’´«B¨ ÎçÆo¥î*Ô3ÍQ(gzÓXЏ9º½…ià¥ÚUîFü¤Õ“m' šÓcµß¥G ÖÜ•b+I…³ÉéC6-zZ²ÔüßnÝ- …fû|DÛbàÏÔ|ŒZµ1/…/°íy† ͵EÖ~{&÷#‰Æï$"÷g9hQœð•(žÈ䆉)T®?ÿq¹áàšþsSçåk6öã̉”À‘õ‚…$Z5QYé°>²n6ÚÓ'x¬–:k±4K±\Û—©ÍBö%IÏÅf'¨è´ƒG·&m$·«;˜ %›F5çíÓˆ??» hÚÛ‘VþfƒK¦&!ˆ3Lú ýR`ÿ×ÀþÕ{qr)~}#N>^Šw>¼'7oÄÉò·¿Š/>ŠG—ÄÉ» 2ªf^3Žý^ÈO9£ +•>ëÔMo|VýI‚ýxön¨Í, j¤2î圮Ù;ìÇWVHµl~±égì/öÝÝÁk:¶¦ìŽdYÔ¹¨à9ëކ䄙‰Þ„ÞNú&ŽPÝfØÖ½ÆäG_ÆÁáC6o7Zv1|ùq5§z‚ Æ~ƒ]^ƒV¼i·¶XŒr2 Î KqôàÔØ¬¤b1 PQ¯‚ÝHªT…|©ëÞ~ËjM¨Q®J:â×¼‘º²© )mó–®&)È8«"د.÷IGh´ÑXæIÅ}‚ò4u2Ó’ì¡ÂÈ^½‘4Bjø~’| æÉ7PŒ$ì.K¦Ê7mb’|SŸC¾É*츿è˜êBUÍ­¬Cµ ãÚR,{§“ƒÄÀɺë|ê>3±¢Û*Ù'¶²±"¶gK?ö°OLÃy-àñÂ#_J¨¯í#Ï@»gs*$ðüŽÄMkÈcþ$½jŒ-vÁUS½ü—9cDo†¯XW­¼ê팼a…°’ŒT¶›B2F¯ì>9Ò˜‚,/UUµrYz\´ú¢CÌD1c¾&ß¡wj=ô2ËÒo Pàÿ,p>¹Vƒé=†Ñ¾gˆš¾(RPË E9Rܲ’©m>%8ÕF@UêH)sþ¤¡zøV2wãš)Eô«ÈäÛ4nT€Bpn ý4£œÑ Exد0®ã¾‹˜5Ö•,M{}C»&êôA\—õgrõC.Øe'Ïv I(q^[F‰·úð0|õã’õ©=#†©Ç®@¹NosA‰õZœ42 ôLœëAÅÈ …q“Ÿá 0€pvyMËö¦¥ùÖ–eÀjË ˜ =‚ÓžÙO®ýŠÈ„{d9…¨“yDd8Ê8Q“©D­mL"jõùq¢~”L£(aO‡\XÝÍ)Bœôâ)÷Û¼†íÎ2*Ò ž ‰ãN[à¨1T®†CEïM­!Äê€/mÉï l>ø{§-Ãlym²ŸdØÏf¡æ§þ¿ÌW[oÛ8þ+Â<Ù@Ñ(êöXmw€v Ló°‹daÈ’j{'–<’Lÿý’"Ï!))®)u€}ŠI‡‡çò] 쪵ëL¤'DÍ#6†’ü #xÑ¥ß)GC9…êÑVO§ò'=z¡t"°r†rp‹Ì*9F9H'V•®,Wé Wâß.‡'‡„ñΪÓàu†ÝˆQ¦VúoF#n)ù† nI.ÐÐEs(ŸÆÂ¶õçâþ40eE¶‘lâPɽ¾–È«ci1É«g¸t~ü¼Ÿå}ŠóáÙ”N¦`Á„µZØ^†ø£;1’¹#µÐtçuÚÿÒH^¿*?NZ @¡æ8½RW=®ùwÇ$V, ŒFßDÄé2"æ·d‰$b:—ˆuŒYDŒŸ_'â ZSžÔìjÍe¿üWÑ´­°®Ø¾îÔ¨Gµ»|M|Zù•v¸ÐÕÙ,"6?&,2Ë:³h‘$\Ô!Ê mYU—×Ú½n&_ÖÕælâ2|!'5mxÕ~A5DÞAdoU{1JbË+WQQ±åy¹k=hX\À6I@²À,÷;wLÊ|Bé¢2YHB;3MôÝm—8Gz"]8\܉Â×ÀØGÅ¢[M«wÃÂÃÈG½¼*ò)up•'Ö2q½P%'€È;õ"``1 ³k󀥉©Õº ŠÐfÀO{=ìZ¸èz¾&gÈV–†„…jþsìýD©•}ù®“^°|~D"ãì•X;¾nîbF23’ûºÅ‰ÁÚ6Hµ}¾–d…UyÝE0ªsþCmÕA¬]Ñ3X=²³Ý)‡%,z.ùÏ4ŽòMÄL‡ˆÌó”È_У;¿¾5 ? …¥ä„»¤=Œr²33Љ:F6EŠ…Ò>íCnbãÀ_FÇ\¹ñâôtÌæÒ±Ž1‹Žñó‡Õ„\¯¹ÀPḞ.ƒš¿² ^Bžü‘KÕŸ/ Šˆ[×ÕZ†°›óZ®ŸUùˆ#Šë0Pž}˜,*-åâ‚eV²/ Ä|>‰J(F”9rŠ m›‹¦Ë.>ÈÏBf¯Jﳈ§ëî垈]‚tïè{‚,4˜¹?äÂ9²ï³ƒâÿµQ5¿ÿ,®È[àŽŒÐe(a…xèauŠ,â„#@yÅÞ\ùlRà µ|…ÿÙâôOS:%±™`¯Û?‡Àù^$z!d/k™þwØc̼Ð42Rœís¨2Lê±®yåvP¡ê0tÔÖ&¬ Cèêøë D‘¡ýsiÚ²w·¬$Q xFêòÇ?E«¹ûÁÞÀ†ŽfäúV^~u«KŽAÚ©ƒäþàƒí÷‡ž°Z%”àW8̨)ª|üŸ.£n¹,æM[SÃEj÷‰MâÞÜàÔ®îæð …^ï‡þŠÕ8BæÕqÛoª\, Дıqüm:!X¦B_ðQ¯¢¹:Aǘ¥ðó‡Õ{…û9‡ÌÁˆøm0QÄ6—vhÓWÀxN‚ÕÀíöt¨—Ô~îÖüغ#PiÑ<©½sUçÃ3l—ýK%¢ä@­,éÞã¾¨Þ ýC_™=@a±÷Žã;„¾!ˆ§ó—МýiÔ?µÍóAõ­„ %`µÞùv„CGC ódAö£Ü¶Ð¥Ö'Ìa´ &,’èªÝÈ“Õ?Þ“þ)ªMq-ÌÚr'è_ªKÃ{Õ;°k³+ñShv=2“èÝD°\˜?¹Fm]•å&ìBî|^Õê‚Læ+,ÿ³yZcþòÑî¼wía˜D½ëÃÜ1ÇDÀ$ë½™Ž–×åmº0ß'ÑŒºä°5¥zÔvîú6 ¥‹êÁÒ¬§M#ý¼]g}j|Ó~¦/ š÷à?õyÛEŒ¡©´¯’Ov ghAV>n¡lµ3ߥ ˜ùؙ?HãaõVAgùÀ9oë<‰_](‹ÈJ{Wýµ¹ÿ¼ùzz:œWkgJ9‡&Ö- Í`¹Hé þ‚\pýhIñîMæòK sùnn*yùÂå cÝTBj€M˜X×Ôøý'0ÒA~T΀µŒ¤É¢É Sqº•¬tM&ôsR\`ÓÛ ”÷‚†Šh¸ý§'õßêXqòQßæ£v¨n:Ãe$Íz¸‹Sš BÜ1á"=¦‰˜˜^OÇ3õ´cŽžÖŸ?¬îEëE?öèÓôî´ëT²1¼t ³ =ä C„­1³ê …xm®ˆï\  P)üTÑ@ƒDÀÕ’ÂRÊeÖ5°J—n4öZ¸Ž ßõk Ÿ`õ{à~µŒóZ`^ÍÙóÒ,"Ih]íLRk~©u·£œ7íšgˆ×j€zZÖÉtJ„_À°Ð§‹Ý­îàPÚ:‹«’Àlº; ±0„¸ …Ø2âb'Í$ %sQHǘ…BøùÃê7ÕÃ:Í3qhg÷°úøþ_›ŸÞ~Ü|}÷ûÛûwÿØÀð~}ÿqóåǯïïÝ׊$Lr…Ë2+S/Jï¡‚6aCÓf=Ç¡1Avæ™ßž„˜Ìw 2Ý¥ ¡4°b^Ñz°³<ùÔ¾›¹Îr L”‘ÂQFVäqB£ãê5 Vˆ3Š£gˆqùEfw»¢ÍÏÅ~“—eÛ=üÇ}e2¥Ëv†R’XUÎ[> >ââöûh\ª‹0XÍ(#±:£ÂÝä?=ŸHkŠºì=o¼ub¡Ñu9*Zgv'õ¨«xþ¹ò¶Í¥Vƒ[z]_Ž×›âu1øºvæ…^ŸÑ¡ FSBN ˜în=Ð[^áÓÝ£þ»¾‹Œ¯‘6áS»‚g^±èåÕ°½'4È 2Ïá2(GˆfBõ‹fÖaZµ[/k¹V]õok¾®v±Ò·˜3x,êG C߀1Xˆ4qˆLÛ's2J(¡ümÕ‰ééªÎ;Ôƒ‘Ôm …Êërñ¾VÂFÿ”²ƒ—/õDÕ¾T#™gjk¥ õzÁ‰;J³L¸?]âÛtF´Lg„¼æ‘Ôé\¡cÌÒøùu·sâPÕE%¶èW-ö»VãST£Ecäî R®,ì¼ÿ#@ž%‹ªÆ”D™•ébæ Fhh¦õí)ßuΪÚOaœoÇx­–¡;+Ã!ØK·°œçÞ˜óÎæ—6èב¥/²ë9w®I“ÁN‰{-ñ~—ZŒZ!›g¤ÑÖ[øl¬…éà$7}ÿ@uÎyñkrÑ–ªœL>•}vw‹IJ"ß ëîù8 BÜ„âñ2÷#azÏæ¢¸Ž1 Åñóë(ÞoÐíî¼÷„ØÊ_çߢ“,~¯ÕãZäâG¸Û&â?ò¬:/´4{wº è4ÍzwjËW¡0V,;¯©=°d½݃Ä-ö^#¤’!¸ï°äcÅ-+Œ/7 ÿDkh}‚ °ˆÄ¥Ïaû/¿»Co–ö–M×Ð{#Ÿ ô6JXý5,zàä$1”¯•÷¬¸eRùÎÕ4ã$’¢g´ F‡€®Ê!Â*Vݹ ï0ÎüoÛœ”ıqÃyrRŽ«‰Æ}_(#qfÕúqµ%yûöuÛл,ìQqð“Ö4v”£®º€!ëfèK\8Ñ%v/†Câ|\k×è,1ã„$ÑTU¯’U2Ÿ¬ÚMb’Æý‰ùŠ ˜ã¶Y˜œÏÌ&„Zþþóæë¿?~ÿûoï@Ø»Dy²,rÏÕ¸.dȵ¹³`oÉâß| ¦œ5]Kÿ¤ùÀû#b±é>¡ÌšÀ E‹ÔÕàe¤P’2(Ó87Πg‚$γAŒÓ™€[O&’T£>‹æXeõñêçhe!âE~éñ”‹ÖdñÃyÅ¥ñjÄÂBNe^œB-<#ÜR!·îñÕF'!N+Vºq3,ÖërŠ7G)M!ŠÄ÷ÿ‘;”d‰µöÊòðìg8°ÌÈ#†–<Ý‘µl˜=0·Ø3 ñòCžÅYÎîù"‚˜''»‘ƒ2>e3Õ5°¯À.w —W“±]{…<<É#S˜qíÁº‘|‘;ߘÂþ%½ 7±(zÌwé©ì@ÖÖ‘È϶k|þ(ñùŽ ®ÝNZÕÒ;-‚gÎÎnoh=æKXÃ2¨Í|þEáI¶BÝà«ßÃÉ ,cqR²d§Ã¤f‹xÓì í§Š IBùpLÊI¼,NÉžöfžÅs“ý%dÛÌ@’Doò~Ú+Z ‹¦à ˆIöº[šðk9{Pòˆå!–ЇA•R‘0%rÕ“¾É²U®v˜ÉfV7øY¯WêöÁ’šiBN€™f‘ç*¶Ð¨þÆG¸DCöÛ½?4ÉÐ…´ ÝöÑèö ¾.ËÔ}Ä31žÈ i jÍ”9ðnäE­á’dت?m6þ×Ĺs‚Ë©M¤a‚ÙÒtÑ*Œ®í²HÞF¨ ÂÇ^O P¤;çeT,¦Sqº˜•à ïÏ“`fƒÂ¸Á{š³ÿ¾9»ÆÑ­m£µÀ)D²Ú“ä©%µþ'zÉ I0èø‘ þ™(ý«™LZƒNµ3RkMÛwÖ¹%eÏsíW4âyól求¿a,\vŽvT¿pìnhgâí´½RŸ’ŽìÖ@ìkôÂõ§n¢©ö%K²8/y“VtýóÏØ®õòÔ"µ÷WøãúS8øPõ‚ŸnýNƒ9NÙAøfe¤ŠíÚÇg6'^œZkÚ¥ÕõÓ"V3úa´—Yœâ8›a:ršFcók„ÆuC< ZLÙ]W¨lì WÎhŒ÷†¥¦qïRåLî6{lrCصÊÙ„ì“„©ÆC6Îõ4#ˆw­»—8)Ëy¹Æõ¯ÈDî?lNÓêå´Tqð»àNéê†YBÓŸÁþá¨F:ý„UH¨NC]6ìZÅ´‡©ú†’ûƒn¤O¨¥º&Íh‘Ä ¼º;hut oôz¹ o. –Ö”í»_ñÉ[úl^ð$F–Ï!–éšsmLyk,[c+xÌ“¾Ç-_Óf7–'÷µ`Ò|ÛŽÖÔi!“žËðð% ×zëGû{q®‰òTÄ)›R_ý%À`œ? endstream endobj 35 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 21/Type/Page>> endobj 36 0 obj <>stream H‰¬WksÛ¸ýî_b'‚ >Åq'M'n¼‰v¶'ã¡)XR#‘ IÜNÿ{÷$[”úÁ ÅÇÅ}žsîùEY¯Ò¬&¿þz~Q×i¶â r{þ²¨ëbK>ŸlîëÇ'篋¢æ%9Ÿ·¿nÒå:Oëu‘“ß~{ùê’œ}=s‰K"æ‘8ñHÉÏþü ÉÏ^ÎÏÎçs—0FÝ€ÌΦ.uÙÌ#óŒ„3Fg ]Ê"2_œMXâÌÿuv5?ûýPkaPfY ÚÀÕµðè÷³óÖ»4_’ ÏóëË·¯„Ù£=ö#G fía££ýeÔ ld´ûóÛÉÜ™Æ4If“w˜/®Barª.¶ÎÔkŸ5Sµ3 ¨ë“&uÔ¶Ž<Ám¿V¯ððU&_hª5Øýæ0W\DN2gª_ZÚâZ¼œqRˆ—&â18õyþ·çeÝ´‹\‰¬{,¤QÒ ûÍÕ?î^¿»xs7¿¾oþóñŸ××Wóo/_¼{yñîÅ›wï_Šÿþþþ¿w/?\Ì/ÿz˜v¶½ŠÒŸT0oF“nÑdŠòS2. g¶[›tYv-ö{fŽjÇ ¡žŽÌ´\U;ª1±¡î¹ã‹‹XÜ Û‚Um–²ƒ]×kÛ®r#ˉÉtl LT(žuâÀO7NÔÎEÃu/,œg ”êP|ƒé:0dÛœÄM¯c®„¼CnkÖøu(¨+„ƒ]ã@D]@;<|ÙŽ®‘…”ùvF§Íz&zvÔû4Ô{ÇB½±qÔláç6Ô¯a€ˆ.W&ÚTÝ’C„Å“ó…ï,ásÄ~lš4‡Úšr[íw¹£/«9†ö)e;»íy «ß”© éç>0¼Ð²…ü‡}@ûÕ#Œcž­4ˆ”"¬$ñ'E®oH#ÿƱÊDû‘“f•êw1–Æ%ChªtfÚ9u/}„0mÄSw0÷-âYï©C%·*?öž¡«+ ’óïë ê ªš/t­»YçhòÂ!±˜Èk;YœWo«ÛÏ£‘V”8ðlS£‡‚‰À;Þ(:Å2à_X‚$( U}„0MYØÓTˆ\«öéÒfLjלüSCÐÑÊîSªME£ÎØ#|Ëó;ÍjîA/陇Éä8ëÊ"¦G¾W÷»Ÿƒ¹¹oj§h^üŒ%L ÀÀWDhíÒ* ƒé›öˆhˆ-mÒ3ÈCÍÍÉ} PÚ1‰e¼Êýä&²3Û~Ú7Suñ<ÞŒ—0¾Ký® / @éÒˆ. òg+‚Êû)*D6ÔÕSo‰Â.*óû4¼Ë¡z»ªÒòq±\Å GÆ=É1ä91|³ÖÁa¬×ziîôG]¥£køBhÄVMÒÞ³zÃ¥^ä“¥>-@EG¢XÌ‹fúmÍ|ÑUªë¢ÉºÈÓÍ!Jq¿}a›Í댃¢ñOROQ˜P_ÆF‹§@FÏ6qŒx2ŸßN.ôÀ¾[@'µsUakf´QUЭÉ,1p[ä‰ 0ö`æx,ù²¨]Îì št6û¡cùñ‹£œøe£ï™¾“»Z_ðÔ9Z¾Ç!’“ªáÅ3:c`ÚÄ+B…£9£0ëH8ŸZk,•©Þy©Ä4ˆíHG/“¾Ðýn܉ys¨3ôzÛ'èq«‘;Šö;ô—M늈NÕzá0îîŒ÷ö5µ1Dp»FA@g‘ÊFÖ”ÒÍVð÷1š»À‡UÝ÷»ÉìT|sfHÇé)—Å.g–«“%ÿq7¿¾û¸Û¬ëO“OÎøÕ§³-±öFÔ÷m‡wppûŒFê°ñ[¯ncâ(àÆÏît”Úb§¸fÕãEZI%`E6¬4³Ð¥ÌT(õrô*…’ÎOq‰E ;ùÞ (nUòt1XS¤$W‚{ »@­}š€h®šñ¤ cIÇ5q©”f½I `©Â®PÜîŠ>‡ eÔön‘¥›þ6ÓÙ'A«Ê LÚ–=ˆÔh]¢W¾'ˆê'®ÆkÔ$ójÉ ™QfK«Ñ£+ÔrtúŒ3Ò¡PÔÖïÌÈ7—£]ò#žäQMíuѰbé$ ®4ÅWÇ$v´ul½š“B¶àÃOÛn5/µÚã0!¥ø&Iüɱ7Šn†¦çÃmðÑþ7u/k.>ˆMŽ«â¾iá‚%{ Í‚V¯µíº¡up$3[¨ò1%µT1rò8î}[ÀbKñ\ÂRûqÉko/ûk¬%:u‚8ÙÉ$—`·WQ.Ö:%éÝÓ#î#šJë“áɸ$àV‹Å²½Ó‰- h»=™9?²ñÜP‘ÂW# Ó>T ±Èz"íÔòtéÅ\šX®´ÊëêæîRàbÍ’^‰ß69~e‘µ» ÂÚKò«¬ïï øHŒ—Û~ÑR%LÝ‚¤²œ­™´Ô³©Î$‚õ€-‹°¯”m,fŠZú Ð$®HEÙWþÍ´Ücÿᮈ‘Žî7›mb±Ývj¾¯5gƒ}E~J‡'‰ã0aTþ‡ùGŠcËÄ1âØ|~;ùSÔXIn:Oƒ&Ü0Cݰì•9‡5Jöº7%y œ—Ìq"%³ïx}:óemí˜ïa‹ì LLë=¼Ä—•ØU(9r( Ù>¬uê*óp¡-¾…o^ôµãÝñÑý€¤wƒ8}ºNšXÈ:ïŒú»é LD¡½ÁjÉ U&À윎W¢¢Ò1Û×ÙOMbôì$ åùd©O °)H¹4ˆUC¼ßñ\ËÂÈÐQC°/þ×7Þ‚™ø€èöŸ›DBÝÖÙEŸ†7(Š:Œ‹7ÆÄQxƒŸßš¾¯÷íL†èÖŒZ'$…yËÉÚêXT‚lÊÅ㪠㡹:Ó´)p£Ï—YÚ_¥·EÞŸ›=Âü2¡!ánôŸ™oÃßëín£¡Bí¬ÕÞ†Ïý³[#·l]ßW]í‹0¼€†Âµ¬‘ûŠêùáϾÐ1Ýh8|«ß¡Øw‚h_k>5J³ÓFÉw©¶‡yÇŽ’1qÔ(áç·í–•cŸelò¬={¢õï6g Û’÷wŸ”Hàv•`ÚX#SÇÎ0C’ƒˆXÊýLm—¿±­àÅ1õ“RëÍÄ·q'½ ”›Í¾QÙÁ]N*¹õ¨i­$ ÊÀ©Ž SÑk!Û—§f#9žLƒ$¡®¯òöZófS+ìˆ&M)ö‘©°`òª|±Ì”¼MU2Éôû5ðìZdåT¢e^@CÛ¯ƒ2ÀÜ“à!˜1‡'1­eâx0ŸßNæ@&¶P¨Q&15žzÏŒìW°Õ¬ïTƒ]s…ËØÝ{yIœ¾Ø5ú´BC)D—¦j >6iŠš½”Ïqm¶·Ðdvmd1PËÅφWx‡ƒK8Ð|{ߦSB &¯ÂÚìž].ñ²žÊ®ë.ô*Û™)Ú0f«ÚÕ®@AÏ”e…L¨ ”ñ,-z22Ø0®³HÕÜC„Ï7Å@»lQ»@…·Žâ˜¢|t’NŠD޵ѢlÁÇêݪ0¯EzÔ¥Y!,Ú¯D.Å–)jˇâÌ´ËÕÍèÜú²›B+¿“éXȰñ‹…4Žmk;1##íù>£;É%ß©ïwºfW¯älØ] GЪxR‰…³×ÃPXƒ‚JÃ&´ª?X6¸5ªjíxp’–¨Å ×W ~ë=¦º Uß{z¦§1Šãf-Œh ³†:°’GâIù®y ™ÁþÆX‡K·„L.ûkÆPêÃXàRAh¢2LÅnqè‹§4 á-Dà¯UÚòîj$–Aàåé§:K«8€íÞ¬[½Âá”Z_vh§¦œspÀø!?¾ ê‚&°‹ˆ"6ìYð—.*¿ä?ZËt ±ª‘4Éj´ëÀQ¹'y˜¢mg6›àJ”)T'Ö®,EÐüŽk² Éþè6puíXtp›¤¬k†Ã3 p}Ð72ûÄöõ Ÿ€¦÷§º!Ž•&.Q›u晀jéਬ® ¢ô¬¢„‘ƒ”:hw*2‹" /‹šsU¾ÀÁËU¯ŽOzd¶u¨ÑÑ+Ùù—|û'ÖçBzß;:‰4%µæÄw i@œØ—@¯\ä¹ÞUÎJÖ'‚ÑyUOTr]ÌmoÔ7ç)·,½ýÞI¢áèºæ­Nr*$EÇLç©BÂYéo¨n"s¥eúsJ—0R•ó˜IÏÇQ&OaL~<‘{ȧè,þu¥žß›\æ™—@ E ”U\ܶR² }{L3<ëˆ;,­,(ˆþSÌéuÌ•œ¦õÞ#Ó€Æ~ÏЖû»a΋q,uàaÒÔø‚C‹ðÚÄl§s×°žóß½w½òÎ!Sšô³ÊGdó[œ¼ÌAv0'þŒ¸uhSd×ä[šÕt7ÏÃ2Òr£twV'ƒ&ÀŒ±Th¸/$’< ËDãª$‡±33jÿªTá!·7Pü>øK3µzÔ0òÜügõ!»éeAÎ8@"ñÝÏ@J*<Ì3V޵öPøøŠû¹»_®«æ³.a4Ů۟¾)-×aQ¼«R&a–ê!nêóª¯ ™*Ç6¹`¿yøH—ø1ÈæU«å›¾g;L>æžzÆUª˜j9‘ƒ d0òð‚ Äi&…qå'&ýËËV:šû;ô8ˆ‚Ö¦*F'}Ey@TÃÈ<«h=Þ¢-ï& ÞÖê„sÜ€‚ ëjäš´ 3ãºCç}_ž¼¸ê@Üá$•‘2;M…Ùé yêãJÀìˆüqiµ•M=0RpΌp…Þ¹OKêr ïÎDåU3QT%!ÿv‹ÎDZˆyp~‹ü´@Oìe{·ýVξ‡Š@áò§2BTÜ2©¢É4›ü:¬" "¬=âh$,¦«ŠûÍ-†"儤#SÎ L»²w“Ä T¢2®ÜtGÉûÄòdyD?ö X4K/ÃgVÉÝâù«âiùÄ4|”ï7Øsè®>€ô3üúU™,¹¤níSŒý­Ÿ£UB-¢ü€ b5µv3èËA™lÒ¡ Ò⇺Á”å辯äçþœÅ‘‰ÄyœP]Ç `#r±[²”Tÿi#Õ–?ÜÜSï0ådÁ)Ǭ¿hÜ«yñÕ½ÊÇ `Ü£¯¹ó.P”œVê÷õn=-ùd¯Ðƒyòå.ÌÊÌ ¿=eвðŒHíwa¶å™Œ,V³çâwíšáGgy?¨ŽaܶïnÛ3,w‡ÖÈÖ9½D¯vY»¾©¯hÛÝÚÒNÓ¤G!÷dTép²Ýû 5ÿ™¼o’+ÉÅî0g-î÷¬Æ~`$•f¥CM{ÌtµVÁ„µ– P»a¹YM™½‹ØHr°8‡â`‰2áx³î‚}©d.88¦ŠŠÙjnI:ä±>H¿ÝöÁ³ŒE‡àˆÞœº…OåKn{Ámá–º>ïu}æ—fÆÜi!Y ÃQÙ™µ Ÿl4^¢áq‡Ÿ[Ž“CLìÅ^ðì#IQÇ€hÈ-—8É5·ªü³T#^_§YFãféRÑ ‹4Wk’1Vº ào‰4‚å-R-º?¿ÃЗæÆùNµ/fîMjØý™] ÆíT ÂUˆD þ‰¹¹Ôšbj† ÂþÀUJ2 ÐAý îÕ˜2LÊQgà=\ï&Ló™©[¨ž«‘`(sØûñûw5}eïÏ j’M“*, 3ÙTƒxZ…QäñÉY)Íâ0NtDióp¶Ì-Pˆ·h$Â=\Ó‰ð+×ÏFH%nÛsªÍጉNµKê’åb›¾>2Ýâ¡ ˆ}HšHȲYºzÌàí; ùŸÿÛ‘4uPk³sÀSÀŽíÊ£q9P Æ~«]­Æê7VÏLè$À’u…–^Øà ‡$ÃÔˆä¨$Ϭ2j}57tÞWBÝ!ŽœQÛc^—ˆ0t@9uówE8ºN„ãl|»eKUX…X$ôüÊÑmV¾cmðYçÀ8úöæÔ§¼üà?å%q˜”W¥&JÅÆñj‡Až‘w,£[Ÿñ‹'Ì•Î^v¸ìÔ­«Õÿ#¾úzÓ†øû>E^©˜•à¸}£ÛK¥!uÝ뤈!…¤#IªúÝwÆ>ÇÆ¡#¦UŸ€àÜÏþý¹™2Ø÷êóN·^-0‰[éw´äö$Ý…PúN÷wޝ ³Œ¥]@JqJR󄑔ƃ/z’i4ü8#3% µÎsÅE¿v™jçìûHî9NàRú,,O³ëÓƒë%‡'éñ!|«Š"LÃ츻²u¥ž1A.¼x¹ìKíãàS©;0ÈÌwŽòç8Á-ϱb >stream True endstream endobj 38 0 obj <>stream xœì `EÚþߪî9sMäÓaH€„@ˆdr¢D$˜¨ Çš@¢à$Åð@4x€º¬®T:Ôp-Q×ý¼Á]( ¨°x ºéÿÓ•€æÛð‘¸kÂþ·~C=U]UoÕÛÕÕ5S3C†…ATªÊ-:mÜC9·»ˆß{9QäãróòoüéæÓˆ½LÄŸW8±èÿ•O{÷Ñ#WtVö'»Kâˆ_½™(êžñEÅù'̲¾­ö=½¸èÔšÁÅí" 8wbÑДà©;‰Ø(/+Ì9½Ø½5k±·Ìã‘gçN(9ÛRµhx.Qð3..¯ºpê”EÄ7ÃÆ7cnµöÓØÞ'¶ÒKd›|^ÕùÛ÷lHlÉD–wÏ/ŸSEÁä@{{Оëü‹®8o|Üm…ÄÖÜCdýlfÅÅ—ùÞG¿#ÊÝA,Ë>³²¼b×u‘+ÐöïÍþg"#dA@*Ž×ã¸ÿÌ‹«/Ï ái8wœç¦‹.QþJÊkvb_‡ñi¼¸üòªÞFˆ†ú;P_»¤üâʧ×~…Ø DþµU—Ω6è]øó‚Y^uYeÕ7ãw‡»ù"œßd޽eøðŒåG>=7(ã{{„LVí̈1ãm5å:|ÄEöþ¨ëõMÛÆ¶œA9.:tèÐ|+iC½ÐÌ ˜B1ÄE' ¥³`—~Må-¾™,d·üÉ2 DµÆÊët±[¸ŸMå&j3%Mtyl¦añ„ð°z-o¶LbÃmc™ÏKÌ0 ôoÙhž)©Ö6—ø¨¶ð(5*/Sý‡`}”–ÿVm«;©ø×Ø)1´äßí‹D"‘H$‰DbÂV{ڇ΢~öŸã«D"‘ô$ŒŒv›zÚ‰D"‘H$‰D"‘H$É¿ƒ€)6ÆØA[ç-ævœÛîÈó/¸$‘ü†°W9Ê ß΋ÿ:°Êô´ ‰D"‘H$Ý‚B 3±( ãx nÙë×D?Ú ²“Ýh!9 NrBýÈÏ8Bþä  h Ð 4“‹‚ ÁBC(Ú‹B ½©—ñõJ} a §0ãEP84RhEÿ hŠ„ÆP´/ECÝÕ¨/4–ÜÐ~¤?b§?Pê#4žúCHqÐAM ÆAJ¤Æ÷4Xh%@‡P"t( †&St˜Ðj á” M¥aÐÐïh$¥@Óh84R¡£ht4ô[CiÐ J‡žB£ c¡ßP&†z)šE§_S6…æÍ¥Lhy¡ù”'ôTÊ1öÓi”küÆS´€ò¡§ @ã gÐiЉ4ZHÐIнt&nì£"š-¦3 g =› ¡çÐ$h ‰š¥T,t C§ÒÙÆW4ÎþNè¹T-£RãK*§ÉÐé4:ChMƒVÒï çѹÆt¾Ð™Tfì¡YT½€f@/¤ èEB/¦Jè%tôR:ßøœªh&t6Í‚^FŸÑºZMAk„Î¥‹¡óèc7]NUÐ+h6t¾Ð+é2èïiޱ‹®¢jè¡ i®±“Ñ<èÕt9ôºz­Ðëh>t1]i|J×ÓUÐ%ÐOèZ½‘Bkit)] ½IèÍt-ôºÎh¦[i1t]].ô6Zb|L·Ó Ð;¨úèG´‚–BÿH7!çNºzÝý“лiôZ½—n3>¤û„®¤Û¡utô~Z]ED;}îDÎjº º†þ}ú=L÷£Gè^¤¥û ki%ô1èßèqªƒ>A÷C×ÑP„Ö õÑjã}j 5Ðõôñ=)ô)zú4= m¤µÐ ôt#tm¢Ç¡›é èÒwéÏB·R=´‰|Ðg¨ú,­‡>}‡þBOAŸ§§¡¥Fèÿ}6oÓ‹´úm‚¾L[Œ·è¡¯ÒŸ¡¯ÑVè6j‚n§g ¯Ó³Æ›ô=}“þb¼AoÑóз…¢è»ô?Ðô"ô=z ú>ôuú½ ý€^~H¯Ûé#¡Ó6h3m‡~B¯C?¥7Œm´Sè.zº›Þ‚~Fï@?º‡Þ5^£/hôKzÏx•¾¢÷¡{éoÐ}ôôïô!t?}ýš>†~}…¾¥fèwô‰ñ2 Ðï…¤]Ðh7ôGú úúÜx‰ÑèOôô0} =B_A[ /’A{¡rMïhM? ÖôbM?ðOkúwbMÿîŸÖôoÅšþ­XÓ¿kú7bMÿF¬é߈5ý±¦óOkú×bMß/ÖôýbMß/ÖôýbMß/ÖôýbMß/ÖôýbMß'×ô_µ¦ïü—×ôOÄšþ‰XӛŚÞ,Öôf±¦,Öôåšþ+ÖôÍÿÁkú«rMÿM×ôƒbM?(ÖôƒbM?(ÖôƒbM?(×ôÿïÖôrM—kº\Ó‰°âR@™_¨E±tþ­gÇÙí?;ïB{IwÂ;_µ ß‘œæÚÓ.H$‰D"‘tþáseí¼…Ü_Iþ“‘û«û‡÷´ ‰D"‘H$ÝA@¤“TUíÂþʯãl{»#¹¿’œ¤(¯j?qI'á‘=í‚D"‘H$IwÔ×ÏÜ_uáú€Ž³펺°_“Hº“.ì¯'®"é$<¨oO» ‘H$‰DÒ¸4sÕ…w곿jÿµA¹¿’œ¤tauœ¯ÂJ~Ü¥õ´ ‰D"‘H$ÝAp¿²X¬ÿîý•üŸ+’“¹¿êxp¿žvA"‘H$‰¤;èˆý•¥ ß„ î8Û¿Ý‘üŸ+’“µóUýO\EÒIx¯øžvA"‘H$‰¤;è“à"«ÕÖ…w곿jÿ±–Ü_INRº°¿:ÎGµ’_Ò'¡§]H$‰D"é“CÈf³çvDŸŽ³ƒÚÉ¿ 9I韶 :qI'Q“{Ú‰D"‘H$’î jdo²Ûí]x§þ8û«ökua¿&‘t']Ø_ç£Zɯ@‰ÙÓ.H$‰D"‘t1£CÍýU`ç-":Îiw$÷W’“”.üiËW‘t5ftO» ‘H$‰DÒhÞpr8œ]ø&TTÇÙ½ÚÉÿ¹"9IéÂþª÷oçŪæíi$‰D"‘HºƒØìì¯ü\·ˆé8»ýkQ¹¿’œ¤tá§äþê߇›ÝÓ.H$‰D"‘tqã£ÉéôëÂ7¡Üg‡µ;êÂ÷ %’î¤ û«°W‘tKÜøžvA"‘H$‰¤;H(ÖÈß?° ïÔ{:ÎŽlwäúõI$¿%]øé€ÈW‘tKBqO» ‘H$‰DÒ ™ê¡€€ÀÐÎ[ÄuœÝîHþeÉIJ~: úÄU$Ä:djO» ‘H$‰DÒ¤TÄS``Pxç-uœÝþkƒ½:®$‘ô4]ø)íã|Vò+°¦Tô´ ‰D"‘H$ÝÁÈ‹QPPp¾ •Ôqvl»£ãüH–DÒÓtá§bO\EÒIl#/êi$‰D"‘HºƒÑÕƒÉå éÂ7¡†uœÝþ¿eÉ¿ 9Iñï|Õþ¿ÿuØFW÷´ ‰D"‘H$ÝAÎõ)Ô«W­ó£:ÎnÿµAù—$')]øé€ã|Vò+°ç\ßÓ.H$‰D"‘t+Ò©OŸð.¼SŸÙqövGÇù‘,‰¤§éÂOi9qI'q¬èi$‰D"‘Hºƒ¢5c),,r@ç-Æuœ=¼Ý‘öë=’H~K\¯:üÄU$ÄY´¦§]H$‰D"é¦6æQddÌàÎ[Lè8;½Ý‘üŸ+’“”.üt@ú‰«H:‰ÿÔÆžvA"‘H$‰¤;¨x¡€¢£µ¡·(ê8û”vG]ø§¼-ÇçúžÌ¤9OŽM5”M뉉zB‚9El9¸¦ðq¬8‘4xn#é©riˆ0|Tˆ±-/=Ãk^à¥^šŽ}Ѥ’Öc¦GùÈ;4±TçefIÓÑ’>g™%‹Ž–3/ó`&¯·sÝì_+´WÞÌÑ: ý?Š+[Ë Š<“&—hyµemc[PÜ<ýXY[Jï•S¢Dñ¶RD)&åÔc•̓]Ã?«˜Ôº‚I)2˜–¯»ÊNmÕRglìqmmö_5_›V"úÙ¬ÍK}tbûã1íŽÛyç_«À_5žO®­u¶+ËÇT[›ïÑòkËjËEÓ=šËS»?Ī­Ê+;zAK£ôü›Jq3ÙhLVNÙõväz/»¡hrÉÖáŠK|œñœ²ìÒúþ(+Ù aɹüX®y¤™GTÀ0Ñ}Ü.Š¢6x‰‰RUdˆãŒDžýh£¼5Ï%ò@Õ/Ê P£uœ\P ¡A!¯òXƒ- ÅÛˆ8¤·ˆ}¡‰)Œ&$FùIw¤,Ú¬¬¥si8²×úÎ2³×6xsSD<|LkÚÝ´I¹]XÝf6ŠîǶN­± )MYe,Juå\€[DçËâÓS(+^HÉc¼©…bÒ×"U‹«V‹+U‹+U §j1ûH¹%7¢ÎPe>U)óhÂJ¤ÍiÕLJÝ ý¦lP"”p Œk†’!7²Áhzî é%ª…7ø¦dnQæ`žÏA›^¥º!,<åÒMJ‚8•Á áQ¦A•Óu‹Özi`j^’-J4˜¥¯¯[ÏrãØœÈn¼¼}‰o7‰¿Éß6/7߆c3~¹-~µ-~­56šøöÖ›‚¿aÆÍYÑ|7;—H+‘â|/xÝü}ÞhzÁßã(ñW Þ€x8â¾Øܼ±|¿Ûjž,Η8´-áŽkK„Eµ%BBS²âø³ü¼þwów÷Gü oÂ+T7ߊ8q¯¦?ÉGÐÄëÛâ¿ðÍæçOó§(qƒ/ÐtA÷ÙÌhÏjFOø¨õ¨p¨{3‚¯¥HT}܉܇âû»ƒ6¡=ÆWój_Œ;$ËÉïg%ì*ÕÑ3¦¾Ê—f6²Ì·YsoàËø2oxš7Λä]£$Ç%'%¯Q´8-IKÓÖhY.~ •÷/_ M#cö x–ñ}jšžuçdž§EÐ:‘*ƒV‰A]ÇJ¿©L¾˜&"p´±a!Â"„«ñÚ~Ÿp%Âï®9Õ5ó°šTÁ¢ U°¨U°¨‚E,ª„E•è½Á´(ƒE,Ê`Q&,Ê`Q‹2X” Óß2X” ‹BX¢…¢…°(„E¡°(„E!, ……^Xxaá^Xxaá……WXxaá……WX$Ã"ɰHɰH†E2,’…E2,’a‘,,4Xh°Ð`¡ ,4XhÂBƒ… MX¸`á‚… .aá‚… .X¸„…K\ŸÓ¢Ͱh†E³°h†E3,šaÑ,,šaÑ ‹f>¯^Ùžõ÷Ù¨6Éç„(Ñ7 Þ¬€ŽâP:ˆ•Ð.ÄqmVý[{òøÜcõó¹G™µí4À¼ðÌJIÂ= ‚+ phÿV¢2¯Ÿ{Ÿûv÷^˜…ÅôxOkTm‹kdg{îÍI÷¡r–Û—å4ëãù¡¾-ÖÍøI÷š¸Ýw£-÷”û.÷÷-Ivdß ¿o]øÜ×`¯·ÖÛ˽Èì®NÚåžãï.wŸéž‡|Ÿ{ª{³é&•²¾ö)w!< gçs‹k.滯p{ÝÜ£´ÍæøRzk»iI›Í ”ÖÞc|âÍ9~VZ# ö&ؾ¶-³M±eÛÆØ<¶~¶¾¶[o{ˆÝe´ûÛv»ÝjWíÜNöÞF³7Ñ|o¬·ÕeFVÕTU¤]ÜTóm4l9³sOz/¥€e³½iL×ôƒEžFæÄVÊâÉfzHgëé‰6ãL=-±@·N)©gì–RäêülTŠK™af-Ž2ß³¨g´øæ¨ ÄXÄâ›KK)r<±ÙÐUYn)ò†ÍS‘Wïpä5M(L„¬ÚìÎL%²DŒ ×‰]—×YëlÜÜ*T7DƤ\ºÏà °ãó|CÅö™Ïkègî_ª†Žh±]5c_dl zhHƒ©ǵÆÞà$$–Å-KZ–VW—T—fEîSké^c>•ú†®Q¨:qÎÑ@²ºƒ ·Ìþî÷ELjŽëÌDbbiâ&ÆëŸ›ôc;§­Õ9¢ù꣤5N[#¸­½×5«i3…5¨µ‘Ö£cò38"²l¤h¢h5{,2v -³Œ]f™ó/±’Ç´†6|ô½Ë2Ø! £YF§avþ€—nëèýÛûbZÁB°g ¥³è4¦¢N"ÝÄî6æ_Ð)t­2žf×¢üVú+ý>Â3eúgQ%}¡ì¦RãOd§%ä‡=Ý™,”Êé<¾‡·Óôgö{ãGôÚ›®A{”EYÆ3ÆaJ ›Ôe–Ž'i9mbVc†1 ¯úQ-O4Þ1>¦x*¥è1ø”ÈšÔS)–.¤Åt'‹PþŠÔèAjaþ|š’cÙŠžN£³éšGµô(½ÄBX¡e‡åkãJãsÌÂ^4>Í¢/Ø6¯Vý±Æû4…6Ð 8_óѤNQ²LiÉ4î5žÅîûiæd›Ù3–Ë-G®6î7ž ø3 #rú™N×Ò3ô"}Cßò…ÆB:•ŠÐóó,†i,#þà øåM‚³okh%é¸"imÁØüši7ëÍ¢Øx6-gßr^Á·)w+ë•·T¦>‚ñöPƨšVÓSô ½JÛ˜í'³Bv»”ý‘ÝËš¹Î÷òT»z­ú“zÄßÒÜò“q†ñ=öÜ‘t:ͧ…Û¨ÖÓkô6}KßÑAæbél&»Ÿé¬™íåÞOäU|vÏ+g(Ë•gÔj¶z¡úªú¾åzËR[¹­åðš–Û[oyÝxÚxs'íÇS>FôjÌŠÕ´•ÞDëïчô©9Ðþ6™ý½Ìa7°;Øãìyö:ûgIâÑá¹èõR~Æé~;¿½o3ßéàïóùWü{Å¢ôSF*³•û]iT¶+Ÿ©.5^¢S'ª“UW&Å2ÎRdyزÖò¬åkk†µÂZeÝc»Ævý•# G>j¡–™-zKæ®3i>Fâ>Z…y¿×à%Œèkð¸™à*D²X6~bù¬€M`ç°©¬’]Ö°ÛØìn¶Š=3À9p|OäY¼ˆ—óJ~_ÂoæëñØÈ_äïð|<SàÍêsüz›•±õ!åËK<–Öb5ZÆ7óM,›Öó ~6¿G!¶ÏŠ»1ß/§;Ø…l­eûØhvKc é-ª±ë(ÃXÅUæ`§±¯ ÐÕjýîÿþ蓢苖ûÔõ÷XŸi®ècô1{„1‹±«›‚Õ¨«ÌM˜ï‹É\õ¦á>[ˆû1+ÈEÖm´ÞüÙ–f«Î§¯éô…e#fT6VÒÏ[f©÷©;4# wî2z÷ÝL‡;f7fÉ›GSq§;±–¤à®.¤ÉTAWaÕ[nèÆ=ƵÆÆ¥ô2l±Áì«ÃÑ‹ z[é=¶÷áqþ8Ήh© &ú’…³8–‚ûaŸe®e™åQËzËŸ-¯Z‡a´¯£»1£?Ålvâ fÐëô%ýÀì¸64˜Ráo:|/¡‹x©²…rX$Uឈu<»íLæ •k0z÷à~Þ‚{ãk¬SéÏ´ƒq†3šþíh§ã|.j¯Á¼–5 §«v}…ódéØ&/ZZU« >}@Ÿa´ á×`¬ ¹ìl´õCèa$²z\§hVÖ\åŒwæ¢lÖ=»2Ü¡C£,;§Á-gé|–²Ï1òëðìE§°Ùð"çq„ú°‰4¢åLøð&ST½!¼¸‹WK”y-ÑËô®‰WkË5oóÃ2 ˜=6Ê^ÏY‹ÕÖÈ3½½È¢¶(ä´©-Œ"ìVK W6³xr`Ñ §ðD×ÁŒ#g¸dL8’A™H»C†%ÇÇÇA°Ë¢ÃšÒtØk¡ŸHS›Ìo,4bïÁóµ…tåF>œüxŠ7ÑiñF¸Sƒ,n ·L¶§[N«óV?æ©8â­öx›Ï”xnÝÈïÀ ª;¼þÜ|¸•),Âé×Èì ±Ÿ­Å.éŒÓ2&ìÚåÚ×ú8ÕW™ûÙ4¸—™1Áuä³i‰Ã’Y~n~.Sà¥b Ã=˜|ê¸Cæó=¬¤åá#á-׳ˆ–Ïám•R¯T oýèBoêË¿ƒ–ƒ~ªÕbõ«´Tú͵Ìõ³’EaV?§ÝfÁ+~ìv…ìšË9Ô™éTœìJ¯SÑÜâYKa|Eƒÿêsô¦í;2íS­t\àœÇ/Wt<ê|Ò±ÑyÐqȺR]æXéü«ãEç»|‡úŽã=çç|ºÛñ¥3`žãrçµü&õZÇMÎeÜVâWÉ/PÏwÌtÎåW¨¶\^ æ: œçØÏq”8máΡ©|´šêãÌ ´)Ü_µ:Î>3#ªÑãMB/šjw8Rµ·¢¨Øð8SŽ$G3Š¿Ê¹¿ÓépØìî@ØÈÌo€läédÁËñ)ÓR-æËñ°¢âTKŠÍk[hgö- q¶øi~þ¼‘§{CpyQ‘¼¨D)næo60¬áÀì}‰‰®Œ¿»2"#\Gf™î:’˜ˆ ×®ÙæÁ#3Þ.± I\rÕ_– 7£ÄRÌ•½Wö¶v£¹ÞOKO/eÓ³/k})?{Úp܈̼%ñô¼œmÂdc›[öµ|ز³å#ËÆÃáÊžCùê5?-0æ|±±G-Çœ «ÜeÞ¤Rk©³4äìгÃK£ï´ÝåøÑá¨ê»¨/­¤úî“1^Éõß'7â.‡£·¹[±øE"Â…±aŠ:ÃÄ3ó¼  Š¼µ/ë늵GÄ”d„'bñ˜€[töÁŒ ûŽd|&îÒÌ}™û†%ÿ?ö¾<ªê\÷Û{ÏÚ™dvBˆ”?†ˆ0„0bäЈ1M1 ÆtšcLÂ$LBH&3{ÂÌÎÄ”RÊäPJ)¥–r¨ENJ1‡¦”"ZŠŠü¡j©(õ‡µ‘œw­½gH½½=÷ÜçÞç ûùÖ÷îµ¾õ­ïo­™Í Ý/5ßGY~rZ—T—V;°vpÝ0õ~çÈ‘7«êõéÔ?5mbÎ ¸6`ÐÀ‰9¹7O}}ºj©ºôéí¹~séÓK»;Û¥!Ÿ¥/W-^8ÇýÝu÷9ñæÆŠÃyÈ*9õ¢wsqãÏ7þæg?…ßE]Ýb™J©´)?ã‡LJL‘îeµ,À”ñie)žoš%)±Ÿ6B“Òº5ù«ÚÝš¬m—ççIH€{Ь&ePbjbv¢7Ñ’84šöÓ4ù´hÚ¯Ò^H³¤¥Ž-î¼M–Û¤õxÒÿ«¿•†‘ð¾‡ÒßSù)zó¹û‡Ì8Jƒ ·æ ½÷ÓýÍxèt/,ÆCgRÎd'Ý?ùüJn."ÀýVûKë/Øs *ßüÚ¿ÜV2Þ2ú‡s nþ(ëöÍ—> ©{^3WË7ã„ü8)J#\NùcÒøÔ³Ä#ÎkDZ}i”ôdS9–ãÿë9–ã^b™—çHô¬C—và]f|Žõ˜c¥wXcs~'ÝúÌI¥÷—z§˜Ãÿäš×2¼Gÿ¸ð¾øçŠ~ÉõAßÕwõ]}Wßõ_Ší亡ïê»þ¼¾ª8ßÕwõ]}WßÕwõ]}WßÕwõ]}WßÕwõ]}WßõÿûED÷*ïQìêE«ˆ¯¬'‰;Že²RLF¡2Úobþ}Ã#&f4XebxЉ¨:®ÇJÙ”bâDZ"•š8YÞ,‰ÿ†ÂÍ–Å&–ˆY7±LËg&V(ÓrÊÄJ²|lbFjbx´‰hB\•[2q"ÝÉrLœ,}ƒñn#Y¬•¢2±…†ªûfèORϘØBÕã«ü·"¬&¶PšzQà·„¡&F¬Ræ¿-¡%d™ØBƒÒN4ão`#þ6âo`#þ6âo`#þ6âo`#þ6âo`#þ6âÏq÷=¡ÐÄð=!O`úÓ*Ml¡á Æ\Mø11÷Ñ'p ÿw¢ ëLl¡a +Nz"&æz ùkD ·›1Lèx€°gŸ‰¹=»þ ú$5±…ì F¾ry«ÅÄ\þ¼ÀC¸¼u¸‰!oMøZžSëT#§Ö¯ö 51·ÇˆÛ!_jb._$ð(žSk½‰‘Sk…Àcy|¬í&F|¬-zV›˜ëY±µGü­=âoíá—µ‡_Zy­‡¼Ö#/Z,/’rPhP)y¨Fü¢I5‚t ‘WôÜ;0o«Ð_'$²0r;5à²S úæ`¾N~qW^é´nñ}\$ª„l©éBŸ2óÀ}4}MTûOÙr¥d^¯5§a¤+å‘CØå7çÙéfÌ@¹@ÐQG³1Ú„qn‡Nc®*ÏcvYû¸¸ö°ûó—ÆQ°y>æ5"ZvºkÔŠ5ùè8¹&ìÎ:±ÒL1⺫`A&úf Ÿ}b¤NÄð^´È»M;íðæVš ˜À=m< rbß±4rP+lÕE_Z·è÷ŠõB"G\¯=>a—œmΩ1ï«„&¯X}¤t1ÆgU º™ÉÓÏÆ¸ÆŒ˜¾²^‘7,ž-Ö0â1_ØÍ#ruŒ{.;«DDÜ¢J¯ŒŸÑ PäÇ€ó ¬6í¾ºîÆÿ†ï—µ»ã¹÷‰=Ëe¬Ž¯æAlõÏÛu[qO _t±^l‡pý†¯nôÌž7‰]÷e•PÕ+ë5";Mfkxeàî¼¢µ k[âÕlèá’ ø²ÊzÔž“=a’½ÔScŸÑÔØ¤‡¼5ö;š|Þ&_•^×Ô˜e¿½¡Á^R7Ç£ûí%5þ_K;ëv_]Uƒ½Îo¯²ë¾*wͼ*ß\{Sík‰uæ3§55¸ó5>?Æì7gMȵg̨›íkò7Õêc.÷çd ñq\|Fi\q)o |UóëçØï®­­›]cg/iª®k´Ï¬›íij¨ògÚgU龺ÙuUö{«nè´O¸ur޳)`ŸW²ü5vÝj›u»Þdw×ù½ ¨jtÛ½¾:tÎÆH x•ßî­ñÍ«Óõ·½:„i5ö¬ÙÈU`€ëð‰^¯¯É˜­ÛaÇ| é±x]ã솀ѳnjhjlÙ3êÆØkæUCwéÆ/]]ˆ»¹÷¾?÷’Çøò|z\×m£Œ:¬¢×Ìã ñÕaUwÓüƆ¦*wï T®×øìð¨ K¡ èÞ€nw×´ð0CÆSÓàí¡Þ¯03QYsÄÓÑÓsD§€”Œª{·Wo­Øg={ Å\½gŸ²Xy\Ù£<ö±«®V÷¹ÕŠ<À-¨w>è5ú5±?ýâ<ÔÅ~émÁ»àséf¿‹þžc1£gO‘à-“Þ#³ —[¯+|ß…¾Ðú^XFX¦Zn³ÜaɵL¶ä[þÅr—åÖ^3K¯Ë»8—& ¿w/φþôZCêOo)×ã´êµ&qNVÅŸA¨ûFúó|I_¿Ì–DRw·ñ x3ä'rå[-£‰ò_e;po77¼Û.þtã}µûÒí%ÅÓ²³Ê7ž+ˆ4°ÓÒyh›…‡‹¥$ÉËä‘"¯•×ÿXþ1ð:yðOä‡*Ÿþ@Æû.ù¥?IJš‚÷Ê5J!ð×”»€‹•p”ÿJŠÒ¦œþH¹ü™r ¸[ͲøñžO·èÀK8l /°üðJË÷WYVÿÀòàÕü …Md“Ha7³[€'³Û€§¨$©wªXW-VgÏTï.U¿ìP¿ \¦–;Õû€ËU8 €[ÔùÀAõ;$«‹Ôï/V¿¼$a#I ?Oø9) $ü¸Ëz;ÉÖiÖVR¬ß²Â;kÔŠwõÖŸXñüe}ßzø£D¬’èLÄÓSbІ'[’-™[Š-xŒm"ð$Û/€7Ù~¼Õö{àݶ=ÀOÙþ¼ßv€dÛs¶wß³ýý§lŸµþ؆ç;Ûy"oûÄvøS$OÑ$íxw»G{x¯vøCí,ÉÚGÉ©$%÷OBJòÐdÿçØfÎe)"oÄ܈¶gøXJ­ˆ›µÌ ¬.þÞZe¶ÖêEÛb ¡ #<¢mçïí­ß¶~x¡uðw­ß^býWàˆÒ3&2¢qp¦m<|ɶe ÿ|ÒvRøòÚ§µ§áÑ3ð‹{1í äAðepò`à!Ü/ÓŸ$Z%u«òUU“}vÈ×@SçøjæÒLOMµÊªôFœHØ-ß()°ó-Ç^Às4ÙL„çe»‰?3'Çïe¬¿“°ï §¸´ÈNMyÏ)&V0ÚRçÖø©Z´Ñ6ŠVç/×m»h—ˆv…h7Šv¯h_›7wÞ\:-Úó¼•H´VѦÅÿfàÊV6ÿ©}ŒKü÷ˆ`5ãÿB–&ÁkMüíC*õ§4ºñø |Dƒiñ_sF×ñ_À™tõyWë“I1ºÌû‰ÿܸ7ƒÓ³§\NÝVZHKi­£ÔAÛh'íÁóüKô¥“t–.JI“†JR®T K¥R¹ä“VJk¥ Òf©SÚ!í–öIÅß HÒ"¬*‘ÔÿIØ>ì<,±Âà#u£öÓ"ä,ž]žƒžãž Æ]§®µnEÝF㮾¶>\¿¼~ƒq77u“çóRL~Áàó^RÖÆ-»5žj²4 mÊn*½ÉÞLo¾·Ôëñ¶zWx7z·{÷{ßðžm¶63¬mÞË[ðS†¶æs÷½`p½Àà°!×rÊäçD•Ió‡“ÔOòЫȜ,²V*ÕJ:òtZ-»åz9(·ƒ–Ê+åõr—|H>…í’¢LV¦+^% zI¹d \’YJ,‹ÏržÕ3±µì¨:T-W§ô uø.u¿z×É„¬OÂë`kžµÒºÈºÕÚeÝc}/± qy’5imÒ“IG’N&Iºh˵UÚ–ÛÖØöim¸–­•h Úm§öŠv>ylrYrcòŠä·R´”œ”ü”é)¥)‘”M)»R!B£º·Ñ”îÃÒÝÛ¤O@Ÿvo“%PR÷a¹_÷aþ›Ýa7(»¥ÛC·‚òÐ3¥»€œèsA¦¼ } õ뾎úƒFá.snNLÖ"Fû]:OýA£ ¡@î0äCnv/ו I®ï:Ðp¡×C9(/Šq_þ È:ÀË@.P9(Z L-Ðò´<$´€zÎ.úÜ>>ë!Ìú3f=„Y‡1ë°ð©£EÀÅݧ0ë0fÆ,øbxÔËjfz0³ ÇzÛÄz÷— kBùßUvÑ "‚‰U»ðž ç $úƒ8BLºù¯Rþ-ŠKxËc¹˜<®{¢œ *î.–ïéž —v#·ýºG`Îäu$ò:y)_Ó½K º‘*ˆaäYŒ<‹‘g‘ñgñgÈÂ{åÄ=Š”4ª»K^Š»$)«ûi7QÊÄŠã ›‰5X£kÊQsÃA¼åøÊ!ß ùN¬éÁšÛ°¦kz¤óØšŸtÂúBX_}r2(µÛ#§AÏ5 Á ¡ kA×컑Êå1ÝüõUøYøԕÔ½0w,{–½Ë^„e/Br¬xyQ²ƒFƒÆ€nê~çx¿KPùàƒ>xಌx½Ž8½N#EîŒ:::skÍXtHÙàñxÐSW9×+#‡E¿wAË2hY-Ë e"Ž=M;¡i'4턖в9܉Ùo#‡;1k'ª{'fîÄ̘¹“R1ëfÀ¬˜u³NȺßÄ̘u³N`Ö ÄùMÌ<ø¾‰Ù'ß7¡á„ØMŸ×pålÌÕñŒØE6Ìéœ.Ìéœ.Ìéœ.ÈwA¾ +½Œ9]Xáåøî}YÌU‘Ó!È'!ŸÇÏcôhw'máꞈ÷1]Ýkä©T,ßICä"dãë »ºàlY+Ï@>gßÓí–¿ î‚Ì}Ÿ jÍÇ»¬9Rù½=w‚ß^ >4øn¡¡§T§Ðâ̓%ý1s­<ù‰Í.:¡¡3¾þÝà††µb6_» Ô ?†~‘‡Ð…ö¦ÖcÂ.¨÷žW×@k-îç{€ëç P‚N«|;üŸâ^Ýz¸Š&ÊðyˆE¢(ŠE#3@÷ ¯æÑóðZѺlÕ^¾r?á#%AW±KSXü›Ðã+á™À¬‹ð<&ú抨ð5ò Ëˆ­×f¸¯^Ã;å~—‡Kb±Ã¬bÌŠŠYFF¢r!øeKAÓ13¯ÂRÓ È= âw±:Fiñõcy5´0+㘙ÓÈé1TűxmUš^4šž G~'"¿Czä÷@<·ùˆG¬jfšÞ¹€ËE~×"¿²TùZäÛ^žã¹À<ÏM ?ú PBFõ¨¬Xù@ʪÅêk°rg|eîÆ}æê÷ƒŒ¨DåJŒU™ÖÌîeÑZT]§iUgܪ&èðû„e± \Ϫ±òåª1ªÑÙýGh=@ "æE¸»KŒ»•'v¯“bQ¹¨ZQ;üs4œ˜ß‰çŸ.øv¹vø¾< V+ìU¯¿5Xµº;ÅÌ$#ñs 3¾÷b¿™åöÙLýÌ}Ð?1Œš0ê3&-‹:oÒŒ~Ëc| ñ3΢yâ<8À¥dŸK"ƒÇp6ñÚäUõ__Ì:&fyÄLã$™nT['fõËÏÍbä~¢8)jÌøñÝf‰í;¾ãùj8î3µÇìiˆÛtLX®Šêæ6T‰3à€¹OP²iḅUq+˜’®´újŒ³¤çNá^c$æmltž¹’5‹ª+FÍ¹š‘¥«Ä·Á8±ã1ŽÅ×vÕŒ\á}\šÅ÷¸1òG#zˆt-"]Ü£Fz؇“m@L"~lÆ®w™uò€9ërÜŽ‰¸ÕÇ2Œ1îaxÌ’$aE…©˜Ýž¶7›uhÆó€53¦NÓ;óìÇrü¤—¡¯RÅ=V¼z|˜ô¶­ò*Y02Ð)VeŸ‹Ë£¼6ÐEom¯ÞÍ|ß}á;ùaâ}Yïwó2MÄÿc¼x·0Šøçácp)4—™™nÆ¥Ò-¸èVÊC>§àJ¢¯ã²‰ßºÒÈI.KmÅ_ót_’÷"¨ÒgáãÞZð X;¶nVœä]ÎiðÈ.­†]ë@OúÊ„]œûÀ]>/îÛã|‰o± Õ¾å‚r}«@ká×rïÓ ƒ¸?ˆû'Áú:òuÄñ{†ïÍVß>AC}¯í{«9ÓgiÎñsšgÁ¶÷|IÍß;Íå¾SÍa¿‹Aó¿Jã¾1h¾äÏõubN'ÖíˆÅ/Fˆ×yÃXÜšÛ kÑe}Þøé7ä­¶y«„ >ßÀxÿ•ã=㸜Óà˱žÔ+÷+À9mê%“áݽ[|ù BàB‘-ˆïÑ3?«¯ Þ·ÁÈlr›¼ÞÌ_=âÓ"òÙ3›'N+£f®@þ\ÿ”æYþ)Þ'áãQpNfýÓDl¹LdŠžföóüñu4ËXç=³®y}¯¿hrÔ9Æ–£W¬î¿(xî÷€ƒïŠõ‹ú°£68¥ôÀz`«ïÔÏk‚rOŸoXód_qóTq?°¹z/ç*¯¹ñ?-rpVÐßYQ_œxm,5©Í¤•=k/¶±ïD ùã>|8hTóþõÍýc‘›õÍ›Á<¸ÿVá×~sŸ,ñ­Ç>yDÔý,ß…æL?‰qNÙÍoˆà´ÎÈqs#öûÀä^—þ°¨ÿZøû y¿`Ö¬Écýà±³ÁŒƒ¾±G .^¡oõ·Ú<øÞç{zƒ±§õ¥¨³nô•¸_s•{Ô„¾Uïâd`§˜_úNßvNq?y œ‹ß#'únA>ß[ÈÅ<GØ_ô½È#ö)Ï­à=ξPqÛñêbŸ\’øÌÒ*>­LŸ)¦ˆOSÅçˆÄ'ˆ×ŠÏGŠO ¯ŸØŸ·eAËä÷åÓÐ2BA²2RIŠr£2†,ÊMÊM” ŒSÆAûxe<%*” ”¤LT&’M¹YÉ%MyPù¥(ßUþ•®Q–)Ñ`þk}t­ò}å4Lù¡òC¡üHùÙ•+?¦‘ÊO”ŸRºò3åßéåçÊ/(CyTy”nRþCùÊT~©ü’Æ)¿R~EYÊcÊc4^ùOå?)[ùµòkš üFù å(¿U~K•ß)¿£IÊãÊãt³ò„òå*¿W~O·(O)OÑdåYåEºUù“ò2MSþ¬ü…îT+‡©Hy]y“¾®¼­¼M3•cÊ1º[9¡œ YÊ»Êßéå}åCr° –I÷±)¬€*Y!+¤:VĦS=+fÅ4Íd3©‘Íb³¨‰•°ò²RVJÍÌÁäce¬ŒüÌÅ\¤³rVNVÁ*¨…U²JšÏªY5™›¹)Äj™‡Â¬ž5зX#óRó1¾ÍZX±0k¥ï±‹ÐRÖÆÚhkgí´œ-d é!¶ˆ-¢l1[LÿÆ–°%´’-eKéûl9[N«Ø ¶‚~ÀV²•´š­b«è‡l5[Mk.ú[ËÖÒZ¶Ž­£³‡ÙÃ´Ž­gëé'lÛ@³l#ý”=¡õlÛD?c›ÙfÚÀ:Xý;Û¶ÐF¶•m¥Ÿ³NÖI°mlý‚u±ßÑ&ö8{‚¶°ß³?Ðcì)ö mcϲ?ÒoØö<í`/²éqö'ö'ÚÅ^f/ÓìÏìÏô$û û ýžf‡i7{½N`e¥=ìMö&=ÅÞfoÓÓì;Fϰìíeï²wéYö7ö7ÚÇþÎþNdï³÷i?û€}@؇ìCzŽ}Ä>¢çÙÇìcz}Â>¡Ù§ìS:È>cÝô'URzEejýEMTmôšš¬&Ó_Õ~j?zCí¯ö§7ÕkÔkè-õ+êWèmu:ˆŽªCÔké˜zšN﨣ÔQtJ­Ž¦÷Õ 5ƒN«cÕ±ôš©fÒ5KÍ¢Õl5›Îª9j.}¤NV'Ó5O½>U§ªwÐgj¹Z.)j…Z!YÔJµRbjµZ-©x×8GJPëÔ:ɦÎU$Mõ©~)Å–hK”RmÙ¶Ký5Y“¥!šE³HC5US¥k5«f•†iIZ’t†?Òp-EK‘Fh©Zªd×Ò´4i¤6@ ¥kµÒõÚ`m°4Jª •nІiäÑÚpÍ.ݨ¥k£¤±Úhm´4NËÐ2¤,m¬6V¯ej™R¶–¥eI´lmŠ”£MÕò¥¯jÓ´YÒ4­D+‘îÑJµR©Dshé^­L+“J5—æ’¾¡•kå’C«Ð*¤oj•Z¥T¦UkÕ’SsknÉ¥Õjé>­^«—*´­Az@kÔ¥J’äÉräòûçšé Y$Í)w˜x&x9¨šhN%¸Ç¼çÔhò¥ µaN)ø"³?F+Ak®è»LÒ×÷•&¯´´Ù¤­èoïí$ª{ ô– ©îðS ³t-M¦Bó×#Í_\MëñT»vÑ^:hþöãÉ"¥Hƒ¥ti’T(Í"ÅÕu_ºkç}®Ý÷áäv-qq­sjs½áZé:ÔâÚçjw½ÔàÚï ºU»º\×N 2×vW…kÐL×W©kPk£kº O+®<×rW¡kP¶k…kŠk5Ðh×W¦ëa a®VWºk1Pš«Ö5ØÕd…ÞW#Ð@W‰Ëâ*Ò\¥Î .ìšê<í* ÙyÞ•ï<î*:åë|Í• tÔ•é<èÊÚѽ®a@Û]Sœ»\ÃÉâ<⚉Yp8A‡ítôÎB¯Ãùž«ÒKœGœ+œðßÙæ|ùÈyüÿØk"ß÷!ñMã;5‰âû,ƒÄ·Q†„¬´ã™XC¾2‰ª‘ûê­ .“#÷Õ»‰ÜO‚ï5ï9=gò“ —@¯‚Þ7ûbttþо/£KD³- $“RAAx~›34Í$ììLgº3ÙåœäÌsæ»SœÅÎç@ç0P¨Ðév–Õ;½à¼mq¶âjw.v.w®BO»s-®õ¸;qvÔnªÝR»­vG퓈\ÄÖËgåH–?F.,"ªÈE‚È…†\ÜŠŒÜÏHdä¬Þ‹¼ y¹Nu©.¼tݶÙ¹Áö©í3ºÑÖý¿¸’Dù¤‹\óïCÄs+òú\ï<â̱–9ÊÊAÕež²Æ2½¦ž§CþPþ–ž“Ï‘ÄòXÉj‰ZB jÏIõ>T ³ýÒöKRm—l—(៚#¥ºã¤I»gPíäš@*H#9ÊóŸ  Êåö¨“"“fš283ùÈÏ=Ú]E ™ RÁ g¡ÅŽVö Þ‡3"ê3 }µÅàAs>§ˆI\v!h‰I+@«ãò—mâv÷9>¡‡æDÌ9ƺ4g¡ãrrtٷ䟠¦ÿ1Zm÷yhSœx¿Ñ·Áœ·NqÿÅ“—_wÔª¿uÑŸ®ÈŸWÄêOœ‰¤8jƒ)‘þŒà€ÈPzì<íŸÉôgùó#9þ<ôp{d²??8:2Õá fB¦ýþth˜.ð,ȤDb•éŽmÀåПÉôàdô, NTû‹!é=þ’`ADw N„ýeÐßæ¯ð·c74,rl Ί,õ×û3"+ýAGdß+lh lŽ<,Ú~7zù[ƒå‘Íþö`ud«qÐ;x ÜéÖ#;ýËýë#»ý«‚áÈ^ÿÚ`[ä9ô7ÂòUÁE‘—üë1·¸–¬ .¼ê$¸2ò†¿#¸që >ü­‹"nÇѳÑèn†_Ûƒ[1«#Ø|*dý½Û¤x{–÷8¶øÛ£ÿ…Pj4éó­N¡ÑT] ƒw“BéÑh3¢ÃüÞPghr÷ÅmÞÕZ] eAÿ®àÎÈIap7¬måGÓõ4ôgøóîªzØ¿>vŸC»'øR¤@*Žæé£B%Ñ|ØŸÍòï •A¾#ø*dö™ØkàxÏ Á7©WОñ¿<9ï+x2rÉÐÙ«íòëž-°>6‚ ºÕ¨V=ð;¡ŠˆÇq$äŽìÕ³¡¿MÏE” E½¥p¿Õw‚—  ‘/o¨02] k'éSBõ‘©~wÈY£O µDv;S¢ÅþUˆ‰^j–é3C¨4½ô2«û;B‹aJŠV8jCË£nÝ\­ÇZ/a¿lCõêbï`G„VE½º+´£¡õ‡ãP(/Ú¢g‡‰xôÊPG´òŽHŠ¿Õ±‘áÕ›âoÑs£í/‹ŒFŽR#:l0p'pmh{¤xVy1/óׇö n÷™8=rFonŒ.Ö}¡}ˆLп+ºÜ¿6ôBt•AÿZàW¢ëõ…\§¾$ôt.4õ¿Ìç®ÕW„Þ‰ê«ÎåØá BT×…ÎFÑ7„.Dìú¦àsÈÎáÑh°"&ÜÂ-aŠá†7æoŠ Ð·¡Â—úßù¼ñ\äE;€ËŒ¼†Õh§¾#ôZ´CRXûtXƒþýa•Ç?œ|p~0Ú® ŽìÖ§…‡£=„pýtp¼8´Gëõ‹|¯Ýã_Îvà4›ŒÜí.ŠvdXR`äBX žÑÖÀ™¨7žVu60€W;¼³ þçD=´†‹¢¯ÄâÌåõMfÌózÄô źnqòLØÃ3£¯F‡K#L¾¿ôuá)Ñ·pâ•E6ì ºpZæ-؉Qû‚Ýï8Þß’Þñ´¤Âò·ü…ó)úŽcG¸{¿vqtäQæ'ÛEÇ–àôe}ö×è– žÃ‰—¾ˆ~œ±Z[†…/¢?}ÁKÈ×>ŽuŸ½- ^<Ü’µà qÞn}0E¿è_þ` ?íÀÏØ‡¶L¶·ä-8Ñ[òƒ9й#¸ôÁÑ¥oàäw ÿ$<µ†Õ3ý«œy0§¥089šÑR¼àd ;Ž@>ÇßÑZ(NѤ¶Ú–wZ‹‘Ù‹­%¨ü=­ÈB ßãˆdk2µc‡/\=û—F–¢Z¢gqš©Ñ x Êl#=7ìÃÙž¶Q 'ÁhFxadV`rxIdj`jxED=Ž@Axu›êÏ ¯ƒ¶má"†ì̹àXÞÐFþôð&´Þð–6-0=¼­M Ì ïhK 8ÂO¶ F4꣯ ûOG_ ”‡÷· ÷»Ãq ] jå8(ˆ, T‡´uÔ†Õ¶lþ*6ç*ÿhô€'ü^[n 1|væ…ÏÁoøàœ ˆÕEÏi1Î"^ÃÑ–@g×Ù@›ßÝ6gãªÊ—PÉ™°¿ÞQÛ6ãèžÀ¢ðj¼v7'·–.°¶Íô»Èm¥Y8’+ƒKÛ\~·W[%N!œ„Ž#°s¯y«»½, mÛZζַW´\hõ¶»çSkK{ý|µµµÝ;_kmooÁÜühçü´ÖÅܺ¼½uþðÖUííŽM "Kçj]Ûþ_ä}XTÙ•à}¢~ñCˆˆPiš54MÓV½WÆaÔV‹ª ¡mBŒ1Ä¡ùQÐPü*×qŒC ¡‰ã¸íã06Ë:.a1¶ã2~|ÆØ¶ëCÔ¸,qX>‡aýÁ=ç¼÷ŠW%´¦'›æ»ß9÷¼sï=÷Ü{Ï=÷GýxêÒÞÙØ6R½ #bĽMk•½pî²`7RÙ0Úb„qŒn>8z¦¯1©µ¾¶psmäl;<ÔÚQ{¼q}Ëu˜#­Ar:b˜}ájoÍ·ßhÌ‚V`]±.˜¡g‘¿ÑÓâ­=Y}؇OÛ϶ÄÔØÏ¶vV{jÌ­ÝÕ•¹°:{ Zî•q)I lni_‡’/66Ôô6nKË«ÞØzªúp£½åDí@ueˉêõ5­gjÏ5–´ž%Üê=o³u9ïÌv5ÂX€¿5í:O³i¸öRõ^œSµ{v]«iÜÓ|­f¾qOk(¶K5îƒÑ -nûCûhsCíµÆè˜éÈvÓ\»HøJuŒÂ¨„koÖŠ­U€ËZ+joVoj¾W{§± ×AÜ•äØÙ–6–5ÔÞkl(…5b¿ý¬½ªõêÙrµv¼ú@ëmð0£`ùcöƒÍ#0‹#›Õ>jÜß:Vû¸ñPëÃÚ'GZ'kE Ö.4ö€¥•5o|²u¶zSãéæ{UãÌ ÉÌ4ÜÍahË¥5¢ ¦,°¤¦ö*°vÔ$‚??[ŸÔ&"ÝVHôöÚhXõâí·!µ Ï mv¤ÛJˆ.SÑ{(O>Ñûˆ_ƒž­­Á]ëÑ-—%öxpqÃlnku—6Œ¶í‡uÁÞº«¦ê²»qŸ_ƒs¤íéïÞ‹çw%ñ«€„ø=”ç8Ò­kÆêãßš½ÁéÖ³5;pÏævÃÀMùO—ÔVR ôi™®D pö)i w{v{í°Þ!¤•´#ú<Òà34Œµ]‚Þ~Ò6â>и€´Gôa±íš»ËÑv³f¬Ñà`=ýaÀõq{[| 3h°ö«žXÊÁ7ö/Ò_›s©Ž6–´Ý«™ÇÝ'€~Dôc¢ŸÔTx }p†±wxÚj¦«½°¾÷{¼÷ ¬G#tÛ‚{¨Úë5º/xLÍ%îË5Û¼à¯Lm°k=2‘¶ýio ÒÞ÷Õ†¯ wM­‘†>–Þ¶šZs¬× +é¨7Õ}½±¬M_›„'A{³'µYoï®/ðfTŸð¤z³aÞ4_s¬&Na@Ã.hožÛ;´x¤Û²ÀNà¼Yc®I¹ k™wcmäÙ„t›è-öÛµb[|õuO†·È}Ë“ û‡»ž<ØoÄx6Âîâ{ªÅÛ~ªýL{oݦ-^ÄíöÛ0.×Ìטߚ¡µiKíéÚ‚–[nMckË „ëv71ï床&­÷j]Uýˆ÷z]}S¨÷V]sS¤÷®tF®ë¨?é}€'Mïž"½Su›âà´"pél+ŸjU'Vé¬*Rë:›ýϪÒi´®»)Å;Sw¬)Í;W×Û”ÙÎêN5™aå=Ӕ߮­;Û”kÉ©n²¶‡Ö]lÚ܉õ¶ÇQ½ç°ÞöDù4sêžÛSP“ö4ÔÄ;³¨I{¦Ü ÉCÂI¹ÝŒgäö|©]xroÏ—Ï×à—š{pUjÉÆ¤ÝŠ+Hûfä´oÃÓzûŽº+ÕÞv—$ wYí»êF›¶µï®»Ýäj¯’o'èÆ n¬¶¬½žî"¢ë6íjo–ï"èÔ_7Ù´»½Ã>ÜT£,Ý9H§{éVÎïõ|ÓÁönùÖBºhé¾Jµ©›nªjÓ×Í6Õ·¬»ÒÔÜú¢î%Ý:V¤û´îÓl§îeÝËÌ®{E—ÁŠu™ºLæÔ™ufæÒåéòØ—tùº|V¢û¼n3û²îKºö¦®TW ó…cÇ`&a/›ðÕbÂ.vT=å G„á¸pR8- çÎ —„ášpS¸Ô=a¿0.<<ž ¢F4ŠbŒ˜Á$¦Šb¶˜'n¼IÜ"ϼR±\Ü++E7@¥Ð I B«P&ìö øêyNÿ¶¾–~ýiôë­w d³ŸBÈa¿‚`†Yÿ¿Ø± ¹ºíºíìUÝNÝN–§+ו³×:f¤Ï6Ó˜Ž±ýƒŒsì…xàЕ}ŽR?èw”ïtìÝ9䨤ç ÷ÎËÑÈ¿êðé˜Wɧ”SèëŽ+|”ßr&ëQêÂø®£Ë—¦ÀÇQ¿rHcý#L8N윂ú§TmAzò`¬ä{PôQ P—ƒ9G饴å)z¡.˜Žýƒ|YG;[Œ ´·¨œЬ)y|äþ# Ó ÏØò˜)|ßX  ¹Ì—ý¾ñUôTÆHá©Ò쑎A_ßb]ê:e]ìqŽ!ŠHÊRb¥n|Æñ”cŸŽ˜ã‹ò–*¯´Í§8.SýiŽ«Ï´A‰uUêRtQâ¡EÝH¾bó¶@ã¡æ)öÒ§²1¥œ2™Žë~u(qßÒí÷µ»/ ÿ”g´á+u7H¼ÀØ×n³ã–=ßq×ÞáL±t¦-Û_KÄÅ­/–®ÎØß/cyßs`?Œ×ÇÄ4~òsñ~©ÝËÅJ¿öuñ!©Ÿž/k_J?(íPÛ>Ú„Õñ@sûfÇÍ-¤åØç“å9hßæ˜òåÙá˜Ází.ÇœbOö]NfßíÔúúK)+Û¨½Âêk#æ¯rFÚëqöfg"ñy;™ön§ÙçkåØ~Ì™Oºô:­>{E_£ø>,{ƹÍ~ʹ™úð¸+¼ø¤+ºø´+¾xÀ•T|ÎÑU|Þá)¾äZ~Ÿ±LñøDô—c¬ØTÇ·8Þy–ìþÚb¾1¿éJ/¾ãÊòó—?Æ6µs;ЦüÕ3~Mî£â{®ÜâqWâCйÄâÇ®B__ø%_›»QúUÕ§~<ÔÆŒúá¬s‡}ØéR¯§ö‹Î]”ïŠs·Ÿ,µuVØo8«ˆ¾í¬§þW@‘3æl¦ø¡ÃkŸtvا©ýË€}ÖÙ‰à[§e°Ï;»}Ï8>¼óX±ÞÙ«^Ëç°Š£gpli|×e´[Ð Û‹m,NrÖ¯wSùtçEug9¯ç:G‹ œ7ŠEçíâBçXñvçÃb»s²¸Ä9]\æœ-Þãœ/Þçâý|¡ÚÏö-a?K¥ÄÏø‚~ÿX½n> ð êzýÖ¢€5É·?PæIàš­ì p=Õ.¸ös0ÞJLû;ŒŸ×Îe|­Ÿ-«bß¼é ˜Gë_ÿ³kßšºè‹–Œ—ÓwÊ¿?ëSÖÊÀuõ™XÙ[ .cýªý(ö÷7O|³Ï7Và¿‹Ÿ¸¶ã\*^pÙ‹k\z‡ÆU‚àçïÕsä;Œ®2µŸñÛ+óO™s²>Ž×GŒkŸ#ÁU£ÞÇâ¼Ãù§–ç0¹–Ü{Ër©®V¿}v ?’}‘#õ߷'Ræ:ÌcG¶ëߣ_åë ¿#ÏuD½RÒ›ä¾UlùJ¡|̳ÑÕƒ§xý·ôÉXÈg韣þ9äŸþÃîú?ìýJp{J÷(oÒ=Ê[Ú‹Ú¸.ºAé¡”^ºA¹A7(÷éåW†c4o¥{‘Ût/ò?é^äçt/rŸîE~÷"Añx/”Š÷"Að^$(ïE‚> 'Ú“ìôâíAÎ0Ûœ33›3oæÍzs¸9ÚoN2¯Ï¹8ÝŸ3læ²Ì¹æpà˜EÈShÞžsƒÙP’3 ¸ Âó>s¹!çJ¶ÉÜjÞo>d>’3š3jî17Ÿ4ŸÎ¹Aá6„a c9ðéÁCÈ=–3‰7z'~2àlÛ#ÒÄZàT{«tÎÍc?c7à${ÂëÜ?qWYæºæC¶ï« $ǬTÕÞ+Ìš’cPã$€Üþœ‡ê öc»±ÍéÐæ\ÀéÐò‡ÏN:–ƒŽ±ô[DÖƒÿ ‡³tþƒ4 Ë`ŸaÁì³, Î×9,—@'‘…±MÂÙf+X!„¶ÂJ¶}4ý"+bÑ`sCÿåÏÜV³f ¬Â6 !Úþ![Ë…sá,™¾Ú¼ØV‹1(Ëb´DXb, “%Õ’aÉÎïÍ^°äY6Z6Y¶XŠ,©ffqäwç¤Z"rL–RKyö¡–½–J(áξSðÀâÒ©¯åàÖ˜ìqK—åh~¯åÄk·,îœK¹¥ÏÒo„zŒ–!¨¥F€„Åp+ûŽröZ.[îB)J°¸åðÀrJNd¿6A²Š,3–9K¿ZRLPëeËUËuH+¢Z0¤B[Ró»-'@ïAÐ:á ³¥rNAk=ù½V­5”Úà9{­‘Ö8¢¬‰Ö‹)ûŽe£5 ¥lœE ›ä8ò«Pº5ÓjÎI…6G@I¬jÜbÍ·ZQ®¯”¨è€`Ý q6¤€ÌT¬Û¬;`<¼– «ËºËºÛZa­²ÖCh¦úIkÖ¯®ÁzÐÚ)µ(C%#¨½E¤Û³°¿Èbx?ýý@àQgK— Â…hŸ†*XŠæ?Ô²Š,19 ¢Ã’!Ä‹¥ù¯ßÄûIœ9 ë1O¬ê(¥¸Eè¢xXì‚9ë°Îƒõi¶VÂh§ YB.ø‰[8…s >[C!…B¥¿ _¡°]°S¾TðAÊìq—g‘PB·¡{¨_qÔó mdg z¼'Ö¿– 4X+€c#´Z]Â~áŒÝ‘g,l›€æ½Ðƒ€÷»8ÿðŽc…Æùv}N8ôZ*ÞûZg¥›_Œ•qÍ1å$`^yf摯ÀÑ$ß‘m9šÜ²`n—ƒõƒíy½­-ΖhK±¥‰GŶL›z0&ÇhÙ˜“*ăMäC¿»¡_æ /ºÈîÑZ<6«õŒm3qºlÛl;l.Û.h‡Ç¶ÛVa«²Õ·ÙÖa;œN±Ò¦µuÛŽÙzmõ¶SÙw^˶±µ [Ø.¢gJp,Ð;Ù®ØF±OÈ ù<¥ô²Ý µð«ÿŽvP{X%Ý™ã泌Æe`Ñø£¤Hq‰3R ¤etfdB0gtgäg˰fô}*c3„mg2vÏaWÆÙŒÝï eTe\̨ϸ‚ÿ2©S¿‹þEÓÆ>ýúÇìO`_±vZö ÷B Ÿ¿Ì¢:ú˜4¢Ïº¬³Œ³¹{}â]AYÖI˜cj˜˜˜—ž@/§æ†DÏËyçÊÉ4ؿēù$# †¹,•™•ë‘ë¢8i1Í—g½9’5/óÒ—hˤª-úßxÔåã€üÖüb|ý'ë‚éØ?ÄŸÐUî³gêŸWªŠnO«úWé‹Y_=¶JŸç.êçÏ.Áø@5Æú€:]D9.Té0é_7ÉZ¯ŠÕrâ?¦¼Ò69†µ@/û2úê—ÐU‰çtš¨K±yþ9 Û‹ÚÆ|ý¡È(Y¾®%ÛØî@¢ßôÙ«Ì Œ}yÊö œû˜þú}ÅËõû ÆKÎ¥úð9±¯ÝωŸéc¹Ÿž/ÛŽIÿvÚìCǼFž[³‹±oŽ+²TyZåzö/¶ö ¹ÂU}êú1îñŸ‡°ÉNœ|~Â×÷ç.©æ¢Èr¯©tOWÍM,{à¦ô,öô  \¸ pU ?ˆÏT}bÒ2óc©¹Š²7ImSס¤ÃÞï–ó»ÏK÷‹_Ô×)sk™µgYÿh¯Ëù`õº¼DŒû9ó€ø¹z<Ï÷NÄKÌŸ%×ÿí¯åâO8>Ë­™KÖŸ¾L¿hËŠOÙùX5Nà¿Åy.ÍœÎ÷~þ^=×A¾M«âÅûÏQßüS本-  Ne'³Ò¼Ãù§–gKTùÁ@ÙÀ·¥¨Ú•¾„޲/²¥ ‹ë2×aÛ2Ûç·ÎÈuÚÌv"§Û¬þ6«ì“}mÅ<ùB.~ï‰ÞrÀþýœ5¹NüW|Ê…ã‹E6  \¸ pà:À-€»&¦fæðGã2h¥6³J7”oØ»¡rƒ{•}UÉïªÖ |á0r(Þе*kÕ¾õ]Ü»ò¬*YU¶ªlÃQÄKÔ†Ò“œsφ¾Ué{P ðúUa¿ëùì7}éÍz§Ç§èÝ1ôîŽUôÖŽz_ÇúŽo}Ç÷zGÇgéíÙô^Žz/‡™ÞÈ‘Koäx•ÞÅñƼ>Ž‹ä¤oͳ—K-Øv€€29Þ° F†9nØ/Ã!ŽÈq %²¼ã'eè‘e+i¦ ü§|é/§êcÝ/RצýòD§ÒÛ!é›ÜŒÞÜ"½³%˜¾Ém¤or‡Ñ;[âè=- ô†–5ôn–$z‹‰Þ¾²žÞ¸’JoYÙ@ïWIûÿ&—cgØÙÅÏ€ÖxØÖu¹kN`XW°®l¸®pÝöu…ôlÇX¢!.YW"å‘Oañj ˆrÈÅà“¸8>yjI>9e2¯pÍaŸ|»Toùn|&‚ÿ¸õŸðÿÈùÿγ—´uÚ:& ÷dbÈC.2½) R~'K²¯¼ʃíð}ü0 æÏƒ¬x*“9bËý±:•qøÖ%Äø6!–Ë T9"Yd\s\óê¸äÉäéÕq±ÞÕ‰«­"W§Ä\¹Ú¼:Ÿdà§ÉFþûü÷¡î¿çÿ8ïóï3žäYÿü?€fÿ ´ †60=µÆšýˆ…„üô‹€w€¡»»"¶,YÏØZþãÁ¾lg*d[We›"’:M1ñi¦„U©&Ó*“)u•Û”±ªÜ”M4‚Ô—|Í´‘à¦iÓª-&ã*£i ò“:LE”Ê&ß19’ï™JQVò¸©|Õ&Ó^’›eJM•>€:Ô2In‚iÐ@7@Ç•Ž{“L‡Qo K‘9G PŽÑ´IÖ«uöRÞE}P>¶³ ø Ü ÈÓO²¡mqã&7¶/ù‘ɃÏÉMÞ8jã“—ÆßÉÅè VœÁeø2ã ov1­¡ÜPÎô†Ý†¯1ƒá놯³ßþ”…ª Õ,Ìà6Ô±/lÃ×Oï enØ·°äp¢ð9I…^/ÓkÀî“s¥X É*:±ÄsÀ3— ^8ñÛ››”艋‰‹INˆKôÄ†Çæ&݉»b· •tžÆÅ¬^smíèÚÑØÜµ£1³1³IãÀ¯Œ-ƒ<±Y±Ñk'×^ô+I ïµ7b¦¡ì㸘X}ÌX}l8H/Tê([{fíp²qí0HÔ#@¾i?HZ ’Žq11c’N±ÖN&G ¾Pèµg@7ÒJÎÆê+A³ðä ¨= xY‰È«÷é3ú$݉™Lô$›@‹Ôµ£‰nÈ››s#f,éIÌìÚÛ+7ábÒBÌÔ«OÖ@ÆŒá(ñßâÁGóïòï2ÿ=þ{Ìhpœ`¥†R°€¯¾°×°…Þ6¼Í¢è­cÑ!3!3,6d6d–ÅÑ{ÅVýN>ΰ`y9ýÆÄEßeÈ—=½Ï™5Ð78¶I•/‹íÆ÷æøòqàþ ,šDõSm‰T¾kXO–ÎÈÒ5déZ²tYº,ÝH––îfa$ ÛÀ¨ ÁÔ†u¤O·¬w?Õýñ¼¤5Ç.ªx×d½Õù†IkŽUÊ<ü÷¬Kßc¯Ç-Ûj-Ib$‰#IÉ(=oÜ—Ó»› ©ô–xÃì¤Êö$Þ>yÕ¼#ò(*¼ß×¾È(ü[Fy©¾Àw"Ò®ßÑÍ¢ó|°5: ]-.„'‘xÛ Kt¤fEÛ!F—Ð3ÒYrØ!+zŸ Y‹£¦£¦£³|òIj9vŠ1¥Œêß.=c[ oÞ‚6WÀÊ µ´€^›Ø  üÉfÔa€.¶5ªBán_Üé ÝQÇ|t/À‘}‘ÞÈr ªœg"û”gIÒ1Š%óI’ä윑8‘[†"‘CQ§¢N!ŽDKå _5ìù¤-Œ„óhä¶5r,òaädätälä|c}TxT4ÒQñQIOG­J^xTVTnT¤‹¶¥‡<ñÀ£@åg‰Qö¨Âú¨²¨x öH’öÉr¶G>„4à@J Y”RH-,3Ôüëûÿ[ä]¥y¸ÿ9ŸËârÙ%xîñã¦rä…½~ÜD.…|y…7š‹g­ðl÷ã¹úåF?.ã´l<§©¸<›¥}v´·Ø¶çÏðH¾—rü-ßžíü`gÝÏ÷CÉ~úfˆb:蛟0=zÈÀÿ”¿þçÿ! ã?â?b+øÛümÁßáï°•ü=þÈüÿ+ð9Ã!Ãàs~»òOÁ®üÇ`¸·ÿ6áoþÞ3ô·UôÝ¥¢¿+ÓÐv.‰ƒörÊ{B?M¼8.ž¦ýxÖ~×§çÂáić=ÌÁH«xì [€§~¼ièuÖ"5o‚MÑj¤æÝcãðTîÇ“~gºÝwl+ß7â·H¼‹ìŠj¬?Mg4WF>™#ŸŒÞ¸‚V<¿^5ì}¦W¨øß!ºLE—ªzþ[ªžÿö"-çù®ªìwU2%ú~£&ÑØ}«Ï‘RkRsƒþÒ1¾ÇÊÈ‚a·gôqýüMèc€'lkèLè\І…†E†i)Žƒçİ¡ai€3ÃÌÀχ ¾5l3ÞÑ@Ø%ÇqTN"!Ÿ6, äìc&§fT…m£4©4Â6 )a;ï wÙ*û†=Ï„s;¨…UÐn¶òÀˆ ®Ü¸#Ó÷Æ%ˆŸ¹I[Š¥R¼òôÚÊ'Òs„•m5V›WòÆŠ•=+¯<¹ò4„ãÆî•À‡°òœ±›¨Èuòœ7j* '†s+GVŽP¾óRJù$^#‰×dy›IJZ”sžŒÍ!…’¹ò’1ßh5f®0æÿÞv> aÂ䊆ðYàCŸ×Ý¥xZwy>¶‚×m¤|Ó+¢W„¯Çô¼¤R'W„ËòîJ’Tr&ái`RÝ+ô:¯î€Î xPçýƒ[.¾wNµÀóŽv¡ò·•ðœós4zèƒGžæ*>9¨CÛ ô¸Çv\w°ùºóŒÓ4ßÏ<¥;ŽõÝd\ð]-œ’5ñˆ AŒÓ%h¶çv?ØHi0òOq…G 9Àÿs…^¨ÄTZÆ%ú·w0bM3òùó”:‡ê¬ù*ñ§ë*z_ÿVó "Ä\úÓ½¸SÐ]G¬Ç³à¼.8ˆµCD'œ‡ûÂÓ:¼ Ö÷P©Õ¸Néô„(õ:ѸZ±àiÄÚ]Ot8¥æ'š8'‰#•‚ºž^£cX;›CÙõ9[%œM÷w Ûþ4 e.ü‚$4?F¾æ´úÊáþH uñ?!â ˆ5Äá+ˆ3AõF!Íîç*áÄO¯qvÀ— sh?xwŽÿ¥’‰3‹»„òƒÀªƒ^Å“ wÇö^BÌ?„™Äñ™D'úÏ‚6CÎP¢§ÿ9ü{„¯#‡Ý'þ¢ç‚’#ôâŸ'Ü¥‰Gšð)âäPžÃDWv ¿Ìgã·‘&/Î#=MDã[À -šÄDß—8X{ÐnÊóañ§©ì á5„(õ—ˆŸC ûÜG6y–ÆǨµ ÚMt/Òšcªæåùµå=¢'ˆ€F952ç,ÉDÎß Í­¡ü¡ˆƒ«)ÕN¥.Ržw‘£ý?Äÿ*á R]Tv°´ EÌHäÕ×4ŸZG¶ü&äù#*õªÔ"›IcGÜÅ †Þgd µ%ÎG„?‰è‡„Ϧ“-ô#â2Â"aÇB ŽÑoHÂo“ä(¢éÀý€°N¿&:è&0—ñ®êý:ö®Q\½ßrjçu?ý‹Ï]òù=ôþİ:¬¢²Xêœäc©Ô{, ­Rÿ3qôˆ5Ÿ'Ϋ$í‡pvã4i²‡Z=Frn‡NçZ³ÌG<òA&ш5íD×Þ£ù+¨åKšÇοŠ4_D³²•ðCê™û4ûÐ&à§9{ô'ÜC›®ù5ä¨ùpþe‚‡AÉ¢'s3Ä9OœÂEˆ5ñÄ_Oœs„JøˆƒS)Ï»DG=@t=ɼDœ-”¿‡p%ñÓ5'ÉÇî$\Jxb>rvRízÄlŽ8$Ï”å %*»‹èr9ÝÁ"Ê&ù4FÜIªñ:µñ&õÀ&)ÿÓ»„Ðî凨O°u„§}ÑYİë@Î¥ž',†ð=ÄšfÊSD8‰p(ñ·Pþ÷ˆ~@2G¨Ta¥$º“JURžù`7p²³!µå¾$ ÷Ø\©¤‰¤'õҜėó ä*;B{ò9Ú †–†âœýí)àüìéÿ¥1-GMHZ:Z›¦²Œî®R?½öôŸ?xzi™óä õ!þì}wXW·þ>³gÏ9Àˆ(ˆŠ ˆXâE, ‚]TDÅ„QQìÆ‚5¶%ÆE¬±X£Æ%ö†%öÞkbçîýÎx>óÝ|í{Ïïyî“'דּöÚkïY{­wöÌŽ³ò«’˜žSòÙŠÜ0C~=ž-J9¸¾¤C?\; àj<îNð,ð2°&_ÁmÁQû'põ×4G€oÄ}„Ð6§ë²6+'ÁÛÀéð.®\d‚a:8ä:P‹ß?—“³ÇÁä9ÃÌ·Ì› L…Ƹè\ŒÖ­ÀIÐt¾‡& ò!Èá@Wà1T‚ü6¯€ƒ€nÀéÀù°4OA…Ü{õòÑP¬2G‘u‘»…†ó…È™J8Ó ¯"b b2(aWã9²ìcëtž™…:šWÀùˆç@´2\Iý€ 0è…«óȸ {踔ãx´r‰ÂÞû¸.Vì8>È3 ï¾åƒÈÈ…ÀýÀkÀ¡b¯%çCÖP|# E^™ß•<¢â—íÍàfhº@^Ôìq§/Ü8¸xDÌMÜï¿Û-®€ï ¹¤½ö@ÉÆQ)Ê|ääÓ@ÔÈkÈ“M€£¹Ï²%#P#G€s8ë’ÀÏ€¿7ˆøƒÃIÉLàW@MS¸¨y> \*ÆÒžH¼-øî¥`³’ßÅΙ0¸«üYÑëŽ732òG,z‚ígA ï†ïFd¼£C ?k÷â:Âyx(öù;|·Ó±ÃW™µ°LÂæ@ß\ï;ŒÚ7ݶO§h÷5¢U{sD§Áó`Ýs¼x~ Zù~]à±÷cqE›&,…,+À ©$Ð`¯Ýïàj2^ÄÏa¨¸+Ä(1¢¯a8p¼@~'&ô 5v‚¾+ô“Pí¼p?5Gèé*´6‚ÿéà8DéWaIU!³<èñþRÙ¤­—heÛÊ…ðy£´×/>:×Heßã^R÷ÔW\ì÷dÄVBÌ#[¡y«ÇSh\u}b%0šcÀTà#ì´§vØ«Hç½®ÐïÕ®§Þ©òê?ÃÛ$`vÃ1º»ÐðUúQð_­½ ™.ÆÙåâŒÜ1Ê$}—"zíÅ9Ôò}ƒÑ÷ô³1J:üìÒGŒÏv´ A´/ñöNº‹Ï1näñâî’_¿„åýþ1³¸LÏ11C‹Ð‘u yn²`n¡ ЪIèå©ð¶B ÍY¡7a-LxglÄ]9;àm³b¿Â¿IŸÃXŒÈ‘3”–ÿIˆOsqÅ(ʼnë¬ÜM_»t¬¬ý,*ÂU°r <¡}­å,£q^©âyîFBÖQmô>ð〨@”º Tb¡w&V¿# ¡u7p"°µ–c¸Ç·×kAè W1νòŸ ÂiZ²‡óZ1H ⹟á¥4·Ù'Ø›u(_¨Ô(åLhV4N…^“ÝR Œ§ÄlŸx’¬ÔhÒ4„,A#_È~F¯rÀSðÜ –+û¡9 ¹xš5ÀuëôX3É¡aÏ`߸šƒè{óÇ]›ÒèýBÌç5,'@3 ˆ9ÈGÐkð7hŠ€÷á3Wv¡o ôÐÈí/è+ ›tÈÁ@D€Âžæ 4…ã,¾h³ž³aÙòlàs`¼ióŒÂ’ÖV 1ÏÄŠœ.ÂZ¬€ ´Ú`õMXwä€ÑÞUÛ0´ÍrŒÌYF Ù| Šsy=dãèa#=†þæÿXö[`Óòeè¡Ù {ƒÀ’OÅs‰’Ž%<‡KZ#Ÿ¯¿çw‚ÒJ`ÔU (Õ…¦#p/ôš< 2P"e JWÐ: xöÕ ?¼M ä³ÀÛÐÄ»@Ó88úÍÀ?€ÐH¯ »ÛCs˜„qÓ¡:AÃ;È¿£€WJFk,0šÞÀð¹ˆHµ€Ãè%5nV‚œ¯á(âS~vC>¹,Ú8èý P³¼/at«&c½d¬sƒ\–ËmÚ¹cÒxÌG; cƒœý`Èý ÿXú‹Ðχ\ }Eh.hÑLÈY˦²€£,`0 XË‚ ² ^,¨) *HÈn)P&M@d?£µð<4ƒ~%p?4'!B³¸>ÏAO0b° {ûFÀEÐDߨçUè{½ _ˆù¼†åh&1ùz-þMð><`æÊ.ô-¹=ð%}å¯a“9ˆPØÓ\Ä*gñ¥@›Õðœ ˦gŸƒàM›g–ì´@[¬… VЄµ³Á:]a‰ˆÙ†¡µ zÅ@9Ȉ ›T1·÷ÐC6.€6Òcè/`>o€Õa¿6 !_†>šÍ°»ÎZ"Ç8Š+ï"¼CÜŠ7’u< 1@wØ,.RÜ8Žƒ‡w‘qè5šIÝ€>è;6“vA®9 ­• )<%îÑ8FŠwÅŽ6:ô[ñÙ÷q¯!;B^ÖEÀpí}¨¸¿“¼1‡^ÉUè#©k˜åÖð¿óñÑæ ÏÏ¡oÙC ­ ÿ-´7¼C´³@«49°¯¢½Ã…þpf¥B?š -Âú¹‹«Œ½Y‹­xs-=ÓúâŒjb” š¬­Zo WYí1ZÑêŒkÜZmК«ÍJ{ù—ÑÖú8V‚ÕŸ,VŠaõÜšQZÄ`ÿòàrÕÊãé„uÄP †~ äÈ™ðŸÙø Z» o'Ä<x ç8gç ð"°ª>²²=<_€}2ð<üŒ*±£4ÄXG0ÛÀðŸ‡3Ú«ÉšàÏåPÔ×$`ªžíXQÅ#E_ÛO„l3CÈ& PˆmüP;øÖ»y<´¸@^¡³@ƒžím3aŽ•{¢õPaZvE "„Ü úf%@È ²KÁš²ÈÞzì·I`'y¯›ˆÆuY¼µy,ž±ËäIܾ9j¤®åHàK`°@CW¬Å0ÑKÎñaG÷Ê#eñÜò"V§)*Ù(?ѳˆóðÛãâÉyÉî’Ñ@!ŸÔq4öwÇSs~âì·”A3C Þžìßr„g©?ð08 ØøøžçßhØ«@ê ù0x ¸›™“Ÿƒàç9d3°ЄQkþ߉·W¡Y ù¼5×ì…F ‡þ¼Ýv¾.­†ãÚü…Lÿ€·ÀõÀL´FŠ'áR$zµ:m0bè˾”&£õŠžEcÄy ä­ƒÐ+CsH€ÏxØ‹ÖXœãà«wױʈ'žÆŸÖmŽ‹}£èË3ÌVè¾…%*4²z}‡7æ÷€ÏñÆö*ÞÏžo”|-"y ,¡o*ÆZ|…ÖH´¾‡¤À8í/z%kÑ~†³¸s”Ÿe°\ Œ.ÒÖW“fÌó0ž$›¥:ðÐè.ZiCXæÀÿaxÎÅÜb¡?9 r2pb^¬}@«\œW[Œž ìÏ3aY;SXzCÞ¥E os_á_F™É>•ÑX— øõRx+/dã(m0nwâÛA¥\1°ÖûðNÄ„€Çhj3G¼çlæ Žò y¢:À° ‚\ÞÀ!ÈI y.Eh£@ÿXc°GsmÐ÷ð9pp¾Æ ïk‹,‚æ4q/£/ÎÚpþÓ4ÆCq‰ˆ¿pRIiR–8{þY¼7-Ä*Ä7÷uY" ¡ÂoëØæîâw;Ð.ëmŒ8r=zôM'£€ãS€³€¹Àe‰©)ÉdmRJ¿² ¸=¥_JÙ <’™–JŽOsÃrx-5­G*¹|Ô·gb y|Á› ˆ÷½D¶"…$¾9 f§üIó7É@ðþŒGçoXê#4}„êGˆïjè~l?B;ËOâC,¤>‰$­I,‰'‰$•d‘áøkò2—,&Šx‰O&js6”ÕŽøÕ~4‰ßÿ¿Æì©sˆø+Aƒm4Á_KØ®Ç| ¶Gôãíè úñ£ãZíètVÓ—3k~*ìæcqÿŠôÏwô³¿˜‚÷þø ‰Ïºø;c>ý/ÿvë-2Êà!YhS9ޏ’0Ò˜´$1äÒô&d(Éæ‘›Nf“<²Œ’d;ÙKŽÓä¹Açä-ßp©Æ„Wó?âX`Ü„ãjãf [ø1ŸK?á˜oÜŠcqŽ«Ûq,4î ?þÌ?pë8æwáX`üÇÕÆÝ8÷pëã^þi5·Þ‡c¾ñW Œûq\m<€c¡ñ ·^m<Ä?rëÃ8æàX`<Š£xÆ'Ž…Æãܺðï""~Åz0õoEäÎ|•ñ¤™"=2§ôÈœÖ#s†³ÊxVÏoz\Îéq9¯Çå‚‘‹zD.鹬G䊑«ˆÈ5="×õˆÜÐ#rSÈ-="·‘;zDîê¹§G侑zDþ‹ˆÌ"¹d))ø‡y¤G¤XÈc="Oôˆ<Õ#ò y®Gä…ž1¿ë‘ùCÌK=2¯1¯õø¼ÑãóVË;=.ïõˆ”háDƒˆ˜ ZDL’1ÉZDLL‹ˆIÑ"b2j1™´ˆ˜lþƒˆì&‡H¹À#r<%¯ ’ÁÖd«EÄd§EĤj1•Ò"b²×"b*-"brÐ"b*£EÄTV‹ˆÉQ‹ˆÉI‹ˆ©œˆˆÉY‹ˆ©¼S-cLµÈ˜\´È˜*‰Œ1¹jñ1¹éñ©¬Ç§Š—êâLMîz\ªêqñÐãRM‹§—ÿ8"¬©¡G¤¦‘ZzD¼ôˆÔÖ#âˆøèñÕ#â§G¤Ž³D$@H ‹‘ ="ÁzDB‘P="uõˆ„é©§gL}=2 1 õȄ둉Ð#ÓH‹ŒøF1o\fð+Jú‰—eüjàJj3W$‰&qêIÎôMLíåj‘.ÍTOAŠáºÓº4S=Ã¥(ØÕ¥™êo„Ý9]š‰ßâð$~$”¯GkÒ‰t㬞EF‰êyëHW¬#]´ŽtÁ:ÒeëH—¬#]µŽtíÃHê}.535Ẻ4S})ŠëéÒ?›ÑuëŒnXgtÓ:£[ÖݶÎèŽuFw­3ºgQ±uF­3zbÑSëŒxíü ~|ã"¹ðý`5©®Å|çVÊ‚]@¿,¤üiµøî‡6#’ô¤æV©…Uji•ZAbø½´ |¯è‰žOÑëz<‡õ Xþ.²EzÊ{ˆlÉ!ÿ{¬È¾¯) ›È ^?/yå¨gƒ»¡¶Ábhhhnß±•ívq_ßAúÅ*íþ I‡¹4Ò«tÔ*³JÇ!‰]©*²tã,´´ZY¥S(ž=q’N£‡˜ÉTIÌâØœùÈÆYsš%í!”[Î’ÎZ=ýf•ÎY¥óVé‚Uºh•.Y¥ËVé $#ß7W î|õüH0©/ñ½4·£Î“öq«yß)H¹üóhs¥_¹6WºjõuM…Qš&Mçù’'-å–ˤUÄV* Hi©PZC¤uÒzRVÚ(má;~бÏñ‹bßç ÿúÞÞ°RZÉ}®çöTÚ&mã{EžyRþªXü¶šÈC~Õÿž6ßùrž•æHsˆ›4WšK*s;Hü•p8þJ8¿’F• ÊxIÜ-PŠá©-å÷T¥*üq zWq£"ó J¥ª˜¡!ž¬¤÷hZ‹zS?@ƒi6KÇщtF¿¢9ôúÍ¥ éRºœ®¤ùt5]C7ÐÍtÝI÷Ðô=NOÑßèEz•Þä¾Їô1}Êj1Ö€…³F¬ ‹dMY Ö’E³Ö‰}º²î,™õai,“ bÃØ6Še³±l<›È&±)l›Îf°6‹ÍfsØ\–ËòØb¶Œ­b…l=û‘ma?±ì¶dGÙqVÄβóì2»Îî°ì1{Î^²7¬D¡ŠQ±SJ+eG¥¼â¢Tæçí®TU<O¥†RK©­ø(~ŠY T‚”P¥ž®4Rš(ñJ7¥§’i·Ön½ÝFURÕVµW˪Ϊ‹ZE­¦ÖPk©µUÕ_ Rëª ÔFj”ÚBm£¶ScÕ85^í¦&ª©<Ê?P“øn¾5iM"ñ({óu𥾜ü©?a4ˆ…ަ£‰‘Ž¡cˆ‰G±¡èbK¿¤_;:•N%*_¯H):“¯ =_•oHi¾2ß:Î#e躀”¥KèâÈWj9q⫵’”ã+–Oœùª­&åùÊ­!øêm ù n&.|·‘J|%wW¾š{ˆÝO÷“Êô0=Lªð•=NÜùêž"Uù ÿF<ø*_$ÕøJ_ålv“Þ$Õé]z—Ô ÷é}R“¯üCR‹ÓbâEŸÐ'¤6Ï‚ZÄ›g‚ñaõY}â˲†ÄE°R‡5f‰™gG$ñçÒ”°æ¬9 ä™Ò’Xx¶D“ ž11$˜gM'Â3çʳ§+©Ë3¨; cI,‰Ôc½ùM}Öõ# XË Ù@6„³¡l(‰àÙ5‚4â6Š4æY–MšðLK"y¶'Q<ã&’¦<ë&‘f<ó¦æ<û¦‘<§“–< gV<sHkž³Hž‘³I4ÏÊ9¤-Ï̹¤ÏÎ\Òžgh‰áYº˜tà™ºŒÄòl]E:òŒ-$xÖ®'ÙF¶‘ĉì%]xþî Ÿòþ…Äó<ÞG>ã¹|tåù|”|Îsú8éÆN²“$agHwžßçIžã—I"Ïóë¤'»Ín“$vŸÝ'ɬ˜“^ì{FRØìÒ›çÿÒ‡•°’Ê뀒¾¼Œ¤¯;’Æk¢4IçuQ†ôçµáH2x}”'™JE¥"ÉRÜ72€×ŠÈ+Å“ åÕRƒ ãS‹ çUS›|¡ˆ¿ÔÁ«ÇŒäd&£”%€ŒV,Š…dój %c”0%ŒŒU* É8E¼©¯4V“ ¼ÂâÉD^eÝÈ—J¢’H&)J™l·Æn ™b·În™j·Án™Æ«O"_ñ TÈt^…¶äk^‰öd¯Æ²d&¯Hg’ë҅|£VV+“Yª‡êA¾åZƒÌæUZ‹|Ç+µ6™Ã«Õ‡|¯šU3™«ZT ™§†ª¡$W­¯Ö'óÕ5‚ä©‘j$Y 6W›“…jkµ5YÄ+ºYÌ«:–,á•G–òêŽ'?ð ïF–ñ*O$ËÕT^ë+xµ? ™´*õ¢fj¡Ïèdú5ý–~OçÓEôºŽþH¢;À˜‡è1ZDÏÒóô ½Nos¾|À¼è3æÅ¼édÖšµc±,ŽÅ³n,‘õb©,e±Ál8[È–²¬€­å¹´™y³ílÛ˰#´ˆO³sì"»Ên²{ì{Ê~g¯Ù{ERÅV)Eo³ÖJ9ê¡TRR•`Ë¥®Jw%™]µÛ¤ÊªIUUÕI­ ºªîª§ê§ª!j=5\m¢6S[©mÕµ“ú‰ÚUí®&«ýø¹f€Ó8Í6“Àfl&ƒµøJSÁT&0• ˜ÊLeFRÁH¥ÀHö`¤Ò`$0R0RY0’#É ŒTŒä F*FªFªFr#U¹‚‹ÜÀE•ÁEUÀ3îà™ªàðL5ðŒ'x¦:x¦x¦&x¦xÆ   !  hh hˆDš‚ššƒZ€Z‚ZZƒÚ€¢ÁmÁíxíW!íQË1¨â¨âXTnGTn'TngTnªµ ªõT맨ÖxTëg¨Ö®¨ÖÏQ­ÝP­ ¨Öî¨Í¨ÍDÔfOÔfj3µÙ µ™‚ÚìÚìƒÚLEmöEmöCm¦¡6ÓQ›ýQ›|7­à_üêF’Uüôgr€ß^"wøýç[ÜawNjóÝß%Ò<›³éÇÒW'Ò7§)‰Ä(ƒ9†+C96R†slò~‡‡—ððÞÂ×ð0†ÁÃðÀw™Êai¤Ue•F[¥l«4Æ*µJã>Hê3«ôßËÓËô !ì{O$Å ðý¨Â…(ŠbKLj’šŒ¿+k‰;ÕÄ‚ý¿ƒÝ!^Ѽ'½÷AÂßËv‡ù§g|—xvöt$¯Þ¦é=ìDÅÎ…`bà=/c'ú)ëÐÀÊ”éQz’žáLyLÉ+ZgÊÚÿ6SnbµÙ6¶“íaûÙaz’O±ßt¦¼Ë²'ì{ÅÞñh0…LY•3e0eU0egÊÿ’)Ô`5Lm¨6V›ª-Õè˜2éÿ˜òÿ˜òÿ7¦Ä{ îzoó;ÒUâ9ˆ”§Ý=’Sv¥íìÿÛÛ Áâý”ñáÜ¡?38ˆûÙCÖ{ÿâ×ò Ý´J·>HÊ aýOïñÖoåT¼mâ4&=¦•äd¹—œ¢¿½3hV„¸ìãG'h‰Ës¶ËOŠMíñÍÇÿQÊ`”ò²]VqÕ2É`ð·3Û(ÌÛžJ.Œ˜[oÅ ²C$ƒœ×ÁÜÞìó‘ÆuaåQ®¤>þkKº“L’FRIO’Åÿo(þ3WýÈ™ì¤l>[eâú‰ÞÛúæ°ubWoÇÞyÙå²ÍÙò/ælº2JIr äS´xúGìÏÛ9d*&l1—²ÎÖÀø¼a𴣬8J;ø;šËˆ&GÛÎ ™½Rú%g¥õów0Û ¥ÑÑÓ3±oZ¿DÿÊfW¡±u,×&¥GFZfZR–{“´Œô´Œ„¬Þ£ª¹Šh§ŽþÖ›Ò·§o‡¬„¾éîíš42W._Ê?Ð`6‡}Â?ZÌÁÖæÑëþGfVÊl'Úíå6mÛÅø×4W×>Vî×$%½WÏ ÷ÈQîQ¢Ã‡F5ñ 47²ø†ø[,þÕÍÕ´3rýË3êÐ3c`JžælƒÇÇ60B³ ¥ ×ÛJÙ¹ébÌ·åS´Ñ’xÐâþt«—=yƒÍ…˜¢ôù×â}n¿è½øÅF¿5£Çw1WÿËÛu ztæT×-ÓæwŸãw¿}H~çßk«Ö¶âÙ+}ÊÕÍ eó—L[Tccó›žFEïÙôeM‡y˯­vwHjÁÌ^a.Ïw;m–ÛèÜwr¼â·óäo±u«Ïù6Û+xrhAÁd—Un?ðÛÑÊo‰1hô3G÷{ë[ÎÌÝ1wL§‘ùåêÄ{õ·ËI}kÞÑóö‹º—îy<œ0eåÚz »ò¯¼V½œê±}¾úÐÓØNcEÑXa™Õ¶“Õ›4\ø÷46ä„,ª™«jEïòq{bO÷)Éý¸×ˆÌ?ÀXW#2‹õ£yô˜ÿ "ÓÍé?0ÿ—ÄtguüB÷R/k ßʆÌtàªZÂÃÎG|±nZà­ÎáKÚ—³Ä.9º~òòðe!W}Û= rŽ.n3ô¼ãÀ‰…>»Ä/¿õŒ×€•ÆÕüþÙKßÜFÁÞvo¶×Û²9~ÀLç˜V÷„>»?bÙ‹FåâM=ݪ†<öÙâaç°ÆaÞ qc‡·Ý\izá‹Eï'?WçDç½Øo[õÚŠë†àfïêd÷M_,ºÓyÞ›VEöÙçC¿*ûþúé¡Y¯vß]ݯvÁ¼ Uì+oܵÚs½}»­—\gÆ·X:dÃÆóG^¥«e»©¶×ÑË»z¥tÿ6ïòã«ñº¿oOË_ïÔ{rÄÞ&vß¶¦mÏþ{>S7‘ø¿*Tú[ué¿ô“À6çfG•Œ­¼}«Œ€FOÍíEs™óÅâ¦æÈ¿_ž!â#s¬èT7ÈÛ’”dîâï›âkIHôMæC‚»÷0Z, ‰"Àƒeî8±Þ9ΰ?Ä/ÐÙysë9¶UÌ4lkæ˜Ç)p|ÔD€<—y&ó$þÜêèï`ö7ƒ?ùˆ£Íœ?¢À†ÿþßYÅwþgúÕ.Û9pô©y{ï¿ +ŠlcÊ}ÔõrïOrTš»u`¯Üé æÚý2rá”'m¶|S÷M©+W¿þ™géJS'– ~>ÿȺý©[êúD}áY&¶†¹T©’f÷¨ñæ¤Ï|†Ís[îðÚµ0ëiÛ”>¹Ë=Çž{8+ïræââÞ.«ZuÏ}2üg§‘Í·Yùêqý™}Ÿ½3üVù¼ï{õ²©õJú¶¸ Ý’“¿óîºÌ¥'zny­ágÑïJ\ùIr¬÷™û¥Žá‹ ¦Gø‡¨ÕU^Þ´ï­C‡Dl«røNÔ©‚kŸ5|1`ß­¤Ýš3vÂTOóÅ–c=ÜÖ4NnißjG˜}ñÆoÂ~½Q}†iéÄ$¾mc[9ß-ÖøÎ6!°† vkþOsŸƒ=lmfÔøræSŸDCEgÊï_Ñ\þOJëºøûš½5^ðü/Ĥ¥qrà •’”Ò#!«§{£Y½Ò2R²†€Ìø,Ð? À¿n`'³ýc€øøÿ’gÿƒ­Íè_Ñœ¸ÃmN7w÷Æß ìÚ°Òé´CŸÜëóþ[g‡+—òƸüX'/àAÉ¥]£«Ê çƒ:Û~y À½ÅóǽVµi5uɶ!­úßÌxî]õËóL<º"3rä™ÑçŸm{¼x|Ô…Õù ®Ôêõ­ËK22;=)Ÿsã]PNFÞéŸW5f\¨ó±ÌOO™©KÖ¦Ô9WÑîýŒ,¯këÄ^t2wyybj÷w÷ÞÔ¿ÝæšŽ7"ÌG3¼jyì ‰nÐ`úá¡Ê¸øèNÙµj³€[iÛãö ßîO¢Ü^e"¿7]{üÓ)5:ܺ¢åÓ¦GCê‡æ®¿¤|îÔƒe¾êTç*›ÏéÉ Ö•GäsiÁ ŽC‰ÌÌ”>b¯¿dAVn¥e™gàxsYÅF¿5)góí¯U' /ïŽûGŸ¬1雫³»Õ[柶´þÖ³¾æŠV#'IV+Û’d¿iBý‰ËìWew‹èTóÛ›ÕßÖ¾jÛá›.7›ÿ«:s‡rßâøŒ;Ã4·-ƒa"1¼#Jer¿ŒÄÈ„ŠD†Ü/ º0¢…È=f\ÒθD™Ý$Ù²›‘ˆ$i£¹åŠAÙ£N;gïÎ9ûüqžžóß»Öz~ïû>¿÷»>ïZë‡ÿÌ2`˜˜Åü}–ýáJ{AŸ(FXC1K€ å5Óûo ¹Õ„1ù|׿ò‹ Ú¿}×)óŠñ@Ã*í›>ãP­€RÜü¸kØ„õNô3äãÃQ4¦P¹å8>3éR†Õ²¾M-uÈbÐk"nâBæwj~%*íý°8W½Áßwx„°ê¸4\*Få-vxI?·Ûq&Ý8÷íìÔä@¼‚Ž>Ý!{Ú^9nsYî;M1öYH¤4À‹Sl˜:.†¤oöÏ‘]›¶ïòjQZqF<¢&Ö©Þˆ8â`Jµ{Ä-trèÍá13Õrë)ï$k,¥Ãǽ‡¯Q5î2ÕaPâ…¬廓â*ÂD½´·‘ VŒöW#I—eœYºR®½—¸ è»4S¹I˜¤,È¥W÷ ²5óðd4ÑÖ ·ÁW³Ì iŸõknxTè˜êx"-©`ƒ%ïù¶B/‘Ðâ­h-iæëmâsUú^dÎÞI[¤ˆòÐs½°>¹ÀVóÎ'Ò£÷ùjž,iô+œ»R&²W5¤ r^];eÎÒGp6/‚æµ}ÊæŒûhB~…<És¬%§gì%ŠÏM„XÕò|Î p«Òn ‡¿ñEÈz_çîÈÕGïo6ÂÿDoØZzs= &ó3|c’˜¤oã—r¤Èí.O2,‚&E±*(¦Yÿè4'×$þßPÿoµîܽ†eœktæ5ÝÚ;ZC;ö¢5Ân¸J34ø ¿(üzëݨ‹tÍNqj¢¿;Ý‘ç¡"ŸÕiÈvdT8e˽B€ãˤ™óßìO²ï^ág&Y²§í%{m¯§'ù–‘€vôHd¾ÓÿÙÓ©­5̉‹o±sÉ Jó+ÛnÝù>¢þ'™Hwµ)jŽšŽÀ1YwVÞ_< y Áh3©â¼9qs ¨4T—nÓ¬,®Ñß›|ÀÜDâNuuå/f¾ñJt2úŠ$à9b,~H–yE ùØdT}”1gÙ¢ÑÙ­m­²Ùåz`Ìaª¤/+¯yG`]Œj¨ÀúÉpd}¹A•p«Ê›@ w«  ÀK겘üpNÛïÆÇ~;f¢2˳.qF܃‹®Ø‘>ˆºYÙ|¤†Dàï4ÒÄ—¥U“®W\“}žz¦¤¥]*Pp0qc}ÁÔéfd׸¼-+{÷rL L€œ`z3_Œ]ÍhŨ­@›:wïÙ@é^Ôºb ¹OÊ—/ü€!óqS˜ï* pÓíûÕËß›|"ÄÜ_-×þ¡_a^ŒèÚ 5÷¾Z X•\-¿,äÃp¡DïØÕ}ÀÒT H¤ÀïEl ÂÉÄÀcÍQŒ@(ؽ ´ä : ~r{‚BAŠ (ĵ¼¸~7îÕQPE%õ/“54"(Ð+Ä-èh„ÖŸ~*|d0( «bÖ=0°ô(46Ï’úHjšUòÕ½*ÅLJñ7PZ–ï³Kª¥[ $ Fîè^$Ã-iš{ûüÚD±·q»zö»S;ø%ǃHf/0µï™œÙ§(7\‰DƒëÙŠ8àòs–kª3Û¸|ú×’&úˆ?nè=cëƒÃ^Þä,^Eõ’XQ´Ò´ýŽl·Z„ÌüM’ƒyÑ…×mê>3<©%ve[ëwà vÙž$ÏUµ‹YDoLŸ}× ›fDçäU–?ÜbKÀÏl'_Yoèû¼$:!Õ`ê¹ó-àr­a›Sí(½§f+Œcʼ%Í/õb6ðZ++T$”G?©rÛä.¤O!ólÈ<¨¯ßHCæ‘äºÖRå…ïV|ûDb&]™µ’„|=YsþG„³îó” £‡ÑÛ˜QdiZŸDãT8¹ª0L'ßôO¼^ÕŠ 8ªƒÛþèÈ&»žØó}sHüp‚Bµºú~HÃÝ%õÃ:÷4ƒ[ª>¢‘ªN.¡:Ùo[qu VÀƒ1s±kgâæ¤»å"äëÝZy7(â‘’bùm)A÷L”:v}<üÜciqÌ¡¤½Gæž|¡ñ+rœ&+åÐÔOVÆ-”,*Ÿ×ª,¥Ú,»Sý"_fè|÷¬ö¯ûÂvËeòu 5t"–°Nº%f¡ú?<§.J<Ñ„ÎÔH'è7ö£O)Ú¿ Hæ]É„É[»iHý:ß endstream endobj 39 0 obj <> endobj 40 0 obj [278] endobj 41 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 22/Type/Page>> endobj 42 0 obj <>stream H‰¤WÛrÛ8}wÕþÅŒ ÁK%›*ç²3ÞMyíÌVÙ)-Á–‹Ô’Tbÿý6HHŤ'Q¼4úrúôéÉEY¯ï³EÞ¼™\Ôu¶Xñ%º™¼+êºØ Ï“O»»úyËÑä_EQóMfÍ¿«ìagõºÈÑÛ·ï>¼Ggÿ;ó‘" 8 PÉÏþ~…ò³w³³Élæ#B°¢ÙýÙ¹}’h¶@,!8‰ó1‰Ðly6 |oöåìãììÏC­±4Äİ€¤Sðèϳɕë÷,@#ž{“éûË`öhi„â(ÀaÒ–`WwC†Å+ äph|~3šyç1NÓd´â¡pÅÀäy{QzçAóŒW;¯½zôبö\GðÞçÙ¿~6éÎ&~É6_ƒ½ê@CF„ĘØ|óˆß¸•=zö}ÖØ^"¯ ïÞ;'!ÜGEé¥ÍÄÙÞÙU{hßçh[4¿µ³ƒØKc³Pç®…Ð0?  H‚™e¬.\­AŒr’C%˜Q+éÛBâ¢I“GÚ?µÎæ¢pÏ`”âÔ>mµôý~%.wêÄ|-1¹Œ"}ÊѰ@ᓸÁmÕ+n- /ì­ŒòäfйIS‡¶›Ük­=Í=ÂF×S¯ÍÆÅ\Þu;’·n=ç¼t°áÌÔ*éø06lj ÂÖZŠ ëò4ÿëòÓ\ø+›ë‡YHpÄY&å‡!ŽÓZ–/O[ÐaѲ¿ˆøb*†@$0jZsŽ“Ô6qcðV&øY`y#ÚK\ `‹_^¡ï+ vTmX ×ÞZ¢u._C²g2Å‘º¯2e WŸ•²õôl¨ÖÛW²ÞhÍÖêðB9®Ýù.¾]eÞèbmukµ*¤ÇÍw¹ˆ Ÿ6aN±v Äÿ(Ž`« ©!ƒÅ:@þ¤È%Ûleçò »ã?G¢}¸xIcGA '=¡„Ío%d´ êÛŸõûÃm´›üF¾Ûäî„ÙµŒÄ¡ávÓ~×Ó‹ù¯¼þãÝå1M0ŠilÚtn€E¶‰­x T*ts…ޥʛ¸6IZ>›¾âн±*®ús¹•Gjº‰ðÛ²5±nD™²ØµÇ’KKOоO)WHCP3µ%ßÌ×Ë'g ›øÂÂ)5 Š™øÂ …67ªj+Þ²-‹¯<0—¦Ôè‹=Ùto÷8Á49):ÑË~‚ÓP¡¯‹ÍÜJ¼ Ÿµ6èÿøjG Ælhø1úRÜ•YþÕ9‘e; ±^ :>RÓÉëQ×vTm²XVÃz©`¥[ãaXþ÷X3™Mm’µ¦\ÊǶȭOÉj¦8 fV‹Åœo]“JiÒ¨ùÎŽó&IA–%Ô4qÈX KôB+JÂ1ýAÞïµKX£™z¶gÓù6[—·2¿c$¹êÀ‰²÷$Ja…bæIc´äU} êÞoÖ‡(6mº´Ù^“!pÛnVåbŒò»çšWctÿ˜=T·ÞkWİ$ÀÄ´ÛÅ­‹@1 W@­ûB¡ƒµûWg:Ìæyaëi¸½p£î*(b©à›†h.%9ÜæÁ¨Ç5GëJñP†rΗb, y¥è&¿|´Ð·ŒUµ¥ìšê‚D`K…cýÎ;Þ×ÂÍ(â\¯²™ÐÕš·¤Ë6qi5tCK §‘Š`±‘ØßúÎt$BUFœÇ"¥‡©Uàl@Ö¨?3Œéß>Q« ßú%>(åÞl*VyÉž…f(äŽS2LžBöì2ÿ¦¼áe¦¤øìõBÈ´>j5O%dOkq¬TjÂì ; ¦ÛL†T{½—RâæèQåé+l^þˆ¶¿½ƒY7ª„¶Û²¶(vÆ,×*ân üvïK®Ÿ‘,k©š–ïd¼• VNyKK1(Ÿ|}×i·þz mkOve.H§'Zîž»Tž ãChf@CÍË«f^º¯\Œ ©htîlr&¶á* i–ÚeùqWü¸>¡˜KÍÁbãíWag{!8išAÿD–"ò#rèü§6ÿÌ<íÈØ)‘±”â¸Íâ}Q¢ÛÑFÙ"ò_ÃÏ”ï LÎËê5úå—µ»¸ †}fsHHÑÑ!¥í‹SLÒ½B¸«[+.oÖŸÇHjÂæ¤\óÛSs·ÿp×s ºÎôåØãŸÆî:(z‡…]—±0ÆAÜvÙu3Ö(lsmSG£u‘gü€nÛo?Ž1ÈN㌃¢Iõ¥¨$i+TQ„X ¥-#Îûp¼b˜pgÍÐøüfô7Ì“@I"ȱ%ÉÕ`έS‘?©´àÛ¾#·¨­t‡ÚúBJ–©ÚÖG×` hY\Ы°-@¬ºÅ½Ú½_û–?yíƒ?Äçµ3Cq„#fæþÜ5÷Aâ 9kæÿ£ÈúA¥K‰×þn ™¹F¹¸ûJ‚“ô$_³ÌOÌ GÄ4Vî*<Ä1=É! ã>dVòziBòߢØH]¹Qji—o.´Ðª×…ÄU^¡‹+xv©õ@vç™g¯iÝê­NØuÓÖrØ8jë´§Æz¦å¿»$M˜iMr:¥¸^ªñöÙ‘Ý~"ý® Ù«ª¾}Pj7C0p/G‚%ýNQu¨°Í†”G ýÚ^é/-²ï1VϨ¼ÈzUk„ú hº¥8ú¢ü/îÄékí ©+ ìº#Ìbö-䪾1¶>ֲ뀩±Ê‡3„£L¤}8oºwб»ÐI&fõÜÿ8}ÀÎä ½y3ù=Ë(ÀdúþòJÑÛ·ï>ÀóOò$A£ÿ"F3Ò`ש‚¿iâÒ}~£ (GšÖº —y3¸eÑ÷²a¶Ý–EcÖ ¡bç·ÊDÖÝq¤*\6 ð¥*»;ƒ`y×.oškÛ Øe .œ³—FijÃÎ R>ŒDZ\O/\«!ÌE)i¡ajÙVÜýÞÅ€´aí¯ËOÎ( p@O‚M¦Ì‚pœLÿò”ü‡°°ÔtîbúÒ«m·mˆþŠÞ©"Rw èb7íb ´ÝûØ# Ž7±ä•¬ ùûŠœ!%*i?I,‹œË™9çx/ü<+Á$¼±Å™Z uE‡Db·}Z™Å]÷.Ýb½vF…Pt[¡oö pìì)˜Kq[OœÆÂ‰u•*˜Wf”COa4´ÁÁ5ZKØZ«ŸŽ1É$Ø&Ì„œÃ#Hœ¶.žšÌ¡çÀ‰Ge˜¤Vrà/þøt nÒ<ƒ©™œä *žÁÔä“J“2X;üÙ9J„´I{¨{ž±ç8ôh©0_ÚJø.¨¸ÌÂlšØa»š ƒæÇ ¹Þ›ÐãLšû|K #Jæ3ñ—”Ö€A¹úeYÝ]Iê—Žò»è)|¨Pº¦ÛÔ¢ÿP‡‘©4mræÌä§4²{\Ðõº7—_¶7Ãë.ðaÿº.’ ž7~§¶é t@B!‚™-Æ×Ðtô–ÏÒ½Dc"%!FËœ”哞3Å ý¢2à O_XrX–JÐøvWh$¾<±Á b ·ó†“"ÅŽç5x- K3Y »Ñ )‡g‹âô-!ȵZD#mc…Q‘*˜zAñ21«³Ã(“ž†Cûv ÐuKÅÊJ»Úï|«-·AT*ù›ŽªÌvh½¥+˜Ã(>+ ¸(Â<¶¿µêÞ1ín'çth¬MQ‘ú™Ø/jݵܙŪm;÷Óœ¦G8|øã#|áÕ[¢gq°Ñ·%8>E Kiaý÷¾nÒr)ªe2%ä.Ó‹á·þ`8"©åë`‡0žIü,,‹Äº´ùÛÍ_>UJ>9먚±7kæZIVpe%a¢0S·±ÐÛÓ¤Pûï½;ϼþýòP;tRÙŠd&Ç >÷¸Ó*Z‡6ïõÎ&–¹¡,Š4õÒЄ­ùNoÝ×Ó3ÎÙäõ·AQGYÖݪÔÄ]ƒÝÕ«üþűt”)Ù w¨×bãVk¦ÏNÄûOú'°*¡n$ïXc°ôÃX:«£ª¬5}šm%'ˆƒÀ厽n’r«ÎÆÁÁ~mâ…T,{WE<«bŒýî’²è–ý°Û6š«7DV‘¤©Áš,¦d"ÃꛋÃ, œ1ñˆL>¦`Ý8üÞ"×’1¼[aÂyÒ§MnÌÃ4WÝþGSø · »žtf6Êküz58»¨nœFŒÂPؘi¬±r³)QW–£BÊVA™ÖnÑýæ?È Yl•á8­ÏÏðG“Ó>VüOm…†ƒÂd¢˜ê˜™2¹ü8"2»Ü‚XÎG§TéïÐ:m!…Ö §š(Æa—ÙqW‚ø,»Ã‹8”ÿœaw¬#N±;æõï—ßìT{ƒ¨ˆÂ8J–úe“#+pÏ4xxš…¹_ÊôvÆÃˆ/œ cü_€Rd€ endstream endobj 43 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 23/Type/Page>> endobj 44 0 obj <>stream H‰´WÛnÛH}÷W4æ‰D4›wÛ‰3Þ‰7™XÀ 64E[Ú±HG$3ë|ýVߪ›lEåÝÃÅî®®:uΩӳm»¾Ë‹–¼~}zÖ¶y±*—äóéyݶõ†üyzÓݶO%9½¬ë¶Ü’Ó9ÿö1¿_Wy»®+2›¿¹ '_O|â“„$d[žüþ3©NÎç'§ó¹O(õüˆÌïN&¾çÓ, ó‚Äõ²„ľG2_ž8uçÿ>y;?ùíÐÝâiäQc"7x{ ývrú‘]ë}^ݧ¬ÜÓë‹«7°íaÇÞ4ag@À~¦IãÔ øQ±{ä xio¯ b[ESÏ7vûìÜ´Û²ºoW¥;I¼étêTP‡¦ÜäU».rWoÉ»·,.ߟ½[̯7ŸÎæ¿,n®þõvñ3qÿœÿã¸@ØÂ„Ã.õµ+·ë²{­,öØÎØèBБÐa¡ÒN›»“2•93§NˆDÎÚÈ¥úZ³e¾Ÿ:wê qáFÓ„­û˜[šb 7½ é…üî­Kcç…+Ž»|ïŠÍÏÞÉ'‹¹|r­Þ¹¹>ÉŸæêÉ/ ùäftl¬P/M(ލ±@#ö·9¤7.‚Eo´¿Çç×pÍélBù}Ù—h&JŸc6QŸ£‹YÌþ]òñÅŒíé³Ï~8›¨ÕqÀ¶ãÏö(š ±ÏüœéŸâÙ?÷wä ±b»œQDg3ÞÅ![›Ì¨/˜ÑD‰8Ιª##öÕѤÆÊg®É6{wagAŽD|,h޹‡>7;ŸQÜ(â¿©”™KÎCx íf­îE+3»-Ý6e x†É§lüŸâ¹<Ç—z§lx†>^ ƒåÔ&Æñ!?¢{«ÚåGhzP|q¯¨¨Ë_l]qxh°ª,å“¥+«y«5¸iðÓ­Z¥mUühÆrð­<ŒÌÆÔ‹}Kg2ºmi{½D½æµB\í/VëÎá JgªfÇ ¨ÃŒá ý ÆëO’f,]ýY«Š—ßRÉe ëÎ凘bÔØÕåEUÅ¿'M+Ÿ#ž |Á9 u×/S®ÄKÕ8ˆ‰¨Me·Áåˆâ¡êâÖ«\ÅØji•r¥ºVó°«snØ5ÅðJ«ÉžÔ2|;ÛÿÍ$7WkŸ´ü댪DàݺmÕÀŽFÐÄMeh: k¼^uùÔ©½–ýî ÚvJÒªæ]åHqÿ &"Žf÷þÇõ~œp¡Õ˜>¨ù­–Hb/‘þ«Ù˜êˆ¤f¿:0B¸tY.å°Öˆ_^=¼¾òìFÄön?Ìéßãi2M¼°wÕÚ,ÿ’Ü–DRhŒäv×,å²Wv¡á¦àD)ö‹²jĸ7”Ÿ;lë y9–ÊWD¡Î,´©ÝM§Šj6õ.”~Ç&ÞÖÞè\G¡ï©‘ìƒÈ<|–Ìa×$$÷ò´È@pAqyU?qk:9O%Ì}L¸ùÃ!½µ{û”éR¤8è.ÑHabnžf|D xª+G½± –懸&«DÆòSš†Y7\•äÃØÃjêÊíˆÖ1T ÌÒ<–ò•b¯êÈ'k\†ÛÒ2høïšA§o}achaROʦÅ&3ûwpÏoê ŠU§™P´š&„zëNwR¢TÔª3¹íúFBÆGâ×¼-VRÖdV¥Én%5¤ Çâ dØ÷+µ}n©ôNN­L€!?ò¢çee—œ·ÝÖÒÉLß©Wp]½q³ù¼KSª¤›vd@¶Uá¼ÄÚ/¥~Ûjõ’/=ÖÄ /έB†ípnÕ8Ò©",µØÞ>õ mKmSZ±/Í_\©§{+éÃùÚ¥2#–P°«<>Œ—‚8ôBÚÃBIÎ>ÂfW興¥÷ÚC‚,Cw¨Àà‰æòº-ÑG 6žR/Õf–G$eøAþíUÌ"&#V†ßrC·ÃÁ– ¬lªÊF+Ór+‚ ±ƒÓÖráV픲6g—XÐ _ê´w A ⛉ßkB›õwMÒ¦kc¨þ Q¡½  B~³Ì—ú?_I •ÿ‡¡­ÁÂlŒ‘ k®CÅ€)­¦¢vÉMU>T<“­Ž} Ò$ÓoRÍ€`z<šáy»VtVYÄ´®j“5L€ÒS[êVçõÉ"n, ƒÁ€M0…µµ yfëŠFÍ-Ïä©Ja•Û·MEH]aä§©¡)çé5_XŠT‘o2ÓHm²«­ªaFËÒƒTÓ48’A¹r+‘bê½WLxä´›R¯Õñ\ÖaáD3:¾l ×?@׫i‘¢y»´æàUWšœF¶‘ŠqêAJ|ü°‡±çËû}x,+„” :»ëÔiäÖ¨ÔL€åè)lšÀ(gtËäEcXLæ]^2†[3†é埵_j‡®!H›(5ýòçk ±Ý籜,~iÊ èËú¹æBs 2ꦃðMû5ÊCI?ñ¢¸—”ûò?‹ùõâæñaÝ‚]“WÏ4ÚÆL3/ _T¯Ð§^ÖÏ0‹t‹rôSŒÓÔ=ÓÊzõŒ‡È:µÆ-Ñò‡ã\mymõUÞÆ4ÅéáCi4¾ÆV8âL{yk é͹+oQp×»pQOÄóïGÈH¥Î^Üš~èQn®4­a·)yI˜3°$SW*ÏZ¨×ÍB*U²_èÎi<õ²Äv¼dÒ$ôâ¬wß½²©l \hp]‹Cênhæ»ç©¨DºÚ(üzCJ$n Òö;¼"ÎX)D‹LÁ¬{j­œMŸ`­Bië¨Rk ´@ªûŸ¬ rò“ÊÑí¶Ì^q÷Q@ŠUncoñ“jÒW8Ò³bÉFPáRñrÕ_j“A;«D1CDSß‹%D:åÓ-9˜r4,@þC‹“­f…íwP¨Õ‹…ŠÏ,Ô+òxžDÄ*[°$yÓ i礪+(ÉëÊòŠÌ׿!O952;¾à ôÚ+ÎÞþ2©A˜uIoFŽú0w-Ô&¯ìÂ5VÃáÙ,3ÝÒ=B¿ø©¸Qɧ|XMi³ƒþføâé¾´K,•cò8˜›ñcl§^˜íBâ¾/=~Œ"˜&äµ/åÄÚµ‰Óm™'gÓMä¼á^3qÖÐÄ)h ù~«&Ü5@ò¥#. "f´t\e {шuø¢רâ­—vþirôø–È|/ô£]íKàô°¾†N˜ü¥–&žèŠÀ¹.7õö‰üʽZ‚ƒÁÆ0—ÐÈØü ð©?,þzMB®TÞô½¢õïLgXå§k*+ Å­ù¶ÁІþzX)âèÙÏê®ÞÊÃÑÛ#á›K$ßBiK~Ûµ"ÞŠÔŒõï~8LX‚Á6Àò†äÕ’œ}„‡W8 iA ƒÝ)Z4Ê ÞÿÚ¥Ò´+7`áœa¤óW×06JöŽ Ó¨$:%z”âÀËb%˜µ‚ ïÄÖ®œ·Èº•z‹edÏs„˜ì)ë{Ë(¨ CæÞDš?àYbå]‘ï+Äj£m†å¢p²X’ËNMbˆ’NÙ7‘7Ò´a•Ë‚E(EQ ZbUZp?“ZúQ–üÊ;z m‡¡_©0º­x;Š0žiG4¤Cw¦-7Æ,¤õ­„16ê9¯’ݶ‘ ú+„O"j®â1ð1|ÈÌ\@ Èޤ "5"åxþ~ªÙ]ÕÅÅN“'ˤÔKÕ«·€O3ïV¨ÿV“^CG¼ÂSÄ+ü“eHÝÂ{~‘·-ô âú*´ç1íŸüv¾ íwŠø>nW‰–^˜gÁ.×WA4ÍxìÛ¹0/”z¼™Ì€ŠÌúÕò¢S;Ú6 Âpp¼£4GxÝûD‡zýÏ{SÎRЈè“í³Üˆ}xÔ¡Nõ3ØÉºÂ Toä4ŸÚÑÀ0ÃæÙˆms‘6UP’ï=àý¬¹«ÑV_;’d㬲9e䪯iUbØyð®£ÍßðêÈDô[Š=`hLfÒÿO·b!‰ó BI£”HÇÛ‡5ì+g4Óéwg*^1S;ÀŸù™v%ªÆ„ú·TUUÚðÉ'*×xQtMQ +"zÔ艣"“ró5ãÏ®^wÔZïÇDbæšµ´9a”*»Í+WJ›û"QØea·òNBz…ºù¦:,·åªËÎg9©¨Æ:élƒ$agFzÝù¼ïg˜Áh°ÒòØ$ÒÑNhNV½X¹¿ÒSÀN!\ö›}rcÉÙ:B²Šc¶–ªâWy¼Èº[^Jn!LÙjËé PÄîöms*¬ÃšôbjÚǹ<÷.S9˜±/ÄA¯´aj[\g‘&Z–!`îÒ Yó²ñùÆ6}´)Eoa…Áª17Ïh©ib$š2\A¾âY®7Ù¶g3”õçÑa+(fÒ>Xry6Ùå`õl×ÏOqÈ»>ˆKòŠP›ˆåêΑDF¢÷òÓoÕÊ®ÃÚ :uŸÇÚ‰á¤ÀVS‹K+ÖÁÖ´ð£é Hv¥Ïr±€bÙ‹¸QNºB@#êÊW”6ÈC¦bÂÿÁ Ï` ÂÁ+neuA{+«kq@çÁ²ÅEYˆÁ®Ô<˜ñè8J7ã9-Ð*74) azë¹õ‰nA'ðθhÛMö)§\Áåšðc~æ=áË|¦ãeOmk+}BÇ9p0÷£Ýú§+†8Êáç¼ÛT‹Çî¶xÙ4 v™]v9d ôƒƒµe€åEb]PoÁ¬BtØ&!®¬ÆêÓ“ƒuf$<ª5T# ®ÆEõÎé„´ÒŸöäí ˆ„xfÐuÄî¨ú*: p Í©‰Úå ~2uû0qLÍÊ_$¸ËA†à¥2vçåíC¨B>(›c¿Ýš:IE0z­; 0¶»ãÛ44ò´Ÿî&š\è¤í Ä`Gý*iêîÛvtæ×´è½•S¿ógr‚ ‘éã&Á„°O&â_T26ÒkÔ,~Úc˜úΞ{4 Ë÷ššT¢AEŒ`MTo èy¥|ÌRxGy¨Ô˜w 5 Öéw”ãji]Çïò’›ØIo¯äó*6³ï$ïj¬AC‚]A_"Ƀ4Ô·´êréûDö€ÐòÝÇG3ºê’ªÆÏ¾ÐþÌ|Cßáß²Λ‚uFÒ̧ržpß.`ia‹Ð·f…WK…Äá°hÚ5xrX«Ò±l¯¦·dŽßl²¾¼?×ÜþkB3©w1Á( ‡±rM­ô”?—€ç›ÑO}¦Ñ;Pw¨ðÆ»âlÌݱ•ÇI›–ºRj¼@Eà`ÊúX¿¯¢¢A×$•µÍ6 ÌÚ=QØšZ£ <¨.]×b„ h秦‚LDGdž¨½ŒA«-æ$ÇLæö$Gýl6{ž_bèí½4E‹Ú3bÓ’"i-'Ó–+¬Q‹d1CŸÀÃí €GÝÝW(·€â¦f‹\q¬G( `\ýGUñø¹#»ì.†ÉíÒЃÄVÈã ä+|ÛÈW't,ßì¿ôãöy:çÒ½S$ü€Îή(ãÀةʩã’Aé@{”¨DªECϘoÖ->•éÜc*"ÚnƒXÌ\ã]„Ëq˜…Alxö/4|<Ž%¦A:SÞ¨!6BEÔÿY q“|¬­Ý›w{Uà!Ö%nxK}]1Lù‚O˜ð› 3mm¬žìü]¾æÉiù†™Dd77ó¹Î2™ endstream endobj 45 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 24/Type/Page>> endobj 46 0 obj <>stream H‰´WmoÛFþ. ÿaáûBâ—¯bpd7õÅnÝ‹Ò ÆFZY¼H¤BRvŒCÿ{g¹/\’j@Z9û‹È]ÎÎóÌÌ3³ã³¼LVtQ¢/ÆgeIk¶DƯ²²Ì¶èãøíþSù¸chüS–•,GãYõtCï’”–I–¢—/_OÑèËÈA ‰‹¢ØE9ýçŸ(½šÆ³™ƒÁŽf«Ñ©ƒ2qÑl‚ Á“&!š-G–ëÚ³ÿŽ.f£ßúZ bÃ’.®Á£ßFã늦wÈb©=¾ž^žƒÙa“ ŠBOz@ú@š”¸>g„åG8`Æct¶Ù Õ>]p¢ TÒÏ œ4·²¬•û<…ǹ(Ú²m–?"X^¢}ÁP¹N`;Dêy/F güÐÁndºÑ²{d`WÐË]^²ú€1þˆîØ×Ûë7·åCA0Æc†a4Ô„áa<Ÿ¦1˜e;úeÏP± šWd=à BìG‡Üü×Þ@®9ÃÄÇAÿüc¢Æ9Š¦Ùšå ±¯IQ¢ò!C»œ‡7IAcîéfÏ ”­*êt¬'¬ùœÄúØ>ƒ£‚n¹nuÖ?8š§§V@Lc)C¯/Þs.ùýìêò|xÚ{Ü–aòø´7ŒÍá_…in; <á‡$*e÷Ðè&¡ˆD6YVZ4ôôÀ!8:äÿ·bË*ïcYÇàç_ßÎÀ÷°ïšF€„nEû&º1¬5cXÉìÜÚu=="8äã·âõì»AÕxV#@á„®Š“«,Ä^oJ [‚ßÇ¡oZ“dLsFKìô&C™&“ CÓd?ïL±SLmáƒõUA{·O‰c!š¢Ä>õpGVZð_ŽC¬’¦ ûԇ߾Å*%µOAãÀz´Å^!¬öi`HõÙmiœýk‡~á(>ò[Ÿ Ÿ´BÇá»"áÂÐ`&µ]€3CÁ¡8´>W¬$v`ƨ¥ŠžÀÊl"Þ¬5ziÉäæ{2˜â& ­A·ì6»E‹,·CøX¹`,²X±³Å¯,•&–‰ô%UçÝ ò¹+âóõùbÇТ8±céøôÁ&µVŸU¾¬«ã¥¿‡Ï'Lå2ÿ°ÔÐ7úšÙD“ Ø\0i¬(zukŸ 4LÁZ¬©Üž*È…Þe>ÐÞ¹¥'N( ¸˜‘ל.ÑÙ Ðr©¬k?÷…ÚÂê ´kð@ÇP_ ƒ‰cY†Wiѱĸ’n±òJOŒÚF¦v•’€Ú i±:Y§%µ·ZÑÔéÄ¡*«¡d Í-õö†æ •%ùi#¡‚ìÀ2CT„Ä‚¶ý¨>ß1 £WXv4Ï›à 2‚¤»Ùà&ìÅpƒøŸj¦мS_övÍe½\ …dŽnd:𪯯”‹Ëpä~ðë˜éå“Aøª\º½¶×onåÒ4—?•K¥úªêqCë"€!»Qý›œYZp- bâA’SWL޼QAº‘Š>ªrlÏÚùo–¸ ½Ø)Q[$\UyBŠ-‰ªÔ‚ªEQ߬ÕfvweR¿ÉòG{Rm~ÖQ-]gK®âü4½TJËk…C¯¨î18h.L0¦Õ¬[§ƒ‹ò8jŽ3-©mS]ÉU Vaäí4޽ºAî·Œ‹FZÈn)Q†%™0FŶvh‰^Í¢´³f­‘¡ÐòS{-¶VF‘¦–*ía+£°Y‡³ÓxŸØ{‚;‘à9ÛÕ<ˆÝ|Zèq$eƒÏ‹`nQ5Ï\¨,ìÅ:Mcåæº÷ëÎbÌr¬z4–ÄîO¬M9Uwy¶ãÍF ìø` µðëÜîª?e<¾z”R]œ¢×J•o¤2¾³yÍjLíŒÒbQtôˆªµ\Â…TŸTÇAªW˜¿Ô¦ºcÍ«ŠÐ™Öö:mõçF®¶zm†>±®m©, ¥Ëf±µÈæ;š¥Ír=¿ª,¯ß<%Û}T•lËj]NdŒ!¦`[CE»Âp·+ûß´UyÀ*aͱ*gÔÎgH5ˆ«þݘPCšt KA50­¼ß´ËÕZ…G¦X ·YñÌŽš<¹Ox‡'žŽ'ô‰ ¾׌h£OtÚD÷â˶Y·‰NoÕR¨&î¢Ó¹qmamˆVKx¡(‰SŠ mzZ± %T,TåæY»¢ÕÒŒ#ËÂsD¸£í¹VPÑDq¬y ™)2¸ÞÂ=D|^¡90|Ô•GDªš©]&Ol”Õv8´(‚†Ó€—廵q©lYU2hÚIt¨•ôÎn•[Öa–f÷©1ÀëzÒýùrÑ™0öZý—xx¥…&A£/®§ìŒoЋã+šÞ!žìãëéå9ŠÑË—¯Îa}@‘êrÓ÷â ?Â]ë:×Öªª‹)3å9{°‰˜ Õ I<™ÑŤ•œT¿^¢$ý—K£PȬ;Z¤¬¼Ý~Æë¡’èº0}Ǧ±ÁW&×#-0{ö±á6Ñ‘‰Ëá¹LzÄ4—få`Ÿ‡_*Ã:H¸ §iLξçŒú^Ä­z$nYÛÏw4^£Ñ!œß,$Ò§H³`ŸDýpaä7º˜aÑ4g´L²e+DS(¢¢¤)Œ…ðxǾÞ^¿¹-Ñv_”(…nƒÊ5C'0¸ÅÉÐû¼P#óô^P½£ ú:¢ J J ˜¥û-Ç–À±ôž&úi£0²â„ó°eÛ,DŸ“tYàùƒÇöLWzáö Â3Ѹ/kºØìa€A´DF!œ<’«l³É8ò{ºÙÃêÜJR´Oan[$«„-Q–/YÞ·tLÌaÈÚð£èà(Ð0èAºðÃÊÇ[²•îÿ†:O`¾ñ]Ó^/çÃcœ÷@d|)2ð÷t=õ}ì›Ö^_¼¯’þêìíÛÛŸ};{†ª?È‹“4Ë·ts¢|n±;$÷ós{pØ=‡ÝÓ‡¹è(æ@;£è»1W[k07}w~vûî÷³gsü Á“bŽÿ}(®›®ã:˜[ÿøÄš1ñô!ory ÆNüÝÈ«­5Óîò!vüiÉî KÓW“Gpü$î`$‰púp×k¬þ[î@Ñ}òݸ«­5¸ûãâ™Á]–²³›KtÅîÙýÁò¬Å䇋÷7ÿ¾¼¾øevv5ÿa0B¯2‘õ Ñíuuø[¡G„߯ÚÆx¨±ÐÇná>è‡Î{Môð:MæÏÖ€òãà¾åA¸¦É^þ&ÁkÞí/ðîÐ!Ž2øýè5/5¯¯nHð$|Ú†p¥q™^þ%À9½¸‡ endstream endobj 47 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 25/Type/Page>> endobj 48 0 obj <>stream H‰´WmoÛ6þn ÿè§$Hi‰¢$k- ¤N†­Û´s¶aua0mkU$O/nÓaÿ}GùEtêf¤¨ 9Îûçîž{Ø?ÏËxÆÂ=Þ?/K.x„>ô_fe™Ý¡ý_«Ûò~ÉQÿç,+yŽúãúéšÍ㔕q–¢/^^ Qïïž…,äÙùA9ïý~ŠÒÞËq¯?[ȶ±EÑxÖ{jaË4‘;°ñÀC®…m£Þ1qNÆõ.ǽwªhn@±-!  Àå"z×ë_‹´^³tŽŽyzÒ ¯.V!b{?bBEÀöùÁtPŸÕï£ñ‚£9ÿ2½šsÎJ>eù¼˜–¨(ó 8 ´dEŒ–ÙþÅáú·ÉSJ[ ‰äXTò¶ò¦.Þ¥½ä¹nÄ®= ä©îÿ7Áx )â«8ä(N‹’¥ðK6C Ýñ»,¿GŸâ4o”¢LñЧ(L ]եѧݳ0ñ¥ÃUh'F´“Ã?lxßtU˜¥%‹ÓŽa¨JÅ 2H”¥ˆ§Õè,È;Eo}^ÄáBÐq £»`ºå“#àa™-«>aýBBDr\*8FØÐæ;.A¡6IoÒ•ÜR“²;¶[&F>! _s²bI“vœdŸy²ÉQÁÏP”gKôäîÓôÉäDŸ‡€`GŽM…jƒ¸Ø§[Γ a. ØhÁs®›€í pµJÛõ°·Ær.ê‡ë(Ï åŠ"¾MîëgÝ“—bÏ—ñ Äñl1ÆÏEÇôÅØä<„±@+žÐcE-"výq€ÝÇúÃ5ê˜LËÛitž­â2öØh䂳ÒÒnub{Øre|•\<£\`µ9{kv»QÓ0©"èzV¢„³¢¬g|–%0ÙBךPÀ¨CÞUZ,yÏb¡“£²Ÿœü¤]Iâ‰J6©dïe Ư­ñÙ6û´‡œ8õ\îUbÅ›ÁÚ("¼ÚO)¥˜ÊhUœ–oµy ;5Kؼx† EÞó‚ç+Øg*èŠ[§…Užó´4ˆøµR4Q$÷gÚ9QשÅKbF¡ Q`/9tW…G^íÉ!„`Ï•‚:# y^±œ¥%_;_(F=¥q•iL¢v†WÎJÅð9}¤Ûóºjd m{VT´³x®}é³–Â,GªB‹ÑEÀõ8p;£¥A[{:m… ,¸= %Œ\¹ »Àv÷¦«=¾…"s+ö0NÛ‹stóÛùöFó¡ˆÅ%‡X®¼€õQÛH­½œ ]FÞ…íCýoĨ=e¨² ¬Á…Ýð­´‰ÁÞ¬Íöl9Äê&Ç®B”‘ÃwÉûAÇ}Õ`þ{Hÿkõ1X.@®|J-ka±iµbú´;öð”h72Î.¬Ånio0¥qþåêzkÆ¿h­æÙÇ/¾ŒÌ9…}CîçYÂýîJÕ0ƒ Ñ—RŸ+j‹+‡¯Â•‘˧°O,ûpÕàV ñ™>Ôù5W£zßæQœ²DŸ±]¢”„ cFwöŠãt+bæÿHýWý$ûPŽ[…$£›€kÅëxJ˜ã–×G90Œl¾¸ƒ;kÏ¥˜Êhßm–Ï ýY[{9ZjŒ¬¸ QÓ µh b²JöFÆZXTÏÞ”rÞ>yî2tÀèÕt˜sVòº¦ú[Èö7U‰]û,X€‡@C‘Œ¼çFÅaàaE¯Ýb–£|Ï×Ì•Úd¬;\)#'H@Â\ºÍd¼ˆ _ ¥Yª>q@eħí›Ñv¬š‹,Ì’„‡e¼â(dI¢­K$¬J€*ä:FÞ‘€¼ÝÕt.OÔäX›_dz$*e`äèüètõJ˜ÛI9´´ ìºbË·•@¬–û }¸A ..Üé§8¦Ë3‘) ÞÛ›±ö½ÑMõåûh;ÙU:Þ±k E3 “˜§åá†@aýdz–·F)vžŒ+·aT»%ªÁ ÅÂÙ—“Í‚Þv*ž œ±ëQjN<[ãB§^½ÑoTHÀßãD¥FfÙ†ju\ SPÿsÂ$ƼfâhGÚ{^ð|Å#ŒÐ¨‚ÒÝrˆ ¬òÉQÜk»L7 ØÙËR…R#“mÃæthW&[B›œ<ÓF«]¶‘Júº.[$ ËÖÓX¶ºÆuŸa`&ð¶^ì‚4•hr Þ 5nhr¢-ˆ–-Q:N)7#Çlƒú’õšZeq´M§N2»oa†\.Ã*å`ä•mxÛëXSv»ú cp¦¼¹hI!*ÐAÜmíÓ±Ä6²Â*‰©Á¶ƒSáÆÙœ]å-U™ºŽ°d1*E02è ¤3QnÀ@“µW’'…£’º’µöÙ#xppàÿ`ˆã\ endstream endobj 49 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 26/Type/Page>> endobj 50 0 obj <>stream H‰¬WoÛFýߟbï ôÈVZó7©K[Àq|i.qÎ…å¶€4¹’ØØ¤BRIœ¢ßýfÉÝá’”]RJ4 —šÙ™yóæÍñI^&Ë0*É?Ÿ”e­YL®Ÿge™Ý“wÇ—ÛÛòaÃÈñ²¬d99žWÿºWI–I–’Ÿ~zþâ”}82ˆA<Ó"þÌ"9;úí;’=ŸÏç1Mj8d¾<šÔ0‹Ì#â& <âÔôÈ<>Ò,GŸÿqt6?úe¨5wæPS±@„³s¸Ñ/GÇ<¬7aº"KõãóÓW/À츛ñ=›ƒ˜{8p|:«B¸Ö~Ó§–E ÃÒ˜nZt6 À«/\-×ýú `z}’ÃÇÕÃGÝ4àÁÓ)õiýÙ 8ðä€iý€ß'ºéj+þ%ÿ×Zz*å‡Ò%¾ÈH.´8Öå¦6<¸Z(ßĉîVW(å¼Ð²T‡wâXš^êSq=þ»¯ã‚è~û2™ò¦¶ÌC«Ÿˆþnþ߿ن åpZPWÛV²¯­ØçÅùëÅiÎÂ’-Â|U,ʱ ´g.µ]Õ*o" Žß‚EQŠôa ·Q)ÒBeZ¦X¼8U+P  >ÈÂo%RõO¡\ÚƒDÕ¤Á…8ŽøyU8i¾ì“Il(Pg÷üÁ0|mË+É0Â%í´mQ‘ªð£ô–%T$,Š-úä÷NWzýlŽPFa›ÕÏðhv£­:)ÚJø†9Ñë9¾›>`þ1Éx#¡¡¸éåºmû¹Æ‹ÅÃÒ8ít=”Hœm¥tÏÈ"–g£o[5í&ùÚt4Ôm˜®Z¾ª8;¹)$ѧ®öEV‰Ï! ã:¹ËÇSˆÆ£MöDmÕöé¡"“Ù\6 (±t/q8›õ¯ÆI¦Ë«VGs’éÚÔt×MžÖ¡œ45{´»â¬;TÒLò{ÙK-û,Ó¾‘MÇëñÿ¡7Á^GOBKù¡Åèø–0êû»Rý”h°ö †I­áºÇïÁ šZ?!KÖ’¢á€Âq?bVÓ¦ÞuÒ£ )ŠÙãÄV‹£ÀÉzt¸i~8z†Ì êxJÌã¹Ìär´¶jLÂì‘ æŸ’c"ä•~ZZc5bäSµÃ8Ýô”`.0»ŸøˆZËY­ƒÙVæ’ß3&‰2Ì댲²1~5Þ®jë ÍLÑxûp¯ãòùT÷=ÜÒ¨/.Ã)z%ÍJ¾ÖÖ÷Sbè Ó›’u†F”å®.Ç ¸Æ‹GÓójlƒ¤7PÚmOfÏ€úÚuö<ês)„ëÏ´{0SžÊ)‚~ð1 ¹­x­c…äž}†,¯ÂÕ²ï+×°?^Ë:3¹àBĵ-KÙÂ-j_É «]bó)C¡s”õ~ÍvnÒíçDãab{\ú«1ÝIÅä˜À›õ›1áã=×òæe˜"—‚ðÑ\(s’(‹ÕÉ#ÎåN/(NŸÈ)CªO–˜RÉ£•%ÐtJ­V²rÝ&˲&u{çMäê–)ÉâFïqš\Iñkn+þ=ºLSËWÊ4ÜÁàöÃÛg6ÄÃîÌ!ŽÇ“Wùúfà?vîÓ«'‹«_O nUdúÜŠ!ñ˜ÆA9µk²ý†–çYNΓ¢HÀvœ±Q. \Õðt¬‰æ†\w;-cg¿ ›,/ÉîÊsM ×äžw?÷Icý9.8ôU/ƒo”xXý<‘x–ÆÉrì¥aáó¬–A—¶F^š_•3Æð3íCòbÏjÕÍñ19ÍYX²Vq«²¿%//®Š ù””ko“vkƒPJÞŸ­¿¹ôU׃âtŠÖ.·æÅû\‘Gë"ÌWÅ¢$ü/ò#ùsØZ·»y\ØÆ\Õå®–waeÚ˜Œ5m»&ïÅà <¹å Ø0løä‡ç©ñTå 6ЂçéåÙï}n'=²™GíVš<`4ËTAV’û÷±<|¸~ûntæÌÒQÍŠab}4 8·fÞù7Z’–$‰9€Ÿñ¿ oŸ‘ï¿Oâü9zXÁÊ-¯øÐ •òh@@§ ™PëùÔ²ZÖ8eTÈŇ ‹h‡‹íǰzuz³@—¿$aÃ¦ß aH¾Ò\вé­|)Ö8òÑ"àí[l‘äÝ„Ü?œÞ%,-'ä[ž× 1nôñysl®‚ÕPäÍ:HÚY@ÓŽ·gÞd¶áþ©÷4mcEÁòòFãÙÿ‘ý¿×{$Ö²\ê¹­X‡$v¬tãéâöƒÊÅ_£³iPO50莃”Z{²—:Öpƒ”ZÇ…5™¾Ö.õz]ÜÞŠU²`þOzµô6Šá¿‚æd¤ÑÐÍC1r²3{˜¹Díee Ž5‰ñ{²ù÷[ý¨êœ]ˆ–î®®úêõN¦'lw>ÃqÔL¶4fV-ΠÏô é¬ÌšFkÏO{3í#‰÷ö²MOOÏF'Ë’ w [Pþúk’§„"RrWØ´ÔsE$‘dô.Ðegí7 ž/à?Yüô—,\l¬]í3 "¡Yü\=l¤ä±ºåÙ_ì|t”–èá]GÓâ¡Kð޳0=ˆdý½m6ÏPe©Odñn‚)rr ô‚‰ å=è«òÉÀ!ã°»q³5!I(k þ¹[‡õ$¼©R˜ W‰}øâ3¡=¾Á´#ŸýŽÚ¬L’Þúzá;ìoŽóõ Yàê´XΗ…<È]£>Íþô Ò·ãMcÜÇ¡*ýAii<`7¾œWaDˆ¸>C$,Y§¼úR7z…÷á5À3ý¥~Õb< ¸±òK뿯¥œoÁiôåËñçÕííZAy‡iýcu5?¢DÄ®ôù}˜‹=ýT«k¼î´ß@Nh ÙΡŽTåi¹ÆñKwˆÎ{Aú)?ØBâ±­:5åÔ#øÖ7ë´Û>l›z…x×õÚÂúù\ÔyL\„:“ J{úíí~Ìf¨ÝRùÓ¢rÜÜÎ$Úþá\Ëa¾tM_C ˜ÍýxÄÄ5þv9ÒR•÷ÿ¢âïik„Xf²Ð×áöuȈT“sή´½Øت×Ñ¥ì±Ù•hjp€LhG²*H"ímâS 5Ý`änoH7éÃãÖgÚ*âM³qŠx°ÔÁj>ýŒx¤iî¿GÃñKSaÞÃöÓa̪‘ º§2m^¦Ä§V':'➺BdHn=¢E†¯¡ ¬ÊÃÀ‰"Ó KSÌ2˜bÁ_iè$òpLiù¹X*$Ðz&AÖ÷´vÝèè)%áe?PrDÒÛ©âà‹ƒwÈC´;u"‘õÚQ#3GL‰Üâ‚Q–è¥ëd¨JÏ*(äÅ¡QH8hßôÐ~WHD`¸IÕ:£¬éÔ@ˆh9´L×ú²Cör ¾Sa›¢ODë‡+æ¼mD¦4o’ Ó,ßb-­ÓµúÚžcXHOJlº²‘:ŒÌù<=’C‘p Þ4†Ê®ëo†—}]›¥›ƒyhJ³tÄSª[Íõq \ĤÄüfǹkŰ‘ü+ÀÓ™O endstream endobj 51 0 obj <>/ProcSet[/PDF/Text]>>/Rotate 0/StructParents 27/Type/Page>> endobj 52 0 obj <>stream H‰¤WksÛºýî_ñ—’‹â›b'“ÇvrÝ^·I£¶™Iîx(¶ÔÚ¤®HúÑ__€À.@@vEçýV@r±³gÏÎOwÝæ¦(;òîÝü´ëŠrM+ò}þ¡éºæžü6ÿÚ¯ºç-%óMÓÑ™/‡}.n7uÑmšš¼ÿáüŒý~䟤AH²<$;zô¯?’úèÃòh¾\ú$,jðæÖ-„ƒn`xÂý«I'½¡»{^-f4ꇯ5pÍ D*å¾â6KJŠj(?åÇy9-f¬\Þ±7ŸÝÀêY¦‰›—àÿz#OÚQ¶¿X6t|TtµèÀ»«g+™u#=­Æ/önyA¬¡Ë™MmN&‰ŸdÂÌ02Ѭý㟧dªAŽöµf(ÐþRéxv%P<úĪä0ÔŠÓ²S%š!âeq­$2¶Ö´&’ÏúBƒ‚„ƒQ˶ßÊw¶¼;®S˜]‰ølvîÐ$N†P‚Ä‹Œ¯XDkýYÆL…ΚB»¨ö"›–0H€¢Gkð£…Gz>Äm¬k…‘}] GZKXî"ô´Ð$ç ®¦¾'¿\׺{Fkæžg¦÷>’Gx‹¡£.›Þ•nw”C­‘ÉÃAêg^"0ZŠãGÄ!™å𤪹&5e™ˆÑx@·ÙQs±.ÞÜÛA–xlÈ£›ÎôNÌX¹c=Ð4ü¡÷«és«aQœtEã#5—¶6´±ÈzO áéFû6É* 톚3®o¡2'ª!Ì´éÔ„þ CèTd;‚O³’o+Ùs£™1žcûLÜÖ€k}IÝI@ ÆôË¥GI$Ó<ðR¡ÂnéÓõWzKïiÝ]Ÿí("×Ç«ç½9þáüp§B!ôs/N´ ¾ëÙ3YUk,( ÞFòha}pb —W £z£Òø™jl‰“Xï©]E±—EzfQxát…—¦©I}{‰£”œÙ‘"0ƒ=4ÄÀ6| @ÀºB†üp°³ï(±0…çãæJ?•ìÈÐÕ°JÜ»6î$̆:¯ä^"¦Øqš7iãwjõÂýʵ›¦“`Æ^Œœ}ÌŠýâär{ˆGšAÔÃñ«ÆT&kËž.—Fó”îÀ©Ü¼R€%¦2³áDZ¥LoàFÔ.-í&—#^„l’hÕ˜¬6ãEê…á¨+\hZ”ǽª%Z ß-ç7Kƒ4 ¼LxÇÛPš„Ê *º>•×V•køtݱ.‰¶ô½qÐéN2>gâ}ƒ8à™ŠõPËÞJ­Ê1<ª;ô< Û;²Õ=ò¬¦ûÂâ¹ÂEßîÞÃSlŒÿ·âÜJÄ<¯.éX˜(`”èG;Z1\MýF†ua¤€Öäq-ï.Æ©V‚s«:¦Õ”¹¡šŸ#Q·AMŒhZä-$H¸yÝîtÐ&þ«L|ßÃ~ ´]?Òy5ÅWW.okayQ4r€ñ‚(ÆÓ5¯æW*ûþöÞÅòË1r-O¾ôðh'=ŸÊF%r>3€I¤¹ÓUÏ"ñü±›Jxæ\R‹—±ßî{ÑZ#Kot‰ËN—Ì ô¿¾EJ"åÝk`¯Ò.¥=´‰µîì…SùöÖ}Ø“têÍ,©cXeշСz6ŒÙ«ðUÝŽ\“4&𢾓Y‹‘Ýæ&ì·æ4¢í>ufHCACÂz 3J_¿ÚÖR÷²0m§ÕüO•ÅÚþ†lòÿm |$Ç—ÿ)û ÉAýµgkÜ;{Ä >²ÏÂÊÀ£Ä’z7f›ØOØ”0ÊüT&áb˜éÃéê*‰ÂA˜+ ¯ ¿|PPñ·4‡Ï‚_HÊb#ijŸö2Çœ )‰©I mÿJz%n8è¬Â“½š[¥$jÄIÙÜË£1`$}‰’.Ô%51S^ßá“dºÝhÖ[¶1[úRvED°=ö­R,qá–Næ’7bS­4EÉF“aÐ2“…<ó"4ÓG}âsë°C®À¨ »ß;:ù´3äVò§T’û\­ððÛÍéu79™—êV¼©RlªpquF˜•ùgòîÝü×¢¾%‘ó«³Ës‘÷ï?œ³ç¯ßÁ8É!‰S/ŽD•2 „:g ¯‚ï s¬·îúvÃhö@()óQÎ7FuÅAAć¡3\†^ˆ @)Í­ÖÁÅ) ¬²tQѹ"ÔÖ:T-!öv„©½Áž@…fÉ"ù‘pßô^^Ò„!öÒñ:£[ïÚkâ–M¶-´n>æ¨ÔŠZšF¢ î5:~e¢à–y'7›]çĨ´’V#,kßëC¦¶¸ ñ™sÿ%Ž;w2;ônÓõÏ 9m4iˆ1|üêØ-¦M%=íË—”ÍOhâÄg”‰¦xuÇý•ˆ8è=¿Òg%^åÉ_\-$Pí±ÅÚ¯Tî<:¶.)ÊÿÊGØté¤ÌhªE;]{iæeã„]È(¿IçQîE¹À>&¹ POW‡·Ð­N2N¼täÚ’>íŽÊA$:ºÐ8 Hlú¬ ÂÜ ušµéfm0b1l$ØvJ< ÆÝ#Ij½Ë˜ì cíòé[^Ç#ÿ/x9¾Y$‡óF±b 3²)Ü™PóU{B ù´±¾ÈcXé%·d÷tì îT0©yb.m´+宨R2_fñ?Ú«¦·m†þﶘ oK;õRìl‡]Ó¢m€¡KÇýý£b“¢mu±ÜìR¤ˆ"‘|?^w ¤h/’ì–Æøšãó k’åÌkš€4Û:jt±$R©™(}1~K7Þæ™”¸*¹m¢ÆqŠåIUH˜R„ÚÆƒD?ejxáéË?Àkæh¥®’pùè`Rž ÈB÷:BwȾçrO-ŸvQx;yý4§Í}ÖŒ Ð}K²–R±²P ?‹+ó§Cµ~ÌŽ£~\ÑrØëç‰2Z¸Iˆ÷OÿŒƒmOSj#á°+©­äå]²,Â'ÏSÎüñ61ÅøïT6Á‰à*¨ŒVëaÿþ~±'ËÃAõ¡™Û#EÒè$SG.Ó—Lñ:+U+˜à´ž`re"ƒ2ËØ@ä 1xŒ}Gx“´w·7×ÎS=ƒ5¸É x®+¼déûî5T/“Ž(é… h…V ­þ+ìúÑäC‡eýpÑÏ(’§ÅNˆŠ¼G]\Ú^’·Qg7tZÚŽ•-e*[JË(¬cØ÷*¯Aã}œ”ç*ͨ-HBËC«nFm½ÐÓÐ:[X”«ÛP“´R ðߎ>û*2c74©òžë.,BµÐ]R؉Мƒ)‡â¶(t Àéç¸ßå}køðð“¼C¼ò¦Ælm:sU9 q?Þ âOGÎ{áéñHn½Ë›)ÑùhóýÃæõ©„F‘gˆ¬!çòš¯à…m2ŠZŽñç»_Ÿ6Md@P:~ÑšåU]Þ^ËœÐZÀÔ)<óW€lô‹´ endstream endobj 53 0 obj <>stream H‰úÿ ð ÀMÚªE endstream endobj 54 0 obj <> endobj 55 0 obj <> endobj 56 0 obj <>stream xœ…SËnƒ0¼ó>¦‡?€¤B $‘8ô¡Ò~±—©dÈ¿¯ñÒT$RkÉHã]-~–ïs]Ä5­,` U­•¾½ äçZ{lKT-‡¹¯lÊÎómr1ö4¹®Z/މÿfƒý`F²Ú©öžÿb˜ZŸÉê#+,..]÷ èP/Iˆ‚Ê =•ÝsÙñ]Ú:W6^ãÚæü2ÞÇw˜¡Ù*è»R‚)õ¼˜Ú“øhOâV7ñ³N•ü,c ˦”ÓÄ¡#¢Ì!Æí;‡xàPÀ\•Yý¨_Íð%¶È3ãâÖ ß!mƒ%2DˆˆÒ¿ Š.Ñz°_d·vÒD± ]„Ë.øhŠ´­óࠢŠÄ]‰KØs$0{çÇÔ=¦è9t9eÙßfÒinˆl3)ñ0[ qÚ’i™¯+(/ÆØísïÖnZ¸ZÃõ§èÚnÊšî7‘ˆïÕ endstream endobj 57 0 obj <> endobj 58 0 obj <> endobj 59 0 obj <>/Subtype/Form/Type/XObject>>stream H‰0 endstream endobj 60 0 obj <>/AP<>/BS<>/F 4/Rect[343.44 661.76 516.68 684.41]/StructParent 5/Subtype/Link>> endobj 61 0 obj <>stream True endstream endobj 62 0 obj <> endobj 63 0 obj <> endobj 64 0 obj [600 0 0 600 0 0 0 0 600 600 600 600 600 600 600 600 600 600 0 0 0 0 0 0 0 0 0 600 600 600 0 0 0 600 600 600 600 600 600 600 600 600 0 600 600 600 600 600 600 600 600 600 600 600 600 0 600 600 0 600 0 600 0 600 0 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 0 600] endobj 65 0 obj <>stream xœíZy|SU¾?çÞ›îM›¦7ûÒ$MÒ%é–­mÚ¦I›.ii Ý)-”–Ò…n”]QpT„YÙ\pA·qžâ‚2ÏQ†Gß°Ì(:Ž3O„ææýîMZ‚ËÛ>ïŸ÷ù˜_Orî¹çœßï|ËùÛ‹0BˆnC$š_ÙØìÙ;Pv´Zë³óv]8Ñ„î…ëùMî¦K_¼­@(ë*\—/è\:#â“E½×{:G—Âo"Üÿ~£zúW,úû×UE?†ü½Ý cf­Ý÷>ƒbï…†˜8æO…ëÔÞ±åϬ>~7\¿PÄ?ú‡tRÌ}é÷²×Ë—’·¡!¸s¢”ÁÎnûçm¿GÈ´!¢déÐèX`-þï°÷—Žt/í¸wð®#»Vyž¸ü43/¡è+…ØÏ«_²Øß‹‰š¯_ñŸ‰(ˆê‚¾Ñˆ@ÁŒ‹êòŸAˆ:}ý ³=¢€›)üƒÙr9j€ùE0.ü~$wMQ§‰!Þnž¨ƒ¿äoТ›èàÏ¿!"ˆR:ذוõõ•P‹øƒ2Du™)?P<¨BÞ®¦NsƒhªGkÐ6´µ¢Uè µíD·B½ÚšÑ¨ÉÑZ¤F2¤B¸…Þãh)ÐZ4Œ6¡³è#´½Žj Þƒ¶¢a¬F+áÞNT#Û‘-ƒ;O  49aäbäE¨߃3° p ’ 7Ìœƒ²P%2ݳ<€F{AŽÍÀFÛAÖ!©¿ŠÏ£Ñ)Ü‹ÅÇð1Ô?ÇÛÑv,CŨ¿‰¥øSü.~W`vs×í¸o²áZ|^‡Àº¶¡}¨íG»`þ½è!tBÏ£ÐX‚t¨† ñǨ¬¼µ¡QÜv£tXŸµ ß¡3€„â;( ÒšÀoÃÍ´mƒÖVŽÄÒߤ òA²@ 5LÓ-ÜwPhåN3A’sš¢ auYˆ4! öýÊÍ) urÚ §P†Y L€®oÐY(ç9ý¯ãÊÐuz¦iÞ:ØÆI ö¤µÐ¶sš–…Õå!²†hKx^ kÑ è—:ôà óÀF;¬ød\Eu0“¼v¬j&ùàN j œdïA?äµh8n€ßaŽ÷-Èß«Q#pÈ›¼æ°£_£%`ï¯án%pÕÁÝ(Ê, ,ÆŽŠÀ?~\;Q\yÔ‹²++çt-ñ'¯ûÿéŸÙÏü´·,}¬}ºV™¸º`my¨ ì» ¢$C3Àûè» d®éF—j˜u¬×ð:£ÓÀ³ËAæ ðíú¾Ï~ü úŽÇ™°xí Ø ž"‡ñCàwz |ô1ºú¶¢œ‚ÿĉ8t[þkÆ'ð—x¾†=è'e€Õ8ô,+^ÉY=[]Ã@[+‡@{lTÛ=X/[7Ëä°J´h@ßë¡ýiùØßa¦»ê’#7ÁuÐ#ýn¾MÐ>škÌVó¹a¾QðŒ\Ü=´ÃÕA2Ö+>|¬ñÎãwa\ Ì2¨åfaGxâ PáV¥TO€-i/ôäJ'ÍRè³íåî±½‡8Ë]rôp6À–h!€ÛTÙºó†TœDF95'+Å»'¯¿³°|ÃJà§nj;+<ëd¥•ÀñÀÉðk°ñyß*ì¾À– àÏß,|ªtöí€ó-Ü:Ø5±l“Å‚³ÕMˆ¼ô(ïq¸°cn/cW͢ʎ] 8‹$¸¡døÆÜ/…ؽ_Y‰bÀÛra©ßh‹gå]…Öhiðzv×LmºA“m¡{Ó÷à8ÁH+ƒ&?2•w“OdLgàé?¯4Vs1r>ºüÙº8ûT %È®†Øè¡C©à-XUìE(lÇ ö‘ V’ <,€™ -6¡6!Îjõ6ì÷‘°.äj°k„¡¬oÆiŒ)ÀèpZ‹÷þ8‡y‡wäZÎù!ñ 8¬ƒ‘»a¤øn£š<»Ãn·Y FƒÁh³³îB§Á‘H,ÑÉ‘:@` »Ž\G—/+«Rª”ÍUúb‰ÉŒk¼ÞW&1–ág‹\.Õ¤([×Þ)ïV‰År©ª«Ôn·?¸ØÑcJ/IÆü4‰iܳhgnnÎä»X¥×åf×Ê% ¢¯Å µÈcÊðˆ•J6›ª|JMðNB”BnM'–“×`°Ù¬œÈv»%N¬ášuZNƈšNæšE" ·Pjó*U­ns¤—É¥F~²0.^P.)Д´«”j Kbj=ž_.Ÿ¹ÉééMQ(ÔJUk~ñý³G^,/Ÿ‰ßðÌU©Âä$»Îrwëk¥CYÎv Ÿ¯IÑt¹Gžq¹ÊÓ æÛËh{uîccé¦ì²’’# ¯5€ú Nƒn§0gaáÎ¢Í -!Ì‚¾ÿ¨óPeñ"Cš);S¿ÀUu¤›ù–ϵ´¦fWŠ’„Â$Q±A?ÛÚŸc6 —Õë^¾ø…®%zsîE1­hËÏv­,ͶϔIe€ä6£äˆ$m&T(Òxn2‹<ã÷k?ÄC—®5\À{XKÞ#`DtØ¥öo!^šLÃ2¢ã"¾zз5ðÕÏ{vÔMjh \„á««~ì¿òw›©P”jìÍ)BuœNà'9´²¢g³BªŒÄI±•.׳«¶[[5:˜N3¯Ð¹©a΃îÒ¹‰’w™«ñâèè¬Iæ*ón¯ÃÕo*h’ “ÕjÅ,ÛâÇœ…%¦LC¯»úéÞ×^ð•õ¦êôZ…¼V³ V^ĪS ™&ªœ¹Ì,d>Áb¼—wĈh†ÕOøï†'`DlpD# }é ¾'0Í|Jú˜‹XÁ;ra’>žüô‹-닟Bÿ8Àk0üEr,¤Àu …/31û×3œ[üI±ž?Eì~‚¿ÆÏ†ñp’èfÚðæÏ䫨Ӡ>¸+ÜŸ÷ù¬ß@Rh’lGÀÀDÜ¡/Ça‚9°‹O›ýˆåþVf&,ì(„AYPûì0vL•DÌ s ËñÞ‘Évòg×ÈC“ÍldjX6 ‡X 3mßß§døÃ7ìý{ÝZ$¢Véu)íN綦ÆÍ…íêR¡žSèÜÒܰ±°t¡6EË\ˆågkå&¯\™Ÿ­•ºŒàëÚ¼„¸XbàýG|î~CZf†1m©·úðü÷g?ì­™ÈH3uiË«ªÇÖßÚfØ›b‰L"oµetÙ~›¿(3¿ Ü^”,o¶gvÃ*Y¯Ø ¸$B GnKX Õ± ‚R‡"'þù¹‰ãåeÕÕeåÇ'>–ž+jS)á£j+"DåÅEv->\Rì;º†ß5h4mÓLµ:ø43ê ™™À&vÿ'€®‰T½Þâ--÷9Ýs©Lªè(.ÚÞf¬Öaú7‹JæbL ?W§¨ÈÌ(“ê²â¢`Ö³AVži®V(³âøq„{rƦ’¶Í¹YYYwÌtßß8YuwqÅJSfNLt=ô{}{®k3®fÒêõ¹-JZ*)ÛìºZcnÔ—öhi±|F¶¹ŸµŸ;Ù#€l2슬WذýàÚnF—ÆIØÌ¼^Ô©Óêk¼¯®`$Xú¯…³Õ:\¦^à&RüÿO´Ë}y¹kêúq8 蔋ø …LÙ^˜S§ÐéÁÒۥkrtšä¶:? ¨5CýøDAT,ƒŒ„ùñY¬ÂÏ3§®Ê¥W˜S0ƒoAù,Û[½_íY$%¹?bi€yßÏÌ£ ŽÅUPÛÍJÄø³üZ"Éÿ9ñ!ñ.âN@ˆz#ȳB†1bÞÆ¯`,Áøó) ˜lòOâ«äs¬Ž5Tä]Õ¬”6и \Ëš0ýÓt¸êCqM$2jà ÅBsx’¹XF‹*JJïx¼ÐYŒE‚¤äRS^T"Ù³üyWEE~^ÞÆFK›>µHÌãŒÎädZ¡TÎqoŽËP*«é#­ø¹?ÎÎÎqdg¯ö*sBZ*†$ 43ݼqvÅDffŽPh’*­O ¹J½K,’¾@§'&&³ëÚëšÀ»Ê¾#¢€]X7Ggý7ƒ‰àadŽ.U\¤Ï¯°´êeYÉÌåkñƒ(½ÇåͲԈis92*ƨé3ˤ´:.Z/¯ÍÓŠuºØè("‰î:ìͬ–iSišoi×ШHŸ Rë4º>·sã:£Nc®%&% Ò¥øI¡&^®äît]hw²Ã"ДvAmX¬ J©±‡i-\CFˆm#úËZ¥²dZ&mñ˜kår#ˆòâ’ƒ ×üª´´Ô]êzií-?s¹ª æ¡V(|§ìfÓ¸KU2f6ÛÕ2YUÚü={Q‹Ï÷úˆjäuŸ¯Ùiµni2”ˆDÀ{)àx‹Ù̯ñ±°ž’‹wCbÁÎK ö} :î±ð¯3Ÿä­kîÞ‘ ‹$2Y£³r®B1¯Ê9K&zzÙ›ÕÕ®áä?—_ÜP]ýöº|Âl²;Ÿ½$Ï”9ŽB’ôNZ8U /ˆ`œV©Mc³~ %aȶ5œ¾‰ÝûþlÛ˜³{Va—Aoâz\¥Ïޝ¨¨«Žsl3Š&?&M¥¬K^Y³³¤$U“Rï&—Mœ¬¨˜1Ëç;½:màåŠÊYä:BYgÙZÔj ëkÁ;o0³O8;¹óC¸T·ðnH»îdVJeÊ® ÷|C’Ö¥V»uCÇ ÷fó+rà´3§V¦N‰‹ú}D Eñ òóYâ<Í®˜i¡*9®¿I°<:<âG†Ù¿M ‹ “wSÔ„yÅpqAÁCÝ–v½Ô”¬V¦Ì+6Tj´%ò5º.‡ciîȯÊËjü±É9 }‡cÑÃÅX¬P*Zœ)±<#oJœ©Î…B>¥NQ2?UTâhSi´ ÙêÇÍnPK±Óyx÷HÓh:LÑq±ñ Æ.MãÇó9uc8=#ªìŽÍO¸¤2Ìki¸ Ó7>À\Æ¢D£DVªÏPbQŲ¹¹°7Sa!Jt\Cd<­ãó¥2YS¡ˆøñÄã0—Vl\ϧjÞÈåáy/žL+Èç,¶2o“#̘÷Ä4íLõµ¶úR4-¦ /ø7BV܆é¤Ynw£H˜ì`µöSCÃìJ8#7ÌþýªŽÓì° TRYeZLºHœÇOÒ e6ÙÀA§³„y¿µŠeík¾“[¬^šNÂæ‘ç©‚$r,y{ú©FL—6±r´–[`…‡Ëoåé©À¦™ÉÆ»˜§˜3M,ŠøeÆMLàW˜ç擃×ö±þ:›§GpOõoàó:.g^$·1§"Ð…ë'ÏŸç© 'äÌÔr°ÑBà¤XnVšE`µÚ¾Ù¼§ þÍÏ‹‹ŠU$%*bcâ¾âñ£c¥‰ ÊØØx¿NÒœkôÈh?Z*êÔTáõ×ÈŒxQTl\tllšzò©Šã±‚ÈȨèØ8h¸NR³×¤S““øF ›…I3+PÈÊA^5{ªýOL,Ò¨Û„Å|--+K ™˜#7ï®Y¥#9Šgb«¦ m+3ŸjÙ”̵Q#}p‘F ¾)Ì„£µ‹„bc‡}Ñ~»ÍÍû{òZSUVQ  žâB¾¾H,ÑÇó2q¾ÖÙ(—I™ù˜¡µ|‘¸ÉW}j½ê­êªzZ˜˜)ïóN—M€° ü„ ~U‘Á‹ÏËä¤i ¦¥½)‚Âþ»±®\”Ó¨“çÑXü•€Î‘:ì=ØùX$•ƒ°:§X’Êç§JذÖ(“IÖ|Bß a(Þïe‰"IC¼&“"—QÊXeéüø€vXfóÄN–o™ŒÆ›â˜Ð` w<ç!b?àW˜®mµ[Géš%TÝâ9’û¯¿FÜ“U. ãã1#k] vÔ óýor|ú{süJ©T6ÓnnÖh2HæŠÛåúåÊ¡c¥.¯·¸ø±®ò6È-Ä"I­¥¨Yš”„Ež×±áþÃEE¥®üü}ójºTJ1N—f$& !¿q™u¾Ù½“ Y„±Ð"Ô±C‚_ürT$žøò_ |áø ãÂø™ áô¿Sܾ¸‡¸Í¿¦§‡¸ƒ=Â<Ã<Óg ¡;k¬¾ÌœÁ}Ì]Ø|åkl‚ß%Ìâc<ËÿWÿ9ÜÅì'Œ„•ÃÊÔP§a<Èã"?%út ­ƒM ç7­ÊÌ,H"ôÌé+骫Ì;øTiœ )É¢I´ ´©N¦&?=}~:õ}ÿ ±òú—"‰D’N¾\À9¨!àûI7fsvübádÑà˜üú#âØÏÎû›Ä>ßzróNBôÌ@N67äp+Á°½ÜìôáN‚á B¹=Å%Gž,.ñ”•âuôïŽ Å辆™ëVöÙâ?^ÜWUÛp™E>#Óp;kÝáyÆ£½ím‹{fw,zhFoO]]ß’@cúÈ[¨m”ÍG6²NÝóP-÷í#•ü?…G¥N.=wî;¿ŒH¢:ˆgï°'tªcòe"éO‚5JÉ/ÈÛ^ð©­¶}üþ˯âçNåmïf:ñ#ýƒÌ\˜©që"‘‘Í—¦•ãÛOaCQÍÛ3õúǸÃnlHÕ:E‰r…XæMS—¦Ø¡Ñ±@¯Ï$D›¯.îû¹§l®t§jvqþÎ6×ûkd·þ®}ÎÞS¹d—ô–²²Ÿ/îûš]MÈ0’áFDœŠ™7žp³ˆ¥!‡MCwAÁò›ªX™9CNK¥´ÔmÔTèlÐXÐm0˜ˆBÑÝ_õõ=é-Ÿ/Ý!v§—\Òòö2ÙŠwZæî*²Ìí”Î÷–?Ù×÷+Ãæ(Y±;ôÌ‚žN@Ö3nüòAÞ+g¯ŠÏF8§z5„zAÐÔA~†·:„Gì>ûõɳ‘Ÿ@³‹üuD1ûÿ·#"¢ÁÈíð¬èbãÔ¹)BGç‰Bç'ò°6Ï•”?¶zÕ8/!ÁS¬í¼7Óš³úÖ[Wg昷2»ö³yÈ~`♜œç&؇Ìf±ÏWXö‹æ?{clÃúŸz=­¬”µ Á%Àv#žJ.8Oµi§å§Ž´‡à倞zDÈ©¸V»`«Ùœ• lô-VŠh½)ë¾%ÚbOBÏ&÷å8›áüÁOJrÚßìõô\Š fTÃdùÔdqúâEfæö9ö^´…Põì^Ð-Ðz¦)ÿƒòr"urãœð¬Dúæ3[ÿÄÊñAà q1yÙlý#BÃøý­‰0ý{7~‚º?ôT‹…BÖyBPIh™ËO¿÷ÞSÌ—x³‡¹×ø‡Tæn¹’y~^ÌÜ»—uüæ~†™ù(wžLgw(î?iì‹´-6Wt$[Øÿ°¶#¡…$î®~ºÚÿ‘õʹšc¾7}OÕ0W>µ2ÌEhUYÞ´àÝÌ"¼ûq¬=„„ÄÊ!æÃÇCṁÓÿaT¢ ô;¬À6\ƒŸÂoá øY„„•˜A'¾$ÈÇ) •IÍ£–ý„:Jå)ywòÎDÈ"EìŽDVDŽG>y6ò³¨ò¨‰¨“ÑŠèÑè=1Ñ1ž˜á˜»bǼˆÅŽÄ®ÿ?¢!z>ö_>Ñ'±ÿ Rÿ[Ôw_ÜOãž»ïãhÁ4Mp´yšö/ýKü×?Ðôý@?ÐÿOâö»8´“}›‡b߇=ÆåÍl#\ëŠÂ‰¡:‰¬ÓíÊA‡ê<$Ã’P=©p^¨ÎGvܬcà…ï Õãỏ ý¾P=Åàý¨,ô–×ZŒzP/ãÞbßÔ±±ïBK7ü΂^]PÆ ¤ ð=ÈÕ¸·¼ú Ïn¤Ão/´ Qî=$vÆ1à0Š Q6Pða{ŒÃ|Y0j p­C@=¨fZÄÍ>#²¹Ù§ø„¸¦Ãùƒ¥Vª~½ ¾Ùz#j†ú<@.ø5r\Faαÿ昨  Q Œb×°˜ãš‚, m‡K8SH˜§Ç}s½,ºÝÐgjUý0ã®…•+‹CªäêžÆ¿Jg¨ß,nÝÐ;ø6ûöVûøw|0œÙwŒ¢¸÷Ç’¹ïTDLôôޱ/‘-ëìÇlöm2ö½2¬ 86XŽ'^ ÕcÀòU^QÛ„T VŒô#YÏH÷$ëïD2nÅIĽWö†YZ÷ endstream endobj 66 0 obj <> endobj 67 0 obj <>/Subtype/Form/Type/XObject>>stream H‰0 endstream endobj 68 0 obj <>/Subtype/Form/Type/XObject>>stream H‰0 endstream endobj 69 0 obj <>/Subtype/Form/Type/XObject>>stream H‰0 endstream endobj 70 0 obj <>/Subtype/Form/Type/XObject>>stream H‰0 endstream endobj 71 0 obj <>/AP<>/BS<>/F 4/Rect[325.13 410.69 397.51 425.24]/StructParent 28/Subtype/Link>> endobj 72 0 obj <>/AP<>/BS<>/F 4/Rect[93.4 396.14 193.3 410.69]/StructParent 29/Subtype/Link>> endobj 73 0 obj <>/AP<>/BS<>/F 4/Rect[142.91 381.6 253.96 396.14]/StructParent 30/Subtype/Link>> endobj 74 0 obj <>/AP<>/BS<>/F 4/Rect[207.13 357.05 312.07 381.6]/StructParent 31/Subtype/Link>> endobj 75 0 obj <>/Type/StructTreeRoot>> endobj 76 0 obj <> endobj 77 0 obj [111 0 R 112 0 R 113 0 R 114 0 R 115 0 R 116 0 R 1008 0 R 1029 0 R 1009 0 R 1027 0 R 1010 0 R 118 0 R] endobj 78 0 obj <> endobj 79 0 obj <> endobj 80 0 obj [119 0 R 1007 0 R 1005 0 R 1006 0 R 1002 0 R 1001 0 R 999 0 R 1000 0 R 996 0 R 995 0 R 993 0 R 994 0 R 990 0 R 989 0 R 987 0 R 988 0 R 984 0 R 983 0 R 981 0 R 982 0 R 978 0 R 977 0 R 976 0 R 973 0 R 972 0 R 971 0 R 968 0 R 121 0 R 122 0 R 123 0 R 124 0 R 125 0 R 126 0 R] endobj 81 0 obj [127 0 R 958 0 R 1025 0 R 959 0 R 129 0 R 130 0 R 131 0 R 132 0 R 133 0 R 134 0 R 135 0 R 136 0 R 137 0 R 138 0 R] endobj 82 0 obj <> endobj 83 0 obj [139 0 R 140 0 R 141 0 R 142 0 R 143 0 R 144 0 R 145 0 R 146 0 R 147 0 R 148 0 R 149 0 R 957 0 R 956 0 R 955 0 R 954 0 R 953 0 R 952 0 R 951 0 R 950 0 R 949 0 R 948 0 R 947 0 R 946 0 R 945 0 R 151 0 R 931 0 R] endobj 84 0 obj [929 0 R 154 0 R 927 0 R 926 0 R 925 0 R 156 0 R 921 0 R 920 0 R 158 0 R 159 0 R 160 0 R 161 0 R 162 0 R 163 0 R 164 0 R 165 0 R 166 0 R 917 0 R 916 0 R 915 0 R] endobj 85 0 obj [911 0 R 910 0 R 169 0 R 907 0 R 171 0 R 905 0 R 904 0 R 903 0 R 902 0 R 901 0 R 173 0 R 895 0 R 894 0 R 175 0 R 176 0 R 177 0 R] endobj 86 0 obj [891 0 R 890 0 R 889 0 R 888 0 R 179 0 R 883 0 R 181 0 R 881 0 R 880 0 R 183 0 R 877 0 R 185 0 R 186 0 R 187 0 R 188 0 R 189 0 R 190 0 R 191 0 R 192 0 R 193 0 R 875 0 R 874 0 R 873 0 R 195 0 R 869 0 R] endobj 87 0 obj [867 0 R 866 0 R 865 0 R 864 0 R 198 0 R 858 0 R 200 0 R 856 0 R 202 0 R 203 0 R 204 0 R 854 0 R 206 0 R 852 0 R 208 0 R 850 0 R 210 0 R 848 0 R 212 0 R] endobj 88 0 obj [213 0 R 214 0 R 215 0 R 216 0 R 846 0 R 845 0 R 844 0 R 843 0 R 842 0 R 841 0 R 840 0 R 218 0 R 832 0 R 831 0 R 830 0 R 829 0 R 220 0 R 824 0 R 222 0 R 822 0 R 821 0 R 820 0 R 819 0 R] endobj 89 0 obj [224 0 R 225 0 R 226 0 R 227 0 R 228 0 R 229 0 R 814 0 R 813 0 R 812 0 R 811 0 R 810 0 R 809 0 R 808 0 R 231 0 R 232 0 R 800 0 R 799 0 R 234 0 R 796 0 R 236 0 R] endobj 90 0 obj [237 0 R 238 0 R 239 0 R 240 0 R 794 0 R 242 0 R 243 0 R 244 0 R 245 0 R 246 0 R 792 0 R 791 0 R 790 0 R 789 0 R 788 0 R 787 0 R 248 0 R 779 0 R 778 0 R 250 0 R 775 0 R 252 0 R 773 0 R] endobj 91 0 obj [254 0 R 255 0 R 256 0 R 257 0 R 258 0 R 259 0 R 260 0 R 261 0 R 262 0 R 263 0 R 771 0 R 770 0 R 769 0 R 768 0 R 766 0 R 765 0 R 763 0 R 762 0 R 761 0 R 265 0 R 751 0 R 267 0 R 749 0 R 748 0 R] endobj 92 0 obj [269 0 R 745 0 R 744 0 R 271 0 R 272 0 R 273 0 R 274 0 R 275 0 R 741 0 R 740 0 R 739 0 R 736 0 R 735 0 R 733 0 R 732 0 R 731 0 R 730 0 R 729 0 R 728 0 R 727 0 R 726 0 R 725 0 R 724 0 R 723 0 R 722 0 R 716 0 R 706 0 R 277 0 R 698 0 R] endobj 93 0 obj [279 0 R 696 0 R 695 0 R 281 0 R 692 0 R 283 0 R 284 0 R 285 0 R 286 0 R 287 0 R 288 0 R 289 0 R 290 0 R 291 0 R 292 0 R 293 0 R 690 0 R 689 0 R 688 0 R 687 0 R 686 0 R 685 0 R 684 0 R 683 0 R 682 0 R 681 0 R 677 0 R 676 0 R] endobj 94 0 obj [665 0 R 664 0 R 663 0 R 662 0 R 661 0 R 660 0 R 296 0 R 653 0 R 652 0 R 651 0 R 650 0 R 649 0 R 648 0 R 298 0 R 641 0 R 640 0 R 639 0 R 300 0 R 635 0 R] endobj 95 0 obj [302 0 R 303 0 R 304 0 R 305 0 R 306 0 R 307 0 R 308 0 R 309 0 R 310 0 R 311 0 R 633 0 R 632 0 R 631 0 R 630 0 R 629 0 R 628 0 R 626 0 R 625 0 R 624 0 R 623 0 R 622 0 R 621 0 R 620 0 R 619 0 R] endobj 96 0 obj [313 0 R 604 0 R 315 0 R 602 0 R 601 0 R 600 0 R 317 0 R 596 0 R 595 0 R 594 0 R 319 0 R 320 0 R 321 0 R 322 0 R 323 0 R 324 0 R 325 0 R 326 0 R 327 0 R 328 0 R 329 0 R 330 0 R 331 0 R 332 0 R 333 0 R 334 0 R 590 0 R 589 0 R 588 0 R] endobj 97 0 obj [584 0 R 583 0 R 582 0 R 581 0 R 580 0 R 579 0 R 578 0 R 577 0 R 576 0 R 575 0 R 574 0 R 573 0 R 572 0 R 570 0 R 569 0 R 568 0 R 567 0 R 566 0 R 565 0 R 564 0 R 563 0 R 558 0 R] endobj 98 0 obj [538 0 R 537 0 R 338 0 R 534 0 R 533 0 R 532 0 R 340 0 R 528 0 R 527 0 R 342 0 R 524 0 R 523 0 R 344 0 R 345 0 R 346 0 R 347 0 R 348 0 R 520 0 R 519 0 R 518 0 R 517 0 R 516 0 R 515 0 R 514 0 R 514 0 R 514 0 R 514 0 R 514 0 R 514 0 R 514 0 R 514 0 R] endobj 99 0 obj [506 0 R 351 0 R 352 0 R 353 0 R 354 0 R 355 0 R 356 0 R 357 0 R 504 0 R 503 0 R 359 0 R 500 0 R 361 0 R 498 0 R 363 0 R] endobj 100 0 obj [364 0 R 365 0 R 366 0 R 367 0 R 496 0 R 369 0 R 494 0 R 371 0 R 492 0 R 373 0 R 374 0 R 375 0 R 376 0 R 377 0 R 378 0 R 379 0 R 380 0 R 381 0 R 382 0 R 383 0 R 384 0 R 385 0 R 386 0 R] endobj 101 0 obj [387 0 R 388 0 R 389 0 R 390 0 R 391 0 R 392 0 R 393 0 R 394 0 R 395 0 R 396 0 R 397 0 R 398 0 R 399 0 R 400 0 R 401 0 R 402 0 R 403 0 R 404 0 R 405 0 R 406 0 R 407 0 R 408 0 R 409 0 R 410 0 R 411 0 R] endobj 102 0 obj [412 0 R 413 0 R 414 0 R 415 0 R 416 0 R 417 0 R 418 0 R 419 0 R 420 0 R 421 0 R 422 0 R 423 0 R 424 0 R 425 0 R 426 0 R 427 0 R 428 0 R 429 0 R 430 0 R 431 0 R 432 0 R 433 0 R 434 0 R 435 0 R 436 0 R 437 0 R 438 0 R 439 0 R 440 0 R 441 0 R 442 0 R 443 0 R 444 0 R 445 0 R 446 0 R 447 0 R 448 0 R 449 0 R 450 0 R 451 0 R 452 0 R 453 0 R 454 0 R] endobj 103 0 obj [455 0 R 456 0 R 457 0 R 458 0 R 459 0 R 460 0 R 461 0 R 462 0 R 463 0 R 464 0 R 465 0 R 466 0 R 467 0 R 468 0 R 469 0 R 470 0 R 471 0 R 472 0 R 473 0 R 474 0 R 475 0 R 476 0 R 477 0 R 478 0 R 479 0 R 480 0 R 481 0 R 482 0 R] endobj 104 0 obj [483 0 R 484 0 R 485 0 R 486 0 R 487 0 R 488 0 R 1011 0 R 1023 0 R 1012 0 R 1021 0 R 1013 0 R 1019 0 R 1014 0 R 1017 0 R 1015 0 R 489 0 R 490 0 R] endobj 105 0 obj <> endobj 106 0 obj <> endobj 107 0 obj <> endobj 108 0 obj <> endobj 109 0 obj <> endobj 110 0 obj <> endobj 111 0 obj <> endobj 112 0 obj <> endobj 113 0 obj <> endobj 114 0 obj <> endobj 115 0 obj <> endobj 116 0 obj <> endobj 117 0 obj <> endobj 118 0 obj <> endobj 119 0 obj <> endobj 120 0 obj <> endobj 121 0 obj <> endobj 122 0 obj <> endobj 123 0 obj <> endobj 124 0 obj <> endobj 125 0 obj <> endobj 126 0 obj <> endobj 127 0 obj <> endobj 128 0 obj <> endobj 129 0 obj <> endobj 130 0 obj <> endobj 131 0 obj <> endobj 132 0 obj <> endobj 133 0 obj <> endobj 134 0 obj <> endobj 135 0 obj <> endobj 136 0 obj <> endobj 137 0 obj <> endobj 138 0 obj <> endobj 139 0 obj <> endobj 140 0 obj <> endobj 141 0 obj <> endobj 142 0 obj <> endobj 143 0 obj <> endobj 144 0 obj <> endobj 145 0 obj <> endobj 146 0 obj <> endobj 147 0 obj <> endobj 148 0 obj <> endobj 149 0 obj <> endobj 150 0 obj <> endobj 151 0 obj <> endobj 152 0 obj <> endobj 153 0 obj <> endobj 154 0 obj <> endobj 155 0 obj <> endobj 156 0 obj <> endobj 157 0 obj <> endobj 158 0 obj <> endobj 159 0 obj <> endobj 160 0 obj <> endobj 161 0 obj <> endobj 162 0 obj <> endobj 163 0 obj <> endobj 164 0 obj <> endobj 165 0 obj <> endobj 166 0 obj <> endobj 167 0 obj <> endobj 168 0 obj <> endobj 169 0 obj <> endobj 170 0 obj <> endobj 171 0 obj <> endobj 172 0 obj <> endobj 173 0 obj <> endobj 174 0 obj <> endobj 175 0 obj <> endobj 176 0 obj <> endobj 177 0 obj <> endobj 178 0 obj <> endobj 179 0 obj <> endobj 180 0 obj <> endobj 181 0 obj <> endobj 182 0 obj <> endobj 183 0 obj <> endobj 184 0 obj <> endobj 185 0 obj <> endobj 186 0 obj <> endobj 187 0 obj <> endobj 188 0 obj <> endobj 189 0 obj <> endobj 190 0 obj <> endobj 191 0 obj <> endobj 192 0 obj <> endobj 193 0 obj <> endobj 194 0 obj <> endobj 195 0 obj <> endobj 196 0 obj <> endobj 197 0 obj <> endobj 198 0 obj <> endobj 199 0 obj <> endobj 200 0 obj <> endobj 201 0 obj <> endobj 202 0 obj <> endobj 203 0 obj <> endobj 204 0 obj <> endobj 205 0 obj <> endobj 206 0 obj <> endobj 207 0 obj <> endobj 208 0 obj <> endobj 209 0 obj <> endobj 210 0 obj <> endobj 211 0 obj <> endobj 212 0 obj <> endobj 213 0 obj <> endobj 214 0 obj <> endobj 215 0 obj <> endobj 216 0 obj <> endobj 217 0 obj <> endobj 218 0 obj <> endobj 219 0 obj <> endobj 220 0 obj <> endobj 221 0 obj <> endobj 222 0 obj <> endobj 223 0 obj <> endobj 224 0 obj <> endobj 225 0 obj <> endobj 226 0 obj <> endobj 227 0 obj <> endobj 228 0 obj <> endobj 229 0 obj <> endobj 230 0 obj <> endobj 231 0 obj <> endobj 232 0 obj <> endobj 233 0 obj <> endobj 234 0 obj <> endobj 235 0 obj <> endobj 236 0 obj <> endobj 237 0 obj <> endobj 238 0 obj <> endobj 239 0 obj <> endobj 240 0 obj <> endobj 241 0 obj <> endobj 242 0 obj <> endobj 243 0 obj <> endobj 244 0 obj <> endobj 245 0 obj <> endobj 246 0 obj <> endobj 247 0 obj <> endobj 248 0 obj <> endobj 249 0 obj <> endobj 250 0 obj <> endobj 251 0 obj <> endobj 252 0 obj <> endobj 253 0 obj <> endobj 254 0 obj <> endobj 255 0 obj <> endobj 256 0 obj <> endobj 257 0 obj <> endobj 258 0 obj <> endobj 259 0 obj <> endobj 260 0 obj <> endobj 261 0 obj <> endobj 262 0 obj <> endobj 263 0 obj <> endobj 264 0 obj <> endobj 265 0 obj <> endobj 266 0 obj <> endobj 267 0 obj <> endobj 268 0 obj <> endobj 269 0 obj <> endobj 270 0 obj <> endobj 271 0 obj <> endobj 272 0 obj <> endobj 273 0 obj <> endobj 274 0 obj <> endobj 275 0 obj <> endobj 276 0 obj <> endobj 277 0 obj <> endobj 278 0 obj <> endobj 279 0 obj <> endobj 280 0 obj <> endobj 281 0 obj <> endobj 282 0 obj <> endobj 283 0 obj <> endobj 284 0 obj <> endobj 285 0 obj <> endobj 286 0 obj <> endobj 287 0 obj <> endobj 288 0 obj <> endobj 289 0 obj <> endobj 290 0 obj <> endobj 291 0 obj <> endobj 292 0 obj <> endobj 293 0 obj <> endobj 294 0 obj <> endobj 295 0 obj <> endobj 296 0 obj <> endobj 297 0 obj <> endobj 298 0 obj <> endobj 299 0 obj <> endobj 300 0 obj <> endobj 301 0 obj <> endobj 302 0 obj <> endobj 303 0 obj <> endobj 304 0 obj <> endobj 305 0 obj <> endobj 306 0 obj <> endobj 307 0 obj <> endobj 308 0 obj <> endobj 309 0 obj <> endobj 310 0 obj <> endobj 311 0 obj <> endobj 312 0 obj <> endobj 313 0 obj <> endobj 314 0 obj <> endobj 315 0 obj <> endobj 316 0 obj <> endobj 317 0 obj <> endobj 318 0 obj <> endobj 319 0 obj <> endobj 320 0 obj <> endobj 321 0 obj <> endobj 322 0 obj <> endobj 323 0 obj <> endobj 324 0 obj <> endobj 325 0 obj <> endobj 326 0 obj <> endobj 327 0 obj <> endobj 328 0 obj <> endobj 329 0 obj <> endobj 330 0 obj <> endobj 331 0 obj <> endobj 332 0 obj <> endobj 333 0 obj <> endobj 334 0 obj <> endobj 335 0 obj <> endobj 336 0 obj <> endobj 337 0 obj <> endobj 338 0 obj <> endobj 339 0 obj <> endobj 340 0 obj <> endobj 341 0 obj <> endobj 342 0 obj <> endobj 343 0 obj <> endobj 344 0 obj <> endobj 345 0 obj <> endobj 346 0 obj <> endobj 347 0 obj <> endobj 348 0 obj <> endobj 349 0 obj <> endobj 350 0 obj <> endobj 351 0 obj <> endobj 352 0 obj <> endobj 353 0 obj <> endobj 354 0 obj <> endobj 355 0 obj <> endobj 356 0 obj <> endobj 357 0 obj <> endobj 358 0 obj <> endobj 359 0 obj <> endobj 360 0 obj <> endobj 361 0 obj <> endobj 362 0 obj <> endobj 363 0 obj <> endobj 364 0 obj <> endobj 365 0 obj <> endobj 366 0 obj <> endobj 367 0 obj <> endobj 368 0 obj <> endobj 369 0 obj <> endobj 370 0 obj <> endobj 371 0 obj <> endobj 372 0 obj <> endobj 373 0 obj <> endobj 374 0 obj <> endobj 375 0 obj <> endobj 376 0 obj <> endobj 377 0 obj <> endobj 378 0 obj <> endobj 379 0 obj <> endobj 380 0 obj <> endobj 381 0 obj <> endobj 382 0 obj <> endobj 383 0 obj <> endobj 384 0 obj <> endobj 385 0 obj <> endobj 386 0 obj <> endobj 387 0 obj <> endobj 388 0 obj <> endobj 389 0 obj <> endobj 390 0 obj <> endobj 391 0 obj <> endobj 392 0 obj <> endobj 393 0 obj <> endobj 394 0 obj <> endobj 395 0 obj <> endobj 396 0 obj <> endobj 397 0 obj <> endobj 398 0 obj <> endobj 399 0 obj <> endobj 400 0 obj <> endobj 401 0 obj <> endobj 402 0 obj <> endobj 403 0 obj <> endobj 404 0 obj <> endobj 405 0 obj <> endobj 406 0 obj <> endobj 407 0 obj <> endobj 408 0 obj <> endobj 409 0 obj <> endobj 410 0 obj <> endobj 411 0 obj <> endobj 412 0 obj <> endobj 413 0 obj <> endobj 414 0 obj <> endobj 415 0 obj <> endobj 416 0 obj <> endobj 417 0 obj <> endobj 418 0 obj <> endobj 419 0 obj <> endobj 420 0 obj <> endobj 421 0 obj <> endobj 422 0 obj <> endobj 423 0 obj <> endobj 424 0 obj <> endobj 425 0 obj <> endobj 426 0 obj <> endobj 427 0 obj <> endobj 428 0 obj <> endobj 429 0 obj <> endobj 430 0 obj <> endobj 431 0 obj <> endobj 432 0 obj <> endobj 433 0 obj <> endobj 434 0 obj <> endobj 435 0 obj <> endobj 436 0 obj <> endobj 437 0 obj <> endobj 438 0 obj <> endobj 439 0 obj <> endobj 440 0 obj <> endobj 441 0 obj <> endobj 442 0 obj <> endobj 443 0 obj <> endobj 444 0 obj <> endobj 445 0 obj <> endobj 446 0 obj <> endobj 447 0 obj <> endobj 448 0 obj <> endobj 449 0 obj <> endobj 450 0 obj <> endobj 451 0 obj <> endobj 452 0 obj <> endobj 453 0 obj <> endobj 454 0 obj <> endobj 455 0 obj <> endobj 456 0 obj <> endobj 457 0 obj <> endobj 458 0 obj <> endobj 459 0 obj <> endobj 460 0 obj <> endobj 461 0 obj <> endobj 462 0 obj <> endobj 463 0 obj <> endobj 464 0 obj <> endobj 465 0 obj <> endobj 466 0 obj <> endobj 467 0 obj <> endobj 468 0 obj <> endobj 469 0 obj <> endobj 470 0 obj <> endobj 471 0 obj <> endobj 472 0 obj <> endobj 473 0 obj <> endobj 474 0 obj <> endobj 475 0 obj <> endobj 476 0 obj <> endobj 477 0 obj <> endobj 478 0 obj <> endobj 479 0 obj <> endobj 480 0 obj <> endobj 481 0 obj <> endobj 482 0 obj <> endobj 483 0 obj <> endobj 484 0 obj <> endobj 485 0 obj <> endobj 486 0 obj <> endobj 487 0 obj <> endobj 488 0 obj <> endobj 489 0 obj <> endobj 490 0 obj <> endobj 491 0 obj <> endobj 492 0 obj <> endobj 493 0 obj <> endobj 494 0 obj <> endobj 495 0 obj <> endobj 496 0 obj <> endobj 497 0 obj <> endobj 498 0 obj <> endobj 499 0 obj <> endobj 500 0 obj <> endobj 501 0 obj <> endobj 502 0 obj <> endobj 503 0 obj <> endobj 504 0 obj <> endobj 505 0 obj <> endobj 506 0 obj <> endobj 507 0 obj <> endobj 508 0 obj <> endobj 509 0 obj <> endobj 510 0 obj <> endobj 511 0 obj <> endobj 512 0 obj <> endobj 513 0 obj <> endobj 514 0 obj <> endobj 515 0 obj <> endobj 516 0 obj <> endobj 517 0 obj <> endobj 518 0 obj <> endobj 519 0 obj <> endobj 520 0 obj <> endobj 521 0 obj <> endobj 522 0 obj <> endobj 523 0 obj <> endobj 524 0 obj <> endobj 525 0 obj <> endobj 526 0 obj <> endobj 527 0 obj <> endobj 528 0 obj <> endobj 529 0 obj <> endobj 530 0 obj <> endobj 531 0 obj <> endobj 532 0 obj <> endobj 533 0 obj <> endobj 534 0 obj <> endobj 535 0 obj <> endobj 536 0 obj <> endobj 537 0 obj <> endobj 538 0 obj <> endobj 539 0 obj <> endobj 540 0 obj <> endobj 541 0 obj <> endobj 542 0 obj <> endobj 543 0 obj <> endobj 544 0 obj <> endobj 545 0 obj <> endobj 546 0 obj <> endobj 547 0 obj <> endobj 548 0 obj <> endobj 549 0 obj <> endobj 550 0 obj <> endobj 551 0 obj <> endobj 552 0 obj <> endobj 553 0 obj <> endobj 554 0 obj <> endobj 555 0 obj <> endobj 556 0 obj <> endobj 557 0 obj <> endobj 558 0 obj <> endobj 559 0 obj <> endobj 560 0 obj <> endobj 561 0 obj <> endobj 562 0 obj <> endobj 563 0 obj <> endobj 564 0 obj <> endobj 565 0 obj <> endobj 566 0 obj <> endobj 567 0 obj <> endobj 568 0 obj <> endobj 569 0 obj <> endobj 570 0 obj <> endobj 571 0 obj <> endobj 572 0 obj <> endobj 573 0 obj <> endobj 574 0 obj <> endobj 575 0 obj <> endobj 576 0 obj <> endobj 577 0 obj <> endobj 578 0 obj <> endobj 579 0 obj <> endobj 580 0 obj <> endobj 581 0 obj <> endobj 582 0 obj <> endobj 583 0 obj <> endobj 584 0 obj <> endobj 585 0 obj <> endobj 586 0 obj <> endobj 587 0 obj <> endobj 588 0 obj <> endobj 589 0 obj <> endobj 590 0 obj <> endobj 591 0 obj <> endobj 592 0 obj <> endobj 593 0 obj <> endobj 594 0 obj <> endobj 595 0 obj <> endobj 596 0 obj <> endobj 597 0 obj <> endobj 598 0 obj <> endobj 599 0 obj <> endobj 600 0 obj <> endobj 601 0 obj <> endobj 602 0 obj <> endobj 603 0 obj <> endobj 604 0 obj <> endobj 605 0 obj <> endobj 606 0 obj <> endobj 607 0 obj <> endobj 608 0 obj <> endobj 609 0 obj <> endobj 610 0 obj <> endobj 611 0 obj <> endobj 612 0 obj <> endobj 613 0 obj <> endobj 614 0 obj <> endobj 615 0 obj <> endobj 616 0 obj <> endobj 617 0 obj <> endobj 618 0 obj <> endobj 619 0 obj <> endobj 620 0 obj <> endobj 621 0 obj <> endobj 622 0 obj <> endobj 623 0 obj <> endobj 624 0 obj <> endobj 625 0 obj <> endobj 626 0 obj <> endobj 627 0 obj <> endobj 628 0 obj <> endobj 629 0 obj <> endobj 630 0 obj <> endobj 631 0 obj <> endobj 632 0 obj <> endobj 633 0 obj <> endobj 634 0 obj <> endobj 635 0 obj <> endobj 636 0 obj <> endobj 637 0 obj <> endobj 638 0 obj <> endobj 639 0 obj <> endobj 640 0 obj <> endobj 641 0 obj <> endobj 642 0 obj <> endobj 643 0 obj <> endobj 644 0 obj <> endobj 645 0 obj <> endobj 646 0 obj <> endobj 647 0 obj <> endobj 648 0 obj <> endobj 649 0 obj <> endobj 650 0 obj <> endobj 651 0 obj <> endobj 652 0 obj <> endobj 653 0 obj <> endobj 654 0 obj <> endobj 655 0 obj <> endobj 656 0 obj <> endobj 657 0 obj <> endobj 658 0 obj <> endobj 659 0 obj <> endobj 660 0 obj <> endobj 661 0 obj <> endobj 662 0 obj <> endobj 663 0 obj <> endobj 664 0 obj <> endobj 665 0 obj <> endobj 666 0 obj <> endobj 667 0 obj <> endobj 668 0 obj <> endobj 669 0 obj <> endobj 670 0 obj <> endobj 671 0 obj <> endobj 672 0 obj <> endobj 673 0 obj <> endobj 674 0 obj <> endobj 675 0 obj <> endobj 676 0 obj <> endobj 677 0 obj <> endobj 678 0 obj <> endobj 679 0 obj <> endobj 680 0 obj <> endobj 681 0 obj <> endobj 682 0 obj <> endobj 683 0 obj <> endobj 684 0 obj <> endobj 685 0 obj <> endobj 686 0 obj <> endobj 687 0 obj <> endobj 688 0 obj <> endobj 689 0 obj <> endobj 690 0 obj <> endobj 691 0 obj <> endobj 692 0 obj <> endobj 693 0 obj <> endobj 694 0 obj <> endobj 695 0 obj <> endobj 696 0 obj <> endobj 697 0 obj <> endobj 698 0 obj <> endobj 699 0 obj <> endobj 700 0 obj <> endobj 701 0 obj <> endobj 702 0 obj <> endobj 703 0 obj <> endobj 704 0 obj <> endobj 705 0 obj <> endobj 706 0 obj <> endobj 707 0 obj <> endobj 708 0 obj <> endobj 709 0 obj <> endobj 710 0 obj <> endobj 711 0 obj <> endobj 712 0 obj <> endobj 713 0 obj <> endobj 714 0 obj <> endobj 715 0 obj <> endobj 716 0 obj <> endobj 717 0 obj <> endobj 718 0 obj <> endobj 719 0 obj <> endobj 720 0 obj <> endobj 721 0 obj <> endobj 722 0 obj <> endobj 723 0 obj <> endobj 724 0 obj <> endobj 725 0 obj <> endobj 726 0 obj <> endobj 727 0 obj <> endobj 728 0 obj <> endobj 729 0 obj <> endobj 730 0 obj <> endobj 731 0 obj <> endobj 732 0 obj <> endobj 733 0 obj <> endobj 734 0 obj <> endobj 735 0 obj <> endobj 736 0 obj <> endobj 737 0 obj <> endobj 738 0 obj <> endobj 739 0 obj <> endobj 740 0 obj <> endobj 741 0 obj <> endobj 742 0 obj <> endobj 743 0 obj <> endobj 744 0 obj <> endobj 745 0 obj <> endobj 746 0 obj <> endobj 747 0 obj <> endobj 748 0 obj <> endobj 749 0 obj <> endobj 750 0 obj <> endobj 751 0 obj <> endobj 752 0 obj <> endobj 753 0 obj <> endobj 754 0 obj <> endobj 755 0 obj <> endobj 756 0 obj <> endobj 757 0 obj <> endobj 758 0 obj <> endobj 759 0 obj <> endobj 760 0 obj <> endobj 761 0 obj <> endobj 762 0 obj <> endobj 763 0 obj <> endobj 764 0 obj <> endobj 765 0 obj <> endobj 766 0 obj <> endobj 767 0 obj <> endobj 768 0 obj <> endobj 769 0 obj <> endobj 770 0 obj <> endobj 771 0 obj <> endobj 772 0 obj <> endobj 773 0 obj <> endobj 774 0 obj <> endobj 775 0 obj <> endobj 776 0 obj <> endobj 777 0 obj <> endobj 778 0 obj <> endobj 779 0 obj <> endobj 780 0 obj <> endobj 781 0 obj <> endobj 782 0 obj <> endobj 783 0 obj <> endobj 784 0 obj <> endobj 785 0 obj <> endobj 786 0 obj <> endobj 787 0 obj <> endobj 788 0 obj <> endobj 789 0 obj <> endobj 790 0 obj <> endobj 791 0 obj <> endobj 792 0 obj <> endobj 793 0 obj <> endobj 794 0 obj <> endobj 795 0 obj <> endobj 796 0 obj <> endobj 797 0 obj <> endobj 798 0 obj <> endobj 799 0 obj <> endobj 800 0 obj <> endobj 801 0 obj <> endobj 802 0 obj <> endobj 803 0 obj <> endobj 804 0 obj <> endobj 805 0 obj <> endobj 806 0 obj <> endobj 807 0 obj <> endobj 808 0 obj <> endobj 809 0 obj <> endobj 810 0 obj <> endobj 811 0 obj <> endobj 812 0 obj <> endobj 813 0 obj <> endobj 814 0 obj <> endobj 815 0 obj <> endobj 816 0 obj <> endobj 817 0 obj <> endobj 818 0 obj <> endobj 819 0 obj <> endobj 820 0 obj <> endobj 821 0 obj <> endobj 822 0 obj <> endobj 823 0 obj <> endobj 824 0 obj <> endobj 825 0 obj <> endobj 826 0 obj <> endobj 827 0 obj <> endobj 828 0 obj <> endobj 829 0 obj <> endobj 830 0 obj <> endobj 831 0 obj <> endobj 832 0 obj <> endobj 833 0 obj <> endobj 834 0 obj <> endobj 835 0 obj <> endobj 836 0 obj <> endobj 837 0 obj <> endobj 838 0 obj <> endobj 839 0 obj <> endobj 840 0 obj <> endobj 841 0 obj <> endobj 842 0 obj <> endobj 843 0 obj <> endobj 844 0 obj <> endobj 845 0 obj <> endobj 846 0 obj <> endobj 847 0 obj <> endobj 848 0 obj <> endobj 849 0 obj <> endobj 850 0 obj <> endobj 851 0 obj <> endobj 852 0 obj <> endobj 853 0 obj <> endobj 854 0 obj <> endobj 855 0 obj <> endobj 856 0 obj <> endobj 857 0 obj <> endobj 858 0 obj <> endobj 859 0 obj <> endobj 860 0 obj <> endobj 861 0 obj <> endobj 862 0 obj <> endobj 863 0 obj <> endobj 864 0 obj <> endobj 865 0 obj <> endobj 866 0 obj <> endobj 867 0 obj <> endobj 868 0 obj <> endobj 869 0 obj <> endobj 870 0 obj <> endobj 871 0 obj <> endobj 872 0 obj <> endobj 873 0 obj <> endobj 874 0 obj <> endobj 875 0 obj <> endobj 876 0 obj <> endobj 877 0 obj <> endobj 878 0 obj <> endobj 879 0 obj <> endobj 880 0 obj <> endobj 881 0 obj <> endobj 882 0 obj <> endobj 883 0 obj <> endobj 884 0 obj <> endobj 885 0 obj <> endobj 886 0 obj <> endobj 887 0 obj <> endobj 888 0 obj <> endobj 889 0 obj <> endobj 890 0 obj <> endobj 891 0 obj <> endobj 892 0 obj <> endobj 893 0 obj <> endobj 894 0 obj <> endobj 895 0 obj <> endobj 896 0 obj <> endobj 897 0 obj <> endobj 898 0 obj <> endobj 899 0 obj <> endobj 900 0 obj <> endobj 901 0 obj <> endobj 902 0 obj <> endobj 903 0 obj <> endobj 904 0 obj <> endobj 905 0 obj <> endobj 906 0 obj <> endobj 907 0 obj <> endobj 908 0 obj <> endobj 909 0 obj <> endobj 910 0 obj <> endobj 911 0 obj <> endobj 912 0 obj <> endobj 913 0 obj <> endobj 914 0 obj <> endobj 915 0 obj <> endobj 916 0 obj <> endobj 917 0 obj <> endobj 918 0 obj <> endobj 919 0 obj <> endobj 920 0 obj <> endobj 921 0 obj <> endobj 922 0 obj <> endobj 923 0 obj <> endobj 924 0 obj <> endobj 925 0 obj <> endobj 926 0 obj <> endobj 927 0 obj <> endobj 928 0 obj <> endobj 929 0 obj <> endobj 930 0 obj <> endobj 931 0 obj <> endobj 932 0 obj <> endobj 933 0 obj <> endobj 934 0 obj <> endobj 935 0 obj <> endobj 936 0 obj <> endobj 937 0 obj <> endobj 938 0 obj <> endobj 939 0 obj <> endobj 940 0 obj <> endobj 941 0 obj <> endobj 942 0 obj <> endobj 943 0 obj <> endobj 944 0 obj <> endobj 945 0 obj <> endobj 946 0 obj <> endobj 947 0 obj <> endobj 948 0 obj <> endobj 949 0 obj <> endobj 950 0 obj <> endobj 951 0 obj <> endobj 952 0 obj <> endobj 953 0 obj <> endobj 954 0 obj <> endobj 955 0 obj <> endobj 956 0 obj <> endobj 957 0 obj <> endobj 958 0 obj <> endobj 959 0 obj <> endobj 960 0 obj <> endobj 961 0 obj <> endobj 962 0 obj <> endobj 963 0 obj <> endobj 964 0 obj <> endobj 965 0 obj <> endobj 966 0 obj <> endobj 967 0 obj <> endobj 968 0 obj <> endobj 969 0 obj <> endobj 970 0 obj <> endobj 971 0 obj <> endobj 972 0 obj <> endobj 973 0 obj <> endobj 974 0 obj <> endobj 975 0 obj <> endobj 976 0 obj <> endobj 977 0 obj <> endobj 978 0 obj <> endobj 979 0 obj <> endobj 980 0 obj <> endobj 981 0 obj <> endobj 982 0 obj <> endobj 983 0 obj <> endobj 984 0 obj <> endobj 985 0 obj <> endobj 986 0 obj <> endobj 987 0 obj <> endobj 988 0 obj <> endobj 989 0 obj <> endobj 990 0 obj <> endobj 991 0 obj <> endobj 992 0 obj <> endobj 993 0 obj <> endobj 994 0 obj <> endobj 995 0 obj <> endobj 996 0 obj <> endobj 997 0 obj <> endobj 998 0 obj <> endobj 999 0 obj <> endobj 1000 0 obj <> endobj 1001 0 obj <> endobj 1002 0 obj <> endobj 1003 0 obj <> endobj 1004 0 obj <> endobj 1005 0 obj <> endobj 1006 0 obj <> endobj 1007 0 obj <> endobj 1008 0 obj <> endobj 1009 0 obj <> endobj 1010 0 obj <> endobj 1011 0 obj <> endobj 1012 0 obj <> endobj 1013 0 obj <> endobj 1014 0 obj <> endobj 1015 0 obj <> endobj 1016 0 obj <> endobj 1017 0 obj <> endobj 1018 0 obj <> endobj 1019 0 obj <> endobj 1020 0 obj <> endobj 1021 0 obj <> endobj 1022 0 obj <> endobj 1023 0 obj <> endobj 1024 0 obj <> endobj 1025 0 obj <> endobj 1026 0 obj <> endobj 1027 0 obj <> endobj 1028 0 obj <> endobj 1029 0 obj <> endobj 1030 0 obj <> endobj 1031 0 obj <>stream Microsoft® Word 2016 GASNet, Memory Kinds, RMA, GPU application/pdf GASNet-EX API: Memory Kinds, Revision 2025.8.0 Paul H. Hargrove;Dan Bonachea Microsoft® Word 2016 2025-08-27T17:14:25-04:00 2025-08-27T17:15:05-04:00 2025-08-27T17:15:05-04:00 uuid:F70F5F1B-3298-4C30-8907-E74A0775C0E9 uuid:cbbf7ce2-d551-4856-8b00-8de622226cb3 default 1 converted uuid:966dbcb4-daab-4b3e-971f-fe896b236310 converted to PDF/A-1b Preflight 2025-08-27T17:15:05-04:00 1 B http://ns.adobe.com/xap/1.0/mm/ xmpMM XMP Media Management Schema internal UUID based identifier for specific incarnation of a document InstanceID URI internal The common identifier for all versions and renditions of a document. OriginalDocumentID URI http://ns.adobe.com/pdf/1.3/ pdf Adobe PDF Schema internal A name object indicating whether the document has been modified to include trapping information Trapped Text http://www.aiim.org/pdfa/ns/id/ pdfaid PDF/A ID Schema internal Part of PDF/A standard part Integer internal Amendment of PDF/A standard amd Text internal Conformance level of PDF/A standard conformance Text endstream endobj 1032 0 obj <>stream xœ–wTTׇϽwz¡Í0tz¯Ré¤WQfÊÃ Ø "*QD¤)‚  EbE Q{@‚€ƒQl¨dFÖJ|yyïåå÷Ç=ßÚgïs÷Ù{ßµ.$/?./– 'à{ºÐ#£¢éØ~<Às˜¬¬ ÿP ’·»+=KäþE¯‡$^o{Òéàÿ“4+ƒ/ ñ6'‹%â<§æ2ÄöYSãSÄ £ÄÌ%(by1'.²ÑgŸEv3;DZ8ç v[Ì="Þ‘-äˆñq~6—“#âÛ"ÖJ¦qEüV›Æaf€"‰í+IÄf"&ñCƒ]E¼)ñ Žÿ‚œÕñ¥\Ó3Öð¹‰IºKŸnnkË {qrR9q “•Âä³é®éiLÞïüY2âÚÒEE¶6·µ¶6¶01ÿ¢PÿuóoJÜÛEzô¹g­ïÛ_ù¥×À˜Õf÷¶ø :¶ ï›Ö!$E}køâ>4ñ¼$ v¦¦999&\ËD\Ðßõ?þ†¾xŸ‰ø¸ßËCwã$0…©º¸n¬ôÔt!Ÿž•ÁdqèÆâø×ys8|O.š2./QÔn›+à¦óè\Þjâ? û“çZ$Jý'@5RT€üÜP"@bŠv ßû懢5Bmrqî? ú÷Sábñ#‹›ø9Î58”Îò³÷ÄŸ%@T T&ÐÆÀØ{àÜ¡ ¬,Òä€õ` È…`7Ø*A ¨ œà4¸.ƒëà÷Á(˜ÏÀ,x æ!ÂBdˆ)@j6dY@ häùAÁP%B²)@Ê:¤éBz‘[È(2ƒ¼CaPeŒ²Gy¡ÂP,T&j#ªU‰:ŠjGõ n¡ÆP³¨Oh2Zmˆ¶C{£#щèt>º Ý€nC_B¡'Я1 £‹±Áxa¢0ɘu˜"ÌL+æÏƯÁãëñ]øü~ž MÐ%8B É„-„rB ááá%‘HÔ Úƒˆ\âfb9ñ8ñ qŒøŽ$C2 ¹’bHBÒ.ÒÒyÒ]ÒK2™¬Cv"G“ä]äFòEò#ò[ Š„‰„·[b“D•D»ÄM‰ç’xImIgÉU’k%Ë$OJHÎHá¥t¤\¥˜R¥ª¤NIHÍIS¤Í¥¤Ó¤‹¤›¤¯JOÉ`etdÜeØ2y2‡e.ÊŒSŠ&ŕ¢l¥ÔS.Q&¨ª.Õ›šL-¤~Cí§ÎÊÊÈZʆˮ–­’=#;JCh:4oZ*­˜v‚6L{/§"ç,Ç‘Û)×"wSî¼’¼“«®¬î¥.T¯UïWŸ×ÐÕÓÈÕhÕx¨IÐdh&h–jvkÎj©iùk­×jÖº§×fh'iï×îÕ~££«¡³]§CgJW^×[w­n³î=²ž£^¦^Þm}Œ>C?Eÿ€þ ØÀÊ É Ê`À6´6ä04BÙñŒêŒFŒIÆÎÆÙÆÍÆc&4?“\““ç¦Z¦Ñ¦{L{M?™Y™¥šÕ›Ý7—1÷1Ï5ï2ÿÕÂÀ‚eQeq{ y‰Ç’MK:—¼°4´äX´¼cE±ò·ÚnÕmõÑÚÆšoÝb=m£egSm3 2EŒ+¶h[ÛM¶§mßÙYÛ ìNØýbolŸbßd?µTw)giýÒq ¦C­Ãè2ú²¸e‡–:ª;2ë;i:±œ&õ“9?w1sá»´¹¼qµsÝàzÞ qót+pëw—qs¯tä¡á‘èÑì1ëiå¹Îó¼ÚË×k׈·Š7Ë»Ñ{ÖÇÆgƒO/É7Ä·Ò÷±Ÿ߯Ëö÷ñßëÿ`¹örÞòŽà°7àa n`fà÷A˜ À ª 'ÁæÁëƒ{C(!±!M!¯C]B‹Cï‡é… úÃ%ÃcÂÃßD¸E”DŒFšFnˆ¼¥ÅêŒÆF‡G7DÏ­p_±oÅDŒUL~ÌðJÝ•«W^]¥¸*uÕ™XÉXfìÉ8t\D\SÜf³Ž9ï_?Ëreíg=c;±KÙÓN g2Á!¡$a*Ñ!qoât’cRYÒ ×•[É}‘ì•\“ü&% åHÊBjDjk.-.íO†—ÂëIWM_>˜a˜‘Ÿ1ši—¹/s–ïËoÈ‚²Vfu ¨¢Ÿ©>¡žp›p,{YvUöۜ𜓫¥WóV÷­1X³sÍäZµ_¯C­c­ë^¯¾~Ëú± Îj7Bã7voÒÜ”·ib³çæ£[[R¶ük–[’ûjkÄÖ®<•¼ÍyãÛ<·5çKäóóG¶Ûo¯ÙÚÁÝÑ¿sÉΊŸ Ø× Í Ë ?±Š®}eþUùW »võ[ÜÙÍÛ=¼ÇqÏÑé’µ%ã{ý÷¶—ÒK J_í‹ÝwµÌ²¬f?a¿pÿh¹_yg…VÅI•CU.U­ÕÊÕ;«ß`¸yÐé`KJMaÍûCÜCwj=kÛëtêÊcg~R^ßû5ãëÆņ†GxGFíi´illRn*n†›…ÍÓÇbŽÝøÆí›Îã–ÚVZkáqp\xüé·qߟð=Ñ}’q²å;íïªÛ(míPûšöÙŽ¤ŽÑΨÎÁS>§º»ì»Ú¾7ùþÈiõÓUgdÏŸ%œÍ;»pní¹¹óçg.$^ïŽí¾1òâíž žþK¾—®\ö¸|±×¹÷܇+§¯Ú]=uq­ãºõõö>«¾¶¬~hë·îo°è¼a{£kpéàÙ›Ž7/Ür»uù¶÷íëCˇ‡Ã†ïŒÄŒŒÞaß™º›z÷Žì{ó÷7?@?(x(õ°ì‘ò£ºõlµ=3æ6Ö÷8äñýqÖø³Ÿ²~ú0‘÷„ü¤lRm²qÊbêô´Çô§+žN<Ëx6?“ÿ³ôÏÕÏõž÷‹Ó/}³‘³/ø/~-z©ðòÈ+ËWÝss^§½žSðVáíÑwŒw½ï#ÞOÎç|À~(ÿ¨ÿ±ë“ï§ i ¿÷„óû endstream endobj 1033 0 obj <> endobj xref 0 1034 0000000000 65535 f 0000142559 00000 n 0000142771 00000 n 0000148025 00000 n 0000148240 00000 n 0000151793 00000 n 0000152030 00000 n 0000158474 00000 n 0000158711 00000 n 0000165203 00000 n 0000165428 00000 n 0000171641 00000 n 0000171867 00000 n 0000176854 00000 n 0000177093 00000 n 0000180014 00000 n 0000180241 00000 n 0000185389 00000 n 0000185616 00000 n 0000189387 00000 n 0000189626 00000 n 0000195127 00000 n 0000195366 00000 n 0000201418 00000 n 0000201658 00000 n 0000206724 00000 n 0000206964 00000 n 0000212827 00000 n 0000213056 00000 n 0000220248 00000 n 0000220488 00000 n 0000226556 00000 n 0000226796 00000 n 0000232185 00000 n 0000232414 00000 n 0000239843 00000 n 0000240106 00000 n 0000246874 00000 n 0000249423 00000 n 0000290810 00000 n 0000291061 00000 n 0000291083 00000 n 0000291323 00000 n 0000295724 00000 n 0000295952 00000 n 0000300788 00000 n 0000301017 00000 n 0000303615 00000 n 0000303831 00000 n 0000305868 00000 n 0000306096 00000 n 0000310487 00000 n 0000310752 00000 n 0000314393 00000 n 0000314479 00000 n 0000314741 00000 n 0000314810 00000 n 0000315248 00000 n 0000315733 00000 n 0000315863 00000 n 0000316009 00000 n 0000316201 00000 n 0000318750 00000 n 0000318926 00000 n 0000319180 00000 n 0000319524 00000 n 0000326965 00000 n 0000327128 00000 n 0000327273 00000 n 0000327419 00000 n 0000327565 00000 n 0000327709 00000 n 0000327877 00000 n 0000328047 00000 n 0000328218 00000 n 0000328389 00000 n 0000328730 00000 n 0000329076 00000 n 0000329195 00000 n 0000329282 00000 n 0000329369 00000 n 0000329657 00000 n 0000329788 00000 n 0000329872 00000 n 0000330098 00000 n 0000330276 00000 n 0000330422 00000 n 0000330640 00000 n 0000330810 00000 n 0000331012 00000 n 0000331190 00000 n 0000331392 00000 n 0000331602 00000 n 0000331852 00000 n 0000332094 00000 n 0000332264 00000 n 0000332474 00000 n 0000332724 00000 n 0000332918 00000 n 0000333184 00000 n 0000333322 00000 n 0000333525 00000 n 0000333744 00000 n 0000334107 00000 n 0000334350 00000 n 0000334514 00000 n 0000334600 00000 n 0000334686 00000 n 0000334772 00000 n 0000334858 00000 n 0000335000 00000 n 0000338105 00000 n 0000338174 00000 n 0000338243 00000 n 0000338313 00000 n 0000338382 00000 n 0000338451 00000 n 0000338520 00000 n 0000338628 00000 n 0000338698 00000 n 0000338765 00000 n 0000338832 00000 n 0000338900 00000 n 0000338967 00000 n 0000339035 00000 n 0000339102 00000 n 0000339170 00000 n 0000339237 00000 n 0000339304 00000 n 0000339391 00000 n 0000339457 00000 n 0000339524 00000 n 0000339590 00000 n 0000339657 00000 n 0000339723 00000 n 0000339790 00000 n 0000339857 00000 n 0000339925 00000 n 0000339992 00000 n 0000340060 00000 n 0000340127 00000 n 0000340193 00000 n 0000340259 00000 n 0000340326 00000 n 0000340392 00000 n 0000340458 00000 n 0000340524 00000 n 0000340590 00000 n 0000340656 00000 n 0000340722 00000 n 0000340789 00000 n 0000340957 00000 n 0000341025 00000 n 0000341097 00000 n 0000341169 00000 n 0000341236 00000 n 0000341324 00000 n 0000341391 00000 n 0000341471 00000 n 0000341538 00000 n 0000341604 00000 n 0000341671 00000 n 0000341738 00000 n 0000341805 00000 n 0000341872 00000 n 0000341939 00000 n 0000342006 00000 n 0000342073 00000 n 0000342161 00000 n 0000342241 00000 n 0000342308 00000 n 0000342380 00000 n 0000342447 00000 n 0000342551 00000 n 0000342619 00000 n 0000342699 00000 n 0000342767 00000 n 0000342834 00000 n 0000342901 00000 n 0000342998 00000 n 0000343066 00000 n 0000343139 00000 n 0000343207 00000 n 0000343288 00000 n 0000343356 00000 n 0000343429 00000 n 0000343498 00000 n 0000343566 00000 n 0000343634 00000 n 0000343702 00000 n 0000343770 00000 n 0000343838 00000 n 0000343906 00000 n 0000343974 00000 n 0000344042 00000 n 0000344131 00000 n 0000344200 00000 n 0000344273 00000 n 0000344362 00000 n 0000344430 00000 n 0000344503 00000 n 0000344571 00000 n 0000344644 00000 n 0000344712 00000 n 0000344779 00000 n 0000344847 00000 n 0000344920 00000 n 0000344989 00000 n 0000345062 00000 n 0000345131 00000 n 0000345204 00000 n 0000345273 00000 n 0000345346 00000 n 0000345415 00000 n 0000345483 00000 n 0000345550 00000 n 0000345617 00000 n 0000345684 00000 n 0000345805 00000 n 0000345874 00000 n 0000345971 00000 n 0000346040 00000 n 0000346113 00000 n 0000346182 00000 n 0000346279 00000 n 0000346347 00000 n 0000346414 00000 n 0000346481 00000 n 0000346548 00000 n 0000346615 00000 n 0000346682 00000 n 0000346803 00000 n 0000346871 00000 n 0000346940 00000 n 0000347021 00000 n 0000347090 00000 n 0000347163 00000 n 0000347232 00000 n 0000347300 00000 n 0000347367 00000 n 0000347434 00000 n 0000347502 00000 n 0000347575 00000 n 0000347643 00000 n 0000347710 00000 n 0000347777 00000 n 0000347844 00000 n 0000347911 00000 n 0000348000 00000 n 0000348069 00000 n 0000348150 00000 n 0000348219 00000 n 0000348292 00000 n 0000348361 00000 n 0000348434 00000 n 0000348502 00000 n 0000348569 00000 n 0000348636 00000 n 0000348703 00000 n 0000348770 00000 n 0000348837 00000 n 0000348904 00000 n 0000348971 00000 n 0000349038 00000 n 0000349105 00000 n 0000349242 00000 n 0000349311 00000 n 0000349384 00000 n 0000349453 00000 n 0000349534 00000 n 0000349602 00000 n 0000349683 00000 n 0000349751 00000 n 0000349818 00000 n 0000349885 00000 n 0000349952 00000 n 0000350019 00000 n 0000350140 00000 n 0000350209 00000 n 0000350282 00000 n 0000350350 00000 n 0000350431 00000 n 0000350499 00000 n 0000350572 00000 n 0000350640 00000 n 0000350707 00000 n 0000350774 00000 n 0000350842 00000 n 0000350909 00000 n 0000350977 00000 n 0000351045 00000 n 0000351113 00000 n 0000351181 00000 n 0000351249 00000 n 0000351317 00000 n 0000351462 00000 n 0000351575 00000 n 0000351643 00000 n 0000351756 00000 n 0000351825 00000 n 0000351914 00000 n 0000351983 00000 n 0000352056 00000 n 0000352124 00000 n 0000352191 00000 n 0000352258 00000 n 0000352325 00000 n 0000352392 00000 n 0000352459 00000 n 0000352526 00000 n 0000352593 00000 n 0000352660 00000 n 0000352727 00000 n 0000352904 00000 n 0000352972 00000 n 0000353045 00000 n 0000353113 00000 n 0000353202 00000 n 0000353270 00000 n 0000353359 00000 n 0000353428 00000 n 0000353496 00000 n 0000353564 00000 n 0000353632 00000 n 0000353700 00000 n 0000353768 00000 n 0000353836 00000 n 0000353904 00000 n 0000353972 00000 n 0000354040 00000 n 0000354108 00000 n 0000354176 00000 n 0000354244 00000 n 0000354312 00000 n 0000354380 00000 n 0000354448 00000 n 0000354537 00000 n 0000354754 00000 n 0000354835 00000 n 0000354903 00000 n 0000354992 00000 n 0000355060 00000 n 0000355141 00000 n 0000355209 00000 n 0000355290 00000 n 0000355359 00000 n 0000355427 00000 n 0000355495 00000 n 0000355563 00000 n 0000355631 00000 n 0000355752 00000 n 0000355825 00000 n 0000355892 00000 n 0000355959 00000 n 0000356026 00000 n 0000356093 00000 n 0000356160 00000 n 0000356227 00000 n 0000356295 00000 n 0000356376 00000 n 0000356445 00000 n 0000356518 00000 n 0000356587 00000 n 0000356660 00000 n 0000356729 00000 n 0000356797 00000 n 0000356864 00000 n 0000356931 00000 n 0000356999 00000 n 0000357072 00000 n 0000357140 00000 n 0000357213 00000 n 0000357281 00000 n 0000357354 00000 n 0000357422 00000 n 0000357490 00000 n 0000357558 00000 n 0000357627 00000 n 0000357695 00000 n 0000357763 00000 n 0000357831 00000 n 0000357899 00000 n 0000357967 00000 n 0000358035 00000 n 0000358103 00000 n 0000358171 00000 n 0000358240 00000 n 0000358308 00000 n 0000358375 00000 n 0000358442 00000 n 0000358509 00000 n 0000358576 00000 n 0000358643 00000 n 0000358710 00000 n 0000358777 00000 n 0000358845 00000 n 0000358912 00000 n 0000358979 00000 n 0000359047 00000 n 0000359115 00000 n 0000359183 00000 n 0000359251 00000 n 0000359319 00000 n 0000359387 00000 n 0000359455 00000 n 0000359523 00000 n 0000359591 00000 n 0000359659 00000 n 0000359727 00000 n 0000359795 00000 n 0000359863 00000 n 0000359931 00000 n 0000359999 00000 n 0000360066 00000 n 0000360133 00000 n 0000360200 00000 n 0000360267 00000 n 0000360334 00000 n 0000360401 00000 n 0000360468 00000 n 0000360535 00000 n 0000360602 00000 n 0000360669 00000 n 0000360737 00000 n 0000360805 00000 n 0000360873 00000 n 0000360941 00000 n 0000361009 00000 n 0000361077 00000 n 0000361145 00000 n 0000361213 00000 n 0000361281 00000 n 0000361349 00000 n 0000361417 00000 n 0000361485 00000 n 0000361553 00000 n 0000361621 00000 n 0000361689 00000 n 0000361757 00000 n 0000361825 00000 n 0000361893 00000 n 0000361961 00000 n 0000362029 00000 n 0000362097 00000 n 0000362165 00000 n 0000362233 00000 n 0000362301 00000 n 0000362369 00000 n 0000362437 00000 n 0000362505 00000 n 0000362573 00000 n 0000362641 00000 n 0000362709 00000 n 0000362777 00000 n 0000362845 00000 n 0000362913 00000 n 0000362980 00000 n 0000363047 00000 n 0000363114 00000 n 0000363181 00000 n 0000363248 00000 n 0000363315 00000 n 0000363383 00000 n 0000363450 00000 n 0000363517 00000 n 0000363584 00000 n 0000363652 00000 n 0000363720 00000 n 0000363788 00000 n 0000363856 00000 n 0000363924 00000 n 0000363992 00000 n 0000364060 00000 n 0000364128 00000 n 0000364196 00000 n 0000364264 00000 n 0000364332 00000 n 0000364400 00000 n 0000364468 00000 n 0000364536 00000 n 0000364605 00000 n 0000364673 00000 n 0000364741 00000 n 0000364809 00000 n 0000364877 00000 n 0000364944 00000 n 0000365011 00000 n 0000365079 00000 n 0000365146 00000 n 0000365213 00000 n 0000365281 00000 n 0000365349 00000 n 0000365423 00000 n 0000365494 00000 n 0000365568 00000 n 0000365639 00000 n 0000365713 00000 n 0000365784 00000 n 0000365858 00000 n 0000365930 00000 n 0000366004 00000 n 0000366076 00000 n 0000366150 00000 n 0000366224 00000 n 0000366295 00000 n 0000366366 00000 n 0000366440 00000 n 0000366511 00000 n 0000366585 00000 n 0000366659 00000 n 0000366733 00000 n 0000366807 00000 n 0000366881 00000 n 0000366955 00000 n 0000367029 00000 n 0000367122 00000 n 0000367194 00000 n 0000367266 00000 n 0000367338 00000 n 0000367410 00000 n 0000367482 00000 n 0000367554 00000 n 0000367628 00000 n 0000367702 00000 n 0000367774 00000 n 0000367846 00000 n 0000367920 00000 n 0000367994 00000 n 0000368065 00000 n 0000368136 00000 n 0000368210 00000 n 0000368284 00000 n 0000368358 00000 n 0000368429 00000 n 0000368500 00000 n 0000368571 00000 n 0000368645 00000 n 0000368719 00000 n 0000368790 00000 n 0000368861 00000 n 0000368935 00000 n 0000369009 00000 n 0000369083 00000 n 0000369157 00000 n 0000369231 00000 n 0000369305 00000 n 0000369379 00000 n 0000369453 00000 n 0000369527 00000 n 0000369601 00000 n 0000369675 00000 n 0000369749 00000 n 0000369822 00000 n 0000369896 00000 n 0000369970 00000 n 0000370044 00000 n 0000370118 00000 n 0000370215 00000 n 0000370289 00000 n 0000370361 00000 n 0000370435 00000 n 0000370509 00000 n 0000370583 00000 n 0000370657 00000 n 0000370729 00000 n 0000370801 00000 n 0000370873 00000 n 0000370945 00000 n 0000371017 00000 n 0000371089 00000 n 0000371161 00000 n 0000371233 00000 n 0000371307 00000 n 0000371379 00000 n 0000371451 00000 n 0000371523 00000 n 0000371594 00000 n 0000371665 00000 n 0000371736 00000 n 0000371807 00000 n 0000371878 00000 n 0000371949 00000 n 0000372020 00000 n 0000372091 00000 n 0000372162 00000 n 0000372233 00000 n 0000372307 00000 n 0000372381 00000 n 0000372455 00000 n 0000372527 00000 n 0000372599 00000 n 0000372671 00000 n 0000372745 00000 n 0000372819 00000 n 0000372893 00000 n 0000372964 00000 n 0000373035 00000 n 0000373106 00000 n 0000373180 00000 n 0000373254 00000 n 0000373328 00000 n 0000373399 00000 n 0000373470 00000 n 0000373541 00000 n 0000373615 00000 n 0000373686 00000 n 0000373760 00000 n 0000373834 00000 n 0000373908 00000 n 0000373982 00000 n 0000374056 00000 n 0000374129 00000 n 0000374203 00000 n 0000374277 00000 n 0000374351 00000 n 0000374425 00000 n 0000374499 00000 n 0000374573 00000 n 0000374647 00000 n 0000374721 00000 n 0000374793 00000 n 0000374865 00000 n 0000374937 00000 n 0000375009 00000 n 0000375081 00000 n 0000375153 00000 n 0000375225 00000 n 0000375297 00000 n 0000375371 00000 n 0000375443 00000 n 0000375515 00000 n 0000375587 00000 n 0000375659 00000 n 0000375731 00000 n 0000375803 00000 n 0000375877 00000 n 0000375949 00000 n 0000376023 00000 n 0000376097 00000 n 0000376171 00000 n 0000376243 00000 n 0000376315 00000 n 0000376387 00000 n 0000376461 00000 n 0000376535 00000 n 0000376609 00000 n 0000376683 00000 n 0000376757 00000 n 0000376831 00000 n 0000376903 00000 n 0000376975 00000 n 0000377047 00000 n 0000377118 00000 n 0000377189 00000 n 0000377260 00000 n 0000377334 00000 n 0000377408 00000 n 0000377482 00000 n 0000377556 00000 n 0000377630 00000 n 0000377704 00000 n 0000377775 00000 n 0000377846 00000 n 0000377917 00000 n 0000377988 00000 n 0000378059 00000 n 0000378130 00000 n 0000378204 00000 n 0000378278 00000 n 0000378352 00000 n 0000378426 00000 n 0000378500 00000 n 0000378574 00000 n 0000378648 00000 n 0000378737 00000 n 0000378811 00000 n 0000378885 00000 n 0000378957 00000 n 0000379029 00000 n 0000379103 00000 n 0000379177 00000 n 0000379251 00000 n 0000379323 00000 n 0000379395 00000 n 0000379467 00000 n 0000379539 00000 n 0000379611 00000 n 0000379683 00000 n 0000379755 00000 n 0000379827 00000 n 0000379899 00000 n 0000379971 00000 n 0000380045 00000 n 0000380116 00000 n 0000380190 00000 n 0000380264 00000 n 0000380335 00000 n 0000380406 00000 n 0000380480 00000 n 0000380552 00000 n 0000380626 00000 n 0000380707 00000 n 0000380781 00000 n 0000380854 00000 n 0000380928 00000 n 0000381033 00000 n 0000381107 00000 n 0000381179 00000 n 0000381253 00000 n 0000381327 00000 n 0000381401 00000 n 0000381475 00000 n 0000381572 00000 n 0000381646 00000 n 0000381720 00000 n 0000381825 00000 n 0000381899 00000 n 0000381971 00000 n 0000382045 00000 n 0000382119 00000 n 0000382193 00000 n 0000382267 00000 n 0000382341 00000 n 0000382413 00000 n 0000382485 00000 n 0000382557 00000 n 0000382629 00000 n 0000382701 00000 n 0000382773 00000 n 0000382845 00000 n 0000382917 00000 n 0000382989 00000 n 0000383061 00000 n 0000383133 00000 n 0000383205 00000 n 0000383279 00000 n 0000383351 00000 n 0000383423 00000 n 0000383497 00000 n 0000383571 00000 n 0000383643 00000 n 0000383714 00000 n 0000383785 00000 n 0000383859 00000 n 0000383933 00000 n 0000384004 00000 n 0000384075 00000 n 0000384149 00000 n 0000384223 00000 n 0000384295 00000 n 0000384367 00000 n 0000384441 00000 n 0000384513 00000 n 0000384587 00000 n 0000384661 00000 n 0000384735 00000 n 0000384808 00000 n 0000384882 00000 n 0000384955 00000 n 0000385029 00000 n 0000385103 00000 n 0000385177 00000 n 0000385249 00000 n 0000385321 00000 n 0000385393 00000 n 0000385467 00000 n 0000385539 00000 n 0000385611 00000 n 0000385685 00000 n 0000385757 00000 n 0000385829 00000 n 0000385901 00000 n 0000385973 00000 n 0000386047 00000 n 0000386119 00000 n 0000386193 00000 n 0000386265 00000 n 0000386339 00000 n 0000386413 00000 n 0000386485 00000 n 0000386557 00000 n 0000386631 00000 n 0000386705 00000 n 0000386802 00000 n 0000386876 00000 n 0000386950 00000 n 0000387024 00000 n 0000387098 00000 n 0000387170 00000 n 0000387242 00000 n 0000387314 00000 n 0000387386 00000 n 0000387458 00000 n 0000387530 00000 n 0000387604 00000 n 0000387675 00000 n 0000387749 00000 n 0000387821 00000 n 0000387895 00000 n 0000387969 00000 n 0000388041 00000 n 0000388113 00000 n 0000388187 00000 n 0000388261 00000 n 0000388335 00000 n 0000388409 00000 n 0000388483 00000 n 0000388557 00000 n 0000388631 00000 n 0000388703 00000 n 0000388775 00000 n 0000388847 00000 n 0000388918 00000 n 0000388989 00000 n 0000389060 00000 n 0000389131 00000 n 0000389205 00000 n 0000389279 00000 n 0000389353 00000 n 0000389427 00000 n 0000389499 00000 n 0000389571 00000 n 0000389643 00000 n 0000389715 00000 n 0000389789 00000 n 0000389861 00000 n 0000389935 00000 n 0000390009 00000 n 0000390083 00000 n 0000390157 00000 n 0000390229 00000 n 0000390301 00000 n 0000390373 00000 n 0000390445 00000 n 0000390519 00000 n 0000390593 00000 n 0000390667 00000 n 0000390741 00000 n 0000390815 00000 n 0000390889 00000 n 0000390963 00000 n 0000391035 00000 n 0000391106 00000 n 0000391177 00000 n 0000391248 00000 n 0000391319 00000 n 0000391390 00000 n 0000391461 00000 n 0000391535 00000 n 0000391607 00000 n 0000391681 00000 n 0000391753 00000 n 0000391827 00000 n 0000391899 00000 n 0000391973 00000 n 0000392045 00000 n 0000392119 00000 n 0000392190 00000 n 0000392264 00000 n 0000392335 00000 n 0000392409 00000 n 0000392483 00000 n 0000392564 00000 n 0000392638 00000 n 0000392712 00000 n 0000392783 00000 n 0000392854 00000 n 0000392925 00000 n 0000392996 00000 n 0000393070 00000 n 0000393142 00000 n 0000393216 00000 n 0000393290 00000 n 0000393364 00000 n 0000393436 00000 n 0000393508 00000 n 0000393580 00000 n 0000393654 00000 n 0000393726 00000 n 0000393800 00000 n 0000393874 00000 n 0000393945 00000 n 0000394016 00000 n 0000394090 00000 n 0000394161 00000 n 0000394235 00000 n 0000394309 00000 n 0000394383 00000 n 0000394457 00000 n 0000394528 00000 n 0000394599 00000 n 0000394670 00000 n 0000394741 00000 n 0000394814 00000 n 0000394887 00000 n 0000394958 00000 n 0000395029 00000 n 0000395102 00000 n 0000395175 00000 n 0000395248 00000 n 0000395321 00000 n 0000395394 00000 n 0000395464 00000 n 0000395534 00000 n 0000395604 00000 n 0000395674 00000 n 0000395744 00000 n 0000395817 00000 n 0000395887 00000 n 0000395960 00000 n 0000396033 00000 n 0000396103 00000 n 0000396173 00000 n 0000396246 00000 n 0000396319 00000 n 0000396392 00000 n 0000396463 00000 n 0000396534 00000 n 0000396605 00000 n 0000396678 00000 n 0000396751 00000 n 0000396821 00000 n 0000396891 00000 n 0000396964 00000 n 0000397037 00000 n 0000397110 00000 n 0000397180 00000 n 0000397250 00000 n 0000397320 00000 n 0000397393 00000 n 0000397463 00000 n 0000397536 00000 n 0000397607 00000 n 0000397680 00000 n 0000397753 00000 n 0000397826 00000 n 0000397899 00000 n 0000397972 00000 n 0000398045 00000 n 0000398118 00000 n 0000398191 00000 n 0000398264 00000 n 0000398337 00000 n 0000398410 00000 n 0000398483 00000 n 0000398556 00000 n 0000398627 00000 n 0000398698 00000 n 0000398769 00000 n 0000398840 00000 n 0000398911 00000 n 0000398982 00000 n 0000399053 00000 n 0000399124 00000 n 0000399195 00000 n 0000399266 00000 n 0000399337 00000 n 0000399408 00000 n 0000399479 00000 n 0000399547 00000 n 0000399615 00000 n 0000399739 00000 n 0000399831 00000 n 0000399920 00000 n 0000400009 00000 n 0000400098 00000 n 0000400187 00000 n 0000400276 00000 n 0000400365 00000 n 0000400434 00000 n 0000400507 00000 n 0000400580 00000 n 0000400647 00000 n 0000400714 00000 n 0000400783 00000 n 0000400856 00000 n 0000400929 00000 n 0000400996 00000 n 0000401063 00000 n 0000401132 00000 n 0000401205 00000 n 0000401286 00000 n 0000401353 00000 n 0000401420 00000 n 0000401487 00000 n 0000401556 00000 n 0000401629 00000 n 0000401710 00000 n 0000401777 00000 n 0000401844 00000 n 0000401911 00000 n 0000401980 00000 n 0000402053 00000 n 0000402134 00000 n 0000402201 00000 n 0000402268 00000 n 0000402334 00000 n 0000402402 00000 n 0000402476 00000 n 0000402558 00000 n 0000402624 00000 n 0000402691 00000 n 0000402758 00000 n 0000402827 00000 n 0000402902 00000 n 0000402986 00000 n 0000403054 00000 n 0000403122 00000 n 0000403190 00000 n 0000403262 00000 n 0000403334 00000 n 0000403407 00000 n 0000403477 00000 n 0000403547 00000 n 0000403618 00000 n 0000403689 00000 n 0000403760 00000 n 0000403814 00000 n 0000403885 00000 n 0000403939 00000 n 0000404010 00000 n 0000404064 00000 n 0000404134 00000 n 0000404188 00000 n 0000404258 00000 n 0000404311 00000 n 0000404379 00000 n 0000404437 00000 n 0000404508 00000 n 0000404566 00000 n 0000404637 00000 n 0000404858 00000 n 0000413867 00000 n 0000416537 00000 n trailer <]>> startxref 116 %%EOF gasnet-2025.8.0/Makefile.in0000664000175000017500000014626215142313673015502 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/Makefile.am $ # Description: Makefile for GASNet # Copyright 2002, Dan Bonachea # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(include_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = gasnet_config.h CONFIG_CLEAN_FILES = tests/Makefile CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(configdir)" \ "$(DESTDIR)$(includedir)" LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libgasnet_tools_par_a_AR = $(AR) $(ARFLAGS) libgasnet_tools_par_a_LIBADD = am_libgasnet_tools_par_a_OBJECTS = libgasnet_tools_par_a_OBJECTS = $(am_libgasnet_tools_par_a_OBJECTS) libgasnet_tools_seq_a_AR = $(AR) $(ARFLAGS) libgasnet_tools_seq_a_LIBADD = am_libgasnet_tools_seq_a_OBJECTS = libgasnet_tools_seq_a_OBJECTS = $(am_libgasnet_tools_seq_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgasnet_tools_par_a_SOURCES) \ $(libgasnet_tools_seq_a_SOURCES) DIST_SOURCES = $(libgasnet_tools_par_a_SOURCES) \ $(libgasnet_tools_seq_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(config_DATA) HEADERS = $(include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ gasnet_config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gasnet_config.h.in \ $(top_srcdir)/config-aux/compile \ $(top_srcdir)/config-aux/config.guess \ $(top_srcdir)/config-aux/config.sub \ $(top_srcdir)/config-aux/install-sh \ $(top_srcdir)/config-aux/missing \ $(top_srcdir)/config-aux/mkinstalldirs \ $(top_srcdir)/tests/Makefile.in ChangeLog README acconfig.h DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ @NEED_DOCDIR_TRUE@docdir = $(datadir)/doc/GASNet docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I other/plpa/config # Directories for automake to recurse into: SUBDIRS = \ config-aux \ other CONDUITMODE_DIST_SUBDIRS = \ mpi-conduit \ smp-conduit \ udp-conduit \ ibv-conduit \ ucx-conduit \ ofi-conduit CONDUITMODE_headers = \ gasnetex.h \ gasnet.h \ gasnet_ammacros.h \ gasnet_trace.h \ gasnet_fwd.h \ other/kinds/gasnet_mk.h \ extended-ref/coll/gasnet_coll.h \ extended-ref/ratomic/gasnet_ratomic.h \ extended-ref/vis/gasnet_vis.h CONDUITMODE_EXTRA_DIST = \ docs \ extended-ref \ gasnet_legacy.c \ gasnet_event.c \ gasnet_event_internal.h \ gasnet_handler_internal.h \ gasnet_internal.h \ gasnet_internal.c \ gasnet_am.h \ gasnet_am.c \ gasnet_mmap.c \ gasnet_tm.c \ gasnet_diagnostic.c \ gasnet_pshm.h \ gasnet_pshm.c \ gasnet_syncops.h \ gasnet_trace.c CONDUITMODE_INSTALL_DOCS = \ docs/memory_kinds.pdf \ docs/memory_kinds_implementation.md \ docs/implementation_defined.md \ docs/gasnet1_differences.md \ docs/GASNet-EX.txt # GASNET_TOOLSONLY_FALSE_END # bug3285: Order matters here: other should follow conduits to maintain dependencies for distclean DIST_SUBDIRS = $(CONDUITMODE_DIST_SUBDIRS) $(SUBDIRS) configdir = $(includedir) config_DATA = $(CONFIG_HEADER) headers = \ $(CONDUITMODE_headers) \ gasnet_asm.h \ gasnet_atomicops.h \ gasnet_atomic_bits.h \ gasnet_atomic_fwd.h \ gasnet_basic.h \ gasnet_help.h \ gasnet_membar.h \ gasnet_timer.h \ gasnet_tools.h \ gasnet_toolhelp.h EXTRA_DIST = \ $(CONDUITMODE_EXTRA_DIST) \ README \ README-tools \ ChangeLog \ license.txt \ .autom4te.cfg \ Bootstrap \ unBootstrap \ configure.in \ acconfig.h \ acinclude.m4 \ gasnet_tools.c # tests handled below include_HEADERS = $(headers) # deliberately omitted git-only docs: README-devel README-git README-release gasnet.* INSTALL_DOCS = \ $(CONDUITMODE_INSTALL_DOCS) \ README \ README-tools \ license.txt #------------------------------------------------------- # libgasnet_tools goop @BUILD_SEQ_LIBS_TRUE@libgasnet_tools_seq_a_SOURCES = @BUILD_SEQ_LIBS_TRUE@libraries_seq = libgasnet_tools-seq.a @BUILD_SEQ_LIBS_TRUE@fragments_seq = gasnet_tools-seq.mak @BUILD_SEQ_LIBS_TRUE@pkgconfig_seq = gasnet_tools-seq.pc @BUILD_PAR_LIBS_TRUE@libgasnet_tools_par_a_SOURCES = @BUILD_PAR_LIBS_TRUE@libraries_par = libgasnet_tools-par.a @BUILD_PAR_LIBS_TRUE@fragments_par = gasnet_tools-par.mak @BUILD_PAR_LIBS_TRUE@pkgconfig_par = gasnet_tools-par.pc libraries = $(libraries_seq) $(libraries_par) fragments = $(fragments_seq) $(fragments_par) pkgconfig = $(pkgconfig_seq) $(pkgconfig_par) lib_LIBRARIES = $(libraries) @CONDUIT_MODE_TRUE@TESTINSTANCE = $${PPID:-xxxx} @CONDUIT_MODE_TRUE@TESTLOG = `pwd`/.test-results @CONDUIT_MODE_TRUE@RUN_TEST_TARGETS = \ @CONDUIT_MODE_TRUE@ run-tests run-tests-seq run-tests-parsync run-tests-par \ @CONDUIT_MODE_TRUE@ run-tests-installed-seq run-tests-installed-parsync run-tests-installed-par @CONDUIT_MODE_FALSE@CLEANFILES = $(TOOLSONLY_TESTS) @CONDUIT_MODE_TRUE@CLEANFILES = $(TESTLOG) @CONDUIT_MODE_FALSE@TOOLSONLY_CHECK = run-tests @CONDUIT_MODE_FALSE@TOOLSONLY_TESTS = testtools # Build, clean, install, uninstall, etc. the conduits - in parallel if possible. # Instead of automake's loop over subdir, we expand to one target per subdir. # Care is taken w/ the 'clean-local' rule in case distclean has wiped the # local or conduit Makefiles # Note that if ($VAR:%=%FOO) doesn't work for a given make, then we are # reduced to using actual conduit names as PHONY targets, but the rule for # $(recurse_local) is tailored to work correctly regardless. recurse_local = $(CONDUITS:%=%-recurse) recurse_local_dummy # conduit subdirectories that should be made, even when the conduit is disabled SPECIAL_SUBDIRS = mpi-conduit/contrib @TOOLSONLY_MODE_FALSE@TESTDIST = `find . -print | grep -v ^./mpi` @TOOLSONLY_MODE_TRUE@TESTDIST = README testtools.c test.h Makefile.in @TOOLSONLY_MODE_FALSE@GIT_DESCRIBE_DIRTY = --dirty # A tools-only git clone is *always* dirty, but we don't want to see the # string '-dirty' in version info of distributed tarballs and resuting installs. @TOOLSONLY_MODE_TRUE@GIT_DESCRIBE_DIRTY = @USE_PSHM_FALSE@PSHM_CONFIG_FLAG = # If we've enabled PSHM, also enabled for 'make distcheck' @USE_PSHM_TRUE@PSHM_CONFIG_FLAG = --enable-pshm DISTCHECK_CONFIGURE_FLAGS = $(PSHM_CONFIG_FLAG) all: gasnet_config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): gasnet_config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/gasnet_config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status gasnet_config.h $(srcdir)/gasnet_config.h.in: $(am__configure_deps) $(top_srcdir)/acconfig.h ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f gasnet_config.h stamp-h1 tests/Makefile: $(top_builddir)/config.status $(top_srcdir)/tests/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ if test -f $$p; then \ $(am__strip_dir) \ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c install-configDATA: $(config_DATA) @$(NORMAL_INSTALL) @list='$(config_DATA)'; test -n "$(configdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(configdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(configdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(configdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(configdir)" || exit $$?; \ done uninstall-configDATA: @$(NORMAL_UNINSTALL) @list='$(config_DATA)'; test -n "$(configdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(configdir)'; $(am__uninstall_files_from_dir) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive all-am: Makefile $(LIBRARIES) $(DATA) $(HEADERS) gasnet_config.h \ all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @CONDUIT_MODE_FALSE@installcheck-local: clean: clean-recursive clean-am: clean-generic clean-libLIBRARIES clean-local mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-configDATA install-data-local \ install-includeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-exec-local install-libLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: installcheck-local maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-configDATA uninstall-includeHEADERS \ uninstall-libLIBRARIES uninstall-local .MAKE: $(am__recursive_targets) all check-am install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ am--refresh check check-am check-local clean clean-cscope \ clean-generic clean-libLIBRARIES clean-local cscope \ cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ dist-zip dist-zstd distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-configDATA install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-exec-local install-html \ install-html-am install-includeHEADERS install-info \ install-info-am install-libLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installcheck-local installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-configDATA uninstall-includeHEADERS \ uninstall-libLIBRARIES uninstall-local .PRECIOUS: Makefile # GASNET_TOOLSONLY_TRUE_BEGIN # CONDUITMODE_DIST_SUBDIRS = # CONDUITMODE_headers = # CONDUITMODE_EXTRA_DIST = .gasnet_toolsonly_mode # CONDUITMODE_INSTALL_DOCS = # GASNET_TOOLSONLY_TRUE_END # GASNET_TOOLSONLY_FALSE_BEGIN # Directories we manually recurse into: force: # leading - prevents distclean failures -include $(top_builddir)/other/Makefile-libgasnet.mak libgasnet_tools-seq.a: $(libgasnet_tools_dependencies) @$(MAKE) do-libgasnet_tools-seq libgasnet_tools-par.a: $(libgasnet_tools_dependencies) @$(MAKE) do-libgasnet_tools-par #------------------------------------------------------- # bug1758: cannot depend on $(top_builddir)/other/Makefile-libgasnet.mak here, # as that will cause a failure during distclean on some make versions # make should automatically introduce the desired dependency on Makefile-libgasnet.mak.in # due to the include operation above Makefile: $(srcdir)/Makefile.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status # echo an arbitrary make/environment variable echovar: force @echo $(VARNAME)=\"$($(VARNAME))\" @CONDUIT_MODE_TRUE@@BUILD_PAR_LIBS_TRUE@ DEFAULT_TEST_MODE=par @CONDUIT_MODE_TRUE@@BUILD_PAR_LIBS_FALSE@ DEFAULT_TEST_MODE=seq @CONDUIT_MODE_TRUE@test: tests-$(DEFAULT_TEST_MODE) @CONDUIT_MODE_TRUE@tests: tests-$(DEFAULT_TEST_MODE) @CONDUIT_MODE_TRUE@tests-installed: tests-installed-$(DEFAULT_TEST_MODE) # automake name, used by distcheck: @CONDUIT_MODE_TRUE@installcheck-local: tests-installed-$(DEFAULT_TEST_MODE) # xSDK alias: @CONDUIT_MODE_TRUE@test_install: run-tests-installed-$(DEFAULT_TEST_MODE) @CONDUIT_MODE_TRUE@other-tests: @CONDUIT_MODE_TRUE@ @cd $(top_builddir)/other && $(MAKE) all tests @CONDUIT_MODE_TRUE@tests-seq tests-parsync tests-par tests-installed-seq tests-installed-par tests-installed-parsync: other-tests @CONDUIT_MODE_TRUE@ @for conduit in $(CONDUITS) ; do \ @CONDUIT_MODE_TRUE@ ( cd "$(top_builddir)/$$conduit-conduit" && $(MAKE) $@ ) || exit $$?; \ @CONDUIT_MODE_TRUE@ done @CONDUIT_MODE_TRUE@$(RUN_TEST_TARGETS): do-begin-tests @CONDUIT_MODE_TRUE@ @testinst=$(TESTINSTANCE) ; \ @CONDUIT_MODE_TRUE@ testlog=$(TESTLOG) ; \ @CONDUIT_MODE_TRUE@ err=0 ; \ @CONDUIT_MODE_TRUE@ for conduit in $(CONDUITS) ; do \ @CONDUIT_MODE_TRUE@ ( cd "$(top_builddir)/$$conduit-conduit" && \ @CONDUIT_MODE_TRUE@ $(MAKE) TESTINSTANCE=$$testinst TESTLOG=$$testlog \ @CONDUIT_MODE_TRUE@ TESTLOG_INHERIT=1 $@ ) || err=$$? ; \ @CONDUIT_MODE_TRUE@ if test "$$err" != "0" ; then \ @CONDUIT_MODE_TRUE@ echo " *-* COMPILE FAILURE: $$conduit-conduit $@ *-*" >> $(TESTLOG) ; \ @CONDUIT_MODE_TRUE@ break ; \ @CONDUIT_MODE_TRUE@ fi ; \ @CONDUIT_MODE_TRUE@ done ; \ @CONDUIT_MODE_TRUE@ if test "$$err" = "0" ; then \ @CONDUIT_MODE_TRUE@ ( cd $(top_builddir)/other && \ @CONDUIT_MODE_TRUE@ $(MAKE) TESTINSTANCE=$$testinst TESTLOG=$$testlog \ @CONDUIT_MODE_TRUE@ TESTLOG_INHERIT=1 run-tests ) || err=$$? ; \ @CONDUIT_MODE_TRUE@ fi ; \ @CONDUIT_MODE_TRUE@ $(MAKE) TESTINSTANCE=$(TESTINSTANCE) TESTLOG=$(TESTLOG) do-end-tests ; \ @CONDUIT_MODE_TRUE@ exit $$err @CONDUIT_MODE_TRUE@do-begin-tests: @CONDUIT_MODE_TRUE@ @testinst=$(TESTINSTANCE) ; \ @CONDUIT_MODE_TRUE@ testlog=$(TESTLOG) ; \ @CONDUIT_MODE_TRUE@ if test "`sed 1q $$testlog 2> /dev/null`" != "$$testinst" ; then \ @CONDUIT_MODE_TRUE@ echo "$$testinst" > $$testlog ; \ @CONDUIT_MODE_TRUE@ echo Starting a new test instance, log=$$testlog ; \ @CONDUIT_MODE_TRUE@ fi @CONDUIT_MODE_TRUE@do-end-tests: @CONDUIT_MODE_TRUE@ @testinst=$(TESTINSTANCE) ; \ @CONDUIT_MODE_TRUE@ testlog=$(TESTLOG) ; \ @CONDUIT_MODE_TRUE@ if test "`sed 1q $$testlog 2> /dev/null`" = "$$testinst" ; then \ @CONDUIT_MODE_TRUE@ line='+++++++++++++++++++++++++++++++++++++++' ; line="$$line$$line" ; \ @CONDUIT_MODE_TRUE@ echo "$$line" ; \ @CONDUIT_MODE_TRUE@ echo Test results: `sed -n '1d;/\*-\*/p' $$testlog | wc -l` failures ; \ @CONDUIT_MODE_TRUE@ sed 1d $$testlog ; \ @CONDUIT_MODE_TRUE@ echo "$$line" ; \ @CONDUIT_MODE_TRUE@ fi @CONDUIT_MODE_FALSE@test: tests @CONDUIT_MODE_FALSE@tests: $(TOOLSONLY_TESTS) @CONDUIT_MODE_FALSE@$(TOOLSONLY_TESTS): force @CONDUIT_MODE_FALSE@ @$(MAKE) -f $(top_builddir)/tests/Makefile \ @CONDUIT_MODE_FALSE@ GASNET_INCLUDES="-I@TOP_BUILDDIR@ -I@TOP_SRCDIR@ -I@TOP_SRCDIR@/other" \ @CONDUIT_MODE_FALSE@ $@ @CONDUIT_MODE_FALSE@run-tests: tests @CONDUIT_MODE_FALSE@ ./testtools $(recurse_local): @if test "$@" != "recurse_local_dummy" ; then \ cd `echo $@ | sed s/-recurse//`-conduit && $(MAKE) $(DO_WHAT) || exit $$? ; \ fi recurse_special: @for dir in $(SPECIAL_SUBDIRS) ; do \ if test -f $$dir/Makefile ; then \ cd $$dir && $(MAKE) $(DO_WHAT) || exit $$? ; \ fi ; \ done all-local: $(lib_LIBRARIES) $(fragments) $(pkgconfig) @$(MAKE) $(recurse_local) DO_WHAT=$${DO_WHAT=all} @$(MAKE) recurse_special DO_WHAT=$${DO_WHAT=all} clean-local: rm -f $(fragments) $(pkgconfig) @if test -f Makefile -a -f smp-conduit/Makefile; then \ $(MAKE) $(recurse_local) DO_WHAT=clean || exit $$? ; \ fi @if test -f Makefile; then \ $(MAKE) recurse_special DO_WHAT=clean ; \ fi check-local: check-exports $(TOOLSONLY_CHECK) $(MAKE) check-pkgconfig CHECK_FILES="$(pkgconfig)" seq par parsync: @$(MAKE) $(recurse_local) DO_WHAT=$@ check tests-clean: @$(MAKE) $(recurse_local) DO_WHAT=$@ @cd "$(top_builddir)/other" && $(MAKE) $@ check-prefix-vars: force @if test -n "$(DESTDIR)" -a `expr "X$(DESTDIR)" : X/` = 0; then \ echo "ERROR: install \$$DESTDIR must begin with a '/' character."; \ exit 1; \ fi @if test -n "$(DESTDIR)" -a `expr "$(DESTDIR)" : ".*[[:space:]]"` != 0; then \ echo "ERROR: install \$$DESTDIR must not contain space characters."; \ exit 1; \ fi @if test `expr "X$(prefix)" : X/` = 0; then \ echo "ERROR: install \$$prefix must begin with a '/' character."; \ exit 1; \ fi @if test `expr "$(prefix)" : ".*[[:space:]]"` != 0; then \ echo "ERROR: install \$$prefix must not contain space characters."; \ exit 1; \ fi install-data-local: check-prefix-vars @$(MAKE) $(recurse_local) DO_WHAT=install-data @$(MAKE) recurse_special DO_WHAT=install-data $(mkinstalldirs) $(DESTDIR)$(docdir) if test -f $(top_srcdir)/version.git ; then \ $(INSTALL_DATA) $(top_srcdir)/version.git $(DESTDIR)$(docdir)/version.git || exit $$? ; \ fi if test -f $(top_srcdir)/extended-ref/README ; then \ $(INSTALL_DATA) $(top_srcdir)/extended-ref/README $(DESTDIR)$(docdir)/README-extref || exit $$? ; \ fi @: Automake 1.4 correct handling of headers given by relative path: ensure nested ext-ref headers get correctly installed in top-level include @for file in $(include_HEADERS) ; do \ if test -f "$(srcdir)/$$file" ; then ( b=`basename $$file` ; set -x ; \ $(INSTALL_DATA) "$(srcdir)/$$file" "$(DESTDIR)$(includedir)/$$b" ) || exit $$?; \ fi; \ done for file in $(INSTALL_DOCS) ; do \ $(INSTALL_DATA) $(top_srcdir)/$$file $(DESTDIR)$(docdir)/`basename $$file` || exit $$? ; \ done $(mkinstalldirs) $(DESTDIR)$(libdir)/pkgconfig @list='$(fragments)'; for p in $$list; do \ if test -f $$p; then \ filename=`basename $$p`; \ destmak="$(DESTDIR)$(includedir)/$$filename"; \ echo @GASNET_INSTALL_CMD@ " < $$p > $$destmak"; \ @GASNET_INSTALL_CMD@ < $$p > $$destmak || exit $$? ; \ thread_model=`echo "$$filename" | sed 's/^.*-\(.*\)\.mak$$/\1/'` ; \ destpc="$(DESTDIR)$(libdir)/pkgconfig/gasnet_tools-$$thread_model.pc"; \ $(MAKE) do-pkgconfig-tools thread_model=$$thread_model pkgconfig_file="$$destpc" FRAGMENT="$$destmak" || exit $$? ; \ chmod 644 "$$destpc" || exit $$? ; \ else :; fi; \ done install-exec-local: check-prefix-vars @$(MAKE) $(recurse_local) DO_WHAT=install-exec @$(MAKE) recurse_special DO_WHAT=install-exec uninstall-local: @if test -n "$(DESTDIR)" -a `expr "X$(DESTDIR)" : X/` = 0; then \ echo "ERROR: \$$DESTDIR must begin with a '/' character."; \ exit 1; \ fi @if test `expr "X$(prefix)" : X/` = 0; then \ echo "ERROR: \$$prefix must begin with a '/' character."; \ exit 1; \ fi @$(MAKE) $(recurse_local) DO_WHAT=uninstall @$(MAKE) recurse_special DO_WHAT=uninstall rm -Rf $(DESTDIR)$(docdir) for file in $(fragments) ; do \ rm -f $(DESTDIR)$(includedir)/$$file ; \ done rm -f $(DESTDIR)$(libdir)/pkgconfig/gasnet_tools-*.pc # Bug3285: the behavior of distclean-recursive varies in incompatible ways # across automake versions, such that no matter what variables we specify # some versions will break the dependencies between subdirectories. # Very early automakes ignore DIST_SUBDIRS entirely. # We override it with our own top-level rule to ensure consistent ordering. distclean: force @for dir in $(DIST_SUBDIRS); do \ if test -f "$$dir/Makefile"; then \ ( cd "$$dir" && $(MAKE) distclean ) || exit 1; \ fi; \ done $(MAKE) recurse_special DO_WHAT=distclean $(MAKE) $(AM_MAKEFLAGS) distclean-am rm -f tests/Makefile rm -f $(am__CONFIG_DISTCLEAN_FILES) rm -f config.status gasnet_config.h stamp-h1 rm -f Makefile .PHONY: force tests test do-begin-tests do-end-tests \ other-tests other-run-tests tests-seq tests-par tests-parsync \ run-tests-seq run-tests-par run-tests-parsync \ recurse_special $(recurse_local) dist-hook: @if grep -q 'cache_file=/dev/null' $(srcdir)/configure; then \ echo ERROR: Refusing to distribute configure not generated by Bootstrap. Please start with a clean source tree and Bootstrap. ; \ exit 1 ; \ fi if test -d $(srcdir)/.git ; then \ GASNET_DESC=`( cd $(srcdir) && $${GIT=git} describe --long --always $(GIT_DESCRIBE_DIRTY) ) 2>/dev/null | head -n 1`; \ if test -z "$$GASNET_DESC"; then \ echo 'Use of git describe failed even though .git exists' 1>&2; \ exit 1; \ fi; \ $(PERL) -pi -e "s:no-version-control-info:$$GASNET_DESC:;" -- $(distdir)/configure || exit $$? ; \ echo $$GASNET_DESC > $(distdir)/version.git || exit $$? ; \ fi if test -f $(distdir)/docs/Makefile ; then \ cd $(distdir)/docs && $(MAKE) dist-hook || exit $$? ; \ fi mkdir -p $(distdir)/tests # need this special hack to handle tests or distcheck will fail fulldistdir=`cd $(distdir) ; @PWD_PROG@` export fulldistdir ; \ cd $(srcdir)/tests ; for file in $(TESTDIST) ; do \ if test -d $$file -a ! -d $$fulldistdir/tests/$$file ; then \ mkdir -p $$fulldistdir/tests/$$file || exit $$? ; \ fi; \ if test -f $$file -a ! -f $$fulldistdir/tests/$$file ; then \ cp -p $$file $$fulldistdir/tests/$$file || exit $$? ; \ fi ; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/gasnet_fwd.h0000664000175000017500000002254515142313673015724 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/gasnet_fwd.h $ * Description: GASNet Header for selected constants and simple types * Copyright 2018, The Regents of the University of California * Terms of use are as specified in license.txt */ // This header provides a subset of gasnetex.h, for convenience of clients who // want a minimal header that is safe to include in their own client's code. // It defines only preprocessor #define constants and typedefs of simple data types. // All preprocessor identifiers are in the GEX_ or _GEX_ namespace. // All typedefs are in the gex_ namespace. // The _gex_ namespace is used for structure tags. // In particular it does not contain any function declarations or definitions. // Note that only identifiers in the gex_ or GEX_ namespace are guaranteed to // exist as specified but their expansions shown here are subject to change. // The only dependency is on the fixed-width integer types (i.e. or // ), if necessary clients can #include other/portable_inttypes.h to // provide them. #ifndef _GEX_FWD_H #define _GEX_FWD_H #if defined(__cplusplus) && !defined(_IN_GASNETEX_H) extern "C" { #endif //================================================ // gex_Rank_t //================================================ typedef uint32_t gex_Rank_t; #define GEX_RANK_INVALID (~(gex_Rank_t)0) //================================================ // gex_EP_Index_t and gex_EP_Location_t //================================================ typedef uint16_t gex_EP_Index_t; typedef struct { gex_Rank_t gex_rank; gex_EP_Index_t gex_ep_index; } gex_EP_Location_t; //================================================ // gex_Event_t //================================================ struct _gex_event_s; typedef struct _gex_event_s *gex_Event_t; // Pre-defined values: output values #define GEX_EVENT_INVALID ((gex_Event_t)(uintptr_t)0) #define GEX_EVENT_NO_OP ((gex_Event_t)(uintptr_t)1) // Pre-defined values: input pointers-to-event #define GEX_EVENT_NOW ((gex_Event_t*)(uintptr_t)1) #define GEX_EVENT_DEFER ((gex_Event_t*)(uintptr_t)2) #define GEX_EVENT_GROUP ((gex_Event_t*)(uintptr_t)3) //================================================ // gex_Addr_t //================================================ typedef void* gex_Addr_t; //================================================ // GEX_DT_* // Data types for atomics and reductions //================================================ typedef uint32_t gex_DT_t; // Integer types: #define GEX_DT_I32 (1 << _GEX_DT_I32) #define GEX_DT_U32 (1 << _GEX_DT_U32) #define GEX_DT_I64 (1 << _GEX_DT_I64) #define GEX_DT_U64 (1 << _GEX_DT_U64) // Floating-point types: #define GEX_DT_FLT (1 << _GEX_DT_FLT) #define GEX_DT_DBL (1 << _GEX_DT_DBL) // User-defined type: #define GEX_DT_USER (1 << _GEX_DT_USER) //================================================ // GEX_OP_* // Operation codes for atomics and reductions //================================================ typedef uint32_t gex_OP_t; // Accessors #define GEX_OP_SET (1 << _GEX_OP_SET) #define GEX_OP_GET (1 << _GEX_OP_GET) #define GEX_OP_SWAP (1 << _GEX_OP_SWAP) #define GEX_OP_FCAS (1 << _GEX_OP_FCAS) #define GEX_OP_CAS (1 << _GEX_OP_CAS) // Non-fetching bitwise operators #define GEX_OP_AND (1 << _GEX_OP_AND) #define GEX_OP_OR (1 << _GEX_OP_OR) #define GEX_OP_XOR (1 << _GEX_OP_XOR) // Fetching bitwise operators #define GEX_OP_FAND (1 << _GEX_OP_FAND) #define GEX_OP_FOR (1 << _GEX_OP_FOR) #define GEX_OP_FXOR (1 << _GEX_OP_FXOR) // Non-fetching arithmetic operators #define GEX_OP_ADD (1 << _GEX_OP_ADD) #define GEX_OP_SUB (1 << _GEX_OP_SUB) #define GEX_OP_MULT (1 << _GEX_OP_MULT) #define GEX_OP_MIN (1 << _GEX_OP_MIN) #define GEX_OP_MAX (1 << _GEX_OP_MAX) #define GEX_OP_INC (1 << _GEX_OP_INC) #define GEX_OP_DEC (1 << _GEX_OP_DEC) // Fetching arithmetic operators #define GEX_OP_FADD (1 << _GEX_OP_FADD) #define GEX_OP_FSUB (1 << _GEX_OP_FSUB) #define GEX_OP_FMULT (1 << _GEX_OP_FMULT) #define GEX_OP_FMIN (1 << _GEX_OP_FMIN) #define GEX_OP_FMAX (1 << _GEX_OP_FMAX) #define GEX_OP_FINC (1 << _GEX_OP_FINC) #define GEX_OP_FDEC (1 << _GEX_OP_FDEC) // User-defined reduction operators: #define GEX_OP_USER (1 << _GEX_OP_USER) #define GEX_OP_USER_NC (1U << _GEX_OP_USER_NC) // DEPRECATED alias #define GEX_OP_CSWAP GEX_OP_FCAS // Convert between fetching and non-fetching variants // Undefined result if input is not in the appropriate range. #define GEX_OP_TO_FETCHING(op) ((op) << (_GEX_OP_FAND - _GEX_OP_AND)) #define GEX_OP_TO_NONFETCHING(op) ((op) >> (_GEX_OP_FAND - _GEX_OP_AND)) //================================================ // GEX_FLAG_* // Flags used for numerous purposes //================================================ typedef uint32_t gex_Flags_t; #define GEX_FLAG_IMMEDIATE (1U << 0) #define GEX_FLAG_SELF_SEG_UNKNOWN (1U << 3) #define GEX_FLAG_SELF_SEG_SOME (1U << 4) #define GEX_FLAG_SELF_SEG_BOUND (1U << 5) #define GEX_FLAG_SELF_SEG_OFFSET (1U << 6) #define GEX_FLAG_PEER_SEG_UNKNOWN (1U << 7) #define GEX_FLAG_PEER_SEG_SOME (1U << 8) #define GEX_FLAG_PEER_SEG_BOUND (1U << 9) #define GEX_FLAG_PEER_SEG_OFFSET (1U << 10) #define GEX_FLAG_AM_PREPARE_LEAST_CLIENT (1U << 11) #define GEX_FLAG_AM_PREPARE_LEAST_ALLOC (1U << 12) #define GEX_FLAG_AD_MY_RANK (1U << 11) #define GEX_FLAG_AD_MY_NBRHD (1U << 12) #define GEX_FLAG_AD_REL (1U << 1) // MUST equal GASNETI_ATOMIC_REL #define GEX_FLAG_AD_ACQ (1U << 2) // MUST equal GASNETI_ATOMIC_ACQ #define GEX_FLAG_AD_FAVOR_MY_RANK (1U << 0) #define GEX_FLAG_AD_FAVOR_MY_NBRHD (1U << 1) #define GEX_FLAG_AD_FAVOR_REMOTE (1U << 2) #define GEX_FLAG_AM_SHORT (1U << 0) #define GEX_FLAG_AM_MEDIUM (1U << 1) #define GEX_FLAG_AM_LONG (1U << 2) #define GEX_FLAG_AM_MEDLONG (GEX_FLAG_AM_MEDIUM|GEX_FLAG_AM_LONG) #define GEX_FLAG_AM_REQUEST (1U << 3) #define GEX_FLAG_AM_REPLY (1U << 4) #define GEX_FLAG_AM_REQREP (GEX_FLAG_AM_REQUEST|GEX_FLAG_AM_REPLY) #define GEX_FLAG_ENABLE_LEAF_LC (1U << 11) #define GEX_FLAG_USES_GASNET1 (1U << 0) #define GEX_FLAG_DEFER_THREADS (1U << 1) #define GEX_FLAG_TM_SCRATCH_SIZE_MIN (1U << 0) #define GEX_FLAG_TM_SCRATCH_SIZE_RECOMMENDED (1U << 1) #define GEX_FLAG_TM_GLOBAL_SCRATCH (1U << 2) #define GEX_FLAG_TM_LOCAL_SCRATCH (1U << 3) #define GEX_FLAG_TM_SYMMETRIC_SCRATCH (1U << 4) #define GEX_FLAG_TM_NO_SCRATCH (1U << 5) #define GEX_FLAG_SCRATCH_SEG_OFFSET (1U << 6) #define GEX_FLAG_GLOBALLY_QUIESCED (1U << 13) #define GEX_FLAG_RANK_IS_JOBRANK (1U << 13) // Bits 14 and 15 reserved for GEX_FLAG_PEER_NEVER_{SELF,NBRHD}, // which are not defined here due to dependence on gasnet_config.h. #define GEX_FLAG_HINT_ACCEL_AD (1U << 0) #define GEX_FLAG_HINT_ACCEL_COLL (1U << 1) #define GEX_FLAG_HINT_ACCEL_ALL ((1U << 2)-1) //================================================ // GEX_EP_CAPABILITY_* // Flags used when creating endpoints //================================================ typedef uint32_t gex_EP_Capabilities_t; #define GEX_EP_CAPABILITY_RMA (1U << 0) #define GEX_EP_CAPABILITY_AM (1U << 1) #define GEX_EP_CAPABILITY_VIS (1U << 2) #define GEX_EP_CAPABILITY_COLL (1U << 3) #define GEX_EP_CAPABILITY_AD (1U << 4) #define GEX_EP_CAPABILITY_ALL ((1U << 5)-1) //-------------------------------------------------------- // Private definitions // Identifiers defined below are not for public use //-------------------------------------------------------- #define _GEX_DT_I32 0 #define _GEX_DT_U32 1 #define _GEX_DT_I64 2 #define _GEX_DT_U64 3 #define _GEX_DT_FLT 4 #define _GEX_DT_DBL 5 #define _GEX_DT_USER 6 // NOTE: // The order of OPs is key to making the TO_FETCHING and TO_NONFETCHING // macros work. Additionally, the non-fetching ops defined in UPC 1.3 // (plus a "shadow" for GET) must use only values less than 16. // Non-fetching: #define _GEX_OP_AND 0 #define _GEX_OP_OR 1 #define _GEX_OP_XOR 2 #define _GEX_OP_ADD 3 #define _GEX_OP_SUB 4 #define _GEX_OP_MULT 5 #define _GEX_OP_MIN 6 #define _GEX_OP_MAX 7 #define _GEX_OP_INC 8 #define _GEX_OP_DEC 9 #define _GEX_OP_SET 10 // This is non-fetching SWAP in UPC 1.3 #define _GEX_OP_CAS 11 // This is non-fetching CSWAP in UPC 1.3 // Bit 12 is reserved to correspond to GEX_OP_TO_NONFETCHING(GEX_OP_GET), which is invalid // Bit 13 is reserved for _GEX_OP_LOGAND // Bit 14 is reserved for _GEX_OP_LOGOR // Fetching: #define _GEX_OP_FAND 15 #define _GEX_OP_FOR 16 #define _GEX_OP_FXOR 17 #define _GEX_OP_FADD 18 #define _GEX_OP_FSUB 19 #define _GEX_OP_FMULT 20 #define _GEX_OP_FMIN 21 #define _GEX_OP_FMAX 22 #define _GEX_OP_FINC 23 #define _GEX_OP_FDEC 24 #define _GEX_OP_SWAP 25 #define _GEX_OP_FCAS 26 #define _GEX_OP_GET 27 // Bit 28 is reserved to correspond to GEX_OP_TO_FETCHING(GEX_OP_LOGAND), which is invalid // Bit 29 is reserved to correspond to GEX_OP_TO_FETCHING(GEX_OP_LOGOR), which is invalid // User-defined operations: #define _GEX_OP_USER 30 #define _GEX_OP_USER_NC 31 #if defined(__cplusplus) && !defined(_IN_GASNETEX_H) } // ends extern "C" #endif #endif // _GEX_FWD_H gasnet-2025.8.0/README-tools0000664000175000017500000020633715142313673015453 0ustar alastairalastair============================ README file for GASNet tools ============================ GASNet tools specification version: 1.20 Authors: Dan Bonachea Paul H. Hargrove The GASNet tools are a set of communication-independent utilities that are used to implement GASNet, and constitute a useful portability tool for GASNet clients and even for other portable software that might not require the GASNet communication services. The GASNet tools are available to all regular GASNet clients, and are also available in a stripped-down "tools-only" software distribution which is intended for bundling with third-party software that does not require communication services. This file documents both. ============================================ Tools-Only Distribution Install Instructions ============================================ The GASNet_Tools distribution contains just the sources required to build and use the GASNet tools, without any GASNet conduit support. It can only be used in executables which do not link a GASNet conduit (which already provide the tools). * Step 1: Configure Unpack the distribution and run: configure (options) A few of the more important options available: --help : display all available configure options --prefix=/install/path : set the directory where GASNet Tools will be installed --enable-debug : Enables hundreds of system-wide sanity checks, at a cost in performance. Highly recommended during software development. --disable-pthreads: Can be used to disable the thread-safe version of the tools. * Step 2: Build Use make to build the tools library: make make check (optional, but recommended - builds and runs a correctness test) * Step 3: Install Use make to install the tools library: make install * Step 4: Use the library Once installed, client code should #include from $prefix/include and link the appropriate library in $prefix/lib. Clients which use multiple pthreads should link the thread-safe library, and define GASNETT_THREAD_SAFE before including gasnet_tools.h, eg: cc -o myprogram myprogram.c -I$prefix/include -DGASNETT_THREAD_SAFE=1 \ -L$prefix/lib -lgasnet_tools-par -lpthreads Where $prefix is the prefix passed during Step 1. Clients which never use pthreads may link the single-threaded version of the tools using -lgasnet_tools-seq and the GASNETT_THREAD_SINGLE define. Additionally, client code used to build shared libraries (compiled with -fPIC, -KPIC or a similar compiler-dependent flag) should pass -DGASNETI_FORCE_PIC=1 to ensure use of PIC-safe code in gasnet_tools.h. On a few platforms, additional system libraries or compiler flags may be required for gasnet_tools to work correctly. Clients seeking maximum portability are recommended to get their compiler and linker flags by including the generated Makefile fragments $prefix/include/gasnet_tools-{seq,par}.mak in their Makefile and using the provided make variables they provide. See the comments at the top of those files for exact usage documentation. Alternatively, pkg-config files for the gasnet_tools-{seq,par} packages are installed in $prefix/lib/pkgconfig and provide the same build information. See README for pkg-config usage instructions. =============================== GASNet Tools User Documentation =============================== The remainder of this file documents the usage of GASNet tools, regardless of which distribution is in use. ------------- General Usage ------------- * All clients of GASNet tools should #include before any other header. The only exception is source files that use both a GASNet conduit and GASNet tools, which must include gasnetex.h before gasnet_tools.h. * All of the supported public interfaces in GASNet tools are named using the 'gasnett_' or 'GASNETT_' prefix. Clients of GASNet tools should *ONLY* invoke names with this prefix. Use of names with any other prefix (notably including 'gasneti_') is totally unsupported and subject to change and breakage without notice. * Many of the 'functions' provided by GASNet tools are actually implemented as macros or inline functions for performance reasons. This distinction is explicitly undocumented and open to change without notice, and may even differ across platforms in a given release. To ensure correctness, clients should never attempt to take the address of a GASNet tool 'function' or #undef its name. * The GASNet tools have been ported to all the platforms listed in the main GASNet README. They may work on others as well. Please contact us if you have a new platform you'd like to see supported. * For questions on using the GASNet tools, contact gasnet-users@lbl.gov. It's especially recommended to contact us before bundling the tools in your software package. ------ Timers ------ GASNet tools provides high-granularity, low-overhead wall-clock timers using system-specific support, where available. gasnett_tick_t - timer datatype representing an integer number of "ticks" where a "tick" has a system-specific interpretation safe to be handled using integer operations (+,-,<,>,==) gasnett_tick_t gasnett_ticks_now() - returns the current tick count note that tick values are THREAD-specific, and do NOT represent a globally-synchronized timer. In specific, tick values are very likely to have a different base value across nodes, and might even advance at substantially different rates on different nodes. Therefore tick values and tick intervals from different threads should never be directly compared or arithmetically combined, without first converting the relevant tick intervals to wall time intervals. uint64_t gasnett_ticks_to_ns(gasnett_tick_t ticks) - convert ticks to nanoseconds as a uint64_t GASNETT_TICK_MIN - a value representing the minimum value storable in a gasnett_tick_t GASNETT_TICK_MAX - a value representing the maximum value storable in a gasnett_tick_t Environment: For Linux on x86, x86-64 or MIC processors, the default timer is the TSC which requires choosing a mechanism for calibration. This can be controlled via environment variables: * GASNET_TSC_RATE GASNET_TSC_RATE=walltime Measures the TSC tick rate against the OS-provided wallclock time. This is the default. GASNET_TSC_RATE=cpuinfo Obtains the TSC tick rate from information in /proc/cpuinfo This is known to be incorrect for certain recent CPU models. GASNET_TSC_RATE=[Hz] If given an integer in the range 1 Million to 100 Billion, this will be taken as the TSC tick rate in Hz (cycles per second). To avoid the ambiguity between binary (M=2^20) and decimal (M=10^6), no suffixes are accepted. * GASNET_TSC_RATE_TOLERANCE This is a floating-point value (read by gasnett_getenv_dbl_withdefault()) which indicates the relative error permitted in the calibration of the TSC. For instance the value 0.001 would permit a relative error as large as 1 part in 1000, or 0.1%. Exceeding this level of permitted relative error will result in a warning message. * GASNET_TSC_RATE_HARD_TOLERANCE This environment variable functions like GASNET_TSC_RATE_TOLERANCE, except that exceeding this value results in a fatal error. * GASNET_TSC_VERBOSE This boolean setting requests console output regarding calibration activity ----- Sleep ----- int gasnett_nsleep(uint64_t ns_delay) - nanosecond resolution sleep Sleep for at least the indicated number of nanoseconds. If interrupted by a signal, may terminate the sleep early returning non-zero with errno = EINTR. If ns_delay is zero, this function returns without sleeping. --------------- Memory barriers --------------- Memory barriers are used to implement lock-free synchronization and data sharing across the threads of a process. gasnett_local_wmb: A local memory write barrier - ensure all stores to local mem from this thread are globally completed across this SMP before issuing any subsequent loads or stores. (i.e. all loads issued from any CPU subsequent to this call returning will see the new value for any previously issued stores from this proc, and any subsequent stores from this CPU are guaranteed to become globally visible after all previously issued stores from this CPU) This must also include whatever is needed to prevent the compiler from reordering loads and stores across this point. gasnett_local_rmb: A local memory read barrier - ensure all subsequent loads from local mem from this thread will observe previously issued stores from any CPU which have globally completed. For instance, on the Alpha this ensures that queued cache invalidations are processed and on the PPC this discards any loads that were executed speculatively. This must also include whatever is needed to prevent the compiler from reordering loads and stores across this point. gasnett_local_mb: A "full" local memory barrer. This is equivalent to both a wmb() and rmb(). All outstanding loads and stores must be completed before any subsequent ones may begin. gasnett_weak_wmb: gasnett_weak_rmb: gasnett_weak_mb: These are equivalent to the corresponding gasnett_local_* except that in a build without threads these compile away to nothing. gasnett_compiler_fence: A barrier to compiler optimizations that would reorder any memory references across this point in the code. Note that for all of the memory barriers, we require only that a given architecture's "normal" loads and stores are ordered as required. "Extended" instructions such as MMX, SSE, SSE2, Altivec and vector ISAs on various other machines often bypass some or all of the machine's memory hierarchy and therefore may not be ordered by the same instructions. Authors of MMX-based memcpy and similar code must therefore take care to add appropriate flushes to their code. For more info on memory barriers: http://gee.cs.oswego.edu/dl/jmm/cookbook.html ----------------- Atomic operations ----------------- GASNet tools provides portable atomic memory operations for efficient inter-thread coordination. Note the default atomic operations exposed by GASNet tools only expand to architecturally atomic instructions in GASNETT_THREAD_SAFE mode. In single-threaded mode, they all expand to appropriate regular (non-atomic) operations, which are often more efficient than their atomic equivalents and should be indistinguishable in behavior for programs with no concurrency. The default atomics exposed by GASNet tools are *not* guaranteed to be atomic with respect to signal handlers, and therefore should not be used for synchronizing with signal handlers. If you need signal-safe atomics or atomic memory access in single-threaded codes, see the section on strong atomics below. * gasnett_atomic_t This interface provides a special datatype (gasnett_atomic_t) representing an atomically updated unsigned integer value and a set of atomic ops Atomicity is guaranteed only if ALL accesses to the gasnett_atomic_t data happen through the provided operations (i.e. it is an error to directly access the contents of a gasnett_atomic_t), and if the gasnett_atomic_t data is only addressable by the current process (e.g. not in a System V shared memory segment) It is also an error to access an uninitialized gasnett_atomic_t with any operation other than gasnett_atomic_set(). We define an unsigned type (gasnett_atomic_val_t) and a signed type (gasnett_atomic_sval_t) and provide the following operations on all platforms: gasnett_atomic_init(gasnett_atomic_val_t v) Static initializer (macro) for an gasnett_atomic_t to value v. void gasnett_atomic_set(gasnett_atomic_t *p, gasnett_atomic_val_t v, int flags); Atomically sets *p to value v. gasnett_atomic_val_t gasnett_atomic_read(gasnett_atomic_t *p, int flags); Atomically read and return the value of *p. void gasnett_atomic_increment(gasnett_atomic_t *p, int flags); Atomically increment *p (no return value). void gasnett_atomic_decrement(gasnett_atomic_t *p, int flags); Atomically decrement *p (no return value). int gasnett_atomic_decrement_and_test(gasnett_atomic_t *p, int flags); Atomically decrement *p, return non-zero iff the new value is 0. * Semi-portable atomic operations The following two groups of useful atomic operations are available on most platforms, but not all. Preprocessor definitions indicate what is available. + Group 1: add and subtract gasnett_atomic_val_t gasnett_atomic_add(gasnett_atomic_t *p, gasnett_atomic_val_t op, int flags); gasnett_atomic_val_t gasnett_atomic_subtract(gasnett_atomic_t *p, gasnett_atomic_val_t op, int flags); These implement atomic (unsigned) addition and subtraction. If the result would lie outside the range of gasnett_atomic_val_t, then the excess high-order bits of the exact result are truncated. Both return the value after the addition or subtraction. GASNETT_HAVE_ATOMIC_ADD_SUB will be defined to 1 when these operations are available. They are always either both available, or neither is available. + Group 2: conditional and unconditional swap int gasnett_atomic_compare_and_swap(gasnett_atomic_t *p, gasnett_atomic_val_t oldval, gasnett_atomic_val_t newval, int flags); This operation is the atomic equivalent of: if (*p == oldval) { *p = newval; return NONZERO; } else { return 0; } gasnett_atomic_val_t gasnett_atomic_swap(gasnett_atomic_t *p, gasnett_atomic_val_t newval, int flags); This operation is the atomic equivalent of: gasnett_atomic_val_t oldval = *p; *p = newval; return oldval; GASNETT_HAVE_ATOMIC_CAS will be defined to 1 when these operations are available. They are always either both available, or neither is available. * Range of atomic type Internally a gasnett_atomic_t is an unsigned type of at least 24-bits. No special action is needed to store signed values via gasnett_atomic_set(), however because the type may use less than a full word, gasnett_atomic_signed() is provided to perform any required sign extension if a value read from a gasnett_atomic_t is to be used as a signed type. gasnett_atomic_signed(v) Converts a gasnett_atomic_val_t returned by gasnett_atomic_{read,add,subtract} to a signed gasnett_atomic_sval_t. GASNETT_ATOMIC_MAX The largest representable unsigned value (the smallest representable unsigned value is always 0). GASNETT_ATOMIC_SIGNED_MIN The smallest (most negative) representable signed value. GASNETT_ATOMIC_SIGNED_MAX The largest (most positive) representable signed value. The atomic type is guaranteed to wrap around at its minimum and maximum values in the normal manner expected of two's-complement integers. This includes the 'oldval' and 'newval' arguments to gasnett_atomic_compare_and_swap(), and the 'v' arguments to gasnett_atomic_init() and gasnett_atomic_set() which are wrapped (not clipped) to the proper range prior to assignment (for 'newval' and 'v') or comparison (for 'oldval'). * Memory fence properties of atomic operations NOTE: Atomic operations have no default memory fence properties, as this varies by platform. Every atomic operation except _init() includes a 'flags' argument to indicate the caller's minimum fence requirements. Depending on the platform, the implementation may use fences stronger than those requested, but never weaker. Most cases where atomics are used to implement thread synchronization (eg where the atomic operation indicates the availability or consumption of other data) will need to include some fences to ensure consistency of other data (this includes both non-atomic data, and other atomic variables). Specifying the necessary fence properties as arguments to the atomic operation helps to reduce duplication of fences on some platforms (relative to issuing explicit fences before/after the atomic op), because it allows the data fence to be combined with whatever fences are used to implement the atomic operation. The following fence flags are recognized and may be OR'd together for the flags argument of any atomic operation: GASNETT_ATOMIC_NONE - no fence (equivalent to passing 0) GASNETT_ATOMIC_RMB_PRE - enforce a read/write/full fence before the atomic operation GASNETT_ATOMIC_WMB_PRE GASNETT_ATOMIC_MB_PRE GASNETT_ATOMIC_RMB_POST - enforce a read/write/full fence after the atomic operation GASNETT_ATOMIC_WMB_POST GASNETT_ATOMIC_MB_POST GASNETT_ATOMIC_RMB_POST_IF_TRUE GASNETT_ATOMIC_RMB_POST_IF_FALSE - These enforce a read fence after a boolean atomic operation that succeeds (true) or fails (false). - The boolean atomic operations are compare-and-swap and decrement-and-test. Convenience names for specifying acquire/release semantics in critical sections built from atomics: GASNETT_ATOMIC_REL equivalent to: GASNETT_ATOMIC_WMB_PRE GASNETT_ATOMIC_ACQ equivalent to: GASNETT_ATOMIC_RMB_POST GASNETT_ATOMIC_ACQ_IF_TRUE equivalent to: GASNETT_ATOMIC_RMB_POST_IF_TRUE GASNETT_ATOMIC_ACQ_IF_FALSE equivalent to: GASNETT_ATOMIC_RMB_POST_IF_FALSE * Storage of atomic type Internally an atomic type may use storage significantly larger than the number of significant bits. This additional space may be needed, for instance, to meet platform-specific alignment constraints, or to hold a mutex on platforms lacking any other means of ensuring atomicity. * Fixed-width atomic types The following fixed-width (32- and 64-bit) types/operations are available on all platforms. These are guaranteed to consume exactly the "natural" storage, without padding or any extra alignment. However, one or both may use mutexes or lack signal-safety, even where gasnett_atomic_t does not. Additionally, unlike gasnett_atomic_t, the same set of operations is present on all platforms, even if that requires a mutex-based approach to support the full range of operations. Therefore, there are no GASNETT_HAVE_ defines for the fixed-width atomic operations. gasnett_atomic32_t gasnett_atomic64_t Typedef gasnett_atomic32_init(uint32_t v) gasnett_atomic64_init(uint64_t v) Static initializer (macro). void gasnett_atomic32_set(gasnett_atomic32_t *p, uint32_t v, int flags); void gasnett_atomic64_set(gasnett_atomic64_t *p, uint64_t v, int flags); Atomically set *p to value v. uint32_t gasnett_atomic32_read(gasnett_atomic32_t *p, int flags); uint64_t gasnett_atomic64_read(gasnett_atomic64_t *p, int flags); Atomically read and return the value of *p. int gasnett_atomic32_compare_and_swap(gasnett_atomic32_t *p, uint32_t oldval, uint32_t newval, int flags); int gasnett_atomic64_compare_and_swap(gasnett_atomic64_t *p, uint64_t oldval, uint64_t newval, int flags); Atomic compare-and-swap of *p from oldval to newval. uint32_t gasnett_atomic32_swap(gasnett_atomic32_t *p, uint32_t v, int flags); uint64_t gasnett_atomic64_swap(gasnett_atomic64_t *p, uint64_t v, int flags); Atomically set *p to value v, returning the previous value. uint32_t gasnett_atomic32_add(gasnett_atomic32_t *p, uint32_t v, int flags); uint64_t gasnett_atomic64_add(gasnett_atomic64_t *p, uint64_t v, int flags); Atomically add value v to *p, returning the new value. uint32_t gasnett_atomic32_subtract(gasnett_atomic32_t *p, uint32_t v, int flags); uint64_t gasnett_atomic64_subtract(gasnett_atomic64_t *p, uint64_t v, int flags); Atomically subtract value v from *p, returning the new value. void gasnett_atomic32_increment(gasnett_atomic32_t *p, int flags); void gasnett_atomic64_increment(gasnett_atomic64_t *p, int flags); Atomically add 1 to *p. void gasnett_atomic32_decrement(gasnett_atomic32_t *p, int flags); void gasnett_atomic64_decrement(gasnett_atomic64_t *p, int flags); Atomically subtract 1 from *p. int gasnett_atomic32_decrement_and_test(gasnett_atomic32_t *p, int flags); int gasnett_atomic64_decrement_and_test(gasnett_atomic64_t *p, int flags); Atomically subtract 1 from *p, returning non-zero if *p becomes zero. While some platforms do not enforce the same alignment constraints for all types of a given width, the implementation of the fixed-width atomics guarantee correct atomic operations on storage declared as any of the 4-byte and 8-byte integer or floating point scalar types on a given platform. So, assuming 4-byte float and 8-byte double, fixed-width atomic operations via pointers generated by the following casts are correct: (int32_t *) or (float *) cast to (gasnett_atomic32_t *) (int64_t *) or (double *) cast to (gasnett_atomic64_t *) where any signed or unsigned integral type of the same width may be used in place of int32_t and int64_t. However, the fixed-width atomic operations do NOT guarantee correct operation on arbitrarily aligned blocks of data. For instance the following two examples are NOT permitted EX1: struct { int16_t a, b; } X; gasnett_atomic32_set((gasnett_atomic32_t *)&X, 0, 0); EX2: struct { float Real, Img; } Y; gasnett_atomic64_set((gasnett_atomic64_t *)&Y, 0, 0); because some platforms might align these structures less strictly than the integral and floating point types of equal size. However, since in C unions are always aligned by their most-restrictive constituent type, the following two examples ARE legal: EX3: union { float f; struct { int16_t a, b; } u16s; } X2; gasnett_atomic32_set((gasnett_atomic32_t *)&X2, 0, 0); EX4: union { uint64_t u64; struct { float Real, Img; } cplx32; } Y2; gasnett_atomic64_set((gasnett_atomic64_t *)&Y2, 0, 0); Additionally, casts from (gasnett_atomic32_t *) or (gasnett_atomic64_t *) to pointers to other types are NOT safe in general, because the alignment of the atomic type might be less than required for the other type. When this under-alignment occurs such casts could result in a fatal SIGBUS when the pointer is dereferenced. To avoid this problem apply this rule-of-thumb: Storage to be accessed via both a pointer to a fixed-width atomic type and another pointer type must be declared as the non-atomic type, or as a union of both types. This will ensure the storage is suitably aligned for accesses via pointers to both the atomic and non-atomic types (assuming, of course, that the non-atomic type is one allowed by the previous paragraph.) Note that as a general rule, use of union types may be preferable because they avoid running afoul of pointer-aliasing rules in C/C++ that might otherwise lead to incorrect behavior at high optimization levels. It is not safe to concurrently access the same memory location as both an atomic type and a non-atomic type. For the purpose of this distinction only references using the gasnett_atomic32_ or gasnett_atomic64_ prefixes are atomic. All non-GASNet references and any other GASNet references are non-atomic (including all gets and puts, Active Message calls, etc.). The client code is responsible for providing sufficient synchronization (such as barriers or mutexes) to prevent the concurrent use of any given memory location as both atomic and non-atomic. Use of non-atomic "flag" variables is not sufficient synchronization (even when volatile) in the presence of certain compiler optimizations. Additionally, use of an atomic variable as a "flag" is only sufficient when memory fences are used correctly. When practical, one possible mechanism to have the client code separate the atomic and non-atomic treatment of memory into distinct phases of the computation, separated by a barrier. * Strong atomics GASNet tools offers a "strong" atomics interface, which expands to the strongest available atomic operations on a given platform, even in single threaded-codes. The syntax and semantics for these operations is identical to those described above, with all name prefixes changed as follows: gasnett_atomic_X to gasnett_strongatomic_X gasnett_atomic32_X to gasnett_strongatomic32_X gasnett_atomic64_X to gasnett_strongatomic64_X On most, but not all, platforms, operations on gasnett_strongatomic_t are signal safe. On the few platforms where this is not the case GASNETT_STRONGATOMIC_NOT_SIGNALSAFE will be defined to 1. Similarly, GASNETT_STRONGATOMIC32_NOT_SIGNALSAFE and GASNETT_STRONGATOMIC64_NOT_SIGNALSAFE are defined to 1 IFF the implementation of the fixed-width atomics is not signal-safe. Note that these two are set independently. GASNETT_HAVE_STRONGATOMIC_ADD_SUB will be defined to 1 when gasnett_strongatomic_add() and gasnett_strongatomic_subtract() are available. GASNETT_HAVE_STRONGATOMIC_CAS will be defined to 1 when gasnett_strongatomic_compare_and_swap() and gasnett_strongatomic_swap() are available. As with the non-strong case, these operations are always available for the fixed-width types and thus there are no GASNETT_HAVE_ defines for the fixed-width strong atomic operations. ------------------------- Portable platform defines ------------------------- Most systems have predefined preprocessor tokens for identifying the compiler, OS and architecture in use. However, there is no uniform naming convention for such platform features, and often a given feature (such as CPU family) will be indicated using a different name under different combinations of OS and compiler. GASNet tools provides a uniform naming scheme for detecting these preprocessor-provided platform features, so that #if tests can be written concisely with expressions like: #if PLATFORM_COMPILER_GNU && PLATFORM_OS_SOLARIS && PLATFORM_ARCH_X86 See the comments in gasnet_portable_platform.h for the details of the provided defines. ---------------------------------- Portable fixed-width integer types ---------------------------------- inttypes.h is part of the POSIX and C99 specs, but in practice support for it varies wildly across systems. GASNet tools portably provides the fixed-bit-width integral types via the following typedefs: int8_t, uint8_t signed/unsigned 8-bit integral types int16_t, uint16_t signed/unsigned 16-bit integral types int32_t, uint32_t signed/unsigned 32-bit integral types int64_t, uint64_t signed/unsigned 64-bit integral types intptr_t, uintptr_t signed/unsigned types big enough to hold any pointer offset -------------------- Compiler annotations -------------------- Many compilers have pragmas, attributes or other compiler-specific mechanisms for annotating declarations and code in useful ways which are not standardized by the C specification. The following macros expand to appropriate annotations when available, or to safe, unannotated versions when the given annotation is unavailable. See also "Feature control", below. GASNETT_INLINE(fnname) definition Most forceful inlining demand available. Might generate errors in cases where inlining is semantically impossible (eg recursive functions, varargs fns) fnname should be the name of the function, and definition should be the actual definition of the function (declaration and body) GASNETT_NEVER_INLINE(fnname,definition) Most forceful demand available to disable inlining for function. GASNETT_RESTRICT The C99 'restrict' keyword, if supported by the compiler, or empty otherwise. GASNETT_FORMAT_PRINTF(fnname,fmtarg,firstvararg,declarator) GASNETT_FORMAT_PRINTF_FUNCPTR(fnname,fmtarg,firstvararg,declarator) Annotate function fnname (defined by definition) as a printf-like function, whose arguments should be checked for type compatibility with a format string whenever possible. fmtarg is the 1-based index of the argument providing the format character string, firstvararg is the 1-based index of the first ... argument which corresponds to arguments to the format string. declaration GASNETT_NORETURN; GASNETT_NORETURNP(fnname) Declare the given function as one that will never return (ie program will exit before return) GASNETT_MALLOC declarator GASNETT_MALLOCP(fnname) Declare the given function as one that returns new, unaliased memory (as with malloc) GASNETT_PURE declarator GASNETT_PUREP(fnname) Declare as pure function: one with no effects except the return value, and return value depends only on the parameters and/or global variables. prohibited from performing volatile accesses, compiler fences, I/O, changing any global variables (including statically scoped ones), or calling any functions that do so GASNETT_CONST declarator GASNETT_CONSTP(fnname) Declare as const function: a more restricted form of pure function, with all the same restrictions, except additionally the return value must NOT depend on global variables or anything pointed to by the arguments GASNETT_HOT declarator Declare a function as frequently called. Compilers may do many different things with this information. GASNETT_COLD declarator Declare a function as infrequently called. Compilers may do many different things with this information. GASNETT_DEPRECATED declarator Declare a function as deprecated (subject to future removal). Attempts to generate a warning if the function is called. GASNETT_WARN_UNUSED_RESULT declarator Attempt to generate a warning if the return value of the declared function is ignored by caller. GASNETT_USED declarator Declare the given function as one that must not be omitted, even if the compiler believes the function cannot ever be called. GASNETT_PREDICT_TRUE(expr) GASNETT_PREDICT_FALSE(expr) These macros yield a non-zero value if and only if expr has non-zero value. Additionally, they pass a hint to the compiler that one expects the value to be non-zero or zero, respectively. Use them to wrap a branch-controlling expression when you have strong reason to believe the branch will frequently go in one direction and that the branch is a bottleneck. The macros if_pf() and if_pf() are implemented in terms of these macros. Examples: do { S; } while(GASNETT_PREDICT_FALSE(expr)); // single-trip is common case V = GASNETT_PREDICT_TRUE(expr) ? (val1) : (val2); // val1 is common case if_pf(cond) S; if_pt(cond) S; Drop-in replacements for the standard C 'if' keyword with branch-prediction hints. if_pf and if_pt behave just like 'if' except they give the C compiler a hint that the condition is predicted to be false (if_pf) and the branch not taken, or predicted to be true (pt) and the branch taken. These are equivalent to if(GASNETT_PREDICT_TRUE(expr)) S; and if(GASNETT_PREDICT_FALSE(expr)) S; respectively. gasnett_constant_p(expr) This expands to use of __builtin_constant_p() on compilers with the necessary support, or to the constant 0 otherwise. gasnett_unreachable() This annotation marks the current code location as unreachable (using compiler-specific mechanisms), to assist optimization of surrounding code. gasnett_assume(cond) States simple expression cond is always true, as an annotation directive to guide compiler analysis. Becomes an assertion in DEBUG mode and an analysis directive (when available) in NDEBUG mode. This notably differs from typical assertions in that the expression must remain valid in NDEBUG mode (because it is not preprocessed away), and furthermore may or may not be evaluated at runtime. To ensure portability and performance, cond should NOT contain any function calls or side-effects. WARNING: passing a cond which is ever false in NDEBUG mode could lead the compiler to mis-optimize surrounding code in unintuitive/unexpected ways. GASNETT_FALLTHROUGH This annotation is used to annotate a deliberate/explicit fallthrough of control from one case statement to another, suppressing warnings about implicit fallthrough (the absence of a break statement), such as those generated by GCC's -Wimplicit-fallthrough (also -Wextra). Example: switch (whatever) { case 1: do_something(); GASNETT_FALLTHROUGH case 2: something_else(); } Note it should be placed after the last statement in the case that falls-through and should NOT be followed by a semi-colon. ----------------------------------------------------- Error-checking System Mutexes and Condition Variables ----------------------------------------------------- GASNet tools provides convenience wrappers around the system's pthread mutexes and condition variables. In debug mode, these wrappers add error checking capabilities to detect common usage violations (such as attempts to recursively acquire a mutex, or release a mutex that has not been acquired). The wrappers also implement workarounds for known bugs in the pthread implementations of several systems. In non-threaded builds, these wrappers still compile and expand to appropriate no-ops, unless compiled with -DGASNETT_USE_TRUE_MUTEXES=1 which will force gasnett_mutex_t to always use true locking (even without -DGASNETT_THREAD_SAFE=1). Unlike pthread_mutex_t, these locks may NEVER be obtained recursively, and in debug builds this is detected as a usage violation. Similarly, they are not safe to use for inter-process synchronization in shared memory segments. * Otherwise, the following function similarly to the pthread_mutex symbols of the same name: gasnett_mutex_t GASNETT_MUTEX_INITIALIZER void gasnett_mutex_init(gasnett_mutex_t *) void gasnett_mutex_destroy(gasnett_mutex_t *) int gasnett_mutex_destroy_ignoreerr(gasnett_mutex_t *) mutex creation and destruction, as with pthread_mutex_t gasnett_mutex_destroy_ignoreerr performs no error checking and silently returns any errors (eg as may occur when attempting to destroy a locked mutex) void gasnett_mutex_lock(gasnett_mutex_t *) void gasnett_mutex_unlock(gasnett_mutex_t *) lock and unlock (checks for recursive locking errors) int gasnett_mutex_trylock(gasnett_mutex_t *) non-blocking trylock - returns EBUSY on failure, 0 on success * Additional mutex utilities: void gasnett_mutex_assertlocked(gasnett_mutex_t *) void gasnett_mutex_assertunlocked(gasnett_mutex_t *) In debug builds, these functions respectively assert that the given mutex is currently locked or not locked by the calling thread, generating a fatal error if the assertion is violated. Has no effect in non-debug builds. * The following function identically to the pthread_cond symbols of the same name: gasnett_cond_t GASNETT_COND_INITIALIZER void gasnett_cond_init(gasnett_cond_t *pc) void gasnett_cond_destroy(gasnett_cond_t *pc) condition variable creation and destruction, as with pthread_cond_t void gasnett_cond_signal(gasnett_cond_t *pc) void gasnett_cond_broadcast(gasnett_cond_t *pc) signal at least one / all current waiters on a gasnet_cond_t, while holding the associated mutex void gasnett_cond_wait(gasnett_cond_t *pc, gasnett_mutex_t *pl) release gasnett_mutex_t pl (which must be held) and block WITHOUT POLLING until gasnett_cond_t pc is signalled by another thread, or until the system decides to wake this thread for no good reason (which it may or may not do). Upon wakeup for any reason, the mutex will be reacquired before returning. It's an error to wait if there is only one thread, and can easily lead to deadlock if the last thread goes to sleep. No thread may call wait unless it can guarantee that (A) some other thread will eventually signal it to wake up and (B) some other thread is still polling (except in tools-only mode, where there is no polling). The system may or may not also randomly signal threads to wake up for no good reason, so upon awaking the thread MUST verify using its own means that the condition it was waiting for has actually been signalled (ie that the client-level "outer" condition has been set). In order to prevent races leading to missed signals and deadlock, signaling threads must always hold the associated mutex while signaling, and ensure the outer condition is set *before* releasing the mutex. Additionally, all waiters must check the outer condition *after* acquiring the same mutex and *before* calling wait (which atomically releases the lock and puts the thread to sleep). ------------------- Reader/Writer locks ------------------- As with the gasnett_mutex_t wrappers in the previous section, we also provide wrappers around POSIX reader/writer locks (pthread_rwlock_t). In a nutshell, these allow multiple threads to concurrently acquire a "read" lock (for concurrent read-only access to the protected data structures), but provide mutual exclusion when a thread obtains a "write" lock to update the shared data. CAUTION: The additional opportunities for concurrency provided by reader/writer locks come at a SIGNIFICANT cost in additional serial overhead, relative to simple mutexes. The overhead for obtaining and releasing a read lock on an uncontended pthread_rwlock_t is commonly 50%-300% more expensive than the corresponding operation on simple mutex. Also, write locks still need to enforce mutual exclusion, thus frequent write locks can sharply degrade achieved concurrency. Consequently, rwlock's are only expected to provide a net performance win relative to mutexes when there is a high-degree of concurrency for long-running reader critical sections, and writers are VERY infrequent. In all other cases, one should probably be using a mutex instead. On systems lacking reader/writer locks (or when configured with --disable-rwlock), these compile down to regular gasnett_mutex_t operations - with full serialization and no read concurrency. Some implementations also have a limit on the number of threads that can concurrently obtain a reader lock. For these reasons, client code should be designed to remain deadlock-free when some or all read locks are serialized, even lacking writers. Unlike pthread_rwlock_t, these locks may NOT be obtained recursively, and in debug builds this is detected as a usage violation. Similarly, they are not safe to use for inter-process synchronization in shared memory segments. * Otherwise, the following function similarly to the pthread_rwlock symbols of the same name: gasnett_rwlock_t GASNETT_RWLOCK_INITIALIZER void gasnett_rwlock_init(gasnett_rwlock_t *) void gasnett_rwlock_destroy(gasnett_rwlock_t *) rwlock creation and destruction, as with pthread_rwlock_t void gasnett_rwlock_rdlock(gasnett_rwlock_t *) void gasnett_rwlock_wrlock(gasnett_rwlock_t *) void gasnett_rwlock_unlock(gasnett_rwlock_t *) blocking read lock, blocking write lock and unlock POSIX errors due to reader concurrency limits are masked as blocking int gasnett_rwlock_tryrdlock(gasnett_rwlock_t *) int gasnett_rwlock_trywrlock(gasnett_rwlock_t *) non-blocking trylock - returns EBUSY or EAGAIN on failure, 0 on success * Additional rwlock utilities: void gasnett_rwlock_assertrdlocked(gasnett_rwlock_t *) void gasnett_rwlock_assertwrlocked(gasnett_rwlock_t *) void gasnett_rwlock_assertlocked(gasnett_rwlock_t *) void gasnett_rwlock_assertunlocked(gasnett_rwlock_t *) In debug builds, these functions respectively assert that the given rwlock is currently locked (for read, write or either) or not locked by the calling thread, generating a fatal error if the assertion is violated. Has no effect in non-debug builds. -------------------- Thread-specific data -------------------- GASNet tools provides wrappers to define and access pointers to thread-specific data, using an interface that expands to the fastest available mechanism provided by the current platform for thread-specific data on threaded configurations (eg __thread or pthread_getspecific()), and expands to simple dereference of process-global storage for non-threaded configurations. Automatically handles the hassle of pthread key creation if required. A thread-specific data pointer (mykey) must be declared as: GASNETT_THREADKEY_DEFINE(mykey); - must be defined in exactly one C file at global scope GASNETT_THREADKEY_DECLARE(mykey); - optional, use in headers to reference externally-defined key and then can be used as: void *val = gasnett_threadkey_get(mykey); gasnett_threadkey_set(mykey,val); no initialization is required (happens automatically on first access). Initialization can optionally be performed using: gasnett_threadkey_init(mykey); which then allows subsequent calls to: void *val = gasnett_threadkey_get_noinit(mykey); gasnett_threadkey_set_noinit(mykey,val); these save a branch by avoiding the initialization check. gasnett_threadkey_init is permitted to be called multiple times and from multiple threads - calls after the first one will be ignored. --------------------- Environment utilities --------------------- Following utilities support querying the environment and manipulating the result. Most of the query functions will report their actions to the console when the user selects verbose reporting mode, to support self-documenting environment settings. char *gasnett_format_number(int64_t val, char *buf, size_t bufsz, int is_mem_size); format a integer value as a human-friendly string, with appropriate mem suffix int64_t gasnett_parse_int(const char *str, uint64_t mem_size_multiplier); parse an integer value back out again if mem_size_multiplier==0, it's a unitless quantity otherwise, it's a memory size quantity, and mem_size_multiplier provides the default memory unit (ie 1024=1KB) if the string provides none void gasnett_setenv(const char *key, const char *value); void gasnett_unsetenv(const char *key); set/unset an environment variable, for the local process ONLY char *gasnett_getenv(const char *keyname); raw environment query function, bypasses reporting uses the gasnet conduit-provided global environment if available or regular getenv otherwise legal to call before gasnet_init, but may malfunction if the conduit has not yet established the contents of the environment char *gasnett_getenv_withdefault(const char *keyname, const char *defaultval); environment query for a string parameter if user has set value the return value indicates their selection if value is not set, the provided default value is returned call is reported to the console in verbose-environment mode, (only the first call with a given key is reported) legal to call before gasnet_init, but may malfunction if the conduit has not yet established the contents of the environment int gasnett_getenv_yesno_withdefault(const char *keyname, int defaultval); environment query for a yes/no parameter if user has set value to 'Y|YES|y|yes|1' or 'N|n|NO|no|0', the return value indicates their selection if value is not set, the provided default value is returned int64_t gasnett_getenv_int_withdefault(const char *keyname, int64_t defaultval, uint64_t mem_size_multiplier); environment query for an integral parameter if mem_size_multiplier non-zero, expect a (possibly fractional) memory size with suffix (B|KB|MB|GB|TB) and the default multiplier is mem_size_multiplier (eg 1024 for KB) otherwise, expect a positive or negative integer in decimal or hex ("0x" prefix) the return value indicates their selection if value is not set, the provided default value is returned double gasnett_getenv_dbl_withdefault(const char *keyname, double defaultval); environment query for a floating-point parameter if user has set value the return value indicates their selection which must be a valid floating-point value or a fraction (e.g "1.5", "-1e4", or "3/8") if value is not set, the provided default value is returned call is reported to the console in verbose-environment mode, (only the first call with a given key is reported) legal to call before gasnet_init, but may malfunction if the conduit has not yet established the contents of the environment int gasnett_verboseenv(); returns true iff GASNET_VERBOSEENV reporting is enabled on this node note the answer may change during initialization void gasnett_envint_display(const char *key, int64_t val, int is_dflt, int is_mem_size); void gasnett_envstr_display(const char *key, const char *val, int is_dflt); void gasnett_envdbl_display(const char *key, double val, int is_dflt); display an integral/string/double environment setting iff gasnett_verboseenv() ------------------------------- Backtracing and debugger attach ------------------------------- GASNet tools provides some utilities to automatically freeze your process and wait for a debugger attach when errors occur, and generate automatic backtraces during a crash. void gasnett_freezeForDebuggerNow(volatile int *flag, const char *flagsymname); freeze immediately for debugger attach, and prompt the user to unfreeze by changing flag void gasnett_freezeForDebuggerErr(); freeze for debugger attach iff user enabled error freezing (GASNET_FREEZE_ON_ERROR=1) void gasnett_backtrace_init(const char *exename); should be called early at startup with argv[0] in programs that intend to use the automatic backtrace functionality. Alternatively one can pass gasnett_exe_name(). int gasnett_print_backtrace(int fd); print a human-readable backtrace immediately to the provided file descriptor. The mechanism used for generating the backtrace is system specific - on some systems several mechanisms are available and can be prioritized using GASNET_BACKTRACE_TYPE (see GASNet README for details). int (*gasnett_print_backtrace_ifenabled)(int fd); This version is called by all internal GASNet errors, and is a pointer to a function that invokes gasnett_print_backtrace iff GASNET_BACKTRACE is enabled. The pointer can be changed to modify the default backtracing mechanism used for errors (eg to wrap gasnett_print_backtrace with a language-specific symbol demangler). GASNETT_CURRENT_FUNCTION Expands to const char * indicating the current function name, if available. gasnett_current_loc Macro that evaluates to a dynamically-allocated char * describing the current location (file, line number and function) for use in error messages. Backtrace extensibility The GASNet tools auto-backtrace mechanisms can be extended by the client, by defining a variable called gasnett_backtrace_user in the client code, as follows: extern int myapp_do_backtrace(int fd) { /* write backtrace for calling thread to file descriptor fd */ ... return 0; /* indicate success */ } #if GASNETT_SPEC_VERSION_MAJOR > 1 || \ (GASNETT_SPEC_VERSION_MAJOR == 1 && GASNETT_SPEC_VERSION_MINOR >= 1) gasnett_backtrace_type_t gasnett_backtrace_user = { "MYAPP", /* name of backtrace mechanism to be added */ &myapp_do_backtrace, /* pointer to user-provided function that writes backtrace */ 1 /* supports backtracing of multi-threaded executables? */ }; #endif This code will cause MYAPP to be added to the default GASNET_BACKTRACE_TYPE list, and when GASNET_BACKTRACE_TYPE=MYAPP your function will be called to produce backtraces. The function should return non-zero if backtrace generation fails for whatever reason (eg if the call occurs too early), so that other backtrace mechanisms can be attempted. ----------------- System properties ----------------- GASNETT_SYSTEM_TUPLE Configure-detected human-readable target tuple of this system. Intended for informational display purposes. GASNETT_CACHE_LINE_BYTES Compile-time constant positive int which estimates byte width of cache lines shared between CPUs in an SMP. Set to a conservative value if unknown. GASNETT_PAGESIZE Compile-time constant positive int which provides the size in bytes of the system's virtual memory pages. Set to a conservative value for systems lacking VM or a fixed page size. GASNETT_PAGESHIFT Compile-time constant positive int which is log_2(GASNETT_PAGESIZE) const char *gasnett_gethostname(); Returns the current system hostname, as reported by gethostname(), with possible normalization (such as of case). const char *gasnett_exe_name(); Returns a fully-qualified pathname to the currently running executable, or an empty string if the information is unknown. int gasnett_cpu_count(); Returns the count of physical CPU's on this node (ie sharing a virtual memory), or zero if that cannot be determined. Multiple cores may or may not be counted as separate CPUs, depending on the system. uint64_t gasnett_getPhysMemSz(int failureIsFatal); Return the size of the physical memory (in bytes) which is directly addressable on this node. If that cannot be determined, issue a fatal error if failureIsFatal, or return zero otherwise. int gasnett_isLittleEndian(); Return true iff this architecture stores multi-word integral types in memory with the least-significant-byte in the lowest-numbered byte address. const char *gasnett_performance_warning_str(void); Returns a string containing a human-readable warning summarizing attributes of the current configuration that may negatively affect performance (e.g. as a result of settings determined at configure time). If there are no such warnings, the resulting string is empty. const char *gasnett_release_version_str(void); Returns a human-readable string containing the package release version number. Also see GASNETT_RELEASE_VERSION_* below. uint64_t gasnett_release_version(void); Return an monotonically advancing integral representation of the compiled library's package version. Also see GASNETT_RELEASE_VERSION_* below. ------------------- Trace/Stats support ------------------- This section documents interfaces used to control the implementation-defined (non-normative) tracing and statistical collection features of the GASNet library implementation. These features are conditionally available based on configure-time settings, and are currently only active for a "appropriately configured" conduit-mode GASNet library, meaning one configured with the --enable-trace/--enable-stats arguments (or the --enable-debug argument that implies these). The interfaces specified in this section are ONLY functional in translation units meeting ALL of the following conditions: 1. Must `#include ` before `#include ` 2. The included headers must reference an appropriately configured GASNet library. 3. Must eventually link an appropriately configured conduit-mode GASNet library. In all other cases, the macros described in this section may compile away to nothing, or appropriate constant values indicating lack-of-support. See "GASNet tracing & statistical collection" in the GASNet README for more details on the command-line user interface to generate and control trace and stats output. In a nutshell, each process can generate an output stream of trace and stats output (which is usually sent to a file). The trace stream outputs event records as they occur, and the stats stream is used to output statistics that are aggregated in memory before output (usually at process exit). Both streams are optionally filtered by category via user-controllable masks. Note that depending on library build settings, all stats output may additionally be echoed into the trace log (if any). const char *GASNETT_TRACE_GETMASK() const char *GASNETT_STATS_GETMASK() GASNETT_TRACE_SETMASK(const char *newmask) GASNETT_STATS_SETMASK(const char *newmask) Get and set the trace and stats masks for the current process at runtime. The mask is represented as a character string of categories, as defined in the GASNet README. The environment variables described there are used to initialize the mask of active categories at job start, and these calls modify the mask programmatically. Note that envvars GASNET_{TRACE,STATS}FILE (and optionally GASNET_{TRACE,STATS}NODES) must still be set appropriately to enable output, otherwise the mask has no effect. bool GASNETT_TRACE_ENABLED Expands to a non-zero value iff tracing for the `H` category is currently enabled and active (i.e. not filtered by the trace-mask) on the calling process. In general this is NOT a compile-time constant value. GASNETT_TRACE_PRINTF(const char *format, ...) GASNETT_TRACE_PRINTF_FORCE(const char *format, ...) Print a message into the trace log using the 'H' or 'U' categories, respectively, when such tracing is enabled and active. The 'U' category is not subject to trace-mask filtering, thus the _FORCE variant should be used sparingly for low-frequency messages. Argument syntax follows C99 printf conventions (format string followed by arguments). GASNETT_STATS_PRINTF(const char *format, ...) GASNETT_STATS_PRINTF_FORCE(const char *format, ...) Print a message into the stats log using the 'H' or 'U' categories, respectively, when the stats log is enabled and active. The 'U' category is not subject to stats-mask filtering, thus the _FORCE variant should be used sparingly for low-frequency messages. Argument syntax follows C99 printf conventions (format string followed by arguments). GASNETT_STATS_DUMP(bool reset) This call directs the statistical collection system on this process to immediately dump a report of all active statistical counters to the stats output stream (appending to any earlier stats output). If the `reset` argument is non-zero, then statistical counters are additionally reset to their initial values after they are output. This output-then-reset is performed with "best effort" atomicity on a counter-by-counter basis, but atomicity is not strongly guaranteed, especially across separate counters or in the presence of concurrent activity by other threads. If the stats output stream is inactive on this process, this call has no effect. ------------------- Miscellaneous tools ------------------- GASNETT_SPEC_VERSION_MAJOR GASNETT_SPEC_VERSION_MINOR Integral values corresponding to the major and minor version numbers of the GASNet tools specification version adhered to by a particular implementation. The minor version is incremented whenever new functionality is added without breaking backward compatibility. The major version is incremented whenever changes require breaking backward compatibility. The specification version is provided at the top of this document. GASNETT_RELEASE_VERSION_MAJOR GASNETT_RELEASE_VERSION_MINOR GASNETT_RELEASE_VERSION_PATCH Integral values corresponding to the major, minor and patch version numbers of the public release identifiers corresponding the packaging on this implementation of GASNet/GASNet tools. GASNETT_IDENT(identName, identText); Macro that should appear at global scope which takes a globally-unique identifier and a textual string and embeds the textual string in the executable file. The text to be embedded is arbitrary, but if you intend to extract it using the RCS 'ident' utility, it will need to match the pattern: "$[A-Za-z]+: [A-Za-z0-9_()<>.,|-]+ $" Note ident is particularly picky about the part before the initial colon and the final " $". int gasnett_set_affinity(int rank); THIS CALL IS DEPRECATED. Users are encouraged to use hwloc instead. On systems where GASNet Tools lacks cpu-binding support, the preprocessor identifier GASNETT_SET_AFFINITY_SUPPORT will be undefined and this function always returns non-zero. On systems where GASNet Tools supports cpu-binding, GASNETT_SET_AFFINITY_SUPPORT will be defined to 1 and the following description applies. Attempt to "pin" the calling thread to the processor indicated by rank, so that this thread will run only on the named processor (does not guarantee exclusive use of the processor, only tries to ensure the thread will not migrate to other processors). The definition and numbering of "processors" follow those of the system-specific underlying API, but typically treat each thread of an HT/SMT/HMT CPU as a distinct processor. Rank is interpreted mod the number of processors in the system. This call returns 0 on success and non-zero otherwise. void gasnett_sched_yield(); Cause the calling thread to yield (as in sched_yield()), if supported by the system. void gasnett_flush_streams(); Make the best effort possible to flush the stdout/stderr streams to their destinations. Errors are ignored, for instance if one or both streams have been closed. void gasnett_close_streams(); Close the stdin/stdout/stderr streams, usually in preparation for shutdown. Errors are ignored, for instance if any of the streams have been previously closed. void gasnett_fatalerror(const char *msg, ...); void gasnett_fatalerror_nopos(const char *msg, ...); Issue an fatal error message to the console, as specified by the arguments (which follow a printf format convention). Then freeze for debugger and/or print a backtrace (depending on current settings) and issue an abort(). The first form includes information about call site (i.e. function name, source file and line number), whereas the second omits this information. void gasnett_killmyprocess(int exitcode); Terminate the calling process as quickly as possible with the given exitcode, including killing any sibling threads. Bypass any atexit handlers. typedef void (*gasnett_sighandlerfn_t)(int); extern gasnett_sighandlerfn_t gasnett_reghandler(int sigtocatch, gasnett_sighandlerfn_t fp); Register the provided signal handler function to service the specified signal. Return the previous handler function for that signal. Valid fp values include SIG_DFL (system default handler for selected signal) and SIG_IGN (ignore the selected signal). uint64_t gasnett_checksum(const void *p, int numbytes); Compute a very simplistic (insecure) but relatively efficient 64-bit checksum from an untyped block of data [*p...*(p+numbytes-1)]. int gasnett_count0s_uint32_t(uint32_t x); int gasnett_count0s_uint64_t(uint64_t x); int gasnett_count0s_uintptr_t(uintptr_t x); Efficiently count the number of bytes with value 0 in the machine representation of a value of type uint32_t, uint64_t or uintptr_t, respectively. size_t gasnett_count0s(const void *p, size_t numbytes); Efficiently count the number of bytes with value 0 in an untyped block of data [*p...*(p+numbytes-1)]. size_t gasnett_count0s_copy(void * restrict dst, const void * restrict src, size_t numbytes); Efficiently count the number of bytes with value 0 in an untyped block of data [*src...*(src+numbytes-1)], while also copying from src to dst. This function is equivalent (excluding any side-effects of evaluating numbytes) to the following expression: gasnett_count0s(memcpy(dst, src, numbytes), numbytes) but is generally more efficient. gasnett_spinloop_hint() Some processors get measurably better performance when a special instruction is inserted in spin-loops (eg to avoid a memory hazard stall on spin loop exit and reduce power consumption). If such an instruction exists for this architecture, this macro issues the instruction and a compiler fence. Otherwise, this macro expands to the same as gasnett_compiler_fence(). int gasnett_maximize_rlimits(); int gasnett_maximize_rlimit(int res, const char *lim_desc); Maximize an rlimit indicated by res (an RLIMIT_* constant from sys/resource.h), with associated limit description. gasnett_maximize_rlimits() maximizes cpu time and all the in-memory execution rlimits associated with the current process (does not affect file system related limits). These functions return non-zero on success. If the environment variable GASNET_MAXIMIZE_[desc] is set to a false value (as defined by gasnett_getenv_yesno_withdefault()) then the corresponding limit will NOT be maximized, though the result will still indicate success. For instance, setting GASNET_MAXIMIZE_RLIMIT_CPU=0 will suppress maximizing the limit on cpu time, but will not (by itself) cause a zero (failure) return value. ------------------------- Macro argument evaluation ------------------------- When implementing function-like macros that (perhaps conditionally) ignore one or more of their arguments, it is usually desirable to ensure every argument is evaluated exactly once (for side-effects). Unfortunately, the simple idiom `((void)(arg1),whatever(arg2))` will yield warnings from some compilers. The following combine exactly-once evaluation and compile-specific warning suppression (when needed): GASNETT_UNUSED_ARGS1(a1) GASNETT_UNUSED_ARGS2(a1,a2) GASNETT_UNUSED_ARGS3(a1,a2,a3) GASNETT_UNUSED_ARGS4(a1,a2,a3,a4) GASNETT_UNUSED_ARGS5(a1,a2,a3,a4,a5) GASNETT_UNUSED_ARGS6(a1,a2,a3,a4,a5,a6) GASNETT_UNUSED_ARGS7(a1,a2,a3,a4,a5,a6,a7) GASNETT_UNUSED_ARGS8(a1,a2,a3,a4,a5,a6,a7,a8) Contrived example: #define OPTION_1_OF_3(x,y,z) (GASNETT_UNUSED_ARGS2(y,z),(x)) #define OPTION_2_OF_3(x,y,z) (GASNETT_UNUSED_ARGS2(x,z),(y)) #define OPTION_3_OF_3(x,y,z) (GASNETT_UNUSED_ARGS2(x,y),(z)) --------------- Feature control --------------- There are many features of the compilation and execution environment which are probed by GASNet at configure-time. The results of these configure probes are used to determine if/how to implement certain of the macros or functions listed above. In some cases there may be a reasonable need to override the results of the configure probes. This section describes a family of pre-processor symbols that the GASNet client may define in order to control the use of certain features, overriding the default behavior based on the configure-time probes. Use of these preprocessor symbols takes precedence over any information GASNet may have probed from the compiler(s) and libraries at configure-time. THESE SHOULD BE USED WITH CARE, SINCE SYNTAX ERRORS CAN RESULT IF ONE ENABLES A FEATURE NOT SUPPORTED BY THE CURRENT COMPILER. * Feature control for compiler annotations The "Compiler annotations" section above describes a family of macros provided to the client for portably applying certain useful annotations. However, these annotations are implemented based on configure-time tests of the compilers ($CC for GASNet-tools, and optionally $CXX and $MPI_CC for full GASNet). In the event that a GASNet header is processed by a compiler different from the one(s) probed at configure-time, these annotation macros are reduced to their "safe" (usually empty) implementations, since GASNet cannot know that the "new" compiler will accept the same __attribute__(()) or #pragma syntax as the compiler(s) it probed. The client may define any of the following preprocessor symbols, prior to inclusion of gasnetex.h or gasnet_tools.h, to inform GASNet's headers that the current compiler does (#define to 1) or does NOT (#define to 0) support the corresponding syntax. When using a configure-recognized compiler, these default to their configure-detected values. GASNETT_USE_GCC_ATTRIBUTE_ALWAYSINLINE Compiler supports __attribute__((__always_inline__)) GASNETT_USE_GCC_ATTRIBUTE_NOINLINE Compiler supports __attribute__((__noinline__)) GASNETT_USE_GCC_ATTRIBUTE_MALLOC Compiler supports __attribute__((__malloc__)) GASNETT_USE_GCC_ATTRIBUTE_WARNUNUSEDRESULT Compiler supports __attribute__((__warn_unused_result__)) GASNETT_USE_GCC_ATTRIBUTE_USED Compiler supports __attribute__((__used__)) GASNETT_USE_GCC_ATTRIBUTE_MAYALIAS Compiler supports __attribute__((__may_alias__)) GASNETT_USE_GCC_ATTRIBUTE_NORETURN Compiler supports __attribute__((__noreturn__)) GASNETT_USE_GCC_ATTRIBUTE_PURE Compiler supports __attribute__((__pure__)) GASNETT_USE_GCC_ATTRIBUTE_CONST Compiler supports __attribute__((__const__)) GASNETT_USE_GCC_ATTRIBUTE_DEPRECATED Compiler supports __attribute__((__deprecated__)) GASNETT_USE_GCC_ATTRIBUTE_FORMAT Compiler supports __attribute__((__format__ (...))) GASNETT_USE_GCC_ATTRIBUTE_FORMAT_FUNCPTR Compiler supports __attribute__((__format__ (...))) applied to a function pointer GASNETT_USE_GCC_ATTRIBUTE_FORMAT_FUNCPTR_ARG Compiler supports __attribute__((__format__ (...))) applied to a function pointer as an argument to a function (in its declaration and/or definition). GASNETT_USE_BUILTIN_CONSTANT_P Compiler supports __builtin_constant_p() GASNETT_USE_BUILTIN_PREFETCH Compiler supports __builtin_prefetch() GASNETT_USE_BUILTIN_EXPECT Compiler supports __builtin_expect() GASNETT_USE_BUILTIN_UNREACHABLE Compiler supports __builtin_unreachable() GASNETT_USE_BUILTIN_ASSUME Compiler supports __builtin_assume() GASNETT_USE_ASSUME Compiler supports __assume() The following can be defined to control use of C++ attributes: GASNETT_USE_CXX11_ATTRIBUTE_FALLTHROUGH C++ compiler supports [[fallthrough]] GASNETT_USE_CXX11_ATTRIBUTE_CLANG__FALLTHROUGH C++ compiler supports [[clang::fallthrough]] The following can be defined to control use of "restrict" GASNETT_USE_RESTRICT Set to the (possibly empty) keyword to use for GASNETT_RESTRICT Might be, for instance, "restrict", "__restrict" or "__restrict__". GASNETT_USE_RESTRICT_ON_TYPEDEFS Set to "1" to allow use in GASNet's headers of GASNETT_RESTRICT to qualify arguments declared via typedefs (and thus don't look like pointers until the typedef has been expanded). Setting to "0" will disable such use. One may not set GASNETT_USE_RESTRICT_ON_TYPEDEFS without setting GASNETT_USE_RESTRICT. The following can be defined to control use of compiler-specific pragmas GASNETT_USE_PRAGMA_GCC_DIAGNOSTIC Use "#pragma GCC diagnostic" to suppress undesirable diagnostics * Feature control for ctype.h wrappers There are systems on which ctype.h is implemented in such a way that passing char-typed arguments (for instance to isalpha() or tolower()) results in compiler warnings. The GASNet configure script attempts to detect such systems and if found will replace the ctype.h interfaces with wrappers that promote the argument to an int prior to calling the system-provided implementation. One can force (#define to 1) or prohibit (#define to 0) use of these wrappers by defining GASNETT_USE_CTYPE_WRAPPERS. * Feature control for mutexes and condition variables In non-threaded builds, the debugging wrappers around pthreads functions expand to appropriate no-ops, unless compiled with GASNETT_USE_TRUE_MUTEXES=1 which will force unconditional use of true locking (even without GASNETT_THREAD_SAFE=1). NOTE: For proper operation this must be defined BOTH when the GASNet(-tools) library is built, and when compiling client code that includes gasnetex.h or gasnet_tools.h. -------------------------------------------------------------------------- The canonical version of this document is located here: https://bitbucket.org/berkeleylab/gasnet/src/master/README-tools For more information, please email: gasnet-users@lbl.gov or visit the GASNet home page at: https://gasnet.lbl.gov -------------------------------------------------------------------------- gasnet-2025.8.0/ofi-conduit/0000775000175000017500000000000015142313673015642 5ustar alastairalastairgasnet-2025.8.0/ofi-conduit/conduit.mak.in0000664000175000017500000000422415142313673020410 0ustar alastairalastair#INSTRUCTIONS# Conduit-specific Makefile fragment settings #INSTRUCTIONS# #INSTRUCTIONS# The contents of this file are embedded into the #INSTRUCTIONS# *-(seq,par,parsync).mak Makefile fragments at conduit build time #INSTRUCTIONS# The settings in those fragments are used to build GASNet clients #INSTRUCTIONS# (including the GASNet tests). #INSTRUCTIONS# See the conduit-writer instructions in the generated fragments #INSTRUCTIONS# or $(top_srcdir)/other/fragment-head.mak.in for usage info. # When ofi-conduit uses an MPI-based bootstrapper, we must # link using the system MPI compiler @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LD_OVERRIDE = @MPI_CC@ @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LDFLAGS_OVERRIDE = @MPI_CFLAGS@ @LDFLAGS@ @HAVE_BOOTSTRAP_MPI_TRUE@MPI_COMPAT_LIBS = @MPI_LIBS@ # Linker feature requirements embedded in GASNET_LD(FLAGS) which are not satisfied solely by GASNET_LIBS # (eg possible dependence on implicit MPI or C++ libraries added by a linker wrapper in GASNET_LD): @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_LD_REQUIRES_MPI = 1 # Some platforms need extra -libs for the socket calls in ssh-spawner: @HAVE_BOOTSTRAP_SSH_TRUE@SSH_LIBS = @SSH_SPAWNER_LIBS@ @HAVE_FI_HMEM_CUDA_TRUE@OFI_CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ @HAVE_FI_HMEM_CUDA_TRUE@OFI_CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ @HAVE_FI_HMEM_ROCR_TRUE@OFI_HIP_LIBS = @HIP_LIBS@ @HAVE_FI_HMEM_ROCR_TRUE@OFI_HIP_LDFLAGS = @HIP_LDFLAGS@ @HAVE_FI_HMEM_ZE_TRUE@OFI_ZE_LIBS = @ZE_LIBS@ @HAVE_FI_HMEM_ZE_TRUE@OFI_ZE_LDFLAGS = @ZE_LDFLAGS@ CONDUIT_LDFLAGS = @OFI_LDFLAGS@ @PMI_SPAWNER_LDFLAGS@ @HWLOC_LDFLAGS@ $(OFI_CUDA_UVA_LDFLAGS) $(OFI_HIP_LDFLAGS) $(OFI_ZE_LDFLAGS) CONDUIT_LIBS = @OFI_LIBS@ $(MPI_COMPAT_LIBS) $(SSH_LIBS) @PMI_SPAWNER_LIBS@ @HWLOC_LIBS@ $(OFI_CUDA_UVA_LIBS) $(OFI_HIP_LIBS) $(OFI_ZE_LIBS) # Clients may want/need to know which spawners we support: GASNET_SPAWNER_DEFAULT = @GASNET_OFI_SPAWNER_CONF@ GASNET_SPAWNER_FORK = 0 @HAVE_BOOTSTRAP_PMI_TRUE@GASNET_SPAWNER_PMI = 1 @HAVE_BOOTSTRAP_PMI_FALSE@GASNET_SPAWNER_PMI = 0 @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_SPAWNER_MPI = 1 @HAVE_BOOTSTRAP_MPI_FALSE@GASNET_SPAWNER_MPI = 0 @HAVE_BOOTSTRAP_SSH_TRUE@GASNET_SPAWNER_SSH = 1 @HAVE_BOOTSTRAP_SSH_FALSE@GASNET_SPAWNER_SSH = 0 gasnet-2025.8.0/ofi-conduit/gasnet_core_fwd.h0000664000175000017500000002242115142313673021145 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/gasnet_core_fwd.h $ * Description: GASNet header for libfabric (OFI) conduit core (forward definitions) * Copyright 2002, Dan Bonachea * Copyright 2015, Intel Corporation * Portions copyright 2018-2022, The Regents of the University of California. * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_FWD_H #define _GASNET_CORE_FWD_H #define GASNET_CORE_VERSION 1.4 #define GASNET_CORE_VERSION_STR _STRINGIFY(GASNET_CORE_VERSION) #define GASNET_CORE_NAME OFI #define GASNET_CORE_NAME_STR _STRINGIFY(GASNET_CORE_NAME) #define GASNET_CONDUIT_NAME GASNET_CORE_NAME #define GASNET_CONDUIT_NAME_STR _STRINGIFY(GASNET_CONDUIT_NAME) #define GASNET_CONDUIT_OFI 1 #define GASNETC_EXTRA_CONFIG_INFO ",ofi_provider=" _STRINGIFY(GASNETC_OFI_PROVIDER_IDENT) #define GASNETC_DEFAULT_SPAWNER GASNETC_OFI_SPAWNER_CONF /* GASNET_PSHM defined 1 if this conduit supports PSHM. leave undefined otherwise. */ #if GASNETI_PSHM_ENABLED #define GASNET_PSHM 1 #endif /* defined to be 1 if gasnet_init guarantees that the remote-access memory segment will be aligned */ /* at the same virtual address on all nodes. defined to 0 otherwise */ #if GASNETI_DISABLE_ALIGNED_SEGMENTS || GASNET_PSHM #define GASNET_ALIGNED_SEGMENTS 0 /* user or PSHM disabled segment alignment */ #else // No known reason this shouldn't work, but it has never been tested. #define GASNET_ALIGNED_SEGMENTS 0 #endif // If this conduit is considered a "portable conduit" only *conditionally*, // uncomment to enable calls to gasnetc_check_portable_conduit(void) as // described in gasnet_internal.c. #define GASNETC_CHECK_PORTABLE_CONDUIT_HOOK 1 // uncomment for each MK_CLASS which the conduit supports. leave commented otherwise #define GASNET_HAVE_MK_CLASS_CUDA_UVA (GASNETI_MK_CLASS_CUDA_UVA_ENABLED && GASNETC_HAVE_FI_HMEM_CUDA && !GASNET_SEGMENT_EVERYTHING) #define GASNET_HAVE_MK_CLASS_HIP (GASNETI_MK_CLASS_HIP_ENABLED && GASNETC_HAVE_FI_HMEM_ROCR && !GASNET_SEGMENT_EVERYTHING) #define GASNET_HAVE_MK_CLASS_ZE (GASNETI_MK_CLASS_ZE_ENABLED && GASNETC_HAVE_FI_HMEM_ZE && !GASNET_SEGMENT_EVERYTHING) // define to 1 if your conduit has "private" thread(s) which can run AM handlers //#define GASNET_RCV_THREAD 1 // define to 1 if your conduit has "private" thread(s) which progress sends of RMA and/or AM //#define GASNET_SND_THREAD 1 /* uncomment if your conduit has "private" threads which might run conduit code and/or the client's AM handlers, even under GASNET_SEQ. this ensures locking is still done correctly, etc */ //#define GASNETI_CONDUIT_THREADS 1 /* define these to 1 if your conduit needs to augment the implementation of gasneti_reghandler() (in gasnet_internal.c) */ #if 0 #define GASNETC_AMREGISTER 1 #endif /* define this to 1 if your conduit supports PSHM, but cannot use the default interfaces. (see template-conduit/gasnet_core.c and gasnet_pshm.h) */ #if 0 #define GASNETC_GET_HANDLER 1 #endif /* uncomment each line for which your conduit supports the corresponding token info query. */ #define GASNET_SUPPORTS_TI_SRCRANK 1 #define GASNET_SUPPORTS_TI_EP 1 #define GASNET_SUPPORTS_TI_ENTRY 1 #define GASNET_SUPPORTS_TI_IS_REQ 1 #define GASNET_SUPPORTS_TI_IS_LONG 1 /* uncomment for each {Request,Reply} X {Medium,Long} pair for which your conduit implements the corresponding gasnetc_AM_{Prepare,Commit}*() in a "native" manner which "can avoid one or more payload copies relative to the corresponding fixed-payload AM call under the right conditions". See also "GASNETC_BUILD_NP_*", immediately below. */ #define GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM 1 #define GASNET_NATIVE_NP_ALLOC_REP_MEDIUM 1 /* #define GASNET_NATIVE_NP_ALLOC_REQ_LONG 1 */ /* #define GASNET_NATIVE_NP_ALLOC_REP_LONG 1 */ /* conduits may define to '1' (or '0') for {Request,Reply} X {Medium,Long} pairs to force (or prevent) compilation of the corresponding pieces of the conduit-independent reference implementation. If unset, the default is equivalent to '!GASNET_NATIVE_NP_ALLOC_[foo]'. In other words: by default each reference implementation is built if and only if the conduit is not claiming a "native" implementation. This default is correct for most conduits. The conduit-independent implementation works in terms of the internal functions gasnetc_AM{Request,Reply}{Medium,Long}V(). Therefore, your conduit must provide the V-suffixed functions for any case with the corresponding GASNETC_BUILD_NP_* equal to '1' (explicitly or by default). */ /* #define GASNETC_BUILD_NP_REQ_MEDIUM (###) */ /* #define GASNETC_BUILD_NP_REP_MEDIUM (###) */ /* #define GASNETC_BUILD_NP_REQ_LONG (###) */ /* #define GASNETC_BUILD_NP_REP_LONG (###) */ /* uncomment for each conduit-provided Commit{Req,Rep}{Medium,Long}() which has the numargs argument even in an NDEBUG build (it is always passed in DEBUG builds). */ //#define GASNETC_AM_COMMIT_REQ_MEDIUM_NARGS 1 //#define GASNETC_AM_COMMIT_REP_MEDIUM_NARGS 1 //#define GASNETC_AM_COMMIT_REQ_LONG_NARGS 1 //#define GASNETC_AM_COMMIT_REP_LONG_NARGS 1 /* uncomment if your conduit's gasnetc_AMRequest{Short,Medium,Long}V() include a call to gasneti_AMPoll (or equivalent) for progress. The preferred implementation is to Poll only in the M-suffixed calls and not the V-suffixed calls (and GASNETC_REQUESTV_POLLS undefined). Used only by reference implementations (if any) of Prepare/Commit. */ /* #define GASNETC_REQUESTV_POLLS 1 */ /* If your conduit uses conduit-specific extensions to the basic object types, then define the corresponding SIZEOF macros below to return the total length of the conduit-specific object, including the prefix portion which must be the matching GASNETI_[OBJECT]_COMMON fields. Similarly, *_HOOK macros should be defined as callbacks to perform conduit-specific initialization and finalization tasks, if any. If a given SIZEOF macro is defined, but the corresponding INIT_HOOK is not, then space beyond the COMMON fields will be zero-initialized. In all cases, GASNETC_[OBJECT]_EXTRA_DECLS provides the place to provide necessary declarations (since this file is included very early). */ //#define GASNETC_CLIENT_EXTRA_DECLS (###) //#define GASNETC_CLIENT_INIT_HOOK(i_client) (###) //#define GASNETC_CLIENT_FINI_HOOK(i_client) (###) //#define GASNETC_SIZEOF_CLIENT_T() (###) //#define GASNETC_SEGMENT_EXTRA_DECLS (###) //#define GASNETC_SEGMENT_INIT_HOOK(i_segment) (###) //#define GASNETC_SEGMENT_FINI_HOOK(i_segment) (###) //#define GASNETC_SIZEOF_SEGMENT_T() (###) //#define GASNETC_TM_EXTRA_DECLS (###) //#define GASNETC_TM_INIT_HOOK(i_tm) (###) //#define GASNETC_TM_FINI_HOOK(i_tm) (###) //#define GASNETC_SIZEOF_TM_T() (###) #define GASNETC_EP_EXTRA_DECLS \ extern int gasnetc_ep_init_hook(gasneti_EP_t); \ extern size_t gasnetc_sizeof_ep_t(void); #define GASNETC_EP_INIT_HOOK(i_ep) \ gasnetc_ep_init_hook(i_ep) //#define GASNETC_EP_FINI_HOOK(i_ep) (###) #define GASNETC_SIZEOF_EP_T() \ gasnetc_sizeof_ep_t() // Uncomment the following defines if conduit provides the corresponding hook. // See gasnet_internal.h for prototypes and brief descriptions. #define GASNETC_SEGMENT_ATTACH_HOOK 1 //#define GASNETC_SEGMENT_CREATE_HOOK 1 #define GASNETC_SEGMENT_DESTROY_HOOK 1 #define GASNETC_EP_BINDSEGMENT_HOOK 1 #define GASNETC_EP_PUBLISHBOUNDSEGMENT_HOOK 1 // Uncomment the following defines if conduit provides the corresponding hook. // See other/kinds/gasnet_kinds_internal.h for prototypes and brief descriptions. #define GASNETC_MK_CREATE_HOOK GASNET_HAVE_MK_CLASS_MULTIPLE //#define GASNETC_MK_DESTROY_HOOK 1 // If conduit supports GASNET_MAXEPS!=1, set default and (optional) max values here. // Leaving GASNETC_MAXEPS_DFLT unset will result in GASNET_MAXEPS=1, independent // of all other settings (appropriate for conduits without multi-ep support). // If set, GASNETC_MAXEPS_MAX it is used to limit a user's --with-maxeps (and a // global default limit is used otherwise). #define GASNETC_MAXEPS_DFLT 33 // Initial (limited) multi-EP support //#define GASNETC_MAXEPS_MAX ### // leave unset for default /* this can be used to add conduit-specific statistical collection values (see gasnet_trace.h) */ #define GASNETC_CONDUIT_STATS(CNT,VAL,TIME) \ CNT(C, ALLOC_HEADER, headers) \ CNT(C, FREE_HEADER, headers) \ VAL(C, ALLOC_REQ_BUFF, buffers) \ VAL(C, ALLOC_REP_BUFF, buffers) \ VAL(C, CQ_READ_TX, events) \ VAL(C, CQ_READ_REQTX, events) \ VAL(C, CQ_READ_REPTX, events) \ VAL(C, CQ_READ_REP, events) \ VAL(C, CQ_READ_REQ, events) \ CNT(C, RECVMSG_REQ, cnt) \ CNT(C, RECVMSG_REP, cnt) \ CNT(C, RECVMSG_REQ_EAGAIN, cnt) \ CNT(C, RECVMSG_REP_EAGAIN, cnt) \ CNT(C, RECVMSG_REQ_REPOST, cnt) \ CNT(C, RECVMSG_REP_REPOST, cnt) \ CNT(C, NB_PUT_INJECT, cnt) \ CNT(C, NB_PUT_BOUNCE, cnt) \ CNT(C, NB_PUT_BLOCK, cnt) #endif gasnet-2025.8.0/ofi-conduit/gasnet_extended.c0000664000175000017500000002627415142313673021162 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/gasnet_extended.c $ * Description: GASNet Extended API over libfabric (OFI) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #include // for refbarrier.c #include #include #include /* ------------------------------------------------------------------------------------ */ /* Extended API Common Code ======================== Factored bits of extended API code common to most conduits, overridable when necessary */ #include "gasnet_extended_common.c" /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* called at startup to check configuration sanity */ static void gasnete_check_config(void) { gasneti_check_config_postattach(); gasnete_check_config_amref(); gasneti_static_assert(sizeof(gasnete_eop_t) >= sizeof(void*)); } extern void gasnete_init(void) { static int firstcall = 1; GASNETI_TRACE_PRINTF(C,("gasnete_init()")); gasneti_assert(firstcall); /* make sure we haven't been called before */ firstcall = 0; gasnete_check_config(); /* check for sanity */ #if GASNETC_OFI_REFERENCE_EXTENDED if (! gasneti_mynode) { gasneti_console_message("WARNING", "This build of GASNet-EX ofi-conduit has been configured to " "use the unsupported legacy implementation of RMA operations."); } #endif gasneti_assert_uint(gasneti_nodes ,>=, 1); gasneti_assert_uint(gasneti_mynode ,<, gasneti_nodes); { gasneti_threaddata_t *threaddata = NULL; #if GASNETI_MAX_THREADS > 1 /* register first thread (optimization) */ threaddata = _gasneti_mythread_slow(); #else /* register only thread (required) */ threaddata = gasnete_new_threaddata(); #endif #if !GASNETI_DISABLE_REFERENCE_EOP /* cause the first pool of eops to be allocated (optimization) */ GASNET_POST_THREADINFO(threaddata); gasnete_eop_t *eop = gasnete_eop_new(threaddata); GASNETE_EOP_MARKDONE(eop); gasnete_eop_free(eop GASNETI_THREAD_PASS); #endif } /* Initialize barrier resources */ gasnete_barrier_init(); /* Initialize team/collectives */ gasnete_coll_init_subsystem(); /* Initialize VIS subsystem */ gasnete_vis_init(); } /* ------------------------------------------------------------------------------------ */ /* Get/Put: ======== */ /* Use some or all of the reference implementation of get/put in terms of AMs * Configuration appears in gasnet_extended_fwd.h */ #include "gasnet_extended_amref.c" /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (explicit event) ========================================================== */ /* ------------------------------------------------------------------------------------ */ #if !GASNETC_OFI_REFERENCE_EXTENDED /* Conduits not using the gasnete_amref_ versions should implement at least the following: gasnete_get_nb gasnete_put_nb */ extern gex_Event_t gasnete_get_nb( gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { if (nbytes > gasnetc_max_rma_size) { // Use get_nbi within an access region when too large for a single xfer. gasnete_begin_nbi_accessregion(0, 1 GASNETI_THREAD_PASS); gasneti_assert_zeroret( gasnete_get_nbi(tm, dest, rank, src, nbytes, flags GASNETI_THREAD_PASS) ); return gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); } gasnete_eop_t *op = gasnete_eop_new(GASNETI_MYTHREAD); op->ofi.type = OFI_TYPE_EGET; if (gasnetc_rdma_get(dest, tm, rank, src, nbytes, &op->ofi, flags GASNETI_THREAD_PASS)) { gasneti_assert(flags & GEX_FLAG_IMMEDIATE); GASNETE_EOP_MARKDONE(op); gasnete_eop_free(op GASNETI_THREAD_PASS); return GEX_EVENT_NO_OP; } return (gex_Event_t)op; } // TODO-EX: Improved LC support. // + NOW will sometimes need to block for RC // + explicit handle might use FI_INJECT for synchronous LC of small nbytes extern gex_Event_t gasnete_put_nb( gex_TM_t tm, gex_Rank_t rank, void *dest, void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG) { if (nbytes > gasnetc_max_rma_size) { // Use put_nbi within an access region when too large for a single xfer. const int alc = gasneti_leaf_is_pointer(lc_opt); gasnete_begin_nbi_accessregion(0, 1 GASNETI_THREAD_PASS); gasneti_assert_zeroret( gasnete_put_nbi(tm, rank, dest, src, nbytes, alc ? GEX_EVENT_GROUP : lc_opt, flags GASNETI_THREAD_PASS) ); gex_Event_t ev = gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); if (alc) *lc_opt = gex_Event_QueryLeaf(ev, GEX_EC_LC); return ev; } gasnete_eop_t *op = gasnete_eop_new(GASNETI_MYTHREAD); op->ofi.type = OFI_TYPE_EPUT; #if GASNET_DEBUG if (lc_opt == GEX_EVENT_GROUP) { gasneti_fatalerror("Invalid lc_opt argument to gex_RMA_PutNB"); } #endif if (lc_opt == GEX_EVENT_NOW) { // Try to submit for synchronous LC. // If we can't, then we must block for RC. gex_Event_t ev = gasnetc_rdma_put_non_bulk(tm, rank, dest, src, nbytes, &op->ofi, flags GASNETI_THREAD_PASS); if (ev) { GASNETE_EOP_MARKDONE(op); gasnete_eop_free(op GASNETI_THREAD_PASS); if (ev == GEX_EVENT_NO_OP) return ev; op = NULL; // aka GASNET_EVENT_INVALID gasnete_wait(ev GASNETI_THREAD_PASS); } } else { int alc = (lc_opt != GEX_EVENT_DEFER); if (alc) { gasneti_assert(gasneti_leaf_is_pointer(lc_opt)); // TODO: should attempt inject-based synchronous LC, unless GEX_FLAG_LC_COPY_NO GASNETE_EOP_LC_START(op); *lc_opt = gasneti_op_event(op, gasnete_eop_event_alc); } if (gasnetc_rdma_put(tm, rank, dest, src, nbytes, &op->ofi, alc, flags GASNETI_THREAD_PASS)) { gasneti_assert(flags & GEX_FLAG_IMMEDIATE); if (alc) GASNETE_EOP_LC_FINISH(op); GASNETE_EOP_MARKDONE(op); gasnete_eop_free(op GASNETI_THREAD_PASS); return GEX_EVENT_NO_OP; } } return (gex_Event_t)op; } #endif // !GASNETC_OFI_REFERENCE_EXTENDED /* ------------------------------------------------------------------------------------ */ /* Non-blocking memory-to-memory transfers (implicit event) ========================================================== */ /* ------------------------------------------------------------------------------------ */ #if !GASNETC_OFI_REFERENCE_EXTENDED /* Conduits not using the gasnete_amref_ versions should implement at least the following: gasnete_get_nbi gasnete_put_nbi */ extern int gasnete_get_nbi( gex_TM_t tm, void *dest, gex_Rank_t rank, void *src, size_t nbytes, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t *op = mythread->current_iop; gasneti_assert(op->get_ofi.type == OFI_TYPE_IGET); op->initiated_get_cnt++; if (gasnetc_rdma_get(dest, tm, rank, src, nbytes, &op->get_ofi, flags GASNETI_THREAD_PASS)) { gasneti_assert(flags & GEX_FLAG_IMMEDIATE); GASNETE_IOP_CNT_FINISH(op, get, 1, GASNETI_ATOMIC_NONE); // NONE only because no xfer return 1; } return GASNET_OK; } // TODO-EX: Improved LC support. // + NOW will sometimes need to block for RC // + GROUP might use FI_INJECT for synchronous LC of small nbytes extern int gasnete_put_nbi( gex_TM_t tm, gex_Rank_t rank, void *dest, void *src, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG) { gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t *op = mythread->current_iop; gasneti_assert(op->put_ofi.type == OFI_TYPE_IPUT); op->initiated_put_cnt++; #if GASNET_DEBUG if (gasneti_leaf_is_pointer(lc_opt)) { gasneti_fatalerror("Invalid lc_opt argument to gex_RMA_PutNBI"); } #endif if (lc_opt == GEX_EVENT_NOW) { // Try to submit for synchronous LC. // If we can't, then we must block for RC. gex_Event_t ev = gasnetc_rdma_put_non_bulk(tm, rank, dest, src, nbytes, &op->put_ofi, flags GASNETI_THREAD_PASS); if (ev) { GASNETE_IOP_CNT_FINISH(op, put, 1, GASNETI_ATOMIC_NONE); if (ev == GEX_EVENT_NO_OP) return 1; gasnete_wait(ev GASNETI_THREAD_PASS); } } else { int alc = (lc_opt != GEX_EVENT_DEFER); if (alc) { gasneti_assert(lc_opt == GEX_EVENT_GROUP); // TODO: should attempt inject-based synchronous LC, unless GEX_FLAG_LC_COPY_NO GASNETE_IOP_LC_START(op); } if (gasnetc_rdma_put(tm, rank, dest, src, nbytes, &op->put_ofi, alc, flags GASNETI_THREAD_PASS)) { gasneti_assert(flags & GEX_FLAG_IMMEDIATE); if (alc) GASNETE_IOP_LC_FINISH(op); GASNETE_IOP_CNT_FINISH(op, put, 1, GASNETI_ATOMIC_NONE); return 1; } } return GASNET_OK; } #endif // !GASNETC_OFI_REFERENCE_EXTENDED /* ------------------------------------------------------------------------------------ */ /* Barriers: ========= */ /* use reference implementation of barrier */ #define GASNETI_GASNET_EXTENDED_REFBARRIER_C 1 #include "gasnet_extended_refbarrier.c" #undef GASNETI_GASNET_EXTENDED_REFBARRIER_C /* ------------------------------------------------------------------------------------ */ /* Vector, Indexed & Strided: ========================= */ /* use reference implementation of scatter/gather and strided */ #include "gasnet_refvis.h" /* ------------------------------------------------------------------------------------ */ /* Collectives: ============ */ /* use reference implementation of collectives */ #include "gasnet_refcoll.h" /* ------------------------------------------------------------------------------------ */ /* Remote Atomics: ============== */ /* use reference implementation of remote atomics */ #include "gasnet_refratomic.h" /* ------------------------------------------------------------------------------------ */ /* Handlers: ========= */ static gex_AM_Entry_t const gasnete_handlers[] = { #ifdef GASNETE_REFBARRIER_HANDLERS GASNETE_REFBARRIER_HANDLERS(), #endif #ifdef GASNETE_REFVIS_HANDLERS GASNETE_REFVIS_HANDLERS() #endif #ifdef GASNETE_REFCOLL_HANDLERS GASNETE_REFCOLL_HANDLERS() #endif #ifdef GASNETE_AMREF_HANDLERS GASNETE_AMREF_HANDLERS() #endif #ifdef GASNETE_AMRATOMIC_HANDLERS GASNETE_AMRATOMIC_HANDLERS() #endif /* ptr-width independent handlers */ /* ptr-width dependent handlers */ GASNETI_HANDLER_EOT }; extern gex_AM_Entry_t const *gasnete_get_handlertable(void) { return gasnete_handlers; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/ofi-conduit/gasnet_core.h0000664000175000017500000001305415142313673020307 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/gasnet_core.h $ * Description: GASNet header for libfabric (OFI) conduit core * Copyright 2002, Dan Bonachea * Copyright 2015, Intel Corporation * Portions copyright 2018-2020, The Regents of the University of California. * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_H #define _GASNET_CORE_H #include /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ extern void gasnetc_exit(int _exitcode) GASNETI_NORETURN; GASNETI_NORETURNP(gasnetc_exit) #define gasnet_exit gasnetc_exit /* Some conduits permit gasnet_init(NULL,NULL). Define to 1 if this conduit supports this extension, or to 0 otherwise. */ #if !HAVE_MPI_SPAWNER || (GASNETI_MPI_VERSION >= 2) #define GASNET_NULL_ARGV_OK 1 #else #define GASNET_NULL_ARGV_OK 0 #endif /* ------------------------------------------------------------------------------------ */ extern int gasnetc_Client_Init( gex_Client_t *_client_p, gex_EP_t *_ep_p, gex_TM_t *_tm_p, const char *_clientName, int *_argc, char ***_argv, gex_Flags_t _flags); // gasnetex.h handles name-shifting of gex_Client_Init() /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ typedef struct { gasneti_mutex_t lock; #if GASNETI_STATS_OR_TRACE gasneti_tick_t acquiretime; #endif } gex_HSL_t; #if GASNETI_STATS_OR_TRACE #define GASNETC_LOCK_STAT_INIT ,0 #else #define GASNETC_LOCK_STAT_INIT #endif #define GEX_HSL_INITIALIZER { \ GASNETI_MUTEX_INITIALIZER \ GASNETC_LOCK_STAT_INIT \ } /* decide whether we have "real" HSL's */ #if GASNETI_THREADS || /* need for safety */ \ GASNET_DEBUG || GASNETI_STATS_OR_TRACE /* or debug/tracing */ #ifdef GASNETC_NULL_HSL #error bad defn of GASNETC_NULL_HSL #endif #else #define GASNETC_NULL_HSL 1 #endif #if GASNETC_NULL_HSL /* HSL's unnecessary - compile away to nothing */ #define gex_HSL_Init(hsl) #define gex_HSL_Destroy(hsl) #define gex_HSL_Lock(hsl) #define gex_HSL_Unlock(hsl) #define gex_HSL_Trylock(hsl) GASNET_OK #else extern void gasnetc_hsl_init (gex_HSL_t *_hsl); extern void gasnetc_hsl_destroy(gex_HSL_t *_hsl); extern void gasnetc_hsl_lock (gex_HSL_t *_hsl); extern void gasnetc_hsl_unlock (gex_HSL_t *_hsl); extern int gasnetc_hsl_trylock(gex_HSL_t *_hsl) GASNETI_WARN_UNUSED_RESULT; #define gex_HSL_Init gasnetc_hsl_init #define gex_HSL_Destroy gasnetc_hsl_destroy #define gex_HSL_Lock gasnetc_hsl_lock #define gex_HSL_Unlock gasnetc_hsl_unlock #define gex_HSL_Trylock gasnetc_hsl_trylock #endif /* ------------------------------------------------------------------------------------ */ /* Active Message Size Limits ========================== */ extern size_t gasnetc_ofi_max_medium; extern size_t gasnetc_ofi_max_long; #define gex_AM_MaxArgs() ((unsigned int)16) /* Define least-upper-bound (worst case) limits on payload sizes */ #define gex_AM_LUBRequestMedium() ((size_t)gasnetc_ofi_max_medium) // redundant cast prevents assignment #define gex_AM_LUBReplyMedium() ((size_t)gasnetc_ofi_max_medium) // redundant cast prevents assignment #define gex_AM_LUBRequestLong() ((size_t)gasnetc_ofi_max_long) // redundant cast prevents assignment #define gex_AM_LUBReplyLong() ((size_t)gasnetc_ofi_max_long) // redundant cast prevents assignment /* Provide tigher bounds based on parameters */ // TODO-EX: Medium sizes can be further improved upon for PSHM case #define gasnetc_AM_MaxRequestMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS5(tm,rank,lc_opt,flags,nargs),gex_AM_LUBRequestMedium()) #define gasnetc_AM_MaxReplyMedium(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS5(tm,rank,lc_opt,flags,nargs),gex_AM_LUBReplyMedium()) #define gasnetc_Token_MaxReplyMedium(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(token,lc_opt,flags,nargs),gex_AM_LUBReplyMedium()) #define gasnetc_AM_MaxRequestLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBRequestLong())) #define gasnetc_AM_MaxReplyLong(tm,rank,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS4(tm,rank,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBReplyLong())) #define gasnetc_Token_MaxReplyLong(token,lc_opt,flags,nargs) \ (GASNETI_UNUSED_ARGS3(token,lc_opt,nargs), \ ((flags) & GEX_FLAG_AM_PREPARE_LEAST_ALLOC \ ? GASNETC_REF_NPAM_MAX_ALLOC \ : gex_AM_LUBReplyLong())) /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #define GASNET_BLOCKUNTIL(cond) gasneti_polluntil(cond) /* ------------------------------------------------------------------------------------ */ #endif #include gasnet-2025.8.0/ofi-conduit/gasnet_extended_fwd.h0000664000175000017500000000710315142313673022015 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/gasnet_extended_fwd.h $ * Description: GASNet Extended API Header for OFI conduit (forward decls) * Copyright 2002, Dan Bonachea * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_EXTENDED_FWD_H #define _GASNET_EXTENDED_FWD_H #if GASNETC_OFI_REFERENCE_EXTENDED #define GASNET_EXTENDED_VERSION GASNET_RELEASE_VERSION_MAJOR.GASNET_RELEASE_VERSION_MINOR #define GASNET_EXTENDED_NAME REFERENCE #else #define GASNET_EXTENDED_VERSION GASNET_CORE_VERSION #define GASNET_EXTENDED_NAME OFI #endif #define GASNET_EXTENDED_VERSION_STR _STRINGIFY(GASNET_EXTENDED_VERSION) #define GASNET_EXTENDED_NAME_STR _STRINGIFY(GASNET_EXTENDED_NAME) #define GASNETI_EOP_IS_HANDLE 1 /* if conduit-internal threads may call the Extended API and/or they may run progress functions, then define GASNETE_CONDUIT_THREADS_USING_TD to the maximum COUNT of such threads to allocate space for their threaddata */ #if 0 #define GASNETE_CONDUIT_THREADS_USING_TD ### #endif /* this can be used to add statistical collection values specific to the extended API implementation (see gasnet_help.h) */ #define GASNETE_CONDUIT_STATS(CNT,VAL,TIME) \ GASNETI_VIS_STATS(CNT,VAL,TIME) \ GASNETI_COLL_STATS(CNT,VAL,TIME) \ GASNETI_RATOMIC_STATS(CNT,VAL,TIME) \ CNT(C, DYNAMIC_THREADLOOKUP, cnt) #define GASNETE_AUXSEG_DECLS \ extern gasneti_auxseg_request_t gasnete_barr_auxseg_alloc(gasnet_seginfo_t *auxseg_info); #define GASNETE_AUXSEG_FNS() gasnete_barr_auxseg_alloc, /* * When implementing a conduit-specific implementation of the Extended API, one * can #define the following to 1 to change certain behaviors in gasnet_extended.h. * Alternatively, one can #define GASNETE_HAVE_EXTENDED_HELP_EXTRA_H and defined * these in a conduit-specific gasnet_extended_help_extra.h. * * GASNETI_DIRECT_BLOCKING_GET * unset: gasnete_get() via gasnete_wait(gasnete_get_nb()) * set: conduit provides it own gasnete_get() * * GASNETI_DIRECT_BLOCKING_PUT * unset: gasnete_put() via gasnete_wait(gasnete_put_nb()) * set: conduit provides it own gasnete_put() * * GASNETI_DIRECT_PUT_VAL * unset: gasnete_put_val() via gasnete_put() * set: conduit provides it own gasnete_put_val() * * GASNETI_DIRECT_PUT_NB_VAL * unset: extern gasnete_put_nb_val() in gasnet_extended.c (or a macro) * set: conduit provides own gasnete_put_nb_val() as an inline * * GASNETI_DIRECT_PUT_NBI_VAL * unset: gasnete_put_nbi_val() via gasnete_put_nbi() * set: conduit provides own gasnete_put_nbi_val() * * GASNETI_DIRECT_GET_VAL * unset: extern gasnete_get_val() in gasnet_extended.c (or a macro) * set: conduit provides own gasnete_get_val() as an inline */ /* Configure use of AM-based implementation of get/put */ /* NOTE: Barriers, Collectives, VIS may use GASNETE_USING_REF_* in algorithm selection */ #if GASNETC_OFI_REFERENCE_EXTENDED // Legacy/deprecated option that implement all RMA directly via amref #define GASNETE_USING_REF_EXTENDED_GET 1 #define GASNETE_USING_REF_EXTENDED_PUT 1 #define gasnete_amref_get_nb gasnete_get_nb #define gasnete_amref_put_nb gasnete_put_nb #define gasnete_amref_get_nbi gasnete_get_nbi #define gasnete_amref_put_nbi gasnete_put_nbi #else #define GASNETE_USING_REF_EXTENDED_GET 0 #define GASNETE_USING_REF_EXTENDED_PUT 0 #endif #endif gasnet-2025.8.0/ofi-conduit/gasnet_ofi.c0000664000175000017500000040172515142313673020135 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/gasnet_ofi.c $ * Description: GASNet libfabric (OFI) conduit Implementation * Copyright 2002, Dan Bonachea * Copyright 2015-2017, Intel Corporation * Portions copyright 2018-2020, The Regents of the University of California. * Terms of use are as specified in license.txt */ #define GASNETI_NEED_GASNET_MK_H 1 #include #include #include #include #include #include #include #include #include #include #include #if HAVE_SYS_UIO_H #include /* For struct iovec */ #endif GASNETI_IDENT(gasnetc_IdentString_Providers, "$GASNetOfiProvidersSupported: " GASNETC_OFI_PROVIDER_LIST " $"); GASNETI_IDENT(gasnetc_IdentString_OfiUseThreadDomain, "$GASNetOfiUseThreadDomain: "_STRINGIFY(GASNETC_OFI_USE_THREAD_DOMAIN)" $"); GASNETI_IDENT(gasnetc_IdentString_OfiUseMultiCQ, "$GASNetOfiUseMultiCQ: "_STRINGIFY(GASNETC_OFI_USE_MULTI_CQ)" $"); GASNETI_IDENT(gasnetc_IdentString_OfiRetryRecvmsg, "$GASNetOfiRetryRecvmsg: "_STRINGIFY(GASNETC_OFI_RETRY_RECVMSG)" $"); struct fid_fabric* gasnetc_ofi_fabricfd; struct fid_domain* gasnetc_ofi_domainfd; struct fid_cq* gasnetc_ofi_tx_cqfd; // CQ, ideally for both AM and RDMA tx ops #if GASNETC_OFI_USE_MULTI_CQ struct fid_cq* gasnetc_ofi_reqtx_cqfd = NULL; // CQ for AM Request tx ops, IFF cannot share struct fid_cq* gasnetc_ofi_reptx_cqfd = NULL; // CQ for AM Request tx ops, IFF cannot share #endif struct fid_ep* gasnetc_ofi_rdma_epfd; struct fid_ep* gasnetc_ofi_request_epfd; struct fid_ep* gasnetc_ofi_reply_epfd; struct fid_cq* gasnetc_ofi_request_cqfd; struct fid_cq* gasnetc_ofi_reply_cqfd; #if GASNET_SEGMENT_EVERYTHING struct fid_mr* gasnetc_segment_mrfd = NULL; #endif struct fid_mr* gasnetc_auxseg_mrfd = NULL; size_t gasnetc_ofi_bbuf_threshold; #ifdef FI_MR_ENDPOINT static int gasnetc_fi_mr_endpoint = 0; #endif #if GASNET_HAVE_MK_CLASS_MULTIPLE static int gasnetc_fi_hmem = 0; #endif #define GASNETC_PROHIBIT_MODE_BIT(info,bit,scope) do { \ if (info->mode & bit) { \ gasneti_fatalerror("Provider '%s' has set unsupported mode bit " #bit " for %s", \ gasnetc_ofi_provider, scope); \ } \ } while (0) size_t gasnetc_ofi_max_medium = GASNETC_OFI_MAX_MEDIUM_DFLT; size_t gasnetc_ofi_max_long; // Maximum size to use for RMA size_t gasnetc_max_rma_size; typedef struct gasnetc_ofi_recv_metadata { struct iovec iov; struct fi_msg am_buff_msg; gasnetc_ofi_recv_ctxt_t am_buff_ctxt; } gasnetc_ofi_recv_metadata_t; static short use_av_map = 0; #ifdef GASNETC_OFI_USE_AV_MAP_CONFIGURE #define GASNETC_OFI_USE_AV_MAP_STATIC 1 #define GASNETC_OFI_USE_AV_MAP (GASNETC_OFI_USE_AV_MAP_CONFIGURE[0] == '1') GASNETI_IDENT(gasnetc_IdentString_OfiUseAVMAP, "$GASNetOfiUseAVMAP: " GASNETC_OFI_USE_AV_MAP_CONFIGURE " $"); #else // cast prevents erroneous use in preprocessor directives #define GASNETC_OFI_USE_AV_MAP ((short)use_av_map) GASNETI_IDENT(gasnetc_IdentString_OfiUseAVMAP, "$GASNetOfiUseAVMAP: dynamic $"); #endif // Must match order of fi_getname() calls in ofi_exchange_addresses(), // where this is enforced via static assertions. enum { GASNETC_FADDR_IDX_REQ = 0, GASNETC_FADDR_IDX_REP, GASNETC_FADDR_IDX_RDMA, NUM_OFI_ENDPOINTS }; // One address vector per endpoint static struct fid_av* gasnetc_ofi_avfd[NUM_OFI_ENDPOINTS]; // Entries non-NULL only for FI_AV_MAP static fi_addr_t *gasnetc_addr_map[NUM_OFI_ENDPOINTS] = { NULL, }; // TODO: multi-ep with independent resources will require rewriting this GASNETI_INLINE(gasnetc_fabric_addr_inner) GASNETI_PURE fi_addr_t gasnetc_fabric_addr_inner(int idx, gex_Rank_t jobrank) { if (GASNETC_OFI_USE_AV_MAP) { return gasnetc_addr_map[idx][jobrank]; } else { return (fi_addr_t)jobrank; } } GASNETI_PUREP(gasnetc_fabric_addr_inner) #define gasnetc_fabric_addr(type, jobrank) \ gasnetc_fabric_addr_inner(GASNETC_FADDR_IDX_##type, jobrank) static short has_mr_virt_addr = 0; #ifdef GASNETC_OFI_HAS_MR_VIRT_ADDR_CONFIGURE #define GASNETC_OFI_HAS_MR_VIRT_ADDR_STATIC 1 #define GASNETC_OFI_HAS_MR_VIRT_ADDR (GASNETC_OFI_HAS_MR_VIRT_ADDR_CONFIGURE[0] == '1') GASNETI_IDENT(gasnetc_IdentString_OfiMRVirtAddr, "$GASNetOfiMRVirtAddr: " GASNETC_OFI_HAS_MR_VIRT_ADDR_CONFIGURE " $"); #else // cast prevents erroneous use in preprocessor directives #define GASNETC_OFI_HAS_MR_VIRT_ADDR ((short)has_mr_virt_addr) GASNETI_IDENT(gasnetc_IdentString_OfiMRVirtAddr, "$GASNetOfiMRVirtAddr: dynamic $"); #endif static short has_mr_prov_key = 0; #ifdef GASNETC_OFI_HAS_MR_PROV_KEY_CONFIGURE #define GASNETC_OFI_HAS_MR_PROV_KEY_STATIC 1 #define GASNETC_OFI_HAS_MR_PROV_KEY (GASNETC_OFI_HAS_MR_PROV_KEY_CONFIGURE[0] == '1') GASNETI_IDENT(gasnetc_IdentString_OfiMRProvKey, "$GASNetOfiMRProvKey: " GASNETC_OFI_HAS_MR_PROV_KEY_CONFIGURE " $"); #else // cast prevents erroneous use in preprocessor directives #define GASNETC_OFI_HAS_MR_PROV_KEY ((short)has_mr_prov_key) GASNETI_IDENT(gasnetc_IdentString_OfiMRProvKey, "$GASNetOfiMRProvKey: dynamic $"); #endif // Table of remote registration keys, used only when GASNETC_OFI_HAS_MR_PROV_KEY, // and otherwise NULL. // The leading dimension is EP index, with indices in [-1, GASNET_MAXEPS) to // place the aux segment keys as index -1, and the second dimension is jobrank. // The leading dimension is allocated at startup, and the rest is allocated // lazily when the first entry for a given EP index is received. // TODO: scalable storage static uint64_t** gasnetc_remote_key_tbl; static size_t tx_cq_size = 0; static size_t rx_cq_size = 0; // Determine if (jobrank,addr) is in the aux segment registration GASNETI_INLINE(gasnetc_in_auxseg) GASNETI_PURE int gasnetc_in_auxseg(gex_Rank_t jobrank, void *addr) { #if GASNET_SEGMENT_FAST || GASNET_SEGMENT_LARGE // Reminder that with unsigned types, a negative offset is a very large positive value uintptr_t offset = (uintptr_t)addr - (uintptr_t)gasneti_seginfo_aux[jobrank].addr; return offset < gasneti_seginfo_aux[jobrank].size; #else // For SEGMENT_EVERYTHING there is only ever a single memory registration. // So the addrres is NEVER "in the aux segment registration". return 0; #endif } GASNETI_PUREP(gasnetc_in_auxseg) // Lookup or compute correct key for RDMA // NOTE: rem_epidx has type int (not gex_EP_Index_t) to allow -1 to name the aux seg GASNETI_INLINE(gasnetc_remote_key) GASNETI_PURE uint64_t gasnetc_remote_key(gex_Rank_t jobrank, int rem_epidx) { #if GASNET_SEGMENT_FAST || GASNET_SEGMENT_LARGE gasneti_assert_int(rem_epidx ,>=, -1); gasneti_assert_int(rem_epidx ,<, GASNET_MAXEPS); if (GASNETC_OFI_HAS_MR_PROV_KEY) { gasneti_assert(gasnetc_remote_key_tbl[rem_epidx]); return gasnetc_remote_key_tbl[rem_epidx][jobrank]; } else { return GASNETC_EPIDX_TO_KEY(rem_epidx); } #else // For SEGMENT_EVERYTHING there is a single host memory registration gasneti_assert_int(rem_epidx ,>=, 0); gasneti_assert_int(rem_epidx ,<, GASNET_MAXEPS); return GASNETC_EPIDX_TO_KEY(0); #endif } GASNETI_PUREP(gasnetc_remote_key) // Lookup correct "address" (which may be an offset) for RDMA // NOTE: rem_epidx has type int (not gex_EP_Index_t) to allow -1 to name the aux seg GASNETI_INLINE(gasnetc_remote_addr) GASNETI_PURE uintptr_t gasnetc_remote_addr(gex_Rank_t jobrank, void *addr, int rem_epidx) { #if GASNET_SEGMENT_FAST || GASNET_SEGMENT_LARGE gasneti_assert_int(rem_epidx ,>=, -1); gasneti_assert_int(rem_epidx ,<, GASNET_MAXEPS); if (GASNETC_OFI_HAS_MR_VIRT_ADDR) { return (uintptr_t)addr; } else { // uses an offset rather than virtual address int in_auxseg = (rem_epidx < 0); gasnet_seginfo_t *si = in_auxseg ? gasneti_seginfo_aux : gasneti_seginfo_tbl[rem_epidx]; gasneti_assert(si); return (uintptr_t)addr - (uintptr_t)si[jobrank].addr; } #else gasneti_assert_int(rem_epidx ,>=, 0); gasneti_assert_int(rem_epidx ,<, GASNET_MAXEPS); // For EVERYTHING the base address (if any) is zero return (uintptr_t)addr; #endif } GASNETI_PUREP(gasnetc_remote_addr) // Statements which launch a fi_write or fi_read, setting "ret" #define OFI_RMA(rw, c_ep, loc_addr, nbytes, jobrank, rem_epidx, rem_addr, ctxt_ptr, alc) \ do { \ fi_addr_t _peer = gasnetc_fabric_addr(RDMA, jobrank); \ uintptr_t _addr = gasnetc_remote_addr(jobrank, rem_addr, rem_epidx); \ uint64_t _key = gasnetc_remote_key(jobrank, rem_epidx); \ void *_op_ctxt = gasnetc_rdma_ctxt_to_op_ctxt(ctxt_ptr, alc|GASNETC_CTXT_IS_RMA); \ void *_desc = gasneti_i_segment_kind_is_host(c_ep->_segment) ? NULL: fi_mr_desc(c_ep->mrfd); \ struct fid_ep *_ofi_ep = gasnetc_ofi_rdma_epfd; /* TODO: ep isolation */ \ ret = fi_##rw(_ofi_ep, loc_addr, nbytes, _desc, _peer, _addr, _key, _op_ctxt); \ } while(0) #define OFI_WRITE(c_ep, src_addr, nbytes, jobrank, rem_epidx, dest_addr, ctxt_ptr, alc) \ OFI_RMA(write, c_ep, src_addr, nbytes, jobrank, rem_epidx, dest_addr, ctxt_ptr, alc) #define OFI_READ(c_ep, dest_addr, nbytes, jobrank, rem_epidx, src_addr, ctxt_ptr, alc) \ OFI_RMA(read, c_ep, dest_addr, nbytes, jobrank, rem_epidx, src_addr, ctxt_ptr, alc) /* Poll periodically on RMA injection to ensure efficient progress. * This is a data race, but it is safe as polling here is unnecessary, it * simply improves performance in case of floods of RMA requests*/ static int rdma_poll_frequency = 0; static int rdma_periodic_poll_threshold; /* Set via environment variable in init() */ #define PERIODIC_RMA_POLL() do{\ if_pf(rdma_poll_frequency++ >= rdma_periodic_poll_threshold){\ rdma_poll_frequency=0;\ gasnetc_ofi_tx_poll();\ }} while(0) /* In this case, inject means "inject into the network". It is not specific * to the fi_inject/fi_inject_write functions. fxn must assign a return value * to an int named "ret" in the scope in which it is called.*/ #define OFI_INJECT_RETRY(lock, fxn, poll_type)\ do {\ GASNETC_OFI_LOCK_EXPR(lock, fxn);\ GASNETI_SPIN_WHILE(ret == -FI_EAGAIN, {\ GASNETC_OFI_POLL_SELECTIVE(poll_type);\ GASNETC_OFI_LOCK_EXPR(lock, fxn);\ });\ }while(0) // As above, except that if 'imm' is non-zero, then will jump to 'label' // if first attempt returns -FI_EAGAIN // TODO: support poll if GASNETC_IMMEDIATE_AMPOLLS? #define OFI_INJECT_RETRY_IMM(lock, fxn, poll_type, imm, label)\ do {\ GASNETC_OFI_LOCK_EXPR(lock, fxn);\ if (ret == -FI_EAGAIN) {\ if (imm) goto label; \ GASNETI_SPIN_DOWHILE(ret == -FI_EAGAIN, {\ GASNETC_OFI_POLL_SELECTIVE(poll_type);\ GASNETC_OFI_LOCK_EXPR(lock, fxn);\ });\ } \ }while(0) static gasneti_lifo_head_t ofi_am_request_pool = GASNETI_LIFO_INITIALIZER; static gasneti_lifo_head_t ofi_am_reply_pool = GASNETI_LIFO_INITIALIZER; static gasneti_lifo_head_t ofi_bbuf_pool = GASNETI_LIFO_INITIALIZER; static gasneti_lifo_head_t ofi_bbuf_ctxt_pool = GASNETI_LIFO_INITIALIZER; static size_t num_multirecv_buffs; static size_t multirecv_buff_size; static void* receive_region_start = NULL; static size_t receive_region_size = 0; /* Variables for bounce buffering of non-blocking, non-bulk puts. * The gasnetc_ofi_bbuf_threshold variable is defined in gasnet_ofi.h * as it is needed in other files */ static void* bounce_region_start = NULL; static size_t bounce_region_size = 0; static size_t ofi_num_bbufs; static size_t ofi_bbuf_size; #define OFI_MAX_NUM_BOUNCE_BUFFERS 32 static void* am_buffers_region_start = NULL; static size_t am_buffers_region_size = 0; static gasneti_semaphore_t num_unallocated_request_buffers; static gasneti_semaphore_t num_unallocated_reply_buffers; static size_t max_am_request_buffs = 0; static size_t max_am_reply_buffs = 0; static size_t num_init_am_request_buffs = 0; static size_t num_init_am_reply_buffs = 0; static size_t long_rma_threshold = 0; static uint64_t max_buffered_send; static uint64_t max_buffered_write; static uint64_t min_multi_recv; static unsigned long long maybe_multi_recv = FI_MULTI_RECV; static int using_psm_provider = 0; static const char *gasnetc_ofi_device = NULL; static const char *supported_providers = GASNETC_OFI_PROVIDER_LIST; static int gasnetc_high_perf_prov = 0; static char *gasnetc_ofi_provider = NULL; static char *gasnetc_ofi_domain = NULL; static struct fi_info *gasnetc_rma_info; static struct fi_info *gasnetc_msg_info; gasneti_spawnerfn_t const *gasneti_spawner = NULL; static gasnetc_ofi_recv_metadata_t* metadata_array; /* Being able to see if there are pending operations that are not * completing is useful for debugging purposes */ #if GASNET_DEBUG static gasnetc_paratomic_t pending_rdma = gasnetc_paratomic_init(0); static gasnetc_paratomic_t pending_am = gasnetc_paratomic_init(0); #endif static int gasnetc_ofi_inited = 0; // OFI_CONDUIT_VERSION: API version to request in fi_getinfo() // NOTE: we do NOT blindly chase the latest to avoid nasty surprises. // // FI_MR_HMEM and corresponding fields in `struct fi_mr_attr` first // appear in API version 1.9. So, memory kinds needs >= 1.9. // // API version 1.5 is the lowest we support #if GASNET_HAVE_MK_CLASS_MULTIPLE // No need to check MAJOR,MINOR against FI_VERSION(1, 9) since configure has verified version 1.11+. #define OFI_CONDUIT_VERSION FI_VERSION(1, 9) #elif FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION) >= FI_VERSION(1, 5) #define OFI_CONDUIT_VERSION FI_VERSION(1, 5) #else #error "ofi-conduit requires libfabric 1.5 or newer" #endif #if GASNET_PSHM #define gasnetc_AMPSHMPoll(repliesOnly) gasneti_AMPSHMPoll(repliesOnly GASNETI_THREAD_PASS) #else #define gasnetc_AMPSHMPoll(repliesOnly) ((void)0) #endif #define GASNETC_OFI_POLL_EVERYTHING() do { gasnetc_ofi_poll(); gasnetc_AMPSHMPoll(0);} while (0) #define GASNETC_OFI_POLL_SELECTIVE(type) do {\ if (type == OFI_POLL_ALL) {\ gasnetc_ofi_am_recv_poll_cold(1);\ gasnetc_AMPSHMPoll(0);\ }\ else {\ gasnetc_AMPSHMPoll(1);\ }\ gasnetc_ofi_am_recv_poll_cold(0);\ gasnetc_ofi_tx_poll();\ }while(0) #if GASNET_PAR static inline int gasnetc_is_exiting(void) { gasneti_sync_reads(); return gasnetc_exit_in_progress; } #define gasnetc_is_exit_error(e) \ (gasnetc_is_exiting() && ((e).err == FI_SUCCESS || (e).err == FI_ECANCELED || (e).err == EACCES)) #else #define gasnetc_is_exit_error(e) 0 #endif // Conversion between conduit's AM context types and operation context // The "to" operations include type checking that simple casts would not GASNETI_INLINE(gasnetc_send_ctxt_to_op_ctxt) void *gasnetc_send_ctxt_to_op_ctxt(gasnetc_ofi_send_ctxt_t *p) { return &p->ctxt; } GASNETI_INLINE(gasnetc_op_ctxt_to_send_ctxt) gasnetc_ofi_send_ctxt_t *gasnetc_op_ctxt_to_send_ctxt(void *p) { return gasneti_container_of(p, gasnetc_ofi_send_ctxt_t, ctxt); } GASNETI_INLINE(gasnetc_recv_ctxt_to_op_ctxt) void *gasnetc_recv_ctxt_to_op_ctxt(gasnetc_ofi_recv_ctxt_t *p) { return &p->ctxt; } GASNETI_INLINE(gasnetc_op_ctxt_to_recv_ctxt) gasnetc_ofi_recv_ctxt_t *gasnetc_op_ctxt_to_recv_ctxt(void *p) { return gasneti_container_of(p, gasnetc_ofi_recv_ctxt_t, ctxt); } // We reserve low 2 bits to hold per-operation "aux" data for callbacks // Assumes pointers have at least 4-bytes alignment in structs #define GASNETC_CTXT_MASK (~(uintptr_t)3) #define GASNETC_CTXT_IS_ALC ((uintptr_t)1) #define GASNETC_CTXT_IS_RMA ((uintptr_t)2) // Conversion from conduit's RDMA contexts to fi operation context. // This is for use with gasnetc_ofi_{nb,bounce,blocking}_op_ctxt_t, // where we use the callback function as the operation context. // The callbacks perform the reverse using gasneti_container_of(). GASNETI_INLINE(gasnetc_rdma_ctxt_to_op_ctxt_inner) GASNETT_PURE void *gasnetc_rdma_ctxt_to_op_ctxt_inner(void *p, unsigned int aux) { uintptr_t raw = (uintptr_t)p; gasneti_assert(0 == (raw & ~GASNETC_CTXT_MASK)); gasneti_assert(0 == (aux & GASNETC_CTXT_MASK)); return (void *)(raw | aux); } GASNETT_PUREP(gasnetc_rdma_ctxt_to_op_ctxt_inner) #define gasnetc_rdma_ctxt_to_op_ctxt(p,aux) \ gasnetc_rdma_ctxt_to_op_ctxt_inner(&(p)->callback,aux) // Convert fi operation context to rdma callback function and call GASNETI_INLINE(gasnetc_op_ctxt_run_rdma_callback) void gasnetc_op_ctxt_run_rdma_callback(void *raw, uintptr_t aux) { void *ctxt = (void *)((uintptr_t)raw & GASNETC_CTXT_MASK); gasnetc_rdma_callback_fn callback = *(gasnetc_rdma_callback_fn *)ctxt; callback(ctxt, aux); } /*------------------------------------------------- * Function Declarations *-------------------------------------------------*/ GASNETI_INLINE(gasnetc_ofi_handle_am) void gasnetc_ofi_handle_am(gasnetc_ofi_am_send_buf_t *header, int isreq, size_t msg_len, uint64_t cq_data); void gasnetc_ofi_am_send_complete(gasnetc_ofi_send_ctxt_t *header); void gasnetc_ofi_tx_poll(void); GASNETI_INLINE(gasnetc_ofi_am_recv_poll) void gasnetc_ofi_am_recv_poll(int is_request); void gasnetc_ofi_am_recv_poll_cold(int is_request) { // non-inline wrapper to avoid forced inlining on "cold" paths gasnetc_ofi_am_recv_poll(is_request); } GASNETI_NEVER_INLINE(gasnetc_fi_cq_readerr, // this wrapper silences a warning on gcc 4.8.5 ssize_t gasnetc_fi_cq_readerr(struct fid_cq *cq, struct fi_cq_err_entry *buf, uint64_t flags)) { return fi_cq_readerr(cq, buf, flags); } // ofi-conduit should not be considered "portable" when using // a high-performance provider (unless used w/ inappropriate h/w) int gasnetc_check_portable_conduit(void) { gasneti_assert(gasnetc_ofi_inited); if (! strcmp(gasnetc_ofi_provider, "verbs;ofi_rxm")) { // extension of bug 3609: some verbs-compatible networks need special handling // TODO: warn specifically about the right providers if (!strncmp(gasnetc_ofi_domain, "hfi1_", 5)) return 1; // psm2 if (!strncmp(gasnetc_ofi_domain, "qib", 3)) return 1; // psm } return !gasnetc_high_perf_prov; } // Check if the argument macthes the configured provider(s). // Considers the value of FI_PROVIDER (if any) in the generic case. // return: // NO: 0 if the argument cannot be the eventually selected provider // MAYBE: 1 if the argument might be the eventually selected provider // YES: 2 if the argument must be the eventually selected provider #define GASNETC_EARLY_PROVIDER_NO 0 #define GASNETC_EARLY_PROVIDER_MAYBE 1 #define GASNETC_EARLY_PROVIDER_YES 2 static int gasnetc_early_provider_check(const char *prov_name) { // Argument cannot be "generic" nor may it contain a semi-colon gasneti_assert(gasneti_strcasecmp(prov_name, "generic")); gasneti_assert(strchr(prov_name,';') == NULL); const char *provider = gasneti_getenv("FI_PROVIDER"); const char *provider_ident = _STRINGIFY(GASNETC_OFI_PROVIDER_IDENT); if (gasneti_strcasecmp(provider_ident, "generic")) { // Single-provider build return gasneti_strcasecmp(prov_name, provider_ident) ? GASNETC_EARLY_PROVIDER_NO : GASNETC_EARLY_PROVIDER_YES; } else if (provider && provider[0]) { // Generic build, constrained to one provider by FI_PROVIDER char *delim = strchr(provider,';'); size_t len = delim ? (delim - provider) : strlen(provider); return gasneti_strncasecmp(prov_name, provider, len) ? GASNETC_EARLY_PROVIDER_NO : GASNETC_EARLY_PROVIDER_YES; } else { // Generic build, unconstrained return GASNETC_EARLY_PROVIDER_MAYBE; } } // Compare library version (according to header) against a given value. // returns // 0 for equal // 1 for build is newer than given // -1 for build is older than given static int gasnetc_header_version_cmp(unsigned int major, unsigned int minor, unsigned int revision) { gasneti_assert_uint(major ,<=, 0xffff); gasneti_assert_uint(minor ,<=, 0xffff); gasneti_assert_uint(revision ,<=, 0xffff); uint64_t given = FI_VERSION(major, minor); uint64_t build = FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION); #ifdef FI_REVISION_VERSION given = (given << 16) | revision; build = (build << 16) | FI_REVISION_VERSION; #endif return (build == given) ? 0 : ((build < given) ? -1 : 1); } // Reads any user-provided settings from the environment to avoid clogging up // the gasnetc_ofi_init() function with this code. // Runs after provier and domain selection to allow for provider-specific defaults static void gasnetc_ofi_read_env_vars(const char *provider, const char *domain) { const char* am_max_medium_env = "GASNET_OFI_MAX_MEDIUM"; const char* max_am_request_buffs_env = "GASNET_OFI_MAX_REQUEST_BUFFS"; const char* max_am_reply_buffs_env = "GASNET_OFI_MAX_REPLY_BUFFS"; const char* num_init_request_buffs_env = "GASNET_OFI_NUM_INITIAL_REQUEST_BUFFS"; const char* num_init_reply_buffs_env = "GASNET_OFI_NUM_INITIAL_REPLY_BUFFS"; const char* max_err_string = "%s must be greater than or equal to\n" "%s, which is set to %d in this run.\n"; const char* init_err_string = "%s must be greater than or equal to 2.\n"; // Maxiumum size of an AM Medium payload gasnetc_ofi_max_medium = gasneti_getenv_int_withdefault(am_max_medium_env, GASNETC_OFI_MAX_MEDIUM_DFLT, 1); if (gasnetc_ofi_max_medium < 512) { gasneti_fatalerror("%s setting (%lu) is below the minimum value of 512.", am_max_medium_env, (unsigned long)gasnetc_ofi_max_medium); } // Maximum and initial number of buffers to allocate for AM Requests max_am_request_buffs = gasneti_getenv_int_withdefault(max_am_request_buffs_env, 1024, 0); size_t dflt = MIN(256, max_am_request_buffs); num_init_am_request_buffs = gasneti_getenv_int_withdefault(num_init_request_buffs_env, dflt, 0); if (num_init_am_request_buffs < 2) { gasneti_fatalerror(init_err_string, num_init_request_buffs_env); } if (max_am_request_buffs < num_init_am_request_buffs) { gasneti_fatalerror(max_err_string, max_am_request_buffs_env, num_init_request_buffs_env, (int)num_init_am_request_buffs); } // Maximum and initial number of buffers to allocate for AM Replies max_am_reply_buffs = gasneti_getenv_int_withdefault(max_am_reply_buffs_env, 1024, 0); dflt = MIN(256, max_am_reply_buffs); num_init_am_reply_buffs = gasneti_getenv_int_withdefault(num_init_reply_buffs_env, dflt, 0); if (num_init_am_reply_buffs < 2) { gasneti_fatalerror(init_err_string, num_init_reply_buffs_env); } if (max_am_reply_buffs < num_init_am_reply_buffs) { gasneti_fatalerror(max_err_string, max_am_reply_buffs_env, num_init_reply_buffs_env, (int)num_init_am_reply_buffs); } /* The number of RMA requests to be issued before a tx_poll takes place */ rdma_periodic_poll_threshold = gasneti_getenv_int_withdefault("GASNET_OFI_RMA_POLL_FREQ", 32, 0); ofi_num_bbufs = gasneti_getenv_int_withdefault("GASNET_OFI_NUM_BBUFS", 64, 0); ofi_bbuf_size = gasneti_getenv_int_withdefault("GASNET_OFI_BBUF_SIZE", GASNET_PAGESIZE, 1); gasnetc_ofi_bbuf_threshold = gasneti_getenv_int_withdefault("GASNET_OFI_BBUF_THRESHOLD", 4*ofi_bbuf_size, 1); if (ofi_num_bbufs < gasnetc_ofi_bbuf_threshold/ofi_bbuf_size) gasneti_fatalerror("The number of bounce buffers must be greater than or equal to the bounce\n" "buffer threshold divided by the bounce buffer size. See the ofi-conduit README.\n"); if (gasnetc_ofi_bbuf_threshold/ofi_bbuf_size > OFI_MAX_NUM_BOUNCE_BUFFERS) { gasneti_fatalerror("The ofi-conduit limits the max number of bounce buffers used in the non-blocking\n" "put path to %d. Your selections for the bounce buffer tuning parameters exceed this. If you\n" "truly need more than %d bounce buffers, edit the OFI_MAX_NUM_BOUNCE_BUFFERS macro in\n" "gasnet_ofi.c and recompile.\n", OFI_MAX_NUM_BOUNCE_BUFFERS, OFI_MAX_NUM_BOUNCE_BUFFERS); } // What is the largest ofi-level message we can receive? min_multi_recv = MAX(offsetof(gasnetc_ofi_am_send_buf_t, buf.long_buf.data), offsetof(gasnetc_ofi_am_send_buf_t, buf.medium_buf.data)) + OFI_AM_MAX_DATA_LENGTH; min_multi_recv = GASNETI_ALIGNUP(min_multi_recv, GASNETI_MEDBUF_ALIGNMENT); const char* num_multirecv_buffs_env = "GASNET_OFI_NUM_RECEIVE_BUFFS"; const char* multirecv_size_env = "GASNET_OFI_RECEIVE_BUFF_SIZE"; const char *env_val = gasnet_getenv(multirecv_size_env); if (! gasneti_strcasecmp("SINGLE", env_val) || ! gasneti_strcasecmp("RECV", env_val)) { const char *value = gasneti_dynsprintf("%s => %d", env_val, (int)min_multi_recv); gasneti_envstr_display(multirecv_size_env, value, 0); multirecv_buff_size = min_multi_recv; // See Bug 4478 for information leading to the selection of 450 as a default. // TODO: at least consider scaling this with PPN num_multirecv_buffs = gasneti_getenv_int_withdefault(num_multirecv_buffs_env, 450, 0); if (! gasneti_strcasecmp("RECV", env_val)) { // single-message buffers are posted *without* FI_MULTI_RECV maybe_multi_recv = 0; } } else { multirecv_buff_size = gasneti_getenv_int_withdefault(multirecv_size_env, 1024*1024, 1); num_multirecv_buffs = gasneti_getenv_int_withdefault(num_multirecv_buffs_env, 8, 0); } gasneti_assert((maybe_multi_recv == FI_MULTI_RECV) || ! gasneti_strcasecmp("RECV", env_val)); if (num_multirecv_buffs < 2) gasneti_fatalerror("%s must be at least 2.\n", num_multirecv_buffs_env); if (multirecv_buff_size < min_multi_recv) { gasneti_fatalerror("%s must be at least %d bytes on this build.\n" "This is the size of the largest AM, including its message header.\n", \ multirecv_size_env, (int)min_multi_recv); } const char* long_rma_threshold_env = "GASNET_OFI_LONG_AM_RMA_THRESH"; long_rma_threshold = gasneti_getenv_int_withdefault(long_rma_threshold_env, OFI_AM_MAX_DATA_LENGTH, 1); if (long_rma_threshold > OFI_AM_MAX_DATA_LENGTH) { gasneti_fatalerror( "The value given for %s exceeds the amount\n" "of data which can be packed into a medium message (%d bytes on this build).\n" "Use a lower value or reconfigure GASNet for a bigger medium message size using\n" "--with-ofi-max-medium=.\n", long_rma_threshold_env, (int)OFI_AM_MAX_DATA_LENGTH); } tx_cq_size = gasneti_getenv_int_withdefault("GASNET_OFI_TX_CQ_SIZE", 0, 0); rx_cq_size = gasneti_getenv_int_withdefault("GASNET_OFI_RX_CQ_SIZE", 0, 0); } /* The intention of separating this logic from gasnetc_ofi_init() is * to contain the complexity of supporting scalable endpoints in the future to * this function and the relevant get-address macros. */ static void ofi_setup_address_vector(void) { int ret = FI_SUCCESS; struct fi_av_attr av_attr = {0}; #if USE_AV_MAP av_attr.type = FI_AV_MAP; #else av_attr.type = FI_AV_TABLE; #endif av_attr.count = gasneti_nodes; // TODO: // + set av_attr.ep_per_node to improve provider resource allocation? // + set av_attr.name and mmap_addr to share address vectors within a host? // Create an AV per endpoint for (int i = 0; i < NUM_OFI_ENDPOINTS; ++i) { if (GASNETC_OFI_USE_AV_MAP) { gasnetc_addr_map[i] = (fi_addr_t*)gasneti_malloc(sizeof(fi_addr_t) * av_attr.count); } ret = fi_av_open(gasnetc_ofi_domainfd, &av_attr, &gasnetc_ofi_avfd[i], NULL); GASNETC_OFI_CHECK_RET(ret, "fi_av_open failed"); } // Bind AVs to distinct endpoints ret = fi_ep_bind(gasnetc_ofi_rdma_epfd, &gasnetc_ofi_avfd[GASNETC_FADDR_IDX_RDMA]->fid, 0); GASNETC_OFI_CHECK_RET(ret, "fi_ep_bind for avfd to rdma_epfd failed"); ret = fi_ep_bind(gasnetc_ofi_request_epfd, &gasnetc_ofi_avfd[GASNETC_FADDR_IDX_REQ]->fid, 0); GASNETC_OFI_CHECK_RET(ret, "fi_ep_bind for avfd to am request epfd failed"); ret = fi_ep_bind(gasnetc_ofi_reply_epfd, &gasnetc_ofi_avfd[GASNETC_FADDR_IDX_REP]->fid, 0); GASNETC_OFI_CHECK_RET(ret, "fi_ep_bind for avfd to am reply epfd failed"); } static void ofi_exchange_addresses(void) { size_t reqnamelen = 0, repnamelen = 0, rdmanamelen = 0; char* on_node_addresses; int ret = FI_SUCCESS; /* Query each endpoint for its address length. While in most cases, these * lengths will be equal, there are some cases where they might not be. For * example, when using both IPv4 and IPv6. */ ret = fi_getname(&gasnetc_ofi_request_epfd->fid, NULL, &reqnamelen); gasneti_assert(ret == -FI_ETOOSMALL); ret = fi_getname(&gasnetc_ofi_reply_epfd->fid, NULL, &repnamelen); gasneti_assert(ret == -FI_ETOOSMALL); ret = fi_getname(&gasnetc_ofi_rdma_epfd->fid, NULL, &rdmanamelen); gasneti_assert(ret == -FI_ETOOSMALL); size_t total_len = reqnamelen + repnamelen + rdmanamelen; on_node_addresses = gasneti_malloc(total_len); char* alladdrs = gasneti_malloc(gasneti_nodes*total_len); char* p = on_node_addresses; size_t offsets[NUM_OFI_ENDPOINTS]; gasneti_static_assert(GASNETC_FADDR_IDX_REQ == 0); ret = fi_getname(&gasnetc_ofi_request_epfd->fid, p, &reqnamelen); GASNETC_OFI_CHECK_RET(ret, "fi_getname failed for the AM request endpoint"); offsets[GASNETC_FADDR_IDX_REQ] = p - on_node_addresses; p += reqnamelen; gasneti_static_assert(GASNETC_FADDR_IDX_REP == 1); ret = fi_getname(&gasnetc_ofi_reply_epfd->fid, p, &repnamelen); GASNETC_OFI_CHECK_RET(ret, "fi_getname failed for the AM reply endpoint"); offsets[GASNETC_FADDR_IDX_REP] = p - on_node_addresses; p += repnamelen; gasneti_static_assert(GASNETC_FADDR_IDX_RDMA == 2); ret = fi_getname(&gasnetc_ofi_rdma_epfd->fid, p, &rdmanamelen); GASNETC_OFI_CHECK_RET(ret, "fi_getname failed for the RDMA endpoint"); offsets[GASNETC_FADDR_IDX_RDMA] = p - on_node_addresses; p += rdmanamelen; gasneti_assert_ptr(p ,==, on_node_addresses + total_len); gasneti_bootstrapExchange(on_node_addresses, total_len, alladdrs); // Interleaving of three endpoints' addresses leads to this // transpose-order traversal and "round-robin" insertion for (int i = 0; i < NUM_OFI_ENDPOINTS; ++i) { p = alladdrs + offsets[i]; for (gex_Rank_t j = 0; j < gasneti_nodes; ++j) { uint64_t flags = (j == gasneti_nodes - 1) ? 0 : FI_MORE; fi_addr_t *addr_p = GASNETC_OFI_USE_AV_MAP ? gasnetc_addr_map[i] + j : NULL; ret = fi_av_insert(gasnetc_ofi_avfd[i], p, 1, addr_p, flags , NULL); if (ret != 1) { gasneti_fatalerror("fi_av_insert(rank=%u, ep=%d) failed %d\n", j, i, ret); } p += total_len; } } gasneti_free(alladdrs); gasneti_free(on_node_addresses); } // Visit available info structs, grouped by provider from most to least preferred. // Invokes callback for each struct, terminates early if the callback returns non-zero. // This is a helper for other functions typedef int (*gasnetc_info_visitor_t)(const struct fi_info *p, void *context); static void gasnetc_info_foreach(struct fi_info *info, gasnetc_info_visitor_t callback, void *context) { for (const char *q = supported_providers; *q; /*empty*/) { while (*q == ' ') ++q; const char *r = strchr(q, ' '); int prov_name_len = r ? r - q : strlen(q); for (struct fi_info *p = info; p; p = p->next) { if (! gasneti_strncasecmp(p->fabric_attr->prov_name, q, prov_name_len)) { if (callback(p, context)) return; } } q += prov_name_len; } } // Extract an hwloc device (PCI or O/S) name from a struct fi_info // Returned value belongs to the library and should be gasneti_free()ed // // Priority order (best to worst): // 1. PCI address of the "nic", if available // This is the most precise naming available, and is notably the only option // on this list which currently works with the cxi provider. // 2. Device attributes "name" field of the "nic" // 3. The "domain" // This *may* be the same as #2, but can also have suffixes. // For instance, the verbs provider may expose 'mlx5_0' and 'mlx5_0-xrc' // as distinct "domain" names even though they are the same device. static const char* gasnetc_info_to_device(const struct fi_info *p) { char *name; #if FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION) >= FI_VERSION(1, 7) // The `nic` member of struct fi_info first appears in libfabric 1.7.0 if (p->nic && p->nic->bus_attr && p->nic->bus_attr->bus_type == FI_BUS_PCI) { name = gasneti_sappendf(NULL, "%x:%x:%x.%x", p->nic->bus_attr->attr.pci.domain_id, p->nic->bus_attr->attr.pci.bus_id, p->nic->bus_attr->attr.pci.device_id, p->nic->bus_attr->attr.pci.function_id); } else if (p->nic && p->nic->device_attr && p->nic->device_attr->name) { name = gasneti_strdup(p->nic->device_attr->name); } else #endif { name = gasneti_strdup(p->domain_attr->name); } return name; } // List available devices, grouped by provider from most to least preferred #define GASNETC_LIST_DEVICES_GROWTH 8 static struct gasnetc_list_devices_state_s { int count; int alloc_count; const char **provider_name; const char **domain_name; const char **device_name; } gasnetc_list_devices_state; static int gasnetc_list_devices_visitor(const struct fi_info *p, void *context) { // This visitor collects necessary data from each struct visited, with de-duplication struct gasnetc_list_devices_state_s *state = context; const char *provider_name = p->fabric_attr->prov_name; const char *domain_name = p->domain_attr->name; for (int i = 0; i < state->count; ++i) { if (!strcmp(provider_name, state->provider_name[i]) && !strcmp(domain_name, state->domain_name[i])) { return 0; // skip duplicate and continue traversal } } int idx = state->count++; if (state->count > state->alloc_count) { state->alloc_count += GASNETC_LIST_DEVICES_GROWTH; size_t alloc_sz = sizeof(char *) * state->alloc_count; state->provider_name = gasneti_realloc(state->provider_name, alloc_sz); state->domain_name = gasneti_realloc(state->domain_name, alloc_sz); state->device_name = gasneti_realloc(state->device_name, alloc_sz); } state->provider_name[idx] = provider_name; state->domain_name[idx] = domain_name; state->device_name[idx] = gasnetc_info_to_device(p); return 0; // continue traversal } static void gasnetc_list_devices(struct fi_info *hints) { struct fi_info *info = NULL; int ret = fi_getinfo(OFI_CONDUIT_VERSION, NULL, NULL, 0ULL, hints, &info); if (FI_SUCCESS != ret) { gasneti_console_message("INFO", "Failed to detect any supported providers and/or devices"); return; } struct gasnetc_list_devices_state_s *state = &gasnetc_list_devices_state; gasneti_assert(!state->count); gasnetc_info_foreach(info, gasnetc_list_devices_visitor, state); int count = state->count; uint32_t *distances = gasneti_malloc(sizeof(uint32_t) * count); if (0 > gasneti_hwloc_distances(count, distances, state->device_name, GASNETI_HWLOC_DISTANCES_NORMALIZE)) { gasneti_free(distances); distances = NULL; } char *msg = NULL; for (int i = 0; i < count; ++i) { msg = gasneti_sappendf(msg, "\n %-16s %-16s", state->provider_name[i], state->domain_name[i]); if (distances) { if (distances[i] == GASNETI_HWLOC_DISTANCE_UNKNOWN) { msg = gasneti_sappendf(msg, " distance ranking unknown"); } else { msg = gasneti_sappendf(msg, " distance ranking %d", 1 + (int)distances[i]); } } } fi_freeinfo(info); gasneti_console_message("INFO", "Detected the following provider and device pair(s)%s", msg); gasneti_free(msg); gasneti_free(distances); for (int i = 0; i < state->count; ++i) { gasneti_free((void*) state->device_name[i]); } gasneti_free(state->provider_name); gasneti_free(state->domain_name); gasneti_free(state->device_name); state->alloc_count = 0; state->count = 0; return; } // Find the first entry for the most-preferred provider offered, if any. static int gasnetc_getinfo_visitor(const struct fi_info *p, void *context) { // This visitor simply dups the first match *(struct fi_info **)context = fi_dupinfo(p); return 1; // end traversal } static struct fi_info *gasnetc_ofi_getinfo(struct fi_info *hints) { struct fi_info *info = NULL; int ret = fi_getinfo(OFI_CONDUIT_VERSION, NULL, NULL, 0ULL, hints, &info); if (FI_SUCCESS != ret) { return NULL; } struct fi_info *result = NULL; gasnetc_info_foreach(info, gasnetc_getinfo_visitor, &result); fi_freeinfo(info); return result; // caller will notice if this is the wrong provider } // Utility function to set an environment variable with proper tracing/logging // Returns zero if the variable was already set, non-zero otherwise. // Returns zero if !replace and the variable was already set to a different // (case-insensitive) value, non-zero otherwise. int gasnetc_setenv_string(const char *key, const char *val, int replace) { const char *prev = gasneti_getenv(key); int same = prev && !gasneti_strcasecmp(prev, val); if (same) { GASNETI_TRACE_PRINTF(I, ("Preserving default %s='%s' in environment", key, prev)); gasneti_envstr_display(key, prev, 1); return 1; } else if (!replace && prev) { GASNETI_TRACE_PRINTF(I, ("Not overwriting %s='%s' in environment", key, prev)); gasneti_envstr_display(key, prev, 0); return 0; } else { GASNETI_TRACE_PRINTF(I, ("Setting %s='%s' in environment", key, val)); gasneti_envstr_display(key, val, 1); gasneti_setenv(key, val); return 1; } } // Wrapper for case of gasnetc_setenv_string for an unsigned int key int gasnetc_setenv_uint(const char *key, unsigned int val, int replace) { char valstr[16]; snprintf(valstr, sizeof(valstr), "%u", val); return gasnetc_setenv_string(key, valstr, replace); } // Helper for (large) page-aligned allocation #include // for MAP_FAILED static void *gasnetc_alloc_pages(size_t len, const char *desc) { void *result = gasneti_mmap(GASNETI_PAGE_ALIGNUP(len)); if (MAP_FAILED == result) { gasneti_fatalerror("Failed to allocate %"PRIuSZ " bytes %s", len, desc); } return result; } static void gasnetc_check_version(const char *prov_name, unsigned int major, unsigned int minor) { if (gasneti_strcasecmp(prov_name,gasnetc_ofi_provider)) return; uint32_t have = fi_version(); uint32_t want = FI_VERSION(major,minor); if (FI_VERSION_GE(have, want)) return; const char *msg = gasneti_dynsprintf( "Provider '%s' is untrusted in libfabric version %d.%d " "(minimum trusted version is %d.%d).", gasnetc_ofi_provider, FI_MAJOR(have), FI_MINOR(have), major, minor); // UNDOCUMENTED mechanism to suppress the error: if (gasneti_getenv_yesno_withdefault("GASNET_OFI_ALLOW_UNTRUSTED_PROVIDER", 0)) { gasneti_console0_message("WARNING","%s",msg); } else { gasneti_fatalerror("%s",msg); } } /*------------------------------------------------ * Initialize OFI conduit * ----------------------------------------------*/ int gasnetc_ofi_init(void) { int ret = GASNET_OK; int result = GASNET_ERR_NOT_INIT; struct fi_info *hints, *info; struct fi_cq_attr tx_cq_attr = {0}; struct fi_cq_attr rx_cq_attr = {0}; size_t optval; int num_locks; int i; // Ensure uniform FI_* env vars gasneti_propagate_env("FI_", GASNETI_PROPAGATE_ENV_PREFIX); // Ensure uniform MLX5_* env vars for verbs provider // Especially important for work-arounds like MLX5_SCATTER_TO_CQE gasneti_propagate_env("MLX5_", GASNETI_PROPAGATE_ENV_PREFIX); // Ensure uniform HFI_* env vars for psm2 provider // Especially important for work-arounds like HFI_NO_CPUAFFINITY gasneti_propagate_env("HFI_", GASNETI_PROPAGATE_ENV_PREFIX); // TODO: other providers? #if GASNETC_OFI_USE_THREAD_DOMAIN && GASNET_PAR gasneti_spinlock_init(&gasnetc_ofi_locks.big_lock); #elif GASNET_PAR /* This lock is needed in PAR mode to protect the AM reference counting */ gasneti_spinlock_init(&gasnetc_ofi_locks.rx_request_cq); gasneti_spinlock_init(&gasnetc_ofi_locks.rx_reply_cq); #endif #if 0 gasneti_spinlock_init(&gasnetc_ofi_locks.tx_cq); gasneti_spinlock_init(&gasnetc_ofi_locks.am_rx); gasneti_spinlock_init(&gasnetc_ofi_locks.am_tx); gasneti_spinlock_init(&gasnetc_ofi_locks.rdma_rx); gasneti_spinlock_init(&gasnetc_ofi_locks.rdma_tx); #endif /* OFI initialization */ /* Alloc hints*/ hints = fi_allocinfo(); if (!hints) gasneti_fatalerror("fi_allocinfo for hints failed\n"); // constrain the device/domain if provided by the user (void) gasneti_hwloc_init(); // TODO: messages on error? gasnetc_ofi_device = gasneti_getenv_hwloc_withdefault("GASNET_OFI_DEVICE", "", "Socket", 0); if (!strlen(gasnetc_ofi_device)) gasnetc_ofi_device = NULL; hints->domain_attr->name = (/*no const*/ char *)gasnetc_ofi_device; /* caps: fabric interface capabilities */ hints->caps = FI_RMA | FI_MSG | FI_MULTI_RECV; /* mode: convey requirements for application to use fabric interfaces */ hints->mode = FI_CONTEXT; /* fi_context is used for per operation context parameter */ /* addr_format: expected address format for AV/CM calls */ hints->addr_format = FI_FORMAT_UNSPEC; hints->ep_attr->type = FI_EP_RDM; /* Reliable datagram */ /* Threading mode is set by the configure script to FI_THREAD_DOMAIN if * using the psm2 provider and FI_THREAD_SAFE otherwise*/ #if GASNETC_OFI_USE_THREAD_DOMAIN || !GASNET_PAR hints->domain_attr->threading = FI_THREAD_DOMAIN; #else hints->domain_attr->threading = FI_THREAD_SAFE; #endif hints->domain_attr->control_progress = FI_PROGRESS_MANUAL; /* resource_mgmt: FI_RM_ENABLED - provider protects against overrunning local and remote resources. */ hints->domain_attr->resource_mgmt = FI_RM_ENABLED; // av_type: type of address vectors that are usable with this domain #if !GASNETC_OFI_USE_AV_MAP_STATIC hints->domain_attr->av_type = FI_AV_UNSPEC; #else hints->domain_attr->av_type = GASNETC_OFI_USE_AV_MAP ? FI_AV_MAP : FI_AV_TABLE; #endif // The four bits we compose here are basically FI_MR_BASIC decomposed plus FI_MR_ENDPOINT: hints->domain_attr->mr_mode = FI_MR_ENDPOINT; #if GASNET_SEGMENT_FAST || GASNET_SEGMENT_LARGE // We expect all segment registrations to be of allocated virtual addresses hints->domain_attr->mr_mode |= FI_MR_ALLOCATED; #else // EVERYTHING fundamentally cannot satisfy the "ALLOCATED" constraint. // Note that some providers will set this bit on output even if clear on input. #endif #if GASNETC_OFI_HAS_MR_VIRT_ADDR_STATIC // Set FI_MR_VIRT_ADDR according to configure-time selection hints->domain_attr->mr_mode |= GASNETC_OFI_HAS_MR_VIRT_ADDR ? FI_MR_VIRT_ADDR : 0; #else // Try with FI_MR_VIRT_ADDR bit set. The provider may clear it. hints->domain_attr->mr_mode |= FI_MR_VIRT_ADDR; #endif #if GASNETC_OFI_HAS_MR_PROV_KEY_STATIC // Set FI_MR_PROV_KEY according to configure-time selection hints->domain_attr->mr_mode |= GASNETC_OFI_HAS_MR_PROV_KEY ? FI_MR_PROV_KEY : 0; #else // Try with FI_MR_PROV_KEY bit set. Either we or the provider may clear it hints->domain_attr->mr_mode |= FI_MR_PROV_KEY; #endif // If user has requested, list devices prior to adding FI_HMEM/FI_MR_HMEM which // are optional (we eventually retry w/o if there are no matches with). if (gasneti_getenv_yesno_withdefault("GASNET_OFI_LIST_DEVICES", 0) && gasneti_check_node_list("GASNET_OFI_LIST_DEVICES_NODES")) { gasnetc_list_devices(hints); } #if GASNET_HAVE_MK_CLASS_MULTIPLE hints->caps |= FI_HMEM; hints->domain_attr->mr_mode |= FI_MR_HMEM; #endif // Setup various environment variables quite early, before the provider may // have been determined. This is necessary because fi_getinfo() may read them. // NOTE: spawn via an ofi-based MPI may have read these even earlier! // Provider-independent FI_MR_CACHE_MAX_{SIZE,COUNT}: // The defaults are known to have a negative impact on many applications // when using cxi or verbs providers (bug 4676). // To avoid unforeseen problems on conduits not known to demonstrate the // performance issue, we set these variables only for these two providers. // In particular, we do not set these for the "generic" provider case unless // `FI_PROVIDER` has been set to ensure one of those two will be selected. if (gasnetc_early_provider_check("cxi") == GASNETC_EARLY_PROVIDER_YES || gasnetc_early_provider_check("verbs") == GASNETC_EARLY_PROVIDER_YES) { gasnetc_setenv_string("FI_MR_CACHE_MAX_SIZE", "-1", 0 /* = no replacement */); gasnetc_setenv_string("FI_MR_CACHE_MAX_COUNT", "-1", 0 /* = no replacement */); } // Implement our "opt-out" behavior of converting empty values for these two // variables to unset. Otherwise libfabric use of `strtol()` parses empty // strings as `0`, resulting in disabling the cache! // We do this unconditionally, to avoid letting a user's "defensive" setting // do harm for a provider using the cache but not in our allow-list. { const char *vars[] = { "FI_MR_CACHE_MAX_SIZE", "FI_MR_CACHE_MAX_COUNT", }; size_t count = sizeof(vars) / sizeof(vars[0]); for (size_t i = 0; i < count; ++i) { const char *var = vars[i]; const char *val = gasneti_getenv(var); if (val && !val[0]) { gasneti_unsetenv(var); GASNETI_TRACE_PRINTF(I, ("Converting empty %s in environment to unset", var)); } } } // Provider-independent FI_UNIVERSE_SIZE: // Ideally, FI_UNIVERSE_SIZE should always match our process count unless is // has already been set. // However, due to bug 4413, we currently only set it on an "opt-in" basis if // we may be using cxi provider prior to libfabric 1.15.2.0. { int dflt = 1; #if GASNETI_ARCH_CRAYEX if (gasnetc_early_provider_check("cxi") && (gasnetc_header_version_cmp(1,15,2) < 0)) { // default should be 0 when cxi < 1.15.2.0 may be running dflt = 0; } #endif if (gasneti_getenv_yesno_withdefault("GASNET_OFI_SET_UNIVERSE_SIZE", dflt)) { gasnetc_setenv_uint("FI_UNIVERSE_SIZE", gasneti_nodes, 0 /* = no replacement */); } } // PSM2 provider: // In libfabric v1.6, the psm2 provider transitioned to using separate // psm2 endpoints for each ofi endpoint, whereas in the past all communication // was multiplexed over a single psm2 endpoint. Setting this variable ensures // that unnecessary connections between remote endpoints which never communicate // are not made, which can cause slow tear-down. int set_psm2_lazy_conn = 0; if (FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION) >= FI_VERSION(1, 6)) { set_psm2_lazy_conn = gasnetc_setenv_string("FI_PSM2_LAZY_CONN", "1", 1); } // CXI provider: // To handle bursty AM traffic, enable hybrid receive mode with reasonable default parameters. // If FI_CXI_RX_MATCH_MODE is already set to something else, we make NO changes (or risk an // inconsistent mess). const char *initial_CXI_RX_MATCH_MODE = gasnet_getenv("FI_CXI_RX_MATCH_MODE"); const char *initial_CXI_RDZV_THRESHOLD = gasnet_getenv("FI_CXI_RDZV_THRESHOLD"); const char *initial_CXI_RDZV_GET_MIN = gasnet_getenv("FI_CXI_RDZV_GET_MIN"); int set_cxi_match_mode = gasnetc_setenv_string("FI_CXI_RX_MATCH_MODE", "hybrid", 0); if (set_cxi_match_mode) { // Always try to set both RDZV parameters but will warn if either conflicts // Don't use && or || due to short-circuit evaluation if (! gasnetc_setenv_string("FI_CXI_RDZV_THRESHOLD", "256", 0)) set_cxi_match_mode = 0; if (! gasnetc_setenv_string("FI_CXI_RDZV_GET_MIN", "256", 0)) set_cxi_match_mode = 0; } // else: warning deferred until provider selection confirms use of CXI info = gasnetc_ofi_getinfo(hints); if (!info) { #if GASNET_HAVE_MK_CLASS_MULTIPLE hints->caps ^= FI_HMEM; // retry w/o FI_HMEM info = gasnetc_ofi_getinfo(hints); if (info) { // fall through // gasnetc_fi_hmem will get set to zero later, leading to // deferred failure in the first call to gex_MK_Create(), if any } else #endif GASNETI_RETURN_ERRR(RESOURCE, "No OFI providers found that could support the OFI conduit"); } // Balk if provider was explicitly chosen at configure time and is not available now if (!strchr(supported_providers,' ') && gasneti_strcasecmp(supported_providers, info->fabric_attr->prov_name)) { if (gasnetc_ofi_device) { // Retry to rule out invalid device choice hints->domain_attr->name = NULL; info = gasnetc_ofi_getinfo(hints); if (info && !gasneti_strcasecmp(supported_providers, info->fabric_attr->prov_name)) { gasneti_fatalerror("Specifed device '%s' is not available or not usable", gasnetc_ofi_device); } } char *envvar = gasneti_getenv("FI_PROVIDER"); gasneti_fatalerror( "OFI provider '%s' selected at configure time is not available at run time%s%s%s.", supported_providers, envvar ? " and/or has been overridden by FI_PROVIDER='" : "", envvar ? envvar : "", envvar ? "' in the environment" : ""); } // Check if this provider is one we consider "high performance" const char *high_perf_providers[] = { "psm2", "cxi", "verbs;ofi_rxm" }; for (i = 0; i < sizeof(high_perf_providers)/sizeof(high_perf_providers[0]); ++i) { if (!gasneti_strcasecmp(info->fabric_attr->prov_name, high_perf_providers[i])) { gasnetc_high_perf_prov = 1; break; } } // psm2 provider needs some special handling if (!gasneti_strcasecmp(info->fabric_attr->prov_name, "psm2")){ using_psm_provider = 1; } else if (set_psm2_lazy_conn) { /* If we set this variable and are not using psm2, unset it in the * unlikely case that another library in the current application will * use ofi/psm2 */ unsetenv("FI_PSM2_LAZY_CONN"); } if (!gasneti_strcasecmp(info->fabric_attr->prov_name, "cxi") && !set_cxi_match_mode) { const char *str0 = (initial_CXI_RX_MATCH_MODE && initial_CXI_RX_MATCH_MODE[0]) ? gasneti_dynsprintf("='%s'", initial_CXI_RX_MATCH_MODE) : ""; const char *str1 = (initial_CXI_RDZV_THRESHOLD && initial_CXI_RDZV_THRESHOLD[0]) ? gasneti_dynsprintf("='%s'", initial_CXI_RDZV_THRESHOLD) : ""; const char *str2 = (initial_CXI_RDZV_GET_MIN && initial_CXI_RDZV_GET_MIN[0]) ? gasneti_dynsprintf("='%s'", initial_CXI_RDZV_GET_MIN) : ""; gasneti_console0_message("WARNING", "ofi-conduit failed to configure FI_CXI_* " "environment variables due to prior conflicting settings. " "This may lead to unstable behavior and/or degraded " "performance. If you did not intentionally set " "FI_CXI_RX_MATCH_MODE%s, FI_CXI_RDZV_THRESHOLD%s, or " "FI_CXI_RDZV_GET_MIN%s then this condition may have resulted " "from initializing MPI prior to initialization of GASNet. " "For more information on that scenario, please see \"Limits " "to MPI interoperability\" in the ofi-conduit README. ", str0, str1, str2 ); } int quiet = gasneti_getenv_yesno_withdefault("GASNET_QUIET", 0); #if GASNET_PAR if (!using_psm_provider && GASNETC_OFI_USE_THREAD_DOMAIN) { const char * msg = "Using OFI provider \"%s\" when the ofi-conduit was configured for FI_THREAD_DOMAIN\n" "(possibly because the psm or psm2 provider was detected at configure time). In GASNET_PAR mode,\n" "this has the effect of using a global lock instead of fine-grained locking. If this causes \n" "undesirable performance in PAR, reconfigure GASNet using: --with-ofi-provider=%s --disable-thread-domain"; if (quiet) GASNETI_TRACE_PRINTF(I,(msg, info->fabric_attr->prov_name, info->fabric_attr->prov_name)); else gasneti_console0_message("WARNING", msg, info->fabric_attr->prov_name, info->fabric_attr->prov_name); } #endif if (!gasnetc_high_perf_prov) { const char * msg = "Using OFI provider (%s), which has not been validated to provide\n" " WARNING: acceptable GASNet performance. You should consider using a more\n" " WARNING: hardware-appropriate GASNet conduit. See ofi-conduit/README."; if (quiet) GASNETI_TRACE_PRINTF(I,(msg, info->fabric_attr->prov_name)); else gasneti_console0_message("WARNING", msg, info->fabric_attr->prov_name); } gasneti_leak( gasnetc_ofi_provider = gasneti_strdup(info->fabric_attr->prov_name) ); gasneti_leak( gasnetc_ofi_domain = gasneti_strdup(info->domain_attr->name) ); // Ensure that subsequent calls to fi_getinfo() won't ever give us a // different provider. This is necessary when more than one provider matches // the other hints, and the first match is not the one we want. hints->fabric_attr->prov_name = gasnetc_ofi_provider; hints->domain_attr->name = gasnetc_ofi_domain; // With the provider now chosen, we are done with hwloc (void) gasneti_hwloc_fini(); // Check provider-specific minimum library versions (before checking modes) // REMINDER: these are documented in README and also enforced in configure.in gasnetc_check_version("udp;ofi_rxd" , 1,7 ); #if HAVE_PMI_CRAY_H // HPE's libfabric 1.11.x.y.z for Slingshot-10 gasnetc_check_version("verbs;ofi_rxm" , 1,11); #else gasnetc_check_version("verbs;ofi_rxm" , 1,12); #endif gasnetc_check_version("gni" , 1,14); gasnetc_check_version("tcp;ofi_rxm" , 1,15); #if !GASNETC_OFI_HAS_MR_PROV_KEY_STATIC // We offered FI_MR_PROV_KEY, but would rather not support it if not required. // So, query again without FI_MR_PROV_KEY if present. if (info->domain_attr->mr_mode & FI_MR_PROV_KEY) { hints->domain_attr->mr_mode ^= FI_MR_PROV_KEY; struct fi_info *alt_info = gasnetc_ofi_getinfo(hints); int accept = (alt_info != NULL); #if GASNETC_OFI_HAS_MR_VIRT_ADDR_STATIC // Must preserve statically selected FI_MR_VIRT_ADDR, if any if (alt_info && (FI_MR_VIRT_ADDR & (alt_info->domain_attr->mr_mode ^ info->domain_attr->mr_mode))) { accept = 0; } #endif if (accept) { fi_freeinfo(info); info = alt_info; } else { if (alt_info) fi_freeinfo(alt_info); hints->domain_attr->mr_mode ^= FI_MR_PROV_KEY; } } #endif has_mr_virt_addr = !!(info->domain_attr->mr_mode & FI_MR_VIRT_ADDR); has_mr_prov_key = !!(info->domain_attr->mr_mode & FI_MR_PROV_KEY); gasnetc_fi_mr_endpoint = (info->domain_attr->mr_mode & FI_MR_ENDPOINT); #if GASNETC_OFI_HAS_MR_VIRT_ADDR_STATIC if (GASNETC_OFI_HAS_MR_VIRT_ADDR != has_mr_virt_addr) { gasneti_fatalerror("The statically-determined value for GASNETC_OFI_HAS_MR_VIRT_ADDR=%i does\n" " not match the memory registration support that the (%s) provider reported.\n" " This could happen if a provider has changed behavior between versions.\n" " Use configure option --%s-ofi-mr-virt-addr to correct this.", GASNETC_OFI_HAS_MR_VIRT_ADDR, info->fabric_attr->prov_name, (has_mr_virt_addr ? "enable" : "disable")); } #endif #if GASNETC_OFI_HAS_MR_PROV_KEY_STATIC if (GASNETC_OFI_HAS_MR_PROV_KEY != has_mr_prov_key) { gasneti_fatalerror("The statically-determined value for GASNETC_OFI_HAS_MR_PROV_KEY=%i does\n" " not match the memory registration support that the (%s) provider reported.\n" " This could happen if a provider has changed behavior between versions.\n" " Use configure option --%s-ofi-mr-prov-key to correct this.", GASNETC_OFI_HAS_MR_PROV_KEY, info->fabric_attr->prov_name, (has_mr_prov_key ? "enable" : "disable")); } #endif #if GASNET_SEGMENT_EVERYTHING if (info->domain_attr->mr_mode & FI_MR_ALLOCATED) { gasneti_fatalerror("GASNET_SEGMENT_EVERYTHING requires a provider which does NOT require FI_MR_ALLOCATED. " "You must pick either a different provider or a different GASNet segment mode."); } #endif #if GASNET_HAVE_MK_CLASS_MULTIPLE gasnetc_fi_hmem = !!(info->caps & FI_HMEM); #endif use_av_map = (info->domain_attr->av_type == FI_AV_MAP); #if GASNETC_OFI_USE_AV_MAP_STATIC if (GASNETC_OFI_USE_AV_MAP != use_av_map) { gasneti_fatalerror("The statically-determined value for GASNETC_OFI_USE_AV_MAP=%i does\n" " not match the address vector type that the (%s) provider reported.\n" " This could happen if a provider has changed behavior between versions.\n" " Use configure option --%s-ofi-av-map to correct this.", GASNETC_OFI_USE_AV_MAP, info->fabric_attr->prov_name, (GASNETC_OFI_USE_AV_MAP ? "disable" : "enable")); } #endif /* Open the fabric provider */ ret = fi_fabric(info->fabric_attr, &gasnetc_ofi_fabricfd, NULL); GASNETC_OFI_CHECK_RET(ret, "fi_fabric failed"); GASNETI_TRACE_PRINTF(I, ("Opened provider '%s' version %u.%u", info->fabric_attr->prov_name, (unsigned int)FI_MAJOR(info->fabric_attr->prov_version), (unsigned int)FI_MINOR(info->fabric_attr->prov_version))); gasneti_assert(! gasneti_strcasecmp(gasnetc_ofi_provider, info->fabric_attr->prov_name)); /* Open a fabric access domain, also referred to as a resource domain */ ret = fi_domain(gasnetc_ofi_fabricfd, info, &gasnetc_ofi_domainfd, NULL); GASNETC_OFI_CHECK_RET(ret, "fi_domain failed"); GASNETI_TRACE_PRINTF(I, ("Opened domain '%s'", info->domain_attr->name)); gasneti_assert(! strcmp(gasnetc_ofi_domain, info->domain_attr->name)); if (gasneti_spawn_verbose) { gasneti_console_message("INFO", "provider '%s' version %u.%u, domain '%s', hostname '%s'", gasnetc_ofi_provider, (unsigned int)FI_MAJOR(info->fabric_attr->prov_version), (unsigned int)FI_MINOR(info->fabric_attr->prov_version), gasnetc_ofi_domain, gasneti_gethostname()); } fi_freeinfo(info); #if GASNETC_OFI_HAS_MR_VIRT_ADDR_STATIC GASNETI_TRACE_PRINTF(I, ("FI_MR_VIRT_ADDR support: "GASNETC_OFI_HAS_MR_VIRT_ADDR_CONFIGURE" (static)")); #else GASNETI_TRACE_PRINTF(I, ("FI_MR_VIRT_ADDR support: %d (dynamic)", GASNETC_OFI_HAS_MR_VIRT_ADDR)); #endif #if GASNETC_OFI_HAS_MR_PROV_KEY_STATIC GASNETI_TRACE_PRINTF(I, ("FI_MR_PROV_KEY support: "GASNETC_OFI_HAS_MR_PROV_KEY_CONFIGURE" (static)")); #else GASNETI_TRACE_PRINTF(I, ("FI_MR_PROV_KEY support: %d (dynamic)", GASNETC_OFI_HAS_MR_PROV_KEY)); #endif #if GASNET_HAVE_MK_CLASS_MULTIPLE GASNETI_TRACE_PRINTF(I, ("FI_HMEM support: %d (dynamic)", gasnetc_fi_hmem)); #else GASNETI_TRACE_PRINTF(I, ("FI_HMEM support: 0 (static)")); #endif #if GASNETC_OFI_USE_AV_MAP_STATIC GASNETI_TRACE_PRINTF(I, ("Use of FI_AV_MAP: "GASNETC_OFI_USE_AV_MAP_CONFIGURE" (static)")); #else GASNETI_TRACE_PRINTF(I, ("Use of FI_AV_MAP: %d (dynamic)", GASNETC_OFI_USE_AV_MAP)); #endif // Now read user-provided environment settings gasnetc_ofi_read_env_vars(gasnetc_ofi_provider, gasnetc_ofi_domain); /* Allocate a new active endpoint for RDMA operations */ hints->caps = FI_RMA; #if GASNET_HAVE_MK_CLASS_MULTIPLE if (gasnetc_fi_hmem) { hints->caps |= FI_HMEM; } #endif hints->tx_attr->op_flags = FI_DELIVERY_COMPLETE; // We do not support FI_CONTEXT for an RMA endpoint due to many-to-one iop. // However, we must set the bit as a work-around for psm2 provider in libfabric < 1.10 (bug 4567) int have_bug_4567 = using_psm_provider && (FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION) < FI_VERSION(1, 10)); hints->mode = have_bug_4567 ? FI_CONTEXT : 0; GASNETI_TRACE_PRINTF(I,("Work-around for bug 4567 is %sabled.", have_bug_4567?"en":"dis")); ret = fi_getinfo(OFI_CONDUIT_VERSION, NULL, NULL, 0ULL, hints, &gasnetc_rma_info); GASNETC_OFI_CHECK_RET(ret, "fi_getinfo() failed querying for RMA endpoint"); // Sanity checks for bits we cannot support if (!have_bug_4567) GASNETC_PROHIBIT_MODE_BIT(gasnetc_rma_info, FI_CONTEXT, "RMA endpoints"); GASNETC_PROHIBIT_MODE_BIT(gasnetc_rma_info, FI_CONTEXT2, "RMA endpoints"); GASNETC_PROHIBIT_MODE_BIT(gasnetc_rma_info, FI_MSG_PREFIX, "RMA endpoints"); GASNETC_PROHIBIT_MODE_BIT(gasnetc_rma_info, FI_RESTRICTED_COMP, "RMA endpoints"); ret = fi_endpoint(gasnetc_ofi_domainfd, gasnetc_rma_info, &gasnetc_ofi_rdma_epfd, NULL); GASNETC_OFI_CHECK_RET(ret, "fi_endpoint for rdma failed"); GASNETI_TRACE_PRINTF(I,("RMA EP: max_msg_size=%"PRIuSZ" inject_size=%"PRIuSZ" rma_iov_limit=%"PRIuSZ, gasnetc_rma_info->ep_attr->max_msg_size, gasnetc_rma_info->tx_attr->inject_size, gasnetc_rma_info->tx_attr->rma_iov_limit)); // Maximum size to use for fi_read() and fi_write() calls gasnetc_max_rma_size = gasnetc_rma_info->ep_attr->max_msg_size; gasneti_assert_always_uint( ofi_bbuf_size ,<=, gasnetc_max_rma_size ); // Maximum size supported for an AMLong payload gasnetc_ofi_max_long = MIN(gasnetc_max_rma_size, 0x7fffffff); // Maximum size to use for RMA with FI_INJECT { const char *env_var = "GASNET_OFI_RMA_INJECT_LIMIT"; uint64_t dflt = gasnetc_rma_info->tx_attr->inject_size; uint64_t value = gasneti_getenv_int_withdefault(env_var, dflt, 1); if (value > dflt) { // enforce dflt as the maximum if (!gasneti_mynode) { gasneti_console_message("WARNING", "%s reduced from the requested value %"PRIu64 " to the maximum supported value %"PRIu64, env_var, value, dflt); } value = dflt; } max_buffered_write = value; } GASNETI_TRACE_PRINTF(I, ("Max buffered write size is %"PRIu64, max_buffered_write)); gasneti_assert_always_uint( max_buffered_write ,<=, gasnetc_max_rma_size ); /* Allocate a new active endpoint for AM operations buffer */ hints->caps = FI_MSG | FI_MULTI_RECV; hints->mode = FI_CONTEXT; // FI_INJECT_COMPLETE is the better semantic fit for sending AMs. // However, we provide an undocumented means to restore the legacy // use of FI_DELIVERY_COMPLETE. if (gasneti_getenv_yesno_withdefault("GASNET_OFI_AM_USE_DELIVERY_COMPLETE", 0)) { hints->tx_attr->op_flags = FI_DELIVERY_COMPLETE; } else { hints->tx_attr->op_flags = FI_INJECT_COMPLETE; } ret = fi_getinfo(OFI_CONDUIT_VERSION, NULL, NULL, 0ULL, hints, &gasnetc_msg_info); GASNETC_OFI_CHECK_RET(ret, "fi_getinfo() failed querying for MSG endpoints"); // Sanity checks for bits we cannot support GASNETC_PROHIBIT_MODE_BIT(gasnetc_msg_info, FI_CONTEXT2, "MSG endpoints"); GASNETC_PROHIBIT_MODE_BIT(gasnetc_msg_info, FI_MSG_PREFIX, "MSG endpoints"); GASNETC_PROHIBIT_MODE_BIT(gasnetc_msg_info, FI_RESTRICTED_COMP, "MSG endpoints"); ret = fi_endpoint(gasnetc_ofi_domainfd, gasnetc_msg_info, &gasnetc_ofi_request_epfd, NULL); GASNETC_OFI_CHECK_RET(ret, "fi_endpoint for am request endpoint failed"); ret = fi_endpoint(gasnetc_ofi_domainfd, gasnetc_msg_info, &gasnetc_ofi_reply_epfd, NULL); GASNETC_OFI_CHECK_RET(ret, "fi_endpoint for am reply endpoint failed"); GASNETI_TRACE_PRINTF(I,("MSG EP: max_msg_size=%"PRIuSZ" inject_size=%"PRIuSZ" iov_limit=%"PRIuSZ, gasnetc_msg_info->ep_attr->max_msg_size, gasnetc_msg_info->tx_attr->inject_size, gasnetc_msg_info->tx_attr->iov_limit)); // Maximum size to use for fi_inject { const char *new_env_var = "GASNET_OFI_AM_INJECT_LIMIT"; const char *old_env_var = "GASNET_OFI_INJECT_LIMIT"; // Perfer the new variable name unless only the legacy one is set const char *env_var = (gasneti_getenv(new_env_var) || !gasneti_getenv(old_env_var)) ? new_env_var : old_env_var; uint64_t dflt = gasnetc_msg_info->tx_attr->inject_size; uint64_t value = gasneti_getenv_int_withdefault(env_var, dflt, 1); if (value > dflt) { // enforce dflt as the maximum if (!gasneti_mynode) { gasneti_console_message("WARNING", "%s reduced from the requested value %"PRIu64 " to the maximum supported value %"PRIu64, env_var, value, dflt); } value = dflt; } max_buffered_send = value; } GASNETI_TRACE_PRINTF(I, ("Max buffered send size is %"PRIu64, max_buffered_send)); // Allocate a CQ that will ideally be shared for both RDMA and AM tx ops memset(&tx_cq_attr, 0, sizeof(tx_cq_attr)); tx_cq_attr.format = FI_CQ_FORMAT_CONTEXT; tx_cq_attr.size = tx_cq_size; tx_cq_attr.wait_obj = FI_WAIT_NONE; ret = fi_cq_open(gasnetc_ofi_domainfd, &tx_cq_attr, &gasnetc_ofi_tx_cqfd, NULL); GASNETC_OFI_CHECK_RET(ret, "fi_cq_open for tx_cqfd failed"); /* Allocate recv completion queues for AMs */ memset(&rx_cq_attr, 0, sizeof(rx_cq_attr)); rx_cq_attr.format = FI_CQ_FORMAT_DATA; rx_cq_attr.size = rx_cq_size; rx_cq_attr.wait_obj = FI_WAIT_NONE; ret = fi_cq_open(gasnetc_ofi_domainfd, &rx_cq_attr, &gasnetc_ofi_request_cqfd, NULL); GASNETC_OFI_CHECK_RET(ret, "fi_cq_open for am request cq failed"); ret = fi_cq_open(gasnetc_ofi_domainfd, &rx_cq_attr, &gasnetc_ofi_reply_cqfd, NULL); GASNETC_OFI_CHECK_RET(ret, "fi_cq_open for am reply cq failed"); /* Bind CQs to endpoints */ ret = fi_ep_bind(gasnetc_ofi_rdma_epfd, &gasnetc_ofi_tx_cqfd->fid, FI_TRANSMIT | FI_RECV); GASNETC_OFI_CHECK_RET(ret, "fi_ep_bind for tx_cq to rdma_epfd failed"); ret = fi_ep_bind(gasnetc_ofi_request_epfd, &gasnetc_ofi_tx_cqfd->fid, FI_TRANSMIT); #if GASNETC_OFI_USE_MULTI_CQ if (ret == -FI_EINVAL) { // Provider doesn't want to let us share CQ GASNETI_TRACE_PRINTF(I, ("Allocating distinct reqtx_cqfd")); ret = fi_cq_open(gasnetc_ofi_domainfd, &tx_cq_attr, &gasnetc_ofi_reqtx_cqfd, NULL); GASNETC_OFI_CHECK_RET(ret, "fi_cq_open for reqtx_cqfd failed"); ret = fi_ep_bind(gasnetc_ofi_request_epfd, &gasnetc_ofi_reqtx_cqfd->fid, FI_TRANSMIT); } #endif GASNETC_OFI_CHECK_RET(ret, "fi_ep_bind for tx_cq to am request CQ failed"); ret = fi_ep_bind(gasnetc_ofi_reply_epfd, &gasnetc_ofi_tx_cqfd->fid, FI_TRANSMIT); #if GASNETC_OFI_USE_MULTI_CQ if (ret == -FI_EINVAL) { // Provider doesn't want to let us share CQ GASNETI_TRACE_PRINTF(I, ("Allocating distinct reptx_cqfd")); ret = fi_cq_open(gasnetc_ofi_domainfd, &tx_cq_attr, &gasnetc_ofi_reptx_cqfd, NULL); GASNETC_OFI_CHECK_RET(ret, "fi_cq_open for reptx_cqfd failed"); ret = fi_ep_bind(gasnetc_ofi_reply_epfd, &gasnetc_ofi_reptx_cqfd->fid, FI_TRANSMIT); } #endif GASNETC_OFI_CHECK_RET(ret, "fi_ep_bind for tx_cq to am reply CQ failed"); ret = fi_ep_bind(gasnetc_ofi_request_epfd, &gasnetc_ofi_request_cqfd->fid, FI_RECV); GASNETC_OFI_CHECK_RET(ret, "fi_ep_bind for am request cq to am_request_epfd failed"); ret = fi_ep_bind(gasnetc_ofi_reply_epfd, &gasnetc_ofi_reply_cqfd->fid, FI_RECV); GASNETC_OFI_CHECK_RET(ret, "fi_ep_bind for am reply cq to am_reply_epfd failed"); // Low-water mark for multi-receive buffer, if any if (maybe_multi_recv) { GASNETI_TRACE_PRINTF(I, ("Setting multi-recv low-water mark to %"PRIu64, min_multi_recv)); optval = min_multi_recv; ret = fi_setopt(&gasnetc_ofi_request_epfd->fid, FI_OPT_ENDPOINT, FI_OPT_MIN_MULTI_RECV, &optval, sizeof(optval)); GASNETC_OFI_CHECK_RET(ret, "fi_setopt for am request epfd failed"); gasneti_assert_uint(optval ,==, min_multi_recv); // documented as IN ret = fi_setopt(&gasnetc_ofi_reply_epfd->fid, FI_OPT_ENDPOINT, FI_OPT_MIN_MULTI_RECV, &optval, sizeof(optval)); GASNETC_OFI_CHECK_RET(ret, "fi_setopt for am reply epfd failed"); gasneti_assert_uint(optval ,==, min_multi_recv); // documented as IN } ofi_setup_address_vector(); /* Enable endpoints */ ret = fi_enable(gasnetc_ofi_rdma_epfd); GASNETC_OFI_CHECK_RET(ret, "fi_enable for rdma failed"); ret = fi_enable(gasnetc_ofi_request_epfd); GASNETC_OFI_CHECK_RET(ret, "fi_enable for am request ep failed"); ret = fi_enable(gasnetc_ofi_reply_epfd); GASNETC_OFI_CHECK_RET(ret, "fi_enable for am reply ep failed"); ofi_exchange_addresses(); // Don't allow libfabric to free() our strings hints->domain_attr->name = NULL; hints->fabric_attr->prov_name = NULL; fi_freeinfo(hints); if (GASNETC_OFI_HAS_MR_PROV_KEY) { // 'static' ensures valgrind does not consider this allocation "possibly lost" static uint64_t **tmp; tmp = gasneti_calloc(1+GASNET_MAXEPS, sizeof(uint64_t*)); gasnetc_remote_key_tbl = tmp + 1; // places aux seg keys at gasnetc_remote_key_tbl[-1] } receive_region_size = multirecv_buff_size*num_multirecv_buffs; receive_region_start = gasnetc_alloc_pages(receive_region_size, "for multi-recv buffers"); metadata_array = gasneti_malloc(sizeof(gasnetc_ofi_recv_metadata_t)*num_multirecv_buffs); { char valstr[16]; gasneti_format_number(multirecv_buff_size*num_multirecv_buffs, valstr, sizeof(valstr), 1); GASNETI_TRACE_PRINTF(I, ("Allocated %s for %"PRIuSZ " multi-recv buffers", valstr, num_multirecv_buffs)); } for(i = 0; i < num_multirecv_buffs; i++) { gasnetc_ofi_recv_metadata_t* metadata = metadata_array + i; metadata->iov.iov_base = ((char*)receive_region_start) + multirecv_buff_size*i; metadata->iov.iov_len = multirecv_buff_size; metadata->am_buff_msg.msg_iov = &metadata->iov; metadata->am_buff_msg.iov_count = 1; metadata->am_buff_msg.addr = FI_ADDR_UNSPEC; metadata->am_buff_msg.desc = NULL; metadata->am_buff_msg.context = gasnetc_recv_ctxt_to_op_ctxt(&metadata->am_buff_ctxt); metadata->am_buff_msg.data = 0; metadata->am_buff_ctxt.final_cntr = 0; metadata->am_buff_ctxt.event_cntr = 0; gasnetc_paratomic_set(&metadata->am_buff_ctxt.consumed_cntr, 0, 0); // Post multi-recv buffers for Active Messages struct fid_ep *epfd = (i % 2 == 0) ? gasnetc_ofi_request_epfd : gasnetc_ofi_reply_epfd; ret = fi_recvmsg(epfd, &metadata->am_buff_msg, maybe_multi_recv); GASNETC_OFI_CHECK_RET(ret, "fi_recvmsg failed"); } /* Allocate bounce buffers*/ bounce_region_size = GASNETI_PAGE_ALIGNUP(ofi_num_bbufs * ofi_bbuf_size); bounce_region_start = gasnetc_alloc_pages(bounce_region_size, "for bounce buffers"); { char valstr[16]; gasneti_format_number(bounce_region_size, valstr, sizeof(valstr), 1); GASNETI_TRACE_PRINTF(I, ("Allocated %s for %"PRIuSZ " bounce buffers", valstr, ofi_num_bbufs)); } /* Progress backwards so that when these buffers are added to the stack, they * will come off of it in order by address */ char* buf = (char*)bounce_region_start + (ofi_num_bbufs-1)*ofi_bbuf_size; for (i = 0; i < (int)ofi_num_bbufs; i++) { gasneti_assert(buf); gasnetc_ofi_bounce_buf_t* container = gasneti_malloc(sizeof(gasnetc_ofi_bounce_buf_t)); container->buf = buf; gasneti_lifo_push(&ofi_bbuf_pool, container); buf -= ofi_bbuf_size; } // Accounting to prevent dynamic over-allocation gasneti_semaphore_init(&num_unallocated_request_buffers, max_am_request_buffs - num_init_am_request_buffs, 0); gasneti_semaphore_init(&num_unallocated_reply_buffers, max_am_reply_buffs - num_init_am_reply_buffs, 0); size_t am_buf_alloc_sz = GASNETI_ALIGNUP(GASNETC_SIZEOF_AM_BUF_T, GASNETI_MEDBUF_ALIGNMENT); size_t total_init = num_init_am_request_buffs + num_init_am_reply_buffs; am_buffers_region_size = GASNETI_PAGE_ALIGNUP(total_init*am_buf_alloc_sz); am_buffers_region_start = gasnetc_alloc_pages(am_buffers_region_size, "for AM send buffers"); { char valstr[16]; gasneti_format_number(am_buffers_region_size, valstr, sizeof(valstr), 1); GASNETI_TRACE_PRINTF(I, ("Allocated %s for %"PRIuSZ " (out of max %"PRIuSZ ") AM send buffers", valstr, total_init, max_am_request_buffs + max_am_reply_buffs)); } /* Add the buffers to the stack in reverse order to be friendly to the cache. */ gasnetc_ofi_send_ctxt_t * bufp = (gasnetc_ofi_send_ctxt_t*) ((uintptr_t)am_buffers_region_start + am_buf_alloc_sz*(total_init - 1)); GASNETC_STAT_EVENT_VAL(ALLOC_REQ_BUFF, num_init_am_request_buffs); for (i = 0; i < (int)num_init_am_request_buffs; i++) { bufp->pool = &ofi_am_request_pool; gasneti_lifo_push(bufp->pool, bufp); bufp = (gasnetc_ofi_send_ctxt_t*)((uintptr_t)bufp - am_buf_alloc_sz); } GASNETC_STAT_EVENT_VAL(ALLOC_REP_BUFF, num_init_am_reply_buffs); for (i = 0; i < (int)num_init_am_reply_buffs; i++) { bufp->pool = &ofi_am_reply_pool; gasneti_lifo_push(bufp->pool, bufp); bufp = (gasnetc_ofi_send_ctxt_t*)((uintptr_t)bufp - am_buf_alloc_sz); } gasnetc_ofi_inited = 1; return GASNET_OK; } /*------------------------------------------------ * OFI conduit exit function * ----------------------------------------------*/ void gasnetc_ofi_exit(void) { if (!gasnetc_ofi_inited) return; #if GASNET_PAR && GASNETC_OFI_USE_THREAD_DOMAIN // Attempt to obtain (and *never* release) the big_lock in bounded time const uint64_t timeout_ns = 10 * 1000000000L; // TODO: arbitrary 10s const gasneti_tick_t t_start = gasneti_ticks_now(); GASNETI_SPIN_WHILE(EBUSY == GASNETC_OFI_TRYLOCK(&gasnetc_ofi_locks.big_lock), { if (timeout_ns < gasneti_ticks_to_ns(gasneti_ticks_now() - t_start)) return; }); #endif // (attempt to) cancel multi-recv operations for Active Messages for (int i = 0; i < num_multirecv_buffs; i++) { gasnetc_ofi_recv_ctxt_t *am_buff_ctxt = &metadata_array[i].am_buff_ctxt; struct fid_ep *epfd = (i % 2 == 0) ? gasnetc_ofi_request_epfd : gasnetc_ofi_reply_epfd; (void) fi_cancel(&epfd->fid, gasnetc_recv_ctxt_to_op_ctxt(am_buff_ctxt)); } #if GASNETI_CLIENT_THREADS /* Unsafe to free resources if other threads may be using them */ #else gasneti_free(metadata_array); gasneti_munmap(receive_region_start, receive_region_size); // TODO: when/if the following are proven safe //gasneti_munmap(bounce_region_start, bounce_region_size); //gasneti_munmap(am_buffers_region_start, am_buffers_region_size); #endif if(fi_close(&gasnetc_ofi_reply_epfd->fid)!=FI_SUCCESS) { gasneti_fatalerror("close am reply epfd failed\n"); } if(fi_close(&gasnetc_ofi_request_epfd->fid)!=FI_SUCCESS) { gasneti_fatalerror("close am request epfd failed\n"); } #if GASNET_SEGMENT_FAST || GASNET_SEGMENT_LARGE { // TODO: loop over clients gasneti_Client_t i_client = gasneti_import_client(gasneti_THUNK_CLIENT); for (gex_EP_Index_t ep_idx = 0; ep_idx < GASNET_MAXEPS; ++ep_idx) { gasneti_EP_t i_ep = i_client->_ep_tbl[ep_idx]; if (i_ep) gasnetc_ep_unbindsegment(i_ep); } } #else if(gasnetc_segment_mrfd && (fi_close(&gasnetc_segment_mrfd->fid)!=FI_SUCCESS)) { gasneti_fatalerror("close mrfd failed\n"); } #endif if (gasnetc_auxseg_mrfd && (fi_close(&gasnetc_auxseg_mrfd->fid) != FI_SUCCESS)) { gasneti_fatalerror("close auxseg mrfd failed\n"); } // This must follow closing MRs if bound due to FI_MR_ENDPOINT if(fi_close(&gasnetc_ofi_rdma_epfd->fid)!=FI_SUCCESS) { gasneti_fatalerror("close rdma epfd failed\n"); } if(fi_close(&gasnetc_ofi_tx_cqfd->fid)!=FI_SUCCESS) { gasneti_fatalerror("close am tx_cqfd failed\n"); } #if GASNETC_OFI_USE_MULTI_CQ if(gasnetc_ofi_reqtx_cqfd && fi_close(&gasnetc_ofi_reqtx_cqfd->fid)!=FI_SUCCESS) { gasneti_fatalerror("close am reqtx_cqfd failed\n"); } if(gasnetc_ofi_reptx_cqfd && fi_close(&gasnetc_ofi_reptx_cqfd->fid)!=FI_SUCCESS) { gasneti_fatalerror("close am reptx_cqfd failed\n"); } #endif if(fi_close(&gasnetc_ofi_reply_cqfd->fid)!=FI_SUCCESS) { gasneti_fatalerror("close am reply cqfd failed\n"); } if(fi_close(&gasnetc_ofi_request_cqfd->fid)!=FI_SUCCESS) { gasneti_fatalerror("close am request cqfd failed\n"); } for (int i = 0; i < NUM_OFI_ENDPOINTS; ++i) { if(fi_close(&gasnetc_ofi_avfd[i]->fid)!=FI_SUCCESS) { gasneti_fatalerror("close av[%d] failed", i); } gasneti_free(gasnetc_addr_map[i]); } if(fi_close(&gasnetc_ofi_domainfd->fid)!=FI_SUCCESS) { gasneti_fatalerror("close domainfd failed\n"); } if(fi_close(&gasnetc_ofi_fabricfd->fid)!=FI_SUCCESS) { gasneti_fatalerror("close fabricfd failed\n"); } if (GASNETC_OFI_HAS_MR_PROV_KEY) { // table indices run [-1, GASNET_MAXEPS) for (int epidx = -1; epidx < GASNET_MAXEPS; ++epidx) { gasneti_free(gasnetc_remote_key_tbl[epidx]); } gasneti_free(gasnetc_remote_key_tbl - 1); } } /*------------------------------------------------ * OFI conduit callback functions * ----------------------------------------------*/ /* Handle Active Messages */ GASNETI_INLINE(gasnetc_ofi_handle_am) void gasnetc_ofi_handle_am(gasnetc_ofi_am_send_buf_t *header, int isreq, size_t msg_len, uint64_t cq_data) { uint8_t *addr; int handler = header->handler; const gex_AM_Entry_t * const handler_entry = &gasnetc_handler[handler]; gex_AM_Fn_t handler_fn = handler_entry->gex_fnptr; gex_AM_Arg_t *args; int numargs = header->argnum; int data_offset; gex_Token_t token = (gex_Token_t)header; size_t nbytes; gasneti_assert_uint(isreq ,==, header->isreq); switch(header->type) { case OFI_AM_SHORT: args = (gex_AM_Arg_t *)header->buf.short_buf.data; GASNETI_RUN_HANDLER_SHORT(isreq, handler, handler_fn, token, args, numargs); break; case OFI_AM_MEDIUM: data_offset = GASNETI_ALIGNUP(sizeof(gex_AM_Arg_t)*numargs, GASNETI_MEDBUF_ALIGNMENT); args = (gex_AM_Arg_t *)header->buf.medium_buf.data; addr = header->buf.medium_buf.data + data_offset; nbytes = msg_len - header->overhead; GASNETI_RUN_HANDLER_MEDIUM(isreq, handler, handler_fn, token, args, numargs, addr, nbytes); break; case OFI_AM_LONG: data_offset = sizeof(gex_AM_Arg_t)*numargs; args = (gex_AM_Arg_t *)header->buf.long_buf.data; addr = header->buf.long_buf.dest_ptr; nbytes = cq_data; GASNETI_RUN_HANDLER_LONG(isreq, handler, handler_fn, token, args, numargs, addr, nbytes); break; case OFI_AM_LONG_MEDIUM: data_offset = sizeof(gex_AM_Arg_t)*numargs; args = (gex_AM_Arg_t *)header->buf.long_buf.data; addr = header->buf.long_buf.dest_ptr; nbytes = cq_data; GASNETI_MEMCPY_SAFE_EMPTY(addr, header->buf.long_buf.data + data_offset, nbytes); GASNETI_RUN_HANDLER_LONG(isreq, handler, handler_fn, token, args, numargs, addr, nbytes); break; default: gasneti_unreachable_error(("undefined header type in gasnetc_ofi_handle_am: %d", header->type)); } } // Handle completion of a simple blocking operation void gasnetc_ofi_handle_blocking(void *op_context, unsigned int aux) { gasnetc_ofi_blocking_op_ctxt_t *ptr = gasneti_container_of(op_context, gasnetc_ofi_blocking_op_ctxt_t, callback); ptr->complete = 1; } // Handle RDMA completion as the initiator void gasnetc_ofi_handle_rdma(void *op_context, unsigned int aux) { gasnetc_ofi_nb_op_ctxt_t *ptr = gasneti_container_of(op_context, gasnetc_ofi_nb_op_ctxt_t, callback); int alc = aux & GASNETC_CTXT_IS_ALC; switch (ptr->type) { case OFI_TYPE_EGET: { gasnete_eop_t *eop = gasneti_container_of(ptr, gasnete_eop_t, ofi); gasnete_eop_check(eop); GASNETE_EOP_MARKDONE(eop); } break; case OFI_TYPE_EPUT: { gasnete_eop_t *eop = gasneti_container_of(ptr, gasnete_eop_t, ofi); gasnete_eop_check(eop); if (alc) GASNETE_EOP_LC_FINISH(eop); GASNETE_EOP_MARKDONE(eop); } break; case OFI_TYPE_IGET: { gasnete_iop_t *iop = gasneti_container_of(ptr, gasnete_iop_t, get_ofi); gasnete_iop_check(iop); GASNETE_IOP_CNT_FINISH(iop, get, 1, GASNETI_ATOMIC_REL); } break; case OFI_TYPE_IPUT: { gasnete_iop_t *iop = gasneti_container_of(ptr, gasnete_iop_t, put_ofi); gasnete_iop_check(iop); if (alc) GASNETE_IOP_LC_FINISH(iop); GASNETE_IOP_CNT_FINISH(iop, put, 1, GASNETI_ATOMIC_NONE); } break; default: gasneti_unreachable_error(("undefined OP type in gasnetc_ofi_rdma_poll: %d", ptr->type)); } } // Allocate an AM send buffer, spin-polling if necessary/allowed // TODO: should Reply be permitted to borrow from Request pool? GASNETI_INLINE(gasnetc_ofi_get_am_header) gasnetc_ofi_send_ctxt_t *gasnetc_ofi_get_am_header(int isreq, gex_Flags_t flags GASNETI_THREAD_FARG) { const gex_Flags_t imm = flags & GEX_FLAG_IMMEDIATE; gasneti_lifo_head_t* pool = isreq ? &ofi_am_request_pool : &ofi_am_reply_pool; gasnetc_ofi_send_ctxt_t *header = gasneti_lifo_pop(pool); #if GASNETC_IMMEDIATE_AMPOLLS if (header) goto done; #else if (header || imm) goto done; #endif // Poll only the tx queue and retry the pool before (maybe) allocating another buffer gasnetc_ofi_tx_poll(); header = gasneti_lifo_pop(pool); if (header) goto done; // Allocate another unless doing so would exceed the max gasneti_semaphore_t* sema = isreq ? &num_unallocated_request_buffers : &num_unallocated_reply_buffers; if (gasneti_semaphore_trydown(sema)) { // TODO: cache-align and allocate more than one at a time header = gasneti_malloc_aligned(GASNETI_MEDBUF_ALIGNMENT, GASNETC_SIZEOF_AM_BUF_T); gasneti_leak_aligned(header); header->pool = pool; if (isreq) { GASNETC_STAT_EVENT_VAL(ALLOC_REQ_BUFF, 1); } else { GASNETC_STAT_EVENT_VAL(ALLOC_REP_BUFF, 1); } goto done; } #if GASNETC_IMMEDIATE_AMPOLLS if (imm) return NULL; #else gasneti_assert(!imm); #endif // Spin-poll until a buffer is free // These are "DOUNTIL" since already know buffer pool is empty if (isreq) { GASNETI_SPIN_DOUNTIL((header = gasneti_lifo_pop(pool)), GASNETC_OFI_POLL_SELECTIVE(OFI_POLL_ALL)); } else { GASNETI_SPIN_DOUNTIL((header = gasneti_lifo_pop(pool)), GASNETC_OFI_POLL_SELECTIVE(OFI_POLL_REPLY)); } done: if (header) { GASNETC_STAT_EVENT(ALLOC_HEADER); gasneti_assert_uint((uintptr_t)&header->sendbuf.buf.medium_buf.data % GASNETI_MEDBUF_ALIGNMENT ,==, 0); } return header; } // Release unused AM send buffer #define gasnetc_ofi_free_am_header(header) do { \ gasneti_lifo_push(header->pool, header); \ GASNETC_STAT_EVENT(FREE_HEADER); \ } while(0) // Process completed AM send // TODO: Async LC handling goes here void gasnetc_ofi_am_send_complete(gasnetc_ofi_send_ctxt_t *header) { gasnetc_ofi_free_am_header(header); } void gasnetc_ofi_handle_bounce_rdma(void *op_context, unsigned int aux) { gasnetc_ofi_bounce_op_ctxt_t *op = gasneti_container_of(op_context, gasnetc_ofi_bounce_op_ctxt_t, callback); if (gasnetc_paratomic_decrement_and_test(&op->cntr, 0)) { gasnetc_ofi_bounce_buf_t * bbuf_to_return; while (NULL != (bbuf_to_return = gasneti_lifo_pop(&op->bbuf_list))) gasneti_lifo_push(&ofi_bbuf_pool, bbuf_to_return); /* These completions will always be RDMA, so call the callback directly */ gasnetc_ofi_handle_rdma(gasnetc_rdma_ctxt_to_op_ctxt(op->orig_op,0),0); gasneti_lifo_push(&ofi_bbuf_ctxt_pool, op); } } GASNETI_INLINE(gasnetc_ofi_get_bounce_ctxt) gasnetc_ofi_bounce_op_ctxt_t* gasnetc_ofi_get_bounce_ctxt(void) { gasnetc_ofi_bounce_op_ctxt_t* ctxt = gasneti_lifo_pop(&ofi_bbuf_ctxt_pool); if (NULL == ctxt) { ctxt = gasneti_calloc(1,sizeof(gasnetc_ofi_bounce_op_ctxt_t)); ctxt->callback = gasnetc_ofi_handle_bounce_rdma; gasneti_lifo_init(&ctxt->bbuf_list); gasneti_leak(ctxt); } return ctxt; } /*------------------------------------------------ * Pre-post or pin-down memory * ----------------------------------------------*/ // Local registration of segment memory int gasnetc_ep_bindsegment(gasneti_EP_t i_ep, gasneti_Segment_t segment) { GASNETI_TRACE_PRINTF(C,("Binding segment [%p, %p) to EP %d", segment->_addr, segment->_ub, i_ep->_index)); void *segbase; uintptr_t segsize; struct fid_mr** mrfd_p; gasnetc_EP_t c_ep = (gasnetc_EP_t)i_ep; #if GASNET_SEGMENT_FAST || GASNET_SEGMENT_LARGE gasneti_assert(segment); segbase = segment->_addr; segsize = segment->_size; gasneti_assert(c_ep); mrfd_p = &c_ep->mrfd; #else if (!segment) { segbase = (void *)0; segsize = UINT64_MAX; mrfd_p = &gasnetc_segment_mrfd; } else if (gasneti_i_segment_kind_is_host((gasneti_Segment_t) segment)) { // No additional host memory registration required return GASNET_OK; } else { gasneti_unreachable_error(("ofi-conduit does not yet support non-host memory kinds in GASNET_SEGMENT_EVERYTHING mode")); } #endif // TBD: do we want local READ or WRITE in access? will atomics need them, for instance? struct iovec iov = { segbase, segsize }; uint64_t access = FI_REMOTE_READ | FI_REMOTE_WRITE; uint64_t key = GASNETC_EPIDX_TO_KEY(c_ep->_index); uint64_t flags = 0; struct fi_mr_attr attr = {0}; attr.mr_iov = &iov; attr.iov_count = 1; attr.access = access; attr.requested_key = key; attr.context = NULL; #if GASNET_HAVE_MK_CLASS_MULTIPLE gex_MK_Class_t mk_class; if (segment->_kind == GEX_MK_HOST) { gasneti_static_assert(FI_HMEM_SYSTEM == 0); mk_class = GEX_MK_CLASS_HOST; c_ep->device_only_segment = 0; } else { gasneti_MK_t i_mk = gasneti_import_mk(segment->_kind); mk_class = i_mk->_mk_class; switch (mk_class) { #if GASNET_HAVE_MK_CLASS_CUDA_UVA case GEX_MK_CLASS_CUDA_UVA: attr.iface = FI_HMEM_CUDA; attr.device.cuda = (int)(uintptr_t)i_mk->_mk_conduit; c_ep->device_only_segment = 1; #ifdef FI_HMEM_DEVICE_ONLY flags |= FI_HMEM_DEVICE_ONLY; #endif break; #endif #if GASNET_HAVE_MK_CLASS_HIP case GEX_MK_CLASS_HIP: attr.iface = FI_HMEM_ROCR; c_ep->device_only_segment = 0; break; #endif #if GASNET_HAVE_MK_CLASS_ZE case GEX_MK_CLASS_ZE: attr.iface = FI_HMEM_ZE; attr.device.ze = (int)(uintptr_t)i_mk->_mk_conduit; c_ep->device_only_segment = 1; #ifdef FI_HMEM_DEVICE_ONLY flags |= FI_HMEM_DEVICE_ONLY; #endif break; #endif default: gasneti_unreachable_error(("undefined or unsupported gex_MK_Class_t value: %d", mk_class)); break; } } #endif gasneti_assert_zeroret( gasneti_mk_segment_context_push(segment) ); #if GASNETC_HAVE_FI_MR_REG_ATTR const char *reg_fn = "fi_mr_regattr"; int ret = fi_mr_regattr(gasnetc_ofi_domainfd, &attr, flags, mrfd_p); #else const char *reg_fn = "fi_mr_reg"; int ret = fi_mr_reg(gasnetc_ofi_domainfd, attr.mr_iov->iov_base, attr.mr_iov->iov_len, attr.access, attr.offset, attr.requested_key, flags, mrfd_p, attr.context); #endif gasneti_assert_zeroret( gasneti_mk_segment_context_pop(segment) ); if (ret) { if (gasneti_VerboseErrors) { gasneti_console_message("WARNING", "Unexpected error %d (%s) from %s() when binding segment [%p, %p) to EP %d", ret, fi_strerror(-ret), reg_fn, segment->_addr, segment->_ub, i_ep->_index); #if GASNET_HAVE_MK_CLASS_ZE if ((attr.iface == FI_HMEM_ZE) && (ret == -EFAULT) && (segsize > 32768)) { gasneti_console_message("NOTICE", "This failure looks like a known issue in ZE memory kinds support. " "See docs/memory_kinds_implementation.md in the GASNet-EX sources for more information."); } #endif } // TODO: can we do better sorting out failure modes? return GASNET_ERR_RESOURCE; } if (segment && ! GASNETC_OFI_HAS_MR_PROV_KEY) { gasneti_assert_uint(key ,==, fi_mr_key(*mrfd_p)); } #ifdef FI_MR_ENDPOINT if (gasnetc_fi_mr_endpoint) { ret = fi_mr_bind(*mrfd_p, &gasnetc_ofi_rdma_epfd->fid, 0); GASNETC_OFI_CHECK_RET(ret, "fi_mr_bind failed"); ret = fi_mr_enable(*mrfd_p); GASNETC_OFI_CHECK_RET(ret, "fi_mr_enable failed"); } #endif return GASNET_OK; } int gasnetc_ep_unbindsegment(gasneti_EP_t i_ep) { gasneti_assert(i_ep); GASNETI_TRACE_PRINTF(C,("Unbinding segment from EP %d", i_ep->_index)); #if GASNET_SEGMENT_FAST || GASNET_SEGMENT_LARGE gasnetc_EP_t c_ep = (gasnetc_EP_t)i_ep; if (c_ep->mrfd) { int ret = fi_close(&c_ep->mrfd->fid); GASNETC_OFI_CHECK_RET(ret, "fi_close(ep->mrfd) failed"); c_ep->mrfd = NULL; c_ep->_segment = NULL; } #endif return GASNET_OK; } // Exchange memory keys with other nodes, if needed void gasnetc_segment_exchange(gex_TM_t tm, gex_EP_t *eps, size_t num_eps) { if (!GASNETC_OFI_HAS_MR_PROV_KEY) return; // nothing to be done // Exchange a 64-bit mr key struct exchg_data { gex_EP_Location_t loc; uint64_t mr_key; } *local, *global, *p; size_t elem_sz = sizeof(struct exchg_data); local = gasneti_malloc(num_eps * elem_sz); // Pack p = local; for (gex_Rank_t i = 0; i < num_eps; ++i) { gasnetc_EP_t c_ep = (gasnetc_EP_t) gasneti_import_ep_valid(eps[i]); if (! c_ep->_segment) continue; p->loc.gex_rank = gasneti_mynode; p->loc.gex_ep_index = c_ep->_index; gasneti_assert(c_ep->mrfd); p->mr_key = fi_mr_key(c_ep->mrfd); ++p; } size_t local_bytes = elem_sz * (p - local); size_t total_bytes = gasneti_blockingRotatedExchangeV(tm, local, local_bytes, (void**)&global, NULL); size_t total_eps = total_bytes / elem_sz; gasneti_free(local); // Unpack p = global; for (size_t i = 0; i < total_eps; ++i, ++p) { gex_EP_Index_t idx = p->loc.gex_ep_index; uint64_t *key_array = gasnetc_remote_key_tbl[idx]; if_pf (!key_array) { static gasneti_mutex_t lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&lock); key_array = gasnetc_remote_key_tbl[idx]; if (!key_array) { key_array = gasneti_calloc(gasneti_nodes, sizeof(uint64_t)); gasneti_local_wmb(); gasnetc_remote_key_tbl[idx] = key_array; } gasneti_mutex_unlock(&lock); } else { gasneti_local_rmb(); } gex_Rank_t jobrank = p->loc.gex_rank; uint64_t key = p->mr_key; gasneti_assert(key_array[jobrank] == 0 || key_array[jobrank] == p->mr_key); key_array[jobrank] = p->mr_key; } gasneti_free(global); } void gasnetc_auxseg_register(gasnet_seginfo_t si) { int ret = fi_mr_reg(gasnetc_ofi_domainfd, si.addr, si.size, FI_REMOTE_READ | FI_REMOTE_WRITE, 0ULL, GASNETC_AUX_KEY, 0ULL, &gasnetc_auxseg_mrfd, NULL); GASNETC_OFI_CHECK_RET(ret, "fi_mr_reg for aux_seg failed"); #ifdef FI_MR_ENDPOINT if (gasnetc_fi_mr_endpoint) { ret = fi_mr_bind(gasnetc_auxseg_mrfd, &gasnetc_ofi_rdma_epfd->fid, 0); GASNETC_OFI_CHECK_RET(ret, "fi_mr_bind failed for aux_seg"); ret = fi_mr_enable(gasnetc_auxseg_mrfd); GASNETC_OFI_CHECK_RET(ret, "fi_mr_enable failed for aux_seg"); } #endif if (GASNETC_OFI_HAS_MR_PROV_KEY) { // Provider was not required to honor our key, so we exchange them uint64_t mr_key = fi_mr_key(gasnetc_auxseg_mrfd); uint64_t *aux_keys = gasneti_malloc(gasneti_nodes * sizeof(uint64_t)); gasneti_bootstrapExchange(&mr_key, sizeof(mr_key), aux_keys); gasneti_assert(! gasnetc_remote_key_tbl[-1]); gasnetc_remote_key_tbl[-1] = aux_keys; } else { gasneti_assert_uint(GASNETC_AUX_KEY ,==, fi_mr_key(gasnetc_auxseg_mrfd)); } } /*------------------------------------------------ * OFI conduit network poll function * ----------------------------------------------*/ // TX progress function: Handles either AM or RDMA outgoing operations // Returns the number of completions processed GASNETI_INLINE(gasnetc_ofi_tx_poll_one) int gasnetc_ofi_tx_poll_one(struct fid_cq* cqfd) { struct fi_cq_entry re[GASNETC_OFI_NUM_COMPLETIONS]; struct fi_cq_err_entry e; /* Read from Completion Queue */ /* In the case of using one global lock, a try-lock could prevent progress from * occurring if the big lock is being held often by another thread. Just lock in * this case */ #if GASNETC_OFI_USE_THREAD_DOMAIN GASNETC_OFI_LOCK(&gasnetc_ofi_locks.tx_cq); #else /* If another thread already has the queue lock, return as it is already * processing the queue */ if(EBUSY == GASNETC_OFI_TRYLOCK(&gasnetc_ofi_locks.tx_cq)) return 0; #endif int ret = fi_cq_read(cqfd, (void *)&re, GASNETC_OFI_NUM_COMPLETIONS); GASNETC_OFI_UNLOCK(&gasnetc_ofi_locks.tx_cq); if (ret != -FI_EAGAIN) { if_pf (ret < 0) { if (-FI_EAVAIL == ret) { GASNETC_OFI_LOCK_EXPR(&gasnetc_ofi_locks.tx_cq, gasnetc_fi_cq_readerr(cqfd, &e ,0)); if_pf (gasnetc_is_exit_error(e)) return 0; gasnetc_ofi_fatalerror("fi_cq_read for tx_poll failed with error", -e.err); } else gasnetc_ofi_fatalerror("fi_cq_read for tx_poll returned unexpected error", ret); } else { for (int i = 0; i < ret; i++) { void *op_context = re[i].op_context; if (! ((uintptr_t)op_context & GASNETC_CTXT_IS_RMA)) { #if GASNET_DEBUG gasnetc_paratomic_decrement(&pending_am, 0); #endif gasnetc_ofi_send_ctxt_t *header = gasnetc_op_ctxt_to_send_ctxt(op_context); gasnetc_ofi_am_send_complete(header); } else { #if GASNET_DEBUG gasnetc_paratomic_decrement(&pending_rdma, 0); #endif uintptr_t aux = (uintptr_t)op_context & ~GASNETC_CTXT_MASK; gasnetc_op_ctxt_run_rdma_callback(op_context, aux); } } } return ret; } gasneti_assert(ret == -FI_EAGAIN); return 0; } void gasnetc_ofi_tx_poll(void) { int rc = gasnetc_ofi_tx_poll_one(gasnetc_ofi_tx_cqfd); GASNETI_TRACE_EVENT_VAL(X, CQ_READ_TX, rc); #if GASNETC_OFI_USE_MULTI_CQ // TODO: use poll sets for providers/platforms which support them if (gasnetc_ofi_reqtx_cqfd) { rc = gasnetc_ofi_tx_poll_one(gasnetc_ofi_reqtx_cqfd); GASNETI_TRACE_EVENT_VAL(X, CQ_READ_REQTX, rc); } if (gasnetc_ofi_reptx_cqfd) { rc = gasnetc_ofi_tx_poll_one(gasnetc_ofi_reptx_cqfd); GASNETI_TRACE_EVENT_VAL(X, CQ_READ_REPTX, rc); } #endif } GASNETI_INLINE(gasnetc_ofi_am_recv_poll) void gasnetc_ofi_am_recv_poll(int is_request) { #if GASNETC_OFI_RETRY_RECVMSG static gasnetc_ofi_recv_ctxt_t *buffs_to_retry[2] = { NULL, NULL }; #endif struct fid_ep * ep; struct fid_cq * cq; gasneti_atomic_t * lock_p; if (is_request) { ep = gasnetc_ofi_request_epfd; cq = gasnetc_ofi_request_cqfd; #if GASNET_PAR && !GASNETC_OFI_USE_THREAD_DOMAIN lock_p = &gasnetc_ofi_locks.rx_request_cq; #endif } else { ep = gasnetc_ofi_reply_epfd; cq = gasnetc_ofi_reply_cqfd; #if GASNET_PAR && !GASNETC_OFI_USE_THREAD_DOMAIN lock_p = &gasnetc_ofi_locks.rx_reply_cq; #endif } int count; for (count = 0; count < GASNETC_OFI_EVENTS_PER_POLL; ++count) { if(EBUSY == GASNETC_OFI_PAR_TRYLOCK(lock_p)) break; /* Read from Completion Queue */ struct fi_cq_data_entry re = {0}; int ret = fi_cq_read(cq, (void *)&re, 1); if (ret == -FI_EAGAIN) { GASNETC_OFI_PAR_UNLOCK(lock_p); break; } if_pf (ret < 0) { struct fi_cq_err_entry e = {0}; gasnetc_fi_cq_readerr(cq, &e ,0); GASNETC_OFI_PAR_UNLOCK(lock_p); if_pf (gasnetc_is_exit_error(e)) goto exiting; gasnetc_ofi_fatalerror("fi_cq_read for am_recv_poll failed with error", -e.err); } gasnetc_ofi_recv_ctxt_t *header = gasnetc_op_ctxt_to_recv_ctxt(re.op_context); gasnetc_ofi_recv_metadata_t* metadata = gasneti_container_of(header, gasnetc_ofi_recv_metadata_t, am_buff_ctxt); /* Count number of completions read for this posted buffer */ header->event_cntr++; #if GASNET_TRACE { int buffer_num = metadata - metadata_array; uint64_t event_num = header->event_cntr - 1; uintptr_t offset = (uintptr_t)re.buf - (uintptr_t)metadata->iov.iov_base; GASNETI_TRACE_PRINTF(D,("fi_cq_read(%s) %d:%"PRIu64"%s%s", is_request?"req":"rep", buffer_num, event_num, (re.flags & FI_RECV)?gasneti_dynsprintf(" RECV@%"PRIuPTR"+%"PRIuSZ, offset, re.len) :"", (re.flags & FI_MULTI_RECV)?" UNLINK":"")); } #endif /* Record the total number of completions read */ if_pf (re.flags & FI_MULTI_RECV) { header->final_cntr = header->event_cntr; } GASNETC_OFI_PAR_UNLOCK(lock_p); if_pt (re.flags & FI_RECV) { void *buf = maybe_multi_recv ? re.buf : metadata->iov.iov_base; // re.data contains the payload length for a Long gasnetc_ofi_handle_am(buf, is_request, re.len, re.data); } // Repost if either not using FI_MULTI_RECV // OR matched "final" and "consumed" counters indicate last AM handler has completed uint64_t consumed; if (!maybe_multi_recv || // Note: use of ACQ fence and comma operator ensure the read of final_cntr // cannot be "stale" relative to the increment of consumed_cntr. ((consumed = gasnetc_paratomic_add(&header->consumed_cntr, 1, GASNETI_ATOMIC_ACQ)), ((GASNETI_ATOMIC_MAX & header->final_cntr) == consumed))) { struct fi_msg* am_buff_msg = &metadata->am_buff_msg; GASNETC_OFI_LOCK(&gasnetc_ofi_locks.am_rx); int post_ret = fi_recvmsg(ep, am_buff_msg, maybe_multi_recv); GASNETC_OFI_UNLOCK(&gasnetc_ofi_locks.am_rx); #if GASNETC_OFI_RETRY_RECVMSG if_pf (post_ret == -FI_EAGAIN) { // TODO: add accounting (debug only?) to enable warnings if the // number of buffers posted to a given FI_MSG EP falls to some // threshold (possibly zero). GASNETC_OFI_PAR_LOCK(lock_p); header->next = buffs_to_retry[is_request]; buffs_to_retry[is_request] = header; post_ret = FI_SUCCESS; if (is_request) { GASNETI_TRACE_EVENT(C, RECVMSG_REQ_EAGAIN); } else { GASNETI_TRACE_EVENT(C, RECVMSG_REP_EAGAIN); } GASNETC_OFI_PAR_UNLOCK(lock_p); } #endif GASNETC_OFI_CHECK_RET(post_ret, "fi_recvmsg failed inside am_recv_poll"); if (is_request) { GASNETI_TRACE_EVENT(C, RECVMSG_REQ); } else { GASNETI_TRACE_EVENT(C, RECVMSG_REP); } } } #if GASNETC_OFI_RETRY_RECVMSG if_pf (buffs_to_retry[is_request]) { GASNETC_OFI_PAR_LOCK(lock_p); gasnetc_ofi_recv_ctxt_t **prev_p = &buffs_to_retry[is_request]; gasnetc_ofi_recv_ctxt_t *curr = *prev_p; while (curr) { gasnetc_ofi_recv_ctxt_t *next = curr->next; gasnetc_ofi_recv_metadata_t* metadata = gasneti_container_of(curr, gasnetc_ofi_recv_metadata_t, am_buff_ctxt); struct fi_msg* am_buff_msg = &metadata->am_buff_msg; #if GASNET_PAR && GASNETC_OFI_USE_THREAD_DOMAIN // avoid recursive acquire of big_lock int post_ret = fi_recvmsg(ep, am_buff_msg, maybe_multi_recv); #else GASNETC_OFI_LOCK(&gasnetc_ofi_locks.am_rx); int post_ret = fi_recvmsg(ep, am_buff_msg, maybe_multi_recv); GASNETC_OFI_UNLOCK(&gasnetc_ofi_locks.am_rx); #endif if (post_ret == -FI_EAGAIN) { prev_p = &curr->next; // retain curr in the list // TODO: "break" here if either (a) we can be certain that EAGAIN failure // is *not* buffer-specific or (b) we "rotate" the list to ensure that no // buffer can hold the head-of-list indefinitely. } else { GASNETC_OFI_CHECK_RET(post_ret, "deferred fi_recvmsg failed"); if (is_request) { GASNETI_TRACE_EVENT(C, RECVMSG_REQ_REPOST); } else { GASNETI_TRACE_EVENT(C, RECVMSG_REP_REPOST); } *prev_p = next; // remove curr from the list } curr = next; } GASNETC_OFI_PAR_UNLOCK(lock_p); } #endif exiting: if (is_request) { GASNETI_TRACE_EVENT_VAL(X, CQ_READ_REQ, count); } else { GASNETI_TRACE_EVENT_VAL(X, CQ_READ_REP, count); } } /* General progress function */ void gasnetc_ofi_poll(void) { gasnetc_ofi_tx_poll(); gasnetc_ofi_am_recv_poll(1); /* requests */ gasnetc_ofi_am_recv_poll(0); /* replies */ } /*------------------------------------------------ * OFI conduit am send functions * ----------------------------------------------*/ int gasnetc_ofi_am_send_short(gex_Rank_t dest, gex_AM_Index_t handler, int numargs, va_list argptr, int isreq, gex_Flags_t flags GASNETI_THREAD_FARG) { // Get a send buffer gasnetc_ofi_send_ctxt_t *header = gasnetc_ofi_get_am_header(isreq, flags GASNETI_THREAD_PASS); if (!header) { gasneti_assert(flags & GEX_FLAG_IMMEDIATE); return 1; } gasnetc_ofi_am_send_buf_t *sendbuf = &header->sendbuf; int ret = 0; struct fid_ep* ep; fi_addr_t am_dest; int poll_type; if (isreq) { ep = gasnetc_ofi_request_epfd; am_dest = gasnetc_fabric_addr(REQ, dest); poll_type = OFI_POLL_ALL; } else { ep = gasnetc_ofi_reply_epfd; am_dest = gasnetc_fabric_addr(REP, dest); poll_type = OFI_POLL_REPLY; } size_t len = sizeof(gex_AM_Arg_t) * numargs + offsetof(gasnetc_ofi_am_send_buf_t, buf.short_buf); len = GASNETI_ALIGNUP(len, GASNETI_MEDBUF_ALIGNMENT); // ensure multi-recv buffer alignment // Initialize metadata (handler, args, etc.) sendbuf->handler = (uint8_t) handler; sendbuf->sourceid = gasneti_mynode; sendbuf->type = OFI_AM_SHORT; sendbuf->argnum = numargs; sendbuf->isreq = isreq; gex_AM_Arg_t *arglist = (gex_AM_Arg_t*) sendbuf->buf.short_buf.data; for (int i = 0 ; i < numargs ; ++i) { arglist[i] = va_arg(argptr, gex_AM_Arg_t); } // Send if(len <= max_buffered_send) { OFI_INJECT_RETRY_IMM(&gasnetc_ofi_locks.am_tx, ret = fi_inject(ep, sendbuf, len, am_dest), poll_type, flags & GEX_FLAG_IMMEDIATE, out_imm); GASNETC_OFI_CHECK_RET(ret, "fi_inject for short am failed"); gasnetc_ofi_free_am_header(header); } else { struct fi_context *op_cxtx = gasnetc_send_ctxt_to_op_ctxt(header); OFI_INJECT_RETRY_IMM(&gasnetc_ofi_locks.am_tx, ret = fi_send(ep, sendbuf, len, NULL, am_dest, op_cxtx), poll_type, flags & GEX_FLAG_IMMEDIATE, out_imm); GASNETC_OFI_CHECK_RET(ret, "fi_send for short am failed"); #if GASNET_DEBUG gasnetc_paratomic_increment(&pending_am,0); #endif } return 0; out_imm: gasnetc_ofi_free_am_header(header); return 1; } GASNETI_INLINE(gasnetc_medium_prep) gasnetc_ofi_send_ctxt_t *gasnetc_medium_prep( int numargs, int isreq, gex_Flags_t flags GASNETI_THREAD_FARG) { // Get a send buffer gasnetc_ofi_send_ctxt_t *header = gasnetc_ofi_get_am_header(isreq, flags GASNETI_THREAD_PASS); if (!header) { gasneti_assert(flags & GEX_FLAG_IMMEDIATE); goto out_imm; } // Initialize available metadata gasnetc_ofi_am_send_buf_t *sendbuf = &header->sendbuf; sendbuf->sourceid = gasneti_mynode; sendbuf->type = OFI_AM_MEDIUM; sendbuf->isreq = isreq; sendbuf->argnum = numargs; out_imm: return header; } GASNETI_INLINE(gasnetc_medium_commit) int gasnetc_medium_commit( gasnetc_ofi_send_ctxt_t *header, const int fixed, gex_Rank_t dest, gex_AM_Index_t handler, const void *client_buf, size_t nbytes, /* data payload */ unsigned int numargs, va_list argptr, int isreq, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnetc_ofi_am_send_buf_t *sendbuf = &header->sendbuf; size_t args_len = GASNETI_ALIGNUP(sizeof(gex_AM_Arg_t)*numargs, GASNETI_MEDBUF_ALIGNMENT); if (fixed || client_buf) { GASNETI_MEMCPY_SAFE_EMPTY((uint8_t *)(sendbuf->buf.medium_buf.data) + args_len, client_buf, nbytes); } size_t len = offsetof(gasnetc_ofi_am_send_buf_t, buf.medium_buf) + args_len + nbytes; len = GASNETI_ALIGNUP(len, GASNETI_MEDBUF_ALIGNMENT); // ensure multi-recv buffer alignment // Remainder of metadata (handler, args, nbytes) sendbuf->handler = (uint8_t) handler; gex_AM_Arg_t *arglist = (gex_AM_Arg_t*) sendbuf->buf.medium_buf.data; for (int i = 0 ; i < numargs ; ++i) { arglist[i] = va_arg(argptr, gex_AM_Arg_t); } // Enable reconstruction of nbytes from message length size_t overhead = len - nbytes; sendbuf->overhead = overhead; gasneti_assert_uint(overhead ,<, 256); struct fid_ep* ep; fi_addr_t am_dest; int poll_type; if (isreq) { ep = gasnetc_ofi_request_epfd; am_dest = gasnetc_fabric_addr(REQ, dest); poll_type = OFI_POLL_ALL; } else { ep = gasnetc_ofi_reply_epfd; am_dest = gasnetc_fabric_addr(REP, dest); poll_type = OFI_POLL_REPLY; } // Send int ret; if(len <= max_buffered_send) { OFI_INJECT_RETRY_IMM(&gasnetc_ofi_locks.am_tx, ret = fi_inject(ep, sendbuf, len, am_dest), poll_type, flags & GEX_FLAG_IMMEDIATE, out_imm); GASNETC_OFI_CHECK_RET(ret, "fi_inject for medium am failed"); gasnetc_ofi_free_am_header(header); } else { struct fi_context *op_cxtx = gasnetc_send_ctxt_to_op_ctxt(header); OFI_INJECT_RETRY_IMM(&gasnetc_ofi_locks.am_tx, ret = fi_send(ep, sendbuf, len, NULL, am_dest, op_cxtx), poll_type, flags & GEX_FLAG_IMMEDIATE, out_imm); GASNETC_OFI_CHECK_RET(ret, "fi_send for medium am failed"); #if GASNET_DEBUG gasnetc_paratomic_increment(&pending_am,0); #endif } return 0; out_imm: gasneti_assert(flags & GEX_FLAG_IMMEDIATE); return 1; } int gasnetc_ofi_am_send_medium(gex_Rank_t dest, gex_AM_Index_t handler, void *source_addr, size_t nbytes, /* data payload */ int numargs, va_list argptr, int isreq, gex_Flags_t flags GASNETI_THREAD_FARG) { gasnetc_ofi_send_ctxt_t *header; header = gasnetc_medium_prep(numargs, isreq, flags GASNETI_THREAD_PASS); if (!header) return 1; gasneti_assume((source_addr != NULL) || !nbytes); int rc = gasnetc_medium_commit(header, /*fixed*/1, dest, handler, source_addr, nbytes, numargs, argptr, isreq, flags GASNETI_THREAD_PASS); gasneti_assert(!rc || (flags & GEX_FLAG_IMMEDIATE)); if (rc) gasnetc_ofi_free_am_header(header); return rc; } #if GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM || GASNET_NATIVE_NP_ALLOC_REP_MEDIUM extern gasneti_AM_SrcDesc_t gasnetc_ofi_PrepareMedium( gasneti_AM_SrcDesc_t sd, int isreq, gex_Rank_t jobrank, const void *client_buf, size_t size, gex_Flags_t flags, unsigned int numargs GASNETI_THREAD_FARG) { const gex_Flags_t immediate = flags & GEX_FLAG_IMMEDIATE; gasnetc_ofi_send_ctxt_t *header = gasnetc_medium_prep(numargs, isreq, /*flags*/immediate GASNETI_THREAD_PASS); if (!header) goto out_immediate; sd->_void_p = header; sd->_is_nbrhd = 0; sd->_dest._request._rank = jobrank; // yes, same for request and reply paths sd->_size = size; if (client_buf) { sd->_addr = (/*non-const*/ void *)client_buf; } else { size_t args_len = GASNETI_ALIGNUP(sizeof(gex_AM_Arg_t)*numargs, GASNETI_MEDBUF_ALIGNMENT); sd->_addr = sd->_gex_buf = (void *)((uintptr_t)&header->sendbuf.buf.medium_buf.data + args_len); gasneti_init_sd_poison(sd); } return sd; out_immediate: gasneti_assert(immediate); gasneti_reset_srcdesc(sd); return NULL; } extern int gasnetc_ofi_CommitMedium( gasneti_AM_SrcDesc_t sd, int isreq, gex_AM_Index_t handler, size_t nbytes, gex_Flags_t commit_flags, va_list argptr GASNETI_THREAD_FARG) { gasnetc_ofi_send_ctxt_t *header = (gasnetc_ofi_send_ctxt_t *)sd->_void_p; unsigned int numargs = header->sendbuf.argnum; gex_Rank_t jobrank = sd->_dest._request._rank; const void *source_addr = sd->_gex_buf ? NULL : sd->_addr; int rc = gasnetc_medium_commit(header, /*fixed*/0, jobrank, handler, source_addr, nbytes, numargs, argptr, isreq, commit_flags GASNETI_THREAD_PASS); gasneti_assert(!rc || (commit_flags & GEX_FLAG_IMMEDIATE)); return rc; } void gasnetc_ofi_CancelMedium(gasneti_AM_SrcDesc_t sd) { gasnetc_ofi_send_ctxt_t *header = (gasnetc_ofi_send_ctxt_t *)sd->_void_p; gasnetc_ofi_free_am_header(header); } #endif // GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM || GASNET_NATIVE_NP_ALLOC_REP_MEDIUM int gasnetc_ofi_am_send_long(gex_Rank_t dest, gex_AM_Index_t handler, void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, int numargs, va_list argptr, int isreq, gex_Flags_t flags GASNETI_THREAD_FARG) { // Get a send buffer gasnetc_ofi_send_ctxt_t *header = gasnetc_ofi_get_am_header(isreq, flags GASNETI_THREAD_PASS); if (!header) { gasneti_assert(flags & GEX_FLAG_IMMEDIATE); return 1; } gasnetc_ofi_am_send_buf_t *sendbuf = &header->sendbuf; int ret = 0; struct fid_ep* ep; fi_addr_t am_dest; int poll_type; if (isreq) { ep = gasnetc_ofi_request_epfd; am_dest = gasnetc_fabric_addr(REQ, dest); poll_type = OFI_POLL_ALL; } else { ep = gasnetc_ofi_reply_epfd; am_dest = gasnetc_fabric_addr(REP, dest); poll_type = OFI_POLL_REPLY; } // Copy or Put the payload size_t len = sizeof(gex_AM_Arg_t)*numargs; if(len + nbytes < long_rma_threshold) { // Pack the payload if it's small enough GASNETI_MEMCPY_SAFE_EMPTY(sendbuf->buf.long_buf.data + len, source_addr, nbytes); len += nbytes; sendbuf->type = OFI_AM_LONG_MEDIUM; } else if (flags & GEX_FLAG_IMMEDIATE) { // As long as we are stalling for remote completion of a Put, must "fail" IMMEDIATE goto out_imm; } else { // Launch the long data payload transfer with RMA operation gasnetc_ofi_blocking_op_ctxt_t lam_ctxt; lam_ctxt.complete = 0; lam_ctxt.callback = gasnetc_ofi_handle_blocking; // TODO: following line is only correct until AM supported on non-primordial EP const int rem_epidx = gasnetc_in_auxseg(dest, dest_addr) ? -1 : 0; gasnetc_EP_t c_ep = (gasnetc_EP_t)gasneti_import_ep(gasneti_THUNK_EP); OFI_INJECT_RETRY(&gasnetc_ofi_locks.rdma_tx, OFI_WRITE(c_ep, source_addr, nbytes, dest, rem_epidx, dest_addr, &lam_ctxt, 0), poll_type); GASNETC_OFI_CHECK_RET(ret, "fi_write failed for AM long"); #if GASNET_DEBUG gasnetc_paratomic_increment(&pending_rdma,0); #endif /* Because the order is not guaranteed between different ep, */ /* we send the am part after confirming the large rdma operation */ /* is successful. */ GASNETI_SPIN_WHILE(!lam_ctxt.complete, GASNETC_OFI_POLL_SELECTIVE(poll_type)); sendbuf->type = OFI_AM_LONG; } len += offsetof(gasnetc_ofi_am_send_buf_t, buf.long_buf.data); len = GASNETI_ALIGNUP(len, GASNETI_MEDBUF_ALIGNMENT); // ensure multi-recv buffer alignment // Initialize metadata (handler, args, etc.) sendbuf->handler = (uint8_t) handler; sendbuf->sourceid = gasneti_mynode; sendbuf->argnum = numargs; sendbuf->isreq = isreq; sendbuf->buf.long_buf.dest_ptr = dest_addr; gex_AM_Arg_t *arglist = (gex_AM_Arg_t*) sendbuf->buf.long_buf.data; for (int i = 0 ; i < numargs ; ++i) { arglist[i] = va_arg(argptr, gex_AM_Arg_t); } if(len <= max_buffered_send) { OFI_INJECT_RETRY_IMM(&gasnetc_ofi_locks.am_tx, ret = fi_injectdata(ep, sendbuf, len, nbytes, am_dest), poll_type, flags & GEX_FLAG_IMMEDIATE, out_imm); GASNETC_OFI_CHECK_RET(ret, "fi_inject for long am failed"); gasnetc_ofi_free_am_header(header); } else { struct fi_context *op_cxtx = gasnetc_send_ctxt_to_op_ctxt(header); OFI_INJECT_RETRY_IMM(&gasnetc_ofi_locks.am_tx, ret = fi_senddata(ep, sendbuf, len, NULL, nbytes, am_dest, op_cxtx), poll_type, flags & GEX_FLAG_IMMEDIATE, out_imm); GASNETC_OFI_CHECK_RET(ret, "fi_send for long am failed"); #if GASNET_DEBUG gasnetc_paratomic_increment(&pending_am,0); #endif } return 0; out_imm: gasnetc_ofi_free_am_header(header); return 1; } GASNETI_INLINE(get_bounce_bufs) int get_bounce_bufs(int n, gasnetc_ofi_bounce_buf_t ** arr) { int i,j; gasnetc_ofi_bounce_buf_t* buf_container; for (i = 0; i < n; i++) { buf_container = gasneti_lifo_pop(&ofi_bbuf_pool); if (!buf_container) { for (j = i -1; j >= 0; j--) { gasneti_lifo_push(&ofi_bbuf_pool, arr[j]); } return 0; } arr[i] = buf_container; } return 1; } /*------------------------------------------------ * OFI conduit one-sided put/get functions * ----------------------------------------------*/ /* There is not a good semantic match between GASNet and OFI in the non-blocking, * non-bulk puts due to local completion requirements. This function handles this * special case. * * Returns a valid event if necessary to block for remote completion. * Otherwise returns GEX_EVENT_INVALID */ gex_Event_t gasnetc_rdma_put_non_bulk(gex_TM_t tm, gex_Rank_t rank, void* dest_addr, void* src_addr, size_t nbytes, gasnetc_ofi_nb_op_ctxt_t* ctxt_ptr, gex_Flags_t flags GASNETI_THREAD_FARG) { const gex_EP_Location_t loc = gasneti_e_tm_rank_to_location(tm, rank, 0); const gex_Rank_t jobrank = loc.gex_rank; const int rem_epidx = gasnetc_in_auxseg(jobrank, dest_addr) ? -1 : loc.gex_ep_index; gasnetc_EP_t c_ep = (gasnetc_EP_t)gasneti_e_tm_to_i_ep(tm); int i; int ret = FI_SUCCESS; uintptr_t src_ptr = (uintptr_t)src_addr; gasnetc_assert_callback_eq(ctxt_ptr, gasnetc_ofi_handle_rdma); PERIODIC_RMA_POLL(); #if GASNET_HAVE_MK_CLASS_CUDA_UVA || GASNET_HAVE_MK_CLASS_ZE // CUDA and ZE device memory preclude bounce buffers and (at least currently) use of FI_INJECT if (c_ep->device_only_segment) goto block_anyways; #endif /* The payload can be injected without need for a bounce buffer */ if (nbytes <= max_buffered_write) { struct fi_msg_rma msg; msg.desc = 0; msg.addr = gasnetc_fabric_addr(RDMA, jobrank); struct iovec iovec; struct fi_rma_iov rma_iov; iovec.iov_base = src_addr; iovec.iov_len = nbytes; rma_iov.addr = gasnetc_remote_addr(jobrank, dest_addr, rem_epidx); rma_iov.key = gasnetc_remote_key(jobrank, rem_epidx); rma_iov.len = nbytes; msg.context = gasnetc_rdma_ctxt_to_op_ctxt(ctxt_ptr,GASNETC_CTXT_IS_RMA); msg.msg_iov = &iovec; msg.iov_count = 1; msg.rma_iov = &rma_iov; msg.rma_iov_count = 1; OFI_INJECT_RETRY_IMM(&gasnetc_ofi_locks.rdma_tx, ret = fi_writemsg(gasnetc_ofi_rdma_epfd, &msg, FI_INJECT | FI_DELIVERY_COMPLETE), OFI_POLL_ALL, flags & GEX_FLAG_IMMEDIATE, out_imm_inject); GASNETC_OFI_CHECK_RET(ret, "fi_writemsg with FI_INJECT failed"); #if GASNET_DEBUG gasnetc_paratomic_increment(&pending_rdma,0); #endif GASNETC_STAT_EVENT(NB_PUT_INJECT); return GEX_EVENT_INVALID; out_imm_inject: return GEX_EVENT_NO_OP; } /* Bounce buffers are needed */ else if (nbytes <= gasnetc_ofi_bbuf_threshold) { uintptr_t dest_ptr = (uintptr_t)dest_addr; int num_bufs_needed = (nbytes + ofi_bbuf_size - 1) / ofi_bbuf_size; size_t bytes_to_copy; gasnetc_ofi_bounce_buf_t* buffs[OFI_MAX_NUM_BOUNCE_BUFFERS]; /* If there are not enough bounce buffers available, simply block as * we don't know when more will become available */ ret = get_bounce_bufs(num_bufs_needed, buffs); if (!ret) goto block_anyways; gasnetc_ofi_bounce_op_ctxt_t * bbuf_ctxt = gasnetc_ofi_get_bounce_ctxt(); gasnetc_assert_callback_eq(bbuf_ctxt, gasnetc_ofi_handle_bounce_rdma); bbuf_ctxt->orig_op = ctxt_ptr; gasnetc_paratomic_set(&bbuf_ctxt->cntr, num_bufs_needed, 0); i = 0; gasnetc_ofi_bounce_buf_t* buf_container; gex_Flags_t imm = flags & GEX_FLAG_IMMEDIATE; while (num_bufs_needed > 0) { bytes_to_copy = num_bufs_needed != 1 ? ofi_bbuf_size : nbytes; gasneti_assert(bytes_to_copy <= ofi_bbuf_size); buf_container = buffs[i]; gasneti_lifo_push(&bbuf_ctxt->bbuf_list, buf_container); GASNETI_MEMCPY(buf_container->buf, (void*)src_ptr, bytes_to_copy); OFI_INJECT_RETRY_IMM(&gasnetc_ofi_locks.rdma_tx, OFI_WRITE(c_ep, buf_container->buf, bytes_to_copy, jobrank, rem_epidx, (void *)dest_ptr, bbuf_ctxt, 0), OFI_POLL_ALL, imm, out_imm_bounce); imm = 0; // no going back once first buffer has been written GASNETC_OFI_CHECK_RET(ret, "fi_write for bounce buffered data failed"); #if GASNET_DEBUG gasnetc_paratomic_increment(&pending_rdma,0); #endif /* Update our pointers to locations in memory */ nbytes -= ofi_bbuf_size; dest_ptr += ofi_bbuf_size; src_ptr += ofi_bbuf_size; num_bufs_needed--; i++; } GASNETC_STAT_EVENT(NB_PUT_BOUNCE); return GEX_EVENT_INVALID; out_imm_bounce: gasneti_assume(i == 0); for (/*empty*/; i < num_bufs_needed; ++i) { gasneti_lifo_push(&ofi_bbuf_pool, buffs[i]); } gasneti_lifo_init(&bbuf_ctxt->bbuf_list); gasneti_lifo_push(&ofi_bbuf_ctxt_pool, bbuf_ctxt); return GEX_EVENT_NO_OP; } /* We tried our best to optimize this. Just wait for remote completion */ else { block_anyways: GASNETC_STAT_EVENT(NB_PUT_BLOCK); if (nbytes > gasnetc_max_rma_size) { // Will require multiple fi_write() calls, for which gasnetc_rdma_put() // only supports NBI (iop) callers. So, use an access region. gasnete_begin_nbi_accessregion(0, 1 GASNETI_THREAD_PASS); gasneti_threaddata_t * const mythread = GASNETI_MYTHREAD; gasnete_iop_t *iop = mythread->current_iop; gasneti_assert(iop->put_ofi.type == OFI_TYPE_IPUT); iop->initiated_put_cnt++; gasneti_assert_zeroret( gasnetc_rdma_put(tm, rank, dest_addr, src_addr, nbytes, &iop->put_ofi, 0, flags GASNETI_THREAD_PASS) ); return gasnete_end_nbi_accessregion(0 GASNETI_THREAD_PASS); } // Small enough for a single fi_write() gasnete_eop_t *eop = gasnete_eop_new(GASNETI_MYTHREAD); eop->ofi.type = OFI_TYPE_EPUT; if (gasnetc_rdma_put(tm, rank, dest_addr, src_addr, nbytes, &eop->ofi, 0, flags GASNETI_THREAD_PASS)) { gasneti_assert(flags & GEX_FLAG_IMMEDIATE); GASNETE_EOP_MARKDONE(eop); gasnete_eop_free(eop GASNETI_THREAD_PASS); return GEX_EVENT_NO_OP; } return (gex_Event_t)eop; } } int gasnetc_rdma_put(gex_TM_t tm, gex_Rank_t rank, void *dst_ptr, void *src_ptr, size_t nbytes, gasnetc_ofi_nb_op_ctxt_t *ctxt_ptr, int alc, gex_Flags_t flags GASNETI_THREAD_FARG) { const gex_EP_Location_t loc = gasneti_e_tm_rank_to_location(tm, rank, 0); const gex_Rank_t jobrank = loc.gex_rank; const int rem_epidx = gasnetc_in_auxseg(jobrank, dst_ptr) ? -1 : loc.gex_ep_index; gasnetc_EP_t c_ep = (gasnetc_EP_t)gasneti_e_tm_to_i_ep(tm); int ret = FI_SUCCESS; gasnetc_assert_callback_eq(ctxt_ptr, gasnetc_ofi_handle_rdma); gasneti_assert((alc == 0) || (alc == 1)); gasneti_static_assert(GASNETC_CTXT_IS_ALC == 1); PERIODIC_RMA_POLL(); size_t remain = nbytes; const size_t chunksz = gasnetc_max_rma_size; uintptr_t dst_addr = (uintptr_t) dst_ptr; uintptr_t src_addr = (uintptr_t) src_ptr; if (nbytes > chunksz) { // Chunking logic is for IOP only (NB -> NBI xform done by caller if needed) gasneti_assert(ctxt_ptr->type == OFI_TYPE_IPUT); gasnete_iop_t *iop = gasneti_container_of(ctxt_ptr, gasnete_iop_t, put_ofi); gasnete_iop_check(iop); flags &= ~GEX_FLAG_IMMEDIATE; // multi-chunk precludes IMMEDIATE support // TODO: is there any advantage to using the first chunk to achieve "good" alignment? do { iop->initiated_put_cnt++; if (alc) GASNETE_IOP_LC_START(iop); OFI_INJECT_RETRY(&gasnetc_ofi_locks.rdma_tx, OFI_WRITE(c_ep, (void*)src_addr, chunksz, jobrank, rem_epidx, (void*)dst_addr, ctxt_ptr, alc), OFI_POLL_ALL); GASNETC_OFI_CHECK_RET(ret, "fi_write failed"); #if GASNET_DEBUG gasnetc_paratomic_increment(&pending_rdma,0); #endif dst_addr += chunksz; src_addr += chunksz; remain -= chunksz; } while (remain > chunksz); } // Might honor GEX_FLAG_IMMEDIATE *only* if this is the first fi_write(): OFI_INJECT_RETRY_IMM(&gasnetc_ofi_locks.rdma_tx, OFI_WRITE(c_ep, (void*)src_addr, remain, jobrank, rem_epidx, (void*)dst_addr, ctxt_ptr, alc), OFI_POLL_ALL, flags & GEX_FLAG_IMMEDIATE, out_imm); GASNETC_OFI_CHECK_RET(ret, "fi_write failed"); #if GASNET_DEBUG gasnetc_paratomic_increment(&pending_rdma,0); #endif return 0; out_imm: gasneti_assert(remain == nbytes); // IMM failure only possible in single-chunk case return 1; } int gasnetc_rdma_get(void *dst_ptr, gex_TM_t tm, gex_Rank_t rank, void *src_ptr, size_t nbytes, gasnetc_ofi_nb_op_ctxt_t *ctxt_ptr, gex_Flags_t flags GASNETI_THREAD_FARG) { const gex_EP_Location_t loc = gasneti_e_tm_rank_to_location(tm, rank, 0); const gex_Rank_t jobrank = loc.gex_rank; const int rem_epidx = gasnetc_in_auxseg(jobrank, src_ptr) ? -1 : loc.gex_ep_index; gasnetc_EP_t c_ep = (gasnetc_EP_t)gasneti_e_tm_to_i_ep(tm); int ret = FI_SUCCESS; gasnetc_assert_callback_eq(ctxt_ptr, gasnetc_ofi_handle_rdma); PERIODIC_RMA_POLL(); size_t remain = nbytes; const size_t chunksz = gasnetc_max_rma_size; uintptr_t dst_addr = (uintptr_t) dst_ptr; uintptr_t src_addr = (uintptr_t) src_ptr; if (nbytes > chunksz) { // Chunking logic is for IOP only (NB -> NBI xform done by caller if needed) gasneti_assert(ctxt_ptr->type == OFI_TYPE_IGET); gasnete_iop_t *iop = gasneti_container_of(ctxt_ptr, gasnete_iop_t, get_ofi); gasnete_iop_check(iop); flags &= ~GEX_FLAG_IMMEDIATE; // multi-chunk precludes IMMEDIATE support // TODO: is there any advantage to using the first chunk to achieve "good" alignment? do { iop->initiated_get_cnt++; OFI_INJECT_RETRY(&gasnetc_ofi_locks.rdma_tx, OFI_READ(c_ep, (void*)dst_addr, chunksz, jobrank, rem_epidx, (void*)src_addr, ctxt_ptr, 0), OFI_POLL_ALL); GASNETC_OFI_CHECK_RET(ret, "fi_read failed"); #if GASNET_DEBUG gasnetc_paratomic_increment(&pending_rdma,0); #endif dst_addr += chunksz; src_addr += chunksz; remain -= chunksz; } while (remain > chunksz); } // Might honor GEX_FLAG_IMMEDIATE *only* if this is the first fi_read(): OFI_INJECT_RETRY_IMM(&gasnetc_ofi_locks.rdma_tx, OFI_READ(c_ep, (void*)dst_addr, remain, jobrank, rem_epidx, (void*)src_addr, ctxt_ptr, 0), OFI_POLL_ALL, flags & GEX_FLAG_IMMEDIATE, out_imm); GASNETC_OFI_CHECK_RET(ret, "fi_read failed"); #if GASNET_DEBUG gasnetc_paratomic_increment(&pending_rdma,0); #endif return 0; out_imm: gasneti_assert(remain == nbytes); // IMM failure only possible in single-chunk case return 1; } #if GASNET_HAVE_MK_CLASS_MULTIPLE int gasnetc_mk_create_hook( gasneti_MK_t kind, gasneti_Client_t client, const gex_MK_Create_args_t *args, gex_Flags_t flags) { // Fail if the FI_HMEM capability was not found at initialization // TODO: fall back to reference implementation when we have one if (!gasnetc_fi_hmem) { GASNETI_RETURN_ERRR(RESOURCE, gasneti_dynsprintf("Provider '%s' reports no support for FI_HMEM needed for memory kinds", gasnetc_ofi_provider)); } // TODO: Fail (later fall back to ref) if the given device support is not present. // // The libfabric maintainers say that attempting a memory registration with // a given iface value is the only reliable way to determine if the device // support is present (see https://github.com/ofiwg/libfabric/issues/7973 ). // However, libfabric releases through (at least) 1.15.2 incorrectly return // success from fi_mr_regattr() when called with an iface value which is not // supported (see https://github.com/ofiwg/libfabric/issues/7977 ). // Once that is resolved, we can/should attempt a small registration // here and look for `-FI_ENOSYS` as an indication that the requested // device support is missing. // Capture the user's device argument for use in memory registration switch (args->gex_class) { #if GASNET_HAVE_MK_CLASS_CUDA_UVA case GEX_MK_CLASS_CUDA_UVA: kind->_mk_conduit = (void*)(uintptr_t)args->gex_args.gex_class_cuda_uva.gex_CUdevice; break; #endif #if GASNET_HAVE_MK_CLASS_HIP case GEX_MK_CLASS_HIP: // No device needed for HIP break; #endif #if GASNET_HAVE_MK_CLASS_ZE case GEX_MK_CLASS_ZE: kind->_mk_conduit = (void*)(uintptr_t)gasneti_mk_ze_device_ordinal(args->gex_args.gex_class_ze.gex_zeDevice, 0); break; #endif default: gasneti_unreachable_error(("unknown or unsupported gex_MK_Class_t value: %d", args->gex_class)); break; } return GASNET_OK; } #endif gasnet-2025.8.0/ofi-conduit/gasnet_core.c0000664000175000017500000013325215142313673020305 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/gasnet_core.c $ * Description: GASNet libfabric (OFI) conduit Implementation * Copyright 2002, Dan Bonachea * Copyright 2015, Intel Corporation * Portions copyright 2018-2020, The Regents of the University of California. * Terms of use are as specified in license.txt */ #include #include #include #include #include #include GASNETI_IDENT(gasnetc_IdentString_Version, "$GASNetCoreLibraryVersion: " GASNET_CORE_VERSION_STR " $"); GASNETI_IDENT(gasnetc_IdentString_Name, "$GASNetCoreLibraryName: " GASNET_CORE_NAME_STR " $"); GASNETI_IDENT(gasnetc_IdentString_AMMaxMediumDefault, "$GASNetAMMaxMediumDefault: " _STRINGIFY(GASNETC_OFI_MAX_MEDIUM_DFLT) " $"); gex_AM_Entry_t *gasnetc_handler; // TODO-EX: will be replaced with per-EP tables /* Exit coordination timeouts */ #define GASNETC_DEFAULT_EXITTIMEOUT_MAX 480.0 // 8 min - extrapolated from Summit data in bug 4360 #define GASNETC_DEFAULT_EXITTIMEOUT_MIN 10.0 // 10 sec #define GASNETC_DEFAULT_EXITTIMEOUT_FACTOR 0.25 // 1/4 second per process static double gasnetc_exittimeout = GASNETC_DEFAULT_EXITTIMEOUT_MAX; static int gasnetc_exit_init(void); #if GASNET_PAR struct gasnetc_ofi_locks_ gasnetc_ofi_locks; #endif size_t gasnetc_sizeof_ep_t(void) { gasnetc_EP_t ep; return sizeof(*ep); } /* ------------------------------------------------------------------------------------ */ /* Bootstrap collectives dispatch */ void gasneti_bootstrapBarrier(void) { if (gasneti_attach_done) { gasneti_bootstrapBarrier_am(); } else { gasneti_spawner->Barrier(); } } void gasneti_bootstrapExchange(void *src, size_t len, void *dest) { if (gasneti_attach_done) { gasneti_bootstrapExchange_am(src, len, dest); } else { gasneti_spawner->Exchange(src, len, dest); } } /* ------------------------------------------------------------------------------------ */ /* Initialization ============== */ /* called at startup to check configuration sanity */ static void gasnetc_check_config(void) { gasneti_check_config_preinit(); } static int gasnetc_init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { /* check system sanity */ gasnetc_check_config(); if (gasneti_init_done) GASNETI_RETURN_ERRR(NOT_INIT, "GASNet already initialized"); gasneti_init_done = 1; /* enable early to allow tracing */ #if GASNET_DEBUG_VERBOSE gasneti_console_message("gasnetc_init","about to spawn..."); #endif const char *force_spawner = NULL; #if HAVE_PMI_CRAY_H // On a system with Cray PMI, we want to avoid initializing the MPI library // by default despite `srun` being the launch utility for both MPI and PMI. // So, a little extra logic here overrides the normal precedence of MPI over // PMI in gasneti_spawnerInit(). const char *spawn_control = gasneti_getenv("GASNET_OFI_SPAWNER"); // just testing for unset/empty // Following line is a *temporary* fall-back to the legacy variable: if (!spawn_control || !spawn_control[0]) spawn_control = gasneti_getenv("GASNET_SPAWN_CONTROL"); if (!spawn_control || !spawn_control[0]) { force_spawner = "PMI"; gasneti_envstr_display("GASNET_OFI_SPAWNER", "PMI", 1); } #endif gasneti_spawner = gasneti_spawnerInit(argc, argv, force_spawner, &gasneti_nodes, &gasneti_mynode); if (!gasneti_spawner) GASNETI_RETURN_ERRR(NOT_INIT, "GASNet job spawn failed"); // bug 4597: freeze following process spawning and environment propagation gasneti_freezeForDebugger(); /* Must init timers after global env, and preferably before tracing */ GASNETI_TICKS_INIT(); /* Now enable tracing of all the following steps */ gasneti_trace_init(argc, argv); gasneti_nodemapInit(gasneti_spawner->Exchange, NULL, 0, 0); /* bootstrap the nodes for ofi conduit */ int ret = gasnetc_ofi_init(); if (GASNET_OK != ret) return ret; if (gasneti_spawn_verbose) { gasneti_console_message("gasnetc_init","spawn successful - proc %i/%i starting...", gasneti_mynode, gasneti_nodes); } gasneti_assert_zeroret(gasnetc_exit_init()); #if GASNET_PSHM gasneti_pshm_init(gasneti_bootstrapNbrhdBroadcast, 0); #endif // Create first Client, EP and TM *here*, for use in subsequent bootstrap communication { // allocate the client object gasneti_Client_t client = gasneti_alloc_client(clientName, flags); *client_p = gasneti_export_client(client); // create the initial endpoint with internal handlers if (gex_EP_Create(ep_p, *client_p, GEX_EP_CAPABILITY_ALL, flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error creating initial endpoint"); gasneti_EP_t ep = gasneti_import_ep(*ep_p); gasnetc_handler = ep->_amtbl; // TODO-EX: this global variable to be removed // create the tm gasneti_TM_t tm = gasneti_alloc_tm(ep, gasneti_mynode, gasneti_nodes, flags); *tm_p = gasneti_export_tm(tm); } gasneti_attach_done = 1; // Ready to use AM Short and Medium for bootstrap comms uintptr_t mmap_limit; #if HAVE_MMAP // Bound per-host (sharedLimit) argument to gasneti_segmentLimit() // while properly reserving space for aux segments. uint64_t sharedLimit = gasneti_sharedLimit(); uint64_t hostAuxSegs = gasneti_myhost.node_count * gasneti_auxseg_preinit(); if (sharedLimit <= hostAuxSegs) { gasneti_fatalerror("per-host segment limit %"PRIu64" is too small to accommodate %i aux segments, " "total size %"PRIu64". You may need to adjust OS shared memory limits.", sharedLimit, gasneti_myhost.node_count, hostAuxSegs); } sharedLimit -= hostAuxSegs; mmap_limit = gasneti_segmentLimit((uintptr_t)-1, sharedLimit, NULL, NULL); #else // TODO-EX: we can at least look at rlimits but such logic belongs in conduit-indep code mmap_limit = (intptr_t)-1; #endif /* allocate and attach an aux segment */ gasnet_seginfo_t auxseg = gasneti_auxsegAttach((uintptr_t)-1, &gasneti_bootstrapExchange); #if GASNET_SEGMENT_FAST || GASNET_SEGMENT_LARGE gasnetc_auxseg_register(auxseg); #endif /* determine Max{Local,GLobal}SegmentSize */ gasneti_segmentInit(mmap_limit, &gasneti_bootstrapExchange, flags); gasneti_init_done = 1; return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ extern int gasnetc_attach_primary(gex_Flags_t flags) { /* ------------------------------------------------------------------------------------ */ /* register fatal signal handlers */ /* catch fatal signals and convert to SIGQUIT */ gasneti_registerSignalHandlers(gasneti_defaultSignalHandler); /* ------------------------------------------------------------------------------------ */ /* primary attach complete */ gasneti_attach_done = 1; gasneti_bootstrapBarrier(); GASNETI_TRACE_PRINTF(C,("gasnetc_attach_primary(): primary attach complete")); gasnete_init(); /* init the extended API */ gasneti_nodemapFini(); /* ensure extended API is initialized across nodes */ gasneti_bootstrapBarrier(); /* (###) Optionally (but recommended) free spawner's idle resources. * Safe even if spawner collectives are used after attach */ gasneti_bootstrapCleanup(); #if GASNET_SEGMENT_EVERYTHING gasneti_EP_t i_ep0 = gasneti_import_ep(gasneti_THUNK_EP); GASNETI_SAFE_PROPAGATE( gasnetc_ep_bindsegment(i_ep0, NULL) ); #endif return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ void gasnetc_segment_destroy_hook(gasneti_Segment_t i_segment) { // Pending introduction of gex_EP_UnbindSegment() we are permitting clients // to destroy an idle bound segment. This hook prevents a resource leak in // such usage. TODO: remove once clients are required to unbind. gasneti_Client_t i_client = i_segment->_client; for (gex_EP_Index_t ep_idx = 0; ep_idx < GASNET_MAXEPS; ++ep_idx) { gasneti_EP_t i_ep = i_client->_ep_tbl[ep_idx]; if (i_ep && i_ep->_segment == i_segment) { gasneti_assert_zeroret( gasnetc_ep_unbindsegment(i_ep) ); } } } int gasnetc_segment_attach_hook(gex_Segment_t e_segment, gex_TM_t e_tm) { // Exchange memory keys, if needed gex_EP_t e_ep = gex_TM_QueryEP(e_tm); gasnetc_segment_exchange(e_tm, &e_ep, 1); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ // TODO-EX: this is a candidate for factorization (once we understand the per-conduit variations) extern int gasnetc_Client_Init( gex_Client_t *client_p, gex_EP_t *ep_p, gex_TM_t *tm_p, const char *clientName, int *argc, char ***argv, gex_Flags_t flags) { gasneti_assert(client_p); gasneti_assert(ep_p); gasneti_assert(tm_p); gasneti_assert(clientName); #if !GASNET_NULL_ARGV_OK gasneti_assert(argc); gasneti_assert(argv); #endif // main init // TODO-EX: must split off per-client and per-endpoint portions if (!gasneti_init_done) { // First client // NOTE: gasnetc_init() creates the first Client, EP and TM for use in bootstrap comms int retval = gasnetc_init(client_p, ep_p, tm_p, clientName, argc, argv, flags); if (retval != GASNET_OK) GASNETI_RETURN(retval); #if 0 /* called within gasnetc_init to allow init tracing */ gasneti_trace_init(argc, argv); #endif } else { gasneti_fatalerror("No multi-client support"); } // Do NOT move this prior to the gasneti_trace_init() call GASNETI_TRACE_PRINTF(O,("gex_Client_Init: name='%s' argc_p=%p argv_p=%p flags=%d", clientName, (void *)argc, (void *)argv, flags)); if (0 == (flags & GASNETI_FLAG_INIT_LEGACY)) { /* primary attach */ if (GASNET_OK != gasnetc_attach_primary(flags)) GASNETI_RETURN_ERRR(RESOURCE,"Error in primary attach"); /* ensure everything is initialized across all nodes */ gasnet_barrier(0, GASNET_BARRIERFLAG_UNNAMED); } else { gasneti_attach_done = 0; // Pending client call to gasnet_attach() } return GASNET_OK; } extern int gasnetc_ep_publishboundsegment_hook( gex_TM_t tm, gex_EP_t *eps, size_t num_eps, gex_Flags_t flags) { // Conduit-dependent parts // TODO: merge comms into gasneti_EP_PublishBoundSegment(). gasnetc_segment_exchange(tm, eps, num_eps); // Avoid race in which AMRequestLong triggers AMRepyLong before exchange completes remotely // TODO: barrier for multi-tm per-process gex_Event_Wait(gex_Coll_BarrierNB(tm, 0)); return GASNET_OK; } // Conduit-specific hook to run at end of gex_EP_Create() int gasnetc_ep_init_hook(gasneti_EP_t i_ep) { // Current non-primordial EP support is RMA-only if (i_ep->_index && (i_ep->_caps & ~GEX_EP_CAPABILITY_RMA)) { // Unsupported capability/ies requested GASNETI_RETURN_ERRR(BAD_ARG, "ofi-conduit supports only GEX_EP_CAPABILITY_RMA for non-primordial endpoints"); } gasnetc_EP_t c_ep = (gasnetc_EP_t)i_ep; c_ep->mrfd = NULL; return GASNET_OK; } // To leverage the client-provided key capability of MR_SCALABLE, we defer // segment registration until here in order to have the keys be computable from // the endpoint index. extern int gasnetc_ep_bindsegment_hook( gasneti_EP_t i_ep, gasneti_Segment_t i_segment, gex_Flags_t flags) { return gasnetc_ep_bindsegment(i_ep, i_segment); } /* ------------------------------------------------------------------------------------ */ int gasnetc_exit_in_progress = 0; /* gasneti_exit_code holds value to _exit() with */ static const char * volatile gasnetc_exit_state = "UNKNOWN STATE"; // NOTE: Please keep GASNETC_EXIT_STATE_MAXLEN fairly "tight" to bound the // volume of garbage that might get printed in the event of memory corruption. #define GASNETC_EXIT_STATE_MAXLEN 50 #define GASNETC_EXIT_STATE(st) do { \ gasneti_static_assert(sizeof(st) <= GASNETC_EXIT_STATE_MAXLEN+1);\ gasnetc_exit_state = st; \ if (gasneti_spawn_verbose) /* %s to silence -Wformat-security */ \ gasneti_console_message("EXIT STATE", "%s", gasnetc_exit_state); \ } while (0) // Avoid recursion, such as via gasneti_bootstrapAbort() extern void gasnetc_exit_cautious(int exitcode) { if (!gasnetc_exit_in_progress) gasnetc_exit(exitcode); } static int gasnetc_exit_init(void) { gasnetc_exittimeout = gasneti_get_exittimeout(GASNETC_DEFAULT_EXITTIMEOUT_MAX, GASNETC_DEFAULT_EXITTIMEOUT_MIN, GASNETC_DEFAULT_EXITTIMEOUT_FACTOR, GASNETC_DEFAULT_EXITTIMEOUT_MIN); // register process exit-time hook gasneti_registerExitHandler(gasnetc_exit_cautious); return GASNET_OK; } /* This signal handler is for a last-ditch exit when a signal arrives while * attempting the graceful exit. That includes SIGALRM if we get wedged. * DOES NOT RETURN */ static void gasnetc_exit_sighandler(int sig) { int exitcode = (int)gasneti_atomic_read(&gasneti_exit_code, 0); static gasneti_atomic_t once = gasneti_atomic_init(1); #if GASNET_DEBUG // protect until we reach reentrance check gasneti_reghandler(SIGALRM, _exit); gasneti_unblocksig(SIGALRM); alarm(30); #endif const char * state = gasnetc_exit_state; size_t state_len = gasneti_strnlen(state, GASNETC_EXIT_STATE_MAXLEN); /* note - can't call trace macros here, or even sprintf */ if (sig == SIGALRM) { static const char msg[] = "gasnet_exit(): WARNING: timeout during exit... goodbye. ["; gasneti_unused_result( write(STDERR_FILENO, msg, sizeof(msg) - 1) ); gasneti_unused_result( write(STDERR_FILENO, state, state_len) ); gasneti_unused_result( write(STDERR_FILENO, "]\n", 2) ); } else { static const char msg1[] = "gasnet_exit(): ERROR: signal "; static const char msg2[] = " received during exit... goodbye. ["; char digit; gasneti_unused_result( write(STDERR_FILENO, msg1, sizeof(msg1) - 1) ); char sigstr[4]; size_t n = gasneti_utoa(sig, sigstr, sizeof(sigstr), 10); gasneti_unused_result( write(STDERR_FILENO, sigstr, n) ); gasneti_unused_result( write(STDERR_FILENO, msg2, sizeof(msg2) - 1) ); gasneti_unused_result( write(STDERR_FILENO, state, state_len) ); gasneti_unused_result( write(STDERR_FILENO, "]\n", 2) ); } (void) fsync(STDERR_FILENO); if (gasneti_atomic_decrement_and_test(&once, 0)) { /* We ask the bootstrap support to kill us, but only once */ GASNETC_EXIT_STATE("in suicide timer"); gasneti_reghandler(SIGALRM, gasnetc_exit_sighandler); gasneti_unblocksig(SIGALRM); alarm(MAX(5,gasnetc_exittimeout)); gasneti_bootstrapAbort(exitcode); } else { gasneti_killmyprocess(exitcode); gasneti_reghandler(SIGABRT, SIG_DFL); gasneti_fatalerror("gasnetc_exit aborting..."); } /* NOT REACHED */ } /* AM Handlers for exit handling */ static void gasnetc_noop(void) { return; } static gasneti_atomic_t gasnetc_exit_dist = gasneti_atomic_init(0); /* OR of reduce distances */ static void gasnetc_exit_reqh(gex_Token_t token, gex_AM_Arg_t arg0, gex_AM_Arg_t arg1) { gasneti_atomic_val_t distance = arg1; #if defined(GASNETI_HAVE_ATOMIC_ADD_SUB) /* atomic OR via ADD since no bit will be set more than once */ gasneti_assert(GASNETI_POWEROFTWO(distance)); gasneti_atomic_add(&gasnetc_exit_dist, distance, GASNETI_ATOMIC_REL); #elif defined(GASNETI_HAVE_ATOMIC_CAS) /* atomic OR via C-A-S */ uint32_t old_val; do { old_val = gasneti_atomic_read(&gasnetc_exit_dist, 0); } while (!gasneti_atomic_compare_and_swap(&gasnetc_exit_dist, old_val, old_val|distance, GASNETI_ATOMIC_REL)); #else #error "required atomic compare-and-swap is not yet implemented for your CPU/OS/compiler" #endif if (!gasnetc_exit_in_progress) gasnetc_exit((int)arg0); } /* Coordinate a global exit, returning non-zero on success */ static int gasnetc_exit_coordinate(int exitcode) { GASNET_BEGIN_FUNCTION(); // OK - not a critical-path /* Disable processing of user's AMs, to avoid reentrance if user's handler exits */ for (int i = GASNETE_HANDLER_BASE; i < GASNETC_MAX_NUMHANDLERS; ++i) { gasnetc_handler[i].gex_fnptr = (gex_AM_Fn_t)&gasnetc_noop; } // prevent possible GASNETI_CHECK_INJECT() failures when we communicate GASNETI_CHECK_INJECT_RESET(); /* Coordinate using dissemination-pattern, with timeout. * lg(N) rounds each of which sends and recvs 1 AM */ const uint64_t timeout_ns = gasnetc_exittimeout * 1000000000L; const gasneti_tick_t t_start = gasneti_ticks_now(); for (int distance = 1; distance < gasneti_nodes; distance *= 2) { gex_Rank_t jobrank = (gasneti_mynode + distance) % gasneti_nodes; int ret = gasnetc_AMRequestShortM(gasneti_THUNK_TM, jobrank, gasneti_handleridx(gasnetc_exit_reqh), 0 GASNETI_THREAD_PASS, 2, exitcode, distance); if (ret != GASNET_OK) return 0; do { /* wait for completion of the proper receive, which might arrive out of order */ if (timeout_ns < gasneti_ticks_to_ns(gasneti_ticks_now() - t_start)) return 0; gasnetc_AMPoll(GASNETI_THREAD_PASS_ALONE); } while (!(distance & gasneti_atomic_read(&gasnetc_exit_dist, 0))); } return 1; } extern void gasnetc_exit(int exitcode) { gasnetc_exit_in_progress = 1; gasneti_atomic_set(&gasneti_exit_code, exitcode, GASNETI_ATOMIC_REL); /* once we start a shutdown, ignore all future SIGQUIT signals or we risk reentrancy */ gasneti_reghandler(SIGQUIT, SIG_IGN); { /* ensure only one thread ever continues past this point */ static gasneti_mutex_t exit_lock = GASNETI_MUTEX_INITIALIZER; gasneti_mutex_lock(&exit_lock); } if (gasneti_spawn_verbose) gasneti_console_message("EXIT STATE","gasnet_exit(%i)",exitcode); else GASNETI_TRACE_PRINTF(C,("gasnet_exit(%i)\n", exitcode)); /* Establish a last-ditch signal handler in case of failure. */ gasneti_reghandler(SIGALRM, gasnetc_exit_sighandler); #if GASNET_DEBUG gasneti_reghandler(SIGABRT, SIG_DFL); #else gasneti_reghandler(SIGABRT, gasnetc_exit_sighandler); #endif gasneti_reghandler(SIGILL, gasnetc_exit_sighandler); gasneti_reghandler(SIGSEGV, gasnetc_exit_sighandler); gasneti_reghandler(SIGFPE, gasnetc_exit_sighandler); gasneti_reghandler(SIGBUS, gasnetc_exit_sighandler); /* Prior to attach we cannot send AMs to coordinate the exit */ if (! gasneti_attach_done) { GASNETC_EXIT_STATE("in pre-attach gasneti_bootstrapAbort()"); gasneti_console_message("WARNING","GASNet ofi-conduit may not shutdown cleanly when gasnet_exit() is called before gasnet_attach()"); gasneti_bootstrapAbort(exitcode); gasneti_killmyprocess(exitcode); } #if GASNET_DEBUG // Disarm gasneti_checknpam() so we can use AMs for coordination gasneti_checknpam_disarm(); #endif const unsigned int timeout = (unsigned int)gasnetc_exittimeout; // One alarm timer for the exit coordination // +2 is margin of safety around the timed coordination GASNETC_EXIT_STATE("coordinating shutdown"); alarm(2 + timeout); int graceful = gasnetc_exit_coordinate(exitcode); // A second alarm timer for most of the remaining exit steps // TODO: 120 is arbitrary and hard-coded alarm(MAX(120, timeout)); if (graceful) { GASNETC_EXIT_STATE("draining network"); { GASNET_BEGIN_FUNCTION(); // OK - not a critical-path gex_Event_t *events = NULL; size_t count; gasneti_finalize_all_nbi_ff(&events, &count GASNETI_THREAD_PASS); if (count) { // bounded polling (upto 25% of the total timeout) to drain any nbi_ff operations const uint64_t timeout_ns = (timeout * 1000000000L) / 4; const gasneti_tick_t t_start = gasneti_ticks_now(); gasneti_polluntil((gasneti_ticks_to_ns(gasneti_ticks_now() - t_start) > timeout_ns) || (GASNET_ERR_NOT_READY != gasnete_test_all(events, count GASNETI_THREAD_PASS))); } gasneti_free(events); } GASNETC_EXIT_STATE("in gasnetc_ofi_exit()"); gasnetc_ofi_exit(); } GASNETC_EXIT_STATE("flushing output"); gasneti_flush_streams(); gasneti_trace_finish(); gasneti_sched_yield(); // One last alarm to cover the Fini or Abort // This has been observed to be the slowest step in some cases (see bug 4360) // TODO: 30 is arbitrary and hard-coded alarm(MAX(30, timeout)); if (graceful) { GASNETC_EXIT_STATE("in gasneti_bootstrapFini() during graceful exit"); gasneti_bootstrapFini(); } else { GASNETC_EXIT_STATE("in gasneti_bootstrapAbort() during forceful exit"); gasneti_bootstrapAbort(exitcode); } alarm(0); gasneti_killmyprocess(exitcode); gasneti_fatalerror("gasnetc_exit failed!"); } /* ------------------------------------------------------------------------------------ */ /* Misc. Active Message Functions ============================== */ #if GASNET_PSHM /* (###) GASNETC_GET_HANDLER * If your conduit will support PSHM, then there needs to be a way * for PSHM to see your handler table. If you use the recommended * implementation then you don't need to do anything special. * Othwerwise, #define GASNETC_GET_HANDLER in gasnet_core_fwd.h and * implement gasnetc_get_handler() as a macro in * gasnet_core_internal.h * * (###) Tokens and "nbrhd" (loopback and PSHM): * To permit conduit-specific tokens to co-exist with ones used by the * conduit-independent implementation of AMs within the neighborhood, * the nbrhd implementation produces tokens with the least-significant * bit set (assuming the conduit never will). This restricts the * conduit's implemention of tokens, but allows the common choice in * which tokens are pointers to a type with alignment greater than 1. */ #endif extern gex_TI_t gasnetc_Token_Info( gex_Token_t token, gex_Token_Info_t *info, gex_TI_t mask) { gasneti_assert(token); gasneti_assert(info); if (gasnetc_token_in_nbrhd(token)) { return gasnetc_nbrhd_Token_Info(token, info, mask); } gex_TI_t result = 0; gasnetc_ofi_am_send_buf_t *real_token = (gasnetc_ofi_am_send_buf_t*)token; gex_EP_t ep = gasneti_THUNK_EP; info->gex_srcrank = real_token->sourceid; result |= GEX_TI_SRCRANK; info->gex_ep = ep; result |= GEX_TI_EP; info->gex_entry = gasneti_import_ep(ep)->_amtbl + real_token->handler; result |= GEX_TI_ENTRY; info->gex_is_req = real_token->isreq; result |= GEX_TI_IS_REQ; info->gex_is_long = (real_token->type == OFI_AM_LONG) || (real_token->type == OFI_AM_LONG_MEDIUM); result |= GEX_TI_IS_LONG; return GASNETI_TOKEN_INFO_RETURN(result, info, mask); } extern int gasnetc_AMPoll(GASNETI_THREAD_FARG_ALONE) { int retval; GASNETI_CHECKATTACH(); #if GASNET_PSHM /* If your conduit will support PSHM, let it make progress here. */ gasneti_AMPSHMPoll(0 GASNETI_THREAD_PASS); #endif /* add code here to run your AM progress engine */ /* should be a generic polling */ gasnetc_ofi_poll(); return GASNET_OK; } /* ------------------------------------------------------------------------------------ */ /* Active Message Request Functions (FPAM) ======================================= */ GASNETI_INLINE(gasnetc_AMRequestShort) int gasnetc_AMRequestShort( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { retval = gasnetc_nbrhd_RequestGeneric( gasneti_Short, jobrank, handler, 0, 0, 0, flags, numargs, argptr GASNETI_THREAD_PASS); } else { retval = gasnetc_ofi_am_send_short(jobrank, handler, numargs, argptr, 1, flags GASNETI_THREAD_PASS); gasneti_assert(!retval || (flags & GEX_FLAG_IMMEDIATE)); } return retval; } extern int gasnetc_AMRequestShortM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTSHORT(tm,rank,handler,flags,numargs); GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* (###) poll at least once, to assure forward progress */ va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestShort(tm,rank,handler,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMRequestMedium) int gasnetc_AMRequestMedium(gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { gasneti_leaf_finish(lc_opt); // synchronous LC retval = gasnetc_nbrhd_RequestGeneric( gasneti_Medium, jobrank, handler, source_addr, nbytes, 0, flags, numargs, argptr GASNETI_THREAD_PASS); } else { gasneti_leaf_finish(lc_opt); // TODO-EX: async LC retval = gasnetc_ofi_am_send_medium(jobrank, handler, source_addr, nbytes, numargs, argptr, 1, flags GASNETI_THREAD_PASS); gasneti_assert(!retval || (flags & GEX_FLAG_IMMEDIATE)); } return retval; } extern int gasnetc_AMRequestMediumV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { return gasnetc_AMRequestMedium(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); } extern int gasnetc_AMRequestMediumM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTMEDIUM(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs); GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* (###) poll at least once, to assure forward progress */ va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestMedium(tm,rank,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMRequestLong) int gasnetc_AMRequestLong( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { int retval; gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { gasneti_leaf_finish(lc_opt); // synchronous LC retval = gasnetc_nbrhd_RequestGeneric( gasneti_Long, jobrank, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr GASNETI_THREAD_PASS); } else { gasneti_leaf_finish(lc_opt); // TODO-EX: async LC retval = gasnetc_ofi_am_send_long(jobrank, handler, source_addr, nbytes, dest_addr, numargs, argptr, 1, flags GASNETI_THREAD_PASS); gasneti_assert(!retval || (flags & GEX_FLAG_IMMEDIATE)); } return retval; } extern int gasnetc_AMRequestLongV( gex_TM_t tm, gex_Rank_t rank, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr GASNETI_THREAD_FARG) { return gasnetc_AMRequestLong(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); } extern int gasnetc_AMRequestLongM( gex_TM_t tm,/* local context */ gex_Rank_t rank, /* with tm, defines remote context */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags GASNETI_THREAD_FARG, int numargs, ...) { GASNETI_COMMON_AMREQUESTLONG(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); GASNETC_IMMEDIATE_MAYBE_POLL(flags); /* (###) poll at least once, to assure forward progress */ va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMRequestLong(tm,rank,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr GASNETI_THREAD_PASS); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMReplyShort) int gasnetc_AMReplyShort( gex_Token_t token, gex_AM_Index_t handler, gex_Flags_t flags, int numargs, va_list argptr) { int retval; if_pt (gasnetc_token_in_nbrhd(token)) { retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Short, token, handler, 0, 0, 0, flags, numargs, argptr); } else { GASNET_BEGIN_FUNCTION(); // TODO-EX: stash threadinfo in token gex_Rank_t jobrank = ((gasnetc_ofi_am_send_buf_t*)token)->sourceid; retval = gasnetc_ofi_am_send_short(jobrank, handler, numargs, argptr, 0, flags GASNETI_THREAD_PASS); gasneti_assert(!retval || (flags & GEX_FLAG_IMMEDIATE)); } return retval; } extern int gasnetc_AMReplyShortM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ gex_Flags_t flags, int numargs, ...) { GASNETI_COMMON_AMREPLYSHORT(token,handler,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyShort(token,handler,flags,numargs,argptr); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMReplyMedium) int gasnetc_AMReplyMedium( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { int retval; if_pt (gasnetc_token_in_nbrhd(token)) { gasneti_leaf_finish(lc_opt); // synchronous LC retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Medium, token, handler, source_addr, nbytes, 0, flags, numargs, argptr); } else { gasneti_leaf_finish(lc_opt); // TODO-EX: async LC GASNET_BEGIN_FUNCTION(); // TODO-EX: stash threadinfo in token gex_Rank_t jobrank = ((gasnetc_ofi_am_send_buf_t*)token)->sourceid; retval = gasnetc_ofi_am_send_medium(jobrank, handler, source_addr, nbytes, numargs, argptr, 0, flags GASNETI_THREAD_PASS); gasneti_assert(!retval || (flags & GEX_FLAG_IMMEDIATE)); } return retval; } extern int gasnetc_AMReplyMediumV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { return gasnetc_AMReplyMedium(token,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr); } extern int gasnetc_AMReplyMediumM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { GASNETI_COMMON_AMREPLYMEDIUM(token,handler,source_addr,nbytes,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyMedium(token,handler,source_addr,nbytes,lc_opt,flags,numargs,argptr); va_end(argptr); return retval; } GASNETI_INLINE(gasnetc_AMReplyLong) int gasnetc_AMReplyLong( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { int retval; if_pt (gasnetc_token_in_nbrhd(token)) { gasneti_leaf_finish(lc_opt); // synchronous LC retval = gasnetc_nbrhd_ReplyGeneric( gasneti_Long, token, handler, source_addr, nbytes, dest_addr, flags, numargs, argptr); } else { gasneti_leaf_finish(lc_opt); // TODO-EX: async LC GASNET_BEGIN_FUNCTION(); // TODO-EX: stash threadinfo in token gex_Rank_t jobrank = ((gasnetc_ofi_am_send_buf_t*)token)->sourceid; retval = gasnetc_ofi_am_send_long(jobrank, handler, source_addr, nbytes, dest_addr, numargs, argptr, 0, flags GASNETI_THREAD_PASS); gasneti_assert(!retval || (flags & GEX_FLAG_IMMEDIATE)); } return retval; } extern int gasnetc_AMReplyLongV( gex_Token_t token, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, gex_Event_t *lc_opt, gex_Flags_t flags, int numargs, va_list argptr) { return gasnetc_AMReplyLong(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr); } extern int gasnetc_AMReplyLongM( gex_Token_t token, /* token provided on handler entry */ gex_AM_Index_t handler, /* index into destination endpoint's handler table */ void *source_addr, size_t nbytes, /* data payload */ void *dest_addr, /* data destination on destination node */ gex_Event_t *lc_opt, /* local completion of payload */ gex_Flags_t flags, int numargs, ...) { GASNETI_COMMON_AMREPLYLONG(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs); va_list argptr; va_start(argptr, numargs); /* pass in last argument */ int retval = gasnetc_AMReplyLong(token,handler,source_addr,nbytes,dest_addr,lc_opt,flags,numargs,argptr); va_end(argptr); return retval; } /* Active Message Request Functions (NPAM) ======================================= */ #if GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM extern gex_AM_SrcDesc_t gasnetc_AM_PrepareRequestMedium( gex_TM_t tm, gex_Rank_t rank, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags GASNETI_THREAD_FARG, unsigned int numargs) { GASNETI_TRACE_PREP_REQUESTMEDIUM(tm,rank,client_buf,least_payload,most_payload,flags,numargs); GASNETC_IMMEDIATE_MAYBE_POLL(flags); // Ensure at least one poll upon Request injection gasneti_AM_SrcDesc_t sd = gasneti_init_request_srcdesc(GASNETI_THREAD_PASS_ALONE); GASNETI_COMMON_PREP_REQ(sd,tm,rank,client_buf,least_payload,most_payload,NULL,lc_opt,flags,numargs,Medium); flags &= ~(GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); gex_Rank_t jobrank = gasneti_e_tm_rank_to_jobrank(tm, rank); if (GASNETI_NBRHD_JOBRANK_IS_LOCAL(jobrank)) { sd = gasnetc_nbrhd_PrepareRequest(sd, gasneti_Medium, jobrank, client_buf, least_payload, most_payload, NULL, lc_opt, flags, numargs); } else { size_t size = gasnetc_AM_MaxRequestMedium(tm, rank, lc_opt, flags, numargs); size = MIN(size, most_payload); size = MAX(size, least_payload); sd = gasnetc_ofi_PrepareMedium(sd, /*isreq*/1, jobrank, client_buf, size, flags, numargs GASNETI_THREAD_PASS); if (lc_opt) gasneti_leaf_finish(lc_opt); // TODO-EX: async LC } GASNETI_TRACE_PREP_RETURN(REQUEST_MEDIUM, sd); GASNETI_CHECK_SD(client_buf, least_payload, most_payload, sd); return gasneti_export_srcdesc(sd); } extern int gasnetc_AM_CommitRequestMediumM( gex_AM_Index_t handler, size_t nbytes, gex_Flags_t commit_flags GASNETI_THREAD_FARG, #if GASNET_DEBUG unsigned int nargs_arg, #endif gex_AM_SrcDesc_t sd_arg, ...) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_COMMIT_REQ(sd,handler,nbytes,NULL,commit_flags,nargs_arg,Medium); int rc = GASNET_OK; // assume success va_list argptr; va_start(argptr, sd_arg); if (sd->_is_nbrhd) { gasnetc_nbrhd_CommitRequest(sd, gasneti_Medium, handler, nbytes, NULL, argptr); } else { rc = gasnetc_ofi_CommitMedium(sd, /*isreq*/1, handler, nbytes, commit_flags, argptr GASNETI_THREAD_PASS); gasneti_assert(!rc || (commit_flags & GEX_FLAG_IMMEDIATE)); } va_end(argptr); if (!rc) gasneti_reset_srcdesc(sd); return rc; } int gasnetc_AM_CancelRequestMedium( gex_AM_SrcDesc_t sd_arg, gex_Flags_t flags) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_CANCEL_REQ(sd,flags,Medium); if (sd->_is_nbrhd) { gasnetc_nbrhd_CancelRequest(sd, gasneti_Medium, flags); } else { gasnetc_ofi_CancelMedium(sd); } gasneti_reset_srcdesc(sd); return GASNET_OK; } #endif // GASNET_NATIVE_NP_ALLOC_REQ_MEDIUM #if GASNET_NATIVE_NP_ALLOC_REP_MEDIUM extern gex_AM_SrcDesc_t gasnetc_AM_PrepareReplyMedium( gex_Token_t token, const void *client_buf, size_t least_payload, size_t most_payload, gex_Event_t *lc_opt, gex_Flags_t flags, unsigned int numargs) { GASNETI_TRACE_PREP_REPLYMEDIUM(token,client_buf,least_payload,most_payload,flags,numargs); gasneti_AM_SrcDesc_t sd; flags &= ~(GEX_FLAG_AM_PREPARE_LEAST_CLIENT | GEX_FLAG_AM_PREPARE_LEAST_ALLOC); if (gasnetc_token_in_nbrhd(token)) { sd = gasnetc_nbrhd_PrepareReply(gasneti_Medium, token, client_buf, least_payload, most_payload, NULL, lc_opt, flags, numargs); } else { GASNET_BEGIN_FUNCTION(); // TODO-EX: stash threadinfo in token sd = gasneti_init_reply_srcdesc(GASNETI_THREAD_PASS_ALONE); GASNETI_COMMON_PREP_REP(sd,token,client_buf,least_payload,most_payload,NULL,lc_opt,flags,numargs,Medium); size_t size = gasnetc_Token_MaxReplyMedium(token, lc_opt, flags, numargs); size = MIN(size, most_payload); size = MAX(size, least_payload); gex_Rank_t jobrank = ((gasnetc_ofi_am_send_buf_t*)token)->sourceid; sd = gasnetc_ofi_PrepareMedium(sd, /*isreq*/0, jobrank, client_buf, size, flags, numargs GASNETI_THREAD_PASS); if (lc_opt) gasneti_leaf_finish(lc_opt); // TODO-EX: async LC } GASNETI_TRACE_PREP_RETURN(REPLY_MEDIUM, sd); GASNETI_CHECK_SD(client_buf, least_payload, most_payload, sd); return gasneti_export_srcdesc(sd); } extern int gasnetc_AM_CommitReplyMediumM( gex_AM_Index_t handler, size_t nbytes, gex_Flags_t commit_flags, #if GASNET_DEBUG unsigned int nargs_arg, #endif gex_AM_SrcDesc_t sd_arg, ...) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_COMMIT_REP(sd,handler,nbytes,NULL,commit_flags,nargs_arg,Medium); int rc = GASNET_OK; // assume success va_list argptr; va_start(argptr, sd_arg); if (sd->_is_nbrhd) { gasnetc_nbrhd_CommitReply(sd, gasneti_Medium, handler, nbytes, NULL, argptr); } else { GASNET_POST_THREADINFO(sd->_thread); rc = gasnetc_ofi_CommitMedium(sd, /*isreq*/0, handler, nbytes, commit_flags, argptr GASNETI_THREAD_PASS); gasneti_assert(!rc || (commit_flags & GEX_FLAG_IMMEDIATE)); } va_end(argptr); if (!rc) gasneti_reset_srcdesc(sd); return rc; } int gasnetc_AM_CancelReplyMedium( gex_AM_SrcDesc_t sd_arg, gex_Flags_t flags) { gasneti_AM_SrcDesc_t sd = gasneti_import_srcdesc(sd_arg); GASNETI_COMMON_CANCEL_REP(sd,flags,Medium); if (sd->_is_nbrhd) { gasnetc_nbrhd_CancelReply(sd, gasneti_Medium, flags); } else { gasnetc_ofi_CancelMedium(sd); } gasneti_reset_srcdesc(sd); return GASNET_OK; } #endif // GASNET_NATIVE_NP_ALLOC_REP_MEDIUM /* ------------------------------------------------------------------------------------ */ /* Handler-safe locks ================== */ #if !GASNETC_NULL_HSL extern void gasnetc_hsl_init (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); gasneti_mutex_init(&(hsl->lock)); } extern void gasnetc_hsl_destroy(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); gasneti_mutex_destroy(&(hsl->lock)); } extern void gasnetc_hsl_lock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); { #if GASNETI_STATS_OR_TRACE gasneti_tick_t startlock = GASNETI_TICKS_NOW_IFENABLED(L); #endif #if GASNETC_HSL_SPINLOCK if_pf (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { if (gasneti_wait_mode == GASNET_WAIT_SPIN) { while (gasneti_mutex_trylock(&(hsl->lock)) == EBUSY) { gasneti_spinloop_hint(); } } else { gasneti_mutex_lock(&(hsl->lock)); } } #else gasneti_mutex_lock(&(hsl->lock)); #endif #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); GASNETI_TRACE_EVENT_TIME(L, HSL_LOCK, hsl->acquiretime-startlock); #endif } } extern void gasnetc_hsl_unlock (gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); GASNETI_TRACE_EVENT_TIME(L, HSL_UNLOCK, GASNETI_TICKS_NOW_IFENABLED(L)-hsl->acquiretime); gasneti_mutex_unlock(&(hsl->lock)); } extern int gasnetc_hsl_trylock(gex_HSL_t *hsl) { GASNETI_CHECKATTACH(); { int locked = (gasneti_mutex_trylock(&(hsl->lock)) == 0); GASNETI_TRACE_EVENT_VAL(L, HSL_TRYLOCK, locked); if (locked) { #if GASNETI_STATS_OR_TRACE hsl->acquiretime = GASNETI_TICKS_NOW_IFENABLED(L); #endif } return locked ? GASNET_OK : GASNET_ERR_NOT_READY; } } #endif /* ------------------------------------------------------------------------------------ */ /* Private Handlers: ================ see mpi-conduit and extended-ref for examples on how to declare AM handlers here (for internal conduit use in bootstrapping, job management, etc.) */ static gex_AM_Entry_t const gasnetc_handlers[] = { GASNETC_COMMON_HANDLERS(), /* ptr-width independent handlers */ gasneti_handler_tableentry_no_bits(gasnetc_exit_reqh,2,REQUEST,SHORT,0), /* ptr-width dependent handlers */ // none GASNETI_HANDLER_EOT }; gex_AM_Entry_t const *gasnetc_get_handlertable(void) { return gasnetc_handlers; } /* ------------------------------------------------------------------------------------ */ gasnet-2025.8.0/ofi-conduit/contrib/0000775000175000017500000000000015142313673017302 5ustar alastairalastairgasnet-2025.8.0/ofi-conduit/contrib/gasnetrun_ofi.in0000664000175000017500000000110215142313673022467 0ustar alastairalastair#!@BOURNE_SHELL@ GASNET_OFI_SPAWNER="${GASNET_OFI_SPAWNER:-@GASNET_OFI_SPAWNER_CONF@}" export GASNET_OFI_SPAWNER GASNET_SPAWN_CONDUIT=OFI export GASNET_SPAWN_CONDUIT @MPIRUN_COMMON@ @HAVE_BOOTSTRAP_MPI_TRUE@GASNET_SPAWN_HAVE_MPI=1 @HAVE_BOOTSTRAP_MPI_FALSE@GASNET_SPAWN_HAVE_MPI=0 export GASNET_SPAWN_HAVE_MPI @HAVE_BOOTSTRAP_PMI_TRUE@GASNET_SPAWN_HAVE_PMI=1 @HAVE_BOOTSTRAP_PMI_FALSE@GASNET_SPAWN_HAVE_PMI=0 export GASNET_SPAWN_HAVE_PMI @HAVE_BOOTSTRAP_SSH_TRUE@GASNET_SPAWN_HAVE_SSH=1 @HAVE_BOOTSTRAP_SSH_FALSE@GASNET_SPAWN_HAVE_SSH=0 export GASNET_SPAWN_HAVE_SSH @PERLSTART@ gasnet-2025.8.0/ofi-conduit/contrib/Makefile.am0000664000175000017500000000322015142313673021333 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: /var/local/cvs/gasnet/ofi-conduit/contrib/Makefile.am,v $ # $Date: 2013/08/23 23:44:25 $ # $Revision: 1.3 $ # Description: Makefile for GASNet OFI spawner # Terms of use are as specified in ofi-conduit/license.txt AUTOMAKE_OPTIONS = foreign 1.4 # Use of the MPI/PMI spawning support is optional if HAVE_BOOTSTRAP_MPI mpi_target_pl = gasnetrun_ofi-mpi.pl $(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl cp -f "$?" $@ else if HAVE_BOOTSTRAP_PMI mpi_target_pl = gasnetrun_ofi-mpi.pl $(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl cp -f "$?" $@ else mpi_target_pl = endif endif target = gasnetrun_ofi target_pl = $(target).pl # Need a bin_DATA rule, but automake disallows that. So, fake it. dotpldir = $(bindir) # Make sure the perl script and shell wrapper are always current locally. # This ensures we can run from the build directory if needed. $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart $(top_builddir)/other/mpirun_common: $(top_srcdir)/other/mpirun_common.in @cd $(top_builddir)/other && $(MAKE) mpirun_common $(target): $(top_builddir)/other/perlstart $(top_builddir)/other/mpirun_common $(target_pl): $(top_srcdir)/other/spawner/gasnetrun.pl cp -f "$<" $@ all-local: $(target) $(target_pl) $(mpi_target_pl) DISTCLEANFILES = $(target) $(target_pl) $(mpi_target_pl) # Conditionally install the .pl and its wrapper if USE_OFI_CONDUIT scripts = $(target) data = $(target_pl) $(mpi_target_pl) else scripts = data = endif bin_SCRIPTS = $(scripts) dotpl_DATA = $(data) gasnet-2025.8.0/ofi-conduit/contrib/Makefile.in0000664000175000017500000005373215142313673021361 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: /var/local/cvs/gasnet/ofi-conduit/contrib/Makefile.am,v $ # $Date: 2013/08/23 23:44:25 $ # $Revision: 1.3 $ # Description: Makefile for GASNet OFI spawner # Terms of use are as specified in ofi-conduit/license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = ofi-conduit/contrib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = gasnetrun_ofi CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dotpl_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gasnetrun_ofi.in \ $(top_srcdir)/config-aux/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = gasnetrun_ofi target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_FALSE@mpi_target_pl = @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@mpi_target_pl = gasnetrun_ofi-mpi.pl # Use of the MPI/PMI spawning support is optional @HAVE_BOOTSTRAP_MPI_TRUE@mpi_target_pl = gasnetrun_ofi-mpi.pl target_pl = $(target).pl # Need a bin_DATA rule, but automake disallows that. So, fake it. dotpldir = $(bindir) DISTCLEANFILES = $(target) $(target_pl) $(mpi_target_pl) @USE_OFI_CONDUIT_FALSE@scripts = # Conditionally install the .pl and its wrapper @USE_OFI_CONDUIT_TRUE@scripts = $(target) @USE_OFI_CONDUIT_FALSE@data = @USE_OFI_CONDUIT_TRUE@data = $(target_pl) $(mpi_target_pl) bin_SCRIPTS = $(scripts) dotpl_DATA = $(data) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ofi-conduit/contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign ofi-conduit/contrib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): gasnetrun_ofi: $(top_builddir)/config.status $(srcdir)/gasnetrun_ofi.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) install-dotplDATA: $(dotpl_DATA) @$(NORMAL_INSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dotpldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dotpldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dotpldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dotpldir)" || exit $$?; \ done uninstall-dotplDATA: @$(NORMAL_UNINSTALL) @list='$(dotpl_DATA)'; test -n "$(dotpldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(dotpldir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) all-local installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dotpldir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dotplDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-dotplDATA .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ cscopelist-am ctags-am distclean distclean-generic distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am \ install-dotplDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-dotplDATA .PRECIOUS: Makefile @HAVE_BOOTSTRAP_MPI_TRUE@$(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl @HAVE_BOOTSTRAP_MPI_TRUE@ cp -f "$?" $@ @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@$(mpi_target_pl): $(top_srcdir)/other/spawner/gasnetrun_mpi.pl @HAVE_BOOTSTRAP_MPI_FALSE@@HAVE_BOOTSTRAP_PMI_TRUE@ cp -f "$?" $@ # Make sure the perl script and shell wrapper are always current locally. # This ensures we can run from the build directory if needed. $(top_builddir)/other/perlstart: $(top_srcdir)/other/perlstart.in @cd $(top_builddir)/other && $(MAKE) perlstart $(top_builddir)/other/mpirun_common: $(top_srcdir)/other/mpirun_common.in @cd $(top_builddir)/other && $(MAKE) mpirun_common $(target): $(top_builddir)/other/perlstart $(top_builddir)/other/mpirun_common $(target_pl): $(top_srcdir)/other/spawner/gasnetrun.pl cp -f "$<" $@ all-local: $(target) $(target_pl) $(mpi_target_pl) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gasnet-2025.8.0/ofi-conduit/README0000664000175000017500000013402215142313673016524 0ustar alastairalastairGASNet ofi-conduit documentation Copyright 2015-2017, Intel Corporation Portions copyright 2018-2025, The Regents of the University of California. User Information: ---------------- This is the README for ofi-conduit. OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric communication services to applications. OFI is best described as a collection of libraries and applications used to export fabric services. See more details at: https://ofiwg.github.io/libfabric/ This conduit is feature-complete and passes tests in recommended configurations. Performance tuning is planned as future work. Use of ofi-conduit is only recommended on certain networks (see next section). Therefore, it is disabled by default in most systems. It can be enabled explicitly at configure time using either `--enable-ofi` or `--enable-ofi=probe`. Either option will enable ofi-conduit if `configure` locates the prerequisites. The difference is that the first option makes failure to locate the prerequisites fatal in `configure`. Where this conduit runs: ----------------------- The GASNet OFI conduit requires libfabric 1.5 or newer. Use with some providers requires higher minimum versions (see below). The GASNet OFI conduit can run on any OFI provider that matches its requirements. However, at this time, it is recommended *only* for the following networks. + Intel or Cornelis Networks Omni-Path fabric, via the "psm2" provider + HPE Slingshot-10 (100 Gb/s ConnectX-5 NIC), via the "verbs;ofi_rxm" provider + HPE Slingshot-11 (200 Gb/s Cassini NIC), via the "cxi" provider + Cray Aries network, via the experimental "gni" provider The following providers have been used successfully on networks where other GASNet conduits are a more appropriate choice. Therefore we do not recommend use of these providers in general. + TCP, via the "sockets" provider + UDP, via the "udp;ofi_rxd" provider The following providers have not met our expectations (with respect to performance or stability) when tested on the listed networks and therefore are not currently recommended at all. + TCP, via the "tcp;ofi_rxm" provider + InfiniBand, via "verbs;ofi_rxm" provider Independent of recommendations above for or against use of any given provider, the following are minimum libfabric versions below which ofi-conduit will reject certain providers due to known correctness defects in older versions impacting GASNet stability: + "udp;ofi_rxd" 1.7 + "verbs;ofi_rxm" 1.12 (1.11 with HPE Slingshot-10) + "gni" 1.14 + "tcp;ofi_rxm" 1.15 Providers not listed above are accepted from the higher of 1.5 or the first libfabric release in which they appear. The following providers have passed correctness and performance sanity checks at some point in time. However, due to lack of access for periodic testing, we cannot consider these to be supported at this time: + AWS Elastic Fabric Adapter, via "efa" provider The ofi-conduit is currently known to lack support for the following providers as of libfabric v1.14.0. If these providers are important to you, please contact us at gasnet-staff@lbl.gov . + "psm" provider for the (end-of-life) True Scale products + "opx" provider, an alternative to "psm2" for the Omni-Path fabric The fi_info command installed with libfabric can be used to query the available OFI providers on your system. It is worth noting that the available providers on a cluster compute node may differ from those on a front-end node. Users with NVIDIA/Mellanox InfiniBand hardware should use the GASNet ibv-conduit, rather than ofi-conduit with the verbs OFI provider, as the former may provide better performance. Users with InfiniBand hardware with an InfiniPath HCA (PathScale or Qlogic) or True Scale HCA (Intel) should use the GASNet mpi-conduit, rather than ofi-conduit with the verbs OFI provider, as the former may provide better performance. Users with Ethernet hardware are encouraged to consider the GASNet udp-conduit as an alternative to ofi-conduit with the sockets or udp;ofi_rxd providers, as the former may provide more favorable performance. Users with Cray XC hardware are advised that while the GASNet maintainers have seen good results from preliminary testing of the gni provider with GASNet's ofi-conduit, nobody has thoroughly validated it. Therefore, use of the gni provider with ofi-conduit should be considered experimental. Additionally, lack of access means this provider has not been tested since the 2023.3.0 release of GASNet-EX. However, it is recommended over use of mpi-conduit. The ofi-conduit includes support for memory kinds (`GEX_MK_CLASS_CUDA_UVA` and `GASNET_HAVE_MK_CLASS_HIP`) for certain providers and subject to minimum versions of libfabric. See docs/memory_kinds_implementation.md in the GASNet-EX sources for details. OFI provider requirements to run this conduit: ------------------------------------- The provider MUST support all of the following: * API version 1.5 or newer * API version 1.9 or newer if the client will use `gex_MK_Create()` * endpoint type FI_EP_RDM * capability FI_RMA * capability FI_MSG for at least two endpoints per process * capability FI_HMEM if the client will use `gex_MK_Create()` * capability FI_MULTI_RECV unless GASNET_OFI_RECEIVE_BUFF_SIZE=recv * threading mode FI_THREAD_SAFE and/or FI_THREAD_DOMAIN (more info below) The provider MUST NOT require any of the following: * FI_MR_LOCAL * FI_MR_ALLOCATED in GASNET_SEGMENT_EVERYTHING mode * FI_CONTEXT for FI_RMA endpoints * FI_CONTEXT2 * FI_MSG_PREFIX * FI_RESTRICTED_COMP The provider MAY require any of the following: * address vector type FI_AV_TABLE and/or FI_AV_MAP * FI_MR_ENDPOINT * FI_MR_VIRT_ADDR (performance may differ with or without) * FI_MR_PROV_KEY (performance may differ with or without) * FI_RX_CQ_DATA (no operations for which this matters) * FI_ASYNC_IOV (no operations for which this matters) * that at most one endpoint be associated with any given completion queue * (this list is incomplete) Threading mode: FI_THREAD_SAFE and/or FI_THREAD_DOMAIN * In GASNET_SEQ and GASNET_PARSYNC modes, ofi-conduit uses FI_THREAD_DOMAIN since these modes ensure serialization of calls into libfabric. * By default in GASNET_PAR mode, FI_THREAD_SAFE is used with most providers to allow concurrent calls into libfabric. The sole exception is the psm2 provider which defaults to FI_THREAD_DOMAIN due to a lack of FI_THREAD_SAFE support. See the description of --{en,dis}able-ofi-thread-domain, below, for the means to override these defaults. Building ofi-conduit -------------------- Libfabric is a core component of OFI. To use ofi-conduit, the user firsts needs to locate or build an install of libfabric. The source code of libfabric can be found at: https://github.com/ofiwg/libfabric To build GASNet with ofi-conduit enabled, the minimum requirement is [path to]/configure --enable-ofi The following configure options are also available: * --with-ofi-home=INSTALL_PREFIX Used to provide the libfabric install prefix. If not used, the default is based on the location of fi_info in $PATH. If fi_info is not found in $PATH, then this option is required. * --with-ofi-provider=PROVIDER_NAME Since different providers expose different feature sets, ofi-conduit will use compile-time knowledge of the intended provider to elide unneeded code. This option can be used to name the provider to optimize for. If this option is not present, the configure script will attempt to detect an available provider using the fi_info utility, if available. If fi_info is not available, or no supported provider is listed by fi_info, or if the argument to this option is "generic", then provider features will be detected at runtime. While this is flexible as to which providers it supports, it will add branches in critical paths that may increase software overheads. This case is referred to as "generic provider" below. Note that some providers, such as "verbs;ofi_rxm" include a semi-colon in their name. To avoid issues with shell quoting, the configure script will allow substitution of a colon for the semi-colon (e.g. "verbs:ofi_rxm") as well as use of just the first word (e.g. "verbs") if no ambiguity would result. * --with-ofi-num-completions=VALUE Specifies the maximum number of transmit completions to be read from the transmit CQ during each call to the polling function. Default: 64 * --with-ofi-max-medium=VALUE This option specifies the default value of the environment variable GASNET_OFI_MAX_MEDIUM, which in turn determines the value returned by gex_AM_LUB{Request,Reply}Medium(). The value cannot be less than 512. Default: 8192 The following configure flags override options set by provider selection via auto-detection or by the --with-ofi-provider=PROVIDER_NAME option. These are not recommended to be used as tuning options. * --enable-ofi-thread-domain Forces the use of FI_THREAD_DOMAIN in GASNET_PAR mode. This results in one global lock to protect all calls into libfabric. This is the default for psm2 provider. * --disable-ofi-thread-domain Forces the use of FI_THREAD_SAFE in GASNET_PAR mode. This is the default for most providers and for the generic provider case. In GASNET_SEQ and GASNET_PARSYNC modes, the two options above have no effect. * --enable-ofi-mr-virt-addr Indicates that FI_MR_VIRT_ADDR memory registration support will be compiled into the conduit. * --disable-ofi-mr-virt-addr Indicates that FI_MR_VIRT_ADDR memory registration support not will be compiled into the conduit. Currently only "verbs;ofi_rxm" and "gni" providers default to use of FI_MR_VIRT_ADDR. For the generic provider case, the determination is made at runtime. * --enable-ofi-mr-prov-key Indicates that FI_MR_PROV_KEY memory registration support will be compiled into the conduit. * --disable-ofi-mr-prov-key Indicates that FI_MR_PROV_KEY memory registration support not will be compiled into the conduit. Currently only "verbs;ofi_rxm" and "gni" providers default to use of FI_MR_PROV_KEY. For the generic provider case, the determination is made at runtime. * --enable-ofi-mr-scalable [DEPRECATED] This deprecated option is an alias for --disable-ofi-mr-virt-addr --disable-ofi-mr-prov-key and corresponds to the legacy FI_MR_SCALABLE memory registration mode. * --disable-ofi-mr-scalable [DEPRECATED] This deprecated option is an alias for --enable-ofi-mr-virt-addr --enable-ofi-mr-prov-key and corresponds to the legacy FI_MR_BASIC memory registration mode. These options are IGNORED in the presence of any of the following options: --disable-ofi-mr-virt-addr --enable-ofi-mr-virt-addr --disable-ofi-mr-prov-key --enable-ofi-mr-prov-key These options may be removed in a future release. * --enable-ofi-av-map Indicates that only support for address vector type FI_AV_MAP will be compiled into the conduit. * --disable-ofi-av-map Indicates that only support for address vector type FI_AV_TABLE will be compiled into the conduit. Currently all providers default to use of FI_AV_TABLE. For the generic provider case, the determination is made at runtime. * --enable-ofi-multi-cq Indicates that the provider requires the use of distinct completion queues for the transmit completions of each endpoint. This is the default option for the cxi provider. * --disable-ofi-multi-cq Indicates that the provider supports the use of a single completion queue for the transmit completions of multiple endpoints. This is the default (and recommended) option for most providers. For the generic provider case, the logic for Cq creation and polling adapts at runtime to use a single completion queue if possible, and uses multiple Cqs only if necessary. * --enable-ofi-retry-recvmsg Enables logic in ofi-conduit to handle the provider returning `-FI_EAGAIN` from `fi_recvmsg()`. This is the default option for the cxi and udp;ofi_rxd providers and for the generic provider case. * --disable-ofi-retry-recvmsg Disable logic to handle `-FI_EAGAIN` returns from `fi_recvmsg()`. This is the default (and recommended) option for most providers. The default spawner to be used by the gasnetrun_ofi utility can be selected by configuring '--with-ofi-spawner=VALUE', where VALUE is one of 'mpi', 'pmi' or 'ssh'. If this option is not used, mpi is the default when available, and ssh otherwise. Here are some things to consider when selecting a default spawner: + The choice of spawner only affects the protocol used for parallel job setup and teardown; in particular it is NOT used to implement any part of the steady-state GASNet communication operations. As such, the selected protocol needs to be stable and co-exist with GASNet communication, but its performance efficiency is usually not a practical consideration. + mpi-spawner is the default when MPI is available precisely because it is so frequently present on systems where GASNet is to be installed. Additionally, very little (if any) configuration is required and the behavior is highly reliable. + pmi-spawner uses the same "Process Management Interface" which forms the basis for many mpirun implementations. When support is available, this spawner can be as easy to use and as reliable as mpi-spawner, but without the overheads of initializing an MPI runtime. + ssh-spawner depends only on the availability of a remote shell command such as ssh. For this reason ssh-spawner support is always compiled. However, it can be difficult (or impossible) to use on a cluster which was not setup to allow ssh to (and among) its compute nodes. For more information on configuration and use of these spawners, see README-{ssh,mpi,pmi}-spawner (installed) or other/{ssh,mpi,pmi}-spawner/README (source). Depending on the libfabric provider in use, there may be restrictions on how mpi-based spawning is used. For instance, the psm2 provider has the property that each process may only open the network adapter once. Additionally, if the MPI implementation also uses libfabric for communication, then there is a risk it may adjust settings in a way incompatible with ofi-conduit. If you wish to use mpi-spawner, please consult its README for advice on how to set your MPIRUN_CMD to use native TCP/IP to avoid these potential problems. Job Spawning ------------ If using UPC++, Chapel, etc. the language-specific commands should be used to launch applications. Otherwise, applications can be launched using the gasnetrun_ofi utility: + usage summary: gasnetrun_ofi -n [options] [--] prog [program args] options: -n number of processes to run (required) -N number of nodes to run on (not always supported) -c number of cpus per process (not always supported) -E list of environment vars to propagate -v be verbose about what is happening -t test only, don't execute anything (implies -v) -k keep any temporary files created (implies -v) -spawner= force use of a specific spawner ([supported spawners]) -- ends option parsing There are as many as three possible methods (ssh, mpi and pmi) by which one can launch an ofi-conduit application. Ssh-based spawning is always available, and mpi- and pmi-based spawning are available if the respective support was located at configure time. The default is established at configure time (see section "Building ofi-conduit", above). To select a non-default spawner one may either use the "-spawner=" command- line argument or set the environment variable GASNET_OFI_SPAWNER to "ssh", "mpi" or "pmi". If both are used, then the command line argument takes precedence. Recognized environment variables: --------------------------------- * GASNET_OFI_SPAWNER To override the default spawner for ofi-conduit jobs, one may set this environment variable as described in the section "Job Spawning", above. There are additional settings which control behaviors of the various spawners, as described in the respective READMEs (listed in section "Building ofi-conduit", above). * GASNET_QUIET - set to 1 to silence the startup warning indicating the provider in use may deliver suboptimal performance. * GASNET_OFI_RMA_POLL_FREQ - In order to ensure efficient progress, the conduit polls the RMA transmit completion queue once for every GASNET_OFI_RMA_POLL_FREQ RMA injections. Default: 32 * GASNET_OFI_NUM_BBUFS, GASNET_OFI_BBUF_SIZE, GASNET_OFI_BBUF_THRESHOLD - See the "Non-bulk, Non-blocking Put Functions" section for detail on these environment variables. * GASNET_OFI_NUM_RECEIVE_BUFFS and GASNET_OFI_RECEIVE_BUFF_SIZE - Active Message receive resources. These two settings control, respectively, the number and size of the "multi-receive" buffers allocated for the reception of in-bound AMs. Depending on the given provider's implementation of `FI_MULTI_RECV`, increasing these may improve AM throughput or have no impact. On some providers, reducing these may severely reduce AM throughput or even lead to crashes. Defaults: 8 and 1M See also: Bug 4461 and Bug 4517 under "Known problems" * GASNET_OFI_AM_INJECT_LIMIT - limit on size of fi_inject() payload. GASNet Active Messages of total size (at the ofi level) no larger than this parameter value will be sent using fi_inject(), and larger messages are sent using fi_send(). Use of fi_inject() reduces the overall complexity of the operation by ensuring the data is consumed synchronously, usually at the cost of an extra copy. Meanwhile, fi_send() consumes the data asynchronously, eliminating the extra copy at the expense of signaling an asynchronous local completion. This setting does not affect payload local completion semantics at the GASNet API level. It too large a value is requested, it will be reduced to the maximum which the OFI provider can support. Default: largest size supported by the provider. NOTE: If this parameter is not set, then "GASNET_OFI_INJECT_LIMIT" is accepted as an alias. * GASNET_OFI_RMA_INJECT_LIMIT - limit on size of RMA with FI_INJECT GASNet RMA put operations no larger than this size may be issued using the `FI_INJECT` flag to ensure the data is consumed synchronously. This can reduce the overall complexity of operations using `GEX_EVENT_NOW`, typically at cost of an extra copy. This setting does not affect local completion semantics at the GASNet API level. It too large a value is requested, it will be reduced to the maximum which the OFI provider can support. Default: largest size supported by the provider. * GASNET_OFI_TX_CQ_SIZE and GASNET_OFI_RX_CQ_SIZE - limits on completion queue length. These settings control the length of the completion queues (CQs) used for transmit and receive operations, respectively. The default of zero allows the provider to determine the length. Use of this default is recommended unless debugging a possible Cq overrun. * GASNET_OFI_MAX_REQUEST_BUFFS and GASNET_OFI_MAX_REPLY_BUFFS - limits on the number of buffers allocated for the construction of out-bound AM Requests and Replies, respectively. The default for both settings is 1024. * GASNET_OFI_NUM_INITIAL_REQUEST_BUFFS and GASNET_OFI_NUM_INITIAL_REPLY_BUFFS - the number of buffers to allocate at startup for the construction of out-bound AM Requests and Replies, respectively. If these values are lower than the corresponding "MAX" values (described immediately above) then the difference *may* be allocated dynamically, but only as needed. The default for each setting is the smaller of 256 or the respective MAX. In other words: with all defaults, 256 buffers are allocated to each pool and each poll is permitted to grow as large as 1024 buffers if the demand exists. * GASNET_OFI_MAX_MEDIUM - maximum AM Medium payload size This setting determines the size of buffers used for AM Mediums, and thus the return value of the gex_AM_LUB{Request,Reply}Medium() queries. The value cannot be less than 512. Unless a different value was set using --with-ofi-max-medium=[value] at configure time, the default value is 8192. * GASNET_OFI_SET_UNIVERSE_SIZE - enable automatic setting of FI_UNIVERSE_SIZE Setting GASNET_OFI_SET_UNIVERSE_SIZE=1 *allows* ofi-conduit to set FI_UNIVERSE_SIZE to the job size *if* it is not already set. Under no circumstances does ofi-conduit overwrite a pre-existing value. The default value is 1, unless using a libfabric version older than 1.15.2.0 together with the "cxi" or "generic" provider (due to bug 4413). * GASNET_OFI_DEVICE By default, ofi-conduit will open and use the first device enumerated by libfabric as matching the specified provider and required capabilities. This setting can be used to specify a device to be used in place of this default. See 'GASNET_OFI_LIST_DEVICES' and 'GASNET_OFI_LIST_DEVICES_NODES' for how to enumerate available devices. See also 'GASNET_OFI_DEVICE_*', immediately below. * GASNET_OFI_DEVICE_* The environment variable 'GASNET_OFI_DEVICE', described immediately above, provides only a single setting and unless one uses some external means to give per-process settings, this cannot provide per-process control. This can make it difficult to get the best performance from multi-rail systems with multiple processes per node and architectural locality properties that affect PCI/adapter access efficiency. See "topology-aware environment variable families" in GASNet's top-level README for a description of how 'GASNET_OFI_DEVICE_TYPE' can be used to establish process-specific values for 'GASNET_OFI_DEVICE'. As a concrete example, on OLCF's Frontier there are four NICs -- one per NUMA Node. Examining the corresponding Quick Start Guide one can construct the following settings to ensure processes bound to cores in a single NUMA Node will use the topologically nearest NIC: GASNET_OFI_DEVICE_TYPE=Node GASNET_OFI_DEVICE_0=cxi2 GASNET_OFI_DEVICE_1=cxi1 GASNET_OFI_DEVICE_2=cxi3 GASNET_OFI_DEVICE_3=cxi0 These specific recommendations are appropriate to the specific composition of a node of OLCF's Frontier, and should not be considered as generic advice for use of all multi-NIC systems. Of course, even on the same system, your mileage may vary. By default 'GASNET_OFI_DEVICE_TYPE' is "Socket" and all other variables in this family are unset. There is currently no support for GASNET_OFI_DEVICE_TYPE == "Auto". * GASNET_OFI_LIST_DEVICES The value is a boolean: "0" to disable or "1" to enable the reporting of all supportable provider/device pairs. In this context, "supportable" may be constrained by such factors as the configured provider or use of environment variables which constrain provider enumeration. If libhwloc 2.0 or higher was detected at configure time, then this output includes a distance ranking for each device for which the information can be found. A ranking of "1" denotes the topologically nearest devices (i.e. "first place"). If present, "2" will denote any device(s) less near than the "1" device(s) but nearer than any "3"s, etc. Note that ties are possible. This ranking of distance depends on libfabric's ability to provide device names (or PCI addresses) which hwloc can recognize, and thus may vary depending on the versions of hwloc and libfabric and on the provider in use. Currently, the status is as follows: + There are no known dependencies on hwloc version. + The `cxi`, `verbs`, `sockets`, `tcp` and `udp` providers are all believed to support applicable devices with their respective supported libfabric versions. + No version of the `psm2` provider (Omni-Path) supports distance ranking. + The status of the `gni` and `efa` providers are unknown. See 'GASNET_OFI_LIST_DEVICES_NODES' for how to limit which nodes report. The default is "0" (no report). * GASNET_OFI_LIST_DEVICES_NODES If GASNET_OFI_LIST_DEVICES is enabled, then this setting may be used to limit which nodes report providers/devices pairs. The value is a list which may contain one or more integers or ranges separated by commas, such as "0,2-4,6". If unset, empty, or equal to "*" then all nodes will report (if enabled by GASNET_OFI_LIST_DEVICES). The default is no limit on which nodes report. * FI_PROVIDER - set to a provider name to override the default OFI provider selection Note that only in the "generic provider" case (described with the configure options) can this actually be used to change the provider to one different than selected at configure time. * FI_UNIVERSE_SIZE - This libfabric variable conveys the number of ranks / peers a given process endpoint expects to communicate with (default: 256). This setting is not directly consumed by GASNet ofi-conduit, but affects the behavior of the underlying providers it relies upon. Libfabric documentation encourages users to set this high enough to prevent internal CQ overruns for non-scalable communication patterns, but not so high as to waste provider-internal memory. See "GASNET_OFI_SET_UNIVERSE_SIZE" documentation for information on when this value is set automatically by ofi-conduit. Most notably, ofi-conduit will not overwrite a value set by the user. * FI_MR_CACHE_MAX_{SIZE,COUNT} - These libfabric variables control the cache of memory registrations used in some providers. These settings are not directly consumed by GASNet ofi-conduit, but affect the behavior of some underlying providers it relies upon. When using a provider known to experience degraded RMA performance with the defaults, ofi-conduit may set these values to "-1" to remove all limits on the memory registration cache. See Bug 4676 under "Known problems" for information on when these variables are set by ofi-conduit. Most notably, ofi-conduit will not overwrite a value set by the user. * FI_PSM2_LOCK_LEVEL - This variable only applies to the psm2 provider where it controls the internal locking state of the provider and can be set to the following three values: - FI_PSM2_LOCK_LEVEL=0: All locks inside of the provider will be disabled. - FI_PSM2_LOCK_LEVEL=1: Some locks inside of the provider will be disabled, and is suitable for programs that limit the access to each PSM2 context to a single thread. - FI_PSM2_LOCK_LEVEL=2: All locks inside of the provider are enabled. The default setting of this variable is 2. The original author recommends using a value of 0 when using GASNet in GASNET_SEQ mode and a value of 1 when running in GASNET_PARSYNC mode. For GASNET_PAR mode, a value of 1 should only be used if GASNet was configured with --enable-ofi-thread-domain, which only will allow a single thread to make calls into libfabric at a time. Otherwise, the default value of 2 should be used. This variable should be used by power users only and should be used at your own risk. * All the environment variables provided by libfabric (see `fi_info -e`) Note that many of these influence provider-specific behaviors, and in some cases setting non-default values may negatively affect the operation of ofi-conduit. * The environment variables described in the "Non-bulk, Non-blocking Put Functions" section of this file. * All the standard GASNet environment variables (see top-level README) Non-bulk, Non-blocking Put Functions ------------------------------------ For some calls to gex_RMA_Put{NB,NBI}() GASNet-EX requires the source buffer to be able to be reused as soon as the function returns. The ofi-conduit implements this by a hybrid approach that uses the FI_INJECT flag, bounce buffers, and blocking operations. * If the nbytes parameter is less than or equal to the chosen provider's inject_size (see the fi_endpoint(3) man page), the FI_INJECT flag will be used. * If the nbytes parameter is greater than the inject size but less than or equal to a user specifiable threshold (default is 4 times the bounce buffer size) then bounce buffers will be used. * If the nbytes parameter is greater than the threshold, the operation will be implemented as a fully-blocking operation. The following GASNet statistics counters show the number of times each of these code paths are entered: NB_PUT_INJECT, NB_PUT_BOUNCE, NB_PUT_BLOCK. The following environment variables may be used to tune this behavior: * GASNET_OFI_BBUF_SIZE - The size of each bounce buffer. Default is GASNET_PAGESIZE. * GASNET_OFI_NUM_BBUFS - The number of bounce buffers to be allocated at initialization. Default: 64 * GASNET_OFI_BBUF_THRESHOLD - Payload sizes above GASNET_OFI_BBUF_THRESHOLD will be transferred as a blocking operation. This is useful for when the overheads of bounce buffering become too great. Default: (4 * GASNET_OFI_BBUF_SIZE). * The following condition must hold: GASNET_OFI_NUM_BBUFS >= GASNET_OFI_BBUF_THRESHOLD/GASNET_OFI_BBUF_SIZE * These defaults are chosen to optimize for a 256K L2 cache, assuming 4K pages. It is recommended to modify these variables so that GASNET_PAGESIZE * GASNET_OFI_NUM_BBUFS == L2-cache-size. * These parameters only apply to gex_RMA_Put{NB,NBI}() with (lc_opt != GEX_EVENT_DEFER). They do not apply to gets, nor to blocking or value-based puts. Known problems: --------------- * Bug 4267 Multi-threaded applications in which one or more threads are using GASNet concurrent with another thread calling gasnet_exit() may experience "random crashes" as the exiting thread destroys resources in use by the others. This includes otherwise benign calls to gasnet_AMPoll(). The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4267 * Bugs 4420 and 4503 At least verbs;ofi_rxm and cxi providers are known to fail when using read-only memory as the source of an RMA Put and/or AM Long operation. The most up-to-date information on these bugs are maintained at the follow: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4420 (verbs) https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4503 (cxi) * Bug 4422 By default, multi-threaded applications run on a single core when using psm2 provider (for Omni-Path networks). There are two known work-arounds available: + The undesired pinning to a single core will not take place if the process is already pinned to a strict subset of the host's CPU cores. In many cases there are other motivations (such as NUMA affinity) for such pinning, making this our preferred recommendation when practical. However, the best means to accomplish this may depend on the batch system. An approach using hwloc-bind (independent of batch system) is demonstrated in the bug report (see link below). + If pinning to a strict subset of the host's CPU cores is either undesirable or impractical, one may instead set HFI_NO_CPUAFFINITY=1 in the environment to disable the undesired single-core pinning behavior. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4422 * Bug 4461 Under certain AM traffic patterns, the cxi provider (for the Slingshot-11 network on some HPE Cray EX systems) has been observed to fail in various ways, including crashes and dropped messages. At the time of this writing, we recommend updating the Slingshot Host Software to version 2.1.0 or newer. If that is not possible, an alternative work-around is to set GASNET_OFI_RECEIVE_BUFF_SIZE=recv in your environment. Empirical evidence shows both alternatives will prevent crashes in applications which exhibit them (which is *not* every application). However, the possibility of application hangs due to dropped messages remains. Note that the environment setting disables use of the "multi-receive" feature of libfabric, and the default for GASNET_OFI_NUM_RECEIVE_BUFFS is adjusted to compensate. This measurably increases the latency of small AM operations. So, it should only be used with older Slingshot releases and only if it is suspected that bug 4461 is impacting your application. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4461 * Bug 4517 In libfabric 1.11 and earlier, the verbs;ofi_rxm provider used on the Slingshot-10 network of some HPE Cray EX systems has been observed to experience corruption of AMs, which (at least sometimes) are diagnosed with a fatal error message like one of the following: GASNet node [...] received an AM message from node [...] for a handler index with no associated AM handler function registered OR *** FATAL ERROR: Assertion failure (proc 0): in gasnetc_ofi_handle_am() at [...]/ofi-conduit/gasnet_ofi.c:1341: isreq == header->isreq op1 : 1 (0x00000001) == isreq op2 : 0 (0x00000000) == header->isreq At the time of this writing, the best known work-around is to update libfabric to version 1.12 or newer. However, replacing the vendor's version on a system like the HPE Cray EX is generally not advisable. So, for such systems an alternative work-around is to set GASNET_OFI_RECEIVE_BUFF_SIZE=recv in your environment. This setting disables ofi-conduit's use of libfabric's "multi-receive" feature, and adjusts the default value for GASNET_OFI_NUM_RECEIVE_BUFFS to some unspecified larger value to compensate. Empirical evidence shows this prevents the failures in applications which exhibit them (which is *not* every application). However, this measurably increases the latency of small AM operations. So, this should only be used if it is suspected that bug 4517 is impacting your application. NOTE: On networks other than Slingshot-10, ofi-conduit enforces a minimum libfabric version of 1.12 for this provider and this bug should not arise. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4517 * Bug 4554 On an HPE Cray EX system with Nvidia GPUs, Slingshot-11 network, and the 2.0.0 release of the Slingshot host software, it has been observed that tests using `GEX_MK_CLASS_CUDA_UVA` would crash in RMA Put operations of 224 bytes or less. An example backtrace would include something like the following, where the "cuda_gdrcopy_*" frames are the key ones: [3] #7 [3] #8 cuda_gdrcopy_impl (handle=0, devptr=0x148e53200000, hostptr=0x17d27f0, len=4, dir=dir@entry=GDRCOPY_FROM_DEVICE) at src/hmem_cuda_gdrcopy.c:265 [3] #9 0x0000148e9e82e9c4 in cuda_gdrcopy_from_dev (handle=, hostptr=, devptr=, len=) at src/hmem_cuda_gdrcopy.c:291 [3] #10 0x0000148e9e82d5dd in cuda_copy_from_dev (device=, dst=, src=, size=) at src/hmem_cuda.c:176 [3] #11 0x0000148e9e82c1ed in ofi_copy_from_hmem (size=4, src=, If one experiences crashes similar to the backtrace above with NVIDIA GPUs and the Slingshot-11 network, check if the command `rpm -qa libfabric` reports a version containing "SSHOT2.0.0". If it does, then this bug is present and the only known work-around for a user is to set `FI_HMEM_CUDA_USE_GDRCOPY=no` in one's environment. We also recommend asking your system administrator to upgrade to Slingshot 2.0.1 or newer. The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4554 * Bug 4565 Use of explicit --with-ofi-provider=generic with the Cray Aries network (gni provider) selects a memory registration mode for which the provider claims support, but which does not work in practice. There are currently two known work-arounds at configure time: + The following overrides the dynamic selection of memory registration mode: --with-ofi-provider=generic --enable-ofi-virt-addr --enable-ofi-mr-prov-key The resulting GASNet will only work with the gni and verbs providers, despite otherwise preserving use of the generic provider. + The following specializes for gni, disabling dynamic feature detection: --with-ofi-provider=gni The resulting GASNet will only work with gni provider. The most up-to-date information on this bug, including known work-arounds, is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4565 * Bug 4581 Currently, ofi-conduit's implementation of `gasnet_getMaxLocalSegmentSize()` does not take into consideration any limits a given provider may impose on the maximum length of a memory registration. This may result in warnings like the following (often followed by a fatal error in the client): *** WARNING (proc 0): Unexpected error -12 (Cannot allocate memory) from fi_mr_regattr() when binding segment [0x.., 0x...) to EP 0 The only known work-around at this time is to allocate a smaller segment. The most up-to-date information on this bug, including known work-arounds, is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4581 * Bug 4652 There exist versions and/or configurations of Slurm on HPE Cray EX systems which prevent the launch of single-node ofi-conduit jobs with the cxi provider. Failure messages (one per-process) look like the following: *** FATAL ERROR (proc 0): in gasnetc_ofi_init() at [...]/gasnet_ofi.c:1164: fi_domain failed: -38(Function not implemented) For certain versions/configurations, one can work around this issue either by adding `--network=single_node_vni` to one's `srun` command or by setting `SLURM_NETWORK=single_node_vni` in the environment. However, there are also versions/configurations for which there is no known work-around. The most up-to-date information on this bug, including known work-arounds, is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4652 * Bug 4676 It is known that the default values of the FI_MR_CACHE_MAX_COUNT and FI_MR_CACHE_MAX_SIZE environment variables can adversely impact RMA performance when using the cxi or verbs providers. Therefore, by default when configured to use either of these two providers (or the "generic" provider with FI_PROVIDER set to "cxi" or "verbs") ofi-conduit will set these variables to "-1" in order to remove the limits on the memory registration cache. However, the conduit will never overwrite a user-provided setting. To request the libfabric default values for either variable, one may set them to an empty string, which instructs ofi-conduit to unset the variable. Note that if libfabric is initialized prior to ofi-conduit, such as by an libfabric-based MPI used for job launch, then neither the automatic behavior nor the use of an empty string to suppress it will occur early enough to have the desired effect. In such cases, it is recommended to set these two environment variables to "-1" manually (to remove the limits) or to leave them unset (to use libfabric's default values). The most up-to-date information on this bug is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4676 * CXI provider and large procs-per-node (includes bugs 4478 and 4480) There have been observations of multiple failure modes early in startup when using the "cxi" provider with 128 or more processes per node. These include fatal errors (see bug 4480) and in some cases hangs (see bug 4478). The most up-to-date information on these issues is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4478 and https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4480 * Bug 4750 GASNet supports RMA and AM Long to/from any valid local address, including addresses within the segment of a shared-memory peer when cross-mapped via PSHM. However, it has been observed that with the cxi provider on an HPE Cray EX system, such cross-mapped accesses do not work together with PSHM over XPMEM (not the default). While not observed directly, we suspect that other providers which register memory with the NIC (e.g. verbs) may also fail when using PSHM over XPMEM. The most up-to-date information on this issue is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4750 * See docs/memory_kinds_implementation.md in the GASNet-EX sources for current information regarding known issues with respect to memory kinds support in ofi-conduit. * See the GASNet Bugzilla server for details on additional known bugs: https://gasnet-bugs.lbl.gov/ * Limits to MPI interoperability (includes bugs 4455 and 4638) Depending on the libfabric provider in use, it may not be possible to have both MPI and GASNet using the native network API in the same application. There are known issues with the psm2 and cxi providers, though the latter's issue also represents a general concern. The psm2 provider has the property that each process may only open the network adapter once. If you wish to use MPI and GASNet in the same application on the Omni-Path (OPA) fabric, then there are two options: 1. GASNet may be configured to use an alternative transport. Options include mpi- and udp-conduits. 2. MPI may be configured to use an alternative transport (most likely TCP). The relative performance implications of these options depends strongly on the properties of each application. The cxi provider requires use of `FI_` environment variables to configure the provider to reliably handle Active Messages under heavy loads. It has been observed that HPE Cray MPI uses some of the same settings, but with values which differ from ofi-conduit's validated values. As a result, initializing MPI prior to GASNet *might* yield less reliable Active Messages and possible hangs or crashes. Therefore, by default, when an ofi-conduit application is launched using `srun`, care is taken to avoid initializing MPI as the spawner. This is the recommended practice for applications which do not also use MPI. The most up-to-date information on this issue is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4455 While there is a conflict between the cxi provider settings preferred by HPE Cray MPICH and GASNet-EX's ofi-conduit, it *is* possible to run hybrid applications which use both. However, if GASNet-EX is initialized before MPI, one may see failures of MPI_init() with messages including text like the following: create_endpoint(1311).......: OFI EP enable failed (ofi_init.c:1311:create_endpoint:Address already in use) This can be resolved by ensuring that MPI initializes first. That can be accomplished either explicitly in the application source code, or implicitly by setting `GASNET_OFI_SPAWNER=mpi` in the environment at application run time. Unfortunately, that will lead to lengthy warnings which begin with the following text: *** WARNING: ofi-conduit failed to configure FI_CXI_* environment variables due to prior conflicting settings. The warning message ends with text directing the reader here. The most up-to-date information on this issue, including recommendations regarding the "conflicting settings" warning, is maintained at: https://gasnet-bugs.lbl.gov/bugzilla/show_bug.cgi?id=4638 With the gni provider, when Cray MPI is initialized prior to GASNet (including via use of MPI for job launch), a fatal error is seen at startup which includes the following text: fi_domain failed: -16(Device or resource busy) Meanwhile, hybrid applications which initialize GASNet before MPI have been observed to run correctly. Therefore, the following recommendations apply to gni provider: + Do not use MPI for job launch: Configure using `--with-ofi-spawner=pmi --with-pmi-version=cray` to ensure the `gasnetrun_ofi` script defaults to use of PMI-based job spawning, and that configure will fail if the necessary Cray PMI library cannot be located. This latter point is important even if one is not using the `gasnetrun_ofi` script. + Hybrid applications should initialize GASNet before MPI. As noted above, the specific issue with the cxi provider also represents a more general concern that an MPI implementation may configure libfabric in a way which is incompatible with GASNet's ofi-conduit OR that GASNet's settings could cause problems for the MPI implementation. However, there are currently no known cases of either such interaction other than with the cxi and gni providers as described above. Future work: ------------ The OFI community is working on increasing the number of providers that can support GASNet. * Implement AMLong via target-side reassembly using fi_writedata() * Implement asynchronous LC support for Long, most likely as part of the work to implement target-side reassembly. * Improve non-trivial support for `GEX_FLAG_IMMEDIATE` with AM Long, once target-side reassembly removes the "sync" of "put-sync-send". * Improve asynchronous LC support for Put. Like libibverbs, libfabric does not provide distinct events for local versus remote completion. Therefore, the current support for `GEX_EVENT_{DEFER,GROUP}` signals local completion immediately before remote/operation completion. However, use of `FI_INJECT` could be used to achieve synchronous completion of small Puts in the same manner that ibv-conduit utilizes inline sends. * Extend native support for Negotiated-Payload Active Message (NPAM) Medium to enable xfers larger than Max Medium. * Implement native support for Negotiated-Payload Active Message (NPAM) Long? * Eliminate a buffer copy for AM Medium (and AM Long below the RMA threshold) by using (iov_count > 1) on providers which support it, along with the corresponding asynchronous LC support for AM Medium. * Implement native atomics via FI_ATOMIC * Implement native collectives via FI_COLLECTIVE * Seek a better barrier than RDMADISSEM via FI_COLLECTIVE gasnet-2025.8.0/ofi-conduit/license.txt0000664000175000017500000000541515142313673020032 0ustar alastairalastair$Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/license.txt $ All files in this directory and all sub-directories (except where otherwise noted) are subject to the following licensing terms: --------------------------------------------------------------------------- Copyright (c) 2000-2025 The Regents of the University of California. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without written agreement is hereby granted, provided that the above copyright notice and the following two paragraphs appear in all copies of this software. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. --------------------------------------------------------------------------- --------------------------------------------------------------------------- Copyright (c) 2015-2017 Intel Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------- gasnet-2025.8.0/ofi-conduit/gasnet_ofi.h0000664000175000017500000002320515142313673020133 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/gasnet_ofi.h $ * Description: GASNet libfabric (OFI) conduit Implementation * Copyright 2002, Dan Bonachea * Copyright 2015-2017, Intel Corporation * Portions copyright 2018-2020, The Regents of the University of California. * Terms of use are as specified in license.txt */ #ifndef _GASNET_OFI_H #define _GASNET_OFI_H #include #include #include #include #include #include #include #include // Fatal error with error code ": number(string)" appended #define gasnetc_ofi_fatalerror(desc,ret) do { \ int _gof_ret = (ret); \ gasneti_fatalerror("%s: %d(%s)", (desc), _gof_ret, fi_strerror(- _gof_ret)); \ } while (0) // IFF ret is not SUCCESS generate a fatal error message with the error code #define GASNETC_OFI_CHECK_RET(ret,desc) do { \ int _gocr_ret = (ret); \ if_pf (FI_SUCCESS != _gocr_ret) gasnetc_ofi_fatalerror(desc,_gocr_ret); \ } while (0) #define OFI_AM_MAX_DATA_LENGTH \ GASNETI_ALIGNUP_NOASSERT(gasnetc_ofi_max_medium + \ GASNETI_ALIGNUP_NOASSERT(sizeof(gex_AM_Arg_t) * gex_AM_MaxArgs(), \ GASNETI_MEDBUF_ALIGNMENT), \ GASNETI_MEDBUF_ALIGNMENT) /* Want true atomic operations only in PAR mode, not PARSYNC or SEQ. However, "weak" atomics treat PARSYNC the same as PAR. So, we "roll our own" set of "paratomic" ops using the provided sets of "gasneti_atomic_" and "gasneti_nonatomic_" operations and types. */ #if GASNET_PAR #define gasnetc_paratomic(_id) _CONCAT(gasneti_atomic_,_id) #else #define gasnetc_paratomic(_id) _CONCAT(gasneti_nonatomic_,_id) #endif typedef gasnetc_paratomic(t) gasnetc_paratomic_t; #define gasnetc_paratomic_init gasnetc_paratomic(init) #define gasnetc_paratomic_set gasnetc_paratomic(set) #define gasnetc_paratomic_read gasnetc_paratomic(read) #define gasnetc_paratomic_increment gasnetc_paratomic(increment) #define gasnetc_paratomic_add gasnetc_paratomic(add) #define gasnetc_paratomic_subtract gasnetc_paratomic(subtract) #define gasnetc_paratomic_decrement gasnetc_paratomic(decrement) #define gasnetc_paratomic_decrement_and_test gasnetc_paratomic(decrement_and_test) extern struct fid_fabric* gasnetc_ofi_fabricfd; extern struct fid_domain* gasnetc_ofi_domainfd; extern struct fid_cq* gasnetc_ofi_tx_cqfd; /* CQ for both AM and RDMA tx ops */ extern struct fid_ep* gasnetc_ofi_rdma_epfd; extern struct fid_ep* gasnetc_ofi_request_epfd; extern struct fid_ep* gasnetc_ofi_reply_epfd; extern struct fid_cq* gasnetc_ofi_request_cqfd; extern struct fid_cq* gasnetc_ofi_reply_cqfd; extern size_t gasnetc_max_rma_size; /* The cut off of when to fully block for a non-blocking put*/ extern size_t gasnetc_ofi_bbuf_threshold; typedef enum GASNETC_OFI_AM_TYPE { OFI_AM_SHORT = 0, OFI_AM_MEDIUM, OFI_AM_LONG, OFI_AM_LONG_MEDIUM } gasnetc_ofi_am_type; typedef struct gasnetc_ofi_am_short_buf { gex_AM_Arg_t data[gex_AM_MaxArgs()]; } gasnetc_ofi_am_short_buf_t; typedef struct gasnetc_ofi_am_medium_buf { uint8_t data[1] // Flexible array member. Actual size OFI_AM_MAX_DATA_LENGTH __attribute__((aligned(GASNETI_MEDBUF_ALIGNMENT))); } gasnetc_ofi_am_medium_buf_t; typedef struct gasnetc_ofi_am_long_buf { void *dest_ptr; uint8_t data[1]; // Flexible array member. Actual size OFI_AM_MAX_DATA_LENGTH } gasnetc_ofi_am_long_buf_t; typedef struct gasnetc_ofi_am_send_buf { gasnetc_ofi_am_type type:2; // actual range: 4-valued enum uint8_t argnum:5; // actual range: 0...16, inclusive uint8_t isreq:1; // actual range: Boolean uint8_t overhead; uint8_t handler; uint8_t reserved; // unused padding gex_Rank_t sourceid; union { gasnetc_ofi_am_short_buf_t short_buf; gasnetc_ofi_am_medium_buf_t medium_buf; gasnetc_ofi_am_long_buf_t long_buf; } buf; } gasnetc_ofi_am_send_buf_t; // NOTE: first sizeof(void*) is overwritten when on freelist typedef struct gasnetc_ofi_send_ctxt { struct fi_context ctxt; gasneti_lifo_head_t *pool; gasnetc_ofi_am_send_buf_t sendbuf; } gasnetc_ofi_send_ctxt_t; #define GASNETC_SIZEOF_AM_BUF_T \ (offsetof(gasnetc_ofi_send_ctxt_t, sendbuf.buf.long_buf.data) + OFI_AM_MAX_DATA_LENGTH) typedef struct gasnetc_ofi_recv_ctxt { struct fi_context ctxt; // An opaque array of an even number of void* uint64_t event_cntr; #if GASNETC_OFI_RETRY_RECVMSG struct gasnetc_ofi_recv_ctxt *next; char _pad0[GASNETI_CACHE_PAD(sizeof(struct fi_context) + sizeof(uint64_t) + sizeof(void*))]; #else char _pad0[GASNETI_CACHE_PAD(sizeof(struct fi_context) + sizeof(uint64_t))]; #endif // accessed as a pair except when recycling the multi-recv buffer uint64_t final_cntr; gasnetc_paratomic_t consumed_cntr; } gasnetc_ofi_recv_ctxt_t; /* The following struct is for storing certain dynamically allocated * objects in pools. The GASNet headers state that the first sizeof(void*) * bytes of objects used in its pool functions need to be unused for list * linkage. */ typedef struct gasnetc_ofi_bounce_buf { uintptr_t linkage; void* buf; } gasnetc_ofi_bounce_buf_t; // NOTE: first sizeof(void*) is overwritten when on freelist typedef struct gasnetc_ofi_bounce_op_ctxt { /* Pointer to the original context for the "big" request */ gasnetc_ofi_nb_op_ctxt_t* orig_op; /* bounce buffers to return to the pool */ gasneti_lifo_head_t bbuf_list; // persistent - should not be first // Callback to run upon completion gasnetc_rdma_callback_fn callback; // persistent - should not be first /* Counter to determine when the bbuf transfers are done */ gasnetc_paratomic_t cntr; } gasnetc_ofi_bounce_op_ctxt_t; typedef struct gasnetc_ofi_blocking_op_ctxt { gasnetc_rdma_callback_fn callback; volatile int complete; } gasnetc_ofi_blocking_op_ctxt_t; // Conduit-specific Endpoint type typedef struct gasnetc_EP_t_ { GASNETI_EP_COMMON // conduit-indep part as prefix // conduit-specific fields struct fid_mr* mrfd; #if GASNET_HAVE_MK_CLASS_MULTIPLE int device_only_segment; // non-zero iff the bound segment is INaccessible to host load/store #endif } *gasnetc_EP_t; void gasnetc_auxseg_register(gasnet_seginfo_t si); int gasnetc_ep_bindsegment(gasneti_EP_t ep, gasneti_Segment_t segment); int gasnetc_ep_unbindsegment(gasneti_EP_t ep); void gasnetc_segment_exchange(gex_TM_t tm, gex_EP_t *eps, size_t num_eps); int gasnetc_ofi_init(void); void gasnetc_ofi_poll(void); void gasnetc_ofi_exit(void); /* Active Messages Send Functions */ int gasnetc_ofi_am_send_short(gex_Rank_t dest, gex_AM_Index_t handler, int numargs, va_list argptr, int isreq, gex_Flags_t flags GASNETI_THREAD_FARG); int gasnetc_ofi_am_send_medium(gex_Rank_t dest, gex_AM_Index_t handler, void *source_addr, size_t nbytes, int numargs, va_list argptr, int isreq, gex_Flags_t flags GASNETI_THREAD_FARG); int gasnetc_ofi_am_send_long(gex_Rank_t dest, gex_AM_Index_t handler, void *source_addr, size_t nbytes, void *dest_addr, int numargs, va_list argptr, int isreq, gex_Flags_t flags GASNETI_THREAD_FARG); // Active Message Prepare/Commit extern gasneti_AM_SrcDesc_t gasnetc_ofi_PrepareMedium( gasneti_AM_SrcDesc_t sd, int isreq, gex_Rank_t jobrank, const void *client_buf, size_t size, gex_Flags_t flags, unsigned int numargs GASNETI_THREAD_FARG); int gasnetc_ofi_CommitMedium( gasneti_AM_SrcDesc_t sd, int isreq, gex_AM_Index_t handler, size_t nbytes, gex_Flags_t flags, va_list argptr GASNETI_THREAD_FARG); void gasnetc_ofi_CancelMedium( gasneti_AM_SrcDesc_t sd); // One-sided PUT/GET Functions int gasnetc_rdma_put(gex_TM_t tm, gex_Rank_t rank, void *dest, void * src, size_t nbytes, gasnetc_ofi_nb_op_ctxt_t *ctxt_ptr, int alc, gex_Flags_t flags GASNETI_THREAD_FARG); int gasnetc_rdma_get(void *dest, gex_TM_t tm, gex_Rank_t rank, void * src, size_t nbytes, gasnetc_ofi_nb_op_ctxt_t *ctxt_ptr, gex_Flags_t flags GASNETI_THREAD_FARG); gex_Event_t gasnetc_rdma_put_non_bulk(gex_TM_t tm, gex_Rank_t rank, void* dest_addr, void* src_addr, size_t nbytes, gasnetc_ofi_nb_op_ctxt_t* ctxt_ptr, gex_Flags_t flags GASNETI_THREAD_FARG); extern int gasnetc_exit_in_progress; // Multi-step conversion between function pointer and void* is needed to avoid // pedantic warnings from some compilers which don't understand the C spec. #define gasnetc_assert_callback_eq(p,f) \ gasneti_assert_ptr((void *)(uintptr_t)(p)->callback ,==, (void *)(uintptr_t)(f)) // Maxium number of events (AMs and multi-recv recycles) per poll #ifndef GASNETC_OFI_EVENTS_PER_POLL #define GASNETC_OFI_EVENTS_PER_POLL 16 #endif // Conversion of EP index to memory registration key, // where -1 is used for the aux seg #define _GASNETC_CLIENT_KEY_BASE 1 #define GASNETC_EPIDX_TO_KEY(epidx) ((epidx)+_GASNETC_CLIENT_KEY_BASE) #define GASNETC_AUX_KEY GASNETC_EPIDX_TO_KEY(-1) #endif /*_GASNET_OFI_H*/ gasnet-2025.8.0/ofi-conduit/gasnet_core_help.h0000664000175000017500000000116215142313673021314 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/gasnet_core_help.h $ * Description: GASNet libfabric (OFI) conduit core Header Helpers (Internal code, not for client use) * Copyright 2002, Dan Bonachea * Copyright 2015, Intel Corporation * Portions copyright 2018-2020, The Regents of the University of California. * Terms of use are as specified in license.txt */ #ifndef _IN_GASNETEX_H #error This file is not meant to be included directly- clients should include gasnetex.h #endif #ifndef _GASNET_CORE_HELP_H #define _GASNET_CORE_HELP_H #include #endif gasnet-2025.8.0/ofi-conduit/Makefile.am0000664000175000017500000001226715142313673017706 0ustar alastairalastair## Process this file with automake to produce Makefile.in -*- makefile -*- # $Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/Makefile.am $ # Description: Makefile for GASNet ofi conduit # Copyright 2002, Dan Bonachea # Copyright 2015, Intel Corporation # Terms of use are as specified in license.txt AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME=ofi ## ## SSH bootstrap support (built unless fork() is unavailable) ## if HAVE_BOOTSTRAP_SSH ssh_defines = -DHAVE_SSH_SPAWNER ssh_srcdir = $(top_srcdir)/other/ssh-spawner ssh_sources = $(ssh_srcdir)/gasnet_bootstrap_ssh.c ssh_deps = $(ssh_srcdir)/*.[ch] endif ## ## MPI bootstrap support (optional) ## XXX: should have a way to control this independent of MPI conduit ## if HAVE_BOOTSTRAP_MPI mpi_defines = -DHAVE_MPI_SPAWNER mpi_srcdir = $(top_srcdir)/other/mpi-spawner mpi_deps = $(mpi_srcdir)/*.[ch] # We must compile this one object with MPI_CC. mpi_special_objs = $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o: force @MPI_CC@ @MPI_CFLAGS@ $(LIBDEFINES) $(CONDUIT_EXTRALIBCFLAGS) $(LIBINCLUDES) \ $(MANUAL_MPICFLAGS) -o $@ -c $(mpi_srcdir)/gasnet_bootstrap_mpi.c endif ## ## PMI bootstrap support (optional) ## if HAVE_BOOTSTRAP_PMI pmi_cppflags = -DHAVE_PMI_SPAWNER @PMI_SPAWNER_CFLAGS@ pmi_srcdir = $(top_srcdir)/other/pmi-spawner pmi_sources = $(pmi_srcdir)/gasnet_bootstrap_pmi.c pmi_deps = $(pmi_srcdir)/*.[ch] endif ## ## HWLOC support (unconditional) ## hwloc_srcdir = $(top_srcdir)/other/hwloc hwloc_sources = $(hwloc_srcdir)/gasnet_hwloc.c hwloc_deps = $(hwloc_srcdir)/*.[ch] hwloc_extralibcflags = -I$(hwloc_srcdir) @HWLOC_CFLAGS@ # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = contrib # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ license.txt \ gasnet_ofi.h \ gasnet_ofi.c \ gasnet_core.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h \ gasnet_extended.c \ gasnet_extended_fwd.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiler command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(srcdir)/gasnet_extended.c \ $(srcdir)/gasnet_ofi.c \ $(hwloc_sources) \ $(ssh_sources) $(pmi_sources) # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = @OFI_CFLAGS@ $(ssh_defines) $(mpi_defines) $(pmi_cppflags) $(hwloc_extralibcflags) # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = gasnet_ofi.h # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = $(ssh_deps) $(mpi_deps) $(pmi_deps) $(hwloc_deps) # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = $(mpi_special_objs) # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time if HAVE_FI_HMEM_CUDA ofi_kind_cuda_uva = cuda_uva endif if HAVE_FI_HMEM_ROCR ofi_kind_hip = hip endif if HAVE_FI_HMEM_ZE ofi_kind_ze = ze endif CONDUIT_KINDS = $(ofi_kind_cuda_uva) $(ofi_kind_hip) $(ofi_kind_ze) # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) #CONDUIT_RUNCMD = mpirun -np %N %P %A CONDUIT_RUNCMD = @TOP_BUILDDIR@/ofi-conduit/contrib/gasnetrun_ofi -np %N %P %A #CONDUIT_RUNCMD = yod -np %N -ppn 1 %P %A # conduit-specific tests in ../tests directory CONDUIT_TESTS = # -------- Do not modify anything below this line -------- if BUILD_SEQ_LIBS libgasnet_ofi_seq_a_SOURCES = libraries_seq = libgasnet-ofi-seq.a endif if BUILD_PAR_LIBS libgasnet_ofi_par_a_SOURCES = libraries_par = libgasnet-ofi-par.a endif if BUILD_PARSYNC_LIBS libgasnet_ofi_parsync_a_SOURCES = libraries_parsync = libgasnet-ofi-parsync.a endif libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) include $(top_builddir)/other/Makefile-conduit.mak libgasnet-ofi-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-ofi-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-ofi-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync if USE_OFI_CONDUIT lib_LIBRARIES = $(libraries) all-local: $(lib_LIBRARIES) $(pkgconfig_files) clean-local: do-clean-local install-data-local: do-install-data-local uninstall-local: do-uninstall-local else $(top_srcdir)/gasnetex.h: do-error endif gasnet-2025.8.0/ofi-conduit/gasnet_core_internal.h0000664000175000017500000001640615142313673022207 0ustar alastairalastair/* $Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/gasnet_core_internal.h $ * Description: GASNet libfabric (OFI) conduit header for internal definitions in Core API * Copyright 2002, Dan Bonachea * Copyright 2015, Intel Corporation * Portions copyright 2018-2020, The Regents of the University of California. * Terms of use are as specified in license.txt */ #ifndef _GASNET_CORE_INTERNAL_H #define _GASNET_CORE_INTERNAL_H #include /* whether or not to use spin-locking for HSL's */ #define GASNETC_HSL_SPINLOCK 1 /* ------------------------------------------------------------------------------------ */ #define _hidx_gasnetc_exit_reqh (GASNETC_HANDLER_BASE+0) /* add new core API handlers here and to the bottom of gasnet_core.c */ /* ------------------------------------------------------------------------------------ */ /* handler table (temporary global impl) */ extern gex_AM_Entry_t *gasnetc_handler; /* ------------------------------------------------------------------------------------ */ /* Configure gasnet_event_internal.h and gasnet_event.c */ // TODO-EX: prefix needs to move from "extended" to "core" // Define as needed if iop counters should use something other than weakatomics: /* #define gasnete_op_atomic_(_id) gasnetc_atomic_##_id */ // Define if conduit performs local-completion detection: #define GASNETE_HAVE_LC 1 // Additions to default eop and iop types extern void gasnetc_ofi_handle_rdma(void *, unsigned int); #define GASNETE_CONDUIT_EOP_FIELDS \ gasnetc_ofi_nb_op_ctxt_t ofi; #define GASNETE_EOP_ALLOC_EXTRA(_eop) do { \ (_eop)->ofi.callback = gasnetc_ofi_handle_rdma; \ } while (0) #define GASNETE_CONDUIT_IOP_FIELDS \ gasnetc_ofi_nb_op_ctxt_t get_ofi; \ gasnetc_ofi_nb_op_ctxt_t put_ofi; #define GASNETE_IOP_ALLOC_EXTRA(_iop) do { \ (_iop)->get_ofi.callback = gasnetc_ofi_handle_rdma; \ (_iop)->get_ofi.type = OFI_TYPE_IGET; \ (_iop)->put_ofi.callback = gasnetc_ofi_handle_rdma; \ (_iop)->put_ofi.type = OFI_TYPE_IPUT; \ } while (0) /* ------------------------------------------------------------------------------------ */ // For EOP/IOP fields, above typedef void (*gasnetc_rdma_callback_fn) (void *context, unsigned int aux); typedef enum { OFI_TYPE_EGET, OFI_TYPE_EPUT, OFI_TYPE_IGET, OFI_TYPE_IPUT } gasnetc_ofi_nb_op_type; typedef struct gasnetc_ofi_nb_op_ctxt { gasnetc_rdma_callback_fn callback; gasnetc_ofi_nb_op_type type; } gasnetc_ofi_nb_op_ctxt_t; /* ------------------------------------------------------------------------------------ */ /* FI_THREAD_DOMAIN providers in PAR mode */ #if GASNET_PAR && GASNETC_OFI_USE_THREAD_DOMAIN #define GASNETC_OFI_TRYLOCK(lock) gasneti_spinlock_trylock(&gasnetc_ofi_locks.big_lock) #define GASNETC_OFI_LOCK(lock) gasneti_spinlock_lock(&gasnetc_ofi_locks.big_lock) #define GASNETC_OFI_UNLOCK(lock) gasneti_spinlock_unlock(&gasnetc_ofi_locks.big_lock) /* When using DOMAIN, all locks use the centralized big_lock */ #define GASNETC_OFI_PAR_TRYLOCK(lock) GASNETC_OFI_TRYLOCK(lock) #define GASNETC_OFI_PAR_LOCK(lock) GASNETC_OFI_LOCK(lock) #define GASNETC_OFI_PAR_UNLOCK(lock) GASNETC_OFI_UNLOCK(lock) /* This is left here for the purpose of supporting future providers that require fine * grained locking. For now, all supported providers either support FI_THREAD_DOMAIN or * FI_THREAD_SAFE */ #elif 0 && GASNET_PAR #define GASNETC_OFI_TRYLOCK(lock) gasneti_spinlock_trylock(lock) #define GASNETC_OFI_LOCK(lock) gasneti_spinlock_lock(lock) #define GASNETC_OFI_UNLOCK(lock) gasneti_spinlock_unlock(lock) #define GASNETC_OFI_PAR_TRYLOCK(lock) gasneti_spinlock_trylock(lock) #define GASNETC_OFI_PAR_LOCK(lock) gasneti_spinlock_lock(lock) #define GASNETC_OFI_PAR_UNLOCK(lock) gasneti_spinlock_unlock(lock) #elif GASNET_PAR /* For FI_THREAD_SAFE providers in PAR mode*/ #define GASNETC_OFI_TRYLOCK(lock) 0 #define GASNETC_OFI_LOCK(lock) do{} while(0) #define GASNETC_OFI_UNLOCK(lock) do{} while(0) #define GASNETC_OFI_PAR_TRYLOCK(lock) gasneti_spinlock_trylock(lock) #define GASNETC_OFI_PAR_LOCK(lock) gasneti_spinlock_lock(lock) #define GASNETC_OFI_PAR_UNLOCK(lock) gasneti_spinlock_unlock(lock) #else /* GASNET_SEQ or GASNET_PARSYNC */ #define GASNETC_OFI_TRYLOCK(lock) 0 #define GASNETC_OFI_LOCK(lock) do{} while(0) #define GASNETC_OFI_UNLOCK(lock) do{} while(0) #define GASNETC_OFI_PAR_TRYLOCK(lock) 0 #define GASNETC_OFI_PAR_LOCK(lock) do{} while(0) #define GASNETC_OFI_PAR_UNLOCK(lock) do{} while(0) #endif #define GASNETC_OFI_LOCK_EXPR(lock, expr) do { GASNETC_OFI_LOCK(lock); \ expr; \ GASNETC_OFI_UNLOCK(lock); \ } while(0) /* ------------------------------------------------------------------------------------ */ /* handler table (temporary global impl) */ extern gex_AM_Entry_t *gasnetc_handler; /* ------------------------------------------------------------------------------------ */ /* struct to hold all the locks needed */ #if GASNET_PAR && GASNETC_OFI_USE_THREAD_DOMAIN struct gasnetc_ofi_locks_ { gasneti_atomic_t big_lock; }; #elif GASNET_PAR struct gasnetc_ofi_locks_ { gasneti_atomic_t rx_request_cq; char _pad0[GASNETI_CACHE_PAD(sizeof(gasneti_atomic_t))]; gasneti_atomic_t rx_reply_cq; }; /* This is left here for the purpose of supporting future providers that require fine * grained locking. For now, all supported providers either support FI_THREAD_DOMAIN or * FI_THREAD_SAFE */ #elif 0 && GASNET_PAR && !GASNETC_OFI_USE_THREAD_DOMAIN struct gasnetc_ofi_locks_ { gasneti_atomic_t rx_cq; char _pad0[GASNETI_CACHE_PAD(sizeof(gasneti_atomic_t))]; gasneti_atomic_t tx_cq; char _pad1[GASNETI_CACHE_PAD(sizeof(gasneti_atomic_t))]; gasneti_atomic_t rdma_tx; char _pad2[GASNETI_CACHE_PAD(sizeof(gasneti_atomic_t))]; gasneti_atomic_t rdma_rx; char _pad3[GASNETI_CACHE_PAD(sizeof(gasneti_atomic_t))]; gasneti_atomic_t am_tx; char _pad4[GASNETI_CACHE_PAD(sizeof(gasneti_atomic_t))]; gasneti_atomic_t am_rx; }; #endif #if GASNET_PAR extern struct gasnetc_ofi_locks_ gasnetc_ofi_locks; #endif /* These definitions are just to make the polling of the two different AM * networks easier to read and understand*/ #define OFI_POLL_ALL 1 #define OFI_POLL_REPLY 0 #define GASNETC_STAT_EVENT(name) \ _GASNETI_STAT_EVENT(C,name) #define GASNETC_STAT_EVENT_VAL(name,val) \ _GASNETI_STAT_EVENT_VAL(C,name,val) /* ------------------------------------------------------------------------------------ */ /* Job Spawn / Bootstrap */ extern gasneti_spawnerfn_t const *gasneti_spawner; extern void gasneti_bootstrapBarrier(void); extern void gasneti_bootstrapExchange(void *src, size_t len, void *dest); #define gasneti_bootstrapBroadcast (*(gasneti_spawner->Broadcast)) #define gasneti_bootstrapNbrhdBroadcast (*(gasneti_spawner->NbrhdBroadcast)) #define gasneti_bootstrapAlltoall (*(gasneti_spawner->Alltoall)) #define gasneti_bootstrapAbort (*(gasneti_spawner->Abort)) #define gasneti_bootstrapCleanup (*(gasneti_spawner->Cleanup)) #define gasneti_bootstrapFini (*(gasneti_spawner->Fini)) #endif gasnet-2025.8.0/ofi-conduit/Makefile.in0000664000175000017500000007736715142313673017733 0ustar alastairalastair# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Source: bitbucket.org:berkeleylab/gasnet.git/ofi-conduit/Makefile.am $ # Description: Makefile for GASNet ofi conduit # Copyright 2002, Dan Bonachea # Copyright 2015, Intel Corporation # Terms of use are as specified in license.txt VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = ofi-conduit ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/other/plpa/config/acinclude.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/config-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/gasnet_config.h CONFIG_CLEAN_FILES = conduit.mak CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libgasnet_ofi_par_a_AR = $(AR) $(ARFLAGS) libgasnet_ofi_par_a_LIBADD = am_libgasnet_ofi_par_a_OBJECTS = libgasnet_ofi_par_a_OBJECTS = $(am_libgasnet_ofi_par_a_OBJECTS) libgasnet_ofi_parsync_a_AR = $(AR) $(ARFLAGS) libgasnet_ofi_parsync_a_LIBADD = am_libgasnet_ofi_parsync_a_OBJECTS = libgasnet_ofi_parsync_a_OBJECTS = \ $(am_libgasnet_ofi_parsync_a_OBJECTS) libgasnet_ofi_seq_a_AR = $(AR) $(ARFLAGS) libgasnet_ofi_seq_a_LIBADD = am_libgasnet_ofi_seq_a_OBJECTS = libgasnet_ofi_seq_a_OBJECTS = $(am_libgasnet_ofi_seq_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libgasnet_ofi_par_a_SOURCES) \ $(libgasnet_ofi_parsync_a_SOURCES) \ $(libgasnet_ofi_seq_a_SOURCES) DIST_SOURCES = $(libgasnet_ofi_par_a_SOURCES) \ $(libgasnet_ofi_parsync_a_SOURCES) \ $(libgasnet_ofi_seq_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/conduit.mak.in \ $(top_srcdir)/config-aux/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADDR2LINE_PATH = @ADDR2LINE_PATH@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APRUN_PATH = @APRUN_PATH@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ BOURNE_SHELL = @BOURNE_SHELL@ BUILD_ID = @BUILD_ID@ BUILD_IS_SRC = @BUILD_IS_SRC@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FAMILY = @CC_FAMILY@ CC_SUBFAMILY = @CC_SUBFAMILY@ CFLAGS = @CFLAGS@ COMPLETE_INTTYPES_H = @COMPLETE_INTTYPES_H@ COMPLETE_STDINT_H = @COMPLETE_STDINT_H@ COMPLETE_SYS_TYPES_H = @COMPLETE_SYS_TYPES_H@ CONDUITS = @CONDUITS@ CONFIGURE_ARGS = @CONFIGURE_ARGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CROSS_COMPILING = @CROSS_COMPILING@ CUDA_UVA_CFLAGS = @CUDA_UVA_CFLAGS@ CUDA_UVA_LDFLAGS = @CUDA_UVA_LDFLAGS@ CUDA_UVA_LIBS = @CUDA_UVA_LIBS@ CUDA_guess_prog = @CUDA_guess_prog@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXX_FAMILY = @CXX_FAMILY@ CXX_SUBFAMILY = @CXX_SUBFAMILY@ CYGPATH_W = @CYGPATH_W@ DBX_PATH = @DBX_PATH@ DEBUGMALLOC = @DEBUGMALLOC@ DEBUGMALLOC_VAL = @DEBUGMALLOC_VAL@ DEBUGMALLOC_VAR = @DEBUGMALLOC_VAR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEVWARN_CFLAGS = @DEVWARN_CFLAGS@ DEVWARN_CXXFLAGS = @DEVWARN_CXXFLAGS@ DEVWARN_MPI_CFLAGS = @DEVWARN_MPI_CFLAGS@ DIRNAME = @DIRNAME@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENVCMD = @ENVCMD@ EXEEXT = @EXEEXT@ EXESUFFIX = @EXESUFFIX@ FH_CFLAGS = @FH_CFLAGS@ GASNETI_HWLOC_BIND_PATH = @GASNETI_HWLOC_BIND_PATH@ GASNETI_HWLOC_CALC_PATH = @GASNETI_HWLOC_CALC_PATH@ GASNETI_PTR_BITS = @GASNETI_PTR_BITS@ GASNET_EXTRA_DEFINES = @GASNET_EXTRA_DEFINES@ GASNET_IBV_SPAWNER_CONF = @GASNET_IBV_SPAWNER_CONF@ GASNET_INSTALL_CMD = @GASNET_INSTALL_CMD@ GASNET_OFI_SPAWNER_CONF = @GASNET_OFI_SPAWNER_CONF@ GASNET_OPT_CFLAGS = @GASNET_OPT_CFLAGS@ GASNET_OPT_CXXFLAGS = @GASNET_OPT_CXXFLAGS@ GASNET_PERL_BYTESFLAG = @GASNET_PERL_BYTESFLAG@ GASNET_PERL_LANG = @GASNET_PERL_LANG@ GASNET_PLATFORM = @GASNET_PLATFORM@ GASNET_PSHM_CFLAGS = @GASNET_PSHM_CFLAGS@ GASNET_PSHM_ENABLED = @GASNET_PSHM_ENABLED@ GASNET_PSHM_LDFLAGS = @GASNET_PSHM_LDFLAGS@ GASNET_PSHM_LIBS = @GASNET_PSHM_LIBS@ GASNET_SMP_SPAWNER_CONF = @GASNET_SMP_SPAWNER_CONF@ GASNET_THREAD_DEFINES = @GASNET_THREAD_DEFINES@ GASNET_THREAD_LIBS = @GASNET_THREAD_LIBS@ GASNET_UCX_SPAWNER_CONF = @GASNET_UCX_SPAWNER_CONF@ GASNET_UDP_LIBS = @GASNET_UDP_LIBS@ GDB_PATH = @GDB_PATH@ GMAKE = @GMAKE@ GREP = @GREP@ GSTACK_PATH = @GSTACK_PATH@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HIP_CFLAGS = @HIP_CFLAGS@ HIP_LDFLAGS = @HIP_LDFLAGS@ HIP_LIBS = @HIP_LIBS@ HIP_guess_prog = @HIP_guess_prog@ HUGETLBFS_guess_prog = @HUGETLBFS_guess_prog@ HWLOC_CFLAGS = @HWLOC_CFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ HWLOC_guess_prog = @HWLOC_guess_prog@ IBV_CFLAGS = @IBV_CFLAGS@ IBV_LDFLAGS = @IBV_LDFLAGS@ IBV_LIBS = @IBV_LIBS@ IBV_guess_prog = @IBV_guess_prog@ IDB_PATH = @IDB_PATH@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTTYPES_DEFINES = @INTTYPES_DEFINES@ KEEPTMP_CFLAGS = @KEEPTMP_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBGCC = @LIBGCC@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LLDB_PATH = @LLDB_PATH@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MISC_CFLAGS = @MISC_CFLAGS@ MISC_CPPFLAGS = @MISC_CPPFLAGS@ MISC_CXXFLAGS = @MISC_CXXFLAGS@ MKDIR_P = @MKDIR_P@ MPIRUN_CMD = @MPIRUN_CMD@ MPI_CC = @MPI_CC@ MPI_CC_FAMILY = @MPI_CC_FAMILY@ MPI_CC_SUBFAMILY = @MPI_CC_SUBFAMILY@ MPI_CFLAGS = @MPI_CFLAGS@ MPI_LIBS = @MPI_LIBS@ NM = @NM@ NOASLR_LDFLAGS = @NOASLR_LDFLAGS@ OBJEXT = @OBJEXT@ OFI_CFLAGS = @OFI_CFLAGS@ OFI_LDFLAGS = @OFI_LDFLAGS@ OFI_LIBS = @OFI_LIBS@ OFI_guess_prog = @OFI_guess_prog@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PGDBG_PATH = @PGDBG_PATH@ PMIRUN_CMD = @PMIRUN_CMD@ PMI_SPAWNER_CFLAGS = @PMI_SPAWNER_CFLAGS@ PMI_SPAWNER_LDFLAGS = @PMI_SPAWNER_LDFLAGS@ PMI_SPAWNER_LIBS = @PMI_SPAWNER_LIBS@ PSTACK_PATH = @PSTACK_PATH@ PTHREADS = @PTHREADS@ PWD_PROG = @PWD_PROG@ RANLIB = @RANLIB@ READLINK = @READLINK@ SEPARATE_CC = @SEPARATE_CC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIZEOF_CHAR = @SIZEOF_CHAR@ SIZEOF_DOUBLE = @SIZEOF_DOUBLE@ SIZEOF_FLOAT = @SIZEOF_FLOAT@ SIZEOF_FLOAT__COMPLEX = @SIZEOF_FLOAT__COMPLEX@ SIZEOF_INT = @SIZEOF_INT@ SIZEOF_LONG = @SIZEOF_LONG@ SIZEOF_LONG_DOUBLE = @SIZEOF_LONG_DOUBLE@ SIZEOF_LONG_LONG = @SIZEOF_LONG_LONG@ SIZEOF_PTRDIFF_T = @SIZEOF_PTRDIFF_T@ SIZEOF_SHORT = @SIZEOF_SHORT@ SIZEOF_SIZE_T = @SIZEOF_SIZE_T@ SIZEOF_VOID_P = @SIZEOF_VOID_P@ SIZEOF__BOOL = @SIZEOF__BOOL@ SMP_LIBS = @SMP_LIBS@ SRUN_PATH = @SRUN_PATH@ SSH_SPAWNER_LIBS = @SSH_SPAWNER_LIBS@ STRIP = @STRIP@ SYSTEM_NAME = @SYSTEM_NAME@ SYSTEM_TUPLE = @SYSTEM_TUPLE@ TIMECMD = @TIMECMD@ TOOL_PREFIX = @TOOL_PREFIX@ TOP_BUILDDIR = @TOP_BUILDDIR@ TOP_SRCDIR = @TOP_SRCDIR@ UCX_CFLAGS = @UCX_CFLAGS@ UCX_LDFLAGS = @UCX_LDFLAGS@ UCX_LIBS = @UCX_LIBS@ UCX_guess_prog = @UCX_guess_prog@ VERSION = @VERSION@ ZE_CFLAGS = @ZE_CFLAGS@ ZE_LDFLAGS = @ZE_LDFLAGS@ ZE_LIBS = @ZE_LIBS@ ZE_guess_prog = @ZE_guess_prog@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cxxLDFLAGS = @cxxLDFLAGS@ cxxLIBS = @cxxLIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gasnet_cv__gfp_fullprogname_CC = @gasnet_cv__gfp_fullprogname_CC@ gasnet_cv__gfp_fullprogname_CPP = @gasnet_cv__gfp_fullprogname_CPP@ gasnet_cv__gfp_fullprogname_CXX = @gasnet_cv__gfp_fullprogname_CXX@ gasnet_cv__gfp_fullprogname_CXXCPP = @gasnet_cv__gfp_fullprogname_CXXCPP@ gasnet_cv__gfp_fullprogname_MPIRUN_CMD = @gasnet_cv__gfp_fullprogname_MPIRUN_CMD@ gasnet_cv__gfp_fullprogname_MPI_CC = @gasnet_cv__gfp_fullprogname_MPI_CC@ gasnet_cv__gfp_fullprogname_PMIRUN_CMD = @gasnet_cv__gfp_fullprogname_PMIRUN_CMD@ have_mpcc_r = @have_mpcc_r@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign 1.4 CONDUIT_NAME = ofi @HAVE_BOOTSTRAP_SSH_TRUE@ssh_defines = -DHAVE_SSH_SPAWNER @HAVE_BOOTSTRAP_SSH_TRUE@ssh_srcdir = $(top_srcdir)/other/ssh-spawner @HAVE_BOOTSTRAP_SSH_TRUE@ssh_sources = $(ssh_srcdir)/gasnet_bootstrap_ssh.c @HAVE_BOOTSTRAP_SSH_TRUE@ssh_deps = $(ssh_srcdir)/*.[ch] @HAVE_BOOTSTRAP_MPI_TRUE@mpi_defines = -DHAVE_MPI_SPAWNER @HAVE_BOOTSTRAP_MPI_TRUE@mpi_srcdir = $(top_srcdir)/other/mpi-spawner @HAVE_BOOTSTRAP_MPI_TRUE@mpi_deps = $(mpi_srcdir)/*.[ch] # We must compile this one object with MPI_CC. @HAVE_BOOTSTRAP_MPI_TRUE@mpi_special_objs = $(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o @HAVE_BOOTSTRAP_PMI_TRUE@pmi_cppflags = -DHAVE_PMI_SPAWNER @PMI_SPAWNER_CFLAGS@ @HAVE_BOOTSTRAP_PMI_TRUE@pmi_srcdir = $(top_srcdir)/other/pmi-spawner @HAVE_BOOTSTRAP_PMI_TRUE@pmi_sources = $(pmi_srcdir)/gasnet_bootstrap_pmi.c @HAVE_BOOTSTRAP_PMI_TRUE@pmi_deps = $(pmi_srcdir)/*.[ch] hwloc_srcdir = $(top_srcdir)/other/hwloc hwloc_sources = $(hwloc_srcdir)/gasnet_hwloc.c hwloc_deps = $(hwloc_srcdir)/*.[ch] hwloc_extralibcflags = -I$(hwloc_srcdir) @HWLOC_CFLAGS@ # any conduit-specific subdirectories containing Makefile.am's SUBDIRS = contrib # complete list of files in the conduit directory # include all headers, documentation, etc. # and any subdirectories not containing Makefile.am's CONDUIT_FILELIST = \ license.txt \ gasnet_ofi.h \ gasnet_ofi.c \ gasnet_core.c \ gasnet_core.h \ gasnet_core_fwd.h \ gasnet_core_help.h \ gasnet_core_internal.h \ gasnet_extended.c \ gasnet_extended_fwd.h # list of conduit core and extended .c source files # to be compiled into libgasnet on the compiler command line CONDUIT_SOURCELIST = \ $(srcdir)/gasnet_core.c \ $(srcdir)/gasnet_extended.c \ $(srcdir)/gasnet_ofi.c \ $(hwloc_sources) \ $(ssh_sources) $(pmi_sources) # additional -I or -D directives needed by this specific conduit # other than the standard GASNet includes and flags CONDUIT_EXTRALIBCFLAGS = @OFI_CFLAGS@ $(ssh_defines) $(mpi_defines) $(pmi_cppflags) $(hwloc_extralibcflags) # additional conduit header files to install from external, non-standard directories CONDUIT_EXTRAHEADERS = # headers selected by default rules that should NOT be installed CONDUIT_PRIVATEHEADERS = gasnet_ofi.h # additional file dependencies not mentioned elsewhere # that should force libgasnet rebuild on update CONDUIT_EXTRADEPS = $(ssh_deps) $(mpi_deps) $(pmi_deps) $(hwloc_deps) # additional object files to be included in libgasnet that need to be compiled # using a special, conduit-specific command. These should also be included as # forced targets in this file, and should probably use LIBINCLUDES/LIBDEFINES CONDUIT_SPECIAL_OBJS = $(mpi_special_objs) # memory kinds supported by this conduit (space separated) # to be included in libgasnet if support was enabled at configure time @HAVE_FI_HMEM_CUDA_TRUE@ofi_kind_cuda_uva = cuda_uva @HAVE_FI_HMEM_ROCR_TRUE@ofi_kind_hip = hip @HAVE_FI_HMEM_ZE_TRUE@ofi_kind_ze = ze CONDUIT_KINDS = $(ofi_kind_cuda_uva) $(ofi_kind_hip) $(ofi_kind_ze) # the default job spawn command to be used for "make run-tests" # The following substitutions are performed: # %P = program executable name # %N = requested node count # %A = program arguments # %Q = program arguments w/ an extra level of quotes # %D = the current working directory # %H = hostfile (if any) #CONDUIT_RUNCMD = mpirun -np %N %P %A CONDUIT_RUNCMD = @TOP_BUILDDIR@/ofi-conduit/contrib/gasnetrun_ofi -np %N %P %A #CONDUIT_RUNCMD = yod -np %N -ppn 1 %P %A # conduit-specific tests in ../tests directory CONDUIT_TESTS = # -------- Do not modify anything below this line -------- @BUILD_SEQ_LIBS_TRUE@libgasnet_ofi_seq_a_SOURCES = @BUILD_SEQ_LIBS_TRUE@libraries_seq = libgasnet-ofi-seq.a @BUILD_PAR_LIBS_TRUE@libgasnet_ofi_par_a_SOURCES = @BUILD_PAR_LIBS_TRUE@libraries_par = libgasnet-ofi-par.a @BUILD_PARSYNC_LIBS_TRUE@libgasnet_ofi_parsync_a_SOURCES = @BUILD_PARSYNC_LIBS_TRUE@libraries_parsync = libgasnet-ofi-parsync.a libraries = $(libraries_seq) $(libraries_par) $(libraries_parsync) @USE_OFI_CONDUIT_TRUE@lib_LIBRARIES = $(libraries) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ofi-conduit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign ofi-conduit/Makefile $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): conduit.mak: $(top_builddir)/config.status $(srcdir)/conduit.mak.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ if test -f $$p; then \ $(am__strip_dir) \ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive @USE_OFI_CONDUIT_FALSE@all-local: all-am: Makefile $(LIBRARIES) all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @USE_OFI_CONDUIT_FALSE@install-data-local: @USE_OFI_CONDUIT_FALSE@clean-local: @USE_OFI_CONDUIT_FALSE@uninstall-local: clean: clean-recursive clean-am: clean-generic clean-libLIBRARIES clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLIBRARIES uninstall-local .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ check check-am clean clean-generic clean-libLIBRARIES \ clean-local cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLIBRARIES uninstall-local .PRECIOUS: Makefile @HAVE_BOOTSTRAP_MPI_TRUE@$(builddir)/gasnet_bootstrap_mpi-$(THREAD_MODEL).o: force @HAVE_BOOTSTRAP_MPI_TRUE@ @MPI_CC@ @MPI_CFLAGS@ $(LIBDEFINES) $(CONDUIT_EXTRALIBCFLAGS) $(LIBINCLUDES) \ @HAVE_BOOTSTRAP_MPI_TRUE@ $(MANUAL_MPICFLAGS) -o $@ -c $(mpi_srcdir)/gasnet_bootstrap_mpi.c include $(top_builddir)/other/Makefile-conduit.mak libgasnet-ofi-seq.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-seq libgasnet-ofi-par.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-par libgasnet-ofi-parsync.a: $(libgasnet_dependencies) @$(MAKE) do-libgasnet-parsync @USE_OFI_CONDUIT_TRUE@all-local: $(lib_LIBRARIES) $(pkgconfig_files) @USE_OFI_CONDUIT_TRUE@clean-local: do-clean-local @USE_OFI_CONDUIT_TRUE@install-data-local: do-install-data-local @USE_OFI_CONDUIT_TRUE@uninstall-local: do-uninstall-local @USE_OFI_CONDUIT_FALSE@$(top_srcdir)/gasnetex.h: do-error # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: